@jheavenknows/bluerouter 5.0.57 → 5.0.59

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 (1306) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +19 -19
  3. package/app/.next-cli-build/build-manifest.json +2 -2
  4. package/app/.next-cli-build/prerender-manifest.json +3 -3
  5. package/app/.next-cli-build/required-server-files.json +1 -1
  6. package/app/.next-cli-build/server/app/(dashboard)/dashboard/analytics/page.js +1 -1
  7. package/app/.next-cli-build/server/app/(dashboard)/dashboard/analytics/page.js.nft.json +1 -1
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/analytics/page_client-reference-manifest.js +1 -1
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/api-keys/page.js +2 -2
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/api-keys/page.js.nft.json +1 -1
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/api-keys/page_client-reference-manifest.js +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +1 -1
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +1 -1
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +1 -1
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +1 -1
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +1 -1
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +2 -2
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +2 -2
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +1 -1
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +1 -1
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +1 -1
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +2 -2
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +1 -1
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalcloudprovider/page.js +2 -2
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalcloudprovider/page.js.nft.json +1 -1
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalcloudprovider/page_client-reference-manifest.js +1 -1
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalquota/page.js +1 -1
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalquota/page.js.nft.json +1 -1
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalquota/page_client-reference-manifest.js +1 -1
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +1 -1
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/prompt-logs/page.js +1 -1
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/prompt-logs/page.js.nft.json +1 -1
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/prompt-logs/page_client-reference-manifest.js +1 -1
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/provider-health/page.js +1 -1
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/provider-health/page.js.nft.json +1 -1
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/provider-health/page_client-reference-manifest.js +1 -1
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +1 -1
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +1 -1
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  71. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  72. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +1 -1
  73. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  74. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  75. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +2 -2
  76. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  77. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  78. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +1 -1
  79. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  80. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  81. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +1 -1
  82. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  83. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  84. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +1 -1
  85. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  86. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  87. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +1 -1
  88. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  89. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  90. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  91. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  92. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  93. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  94. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  95. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  96. package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  97. package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  98. package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  99. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  100. package/app/.next-cli-build/server/app/_not-found/page.js +1 -1
  101. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  102. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  103. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  104. package/app/.next-cli-build/server/app/_not-found.rsc +6 -6
  105. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +6 -6
  106. package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  107. package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +6 -6
  108. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  109. package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  110. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  111. package/app/.next-cli-build/server/app/api/auth/ldap/test/route.js +1 -1
  112. package/app/.next-cli-build/server/app/api/auth/ldap/test/route.js.nft.json +1 -1
  113. package/app/.next-cli-build/server/app/api/auth/ldap/users/route.js +1 -1
  114. package/app/.next-cli-build/server/app/api/auth/ldap/users/route.js.nft.json +1 -1
  115. package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
  116. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  117. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  118. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  119. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  120. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  121. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  122. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  123. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  124. package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  125. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  126. package/app/.next-cli-build/server/app/api/branding/[asset]/route.js +1 -1
  127. package/app/.next-cli-build/server/app/api/branding/[asset]/route.js.nft.json +1 -1
  128. package/app/.next-cli-build/server/app/api/branding/route.js +1 -1
  129. package/app/.next-cli-build/server/app/api/branding/route.js.nft.json +1 -1
  130. package/app/.next-cli-build/server/app/api/branding/upload/route.js +1 -1
  131. package/app/.next-cli-build/server/app/api/branding/upload/route.js.nft.json +1 -1
  132. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +4 -4
  133. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  134. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  135. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  136. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/autostart/route.js +1 -1
  137. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/autostart/route.js.nft.json +1 -1
  138. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/prompt-log-db/route.js +1 -1
  139. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/prompt-log-db/route.js.nft.json +1 -1
  140. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/root-ca/route.js.nft.json +1 -1
  141. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  142. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  143. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
  144. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  145. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +2 -2
  146. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  147. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
  148. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  149. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +2 -2
  150. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  151. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
  152. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  153. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +1 -1
  154. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  155. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
  156. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  157. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +2 -2
  158. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  159. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +1 -1
  160. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  161. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +2 -2
  162. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  163. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +1 -1
  164. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  165. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
  166. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  167. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
  168. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  169. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +1 -1
  170. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  171. package/app/.next-cli-build/server/app/api/cli-tools/qwen-settings/route.js +2 -2
  172. package/app/.next-cli-build/server/app/api/cli-tools/qwen-settings/route.js.nft.json +1 -1
  173. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  174. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  175. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  176. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  177. package/app/.next-cli-build/server/app/api/dashboard/analytics/route.js +1 -1
  178. package/app/.next-cli-build/server/app/api/dashboard/analytics/route.js.nft.json +1 -1
  179. package/app/.next-cli-build/server/app/api/dashboard/combos/route.js +1 -1
  180. package/app/.next-cli-build/server/app/api/dashboard/combos/route.js.nft.json +1 -1
  181. package/app/.next-cli-build/server/app/api/dashboard/endpoint/route.js +1 -1
  182. package/app/.next-cli-build/server/app/api/dashboard/endpoint/route.js.nft.json +1 -1
  183. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/[id]/route.js +1 -1
  184. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/[id]/route.js.nft.json +1 -1
  185. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/options/route.js +1 -1
  186. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/options/route.js.nft.json +1 -1
  187. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/route.js +1 -1
  188. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/route.js.nft.json +1 -1
  189. package/app/.next-cli-build/server/app/api/dashboard/token-saver/route.js +2 -2
  190. package/app/.next-cli-build/server/app/api/dashboard/token-saver/route.js.nft.json +1 -1
  191. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  192. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  193. package/app/.next-cli-build/server/app/api/keys/[id]/rotate/route.js +1 -1
  194. package/app/.next-cli-build/server/app/api/keys/[id]/rotate/route.js.nft.json +1 -1
  195. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  196. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  197. package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  198. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  199. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  200. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  201. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  202. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  203. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  204. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  205. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  206. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  207. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  208. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  209. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  210. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  211. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  212. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  213. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  214. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  215. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  216. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  217. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  218. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  219. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  220. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  221. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  222. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  223. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  224. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  225. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  226. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  227. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  228. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  229. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  230. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  231. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  232. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  233. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  234. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  235. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  236. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  237. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  238. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  239. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  240. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/api-key-models/route.js +1 -1
  241. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/api-key-models/route.js.nft.json +1 -1
  242. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/import-models/route.js +1 -1
  243. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/import-models/route.js.nft.json +1 -1
  244. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/models/[...routeModel]/route.js +1 -1
  245. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/models/[...routeModel]/route.js.nft.json +1 -1
  246. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/route.js +1 -1
  247. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/route.js.nft.json +1 -1
  248. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/usage/route.js +1 -1
  249. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/usage/route.js.nft.json +1 -1
  250. package/app/.next-cli-build/server/app/api/personal-cloud-providers/client/route.js +1 -1
  251. package/app/.next-cli-build/server/app/api/personal-cloud-providers/client/route.js.nft.json +1 -1
  252. package/app/.next-cli-build/server/app/api/personal-cloud-providers/permissions/route.js +1 -1
  253. package/app/.next-cli-build/server/app/api/personal-cloud-providers/permissions/route.js.nft.json +1 -1
  254. package/app/.next-cli-build/server/app/api/personal-cloud-providers/route.js +1 -1
  255. package/app/.next-cli-build/server/app/api/personal-cloud-providers/route.js.nft.json +1 -1
  256. package/app/.next-cli-build/server/app/api/personal-cloud-providers/routing/route.js +1 -1
  257. package/app/.next-cli-build/server/app/api/personal-cloud-providers/routing/route.js.nft.json +1 -1
  258. package/app/.next-cli-build/server/app/api/pricing/recalculate/route.js +1 -1
  259. package/app/.next-cli-build/server/app/api/pricing/recalculate/route.js.nft.json +1 -1
  260. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  261. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  262. package/app/.next-cli-build/server/app/api/provider-health/route.js +1 -1
  263. package/app/.next-cli-build/server/app/api/provider-health/route.js.nft.json +1 -1
  264. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  265. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  266. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  267. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  268. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  269. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  270. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  271. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  272. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  273. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  274. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  275. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  276. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  277. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  278. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  279. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  280. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  281. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  282. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  283. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  284. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  285. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  286. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  287. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  288. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  289. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  290. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  291. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +1 -1
  292. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  293. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +1 -1
  294. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  295. package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  296. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  297. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +1 -1
  298. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  299. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  300. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  301. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
  302. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  303. package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  304. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  305. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  306. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  307. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  308. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  309. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  310. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  311. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +1 -1
  312. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  313. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  314. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  315. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  316. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  317. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  318. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  319. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  320. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  321. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  322. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  323. package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
  324. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  325. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  326. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  327. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  328. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  329. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  330. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +2 -2
  331. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  332. package/app/.next-cli-build/server/app/api/tunnel/tailscale-login/route.js.nft.json +1 -1
  333. package/app/.next-cli-build/server/app/api/tunnel/tailscale-start-daemon/route.js +2 -2
  334. package/app/.next-cli-build/server/app/api/tunnel/tailscale-start-daemon/route.js.nft.json +1 -1
  335. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  336. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  337. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  338. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  339. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  340. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  341. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  342. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  343. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  344. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  345. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  346. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  347. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  348. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  349. package/app/.next-cli-build/server/app/api/usage/stream/route.js +1 -1
  350. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  351. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  352. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  353. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  354. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  355. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  356. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  357. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  358. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  359. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  360. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  361. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  362. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
  363. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  364. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  365. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  366. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  367. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  368. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  369. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  370. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  371. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  372. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  373. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  374. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  375. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  376. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  377. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  378. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  379. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  380. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  381. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  382. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  383. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  384. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  385. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  386. package/app/.next-cli-build/server/app/api/version/restart/route.js.nft.json +1 -1
  387. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  388. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  389. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  390. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  391. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  392. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  393. package/app/.next-cli-build/server/app/callback/page.js +1 -1
  394. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  395. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  396. package/app/.next-cli-build/server/app/callback.html +1 -1
  397. package/app/.next-cli-build/server/app/callback.rsc +6 -6
  398. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +6 -6
  399. package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
  400. package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +6 -6
  401. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
  402. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  403. package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
  404. package/app/.next-cli-build/server/app/dashboard/analytics.html +1 -1
  405. package/app/.next-cli-build/server/app/dashboard/analytics.rsc +7 -7
  406. package/app/.next-cli-build/server/app/dashboard/analytics.segments/!KGRhc2hib2FyZCk/dashboard/analytics/__PAGE__.segment.rsc +1 -1
  407. package/app/.next-cli-build/server/app/dashboard/analytics.segments/!KGRhc2hib2FyZCk/dashboard/analytics.segment.rsc +1 -1
  408. package/app/.next-cli-build/server/app/dashboard/analytics.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  409. package/app/.next-cli-build/server/app/dashboard/analytics.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  410. package/app/.next-cli-build/server/app/dashboard/analytics.segments/_full.segment.rsc +7 -7
  411. package/app/.next-cli-build/server/app/dashboard/analytics.segments/_head.segment.rsc +1 -1
  412. package/app/.next-cli-build/server/app/dashboard/analytics.segments/_index.segment.rsc +6 -6
  413. package/app/.next-cli-build/server/app/dashboard/analytics.segments/_tree.segment.rsc +2 -2
  414. package/app/.next-cli-build/server/app/dashboard/api-keys.html +1 -1
  415. package/app/.next-cli-build/server/app/dashboard/api-keys.rsc +8 -8
  416. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/!KGRhc2hib2FyZCk/dashboard/api-keys/__PAGE__.segment.rsc +2 -2
  417. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/!KGRhc2hib2FyZCk/dashboard/api-keys.segment.rsc +1 -1
  418. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  419. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  420. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/_full.segment.rsc +8 -8
  421. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/_head.segment.rsc +1 -1
  422. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/_index.segment.rsc +6 -6
  423. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/_tree.segment.rsc +2 -2
  424. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  425. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +8 -8
  426. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
  427. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
  428. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  429. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  430. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +8 -8
  431. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
  432. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +6 -6
  433. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
  434. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  435. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +9 -9
  436. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
  437. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
  438. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  439. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  440. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +9 -9
  441. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
  442. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +6 -6
  443. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
  444. package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  445. package/app/.next-cli-build/server/app/dashboard/combos.rsc +8 -8
  446. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  447. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
  448. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  449. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  450. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +8 -8
  451. package/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
  452. package/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +6 -6
  453. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
  454. package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  455. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +9 -9
  456. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
  457. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
  458. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  459. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  460. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +9 -9
  461. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
  462. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +6 -6
  463. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
  464. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  465. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +8 -8
  466. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
  467. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
  468. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
  469. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  470. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  471. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +8 -8
  472. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
  473. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +6 -6
  474. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +2 -2
  475. package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  476. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +8 -8
  477. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
  478. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
  479. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  480. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  481. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +8 -8
  482. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
  483. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +6 -6
  484. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
  485. package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  486. package/app/.next-cli-build/server/app/dashboard/profile.rsc +7 -7
  487. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +1 -1
  488. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
  489. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  490. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  491. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +7 -7
  492. package/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
  493. package/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +6 -6
  494. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
  495. package/app/.next-cli-build/server/app/dashboard/prompt-logs.html +1 -1
  496. package/app/.next-cli-build/server/app/dashboard/prompt-logs.rsc +7 -7
  497. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/!KGRhc2hib2FyZCk/dashboard/prompt-logs/__PAGE__.segment.rsc +1 -1
  498. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/!KGRhc2hib2FyZCk/dashboard/prompt-logs.segment.rsc +1 -1
  499. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  500. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  501. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/_full.segment.rsc +7 -7
  502. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/_head.segment.rsc +1 -1
  503. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/_index.segment.rsc +6 -6
  504. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/_tree.segment.rsc +2 -2
  505. package/app/.next-cli-build/server/app/dashboard/provider-health.html +1 -1
  506. package/app/.next-cli-build/server/app/dashboard/provider-health.rsc +7 -7
  507. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/!KGRhc2hib2FyZCk/dashboard/provider-health/__PAGE__.segment.rsc +1 -1
  508. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/!KGRhc2hib2FyZCk/dashboard/provider-health.segment.rsc +1 -1
  509. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  510. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  511. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/_full.segment.rsc +7 -7
  512. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/_head.segment.rsc +1 -1
  513. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/_index.segment.rsc +6 -6
  514. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/_tree.segment.rsc +2 -2
  515. package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  516. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +8 -8
  517. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  518. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
  519. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  520. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  521. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  522. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +8 -8
  523. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
  524. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +6 -6
  525. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
  526. package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  527. package/app/.next-cli-build/server/app/dashboard/providers.rsc +8 -8
  528. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  529. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  530. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  531. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  532. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +8 -8
  533. package/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
  534. package/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +6 -6
  535. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
  536. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  537. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +8 -8
  538. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
  539. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
  540. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  541. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  542. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +8 -8
  543. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
  544. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +6 -6
  545. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
  546. package/app/.next-cli-build/server/app/dashboard/quota.html +1 -1
  547. package/app/.next-cli-build/server/app/dashboard/quota.rsc +9 -9
  548. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
  549. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
  550. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  551. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  552. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +9 -9
  553. package/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
  554. package/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +6 -6
  555. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
  556. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +1 -1
  557. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  558. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  559. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  560. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +6 -6
  561. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +6 -6
  562. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  563. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +6 -6
  564. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  565. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
  566. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  567. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  568. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  569. package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  570. package/app/.next-cli-build/server/app/dashboard/skills.rsc +8 -8
  571. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +2 -2
  572. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills.segment.rsc +1 -1
  573. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  574. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  575. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +8 -8
  576. package/app/.next-cli-build/server/app/dashboard/skills.segments/_head.segment.rsc +1 -1
  577. package/app/.next-cli-build/server/app/dashboard/skills.segments/_index.segment.rsc +6 -6
  578. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +2 -2
  579. package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
  580. package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +8 -8
  581. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +2 -2
  582. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver.segment.rsc +1 -1
  583. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  584. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  585. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +8 -8
  586. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_head.segment.rsc +1 -1
  587. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_index.segment.rsc +6 -6
  588. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +2 -2
  589. package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  590. package/app/.next-cli-build/server/app/dashboard/translator.rsc +8 -8
  591. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  592. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
  593. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  594. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  595. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +8 -8
  596. package/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
  597. package/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +6 -6
  598. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
  599. package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  600. package/app/.next-cli-build/server/app/dashboard/usage.rsc +8 -8
  601. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
  602. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
  603. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  604. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  605. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +8 -8
  606. package/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
  607. package/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +6 -6
  608. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
  609. package/app/.next-cli-build/server/app/dashboard.html +1 -1
  610. package/app/.next-cli-build/server/app/dashboard.rsc +9 -9
  611. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
  612. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  613. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  614. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +9 -9
  615. package/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
  616. package/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +6 -6
  617. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +2 -2
  618. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  619. package/app/.next-cli-build/server/app/index.html +1 -1
  620. package/app/.next-cli-build/server/app/index.rsc +6 -6
  621. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  622. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +6 -6
  623. package/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
  624. package/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +6 -6
  625. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
  626. package/app/.next-cli-build/server/app/landing/page.js +1 -1
  627. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  628. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  629. package/app/.next-cli-build/server/app/landing.html +1 -1
  630. package/app/.next-cli-build/server/app/landing.rsc +6 -6
  631. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +6 -6
  632. package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
  633. package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +6 -6
  634. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
  635. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
  636. package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
  637. package/app/.next-cli-build/server/app/login/page.js +1 -1
  638. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  639. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  640. package/app/.next-cli-build/server/app/login.html +1 -1
  641. package/app/.next-cli-build/server/app/login.rsc +7 -7
  642. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +7 -7
  643. package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
  644. package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +6 -6
  645. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
  646. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  647. package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
  648. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  649. package/app/.next-cli-build/server/app/page.js +1 -1
  650. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  651. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  652. package/app/.next-cli-build/server/app-paths-manifest.json +19 -19
  653. package/app/.next-cli-build/server/chunks/2338.js +3 -3
  654. package/app/.next-cli-build/server/chunks/3110.js +1 -1
  655. package/app/.next-cli-build/server/chunks/4746.js +1 -1
  656. package/app/.next-cli-build/server/chunks/4803.js +1 -1
  657. package/app/.next-cli-build/server/chunks/6105.js +64 -0
  658. package/app/.next-cli-build/server/chunks/6328.js +1 -1
  659. package/app/.next-cli-build/server/chunks/700.js +2 -2
  660. package/app/.next-cli-build/server/chunks/7774.js +2 -2
  661. package/app/.next-cli-build/server/chunks/7965.js +1 -1
  662. package/app/.next-cli-build/server/chunks/8520.js +1 -1
  663. package/app/.next-cli-build/server/chunks/8895.js +1 -1
  664. package/app/.next-cli-build/server/chunks/9434.js +1 -1
  665. package/app/.next-cli-build/server/instrumentation.js +1 -1
  666. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  667. package/app/.next-cli-build/server/middleware.js +1 -1
  668. package/app/.next-cli-build/server/pages/404.html +1 -1
  669. package/app/.next-cli-build/server/pages/500.html +1 -1
  670. package/app/.next-cli-build/server/server-reference-manifest.js +1 -1
  671. package/app/.next-cli-build/server/server-reference-manifest.json +1 -1
  672. package/app/.next-cli-build/static/chunks/{5263-0ab1990ccdc396bb.js → 5263-352f7575907eddef.js} +1 -1
  673. package/app/.next-cli-build/static/chunks/{5497-336d2f218c69deac.js → 5497-a9046e228f954dda.js} +2 -2
  674. package/app/.next-cli-build/static/chunks/5792-871f5fad4b3167bd.js +64 -0
  675. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/api-keys/{page-ab5d688db6e32f62.js → page-d17cba5c03249383.js} +1 -1
  676. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/{page-2558d7355357c608.js → page-0fe6555804a9264b.js} +1 -1
  677. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/{page-c0231e9486c2237d.js → page-0986f42dc41bebfa.js} +1 -1
  678. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/{page-b2e2b7765d39da7a.js → page-8cb2fafd44d2c944.js} +1 -1
  679. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/{page-a30dfa93b2d6ac90.js → page-763ed716338265f6.js} +1 -1
  680. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/{page-03f35e824699a220.js → page-81216d587547efe4.js} +1 -1
  681. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/{page-d03884f048a5a7c8.js → page-f10f073dea6135f8.js} +1 -1
  682. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-87cbb809c2eeb74e.js → page-8b4b169b67b0d2db.js} +1 -1
  683. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/{page-3bc7d22940bf015c.js → page-cf61958f42923b69.js} +1 -1
  684. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/{page-224e01693a3cfaf1.js → page-b536542f0a708a46.js} +1 -1
  685. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/{page-905212b2d7ed648e.js → page-6fc459277027e444.js} +1 -1
  686. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/{page-6de007eb2a59ca30.js → page-0dd15fd784e80046.js} +1 -1
  687. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/{page-d03884f048a5a7c8.js → page-f10f073dea6135f8.js} +1 -1
  688. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/personalcloudprovider/{page-399160c87b52eb2f.js → page-9afec1ce4c7607a8.js} +1 -1
  689. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/{page-3bb054c7e6200935.js → page-a31cb59b5b878dc4.js} +1 -1
  690. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/new/{page-0da77a157acefc7c.js → page-feab08fd8ea3abf9.js} +1 -1
  691. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/{page-7b69e5101ad4864f.js → page-d57a153d2e06360f.js} +1 -1
  692. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/{page-80e7e47c3dfa4070.js → page-3c1de0fa6ff18f08.js} +1 -1
  693. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/{page-fa9e9680d235e2d8.js → page-3a31e39003735195.js} +1 -1
  694. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/{page-33c6b65a7848eb94.js → page-533d2b73e2f2f7b0.js} +1 -1
  695. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/page-ea95e4d4cfdbb875.js +1 -0
  696. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/{page-1002addd547b6453.js → page-c3eeeaf049d89657.js} +1 -1
  697. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/{page-c734cfa89fa60ee8.js → page-7579b49088999a9c.js} +1 -1
  698. package/app/.next-cli-build/static/chunks/app/(dashboard)/{layout-5247f67b1fd67c5b.js → layout-ca699ce314f4007e.js} +1 -1
  699. package/app/.next-cli-build/static/css/43be12accd363118.css +1 -0
  700. package/app/cli/.build-home/AppData/Roaming/bluerouter/db/backups/{upgrade-5.0.52-to-5.0.53-5.0.53-20260701-113007 → upgrade-5.0.41-to-5.0.42-5.0.42-20260629-233337}/data.sqlite +0 -0
  701. package/app/cli/.build-home/AppData/Roaming/bluerouter/db/backups/{upgrade-5.0.53-to-5.0.54-5.0.54-20260701-115859 → upgrade-5.0.42-to-5.0.43-5.0.43-20260630-073546}/data.sqlite +0 -0
  702. package/app/cli/.build-home/AppData/Roaming/bluerouter/db/backups/{upgrade-5.0.54-to-5.0.55-5.0.55-20260701-132037 → upgrade-5.0.43-to-5.0.47-5.0.47-20260701-072200}/data.sqlite +0 -0
  703. package/app/cli/.build-home/AppData/Roaming/bluerouter/db/backups/{upgrade-5.0.55-to-5.0.56-5.0.56-20260701-132316 → upgrade-5.0.47-to-5.0.48-5.0.48-20260701-072443}/data.sqlite +0 -0
  704. package/app/cli/.build-home/AppData/Roaming/bluerouter/db/data.sqlite +0 -0
  705. package/app/cli/.build-home/AppData/Roaming/bluerouter/db/data.sqlite-shm +0 -0
  706. package/app/cli/.build-home/AppData/Roaming/bluerouter/db/data.sqlite-wal +0 -0
  707. package/app/cli/.build-home/AppData/Roaming/bluerouter/jwt-secret +1 -1
  708. package/app/cli/.build-home/AppData/Roaming/bluerouter/machine-id +1 -1
  709. package/app/cli/.build-home/AppData/Roaming/nextjs-nodejs/Config/config.json +3 -3
  710. package/app/node_modules/baseline-browser-mapping/dist/index.cjs +1 -1
  711. package/app/node_modules/baseline-browser-mapping/package.json +2 -2
  712. package/app/node_modules/caniuse-lite/data/agents.js +1 -1
  713. package/app/node_modules/caniuse-lite/data/browserVersions.js +1 -1
  714. package/app/node_modules/caniuse-lite/data/features/aac.js +1 -1
  715. package/app/node_modules/caniuse-lite/data/features/abortcontroller.js +1 -1
  716. package/app/node_modules/caniuse-lite/data/features/ac3-ec3.js +1 -1
  717. package/app/node_modules/caniuse-lite/data/features/accelerometer.js +1 -1
  718. package/app/node_modules/caniuse-lite/data/features/addeventlistener.js +1 -1
  719. package/app/node_modules/caniuse-lite/data/features/alternate-stylesheet.js +1 -1
  720. package/app/node_modules/caniuse-lite/data/features/ambient-light.js +1 -1
  721. package/app/node_modules/caniuse-lite/data/features/apng.js +1 -1
  722. package/app/node_modules/caniuse-lite/data/features/array-find-index.js +1 -1
  723. package/app/node_modules/caniuse-lite/data/features/array-find.js +1 -1
  724. package/app/node_modules/caniuse-lite/data/features/array-flat.js +1 -1
  725. package/app/node_modules/caniuse-lite/data/features/array-includes.js +1 -1
  726. package/app/node_modules/caniuse-lite/data/features/arrow-functions.js +1 -1
  727. package/app/node_modules/caniuse-lite/data/features/asmjs.js +1 -1
  728. package/app/node_modules/caniuse-lite/data/features/async-clipboard.js +1 -1
  729. package/app/node_modules/caniuse-lite/data/features/async-functions.js +1 -1
  730. package/app/node_modules/caniuse-lite/data/features/atob-btoa.js +1 -1
  731. package/app/node_modules/caniuse-lite/data/features/audio-api.js +1 -1
  732. package/app/node_modules/caniuse-lite/data/features/audio.js +1 -1
  733. package/app/node_modules/caniuse-lite/data/features/audiotracks.js +1 -1
  734. package/app/node_modules/caniuse-lite/data/features/autofocus.js +1 -1
  735. package/app/node_modules/caniuse-lite/data/features/auxclick.js +1 -1
  736. package/app/node_modules/caniuse-lite/data/features/av1.js +1 -1
  737. package/app/node_modules/caniuse-lite/data/features/avif.js +1 -1
  738. package/app/node_modules/caniuse-lite/data/features/background-attachment.js +1 -1
  739. package/app/node_modules/caniuse-lite/data/features/background-clip-text.js +1 -1
  740. package/app/node_modules/caniuse-lite/data/features/background-img-opts.js +1 -1
  741. package/app/node_modules/caniuse-lite/data/features/background-position-x-y.js +1 -1
  742. package/app/node_modules/caniuse-lite/data/features/background-repeat-round-space.js +1 -1
  743. package/app/node_modules/caniuse-lite/data/features/background-sync.js +1 -1
  744. package/app/node_modules/caniuse-lite/data/features/battery-status.js +1 -1
  745. package/app/node_modules/caniuse-lite/data/features/beacon.js +1 -1
  746. package/app/node_modules/caniuse-lite/data/features/beforeafterprint.js +1 -1
  747. package/app/node_modules/caniuse-lite/data/features/bigint.js +1 -1
  748. package/app/node_modules/caniuse-lite/data/features/blobbuilder.js +1 -1
  749. package/app/node_modules/caniuse-lite/data/features/bloburls.js +1 -1
  750. package/app/node_modules/caniuse-lite/data/features/border-image.js +1 -1
  751. package/app/node_modules/caniuse-lite/data/features/border-radius.js +1 -1
  752. package/app/node_modules/caniuse-lite/data/features/broadcastchannel.js +1 -1
  753. package/app/node_modules/caniuse-lite/data/features/brotli.js +1 -1
  754. package/app/node_modules/caniuse-lite/data/features/calc.js +1 -1
  755. package/app/node_modules/caniuse-lite/data/features/canvas-blending.js +1 -1
  756. package/app/node_modules/caniuse-lite/data/features/canvas-text.js +1 -1
  757. package/app/node_modules/caniuse-lite/data/features/canvas.js +1 -1
  758. package/app/node_modules/caniuse-lite/data/features/ch-unit.js +1 -1
  759. package/app/node_modules/caniuse-lite/data/features/chacha20-poly1305.js +1 -1
  760. package/app/node_modules/caniuse-lite/data/features/channel-messaging.js +1 -1
  761. package/app/node_modules/caniuse-lite/data/features/childnode-remove.js +1 -1
  762. package/app/node_modules/caniuse-lite/data/features/classlist.js +1 -1
  763. package/app/node_modules/caniuse-lite/data/features/client-hints-dpr-width-viewport.js +1 -1
  764. package/app/node_modules/caniuse-lite/data/features/clipboard.js +1 -1
  765. package/app/node_modules/caniuse-lite/data/features/colr-v1.js +1 -1
  766. package/app/node_modules/caniuse-lite/data/features/colr.js +1 -1
  767. package/app/node_modules/caniuse-lite/data/features/comparedocumentposition.js +1 -1
  768. package/app/node_modules/caniuse-lite/data/features/console-basic.js +1 -1
  769. package/app/node_modules/caniuse-lite/data/features/console-time.js +1 -1
  770. package/app/node_modules/caniuse-lite/data/features/const.js +1 -1
  771. package/app/node_modules/caniuse-lite/data/features/constraint-validation.js +1 -1
  772. package/app/node_modules/caniuse-lite/data/features/contenteditable.js +1 -1
  773. package/app/node_modules/caniuse-lite/data/features/contentsecuritypolicy.js +1 -1
  774. package/app/node_modules/caniuse-lite/data/features/contentsecuritypolicy2.js +1 -1
  775. package/app/node_modules/caniuse-lite/data/features/cookie-store-api.js +1 -1
  776. package/app/node_modules/caniuse-lite/data/features/cors.js +1 -1
  777. package/app/node_modules/caniuse-lite/data/features/createimagebitmap.js +1 -1
  778. package/app/node_modules/caniuse-lite/data/features/credential-management.js +1 -1
  779. package/app/node_modules/caniuse-lite/data/features/cross-document-view-transitions.js +1 -1
  780. package/app/node_modules/caniuse-lite/data/features/cryptography.js +1 -1
  781. package/app/node_modules/caniuse-lite/data/features/css-all.js +1 -1
  782. package/app/node_modules/caniuse-lite/data/features/css-anchor-positioning.js +1 -1
  783. package/app/node_modules/caniuse-lite/data/features/css-animation.js +1 -1
  784. package/app/node_modules/caniuse-lite/data/features/css-any-link.js +1 -1
  785. package/app/node_modules/caniuse-lite/data/features/css-appearance.js +1 -1
  786. package/app/node_modules/caniuse-lite/data/features/css-at-counter-style.js +1 -1
  787. package/app/node_modules/caniuse-lite/data/features/css-autofill.js +1 -1
  788. package/app/node_modules/caniuse-lite/data/features/css-backdrop-filter.js +1 -1
  789. package/app/node_modules/caniuse-lite/data/features/css-background-offsets.js +1 -1
  790. package/app/node_modules/caniuse-lite/data/features/css-backgroundblendmode.js +1 -1
  791. package/app/node_modules/caniuse-lite/data/features/css-boxdecorationbreak.js +1 -1
  792. package/app/node_modules/caniuse-lite/data/features/css-boxshadow.js +1 -1
  793. package/app/node_modules/caniuse-lite/data/features/css-canvas.js +1 -1
  794. package/app/node_modules/caniuse-lite/data/features/css-caret-color.js +1 -1
  795. package/app/node_modules/caniuse-lite/data/features/css-cascade-layers.js +1 -1
  796. package/app/node_modules/caniuse-lite/data/features/css-cascade-scope.js +1 -1
  797. package/app/node_modules/caniuse-lite/data/features/css-case-insensitive.js +1 -1
  798. package/app/node_modules/caniuse-lite/data/features/css-clip-path.js +1 -1
  799. package/app/node_modules/caniuse-lite/data/features/css-color-adjust.js +1 -1
  800. package/app/node_modules/caniuse-lite/data/features/css-color-function.js +1 -1
  801. package/app/node_modules/caniuse-lite/data/features/css-conic-gradients.js +1 -1
  802. package/app/node_modules/caniuse-lite/data/features/css-container-queries-style.js +1 -1
  803. package/app/node_modules/caniuse-lite/data/features/css-container-queries.js +1 -1
  804. package/app/node_modules/caniuse-lite/data/features/css-container-query-units.js +1 -1
  805. package/app/node_modules/caniuse-lite/data/features/css-containment.js +1 -1
  806. package/app/node_modules/caniuse-lite/data/features/css-content-visibility.js +1 -1
  807. package/app/node_modules/caniuse-lite/data/features/css-counters.js +1 -1
  808. package/app/node_modules/caniuse-lite/data/features/css-crisp-edges.js +1 -1
  809. package/app/node_modules/caniuse-lite/data/features/css-cross-fade.js +1 -1
  810. package/app/node_modules/caniuse-lite/data/features/css-default-pseudo.js +1 -1
  811. package/app/node_modules/caniuse-lite/data/features/css-descendant-gtgt.js +1 -1
  812. package/app/node_modules/caniuse-lite/data/features/css-deviceadaptation.js +1 -1
  813. package/app/node_modules/caniuse-lite/data/features/css-dir-pseudo.js +1 -1
  814. package/app/node_modules/caniuse-lite/data/features/css-display-contents.js +1 -1
  815. package/app/node_modules/caniuse-lite/data/features/css-element-function.js +1 -1
  816. package/app/node_modules/caniuse-lite/data/features/css-env-function.js +1 -1
  817. package/app/node_modules/caniuse-lite/data/features/css-exclusions.js +1 -1
  818. package/app/node_modules/caniuse-lite/data/features/css-featurequeries.js +1 -1
  819. package/app/node_modules/caniuse-lite/data/features/css-file-selector-button.js +1 -1
  820. package/app/node_modules/caniuse-lite/data/features/css-filter-function.js +1 -1
  821. package/app/node_modules/caniuse-lite/data/features/css-filters.js +1 -1
  822. package/app/node_modules/caniuse-lite/data/features/css-first-letter.js +1 -1
  823. package/app/node_modules/caniuse-lite/data/features/css-first-line.js +1 -1
  824. package/app/node_modules/caniuse-lite/data/features/css-fixed.js +1 -1
  825. package/app/node_modules/caniuse-lite/data/features/css-focus-visible.js +1 -1
  826. package/app/node_modules/caniuse-lite/data/features/css-focus-within.js +1 -1
  827. package/app/node_modules/caniuse-lite/data/features/css-font-palette.js +1 -1
  828. package/app/node_modules/caniuse-lite/data/features/css-font-rendering-controls.js +1 -1
  829. package/app/node_modules/caniuse-lite/data/features/css-font-stretch.js +1 -1
  830. package/app/node_modules/caniuse-lite/data/features/css-gencontent.js +1 -1
  831. package/app/node_modules/caniuse-lite/data/features/css-gradients.js +1 -1
  832. package/app/node_modules/caniuse-lite/data/features/css-grid-animation.js +1 -1
  833. package/app/node_modules/caniuse-lite/data/features/css-grid-lanes.js +1 -1
  834. package/app/node_modules/caniuse-lite/data/features/css-grid.js +1 -1
  835. package/app/node_modules/caniuse-lite/data/features/css-hanging-punctuation.js +1 -1
  836. package/app/node_modules/caniuse-lite/data/features/css-has.js +1 -1
  837. package/app/node_modules/caniuse-lite/data/features/css-hyphens.js +1 -1
  838. package/app/node_modules/caniuse-lite/data/features/css-if.js +1 -1
  839. package/app/node_modules/caniuse-lite/data/features/css-image-orientation.js +1 -1
  840. package/app/node_modules/caniuse-lite/data/features/css-image-set.js +1 -1
  841. package/app/node_modules/caniuse-lite/data/features/css-in-out-of-range.js +1 -1
  842. package/app/node_modules/caniuse-lite/data/features/css-indeterminate-pseudo.js +1 -1
  843. package/app/node_modules/caniuse-lite/data/features/css-initial-letter.js +1 -1
  844. package/app/node_modules/caniuse-lite/data/features/css-initial-value.js +1 -1
  845. package/app/node_modules/caniuse-lite/data/features/css-lch-lab.js +1 -1
  846. package/app/node_modules/caniuse-lite/data/features/css-letter-spacing.js +1 -1
  847. package/app/node_modules/caniuse-lite/data/features/css-line-clamp.js +1 -1
  848. package/app/node_modules/caniuse-lite/data/features/css-logical-props.js +1 -1
  849. package/app/node_modules/caniuse-lite/data/features/css-marker-pseudo.js +1 -1
  850. package/app/node_modules/caniuse-lite/data/features/css-masks.js +1 -1
  851. package/app/node_modules/caniuse-lite/data/features/css-matches-pseudo.js +1 -1
  852. package/app/node_modules/caniuse-lite/data/features/css-math-functions.js +1 -1
  853. package/app/node_modules/caniuse-lite/data/features/css-media-interaction.js +1 -1
  854. package/app/node_modules/caniuse-lite/data/features/css-media-range-syntax.js +1 -1
  855. package/app/node_modules/caniuse-lite/data/features/css-media-resolution.js +1 -1
  856. package/app/node_modules/caniuse-lite/data/features/css-media-scripting.js +1 -1
  857. package/app/node_modules/caniuse-lite/data/features/css-mediaqueries.js +1 -1
  858. package/app/node_modules/caniuse-lite/data/features/css-mixblendmode.js +1 -1
  859. package/app/node_modules/caniuse-lite/data/features/css-module-scripts.js +1 -1
  860. package/app/node_modules/caniuse-lite/data/features/css-motion-paths.js +1 -1
  861. package/app/node_modules/caniuse-lite/data/features/css-namespaces.js +1 -1
  862. package/app/node_modules/caniuse-lite/data/features/css-nesting.js +1 -1
  863. package/app/node_modules/caniuse-lite/data/features/css-not-sel-list.js +1 -1
  864. package/app/node_modules/caniuse-lite/data/features/css-nth-child-of.js +1 -1
  865. package/app/node_modules/caniuse-lite/data/features/css-opacity.js +1 -1
  866. package/app/node_modules/caniuse-lite/data/features/css-optional-pseudo.js +1 -1
  867. package/app/node_modules/caniuse-lite/data/features/css-overflow-anchor.js +1 -1
  868. package/app/node_modules/caniuse-lite/data/features/css-overflow-overlay.js +1 -1
  869. package/app/node_modules/caniuse-lite/data/features/css-overflow.js +1 -1
  870. package/app/node_modules/caniuse-lite/data/features/css-overscroll-behavior.js +1 -1
  871. package/app/node_modules/caniuse-lite/data/features/css-page-break.js +1 -1
  872. package/app/node_modules/caniuse-lite/data/features/css-paged-media.js +1 -1
  873. package/app/node_modules/caniuse-lite/data/features/css-paint-api.js +1 -1
  874. package/app/node_modules/caniuse-lite/data/features/css-placeholder-shown.js +1 -1
  875. package/app/node_modules/caniuse-lite/data/features/css-placeholder.js +1 -1
  876. package/app/node_modules/caniuse-lite/data/features/css-print-color-adjust.js +1 -1
  877. package/app/node_modules/caniuse-lite/data/features/css-read-only-write.js +1 -1
  878. package/app/node_modules/caniuse-lite/data/features/css-rebeccapurple.js +1 -1
  879. package/app/node_modules/caniuse-lite/data/features/css-reflections.js +1 -1
  880. package/app/node_modules/caniuse-lite/data/features/css-regions.js +1 -1
  881. package/app/node_modules/caniuse-lite/data/features/css-relative-colors.js +1 -1
  882. package/app/node_modules/caniuse-lite/data/features/css-repeating-gradients.js +1 -1
  883. package/app/node_modules/caniuse-lite/data/features/css-resize.js +1 -1
  884. package/app/node_modules/caniuse-lite/data/features/css-revert-value.js +1 -1
  885. package/app/node_modules/caniuse-lite/data/features/css-rrggbbaa.js +1 -1
  886. package/app/node_modules/caniuse-lite/data/features/css-scroll-behavior.js +1 -1
  887. package/app/node_modules/caniuse-lite/data/features/css-scrollbar.js +1 -1
  888. package/app/node_modules/caniuse-lite/data/features/css-sel2.js +1 -1
  889. package/app/node_modules/caniuse-lite/data/features/css-sel3.js +1 -1
  890. package/app/node_modules/caniuse-lite/data/features/css-selection.js +1 -1
  891. package/app/node_modules/caniuse-lite/data/features/css-shapes.js +1 -1
  892. package/app/node_modules/caniuse-lite/data/features/css-snappoints.js +1 -1
  893. package/app/node_modules/caniuse-lite/data/features/css-sticky.js +1 -1
  894. package/app/node_modules/caniuse-lite/data/features/css-subgrid.js +1 -1
  895. package/app/node_modules/caniuse-lite/data/features/css-supports-api.js +1 -1
  896. package/app/node_modules/caniuse-lite/data/features/css-table.js +1 -1
  897. package/app/node_modules/caniuse-lite/data/features/css-text-align-last.js +1 -1
  898. package/app/node_modules/caniuse-lite/data/features/css-text-box-trim.js +1 -1
  899. package/app/node_modules/caniuse-lite/data/features/css-text-indent.js +1 -1
  900. package/app/node_modules/caniuse-lite/data/features/css-text-justify.js +1 -1
  901. package/app/node_modules/caniuse-lite/data/features/css-text-orientation.js +1 -1
  902. package/app/node_modules/caniuse-lite/data/features/css-text-spacing.js +1 -1
  903. package/app/node_modules/caniuse-lite/data/features/css-text-wrap-balance.js +1 -1
  904. package/app/node_modules/caniuse-lite/data/features/css-textshadow.js +1 -1
  905. package/app/node_modules/caniuse-lite/data/features/css-touch-action.js +1 -1
  906. package/app/node_modules/caniuse-lite/data/features/css-transitions.js +1 -1
  907. package/app/node_modules/caniuse-lite/data/features/css-unicode-bidi.js +1 -1
  908. package/app/node_modules/caniuse-lite/data/features/css-unset-value.js +1 -1
  909. package/app/node_modules/caniuse-lite/data/features/css-variables.js +1 -1
  910. package/app/node_modules/caniuse-lite/data/features/css-when-else.js +1 -1
  911. package/app/node_modules/caniuse-lite/data/features/css-widows-orphans.js +1 -1
  912. package/app/node_modules/caniuse-lite/data/features/css-width-stretch.js +1 -1
  913. package/app/node_modules/caniuse-lite/data/features/css-writing-mode.js +1 -1
  914. package/app/node_modules/caniuse-lite/data/features/css-zoom.js +1 -1
  915. package/app/node_modules/caniuse-lite/data/features/css3-attr.js +1 -1
  916. package/app/node_modules/caniuse-lite/data/features/css3-boxsizing.js +1 -1
  917. package/app/node_modules/caniuse-lite/data/features/css3-colors.js +1 -1
  918. package/app/node_modules/caniuse-lite/data/features/css3-cursors-grab.js +1 -1
  919. package/app/node_modules/caniuse-lite/data/features/css3-cursors-newer.js +1 -1
  920. package/app/node_modules/caniuse-lite/data/features/css3-cursors.js +1 -1
  921. package/app/node_modules/caniuse-lite/data/features/css3-tabsize.js +1 -1
  922. package/app/node_modules/caniuse-lite/data/features/currentcolor.js +1 -1
  923. package/app/node_modules/caniuse-lite/data/features/custom-elements.js +1 -1
  924. package/app/node_modules/caniuse-lite/data/features/custom-elementsv1.js +1 -1
  925. package/app/node_modules/caniuse-lite/data/features/customevent.js +1 -1
  926. package/app/node_modules/caniuse-lite/data/features/customizable-select.js +1 -1
  927. package/app/node_modules/caniuse-lite/data/features/datalist.js +1 -1
  928. package/app/node_modules/caniuse-lite/data/features/dataset.js +1 -1
  929. package/app/node_modules/caniuse-lite/data/features/datauri.js +1 -1
  930. package/app/node_modules/caniuse-lite/data/features/date-tolocaledatestring.js +1 -1
  931. package/app/node_modules/caniuse-lite/data/features/declarative-shadow-dom.js +1 -1
  932. package/app/node_modules/caniuse-lite/data/features/decorators.js +1 -1
  933. package/app/node_modules/caniuse-lite/data/features/details.js +1 -1
  934. package/app/node_modules/caniuse-lite/data/features/deviceorientation.js +1 -1
  935. package/app/node_modules/caniuse-lite/data/features/devicepixelratio.js +1 -1
  936. package/app/node_modules/caniuse-lite/data/features/dialog.js +1 -1
  937. package/app/node_modules/caniuse-lite/data/features/dispatchevent.js +1 -1
  938. package/app/node_modules/caniuse-lite/data/features/dnssec.js +1 -1
  939. package/app/node_modules/caniuse-lite/data/features/do-not-track.js +1 -1
  940. package/app/node_modules/caniuse-lite/data/features/document-currentscript.js +1 -1
  941. package/app/node_modules/caniuse-lite/data/features/document-evaluate-xpath.js +1 -1
  942. package/app/node_modules/caniuse-lite/data/features/document-execcommand.js +1 -1
  943. package/app/node_modules/caniuse-lite/data/features/document-policy.js +1 -1
  944. package/app/node_modules/caniuse-lite/data/features/document-scrollingelement.js +1 -1
  945. package/app/node_modules/caniuse-lite/data/features/documenthead.js +1 -1
  946. package/app/node_modules/caniuse-lite/data/features/dom-manip-convenience.js +1 -1
  947. package/app/node_modules/caniuse-lite/data/features/dom-range.js +1 -1
  948. package/app/node_modules/caniuse-lite/data/features/domcontentloaded.js +1 -1
  949. package/app/node_modules/caniuse-lite/data/features/dommatrix.js +1 -1
  950. package/app/node_modules/caniuse-lite/data/features/download.js +1 -1
  951. package/app/node_modules/caniuse-lite/data/features/dragndrop.js +1 -1
  952. package/app/node_modules/caniuse-lite/data/features/element-closest.js +1 -1
  953. package/app/node_modules/caniuse-lite/data/features/element-from-point.js +1 -1
  954. package/app/node_modules/caniuse-lite/data/features/element-scroll-methods.js +1 -1
  955. package/app/node_modules/caniuse-lite/data/features/eme.js +1 -1
  956. package/app/node_modules/caniuse-lite/data/features/eot.js +1 -1
  957. package/app/node_modules/caniuse-lite/data/features/es5.js +1 -1
  958. package/app/node_modules/caniuse-lite/data/features/es6-class.js +1 -1
  959. package/app/node_modules/caniuse-lite/data/features/es6-generators.js +1 -1
  960. package/app/node_modules/caniuse-lite/data/features/es6-module-dynamic-import.js +1 -1
  961. package/app/node_modules/caniuse-lite/data/features/es6-module.js +1 -1
  962. package/app/node_modules/caniuse-lite/data/features/es6-number.js +1 -1
  963. package/app/node_modules/caniuse-lite/data/features/es6-string-includes.js +1 -1
  964. package/app/node_modules/caniuse-lite/data/features/es6.js +1 -1
  965. package/app/node_modules/caniuse-lite/data/features/eventsource.js +1 -1
  966. package/app/node_modules/caniuse-lite/data/features/extended-system-fonts.js +1 -1
  967. package/app/node_modules/caniuse-lite/data/features/feature-policy.js +1 -1
  968. package/app/node_modules/caniuse-lite/data/features/fetch.js +1 -1
  969. package/app/node_modules/caniuse-lite/data/features/fieldset-disabled.js +1 -1
  970. package/app/node_modules/caniuse-lite/data/features/fileapi.js +1 -1
  971. package/app/node_modules/caniuse-lite/data/features/filereader.js +1 -1
  972. package/app/node_modules/caniuse-lite/data/features/filereadersync.js +1 -1
  973. package/app/node_modules/caniuse-lite/data/features/filesystem.js +1 -1
  974. package/app/node_modules/caniuse-lite/data/features/flac.js +1 -1
  975. package/app/node_modules/caniuse-lite/data/features/flexbox-gap.js +1 -1
  976. package/app/node_modules/caniuse-lite/data/features/flexbox.js +1 -1
  977. package/app/node_modules/caniuse-lite/data/features/flow-root.js +1 -1
  978. package/app/node_modules/caniuse-lite/data/features/focusin-focusout-events.js +1 -1
  979. package/app/node_modules/caniuse-lite/data/features/font-family-system-ui.js +1 -1
  980. package/app/node_modules/caniuse-lite/data/features/font-feature.js +1 -1
  981. package/app/node_modules/caniuse-lite/data/features/font-kerning.js +1 -1
  982. package/app/node_modules/caniuse-lite/data/features/font-loading.js +1 -1
  983. package/app/node_modules/caniuse-lite/data/features/font-size-adjust.js +1 -1
  984. package/app/node_modules/caniuse-lite/data/features/font-smooth.js +1 -1
  985. package/app/node_modules/caniuse-lite/data/features/font-unicode-range.js +1 -1
  986. package/app/node_modules/caniuse-lite/data/features/font-variant-alternates.js +1 -1
  987. package/app/node_modules/caniuse-lite/data/features/font-variant-numeric.js +1 -1
  988. package/app/node_modules/caniuse-lite/data/features/fontface.js +1 -1
  989. package/app/node_modules/caniuse-lite/data/features/form-attribute.js +1 -1
  990. package/app/node_modules/caniuse-lite/data/features/form-submit-attributes.js +1 -1
  991. package/app/node_modules/caniuse-lite/data/features/form-validation.js +1 -1
  992. package/app/node_modules/caniuse-lite/data/features/forms.js +1 -1
  993. package/app/node_modules/caniuse-lite/data/features/fullscreen.js +1 -1
  994. package/app/node_modules/caniuse-lite/data/features/gamepad.js +1 -1
  995. package/app/node_modules/caniuse-lite/data/features/geolocation.js +1 -1
  996. package/app/node_modules/caniuse-lite/data/features/getboundingclientrect.js +1 -1
  997. package/app/node_modules/caniuse-lite/data/features/getcomputedstyle.js +1 -1
  998. package/app/node_modules/caniuse-lite/data/features/getelementsbyclassname.js +1 -1
  999. package/app/node_modules/caniuse-lite/data/features/getrandomvalues.js +1 -1
  1000. package/app/node_modules/caniuse-lite/data/features/gyroscope.js +1 -1
  1001. package/app/node_modules/caniuse-lite/data/features/hardwareconcurrency.js +1 -1
  1002. package/app/node_modules/caniuse-lite/data/features/hashchange.js +1 -1
  1003. package/app/node_modules/caniuse-lite/data/features/heif.js +1 -1
  1004. package/app/node_modules/caniuse-lite/data/features/hevc.js +1 -1
  1005. package/app/node_modules/caniuse-lite/data/features/hidden.js +1 -1
  1006. package/app/node_modules/caniuse-lite/data/features/high-resolution-time.js +1 -1
  1007. package/app/node_modules/caniuse-lite/data/features/history.js +1 -1
  1008. package/app/node_modules/caniuse-lite/data/features/html-media-capture.js +1 -1
  1009. package/app/node_modules/caniuse-lite/data/features/html5semantic.js +1 -1
  1010. package/app/node_modules/caniuse-lite/data/features/http-live-streaming.js +1 -1
  1011. package/app/node_modules/caniuse-lite/data/features/http2.js +1 -1
  1012. package/app/node_modules/caniuse-lite/data/features/http3.js +1 -1
  1013. package/app/node_modules/caniuse-lite/data/features/iframe-sandbox.js +1 -1
  1014. package/app/node_modules/caniuse-lite/data/features/iframe-seamless.js +1 -1
  1015. package/app/node_modules/caniuse-lite/data/features/iframe-srcdoc.js +1 -1
  1016. package/app/node_modules/caniuse-lite/data/features/imagecapture.js +1 -1
  1017. package/app/node_modules/caniuse-lite/data/features/ime.js +1 -1
  1018. package/app/node_modules/caniuse-lite/data/features/img-naturalwidth-naturalheight.js +1 -1
  1019. package/app/node_modules/caniuse-lite/data/features/import-maps.js +1 -1
  1020. package/app/node_modules/caniuse-lite/data/features/imports.js +1 -1
  1021. package/app/node_modules/caniuse-lite/data/features/indeterminate-checkbox.js +1 -1
  1022. package/app/node_modules/caniuse-lite/data/features/indexeddb.js +1 -1
  1023. package/app/node_modules/caniuse-lite/data/features/indexeddb2.js +1 -1
  1024. package/app/node_modules/caniuse-lite/data/features/inline-block.js +1 -1
  1025. package/app/node_modules/caniuse-lite/data/features/innertext.js +1 -1
  1026. package/app/node_modules/caniuse-lite/data/features/input-autocomplete-onoff.js +1 -1
  1027. package/app/node_modules/caniuse-lite/data/features/input-color.js +1 -1
  1028. package/app/node_modules/caniuse-lite/data/features/input-datetime.js +1 -1
  1029. package/app/node_modules/caniuse-lite/data/features/input-email-tel-url.js +1 -1
  1030. package/app/node_modules/caniuse-lite/data/features/input-event.js +1 -1
  1031. package/app/node_modules/caniuse-lite/data/features/input-file-accept.js +1 -1
  1032. package/app/node_modules/caniuse-lite/data/features/input-file-directory.js +1 -1
  1033. package/app/node_modules/caniuse-lite/data/features/input-file-multiple.js +1 -1
  1034. package/app/node_modules/caniuse-lite/data/features/input-inputmode.js +1 -1
  1035. package/app/node_modules/caniuse-lite/data/features/input-minlength.js +1 -1
  1036. package/app/node_modules/caniuse-lite/data/features/input-number.js +1 -1
  1037. package/app/node_modules/caniuse-lite/data/features/input-pattern.js +1 -1
  1038. package/app/node_modules/caniuse-lite/data/features/input-placeholder.js +1 -1
  1039. package/app/node_modules/caniuse-lite/data/features/input-range.js +1 -1
  1040. package/app/node_modules/caniuse-lite/data/features/input-search.js +1 -1
  1041. package/app/node_modules/caniuse-lite/data/features/input-selection.js +1 -1
  1042. package/app/node_modules/caniuse-lite/data/features/insert-adjacent.js +1 -1
  1043. package/app/node_modules/caniuse-lite/data/features/insertadjacenthtml.js +1 -1
  1044. package/app/node_modules/caniuse-lite/data/features/internationalization.js +1 -1
  1045. package/app/node_modules/caniuse-lite/data/features/intersectionobserver-v2.js +1 -1
  1046. package/app/node_modules/caniuse-lite/data/features/intersectionobserver.js +1 -1
  1047. package/app/node_modules/caniuse-lite/data/features/intl-pluralrules.js +1 -1
  1048. package/app/node_modules/caniuse-lite/data/features/intrinsic-width.js +1 -1
  1049. package/app/node_modules/caniuse-lite/data/features/jpeg2000.js +1 -1
  1050. package/app/node_modules/caniuse-lite/data/features/jpegxl.js +1 -1
  1051. package/app/node_modules/caniuse-lite/data/features/jpegxr.js +1 -1
  1052. package/app/node_modules/caniuse-lite/data/features/js-regexp-lookbehind.js +1 -1
  1053. package/app/node_modules/caniuse-lite/data/features/json.js +1 -1
  1054. package/app/node_modules/caniuse-lite/data/features/justify-content-space-evenly.js +1 -1
  1055. package/app/node_modules/caniuse-lite/data/features/kerning-pairs-ligatures.js +1 -1
  1056. package/app/node_modules/caniuse-lite/data/features/keyboardevent-charcode.js +1 -1
  1057. package/app/node_modules/caniuse-lite/data/features/keyboardevent-code.js +1 -1
  1058. package/app/node_modules/caniuse-lite/data/features/keyboardevent-getmodifierstate.js +1 -1
  1059. package/app/node_modules/caniuse-lite/data/features/keyboardevent-key.js +1 -1
  1060. package/app/node_modules/caniuse-lite/data/features/keyboardevent-location.js +1 -1
  1061. package/app/node_modules/caniuse-lite/data/features/keyboardevent-which.js +1 -1
  1062. package/app/node_modules/caniuse-lite/data/features/lazyload.js +1 -1
  1063. package/app/node_modules/caniuse-lite/data/features/let.js +1 -1
  1064. package/app/node_modules/caniuse-lite/data/features/link-icon-png.js +1 -1
  1065. package/app/node_modules/caniuse-lite/data/features/link-icon-svg.js +1 -1
  1066. package/app/node_modules/caniuse-lite/data/features/link-rel-dns-prefetch.js +1 -1
  1067. package/app/node_modules/caniuse-lite/data/features/link-rel-modulepreload.js +1 -1
  1068. package/app/node_modules/caniuse-lite/data/features/link-rel-preconnect.js +1 -1
  1069. package/app/node_modules/caniuse-lite/data/features/link-rel-prefetch.js +1 -1
  1070. package/app/node_modules/caniuse-lite/data/features/link-rel-preload.js +1 -1
  1071. package/app/node_modules/caniuse-lite/data/features/link-rel-prerender.js +1 -1
  1072. package/app/node_modules/caniuse-lite/data/features/loading-lazy-attr.js +1 -1
  1073. package/app/node_modules/caniuse-lite/data/features/loading-lazy-media.js +1 -1
  1074. package/app/node_modules/caniuse-lite/data/features/localecompare.js +1 -1
  1075. package/app/node_modules/caniuse-lite/data/features/magnetometer.js +1 -1
  1076. package/app/node_modules/caniuse-lite/data/features/matchesselector.js +1 -1
  1077. package/app/node_modules/caniuse-lite/data/features/matchmedia.js +1 -1
  1078. package/app/node_modules/caniuse-lite/data/features/mathml.js +1 -1
  1079. package/app/node_modules/caniuse-lite/data/features/maxlength.js +1 -1
  1080. package/app/node_modules/caniuse-lite/data/features/mdn-css-backdrop-pseudo-element.js +1 -1
  1081. package/app/node_modules/caniuse-lite/data/features/mdn-css-unicode-bidi-isolate-override.js +1 -1
  1082. package/app/node_modules/caniuse-lite/data/features/mdn-css-unicode-bidi-isolate.js +1 -1
  1083. package/app/node_modules/caniuse-lite/data/features/mdn-css-unicode-bidi-plaintext.js +1 -1
  1084. package/app/node_modules/caniuse-lite/data/features/mdn-text-decoration-color.js +1 -1
  1085. package/app/node_modules/caniuse-lite/data/features/mdn-text-decoration-line.js +1 -1
  1086. package/app/node_modules/caniuse-lite/data/features/mdn-text-decoration-shorthand.js +1 -1
  1087. package/app/node_modules/caniuse-lite/data/features/mdn-text-decoration-style.js +1 -1
  1088. package/app/node_modules/caniuse-lite/data/features/media-fragments.js +1 -1
  1089. package/app/node_modules/caniuse-lite/data/features/mediacapture-fromelement.js +1 -1
  1090. package/app/node_modules/caniuse-lite/data/features/mediarecorder.js +1 -1
  1091. package/app/node_modules/caniuse-lite/data/features/mediasource.js +1 -1
  1092. package/app/node_modules/caniuse-lite/data/features/menu.js +1 -1
  1093. package/app/node_modules/caniuse-lite/data/features/meta-theme-color.js +1 -1
  1094. package/app/node_modules/caniuse-lite/data/features/meter.js +1 -1
  1095. package/app/node_modules/caniuse-lite/data/features/midi.js +1 -1
  1096. package/app/node_modules/caniuse-lite/data/features/minmaxwh.js +1 -1
  1097. package/app/node_modules/caniuse-lite/data/features/mp3.js +1 -1
  1098. package/app/node_modules/caniuse-lite/data/features/mpeg-dash.js +1 -1
  1099. package/app/node_modules/caniuse-lite/data/features/mpeg4.js +1 -1
  1100. package/app/node_modules/caniuse-lite/data/features/multibackgrounds.js +1 -1
  1101. package/app/node_modules/caniuse-lite/data/features/multicolumn.js +1 -1
  1102. package/app/node_modules/caniuse-lite/data/features/mutation-events.js +1 -1
  1103. package/app/node_modules/caniuse-lite/data/features/mutationobserver.js +1 -1
  1104. package/app/node_modules/caniuse-lite/data/features/namevalue-storage.js +1 -1
  1105. package/app/node_modules/caniuse-lite/data/features/native-filesystem-api.js +1 -1
  1106. package/app/node_modules/caniuse-lite/data/features/nav-timing.js +1 -1
  1107. package/app/node_modules/caniuse-lite/data/features/netinfo.js +1 -1
  1108. package/app/node_modules/caniuse-lite/data/features/notifications.js +1 -1
  1109. package/app/node_modules/caniuse-lite/data/features/object-entries.js +1 -1
  1110. package/app/node_modules/caniuse-lite/data/features/object-fit.js +1 -1
  1111. package/app/node_modules/caniuse-lite/data/features/object-observe.js +1 -1
  1112. package/app/node_modules/caniuse-lite/data/features/object-values.js +1 -1
  1113. package/app/node_modules/caniuse-lite/data/features/objectrtc.js +1 -1
  1114. package/app/node_modules/caniuse-lite/data/features/offline-apps.js +1 -1
  1115. package/app/node_modules/caniuse-lite/data/features/offscreencanvas.js +1 -1
  1116. package/app/node_modules/caniuse-lite/data/features/ogg-vorbis.js +1 -1
  1117. package/app/node_modules/caniuse-lite/data/features/ogv.js +1 -1
  1118. package/app/node_modules/caniuse-lite/data/features/ol-reversed.js +1 -1
  1119. package/app/node_modules/caniuse-lite/data/features/once-event-listener.js +1 -1
  1120. package/app/node_modules/caniuse-lite/data/features/online-status.js +1 -1
  1121. package/app/node_modules/caniuse-lite/data/features/opus.js +1 -1
  1122. package/app/node_modules/caniuse-lite/data/features/orientation-sensor.js +1 -1
  1123. package/app/node_modules/caniuse-lite/data/features/outline.js +1 -1
  1124. package/app/node_modules/caniuse-lite/data/features/pad-start-end.js +1 -1
  1125. package/app/node_modules/caniuse-lite/data/features/page-transition-events.js +1 -1
  1126. package/app/node_modules/caniuse-lite/data/features/pagevisibility.js +1 -1
  1127. package/app/node_modules/caniuse-lite/data/features/passive-event-listener.js +1 -1
  1128. package/app/node_modules/caniuse-lite/data/features/passkeys.js +1 -1
  1129. package/app/node_modules/caniuse-lite/data/features/passwordrules.js +1 -1
  1130. package/app/node_modules/caniuse-lite/data/features/path2d.js +1 -1
  1131. package/app/node_modules/caniuse-lite/data/features/payment-request.js +1 -1
  1132. package/app/node_modules/caniuse-lite/data/features/pdf-viewer.js +1 -1
  1133. package/app/node_modules/caniuse-lite/data/features/permissions-api.js +1 -1
  1134. package/app/node_modules/caniuse-lite/data/features/permissions-policy.js +1 -1
  1135. package/app/node_modules/caniuse-lite/data/features/picture-in-picture.js +1 -1
  1136. package/app/node_modules/caniuse-lite/data/features/picture.js +1 -1
  1137. package/app/node_modules/caniuse-lite/data/features/ping.js +1 -1
  1138. package/app/node_modules/caniuse-lite/data/features/png-alpha.js +1 -1
  1139. package/app/node_modules/caniuse-lite/data/features/pointer-events.js +1 -1
  1140. package/app/node_modules/caniuse-lite/data/features/pointer.js +1 -1
  1141. package/app/node_modules/caniuse-lite/data/features/pointerlock.js +1 -1
  1142. package/app/node_modules/caniuse-lite/data/features/portals.js +1 -1
  1143. package/app/node_modules/caniuse-lite/data/features/prefers-color-scheme.js +1 -1
  1144. package/app/node_modules/caniuse-lite/data/features/prefers-reduced-motion.js +1 -1
  1145. package/app/node_modules/caniuse-lite/data/features/progress.js +1 -1
  1146. package/app/node_modules/caniuse-lite/data/features/promise-finally.js +1 -1
  1147. package/app/node_modules/caniuse-lite/data/features/promises.js +1 -1
  1148. package/app/node_modules/caniuse-lite/data/features/proximity.js +1 -1
  1149. package/app/node_modules/caniuse-lite/data/features/proxy.js +1 -1
  1150. package/app/node_modules/caniuse-lite/data/features/publickeypinning.js +1 -1
  1151. package/app/node_modules/caniuse-lite/data/features/push-api.js +1 -1
  1152. package/app/node_modules/caniuse-lite/data/features/queryselector.js +1 -1
  1153. package/app/node_modules/caniuse-lite/data/features/readonly-attr.js +1 -1
  1154. package/app/node_modules/caniuse-lite/data/features/referrer-policy.js +1 -1
  1155. package/app/node_modules/caniuse-lite/data/features/registerprotocolhandler.js +1 -1
  1156. package/app/node_modules/caniuse-lite/data/features/rel-noopener.js +1 -1
  1157. package/app/node_modules/caniuse-lite/data/features/rel-noreferrer.js +1 -1
  1158. package/app/node_modules/caniuse-lite/data/features/rellist.js +1 -1
  1159. package/app/node_modules/caniuse-lite/data/features/rem.js +1 -1
  1160. package/app/node_modules/caniuse-lite/data/features/requestanimationframe.js +1 -1
  1161. package/app/node_modules/caniuse-lite/data/features/requestidlecallback.js +1 -1
  1162. package/app/node_modules/caniuse-lite/data/features/resizeobserver.js +1 -1
  1163. package/app/node_modules/caniuse-lite/data/features/resource-timing.js +1 -1
  1164. package/app/node_modules/caniuse-lite/data/features/rest-parameters.js +1 -1
  1165. package/app/node_modules/caniuse-lite/data/features/rtcpeerconnection.js +1 -1
  1166. package/app/node_modules/caniuse-lite/data/features/ruby.js +1 -1
  1167. package/app/node_modules/caniuse-lite/data/features/run-in.js +1 -1
  1168. package/app/node_modules/caniuse-lite/data/features/same-site-cookie-attribute.js +1 -1
  1169. package/app/node_modules/caniuse-lite/data/features/screen-orientation.js +1 -1
  1170. package/app/node_modules/caniuse-lite/data/features/script-async.js +1 -1
  1171. package/app/node_modules/caniuse-lite/data/features/script-defer.js +1 -1
  1172. package/app/node_modules/caniuse-lite/data/features/scrollintoview.js +1 -1
  1173. package/app/node_modules/caniuse-lite/data/features/scrollintoviewifneeded.js +1 -1
  1174. package/app/node_modules/caniuse-lite/data/features/sdch.js +1 -1
  1175. package/app/node_modules/caniuse-lite/data/features/selection-api.js +1 -1
  1176. package/app/node_modules/caniuse-lite/data/features/server-timing.js +1 -1
  1177. package/app/node_modules/caniuse-lite/data/features/serviceworkers.js +1 -1
  1178. package/app/node_modules/caniuse-lite/data/features/setimmediate.js +1 -1
  1179. package/app/node_modules/caniuse-lite/data/features/shadowdom.js +1 -1
  1180. package/app/node_modules/caniuse-lite/data/features/shadowdomv1.js +1 -1
  1181. package/app/node_modules/caniuse-lite/data/features/sharedarraybuffer.js +1 -1
  1182. package/app/node_modules/caniuse-lite/data/features/sharedworkers.js +1 -1
  1183. package/app/node_modules/caniuse-lite/data/features/sni.js +1 -1
  1184. package/app/node_modules/caniuse-lite/data/features/spdy.js +1 -1
  1185. package/app/node_modules/caniuse-lite/data/features/speech-recognition.js +1 -1
  1186. package/app/node_modules/caniuse-lite/data/features/speech-synthesis.js +1 -1
  1187. package/app/node_modules/caniuse-lite/data/features/spellcheck-attribute.js +1 -1
  1188. package/app/node_modules/caniuse-lite/data/features/sql-storage.js +1 -1
  1189. package/app/node_modules/caniuse-lite/data/features/srcset.js +1 -1
  1190. package/app/node_modules/caniuse-lite/data/features/stream.js +1 -1
  1191. package/app/node_modules/caniuse-lite/data/features/streams.js +1 -1
  1192. package/app/node_modules/caniuse-lite/data/features/stricttransportsecurity.js +1 -1
  1193. package/app/node_modules/caniuse-lite/data/features/style-scoped.js +1 -1
  1194. package/app/node_modules/caniuse-lite/data/features/subresource-bundling.js +1 -1
  1195. package/app/node_modules/caniuse-lite/data/features/subresource-integrity.js +1 -1
  1196. package/app/node_modules/caniuse-lite/data/features/svg-css.js +1 -1
  1197. package/app/node_modules/caniuse-lite/data/features/svg-filters.js +1 -1
  1198. package/app/node_modules/caniuse-lite/data/features/svg-fonts.js +1 -1
  1199. package/app/node_modules/caniuse-lite/data/features/svg-fragment.js +1 -1
  1200. package/app/node_modules/caniuse-lite/data/features/svg-html.js +1 -1
  1201. package/app/node_modules/caniuse-lite/data/features/svg-html5.js +1 -1
  1202. package/app/node_modules/caniuse-lite/data/features/svg-img.js +1 -1
  1203. package/app/node_modules/caniuse-lite/data/features/svg-smil.js +1 -1
  1204. package/app/node_modules/caniuse-lite/data/features/svg.js +1 -1
  1205. package/app/node_modules/caniuse-lite/data/features/sxg.js +1 -1
  1206. package/app/node_modules/caniuse-lite/data/features/tabindex-attr.js +1 -1
  1207. package/app/node_modules/caniuse-lite/data/features/template-literals.js +1 -1
  1208. package/app/node_modules/caniuse-lite/data/features/template.js +1 -1
  1209. package/app/node_modules/caniuse-lite/data/features/temporal.js +1 -1
  1210. package/app/node_modules/caniuse-lite/data/features/testfeat.js +1 -1
  1211. package/app/node_modules/caniuse-lite/data/features/text-decoration.js +1 -1
  1212. package/app/node_modules/caniuse-lite/data/features/text-emphasis.js +1 -1
  1213. package/app/node_modules/caniuse-lite/data/features/text-overflow.js +1 -1
  1214. package/app/node_modules/caniuse-lite/data/features/text-size-adjust.js +1 -1
  1215. package/app/node_modules/caniuse-lite/data/features/text-stroke.js +1 -1
  1216. package/app/node_modules/caniuse-lite/data/features/textcontent.js +1 -1
  1217. package/app/node_modules/caniuse-lite/data/features/textencoder.js +1 -1
  1218. package/app/node_modules/caniuse-lite/data/features/tls1-1.js +1 -1
  1219. package/app/node_modules/caniuse-lite/data/features/tls1-2.js +1 -1
  1220. package/app/node_modules/caniuse-lite/data/features/tls1-3.js +1 -1
  1221. package/app/node_modules/caniuse-lite/data/features/touch.js +1 -1
  1222. package/app/node_modules/caniuse-lite/data/features/transforms2d.js +1 -1
  1223. package/app/node_modules/caniuse-lite/data/features/transforms3d.js +1 -1
  1224. package/app/node_modules/caniuse-lite/data/features/trusted-types.js +1 -1
  1225. package/app/node_modules/caniuse-lite/data/features/ttf.js +1 -1
  1226. package/app/node_modules/caniuse-lite/data/features/typedarrays.js +1 -1
  1227. package/app/node_modules/caniuse-lite/data/features/u2f.js +1 -1
  1228. package/app/node_modules/caniuse-lite/data/features/unhandledrejection.js +1 -1
  1229. package/app/node_modules/caniuse-lite/data/features/upgradeinsecurerequests.js +1 -1
  1230. package/app/node_modules/caniuse-lite/data/features/url-scroll-to-text-fragment.js +1 -1
  1231. package/app/node_modules/caniuse-lite/data/features/url.js +1 -1
  1232. package/app/node_modules/caniuse-lite/data/features/urlsearchparams.js +1 -1
  1233. package/app/node_modules/caniuse-lite/data/features/use-strict.js +1 -1
  1234. package/app/node_modules/caniuse-lite/data/features/user-select-none.js +1 -1
  1235. package/app/node_modules/caniuse-lite/data/features/user-timing.js +1 -1
  1236. package/app/node_modules/caniuse-lite/data/features/variable-fonts.js +1 -1
  1237. package/app/node_modules/caniuse-lite/data/features/vector-effect.js +1 -1
  1238. package/app/node_modules/caniuse-lite/data/features/vibration.js +1 -1
  1239. package/app/node_modules/caniuse-lite/data/features/video.js +1 -1
  1240. package/app/node_modules/caniuse-lite/data/features/videotracks.js +1 -1
  1241. package/app/node_modules/caniuse-lite/data/features/view-transitions.js +1 -1
  1242. package/app/node_modules/caniuse-lite/data/features/viewport-unit-variants.js +1 -1
  1243. package/app/node_modules/caniuse-lite/data/features/viewport-units.js +1 -1
  1244. package/app/node_modules/caniuse-lite/data/features/wai-aria.js +1 -1
  1245. package/app/node_modules/caniuse-lite/data/features/wake-lock.js +1 -1
  1246. package/app/node_modules/caniuse-lite/data/features/wasm-bigint.js +1 -1
  1247. package/app/node_modules/caniuse-lite/data/features/wasm-bulk-memory.js +1 -1
  1248. package/app/node_modules/caniuse-lite/data/features/wasm-extended-const.js +1 -1
  1249. package/app/node_modules/caniuse-lite/data/features/wasm-gc.js +1 -1
  1250. package/app/node_modules/caniuse-lite/data/features/wasm-multi-memory.js +1 -1
  1251. package/app/node_modules/caniuse-lite/data/features/wasm-multi-value.js +1 -1
  1252. package/app/node_modules/caniuse-lite/data/features/wasm-mutable-globals.js +1 -1
  1253. package/app/node_modules/caniuse-lite/data/features/wasm-nontrapping-fptoint.js +1 -1
  1254. package/app/node_modules/caniuse-lite/data/features/wasm-reference-types.js +1 -1
  1255. package/app/node_modules/caniuse-lite/data/features/wasm-relaxed-simd.js +1 -1
  1256. package/app/node_modules/caniuse-lite/data/features/wasm-signext.js +1 -1
  1257. package/app/node_modules/caniuse-lite/data/features/wasm-simd.js +1 -1
  1258. package/app/node_modules/caniuse-lite/data/features/wasm-tail-calls.js +1 -1
  1259. package/app/node_modules/caniuse-lite/data/features/wasm-threads.js +1 -1
  1260. package/app/node_modules/caniuse-lite/data/features/wasm.js +1 -1
  1261. package/app/node_modules/caniuse-lite/data/features/wav.js +1 -1
  1262. package/app/node_modules/caniuse-lite/data/features/wbr-element.js +1 -1
  1263. package/app/node_modules/caniuse-lite/data/features/web-animation.js +1 -1
  1264. package/app/node_modules/caniuse-lite/data/features/web-app-manifest.js +1 -1
  1265. package/app/node_modules/caniuse-lite/data/features/web-bluetooth.js +1 -1
  1266. package/app/node_modules/caniuse-lite/data/features/web-serial.js +1 -1
  1267. package/app/node_modules/caniuse-lite/data/features/web-share.js +1 -1
  1268. package/app/node_modules/caniuse-lite/data/features/webauthn.js +1 -1
  1269. package/app/node_modules/caniuse-lite/data/features/webcodecs.js +1 -1
  1270. package/app/node_modules/caniuse-lite/data/features/webgl.js +1 -1
  1271. package/app/node_modules/caniuse-lite/data/features/webgl2.js +1 -1
  1272. package/app/node_modules/caniuse-lite/data/features/webgpu.js +1 -1
  1273. package/app/node_modules/caniuse-lite/data/features/webhid.js +1 -1
  1274. package/app/node_modules/caniuse-lite/data/features/webkit-user-drag.js +1 -1
  1275. package/app/node_modules/caniuse-lite/data/features/webm.js +1 -1
  1276. package/app/node_modules/caniuse-lite/data/features/webnfc.js +1 -1
  1277. package/app/node_modules/caniuse-lite/data/features/webp.js +1 -1
  1278. package/app/node_modules/caniuse-lite/data/features/websockets.js +1 -1
  1279. package/app/node_modules/caniuse-lite/data/features/webtransport.js +1 -1
  1280. package/app/node_modules/caniuse-lite/data/features/webusb.js +1 -1
  1281. package/app/node_modules/caniuse-lite/data/features/webvr.js +1 -1
  1282. package/app/node_modules/caniuse-lite/data/features/webvtt.js +1 -1
  1283. package/app/node_modules/caniuse-lite/data/features/webworkers.js +1 -1
  1284. package/app/node_modules/caniuse-lite/data/features/webxr.js +1 -1
  1285. package/app/node_modules/caniuse-lite/data/features/will-change.js +1 -1
  1286. package/app/node_modules/caniuse-lite/data/features/woff.js +1 -1
  1287. package/app/node_modules/caniuse-lite/data/features/woff2.js +1 -1
  1288. package/app/node_modules/caniuse-lite/data/features/word-break.js +1 -1
  1289. package/app/node_modules/caniuse-lite/data/features/wordwrap.js +1 -1
  1290. package/app/node_modules/caniuse-lite/data/features/x-doc-messaging.js +1 -1
  1291. package/app/node_modules/caniuse-lite/data/features/x-frame-options.js +1 -1
  1292. package/app/node_modules/caniuse-lite/data/features/xhr2.js +1 -1
  1293. package/app/node_modules/caniuse-lite/data/features/xhtml.js +1 -1
  1294. package/app/node_modules/caniuse-lite/data/features/xhtmlsmil.js +1 -1
  1295. package/app/node_modules/caniuse-lite/data/features/xml-serializer.js +1 -1
  1296. package/app/node_modules/caniuse-lite/data/features/zstd.js +1 -1
  1297. package/app/node_modules/caniuse-lite/package.json +1 -1
  1298. package/app/package.json +1 -1
  1299. package/app/server.js +1 -1
  1300. package/package.json +1 -1
  1301. package/app/.next-cli-build/server/chunks/8581.js +0 -64
  1302. package/app/.next-cli-build/static/chunks/2714-83a368a92f8c292c.js +0 -64
  1303. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/page-2d20542fb8e54b68.js +0 -1
  1304. package/app/.next-cli-build/static/css/235bf5022a58e050.css +0 -1
  1305. /package/app/.next-cli-build/static/{a4sfNmyQir_TloQgNMKz9 → XKme12oLWBYq9ZTf1e1uz}/_buildManifest.js +0 -0
  1306. /package/app/.next-cli-build/static/{a4sfNmyQir_TloQgNMKz9 → XKme12oLWBYq9ZTf1e1uz}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3649],{20061:(e,t,n)=>{Promise.resolve().then(n.bind(n,47295))},47295:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>X});var a=n(95155),r=n(12115),s=n(44923),l=n(87256),i=n(39768),o=n(5020),d=n(35497),c=n(11059),m=n(28777),u=n(52679);let x=/^[a-zA-Z0-9_.\-]+$/,p=[{value:"global",label:"To\xe0n cục / h\xe0nh vi hiện tại",description:"Giữ h\xe0nh vi hiện tại: mọi request d\xf9ng chung v\xf2ng xoay combo to\xe0n cục."},{value:"client_ip",label:"IP client",description:"Giữ c\xf9ng model khởi đầu cho c\xf9ng IP client cho đến khi hết TTL."},{value:"client_session",label:"IP client + phi\xean chat",description:"Ph\xf9 hợp nhất cho c\xf4ng cụ chat. Giữ c\xf9ng model cho c\xf9ng m\xe1y v\xe0 c\xf9ng phi\xean chat."}],h=[{value:"fallback",label:"Ưu ti\xean fallback",description:"Thử model trong combo theo đ\xfang thứ tự hiển thị, lỗi th\xec fallback."},{value:"round-robin",label:"Round Robin",description:"Lu\xe2n phi\xean model đang bật được thử đầu ti\xean. C\xe1c t\xf9y chọn giữ d\xednh b\xean dưới vẫn được \xe1p dụng."},{value:"least-latency",label:"Độ trễ thấp nhất",description:"Ưu ti\xean target c\xf3 điểm health/độ trễ tốt nhất. Hữu \xedch cho LAN Ollama."},{value:"p2c",label:"P2C",description:"Power of Two Choices: lấy mẫu hai target khỏe rồi chọn target \xedt bận hơn."}],b=[{card:"border-sky-100 bg-sky-50/55 dark:border-sky-400/15 dark:bg-sky-950/10",panel:"border-sky-100/80 bg-white/80 dark:border-sky-400/15 dark:bg-zinc-950/60"},{card:"border-slate-200 bg-slate-50/80 dark:border-slate-500/15 dark:bg-slate-900/35",panel:"border-slate-200/80 bg-white/80 dark:border-slate-500/15 dark:bg-zinc-950/60"},{card:"border-emerald-100 bg-emerald-50/45 dark:border-emerald-400/15 dark:bg-emerald-950/10",panel:"border-emerald-100/80 bg-white/80 dark:border-emerald-400/15 dark:bg-zinc-950/60"},{card:"border-violet-100 bg-violet-50/45 dark:border-violet-400/15 dark:bg-violet-950/10",panel:"border-violet-100/80 bg-white/80 dark:border-violet-400/15 dark:bg-zinc-950/60"}],g=Object.freeze({temperature:.3,top_p:.95,presence_penalty:0,max_tokens:4096,reasoning_budget:0,thinkingMode:"off",forceThinkingOffAboveChars:5e4}),f=Object.freeze({temperature:.2,top_p:.95,presence_penalty:0,max_tokens:4096}),y=[{value:"inherit",label:"Theo request gốc",description:"Giữ nguy\xean request gốc, kh\xf4ng inject thinking."},{value:"off",label:"Tắt thinking",description:"Gửi chat_template_kwargs.enable_thinking = false."},{value:"on",label:"Bật thinking",description:"Gửi chat_template_kwargs.enable_thinking = true."}],v=[{value:"inherit",label:"Theo cấu h\xecnh hệ thống",description:"Sử dụng ch\xednh s\xe1ch lưu Prompt Logs chung của hệ thống."},{value:"enabled",label:"Lưu đầy đủ nội dung",description:"Cho ph\xe9p quản trị vi\xean xem lại to\xe0n bộ prompt v\xe0 phản hồi của c\xe1c request thuộc combo n\xe0y."},{value:"disabled",label:"Chỉ lưu thống k\xea",description:"Kh\xf4ng lưu nội dung hội thoại. Chỉ lưu metadata, model, provider, token, thời gian xử l\xfd v\xe0 c\xe1c thống k\xea vận h\xe0nh."}];function k(e){return e&&"object"==typeof e&&!Array.isArray(e)}function j(e,t){return Object.prototype.hasOwnProperty.call(e||{},t)}function N(e,{min:t,max:n,precision:a=3}={}){if(null==e||""===e)return;let r=Number(e);if(Number.isFinite(r))return Number(Math.min(n,Math.max(t,r)).toFixed(a))}function _(e,{min:t,max:n}={}){let a=N(e,{min:t,max:n,precision:0});return void 0===a?void 0:Math.trunc(a)}function C(e){let t=O(e).toLowerCase();return"enabled"===t||"disabled"===t?t:"inherit"}function w(e={}){let t=k(e)?e:{},n={};if(j(t,"temperature")){let e=N(t.temperature,{min:0,max:2});void 0!==e&&(n.temperature=e)}if(j(t,"top_p")||j(t,"topP")){let e=N(t.top_p??t.topP,{min:.01,max:1});void 0!==e&&(n.top_p=e)}let a=t.presence_penalty??t.presencePenalty??t["presence-penalty"];if(j(t,"presence_penalty")||j(t,"presencePenalty")||j(t,"presence-penalty")){let e=N(a,{min:-2,max:2});void 0!==e&&(n.presence_penalty=e)}let r=t.max_tokens??t.maxTokens??t.max_token;if(j(t,"max_tokens")||j(t,"maxTokens")||j(t,"max_token")){let e=_(r,{min:1,max:262144});void 0!==e&&(n.max_tokens=e)}return n}function T(e={}){let t=k(e)?e:{},n={};if(j(t,"temperature")){let e=N(t.temperature,{min:0,max:2});void 0!==e&&(n.temperature=e)}if(j(t,"top_p")){let e=N(t.top_p,{min:.01,max:1});void 0!==e&&(n.top_p=e)}let a=t.presence_penalty??t.presencePenalty??t["presence-penalty"];if(j(t,"presence_penalty")||j(t,"presencePenalty")||j(t,"presence-penalty")){let e=N(a,{min:-2,max:2});void 0!==e&&(n.presence_penalty=e)}let r=t.max_tokens??t.maxTokens??t.max_token;if(j(t,"max_tokens")||j(t,"maxTokens")||j(t,"max_token")){let e=_(r,{min:1,max:262144});void 0!==e&&(n.max_tokens=e)}let s=t.reasoning_budget??t.reasoningBudget??t["reasoning-budget"];if(j(t,"reasoning_budget")||j(t,"reasoningBudget")||j(t,"reasoning-budget")){let e=_(s,{min:0,max:262144});void 0!==e&&(n.reasoning_budget=e)}let l=t.forceThinkingOffAboveChars??t.forceThinkingOffChars??t.force_thinking_off_above_chars;if(j(t,"forceThinkingOffAboveChars")||j(t,"forceThinkingOffChars")||j(t,"force_thinking_off_above_chars")){let e=_(l,{min:0,max:1e6});void 0!==e&&(n.forceThinkingOffAboveChars=e)}let i=t.forceThinkingOffRequestOverrides??t.forceThinkingOffOverrides??t.autoOffRequestOverrides;if(j(t,"forceThinkingOffRequestOverrides")||j(t,"forceThinkingOffOverrides")||j(t,"autoOffRequestOverrides")){let e=w(i);Object.keys(e).length>0&&(n.forceThinkingOffRequestOverrides=e)}let o=function(e){if(!0===e)return"on";if(!1===e)return"off";let t=O(e).toLowerCase();return["on","true","1","enable","enabled"].includes(t)?"on":["off","false","0","disable","disabled"].includes(t)?"off":void 0}(t.thinkingMode??t.thinking);return o&&(n.thinkingMode=o),n}function O(e){return String(e||"").trim()}function S(e={}){return Array.isArray(e.disabledModels)?[...new Set(e.disabledModels.map(e=>O(e)).filter(Boolean))]:[]}function $(e={}){let t=e.fallbackStrategy||"fallback";return{...e,fallbackStrategy:t,stickyScope:e.stickyScope||"global",stickyTtlMinutes:Number(e.stickyTtlMinutes||120),stickyFallbackToClientIp:!1!==e.stickyFallbackToClientIp,lanHealthEnabled:!1!==e.lanHealthEnabled,healthCheckPath:e.healthCheckPath||"/api/tags",healthCheckIntervalMs:Number(e.healthCheckIntervalMs||15e3),requiredTags:Array.isArray(e.requiredTags)?e.requiredTags:[],modelTagRules:e.modelTagRules||e.modelTags||e.tagRules||{},disabledModels:S(e),requestOverrides:T(e.requestOverrides||{}),contentLoggingMode:C(e.contentLoggingMode)}}function M(e={}){let t={...e};t.disabledModels=S(e),"fallback"===(t.fallbackStrategy||"fallback")&&delete t.fallbackStrategy,t.disabledModels.length||delete t.disabledModels;let n=C(t.contentLoggingMode);"inherit"===n?delete t.contentLoggingMode:t.contentLoggingMode=n,t.requiredTags?.length||delete t.requiredTags;let a=T(t.requestOverrides||{});return Object.keys(a).length?t.requestOverrides=a:delete t.requestOverrides,t.modelTagRules&&0!==Object.keys(t.modelTagRules).length||delete t.modelTagRules,"/api/tags"===t.healthCheckPath&&delete t.healthCheckPath,15e3===Number(t.healthCheckIntervalMs)&&delete t.healthCheckIntervalMs,!0===t.lanHealthEnabled&&delete t.lanHealthEnabled,Object.keys(t).length?t:null}function q(e=[]){return Array.isArray(e)?e.join(", "):String(e||"")}function L(e=""){return String(e||"").split(/[\n,;]+/).map(e=>e.trim()).filter(Boolean)}function E(e={}){return e&&"object"==typeof e?Object.entries(e).map(([e,t])=>`${e}: ${Array.isArray(t)?t.join(", "):String(t||"")}`).join("\n"):""}function A(e){return"string"==typeof e?e:e&&"object"==typeof e&&(e.value||e.model||e.id)||""}function P(e={}){let t=O(e.provider);return O(e.providerSpecificData?.prefix)||O(e.prefix)||O((0,u.wG)(t))||t}function R(e={}){return O(e.email)||O(e.accountName)||O(e.displayName)||O(e.name)||O(e.providerSpecificData?.nodeName)||O(e.id)}function I(e){return e&&"object"==typeof e?O(e.connectionId||e.connection_id):""}function B(e){let t=A(e),n=I(e);return t?n?`${t}@@${n}`:t:""}function z(e){return"string"==typeof e?e:e&&"object"==typeof e?O(e.label)||O(e.displayName)||O(e.name)||A(e):""}function D(e){if(!e||"object"!=typeof e)return A(e);let t=A(e);return t?Object.fromEntries(Object.entries({model:t,connectionId:I(e)||void 0,label:z(e)||void 0,provider:O(e.provider)||void 0,accountName:O(e.accountName||e.account_name)||void 0,weight:Number(e.weight||0)>0?Number(e.weight):void 0}).filter(([,e])=>void 0!==e&&""!==e)):""}function F(e,t=!0){let n=D(e),a=B(n);return{value:a,enabled:t,target:n,label:z(n)||a,subtitle:function(e){if(!e||"object"!=typeof e)return"";let t=I(e),n=A(e);return t?`T\xe0i khoản cố định • ${t}${n?` • ${n}`:""}`:""}(n)}}function G(e={}){return O(e.defaultModel)||O(e.providerSpecificData?.defaultModel)||O(e.model)||""}function H(e,t,n,a=""){let r=O(n);!r||t.has(r)||(t.add(r),e.push({value:r,label:O(a)||r}))}function K(e={},t={}){let n=[],a=new Set,r=O(e.provider),s=[...new Set([P(e),O((0,u.wG)(r)),r].filter(Boolean))];for(let e of(0,m.KC)(r)||[])e?.type&&"llm"!==e.type||H(n,a,e.id,e.name||e.id);for(let[e,r]of Object.entries(t||{})){let t=O(r),l=s.find(e=>e&&t.startsWith(`${e}/`));if(!l)continue;let i=t.slice(l.length+1);H(n,a,i,e||i)}return H(n,a,G(e),"Model mặc định"),n}function J(e={},{disabledModels:t=[],requestOverrides:n,contentLoggingMode:a}={}){let r={...e},s=[...new Set((t||[]).map(e=>O(e)).filter(Boolean))];if(s.length>0?r.disabledModels=s:delete r.disabledModels,void 0!==n){let e=T(n||{});Object.keys(e).length?r.requestOverrides=e:delete r.requestOverrides}if(void 0!==a){let e=C(a);"inherit"===e?delete r.contentLoggingMode:r.contentLoggingMode=e}return M(r)}function X(){let[e,t]=(0,r.useState)([]),[n,s]=(0,r.useState)(!0),[l,i]=(0,r.useState)(!1),[o,m]=(0,r.useState)(null),[u,x]=(0,r.useState)([]),[p,h]=(0,r.useState)(!1),[b,g]=(0,r.useState)(!1),[f,y]=(0,r.useState)({}),[v,k]=(0,r.useState)(""),[j,N]=(0,r.useState)(null),{copied:_,copy:C}=(0,c.C)();(0,r.useEffect)(()=>{w()},[]),(0,r.useEffect)(()=>{if(0===e.length){v&&k("");return}let t=e.some(e=>e.name===v);v&&t||k(e[0].name)},[e,v]);let w=async()=>{try{let e=await fetch("/api/dashboard/combos",{cache:"no-store"}),n=await e.json();e.ok&&(t(n.combos||[]),y(n.comboStrategies||{}))}catch(e){console.log("Error fetching combo data:",e)}finally{s(!1)}},T=async()=>{if(!p&&!b){g(!0);try{let e=await fetch("/api/providers",{cache:"no-store"}),t=await e.json();e.ok&&(x(t.connections||[]),h(!0))}catch(e){console.log("Error loading provider accounts:",e)}finally{g(!1)}}},O=async()=>{i(!0),T()},S=async e=>{m(e),T()},q=async e=>{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategies:e})}),y(e)},L=async e=>{let{disabledModels:t=[],requestOverrides:n,contentLoggingMode:a,...r}=e;try{let e=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});if(e.ok){let e=J({},{disabledModels:t,requestOverrides:n,contentLoggingMode:a});e&&await q({...f,[r.name]:e}),await w(),k(r.name),i(!1)}else{let t=await e.json();alert(t.error||"Tạo combo thất bại")}}catch(e){console.log("Error creating combo:",e)}},E=async(e,t)=>{let{disabledModels:n=[],requestOverrides:a,contentLoggingMode:r,...s}=t,l=o?.name;try{let t=await fetch(`/api/combos/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});if(t.ok){let e={...f};l&&l!==s.name&&e[l]&&(e[s.name]=e[l],delete e[l]);let t=J(e[s.name]||{},{disabledModels:n,requestOverrides:a,contentLoggingMode:r});t?e[s.name]=t:delete e[s.name],await q(e),await w(),k(s.name),m(null)}else{let e=await t.json();alert(e.error||"Cập nhật combo thất bại")}}catch(e){console.log("Error updating combo:",e)}},A=async n=>{let a=e.find(e=>e.id===n);N({title:"X\xf3a combo",message:"Bạn c\xf3 chắc muốn x\xf3a combo n\xe0y?",onConfirm:async()=>{N(null);try{if((await fetch(`/api/combos/${n}`,{method:"DELETE"})).ok){if(a?.name&&f[a.name]){let e={...f};delete e[a.name],await q(e)}t(e=>{let t=e.filter(e=>e.id!==n);return a?.name===v&&k(t[0]?.name||""),t})}}catch(e){console.log("Error deleting combo:",e)}}})},P=async(e,t)=>{try{let n={...f};if(t)n[e]=$(n[e]);else{let t=function(e={}){return M({...e,fallbackStrategy:"fallback"})}(n[e]||{});t?n[e]=t:delete n[e]}await q(n)}catch(e){console.log("Error updating combo strategy:",e)}},R=async(e,t)=>{try{let n={...f},a=M({...$(n[e]),...t});a?n[e]=a:delete n[e],await q(n)}catch(e){console.log("Error updating combo routing settings:",e)}},I=e.find(e=>e.name===v)||e[0]||null,B=I?Math.max(0,e.findIndex(e=>e.id===I.id)):0;return n?(0,a.jsx)("div",{className:"grid gap-4",children:[1,2,3].map(e=>(0,a.jsx)("div",{className:"h-36 animate-pulse rounded-2xl border border-border bg-surface"},e))}):(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-2xl font-bold text-text-main",children:"Combo model"}),(0,a.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Tạo combo model với fallback, round-robin, độ trễ thấp nhất, P2C v\xe0 routing theo trạng th\xe1i health của LAN Ollama."})]}),(0,a.jsxs)("button",{type:"button",onClick:O,className:"inline-flex items-center justify-center gap-2 rounded-xl bg-primary px-4 py-2 text-sm font-medium text-white hover:opacity-90",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"add"}),"Tạo combo"]})]}),0===e.length?(0,a.jsxs)("div",{className:"rounded-2xl border border-dashed border-border bg-surface p-12 text-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-4xl text-text-muted",children:"layers"}),(0,a.jsx)("h2",{className:"mt-3 text-lg font-semibold text-text-main",children:"Chưa c\xf3 combo n\xe0o"}),(0,a.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Tạo combo model c\xf3 hỗ trợ fallback."}),(0,a.jsx)("button",{type:"button",onClick:O,className:"mt-4 rounded-xl bg-primary px-4 py-2 text-sm font-medium text-white hover:opacity-90",children:"Tạo combo"})]}):(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsx)("div",{className:"rounded-2xl border border-border bg-surface/80 p-4 shadow-sm dark:bg-zinc-950/70",children:(0,a.jsxs)("div",{className:"flex flex-col gap-3 lg:flex-row lg:items-end lg:justify-between",children:[(0,a.jsxs)("label",{className:"block min-w-0 flex-1",children:[(0,a.jsx)("span",{className:"mb-1 block text-xs font-semibold uppercase tracking-wide text-text-muted",children:"Combo đang xem"}),(0,a.jsx)("select",{value:I?.name||"",onChange:e=>k(e.target.value),className:"w-full rounded-xl border border-border bg-white px-4 py-2.5 text-sm font-semibold text-text-main outline-none transition focus:border-primary dark:bg-zinc-900",children:e.map(e=>(0,a.jsxs)("option",{value:e.name,children:[e.name," • ",(e.models||[]).length," model"]},e.id))})]}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2 text-xs text-text-muted",children:[(0,a.jsxs)("span",{className:"rounded-full bg-background px-3 py-1 dark:bg-zinc-900",children:["Tổng ",e.length," combo"]}),I?(0,a.jsxs)("span",{className:"rounded-full bg-primary/10 px-3 py-1 font-medium text-primary",children:["Đang hiển thị: ",I.name]}):null]})]})}),I?(0,a.jsx)(U,{combo:I,comboIndex:B,copied:_,onCopy:C,onEdit:()=>S(I),onDelete:()=>A(I.id),comboStrategy:f[I.name]||{},onToggleRoundRobin:e=>P(I.name,e),onUpdateComboStrategy:e=>R(I.name,e)},I.id):null]}),(0,a.jsx)(ee,{isOpen:l,comboStrategy:{},onClose:()=>i(!1),onSave:L,activeProviders:u,providersLoading:b}),(0,a.jsx)(ee,{isOpen:!!o,combo:o,comboStrategy:f[o?.name]||{},onClose:()=>m(null),onSave:e=>E(o.id,e),activeProviders:u,providersLoading:b}),(0,a.jsx)(d.uo,{isOpen:!!j,onClose:()=>N(null),onConfirm:j?.onConfirm,title:j?.title||"X\xe1c nhận",message:j?.message,variant:"danger"})]})}function U({combo:e,comboIndex:t=0,copied:n,onCopy:s,onEdit:l,onDelete:i,comboStrategy:o={},onToggleRoundRobin:d,onUpdateComboStrategy:c}){let m=$(o||{}),u=m.fallbackStrategy||"fallback",x=h.find(e=>e.value===u)||h[0],g=m.stickyScope||"global",f=p.find(e=>e.value===g)||p[0],y=S(o),v=b[t%b.length],[k,j]=(0,r.useState)(q(m.requiredTags)),[N,_]=(0,r.useState)(E(m.modelTagRules));return(0,r.useEffect)(()=>{j(q(m.requiredTags)),_(E(m.modelTagRules))},[e.name,JSON.stringify(m.requiredTags||[]),JSON.stringify(m.modelTagRules||{})]),(0,a.jsxs)("div",{className:`rounded-2xl border p-5 shadow-sm transition-colors ${v.card}`,children:[(0,a.jsxs)("div",{className:"flex flex-col gap-4 lg:flex-row lg:items-start lg:justify-between",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary",children:"layers"}),(0,a.jsx)("h3",{className:"truncate text-lg font-semibold text-text-main",children:e.name})]}),(0,a.jsxs)("p",{className:"mt-1 text-sm text-text-muted",children:[(e.models||[]).length," model đang bật",y.length>0?` • ${y.length} đ\xe3 tắt`:""]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)(W,{icon:n===`combo-${e.id}`?"check":"content_copy",title:"Copy t\xean combo",onClick:()=>s(e.name,`combo-${e.id}`)}),(0,a.jsx)(W,{icon:"edit",title:"Chỉnh sửa",onClick:l}),(0,a.jsx)(W,{icon:"delete",title:"X\xf3a",onClick:i,danger:!0})]})]}),(0,a.jsxs)("div",{className:"mt-4 flex flex-wrap gap-2",children:[0===(e.models||[]).length?(0,a.jsx)("span",{className:"rounded-lg bg-background px-2 py-1 text-xs text-text-muted",children:"Chưa c\xf3 model đang bật"}):(e.models||[]).slice(0,5).map((e,t)=>(0,a.jsx)("span",{className:"rounded-lg bg-background px-2 py-1 font-mono text-xs text-text-main",children:z(e)},`${B(e)}-${t}`)),(e.models||[]).length>5&&(0,a.jsxs)("span",{className:"rounded-lg bg-background px-2 py-1 text-xs text-text-muted",children:["+",e.models.length-5," model nữa"]}),y.length>0&&(0,a.jsxs)("span",{className:"rounded-lg bg-red-500/10 px-2 py-1 text-xs text-red-500",children:[y.length," đ\xe3 tắt"]}),(function(e={}){let t=T(e),n=[];if(void 0!==t.temperature&&n.push(`temp ${t.temperature}`),void 0!==t.top_p&&n.push(`top_p ${t.top_p}`),void 0!==t.presence_penalty&&n.push(`presence ${t.presence_penalty}`),void 0!==t.max_tokens&&n.push(`max ${t.max_tokens}`),void 0!==t.reasoning_budget&&n.push(`reasoning ${t.reasoning_budget}`),t.forceThinkingOffAboveChars>0){let e=t.forceThinkingOffRequestOverrides||{},a=[];void 0!==e.temperature&&a.push(`temp ${e.temperature}`),void 0!==e.top_p&&a.push(`top_p ${e.top_p}`),void 0!==e.presence_penalty&&a.push(`presence ${e.presence_penalty}`),void 0!==e.max_tokens&&a.push(`max ${e.max_tokens}`),n.push(`auto off >${t.forceThinkingOffAboveChars} chars${a.length?` (${a.join(", ")})`:""}`)}return"off"===t.thinkingMode&&n.push("thinking off"),"on"===t.thinkingMode&&n.push("thinking on"),n})(m.requestOverrides).map(e=>(0,a.jsx)("span",{className:"rounded-lg bg-primary/10 px-2 py-1 text-xs font-medium text-primary",children:e},e)),"inherit"!==m.contentLoggingMode?(0,a.jsxs)("span",{className:`rounded-lg px-2 py-1 text-xs font-medium ${"disabled"===m.contentLoggingMode?"bg-amber-500/10 text-amber-600":"bg-emerald-500/10 text-emerald-600"}`,children:["prompt logs ",m.contentLoggingMode]}):null]}),(0,a.jsxs)("div",{className:`mt-5 rounded-xl border p-4 ${v.panel}`,children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h4",{className:"font-semibold text-text-main",children:"Chiến lược routing"}),(0,a.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:x.description})]}),(0,a.jsx)("select",{value:u,onChange:e=>c({fallbackStrategy:e.target.value}),className:"rounded-lg border border-border bg-surface px-3 py-2 text-sm text-text-main outline-none focus:border-primary",children:h.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))})]}),(0,a.jsx)(Y,{value:m.requestOverrides||{},onChange:e=>c({requestOverrides:e}),compact:!0}),(0,a.jsx)(V,{value:m.contentLoggingMode,onChange:e=>c({contentLoggingMode:e}),compact:!0}),("least-latency"===u||"p2c"===u)&&(0,a.jsxs)("div",{className:"mt-4 rounded-xl border border-primary/15 bg-surface p-3",children:[(0,a.jsxs)("label",{className:"flex items-start gap-2 text-sm text-text-muted",children:[(0,a.jsx)("input",{type:"checkbox",checked:!1!==m.lanHealthEnabled,onChange:e=>c({lanHealthEnabled:e.target.checked}),className:"mt-0.5 h-3.5 w-3.5 accent-primary"}),(0,a.jsxs)("span",{children:[(0,a.jsx)("span",{className:"font-medium text-text-main",children:"Routing theo trạng th\xe1i health LAN"}),(0,a.jsx)("span",{className:"mt-1 block text-xs",children:"D\xf9ng dữ liệu health v\xe0 circuit breaker khi xếp hạng target trong combo."})]})]}),(0,a.jsxs)("div",{className:"mt-3 grid gap-3 md:grid-cols-2",children:[(0,a.jsxs)("label",{className:"block",children:[(0,a.jsx)("span",{className:"mb-1 block text-xs font-medium text-text-muted",children:"Đường dẫn health"}),(0,a.jsx)("input",{value:m.healthCheckPath||"/api/tags",onChange:e=>c({healthCheckPath:e.target.value||"/api/tags"}),placeholder:"/api/tags",className:"w-full rounded-lg border border-border bg-background px-2 py-1.5 font-mono text-xs text-text-main outline-none focus:border-primary"})]}),(0,a.jsxs)("label",{className:"block",children:[(0,a.jsx)("span",{className:"mb-1 block text-xs font-medium text-text-muted",children:"Chu kỳ kiểm tra (ms)"}),(0,a.jsx)("input",{type:"number",min:"1000",value:m.healthCheckIntervalMs||15e3,onChange:e=>c({healthCheckIntervalMs:Number(e.target.value)||15e3}),className:"w-full rounded-lg border border-border bg-background px-2 py-1.5 text-xs text-text-main outline-none focus:border-primary"})]})]}),(0,a.jsxs)("div",{className:"mt-3 grid gap-3 md:grid-cols-2",children:[(0,a.jsxs)("label",{className:"block",children:[(0,a.jsx)("span",{className:"mb-1 block text-xs font-medium text-text-muted",children:"Tag endpoint bắt buộc"}),(0,a.jsx)("input",{value:k,onChange:e=>j(e.target.value),onBlur:()=>c({requiredTags:L(k)}),onKeyDown:e=>"Enter"===e.key&&e.currentTarget.blur(),placeholder:"gpu, vram:8gb",className:"w-full rounded-lg border border-border bg-background px-2 py-1.5 font-mono text-xs text-text-main outline-none focus:border-primary"}),(0,a.jsx)("span",{className:"mt-1 block text-[11px] text-text-muted",children:"Mọi endpoint được route đều phải c\xf3 c\xe1c tag n\xe0y."})]}),(0,a.jsxs)("label",{className:"block",children:[(0,a.jsx)("span",{className:"mb-1 block text-xs font-medium text-text-muted",children:"Quy tắc tag theo model"}),(0,a.jsx)("textarea",{value:N,onChange:e=>_(e.target.value),onBlur:()=>c({modelTagRules:function(e=""){let t={};for(let n of String(e||"").split(/\n+/)){let e=n.trim();if(!e)continue;let a=e.indexOf(":");if(-1===a)continue;let r=e.slice(0,a).trim(),s=L(e.slice(a+1));r&&s.length&&(t[r]=s)}return t}(N)}),placeholder:"qwen3:32b: gpu, vram:16gb\nqwen3:8b: model_support:qwen3:8b",rows:3,className:"w-full rounded-lg border border-border bg-background px-2 py-1.5 font-mono text-xs text-text-main outline-none focus:border-primary"})]})]})]}),"round-robin"===u&&(0,a.jsxs)("div",{className:"mt-4 rounded-xl border border-primary/15 bg-surface p-3",children:[(0,a.jsxs)("div",{className:"mb-3 flex items-center justify-between gap-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm font-semibold text-primary",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"sticky_note_2"}),"Round Robin giữ d\xednh"]}),(0,a.jsxs)("label",{className:"flex items-center gap-2 text-xs text-text-muted",children:[(0,a.jsx)("input",{type:"checkbox",checked:"round-robin"===u,onChange:e=>d(e.target.checked),className:"h-3.5 w-3.5 accent-primary"}),"Bật"]})]}),(0,a.jsxs)("div",{className:"grid gap-3 md:grid-cols-2",children:[(0,a.jsxs)("label",{className:"block",children:[(0,a.jsx)("span",{className:"mb-1 block text-xs font-medium text-text-muted",children:"Chế độ giữ d\xednh"}),(0,a.jsx)("select",{value:g,onChange:e=>c({stickyScope:e.target.value}),className:"w-full rounded-lg border border-border bg-background px-2 py-1.5 text-xs text-text-main outline-none focus:border-primary",children:p.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))}),(0,a.jsx)("span",{className:"mt-1 block text-[11px] text-text-muted",children:f.description})]}),(0,a.jsxs)("label",{className:"block",children:[(0,a.jsx)("span",{className:"mb-1 block text-xs font-medium text-text-muted",children:"TTL giữ d\xednh (ph\xfat)"}),(0,a.jsx)("input",{type:"number",min:"1",value:m.stickyTtlMinutes||120,onChange:e=>c({stickyTtlMinutes:Number(e.target.value)||120}),className:"w-full rounded-lg border border-border bg-background px-2 py-1.5 text-xs text-text-main outline-none focus:border-primary"})]})]}),(0,a.jsxs)("label",{className:"mt-3 flex items-start gap-2 text-xs text-text-muted",children:[(0,a.jsx)("input",{type:"checkbox",checked:!1!==m.stickyFallbackToClientIp,onChange:e=>c({stickyFallbackToClientIp:e.target.checked}),className:"mt-0.5 h-3.5 w-3.5 accent-primary"}),"Nếu thiếu chat session id, fallback về IP client thay v\xec xoay to\xe0n cục."]})]})]})]})}function W({icon:e,title:t,onClick:n,danger:r=!1}){return(0,a.jsx)("button",{type:"button",onClick:e=>{e.stopPropagation(),n?.()},className:`rounded-lg p-2 transition ${r?"text-red-500 hover:bg-red-500/10":"text-text-muted hover:bg-background hover:text-primary"}`,title:t,"aria-label":t,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:e})})}function Q({id:e,index:t,model:n,subtitle:s="",enabled:o,isFirst:d,isLast:c,onEdit:m,onMoveUp:u,onMoveDown:x,onRemove:p,onToggleEnabled:h}){let{attributes:b,listeners:g,setNodeRef:f,transform:y,isDragging:v}=(0,l.gl)({id:e}),k={transform:i.Ks.Transform.toString(y),opacity:v?.4:1,zIndex:v?999:void 0},[j,N]=(0,r.useState)(!1),[_,C]=(0,r.useState)(n);(0,r.useEffect)(()=>{C(n)},[n]);let w=()=>{let e=_.trim();e&&e!==n?m(e):C(n),N(!1)};return(0,a.jsxs)("div",{ref:f,style:k,className:`flex items-center gap-3 rounded-xl border p-3 transition ${o?"border-border bg-background":"border-red-200 bg-red-50/70 opacity-75 dark:border-red-500/30 dark:bg-red-500/10"}`,children:[(0,a.jsx)("button",{type:"button",className:"cursor-grab text-text-muted active:cursor-grabbing",...b,...g,title:"K\xe9o để sắp xếp lại",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"drag_indicator"})}),(0,a.jsx)("span",{className:`flex h-7 w-7 shrink-0 items-center justify-center rounded-full text-xs font-semibold ${o?"bg-primary/10 text-primary":"bg-red-100 text-red-600 dark:bg-red-500/20 dark:text-red-300"}`,children:t+1}),j?(0,a.jsx)("input",{autoFocus:!0,value:_,onChange:e=>C(e.target.value),onBlur:w,onKeyDown:e=>{"Enter"===e.key&&w(),"Escape"===e.key&&(C(n),N(!1))},className:"min-w-0 flex-1 rounded border border-primary/40 bg-background px-2 py-1 font-mono text-xs text-text-main outline-none"}):(0,a.jsxs)("button",{type:"button",onClick:()=>N(!0),className:"min-w-0 flex-1 text-left",title:"Bấm để sửa model",children:[(0,a.jsx)("span",{className:`block truncate font-mono text-xs ${o?"text-text-main":"text-text-muted line-through"}`,children:n}),s?(0,a.jsx)("span",{className:"mt-0.5 block truncate text-[11px] text-text-muted",children:s}):null]}),(0,a.jsx)("button",{type:"button",onClick:h,className:`rounded-lg p-1.5 transition ${o?"text-green-600 hover:bg-green-500/10":"text-red-500 hover:bg-red-500/10"}`,title:o?"Tắt model trong combo":"Bật model trong combo",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:o?"toggle_on":"toggle_off"})}),(0,a.jsx)("button",{type:"button",onClick:u,disabled:d,className:"rounded-lg p-1.5 text-text-muted transition hover:bg-surface disabled:opacity-30",title:"Di chuyển l\xean",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"arrow_upward"})}),(0,a.jsx)("button",{type:"button",onClick:x,disabled:c,className:"rounded-lg p-1.5 text-text-muted transition hover:bg-surface disabled:opacity-30",title:"Di chuyển xuống",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"arrow_downward"})}),(0,a.jsx)("button",{type:"button",onClick:p,className:"rounded-lg p-1.5 text-red-500 transition hover:bg-red-500/10",title:"X\xf3a",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"close"})})]})}function V({value:e="inherit",onChange:t,compact:n=!1}){let r=C(e),s=v.find(e=>e.value===r)||v[0];return(0,a.jsx)("div",{className:n?"mt-4 rounded-xl border border-amber-500/15 bg-surface p-3":"rounded-xl border border-amber-500/15 bg-amber-500/5 p-4",children:(0,a.jsxs)("div",{className:"grid gap-3 md:grid-cols-[minmax(0,1fr)_280px] md:items-center",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm font-semibold text-text-main",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-amber-500",children:"manage_search"}),"Prompt Logs cho combo n\xe0y"]}),(0,a.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:s.description}),"disabled"===r?(0,a.jsx)("p",{className:"mt-1 text-[11px] font-medium text-amber-600",children:"Khi chạy request, Prompt Logs sẽ chỉ ghi metadata v\xe0 hiển thị [promptlogs disabled on this combo]."}):null]}),(0,a.jsx)("select",{value:r,onChange:e=>t?.(C(e.target.value)),className:"w-full rounded-lg border border-border bg-surface px-3 py-2 text-sm text-text-main outline-none focus:border-primary",children:v.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))})]})})}function Z({icon:e,label:t,children:n,active:r,muted:s=!1,className:l=""}){return(0,a.jsxs)("label",{className:`rounded-lg border p-3 transition ${r?"border-primary/30 bg-background shadow-sm":"border-border bg-background/60"} ${l}`,children:[(0,a.jsxs)("span",{className:"mb-2 flex items-center justify-between gap-2 text-xs font-medium text-text-main",children:[(0,a.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[16px] ${r?"text-primary":"text-text-muted"}`,children:e}),(0,a.jsx)("span",{className:"truncate",children:t})]}),n?.toggle]}),n?.control,n?.hint?(0,a.jsx)("span",{className:"mt-1 block text-[11px] text-text-muted",children:n.hint}):null]})}function Y({value:e={},onChange:t,compact:n=!1}){let r=T(e),s=void 0!==r.temperature,l=void 0!==r.top_p,i=void 0!==r.presence_penalty,o=void 0!==r.max_tokens,d=void 0!==r.reasoning_budget,c=void 0!==r.forceThinkingOffAboveChars,m=r.forceThinkingOffRequestOverrides||{},u=void 0!==m.temperature,x=void 0!==m.top_p,p=void 0!==m.presence_penalty,h=void 0!==m.max_tokens,b=u||x||p||h,v=r.thinkingMode||"inherit",k="inherit"!==v,j=s||l||i||o,N=k||d||c||b,_=e=>{t?.(T({...r,...e}))},C=(e,n,a)=>{if(!n){let n={...r};delete n[e],"forceThinkingOffAboveChars"===e&&delete n.forceThinkingOffRequestOverrides,t?.(T(n));return}_({[e]:a})},O=e=>{_({forceThinkingOffRequestOverrides:w({...m,...e})})},S=(e,t,n)=>{let a={...m};if(!t){delete a[e],_({forceThinkingOffRequestOverrides:a});return}O({[e]:n})},$="w-full rounded-lg border border-border bg-surface px-2 py-1.5 text-sm text-text-main outline-none focus:border-primary disabled:opacity-50";return(0,a.jsxs)("div",{className:n?"mt-4 rounded-xl border border-sky-500/15 bg-surface p-3":"rounded-xl border border-sky-500/15 bg-sky-500/5 p-4",children:[(0,a.jsxs)("div",{className:"mb-3 flex flex-col gap-2 sm:flex-row sm:items-start sm:justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm font-semibold text-text-main",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-sky-500",children:"tune"}),"Tham số request Local endpoint"]}),(0,a.jsxs)("p",{className:"mt-1 text-xs text-text-muted",children:["Chỉ inject khi combo route 100% tới local endpoint: ",(0,a.jsx)("span",{className:"font-mono",children:"llama.cpp"}),", ",(0,a.jsx)("span",{className:"font-mono",children:"vLLM"})," hoặc ",(0,a.jsx)("span",{className:"font-mono",children:"Ollama"}),". Nếu combo mix local + cloud/provider kh\xe1c, BlueRouter bỏ qua block n\xe0y v\xe0 giữ nguy\xean request gốc."]})]}),!function(e={}){return Object.keys(T(e)).length>0}(r)?(0,a.jsx)("span",{className:"inline-flex shrink-0 items-center rounded-full bg-background px-2 py-1 text-[11px] font-semibold text-text-muted",children:"Kh\xf4ng override"}):(0,a.jsx)("span",{className:"inline-flex shrink-0 items-center rounded-full bg-primary/10 px-2 py-1 text-[11px] font-semibold text-primary",children:"C\xf3 override"})]}),(0,a.jsxs)("div",{className:"grid gap-3 xl:grid-cols-2",children:[(0,a.jsxs)("div",{className:`rounded-xl border p-3 ${j?"border-primary/20 bg-primary/5":"border-border bg-background/40"}`,children:[(0,a.jsxs)("div",{className:"mb-3 flex items-center gap-2 text-xs font-semibold text-primary",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"graphic_eq"}),"Sampling ",(0,a.jsx)("span",{className:"font-normal text-text-muted",children:"(điều khiển lựa chọn token)"})]}),(0,a.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2 2xl:grid-cols-3",children:[(0,a.jsx)(Z,{icon:"thermostat",label:"Temperature",active:s,children:{toggle:(0,a.jsx)("input",{type:"checkbox",checked:s,onChange:e=>C("temperature",e.target.checked,g.temperature),className:"h-3.5 w-3.5 accent-primary"}),control:(0,a.jsx)("input",{type:"number",min:"0",max:"2",step:"0.05",disabled:!s,value:s?r.temperature:g.temperature,onChange:e=>_({temperature:e.target.value}),className:$}),hint:"0 = ổn định, 2 = s\xe1ng tạo."}}),(0,a.jsx)(Z,{icon:"filter_alt",label:"top_p",active:l,children:{toggle:(0,a.jsx)("input",{type:"checkbox",checked:l,onChange:e=>C("top_p",e.target.checked,g.top_p),className:"h-3.5 w-3.5 accent-primary"}),control:(0,a.jsx)("input",{type:"number",min:"0.01",max:"1",step:"0.01",disabled:!l,value:l?r.top_p:g.top_p,onChange:e=>_({top_p:e.target.value}),className:$}),hint:"0.01–1.0; 0.9–0.95 thường hợp coder/chat."}}),(0,a.jsx)(Z,{icon:"repeat",label:"presence_penalty",active:i,children:{toggle:(0,a.jsx)("input",{type:"checkbox",checked:i,onChange:e=>C("presence_penalty",e.target.checked,g.presence_penalty),className:"h-3.5 w-3.5 accent-primary"}),control:(0,a.jsx)("input",{type:"number",min:"-2",max:"2",step:"0.05",disabled:!i,value:i?r.presence_penalty:g.presence_penalty,onChange:e=>_({presence_penalty:e.target.value}),className:$}),hint:"-2–2; coder thường để 0, chỉ tăng nhẹ nếu hay lặp."}}),(0,a.jsx)(Z,{icon:"output",label:"max_tokens",active:o,className:"sm:col-span-2 2xl:col-span-1",children:{toggle:(0,a.jsx)("input",{type:"checkbox",checked:o,onChange:e=>C("max_tokens",e.target.checked,g.max_tokens),className:"h-3.5 w-3.5 accent-primary"}),control:(0,a.jsx)("input",{type:"number",min:"1",max:"262144",step:"1",disabled:!o,value:o?r.max_tokens:g.max_tokens,onChange:e=>_({max_tokens:e.target.value}),className:$}),hint:"Giới hạn output cho request."}})]})]}),(0,a.jsxs)("div",{className:`rounded-xl border p-3 ${N?"border-primary/20 bg-primary/5":"border-border bg-background/40"}`,children:[(0,a.jsxs)("div",{className:"mb-3 flex items-center gap-2 text-xs font-semibold text-primary",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"psychology"}),"Thinking ",(0,a.jsx)("span",{className:"font-normal text-text-muted",children:"(suy luận nội bộ)"})]}),(0,a.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2 2xl:grid-cols-3",children:[(0,a.jsxs)("label",{className:`rounded-lg border p-3 transition ${k?"border-primary/30 bg-background shadow-sm":"border-border bg-background/60"}`,children:[(0,a.jsxs)("span",{className:"mb-2 flex items-center gap-1.5 text-xs font-medium text-text-main",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[16px] ${k?"text-primary":"text-text-muted"}`,children:"psychology_alt"}),"Thinking"]}),(0,a.jsx)("select",{value:v,onChange:e=>_({thinkingMode:"inherit"===e.target.value?void 0:e.target.value}),className:"w-full rounded-lg border border-border bg-surface px-2 py-1.5 text-sm text-text-main outline-none focus:border-primary",children:y.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))}),(0,a.jsx)("span",{className:"mt-1 block text-[11px] text-text-muted",children:y.find(e=>e.value===v)?.description||y[0].description})]}),(0,a.jsx)(Z,{icon:"account_balance_wallet",label:"reasoning_budget",active:d,children:{toggle:(0,a.jsx)("input",{type:"checkbox",checked:d,onChange:e=>C("reasoning_budget",e.target.checked,g.reasoning_budget),className:"h-3.5 w-3.5 accent-primary"}),control:(0,a.jsx)("input",{type:"number",min:"0",max:"262144",step:"1",disabled:!d,value:d?r.reasoning_budget:g.reasoning_budget,onChange:e=>_({reasoning_budget:e.target.value}),className:$}),hint:"Chỉ d\xf9ng cho llama.cpp/vLLM local; runtime sẽ map đ\xfang field."}}),(0,a.jsx)(Z,{icon:"speed",label:"Auto tắt thinking nếu prompt chars >=",active:c||b,className:"sm:col-span-2 2xl:col-span-3",children:{toggle:(0,a.jsx)("input",{type:"checkbox",checked:c,onChange:e=>C("forceThinkingOffAboveChars",e.target.checked,g.forceThinkingOffAboveChars),className:"h-3.5 w-3.5 accent-primary"}),control:(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsx)("input",{type:"number",min:"0",max:"1000000",step:"1000",disabled:!c,value:c?r.forceThinkingOffAboveChars:g.forceThinkingOffAboveChars,onChange:e=>_({forceThinkingOffAboveChars:e.target.value}),className:$}),(0,a.jsxs)("div",{className:"rounded-lg border border-border bg-surface/70 p-2",children:[(0,a.jsxs)("div",{className:"mb-2 flex items-center gap-1.5 text-[11px] font-semibold text-text-main",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[15px] text-primary",children:"tune"}),"Override ri\xeang khi auto-off được k\xedch hoạt"]}),(0,a.jsxs)("div",{className:"grid gap-2 sm:grid-cols-2",children:[(0,a.jsxs)("label",{className:"space-y-1",children:[(0,a.jsxs)("span",{className:"flex items-center justify-between text-[11px] font-medium text-text-main",children:["temp",(0,a.jsx)("input",{type:"checkbox",checked:u,disabled:!c,onChange:e=>S("temperature",e.target.checked,f.temperature),className:"h-3.5 w-3.5 accent-primary disabled:opacity-50"})]}),(0,a.jsx)("input",{type:"number",min:"0",max:"2",step:"0.05",disabled:!c||!u,value:u?m.temperature:f.temperature,onChange:e=>O({temperature:e.target.value}),className:$})]}),(0,a.jsxs)("label",{className:"space-y-1",children:[(0,a.jsxs)("span",{className:"flex items-center justify-between text-[11px] font-medium text-text-main",children:["top_p",(0,a.jsx)("input",{type:"checkbox",checked:x,disabled:!c,onChange:e=>S("top_p",e.target.checked,f.top_p),className:"h-3.5 w-3.5 accent-primary disabled:opacity-50"})]}),(0,a.jsx)("input",{type:"number",min:"0.01",max:"1",step:"0.01",disabled:!c||!x,value:x?m.top_p:f.top_p,onChange:e=>O({top_p:e.target.value}),className:$})]}),(0,a.jsxs)("label",{className:"space-y-1",children:[(0,a.jsxs)("span",{className:"flex items-center justify-between text-[11px] font-medium text-text-main",children:["presence_penalty",(0,a.jsx)("input",{type:"checkbox",checked:p,disabled:!c,onChange:e=>S("presence_penalty",e.target.checked,f.presence_penalty),className:"h-3.5 w-3.5 accent-primary disabled:opacity-50"})]}),(0,a.jsx)("input",{type:"number",min:"-2",max:"2",step:"0.05",disabled:!c||!p,value:p?m.presence_penalty:f.presence_penalty,onChange:e=>O({presence_penalty:e.target.value}),className:$})]}),(0,a.jsxs)("label",{className:"space-y-1",children:[(0,a.jsxs)("span",{className:"flex items-center justify-between text-[11px] font-medium text-text-main",children:["max_tokens",(0,a.jsx)("input",{type:"checkbox",checked:h,disabled:!c,onChange:e=>S("max_tokens",e.target.checked,f.max_tokens),className:"h-3.5 w-3.5 accent-primary disabled:opacity-50"})]}),(0,a.jsx)("input",{type:"number",min:"1",max:"262144",step:"1",disabled:!c||!h,value:h?m.max_tokens:f.max_tokens,onChange:e=>O({max_tokens:e.target.value}),className:$})]})]})]})]}),hint:"Khi prompt vượt ngưỡng, thinking bị tắt trước; c\xe1c field ri\xeang b\xean tr\xean chỉ inject nếu được tick."}})]})]})]})]})}function ee({isOpen:e,combo:t,comboStrategy:n={},onClose:i,onSave:c,activeProviders:m,providersLoading:p=!1,kindFilter:h=null}){let[b,f]=(0,r.useState)(t?.name||""),[y,v]=(0,r.useState)([]),[k,j]=(0,r.useState)(!1),[N,_]=(0,r.useState)(!1),[w,$]=(0,r.useState)(""),[M,q]=(0,r.useState)({}),[L,E]=(0,r.useState)(""),[A,I]=(0,r.useState)(""),[z,H]=(0,r.useState)(()=>t?T(n?.requestOverrides||{}):T(g)),[J,X]=(0,r.useState)(()=>C(n?.contentLoggingMode)),U=n||{},W=(0,s.FR)((0,s.MS)(s.AN,{activationConstraint:{distance:5}}),(0,s.MS)(s.uN,{coordinateGetter:l.JR}));(0,r.useEffect)(()=>{e&&(f(t?.name||""),v(function(e,t={}){let n=(e?.models||[]).map(e=>F(e,!0)).filter(e=>e.value),a=new Set(n.map(e=>e.value));return[...n,...S(t).filter(e=>!a.has(e)).map(e=>F(e,!1)).filter(e=>e.value)]}(t,U)),$(""),E(""),I(""),H(t?T(U.requestOverrides||{}):T(g)),X(C(U.contentLoggingMode)))},[e,t?.id,t?.name,U.contentLoggingMode]),(0,r.useEffect)(()=>{e&&Z()},[e]);let Z=async()=>{try{let e=await fetch("/api/models/alias",{cache:"no-store"});if(!e.ok)return;let t=await e.json();q(t.aliases||{})}catch(e){console.error("Error fetching modal data:",e)}},et=y.map((e,t)=>({uid:`item-${t}-${e.value}`,row:e})),en=y.map(e=>e.value),ea=y.filter(e=>e.enabled).length,er=y.filter(e=>!e.enabled).length,es=(m||[]).filter(e=>e?.isActive!==!1),el=es.find(e=>e.id===L)||null,ei=el?K(el,M):[],eo=ei[0]?.value||(el?G(el):""),ed=e=>e.trim()?x.test(e)?($(""),!0):($("Chỉ cho ph\xe9p chữ, số, dấu -, _ v\xe0 ."),!1):($("Bắt buộc nhập t\xean"),!1),ec=async()=>{if(!ed(b))return;let{models:e,disabledModels:t}=function(e=[]){let t=[],n=new Set;for(let a of e){let e=O(a?.value||B(a?.target));!e||n.has(e)||(n.add(e),t.push({...a,value:e,enabled:a?.enabled!==!1,target:D(a?.target||a?.value)}))}return{models:t.filter(e=>e.enabled).map(e=>e.target).filter(Boolean),disabledModels:t.filter(e=>!e.enabled).map(e=>e.value)}}(y);_(!0),await c({name:b.trim(),models:e,disabledModels:t,requestOverrides:T(z),contentLoggingMode:J}),_(!1)};if(!e)return null;let em=!!t;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"fixed inset-0 z-[100] flex items-center justify-center bg-black/45 p-3 backdrop-blur-[1px] sm:p-4",children:(0,a.jsxs)("div",{className:"flex max-h-[92vh] w-full max-w-7xl flex-col overflow-hidden rounded-2xl border border-border bg-white shadow-2xl dark:bg-zinc-950",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between border-b border-border px-5 py-4 sm:px-6",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-xl font-semibold text-text-main",children:em?"Chỉnh sửa combo":"Tạo combo"}),(0,a.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Chọn model, tắt tạm thời khi cần v\xe0 sắp xếp thứ tự ưu ti\xean fallback đang bật."})]}),(0,a.jsx)("button",{type:"button",onClick:i,className:"rounded-lg p-1 text-text-muted transition hover:bg-surface hover:text-text-main",children:(0,a.jsx)("span",{className:"material-symbols-outlined",children:"close"})})]}),(0,a.jsxs)("div",{className:"min-h-0 flex-1 space-y-5 overflow-y-auto bg-white px-5 py-4 dark:bg-zinc-950 sm:px-6",children:[(0,a.jsxs)("label",{className:"block",children:[(0,a.jsx)("span",{className:"mb-2 block text-sm font-semibold text-text-main",children:"T\xean"}),(0,a.jsx)("input",{value:b,onChange:e=>{let t=e.target.value;f(t),t?ed(t):$("")},placeholder:"premium-coding",className:`w-full rounded-xl border bg-white px-4 py-2.5 text-text-main outline-none transition focus:border-primary dark:bg-zinc-900 ${w?"border-red-400":"border-border"}`}),(0,a.jsx)("span",{className:`mt-1 block text-xs ${w?"text-red-500":"text-text-muted"}`,children:w||"Chỉ cho ph\xe9p chữ, số, dấu -, _ v\xe0 ."})]}),(0,a.jsx)(Y,{value:z,onChange:H,defaultEnabled:!em}),(0,a.jsx)(V,{value:J,onChange:X}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"mb-3 flex items-center justify-between gap-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:"Danh s\xe1ch model"}),(0,a.jsxs)("p",{className:"mt-1 text-xs text-text-muted",children:[ea," đang bật",er>0?`, ${er} đ\xe3 tắt`:"",". Model đ\xe3 tắt vẫn nằm trong combo nhưng kh\xf4ng được route."]})]}),(0,a.jsxs)("button",{type:"button",onClick:()=>j(!0),className:"inline-flex items-center gap-1 rounded-lg border border-border px-3 py-1.5 text-xs font-medium text-primary hover:border-primary/50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"add"}),"Th\xeam model"]})]}),(0,a.jsxs)("div",{className:"mb-4 rounded-xl border border-primary/15 bg-primary/5 p-3",children:[(0,a.jsxs)("div",{className:"mb-2 flex items-center gap-2 text-xs font-semibold uppercase tracking-wide text-primary",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"account_tree"}),"Th\xeam target theo provider account"]}),(0,a.jsx)("p",{className:"mb-3 text-xs text-text-muted",children:"Cố định bước combo n\xe0y v\xe0o một provider account cụ thể. Danh s\xe1ch account chỉ được load khi mở modal để trang combo nhẹ hơn."}),(0,a.jsxs)("div",{className:"grid gap-2 md:grid-cols-[minmax(0,1.5fr)_minmax(0,1fr)_auto]",children:[(0,a.jsxs)("select",{value:L,onChange:e=>{let t=e.target.value,n=es.find(e=>e.id===t),a=n?K(n,M):[];E(t),I(a[0]?.value||G(n||{})||"")},className:"min-w-0 rounded-lg border border-border bg-background px-3 py-2 text-xs text-text-main outline-none focus:border-primary",children:[(0,a.jsx)("option",{value:"",children:p?"Đang tải provider account...":"Chọn provider account"}),es.map(e=>{let t=P(e),n=R(e),r=n&&n!==t?`${t} / ${n}`:t;return(0,a.jsx)("option",{value:e.id,children:r},e.id)})]}),(0,a.jsxs)("select",{value:A,onChange:e=>I(e.target.value),disabled:!L||0===ei.length,className:"min-w-0 rounded-lg border border-border bg-background px-3 py-2 font-mono text-xs text-text-main outline-none focus:border-primary disabled:cursor-not-allowed disabled:opacity-60",children:[(0,a.jsx)("option",{value:"",children:L?ei.length>0?"Chọn model":"Kh\xf4ng t\xecm thấy model của provider":"Chọn account trước"}),ei.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},`${e.value}-${e.label}`))]}),(0,a.jsxs)("button",{type:"button",onClick:()=>{if(!el)return;let e=function(e,t){let n=P(e),a=function(e={}){let t=O(e.provider),n=P(e);return(0,u.mq)(t)||(0,u.gb)(t)?n||t:t||n}(e),r=R(e),s=O(t||G(e));if(!n||!e?.id||!s)return null;let l=s.includes("/"),i=l?s:`${n}/${s}`,o=l&&s.startsWith(`${n}/`)?s.slice(n.length+1):s,d=r&&r!==a?`${a}/${r}/${o}`:`${a}/${o}`;return{model:i,connectionId:e.id,provider:a||n,accountName:r||void 0,label:d}}(el,A||eo);if(!e)return void alert("H\xe3y chọn provider account v\xe0 model cho target cố định n\xe0y.");let t=F(e,!0);v(e=>{let n=e.findIndex(e=>e.value===t.value);if(-1!==n){let a=[...e];return a[n]={...a[n],...t,enabled:!0},a}return[...e,t]}),I("")},disabled:!L||!A,className:"inline-flex items-center justify-center gap-1 rounded-lg bg-primary px-3 py-2 text-xs font-semibold text-white disabled:opacity-50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"add_link"}),"Th\xeam account"]})]})]}),0===y.length?(0,a.jsxs)("div",{className:"rounded-xl border border-dashed border-border p-8 text-center text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined",children:"layers"}),(0,a.jsx)("p",{className:"mt-2 text-sm",children:"Chưa th\xeam model n\xe0o"})]}):(0,a.jsx)(s.Mp,{sensors:W,collisionDetection:s.fp,modifiers:[o.FN,o.gj],onDragEnd:e=>{let{active:t,over:n}=e;if(n&&t.id!==n.id){let e=et.findIndex(e=>e.uid===t.id),a=et.findIndex(e=>e.uid===n.id);-1!==e&&-1!==a&&v(t=>(0,l.be)(t,e,a))}},children:(0,a.jsx)(l.gB,{items:et.map(e=>e.uid),strategy:l._G,children:(0,a.jsx)("div",{className:"space-y-3",children:et.map(({uid:e,row:t},n)=>(0,a.jsx)(Q,{id:e,index:n,model:t.label||t.value,subtitle:t.subtitle,enabled:t.enabled,isFirst:0===n,isLast:n===y.length-1,onEdit:e=>{let t=e.trim();if(!t)return;let a=[...y],r=a[n];if(r?.target&&"object"==typeof r.target){let e=D({...r.target,model:t});a[n]=F(e,!1!==r.enabled)}else a[n]=F(t,r?.enabled!==!1);v(a)},onMoveUp:()=>{if(0===n)return;let e=[...y];[e[n-1],e[n]]=[e[n],e[n-1]],v(e)},onMoveDown:()=>{if(n===y.length-1)return;let e=[...y];[e[n],e[n+1]]=[e[n+1],e[n]],v(e)},onToggleEnabled:()=>{let e=[...y];e[n]={...e[n],enabled:!e[n].enabled},v(e)},onRemove:()=>v(y.filter((e,t)=>t!==n))},e))})})})]})]}),(0,a.jsxs)("div",{className:"flex justify-end gap-3 border-t border-border bg-white px-5 py-4 dark:bg-zinc-950 sm:px-6",children:[(0,a.jsx)("button",{type:"button",onClick:i,className:"rounded-xl border border-border px-4 py-2 text-sm font-medium text-text-main hover:bg-surface",children:"Hủy"}),(0,a.jsx)("button",{type:"button",onClick:ec,disabled:N,className:"rounded-xl bg-primary px-4 py-2 text-sm font-medium text-white hover:opacity-90 disabled:opacity-50",children:N?"Đang lưu...":em?"Lưu":"Tạo"})]})]})}),(0,a.jsx)(d.rq,{isOpen:k,onClose:()=>j(!1),onSelect:e=>{let t=e.value;v(e=>{let n=e.findIndex(e=>e.value===t);if(-1!==n){let t=[...e];return t[n]={...t[n],enabled:!0},t}return[...e,F(t,!0)]})},onDeselect:e=>{v(t=>t.filter(t=>t.value!==e.value))},activeProviders:m,modelAliases:M,title:"Th\xeam model v\xe0o combo",kindFilter:h,addedModelValues:en,closeOnSelect:!1})]})}}},e=>{e.O(0,[2574,3862,246,2714,7055,5564,5263,5497,8441,3794,7358],()=>e(e.s=20061)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3649],{20061:(e,t,n)=>{Promise.resolve().then(n.bind(n,47295))},47295:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>X});var a=n(95155),r=n(12115),s=n(44923),l=n(87256),i=n(39768),o=n(5020),d=n(35497),c=n(11059),m=n(28777),u=n(52679);let x=/^[a-zA-Z0-9_.\-]+$/,p=[{value:"global",label:"To\xe0n cục / h\xe0nh vi hiện tại",description:"Giữ h\xe0nh vi hiện tại: mọi request d\xf9ng chung v\xf2ng xoay combo to\xe0n cục."},{value:"client_ip",label:"IP client",description:"Giữ c\xf9ng model khởi đầu cho c\xf9ng IP client cho đến khi hết TTL."},{value:"client_session",label:"IP client + phi\xean chat",description:"Ph\xf9 hợp nhất cho c\xf4ng cụ chat. Giữ c\xf9ng model cho c\xf9ng m\xe1y v\xe0 c\xf9ng phi\xean chat."}],h=[{value:"fallback",label:"Ưu ti\xean fallback",description:"Thử model trong combo theo đ\xfang thứ tự hiển thị, lỗi th\xec fallback."},{value:"round-robin",label:"Round Robin",description:"Lu\xe2n phi\xean model đang bật được thử đầu ti\xean. C\xe1c t\xf9y chọn giữ d\xednh b\xean dưới vẫn được \xe1p dụng."},{value:"least-latency",label:"Độ trễ thấp nhất",description:"Ưu ti\xean target c\xf3 điểm health/độ trễ tốt nhất. Hữu \xedch cho LAN Ollama."},{value:"p2c",label:"P2C",description:"Power of Two Choices: lấy mẫu hai target khỏe rồi chọn target \xedt bận hơn."}],b=[{card:"border-sky-100 bg-sky-50/55 dark:border-sky-400/15 dark:bg-sky-950/10",panel:"border-sky-100/80 bg-white/80 dark:border-sky-400/15 dark:bg-zinc-950/60"},{card:"border-slate-200 bg-slate-50/80 dark:border-slate-500/15 dark:bg-slate-900/35",panel:"border-slate-200/80 bg-white/80 dark:border-slate-500/15 dark:bg-zinc-950/60"},{card:"border-emerald-100 bg-emerald-50/45 dark:border-emerald-400/15 dark:bg-emerald-950/10",panel:"border-emerald-100/80 bg-white/80 dark:border-emerald-400/15 dark:bg-zinc-950/60"},{card:"border-violet-100 bg-violet-50/45 dark:border-violet-400/15 dark:bg-violet-950/10",panel:"border-violet-100/80 bg-white/80 dark:border-violet-400/15 dark:bg-zinc-950/60"}],g=Object.freeze({temperature:.3,top_p:.95,presence_penalty:0,max_tokens:4096,reasoning_budget:0,thinkingMode:"off",forceThinkingOffAboveChars:5e4}),f=Object.freeze({temperature:.2,top_p:.95,presence_penalty:0,max_tokens:4096}),y=[{value:"inherit",label:"Theo request gốc",description:"Giữ nguy\xean request gốc, kh\xf4ng inject thinking."},{value:"off",label:"Tắt thinking",description:"Gửi chat_template_kwargs.enable_thinking = false."},{value:"on",label:"Bật thinking",description:"Gửi chat_template_kwargs.enable_thinking = true."}],v=[{value:"inherit",label:"Theo cấu h\xecnh hệ thống",description:"Sử dụng ch\xednh s\xe1ch lưu Prompt Logs chung của hệ thống."},{value:"enabled",label:"Lưu đầy đủ nội dung",description:"Cho ph\xe9p quản trị vi\xean xem lại to\xe0n bộ prompt v\xe0 phản hồi của c\xe1c request thuộc combo n\xe0y."},{value:"disabled",label:"Chỉ lưu thống k\xea",description:"Kh\xf4ng lưu nội dung hội thoại. Chỉ lưu metadata, model, provider, token, thời gian xử l\xfd v\xe0 c\xe1c thống k\xea vận h\xe0nh."}];function k(e){return e&&"object"==typeof e&&!Array.isArray(e)}function j(e,t){return Object.prototype.hasOwnProperty.call(e||{},t)}function N(e,{min:t,max:n,precision:a=3}={}){if(null==e||""===e)return;let r=Number(e);if(Number.isFinite(r))return Number(Math.min(n,Math.max(t,r)).toFixed(a))}function _(e,{min:t,max:n}={}){let a=N(e,{min:t,max:n,precision:0});return void 0===a?void 0:Math.trunc(a)}function C(e){let t=O(e).toLowerCase();return"enabled"===t||"disabled"===t?t:"inherit"}function w(e={}){let t=k(e)?e:{},n={};if(j(t,"temperature")){let e=N(t.temperature,{min:0,max:2});void 0!==e&&(n.temperature=e)}if(j(t,"top_p")||j(t,"topP")){let e=N(t.top_p??t.topP,{min:.01,max:1});void 0!==e&&(n.top_p=e)}let a=t.presence_penalty??t.presencePenalty??t["presence-penalty"];if(j(t,"presence_penalty")||j(t,"presencePenalty")||j(t,"presence-penalty")){let e=N(a,{min:-2,max:2});void 0!==e&&(n.presence_penalty=e)}let r=t.max_tokens??t.maxTokens??t.max_token;if(j(t,"max_tokens")||j(t,"maxTokens")||j(t,"max_token")){let e=_(r,{min:1,max:262144});void 0!==e&&(n.max_tokens=e)}return n}function T(e={}){let t=k(e)?e:{},n={};if(j(t,"temperature")){let e=N(t.temperature,{min:0,max:2});void 0!==e&&(n.temperature=e)}if(j(t,"top_p")){let e=N(t.top_p,{min:.01,max:1});void 0!==e&&(n.top_p=e)}let a=t.presence_penalty??t.presencePenalty??t["presence-penalty"];if(j(t,"presence_penalty")||j(t,"presencePenalty")||j(t,"presence-penalty")){let e=N(a,{min:-2,max:2});void 0!==e&&(n.presence_penalty=e)}let r=t.max_tokens??t.maxTokens??t.max_token;if(j(t,"max_tokens")||j(t,"maxTokens")||j(t,"max_token")){let e=_(r,{min:1,max:262144});void 0!==e&&(n.max_tokens=e)}let s=t.reasoning_budget??t.reasoningBudget??t["reasoning-budget"];if(j(t,"reasoning_budget")||j(t,"reasoningBudget")||j(t,"reasoning-budget")){let e=_(s,{min:0,max:262144});void 0!==e&&(n.reasoning_budget=e)}let l=t.forceThinkingOffAboveChars??t.forceThinkingOffChars??t.force_thinking_off_above_chars;if(j(t,"forceThinkingOffAboveChars")||j(t,"forceThinkingOffChars")||j(t,"force_thinking_off_above_chars")){let e=_(l,{min:0,max:1e6});void 0!==e&&(n.forceThinkingOffAboveChars=e)}let i=t.forceThinkingOffRequestOverrides??t.forceThinkingOffOverrides??t.autoOffRequestOverrides;if(j(t,"forceThinkingOffRequestOverrides")||j(t,"forceThinkingOffOverrides")||j(t,"autoOffRequestOverrides")){let e=w(i);Object.keys(e).length>0&&(n.forceThinkingOffRequestOverrides=e)}let o=function(e){if(!0===e)return"on";if(!1===e)return"off";let t=O(e).toLowerCase();return["on","true","1","enable","enabled"].includes(t)?"on":["off","false","0","disable","disabled"].includes(t)?"off":void 0}(t.thinkingMode??t.thinking);return o&&(n.thinkingMode=o),n}function O(e){return String(e||"").trim()}function S(e={}){return Array.isArray(e.disabledModels)?[...new Set(e.disabledModels.map(e=>O(e)).filter(Boolean))]:[]}function $(e={}){let t=e.fallbackStrategy||"fallback";return{...e,fallbackStrategy:t,stickyScope:e.stickyScope||"global",stickyTtlMinutes:Number(e.stickyTtlMinutes||120),stickyFallbackToClientIp:!1!==e.stickyFallbackToClientIp,lanHealthEnabled:!1!==e.lanHealthEnabled,healthCheckPath:e.healthCheckPath||"/api/tags",healthCheckIntervalMs:Number(e.healthCheckIntervalMs||15e3),requiredTags:Array.isArray(e.requiredTags)?e.requiredTags:[],modelTagRules:e.modelTagRules||e.modelTags||e.tagRules||{},disabledModels:S(e),requestOverrides:T(e.requestOverrides||{}),contentLoggingMode:C(e.contentLoggingMode)}}function M(e={}){let t={...e};t.disabledModels=S(e),"fallback"===(t.fallbackStrategy||"fallback")&&delete t.fallbackStrategy,t.disabledModels.length||delete t.disabledModels;let n=C(t.contentLoggingMode);"inherit"===n?delete t.contentLoggingMode:t.contentLoggingMode=n,t.requiredTags?.length||delete t.requiredTags;let a=T(t.requestOverrides||{});return Object.keys(a).length?t.requestOverrides=a:delete t.requestOverrides,t.modelTagRules&&0!==Object.keys(t.modelTagRules).length||delete t.modelTagRules,"/api/tags"===t.healthCheckPath&&delete t.healthCheckPath,15e3===Number(t.healthCheckIntervalMs)&&delete t.healthCheckIntervalMs,!0===t.lanHealthEnabled&&delete t.lanHealthEnabled,Object.keys(t).length?t:null}function q(e=[]){return Array.isArray(e)?e.join(", "):String(e||"")}function L(e=""){return String(e||"").split(/[\n,;]+/).map(e=>e.trim()).filter(Boolean)}function E(e={}){return e&&"object"==typeof e?Object.entries(e).map(([e,t])=>`${e}: ${Array.isArray(t)?t.join(", "):String(t||"")}`).join("\n"):""}function A(e){return"string"==typeof e?e:e&&"object"==typeof e&&(e.value||e.model||e.id)||""}function P(e={}){let t=O(e.provider);return O(e.providerSpecificData?.prefix)||O(e.prefix)||O((0,u.wG)(t))||t}function R(e={}){return O(e.email)||O(e.accountName)||O(e.displayName)||O(e.name)||O(e.providerSpecificData?.nodeName)||O(e.id)}function I(e){return e&&"object"==typeof e?O(e.connectionId||e.connection_id):""}function B(e){let t=A(e),n=I(e);return t?n?`${t}@@${n}`:t:""}function z(e){return"string"==typeof e?e:e&&"object"==typeof e?O(e.label)||O(e.displayName)||O(e.name)||A(e):""}function D(e){if(!e||"object"!=typeof e)return A(e);let t=A(e);return t?Object.fromEntries(Object.entries({model:t,connectionId:I(e)||void 0,label:z(e)||void 0,provider:O(e.provider)||void 0,accountName:O(e.accountName||e.account_name)||void 0,weight:Number(e.weight||0)>0?Number(e.weight):void 0}).filter(([,e])=>void 0!==e&&""!==e)):""}function F(e,t=!0){let n=D(e),a=B(n);return{value:a,enabled:t,target:n,label:z(n)||a,subtitle:function(e){if(!e||"object"!=typeof e)return"";let t=I(e),n=A(e);return t?`T\xe0i khoản cố định • ${t}${n?` • ${n}`:""}`:""}(n)}}function G(e={}){return O(e.defaultModel)||O(e.providerSpecificData?.defaultModel)||O(e.model)||""}function H(e,t,n,a=""){let r=O(n);!r||t.has(r)||(t.add(r),e.push({value:r,label:O(a)||r}))}function K(e={},t={}){let n=[],a=new Set,r=O(e.provider),s=[...new Set([P(e),O((0,u.wG)(r)),r].filter(Boolean))];for(let e of(0,m.KC)(r)||[])e?.type&&"llm"!==e.type||H(n,a,e.id,e.name||e.id);for(let[e,r]of Object.entries(t||{})){let t=O(r),l=s.find(e=>e&&t.startsWith(`${e}/`));if(!l)continue;let i=t.slice(l.length+1);H(n,a,i,e||i)}return H(n,a,G(e),"Model mặc định"),n}function J(e={},{disabledModels:t=[],requestOverrides:n,contentLoggingMode:a}={}){let r={...e},s=[...new Set((t||[]).map(e=>O(e)).filter(Boolean))];if(s.length>0?r.disabledModels=s:delete r.disabledModels,void 0!==n){let e=T(n||{});Object.keys(e).length?r.requestOverrides=e:delete r.requestOverrides}if(void 0!==a){let e=C(a);"inherit"===e?delete r.contentLoggingMode:r.contentLoggingMode=e}return M(r)}function X(){let[e,t]=(0,r.useState)([]),[n,s]=(0,r.useState)(!0),[l,i]=(0,r.useState)(!1),[o,m]=(0,r.useState)(null),[u,x]=(0,r.useState)([]),[p,h]=(0,r.useState)(!1),[b,g]=(0,r.useState)(!1),[f,y]=(0,r.useState)({}),[v,k]=(0,r.useState)(""),[j,N]=(0,r.useState)(null),{copied:_,copy:C}=(0,c.C)();(0,r.useEffect)(()=>{w()},[]),(0,r.useEffect)(()=>{if(0===e.length){v&&k("");return}let t=e.some(e=>e.name===v);v&&t||k(e[0].name)},[e,v]);let w=async()=>{try{let e=await fetch("/api/dashboard/combos",{cache:"no-store"}),n=await e.json();e.ok&&(t(n.combos||[]),y(n.comboStrategies||{}))}catch(e){console.log("Error fetching combo data:",e)}finally{s(!1)}},T=async()=>{if(!p&&!b){g(!0);try{let e=await fetch("/api/providers",{cache:"no-store"}),t=await e.json();e.ok&&(x(t.connections||[]),h(!0))}catch(e){console.log("Error loading provider accounts:",e)}finally{g(!1)}}},O=async()=>{i(!0),T()},S=async e=>{m(e),T()},q=async e=>{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategies:e})}),y(e)},L=async e=>{let{disabledModels:t=[],requestOverrides:n,contentLoggingMode:a,...r}=e;try{let e=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});if(e.ok){let e=J({},{disabledModels:t,requestOverrides:n,contentLoggingMode:a});e&&await q({...f,[r.name]:e}),await w(),k(r.name),i(!1)}else{let t=await e.json();alert(t.error||"Tạo combo thất bại")}}catch(e){console.log("Error creating combo:",e)}},E=async(e,t)=>{let{disabledModels:n=[],requestOverrides:a,contentLoggingMode:r,...s}=t,l=o?.name;try{let t=await fetch(`/api/combos/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});if(t.ok){let e={...f};l&&l!==s.name&&e[l]&&(e[s.name]=e[l],delete e[l]);let t=J(e[s.name]||{},{disabledModels:n,requestOverrides:a,contentLoggingMode:r});t?e[s.name]=t:delete e[s.name],await q(e),await w(),k(s.name),m(null)}else{let e=await t.json();alert(e.error||"Cập nhật combo thất bại")}}catch(e){console.log("Error updating combo:",e)}},A=async n=>{let a=e.find(e=>e.id===n);N({title:"X\xf3a combo",message:"Bạn c\xf3 chắc muốn x\xf3a combo n\xe0y?",onConfirm:async()=>{N(null);try{if((await fetch(`/api/combos/${n}`,{method:"DELETE"})).ok){if(a?.name&&f[a.name]){let e={...f};delete e[a.name],await q(e)}t(e=>{let t=e.filter(e=>e.id!==n);return a?.name===v&&k(t[0]?.name||""),t})}}catch(e){console.log("Error deleting combo:",e)}}})},P=async(e,t)=>{try{let n={...f};if(t)n[e]=$(n[e]);else{let t=function(e={}){return M({...e,fallbackStrategy:"fallback"})}(n[e]||{});t?n[e]=t:delete n[e]}await q(n)}catch(e){console.log("Error updating combo strategy:",e)}},R=async(e,t)=>{try{let n={...f},a=M({...$(n[e]),...t});a?n[e]=a:delete n[e],await q(n)}catch(e){console.log("Error updating combo routing settings:",e)}},I=e.find(e=>e.name===v)||e[0]||null,B=I?Math.max(0,e.findIndex(e=>e.id===I.id)):0;return n?(0,a.jsx)("div",{className:"grid gap-4",children:[1,2,3].map(e=>(0,a.jsx)("div",{className:"h-36 animate-pulse rounded-2xl border border-border bg-surface"},e))}):(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-2xl font-bold text-text-main",children:"Combo model"}),(0,a.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Tạo combo model với fallback, round-robin, độ trễ thấp nhất, P2C v\xe0 routing theo trạng th\xe1i health của LAN Ollama."})]}),(0,a.jsxs)("button",{type:"button",onClick:O,className:"inline-flex items-center justify-center gap-2 rounded-xl bg-primary px-4 py-2 text-sm font-medium text-white hover:opacity-90",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"add"}),"Tạo combo"]})]}),0===e.length?(0,a.jsxs)("div",{className:"rounded-2xl border border-dashed border-border bg-surface p-12 text-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-4xl text-text-muted",children:"layers"}),(0,a.jsx)("h2",{className:"mt-3 text-lg font-semibold text-text-main",children:"Chưa c\xf3 combo n\xe0o"}),(0,a.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Tạo combo model c\xf3 hỗ trợ fallback."}),(0,a.jsx)("button",{type:"button",onClick:O,className:"mt-4 rounded-xl bg-primary px-4 py-2 text-sm font-medium text-white hover:opacity-90",children:"Tạo combo"})]}):(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsx)("div",{className:"rounded-2xl border border-border bg-surface/80 p-4 shadow-sm dark:bg-zinc-950/70",children:(0,a.jsxs)("div",{className:"flex flex-col gap-3 lg:flex-row lg:items-end lg:justify-between",children:[(0,a.jsxs)("label",{className:"block min-w-0 flex-1",children:[(0,a.jsx)("span",{className:"mb-1 block text-xs font-semibold uppercase tracking-wide text-text-muted",children:"Combo đang xem"}),(0,a.jsx)("select",{value:I?.name||"",onChange:e=>k(e.target.value),className:"w-full rounded-xl border border-border bg-white px-4 py-2.5 text-sm font-semibold text-text-main outline-none transition focus:border-primary dark:bg-zinc-900",children:e.map(e=>(0,a.jsxs)("option",{value:e.name,children:[e.name," • ",(e.models||[]).length," model"]},e.id))})]}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2 text-xs text-text-muted",children:[(0,a.jsxs)("span",{className:"rounded-full bg-background px-3 py-1 dark:bg-zinc-900",children:["Tổng ",e.length," combo"]}),I?(0,a.jsxs)("span",{className:"rounded-full bg-primary/10 px-3 py-1 font-medium text-primary",children:["Đang hiển thị: ",I.name]}):null]})]})}),I?(0,a.jsx)(U,{combo:I,comboIndex:B,copied:_,onCopy:C,onEdit:()=>S(I),onDelete:()=>A(I.id),comboStrategy:f[I.name]||{},onToggleRoundRobin:e=>P(I.name,e),onUpdateComboStrategy:e=>R(I.name,e)},I.id):null]}),(0,a.jsx)(ee,{isOpen:l,comboStrategy:{},onClose:()=>i(!1),onSave:L,activeProviders:u,providersLoading:b}),(0,a.jsx)(ee,{isOpen:!!o,combo:o,comboStrategy:f[o?.name]||{},onClose:()=>m(null),onSave:e=>E(o.id,e),activeProviders:u,providersLoading:b}),(0,a.jsx)(d.uo,{isOpen:!!j,onClose:()=>N(null),onConfirm:j?.onConfirm,title:j?.title||"X\xe1c nhận",message:j?.message,variant:"danger"})]})}function U({combo:e,comboIndex:t=0,copied:n,onCopy:s,onEdit:l,onDelete:i,comboStrategy:o={},onToggleRoundRobin:d,onUpdateComboStrategy:c}){let m=$(o||{}),u=m.fallbackStrategy||"fallback",x=h.find(e=>e.value===u)||h[0],g=m.stickyScope||"global",f=p.find(e=>e.value===g)||p[0],y=S(o),v=b[t%b.length],[k,j]=(0,r.useState)(q(m.requiredTags)),[N,_]=(0,r.useState)(E(m.modelTagRules));return(0,r.useEffect)(()=>{j(q(m.requiredTags)),_(E(m.modelTagRules))},[e.name,JSON.stringify(m.requiredTags||[]),JSON.stringify(m.modelTagRules||{})]),(0,a.jsxs)("div",{className:`rounded-2xl border p-5 shadow-sm transition-colors ${v.card}`,children:[(0,a.jsxs)("div",{className:"flex flex-col gap-4 lg:flex-row lg:items-start lg:justify-between",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary",children:"layers"}),(0,a.jsx)("h3",{className:"truncate text-lg font-semibold text-text-main",children:e.name})]}),(0,a.jsxs)("p",{className:"mt-1 text-sm text-text-muted",children:[(e.models||[]).length," model đang bật",y.length>0?` • ${y.length} đ\xe3 tắt`:""]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)(W,{icon:n===`combo-${e.id}`?"check":"content_copy",title:"Copy t\xean combo",onClick:()=>s(e.name,`combo-${e.id}`)}),(0,a.jsx)(W,{icon:"edit",title:"Chỉnh sửa",onClick:l}),(0,a.jsx)(W,{icon:"delete",title:"X\xf3a",onClick:i,danger:!0})]})]}),(0,a.jsxs)("div",{className:"mt-4 flex flex-wrap gap-2",children:[0===(e.models||[]).length?(0,a.jsx)("span",{className:"rounded-lg bg-background px-2 py-1 text-xs text-text-muted",children:"Chưa c\xf3 model đang bật"}):(e.models||[]).slice(0,5).map((e,t)=>(0,a.jsx)("span",{className:"rounded-lg bg-background px-2 py-1 font-mono text-xs text-text-main",children:z(e)},`${B(e)}-${t}`)),(e.models||[]).length>5&&(0,a.jsxs)("span",{className:"rounded-lg bg-background px-2 py-1 text-xs text-text-muted",children:["+",e.models.length-5," model nữa"]}),y.length>0&&(0,a.jsxs)("span",{className:"rounded-lg bg-red-500/10 px-2 py-1 text-xs text-red-500",children:[y.length," đ\xe3 tắt"]}),(function(e={}){let t=T(e),n=[];if(void 0!==t.temperature&&n.push(`temp ${t.temperature}`),void 0!==t.top_p&&n.push(`top_p ${t.top_p}`),void 0!==t.presence_penalty&&n.push(`presence ${t.presence_penalty}`),void 0!==t.max_tokens&&n.push(`max ${t.max_tokens}`),void 0!==t.reasoning_budget&&n.push(`reasoning ${t.reasoning_budget}`),t.forceThinkingOffAboveChars>0){let e=t.forceThinkingOffRequestOverrides||{},a=[];void 0!==e.temperature&&a.push(`temp ${e.temperature}`),void 0!==e.top_p&&a.push(`top_p ${e.top_p}`),void 0!==e.presence_penalty&&a.push(`presence ${e.presence_penalty}`),void 0!==e.max_tokens&&a.push(`max ${e.max_tokens}`),n.push(`auto off >${t.forceThinkingOffAboveChars} chars${a.length?` (${a.join(", ")})`:""}`)}return"off"===t.thinkingMode&&n.push("thinking off"),"on"===t.thinkingMode&&n.push("thinking on"),n})(m.requestOverrides).map(e=>(0,a.jsx)("span",{className:"rounded-lg bg-primary/10 px-2 py-1 text-xs font-medium text-primary",children:e},e)),"inherit"!==m.contentLoggingMode?(0,a.jsxs)("span",{className:`rounded-lg px-2 py-1 text-xs font-medium ${"disabled"===m.contentLoggingMode?"bg-amber-500/10 text-amber-600":"bg-emerald-500/10 text-emerald-600"}`,children:["prompt logs ",m.contentLoggingMode]}):null]}),(0,a.jsxs)("div",{className:`mt-5 rounded-xl border p-4 ${v.panel}`,children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h4",{className:"font-semibold text-text-main",children:"Chiến lược routing"}),(0,a.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:x.description})]}),(0,a.jsx)("select",{value:u,onChange:e=>c({fallbackStrategy:e.target.value}),className:"rounded-lg border border-border bg-surface px-3 py-2 text-sm text-text-main outline-none focus:border-primary",children:h.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))})]}),(0,a.jsx)(Y,{value:m.requestOverrides||{},onChange:e=>c({requestOverrides:e}),compact:!0}),(0,a.jsx)(V,{value:m.contentLoggingMode,onChange:e=>c({contentLoggingMode:e}),compact:!0}),("least-latency"===u||"p2c"===u)&&(0,a.jsxs)("div",{className:"mt-4 rounded-xl border border-primary/15 bg-surface p-3",children:[(0,a.jsxs)("label",{className:"flex items-start gap-2 text-sm text-text-muted",children:[(0,a.jsx)("input",{type:"checkbox",checked:!1!==m.lanHealthEnabled,onChange:e=>c({lanHealthEnabled:e.target.checked}),className:"mt-0.5 h-3.5 w-3.5 accent-primary"}),(0,a.jsxs)("span",{children:[(0,a.jsx)("span",{className:"font-medium text-text-main",children:"Routing theo trạng th\xe1i health LAN"}),(0,a.jsx)("span",{className:"mt-1 block text-xs",children:"D\xf9ng dữ liệu health v\xe0 circuit breaker khi xếp hạng target trong combo."})]})]}),(0,a.jsxs)("div",{className:"mt-3 grid gap-3 md:grid-cols-2",children:[(0,a.jsxs)("label",{className:"block",children:[(0,a.jsx)("span",{className:"mb-1 block text-xs font-medium text-text-muted",children:"Đường dẫn health"}),(0,a.jsx)("input",{value:m.healthCheckPath||"/api/tags",onChange:e=>c({healthCheckPath:e.target.value||"/api/tags"}),placeholder:"/api/tags",className:"w-full rounded-lg border border-border bg-background px-2 py-1.5 font-mono text-xs text-text-main outline-none focus:border-primary"})]}),(0,a.jsxs)("label",{className:"block",children:[(0,a.jsx)("span",{className:"mb-1 block text-xs font-medium text-text-muted",children:"Chu kỳ kiểm tra (ms)"}),(0,a.jsx)("input",{type:"number",min:"1000",value:m.healthCheckIntervalMs||15e3,onChange:e=>c({healthCheckIntervalMs:Number(e.target.value)||15e3}),className:"w-full rounded-lg border border-border bg-background px-2 py-1.5 text-xs text-text-main outline-none focus:border-primary"})]})]}),(0,a.jsxs)("div",{className:"mt-3 grid gap-3 md:grid-cols-2",children:[(0,a.jsxs)("label",{className:"block",children:[(0,a.jsx)("span",{className:"mb-1 block text-xs font-medium text-text-muted",children:"Tag endpoint bắt buộc"}),(0,a.jsx)("input",{value:k,onChange:e=>j(e.target.value),onBlur:()=>c({requiredTags:L(k)}),onKeyDown:e=>"Enter"===e.key&&e.currentTarget.blur(),placeholder:"gpu, vram:8gb",className:"w-full rounded-lg border border-border bg-background px-2 py-1.5 font-mono text-xs text-text-main outline-none focus:border-primary"}),(0,a.jsx)("span",{className:"mt-1 block text-[11px] text-text-muted",children:"Mọi endpoint được route đều phải c\xf3 c\xe1c tag n\xe0y."})]}),(0,a.jsxs)("label",{className:"block",children:[(0,a.jsx)("span",{className:"mb-1 block text-xs font-medium text-text-muted",children:"Quy tắc tag theo model"}),(0,a.jsx)("textarea",{value:N,onChange:e=>_(e.target.value),onBlur:()=>c({modelTagRules:function(e=""){let t={};for(let n of String(e||"").split(/\n+/)){let e=n.trim();if(!e)continue;let a=e.indexOf(":");if(-1===a)continue;let r=e.slice(0,a).trim(),s=L(e.slice(a+1));r&&s.length&&(t[r]=s)}return t}(N)}),placeholder:"qwen3:32b: gpu, vram:16gb\nqwen3:8b: model_support:qwen3:8b",rows:3,className:"w-full rounded-lg border border-border bg-background px-2 py-1.5 font-mono text-xs text-text-main outline-none focus:border-primary"})]})]})]}),"round-robin"===u&&(0,a.jsxs)("div",{className:"mt-4 rounded-xl border border-primary/15 bg-surface p-3",children:[(0,a.jsxs)("div",{className:"mb-3 flex items-center justify-between gap-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm font-semibold text-primary",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"sticky_note_2"}),"Round Robin giữ d\xednh"]}),(0,a.jsxs)("label",{className:"flex items-center gap-2 text-xs text-text-muted",children:[(0,a.jsx)("input",{type:"checkbox",checked:"round-robin"===u,onChange:e=>d(e.target.checked),className:"h-3.5 w-3.5 accent-primary"}),"Bật"]})]}),(0,a.jsxs)("div",{className:"grid gap-3 md:grid-cols-2",children:[(0,a.jsxs)("label",{className:"block",children:[(0,a.jsx)("span",{className:"mb-1 block text-xs font-medium text-text-muted",children:"Chế độ giữ d\xednh"}),(0,a.jsx)("select",{value:g,onChange:e=>c({stickyScope:e.target.value}),className:"w-full rounded-lg border border-border bg-background px-2 py-1.5 text-xs text-text-main outline-none focus:border-primary",children:p.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))}),(0,a.jsx)("span",{className:"mt-1 block text-[11px] text-text-muted",children:f.description})]}),(0,a.jsxs)("label",{className:"block",children:[(0,a.jsx)("span",{className:"mb-1 block text-xs font-medium text-text-muted",children:"TTL giữ d\xednh (ph\xfat)"}),(0,a.jsx)("input",{type:"number",min:"1",value:m.stickyTtlMinutes||120,onChange:e=>c({stickyTtlMinutes:Number(e.target.value)||120}),className:"w-full rounded-lg border border-border bg-background px-2 py-1.5 text-xs text-text-main outline-none focus:border-primary"})]})]}),(0,a.jsxs)("label",{className:"mt-3 flex items-start gap-2 text-xs text-text-muted",children:[(0,a.jsx)("input",{type:"checkbox",checked:!1!==m.stickyFallbackToClientIp,onChange:e=>c({stickyFallbackToClientIp:e.target.checked}),className:"mt-0.5 h-3.5 w-3.5 accent-primary"}),"Nếu thiếu chat session id, fallback về IP client thay v\xec xoay to\xe0n cục."]})]})]})]})}function W({icon:e,title:t,onClick:n,danger:r=!1}){return(0,a.jsx)("button",{type:"button",onClick:e=>{e.stopPropagation(),n?.()},className:`rounded-lg p-2 transition ${r?"text-red-500 hover:bg-red-500/10":"text-text-muted hover:bg-background hover:text-primary"}`,title:t,"aria-label":t,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:e})})}function Q({id:e,index:t,model:n,subtitle:s="",enabled:o,isFirst:d,isLast:c,onEdit:m,onMoveUp:u,onMoveDown:x,onRemove:p,onToggleEnabled:h}){let{attributes:b,listeners:g,setNodeRef:f,transform:y,isDragging:v}=(0,l.gl)({id:e}),k={transform:i.Ks.Transform.toString(y),opacity:v?.4:1,zIndex:v?999:void 0},[j,N]=(0,r.useState)(!1),[_,C]=(0,r.useState)(n);(0,r.useEffect)(()=>{C(n)},[n]);let w=()=>{let e=_.trim();e&&e!==n?m(e):C(n),N(!1)};return(0,a.jsxs)("div",{ref:f,style:k,className:`flex items-center gap-3 rounded-xl border p-3 transition ${o?"border-border bg-background":"border-red-200 bg-red-50/70 opacity-75 dark:border-red-500/30 dark:bg-red-500/10"}`,children:[(0,a.jsx)("button",{type:"button",className:"cursor-grab text-text-muted active:cursor-grabbing",...b,...g,title:"K\xe9o để sắp xếp lại",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"drag_indicator"})}),(0,a.jsx)("span",{className:`flex h-7 w-7 shrink-0 items-center justify-center rounded-full text-xs font-semibold ${o?"bg-primary/10 text-primary":"bg-red-100 text-red-600 dark:bg-red-500/20 dark:text-red-300"}`,children:t+1}),j?(0,a.jsx)("input",{autoFocus:!0,value:_,onChange:e=>C(e.target.value),onBlur:w,onKeyDown:e=>{"Enter"===e.key&&w(),"Escape"===e.key&&(C(n),N(!1))},className:"min-w-0 flex-1 rounded border border-primary/40 bg-background px-2 py-1 font-mono text-xs text-text-main outline-none"}):(0,a.jsxs)("button",{type:"button",onClick:()=>N(!0),className:"min-w-0 flex-1 text-left",title:"Bấm để sửa model",children:[(0,a.jsx)("span",{className:`block truncate font-mono text-xs ${o?"text-text-main":"text-text-muted line-through"}`,children:n}),s?(0,a.jsx)("span",{className:"mt-0.5 block truncate text-[11px] text-text-muted",children:s}):null]}),(0,a.jsx)("button",{type:"button",onClick:h,className:`rounded-lg p-1.5 transition ${o?"text-green-600 hover:bg-green-500/10":"text-red-500 hover:bg-red-500/10"}`,title:o?"Tắt model trong combo":"Bật model trong combo",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:o?"toggle_on":"toggle_off"})}),(0,a.jsx)("button",{type:"button",onClick:u,disabled:d,className:"rounded-lg p-1.5 text-text-muted transition hover:bg-surface disabled:opacity-30",title:"Di chuyển l\xean",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"arrow_upward"})}),(0,a.jsx)("button",{type:"button",onClick:x,disabled:c,className:"rounded-lg p-1.5 text-text-muted transition hover:bg-surface disabled:opacity-30",title:"Di chuyển xuống",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"arrow_downward"})}),(0,a.jsx)("button",{type:"button",onClick:p,className:"rounded-lg p-1.5 text-red-500 transition hover:bg-red-500/10",title:"X\xf3a",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"close"})})]})}function V({value:e="inherit",onChange:t,compact:n=!1}){let r=C(e),s=v.find(e=>e.value===r)||v[0];return(0,a.jsx)("div",{className:n?"mt-4 rounded-xl border border-amber-500/15 bg-surface p-3":"rounded-xl border border-amber-500/15 bg-amber-500/5 p-4",children:(0,a.jsxs)("div",{className:"grid gap-3 md:grid-cols-[minmax(0,1fr)_280px] md:items-center",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm font-semibold text-text-main",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-amber-500",children:"manage_search"}),"Prompt Logs cho combo n\xe0y"]}),(0,a.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:s.description}),"disabled"===r?(0,a.jsx)("p",{className:"mt-1 text-[11px] font-medium text-amber-600",children:"Khi chạy request, Prompt Logs sẽ chỉ ghi metadata v\xe0 hiển thị [promptlogs disabled on this combo]."}):null]}),(0,a.jsx)("select",{value:r,onChange:e=>t?.(C(e.target.value)),className:"w-full rounded-lg border border-border bg-surface px-3 py-2 text-sm text-text-main outline-none focus:border-primary",children:v.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))})]})})}function Z({icon:e,label:t,children:n,active:r,muted:s=!1,className:l=""}){return(0,a.jsxs)("label",{className:`rounded-lg border p-3 transition ${r?"border-primary/30 bg-background shadow-sm":"border-border bg-background/60"} ${l}`,children:[(0,a.jsxs)("span",{className:"mb-2 flex items-center justify-between gap-2 text-xs font-medium text-text-main",children:[(0,a.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[16px] ${r?"text-primary":"text-text-muted"}`,children:e}),(0,a.jsx)("span",{className:"truncate",children:t})]}),n?.toggle]}),n?.control,n?.hint?(0,a.jsx)("span",{className:"mt-1 block text-[11px] text-text-muted",children:n.hint}):null]})}function Y({value:e={},onChange:t,compact:n=!1}){let r=T(e),s=void 0!==r.temperature,l=void 0!==r.top_p,i=void 0!==r.presence_penalty,o=void 0!==r.max_tokens,d=void 0!==r.reasoning_budget,c=void 0!==r.forceThinkingOffAboveChars,m=r.forceThinkingOffRequestOverrides||{},u=void 0!==m.temperature,x=void 0!==m.top_p,p=void 0!==m.presence_penalty,h=void 0!==m.max_tokens,b=u||x||p||h,v=r.thinkingMode||"inherit",k="inherit"!==v,j=s||l||i||o,N=k||d||c||b,_=e=>{t?.(T({...r,...e}))},C=(e,n,a)=>{if(!n){let n={...r};delete n[e],"forceThinkingOffAboveChars"===e&&delete n.forceThinkingOffRequestOverrides,t?.(T(n));return}_({[e]:a})},O=e=>{_({forceThinkingOffRequestOverrides:w({...m,...e})})},S=(e,t,n)=>{let a={...m};if(!t){delete a[e],_({forceThinkingOffRequestOverrides:a});return}O({[e]:n})},$="w-full rounded-lg border border-border bg-surface px-2 py-1.5 text-sm text-text-main outline-none focus:border-primary disabled:opacity-50";return(0,a.jsxs)("div",{className:n?"mt-4 rounded-xl border border-sky-500/15 bg-surface p-3":"rounded-xl border border-sky-500/15 bg-sky-500/5 p-4",children:[(0,a.jsxs)("div",{className:"mb-3 flex flex-col gap-2 sm:flex-row sm:items-start sm:justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm font-semibold text-text-main",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-sky-500",children:"tune"}),"Tham số request Local endpoint"]}),(0,a.jsxs)("p",{className:"mt-1 text-xs text-text-muted",children:["Chỉ inject khi combo route 100% tới local endpoint: ",(0,a.jsx)("span",{className:"font-mono",children:"llama.cpp"}),", ",(0,a.jsx)("span",{className:"font-mono",children:"vLLM"})," hoặc ",(0,a.jsx)("span",{className:"font-mono",children:"Ollama"}),". Nếu combo mix local + cloud/provider kh\xe1c, BlueRouter bỏ qua block n\xe0y v\xe0 giữ nguy\xean request gốc."]})]}),!function(e={}){return Object.keys(T(e)).length>0}(r)?(0,a.jsx)("span",{className:"inline-flex shrink-0 items-center rounded-full bg-background px-2 py-1 text-[11px] font-semibold text-text-muted",children:"Kh\xf4ng override"}):(0,a.jsx)("span",{className:"inline-flex shrink-0 items-center rounded-full bg-primary/10 px-2 py-1 text-[11px] font-semibold text-primary",children:"C\xf3 override"})]}),(0,a.jsxs)("div",{className:"grid gap-3 xl:grid-cols-2",children:[(0,a.jsxs)("div",{className:`rounded-xl border p-3 ${j?"border-primary/20 bg-primary/5":"border-border bg-background/40"}`,children:[(0,a.jsxs)("div",{className:"mb-3 flex items-center gap-2 text-xs font-semibold text-primary",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"graphic_eq"}),"Sampling ",(0,a.jsx)("span",{className:"font-normal text-text-muted",children:"(điều khiển lựa chọn token)"})]}),(0,a.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2 2xl:grid-cols-3",children:[(0,a.jsx)(Z,{icon:"thermostat",label:"Temperature",active:s,children:{toggle:(0,a.jsx)("input",{type:"checkbox",checked:s,onChange:e=>C("temperature",e.target.checked,g.temperature),className:"h-3.5 w-3.5 accent-primary"}),control:(0,a.jsx)("input",{type:"number",min:"0",max:"2",step:"0.05",disabled:!s,value:s?r.temperature:g.temperature,onChange:e=>_({temperature:e.target.value}),className:$}),hint:"0 = ổn định, 2 = s\xe1ng tạo."}}),(0,a.jsx)(Z,{icon:"filter_alt",label:"top_p",active:l,children:{toggle:(0,a.jsx)("input",{type:"checkbox",checked:l,onChange:e=>C("top_p",e.target.checked,g.top_p),className:"h-3.5 w-3.5 accent-primary"}),control:(0,a.jsx)("input",{type:"number",min:"0.01",max:"1",step:"0.01",disabled:!l,value:l?r.top_p:g.top_p,onChange:e=>_({top_p:e.target.value}),className:$}),hint:"0.01–1.0; 0.9–0.95 thường hợp coder/chat."}}),(0,a.jsx)(Z,{icon:"repeat",label:"presence_penalty",active:i,children:{toggle:(0,a.jsx)("input",{type:"checkbox",checked:i,onChange:e=>C("presence_penalty",e.target.checked,g.presence_penalty),className:"h-3.5 w-3.5 accent-primary"}),control:(0,a.jsx)("input",{type:"number",min:"-2",max:"2",step:"0.05",disabled:!i,value:i?r.presence_penalty:g.presence_penalty,onChange:e=>_({presence_penalty:e.target.value}),className:$}),hint:"-2–2; coder thường để 0, chỉ tăng nhẹ nếu hay lặp."}}),(0,a.jsx)(Z,{icon:"output",label:"max_tokens",active:o,className:"sm:col-span-2 2xl:col-span-1",children:{toggle:(0,a.jsx)("input",{type:"checkbox",checked:o,onChange:e=>C("max_tokens",e.target.checked,g.max_tokens),className:"h-3.5 w-3.5 accent-primary"}),control:(0,a.jsx)("input",{type:"number",min:"1",max:"262144",step:"1",disabled:!o,value:o?r.max_tokens:g.max_tokens,onChange:e=>_({max_tokens:e.target.value}),className:$}),hint:"Giới hạn output cho request."}})]})]}),(0,a.jsxs)("div",{className:`rounded-xl border p-3 ${N?"border-primary/20 bg-primary/5":"border-border bg-background/40"}`,children:[(0,a.jsxs)("div",{className:"mb-3 flex items-center gap-2 text-xs font-semibold text-primary",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"psychology"}),"Thinking ",(0,a.jsx)("span",{className:"font-normal text-text-muted",children:"(suy luận nội bộ)"})]}),(0,a.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2 2xl:grid-cols-3",children:[(0,a.jsxs)("label",{className:`rounded-lg border p-3 transition ${k?"border-primary/30 bg-background shadow-sm":"border-border bg-background/60"}`,children:[(0,a.jsxs)("span",{className:"mb-2 flex items-center gap-1.5 text-xs font-medium text-text-main",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[16px] ${k?"text-primary":"text-text-muted"}`,children:"psychology_alt"}),"Thinking"]}),(0,a.jsx)("select",{value:v,onChange:e=>_({thinkingMode:"inherit"===e.target.value?void 0:e.target.value}),className:"w-full rounded-lg border border-border bg-surface px-2 py-1.5 text-sm text-text-main outline-none focus:border-primary",children:y.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))}),(0,a.jsx)("span",{className:"mt-1 block text-[11px] text-text-muted",children:y.find(e=>e.value===v)?.description||y[0].description})]}),(0,a.jsx)(Z,{icon:"account_balance_wallet",label:"reasoning_budget",active:d,children:{toggle:(0,a.jsx)("input",{type:"checkbox",checked:d,onChange:e=>C("reasoning_budget",e.target.checked,g.reasoning_budget),className:"h-3.5 w-3.5 accent-primary"}),control:(0,a.jsx)("input",{type:"number",min:"0",max:"262144",step:"1",disabled:!d,value:d?r.reasoning_budget:g.reasoning_budget,onChange:e=>_({reasoning_budget:e.target.value}),className:$}),hint:"Chỉ d\xf9ng cho llama.cpp/vLLM local; runtime sẽ map đ\xfang field."}}),(0,a.jsx)(Z,{icon:"speed",label:"Auto tắt thinking nếu prompt chars >=",active:c||b,className:"sm:col-span-2 2xl:col-span-3",children:{toggle:(0,a.jsx)("input",{type:"checkbox",checked:c,onChange:e=>C("forceThinkingOffAboveChars",e.target.checked,g.forceThinkingOffAboveChars),className:"h-3.5 w-3.5 accent-primary"}),control:(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsx)("input",{type:"number",min:"0",max:"1000000",step:"1000",disabled:!c,value:c?r.forceThinkingOffAboveChars:g.forceThinkingOffAboveChars,onChange:e=>_({forceThinkingOffAboveChars:e.target.value}),className:$}),(0,a.jsxs)("div",{className:"rounded-lg border border-border bg-surface/70 p-2",children:[(0,a.jsxs)("div",{className:"mb-2 flex items-center gap-1.5 text-[11px] font-semibold text-text-main",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[15px] text-primary",children:"tune"}),"Override ri\xeang khi auto-off được k\xedch hoạt"]}),(0,a.jsxs)("div",{className:"grid gap-2 sm:grid-cols-2",children:[(0,a.jsxs)("label",{className:"space-y-1",children:[(0,a.jsxs)("span",{className:"flex items-center justify-between text-[11px] font-medium text-text-main",children:["temp",(0,a.jsx)("input",{type:"checkbox",checked:u,disabled:!c,onChange:e=>S("temperature",e.target.checked,f.temperature),className:"h-3.5 w-3.5 accent-primary disabled:opacity-50"})]}),(0,a.jsx)("input",{type:"number",min:"0",max:"2",step:"0.05",disabled:!c||!u,value:u?m.temperature:f.temperature,onChange:e=>O({temperature:e.target.value}),className:$})]}),(0,a.jsxs)("label",{className:"space-y-1",children:[(0,a.jsxs)("span",{className:"flex items-center justify-between text-[11px] font-medium text-text-main",children:["top_p",(0,a.jsx)("input",{type:"checkbox",checked:x,disabled:!c,onChange:e=>S("top_p",e.target.checked,f.top_p),className:"h-3.5 w-3.5 accent-primary disabled:opacity-50"})]}),(0,a.jsx)("input",{type:"number",min:"0.01",max:"1",step:"0.01",disabled:!c||!x,value:x?m.top_p:f.top_p,onChange:e=>O({top_p:e.target.value}),className:$})]}),(0,a.jsxs)("label",{className:"space-y-1",children:[(0,a.jsxs)("span",{className:"flex items-center justify-between text-[11px] font-medium text-text-main",children:["presence_penalty",(0,a.jsx)("input",{type:"checkbox",checked:p,disabled:!c,onChange:e=>S("presence_penalty",e.target.checked,f.presence_penalty),className:"h-3.5 w-3.5 accent-primary disabled:opacity-50"})]}),(0,a.jsx)("input",{type:"number",min:"-2",max:"2",step:"0.05",disabled:!c||!p,value:p?m.presence_penalty:f.presence_penalty,onChange:e=>O({presence_penalty:e.target.value}),className:$})]}),(0,a.jsxs)("label",{className:"space-y-1",children:[(0,a.jsxs)("span",{className:"flex items-center justify-between text-[11px] font-medium text-text-main",children:["max_tokens",(0,a.jsx)("input",{type:"checkbox",checked:h,disabled:!c,onChange:e=>S("max_tokens",e.target.checked,f.max_tokens),className:"h-3.5 w-3.5 accent-primary disabled:opacity-50"})]}),(0,a.jsx)("input",{type:"number",min:"1",max:"262144",step:"1",disabled:!c||!h,value:h?m.max_tokens:f.max_tokens,onChange:e=>O({max_tokens:e.target.value}),className:$})]})]})]})]}),hint:"Khi prompt vượt ngưỡng, thinking bị tắt trước; c\xe1c field ri\xeang b\xean tr\xean chỉ inject nếu được tick."}})]})]})]})]})}function ee({isOpen:e,combo:t,comboStrategy:n={},onClose:i,onSave:c,activeProviders:m,providersLoading:p=!1,kindFilter:h=null}){let[b,f]=(0,r.useState)(t?.name||""),[y,v]=(0,r.useState)([]),[k,j]=(0,r.useState)(!1),[N,_]=(0,r.useState)(!1),[w,$]=(0,r.useState)(""),[M,q]=(0,r.useState)({}),[L,E]=(0,r.useState)(""),[A,I]=(0,r.useState)(""),[z,H]=(0,r.useState)(()=>t?T(n?.requestOverrides||{}):T(g)),[J,X]=(0,r.useState)(()=>C(n?.contentLoggingMode)),U=n||{},W=(0,s.FR)((0,s.MS)(s.AN,{activationConstraint:{distance:5}}),(0,s.MS)(s.uN,{coordinateGetter:l.JR}));(0,r.useEffect)(()=>{e&&(f(t?.name||""),v(function(e,t={}){let n=(e?.models||[]).map(e=>F(e,!0)).filter(e=>e.value),a=new Set(n.map(e=>e.value));return[...n,...S(t).filter(e=>!a.has(e)).map(e=>F(e,!1)).filter(e=>e.value)]}(t,U)),$(""),E(""),I(""),H(t?T(U.requestOverrides||{}):T(g)),X(C(U.contentLoggingMode)))},[e,t?.id,t?.name,U.contentLoggingMode]),(0,r.useEffect)(()=>{e&&Z()},[e]);let Z=async()=>{try{let e=await fetch("/api/models/alias",{cache:"no-store"});if(!e.ok)return;let t=await e.json();q(t.aliases||{})}catch(e){console.error("Error fetching modal data:",e)}},et=y.map((e,t)=>({uid:`item-${t}-${e.value}`,row:e})),en=y.map(e=>e.value),ea=y.filter(e=>e.enabled).length,er=y.filter(e=>!e.enabled).length,es=(m||[]).filter(e=>e?.isActive!==!1),el=es.find(e=>e.id===L)||null,ei=el?K(el,M):[],eo=ei[0]?.value||(el?G(el):""),ed=e=>e.trim()?x.test(e)?($(""),!0):($("Chỉ cho ph\xe9p chữ, số, dấu -, _ v\xe0 ."),!1):($("Bắt buộc nhập t\xean"),!1),ec=async()=>{if(!ed(b))return;let{models:e,disabledModels:t}=function(e=[]){let t=[],n=new Set;for(let a of e){let e=O(a?.value||B(a?.target));!e||n.has(e)||(n.add(e),t.push({...a,value:e,enabled:a?.enabled!==!1,target:D(a?.target||a?.value)}))}return{models:t.filter(e=>e.enabled).map(e=>e.target).filter(Boolean),disabledModels:t.filter(e=>!e.enabled).map(e=>e.value)}}(y);_(!0),await c({name:b.trim(),models:e,disabledModels:t,requestOverrides:T(z),contentLoggingMode:J}),_(!1)};if(!e)return null;let em=!!t;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"fixed inset-0 z-[100] flex items-center justify-center bg-black/45 p-3 backdrop-blur-[1px] sm:p-4",children:(0,a.jsxs)("div",{className:"flex max-h-[92vh] w-full max-w-7xl flex-col overflow-hidden rounded-2xl border border-border bg-white shadow-2xl dark:bg-zinc-950",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between border-b border-border px-5 py-4 sm:px-6",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-xl font-semibold text-text-main",children:em?"Chỉnh sửa combo":"Tạo combo"}),(0,a.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Chọn model, tắt tạm thời khi cần v\xe0 sắp xếp thứ tự ưu ti\xean fallback đang bật."})]}),(0,a.jsx)("button",{type:"button",onClick:i,className:"rounded-lg p-1 text-text-muted transition hover:bg-surface hover:text-text-main",children:(0,a.jsx)("span",{className:"material-symbols-outlined",children:"close"})})]}),(0,a.jsxs)("div",{className:"min-h-0 flex-1 space-y-5 overflow-y-auto bg-white px-5 py-4 dark:bg-zinc-950 sm:px-6",children:[(0,a.jsxs)("label",{className:"block",children:[(0,a.jsx)("span",{className:"mb-2 block text-sm font-semibold text-text-main",children:"T\xean"}),(0,a.jsx)("input",{value:b,onChange:e=>{let t=e.target.value;f(t),t?ed(t):$("")},placeholder:"premium-coding",className:`w-full rounded-xl border bg-white px-4 py-2.5 text-text-main outline-none transition focus:border-primary dark:bg-zinc-900 ${w?"border-red-400":"border-border"}`}),(0,a.jsx)("span",{className:`mt-1 block text-xs ${w?"text-red-500":"text-text-muted"}`,children:w||"Chỉ cho ph\xe9p chữ, số, dấu -, _ v\xe0 ."})]}),(0,a.jsx)(Y,{value:z,onChange:H,defaultEnabled:!em}),(0,a.jsx)(V,{value:J,onChange:X}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"mb-3 flex items-center justify-between gap-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:"Danh s\xe1ch model"}),(0,a.jsxs)("p",{className:"mt-1 text-xs text-text-muted",children:[ea," đang bật",er>0?`, ${er} đ\xe3 tắt`:"",". Model đ\xe3 tắt vẫn nằm trong combo nhưng kh\xf4ng được route."]})]}),(0,a.jsxs)("button",{type:"button",onClick:()=>j(!0),className:"inline-flex items-center gap-1 rounded-lg border border-border px-3 py-1.5 text-xs font-medium text-primary hover:border-primary/50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"add"}),"Th\xeam model"]})]}),(0,a.jsxs)("div",{className:"mb-4 rounded-xl border border-primary/15 bg-primary/5 p-3",children:[(0,a.jsxs)("div",{className:"mb-2 flex items-center gap-2 text-xs font-semibold uppercase tracking-wide text-primary",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"account_tree"}),"Th\xeam target theo provider account"]}),(0,a.jsx)("p",{className:"mb-3 text-xs text-text-muted",children:"Cố định bước combo n\xe0y v\xe0o một provider account cụ thể. Danh s\xe1ch account chỉ được load khi mở modal để trang combo nhẹ hơn."}),(0,a.jsxs)("div",{className:"grid gap-2 md:grid-cols-[minmax(0,1.5fr)_minmax(0,1fr)_auto]",children:[(0,a.jsxs)("select",{value:L,onChange:e=>{let t=e.target.value,n=es.find(e=>e.id===t),a=n?K(n,M):[];E(t),I(a[0]?.value||G(n||{})||"")},className:"min-w-0 rounded-lg border border-border bg-background px-3 py-2 text-xs text-text-main outline-none focus:border-primary",children:[(0,a.jsx)("option",{value:"",children:p?"Đang tải provider account...":"Chọn provider account"}),es.map(e=>{let t=P(e),n=R(e),r=n&&n!==t?`${t} / ${n}`:t;return(0,a.jsx)("option",{value:e.id,children:r},e.id)})]}),(0,a.jsxs)("select",{value:A,onChange:e=>I(e.target.value),disabled:!L||0===ei.length,className:"min-w-0 rounded-lg border border-border bg-background px-3 py-2 font-mono text-xs text-text-main outline-none focus:border-primary disabled:cursor-not-allowed disabled:opacity-60",children:[(0,a.jsx)("option",{value:"",children:L?ei.length>0?"Chọn model":"Kh\xf4ng t\xecm thấy model của provider":"Chọn account trước"}),ei.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},`${e.value}-${e.label}`))]}),(0,a.jsxs)("button",{type:"button",onClick:()=>{if(!el)return;let e=function(e,t){let n=P(e),a=function(e={}){let t=O(e.provider),n=P(e);return(0,u.mq)(t)||(0,u.gb)(t)?n||t:t||n}(e),r=R(e),s=O(t||G(e));if(!n||!e?.id||!s)return null;let l=s.includes("/"),i=l?s:`${n}/${s}`,o=l&&s.startsWith(`${n}/`)?s.slice(n.length+1):s,d=r&&r!==a?`${a}/${r}/${o}`:`${a}/${o}`;return{model:i,connectionId:e.id,provider:a||n,accountName:r||void 0,label:d}}(el,A||eo);if(!e)return void alert("H\xe3y chọn provider account v\xe0 model cho target cố định n\xe0y.");let t=F(e,!0);v(e=>{let n=e.findIndex(e=>e.value===t.value);if(-1!==n){let a=[...e];return a[n]={...a[n],...t,enabled:!0},a}return[...e,t]}),I("")},disabled:!L||!A,className:"inline-flex items-center justify-center gap-1 rounded-lg bg-primary px-3 py-2 text-xs font-semibold text-white disabled:opacity-50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"add_link"}),"Th\xeam account"]})]})]}),0===y.length?(0,a.jsxs)("div",{className:"rounded-xl border border-dashed border-border p-8 text-center text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined",children:"layers"}),(0,a.jsx)("p",{className:"mt-2 text-sm",children:"Chưa th\xeam model n\xe0o"})]}):(0,a.jsx)(s.Mp,{sensors:W,collisionDetection:s.fp,modifiers:[o.FN,o.gj],onDragEnd:e=>{let{active:t,over:n}=e;if(n&&t.id!==n.id){let e=et.findIndex(e=>e.uid===t.id),a=et.findIndex(e=>e.uid===n.id);-1!==e&&-1!==a&&v(t=>(0,l.be)(t,e,a))}},children:(0,a.jsx)(l.gB,{items:et.map(e=>e.uid),strategy:l._G,children:(0,a.jsx)("div",{className:"space-y-3",children:et.map(({uid:e,row:t},n)=>(0,a.jsx)(Q,{id:e,index:n,model:t.label||t.value,subtitle:t.subtitle,enabled:t.enabled,isFirst:0===n,isLast:n===y.length-1,onEdit:e=>{let t=e.trim();if(!t)return;let a=[...y],r=a[n];if(r?.target&&"object"==typeof r.target){let e=D({...r.target,model:t});a[n]=F(e,!1!==r.enabled)}else a[n]=F(t,r?.enabled!==!1);v(a)},onMoveUp:()=>{if(0===n)return;let e=[...y];[e[n-1],e[n]]=[e[n],e[n-1]],v(e)},onMoveDown:()=>{if(n===y.length-1)return;let e=[...y];[e[n],e[n+1]]=[e[n+1],e[n]],v(e)},onToggleEnabled:()=>{let e=[...y];e[n]={...e[n],enabled:!e[n].enabled},v(e)},onRemove:()=>v(y.filter((e,t)=>t!==n))},e))})})})]})]}),(0,a.jsxs)("div",{className:"flex justify-end gap-3 border-t border-border bg-white px-5 py-4 dark:bg-zinc-950 sm:px-6",children:[(0,a.jsx)("button",{type:"button",onClick:i,className:"rounded-xl border border-border px-4 py-2 text-sm font-medium text-text-main hover:bg-surface",children:"Hủy"}),(0,a.jsx)("button",{type:"button",onClick:ec,disabled:N,className:"rounded-xl bg-primary px-4 py-2 text-sm font-medium text-white hover:opacity-90 disabled:opacity-50",children:N?"Đang lưu...":em?"Lưu":"Tạo"})]})]})}),(0,a.jsx)(d.rq,{isOpen:k,onClose:()=>j(!1),onSelect:e=>{let t=e.value;v(e=>{let n=e.findIndex(e=>e.value===t);if(-1!==n){let t=[...e];return t[n]={...t[n],enabled:!0},t}return[...e,F(t,!0)]})},onDeselect:e=>{v(t=>t.filter(t=>t.value!==e.value))},activeProviders:m,modelAliases:M,title:"Th\xeam model v\xe0o combo",kindFilter:h,addedModelValues:en,closeOnSelect:!1})]})}}},e=>{e.O(0,[2574,3862,246,5792,7055,5564,5263,5497,8441,3794,7358],()=>e(e.s=20061)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[712],{44493:(e,t,l)=>{"use strict";l.d(t,{default:()=>o});var s=l(95155),n=l(12115),r=l(35497),a=l(90620);let c={LOG:"text-green-400",INFO:"text-blue-400",WARN:"text-yellow-400",ERROR:"text-red-400",DEBUG:"text-purple-400"};function o(){let[e,t]=(0,n.useState)([]),[l,o]=(0,n.useState)(!1),i=(0,n.useRef)(null),u=async()=>{try{await fetch("/api/translator/console-logs",{method:"DELETE"})}catch(e){console.error("Failed to clear console logs:",e)}};return(0,n.useEffect)(()=>{let e=new EventSource("/api/translator/console-logs/stream");return e.onopen=()=>o(!0),e.onmessage=e=>{let l=JSON.parse(e.data);"init"===l.type?t(l.logs.slice(-a.UY.maxLines)):"line"===l.type?t(e=>{let t=[...e,l.line];return t.length>a.UY.maxLines?t.slice(-a.UY.maxLines):t}):"clear"===l.type&&t([])},e.onerror=()=>o(!1),()=>e.close()},[]),(0,n.useEffect)(()=>{i.current&&(i.current.scrollTop=i.current.scrollHeight)},[e]),(0,s.jsx)("div",{className:"",children:(0,s.jsxs)(r.Zp,{children:[(0,s.jsx)("div",{className:"flex items-center justify-end px-4 pt-3 pb-2",children:(0,s.jsx)(r.$n,{size:"sm",variant:"outline",icon:"delete",onClick:u,children:"Clear"})}),(0,s.jsx)("div",{ref:i,className:"bg-black rounded-b-lg p-4 text-xs font-mono h-[calc(100vh-220px)] overflow-y-auto",children:0===e.length?(0,s.jsx)("span",{className:"text-text-muted",children:"No console logs yet."}):(0,s.jsx)("div",{className:"space-y-0.5",children:e.map((e,t)=>{let l,n;return(0,s.jsx)("div",{children:(n=c[(l=e.match(/\[(\w+)\]/g))?l[1]?.replace(/\[|\]/g,""):null]||"text-green-400",(0,s.jsx)("span",{className:n,children:e}))},t)})})})]})})}},68678:(e,t,l)=>{Promise.resolve().then(l.bind(l,44493))}},e=>{e.O(0,[2574,3862,246,2714,5564,5263,5497,8441,3794,7358],()=>e(e.s=68678)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[712],{44493:(e,t,l)=>{"use strict";l.d(t,{default:()=>o});var s=l(95155),n=l(12115),r=l(35497),a=l(90620);let c={LOG:"text-green-400",INFO:"text-blue-400",WARN:"text-yellow-400",ERROR:"text-red-400",DEBUG:"text-purple-400"};function o(){let[e,t]=(0,n.useState)([]),[l,o]=(0,n.useState)(!1),i=(0,n.useRef)(null),u=async()=>{try{await fetch("/api/translator/console-logs",{method:"DELETE"})}catch(e){console.error("Failed to clear console logs:",e)}};return(0,n.useEffect)(()=>{let e=new EventSource("/api/translator/console-logs/stream");return e.onopen=()=>o(!0),e.onmessage=e=>{let l=JSON.parse(e.data);"init"===l.type?t(l.logs.slice(-a.UY.maxLines)):"line"===l.type?t(e=>{let t=[...e,l.line];return t.length>a.UY.maxLines?t.slice(-a.UY.maxLines):t}):"clear"===l.type&&t([])},e.onerror=()=>o(!1),()=>e.close()},[]),(0,n.useEffect)(()=>{i.current&&(i.current.scrollTop=i.current.scrollHeight)},[e]),(0,s.jsx)("div",{className:"",children:(0,s.jsxs)(r.Zp,{children:[(0,s.jsx)("div",{className:"flex items-center justify-end px-4 pt-3 pb-2",children:(0,s.jsx)(r.$n,{size:"sm",variant:"outline",icon:"delete",onClick:u,children:"Clear"})}),(0,s.jsx)("div",{ref:i,className:"bg-black rounded-b-lg p-4 text-xs font-mono h-[calc(100vh-220px)] overflow-y-auto",children:0===e.length?(0,s.jsx)("span",{className:"text-text-muted",children:"No console logs yet."}):(0,s.jsx)("div",{className:"space-y-0.5",children:e.map((e,t)=>{let l,n;return(0,s.jsx)("div",{children:(n=c[(l=e.match(/\[(\w+)\]/g))?l[1]?.replace(/\[|\]/g,""):null]||"text-green-400",(0,s.jsx)("span",{className:n,children:e}))},t)})})})]})})}},68678:(e,t,l)=>{Promise.resolve().then(l.bind(l,44493))}},e=>{e.O(0,[2574,3862,246,5792,5564,5263,5497,8441,3794,7358],()=>e(e.s=68678)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6099,6337],{18032:(e,t,s)=>{Promise.resolve().then(s.bind(s,95907))},95907:(e,t,s)=>{"use strict";s.d(t,{default:()=>m});var a=s(95155),l=s(12115),n=s(14051),i=s.n(n),r=s(35497),d=s(11059);let o=[{id:"lite",label:"Lite",desc:"N\xe9n nhẹ, vẫn giữ ngữ ph\xe1p dễ đọc."},{id:"full",label:"Full",desc:"N\xe9n c\xe2n bằng, giảm token r\xf5 hơn."},{id:"ultra",label:"Ultra",desc:"N\xe9n tối đa, c\xe2u cực ngắn."}];function c({label:e,value:t,copiedKey:s,copied:l,copy:n}){return(0,a.jsxs)("div",{className:"rounded-xl border border-border bg-background p-3",children:[(0,a.jsx)("div",{className:"mb-1 text-xs font-semibold uppercase tracking-wide text-text-muted",children:e}),(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,a.jsx)("code",{className:"min-w-0 flex-1 truncate rounded-lg bg-surface px-3 py-2 font-mono text-xs text-text-main",children:t}),(0,a.jsx)("button",{type:"button",onClick:()=>n(t,s),className:"rounded-lg border border-border px-2 py-2 text-text-muted transition hover:border-primary hover:text-primary",title:"Copy",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:l===s?"check":"content_copy"})})]})]})}function m({machineId:e}){let[t,s]=(0,l.useState)(!0),[n,i]=(0,l.useState)(""),[x,p]=(0,l.useState)(""),[h,u]=(0,l.useState)({hasPassword:!0,rtkEnabled:!0,cavemanEnabled:!1,cavemanLevel:"full",apiKeyDefaultModel:""}),{copied:b,copy:v}=(0,d.C)(),y=(0,l.useMemo)(()=>(function(e=""){let t=e?`${e.replace(/\/$/,"")}/v1`:"/v1";return{base:t,chat:`${t}/chat/completions`,models:`${t}/models`,health:e?`${e.replace(/\/$/,"")}/api/health`:"/api/health"}})(x),[x]);(0,l.useEffect)(()=>{p(window.location.origin),j()},[]);let j=async()=>{s(!0);try{let e=await fetch("/api/dashboard/endpoint",{cache:"no-store"}),t=await e.json();e.ok&&u(e=>({...e,...t}))}catch(e){console.log("Error loading endpoint settings:",e)}finally{s(!1)}},g=async(e,t="")=>{i(t);try{let t=await fetch("/api/dashboard/endpoint",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),s=await t.json();t.ok?u(e=>({...e,...s})):alert(s.error||"Cập nhật thiết lập thất bại")}catch(e){console.log("Error updating endpoint settings:",e),alert("Cập nhật thiết lập thất bại")}finally{i("")}};return t?(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsx)(r.Qv,{}),(0,a.jsx)(r.Qv,{})]}):(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-2xl font-bold text-text-main",children:"Endpoint"}),(0,a.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Endpoint nội bộ để tool gọi BlueRouter theo chuẩn OpenAI-compatible. Cloudflare Tunnel v\xe0 Tailscale đ\xe3 được bỏ khỏi trang n\xe0y để dashboard load nhẹ hơn."})]}),(0,a.jsxs)(r.$n,{onClick:j,variant:"ghost",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"refresh"}),"L\xe0m mới"]})]}),(0,a.jsxs)(r.Zp,{children:[(0,a.jsxs)("div",{className:"mb-4 flex items-start gap-3",children:[(0,a.jsx)("div",{className:"rounded-2xl bg-primary/10 p-3 text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined",children:"hub"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-xl font-semibold text-text-main",children:"Th\xf4ng tin API endpoint"}),(0,a.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"D\xf9ng c\xe1c URL dưới đ\xe2y cho LibreChat, VSCode, Copilot proxy, Antigravity hoặc tool OpenAI-compatible kh\xe1c."})]})]}),(0,a.jsxs)("div",{className:"grid gap-3 md:grid-cols-2",children:[(0,a.jsx)(c,{label:"Base URL",value:y.base,copiedKey:"base",copied:b,copy:v}),(0,a.jsx)(c,{label:"Chat Completions",value:y.chat,copiedKey:"chat",copied:b,copy:v}),(0,a.jsx)(c,{label:"Models",value:y.models,copiedKey:"models",copied:b,copy:v}),(0,a.jsx)(c,{label:"Health",value:y.health,copiedKey:"health",copied:b,copy:v})]}),(0,a.jsxs)("p",{className:"mt-4 text-xs text-text-muted",children:["Machine ID: ",(0,a.jsx)("code",{className:"rounded bg-surface px-1.5 py-0.5",children:e||"unknown"})]})]}),(0,a.jsxs)(r.Zp,{children:[(0,a.jsxs)("div",{className:"mb-4 flex items-start gap-3",children:[(0,a.jsx)("div",{className:"rounded-2xl bg-primary/10 p-3 text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined",children:"bolt"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-xl font-semibold text-text-main",children:"Token Saver"}),(0,a.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Giảm token cho output từ tool v\xe0 phản hồi model. Bật/tắt tại đ\xe2y kh\xf4ng cần load API keys, provider hay tunnel status."})]})]}),(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3 rounded-xl border border-border p-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"font-semibold text-text-main",children:"RTK tool output compression"}),(0,a.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"N\xe9n output của git/grep/ls/tree/logs trước khi gửi v\xe0o model."})]}),(0,a.jsx)(r.lM,{checked:!1!==h.rtkEnabled,onChange:e=>g({rtkEnabled:e},"rtkEnabled"),disabled:"rtkEnabled"===n})]}),(0,a.jsxs)("div",{className:"rounded-xl border border-border p-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"font-semibold text-text-main",children:"Caveman output compression"}),(0,a.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Th\xeam style prompt để model trả lời ngắn hơn, giảm output token."})]}),(0,a.jsx)(r.lM,{checked:!!h.cavemanEnabled,onChange:e=>g({cavemanEnabled:e},"cavemanEnabled"),disabled:"cavemanEnabled"===n})]}),h.cavemanEnabled&&(0,a.jsx)("div",{className:"mt-3 flex flex-wrap gap-2",children:o.map(e=>(0,a.jsx)("button",{type:"button",onClick:()=>g({cavemanLevel:e.id},"cavemanLevel"),title:e.desc,className:`rounded-lg border px-3 py-1.5 text-xs font-medium transition ${h.cavemanLevel===e.id?"border-primary bg-primary text-white":"border-border text-text-muted hover:border-primary hover:text-primary"}`,children:e.label},e.id))})]})]})]})]})}c.propTypes={label:i().string.isRequired,value:i().string.isRequired,copiedKey:i().string.isRequired,copied:i().string,copy:i().func.isRequired},m.propTypes={machineId:i().string}}},e=>{e.O(0,[2574,3862,246,2714,5564,5263,5497,8441,3794,7358],()=>e(e.s=18032)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6099,6337],{18032:(e,t,s)=>{Promise.resolve().then(s.bind(s,95907))},95907:(e,t,s)=>{"use strict";s.d(t,{default:()=>m});var a=s(95155),l=s(12115),n=s(14051),i=s.n(n),r=s(35497),d=s(11059);let o=[{id:"lite",label:"Lite",desc:"N\xe9n nhẹ, vẫn giữ ngữ ph\xe1p dễ đọc."},{id:"full",label:"Full",desc:"N\xe9n c\xe2n bằng, giảm token r\xf5 hơn."},{id:"ultra",label:"Ultra",desc:"N\xe9n tối đa, c\xe2u cực ngắn."}];function c({label:e,value:t,copiedKey:s,copied:l,copy:n}){return(0,a.jsxs)("div",{className:"rounded-xl border border-border bg-background p-3",children:[(0,a.jsx)("div",{className:"mb-1 text-xs font-semibold uppercase tracking-wide text-text-muted",children:e}),(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,a.jsx)("code",{className:"min-w-0 flex-1 truncate rounded-lg bg-surface px-3 py-2 font-mono text-xs text-text-main",children:t}),(0,a.jsx)("button",{type:"button",onClick:()=>n(t,s),className:"rounded-lg border border-border px-2 py-2 text-text-muted transition hover:border-primary hover:text-primary",title:"Copy",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:l===s?"check":"content_copy"})})]})]})}function m({machineId:e}){let[t,s]=(0,l.useState)(!0),[n,i]=(0,l.useState)(""),[x,p]=(0,l.useState)(""),[h,u]=(0,l.useState)({hasPassword:!0,rtkEnabled:!0,cavemanEnabled:!1,cavemanLevel:"full",apiKeyDefaultModel:""}),{copied:b,copy:v}=(0,d.C)(),y=(0,l.useMemo)(()=>(function(e=""){let t=e?`${e.replace(/\/$/,"")}/v1`:"/v1";return{base:t,chat:`${t}/chat/completions`,models:`${t}/models`,health:e?`${e.replace(/\/$/,"")}/api/health`:"/api/health"}})(x),[x]);(0,l.useEffect)(()=>{p(window.location.origin),j()},[]);let j=async()=>{s(!0);try{let e=await fetch("/api/dashboard/endpoint",{cache:"no-store"}),t=await e.json();e.ok&&u(e=>({...e,...t}))}catch(e){console.log("Error loading endpoint settings:",e)}finally{s(!1)}},g=async(e,t="")=>{i(t);try{let t=await fetch("/api/dashboard/endpoint",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),s=await t.json();t.ok?u(e=>({...e,...s})):alert(s.error||"Cập nhật thiết lập thất bại")}catch(e){console.log("Error updating endpoint settings:",e),alert("Cập nhật thiết lập thất bại")}finally{i("")}};return t?(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsx)(r.Qv,{}),(0,a.jsx)(r.Qv,{})]}):(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-2xl font-bold text-text-main",children:"Endpoint"}),(0,a.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Endpoint nội bộ để tool gọi BlueRouter theo chuẩn OpenAI-compatible. Cloudflare Tunnel v\xe0 Tailscale đ\xe3 được bỏ khỏi trang n\xe0y để dashboard load nhẹ hơn."})]}),(0,a.jsxs)(r.$n,{onClick:j,variant:"ghost",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"refresh"}),"L\xe0m mới"]})]}),(0,a.jsxs)(r.Zp,{children:[(0,a.jsxs)("div",{className:"mb-4 flex items-start gap-3",children:[(0,a.jsx)("div",{className:"rounded-2xl bg-primary/10 p-3 text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined",children:"hub"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-xl font-semibold text-text-main",children:"Th\xf4ng tin API endpoint"}),(0,a.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"D\xf9ng c\xe1c URL dưới đ\xe2y cho LibreChat, VSCode, Copilot proxy, Antigravity hoặc tool OpenAI-compatible kh\xe1c."})]})]}),(0,a.jsxs)("div",{className:"grid gap-3 md:grid-cols-2",children:[(0,a.jsx)(c,{label:"Base URL",value:y.base,copiedKey:"base",copied:b,copy:v}),(0,a.jsx)(c,{label:"Chat Completions",value:y.chat,copiedKey:"chat",copied:b,copy:v}),(0,a.jsx)(c,{label:"Models",value:y.models,copiedKey:"models",copied:b,copy:v}),(0,a.jsx)(c,{label:"Health",value:y.health,copiedKey:"health",copied:b,copy:v})]}),(0,a.jsxs)("p",{className:"mt-4 text-xs text-text-muted",children:["Machine ID: ",(0,a.jsx)("code",{className:"rounded bg-surface px-1.5 py-0.5",children:e||"unknown"})]})]}),(0,a.jsxs)(r.Zp,{children:[(0,a.jsxs)("div",{className:"mb-4 flex items-start gap-3",children:[(0,a.jsx)("div",{className:"rounded-2xl bg-primary/10 p-3 text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined",children:"bolt"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-xl font-semibold text-text-main",children:"Token Saver"}),(0,a.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Giảm token cho output từ tool v\xe0 phản hồi model. Bật/tắt tại đ\xe2y kh\xf4ng cần load API keys, provider hay tunnel status."})]})]}),(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3 rounded-xl border border-border p-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"font-semibold text-text-main",children:"RTK tool output compression"}),(0,a.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"N\xe9n output của git/grep/ls/tree/logs trước khi gửi v\xe0o model."})]}),(0,a.jsx)(r.lM,{checked:!1!==h.rtkEnabled,onChange:e=>g({rtkEnabled:e},"rtkEnabled"),disabled:"rtkEnabled"===n})]}),(0,a.jsxs)("div",{className:"rounded-xl border border-border p-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"font-semibold text-text-main",children:"Caveman output compression"}),(0,a.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Th\xeam style prompt để model trả lời ngắn hơn, giảm output token."})]}),(0,a.jsx)(r.lM,{checked:!!h.cavemanEnabled,onChange:e=>g({cavemanEnabled:e},"cavemanEnabled"),disabled:"cavemanEnabled"===n})]}),h.cavemanEnabled&&(0,a.jsx)("div",{className:"mt-3 flex flex-wrap gap-2",children:o.map(e=>(0,a.jsx)("button",{type:"button",onClick:()=>g({cavemanLevel:e.id},"cavemanLevel"),title:e.desc,className:`rounded-lg border px-3 py-1.5 text-xs font-medium transition ${h.cavemanLevel===e.id?"border-primary bg-primary text-white":"border-border text-text-muted hover:border-primary hover:text-primary"}`,children:e.label},e.id))})]})]})]})]})}c.propTypes={label:i().string.isRequired,value:i().string.isRequired,copiedKey:i().string.isRequired,copied:i().string,copy:i().func.isRequired},m.propTypes={machineId:i().string}}},e=>{e.O(0,[2574,3862,246,5792,5564,5263,5497,8441,3794,7358],()=>e(e.s=18032)),_N_E=e.O()}]);
@@ -56,4 +56,4 @@
56
56
  -F "temperature=${k}"`:""}${h.includes("prompt")&&v?` \\
57
57
  -F "prompt=${v}"`:""}`,Q=async()=>{if(!b||!G)return;D(!0),q(""),K(null);let e=Date.now();try{let t=new FormData;t.append("file",b),t.append("model",G),h.includes("language")&&g&&t.append("language",g),h.includes("response_format")&&t.append("response_format",w),h.includes("temperature")&&k&&t.append("temperature",k),h.includes("prompt")&&v&&t.append("prompt",v);let s={};$&&(s.Authorization=`Bearer ${$}`);let a=await fetch("/api/v1/audio/transcriptions",{method:"POST",headers:s,body:t});B(Date.now()-e);let r=(a.headers.get("content-type")||"").includes("application/json")?await a.json():await a.text();if(!a.ok)return void q(r?.error?.message||r?.error||r||`HTTP ${a.status}`);K(r)}catch(e){q(e.message||"Network error")}finally{D(!1)}},Z="string"==typeof M?M:M?JSON.stringify(M,null,2):`{
58
58
  "text": "Hello world..."
59
- }`;return(0,a.jsxs)(i.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Example"}),(0,a.jsxs)("div",{className:"flex flex-col gap-2.5",children:[l.length>0?(0,a.jsx)(S,{label:"Model",children:(0,a.jsx)("select",{value:d,onChange:e=>u(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:l.map(e=>(0,a.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}):(0,a.jsx)(S,{label:"Model",children:(0,a.jsx)("input",{value:d,onChange:e=>u(e.target.value),placeholder:"Enter model id",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"})}),(0,a.jsx)(S,{label:"Endpoint",children:(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsxs)("span",{className:"w-full min-w-0 flex-1 px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate",children:[W,"/v1/audio/transcriptions"]}),E&&(0,a.jsxs)("button",{onClick:()=>A(e=>!e),title:P?"Using tunnel":"Using local",className:`flex items-center gap-1 text-xs px-2 py-1.5 rounded-lg border shrink-0 transition-colors ${P?"border-primary/40 bg-primary/10 text-primary":"border-border text-text-muted hover:text-primary"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"wifi_tethering"}),"Tunnel"]})]})}),(0,a.jsx)(S,{label:"API Key",children:(0,a.jsx)("span",{className:"px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate block",children:$?`${$.slice(0,8)}${"•".repeat(Math.min(20,$.length-8))}`:(0,a.jsx)("span",{className:"text-text-muted italic",children:"No key configured"})})}),(0,a.jsx)(S,{label:"Audio File",children:(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("input",{type:"file",accept:"audio/*,video/mp4,.m4a,.mp3,.wav,.ogg,.flac,.webm,.opus",onChange:e=>f(e.target.files?.[0]||null),className:"w-full text-xs text-text-muted file:mr-2 file:py-1 file:px-2.5 file:rounded-lg file:border file:border-border file:bg-background file:text-text-main hover:file:bg-sidebar file:cursor-pointer"}),b&&(0,a.jsxs)("span",{className:"text-xs text-text-muted font-mono",children:[b.name," \xb7 ",(b.size/1024).toFixed(1)," KB"]})]})}),h.includes("language")&&(0,a.jsx)(S,{label:"Language",children:(0,a.jsx)("input",{value:g,onChange:e=>y(e.target.value),placeholder:"e.g. en, vi, ja (auto-detect if empty)",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"})}),h.includes("prompt")&&(0,a.jsx)(S,{label:"Prompt",children:(0,a.jsx)("input",{value:v,onChange:e=>j(e.target.value),placeholder:"optional context to improve accuracy",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})}),h.includes("temperature")&&(0,a.jsx)(S,{label:"Temperature",children:(0,a.jsx)("input",{type:"number",step:"0.1",min:"0",max:"1",value:k,onChange:e=>C(e.target.value),placeholder:"0 - 1 (default 0)",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})}),h.includes("response_format")&&(0,a.jsx)(S,{label:"Response Format",children:(0,a.jsxs)("select",{value:w,onChange:e=>N(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:[(0,a.jsx)("option",{value:"json",children:"json"}),(0,a.jsx)("option",{value:"text",children:"text"}),(0,a.jsx)("option",{value:"srt",children:"srt"}),(0,a.jsx)("option",{value:"verbose_json",children:"verbose_json"}),(0,a.jsx)("option",{value:"vtt",children:"vtt"})]})}),(0,a.jsxs)("div",{className:"mt-1",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Request"}),(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsxs)("button",{onClick:()=>z(Y),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:J?"check":"content_copy"}),J?"Copied":"Copy"]}),(0,a.jsxs)("button",{onClick:Q,disabled:U||!b||!G,className:"flex w-full sm:w-auto items-center justify-center gap-1.5 px-3 py-1 rounded-lg bg-primary text-white text-xs font-medium hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:U?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),U?"Transcribing...":"Run"]})]})]}),(0,a.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all",children:Y})]}),F&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:F}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,a.jsxs)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:["Response ",M&&L&&(0,a.jsxs)("span",{className:"font-normal normal-case",children:["⚡ ",L,"ms"]})]}),M&&(0,a.jsxs)("button",{onClick:()=>H(Z),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:V?"check":"content_copy"}),V?"Copied":"Copy"]})]}),(0,a.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all opacity-70",children:Z})]})]})]})}function O(){let{kind:e,id:t}=(0,r.useParams)(),s=(0,r.useRouter)(),o=c.rj.find(t=>t.id===e),m=(0,c.gC)(t)&&"embedding"===e,p=async()=>{if(confirm("Delete this Custom Embedding node?"))try{(await fetch(`/api/provider-nodes/${t}`,{method:"DELETE"})).ok&&s.push(`/dashboard/media-providers/${e}`)}catch(e){console.log("Error deleting custom embedding node:",e)}},[u,x]=(0,n.useState)(null),[h,b]=(0,n.useState)(m),[f,y]=(0,n.useState)(!1);if((0,n.useEffect)(()=>{if(!m)return;let e=!1;return fetch("/api/provider-nodes",{cache:"no-store"}).then(e=>e.json()).then(s=>{e||(x((s.nodes||[]).find(e=>e.id===t)||null),b(!1))}).catch(()=>{e||b(!1)}),()=>{e=!0}},[t,m]),!o)return(0,r.notFound)();let v=c.Q2[t],w=m?u?{id:t,name:u.name||"Custom Embedding",color:"#6366F1",textIcon:"CE"}:null:v;if(!m&&!v||m&&!h&&!u)return(0,r.notFound)();if(m&&h)return(0,a.jsx)("div",{className:"text-text-muted text-sm py-12 text-center",children:"Loading..."});let N=m?["embedding"]:w.serviceKinds??["llm"];return m||N.includes(e)?(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)(l(),{href:`/dashboard/media-providers/${e}`,className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),o.label]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:[(0,a.jsx)("div",{className:"size-12 rounded-lg flex items-center justify-center shrink-0",style:{backgroundColor:`${w.color}15`},children:(0,a.jsx)(d.A,{src:`/providers/${w.id}.png`,alt:w.name,size:48,className:"object-contain rounded-lg max-w-[48px] max-h-[48px]",fallbackText:w.textIcon||w.id.slice(0,2).toUpperCase(),fallbackColor:w.color})}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2 sm:gap-3",children:[(0,a.jsx)("h1",{className:"text-3xl font-semibold tracking-tight",children:w.name}),!m&&w.notice?.apiKeyUrl&&(0,a.jsxs)("a",{href:w.notice.apiKeyUrl,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),"Get API Key"]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5 mt-1 flex-wrap",children:[m&&(0,a.jsxs)(i.Ex,{variant:"default",size:"sm",children:["Custom \xb7 ",u?.prefix]}),N.map(t=>(0,a.jsx)(i.Ex,{variant:t===e?"primary":"default",size:"sm",children:t.toUpperCase()},t))]})]}),m&&(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsx)(i.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>y(!0),children:"Edit"}),(0,a.jsx)(i.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:p,children:"Delete"})]})]})]}),!m&&w.kindNotice?.[e]&&(0,a.jsxs)("div",{className:"flex items-start gap-3 px-4 py-3 rounded-lg bg-amber-500/10 border border-amber-500/30 text-amber-700 dark:text-amber-400",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px] mt-0.5",children:"warning"}),(0,a.jsx)("p",{className:"text-sm",children:w.kindNotice[e]})]}),!m&&w.notice?.text&&!w.deprecated&&(0,a.jsxs)("div",{className:"flex flex-col gap-2 rounded-lg border border-blue-500/30 bg-blue-500/10 px-3 py-2 sm:flex-row sm:items-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-blue-500 shrink-0",children:"info"}),(0,a.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:w.notice.text}),w.notice.apiKeyUrl&&(0,a.jsx)("a",{href:w.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 →"})]}),!m&&w.noAuth?(0,a.jsx)(i.gw,{providerId:t}):(0,a.jsx)(g,{providerId:t,isOAuth:!1}),"tts"!==e&&"webSearch"!==e&&"webFetch"!==e&&(0,a.jsx)(j,{providerId:t,kindFilter:e,providerAliasOverride:m?u?.prefix:void 0}),!m&&(w.searchConfig||w.fetchConfig||w.ttsConfig||w.sttConfig||w.embeddingConfig||w.searchViaChat)&&(0,a.jsx)(i.Wx,{config:"webFetch"===e?w.fetchConfig:"tts"===e?w.ttsConfig:"stt"===e?w.sttConfig:"embedding"===e?w.embeddingConfig:w.searchConfig||{mode:"chat-completions",defaultModel:w.searchViaChat?.defaultModel,pricingUrl:w.searchViaChat?.pricingUrl,freeTier:w.searchViaChat?.freeTier},provider:w,title:`${o.label} Config`}),"embedding"===e&&(0,a.jsx)(T,{providerId:t,customAlias:u?.prefix}),"tts"===e&&(0,a.jsx)(I,{providerId:t}),"stt"===e&&!m&&(0,a.jsx)(R,{providerId:t}),!m&&A[e]&&(0,a.jsx)(E,{providerId:t,kind:e}),m&&(0,a.jsx)(i.x0,{isOpen:f,node:u,onClose:()=>y(!1),onSaved:e=>{x(e),y(!1)}})]}):(0,r.notFound)()}},95364:(e,t,s)=>{Promise.resolve().then(s.bind(s,94588))}},e=>{e.O(0,[2574,3862,246,2714,5564,5263,5497,8441,3794,7358],()=>e(e.s=95364)),_N_E=e.O()}]);
59
+ }`;return(0,a.jsxs)(i.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Example"}),(0,a.jsxs)("div",{className:"flex flex-col gap-2.5",children:[l.length>0?(0,a.jsx)(S,{label:"Model",children:(0,a.jsx)("select",{value:d,onChange:e=>u(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:l.map(e=>(0,a.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}):(0,a.jsx)(S,{label:"Model",children:(0,a.jsx)("input",{value:d,onChange:e=>u(e.target.value),placeholder:"Enter model id",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"})}),(0,a.jsx)(S,{label:"Endpoint",children:(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsxs)("span",{className:"w-full min-w-0 flex-1 px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate",children:[W,"/v1/audio/transcriptions"]}),E&&(0,a.jsxs)("button",{onClick:()=>A(e=>!e),title:P?"Using tunnel":"Using local",className:`flex items-center gap-1 text-xs px-2 py-1.5 rounded-lg border shrink-0 transition-colors ${P?"border-primary/40 bg-primary/10 text-primary":"border-border text-text-muted hover:text-primary"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"wifi_tethering"}),"Tunnel"]})]})}),(0,a.jsx)(S,{label:"API Key",children:(0,a.jsx)("span",{className:"px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate block",children:$?`${$.slice(0,8)}${"•".repeat(Math.min(20,$.length-8))}`:(0,a.jsx)("span",{className:"text-text-muted italic",children:"No key configured"})})}),(0,a.jsx)(S,{label:"Audio File",children:(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("input",{type:"file",accept:"audio/*,video/mp4,.m4a,.mp3,.wav,.ogg,.flac,.webm,.opus",onChange:e=>f(e.target.files?.[0]||null),className:"w-full text-xs text-text-muted file:mr-2 file:py-1 file:px-2.5 file:rounded-lg file:border file:border-border file:bg-background file:text-text-main hover:file:bg-sidebar file:cursor-pointer"}),b&&(0,a.jsxs)("span",{className:"text-xs text-text-muted font-mono",children:[b.name," \xb7 ",(b.size/1024).toFixed(1)," KB"]})]})}),h.includes("language")&&(0,a.jsx)(S,{label:"Language",children:(0,a.jsx)("input",{value:g,onChange:e=>y(e.target.value),placeholder:"e.g. en, vi, ja (auto-detect if empty)",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"})}),h.includes("prompt")&&(0,a.jsx)(S,{label:"Prompt",children:(0,a.jsx)("input",{value:v,onChange:e=>j(e.target.value),placeholder:"optional context to improve accuracy",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})}),h.includes("temperature")&&(0,a.jsx)(S,{label:"Temperature",children:(0,a.jsx)("input",{type:"number",step:"0.1",min:"0",max:"1",value:k,onChange:e=>C(e.target.value),placeholder:"0 - 1 (default 0)",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})}),h.includes("response_format")&&(0,a.jsx)(S,{label:"Response Format",children:(0,a.jsxs)("select",{value:w,onChange:e=>N(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:[(0,a.jsx)("option",{value:"json",children:"json"}),(0,a.jsx)("option",{value:"text",children:"text"}),(0,a.jsx)("option",{value:"srt",children:"srt"}),(0,a.jsx)("option",{value:"verbose_json",children:"verbose_json"}),(0,a.jsx)("option",{value:"vtt",children:"vtt"})]})}),(0,a.jsxs)("div",{className:"mt-1",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Request"}),(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsxs)("button",{onClick:()=>z(Y),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:J?"check":"content_copy"}),J?"Copied":"Copy"]}),(0,a.jsxs)("button",{onClick:Q,disabled:U||!b||!G,className:"flex w-full sm:w-auto items-center justify-center gap-1.5 px-3 py-1 rounded-lg bg-primary text-white text-xs font-medium hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:U?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),U?"Transcribing...":"Run"]})]})]}),(0,a.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all",children:Y})]}),F&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:F}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,a.jsxs)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:["Response ",M&&L&&(0,a.jsxs)("span",{className:"font-normal normal-case",children:["⚡ ",L,"ms"]})]}),M&&(0,a.jsxs)("button",{onClick:()=>H(Z),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:V?"check":"content_copy"}),V?"Copied":"Copy"]})]}),(0,a.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all opacity-70",children:Z})]})]})]})}function O(){let{kind:e,id:t}=(0,r.useParams)(),s=(0,r.useRouter)(),o=c.rj.find(t=>t.id===e),m=(0,c.gC)(t)&&"embedding"===e,p=async()=>{if(confirm("Delete this Custom Embedding node?"))try{(await fetch(`/api/provider-nodes/${t}`,{method:"DELETE"})).ok&&s.push(`/dashboard/media-providers/${e}`)}catch(e){console.log("Error deleting custom embedding node:",e)}},[u,x]=(0,n.useState)(null),[h,b]=(0,n.useState)(m),[f,y]=(0,n.useState)(!1);if((0,n.useEffect)(()=>{if(!m)return;let e=!1;return fetch("/api/provider-nodes",{cache:"no-store"}).then(e=>e.json()).then(s=>{e||(x((s.nodes||[]).find(e=>e.id===t)||null),b(!1))}).catch(()=>{e||b(!1)}),()=>{e=!0}},[t,m]),!o)return(0,r.notFound)();let v=c.Q2[t],w=m?u?{id:t,name:u.name||"Custom Embedding",color:"#6366F1",textIcon:"CE"}:null:v;if(!m&&!v||m&&!h&&!u)return(0,r.notFound)();if(m&&h)return(0,a.jsx)("div",{className:"text-text-muted text-sm py-12 text-center",children:"Loading..."});let N=m?["embedding"]:w.serviceKinds??["llm"];return m||N.includes(e)?(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)(l(),{href:`/dashboard/media-providers/${e}`,className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),o.label]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:[(0,a.jsx)("div",{className:"size-12 rounded-lg flex items-center justify-center shrink-0",style:{backgroundColor:`${w.color}15`},children:(0,a.jsx)(d.A,{src:`/providers/${w.id}.png`,alt:w.name,size:48,className:"object-contain rounded-lg max-w-[48px] max-h-[48px]",fallbackText:w.textIcon||w.id.slice(0,2).toUpperCase(),fallbackColor:w.color})}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2 sm:gap-3",children:[(0,a.jsx)("h1",{className:"text-3xl font-semibold tracking-tight",children:w.name}),!m&&w.notice?.apiKeyUrl&&(0,a.jsxs)("a",{href:w.notice.apiKeyUrl,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),"Get API Key"]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5 mt-1 flex-wrap",children:[m&&(0,a.jsxs)(i.Ex,{variant:"default",size:"sm",children:["Custom \xb7 ",u?.prefix]}),N.map(t=>(0,a.jsx)(i.Ex,{variant:t===e?"primary":"default",size:"sm",children:t.toUpperCase()},t))]})]}),m&&(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsx)(i.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>y(!0),children:"Edit"}),(0,a.jsx)(i.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:p,children:"Delete"})]})]})]}),!m&&w.kindNotice?.[e]&&(0,a.jsxs)("div",{className:"flex items-start gap-3 px-4 py-3 rounded-lg bg-amber-500/10 border border-amber-500/30 text-amber-700 dark:text-amber-400",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px] mt-0.5",children:"warning"}),(0,a.jsx)("p",{className:"text-sm",children:w.kindNotice[e]})]}),!m&&w.notice?.text&&!w.deprecated&&(0,a.jsxs)("div",{className:"flex flex-col gap-2 rounded-lg border border-blue-500/30 bg-blue-500/10 px-3 py-2 sm:flex-row sm:items-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-blue-500 shrink-0",children:"info"}),(0,a.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:w.notice.text}),w.notice.apiKeyUrl&&(0,a.jsx)("a",{href:w.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 →"})]}),!m&&w.noAuth?(0,a.jsx)(i.gw,{providerId:t}):(0,a.jsx)(g,{providerId:t,isOAuth:!1}),"tts"!==e&&"webSearch"!==e&&"webFetch"!==e&&(0,a.jsx)(j,{providerId:t,kindFilter:e,providerAliasOverride:m?u?.prefix:void 0}),!m&&(w.searchConfig||w.fetchConfig||w.ttsConfig||w.sttConfig||w.embeddingConfig||w.searchViaChat)&&(0,a.jsx)(i.Wx,{config:"webFetch"===e?w.fetchConfig:"tts"===e?w.ttsConfig:"stt"===e?w.sttConfig:"embedding"===e?w.embeddingConfig:w.searchConfig||{mode:"chat-completions",defaultModel:w.searchViaChat?.defaultModel,pricingUrl:w.searchViaChat?.pricingUrl,freeTier:w.searchViaChat?.freeTier},provider:w,title:`${o.label} Config`}),"embedding"===e&&(0,a.jsx)(T,{providerId:t,customAlias:u?.prefix}),"tts"===e&&(0,a.jsx)(I,{providerId:t}),"stt"===e&&!m&&(0,a.jsx)(R,{providerId:t}),!m&&A[e]&&(0,a.jsx)(E,{providerId:t,kind:e}),m&&(0,a.jsx)(i.x0,{isOpen:f,node:u,onClose:()=>y(!1),onSaved:e=>{x(e),y(!1)}})]}):(0,r.notFound)()}},95364:(e,t,s)=>{Promise.resolve().then(s.bind(s,94588))}},e=>{e.O(0,[2574,3862,246,5792,5564,5263,5497,8441,3794,7358],()=>e(e.s=95364)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6620],{16144:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>f});var i=t(95155),a=t(73321),r=t(98500),n=t.n(r),o=t(12115),l=t(35497),c=t(57250),d=t(52679);let m=new Set(["image"]),x={image:"image-combo",tts:"tts-combo"};function h(e){let s=Object.entries(e).some(([e,s])=>e.startsWith("modelLock_")&&s&&new Date(s).getTime()>Date.now());return"unavailable"!==e.testStatus||s?e.testStatus:"active"}function p({provider:e,kind:s,connections:t,isCustom:a,onToggle:r}){let o=d.Q2[e.id],m=!!o?.noAuth,x=t.filter(s=>s.provider===e.id),u=x.filter(e=>{let s=h(e);return"active"===s||"success"===s}).length,f=x.filter(e=>{let s=h(e);return"error"===s||"expired"===s||"unavailable"===s}).length,g=x.length,j=g>0&&x.every(e=>!1===e.isActive);return(0,i.jsx)(n(),{href:`/dashboard/media-providers/${s}/${e.id}`,className:"group",children:(0,i.jsx)(l.Zp,{padding:"xs",className:`h-full hover:bg-black/[0.01] dark:hover:bg-white/[0.01] transition-colors cursor-pointer ${j?"opacity-50":""}`,children:(0,i.jsxs)("div",{className:"flex min-w-0 items-center justify-between gap-3",children:[(0,i.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,i.jsx)("div",{className:"size-8 rounded-lg flex items-center justify-center shrink-0",style:{backgroundColor:`${e.color?.length>7?e.color:(e.color??"#888")+"15"}`},children:(0,i.jsx)(c.A,{src:`/providers/${e.id}.png`,alt:e.name,size:30,className:"object-contain rounded-lg max-w-[30px] max-h-[30px]",fallbackText:e.textIcon||e.id.slice(0,2).toUpperCase(),fallbackColor:e.color})}),(0,i.jsxs)("div",{className:"min-w-0",children:[(0,i.jsx)("h3",{className:"font-semibold text-sm",children:e.name}),(0,i.jsxs)("div",{className:"flex items-center gap-2 mt-0.5 flex-wrap",children:[a&&(0,i.jsx)(l.Ex,{variant:"default",size:"sm",children:"Custom"}),m?(0,i.jsx)(l.Ex,{variant:"success",size:"sm",children:"Ready"}):j?(0,i.jsx)(l.Ex,{variant:"default",size:"sm",children:"Disabled"}):0===g?(0,i.jsx)("span",{className:"text-xs text-text-muted",children:"No connections"}):(0,i.jsxs)(i.Fragment,{children:[u>0&&(0,i.jsxs)(l.Ex,{variant:"success",size:"sm",dot:!0,children:[u," Connected"]}),f>0&&(0,i.jsxs)(l.Ex,{variant:"error",size:"sm",dot:!0,children:[f," Error"]}),0===u&&0===f&&(0,i.jsxs)(l.Ex,{variant:"default",size:"sm",children:[g," Added"]})]})]})]})]}),g>0&&(0,i.jsx)("div",{className:"shrink-0 opacity-100 transition-opacity sm:opacity-0 sm:group-hover:opacity-100",onClick:s=>{s.preventDefault(),s.stopPropagation(),r&&r(e.id,j)},children:(0,i.jsx)(l.lM,{size:"sm",checked:!j,onChange:()=>{},title:j?"Enable provider":"Disable provider"})})]})})})}function u({combos:e}){return 0===e.length?null:(0,i.jsx)("div",{className:"flex flex-col gap-2",children:e.map(e=>(0,i.jsx)(n(),{href:`/dashboard/media-providers/combo/${e.id}`,children:(0,i.jsx)(l.Zp,{padding:"xs",className:"hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors cursor-pointer",children:(0,i.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:"layers"}),(0,i.jsx)("code",{className:"text-sm font-mono font-medium flex-1 truncate",children:e.name}),(0,i.jsxs)("div",{className:"flex flex-wrap items-center gap-1 sm:shrink-0",children:[e.models.slice(0,6).map((e,s)=>{let t="string"==typeof e?e.split("/")[0]:"",a=d.Q2[t];return(0,i.jsx)("div",{title:a?.name||e,className:"size-5 rounded flex items-center justify-center",style:{backgroundColor:`${a?.color??"#888"}15`},children:(0,i.jsx)(c.A,{src:`/providers/${t}.png`,alt:a?.name||t,size:18,className:"object-contain rounded max-w-[18px] max-h-[18px]",fallbackText:a?.textIcon||t.slice(0,2).toUpperCase(),fallbackColor:a?.color})},`${e}-${s}`)}),e.models.length>6&&(0,i.jsxs)("span",{className:"text-[10px] text-text-muted ml-1",children:["+",e.models.length-6]})]}),(0,i.jsx)("span",{className:"text-[11px] text-text-muted shrink-0",children:e.models.length}),(0,i.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[16px]",children:"chevron_right"})]})})},e.id))})}function f(){let{kind:e}=(0,a.useParams)(),s=(0,a.useRouter)(),[t,r]=(0,o.useState)([]),[n,c]=(0,o.useState)([]),[h,f]=(0,o.useState)([]),[g,j]=(0,o.useState)(!1);(0,o.useEffect)(()=>{("webSearch"===e||"webFetch"===e)&&s.replace("/dashboard/media-providers/web")},[e,s]);let b=d.rj.find(s=>s.id===e),v="embedding"===e,N=m.has(e);if((0,o.useEffect)(()=>{b&&(fetch("/api/providers",{cache:"no-store"}).then(e=>e.json()).then(e=>r(e.connections||[])).catch(()=>{}),v&&fetch("/api/provider-nodes",{cache:"no-store"}).then(e=>e.json()).then(e=>c((e.nodes||[]).filter(e=>"custom-embedding"===e.type))).catch(()=>{}),N&&fetch("/api/combos",{cache:"no-store"}).then(e=>e.json()).then(e=>f(e.combos||[])).catch(()=>{}))},[v,N,b]),!b)return(0,a.notFound)();let y=(0,d.o5)(e),k=h.filter(s=>s.kind===e),w=n.map(e=>({id:e.id,name:e.name||"Custom Embedding",color:"#6366F1",textIcon:"CE"})),C=[...y,...w],$=async(e,s)=>{let i=t.filter(s=>s.provider===e);r(t=>t.map(t=>t.provider===e?{...t,isActive:s}:t)),await Promise.allSettled(i.map(e=>fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:s})})))},E=async()=>{let t=x[e]||`${e}-combo`,i=t,a=1,r=new Set(h.map(e=>e.name));for(;r.has(i);)i=`${t}-${a++}`;let n=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:i,models:[],kind:e})});if(n.ok){let e=await n.json();s.push(`/dashboard/media-providers/combo/${e.id}`)}else alert((await n.json()).error||"Failed to create combo")};return(0,i.jsxs)("div",{className:"flex flex-col gap-6",children:[(v||N)&&(0,i.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[N&&(0,i.jsx)(l.$n,{size:"sm",icon:"add",onClick:E,children:"Create Combo"}),v&&(0,i.jsx)(l.$n,{size:"sm",icon:"add",onClick:()=>j(!0),children:"Add Custom Embedding"})]}),N&&k.length>0&&(0,i.jsx)(u,{combos:k}),0===C.length?(0,i.jsxs)("div",{className:"text-center py-12 border border-dashed border-border rounded-xl text-text-muted text-sm",children:["No providers support ",(0,i.jsx)("strong",{children:b.label})," yet."]}):(0,i.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:[y.map(s=>(0,i.jsx)(p,{provider:s,kind:e,connections:t,onToggle:$},s.id)),w.map(s=>(0,i.jsx)(p,{provider:s,kind:e,connections:t,isCustom:!0,onToggle:$},s.id))]}),v&&(0,i.jsx)(l.x0,{isOpen:g,onClose:()=>j(!1),onCreated:e=>{c(s=>[...s,e]),j(!1)}})]})}},40381:(e,s,t)=>{Promise.resolve().then(t.bind(t,16144))}},e=>{e.O(0,[2574,3862,246,2714,5564,5263,5497,8441,3794,7358],()=>e(e.s=40381)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6620],{16144:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>f});var i=t(95155),a=t(73321),r=t(98500),n=t.n(r),o=t(12115),l=t(35497),c=t(57250),d=t(52679);let m=new Set(["image"]),x={image:"image-combo",tts:"tts-combo"};function h(e){let s=Object.entries(e).some(([e,s])=>e.startsWith("modelLock_")&&s&&new Date(s).getTime()>Date.now());return"unavailable"!==e.testStatus||s?e.testStatus:"active"}function p({provider:e,kind:s,connections:t,isCustom:a,onToggle:r}){let o=d.Q2[e.id],m=!!o?.noAuth,x=t.filter(s=>s.provider===e.id),u=x.filter(e=>{let s=h(e);return"active"===s||"success"===s}).length,f=x.filter(e=>{let s=h(e);return"error"===s||"expired"===s||"unavailable"===s}).length,g=x.length,j=g>0&&x.every(e=>!1===e.isActive);return(0,i.jsx)(n(),{href:`/dashboard/media-providers/${s}/${e.id}`,className:"group",children:(0,i.jsx)(l.Zp,{padding:"xs",className:`h-full hover:bg-black/[0.01] dark:hover:bg-white/[0.01] transition-colors cursor-pointer ${j?"opacity-50":""}`,children:(0,i.jsxs)("div",{className:"flex min-w-0 items-center justify-between gap-3",children:[(0,i.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,i.jsx)("div",{className:"size-8 rounded-lg flex items-center justify-center shrink-0",style:{backgroundColor:`${e.color?.length>7?e.color:(e.color??"#888")+"15"}`},children:(0,i.jsx)(c.A,{src:`/providers/${e.id}.png`,alt:e.name,size:30,className:"object-contain rounded-lg max-w-[30px] max-h-[30px]",fallbackText:e.textIcon||e.id.slice(0,2).toUpperCase(),fallbackColor:e.color})}),(0,i.jsxs)("div",{className:"min-w-0",children:[(0,i.jsx)("h3",{className:"font-semibold text-sm",children:e.name}),(0,i.jsxs)("div",{className:"flex items-center gap-2 mt-0.5 flex-wrap",children:[a&&(0,i.jsx)(l.Ex,{variant:"default",size:"sm",children:"Custom"}),m?(0,i.jsx)(l.Ex,{variant:"success",size:"sm",children:"Ready"}):j?(0,i.jsx)(l.Ex,{variant:"default",size:"sm",children:"Disabled"}):0===g?(0,i.jsx)("span",{className:"text-xs text-text-muted",children:"No connections"}):(0,i.jsxs)(i.Fragment,{children:[u>0&&(0,i.jsxs)(l.Ex,{variant:"success",size:"sm",dot:!0,children:[u," Connected"]}),f>0&&(0,i.jsxs)(l.Ex,{variant:"error",size:"sm",dot:!0,children:[f," Error"]}),0===u&&0===f&&(0,i.jsxs)(l.Ex,{variant:"default",size:"sm",children:[g," Added"]})]})]})]})]}),g>0&&(0,i.jsx)("div",{className:"shrink-0 opacity-100 transition-opacity sm:opacity-0 sm:group-hover:opacity-100",onClick:s=>{s.preventDefault(),s.stopPropagation(),r&&r(e.id,j)},children:(0,i.jsx)(l.lM,{size:"sm",checked:!j,onChange:()=>{},title:j?"Enable provider":"Disable provider"})})]})})})}function u({combos:e}){return 0===e.length?null:(0,i.jsx)("div",{className:"flex flex-col gap-2",children:e.map(e=>(0,i.jsx)(n(),{href:`/dashboard/media-providers/combo/${e.id}`,children:(0,i.jsx)(l.Zp,{padding:"xs",className:"hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors cursor-pointer",children:(0,i.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:"layers"}),(0,i.jsx)("code",{className:"text-sm font-mono font-medium flex-1 truncate",children:e.name}),(0,i.jsxs)("div",{className:"flex flex-wrap items-center gap-1 sm:shrink-0",children:[e.models.slice(0,6).map((e,s)=>{let t="string"==typeof e?e.split("/")[0]:"",a=d.Q2[t];return(0,i.jsx)("div",{title:a?.name||e,className:"size-5 rounded flex items-center justify-center",style:{backgroundColor:`${a?.color??"#888"}15`},children:(0,i.jsx)(c.A,{src:`/providers/${t}.png`,alt:a?.name||t,size:18,className:"object-contain rounded max-w-[18px] max-h-[18px]",fallbackText:a?.textIcon||t.slice(0,2).toUpperCase(),fallbackColor:a?.color})},`${e}-${s}`)}),e.models.length>6&&(0,i.jsxs)("span",{className:"text-[10px] text-text-muted ml-1",children:["+",e.models.length-6]})]}),(0,i.jsx)("span",{className:"text-[11px] text-text-muted shrink-0",children:e.models.length}),(0,i.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[16px]",children:"chevron_right"})]})})},e.id))})}function f(){let{kind:e}=(0,a.useParams)(),s=(0,a.useRouter)(),[t,r]=(0,o.useState)([]),[n,c]=(0,o.useState)([]),[h,f]=(0,o.useState)([]),[g,j]=(0,o.useState)(!1);(0,o.useEffect)(()=>{("webSearch"===e||"webFetch"===e)&&s.replace("/dashboard/media-providers/web")},[e,s]);let b=d.rj.find(s=>s.id===e),v="embedding"===e,N=m.has(e);if((0,o.useEffect)(()=>{b&&(fetch("/api/providers",{cache:"no-store"}).then(e=>e.json()).then(e=>r(e.connections||[])).catch(()=>{}),v&&fetch("/api/provider-nodes",{cache:"no-store"}).then(e=>e.json()).then(e=>c((e.nodes||[]).filter(e=>"custom-embedding"===e.type))).catch(()=>{}),N&&fetch("/api/combos",{cache:"no-store"}).then(e=>e.json()).then(e=>f(e.combos||[])).catch(()=>{}))},[v,N,b]),!b)return(0,a.notFound)();let y=(0,d.o5)(e),k=h.filter(s=>s.kind===e),w=n.map(e=>({id:e.id,name:e.name||"Custom Embedding",color:"#6366F1",textIcon:"CE"})),C=[...y,...w],$=async(e,s)=>{let i=t.filter(s=>s.provider===e);r(t=>t.map(t=>t.provider===e?{...t,isActive:s}:t)),await Promise.allSettled(i.map(e=>fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:s})})))},E=async()=>{let t=x[e]||`${e}-combo`,i=t,a=1,r=new Set(h.map(e=>e.name));for(;r.has(i);)i=`${t}-${a++}`;let n=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:i,models:[],kind:e})});if(n.ok){let e=await n.json();s.push(`/dashboard/media-providers/combo/${e.id}`)}else alert((await n.json()).error||"Failed to create combo")};return(0,i.jsxs)("div",{className:"flex flex-col gap-6",children:[(v||N)&&(0,i.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[N&&(0,i.jsx)(l.$n,{size:"sm",icon:"add",onClick:E,children:"Create Combo"}),v&&(0,i.jsx)(l.$n,{size:"sm",icon:"add",onClick:()=>j(!0),children:"Add Custom Embedding"})]}),N&&k.length>0&&(0,i.jsx)(u,{combos:k}),0===C.length?(0,i.jsxs)("div",{className:"text-center py-12 border border-dashed border-border rounded-xl text-text-muted text-sm",children:["No providers support ",(0,i.jsx)("strong",{children:b.label})," yet."]}):(0,i.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:[y.map(s=>(0,i.jsx)(p,{provider:s,kind:e,connections:t,onToggle:$},s.id)),w.map(s=>(0,i.jsx)(p,{provider:s,kind:e,connections:t,isCustom:!0,onToggle:$},s.id))]}),v&&(0,i.jsx)(l.x0,{isOpen:g,onClose:()=>j(!1),onCreated:e=>{c(s=>[...s,e]),j(!1)}})]})}},40381:(e,s,t)=>{Promise.resolve().then(t.bind(t,16144))}},e=>{e.O(0,[2574,3862,246,5792,5564,5263,5497,8441,3794,7358],()=>e(e.s=40381)),_N_E=e.O()}]);
@@ -1,4 +1,4 @@
1
1
  (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8334],{22662:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>b});var a=s(95155),l=s(73321),r=s(12115),i=s(98500),n=s.n(i),o=s(35497),c=s(57250),d=s(52679);let m=/^[a-zA-Z0-9_.\-]+$/,x={webSearch:"Web Search",webFetch:"Web Fetch",image:"Text to Image",tts:"Text To Speech"},h={webSearch:"/v1/search",webFetch:"/v1/web/fetch",image:"/v1/images/generations",tts:"/v1/audio/speech"},u={webSearch:e=>({model:e,query:"What is the latest news about AI?",search_type:"web",max_results:5}),webFetch:e=>({model:e,url:"https://example.com",format:"markdown"}),image:e=>({model:e,prompt:"A cute cat playing piano",n:1,size:"1024x1024"}),tts:e=>({model:e,input:"Hello, this is a test.",voice:"alloy"})};function p(e){return"webSearch"===e||"webFetch"===e?"/dashboard/media-providers/web":`/dashboard/media-providers/${e}`}function b(){let{id:e}=(0,l.useParams)(),t=(0,l.useRouter)(),[s,i]=(0,r.useState)(null),[b,f]=(0,r.useState)(!0),[j,g]=(0,r.useState)(""),[w,y]=(0,r.useState)(""),[v,N]=(0,r.useState)([]),[k,S]=(0,r.useState)(!1),[U,$]=(0,r.useState)(!1),[C,O]=(0,r.useState)([]),[_,T]=(0,r.useState)(!1),[R,A]=(0,r.useState)(null),[L,P]=(0,r.useState)(""),[E,z]=(0,r.useState)(""),[D,F]=(0,r.useState)([]),[M,I]=(0,r.useState)({}),J=async()=>{try{let[t,s,a,l,r,n]=await Promise.all([fetch(`/api/combos/${e}`,{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"}),fetch("/api/usage/logs",{cache:"no-store"}),fetch("/api/keys",{cache:"no-store"}),fetch("/api/providers",{cache:"no-store"}),fetch("/api/models/alias",{cache:"no-store"})]);if(n.ok&&I((await n.json()).aliases||{}),l.ok){let e=await l.json();z((e.keys||[]).find(e=>!1!==e.isActive)?.key||"")}if(r.ok&&F((await r.json()).connections||[]),!t.ok){i(null),f(!1);return}let o=await t.json();i(o),g(o.name),N(o.models||[]);let c=s.ok?await s.json():{};S(c.comboStrategies?.[o.name]?.fallbackStrategy==="round-robin");let d=a.ok?await a.json():[];O(d.filter(e=>"string"==typeof e&&e.includes(o.name)).slice(0,50))}catch{}f(!1)};(0,r.useEffect)(()=>{J()},[e]);let W=e=>e.trim()?m.test(e)?(y(""),!0):(y("Only letters, numbers, -, _ and ."),!1):(y("Name is required"),!1),H=async t=>{let s=await fetch(`/api/combos/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});return!!s.ok||(alert((await s.json()).error||"Failed to save"),!1)},Z=async()=>{!W(j)||j===s.name||await H({name:j})&&await J()},q=async e=>{let t=e?.value||e;if(!t||v.includes(t))return;let s=[...v,t];N(s),await H({models:s})},B=async e=>{let t=e?.value||e;if(!t||!v.includes(t))return;let s=v.filter(e=>e!==t);N(s),await H({models:s})},Y=async e=>{let t=v.filter((t,s)=>s!==e);N(t),await H({models:t})},G=async(e,t)=>{let s=[...v],a=e+t;a<0||a>=s.length||([s[e],s[a]]=[s[a],s[e]],N(s),await H({models:s}))},K=async e=>{S(e);let t=await fetch("/api/settings",{cache:"no-store"}),a={...(t.ok?await t.json():{}).comboStrategies||{}};e?a[s.name]={fallbackStrategy:"round-robin"}:delete a[s.name],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategies:a})})},Q=async()=>{!confirm(`Delete combo "${s.name}"?`)||(await fetch(`/api/combos/${e}`,{method:"DELETE"})).ok&&t.push(p(s.kind))},V=async()=>{if(T(!0),A(null),P(""),R?.audioUrl)try{URL.revokeObjectURL(R.audioUrl)}catch{}if(R?.imageUrl?.startsWith("blob:"))try{URL.revokeObjectURL(R.imageUrl)}catch{}let e=Date.now();try{let t=h[s.kind],a=u[s.kind](s.name),l={"Content-Type":"application/json"};E&&(l.Authorization=`Bearer ${E}`);let r=await fetch(`/api${t}`,{method:"POST",headers:l,body:JSON.stringify(a)}),i=Date.now()-e;if(!r.ok){let e=await r.json().catch(()=>({}));P(e?.error?.message||e?.error||`HTTP ${r.status}`),A({json:JSON.stringify(e,null,2),latencyMs:i});return}let n=r.headers.get("content-type")||"";if(n.startsWith("image/")){let e=await r.blob();A({imageUrl:URL.createObjectURL(e),latencyMs:i});return}if(n.startsWith("audio/")||"application/octet-stream"===n){let e=await r.blob();A({audioUrl:URL.createObjectURL(e),latencyMs:i});return}let o=await r.json(),c=o?.data?.[0],d=c?.b64_json?`data:image/png;base64,${c.b64_json}`:c?.url||"";A({json:JSON.stringify(function e(t){if(!t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(e);let s={};for(let[a,l]of Object.entries(t))s[a]="b64_json"===a&&"string"==typeof l&&l.length>100?`<${l.length} chars base64>`:e(l);return s}(o),null,2),imageUrl:d,latencyMs:i})}catch(e){P(e.message||"Network error")}T(!1)};if(b)return(0,a.jsx)("div",{className:"text-text-muted text-sm",children:"Loading..."});if(!s)return(0,l.notFound)();let X=x[s.kind]||d.rj.find(e=>e.id===s.kind)?.label||"Combo",ee=h[s.kind],et=s.kind&&u[s.kind]?u[s.kind](s.name):null,es=ee?`curl -X POST http://localhost:20128${ee} \\
2
2
  -H "Content-Type: application/json" \\
3
3
  -H "Authorization: Bearer ${E||"YOUR_KEY"}" \\
4
- -d '${JSON.stringify(et)}'`:"",ea=p(s.kind);return(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,a.jsx)(n(),{href:ea,className:"text-text-muted hover:text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined",children:"arrow_back"})}),(0,a.jsx)("div",{className:"size-10 rounded-lg bg-primary/10 flex items-center justify-center",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-primary",children:"layers"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:[X," Combo"]}),(0,a.jsx)("code",{className:"text-lg font-semibold font-mono",children:s.name})]})]}),(0,a.jsx)(o.$n,{variant:"outline",icon:"delete",onClick:Q,className:"text-red-500 border-red-200 hover:bg-red-50",children:"Delete"})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"Settings"}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(o.pd,{label:"Combo Name",value:j,onChange:e=>{g(e.target.value),W(e.target.value)},onBlur:Z,error:w}),(0,a.jsx)("p",{className:"text-[10px] text-text-muted mt-0.5",children:"Only letters, numbers, -, _ and ."})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:"Round Robin"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Rotate providers across requests instead of strict fallback order."})]}),(0,a.jsx)(o.lM,{checked:k,onChange:K})]})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Providers"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Tried in order (top-down) or rotated when round-robin is on."})]}),(0,a.jsx)(o.$n,{size:"sm",icon:"add",onClick:()=>$(!0),children:"Add Provider"})]}),0===v.length?(0,a.jsx)("div",{className:"text-center py-6 border border-dashed border-border rounded-lg text-text-muted text-sm",children:"No providers yet."}):(0,a.jsx)("div",{className:"flex flex-col gap-2",children:v.map((e,t)=>{let{providerId:s,model:l}=function(e){if("string"!=typeof e)return{providerId:"",model:""};let t=e.indexOf("/");return t<0?{providerId:e,model:""}:{providerId:e.slice(0,t),model:e.slice(t+1)}}(e),r=d.Q2[s];return(0,a.jsxs)("div",{className:"flex items-center gap-3 p-2 rounded-lg bg-black/[0.02] dark:bg-white/[0.02]",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted w-5 text-center",children:t+1}),(0,a.jsx)(c.A,{src:`/providers/${s}.png`,alt:r?.name||s,size:24,className:"object-contain rounded shrink-0",fallbackText:r?.textIcon||s.slice(0,2).toUpperCase(),fallbackColor:r?.color}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("div",{className:"text-sm font-medium truncate",children:r?.name||s}),l&&(0,a.jsx)("code",{className:"text-[10px] text-text-muted font-mono truncate block",children:l})]}),(0,a.jsxs)("div",{className:"flex items-center gap-0.5",children:[(0,a.jsx)("button",{onClick:()=>G(t,-1),disabled:0===t,className:`p-1 rounded ${0===t?"text-text-muted/20":"text-text-muted hover:text-primary hover:bg-black/5"}`,title:"Move up",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"arrow_upward"})}),(0,a.jsx)("button",{onClick:()=>G(t,1),disabled:t===v.length-1,className:`p-1 rounded ${t===v.length-1?"text-text-muted/20":"text-text-muted hover:text-primary hover:bg-black/5"}`,title:"Move down",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"arrow_downward"})}),(0,a.jsx)("button",{onClick:()=>Y(t),className:"p-1 rounded text-text-muted hover:text-red-500 hover:bg-red-500/10",title:"Remove",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"close"})})]})]},`${e}-${t}`)})})]}),s.kind&&ee&&(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Test Example"}),(0,a.jsx)(o.$n,{size:"sm",icon:"play_arrow",onClick:V,disabled:_||0===v.length,children:_?"Running...":"Run"})]}),(0,a.jsx)("pre",{className:"text-xs font-mono bg-black/[0.03] dark:bg-white/[0.03] p-3 rounded-lg overflow-x-auto whitespace-pre-wrap break-all",children:es}),L&&(0,a.jsx)("p",{className:"mt-3 text-xs text-red-500 break-words",children:L}),R&&(0,a.jsxs)("div",{className:"mt-3 flex flex-col gap-3",children:[null!=R.latencyMs&&(0,a.jsxs)("span",{className:"text-[11px] text-text-muted",children:["⚡ ",R.latencyMs,"ms"]}),R.imageUrl&&(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"flex items-center justify-end mb-1.5",children:(0,a.jsxs)("a",{href:R.imageUrl,download:"image.png",className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})}),(0,a.jsx)("img",{src:R.imageUrl,alt:"Generated",className:"max-w-full rounded-lg border border-border"})]}),R.audioUrl&&(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"flex items-center justify-end mb-1.5",children:(0,a.jsxs)("a",{href:R.audioUrl,download:"speech.mp3",className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})}),(0,a.jsx)("audio",{controls:!0,src:R.audioUrl,className:"w-full"})]}),R.json&&(0,a.jsx)("pre",{className:"text-xs font-mono bg-black/[0.03] dark:bg-white/[0.03] p-3 rounded-lg overflow-auto max-h-[300px] whitespace-pre-wrap break-all",children:R.json})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"Usage Logs"}),0===C.length?(0,a.jsx)("p",{className:"text-xs text-text-muted italic",children:"No usage yet."}):(0,a.jsx)("pre",{className:"text-[11px] font-mono bg-black/[0.03] dark:bg-white/[0.03] p-3 rounded-lg overflow-auto max-h-[400px] whitespace-pre-wrap",children:C.join("\n")})]}),(0,a.jsx)(o.rq,{isOpen:U,onClose:()=>$(!1),onSelect:q,onDeselect:B,activeProviders:D,modelAliases:M,title:`Add ${X} Model`,kindFilter:s.kind,addedModelValues:v,closeOnSelect:!1})]})}},70878:(e,t,s)=>{Promise.resolve().then(s.bind(s,22662))}},e=>{e.O(0,[2574,3862,246,2714,5564,5263,5497,8441,3794,7358],()=>e(e.s=70878)),_N_E=e.O()}]);
4
+ -d '${JSON.stringify(et)}'`:"",ea=p(s.kind);return(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,a.jsx)(n(),{href:ea,className:"text-text-muted hover:text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined",children:"arrow_back"})}),(0,a.jsx)("div",{className:"size-10 rounded-lg bg-primary/10 flex items-center justify-center",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-primary",children:"layers"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:[X," Combo"]}),(0,a.jsx)("code",{className:"text-lg font-semibold font-mono",children:s.name})]})]}),(0,a.jsx)(o.$n,{variant:"outline",icon:"delete",onClick:Q,className:"text-red-500 border-red-200 hover:bg-red-50",children:"Delete"})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"Settings"}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(o.pd,{label:"Combo Name",value:j,onChange:e=>{g(e.target.value),W(e.target.value)},onBlur:Z,error:w}),(0,a.jsx)("p",{className:"text-[10px] text-text-muted mt-0.5",children:"Only letters, numbers, -, _ and ."})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:"Round Robin"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Rotate providers across requests instead of strict fallback order."})]}),(0,a.jsx)(o.lM,{checked:k,onChange:K})]})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Providers"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Tried in order (top-down) or rotated when round-robin is on."})]}),(0,a.jsx)(o.$n,{size:"sm",icon:"add",onClick:()=>$(!0),children:"Add Provider"})]}),0===v.length?(0,a.jsx)("div",{className:"text-center py-6 border border-dashed border-border rounded-lg text-text-muted text-sm",children:"No providers yet."}):(0,a.jsx)("div",{className:"flex flex-col gap-2",children:v.map((e,t)=>{let{providerId:s,model:l}=function(e){if("string"!=typeof e)return{providerId:"",model:""};let t=e.indexOf("/");return t<0?{providerId:e,model:""}:{providerId:e.slice(0,t),model:e.slice(t+1)}}(e),r=d.Q2[s];return(0,a.jsxs)("div",{className:"flex items-center gap-3 p-2 rounded-lg bg-black/[0.02] dark:bg-white/[0.02]",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted w-5 text-center",children:t+1}),(0,a.jsx)(c.A,{src:`/providers/${s}.png`,alt:r?.name||s,size:24,className:"object-contain rounded shrink-0",fallbackText:r?.textIcon||s.slice(0,2).toUpperCase(),fallbackColor:r?.color}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("div",{className:"text-sm font-medium truncate",children:r?.name||s}),l&&(0,a.jsx)("code",{className:"text-[10px] text-text-muted font-mono truncate block",children:l})]}),(0,a.jsxs)("div",{className:"flex items-center gap-0.5",children:[(0,a.jsx)("button",{onClick:()=>G(t,-1),disabled:0===t,className:`p-1 rounded ${0===t?"text-text-muted/20":"text-text-muted hover:text-primary hover:bg-black/5"}`,title:"Move up",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"arrow_upward"})}),(0,a.jsx)("button",{onClick:()=>G(t,1),disabled:t===v.length-1,className:`p-1 rounded ${t===v.length-1?"text-text-muted/20":"text-text-muted hover:text-primary hover:bg-black/5"}`,title:"Move down",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"arrow_downward"})}),(0,a.jsx)("button",{onClick:()=>Y(t),className:"p-1 rounded text-text-muted hover:text-red-500 hover:bg-red-500/10",title:"Remove",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"close"})})]})]},`${e}-${t}`)})})]}),s.kind&&ee&&(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Test Example"}),(0,a.jsx)(o.$n,{size:"sm",icon:"play_arrow",onClick:V,disabled:_||0===v.length,children:_?"Running...":"Run"})]}),(0,a.jsx)("pre",{className:"text-xs font-mono bg-black/[0.03] dark:bg-white/[0.03] p-3 rounded-lg overflow-x-auto whitespace-pre-wrap break-all",children:es}),L&&(0,a.jsx)("p",{className:"mt-3 text-xs text-red-500 break-words",children:L}),R&&(0,a.jsxs)("div",{className:"mt-3 flex flex-col gap-3",children:[null!=R.latencyMs&&(0,a.jsxs)("span",{className:"text-[11px] text-text-muted",children:["⚡ ",R.latencyMs,"ms"]}),R.imageUrl&&(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"flex items-center justify-end mb-1.5",children:(0,a.jsxs)("a",{href:R.imageUrl,download:"image.png",className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})}),(0,a.jsx)("img",{src:R.imageUrl,alt:"Generated",className:"max-w-full rounded-lg border border-border"})]}),R.audioUrl&&(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"flex items-center justify-end mb-1.5",children:(0,a.jsxs)("a",{href:R.audioUrl,download:"speech.mp3",className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})}),(0,a.jsx)("audio",{controls:!0,src:R.audioUrl,className:"w-full"})]}),R.json&&(0,a.jsx)("pre",{className:"text-xs font-mono bg-black/[0.03] dark:bg-white/[0.03] p-3 rounded-lg overflow-auto max-h-[300px] whitespace-pre-wrap break-all",children:R.json})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"Usage Logs"}),0===C.length?(0,a.jsx)("p",{className:"text-xs text-text-muted italic",children:"No usage yet."}):(0,a.jsx)("pre",{className:"text-[11px] font-mono bg-black/[0.03] dark:bg-white/[0.03] p-3 rounded-lg overflow-auto max-h-[400px] whitespace-pre-wrap",children:C.join("\n")})]}),(0,a.jsx)(o.rq,{isOpen:U,onClose:()=>$(!1),onSelect:q,onDeselect:B,activeProviders:D,modelAliases:M,title:`Add ${X} Model`,kindFilter:s.kind,addedModelValues:v,closeOnSelect:!1})]})}},70878:(e,t,s)=>{Promise.resolve().then(s.bind(s,22662))}},e=>{e.O(0,[2574,3862,246,5792,5564,5263,5497,8441,3794,7358],()=>e(e.s=70878)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9260],{41347:(e,s,t)=>{Promise.resolve().then(t.bind(t,71088))},71088:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>b});var r=t(95155),a=t(98500),i=t.n(a),l=t(12115),o=t(73321),c=t(35497),n=t(57250),d=t(52679);function m(e){let s=Object.entries(e).some(([e,s])=>e.startsWith("modelLock_")&&s&&new Date(s).getTime()>Date.now());return"unavailable"!==e.testStatus||s?e.testStatus:"active"}function x({provider:e,kind:s,connections:t}){let a=d.Q2[e.id],l=!!a?.noAuth,o=t.filter(s=>s.provider===e.id),h=o.filter(e=>{let s=m(e);return"active"===s||"success"===s}).length,p=o.filter(e=>{let s=m(e);return"error"===s||"expired"===s||"unavailable"===s}).length,b=o.length,u=b>0&&o.every(e=>!1===e.isActive);return(0,r.jsx)(i(),{href:`/dashboard/media-providers/${s}/${e.id}`,className:"group",children:(0,r.jsx)(c.Zp,{padding:"xs",className:`h-full hover:bg-black/[0.01] dark:hover:bg-white/[0.01] transition-colors cursor-pointer ${u?"opacity-50":""}`,children:(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,r.jsx)("div",{className:"size-8 rounded-lg flex items-center justify-center shrink-0",style:{backgroundColor:`${e.color?.length>7?e.color:(e.color??"#888")+"15"}`},children:(0,r.jsx)(n.A,{src:`/providers/${e.id}.png`,alt:e.name,size:30,className:"object-contain rounded-lg max-w-[30px] max-h-[30px]",fallbackText:e.textIcon||e.id.slice(0,2).toUpperCase(),fallbackColor:e.color})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"font-semibold text-sm",children:e.name}),(0,r.jsx)("div",{className:"flex items-center gap-2 mt-0.5 flex-wrap",children:l?(0,r.jsx)(c.Ex,{variant:"success",size:"sm",children:"Ready"}):u?(0,r.jsx)(c.Ex,{variant:"default",size:"sm",children:"Disabled"}):0===b?(0,r.jsx)("span",{className:"text-xs text-text-muted",children:"No connections"}):(0,r.jsxs)(r.Fragment,{children:[h>0&&(0,r.jsxs)(c.Ex,{variant:"success",size:"sm",dot:!0,children:[h," Connected"]}),p>0&&(0,r.jsxs)(c.Ex,{variant:"error",size:"sm",dot:!0,children:[p," Error"]}),0===h&&0===p&&(0,r.jsxs)(c.Ex,{variant:"default",size:"sm",children:[b," Added"]})]})})]})]})})})}function h({combos:e}){return 0===e.length?(0,r.jsx)("p",{className:"text-xs text-text-muted italic",children:"No combos yet."}):(0,r.jsx)("div",{className:"flex flex-col gap-2",children:e.map(e=>(0,r.jsx)(i(),{href:`/dashboard/media-providers/combo/${e.id}`,children:(0,r.jsx)(c.Zp,{padding:"xs",className:"hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors cursor-pointer",children:(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:"layers"}),(0,r.jsx)("code",{className:"text-sm font-mono font-medium flex-1 truncate",children:e.name}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-1 sm:shrink-0",children:[e.models.slice(0,6).map((e,s)=>{let t="string"==typeof e?e.split("/")[0]:"",a=d.Q2[t];return(0,r.jsx)("div",{title:a?.name||e,className:"size-5 rounded flex items-center justify-center",style:{backgroundColor:`${a?.color??"#888"}15`},children:(0,r.jsx)(n.A,{src:`/providers/${t}.png`,alt:a?.name||t,size:18,className:"object-contain rounded max-w-[18px] max-h-[18px]",fallbackText:a?.textIcon||t.slice(0,2).toUpperCase(),fallbackColor:a?.color})},`${e}-${s}`)}),e.models.length>6&&(0,r.jsxs)("span",{className:"text-[10px] text-text-muted ml-1",children:["+",e.models.length-6]})]}),(0,r.jsx)("span",{className:"text-[11px] text-text-muted shrink-0",children:e.models.length}),(0,r.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[16px]",children:"chevron_right"})]})})},e.id))})}function p({title:e,icon:s,kind:t,providers:a,connections:i,combos:l,onCreateCombo:o}){return(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary",children:s}),(0,r.jsx)("h2",{className:"text-base font-semibold",children:e}),(0,r.jsxs)("span",{className:"text-xs text-text-muted",children:["(",a.length," providers \xb7 ",l.length," combos)"]})]}),(0,r.jsx)(c.$n,{size:"sm",icon:"add",onClick:o,children:"Create Combo"})]}),l.length>0&&(0,r.jsx)("div",{className:"mb-4",children:(0,r.jsx)(h,{combos:l})}),0===a.length?(0,r.jsx)("div",{className:"text-center py-8 border border-dashed border-border rounded-xl text-text-muted text-sm",children:"No providers."}):(0,r.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:a.map(e=>(0,r.jsx)(x,{provider:e,kind:t,connections:i},e.id))})]})}function b(){let e=(0,o.useRouter)(),[s,t]=(0,l.useState)([]),[a,i]=(0,l.useState)([]),c=async()=>{try{let[e,s]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/combos",{cache:"no-store"})]);e.ok&&t((await e.json()).connections||[]),s.ok&&i((await s.json()).combos||[])}catch{}};(0,l.useEffect)(()=>{c()},[]);let n=(0,d.o5)("webSearch"),m=(0,d.o5)("webFetch"),x=a.filter(e=>"webSearch"===e.kind),h=a.filter(e=>"webFetch"===e.kind),b=async s=>{let t="webSearch"===s?"search-combo":"fetch-combo",r=t,i=1,l=new Set(a.map(e=>e.name));for(;l.has(r);)r=`${t}-${i++}`;let o=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:r,models:[],kind:s})});if(o.ok){let s=await o.json();e.push(`/dashboard/media-providers/combo/${s.id}`)}else alert((await o.json()).error||"Failed to create combo")};return(0,r.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,r.jsx)(p,{title:"Web Search",icon:"search",kind:"webSearch",providers:n,connections:s,combos:x,onCreateCombo:()=>b("webSearch")}),(0,r.jsx)("div",{className:"border-t border-border"}),(0,r.jsx)(p,{title:"Web Fetch",icon:"travel_explore",kind:"webFetch",providers:m,connections:s,combos:h,onCreateCombo:()=>b("webFetch")})]})}}},e=>{e.O(0,[2574,3862,246,2714,5564,5263,5497,8441,3794,7358],()=>e(e.s=41347)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9260],{41347:(e,s,t)=>{Promise.resolve().then(t.bind(t,71088))},71088:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>b});var r=t(95155),a=t(98500),i=t.n(a),l=t(12115),o=t(73321),c=t(35497),n=t(57250),d=t(52679);function m(e){let s=Object.entries(e).some(([e,s])=>e.startsWith("modelLock_")&&s&&new Date(s).getTime()>Date.now());return"unavailable"!==e.testStatus||s?e.testStatus:"active"}function x({provider:e,kind:s,connections:t}){let a=d.Q2[e.id],l=!!a?.noAuth,o=t.filter(s=>s.provider===e.id),h=o.filter(e=>{let s=m(e);return"active"===s||"success"===s}).length,p=o.filter(e=>{let s=m(e);return"error"===s||"expired"===s||"unavailable"===s}).length,b=o.length,u=b>0&&o.every(e=>!1===e.isActive);return(0,r.jsx)(i(),{href:`/dashboard/media-providers/${s}/${e.id}`,className:"group",children:(0,r.jsx)(c.Zp,{padding:"xs",className:`h-full hover:bg-black/[0.01] dark:hover:bg-white/[0.01] transition-colors cursor-pointer ${u?"opacity-50":""}`,children:(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,r.jsx)("div",{className:"size-8 rounded-lg flex items-center justify-center shrink-0",style:{backgroundColor:`${e.color?.length>7?e.color:(e.color??"#888")+"15"}`},children:(0,r.jsx)(n.A,{src:`/providers/${e.id}.png`,alt:e.name,size:30,className:"object-contain rounded-lg max-w-[30px] max-h-[30px]",fallbackText:e.textIcon||e.id.slice(0,2).toUpperCase(),fallbackColor:e.color})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"font-semibold text-sm",children:e.name}),(0,r.jsx)("div",{className:"flex items-center gap-2 mt-0.5 flex-wrap",children:l?(0,r.jsx)(c.Ex,{variant:"success",size:"sm",children:"Ready"}):u?(0,r.jsx)(c.Ex,{variant:"default",size:"sm",children:"Disabled"}):0===b?(0,r.jsx)("span",{className:"text-xs text-text-muted",children:"No connections"}):(0,r.jsxs)(r.Fragment,{children:[h>0&&(0,r.jsxs)(c.Ex,{variant:"success",size:"sm",dot:!0,children:[h," Connected"]}),p>0&&(0,r.jsxs)(c.Ex,{variant:"error",size:"sm",dot:!0,children:[p," Error"]}),0===h&&0===p&&(0,r.jsxs)(c.Ex,{variant:"default",size:"sm",children:[b," Added"]})]})})]})]})})})}function h({combos:e}){return 0===e.length?(0,r.jsx)("p",{className:"text-xs text-text-muted italic",children:"No combos yet."}):(0,r.jsx)("div",{className:"flex flex-col gap-2",children:e.map(e=>(0,r.jsx)(i(),{href:`/dashboard/media-providers/combo/${e.id}`,children:(0,r.jsx)(c.Zp,{padding:"xs",className:"hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors cursor-pointer",children:(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:"layers"}),(0,r.jsx)("code",{className:"text-sm font-mono font-medium flex-1 truncate",children:e.name}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-1 sm:shrink-0",children:[e.models.slice(0,6).map((e,s)=>{let t="string"==typeof e?e.split("/")[0]:"",a=d.Q2[t];return(0,r.jsx)("div",{title:a?.name||e,className:"size-5 rounded flex items-center justify-center",style:{backgroundColor:`${a?.color??"#888"}15`},children:(0,r.jsx)(n.A,{src:`/providers/${t}.png`,alt:a?.name||t,size:18,className:"object-contain rounded max-w-[18px] max-h-[18px]",fallbackText:a?.textIcon||t.slice(0,2).toUpperCase(),fallbackColor:a?.color})},`${e}-${s}`)}),e.models.length>6&&(0,r.jsxs)("span",{className:"text-[10px] text-text-muted ml-1",children:["+",e.models.length-6]})]}),(0,r.jsx)("span",{className:"text-[11px] text-text-muted shrink-0",children:e.models.length}),(0,r.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[16px]",children:"chevron_right"})]})})},e.id))})}function p({title:e,icon:s,kind:t,providers:a,connections:i,combos:l,onCreateCombo:o}){return(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary",children:s}),(0,r.jsx)("h2",{className:"text-base font-semibold",children:e}),(0,r.jsxs)("span",{className:"text-xs text-text-muted",children:["(",a.length," providers \xb7 ",l.length," combos)"]})]}),(0,r.jsx)(c.$n,{size:"sm",icon:"add",onClick:o,children:"Create Combo"})]}),l.length>0&&(0,r.jsx)("div",{className:"mb-4",children:(0,r.jsx)(h,{combos:l})}),0===a.length?(0,r.jsx)("div",{className:"text-center py-8 border border-dashed border-border rounded-xl text-text-muted text-sm",children:"No providers."}):(0,r.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:a.map(e=>(0,r.jsx)(x,{provider:e,kind:t,connections:i},e.id))})]})}function b(){let e=(0,o.useRouter)(),[s,t]=(0,l.useState)([]),[a,i]=(0,l.useState)([]),c=async()=>{try{let[e,s]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/combos",{cache:"no-store"})]);e.ok&&t((await e.json()).connections||[]),s.ok&&i((await s.json()).combos||[])}catch{}};(0,l.useEffect)(()=>{c()},[]);let n=(0,d.o5)("webSearch"),m=(0,d.o5)("webFetch"),x=a.filter(e=>"webSearch"===e.kind),h=a.filter(e=>"webFetch"===e.kind),b=async s=>{let t="webSearch"===s?"search-combo":"fetch-combo",r=t,i=1,l=new Set(a.map(e=>e.name));for(;l.has(r);)r=`${t}-${i++}`;let o=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:r,models:[],kind:s})});if(o.ok){let s=await o.json();e.push(`/dashboard/media-providers/combo/${s.id}`)}else alert((await o.json()).error||"Failed to create combo")};return(0,r.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,r.jsx)(p,{title:"Web Search",icon:"search",kind:"webSearch",providers:n,connections:s,combos:x,onCreateCombo:()=>b("webSearch")}),(0,r.jsx)("div",{className:"border-t border-border"}),(0,r.jsx)(p,{title:"Web Fetch",icon:"travel_explore",kind:"webFetch",providers:m,connections:s,combos:h,onCreateCombo:()=>b("webFetch")})]})}}},e=>{e.O(0,[2574,3862,246,5792,5564,5263,5497,8441,3794,7358],()=>e(e.s=41347)),_N_E=e.O()}]);