vansrouter 0.91.87 → 0.91.89

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 (722) 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/react-loadable-manifest.json +4 -4
  6. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +1 -1
  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 +1 -1
  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 +1 -1
  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 +1 -1
  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 +1 -1
  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 +19 -19
  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 +2 -2
  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 +1 -1
  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 +1 -1
  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 +1 -1
  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 +1 -1
  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 +1 -1
  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 +1 -1
  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-fitness/page.js +1 -1
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-fitness/page.js.nft.json +1 -1
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-fitness/page_client-reference-manifest.js +1 -1
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +1 -1
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js +1 -1
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +2 -2
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +1 -1
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +2 -2
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  71. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  72. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +1 -1
  73. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  74. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  75. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +1 -1
  76. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  77. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  78. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  79. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  80. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  81. package/app/.next-cli-build/server/app/_global-error.rsc +2 -2
  82. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +2 -2
  83. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  84. package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  85. package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  86. package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  87. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +2 -2
  88. package/app/.next-cli-build/server/app/_not-found/page.js +1 -1
  89. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  90. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  91. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  92. package/app/.next-cli-build/server/app/_not-found.rsc +4 -4
  93. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +4 -4
  94. package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  95. package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +4 -4
  96. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  97. package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  98. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  99. package/app/.next-cli-build/server/app/api/auth/check/route.js.nft.json +1 -1
  100. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  101. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  102. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  103. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  104. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  105. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
  106. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  107. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +5 -5
  108. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  109. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  110. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  111. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
  112. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  113. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +2 -2
  114. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  115. package/app/.next-cli-build/server/app/api/cli-tools/codewhale-settings/route.js +2 -2
  116. package/app/.next-cli-build/server/app/api/cli-tools/codewhale-settings/route.js.nft.json +1 -1
  117. package/app/.next-cli-build/server/app/api/cli-tools/codex-profiles/route.js.nft.json +1 -1
  118. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  119. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +2 -2
  120. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  121. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  122. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
  123. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  124. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
  125. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  126. package/app/.next-cli-build/server/app/api/cli-tools/crush-settings/route.js +1 -1
  127. package/app/.next-cli-build/server/app/api/cli-tools/crush-settings/route.js.nft.json +1 -1
  128. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +3 -3
  129. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  130. package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js.nft.json +1 -1
  131. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +1 -1
  132. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  133. package/app/.next-cli-build/server/app/api/cli-tools/forge-settings/route.js +2 -2
  134. package/app/.next-cli-build/server/app/api/cli-tools/forge-settings/route.js.nft.json +1 -1
  135. package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js +2 -2
  136. package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js.nft.json +1 -1
  137. package/app/.next-cli-build/server/app/api/cli-tools/hermes-profiles/route.js.nft.json +1 -1
  138. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +1 -1
  139. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  140. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
  141. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  142. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
  143. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  144. package/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route.js +3 -3
  145. package/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route.js.nft.json +1 -1
  146. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
  147. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  148. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +2 -2
  149. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  150. package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js +2 -2
  151. package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js.nft.json +1 -1
  152. package/app/.next-cli-build/server/app/api/cli-tools/smelt-settings/route.js +1 -1
  153. package/app/.next-cli-build/server/app/api/cli-tools/smelt-settings/route.js.nft.json +1 -1
  154. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  155. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  156. package/app/.next-cli-build/server/app/api/combos/presets/route.js +1 -1
  157. package/app/.next-cli-build/server/app/api/combos/presets/route.js.nft.json +1 -1
  158. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  159. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  160. package/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
  161. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
  162. package/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
  163. package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  164. package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  165. package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  166. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  167. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  168. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  169. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  170. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  171. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  172. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  173. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  174. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  175. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  176. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  177. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  178. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  179. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  180. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  181. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  182. package/app/.next-cli-build/server/app/api/models/catalog-sync/route.js +1 -1
  183. package/app/.next-cli-build/server/app/api/models/catalog-sync/route.js.nft.json +1 -1
  184. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  185. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  186. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  187. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  188. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  189. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  190. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  191. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  192. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  193. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  194. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  195. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  196. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  197. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  198. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  199. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  200. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  201. package/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js.nft.json +1 -1
  202. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  203. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
  204. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  205. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  206. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  207. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  208. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  209. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  210. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  211. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  212. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  213. package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js.nft.json +1 -1
  214. package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js +1 -1
  215. package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js.nft.json +1 -1
  216. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  217. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  218. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  219. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  220. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +2 -2
  221. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  222. package/app/.next-cli-build/server/app/api/providers/[id]/gcp-projects/route.js +1 -1
  223. package/app/.next-cli-build/server/app/api/providers/[id]/gcp-projects/route.js.nft.json +1 -1
  224. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  225. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  226. package/app/.next-cli-build/server/app/api/providers/[id]/overrides/route.js +1 -1
  227. package/app/.next-cli-build/server/app/api/providers/[id]/overrides/route.js.nft.json +1 -1
  228. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  229. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  230. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  231. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  232. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  233. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  234. package/app/.next-cli-build/server/app/api/providers/bulk/route.js +1 -1
  235. package/app/.next-cli-build/server/app/api/providers/bulk/route.js.nft.json +1 -1
  236. package/app/.next-cli-build/server/app/api/providers/circuit-breakers/[name]/reset/route.js.nft.json +1 -1
  237. package/app/.next-cli-build/server/app/api/providers/circuit-breakers/route.js.nft.json +1 -1
  238. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  239. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  240. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  241. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  242. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  243. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +2 -2
  244. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  245. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  246. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  247. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  248. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  249. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/fitness/clear/route.js.nft.json +1 -1
  250. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  251. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  252. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  253. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +2 -2
  254. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  255. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +2 -2
  256. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  257. package/app/.next-cli-build/server/app/api/proxy-pools/fitness/clear-all/route.js.nft.json +1 -1
  258. package/app/.next-cli-build/server/app/api/proxy-pools/fitness/route.js.nft.json +1 -1
  259. package/app/.next-cli-build/server/app/api/proxy-pools/netlify-deploy/route.js.nft.json +1 -1
  260. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  261. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +2 -2
  262. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  263. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
  264. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
  265. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js.nft.json +1 -1
  266. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
  267. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
  268. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
  269. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
  270. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
  271. package/app/.next-cli-build/server/app/api/ready/route.js +1 -1
  272. package/app/.next-cli-build/server/app/api/ready/route.js.nft.json +1 -1
  273. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  274. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
  275. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  276. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  277. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  278. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  279. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  280. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  281. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  282. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  283. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +1 -1
  284. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  285. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  286. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  287. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  288. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  289. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  290. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  291. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  292. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  293. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  294. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  295. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  296. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  297. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +2 -2
  298. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  299. package/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js +1 -1
  300. package/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js.nft.json +1 -1
  301. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  302. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  303. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  304. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  305. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  306. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  307. package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  308. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  309. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  310. package/app/.next-cli-build/server/app/api/usage/request-details/[id]/route.js.nft.json +1 -1
  311. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  312. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  313. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  314. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  315. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  316. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  317. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  318. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  319. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +7 -1
  320. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  321. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  322. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  323. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  324. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  325. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  326. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  327. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +2 -2
  328. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  329. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  330. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  331. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  332. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  333. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  334. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  335. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  336. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  337. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  338. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  339. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  340. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  341. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  342. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  343. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  344. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  345. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  346. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js +1 -1
  347. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js.nft.json +1 -1
  348. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js +1 -1
  349. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -1
  350. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js +1 -1
  351. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -1
  352. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js +1 -1
  353. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js.nft.json +1 -1
  354. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  355. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  356. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  357. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  358. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  359. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  360. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  361. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  362. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  363. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  364. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  365. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  366. package/app/.next-cli-build/server/app/callback/page.js +1 -1
  367. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  368. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  369. package/app/.next-cli-build/server/app/callback.html +1 -1
  370. package/app/.next-cli-build/server/app/callback.rsc +4 -4
  371. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +4 -4
  372. package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
  373. package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +4 -4
  374. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
  375. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  376. package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
  377. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  378. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +6 -6
  379. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
  380. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
  381. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  382. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  383. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +6 -6
  384. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
  385. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +4 -4
  386. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
  387. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  388. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +6 -6
  389. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
  390. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
  391. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  392. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  393. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +6 -6
  394. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
  395. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +4 -4
  396. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
  397. package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  398. package/app/.next-cli-build/server/app/dashboard/combos.rsc +6 -6
  399. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  400. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
  401. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  402. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  403. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +6 -6
  404. package/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
  405. package/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +4 -4
  406. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
  407. package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  408. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +6 -6
  409. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
  410. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
  411. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  412. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  413. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +6 -6
  414. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
  415. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +4 -4
  416. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
  417. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  418. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +6 -6
  419. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
  420. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
  421. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
  422. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  423. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  424. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +6 -6
  425. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
  426. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +4 -4
  427. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +2 -2
  428. package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  429. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +6 -6
  430. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
  431. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
  432. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  433. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  434. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +6 -6
  435. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
  436. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +4 -4
  437. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
  438. package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  439. package/app/.next-cli-build/server/app/dashboard/profile.rsc +6 -6
  440. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
  441. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
  442. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  443. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  444. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +6 -6
  445. package/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
  446. package/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +4 -4
  447. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
  448. package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  449. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +6 -6
  450. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  451. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
  452. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  453. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  454. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  455. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +6 -6
  456. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
  457. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +4 -4
  458. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
  459. package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  460. package/app/.next-cli-build/server/app/dashboard/providers.rsc +6 -6
  461. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  462. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  463. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  464. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  465. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +6 -6
  466. package/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
  467. package/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +4 -4
  468. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
  469. package/app/.next-cli-build/server/app/dashboard/proxy-fitness.html +1 -1
  470. package/app/.next-cli-build/server/app/dashboard/proxy-fitness.rsc +6 -6
  471. package/app/.next-cli-build/server/app/dashboard/proxy-fitness.segments/!KGRhc2hib2FyZCk/dashboard/proxy-fitness/__PAGE__.segment.rsc +2 -2
  472. package/app/.next-cli-build/server/app/dashboard/proxy-fitness.segments/!KGRhc2hib2FyZCk/dashboard/proxy-fitness.segment.rsc +1 -1
  473. package/app/.next-cli-build/server/app/dashboard/proxy-fitness.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  474. package/app/.next-cli-build/server/app/dashboard/proxy-fitness.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  475. package/app/.next-cli-build/server/app/dashboard/proxy-fitness.segments/_full.segment.rsc +6 -6
  476. package/app/.next-cli-build/server/app/dashboard/proxy-fitness.segments/_head.segment.rsc +1 -1
  477. package/app/.next-cli-build/server/app/dashboard/proxy-fitness.segments/_index.segment.rsc +4 -4
  478. package/app/.next-cli-build/server/app/dashboard/proxy-fitness.segments/_tree.segment.rsc +2 -2
  479. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  480. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +6 -6
  481. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
  482. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
  483. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  484. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  485. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +6 -6
  486. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
  487. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +4 -4
  488. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
  489. package/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
  490. package/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +6 -6
  491. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +2 -2
  492. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe.segment.rsc +1 -1
  493. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  494. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  495. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +6 -6
  496. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_head.segment.rsc +1 -1
  497. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_index.segment.rsc +4 -4
  498. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +2 -2
  499. package/app/.next-cli-build/server/app/dashboard/quota.html +1 -1
  500. package/app/.next-cli-build/server/app/dashboard/quota.rsc +9 -9
  501. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +4 -4
  502. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
  503. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  504. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  505. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +9 -9
  506. package/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
  507. package/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +4 -4
  508. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
  509. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +1 -1
  510. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  511. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  512. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  513. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +4 -4
  514. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +4 -4
  515. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  516. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +4 -4
  517. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  518. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
  519. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  520. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  521. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  522. package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  523. package/app/.next-cli-build/server/app/dashboard/skills.rsc +6 -6
  524. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +2 -2
  525. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills.segment.rsc +1 -1
  526. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  527. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  528. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +6 -6
  529. package/app/.next-cli-build/server/app/dashboard/skills.segments/_head.segment.rsc +1 -1
  530. package/app/.next-cli-build/server/app/dashboard/skills.segments/_index.segment.rsc +4 -4
  531. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +2 -2
  532. package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
  533. package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +6 -6
  534. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +2 -2
  535. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver.segment.rsc +1 -1
  536. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  537. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  538. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +6 -6
  539. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_head.segment.rsc +1 -1
  540. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_index.segment.rsc +4 -4
  541. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +2 -2
  542. package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  543. package/app/.next-cli-build/server/app/dashboard/translator.rsc +6 -6
  544. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  545. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
  546. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  547. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  548. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +6 -6
  549. package/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
  550. package/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +4 -4
  551. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
  552. package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  553. package/app/.next-cli-build/server/app/dashboard/usage.rsc +6 -6
  554. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
  555. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
  556. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  557. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  558. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +6 -6
  559. package/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
  560. package/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +4 -4
  561. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
  562. package/app/.next-cli-build/server/app/dashboard.html +1 -1
  563. package/app/.next-cli-build/server/app/dashboard.rsc +6 -6
  564. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
  565. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  566. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  567. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +6 -6
  568. package/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
  569. package/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +4 -4
  570. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +2 -2
  571. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  572. package/app/.next-cli-build/server/app/landing/page.js +1 -1
  573. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  574. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  575. package/app/.next-cli-build/server/app/landing.html +1 -1
  576. package/app/.next-cli-build/server/app/landing.rsc +4 -4
  577. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +4 -4
  578. package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
  579. package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +4 -4
  580. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
  581. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
  582. package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
  583. package/app/.next-cli-build/server/app/login/page.js +1 -1
  584. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  585. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  586. package/app/.next-cli-build/server/app/login.html +1 -1
  587. package/app/.next-cli-build/server/app/login.rsc +5 -5
  588. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +5 -5
  589. package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
  590. package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +4 -4
  591. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
  592. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  593. package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
  594. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  595. package/app/.next-cli-build/server/app/masuk/page.js +1 -1
  596. package/app/.next-cli-build/server/app/masuk/page.js.nft.json +1 -1
  597. package/app/.next-cli-build/server/app/masuk/page_client-reference-manifest.js +1 -1
  598. package/app/.next-cli-build/server/app-paths-manifest.json +10 -10
  599. package/app/.next-cli-build/server/chunks/1253.js +1 -1
  600. package/app/.next-cli-build/server/chunks/1685.js +4 -4
  601. package/app/.next-cli-build/server/chunks/1693.js +14 -14
  602. package/app/.next-cli-build/server/chunks/2098.js +1 -1
  603. package/app/.next-cli-build/server/chunks/224.js +1 -1
  604. package/app/.next-cli-build/server/chunks/2247.js +1 -1
  605. package/app/.next-cli-build/server/chunks/228.js +1 -1
  606. package/app/.next-cli-build/server/chunks/2365.js +1 -1
  607. package/app/.next-cli-build/server/chunks/2557.js +9 -9
  608. package/app/.next-cli-build/server/chunks/2741.js +5 -5
  609. package/app/.next-cli-build/server/chunks/2994.js +1 -1
  610. package/app/.next-cli-build/server/chunks/3059.js +1 -1
  611. package/app/.next-cli-build/server/chunks/3129.js +9 -0
  612. package/app/.next-cli-build/server/chunks/3519.js +1 -1
  613. package/app/.next-cli-build/server/chunks/{4574.js → 3548.js} +4 -12
  614. package/app/.next-cli-build/server/chunks/3738.js +1 -1
  615. package/app/.next-cli-build/server/chunks/3909.js +7 -0
  616. package/app/.next-cli-build/server/chunks/4105.js +1 -1
  617. package/app/.next-cli-build/server/chunks/4121.js +1 -1
  618. package/app/.next-cli-build/server/chunks/4387.js +1 -1
  619. package/app/.next-cli-build/server/chunks/4784.js +1 -0
  620. package/app/.next-cli-build/server/chunks/5376.js +1 -1
  621. package/app/.next-cli-build/server/chunks/5661.js +2 -0
  622. package/app/.next-cli-build/server/chunks/6127.js +1 -0
  623. package/app/.next-cli-build/server/chunks/6385.js +1 -1
  624. package/app/.next-cli-build/server/chunks/6635.js +120 -0
  625. package/app/.next-cli-build/server/chunks/6723.js +1 -1
  626. package/app/.next-cli-build/server/chunks/6797.js +1 -0
  627. package/app/.next-cli-build/server/chunks/7010.js +1 -1
  628. package/app/.next-cli-build/server/chunks/7074.js +1 -1
  629. package/app/.next-cli-build/server/chunks/7104.js +1 -1
  630. package/app/.next-cli-build/server/chunks/7173.js +1 -0
  631. package/app/.next-cli-build/server/chunks/7601.js +1 -0
  632. package/app/.next-cli-build/server/chunks/7622.js +1 -0
  633. package/app/.next-cli-build/server/chunks/77.js +1 -0
  634. package/app/.next-cli-build/server/chunks/7863.js +1 -1
  635. package/app/.next-cli-build/server/chunks/7950.js +1 -1
  636. package/app/.next-cli-build/server/chunks/8413.js +1 -1
  637. package/app/.next-cli-build/server/chunks/8695.js +1 -0
  638. package/app/.next-cli-build/server/chunks/9152.js +1 -0
  639. package/app/.next-cli-build/server/chunks/9462.js +3 -3
  640. package/app/.next-cli-build/server/chunks/9536.js +1 -1
  641. package/app/.next-cli-build/server/chunks/9813.js +1 -1
  642. package/app/.next-cli-build/server/chunks/9974.js +1 -1
  643. package/app/.next-cli-build/server/instrumentation.js +1 -1
  644. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  645. package/app/.next-cli-build/server/middleware-react-loadable-manifest.js +1 -1
  646. package/app/.next-cli-build/server/middleware.js +6 -6
  647. package/app/.next-cli-build/server/pages/404.html +1 -1
  648. package/app/.next-cli-build/server/pages/500.html +1 -1
  649. package/app/.next-cli-build/server/server-reference-manifest.js +1 -1
  650. package/app/.next-cli-build/server/server-reference-manifest.json +1 -1
  651. package/app/.next-cli-build/static/chunks/4385-cbf2781a85164825.js +1 -0
  652. package/app/.next-cli-build/static/chunks/{5882-1249cbe42852fd96.js → 5882-bb73715e79a1edc7.js} +15 -15
  653. package/app/.next-cli-build/static/chunks/7811.44f1e90e48ee2405.js +7 -0
  654. package/app/.next-cli-build/static/chunks/{9131-d37a1bf502688d4e.js → 9131-5c48f6b07c55928d.js} +2 -2
  655. package/app/.next-cli-build/static/chunks/{8667.b22b7da66acd945f.js → 9752.f8753c75713960c0.js} +1 -1
  656. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-695c6386c328069c.js +1 -0
  657. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-7a18b45a954e3c68.js → page-6fb9dbec413202a9.js} +24 -24
  658. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/{page-a6d3f510934cc6a5.js → page-b15161b2f2dbe57a.js} +4 -4
  659. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-350e9dd8ec551006.js +1 -0
  660. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/page-f3837ee992c42414.js +1 -0
  661. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/page-c7d23dc2ea52f500.js +1 -0
  662. package/app/.next-cli-build/static/chunks/webpack-a0ce735078312e9a.js +1 -0
  663. package/app/.next-cli-build/static/css/e277fef3d96cd619.css +1 -0
  664. package/app/package.json +3 -3
  665. package/app/public/i18n/literals/fa.json +1 -1
  666. package/app/public/i18n/literals/id.json +1366 -170
  667. package/app/public/i18n/literals/km.json +1398 -0
  668. package/app/public/i18n/literals/pt-BR.json +1 -1
  669. package/app/public/i18n/literals/th.json +1 -1
  670. package/app/public/i18n/literals/zh-CN.json +1 -1
  671. package/app/public/providers/nace.png +0 -0
  672. package/app/public/providers/sensenova.png +0 -0
  673. package/app/src/app/(dashboard)/dashboard/cli-tools/components/GenericCliToolCard.js +69 -11
  674. package/app/src/app/(dashboard)/dashboard/combos/page.js +71 -19
  675. package/app/src/app/(dashboard)/dashboard/endpoint/EndpointPageClient.js +1 -1
  676. package/app/src/app/(dashboard)/dashboard/media-providers/[kind]/[id]/components/SttExampleCard.js +2 -5
  677. package/app/src/app/(dashboard)/dashboard/media-providers/[kind]/[id]/components/TtsExampleCard.js +94 -11
  678. package/app/src/app/(dashboard)/dashboard/media-providers/[kind]/[id]/components/exampleShared.js +2 -0
  679. package/app/src/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +6 -1
  680. package/app/src/app/(dashboard)/dashboard/token-saver/TokenSaverClient.js +18 -0
  681. package/app/src/app/(dashboard)/dashboard/token-saver/TokenSaverSettings.js +37 -0
  682. package/app/src/app/(dashboard)/dashboard/translator/page.js +9 -2
  683. package/app/src/app/(dashboard)/dashboard/usage/components/ProviderLimits/QuotaTable.js +4 -2
  684. package/app/src/app/(dashboard)/dashboard/usage/components/ProviderLimits/utils.js +16 -1
  685. package/app/src/app/api/cli-tools/pi-settings/route.js +32 -14
  686. package/app/src/app/api/providers/[id]/test/testUtils.js +40 -1
  687. package/app/src/app/api/providers/validate/route.js +1 -0
  688. package/app/src/lib/db/driver.js +27 -0
  689. package/app/src/lib/db/helpers/nullBytes.js +28 -0
  690. package/app/src/lib/db/repos/settingsRepo.js +3 -0
  691. package/app/src/mitm/server.js +24 -24
  692. package/app/src/shared/constants/monaco.js +7 -0
  693. package/app/src/shared/constants/ttsProviders.js +16 -0
  694. package/app/src/shared/utils/bulkAdd.js +3 -0
  695. package/app/src/shared/utils/modelSearchFilter.js +2 -0
  696. package/app/src/sse/handlers/chat.js +2 -0
  697. package/app/src/sse/handlers/imageGeneration.js +12 -0
  698. package/app/src/sse/handlers/stt.js +31 -4
  699. package/app/src/sse/handlers/tts.js +9 -2
  700. package/package.json +1 -1
  701. package/app/.next-cli-build/server/chunks/1691.js +0 -1
  702. package/app/.next-cli-build/server/chunks/2445.js +0 -1
  703. package/app/.next-cli-build/server/chunks/2764.js +0 -1
  704. package/app/.next-cli-build/server/chunks/3280.js +0 -7
  705. package/app/.next-cli-build/server/chunks/3398.js +0 -120
  706. package/app/.next-cli-build/server/chunks/3650.js +0 -1
  707. package/app/.next-cli-build/server/chunks/3712.js +0 -1
  708. package/app/.next-cli-build/server/chunks/3750.js +0 -1
  709. package/app/.next-cli-build/server/chunks/5302.js +0 -1
  710. package/app/.next-cli-build/server/chunks/634.js +0 -1
  711. package/app/.next-cli-build/server/chunks/8729.js +0 -2
  712. package/app/.next-cli-build/server/chunks/9984.js +0 -1
  713. package/app/.next-cli-build/static/chunks/4385-03007e8e097ad6f8.js +0 -1
  714. package/app/.next-cli-build/static/chunks/7811.b41ad2c055232420.js +0 -7
  715. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-db17236a5b2183ab.js +0 -1
  716. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-85770718a5ce696c.js +0 -1
  717. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/page-700aef5520cd0812.js +0 -1
  718. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/page-7fa12dc3d0d68dca.js +0 -1
  719. package/app/.next-cli-build/static/chunks/webpack-619acf270537f5d4.js +0 -1
  720. package/app/.next-cli-build/static/css/918f11e454be0692.css +0 -1
  721. /package/app/.next-cli-build/static/{-8-NstHfD1iTKOGgb6O6F → LbAvi6x-snQC6rsQ9_c6d}/_buildManifest.js +0 -0
  722. /package/app/.next-cli-build/static/{-8-NstHfD1iTKOGgb6O6F → LbAvi6x-snQC6rsQ9_c6d}/_ssgManifest.js +0 -0
@@ -1,10 +1,10 @@
1
- (()=>{var a={};a.id=2134,a.ids=[2134],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},643:a=>{"use strict";a.exports=require("node:perf_hooks")},1708:a=>{"use strict";a.exports=require("node:process")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},4573:a=>{"use strict";a.exports=require("node:buffer")},7066:a=>{"use strict";a.exports=require("node:tty")},9517:(a,b,c)=>{"use strict";function d(a,b){return!1===a?"default":"active"===b||"success"===b?"success":"error"===b||"expired"===b||"unavailable"===b?"error":"default"}function e(a){let b={};for(let c of a||[])c?.provider&&(b[c.provider]||(b[c.provider]={total:0,active:0}),b[c.provider].total+=1,!1!==c.isActive&&(b[c.provider].active+=1));let c=new Set;for(let[a,d]of Object.entries(b))d.total>0&&0===d.active&&c.add(a);return c}c.d(b,{g:()=>d,i:()=>e})},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},13018:(a,b,c)=>{Promise.resolve().then(c.t.bind(c,88844,23))},14985:a=>{"use strict";a.exports=require("dns")},16698:a=>{"use strict";a.exports=require("node:async_hooks")},17891:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/get-segment-param")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},21820:a=>{"use strict";a.exports=require("os")},26713:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/is-bot")},26915:a=>{"use strict";a.exports=import("playwright-core")},27910:a=>{"use strict";a.exports=require("stream")},28354:a=>{"use strict";a.exports=require("util")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},31421:a=>{"use strict";a.exports=require("node:child_process")},32467:a=>{"use strict";a.exports=require("node:http2")},33873:a=>{"use strict";a.exports=require("path")},34589:a=>{"use strict";a.exports=require("node:assert")},35411:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>d});let d=(0,c(35732).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/home/runner/work/VansRouter/VansRouter/src/app/(dashboard)/error.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/runner/work/VansRouter/VansRouter/src/app/(dashboard)/error.js","default")},37067:a=>{"use strict";a.exports=require("node:http")},37540:a=>{"use strict";a.exports=require("node:console")},38522:a=>{"use strict";a.exports=require("node:zlib")},40610:a=>{"use strict";a.exports=require("node:dns")},41025:a=>{"use strict";a.exports=require("next/dist/server/app-render/dynamic-access-async-storage.external.js")},41692:a=>{"use strict";a.exports=require("node:tls")},41792:a=>{"use strict";a.exports=require("node:querystring")},43370:a=>{"use strict";a.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},43954:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/interception-routes")},45961:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>g});var d=c(66238);c(71183);var e=c(84725),f=c.n(e);function g({error:a,reset:b}){return(0,d.jsx)("section",{className:"flex min-h-[calc(100vh-9rem)] items-center justify-center",children:(0,d.jsxs)("div",{className:"w-full max-w-lg rounded-lg border border-border bg-surface p-6 shadow-soft",children:[(0,d.jsx)("div",{className:"mb-4 flex h-11 w-11 items-center justify-center rounded-lg bg-red-500/10 text-red-600 dark:text-red-400",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[24px]",children:"warning"})}),(0,d.jsx)("h1",{className:"text-xl font-semibold text-text-main",children:"Dashboard error"}),(0,d.jsx)("p",{className:"mt-2 text-sm leading-6 text-text-muted",children:"This dashboard view failed to render. Retry the view or head back to the dashboard home."}),a?.message?(0,d.jsx)("pre",{className:"mt-4 max-h-36 overflow-auto rounded-md border border-border bg-surface-2 p-3 text-xs text-text-muted",children:a.message}):null,(0,d.jsxs)("div",{className:"mt-6 flex flex-wrap gap-3",children:[(0,d.jsxs)("button",{type:"button",onClick:b,className:"inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-primary-hover",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"refresh"}),"Try again"]}),(0,d.jsxs)(f(),{href:"/dashboard",className:"inline-flex items-center gap-2 rounded-md border border-border bg-surface px-4 py-2 text-sm font-medium text-text-main transition-colors hover:bg-surface-2",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"home"}),"Dashboard"]})]})]})})}},46293:a=>{"use strict";a.exports=require("sql.js")},47298:(a,b,c)=>{Promise.resolve().then(c.bind(c,40228))},47447:a=>{"use strict";a.exports=require("dompurify")},47940:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>aa});var d=c(66238),e=c(71183),f=c(68344),g=c(84725),h=c.n(g);c(15901),c(1219);var i=c(95988),j=c(40228),k=c(53207),l=c(47953),m=c(6982),n=c(87571),o=c(55009),p=c(7272);let q=new Map;async function r(a){if(!a?.url||!a?.type)return[];let b=q.get(a.url);if(b&&Date.now()<b.expiresAt)return b.data;try{let b=new URLSearchParams({url:a.url,type:a.type}),c=await fetch(`/api/providers/suggested-models?${b}`);if(!c.ok)return[];let d=(await c.json()).data??[];return q.set(a.url,{data:d,expiresAt:Date.now()+6e5}),d}catch{return[]}}function s({customModels:a=[],modelAliases:b={},providerAlias:c,builtInModels:d=[],type:e="llm",includeLegacyAliases:f=!0}){let g=new Set(d.map(a=>a.id)),h=new Set,i=[];for(let b of a){if(!b?.id||b.providerAlias!==c)continue;let a=b?.kind||b?.type||"llm";if(e&&a!==e||g.has(b.id))continue;let d=`${c}/${b.id}`;h.has(d)||(h.add(d),i.push({id:b.id,name:b.name||b.id,fullModel:d,source:"custom",type:a}))}if(!f)return i;let j=`${c}/`;for(let[a,c]of Object.entries(b||{})){if("string"!=typeof c||!c.startsWith(j))continue;let b=c.slice(j.length);!b||g.has(b)||h.has(c)||(h.add(c),i.push({id:b,alias:a,fullModel:c,source:"legacyAlias",type:e||"llm"}))}return i}function t({model:a,fullModel:b,alias:c,copied:e,onCopy:f,testStatus:g,isCustom:h,isFree:i,onDeleteAlias:k,onTest:l,isTesting:m,onDisable:n,caps:o}){let p="ok"===g?"#22c55e":"error"===g?"#ef4444":void 0;return(0,d.jsx)("div",{className:`group w-full sm:w-auto min-w-0 max-w-full rounded-lg border px-3 py-2 ${"ok"===g?"border-green-500/40":"error"===g?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:(0,d.jsxs)("div",{className:"flex min-w-0 items-start gap-2 sm:items-center",children:[(0,d.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base mt-0.5 sm:mt-0",style:p?{color:p}:void 0,children:"ok"===g?"check_circle":"error"===g?"cancel":"smart_toy"}),(0,d.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,d.jsx)("code",{className:"w-fit max-w-full break-all rounded bg-sidebar px-1.5 py-0.5 font-mono text-xs text-text-muted sm:max-w-[360px] sm:truncate",children:b}),(0,d.jsxs)("span",{className:"flex min-w-0 items-center text-[9px] gap-1 pl-1",children:[a.name&&(0,d.jsx)("span",{className:"break-all sm:truncate text-[9px] italic text-text-muted/70",children:a.name}),(0,d.jsx)(j.CapacityBadges,{caps:o,colorOverride:"text-text-muted/70",size:12})]})]}),(0,d.jsxs)("div",{className:"flex shrink-0 items-center gap-0.5 sm:gap-1",children:[l&&(0,d.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,d.jsx)("button",{onClick:l,disabled:m,className:`rounded p-0.5 text-text-muted transition-opacity hover:bg-sidebar hover:text-primary ${m?"opacity-100":"opacity-100 sm:opacity-0 sm:group-hover:opacity-100"}`,children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",style:m?{animation:"spin 1s linear infinite"}:void 0,children:m?"progress_activity":"science"})}),(0,d.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:m?"Testing...":"Test"})]}),(0,d.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,d.jsx)("button",{onClick:()=>f(b,`model-${a.id}`),className:"rounded p-0.5 text-text-muted hover:bg-sidebar hover:text-primary",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:e===`model-${a.id}`?"check":"content_copy"})}),(0,d.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:e===`model-${a.id}`?"Copied!":"Copy"})]}),h?(0,d.jsx)("button",{onClick:k,className:"rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-red-500/10 hover:text-red-500 sm:opacity-0 sm:group-hover:opacity-100",title:"Remove custom model",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):n?(0,d.jsx)("button",{onClick:n,className:"rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-red-500/10 hover:text-red-500 sm:opacity-0 sm:group-hover:opacity-100",title:"Disable this model",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):null]})]})})}function u({modelId:a,fullModel:b,copied:c,onCopy:e,onDeleteAlias:f,onTest:g,testStatus:h,isTesting:i}){let j="ok"===h?"#22c55e":"error"===h?"#ef4444":void 0;return(0,d.jsxs)("div",{className:`flex items-center gap-3 p-3 rounded-lg border ${"ok"===h?"border-green-500/40":"error"===h?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",style:j?{color:j}:void 0,children:"ok"===h?"check_circle":"error"===h?"cancel":"smart_toy"}),(0,d.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,d.jsx)("p",{className:"text-sm font-medium truncate",children:a}),(0,d.jsxs)("div",{className:"flex items-center gap-1 mt-1",children:[(0,d.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:b}),(0,d.jsxs)("div",{className:"relative group/btn",children:[(0,d.jsx)("button",{onClick:()=>e(b,`model-${a}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:c===`model-${a}`?"check":"content_copy"})}),(0,d.jsx)("span",{className:"pointer-events-none absolute top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:c===`model-${a}`?"Copied!":"Copy"})]}),g&&(0,d.jsxs)("div",{className:"relative group/btn",children:[(0,d.jsx)("button",{onClick:g,disabled:i,className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary transition-colors",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",style:i?{animation:"spin 1s linear infinite"}:void 0,children:i?"progress_activity":"science"})}),(0,d.jsx)("span",{className:"pointer-events-none absolute top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:i?"Testing...":"Test"})]})]})]}),(0,d.jsx)("button",{onClick:f,className:"p-1 hover:bg-red-50 rounded text-red-500",title:"Remove model",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"delete"})})]})}function v({providerStorageAlias:a,providerDisplayAlias:b,modelAliases:c,customModels:f,copied:g,onCopy:h,onDeleteAlias:i,onAddCustomModel:k,onDeleteCustomModel:l,connections:m,isAnthropic:n}){let[o,p]=(0,e.useState)(""),[q,r]=(0,e.useState)(!1),[t,w]=(0,e.useState)(!1),[x,y]=(0,e.useState)(null),[z,A]=(0,e.useState)({}),B=async b=>{if(!x){y(b);try{let c=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${a}/${b}`})}),d=await c.json();A(a=>({...a,[b]:d.ok?"ok":"error"}))}catch{A(a=>({...a,[b]:"error"}))}finally{y(null)}}},C=s({customModels:f,modelAliases:c,providerAlias:a,type:"llm"}),D=async()=>{if(!o.trim()||q)return;let a=o.trim();if(C.some(b=>b.id===a))return void alert("Model already exists for this provider.");r(!0);try{await k(a),p("")}catch(a){console.log("Error adding model:",a)}finally{r(!1)}},E=async()=>{if(t)return;let a=m.find(a=>!1!==a.isActive);if(a){w(!0);try{let b=await fetch(`/api/providers/${a.id}/models`),c=await b.json();if(!b.ok)return void alert(c.error||"Failed to import models");let d=c.models||[];if(0===d.length)return void alert("No models returned from /models.");let e=0;for(let a of d){let b=a.id||a.name||a.model;b&&(C.some(a=>a.id===b)||(await k(b),e+=1))}0===e&&alert("No new models were added.")}catch(a){console.log("Error importing models:",a)}finally{w(!1)}}},F=m.some(a=>!1!==a.isActive);return(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("p",{className:"text-sm text-text-muted",children:["Add ",n?"Anthropic":"OpenAI","-compatible models manually or import them from the /models endpoint."]}),(0,d.jsxs)("div",{className:"flex items-end gap-2 flex-wrap",children:[(0,d.jsxs)("div",{className:"flex-1 min-w-[240px]",children:[(0,d.jsx)("label",{htmlFor:"new-compatible-model-input",className:"text-xs text-text-muted mb-1 block",children:"Model ID"}),(0,d.jsx)("input",{id:"new-compatible-model-input",type:"text",value:o,onChange:a=>p(a.target.value),onKeyDown:a=>"Enter"===a.key&&D(),placeholder:n?"claude-3-opus-20240229":"gpt-4o",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})]}),(0,d.jsx)(j.Button,{size:"sm",icon:"add",onClick:D,disabled:!o.trim()||q,children:q?"Adding...":"Add"}),(0,d.jsx)(j.Button,{size:"sm",variant:"secondary",icon:"download",onClick:E,disabled:!F||t,children:t?"Importing...":"Import from /models"})]}),!F&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Add a connection to enable importing models."}),C.length>0&&(0,d.jsx)("div",{className:"flex flex-col gap-3",children:C.map(({id:c,alias:e,source:f})=>(0,d.jsx)(u,{modelId:c,fullModel:`${b}/${c}`,copied:g,onCopy:h,onDeleteAlias:()=>"custom"===f?l(c):i(e),onTest:m.length>0?()=>B(c):void 0,testStatus:z[c],isTesting:x===c},`${f}-${a}/${c}`))})]})}var w=c(5894),x=c(9517);function y({until:a}){let[b,c]=(0,e.useState)("");return b?(0,d.jsxs)("span",{className:"text-xs text-orange-500 font-mono",children:["⏱ ",b]}):null}function z({connection:a,proxyPools:b,isOAuth:c,isFirst:f,isLast:g,onMoveUp:h,onMoveDown:i,onToggleActive:k,onUpdateProxy:l,onEdit:m,onDelete:n,oneByOneStatus:o=null,autoPing:p=null,modelAssignmentOptions:q=null,onModelAssignmentChange:r=null,strictModelAssignment:s=!1}){let[t,u]=(0,e.useState)(!1),[v,A]=(0,e.useState)(!1),B=(0,e.useRef)(null),C=(0,e.useRef)(null),[D,E]=(0,e.useState)(null),F=new Map((b||[]).map(a=>[a.id,a])),G=a.providerSpecificData?.proxyPoolIds||(a.providerSpecificData?.proxyPoolId?[a.providerSpecificData.proxyPoolId]:[]),H=a.providerSpecificData?.proxyRotationStrategy||"none",I=G[0]||a.providerSpecificData?.proxyPoolId||null,J=I?F.get(I):null,K=a.providerSpecificData?.connectionProxyEnabled===!0&&!!a.providerSpecificData?.connectionProxyUrl,L=!!I||K,M=G.length>1?`${G.length} pools (${H})`:J?`Pool: ${J.name}`:I?`Pool: ${I} (inactive/missing)`:K?`Legacy: ${a.providerSpecificData?.connectionProxyUrl}`:"",N=(()=>{if(!p)return"";let a=[];return(p.reactiveOn&&a.push("On reset"),p.scheduleOn&&a.push(`Scheduled (${p.scheduleSummary||"active"})`),a.length>0)?`Auto-ping active: ${a.join(" + ")}. Click to configure.`:"codex"===p.provider?"Auto-starts the next 5h Codex window after reset or on schedule. Click to configure.":"Auto-starts a new window on quota reset or fixed schedule. Click to configure."})(),O="";if(J?.proxyUrl||a.providerSpecificData?.connectionProxyUrl){let b=J?.proxyUrl||a.providerSpecificData?.connectionProxyUrl;try{let a=new URL(b);O=`${a.protocol}//${a.hostname}${a.port?`:${a.port}`:""}`}catch{O=b}}let P=J?.noProxy||a.providerSpecificData?.connectionNoProxy||"",Q="default";J?.isActive===!0?Q="success":(I||K)&&(Q="error");let R=async a=>{A(!0);try{"__none__"===a?await l(null):await l(a),u(!1)}finally{A(!1)}},S=async(a,b)=>{let c=b.filter(a=>F.get(a)?.isActive===!0);if(c.length){A(!0);try{await l({proxyPoolIds:c,proxyRotationStrategy:a}),u(!1)}finally{A(!1)}}},T=a.authType||(c?"oauth":"apikey"),U="oauth"===T,V="cookie"===T,W=a.name?.trim()||a.email?.trim()||a.displayName?.trim()||(U?"OAuth Account":V?"Cookie Account":"API Key"),X=a.name?.trim()&&a.email?.trim()&&a.name.trim()!==a.email.trim()?a.email.trim():a.name?.trim()&&a.displayName?.trim()&&a.name.trim()!==a.displayName.trim()?a.displayName.trim():null,[Y,Z]=(0,e.useState)(!1),$=Object.entries(a).filter(([a])=>a.startsWith("modelLock_")).map(([,a])=>a).filter(a=>!!a).sort()[0]||null,_="unavailable"!==a.testStatus||Y?a.testStatus:"active",aa=()=>o?"queued"===o.state?"queued":"testing"===o.state?"testing":"success"===o.state?"success":"failed"===o.state?o.error?`failed: ${o.error}`:"failed":null:null;return(0,d.jsxs)("div",{className:`group flex min-w-0 flex-col gap-3 rounded-lg p-2 transition-colors hover:bg-black/[0.02] dark:hover:bg-white/[0.02] sm:flex-row sm:items-center sm:justify-between ${!1===a.isActive?"opacity-60":""}`,children:[(0,d.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-2 sm:items-center sm:gap-3",children:[(0,d.jsxs)("div",{className:"flex shrink-0 flex-col",children:[(0,d.jsx)("button",{onClick:h,disabled:f,className:`p-0.5 rounded ${f?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_up"})}),(0,d.jsx)("button",{onClick:i,disabled:g,className:`p-0.5 rounded ${g?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_down"})})]}),(0,d.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base text-text-muted",children:V?"cookie":U?"lock":"key"}),(0,d.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,d.jsx)("p",{className:"text-sm font-medium truncate",children:W}),X&&(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:X}),(0,d.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1.5 sm:gap-2",children:[(0,d.jsx)(j.Badge,{variant:(0,x.g)(a.isActive,_),size:"sm",dot:!0,children:!1===a.isActive?"disabled":_||"Unknown"}),(0,d.jsx)(j.Badge,{variant:"default",size:"sm",children:U?"OAuth":V?"Cookie":"API Key"}),L&&(0,d.jsx)(j.Badge,{variant:Q,size:"sm",children:"Proxy"}),Y&&!1!==a.isActive&&(0,d.jsx)(y,{until:$}),a.lastError&&!1!==a.isActive&&(0,d.jsx)("span",{className:"max-w-full truncate text-xs text-red-500 sm:max-w-[300px]",title:a.lastError,children:a.lastError}),(0,d.jsxs)("span",{className:"text-xs text-text-muted",children:["#",a.priority]}),a.globalPriority&&(0,d.jsxs)("span",{className:"text-xs text-text-muted",children:["Auto: ",a.globalPriority]}),aa()&&(0,d.jsx)(j.Badge,{variant:o?"success"===o.state?"success":"failed"===o.state?"error":"testing"===o.state?"primary":"default":"default",size:"sm",children:aa()})]}),L&&(0,d.jsxs)("div",{className:"mt-1 flex items-center gap-2 flex-wrap",children:[(0,d.jsx)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[420px]",title:M,children:M}),O&&(0,d.jsx)("code",{className:"max-w-full truncate rounded bg-black/5 px-1 py-0.5 font-mono text-[10px] text-text-muted dark:bg-white/5 sm:max-w-[260px]",children:O}),P&&(0,d.jsxs)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[320px]",title:P,children:["no_proxy: ",P]})]}),q&&r&&(0,d.jsxs)("select",{value:Object.prototype.hasOwnProperty.call(a.providerSpecificData||{},"assignedModel")?a.providerSpecificData.assignedModel||"":a.providerSpecificData?.freebuffModel||"",onChange:a=>r(a.target.value),disabled:!s,className:"mt-2 max-w-full rounded-md border border-border bg-background px-2 py-1 text-[11px] text-text-main",title:"Model assignment",children:[(0,d.jsx)("option",{value:"",children:"Unassigned"}),q.map(a=>(0,d.jsx)("option",{value:a.id,children:a.name||a.id},a.id))]})]})]}),(0,d.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 sm:w-auto sm:justify-end",children:[(0,d.jsxs)("div",{className:"grid flex-1 grid-cols-3 gap-1 sm:flex sm:flex-none",children:[(b||[]).length>0&&(0,d.jsxs)("div",{children:[(0,d.jsxs)("button",{ref:C,onClick:()=>{if(t)return void u(!1);let a=C.current?.getBoundingClientRect();if(!a)return void u(!0);let c=((b?.length||0)+1)*34+8,d=window.innerHeight-a.bottom,e=d<c&&a.top>d;E({position:"fixed",right:window.innerWidth-a.right,...e?{bottom:window.innerHeight-a.top+4,maxHeight:Math.max(a.top-8,120)}:{top:a.bottom+4,maxHeight:Math.max(d-8,120)}}),u(!0)},className:`flex w-full flex-col items-center rounded px-2 py-1 transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${L?"text-primary":"text-text-muted hover:text-primary"}`,disabled:v,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:v?"progress_activity":"lan"}),(0,d.jsx)("span",{className:"text-[10px] leading-tight",children:"Proxy"})]}),t&&(0,w.createPortal)((0,d.jsxs)("div",{ref:B,style:D,className:"z-50 max-w-[78vw] min-w-[160px] overflow-y-auto rounded-lg border border-border bg-bg py-1 shadow-lg",children:["smart"===H&&(0,d.jsx)("p",{className:"px-3 py-1 text-[10px] text-text-muted",children:"Smart skips unfit pools for this provider/model."}),(0,d.jsx)("button",{onClick:()=>R("__none__"),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${!I?"text-primary font-medium":"text-text-main"}`,children:"None"}),(0,d.jsx)("p",{className:"px-3 pt-2 text-[10px] font-medium uppercase text-text-muted",children:"Rotation"}),["fill-first","round-robin","random","smart"].map(a=>(0,d.jsx)("button",{type:"button",onClick:()=>S(a,G.length>1?G:(b||[]).filter(a=>a.isActive).map(a=>a.id)),disabled:v,className:`w-full px-3 py-1.5 text-left text-sm hover:bg-black/5 dark:hover:bg-white/5 ${H===a?"font-medium text-primary":"text-text-main"}`,children:"smart"===a?"Smart (provider/model aware)":a},a)),(0,d.jsx)("p",{className:"px-3 pt-2 text-[10px] font-medium uppercase text-text-muted",children:"Single pool"}),(b||[]).map(a=>(0,d.jsx)("button",{type:"button",onClick:()=>R(a.id),disabled:v||!0!==a.isActive,className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${I===a.id?"text-primary font-medium":"text-text-main"}`,children:a.name},a.id))]}),document.body)]}),p&&(0,d.jsx)(j.Tooltip,{text:N,children:(0,d.jsxs)("button",{onClick:p.onConfigure,className:`flex w-full flex-col items-center rounded px-2 py-1 transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${p.isActive?"text-primary":"text-text-muted hover:text-primary"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"bolt"}),(0,d.jsx)("span",{className:"text-[10px] leading-tight",children:"Auto-ping"})]})}),(0,d.jsxs)("button",{onClick: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,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,d.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,d.jsxs)("button",{onClick:n,className:"flex flex-col items-center rounded px-2 py-1 text-red-500 hover:bg-red-500/10",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,d.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]}),(0,d.jsx)(j.Toggle,{size:"sm",checked:a.isActive??!0,onChange:k,title:a.isActive??!0?"Disable connection":"Enable connection"})]})]})}let A=`name1|sk-key1
1
+ (()=>{var a={};a.id=2134,a.ids=[2134],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},643:a=>{"use strict";a.exports=require("node:perf_hooks")},1708:a=>{"use strict";a.exports=require("node:process")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},4573:a=>{"use strict";a.exports=require("node:buffer")},7066:a=>{"use strict";a.exports=require("node:tty")},9517:(a,b,c)=>{"use strict";function d(a,b){return!1===a?"default":"active"===b||"success"===b?"success":"error"===b||"expired"===b||"unavailable"===b?"error":"default"}function e(a){let b={};for(let c of a||[])c?.provider&&(b[c.provider]||(b[c.provider]={total:0,active:0}),b[c.provider].total+=1,!1!==c.isActive&&(b[c.provider].active+=1));let c=new Set;for(let[a,d]of Object.entries(b))d.total>0&&0===d.active&&c.add(a);return c}c.d(b,{g:()=>d,i:()=>e})},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},13018:(a,b,c)=>{Promise.resolve().then(c.t.bind(c,88844,23))},14985:a=>{"use strict";a.exports=require("dns")},16698:a=>{"use strict";a.exports=require("node:async_hooks")},17891:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/get-segment-param")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},21820:a=>{"use strict";a.exports=require("os")},26713:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/is-bot")},26915:a=>{"use strict";a.exports=import("playwright-core")},27910:a=>{"use strict";a.exports=require("stream")},28354:a=>{"use strict";a.exports=require("util")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},31421:a=>{"use strict";a.exports=require("node:child_process")},32467:a=>{"use strict";a.exports=require("node:http2")},33873:a=>{"use strict";a.exports=require("path")},34589:a=>{"use strict";a.exports=require("node:assert")},35411:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>d});let d=(0,c(35732).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/home/runner/work/VansRouter/VansRouter/src/app/(dashboard)/error.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/runner/work/VansRouter/VansRouter/src/app/(dashboard)/error.js","default")},37067:a=>{"use strict";a.exports=require("node:http")},37540:a=>{"use strict";a.exports=require("node:console")},38522:a=>{"use strict";a.exports=require("node:zlib")},40610:a=>{"use strict";a.exports=require("node:dns")},41025:a=>{"use strict";a.exports=require("next/dist/server/app-render/dynamic-access-async-storage.external.js")},41692:a=>{"use strict";a.exports=require("node:tls")},41792:a=>{"use strict";a.exports=require("node:querystring")},43370:a=>{"use strict";a.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},43954:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/interception-routes")},45961:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>g});var d=c(66238);c(71183);var e=c(84725),f=c.n(e);function g({error:a,reset:b}){return(0,d.jsx)("section",{className:"flex min-h-[calc(100vh-9rem)] items-center justify-center",children:(0,d.jsxs)("div",{className:"w-full max-w-lg rounded-lg border border-border bg-surface p-6 shadow-soft",children:[(0,d.jsx)("div",{className:"mb-4 flex h-11 w-11 items-center justify-center rounded-lg bg-red-500/10 text-red-600 dark:text-red-400",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[24px]",children:"warning"})}),(0,d.jsx)("h1",{className:"text-xl font-semibold text-text-main",children:"Dashboard error"}),(0,d.jsx)("p",{className:"mt-2 text-sm leading-6 text-text-muted",children:"This dashboard view failed to render. Retry the view or head back to the dashboard home."}),a?.message?(0,d.jsx)("pre",{className:"mt-4 max-h-36 overflow-auto rounded-md border border-border bg-surface-2 p-3 text-xs text-text-muted",children:a.message}):null,(0,d.jsxs)("div",{className:"mt-6 flex flex-wrap gap-3",children:[(0,d.jsxs)("button",{type:"button",onClick:b,className:"inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-primary-hover",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"refresh"}),"Try again"]}),(0,d.jsxs)(f(),{href:"/dashboard",className:"inline-flex items-center gap-2 rounded-md border border-border bg-surface px-4 py-2 text-sm font-medium text-text-main transition-colors hover:bg-surface-2",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"home"}),"Dashboard"]})]})]})})}},46293:a=>{"use strict";a.exports=require("sql.js")},47298:(a,b,c)=>{Promise.resolve().then(c.bind(c,40228))},47447:a=>{"use strict";a.exports=require("dompurify")},47940:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>aa});var d=c(66238),e=c(71183),f=c(68344),g=c(84725),h=c.n(g);c(38282),c(1219);var i=c(95988),j=c(40228),k=c(53207),l=c(47953),m=c(6982),n=c(87571),o=c(55009),p=c(7272);let q=new Map;async function r(a){if(!a?.url||!a?.type)return[];let b=q.get(a.url);if(b&&Date.now()<b.expiresAt)return b.data;try{let b=new URLSearchParams({url:a.url,type:a.type}),c=await fetch(`/api/providers/suggested-models?${b}`);if(!c.ok)return[];let d=(await c.json()).data??[];return q.set(a.url,{data:d,expiresAt:Date.now()+6e5}),d}catch{return[]}}function s({customModels:a=[],modelAliases:b={},providerAlias:c,builtInModels:d=[],type:e="llm",includeLegacyAliases:f=!0}){let g=new Set(d.map(a=>a.id)),h=new Set,i=[];for(let b of a){if(!b?.id||b.providerAlias!==c)continue;let a=b?.kind||b?.type||"llm";if(e&&a!==e||g.has(b.id))continue;let d=`${c}/${b.id}`;h.has(d)||(h.add(d),i.push({id:b.id,name:b.name||b.id,fullModel:d,source:"custom",type:a}))}if(!f)return i;let j=`${c}/`;for(let[a,c]of Object.entries(b||{})){if("string"!=typeof c||!c.startsWith(j))continue;let b=c.slice(j.length);!b||g.has(b)||h.has(c)||(h.add(c),i.push({id:b,alias:a,fullModel:c,source:"legacyAlias",type:e||"llm"}))}return i}function t({model:a,fullModel:b,alias:c,copied:e,onCopy:f,testStatus:g,isCustom:h,isFree:i,onDeleteAlias:k,onTest:l,isTesting:m,onDisable:n,caps:o}){let p="ok"===g?"#22c55e":"error"===g?"#ef4444":void 0;return(0,d.jsx)("div",{className:`group w-full sm:w-auto min-w-0 max-w-full rounded-lg border px-3 py-2 ${"ok"===g?"border-green-500/40":"error"===g?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:(0,d.jsxs)("div",{className:"flex min-w-0 items-start gap-2 sm:items-center",children:[(0,d.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base mt-0.5 sm:mt-0",style:p?{color:p}:void 0,children:"ok"===g?"check_circle":"error"===g?"cancel":"smart_toy"}),(0,d.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,d.jsx)("code",{className:"w-fit max-w-full break-all rounded bg-sidebar px-1.5 py-0.5 font-mono text-xs text-text-muted sm:max-w-[360px] sm:truncate",children:b}),(0,d.jsxs)("span",{className:"flex min-w-0 items-center text-[9px] gap-1 pl-1",children:[a.name&&(0,d.jsx)("span",{className:"break-all sm:truncate text-[9px] italic text-text-muted/70",children:a.name}),(0,d.jsx)(j.CapacityBadges,{caps:o,colorOverride:"text-text-muted/70",size:12})]})]}),(0,d.jsxs)("div",{className:"flex shrink-0 items-center gap-0.5 sm:gap-1",children:[l&&(0,d.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,d.jsx)("button",{onClick:l,disabled:m,className:`rounded p-0.5 text-text-muted transition-opacity hover:bg-sidebar hover:text-primary ${m?"opacity-100":"opacity-100 sm:opacity-0 sm:group-hover:opacity-100"}`,children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",style:m?{animation:"spin 1s linear infinite"}:void 0,children:m?"progress_activity":"science"})}),(0,d.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:m?"Testing...":"Test"})]}),(0,d.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,d.jsx)("button",{onClick:()=>f(b,`model-${a.id}`),className:"rounded p-0.5 text-text-muted hover:bg-sidebar hover:text-primary",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:e===`model-${a.id}`?"check":"content_copy"})}),(0,d.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:e===`model-${a.id}`?"Copied!":"Copy"})]}),h?(0,d.jsx)("button",{onClick:k,className:"rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-red-500/10 hover:text-red-500 sm:opacity-0 sm:group-hover:opacity-100",title:"Remove custom model",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):n?(0,d.jsx)("button",{onClick:n,className:"rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-red-500/10 hover:text-red-500 sm:opacity-0 sm:group-hover:opacity-100",title:"Disable this model",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):null]})]})})}function u({modelId:a,fullModel:b,copied:c,onCopy:e,onDeleteAlias:f,onTest:g,testStatus:h,isTesting:i}){let j="ok"===h?"#22c55e":"error"===h?"#ef4444":void 0;return(0,d.jsxs)("div",{className:`flex items-center gap-3 p-3 rounded-lg border ${"ok"===h?"border-green-500/40":"error"===h?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",style:j?{color:j}:void 0,children:"ok"===h?"check_circle":"error"===h?"cancel":"smart_toy"}),(0,d.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,d.jsx)("p",{className:"text-sm font-medium truncate",children:a}),(0,d.jsxs)("div",{className:"flex items-center gap-1 mt-1",children:[(0,d.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:b}),(0,d.jsxs)("div",{className:"relative group/btn",children:[(0,d.jsx)("button",{onClick:()=>e(b,`model-${a}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:c===`model-${a}`?"check":"content_copy"})}),(0,d.jsx)("span",{className:"pointer-events-none absolute top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:c===`model-${a}`?"Copied!":"Copy"})]}),g&&(0,d.jsxs)("div",{className:"relative group/btn",children:[(0,d.jsx)("button",{onClick:g,disabled:i,className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary transition-colors",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",style:i?{animation:"spin 1s linear infinite"}:void 0,children:i?"progress_activity":"science"})}),(0,d.jsx)("span",{className:"pointer-events-none absolute top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:i?"Testing...":"Test"})]})]})]}),(0,d.jsx)("button",{onClick:f,className:"p-1 hover:bg-red-50 rounded text-red-500",title:"Remove model",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"delete"})})]})}function v({providerStorageAlias:a,providerDisplayAlias:b,modelAliases:c,customModels:f,copied:g,onCopy:h,onDeleteAlias:i,onAddCustomModel:k,onDeleteCustomModel:l,connections:m,isAnthropic:n}){let[o,p]=(0,e.useState)(""),[q,r]=(0,e.useState)(!1),[t,w]=(0,e.useState)(!1),[x,y]=(0,e.useState)(null),[z,A]=(0,e.useState)({}),B=async b=>{if(!x){y(b);try{let c=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${a}/${b}`})}),d=await c.json();A(a=>({...a,[b]:d.ok?"ok":"error"}))}catch{A(a=>({...a,[b]:"error"}))}finally{y(null)}}},C=s({customModels:f,modelAliases:c,providerAlias:a,type:"llm"}),D=async()=>{if(!o.trim()||q)return;let a=o.trim();if(C.some(b=>b.id===a))return void alert("Model already exists for this provider.");r(!0);try{await k(a),p("")}catch(a){console.log("Error adding model:",a)}finally{r(!1)}},E=async()=>{if(t)return;let a=m.find(a=>!1!==a.isActive);if(a){w(!0);try{let b=await fetch(`/api/providers/${a.id}/models`),c=await b.json();if(!b.ok)return void alert(c.error||"Failed to import models");let d=c.models||[];if(0===d.length)return void alert("No models returned from /models.");let e=0;for(let a of d){let b=a.id||a.name||a.model;b&&(C.some(a=>a.id===b)||(await k(b),e+=1))}0===e&&alert("No new models were added.")}catch(a){console.log("Error importing models:",a)}finally{w(!1)}}},F=m.some(a=>!1!==a.isActive);return(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("p",{className:"text-sm text-text-muted",children:["Add ",n?"Anthropic":"OpenAI","-compatible models manually or import them from the /models endpoint."]}),(0,d.jsxs)("div",{className:"flex items-end gap-2 flex-wrap",children:[(0,d.jsxs)("div",{className:"flex-1 min-w-[240px]",children:[(0,d.jsx)("label",{htmlFor:"new-compatible-model-input",className:"text-xs text-text-muted mb-1 block",children:"Model ID"}),(0,d.jsx)("input",{id:"new-compatible-model-input",type:"text",value:o,onChange:a=>p(a.target.value),onKeyDown:a=>"Enter"===a.key&&D(),placeholder:n?"claude-3-opus-20240229":"gpt-4o",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})]}),(0,d.jsx)(j.Button,{size:"sm",icon:"add",onClick:D,disabled:!o.trim()||q,children:q?"Adding...":"Add"}),(0,d.jsx)(j.Button,{size:"sm",variant:"secondary",icon:"download",onClick:E,disabled:!F||t,children:t?"Importing...":"Import from /models"})]}),!F&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Add a connection to enable importing models."}),C.length>0&&(0,d.jsx)("div",{className:"flex flex-col gap-3",children:C.map(({id:c,alias:e,source:f})=>(0,d.jsx)(u,{modelId:c,fullModel:`${b}/${c}`,copied:g,onCopy:h,onDeleteAlias:()=>"custom"===f?l(c):i(e),onTest:m.length>0?()=>B(c):void 0,testStatus:z[c],isTesting:x===c},`${f}-${a}/${c}`))})]})}var w=c(5894),x=c(9517);function y({until:a}){let[b,c]=(0,e.useState)("");return b?(0,d.jsxs)("span",{className:"text-xs text-orange-500 font-mono",children:["⏱ ",b]}):null}function z({connection:a,proxyPools:b,isOAuth:c,isFirst:f,isLast:g,onMoveUp:h,onMoveDown:i,onToggleActive:k,onUpdateProxy:l,onEdit:m,onDelete:n,oneByOneStatus:o=null,autoPing:p=null,modelAssignmentOptions:q=null,onModelAssignmentChange:r=null,strictModelAssignment:s=!1}){let[t,u]=(0,e.useState)(!1),[v,A]=(0,e.useState)(!1),B=(0,e.useRef)(null),C=(0,e.useRef)(null),[D,E]=(0,e.useState)(null),F=new Map((b||[]).map(a=>[a.id,a])),G=a.providerSpecificData?.proxyPoolIds||(a.providerSpecificData?.proxyPoolId?[a.providerSpecificData.proxyPoolId]:[]),H=a.providerSpecificData?.proxyRotationStrategy||"none",I=G[0]||a.providerSpecificData?.proxyPoolId||null,J=I?F.get(I):null,K=a.providerSpecificData?.connectionProxyEnabled===!0&&!!a.providerSpecificData?.connectionProxyUrl,L=!!I||K,M=G.length>1?`${G.length} pools (${H})`:J?`Pool: ${J.name}`:I?`Pool: ${I} (inactive/missing)`:K?`Legacy: ${a.providerSpecificData?.connectionProxyUrl}`:"",N=(()=>{if(!p)return"";let a=[];return(p.reactiveOn&&a.push("On reset"),p.scheduleOn&&a.push(`Scheduled (${p.scheduleSummary||"active"})`),a.length>0)?`Auto-ping active: ${a.join(" + ")}. Click to configure.`:"codex"===p.provider?"Auto-starts the next 5h Codex window after reset or on schedule. Click to configure.":"Auto-starts a new window on quota reset or fixed schedule. Click to configure."})(),O="";if(J?.proxyUrl||a.providerSpecificData?.connectionProxyUrl){let b=J?.proxyUrl||a.providerSpecificData?.connectionProxyUrl;try{let a=new URL(b);O=`${a.protocol}//${a.hostname}${a.port?`:${a.port}`:""}`}catch{O=b}}let P=J?.noProxy||a.providerSpecificData?.connectionNoProxy||"",Q="default";J?.isActive===!0?Q="success":(I||K)&&(Q="error");let R=async a=>{A(!0);try{"__none__"===a?await l(null):await l(a),u(!1)}finally{A(!1)}},S=async(a,b)=>{let c=b.filter(a=>F.get(a)?.isActive===!0);if(c.length){A(!0);try{await l({proxyPoolIds:c,proxyRotationStrategy:a}),u(!1)}finally{A(!1)}}},T=a.authType||(c?"oauth":"apikey"),U="oauth"===T,V="cookie"===T,W=a.name?.trim()||a.email?.trim()||a.displayName?.trim()||(U?"OAuth Account":V?"Cookie Account":"API Key"),X=a.name?.trim()&&a.email?.trim()&&a.name.trim()!==a.email.trim()?a.email.trim():a.name?.trim()&&a.displayName?.trim()&&a.name.trim()!==a.displayName.trim()?a.displayName.trim():null,[Y,Z]=(0,e.useState)(!1),$=Object.entries(a).filter(([a])=>a.startsWith("modelLock_")).map(([,a])=>a).filter(a=>!!a).sort()[0]||null,_="unavailable"!==a.testStatus||Y?a.testStatus:"active",aa=()=>o?"queued"===o.state?"queued":"testing"===o.state?"testing":"success"===o.state?"success":"failed"===o.state?o.error?`failed: ${o.error}`:"failed":null:null;return(0,d.jsxs)("div",{className:`group flex min-w-0 flex-col gap-3 rounded-lg p-2 transition-colors hover:bg-black/[0.02] dark:hover:bg-white/[0.02] sm:flex-row sm:items-center sm:justify-between ${!1===a.isActive?"opacity-60":""}`,children:[(0,d.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-2 sm:items-center sm:gap-3",children:[(0,d.jsxs)("div",{className:"flex shrink-0 flex-col",children:[(0,d.jsx)("button",{onClick:h,disabled:f,className:`p-0.5 rounded ${f?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_up"})}),(0,d.jsx)("button",{onClick:i,disabled:g,className:`p-0.5 rounded ${g?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_down"})})]}),(0,d.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base text-text-muted",children:V?"cookie":U?"lock":"key"}),(0,d.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,d.jsx)("p",{className:"text-sm font-medium truncate",children:W}),X&&(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:X}),(0,d.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1.5 sm:gap-2",children:[(0,d.jsx)(j.Badge,{variant:(0,x.g)(a.isActive,_),size:"sm",dot:!0,children:!1===a.isActive?"disabled":_||"Unknown"}),(0,d.jsx)(j.Badge,{variant:"default",size:"sm",children:U?"OAuth":V?"Cookie":"API Key"}),L&&(0,d.jsx)(j.Badge,{variant:Q,size:"sm",children:"Proxy"}),Y&&!1!==a.isActive&&(0,d.jsx)(y,{until:$}),a.lastError&&!1!==a.isActive&&(0,d.jsx)("span",{className:"max-w-full truncate text-xs text-red-500 sm:max-w-[300px]",title:a.lastError,children:a.lastError}),(0,d.jsxs)("span",{className:"text-xs text-text-muted",children:["#",a.priority]}),a.globalPriority&&(0,d.jsxs)("span",{className:"text-xs text-text-muted",children:["Auto: ",a.globalPriority]}),aa()&&(0,d.jsx)(j.Badge,{variant:o?"success"===o.state?"success":"failed"===o.state?"error":"testing"===o.state?"primary":"default":"default",size:"sm",children:aa()})]}),L&&(0,d.jsxs)("div",{className:"mt-1 flex items-center gap-2 flex-wrap",children:[(0,d.jsx)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[420px]",title:M,children:M}),O&&(0,d.jsx)("code",{className:"max-w-full truncate rounded bg-black/5 px-1 py-0.5 font-mono text-[10px] text-text-muted dark:bg-white/5 sm:max-w-[260px]",children:O}),P&&(0,d.jsxs)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[320px]",title:P,children:["no_proxy: ",P]})]}),q&&r&&(0,d.jsxs)("select",{value:Object.prototype.hasOwnProperty.call(a.providerSpecificData||{},"assignedModel")?a.providerSpecificData.assignedModel||"":a.providerSpecificData?.freebuffModel||"",onChange:a=>r(a.target.value),disabled:!s,className:"mt-2 max-w-full rounded-md border border-border bg-background px-2 py-1 text-[11px] text-text-main",title:"Model assignment",children:[(0,d.jsx)("option",{value:"",children:"Unassigned"}),q.map(a=>(0,d.jsx)("option",{value:a.id,children:a.name||a.id},a.id))]})]})]}),(0,d.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 sm:w-auto sm:justify-end",children:[(0,d.jsxs)("div",{className:"grid flex-1 grid-cols-3 gap-1 sm:flex sm:flex-none",children:[(b||[]).length>0&&(0,d.jsxs)("div",{children:[(0,d.jsxs)("button",{ref:C,onClick:()=>{if(t)return void u(!1);let a=C.current?.getBoundingClientRect();if(!a)return void u(!0);let c=((b?.length||0)+1)*34+8,d=window.innerHeight-a.bottom,e=d<c&&a.top>d;E({position:"fixed",right:window.innerWidth-a.right,...e?{bottom:window.innerHeight-a.top+4,maxHeight:Math.max(a.top-8,120)}:{top:a.bottom+4,maxHeight:Math.max(d-8,120)}}),u(!0)},className:`flex w-full flex-col items-center rounded px-2 py-1 transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${L?"text-primary":"text-text-muted hover:text-primary"}`,disabled:v,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:v?"progress_activity":"lan"}),(0,d.jsx)("span",{className:"text-[10px] leading-tight",children:"Proxy"})]}),t&&(0,w.createPortal)((0,d.jsxs)("div",{ref:B,style:D,className:"z-50 max-w-[78vw] min-w-[160px] overflow-y-auto rounded-lg border border-border bg-bg py-1 shadow-lg",children:["smart"===H&&(0,d.jsx)("p",{className:"px-3 py-1 text-[10px] text-text-muted",children:"Smart skips unfit pools for this provider/model."}),(0,d.jsx)("button",{onClick:()=>R("__none__"),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${!I?"text-primary font-medium":"text-text-main"}`,children:"None"}),(0,d.jsx)("p",{className:"px-3 pt-2 text-[10px] font-medium uppercase text-text-muted",children:"Rotation"}),["fill-first","round-robin","random","smart"].map(a=>(0,d.jsx)("button",{type:"button",onClick:()=>S(a,G.length>1?G:(b||[]).filter(a=>a.isActive).map(a=>a.id)),disabled:v,className:`w-full px-3 py-1.5 text-left text-sm hover:bg-black/5 dark:hover:bg-white/5 ${H===a?"font-medium text-primary":"text-text-main"}`,children:"smart"===a?"Smart (provider/model aware)":a},a)),(0,d.jsx)("p",{className:"px-3 pt-2 text-[10px] font-medium uppercase text-text-muted",children:"Single pool"}),(b||[]).map(a=>(0,d.jsx)("button",{type:"button",onClick:()=>R(a.id),disabled:v||!0!==a.isActive,className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${I===a.id?"text-primary font-medium":"text-text-main"}`,children:a.name},a.id))]}),document.body)]}),p&&(0,d.jsx)(j.Tooltip,{text:N,children:(0,d.jsxs)("button",{onClick:p.onConfigure,className:`flex w-full flex-col items-center rounded px-2 py-1 transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${p.isActive?"text-primary":"text-text-muted hover:text-primary"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"bolt"}),(0,d.jsx)("span",{className:"text-[10px] leading-tight",children:"Auto-ping"})]})}),(0,d.jsxs)("button",{onClick: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,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,d.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,d.jsxs)("button",{onClick:n,className:"flex flex-col items-center rounded px-2 py-1 text-red-500 hover:bg-red-500/10",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,d.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]}),(0,d.jsx)(j.Toggle,{size:"sm",checked:a.isActive??!0,onChange:k,title:a.isActive??!0?"Disable connection":"Enable connection"})]})]})}let A=`name1|sk-key1
2
2
  name2|sk-key2
3
3
  sk-key-only-auto-named`;function B({isOpen:a,provider:b,providerName:c,isCompatible:f,isAnthropic:g,authType:h,authHint:i,website:l,proxyPools:m,error:n,existingNames:o,onSave:p,onBulkDone:q,onClose:r}){let s="__none__",t="ollama-local"===b,u="cookie"===h,v="xai"===b&&!u,w=u?"Cookie Value":"API Key",x="azure"===b,y="cloudflare-ai"===b,z=k.Q2?.[b]?.credentialForm==="aws",C=k.Q2?.[b]?.apiKeyOptionalWith||null,D=k.Q2?.[b]?.regions||null,E=k.Q2?.[b]?.defaultRegion||D?.[0]?.id||"",[F,G]=(0,e.useState)({name:"",apiKey:"",priority:1,proxyPoolId:s,ollamaHostUrl:""}),[H,I]=(0,e.useState)({azureEndpoint:"",apiVersion:"2024-10-01-preview",deployment:"",organization:""}),[J,K]=(0,e.useState)({accountId:""}),[L,M]=(0,e.useState)({profile:"",region:"",accessKeyId:"",sessionToken:""}),[N,O]=(0,e.useState)(E),[P,Q]=(0,e.useState)(!1),[R,S]=(0,e.useState)(null),[T,U]=(0,e.useState)(!1),V=y?`name1|sk-key1|acc123456
4
4
  name2|sk-key2|def789012
5
5
  sk-key-only-auto-named`:"exa"===b?`account-1|exa-key-1
6
6
  account-2|exa-key-2
7
- exa-key-only-auto-named`:A,[W,X]=(0,e.useState)("single"),[Y,Z]=(0,e.useState)(""),[$,_]=(0,e.useState)(null),aa=()=>{if(t&&F.ollamaHostUrl.trim())return{baseUrl:F.ollamaHostUrl.trim()};if(x)return{azureEndpoint:H.azureEndpoint,apiVersion:H.apiVersion,deployment:H.deployment,organization:H.organization};if(y)return{accountId:J.accountId};if(z){let a={};return L.profile.trim()&&(a.profile=L.profile.trim()),L.region.trim()&&(a.region=L.region.trim()),L.accessKeyId.trim()&&(a.accessKeyId=L.accessKeyId.trim()),L.sessionToken.trim()&&(a.sessionToken=L.sessionToken.trim()),Object.keys(a).length?a:void 0}if(D&&N)return{region:N}},ab=()=>{let a=aa();return!!(C&&a?.[C])||(z?!!F.apiKey&&!!a?.accessKeyId:!!F.apiKey)},ac=async()=>{Q(!0);try{let a=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:b,apiKey:F.apiKey,providerSpecificData:aa()})}),c=await a.json();S(c.valid?"success":"failed")}catch{S("failed")}finally{Q(!1)}},ad=async()=>{if(b&&(t||ab())&&(t||F.name)){U(!0);try{let a=!1;try{Q(!0),S(null);let c=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:b,apiKey:F.apiKey,providerSpecificData:aa()})});a=!!(await c.json()).valid,S(a?"success":"failed")}catch{S("failed")}finally{Q(!1)}await p({name:F.name||(t?"Ollama Local":""),apiKey:F.apiKey,priority:F.priority,proxyPoolId:F.proxyPoolId===s?null:F.proxyPoolId,testStatus:a?"active":"unknown",providerSpecificData:aa()})}finally{U(!1)}}},ae=async()=>{let a=Y.split("\n");if(!a.length)return;let c=function(a,b,c={}){let{isCloudflareAi:d=!1}=c,e=new Set((Array.isArray(b)?b:[]).map(a=>"string"==typeof a?a.toLowerCase():"")),f=[];for(let b of a){let a,c="string"==typeof b?b.trim():"";if(!c)continue;let g=function(a,b={}){let{isCloudflareAi:c=!1}=b,d=a.split("|");if(c&&d.length>=3){let a=d[0].trim();return{baseName:a||"Key",apiKey:d.slice(1,-1).join("|").trim(),providerSpecificData:{accountId:d[d.length-1].trim()}}}return d.length>=2?{baseName:d[0].trim()||"Key",apiKey:d.slice(1).join("|").trim()}:{baseName:"Key",apiKey:d[0].trim()}}(c,{isCloudflareAi:d});if(!g||!g.apiKey)continue;let h=g.baseName,i=1;for(;a=`${h} ${i}`,e.has(a.toLowerCase());)i+=1;e.add(a.toLowerCase());let j={name:a,apiKey:g.apiKey,skipped:!1};g.providerSpecificData&&(j.providerSpecificData=g.providerSpecificData),f.push(j)}return f}(a,o,{isCloudflareAi:y});if(!c.length)return;U(!0),_(null);let d=0,e=0;try{let a=await fetch("/api/providers/bulk",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:c.map(a=>({provider:b,apiKey:a.apiKey,name:a.name,priority:1,providerSpecificData:a.providerSpecificData}))})}),f=await a.json();d=Array.isArray(f.results)?f.results.filter(a=>a.ok).length:0,e=c.length-d}catch{e=c.length}U(!1),_({success:d,failed:e}),d>0&&q&&q()};return b?(0,d.jsx)(j.Modal,{isOpen:a,title:`Add ${c||b} ${w}`,onClose:r,children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[!z&&(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.Button,{size:"sm",variant:"single"===W?"primary":"ghost",onClick:()=>{X("single"),_(null)},children:"Single"}),(0,d.jsx)(j.Button,{size:"sm",variant:"bulk"===W?"primary":"ghost",onClick:()=>{X("bulk"),_(null)},children:"Bulk Add"})]}),"bulk"===W&&(0,d.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,d.jsx)("p",{className:"text-xs text-text-muted",children:y?(0,d.jsxs)(d.Fragment,{children:["One key per line. Format: ",(0,d.jsx)("code",{children:"name|apiKey|accountId"})," or just ",(0,d.jsx)("code",{children:"apiKey"})," (auto-named by index)."]}):"exa"===b?(0,d.jsxs)(d.Fragment,{children:["One Exa account per line: ",(0,d.jsx)("code",{children:"name|apiKey"})," or ",(0,d.jsx)("code",{children:"apiKey"}),". Keys are stored without a billable probe; runtime rotates on auth, quota, and rate-limit errors."]}):(0,d.jsxs)(d.Fragment,{children:["One key per line. Format: ",(0,d.jsx)("code",{children:"name|apiKey"})," or just ",(0,d.jsx)("code",{children:"apiKey"})," (auto-named by index)."]})}),(0,d.jsx)("textarea",{className:"w-full rounded border border-accent/30 bg-sidebar p-2 text-sm font-mono resize-y min-h-[140px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:V,value:Y,onChange:a=>Z(a.target.value)}),$&&(0,d.jsxs)("div",{className:`text-sm font-medium ${$.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",$.success," added",$.failed>0?`, ✗ ${$.failed} failed`:""]}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.Button,{onClick:ae,fullWidth:!0,disabled:T||!Y.trim(),children:T?"Adding...":"Add All Keys"}),(0,d.jsx)(j.Button,{onClick:r,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"single"===W&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(j.Input,{label:"Name",value:F.name,onChange:a=>G({...F,name:a.target.value}),placeholder:t?"Ollama Local":"Production Key"}),t&&(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.Input,{label:"Ollama Host URL",value:F.ollamaHostUrl,onChange:a=>G({...F,ollamaHostUrl:a.target.value}),placeholder:"http://localhost:11434",className:"flex-1"}),(0,d.jsx)("div",{className:"pt-6",children:(0,d.jsx)(j.Button,{onClick:ac,disabled:P||T,variant:"secondary",children:P?"Checking...":"Check"})})]}),!t&&(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.Input,{label:w,type:u?"text":"password",value:F.apiKey,onChange:a=>G({...F,apiKey:a.target.value}),placeholder:u?"grok-web"===b?"sso=xxxxx... or just the raw value":"eyJhbGciOi...":v?"xai-...":"",className:"flex-1"}),(0,d.jsx)("div",{className:"pt-6",children:(0,d.jsx)(j.Button,{onClick:ac,disabled:!ab()||P||T,variant:"secondary",children:P?"Checking...":"Check"})})]}),v&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Use a direct xAI API key from console.x.ai. This is separate from Grok Build OAuth."}),u&&i&&(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:[i,l&&(0,d.jsxs)(d.Fragment,{children:[" ",(0,d.jsxs)("a",{href:l,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:["Open ",l.replace(/^https?:\/\//,"")]})]})]}),D&&(0,d.jsx)(j.Select,{label:"Region",value:N,onChange:a=>O(a.target.value),options:D.map(a=>({value:a.id,label:a.label}))}),t&&(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:["Leave blank to use ",(0,d.jsx)("code",{children:"http://localhost:11434"}),". For remote Ollama, enter the full host URL (e.g. ",(0,d.jsx)("code",{children:"http://192.168.1.10:11434"}),")."]}),R&&(0,d.jsx)(j.Badge,{variant:"success"===R?"success":"error",children:"success"===R?"Valid":"Invalid"}),n&&(0,d.jsx)("p",{className:"text-xs text-red-500 break-words",children:n}),y&&(0,d.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,d.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Cloudflare Workers AI"}),(0,d.jsx)(j.Input,{label:"Account ID",value:J.accountId,onChange:a=>K({...J,accountId:a.target.value}),placeholder:"abc123def456..."}),(0,d.jsxs)("p",{className:"text-xs text-text-muted mt-2",children:["Find your Account ID in the right sidebar of ",(0,d.jsx)("a",{href:"https://dash.cloudflare.com",target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:"dash.cloudflare.com"})]})]}),z&&(0,d.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,d.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"AWS Bedrock Credentials"}),(0,d.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,d.jsx)(j.Input,{label:"AWS Profile (SSO — recommended)",value:L.profile,onChange:a=>M({...L,profile:a.target.value}),placeholder:"my-sso-profile"}),(0,d.jsx)(j.Input,{label:"Region",value:L.region,onChange:a=>M({...L,region:a.target.value}),placeholder:"us-east-1"})]}),(0,d.jsxs)("p",{className:"text-xs text-text-muted mt-2",children:["Set a profile from ",(0,d.jsx)("code",{children:"~/.aws/config"})," and leave the API key empty, then run"," ",(0,d.jsxs)("code",{children:["aws sso login --profile ",L.profile||"my-sso-profile"]}),". Credentials refresh automatically."]}),(0,d.jsxs)("div",{className:"flex flex-col gap-3 mt-4",children:[(0,d.jsx)(j.Input,{label:"Access Key ID (only for static keys)",value:L.accessKeyId,onChange:a=>M({...L,accessKeyId:a.target.value}),placeholder:"AKIA..."}),(0,d.jsx)(j.Input,{label:"Session Token (only for temporary ASIA… keys)",type:"password",value:L.sessionToken,onChange:a=>M({...L,sessionToken:a.target.value}),placeholder:"FwoGZXIvYXdz..."})]}),(0,d.jsxs)("p",{className:"text-xs text-text-muted mt-2",children:["For static keys instead: put the AWS ",(0,d.jsx)("strong",{children:"secret"})," access key in the API Key field above and the access key id here. A profile, if set, takes precedence."]})]}),x&&(0,d.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,d.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Azure OpenAI Configuration"}),(0,d.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,d.jsx)(j.Input,{label:"Azure Endpoint",value:H.azureEndpoint,onChange:a=>I({...H,azureEndpoint:a.target.value}),placeholder:"https://your-resource.openai.azure.com"}),(0,d.jsx)(j.Input,{label:"Deployment Name",value:H.deployment,onChange:a=>I({...H,deployment:a.target.value}),placeholder:"gpt-4"}),(0,d.jsx)(j.Input,{label:"API Version",value:H.apiVersion,onChange:a=>I({...H,apiVersion:a.target.value}),placeholder:"2024-10-01-preview"}),(0,d.jsx)(j.Input,{label:"Organization",value:H.organization,onChange:a=>I({...H,organization:a.target.value}),placeholder:"Organization ID"})]})]}),(0,d.jsx)(j.Input,{label:"Priority",type:"number",value:F.priority,onChange:a=>G({...F,priority:Number.parseInt(a.target.value)||1})}),(0,d.jsx)(j.Select,{label:"Proxy Pool",value:F.proxyPoolId,onChange:a=>G({...F,proxyPoolId:a.target.value}),options:[{value:s,label:"None"},...(m||[]).map(a=>({value:a.id,label:a.name}))],placeholder:"None"}),0===(m||[]).length&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"No active proxy pools available. Create one in Proxy Pools page first."}),(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Legacy manual proxy fields are still accepted by API for backward compatibility."}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.Button,{onClick:ad,fullWidth:!0,disabled:T||!t&&(!F.name||!ab())||f&&!F.defaultModel.trim()||x&&(!H.azureEndpoint||!H.deployment||!H.organization)||y&&!J.accountId,children:T?"Saving...":"Save"}),(0,d.jsx)(j.Button,{onClick:r,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})}):null}let C=[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}];function D({isOpen:a,node:b,onSave:c,onClose:f,isAnthropic:g}){let[h,i]=(0,e.useState)(()=>({name:b?.name||"",prefix:b?.prefix||"",apiType:b?.apiType||"chat",baseUrl:b?.baseUrl||(g?"https://api.anthropic.com/v1":"https://api.openai.com/v1")})),[k,l]=(0,e.useState)(!1),[m,n]=(0,e.useState)(""),[o,p]=(0,e.useState)(""),[q,r]=(0,e.useState)(!1),[s,t]=(0,e.useState)(null),[u,v]=(0,e.useState)(b);b!==u&&(v(b),b&&i({name:b.name||"",prefix:b.prefix||"",apiType:b.apiType||"chat",baseUrl:b.baseUrl||(g?"https://api.anthropic.com/v1":"https://api.openai.com/v1")}));let w=async()=>{if(h.name.trim()&&h.prefix.trim()&&h.baseUrl.trim()){l(!0);try{let a={name:h.name,prefix:h.prefix,baseUrl:h.baseUrl};g||(a.apiType=h.apiType),await c(a)}finally{l(!1)}}},x=async()=>{r(!0);try{let a=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:h.baseUrl,apiKey:m,type:g?"anthropic-compatible":"openai-compatible",modelId:o.trim()||void 0})}),b=await a.json();t(b.valid?"success":"failed")}catch{t("failed")}finally{r(!1)}};return b?(0,d.jsx)(j.Modal,{isOpen:a,title:`Edit ${g?"Anthropic":"OpenAI"} Compatible`,onClose:f,children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsx)(j.Input,{label:"Name",value:h.name,onChange:a=>i({...h,name:a.target.value}),placeholder:`${g?"Anthropic":"OpenAI"} Compatible (Prod)`,hint:"Required. A friendly label for this node."}),(0,d.jsx)(j.Input,{label:"Prefix",value:h.prefix,onChange:a=>i({...h,prefix:a.target.value}),placeholder:g?"ac-prod":"oc-prod",hint:"Required. Used as the provider prefix for model IDs."}),!g&&(0,d.jsx)(j.Select,{label:"API Type",options:C,value:h.apiType,onChange:a=>i({...h,apiType:a.target.value})}),(0,d.jsx)(j.Input,{label:"Base URL",value:h.baseUrl,onChange:a=>i({...h,baseUrl:a.target.value}),placeholder:g?"https://api.anthropic.com/v1":"https://api.openai.com/v1",hint:`Use the base URL (ending in /v1) for your ${g?"Anthropic":"OpenAI"}-compatible API.`}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.Input,{label:"API Key (for Check)",type:"password",value:m,onChange:a=>n(a.target.value),className:"flex-1"}),(0,d.jsx)("div",{className:"pt-6",children:(0,d.jsx)(j.Button,{onClick:x,disabled:!m||q||!h.baseUrl.trim(),variant:"secondary",children:q?"Checking...":"Check"})})]}),(0,d.jsx)(j.Input,{label:"Model ID (optional)",value:o,onChange:a=>p(a.target.value),placeholder:"e.g. my-model-id",hint:"If provider lacks /models endpoint, enter a model ID to validate via chat/completions instead."}),s&&(0,d.jsx)(j.Badge,{variant:"success"===s?"success":"error",children:"success"===s?"Valid":"Invalid"}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.Button,{onClick:w,fullWidth:!0,disabled:!h.name.trim()||!h.prefix.trim()||!h.baseUrl.trim()||k,children:k?"Saving...":"Save"}),(0,d.jsx)(j.Button,{onClick:f,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}let E=()=>Object.fromEntries(Object.keys(l.bs).map(a=>[a,!1]));function F(a,b){switch(b.type){case"RESET":return{modelId:"",testStatus:null,testError:"",saving:!1};case"SET_MODEL":return{...a,modelId:b.value,testStatus:null,testError:""};case"TEST_START":return{...a,testStatus:"testing",testError:""};case"TEST_RESULT":return{...a,testStatus:b.ok?"ok":"error",testError:b.error||""};case"SAVE_START":return{...a,saving:!0};case"SAVE_DONE":return{...a,saving:!1};default:return a}}function G({isOpen:a,providerAlias:b,providerDisplayAlias:c,onSave:f,onClose:g}){let[h,i]=(0,e.useReducer)(F,{modelId:"",testStatus:null,testError:"",saving:!1}),{modelId:k,testStatus:m,testError:n,saving:o}=h,[p,q]=(0,e.useState)(!1),[r,s]=(0,e.useState)(E),[t,u]=(0,e.useState)("");a&&!p?(q(!0),i({type:"RESET"}),s(E()),u("")):!a&&p&&q(!1);let v=a=>{let c=`${b}/`;return a.startsWith(c)?a.slice(c.length):a},w=async()=>{let a=v(k.trim());if(a){i({type:"TEST_START"});try{let c=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${b}/${a}`})}),d=await c.json();i({type:"TEST_RESULT",ok:d.ok,error:d.error})}catch(a){i({type:"TEST_RESULT",ok:!1,error:a.message})}}},x=async()=>{let a=v(k.trim());if(a&&!o){i({type:"SAVE_START"});try{await f(a,r,r.stt?t:null)}finally{i({type:"SAVE_DONE"})}}};return(0,d.jsx)(j.Modal,{isOpen:a,onClose:g,title:"Add Custom Model",children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("label",{htmlFor:"add-custom-model-id",className:"text-sm font-medium mb-1.5 block",children:"Model ID"}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)("input",{id:"add-custom-model-id",type:"text",value:k,onChange:a=>i({type:"SET_MODEL",value:a.target.value}),onKeyDown:a=>{"Enter"===a.key&&w()},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"}),(0,d.jsx)(j.Button,{variant:"secondary",icon:"science",loading:"testing"===m,onClick:w,disabled:!k.trim()||"testing"===m,children:"testing"===m?"Testing...":"Test"})]}),(0,d.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Sent to provider as: ",(0,d.jsx)("code",{className:"font-mono bg-sidebar px-1 rounded",children:v(k.trim())||"model-id"})]})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Capabilities"}),(0,d.jsx)("div",{className:"flex flex-wrap gap-4",children:Object.entries(l.bs).map(([a,b])=>(0,d.jsx)(j.Toggle,{checked:!!r[a],onChange:b=>s(c=>({...c,[a]:b})),label:b.label,description:b.desc,size:"sm"},a))})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)(j.Toggle,{checked:!!r.stt,onChange:a=>{s(b=>({...b,stt:a})),a||u("")},label:"Speech to text",description:"Transcribes audio via /v1/audio/transcriptions",size:"sm"}),r.stt&&(0,d.jsx)("div",{className:"mt-3",children:(0,d.jsx)(j.Select,{label:"Transport",value:t,onChange:a=>u(a.target.value),placeholder:"Provider default (REST)",options:l.vp.map(a=>({value:a,label:l.qw[a].label})),hint:"Realtime transport marker for the STT dispatcher. Empty keeps the provider's REST format."})})]}),"ok"===m&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-base",children:"check_circle"}),"Model is reachable"]}),"error"===m&&(0,d.jsxs)("div",{className:"flex items-start gap-2 text-sm text-red-500",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-base shrink-0",children:"cancel"}),(0,d.jsx)("span",{children:n||"Model not reachable"})]}),(0,d.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,d.jsx)(j.Button,{onClick:g,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,d.jsx)(j.Button,{onClick:x,fullWidth:!0,size:"sm",disabled:!k.trim()||o,children:o?"Adding...":"Add Model"})]})]})})}let H=`[
7
+ exa-key-only-auto-named`:A,[W,X]=(0,e.useState)("single"),[Y,Z]=(0,e.useState)(""),[$,_]=(0,e.useState)(null),aa=()=>{if(t&&F.ollamaHostUrl.trim())return{baseUrl:F.ollamaHostUrl.trim()};if(x)return{azureEndpoint:H.azureEndpoint,apiVersion:H.apiVersion,deployment:H.deployment,organization:H.organization};if(y)return{accountId:J.accountId};if(z){let a={};return L.profile.trim()&&(a.profile=L.profile.trim()),L.region.trim()&&(a.region=L.region.trim()),L.accessKeyId.trim()&&(a.accessKeyId=L.accessKeyId.trim()),L.sessionToken.trim()&&(a.sessionToken=L.sessionToken.trim()),Object.keys(a).length?a:void 0}if(D&&N)return{region:N}},ab=()=>{let a=aa();return!!(C&&a?.[C])||(z?!!F.apiKey&&!!a?.accessKeyId:!!F.apiKey)},ac=async()=>{Q(!0);try{let a=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:b,apiKey:F.apiKey,providerSpecificData:aa()})}),c=await a.json();S(c.valid?"success":"failed")}catch{S("failed")}finally{Q(!1)}},ad=async()=>{if(b&&(t||ab())&&(t||F.name)){U(!0);try{let a=!1;try{Q(!0),S(null);let c=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:b,apiKey:F.apiKey,providerSpecificData:aa()})});a=!!(await c.json()).valid,S(a?"success":"failed")}catch{S("failed")}finally{Q(!1)}await p({name:F.name||(t?"Ollama Local":""),apiKey:F.apiKey,priority:F.priority,proxyPoolId:F.proxyPoolId===s?null:F.proxyPoolId,testStatus:a?"active":"unknown",providerSpecificData:aa()})}finally{U(!1)}}},ae=async()=>{let a=Y.split("\n");if(!a.length)return;let c=function(a,b,c={}){let{isCloudflareAi:d=!1}=c,e=new Set((Array.isArray(b)?b:[]).map(a=>"string"==typeof a?a.toLowerCase():"")),f=[];for(let b of a){let a,c="string"==typeof b?b.trim():"";if(!c)continue;let g=function(a,b={}){let{isCloudflareAi:c=!1}=b;if(!c&&/^LLM\|/i.test(a.trim()))return{baseName:"LLM",apiKey:a.trim()};let d=a.split("|");if(c&&d.length>=3){let a=d[0].trim();return{baseName:a||"Key",apiKey:d.slice(1,-1).join("|").trim(),providerSpecificData:{accountId:d[d.length-1].trim()}}}return d.length>=2?{baseName:d[0].trim()||"Key",apiKey:d.slice(1).join("|").trim()}:{baseName:"Key",apiKey:d[0].trim()}}(c,{isCloudflareAi:d});if(!g||!g.apiKey)continue;let h=g.baseName,i=1;for(;a=`${h} ${i}`,e.has(a.toLowerCase());)i+=1;e.add(a.toLowerCase());let j={name:a,apiKey:g.apiKey,skipped:!1};g.providerSpecificData&&(j.providerSpecificData=g.providerSpecificData),f.push(j)}return f}(a,o,{isCloudflareAi:y});if(!c.length)return;U(!0),_(null);let d=0,e=0;try{let a=await fetch("/api/providers/bulk",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:c.map(a=>({provider:b,apiKey:a.apiKey,name:a.name,priority:1,providerSpecificData:a.providerSpecificData}))})}),f=await a.json();d=Array.isArray(f.results)?f.results.filter(a=>a.ok).length:0,e=c.length-d}catch{e=c.length}U(!1),_({success:d,failed:e}),d>0&&q&&q()};return b?(0,d.jsx)(j.Modal,{isOpen:a,title:`Add ${c||b} ${w}`,onClose:r,children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[!z&&(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.Button,{size:"sm",variant:"single"===W?"primary":"ghost",onClick:()=>{X("single"),_(null)},children:"Single"}),(0,d.jsx)(j.Button,{size:"sm",variant:"bulk"===W?"primary":"ghost",onClick:()=>{X("bulk"),_(null)},children:"Bulk Add"})]}),"bulk"===W&&(0,d.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,d.jsx)("p",{className:"text-xs text-text-muted",children:y?(0,d.jsxs)(d.Fragment,{children:["One key per line. Format: ",(0,d.jsx)("code",{children:"name|apiKey|accountId"})," or just ",(0,d.jsx)("code",{children:"apiKey"})," (auto-named by index)."]}):"exa"===b?(0,d.jsxs)(d.Fragment,{children:["One Exa account per line: ",(0,d.jsx)("code",{children:"name|apiKey"})," or ",(0,d.jsx)("code",{children:"apiKey"}),". Keys are stored without a billable probe; runtime rotates on auth, quota, and rate-limit errors."]}):(0,d.jsxs)(d.Fragment,{children:["One key per line. Format: ",(0,d.jsx)("code",{children:"name|apiKey"})," or just ",(0,d.jsx)("code",{children:"apiKey"})," (auto-named by index)."]})}),(0,d.jsx)("textarea",{className:"w-full rounded border border-accent/30 bg-sidebar p-2 text-sm font-mono resize-y min-h-[140px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:V,value:Y,onChange:a=>Z(a.target.value)}),$&&(0,d.jsxs)("div",{className:`text-sm font-medium ${$.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",$.success," added",$.failed>0?`, ✗ ${$.failed} failed`:""]}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.Button,{onClick:ae,fullWidth:!0,disabled:T||!Y.trim(),children:T?"Adding...":"Add All Keys"}),(0,d.jsx)(j.Button,{onClick:r,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"single"===W&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(j.Input,{label:"Name",value:F.name,onChange:a=>G({...F,name:a.target.value}),placeholder:t?"Ollama Local":"Production Key"}),t&&(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.Input,{label:"Ollama Host URL",value:F.ollamaHostUrl,onChange:a=>G({...F,ollamaHostUrl:a.target.value}),placeholder:"http://localhost:11434",className:"flex-1"}),(0,d.jsx)("div",{className:"pt-6",children:(0,d.jsx)(j.Button,{onClick:ac,disabled:P||T,variant:"secondary",children:P?"Checking...":"Check"})})]}),!t&&(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.Input,{label:w,type:u?"text":"password",value:F.apiKey,onChange:a=>G({...F,apiKey:a.target.value}),placeholder:u?"grok-web"===b?"sso=xxxxx... or just the raw value":"eyJhbGciOi...":v?"xai-...":"",className:"flex-1"}),(0,d.jsx)("div",{className:"pt-6",children:(0,d.jsx)(j.Button,{onClick:ac,disabled:!ab()||P||T,variant:"secondary",children:P?"Checking...":"Check"})})]}),v&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Use a direct xAI API key from console.x.ai. This is separate from Grok Build OAuth."}),u&&i&&(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:[i,l&&(0,d.jsxs)(d.Fragment,{children:[" ",(0,d.jsxs)("a",{href:l,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:["Open ",l.replace(/^https?:\/\//,"")]})]})]}),D&&(0,d.jsx)(j.Select,{label:"Region",value:N,onChange:a=>O(a.target.value),options:D.map(a=>({value:a.id,label:a.label}))}),t&&(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:["Leave blank to use ",(0,d.jsx)("code",{children:"http://localhost:11434"}),". For remote Ollama, enter the full host URL (e.g. ",(0,d.jsx)("code",{children:"http://192.168.1.10:11434"}),")."]}),R&&(0,d.jsx)(j.Badge,{variant:"success"===R?"success":"error",children:"success"===R?"Valid":"Invalid"}),n&&(0,d.jsx)("p",{className:"text-xs text-red-500 break-words",children:n}),y&&(0,d.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,d.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Cloudflare Workers AI"}),(0,d.jsx)(j.Input,{label:"Account ID",value:J.accountId,onChange:a=>K({...J,accountId:a.target.value}),placeholder:"abc123def456..."}),(0,d.jsxs)("p",{className:"text-xs text-text-muted mt-2",children:["Find your Account ID in the right sidebar of ",(0,d.jsx)("a",{href:"https://dash.cloudflare.com",target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:"dash.cloudflare.com"})]})]}),z&&(0,d.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,d.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"AWS Bedrock Credentials"}),(0,d.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,d.jsx)(j.Input,{label:"AWS Profile (SSO — recommended)",value:L.profile,onChange:a=>M({...L,profile:a.target.value}),placeholder:"my-sso-profile"}),(0,d.jsx)(j.Input,{label:"Region",value:L.region,onChange:a=>M({...L,region:a.target.value}),placeholder:"us-east-1"})]}),(0,d.jsxs)("p",{className:"text-xs text-text-muted mt-2",children:["Set a profile from ",(0,d.jsx)("code",{children:"~/.aws/config"})," and leave the API key empty, then run"," ",(0,d.jsxs)("code",{children:["aws sso login --profile ",L.profile||"my-sso-profile"]}),". Credentials refresh automatically."]}),(0,d.jsxs)("div",{className:"flex flex-col gap-3 mt-4",children:[(0,d.jsx)(j.Input,{label:"Access Key ID (only for static keys)",value:L.accessKeyId,onChange:a=>M({...L,accessKeyId:a.target.value}),placeholder:"AKIA..."}),(0,d.jsx)(j.Input,{label:"Session Token (only for temporary ASIA… keys)",type:"password",value:L.sessionToken,onChange:a=>M({...L,sessionToken:a.target.value}),placeholder:"FwoGZXIvYXdz..."})]}),(0,d.jsxs)("p",{className:"text-xs text-text-muted mt-2",children:["For static keys instead: put the AWS ",(0,d.jsx)("strong",{children:"secret"})," access key in the API Key field above and the access key id here. A profile, if set, takes precedence."]})]}),x&&(0,d.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,d.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Azure OpenAI Configuration"}),(0,d.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,d.jsx)(j.Input,{label:"Azure Endpoint",value:H.azureEndpoint,onChange:a=>I({...H,azureEndpoint:a.target.value}),placeholder:"https://your-resource.openai.azure.com"}),(0,d.jsx)(j.Input,{label:"Deployment Name",value:H.deployment,onChange:a=>I({...H,deployment:a.target.value}),placeholder:"gpt-4"}),(0,d.jsx)(j.Input,{label:"API Version",value:H.apiVersion,onChange:a=>I({...H,apiVersion:a.target.value}),placeholder:"2024-10-01-preview"}),(0,d.jsx)(j.Input,{label:"Organization",value:H.organization,onChange:a=>I({...H,organization:a.target.value}),placeholder:"Organization ID"})]})]}),(0,d.jsx)(j.Input,{label:"Priority",type:"number",value:F.priority,onChange:a=>G({...F,priority:Number.parseInt(a.target.value)||1})}),(0,d.jsx)(j.Select,{label:"Proxy Pool",value:F.proxyPoolId,onChange:a=>G({...F,proxyPoolId:a.target.value}),options:[{value:s,label:"None"},...(m||[]).map(a=>({value:a.id,label:a.name}))],placeholder:"None"}),0===(m||[]).length&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"No active proxy pools available. Create one in Proxy Pools page first."}),(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Legacy manual proxy fields are still accepted by API for backward compatibility."}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.Button,{onClick:ad,fullWidth:!0,disabled:T||!t&&(!F.name||!ab())||f&&!F.defaultModel.trim()||x&&(!H.azureEndpoint||!H.deployment||!H.organization)||y&&!J.accountId,children:T?"Saving...":"Save"}),(0,d.jsx)(j.Button,{onClick:r,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})}):null}let C=[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}];function D({isOpen:a,node:b,onSave:c,onClose:f,isAnthropic:g}){let[h,i]=(0,e.useState)(()=>({name:b?.name||"",prefix:b?.prefix||"",apiType:b?.apiType||"chat",baseUrl:b?.baseUrl||(g?"https://api.anthropic.com/v1":"https://api.openai.com/v1")})),[k,l]=(0,e.useState)(!1),[m,n]=(0,e.useState)(""),[o,p]=(0,e.useState)(""),[q,r]=(0,e.useState)(!1),[s,t]=(0,e.useState)(null),[u,v]=(0,e.useState)(b);b!==u&&(v(b),b&&i({name:b.name||"",prefix:b.prefix||"",apiType:b.apiType||"chat",baseUrl:b.baseUrl||(g?"https://api.anthropic.com/v1":"https://api.openai.com/v1")}));let w=async()=>{if(h.name.trim()&&h.prefix.trim()&&h.baseUrl.trim()){l(!0);try{let a={name:h.name,prefix:h.prefix,baseUrl:h.baseUrl};g||(a.apiType=h.apiType),await c(a)}finally{l(!1)}}},x=async()=>{r(!0);try{let a=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:h.baseUrl,apiKey:m,type:g?"anthropic-compatible":"openai-compatible",modelId:o.trim()||void 0})}),b=await a.json();t(b.valid?"success":"failed")}catch{t("failed")}finally{r(!1)}};return b?(0,d.jsx)(j.Modal,{isOpen:a,title:`Edit ${g?"Anthropic":"OpenAI"} Compatible`,onClose:f,children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsx)(j.Input,{label:"Name",value:h.name,onChange:a=>i({...h,name:a.target.value}),placeholder:`${g?"Anthropic":"OpenAI"} Compatible (Prod)`,hint:"Required. A friendly label for this node."}),(0,d.jsx)(j.Input,{label:"Prefix",value:h.prefix,onChange:a=>i({...h,prefix:a.target.value}),placeholder:g?"ac-prod":"oc-prod",hint:"Required. Used as the provider prefix for model IDs."}),!g&&(0,d.jsx)(j.Select,{label:"API Type",options:C,value:h.apiType,onChange:a=>i({...h,apiType:a.target.value})}),(0,d.jsx)(j.Input,{label:"Base URL",value:h.baseUrl,onChange:a=>i({...h,baseUrl:a.target.value}),placeholder:g?"https://api.anthropic.com/v1":"https://api.openai.com/v1",hint:`Use the base URL (ending in /v1) for your ${g?"Anthropic":"OpenAI"}-compatible API.`}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.Input,{label:"API Key (for Check)",type:"password",value:m,onChange:a=>n(a.target.value),className:"flex-1"}),(0,d.jsx)("div",{className:"pt-6",children:(0,d.jsx)(j.Button,{onClick:x,disabled:!m||q||!h.baseUrl.trim(),variant:"secondary",children:q?"Checking...":"Check"})})]}),(0,d.jsx)(j.Input,{label:"Model ID (optional)",value:o,onChange:a=>p(a.target.value),placeholder:"e.g. my-model-id",hint:"If provider lacks /models endpoint, enter a model ID to validate via chat/completions instead."}),s&&(0,d.jsx)(j.Badge,{variant:"success"===s?"success":"error",children:"success"===s?"Valid":"Invalid"}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.Button,{onClick:w,fullWidth:!0,disabled:!h.name.trim()||!h.prefix.trim()||!h.baseUrl.trim()||k,children:k?"Saving...":"Save"}),(0,d.jsx)(j.Button,{onClick:f,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}let E=()=>Object.fromEntries(Object.keys(l.bs).map(a=>[a,!1]));function F(a,b){switch(b.type){case"RESET":return{modelId:"",testStatus:null,testError:"",saving:!1};case"SET_MODEL":return{...a,modelId:b.value,testStatus:null,testError:""};case"TEST_START":return{...a,testStatus:"testing",testError:""};case"TEST_RESULT":return{...a,testStatus:b.ok?"ok":"error",testError:b.error||""};case"SAVE_START":return{...a,saving:!0};case"SAVE_DONE":return{...a,saving:!1};default:return a}}function G({isOpen:a,providerAlias:b,providerDisplayAlias:c,onSave:f,onClose:g}){let[h,i]=(0,e.useReducer)(F,{modelId:"",testStatus:null,testError:"",saving:!1}),{modelId:k,testStatus:m,testError:n,saving:o}=h,[p,q]=(0,e.useState)(!1),[r,s]=(0,e.useState)(E),[t,u]=(0,e.useState)("");a&&!p?(q(!0),i({type:"RESET"}),s(E()),u("")):!a&&p&&q(!1);let v=a=>{let c=`${b}/`;return a.startsWith(c)?a.slice(c.length):a},w=async()=>{let a=v(k.trim());if(a){i({type:"TEST_START"});try{let c=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${b}/${a}`})}),d=await c.json();i({type:"TEST_RESULT",ok:d.ok,error:d.error})}catch(a){i({type:"TEST_RESULT",ok:!1,error:a.message})}}},x=async()=>{let a=v(k.trim());if(a&&!o){i({type:"SAVE_START"});try{await f(a,r,r.stt?t:null)}finally{i({type:"SAVE_DONE"})}}};return(0,d.jsx)(j.Modal,{isOpen:a,onClose:g,title:"Add Custom Model",children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("label",{htmlFor:"add-custom-model-id",className:"text-sm font-medium mb-1.5 block",children:"Model ID"}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)("input",{id:"add-custom-model-id",type:"text",value:k,onChange:a=>i({type:"SET_MODEL",value:a.target.value}),onKeyDown:a=>{"Enter"===a.key&&w()},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"}),(0,d.jsx)(j.Button,{variant:"secondary",icon:"science",loading:"testing"===m,onClick:w,disabled:!k.trim()||"testing"===m,children:"testing"===m?"Testing...":"Test"})]}),(0,d.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Sent to provider as: ",(0,d.jsx)("code",{className:"font-mono bg-sidebar px-1 rounded",children:v(k.trim())||"model-id"})]})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Capabilities"}),(0,d.jsx)("div",{className:"flex flex-wrap gap-4",children:Object.entries(l.bs).map(([a,b])=>(0,d.jsx)(j.Toggle,{checked:!!r[a],onChange:b=>s(c=>({...c,[a]:b})),label:b.label,description:b.desc,size:"sm"},a))})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)(j.Toggle,{checked:!!r.stt,onChange:a=>{s(b=>({...b,stt:a})),a||u("")},label:"Speech to text",description:"Transcribes audio via /v1/audio/transcriptions",size:"sm"}),r.stt&&(0,d.jsx)("div",{className:"mt-3",children:(0,d.jsx)(j.Select,{label:"Transport",value:t,onChange:a=>u(a.target.value),placeholder:"Provider default (REST)",options:l.vp.map(a=>({value:a,label:l.qw[a].label})),hint:"Realtime transport marker for the STT dispatcher. Empty keeps the provider's REST format."})})]}),"ok"===m&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-base",children:"check_circle"}),"Model is reachable"]}),"error"===m&&(0,d.jsxs)("div",{className:"flex items-start gap-2 text-sm text-red-500",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-base shrink-0",children:"cancel"}),(0,d.jsx)("span",{children:n||"Model not reachable"})]}),(0,d.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,d.jsx)(j.Button,{onClick:g,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,d.jsx)(j.Button,{onClick:x,fullWidth:!0,size:"sm",disabled:!k.trim()||o,children:o?"Adding...":"Add Model"})]})]})})}let H=`[
8
8
  {
9
9
  "accessToken": "eyJhbGc...",
10
10
  "refreshToken": "rt_...",
@@ -25,4 +25,4 @@ exa-key-only-auto-named`:A,[W,X]=(0,e.useState)("single"),[Y,Z]=(0,e.useState)("
25
25
  "email": "account2@example.com"
26
26
  }
27
27
  ]`;function K(a){let b,c=a.trim();if(!c)return[];try{b=JSON.parse(c)}catch(a){try{let a=c;a.startsWith("[")||((a=a.replace(/\}\s*,\s*\{/g,"},{").replace(/\}\s*\{/g,"},{")).endsWith(",")&&(a=a.slice(0,-1)),a=`[${a}]`),b=JSON.parse(a)}catch{throw a}}if(Array.isArray(b))return b;if(b&&"object"==typeof b)return Array.isArray(b.accounts)?b.accounts:[b];throw Error("Input must be a JSON object or array of objects")}function L({isOpen:a,onClose:b,onSuccess:c}){let[f,g]=(0,e.useState)(""),[h,i]=(0,e.useState)(!1),[k,l]=(0,e.useState)(""),[m,n]=(0,e.useState)(null),[o,q]=(0,e.useState)(!1),[r,s]=(0,e.useState)(null),t=(0,e.useRef)(null),u=()=>{h||(g(""),l(""),n(null),s(null),q(!1),b())},v=async a=>{if(!a||0===a.length)return;l("");let b=Array.from(a).filter(a=>a.name.endsWith(".json")||"application/json"===a.type||""===a.type);if(0===b.length)return void l((0,p.Tl)("Please select valid .json files"));try{let a=[];for(let c of b){let b=await c.text(),d=K(b);Array.isArray(d)?a.push(...d):d&&a.push(d)}if(0===a.length)return void l((0,p.Tl)("No accounts found in selected files"));g(JSON.stringify(a,null,2)),s({filesCount:b.length,accountsCount:a.length})}catch(a){l(`${(0,p.Tl)("Error reading files")}: ${a.message}`)}},w=async()=>{let a;l(""),n(null);try{a=K(f)}catch(a){l(`${(0,p.Tl)("Invalid JSON")}: ${a.message}`);return}if(!a||0===a.length)return void l((0,p.Tl)("No accounts found in input"));i(!0);try{let b=await fetch("/api/oauth/grok-cli/bulk-import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accounts:a})}),d=await b.json();if(!b.ok)return void l(d?.error||`Request failed: ${b.status}`);n(d),d.success>0&&"function"==typeof c&&c()}catch(a){l(a.message||(0,p.Tl)("Request failed"))}finally{i(!1)}},x=m?.results?.filter(a=>!a.ok)||[];return(0,d.jsx)(j.Modal,{isOpen:a,title:(0,p.Tl)("Bulk Add Grok CLI Accounts"),onClose:u,children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,d.jsx)("p",{className:"text-xs text-text-muted",children:(0,p.Tl)("Upload multiple .json files or paste JSON array / object.")}),(0,d.jsx)("input",{ref:t,type:"file",accept:".json,application/json",multiple:!0,className:"hidden",onChange:a=>{v(a.target.files),a.target&&(a.target.value="")}}),(0,d.jsx)(j.Button,{type:"button",size:"sm",variant:"secondary",icon:"upload_file",onClick:()=>t.current?.click(),disabled:h,children:(0,p.Tl)("Upload JSON Files")})]}),(0,d.jsxs)("div",{onDragOver:a=>{a.preventDefault(),q(!0)},onDragLeave:a=>{a.preventDefault(),q(!1)},onDrop:a=>{a.preventDefault(),q(!1),a.dataTransfer?.files?.length>0&&v(a.dataTransfer.files)},className:`relative rounded border transition-colors ${o?"border-primary bg-primary/10 ring-2 ring-primary/30":"border-accent/30 bg-sidebar"}`,children:[(0,d.jsx)("textarea",{className:"w-full rounded bg-transparent p-2.5 text-sm font-mono resize-y min-h-[240px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:J,value:f,onChange:a=>{g(a.target.value),s(null)},disabled:h}),o&&(0,d.jsxs)("div",{className:"absolute inset-0 flex flex-col items-center justify-center bg-sidebar/90 rounded pointer-events-none backdrop-blur-xs",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-3xl text-primary mb-1",children:"upload_file"}),(0,d.jsx)("span",{className:"text-sm font-medium text-primary",children:(0,p.Tl)("Drop .json files here")})]})]}),r&&(0,d.jsxs)("div",{className:"flex items-center gap-1.5 text-xs text-green-400 font-medium bg-green-500/10 border border-green-500/20 px-2.5 py-1.5 rounded",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"check_circle"}),(0,d.jsxs)("span",{children:[(0,p.Tl)("Loaded")," ",r.accountsCount," ",(0,p.Tl)("account(s) from")," ",r.filesCount," ",(0,p.Tl)("file(s)")]})]}),k&&(0,d.jsx)("p",{className:"text-xs text-red-500 break-words",children:k}),m&&m.failed>0&&(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsxs)("div",{className:"text-sm font-medium text-yellow-400",children:["✗ ",m.failed," ",(0,p.Tl)("failed")]}),x.length>0&&(0,d.jsx)("ul",{className:"rounded border border-accent/20 bg-sidebar/50 p-2 text-xs font-mono max-h-40 overflow-y-auto",children:x.map(a=>(0,d.jsxs)("li",{className:"text-red-400",children:["[",a.index,"] ",a.error]},a.index))})]}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.Button,{onClick:w,fullWidth:!0,disabled:h||!f.trim(),children:h?(0,p.Tl)("Importing..."):(0,p.Tl)("Import All")}),(0,d.jsx)(j.Button,{onClick:u,variant:"ghost",fullWidth:!0,disabled:h,children:(0,p.Tl)("Close")})]})]})})}var M=c(79822),N=c.n(M),O=c(32433);let P=["host","content-length","content-type","connection","transfer-encoding","authorization","cookie"],Q=/^[A-Za-z0-9-]+$/;function R({providerId:a}){let b=(0,O.i)(),[c,f]=(0,e.useState)(!1),[g,h]=(0,e.useState)([{name:"",value:""}]),[i,k]=(0,e.useState)({}),[l,m]=(0,e.useState)(!1),[n,o]=(0,e.useState)(!1),p=(a,b,c)=>{h(d=>d.map((d,e)=>e===a?{...d,[b]:c}:d))},q=(0,e.useCallback)(async()=>{let c={};for(let a of g.filter(a=>a.name.trim())){let d=a.name.trim();if(!Q.test(d))return void b.error(`Invalid header name: ${d}`);if(P.includes(d.toLowerCase()))return void b.error(`Header ${d} cannot be overridden`);if(d in c)return void b.error(`Duplicate header name: ${d}`);a.value!==i[d]&&(c[d]=a.value)}o(!0);try{let d=await fetch(`/api/providers/${a}/overrides`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({headers:c})});if(!d.ok){let a=await d.json().catch(()=>({}));b.error(a.error||"Failed to save");return}m(Object.keys(c).length>0),b.success("Custom headers saved")}finally{o(!1)}},[g,i,a,b]);return 0!==Object.keys(i).length||l?(0,d.jsxs)(j.Card,{padding:"xs",children:[(0,d.jsxs)("button",{type:"button",onClick:()=>f(a=>!a),className:"flex w-full items-center justify-between text-left",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-primary text-[20px]",children:"tune"}),(0,d.jsx)("span",{className:"text-sm font-semibold",children:"Custom Headers"}),l&&(0,d.jsx)(j.Badge,{variant:"success",size:"sm",children:"Active"})]}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted",children:c?"expand_less":"expand_more"})]}),c&&(0,d.jsxs)("div",{className:"mt-3 border-t border-border pt-3",children:[(0,d.jsx)("div",{className:"flex flex-col gap-2",children:g.map((a,b)=>{let c=a.name.trim()in i&&a.value!==i[a.name.trim()];return(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("input",{value:a.name,onChange:a=>p(b,"name",a.target.value),placeholder:"Header-Name",spellCheck:!1,className:"w-44 rounded-md border border-border bg-background px-2 py-1.5 text-sm focus:border-primary focus:outline-none"}),(0,d.jsx)("input",{value:a.value,onChange:a=>p(b,"value",a.target.value),placeholder:"Value",spellCheck:!1,title:c?"Overridden":a.name.trim()in i?"Registry default":"",className:`min-w-0 flex-1 rounded-md border bg-background px-2 py-1.5 text-sm focus:border-primary focus:outline-none ${c?"border-amber-400/60":"border-border"}`}),(0,d.jsx)("button",{type:"button",title:"Remove header",onClick:()=>h(a=>a.length>1?a.filter((a,c)=>c!==b):[{name:"",value:""}]),className:"shrink-0 text-text-muted hover:text-red-500",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"})})]},b)})}),(0,d.jsxs)("div",{className:"mt-3 flex items-center justify-between gap-2",children:[(0,d.jsxs)("button",{type:"button",onClick:()=>h(a=>[...a,{name:"",value:""}]),className:"flex items-center gap-1 text-xs text-primary hover:underline",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"add"}),"Add header"]}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)("button",{type:"button",disabled:n,onClick:()=>{h(Object.entries(i).map(([a,b])=>({name:a,value:b})))},className:"rounded-md border border-border px-3 py-1.5 text-xs hover:bg-black/[0.03] dark:hover:bg-white/[0.03] disabled:opacity-50",children:"Reset"}),(0,d.jsx)("button",{type:"button",disabled:n,onClick:q,className:"rounded-md bg-primary px-3 py-1.5 text-xs font-medium text-white hover:opacity-90 disabled:opacity-50",children:n?"Saving...":"Save"})]})]})]})]}):null}R.propTypes={providerId:N().string.isRequired};var S=c(44690);function T(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone||"UTC"}catch{return"UTC"}}let U={anchor:"09:30",timezone:T(),windowHours:5,slotsPerDay:3};function V(a){let b=/^(\d{1,2}):(\d{2})$/.exec(String(a||"").trim());if(!b)return null;let c=Number(b[1]),d=Number(b[2]);return c>23||d>59?null:{hour:c,minute:d}}function W(a){return Math.max(1,Math.floor(24/a))}function X(a,b,c,d){let e="number"==typeof a?a:Number(a);return Number.isFinite(e)?Math.min(d,Math.max(c,e)):b}function Y(a){let b=function(a){if(!a||!0!==a.enabled)return null;let b=V(a.anchor)||V(U.anchor),c=`${String(b.hour).padStart(2,"0")}:${String(b.minute).padStart(2,"0")}`,d=!function(a){if(!a||"string"!=typeof a)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:a}),!0}catch{return!1}}(a.timezone)?U.timezone:a.timezone,e=X(a.windowHours,U.windowHours,.5,24),f=Math.round(X(a.slotsPerDay,U.slotsPerDay,1,W(e)));return{enabled:!0,anchor:c,timezone:d,windowHours:e,slotsPerDay:f}}(a);if(!b)return[];let{hour:c,minute:d}=V(b.anchor),e=60*c+d;return Array.from({length:b.slotsPerDay},(a,c)=>{let d=Math.round(e+c*b.windowHours*60)%1440;return`${String(Math.floor(d/60)).padStart(2,"0")}:${String(d%60).padStart(2,"0")}`})}let Z=[{value:"off",label:"Off",icon:"block"},{value:"reset",label:"On reset",icon:"bolt"},{value:"schedule",label:"Schedule",icon:"schedule"}];function $({isOpen:a,onClose:b,onSave:c,connection:f,reactive:g=!1,schedule:h=null}){let[i,k]=(0,e.useState)(()=>({mode:h?.enabled===!0?"schedule":!0===g?"reset":"off",anchor:h?.anchor||U.anchor,timezone:T(),windowHours:String(h?.windowHours??U.windowHours),slotsPerDay:String(h?.slotsPerDay??U.slotsPerDay)})),l=Number(i.windowHours),m=Number(i.slotsPerDay),n=!!V(i.anchor),o=Number.isFinite(l)&&l>=.5&&l<=24,p=o?W(l):24,q=Number.isInteger(m)&&m>=1&&m<=p,r=n&&o&&q,s="schedule"!==i.mode||r,t=r?Y({enabled:!0,...i,windowHours:l,slotsPerDay:m}):[],u=t.length&&o?(()=>{let{hour:a,minute:b}=V(i.anchor),c=Math.round(60*a+b+m*l*60)%1440;return`${String(Math.floor(c/60)).padStart(2,"0")}:${String(c%60).padStart(2,"0")}`})():"",v=a=>k(b=>({...b,...a}));return(0,d.jsx)(j.Modal,{isOpen:a,onClose:b,title:"Auto-ping settings",size:"lg",footer:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(j.Button,{variant:"secondary",onClick:b,children:"Cancel"}),(0,d.jsx)(j.Button,{onClick:()=>{s&&(c({reactive:"reset"===i.mode,schedule:"schedule"===i.mode?{enabled:!0,anchor:i.anchor,timezone:i.timezone,windowHours:l,slotsPerDay:m}:{enabled:!1}}),b())},disabled:!s,children:"Save"})]}),children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("p",{className:"text-sm text-text-muted",children:["Configure automated quota pings",f?.name?` for ${f.name}`:""," — pick one mode."]}),(0,d.jsx)("div",{className:"grid grid-cols-3 gap-1 rounded-[10px] bg-surface-2 p-1",children:Z.map(a=>{let b=i.mode===a.value;return(0,d.jsxs)("button",{type:"button",onClick:()=>v({mode:a.value}),className:(0,S.cn)("flex h-9 items-center justify-center gap-1.5 rounded-[8px] px-3 text-sm font-medium transition-all",b?"bg-surface text-text-main shadow-sm":"text-text-muted hover:text-text-main"),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[15px] leading-none",children:a.icon}),(0,d.jsx)("span",{children:a.label})]},a.value)})}),"reset"===i.mode&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Pings right after the 5h quota window resets, so a new window starts immediately."}),"schedule"===i.mode&&(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Pings at fixed local times so the 5h windows align with your workday."}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-3",children:[(0,d.jsx)(j.Input,{label:"Anchor time",type:"time",value:i.anchor,onChange:a=>v({anchor:a.target.value}),error:n?"":"Use HH:MM",inputClassName:"ring-1 ring-black/10 dark:ring-white/15"}),(0,d.jsx)(j.Input,{label:"Window (hours)",type:"number",min:"0.5",max:"24",step:"0.5",value:i.windowHours,onChange:a=>v({windowHours:a.target.value}),error:o?"":"0.5 – 24",inputClassName:"ring-1 ring-black/10 dark:ring-white/15"}),(0,d.jsx)(j.Input,{label:"Pings per day",type:"number",min:"1",max:String(p),step:"1",value:i.slotsPerDay,onChange:a=>v({slotsPerDay:a.target.value}),error:q?"":`1 – ${p}`,hint:q?`Max ${p}`:"",inputClassName:"ring-1 ring-black/10 dark:ring-white/15"})]}),t.length>0&&(0,d.jsxs)("div",{className:"rounded-[10px] bg-surface-2 px-3 py-2.5",children:[(0,d.jsxs)("p",{className:"text-xs font-medium uppercase tracking-wide text-text-muted",children:["Daily slots (",i.timezone,")"]}),(0,d.jsx)("p",{className:"mt-1 text-sm font-medium text-text-main",children:t.join(" → ")}),(0,d.jsxs)("p",{className:"mt-1 text-xs text-text-muted",children:["Covers ",t[0]," – ",u,", then pauses until ",t[0]," next day."]})]})]})]})})}$.propTypes={isOpen:N().bool.isRequired,onClose:N().func.isRequired,onSave:N().func.isRequired,connection:N().object,reactive:N().bool,schedule:N().object};let _={claude:"claudeAutoPing",codex:"codexAutoPing"};function aa(){let a,b,c,g,q=(0,f.useParams)(),u=(0,f.useRouter)(),w=q.id,{getCaps:x}=(0,o.y)(),[y,A]=(0,e.useState)([]),[C,E]=(0,e.useState)(!0),[F,H]=(0,e.useState)(null),[J,K]=(0,e.useState)([]),[M,N]=(0,e.useState)(!1),[O,P]=(0,e.useState)(!1),[Q,S]=(0,e.useState)(!1),[T,U]=(0,e.useState)(""),[V,W]=(0,e.useState)(!1),[X,Z]=(0,e.useState)(!1),[aa,ab]=(0,e.useState)(!1),[ac,ad]=(0,e.useState)(!1),[ae,af]=(0,e.useState)(!1),[ag,ah]=(0,e.useState)(null),[ai,aj]=(0,e.useState)({}),[ak,al]=(0,e.useState)([]),[am,an]=(0,e.useState)(!1),[ao,ap]=(0,e.useState)({}),[aq,ar]=(0,e.useState)(""),[as,at]=(0,e.useState)(()=>new Set),[au,av]=(0,e.useState)(!1),[aw,ax]=(0,e.useState)([]),[ay,az]=(0,e.useState)(1),[aA,aB]=(0,e.useState)("__none__"),[aC,aD]=(0,e.useState)(!1),[aE,aF]=(0,e.useState)(null),[aG,aH]=(0,e.useState)(""),[aI,aJ]=(0,e.useState)(!1),[aK,aL]=(0,e.useState)("auto"),[aM,aN]=(0,e.useState)({enabled:!1,connections:{},schedules:{}}),[aO,aP]=(0,e.useState)(null),[aQ,aR]=(0,e.useState)([]),[aS,aT]=(0,e.useState)([]),[aU,aV]=(0,e.useState)([]),[aW,aX]=(0,e.useState)([]),[aY,aZ]=(0,e.useState)(null),[a$,a_]=(0,e.useState)(null),[a0,a1]=(0,e.useState)(!1),[a2,a3]=(0,e.useState)(!1),[a4,a5]=(0,e.useState)(!1),[a6,a7]=(0,e.useState)(null),[a8,a9]=(0,e.useState)({}),[ba,bb]=(0,e.useState)(null),bc=(0,e.useRef)(!1),[bd,be]=(0,e.useState)(!1),{copied:bf,copy:bg}=(0,n.C)(),bh=()=>{N(!0)},bi=()=>{bn?bh():(U(""),S(!0))},bj=()=>{U(""),S(!0)},bk=()=>{bn?bi():bj()},bl=F?{id:F.id,name:F.name||("anthropic-compatible"===F.type?"Anthropic Compatible":"OpenAI Compatible"),color:"anthropic-compatible"===F.type?"#D97757":"#10A37F",textIcon:"anthropic-compatible"===F.type?"AC":"OC",apiType:F.apiType,baseUrl:F.baseUrl,type:F.type}:k.zN[w]||k.fg[w]||k.IS[w]||k.nJ[w]||k.br[w],bm=bl?.authModes||[],bn=!!k.zN[w]||!!k.IS[w]||bm.includes("oauth"),bo=!!k.fg[w]||bm.includes("apikey"),bp=!!k.IS[w]?.noAuth,bq=(0,l.KC)(w),br="cursor"===w&&aS.length>0?aS:bq,bs=(0,k.wG)(w),bt=(0,k.mq)(w),bu=(0,k.gb)(w),bv=bt||bu,bw=!bv&&bn&&bo,bx="xai"===w?"Grok Build OAuth":"grok-cli"===w?"Grok CLI Device Login":"kimi"===w?"Kimi Coding OAuth":"OAuth",by="xai"===w?"xAI API Key":"kimi"===w?"Kimi API Key":"qoder"===w?"PAT":"API Key",bz=a=>{if(!aK||"auto"===aK)return null;let b=(0,m.k)(w,a);return b&&b.includes(aK)?aK:null},bA=bv?w:bs,bB=(a=new Map,b=b=>{b?.id&&!a.has(b.id)&&a.set(b.id,b)},br.forEach(b),ak.forEach(a=>{a.providerAlias===bA&&"llm"===(a.kind||a.type||"llm")&&b(a)}),c=new Set(aW),[...a.values()].filter(a=>!c.has(a.id))),bC=(()=>{let a=new Set,b=new Set,c=c=>{if(!c||b.has(c))return;b.add(c);let d=(0,m.k)(w,c);d&&d.forEach(b=>{"none"!==b&&a.add(b)})};for(let a of br)c(a.id);for(let a of aU)c(a.id);for(let a of ak)a.providerAlias===bA&&"llm"===(a.kind||a.type||"llm")&&c(a.id);return a.size?["auto",...a]:null})(),bD=bv?F?.prefix||w:bs,bE=(0,e.useCallback)(async()=>{try{let a=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(bA)}`,{cache:"no-store"}),b=await a.json();a.ok&&aX(b.ids||[])}catch(a){console.log("Error fetching disabled models:",a)}},[bA]),bF=async a=>{try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:bA,ids:[a]})})).ok&&await bE()}catch(a){console.log("Error disabling model:",a)}},bG=async a=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(bA)}&id=${encodeURIComponent(a)}`,{method:"DELETE"})).ok&&await bE()}catch(a){console.log("Error enabling model:",a)}},bH=async a=>{a.length&&aZ({title:"Disable All Models",message:`Disable all ${a.length} model(s)?`,onConfirm:async()=>{aZ(null);try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:bA,ids:a})})).ok&&await bE()}catch(a){console.log("Error disabling all models:",a)}}})},bI=async()=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(bA)}`,{method:"DELETE"})).ok&&await bE()}catch(a){console.log("Error enabling all models:",a)}},bJ=(0,e.useCallback)(async()=>{try{let a=await fetch("/api/models/alias"),b=await a.json();a.ok&&aj(b.aliases||{})}catch(a){console.log("Error fetching aliases:",a)}},[]),bK=(0,e.useCallback)(async()=>{try{let a=await fetch("/api/models/custom",{cache:"no-store"}),b=await a.json();a.ok&&al(b.models||[])}catch(a){console.log("Error fetching custom models:",a)}},[]),bL=(0,e.useCallback)(async()=>{try{let[a,b,c,d]=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"})]),e=await a.json(),f=await b.json(),g=await c.json(),h=d.ok?await d.json():{};if(a.ok){let a=(e.connections||[]).filter(a=>a.provider===w);A(a)}c.ok&&K(g.proxyPools||[]);let i=(h.providerStrategies||{})[w]||{};aF(i.fallbackStrategy||null),aH(null!=i.stickyRoundRobinLimit?String(i.stickyRoundRobinLimit):"1"),aJ(!0===i.strictModelAssignment);let j=(h.providerThinking||{})[w]||{};aL(j.mode||"auto");let k=_[w],l=k&&h[k]||{};if(aN({enabled:!0===l.enabled,connections:l.connections||{},schedules:l.schedules||{}}),b.ok){let a=(f.nodes||[]).find(a=>a.id===w)||null;if(!a&&bv)for(let b=0;b<3;b+=1){await new Promise(a=>setTimeout(a,150));let b=await fetch("/api/provider-nodes",{cache:"no-store"});if(b.ok&&(a=((await b.json()).nodes||[]).find(a=>a.id===w)||null))break}H(a)}}catch(a){console.log("Error fetching connections:",a)}finally{E(!1)}},[w,bv]),bM=async a=>{try{let b=await fetch(`/api/provider-nodes/${w}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}),c=await b.json();b.ok&&(H(c.node),await bL(),ad(!1))}catch(a){console.log("Error updating provider node:",a)}},bN=async(a,b)=>{try{let c=await fetch("/api/settings",{cache:"no-store"}),d=(c.ok?await c.json():{}).providerStrategies||{},e={...d[w]||{}};a?e.fallbackStrategy=a:(delete e.fallbackStrategy,delete e.stickyRoundRobinLimit),"round-robin"===a&&""!==b&&(e.stickyRoundRobinLimit=Number(b)||3);let f={...d};0===Object.keys(e).length?delete f[w]:f[w]=e,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:f})})}catch(a){console.log("Error saving provider strategy:",a)}},bO=async a=>{aJ(a);try{let b=await fetch("/api/settings",{cache:"no-store"}),c=(b.ok?await b.json():{}).providerStrategies||{};await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:{...c,[w]:{...c[w]||{},strictModelAssignment:a}}})})}catch(a){console.log("Error saving Freebuff strict assignment:",a)}},bP=async(a,b)=>{try{(await fetch(`/api/providers/${a}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerSpecificData:{assignedModel:b||null}})})).ok&&A(c=>c.map(c=>c.id===a?{...c,providerSpecificData:{...c.providerSpecificData||{},assignedModel:b||null}}:c))}catch(a){console.log("Error saving Freebuff model assignment:",a)}},bQ=async a=>{try{let b=await fetch("/api/settings",{cache:"no-store"}),c={...(b.ok?await b.json():{}).providerThinking||{}};a&&"auto"!==a?c[w]={mode:a}:delete c[w],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerThinking:c})})}catch(a){console.log("Error saving thinking config:",a)}},bR=async a=>{let b=_[w];if(b){aN(a);try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[b]:a})})}catch(a){console.log("Error saving auto-ping config:",a)}}},bS=async(a,b,c=bs)=>{let d=`${c}/${a}`;try{let a=await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:d,alias:b})});if(a.ok)await bJ();else{let b=await a.json();a_({title:(0,p.Tl)("Error"),message:b.error||"Failed to set alias",variant:"error"})}}catch(a){console.log("Error setting alias:",a)}},bT=async a=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(a)}`,{method:"DELETE"})).ok&&await bJ()}catch(a){console.log("Error deleting alias:",a)}},bU=async(a,b="llm",c=bA,d,e)=>{try{let f=await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:c,id:a,type:b,...d?{caps:d}:{},...e?{transport:e}:{}})});if(f.ok)await bK();else{let a=await f.json();a_({title:(0,p.Tl)("Error"),message:a.error||"Failed to add custom model",variant:"error"})}}catch(a){console.log("Error adding custom model:",a)}},bV=async(a,b="llm",c=bA)=>{try{let d=new URLSearchParams({providerAlias:c,id:a,type:b});(await fetch(`/api/models/custom?${d}`,{method:"DELETE"})).ok&&await bK()}catch(a){console.log("Error deleting custom model:",a)}},bW=async()=>{if(bd)return;let a=y.find(a=>!1!==a.isActive);be(!0);try{let b=[];if(a){let c=await fetch(`/api/providers/${a.id}/models`),d=await c.json();if(!c.ok)return void a_({title:(0,p.Tl)("Error"),message:d.error||(0,p.Tl)("Failed to fetch models"),variant:"error"});b=d.models||[]}else{let a=(k.zN[w]||k.fg[w]||k.IS[w]||k.nJ[w])?.modelsFetcher;if(!a)return void a_({title:(0,p.Tl)("Notice"),message:(0,p.Tl)("Please add an active connection first"),variant:"info"});b=await r(a)}let c=b.filter(a=>a?.id||a?.name||a?.model);if(0===c.length)return void a_({title:(0,p.Tl)("Notice"),message:(0,p.Tl)("No models returned"),variant:"info"});let d=RegExp(`^(?:${w}|${bA})/`),e=/embed|whisper|dall-e|dalle|imagen|moderation|rerank|tts/i,f=new Set([...br.map(a=>a.id),...aU.map(a=>a.id),...ak.filter(a=>a.providerAlias===bA&&"llm"===(a.kind||a.type||"llm")).map(a=>a.id)]);for(let a of Object.values(ai))"string"==typeof a&&(a.startsWith(`${bA}/`)?f.add(a.slice(bA.length+1)):a.startsWith(`${w}/`)&&f.add(a.slice(w.length+1)));let g=[];for(let a of c){let b=a.id||a.name||a.model,c=(0,l.CP)(a);if(c&&"llm"!==c||e.test(b))continue;let h=b.replace(d,"");!h||f.has(h)||(g.push({providerAlias:bA,id:h,type:"llm"}),f.add(h))}if(0===g.length)a_({title:(0,p.Tl)("Notice"),message:(0,p.Tl)("All models already exist, no new models added"),variant:"info"});else{let a=await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({models:g})}),b=(await a.json()).count??g.length;await bK(),a_({title:(0,p.Tl)("Success"),message:(0,p.Tl)("Successfully added")+` ${b} `+(0,p.Tl)("models"),variant:"success"})}}catch(a){console.log("Error importing provider models:",a),a_({title:(0,p.Tl)("Error"),message:(0,p.Tl)("Error fetching models")+": "+a.message,variant:"error"})}finally{be(!1)}},bX=async()=>{if(a2||0===y.length)return;let a=Object.fromEntries(y.map(a=>[a.id,{state:"queued",error:null}]));bc.current=!1,a3(!0),a5(!1),a7(null),a9(a),bb({total:y.length,completed:0,passed:0,failed:0,stopped:!1});let b=0,c=0;try{for(let a=0;a<y.length;a+=1){if(bc.current){bb({total:y.length,completed:a,passed:b,failed:c,stopped:!0});break}let d=y[a];a7(d.id),a9(a=>({...a,[d.id]:{state:"testing",error:null}}));try{let a=await fetch(`/api/providers/${d.id}/test`,{method:"POST"}),e=await a.json(),f=!!e.valid;f?b+=1:c+=1,a9(a=>({...a,[d.id]:{state:f?"success":"failed",error:f?null:e.error||null}}))}catch(a){c+=1,a9(b=>({...b,[d.id]:{state:"failed",error:a.message||"Test failed"}}))}bb({total:y.length,completed:a+1,passed:b,failed:c,stopped:!1}),a<y.length-1&&await new Promise(a=>setTimeout(a,1e3))}}finally{a7(null),a3(!1),a5(!1),bc.current=!1}},bY=async a=>{aZ({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{aZ(null);try{(await fetch(`/api/providers/${a}`,{method:"DELETE"})).ok&&A(b=>b.filter(b=>b.id!==a))}catch(a){console.log("Error deleting connection:",a)}}})},bZ=()=>{bL(),N(!1)},b$=async a=>{U("");try{let b=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:w,...a})}),c=null;try{c=await b.json()}catch{c=null}if(b.ok){await bL(),S(!1);return}U(c?.error||"Failed to save connection")}catch(a){console.log("Error saving connection:",a),U("Failed to save connection")}},b_=async a=>{try{(await fetch(`/api/providers/${ag.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})).ok&&(await bL(),ab(!1))}catch(a){console.log("Error updating connection:",a)}},b0=async(a,b)=>{try{(await fetch(`/api/providers/${a}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:b})})).ok&&A(c=>c.map(c=>c.id===a?{...c,isActive:b}:c))}catch(a){console.log("Error updating connection status:",a)}},b1=async(a,b)=>{let c=[...y];[c[a],c[b]]=[c[b],c[a]],A(c);try{await Promise.all([fetch(`/api/providers/${c[a].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:a})}),fetch(`/api/providers/${c[b].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:b})})])}catch(a){console.log("Error swapping priority:",a),await bL()}},b2=y.filter(a=>aw.includes(a.id)),{currentPage:b3,totalPages:b4,items:b5,start:b6}=function(a=[],b=1){let c=Array.isArray(a)?a:[],d=c.length,e=Math.max(1,Math.ceil(d/10)),f=Math.floor(Number(b)),g=Math.min(Number.isFinite(f)&&f>0?f:1,e),h=(g-1)*10,i=c.slice(h,h+10);return{currentPage:g,totalPages:e,totalItems:d,start:h,items:i,pageSize:10}}(y,ay),b7=y.length>0&&aw.length===y.length,b8=(()=>{if(0===b2.length)return"";let a=new Set(b2.map(a=>a.providerSpecificData?.proxyPoolId||"__none__"));if(1===a.size){let b=[...a][0];if("__none__"===b)return"All selected currently unbound";let c=J.find(a=>a.id===b);return`All selected currently bound to ${c?.name||b}`}return"Selected connections have mixed proxy bindings"})(),b9=()=>{aC||af(!1)},ca=async(a,b)=>{let c=await fetch(`/api/providers/${a}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(b)});if(!c.ok)throw Error((await c.json().catch(()=>({}))).error||`Proxy update failed (${c.status})`);return c.json()},cb=async a=>{aD(!0);try{let b=[];for(let{connectionId:c,proxyPoolId:d,proxyPoolIds:e,proxyRotationStrategy:f}of a)try{let a=e?{proxyPoolIds:e,proxyRotationStrategy:f}:{proxyPoolId:d};await ca(c,a)}catch(a){console.log("Error applying proxy for",c,a),b.push(c)}if(await bL(),b.length>0)return void a_({title:(0,p.Tl)("Error"),message:`Updated with ${b.length} failed request(s). Retry the selected connections.`,variant:"error"});af(!1),ax([]),aB("__none__")}finally{aD(!1)}},cc=a=>cb((aw.length>0?b2:y).map(b=>({connectionId:b.id,proxyPoolId:a}))),cd=(0,d.jsxs)("div",{className:"flex min-w-0 flex-col divide-y divide-black/[0.03] dark:divide-white/[0.03]",children:[b5.map((a,b)=>{let c,e=b6+b;return(0,d.jsxs)("div",{className:"flex min-w-0 items-stretch",children:[(0,d.jsx)("div",{className:"flex shrink-0 items-center pl-1 sm:pl-2",children:(0,d.jsx)("input",{type:"checkbox",checked:(c=a.id,aw.includes(c)),onChange:()=>{var b;return b=a.id,void ax(a=>a.includes(b)?a.filter(a=>a!==b):[...a,b])},className:"h-4 w-4 rounded border-gray-300 text-primary focus:ring-primary"})}),(0,d.jsx)("div",{className:"flex-1 min-w-0",children:(0,d.jsx)(z,{connection:a,proxyPools:J,isOAuth:bn,isFirst:0===e,isLast:e===y.length-1,onMoveUp:()=>b1(e,e-1),onMoveDown:()=>b1(e,e+1),onToggleActive:b=>b0(a.id,b),autoPing:_[w]&&"oauth"===a.authType?{isActive:!0===aM.connections[a.id]||aM.schedules?.[a.id]?.enabled===!0,reactiveOn:!0===aM.connections[a.id],provider:w,scheduleOn:aM.schedules?.[a.id]?.enabled===!0,scheduleSummary:Y(aM.schedules?.[a.id]).join(" / "),onConfigure:()=>aP(a)}:null,onUpdateProxy:async b=>{try{let c="object"==typeof b?b:{proxyPoolId:b||null};if((await fetch(`/api/providers/${a.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(c)})).ok){let b={...a.providerSpecificData};c.proxyPoolIds?(b.proxyPoolIds=c.proxyPoolIds,b.proxyRotationStrategy=c.proxyRotationStrategy,delete b.proxyPoolId):(c.proxyPoolId?b.proxyPoolId=c.proxyPoolId:delete b.proxyPoolId,delete b.proxyPoolIds,delete b.proxyRotationStrategy),A(c=>c.map(c=>c.id===a.id?{...c,providerSpecificData:b}:c))}}catch(a){console.log("Error updating proxy:",a)}},onEdit:()=>{ah(a),ab(!0)},onDelete:()=>bY(a.id),oneByOneStatus:a8[a.id]||null,modelAssignmentOptions:"freebuff"===w?bB:null,onModelAssignmentChange:"freebuff"===w?b=>bP(a.id,b):null,strictModelAssignment:aI})})]},a.id)}),y.length>10&&(0,d.jsx)(j.Pagination,{currentPage:b3,pageSize:10,totalItems:y.length,onPageChange:az})]}),ce=J.filter(a=>!0===a.isActive),cf=(0,d.jsx)(j.Modal,{isOpen:ae,onClose:b9,title:aw.length>0?`Apply Proxy (${aw.length} selected)`:`Apply Proxy (All ${y.length} connections)`,children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[b8&&(0,d.jsx)("p",{className:"text-xs text-text-muted bg-surface-2 px-3 py-2 rounded-lg border border-border/50",children:b8}),(0,d.jsxs)("div",{className:"flex flex-col divide-y divide-border/30 border border-border/50 rounded-xl overflow-hidden bg-surface",children:[(0,d.jsxs)("div",{className:"p-3 flex flex-col gap-1",children:[(0,d.jsx)("p",{className:"px-3 pb-1 text-[10px] font-semibold uppercase tracking-wider text-text-muted",children:"Dynamic Strategies"}),(0,d.jsxs)("button",{type:"button",onClick:()=>{let a=J.filter(a=>!0===a.isActive);return 0===a.length?void a_({title:(0,p.Tl)("Notice"),message:"No active proxy pools available.",variant:"info"}):cb((aw.length>0?b2:y).map((b,c)=>({connectionId:b.id,proxyPoolId:a[c%a.length].id})))},disabled:aC||0===ce.length,className:"flex items-center gap-3 rounded-lg px-3 py-2 text-left transition-colors hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-50",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[20px]",children:"sync_alt"}),(0,d.jsxs)("div",{className:"flex flex-col",children:[(0,d.jsx)("span",{className:"text-sm font-medium text-text-main",children:"One-to-one (rotate)"}),(0,d.jsx)("span",{className:"text-[10px] text-text-muted mt-0.5",children:"Distribute active proxy pools round-robin"})]})]}),["fill-first","round-robin","random","smart"].map(a=>(0,d.jsxs)("button",{type:"button",onClick:()=>{let b;return(b=ce.map(a=>a.id).filter(a=>J.find(b=>b.id===a)?.isActive===!0)).length?cb((aw.length>0?b2:y).map(c=>({connectionId:c.id,proxyPoolIds:b,proxyRotationStrategy:a}))):void a_({title:(0,p.Tl)("Notice"),message:"No active proxy pools selected.",variant:"info"})},disabled:aC||0===ce.length,className:"flex items-center gap-3 rounded-lg px-3 py-2 text-left transition-colors hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-50",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[20px]",children:"autorenew"}),(0,d.jsxs)("div",{className:"flex flex-col",children:[(0,d.jsxs)("span",{className:"text-sm font-medium text-text-main capitalize",children:[a," strategy"]}),(0,d.jsx)("span",{className:"text-[10px] text-text-muted mt-0.5",children:"smart"===a?"Bypass pools marked unfit for provider/model":`Rotate over all active pools using ${a}`})]})]},a))]}),(0,d.jsxs)("div",{className:"p-3 flex flex-col gap-1",children:[(0,d.jsx)("p",{className:"px-3 pb-1 text-[10px] font-semibold uppercase tracking-wider text-text-muted",children:"Static Assignment"}),(0,d.jsxs)("button",{type:"button",onClick:()=>cc(null),disabled:aC,className:"flex items-center gap-3 rounded-lg px-3 py-2 text-left transition-colors hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-50",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[20px]",children:"link_off"}),(0,d.jsxs)("div",{className:"flex flex-col",children:[(0,d.jsx)("span",{className:"text-sm font-medium text-text-main",children:"None (unbind all)"}),(0,d.jsx)("span",{className:"text-[10px] text-text-muted mt-0.5",children:"Direct routing without proxy"})]})]}),J.map(a=>(0,d.jsxs)("button",{type:"button",onClick:()=>cc(a.id),disabled:aC||!0!==a.isActive,className:"flex items-center gap-3 rounded-lg px-3 py-2 text-left transition-colors hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-50",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[20px]",children:"lan"}),(0,d.jsxs)("div",{className:"flex flex-col min-w-0 flex-1",children:[(0,d.jsx)("span",{className:"truncate text-sm font-medium text-text-main",children:a.name}),(0,d.jsx)("span",{className:"text-[10px] text-text-muted truncate mt-0.5",children:a.proxyUrl})]}),!0!==a.isActive&&(0,d.jsx)(j.Badge,{variant:"secondary",size:"sm",className:"ml-auto shrink-0",children:"inactive"})]},a.id))]})]}),aC&&(0,d.jsx)("p",{className:"text-xs text-text-muted animate-pulse px-1",children:"Applying proxy configuration..."}),(0,d.jsx)(j.Button,{onClick:b9,variant:"ghost",fullWidth:!0,disabled:aC,children:"Cancel"})]})}),cg=async a=>{if(!as.has(a)){at(b=>new Set(b).add(a));try{let b=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${bA}/${a}`})}),c=await b.json();ap(b=>({...b,[a]:c.ok?"ok":"error"})),ar(c.ok?"":c.error||"Model not reachable")}catch{ap(b=>({...b,[a]:"error"})),ar("Network error")}finally{at(b=>{let c=new Set(b);return c.delete(a),c})}}};return C?(0,d.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,d.jsx)(j.CardSkeleton,{}),(0,d.jsx)(j.CardSkeleton,{})]}):bl?(0,d.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:gap-8 sm:px-0",children:[(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)(h(),{href:"/dashboard/providers",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,d.jsxs)("div",{className:"flex min-w-0 items-center gap-3 sm:gap-4",children:[(0,d.jsx)(i.A,{providerId:bl.id,size:48,alt:bl.name,className:"shrink-0 rounded-lg",fallbackText:bl.textIcon||bl.id.slice(0,2).toUpperCase(),fallbackColor:bl.color}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,d.jsx)("h1",{className:"truncate text-2xl font-semibold tracking-tight sm:text-3xl",children:bl.name}),(bl.notice?.apiKeyUrl||bl.notice?.signupUrl||bl.website)&&(0,d.jsxs)("a",{href:bl.notice?.apiKeyUrl||bl.notice?.signupUrl||bl.website,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),bl.notice?.apiKeyUrl?"Get API Key":"Sign up / Learn more"]})]}),(0,d.jsxs)("p",{className:"text-text-muted",children:[y.length," connection",1===y.length?"":"s"]})]})]})]}),bl.deprecated&&(0,d.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-yellow-500/10 border border-yellow-500/30",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px] text-yellow-500 mt-0.5 shrink-0",children:"warning"}),(0,d.jsx)("p",{className:"text-xs text-red-600 dark:text-yellow-400 leading-relaxed",children:bl.deprecationNotice})]}),bl.notice?.text&&!bl.deprecated&&(0,d.jsxs)("div",{className:"flex flex-col gap-2 rounded-lg border border-blue-500/30 bg-blue-500/10 px-3 py-2 sm:flex-row sm:items-center",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px] text-blue-500 shrink-0",children:"info"}),(0,d.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:bl.notice.text}),bl.notice.apiKeyUrl&&(0,d.jsx)("a",{href:bl.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 →"})]}),bv&&F&&(0,d.jsx)(j.Card,{children:(0,d.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold",children:bu?"Anthropic Compatible Details":"OpenAI Compatible Details"}),(0,d.jsxs)("p",{className:"break-all text-sm text-text-muted",children:[bu?"Messages API":"responses"===F.apiType?"Responses API":"Chat Completions"," \xb7 ",(F.baseUrl||"").replace(/\/$/,""),"/",bu?"messages":"responses"===F.apiType?"responses":"chat/completions"]})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,d.jsx)(j.Button,{size:"sm",icon:"add",onClick:()=>{U(""),S(!0)},className:"w-full sm:w-auto",children:"Add API Key"}),(0,d.jsx)(j.Button,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>ad(!0),className:"w-full sm:w-auto",children:"Edit"}),(0,d.jsx)(j.Button,{size:"sm",variant:"secondary",icon:"delete",onClick:async()=>{aZ({title:"Delete Compatible Node",message:`Delete this ${bu?"Anthropic":"OpenAI"} Compatible node?`,onConfirm:async()=>{aZ(null);try{(await fetch(`/api/provider-nodes/${w}`,{method:"DELETE"})).ok&&u.push("/dashboard/providers")}catch(a){console.log("Error deleting provider node:",a)}}})},className:"w-full sm:w-auto",children:"Delete"})]})]})}),bp?(0,d.jsx)(j.NoAuthProxyCard,{providerId:w}):(0,d.jsxs)(j.Card,{children:[(0,d.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold",children:"Connections"}),(0,d.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:[y.length>0&&J.length>0&&(0,d.jsx)(j.Button,{size:"sm",variant:"secondary",icon:"lan",onClick:()=>af(!0),children:"Apply Proxy"}),y.length>0&&(0,d.jsxs)(d.Fragment,{children:[aw.length>0&&(0,d.jsxs)(j.Button,{size:"sm",variant:"danger",icon:"delete",onClick:()=>{let a=aw.length;0!==a&&aZ({title:`Delete ${a} Connection${a>1?"s":""}`,message:`Delete ${a} connection${a>1?"s":""}? This cannot be undone.`,onConfirm:async()=>{aZ(null);let a=0,b=[...aw];for(let c of b)try{(await fetch(`/api/providers/${c}`,{method:"DELETE"})).ok||(a+=1)}catch(b){console.log("Error deleting connection:",b),a+=1}A(a=>a.filter(a=>!b.includes(a.id))),ax([]),a>0&&a_({title:(0,p.Tl)("Error"),message:`Deleted ${b.length-a} connection(s), ${a} failed.`,variant:"error"})}})},children:["Delete Selected (",aw.length,")"]}),(0,d.jsx)(j.Button,{size:"sm",variant:"secondary",icon:"sync",onClick:bX,disabled:a2,children:a2?"Testing Connection One-by-One...":"Test Connection One-by-One"}),a2&&(0,d.jsx)(j.Button,{size:"sm",variant:"ghost",icon:"stop",onClick:()=>{a2&&(bc.current=!0,a5(!0))},disabled:a4,children:a4?"Stopping...":"Stop"})]}),(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,d.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Round Robin"}),(0,d.jsx)(j.Toggle,{checked:"round-robin"===aE,onChange:a=>{let b=a?"round-robin":null,c=a?aG||"1":aG;a&&!aG&&aH("1"),aF(b),bN(b,c)}}),"round-robin"===aE&&(0,d.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,d.jsx)("span",{className:"text-xs text-text-muted",children:"Sticky:"}),(0,d.jsx)("input",{type:"number",min:1,value:aG,onChange:a=>{var b;aH(b=a.target.value),bN("round-robin",b)},placeholder:"1",className:"w-14 px-2 py-1 text-xs border border-border rounded-md bg-background focus:outline-none focus:border-primary"})]})]}),"freebuff"===w&&(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-2 border-t border-black/[0.03] pt-2 dark:border-white/[0.03]",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Strict Model Assignment"}),(0,d.jsx)("p",{className:"text-[10px] text-text-muted",children:"Only assigned accounts can serve each Freebuff model."})]}),(0,d.jsx)(j.Toggle,{checked:aI,onChange:bO})]})]})]}),0===y.length?(0,d.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("div",{className:"inline-flex items-center justify-center w-9 h-9 rounded-full bg-primary/10 text-primary shrink-0",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:bn?"lock":"key"})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"}),bw&&(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:["Choose ",bx," or ",by,"."]})]})]}),(0,d.jsx)("div",{className:"flex gap-2",children:bw?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(j.Button,{size:"sm",icon:"lock",variant:"secondary",onClick:bi,children:bx}),(0,d.jsx)(j.Button,{size:"sm",icon:"key",onClick:bj,children:by})]}):(0,d.jsxs)(d.Fragment,{children:[!bv&&"iflow"===w&&(0,d.jsx)(j.Button,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>P(!0),children:"Cookie"}),"codex"===w&&(0,d.jsx)(j.Button,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>W(!0),children:(0,p.Tl)("Bulk Add")}),"grok-cli"===w&&(0,d.jsx)(j.Button,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>Z(!0),children:(0,p.Tl)("Bulk Add")}),(0,d.jsx)(j.Button,{size:"sm",icon:"add",onClick:bk,children:bv?"Add API Key":"iflow"===w?"OAuth":"Add Connection"})]})})]}):(0,d.jsxs)(d.Fragment,{children:[ba&&(0,d.jsx)("div",{className:"mb-4 rounded-lg border border-black/10 bg-black/[0.02] px-3 py-2 text-xs text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,d.jsxs)("span",{children:["Total: ",ba.total]}),(0,d.jsxs)("span",{children:["Completed: ",ba.completed]}),(0,d.jsxs)("span",{children:["Passed: ",ba.passed]}),(0,d.jsxs)("span",{children:["Failed: ",ba.failed]}),ba.stopped&&(0,d.jsx)("span",{className:"text-amber-600 dark:text-amber-400",children:"Stopped"}),a2&&a6&&(0,d.jsxs)("span",{children:["Running: ",y.find(a=>a.id===a6)?.name||a6]})]})}),y.length>0&&(0,d.jsx)("div",{className:"mb-3 flex items-center gap-2 border-b border-black/[0.03] pb-2 dark:border-white/[0.03]",children:(0,d.jsxs)("label",{className:"flex cursor-pointer items-center gap-1.5 text-xs text-text-muted hover:text-primary",children:[(0,d.jsx)("input",{type:"checkbox",checked:b7,onChange:()=>{b7?ax([]):ax(y.map(a=>a.id))},className:"h-3.5 w-3.5 rounded border-gray-300 text-primary focus:ring-primary"}),"Select All"]})}),cd,!bv&&(0,d.jsxs)("div",{className:"mt-4 grid grid-cols-1 gap-2 sm:flex",children:["iflow"===w&&(0,d.jsx)(j.Button,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>P(!0),title:"Add connection using browser cookie",className:"w-full sm:w-auto",children:"Cookie"}),"codex"===w&&(0,d.jsx)(j.Button,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>W(!0),title:(0,p.Tl)("Bulk import codex accounts from JSON"),className:"w-full sm:w-auto",children:(0,p.Tl)("Bulk Add")}),"grok-cli"===w&&(0,d.jsx)(j.Button,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>Z(!0),title:(0,p.Tl)("Bulk import Grok CLI accounts from JSON"),className:"w-full sm:w-auto",children:(0,p.Tl)("Bulk Add")}),bw?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(j.Button,{size:"sm",icon:"lock",variant:"secondary",onClick:bi,className:"w-full sm:w-auto",children:bx}),(0,d.jsx)(j.Button,{size:"sm",icon:"key",onClick:bj,className:"w-full sm:w-auto",children:by})]}):(0,d.jsx)(j.Button,{size:"sm",icon:"add",onClick:bk,className:"w-full sm:w-auto",children:"Add"})]})]})]}),(0,d.jsx)(R,{providerId:w}),(0,d.jsxs)(j.Card,{children:[(0,d.jsxs)("div",{className:"mb-4 flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold",children:"Available Models"}),bC&&(0,d.jsx)("select",{value:aK,onChange:a=>{var b;aL(b=a.target.value),bQ(b)},title:"Appends (level) suffix to copied model names",className:"rounded-md border border-border bg-background px-2 py-1 text-xs focus:border-primary focus:outline-none",children:bC.map(a=>(0,d.jsx)("option",{value:a,children:`Thinking: ${a.charAt(0).toUpperCase()+a.slice(1)}`},a))}),!bv&&(0,d.jsx)(j.Button,{size:"sm",variant:"secondary",icon:"download",loading:bd,onClick:bW,children:(0,p.Tl)("Import models")})]}),!bv&&(g=[...br,...aU.filter(a=>!br.some(b=>b.id===a.id))].filter(a=>{let b=(0,l.CP)(a);return!b||"llm"===b}).map(a=>a.id).filter(a=>!aW.includes(a)),(0,d.jsxs)("div",{className:"flex gap-2",children:[aW.length>0&&(0,d.jsx)(j.Button,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:bI,children:"Active All"}),g.length>0&&(0,d.jsx)(j.Button,{size:"sm",variant:"secondary",icon:"block",onClick:()=>bH(g),children:"Disable All"})]}))]}),!!aq&&(0,d.jsx)("p",{className:"text-xs text-red-500 mb-3 break-words",children:aq}),(()=>{let a,b,c;if(bv)return(0,d.jsx)(v,{providerStorageAlias:bA,providerDisplayAlias:bD,modelAliases:ai,customModels:ak,copied:bf,onCopy:bg,onSetAlias:bS,onDeleteAlias:bT,onAddCustomModel:a=>bU(a,"llm",bA),onDeleteCustomModel:a=>bV(a,"llm",bA),connections:y,isAnthropic:bu});let e=[...br,...aU.filter(a=>!br.some(b=>b.id===a.id))].filter(a=>{let b=(0,l.CP)(a);return!b||"llm"===b}),f=new Set(aW),g=e.filter(a=>!f.has(a.id)),h=e.filter(a=>f.has(a.id)),i=s({customModels:ak,modelAliases:ai,providerAlias:bA,builtInModels:br,type:"llm"});return(0,d.jsxs)("div",{className:"flex flex-wrap gap-3",children:[i.map(a=>(0,d.jsx)(t,{model:{id:a.id,name:a.name},fullModel:`${bD}/${a.id}`,alias:a.alias,copied:bf,onCopy:bg,onSetAlias:()=>{},onDeleteAlias:()=>{"custom"===a.source?bV(a.id,"llm",bA):bT(a.alias)},testStatus:ao[a.id],onTest:y.length>0||bp?()=>cg(a.id):void 0,isTesting:as.has(a.id),isCustom:!0,isFree:!1,caps:x(`${w}/${a.id}`),thinkingSuffix:bz(a.id)},`${a.source}-${a.fullModel}`)),g.map(a=>{let b=`${bA}/${a.id}`,c=`${w}/${a.id}`,e=Object.entries(ai).find(([,a])=>a===b||a===c)?.[0];return(0,d.jsx)(t,{model:a,fullModel:`${bD}/${a.id}`,alias:e,copied:bf,onCopy:bg,onSetAlias:b=>bS(a.id,b,bA),onDeleteAlias:()=>bT(e),testStatus:ao[a.id],onTest:y.length>0||bp?()=>cg(a.id):void 0,isTesting:as.has(a.id),isFree:a.isFree,onDisable:()=>bF(a.id),caps:x(`${w}/${a.id}`),thinkingSuffix:bz(a.id)},a.id)}),(0,d.jsxs)("button",{onClick:()=>av(!0),className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-primary/40 px-3 py-2 text-xs text-primary transition-colors hover:border-primary hover:bg-primary/5 sm:w-auto",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]}),aQ.length>0&&(a=new Set([...Object.values(ai),...i.map(a=>a.fullModel)]),b=new Set(br.map(a=>a.id)),0===(c=aQ.filter(c=>!a.has(`${bA}/${c.id}`)&&!b.has(c.id))).length?null:(0,d.jsxs)("div",{className:"w-full mt-2",children:[(0,d.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"Suggested free models (≥200k context):"}),(0,d.jsx)("div",{className:"flex flex-wrap gap-2",children:c.map(a=>(0,d.jsxs)("button",{onClick:async()=>{await bU(a.id,"llm",bA)},className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-black/10 dark:border-white/10 text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:`${a.name} \xb7 ${(a.contextLength/1e3).toFixed(0)}k ctx`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),a.id.split("/").pop()]},a.id))})]})),h.length>0&&(0,d.jsxs)("div",{className:"w-full mt-2",children:[(0,d.jsxs)("p",{className:"text-xs text-text-muted mb-2",children:["Disabled models (",h.length,"):"]}),(0,d.jsx)("div",{className:"flex flex-wrap gap-2",children:h.map(a=>(0,d.jsxs)("button",{onClick:()=>bG(a.id),className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-dashed border-black/10 dark:border-white/10 text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:"Restore model",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),a.id]},a.id))})]})]})})()]}),cf,"kiro"===w?(0,d.jsx)(j.KiroOAuthWrapper,{isOpen:M,providerInfo:bl,onSuccess:bZ,onClose:()=>N(!1)}):"cursor"===w?(0,d.jsx)(j.CursorAuthModal,{isOpen:M,onSuccess:bZ,onClose:()=>N(!1)}):"zed"===w?(0,d.jsx)(j.ZedAuthModal,{isOpen:M,providerInfo:bl,onSuccess:bZ,onClose:()=>N(!1)}):"gitlab"===w?(0,d.jsx)(j.GitLabAuthModal,{isOpen:M,providerInfo:bl,onSuccess:bZ,onClose:()=>N(!1)}):(0,d.jsx)(j.OAuthModal,{isOpen:M,provider:w,providerInfo:bl,onSuccess:bZ,onClose:()=>N(!1)}),"iflow"===w&&(0,d.jsx)(j.IFlowCookieModal,{isOpen:O,onSuccess:()=>{bL(),P(!1)},onClose:()=>P(!1)}),(0,d.jsx)(B,{isOpen:Q,provider:w,providerName:bl.name,isCompatible:bv,isAnthropic:bu,authType:bl?.authType,authHint:bl?.authHint,website:bl?.website,proxyPools:J,error:T,existingNames:y.map(a=>a.name).filter(Boolean),onSave:b$,onBulkDone:bL,onClose:()=>{U(""),S(!1)}}),(0,d.jsx)(j.EditConnectionModal,{isOpen:aa,connection:ag,proxyPools:J,onSave:b_,onClose:()=>ab(!1)}),bv&&(0,d.jsx)(D,{isOpen:ac,node:F,onSave:bM,onClose:()=>ad(!1),isAnthropic:bu}),!bv&&(0,d.jsx)(G,{isOpen:au,providerAlias:bA,providerDisplayAlias:bD,onSave:async(a,b,c)=>{await bU(a,b?.stt?"stt":"llm",bA,b,c),av(!1)},onClose:()=>av(!1)}),"codex"===w&&(0,d.jsx)(I,{isOpen:V,onClose:()=>W(!1),onSuccess:bL}),"grok-cli"===w&&(0,d.jsx)(L,{isOpen:X,onClose:()=>Z(!1),onSuccess:bL}),aO&&(0,d.jsx)($,{isOpen:!!aO,onClose:()=>aP(null),connection:aO,reactive:!0===aM.connections[aO.id],schedule:aM.schedules?.[aO.id]||null,onSave:a=>((a,{reactive:b,schedule:c})=>{bR({...aM,connections:{...aM.connections,[a]:b},schedules:{...aM.schedules,[a]:c}})})(aO.id,a)}),(0,d.jsx)(j.ConfirmModal,{isOpen:a0,onClose:()=>a1(!1),onConfirm:()=>{(a1(!1),bn)?bh():bj()},title:"Risk Notice",message:bl?.deprecationNotice,confirmText:"I Understand, Continue",cancelText:"Cancel",variant:"danger"}),(0,d.jsx)(j.ConfirmModal,{isOpen:!!aY,onClose:()=>aZ(null),onConfirm:aY?.onConfirm,title:aY?.title||"Confirm",message:aY?.message,variant:"danger"}),(0,d.jsx)(j.Modal,{isOpen:!!a$,onClose:()=>a_(null),title:a$?.title||"Notice",size:"sm",footer:(0,d.jsx)(d.Fragment,{children:(0,d.jsx)(j.Button,{variant:a$?.variant==="success"?"success":a$?.variant==="error"?"danger":"primary",onClick:()=>a_(null),children:"OK"})}),children:(0,d.jsxs)("div",{className:"flex items-start gap-3",children:[a$?.variant==="success"&&(0,d.jsx)("span",{className:"material-symbols-outlined text-[20px] text-green-500 mt-0.5 shrink-0",children:"check_circle"}),a$?.variant==="error"&&(0,d.jsx)("span",{className:"material-symbols-outlined text-[20px] text-red-500 mt-0.5 shrink-0",children:"error"}),a$?.variant==="info"&&(0,d.jsx)("span",{className:"material-symbols-outlined text-[20px] text-blue-500 mt-0.5 shrink-0",children:"info"}),(0,d.jsx)("p",{className:"text-sm text-text-muted leading-relaxed break-words",children:a$?.message})]})})]}):(0,d.jsxs)("div",{className:"text-center py-20",children:[(0,d.jsx)("p",{className:"text-text-muted",children:"Provider not found"}),(0,d.jsx)(h(),{href:"/dashboard/providers",className:"text-primary mt-4 inline-block",children:"Back to Providers"})]})}},48161:a=>{"use strict";a.exports=require("node:os")},51455:a=>{"use strict";a.exports=require("node:fs/promises")},52782:(a,b,c)=>{Promise.resolve().then(c.bind(c,47940))},53053:a=>{"use strict";a.exports=require("node:diagnostics_channel")},55009:(a,b,c)=>{"use strict";c.d(b,{y:()=>f});var d=c(71183),e=c(48444);function f(){let[a,b]=(0,d.useState)(()=>({})),[c,f]=(0,d.useState)(()=>({}));return{getCaps:(0,d.useCallback)(b=>(function(a,b,c){if(!c)return null;if(a[c])return a[c];let d=c.includes("/")?c.slice(c.indexOf("/")+1):c;if(b[d])return b[d];let f=c.includes("/")?c.slice(0,c.indexOf("/")):null,g=(0,e.nl)(f,d);return{vision:g.vision,search:g.search,reasoning:g.reasoning,contextWindow:g.contextWindow,maxOutput:g.maxOutput}})(a,c,b),[a,c])}}},55511:a=>{"use strict";a.exports=require("crypto")},55591:a=>{"use strict";a.exports=require("https")},57075:a=>{"use strict";a.exports=require("node:stream")},57975:a=>{"use strict";a.exports=require("node:util")},58335:(a,b,c)=>{"use strict";c.r(b),c.d(b,{__next_app__:()=>O,handler:()=>Q,routeModule:()=>P});var d=c(8824),e=c(59399),f=c(68673),g=c(34958),h=c(83760),i=c(9410),j=c(75881),k=c(29578),l=c(28112),m=c(71642),n=c(26352),o=c(68004),p=c(970),q=c(72647),r=c(261),s=c(45123),t=c(88768),u=c(26713),v=c(33610),w=c(82623),x=c(92819),y=c(7572),z=c(50932),A=c(14920),B=c(97908),C=c(86439),D=c(77068),E=c(86728),F=c(16492),G=c(92304),H=c(77257),I=c(70722),J=c(62576),K=c(43954),L=c(17891),M={};for(let a in G)0>["default","__next_app__","routeModule","handler"].indexOf(a)&&(M[a]=()=>G[a]);c.d(b,M);let N={children:["",{children:["(dashboard)",{children:["dashboard",{children:["providers",{children:["[id]",{children:["__PAGE__",{},{page:[()=>Promise.resolve().then(c.bind(c,63240)),"/home/runner/work/VansRouter/VansRouter/src/app/(dashboard)/dashboard/providers/[id]/page.js"]}]},{"global-error":[()=>Promise.resolve().then(c.bind(c,30145)),"/home/runner/work/VansRouter/VansRouter/src/app/global-error.js"]},["new"]]},{"global-error":[()=>Promise.resolve().then(c.bind(c,30145)),"/home/runner/work/VansRouter/VansRouter/src/app/global-error.js"]},[]]},{"global-error":[()=>Promise.resolve().then(c.bind(c,30145)),"/home/runner/work/VansRouter/VansRouter/src/app/global-error.js"]},[]]},{layout:[()=>Promise.resolve().then(c.bind(c,61643)),"/home/runner/work/VansRouter/VansRouter/src/app/(dashboard)/layout.js"],error:[()=>Promise.resolve().then(c.bind(c,35411)),"/home/runner/work/VansRouter/VansRouter/src/app/(dashboard)/error.js"],"global-error":[()=>Promise.resolve().then(c.bind(c,30145)),"/home/runner/work/VansRouter/VansRouter/src/app/global-error.js"],"not-found":[()=>Promise.resolve().then(c.t.bind(c,52170,23)),"next/dist/client/components/builtin/not-found.js"],forbidden:[()=>Promise.resolve().then(c.t.bind(c,36939,23)),"next/dist/client/components/builtin/forbidden.js"],unauthorized:[()=>Promise.resolve().then(c.t.bind(c,52158,23)),"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await Promise.resolve().then(c.bind(c,8453))).default(a)],apple:[],openGraph:[],twitter:[],manifest:"/manifest.webmanifest"}},[]]},{layout:[()=>Promise.resolve().then(c.bind(c,26478)),"/home/runner/work/VansRouter/VansRouter/src/app/layout.js"],error:[()=>Promise.resolve().then(c.bind(c,71503)),"/home/runner/work/VansRouter/VansRouter/src/app/error.js"],"global-error":[()=>Promise.resolve().then(c.bind(c,30145)),"/home/runner/work/VansRouter/VansRouter/src/app/global-error.js"],"not-found":[()=>Promise.resolve().then(c.t.bind(c,52170,23)),"next/dist/client/components/builtin/not-found.js"],forbidden:[()=>Promise.resolve().then(c.t.bind(c,36939,23)),"next/dist/client/components/builtin/forbidden.js"],unauthorized:[()=>Promise.resolve().then(c.t.bind(c,52158,23)),"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await Promise.resolve().then(c.bind(c,8453))).default(a)],apple:[],openGraph:[],twitter:[],manifest:"/manifest.webmanifest"}},[]]}.children,O={require:c,loadChunk:()=>Promise.resolve()},P=new d.AppPageRouteModule({definition:{kind:e.RouteKind.APP_PAGE,page:"/(dashboard)/dashboard/providers/[id]/page",pathname:"/dashboard/providers/[id]",bundlePath:"",filename:"",appPaths:[]},userland:{loaderTree:N},distDir:".next-cli-build",relativeProjectDir:""});async function Q(a,b,d){var M,R,S,T,U;d.requestMeta&&(0,h.setRequestMeta)(a,d.requestMeta),P.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let V=!!(0,h.getRequestMeta)(a,"minimalMode"),W="/(dashboard)/dashboard/providers/[id]/page";"/index"===W&&(W="/");let X=await P.prepare(a,b,{srcPage:W,multiZoneDraftMode:!1});if(!X)return b.statusCode=400,b.end("Bad Request"),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;let{buildId:Y,query:Z,params:$,pageIsDynamic:_,buildManifest:aa,nextFontManifest:ab,reactLoadableManifest:ac,serverActionsManifest:ad,clientReferenceManifest:ae,subresourceIntegrityManifest:af,prerenderManifest:ag,isDraftMode:ah,resolvedPathname:ai,revalidateOnlyGenerated:aj,routerServerContext:ak,nextConfig:al,parsedUrl:am,interceptionRoutePatterns:an,deploymentId:ao,clientAssetToken:ap}=X,aq=(0,r.normalizeAppPath)(W),{isOnDemandRevalidate:ar}=X,as=al.experimental.ppr&&!al.cacheComponents&&(0,K.isInterceptionRouteAppPath)(ai)?null:P.match(ai,ag),at=(null==as?void 0:as.route)??null,au=!!ag.routes[ai],av=a.headers["user-agent"]||"",aw=(0,u.getBotType)(av),ax=(0,q.isHtmlBotRequest)(a),ay=(0,h.getRequestMeta)(a,"isPrefetchRSCRequest")??"1"===a.headers[t.NEXT_ROUTER_PREFETCH_HEADER],az=(0,h.getRequestMeta)(a,"isRSCRequest")??(0,n.f)(a.headers[t.RSC_HEADER]),aA=(0,s.getIsPossibleServerAction)(a),aB=(0,m.checkIsAppPPREnabled)(al.experimental.ppr),aC=a.headers[y.NEXT_RESUME_STATE_LENGTH_HEADER];if(!(0,h.getRequestMeta)(a,"postponed")&&V&&aB&&aA&&aC&&"string"==typeof aC){let e=parseInt(aC,10),{maxPostponedStateSize:f,maxPostponedStateSizeBytes:g}=(0,E.getMaxPostponedStateSize)(al.experimental.maxPostponedStateSize);if(!isNaN(e)&&e>0){if(e>g)return b.statusCode=413,b.end((0,E.getPostponedStateExceededErrorMessage)(f)),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;let i="1 MB",j=(null==(U=al.experimental.serverActions)?void 0:U.bodySizeLimit)??i,k=e+(j!==i?c(2337).parse(j):1048576),l=await (0,E.readBodyWithSizeLimit)(a,k);if(null===l)return b.statusCode=413,b.end("Request body exceeded limit. To configure the body size limit for Server Actions, see: https://nextjs.org/docs/app/api-reference/next-config-js/serverActions#bodysizelimit"),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;if(l.length>=e){let b=l.subarray(0,e).toString("utf8");(0,h.addRequestMeta)(a,"postponed",b);let c=l.subarray(e);(0,h.addRequestMeta)(a,"actionBody",c)}else throw Object.defineProperty(Error(`invariant: expected ${e} bytes of postponed state but only received ${l.length} bytes`),"__NEXT_ERROR_CODE",{value:"E979",enumerable:!1,configurable:!0})}}if(!(0,h.getRequestMeta)(a,"postponed")&&aB&&"1"===a.headers[y.NEXT_RESUME_HEADER]&&"POST"===a.method){let{maxPostponedStateSize:c,maxPostponedStateSizeBytes:e}=(0,E.getMaxPostponedStateSize)(al.experimental.maxPostponedStateSize),f=await (0,E.readBodyWithSizeLimit)(a,e);if(null===f)return b.statusCode=413,b.end((0,E.getPostponedStateExceededErrorMessage)(c)),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;let g=f.toString("utf8");(0,h.addRequestMeta)(a,"postponed",g)}let aD=!0===P.isDev||!0===al.experimental.exposeTestingApiInProductionBuild,aE=aD&&("1"===a.headers[t.NEXT_INSTANT_PREFETCH_HEADER]||!(0,n.f)(a.headers[t.RSC_HEADER])&&"string"==typeof a.headers.cookie&&a.headers.cookie.includes(t.NEXT_INSTANT_TEST_COOKIE+"=")),aF=(aB||aE)&&((null==(M=ag.routes[aq]??ag.dynamicRoutes[aq])?void 0:M.renderingMode)==="PARTIALLY_STATIC"||aE&&(aD||(null==ak?void 0:ak.experimentalTestProxy)===!0)),aG=aE&&aF,aH=aG&&!0===P.isDev,aI=!1,aJ=aF?(0,h.getRequestMeta)(a,"postponed"):void 0,aK=null==(R=ag.routes[ai])?void 0:R.prefetchDataRoute,aL=aF&&az&&!ay&&!aK;V&&(aL=aL&&!!aJ);let aM=(0,h.getRequestMeta)(a,"segmentPrefetchRSCRequest"),aN=(!aw||!aF)&&(!av||(0,q.shouldServeStreamingMetadata)(av,al.htmlLimitedBots)),aO=!!((at||au||ag.routes[aq])&&!(aw&&aF)),aP=aF&&!0===al.cacheComponents,aQ=!0===P.isDev||!aO||"string"==typeof aJ||(aP&&(0,h.getRequestMeta)(a,"onCacheEntryV2")?aL&&!V:aL),aR=!!aw&&aF,aS=(null==at?void 0:at.remainingPrerenderableParams)??[],aT=(null==at?void 0:at.fallback)===null&&((null==(S=at.fallbackRootParams)?void 0:S.length)??0)>0,aU=null;if(!ah&&aO&&!aQ&&!aA&&!aJ&&!aL){let a=as?"string"==typeof(null==at?void 0:at.fallback)?at.fallback:as.source:null;if(!0===al.experimental.partialFallbacks&&a&&(null==at?void 0:at.fallbackRouteParams)&&!aT){if(aS.length>0){let b,c=(b=new Map(aS.map(a=>[a.paramName,a])),a.split("/").map(a=>{let c=(0,L.getSegmentParam)(a);if(!c)return a;let d=b.get(c.paramName);if(!d)return a;let e=null==$?void 0:$[d.paramName];if(!e)return a;let f=Array.isArray(e)?e.map(a=>encodeURIComponent(a)).join("/"):encodeURIComponent(e);return a.replace((0,o.buildDynamicSegmentPlaceholder)(d),f)}).join("/")||"/");aU=c!==a?c:null}}else aU=ai}let aV=aU;!aV&&(P.isDev||aO&&_&&(null==at?void 0:at.fallbackRouteParams)&&!aA)&&(aV=ai),P.isDev||ah||!aO||!az||aL||(0,k.d)(a.headers);let aW={...G,tree:N,handler:Q,routeModule:P,__next_app__:O};ad&&ae&&(0,p.setManifestsSingleton)({page:W,clientReferenceManifest:ae,serverActionsManifest:ad});let aX=a.method||"GET",aY=(0,g.getTracer)(),aZ=aY.getActiveScopeSpan(),a$=!!(null==ak?void 0:ak.isWrappedByNextServer),a_=!0===al.experimental.partialFallbacks&&aS.length>0?(null==at||null==(T=at.fallbackRouteParams)?void 0:T.filter(a=>!aS.some(b=>b.paramName===a.paramName)))??[]:[],a0=async()=>((null==ak?void 0:ak.render404)?await ak.render404(a,b,am,!1):b.end("This page could not be found"),null);try{let k,m=P.getVaryHeader(ai,an);b.setHeader("Vary",m);let n=async(c,d)=>{let e=new l.NodeNextRequest(a),f=new l.NodeNextResponse(b);return P.render(e,f,d).finally(()=>{if(!c)return;c.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let a=aY.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==i.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let d=a.get("next.route");if(d){let a=`${aX} ${d}`;c.setAttributes({"next.route":d,"http.route":d,"next.span_name":a}),c.updateName(a),k&&k!==c&&(k.setAttribute("http.route",d),k.updateName(a))}else c.updateName(`${aX} ${W}`)})},p=(0,h.getRequestMeta)(a,"incrementalCache")||await P.getIncrementalCache(a,al,ag,V);null==p||p.resetRequestCache(),globalThis.__incrementalCache=p;let q=async({span:e,postponed:f,fallbackRouteParams:g,forceStaticRender:i})=>{let k={query:Z,params:$,page:aq,sharedContext:{buildId:Y,deploymentId:ao,clientAssetToken:ap},serverComponentsHmrCache:(0,h.getRequestMeta)(a,"serverComponentsHmrCache"),fallbackRouteParams:g,renderOpts:{App:()=>null,Document:()=>null,pageConfig:{},ComponentMod:aW,Component:(0,j.T)(aW),params:$,routeModule:P,page:W,postponed:f,shouldWaitOnAllReady:aR,serveStreamingMetadata:aN,supportsDynamicResponse:"string"==typeof f||aQ,buildManifest:aa,nextFontManifest:ab,reactLoadableManifest:ac,subresourceIntegrityManifest:af,setCacheStatus:null==ak?void 0:ak.setCacheStatus,setIsrStatus:null==ak?void 0:ak.setIsrStatus,setReactDebugChannel:null==ak?void 0:ak.setReactDebugChannel,sendErrorsToBrowser:null==ak?void 0:ak.sendErrorsToBrowser,dir:c(33873).join(process.cwd(),P.relativeProjectDir),isDraftMode:ah,botType:aw,isOnDemandRevalidate:ar,isPossibleServerAction:aA,assetPrefix:al.assetPrefix,nextConfigOutput:al.output,crossOrigin:al.crossOrigin,trailingSlash:al.trailingSlash,images:al.images,previewProps:ag.preview,enableTainting:al.experimental.taint,htmlLimitedBots:al.htmlLimitedBots,reactMaxHeadersLength:al.reactMaxHeadersLength,multiZoneDraftMode:!1,incrementalCache:p,cacheLifeProfiles:al.cacheLife,basePath:al.basePath,serverActions:al.experimental.serverActions,logServerFunctions:"object"==typeof al.logging&&!!al.logging.serverFunctions,...aG||aH||aI?{isBuildTimePrerendering:!0,supportsDynamicResponse:!1,isStaticGeneration:!0,isDebugDynamicAccesses:aH}:{},cacheComponents:!!al.cacheComponents,experimental:{isRoutePPREnabled:aF,expireTime:al.expireTime,staleTimes:al.experimental.staleTimes,dynamicOnHover:!!al.experimental.dynamicOnHover,optimisticRouting:!!al.experimental.optimisticRouting,inlineCss:!!al.experimental.inlineCss,prefetchInlining:al.experimental.prefetchInlining??!1,authInterrupts:!!al.experimental.authInterrupts,cachedNavigations:!!al.experimental.cachedNavigations,clientTraceMetadata:al.experimental.clientTraceMetadata||[],clientParamParsingOrigins:al.experimental.clientParamParsingOrigins,maxPostponedStateSizeBytes:(0,D.parseMaxPostponedStateSize)(al.experimental.maxPostponedStateSize)},waitUntil:d.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:()=>{},onInstrumentationRequestError:(b,c,d,e)=>P.onRequestError(a,b,d,e,ak),err:(0,h.getRequestMeta)(a,"invokeError")}};i&&(k.renderOpts.supportsDynamicResponse=!1);let l=await n(e,k),{metadata:m}=l,{cacheControl:o,headers:q={},fetchTags:r,fetchMetrics:s}=m;if(r&&(q[y.NEXT_CACHE_TAGS_HEADER]=r),a.fetchMetrics=s,aO&&(null==o?void 0:o.revalidate)===0&&!P.isDev&&!aF){let a=m.staticBailoutInfo,b=Object.defineProperty(Error(`Page changed from static to dynamic at runtime ${ai}${(null==a?void 0:a.description)?`, reason: ${a.description}`:""}
28
- see more here https://nextjs.org/docs/messages/app-static-to-dynamic-error`),"__NEXT_ERROR_CODE",{value:"E132",enumerable:!1,configurable:!0});if(null==a?void 0:a.stack){let c=a.stack;b.stack=b.message+c.substring(c.indexOf("\n"))}throw b}return{value:{kind:v.CachedRouteKind.APP_PAGE,html:l,headers:q,rscData:m.flightData,postponed:m.postponed,status:m.statusCode,segmentData:m.segmentData},cacheControl:o}},r=async({hasResolved:c,previousCacheEntry:g,isRevalidating:i,span:j,forceStaticRender:k=!1})=>{let l=!1===P.isDev,m=c||b.writableEnded;try{var n;let f;if(ar&&aj&&!g&&!V)return(null==ak?void 0:ak.render404)?await ak.render404(a,b):(b.statusCode=404,b.end("This page could not be found")),null;if(at&&(f=(0,w.parseFallbackField)(at.fallback)),!0===al.experimental.partialFallbacks&&(null==at?void 0:at.fallback)===null&&!aT&&aS.length>0&&(f=w.FallbackMode.PRERENDER),f===w.FallbackMode.PRERENDER&&(0,u.isBot)(av)&&(!aF||ax)&&(f=w.FallbackMode.BLOCKING_STATIC_RENDER),(null==g?void 0:g.isStale)===-1&&(ar=!0),ar&&(f!==w.FallbackMode.NOT_FOUND||g)&&(f=w.FallbackMode.BLOCKING_STATIC_RENDER),!V&&f!==w.FallbackMode.BLOCKING_STATIC_RENDER&&aV&&!m&&!ah&&_&&(l||!au)){if((l||at)&&f===w.FallbackMode.NOT_FOUND){if(al.adapterPath)return await a0();throw new C.NoFallbackError}if(aF&&(al.cacheComponents?!aL:!az)){let b=l&&"string"==typeof(null==at?void 0:at.fallback)?at.fallback:aq,f=(l||aG)&&(null==at?void 0:at.fallbackRouteParams)?(0,o.createOpaqueFallbackRouteParams)(at.fallbackRouteParams):aI?(0,o.getFallbackRouteParams)(aq,P):null;aG&&f&&(0,h.addRequestMeta)(a,"fallbackParams",f);let g=await P.handleResponse({cacheKey:b,req:a,nextConfig:al,routeKind:e.RouteKind.APP_PAGE,isFallback:!0,prerenderManifest:ag,isRoutePPREnabled:aF,responseGenerator:async()=>q({span:j,postponed:void 0,fallbackRouteParams:f,forceStaticRender:!0}),waitUntil:d.waitUntil,isMinimalMode:V});if(null===g)return null;if(g)return V||!aF||!(aS.length>0)||!0!==al.experimental.partialFallbacks||!aU||!p||ar||aI||aD||aE||ay||(0,J.scheduleOnNextTick)(async()=>{let b=P.getResponseCache(a);try{await b.revalidate(aU,p,aF,!1,a=>q({span:a.span,postponed:void 0,fallbackRouteParams:a_.length>0?(0,o.createOpaqueFallbackRouteParams)(a_):null,forceStaticRender:!0}),null,c,d.waitUntil)}catch(a){console.error("Error revalidating the page in the background",a)}}),delete g.cacheControl,g}}let s=ar||i||!aJ?void 0:aJ;if(aP&&!V&&p&&(aL||aA)&&!k){let b=await p.get(ai,{kind:v.IncrementalCacheKind.APP_PAGE,isRoutePPREnabled:!0,isFallback:!1});b&&b.value&&b.value.kind===v.CachedRouteKind.APP_PAGE&&(s=b.value.postponed,b&&(-1===b.isStale||!0===b.isStale)&&(0,J.scheduleOnNextTick)(async()=>{let b=P.getResponseCache(a);try{await b.revalidate(ai,p,aF,!1,a=>r({...a,forceStaticRender:!0}),null,c,d.waitUntil)}catch(a){console.error("Error revalidating the page in the background",a)}}))}if((aG||aH)&&void 0!==s)return{cacheControl:{revalidate:1,expire:void 0},value:{kind:v.CachedRouteKind.PAGES,html:x.default.EMPTY,pageData:{},headers:void 0,status:void 0}};let t=!P.isDev&&_&&(null==at?void 0:at.fallbackRouteParams)?(0,o.getPlaceholderFallbackRouteParams)($,at.fallbackRouteParams):null,y=t&&t.length>0?t:null==at?void 0:at.fallbackRouteParams,z=null!=t&&t.length>0,A=null;if(al.cacheComponents&&(null==at?void 0:at.fallbackRouteParams)){let b=(0,h.getRequestMeta)(a,"resolvedRouteParamKeys");b&&b.size>0&&(A=at.fallbackRouteParams.filter(a=>!b.has(a.paramName)))}let B=(l&&(0,h.getRequestMeta)(a,"renderFallbackShell")||z||aG&&!au)&&y?(0,o.createOpaqueFallbackRouteParams)(y):A&&A.length>0&&A.length<((null==at||null==(n=at.fallbackRouteParams)?void 0:n.length)??0)?(0,o.createOpaqueFallbackRouteParams)(A):aI?(0,o.getFallbackRouteParams)(aq,P):null;if((l||aG)&&al.cacheComponents&&!au&&(null==at?void 0:at.fallbackRouteParams)){let b=(0,o.createOpaqueFallbackRouteParams)(y??at.fallbackRouteParams);b&&(0,h.addRequestMeta)(a,"fallbackParams",b)}return q({span:j,postponed:s,fallbackRouteParams:B,forceStaticRender:k})}catch(b){throw(null==g?void 0:g.isStale)&&await P.onRequestError(a,b,{routerKind:"App Router",routePath:W,routeType:"render",revalidateReason:(0,f.c)({isStaticGeneration:aO,isOnDemandRevalidate:ar})},!1,ak),b}},s=async c=>{var f,g,i,j,k,l;let m,n=await P.handleResponse({cacheKey:aU,responseGenerator:a=>r({span:c,...a}),routeKind:e.RouteKind.APP_PAGE,isOnDemandRevalidate:ar,isRoutePPREnabled:aF,req:a,nextConfig:al,prerenderManifest:ag,waitUntil:d.waitUntil,isMinimalMode:V});if(ah&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate"),P.isDev&&b.setHeader("Cache-Control","no-cache, must-revalidate"),!n){if(aU)throw Object.defineProperty(Error("invariant: cache entry required but not generated"),"__NEXT_ERROR_CODE",{value:"E62",enumerable:!1,configurable:!0});return null}if((null==(f=n.value)?void 0:f.kind)!==v.CachedRouteKind.APP_PAGE)throw Object.defineProperty(Error(`Invariant app-page handler received invalid cache entry ${null==(i=n.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E707",enumerable:!1,configurable:!0});let o="string"==typeof n.value.postponed;az&&!aA&&ao&&b.setHeader(y.NEXT_NAV_DEPLOYMENT_ID_HEADER,ao),aO&&!aL&&(!o||ay)&&(V||b.setHeader("x-nextjs-cache",ar?"REVALIDATED":n.isMiss?"MISS":n.isStale?"STALE":"HIT"),b.setHeader(t.NEXT_IS_PRERENDER_HEADER,"1"));let{value:p}=n;if(aJ)m={revalidate:0,expire:void 0};else if(aL)m={revalidate:0,expire:void 0};else if(!P.isDev)if(ah)m={revalidate:0,expire:void 0};else if(aO){if(n.cacheControl)if("number"==typeof n.cacheControl.revalidate){if(n.cacheControl.revalidate<1)throw Object.defineProperty(Error(`Invalid revalidate configuration provided: ${n.cacheControl.revalidate} < 1`),"__NEXT_ERROR_CODE",{value:"E22",enumerable:!1,configurable:!0});m={revalidate:n.cacheControl.revalidate,expire:(null==(j=n.cacheControl)?void 0:j.expire)??al.expireTime}}else m={revalidate:y.CACHE_ONE_YEAR_SECONDS,expire:void 0}}else b.getHeader("Cache-Control")||(m={revalidate:0,expire:void 0});if(n.cacheControl=m,"string"==typeof aM&&(null==p?void 0:p.kind)===v.CachedRouteKind.APP_PAGE&&p.segmentData){b.setHeader(t.NEXT_DID_POSTPONE_HEADER,"2");let c=null==(k=p.headers)?void 0:k[y.NEXT_CACHE_TAGS_HEADER];V&&aO&&c&&"string"==typeof c&&b.setHeader(y.NEXT_CACHE_TAGS_HEADER,c);let d=p.segmentData.get(aM);return void 0!==d?(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:x.default.fromStatic(d,t.RSC_CONTENT_TYPE_HEADER),cacheControl:n.cacheControl}):(b.statusCode=204,(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:x.default.EMPTY,cacheControl:n.cacheControl}))}let s=aP?(0,h.getRequestMeta)(a,"onCacheEntryV2")??(0,h.getRequestMeta)(a,"onCacheEntry"):(0,h.getRequestMeta)(a,"onCacheEntry");if(s){let b=(0,h.getRequestMeta)(a,"initURL")??a.url,c=b?(null==(l=(0,F.parseUrl)(b))?void 0:l.pathname)??b:void 0;if(await s(n,{url:c}))return null}if(p.headers){let a={...p.headers};for(let[c,d]of(V&&aO||delete a[y.NEXT_CACHE_TAGS_HEADER],Object.entries(a)))if(void 0!==d)if(Array.isArray(d))for(let a of d)b.appendHeader(c,a);else"number"==typeof d&&(d=d.toString()),b.appendHeader(c,d)}let u=null==(g=p.headers)?void 0:g[y.NEXT_CACHE_TAGS_HEADER];if(V&&aO&&u&&"string"==typeof u&&b.setHeader(y.NEXT_CACHE_TAGS_HEADER,u),!p.status||az&&aF||(b.statusCode=p.status),!V&&p.status&&H.RedirectStatusCode[p.status]&&az&&(b.statusCode=200),o&&!aL&&b.setHeader(t.NEXT_DID_POSTPONE_HEADER,"1"),az&&!ah){if(void 0===p.rscData){if(p.html.contentType!==t.RSC_CONTENT_TYPE_HEADER)if(al.cacheComponents)return b.statusCode=404,(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:x.default.EMPTY,cacheControl:n.cacheControl});else throw Object.defineProperty(new I.InvariantError(`Expected RSC response, got ${p.html.contentType}`),"__NEXT_ERROR_CODE",{value:"E789",enumerable:!1,configurable:!0});return(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:p.html,cacheControl:n.cacheControl})}return(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:x.default.fromStatic(p.rscData,t.RSC_CONTENT_TYPE_HEADER),cacheControl:n.cacheControl})}let w=p.html;if(aE&&aG){let c=!0===P.isDev?crypto.randomUUID():null;return w.pipeThrough(await (0,A.createInstantTestScriptInsertionTransformStream)(c)),(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:w,cacheControl:{revalidate:0,expire:void 0}})}if(!o||V||az)return(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:w,cacheControl:n.cacheControl});if(aG||aH)return w.push(new ReadableStream({start(a){a.enqueue(z.ENCODED_TAGS.CLOSED.BODY_AND_HTML),a.close()}})),(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:w,cacheControl:{revalidate:0,expire:void 0}});let C=new TransformStream;return w.push(C.readable),q({span:c,postponed:p.postponed,fallbackRouteParams:null,forceStaticRender:!1}).then(async a=>{var b,c;if(!a)throw Object.defineProperty(Error("Invariant: expected a result to be returned"),"__NEXT_ERROR_CODE",{value:"E463",enumerable:!1,configurable:!0});if((null==(b=a.value)?void 0:b.kind)!==v.CachedRouteKind.APP_PAGE)throw Object.defineProperty(Error(`Invariant: expected a page response, got ${null==(c=a.value)?void 0:c.kind}`),"__NEXT_ERROR_CODE",{value:"E305",enumerable:!1,configurable:!0});await a.value.html.pipeTo(C.writable)}).catch(a=>{C.writable.abort(a).catch(a=>{console.error("couldn't abort transformer",a)})}),(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:w,cacheControl:{revalidate:0,expire:void 0}})};if(!a$||!aZ)return k=aY.getActiveScopeSpan(),await aY.withPropagatedContext(a.headers,()=>aY.trace(i.BaseServerSpan.handleRequest,{spanName:`${aX} ${W}`,kind:g.SpanKind.SERVER,attributes:{"http.method":aX,"http.target":a.url}},s),void 0,!a$);await s(aZ)}catch(b){throw b instanceof C.NoFallbackError||await P.onRequestError(a,b,{routerKind:"App Router",routePath:W,routeType:"render",revalidateReason:(0,f.c)({isStaticGeneration:aO,isOnDemandRevalidate:ar})},!1,ak),b}}},58500:a=>{"use strict";a.exports=require("node:timers/promises")},61643:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>f});var d=c(1904),e=c(88844);function f({children:a}){return(0,d.jsx)(e.DashboardLayout,{children:a})}},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},63240:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>d});let d=(0,c(35732).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/home/runner/work/VansRouter/VansRouter/src/app/(dashboard)/dashboard/providers/[id]/page.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/runner/work/VansRouter/VansRouter/src/app/(dashboard)/dashboard/providers/[id]/page.js","default")},66694:(a,b,c)=>{Promise.resolve().then(c.bind(c,63240))},70722:a=>{"use strict";a.exports=require("next/dist/shared/lib/invariant-error")},71553:a=>{"use strict";a.exports=require("node:dns/promises")},71622:a=>{"use strict";a.exports=import("open")},72271:a=>{"use strict";a.exports=require("@aws-sdk/credential-providers")},73024:a=>{"use strict";a.exports=require("node:fs")},73136:a=>{"use strict";a.exports=require("node:url")},73429:a=>{"use strict";a.exports=require("node:util/types")},73496:a=>{"use strict";a.exports=require("http2")},74075:a=>{"use strict";a.exports=require("zlib")},75919:a=>{"use strict";a.exports=require("node:worker_threads")},76760:a=>{"use strict";a.exports=require("node:path")},77030:a=>{"use strict";a.exports=require("node:net")},77068:a=>{"use strict";a.exports=require("next/dist/shared/lib/size-limit")},77598:a=>{"use strict";a.exports=require("node:crypto")},78474:a=>{"use strict";a.exports=require("node:events")},79551:a=>{"use strict";a.exports=require("url")},79646:a=>{"use strict";a.exports=require("child_process")},79822:(a,b,c)=>{a.exports=c(84965)()},81630:a=>{"use strict";a.exports=require("http")},84965:(a,b,c)=>{"use strict";var d=c(43370);function e(){}function f(){}f.resetWarningCache=e,a.exports=function(){function a(a,b,c,e,f,g){if(g!==d){var h=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}}function b(){return a}a.isRequired=a;var c={array:a,bigint:a,bool:a,func:a,number:a,object:a,string:a,symbol:a,any:a,arrayOf:b,element:a,elementType:a,instanceOf:b,node:a,objectOf:b,oneOf:b,oneOfType:b,shape:b,exact:b,checkPropTypes:f,resetWarningCache:e};return c.PropTypes=c,c}},85873:(a,b,c)=>{Promise.resolve().then(c.bind(c,45961))},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87550:a=>{"use strict";a.exports=require("better-sqlite3")},87997:a=>{"use strict";a.exports=require("node:timers")},88844:(a,b,c)=>{let{createProxy:d}=c(78291);a.exports=d("/home/runner/work/VansRouter/VansRouter/src/shared/components/index.js")},91645:a=>{"use strict";a.exports=require("net")},94735:a=>{"use strict";a.exports=require("events")},95601:(a,b,c)=>{Promise.resolve().then(c.bind(c,35411))},97530:a=>{"use strict";a.exports=require("node:sqlite")},98125:a=>{"use strict";a.exports=require("bun:sqlite")}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[1348,2136,3176,506,4387,1685,1691,7863,7010,9974,9462,4121,575,6385,5302,9536,228],()=>b(b.s=58335));module.exports=c})();
28
+ see more here https://nextjs.org/docs/messages/app-static-to-dynamic-error`),"__NEXT_ERROR_CODE",{value:"E132",enumerable:!1,configurable:!0});if(null==a?void 0:a.stack){let c=a.stack;b.stack=b.message+c.substring(c.indexOf("\n"))}throw b}return{value:{kind:v.CachedRouteKind.APP_PAGE,html:l,headers:q,rscData:m.flightData,postponed:m.postponed,status:m.statusCode,segmentData:m.segmentData},cacheControl:o}},r=async({hasResolved:c,previousCacheEntry:g,isRevalidating:i,span:j,forceStaticRender:k=!1})=>{let l=!1===P.isDev,m=c||b.writableEnded;try{var n;let f;if(ar&&aj&&!g&&!V)return(null==ak?void 0:ak.render404)?await ak.render404(a,b):(b.statusCode=404,b.end("This page could not be found")),null;if(at&&(f=(0,w.parseFallbackField)(at.fallback)),!0===al.experimental.partialFallbacks&&(null==at?void 0:at.fallback)===null&&!aT&&aS.length>0&&(f=w.FallbackMode.PRERENDER),f===w.FallbackMode.PRERENDER&&(0,u.isBot)(av)&&(!aF||ax)&&(f=w.FallbackMode.BLOCKING_STATIC_RENDER),(null==g?void 0:g.isStale)===-1&&(ar=!0),ar&&(f!==w.FallbackMode.NOT_FOUND||g)&&(f=w.FallbackMode.BLOCKING_STATIC_RENDER),!V&&f!==w.FallbackMode.BLOCKING_STATIC_RENDER&&aV&&!m&&!ah&&_&&(l||!au)){if((l||at)&&f===w.FallbackMode.NOT_FOUND){if(al.adapterPath)return await a0();throw new C.NoFallbackError}if(aF&&(al.cacheComponents?!aL:!az)){let b=l&&"string"==typeof(null==at?void 0:at.fallback)?at.fallback:aq,f=(l||aG)&&(null==at?void 0:at.fallbackRouteParams)?(0,o.createOpaqueFallbackRouteParams)(at.fallbackRouteParams):aI?(0,o.getFallbackRouteParams)(aq,P):null;aG&&f&&(0,h.addRequestMeta)(a,"fallbackParams",f);let g=await P.handleResponse({cacheKey:b,req:a,nextConfig:al,routeKind:e.RouteKind.APP_PAGE,isFallback:!0,prerenderManifest:ag,isRoutePPREnabled:aF,responseGenerator:async()=>q({span:j,postponed:void 0,fallbackRouteParams:f,forceStaticRender:!0}),waitUntil:d.waitUntil,isMinimalMode:V});if(null===g)return null;if(g)return V||!aF||!(aS.length>0)||!0!==al.experimental.partialFallbacks||!aU||!p||ar||aI||aD||aE||ay||(0,J.scheduleOnNextTick)(async()=>{let b=P.getResponseCache(a);try{await b.revalidate(aU,p,aF,!1,a=>q({span:a.span,postponed:void 0,fallbackRouteParams:a_.length>0?(0,o.createOpaqueFallbackRouteParams)(a_):null,forceStaticRender:!0}),null,c,d.waitUntil)}catch(a){console.error("Error revalidating the page in the background",a)}}),delete g.cacheControl,g}}let s=ar||i||!aJ?void 0:aJ;if(aP&&!V&&p&&(aL||aA)&&!k){let b=await p.get(ai,{kind:v.IncrementalCacheKind.APP_PAGE,isRoutePPREnabled:!0,isFallback:!1});b&&b.value&&b.value.kind===v.CachedRouteKind.APP_PAGE&&(s=b.value.postponed,b&&(-1===b.isStale||!0===b.isStale)&&(0,J.scheduleOnNextTick)(async()=>{let b=P.getResponseCache(a);try{await b.revalidate(ai,p,aF,!1,a=>r({...a,forceStaticRender:!0}),null,c,d.waitUntil)}catch(a){console.error("Error revalidating the page in the background",a)}}))}if((aG||aH)&&void 0!==s)return{cacheControl:{revalidate:1,expire:void 0},value:{kind:v.CachedRouteKind.PAGES,html:x.default.EMPTY,pageData:{},headers:void 0,status:void 0}};let t=!P.isDev&&_&&(null==at?void 0:at.fallbackRouteParams)?(0,o.getPlaceholderFallbackRouteParams)($,at.fallbackRouteParams):null,y=t&&t.length>0?t:null==at?void 0:at.fallbackRouteParams,z=null!=t&&t.length>0,A=null;if(al.cacheComponents&&(null==at?void 0:at.fallbackRouteParams)){let b=(0,h.getRequestMeta)(a,"resolvedRouteParamKeys");b&&b.size>0&&(A=at.fallbackRouteParams.filter(a=>!b.has(a.paramName)))}let B=(l&&(0,h.getRequestMeta)(a,"renderFallbackShell")||z||aG&&!au)&&y?(0,o.createOpaqueFallbackRouteParams)(y):A&&A.length>0&&A.length<((null==at||null==(n=at.fallbackRouteParams)?void 0:n.length)??0)?(0,o.createOpaqueFallbackRouteParams)(A):aI?(0,o.getFallbackRouteParams)(aq,P):null;if((l||aG)&&al.cacheComponents&&!au&&(null==at?void 0:at.fallbackRouteParams)){let b=(0,o.createOpaqueFallbackRouteParams)(y??at.fallbackRouteParams);b&&(0,h.addRequestMeta)(a,"fallbackParams",b)}return q({span:j,postponed:s,fallbackRouteParams:B,forceStaticRender:k})}catch(b){throw(null==g?void 0:g.isStale)&&await P.onRequestError(a,b,{routerKind:"App Router",routePath:W,routeType:"render",revalidateReason:(0,f.c)({isStaticGeneration:aO,isOnDemandRevalidate:ar})},!1,ak),b}},s=async c=>{var f,g,i,j,k,l;let m,n=await P.handleResponse({cacheKey:aU,responseGenerator:a=>r({span:c,...a}),routeKind:e.RouteKind.APP_PAGE,isOnDemandRevalidate:ar,isRoutePPREnabled:aF,req:a,nextConfig:al,prerenderManifest:ag,waitUntil:d.waitUntil,isMinimalMode:V});if(ah&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate"),P.isDev&&b.setHeader("Cache-Control","no-cache, must-revalidate"),!n){if(aU)throw Object.defineProperty(Error("invariant: cache entry required but not generated"),"__NEXT_ERROR_CODE",{value:"E62",enumerable:!1,configurable:!0});return null}if((null==(f=n.value)?void 0:f.kind)!==v.CachedRouteKind.APP_PAGE)throw Object.defineProperty(Error(`Invariant app-page handler received invalid cache entry ${null==(i=n.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E707",enumerable:!1,configurable:!0});let o="string"==typeof n.value.postponed;az&&!aA&&ao&&b.setHeader(y.NEXT_NAV_DEPLOYMENT_ID_HEADER,ao),aO&&!aL&&(!o||ay)&&(V||b.setHeader("x-nextjs-cache",ar?"REVALIDATED":n.isMiss?"MISS":n.isStale?"STALE":"HIT"),b.setHeader(t.NEXT_IS_PRERENDER_HEADER,"1"));let{value:p}=n;if(aJ)m={revalidate:0,expire:void 0};else if(aL)m={revalidate:0,expire:void 0};else if(!P.isDev)if(ah)m={revalidate:0,expire:void 0};else if(aO){if(n.cacheControl)if("number"==typeof n.cacheControl.revalidate){if(n.cacheControl.revalidate<1)throw Object.defineProperty(Error(`Invalid revalidate configuration provided: ${n.cacheControl.revalidate} < 1`),"__NEXT_ERROR_CODE",{value:"E22",enumerable:!1,configurable:!0});m={revalidate:n.cacheControl.revalidate,expire:(null==(j=n.cacheControl)?void 0:j.expire)??al.expireTime}}else m={revalidate:y.CACHE_ONE_YEAR_SECONDS,expire:void 0}}else b.getHeader("Cache-Control")||(m={revalidate:0,expire:void 0});if(n.cacheControl=m,"string"==typeof aM&&(null==p?void 0:p.kind)===v.CachedRouteKind.APP_PAGE&&p.segmentData){b.setHeader(t.NEXT_DID_POSTPONE_HEADER,"2");let c=null==(k=p.headers)?void 0:k[y.NEXT_CACHE_TAGS_HEADER];V&&aO&&c&&"string"==typeof c&&b.setHeader(y.NEXT_CACHE_TAGS_HEADER,c);let d=p.segmentData.get(aM);return void 0!==d?(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:x.default.fromStatic(d,t.RSC_CONTENT_TYPE_HEADER),cacheControl:n.cacheControl}):(b.statusCode=204,(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:x.default.EMPTY,cacheControl:n.cacheControl}))}let s=aP?(0,h.getRequestMeta)(a,"onCacheEntryV2")??(0,h.getRequestMeta)(a,"onCacheEntry"):(0,h.getRequestMeta)(a,"onCacheEntry");if(s){let b=(0,h.getRequestMeta)(a,"initURL")??a.url,c=b?(null==(l=(0,F.parseUrl)(b))?void 0:l.pathname)??b:void 0;if(await s(n,{url:c}))return null}if(p.headers){let a={...p.headers};for(let[c,d]of(V&&aO||delete a[y.NEXT_CACHE_TAGS_HEADER],Object.entries(a)))if(void 0!==d)if(Array.isArray(d))for(let a of d)b.appendHeader(c,a);else"number"==typeof d&&(d=d.toString()),b.appendHeader(c,d)}let u=null==(g=p.headers)?void 0:g[y.NEXT_CACHE_TAGS_HEADER];if(V&&aO&&u&&"string"==typeof u&&b.setHeader(y.NEXT_CACHE_TAGS_HEADER,u),!p.status||az&&aF||(b.statusCode=p.status),!V&&p.status&&H.RedirectStatusCode[p.status]&&az&&(b.statusCode=200),o&&!aL&&b.setHeader(t.NEXT_DID_POSTPONE_HEADER,"1"),az&&!ah){if(void 0===p.rscData){if(p.html.contentType!==t.RSC_CONTENT_TYPE_HEADER)if(al.cacheComponents)return b.statusCode=404,(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:x.default.EMPTY,cacheControl:n.cacheControl});else throw Object.defineProperty(new I.InvariantError(`Expected RSC response, got ${p.html.contentType}`),"__NEXT_ERROR_CODE",{value:"E789",enumerable:!1,configurable:!0});return(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:p.html,cacheControl:n.cacheControl})}return(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:x.default.fromStatic(p.rscData,t.RSC_CONTENT_TYPE_HEADER),cacheControl:n.cacheControl})}let w=p.html;if(aE&&aG){let c=!0===P.isDev?crypto.randomUUID():null;return w.pipeThrough(await (0,A.createInstantTestScriptInsertionTransformStream)(c)),(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:w,cacheControl:{revalidate:0,expire:void 0}})}if(!o||V||az)return(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:w,cacheControl:n.cacheControl});if(aG||aH)return w.push(new ReadableStream({start(a){a.enqueue(z.ENCODED_TAGS.CLOSED.BODY_AND_HTML),a.close()}})),(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:w,cacheControl:{revalidate:0,expire:void 0}});let C=new TransformStream;return w.push(C.readable),q({span:c,postponed:p.postponed,fallbackRouteParams:null,forceStaticRender:!1}).then(async a=>{var b,c;if(!a)throw Object.defineProperty(Error("Invariant: expected a result to be returned"),"__NEXT_ERROR_CODE",{value:"E463",enumerable:!1,configurable:!0});if((null==(b=a.value)?void 0:b.kind)!==v.CachedRouteKind.APP_PAGE)throw Object.defineProperty(Error(`Invariant: expected a page response, got ${null==(c=a.value)?void 0:c.kind}`),"__NEXT_ERROR_CODE",{value:"E305",enumerable:!1,configurable:!0});await a.value.html.pipeTo(C.writable)}).catch(a=>{C.writable.abort(a).catch(a=>{console.error("couldn't abort transformer",a)})}),(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:w,cacheControl:{revalidate:0,expire:void 0}})};if(!a$||!aZ)return k=aY.getActiveScopeSpan(),await aY.withPropagatedContext(a.headers,()=>aY.trace(i.BaseServerSpan.handleRequest,{spanName:`${aX} ${W}`,kind:g.SpanKind.SERVER,attributes:{"http.method":aX,"http.target":a.url}},s),void 0,!a$);await s(aZ)}catch(b){throw b instanceof C.NoFallbackError||await P.onRequestError(a,b,{routerKind:"App Router",routePath:W,routeType:"render",revalidateReason:(0,f.c)({isStaticGeneration:aO,isOnDemandRevalidate:ar})},!1,ak),b}}},58500:a=>{"use strict";a.exports=require("node:timers/promises")},61643:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>f});var d=c(1904),e=c(88844);function f({children:a}){return(0,d.jsx)(e.DashboardLayout,{children:a})}},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},63240:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>d});let d=(0,c(35732).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/home/runner/work/VansRouter/VansRouter/src/app/(dashboard)/dashboard/providers/[id]/page.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/runner/work/VansRouter/VansRouter/src/app/(dashboard)/dashboard/providers/[id]/page.js","default")},66694:(a,b,c)=>{Promise.resolve().then(c.bind(c,63240))},70722:a=>{"use strict";a.exports=require("next/dist/shared/lib/invariant-error")},71553:a=>{"use strict";a.exports=require("node:dns/promises")},71622:a=>{"use strict";a.exports=import("open")},72271:a=>{"use strict";a.exports=require("@aws-sdk/credential-providers")},73024:a=>{"use strict";a.exports=require("node:fs")},73136:a=>{"use strict";a.exports=require("node:url")},73429:a=>{"use strict";a.exports=require("node:util/types")},73496:a=>{"use strict";a.exports=require("http2")},74075:a=>{"use strict";a.exports=require("zlib")},75919:a=>{"use strict";a.exports=require("node:worker_threads")},76760:a=>{"use strict";a.exports=require("node:path")},77030:a=>{"use strict";a.exports=require("node:net")},77068:a=>{"use strict";a.exports=require("next/dist/shared/lib/size-limit")},77598:a=>{"use strict";a.exports=require("node:crypto")},78474:a=>{"use strict";a.exports=require("node:events")},79551:a=>{"use strict";a.exports=require("url")},79646:a=>{"use strict";a.exports=require("child_process")},79822:(a,b,c)=>{a.exports=c(84965)()},81630:a=>{"use strict";a.exports=require("http")},84965:(a,b,c)=>{"use strict";var d=c(43370);function e(){}function f(){}f.resetWarningCache=e,a.exports=function(){function a(a,b,c,e,f,g){if(g!==d){var h=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}}function b(){return a}a.isRequired=a;var c={array:a,bigint:a,bool:a,func:a,number:a,object:a,string:a,symbol:a,any:a,arrayOf:b,element:a,elementType:a,instanceOf:b,node:a,objectOf:b,oneOf:b,oneOfType:b,shape:b,exact:b,checkPropTypes:f,resetWarningCache:e};return c.PropTypes=c,c}},85873:(a,b,c)=>{Promise.resolve().then(c.bind(c,45961))},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87550:a=>{"use strict";a.exports=require("better-sqlite3")},87997:a=>{"use strict";a.exports=require("node:timers")},88844:(a,b,c)=>{let{createProxy:d}=c(78291);a.exports=d("/home/runner/work/VansRouter/VansRouter/src/shared/components/index.js")},91645:a=>{"use strict";a.exports=require("net")},94735:a=>{"use strict";a.exports=require("events")},95601:(a,b,c)=>{Promise.resolve().then(c.bind(c,35411))},97530:a=>{"use strict";a.exports=require("node:sqlite")},98125:a=>{"use strict";a.exports=require("bun:sqlite")}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[1348,2136,3176,506,4387,1685,77,7863,7010,9974,9462,4121,575,6385,7173,9536,228],()=>b(b.s=58335));module.exports=c})();