@ltgiang/9router 0.4.79 → 0.4.80

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 (1376) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +10 -10
  3. package/app/.next-cli-build/build-manifest.json +3 -3
  4. package/app/.next-cli-build/prerender-manifest.json +3 -3
  5. package/app/.next-cli-build/required-server-files.json +4 -4
  6. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +2 -2
  7. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +3 -3
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +2 -2
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +2 -2
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +2 -2
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +2 -2
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +2 -2
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +2 -2
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +3 -3
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +2 -2
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +2 -2
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +2 -2
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +2 -2
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +3 -3
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +2 -2
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +2 -2
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +3 -3
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +2 -2
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +2 -2
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +2 -2
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +2 -2
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  69. package/app/.next-cli-build/server/app/_global-error/page.js +3 -3
  70. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  71. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  72. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  73. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  74. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  75. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  76. package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  77. package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  78. package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  79. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  80. package/app/.next-cli-build/server/app/_not-found/page.js +2 -2
  81. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  82. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  83. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  84. package/app/.next-cli-build/server/app/_not-found.rsc +4 -4
  85. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +4 -4
  86. package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  87. package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +4 -4
  88. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  89. package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  90. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  91. package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
  92. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  93. package/app/.next-cli-build/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
  94. package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
  95. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  96. package/app/.next-cli-build/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
  97. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  98. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  99. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route_client-reference-manifest.js +1 -1
  100. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  101. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  102. package/app/.next-cli-build/server/app/api/auth/oidc/start/route_client-reference-manifest.js +1 -1
  103. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  104. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  105. package/app/.next-cli-build/server/app/api/auth/oidc/test/route_client-reference-manifest.js +1 -1
  106. package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  107. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  108. package/app/.next-cli-build/server/app/api/auth/status/route_client-reference-manifest.js +1 -1
  109. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +4 -4
  110. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  111. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route_client-reference-manifest.js +1 -1
  112. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  113. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  114. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route_client-reference-manifest.js +1 -1
  115. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  116. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  117. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route_client-reference-manifest.js +1 -1
  118. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
  119. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  120. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route_client-reference-manifest.js +1 -1
  121. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +2 -2
  122. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  123. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route_client-reference-manifest.js +1 -1
  124. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
  125. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  126. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route_client-reference-manifest.js +1 -1
  127. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +2 -2
  128. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  129. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route_client-reference-manifest.js +1 -1
  130. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
  131. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  132. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route_client-reference-manifest.js +1 -1
  133. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
  134. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  135. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route_client-reference-manifest.js +1 -1
  136. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +2 -2
  137. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  138. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route_client-reference-manifest.js +1 -1
  139. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +2 -2
  140. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  141. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route_client-reference-manifest.js +1 -1
  142. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +1 -1
  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/droid-settings/route_client-reference-manifest.js +1 -1
  145. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +3 -3
  146. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  147. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route_client-reference-manifest.js +1 -1
  148. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
  149. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  150. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route_client-reference-manifest.js +1 -1
  151. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
  152. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  153. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route_client-reference-manifest.js +1 -1
  154. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -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/openclaw-settings/route_client-reference-manifest.js +1 -1
  157. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +1 -1
  158. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  159. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route_client-reference-manifest.js +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/[id]/route_client-reference-manifest.js +1 -1
  163. package/app/.next-cli-build/server/app/api/combos/reorder/route.js +1 -1
  164. package/app/.next-cli-build/server/app/api/combos/reorder/route.js.nft.json +1 -1
  165. package/app/.next-cli-build/server/app/api/combos/reorder/route_client-reference-manifest.js +1 -1
  166. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  167. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  168. package/app/.next-cli-build/server/app/api/combos/route_client-reference-manifest.js +1 -1
  169. package/app/.next-cli-build/server/app/api/health/route.js +1 -1
  170. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  171. package/app/.next-cli-build/server/app/api/health/route_client-reference-manifest.js +1 -1
  172. package/app/.next-cli-build/server/app/api/init/route.js +1 -1
  173. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  174. package/app/.next-cli-build/server/app/api/init/route_client-reference-manifest.js +1 -1
  175. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  176. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  177. package/app/.next-cli-build/server/app/api/keys/[id]/route_client-reference-manifest.js +1 -1
  178. package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  179. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  180. package/app/.next-cli-build/server/app/api/keys/route_client-reference-manifest.js +1 -1
  181. package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
  182. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  183. package/app/.next-cli-build/server/app/api/locale/route_client-reference-manifest.js +1 -1
  184. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +1 -1
  185. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  186. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route_client-reference-manifest.js +1 -1
  187. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +2 -2
  188. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  189. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route_client-reference-manifest.js +1 -1
  190. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  191. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  192. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route_client-reference-manifest.js +1 -1
  193. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  194. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  195. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route_client-reference-manifest.js +1 -1
  196. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  197. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  198. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route_client-reference-manifest.js +1 -1
  199. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  200. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  201. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route_client-reference-manifest.js +1 -1
  202. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  203. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  204. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route_client-reference-manifest.js +1 -1
  205. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  206. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  207. package/app/.next-cli-build/server/app/api/models/alias/route_client-reference-manifest.js +1 -1
  208. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  209. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  210. package/app/.next-cli-build/server/app/api/models/availability/route_client-reference-manifest.js +1 -1
  211. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  212. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  213. package/app/.next-cli-build/server/app/api/models/custom/route_client-reference-manifest.js +1 -1
  214. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  215. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  216. package/app/.next-cli-build/server/app/api/models/disabled/route_client-reference-manifest.js +1 -1
  217. package/app/.next-cli-build/server/app/api/models/order/route.js +1 -1
  218. package/app/.next-cli-build/server/app/api/models/order/route.js.nft.json +1 -1
  219. package/app/.next-cli-build/server/app/api/models/order/route_client-reference-manifest.js +1 -1
  220. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  221. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  222. package/app/.next-cli-build/server/app/api/models/route_client-reference-manifest.js +1 -1
  223. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  224. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  225. package/app/.next-cli-build/server/app/api/models/test/route_client-reference-manifest.js +1 -1
  226. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  227. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  228. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route_client-reference-manifest.js +1 -1
  229. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  230. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  231. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route_client-reference-manifest.js +1 -1
  232. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +2 -2
  233. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  234. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route_client-reference-manifest.js +1 -1
  235. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  236. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  237. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route_client-reference-manifest.js +1 -1
  238. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  239. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  240. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route_client-reference-manifest.js +1 -1
  241. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  242. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  243. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route_client-reference-manifest.js +1 -1
  244. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  245. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  246. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route_client-reference-manifest.js +1 -1
  247. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  248. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  249. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route_client-reference-manifest.js +1 -1
  250. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  251. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  252. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route_client-reference-manifest.js +1 -1
  253. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  254. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  255. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route_client-reference-manifest.js +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/pricing/route_client-reference-manifest.js +1 -1
  259. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  260. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  261. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route_client-reference-manifest.js +1 -1
  262. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  263. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  264. package/app/.next-cli-build/server/app/api/provider-nodes/route_client-reference-manifest.js +1 -1
  265. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  266. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  267. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route_client-reference-manifest.js +1 -1
  268. package/app/.next-cli-build/server/app/api/providers/[id]/connections/disabled/route.js +1 -1
  269. package/app/.next-cli-build/server/app/api/providers/[id]/connections/disabled/route.js.nft.json +1 -1
  270. package/app/.next-cli-build/server/app/api/providers/[id]/connections/disabled/route_client-reference-manifest.js +1 -1
  271. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  272. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  273. package/app/.next-cli-build/server/app/api/providers/[id]/models/route_client-reference-manifest.js +1 -1
  274. package/app/.next-cli-build/server/app/api/providers/[id]/pool/pull/route.js +1 -1
  275. package/app/.next-cli-build/server/app/api/providers/[id]/pool/pull/route.js.nft.json +1 -1
  276. package/app/.next-cli-build/server/app/api/providers/[id]/pool/pull/route_client-reference-manifest.js +1 -1
  277. package/app/.next-cli-build/server/app/api/providers/[id]/pool/route.js +1 -1
  278. package/app/.next-cli-build/server/app/api/providers/[id]/pool/route.js.nft.json +1 -1
  279. package/app/.next-cli-build/server/app/api/providers/[id]/pool/route_client-reference-manifest.js +1 -1
  280. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  281. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  282. package/app/.next-cli-build/server/app/api/providers/[id]/route_client-reference-manifest.js +1 -1
  283. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  284. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  285. package/app/.next-cli-build/server/app/api/providers/[id]/test/route_client-reference-manifest.js +1 -1
  286. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  287. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  288. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route_client-reference-manifest.js +1 -1
  289. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  290. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  291. package/app/.next-cli-build/server/app/api/providers/client/route_client-reference-manifest.js +1 -1
  292. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
  293. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  294. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route_client-reference-manifest.js +1 -1
  295. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  296. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  297. package/app/.next-cli-build/server/app/api/providers/route_client-reference-manifest.js +1 -1
  298. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
  299. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  300. package/app/.next-cli-build/server/app/api/providers/suggested-models/route_client-reference-manifest.js +1 -1
  301. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  302. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  303. package/app/.next-cli-build/server/app/api/providers/test-batch/route_client-reference-manifest.js +1 -1
  304. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  305. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  306. package/app/.next-cli-build/server/app/api/providers/validate/route_client-reference-manifest.js +1 -1
  307. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  308. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  309. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route_client-reference-manifest.js +1 -1
  310. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  311. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  312. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route_client-reference-manifest.js +1 -1
  313. package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  314. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  315. package/app/.next-cli-build/server/app/api/proxy-pools/route_client-reference-manifest.js +1 -1
  316. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +2 -2
  317. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  318. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route_client-reference-manifest.js +1 -1
  319. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  320. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  321. package/app/.next-cli-build/server/app/api/settings/database/route_client-reference-manifest.js +1 -1
  322. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
  323. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  324. package/app/.next-cli-build/server/app/api/settings/proxy-test/route_client-reference-manifest.js +1 -1
  325. package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  326. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  327. package/app/.next-cli-build/server/app/api/settings/require-login/route_client-reference-manifest.js +1 -1
  328. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  329. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  330. package/app/.next-cli-build/server/app/api/settings/route_client-reference-manifest.js +1 -1
  331. package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
  332. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  333. package/app/.next-cli-build/server/app/api/shutdown/route_client-reference-manifest.js +1 -1
  334. package/app/.next-cli-build/server/app/api/tags/route.js +1 -1
  335. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  336. package/app/.next-cli-build/server/app/api/tags/route_client-reference-manifest.js +1 -1
  337. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  338. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  339. package/app/.next-cli-build/server/app/api/translator/console-logs/route_client-reference-manifest.js +1 -1
  340. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  341. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  342. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route_client-reference-manifest.js +1 -1
  343. package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
  344. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  345. package/app/.next-cli-build/server/app/api/translator/load/route_client-reference-manifest.js +1 -1
  346. package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
  347. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  348. package/app/.next-cli-build/server/app/api/translator/save/route_client-reference-manifest.js +1 -1
  349. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  350. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  351. package/app/.next-cli-build/server/app/api/translator/send/route_client-reference-manifest.js +1 -1
  352. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  353. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  354. package/app/.next-cli-build/server/app/api/translator/translate/route_client-reference-manifest.js +1 -1
  355. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  356. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  357. package/app/.next-cli-build/server/app/api/tunnel/disable/route_client-reference-manifest.js +1 -1
  358. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  359. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  360. package/app/.next-cli-build/server/app/api/tunnel/enable/route_client-reference-manifest.js +1 -1
  361. package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
  362. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  363. package/app/.next-cli-build/server/app/api/tunnel/status/route_client-reference-manifest.js +1 -1
  364. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
  365. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  366. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route_client-reference-manifest.js +1 -1
  367. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  368. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  369. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route_client-reference-manifest.js +1 -1
  370. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  371. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  372. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route_client-reference-manifest.js +1 -1
  373. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +3 -3
  374. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  375. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route_client-reference-manifest.js +1 -1
  376. package/app/.next-cli-build/server/app/api/tunnel/tailscale-login/route.js +1 -1
  377. package/app/.next-cli-build/server/app/api/tunnel/tailscale-login/route.js.nft.json +1 -1
  378. package/app/.next-cli-build/server/app/api/tunnel/tailscale-login/route_client-reference-manifest.js +1 -1
  379. package/app/.next-cli-build/server/app/api/tunnel/tailscale-start-daemon/route.js +2 -2
  380. package/app/.next-cli-build/server/app/api/tunnel/tailscale-start-daemon/route.js.nft.json +1 -1
  381. package/app/.next-cli-build/server/app/api/tunnel/tailscale-start-daemon/route_client-reference-manifest.js +1 -1
  382. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  383. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  384. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route_client-reference-manifest.js +1 -1
  385. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  386. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  387. package/app/.next-cli-build/server/app/api/usage/chart/route_client-reference-manifest.js +1 -1
  388. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  389. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  390. package/app/.next-cli-build/server/app/api/usage/history/route_client-reference-manifest.js +1 -1
  391. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  392. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  393. package/app/.next-cli-build/server/app/api/usage/providers/route_client-reference-manifest.js +1 -1
  394. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  395. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  396. package/app/.next-cli-build/server/app/api/usage/request-details/route_client-reference-manifest.js +1 -1
  397. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  398. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  399. package/app/.next-cli-build/server/app/api/usage/request-logs/route_client-reference-manifest.js +1 -1
  400. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  401. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  402. package/app/.next-cli-build/server/app/api/usage/stats/route_client-reference-manifest.js +1 -1
  403. package/app/.next-cli-build/server/app/api/usage/stream/route.js +2 -2
  404. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  405. package/app/.next-cli-build/server/app/api/usage/stream/route_client-reference-manifest.js +1 -1
  406. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  407. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  408. package/app/.next-cli-build/server/app/api/v1/api/chat/route_client-reference-manifest.js +1 -1
  409. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  410. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  411. package/app/.next-cli-build/server/app/api/v1/audio/speech/route_client-reference-manifest.js +1 -1
  412. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  413. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  414. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route_client-reference-manifest.js +1 -1
  415. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  416. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  417. package/app/.next-cli-build/server/app/api/v1/audio/voices/route_client-reference-manifest.js +1 -1
  418. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  419. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  420. package/app/.next-cli-build/server/app/api/v1/chat/completions/route_client-reference-manifest.js +1 -1
  421. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  422. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  423. package/app/.next-cli-build/server/app/api/v1/embeddings/route_client-reference-manifest.js +1 -1
  424. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
  425. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  426. package/app/.next-cli-build/server/app/api/v1/images/generations/route_client-reference-manifest.js +1 -1
  427. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
  428. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  429. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route_client-reference-manifest.js +1 -1
  430. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  431. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  432. package/app/.next-cli-build/server/app/api/v1/messages/route_client-reference-manifest.js +1 -1
  433. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  434. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  435. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route_client-reference-manifest.js +1 -1
  436. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  437. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  438. package/app/.next-cli-build/server/app/api/v1/models/info/route_client-reference-manifest.js +1 -1
  439. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  440. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  441. package/app/.next-cli-build/server/app/api/v1/models/route_client-reference-manifest.js +1 -1
  442. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  443. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  444. package/app/.next-cli-build/server/app/api/v1/responses/compact/route_client-reference-manifest.js +1 -1
  445. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  446. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  447. package/app/.next-cli-build/server/app/api/v1/responses/route_client-reference-manifest.js +1 -1
  448. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  449. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  450. package/app/.next-cli-build/server/app/api/v1/route_client-reference-manifest.js +1 -1
  451. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  452. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  453. package/app/.next-cli-build/server/app/api/v1/search/route_client-reference-manifest.js +1 -1
  454. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  455. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  456. package/app/.next-cli-build/server/app/api/v1/web/fetch/route_client-reference-manifest.js +1 -1
  457. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  458. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  459. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route_client-reference-manifest.js +1 -1
  460. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  461. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  462. package/app/.next-cli-build/server/app/api/v1beta/models/route_client-reference-manifest.js +1 -1
  463. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  464. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  465. package/app/.next-cli-build/server/app/api/version/route_client-reference-manifest.js +1 -1
  466. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  467. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  468. package/app/.next-cli-build/server/app/api/version/shutdown/route_client-reference-manifest.js +1 -1
  469. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  470. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  471. package/app/.next-cli-build/server/app/api/version/update/route_client-reference-manifest.js +1 -1
  472. package/app/.next-cli-build/server/app/callback/page.js +2 -2
  473. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  474. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  475. package/app/.next-cli-build/server/app/callback.html +1 -1
  476. package/app/.next-cli-build/server/app/callback.rsc +5 -5
  477. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +5 -5
  478. package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
  479. package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +4 -4
  480. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
  481. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +2 -2
  482. package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
  483. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  484. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +6 -6
  485. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
  486. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
  487. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  488. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  489. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +6 -6
  490. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
  491. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +4 -4
  492. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
  493. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  494. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +7 -7
  495. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
  496. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
  497. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  498. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  499. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +7 -7
  500. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
  501. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +4 -4
  502. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
  503. package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  504. package/app/.next-cli-build/server/app/dashboard/combos.rsc +6 -6
  505. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  506. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
  507. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  508. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  509. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +6 -6
  510. package/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
  511. package/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +4 -4
  512. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
  513. package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  514. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +7 -7
  515. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
  516. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
  517. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  518. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  519. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +7 -7
  520. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
  521. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +4 -4
  522. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
  523. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  524. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +6 -6
  525. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
  526. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
  527. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
  528. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  529. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  530. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +6 -6
  531. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
  532. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +4 -4
  533. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +2 -2
  534. package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  535. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +6 -6
  536. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
  537. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
  538. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  539. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  540. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +6 -6
  541. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
  542. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +4 -4
  543. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
  544. package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  545. package/app/.next-cli-build/server/app/dashboard/profile.rsc +6 -6
  546. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
  547. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
  548. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  549. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  550. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +6 -6
  551. package/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
  552. package/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +4 -4
  553. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
  554. package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  555. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +6 -6
  556. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  557. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
  558. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  559. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  560. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  561. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +6 -6
  562. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
  563. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +4 -4
  564. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
  565. package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  566. package/app/.next-cli-build/server/app/dashboard/providers.rsc +6 -6
  567. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  568. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  569. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  570. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  571. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +6 -6
  572. package/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
  573. package/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +4 -4
  574. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
  575. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  576. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +6 -6
  577. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
  578. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
  579. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  580. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  581. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +6 -6
  582. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
  583. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +4 -4
  584. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
  585. package/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
  586. package/app/.next-cli-build/server/app/dashboard/quota.rsc +7 -7
  587. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
  588. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
  589. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  590. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  591. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +7 -7
  592. package/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
  593. package/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +4 -4
  594. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
  595. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +2 -2
  596. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  597. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  598. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  599. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +5 -5
  600. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +5 -5
  601. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  602. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +4 -4
  603. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  604. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +2 -2
  605. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  606. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  607. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  608. package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  609. package/app/.next-cli-build/server/app/dashboard/skills.rsc +6 -6
  610. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +2 -2
  611. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills.segment.rsc +1 -1
  612. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  613. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  614. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +6 -6
  615. package/app/.next-cli-build/server/app/dashboard/skills.segments/_head.segment.rsc +1 -1
  616. package/app/.next-cli-build/server/app/dashboard/skills.segments/_index.segment.rsc +4 -4
  617. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +2 -2
  618. package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  619. package/app/.next-cli-build/server/app/dashboard/translator.rsc +6 -6
  620. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  621. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
  622. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  623. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  624. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +6 -6
  625. package/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
  626. package/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +4 -4
  627. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
  628. package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  629. package/app/.next-cli-build/server/app/dashboard/usage.rsc +6 -6
  630. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
  631. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
  632. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  633. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  634. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +6 -6
  635. package/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
  636. package/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +4 -4
  637. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
  638. package/app/.next-cli-build/server/app/dashboard.html +1 -1
  639. package/app/.next-cli-build/server/app/dashboard.rsc +7 -7
  640. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
  641. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  642. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  643. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +7 -7
  644. package/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
  645. package/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +4 -4
  646. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +2 -2
  647. package/app/.next-cli-build/server/app/favicon.ico/route.js +1 -1
  648. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  649. package/app/.next-cli-build/server/app/index.html +1 -1
  650. package/app/.next-cli-build/server/app/index.rsc +4 -4
  651. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  652. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +4 -4
  653. package/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
  654. package/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +4 -4
  655. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
  656. package/app/.next-cli-build/server/app/landing/page.js +2 -2
  657. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  658. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  659. package/app/.next-cli-build/server/app/landing.html +1 -1
  660. package/app/.next-cli-build/server/app/landing.rsc +5 -5
  661. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +5 -5
  662. package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
  663. package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +4 -4
  664. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
  665. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +2 -2
  666. package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
  667. package/app/.next-cli-build/server/app/login/page.js +2 -2
  668. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  669. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  670. package/app/.next-cli-build/server/app/login.html +1 -1
  671. package/app/.next-cli-build/server/app/login.rsc +5 -5
  672. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +5 -5
  673. package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
  674. package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +4 -4
  675. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
  676. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  677. package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
  678. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
  679. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  680. package/app/.next-cli-build/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -1
  681. package/app/.next-cli-build/server/app/page.js +2 -2
  682. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  683. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  684. package/app/.next-cli-build/server/app-paths-manifest.json +10 -10
  685. package/app/.next-cli-build/server/chunks/3110.js +1 -1
  686. package/app/.next-cli-build/server/chunks/319.js +3 -3
  687. package/app/.next-cli-build/server/chunks/3196.js +1 -0
  688. package/app/.next-cli-build/server/chunks/3813.js +1 -1
  689. package/app/.next-cli-build/server/chunks/3913.js +18 -18
  690. package/app/.next-cli-build/server/chunks/4304.js +1 -1
  691. package/app/.next-cli-build/server/chunks/4372.js +1 -0
  692. package/app/.next-cli-build/server/chunks/4404.js +1 -1
  693. package/app/.next-cli-build/server/chunks/4720.js +1 -0
  694. package/app/.next-cli-build/server/chunks/4746.js +1 -1
  695. package/app/.next-cli-build/server/chunks/5024.js +1 -0
  696. package/app/.next-cli-build/server/chunks/5852.js +1 -1
  697. package/app/.next-cli-build/server/chunks/6064.js +1 -1
  698. package/app/.next-cli-build/server/chunks/6108.js +1 -1
  699. package/app/.next-cli-build/server/chunks/7153.js +1 -1
  700. package/app/.next-cli-build/server/chunks/7341.js +1 -1
  701. package/app/.next-cli-build/server/chunks/7774.js +8 -8
  702. package/app/.next-cli-build/server/chunks/{3381.js → 7899.js} +2 -2
  703. package/app/.next-cli-build/server/chunks/7965.js +1 -1
  704. package/app/.next-cli-build/server/chunks/8520.js +1 -1
  705. package/app/.next-cli-build/server/chunks/8895.js +1 -1
  706. package/app/.next-cli-build/server/chunks/914.js +2 -2
  707. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  708. package/app/.next-cli-build/server/middleware.js +5 -5
  709. package/app/.next-cli-build/server/next-font-manifest.js +1 -1
  710. package/app/.next-cli-build/server/next-font-manifest.json +1 -1
  711. package/app/.next-cli-build/server/pages/404.html +1 -1
  712. package/app/.next-cli-build/server/pages/500.html +1 -1
  713. package/app/.next-cli-build/server/server-reference-manifest.js +1 -1
  714. package/app/.next-cli-build/server/server-reference-manifest.json +1 -1
  715. package/app/.next-cli-build/static/chunks/1051-080896ceff7ba88d.js +64 -0
  716. package/app/.next-cli-build/static/chunks/{1321-5d8c00ea6c7c3dc7.js → 1321-c42f086956b0caab.js} +1 -1
  717. package/app/.next-cli-build/static/chunks/6502-612e6a0c29fdfd96.js +3 -0
  718. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/page-dccb4480c20cb67f.js +1 -0
  719. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/page-a9ac6b258809e7fa.js +1 -0
  720. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/page-c359f496024e3673.js +1 -0
  721. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-a314df50240def0b.js +1 -0
  722. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/page-4ce59558e8fe3be1.js +1 -0
  723. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-5ef89f751912e1ef.js +1 -0
  724. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-0518b1d85c00fe3e.js → page-432e13b0930a1e77.js} +2 -2
  725. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/{page-4349f9f766d12c4c.js → page-0736ad13c70c1c56.js} +1 -1
  726. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/{page-24401ae2640c4c7c.js → page-50ee3aa1bd8fa967.js} +2 -2
  727. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/{page-42b5c10af95bdb38.js → page-f828e7a7fa3010d8.js} +1 -1
  728. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/{page-9e6941e3a85d7c97.js → page-f587e9c9d0a62533.js} +1 -1
  729. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-92cff164200e3f2a.js +1 -0
  730. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-0d670718f2e33561.js +1 -0
  731. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/{page-82f29d5a0908e246.js → page-535882a5b15c01fd.js} +1 -1
  732. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/new/{page-c38d44575796c7c3.js → page-728ddba2783d1f16.js} +1 -1
  733. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-8e1f581c3c66272d.js +1 -0
  734. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/{page-639c2e73373dce0a.js → page-5ee9e3e13d6015bb.js} +2 -2
  735. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-b0fae7cb91ea57a8.js +1 -0
  736. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/page-8824acbc5ab93904.js +1 -0
  737. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/{page-5dd575f7d285740b.js → page-b3c27640638a72ce.js} +1 -1
  738. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-ab3c8b6b84d1bddf.js +1 -0
  739. package/app/.next-cli-build/static/chunks/app/(dashboard)/{layout-33073f0abd228bfc.js → layout-3e9190b29f8110a6.js} +1 -1
  740. package/app/.next-cli-build/static/chunks/app/_not-found/page-e4d84f64a8c852f7.js +1 -0
  741. package/app/.next-cli-build/static/chunks/app/callback/page-69c80ed172191a02.js +1 -0
  742. package/app/.next-cli-build/static/chunks/app/dashboard/settings/pricing/page-717fc9bdbe424b20.js +1 -0
  743. package/app/.next-cli-build/static/chunks/app/landing/page-34fb5bf37abde153.js +1 -0
  744. package/app/.next-cli-build/static/chunks/app/{layout-fb90a9496b98e3d3.js → layout-aff6bda55ff6881b.js} +1 -1
  745. package/app/.next-cli-build/static/chunks/app/login/{page-756b163b5203414c.js → page-5b1e256b0ca9cc40.js} +1 -1
  746. package/app/.next-cli-build/static/chunks/{main-app-67b0151d420ab3b8.js → main-app-3057ce86fdd7f7ab.js} +1 -1
  747. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/global-error-9e6846bb98322e86.js +1 -0
  748. package/app/.next-cli-build/static/css/{454db3b478540e33.css → 0f03023a765dc337.css} +1 -1
  749. package/app/.next-cli-build/static/media/material-symbols-outlined.50fdf095.woff2 +0 -0
  750. package/app/cli/.build-home/.9router/db/data.sqlite +0 -0
  751. package/app/cli/.build-home/.9router/jwt-secret +1 -1
  752. package/app/cli/.build-home/.9router/machine-id +1 -1
  753. package/app/cli/.build-home/.config/nextjs-nodejs/config.json +3 -3
  754. package/app/node_modules/baseline-browser-mapping/dist/index.cjs +1 -1
  755. package/app/node_modules/baseline-browser-mapping/package.json +3 -3
  756. package/app/node_modules/bindings/bindings.js +221 -0
  757. package/app/node_modules/bindings/package.json +28 -0
  758. package/app/node_modules/caniuse-lite/data/agents.js +1 -1
  759. package/app/node_modules/caniuse-lite/data/browserVersions.js +1 -1
  760. package/app/node_modules/caniuse-lite/data/features/aac.js +1 -1
  761. package/app/node_modules/caniuse-lite/data/features/abortcontroller.js +1 -1
  762. package/app/node_modules/caniuse-lite/data/features/ac3-ec3.js +1 -1
  763. package/app/node_modules/caniuse-lite/data/features/accelerometer.js +1 -1
  764. package/app/node_modules/caniuse-lite/data/features/addeventlistener.js +1 -1
  765. package/app/node_modules/caniuse-lite/data/features/alternate-stylesheet.js +1 -1
  766. package/app/node_modules/caniuse-lite/data/features/ambient-light.js +1 -1
  767. package/app/node_modules/caniuse-lite/data/features/apng.js +1 -1
  768. package/app/node_modules/caniuse-lite/data/features/array-find-index.js +1 -1
  769. package/app/node_modules/caniuse-lite/data/features/array-find.js +1 -1
  770. package/app/node_modules/caniuse-lite/data/features/array-flat.js +1 -1
  771. package/app/node_modules/caniuse-lite/data/features/array-includes.js +1 -1
  772. package/app/node_modules/caniuse-lite/data/features/arrow-functions.js +1 -1
  773. package/app/node_modules/caniuse-lite/data/features/asmjs.js +1 -1
  774. package/app/node_modules/caniuse-lite/data/features/async-clipboard.js +1 -1
  775. package/app/node_modules/caniuse-lite/data/features/async-functions.js +1 -1
  776. package/app/node_modules/caniuse-lite/data/features/atob-btoa.js +1 -1
  777. package/app/node_modules/caniuse-lite/data/features/audio-api.js +1 -1
  778. package/app/node_modules/caniuse-lite/data/features/audio.js +1 -1
  779. package/app/node_modules/caniuse-lite/data/features/audiotracks.js +1 -1
  780. package/app/node_modules/caniuse-lite/data/features/autofocus.js +1 -1
  781. package/app/node_modules/caniuse-lite/data/features/auxclick.js +1 -1
  782. package/app/node_modules/caniuse-lite/data/features/av1.js +1 -1
  783. package/app/node_modules/caniuse-lite/data/features/avif.js +1 -1
  784. package/app/node_modules/caniuse-lite/data/features/background-attachment.js +1 -1
  785. package/app/node_modules/caniuse-lite/data/features/background-clip-text.js +1 -1
  786. package/app/node_modules/caniuse-lite/data/features/background-img-opts.js +1 -1
  787. package/app/node_modules/caniuse-lite/data/features/background-position-x-y.js +1 -1
  788. package/app/node_modules/caniuse-lite/data/features/background-repeat-round-space.js +1 -1
  789. package/app/node_modules/caniuse-lite/data/features/background-sync.js +1 -1
  790. package/app/node_modules/caniuse-lite/data/features/battery-status.js +1 -1
  791. package/app/node_modules/caniuse-lite/data/features/beacon.js +1 -1
  792. package/app/node_modules/caniuse-lite/data/features/beforeafterprint.js +1 -1
  793. package/app/node_modules/caniuse-lite/data/features/bigint.js +1 -1
  794. package/app/node_modules/caniuse-lite/data/features/blobbuilder.js +1 -1
  795. package/app/node_modules/caniuse-lite/data/features/bloburls.js +1 -1
  796. package/app/node_modules/caniuse-lite/data/features/border-image.js +1 -1
  797. package/app/node_modules/caniuse-lite/data/features/border-radius.js +1 -1
  798. package/app/node_modules/caniuse-lite/data/features/broadcastchannel.js +1 -1
  799. package/app/node_modules/caniuse-lite/data/features/brotli.js +1 -1
  800. package/app/node_modules/caniuse-lite/data/features/calc.js +1 -1
  801. package/app/node_modules/caniuse-lite/data/features/canvas-blending.js +1 -1
  802. package/app/node_modules/caniuse-lite/data/features/canvas-text.js +1 -1
  803. package/app/node_modules/caniuse-lite/data/features/canvas.js +1 -1
  804. package/app/node_modules/caniuse-lite/data/features/ch-unit.js +1 -1
  805. package/app/node_modules/caniuse-lite/data/features/chacha20-poly1305.js +1 -1
  806. package/app/node_modules/caniuse-lite/data/features/channel-messaging.js +1 -1
  807. package/app/node_modules/caniuse-lite/data/features/childnode-remove.js +1 -1
  808. package/app/node_modules/caniuse-lite/data/features/classlist.js +1 -1
  809. package/app/node_modules/caniuse-lite/data/features/client-hints-dpr-width-viewport.js +1 -1
  810. package/app/node_modules/caniuse-lite/data/features/clipboard.js +1 -1
  811. package/app/node_modules/caniuse-lite/data/features/colr-v1.js +1 -1
  812. package/app/node_modules/caniuse-lite/data/features/colr.js +1 -1
  813. package/app/node_modules/caniuse-lite/data/features/comparedocumentposition.js +1 -1
  814. package/app/node_modules/caniuse-lite/data/features/console-basic.js +1 -1
  815. package/app/node_modules/caniuse-lite/data/features/console-time.js +1 -1
  816. package/app/node_modules/caniuse-lite/data/features/const.js +1 -1
  817. package/app/node_modules/caniuse-lite/data/features/constraint-validation.js +1 -1
  818. package/app/node_modules/caniuse-lite/data/features/contenteditable.js +1 -1
  819. package/app/node_modules/caniuse-lite/data/features/contentsecuritypolicy.js +1 -1
  820. package/app/node_modules/caniuse-lite/data/features/contentsecuritypolicy2.js +1 -1
  821. package/app/node_modules/caniuse-lite/data/features/cookie-store-api.js +1 -1
  822. package/app/node_modules/caniuse-lite/data/features/cors.js +1 -1
  823. package/app/node_modules/caniuse-lite/data/features/createimagebitmap.js +1 -1
  824. package/app/node_modules/caniuse-lite/data/features/credential-management.js +1 -1
  825. package/app/node_modules/caniuse-lite/data/features/cross-document-view-transitions.js +1 -1
  826. package/app/node_modules/caniuse-lite/data/features/cryptography.js +1 -1
  827. package/app/node_modules/caniuse-lite/data/features/css-all.js +1 -1
  828. package/app/node_modules/caniuse-lite/data/features/css-anchor-positioning.js +1 -1
  829. package/app/node_modules/caniuse-lite/data/features/css-animation.js +1 -1
  830. package/app/node_modules/caniuse-lite/data/features/css-any-link.js +1 -1
  831. package/app/node_modules/caniuse-lite/data/features/css-appearance.js +1 -1
  832. package/app/node_modules/caniuse-lite/data/features/css-at-counter-style.js +1 -1
  833. package/app/node_modules/caniuse-lite/data/features/css-autofill.js +1 -1
  834. package/app/node_modules/caniuse-lite/data/features/css-backdrop-filter.js +1 -1
  835. package/app/node_modules/caniuse-lite/data/features/css-background-offsets.js +1 -1
  836. package/app/node_modules/caniuse-lite/data/features/css-backgroundblendmode.js +1 -1
  837. package/app/node_modules/caniuse-lite/data/features/css-boxdecorationbreak.js +1 -1
  838. package/app/node_modules/caniuse-lite/data/features/css-boxshadow.js +1 -1
  839. package/app/node_modules/caniuse-lite/data/features/css-canvas.js +1 -1
  840. package/app/node_modules/caniuse-lite/data/features/css-caret-color.js +1 -1
  841. package/app/node_modules/caniuse-lite/data/features/css-cascade-layers.js +1 -1
  842. package/app/node_modules/caniuse-lite/data/features/css-cascade-scope.js +1 -1
  843. package/app/node_modules/caniuse-lite/data/features/css-case-insensitive.js +1 -1
  844. package/app/node_modules/caniuse-lite/data/features/css-clip-path.js +1 -1
  845. package/app/node_modules/caniuse-lite/data/features/css-color-adjust.js +1 -1
  846. package/app/node_modules/caniuse-lite/data/features/css-color-function.js +1 -1
  847. package/app/node_modules/caniuse-lite/data/features/css-conic-gradients.js +1 -1
  848. package/app/node_modules/caniuse-lite/data/features/css-container-queries-style.js +1 -1
  849. package/app/node_modules/caniuse-lite/data/features/css-container-queries.js +1 -1
  850. package/app/node_modules/caniuse-lite/data/features/css-container-query-units.js +1 -1
  851. package/app/node_modules/caniuse-lite/data/features/css-containment.js +1 -1
  852. package/app/node_modules/caniuse-lite/data/features/css-content-visibility.js +1 -1
  853. package/app/node_modules/caniuse-lite/data/features/css-counters.js +1 -1
  854. package/app/node_modules/caniuse-lite/data/features/css-crisp-edges.js +1 -1
  855. package/app/node_modules/caniuse-lite/data/features/css-cross-fade.js +1 -1
  856. package/app/node_modules/caniuse-lite/data/features/css-default-pseudo.js +1 -1
  857. package/app/node_modules/caniuse-lite/data/features/css-descendant-gtgt.js +1 -1
  858. package/app/node_modules/caniuse-lite/data/features/css-deviceadaptation.js +1 -1
  859. package/app/node_modules/caniuse-lite/data/features/css-dir-pseudo.js +1 -1
  860. package/app/node_modules/caniuse-lite/data/features/css-display-contents.js +1 -1
  861. package/app/node_modules/caniuse-lite/data/features/css-element-function.js +1 -1
  862. package/app/node_modules/caniuse-lite/data/features/css-env-function.js +1 -1
  863. package/app/node_modules/caniuse-lite/data/features/css-exclusions.js +1 -1
  864. package/app/node_modules/caniuse-lite/data/features/css-featurequeries.js +1 -1
  865. package/app/node_modules/caniuse-lite/data/features/css-file-selector-button.js +1 -1
  866. package/app/node_modules/caniuse-lite/data/features/css-filter-function.js +1 -1
  867. package/app/node_modules/caniuse-lite/data/features/css-filters.js +1 -1
  868. package/app/node_modules/caniuse-lite/data/features/css-first-letter.js +1 -1
  869. package/app/node_modules/caniuse-lite/data/features/css-first-line.js +1 -1
  870. package/app/node_modules/caniuse-lite/data/features/css-fixed.js +1 -1
  871. package/app/node_modules/caniuse-lite/data/features/css-focus-visible.js +1 -1
  872. package/app/node_modules/caniuse-lite/data/features/css-focus-within.js +1 -1
  873. package/app/node_modules/caniuse-lite/data/features/css-font-palette.js +1 -1
  874. package/app/node_modules/caniuse-lite/data/features/css-font-rendering-controls.js +1 -1
  875. package/app/node_modules/caniuse-lite/data/features/css-font-stretch.js +1 -1
  876. package/app/node_modules/caniuse-lite/data/features/css-gencontent.js +1 -1
  877. package/app/node_modules/caniuse-lite/data/features/css-gradients.js +1 -1
  878. package/app/node_modules/caniuse-lite/data/features/css-grid-animation.js +1 -1
  879. package/app/node_modules/caniuse-lite/data/features/css-grid-lanes.js +1 -1
  880. package/app/node_modules/caniuse-lite/data/features/css-grid.js +1 -1
  881. package/app/node_modules/caniuse-lite/data/features/css-hanging-punctuation.js +1 -1
  882. package/app/node_modules/caniuse-lite/data/features/css-has.js +1 -1
  883. package/app/node_modules/caniuse-lite/data/features/css-hyphens.js +1 -1
  884. package/app/node_modules/caniuse-lite/data/features/css-if.js +1 -1
  885. package/app/node_modules/caniuse-lite/data/features/css-image-orientation.js +1 -1
  886. package/app/node_modules/caniuse-lite/data/features/css-image-set.js +1 -1
  887. package/app/node_modules/caniuse-lite/data/features/css-in-out-of-range.js +1 -1
  888. package/app/node_modules/caniuse-lite/data/features/css-indeterminate-pseudo.js +1 -1
  889. package/app/node_modules/caniuse-lite/data/features/css-initial-letter.js +1 -1
  890. package/app/node_modules/caniuse-lite/data/features/css-initial-value.js +1 -1
  891. package/app/node_modules/caniuse-lite/data/features/css-lch-lab.js +1 -1
  892. package/app/node_modules/caniuse-lite/data/features/css-letter-spacing.js +1 -1
  893. package/app/node_modules/caniuse-lite/data/features/css-line-clamp.js +1 -1
  894. package/app/node_modules/caniuse-lite/data/features/css-logical-props.js +1 -1
  895. package/app/node_modules/caniuse-lite/data/features/css-marker-pseudo.js +1 -1
  896. package/app/node_modules/caniuse-lite/data/features/css-masks.js +1 -1
  897. package/app/node_modules/caniuse-lite/data/features/css-matches-pseudo.js +1 -1
  898. package/app/node_modules/caniuse-lite/data/features/css-math-functions.js +1 -1
  899. package/app/node_modules/caniuse-lite/data/features/css-media-interaction.js +1 -1
  900. package/app/node_modules/caniuse-lite/data/features/css-media-range-syntax.js +1 -1
  901. package/app/node_modules/caniuse-lite/data/features/css-media-resolution.js +1 -1
  902. package/app/node_modules/caniuse-lite/data/features/css-media-scripting.js +1 -1
  903. package/app/node_modules/caniuse-lite/data/features/css-mediaqueries.js +1 -1
  904. package/app/node_modules/caniuse-lite/data/features/css-mixblendmode.js +1 -1
  905. package/app/node_modules/caniuse-lite/data/features/css-module-scripts.js +1 -1
  906. package/app/node_modules/caniuse-lite/data/features/css-motion-paths.js +1 -1
  907. package/app/node_modules/caniuse-lite/data/features/css-namespaces.js +1 -1
  908. package/app/node_modules/caniuse-lite/data/features/css-nesting.js +1 -1
  909. package/app/node_modules/caniuse-lite/data/features/css-not-sel-list.js +1 -1
  910. package/app/node_modules/caniuse-lite/data/features/css-nth-child-of.js +1 -1
  911. package/app/node_modules/caniuse-lite/data/features/css-opacity.js +1 -1
  912. package/app/node_modules/caniuse-lite/data/features/css-optional-pseudo.js +1 -1
  913. package/app/node_modules/caniuse-lite/data/features/css-overflow-anchor.js +1 -1
  914. package/app/node_modules/caniuse-lite/data/features/css-overflow-overlay.js +1 -1
  915. package/app/node_modules/caniuse-lite/data/features/css-overflow.js +1 -1
  916. package/app/node_modules/caniuse-lite/data/features/css-overscroll-behavior.js +1 -1
  917. package/app/node_modules/caniuse-lite/data/features/css-page-break.js +1 -1
  918. package/app/node_modules/caniuse-lite/data/features/css-paged-media.js +1 -1
  919. package/app/node_modules/caniuse-lite/data/features/css-paint-api.js +1 -1
  920. package/app/node_modules/caniuse-lite/data/features/css-placeholder-shown.js +1 -1
  921. package/app/node_modules/caniuse-lite/data/features/css-placeholder.js +1 -1
  922. package/app/node_modules/caniuse-lite/data/features/css-print-color-adjust.js +1 -1
  923. package/app/node_modules/caniuse-lite/data/features/css-read-only-write.js +1 -1
  924. package/app/node_modules/caniuse-lite/data/features/css-rebeccapurple.js +1 -1
  925. package/app/node_modules/caniuse-lite/data/features/css-reflections.js +1 -1
  926. package/app/node_modules/caniuse-lite/data/features/css-regions.js +1 -1
  927. package/app/node_modules/caniuse-lite/data/features/css-relative-colors.js +1 -1
  928. package/app/node_modules/caniuse-lite/data/features/css-repeating-gradients.js +1 -1
  929. package/app/node_modules/caniuse-lite/data/features/css-resize.js +1 -1
  930. package/app/node_modules/caniuse-lite/data/features/css-revert-value.js +1 -1
  931. package/app/node_modules/caniuse-lite/data/features/css-rrggbbaa.js +1 -1
  932. package/app/node_modules/caniuse-lite/data/features/css-scroll-behavior.js +1 -1
  933. package/app/node_modules/caniuse-lite/data/features/css-scrollbar.js +1 -1
  934. package/app/node_modules/caniuse-lite/data/features/css-sel2.js +1 -1
  935. package/app/node_modules/caniuse-lite/data/features/css-sel3.js +1 -1
  936. package/app/node_modules/caniuse-lite/data/features/css-selection.js +1 -1
  937. package/app/node_modules/caniuse-lite/data/features/css-shapes.js +1 -1
  938. package/app/node_modules/caniuse-lite/data/features/css-snappoints.js +1 -1
  939. package/app/node_modules/caniuse-lite/data/features/css-sticky.js +1 -1
  940. package/app/node_modules/caniuse-lite/data/features/css-subgrid.js +1 -1
  941. package/app/node_modules/caniuse-lite/data/features/css-supports-api.js +1 -1
  942. package/app/node_modules/caniuse-lite/data/features/css-table.js +1 -1
  943. package/app/node_modules/caniuse-lite/data/features/css-text-align-last.js +1 -1
  944. package/app/node_modules/caniuse-lite/data/features/css-text-box-trim.js +1 -1
  945. package/app/node_modules/caniuse-lite/data/features/css-text-indent.js +1 -1
  946. package/app/node_modules/caniuse-lite/data/features/css-text-justify.js +1 -1
  947. package/app/node_modules/caniuse-lite/data/features/css-text-orientation.js +1 -1
  948. package/app/node_modules/caniuse-lite/data/features/css-text-spacing.js +1 -1
  949. package/app/node_modules/caniuse-lite/data/features/css-text-wrap-balance.js +1 -1
  950. package/app/node_modules/caniuse-lite/data/features/css-textshadow.js +1 -1
  951. package/app/node_modules/caniuse-lite/data/features/css-touch-action.js +1 -1
  952. package/app/node_modules/caniuse-lite/data/features/css-transitions.js +1 -1
  953. package/app/node_modules/caniuse-lite/data/features/css-unicode-bidi.js +1 -1
  954. package/app/node_modules/caniuse-lite/data/features/css-unset-value.js +1 -1
  955. package/app/node_modules/caniuse-lite/data/features/css-variables.js +1 -1
  956. package/app/node_modules/caniuse-lite/data/features/css-when-else.js +1 -1
  957. package/app/node_modules/caniuse-lite/data/features/css-widows-orphans.js +1 -1
  958. package/app/node_modules/caniuse-lite/data/features/css-width-stretch.js +1 -1
  959. package/app/node_modules/caniuse-lite/data/features/css-writing-mode.js +1 -1
  960. package/app/node_modules/caniuse-lite/data/features/css-zoom.js +1 -1
  961. package/app/node_modules/caniuse-lite/data/features/css3-attr.js +1 -1
  962. package/app/node_modules/caniuse-lite/data/features/css3-boxsizing.js +1 -1
  963. package/app/node_modules/caniuse-lite/data/features/css3-colors.js +1 -1
  964. package/app/node_modules/caniuse-lite/data/features/css3-cursors-grab.js +1 -1
  965. package/app/node_modules/caniuse-lite/data/features/css3-cursors-newer.js +1 -1
  966. package/app/node_modules/caniuse-lite/data/features/css3-cursors.js +1 -1
  967. package/app/node_modules/caniuse-lite/data/features/css3-tabsize.js +1 -1
  968. package/app/node_modules/caniuse-lite/data/features/currentcolor.js +1 -1
  969. package/app/node_modules/caniuse-lite/data/features/custom-elements.js +1 -1
  970. package/app/node_modules/caniuse-lite/data/features/custom-elementsv1.js +1 -1
  971. package/app/node_modules/caniuse-lite/data/features/customevent.js +1 -1
  972. package/app/node_modules/caniuse-lite/data/features/customizable-select.js +1 -1
  973. package/app/node_modules/caniuse-lite/data/features/datalist.js +1 -1
  974. package/app/node_modules/caniuse-lite/data/features/dataset.js +1 -1
  975. package/app/node_modules/caniuse-lite/data/features/datauri.js +1 -1
  976. package/app/node_modules/caniuse-lite/data/features/date-tolocaledatestring.js +1 -1
  977. package/app/node_modules/caniuse-lite/data/features/declarative-shadow-dom.js +1 -1
  978. package/app/node_modules/caniuse-lite/data/features/decorators.js +1 -1
  979. package/app/node_modules/caniuse-lite/data/features/details.js +1 -1
  980. package/app/node_modules/caniuse-lite/data/features/deviceorientation.js +1 -1
  981. package/app/node_modules/caniuse-lite/data/features/devicepixelratio.js +1 -1
  982. package/app/node_modules/caniuse-lite/data/features/dialog.js +1 -1
  983. package/app/node_modules/caniuse-lite/data/features/dispatchevent.js +1 -1
  984. package/app/node_modules/caniuse-lite/data/features/dnssec.js +1 -1
  985. package/app/node_modules/caniuse-lite/data/features/do-not-track.js +1 -1
  986. package/app/node_modules/caniuse-lite/data/features/document-currentscript.js +1 -1
  987. package/app/node_modules/caniuse-lite/data/features/document-evaluate-xpath.js +1 -1
  988. package/app/node_modules/caniuse-lite/data/features/document-execcommand.js +1 -1
  989. package/app/node_modules/caniuse-lite/data/features/document-policy.js +1 -1
  990. package/app/node_modules/caniuse-lite/data/features/document-scrollingelement.js +1 -1
  991. package/app/node_modules/caniuse-lite/data/features/documenthead.js +1 -1
  992. package/app/node_modules/caniuse-lite/data/features/dom-manip-convenience.js +1 -1
  993. package/app/node_modules/caniuse-lite/data/features/dom-range.js +1 -1
  994. package/app/node_modules/caniuse-lite/data/features/domcontentloaded.js +1 -1
  995. package/app/node_modules/caniuse-lite/data/features/dommatrix.js +1 -1
  996. package/app/node_modules/caniuse-lite/data/features/download.js +1 -1
  997. package/app/node_modules/caniuse-lite/data/features/dragndrop.js +1 -1
  998. package/app/node_modules/caniuse-lite/data/features/element-closest.js +1 -1
  999. package/app/node_modules/caniuse-lite/data/features/element-from-point.js +1 -1
  1000. package/app/node_modules/caniuse-lite/data/features/element-scroll-methods.js +1 -1
  1001. package/app/node_modules/caniuse-lite/data/features/eme.js +1 -1
  1002. package/app/node_modules/caniuse-lite/data/features/eot.js +1 -1
  1003. package/app/node_modules/caniuse-lite/data/features/es5.js +1 -1
  1004. package/app/node_modules/caniuse-lite/data/features/es6-class.js +1 -1
  1005. package/app/node_modules/caniuse-lite/data/features/es6-generators.js +1 -1
  1006. package/app/node_modules/caniuse-lite/data/features/es6-module-dynamic-import.js +1 -1
  1007. package/app/node_modules/caniuse-lite/data/features/es6-module.js +1 -1
  1008. package/app/node_modules/caniuse-lite/data/features/es6-number.js +1 -1
  1009. package/app/node_modules/caniuse-lite/data/features/es6-string-includes.js +1 -1
  1010. package/app/node_modules/caniuse-lite/data/features/es6.js +1 -1
  1011. package/app/node_modules/caniuse-lite/data/features/eventsource.js +1 -1
  1012. package/app/node_modules/caniuse-lite/data/features/extended-system-fonts.js +1 -1
  1013. package/app/node_modules/caniuse-lite/data/features/feature-policy.js +1 -1
  1014. package/app/node_modules/caniuse-lite/data/features/fetch.js +1 -1
  1015. package/app/node_modules/caniuse-lite/data/features/fieldset-disabled.js +1 -1
  1016. package/app/node_modules/caniuse-lite/data/features/fileapi.js +1 -1
  1017. package/app/node_modules/caniuse-lite/data/features/filereader.js +1 -1
  1018. package/app/node_modules/caniuse-lite/data/features/filereadersync.js +1 -1
  1019. package/app/node_modules/caniuse-lite/data/features/filesystem.js +1 -1
  1020. package/app/node_modules/caniuse-lite/data/features/flac.js +1 -1
  1021. package/app/node_modules/caniuse-lite/data/features/flexbox-gap.js +1 -1
  1022. package/app/node_modules/caniuse-lite/data/features/flexbox.js +1 -1
  1023. package/app/node_modules/caniuse-lite/data/features/flow-root.js +1 -1
  1024. package/app/node_modules/caniuse-lite/data/features/focusin-focusout-events.js +1 -1
  1025. package/app/node_modules/caniuse-lite/data/features/font-family-system-ui.js +1 -1
  1026. package/app/node_modules/caniuse-lite/data/features/font-feature.js +1 -1
  1027. package/app/node_modules/caniuse-lite/data/features/font-kerning.js +1 -1
  1028. package/app/node_modules/caniuse-lite/data/features/font-loading.js +1 -1
  1029. package/app/node_modules/caniuse-lite/data/features/font-size-adjust.js +1 -1
  1030. package/app/node_modules/caniuse-lite/data/features/font-smooth.js +1 -1
  1031. package/app/node_modules/caniuse-lite/data/features/font-unicode-range.js +1 -1
  1032. package/app/node_modules/caniuse-lite/data/features/font-variant-alternates.js +1 -1
  1033. package/app/node_modules/caniuse-lite/data/features/font-variant-numeric.js +1 -1
  1034. package/app/node_modules/caniuse-lite/data/features/fontface.js +1 -1
  1035. package/app/node_modules/caniuse-lite/data/features/form-attribute.js +1 -1
  1036. package/app/node_modules/caniuse-lite/data/features/form-submit-attributes.js +1 -1
  1037. package/app/node_modules/caniuse-lite/data/features/form-validation.js +1 -1
  1038. package/app/node_modules/caniuse-lite/data/features/forms.js +1 -1
  1039. package/app/node_modules/caniuse-lite/data/features/fullscreen.js +1 -1
  1040. package/app/node_modules/caniuse-lite/data/features/gamepad.js +1 -1
  1041. package/app/node_modules/caniuse-lite/data/features/geolocation.js +1 -1
  1042. package/app/node_modules/caniuse-lite/data/features/getboundingclientrect.js +1 -1
  1043. package/app/node_modules/caniuse-lite/data/features/getcomputedstyle.js +1 -1
  1044. package/app/node_modules/caniuse-lite/data/features/getelementsbyclassname.js +1 -1
  1045. package/app/node_modules/caniuse-lite/data/features/getrandomvalues.js +1 -1
  1046. package/app/node_modules/caniuse-lite/data/features/gyroscope.js +1 -1
  1047. package/app/node_modules/caniuse-lite/data/features/hardwareconcurrency.js +1 -1
  1048. package/app/node_modules/caniuse-lite/data/features/hashchange.js +1 -1
  1049. package/app/node_modules/caniuse-lite/data/features/heif.js +1 -1
  1050. package/app/node_modules/caniuse-lite/data/features/hevc.js +1 -1
  1051. package/app/node_modules/caniuse-lite/data/features/hidden.js +1 -1
  1052. package/app/node_modules/caniuse-lite/data/features/high-resolution-time.js +1 -1
  1053. package/app/node_modules/caniuse-lite/data/features/history.js +1 -1
  1054. package/app/node_modules/caniuse-lite/data/features/html-media-capture.js +1 -1
  1055. package/app/node_modules/caniuse-lite/data/features/html5semantic.js +1 -1
  1056. package/app/node_modules/caniuse-lite/data/features/http-live-streaming.js +1 -1
  1057. package/app/node_modules/caniuse-lite/data/features/http2.js +1 -1
  1058. package/app/node_modules/caniuse-lite/data/features/http3.js +1 -1
  1059. package/app/node_modules/caniuse-lite/data/features/iframe-sandbox.js +1 -1
  1060. package/app/node_modules/caniuse-lite/data/features/iframe-seamless.js +1 -1
  1061. package/app/node_modules/caniuse-lite/data/features/iframe-srcdoc.js +1 -1
  1062. package/app/node_modules/caniuse-lite/data/features/imagecapture.js +1 -1
  1063. package/app/node_modules/caniuse-lite/data/features/ime.js +1 -1
  1064. package/app/node_modules/caniuse-lite/data/features/img-naturalwidth-naturalheight.js +1 -1
  1065. package/app/node_modules/caniuse-lite/data/features/import-maps.js +1 -1
  1066. package/app/node_modules/caniuse-lite/data/features/imports.js +1 -1
  1067. package/app/node_modules/caniuse-lite/data/features/indeterminate-checkbox.js +1 -1
  1068. package/app/node_modules/caniuse-lite/data/features/indexeddb.js +1 -1
  1069. package/app/node_modules/caniuse-lite/data/features/indexeddb2.js +1 -1
  1070. package/app/node_modules/caniuse-lite/data/features/inline-block.js +1 -1
  1071. package/app/node_modules/caniuse-lite/data/features/innertext.js +1 -1
  1072. package/app/node_modules/caniuse-lite/data/features/input-autocomplete-onoff.js +1 -1
  1073. package/app/node_modules/caniuse-lite/data/features/input-color.js +1 -1
  1074. package/app/node_modules/caniuse-lite/data/features/input-datetime.js +1 -1
  1075. package/app/node_modules/caniuse-lite/data/features/input-email-tel-url.js +1 -1
  1076. package/app/node_modules/caniuse-lite/data/features/input-event.js +1 -1
  1077. package/app/node_modules/caniuse-lite/data/features/input-file-accept.js +1 -1
  1078. package/app/node_modules/caniuse-lite/data/features/input-file-directory.js +1 -1
  1079. package/app/node_modules/caniuse-lite/data/features/input-file-multiple.js +1 -1
  1080. package/app/node_modules/caniuse-lite/data/features/input-inputmode.js +1 -1
  1081. package/app/node_modules/caniuse-lite/data/features/input-minlength.js +1 -1
  1082. package/app/node_modules/caniuse-lite/data/features/input-number.js +1 -1
  1083. package/app/node_modules/caniuse-lite/data/features/input-pattern.js +1 -1
  1084. package/app/node_modules/caniuse-lite/data/features/input-placeholder.js +1 -1
  1085. package/app/node_modules/caniuse-lite/data/features/input-range.js +1 -1
  1086. package/app/node_modules/caniuse-lite/data/features/input-search.js +1 -1
  1087. package/app/node_modules/caniuse-lite/data/features/input-selection.js +1 -1
  1088. package/app/node_modules/caniuse-lite/data/features/insert-adjacent.js +1 -1
  1089. package/app/node_modules/caniuse-lite/data/features/insertadjacenthtml.js +1 -1
  1090. package/app/node_modules/caniuse-lite/data/features/internationalization.js +1 -1
  1091. package/app/node_modules/caniuse-lite/data/features/intersectionobserver-v2.js +1 -1
  1092. package/app/node_modules/caniuse-lite/data/features/intersectionobserver.js +1 -1
  1093. package/app/node_modules/caniuse-lite/data/features/intl-pluralrules.js +1 -1
  1094. package/app/node_modules/caniuse-lite/data/features/intrinsic-width.js +1 -1
  1095. package/app/node_modules/caniuse-lite/data/features/jpeg2000.js +1 -1
  1096. package/app/node_modules/caniuse-lite/data/features/jpegxl.js +1 -1
  1097. package/app/node_modules/caniuse-lite/data/features/jpegxr.js +1 -1
  1098. package/app/node_modules/caniuse-lite/data/features/js-regexp-lookbehind.js +1 -1
  1099. package/app/node_modules/caniuse-lite/data/features/json.js +1 -1
  1100. package/app/node_modules/caniuse-lite/data/features/justify-content-space-evenly.js +1 -1
  1101. package/app/node_modules/caniuse-lite/data/features/kerning-pairs-ligatures.js +1 -1
  1102. package/app/node_modules/caniuse-lite/data/features/keyboardevent-charcode.js +1 -1
  1103. package/app/node_modules/caniuse-lite/data/features/keyboardevent-code.js +1 -1
  1104. package/app/node_modules/caniuse-lite/data/features/keyboardevent-getmodifierstate.js +1 -1
  1105. package/app/node_modules/caniuse-lite/data/features/keyboardevent-key.js +1 -1
  1106. package/app/node_modules/caniuse-lite/data/features/keyboardevent-location.js +1 -1
  1107. package/app/node_modules/caniuse-lite/data/features/keyboardevent-which.js +1 -1
  1108. package/app/node_modules/caniuse-lite/data/features/lazyload.js +1 -1
  1109. package/app/node_modules/caniuse-lite/data/features/let.js +1 -1
  1110. package/app/node_modules/caniuse-lite/data/features/link-icon-png.js +1 -1
  1111. package/app/node_modules/caniuse-lite/data/features/link-icon-svg.js +1 -1
  1112. package/app/node_modules/caniuse-lite/data/features/link-rel-dns-prefetch.js +1 -1
  1113. package/app/node_modules/caniuse-lite/data/features/link-rel-modulepreload.js +1 -1
  1114. package/app/node_modules/caniuse-lite/data/features/link-rel-preconnect.js +1 -1
  1115. package/app/node_modules/caniuse-lite/data/features/link-rel-prefetch.js +1 -1
  1116. package/app/node_modules/caniuse-lite/data/features/link-rel-preload.js +1 -1
  1117. package/app/node_modules/caniuse-lite/data/features/link-rel-prerender.js +1 -1
  1118. package/app/node_modules/caniuse-lite/data/features/loading-lazy-attr.js +1 -1
  1119. package/app/node_modules/caniuse-lite/data/features/loading-lazy-media.js +1 -1
  1120. package/app/node_modules/caniuse-lite/data/features/localecompare.js +1 -1
  1121. package/app/node_modules/caniuse-lite/data/features/magnetometer.js +1 -1
  1122. package/app/node_modules/caniuse-lite/data/features/matchesselector.js +1 -1
  1123. package/app/node_modules/caniuse-lite/data/features/matchmedia.js +1 -1
  1124. package/app/node_modules/caniuse-lite/data/features/mathml.js +1 -1
  1125. package/app/node_modules/caniuse-lite/data/features/maxlength.js +1 -1
  1126. package/app/node_modules/caniuse-lite/data/features/mdn-css-backdrop-pseudo-element.js +1 -1
  1127. package/app/node_modules/caniuse-lite/data/features/mdn-css-unicode-bidi-isolate-override.js +1 -1
  1128. package/app/node_modules/caniuse-lite/data/features/mdn-css-unicode-bidi-isolate.js +1 -1
  1129. package/app/node_modules/caniuse-lite/data/features/mdn-css-unicode-bidi-plaintext.js +1 -1
  1130. package/app/node_modules/caniuse-lite/data/features/mdn-text-decoration-color.js +1 -1
  1131. package/app/node_modules/caniuse-lite/data/features/mdn-text-decoration-line.js +1 -1
  1132. package/app/node_modules/caniuse-lite/data/features/mdn-text-decoration-shorthand.js +1 -1
  1133. package/app/node_modules/caniuse-lite/data/features/mdn-text-decoration-style.js +1 -1
  1134. package/app/node_modules/caniuse-lite/data/features/media-fragments.js +1 -1
  1135. package/app/node_modules/caniuse-lite/data/features/mediacapture-fromelement.js +1 -1
  1136. package/app/node_modules/caniuse-lite/data/features/mediarecorder.js +1 -1
  1137. package/app/node_modules/caniuse-lite/data/features/mediasource.js +1 -1
  1138. package/app/node_modules/caniuse-lite/data/features/menu.js +1 -1
  1139. package/app/node_modules/caniuse-lite/data/features/meta-theme-color.js +1 -1
  1140. package/app/node_modules/caniuse-lite/data/features/meter.js +1 -1
  1141. package/app/node_modules/caniuse-lite/data/features/midi.js +1 -1
  1142. package/app/node_modules/caniuse-lite/data/features/minmaxwh.js +1 -1
  1143. package/app/node_modules/caniuse-lite/data/features/mp3.js +1 -1
  1144. package/app/node_modules/caniuse-lite/data/features/mpeg-dash.js +1 -1
  1145. package/app/node_modules/caniuse-lite/data/features/mpeg4.js +1 -1
  1146. package/app/node_modules/caniuse-lite/data/features/multibackgrounds.js +1 -1
  1147. package/app/node_modules/caniuse-lite/data/features/multicolumn.js +1 -1
  1148. package/app/node_modules/caniuse-lite/data/features/mutation-events.js +1 -1
  1149. package/app/node_modules/caniuse-lite/data/features/mutationobserver.js +1 -1
  1150. package/app/node_modules/caniuse-lite/data/features/namevalue-storage.js +1 -1
  1151. package/app/node_modules/caniuse-lite/data/features/native-filesystem-api.js +1 -1
  1152. package/app/node_modules/caniuse-lite/data/features/nav-timing.js +1 -1
  1153. package/app/node_modules/caniuse-lite/data/features/netinfo.js +1 -1
  1154. package/app/node_modules/caniuse-lite/data/features/notifications.js +1 -1
  1155. package/app/node_modules/caniuse-lite/data/features/object-entries.js +1 -1
  1156. package/app/node_modules/caniuse-lite/data/features/object-fit.js +1 -1
  1157. package/app/node_modules/caniuse-lite/data/features/object-observe.js +1 -1
  1158. package/app/node_modules/caniuse-lite/data/features/object-values.js +1 -1
  1159. package/app/node_modules/caniuse-lite/data/features/objectrtc.js +1 -1
  1160. package/app/node_modules/caniuse-lite/data/features/offline-apps.js +1 -1
  1161. package/app/node_modules/caniuse-lite/data/features/offscreencanvas.js +1 -1
  1162. package/app/node_modules/caniuse-lite/data/features/ogg-vorbis.js +1 -1
  1163. package/app/node_modules/caniuse-lite/data/features/ogv.js +1 -1
  1164. package/app/node_modules/caniuse-lite/data/features/ol-reversed.js +1 -1
  1165. package/app/node_modules/caniuse-lite/data/features/once-event-listener.js +1 -1
  1166. package/app/node_modules/caniuse-lite/data/features/online-status.js +1 -1
  1167. package/app/node_modules/caniuse-lite/data/features/opus.js +1 -1
  1168. package/app/node_modules/caniuse-lite/data/features/orientation-sensor.js +1 -1
  1169. package/app/node_modules/caniuse-lite/data/features/outline.js +1 -1
  1170. package/app/node_modules/caniuse-lite/data/features/pad-start-end.js +1 -1
  1171. package/app/node_modules/caniuse-lite/data/features/page-transition-events.js +1 -1
  1172. package/app/node_modules/caniuse-lite/data/features/pagevisibility.js +1 -1
  1173. package/app/node_modules/caniuse-lite/data/features/passive-event-listener.js +1 -1
  1174. package/app/node_modules/caniuse-lite/data/features/passkeys.js +1 -1
  1175. package/app/node_modules/caniuse-lite/data/features/passwordrules.js +1 -1
  1176. package/app/node_modules/caniuse-lite/data/features/path2d.js +1 -1
  1177. package/app/node_modules/caniuse-lite/data/features/payment-request.js +1 -1
  1178. package/app/node_modules/caniuse-lite/data/features/pdf-viewer.js +1 -1
  1179. package/app/node_modules/caniuse-lite/data/features/permissions-api.js +1 -1
  1180. package/app/node_modules/caniuse-lite/data/features/permissions-policy.js +1 -1
  1181. package/app/node_modules/caniuse-lite/data/features/picture-in-picture.js +1 -1
  1182. package/app/node_modules/caniuse-lite/data/features/picture.js +1 -1
  1183. package/app/node_modules/caniuse-lite/data/features/ping.js +1 -1
  1184. package/app/node_modules/caniuse-lite/data/features/png-alpha.js +1 -1
  1185. package/app/node_modules/caniuse-lite/data/features/pointer-events.js +1 -1
  1186. package/app/node_modules/caniuse-lite/data/features/pointer.js +1 -1
  1187. package/app/node_modules/caniuse-lite/data/features/pointerlock.js +1 -1
  1188. package/app/node_modules/caniuse-lite/data/features/portals.js +1 -1
  1189. package/app/node_modules/caniuse-lite/data/features/prefers-color-scheme.js +1 -1
  1190. package/app/node_modules/caniuse-lite/data/features/prefers-reduced-motion.js +1 -1
  1191. package/app/node_modules/caniuse-lite/data/features/progress.js +1 -1
  1192. package/app/node_modules/caniuse-lite/data/features/promise-finally.js +1 -1
  1193. package/app/node_modules/caniuse-lite/data/features/promises.js +1 -1
  1194. package/app/node_modules/caniuse-lite/data/features/proximity.js +1 -1
  1195. package/app/node_modules/caniuse-lite/data/features/proxy.js +1 -1
  1196. package/app/node_modules/caniuse-lite/data/features/publickeypinning.js +1 -1
  1197. package/app/node_modules/caniuse-lite/data/features/push-api.js +1 -1
  1198. package/app/node_modules/caniuse-lite/data/features/queryselector.js +1 -1
  1199. package/app/node_modules/caniuse-lite/data/features/readonly-attr.js +1 -1
  1200. package/app/node_modules/caniuse-lite/data/features/referrer-policy.js +1 -1
  1201. package/app/node_modules/caniuse-lite/data/features/registerprotocolhandler.js +1 -1
  1202. package/app/node_modules/caniuse-lite/data/features/rel-noopener.js +1 -1
  1203. package/app/node_modules/caniuse-lite/data/features/rel-noreferrer.js +1 -1
  1204. package/app/node_modules/caniuse-lite/data/features/rellist.js +1 -1
  1205. package/app/node_modules/caniuse-lite/data/features/rem.js +1 -1
  1206. package/app/node_modules/caniuse-lite/data/features/requestanimationframe.js +1 -1
  1207. package/app/node_modules/caniuse-lite/data/features/requestidlecallback.js +1 -1
  1208. package/app/node_modules/caniuse-lite/data/features/resizeobserver.js +1 -1
  1209. package/app/node_modules/caniuse-lite/data/features/resource-timing.js +1 -1
  1210. package/app/node_modules/caniuse-lite/data/features/rest-parameters.js +1 -1
  1211. package/app/node_modules/caniuse-lite/data/features/rtcpeerconnection.js +1 -1
  1212. package/app/node_modules/caniuse-lite/data/features/ruby.js +1 -1
  1213. package/app/node_modules/caniuse-lite/data/features/run-in.js +1 -1
  1214. package/app/node_modules/caniuse-lite/data/features/same-site-cookie-attribute.js +1 -1
  1215. package/app/node_modules/caniuse-lite/data/features/screen-orientation.js +1 -1
  1216. package/app/node_modules/caniuse-lite/data/features/script-async.js +1 -1
  1217. package/app/node_modules/caniuse-lite/data/features/script-defer.js +1 -1
  1218. package/app/node_modules/caniuse-lite/data/features/scrollintoview.js +1 -1
  1219. package/app/node_modules/caniuse-lite/data/features/scrollintoviewifneeded.js +1 -1
  1220. package/app/node_modules/caniuse-lite/data/features/sdch.js +1 -1
  1221. package/app/node_modules/caniuse-lite/data/features/selection-api.js +1 -1
  1222. package/app/node_modules/caniuse-lite/data/features/server-timing.js +1 -1
  1223. package/app/node_modules/caniuse-lite/data/features/serviceworkers.js +1 -1
  1224. package/app/node_modules/caniuse-lite/data/features/setimmediate.js +1 -1
  1225. package/app/node_modules/caniuse-lite/data/features/shadowdom.js +1 -1
  1226. package/app/node_modules/caniuse-lite/data/features/shadowdomv1.js +1 -1
  1227. package/app/node_modules/caniuse-lite/data/features/sharedarraybuffer.js +1 -1
  1228. package/app/node_modules/caniuse-lite/data/features/sharedworkers.js +1 -1
  1229. package/app/node_modules/caniuse-lite/data/features/sni.js +1 -1
  1230. package/app/node_modules/caniuse-lite/data/features/spdy.js +1 -1
  1231. package/app/node_modules/caniuse-lite/data/features/speech-recognition.js +1 -1
  1232. package/app/node_modules/caniuse-lite/data/features/speech-synthesis.js +1 -1
  1233. package/app/node_modules/caniuse-lite/data/features/spellcheck-attribute.js +1 -1
  1234. package/app/node_modules/caniuse-lite/data/features/sql-storage.js +1 -1
  1235. package/app/node_modules/caniuse-lite/data/features/srcset.js +1 -1
  1236. package/app/node_modules/caniuse-lite/data/features/stream.js +1 -1
  1237. package/app/node_modules/caniuse-lite/data/features/streams.js +1 -1
  1238. package/app/node_modules/caniuse-lite/data/features/stricttransportsecurity.js +1 -1
  1239. package/app/node_modules/caniuse-lite/data/features/style-scoped.js +1 -1
  1240. package/app/node_modules/caniuse-lite/data/features/subresource-bundling.js +1 -1
  1241. package/app/node_modules/caniuse-lite/data/features/subresource-integrity.js +1 -1
  1242. package/app/node_modules/caniuse-lite/data/features/svg-css.js +1 -1
  1243. package/app/node_modules/caniuse-lite/data/features/svg-filters.js +1 -1
  1244. package/app/node_modules/caniuse-lite/data/features/svg-fonts.js +1 -1
  1245. package/app/node_modules/caniuse-lite/data/features/svg-fragment.js +1 -1
  1246. package/app/node_modules/caniuse-lite/data/features/svg-html.js +1 -1
  1247. package/app/node_modules/caniuse-lite/data/features/svg-html5.js +1 -1
  1248. package/app/node_modules/caniuse-lite/data/features/svg-img.js +1 -1
  1249. package/app/node_modules/caniuse-lite/data/features/svg-smil.js +1 -1
  1250. package/app/node_modules/caniuse-lite/data/features/svg.js +1 -1
  1251. package/app/node_modules/caniuse-lite/data/features/sxg.js +1 -1
  1252. package/app/node_modules/caniuse-lite/data/features/tabindex-attr.js +1 -1
  1253. package/app/node_modules/caniuse-lite/data/features/template-literals.js +1 -1
  1254. package/app/node_modules/caniuse-lite/data/features/template.js +1 -1
  1255. package/app/node_modules/caniuse-lite/data/features/temporal.js +1 -1
  1256. package/app/node_modules/caniuse-lite/data/features/testfeat.js +1 -1
  1257. package/app/node_modules/caniuse-lite/data/features/text-decoration.js +1 -1
  1258. package/app/node_modules/caniuse-lite/data/features/text-emphasis.js +1 -1
  1259. package/app/node_modules/caniuse-lite/data/features/text-overflow.js +1 -1
  1260. package/app/node_modules/caniuse-lite/data/features/text-size-adjust.js +1 -1
  1261. package/app/node_modules/caniuse-lite/data/features/text-stroke.js +1 -1
  1262. package/app/node_modules/caniuse-lite/data/features/textcontent.js +1 -1
  1263. package/app/node_modules/caniuse-lite/data/features/textencoder.js +1 -1
  1264. package/app/node_modules/caniuse-lite/data/features/tls1-1.js +1 -1
  1265. package/app/node_modules/caniuse-lite/data/features/tls1-2.js +1 -1
  1266. package/app/node_modules/caniuse-lite/data/features/tls1-3.js +1 -1
  1267. package/app/node_modules/caniuse-lite/data/features/touch.js +1 -1
  1268. package/app/node_modules/caniuse-lite/data/features/transforms2d.js +1 -1
  1269. package/app/node_modules/caniuse-lite/data/features/transforms3d.js +1 -1
  1270. package/app/node_modules/caniuse-lite/data/features/trusted-types.js +1 -1
  1271. package/app/node_modules/caniuse-lite/data/features/ttf.js +1 -1
  1272. package/app/node_modules/caniuse-lite/data/features/typedarrays.js +1 -1
  1273. package/app/node_modules/caniuse-lite/data/features/u2f.js +1 -1
  1274. package/app/node_modules/caniuse-lite/data/features/unhandledrejection.js +1 -1
  1275. package/app/node_modules/caniuse-lite/data/features/upgradeinsecurerequests.js +1 -1
  1276. package/app/node_modules/caniuse-lite/data/features/url-scroll-to-text-fragment.js +1 -1
  1277. package/app/node_modules/caniuse-lite/data/features/url.js +1 -1
  1278. package/app/node_modules/caniuse-lite/data/features/urlsearchparams.js +1 -1
  1279. package/app/node_modules/caniuse-lite/data/features/use-strict.js +1 -1
  1280. package/app/node_modules/caniuse-lite/data/features/user-select-none.js +1 -1
  1281. package/app/node_modules/caniuse-lite/data/features/user-timing.js +1 -1
  1282. package/app/node_modules/caniuse-lite/data/features/variable-fonts.js +1 -1
  1283. package/app/node_modules/caniuse-lite/data/features/vector-effect.js +1 -1
  1284. package/app/node_modules/caniuse-lite/data/features/vibration.js +1 -1
  1285. package/app/node_modules/caniuse-lite/data/features/video.js +1 -1
  1286. package/app/node_modules/caniuse-lite/data/features/videotracks.js +1 -1
  1287. package/app/node_modules/caniuse-lite/data/features/view-transitions.js +1 -1
  1288. package/app/node_modules/caniuse-lite/data/features/viewport-unit-variants.js +1 -1
  1289. package/app/node_modules/caniuse-lite/data/features/viewport-units.js +1 -1
  1290. package/app/node_modules/caniuse-lite/data/features/wai-aria.js +1 -1
  1291. package/app/node_modules/caniuse-lite/data/features/wake-lock.js +1 -1
  1292. package/app/node_modules/caniuse-lite/data/features/wasm-bigint.js +1 -1
  1293. package/app/node_modules/caniuse-lite/data/features/wasm-bulk-memory.js +1 -1
  1294. package/app/node_modules/caniuse-lite/data/features/wasm-extended-const.js +1 -1
  1295. package/app/node_modules/caniuse-lite/data/features/wasm-gc.js +1 -1
  1296. package/app/node_modules/caniuse-lite/data/features/wasm-multi-memory.js +1 -1
  1297. package/app/node_modules/caniuse-lite/data/features/wasm-multi-value.js +1 -1
  1298. package/app/node_modules/caniuse-lite/data/features/wasm-mutable-globals.js +1 -1
  1299. package/app/node_modules/caniuse-lite/data/features/wasm-nontrapping-fptoint.js +1 -1
  1300. package/app/node_modules/caniuse-lite/data/features/wasm-reference-types.js +1 -1
  1301. package/app/node_modules/caniuse-lite/data/features/wasm-relaxed-simd.js +1 -1
  1302. package/app/node_modules/caniuse-lite/data/features/wasm-signext.js +1 -1
  1303. package/app/node_modules/caniuse-lite/data/features/wasm-simd.js +1 -1
  1304. package/app/node_modules/caniuse-lite/data/features/wasm-tail-calls.js +1 -1
  1305. package/app/node_modules/caniuse-lite/data/features/wasm-threads.js +1 -1
  1306. package/app/node_modules/caniuse-lite/data/features/wasm.js +1 -1
  1307. package/app/node_modules/caniuse-lite/data/features/wav.js +1 -1
  1308. package/app/node_modules/caniuse-lite/data/features/wbr-element.js +1 -1
  1309. package/app/node_modules/caniuse-lite/data/features/web-animation.js +1 -1
  1310. package/app/node_modules/caniuse-lite/data/features/web-app-manifest.js +1 -1
  1311. package/app/node_modules/caniuse-lite/data/features/web-bluetooth.js +1 -1
  1312. package/app/node_modules/caniuse-lite/data/features/web-serial.js +1 -1
  1313. package/app/node_modules/caniuse-lite/data/features/web-share.js +1 -1
  1314. package/app/node_modules/caniuse-lite/data/features/webauthn.js +1 -1
  1315. package/app/node_modules/caniuse-lite/data/features/webcodecs.js +1 -1
  1316. package/app/node_modules/caniuse-lite/data/features/webgl.js +1 -1
  1317. package/app/node_modules/caniuse-lite/data/features/webgl2.js +1 -1
  1318. package/app/node_modules/caniuse-lite/data/features/webgpu.js +1 -1
  1319. package/app/node_modules/caniuse-lite/data/features/webhid.js +1 -1
  1320. package/app/node_modules/caniuse-lite/data/features/webkit-user-drag.js +1 -1
  1321. package/app/node_modules/caniuse-lite/data/features/webm.js +1 -1
  1322. package/app/node_modules/caniuse-lite/data/features/webnfc.js +1 -1
  1323. package/app/node_modules/caniuse-lite/data/features/webp.js +1 -1
  1324. package/app/node_modules/caniuse-lite/data/features/websockets.js +1 -1
  1325. package/app/node_modules/caniuse-lite/data/features/webtransport.js +1 -1
  1326. package/app/node_modules/caniuse-lite/data/features/webusb.js +1 -1
  1327. package/app/node_modules/caniuse-lite/data/features/webvr.js +1 -1
  1328. package/app/node_modules/caniuse-lite/data/features/webvtt.js +1 -1
  1329. package/app/node_modules/caniuse-lite/data/features/webworkers.js +1 -1
  1330. package/app/node_modules/caniuse-lite/data/features/webxr.js +1 -1
  1331. package/app/node_modules/caniuse-lite/data/features/will-change.js +1 -1
  1332. package/app/node_modules/caniuse-lite/data/features/woff.js +1 -1
  1333. package/app/node_modules/caniuse-lite/data/features/woff2.js +1 -1
  1334. package/app/node_modules/caniuse-lite/data/features/word-break.js +1 -1
  1335. package/app/node_modules/caniuse-lite/data/features/wordwrap.js +1 -1
  1336. package/app/node_modules/caniuse-lite/data/features/x-doc-messaging.js +1 -1
  1337. package/app/node_modules/caniuse-lite/data/features/x-frame-options.js +1 -1
  1338. package/app/node_modules/caniuse-lite/data/features/xhr2.js +1 -1
  1339. package/app/node_modules/caniuse-lite/data/features/xhtml.js +1 -1
  1340. package/app/node_modules/caniuse-lite/data/features/xhtmlsmil.js +1 -1
  1341. package/app/node_modules/caniuse-lite/data/features/xml-serializer.js +1 -1
  1342. package/app/node_modules/caniuse-lite/data/features/zstd.js +1 -1
  1343. package/app/node_modules/caniuse-lite/package.json +1 -1
  1344. package/app/node_modules/file-uri-to-path/index.js +66 -0
  1345. package/app/node_modules/file-uri-to-path/package.json +32 -0
  1346. package/app/package.json +1 -1
  1347. package/app/server.js +1 -1
  1348. package/package.json +1 -1
  1349. package/app/.next-cli-build/server/chunks/1140.js +0 -1
  1350. package/app/.next-cli-build/server/chunks/5010.js +0 -1
  1351. package/app/.next-cli-build/static/chunks/1051-200f4cd85d329ee1.js +0 -64
  1352. package/app/.next-cli-build/static/chunks/914-573e927dd0d28804.js +0 -3
  1353. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/page-801aedab57fcaa26.js +0 -1
  1354. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/page-6a96211331520ca2.js +0 -1
  1355. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/page-3b7ac33715ed9443.js +0 -1
  1356. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-3e3894c3190056ff.js +0 -1
  1357. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/page-7bfbaeb3710b77a8.js +0 -1
  1358. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-1fe617aa782e4160.js +0 -1
  1359. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-18b2cd1c6220a6e4.js +0 -1
  1360. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-fac32d8209fbc1c3.js +0 -1
  1361. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-9578f3d76fbaa373.js +0 -1
  1362. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-7d8ba7acdca3b1c6.js +0 -1
  1363. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/page-44646bac9ec2d23d.js +0 -1
  1364. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-f8ecb5734644f39b.js +0 -1
  1365. package/app/.next-cli-build/static/chunks/app/_not-found/page-66e88a1e31434866.js +0 -1
  1366. package/app/.next-cli-build/static/chunks/app/callback/page-211adc2e5176e1d8.js +0 -1
  1367. package/app/.next-cli-build/static/chunks/app/dashboard/settings/pricing/page-32954986dfd50f55.js +0 -1
  1368. package/app/.next-cli-build/static/chunks/app/landing/page-c17fc6c02f90dc29.js +0 -1
  1369. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/global-error-185d86f74560bed6.js +0 -1
  1370. package/app/.next-cli-build/static/media/material-symbols-outlined.a9f35393.woff2 +0 -0
  1371. package/app/cli/.build-home/.9router/db/backups/upgrade-0.4.74-to-0.4.75-0.4.75-20260607-112616/data.sqlite +0 -0
  1372. package/app/cli/.build-home/.9router/db/backups/upgrade-0.4.75-to-0.4.76-0.4.76-20260608-012630/data.sqlite +0 -0
  1373. package/app/cli/.build-home/.9router/db/backups/upgrade-0.4.76-to-0.4.77-0.4.77-20260616-084008/data.sqlite +0 -0
  1374. package/app/cli/.build-home/.9router/db/backups/upgrade-0.4.77-to-0.4.78-0.4.78-20260616-091300/data.sqlite +0 -0
  1375. /package/app/.next-cli-build/static/{kS9AHbrigcLJlCrIJgeZV → XqDJAWzPMfnPfpXkX8S8H}/_buildManifest.js +0 -0
  1376. /package/app/.next-cli-build/static/{kS9AHbrigcLJlCrIJgeZV → XqDJAWzPMfnPfpXkX8S8H}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9260],{10464:(e,s,t)=>{Promise.resolve().then(t.bind(t,71088))},71088:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>b});var r=t(95155),a=t(98500),i=t.n(a),l=t(12115),o=t(73321),c=t(35497),n=t(57250),d=t(52679);function m(e){let s=Object.entries(e).some(([e,s])=>e.startsWith("modelLock_")&&s&&new Date(s).getTime()>Date.now());return"unavailable"!==e.testStatus||s?e.testStatus:"active"}function x({provider:e,kind:s,connections:t}){let a=d.Q2[e.id],l=!!a?.noAuth,o=t.filter(s=>s.provider===e.id),h=o.filter(e=>{let s=m(e);return"active"===s||"success"===s}).length,p=o.filter(e=>{let s=m(e);return"error"===s||"expired"===s||"unavailable"===s}).length,b=o.length,u=b>0&&o.every(e=>!1===e.isActive);return(0,r.jsx)(i(),{href:`/dashboard/media-providers/${s}/${e.id}`,className:"group",children:(0,r.jsx)(c.Zp,{padding:"xs",className:`h-full hover:bg-black/[0.01] dark:hover:bg-white/[0.01] transition-colors cursor-pointer ${u?"opacity-50":""}`,children:(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,r.jsx)("div",{className:"size-8 rounded-lg flex items-center justify-center shrink-0",style:{backgroundColor:`${e.color?.length>7?e.color:(e.color??"#888")+"15"}`},children:(0,r.jsx)(n.A,{src:`/providers/${e.id}.png`,alt:e.name,size:30,className:"object-contain rounded-lg max-w-[30px] max-h-[30px]",fallbackText:e.textIcon||e.id.slice(0,2).toUpperCase(),fallbackColor:e.color})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"font-semibold text-sm",children:e.name}),(0,r.jsx)("div",{className:"flex items-center gap-2 mt-0.5 flex-wrap",children:l?(0,r.jsx)(c.Ex,{variant:"success",size:"sm",children:"Ready"}):u?(0,r.jsx)(c.Ex,{variant:"default",size:"sm",children:"Disabled"}):0===b?(0,r.jsx)("span",{className:"text-xs text-text-muted",children:"No connections"}):(0,r.jsxs)(r.Fragment,{children:[h>0&&(0,r.jsxs)(c.Ex,{variant:"success",size:"sm",dot:!0,children:[h," Connected"]}),p>0&&(0,r.jsxs)(c.Ex,{variant:"error",size:"sm",dot:!0,children:[p," Error"]}),0===h&&0===p&&(0,r.jsxs)(c.Ex,{variant:"default",size:"sm",children:[b," Added"]})]})})]})]})})})}function h({combos:e}){return 0===e.length?(0,r.jsx)("p",{className:"text-xs text-text-muted italic",children:"No combos yet."}):(0,r.jsx)("div",{className:"flex flex-col gap-2",children:e.map(e=>(0,r.jsx)(i(),{href:`/dashboard/media-providers/combo/${e.id}`,children:(0,r.jsx)(c.Zp,{padding:"xs",className:"hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors cursor-pointer",children:(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:"layers"}),(0,r.jsx)("code",{className:"text-sm font-mono font-medium flex-1 truncate",children:e.name}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-1 sm:shrink-0",children:[e.models.slice(0,6).map((e,s)=>{let t="string"==typeof e?e.split("/")[0]:"",a=d.Q2[t];return(0,r.jsx)("div",{title:a?.name||e,className:"size-5 rounded flex items-center justify-center",style:{backgroundColor:`${a?.color??"#888"}15`},children:(0,r.jsx)(n.A,{src:`/providers/${t}.png`,alt:a?.name||t,size:18,className:"object-contain rounded max-w-[18px] max-h-[18px]",fallbackText:a?.textIcon||t.slice(0,2).toUpperCase(),fallbackColor:a?.color})},`${e}-${s}`)}),e.models.length>6&&(0,r.jsxs)("span",{className:"text-[10px] text-text-muted ml-1",children:["+",e.models.length-6]})]}),(0,r.jsx)("span",{className:"text-[11px] text-text-muted shrink-0",children:e.models.length}),(0,r.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[16px]",children:"chevron_right"})]})})},e.id))})}function p({title:e,icon:s,kind:t,providers:a,connections:i,combos:l,onCreateCombo:o}){return(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary",children:s}),(0,r.jsx)("h2",{className:"text-base font-semibold",children:e}),(0,r.jsxs)("span",{className:"text-xs text-text-muted",children:["(",a.length," providers \xb7 ",l.length," combos)"]})]}),(0,r.jsx)(c.$n,{size:"sm",icon:"add",onClick:o,children:"Create Combo"})]}),l.length>0&&(0,r.jsx)("div",{className:"mb-4",children:(0,r.jsx)(h,{combos:l})}),0===a.length?(0,r.jsx)("div",{className:"text-center py-8 border border-dashed border-border rounded-xl text-text-muted text-sm",children:"No providers."}):(0,r.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:a.map(e=>(0,r.jsx)(x,{provider:e,kind:t,connections:i},e.id))})]})}function b(){let e=(0,o.useRouter)(),[s,t]=(0,l.useState)([]),[a,i]=(0,l.useState)([]),c=async()=>{try{let[e,s]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/combos",{cache:"no-store"})]);e.ok&&t((await e.json()).connections||[]),s.ok&&i((await s.json()).combos||[])}catch{}};(0,l.useEffect)(()=>{c()},[]);let n=(0,d.o5)("webSearch"),m=(0,d.o5)("webFetch"),x=a.filter(e=>"webSearch"===e.kind),h=a.filter(e=>"webFetch"===e.kind),b=async s=>{let t="webSearch"===s?"search-combo":"fetch-combo",r=t,i=1,l=new Set(a.map(e=>e.name));for(;l.has(r);)r=`${t}-${i++}`;let o=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:r,models:[],kind:s})});if(o.ok){let s=await o.json();e.push(`/dashboard/media-providers/combo/${s.id}`)}else alert((await o.json()).error||"Failed to create combo")};return(0,r.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,r.jsx)(p,{title:"Web Search",icon:"search",kind:"webSearch",providers:n,connections:s,combos:x,onCreateCombo:()=>b("webSearch")}),(0,r.jsx)("div",{className:"border-t border-border"}),(0,r.jsx)(p,{title:"Web Fetch",icon:"travel_explore",kind:"webFetch",providers:m,connections:s,combos:h,onCreateCombo:()=>b("webFetch")})]})}}},e=>{e.O(0,[2574,3862,1051,1321,5497,8441,3794,7358],()=>e(e.s=10464)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9260],{63172:(e,s,t)=>{Promise.resolve().then(t.bind(t,71088))},71088:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>b});var r=t(95155),a=t(98500),i=t.n(a),l=t(12115),o=t(73321),c=t(35497),n=t(57250),d=t(52679);function m(e){let s=Object.entries(e).some(([e,s])=>e.startsWith("modelLock_")&&s&&new Date(s).getTime()>Date.now());return"unavailable"!==e.testStatus||s?e.testStatus:"active"}function x({provider:e,kind:s,connections:t}){let a=d.Q2[e.id],l=!!a?.noAuth,o=t.filter(s=>s.provider===e.id),h=o.filter(e=>{let s=m(e);return"active"===s||"success"===s}).length,p=o.filter(e=>{let s=m(e);return"error"===s||"expired"===s||"unavailable"===s}).length,b=o.length,u=b>0&&o.every(e=>!1===e.isActive);return(0,r.jsx)(i(),{href:`/dashboard/media-providers/${s}/${e.id}`,className:"group",children:(0,r.jsx)(c.Zp,{padding:"xs",className:`h-full hover:bg-black/[0.01] dark:hover:bg-white/[0.01] transition-colors cursor-pointer ${u?"opacity-50":""}`,children:(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,r.jsx)("div",{className:"size-8 rounded-lg flex items-center justify-center shrink-0",style:{backgroundColor:`${e.color?.length>7?e.color:(e.color??"#888")+"15"}`},children:(0,r.jsx)(n.A,{src:`/providers/${e.id}.png`,alt:e.name,size:30,className:"object-contain rounded-lg max-w-[30px] max-h-[30px]",fallbackText:e.textIcon||e.id.slice(0,2).toUpperCase(),fallbackColor:e.color})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"font-semibold text-sm",children:e.name}),(0,r.jsx)("div",{className:"flex items-center gap-2 mt-0.5 flex-wrap",children:l?(0,r.jsx)(c.Ex,{variant:"success",size:"sm",children:"Ready"}):u?(0,r.jsx)(c.Ex,{variant:"default",size:"sm",children:"Disabled"}):0===b?(0,r.jsx)("span",{className:"text-xs text-text-muted",children:"No connections"}):(0,r.jsxs)(r.Fragment,{children:[h>0&&(0,r.jsxs)(c.Ex,{variant:"success",size:"sm",dot:!0,children:[h," Connected"]}),p>0&&(0,r.jsxs)(c.Ex,{variant:"error",size:"sm",dot:!0,children:[p," Error"]}),0===h&&0===p&&(0,r.jsxs)(c.Ex,{variant:"default",size:"sm",children:[b," Added"]})]})})]})]})})})}function h({combos:e}){return 0===e.length?(0,r.jsx)("p",{className:"text-xs text-text-muted italic",children:"No combos yet."}):(0,r.jsx)("div",{className:"flex flex-col gap-2",children:e.map(e=>(0,r.jsx)(i(),{href:`/dashboard/media-providers/combo/${e.id}`,children:(0,r.jsx)(c.Zp,{padding:"xs",className:"hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors cursor-pointer",children:(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:"layers"}),(0,r.jsx)("code",{className:"text-sm font-mono font-medium flex-1 truncate",children:e.name}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-1 sm:shrink-0",children:[e.models.slice(0,6).map((e,s)=>{let t="string"==typeof e?e.split("/")[0]:"",a=d.Q2[t];return(0,r.jsx)("div",{title:a?.name||e,className:"size-5 rounded flex items-center justify-center",style:{backgroundColor:`${a?.color??"#888"}15`},children:(0,r.jsx)(n.A,{src:`/providers/${t}.png`,alt:a?.name||t,size:18,className:"object-contain rounded max-w-[18px] max-h-[18px]",fallbackText:a?.textIcon||t.slice(0,2).toUpperCase(),fallbackColor:a?.color})},`${e}-${s}`)}),e.models.length>6&&(0,r.jsxs)("span",{className:"text-[10px] text-text-muted ml-1",children:["+",e.models.length-6]})]}),(0,r.jsx)("span",{className:"text-[11px] text-text-muted shrink-0",children:e.models.length}),(0,r.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[16px]",children:"chevron_right"})]})})},e.id))})}function p({title:e,icon:s,kind:t,providers:a,connections:i,combos:l,onCreateCombo:o}){return(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary",children:s}),(0,r.jsx)("h2",{className:"text-base font-semibold",children:e}),(0,r.jsxs)("span",{className:"text-xs text-text-muted",children:["(",a.length," providers \xb7 ",l.length," combos)"]})]}),(0,r.jsx)(c.$n,{size:"sm",icon:"add",onClick:o,children:"Create Combo"})]}),l.length>0&&(0,r.jsx)("div",{className:"mb-4",children:(0,r.jsx)(h,{combos:l})}),0===a.length?(0,r.jsx)("div",{className:"text-center py-8 border border-dashed border-border rounded-xl text-text-muted text-sm",children:"No providers."}):(0,r.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:a.map(e=>(0,r.jsx)(x,{provider:e,kind:t,connections:i},e.id))})]})}function b(){let e=(0,o.useRouter)(),[s,t]=(0,l.useState)([]),[a,i]=(0,l.useState)([]),c=async()=>{try{let[e,s]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/combos",{cache:"no-store"})]);e.ok&&t((await e.json()).connections||[]),s.ok&&i((await s.json()).combos||[])}catch{}};(0,l.useEffect)(()=>{c()},[]);let n=(0,d.o5)("webSearch"),m=(0,d.o5)("webFetch"),x=a.filter(e=>"webSearch"===e.kind),h=a.filter(e=>"webFetch"===e.kind),b=async s=>{let t="webSearch"===s?"search-combo":"fetch-combo",r=t,i=1,l=new Set(a.map(e=>e.name));for(;l.has(r);)r=`${t}-${i++}`;let o=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:r,models:[],kind:s})});if(o.ok){let s=await o.json();e.push(`/dashboard/media-providers/combo/${s.id}`)}else alert((await o.json()).error||"Failed to create combo")};return(0,r.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,r.jsx)(p,{title:"Web Search",icon:"search",kind:"webSearch",providers:n,connections:s,combos:x,onCreateCombo:()=>b("webSearch")}),(0,r.jsx)("div",{className:"border-t border-border"}),(0,r.jsx)(p,{title:"Web Fetch",icon:"travel_explore",kind:"webFetch",providers:m,connections:s,combos:h,onCreateCombo:()=>b("webFetch")})]})}}},e=>{e.O(0,[2574,3862,1051,1321,5497,8441,3794,7358],()=>e(e.s=63172)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6607],{23879:(e,s,t)=>{"use strict";t.d(s,{default:()=>d});var a=t(95155),i=t(12115),n=t(3534),l=t(28777),o=t(52679),r=t(43666);function d(){let[e,s]=(0,i.useState)([]),[t,d]=(0,i.useState)([]),[c,u]=(0,i.useState)({}),[h,p]=(0,i.useState)(!1),[w,f]=(0,i.useState)(null),[y,x]=(0,i.useState)({running:!1,certExists:!1,dnsStatus:{},hasCachedPassword:!1});(0,i.useEffect)(()=>{g(),v(),m(),S()},[]);let g=async()=>{try{let e=await fetch("/api/providers");if(e.ok){let t=await e.json();s(t.connections||[])}}catch{}},v=async()=>{try{let e=await fetch("/api/keys");if(e.ok){let s=await e.json();d(s.keys||[])}}catch{}},m=async()=>{try{let e=await fetch("/api/models/alias");if(e.ok){let s=await e.json();u(s.aliases||{})}}catch{}},S=async()=>{try{let e=await fetch("/api/settings");if(e.ok){let s=await e.json();p(s.cloudEnabled||!1)}}catch{}},b=()=>e.filter(e=>!1!==e.isActive),k=Object.entries(n.wn);return(0,a.jsxs)("div",{className:"flex w-full flex-col gap-6",children:[(0,a.jsxs)("div",{className:"flex items-start gap-2 px-3 py-2 rounded-lg bg-yellow-500/10 border border-yellow-500/30",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-yellow-500 mt-0.5 shrink-0",children:"warning"}),(0,a.jsx)("p",{className:"text-xs text-red-600 dark:text-yellow-400 leading-relaxed",children:"⚠️ MITM intercepts HTTPS traffic of IDE tools (Antigravity, GitHub Copilot, Kiro) via local CA to redirect requests to your providers. May violate ToS → account ban. Use at your own risk."})]}),(0,a.jsx)(r.tA,{apiKeys:t,cloudEnabled:h,onStatusChange:x}),(0,a.jsx)("div",{className:"grid gap-3 sm:gap-4",children:k.map(([e,s])=>(0,a.jsx)(r.kn,{tool:s,isExpanded:w===e,onToggle:()=>f(w===e?null:e),serverRunning:y.running,dnsActive:y.dnsStatus?.[e]||!1,hasCachedPassword:y.hasCachedPassword||!1,needsSudoPassword:!1!==y.needsSudoPassword,isWin:!0===y.isWin,apiKeys:t,activeProviders:b(),hasActiveProviders:b().some(e=>(0,l.KC)(e.provider).length>0||(0,o.mq)(e.provider)||(0,o.gb)(e.provider)),modelAliases:c,cloudEnabled:h,onDnsChange:e=>x(s=>({...s,dnsStatus:e.dnsStatus??s.dnsStatus}))},e))})]})}},34530:(e,s,t)=>{Promise.resolve().then(t.bind(t,23879))}},e=>{e.O(0,[2574,3862,1051,5772,1321,5497,6069,8441,3794,7358],()=>e(e.s=34530)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6607],{23879:(e,s,t)=>{"use strict";t.d(s,{default:()=>d});var a=t(95155),i=t(12115),n=t(3534),l=t(28777),o=t(52679),r=t(43666);function d(){let[e,s]=(0,i.useState)([]),[t,d]=(0,i.useState)([]),[c,u]=(0,i.useState)({}),[h,p]=(0,i.useState)(!1),[w,f]=(0,i.useState)(null),[y,x]=(0,i.useState)({running:!1,certExists:!1,dnsStatus:{},hasCachedPassword:!1});(0,i.useEffect)(()=>{g(),v(),m(),S()},[]);let g=async()=>{try{let e=await fetch("/api/providers");if(e.ok){let t=await e.json();s(t.connections||[])}}catch{}},v=async()=>{try{let e=await fetch("/api/keys");if(e.ok){let s=await e.json();d(s.keys||[])}}catch{}},m=async()=>{try{let e=await fetch("/api/models/alias");if(e.ok){let s=await e.json();u(s.aliases||{})}}catch{}},S=async()=>{try{let e=await fetch("/api/settings");if(e.ok){let s=await e.json();p(s.cloudEnabled||!1)}}catch{}},b=()=>e.filter(e=>!1!==e.isActive),k=Object.entries(n.wn);return(0,a.jsxs)("div",{className:"flex w-full flex-col gap-6",children:[(0,a.jsxs)("div",{className:"flex items-start gap-2 px-3 py-2 rounded-lg bg-yellow-500/10 border border-yellow-500/30",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-yellow-500 mt-0.5 shrink-0",children:"warning"}),(0,a.jsx)("p",{className:"text-xs text-red-600 dark:text-yellow-400 leading-relaxed",children:"⚠️ MITM intercepts HTTPS traffic of IDE tools (Antigravity, GitHub Copilot, Kiro) via local CA to redirect requests to your providers. May violate ToS → account ban. Use at your own risk."})]}),(0,a.jsx)(r.tA,{apiKeys:t,cloudEnabled:h,onStatusChange:x}),(0,a.jsx)("div",{className:"grid gap-3 sm:gap-4",children:k.map(([e,s])=>(0,a.jsx)(r.kn,{tool:s,isExpanded:w===e,onToggle:()=>f(w===e?null:e),serverRunning:y.running,dnsActive:y.dnsStatus?.[e]||!1,hasCachedPassword:y.hasCachedPassword||!1,needsSudoPassword:!1!==y.needsSudoPassword,isWin:!0===y.isWin,apiKeys:t,activeProviders:b(),hasActiveProviders:b().some(e=>(0,l.KC)(e.provider).length>0||(0,o.mq)(e.provider)||(0,o.gb)(e.provider)),modelAliases:c,cloudEnabled:h,onDnsChange:e=>x(s=>({...s,dnsStatus:e.dnsStatus??s.dnsStatus}))},e))})]})}},46182:(e,s,t)=>{Promise.resolve().then(t.bind(t,23879))}},e=>{e.O(0,[2574,3862,1051,5772,1321,5497,6069,8441,3794,7358],()=>e(e.s=46182)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6337],{},_=>{_.O(0,[2574,3862,1051,1321,5497,6502,8441,3794,7358],()=>_(_.s=46502)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3471],{505:(e,t,s)=>{Promise.resolve().then(s.bind(s,64561))},64561:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>d});var a=s(95155),r=s(12115),o=s(35497),i=s(1620),l=s(31474),n=s(90620);function d(){let{theme:e,setTheme:t,isDark:s}=(0,i.D)(),[d,c]=(0,r.useState)({fallbackStrategy:"fill-first"}),[m,x]=(0,r.useState)(!0),[p,u]=(0,r.useState)({current:"",new:"",confirm:""}),[h,b]=(0,r.useState)({type:"",message:""}),[g,y]=(0,r.useState)(!1),[f,j]=(0,r.useState)(!1),[N,w]=(0,r.useState)({type:"",message:""}),[v,C]=(0,r.useState)({authMode:"password",oidcIssuerUrl:"",oidcClientId:"",oidcScopes:"openid profile email",oidcLoginLabel:"Sign in with OIDC"}),[k,S]=(0,r.useState)(""),[P,O]=(0,r.useState)({type:"",message:""}),[I,L]=(0,r.useState)(!1),[R,D]=(0,r.useState)(!1),[U,T]=(0,r.useState)({type:"",message:""}),[A,M]=(0,r.useState)("/api/auth/oidc/callback"),[E,$]=(0,r.useState)(!1),F=(0,r.useRef)(null),[q,J]=(0,r.useState)({outboundProxyEnabled:!1,outboundProxyUrl:"",outboundNoProxy:""}),[H,_]=(0,r.useState)({type:"",message:""}),[K,Z]=(0,r.useState)(!1),[B,z]=(0,r.useState)(!1);(0,r.useEffect)(()=>{fetch("/api/settings").then(e=>e.json()).then(e=>{c(e),C({authMode:e?.authMode||"password",oidcIssuerUrl:e?.oidcIssuerUrl||"",oidcClientId:e?.oidcClientId||"",oidcScopes:e?.oidcScopes||"openid profile email",oidcLoginLabel:e?.oidcLoginLabel||"Sign in with OIDC"}),S(""),(e?.authMode==="oidc"||e?.authMode==="both")&&$(!0),J({outboundProxyEnabled:e?.outboundProxyEnabled===!0,outboundProxyUrl:e?.outboundProxyUrl||"",outboundNoProxy:e?.outboundNoProxy||""}),x(!1)}).catch(e=>{console.error("Failed to fetch settings:",e),x(!1)})},[]),(0,r.useEffect)(()=>{M(`${window.location.origin}/api/auth/oidc/callback`)},[]);let Q=async e=>{if(e.preventDefault(),!0===d.outboundProxyEnabled){Z(!0),_({type:"",message:""});try{let e=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({outboundProxyUrl:q.outboundProxyUrl,outboundNoProxy:q.outboundNoProxy})}),t=await e.json();e.ok?(c(e=>({...e,...t})),_({type:"success",message:"Proxy settings applied"})):_({type:"error",message:t.error||"Failed to update proxy settings"})}catch(e){_({type:"error",message:"An error occurred"})}finally{Z(!1)}}},W=async()=>{if(!0!==d.outboundProxyEnabled)return;let e=(q.outboundProxyUrl||"").trim();if(!e)return void _({type:"error",message:"Please enter a Proxy URL to test"});z(!0),_({type:"",message:""});try{let t=await fetch("/api/settings/proxy-test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyUrl:e})}),s=await t.json();t.ok&&s?.ok?_({type:"success",message:`Proxy test OK (${s.status}) in ${s.elapsedMs}ms`}):_({type:"error",message:s?.error||"Proxy test failed"})}catch(e){_({type:"error",message:"An error occurred"})}finally{z(!1)}},G=async e=>{Z(!0),_({type:"",message:""});try{let t=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({outboundProxyEnabled:e})}),s=await t.json();t.ok?(c(e=>({...e,...s})),J(e=>({...e,outboundProxyEnabled:s?.outboundProxyEnabled===!0})),_({type:"success",message:e?"Proxy enabled":"Proxy disabled"})):_({type:"error",message:s.error||"Failed to update proxy settings"})}catch(e){_({type:"error",message:"An error occurred"})}finally{Z(!1)}},V=async e=>{if(e.preventDefault(),p.new!==p.confirm)return void b({type:"error",message:"Passwords do not match"});y(!0),b({type:"",message:""});try{let e=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({currentPassword:p.current,newPassword:p.new})}),t=await e.json();e.ok?(b({type:"success",message:"Password updated successfully"}),u({current:"",new:"",confirm:""})):b({type:"error",message:t.error||"Failed to update password"})}catch(e){b({type:"error",message:"An error occurred"})}finally{y(!1)}},Y=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({fallbackStrategy:e})})).ok&&c(t=>({...t,fallbackStrategy:e}))}catch(e){console.error("Failed to update settings:",e)}},X=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategy:e})})).ok&&c(t=>({...t,comboStrategy:e}))}catch(e){console.error("Failed to update combo strategy:",e)}},ee=async e=>{let t=parseInt(e);if(!isNaN(t)&&!(t<1))try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({stickyRoundRobinLimit:t})})).ok&&c(e=>({...e,stickyRoundRobinLimit:t}))}catch(e){console.error("Failed to update sticky limit:",e)}},et=async e=>{let t=parseInt(e);if(!isNaN(t)&&!(t<1))try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStickyRoundRobinLimit:t})})).ok&&c(e=>({...e,comboStickyRoundRobinLimit:t}))}catch(e){console.error("Failed to update combo sticky limit:",e)}},es=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({requireLogin:e})})).ok&&c(t=>({...t,requireLogin:e}))}catch(e){console.error("Failed to update require login:",e)}},ea=(e,t)=>{C(s=>({...s,[e]:t}))},er=async(e=v.authMode||"password")=>{let t=v.oidcIssuerUrl.trim(),s=v.oidcClientId.trim(),a=v.oidcScopes.trim(),r=v.oidcLoginLabel.trim(),o=k.trim();if("password"!==e&&(!t||!s||!o)&&!d.oidcConfigured)return void O({type:"error",message:"Issuer URL, client ID, and client secret are required to enable OIDC."});L(!0),O({type:"",message:""}),T({type:"",message:""});try{let i={authMode:e,oidcIssuerUrl:t,oidcClientId:s,oidcScopes:a||"openid profile email",oidcLoginLabel:r||"Sign in with OIDC"};o&&(i.oidcClientSecret=o);let l=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)}),n=await l.json();l.ok?(c(e=>({...e,...n})),C({authMode:n?.authMode||e,oidcIssuerUrl:n?.oidcIssuerUrl||t,oidcClientId:n?.oidcClientId||s,oidcScopes:n?.oidcScopes||a||"openid profile email",oidcLoginLabel:n?.oidcLoginLabel||r||"Sign in with OIDC"}),S(""),O({type:"success",message:"oidc"===e?"OIDC login enabled":"both"===e?"Password and OIDC login enabled":"OIDC settings saved"})):O({type:"error",message:n.error||"Failed to save OIDC settings"})}catch(e){O({type:"error",message:"An error occurred"})}finally{L(!1)}},eo=async()=>{let e=v.oidcIssuerUrl.trim(),t=v.oidcClientId.trim(),s=v.oidcScopes.trim(),a=k.trim();if(!e||!t)return void T({type:"error",message:"Issuer URL and client ID are required to test the connection."});D(!0),O({type:"",message:""}),T({type:"",message:""});try{let r=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({authMode:v.authMode||d.authMode||"password",oidcIssuerUrl:e,oidcClientId:t,oidcScopes:s||"openid profile email",oidcLoginLabel:v.oidcLoginLabel.trim()||"Sign in with OIDC",...a?{oidcClientSecret:a}:{}})}),o=await r.json().catch(()=>({}));if(!r.ok)return void T({type:"error",message:o.error||"Failed to save OIDC settings before testing"});let i=await fetch("/api/auth/oidc/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({issuerUrl:o.oidcIssuerUrl||e,clientId:o.oidcClientId||t,scopes:o.oidcScopes||s||"openid profile email"})}),l=await i.json().catch(()=>({}));if(i.ok&&l?.ok){let e=l.clientSecretTested?!0===l.clientSecretValid?`Connection OK. Discovery loaded from ${l.issuerUrl}. Client secret validated too.`:`Connection OK. Discovery loaded from ${l.issuerUrl}. Client secret was not checked.`:`Connection OK. Discovery loaded from ${l.issuerUrl}.`;T({type:"success",message:e})}else T({type:"error",message:l.error||"OIDC connection test failed"})}catch(e){T({type:"error",message:"An error occurred"})}finally{D(!1)}},ei=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({enableObservability:e})})).ok&&c(t=>({...t,enableObservability:e}))}catch(e){console.error("Failed to update enableObservability:",e)}},el=async()=>{try{let e=await fetch("/api/settings");if(!e.ok)return;let t=await e.json();c(t)}catch(e){console.error("Failed to reload settings:",e)}},en=async()=>{j(!0),w({type:"",message:""});try{let e=await fetch("/api/settings/database");if(!e.ok){let t=await e.json().catch(()=>({}));throw Error(t.error||"Failed to export database")}let t=await e.json(),s=JSON.stringify(t,null,2),a=new Blob([s],{type:"application/json"}),r=URL.createObjectURL(a),o=document.createElement("a"),i=new Date().toISOString().replace(/[.:]/g,"-");o.href=r,o.download=`9router-backup-${i}.json`,document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL(r),w({type:"success",message:"Database backup downloaded"})}catch(e){w({type:"error",message:e.message||"Failed to export database"})}finally{j(!1)}},ed=async e=>{let t=e.target.files?.[0];if(t){j(!0),w({type:"",message:""});try{let e=await t.text(),s=JSON.parse(e),a=await fetch("/api/settings/database",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)}),r=await a.json().catch(()=>({}));if(!a.ok)throw Error(r.error||"Failed to import database");await el(),w({type:"success",message:"Database imported successfully"})}catch(e){w({type:"error",message:e.message||"Invalid backup file"})}finally{F.current&&(F.current.value=""),j(!1)}}},ec=!0===d.enableObservability;return(0,a.jsx)("div",{className:"max-w-2xl mx-auto px-4 sm:px-0",children:(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 sm:gap-4",children:[(0,a.jsx)("div",{className:"size-10 sm:size-12 rounded-lg bg-green-500/10 text-green-500 flex items-center justify-center shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-xl sm:text-2xl",children:"computer"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg sm:text-xl font-semibold",children:"Local Mode"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Running on your machine"})]})]}),(0,a.jsx)("div",{className:"inline-flex p-1 rounded-lg bg-black/5 dark:bg-white/5 w-full sm:w-auto",children:["light","dark","system"].map(s=>(0,a.jsxs)("button",{type:"button",onClick:()=>t(s),className:(0,l.cn)("flex items-center justify-center gap-1 sm:gap-1.5 px-2 sm:px-3 py-1.5 rounded-md font-medium transition-all flex-1 sm:flex-initial",e===s?"bg-white dark:bg-white/10 text-text-main shadow-sm":"text-text-muted hover:text-text-main"),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"light"===s?"light_mode":"dark"===s?"dark_mode":"contrast"}),(0,a.jsx)("span",{className:"capitalize text-xs sm:text-sm",children:s})]},s))})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 pt-4 border-t border-border",children:[(0,a.jsx)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between p-3 rounded-lg bg-bg border border-border gap-2",children:(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Database Location"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted font-mono break-all",children:"~/.9router/db/data.sqlite"})]})}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2",children:[(0,a.jsx)(o.$n,{variant:"secondary",icon:"download",onClick:en,loading:f,className:"w-full sm:w-auto",children:"Download Backup"}),(0,a.jsx)(o.$n,{variant:"outline",icon:"upload",onClick:()=>F.current?.click(),disabled:f,className:"w-full sm:w-auto",children:"Import Backup"}),(0,a.jsx)("input",{ref:F,type:"file",accept:"application/json,.json",className:"hidden",onChange:ed})]}),N.message&&(0,a.jsx)("p",{className:`text-sm ${"error"===N.type?"text-red-500":"text-green-600 dark:text-green-400"}`,children:N.message})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-primary/10 text-primary shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"shield"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Security"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Require login"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"When ON, dashboard requires password. When OFF, access without login."})]}),(0,a.jsx)(o.lM,{checked:!0===d.requireLogin,onChange:()=>es(!d.requireLogin),disabled:m})]}),!0===d.requireLogin&&(0,a.jsxs)("form",{onSubmit:V,className:"flex flex-col gap-4 pt-4 border-t border-border/50",children:[d.hasPassword&&(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-xs sm:text-sm font-medium",children:"Current Password"}),(0,a.jsx)(o.pd,{type:"password",placeholder:"Enter current password",value:p.current,onChange:e=>u({...p,current:e.target.value}),required:!0})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-xs sm:text-sm font-medium",children:"New Password"}),(0,a.jsx)(o.pd,{type:"password",placeholder:"Enter new password",value:p.new,onChange:e=>u({...p,new:e.target.value}),required:!0})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-xs sm:text-sm font-medium",children:"Confirm New Password"}),(0,a.jsx)(o.pd,{type:"password",placeholder:"Confirm new password",value:p.confirm,onChange:e=>u({...p,confirm:e.target.value}),required:!0})]})]}),h.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===h.type?"text-red-500":"text-green-500"}`,children:h.message}),(0,a.jsx)("div",{className:"pt-2",children:(0,a.jsx)(o.$n,{type:"submit",variant:"primary",loading:g,className:"w-full sm:w-auto",children:d.hasPassword?"Update Password":"Set Password"})})]})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("button",{type:"button",onClick:()=>$(e=>!e),className:"w-full flex items-center gap-3 text-left",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-indigo-500/10 text-indigo-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"lock_open"})}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"OIDC Dashboard Login"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"oidc"===d.authMode?"OIDC active":"both"===d.authMode?"Password + OIDC active":"Optional SSO via Authentik/Keycloak/Google"})]}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted shrink-0",children:E?"expand_less":"expand_more"})]}),E&&(0,a.jsxs)("div",{className:"flex flex-col gap-4 mt-4",children:[(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Use Authentik or any OIDC provider to sign in to the dashboard. You can enable password-only, OIDC-only, or both for the dashboard; model API access still uses API keys."}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Auth Mode"}),(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-2",children:[{value:"password",title:"Password only",desc:"Keep the legacy password login."},{value:"oidc",title:"OIDC only",desc:"Require OIDC for dashboard access."},{value:"both",title:"Both",desc:"Allow either password or OIDC."}].map(e=>{let t=v.authMode===e.value;return(0,a.jsxs)("button",{type:"button",onClick:()=>ea("authMode",e.value),className:(0,l.cn)("text-left rounded-lg border p-3 transition-colors",t?"border-primary bg-primary/5":"border-border bg-bg hover:bg-black/5 dark:hover:bg-white/5"),disabled:m||I,children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:e.title}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted mt-1",children:e.desc})]},e.value)})})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Issuer URL"}),(0,a.jsx)(o.pd,{placeholder:"https://auth.example.com/application/o/9router/",value:v.oidcIssuerUrl,onChange:e=>ea("oidcIssuerUrl",e.target.value),disabled:m||I})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Client ID"}),(0,a.jsx)(o.pd,{placeholder:"9router-dashboard",value:v.oidcClientId,onChange:e=>ea("oidcClientId",e.target.value),disabled:m||I})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Client Secret"}),(0,a.jsx)(o.pd,{type:"password",placeholder:"Leave blank to keep existing secret",value:k,onChange:e=>S(e.target.value),disabled:m||I}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"This value is write-only after saving."})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Scopes"}),(0,a.jsx)(o.pd,{placeholder:"openid profile email",value:v.oidcScopes,onChange:e=>ea("oidcScopes",e.target.value),disabled:m||I})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Login Button Label"}),(0,a.jsx)(o.pd,{placeholder:"Sign in with OIDC",value:v.oidcLoginLabel,onChange:e=>ea("oidcLoginLabel",e.target.value),disabled:m||I})]})]}),(0,a.jsxs)("div",{className:"rounded-lg border border-border bg-bg p-3 text-xs sm:text-sm text-text-muted",children:[(0,a.jsx)("p",{className:"font-medium text-text-main mb-1",children:"Redirect URI"}),(0,a.jsx)("code",{className:"block break-all font-mono",children:A})]}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2 pt-2 border-t border-border/50",children:[(0,a.jsx)(o.$n,{type:"button",variant:"primary",loading:I,onClick:()=>er(),className:"w-full sm:w-auto",children:"Save auth mode"}),(0,a.jsx)(o.$n,{type:"button",variant:"outline",loading:R,onClick:eo,className:"w-full sm:w-auto",children:"Test connection"})]}),U.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===U.type?"text-red-500":"text-green-500"}`,children:U.message}),P.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===P.type?"text-red-500":"text-green-500"}`,children:P.message}),"oidc"===d.authMode&&(0,a.jsx)("p",{className:"text-xs sm:text-sm text-amber-600 dark:text-amber-400",children:"OIDC login is currently active. Password login is disabled until you switch back."}),"both"===d.authMode&&(0,a.jsx)("p",{className:"text-xs sm:text-sm text-amber-600 dark:text-amber-400",children:"Password and OIDC login are both active."})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-blue-500/10 text-blue-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"route"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Routing Strategy"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Round Robin"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Cycle through accounts to distribute load"})]}),(0,a.jsx)(o.lM,{checked:"round-robin"===d.fallbackStrategy,onChange:()=>Y("round-robin"===d.fallbackStrategy?"fill-first":"round-robin"),disabled:m})]}),"round-robin"===d.fallbackStrategy&&(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4 pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Sticky Limit"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Calls per account before switching"})]}),(0,a.jsx)(o.pd,{type:"number",min:"1",max:"10",value:d.stickyRoundRobinLimit||3,onChange:e=>ee(e.target.value),disabled:m,className:"w-16 sm:w-20 text-center shrink-0"})]}),(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4 pt-4 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Combo Round Robin"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Cycle through providers in combos instead of always starting with first"})]}),(0,a.jsx)(o.lM,{checked:"round-robin"===d.comboStrategy,onChange:()=>X("round-robin"===d.comboStrategy?"fallback":"round-robin"),disabled:m})]}),"round-robin"===d.comboStrategy&&(0,a.jsxs)("div",{className:"flex items-center justify-between pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Combo Sticky Limit"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Calls per combo model before switching"})]}),(0,a.jsx)(o.pd,{type:"number",min:"1",max:"100",value:d.comboStickyRoundRobinLimit||1,onChange:e=>et(e.target.value),disabled:m,className:"w-20 text-center"})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted italic pt-2 border-t border-border/50",children:["round-robin"===d.fallbackStrategy?`Currently distributing requests across all available accounts with ${d.stickyRoundRobinLimit||3} calls per account.`:"Currently using accounts in priority order (Fill First).","round-robin"===d.comboStrategy?` Combos rotate after ${d.comboStickyRoundRobinLimit||1} call${1===(d.comboStickyRoundRobinLimit||1)?"":"s"} per model.`:" Combos always start with their first model."]})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-purple-500/10 text-purple-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"wifi"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Network"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Outbound Proxy"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Enable proxy for OAuth + provider outbound requests."})]}),(0,a.jsx)(o.lM,{checked:!0===d.outboundProxyEnabled,onChange:()=>G(!0!==d.outboundProxyEnabled),disabled:m||K})]}),!0===d.outboundProxyEnabled&&(0,a.jsxs)("form",{onSubmit:Q,className:"flex flex-col gap-4 pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Proxy URL"}),(0,a.jsx)(o.pd,{placeholder:"http://127.0.0.1:7897",value:q.outboundProxyUrl,onChange:e=>J(t=>({...t,outboundProxyUrl:e.target.value})),disabled:m||K}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Leave empty to inherit existing env proxy (if any)."})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2 pt-2 border-t border-border/50",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"No Proxy"}),(0,a.jsx)(o.pd,{placeholder:"localhost,127.0.0.1",value:q.outboundNoProxy,onChange:e=>J(t=>({...t,outboundNoProxy:e.target.value})),disabled:m||K}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Comma-separated hostnames/domains to bypass the proxy."})]}),(0,a.jsxs)("div",{className:"pt-2 border-t border-border/50 flex flex-col sm:flex-row items-stretch sm:items-center gap-2",children:[(0,a.jsx)(o.$n,{type:"button",variant:"secondary",loading:B,disabled:m||K,onClick:W,className:"w-full sm:w-auto",children:"Test proxy URL"}),(0,a.jsx)(o.$n,{type:"submit",variant:"primary",loading:K,className:"w-full sm:w-auto",children:"Apply"})]})]}),H.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===H.type?"text-red-500":"text-green-500"} pt-2 border-t border-border/50`,children:H.message})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-orange-500/10 text-orange-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"monitoring"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Observability"})]}),(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Enable Observability"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Record request details for inspection in the logs view"})]}),(0,a.jsx)(o.lM,{checked:ec,onChange:ei,disabled:m})]})]}),(0,a.jsxs)("div",{className:"text-center text-xs sm:text-sm text-text-muted py-4",children:[(0,a.jsxs)("p",{children:[n.vQ.name," v",n.vQ.version]}),(0,a.jsx)("p",{className:"mt-1",children:"Local Mode - All data stored on your machine"})]})]})})}}},e=>{e.O(0,[2574,3862,1051,1321,5497,8441,3794,7358],()=>e(e.s=505)),_N_E=e.O()}]);
@@ -1,3 +1,3 @@
1
1
  (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2134],{52720:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>A});var a=s(95155),i=s(12115),l=s(73321),r=s(98500),n=s.n(r),o=s(5772),d=s(35497),c=s(52679),p=s(28777),m=s(11059);let x=new Map;async function u(e){if(!e?.url||!e?.type)return[];let t=x.get(e.url);if(t&&Date.now()<t.expiresAt)return t.data;try{let t=new URLSearchParams({url:e.url,type:e.type}),s=await fetch(`/api/providers/suggested-models?${t}`);if(!s.ok)return[];let a=(await s.json()).data??[];return x.set(e.url,{data:a,expiresAt:Date.now()+6e5}),a}catch{return[]}}var h=s(14051),f=s.n(h);function g({model:e,fullModel:t,alias:s,copied:i,onCopy:l,testStatus:r,isCustom:n,isFree:o,onDeleteAlias:d,onTest:c,isTesting:p,onDisable:m,isFirst:x,isLast:u,onMoveUp:h,onMoveDown:f}){let y="ok"===r?"#22c55e":"error"===r?"#ef4444":void 0;return(0,a.jsx)("div",{className:`group min-w-0 max-w-full rounded-lg border px-3 py-2 ${"ok"===r?"border-green-500/40":"error"===r?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:(0,a.jsxs)("div",{className:"flex min-w-0 items-start gap-2 sm:items-center",children:[(h||f)&&(0,a.jsxs)("div",{className:"flex shrink-0 flex-col",children:[(0,a.jsx)("button",{onClick:h,disabled:x,className:`p-0.5 rounded ${x?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_up"})}),(0,a.jsx)("button",{onClick:f,disabled:u,className:`p-0.5 rounded ${u?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_down"})})]}),(0,a.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base",style:y?{color:y}:void 0,children:"ok"===r?"check_circle":"error"===r?"cancel":"smart_toy"}),(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,a.jsx)("code",{className:"max-w-[72vw] truncate rounded bg-sidebar px-1.5 py-0.5 font-mono text-xs text-text-muted sm:max-w-[360px]",children:t}),e.name&&(0,a.jsx)("span",{className:"truncate pl-1 text-[9px] italic text-text-muted/70",children:e.name})]}),c&&(0,a.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,a.jsx)("button",{onClick:c,disabled:p,className:`rounded p-0.5 text-text-muted transition-opacity hover:bg-sidebar hover:text-primary ${p?"opacity-100":"opacity-100 sm:opacity-0 sm:group-hover:opacity-100"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",style:p?{animation:"spin 1s linear infinite"}:void 0,children:p?"progress_activity":"science"})}),(0,a.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:p?"Testing...":"Test"})]}),(0,a.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,a.jsx)("button",{onClick:()=>l(t,`model-${e.id}`),className:"rounded p-0.5 text-text-muted hover:bg-sidebar hover:text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:i===`model-${e.id}`?"check":"content_copy"})}),(0,a.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:i===`model-${e.id}`?"Copied!":"Copy"})]}),n?(0,a.jsx)("button",{onClick:d,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,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):m?(0,a.jsx)("button",{onClick:m,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,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):null]})})}function y({modelId:e,fullModel:t,copied:s,onCopy:i,onDeleteAlias:l,onTest:r,testStatus:n,isTesting:o}){let d="ok"===n?"#22c55e":"error"===n?"#ef4444":void 0;return(0,a.jsxs)("div",{className:`flex items-center gap-3 p-3 rounded-lg border ${"ok"===n?"border-green-500/40":"error"===n?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",style:d?{color:d}:void 0,children:"ok"===n?"check_circle":"error"===n?"cancel":"smart_toy"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium truncate",children:e}),(0,a.jsxs)("div",{className:"flex items-center gap-1 mt-1",children:[(0,a.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:t}),(0,a.jsxs)("div",{className:"relative group/btn",children:[(0,a.jsx)("button",{onClick:()=>i(t,`model-${e}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:s===`model-${e}`?"check":"content_copy"})}),(0,a.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:s===`model-${e}`?"Copied!":"Copy"})]}),r&&(0,a.jsxs)("div",{className:"relative group/btn",children:[(0,a.jsx)("button",{onClick:r,disabled:o,className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",style:o?{animation:"spin 1s linear infinite"}:void 0,children:o?"progress_activity":"science"})}),(0,a.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:o?"Testing...":"Test"})]})]})]}),(0,a.jsx)("button",{onClick:l,className:"p-1 hover:bg-red-50 rounded text-red-500",title:"Remove model",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"delete"})})]})}function b({providerStorageAlias:e,providerDisplayAlias:t,modelAliases:s,copied:l,onCopy:r,onSetAlias:n,onDeleteAlias:o,connections:c,isAnthropic:p}){let[m,x]=(0,i.useState)(""),[u,h]=(0,i.useState)(!1),[f,g]=(0,i.useState)(!1),[v,j]=(0,i.useState)(null),[N,k]=(0,i.useState)({}),w=async t=>{if(!v){j(t);try{let s=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${e}/${t}`})}),a=await s.json();k(e=>({...e,[t]:a.ok?"ok":"error"}))}catch{k(e=>({...e,[t]:"error"}))}finally{j(null)}}},C=Object.entries(s).filter(([,t])=>t.startsWith(`${e}/`)).map(([t,s])=>({modelId:s.replace(`${e}/`,""),fullModel:s,alias:t})),S=a=>{let i,l=`${e}/${a}`;if(Object.values(s).includes(l))return null;let r=(i=a.split("/"))[i.length-1];if(!s[r])return r;let n=`${t}-${r}`;return s[n]?null:n},$=async()=>{if(!m.trim()||u)return;let t=m.trim(),s=S(t);if(!s)return void alert("All suggested aliases already exist. Please choose a different model or remove conflicting aliases.");h(!0);try{await n(t,s,e),x("")}catch(e){console.log("Error adding model:",e)}finally{h(!1)}},A=async()=>{if(f)return;let t=c.find(e=>!1!==e.isActive);if(t){g(!0);try{let s=await fetch(`/api/providers/${t.id}/models`),a=await s.json();if(!s.ok)return void alert(a.error||"Failed to import models");let i=a.models||[];if(0===i.length)return void alert("No models returned from /models.");let l=0;for(let t of i){let s=t.id||t.name||t.model;if(!s)continue;let a=S(s);a&&(await n(s,a,e),l+=1)}0===l&&alert("No new models were added.")}catch(e){console.log("Error importing models:",e)}finally{g(!1)}}},P=c.some(e=>!1!==e.isActive);return(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("p",{className:"text-sm text-text-muted",children:["Add ",p?"Anthropic":"OpenAI","-compatible models manually or import them from the /models endpoint."]}),(0,a.jsxs)("div",{className:"flex items-end gap-2 flex-wrap",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-[240px]",children:[(0,a.jsx)("label",{htmlFor:"new-compatible-model-input",className:"text-xs text-text-muted mb-1 block",children:"Model ID"}),(0,a.jsx)("input",{id:"new-compatible-model-input",type:"text",value:m,onChange:e=>x(e.target.value),onKeyDown:e=>"Enter"===e.key&&$(),placeholder:p?"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,a.jsx)(d.$n,{size:"sm",icon:"add",onClick:$,disabled:!m.trim()||u,children:u?"Adding...":"Add"}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"download",onClick:A,disabled:!P||f,children:f?"Importing...":"Import from /models"})]}),!P&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Add a connection to enable importing models."}),C.length>0&&(0,a.jsx)("div",{className:"flex flex-col gap-3",children:C.map(({modelId:e,fullModel:s,alias:i})=>(0,a.jsx)(y,{modelId:e,fullModel:`${t}/${e}`,copied:l,onCopy:r,onDeleteAlias:()=>o(i),onTest:c.length>0?()=>w(e):void 0,testStatus:N[e],isTesting:v===e},s))})]})}function v({until:e}){let[t,s]=(0,i.useState)("");return((0,i.useEffect)(()=>{let t=()=>{let t=new Date(e).getTime()-Date.now();if(t<=0)return void s("");let a=Math.floor(t/1e3);if(a<60)s(`${a}s`);else if(a<3600)s(`${Math.floor(a/60)}m ${a%60}s`);else{let e=Math.floor(a/3600),t=Math.floor(a%3600/60);s(`${e}h ${t}m`)}};t();let a=setInterval(t,1e3);return()=>clearInterval(a)},[e]),t)?(0,a.jsxs)("span",{className:"text-xs text-orange-500 font-mono",children:["⏱ ",t]}):null}function j({connection:e,proxyPools:t,isOAuth:s,isFirst:l,isLast:r,onMoveUp:n,onMoveDown:o,onToggleActive:c,onUpdateProxy:p,onEdit:m,onDelete:x,oneByOneStatus:u=null}){let[h,f]=(0,i.useState)(!1),[g,y]=(0,i.useState)(!1),b=(0,i.useRef)(null),N=new Map((t||[]).map(e=>[e.id,e])),k=e.providerSpecificData?.proxyPoolId||null,w=k?N.get(k):null,C=e.providerSpecificData?.connectionProxyEnabled===!0&&!!e.providerSpecificData?.connectionProxyUrl,S=!!k||C,$=w?`Pool: ${w.name}`:k?`Pool: ${k} (inactive/missing)`:C?`Legacy: ${e.providerSpecificData?.connectionProxyUrl}`:"",A="";if(w?.proxyUrl||e.providerSpecificData?.connectionProxyUrl){let t=w?.proxyUrl||e.providerSpecificData?.connectionProxyUrl;try{let e=new URL(t);A=`${e.protocol}//${e.hostname}${e.port?`:${e.port}`:""}`}catch{A=t}}let P=w?.noProxy||e.providerSpecificData?.connectionNoProxy||"",T="default";w?.isActive===!0?T="success":(k||C)&&(T="error"),(0,i.useEffect)(()=>{if(!h)return;let e=e=>{b.current&&!b.current.contains(e.target)&&f(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[h]);let O=async e=>{y(!0);try{await p("__none__"===e?null:e)}finally{y(!1),f(!1)}},E=e.authType||(s?"oauth":"apikey"),I="oauth"===E,D="cookie"===E,R=e=>"string"==typeof e&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e),U=I?R(e.email)?e.email:R(e.name)?e.name:e.name||e.email||e.displayName||"OAuth Account":e.name||e.email||e.displayName||"API Key",[_,z]=(0,i.useState)(!1),q=Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(e=>!!e).sort()[0]||null;(0,i.useEffect)(()=>{let t=()=>{z(!!Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(e=>e&&new Date(e).getTime()>Date.now()).sort()[0])};t();let s=q?setInterval(t,1e3):null;return()=>{s&&clearInterval(s)}},[q]);let M="unavailable"!==e.testStatus||_?e.testStatus:"active",K=()=>u?"queued"===u.state?"queued":"testing"===u.state?"testing":"success"===u.state?"success":"failed"===u.state?u.error?`failed: ${u.error}`:"failed":null:null;return(0,a.jsxs)("div",{className:`group flex min-w-0 flex-col gap-3 rounded-lg p-2 transition-colors hover:bg-black/[0.02] dark:hover:bg-white/[0.02] sm:flex-row sm:items-center sm:justify-between ${!1===e.isActive?"opacity-60":""}`,children:[(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-2 sm:items-center sm:gap-3",children:[(0,a.jsxs)("div",{className:"flex shrink-0 flex-col",children:[(0,a.jsx)("button",{onClick:n,disabled:l,className:`p-0.5 rounded ${l?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_up"})}),(0,a.jsx)("button",{onClick:o,disabled:r,className:`p-0.5 rounded ${r?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_down"})})]}),(0,a.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base text-text-muted",children:D?"cookie":I?"lock":"key"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium truncate",children:U}),(0,a.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1.5 sm:gap-2",children:[(0,a.jsx)(d.Ex,{variant:!1===e.isActive?"default":"active"===M||"success"===M?"success":"error"===M||"expired"===M||"unavailable"===M?"error":"default",size:"sm",dot:!0,children:!1===e.isActive?"disabled":M||"Unknown"}),(0,a.jsx)(d.Ex,{variant:"default",size:"sm",children:I?"OAuth":D?"Cookie":"API Key"}),S&&(0,a.jsx)(d.Ex,{variant:T,size:"sm",children:"Proxy"}),_&&!1!==e.isActive&&(0,a.jsx)(v,{until:q}),e.lastError&&!1!==e.isActive&&(0,a.jsx)("span",{className:"max-w-full truncate text-xs text-red-500 sm:max-w-[300px]",title:e.lastError,children:e.lastError}),(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["#",e.priority]}),e.globalPriority&&(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["Auto: ",e.globalPriority]}),K()&&(0,a.jsx)(d.Ex,{variant:u?"success"===u.state?"success":"failed"===u.state?"error":"testing"===u.state?"primary":"default":"default",size:"sm",children:K()})]}),S&&(0,a.jsxs)("div",{className:"mt-1 flex items-center gap-2 flex-wrap",children:[(0,a.jsx)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[420px]",title:$,children:$}),A&&(0,a.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:A}),P&&(0,a.jsxs)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[320px]",title:P,children:["no_proxy: ",P]})]})]})]}),(0,a.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 sm:w-auto sm:justify-end",children:[(0,a.jsxs)("div",{className:"grid flex-1 grid-cols-3 gap-1 sm:flex sm:flex-none",children:[(t||[]).length>0&&(0,a.jsxs)("div",{className:"relative",ref:b,children:[(0,a.jsxs)("button",{onClick:()=>f(e=>!e),className:`flex w-full flex-col items-center rounded px-2 py-1 transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${S?"text-primary":"text-text-muted hover:text-primary"}`,disabled:g,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:g?"progress_activity":"lan"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Proxy"})]}),h&&(0,a.jsxs)("div",{className:"absolute right-0 top-full z-50 mt-1 max-w-[78vw] min-w-[160px] rounded-lg border border-border bg-bg py-1 shadow-lg",children:[(0,a.jsx)("button",{onClick:()=>O("__none__"),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${!k?"text-primary font-medium":"text-text-main"}`,children:"None"}),(t||[]).map(e=>(0,a.jsx)("button",{onClick:()=>O(e.id),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${k===e.id?"text-primary font-medium":"text-text-main"}`,children:e.name},e.id))]})]}),(0,a.jsxs)("button",{onClick:m,className:"flex flex-col items-center rounded px-2 py-1 text-text-muted hover:bg-black/5 hover:text-primary dark:hover:bg-white/5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,a.jsxs)("button",{onClick:x,className:"flex flex-col items-center rounded px-2 py-1 text-red-500 hover:bg-red-500/10",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]}),(0,a.jsx)(d.lM,{size:"sm",checked:e.isActive??!0,onChange:c,title:e.isActive??!0?"Disable connection":"Enable connection"})]})]})}g.propTypes={model:f().shape({id:f().string.isRequired}).isRequired,fullModel:f().string.isRequired,alias:f().string,copied:f().string,onCopy:f().func.isRequired,testStatus:f().oneOf(["ok","error"]),isCustom:f().bool,isFree:f().bool,onDeleteAlias:f().func,onTest:f().func,isTesting:f().bool,onDisable:f().func,isFirst:f().bool,isLast:f().bool,onMoveUp:f().func,onMoveDown:f().func},f().string.isRequired,f().string.isRequired,f().string,f().func.isRequired,f().func.isRequired,f().func,f().oneOf(["ok","error"]),f().bool,f().string.isRequired,f().object.isRequired,f().string,f().func.isRequired,f().func.isRequired,f().func.isRequired,b.propTypes={providerStorageAlias:f().string.isRequired,providerDisplayAlias:f().string.isRequired,modelAliases:f().object.isRequired,copied:f().string,onCopy:f().func.isRequired,onSetAlias:f().func.isRequired,onDeleteAlias:f().func.isRequired,connections:f().arrayOf(f().shape({id:f().string,isActive:f().bool})).isRequired,isAnthropic:f().bool},v.propTypes={until:f().string.isRequired},j.propTypes={connection:f().shape({id:f().string,name:f().string,email:f().string,displayName:f().string,modelLockUntil:f().string,testStatus:f().string,isActive:f().bool,lastError:f().string,priority:f().number,globalPriority:f().number}).isRequired,proxyPools:f().arrayOf(f().shape({id:f().string,name:f().string,proxyUrl:f().string,noProxy:f().string,isActive:f().bool})),isOAuth:f().bool.isRequired,isFirst:f().bool.isRequired,isLast:f().bool.isRequired,onMoveUp:f().func.isRequired,onMoveDown:f().func.isRequired,onToggleActive:f().func.isRequired,onUpdateProxy:f().func,onEdit:f().func.isRequired,onDelete:f().func.isRequired,oneByOneStatus:f().shape({state:f().string,error:f().string})};let N=`name1|sk-key1
2
2
  name2|sk-key2
3
- sk-key-only-auto-named`;function k({isOpen:e,provider:t,providerName:s,isCompatible:l,isAnthropic:r,authType:n,authHint:o,website:p,proxyPools:m,error:x,onSave:u,onBulkDone:h,onClose:f}){let g="__none__",y="ollama-local"===t,b="cookie"===n,v="xai"===t&&!b,j=b?"Cookie Value":"API Key",w="azure"===t,C="cloudflare-ai"===t,S=c.Q2?.[t]?.regions||null,$=c.Q2?.[t]?.defaultRegion||S?.[0]?.id||"",[A,P]=(0,i.useState)({name:"",apiKey:"",defaultModel:"",priority:1,proxyPoolId:g,ollamaHostUrl:""}),[T,O]=(0,i.useState)({azureEndpoint:"",apiVersion:"2024-10-01-preview",deployment:"",organization:""}),[E,I]=(0,i.useState)({accountId:""}),[D,R]=(0,i.useState)($),[U,_]=(0,i.useState)(!1),[z,q]=(0,i.useState)(null),[M,K]=(0,i.useState)(!1),[F,L]=(0,i.useState)("single"),[J,W]=(0,i.useState)(""),[B,H]=(0,i.useState)(null),V=()=>y&&A.ollamaHostUrl.trim()?{baseUrl:A.ollamaHostUrl.trim()}:w?{azureEndpoint:T.azureEndpoint,apiVersion:T.apiVersion,deployment:T.deployment,organization:T.organization}:C?{accountId:E.accountId}:S&&D?{region:D}:void 0,G=async()=>{_(!0);try{let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:A.apiKey,providerSpecificData:V()})}),s=await e.json();q(s.valid?"success":"failed")}catch{q("failed")}finally{_(!1)}},Q=async()=>{if(t&&(y||A.apiKey)&&(y||A.name)&&(!l||A.defaultModel.trim())){K(!0);try{let e=!1;try{_(!0),q(null);let s=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:A.apiKey,providerSpecificData:V()})});e=!!(await s.json()).valid,q(e?"success":"failed")}catch{q("failed")}finally{_(!1)}await u({name:A.name||(y?"Ollama Local":""),apiKey:A.apiKey,defaultModel:l?A.defaultModel.trim():void 0,priority:A.priority,proxyPoolId:A.proxyPoolId===g?null:A.proxyPoolId,testStatus:e?"active":"unknown",providerSpecificData:V()})}finally{K(!1)}}},Z=async()=>{let e=J.split("\n").map(e=>e.trim()).filter(Boolean);if(!e.length)return;K(!0),H(null);let s=0,a=0;for(let i=0;i<e.length;i++){let l=e[i].split("|"),r=l.length>=2?l.slice(1).join("|").trim():l[0].trim(),n=l.length>=2?l[0].trim():"Key",o=`${n} ${i+1}`;try{(await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:r,name:o,priority:1,testStatus:"unknown"})})).ok?s++:a++}catch{a++}}K(!1),H({success:s,failed:a}),s>0&&h&&h()};return t?(0,a.jsx)(d.aF,{isOpen:e,title:`Add ${s||t} ${j}`,onClose:f,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{size:"sm",variant:"single"===F?"primary":"ghost",onClick:()=>{L("single"),H(null)},children:"Single"}),(0,a.jsx)(d.$n,{size:"sm",variant:"bulk"===F?"primary":"ghost",onClick:()=>{L("bulk"),H(null)},children:"Bulk Add"})]}),"bulk"===F&&(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["One key per line. Format: ",(0,a.jsx)("code",{children:"name|apiKey"})," or just ",(0,a.jsx)("code",{children:"apiKey"})," (auto-named by index)."]}),(0,a.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:N,value:J,onChange:e=>W(e.target.value)}),B&&(0,a.jsxs)("div",{className:`text-sm font-medium ${B.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",B.success," added",B.failed>0?`, ✗ ${B.failed} failed`:""]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{onClick:Z,fullWidth:!0,disabled:M||!J.trim(),children:M?"Adding...":"Add All Keys"}),(0,a.jsx)(d.$n,{onClick:f,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"single"===F&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.pd,{label:"Name",value:A.name,onChange:e=>P({...A,name:e.target.value}),placeholder:y?"Ollama Local":"Production Key"}),y&&(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.pd,{label:"Ollama Host URL",value:A.ollamaHostUrl,onChange:e=>P({...A,ollamaHostUrl:e.target.value}),placeholder:"http://localhost:11434",className:"flex-1"}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(d.$n,{onClick:G,disabled:U||M,variant:"secondary",children:U?"Checking...":"Check"})})]}),!y&&(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.pd,{label:j,type:b?"text":"password",value:A.apiKey,onChange:e=>P({...A,apiKey:e.target.value}),placeholder:b?"grok-web"===t?"sso=xxxxx... or just the raw value":"eyJhbGciOi...":v?"xai-...":"",className:"flex-1"}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(d.$n,{onClick:G,disabled:!A.apiKey||U||M,variant:"secondary",children:U?"Checking...":"Check"})})]}),v&&(0,a.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."}),b&&o&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:[o,p&&(0,a.jsxs)(a.Fragment,{children:[" ",(0,a.jsxs)("a",{href:p,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:["Open ",p.replace(/^https?:\/\//,"")]})]})]}),S&&(0,a.jsx)(d.l6,{label:"Region",value:D,onChange:e=>R(e.target.value),options:S.map(e=>({value:e.id,label:e.label}))}),l&&(0,a.jsx)(d.pd,{label:"Default Model",value:A.defaultModel,onChange:e=>P({...A,defaultModel:e.target.value}),placeholder:r?"claude-3-5-sonnet-latest":"gpt-4o-mini"}),y&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Leave blank to use ",(0,a.jsx)("code",{children:"http://localhost:11434"}),". For remote Ollama, enter the full host URL (e.g. ",(0,a.jsx)("code",{children:"http://192.168.1.10:11434"}),")."]}),z&&(0,a.jsx)(d.Ex,{variant:"success"===z?"success":"error",children:"success"===z?"Valid":"Invalid"}),x&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:x}),l&&(0,a.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."}),C&&(0,a.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,a.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Cloudflare Workers AI"}),(0,a.jsx)(d.pd,{label:"Account ID",value:E.accountId,onChange:e=>I({...E,accountId:e.target.value}),placeholder:"abc123def456..."}),(0,a.jsxs)("p",{className:"text-xs text-text-muted mt-2",children:["Find your Account ID in the right sidebar of ",(0,a.jsx)("a",{href:"https://dash.cloudflare.com",target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:"dash.cloudflare.com"})]})]}),w&&(0,a.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,a.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Azure OpenAI Configuration"}),(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsx)(d.pd,{label:"Azure Endpoint",value:T.azureEndpoint,onChange:e=>O({...T,azureEndpoint:e.target.value}),placeholder:"https://your-resource.openai.azure.com"}),(0,a.jsx)(d.pd,{label:"Deployment Name",value:T.deployment,onChange:e=>O({...T,deployment:e.target.value}),placeholder:"gpt-4"}),(0,a.jsx)(d.pd,{label:"API Version",value:T.apiVersion,onChange:e=>O({...T,apiVersion:e.target.value}),placeholder:"2024-10-01-preview"}),(0,a.jsx)(d.pd,{label:"Organization",value:T.organization,onChange:e=>O({...T,organization:e.target.value}),placeholder:"Organization ID"})]})]}),(0,a.jsx)(d.pd,{label:"Priority",type:"number",value:A.priority,onChange:e=>P({...A,priority:Number.parseInt(e.target.value)||1})}),(0,a.jsx)(d.l6,{label:"Proxy Pool",value:A.proxyPoolId,onChange:e=>P({...A,proxyPoolId:e.target.value}),options:[{value:g,label:"None"},...(m||[]).map(e=>({value:e.id,label:e.name}))],placeholder:"None"}),0===(m||[]).length&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"No active proxy pools available. Create one in Proxy Pools page first."}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Legacy manual proxy fields are still accepted by API for backward compatibility."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{onClick:Q,fullWidth:!0,disabled:M||!y&&(!A.name||!A.apiKey)||l&&!A.defaultModel.trim()||w&&(!T.azureEndpoint||!T.deployment||!T.organization)||C&&!E.accountId,children:M?"Saving...":"Save"}),(0,a.jsx)(d.$n,{onClick:f,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})}):null}function w({isOpen:e,node:t,onSave:s,onClose:l,isAnthropic:r}){let[n,o]=(0,i.useState)({name:"",prefix:"",apiType:"chat",baseUrl:"https://api.openai.com/v1"}),[c,p]=(0,i.useState)(!1),[m,x]=(0,i.useState)(""),[u,h]=(0,i.useState)(""),[f,g]=(0,i.useState)(!1),[y,b]=(0,i.useState)(null);(0,i.useEffect)(()=>{t&&o({name:t.name||"",prefix:t.prefix||"",apiType:t.apiType||"chat",baseUrl:t.baseUrl||(r?"https://api.anthropic.com/v1":"https://api.openai.com/v1")})},[t,r]);let v=async()=>{if(n.name.trim()&&n.prefix.trim()&&n.baseUrl.trim()){p(!0);try{let e={name:n.name,prefix:n.prefix,baseUrl:n.baseUrl};r||(e.apiType=n.apiType),await s(e)}finally{p(!1)}}},j=async()=>{g(!0);try{let e=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:n.baseUrl,apiKey:m,type:r?"anthropic-compatible":"openai-compatible",modelId:u.trim()||void 0})}),t=await e.json();b(t.valid?"success":"failed")}catch{b("failed")}finally{g(!1)}};return t?(0,a.jsx)(d.aF,{isOpen:e,title:`Edit ${r?"Anthropic":"OpenAI"} Compatible`,onClose:l,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)(d.pd,{label:"Name",value:n.name,onChange:e=>o({...n,name:e.target.value}),placeholder:`${r?"Anthropic":"OpenAI"} Compatible (Prod)`,hint:"Required. A friendly label for this node."}),(0,a.jsx)(d.pd,{label:"Prefix",value:n.prefix,onChange:e=>o({...n,prefix:e.target.value}),placeholder:r?"ac-prod":"oc-prod",hint:"Required. Used as the provider prefix for model IDs."}),!r&&(0,a.jsx)(d.l6,{label:"API Type",options:[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}],value:n.apiType,onChange:e=>o({...n,apiType:e.target.value})}),(0,a.jsx)(d.pd,{label:"Base URL",value:n.baseUrl,onChange:e=>o({...n,baseUrl:e.target.value}),placeholder:r?"https://api.anthropic.com/v1":"https://api.openai.com/v1",hint:`Use the base URL (ending in /v1) for your ${r?"Anthropic":"OpenAI"}-compatible API.`}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.pd,{label:"API Key (for Check)",type:"password",value:m,onChange:e=>x(e.target.value),className:"flex-1"}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(d.$n,{onClick:j,disabled:!m||f||!n.baseUrl.trim(),variant:"secondary",children:f?"Checking...":"Check"})})]}),(0,a.jsx)(d.pd,{label:"Model ID (optional)",value:u,onChange:e=>h(e.target.value),placeholder:"e.g. my-model-id",hint:"If provider lacks /models endpoint, enter a model ID to validate via chat/completions instead."}),y&&(0,a.jsx)(d.Ex,{variant:"success"===y?"success":"error",children:"success"===y?"Valid":"Invalid"}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{onClick:v,fullWidth:!0,disabled:!n.name.trim()||!n.prefix.trim()||!n.baseUrl.trim()||c,children:c?"Saving...":"Save"}),(0,a.jsx)(d.$n,{onClick:l,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}function C({isOpen:e,providerAlias:t,providerDisplayAlias:s,onSave:l,onClose:r}){let[n,o]=(0,i.useState)(""),[c,p]=(0,i.useState)(null),[m,x]=(0,i.useState)(""),[u,h]=(0,i.useState)(!1);(0,i.useEffect)(()=>{e&&(o(""),p(null),x(""))},[e]);let f=e=>{let s=`${t}/`;return e.startsWith(s)?e.slice(s.length):e},g=async()=>{let e=f(n.trim());if(e){p("testing"),x("");try{let s=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${t}/${e}`})}),a=await s.json();p(a.ok?"ok":"error"),x(a.error||"")}catch(e){p("error"),x(e.message)}}},y=async()=>{let e=f(n.trim());if(e&&!u){h(!0);try{await l(e)}finally{h(!1)}}};return(0,a.jsx)(d.aF,{isOpen:e,onClose:r,title:"Add Custom Model",children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Model ID"}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("input",{type:"text",value:n,onChange:e=>{o(e.target.value),p(null),x("")},onKeyDown:e=>{"Enter"===e.key&&g()},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,a.jsx)(d.$n,{variant:"secondary",icon:"science",loading:"testing"===c,onClick:g,disabled:!n.trim()||"testing"===c,children:"testing"===c?"Testing...":"Test"})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Sent to provider as: ",(0,a.jsx)("code",{className:"font-mono bg-sidebar px-1 rounded",children:f(n.trim())||"model-id"})]})]}),"ok"===c&&(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base",children:"check_circle"}),"Model is reachable"]}),"error"===c&&(0,a.jsxs)("div",{className:"flex items-start gap-2 text-sm text-red-500",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base shrink-0",children:"cancel"}),(0,a.jsx)("span",{children:m||"Model not reachable"})]}),(0,a.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,a.jsx)(d.$n,{onClick:r,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,a.jsx)(d.$n,{onClick:y,fullWidth:!0,size:"sm",disabled:!n.trim()||u,children:u?"Adding...":"Add Model"})]})]})})}function S({isOpen:e,provider:t,onClose:s,onDone:l}){let[r,n]=(0,i.useState)(""),[o,c]=(0,i.useState)(!1),[p,m]=(0,i.useState)(null),[x,u]=(0,i.useState)(""),h=r.split("\n").map(e=>e.trim()).filter(Boolean).filter(e=>{let t=e.indexOf("|");return(-1===t?e:e.slice(t+1).trim()).length>0}).length;async function f(){if(h){c(!0),u(""),m(null);try{let e=await fetch(`/api/providers/${t}/pool`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({lines:r})}),s=await e.json();if(!e.ok)throw Error(s.error||"Failed");m(s),l?.()}catch(e){u(e.message)}finally{c(!1)}}}function g(){n(""),m(null),u(""),s()}return(0,a.jsx)(d.aF,{isOpen:e,onClose:g,title:"Add Keys to Pool",children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("p",{className:"text-sm text-text-muted mb-2",children:["Paste keys below — one per line. Format: ",(0,a.jsx)("code",{className:"text-xs bg-black/10 dark:bg-white/10 px-1 rounded",children:"name|key"})," or just ",(0,a.jsx)("code",{className:"text-xs bg-black/10 dark:bg-white/10 px-1 rounded",children:"key"}),"."]}),(0,a.jsx)("textarea",{className:"w-full rounded-md border border-border bg-background px-3 py-2 text-sm font-mono focus:outline-none focus:border-primary resize-none",rows:10,placeholder:"my-key-1|sk-ant-api03-...\nmy-key-2|sk-ant-api03-...\nsk-ant-api03-...",value:r,onChange:e=>{n(e.target.value),m(null)}}),(0,a.jsx)("p",{className:"text-xs text-text-muted mt-1",children:h>0?`${h} valid key${1!==h?"s":""} detected`:"Paste keys above"})]}),p&&(0,a.jsxs)("div",{className:"rounded-md border border-green-500/30 bg-green-500/10 px-3 py-2 text-sm text-green-600 dark:text-green-400",children:["Added ",p.added," key",1!==p.added?"s":""," to pool.",p.skipped>0&&` Skipped ${p.skipped} duplicate${1!==p.skipped?"s":""}.`]}),x&&(0,a.jsx)("p",{className:"text-sm text-red-500",children:x}),(0,a.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,a.jsx)(d.$n,{variant:"ghost",onClick:g,children:"Close"}),(0,a.jsx)(d.$n,{onClick:f,disabled:!h||o,children:o?"Adding...":`Add ${h||""} Keys`})]})]})})}function $({provider:e,onPullDone:t}){let[s,l]=(0,i.useState)({keys:[],count:0,page:1,totalPages:1,poolSize:30,autoReplace:!0}),[r,n]=(0,i.useState)(!0),[o,c]=(0,i.useState)(""),[p,m]=(0,i.useState)(!1),[x,u]=(0,i.useState)(null),[h,f]=(0,i.useState)(!1),[g,y]=(0,i.useState)(null),[b,v]=(0,i.useState)(1),j=(0,i.useCallback)(async(t=b)=>{try{let s=await fetch(`/api/providers/${e}/pool?page=${t}&limit=50`,{cache:"no-store"});if(s.ok){let e=await s.json();l(e),o||c(String(e.poolSize))}}catch{}n(!1)},[e,b,o]);async function N(){m(!0),u(null);try{let a=parseInt(o,10)||s.poolSize,i=await fetch(`/api/providers/${e}/pool/pull`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({count:a})}),l=await i.json();if(!i.ok)throw Error(l.error||"Pull failed");u(l),v(1),await j(1),t?.()}catch(e){u({error:e.message})}finally{m(!1)}}async function k(t){y(t);try{await fetch(`/api/providers/${e}/pool?keyId=${t}`,{method:"DELETE"}),await j(b)}finally{y(null)}}async function w(t){l(e=>({...e,autoReplace:t})),await fetch(`/api/providers/${e}/pool`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({autoReplace:t})})}async function C(){let t=parseInt(o,10);!Number.isFinite(t)||t<1||t!==s.poolSize&&(l(e=>({...e,poolSize:t})),await fetch(`/api/providers/${e}/pool`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({poolSize:t})}))}return((0,i.useEffect)(()=>{j(b)},[e,b]),r)?(0,a.jsx)("div",{className:"py-8 text-center text-sm text-text-muted",children:"Loading pool..."}):(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-4",children:[(0,a.jsxs)("span",{className:"font-medium",children:[s.count," key",1!==s.count?"s":""," in pool"]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted",children:"Auto-replace"}),(0,a.jsx)(d.lM,{checked:s.autoReplace,onChange:w})]})]}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted",children:"Pull"}),(0,a.jsx)("input",{type:"number",min:"1",className:"w-16 rounded-md border border-border bg-background px-2 py-1 text-sm text-center focus:outline-none focus:border-primary",value:o,onChange:e=>c(e.target.value),onBlur:C}),(0,a.jsx)("span",{className:"text-xs text-text-muted",children:"keys"}),(0,a.jsx)(d.$n,{size:"sm",icon:"download",onClick:N,disabled:p||0===s.count,children:p?"Pulling...":"Pull from pool"}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"add",onClick:()=>f(!0),children:"Add to pool"})]})]}),x&&(0,a.jsx)("div",{className:`rounded-md border px-3 py-2 text-sm ${x.error?"border-red-500/30 bg-red-500/10 text-red-500":"border-green-500/30 bg-green-500/10 text-green-600 dark:text-green-400"}`,children:x.error?x.error:`Pulled ${x.pulled} key${1!==x.pulled?"s":""} to connections.${x.skipped?` Skipped ${x.skipped} duplicate${1!==x.skipped?"s":""}.`:""}${x.message?` ${x.message}`:""}`}),0===s.keys.length?(0,a.jsxs)("div",{className:"flex flex-col items-center gap-3 rounded-lg border border-border py-10 text-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-3xl text-text-muted",children:"key_off"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"No keys in pool"}),(0,a.jsx)(d.$n,{size:"sm",icon:"add",onClick:()=>f(!0),children:"Add Keys to Pool"})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"overflow-x-auto rounded-lg border border-border",children:(0,a.jsxs)("table",{className:"w-full text-sm",children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{className:"border-b border-border bg-black/[0.02] dark:bg-white/[0.02] text-xs text-text-muted",children:[(0,a.jsx)("th",{className:"px-4 py-2 text-left font-medium uppercase tracking-wide",children:"Name"}),(0,a.jsx)("th",{className:"px-4 py-2 text-left font-medium uppercase tracking-wide",children:"Key"}),(0,a.jsx)("th",{className:"px-4 py-2 text-right font-medium uppercase tracking-wide",children:"Action"})]})}),(0,a.jsx)("tbody",{children:s.keys.map((e,t)=>(0,a.jsxs)("tr",{className:`border-b border-border last:border-0 ${t%2==0?"":"bg-black/[0.01] dark:bg-white/[0.01]"}`,children:[(0,a.jsx)("td",{className:"px-4 py-2 text-text-muted",children:e.name||(0,a.jsx)("span",{className:"text-text-muted/50 italic",children:"—"})}),(0,a.jsx)("td",{className:"px-4 py-2 font-mono text-xs text-text-muted",children:e.key}),(0,a.jsx)("td",{className:"px-4 py-2 text-right",children:(0,a.jsx)("button",{className:"text-red-500 hover:text-red-400 transition-colors disabled:opacity-40",onClick:()=>k(e.id),disabled:g===e.id,title:"Remove from pool",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-base",children:"close"})})})]},e.id))})]})}),s.totalPages>1&&(0,a.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,a.jsxs)("span",{className:"text-text-muted text-xs",children:["Page ",s.page," of ",s.totalPages," (",s.count," total)"]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{size:"sm",variant:"ghost",icon:"chevron_left",disabled:b<=1,onClick:()=>v(e=>e-1),children:"Prev"}),(0,a.jsx)(d.$n,{size:"sm",variant:"ghost",icon:"chevron_right",disabled:b>=s.totalPages,onClick:()=>v(e=>e+1),children:"Next"})]})]})]}),(0,a.jsx)(S,{isOpen:h,provider:e,onClose:()=>f(!1),onDone:()=>{v(1),j(1)}})]})}function A(){let e,t=(0,l.useParams)(),s=(0,l.useRouter)(),r=t.id,[x,h]=(0,i.useState)([]),[f,y]=(0,i.useState)(!0),[v,N]=(0,i.useState)(null),[S,A]=(0,i.useState)([]),[P,T]=(0,i.useState)(!1),[O,E]=(0,i.useState)(!1),[I,D]=(0,i.useState)(!1),[R,U]=(0,i.useState)(""),[_,z]=(0,i.useState)(!1),[q,M]=(0,i.useState)(!1),[K,F]=(0,i.useState)(!1),[L,J]=(0,i.useState)(null),[W,B]=(0,i.useState)({}),[H,V]=(0,i.useState)(!1),[G,Q]=(0,i.useState)({}),[Z,X]=(0,i.useState)(""),[Y,ee]=(0,i.useState)(null),[et,es]=(0,i.useState)(!1),[ea,ei]=(0,i.useState)([]),[el,er]=(0,i.useState)("__none__"),[en,eo]=(0,i.useState)(!1),[ed,ec]=(0,i.useState)(null),[ep,em]=(0,i.useState)(""),[ex,eu]=(0,i.useState)("auto"),[eh,ef]=(0,i.useState)([]),[eg,ey]=(0,i.useState)([]),[eb,ev]=(0,i.useState)([]),[ej,eN]=(0,i.useState)(null),[ek,ew]=(0,i.useState)(null),[eC,eS]=(0,i.useState)(!1),[e$,eA]=(0,i.useState)("connections"),[eP,eT]=(0,i.useState)(!1),[eO,eE]=(0,i.useState)(!1),[eI,eD]=(0,i.useState)(!1),[eR,eU]=(0,i.useState)(null),[e_,ez]=(0,i.useState)({}),[eq,eM]=(0,i.useState)(null),eK=(0,i.useRef)(!1),{copied:eF,copy:eL}=(0,m.C)(),eJ="ag_risk_confirmed",eW=()=>{T(!0)},eB=()=>{"antigravity"===r&&"true"!==window.localStorage.getItem(eJ)?eS(!0):eZ?eW():(U(""),D(!0))},eH=()=>{U(""),D(!0)},eV=()=>{eZ?eB():eH()},eG=v?{id:v.id,name:v.name||("anthropic-compatible"===v.type?"Anthropic Compatible":"OpenAI Compatible"),color:"anthropic-compatible"===v.type?"#D97757":"#10A37F",textIcon:"anthropic-compatible"===v.type?"AC":"OC",apiType:v.apiType,baseUrl:v.baseUrl,type:v.type}:c.zN[r]||c.fg[r]||c.IS[r]||c.nJ[r]||c.br[r],eQ=eG?.authModes||[],eZ=!!c.zN[r]||!!c.IS[r]||eQ.includes("oauth"),eX=!!c.fg[r]||eQ.includes("apikey"),eY=!!c.IS[r]?.noAuth,e0=(0,p.KC)(r),e1=(0,c.wG)(r),e2=(0,c.mq)(r),e5=(0,c.gb)(r),e3=e2||e5,e4=!e3&&eZ&&eX,e6="xai"===r?"Grok Build OAuth":"OAuth",e7="xai"===r?"xAI API Key":"API Key";c.Q2[r]?.thinkingConfig||c.s9.extended;let e8=e3?r:e1,e9=e3?v?.prefix||r:e1,te=(0,i.useCallback)(async()=>{try{let e=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(e8)}`,{cache:"no-store"}),t=await e.json();e.ok&&ev(t.ids||[])}catch(e){console.log("Error fetching disabled models:",e)}},[e8]),tt=(0,i.useCallback)(async()=>{try{let e=await fetch(`/api/models/order?providerAlias=${encodeURIComponent(e8)}`,{cache:"no-store"}),t=await e.json();e.ok&&eN(t.order||null)}catch(e){console.log("Error fetching model order:",e)}},[e8]),ts=async e=>{try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:e8,ids:[e]})})).ok&&await te()}catch(e){console.log("Error disabling model:",e)}},ta=async e=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(e8)}&id=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await te()}catch(e){console.log("Error enabling model:",e)}},ti=async e=>{e.length&&ew({title:"Disable All Models",message:`Disable all ${e.length} model(s)?`,onConfirm:async()=>{ew(null);try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:e8,ids:e})})).ok&&await te()}catch(e){console.log("Error disabling all models:",e)}}})},tl=async()=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(e8)}`,{method:"DELETE"})).ok&&await te()}catch(e){console.log("Error enabling all models:",e)}},tr=async(e,t)=>{let s=[...e0,...eg.filter(e=>!e0.some(t=>t.id===e.id))].filter(e=>!e.type||"llm"===e.type),a=new Set(eb),i=s.filter(e=>!a.has(e.id)).map(e=>e.id),l=ej?[...ej.filter(e=>i.includes(e)),...i.filter(e=>!ej.includes(e))]:i,r=l.indexOf(e);if(-1===r)return;let n="up"===t?r-1:r+1;if(n<0||n>=l.length)return;let o=[...l];[o[r],o[n]]=[o[n],o[r]],eN(o);try{await fetch("/api/models/order",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:e8,order:o})})}catch(e){console.log("Error saving model order:",e),await tt()}},tn=(0,i.useCallback)(async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&B(t.aliases||{})}catch(e){console.log("Error fetching aliases:",e)}},[]);(0,i.useEffect)(()=>{"kilocode"===r&&fetch("/api/providers/kilo/free-models").then(e=>e.json()).then(e=>{e.models?.length&&ey(e.models)}).catch(()=>{})},[r]);let to=(0,i.useCallback)(async()=>{try{let[e,t,s,a]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/provider-nodes",{cache:"no-store"}),fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"})]),i=await e.json(),l=await t.json(),n=await s.json(),o=a.ok?await a.json():{};if(e.ok){let e=(i.connections||[]).filter(e=>e.provider===r);h(e)}s.ok&&A(n.proxyPools||[]);let d=(o.providerStrategies||{})[r]||{};ec(d.fallbackStrategy||null),em(null!=d.stickyRoundRobinLimit?String(d.stickyRoundRobinLimit):"1");let c=(o.providerThinking||{})[r]||{};if(eu(c.mode||"auto"),t.ok){let e=(l.nodes||[]).find(e=>e.id===r)||null;if(!e&&e3)for(let t=0;t<3;t+=1){await new Promise(e=>setTimeout(e,150));let t=await fetch("/api/provider-nodes",{cache:"no-store"});if(t.ok&&(e=((await t.json()).nodes||[]).find(e=>e.id===r)||null))break}N(e)}}catch(e){console.log("Error fetching connections:",e)}finally{y(!1)}},[r,e3]),td=async e=>{try{let t=await fetch(`/api/provider-nodes/${r}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),s=await t.json();t.ok&&(N(s.node),await to(),M(!1))}catch(e){console.log("Error updating provider node:",e)}},tc=async(e,t)=>{try{let s=await fetch("/api/settings",{cache:"no-store"}),a=(s.ok?await s.json():{}).providerStrategies||{},i={};e&&(i.fallbackStrategy=e),"round-robin"===e&&""!==t&&(i.stickyRoundRobinLimit=Number(t)||3);let l={...a};0===Object.keys(i).length?delete l[r]:l[r]=i,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:l})})}catch(e){console.log("Error saving provider strategy:",e)}};(0,i.useEffect)(()=>{to(),tn(),te(),tt()},[to,tn,te,tt]),(0,i.useEffect)(()=>{let e=(c.zN[r]||c.fg[r]||c.IS[r]||c.nJ[r])?.modelsFetcher;e&&u(e).then(ef)},[r]);let tp=async(e,t,s=e1)=>{let a=`${s}/${e}`;try{let e=await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:a,alias:t})});if(e.ok)await tn();else{let t=await e.json();alert(t.error||"Failed to set alias")}}catch(e){console.log("Error setting alias:",e)}},tm=async e=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await tn()}catch(e){console.log("Error deleting alias:",e)}},tx=async()=>{if(eO||0===x.length)return;let e=Object.fromEntries(x.map(e=>[e.id,{state:"queued",error:null}]));eK.current=!1,eE(!0),eD(!1),eU(null),ez(e),eM({total:x.length,completed:0,passed:0,failed:0,stopped:!1});let t=0,s=0;try{for(let e=0;e<x.length;e+=1){if(eK.current){eM({total:x.length,completed:e,passed:t,failed:s,stopped:!0});break}let a=x[e];eU(a.id),ez(e=>({...e,[a.id]:{state:"testing",error:null}}));try{let e=await fetch(`/api/providers/${a.id}/test`,{method:"POST"}),i=await e.json(),l=!!i.valid;l?t+=1:s+=1,ez(e=>({...e,[a.id]:{state:l?"success":"failed",error:l?null:i.error||null}}))}catch(e){s+=1,ez(t=>({...t,[a.id]:{state:"failed",error:e.message||"Test failed"}}))}eM({total:x.length,completed:e+1,passed:t,failed:s,stopped:!1}),e<x.length-1&&await new Promise(e=>setTimeout(e,1e3))}}finally{eU(null),eE(!1),eD(!1),eK.current=!1}},tu=async e=>{ew({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{ew(null);try{(await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok&&h(x.filter(t=>t.id!==e))}catch(e){console.log("Error deleting connection:",e)}}})},th=()=>{to(),T(!1)},tf=async e=>{U("");try{let t=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:r,...e})}),s=null;try{s=await t.json()}catch{s=null}if(t.ok){await to(),D(!1);return}U(s?.error||"Failed to save connection")}catch(e){console.log("Error saving connection:",e),U("Failed to save connection")}},tg=async e=>{try{(await fetch(`/api/providers/${L.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await to(),z(!1))}catch(e){console.log("Error updating connection:",e)}},ty=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&h(s=>s.map(s=>s.id===e?{...s,isActive:t}:s))}catch(e){console.log("Error updating connection status:",e)}},tb=async e=>{h(t=>t.map(t=>({...t,isActive:e})));try{await Promise.all(x.map(t=>fetch(`/api/providers/${t.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:e})})))}catch(e){console.log("Error toggling all connections:",e),await to()}},tv=async(e,t)=>{let s=[...x];[s[e],s[t]]=[s[t],s[e]],h(s);try{await Promise.all([fetch(`/api/providers/${s[e].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:e})}),fetch(`/api/providers/${s[t].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:t})})])}catch(e){console.log("Error swapping priority:",e),await to()}},tj=x.filter(e=>ea.includes(e.id));x.length>0&&(ea.length,x.length);let tN=x.some(e=>!1!==e.isActive);(0,i.useEffect)(()=>{ei(e=>e.filter(e=>x.some(t=>t.id===e)))},[x]),(()=>{if(0===tj.length)return;let e=new Set(tj.map(e=>e.providerSpecificData?.proxyPoolId||"__none__"));if(1===e.size){let t=[...e][0];if("__none__"===t)return;let s=S.find(e=>e.id===t);return s?.name}})();let tk=()=>{en||F(!1)},tw=async e=>{eo(!0);try{let t=0;for(let{connectionId:s,proxyPoolId:a}of e)try{(await fetch(`/api/providers/${s}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:a})})).ok||(t+=1)}catch(e){console.log("Error applying proxy for",s,e),t+=1}t>0&&alert(`Updated with ${t} failed request(s).`),await to(),F(!1)}finally{eo(!1)}},tC=e=>tw(x.map(t=>({connectionId:t.id,proxyPoolId:e}))),tS=(0,a.jsx)("div",{className:"flex min-w-0 flex-col divide-y divide-black/[0.03] dark:divide-white/[0.03]",children:x.map((e,t)=>(0,a.jsx)("div",{className:"flex min-w-0 items-stretch",children:(0,a.jsx)("div",{className:"flex-1 min-w-0",children:(0,a.jsx)(j,{connection:e,proxyPools:S,isOAuth:eZ,isFirst:0===t,isLast:t===x.length-1,onMoveUp:()=>tv(t,t-1),onMoveDown:()=>tv(t,t+1),onToggleActive:t=>ty(e.id,t),onUpdateProxy:async t=>{try{(await fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:t||null})})).ok&&h(s=>s.map(s=>s.id===e.id?{...s,providerSpecificData:{...s.providerSpecificData,proxyPoolId:t||null}}:s))}catch(e){console.log("Error updating proxy:",e)}},onEdit:()=>{J(e),z(!0)},onDelete:()=>tu(e.id),oneByOneStatus:e_[e.id]||null})})},e.id))}),t$=S.filter(e=>!0===e.isActive),tA=(0,a.jsx)(d.aF,{isOpen:K,onClose:tk,title:`Apply Proxy (${x.length} connections)`,children:(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsxs)("button",{onClick:()=>{let e=S.filter(e=>!0===e.isActive);return 0===e.length?void alert("No active proxy pools available."):tw(x.map((t,s)=>({connectionId:t.id,proxyPoolId:e[s%e.length].id})))},disabled:en||0===t$.length,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"sync_alt"}),(0,a.jsx)("span",{className:"text-sm text-text-main",children:"One-to-one (rotate)"})]}),(0,a.jsxs)("button",{onClick:()=>tC(null),disabled:en,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"link_off"}),(0,a.jsx)("span",{className:"text-sm text-text-main",children:"None (unbind all)"})]}),S.map(e=>(0,a.jsxs)("button",{onClick:()=>tC(e.id),disabled:en||!0!==e.isActive,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"lan"}),(0,a.jsx)("span",{className:"truncate text-sm text-text-main",children:e.name}),!0!==e.isActive&&(0,a.jsx)("span",{className:"text-[10px] text-text-muted",children:"(inactive)"})]},e.id))]}),en&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Applying..."}),(0,a.jsx)(d.$n,{onClick:tk,variant:"ghost",fullWidth:!0,disabled:en,children:"Cancel"})]})}),tP=async e=>{if(!Y){ee(e);try{let t=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${e8}/${e}`})}),s=await t.json();Q(t=>({...t,[e]:s.ok?"ok":"error"})),X(s.ok?"":s.error||"Model not reachable")}catch{Q(t=>({...t,[e]:"error"})),X("Network error")}finally{ee(null)}}};return f?(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsx)(d.Qv,{}),(0,a.jsx)(d.Qv,{})]}):eG?(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:gap-8 sm:px-0",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)(n(),{href:"/dashboard/providers",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-3 sm:gap-4",children:[(0,a.jsx)("div",{className:"flex size-12 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${eG.color}15`},children:H?(0,a.jsx)("span",{className:"text-sm font-bold",style:{color:eG.color},children:eG.textIcon||eG.id.slice(0,2).toUpperCase()}):(0,a.jsx)(o.default,{src:e2&&eG.apiType?"responses"===eG.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":e5?"/providers/anthropic-m.png":`/providers/${eG.id}.png`,alt:eG.name,width:48,height:48,className:"max-h-12 max-w-12 rounded-lg object-contain",sizes:"48px",onError:()=>V(!0)})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,a.jsx)("h1",{className:"truncate text-2xl font-semibold tracking-tight sm:text-3xl",children:eG.name}),(eG.notice?.apiKeyUrl||eG.notice?.signupUrl||eG.website)&&(0,a.jsxs)("a",{href:eG.notice?.apiKeyUrl||eG.notice?.signupUrl||eG.website,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),eG.notice?.apiKeyUrl?"Get API Key":"Sign up / Learn more"]})]}),(0,a.jsxs)("p",{className:"text-text-muted",children:[x.length," connection",1===x.length?"":"s"]})]})]})]}),eG.deprecated&&(0,a.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,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-yellow-500 mt-0.5 shrink-0",children:"warning"}),(0,a.jsx)("p",{className:"text-xs text-red-600 dark:text-yellow-400 leading-relaxed",children:eG.deprecationNotice})]}),eG.notice?.text&&!eG.deprecated&&(0,a.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,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-blue-500 shrink-0",children:"info"}),(0,a.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:eG.notice.text}),eG.notice.apiKeyUrl&&(0,a.jsx)("a",{href:eG.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 →"})]}),e3&&v&&(0,a.jsx)(d.Zp,{children:(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:e5?"Anthropic Compatible Details":"OpenAI Compatible Details"}),(0,a.jsxs)("p",{className:"break-all text-sm text-text-muted",children:[e5?"Messages API":"responses"===v.apiType?"Responses API":"Chat Completions"," \xb7 ",(v.baseUrl||"").replace(/\/$/,""),"/",e5?"messages":"responses"===v.apiType?"responses":"chat/completions"]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,a.jsx)(d.$n,{size:"sm",icon:"add",onClick:()=>{U(""),D(!0)},className:"w-full sm:w-auto",children:"Add API Key"}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>M(!0),className:"w-full sm:w-auto",children:"Edit"}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:async()=>{ew({title:"Delete Compatible Node",message:`Delete this ${e5?"Anthropic":"OpenAI"} Compatible node?`,onConfirm:async()=>{ew(null);try{(await fetch(`/api/provider-nodes/${r}`,{method:"DELETE"})).ok&&s.push("/dashboard/providers")}catch(e){console.log("Error deleting provider node:",e)}}})},className:"w-full sm:w-auto",children:"Delete"})]})]})}),eY?(0,a.jsx)(d.gw,{providerId:r}):(0,a.jsxs)(d.Zp,{children:[(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsxs)("button",{className:`px-3 py-1.5 rounded-md text-sm font-medium transition-colors ${"connections"===e$?"bg-primary text-white":"text-text-muted hover:text-foreground"}`,onClick:()=>eA("connections"),children:["Connections (",x.length,")"]}),(0,a.jsx)("button",{className:`px-3 py-1.5 rounded-md text-sm font-medium transition-colors ${"pool"===e$?"bg-primary text-white":"text-text-muted hover:text-foreground"}`,onClick:()=>eA("pool"),children:"\uD83D\uDD11 Key Pool"})]}),"connections"===e$&&(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:[x.some(e=>!e.isActive)&&(0,a.jsx)(d.$n,{size:"sm",variant:"ghost",icon:"delete_sweep",disabled:eP,onClick:async()=>{eT(!0);try{await fetch(`/api/providers/${r}/connections/disabled`,{method:"DELETE"}),await to()}finally{eT(!1)}},children:eP?"Deleting...":`Delete Disabled (${x.filter(e=>!e.isActive).length})`}),x.length>1&&(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:tN?"toggle_off":"toggle_on",onClick:()=>tb(!tN),children:tN?"Disable All":"Enable All"}),x.length>0&&S.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"lan",onClick:()=>F(!0),children:"Apply Proxy"}),x.length>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"sync",onClick:tx,disabled:eO,children:eO?"Testing Connection One-by-One...":"Test Connection One-by-One"}),eO&&(0,a.jsx)(d.$n,{size:"sm",variant:"ghost",icon:"stop",onClick:()=>{eO&&(eK.current=!0,eD(!0))},disabled:eI,children:eI?"Stopping...":"Stop"})]}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Round Robin"}),(0,a.jsx)(d.lM,{checked:"round-robin"===ed,onChange:e=>{let t=e?"round-robin":null,s=e?ep||"1":ep;e&&!ep&&em("1"),ec(t),tc(t,s)}}),"round-robin"===ed&&(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted",children:"Sticky:"}),(0,a.jsx)("input",{type:"number",min:1,value:ep,onChange:e=>{var t;em(t=e.target.value),tc("round-robin",t)},placeholder:"1",className:"w-14 px-2 py-1 text-xs border border-border rounded-md bg-background focus:outline-none focus:border-primary"})]})]})]})]}),"pool"===e$?(0,a.jsx)($,{provider:r,onPullDone:to}):0===x.length?(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"inline-flex items-center justify-center w-9 h-9 rounded-full bg-primary/10 text-primary shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:eZ?"lock":"key"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"}),e4&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Choose ",e6," or ",e7,"."]})]})]}),(0,a.jsx)("div",{className:"flex gap-2",children:e4?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:eB,children:e6}),(0,a.jsx)(d.$n,{size:"sm",icon:"key",onClick:eH,children:e7})]}):(0,a.jsxs)(a.Fragment,{children:[!e3&&"iflow"===r&&(0,a.jsx)(d.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>E(!0),children:"Cookie"}),(0,a.jsx)(d.$n,{size:"sm",icon:"add",onClick:eV,children:e3?"Add API Key":"iflow"===r?"OAuth":"Add Connection"})]})})]}):(0,a.jsxs)(a.Fragment,{children:[eq&&(0,a.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,a.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,a.jsxs)("span",{children:["Total: ",eq.total]}),(0,a.jsxs)("span",{children:["Completed: ",eq.completed]}),(0,a.jsxs)("span",{children:["Passed: ",eq.passed]}),(0,a.jsxs)("span",{children:["Failed: ",eq.failed]}),eq.stopped&&(0,a.jsx)("span",{className:"text-amber-600 dark:text-amber-400",children:"Stopped"}),eO&&eR&&(0,a.jsxs)("span",{children:["Running: ",x.find(e=>e.id===eR)?.name||eR]})]})}),tS,!e3&&(0,a.jsxs)("div",{className:"mt-4 grid grid-cols-1 gap-2 sm:flex",children:["iflow"===r&&(0,a.jsx)(d.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>E(!0),title:"Add connection using browser cookie",className:"w-full sm:w-auto",children:"Cookie"}),e4?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:eB,className:"w-full sm:w-auto",children:e6}),(0,a.jsx)(d.$n,{size:"sm",icon:"key",onClick:eH,className:"w-full sm:w-auto",children:e7})]}):(0,a.jsx)(d.$n,{size:"sm",icon:"add",onClick:eV,className:"w-full sm:w-auto",children:"Add"})]})]})]}),(0,a.jsxs)(d.Zp,{children:[(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Available Models"}),!e3&&(e=[...e0,...eg.filter(e=>!e0.some(t=>t.id===e.id))].filter(e=>!e.type||"llm"===e.type).map(e=>e.id).filter(e=>!eb.includes(e)),(0,a.jsxs)("div",{className:"flex gap-2",children:[eb.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:tl,children:"Active All"}),e.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"block",onClick:()=>ti(e),children:"Disable All"})]}))]}),!!Z&&(0,a.jsx)("p",{className:"text-xs text-red-500 mb-3 break-words",children:Z}),(()=>{let e,t,s;if(e3)return(0,a.jsx)(b,{providerStorageAlias:e8,providerDisplayAlias:e9,modelAliases:W,copied:eF,onCopy:eL,onSetAlias:tp,onDeleteAlias:tm,connections:x,isAnthropic:e5});let i=[...e0,...eg.filter(e=>!e0.some(t=>t.id===e.id))].filter(e=>!e.type||"llm"===e.type),l=new Set(eb),n=i.filter(e=>!l.has(e.id)),o=i.filter(e=>l.has(e.id)),d=n.map(e=>e.id),c=ej?[...ej.filter(e=>d.includes(e)).map(e=>n.find(t=>t.id===e)),...n.filter(e=>!ej.includes(e.id))]:n,p=Object.entries(W).filter(([e,t])=>{let s=`${e8}/`;if(!t.startsWith(s))return!1;let a=t.slice(s.length);return eG.passthroughModels?!e0.some(e=>e.id===a):!e0.some(e=>e.id===a)&&e===a}).map(([e,t])=>({id:t.slice(`${e8}/`.length),alias:e,fullModel:t}));return(0,a.jsxs)("div",{className:"flex flex-wrap gap-3",children:[p.map(e=>(0,a.jsx)(g,{model:{id:e.id},fullModel:`${e9}/${e.id}`,alias:e.alias,copied:eF,onCopy:eL,onSetAlias:()=>{},onDeleteAlias:()=>tm(e.alias),testStatus:G[e.id],onTest:x.length>0||eY?()=>tP(e.id):void 0,isTesting:Y===e.id,isCustom:!0,isFree:!1},e.id)),c.map((e,t)=>{let s=`${e8}/${e.id}`,i=`${r}/${e.id}`,l=Object.entries(W).find(([,e])=>e===s||e===i)?.[0];return(0,a.jsx)(g,{model:e,fullModel:`${e9}/${e.id}`,alias:l,copied:eF,onCopy:eL,onSetAlias:t=>tp(e.id,t,e8),onDeleteAlias:()=>tm(l),testStatus:G[e.id],onTest:x.length>0||eY?()=>tP(e.id):void 0,isTesting:Y===e.id,isFree:e.isFree,onDisable:()=>ts(e.id),isFirst:0===t,isLast:t===c.length-1,onMoveUp:()=>tr(e.id,"up"),onMoveDown:()=>tr(e.id,"down")},e.id)}),(0,a.jsxs)("button",{onClick:()=>es(!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,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]}),eh.length>0&&(e=new Set(Object.values(W)),t=new Set(e0.map(e=>e.id)),0===(s=eh.filter(s=>!e.has(`${e8}/${s.id}`)&&!t.has(s.id))).length?null:(0,a.jsxs)("div",{className:"w-full mt-2",children:[(0,a.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"Suggested free models (≥200k context):"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:s.map(e=>(0,a.jsxs)("button",{onClick:async()=>{let t=e.id.split("/").pop();await tp(e.id,t,e8)},className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-black/10 dark:border-white/10 text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:`${e.name} \xb7 ${(e.contextLength/1e3).toFixed(0)}k ctx`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id.split("/").pop()]},e.id))})]})),o.length>0&&(0,a.jsxs)("div",{className:"w-full mt-2",children:[(0,a.jsxs)("p",{className:"text-xs text-text-muted mb-2",children:["Disabled models (",o.length,"):"]}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:o.map(e=>(0,a.jsxs)("button",{onClick:()=>ta(e.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,a.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id]},e.id))})]})]})})()]}),tA,"kiro"===r?(0,a.jsx)(d.Mh,{isOpen:P,providerInfo:eG,onSuccess:th,onClose:()=>T(!1)}):"cursor"===r?(0,a.jsx)(d.G9,{isOpen:P,onSuccess:th,onClose:()=>T(!1)}):"gitlab"===r?(0,a.jsx)(d.vj,{isOpen:P,providerInfo:eG,onSuccess:th,onClose:()=>T(!1)}):(0,a.jsx)(d.LF,{isOpen:P,provider:r,providerInfo:eG,onSuccess:th,onClose:()=>T(!1)}),"iflow"===r&&(0,a.jsx)(d.vE,{isOpen:O,onSuccess:()=>{to(),E(!1)},onClose:()=>E(!1)}),(0,a.jsx)(k,{isOpen:I,provider:r,providerName:eG.name,isCompatible:e3,isAnthropic:e5,authType:eG?.authType,authHint:eG?.authHint,website:eG?.website,proxyPools:S,error:R,onSave:tf,onBulkDone:to,onClose:()=>{U(""),D(!1)}}),(0,a.jsx)(d.wI,{isOpen:_,connection:L,proxyPools:S,onSave:tg,onClose:()=>z(!1)}),e3&&(0,a.jsx)(w,{isOpen:q,node:v,onSave:td,onClose:()=>M(!1),isAnthropic:e5}),!e3&&(0,a.jsx)(C,{isOpen:et,providerAlias:e8,providerDisplayAlias:e9,onSave:async e=>{let t=eG?.passthroughModels?e.split("/").pop():e;await tp(e,t,e8),es(!1)},onClose:()=>es(!1)}),(0,a.jsx)(d.uo,{isOpen:eC,onClose:()=>eS(!1),onConfirm:()=>{(window.localStorage.setItem(eJ,"true"),eS(!1),eZ)?eW():eH()},title:"Risk Notice",message:eG?.deprecationNotice,confirmText:"I Understand, Continue",cancelText:"Cancel",variant:"danger"}),(0,a.jsx)(d.uo,{isOpen:!!ek,onClose:()=>ew(null),onConfirm:ek?.onConfirm,title:ek?.title||"Confirm",message:ek?.message,variant:"danger"})]}):(0,a.jsxs)("div",{className:"text-center py-20",children:[(0,a.jsx)("p",{className:"text-text-muted",children:"Provider not found"}),(0,a.jsx)(n(),{href:"/dashboard/providers",className:"text-primary mt-4 inline-block",children:"Back to Providers"})]})}k.propTypes={isOpen:f().bool.isRequired,provider:f().string,providerName:f().string,isCompatible:f().bool,isAnthropic:f().bool,authType:f().string,authHint:f().string,website:f().string,proxyPools:f().arrayOf(f().shape({id:f().string,name:f().string})),error:f().string,onSave:f().func.isRequired,onBulkDone:f().func,onClose:f().func.isRequired},w.propTypes={isOpen:f().bool.isRequired,node:f().shape({id:f().string,name:f().string,prefix:f().string,apiType:f().string,baseUrl:f().string}),onSave:f().func.isRequired,onClose:f().func.isRequired,isAnthropic:f().bool},C.propTypes={isOpen:f().bool.isRequired,providerAlias:f().string.isRequired,providerDisplayAlias:f().string.isRequired,onSave:f().func.isRequired,onClose:f().func.isRequired}},54700:(e,t,s)=>{Promise.resolve().then(s.bind(s,52720))}},e=>{e.O(0,[2574,3862,1051,5772,1321,5497,8441,3794,7358],()=>e(e.s=54700)),_N_E=e.O()}]);
3
+ sk-key-only-auto-named`;function k({isOpen:e,provider:t,providerName:s,isCompatible:l,isAnthropic:r,authType:n,authHint:o,website:p,proxyPools:m,error:x,onSave:u,onBulkDone:h,onClose:f}){let g="__none__",y="ollama-local"===t,b="cookie"===n,v="xai"===t&&!b,j=b?"Cookie Value":"API Key",w="azure"===t,C="cloudflare-ai"===t,S=c.Q2?.[t]?.regions||null,$=c.Q2?.[t]?.defaultRegion||S?.[0]?.id||"",[A,P]=(0,i.useState)({name:"",apiKey:"",defaultModel:"",priority:1,proxyPoolId:g,ollamaHostUrl:""}),[T,O]=(0,i.useState)({azureEndpoint:"",apiVersion:"2024-10-01-preview",deployment:"",organization:""}),[E,I]=(0,i.useState)({accountId:""}),[D,R]=(0,i.useState)($),[U,_]=(0,i.useState)(!1),[z,q]=(0,i.useState)(null),[M,K]=(0,i.useState)(!1),[F,L]=(0,i.useState)("single"),[J,W]=(0,i.useState)(""),[B,H]=(0,i.useState)(null),V=()=>y&&A.ollamaHostUrl.trim()?{baseUrl:A.ollamaHostUrl.trim()}:w?{azureEndpoint:T.azureEndpoint,apiVersion:T.apiVersion,deployment:T.deployment,organization:T.organization}:C?{accountId:E.accountId}:S&&D?{region:D}:void 0,G=async()=>{_(!0);try{let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:A.apiKey,providerSpecificData:V()})}),s=await e.json();q(s.valid?"success":"failed")}catch{q("failed")}finally{_(!1)}},Q=async()=>{if(t&&(y||A.apiKey)&&(y||A.name)&&(!l||A.defaultModel.trim())){K(!0);try{let e=!1;try{_(!0),q(null);let s=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:A.apiKey,providerSpecificData:V()})});e=!!(await s.json()).valid,q(e?"success":"failed")}catch{q("failed")}finally{_(!1)}await u({name:A.name||(y?"Ollama Local":""),apiKey:A.apiKey,defaultModel:l?A.defaultModel.trim():void 0,priority:A.priority,proxyPoolId:A.proxyPoolId===g?null:A.proxyPoolId,testStatus:e?"active":"unknown",providerSpecificData:V()})}finally{K(!1)}}},Z=async()=>{let e=J.split("\n").map(e=>e.trim()).filter(Boolean);if(!e.length)return;K(!0),H(null);let s=0,a=0;for(let i=0;i<e.length;i++){let l=e[i].split("|"),r=l.length>=2?l.slice(1).join("|").trim():l[0].trim(),n=l.length>=2?l[0].trim():"Key",o=`${n} ${i+1}`;try{(await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:r,name:o,priority:1,testStatus:"unknown"})})).ok?s++:a++}catch{a++}}K(!1),H({success:s,failed:a}),s>0&&h&&h()};return t?(0,a.jsx)(d.aF,{isOpen:e,title:`Add ${s||t} ${j}`,onClose:f,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{size:"sm",variant:"single"===F?"primary":"ghost",onClick:()=>{L("single"),H(null)},children:"Single"}),(0,a.jsx)(d.$n,{size:"sm",variant:"bulk"===F?"primary":"ghost",onClick:()=>{L("bulk"),H(null)},children:"Bulk Add"})]}),"bulk"===F&&(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["One key per line. Format: ",(0,a.jsx)("code",{children:"name|apiKey"})," or just ",(0,a.jsx)("code",{children:"apiKey"})," (auto-named by index)."]}),(0,a.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:N,value:J,onChange:e=>W(e.target.value)}),B&&(0,a.jsxs)("div",{className:`text-sm font-medium ${B.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",B.success," added",B.failed>0?`, ✗ ${B.failed} failed`:""]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{onClick:Z,fullWidth:!0,disabled:M||!J.trim(),children:M?"Adding...":"Add All Keys"}),(0,a.jsx)(d.$n,{onClick:f,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"single"===F&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.pd,{label:"Name",value:A.name,onChange:e=>P({...A,name:e.target.value}),placeholder:y?"Ollama Local":"Production Key"}),y&&(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.pd,{label:"Ollama Host URL",value:A.ollamaHostUrl,onChange:e=>P({...A,ollamaHostUrl:e.target.value}),placeholder:"http://localhost:11434",className:"flex-1"}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(d.$n,{onClick:G,disabled:U||M,variant:"secondary",children:U?"Checking...":"Check"})})]}),!y&&(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.pd,{label:j,type:b?"text":"password",value:A.apiKey,onChange:e=>P({...A,apiKey:e.target.value}),placeholder:b?"grok-web"===t?"sso=xxxxx... or just the raw value":"eyJhbGciOi...":v?"xai-...":"",className:"flex-1"}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(d.$n,{onClick:G,disabled:!A.apiKey||U||M,variant:"secondary",children:U?"Checking...":"Check"})})]}),v&&(0,a.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."}),b&&o&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:[o,p&&(0,a.jsxs)(a.Fragment,{children:[" ",(0,a.jsxs)("a",{href:p,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:["Open ",p.replace(/^https?:\/\//,"")]})]})]}),S&&(0,a.jsx)(d.l6,{label:"Region",value:D,onChange:e=>R(e.target.value),options:S.map(e=>({value:e.id,label:e.label}))}),l&&(0,a.jsx)(d.pd,{label:"Default Model",value:A.defaultModel,onChange:e=>P({...A,defaultModel:e.target.value}),placeholder:r?"claude-3-5-sonnet-latest":"gpt-4o-mini"}),y&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Leave blank to use ",(0,a.jsx)("code",{children:"http://localhost:11434"}),". For remote Ollama, enter the full host URL (e.g. ",(0,a.jsx)("code",{children:"http://192.168.1.10:11434"}),")."]}),z&&(0,a.jsx)(d.Ex,{variant:"success"===z?"success":"error",children:"success"===z?"Valid":"Invalid"}),x&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:x}),l&&(0,a.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."}),C&&(0,a.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,a.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Cloudflare Workers AI"}),(0,a.jsx)(d.pd,{label:"Account ID",value:E.accountId,onChange:e=>I({...E,accountId:e.target.value}),placeholder:"abc123def456..."}),(0,a.jsxs)("p",{className:"text-xs text-text-muted mt-2",children:["Find your Account ID in the right sidebar of ",(0,a.jsx)("a",{href:"https://dash.cloudflare.com",target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:"dash.cloudflare.com"})]})]}),w&&(0,a.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,a.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Azure OpenAI Configuration"}),(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsx)(d.pd,{label:"Azure Endpoint",value:T.azureEndpoint,onChange:e=>O({...T,azureEndpoint:e.target.value}),placeholder:"https://your-resource.openai.azure.com"}),(0,a.jsx)(d.pd,{label:"Deployment Name",value:T.deployment,onChange:e=>O({...T,deployment:e.target.value}),placeholder:"gpt-4"}),(0,a.jsx)(d.pd,{label:"API Version",value:T.apiVersion,onChange:e=>O({...T,apiVersion:e.target.value}),placeholder:"2024-10-01-preview"}),(0,a.jsx)(d.pd,{label:"Organization",value:T.organization,onChange:e=>O({...T,organization:e.target.value}),placeholder:"Organization ID"})]})]}),(0,a.jsx)(d.pd,{label:"Priority",type:"number",value:A.priority,onChange:e=>P({...A,priority:Number.parseInt(e.target.value)||1})}),(0,a.jsx)(d.l6,{label:"Proxy Pool",value:A.proxyPoolId,onChange:e=>P({...A,proxyPoolId:e.target.value}),options:[{value:g,label:"None"},...(m||[]).map(e=>({value:e.id,label:e.name}))],placeholder:"None"}),0===(m||[]).length&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"No active proxy pools available. Create one in Proxy Pools page first."}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Legacy manual proxy fields are still accepted by API for backward compatibility."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{onClick:Q,fullWidth:!0,disabled:M||!y&&(!A.name||!A.apiKey)||l&&!A.defaultModel.trim()||w&&(!T.azureEndpoint||!T.deployment||!T.organization)||C&&!E.accountId,children:M?"Saving...":"Save"}),(0,a.jsx)(d.$n,{onClick:f,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})}):null}function w({isOpen:e,node:t,onSave:s,onClose:l,isAnthropic:r}){let[n,o]=(0,i.useState)({name:"",prefix:"",apiType:"chat",baseUrl:"https://api.openai.com/v1"}),[c,p]=(0,i.useState)(!1),[m,x]=(0,i.useState)(""),[u,h]=(0,i.useState)(""),[f,g]=(0,i.useState)(!1),[y,b]=(0,i.useState)(null);(0,i.useEffect)(()=>{t&&o({name:t.name||"",prefix:t.prefix||"",apiType:t.apiType||"chat",baseUrl:t.baseUrl||(r?"https://api.anthropic.com/v1":"https://api.openai.com/v1")})},[t,r]);let v=async()=>{if(n.name.trim()&&n.prefix.trim()&&n.baseUrl.trim()){p(!0);try{let e={name:n.name,prefix:n.prefix,baseUrl:n.baseUrl};r||(e.apiType=n.apiType),await s(e)}finally{p(!1)}}},j=async()=>{g(!0);try{let e=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:n.baseUrl,apiKey:m,type:r?"anthropic-compatible":"openai-compatible",modelId:u.trim()||void 0})}),t=await e.json();b(t.valid?"success":"failed")}catch{b("failed")}finally{g(!1)}};return t?(0,a.jsx)(d.aF,{isOpen:e,title:`Edit ${r?"Anthropic":"OpenAI"} Compatible`,onClose:l,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)(d.pd,{label:"Name",value:n.name,onChange:e=>o({...n,name:e.target.value}),placeholder:`${r?"Anthropic":"OpenAI"} Compatible (Prod)`,hint:"Required. A friendly label for this node."}),(0,a.jsx)(d.pd,{label:"Prefix",value:n.prefix,onChange:e=>o({...n,prefix:e.target.value}),placeholder:r?"ac-prod":"oc-prod",hint:"Required. Used as the provider prefix for model IDs."}),!r&&(0,a.jsx)(d.l6,{label:"API Type",options:[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}],value:n.apiType,onChange:e=>o({...n,apiType:e.target.value})}),(0,a.jsx)(d.pd,{label:"Base URL",value:n.baseUrl,onChange:e=>o({...n,baseUrl:e.target.value}),placeholder:r?"https://api.anthropic.com/v1":"https://api.openai.com/v1",hint:`Use the base URL (ending in /v1) for your ${r?"Anthropic":"OpenAI"}-compatible API.`}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.pd,{label:"API Key (for Check)",type:"password",value:m,onChange:e=>x(e.target.value),className:"flex-1"}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(d.$n,{onClick:j,disabled:!m||f||!n.baseUrl.trim(),variant:"secondary",children:f?"Checking...":"Check"})})]}),(0,a.jsx)(d.pd,{label:"Model ID (optional)",value:u,onChange:e=>h(e.target.value),placeholder:"e.g. my-model-id",hint:"If provider lacks /models endpoint, enter a model ID to validate via chat/completions instead."}),y&&(0,a.jsx)(d.Ex,{variant:"success"===y?"success":"error",children:"success"===y?"Valid":"Invalid"}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{onClick:v,fullWidth:!0,disabled:!n.name.trim()||!n.prefix.trim()||!n.baseUrl.trim()||c,children:c?"Saving...":"Save"}),(0,a.jsx)(d.$n,{onClick:l,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}function C({isOpen:e,providerAlias:t,providerDisplayAlias:s,onSave:l,onClose:r}){let[n,o]=(0,i.useState)(""),[c,p]=(0,i.useState)(null),[m,x]=(0,i.useState)(""),[u,h]=(0,i.useState)(!1);(0,i.useEffect)(()=>{e&&(o(""),p(null),x(""))},[e]);let f=e=>{let s=`${t}/`;return e.startsWith(s)?e.slice(s.length):e},g=async()=>{let e=f(n.trim());if(e){p("testing"),x("");try{let s=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${t}/${e}`})}),a=await s.json();p(a.ok?"ok":"error"),x(a.error||"")}catch(e){p("error"),x(e.message)}}},y=async()=>{let e=f(n.trim());if(e&&!u){h(!0);try{await l(e)}finally{h(!1)}}};return(0,a.jsx)(d.aF,{isOpen:e,onClose:r,title:"Add Custom Model",children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Model ID"}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("input",{type:"text",value:n,onChange:e=>{o(e.target.value),p(null),x("")},onKeyDown:e=>{"Enter"===e.key&&g()},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,a.jsx)(d.$n,{variant:"secondary",icon:"science",loading:"testing"===c,onClick:g,disabled:!n.trim()||"testing"===c,children:"testing"===c?"Testing...":"Test"})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Sent to provider as: ",(0,a.jsx)("code",{className:"font-mono bg-sidebar px-1 rounded",children:f(n.trim())||"model-id"})]})]}),"ok"===c&&(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base",children:"check_circle"}),"Model is reachable"]}),"error"===c&&(0,a.jsxs)("div",{className:"flex items-start gap-2 text-sm text-red-500",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base shrink-0",children:"cancel"}),(0,a.jsx)("span",{children:m||"Model not reachable"})]}),(0,a.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,a.jsx)(d.$n,{onClick:r,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,a.jsx)(d.$n,{onClick:y,fullWidth:!0,size:"sm",disabled:!n.trim()||u,children:u?"Adding...":"Add Model"})]})]})})}function S({isOpen:e,provider:t,onClose:s,onDone:l}){let[r,n]=(0,i.useState)(""),[o,c]=(0,i.useState)(!1),[p,m]=(0,i.useState)(null),[x,u]=(0,i.useState)(""),h=r.split("\n").map(e=>e.trim()).filter(Boolean).filter(e=>{let t=e.indexOf("|");return(-1===t?e:e.slice(t+1).trim()).length>0}).length;async function f(){if(h){c(!0),u(""),m(null);try{let e=await fetch(`/api/providers/${t}/pool`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({lines:r})}),s=await e.json();if(!e.ok)throw Error(s.error||"Failed");m(s),l?.()}catch(e){u(e.message)}finally{c(!1)}}}function g(){n(""),m(null),u(""),s()}return(0,a.jsx)(d.aF,{isOpen:e,onClose:g,title:"Add Keys to Pool",children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("p",{className:"text-sm text-text-muted mb-2",children:["Paste keys below — one per line. Format: ",(0,a.jsx)("code",{className:"text-xs bg-black/10 dark:bg-white/10 px-1 rounded",children:"name|key"})," or just ",(0,a.jsx)("code",{className:"text-xs bg-black/10 dark:bg-white/10 px-1 rounded",children:"key"}),"."]}),(0,a.jsx)("textarea",{className:"w-full rounded-md border border-border bg-background px-3 py-2 text-sm font-mono focus:outline-none focus:border-primary resize-none",rows:10,placeholder:"my-key-1|sk-ant-api03-...\nmy-key-2|sk-ant-api03-...\nsk-ant-api03-...",value:r,onChange:e=>{n(e.target.value),m(null)}}),(0,a.jsx)("p",{className:"text-xs text-text-muted mt-1",children:h>0?`${h} valid key${1!==h?"s":""} detected`:"Paste keys above"})]}),p&&(0,a.jsxs)("div",{className:"rounded-md border border-green-500/30 bg-green-500/10 px-3 py-2 text-sm text-green-600 dark:text-green-400",children:["Added ",p.added," key",1!==p.added?"s":""," to pool.",p.skipped>0&&` Skipped ${p.skipped} duplicate${1!==p.skipped?"s":""}.`]}),x&&(0,a.jsx)("p",{className:"text-sm text-red-500",children:x}),(0,a.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,a.jsx)(d.$n,{variant:"ghost",onClick:g,children:"Close"}),(0,a.jsx)(d.$n,{onClick:f,disabled:!h||o,children:o?"Adding...":`Add ${h||""} Keys`})]})]})})}function $({provider:e,onPullDone:t}){let[s,l]=(0,i.useState)({keys:[],count:0,page:1,totalPages:1,poolSize:30,autoReplace:!0}),[r,n]=(0,i.useState)(!0),[o,c]=(0,i.useState)(""),[p,m]=(0,i.useState)(!1),[x,u]=(0,i.useState)(null),[h,f]=(0,i.useState)(!1),[g,y]=(0,i.useState)(null),[b,v]=(0,i.useState)(1),j=(0,i.useCallback)(async(t=b)=>{try{let s=await fetch(`/api/providers/${e}/pool?page=${t}&limit=50`,{cache:"no-store"});if(s.ok){let e=await s.json();l(e),o||c(String(e.poolSize))}}catch{}n(!1)},[e,b,o]);async function N(){m(!0),u(null);try{let a=parseInt(o,10)||s.poolSize,i=await fetch(`/api/providers/${e}/pool/pull`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({count:a})}),l=await i.json();if(!i.ok)throw Error(l.error||"Pull failed");u(l),v(1),await j(1),t?.()}catch(e){u({error:e.message})}finally{m(!1)}}async function k(t){y(t);try{await fetch(`/api/providers/${e}/pool?keyId=${t}`,{method:"DELETE"}),await j(b)}finally{y(null)}}async function w(t){l(e=>({...e,autoReplace:t})),await fetch(`/api/providers/${e}/pool`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({autoReplace:t})})}async function C(){let t=parseInt(o,10);!Number.isFinite(t)||t<1||t!==s.poolSize&&(l(e=>({...e,poolSize:t})),await fetch(`/api/providers/${e}/pool`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({poolSize:t})}))}return((0,i.useEffect)(()=>{j(b)},[e,b]),r)?(0,a.jsx)("div",{className:"py-8 text-center text-sm text-text-muted",children:"Loading pool..."}):(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-4",children:[(0,a.jsxs)("span",{className:"font-medium",children:[s.count," key",1!==s.count?"s":""," in pool"]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted",children:"Auto-replace"}),(0,a.jsx)(d.lM,{checked:s.autoReplace,onChange:w})]})]}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted",children:"Pull"}),(0,a.jsx)("input",{type:"number",min:"1",className:"w-16 rounded-md border border-border bg-background px-2 py-1 text-sm text-center focus:outline-none focus:border-primary",value:o,onChange:e=>c(e.target.value),onBlur:C}),(0,a.jsx)("span",{className:"text-xs text-text-muted",children:"keys"}),(0,a.jsx)(d.$n,{size:"sm",icon:"download",onClick:N,disabled:p||0===s.count,children:p?"Pulling...":"Pull from pool"}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"add",onClick:()=>f(!0),children:"Add to pool"})]})]}),x&&(0,a.jsx)("div",{className:`rounded-md border px-3 py-2 text-sm ${x.error?"border-red-500/30 bg-red-500/10 text-red-500":"border-green-500/30 bg-green-500/10 text-green-600 dark:text-green-400"}`,children:x.error?x.error:`Pulled ${x.pulled} key${1!==x.pulled?"s":""} to connections.${x.skipped?` Skipped ${x.skipped} duplicate${1!==x.skipped?"s":""}.`:""}${x.message?` ${x.message}`:""}`}),0===s.keys.length?(0,a.jsxs)("div",{className:"flex flex-col items-center gap-3 rounded-lg border border-border py-10 text-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-3xl text-text-muted",children:"key_off"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"No keys in pool"}),(0,a.jsx)(d.$n,{size:"sm",icon:"add",onClick:()=>f(!0),children:"Add Keys to Pool"})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"overflow-x-auto rounded-lg border border-border",children:(0,a.jsxs)("table",{className:"w-full text-sm",children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{className:"border-b border-border bg-black/[0.02] dark:bg-white/[0.02] text-xs text-text-muted",children:[(0,a.jsx)("th",{className:"px-4 py-2 text-left font-medium uppercase tracking-wide",children:"Name"}),(0,a.jsx)("th",{className:"px-4 py-2 text-left font-medium uppercase tracking-wide",children:"Key"}),(0,a.jsx)("th",{className:"px-4 py-2 text-right font-medium uppercase tracking-wide",children:"Action"})]})}),(0,a.jsx)("tbody",{children:s.keys.map((e,t)=>(0,a.jsxs)("tr",{className:`border-b border-border last:border-0 ${t%2==0?"":"bg-black/[0.01] dark:bg-white/[0.01]"}`,children:[(0,a.jsx)("td",{className:"px-4 py-2 text-text-muted",children:e.name||(0,a.jsx)("span",{className:"text-text-muted/50 italic",children:"—"})}),(0,a.jsx)("td",{className:"px-4 py-2 font-mono text-xs text-text-muted",children:e.key}),(0,a.jsx)("td",{className:"px-4 py-2 text-right",children:(0,a.jsx)("button",{className:"text-red-500 hover:text-red-400 transition-colors disabled:opacity-40",onClick:()=>k(e.id),disabled:g===e.id,title:"Remove from pool",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-base",children:"close"})})})]},e.id))})]})}),s.totalPages>1&&(0,a.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,a.jsxs)("span",{className:"text-text-muted text-xs",children:["Page ",s.page," of ",s.totalPages," (",s.count," total)"]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{size:"sm",variant:"ghost",icon:"chevron_left",disabled:b<=1,onClick:()=>v(e=>e-1),children:"Prev"}),(0,a.jsx)(d.$n,{size:"sm",variant:"ghost",icon:"chevron_right",disabled:b>=s.totalPages,onClick:()=>v(e=>e+1),children:"Next"})]})]})]}),(0,a.jsx)(S,{isOpen:h,provider:e,onClose:()=>f(!1),onDone:()=>{v(1),j(1)}})]})}function A(){let e,t=(0,l.useParams)(),s=(0,l.useRouter)(),r=t.id,[x,h]=(0,i.useState)([]),[f,y]=(0,i.useState)(!0),[v,N]=(0,i.useState)(null),[S,A]=(0,i.useState)([]),[P,T]=(0,i.useState)(!1),[O,E]=(0,i.useState)(!1),[I,D]=(0,i.useState)(!1),[R,U]=(0,i.useState)(""),[_,z]=(0,i.useState)(!1),[q,M]=(0,i.useState)(!1),[K,F]=(0,i.useState)(!1),[L,J]=(0,i.useState)(null),[W,B]=(0,i.useState)({}),[H,V]=(0,i.useState)(!1),[G,Q]=(0,i.useState)({}),[Z,X]=(0,i.useState)(""),[Y,ee]=(0,i.useState)(null),[et,es]=(0,i.useState)(!1),[ea,ei]=(0,i.useState)([]),[el,er]=(0,i.useState)("__none__"),[en,eo]=(0,i.useState)(!1),[ed,ec]=(0,i.useState)(null),[ep,em]=(0,i.useState)(""),[ex,eu]=(0,i.useState)("auto"),[eh,ef]=(0,i.useState)([]),[eg,ey]=(0,i.useState)([]),[eb,ev]=(0,i.useState)([]),[ej,eN]=(0,i.useState)(null),[ek,ew]=(0,i.useState)(null),[eC,eS]=(0,i.useState)(!1),[e$,eA]=(0,i.useState)("connections"),[eP,eT]=(0,i.useState)(!1),[eO,eE]=(0,i.useState)(!1),[eI,eD]=(0,i.useState)(!1),[eR,eU]=(0,i.useState)(null),[e_,ez]=(0,i.useState)({}),[eq,eM]=(0,i.useState)(null),eK=(0,i.useRef)(!1),{copied:eF,copy:eL}=(0,m.C)(),eJ="ag_risk_confirmed",eW=()=>{T(!0)},eB=()=>{"antigravity"===r&&"true"!==window.localStorage.getItem(eJ)?eS(!0):eZ?eW():(U(""),D(!0))},eH=()=>{U(""),D(!0)},eV=()=>{eZ?eB():eH()},eG=v?{id:v.id,name:v.name||("anthropic-compatible"===v.type?"Anthropic Compatible":"OpenAI Compatible"),color:"anthropic-compatible"===v.type?"#D97757":"#10A37F",textIcon:"anthropic-compatible"===v.type?"AC":"OC",apiType:v.apiType,baseUrl:v.baseUrl,type:v.type}:c.zN[r]||c.fg[r]||c.IS[r]||c.nJ[r]||c.br[r],eQ=eG?.authModes||[],eZ=!!c.zN[r]||!!c.IS[r]||eQ.includes("oauth"),eX=!!c.fg[r]||eQ.includes("apikey"),eY=!!c.IS[r]?.noAuth,e0=(0,p.KC)(r),e1=(0,c.wG)(r),e2=(0,c.mq)(r),e5=(0,c.gb)(r),e3=e2||e5,e4=!e3&&eZ&&eX,e6="xai"===r?"Grok Build OAuth":"OAuth",e7="xai"===r?"xAI API Key":"API Key";c.Q2[r]?.thinkingConfig||c.s9.extended;let e8=e3?r:e1,e9=e3?v?.prefix||r:e1,te=(0,i.useCallback)(async()=>{try{let e=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(e8)}`,{cache:"no-store"}),t=await e.json();e.ok&&ev(t.ids||[])}catch(e){console.log("Error fetching disabled models:",e)}},[e8]),tt=(0,i.useCallback)(async()=>{try{let e=await fetch(`/api/models/order?providerAlias=${encodeURIComponent(e8)}`,{cache:"no-store"}),t=await e.json();e.ok&&eN(t.order||null)}catch(e){console.log("Error fetching model order:",e)}},[e8]),ts=async e=>{try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:e8,ids:[e]})})).ok&&await te()}catch(e){console.log("Error disabling model:",e)}},ta=async e=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(e8)}&id=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await te()}catch(e){console.log("Error enabling model:",e)}},ti=async e=>{e.length&&ew({title:"Disable All Models",message:`Disable all ${e.length} model(s)?`,onConfirm:async()=>{ew(null);try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:e8,ids:e})})).ok&&await te()}catch(e){console.log("Error disabling all models:",e)}}})},tl=async()=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(e8)}`,{method:"DELETE"})).ok&&await te()}catch(e){console.log("Error enabling all models:",e)}},tr=async(e,t)=>{let s=[...e0,...eg.filter(e=>!e0.some(t=>t.id===e.id))].filter(e=>!e.type||"llm"===e.type),a=new Set(eb),i=s.filter(e=>!a.has(e.id)).map(e=>e.id),l=ej?[...ej.filter(e=>i.includes(e)),...i.filter(e=>!ej.includes(e))]:i,r=l.indexOf(e);if(-1===r)return;let n="up"===t?r-1:r+1;if(n<0||n>=l.length)return;let o=[...l];[o[r],o[n]]=[o[n],o[r]],eN(o);try{await fetch("/api/models/order",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:e8,order:o})})}catch(e){console.log("Error saving model order:",e),await tt()}},tn=(0,i.useCallback)(async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&B(t.aliases||{})}catch(e){console.log("Error fetching aliases:",e)}},[]);(0,i.useEffect)(()=>{"kilocode"===r&&fetch("/api/providers/kilo/free-models").then(e=>e.json()).then(e=>{e.models?.length&&ey(e.models)}).catch(()=>{})},[r]);let to=(0,i.useCallback)(async()=>{try{let[e,t,s,a]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/provider-nodes",{cache:"no-store"}),fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"})]),i=await e.json(),l=await t.json(),n=await s.json(),o=a.ok?await a.json():{};if(e.ok){let e=(i.connections||[]).filter(e=>e.provider===r);h(e)}s.ok&&A(n.proxyPools||[]);let d=(o.providerStrategies||{})[r]||{};ec(d.fallbackStrategy||null),em(null!=d.stickyRoundRobinLimit?String(d.stickyRoundRobinLimit):"1");let c=(o.providerThinking||{})[r]||{};if(eu(c.mode||"auto"),t.ok){let e=(l.nodes||[]).find(e=>e.id===r)||null;if(!e&&e3)for(let t=0;t<3;t+=1){await new Promise(e=>setTimeout(e,150));let t=await fetch("/api/provider-nodes",{cache:"no-store"});if(t.ok&&(e=((await t.json()).nodes||[]).find(e=>e.id===r)||null))break}N(e)}}catch(e){console.log("Error fetching connections:",e)}finally{y(!1)}},[r,e3]),td=async e=>{try{let t=await fetch(`/api/provider-nodes/${r}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),s=await t.json();t.ok&&(N(s.node),await to(),M(!1))}catch(e){console.log("Error updating provider node:",e)}},tc=async(e,t)=>{try{let s=await fetch("/api/settings",{cache:"no-store"}),a=(s.ok?await s.json():{}).providerStrategies||{},i={};e&&(i.fallbackStrategy=e),"round-robin"===e&&""!==t&&(i.stickyRoundRobinLimit=Number(t)||3);let l={...a};0===Object.keys(i).length?delete l[r]:l[r]=i,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:l})})}catch(e){console.log("Error saving provider strategy:",e)}};(0,i.useEffect)(()=>{to(),tn(),te(),tt()},[to,tn,te,tt]),(0,i.useEffect)(()=>{let e=(c.zN[r]||c.fg[r]||c.IS[r]||c.nJ[r])?.modelsFetcher;e&&u(e).then(ef)},[r]);let tp=async(e,t,s=e1)=>{let a=`${s}/${e}`;try{let e=await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:a,alias:t})});if(e.ok)await tn();else{let t=await e.json();alert(t.error||"Failed to set alias")}}catch(e){console.log("Error setting alias:",e)}},tm=async e=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await tn()}catch(e){console.log("Error deleting alias:",e)}},tx=async()=>{if(eO||0===x.length)return;let e=Object.fromEntries(x.map(e=>[e.id,{state:"queued",error:null}]));eK.current=!1,eE(!0),eD(!1),eU(null),ez(e),eM({total:x.length,completed:0,passed:0,failed:0,stopped:!1});let t=0,s=0;try{for(let e=0;e<x.length;e+=1){if(eK.current){eM({total:x.length,completed:e,passed:t,failed:s,stopped:!0});break}let a=x[e];eU(a.id),ez(e=>({...e,[a.id]:{state:"testing",error:null}}));try{let e=await fetch(`/api/providers/${a.id}/test`,{method:"POST"}),i=await e.json(),l=!!i.valid;l?t+=1:s+=1,ez(e=>({...e,[a.id]:{state:l?"success":"failed",error:l?null:i.error||null}}))}catch(e){s+=1,ez(t=>({...t,[a.id]:{state:"failed",error:e.message||"Test failed"}}))}eM({total:x.length,completed:e+1,passed:t,failed:s,stopped:!1}),e<x.length-1&&await new Promise(e=>setTimeout(e,1e3))}}finally{eU(null),eE(!1),eD(!1),eK.current=!1}},tu=async e=>{ew({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{ew(null);try{(await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok&&h(x.filter(t=>t.id!==e))}catch(e){console.log("Error deleting connection:",e)}}})},th=()=>{to(),T(!1)},tf=async e=>{U("");try{let t=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:r,...e})}),s=null;try{s=await t.json()}catch{s=null}if(t.ok){await to(),D(!1);return}U(s?.error||"Failed to save connection")}catch(e){console.log("Error saving connection:",e),U("Failed to save connection")}},tg=async e=>{try{(await fetch(`/api/providers/${L.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await to(),z(!1))}catch(e){console.log("Error updating connection:",e)}},ty=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&h(s=>s.map(s=>s.id===e?{...s,isActive:t}:s))}catch(e){console.log("Error updating connection status:",e)}},tb=async e=>{h(t=>t.map(t=>({...t,isActive:e})));try{await Promise.all(x.map(t=>fetch(`/api/providers/${t.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:e})})))}catch(e){console.log("Error toggling all connections:",e),await to()}},tv=async(e,t)=>{let s=[...x];[s[e],s[t]]=[s[t],s[e]],h(s);try{await Promise.all([fetch(`/api/providers/${s[e].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:e})}),fetch(`/api/providers/${s[t].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:t})})])}catch(e){console.log("Error swapping priority:",e),await to()}},tj=x.filter(e=>ea.includes(e.id));x.length>0&&(ea.length,x.length);let tN=x.some(e=>!1!==e.isActive);(0,i.useEffect)(()=>{ei(e=>e.filter(e=>x.some(t=>t.id===e)))},[x]),(()=>{if(0===tj.length)return;let e=new Set(tj.map(e=>e.providerSpecificData?.proxyPoolId||"__none__"));if(1===e.size){let t=[...e][0];if("__none__"===t)return;let s=S.find(e=>e.id===t);return s?.name}})();let tk=()=>{en||F(!1)},tw=async e=>{eo(!0);try{let t=0;for(let{connectionId:s,proxyPoolId:a}of e)try{(await fetch(`/api/providers/${s}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:a})})).ok||(t+=1)}catch(e){console.log("Error applying proxy for",s,e),t+=1}t>0&&alert(`Updated with ${t} failed request(s).`),await to(),F(!1)}finally{eo(!1)}},tC=e=>tw(x.map(t=>({connectionId:t.id,proxyPoolId:e}))),tS=(0,a.jsx)("div",{className:"flex min-w-0 flex-col divide-y divide-black/[0.03] dark:divide-white/[0.03]",children:x.map((e,t)=>(0,a.jsx)("div",{className:"flex min-w-0 items-stretch",children:(0,a.jsx)("div",{className:"flex-1 min-w-0",children:(0,a.jsx)(j,{connection:e,proxyPools:S,isOAuth:eZ,isFirst:0===t,isLast:t===x.length-1,onMoveUp:()=>tv(t,t-1),onMoveDown:()=>tv(t,t+1),onToggleActive:t=>ty(e.id,t),onUpdateProxy:async t=>{try{(await fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:t||null})})).ok&&h(s=>s.map(s=>s.id===e.id?{...s,providerSpecificData:{...s.providerSpecificData,proxyPoolId:t||null}}:s))}catch(e){console.log("Error updating proxy:",e)}},onEdit:()=>{J(e),z(!0)},onDelete:()=>tu(e.id),oneByOneStatus:e_[e.id]||null})})},e.id))}),t$=S.filter(e=>!0===e.isActive),tA=(0,a.jsx)(d.aF,{isOpen:K,onClose:tk,title:`Apply Proxy (${x.length} connections)`,children:(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsxs)("button",{onClick:()=>{let e=S.filter(e=>!0===e.isActive);return 0===e.length?void alert("No active proxy pools available."):tw(x.map((t,s)=>({connectionId:t.id,proxyPoolId:e[s%e.length].id})))},disabled:en||0===t$.length,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"sync_alt"}),(0,a.jsx)("span",{className:"text-sm text-text-main",children:"One-to-one (rotate)"})]}),(0,a.jsxs)("button",{onClick:()=>tC(null),disabled:en,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"link_off"}),(0,a.jsx)("span",{className:"text-sm text-text-main",children:"None (unbind all)"})]}),S.map(e=>(0,a.jsxs)("button",{onClick:()=>tC(e.id),disabled:en||!0!==e.isActive,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"lan"}),(0,a.jsx)("span",{className:"truncate text-sm text-text-main",children:e.name}),!0!==e.isActive&&(0,a.jsx)("span",{className:"text-[10px] text-text-muted",children:"(inactive)"})]},e.id))]}),en&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Applying..."}),(0,a.jsx)(d.$n,{onClick:tk,variant:"ghost",fullWidth:!0,disabled:en,children:"Cancel"})]})}),tP=async e=>{if(!Y){ee(e);try{let t=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${e8}/${e}`})}),s=await t.json();Q(t=>({...t,[e]:s.ok?"ok":"error"})),X(s.ok?"":s.error||"Model not reachable")}catch{Q(t=>({...t,[e]:"error"})),X("Network error")}finally{ee(null)}}};return f?(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsx)(d.Qv,{}),(0,a.jsx)(d.Qv,{})]}):eG?(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:gap-8 sm:px-0",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)(n(),{href:"/dashboard/providers",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-3 sm:gap-4",children:[(0,a.jsx)("div",{className:"flex size-12 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${eG.color}15`},children:H?(0,a.jsx)("span",{className:"text-sm font-bold",style:{color:eG.color},children:eG.textIcon||eG.id.slice(0,2).toUpperCase()}):(0,a.jsx)(o.default,{src:e2&&eG.apiType?"responses"===eG.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":e5?"/providers/anthropic-m.png":`/providers/${eG.id}.png`,alt:eG.name,width:48,height:48,className:"max-h-12 max-w-12 rounded-lg object-contain",sizes:"48px",onError:()=>V(!0)})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,a.jsx)("h1",{className:"truncate text-2xl font-semibold tracking-tight sm:text-3xl",children:eG.name}),(eG.notice?.apiKeyUrl||eG.notice?.signupUrl||eG.website)&&(0,a.jsxs)("a",{href:eG.notice?.apiKeyUrl||eG.notice?.signupUrl||eG.website,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),eG.notice?.apiKeyUrl?"Get API Key":"Sign up / Learn more"]})]}),(0,a.jsxs)("p",{className:"text-text-muted",children:[x.length," connection",1===x.length?"":"s"]})]})]})]}),eG.deprecated&&(0,a.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,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-yellow-500 mt-0.5 shrink-0",children:"warning"}),(0,a.jsx)("p",{className:"text-xs text-red-600 dark:text-yellow-400 leading-relaxed",children:eG.deprecationNotice})]}),eG.notice?.text&&!eG.deprecated&&(0,a.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,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-blue-500 shrink-0",children:"info"}),(0,a.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:eG.notice.text}),eG.notice.apiKeyUrl&&(0,a.jsx)("a",{href:eG.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 →"})]}),e3&&v&&(0,a.jsx)(d.Zp,{children:(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:e5?"Anthropic Compatible Details":"OpenAI Compatible Details"}),(0,a.jsxs)("p",{className:"break-all text-sm text-text-muted",children:[e5?"Messages API":"responses"===v.apiType?"Responses API":"Chat Completions"," \xb7 ",(v.baseUrl||"").replace(/\/$/,""),"/",e5?"messages":"responses"===v.apiType?"responses":"chat/completions"]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,a.jsx)(d.$n,{size:"sm",icon:"add",onClick:()=>{U(""),D(!0)},className:"w-full sm:w-auto",children:"Add API Key"}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>M(!0),className:"w-full sm:w-auto",children:"Edit"}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:async()=>{ew({title:"Delete Compatible Node",message:`Delete this ${e5?"Anthropic":"OpenAI"} Compatible node?`,onConfirm:async()=>{ew(null);try{(await fetch(`/api/provider-nodes/${r}`,{method:"DELETE"})).ok&&s.push("/dashboard/providers")}catch(e){console.log("Error deleting provider node:",e)}}})},className:"w-full sm:w-auto",children:"Delete"})]})]})}),eY?(0,a.jsx)(d.gw,{providerId:r}):(0,a.jsxs)(d.Zp,{children:[(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsxs)("button",{className:`px-3 py-1.5 rounded-md text-sm font-medium transition-colors ${"connections"===e$?"bg-primary text-white":"text-text-muted hover:text-foreground"}`,onClick:()=>eA("connections"),children:["Connections (",x.length,")"]}),(0,a.jsx)("button",{className:`px-3 py-1.5 rounded-md text-sm font-medium transition-colors ${"pool"===e$?"bg-primary text-white":"text-text-muted hover:text-foreground"}`,onClick:()=>eA("pool"),children:"\uD83D\uDD11 Key Pool"})]}),"connections"===e$&&(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:[x.some(e=>!e.isActive)&&(0,a.jsx)(d.$n,{size:"sm",variant:"ghost",icon:"delete_sweep",disabled:eP,onClick:async()=>{eT(!0);try{await fetch(`/api/providers/${r}/connections/disabled`,{method:"DELETE"}),await to()}finally{eT(!1)}},children:eP?"Deleting...":`Delete Disabled (${x.filter(e=>!e.isActive).length})`}),x.length>1&&(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:tN?"toggle_off":"toggle_on",onClick:()=>tb(!tN),children:tN?"Disable All":"Enable All"}),x.length>0&&S.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"lan",onClick:()=>F(!0),children:"Apply Proxy"}),x.length>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"sync",onClick:tx,disabled:eO,children:eO?"Testing Connection One-by-One...":"Test Connection One-by-One"}),eO&&(0,a.jsx)(d.$n,{size:"sm",variant:"ghost",icon:"stop",onClick:()=>{eO&&(eK.current=!0,eD(!0))},disabled:eI,children:eI?"Stopping...":"Stop"})]}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Round Robin"}),(0,a.jsx)(d.lM,{checked:"round-robin"===ed,onChange:e=>{let t=e?"round-robin":null,s=e?ep||"1":ep;e&&!ep&&em("1"),ec(t),tc(t,s)}}),"round-robin"===ed&&(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted",children:"Sticky:"}),(0,a.jsx)("input",{type:"number",min:1,value:ep,onChange:e=>{var t;em(t=e.target.value),tc("round-robin",t)},placeholder:"1",className:"w-14 px-2 py-1 text-xs border border-border rounded-md bg-background focus:outline-none focus:border-primary"})]})]})]})]}),"pool"===e$?(0,a.jsx)($,{provider:r,onPullDone:to}):0===x.length?(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"inline-flex items-center justify-center w-9 h-9 rounded-full bg-primary/10 text-primary shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:eZ?"lock":"key"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"}),e4&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Choose ",e6," or ",e7,"."]})]})]}),(0,a.jsx)("div",{className:"flex gap-2",children:e4?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:eB,children:e6}),(0,a.jsx)(d.$n,{size:"sm",icon:"key",onClick:eH,children:e7})]}):(0,a.jsxs)(a.Fragment,{children:[!e3&&"iflow"===r&&(0,a.jsx)(d.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>E(!0),children:"Cookie"}),(0,a.jsx)(d.$n,{size:"sm",icon:"add",onClick:eV,children:e3?"Add API Key":"iflow"===r?"OAuth":"Add Connection"})]})})]}):(0,a.jsxs)(a.Fragment,{children:[eq&&(0,a.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,a.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,a.jsxs)("span",{children:["Total: ",eq.total]}),(0,a.jsxs)("span",{children:["Completed: ",eq.completed]}),(0,a.jsxs)("span",{children:["Passed: ",eq.passed]}),(0,a.jsxs)("span",{children:["Failed: ",eq.failed]}),eq.stopped&&(0,a.jsx)("span",{className:"text-amber-600 dark:text-amber-400",children:"Stopped"}),eO&&eR&&(0,a.jsxs)("span",{children:["Running: ",x.find(e=>e.id===eR)?.name||eR]})]})}),tS,!e3&&(0,a.jsxs)("div",{className:"mt-4 grid grid-cols-1 gap-2 sm:flex",children:["iflow"===r&&(0,a.jsx)(d.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>E(!0),title:"Add connection using browser cookie",className:"w-full sm:w-auto",children:"Cookie"}),e4?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:eB,className:"w-full sm:w-auto",children:e6}),(0,a.jsx)(d.$n,{size:"sm",icon:"key",onClick:eH,className:"w-full sm:w-auto",children:e7})]}):(0,a.jsx)(d.$n,{size:"sm",icon:"add",onClick:eV,className:"w-full sm:w-auto",children:"Add"})]})]})]}),(0,a.jsxs)(d.Zp,{children:[(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Available Models"}),!e3&&(e=[...e0,...eg.filter(e=>!e0.some(t=>t.id===e.id))].filter(e=>!e.type||"llm"===e.type).map(e=>e.id).filter(e=>!eb.includes(e)),(0,a.jsxs)("div",{className:"flex gap-2",children:[eb.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:tl,children:"Active All"}),e.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"block",onClick:()=>ti(e),children:"Disable All"})]}))]}),!!Z&&(0,a.jsx)("p",{className:"text-xs text-red-500 mb-3 break-words",children:Z}),(()=>{let e,t,s;if(e3)return(0,a.jsx)(b,{providerStorageAlias:e8,providerDisplayAlias:e9,modelAliases:W,copied:eF,onCopy:eL,onSetAlias:tp,onDeleteAlias:tm,connections:x,isAnthropic:e5});let i=[...e0,...eg.filter(e=>!e0.some(t=>t.id===e.id))].filter(e=>!e.type||"llm"===e.type),l=new Set(eb),n=i.filter(e=>!l.has(e.id)),o=i.filter(e=>l.has(e.id)),d=n.map(e=>e.id),c=ej?[...ej.filter(e=>d.includes(e)).map(e=>n.find(t=>t.id===e)),...n.filter(e=>!ej.includes(e.id))]:n,p=Object.entries(W).filter(([e,t])=>{let s=`${e8}/`;if(!t.startsWith(s))return!1;let a=t.slice(s.length);return eG.passthroughModels?!e0.some(e=>e.id===a):!e0.some(e=>e.id===a)&&e===a}).map(([e,t])=>({id:t.slice(`${e8}/`.length),alias:e,fullModel:t}));return(0,a.jsxs)("div",{className:"flex flex-wrap gap-3",children:[p.map(e=>(0,a.jsx)(g,{model:{id:e.id},fullModel:`${e9}/${e.id}`,alias:e.alias,copied:eF,onCopy:eL,onSetAlias:()=>{},onDeleteAlias:()=>tm(e.alias),testStatus:G[e.id],onTest:x.length>0||eY?()=>tP(e.id):void 0,isTesting:Y===e.id,isCustom:!0,isFree:!1},e.id)),c.map((e,t)=>{let s=`${e8}/${e.id}`,i=`${r}/${e.id}`,l=Object.entries(W).find(([,e])=>e===s||e===i)?.[0];return(0,a.jsx)(g,{model:e,fullModel:`${e9}/${e.id}`,alias:l,copied:eF,onCopy:eL,onSetAlias:t=>tp(e.id,t,e8),onDeleteAlias:()=>tm(l),testStatus:G[e.id],onTest:x.length>0||eY?()=>tP(e.id):void 0,isTesting:Y===e.id,isFree:e.isFree,onDisable:()=>ts(e.id),isFirst:0===t,isLast:t===c.length-1,onMoveUp:()=>tr(e.id,"up"),onMoveDown:()=>tr(e.id,"down")},e.id)}),(0,a.jsxs)("button",{onClick:()=>es(!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,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]}),eh.length>0&&(e=new Set(Object.values(W)),t=new Set(e0.map(e=>e.id)),0===(s=eh.filter(s=>!e.has(`${e8}/${s.id}`)&&!t.has(s.id))).length?null:(0,a.jsxs)("div",{className:"w-full mt-2",children:[(0,a.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"Suggested free models (≥200k context):"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:s.map(e=>(0,a.jsxs)("button",{onClick:async()=>{let t=e.id.split("/").pop();await tp(e.id,t,e8)},className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-black/10 dark:border-white/10 text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:`${e.name} \xb7 ${(e.contextLength/1e3).toFixed(0)}k ctx`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id.split("/").pop()]},e.id))})]})),o.length>0&&(0,a.jsxs)("div",{className:"w-full mt-2",children:[(0,a.jsxs)("p",{className:"text-xs text-text-muted mb-2",children:["Disabled models (",o.length,"):"]}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:o.map(e=>(0,a.jsxs)("button",{onClick:()=>ta(e.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,a.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id]},e.id))})]})]})})()]}),tA,"kiro"===r?(0,a.jsx)(d.Mh,{isOpen:P,providerInfo:eG,onSuccess:th,onClose:()=>T(!1)}):"cursor"===r?(0,a.jsx)(d.G9,{isOpen:P,onSuccess:th,onClose:()=>T(!1)}):"gitlab"===r?(0,a.jsx)(d.vj,{isOpen:P,providerInfo:eG,onSuccess:th,onClose:()=>T(!1)}):(0,a.jsx)(d.LF,{isOpen:P,provider:r,providerInfo:eG,onSuccess:th,onClose:()=>T(!1)}),"iflow"===r&&(0,a.jsx)(d.vE,{isOpen:O,onSuccess:()=>{to(),E(!1)},onClose:()=>E(!1)}),(0,a.jsx)(k,{isOpen:I,provider:r,providerName:eG.name,isCompatible:e3,isAnthropic:e5,authType:eG?.authType,authHint:eG?.authHint,website:eG?.website,proxyPools:S,error:R,onSave:tf,onBulkDone:to,onClose:()=>{U(""),D(!1)}}),(0,a.jsx)(d.wI,{isOpen:_,connection:L,proxyPools:S,onSave:tg,onClose:()=>z(!1)}),e3&&(0,a.jsx)(w,{isOpen:q,node:v,onSave:td,onClose:()=>M(!1),isAnthropic:e5}),!e3&&(0,a.jsx)(C,{isOpen:et,providerAlias:e8,providerDisplayAlias:e9,onSave:async e=>{let t=eG?.passthroughModels?e.split("/").pop():e;await tp(e,t,e8),es(!1)},onClose:()=>es(!1)}),(0,a.jsx)(d.uo,{isOpen:eC,onClose:()=>eS(!1),onConfirm:()=>{(window.localStorage.setItem(eJ,"true"),eS(!1),eZ)?eW():eH()},title:"Risk Notice",message:eG?.deprecationNotice,confirmText:"I Understand, Continue",cancelText:"Cancel",variant:"danger"}),(0,a.jsx)(d.uo,{isOpen:!!ek,onClose:()=>ew(null),onConfirm:ek?.onConfirm,title:ek?.title||"Confirm",message:ek?.message,variant:"danger"})]}):(0,a.jsxs)("div",{className:"text-center py-20",children:[(0,a.jsx)("p",{className:"text-text-muted",children:"Provider not found"}),(0,a.jsx)(n(),{href:"/dashboard/providers",className:"text-primary mt-4 inline-block",children:"Back to Providers"})]})}k.propTypes={isOpen:f().bool.isRequired,provider:f().string,providerName:f().string,isCompatible:f().bool,isAnthropic:f().bool,authType:f().string,authHint:f().string,website:f().string,proxyPools:f().arrayOf(f().shape({id:f().string,name:f().string})),error:f().string,onSave:f().func.isRequired,onBulkDone:f().func,onClose:f().func.isRequired},w.propTypes={isOpen:f().bool.isRequired,node:f().shape({id:f().string,name:f().string,prefix:f().string,apiType:f().string,baseUrl:f().string}),onSave:f().func.isRequired,onClose:f().func.isRequired,isAnthropic:f().bool},C.propTypes={isOpen:f().bool.isRequired,providerAlias:f().string.isRequired,providerDisplayAlias:f().string.isRequired,onSave:f().func.isRequired,onClose:f().func.isRequired}},67944:(e,t,s)=>{Promise.resolve().then(s.bind(s,52720))}},e=>{e.O(0,[2574,3862,1051,5772,1321,5497,8441,3794,7358],()=>e(e.s=67944)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9089],{15615:(e,r,t)=>{"use strict";t.r(r),t.d(r,{default:()=>u});var a=t(95155),s=t(12115),i=t(73321),l=t(98500),d=t.n(l),o=t(35497),n=t(90620);let c=Object.values(n.Q2).map(e=>({value:e.id,label:e.name})),p=Object.values(n.MA).map(e=>({value:e.id,label:e.name}));function u(){let e=(0,i.useRouter)(),[r,t]=(0,s.useState)(!1),[l,u]=(0,s.useState)({provider:"",authMethod:"api_key",apiKey:"",displayName:"",isActive:!0}),[h,m]=(0,s.useState)({}),x=(e,r)=>{u(t=>({...t,[e]:r})),h[e]&&m(r=>({...r,[e]:null}))},b=async r=>{let a;if(r.preventDefault(),a={},l.provider||(a.provider="Please select a provider"),"api_key"!==l.authMethod||l.apiKey||(a.apiKey="API Key is required"),m(a),0===Object.keys(a).length){t(!0);try{let r=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)});if(r.ok)e.push("/dashboard/providers");else{let e=await r.json();m({submit:e.error||"Failed to create provider"})}}catch(e){m({submit:"An error occurred. Please try again."})}finally{t(!1)}}},v=n.Q2[l.provider];return(0,a.jsxs)("div",{className:"max-w-2xl mx-auto",children:[(0,a.jsxs)("div",{className:"mb-8",children:[(0,a.jsxs)(d(),{href:"/dashboard/providers",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,a.jsx)("h1",{className:"text-3xl font-semibold tracking-tight",children:"Add New Provider"}),(0,a.jsx)("p",{className:"text-text-muted mt-2",children:"Configure a new AI provider to use with your applications."})]}),(0,a.jsx)(o.Zp,{children:(0,a.jsxs)("form",{onSubmit:b,className:"flex flex-col gap-6",children:[(0,a.jsx)(o.l6,{label:"Provider",options:c,value:l.provider,onChange:e=>x("provider",e.target.value),placeholder:"Select a provider",error:h.provider,required:!0}),v&&(0,a.jsxs)(o.Zp.Section,{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"size-10 rounded-lg flex items-center justify-center bg-bg border border-border",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-xl",style:{color:v.color},children:v.icon})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:v.name}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Selected provider"})]})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("label",{className:"text-sm font-medium",children:["Authentication Method ",(0,a.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,a.jsx)("div",{className:"flex gap-3",children:p.map(e=>(0,a.jsxs)("button",{type:"button",onClick:()=>x("authMethod",e.value),className:`flex-1 flex items-center justify-center gap-2 p-4 rounded-lg border transition-all ${l.authMethod===e.value?"border-primary bg-primary/5 text-primary":"border-border hover:border-primary/50"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined",children:"api_key"===e.value?"key":"lock"}),(0,a.jsx)("span",{className:"font-medium",children:e.label})]},e.value))})]}),"api_key"===l.authMethod&&(0,a.jsx)(o.pd,{label:"API Key",type:"password",placeholder:"Enter your API key",value:l.apiKey,onChange:e=>x("apiKey",e.target.value),error:h.apiKey,hint:"Your API key will be encrypted and stored securely.",required:!0}),"oauth2"===l.authMethod&&(0,a.jsxs)(o.Zp.Section,{children:[(0,a.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Connect your account using OAuth2 authentication."}),(0,a.jsx)(o.$n,{type:"button",variant:"secondary",icon:"link",children:"Connect with OAuth2"})]}),(0,a.jsx)(o.pd,{label:"Display Name",placeholder:"e.g., Production API, Dev Environment",value:l.displayName,onChange:e=>x("displayName",e.target.value),hint:"Optional. A friendly name to identify this configuration."}),(0,a.jsx)(o.lM,{checked:l.isActive,onChange:e=>x("isActive",e),label:"Active",description:"Enable this provider for use in your applications"}),h.submit&&(0,a.jsx)("div",{className:"p-4 rounded-lg bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 text-red-600 dark:text-red-400 text-sm",children:h.submit}),(0,a.jsxs)("div",{className:"flex gap-3 pt-4 border-t border-border",children:[(0,a.jsx)(d(),{href:"/dashboard/providers",className:"flex-1",children:(0,a.jsx)(o.$n,{type:"button",variant:"ghost",fullWidth:!0,children:"Cancel"})}),(0,a.jsx)(o.$n,{type:"submit",loading:r,fullWidth:!0,className:"flex-1",children:"Create Provider"})]})]})})]})}},67165:(e,r,t)=>{Promise.resolve().then(t.bind(t,15615))}},e=>{e.O(0,[2574,3862,1051,1321,5497,8441,3794,7358],()=>e(e.s=67165)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9089],{15615:(e,r,t)=>{"use strict";t.r(r),t.d(r,{default:()=>u});var a=t(95155),s=t(12115),i=t(73321),l=t(98500),d=t.n(l),o=t(35497),n=t(90620);let c=Object.values(n.Q2).map(e=>({value:e.id,label:e.name})),p=Object.values(n.MA).map(e=>({value:e.id,label:e.name}));function u(){let e=(0,i.useRouter)(),[r,t]=(0,s.useState)(!1),[l,u]=(0,s.useState)({provider:"",authMethod:"api_key",apiKey:"",displayName:"",isActive:!0}),[h,m]=(0,s.useState)({}),x=(e,r)=>{u(t=>({...t,[e]:r})),h[e]&&m(r=>({...r,[e]:null}))},b=async r=>{let a;if(r.preventDefault(),a={},l.provider||(a.provider="Please select a provider"),"api_key"!==l.authMethod||l.apiKey||(a.apiKey="API Key is required"),m(a),0===Object.keys(a).length){t(!0);try{let r=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)});if(r.ok)e.push("/dashboard/providers");else{let e=await r.json();m({submit:e.error||"Failed to create provider"})}}catch(e){m({submit:"An error occurred. Please try again."})}finally{t(!1)}}},v=n.Q2[l.provider];return(0,a.jsxs)("div",{className:"max-w-2xl mx-auto",children:[(0,a.jsxs)("div",{className:"mb-8",children:[(0,a.jsxs)(d(),{href:"/dashboard/providers",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,a.jsx)("h1",{className:"text-3xl font-semibold tracking-tight",children:"Add New Provider"}),(0,a.jsx)("p",{className:"text-text-muted mt-2",children:"Configure a new AI provider to use with your applications."})]}),(0,a.jsx)(o.Zp,{children:(0,a.jsxs)("form",{onSubmit:b,className:"flex flex-col gap-6",children:[(0,a.jsx)(o.l6,{label:"Provider",options:c,value:l.provider,onChange:e=>x("provider",e.target.value),placeholder:"Select a provider",error:h.provider,required:!0}),v&&(0,a.jsxs)(o.Zp.Section,{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"size-10 rounded-lg flex items-center justify-center bg-bg border border-border",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-xl",style:{color:v.color},children:v.icon})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:v.name}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Selected provider"})]})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("label",{className:"text-sm font-medium",children:["Authentication Method ",(0,a.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,a.jsx)("div",{className:"flex gap-3",children:p.map(e=>(0,a.jsxs)("button",{type:"button",onClick:()=>x("authMethod",e.value),className:`flex-1 flex items-center justify-center gap-2 p-4 rounded-lg border transition-all ${l.authMethod===e.value?"border-primary bg-primary/5 text-primary":"border-border hover:border-primary/50"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined",children:"api_key"===e.value?"key":"lock"}),(0,a.jsx)("span",{className:"font-medium",children:e.label})]},e.value))})]}),"api_key"===l.authMethod&&(0,a.jsx)(o.pd,{label:"API Key",type:"password",placeholder:"Enter your API key",value:l.apiKey,onChange:e=>x("apiKey",e.target.value),error:h.apiKey,hint:"Your API key will be encrypted and stored securely.",required:!0}),"oauth2"===l.authMethod&&(0,a.jsxs)(o.Zp.Section,{children:[(0,a.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Connect your account using OAuth2 authentication."}),(0,a.jsx)(o.$n,{type:"button",variant:"secondary",icon:"link",children:"Connect with OAuth2"})]}),(0,a.jsx)(o.pd,{label:"Display Name",placeholder:"e.g., Production API, Dev Environment",value:l.displayName,onChange:e=>x("displayName",e.target.value),hint:"Optional. A friendly name to identify this configuration."}),(0,a.jsx)(o.lM,{checked:l.isActive,onChange:e=>x("isActive",e),label:"Active",description:"Enable this provider for use in your applications"}),h.submit&&(0,a.jsx)("div",{className:"p-4 rounded-lg bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 text-red-600 dark:text-red-400 text-sm",children:h.submit}),(0,a.jsxs)("div",{className:"flex gap-3 pt-4 border-t border-border",children:[(0,a.jsx)(d(),{href:"/dashboard/providers",className:"flex-1",children:(0,a.jsx)(o.$n,{type:"button",variant:"ghost",fullWidth:!0,children:"Cancel"})}),(0,a.jsx)(o.$n,{type:"submit",loading:r,fullWidth:!0,className:"flex-1",children:"Create Provider"})]})]})})]})}},90953:(e,r,t)=>{Promise.resolve().then(t.bind(t,15615))}},e=>{e.O(0,[2574,3862,1051,1321,5497,8441,3794,7358],()=>e(e.s=90953)),_N_E=e.O()}]);