switchboard-router 0.5.21 → 0.6.0

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 (1233) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +17 -8
  3. package/app/.next-cli-build/build-manifest.json +3 -3
  4. package/app/.next-cli-build/prerender-manifest.json +3 -435
  5. package/app/.next-cli-build/required-server-files.json +9 -2
  6. package/app/.next-cli-build/routes-manifest.json +86 -13
  7. package/app/.next-cli-build/server/app/(dashboard)/dashboard/agent-library/page.js +2 -2
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/agent-library/page.js.nft.json +1 -1
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/agent-library/page_client-reference-manifest.js +1 -1
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +2 -2
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +11 -24
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +2 -2
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +2 -2
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/routing/page.js +2 -2
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/routing/page.js.nft.json +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/routing/page_client-reference-manifest.js +1 -1
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +2 -2
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +3 -3
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +16 -16
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +2 -2
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +4 -4
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/page.js +2 -2
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/page.js.nft.json +1 -1
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/page_client-reference-manifest.js +1 -1
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +2 -2
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +2 -2
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +2 -2
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +2 -2
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +4 -4
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +2 -2
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +2 -2
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +2 -2
  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/[id]/page.js +2 -2
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/[id]/page.js.nft.json +1 -1
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/[id]/page_client-reference-manifest.js +1 -1
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +2 -2
  71. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  72. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  73. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +2 -2
  74. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  75. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  76. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +2 -2
  77. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  78. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  79. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +2 -2
  80. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  81. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  82. package/app/.next-cli-build/server/app/_global-error/page.js +3 -3
  83. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  84. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  85. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  86. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  87. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  88. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  89. package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  90. package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  91. package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  92. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  93. package/app/.next-cli-build/server/app/_not-found/page.js +2 -2
  94. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  95. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  96. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  97. package/app/.next-cli-build/server/app/_not-found.rsc +4 -4
  98. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +4 -4
  99. package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  100. package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +4 -4
  101. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  102. package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  103. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  104. package/app/.next-cli-build/server/app/api/agent-library/catalog/route.js +1 -1
  105. package/app/.next-cli-build/server/app/api/agent-library/catalog/route.js.nft.json +1 -1
  106. package/app/.next-cli-build/server/app/api/agent-library/doctor/route.js +1 -1
  107. package/app/.next-cli-build/server/app/api/agent-library/doctor/route.js.nft.json +1 -1
  108. package/app/.next-cli-build/server/app/api/agent-library/export/route.js +1 -1
  109. package/app/.next-cli-build/server/app/api/agent-library/export/route.js.nft.json +1 -1
  110. package/app/.next-cli-build/server/app/api/agent-library/mcp/route.js +1 -1
  111. package/app/.next-cli-build/server/app/api/agent-library/mcp/route.js.nft.json +1 -1
  112. package/app/.next-cli-build/server/app/api/agent-library/route.js +1 -1
  113. package/app/.next-cli-build/server/app/api/agent-library/route.js.nft.json +1 -1
  114. package/app/.next-cli-build/server/app/api/agent-library/skills/route.js +1 -1
  115. package/app/.next-cli-build/server/app/api/agent-library/skills/route.js.nft.json +1 -1
  116. package/app/.next-cli-build/server/app/api/agent-library/sync/route.js +1 -1
  117. package/app/.next-cli-build/server/app/api/agent-library/sync/route.js.nft.json +1 -1
  118. package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  119. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  120. package/app/.next-cli-build/server/app/api/cli-tools/aider-settings/route.js +5 -11
  121. package/app/.next-cli-build/server/app/api/cli-tools/aider-settings/route.js.nft.json +1 -1
  122. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +13 -38
  123. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  124. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  125. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  126. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  127. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  128. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
  129. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  130. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +5 -2
  131. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  132. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +2 -1
  133. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  134. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +1 -1
  135. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  136. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
  137. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  138. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
  139. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  140. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +5 -9
  141. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  142. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +5 -2
  143. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  144. package/app/.next-cli-build/server/app/api/cli-tools/gemini-cli-settings/route.js +9 -10
  145. package/app/.next-cli-build/server/app/api/cli-tools/gemini-cli-settings/route.js.nft.json +1 -1
  146. package/app/.next-cli-build/server/app/api/cli-tools/grok-settings/route.js +9 -6
  147. package/app/.next-cli-build/server/app/api/cli-tools/grok-settings/route.js.nft.json +1 -1
  148. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +8 -10
  149. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  150. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +6 -2
  151. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  152. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +5 -2
  153. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  154. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +1 -2
  155. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  156. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +2 -2
  157. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  158. package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js +5 -2
  159. package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js.nft.json +1 -1
  160. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  161. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  162. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  163. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  164. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js +1 -1
  165. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
  166. package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
  167. package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  168. package/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
  169. package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  170. package/app/.next-cli-build/server/app/api/headroom/stop/route.js +1 -1
  171. package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  172. package/app/.next-cli-build/server/app/api/health/route.js +1 -1
  173. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  174. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  175. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  176. package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  177. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  178. package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
  179. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  180. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +2 -2
  181. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  182. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +2 -2
  183. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  184. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  185. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  186. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  187. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  188. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  189. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  190. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  191. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  192. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  193. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  194. package/app/.next-cli-build/server/app/api/mgmt/v1/combos/[id]/route.js +1 -0
  195. package/app/.next-cli-build/server/app/api/mgmt/v1/combos/[id]/route.js.nft.json +1 -0
  196. package/app/.next-cli-build/server/app/api/mgmt/v1/combos/[id]/route_client-reference-manifest.js +1 -0
  197. package/app/.next-cli-build/server/app/api/mgmt/v1/combos/[id]/strategy/route.js +1 -0
  198. package/app/.next-cli-build/server/app/api/mgmt/v1/combos/[id]/strategy/route.js.nft.json +1 -0
  199. package/app/.next-cli-build/server/app/api/mgmt/v1/combos/[id]/strategy/route_client-reference-manifest.js +1 -0
  200. package/app/.next-cli-build/server/app/api/mgmt/v1/combos/route.js +1 -0
  201. package/app/.next-cli-build/server/app/api/mgmt/v1/combos/route.js.nft.json +1 -0
  202. package/app/.next-cli-build/server/app/api/mgmt/v1/combos/route_client-reference-manifest.js +1 -0
  203. package/app/.next-cli-build/server/app/api/mgmt/v1/health/route.js +1 -0
  204. package/app/.next-cli-build/server/app/api/mgmt/v1/health/route.js.nft.json +1 -0
  205. package/app/.next-cli-build/server/app/api/mgmt/v1/health/route_client-reference-manifest.js +1 -0
  206. package/app/.next-cli-build/server/app/api/mgmt/v1/providers/route.js +1 -0
  207. package/app/.next-cli-build/server/app/api/mgmt/v1/providers/route.js.nft.json +1 -0
  208. package/app/.next-cli-build/server/app/api/mgmt/v1/providers/route_client-reference-manifest.js +1 -0
  209. package/app/.next-cli-build/server/app/api/mgmt/v1/routing/route.js +1 -0
  210. package/app/.next-cli-build/server/app/api/mgmt/v1/routing/route.js.nft.json +1 -0
  211. package/app/.next-cli-build/server/app/api/mgmt/v1/routing/route_client-reference-manifest.js +1 -0
  212. package/app/.next-cli-build/server/app/api/mgmt/v1/usage/route.js +1 -0
  213. package/app/.next-cli-build/server/app/api/mgmt/v1/usage/route.js.nft.json +1 -0
  214. package/app/.next-cli-build/server/app/api/mgmt/v1/usage/route_client-reference-manifest.js +1 -0
  215. package/app/.next-cli-build/server/app/api/mgmt/v1/version/route.js +1 -0
  216. package/app/.next-cli-build/server/app/api/mgmt/v1/version/route.js.nft.json +1 -0
  217. package/app/.next-cli-build/server/app/api/mgmt/v1/version/route_client-reference-manifest.js +1 -0
  218. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  219. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  220. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  221. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  222. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  223. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  224. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  225. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  226. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  227. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  228. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  229. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  230. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  231. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  232. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  233. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  234. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  235. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  236. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +2 -2
  237. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  238. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  239. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  240. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  241. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  242. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  243. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  244. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
  245. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  246. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  247. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  248. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  249. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  250. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
  251. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  252. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  253. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  254. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  255. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  256. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  257. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  258. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  259. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  260. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  261. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  262. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  263. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  264. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/batch/route.js +1 -1
  265. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/batch/route.js.nft.json +1 -1
  266. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/cache/route.js +1 -1
  267. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/cache/route.js.nft.json +1 -1
  268. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/prepare/route.js +1 -1
  269. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/prepare/route.js.nft.json +1 -1
  270. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/remove-unavailable/route.js +1 -1
  271. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/remove-unavailable/route.js.nft.json +1 -1
  272. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  273. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  274. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  275. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  276. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  277. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  278. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  279. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  280. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  281. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  282. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
  283. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  284. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  285. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  286. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
  287. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  288. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  289. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  290. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  291. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  292. package/app/.next-cli-build/server/app/api/routing/feedback/route.js +1 -0
  293. package/app/.next-cli-build/server/app/api/routing/feedback/route.js.nft.json +1 -0
  294. package/app/.next-cli-build/server/app/api/routing/feedback/route_client-reference-manifest.js +1 -0
  295. package/app/.next-cli-build/server/app/api/routing/insights/route.js +1 -1
  296. package/app/.next-cli-build/server/app/api/routing/insights/route.js.nft.json +1 -1
  297. package/app/.next-cli-build/server/app/api/routing/learn/route.js +1 -1
  298. package/app/.next-cli-build/server/app/api/routing/learn/route.js.nft.json +1 -1
  299. package/app/.next-cli-build/server/app/api/routing/stats/route.js +1 -0
  300. package/app/.next-cli-build/server/app/api/routing/stats/route.js.nft.json +1 -0
  301. package/app/.next-cli-build/server/app/api/routing/stats/route_client-reference-manifest.js +1 -0
  302. package/app/.next-cli-build/server/app/api/routing/versions/promote/route.js +1 -1
  303. package/app/.next-cli-build/server/app/api/routing/versions/promote/route.js.nft.json +1 -1
  304. package/app/.next-cli-build/server/app/api/routing/versions/rollback/route.js +1 -1
  305. package/app/.next-cli-build/server/app/api/routing/versions/rollback/route.js.nft.json +1 -1
  306. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  307. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  308. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
  309. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  310. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  311. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  312. package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
  313. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  314. package/app/.next-cli-build/server/app/api/skills/[id]/route.js +1 -1
  315. package/app/.next-cli-build/server/app/api/skills/[id]/route.js.nft.json +1 -1
  316. package/app/.next-cli-build/server/app/api/tags/route.js +1 -1
  317. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  318. package/app/.next-cli-build/server/app/api/token-saver/vault-stats/route.js +1 -0
  319. package/app/.next-cli-build/server/app/api/token-saver/vault-stats/route.js.nft.json +1 -0
  320. package/app/.next-cli-build/server/app/api/token-saver/vault-stats/route_client-reference-manifest.js +1 -0
  321. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  322. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  323. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  324. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  325. package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
  326. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  327. package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
  328. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  329. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  330. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  331. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  332. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  333. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  334. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  335. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  336. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  337. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  338. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  339. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  340. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  341. package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
  342. package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  343. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  344. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  345. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  346. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  347. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  348. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  349. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  350. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  351. package/app/.next-cli-build/server/app/api/usage/stream/route.js +2 -2
  352. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  353. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  354. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  355. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  356. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  357. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  358. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  359. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  360. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  361. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  362. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  363. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  364. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  365. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +2 -2
  366. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  367. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
  368. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  369. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  370. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  371. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  372. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  373. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  374. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  375. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  376. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  377. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  378. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  379. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  380. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  381. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  382. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  383. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  384. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  385. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  386. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  387. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  388. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  389. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  390. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  391. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  392. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  393. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  394. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  395. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  396. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  397. package/app/.next-cli-build/server/app/callback/page.js +2 -2
  398. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  399. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  400. package/app/.next-cli-build/server/app/callback.html +1 -1
  401. package/app/.next-cli-build/server/app/callback.rsc +5 -5
  402. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +5 -5
  403. package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
  404. package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +4 -4
  405. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
  406. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +2 -2
  407. package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
  408. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +2 -2
  409. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  410. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  411. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  412. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +5 -5
  413. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +5 -5
  414. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  415. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +4 -4
  416. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  417. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +2 -2
  418. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  419. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  420. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  421. package/app/.next-cli-build/server/app/favicon.ico/route.js +1 -1
  422. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  423. package/app/.next-cli-build/server/app/index.html +1 -1
  424. package/app/.next-cli-build/server/app/index.rsc +4 -4
  425. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  426. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +4 -4
  427. package/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
  428. package/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +4 -4
  429. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
  430. package/app/.next-cli-build/server/app/landing/page.js +2 -2
  431. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  432. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  433. package/app/.next-cli-build/server/app/landing.html +1 -1
  434. package/app/.next-cli-build/server/app/landing.rsc +5 -5
  435. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +5 -5
  436. package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
  437. package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +4 -4
  438. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
  439. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +2 -2
  440. package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
  441. package/app/.next-cli-build/server/app/login/page.js +2 -2
  442. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  443. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  444. package/app/.next-cli-build/server/app/login.html +1 -1
  445. package/app/.next-cli-build/server/app/login.rsc +4 -4
  446. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +4 -4
  447. package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
  448. package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +4 -4
  449. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
  450. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +1 -1
  451. package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
  452. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
  453. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  454. package/app/.next-cli-build/server/app/page.js +2 -2
  455. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  456. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  457. package/app/.next-cli-build/server/app-paths-manifest.json +17 -8
  458. package/app/.next-cli-build/server/chunks/1062.js +64 -0
  459. package/app/.next-cli-build/server/chunks/1064.js +104 -0
  460. package/app/.next-cli-build/server/chunks/1294.js +49 -0
  461. package/app/.next-cli-build/server/chunks/159.js +1 -0
  462. package/app/.next-cli-build/server/chunks/1808.js +1 -0
  463. package/app/.next-cli-build/server/chunks/1814.js +2 -2
  464. package/app/.next-cli-build/server/chunks/194.js +1 -0
  465. package/app/.next-cli-build/server/chunks/1998.js +1 -1
  466. package/app/.next-cli-build/server/chunks/241.js +1 -1
  467. package/app/.next-cli-build/server/chunks/2712.js +3 -0
  468. package/app/.next-cli-build/server/chunks/{9528.js → 2750.js} +2 -3
  469. package/app/.next-cli-build/server/chunks/2925.js +1 -0
  470. package/app/.next-cli-build/server/chunks/3072.js +2 -0
  471. package/app/.next-cli-build/server/chunks/3075.js +1 -0
  472. package/app/.next-cli-build/server/chunks/319.js +3 -3
  473. package/app/.next-cli-build/server/chunks/3535.js +1 -1
  474. package/app/.next-cli-build/server/chunks/3546.js +1 -1
  475. package/app/.next-cli-build/server/chunks/3593.js +2 -2
  476. package/app/.next-cli-build/server/chunks/3675.js +1 -0
  477. package/app/.next-cli-build/server/chunks/369.js +70 -0
  478. package/app/.next-cli-build/server/chunks/3904.js +1 -0
  479. package/app/.next-cli-build/server/chunks/3986.js +49 -14
  480. package/app/.next-cli-build/server/chunks/4126.js +5 -0
  481. package/app/.next-cli-build/server/chunks/{2422.js → 4176.js} +1 -1
  482. package/app/.next-cli-build/server/chunks/4192.js +1 -0
  483. package/app/.next-cli-build/server/chunks/4194.js +1 -1
  484. package/app/.next-cli-build/server/chunks/440.js +26 -0
  485. package/app/.next-cli-build/server/chunks/4646.js +1 -0
  486. package/app/.next-cli-build/server/chunks/4739.js +2 -2
  487. package/app/.next-cli-build/server/chunks/4746.js +1 -1
  488. package/app/.next-cli-build/server/chunks/4776.js +33 -0
  489. package/app/.next-cli-build/server/chunks/4780.js +2 -2
  490. package/app/.next-cli-build/server/chunks/4803.js +9 -0
  491. package/app/.next-cli-build/server/chunks/4904.js +10 -0
  492. package/app/.next-cli-build/server/chunks/507.js +1 -1
  493. package/app/.next-cli-build/server/chunks/5115.js +67 -0
  494. package/app/.next-cli-build/server/chunks/5139.js +1 -0
  495. package/app/.next-cli-build/server/chunks/5258.js +2 -2
  496. package/app/.next-cli-build/server/chunks/5350.js +1 -0
  497. package/app/.next-cli-build/server/chunks/5615.js +3 -3
  498. package/app/.next-cli-build/server/chunks/5821.js +1 -0
  499. package/app/.next-cli-build/server/chunks/6103.js +1 -0
  500. package/app/.next-cli-build/server/chunks/615.js +1 -1
  501. package/app/.next-cli-build/server/chunks/6182.js +3 -3
  502. package/app/.next-cli-build/server/chunks/6252.js +9 -0
  503. package/app/.next-cli-build/server/chunks/6448.js +109 -0
  504. package/app/.next-cli-build/server/chunks/{4206.js → 6470.js} +1 -1
  505. package/app/.next-cli-build/server/chunks/6492.js +1 -0
  506. package/app/.next-cli-build/server/chunks/6844.js +1 -1
  507. package/app/.next-cli-build/server/chunks/698.js +1 -1
  508. package/app/.next-cli-build/server/chunks/7141.js +1 -0
  509. package/app/.next-cli-build/server/chunks/7155.js +1 -0
  510. package/app/.next-cli-build/server/chunks/7250.js +1 -0
  511. package/app/.next-cli-build/server/chunks/7335.js +1 -0
  512. package/app/.next-cli-build/server/chunks/7662.js +1 -0
  513. package/app/.next-cli-build/server/chunks/7753.js +1 -0
  514. package/app/.next-cli-build/server/chunks/7828.js +1 -0
  515. package/app/.next-cli-build/server/chunks/7965.js +2 -2
  516. package/app/.next-cli-build/server/chunks/8062.js +9 -0
  517. package/app/.next-cli-build/server/chunks/8117.js +1 -0
  518. package/app/.next-cli-build/server/chunks/8129.js +1 -0
  519. package/app/.next-cli-build/server/chunks/8400.js +153 -0
  520. package/app/.next-cli-build/server/chunks/8469.js +9 -0
  521. package/app/.next-cli-build/server/chunks/8520.js +1 -1
  522. package/app/.next-cli-build/server/chunks/869.js +1 -0
  523. package/app/.next-cli-build/server/chunks/8775.js +1 -1
  524. package/app/.next-cli-build/server/chunks/8998.js +486 -0
  525. package/app/.next-cli-build/server/chunks/9046.js +1 -0
  526. package/app/.next-cli-build/server/chunks/9062.js +104 -0
  527. package/app/.next-cli-build/server/chunks/9261.js +88 -0
  528. package/app/.next-cli-build/server/chunks/9291.js +1 -0
  529. package/app/.next-cli-build/server/chunks/9397.js +1 -0
  530. package/app/.next-cli-build/server/chunks/9489.js +8 -0
  531. package/app/.next-cli-build/server/chunks/9508.js +45 -0
  532. package/app/.next-cli-build/server/chunks/9696.js +3 -3
  533. package/app/.next-cli-build/server/chunks/995.js +1 -0
  534. package/app/.next-cli-build/server/chunks/static/media/catalog.e7ada387.json +1710 -0
  535. package/app/.next-cli-build/server/instrumentation.js +1 -0
  536. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  537. package/app/.next-cli-build/server/middleware.js +11 -11
  538. package/app/.next-cli-build/server/pages/404.html +1 -1
  539. package/app/.next-cli-build/server/pages/500.html +1 -1
  540. package/app/.next-cli-build/server/server-reference-manifest.js +1 -1
  541. package/app/.next-cli-build/server/server-reference-manifest.json +1 -1
  542. package/app/.next-cli-build/server/webpack-runtime.js +1 -1
  543. package/app/.next-cli-build/static/chunks/1321-a44fdd7adfc172fb.js +1 -0
  544. package/app/.next-cli-build/static/chunks/136-b76ff55769d5ecb1.js +1 -0
  545. package/app/.next-cli-build/static/chunks/2280-61262f8359f37a85.js +64 -0
  546. package/app/.next-cli-build/static/chunks/2493-6241eb181f2ecb6e.js +67 -0
  547. package/app/.next-cli-build/static/chunks/5497-aa5f62602eba33e9.js +7 -0
  548. package/app/.next-cli-build/static/chunks/7592-bbf465c7acd2478e.js +1 -0
  549. package/app/.next-cli-build/static/chunks/782-3676be0287313117.js +3 -0
  550. package/app/.next-cli-build/static/chunks/8500-287dd3e5d372ba6f.js +1 -0
  551. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/agent-library/page-3eb83b61eb3cbc9f.js +1 -0
  552. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/page-04509a38b9fd3dcf.js +1 -0
  553. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/page-fa35870caaeabe20.js +1 -0
  554. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/{page-88244cb193592f8f.js → page-aa9c65a5e73a3f5d.js} +1 -1
  555. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-a8d77d24b4c71915.js +1 -0
  556. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/routing/page-95f09ae849f539d6.js +1 -0
  557. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/page-6678759c536b4008.js +1 -0
  558. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-59e92d48daea1aed.js +3 -0
  559. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page-183cf5498e6d3e42.js +59 -0
  560. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/page-b67e7e3b9acaf1cc.js +1 -0
  561. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/page-a4bad553cba810e7.js +4 -0
  562. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/{page-36448aa4e37c7802.js → page-0568602ac2385103.js} +1 -1
  563. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/page-f6e3507247a819e5.js +1 -0
  564. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/{page-755ed32651028f99.js → page-08fe6612a31239da.js} +1 -1
  565. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-27ae229b00137a0b.js +1 -0
  566. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-a1ab95a02951c91d.js +1 -0
  567. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-0d7fcdbff356b2ab.js +10 -0
  568. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/new/page-608cdc11e7047159.js +1 -0
  569. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-ad84a479883e6cc3.js +1 -0
  570. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-f312c1076859630e.js +1 -0
  571. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/[id]/page-90277b8688f387c1.js +1 -0
  572. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/{page-77bb7400c2be9752.js → page-33e127c15efc66a5.js} +1 -1
  573. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/page-0f74a450b98fa125.js +1 -0
  574. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/page-ad2eda4b48c9319b.js +1 -0
  575. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-025d20cc7b091120.js +1 -0
  576. package/app/.next-cli-build/static/chunks/app/(dashboard)/layout-b06b9aec5dcdf486.js +1 -0
  577. package/app/.next-cli-build/static/chunks/app/_global-error/page-1d242eb898fee31e.js +1 -0
  578. package/app/.next-cli-build/static/chunks/app/api/agent-library/catalog/route-1d242eb898fee31e.js +1 -0
  579. package/app/.next-cli-build/static/chunks/app/api/agent-library/doctor/route-1d242eb898fee31e.js +1 -0
  580. package/app/.next-cli-build/static/chunks/app/api/agent-library/export/route-1d242eb898fee31e.js +1 -0
  581. package/app/.next-cli-build/static/chunks/app/api/agent-library/mcp/route-1d242eb898fee31e.js +1 -0
  582. package/app/.next-cli-build/static/chunks/app/api/agent-library/route-1d242eb898fee31e.js +1 -0
  583. package/app/.next-cli-build/static/chunks/app/api/agent-library/skills/route-1d242eb898fee31e.js +1 -0
  584. package/app/.next-cli-build/static/chunks/app/api/agent-library/sync/route-1d242eb898fee31e.js +1 -0
  585. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-1d242eb898fee31e.js +1 -0
  586. package/app/.next-cli-build/static/chunks/app/api/cli-tools/aider-settings/route-1d242eb898fee31e.js +1 -0
  587. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-1d242eb898fee31e.js +1 -0
  588. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-1d242eb898fee31e.js +1 -0
  589. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-1d242eb898fee31e.js +1 -0
  590. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-1d242eb898fee31e.js +1 -0
  591. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-1d242eb898fee31e.js +1 -0
  592. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-1d242eb898fee31e.js +1 -0
  593. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-1d242eb898fee31e.js +1 -0
  594. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-1d242eb898fee31e.js +1 -0
  595. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-1d242eb898fee31e.js +1 -0
  596. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-1d242eb898fee31e.js +1 -0
  597. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-1d242eb898fee31e.js +1 -0
  598. package/app/.next-cli-build/static/chunks/app/api/cli-tools/gemini-cli-settings/route-1d242eb898fee31e.js +1 -0
  599. package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-settings/route-1d242eb898fee31e.js +1 -0
  600. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-1d242eb898fee31e.js +1 -0
  601. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-1d242eb898fee31e.js +1 -0
  602. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-1d242eb898fee31e.js +1 -0
  603. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-1d242eb898fee31e.js +1 -0
  604. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-1d242eb898fee31e.js +1 -0
  605. package/app/.next-cli-build/static/chunks/app/api/cli-tools/pi-settings/route-1d242eb898fee31e.js +1 -0
  606. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-1d242eb898fee31e.js +1 -0
  607. package/app/.next-cli-build/static/chunks/app/api/combos/route-1d242eb898fee31e.js +1 -0
  608. package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-1d242eb898fee31e.js +1 -0
  609. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-1d242eb898fee31e.js +1 -0
  610. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-1d242eb898fee31e.js +1 -0
  611. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-1d242eb898fee31e.js +1 -0
  612. package/app/.next-cli-build/static/chunks/app/api/health/route-1d242eb898fee31e.js +1 -0
  613. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-1d242eb898fee31e.js +1 -0
  614. package/app/.next-cli-build/static/chunks/app/api/keys/route-1d242eb898fee31e.js +1 -0
  615. package/app/.next-cli-build/static/chunks/app/api/locale/route-1d242eb898fee31e.js +1 -0
  616. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-1d242eb898fee31e.js +1 -0
  617. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-1d242eb898fee31e.js +1 -0
  618. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-1d242eb898fee31e.js +1 -0
  619. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-1d242eb898fee31e.js +1 -0
  620. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-1d242eb898fee31e.js +1 -0
  621. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-1d242eb898fee31e.js +1 -0
  622. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-1d242eb898fee31e.js +1 -0
  623. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/combos/[id]/route-1d242eb898fee31e.js +1 -0
  624. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/combos/[id]/strategy/route-1d242eb898fee31e.js +1 -0
  625. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/combos/route-1d242eb898fee31e.js +1 -0
  626. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/health/route-1d242eb898fee31e.js +1 -0
  627. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/providers/route-1d242eb898fee31e.js +1 -0
  628. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/routing/route-1d242eb898fee31e.js +1 -0
  629. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/usage/route-1d242eb898fee31e.js +1 -0
  630. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/version/route-1d242eb898fee31e.js +1 -0
  631. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-1d242eb898fee31e.js +1 -0
  632. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-1d242eb898fee31e.js +1 -0
  633. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-1d242eb898fee31e.js +1 -0
  634. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-1d242eb898fee31e.js +1 -0
  635. package/app/.next-cli-build/static/chunks/app/api/models/route-1d242eb898fee31e.js +1 -0
  636. package/app/.next-cli-build/static/chunks/app/api/models/test/route-1d242eb898fee31e.js +1 -0
  637. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-1d242eb898fee31e.js +1 -0
  638. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-1d242eb898fee31e.js +1 -0
  639. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-1d242eb898fee31e.js +1 -0
  640. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-1d242eb898fee31e.js +1 -0
  641. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-1d242eb898fee31e.js +1 -0
  642. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-1d242eb898fee31e.js +1 -0
  643. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-1d242eb898fee31e.js +1 -0
  644. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-1d242eb898fee31e.js +1 -0
  645. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-1d242eb898fee31e.js +1 -0
  646. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-1d242eb898fee31e.js +1 -0
  647. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-1d242eb898fee31e.js +1 -0
  648. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-1d242eb898fee31e.js +1 -0
  649. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-1d242eb898fee31e.js +1 -0
  650. package/app/.next-cli-build/static/chunks/app/api/pricing/route-1d242eb898fee31e.js +1 -0
  651. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-1d242eb898fee31e.js +1 -0
  652. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-1d242eb898fee31e.js +1 -0
  653. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-1d242eb898fee31e.js +1 -0
  654. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/model-probes/batch/route-1d242eb898fee31e.js +1 -0
  655. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/model-probes/cache/route-1d242eb898fee31e.js +1 -0
  656. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/model-probes/prepare/route-1d242eb898fee31e.js +1 -0
  657. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/model-probes/remove-unavailable/route-1d242eb898fee31e.js +1 -0
  658. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-1d242eb898fee31e.js +1 -0
  659. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-1d242eb898fee31e.js +1 -0
  660. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-1d242eb898fee31e.js +1 -0
  661. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-1d242eb898fee31e.js +1 -0
  662. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-1d242eb898fee31e.js +1 -0
  663. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-1d242eb898fee31e.js +1 -0
  664. package/app/.next-cli-build/static/chunks/app/api/providers/route-1d242eb898fee31e.js +1 -0
  665. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-1d242eb898fee31e.js +1 -0
  666. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-1d242eb898fee31e.js +1 -0
  667. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-1d242eb898fee31e.js +1 -0
  668. package/app/.next-cli-build/static/chunks/app/api/routing/feedback/route-1d242eb898fee31e.js +1 -0
  669. package/app/.next-cli-build/static/chunks/app/api/routing/insights/route-1d242eb898fee31e.js +1 -0
  670. package/app/.next-cli-build/static/chunks/app/api/routing/learn/route-1d242eb898fee31e.js +1 -0
  671. package/app/.next-cli-build/static/chunks/app/api/routing/stats/route-1d242eb898fee31e.js +1 -0
  672. package/app/.next-cli-build/static/chunks/app/api/routing/versions/promote/route-1d242eb898fee31e.js +1 -0
  673. package/app/.next-cli-build/static/chunks/app/api/routing/versions/rollback/route-1d242eb898fee31e.js +1 -0
  674. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-1d242eb898fee31e.js +1 -0
  675. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-1d242eb898fee31e.js +1 -0
  676. package/app/.next-cli-build/static/chunks/app/api/settings/route-1d242eb898fee31e.js +1 -0
  677. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-1d242eb898fee31e.js +1 -0
  678. package/app/.next-cli-build/static/chunks/app/api/skills/[id]/route-1d242eb898fee31e.js +1 -0
  679. package/app/.next-cli-build/static/chunks/app/api/tags/route-1d242eb898fee31e.js +1 -0
  680. package/app/.next-cli-build/static/chunks/app/api/token-saver/vault-stats/route-1d242eb898fee31e.js +1 -0
  681. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-1d242eb898fee31e.js +1 -0
  682. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-1d242eb898fee31e.js +1 -0
  683. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-1d242eb898fee31e.js +1 -0
  684. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-1d242eb898fee31e.js +1 -0
  685. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-1d242eb898fee31e.js +1 -0
  686. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-1d242eb898fee31e.js +1 -0
  687. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-1d242eb898fee31e.js +1 -0
  688. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-1d242eb898fee31e.js +1 -0
  689. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-1d242eb898fee31e.js +1 -0
  690. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-1d242eb898fee31e.js +1 -0
  691. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-1d242eb898fee31e.js +1 -0
  692. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-1d242eb898fee31e.js +1 -0
  693. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-1d242eb898fee31e.js +1 -0
  694. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-1d242eb898fee31e.js +1 -0
  695. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-1d242eb898fee31e.js +1 -0
  696. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-1d242eb898fee31e.js +1 -0
  697. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-1d242eb898fee31e.js +1 -0
  698. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-1d242eb898fee31e.js +1 -0
  699. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-1d242eb898fee31e.js +1 -0
  700. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-1d242eb898fee31e.js +1 -0
  701. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-1d242eb898fee31e.js +1 -0
  702. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-1d242eb898fee31e.js +1 -0
  703. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-1d242eb898fee31e.js +1 -0
  704. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-1d242eb898fee31e.js +1 -0
  705. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-1d242eb898fee31e.js +1 -0
  706. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-1d242eb898fee31e.js +1 -0
  707. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-1d242eb898fee31e.js +1 -0
  708. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-1d242eb898fee31e.js +1 -0
  709. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-1d242eb898fee31e.js +1 -0
  710. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-1d242eb898fee31e.js +1 -0
  711. package/app/.next-cli-build/static/chunks/app/api/v1/route-1d242eb898fee31e.js +1 -0
  712. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-1d242eb898fee31e.js +1 -0
  713. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-1d242eb898fee31e.js +1 -0
  714. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-1d242eb898fee31e.js +1 -0
  715. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-1d242eb898fee31e.js +1 -0
  716. package/app/.next-cli-build/static/chunks/app/api/version/route-1d242eb898fee31e.js +1 -0
  717. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-1d242eb898fee31e.js +1 -0
  718. package/app/.next-cli-build/static/chunks/app/api/version/update/route-1d242eb898fee31e.js +1 -0
  719. package/app/.next-cli-build/static/chunks/app/callback/page-5c1d863ff86ddc6e.js +1 -0
  720. package/app/.next-cli-build/static/chunks/app/dashboard/settings/pricing/page-4cfc7195d2a8bf0e.js +1 -0
  721. package/app/.next-cli-build/static/chunks/app/landing/page-9e06d57d9b215fd7.js +1 -0
  722. package/app/.next-cli-build/static/chunks/app/login/page-1d242eb898fee31e.js +1 -0
  723. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-1d242eb898fee31e.js +1 -0
  724. package/app/.next-cli-build/static/chunks/app/page-1d242eb898fee31e.js +1 -0
  725. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-1d242eb898fee31e.js +1 -0
  726. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-1d242eb898fee31e.js +1 -0
  727. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-1d242eb898fee31e.js +1 -0
  728. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-1d242eb898fee31e.js +1 -0
  729. package/app/.next-cli-build/static/chunks/webpack-57b54315eb9fa808.js +1 -0
  730. package/app/.next-cli-build/static/css/92a5708a6b29ef8c.css +1 -0
  731. package/app/.next-cli-build/static/media/catalog.e7ada387.json +1710 -0
  732. package/app/.next-cli-build/static/sBwyl4vbyME9SYpTbTHkn/_buildManifest.js +1 -0
  733. package/app/custom-server.js +5 -5
  734. package/app/node_modules/{next/node_modules/postcss → postcss}/lib/container.js +26 -18
  735. package/app/node_modules/{next/node_modules/postcss → postcss}/lib/css-syntax-error.js +47 -14
  736. package/app/node_modules/{next/node_modules/postcss → postcss}/lib/fromJSON.js +23 -9
  737. package/app/node_modules/{next/node_modules/postcss → postcss}/lib/input.js +61 -33
  738. package/app/node_modules/{next/node_modules/postcss → postcss}/lib/lazy-result.js +50 -37
  739. package/app/node_modules/{next/node_modules/postcss → postcss}/lib/map-generator.js +26 -9
  740. package/app/node_modules/{next/node_modules/postcss → postcss}/lib/no-work-result.js +57 -55
  741. package/app/node_modules/{next/node_modules/postcss → postcss}/lib/node.js +110 -35
  742. package/app/node_modules/{next/node_modules/postcss → postcss}/lib/parser.js +46 -38
  743. package/app/node_modules/{next/node_modules/postcss → postcss}/lib/previous-map.js +30 -11
  744. package/app/node_modules/{next/node_modules/postcss → postcss}/lib/processor.js +7 -7
  745. package/app/node_modules/{next/node_modules/postcss → postcss}/lib/result.js +5 -5
  746. package/app/node_modules/{next/node_modules/postcss → postcss}/lib/stringifier.js +41 -20
  747. package/app/node_modules/{next/node_modules/postcss → postcss}/lib/tokenize.js +6 -2
  748. package/app/node_modules/{next/node_modules/postcss → postcss}/package.json +48 -48
  749. package/app/open-sse/package.json +4 -0
  750. package/app/open-sse/providers/generated/catalog.json +1710 -0
  751. package/app/package.json +22 -10
  752. package/app/public/i18n/literals/zh-CN.json +8 -0
  753. package/app/server.js +1 -1
  754. package/app/src/lib/db/adapters/betterSqliteAdapter.js +2 -3
  755. package/app/src/lib/db/adapters/bunSqliteAdapter.js +0 -2
  756. package/app/src/lib/db/adapters/nodeSqliteAdapter.js +0 -2
  757. package/app/src/lib/db/adapters/sqljsAdapter.js +23 -4
  758. package/app/src/lib/db/migrate.js +15 -4
  759. package/app/src/lib/updater/updater.js +67 -9
  760. package/app/src/shared/utils/apiKey.js +3 -7
  761. package/cli.js +205 -180
  762. package/hooks/sqliteRuntime.js +1 -7
  763. package/package.json +2 -2
  764. package/src/cli/api/client.js +3 -20
  765. package/src/cli/menus/settings.js +3 -62
  766. package/src/cli/tray/tray.js +18 -26
  767. package/src/shared/dataDir.js +61 -0
  768. package/src/shared/disableMitm.js +102 -0
  769. package/src/shared/openBrowser.js +43 -0
  770. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +0 -2
  771. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +0 -1
  772. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route_client-reference-manifest.js +0 -1
  773. package/app/.next-cli-build/server/app/api/init/route.js +0 -1
  774. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +0 -1
  775. package/app/.next-cli-build/server/app/api/init/route_client-reference-manifest.js +0 -1
  776. package/app/.next-cli-build/server/app/dashboard/agent-library.html +0 -1
  777. package/app/.next-cli-build/server/app/dashboard/agent-library.meta +0 -17
  778. package/app/.next-cli-build/server/app/dashboard/agent-library.rsc +0 -30
  779. package/app/.next-cli-build/server/app/dashboard/agent-library.segments/!KGRhc2hib2FyZCk/dashboard/agent-library/__PAGE__.segment.rsc +0 -9
  780. package/app/.next-cli-build/server/app/dashboard/agent-library.segments/!KGRhc2hib2FyZCk/dashboard/agent-library.segment.rsc +0 -5
  781. package/app/.next-cli-build/server/app/dashboard/agent-library.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +0 -5
  782. package/app/.next-cli-build/server/app/dashboard/agent-library.segments/!KGRhc2hib2FyZCk.segment.rsc +0 -7
  783. package/app/.next-cli-build/server/app/dashboard/agent-library.segments/_full.segment.rsc +0 -30
  784. package/app/.next-cli-build/server/app/dashboard/agent-library.segments/_head.segment.rsc +0 -6
  785. package/app/.next-cli-build/server/app/dashboard/agent-library.segments/_index.segment.rsc +0 -8
  786. package/app/.next-cli-build/server/app/dashboard/agent-library.segments/_tree.segment.rsc +0 -8
  787. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +0 -1
  788. package/app/.next-cli-build/server/app/dashboard/basic-chat.meta +0 -17
  789. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +0 -27
  790. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +0 -6
  791. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +0 -5
  792. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +0 -5
  793. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +0 -7
  794. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +0 -27
  795. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +0 -6
  796. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +0 -8
  797. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +0 -8
  798. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +0 -1
  799. package/app/.next-cli-build/server/app/dashboard/cli-tools.meta +0 -17
  800. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +0 -28
  801. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +0 -6
  802. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +0 -5
  803. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +0 -5
  804. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +0 -7
  805. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +0 -28
  806. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +0 -6
  807. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +0 -8
  808. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +0 -8
  809. package/app/.next-cli-build/server/app/dashboard/combos/routing.html +0 -1
  810. package/app/.next-cli-build/server/app/dashboard/combos/routing.meta +0 -18
  811. package/app/.next-cli-build/server/app/dashboard/combos/routing.rsc +0 -30
  812. package/app/.next-cli-build/server/app/dashboard/combos/routing.segments/!KGRhc2hib2FyZCk/dashboard/combos/routing/__PAGE__.segment.rsc +0 -9
  813. package/app/.next-cli-build/server/app/dashboard/combos/routing.segments/!KGRhc2hib2FyZCk/dashboard/combos/routing.segment.rsc +0 -5
  814. package/app/.next-cli-build/server/app/dashboard/combos/routing.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +0 -5
  815. package/app/.next-cli-build/server/app/dashboard/combos/routing.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +0 -5
  816. package/app/.next-cli-build/server/app/dashboard/combos/routing.segments/!KGRhc2hib2FyZCk.segment.rsc +0 -7
  817. package/app/.next-cli-build/server/app/dashboard/combos/routing.segments/_full.segment.rsc +0 -30
  818. package/app/.next-cli-build/server/app/dashboard/combos/routing.segments/_head.segment.rsc +0 -6
  819. package/app/.next-cli-build/server/app/dashboard/combos/routing.segments/_index.segment.rsc +0 -8
  820. package/app/.next-cli-build/server/app/dashboard/combos/routing.segments/_tree.segment.rsc +0 -8
  821. package/app/.next-cli-build/server/app/dashboard/combos.html +0 -1
  822. package/app/.next-cli-build/server/app/dashboard/combos.meta +0 -17
  823. package/app/.next-cli-build/server/app/dashboard/combos.rsc +0 -28
  824. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +0 -6
  825. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +0 -5
  826. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +0 -5
  827. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +0 -7
  828. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +0 -28
  829. package/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +0 -6
  830. package/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +0 -8
  831. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +0 -8
  832. package/app/.next-cli-build/server/app/dashboard/endpoint.html +0 -1
  833. package/app/.next-cli-build/server/app/dashboard/endpoint.meta +0 -17
  834. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +0 -28
  835. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +0 -6
  836. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +0 -5
  837. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +0 -5
  838. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +0 -7
  839. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +0 -28
  840. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +0 -6
  841. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +0 -8
  842. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +0 -8
  843. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +0 -1
  844. package/app/.next-cli-build/server/app/dashboard/media-providers/web.meta +0 -18
  845. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +0 -30
  846. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +0 -9
  847. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +0 -5
  848. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +0 -5
  849. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +0 -5
  850. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +0 -7
  851. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +0 -30
  852. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +0 -6
  853. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +0 -8
  854. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +0 -8
  855. package/app/.next-cli-build/server/app/dashboard/media-providers.html +0 -1
  856. package/app/.next-cli-build/server/app/dashboard/media-providers.meta +0 -17
  857. package/app/.next-cli-build/server/app/dashboard/media-providers.rsc +0 -30
  858. package/app/.next-cli-build/server/app/dashboard/media-providers.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/__PAGE__.segment.rsc +0 -9
  859. package/app/.next-cli-build/server/app/dashboard/media-providers.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +0 -5
  860. package/app/.next-cli-build/server/app/dashboard/media-providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +0 -5
  861. package/app/.next-cli-build/server/app/dashboard/media-providers.segments/!KGRhc2hib2FyZCk.segment.rsc +0 -7
  862. package/app/.next-cli-build/server/app/dashboard/media-providers.segments/_full.segment.rsc +0 -30
  863. package/app/.next-cli-build/server/app/dashboard/media-providers.segments/_head.segment.rsc +0 -6
  864. package/app/.next-cli-build/server/app/dashboard/media-providers.segments/_index.segment.rsc +0 -8
  865. package/app/.next-cli-build/server/app/dashboard/media-providers.segments/_tree.segment.rsc +0 -8
  866. package/app/.next-cli-build/server/app/dashboard/mitm.html +0 -1
  867. package/app/.next-cli-build/server/app/dashboard/mitm.meta +0 -17
  868. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +0 -27
  869. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +0 -6
  870. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +0 -5
  871. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +0 -5
  872. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +0 -7
  873. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +0 -27
  874. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +0 -6
  875. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +0 -8
  876. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +0 -8
  877. package/app/.next-cli-build/server/app/dashboard/profile.html +0 -1
  878. package/app/.next-cli-build/server/app/dashboard/profile.meta +0 -17
  879. package/app/.next-cli-build/server/app/dashboard/profile.rsc +0 -28
  880. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +0 -6
  881. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +0 -5
  882. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +0 -5
  883. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +0 -7
  884. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +0 -28
  885. package/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +0 -6
  886. package/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +0 -8
  887. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +0 -8
  888. package/app/.next-cli-build/server/app/dashboard/providers/new.html +0 -1
  889. package/app/.next-cli-build/server/app/dashboard/providers/new.meta +0 -18
  890. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +0 -30
  891. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +0 -9
  892. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +0 -5
  893. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +0 -5
  894. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +0 -5
  895. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +0 -7
  896. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +0 -30
  897. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +0 -6
  898. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +0 -8
  899. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +0 -8
  900. package/app/.next-cli-build/server/app/dashboard/providers.html +0 -1
  901. package/app/.next-cli-build/server/app/dashboard/providers.meta +0 -17
  902. package/app/.next-cli-build/server/app/dashboard/providers.rsc +0 -28
  903. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +0 -6
  904. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +0 -5
  905. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +0 -5
  906. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +0 -7
  907. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +0 -28
  908. package/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +0 -6
  909. package/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +0 -8
  910. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +0 -8
  911. package/app/.next-cli-build/server/app/dashboard/quota.html +0 -2
  912. package/app/.next-cli-build/server/app/dashboard/quota.meta +0 -17
  913. package/app/.next-cli-build/server/app/dashboard/quota.rsc +0 -28
  914. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +0 -7
  915. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +0 -5
  916. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +0 -5
  917. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +0 -7
  918. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +0 -28
  919. package/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +0 -6
  920. package/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +0 -8
  921. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +0 -8
  922. package/app/.next-cli-build/server/app/dashboard/skills.html +0 -1
  923. package/app/.next-cli-build/server/app/dashboard/skills.meta +0 -17
  924. package/app/.next-cli-build/server/app/dashboard/skills.rsc +0 -30
  925. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +0 -9
  926. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills.segment.rsc +0 -5
  927. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +0 -5
  928. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk.segment.rsc +0 -7
  929. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +0 -30
  930. package/app/.next-cli-build/server/app/dashboard/skills.segments/_head.segment.rsc +0 -6
  931. package/app/.next-cli-build/server/app/dashboard/skills.segments/_index.segment.rsc +0 -8
  932. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +0 -8
  933. package/app/.next-cli-build/server/app/dashboard/token-saver.html +0 -1
  934. package/app/.next-cli-build/server/app/dashboard/token-saver.meta +0 -17
  935. package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +0 -27
  936. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +0 -6
  937. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver.segment.rsc +0 -5
  938. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +0 -5
  939. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk.segment.rsc +0 -7
  940. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +0 -27
  941. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_head.segment.rsc +0 -6
  942. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_index.segment.rsc +0 -8
  943. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +0 -8
  944. package/app/.next-cli-build/server/app/dashboard/translator.html +0 -1
  945. package/app/.next-cli-build/server/app/dashboard/translator.meta +0 -17
  946. package/app/.next-cli-build/server/app/dashboard/translator.rsc +0 -30
  947. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +0 -9
  948. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +0 -5
  949. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +0 -5
  950. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +0 -7
  951. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +0 -30
  952. package/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +0 -6
  953. package/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +0 -8
  954. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +0 -8
  955. package/app/.next-cli-build/server/app/dashboard/usage.html +0 -1
  956. package/app/.next-cli-build/server/app/dashboard/usage.meta +0 -17
  957. package/app/.next-cli-build/server/app/dashboard/usage.rsc +0 -30
  958. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +0 -9
  959. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +0 -5
  960. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +0 -5
  961. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +0 -7
  962. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +0 -30
  963. package/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +0 -6
  964. package/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +0 -8
  965. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +0 -8
  966. package/app/.next-cli-build/server/app/dashboard.html +0 -1
  967. package/app/.next-cli-build/server/app/dashboard.meta +0 -16
  968. package/app/.next-cli-build/server/app/dashboard.rsc +0 -28
  969. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +0 -6
  970. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +0 -5
  971. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +0 -7
  972. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +0 -28
  973. package/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +0 -6
  974. package/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +0 -8
  975. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +0 -8
  976. package/app/.next-cli-build/server/chunks/1051.js +0 -1
  977. package/app/.next-cli-build/server/chunks/1220.js +0 -3
  978. package/app/.next-cli-build/server/chunks/1241.js +0 -1
  979. package/app/.next-cli-build/server/chunks/2117.js +0 -1
  980. package/app/.next-cli-build/server/chunks/2280.js +0 -1
  981. package/app/.next-cli-build/server/chunks/2548.js +0 -67
  982. package/app/.next-cli-build/server/chunks/2701.js +0 -10
  983. package/app/.next-cli-build/server/chunks/2768.js +0 -79
  984. package/app/.next-cli-build/server/chunks/3943.js +0 -1
  985. package/app/.next-cli-build/server/chunks/4632.js +0 -1
  986. package/app/.next-cli-build/server/chunks/4827.js +0 -1
  987. package/app/.next-cli-build/server/chunks/5330.js +0 -161
  988. package/app/.next-cli-build/server/chunks/5612.js +0 -1
  989. package/app/.next-cli-build/server/chunks/5655.js +0 -1
  990. package/app/.next-cli-build/server/chunks/5699.js +0 -1
  991. package/app/.next-cli-build/server/chunks/5961.js +0 -28
  992. package/app/.next-cli-build/server/chunks/6040.js +0 -1
  993. package/app/.next-cli-build/server/chunks/6059.js +0 -1
  994. package/app/.next-cli-build/server/chunks/6070.js +0 -1
  995. package/app/.next-cli-build/server/chunks/6150.js +0 -64
  996. package/app/.next-cli-build/server/chunks/6306.js +0 -1
  997. package/app/.next-cli-build/server/chunks/6763.js +0 -1
  998. package/app/.next-cli-build/server/chunks/6777.js +0 -1
  999. package/app/.next-cli-build/server/chunks/6922.js +0 -1
  1000. package/app/.next-cli-build/server/chunks/7651.js +0 -1
  1001. package/app/.next-cli-build/server/chunks/8164.js +0 -67
  1002. package/app/.next-cli-build/server/chunks/8238.js +0 -1
  1003. package/app/.next-cli-build/server/chunks/8860.js +0 -32
  1004. package/app/.next-cli-build/server/chunks/8895.js +0 -67
  1005. package/app/.next-cli-build/server/chunks/8910.js +0 -8
  1006. package/app/.next-cli-build/server/chunks/8920.js +0 -1
  1007. package/app/.next-cli-build/server/chunks/9830.js +0 -73
  1008. package/app/.next-cli-build/static/HFerqnfiKkxdqoMVxOfPW/_buildManifest.js +0 -1
  1009. package/app/.next-cli-build/static/chunks/1321-39ad919b1616c75c.js +0 -1
  1010. package/app/.next-cli-build/static/chunks/1610-cd46c6c47a9aa99a.js +0 -1
  1011. package/app/.next-cli-build/static/chunks/1655-0df56bb46fc3a442.js +0 -73
  1012. package/app/.next-cli-build/static/chunks/2562-ceb69ca00b47af6e.js +0 -64
  1013. package/app/.next-cli-build/static/chunks/5242-bb1a1a7ec3bfb62f.js +0 -1
  1014. package/app/.next-cli-build/static/chunks/5497-1ebc533b1f404c9f.js +0 -7
  1015. package/app/.next-cli-build/static/chunks/5772-901f1092d831ec37.js +0 -3
  1016. package/app/.next-cli-build/static/chunks/705-012db20bb6a5da8b.js +0 -1
  1017. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/agent-library/page-b6f9c90a614bfb03.js +0 -1
  1018. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/page-af2d913820faedae.js +0 -1
  1019. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/page-a777baf9c2aa43b4.js +0 -1
  1020. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-3f5fa0d8e152056f.js +0 -1
  1021. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/routing/page-ff92eef8e57d1447.js +0 -1
  1022. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/page-73628e93426ae624.js +0 -1
  1023. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-a8d8d0f4bfbcfbae.js +0 -3
  1024. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page-a915efd975f6af81.js +0 -59
  1025. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/page-9cad271042843781.js +0 -1
  1026. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/page-8bff15a89ffc3746.js +0 -4
  1027. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/page-4d2b06f4c8d1b384.js +0 -1
  1028. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-afeae41f2e9445ec.js +0 -1
  1029. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-ff7973275ee57a96.js +0 -1
  1030. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-5e44267c26a7e42d.js +0 -10
  1031. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/new/page-3afd6ee04180298c.js +0 -1
  1032. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-4957f02eb9879798.js +0 -1
  1033. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-14da9269a25bd090.js +0 -1
  1034. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/[id]/page-95e55b6593bcf3f7.js +0 -1
  1035. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/page-54d1bd253432bc6f.js +0 -1
  1036. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/page-ef0b203963c2c25e.js +0 -1
  1037. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-59db0b586ad5ab45.js +0 -1
  1038. package/app/.next-cli-build/static/chunks/app/(dashboard)/layout-58013e7e99d17d70.js +0 -1
  1039. package/app/.next-cli-build/static/chunks/app/_global-error/page-4ff27935cdf818b5.js +0 -1
  1040. package/app/.next-cli-build/static/chunks/app/api/agent-library/catalog/route-4ff27935cdf818b5.js +0 -1
  1041. package/app/.next-cli-build/static/chunks/app/api/agent-library/doctor/route-4ff27935cdf818b5.js +0 -1
  1042. package/app/.next-cli-build/static/chunks/app/api/agent-library/export/route-4ff27935cdf818b5.js +0 -1
  1043. package/app/.next-cli-build/static/chunks/app/api/agent-library/mcp/route-4ff27935cdf818b5.js +0 -1
  1044. package/app/.next-cli-build/static/chunks/app/api/agent-library/route-4ff27935cdf818b5.js +0 -1
  1045. package/app/.next-cli-build/static/chunks/app/api/agent-library/skills/route-4ff27935cdf818b5.js +0 -1
  1046. package/app/.next-cli-build/static/chunks/app/api/agent-library/sync/route-4ff27935cdf818b5.js +0 -1
  1047. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-4ff27935cdf818b5.js +0 -1
  1048. package/app/.next-cli-build/static/chunks/app/api/cli-tools/aider-settings/route-4ff27935cdf818b5.js +0 -1
  1049. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-4ff27935cdf818b5.js +0 -1
  1050. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-4ff27935cdf818b5.js +0 -1
  1051. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-4ff27935cdf818b5.js +0 -1
  1052. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-4ff27935cdf818b5.js +0 -1
  1053. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-4ff27935cdf818b5.js +0 -1
  1054. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-4ff27935cdf818b5.js +0 -1
  1055. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-4ff27935cdf818b5.js +0 -1
  1056. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-4ff27935cdf818b5.js +0 -1
  1057. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-4ff27935cdf818b5.js +0 -1
  1058. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-4ff27935cdf818b5.js +0 -1
  1059. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-4ff27935cdf818b5.js +0 -1
  1060. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-4ff27935cdf818b5.js +0 -1
  1061. package/app/.next-cli-build/static/chunks/app/api/cli-tools/gemini-cli-settings/route-4ff27935cdf818b5.js +0 -1
  1062. package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-settings/route-4ff27935cdf818b5.js +0 -1
  1063. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-4ff27935cdf818b5.js +0 -1
  1064. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-4ff27935cdf818b5.js +0 -1
  1065. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-4ff27935cdf818b5.js +0 -1
  1066. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-4ff27935cdf818b5.js +0 -1
  1067. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-4ff27935cdf818b5.js +0 -1
  1068. package/app/.next-cli-build/static/chunks/app/api/cli-tools/pi-settings/route-4ff27935cdf818b5.js +0 -1
  1069. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-4ff27935cdf818b5.js +0 -1
  1070. package/app/.next-cli-build/static/chunks/app/api/combos/route-4ff27935cdf818b5.js +0 -1
  1071. package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-4ff27935cdf818b5.js +0 -1
  1072. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-4ff27935cdf818b5.js +0 -1
  1073. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-4ff27935cdf818b5.js +0 -1
  1074. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-4ff27935cdf818b5.js +0 -1
  1075. package/app/.next-cli-build/static/chunks/app/api/health/route-4ff27935cdf818b5.js +0 -1
  1076. package/app/.next-cli-build/static/chunks/app/api/init/route-4ff27935cdf818b5.js +0 -1
  1077. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-4ff27935cdf818b5.js +0 -1
  1078. package/app/.next-cli-build/static/chunks/app/api/keys/route-4ff27935cdf818b5.js +0 -1
  1079. package/app/.next-cli-build/static/chunks/app/api/locale/route-4ff27935cdf818b5.js +0 -1
  1080. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-4ff27935cdf818b5.js +0 -1
  1081. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-4ff27935cdf818b5.js +0 -1
  1082. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-4ff27935cdf818b5.js +0 -1
  1083. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-4ff27935cdf818b5.js +0 -1
  1084. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-4ff27935cdf818b5.js +0 -1
  1085. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-4ff27935cdf818b5.js +0 -1
  1086. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-4ff27935cdf818b5.js +0 -1
  1087. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-4ff27935cdf818b5.js +0 -1
  1088. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-4ff27935cdf818b5.js +0 -1
  1089. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-4ff27935cdf818b5.js +0 -1
  1090. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-4ff27935cdf818b5.js +0 -1
  1091. package/app/.next-cli-build/static/chunks/app/api/models/route-4ff27935cdf818b5.js +0 -1
  1092. package/app/.next-cli-build/static/chunks/app/api/models/test/route-4ff27935cdf818b5.js +0 -1
  1093. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-4ff27935cdf818b5.js +0 -1
  1094. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-4ff27935cdf818b5.js +0 -1
  1095. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-4ff27935cdf818b5.js +0 -1
  1096. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-4ff27935cdf818b5.js +0 -1
  1097. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-4ff27935cdf818b5.js +0 -1
  1098. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-4ff27935cdf818b5.js +0 -1
  1099. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-4ff27935cdf818b5.js +0 -1
  1100. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-4ff27935cdf818b5.js +0 -1
  1101. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-4ff27935cdf818b5.js +0 -1
  1102. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-4ff27935cdf818b5.js +0 -1
  1103. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-4ff27935cdf818b5.js +0 -1
  1104. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-4ff27935cdf818b5.js +0 -1
  1105. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-4ff27935cdf818b5.js +0 -1
  1106. package/app/.next-cli-build/static/chunks/app/api/pricing/route-4ff27935cdf818b5.js +0 -1
  1107. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-4ff27935cdf818b5.js +0 -1
  1108. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-4ff27935cdf818b5.js +0 -1
  1109. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-4ff27935cdf818b5.js +0 -1
  1110. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/model-probes/batch/route-4ff27935cdf818b5.js +0 -1
  1111. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/model-probes/cache/route-4ff27935cdf818b5.js +0 -1
  1112. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/model-probes/prepare/route-4ff27935cdf818b5.js +0 -1
  1113. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/model-probes/remove-unavailable/route-4ff27935cdf818b5.js +0 -1
  1114. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-4ff27935cdf818b5.js +0 -1
  1115. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-4ff27935cdf818b5.js +0 -1
  1116. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-4ff27935cdf818b5.js +0 -1
  1117. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-4ff27935cdf818b5.js +0 -1
  1118. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-4ff27935cdf818b5.js +0 -1
  1119. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-4ff27935cdf818b5.js +0 -1
  1120. package/app/.next-cli-build/static/chunks/app/api/providers/route-4ff27935cdf818b5.js +0 -1
  1121. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-4ff27935cdf818b5.js +0 -1
  1122. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-4ff27935cdf818b5.js +0 -1
  1123. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-4ff27935cdf818b5.js +0 -1
  1124. package/app/.next-cli-build/static/chunks/app/api/routing/insights/route-4ff27935cdf818b5.js +0 -1
  1125. package/app/.next-cli-build/static/chunks/app/api/routing/learn/route-4ff27935cdf818b5.js +0 -1
  1126. package/app/.next-cli-build/static/chunks/app/api/routing/versions/promote/route-4ff27935cdf818b5.js +0 -1
  1127. package/app/.next-cli-build/static/chunks/app/api/routing/versions/rollback/route-4ff27935cdf818b5.js +0 -1
  1128. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-4ff27935cdf818b5.js +0 -1
  1129. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-4ff27935cdf818b5.js +0 -1
  1130. package/app/.next-cli-build/static/chunks/app/api/settings/route-4ff27935cdf818b5.js +0 -1
  1131. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-4ff27935cdf818b5.js +0 -1
  1132. package/app/.next-cli-build/static/chunks/app/api/skills/[id]/route-4ff27935cdf818b5.js +0 -1
  1133. package/app/.next-cli-build/static/chunks/app/api/tags/route-4ff27935cdf818b5.js +0 -1
  1134. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-4ff27935cdf818b5.js +0 -1
  1135. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-4ff27935cdf818b5.js +0 -1
  1136. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-4ff27935cdf818b5.js +0 -1
  1137. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-4ff27935cdf818b5.js +0 -1
  1138. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-4ff27935cdf818b5.js +0 -1
  1139. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-4ff27935cdf818b5.js +0 -1
  1140. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-4ff27935cdf818b5.js +0 -1
  1141. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-4ff27935cdf818b5.js +0 -1
  1142. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-4ff27935cdf818b5.js +0 -1
  1143. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-4ff27935cdf818b5.js +0 -1
  1144. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-4ff27935cdf818b5.js +0 -1
  1145. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-4ff27935cdf818b5.js +0 -1
  1146. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-4ff27935cdf818b5.js +0 -1
  1147. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-4ff27935cdf818b5.js +0 -1
  1148. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-4ff27935cdf818b5.js +0 -1
  1149. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-4ff27935cdf818b5.js +0 -1
  1150. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-4ff27935cdf818b5.js +0 -1
  1151. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-4ff27935cdf818b5.js +0 -1
  1152. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-4ff27935cdf818b5.js +0 -1
  1153. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-4ff27935cdf818b5.js +0 -1
  1154. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-4ff27935cdf818b5.js +0 -1
  1155. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-4ff27935cdf818b5.js +0 -1
  1156. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-4ff27935cdf818b5.js +0 -1
  1157. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-4ff27935cdf818b5.js +0 -1
  1158. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-4ff27935cdf818b5.js +0 -1
  1159. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-4ff27935cdf818b5.js +0 -1
  1160. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-4ff27935cdf818b5.js +0 -1
  1161. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-4ff27935cdf818b5.js +0 -1
  1162. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-4ff27935cdf818b5.js +0 -1
  1163. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-4ff27935cdf818b5.js +0 -1
  1164. package/app/.next-cli-build/static/chunks/app/api/v1/route-4ff27935cdf818b5.js +0 -1
  1165. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-4ff27935cdf818b5.js +0 -1
  1166. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-4ff27935cdf818b5.js +0 -1
  1167. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-4ff27935cdf818b5.js +0 -1
  1168. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-4ff27935cdf818b5.js +0 -1
  1169. package/app/.next-cli-build/static/chunks/app/api/version/route-4ff27935cdf818b5.js +0 -1
  1170. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-4ff27935cdf818b5.js +0 -1
  1171. package/app/.next-cli-build/static/chunks/app/api/version/update/route-4ff27935cdf818b5.js +0 -1
  1172. package/app/.next-cli-build/static/chunks/app/callback/page-64f2a90493720740.js +0 -1
  1173. package/app/.next-cli-build/static/chunks/app/dashboard/settings/pricing/page-2c2051aa3be879d6.js +0 -1
  1174. package/app/.next-cli-build/static/chunks/app/landing/page-8c76c0ea58e06a53.js +0 -1
  1175. package/app/.next-cli-build/static/chunks/app/login/page-4ff27935cdf818b5.js +0 -1
  1176. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-4ff27935cdf818b5.js +0 -1
  1177. package/app/.next-cli-build/static/chunks/app/page-4ff27935cdf818b5.js +0 -1
  1178. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-4ff27935cdf818b5.js +0 -1
  1179. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-4ff27935cdf818b5.js +0 -1
  1180. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-4ff27935cdf818b5.js +0 -1
  1181. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-4ff27935cdf818b5.js +0 -1
  1182. package/app/.next-cli-build/static/chunks/webpack-868e94e9a2c8d9a9.js +0 -1
  1183. package/app/.next-cli-build/static/css/20c5585d3269ee43.css +0 -1
  1184. package/app/cli/.build-home/.switchboard/auth/machine-id-salt +0 -1
  1185. package/app/cli/.build-home/.switchboard/db/data.sqlite +0 -0
  1186. package/app/cli/.build-home/.switchboard/machine-id +0 -1
  1187. package/app/public/i18n/literals/ar.json +0 -195
  1188. package/app/public/i18n/literals/bn.json +0 -195
  1189. package/app/public/i18n/literals/cs.json +0 -195
  1190. package/app/public/i18n/literals/da.json +0 -195
  1191. package/app/public/i18n/literals/de.json +0 -195
  1192. package/app/public/i18n/literals/el.json +0 -195
  1193. package/app/public/i18n/literals/es.json +0 -195
  1194. package/app/public/i18n/literals/fa.json +0 -195
  1195. package/app/public/i18n/literals/fi.json +0 -195
  1196. package/app/public/i18n/literals/fr.json +0 -195
  1197. package/app/public/i18n/literals/he.json +0 -195
  1198. package/app/public/i18n/literals/hi.json +0 -195
  1199. package/app/public/i18n/literals/hu.json +0 -195
  1200. package/app/public/i18n/literals/id.json +0 -195
  1201. package/app/public/i18n/literals/it.json +0 -195
  1202. package/app/public/i18n/literals/ja.json +0 -195
  1203. package/app/public/i18n/literals/ko.json +0 -195
  1204. package/app/public/i18n/literals/nl.json +0 -195
  1205. package/app/public/i18n/literals/no.json +0 -195
  1206. package/app/public/i18n/literals/pl.json +0 -195
  1207. package/app/public/i18n/literals/pt-BR.json +0 -195
  1208. package/app/public/i18n/literals/pt-PT.json +0 -195
  1209. package/app/public/i18n/literals/ro.json +0 -195
  1210. package/app/public/i18n/literals/ru.json +0 -195
  1211. package/app/public/i18n/literals/sv.json +0 -195
  1212. package/app/public/i18n/literals/th.json +0 -195
  1213. package/app/public/i18n/literals/tl.json +0 -195
  1214. package/app/public/i18n/literals/tr.json +0 -195
  1215. package/app/public/i18n/literals/uk.json +0 -195
  1216. package/app/public/i18n/literals/ur.json +0 -195
  1217. package/app/public/i18n/literals/vi.json +0 -195
  1218. package/app/public/i18n/literals/zh-TW.json +0 -195
  1219. package/app/.next-cli-build/static/{HFerqnfiKkxdqoMVxOfPW → sBwyl4vbyME9SYpTbTHkn}/_ssgManifest.js +0 -0
  1220. package/app/node_modules/{next/node_modules/postcss → postcss}/lib/at-rule.js +0 -0
  1221. package/app/node_modules/{next/node_modules/postcss → postcss}/lib/comment.js +0 -0
  1222. package/app/node_modules/{next/node_modules/postcss → postcss}/lib/declaration.js +4 -4
  1223. package/app/node_modules/{next/node_modules/postcss → postcss}/lib/document.js +0 -0
  1224. package/app/node_modules/{next/node_modules/postcss → postcss}/lib/list.js +0 -0
  1225. package/app/node_modules/{next/node_modules/postcss → postcss}/lib/parse.js +1 -1
  1226. package/app/node_modules/{next/node_modules/postcss → postcss}/lib/postcss.js +12 -12
  1227. package/app/node_modules/{next/node_modules/postcss → postcss}/lib/root.js +0 -0
  1228. package/app/node_modules/{next/node_modules/postcss → postcss}/lib/rule.js +6 -6
  1229. /package/app/node_modules/{next/node_modules/postcss → postcss}/lib/stringify.js +0 -0
  1230. /package/app/node_modules/{next/node_modules/postcss → postcss}/lib/symbols.js +0 -0
  1231. /package/app/node_modules/{next/node_modules/postcss → postcss}/lib/terminal-highlight.js +0 -0
  1232. /package/app/node_modules/{next/node_modules/postcss → postcss}/lib/warn-once.js +0 -0
  1233. /package/app/node_modules/{next/node_modules/postcss → postcss}/lib/warning.js +0 -0
@@ -1,11 +1,11 @@
1
- (()=>{var a={};a.id=2134,a.ids=[2134],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},643:a=>{"use strict";a.exports=require("node:perf_hooks")},1708:a=>{"use strict";a.exports=require("node:process")},1932:a=>{"use strict";a.exports=require("url")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},4573:a=>{"use strict";a.exports=require("node:buffer")},7066:a=>{"use strict";a.exports=require("node:tty")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},14985:a=>{"use strict";a.exports=require("dns")},16698:a=>{"use strict";a.exports=require("node:async_hooks")},17891:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/get-segment-param")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},21820:a=>{"use strict";a.exports=require("os")},24889:(a,b,c)=>{Promise.resolve().then(c.bind(c,44139))},26713:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/is-bot")},27910:a=>{"use strict";a.exports=require("stream")},28354:a=>{"use strict";a.exports=require("util")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},31421:a=>{"use strict";a.exports=require("node:child_process")},32467:a=>{"use strict";a.exports=require("node:http2")},33873:a=>{"use strict";a.exports=require("path")},34589:a=>{"use strict";a.exports=require("node:assert")},37067:a=>{"use strict";a.exports=require("node:http")},37540:a=>{"use strict";a.exports=require("node:console")},38522:a=>{"use strict";a.exports=require("node:zlib")},39989:(a,b,c)=>{"use strict";c.r(b),c.d(b,{__next_app__:()=>O,handler:()=>Q,routeModule:()=>P});var d=c(7553),e=c(84006),f=c(67798),g=c(34775),h=c(99373),i=c(73461),j=c(1020),k=c(26349),l=c(54365),m=c(16023),n=c(14965),o=c(63747),p=c(24235),q=c(23938),r=c(261),s=c(66758),t=c(77243),u=c(26713),v=c(37527),w=c(22820),x=c(88216),y=c(47929),z=c(79551),A=c(71797),B=c(89125),C=c(86439),D=c(77068),E=c(27269),F=c(37525),G=c(61287),H=c(81494),I=c(70722),J=c(70753),K=c(43954),L=c(17891),M={};for(let a in G)0>["default","__next_app__","routeModule","handler"].indexOf(a)&&(M[a]=()=>G[a]);c.d(b,M);let N={children:["",{children:["(dashboard)",{children:["dashboard",{children:["providers",{children:["[id]",{children:["__PAGE__",{},{page:[()=>Promise.resolve().then(c.bind(c,93110)),"/home/runner/work/switchboard-router/switchboard-router/src/app/(dashboard)/dashboard/providers/[id]/page.js"]}]},{"global-error":[()=>Promise.resolve().then(c.t.bind(c,95547,23)),"next/dist/client/components/builtin/global-error.js"]},["new"]]},{"global-error":[()=>Promise.resolve().then(c.t.bind(c,95547,23)),"next/dist/client/components/builtin/global-error.js"]},[]]},{"global-error":[()=>Promise.resolve().then(c.t.bind(c,95547,23)),"next/dist/client/components/builtin/global-error.js"]},[]]},{layout:[()=>Promise.resolve().then(c.bind(c,30508)),"/home/runner/work/switchboard-router/switchboard-router/src/app/(dashboard)/layout.js"],"global-error":[()=>Promise.resolve().then(c.t.bind(c,95547,23)),"next/dist/client/components/builtin/global-error.js"],"not-found":[()=>Promise.resolve().then(c.t.bind(c,55091,23)),"next/dist/client/components/builtin/not-found.js"],forbidden:[()=>Promise.resolve().then(c.t.bind(c,45270,23)),"next/dist/client/components/builtin/forbidden.js"],unauthorized:[()=>Promise.resolve().then(c.t.bind(c,28193,23)),"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await Promise.resolve().then(c.bind(c,70440))).default(a)],apple:[],openGraph:[],twitter:[],manifest:"/manifest.webmanifest"}},[]]},{layout:[()=>Promise.resolve().then(c.bind(c,50385)),"/home/runner/work/switchboard-router/switchboard-router/src/app/layout.js"],"global-error":[()=>Promise.resolve().then(c.t.bind(c,95547,23)),"next/dist/client/components/builtin/global-error.js"],"not-found":[()=>Promise.resolve().then(c.t.bind(c,55091,23)),"next/dist/client/components/builtin/not-found.js"],forbidden:[()=>Promise.resolve().then(c.t.bind(c,45270,23)),"next/dist/client/components/builtin/forbidden.js"],unauthorized:[()=>Promise.resolve().then(c.t.bind(c,28193,23)),"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await Promise.resolve().then(c.bind(c,70440))).default(a)],apple:[],openGraph:[],twitter:[],manifest:"/manifest.webmanifest"}},[]]}.children,O={require:c,loadChunk:()=>Promise.resolve()},P=new d.AppPageRouteModule({definition:{kind:e.RouteKind.APP_PAGE,page:"/(dashboard)/dashboard/providers/[id]/page",pathname:"/dashboard/providers/[id]",bundlePath:"",filename:"",appPaths:[]},userland:{loaderTree:N},distDir:".next-cli-build",relativeProjectDir:""});async function Q(a,b,d){var M,R,S,T,U;d.requestMeta&&(0,h.setRequestMeta)(a,d.requestMeta),P.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let V=!!(0,h.getRequestMeta)(a,"minimalMode"),W="/(dashboard)/dashboard/providers/[id]/page";"/index"===W&&(W="/");let X=await P.prepare(a,b,{srcPage:W,multiZoneDraftMode:!1});if(!X)return b.statusCode=400,b.end("Bad Request"),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;let{buildId:Y,query:Z,params:$,pageIsDynamic:_,buildManifest:aa,nextFontManifest:ab,reactLoadableManifest:ac,serverActionsManifest:ad,clientReferenceManifest:ae,subresourceIntegrityManifest:af,prerenderManifest:ag,isDraftMode:ah,resolvedPathname:ai,revalidateOnlyGenerated:aj,routerServerContext:ak,nextConfig:al,parsedUrl:am,interceptionRoutePatterns:an,deploymentId:ao,clientAssetToken:ap}=X,aq=(0,r.normalizeAppPath)(W),{isOnDemandRevalidate:ar}=X,as=al.experimental.ppr&&!al.cacheComponents&&(0,K.isInterceptionRouteAppPath)(ai)?null:P.match(ai,ag),at=(null==as?void 0:as.route)??null,au=!!ag.routes[ai],av=a.headers["user-agent"]||"",aw=(0,u.getBotType)(av),ax=(0,q.isHtmlBotRequest)(a),ay=(0,h.getRequestMeta)(a,"isPrefetchRSCRequest")??"1"===a.headers[t.NEXT_ROUTER_PREFETCH_HEADER],az=(0,h.getRequestMeta)(a,"isRSCRequest")??(0,n.f)(a.headers[t.RSC_HEADER]),aA=(0,s.getIsPossibleServerAction)(a),aB=(0,m.checkIsAppPPREnabled)(al.experimental.ppr),aC=a.headers[y.NEXT_RESUME_STATE_LENGTH_HEADER];if(!(0,h.getRequestMeta)(a,"postponed")&&V&&aB&&aA&&aC&&"string"==typeof aC){let e=parseInt(aC,10),{maxPostponedStateSize:f,maxPostponedStateSizeBytes:g}=(0,E.getMaxPostponedStateSize)(al.experimental.maxPostponedStateSize);if(!isNaN(e)&&e>0){if(e>g)return b.statusCode=413,b.end((0,E.getPostponedStateExceededErrorMessage)(f)),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;let i="1 MB",j=(null==(U=al.experimental.serverActions)?void 0:U.bodySizeLimit)??i,k=e+(j!==i?c(95726).parse(j):1048576),l=await (0,E.readBodyWithSizeLimit)(a,k);if(null===l)return b.statusCode=413,b.end("Request body exceeded limit. To configure the body size limit for Server Actions, see: https://nextjs.org/docs/app/api-reference/next-config-js/serverActions#bodysizelimit"),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;if(l.length>=e){let b=l.subarray(0,e).toString("utf8");(0,h.addRequestMeta)(a,"postponed",b);let c=l.subarray(e);(0,h.addRequestMeta)(a,"actionBody",c)}else throw Object.defineProperty(Error(`invariant: expected ${e} bytes of postponed state but only received ${l.length} bytes`),"__NEXT_ERROR_CODE",{value:"E979",enumerable:!1,configurable:!0})}}if(!(0,h.getRequestMeta)(a,"postponed")&&aB&&"1"===a.headers[y.NEXT_RESUME_HEADER]&&"POST"===a.method){let{maxPostponedStateSize:c,maxPostponedStateSizeBytes:e}=(0,E.getMaxPostponedStateSize)(al.experimental.maxPostponedStateSize),f=await (0,E.readBodyWithSizeLimit)(a,e);if(null===f)return b.statusCode=413,b.end((0,E.getPostponedStateExceededErrorMessage)(c)),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;let g=f.toString("utf8");(0,h.addRequestMeta)(a,"postponed",g)}let aD=!0===P.isDev||!0===al.experimental.exposeTestingApiInProductionBuild,aE=aD&&("1"===a.headers[t.NEXT_INSTANT_PREFETCH_HEADER]||!(0,n.f)(a.headers[t.RSC_HEADER])&&"string"==typeof a.headers.cookie&&a.headers.cookie.includes(t.NEXT_INSTANT_TEST_COOKIE+"=")),aF=(aB||aE)&&((null==(M=ag.routes[aq]??ag.dynamicRoutes[aq])?void 0:M.renderingMode)==="PARTIALLY_STATIC"||aE&&(aD||(null==ak?void 0:ak.experimentalTestProxy)===!0)),aG=aE&&aF,aH=aG&&!0===P.isDev,aI=!1,aJ=aF?(0,h.getRequestMeta)(a,"postponed"):void 0,aK=null==(R=ag.routes[ai])?void 0:R.prefetchDataRoute,aL=aF&&az&&!ay&&!aK;V&&(aL=aL&&!!aJ);let aM=(0,h.getRequestMeta)(a,"segmentPrefetchRSCRequest"),aN=(!aw||!aF)&&(!av||(0,q.shouldServeStreamingMetadata)(av,al.htmlLimitedBots)),aO=!!((at||au||ag.routes[aq])&&!(aw&&aF)),aP=aF&&!0===al.cacheComponents,aQ=!0===P.isDev||!aO||"string"==typeof aJ||(aP&&(0,h.getRequestMeta)(a,"onCacheEntryV2")?aL&&!V:aL),aR=!!aw&&aF,aS=(null==at?void 0:at.remainingPrerenderableParams)??[],aT=(null==at?void 0:at.fallback)===null&&((null==(S=at.fallbackRootParams)?void 0:S.length)??0)>0,aU=null;if(!ah&&aO&&!aQ&&!aA&&!aJ&&!aL){let a=as?"string"==typeof(null==at?void 0:at.fallback)?at.fallback:as.source:null;if(!0===al.experimental.partialFallbacks&&a&&(null==at?void 0:at.fallbackRouteParams)&&!aT){if(aS.length>0){let b,c=(b=new Map(aS.map(a=>[a.paramName,a])),a.split("/").map(a=>{let c=(0,L.getSegmentParam)(a);if(!c)return a;let d=b.get(c.paramName);if(!d)return a;let e=null==$?void 0:$[d.paramName];if(!e)return a;let f=Array.isArray(e)?e.map(a=>encodeURIComponent(a)).join("/"):encodeURIComponent(e);return a.replace((0,o.buildDynamicSegmentPlaceholder)(d),f)}).join("/")||"/");aU=c!==a?c:null}}else aU=ai}let aV=aU;!aV&&(P.isDev||aO&&_&&(null==at?void 0:at.fallbackRouteParams)&&!aA)&&(aV=ai),P.isDev||ah||!aO||!az||aL||(0,k.d)(a.headers);let aW={...G,tree:N,handler:Q,routeModule:P,__next_app__:O};ad&&ae&&(0,p.setManifestsSingleton)({page:W,clientReferenceManifest:ae,serverActionsManifest:ad});let aX=a.method||"GET",aY=(0,g.getTracer)(),aZ=aY.getActiveScopeSpan(),a$=!!(null==ak?void 0:ak.isWrappedByNextServer),a_=!0===al.experimental.partialFallbacks&&aS.length>0?(null==at||null==(T=at.fallbackRouteParams)?void 0:T.filter(a=>!aS.some(b=>b.paramName===a.paramName)))??[]:[],a0=async()=>((null==ak?void 0:ak.render404)?await ak.render404(a,b,am,!1):b.end("This page could not be found"),null);try{let k,m=P.getVaryHeader(ai,an);b.setHeader("Vary",m);let n=async(c,d)=>{let e=new l.NodeNextRequest(a),f=new l.NodeNextResponse(b);return P.render(e,f,d).finally(()=>{if(!c)return;c.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let a=aY.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==i.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let d=a.get("next.route");if(d){let a=`${aX} ${d}`;c.setAttributes({"next.route":d,"http.route":d,"next.span_name":a}),c.updateName(a),k&&k!==c&&(k.setAttribute("http.route",d),k.updateName(a))}else c.updateName(`${aX} ${W}`)})},p=(0,h.getRequestMeta)(a,"incrementalCache")||await P.getIncrementalCache(a,al,ag,V);null==p||p.resetRequestCache(),globalThis.__incrementalCache=p;let q=async({span:e,postponed:f,fallbackRouteParams:g,forceStaticRender:i})=>{let k={query:Z,params:$,page:aq,sharedContext:{buildId:Y,deploymentId:ao,clientAssetToken:ap},serverComponentsHmrCache:(0,h.getRequestMeta)(a,"serverComponentsHmrCache"),fallbackRouteParams:g,renderOpts:{App:()=>null,Document:()=>null,pageConfig:{},ComponentMod:aW,Component:(0,j.T)(aW),params:$,routeModule:P,page:W,postponed:f,shouldWaitOnAllReady:aR,serveStreamingMetadata:aN,supportsDynamicResponse:"string"==typeof f||aQ,buildManifest:aa,nextFontManifest:ab,reactLoadableManifest:ac,subresourceIntegrityManifest:af,setCacheStatus:null==ak?void 0:ak.setCacheStatus,setIsrStatus:null==ak?void 0:ak.setIsrStatus,setReactDebugChannel:null==ak?void 0:ak.setReactDebugChannel,sendErrorsToBrowser:null==ak?void 0:ak.sendErrorsToBrowser,dir:c(33873).join(process.cwd(),P.relativeProjectDir),isDraftMode:ah,botType:aw,isOnDemandRevalidate:ar,isPossibleServerAction:aA,assetPrefix:al.assetPrefix,nextConfigOutput:al.output,crossOrigin:al.crossOrigin,trailingSlash:al.trailingSlash,images:al.images,previewProps:ag.preview,enableTainting:al.experimental.taint,htmlLimitedBots:al.htmlLimitedBots,reactMaxHeadersLength:al.reactMaxHeadersLength,multiZoneDraftMode:!1,incrementalCache:p,cacheLifeProfiles:al.cacheLife,basePath:al.basePath,serverActions:al.experimental.serverActions,logServerFunctions:"object"==typeof al.logging&&!!al.logging.serverFunctions,...aG||aH||aI?{isBuildTimePrerendering:!0,supportsDynamicResponse:!1,isStaticGeneration:!0,isDebugDynamicAccesses:aH}:{},cacheComponents:!!al.cacheComponents,experimental:{isRoutePPREnabled:aF,expireTime:al.expireTime,staleTimes:al.experimental.staleTimes,dynamicOnHover:!!al.experimental.dynamicOnHover,optimisticRouting:!!al.experimental.optimisticRouting,inlineCss:!!al.experimental.inlineCss,prefetchInlining:al.experimental.prefetchInlining??!1,authInterrupts:!!al.experimental.authInterrupts,cachedNavigations:!!al.experimental.cachedNavigations,clientTraceMetadata:al.experimental.clientTraceMetadata||[],clientParamParsingOrigins:al.experimental.clientParamParsingOrigins,maxPostponedStateSizeBytes:(0,D.parseMaxPostponedStateSize)(al.experimental.maxPostponedStateSize)},waitUntil:d.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:()=>{},onInstrumentationRequestError:(b,c,d,e)=>P.onRequestError(a,b,d,e,ak),err:(0,h.getRequestMeta)(a,"invokeError")}};i&&(k.renderOpts.supportsDynamicResponse=!1);let l=await n(e,k),{metadata:m}=l,{cacheControl:o,headers:q={},fetchTags:r,fetchMetrics:s}=m;if(r&&(q[y.NEXT_CACHE_TAGS_HEADER]=r),a.fetchMetrics=s,aO&&(null==o?void 0:o.revalidate)===0&&!P.isDev&&!aF){let a=m.staticBailoutInfo,b=Object.defineProperty(Error(`Page changed from static to dynamic at runtime ${ai}${(null==a?void 0:a.description)?`, reason: ${a.description}`:""}
2
- see more here https://nextjs.org/docs/messages/app-static-to-dynamic-error`),"__NEXT_ERROR_CODE",{value:"E132",enumerable:!1,configurable:!0});if(null==a?void 0:a.stack){let c=a.stack;b.stack=b.message+c.substring(c.indexOf("\n"))}throw b}return{value:{kind:v.CachedRouteKind.APP_PAGE,html:l,headers:q,rscData:m.flightData,postponed:m.postponed,status:m.statusCode,segmentData:m.segmentData},cacheControl:o}},r=async({hasResolved:c,previousCacheEntry:g,isRevalidating:i,span:j,forceStaticRender:k=!1})=>{let l=!1===P.isDev,m=c||b.writableEnded;try{var n;let f;if(ar&&aj&&!g&&!V)return(null==ak?void 0:ak.render404)?await ak.render404(a,b):(b.statusCode=404,b.end("This page could not be found")),null;if(at&&(f=(0,w.parseFallbackField)(at.fallback)),!0===al.experimental.partialFallbacks&&(null==at?void 0:at.fallback)===null&&!aT&&aS.length>0&&(f=w.FallbackMode.PRERENDER),f===w.FallbackMode.PRERENDER&&(0,u.isBot)(av)&&(!aF||ax)&&(f=w.FallbackMode.BLOCKING_STATIC_RENDER),(null==g?void 0:g.isStale)===-1&&(ar=!0),ar&&(f!==w.FallbackMode.NOT_FOUND||g)&&(f=w.FallbackMode.BLOCKING_STATIC_RENDER),!V&&f!==w.FallbackMode.BLOCKING_STATIC_RENDER&&aV&&!m&&!ah&&_&&(l||!au)){if((l||at)&&f===w.FallbackMode.NOT_FOUND){if(al.adapterPath)return await a0();throw new C.NoFallbackError}if(aF&&(al.cacheComponents?!aL:!az)){let b=l&&"string"==typeof(null==at?void 0:at.fallback)?at.fallback:aq,f=(l||aG)&&(null==at?void 0:at.fallbackRouteParams)?(0,o.createOpaqueFallbackRouteParams)(at.fallbackRouteParams):aI?(0,o.getFallbackRouteParams)(aq,P):null;aG&&f&&(0,h.addRequestMeta)(a,"fallbackParams",f);let g=await P.handleResponse({cacheKey:b,req:a,nextConfig:al,routeKind:e.RouteKind.APP_PAGE,isFallback:!0,prerenderManifest:ag,isRoutePPREnabled:aF,responseGenerator:async()=>q({span:j,postponed:void 0,fallbackRouteParams:f,forceStaticRender:!0}),waitUntil:d.waitUntil,isMinimalMode:V});if(null===g)return null;if(g)return V||!aF||!(aS.length>0)||!0!==al.experimental.partialFallbacks||!aU||!p||ar||aI||aD||aE||ay||(0,J.scheduleOnNextTick)(async()=>{let b=P.getResponseCache(a);try{await b.revalidate(aU,p,aF,!1,a=>q({span:a.span,postponed:void 0,fallbackRouteParams:a_.length>0?(0,o.createOpaqueFallbackRouteParams)(a_):null,forceStaticRender:!0}),null,c,d.waitUntil)}catch(a){console.error("Error revalidating the page in the background",a)}}),delete g.cacheControl,g}}let s=ar||i||!aJ?void 0:aJ;if(aP&&!V&&p&&(aL||aA)&&!k){let b=await p.get(ai,{kind:v.IncrementalCacheKind.APP_PAGE,isRoutePPREnabled:!0,isFallback:!1});b&&b.value&&b.value.kind===v.CachedRouteKind.APP_PAGE&&(s=b.value.postponed,b&&(-1===b.isStale||!0===b.isStale)&&(0,J.scheduleOnNextTick)(async()=>{let b=P.getResponseCache(a);try{await b.revalidate(ai,p,aF,!1,a=>r({...a,forceStaticRender:!0}),null,c,d.waitUntil)}catch(a){console.error("Error revalidating the page in the background",a)}}))}if((aG||aH)&&void 0!==s)return{cacheControl:{revalidate:1,expire:void 0},value:{kind:v.CachedRouteKind.PAGES,html:x.default.EMPTY,pageData:{},headers:void 0,status:void 0}};let t=!P.isDev&&_&&(null==at?void 0:at.fallbackRouteParams)?(0,o.getPlaceholderFallbackRouteParams)($,at.fallbackRouteParams):null,y=t&&t.length>0?t:null==at?void 0:at.fallbackRouteParams,z=null!=t&&t.length>0,A=null;if(al.cacheComponents&&(null==at?void 0:at.fallbackRouteParams)){let b=(0,h.getRequestMeta)(a,"resolvedRouteParamKeys");b&&b.size>0&&(A=at.fallbackRouteParams.filter(a=>!b.has(a.paramName)))}let B=(l&&(0,h.getRequestMeta)(a,"renderFallbackShell")||z||aG&&!au)&&y?(0,o.createOpaqueFallbackRouteParams)(y):A&&A.length>0&&A.length<((null==at||null==(n=at.fallbackRouteParams)?void 0:n.length)??0)?(0,o.createOpaqueFallbackRouteParams)(A):aI?(0,o.getFallbackRouteParams)(aq,P):null;if((l||aG)&&al.cacheComponents&&!au&&(null==at?void 0:at.fallbackRouteParams)){let b=(0,o.createOpaqueFallbackRouteParams)(y??at.fallbackRouteParams);b&&(0,h.addRequestMeta)(a,"fallbackParams",b)}return q({span:j,postponed:s,fallbackRouteParams:B,forceStaticRender:k})}catch(b){throw(null==g?void 0:g.isStale)&&await P.onRequestError(a,b,{routerKind:"App Router",routePath:W,routeType:"render",revalidateReason:(0,f.c)({isStaticGeneration:aO,isOnDemandRevalidate:ar})},!1,ak),b}},s=async c=>{var f,g,i,j,k,l;let m,n=await P.handleResponse({cacheKey:aU,responseGenerator:a=>r({span:c,...a}),routeKind:e.RouteKind.APP_PAGE,isOnDemandRevalidate:ar,isRoutePPREnabled:aF,req:a,nextConfig:al,prerenderManifest:ag,waitUntil:d.waitUntil,isMinimalMode:V});if(ah&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate"),P.isDev&&b.setHeader("Cache-Control","no-cache, must-revalidate"),!n){if(aU)throw Object.defineProperty(Error("invariant: cache entry required but not generated"),"__NEXT_ERROR_CODE",{value:"E62",enumerable:!1,configurable:!0});return null}if((null==(f=n.value)?void 0:f.kind)!==v.CachedRouteKind.APP_PAGE)throw Object.defineProperty(Error(`Invariant app-page handler received invalid cache entry ${null==(i=n.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E707",enumerable:!1,configurable:!0});let o="string"==typeof n.value.postponed;az&&!aA&&ao&&b.setHeader(y.NEXT_NAV_DEPLOYMENT_ID_HEADER,ao),aO&&!aL&&(!o||ay)&&(V||b.setHeader("x-nextjs-cache",ar?"REVALIDATED":n.isMiss?"MISS":n.isStale?"STALE":"HIT"),b.setHeader(t.NEXT_IS_PRERENDER_HEADER,"1"));let{value:p}=n;if(aJ)m={revalidate:0,expire:void 0};else if(aL)m={revalidate:0,expire:void 0};else if(!P.isDev)if(ah)m={revalidate:0,expire:void 0};else if(aO){if(n.cacheControl)if("number"==typeof n.cacheControl.revalidate){if(n.cacheControl.revalidate<1)throw Object.defineProperty(Error(`Invalid revalidate configuration provided: ${n.cacheControl.revalidate} < 1`),"__NEXT_ERROR_CODE",{value:"E22",enumerable:!1,configurable:!0});m={revalidate:n.cacheControl.revalidate,expire:(null==(j=n.cacheControl)?void 0:j.expire)??al.expireTime}}else m={revalidate:y.CACHE_ONE_YEAR_SECONDS,expire:void 0}}else b.getHeader("Cache-Control")||(m={revalidate:0,expire:void 0});if(n.cacheControl=m,"string"==typeof aM&&(null==p?void 0:p.kind)===v.CachedRouteKind.APP_PAGE&&p.segmentData){b.setHeader(t.NEXT_DID_POSTPONE_HEADER,"2");let c=null==(k=p.headers)?void 0:k[y.NEXT_CACHE_TAGS_HEADER];V&&aO&&c&&"string"==typeof c&&b.setHeader(y.NEXT_CACHE_TAGS_HEADER,c);let d=p.segmentData.get(aM);return void 0!==d?(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:x.default.fromStatic(d,t.RSC_CONTENT_TYPE_HEADER),cacheControl:n.cacheControl}):(b.statusCode=204,(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:x.default.EMPTY,cacheControl:n.cacheControl}))}let s=aP?(0,h.getRequestMeta)(a,"onCacheEntryV2")??(0,h.getRequestMeta)(a,"onCacheEntry"):(0,h.getRequestMeta)(a,"onCacheEntry");if(s){let b=(0,h.getRequestMeta)(a,"initURL")??a.url,c=b?(null==(l=(0,F.parseUrl)(b))?void 0:l.pathname)??b:void 0;if(await s(n,{url:c}))return null}if(p.headers){let a={...p.headers};for(let[c,d]of(V&&aO||delete a[y.NEXT_CACHE_TAGS_HEADER],Object.entries(a)))if(void 0!==d)if(Array.isArray(d))for(let a of d)b.appendHeader(c,a);else"number"==typeof d&&(d=d.toString()),b.appendHeader(c,d)}let u=null==(g=p.headers)?void 0:g[y.NEXT_CACHE_TAGS_HEADER];if(V&&aO&&u&&"string"==typeof u&&b.setHeader(y.NEXT_CACHE_TAGS_HEADER,u),!p.status||az&&aF||(b.statusCode=p.status),!V&&p.status&&H.RedirectStatusCode[p.status]&&az&&(b.statusCode=200),o&&!aL&&b.setHeader(t.NEXT_DID_POSTPONE_HEADER,"1"),az&&!ah){if(void 0===p.rscData){if(p.html.contentType!==t.RSC_CONTENT_TYPE_HEADER)if(al.cacheComponents)return b.statusCode=404,(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:x.default.EMPTY,cacheControl:n.cacheControl});else throw Object.defineProperty(new I.InvariantError(`Expected RSC response, got ${p.html.contentType}`),"__NEXT_ERROR_CODE",{value:"E789",enumerable:!1,configurable:!0});return(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:p.html,cacheControl:n.cacheControl})}return(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:x.default.fromStatic(p.rscData,t.RSC_CONTENT_TYPE_HEADER),cacheControl:n.cacheControl})}let w=p.html;if(aE&&aG){let c=!0===P.isDev?crypto.randomUUID():null;return w.pipeThrough(await (0,A.createInstantTestScriptInsertionTransformStream)(c)),(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:w,cacheControl:{revalidate:0,expire:void 0}})}if(!o||V||az)return(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:w,cacheControl:n.cacheControl});if(aG||aH)return w.push(new ReadableStream({start(a){a.enqueue(z.ENCODED_TAGS.CLOSED.BODY_AND_HTML),a.close()}})),(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:w,cacheControl:{revalidate:0,expire:void 0}});let C=new TransformStream;return w.push(C.readable),q({span:c,postponed:p.postponed,fallbackRouteParams:null,forceStaticRender:!1}).then(async a=>{var b,c;if(!a)throw Object.defineProperty(Error("Invariant: expected a result to be returned"),"__NEXT_ERROR_CODE",{value:"E463",enumerable:!1,configurable:!0});if((null==(b=a.value)?void 0:b.kind)!==v.CachedRouteKind.APP_PAGE)throw Object.defineProperty(Error(`Invariant: expected a page response, got ${null==(c=a.value)?void 0:c.kind}`),"__NEXT_ERROR_CODE",{value:"E305",enumerable:!1,configurable:!0});await a.value.html.pipeTo(C.writable)}).catch(a=>{C.writable.abort(a).catch(a=>{console.error("couldn't abort transformer",a)})}),(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:w,cacheControl:{revalidate:0,expire:void 0}})};if(!a$||!aZ)return k=aY.getActiveScopeSpan(),await aY.withPropagatedContext(a.headers,()=>aY.trace(i.BaseServerSpan.handleRequest,{spanName:`${aX} ${W}`,kind:g.SpanKind.SERVER,attributes:{"http.method":aX,"http.target":a.url}},s),void 0,!a$);await s(aZ)}catch(b){throw b instanceof C.NoFallbackError||await P.onRequestError(a,b,{routerKind:"App Router",routePath:W,routeType:"render",revalidateReason:(0,f.c)({isStaticGeneration:aO,isOnDemandRevalidate:ar})},!1,ak),b}}},40610:a=>{"use strict";a.exports=require("node:dns")},41025:a=>{"use strict";a.exports=require("next/dist/server/app-render/dynamic-access-async-storage.external.js")},41692:a=>{"use strict";a.exports=require("node:tls")},41792:a=>{"use strict";a.exports=require("node:querystring")},43954:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/interception-routes")},44139:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>R});var d=c(48249),e=c(67484),f=c(19099),g=c(2116),h=c.n(g),i=c(81220),j=c(50412),k=c(92592),l=c(91431),m=c(59160),n=c(18982);let o=["none","low","medium","high"],p=["none","thinking"],q=["none","low","medium","high","max"],r={openai:["none","minimal","low","medium","high","xhigh"],"claude-adaptive":q,"claude-budget":["none","low","medium","high","xhigh","max"],"gemini-level":["minimal","low","medium","high"],"gemini-budget":o,zai:p,qwen:o,kimi:q,deepseek:["none","high","max"],minimax:p,hunyuan:o,step:o},s=[{pattern:"*codex*",levels:["low","medium","high","xhigh"]}];function t(a,b){let c=(0,m.nl)(a,b);if(!c.reasoning)return null;let d=s.find(a=>(0,n.gH)(a.pattern,b)),e=d?.levels||r[c.thinkingFormat]||o;return!1===c.thinkingCanDisable&&(e=e.filter(a=>"none"!==a)),e}var u=c(50377),v=c(29476),w=c(99258);function x({customModels:a=[],modelAliases:b={},providerAlias:c,builtInModels:d=[],type:e="llm",includeLegacyAliases:f=!0}){let g=new Set(d.map(a=>a.id)),h=new Set,i=[];for(let b of a){if(!b?.id||b.providerAlias!==c)continue;let a=b?.kind||b?.type||"llm";if(e&&a!==e||g.has(b.id))continue;let d=`${c}/${b.id}`;h.has(d)||(h.add(d),i.push({id:b.id,name:b.name||b.id,fullModel:d,source:"custom",type:a}))}if(!f)return i;let j=`${c}/`;for(let[a,c]of Object.entries(b||{})){if("string"!=typeof c||!c.startsWith(j))continue;let b=c.slice(j.length);!b||g.has(b)||h.has(c)||(h.add(c),i.push({id:b,alias:a,fullModel:c,source:"legacyAlias",type:e||"llm"}))}return i}function y(a,b={}){let c=b.kind||b.type;if(c&&"string"==typeof c){let a=c.toLowerCase();return"chat"===a||"text"===a||"language"===a?"llm":a}let d=String(a||"").toLowerCase();return/embed/.test(d)?"embedding":/(^|[-_/])(tts|speech)([-_/]|$)/.test(d)?"tts":/(whisper|transcri|speech-to-text|(^|[-_/])stt([-_/]|$))/.test(d)?"stt":/(imagine-video|video-gen|(^|[-_/])video([-_/]|$))/.test(d)&&!/revision/.test(d)?"video":/(imagine-image|dall-e|stable-diffusion|sdxl|flux|midjourney|image-gen)/.test(d)||/(^|[-_/])image([-_/]|$)/.test(d)&&!/(vision|vl|multimodal)/.test(d)?"image":"llm"}function z(a,b){let c=String(a||"").trim();if(!c)return"";if(c=c.replace(/^models\//,""),b){let a=`${b}/`;c.startsWith(a)&&(c=c.slice(a.length))}return(c=c.replace(/^(openai|anthropic|google|x-ai|xai|meta-llama|mistralai)\//i,"")).trim()}var A=c(49885),B=c.n(A);function C({model:a,fullModel:b,alias:c,copied:e,onCopy:f,testStatus:g,isCustom:h,isFree:i,onDeleteAlias:k,onTest:l,isTesting:m,onDisable:n,caps:o,thinkingSuffix:p,latencyMs:q}){let r=p?`${b}(${p})`:b,s="ok"===g?"#22c55e":"error"===g?"#ef4444":void 0;return(0,d.jsx)("div",{className:`group min-w-0 max-w-full rounded-lg border px-3 py-2 ${"ok"===g?"border-green-500/40":"error"===g?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:(0,d.jsxs)("div",{className:"flex min-w-0 items-start gap-2 sm:items-center",children:[(0,d.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base",style:s?{color:s}:void 0,children:"ok"===g?"check_circle":"error"===g?"cancel":"smart_toy"}),(0,d.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,d.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:r}),(0,d.jsxs)("span",{className:"flex min-w-0 items-center text-[9px] gap-1 pl-1",children:[a.name&&(0,d.jsx)("span",{className:"truncate text-[9px] italic text-text-muted/70",children:a.name}),Number.isFinite(q)&&(0,d.jsxs)("span",{className:"shrink-0 text-[9px] text-text-muted/70 tabular-nums",children:[Math.round(q),"ms"]}),(0,d.jsx)(j.nh,{caps:o,colorOverride:"text-text-muted/70",size:12})]})]}),l&&(0,d.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,d.jsx)("button",{onClick:l,disabled:m,className:`rounded p-0.5 text-text-muted transition-opacity hover:bg-sidebar hover:text-primary ${m?"opacity-100":"opacity-100 sm:opacity-0 sm:group-hover:opacity-100"}`,children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",style:m?{animation:"spin 1s linear infinite"}:void 0,children:m?"progress_activity":"science"})}),(0,d.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:m?"Testing...":"Test"})]}),(0,d.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,d.jsx)("button",{onClick:()=>f(r,`model-${a.id}`),className:"rounded p-0.5 text-text-muted hover:bg-sidebar hover:text-primary",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:e===`model-${a.id}`?"check":"content_copy"})}),(0,d.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:e===`model-${a.id}`?"Copied!":"Copy"})]}),h?(0,d.jsx)("button",{onClick:k,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,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):n?(0,d.jsx)("button",{onClick:n,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,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):null]})})}function D({modelId:a,fullModel:b,copied:c,onCopy:e,onDeleteAlias:f,onTest:g,testStatus:h,isTesting:i}){let j="ok"===h?"#22c55e":"error"===h?"#ef4444":void 0;return(0,d.jsxs)("div",{className:`flex items-center gap-3 p-3 rounded-lg border ${"ok"===h?"border-green-500/40":"error"===h?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",style:j?{color:j}:void 0,children:"ok"===h?"check_circle":"error"===h?"cancel":"smart_toy"}),(0,d.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,d.jsx)("p",{className:"text-sm font-medium truncate",children:a}),(0,d.jsxs)("div",{className:"flex items-center gap-1 mt-1",children:[(0,d.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:b}),(0,d.jsxs)("div",{className:"relative group/btn",children:[(0,d.jsx)("button",{onClick:()=>e(b,`model-${a}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:c===`model-${a}`?"check":"content_copy"})}),(0,d.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===`model-${a}`?"Copied!":"Copy"})]}),g&&(0,d.jsxs)("div",{className:"relative group/btn",children:[(0,d.jsx)("button",{onClick:g,disabled:i,className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary transition-colors",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",style:i?{animation:"spin 1s linear infinite"}:void 0,children:i?"progress_activity":"science"})}),(0,d.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?"Testing...":"Test"})]})]})]}),(0,d.jsx)("button",{onClick:f,className:"p-1 hover:bg-red-50 rounded text-red-500",title:"Remove model",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"delete"})})]})}function E({providerStorageAlias:a,providerDisplayAlias:b,modelAliases:c,customModels:f,copied:g,onCopy:h,onDeleteAlias:i,onAddCustomModel:k,onDeleteCustomModel:l,onRefreshModels:m,connections:n,isAnthropic:o}){let[p,q]=(0,e.useState)(""),[r,s]=(0,e.useState)(!1),[t,u]=(0,e.useState)(!1),[v,w]=(0,e.useState)(""),[y,z]=(0,e.useState)(null),[A,B]=(0,e.useState)({}),C=async b=>{if(!y){z(b);try{let c=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${a}/${b}`})}),d=await c.json();B(a=>({...a,[b]:d.ok?"ok":"error"}))}catch{B(a=>({...a,[b]:"error"}))}finally{z(null)}}},F=x({customModels:f,modelAliases:c,providerAlias:a,type:"llm"}),G=async()=>{if(!p.trim()||r)return;let a=p.trim();if(F.some(b=>b.id===a))return void alert("Model already exists for this provider.");s(!0);try{await k(a),q("")}catch(a){console.log("Error adding model:",a)}finally{s(!1)}},H=async()=>{if(t)return;let b=n.find(a=>!1!==a.isActive);if(b){u(!0),w("");try{let c=await fetch(`/api/providers/${b.id}/models`),d=await c.json().catch(()=>({}));if(!c.ok)return void alert(d.error||"Failed to import models");let e=d.models||[];if(0===e.length)return void alert("No models returned from /models.");let f=new Set(F.map(a=>a.id)),g=[],h=new Set;for(let b of e){let c=String(b.id||b.name||b.model||"").trim();!c||f.has(c)||h.has(c)||(h.add(c),g.push({providerAlias:a,id:c,type:"llm",name:b.display_name||b.displayName||b.name||c}))}if(0===g.length)return void w("All models already in list");let i=await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({models:g})}),j=await i.json().catch(()=>({}));if(!i.ok){let a=0;for(let b of g)await k(b.id),a+=1;w(a?`Imported ${a} model(s)`:"No new models were added");return}w(`Imported ${j.added??g.length} model(s)`),"function"==typeof m&&await m()}catch(a){console.log("Error importing models:",a),alert(a?.message||"Import failed")}finally{u(!1)}}},I=n.some(a=>!1!==a.isActive);return(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("p",{className:"text-sm text-text-muted",children:["Add ",o?"Anthropic":"OpenAI","-compatible models manually or import them from the /models endpoint."]}),(0,d.jsxs)("div",{className:"flex items-end gap-2 flex-wrap",children:[(0,d.jsxs)("div",{className:"flex-1 min-w-[240px]",children:[(0,d.jsx)("label",{htmlFor:"new-compatible-model-input",className:"text-xs text-text-muted mb-1 block",children:"Model ID"}),(0,d.jsx)("input",{id:"new-compatible-model-input",type:"text",value:p,onChange:a=>q(a.target.value),onKeyDown:a=>"Enter"===a.key&&G(),placeholder:o?"claude-3-opus-20240229":"gpt-4o",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})]}),(0,d.jsx)(j.$n,{size:"sm",icon:"add",onClick:G,disabled:!p.trim()||r,children:r?"Adding...":"Add"}),(0,d.jsx)(j.$n,{size:"sm",variant:"secondary",icon:"cloud_download",onClick:H,disabled:!I||t,children:t?"Importing...":"Import models"})]}),!I&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Add a connection to enable importing models."}),v&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:v}),F.length>0&&(0,d.jsx)("div",{className:"flex flex-col gap-3",children:F.map(({id:c,alias:e,source:f})=>(0,d.jsx)(D,{modelId:c,fullModel:`${b}/${c}`,copied:g,onCopy:h,onDeleteAlias:()=>"custom"===f?l(c):i(e),onTest:n.length>0?()=>C(c):void 0,testStatus:A[c],isTesting:y===c},`${f}-${a}/${c}`))})]})}C.propTypes={model:B().shape({id:B().string.isRequired}).isRequired,fullModel:B().string.isRequired,alias:B().string,copied:B().string,onCopy:B().func.isRequired,testStatus:B().oneOf(["ok","error"]),isCustom:B().bool,isFree:B().bool,onDeleteAlias:B().func,onTest:B().func,isTesting:B().bool,onDisable:B().func,caps:B().object,thinkingSuffix:B().string,latencyMs:B().number},B().string.isRequired,B().string.isRequired,B().string,B().func.isRequired,B().func.isRequired,B().func,B().oneOf(["ok","error"]),B().bool,B().string.isRequired,B().object.isRequired,B().arrayOf(B().object),B().string,B().func.isRequired,B().func.isRequired,B().func.isRequired,B().func.isRequired,E.propTypes={providerStorageAlias:B().string.isRequired,providerDisplayAlias:B().string.isRequired,modelAliases:B().object.isRequired,customModels:B().arrayOf(B().object),copied:B().string,onCopy:B().func.isRequired,onDeleteAlias:B().func.isRequired,onAddCustomModel:B().func.isRequired,onDeleteCustomModel:B().func.isRequired,onRefreshModels:B().func,connections:B().arrayOf(B().shape({id:B().string,isActive:B().bool})).isRequired,isAnthropic:B().bool};var F=c(74875);function G({until:a}){let[b,c]=(0,e.useState)("");return b?(0,d.jsxs)("span",{className:"text-xs text-orange-500 font-mono",children:["⏱ ",b]}):null}function H({connection:a,isOAuth:b,isFirst:c,isLast:f,onMoveUp:g,onMoveDown:h,onToggleActive:i,onEdit:k,onDelete:l,oneByOneStatus:m=null,autoPing:n=null}){let o=a.providerSpecificData?.connectionProxyEnabled===!0&&!!a.providerSpecificData?.connectionProxyUrl,p=o?`Proxy: ${a.providerSpecificData?.connectionProxyUrl}`:"",q=n?.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.",r="";if(a.providerSpecificData?.connectionProxyUrl){let b=a.providerSpecificData?.connectionProxyUrl;try{let a=new URL(b);r=`${a.protocol}//${a.hostname}${a.port?`:${a.port}`:""}`}catch{r=b}}let s=a.providerSpecificData?.connectionNoProxy||"",t=o?"success":"default",u=a.authType||(b?"oauth":"apikey"),v="oauth"===u,w="cookie"===u,x=a.name?.trim()||a.email?.trim()||a.displayName?.trim()||(v?"OAuth Account":w?"Cookie Account":"API Key"),y=a.name?.trim()&&a.email?.trim()&&a.name.trim()!==a.email.trim()?a.email.trim():a.name?.trim()&&a.displayName?.trim()&&a.name.trim()!==a.displayName.trim()?a.displayName.trim():null,[z,A]=(0,e.useState)(!1),B=Object.entries(a).filter(([a])=>a.startsWith("modelLock_")).map(([,a])=>a).filter(a=>!!a).sort()[0]||null,C="unavailable"!==a.testStatus||z?a.testStatus:"active",D=()=>m?"queued"===m.state?"queued":"testing"===m.state?"testing":"success"===m.state?"success":"failed"===m.state?m.error?`failed: ${m.error}`:"failed":null:null;return(0,d.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===a.isActive?"opacity-60":""}`,children:[(0,d.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-2 sm:items-center sm:gap-3",children:[(0,d.jsxs)("div",{className:"flex shrink-0 flex-col",children:[(0,d.jsx)("button",{onClick:g,disabled:c,className:`p-0.5 rounded ${c?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_up"})}),(0,d.jsx)("button",{onClick:h,disabled:f,className:`p-0.5 rounded ${f?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_down"})})]}),(0,d.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base text-text-muted",children:w?"cookie":v?"lock":"key"}),(0,d.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,d.jsx)("p",{className:"text-sm font-medium truncate",children:x}),y&&(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:y}),(0,d.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1.5 sm:gap-2",children:[(0,d.jsx)(j.Ex,{variant:(0,F.g)(a.isActive,C),size:"sm",dot:!0,children:!1===a.isActive?"disabled":C||"Unknown"}),(0,d.jsx)(j.Ex,{variant:"default",size:"sm",children:v?"OAuth":w?"Cookie":"API Key"}),o&&(0,d.jsx)(j.Ex,{variant:t,size:"sm",children:"Proxy"}),z&&!1!==a.isActive&&(0,d.jsx)(G,{until:B}),a.lastError&&!1!==a.isActive&&(0,d.jsx)("span",{className:"max-w-full truncate text-xs text-red-500 sm:max-w-[300px]",title:a.lastError,children:a.lastError}),(0,d.jsxs)("span",{className:"text-xs text-text-muted",children:["#",a.priority]}),a.globalPriority&&(0,d.jsxs)("span",{className:"text-xs text-text-muted",children:["Auto: ",a.globalPriority]}),D()&&(0,d.jsx)(j.Ex,{variant:m?"success"===m.state?"success":"failed"===m.state?"error":"testing"===m.state?"primary":"default":"default",size:"sm",children:D()})]}),o&&(0,d.jsxs)("div",{className:"mt-1 flex items-center gap-2 flex-wrap",children:[(0,d.jsx)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[420px]",title:p,children:p}),r&&(0,d.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:r}),s&&(0,d.jsxs)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[320px]",title:s,children:["no_proxy: ",s]})]})]})]}),(0,d.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 sm:w-auto sm:justify-end",children:[(0,d.jsxs)("div",{className:"grid flex-1 grid-cols-3 gap-1 sm:flex sm:flex-none",children:[n&&(0,d.jsx)(j.m_,{text:q,children:(0,d.jsxs)("button",{onClick:()=>n.onToggle(!n.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 ${n.on?"text-primary":"text-text-muted hover:text-primary"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"bolt"}),(0,d.jsx)("span",{className:"text-[10px] leading-tight",children:"Auto-ping"})]})}),(0,d.jsxs)("button",{onClick:k,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,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,d.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,d.jsxs)("button",{onClick:l,className:"flex flex-col items-center rounded px-2 py-1 text-red-500 hover:bg-red-500/10",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,d.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]}),(0,d.jsx)(j.lM,{size:"sm",checked:a.isActive??!0,onChange:i,title:a.isActive??!0?"Disable connection":"Enable connection"})]})]})}G.propTypes={until:B().string.isRequired},H.propTypes={connection:B().shape({id:B().string,name:B().string,email:B().string,displayName:B().string,modelLockUntil:B().string,testStatus:B().string,isActive:B().bool,lastError:B().string,priority:B().number,globalPriority:B().number}).isRequired,isOAuth:B().bool.isRequired,isFirst:B().bool.isRequired,isLast:B().bool.isRequired,onMoveUp:B().func.isRequired,onMoveDown:B().func.isRequired,onToggleActive:B().func.isRequired,onEdit:B().func.isRequired,onDelete:B().func.isRequired,oneByOneStatus:B().shape({state:B().string,error:B().string}),autoPing:B().shape({on:B().bool,onToggle:B().func,provider:B().string})};let I=`name1|sk-key1
1
+ (()=>{var a={};a.id=2134,a.ids=[2134],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},17891:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/get-segment-param")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},21820:a=>{"use strict";a.exports=require("os")},24889:(a,b,c)=>{Promise.resolve().then(c.bind(c,26790))},26713:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/is-bot")},26790:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>S});var d=c(48249),e=c(67484),f=c(19099),g=c(2116),h=c.n(g),i=c(81220),j=c(50412),k=c(92592),l=c(91431),m=c(90774),n=c(80212);let o=["none","low","medium","high"],p=["none","thinking"],q=["none","low","medium","high","max"],r={openai:["none","minimal","low","medium","high","xhigh"],"claude-adaptive":q,"claude-budget":["none","low","medium","high","xhigh","max"],"gemini-level":["minimal","low","medium","high"],"gemini-budget":o,zai:p,qwen:o,kimi:q,deepseek:["none","high","max"],minimax:p,hunyuan:o,step:o},s=[{pattern:"*codex*",levels:["low","medium","high","xhigh"]}];function t(a,b){let c=(0,m.nl)(a,b);if(!c.reasoning)return null;let d=s.find(a=>(0,n.gH)(a.pattern,b)),e=d?.levels||r[c.thinkingFormat]||o;return!1===c.thinkingCanDisable&&(e=e.filter(a=>"none"!==a)),e}var u=c(50377),v=c(29476),w=c(99258);function x({customModels:a=[],modelAliases:b={},providerAlias:c,builtInModels:d=[],type:e="llm",includeLegacyAliases:f=!0}){let g=new Set(d.map(a=>a.id)),h=new Set,i=[];for(let b of a){if(!b?.id||b.providerAlias!==c)continue;let a=b?.kind||b?.type||"llm";if(e&&a!==e||g.has(b.id))continue;let d=`${c}/${b.id}`;h.has(d)||(h.add(d),i.push({id:b.id,name:b.name||b.id,fullModel:d,source:"custom",type:a}))}if(!f)return i;let j=`${c}/`;for(let[a,c]of Object.entries(b||{})){if("string"!=typeof c||!c.startsWith(j))continue;let b=c.slice(j.length);!b||g.has(b)||h.has(c)||(h.add(c),i.push({id:b,alias:a,fullModel:c,source:"legacyAlias",type:e||"llm"}))}return i}function y(a,b={}){let c=b.kind||b.type;if(c&&"string"==typeof c){let a=c.toLowerCase();return"chat"===a||"text"===a||"language"===a?"llm":a}let d=String(a||"").toLowerCase();return/embed/.test(d)?"embedding":/(^|[-_/])(tts|speech)([-_/]|$)/.test(d)?"tts":/(whisper|transcri|speech-to-text|(^|[-_/])stt([-_/]|$))/.test(d)?"stt":/(imagine-video|video-gen|(^|[-_/])video([-_/]|$))/.test(d)&&!/revision/.test(d)?"video":/(imagine-image|dall-e|stable-diffusion|sdxl|flux|midjourney|image-gen)/.test(d)||/(^|[-_/])image([-_/]|$)/.test(d)&&!/(vision|vl|multimodal)/.test(d)?"image":"llm"}function z(a,b){let c=String(a||"").trim();if(!c)return"";if(c=c.replace(/^models\//,""),b){let a=`${b}/`;c.startsWith(a)&&(c=c.slice(a.length))}return(c=c.replace(/^(openai|anthropic|google|x-ai|xai|meta-llama|mistralai)\//i,"")).trim()}var A=c(49885),B=c.n(A);function C({model:a,fullModel:b,alias:c,copied:e,onCopy:f,testStatus:g,isCustom:h,isFree:i,onDeleteAlias:k,onTest:l,isTesting:m,onDisable:n,caps:o,thinkingSuffix:p,latencyMs:q}){let r=p?`${b}(${p})`:b,s="ok"===g?"#22c55e":"error"===g?"#ef4444":void 0;return(0,d.jsx)("div",{className:`group min-w-0 max-w-full rounded-lg border px-3 py-2 ${"ok"===g?"border-green-500/40":"error"===g?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:(0,d.jsxs)("div",{className:"flex min-w-0 items-start gap-2 sm:items-center",children:[(0,d.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base",style:s?{color:s}:void 0,children:"ok"===g?"check_circle":"error"===g?"cancel":"smart_toy"}),(0,d.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,d.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:r}),(0,d.jsxs)("span",{className:"flex min-w-0 items-center text-[9px] gap-1 pl-1",children:[a.name&&(0,d.jsx)("span",{className:"truncate text-[9px] italic text-text-muted/70",children:a.name}),Number.isFinite(q)&&(0,d.jsxs)("span",{className:"shrink-0 text-[9px] text-text-muted/70 tabular-nums",children:[Math.round(q),"ms"]}),(0,d.jsx)(j.nh,{caps:o,colorOverride:"text-text-muted/70",size:12})]})]}),l&&(0,d.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,d.jsx)("button",{onClick:l,disabled:m,className:`rounded p-0.5 text-text-muted transition-opacity hover:bg-sidebar hover:text-primary ${m?"opacity-100":"opacity-100 sm:opacity-0 sm:group-hover:opacity-100"}`,children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",style:m?{animation:"spin 1s linear infinite"}:void 0,children:m?"progress_activity":"science"})}),(0,d.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:m?"Testing...":"Test"})]}),(0,d.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,d.jsx)("button",{onClick:()=>f(r,`model-${a.id}`),className:"rounded p-0.5 text-text-muted hover:bg-sidebar hover:text-primary",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:e===`model-${a.id}`?"check":"content_copy"})}),(0,d.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:e===`model-${a.id}`?"Copied!":"Copy"})]}),h?(0,d.jsx)("button",{onClick:k,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,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):n?(0,d.jsx)("button",{onClick:n,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,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):null]})})}C.propTypes={model:B().shape({id:B().string.isRequired}).isRequired,fullModel:B().string.isRequired,alias:B().string,copied:B().string,onCopy:B().func.isRequired,testStatus:B().oneOf(["ok","error"]),isCustom:B().bool,isFree:B().bool,onDeleteAlias:B().func,onTest:B().func,isTesting:B().bool,onDisable:B().func,caps:B().object,thinkingSuffix:B().string,latencyMs:B().number};var D=c(6297);function E({modelId:a,fullModel:b,copied:c,onCopy:e,onDeleteAlias:f,onTest:g,testStatus:h,isTesting:i}){let j="ok"===h?"#22c55e":"error"===h?"#ef4444":void 0;return(0,d.jsxs)("div",{className:`flex items-center gap-3 p-3 rounded-lg border ${"ok"===h?"border-green-500/40":"error"===h?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",style:j?{color:j}:void 0,children:"ok"===h?"check_circle":"error"===h?"cancel":"smart_toy"}),(0,d.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,d.jsx)("p",{className:"text-sm font-medium truncate",children:a}),(0,d.jsxs)("div",{className:"flex items-center gap-1 mt-1",children:[(0,d.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:b}),(0,d.jsxs)("div",{className:"relative group/btn",children:[(0,d.jsx)("button",{onClick:()=>e(b,`model-${a}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:c===`model-${a}`?"check":"content_copy"})}),(0,d.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===`model-${a}`?"Copied!":"Copy"})]}),g&&(0,d.jsxs)("div",{className:"relative group/btn",children:[(0,d.jsx)("button",{onClick:g,disabled:i,className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary transition-colors",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",style:i?{animation:"spin 1s linear infinite"}:void 0,children:i?"progress_activity":"science"})}),(0,d.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?"Testing...":"Test"})]})]})]}),(0,d.jsx)("button",{onClick:f,className:"p-1 hover:bg-red-50 rounded text-red-500",title:"Remove model",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"delete"})})]})}function F({providerStorageAlias:a,providerDisplayAlias:b,modelAliases:c,customModels:f,copied:g,onCopy:h,onDeleteAlias:i,onAddCustomModel:k,onDeleteCustomModel:l,onRefreshModels:m,connections:n,isAnthropic:o}){let[p,q]=(0,e.useState)(""),[r,s]=(0,e.useState)(!1),[t,u]=(0,e.useState)(!1),[v,w]=(0,e.useState)(""),[y,z]=(0,e.useState)(null),[A,B]=(0,e.useState)({}),C=async b=>{if(!y){z(b);try{let c=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${a}/${b}`})}),d=await c.json();B(a=>({...a,[b]:d.ok?"ok":"error"}))}catch{B(a=>({...a,[b]:"error"}))}finally{z(null)}}},G=x({customModels:f,modelAliases:c,providerAlias:a,type:"llm"}),H=async()=>{if(!p.trim()||r)return;let a=p.trim();if(G.some(b=>b.id===a))return void(0,D.s)("Model already exists for this provider.");s(!0);try{await k(a),q("")}catch(a){(0,D.s)("Error adding model:",a)}finally{s(!1)}},I=async()=>{if(t)return;let b=n.find(a=>!1!==a.isActive);if(b){u(!0),w("");try{let c=await fetch(`/api/providers/${b.id}/models`),d=await c.json().catch(()=>({}));if(!c.ok)return void(0,D.s)(d.error||"Failed to import models");let e=d.models||[];if(0===e.length)return void(0,D.s)("No models returned from /models.");let f=new Set(G.map(a=>a.id)),g=[],h=new Set;for(let b of e){let c=String(b.id||b.name||b.model||"").trim();!c||f.has(c)||h.has(c)||(h.add(c),g.push({providerAlias:a,id:c,type:"llm",name:b.display_name||b.displayName||b.name||c}))}if(0===g.length)return void w("All models already in list");let i=await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({models:g})}),j=await i.json().catch(()=>({}));if(!i.ok){let a=0;for(let b of g)await k(b.id),a+=1;w(a?`Imported ${a} model(s)`:"No new models were added");return}w(`Imported ${j.added??g.length} model(s)`),"function"==typeof m&&await m()}catch(a){(0,D.s)("Error importing models:",a),(0,D.s)(a?.message||"Import failed")}finally{u(!1)}}},J=n.some(a=>!1!==a.isActive);return(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("p",{className:"text-sm text-text-muted",children:["Add ",o?"Anthropic":"OpenAI","-compatible models manually or import them from the /models endpoint."]}),(0,d.jsxs)("div",{className:"flex items-end gap-2 flex-wrap",children:[(0,d.jsxs)("div",{className:"flex-1 min-w-[240px]",children:[(0,d.jsx)("label",{htmlFor:"new-compatible-model-input",className:"text-xs text-text-muted mb-1 block",children:"Model ID"}),(0,d.jsx)("input",{id:"new-compatible-model-input",type:"text",value:p,onChange:a=>q(a.target.value),onKeyDown:a=>"Enter"===a.key&&H(),placeholder:o?"claude-3-opus-20240229":"gpt-4o",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})]}),(0,d.jsx)(j.$n,{size:"sm",icon:"add",onClick:H,disabled:!p.trim()||r,children:r?"Adding...":"Add"}),(0,d.jsx)(j.$n,{size:"sm",variant:"secondary",icon:"cloud_download",onClick:I,disabled:!J||t,children:t?"Importing...":"Import models"})]}),!J&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Add a connection to enable importing models."}),v&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:v}),G.length>0&&(0,d.jsx)("div",{className:"flex flex-col gap-3",children:G.map(({id:c,alias:e,source:f})=>(0,d.jsx)(E,{modelId:c,fullModel:`${b}/${c}`,copied:g,onCopy:h,onDeleteAlias:()=>"custom"===f?l(c):i(e),onTest:n.length>0?()=>C(c):void 0,testStatus:A[c],isTesting:y===c},`${f}-${a}/${c}`))})]})}B().string.isRequired,B().string.isRequired,B().string,B().func.isRequired,B().func.isRequired,B().func,B().oneOf(["ok","error"]),B().bool,B().string.isRequired,B().object.isRequired,B().arrayOf(B().object),B().string,B().func.isRequired,B().func.isRequired,B().func.isRequired,B().func.isRequired,F.propTypes={providerStorageAlias:B().string.isRequired,providerDisplayAlias:B().string.isRequired,modelAliases:B().object.isRequired,customModels:B().arrayOf(B().object),copied:B().string,onCopy:B().func.isRequired,onDeleteAlias:B().func.isRequired,onAddCustomModel:B().func.isRequired,onDeleteCustomModel:B().func.isRequired,onRefreshModels:B().func,connections:B().arrayOf(B().shape({id:B().string,isActive:B().bool})).isRequired,isAnthropic:B().bool};var G=c(74875);function H({until:a}){let[b,c]=(0,e.useState)("");return b?(0,d.jsxs)("span",{className:"text-xs text-orange-500 font-mono",children:["⏱ ",b]}):null}function I({connection:a,isOAuth:b,isFirst:c,isLast:f,onMoveUp:g,onMoveDown:h,onToggleActive:i,onEdit:k,onDelete:l,oneByOneStatus:m=null,autoPing:n=null}){let o=a.providerSpecificData?.connectionProxyEnabled===!0&&!!a.providerSpecificData?.connectionProxyUrl,p=o?`Proxy: ${a.providerSpecificData?.connectionProxyUrl}`:"",q=n?.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.",r="";if(a.providerSpecificData?.connectionProxyUrl){let b=a.providerSpecificData?.connectionProxyUrl;try{let a=new URL(b);r=`${a.protocol}//${a.hostname}${a.port?`:${a.port}`:""}`}catch{r=b}}let s=a.providerSpecificData?.connectionNoProxy||"",t=o?"success":"default",u=a.authType||(b?"oauth":"apikey"),v="oauth"===u,w="cookie"===u,x=a.name?.trim()||a.email?.trim()||a.displayName?.trim()||(v?"OAuth Account":w?"Cookie Account":"API Key"),y=a.name?.trim()&&a.email?.trim()&&a.name.trim()!==a.email.trim()?a.email.trim():a.name?.trim()&&a.displayName?.trim()&&a.name.trim()!==a.displayName.trim()?a.displayName.trim():null,[z,A]=(0,e.useState)(!1),B=Object.entries(a).filter(([a])=>a.startsWith("modelLock_")).map(([,a])=>a).filter(a=>!!a).sort()[0]||null,C="unavailable"!==a.testStatus||z?a.testStatus:"active",D=()=>m?"queued"===m.state?"queued":"testing"===m.state?"testing":"success"===m.state?"success":"failed"===m.state?m.error?`failed: ${m.error}`:"failed":null:null;return(0,d.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===a.isActive?"opacity-60":""}`,children:[(0,d.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-2 sm:items-center sm:gap-3",children:[(0,d.jsxs)("div",{className:"flex shrink-0 flex-col",children:[(0,d.jsx)("button",{onClick:g,disabled:c,className:`p-0.5 rounded ${c?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_up"})}),(0,d.jsx)("button",{onClick:h,disabled:f,className:`p-0.5 rounded ${f?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_down"})})]}),(0,d.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base text-text-muted",children:w?"cookie":v?"lock":"key"}),(0,d.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,d.jsx)("p",{className:"text-sm font-medium truncate",children:x}),y&&(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:y}),(0,d.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1.5 sm:gap-2",children:[(0,d.jsx)(j.Ex,{variant:(0,G.g)(a.isActive,C),size:"sm",dot:!0,children:!1===a.isActive?"disabled":C||"Unknown"}),(0,d.jsx)(j.Ex,{variant:"default",size:"sm",children:v?"OAuth":w?"Cookie":"API Key"}),o&&(0,d.jsx)(j.Ex,{variant:t,size:"sm",children:"Proxy"}),z&&!1!==a.isActive&&(0,d.jsx)(H,{until:B}),a.lastError&&!1!==a.isActive&&(0,d.jsx)("span",{className:"max-w-full truncate text-xs text-red-500 sm:max-w-[300px]",title:a.lastError,children:a.lastError}),(0,d.jsxs)("span",{className:"text-xs text-text-muted",children:["#",a.priority]}),a.globalPriority&&(0,d.jsxs)("span",{className:"text-xs text-text-muted",children:["Auto: ",a.globalPriority]}),D()&&(0,d.jsx)(j.Ex,{variant:m?"success"===m.state?"success":"failed"===m.state?"error":"testing"===m.state?"primary":"default":"default",size:"sm",children:D()})]}),o&&(0,d.jsxs)("div",{className:"mt-1 flex items-center gap-2 flex-wrap",children:[(0,d.jsx)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[420px]",title:p,children:p}),r&&(0,d.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:r}),s&&(0,d.jsxs)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[320px]",title:s,children:["no_proxy: ",s]})]})]})]}),(0,d.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 sm:w-auto sm:justify-end",children:[(0,d.jsxs)("div",{className:"grid flex-1 grid-cols-3 gap-1 sm:flex sm:flex-none",children:[n&&(0,d.jsx)(j.m_,{text:q,children:(0,d.jsxs)("button",{onClick:()=>n.onToggle(!n.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 ${n.on?"text-primary":"text-text-muted hover:text-primary"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"bolt"}),(0,d.jsx)("span",{className:"text-[10px] leading-tight",children:"Auto-ping"})]})}),(0,d.jsxs)("button",{onClick:k,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,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,d.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,d.jsxs)("button",{onClick:l,className:"flex flex-col items-center rounded px-2 py-1 text-red-500 hover:bg-red-500/10",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,d.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]}),(0,d.jsx)(j.lM,{size:"sm",checked:a.isActive??!0,onChange:i,title:a.isActive??!0?"Disable connection":"Enable connection"})]})]})}H.propTypes={until:B().string.isRequired},I.propTypes={connection:B().shape({id:B().string,name:B().string,email:B().string,displayName:B().string,modelLockUntil:B().string,testStatus:B().string,isActive:B().bool,lastError:B().string,priority:B().number,globalPriority:B().number}).isRequired,isOAuth:B().bool.isRequired,isFirst:B().bool.isRequired,isLast:B().bool.isRequired,onMoveUp:B().func.isRequired,onMoveDown:B().func.isRequired,onToggleActive:B().func.isRequired,onEdit:B().func.isRequired,onDelete:B().func.isRequired,oneByOneStatus:B().shape({state:B().string,error:B().string}),autoPing:B().shape({on:B().bool,onToggle:B().func,provider:B().string})};let J=`name1|sk-key1
3
2
  name2|sk-key2
4
- sk-key-only-auto-named`;function J({isOpen:a,provider:b,providerName:c,isCompatible:f,isAnthropic:g,authType:h,authHint:i,website:l,proxyPools:m,error:n,onSave:o,onBulkDone:p,onClose:q}){let r="__none__",s="ollama-local"===b,t="cookie"===h,u="xai"===b&&!t,v=t?"Cookie Value":"API Key",w="azure"===b,x="cloudflare-ai"===b,y=k.Q2?.[b]?.regions||null,z=k.Q2?.[b]?.defaultRegion||y?.[0]?.id||"",[A,B]=(0,e.useState)({name:"",apiKey:"",defaultModel:"",priority:1,proxyPoolId:r,ollamaHostUrl:""}),[C,D]=(0,e.useState)({azureEndpoint:"",apiVersion:"2024-10-01-preview",deployment:"",organization:""}),[E,F]=(0,e.useState)({accountId:""}),[G,H]=(0,e.useState)(z),[K,L]=(0,e.useState)(!1),[M,N]=(0,e.useState)(null),[O,P]=(0,e.useState)(!1),[Q,R]=(0,e.useState)("single"),[S,T]=(0,e.useState)(""),[U,V]=(0,e.useState)(null),W=()=>s&&A.ollamaHostUrl.trim()?{baseUrl:A.ollamaHostUrl.trim()}:w?{azureEndpoint:C.azureEndpoint,apiVersion:C.apiVersion,deployment:C.deployment,organization:C.organization}:x?{accountId:E.accountId}:y&&G?{region:G}:void 0,X=async()=>{L(!0);try{let a=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:b,apiKey:A.apiKey,providerSpecificData:W()})}),c=await a.json();N(c.valid?"success":"failed")}catch{N("failed")}finally{L(!1)}},Y=async()=>{if(b&&(s||A.apiKey)&&(s||A.name)&&(!f||A.defaultModel.trim())){P(!0);try{let a=!1;try{L(!0),N(null);let c=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:b,apiKey:A.apiKey,providerSpecificData:W()})});a=!!(await c.json()).valid,N(a?"success":"failed")}catch{N("failed")}finally{L(!1)}await o({name:A.name||(s?"Ollama Local":""),apiKey:A.apiKey,defaultModel:f?A.defaultModel.trim():void 0,priority:A.priority,proxyPoolId:A.proxyPoolId===r?null:A.proxyPoolId,testStatus:a?"active":"unknown",providerSpecificData:W()})}finally{P(!1)}}},Z=async()=>{let a=S.split("\n").map(a=>a.trim()).filter(Boolean);if(!a.length)return;P(!0),V(null);let c=0,d=0;for(let e=0;e<a.length;e++){let f=a[e].split("|"),g=f.length>=2?f.slice(1).join("|").trim():f[0].trim(),h=f.length>=2?f[0].trim():"Key",i=`${h} ${e+1}`;try{(await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:b,apiKey:g,name:i,priority:1,testStatus:"unknown"})})).ok?c++:d++}catch{d++}}P(!1),V({success:c,failed:d}),c>0&&p&&p()};return b?(0,d.jsx)(j.aF,{isOpen:a,title:`Add ${c||b} ${v}`,onClose:q,children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.$n,{size:"sm",variant:"single"===Q?"primary":"ghost",onClick:()=>{R("single"),V(null)},children:"Single"}),(0,d.jsx)(j.$n,{size:"sm",variant:"bulk"===Q?"primary":"ghost",onClick:()=>{R("bulk"),V(null)},children:"Bulk Add"})]}),"bulk"===Q&&(0,d.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:["One key per line. Format: ",(0,d.jsx)("code",{children:"name|apiKey"})," or just ",(0,d.jsx)("code",{children:"apiKey"})," (auto-named by index)."]}),(0,d.jsx)("textarea",{className:"w-full rounded border border-accent/30 bg-sidebar p-2 text-sm font-mono resize-y min-h-[140px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:I,value:S,onChange:a=>T(a.target.value)}),U&&(0,d.jsxs)("div",{className:`text-sm font-medium ${U.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",U.success," added",U.failed>0?`, ✗ ${U.failed} failed`:""]}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.$n,{onClick:Z,fullWidth:!0,disabled:O||!S.trim(),children:O?"Adding...":"Add All Keys"}),(0,d.jsx)(j.$n,{onClick:q,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"single"===Q&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(j.pd,{label:"Name",value:A.name,onChange:a=>B({...A,name:a.target.value}),placeholder:s?"Ollama Local":"Production Key"}),s&&(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.pd,{label:"Ollama Host URL",value:A.ollamaHostUrl,onChange:a=>B({...A,ollamaHostUrl:a.target.value}),placeholder:"http://localhost:11434",className:"flex-1"}),(0,d.jsx)("div",{className:"pt-6",children:(0,d.jsx)(j.$n,{onClick:X,disabled:K||O,variant:"secondary",children:K?"Checking...":"Check"})})]}),!s&&(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.pd,{label:v,type:t?"text":"password",value:A.apiKey,onChange:a=>B({...A,apiKey:a.target.value}),placeholder:t?"grok-web"===b?"sso=xxxxx... or just the raw value":"eyJhbGciOi...":u?"xai-...":"",className:"flex-1"}),(0,d.jsx)("div",{className:"pt-6",children:(0,d.jsx)(j.$n,{onClick:X,disabled:!A.apiKey||K||O,variant:"secondary",children:K?"Checking...":"Check"})})]}),u&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Use a direct xAI API key from console.x.ai. This is separate from Grok Build OAuth."}),t&&i&&(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:[i,l&&(0,d.jsxs)(d.Fragment,{children:[" ",(0,d.jsxs)("a",{href:l,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:["Open ",l.replace(/^https?:\/\//,"")]})]})]}),y&&(0,d.jsx)(j.l6,{label:"Region",value:G,onChange:a=>H(a.target.value),options:y.map(a=>({value:a.id,label:a.label}))}),f&&(0,d.jsx)(j.pd,{label:"Default Model",value:A.defaultModel,onChange:a=>B({...A,defaultModel:a.target.value}),placeholder:g?"claude-3-5-sonnet-latest":"gpt-4o-mini"}),s&&(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:["Leave blank to use ",(0,d.jsx)("code",{children:"http://localhost:11434"}),". For remote Ollama, enter the full host URL (e.g. ",(0,d.jsx)("code",{children:"http://192.168.1.10:11434"}),")."]}),M&&(0,d.jsx)(j.Ex,{variant:"success"===M?"success":"error",children:"success"===M?"Valid":"Invalid"}),n&&(0,d.jsx)("p",{className:"text-xs text-red-500 break-words",children:n}),f&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Enter the model ID exactly as your compatible endpoint expects it. This model will be saved as the connection default."}),x&&(0,d.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,d.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Cloudflare Workers AI"}),(0,d.jsx)(j.pd,{label:"Account ID",value:E.accountId,onChange:a=>F({...E,accountId:a.target.value}),placeholder:"abc123def456..."}),(0,d.jsxs)("p",{className:"text-xs text-text-muted mt-2",children:["Find your Account ID in the right sidebar of ",(0,d.jsx)("a",{href:"https://dash.cloudflare.com",target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:"dash.cloudflare.com"})]})]}),w&&(0,d.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,d.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Azure OpenAI Configuration"}),(0,d.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,d.jsx)(j.pd,{label:"Azure Endpoint",value:C.azureEndpoint,onChange:a=>D({...C,azureEndpoint:a.target.value}),placeholder:"https://your-resource.openai.azure.com"}),(0,d.jsx)(j.pd,{label:"Deployment Name",value:C.deployment,onChange:a=>D({...C,deployment:a.target.value}),placeholder:"gpt-4"}),(0,d.jsx)(j.pd,{label:"API Version",value:C.apiVersion,onChange:a=>D({...C,apiVersion:a.target.value}),placeholder:"2024-10-01-preview"}),(0,d.jsx)(j.pd,{label:"Organization",value:C.organization,onChange:a=>D({...C,organization:a.target.value}),placeholder:"Organization ID"})]})]}),(0,d.jsx)(j.pd,{label:"Priority",type:"number",value:A.priority,onChange:a=>B({...A,priority:Number.parseInt(a.target.value)||1})}),(0,d.jsx)(j.l6,{label:"Proxy Pool",value:A.proxyPoolId,onChange:a=>B({...A,proxyPoolId:a.target.value}),options:[{value:r,label:"None"},...(m||[]).map(a=>({value:a.id,label:a.name}))],placeholder:"None"}),0===(m||[]).length&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"No active proxy pools available. Create one in Proxy Pools page first."}),(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Legacy manual proxy fields are still accepted by API for backward compatibility."}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.$n,{onClick:Y,fullWidth:!0,disabled:O||!s&&(!A.name||!A.apiKey)||f&&!A.defaultModel.trim()||w&&(!C.azureEndpoint||!C.deployment||!C.organization)||x&&!E.accountId,children:O?"Saving...":"Save"}),(0,d.jsx)(j.$n,{onClick:q,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})}):null}function K({isOpen:a,node:b,onSave:c,onClose:f,isAnthropic:g}){let[h,i]=(0,e.useState)({name:"",apiType:"chat",baseUrl:"https://api.openai.com/v1"}),[k,l]=(0,e.useState)(!1),[m,n]=(0,e.useState)(""),[o,p]=(0,e.useState)(""),[q,r]=(0,e.useState)(!1),[s,t]=(0,e.useState)(null),u=async()=>{if(h.name.trim()&&h.baseUrl.trim()){l(!0);try{let a={name:h.name.trim(),baseUrl:h.baseUrl.trim()};g||(a.apiType=h.apiType),await c(a)}finally{l(!1)}}},v=async()=>{r(!0);try{let a=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:h.baseUrl,apiKey:m,type:g?"anthropic-compatible":"openai-compatible",modelId:o.trim()||void 0})}),b=await a.json();t(b.valid?"success":"failed")}catch{t("failed")}finally{r(!1)}};return b?(0,d.jsx)(j.aF,{isOpen:a,title:`Edit ${g?"Anthropic":"OpenAI"} Compatible`,onClose:f,children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsx)(j.pd,{label:"Name",value:h.name,onChange:a=>i({...h,name:a.target.value}),placeholder:`${g?"Anthropic":"OpenAI"} Compatible`,hint:"Friendly label for this provider."}),!g&&(0,d.jsx)(j.l6,{label:"API Type",options:[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}],value:h.apiType,onChange:a=>i({...h,apiType:a.target.value})}),(0,d.jsx)(j.pd,{label:"Base URL",value:h.baseUrl,onChange:a=>i({...h,baseUrl:a.target.value}),placeholder:g?"https://api.anthropic.com/v1":"https://api.openai.com/v1",hint:`Base URL ending in /v1 for your ${g?"Anthropic":"OpenAI"}-compatible API.`}),b.prefix?(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:["Model IDs use prefix ",(0,d.jsx)("code",{className:"bg-sidebar px-1 rounded font-mono",children:b.prefix})," ","(auto-assigned; stable so combos keep working)."]}):null,(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.pd,{label:"API Key (for Check)",type:"password",value:m,onChange:a=>n(a.target.value),className:"flex-1"}),(0,d.jsx)("div",{className:"pt-6",children:(0,d.jsx)(j.$n,{onClick:v,disabled:!m||q||!h.baseUrl.trim(),variant:"secondary",children:q?"Checking...":"Check"})})]}),(0,d.jsx)(j.pd,{label:"Model ID (optional)",value:o,onChange:a=>p(a.target.value),placeholder:"e.g. my-model-id",hint:"If the provider has no /models endpoint, test with a model ID."}),s&&(0,d.jsx)(j.Ex,{variant:"success"===s?"success":"error",children:"success"===s?"Valid":"Invalid"}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.$n,{onClick:u,fullWidth:!0,disabled:!h.name.trim()||!h.baseUrl.trim()||k,children:k?"Saving...":"Save"}),(0,d.jsx)(j.$n,{onClick:f,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}function L({isOpen:a,providerAlias:b,providerDisplayAlias:c,onSave:f,onClose:g}){let[h,i]=(0,e.useState)(""),[k,l]=(0,e.useState)(null),[m,n]=(0,e.useState)(""),[o,p]=(0,e.useState)(!1),q=a=>{let c=`${b}/`;return a.startsWith(c)?a.slice(c.length):a},r=async()=>{let a=q(h.trim());if(a){l("testing"),n("");try{let c=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${b}/${a}`})}),d=await c.json();l(d.ok?"ok":"error"),n(d.error||"")}catch(a){l("error"),n(a.message)}}},s=async()=>{let a=q(h.trim());if(a&&!o){p(!0);try{await f(a)}finally{p(!1)}}};return(0,d.jsx)(j.aF,{isOpen:a,onClose:g,title:"Add Custom Model",children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Model ID"}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)("input",{type:"text",value:h,onChange:a=>{i(a.target.value),l(null),n("")},onKeyDown:a=>{"Enter"===a.key&&r()},placeholder:"e.g. claude-opus-4-5",className:"flex-1 px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",autoFocus:!0}),(0,d.jsx)(j.$n,{variant:"secondary",icon:"science",loading:"testing"===k,onClick:r,disabled:!h.trim()||"testing"===k,children:"testing"===k?"Testing...":"Test"})]}),(0,d.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Sent to provider as: ",(0,d.jsx)("code",{className:"font-mono bg-sidebar px-1 rounded",children:q(h.trim())||"model-id"})]})]}),"ok"===k&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-base",children:"check_circle"}),"Model is reachable"]}),"error"===k&&(0,d.jsxs)("div",{className:"flex items-start gap-2 text-sm text-red-500",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-base shrink-0",children:"cancel"}),(0,d.jsx)("span",{children:m||"Model not reachable"})]}),(0,d.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,d.jsx)(j.$n,{onClick:g,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,d.jsx)(j.$n,{onClick:s,fullWidth:!0,size:"sm",disabled:!h.trim()||o,children:o?"Adding...":"Add Model"})]})]})})}J.propTypes={isOpen:B().bool.isRequired,provider:B().string,providerName:B().string,isCompatible:B().bool,isAnthropic:B().bool,authType:B().string,authHint:B().string,website:B().string,proxyPools:B().arrayOf(B().shape({id:B().string,name:B().string})),error:B().string,onSave:B().func.isRequired,onBulkDone:B().func,onClose:B().func.isRequired},K.propTypes={isOpen:B().bool.isRequired,node:B().shape({id:B().string,name:B().string,prefix:B().string,apiType:B().string,baseUrl:B().string}),onSave:B().func.isRequired,onClose:B().func.isRequired,isAnthropic:B().bool},L.propTypes={isOpen:B().bool.isRequired,providerAlias:B().string.isRequired,providerDisplayAlias:B().string.isRequired,onSave:B().func.isRequired,onClose:B().func.isRequired};let M=`[
3
+ sk-key-only-auto-named`;function K({isOpen:a,provider:b,providerName:c,isCompatible:f,isAnthropic:g,authType:h,authHint:i,website:l,error:m,onSave:n,onBulkDone:o,onClose:p}){let q="ollama-local"===b,r="cookie"===h,s="xai"===b&&!r,t=r?"Cookie Value":"API Key",u="azure"===b,v="cloudflare-ai"===b,w=k.Q2?.[b]?.regions||null,x=k.Q2?.[b]?.defaultRegion||w?.[0]?.id||"",[y,z]=(0,e.useState)({name:"",apiKey:"",defaultModel:"",priority:1,ollamaHostUrl:""}),[A,B]=(0,e.useState)({azureEndpoint:"",apiVersion:"2024-10-01-preview",deployment:"",organization:""}),[C,D]=(0,e.useState)({accountId:""}),[E,F]=(0,e.useState)(x),[G,H]=(0,e.useState)(!1),[I,L]=(0,e.useState)(null),[M,N]=(0,e.useState)(!1),[O,P]=(0,e.useState)("single"),[Q,R]=(0,e.useState)(""),[S,T]=(0,e.useState)(null),U=y.name.trim().length>0,V=y.apiKey.trim().length>0,W=()=>q&&y.ollamaHostUrl.trim()?{baseUrl:y.ollamaHostUrl.trim()}:u?{azureEndpoint:A.azureEndpoint,apiVersion:A.apiVersion,deployment:A.deployment,organization:A.organization}:v?{accountId:C.accountId}:w&&E?{region:E}:void 0,X=async()=>{let a=y.apiKey.trim();if(a){H(!0);try{let c=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:b,apiKey:a,providerSpecificData:W()})}),d=await c.json();L(d.valid?"success":"failed")}catch{L("failed")}finally{H(!1)}}},Y=async()=>{if(!b)return;let a=y.name.trim(),c=y.apiKey.trim();if((q||c)&&(q||a)&&(!f||y.defaultModel.trim())){N(!0);try{let d=!1;try{H(!0),L(null);let a=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:b,apiKey:c,providerSpecificData:W()})});d=!!(await a.json()).valid,L(d?"success":"failed")}catch{L("failed")}finally{H(!1)}await n({name:a||(q?"Ollama Local":""),apiKey:c,defaultModel:f?y.defaultModel.trim():void 0,priority:y.priority,testStatus:d?"active":"unknown",providerSpecificData:W()})}finally{N(!1)}}},Z=async()=>{let a=Q.split("\n").map(a=>a.trim()).filter(Boolean);if(!a.length)return;N(!0),T(null);let c=0,d=0;for(let e=0;e<a.length;e++){let f=a[e].split("|"),g=f.length>=2?f.slice(1).join("|").trim():f[0].trim();if(!g){d++;continue}let h=f.length>=2&&f[0].trim()||"Key",i=`${h} ${e+1}`;try{(await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:b,apiKey:g,name:i,priority:1,testStatus:"unknown"})})).ok?c++:d++}catch{d++}}N(!1),T({success:c,failed:d}),c>0&&o&&o()};return b?(0,d.jsx)(j.aF,{isOpen:a,title:`Add ${c||b} ${t}`,onClose:p,children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.$n,{size:"sm",variant:"single"===O?"primary":"ghost",onClick:()=>{P("single"),T(null)},children:"Single"}),(0,d.jsx)(j.$n,{size:"sm",variant:"bulk"===O?"primary":"ghost",onClick:()=>{P("bulk"),T(null)},children:"Bulk Add"})]}),"bulk"===O&&(0,d.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:["One key per line. Format: ",(0,d.jsx)("code",{children:"name|apiKey"})," or just ",(0,d.jsx)("code",{children:"apiKey"})," (auto-named by index)."]}),(0,d.jsx)("textarea",{className:"w-full rounded border border-accent/30 bg-sidebar p-2 text-sm font-mono resize-y min-h-[140px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:J,value:Q,onChange:a=>R(a.target.value)}),S&&(0,d.jsxs)("div",{className:`text-sm font-medium ${S.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",S.success," added",S.failed>0?`, ✗ ${S.failed} failed`:""]}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.$n,{onClick:Z,fullWidth:!0,disabled:M||!Q.trim(),children:M?"Adding...":"Add All Keys"}),(0,d.jsx)(j.$n,{onClick:p,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"single"===O&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(j.pd,{label:"Name",value:y.name,onChange:a=>z({...y,name:a.target.value}),placeholder:q?"Ollama Local":"Production Key"}),q&&(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.pd,{label:"Ollama Host URL",value:y.ollamaHostUrl,onChange:a=>z({...y,ollamaHostUrl:a.target.value}),placeholder:"http://localhost:11434",className:"flex-1"}),(0,d.jsx)("div",{className:"pt-6",children:(0,d.jsx)(j.$n,{onClick:X,disabled:G||M,variant:"secondary",children:G?"Checking...":"Check"})})]}),!q&&(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.pd,{label:t,type:r?"text":"password",autoComplete:"off",value:y.apiKey,onChange:a=>z({...y,apiKey:a.target.value}),placeholder:r?"grok-web"===b?"sso=xxxxx... or just the raw value":"eyJhbGciOi...":s?"xai-...":"",className:"flex-1"}),(0,d.jsx)("div",{className:"pt-6",children:(0,d.jsx)(j.$n,{onClick:X,disabled:!y.apiKey||G||M,variant:"secondary",children:G?"Checking...":"Check"})})]}),s&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Use a direct xAI API key from console.x.ai. This is separate from Grok Build OAuth."}),r&&i&&(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:[i,l&&(0,d.jsxs)(d.Fragment,{children:[" ",(0,d.jsxs)("a",{href:l,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:["Open ",l.replace(/^https?:\/\//,"")]})]})]}),w&&(0,d.jsx)(j.l6,{label:"Region",value:E,onChange:a=>F(a.target.value),options:w.map(a=>({value:a.id,label:a.label}))}),f&&(0,d.jsx)(j.pd,{label:"Default Model",value:y.defaultModel,onChange:a=>z({...y,defaultModel:a.target.value}),placeholder:g?"claude-3-5-sonnet-latest":"gpt-4o-mini"}),q&&(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:["Leave blank to use ",(0,d.jsx)("code",{children:"http://localhost:11434"}),". For remote Ollama, enter the full host URL (e.g. ",(0,d.jsx)("code",{children:"http://192.168.1.10:11434"}),")."]}),I&&(0,d.jsx)(j.Ex,{variant:"success"===I?"success":"error",children:"success"===I?"Valid":"Invalid"}),m&&(0,d.jsx)("p",{className:"text-xs text-red-500 break-words",children:m}),f&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Enter the model ID exactly as your compatible endpoint expects it. This model will be saved as the connection default."}),v&&(0,d.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,d.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Cloudflare Workers AI"}),(0,d.jsx)(j.pd,{label:"Account ID",value:C.accountId,onChange:a=>D({...C,accountId:a.target.value}),placeholder:"abc123def456..."}),(0,d.jsxs)("p",{className:"text-xs text-text-muted mt-2",children:["Find your Account ID in the right sidebar of ",(0,d.jsx)("a",{href:"https://dash.cloudflare.com",target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:"dash.cloudflare.com"})]})]}),u&&(0,d.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,d.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Azure OpenAI Configuration"}),(0,d.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,d.jsx)(j.pd,{label:"Azure Endpoint",value:A.azureEndpoint,onChange:a=>B({...A,azureEndpoint:a.target.value}),placeholder:"https://your-resource.openai.azure.com"}),(0,d.jsx)(j.pd,{label:"Deployment Name",value:A.deployment,onChange:a=>B({...A,deployment:a.target.value}),placeholder:"gpt-4"}),(0,d.jsx)(j.pd,{label:"API Version",value:A.apiVersion,onChange:a=>B({...A,apiVersion:a.target.value}),placeholder:"2024-10-01-preview"}),(0,d.jsx)(j.pd,{label:"Organization",value:A.organization,onChange:a=>B({...A,organization:a.target.value}),placeholder:"Organization ID"})]})]}),(0,d.jsx)(j.pd,{label:"Priority",type:"number",min:1,value:y.priority,onChange:a=>z({...y,priority:Number.parseInt(a.target.value)||1})}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.$n,{onClick:Y,fullWidth:!0,disabled:M||!q&&(!U||!V)||f&&!y.defaultModel.trim()||u&&(!A.azureEndpoint||!A.deployment||!A.organization)||v&&!C.accountId,children:M?"Saving...":"Save"}),(0,d.jsx)(j.$n,{onClick:p,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})}):null}function L({isOpen:a,node:b,onSave:c,onClose:f,isAnthropic:g}){let[h,i]=(0,e.useState)({name:"",apiType:"chat",baseUrl:"https://api.openai.com/v1"}),[k,l]=(0,e.useState)(!1),[m,n]=(0,e.useState)(""),[o,p]=(0,e.useState)(""),[q,r]=(0,e.useState)(!1),[s,t]=(0,e.useState)(null),u=function(a){try{return["http:","https:"].includes(new URL(a).protocol)}catch{return!1}}(h.baseUrl.trim()),v=async()=>{if(h.name.trim()&&u){l(!0);try{let a={name:h.name.trim(),baseUrl:h.baseUrl.trim()};g||(a.apiType=h.apiType),await c(a)}finally{l(!1)}}},w=async()=>{r(!0);try{let a=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:h.baseUrl,apiKey:m,type:g?"anthropic-compatible":"openai-compatible",modelId:o.trim()||void 0})}),b=await a.json();t(b.valid?"success":"failed")}catch{t("failed")}finally{r(!1)}};return b?(0,d.jsx)(j.aF,{isOpen:a,title:`Edit ${g?"Anthropic":"OpenAI"} Compatible`,onClose:f,children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsx)(j.pd,{label:"Name",value:h.name,onChange:a=>i({...h,name:a.target.value}),placeholder:`${g?"Anthropic":"OpenAI"} Compatible`,hint:"Friendly label for this provider."}),!g&&(0,d.jsx)(j.l6,{label:"API Type",options:[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}],value:h.apiType,onChange:a=>i({...h,apiType:a.target.value})}),(0,d.jsx)(j.pd,{label:"Base URL",value:h.baseUrl,onChange:a=>i({...h,baseUrl:a.target.value}),placeholder:g?"https://api.anthropic.com/v1":"https://api.openai.com/v1",hint:`Base URL ending in /v1 for your ${g?"Anthropic":"OpenAI"}-compatible API.`}),b.prefix?(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:["Model IDs use prefix ",(0,d.jsx)("code",{className:"bg-sidebar px-1 rounded font-mono",children:b.prefix})," ","(auto-assigned; stable so combos keep working)."]}):null,(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.pd,{label:"API Key (for Check)",type:"password",autoComplete:"off",value:m,onChange:a=>n(a.target.value),className:"flex-1"}),(0,d.jsx)("div",{className:"pt-6",children:(0,d.jsx)(j.$n,{onClick:w,disabled:!m||q||!u,variant:"secondary",children:q?"Checking...":"Check"})})]}),(0,d.jsx)(j.pd,{label:"Model ID (optional)",value:o,onChange:a=>p(a.target.value),placeholder:"e.g. my-model-id",hint:"If the provider has no /models endpoint, test with a model ID."}),s&&(0,d.jsx)(j.Ex,{variant:"success"===s?"success":"error",children:"success"===s?"Valid":"Invalid"}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.$n,{onClick:v,fullWidth:!0,disabled:!h.name.trim()||!u||k,children:k?"Saving...":"Save"}),(0,d.jsx)(j.$n,{onClick:f,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}function M({isOpen:a,providerAlias:b,providerDisplayAlias:c,onSave:f,onClose:g}){let[h,i]=(0,e.useState)(""),[k,l]=(0,e.useState)(null),[m,n]=(0,e.useState)(""),[o,p]=(0,e.useState)(!1),q=a=>{let c=`${b}/`;return a.startsWith(c)?a.slice(c.length):a},r=async()=>{let a=q(h.trim());if(a){l("testing"),n("");try{let c=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${b}/${a}`})}),d=await c.json();l(d.ok?"ok":"error"),n(d.error||"")}catch(a){l("error"),n(a.message)}}},s=async()=>{let a=q(h.trim());if(a&&!o){p(!0);try{await f(a)}finally{p(!1)}}};return(0,d.jsx)(j.aF,{isOpen:a,onClose:g,title:"Add Custom Model",children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Model ID"}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)("input",{type:"text",value:h,onChange:a=>{i(a.target.value),l(null),n("")},onKeyDown:a=>{"Enter"===a.key&&r()},placeholder:"e.g. claude-opus-4-5",className:"flex-1 px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",autoFocus:!0}),(0,d.jsx)(j.$n,{variant:"secondary",icon:"science",loading:"testing"===k,onClick:r,disabled:!h.trim()||"testing"===k,children:"testing"===k?"Testing...":"Test"})]}),(0,d.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Sent to provider as: ",(0,d.jsx)("code",{className:"font-mono bg-sidebar px-1 rounded",children:q(h.trim())||"model-id"})]})]}),"ok"===k&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-base",children:"check_circle"}),"Model is reachable"]}),"error"===k&&(0,d.jsxs)("div",{className:"flex items-start gap-2 text-sm text-red-500",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-base shrink-0",children:"cancel"}),(0,d.jsx)("span",{children:m||"Model not reachable"})]}),(0,d.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,d.jsx)(j.$n,{onClick:g,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,d.jsx)(j.$n,{onClick:s,fullWidth:!0,size:"sm",disabled:!h.trim()||o,children:o?"Adding...":"Add Model"})]})]})})}K.propTypes={isOpen:B().bool.isRequired,provider:B().string,providerName:B().string,isCompatible:B().bool,isAnthropic:B().bool,authType:B().string,authHint:B().string,website:B().string,error:B().string,onSave:B().func.isRequired,onBulkDone:B().func,onClose:B().func.isRequired},L.propTypes={isOpen:B().bool.isRequired,node:B().shape({id:B().string,name:B().string,prefix:B().string,apiType:B().string,baseUrl:B().string}),onSave:B().func.isRequired,onClose:B().func.isRequired,isAnthropic:B().bool},M.propTypes={isOpen:B().bool.isRequired,providerAlias:B().string.isRequired,providerDisplayAlias:B().string.isRequired,onSave:B().func.isRequired,onClose:B().func.isRequired};let N=`[
5
4
  {
6
5
  "accessToken": "eyJhbGc...",
7
6
  "refreshToken": "rt_...",
8
7
  "idToken": "eyJhbGc...",
9
8
  "email": "user@example.com"
10
9
  }
11
- ]`;function N({isOpen:a,onClose:b,onSuccess:c}){let[f,g]=(0,e.useState)(""),[h,i]=(0,e.useState)(!1),[k,l]=(0,e.useState)(""),[m,n]=(0,e.useState)(null),o=()=>{h||(g(""),l(""),n(null),b())},p=async()=>{var a;let b;l(""),n(null);let d=f.trim();if(!d)return;try{b=JSON.parse(d)}catch(a){l(`${(0,w.Tl)("Invalid JSON")}: ${a.message}`);return}let e=Array.isArray(a=b)?a:a&&"object"==typeof a?Array.isArray(a.accounts)?a.accounts:[a]:null;if(!e||0===e.length)return void l((0,w.Tl)("No accounts found in input"));i(!0);try{let a=await fetch("/api/oauth/codex/bulk-import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accounts:e})}),b=await a.json();if(!a.ok)return void l(b?.error||`Request failed: ${a.status}`);n(b),b.success>0&&"function"==typeof c&&c()}catch(a){l(a.message||(0,w.Tl)("Request failed"))}finally{i(!1)}},q=m?.results?.filter(a=>!a.ok)||[];return(0,d.jsx)(j.aF,{isOpen:a,title:(0,w.Tl)("Bulk Add Codex Accounts"),onClose:o,children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsx)("p",{className:"text-xs text-text-muted",children:(0,w.Tl)("Paste an array of codex account JSON objects. Each must include accessToken (and ideally refreshToken, idToken).")}),(0,d.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:M,value:f,onChange:a=>g(a.target.value),disabled:h}),k&&(0,d.jsx)("p",{className:"text-xs text-red-500 break-words",children:k}),m&&(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsxs)("div",{className:`text-sm font-medium ${m.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",m.success," ",(0,w.Tl)("added"),m.failed>0?`, ✗ ${m.failed} ${(0,w.Tl)("failed")}`:""]}),q.length>0&&(0,d.jsx)("ul",{className:"rounded border border-accent/20 bg-sidebar/50 p-2 text-xs font-mono max-h-40 overflow-y-auto",children:q.map(a=>(0,d.jsxs)("li",{className:"text-red-400",children:["[",a.index,"] ",a.error]},a.index))})]}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.$n,{onClick:p,fullWidth:!0,disabled:h||!f.trim(),children:h?(0,w.Tl)("Importing..."):(0,w.Tl)("Import All")}),(0,d.jsx)(j.$n,{onClick:o,variant:"ghost",fullWidth:!0,disabled:h,children:(0,w.Tl)("Close")})]})]})})}N.propTypes={isOpen:B().bool.isRequired,onClose:B().func.isRequired,onSuccess:B().func};function O({connectionId:a,providerAlias:b,models:c,onComplete:f,onLatencyMap:g,onClose:h}){let[i,k]=(0,e.useState)(4),[l,m]=(0,e.useState)(50),[n,o]=(0,e.useState)(Math.round(20)),[p,q]=(0,e.useState)(!1),[r,s]=(0,e.useState)(null),[t,u]=(0,e.useState)(null),[v,w]=(0,e.useState)(""),[x,y]=(0,e.useState)(""),z=(0,e.useRef)(!1),A=(0,e.useRef)(null),B=c?.length||0,C=(0,e.useMemo)(()=>`max concurrency 16 \xb7 batch 200 \xb7 timeout ${60}s`,[]);async function D(){if(p||!a||0===B)return;z.current=!1,q(!0),w(""),u(null),y("Preparing…");let d={concurrency:Math.max(1,Math.min(16,Number(i)||4)),batchSize:Math.max(1,Math.min(200,Number(l)||50)),timeoutMs:Math.max(1e3,Math.min(6e4,1e3*(Number(n)||20)))},e={};try{let h=await fetch(`/api/providers/${a}/model-probes/prepare`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({models:c,providerAlias:b,concurrency:d.concurrency,batchSize:d.batchSize,timeoutMs:d.timeoutMs})}),i=await h.json().catch(()=>({}));if(!h.ok)return void w(i.error||"Prepare failed");let j=i.eligible||[],k=i.stats?.skippedDead||0,l=i.stats?.duplicates||0;if(s({done:0,total:j.length,ok:0,dead:0,retryable:0,skippedDead:k,skippedDup:l}),0===j.length){let a={ok:0,dead:0,retryable:0,tested:0,skippedDead:k,skippedDup:l,removed:0};u(a),y("Nothing to test (all skipped as known-unavailable or empty)."),f?.(a);return}let m=0,n=0,o=0,p=0;for(let c=0;c<j.length&&!z.current;c+=d.batchSize){let f=j.slice(c,c+d.batchSize);y(`Probing ${p+1}–${Math.min(p+f.length,j.length)} of ${j.length}…`),A.current=new AbortController;let g=await fetch(`/api/providers/${a}/model-probes/batch`,{method:"POST",headers:{"Content-Type":"application/json"},signal:A.current.signal,body:JSON.stringify({models:f,providerAlias:b,concurrency:d.concurrency,batchSize:d.batchSize,timeoutMs:d.timeoutMs,warmup:0===c})}),h=await g.json().catch(()=>({}));if(h.providerError){w(h.error||"Provider authentication failed");break}if(!g.ok){w(h.error||"Batch failed");break}for(let a of h.results||[])"ok"===a.probeStatus?(m+=1,a.modelId&&Number.isFinite(a.latencyMs)&&(e[a.modelId]=a.latencyMs),a.canonicalId&&Number.isFinite(a.latencyMs)&&(e[a.canonicalId]=a.latencyMs)):"dead"===a.probeStatus?n+=1:o+=1;p+=(h.results||[]).length,s({done:p,total:j.length,ok:m,dead:n,retryable:o,skippedDead:k,skippedDup:l})}g?.(e);let q={ok:m,dead:n,retryable:o,tested:p,skippedDead:k,skippedDup:l,cancelled:z.current};u(q),y(z.current?"Cancelled (partial results saved).":"Done."),f?.(q)}catch(a){a?.name==="AbortError"?y("Cancelled."):w(a?.message||"Verify failed")}finally{q(!1),A.current=null}}async function E(){if(!a)return;y("Removing unavailable custom models…");let c=await fetch(`/api/providers/${a}/model-probes/remove-unavailable`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:b,kind:"llm"})}),d=await c.json().catch(()=>({}));c.ok?(y(`Removed ${d.removed||0} unavailable custom model(s).`),f?.({...t||{},removed:d.removed||0})):w(d.error||"Remove failed")}async function F(){if(!a)return;let b=await fetch(`/api/providers/${a}/model-probes/cache`,{method:"DELETE"}),c=await b.json().catch(()=>({}));b.ok?(y(`Cleared probe cache (${c.cleared||0} rows). Next verify will re-test everything.`),u(null),s(null)):w(c.error||"Clear cache failed")}let G=r?.total?Math.min(100,Math.round(r.done/r.total*100)):0;return(0,d.jsxs)("div",{className:"mb-4 rounded-lg border border-border bg-sidebar/40 p-3 space-y-3",children:[(0,d.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:"Verify models"}),(0,d.jsxs)("p",{className:"text-[11px] text-text-muted mt-0.5",children:["Batch-ping availability and latency. Known-dead models are skipped until you clear the cache. Caps: ",C,"."]})]}),h&&(0,d.jsx)("button",{type:"button",onClick:h,className:"p-1 text-text-muted hover:text-text-main rounded",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"close"})})]}),(0,d.jsxs)("div",{className:"flex flex-wrap gap-3 items-end",children:[(0,d.jsxs)("label",{className:"text-xs text-text-muted",children:["Concurrency",(0,d.jsx)("input",{type:"number",min:1,max:16,value:i,disabled:p,onChange:a=>k(a.target.value),className:"mt-1 block w-20 rounded-md border border-border bg-background px-2 py-1 text-xs"})]}),(0,d.jsxs)("label",{className:"text-xs text-text-muted",children:["Batch size",(0,d.jsx)("input",{type:"number",min:1,max:200,value:l,disabled:p,onChange:a=>m(a.target.value),className:"mt-1 block w-20 rounded-md border border-border bg-background px-2 py-1 text-xs"})]}),(0,d.jsxs)("label",{className:"text-xs text-text-muted",children:["Timeout (s)",(0,d.jsx)("input",{type:"number",min:1,max:60,value:n,disabled:p,onChange:a=>o(a.target.value),className:"mt-1 block w-20 rounded-md border border-border bg-background px-2 py-1 text-xs"})]}),(0,d.jsxs)("div",{className:"flex gap-2",children:[p?(0,d.jsx)(j.$n,{size:"sm",variant:"secondary",icon:"stop",onClick:function(){z.current=!0,A.current?.abort()},children:"Cancel"}):(0,d.jsx)(j.$n,{size:"sm",icon:"science",onClick:D,disabled:!a||0===B,children:"Start"}),(0,d.jsx)(j.$n,{size:"sm",variant:"secondary",icon:"delete_sweep",onClick:F,disabled:p,children:"Clear cache"})]})]}),r&&(0,d.jsxs)("div",{className:"space-y-1",children:[(0,d.jsx)("div",{className:"h-1.5 w-full rounded-full bg-border overflow-hidden",children:(0,d.jsx)("div",{className:"h-full bg-primary transition-all",style:{width:`${G}%`}})}),(0,d.jsxs)("p",{className:"text-[11px] text-text-muted",children:[r.done,"/",r.total," tested \xb7 ok ",r.ok," \xb7 dead ",r.dead," \xb7 retry ",r.retryable,r.skippedDead?` \xb7 skipped dead ${r.skippedDead}`:"",r.skippedDup?` \xb7 dupes ${r.skippedDup}`:""]})]}),x&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:x}),v&&(0,d.jsx)("p",{className:"text-xs text-red-500 break-words",children:v}),t&&(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-2 pt-1",children:[(0,d.jsxs)("span",{className:"text-xs text-text-main",children:["Summary: ",t.ok," ok \xb7 ",t.dead," unavailable \xb7 ",t.retryable," retry later",t.skippedDead?` \xb7 ${t.skippedDead} skipped (known dead)`:"",t.cancelled?" \xb7 cancelled":""]}),t.dead>0&&(0,d.jsx)(j.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:E,disabled:p,children:"Remove unavailable custom"})]})]})}function P(a,b=""){let c=String(a||"").trim();if(!c)return"";c=(c=c.replace(/\s+/g,"")).replace(/^models\//i,"");let d=String(b||"").trim();return d&&c.toLowerCase().startsWith(`${d.toLowerCase()}/`)&&(c=c.slice(d.length+1)),(c=c.replace(/\/{2,}/g,"/").replace(/^\/+|\/+$/g,"")).toLowerCase()}O.propTypes={connectionId:B().string,providerAlias:B().string,models:B().arrayOf(B().object),onComplete:B().func,onLatencyMap:B().func,onClose:B().func};let Q={claude:"claudeAutoPing",codex:"codexAutoPing"};function R(){let a,b,c,g,m=(0,f.useParams)(),n=(0,f.useRouter)(),o=m.id,{getCaps:p}=(0,v.y)(),[q,r]=(0,e.useState)([]),[s,A]=(0,e.useState)([]),[B,D]=(0,e.useState)(!0),[F,G]=(0,e.useState)(null),[I,M]=(0,e.useState)(!1),[R,S]=(0,e.useState)(!1),[T,U]=(0,e.useState)(!1),[V,W]=(0,e.useState)(""),[X,Y]=(0,e.useState)(!1),[Z,$]=(0,e.useState)(!1),[_,aa]=(0,e.useState)(!1),[ab,ac]=(0,e.useState)(null),[ad,ae]=(0,e.useState)({}),[af,ag]=(0,e.useState)([]),[ah,ai]=(0,e.useState)(!1),[aj,ak]=(0,e.useState)({}),[al,am]=(0,e.useState)(""),[an,ao]=(0,e.useState)(()=>new Set),[ap,aq]=(0,e.useState)(!1),[ar,as]=(0,e.useState)(null),[at,au]=(0,e.useState)(""),[av,aw]=(0,e.useState)("auto"),[ax,ay]=(0,e.useState)({enabled:!1,connections:{}}),[az,aA]=(0,e.useState)([]),[aB,aC]=(0,e.useState)([]),[aD,aE]=(0,e.useState)([]),[aF,aG]=(0,e.useState)(null),[aH,aI]=(0,e.useState)(!1),[aJ,aK]=(0,e.useState)(!1),[aL,aM]=(0,e.useState)(!1),[aN,aO]=(0,e.useState)(null),[aP,aQ]=(0,e.useState)({}),[aR,aS]=(0,e.useState)(null),aT=(0,e.useRef)(!1),[aU,aV]=(0,e.useState)(!1),[aW,aX]=(0,e.useState)(""),[aY,aZ]=(0,e.useState)(!1),[a$,a_]=(0,e.useState)({}),{copied:a0,copy:a1}=(0,u.C)(),a2=()=>{M(!0)},a3=()=>{a8?a2():(W(""),U(!0))},a4=()=>{W(""),U(!0)},a5=()=>{a8?a3():a4()},a6=F?{id:F.id,name:F.name||("anthropic-compatible"===F.type?"Anthropic Compatible":"OpenAI Compatible"),color:"anthropic-compatible"===F.type?"#D97757":"#10A37F",textIcon:"anthropic-compatible"===F.type?"AC":"OC",apiType:F.apiType,baseUrl:F.baseUrl,type:F.type}:k.zN[o]||k.fg[o]||k.IS[o]||k.nJ[o]||k.br[o],a7=a6?.authModes||[],a8=!!k.zN[o]||!!k.IS[o]||a7.includes("oauth"),a9=!!k.fg[o]||a7.includes("apikey"),ba=!!k.IS[o]?.noAuth,bb=(0,l.KC)(o),bc=(0,k.wG)(o),bd=(0,k.mq)(o),be=(0,k.gb)(o),bf=bd||be,bg=!bf&&a8&&a9,bh="xai"===o?"Grok Build OAuth":"OAuth",bi="xai"===o?"xAI API Key":"API Key",bj=a=>{if(!av||"auto"===av)return null;let b=t(o,a);return b&&b.includes(av)?av:null},bk=(()=>{let a=new Set;for(let b of bb){let c=t(o,b.id);c&&c.forEach(b=>{"none"!==b&&a.add(b)})}return a.size?["auto",...a]:null})(),bl=bf?o:bc,bm=bf?F?.prefix||o:bc,bn=(0,e.useCallback)(async()=>{try{let a=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(bl)}`,{cache:"no-store"}),b=await a.json();a.ok&&aE(b.ids||[])}catch(a){console.log("Error fetching disabled models:",a)}},[bl]),bo=async a=>{try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:bl,ids:[a]})})).ok&&await bn()}catch(a){console.log("Error disabling model:",a)}},bp=async a=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(bl)}&id=${encodeURIComponent(a)}`,{method:"DELETE"})).ok&&await bn()}catch(a){console.log("Error enabling model:",a)}},bq=async a=>{a.length&&aG({title:"Disable All Models",message:`Disable all ${a.length} model(s)?`,onConfirm:async()=>{aG(null);try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:bl,ids:a})})).ok&&await bn()}catch(a){console.log("Error disabling all models:",a)}}})},br=async()=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(bl)}`,{method:"DELETE"})).ok&&await bn()}catch(a){console.log("Error enabling all models:",a)}},bs=(0,e.useCallback)(async()=>{try{let a=await fetch("/api/models/alias"),b=await a.json();a.ok&&ae(b.aliases||{})}catch(a){console.log("Error fetching aliases:",a)}},[]),bt=(0,e.useCallback)(async()=>{try{let a=await fetch("/api/models/custom",{cache:"no-store"}),b=await a.json();a.ok&&ag(b.models||[])}catch(a){console.log("Error fetching custom models:",a)}},[]),bu=(0,e.useCallback)(async()=>{try{let[a,b,c]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/provider-nodes",{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"})]),d=await a.json(),e=await b.json(),f=c.ok?await c.json():{};if(a.ok){let a=(d.connections||[]).filter(a=>a.provider===o);r(a)}let g=(f.providerStrategies||{})[o]||{};as(g.fallbackStrategy||null),au(null!=g.stickyRoundRobinLimit?String(g.stickyRoundRobinLimit):"1");let h=(f.providerThinking||{})[o]||{};aw(h.mode||"auto");let i=Q[o],j=i&&f[i]||{};if(ay({enabled:!0===j.enabled,connections:j.connections||{}}),b.ok){let a=(e.nodes||[]).find(a=>a.id===o)||null;if(!a&&bf)for(let b=0;b<3;b+=1){await new Promise(a=>setTimeout(a,150));let b=await fetch("/api/provider-nodes",{cache:"no-store"});if(b.ok&&(a=((await b.json()).nodes||[]).find(a=>a.id===o)||null))break}G(a)}}catch(a){console.log("Error fetching connections:",a)}finally{D(!1)}},[o,bf]),bv=async a=>{try{let b=await fetch(`/api/provider-nodes/${o}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}),c=await b.json();b.ok&&(G(c.node),await bu(),aa(!1))}catch(a){console.log("Error updating provider node:",a)}},bw=async(a,b)=>{try{let c=await fetch("/api/settings",{cache:"no-store"}),d=(c.ok?await c.json():{}).providerStrategies||{},e={};a&&(e.fallbackStrategy=a),"round-robin"===a&&""!==b&&(e.stickyRoundRobinLimit=Number(b)||3);let f={...d};0===Object.keys(e).length?delete f[o]:f[o]=e,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:f})})}catch(a){console.log("Error saving provider strategy:",a)}},bx=async a=>{try{let b=await fetch("/api/settings",{cache:"no-store"}),c={...(b.ok?await b.json():{}).providerThinking||{}};a&&"auto"!==a?c[o]={mode:a}:delete c[o],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerThinking:c})})}catch(a){console.log("Error saving thinking config:",a)}},by=async a=>{let b=Q[o];if(b){ay(a);try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[b]:a})})}catch(a){console.log("Error saving auto-ping config:",a)}}},bz=async(a,b,c=bc)=>{let d=`${c}/${a}`;try{let a=await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:d,alias:b})});if(a.ok)await bs();else{let b=await a.json();alert(b.error||"Failed to set alias")}}catch(a){console.log("Error setting alias:",a)}},bA=async a=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(a)}`,{method:"DELETE"})).ok&&await bs()}catch(a){console.log("Error deleting alias:",a)}},bB=async(a,b="llm",c=bl)=>{try{let d=await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:c,id:a,type:b})});if(d.ok)await bt();else{let a=await d.json();alert(a.error||"Failed to add custom model")}}catch(a){console.log("Error adding custom model:",a)}},bC=async(a,b="llm",c=bl)=>{try{let d=new URLSearchParams({providerAlias:c,id:a,type:b});(await fetch(`/api/models/custom?${d}`,{method:"DELETE"})).ok&&await bt()}catch(a){console.log("Error deleting custom model:",a)}},bD=async()=>{if(aU)return;let a=q.find(a=>s.includes(a.id)&&!1!==a.isActive)||q.find(a=>!1!==a.isActive);if(!a)return void alert((0,w.Tl)("Add an active connection first"));aV(!0),aX("");try{let b=await fetch(`/api/providers/${a.id}/models`),c=await b.json().catch(()=>({}));if(!b.ok)return void alert(c.error||(0,w.Tl)("Failed to fetch models"));let d=c.models||[];if(0===d.length)return void alert(c.warning||(0,w.Tl)("No models returned"));let e=new Set;try{let b=await fetch(`/api/providers/${a.id}/model-probes/prepare`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({models:d.map(a=>"string"==typeof a?{id:a}:{id:a.id||a.name||a.model,kind:a.kind||a.type||"llm"}),providerAlias:bl})});if(b.ok){let a=await b.json();e=new Set((a.skippedDead||[]).map(a=>a.canonicalId||a.id))}}catch{}let f=new Set(bb.map(a=>a.id)),g=[],h=[],i=new Set,j=0;for(let a of d){let b=function(a,b){if(null==a)return null;if("string"==typeof a){let c=z(a,b);return c?{id:c,name:c,type:y(c)}:null}let c=a.id||a.name||a.model||a.slug;if(!c)return null;let d=z(c,b);if(!d)return null;let e=a.display_name||a.displayName||a.name||a.title||d;return{id:d,name:String(e),type:y(d,a)}}(a,bl);if(!b)continue;let{id:c,name:d,type:k}=b,l=`${k}|${c}`;if(i.has(l))continue;i.add(l);let m=P(c,bl);if(e.has(m)||e.has(c)){j+=1;continue}if(f.has(c)){aD.includes(c)&&h.push(c);continue}if(af.some(a=>a.providerAlias===bl&&a.id===c&&(a.kind||a.type||"llm")===k))continue;let n=`${bl}/${c}`;Object.values(ad).includes(n)||g.push({providerAlias:bl,id:c,type:k,name:d})}let k=0;if(h.length>0)try{for(let a of h)(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(bl)}&id=${encodeURIComponent(a)}`,{method:"DELETE"})).ok&&(k+=1);await bn()}catch{}let l=0;if(g.length>0){let a=await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({models:g})}),b=await a.json().catch(()=>({}));if(!a.ok)return void alert(b.error||(0,w.Tl)("Failed to save models"));l=b.added??g.length,await bt()}let m=g.filter(a=>"llm"!==a.type).length,n=[];if(l>0&&n.push(`${l} new`),k>0&&n.push(`${k} re-enabled`),j>0&&n.push(`${j} skipped (known-unavailable)`),0===n.length)aX((0,w.Tl)("All models already in list"));else{let a=`Imported ${n.join(" \xb7 ")} (${d.length} from provider)`;m>0&&(a+=" \xb7 non-chat types stored for media pages"),c.warning&&(a+=` \xb7 ${c.warning}`),aX(a)}}catch(a){console.log("Error importing models:",a),alert((0,w.Tl)("Error fetching models")+": "+(a?.message||a))}finally{aV(!1)}},bE=async()=>{if(aJ||0===q.length)return;let a=Object.fromEntries(q.map(a=>[a.id,{state:"queued",error:null}]));aT.current=!1,aK(!0),aM(!1),aO(null),aQ(a),aS({total:q.length,completed:0,passed:0,failed:0,stopped:!1});let b=0,c=0;try{for(let a=0;a<q.length;a+=1){if(aT.current){aS({total:q.length,completed:a,passed:b,failed:c,stopped:!0});break}let d=q[a];aO(d.id),aQ(a=>({...a,[d.id]:{state:"testing",error:null}}));try{let a=await fetch(`/api/providers/${d.id}/test`,{method:"POST"}),e=await a.json(),f=!!e.valid;f?b+=1:c+=1,aQ(a=>({...a,[d.id]:{state:f?"success":"failed",error:f?null:e.error||null}}))}catch(a){c+=1,aQ(b=>({...b,[d.id]:{state:"failed",error:a.message||"Test failed"}}))}aS({total:q.length,completed:a+1,passed:b,failed:c,stopped:!1}),a<q.length-1&&await new Promise(a=>setTimeout(a,1e3))}}finally{aO(null),aK(!1),aM(!1),aT.current=!1}},bF=async a=>{aG({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{aG(null);try{(await fetch(`/api/providers/${a}`,{method:"DELETE"})).ok&&r(b=>b.filter(b=>b.id!==a))}catch(a){console.log("Error deleting connection:",a)}}})},bG=()=>{bu(),M(!1)},bH=async a=>{W("");try{let b=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:o,...a})}),c=null;try{c=await b.json()}catch{c=null}if(b.ok){await bu(),U(!1);return}W(c?.error||"Failed to save connection")}catch(a){console.log("Error saving connection:",a),W("Failed to save connection")}},bI=async a=>{try{(await fetch(`/api/providers/${ab.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})).ok&&(await bu(),$(!1))}catch(a){console.log("Error updating connection:",a)}},bJ=async(a,b)=>{try{(await fetch(`/api/providers/${a}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:b})})).ok&&r(c=>c.map(c=>c.id===a?{...c,isActive:b}:c))}catch(a){console.log("Error updating connection status:",a)}},bK=async(a,b)=>{let c=[...q];[c[a],c[b]]=[c[b],c[a]],r(c);try{await Promise.all([fetch(`/api/providers/${c[a].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:a})}),fetch(`/api/providers/${c[b].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:b})})])}catch(a){console.log("Error swapping priority:",a),await bu()}},bL=q.length>0&&s.length===q.length,bM=(0,d.jsx)("div",{className:"flex min-w-0 flex-col divide-y divide-black/[0.03] dark:divide-white/[0.03]",children:q.map((a,b)=>(0,d.jsxs)("div",{className:"flex min-w-0 items-stretch",children:[(0,d.jsx)("div",{className:"flex shrink-0 items-center pl-1 sm:pl-2",children:(0,d.jsx)("input",{type:"checkbox",checked:s.includes(a.id),onChange:()=>{var b;return b=a.id,void A(a=>a.includes(b)?a.filter(a=>a!==b):[...a,b])},className:"h-4 w-4 rounded border-gray-300 text-primary focus:ring-primary"})}),(0,d.jsx)("div",{className:"flex-1 min-w-0",children:(0,d.jsx)(H,{connection:a,isOAuth:a8,isFirst:0===b,isLast:b===q.length-1,onMoveUp:()=>bK(b,b-1),onMoveDown:()=>bK(b,b+1),onToggleActive:b=>bJ(a.id,b),autoPing:Q[o]&&"oauth"===a.authType?{on:!0===ax.connections[a.id],onToggle:b=>{var c;return c=a.id,void by({...ax,connections:{...ax.connections,[c]:b}})},provider:o}:null,onEdit:()=>{ac(a),$(!0)},onDelete:()=>bF(a.id),oneByOneStatus:aP[a.id]||null})})]},a.id))}),bN=async a=>{if(!an.has(a)){ao(b=>new Set(b).add(a));try{let b=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${bl}/${a}`})}),c=await b.json();ak(b=>({...b,[a]:c.ok?"ok":"error"})),am(c.ok?"":c.error||"Model not reachable")}catch{ak(b=>({...b,[a]:"error"})),am("Network error")}finally{ao(b=>{let c=new Set(b);return c.delete(a),c})}}};return B?(0,d.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,d.jsx)(j.Qv,{}),(0,d.jsx)(j.Qv,{})]}):a6?(0,d.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:gap-8 sm:px-0",children:[(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)(h(),{href:"/dashboard/providers",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,d.jsxs)("div",{className:"flex min-w-0 items-center gap-3 sm:gap-4",children:[(0,d.jsx)("div",{className:"flex size-12 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${a6.color}15`},children:ah?(0,d.jsx)("span",{className:"text-sm font-bold",style:{color:a6.color},children:a6.textIcon||a6.id.slice(0,2).toUpperCase()}):(0,d.jsx)(i.default,{src:bd&&a6.apiType?"responses"===a6.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":be?"/providers/anthropic-m.png":`/providers/${a6.id}.png`,alt:a6.name,width:48,height:48,className:"max-h-12 max-w-12 rounded-lg object-contain",sizes:"48px",onError:()=>ai(!0)})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,d.jsx)("h1",{className:"truncate text-2xl font-semibold tracking-tight sm:text-3xl",children:a6.name}),(a6.notice?.apiKeyUrl||a6.notice?.signupUrl||a6.website)&&(0,d.jsxs)("a",{href:a6.notice?.apiKeyUrl||a6.notice?.signupUrl||a6.website,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),a6.notice?.apiKeyUrl?"Get API Key":"Sign up / Learn more"]})]}),(0,d.jsxs)("p",{className:"text-text-muted",children:[q.length," connection",1===q.length?"":"s"]})]})]})]}),a6.deprecated&&(0,d.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,d.jsx)("span",{className:"material-symbols-outlined text-[16px] text-yellow-500 mt-0.5 shrink-0",children:"warning"}),(0,d.jsx)("p",{className:"text-xs text-red-600 dark:text-yellow-400 leading-relaxed",children:a6.deprecationNotice})]}),a6.notice?.text&&!a6.deprecated&&(0,d.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,d.jsx)("span",{className:"material-symbols-outlined text-[16px] text-blue-500 shrink-0",children:"info"}),(0,d.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:a6.notice.text}),a6.notice.apiKeyUrl&&(0,d.jsx)("a",{href:a6.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:"Get API Key →"})]}),bf&&F&&(0,d.jsx)(j.Zp,{children:(0,d.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold",children:be?"Anthropic Compatible Details":"OpenAI Compatible Details"}),(0,d.jsxs)("p",{className:"break-all text-sm text-text-muted",children:[be?"Messages API":"responses"===F.apiType?"Responses API":"Chat Completions"," \xb7 ",(F.baseUrl||"").replace(/\/$/,""),"/",be?"messages":"responses"===F.apiType?"responses":"chat/completions"]})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,d.jsx)(j.$n,{size:"sm",icon:"add",onClick:()=>{W(""),U(!0)},className:"w-full sm:w-auto",children:"Add API Key"}),(0,d.jsx)(j.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>aa(!0),className:"w-full sm:w-auto",children:"Edit"}),(0,d.jsx)(j.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:async()=>{aG({title:"Delete Compatible Node",message:`Delete this ${be?"Anthropic":"OpenAI"} Compatible node?`,onConfirm:async()=>{aG(null);try{(await fetch(`/api/provider-nodes/${o}`,{method:"DELETE"})).ok&&n.push("/dashboard/providers")}catch(a){console.log("Error deleting provider node:",a)}}})},className:"w-full sm:w-auto",children:"Delete"})]})]})}),ba?(0,d.jsx)(j.gw,{providerId:o}):(0,d.jsxs)(j.Zp,{children:[(0,d.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold",children:"Connections"}),(0,d.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:[q.length>0&&(0,d.jsxs)(d.Fragment,{children:[s.length>0&&(0,d.jsxs)(j.$n,{size:"sm",variant:"danger",icon:"delete",onClick:()=>{let a=s.length;0!==a&&aG({title:`Delete ${a} Connection${a>1?"s":""}`,message:`Delete ${a} connection${a>1?"s":""}? This cannot be undone.`,onConfirm:async()=>{aG(null);let a=0,b=[...s];for(let c of b)try{(await fetch(`/api/providers/${c}`,{method:"DELETE"})).ok||(a+=1)}catch(b){console.log("Error deleting connection:",b),a+=1}r(a=>a.filter(a=>!b.includes(a.id))),A([]),a>0&&alert(`Deleted ${b.length-a} connection(s), ${a} failed.`)}})},children:["Delete Selected (",s.length,")"]}),(0,d.jsx)(j.$n,{size:"sm",variant:"secondary",icon:"sync",onClick:bE,disabled:aJ,children:aJ?"Testing Connection One-by-One...":"Test Connection One-by-One"}),aJ&&(0,d.jsx)(j.$n,{size:"sm",variant:"ghost",icon:"stop",onClick:()=>{aJ&&(aT.current=!0,aM(!0))},disabled:aL,children:aL?"Stopping...":"Stop"})]}),(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,d.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Round Robin"}),(0,d.jsx)(j.lM,{checked:"round-robin"===ar,onChange:a=>{let b=a?"round-robin":null,c=a?at||"1":at;a&&!at&&au("1"),as(b),bw(b,c)}}),"round-robin"===ar&&(0,d.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,d.jsx)("span",{className:"text-xs text-text-muted",children:"Sticky:"}),(0,d.jsx)("input",{type:"number",min:1,value:at,onChange:a=>{var b;au(b=a.target.value),bw("round-robin",b)},placeholder:"1",className:"w-14 px-2 py-1 text-xs border border-border rounded-md bg-background focus:outline-none focus:border-primary"})]})]})]})]}),0===q.length?(0,d.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("div",{className:"inline-flex items-center justify-center w-9 h-9 rounded-full bg-primary/10 text-primary shrink-0",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:a8?"lock":"key"})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"}),bg&&(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:["Choose ",bh," or ",bi,"."]})]})]}),(0,d.jsx)("div",{className:"flex gap-2",children:bg?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(j.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:a3,children:bh}),(0,d.jsx)(j.$n,{size:"sm",icon:"key",onClick:a4,children:bi})]}):(0,d.jsxs)(d.Fragment,{children:[!bf&&"iflow"===o&&(0,d.jsx)(j.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>S(!0),children:"Cookie"}),"codex"===o&&(0,d.jsx)(j.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>Y(!0),children:(0,w.Tl)("Bulk Add")}),(0,d.jsx)(j.$n,{size:"sm",icon:"add",onClick:a5,children:bf?"Add API Key":"iflow"===o?"OAuth":"Add Connection"})]})})]}):(0,d.jsxs)(d.Fragment,{children:[aR&&(0,d.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,d.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,d.jsxs)("span",{children:["Total: ",aR.total]}),(0,d.jsxs)("span",{children:["Completed: ",aR.completed]}),(0,d.jsxs)("span",{children:["Passed: ",aR.passed]}),(0,d.jsxs)("span",{children:["Failed: ",aR.failed]}),aR.stopped&&(0,d.jsx)("span",{className:"text-amber-600 dark:text-amber-400",children:"Stopped"}),aJ&&aN&&(0,d.jsxs)("span",{children:["Running: ",q.find(a=>a.id===aN)?.name||aN]})]})}),q.length>0&&(0,d.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,d.jsxs)("label",{className:"flex cursor-pointer items-center gap-1.5 text-xs text-text-muted hover:text-primary",children:[(0,d.jsx)("input",{type:"checkbox",checked:bL,onChange:()=>{bL?A([]):A(q.map(a=>a.id))},className:"h-3.5 w-3.5 rounded border-gray-300 text-primary focus:ring-primary"}),"Select All"]})}),bM,!bf&&(0,d.jsxs)("div",{className:"mt-4 grid grid-cols-1 gap-2 sm:flex",children:["iflow"===o&&(0,d.jsx)(j.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>S(!0),title:"Add connection using browser cookie",className:"w-full sm:w-auto",children:"Cookie"}),"codex"===o&&(0,d.jsx)(j.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>Y(!0),title:(0,w.Tl)("Bulk import codex accounts from JSON"),className:"w-full sm:w-auto",children:(0,w.Tl)("Bulk Add")}),bg?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(j.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:a3,className:"w-full sm:w-auto",children:bh}),(0,d.jsx)(j.$n,{size:"sm",icon:"key",onClick:a4,className:"w-full sm:w-auto",children:bi})]}):(0,d.jsx)(j.$n,{size:"sm",icon:"add",onClick:a5,className:"w-full sm:w-auto",children:"Add"})]})]})]}),(0,d.jsxs)(j.Zp,{children:[(0,d.jsxs)("div",{className:"mb-4 flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold",children:"Available Models"}),bk&&(0,d.jsx)("select",{value:av,onChange:a=>{var b;aw(b=a.target.value),bx(b)},title:"Appends (level) suffix to copied model names",className:"rounded-md border border-border bg-background px-2 py-1 text-xs focus:border-primary focus:outline-none",children:bk.map(a=>(0,d.jsx)("option",{value:a,children:`Thinking: ${a.charAt(0).toUpperCase()+a.slice(1)}`},a))})]}),!bf&&(a=[...bb,...aB.filter(a=>!bb.some(b=>b.id===a.id))].filter(a=>{let b=(0,l.CP)(a);return!b||"llm"===b}).map(a=>a.id).filter(a=>!aD.includes(a)),b=q.some(a=>!1!==a.isActive),(0,d.jsxs)("div",{className:"flex flex-wrap gap-2",children:[b&&(0,d.jsx)(j.$n,{size:"sm",variant:"secondary",icon:aU?"progress_activity":"cloud_download",onClick:bD,disabled:aU,children:aU?"Importing...":"Import models"}),b&&(0,d.jsx)(j.$n,{size:"sm",variant:"secondary",icon:"science",onClick:()=>aZ(a=>!a),children:aY?"Hide verify":"Verify models"}),aD.length>0&&(0,d.jsx)(j.$n,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:br,children:"Active All"}),a.length>0&&(0,d.jsx)(j.$n,{size:"sm",variant:"secondary",icon:"block",onClick:()=>bq(a),children:"Disable All"})]}))]}),!!al&&(0,d.jsx)("p",{className:"text-xs text-red-500 mb-3 break-words",children:al}),aW&&(0,d.jsx)("p",{className:"text-xs text-text-muted mb-3",children:aW}),aY&&(c=q.find(a=>s.includes(a.id)&&!1!==a.isActive)||q.find(a=>!1!==a.isActive),g=[...x({customModels:af,modelAliases:ad,providerAlias:bl,builtInModels:bb,type:"llm"}).map(a=>({id:a.id,name:a.name||a.id,kind:"llm"})),...bb.filter(a=>{let b=(0,l.CP)(a);return(!b||"llm"===b)&&!aD.includes(a.id)}).map(a=>({id:a.id,name:a.name||a.id,kind:"llm"}))],(0,d.jsx)(O,{connectionId:c?.id,providerAlias:bl,models:g,onClose:()=>aZ(!1),onLatencyMap:a=>a_(b=>({...b,...a})),onComplete:async a=>{a?.removed>0&&await bt()}})),(()=>{let a,b,c;if(bf)return(0,d.jsx)(E,{providerStorageAlias:bl,providerDisplayAlias:bm,modelAliases:ad,customModels:af,copied:a0,onCopy:a1,onSetAlias:bz,onDeleteAlias:bA,onAddCustomModel:a=>bB(a,"llm",bl),onDeleteCustomModel:a=>bC(a,"llm",bl),onRefreshModels:bt,connections:q,isAnthropic:be});let e=[...bb,...aB.filter(a=>!bb.some(b=>b.id===a.id))].filter(a=>{let b=(0,l.CP)(a);return!b||"llm"===b}),f=new Set(aD),g=e.filter(a=>!f.has(a.id)),h=e.filter(a=>f.has(a.id)),i=x({customModels:af,modelAliases:ad,providerAlias:bl,builtInModels:bb,type:"llm"});return(0,d.jsxs)("div",{className:"flex flex-wrap gap-3",children:[i.map(a=>(0,d.jsx)(C,{model:{id:a.id,name:a.name},fullModel:`${bm}/${a.id}`,alias:a.alias,copied:a0,onCopy:a1,onSetAlias:()=>{},onDeleteAlias:()=>{"custom"===a.source?bC(a.id,"llm",bl):bA(a.alias)},testStatus:aj[a.id],onTest:q.length>0||ba?()=>bN(a.id):void 0,isTesting:an.has(a.id),isCustom:!0,isFree:!1,caps:p(`${o}/${a.id}`),thinkingSuffix:bj(a.id),latencyMs:a$[a.id]??a$[P(a.id,bl)]},`${a.source}-${a.fullModel}`)),g.map(a=>{let b=`${bl}/${a.id}`,c=`${o}/${a.id}`,e=Object.entries(ad).find(([,a])=>a===b||a===c)?.[0];return(0,d.jsx)(C,{model:a,fullModel:`${bm}/${a.id}`,alias:e,copied:a0,onSetAlias:b=>bz(a.id,b,bl),onCopy:a1,onDeleteAlias:()=>bA(e),testStatus:aj[a.id],onTest:q.length>0||ba?()=>bN(a.id):void 0,isTesting:an.has(a.id),isFree:a.isFree,onDisable:()=>bo(a.id),caps:p(`${o}/${a.id}`),thinkingSuffix:bj(a.id),latencyMs:a$[a.id]??a$[P(a.id,bl)]},a.id)}),(0,d.jsxs)("button",{onClick:()=>aq(!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,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]}),az.length>0&&(a=new Set([...Object.values(ad),...i.map(a=>a.fullModel)]),b=new Set(bb.map(a=>a.id)),0===(c=az.filter(c=>!a.has(`${bl}/${c.id}`)&&!b.has(c.id))).length?null:(0,d.jsxs)("div",{className:"w-full mt-2",children:[(0,d.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"Suggested free models (≥200k context):"}),(0,d.jsx)("div",{className:"flex flex-wrap gap-2",children:c.map(a=>(0,d.jsxs)("button",{onClick:async()=>{await bB(a.id,"llm",bl)},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:`${a.name} \xb7 ${(a.contextLength/1e3).toFixed(0)}k ctx`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),a.id.split("/").pop()]},a.id))})]})),h.length>0&&(0,d.jsxs)("div",{className:"w-full mt-2",children:[(0,d.jsxs)("p",{className:"text-xs text-text-muted mb-2",children:["Disabled models (",h.length,"):"]}),(0,d.jsx)("div",{className:"flex flex-wrap gap-2",children:h.map(a=>(0,d.jsxs)("button",{onClick:()=>bp(a.id),className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-dashed 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:"Restore model",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),a.id]},a.id))})]})]})})()]}),"kiro"===o?(0,d.jsx)(j.Mh,{isOpen:I,providerInfo:a6,onSuccess:bG,onClose:()=>M(!1)}):"cursor"===o?(0,d.jsx)(j.G9,{isOpen:I,onSuccess:bG,onClose:()=>M(!1)}):"gitlab"===o?(0,d.jsx)(j.vj,{isOpen:I,providerInfo:a6,onSuccess:bG,onClose:()=>M(!1)}):(0,d.jsx)(j.LF,{isOpen:I,provider:o,providerInfo:a6,onSuccess:bG,onClose:()=>M(!1)}),"iflow"===o&&(0,d.jsx)(j.vE,{isOpen:R,onSuccess:()=>{bu(),S(!1)},onClose:()=>S(!1)}),(0,d.jsx)(J,{isOpen:T,provider:o,providerName:a6.name,isCompatible:bf,isAnthropic:be,authType:a6?.authType,authHint:a6?.authHint,website:a6?.website,error:V,onSave:bH,onBulkDone:bu,onClose:()=>{W(""),U(!1)}}),(0,d.jsx)(j.wI,{isOpen:Z,connection:ab,onSave:bI,onClose:()=>$(!1)}),bf&&(0,d.jsx)(K,{isOpen:_,node:F,onSave:bv,onClose:()=>aa(!1),isAnthropic:be}),!bf&&(0,d.jsx)(L,{isOpen:ap,providerAlias:bl,providerDisplayAlias:bm,onSave:async a=>{await bB(a,"llm",bl),aq(!1)},onClose:()=>aq(!1)}),"codex"===o&&(0,d.jsx)(N,{isOpen:X,onClose:()=>Y(!1),onSuccess:bu}),(0,d.jsx)(j.uo,{isOpen:aH,onClose:()=>aI(!1),onConfirm:()=>{(aI(!1),a8)?a2():a4()},title:"Risk Notice",message:a6?.deprecationNotice,confirmText:"I Understand, Continue",cancelText:"Cancel",variant:"danger"}),(0,d.jsx)(j.uo,{isOpen:!!aF,onClose:()=>aG(null),onConfirm:aF?.onConfirm,title:aF?.title||"Confirm",message:aF?.message,variant:"danger"})]}):(0,d.jsxs)("div",{className:"text-center py-20",children:[(0,d.jsx)("p",{className:"text-text-muted",children:"Provider not found"}),(0,d.jsx)(h(),{href:"/dashboard/providers",className:"text-primary mt-4 inline-block",children:"Back to Providers"})]})}},46293:a=>{"use strict";a.exports=require("sql.js")},48161:a=>{"use strict";a.exports=require("node:os")},51455:a=>{"use strict";a.exports=require("node:fs/promises")},53053:a=>{"use strict";a.exports=require("node:diagnostics_channel")},55511:a=>{"use strict";a.exports=require("crypto")},55591:a=>{"use strict";a.exports=require("https")},57075:a=>{"use strict";a.exports=require("node:stream")},57975:a=>{"use strict";a.exports=require("node:util")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},70722:a=>{"use strict";a.exports=require("next/dist/shared/lib/invariant-error")},71553:a=>{"use strict";a.exports=require("node:dns/promises")},72089:(a,b,c)=>{Promise.resolve().then(c.bind(c,93110))},73024:a=>{"use strict";a.exports=require("node:fs")},73136:a=>{"use strict";a.exports=require("node:url")},73429:a=>{"use strict";a.exports=require("node:util/types")},73496:a=>{"use strict";a.exports=require("http2")},74075:a=>{"use strict";a.exports=require("zlib")},74875:(a,b,c)=>{"use strict";function d(a,b){return!1===a?"default":"active"===b||"success"===b?"success":"error"===b||"expired"===b||"unavailable"===b?"error":"default"}c.d(b,{g:()=>d})},75919:a=>{"use strict";a.exports=require("node:worker_threads")},76760:a=>{"use strict";a.exports=require("node:path")},77030:a=>{"use strict";a.exports=require("node:net")},77068:a=>{"use strict";a.exports=require("next/dist/shared/lib/size-limit")},77598:a=>{"use strict";a.exports=require("node:crypto")},78474:a=>{"use strict";a.exports=require("node:events")},79646:a=>{"use strict";a.exports=require("child_process")},79868:a=>{"use strict";a.exports=require("node:sqlite")},81630:a=>{"use strict";a.exports=require("http")},81787:a=>{"use strict";a.exports=require("bun:sqlite")},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87550:a=>{"use strict";a.exports=require("better-sqlite3")},87997:a=>{"use strict";a.exports=require("node:timers")},91645:a=>{"use strict";a.exports=require("net")},93110:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/home/runner/work/switchboard-router/switchboard-router/src/app/(dashboard)/dashboard/providers/[id]/page.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/runner/work/switchboard-router/switchboard-router/src/app/(dashboard)/dashboard/providers/[id]/page.js","default")},94735:a=>{"use strict";a.exports=require("events")}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,7774,8666,319,4206,6150,1220,3986,8860,2280,6070,8920,6306,3943,6922,2701,2768,5330,8895,7651,6182,2117,6040,6777,9696],()=>b(b.s=39989));module.exports=c})();
10
+ ]`;function O({isOpen:a,onClose:b,onSuccess:c}){let[f,g]=(0,e.useState)(""),[h,i]=(0,e.useState)(!1),[k,l]=(0,e.useState)(""),[m,n]=(0,e.useState)(null),o=()=>{h||(g(""),l(""),n(null),b())},p=async()=>{var a;let b;l(""),n(null);let d=f.trim();if(!d)return;try{b=JSON.parse(d)}catch(a){l(`${(0,w.Tl)("Invalid JSON")}: ${a.message}`);return}let e=Array.isArray(a=b)?a:a&&"object"==typeof a?Array.isArray(a.accounts)?a.accounts:[a]:null;if(!e||0===e.length)return void l((0,w.Tl)("No accounts found in input"));i(!0);try{let a=await fetch("/api/oauth/codex/bulk-import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accounts:e})}),b=await a.json();if(!a.ok)return void l(b?.error||`Request failed: ${a.status}`);n(b),b.success>0&&"function"==typeof c&&c()}catch(a){l(a.message||(0,w.Tl)("Request failed"))}finally{i(!1)}},q=m?.results?.filter(a=>!a.ok)||[];return(0,d.jsx)(j.aF,{isOpen:a,title:(0,w.Tl)("Bulk Add Codex Accounts"),onClose:o,children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsx)("p",{className:"text-xs text-text-muted",children:(0,w.Tl)("Paste an array of codex account JSON objects. Each must include accessToken (and ideally refreshToken, idToken).")}),(0,d.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:N,value:f,onChange:a=>g(a.target.value),disabled:h}),k&&(0,d.jsx)("p",{className:"text-xs text-red-500 break-words",children:k}),m&&(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsxs)("div",{className:`text-sm font-medium ${m.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",m.success," ",(0,w.Tl)("added"),m.failed>0?`, ✗ ${m.failed} ${(0,w.Tl)("failed")}`:""]}),q.length>0&&(0,d.jsx)("ul",{className:"rounded border border-accent/20 bg-sidebar/50 p-2 text-xs font-mono max-h-40 overflow-y-auto",children:q.map(a=>(0,d.jsxs)("li",{className:"text-red-400",children:["[",a.index,"] ",a.error]},a.index))})]}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.$n,{onClick:p,fullWidth:!0,disabled:h||!f.trim(),children:h?(0,w.Tl)("Importing..."):(0,w.Tl)("Import All")}),(0,d.jsx)(j.$n,{onClick:o,variant:"ghost",fullWidth:!0,disabled:h,children:(0,w.Tl)("Close")})]})]})})}O.propTypes={isOpen:B().bool.isRequired,onClose:B().func.isRequired,onSuccess:B().func};function P({connectionId:a,providerAlias:b,models:c,onComplete:f,onLatencyMap:g,onClose:h}){let[i,k]=(0,e.useState)(4),[l,m]=(0,e.useState)(50),[n,o]=(0,e.useState)(Math.round(20)),[p,q]=(0,e.useState)(!1),[r,s]=(0,e.useState)(null),[t,u]=(0,e.useState)(null),[v,w]=(0,e.useState)(""),[x,y]=(0,e.useState)(""),z=(0,e.useRef)(!1),A=(0,e.useRef)(null),B=c?.length||0,C=(0,e.useMemo)(()=>`max concurrency 16 \xb7 batch 200 \xb7 timeout ${60}s`,[]);async function D(){if(p||!a||0===B)return;z.current=!1,q(!0),w(""),u(null),y("Preparing…");let d={concurrency:Math.max(1,Math.min(16,Number(i)||4)),batchSize:Math.max(1,Math.min(200,Number(l)||50)),timeoutMs:Math.max(1e3,Math.min(6e4,1e3*(Number(n)||20)))},e={};try{let h=await fetch(`/api/providers/${a}/model-probes/prepare`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({models:c,providerAlias:b,concurrency:d.concurrency,batchSize:d.batchSize,timeoutMs:d.timeoutMs})}),i=await h.json().catch(()=>({}));if(!h.ok)return void w(i.error||"Prepare failed");let j=i.eligible||[],k=i.stats?.skippedDead||0,l=i.stats?.duplicates||0;if(s({done:0,total:j.length,ok:0,dead:0,retryable:0,skippedDead:k,skippedDup:l}),0===j.length){let a={ok:0,dead:0,retryable:0,tested:0,skippedDead:k,skippedDup:l,removed:0};u(a),y("Nothing to test (all skipped as known-unavailable or empty)."),f?.(a);return}let m=0,n=0,o=0,p=0;for(let c=0;c<j.length&&!z.current;c+=d.batchSize){let f=j.slice(c,c+d.batchSize);y(`Probing ${p+1}–${Math.min(p+f.length,j.length)} of ${j.length}…`),A.current=new AbortController;let g=await fetch(`/api/providers/${a}/model-probes/batch`,{method:"POST",headers:{"Content-Type":"application/json"},signal:A.current.signal,body:JSON.stringify({models:f,providerAlias:b,concurrency:d.concurrency,batchSize:d.batchSize,timeoutMs:d.timeoutMs,warmup:0===c})}),h=await g.json().catch(()=>({}));if(h.providerError){w(h.error||"Provider authentication failed");break}if(!g.ok){w(h.error||"Batch failed");break}for(let a of h.results||[])"ok"===a.probeStatus?(m+=1,a.modelId&&Number.isFinite(a.latencyMs)&&(e[a.modelId]=a.latencyMs),a.canonicalId&&Number.isFinite(a.latencyMs)&&(e[a.canonicalId]=a.latencyMs)):"dead"===a.probeStatus?n+=1:o+=1;p+=(h.results||[]).length,s({done:p,total:j.length,ok:m,dead:n,retryable:o,skippedDead:k,skippedDup:l})}g?.(e);let q={ok:m,dead:n,retryable:o,tested:p,skippedDead:k,skippedDup:l,cancelled:z.current};u(q),y(z.current?"Cancelled (partial results saved).":"Done."),f?.(q)}catch(a){a?.name==="AbortError"?y("Cancelled."):w(a?.message||"Verify failed")}finally{q(!1),A.current=null}}async function E(){if(!a)return;y("Removing unavailable custom models…");let c=await fetch(`/api/providers/${a}/model-probes/remove-unavailable`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:b,kind:"llm"})}),d=await c.json().catch(()=>({}));c.ok?(y(`Removed ${d.removed||0} unavailable custom model(s).`),f?.({...t||{},removed:d.removed||0})):w(d.error||"Remove failed")}async function F(){if(!a)return;let b=await fetch(`/api/providers/${a}/model-probes/cache`,{method:"DELETE"}),c=await b.json().catch(()=>({}));b.ok?(y(`Cleared probe cache (${c.cleared||0} rows). Next verify will re-test everything.`),u(null),s(null)):w(c.error||"Clear cache failed")}let G=r?.total?Math.min(100,Math.round(r.done/r.total*100)):0;return(0,d.jsxs)("div",{className:"mb-4 rounded-lg border border-border bg-sidebar/40 p-3 space-y-3",children:[(0,d.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:"Verify models"}),(0,d.jsxs)("p",{className:"text-[11px] text-text-muted mt-0.5",children:["Batch-ping availability and latency. Known-dead models are skipped until you clear the cache. Caps: ",C,"."]})]}),h&&(0,d.jsx)("button",{type:"button",onClick:h,className:"p-1 text-text-muted hover:text-text-main rounded",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"close"})})]}),(0,d.jsxs)("div",{className:"flex flex-wrap gap-3 items-end",children:[(0,d.jsxs)("label",{className:"text-xs text-text-muted",children:["Concurrency",(0,d.jsx)("input",{type:"number",min:1,max:16,value:i,disabled:p,onChange:a=>k(a.target.value),className:"mt-1 block w-20 rounded-md border border-border bg-background px-2 py-1 text-xs"})]}),(0,d.jsxs)("label",{className:"text-xs text-text-muted",children:["Batch size",(0,d.jsx)("input",{type:"number",min:1,max:200,value:l,disabled:p,onChange:a=>m(a.target.value),className:"mt-1 block w-20 rounded-md border border-border bg-background px-2 py-1 text-xs"})]}),(0,d.jsxs)("label",{className:"text-xs text-text-muted",children:["Timeout (s)",(0,d.jsx)("input",{type:"number",min:1,max:60,value:n,disabled:p,onChange:a=>o(a.target.value),className:"mt-1 block w-20 rounded-md border border-border bg-background px-2 py-1 text-xs"})]}),(0,d.jsxs)("div",{className:"flex gap-2",children:[p?(0,d.jsx)(j.$n,{size:"sm",variant:"secondary",icon:"stop",onClick:function(){z.current=!0,A.current?.abort()},children:"Cancel"}):(0,d.jsx)(j.$n,{size:"sm",icon:"science",onClick:D,disabled:!a||0===B,children:"Start"}),(0,d.jsx)(j.$n,{size:"sm",variant:"secondary",icon:"delete_sweep",onClick:F,disabled:p,children:"Clear cache"})]})]}),r&&(0,d.jsxs)("div",{className:"space-y-1",children:[(0,d.jsx)("div",{className:"h-1.5 w-full rounded-full bg-border overflow-hidden",children:(0,d.jsx)("div",{className:"h-full bg-primary transition-all",style:{width:`${G}%`}})}),(0,d.jsxs)("p",{className:"text-[11px] text-text-muted",children:[r.done,"/",r.total," tested \xb7 ok ",r.ok," \xb7 dead ",r.dead," \xb7 retry ",r.retryable,r.skippedDead?` \xb7 skipped dead ${r.skippedDead}`:"",r.skippedDup?` \xb7 dupes ${r.skippedDup}`:""]})]}),x&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:x}),v&&(0,d.jsx)("p",{className:"text-xs text-red-500 break-words",children:v}),t&&(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-2 pt-1",children:[(0,d.jsxs)("span",{className:"text-xs text-text-main",children:["Summary: ",t.ok," ok \xb7 ",t.dead," unavailable \xb7 ",t.retryable," retry later",t.skippedDead?` \xb7 ${t.skippedDead} skipped (known dead)`:"",t.cancelled?" \xb7 cancelled":""]}),t.dead>0&&(0,d.jsx)(j.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:E,disabled:p,children:"Remove unavailable custom"})]})]})}function Q(a,b=""){let c=String(a||"").trim();if(!c)return"";c=(c=c.replace(/\s+/g,"")).replace(/^models\//i,"");let d=String(b||"").trim();return d&&c.toLowerCase().startsWith(`${d.toLowerCase()}/`)&&(c=c.slice(d.length+1)),(c=c.replace(/\/{2,}/g,"/").replace(/^\/+|\/+$/g,"")).toLowerCase()}P.propTypes={connectionId:B().string,providerAlias:B().string,models:B().arrayOf(B().object),onComplete:B().func,onLatencyMap:B().func,onClose:B().func};let R={claude:"claudeAutoPing",codex:"codexAutoPing"};function S(){let a,b,c,g,m=(0,f.useParams)(),n=(0,f.useRouter)(),o=m.id,{getCaps:p}=(0,v.y)(),[q,r]=(0,e.useState)([]),[s,A]=(0,e.useState)([]),[B,E]=(0,e.useState)(!0),[G,H]=(0,e.useState)(null),[J,N]=(0,e.useState)(!1),[S,T]=(0,e.useState)(!1),[U,V]=(0,e.useState)(!1),[W,X]=(0,e.useState)(""),[Y,Z]=(0,e.useState)(!1),[$,_]=(0,e.useState)(!1),[aa,ab]=(0,e.useState)(!1),[ac,ad]=(0,e.useState)(null),[ae,af]=(0,e.useState)({}),[ag,ah]=(0,e.useState)([]),[ai,aj]=(0,e.useState)(!1),[ak,al]=(0,e.useState)({}),[am,an]=(0,e.useState)(""),[ao,ap]=(0,e.useState)(()=>new Set),[aq,ar]=(0,e.useState)(!1),[as,at]=(0,e.useState)(null),[au,av]=(0,e.useState)(""),[aw,ax]=(0,e.useState)("auto"),[ay,az]=(0,e.useState)({enabled:!1,connections:{}}),[aA,aB]=(0,e.useState)([]),[aC,aD]=(0,e.useState)([]),[aE,aF]=(0,e.useState)([]),[aG,aH]=(0,e.useState)([]),[aI,aJ]=(0,e.useState)(null),[aK,aL]=(0,e.useState)(!1),[aM,aN]=(0,e.useState)(!1),[aO,aP]=(0,e.useState)(!1),[aQ,aR]=(0,e.useState)(null),[aS,aT]=(0,e.useState)({}),[aU,aV]=(0,e.useState)(null),aW=(0,e.useRef)(!1),[aX,aY]=(0,e.useState)(!1),[aZ,a$]=(0,e.useState)(""),[a_,a0]=(0,e.useState)(!1),[a1,a2]=(0,e.useState)({}),{copied:a3,copy:a4}=(0,u.C)(),a5=()=>{N(!0)},a6=()=>{bb?a5():(X(""),V(!0))},a7=()=>{X(""),V(!0)},a8=()=>{bb?a6():a7()},a9=G?{id:G.id,name:G.name||("anthropic-compatible"===G.type?"Anthropic Compatible":"OpenAI Compatible"),color:"anthropic-compatible"===G.type?"#D97757":"#10A37F",textIcon:"anthropic-compatible"===G.type?"AC":"OC",apiType:G.apiType,baseUrl:G.baseUrl,type:G.type}:k.zN[o]||k.fg[o]||k.IS[o]||k.nJ[o]||k.br[o],ba=a9?.authModes||[],bb=!!k.zN[o]||!!k.IS[o]||ba.includes("oauth"),bc=!!k.fg[o]||ba.includes("apikey"),bd=!!k.IS[o]?.noAuth,be=(0,l.KC)(o),bf=(()=>{let a=new Map(be.map(a=>[a.id,a]));for(let b of aC)b?.id&&a.set(b.id,{...a.get(b.id),...b});return[...a.values()]})(),bg=(0,k.wG)(o),bh=(0,k.mq)(o),bi=(0,k.gb)(o),bj=bh||bi,bk=!bj&&bb&&bc,bl="xai"===o?"Grok Build OAuth":"OAuth",bm="xai"===o?"xAI API Key":"API Key",bn=a=>{if(!aw||"auto"===aw)return null;let b=t(o,a);return b&&b.includes(aw)?aw:null},bo=(()=>{let a=new Set;for(let b of bf){let c=t(o,b.id);c&&c.forEach(b=>{"none"!==b&&a.add(b)})}return a.size?["auto",...a]:null})(),bp=bj?o:bg,bq=bj?G?.prefix||o:bg,br=(0,e.useCallback)(async()=>{try{let a=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(bp)}`,{cache:"no-store"}),b=await a.json();a.ok&&aH(b.ids||[])}catch(a){(0,D.s)("Error fetching disabled models:",a)}},[bp]),bs=async a=>{try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:bp,ids:[a]})})).ok&&await br()}catch(a){(0,D.s)("Error disabling model:",a)}},bt=async a=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(bp)}&id=${encodeURIComponent(a)}`,{method:"DELETE"})).ok&&await br()}catch(a){(0,D.s)("Error enabling model:",a)}},bu=async a=>{a.length&&aJ({title:"Disable All Models",message:`Disable all ${a.length} model(s)?`,onConfirm:async()=>{aJ(null);try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:bp,ids:a})})).ok&&await br()}catch(a){(0,D.s)("Error disabling all models:",a)}}})},bv=async()=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(bp)}`,{method:"DELETE"})).ok&&await br()}catch(a){(0,D.s)("Error enabling all models:",a)}},bw=(0,e.useCallback)(async()=>{try{let a=await fetch("/api/models/alias"),b=await a.json();a.ok&&af(b.aliases||{})}catch(a){(0,D.s)("Error fetching aliases:",a)}},[]),bx=(0,e.useCallback)(async()=>{try{let a=await fetch("/api/models/custom",{cache:"no-store"}),b=await a.json();a.ok&&ah(b.models||[])}catch(a){(0,D.s)("Error fetching custom models:",a)}},[]),by=(0,e.useCallback)(async()=>{try{let[a,b,c]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/provider-nodes",{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"})]),d=await a.json(),e=await b.json(),f=c.ok?await c.json():{};if(a.ok){let a=(d.connections||[]).filter(a=>a.provider===o);r(a)}let g=(f.providerStrategies||{})[o]||{};at(g.fallbackStrategy||null),av(null!=g.stickyRoundRobinLimit?String(g.stickyRoundRobinLimit):"1");let h=(f.providerThinking||{})[o]||{};ax(h.mode||"auto");let i=R[o],j=i&&f[i]||{};if(az({enabled:!0===j.enabled,connections:j.connections||{}}),b.ok){let a=(e.nodes||[]).find(a=>a.id===o)||null;if(!a&&bj)for(let b=0;b<3;b+=1){await new Promise(a=>setTimeout(a,150));let b=await fetch("/api/provider-nodes",{cache:"no-store"});if(b.ok&&(a=((await b.json()).nodes||[]).find(a=>a.id===o)||null))break}H(a)}}catch(a){(0,D.s)("Error fetching connections:",a)}finally{E(!1)}},[o,bj]),bz=async a=>{try{let b=await fetch(`/api/provider-nodes/${o}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}),c=await b.json();b.ok&&(H(c.node),await by(),ab(!1))}catch(a){(0,D.s)("Error updating provider node:",a)}},bA=async(a,b)=>{try{let c=await fetch("/api/settings",{cache:"no-store"}),d=(c.ok?await c.json():{}).providerStrategies||{},e={};a&&(e.fallbackStrategy=a),"round-robin"===a&&""!==b&&(e.stickyRoundRobinLimit=Number(b)||3);let f={...d};0===Object.keys(e).length?delete f[o]:f[o]=e,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:f})})}catch(a){(0,D.s)("Error saving provider strategy:",a)}},bB=async a=>{try{let b=await fetch("/api/settings",{cache:"no-store"}),c={...(b.ok?await b.json():{}).providerThinking||{}};a&&"auto"!==a?c[o]={mode:a}:delete c[o],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerThinking:c})})}catch(a){(0,D.s)("Error saving thinking config:",a)}},bC=async a=>{let b=R[o];if(b){az(a);try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[b]:a})})}catch(a){(0,D.s)("Error saving auto-ping config:",a)}}},bD=async(a,b,c=bg)=>{let d=`${c}/${a}`;try{let a=await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:d,alias:b})});if(a.ok)await bw();else{let b=await a.json();(0,D.s)(b.error||"Failed to set alias")}}catch(a){(0,D.s)("Error setting alias:",a)}},bE=async a=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(a)}`,{method:"DELETE"})).ok&&await bw()}catch(a){(0,D.s)("Error deleting alias:",a)}},bF=async(a,b="llm",c=bp)=>{try{let d=await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:c,id:a,type:b})});if(d.ok)await bx();else{let a=await d.json();(0,D.s)(a.error||"Failed to add custom model")}}catch(a){(0,D.s)("Error adding custom model:",a)}},bG=async(a,b="llm",c=bp)=>{try{let d=new URLSearchParams({providerAlias:c,id:a,type:b});(await fetch(`/api/models/custom?${d}`,{method:"DELETE"})).ok&&await bx()}catch(a){(0,D.s)("Error deleting custom model:",a)}},bH=async()=>{if(aX)return;let a=q.find(a=>s.includes(a.id)&&!1!==a.isActive)||q.find(a=>!1!==a.isActive);if(!a)return void(0,D.s)((0,w.Tl)("Add an active connection first"));aY(!0),a$("");try{let b=await fetch(`/api/providers/${a.id}/models`),c=await b.json().catch(()=>({}));if(!b.ok)return void(0,D.s)(c.error||(0,w.Tl)("Failed to fetch models"));let d=c.models||[];if(0===d.length)return void(0,D.s)(c.warning||(0,w.Tl)("No models returned"));let e=new Set(bf.map(a=>a.id)),f=[],g=[],h=new Set;for(let a of d){let b=function(a,b){if(null==a)return null;if("string"==typeof a){let c=z(a,b);return c?{id:c,name:c,type:y(c)}:null}let c=a.id||a.name||a.model||a.slug;if(!c)return null;let d=z(c,b);if(!d)return null;let e=a.display_name||a.displayName||a.name||a.title||d;return{id:d,name:String(e),type:y(d,a)}}(a,bp);if(!b)continue;let{id:c,name:d,type:i}=b,j=`${i}|${c}`;if(h.has(j))continue;if(h.add(j),e.has(c)){aG.includes(c)&&g.push(c);continue}if(ag.some(a=>a.providerAlias===bp&&a.id===c&&(a.kind||a.type||"llm")===i))continue;let k=`${bp}/${c}`;Object.values(ae).includes(k)||f.push({providerAlias:bp,id:c,type:i,name:d})}let i=0;if(g.length>0)try{for(let a of g)(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(bp)}&id=${encodeURIComponent(a)}`,{method:"DELETE"})).ok&&(i+=1);await br()}catch{}let j=0;if(f.length>0){let a=await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({models:f})}),b=await a.json().catch(()=>({}));if(!a.ok)return void(0,D.s)(b.error||(0,w.Tl)("Failed to save models"));j=b.added??f.length,await bx()}let k=f.filter(a=>"llm"!==a.type).length,l=[];if(j>0&&l.push(`${j} new`),i>0&&l.push(`${i} re-enabled`),0===l.length)a$((0,w.Tl)("All models already in list"));else{let a=`Imported ${l.join(" \xb7 ")} (${d.length} from provider)`;k>0&&(a+=" \xb7 non-chat types stored for media pages"),c.warning&&(a+=` \xb7 ${c.warning}`),a$(a)}}catch(a){(0,D.s)("Error importing models:",a),(0,D.s)((0,w.Tl)("Error fetching models")+": "+(a?.message||a))}finally{aY(!1)}},bI=async()=>{if(aM||0===q.length)return;let a=Object.fromEntries(q.map(a=>[a.id,{state:"queued",error:null}]));aW.current=!1,aN(!0),aP(!1),aR(null),aT(a),aV({total:q.length,completed:0,passed:0,failed:0,stopped:!1});let b=0,c=0;try{for(let a=0;a<q.length;a+=1){if(aW.current){aV({total:q.length,completed:a,passed:b,failed:c,stopped:!0});break}let d=q[a];aR(d.id),aT(a=>({...a,[d.id]:{state:"testing",error:null}}));try{let a=await fetch(`/api/providers/${d.id}/test`,{method:"POST"}),e=await a.json(),f=!!e.valid;f?b+=1:c+=1,aT(a=>({...a,[d.id]:{state:f?"success":"failed",error:f?null:e.error||null}}))}catch(a){c+=1,aT(b=>({...b,[d.id]:{state:"failed",error:a.message||"Test failed"}}))}aV({total:q.length,completed:a+1,passed:b,failed:c,stopped:!1}),a<q.length-1&&await new Promise(a=>setTimeout(a,1e3))}}finally{aR(null),aN(!1),aP(!1),aW.current=!1}},bJ=async a=>{let b=q.find(b=>b.id===a),c=b?.name?.trim()||b?.email?.trim()||a;aJ({title:"Delete Connection",message:`Delete connection “${c}”?`,onConfirm:async()=>{aJ(null);try{(await fetch(`/api/providers/${a}`,{method:"DELETE"})).ok&&r(b=>b.filter(b=>b.id!==a))}catch(a){(0,D.s)("Error deleting connection:",a)}}})},bK=()=>{by(),N(!1)},bL=async a=>{X("");try{let b=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:o,...a})}),c=null;try{c=await b.json()}catch{c=null}if(b.ok){await by(),V(!1);return}X(c?.error||"Failed to save connection")}catch(a){(0,D.s)("Error saving connection:",a),X("Failed to save connection")}},bM=async a=>{try{(await fetch(`/api/providers/${ac.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})).ok&&(await by(),_(!1))}catch(a){(0,D.s)("Error updating connection:",a)}},bN=async(a,b)=>{try{(await fetch(`/api/providers/${a}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:b})})).ok&&r(c=>c.map(c=>c.id===a?{...c,isActive:b}:c))}catch(a){(0,D.s)("Error updating connection status:",a)}},bO=async(a,b)=>{let c=[...q];[c[a],c[b]]=[c[b],c[a]],r(c);try{await Promise.all([fetch(`/api/providers/${c[a].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:a})}),fetch(`/api/providers/${c[b].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:b})})])}catch(a){(0,D.s)("Error swapping priority:",a),await by()}},bP=q.length>0&&s.length===q.length,bQ=(0,d.jsx)("div",{className:"flex min-w-0 flex-col divide-y divide-black/[0.03] dark:divide-white/[0.03]",children:q.map((a,b)=>(0,d.jsxs)("div",{className:"flex min-w-0 items-stretch",children:[(0,d.jsx)("div",{className:"flex shrink-0 items-center pl-1 sm:pl-2",children:(0,d.jsx)("input",{type:"checkbox",checked:s.includes(a.id),onChange:()=>{var b;return b=a.id,void A(a=>a.includes(b)?a.filter(a=>a!==b):[...a,b])},className:"h-4 w-4 rounded border-gray-300 text-primary focus:ring-primary"})}),(0,d.jsx)("div",{className:"flex-1 min-w-0",children:(0,d.jsx)(I,{connection:a,isOAuth:bb,isFirst:0===b,isLast:b===q.length-1,onMoveUp:()=>bO(b,b-1),onMoveDown:()=>bO(b,b+1),onToggleActive:b=>bN(a.id,b),autoPing:R[o]&&"oauth"===a.authType?{on:!0===ay.connections[a.id],onToggle:b=>{var c;return c=a.id,void bC({...ay,connections:{...ay.connections,[c]:b}})},provider:o}:null,onEdit:()=>{ad(a),_(!0)},onDelete:()=>bJ(a.id),oneByOneStatus:aS[a.id]||null})})]},a.id))}),bR=async a=>{if(!ao.has(a)){ap(b=>new Set(b).add(a));try{let b=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${bp}/${a}`})}),c=await b.json();al(b=>({...b,[a]:c.ok?"ok":"error"})),an(c.ok?"":c.error||"Model not reachable")}catch{al(b=>({...b,[a]:"error"})),an("Network error")}finally{ap(b=>{let c=new Set(b);return c.delete(a),c})}}};return B?(0,d.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,d.jsx)(j.Qv,{}),(0,d.jsx)(j.Qv,{})]}):a9?(0,d.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:gap-8 sm:px-0",children:[(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)(h(),{href:"/dashboard/providers",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,d.jsxs)("div",{className:"flex min-w-0 items-center gap-3 sm:gap-4",children:[(0,d.jsx)("div",{className:"flex size-12 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${a9.color}15`},children:ai?(0,d.jsx)("span",{className:"text-sm font-bold",style:{color:a9.color},children:a9.textIcon||a9.id.slice(0,2).toUpperCase()}):(0,d.jsx)(i.default,{src:bh&&a9.apiType?"responses"===a9.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":bi?"/providers/anthropic-m.png":`/providers/${a9.id}.png`,alt:a9.name,width:48,height:48,className:"max-h-12 max-w-12 rounded-lg object-contain",sizes:"48px",onError:()=>aj(!0)})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,d.jsx)("h1",{className:"truncate text-2xl font-semibold tracking-tight sm:text-3xl",children:a9.name}),(a9.notice?.apiKeyUrl||a9.notice?.signupUrl||a9.website)&&(0,d.jsxs)("a",{href:a9.notice?.apiKeyUrl||a9.notice?.signupUrl||a9.website,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),a9.notice?.apiKeyUrl?"Get API Key":"Sign up / Learn more"]})]}),(0,d.jsxs)("p",{className:"text-text-muted",children:[q.length," connection",1===q.length?"":"s"]})]})]})]}),a9.deprecated&&(0,d.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,d.jsx)("span",{className:"material-symbols-outlined text-[16px] text-yellow-500 mt-0.5 shrink-0",children:"warning"}),(0,d.jsx)("p",{className:"text-xs text-red-600 dark:text-yellow-400 leading-relaxed",children:a9.deprecationNotice})]}),a9.notice?.text&&!a9.deprecated&&(0,d.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,d.jsx)("span",{className:"material-symbols-outlined text-[16px] text-blue-500 shrink-0",children:"info"}),(0,d.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:a9.notice.text}),a9.notice.apiKeyUrl&&(0,d.jsx)("a",{href:a9.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:"Get API Key →"})]}),bj&&G&&(0,d.jsx)(j.Zp,{children:(0,d.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold",children:bi?"Anthropic Compatible Details":"OpenAI Compatible Details"}),(0,d.jsxs)("p",{className:"break-all text-sm text-text-muted",children:[bi?"Messages API":"responses"===G.apiType?"Responses API":"Chat Completions"," \xb7 ",(G.baseUrl||"").replace(/\/$/,""),"/",bi?"messages":"responses"===G.apiType?"responses":"chat/completions"]})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,d.jsx)(j.$n,{size:"sm",icon:"add",onClick:()=>{X(""),V(!0)},className:"w-full sm:w-auto",children:"Add API Key"}),(0,d.jsx)(j.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>ab(!0),className:"w-full sm:w-auto",children:"Edit"}),(0,d.jsx)(j.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:async()=>{aJ({title:"Delete Compatible Node",message:`Delete this ${bi?"Anthropic":"OpenAI"} Compatible node?`,onConfirm:async()=>{aJ(null);try{(await fetch(`/api/provider-nodes/${o}`,{method:"DELETE"})).ok&&n.push("/dashboard/providers")}catch(a){(0,D.s)("Error deleting provider node:",a)}}})},className:"w-full sm:w-auto",children:"Delete"})]})]})}),bd?(0,d.jsx)(j.gw,{providerId:o}):(0,d.jsxs)(j.Zp,{children:[(0,d.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold",children:"Connections"}),(0,d.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:[q.length>0&&(0,d.jsxs)(d.Fragment,{children:[s.length>0&&(0,d.jsxs)(j.$n,{size:"sm",variant:"danger",icon:"delete",onClick:()=>{let a=s.length;0!==a&&aJ({title:`Delete ${a} Connection${a>1?"s":""}`,message:`Delete ${a} connection${a>1?"s":""}? This cannot be undone.`,onConfirm:async()=>{aJ(null);let a=0,b=[...s];for(let c of b)try{(await fetch(`/api/providers/${c}`,{method:"DELETE"})).ok||(a+=1)}catch(b){(0,D.s)("Error deleting connection:",b),a+=1}r(a=>a.filter(a=>!b.includes(a.id))),A([]),a>0&&(0,D.s)(`Deleted ${b.length-a} connection(s), ${a} failed.`)}})},children:["Delete Selected (",s.length,")"]}),(0,d.jsx)(j.$n,{size:"sm",variant:"secondary",icon:"sync",onClick:bI,disabled:aM,children:aM?"Testing Connection One-by-One...":"Test Connection One-by-One"}),aM&&(0,d.jsx)(j.$n,{size:"sm",variant:"ghost",icon:"stop",onClick:()=>{aM&&(aW.current=!0,aP(!0))},disabled:aO,children:aO?"Stopping...":"Stop"})]}),(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,d.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Round Robin"}),(0,d.jsx)(j.lM,{checked:"round-robin"===as,onChange:a=>{let b=a?"round-robin":null,c=a?au||"1":au;a&&!au&&av("1"),at(b),bA(b,c)}}),"round-robin"===as&&(0,d.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,d.jsx)("span",{className:"text-xs text-text-muted",children:"Sticky:"}),(0,d.jsx)("input",{type:"number",min:1,value:au,onChange:a=>{var b;av(b=a.target.value),bA("round-robin",b)},placeholder:"1",className:"w-14 px-2 py-1 text-xs border border-border rounded-md bg-background focus:outline-none focus:border-primary"})]})]})]})]}),0===q.length?(0,d.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("div",{className:"inline-flex items-center justify-center w-9 h-9 rounded-full bg-primary/10 text-primary shrink-0",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:bb?"lock":"key"})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"}),bk&&(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:["Choose ",bl," or ",bm,"."]})]})]}),(0,d.jsx)("div",{className:"flex gap-2",children:bk?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(j.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:a6,children:bl}),(0,d.jsx)(j.$n,{size:"sm",icon:"key",onClick:a7,children:bm})]}):(0,d.jsxs)(d.Fragment,{children:[!bj&&"iflow"===o&&(0,d.jsx)(j.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>T(!0),children:"Cookie"}),"codex"===o&&(0,d.jsx)(j.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>Z(!0),children:(0,w.Tl)("Bulk Add")}),(0,d.jsx)(j.$n,{size:"sm",icon:"add",onClick:a8,children:bj?"Add API Key":"iflow"===o?"OAuth":"Add Connection"})]})})]}):(0,d.jsxs)(d.Fragment,{children:[aU&&(0,d.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,d.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,d.jsxs)("span",{children:["Total: ",aU.total]}),(0,d.jsxs)("span",{children:["Completed: ",aU.completed]}),(0,d.jsxs)("span",{children:["Passed: ",aU.passed]}),(0,d.jsxs)("span",{children:["Failed: ",aU.failed]}),aU.stopped&&(0,d.jsx)("span",{className:"text-amber-600 dark:text-amber-400",children:"Stopped"}),aM&&aQ&&(0,d.jsxs)("span",{children:["Running: ",q.find(a=>a.id===aQ)?.name||aQ]})]})}),q.length>0&&(0,d.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,d.jsxs)("label",{className:"flex cursor-pointer items-center gap-1.5 text-xs text-text-muted hover:text-primary",children:[(0,d.jsx)("input",{type:"checkbox",checked:bP,onChange:()=>{bP?A([]):A(q.map(a=>a.id))},className:"h-3.5 w-3.5 rounded border-gray-300 text-primary focus:ring-primary"}),"Select All"]})}),bQ,!bj&&(0,d.jsxs)("div",{className:"mt-4 grid grid-cols-1 gap-2 sm:flex",children:["iflow"===o&&(0,d.jsx)(j.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>T(!0),title:"Add connection using browser cookie",className:"w-full sm:w-auto",children:"Cookie"}),"codex"===o&&(0,d.jsx)(j.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>Z(!0),title:(0,w.Tl)("Bulk import codex accounts from JSON"),className:"w-full sm:w-auto",children:(0,w.Tl)("Bulk Add")}),bk?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(j.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:a6,className:"w-full sm:w-auto",children:bl}),(0,d.jsx)(j.$n,{size:"sm",icon:"key",onClick:a7,className:"w-full sm:w-auto",children:bm})]}):(0,d.jsx)(j.$n,{size:"sm",icon:"add",onClick:a8,className:"w-full sm:w-auto",children:"Add"})]})]})]}),(0,d.jsxs)(j.Zp,{children:[(0,d.jsxs)("div",{className:"mb-4 flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold",children:"Available Models"}),bo&&(0,d.jsx)("select",{value:aw,onChange:a=>{var b;ax(b=a.target.value),bB(b)},title:"Appends (level) suffix to copied model names",className:"rounded-md border border-border bg-background px-2 py-1 text-xs focus:border-primary focus:outline-none",children:bo.map(a=>(0,d.jsx)("option",{value:a,children:`Thinking: ${a.charAt(0).toUpperCase()+a.slice(1)}`},a))})]}),!bj&&(a=[...bf,...aE.filter(a=>!bf.some(b=>b.id===a.id))].filter(a=>{let b=(0,l.CP)(a);return!b||"llm"===b}).map(a=>a.id).filter(a=>!aG.includes(a)),b=q.some(a=>!1!==a.isActive),(0,d.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,d.jsx)(j.$n,{size:"sm",variant:"secondary",icon:aX?"progress_activity":"cloud_download",onClick:bH,disabled:aX||!b,title:b?"Import models from the active connection":"Add an active connection to import models",children:aX?"Importing...":"Import models"}),b&&(0,d.jsx)(j.$n,{size:"sm",variant:"secondary",icon:"science",onClick:()=>a0(a=>!a),children:a_?"Hide verify":"Verify models"}),aG.length>0&&(0,d.jsx)(j.$n,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:bv,children:"Active All"}),a.length>0&&(0,d.jsx)(j.$n,{size:"sm",variant:"secondary",icon:"block",onClick:()=>bu(a),children:"Disable All"})]}))]}),!!am&&(0,d.jsx)("p",{className:"text-xs text-red-500 mb-3 break-words",children:am}),aZ&&(0,d.jsx)("p",{className:"text-xs text-text-muted mb-3",children:aZ}),a_&&(c=q.find(a=>s.includes(a.id)&&!1!==a.isActive)||q.find(a=>!1!==a.isActive),g=[...x({customModels:ag,modelAliases:ae,providerAlias:bp,builtInModels:bf,type:"llm"}).map(a=>({id:a.id,name:a.name||a.id,kind:"llm"})),...bf.filter(a=>{let b=(0,l.CP)(a);return(!b||"llm"===b)&&!aG.includes(a.id)}).map(a=>({id:a.id,name:a.name||a.id,kind:"llm"}))],(0,d.jsx)(P,{connectionId:c?.id,providerAlias:bp,models:g,onClose:()=>a0(!1),onLatencyMap:a=>a2(b=>({...b,...a})),onComplete:async a=>{a?.removed>0&&await bx()}})),(()=>{let a,b,c;if(bj)return(0,d.jsx)(F,{providerStorageAlias:bp,providerDisplayAlias:bq,modelAliases:ae,customModels:ag,copied:a3,onCopy:a4,onSetAlias:bD,onDeleteAlias:bE,onAddCustomModel:a=>bF(a,"llm",bp),onDeleteCustomModel:a=>bG(a,"llm",bp),onRefreshModels:bx,connections:q,isAnthropic:bi});let e=[...bf,...aE.filter(a=>!bf.some(b=>b.id===a.id))].filter(a=>{let b=(0,l.CP)(a);return!b||"llm"===b}),f=new Set(aG),g=e.filter(a=>!f.has(a.id)),h=e.filter(a=>f.has(a.id)),i=x({customModels:ag,modelAliases:ae,providerAlias:bp,builtInModels:bf,type:"llm"});return(0,d.jsxs)("div",{className:"flex flex-wrap gap-3",children:[i.map(a=>(0,d.jsx)(C,{model:{id:a.id,name:a.name},fullModel:`${bq}/${a.id}`,alias:a.alias,copied:a3,onCopy:a4,onSetAlias:()=>{},onDeleteAlias:()=>{"custom"===a.source?bG(a.id,"llm",bp):bE(a.alias)},testStatus:ak[a.id],onTest:q.length>0||bd?()=>bR(a.id):void 0,isTesting:ao.has(a.id),isCustom:!0,isFree:!1,caps:p(`${o}/${a.id}`),thinkingSuffix:bn(a.id),latencyMs:a1[a.id]??a1[Q(a.id,bp)]},`${a.source}-${a.fullModel}`)),g.map(a=>{let b=`${bp}/${a.id}`,c=`${o}/${a.id}`,e=Object.entries(ae).find(([,a])=>a===b||a===c)?.[0];return(0,d.jsx)(C,{model:a,fullModel:`${bq}/${a.id}`,alias:e,copied:a3,onSetAlias:b=>bD(a.id,b,bp),onCopy:a4,onDeleteAlias:()=>bE(e),testStatus:ak[a.id],onTest:q.length>0||bd?()=>bR(a.id):void 0,isTesting:ao.has(a.id),isFree:a.isFree,onDisable:()=>bs(a.id),caps:p(`${o}/${a.id}`),thinkingSuffix:bn(a.id),latencyMs:a1[a.id]??a1[Q(a.id,bp)]},a.id)}),(0,d.jsxs)("button",{onClick:()=>ar(!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,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]}),aA.length>0&&(a=new Set([...Object.values(ae),...i.map(a=>a.fullModel)]),b=new Set(bf.map(a=>a.id)),0===(c=aA.filter(c=>!a.has(`${bp}/${c.id}`)&&!b.has(c.id))).length?null:(0,d.jsxs)("div",{className:"w-full mt-2",children:[(0,d.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"Suggested free models (≥200k context):"}),(0,d.jsx)("div",{className:"flex flex-wrap gap-2",children:c.map(a=>(0,d.jsxs)("button",{onClick:async()=>{await bF(a.id,"llm",bp)},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:`${a.name} \xb7 ${(a.contextLength/1e3).toFixed(0)}k ctx`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),a.id.split("/").pop()]},a.id))})]})),h.length>0&&(0,d.jsxs)("div",{className:"w-full mt-2",children:[(0,d.jsxs)("p",{className:"text-xs text-text-muted mb-2",children:["Disabled models (",h.length,"):"]}),(0,d.jsx)("div",{className:"flex flex-wrap gap-2",children:h.map(a=>(0,d.jsxs)("button",{onClick:()=>bt(a.id),className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-dashed 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:"Restore model",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),a.id]},a.id))})]})]})})()]}),"kiro"===o?(0,d.jsx)(j.Mh,{isOpen:J,providerInfo:a9,onSuccess:bK,onClose:()=>N(!1)}):"cursor"===o?(0,d.jsx)(j.G9,{isOpen:J,onSuccess:bK,onClose:()=>N(!1)}):"gitlab"===o?(0,d.jsx)(j.vj,{isOpen:J,providerInfo:a9,onSuccess:bK,onClose:()=>N(!1)}):(0,d.jsx)(j.LF,{isOpen:J,provider:o,providerInfo:a9,onSuccess:bK,onClose:()=>N(!1)}),"iflow"===o&&(0,d.jsx)(j.vE,{isOpen:S,onSuccess:()=>{by(),T(!1)},onClose:()=>T(!1)}),(0,d.jsx)(K,{isOpen:U,provider:o,providerName:a9.name,isCompatible:bj,isAnthropic:bi,authType:a9?.authType,authHint:a9?.authHint,website:a9?.website,error:W,onSave:bL,onBulkDone:by,onClose:()=>{X(""),V(!1)}}),(0,d.jsx)(j.wI,{isOpen:$,connection:ac,onSave:bM,onClose:()=>_(!1)}),bj&&(0,d.jsx)(L,{isOpen:aa,node:G,onSave:bz,onClose:()=>ab(!1),isAnthropic:bi}),!bj&&(0,d.jsx)(M,{isOpen:aq,providerAlias:bp,providerDisplayAlias:bq,onSave:async a=>{await bF(a,"llm",bp),ar(!1)},onClose:()=>ar(!1)}),"codex"===o&&(0,d.jsx)(O,{isOpen:Y,onClose:()=>Z(!1),onSuccess:by}),(0,d.jsx)(j.uo,{isOpen:aK,onClose:()=>aL(!1),onConfirm:()=>{(aL(!1),bb)?a5():a7()},title:"Risk Notice",message:a9?.deprecationNotice,confirmText:"I Understand, Continue",cancelText:"Cancel",variant:"danger"}),(0,d.jsx)(j.uo,{isOpen:!!aI,onClose:()=>aJ(null),onConfirm:aI?.onConfirm,title:aI?.title||"Confirm",message:aI?.message,variant:"danger"})]}):(0,d.jsxs)("div",{className:"text-center py-20",children:[(0,d.jsx)("p",{className:"text-text-muted",children:"Provider not found"}),(0,d.jsx)(h(),{href:"/dashboard/providers",className:"text-primary mt-4 inline-block",children:"Back to Providers"})]})}},28354:a=>{"use strict";a.exports=require("util")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},35088:(a,b,c)=>{"use strict";c.r(b),c.d(b,{__next_app__:()=>O,handler:()=>Q,routeModule:()=>P});var d=c(7553),e=c(84006),f=c(67798),g=c(34775),h=c(99373),i=c(73461),j=c(1020),k=c(26349),l=c(54365),m=c(16023),n=c(14965),o=c(63747),p=c(24235),q=c(23938),r=c(261),s=c(66758),t=c(77243),u=c(26713),v=c(37527),w=c(22820),x=c(88216),y=c(47929),z=c(79551),A=c(71797),B=c(89125),C=c(86439),D=c(77068),E=c(27269),F=c(37525),G=c(61287),H=c(81494),I=c(70722),J=c(70753),K=c(43954),L=c(17891),M={};for(let a in G)0>["default","__next_app__","routeModule","handler"].indexOf(a)&&(M[a]=()=>G[a]);c.d(b,M);let N={children:["",{children:["(dashboard)",{children:["dashboard",{children:["providers",{children:["[id]",{children:["__PAGE__",{},{page:[()=>Promise.resolve().then(c.bind(c,93110)),"/home/runner/work/switchboard-router/switchboard-router/src/app/(dashboard)/dashboard/providers/[id]/page.js"]}]},{"global-error":[()=>Promise.resolve().then(c.t.bind(c,95547,23)),"next/dist/client/components/builtin/global-error.js"]},["new"]]},{"global-error":[()=>Promise.resolve().then(c.t.bind(c,95547,23)),"next/dist/client/components/builtin/global-error.js"]},[]]},{"global-error":[()=>Promise.resolve().then(c.t.bind(c,95547,23)),"next/dist/client/components/builtin/global-error.js"]},[]]},{layout:[()=>Promise.resolve().then(c.bind(c,30508)),"/home/runner/work/switchboard-router/switchboard-router/src/app/(dashboard)/layout.js"],"global-error":[()=>Promise.resolve().then(c.t.bind(c,95547,23)),"next/dist/client/components/builtin/global-error.js"],"not-found":[()=>Promise.resolve().then(c.t.bind(c,55091,23)),"next/dist/client/components/builtin/not-found.js"],forbidden:[()=>Promise.resolve().then(c.t.bind(c,45270,23)),"next/dist/client/components/builtin/forbidden.js"],unauthorized:[()=>Promise.resolve().then(c.t.bind(c,28193,23)),"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await Promise.resolve().then(c.bind(c,70440))).default(a)],apple:[],openGraph:[],twitter:[],manifest:"/manifest.webmanifest"}},[]]},{layout:[()=>Promise.resolve().then(c.bind(c,32059)),"/home/runner/work/switchboard-router/switchboard-router/src/app/layout.js"],"global-error":[()=>Promise.resolve().then(c.t.bind(c,95547,23)),"next/dist/client/components/builtin/global-error.js"],"not-found":[()=>Promise.resolve().then(c.t.bind(c,55091,23)),"next/dist/client/components/builtin/not-found.js"],forbidden:[()=>Promise.resolve().then(c.t.bind(c,45270,23)),"next/dist/client/components/builtin/forbidden.js"],unauthorized:[()=>Promise.resolve().then(c.t.bind(c,28193,23)),"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await Promise.resolve().then(c.bind(c,70440))).default(a)],apple:[],openGraph:[],twitter:[],manifest:"/manifest.webmanifest"}},[]]}.children,O={require:c,loadChunk:()=>Promise.resolve()},P=new d.AppPageRouteModule({definition:{kind:e.RouteKind.APP_PAGE,page:"/(dashboard)/dashboard/providers/[id]/page",pathname:"/dashboard/providers/[id]",bundlePath:"",filename:"",appPaths:[]},userland:{loaderTree:N},distDir:".next-cli-build",relativeProjectDir:""});async function Q(a,b,d){var M,R,S,T,U;d.requestMeta&&(0,h.setRequestMeta)(a,d.requestMeta),P.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let V=!!(0,h.getRequestMeta)(a,"minimalMode"),W="/(dashboard)/dashboard/providers/[id]/page";"/index"===W&&(W="/");let X=await P.prepare(a,b,{srcPage:W,multiZoneDraftMode:!1});if(!X)return b.statusCode=400,b.end("Bad Request"),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;let{buildId:Y,query:Z,params:$,pageIsDynamic:_,buildManifest:aa,nextFontManifest:ab,reactLoadableManifest:ac,serverActionsManifest:ad,clientReferenceManifest:ae,subresourceIntegrityManifest:af,prerenderManifest:ag,isDraftMode:ah,resolvedPathname:ai,revalidateOnlyGenerated:aj,routerServerContext:ak,nextConfig:al,parsedUrl:am,interceptionRoutePatterns:an,deploymentId:ao,clientAssetToken:ap}=X,aq=(0,r.normalizeAppPath)(W),{isOnDemandRevalidate:ar}=X,as=al.experimental.ppr&&!al.cacheComponents&&(0,K.isInterceptionRouteAppPath)(ai)?null:P.match(ai,ag),at=(null==as?void 0:as.route)??null,au=!!ag.routes[ai],av=a.headers["user-agent"]||"",aw=(0,u.getBotType)(av),ax=(0,q.isHtmlBotRequest)(a),ay=(0,h.getRequestMeta)(a,"isPrefetchRSCRequest")??"1"===a.headers[t.NEXT_ROUTER_PREFETCH_HEADER],az=(0,h.getRequestMeta)(a,"isRSCRequest")??(0,n.f)(a.headers[t.RSC_HEADER]),aA=(0,s.getIsPossibleServerAction)(a),aB=(0,m.checkIsAppPPREnabled)(al.experimental.ppr),aC=a.headers[y.NEXT_RESUME_STATE_LENGTH_HEADER];if(!(0,h.getRequestMeta)(a,"postponed")&&V&&aB&&aA&&aC&&"string"==typeof aC){let e=parseInt(aC,10),{maxPostponedStateSize:f,maxPostponedStateSizeBytes:g}=(0,E.getMaxPostponedStateSize)(al.experimental.maxPostponedStateSize);if(!isNaN(e)&&e>0){if(e>g)return b.statusCode=413,b.end((0,E.getPostponedStateExceededErrorMessage)(f)),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;let i="1 MB",j=(null==(U=al.experimental.serverActions)?void 0:U.bodySizeLimit)??i,k=e+(j!==i?c(95726).parse(j):1048576),l=await (0,E.readBodyWithSizeLimit)(a,k);if(null===l)return b.statusCode=413,b.end("Request body exceeded limit. To configure the body size limit for Server Actions, see: https://nextjs.org/docs/app/api-reference/next-config-js/serverActions#bodysizelimit"),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;if(l.length>=e){let b=l.subarray(0,e).toString("utf8");(0,h.addRequestMeta)(a,"postponed",b);let c=l.subarray(e);(0,h.addRequestMeta)(a,"actionBody",c)}else throw Object.defineProperty(Error(`invariant: expected ${e} bytes of postponed state but only received ${l.length} bytes`),"__NEXT_ERROR_CODE",{value:"E979",enumerable:!1,configurable:!0})}}if(!(0,h.getRequestMeta)(a,"postponed")&&aB&&"1"===a.headers[y.NEXT_RESUME_HEADER]&&"POST"===a.method){let{maxPostponedStateSize:c,maxPostponedStateSizeBytes:e}=(0,E.getMaxPostponedStateSize)(al.experimental.maxPostponedStateSize),f=await (0,E.readBodyWithSizeLimit)(a,e);if(null===f)return b.statusCode=413,b.end((0,E.getPostponedStateExceededErrorMessage)(c)),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;let g=f.toString("utf8");(0,h.addRequestMeta)(a,"postponed",g)}let aD=!0===P.isDev||!0===al.experimental.exposeTestingApiInProductionBuild,aE=aD&&("1"===a.headers[t.NEXT_INSTANT_PREFETCH_HEADER]||!(0,n.f)(a.headers[t.RSC_HEADER])&&"string"==typeof a.headers.cookie&&a.headers.cookie.includes(t.NEXT_INSTANT_TEST_COOKIE+"=")),aF=(aB||aE)&&((null==(M=ag.routes[aq]??ag.dynamicRoutes[aq])?void 0:M.renderingMode)==="PARTIALLY_STATIC"||aE&&(aD||(null==ak?void 0:ak.experimentalTestProxy)===!0)),aG=aE&&aF,aH=aG&&!0===P.isDev,aI=!1,aJ=aF?(0,h.getRequestMeta)(a,"postponed"):void 0,aK=null==(R=ag.routes[ai])?void 0:R.prefetchDataRoute,aL=aF&&az&&!ay&&!aK;V&&(aL=aL&&!!aJ);let aM=(0,h.getRequestMeta)(a,"segmentPrefetchRSCRequest"),aN=(!aw||!aF)&&(!av||(0,q.shouldServeStreamingMetadata)(av,al.htmlLimitedBots)),aO=!!((at||au||ag.routes[aq])&&!(aw&&aF)),aP=aF&&!0===al.cacheComponents,aQ=!0===P.isDev||!aO||"string"==typeof aJ||(aP&&(0,h.getRequestMeta)(a,"onCacheEntryV2")?aL&&!V:aL),aR=!!aw&&aF,aS=(null==at?void 0:at.remainingPrerenderableParams)??[],aT=(null==at?void 0:at.fallback)===null&&((null==(S=at.fallbackRootParams)?void 0:S.length)??0)>0,aU=null;if(!ah&&aO&&!aQ&&!aA&&!aJ&&!aL){let a=as?"string"==typeof(null==at?void 0:at.fallback)?at.fallback:as.source:null;if(!0===al.experimental.partialFallbacks&&a&&(null==at?void 0:at.fallbackRouteParams)&&!aT){if(aS.length>0){let b,c=(b=new Map(aS.map(a=>[a.paramName,a])),a.split("/").map(a=>{let c=(0,L.getSegmentParam)(a);if(!c)return a;let d=b.get(c.paramName);if(!d)return a;let e=null==$?void 0:$[d.paramName];if(!e)return a;let f=Array.isArray(e)?e.map(a=>encodeURIComponent(a)).join("/"):encodeURIComponent(e);return a.replace((0,o.buildDynamicSegmentPlaceholder)(d),f)}).join("/")||"/");aU=c!==a?c:null}}else aU=ai}let aV=aU;!aV&&(P.isDev||aO&&_&&(null==at?void 0:at.fallbackRouteParams)&&!aA)&&(aV=ai),P.isDev||ah||!aO||!az||aL||(0,k.d)(a.headers);let aW={...G,tree:N,handler:Q,routeModule:P,__next_app__:O};ad&&ae&&(0,p.setManifestsSingleton)({page:W,clientReferenceManifest:ae,serverActionsManifest:ad});let aX=a.method||"GET",aY=(0,g.getTracer)(),aZ=aY.getActiveScopeSpan(),a$=!!(null==ak?void 0:ak.isWrappedByNextServer),a_=!0===al.experimental.partialFallbacks&&aS.length>0?(null==at||null==(T=at.fallbackRouteParams)?void 0:T.filter(a=>!aS.some(b=>b.paramName===a.paramName)))??[]:[],a0=async()=>((null==ak?void 0:ak.render404)?await ak.render404(a,b,am,!1):b.end("This page could not be found"),null);try{let k,m=P.getVaryHeader(ai,an);b.setHeader("Vary",m);let n=async(c,d)=>{let e=new l.NodeNextRequest(a),f=new l.NodeNextResponse(b);return P.render(e,f,d).finally(()=>{if(!c)return;c.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let a=aY.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==i.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let d=a.get("next.route");if(d){let a=`${aX} ${d}`;c.setAttributes({"next.route":d,"http.route":d,"next.span_name":a}),c.updateName(a),k&&k!==c&&(k.setAttribute("http.route",d),k.updateName(a))}else c.updateName(`${aX} ${W}`)})},p=(0,h.getRequestMeta)(a,"incrementalCache")||await P.getIncrementalCache(a,al,ag,V);null==p||p.resetRequestCache(),globalThis.__incrementalCache=p;let q=async({span:e,postponed:f,fallbackRouteParams:g,forceStaticRender:i})=>{let k={query:Z,params:$,page:aq,sharedContext:{buildId:Y,deploymentId:ao,clientAssetToken:ap},serverComponentsHmrCache:(0,h.getRequestMeta)(a,"serverComponentsHmrCache"),fallbackRouteParams:g,renderOpts:{App:()=>null,Document:()=>null,pageConfig:{},ComponentMod:aW,Component:(0,j.T)(aW),params:$,routeModule:P,page:W,postponed:f,shouldWaitOnAllReady:aR,serveStreamingMetadata:aN,supportsDynamicResponse:"string"==typeof f||aQ,buildManifest:aa,nextFontManifest:ab,reactLoadableManifest:ac,subresourceIntegrityManifest:af,setCacheStatus:null==ak?void 0:ak.setCacheStatus,setIsrStatus:null==ak?void 0:ak.setIsrStatus,setReactDebugChannel:null==ak?void 0:ak.setReactDebugChannel,sendErrorsToBrowser:null==ak?void 0:ak.sendErrorsToBrowser,dir:c(33873).join(process.cwd(),P.relativeProjectDir),isDraftMode:ah,botType:aw,isOnDemandRevalidate:ar,isPossibleServerAction:aA,assetPrefix:al.assetPrefix,nextConfigOutput:al.output,crossOrigin:al.crossOrigin,trailingSlash:al.trailingSlash,images:al.images,previewProps:ag.preview,enableTainting:al.experimental.taint,htmlLimitedBots:al.htmlLimitedBots,reactMaxHeadersLength:al.reactMaxHeadersLength,multiZoneDraftMode:!1,incrementalCache:p,cacheLifeProfiles:al.cacheLife,basePath:al.basePath,serverActions:al.experimental.serverActions,logServerFunctions:"object"==typeof al.logging&&!!al.logging.serverFunctions,...aG||aH||aI?{isBuildTimePrerendering:!0,supportsDynamicResponse:!1,isStaticGeneration:!0,isDebugDynamicAccesses:aH}:{},cacheComponents:!!al.cacheComponents,experimental:{isRoutePPREnabled:aF,expireTime:al.expireTime,staleTimes:al.experimental.staleTimes,dynamicOnHover:!!al.experimental.dynamicOnHover,optimisticRouting:!!al.experimental.optimisticRouting,inlineCss:!!al.experimental.inlineCss,prefetchInlining:al.experimental.prefetchInlining??!1,authInterrupts:!!al.experimental.authInterrupts,cachedNavigations:!!al.experimental.cachedNavigations,clientTraceMetadata:al.experimental.clientTraceMetadata||[],clientParamParsingOrigins:al.experimental.clientParamParsingOrigins,maxPostponedStateSizeBytes:(0,D.parseMaxPostponedStateSize)(al.experimental.maxPostponedStateSize)},waitUntil:d.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:()=>{},onInstrumentationRequestError:(b,c,d,e)=>P.onRequestError(a,b,d,e,ak),err:(0,h.getRequestMeta)(a,"invokeError")}};i&&(k.renderOpts.supportsDynamicResponse=!1);let l=await n(e,k),{metadata:m}=l,{cacheControl:o,headers:q={},fetchTags:r,fetchMetrics:s}=m;if(r&&(q[y.NEXT_CACHE_TAGS_HEADER]=r),a.fetchMetrics=s,aO&&(null==o?void 0:o.revalidate)===0&&!P.isDev&&!aF){let a=m.staticBailoutInfo,b=Object.defineProperty(Error(`Page changed from static to dynamic at runtime ${ai}${(null==a?void 0:a.description)?`, reason: ${a.description}`:""}
11
+ see more here https://nextjs.org/docs/messages/app-static-to-dynamic-error`),"__NEXT_ERROR_CODE",{value:"E132",enumerable:!1,configurable:!0});if(null==a?void 0:a.stack){let c=a.stack;b.stack=b.message+c.substring(c.indexOf("\n"))}throw b}return{value:{kind:v.CachedRouteKind.APP_PAGE,html:l,headers:q,rscData:m.flightData,postponed:m.postponed,status:m.statusCode,segmentData:m.segmentData},cacheControl:o}},r=async({hasResolved:c,previousCacheEntry:g,isRevalidating:i,span:j,forceStaticRender:k=!1})=>{let l=!1===P.isDev,m=c||b.writableEnded;try{var n;let f;if(ar&&aj&&!g&&!V)return(null==ak?void 0:ak.render404)?await ak.render404(a,b):(b.statusCode=404,b.end("This page could not be found")),null;if(at&&(f=(0,w.parseFallbackField)(at.fallback)),!0===al.experimental.partialFallbacks&&(null==at?void 0:at.fallback)===null&&!aT&&aS.length>0&&(f=w.FallbackMode.PRERENDER),f===w.FallbackMode.PRERENDER&&(0,u.isBot)(av)&&(!aF||ax)&&(f=w.FallbackMode.BLOCKING_STATIC_RENDER),(null==g?void 0:g.isStale)===-1&&(ar=!0),ar&&(f!==w.FallbackMode.NOT_FOUND||g)&&(f=w.FallbackMode.BLOCKING_STATIC_RENDER),!V&&f!==w.FallbackMode.BLOCKING_STATIC_RENDER&&aV&&!m&&!ah&&_&&(l||!au)){if((l||at)&&f===w.FallbackMode.NOT_FOUND){if(al.adapterPath)return await a0();throw new C.NoFallbackError}if(aF&&(al.cacheComponents?!aL:!az)){let b=l&&"string"==typeof(null==at?void 0:at.fallback)?at.fallback:aq,f=(l||aG)&&(null==at?void 0:at.fallbackRouteParams)?(0,o.createOpaqueFallbackRouteParams)(at.fallbackRouteParams):aI?(0,o.getFallbackRouteParams)(aq,P):null;aG&&f&&(0,h.addRequestMeta)(a,"fallbackParams",f);let g=await P.handleResponse({cacheKey:b,req:a,nextConfig:al,routeKind:e.RouteKind.APP_PAGE,isFallback:!0,prerenderManifest:ag,isRoutePPREnabled:aF,responseGenerator:async()=>q({span:j,postponed:void 0,fallbackRouteParams:f,forceStaticRender:!0}),waitUntil:d.waitUntil,isMinimalMode:V});if(null===g)return null;if(g)return V||!aF||!(aS.length>0)||!0!==al.experimental.partialFallbacks||!aU||!p||ar||aI||aD||aE||ay||(0,J.scheduleOnNextTick)(async()=>{let b=P.getResponseCache(a);try{await b.revalidate(aU,p,aF,!1,a=>q({span:a.span,postponed:void 0,fallbackRouteParams:a_.length>0?(0,o.createOpaqueFallbackRouteParams)(a_):null,forceStaticRender:!0}),null,c,d.waitUntil)}catch(a){console.error("Error revalidating the page in the background",a)}}),delete g.cacheControl,g}}let s=ar||i||!aJ?void 0:aJ;if(aP&&!V&&p&&(aL||aA)&&!k){let b=await p.get(ai,{kind:v.IncrementalCacheKind.APP_PAGE,isRoutePPREnabled:!0,isFallback:!1});b&&b.value&&b.value.kind===v.CachedRouteKind.APP_PAGE&&(s=b.value.postponed,b&&(-1===b.isStale||!0===b.isStale)&&(0,J.scheduleOnNextTick)(async()=>{let b=P.getResponseCache(a);try{await b.revalidate(ai,p,aF,!1,a=>r({...a,forceStaticRender:!0}),null,c,d.waitUntil)}catch(a){console.error("Error revalidating the page in the background",a)}}))}if((aG||aH)&&void 0!==s)return{cacheControl:{revalidate:1,expire:void 0},value:{kind:v.CachedRouteKind.PAGES,html:x.default.EMPTY,pageData:{},headers:void 0,status:void 0}};let t=!P.isDev&&_&&(null==at?void 0:at.fallbackRouteParams)?(0,o.getPlaceholderFallbackRouteParams)($,at.fallbackRouteParams):null,y=t&&t.length>0?t:null==at?void 0:at.fallbackRouteParams,z=null!=t&&t.length>0,A=null;if(al.cacheComponents&&(null==at?void 0:at.fallbackRouteParams)){let b=(0,h.getRequestMeta)(a,"resolvedRouteParamKeys");b&&b.size>0&&(A=at.fallbackRouteParams.filter(a=>!b.has(a.paramName)))}let B=(l&&(0,h.getRequestMeta)(a,"renderFallbackShell")||z||aG&&!au)&&y?(0,o.createOpaqueFallbackRouteParams)(y):A&&A.length>0&&A.length<((null==at||null==(n=at.fallbackRouteParams)?void 0:n.length)??0)?(0,o.createOpaqueFallbackRouteParams)(A):aI?(0,o.getFallbackRouteParams)(aq,P):null;if((l||aG)&&al.cacheComponents&&!au&&(null==at?void 0:at.fallbackRouteParams)){let b=(0,o.createOpaqueFallbackRouteParams)(y??at.fallbackRouteParams);b&&(0,h.addRequestMeta)(a,"fallbackParams",b)}return q({span:j,postponed:s,fallbackRouteParams:B,forceStaticRender:k})}catch(b){throw(null==g?void 0:g.isStale)&&await P.onRequestError(a,b,{routerKind:"App Router",routePath:W,routeType:"render",revalidateReason:(0,f.c)({isStaticGeneration:aO,isOnDemandRevalidate:ar})},!1,ak),b}},s=async c=>{var f,g,i,j,k,l;let m,n=await P.handleResponse({cacheKey:aU,responseGenerator:a=>r({span:c,...a}),routeKind:e.RouteKind.APP_PAGE,isOnDemandRevalidate:ar,isRoutePPREnabled:aF,req:a,nextConfig:al,prerenderManifest:ag,waitUntil:d.waitUntil,isMinimalMode:V});if(ah&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate"),P.isDev&&b.setHeader("Cache-Control","no-cache, must-revalidate"),!n){if(aU)throw Object.defineProperty(Error("invariant: cache entry required but not generated"),"__NEXT_ERROR_CODE",{value:"E62",enumerable:!1,configurable:!0});return null}if((null==(f=n.value)?void 0:f.kind)!==v.CachedRouteKind.APP_PAGE)throw Object.defineProperty(Error(`Invariant app-page handler received invalid cache entry ${null==(i=n.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E707",enumerable:!1,configurable:!0});let o="string"==typeof n.value.postponed;az&&!aA&&ao&&b.setHeader(y.NEXT_NAV_DEPLOYMENT_ID_HEADER,ao),aO&&!aL&&(!o||ay)&&(V||b.setHeader("x-nextjs-cache",ar?"REVALIDATED":n.isMiss?"MISS":n.isStale?"STALE":"HIT"),b.setHeader(t.NEXT_IS_PRERENDER_HEADER,"1"));let{value:p}=n;if(aJ)m={revalidate:0,expire:void 0};else if(aL)m={revalidate:0,expire:void 0};else if(!P.isDev)if(ah)m={revalidate:0,expire:void 0};else if(aO){if(n.cacheControl)if("number"==typeof n.cacheControl.revalidate){if(n.cacheControl.revalidate<1)throw Object.defineProperty(Error(`Invalid revalidate configuration provided: ${n.cacheControl.revalidate} < 1`),"__NEXT_ERROR_CODE",{value:"E22",enumerable:!1,configurable:!0});m={revalidate:n.cacheControl.revalidate,expire:(null==(j=n.cacheControl)?void 0:j.expire)??al.expireTime}}else m={revalidate:y.CACHE_ONE_YEAR_SECONDS,expire:void 0}}else b.getHeader("Cache-Control")||(m={revalidate:0,expire:void 0});if(n.cacheControl=m,"string"==typeof aM&&(null==p?void 0:p.kind)===v.CachedRouteKind.APP_PAGE&&p.segmentData){b.setHeader(t.NEXT_DID_POSTPONE_HEADER,"2");let c=null==(k=p.headers)?void 0:k[y.NEXT_CACHE_TAGS_HEADER];V&&aO&&c&&"string"==typeof c&&b.setHeader(y.NEXT_CACHE_TAGS_HEADER,c);let d=p.segmentData.get(aM);return void 0!==d?(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:x.default.fromStatic(d,t.RSC_CONTENT_TYPE_HEADER),cacheControl:n.cacheControl}):(b.statusCode=204,(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:x.default.EMPTY,cacheControl:n.cacheControl}))}let s=aP?(0,h.getRequestMeta)(a,"onCacheEntryV2")??(0,h.getRequestMeta)(a,"onCacheEntry"):(0,h.getRequestMeta)(a,"onCacheEntry");if(s){let b=(0,h.getRequestMeta)(a,"initURL")??a.url,c=b?(null==(l=(0,F.parseUrl)(b))?void 0:l.pathname)??b:void 0;if(await s(n,{url:c}))return null}if(p.headers){let a={...p.headers};for(let[c,d]of(V&&aO||delete a[y.NEXT_CACHE_TAGS_HEADER],Object.entries(a)))if(void 0!==d)if(Array.isArray(d))for(let a of d)b.appendHeader(c,a);else"number"==typeof d&&(d=d.toString()),b.appendHeader(c,d)}let u=null==(g=p.headers)?void 0:g[y.NEXT_CACHE_TAGS_HEADER];if(V&&aO&&u&&"string"==typeof u&&b.setHeader(y.NEXT_CACHE_TAGS_HEADER,u),!p.status||az&&aF||(b.statusCode=p.status),!V&&p.status&&H.RedirectStatusCode[p.status]&&az&&(b.statusCode=200),o&&!aL&&b.setHeader(t.NEXT_DID_POSTPONE_HEADER,"1"),az&&!ah){if(void 0===p.rscData){if(p.html.contentType!==t.RSC_CONTENT_TYPE_HEADER)if(al.cacheComponents)return b.statusCode=404,(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:x.default.EMPTY,cacheControl:n.cacheControl});else throw Object.defineProperty(new I.InvariantError(`Expected RSC response, got ${p.html.contentType}`),"__NEXT_ERROR_CODE",{value:"E789",enumerable:!1,configurable:!0});return(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:p.html,cacheControl:n.cacheControl})}return(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:x.default.fromStatic(p.rscData,t.RSC_CONTENT_TYPE_HEADER),cacheControl:n.cacheControl})}let w=p.html;if(aE&&aG){let c=!0===P.isDev?crypto.randomUUID():null;return w.pipeThrough(await (0,A.createInstantTestScriptInsertionTransformStream)(c)),(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:w,cacheControl:{revalidate:0,expire:void 0}})}if(!o||V||az)return(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:w,cacheControl:n.cacheControl});if(aG||aH)return w.push(new ReadableStream({start(a){a.enqueue(z.ENCODED_TAGS.CLOSED.BODY_AND_HTML),a.close()}})),(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:w,cacheControl:{revalidate:0,expire:void 0}});let C=new TransformStream;return w.push(C.readable),q({span:c,postponed:p.postponed,fallbackRouteParams:null,forceStaticRender:!1}).then(async a=>{var b,c;if(!a)throw Object.defineProperty(Error("Invariant: expected a result to be returned"),"__NEXT_ERROR_CODE",{value:"E463",enumerable:!1,configurable:!0});if((null==(b=a.value)?void 0:b.kind)!==v.CachedRouteKind.APP_PAGE)throw Object.defineProperty(Error(`Invariant: expected a page response, got ${null==(c=a.value)?void 0:c.kind}`),"__NEXT_ERROR_CODE",{value:"E305",enumerable:!1,configurable:!0});await a.value.html.pipeTo(C.writable)}).catch(a=>{C.writable.abort(a).catch(a=>{console.error("couldn't abort transformer",a)})}),(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:w,cacheControl:{revalidate:0,expire:void 0}})};if(!a$||!aZ)return k=aY.getActiveScopeSpan(),await aY.withPropagatedContext(a.headers,()=>aY.trace(i.BaseServerSpan.handleRequest,{spanName:`${aX} ${W}`,kind:g.SpanKind.SERVER,attributes:{"http.method":aX,"http.target":a.url}},s),void 0,!a$);await s(aZ)}catch(b){throw b instanceof C.NoFallbackError||await P.onRequestError(a,b,{routerKind:"App Router",routePath:W,routeType:"render",revalidateReason:(0,f.c)({isStaticGeneration:aO,isOnDemandRevalidate:ar})},!1,ak),b}}},41025:a=>{"use strict";a.exports=require("next/dist/server/app-render/dynamic-access-async-storage.external.js")},43954:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/interception-routes")},46293:a=>{"use strict";a.exports=require("sql.js")},55511:a=>{"use strict";a.exports=require("crypto")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},70722:a=>{"use strict";a.exports=require("next/dist/shared/lib/invariant-error")},72089:(a,b,c)=>{Promise.resolve().then(c.bind(c,93110))},73024:a=>{"use strict";a.exports=require("node:fs")},74875:(a,b,c)=>{"use strict";function d(a,b){return!1===a?"default":"active"===b||"success"===b?"success":"error"===b||"expired"===b||"unavailable"===b?"error":"default"}c.d(b,{g:()=>d})},76760:a=>{"use strict";a.exports=require("node:path")},77068:a=>{"use strict";a.exports=require("next/dist/shared/lib/size-limit")},77598:a=>{"use strict";a.exports=require("node:crypto")},79868:a=>{"use strict";a.exports=require("node:sqlite")},81787:a=>{"use strict";a.exports=require("bun:sqlite")},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87550:a=>{"use strict";a.exports=require("better-sqlite3")},93110:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/home/runner/work/switchboard-router/switchboard-router/src/app/(dashboard)/dashboard/providers/[id]/page.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/runner/work/switchboard-router/switchboard-router/src/app/(dashboard)/dashboard/providers/[id]/page.js","default")},94735:a=>{"use strict";a.exports=require("events")}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,319,6470,2712,1062,7141,5350,869,3986,4776,194,2925,9696],()=>b(b.s=35088));module.exports=c})();