@jheavenknows/bluerouter 5.0.43 → 5.0.45

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 (1291) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +21 -21
  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 +2 -2
  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 +1 -1
  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 +1 -1
  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 +1 -1
  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 +1 -1
  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 +2 -2
  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 +2 -2
  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 +2 -2
  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 +1 -1
  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/translator/page.js +1 -1
  82. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  83. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  84. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +1 -1
  85. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  86. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  87. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  88. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  89. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  90. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  91. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  92. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  93. package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  94. package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  95. package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  96. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  97. package/app/.next-cli-build/server/app/_not-found/page.js +1 -1
  98. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  99. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  100. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  101. package/app/.next-cli-build/server/app/_not-found.rsc +6 -6
  102. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +6 -6
  103. package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  104. package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +6 -6
  105. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  106. package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  107. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  108. package/app/.next-cli-build/server/app/api/auth/ldap/test/route.js +1 -1
  109. package/app/.next-cli-build/server/app/api/auth/ldap/test/route.js.nft.json +1 -1
  110. package/app/.next-cli-build/server/app/api/auth/ldap/users/route.js +1 -1
  111. package/app/.next-cli-build/server/app/api/auth/ldap/users/route.js.nft.json +1 -1
  112. package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
  113. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  114. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  115. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  116. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  117. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  118. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  119. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  120. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  121. package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  122. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  123. package/app/.next-cli-build/server/app/api/branding/[asset]/route.js +1 -1
  124. package/app/.next-cli-build/server/app/api/branding/[asset]/route.js.nft.json +1 -1
  125. package/app/.next-cli-build/server/app/api/branding/route.js +1 -1
  126. package/app/.next-cli-build/server/app/api/branding/route.js.nft.json +1 -1
  127. package/app/.next-cli-build/server/app/api/branding/upload/route.js +1 -1
  128. package/app/.next-cli-build/server/app/api/branding/upload/route.js.nft.json +1 -1
  129. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +4 -4
  130. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  131. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  132. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  133. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/autostart/route.js +1 -1
  134. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/autostart/route.js.nft.json +1 -1
  135. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/prompt-log-db/route.js +1 -1
  136. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/prompt-log-db/route.js.nft.json +1 -1
  137. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/root-ca/route.js.nft.json +1 -1
  138. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  139. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  140. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
  141. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  142. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +2 -2
  143. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  144. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
  145. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  146. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +2 -2
  147. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  148. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
  149. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  150. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +1 -1
  151. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  152. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
  153. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  154. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +2 -2
  155. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  156. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +1 -1
  157. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  158. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +2 -2
  159. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  160. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +1 -1
  161. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  162. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
  163. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  164. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
  165. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  166. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +1 -1
  167. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  168. package/app/.next-cli-build/server/app/api/cli-tools/qwen-settings/route.js +2 -2
  169. package/app/.next-cli-build/server/app/api/cli-tools/qwen-settings/route.js.nft.json +1 -1
  170. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  171. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  172. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  173. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  174. package/app/.next-cli-build/server/app/api/dashboard/analytics/route.js +8 -6
  175. package/app/.next-cli-build/server/app/api/dashboard/analytics/route.js.nft.json +1 -1
  176. package/app/.next-cli-build/server/app/api/dashboard/combos/route.js +1 -1
  177. package/app/.next-cli-build/server/app/api/dashboard/combos/route.js.nft.json +1 -1
  178. package/app/.next-cli-build/server/app/api/dashboard/endpoint/route.js +1 -1
  179. package/app/.next-cli-build/server/app/api/dashboard/endpoint/route.js.nft.json +1 -1
  180. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/[id]/route.js +1 -1
  181. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/[id]/route.js.nft.json +1 -1
  182. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/options/route.js +1 -1
  183. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/options/route.js.nft.json +1 -1
  184. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/route.js +1 -1
  185. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/route.js.nft.json +1 -1
  186. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  187. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  188. package/app/.next-cli-build/server/app/api/keys/[id]/rotate/route.js +1 -1
  189. package/app/.next-cli-build/server/app/api/keys/[id]/rotate/route.js.nft.json +1 -1
  190. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  191. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  192. package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  193. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  194. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  195. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  196. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  197. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  198. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  199. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  200. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  201. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  202. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  203. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  204. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  205. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  206. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  207. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  208. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  209. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  210. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  211. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  212. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  213. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  214. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  215. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  216. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  217. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  218. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  219. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  220. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  221. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  222. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  223. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  224. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  225. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  226. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  227. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  228. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  229. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  230. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  231. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  232. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  233. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  234. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  235. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/api-key-models/route.js +1 -1
  236. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/api-key-models/route.js.nft.json +1 -1
  237. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/import-models/route.js +1 -1
  238. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/import-models/route.js.nft.json +1 -1
  239. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/models/[...routeModel]/route.js +1 -1
  240. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/models/[...routeModel]/route.js.nft.json +1 -1
  241. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/route.js +1 -1
  242. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/route.js.nft.json +1 -1
  243. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/usage/route.js +1 -1
  244. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/usage/route.js.nft.json +1 -1
  245. package/app/.next-cli-build/server/app/api/personal-cloud-providers/client/route.js +1 -1
  246. package/app/.next-cli-build/server/app/api/personal-cloud-providers/client/route.js.nft.json +1 -1
  247. package/app/.next-cli-build/server/app/api/personal-cloud-providers/permissions/route.js +1 -1
  248. package/app/.next-cli-build/server/app/api/personal-cloud-providers/permissions/route.js.nft.json +1 -1
  249. package/app/.next-cli-build/server/app/api/personal-cloud-providers/route.js +1 -1
  250. package/app/.next-cli-build/server/app/api/personal-cloud-providers/route.js.nft.json +1 -1
  251. package/app/.next-cli-build/server/app/api/personal-cloud-providers/routing/route.js +1 -1
  252. package/app/.next-cli-build/server/app/api/personal-cloud-providers/routing/route.js.nft.json +1 -1
  253. package/app/.next-cli-build/server/app/api/pricing/recalculate/route.js +1 -1
  254. package/app/.next-cli-build/server/app/api/pricing/recalculate/route.js.nft.json +1 -1
  255. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  256. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  257. package/app/.next-cli-build/server/app/api/provider-health/route.js +1 -1
  258. package/app/.next-cli-build/server/app/api/provider-health/route.js.nft.json +1 -1
  259. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  260. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  261. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  262. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  263. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  264. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  265. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  266. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  267. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  268. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  269. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  270. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  271. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  272. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  273. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  274. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  275. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  276. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  277. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  278. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  279. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  280. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  281. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  282. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  283. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  284. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  285. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  286. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +1 -1
  287. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  288. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +1 -1
  289. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  290. package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  291. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  292. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +1 -1
  293. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  294. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  295. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  296. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
  297. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  298. package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  299. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  300. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  301. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  302. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  303. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  304. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  305. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  306. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +1 -1
  307. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  308. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  309. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  310. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  311. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  312. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  313. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  314. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  315. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  316. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  317. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  318. package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
  319. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  320. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  321. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  322. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  323. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  324. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  325. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +2 -2
  326. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  327. package/app/.next-cli-build/server/app/api/tunnel/tailscale-login/route.js.nft.json +1 -1
  328. package/app/.next-cli-build/server/app/api/tunnel/tailscale-start-daemon/route.js +2 -2
  329. package/app/.next-cli-build/server/app/api/tunnel/tailscale-start-daemon/route.js.nft.json +1 -1
  330. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  331. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  332. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  333. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  334. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  335. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  336. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  337. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  338. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  339. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  340. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  341. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  342. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  343. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  344. package/app/.next-cli-build/server/app/api/usage/stream/route.js +1 -1
  345. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  346. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  347. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  348. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  349. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  350. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  351. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  352. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  353. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  354. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  355. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  356. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  357. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
  358. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  359. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  360. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  361. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  362. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  363. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  364. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  365. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  366. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  367. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  368. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  369. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  370. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  371. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  372. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  373. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  374. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  375. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  376. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  377. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  378. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  379. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  380. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  381. package/app/.next-cli-build/server/app/api/version/restart/route.js.nft.json +1 -1
  382. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  383. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  384. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  385. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  386. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  387. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  388. package/app/.next-cli-build/server/app/callback/page.js +1 -1
  389. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  390. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  391. package/app/.next-cli-build/server/app/callback.html +1 -1
  392. package/app/.next-cli-build/server/app/callback.rsc +6 -6
  393. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +6 -6
  394. package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
  395. package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +6 -6
  396. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
  397. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  398. package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
  399. package/app/.next-cli-build/server/app/dashboard/analytics.html +1 -1
  400. package/app/.next-cli-build/server/app/dashboard/analytics.rsc +7 -7
  401. package/app/.next-cli-build/server/app/dashboard/analytics.segments/!KGRhc2hib2FyZCk/dashboard/analytics/__PAGE__.segment.rsc +1 -1
  402. package/app/.next-cli-build/server/app/dashboard/analytics.segments/!KGRhc2hib2FyZCk/dashboard/analytics.segment.rsc +1 -1
  403. package/app/.next-cli-build/server/app/dashboard/analytics.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  404. package/app/.next-cli-build/server/app/dashboard/analytics.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  405. package/app/.next-cli-build/server/app/dashboard/analytics.segments/_full.segment.rsc +7 -7
  406. package/app/.next-cli-build/server/app/dashboard/analytics.segments/_head.segment.rsc +1 -1
  407. package/app/.next-cli-build/server/app/dashboard/analytics.segments/_index.segment.rsc +6 -6
  408. package/app/.next-cli-build/server/app/dashboard/analytics.segments/_tree.segment.rsc +2 -2
  409. package/app/.next-cli-build/server/app/dashboard/api-keys.html +1 -1
  410. package/app/.next-cli-build/server/app/dashboard/api-keys.rsc +8 -8
  411. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/!KGRhc2hib2FyZCk/dashboard/api-keys/__PAGE__.segment.rsc +2 -2
  412. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/!KGRhc2hib2FyZCk/dashboard/api-keys.segment.rsc +1 -1
  413. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  414. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  415. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/_full.segment.rsc +8 -8
  416. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/_head.segment.rsc +1 -1
  417. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/_index.segment.rsc +6 -6
  418. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/_tree.segment.rsc +2 -2
  419. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  420. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +8 -8
  421. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
  422. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
  423. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  424. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  425. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +8 -8
  426. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
  427. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +6 -6
  428. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
  429. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  430. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +9 -9
  431. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
  432. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
  433. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  434. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  435. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +9 -9
  436. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
  437. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +6 -6
  438. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
  439. package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  440. package/app/.next-cli-build/server/app/dashboard/combos.rsc +8 -8
  441. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  442. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
  443. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  444. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  445. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +8 -8
  446. package/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
  447. package/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +6 -6
  448. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
  449. package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  450. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +9 -9
  451. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
  452. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
  453. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  454. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  455. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +9 -9
  456. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
  457. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +6 -6
  458. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
  459. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  460. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +8 -8
  461. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
  462. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
  463. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
  464. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  465. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  466. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +8 -8
  467. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
  468. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +6 -6
  469. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +2 -2
  470. package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  471. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +8 -8
  472. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
  473. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
  474. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  475. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  476. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +8 -8
  477. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
  478. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +6 -6
  479. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
  480. package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  481. package/app/.next-cli-build/server/app/dashboard/profile.rsc +7 -7
  482. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +1 -1
  483. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
  484. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  485. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  486. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +7 -7
  487. package/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
  488. package/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +6 -6
  489. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
  490. package/app/.next-cli-build/server/app/dashboard/prompt-logs.html +1 -1
  491. package/app/.next-cli-build/server/app/dashboard/prompt-logs.rsc +7 -7
  492. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/!KGRhc2hib2FyZCk/dashboard/prompt-logs/__PAGE__.segment.rsc +1 -1
  493. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/!KGRhc2hib2FyZCk/dashboard/prompt-logs.segment.rsc +1 -1
  494. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  495. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  496. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/_full.segment.rsc +7 -7
  497. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/_head.segment.rsc +1 -1
  498. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/_index.segment.rsc +6 -6
  499. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/_tree.segment.rsc +2 -2
  500. package/app/.next-cli-build/server/app/dashboard/provider-health.html +1 -1
  501. package/app/.next-cli-build/server/app/dashboard/provider-health.rsc +7 -7
  502. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/!KGRhc2hib2FyZCk/dashboard/provider-health/__PAGE__.segment.rsc +1 -1
  503. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/!KGRhc2hib2FyZCk/dashboard/provider-health.segment.rsc +1 -1
  504. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  505. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  506. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/_full.segment.rsc +7 -7
  507. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/_head.segment.rsc +1 -1
  508. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/_index.segment.rsc +6 -6
  509. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/_tree.segment.rsc +2 -2
  510. package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  511. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +8 -8
  512. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  513. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
  514. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  515. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  516. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  517. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +8 -8
  518. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
  519. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +6 -6
  520. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
  521. package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  522. package/app/.next-cli-build/server/app/dashboard/providers.rsc +8 -8
  523. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  524. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  525. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  526. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  527. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +8 -8
  528. package/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
  529. package/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +6 -6
  530. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
  531. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  532. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +8 -8
  533. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
  534. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
  535. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  536. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  537. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +8 -8
  538. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
  539. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +6 -6
  540. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
  541. package/app/.next-cli-build/server/app/dashboard/quota.html +1 -1
  542. package/app/.next-cli-build/server/app/dashboard/quota.rsc +9 -9
  543. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
  544. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
  545. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  546. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  547. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +9 -9
  548. package/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
  549. package/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +6 -6
  550. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
  551. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +1 -1
  552. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  553. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  554. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  555. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +6 -6
  556. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +6 -6
  557. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  558. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +6 -6
  559. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  560. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
  561. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  562. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  563. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  564. package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  565. package/app/.next-cli-build/server/app/dashboard/skills.rsc +8 -8
  566. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +2 -2
  567. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills.segment.rsc +1 -1
  568. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  569. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  570. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +8 -8
  571. package/app/.next-cli-build/server/app/dashboard/skills.segments/_head.segment.rsc +1 -1
  572. package/app/.next-cli-build/server/app/dashboard/skills.segments/_index.segment.rsc +6 -6
  573. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +2 -2
  574. package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  575. package/app/.next-cli-build/server/app/dashboard/translator.rsc +8 -8
  576. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  577. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
  578. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  579. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  580. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +8 -8
  581. package/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
  582. package/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +6 -6
  583. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
  584. package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  585. package/app/.next-cli-build/server/app/dashboard/usage.rsc +8 -8
  586. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
  587. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
  588. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  589. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  590. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +8 -8
  591. package/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
  592. package/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +6 -6
  593. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
  594. package/app/.next-cli-build/server/app/dashboard.html +1 -1
  595. package/app/.next-cli-build/server/app/dashboard.rsc +9 -9
  596. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
  597. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  598. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  599. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +9 -9
  600. package/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
  601. package/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +6 -6
  602. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +2 -2
  603. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  604. package/app/.next-cli-build/server/app/index.html +1 -1
  605. package/app/.next-cli-build/server/app/index.rsc +6 -6
  606. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  607. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +6 -6
  608. package/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
  609. package/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +6 -6
  610. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
  611. package/app/.next-cli-build/server/app/landing/page.js +1 -1
  612. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  613. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  614. package/app/.next-cli-build/server/app/landing.html +1 -1
  615. package/app/.next-cli-build/server/app/landing.rsc +6 -6
  616. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +6 -6
  617. package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
  618. package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +6 -6
  619. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
  620. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
  621. package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
  622. package/app/.next-cli-build/server/app/login/page.js +1 -1
  623. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  624. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  625. package/app/.next-cli-build/server/app/login.html +1 -1
  626. package/app/.next-cli-build/server/app/login.rsc +7 -7
  627. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +7 -7
  628. package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
  629. package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +6 -6
  630. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
  631. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  632. package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
  633. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  634. package/app/.next-cli-build/server/app/page.js +1 -1
  635. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  636. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  637. package/app/.next-cli-build/server/app-paths-manifest.json +21 -21
  638. package/app/.next-cli-build/server/chunks/2338.js +3 -3
  639. package/app/.next-cli-build/server/chunks/3110.js +1 -1
  640. package/app/.next-cli-build/server/chunks/4746.js +1 -1
  641. package/app/.next-cli-build/server/chunks/4803.js +1 -1
  642. package/app/.next-cli-build/server/chunks/6328.js +1 -1
  643. package/app/.next-cli-build/server/chunks/700.js +1 -1
  644. package/app/.next-cli-build/server/chunks/7774.js +2 -2
  645. package/app/.next-cli-build/server/chunks/7965.js +1 -1
  646. package/app/.next-cli-build/server/chunks/8520.js +1 -1
  647. package/app/.next-cli-build/server/chunks/8581.js +64 -0
  648. package/app/.next-cli-build/server/chunks/8895.js +1 -1
  649. package/app/.next-cli-build/server/chunks/9434.js +1 -1
  650. package/app/.next-cli-build/server/chunks/9489.js +1 -1
  651. package/app/.next-cli-build/server/instrumentation.js +1 -1
  652. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  653. package/app/.next-cli-build/server/middleware.js +1 -1
  654. package/app/.next-cli-build/server/pages/404.html +1 -1
  655. package/app/.next-cli-build/server/pages/500.html +1 -1
  656. package/app/.next-cli-build/server/server-reference-manifest.js +1 -1
  657. package/app/.next-cli-build/server/server-reference-manifest.json +1 -1
  658. package/app/.next-cli-build/static/chunks/2714-83a368a92f8c292c.js +64 -0
  659. package/app/.next-cli-build/static/chunks/{5263-4720bafe27490a13.js → 5263-1014a36b031d78f5.js} +1 -1
  660. package/app/.next-cli-build/static/chunks/{5497-d234d298f6c3f962.js → 5497-f06e1a09bd0def9c.js} +1 -1
  661. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/api-keys/{page-d17cba5c03249383.js → page-ab5d688db6e32f62.js} +1 -1
  662. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/{page-0fe6555804a9264b.js → page-2558d7355357c608.js} +1 -1
  663. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/{page-0986f42dc41bebfa.js → page-c0231e9486c2237d.js} +1 -1
  664. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/{page-8cb2fafd44d2c944.js → page-b2e2b7765d39da7a.js} +1 -1
  665. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-a30dfa93b2d6ac90.js +1 -0
  666. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/{page-81216d587547efe4.js → page-03f35e824699a220.js} +1 -1
  667. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/{page-f10f073dea6135f8.js → page-d03884f048a5a7c8.js} +1 -1
  668. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-8b4b169b67b0d2db.js → page-87cbb809c2eeb74e.js} +1 -1
  669. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/{page-cf61958f42923b69.js → page-3bc7d22940bf015c.js} +1 -1
  670. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/{page-b536542f0a708a46.js → page-224e01693a3cfaf1.js} +1 -1
  671. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/{page-6fc459277027e444.js → page-905212b2d7ed648e.js} +1 -1
  672. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/{page-0dd15fd784e80046.js → page-6de007eb2a59ca30.js} +1 -1
  673. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/{page-f10f073dea6135f8.js → page-d03884f048a5a7c8.js} +1 -1
  674. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/personalcloudprovider/{page-9afec1ce4c7607a8.js → page-399160c87b52eb2f.js} +1 -1
  675. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/{page-a31cb59b5b878dc4.js → page-3bb054c7e6200935.js} +1 -1
  676. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/new/{page-feab08fd8ea3abf9.js → page-0da77a157acefc7c.js} +1 -1
  677. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/{page-d57a153d2e06360f.js → page-7b69e5101ad4864f.js} +1 -1
  678. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/{page-3c1de0fa6ff18f08.js → page-80e7e47c3dfa4070.js} +1 -1
  679. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/{page-3a31e39003735195.js → page-fa9e9680d235e2d8.js} +1 -1
  680. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/{page-533d2b73e2f2f7b0.js → page-33c6b65a7848eb94.js} +1 -1
  681. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/{page-c3eeeaf049d89657.js → page-1002addd547b6453.js} +1 -1
  682. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/{page-7579b49088999a9c.js → page-c734cfa89fa60ee8.js} +1 -1
  683. package/app/.next-cli-build/static/chunks/app/(dashboard)/{layout-ca699ce314f4007e.js → layout-5247f67b1fd67c5b.js} +1 -1
  684. package/app/.next-cli-build/static/css/00e41e719abc5c44.css +1 -0
  685. package/app/cli/.build-home/AppData/Roaming/bluerouter/db/backups/{upgrade-5.0.38-to-5.0.39-5.0.39-20260629-215012 → upgrade-4.0.91-to-4.0.92-4.0.92-20260624-155913}/data.sqlite +0 -0
  686. package/app/cli/.build-home/AppData/Roaming/bluerouter/db/backups/{upgrade-5.0.39-to-5.0.40-5.0.40-20260629-225941 → upgrade-4.0.92-to-4.0.93-4.0.93-20260624-163722}/data.sqlite +0 -0
  687. package/app/cli/.build-home/AppData/Roaming/bluerouter/db/backups/{upgrade-5.0.40-to-5.0.41-5.0.41-20260629-232737 → upgrade-4.0.93-to-4.0.94-4.0.94-20260624-170410}/data.sqlite +0 -0
  688. package/app/cli/.build-home/AppData/Roaming/bluerouter/db/backups/{upgrade-5.0.41-to-5.0.42-5.0.42-20260629-233337 → upgrade-4.0.94-to-5.0.44-5.0.44-20260630-115440}/data.sqlite +0 -0
  689. package/app/cli/.build-home/AppData/Roaming/bluerouter/db/data.sqlite +0 -0
  690. package/app/cli/.build-home/AppData/Roaming/bluerouter/db/data.sqlite-shm +0 -0
  691. package/app/cli/.build-home/AppData/Roaming/bluerouter/db/data.sqlite-wal +0 -0
  692. package/app/cli/.build-home/AppData/Roaming/bluerouter/jwt-secret +1 -1
  693. package/app/cli/.build-home/AppData/Roaming/bluerouter/machine-id +1 -1
  694. package/app/cli/.build-home/AppData/Roaming/nextjs-nodejs/Config/config.json +3 -3
  695. package/app/node_modules/baseline-browser-mapping/dist/index.cjs +1 -1
  696. package/app/node_modules/baseline-browser-mapping/package.json +2 -2
  697. package/app/node_modules/caniuse-lite/data/agents.js +1 -1
  698. package/app/node_modules/caniuse-lite/data/browserVersions.js +1 -1
  699. package/app/node_modules/caniuse-lite/data/features/aac.js +1 -1
  700. package/app/node_modules/caniuse-lite/data/features/abortcontroller.js +1 -1
  701. package/app/node_modules/caniuse-lite/data/features/ac3-ec3.js +1 -1
  702. package/app/node_modules/caniuse-lite/data/features/accelerometer.js +1 -1
  703. package/app/node_modules/caniuse-lite/data/features/addeventlistener.js +1 -1
  704. package/app/node_modules/caniuse-lite/data/features/alternate-stylesheet.js +1 -1
  705. package/app/node_modules/caniuse-lite/data/features/ambient-light.js +1 -1
  706. package/app/node_modules/caniuse-lite/data/features/apng.js +1 -1
  707. package/app/node_modules/caniuse-lite/data/features/array-find-index.js +1 -1
  708. package/app/node_modules/caniuse-lite/data/features/array-find.js +1 -1
  709. package/app/node_modules/caniuse-lite/data/features/array-flat.js +1 -1
  710. package/app/node_modules/caniuse-lite/data/features/array-includes.js +1 -1
  711. package/app/node_modules/caniuse-lite/data/features/arrow-functions.js +1 -1
  712. package/app/node_modules/caniuse-lite/data/features/asmjs.js +1 -1
  713. package/app/node_modules/caniuse-lite/data/features/async-clipboard.js +1 -1
  714. package/app/node_modules/caniuse-lite/data/features/async-functions.js +1 -1
  715. package/app/node_modules/caniuse-lite/data/features/atob-btoa.js +1 -1
  716. package/app/node_modules/caniuse-lite/data/features/audio-api.js +1 -1
  717. package/app/node_modules/caniuse-lite/data/features/audio.js +1 -1
  718. package/app/node_modules/caniuse-lite/data/features/audiotracks.js +1 -1
  719. package/app/node_modules/caniuse-lite/data/features/autofocus.js +1 -1
  720. package/app/node_modules/caniuse-lite/data/features/auxclick.js +1 -1
  721. package/app/node_modules/caniuse-lite/data/features/av1.js +1 -1
  722. package/app/node_modules/caniuse-lite/data/features/avif.js +1 -1
  723. package/app/node_modules/caniuse-lite/data/features/background-attachment.js +1 -1
  724. package/app/node_modules/caniuse-lite/data/features/background-clip-text.js +1 -1
  725. package/app/node_modules/caniuse-lite/data/features/background-img-opts.js +1 -1
  726. package/app/node_modules/caniuse-lite/data/features/background-position-x-y.js +1 -1
  727. package/app/node_modules/caniuse-lite/data/features/background-repeat-round-space.js +1 -1
  728. package/app/node_modules/caniuse-lite/data/features/background-sync.js +1 -1
  729. package/app/node_modules/caniuse-lite/data/features/battery-status.js +1 -1
  730. package/app/node_modules/caniuse-lite/data/features/beacon.js +1 -1
  731. package/app/node_modules/caniuse-lite/data/features/beforeafterprint.js +1 -1
  732. package/app/node_modules/caniuse-lite/data/features/bigint.js +1 -1
  733. package/app/node_modules/caniuse-lite/data/features/blobbuilder.js +1 -1
  734. package/app/node_modules/caniuse-lite/data/features/bloburls.js +1 -1
  735. package/app/node_modules/caniuse-lite/data/features/border-image.js +1 -1
  736. package/app/node_modules/caniuse-lite/data/features/border-radius.js +1 -1
  737. package/app/node_modules/caniuse-lite/data/features/broadcastchannel.js +1 -1
  738. package/app/node_modules/caniuse-lite/data/features/brotli.js +1 -1
  739. package/app/node_modules/caniuse-lite/data/features/calc.js +1 -1
  740. package/app/node_modules/caniuse-lite/data/features/canvas-blending.js +1 -1
  741. package/app/node_modules/caniuse-lite/data/features/canvas-text.js +1 -1
  742. package/app/node_modules/caniuse-lite/data/features/canvas.js +1 -1
  743. package/app/node_modules/caniuse-lite/data/features/ch-unit.js +1 -1
  744. package/app/node_modules/caniuse-lite/data/features/chacha20-poly1305.js +1 -1
  745. package/app/node_modules/caniuse-lite/data/features/channel-messaging.js +1 -1
  746. package/app/node_modules/caniuse-lite/data/features/childnode-remove.js +1 -1
  747. package/app/node_modules/caniuse-lite/data/features/classlist.js +1 -1
  748. package/app/node_modules/caniuse-lite/data/features/client-hints-dpr-width-viewport.js +1 -1
  749. package/app/node_modules/caniuse-lite/data/features/clipboard.js +1 -1
  750. package/app/node_modules/caniuse-lite/data/features/colr-v1.js +1 -1
  751. package/app/node_modules/caniuse-lite/data/features/colr.js +1 -1
  752. package/app/node_modules/caniuse-lite/data/features/comparedocumentposition.js +1 -1
  753. package/app/node_modules/caniuse-lite/data/features/console-basic.js +1 -1
  754. package/app/node_modules/caniuse-lite/data/features/console-time.js +1 -1
  755. package/app/node_modules/caniuse-lite/data/features/const.js +1 -1
  756. package/app/node_modules/caniuse-lite/data/features/constraint-validation.js +1 -1
  757. package/app/node_modules/caniuse-lite/data/features/contenteditable.js +1 -1
  758. package/app/node_modules/caniuse-lite/data/features/contentsecuritypolicy.js +1 -1
  759. package/app/node_modules/caniuse-lite/data/features/contentsecuritypolicy2.js +1 -1
  760. package/app/node_modules/caniuse-lite/data/features/cookie-store-api.js +1 -1
  761. package/app/node_modules/caniuse-lite/data/features/cors.js +1 -1
  762. package/app/node_modules/caniuse-lite/data/features/createimagebitmap.js +1 -1
  763. package/app/node_modules/caniuse-lite/data/features/credential-management.js +1 -1
  764. package/app/node_modules/caniuse-lite/data/features/cross-document-view-transitions.js +1 -1
  765. package/app/node_modules/caniuse-lite/data/features/cryptography.js +1 -1
  766. package/app/node_modules/caniuse-lite/data/features/css-all.js +1 -1
  767. package/app/node_modules/caniuse-lite/data/features/css-anchor-positioning.js +1 -1
  768. package/app/node_modules/caniuse-lite/data/features/css-animation.js +1 -1
  769. package/app/node_modules/caniuse-lite/data/features/css-any-link.js +1 -1
  770. package/app/node_modules/caniuse-lite/data/features/css-appearance.js +1 -1
  771. package/app/node_modules/caniuse-lite/data/features/css-at-counter-style.js +1 -1
  772. package/app/node_modules/caniuse-lite/data/features/css-autofill.js +1 -1
  773. package/app/node_modules/caniuse-lite/data/features/css-backdrop-filter.js +1 -1
  774. package/app/node_modules/caniuse-lite/data/features/css-background-offsets.js +1 -1
  775. package/app/node_modules/caniuse-lite/data/features/css-backgroundblendmode.js +1 -1
  776. package/app/node_modules/caniuse-lite/data/features/css-boxdecorationbreak.js +1 -1
  777. package/app/node_modules/caniuse-lite/data/features/css-boxshadow.js +1 -1
  778. package/app/node_modules/caniuse-lite/data/features/css-canvas.js +1 -1
  779. package/app/node_modules/caniuse-lite/data/features/css-caret-color.js +1 -1
  780. package/app/node_modules/caniuse-lite/data/features/css-cascade-layers.js +1 -1
  781. package/app/node_modules/caniuse-lite/data/features/css-cascade-scope.js +1 -1
  782. package/app/node_modules/caniuse-lite/data/features/css-case-insensitive.js +1 -1
  783. package/app/node_modules/caniuse-lite/data/features/css-clip-path.js +1 -1
  784. package/app/node_modules/caniuse-lite/data/features/css-color-adjust.js +1 -1
  785. package/app/node_modules/caniuse-lite/data/features/css-color-function.js +1 -1
  786. package/app/node_modules/caniuse-lite/data/features/css-conic-gradients.js +1 -1
  787. package/app/node_modules/caniuse-lite/data/features/css-container-queries-style.js +1 -1
  788. package/app/node_modules/caniuse-lite/data/features/css-container-queries.js +1 -1
  789. package/app/node_modules/caniuse-lite/data/features/css-container-query-units.js +1 -1
  790. package/app/node_modules/caniuse-lite/data/features/css-containment.js +1 -1
  791. package/app/node_modules/caniuse-lite/data/features/css-content-visibility.js +1 -1
  792. package/app/node_modules/caniuse-lite/data/features/css-counters.js +1 -1
  793. package/app/node_modules/caniuse-lite/data/features/css-crisp-edges.js +1 -1
  794. package/app/node_modules/caniuse-lite/data/features/css-cross-fade.js +1 -1
  795. package/app/node_modules/caniuse-lite/data/features/css-default-pseudo.js +1 -1
  796. package/app/node_modules/caniuse-lite/data/features/css-descendant-gtgt.js +1 -1
  797. package/app/node_modules/caniuse-lite/data/features/css-deviceadaptation.js +1 -1
  798. package/app/node_modules/caniuse-lite/data/features/css-dir-pseudo.js +1 -1
  799. package/app/node_modules/caniuse-lite/data/features/css-display-contents.js +1 -1
  800. package/app/node_modules/caniuse-lite/data/features/css-element-function.js +1 -1
  801. package/app/node_modules/caniuse-lite/data/features/css-env-function.js +1 -1
  802. package/app/node_modules/caniuse-lite/data/features/css-exclusions.js +1 -1
  803. package/app/node_modules/caniuse-lite/data/features/css-featurequeries.js +1 -1
  804. package/app/node_modules/caniuse-lite/data/features/css-file-selector-button.js +1 -1
  805. package/app/node_modules/caniuse-lite/data/features/css-filter-function.js +1 -1
  806. package/app/node_modules/caniuse-lite/data/features/css-filters.js +1 -1
  807. package/app/node_modules/caniuse-lite/data/features/css-first-letter.js +1 -1
  808. package/app/node_modules/caniuse-lite/data/features/css-first-line.js +1 -1
  809. package/app/node_modules/caniuse-lite/data/features/css-fixed.js +1 -1
  810. package/app/node_modules/caniuse-lite/data/features/css-focus-visible.js +1 -1
  811. package/app/node_modules/caniuse-lite/data/features/css-focus-within.js +1 -1
  812. package/app/node_modules/caniuse-lite/data/features/css-font-palette.js +1 -1
  813. package/app/node_modules/caniuse-lite/data/features/css-font-rendering-controls.js +1 -1
  814. package/app/node_modules/caniuse-lite/data/features/css-font-stretch.js +1 -1
  815. package/app/node_modules/caniuse-lite/data/features/css-gencontent.js +1 -1
  816. package/app/node_modules/caniuse-lite/data/features/css-gradients.js +1 -1
  817. package/app/node_modules/caniuse-lite/data/features/css-grid-animation.js +1 -1
  818. package/app/node_modules/caniuse-lite/data/features/css-grid-lanes.js +1 -1
  819. package/app/node_modules/caniuse-lite/data/features/css-grid.js +1 -1
  820. package/app/node_modules/caniuse-lite/data/features/css-hanging-punctuation.js +1 -1
  821. package/app/node_modules/caniuse-lite/data/features/css-has.js +1 -1
  822. package/app/node_modules/caniuse-lite/data/features/css-hyphens.js +1 -1
  823. package/app/node_modules/caniuse-lite/data/features/css-if.js +1 -1
  824. package/app/node_modules/caniuse-lite/data/features/css-image-orientation.js +1 -1
  825. package/app/node_modules/caniuse-lite/data/features/css-image-set.js +1 -1
  826. package/app/node_modules/caniuse-lite/data/features/css-in-out-of-range.js +1 -1
  827. package/app/node_modules/caniuse-lite/data/features/css-indeterminate-pseudo.js +1 -1
  828. package/app/node_modules/caniuse-lite/data/features/css-initial-letter.js +1 -1
  829. package/app/node_modules/caniuse-lite/data/features/css-initial-value.js +1 -1
  830. package/app/node_modules/caniuse-lite/data/features/css-lch-lab.js +1 -1
  831. package/app/node_modules/caniuse-lite/data/features/css-letter-spacing.js +1 -1
  832. package/app/node_modules/caniuse-lite/data/features/css-line-clamp.js +1 -1
  833. package/app/node_modules/caniuse-lite/data/features/css-logical-props.js +1 -1
  834. package/app/node_modules/caniuse-lite/data/features/css-marker-pseudo.js +1 -1
  835. package/app/node_modules/caniuse-lite/data/features/css-masks.js +1 -1
  836. package/app/node_modules/caniuse-lite/data/features/css-matches-pseudo.js +1 -1
  837. package/app/node_modules/caniuse-lite/data/features/css-math-functions.js +1 -1
  838. package/app/node_modules/caniuse-lite/data/features/css-media-interaction.js +1 -1
  839. package/app/node_modules/caniuse-lite/data/features/css-media-range-syntax.js +1 -1
  840. package/app/node_modules/caniuse-lite/data/features/css-media-resolution.js +1 -1
  841. package/app/node_modules/caniuse-lite/data/features/css-media-scripting.js +1 -1
  842. package/app/node_modules/caniuse-lite/data/features/css-mediaqueries.js +1 -1
  843. package/app/node_modules/caniuse-lite/data/features/css-mixblendmode.js +1 -1
  844. package/app/node_modules/caniuse-lite/data/features/css-module-scripts.js +1 -1
  845. package/app/node_modules/caniuse-lite/data/features/css-motion-paths.js +1 -1
  846. package/app/node_modules/caniuse-lite/data/features/css-namespaces.js +1 -1
  847. package/app/node_modules/caniuse-lite/data/features/css-nesting.js +1 -1
  848. package/app/node_modules/caniuse-lite/data/features/css-not-sel-list.js +1 -1
  849. package/app/node_modules/caniuse-lite/data/features/css-nth-child-of.js +1 -1
  850. package/app/node_modules/caniuse-lite/data/features/css-opacity.js +1 -1
  851. package/app/node_modules/caniuse-lite/data/features/css-optional-pseudo.js +1 -1
  852. package/app/node_modules/caniuse-lite/data/features/css-overflow-anchor.js +1 -1
  853. package/app/node_modules/caniuse-lite/data/features/css-overflow-overlay.js +1 -1
  854. package/app/node_modules/caniuse-lite/data/features/css-overflow.js +1 -1
  855. package/app/node_modules/caniuse-lite/data/features/css-overscroll-behavior.js +1 -1
  856. package/app/node_modules/caniuse-lite/data/features/css-page-break.js +1 -1
  857. package/app/node_modules/caniuse-lite/data/features/css-paged-media.js +1 -1
  858. package/app/node_modules/caniuse-lite/data/features/css-paint-api.js +1 -1
  859. package/app/node_modules/caniuse-lite/data/features/css-placeholder-shown.js +1 -1
  860. package/app/node_modules/caniuse-lite/data/features/css-placeholder.js +1 -1
  861. package/app/node_modules/caniuse-lite/data/features/css-print-color-adjust.js +1 -1
  862. package/app/node_modules/caniuse-lite/data/features/css-read-only-write.js +1 -1
  863. package/app/node_modules/caniuse-lite/data/features/css-rebeccapurple.js +1 -1
  864. package/app/node_modules/caniuse-lite/data/features/css-reflections.js +1 -1
  865. package/app/node_modules/caniuse-lite/data/features/css-regions.js +1 -1
  866. package/app/node_modules/caniuse-lite/data/features/css-relative-colors.js +1 -1
  867. package/app/node_modules/caniuse-lite/data/features/css-repeating-gradients.js +1 -1
  868. package/app/node_modules/caniuse-lite/data/features/css-resize.js +1 -1
  869. package/app/node_modules/caniuse-lite/data/features/css-revert-value.js +1 -1
  870. package/app/node_modules/caniuse-lite/data/features/css-rrggbbaa.js +1 -1
  871. package/app/node_modules/caniuse-lite/data/features/css-scroll-behavior.js +1 -1
  872. package/app/node_modules/caniuse-lite/data/features/css-scrollbar.js +1 -1
  873. package/app/node_modules/caniuse-lite/data/features/css-sel2.js +1 -1
  874. package/app/node_modules/caniuse-lite/data/features/css-sel3.js +1 -1
  875. package/app/node_modules/caniuse-lite/data/features/css-selection.js +1 -1
  876. package/app/node_modules/caniuse-lite/data/features/css-shapes.js +1 -1
  877. package/app/node_modules/caniuse-lite/data/features/css-snappoints.js +1 -1
  878. package/app/node_modules/caniuse-lite/data/features/css-sticky.js +1 -1
  879. package/app/node_modules/caniuse-lite/data/features/css-subgrid.js +1 -1
  880. package/app/node_modules/caniuse-lite/data/features/css-supports-api.js +1 -1
  881. package/app/node_modules/caniuse-lite/data/features/css-table.js +1 -1
  882. package/app/node_modules/caniuse-lite/data/features/css-text-align-last.js +1 -1
  883. package/app/node_modules/caniuse-lite/data/features/css-text-box-trim.js +1 -1
  884. package/app/node_modules/caniuse-lite/data/features/css-text-indent.js +1 -1
  885. package/app/node_modules/caniuse-lite/data/features/css-text-justify.js +1 -1
  886. package/app/node_modules/caniuse-lite/data/features/css-text-orientation.js +1 -1
  887. package/app/node_modules/caniuse-lite/data/features/css-text-spacing.js +1 -1
  888. package/app/node_modules/caniuse-lite/data/features/css-text-wrap-balance.js +1 -1
  889. package/app/node_modules/caniuse-lite/data/features/css-textshadow.js +1 -1
  890. package/app/node_modules/caniuse-lite/data/features/css-touch-action.js +1 -1
  891. package/app/node_modules/caniuse-lite/data/features/css-transitions.js +1 -1
  892. package/app/node_modules/caniuse-lite/data/features/css-unicode-bidi.js +1 -1
  893. package/app/node_modules/caniuse-lite/data/features/css-unset-value.js +1 -1
  894. package/app/node_modules/caniuse-lite/data/features/css-variables.js +1 -1
  895. package/app/node_modules/caniuse-lite/data/features/css-when-else.js +1 -1
  896. package/app/node_modules/caniuse-lite/data/features/css-widows-orphans.js +1 -1
  897. package/app/node_modules/caniuse-lite/data/features/css-width-stretch.js +1 -1
  898. package/app/node_modules/caniuse-lite/data/features/css-writing-mode.js +1 -1
  899. package/app/node_modules/caniuse-lite/data/features/css-zoom.js +1 -1
  900. package/app/node_modules/caniuse-lite/data/features/css3-attr.js +1 -1
  901. package/app/node_modules/caniuse-lite/data/features/css3-boxsizing.js +1 -1
  902. package/app/node_modules/caniuse-lite/data/features/css3-colors.js +1 -1
  903. package/app/node_modules/caniuse-lite/data/features/css3-cursors-grab.js +1 -1
  904. package/app/node_modules/caniuse-lite/data/features/css3-cursors-newer.js +1 -1
  905. package/app/node_modules/caniuse-lite/data/features/css3-cursors.js +1 -1
  906. package/app/node_modules/caniuse-lite/data/features/css3-tabsize.js +1 -1
  907. package/app/node_modules/caniuse-lite/data/features/currentcolor.js +1 -1
  908. package/app/node_modules/caniuse-lite/data/features/custom-elements.js +1 -1
  909. package/app/node_modules/caniuse-lite/data/features/custom-elementsv1.js +1 -1
  910. package/app/node_modules/caniuse-lite/data/features/customevent.js +1 -1
  911. package/app/node_modules/caniuse-lite/data/features/customizable-select.js +1 -1
  912. package/app/node_modules/caniuse-lite/data/features/datalist.js +1 -1
  913. package/app/node_modules/caniuse-lite/data/features/dataset.js +1 -1
  914. package/app/node_modules/caniuse-lite/data/features/datauri.js +1 -1
  915. package/app/node_modules/caniuse-lite/data/features/date-tolocaledatestring.js +1 -1
  916. package/app/node_modules/caniuse-lite/data/features/declarative-shadow-dom.js +1 -1
  917. package/app/node_modules/caniuse-lite/data/features/decorators.js +1 -1
  918. package/app/node_modules/caniuse-lite/data/features/details.js +1 -1
  919. package/app/node_modules/caniuse-lite/data/features/deviceorientation.js +1 -1
  920. package/app/node_modules/caniuse-lite/data/features/devicepixelratio.js +1 -1
  921. package/app/node_modules/caniuse-lite/data/features/dialog.js +1 -1
  922. package/app/node_modules/caniuse-lite/data/features/dispatchevent.js +1 -1
  923. package/app/node_modules/caniuse-lite/data/features/dnssec.js +1 -1
  924. package/app/node_modules/caniuse-lite/data/features/do-not-track.js +1 -1
  925. package/app/node_modules/caniuse-lite/data/features/document-currentscript.js +1 -1
  926. package/app/node_modules/caniuse-lite/data/features/document-evaluate-xpath.js +1 -1
  927. package/app/node_modules/caniuse-lite/data/features/document-execcommand.js +1 -1
  928. package/app/node_modules/caniuse-lite/data/features/document-policy.js +1 -1
  929. package/app/node_modules/caniuse-lite/data/features/document-scrollingelement.js +1 -1
  930. package/app/node_modules/caniuse-lite/data/features/documenthead.js +1 -1
  931. package/app/node_modules/caniuse-lite/data/features/dom-manip-convenience.js +1 -1
  932. package/app/node_modules/caniuse-lite/data/features/dom-range.js +1 -1
  933. package/app/node_modules/caniuse-lite/data/features/domcontentloaded.js +1 -1
  934. package/app/node_modules/caniuse-lite/data/features/dommatrix.js +1 -1
  935. package/app/node_modules/caniuse-lite/data/features/download.js +1 -1
  936. package/app/node_modules/caniuse-lite/data/features/dragndrop.js +1 -1
  937. package/app/node_modules/caniuse-lite/data/features/element-closest.js +1 -1
  938. package/app/node_modules/caniuse-lite/data/features/element-from-point.js +1 -1
  939. package/app/node_modules/caniuse-lite/data/features/element-scroll-methods.js +1 -1
  940. package/app/node_modules/caniuse-lite/data/features/eme.js +1 -1
  941. package/app/node_modules/caniuse-lite/data/features/eot.js +1 -1
  942. package/app/node_modules/caniuse-lite/data/features/es5.js +1 -1
  943. package/app/node_modules/caniuse-lite/data/features/es6-class.js +1 -1
  944. package/app/node_modules/caniuse-lite/data/features/es6-generators.js +1 -1
  945. package/app/node_modules/caniuse-lite/data/features/es6-module-dynamic-import.js +1 -1
  946. package/app/node_modules/caniuse-lite/data/features/es6-module.js +1 -1
  947. package/app/node_modules/caniuse-lite/data/features/es6-number.js +1 -1
  948. package/app/node_modules/caniuse-lite/data/features/es6-string-includes.js +1 -1
  949. package/app/node_modules/caniuse-lite/data/features/es6.js +1 -1
  950. package/app/node_modules/caniuse-lite/data/features/eventsource.js +1 -1
  951. package/app/node_modules/caniuse-lite/data/features/extended-system-fonts.js +1 -1
  952. package/app/node_modules/caniuse-lite/data/features/feature-policy.js +1 -1
  953. package/app/node_modules/caniuse-lite/data/features/fetch.js +1 -1
  954. package/app/node_modules/caniuse-lite/data/features/fieldset-disabled.js +1 -1
  955. package/app/node_modules/caniuse-lite/data/features/fileapi.js +1 -1
  956. package/app/node_modules/caniuse-lite/data/features/filereader.js +1 -1
  957. package/app/node_modules/caniuse-lite/data/features/filereadersync.js +1 -1
  958. package/app/node_modules/caniuse-lite/data/features/filesystem.js +1 -1
  959. package/app/node_modules/caniuse-lite/data/features/flac.js +1 -1
  960. package/app/node_modules/caniuse-lite/data/features/flexbox-gap.js +1 -1
  961. package/app/node_modules/caniuse-lite/data/features/flexbox.js +1 -1
  962. package/app/node_modules/caniuse-lite/data/features/flow-root.js +1 -1
  963. package/app/node_modules/caniuse-lite/data/features/focusin-focusout-events.js +1 -1
  964. package/app/node_modules/caniuse-lite/data/features/font-family-system-ui.js +1 -1
  965. package/app/node_modules/caniuse-lite/data/features/font-feature.js +1 -1
  966. package/app/node_modules/caniuse-lite/data/features/font-kerning.js +1 -1
  967. package/app/node_modules/caniuse-lite/data/features/font-loading.js +1 -1
  968. package/app/node_modules/caniuse-lite/data/features/font-size-adjust.js +1 -1
  969. package/app/node_modules/caniuse-lite/data/features/font-smooth.js +1 -1
  970. package/app/node_modules/caniuse-lite/data/features/font-unicode-range.js +1 -1
  971. package/app/node_modules/caniuse-lite/data/features/font-variant-alternates.js +1 -1
  972. package/app/node_modules/caniuse-lite/data/features/font-variant-numeric.js +1 -1
  973. package/app/node_modules/caniuse-lite/data/features/fontface.js +1 -1
  974. package/app/node_modules/caniuse-lite/data/features/form-attribute.js +1 -1
  975. package/app/node_modules/caniuse-lite/data/features/form-submit-attributes.js +1 -1
  976. package/app/node_modules/caniuse-lite/data/features/form-validation.js +1 -1
  977. package/app/node_modules/caniuse-lite/data/features/forms.js +1 -1
  978. package/app/node_modules/caniuse-lite/data/features/fullscreen.js +1 -1
  979. package/app/node_modules/caniuse-lite/data/features/gamepad.js +1 -1
  980. package/app/node_modules/caniuse-lite/data/features/geolocation.js +1 -1
  981. package/app/node_modules/caniuse-lite/data/features/getboundingclientrect.js +1 -1
  982. package/app/node_modules/caniuse-lite/data/features/getcomputedstyle.js +1 -1
  983. package/app/node_modules/caniuse-lite/data/features/getelementsbyclassname.js +1 -1
  984. package/app/node_modules/caniuse-lite/data/features/getrandomvalues.js +1 -1
  985. package/app/node_modules/caniuse-lite/data/features/gyroscope.js +1 -1
  986. package/app/node_modules/caniuse-lite/data/features/hardwareconcurrency.js +1 -1
  987. package/app/node_modules/caniuse-lite/data/features/hashchange.js +1 -1
  988. package/app/node_modules/caniuse-lite/data/features/heif.js +1 -1
  989. package/app/node_modules/caniuse-lite/data/features/hevc.js +1 -1
  990. package/app/node_modules/caniuse-lite/data/features/hidden.js +1 -1
  991. package/app/node_modules/caniuse-lite/data/features/high-resolution-time.js +1 -1
  992. package/app/node_modules/caniuse-lite/data/features/history.js +1 -1
  993. package/app/node_modules/caniuse-lite/data/features/html-media-capture.js +1 -1
  994. package/app/node_modules/caniuse-lite/data/features/html5semantic.js +1 -1
  995. package/app/node_modules/caniuse-lite/data/features/http-live-streaming.js +1 -1
  996. package/app/node_modules/caniuse-lite/data/features/http2.js +1 -1
  997. package/app/node_modules/caniuse-lite/data/features/http3.js +1 -1
  998. package/app/node_modules/caniuse-lite/data/features/iframe-sandbox.js +1 -1
  999. package/app/node_modules/caniuse-lite/data/features/iframe-seamless.js +1 -1
  1000. package/app/node_modules/caniuse-lite/data/features/iframe-srcdoc.js +1 -1
  1001. package/app/node_modules/caniuse-lite/data/features/imagecapture.js +1 -1
  1002. package/app/node_modules/caniuse-lite/data/features/ime.js +1 -1
  1003. package/app/node_modules/caniuse-lite/data/features/img-naturalwidth-naturalheight.js +1 -1
  1004. package/app/node_modules/caniuse-lite/data/features/import-maps.js +1 -1
  1005. package/app/node_modules/caniuse-lite/data/features/imports.js +1 -1
  1006. package/app/node_modules/caniuse-lite/data/features/indeterminate-checkbox.js +1 -1
  1007. package/app/node_modules/caniuse-lite/data/features/indexeddb.js +1 -1
  1008. package/app/node_modules/caniuse-lite/data/features/indexeddb2.js +1 -1
  1009. package/app/node_modules/caniuse-lite/data/features/inline-block.js +1 -1
  1010. package/app/node_modules/caniuse-lite/data/features/innertext.js +1 -1
  1011. package/app/node_modules/caniuse-lite/data/features/input-autocomplete-onoff.js +1 -1
  1012. package/app/node_modules/caniuse-lite/data/features/input-color.js +1 -1
  1013. package/app/node_modules/caniuse-lite/data/features/input-datetime.js +1 -1
  1014. package/app/node_modules/caniuse-lite/data/features/input-email-tel-url.js +1 -1
  1015. package/app/node_modules/caniuse-lite/data/features/input-event.js +1 -1
  1016. package/app/node_modules/caniuse-lite/data/features/input-file-accept.js +1 -1
  1017. package/app/node_modules/caniuse-lite/data/features/input-file-directory.js +1 -1
  1018. package/app/node_modules/caniuse-lite/data/features/input-file-multiple.js +1 -1
  1019. package/app/node_modules/caniuse-lite/data/features/input-inputmode.js +1 -1
  1020. package/app/node_modules/caniuse-lite/data/features/input-minlength.js +1 -1
  1021. package/app/node_modules/caniuse-lite/data/features/input-number.js +1 -1
  1022. package/app/node_modules/caniuse-lite/data/features/input-pattern.js +1 -1
  1023. package/app/node_modules/caniuse-lite/data/features/input-placeholder.js +1 -1
  1024. package/app/node_modules/caniuse-lite/data/features/input-range.js +1 -1
  1025. package/app/node_modules/caniuse-lite/data/features/input-search.js +1 -1
  1026. package/app/node_modules/caniuse-lite/data/features/input-selection.js +1 -1
  1027. package/app/node_modules/caniuse-lite/data/features/insert-adjacent.js +1 -1
  1028. package/app/node_modules/caniuse-lite/data/features/insertadjacenthtml.js +1 -1
  1029. package/app/node_modules/caniuse-lite/data/features/internationalization.js +1 -1
  1030. package/app/node_modules/caniuse-lite/data/features/intersectionobserver-v2.js +1 -1
  1031. package/app/node_modules/caniuse-lite/data/features/intersectionobserver.js +1 -1
  1032. package/app/node_modules/caniuse-lite/data/features/intl-pluralrules.js +1 -1
  1033. package/app/node_modules/caniuse-lite/data/features/intrinsic-width.js +1 -1
  1034. package/app/node_modules/caniuse-lite/data/features/jpeg2000.js +1 -1
  1035. package/app/node_modules/caniuse-lite/data/features/jpegxl.js +1 -1
  1036. package/app/node_modules/caniuse-lite/data/features/jpegxr.js +1 -1
  1037. package/app/node_modules/caniuse-lite/data/features/js-regexp-lookbehind.js +1 -1
  1038. package/app/node_modules/caniuse-lite/data/features/json.js +1 -1
  1039. package/app/node_modules/caniuse-lite/data/features/justify-content-space-evenly.js +1 -1
  1040. package/app/node_modules/caniuse-lite/data/features/kerning-pairs-ligatures.js +1 -1
  1041. package/app/node_modules/caniuse-lite/data/features/keyboardevent-charcode.js +1 -1
  1042. package/app/node_modules/caniuse-lite/data/features/keyboardevent-code.js +1 -1
  1043. package/app/node_modules/caniuse-lite/data/features/keyboardevent-getmodifierstate.js +1 -1
  1044. package/app/node_modules/caniuse-lite/data/features/keyboardevent-key.js +1 -1
  1045. package/app/node_modules/caniuse-lite/data/features/keyboardevent-location.js +1 -1
  1046. package/app/node_modules/caniuse-lite/data/features/keyboardevent-which.js +1 -1
  1047. package/app/node_modules/caniuse-lite/data/features/lazyload.js +1 -1
  1048. package/app/node_modules/caniuse-lite/data/features/let.js +1 -1
  1049. package/app/node_modules/caniuse-lite/data/features/link-icon-png.js +1 -1
  1050. package/app/node_modules/caniuse-lite/data/features/link-icon-svg.js +1 -1
  1051. package/app/node_modules/caniuse-lite/data/features/link-rel-dns-prefetch.js +1 -1
  1052. package/app/node_modules/caniuse-lite/data/features/link-rel-modulepreload.js +1 -1
  1053. package/app/node_modules/caniuse-lite/data/features/link-rel-preconnect.js +1 -1
  1054. package/app/node_modules/caniuse-lite/data/features/link-rel-prefetch.js +1 -1
  1055. package/app/node_modules/caniuse-lite/data/features/link-rel-preload.js +1 -1
  1056. package/app/node_modules/caniuse-lite/data/features/link-rel-prerender.js +1 -1
  1057. package/app/node_modules/caniuse-lite/data/features/loading-lazy-attr.js +1 -1
  1058. package/app/node_modules/caniuse-lite/data/features/loading-lazy-media.js +1 -1
  1059. package/app/node_modules/caniuse-lite/data/features/localecompare.js +1 -1
  1060. package/app/node_modules/caniuse-lite/data/features/magnetometer.js +1 -1
  1061. package/app/node_modules/caniuse-lite/data/features/matchesselector.js +1 -1
  1062. package/app/node_modules/caniuse-lite/data/features/matchmedia.js +1 -1
  1063. package/app/node_modules/caniuse-lite/data/features/mathml.js +1 -1
  1064. package/app/node_modules/caniuse-lite/data/features/maxlength.js +1 -1
  1065. package/app/node_modules/caniuse-lite/data/features/mdn-css-backdrop-pseudo-element.js +1 -1
  1066. package/app/node_modules/caniuse-lite/data/features/mdn-css-unicode-bidi-isolate-override.js +1 -1
  1067. package/app/node_modules/caniuse-lite/data/features/mdn-css-unicode-bidi-isolate.js +1 -1
  1068. package/app/node_modules/caniuse-lite/data/features/mdn-css-unicode-bidi-plaintext.js +1 -1
  1069. package/app/node_modules/caniuse-lite/data/features/mdn-text-decoration-color.js +1 -1
  1070. package/app/node_modules/caniuse-lite/data/features/mdn-text-decoration-line.js +1 -1
  1071. package/app/node_modules/caniuse-lite/data/features/mdn-text-decoration-shorthand.js +1 -1
  1072. package/app/node_modules/caniuse-lite/data/features/mdn-text-decoration-style.js +1 -1
  1073. package/app/node_modules/caniuse-lite/data/features/media-fragments.js +1 -1
  1074. package/app/node_modules/caniuse-lite/data/features/mediacapture-fromelement.js +1 -1
  1075. package/app/node_modules/caniuse-lite/data/features/mediarecorder.js +1 -1
  1076. package/app/node_modules/caniuse-lite/data/features/mediasource.js +1 -1
  1077. package/app/node_modules/caniuse-lite/data/features/menu.js +1 -1
  1078. package/app/node_modules/caniuse-lite/data/features/meta-theme-color.js +1 -1
  1079. package/app/node_modules/caniuse-lite/data/features/meter.js +1 -1
  1080. package/app/node_modules/caniuse-lite/data/features/midi.js +1 -1
  1081. package/app/node_modules/caniuse-lite/data/features/minmaxwh.js +1 -1
  1082. package/app/node_modules/caniuse-lite/data/features/mp3.js +1 -1
  1083. package/app/node_modules/caniuse-lite/data/features/mpeg-dash.js +1 -1
  1084. package/app/node_modules/caniuse-lite/data/features/mpeg4.js +1 -1
  1085. package/app/node_modules/caniuse-lite/data/features/multibackgrounds.js +1 -1
  1086. package/app/node_modules/caniuse-lite/data/features/multicolumn.js +1 -1
  1087. package/app/node_modules/caniuse-lite/data/features/mutation-events.js +1 -1
  1088. package/app/node_modules/caniuse-lite/data/features/mutationobserver.js +1 -1
  1089. package/app/node_modules/caniuse-lite/data/features/namevalue-storage.js +1 -1
  1090. package/app/node_modules/caniuse-lite/data/features/native-filesystem-api.js +1 -1
  1091. package/app/node_modules/caniuse-lite/data/features/nav-timing.js +1 -1
  1092. package/app/node_modules/caniuse-lite/data/features/netinfo.js +1 -1
  1093. package/app/node_modules/caniuse-lite/data/features/notifications.js +1 -1
  1094. package/app/node_modules/caniuse-lite/data/features/object-entries.js +1 -1
  1095. package/app/node_modules/caniuse-lite/data/features/object-fit.js +1 -1
  1096. package/app/node_modules/caniuse-lite/data/features/object-observe.js +1 -1
  1097. package/app/node_modules/caniuse-lite/data/features/object-values.js +1 -1
  1098. package/app/node_modules/caniuse-lite/data/features/objectrtc.js +1 -1
  1099. package/app/node_modules/caniuse-lite/data/features/offline-apps.js +1 -1
  1100. package/app/node_modules/caniuse-lite/data/features/offscreencanvas.js +1 -1
  1101. package/app/node_modules/caniuse-lite/data/features/ogg-vorbis.js +1 -1
  1102. package/app/node_modules/caniuse-lite/data/features/ogv.js +1 -1
  1103. package/app/node_modules/caniuse-lite/data/features/ol-reversed.js +1 -1
  1104. package/app/node_modules/caniuse-lite/data/features/once-event-listener.js +1 -1
  1105. package/app/node_modules/caniuse-lite/data/features/online-status.js +1 -1
  1106. package/app/node_modules/caniuse-lite/data/features/opus.js +1 -1
  1107. package/app/node_modules/caniuse-lite/data/features/orientation-sensor.js +1 -1
  1108. package/app/node_modules/caniuse-lite/data/features/outline.js +1 -1
  1109. package/app/node_modules/caniuse-lite/data/features/pad-start-end.js +1 -1
  1110. package/app/node_modules/caniuse-lite/data/features/page-transition-events.js +1 -1
  1111. package/app/node_modules/caniuse-lite/data/features/pagevisibility.js +1 -1
  1112. package/app/node_modules/caniuse-lite/data/features/passive-event-listener.js +1 -1
  1113. package/app/node_modules/caniuse-lite/data/features/passkeys.js +1 -1
  1114. package/app/node_modules/caniuse-lite/data/features/passwordrules.js +1 -1
  1115. package/app/node_modules/caniuse-lite/data/features/path2d.js +1 -1
  1116. package/app/node_modules/caniuse-lite/data/features/payment-request.js +1 -1
  1117. package/app/node_modules/caniuse-lite/data/features/pdf-viewer.js +1 -1
  1118. package/app/node_modules/caniuse-lite/data/features/permissions-api.js +1 -1
  1119. package/app/node_modules/caniuse-lite/data/features/permissions-policy.js +1 -1
  1120. package/app/node_modules/caniuse-lite/data/features/picture-in-picture.js +1 -1
  1121. package/app/node_modules/caniuse-lite/data/features/picture.js +1 -1
  1122. package/app/node_modules/caniuse-lite/data/features/ping.js +1 -1
  1123. package/app/node_modules/caniuse-lite/data/features/png-alpha.js +1 -1
  1124. package/app/node_modules/caniuse-lite/data/features/pointer-events.js +1 -1
  1125. package/app/node_modules/caniuse-lite/data/features/pointer.js +1 -1
  1126. package/app/node_modules/caniuse-lite/data/features/pointerlock.js +1 -1
  1127. package/app/node_modules/caniuse-lite/data/features/portals.js +1 -1
  1128. package/app/node_modules/caniuse-lite/data/features/prefers-color-scheme.js +1 -1
  1129. package/app/node_modules/caniuse-lite/data/features/prefers-reduced-motion.js +1 -1
  1130. package/app/node_modules/caniuse-lite/data/features/progress.js +1 -1
  1131. package/app/node_modules/caniuse-lite/data/features/promise-finally.js +1 -1
  1132. package/app/node_modules/caniuse-lite/data/features/promises.js +1 -1
  1133. package/app/node_modules/caniuse-lite/data/features/proximity.js +1 -1
  1134. package/app/node_modules/caniuse-lite/data/features/proxy.js +1 -1
  1135. package/app/node_modules/caniuse-lite/data/features/publickeypinning.js +1 -1
  1136. package/app/node_modules/caniuse-lite/data/features/push-api.js +1 -1
  1137. package/app/node_modules/caniuse-lite/data/features/queryselector.js +1 -1
  1138. package/app/node_modules/caniuse-lite/data/features/readonly-attr.js +1 -1
  1139. package/app/node_modules/caniuse-lite/data/features/referrer-policy.js +1 -1
  1140. package/app/node_modules/caniuse-lite/data/features/registerprotocolhandler.js +1 -1
  1141. package/app/node_modules/caniuse-lite/data/features/rel-noopener.js +1 -1
  1142. package/app/node_modules/caniuse-lite/data/features/rel-noreferrer.js +1 -1
  1143. package/app/node_modules/caniuse-lite/data/features/rellist.js +1 -1
  1144. package/app/node_modules/caniuse-lite/data/features/rem.js +1 -1
  1145. package/app/node_modules/caniuse-lite/data/features/requestanimationframe.js +1 -1
  1146. package/app/node_modules/caniuse-lite/data/features/requestidlecallback.js +1 -1
  1147. package/app/node_modules/caniuse-lite/data/features/resizeobserver.js +1 -1
  1148. package/app/node_modules/caniuse-lite/data/features/resource-timing.js +1 -1
  1149. package/app/node_modules/caniuse-lite/data/features/rest-parameters.js +1 -1
  1150. package/app/node_modules/caniuse-lite/data/features/rtcpeerconnection.js +1 -1
  1151. package/app/node_modules/caniuse-lite/data/features/ruby.js +1 -1
  1152. package/app/node_modules/caniuse-lite/data/features/run-in.js +1 -1
  1153. package/app/node_modules/caniuse-lite/data/features/same-site-cookie-attribute.js +1 -1
  1154. package/app/node_modules/caniuse-lite/data/features/screen-orientation.js +1 -1
  1155. package/app/node_modules/caniuse-lite/data/features/script-async.js +1 -1
  1156. package/app/node_modules/caniuse-lite/data/features/script-defer.js +1 -1
  1157. package/app/node_modules/caniuse-lite/data/features/scrollintoview.js +1 -1
  1158. package/app/node_modules/caniuse-lite/data/features/scrollintoviewifneeded.js +1 -1
  1159. package/app/node_modules/caniuse-lite/data/features/sdch.js +1 -1
  1160. package/app/node_modules/caniuse-lite/data/features/selection-api.js +1 -1
  1161. package/app/node_modules/caniuse-lite/data/features/server-timing.js +1 -1
  1162. package/app/node_modules/caniuse-lite/data/features/serviceworkers.js +1 -1
  1163. package/app/node_modules/caniuse-lite/data/features/setimmediate.js +1 -1
  1164. package/app/node_modules/caniuse-lite/data/features/shadowdom.js +1 -1
  1165. package/app/node_modules/caniuse-lite/data/features/shadowdomv1.js +1 -1
  1166. package/app/node_modules/caniuse-lite/data/features/sharedarraybuffer.js +1 -1
  1167. package/app/node_modules/caniuse-lite/data/features/sharedworkers.js +1 -1
  1168. package/app/node_modules/caniuse-lite/data/features/sni.js +1 -1
  1169. package/app/node_modules/caniuse-lite/data/features/spdy.js +1 -1
  1170. package/app/node_modules/caniuse-lite/data/features/speech-recognition.js +1 -1
  1171. package/app/node_modules/caniuse-lite/data/features/speech-synthesis.js +1 -1
  1172. package/app/node_modules/caniuse-lite/data/features/spellcheck-attribute.js +1 -1
  1173. package/app/node_modules/caniuse-lite/data/features/sql-storage.js +1 -1
  1174. package/app/node_modules/caniuse-lite/data/features/srcset.js +1 -1
  1175. package/app/node_modules/caniuse-lite/data/features/stream.js +1 -1
  1176. package/app/node_modules/caniuse-lite/data/features/streams.js +1 -1
  1177. package/app/node_modules/caniuse-lite/data/features/stricttransportsecurity.js +1 -1
  1178. package/app/node_modules/caniuse-lite/data/features/style-scoped.js +1 -1
  1179. package/app/node_modules/caniuse-lite/data/features/subresource-bundling.js +1 -1
  1180. package/app/node_modules/caniuse-lite/data/features/subresource-integrity.js +1 -1
  1181. package/app/node_modules/caniuse-lite/data/features/svg-css.js +1 -1
  1182. package/app/node_modules/caniuse-lite/data/features/svg-filters.js +1 -1
  1183. package/app/node_modules/caniuse-lite/data/features/svg-fonts.js +1 -1
  1184. package/app/node_modules/caniuse-lite/data/features/svg-fragment.js +1 -1
  1185. package/app/node_modules/caniuse-lite/data/features/svg-html.js +1 -1
  1186. package/app/node_modules/caniuse-lite/data/features/svg-html5.js +1 -1
  1187. package/app/node_modules/caniuse-lite/data/features/svg-img.js +1 -1
  1188. package/app/node_modules/caniuse-lite/data/features/svg-smil.js +1 -1
  1189. package/app/node_modules/caniuse-lite/data/features/svg.js +1 -1
  1190. package/app/node_modules/caniuse-lite/data/features/sxg.js +1 -1
  1191. package/app/node_modules/caniuse-lite/data/features/tabindex-attr.js +1 -1
  1192. package/app/node_modules/caniuse-lite/data/features/template-literals.js +1 -1
  1193. package/app/node_modules/caniuse-lite/data/features/template.js +1 -1
  1194. package/app/node_modules/caniuse-lite/data/features/temporal.js +1 -1
  1195. package/app/node_modules/caniuse-lite/data/features/testfeat.js +1 -1
  1196. package/app/node_modules/caniuse-lite/data/features/text-decoration.js +1 -1
  1197. package/app/node_modules/caniuse-lite/data/features/text-emphasis.js +1 -1
  1198. package/app/node_modules/caniuse-lite/data/features/text-overflow.js +1 -1
  1199. package/app/node_modules/caniuse-lite/data/features/text-size-adjust.js +1 -1
  1200. package/app/node_modules/caniuse-lite/data/features/text-stroke.js +1 -1
  1201. package/app/node_modules/caniuse-lite/data/features/textcontent.js +1 -1
  1202. package/app/node_modules/caniuse-lite/data/features/textencoder.js +1 -1
  1203. package/app/node_modules/caniuse-lite/data/features/tls1-1.js +1 -1
  1204. package/app/node_modules/caniuse-lite/data/features/tls1-2.js +1 -1
  1205. package/app/node_modules/caniuse-lite/data/features/tls1-3.js +1 -1
  1206. package/app/node_modules/caniuse-lite/data/features/touch.js +1 -1
  1207. package/app/node_modules/caniuse-lite/data/features/transforms2d.js +1 -1
  1208. package/app/node_modules/caniuse-lite/data/features/transforms3d.js +1 -1
  1209. package/app/node_modules/caniuse-lite/data/features/trusted-types.js +1 -1
  1210. package/app/node_modules/caniuse-lite/data/features/ttf.js +1 -1
  1211. package/app/node_modules/caniuse-lite/data/features/typedarrays.js +1 -1
  1212. package/app/node_modules/caniuse-lite/data/features/u2f.js +1 -1
  1213. package/app/node_modules/caniuse-lite/data/features/unhandledrejection.js +1 -1
  1214. package/app/node_modules/caniuse-lite/data/features/upgradeinsecurerequests.js +1 -1
  1215. package/app/node_modules/caniuse-lite/data/features/url-scroll-to-text-fragment.js +1 -1
  1216. package/app/node_modules/caniuse-lite/data/features/url.js +1 -1
  1217. package/app/node_modules/caniuse-lite/data/features/urlsearchparams.js +1 -1
  1218. package/app/node_modules/caniuse-lite/data/features/use-strict.js +1 -1
  1219. package/app/node_modules/caniuse-lite/data/features/user-select-none.js +1 -1
  1220. package/app/node_modules/caniuse-lite/data/features/user-timing.js +1 -1
  1221. package/app/node_modules/caniuse-lite/data/features/variable-fonts.js +1 -1
  1222. package/app/node_modules/caniuse-lite/data/features/vector-effect.js +1 -1
  1223. package/app/node_modules/caniuse-lite/data/features/vibration.js +1 -1
  1224. package/app/node_modules/caniuse-lite/data/features/video.js +1 -1
  1225. package/app/node_modules/caniuse-lite/data/features/videotracks.js +1 -1
  1226. package/app/node_modules/caniuse-lite/data/features/view-transitions.js +1 -1
  1227. package/app/node_modules/caniuse-lite/data/features/viewport-unit-variants.js +1 -1
  1228. package/app/node_modules/caniuse-lite/data/features/viewport-units.js +1 -1
  1229. package/app/node_modules/caniuse-lite/data/features/wai-aria.js +1 -1
  1230. package/app/node_modules/caniuse-lite/data/features/wake-lock.js +1 -1
  1231. package/app/node_modules/caniuse-lite/data/features/wasm-bigint.js +1 -1
  1232. package/app/node_modules/caniuse-lite/data/features/wasm-bulk-memory.js +1 -1
  1233. package/app/node_modules/caniuse-lite/data/features/wasm-extended-const.js +1 -1
  1234. package/app/node_modules/caniuse-lite/data/features/wasm-gc.js +1 -1
  1235. package/app/node_modules/caniuse-lite/data/features/wasm-multi-memory.js +1 -1
  1236. package/app/node_modules/caniuse-lite/data/features/wasm-multi-value.js +1 -1
  1237. package/app/node_modules/caniuse-lite/data/features/wasm-mutable-globals.js +1 -1
  1238. package/app/node_modules/caniuse-lite/data/features/wasm-nontrapping-fptoint.js +1 -1
  1239. package/app/node_modules/caniuse-lite/data/features/wasm-reference-types.js +1 -1
  1240. package/app/node_modules/caniuse-lite/data/features/wasm-relaxed-simd.js +1 -1
  1241. package/app/node_modules/caniuse-lite/data/features/wasm-signext.js +1 -1
  1242. package/app/node_modules/caniuse-lite/data/features/wasm-simd.js +1 -1
  1243. package/app/node_modules/caniuse-lite/data/features/wasm-tail-calls.js +1 -1
  1244. package/app/node_modules/caniuse-lite/data/features/wasm-threads.js +1 -1
  1245. package/app/node_modules/caniuse-lite/data/features/wasm.js +1 -1
  1246. package/app/node_modules/caniuse-lite/data/features/wav.js +1 -1
  1247. package/app/node_modules/caniuse-lite/data/features/wbr-element.js +1 -1
  1248. package/app/node_modules/caniuse-lite/data/features/web-animation.js +1 -1
  1249. package/app/node_modules/caniuse-lite/data/features/web-app-manifest.js +1 -1
  1250. package/app/node_modules/caniuse-lite/data/features/web-bluetooth.js +1 -1
  1251. package/app/node_modules/caniuse-lite/data/features/web-serial.js +1 -1
  1252. package/app/node_modules/caniuse-lite/data/features/web-share.js +1 -1
  1253. package/app/node_modules/caniuse-lite/data/features/webauthn.js +1 -1
  1254. package/app/node_modules/caniuse-lite/data/features/webcodecs.js +1 -1
  1255. package/app/node_modules/caniuse-lite/data/features/webgl.js +1 -1
  1256. package/app/node_modules/caniuse-lite/data/features/webgl2.js +1 -1
  1257. package/app/node_modules/caniuse-lite/data/features/webgpu.js +1 -1
  1258. package/app/node_modules/caniuse-lite/data/features/webhid.js +1 -1
  1259. package/app/node_modules/caniuse-lite/data/features/webkit-user-drag.js +1 -1
  1260. package/app/node_modules/caniuse-lite/data/features/webm.js +1 -1
  1261. package/app/node_modules/caniuse-lite/data/features/webnfc.js +1 -1
  1262. package/app/node_modules/caniuse-lite/data/features/webp.js +1 -1
  1263. package/app/node_modules/caniuse-lite/data/features/websockets.js +1 -1
  1264. package/app/node_modules/caniuse-lite/data/features/webtransport.js +1 -1
  1265. package/app/node_modules/caniuse-lite/data/features/webusb.js +1 -1
  1266. package/app/node_modules/caniuse-lite/data/features/webvr.js +1 -1
  1267. package/app/node_modules/caniuse-lite/data/features/webvtt.js +1 -1
  1268. package/app/node_modules/caniuse-lite/data/features/webworkers.js +1 -1
  1269. package/app/node_modules/caniuse-lite/data/features/webxr.js +1 -1
  1270. package/app/node_modules/caniuse-lite/data/features/will-change.js +1 -1
  1271. package/app/node_modules/caniuse-lite/data/features/woff.js +1 -1
  1272. package/app/node_modules/caniuse-lite/data/features/woff2.js +1 -1
  1273. package/app/node_modules/caniuse-lite/data/features/word-break.js +1 -1
  1274. package/app/node_modules/caniuse-lite/data/features/wordwrap.js +1 -1
  1275. package/app/node_modules/caniuse-lite/data/features/x-doc-messaging.js +1 -1
  1276. package/app/node_modules/caniuse-lite/data/features/x-frame-options.js +1 -1
  1277. package/app/node_modules/caniuse-lite/data/features/xhr2.js +1 -1
  1278. package/app/node_modules/caniuse-lite/data/features/xhtml.js +1 -1
  1279. package/app/node_modules/caniuse-lite/data/features/xhtmlsmil.js +1 -1
  1280. package/app/node_modules/caniuse-lite/data/features/xml-serializer.js +1 -1
  1281. package/app/node_modules/caniuse-lite/data/features/zstd.js +1 -1
  1282. package/app/node_modules/caniuse-lite/package.json +1 -1
  1283. package/app/package.json +1 -1
  1284. package/app/server.js +1 -1
  1285. package/package.json +1 -1
  1286. package/app/.next-cli-build/server/chunks/6105.js +0 -64
  1287. package/app/.next-cli-build/static/chunks/5792-871f5fad4b3167bd.js +0 -64
  1288. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-df8e6ebf63d81fa4.js +0 -1
  1289. package/app/.next-cli-build/static/css/fc5cd911969deefe.css +0 -1
  1290. /package/app/.next-cli-build/static/{HB_LfQdAm7CMiySBZMc98 → VdEFX8bBP1go4KP1wv5Ve}/_buildManifest.js +0 -0
  1291. /package/app/.next-cli-build/static/{HB_LfQdAm7CMiySBZMc98 → VdEFX8bBP1go4KP1wv5Ve}/_ssgManifest.js +0 -0
@@ -1,4 +1,4 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5497],{98:(e,t,r)=>{r.d(t,{default:()=>l});var s=r(95155),a=r(31474);function l({label:e,options:t=[],value:r,onChange:n,placeholder:i="Select an option",error:o,hint:d,disabled:c=!1,required:m=!1,className:u,selectClassName:x,...p}){return(0,s.jsxs)("div",{className:(0,a.cn)("flex flex-col gap-1.5",u),children:[e&&(0,s.jsxs)("label",{className:"text-sm font-medium text-text-main",children:[e,m&&(0,s.jsx)("span",{className:"text-red-500 ml-1",children:"*"})]}),(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsxs)("select",{value:r,onChange:n,disabled:c,className:(0,a.cn)("w-full py-2.5 px-3 pr-10 text-sm text-text-main","bg-surface-2 border border-transparent rounded-[10px] appearance-none","focus:outline-none focus:ring-2 focus:ring-brand-500/30 focus:border-brand-500/40","transition-all duration-150 disabled:opacity-50 disabled:cursor-not-allowed","text-[16px] sm:text-sm",o&&"ring-1 ring-red-500 focus:ring-2 focus:ring-red-500/40 border-red-500/40",x),...p,children:[(0,s.jsx)("option",{value:"",disabled:!0,children:i}),t.map(e=>(0,s.jsx)("option",{value:e.value,children:e.label},e.value))]}),(0,s.jsx)("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none text-text-muted",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"expand_more"})})]}),o&&(0,s.jsxs)("p",{className:"text-xs text-red-500 flex items-center gap-1",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"error"}),o]}),d&&!o&&(0,s.jsx)("p",{className:"text-xs text-text-muted",children:d})]})}},1620:(e,t,r)=>{r.d(t,{D:()=>o});var s=r(12115),a=r(90085);function l(e){let t=window.matchMedia("(prefers-color-scheme: dark)");return t.addEventListener("change",e),()=>t.removeEventListener("change",e)}function n(){return window.matchMedia("(prefers-color-scheme: dark)").matches}function i(){return!1}function o(){let{theme:e,setTheme:t,toggleTheme:r,initTheme:o}=(0,a.A)(),d=(0,s.useSyncExternalStore)(l,n,i);(0,s.useEffect)(()=>{o()},[o]),(0,s.useEffect)(()=>{if("system"!==e)return;let t=window.matchMedia("(prefers-color-scheme: dark)"),r=()=>o();return t.addEventListener("change",r),()=>t.removeEventListener("change",r)},[e,o]);let c="dark"===e||"system"===e&&d;return{theme:e,setTheme:t,toggleTheme:r,isDark:c}}},4809:(e,t,r)=>{r.d(t,{default:()=>ea});var s=r(95155),a=r(12115),l=r(73321),n=r(52679),i=r(56061),o=r(84588),d=r(14051),c=r.n(d);let m=(e,t=0)=>{let r=Number(e);return Number.isFinite(r)?r:t},u=e=>new Intl.NumberFormat().format(m(e));function x({stats:e}){let t;return(0,s.jsxs)("div",{className:"grid min-w-0 grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-4 sm:gap-4",children:[(0,s.jsxs)(o.default,{className:"flex min-w-0 flex-col gap-1 px-4 py-3",children:[(0,s.jsx)("span",{className:"text-text-muted text-sm uppercase font-semibold",children:"Total Requests"}),(0,s.jsx)("span",{className:"truncate text-2xl font-bold",children:u(e.totalRequests)})]}),(0,s.jsxs)(o.default,{className:"flex min-w-0 flex-col gap-1 px-4 py-3",children:[(0,s.jsx)("span",{className:"text-text-muted text-sm uppercase font-semibold",children:"Total Input Tokens"}),(0,s.jsx)("span",{className:"truncate text-2xl font-bold text-primary",children:u(e.totalPromptTokens)})]}),(0,s.jsxs)(o.default,{className:"flex min-w-0 flex-col gap-1 px-4 py-3",children:[(0,s.jsx)("span",{className:"text-text-muted text-sm uppercase font-semibold",children:"Output Tokens"}),(0,s.jsx)("span",{className:"truncate text-2xl font-bold text-success",children:u(e.totalCompletionTokens)})]}),(0,s.jsxs)(o.default,{className:"flex min-w-0 flex-col gap-1 px-4 py-3",children:[(0,s.jsx)("span",{className:"text-text-muted text-sm uppercase font-semibold",children:"Est. Cost"}),(0,s.jsxs)("span",{className:"truncate text-2xl font-bold text-warning",children:["~",(t=e.totalCost,`$${m(t).toFixed(2)}`)]}),(0,s.jsx)("span",{className:"text-[10px] text-text-muted",children:"Estimated, not actual billing"})]})]})}x.propTypes={stats:c().object.isRequired};let p=(e,t=0)=>{let r=Number(e);return Number.isFinite(r)?r:t},h=e=>new Intl.NumberFormat().format(p(e)),b=e=>`$${p(e).toFixed(2)}`;function f(e){if(!e)return"Never";let t=Math.floor((Date.now()-new Date(e))/6e4);return t<1?"Just now":t<60?`${t}m ago`:t<1440?`${Math.floor(t/60)}h ago`:new Date(e).toLocaleDateString()}function g({field:e,currentSort:t,currentOrder:r}){return t!==e?(0,s.jsx)("span",{className:"ml-1 opacity-20",children:"↕"}):(0,s.jsx)("span",{className:"ml-1",children:"asc"===r?"↑":"↓"})}function y({item:e,viewMode:t,isSummary:r=!1}){return"tokens"===t?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:r&&void 0===e.promptTokens?"—":h(e.promptTokens)}),(0,s.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:r&&void 0===e.completionTokens?"—":h(e.completionTokens)}),(0,s.jsx)("td",{className:"px-6 py-3 text-right font-medium",children:h(e.totalTokens)})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:r&&void 0===e.inputCost?"—":b(e.inputCost)}),(0,s.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:r&&void 0===e.outputCost?"—":b(e.outputCost)}),(0,s.jsx)("td",{className:"px-6 py-3 text-right font-medium text-warning",children:b(e.totalCost||e.cost)})]})}function v({title:e,columns:t,groupedData:r,tableType:l,sortBy:n,sortOrder:i,onToggleSort:d,viewMode:c,storageKey:m,renderDetailCells:u,renderSummaryCells:x,emptyMessage:p}){let[h,b]=(0,a.useState)(new Set);(0,a.useEffect)(()=>{try{let e=localStorage.getItem(m);e&&b(new Set(JSON.parse(e)))}catch(e){console.error(`Failed to load ${m}:`,e)}},[m]),(0,a.useEffect)(()=>{try{localStorage.setItem(m,JSON.stringify([...h]))}catch(e){console.error(`Failed to save ${m}:`,e)}},[h,m]);let f=(0,a.useCallback)(e=>{b(t=>{let r=new Set(t);return r.has(e)?r.delete(e):r.add(e),r})},[]),j=(0,a.useMemo)(()=>"tokens"===c?[{field:"promptTokens",label:"Input Tokens"},{field:"completionTokens",label:"Output Tokens"},{field:"totalTokens",label:"Total Tokens"}]:[{field:"promptTokens",label:"Input Cost"},{field:"completionTokens",label:"Output Cost"},{field:"cost",label:"Total Cost"}],[c]),N=t.length+j.length;return(0,s.jsxs)(o.default,{className:"overflow-hidden",children:[(0,s.jsx)("div",{className:"p-4 border-b border-border bg-bg-subtle/50",children:(0,s.jsx)("h3",{className:"font-semibold",children:e})}),(0,s.jsx)("div",{className:"overflow-x-auto",children:(0,s.jsxs)("table",{className:"w-full text-sm text-left",children:[(0,s.jsx)("thead",{className:"bg-bg-subtle/30 text-text-muted uppercase text-xs",children:(0,s.jsxs)("tr",{children:[t.map(e=>(0,s.jsxs)("th",{className:`px-6 py-3 cursor-pointer hover:bg-bg-subtle/50 ${"right"===e.align?"text-right":""}`,onClick:()=>d(l,e.field),children:[e.label," ",(0,s.jsx)(g,{field:e.field,currentSort:n,currentOrder:i})]},e.field)),j.map(e=>(0,s.jsxs)("th",{className:"px-6 py-3 text-right cursor-pointer hover:bg-bg-subtle/50",onClick:()=>d(l,e.field),children:[e.label," ",(0,s.jsx)(g,{field:e.field,currentSort:n,currentOrder:i})]},e.field))]})}),(0,s.jsxs)("tbody",{className:"divide-y divide-border",children:[r.map(e=>(0,s.jsxs)(a.Fragment,{children:[(0,s.jsxs)("tr",{className:"group-summary cursor-pointer hover:bg-bg-subtle/50 transition-colors",onClick:()=>f(e.groupKey),children:[(0,s.jsx)("td",{className:"px-6 py-3",children:(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:`material-symbols-outlined text-[18px] text-text-muted transition-transform ${h.has(e.groupKey)?"rotate-90":""}`,children:"chevron_right"}),(0,s.jsx)("span",{className:`font-medium transition-colors ${e.summary.pending>0?"text-primary":""}`,children:e.groupKey})]})}),x(e),(0,s.jsx)(y,{item:e.summary,viewMode:c,isSummary:!0})]}),h.has(e.groupKey)&&e.items.map(e=>(0,s.jsxs)("tr",{className:"group-detail hover:bg-bg-subtle/20 transition-colors",children:[u(e),(0,s.jsx)(y,{item:e,viewMode:c})]},`detail-${e.key}`))]},e.groupKey)),0===r.length&&(0,s.jsx)("tr",{children:(0,s.jsx)("td",{colSpan:N,className:"px-6 py-8 text-center text-text-muted",children:p})})]})]})})]})}g.propTypes={field:c().string.isRequired,currentSort:c().string.isRequired,currentOrder:c().string.isRequired},y.propTypes={item:c().object.isRequired,viewMode:c().string.isRequired,isSummary:c().bool},v.propTypes={title:c().string.isRequired,columns:c().arrayOf(c().shape({field:c().string.isRequired,label:c().string.isRequired,align:c().string})).isRequired,groupedData:c().array.isRequired,tableType:c().string.isRequired,sortBy:c().string.isRequired,sortOrder:c().string.isRequired,onToggleSort:c().func.isRequired,viewMode:c().string.isRequired,storageKey:c().string.isRequired,renderDetailCells:c().func.isRequired,renderSummaryCells:c().func.isRequired,emptyMessage:c().string.isRequired};var j=r(81750),N=r(6793);function w({data:e}){let{label:t,color:r,imageUrl:l,textIcon:n,active:i}=e,[o,d]=(0,a.useState)(!1);return(0,s.jsxs)("div",{className:"flex items-center gap-2.5 px-4 py-2.5 rounded-lg border-2 transition-all duration-300 bg-bg",style:{borderColor:i?r:"var(--color-border)",boxShadow:i?`0 0 16px ${r}40`:"none",minWidth:"150px"},children:[(0,s.jsx)(j.h7,{type:"target",position:N.yX.Top,id:"top",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,s.jsx)(j.h7,{type:"target",position:N.yX.Bottom,id:"bottom",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,s.jsx)(j.h7,{type:"target",position:N.yX.Left,id:"left",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,s.jsx)(j.h7,{type:"target",position:N.yX.Right,id:"right",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,s.jsx)("div",{className:"w-8 h-8 rounded-md flex items-center justify-center shrink-0",style:{backgroundColor:`${r}15`},children:o?(0,s.jsx)("span",{className:"text-sm font-bold",style:{color:r},children:n}):(0,s.jsx)("img",{src:l,alt:t,className:"w-6 h-6 rounded-sm object-contain",onError:()=>d(!0)})}),(0,s.jsx)("span",{className:"text-base font-medium truncate",style:{color:i?r:"var(--color-text)"},children:t}),i&&(0,s.jsxs)("span",{className:"relative flex h-2 w-2 shrink-0",children:[(0,s.jsx)("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full opacity-75",style:{backgroundColor:r}}),(0,s.jsx)("span",{className:"relative inline-flex rounded-full h-2 w-2",style:{backgroundColor:r}})]})]})}function k({data:e}){return(0,s.jsxs)("div",{className:"flex items-center justify-center px-5 py-3 rounded-xl border-2 border-primary bg-primary/5 shadow-md min-w-[130px]",children:[(0,s.jsx)(j.h7,{type:"source",position:N.yX.Top,id:"top",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,s.jsx)(j.h7,{type:"source",position:N.yX.Bottom,id:"bottom",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,s.jsx)(j.h7,{type:"source",position:N.yX.Left,id:"left",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,s.jsx)(j.h7,{type:"source",position:N.yX.Right,id:"right",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,s.jsx)("img",{src:"/favicon.svg",alt:"Bluerouter",className:"w-6 h-6 mr-2"}),(0,s.jsx)("span",{className:"text-sm font-bold text-primary",children:"Blue Router"}),e.activeCount>0&&(0,s.jsx)("span",{className:"ml-2 px-1.5 py-0.5 rounded-full bg-primary text-white text-xs font-bold",children:e.activeCount})]})}r(53255),w.propTypes={data:c().object.isRequired},k.propTypes={data:c().object.isRequired};let C={provider:w,router:k};function S({providers:e=[],activeRequests:t=[],lastProvider:r="",errorProvider:l=""}){let i=(0,a.useMemo)(()=>t.map(e=>e.provider?.toLowerCase()).filter(Boolean).sort().join(","),[t]),o=r?.toLowerCase()||"",d=l?.toLowerCase()||"",c=(0,a.useMemo)(()=>new Set(i?i.split(","):[]),[i]),m=(0,a.useMemo)(()=>new Set(o?[o]:[]),[o]),u=(0,a.useMemo)(()=>new Set(d?[d]:[]),[d]),x=(0,a.useRef)({}),[p,h]=(0,a.useState)(0);(0,a.useEffect)(()=>{let e=x.current,t=Date.now();for(let r of c)e[r]||(e[r]=t);for(let t of Object.keys(e))c.has(t)||delete e[t]},[c]),(0,a.useEffect)(()=>{if(0===c.size)return;let e=setInterval(()=>h(e=>e+1),1e3);return()=>clearInterval(e)},[c]);let b=(0,a.useMemo)(()=>{let e=Date.now(),t=new Set;for(let r of c){let s=x.current[r];(!s||e-s<6e4)&&t.add(r)}return t},[c,p]),{nodes:f,edges:g}=(0,a.useMemo)(()=>(function(e,t,r,s){let a=e.length,l=Math.max(320,204*a/(2*Math.PI)),i=Math.max(200,.55*l);if(0===a)return{nodes:[{id:"router",type:"router",position:{x:0,y:0},data:{activeCount:0},draggable:!1}],edges:[]};let o=[],d=[];return o.push({id:"router",type:"router",position:{x:-60,y:-22},data:{activeCount:t.size},draggable:!1}),e.forEach((e,c)=>{var m,u;let x,p,h=(m=e.provider,n.Q2[m]||{color:"#6b7280",name:m}),b=t.has(e.provider?.toLowerCase()),f=!b&&r.has(e.provider?.toLowerCase()),g=!b&&s.has(e.provider?.toLowerCase()),y=`provider-${e.provider}`,v={label:(h.name!==e.provider?h.name:null)||e.name||e.provider,color:h.color||"#6b7280",imageUrl:(u=e.provider,`/providers/${u}.png`),textIcon:h.textIcon||(e.provider||"?").slice(0,2).toUpperCase(),active:b},j=-Math.PI/2+2*Math.PI*c/a,N=l*Math.cos(j),w=i*Math.sin(j);Math.abs(j+Math.PI/2)<Math.PI/4||Math.abs(j-3*Math.PI/2)<Math.PI/4?(x="top",p="bottom"):Math.abs(j-Math.PI/2)<Math.PI/4?(x="bottom",p="top"):N>0?(x="right",p="left"):(x="left",p="right"),o.push({id:y,type:"provider",position:{x:N-90,y:w-15},data:v,draggable:!1}),d.push({id:`e-${y}`,source:"router",sourceHandle:x,target:y,targetHandle:p,animated:b,style:(h.color,g?{stroke:"#ef4444",strokeWidth:2.5,opacity:.9}:b?{stroke:"#22c55e",strokeWidth:2.5,opacity:.9}:f?{stroke:"#f59e0b",strokeWidth:2,opacity:.7}:{stroke:"var(--color-border)",strokeWidth:1,opacity:.3})})}),{nodes:o,edges:d}})(e,b,m,u),[e,b,o,d]),y=(0,a.useMemo)(()=>e.map(e=>e.provider).sort().join(","),[e]),v=(0,a.useRef)(null),N=(0,a.useRef)(null),w={padding:.2,duration:200},k=(0,a.useCallback)(e=>{v.current=e,setTimeout(()=>e.fitView(w),50)},[]);return(0,a.useEffect)(()=>{let e=N.current;if(!e)return;let t=new ResizeObserver(()=>{v.current&&v.current.fitView(w)});return t.observe(e),()=>t.disconnect()},[]),(0,a.useEffect)(()=>{if(v.current){let e=setTimeout(()=>v.current.fitView(w),50);return()=>clearTimeout(e)}},[f.length]),(0,s.jsx)("div",{ref:N,className:"h-[320px] w-full min-w-0 rounded-lg border border-border bg-bg-subtle/30 sm:h-[480px]",children:0===e.length?(0,s.jsx)("div",{className:"h-full flex items-center justify-center text-text-muted text-sm",children:"No providers connected"}):(0,s.jsx)(j.Gc,{nodes:f,edges:g,nodeTypes:C,fitView:!0,fitViewOptions:w,minZoom:.1,maxZoom:2,onInit:k,proOptions:{hideAttribution:!0},panOnDrag:!0,zoomOnScroll:!0,zoomOnPinch:!0,zoomOnDoubleClick:!0,preventScrolling:!1,nodesDraggable:!1,nodesConnectable:!1,elementsSelectable:!1,children:(0,s.jsx)(j.H2,{showInteractive:!1,className:"react-flow-controls-custom"})},y)})}S.propTypes={providers:c().arrayOf(c().shape({id:c().string,provider:c().string,name:c().string})),activeRequests:c().arrayOf(c().shape({provider:c().string,model:c().string,account:c().string})),lastProvider:c().string,errorProvider:c().string};var T=r(21742),A=r(63346),_=r(28408),I=r(32539),M=r(59656),$=r(55433),P=r(40968);let R=(e,t=0)=>{let r=Number(e);return Number.isFinite(r)?r:t},E=e=>{let t=R(e);return t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}K`:String(t)},O=e=>`$${R(e).toFixed(4)}`;function L({period:e="7d"}){let[t,r]=(0,a.useState)([]),[l,n]=(0,a.useState)(!0),[i,d]=(0,a.useState)("tokens"),c=(0,a.useCallback)(async()=>{n(!0);try{let t=await fetch(`/api/usage/chart?period=${e}`);if(t.ok){let e=await t.json();r(e)}}catch(e){console.error("Failed to fetch chart data:",e)}finally{n(!1)}},[e]);(0,a.useEffect)(()=>{c()},[c]);let m=t.map(e=>({...e,tokens:R(e.tokens),cost:R(e.cost)})),u=m.some(e=>e.tokens>0||e.cost>0);return(0,s.jsxs)(o.default,{className:"flex min-w-0 flex-col gap-3 p-3 sm:p-4",children:[(0,s.jsxs)("div",{className:"grid w-full grid-cols-2 items-center gap-1 rounded-lg border border-border bg-bg-subtle p-1 sm:w-auto sm:self-start",children:[(0,s.jsx)("button",{onClick:()=>d("tokens"),className:`px-3 py-1 rounded-md text-sm font-medium transition-colors ${"tokens"===i?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-bg-hover"}`,children:"Tokens"}),(0,s.jsx)("button",{onClick:()=>d("cost"),className:`px-3 py-1 rounded-md text-sm font-medium transition-colors ${"cost"===i?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-bg-hover"}`,children:"Cost"})]}),l?(0,s.jsx)("div",{className:"h-48 flex items-center justify-center text-text-muted text-sm",children:"Loading..."}):u?(0,s.jsx)(T.u,{width:"100%",height:220,children:(0,s.jsxs)(A.Q,{data:m,margin:{top:4,right:8,left:0,bottom:0},children:[(0,s.jsxs)("defs",{children:[(0,s.jsxs)("linearGradient",{id:"gradTokens",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,s.jsx)("stop",{offset:"5%",stopColor:"#6366f1",stopOpacity:.25}),(0,s.jsx)("stop",{offset:"95%",stopColor:"#6366f1",stopOpacity:0})]}),(0,s.jsxs)("linearGradient",{id:"gradCost",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,s.jsx)("stop",{offset:"5%",stopColor:"#f59e0b",stopOpacity:.25}),(0,s.jsx)("stop",{offset:"95%",stopColor:"#f59e0b",stopOpacity:0})]})]}),(0,s.jsx)(_.d,{strokeDasharray:"3 3",strokeOpacity:.1}),(0,s.jsx)(I.W,{dataKey:"label",tick:{fontSize:10,fill:"currentColor",fillOpacity:.5},tickLine:!1,axisLine:!1,interval:"preserveStartEnd"}),(0,s.jsx)(M.h,{tick:{fontSize:10,fill:"currentColor",fillOpacity:.5},tickLine:!1,axisLine:!1,tickFormatter:"tokens"===i?E:O,width:50}),(0,s.jsx)($.m,{contentStyle:{backgroundColor:"var(--color-bg)",border:"1px solid var(--color-border)",borderRadius:"8px",fontSize:"12px"},formatter:(e,t)=>"tokens"===t?[E(e),"Tokens"]:[O(e),"Cost"]}),"tokens"===i?(0,s.jsx)(P.Gk,{type:"monotone",dataKey:"tokens",stroke:"#6366f1",strokeWidth:2,fill:"url(#gradTokens)",dot:!1,activeDot:{r:4}}):(0,s.jsx)(P.Gk,{type:"monotone",dataKey:"cost",stroke:"#f59e0b",strokeWidth:2,fill:"url(#gradCost)",dot:!1,activeDot:{r:4}})]})}):(0,s.jsx)("div",{className:"h-48 flex items-center justify-center text-text-muted text-sm",children:"No data for this period"})]})}function z(e){let t=n.Q2[e];return!t?.serviceKinds||t.serviceKinds.includes("llm")}function q(e){let t=String(e||"").trim();if(!t)return"";try{return new URL(t).hostname||""}catch{return t.replace(/^https?:\/\//,"").replace(/\/.*$/,"").replace(/:\d+$/,"")}}function U(e){let t=String(e||"").trim();return/^openai-compatible-chat-[0-9a-f-]{20,}$/i.test(t)||/^openai-compatible-[0-9a-f-]{20,}$/i.test(t)}function D(e){return String(e||"").trim()}function F(e=[]){let t={},r={};for(let s of e||[]){let e=function(e={}){let t=D(e.provider||e.providerId||e.provider_id||e.id),r=D(e.accountName||e.account_name||e.displayName||e.display_name||e.name||e.email||e.label||e.connectionName||e.connection_name),s=q(e.endpoint)||q(e.baseUrl)||q(e.baseURL)||q(e.base_url)||q(e.providerUrl)||q(e.provider_url)||q(e.url),a=D(e.email);return{providerId:t,accountName:r,displayName:D(e.displayName||e.display_name),email:a,endpointHost:s,ownerUser:D(e.ownerUser||e.owner_user),isPersonal:"personal"===e.scope||"private"===e.visibility||!!(e.ownerUser||e.owner_user)}}(s);for(let r of[s.id,s.connectionId,s.connection_id].map(D).filter(Boolean))t[r]||(t[r]=e);e.accountName&&!r[e.accountName]&&(r[e.accountName]=e)}return{byConnectionId:t,byAccount:r}}function W(e={},t={}){let r=e.model||e.rawModel||e.raw_model||"-",s=function(e={},t={}){let r=function(e={},t={}){for(let r of[e.connectionId,e.connection_id].map(D).filter(Boolean))if(t.byConnectionId?.[r])return t.byConnectionId[r];let r=D(e.accountName||e.account_name||e.keyName||e.key_name||e.connectionName||e.connection_name||e.providerName||e.provider_name||e.providerLabel||e.provider_label);return r&&t.byAccount?.[r]?t.byAccount[r]:null}(e,t),s=function(e={},t=null){let r=D(e.provider||e.providerId||e.provider_id).toLowerCase();if(!(!0===e.isPersonalOAuth||!0===e.is_personal_oauth||"personal"===e.connectionScope||"personal"===e.connection_scope||"private"===e.visibility||t?.isPersonal)||!r)return"";let s=D(e.ownerUser||e.owner_user||e.apiKeyOwner||e.api_key_owner||t?.ownerUser),a=D(e.accountEmail||e.account_email||e.email||t?.email),l=D(e.accountDisplayName||e.account_display_name||e.accountName||e.account_name||e.connectionName||e.connection_name||t?.accountName||t?.displayName),n=[];return(s&&n.push(s),l&&l!==s&&l!==a&&n.push(l),a&&a!==s&&n.push(a),n.length)?(n.push(r),n.join("/")):""}(e,r);if(s)return s;if(r){let e=r.providerId,t=r.accountName,s=r.endpointHost;if(e&&!U(e)){if(r.isPersonal&&r.ownerUser){let s=[r.ownerUser];return t&&t!==r.ownerUser&&t!==r.email&&s.push(t),r.email&&r.email!==r.ownerUser&&s.push(r.email),s.push(e),s.join("/")}return t&&t!==e?`${e}/${t}`:e}if(t)return t;if(s)return s}let a=q(e.endpoint)||q(e.providerUrl)||q(e.provider_url)||q(e.baseUrl)||q(e.baseURL)||q(e.base_url)||q(e.url);if(a)return a;let l=D(e.provider||e.providerId||e.provider_id),n=D(e.accountName||e.account_name||e.keyName||e.key_name||e.connectionName||e.connection_name||e.providerName||e.provider_name||e.providerLabel||e.provider_label);return l&&!U(l)?n&&n!==l?`${l}/${n}`:l:n||""}(e,t),a=D(e.provider||e.providerId||e.provider_id);return!s||"-"===r||String(r).startsWith(`${s}/`)?r:a&&String(r).startsWith(`${a}/`)&&(s.startsWith(`${a}/`)||s.endsWith(`/${a}`))?`${s}/${String(r).slice(a.length+1)}`:`${s}/${r}`}function K({timestamp:e}){let t,[,r]=(0,a.useState)(0);return(0,a.useEffect)(()=>{let e=setInterval(()=>r(e=>e+1),1e3);return()=>clearInterval(e)},[]),(0,s.jsx)(s.Fragment,{children:(t=Math.floor((Date.now()-new Date(e))/1e3))<60?`${t}s ago`:t<3600?`${Math.floor(t/60)}m ago`:t<86400?`${Math.floor(t/3600)}h ago`:`${Math.floor(t/86400)}d ago`})}L.propTypes={period:c().string};let B=new Set(["ok","success","succeeded","complete","completed","done","200 ok"]),V=new Set(["pending","running","queued","in_progress","in-progress"]);function G(e={}){let t,r=String(e.status||e.statusText||e.status_text||"").trim().toLowerCase(),s=(t=String(r||"").match(/\b([1-5]\d{2})\b/))?Number(t[1]):null,a=function(...e){for(let t of e){if(null==t||""===t)continue;let e=Number(t);if(Number.isFinite(e))return e}return null}(e.statusCode,e.status_code,e.gatewayStatusCode,e.gateway_status_code,e.upstreamStatusCode,e.upstream_status_code,s),l=D(e.errorCode||e.error_code),n=D(e.errorType||e.error_type),i=D(e.errorMessageShort||e.error_message_short||e.message||e.error);if(V.has(r))return{kind:"pending",label:"PENDING",title:"Request is still pending/running.",dotClass:"bg-amber-500",rowClass:"hover:bg-amber-50/60",badgeClass:"bg-amber-100 text-amber-700 border border-amber-200"};if(/\b(error|fail|failed|failure|timeout|cancelled|canceled)\b/i.test(r)||null!==a&&a>=400||l||n||i){let t=null!==a?`ERR ${a}`:r?r.toUpperCase():"ERROR",s=[`Status: ${t}`,l?`Code: ${l}`:"",n?`Type: ${n}`:"",i?`Message: ${i}`:"",e.endpoint?`Endpoint: ${e.endpoint}`:""].filter(Boolean);return{kind:"error",label:t,title:s.join("\n"),dotClass:"bg-error",rowClass:"hover:bg-error/5",badgeClass:"bg-error/10 text-error border border-error/20"}}return null!==a&&a>=200&&a<300||!r||B.has(r)?{kind:"success",label:a?`OK ${a}`:"OK",title:"Request completed successfully.",dotClass:"bg-success",rowClass:"hover:bg-bg-subtle",badgeClass:"bg-success/10 text-success border border-success/20"}:{kind:"unknown",label:r?r.toUpperCase():"UNKNOWN",title:r?`Status: ${r}`:"Unknown request status.",dotClass:"bg-text-muted",rowClass:"hover:bg-bg-subtle",badgeClass:"bg-bg-subtle text-text-muted border border-border"}}function Q({request:e}){let{promptTokens:t,completionTokens:r,totalTokens:a}=function(e={}){let t=Number(e.promptTokens??e.prompt_tokens??0)||0,r=Number(e.completionTokens??e.completion_tokens??0)||0,s=Number(e.totalTokens??e.total_tokens??t+r)||0;return{promptTokens:t,completionTokens:r,totalTokens:s}}(e),l=G(e);return"success"===l.kind&&a>0?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("span",{className:"text-primary",children:[h(t),"↑"]})," ",(0,s.jsxs)("span",{className:"text-success",children:[h(r),"↓"]})]}):"success"===l.kind?(0,s.jsx)("div",{className:"flex items-center justify-end",title:"Request completed, but no token usage was reported.",children:(0,s.jsx)("span",{className:"inline-flex items-center rounded-full border border-border bg-bg-subtle px-2 py-0.5 text-[10px] font-semibold leading-4 text-text-muted",children:"NO USAGE"})}):(0,s.jsxs)("div",{className:"flex items-center justify-end gap-1.5",title:l.title,children:[(0,s.jsx)("span",{className:`inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-semibold leading-4 ${l.badgeClass}`,children:l.label}),a>0&&(0,s.jsxs)("span",{className:"text-[11px] text-text-muted whitespace-nowrap",children:[h(t),"↑ ",h(r),"↓"]})]})}function J({requests:e=[],providers:t=[]}){let r=(0,a.useMemo)(()=>F(t),[t]),l=(0,a.useMemo)(()=>Array.isArray(e)?e.filter(e=>"success"===G(e).kind):[],[e]),n=Math.max(0,(Array.isArray(e)?e.length:0)-l.length);return(0,s.jsxs)(o.default,{className:"flex min-w-0 flex-col overflow-hidden",padding:"sm",style:{height:480},children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-2 px-1 py-2 border-b border-border shrink-0",children:[(0,s.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,s.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wide",children:"Recent Requests"}),(0,s.jsx)("span",{className:"inline-flex items-center rounded-full border border-success/20 bg-success/10 px-2 py-0.5 text-[10px] font-semibold uppercase leading-4 text-success",children:"Success only"})]}),n>0&&(0,s.jsxs)("span",{className:"shrink-0 text-[11px] text-text-muted",title:"Error, pending and failed requests are intentionally hidden here. Use the Errors/Analytics views for troubleshooting.",children:[h(n)," hidden"]})]}),l.length?(0,s.jsx)("div",{className:"flex-1 overflow-y-auto",children:(0,s.jsxs)("table",{className:"w-full min-w-[300px] border-collapse text-xs",children:[(0,s.jsx)("thead",{className:"sticky top-0 bg-bg z-10",children:(0,s.jsxs)("tr",{className:"border-b border-border",children:[(0,s.jsx)("th",{className:"py-1.5 text-left font-semibold text-text-muted w-2"}),(0,s.jsx)("th",{className:"py-1.5 text-left font-semibold text-text-muted",children:"Model"}),(0,s.jsx)("th",{className:"py-1.5 text-right font-semibold text-text-muted whitespace-nowrap",children:"In / Out"}),(0,s.jsx)("th",{className:"py-1.5 text-right font-semibold text-text-muted",children:"When"})]})}),(0,s.jsx)("tbody",{className:"divide-y divide-border/50",children:l.map((e,t)=>{let a=W(e,r);return(0,s.jsxs)("tr",{className:"hover:bg-bg-subtle transition-colors",children:[(0,s.jsx)("td",{className:"py-1.5",children:(0,s.jsx)("span",{className:"block w-1.5 h-1.5 rounded-full bg-success"})}),(0,s.jsx)("td",{className:"py-1.5 font-mono truncate max-w-[240px]",title:a,children:a}),(0,s.jsx)("td",{className:"py-1.5 text-right whitespace-nowrap",children:(0,s.jsx)(Q,{request:e})}),(0,s.jsx)("td",{className:"py-1.5 text-right text-text-muted whitespace-nowrap",children:(0,s.jsx)(K,{timestamp:e.timestamp})})]},e.requestId||e.id||`${e.timestamp||"request"}-${t}`)})})]})}):(0,s.jsxs)("div",{className:"flex-1 flex flex-col items-center justify-center gap-1 px-4 text-center text-sm",children:[(0,s.jsx)("div",{className:"font-medium text-text-main",children:"No successful requests yet."}),n>0&&(0,s.jsxs)("div",{className:"max-w-[260px] text-xs text-text-muted",children:[h(n)," non-success request",1===n?"":"s"," hidden from this usage-focused list."]})]})]})}function H(e,t={},r,s){return Object.entries(e||{}).map(([e,r])=>{let s=(r.promptTokens||0)+(r.completionTokens||0),a=r.cost||0,l=s>0?(r.promptTokens||0)*(a/s):0,n=s>0?(r.completionTokens||0)*(a/s):0;return{...r,key:e,totalTokens:s,totalCost:a,inputCost:l,outputCost:n,pending:t[e]||0}}).sort((e,t)=>{let a=e[r],l=t[r];return("string"==typeof a&&(a=a.toLowerCase()),"string"==typeof l&&(l=l.toLowerCase()),a<l)?"asc"===s?-1:1:a>l?"asc"===s?1:-1:0})}function X(e,t){if(!Array.isArray(e))return[];let r={};return e.forEach(e=>{let s=function(e,t){switch(t){case"rawModel":return e.rawModel||"Unknown Model";case"accountName":return e.accountName||`Account ${e.connectionId?.slice(0,8)}...`||"Unknown Account";case"keyName":return e.keyName||"Unknown Key";case"endpoint":return e.endpoint||"Unknown Endpoint";default:return e[t]||"Unknown"}}(e,t);r[s]||(r[s]={groupKey:s,summary:{requests:0,promptTokens:0,completionTokens:0,totalTokens:0,cost:0,inputCost:0,outputCost:0,lastUsed:null,pending:0},items:[]});let a=r[s].summary;a.requests+=e.requests||0,a.promptTokens+=e.promptTokens||0,a.completionTokens+=e.completionTokens||0,a.totalTokens+=e.totalTokens||0,a.cost+=e.cost||0,a.inputCost+=e.inputCost||0,a.outputCost+=e.outputCost||0,a.pending+=e.pending||0,e.lastUsed&&(!a.lastUsed||new Date(e.lastUsed)>new Date(a.lastUsed))&&(a.lastUsed=e.lastUsed),r[s].items.push(e)}),Object.values(r)}let Y=[{field:"rawModel",label:"Model"},{field:"provider",label:"Provider"},{field:"requests",label:"Requests",align:"right"},{field:"lastUsed",label:"Last Used",align:"right"}],Z=[{field:"accountName",label:"Account"},{field:"rawModel",label:"Model"},{field:"provider",label:"Provider"},{field:"requests",label:"Requests",align:"right"},{field:"lastUsed",label:"Last Used",align:"right"}],ee=[{field:"keyName",label:"API Key Name"},{field:"rawModel",label:"Model"},{field:"provider",label:"Provider"},{field:"requests",label:"Requests",align:"right"},{field:"lastUsed",label:"Last Used",align:"right"}],et=[{field:"endpoint",label:"Endpoint"},{field:"rawModel",label:"Model"},{field:"provider",label:"Provider"},{field:"requests",label:"Requests",align:"right"},{field:"lastUsed",label:"Last Used",align:"right"}],er=[{value:"model",label:"Usage by Model"},{value:"account",label:"Usage by Account"},{value:"apiKey",label:"Usage by API Key"},{value:"endpoint",label:"Usage by Endpoint"}],es=[{value:"today",label:"Today"},{value:"24h",label:"24h"},{value:"7d",label:"7D"},{value:"30d",label:"30D"},{value:"60d",label:"60D"}];function ea({period:e,setPeriod:t,hidePeriodSelector:r=!1}={}){let o=(0,l.useRouter)(),d=(0,l.useSearchParams)(),c=d.get("sortBy")||"rawModel",m=d.get("sortOrder")||"asc",[u,p]=(0,a.useState)(null),[b,g]=(0,a.useState)(!0),[y,j]=(0,a.useState)(!1),[N,w]=(0,a.useState)("model"),[k,C]=(0,a.useState)("costs"),[T,A]=(0,a.useState)([]),[_,I]=(0,a.useState)("today"),M=(0,a.useRef)(!0),$=e??_,P=t??I,R=(0,a.useMemo)(()=>F(T),[T]);(0,a.useEffect)(()=>{fetch("/api/providers").then(e=>e.ok?e.json():null).then(e=>{let t=(e?.connections||[]).filter(e=>!1!==e.isActive&&!!z(e.provider)),r=new Set(t.map(e=>e.provider));A([...t,...Object.values(n.IS).filter(e=>e.noAuth&&!r.has(e.id)&&z(e.id)).map(e=>({provider:e.id,name:e.name}))])}).catch(()=>{})},[]),(0,a.useEffect)(()=>{M.current?(M.current=!1,g(!0)):j(!0),fetch(`/api/usage/stats?period=${$}`).then(e=>e.ok?e.json():null).then(e=>{e&&p(t=>({...t,...e}))}).catch(()=>{}).finally(()=>{g(!1),j(!1)})},[$]),(0,a.useEffect)(()=>{let e=new EventSource("/api/usage/stream");return e.onmessage=e=>{try{let t=JSON.parse(e.data);p(e=>({...e||{},activeRequests:t.activeRequests,recentRequests:t.recentRequests,errorProvider:t.errorProvider,pending:t.pending})),g(!1)}catch(e){console.error("[SSE CLIENT] parse error:",e)}},e.onerror=()=>g(!1),()=>e.close()},[]);let E=(0,a.useCallback)((e,t)=>{let r=new URLSearchParams(d.toString());r.get("sortBy")===t?r.set("sortOrder","asc"===r.get("sortOrder")?"desc":"asc"):(r.set("sortBy",t),r.set("sortOrder","asc")),o.replace(`?${r.toString()}`,{scroll:!1})},[d,o]),O=(0,a.useMemo)(()=>{if(!u)return null;switch(N){case"model":{let e=u.pending?.byModel||{};return{columns:Y,groupedData:X(H(u.byModel,e,c,m),"rawModel"),storageKey:"usage-stats:expanded-models",emptyMessage:"No usage recorded yet.",renderSummaryCells:e=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,s.jsx)("td",{className:"px-6 py-3 text-right",children:h(e.summary.requests)}),(0,s.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:f(e.summary.lastUsed)})]}),renderDetailCells:e=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("td",{className:`px-6 py-3 font-medium transition-colors ${e.pending>0?"text-primary":""}`,title:W(e,R),children:W(e,R)}),(0,s.jsx)("td",{className:"px-6 py-3",children:(0,s.jsx)(i.default,{variant:e.pending>0?"primary":"neutral",size:"sm",children:e.provider})}),(0,s.jsx)("td",{className:"px-6 py-3 text-right",children:h(e.requests)}),(0,s.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:f(e.lastUsed)})]})}}case"account":{let e={};return u?.pending?.byAccount&&Object.entries(u.byAccount||{}).forEach(([t,r])=>{let s=u.pending.byAccount[r.connectionId];if(s){let a=r.provider?`${r.rawModel} (${r.provider})`:r.rawModel;e[t]=s[a]||0}}),{columns:Z,groupedData:X(H(u.byAccount,e,c,m),"accountName"),storageKey:"usage-stats:expanded-accounts",emptyMessage:"No account-specific usage recorded yet.",renderSummaryCells:e=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,s.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,s.jsx)("td",{className:"px-6 py-3 text-right",children:h(e.summary.requests)}),(0,s.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:f(e.summary.lastUsed)})]}),renderDetailCells:e=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("td",{className:`px-6 py-3 font-medium transition-colors ${e.pending>0?"text-primary":""}`,children:e.accountName||`Account ${e.connectionId?.slice(0,8)}...`}),(0,s.jsx)("td",{className:`px-6 py-3 font-medium transition-colors ${e.pending>0?"text-primary":""}`,title:e.rawModel,children:e.rawModel}),(0,s.jsx)("td",{className:"px-6 py-3",children:(0,s.jsx)(i.default,{variant:e.pending>0?"primary":"neutral",size:"sm",children:e.provider})}),(0,s.jsx)("td",{className:"px-6 py-3 text-right",children:h(e.requests)}),(0,s.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:f(e.lastUsed)})]})}}case"apiKey":return{columns:ee,groupedData:X(H(u.byApiKey,{},c,m),"keyName"),storageKey:"usage-stats:expanded-apikeys",emptyMessage:"No API key usage recorded yet.",renderSummaryCells:e=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,s.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,s.jsx)("td",{className:"px-6 py-3 text-right",children:h(e.summary.requests)}),(0,s.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:f(e.summary.lastUsed)})]}),renderDetailCells:e=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("td",{className:"px-6 py-3 font-medium",children:e.keyName}),(0,s.jsx)("td",{className:"px-6 py-3",title:W(e,R),children:W(e,R)}),(0,s.jsx)("td",{className:"px-6 py-3",children:(0,s.jsx)(i.default,{variant:"neutral",size:"sm",children:e.provider})}),(0,s.jsx)("td",{className:"px-6 py-3 text-right",children:h(e.requests)}),(0,s.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:f(e.lastUsed)})]})};default:return{columns:et,groupedData:X(H(u.byEndpoint,{},c,m),"endpoint"),storageKey:"usage-stats:expanded-endpoints",emptyMessage:"No endpoint usage recorded yet.",renderSummaryCells:e=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,s.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,s.jsx)("td",{className:"px-6 py-3 text-right",children:h(e.summary.requests)}),(0,s.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:f(e.summary.lastUsed)})]}),renderDetailCells:e=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("td",{className:"px-6 py-3 font-medium font-mono text-sm",children:e.endpoint}),(0,s.jsx)("td",{className:"px-6 py-3",title:W(e,R),children:W(e,R)}),(0,s.jsx)("td",{className:"px-6 py-3",children:(0,s.jsx)(i.default,{variant:"neutral",size:"sm",children:e.provider})}),(0,s.jsx)("td",{className:"px-6 py-3 text-right",children:h(e.requests)}),(0,s.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:f(e.lastUsed)})]})}}},[u,N,c,m,R]);if(!u&&!b)return(0,s.jsx)("div",{className:"text-text-muted",children:"Failed to load usage statistics."});let q=(0,s.jsx)("div",{className:"flex items-center justify-center py-12 text-text-muted",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[32px] animate-spin",children:"progress_activity"})});return(0,s.jsxs)("div",{className:"flex min-w-0 flex-col gap-6",children:[!r&&(0,s.jsxs)("div",{className:"flex w-full items-center gap-2 sm:w-auto sm:self-end",children:[(0,s.jsx)("div",{className:"grid flex-1 grid-cols-5 items-center gap-1 rounded-lg border border-border bg-bg-subtle p-1 sm:flex sm:flex-none",children:es.map(e=>(0,s.jsx)("button",{onClick:()=>P(e.value),disabled:y,className:`rounded-md px-3 py-1 text-sm font-medium transition-colors ${$===e.value?"bg-primary text-white shadow-sm":"text-text-muted hover:bg-bg-hover hover:text-text"}`,children:e.label},e.value))}),y&&(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px] text-text-muted animate-spin",children:"progress_activity"})]}),b?q:(0,s.jsx)(x,{stats:u}),b?q:(0,s.jsxs)("div",{className:"grid min-w-0 grid-cols-1 items-stretch gap-2 lg:grid-cols-[minmax(0,2fr)_minmax(280px,1fr)]",children:[(0,s.jsx)(S,{providers:T,activeRequests:u.activeRequests||[],lastProvider:u.recentRequests?.[0]?.provider||"",errorProvider:u.errorProvider||""}),(0,s.jsx)(J,{requests:u.recentRequests||[],providers:T})]}),b?q:(0,s.jsx)(L,{period:$}),(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsx)("select",{value:N,onChange:e=>w(e.target.value),className:"w-full rounded-lg border border-border bg-surface px-3 py-1.5 text-sm font-medium text-text-main focus:outline-none focus:ring-2 focus:ring-primary/50 sm:w-auto",style:{colorScheme:"auto"},children:er.map(e=>(0,s.jsx)("option",{value:e.value,children:e.label},e.value))}),(0,s.jsxs)("div",{className:"grid grid-cols-2 items-center gap-1 rounded-lg border border-border bg-bg-subtle p-1 sm:flex",children:[(0,s.jsx)("button",{onClick:()=>C("costs"),className:`px-3 py-1 rounded-md text-sm font-medium transition-colors ${"costs"===k?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-bg-hover"}`,children:"Costs"}),(0,s.jsx)("button",{onClick:()=>C("tokens"),className:`px-3 py-1 rounded-md text-sm font-medium transition-colors ${"tokens"===k?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-bg-hover"}`,children:"Tokens"})]})]}),b?q:O&&(0,s.jsx)(v,{title:"",columns:O.columns,groupedData:O.groupedData,tableType:N,sortBy:c,sortOrder:m,onToggleSort:E,viewMode:k,storageKey:O.storageKey,renderSummaryCells:O.renderSummaryCells,renderDetailCells:O.renderDetailCells,emptyMessage:O.emptyMessage})]})]})}},4823:(e,t,r)=>{r.d(t,{default:()=>m});var s=r(95155),a=r(12115),l=r(14051),n=r.n(l),i=r(84588),o=r(98),d=r(56061);let c="__none__";function m({providerId:e}){let[t,r]=(0,a.useState)([]),[l,n]=(0,a.useState)(c),[u,x]=(0,a.useState)(!1),[p,h]=(0,a.useState)(!1);(0,a.useEffect)(()=>{let t=!1;return Promise.all([fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}).then(e=>e.ok?e.json():{proxyPools:[]}),fetch("/api/settings",{cache:"no-store"}).then(e=>e.ok?e.json():{})]).then(([s,a])=>{t||(r(s.proxyPools||[]),n(((a.providerStrategies||{})[e]||{}).proxyPoolId||c))}).catch(()=>{}),()=>{t=!0}},[e]);let b=async t=>{n(t),x(!0);try{let r=await fetch("/api/settings",{cache:"no-store"}),s=(r.ok?await r.json():{}).providerStrategies||{},a={...s[e]||{}};t===c?delete a.proxyPoolId:a.proxyPoolId=t;let l={...s};0===Object.keys(a).length?delete l[e]:l[e]=a,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:l})}),h(!0),setTimeout(()=>h(!1),1500)}catch(e){console.log("Save proxyPoolId error:",e)}finally{x(!1)}};return(0,s.jsxs)(i.default,{children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,s.jsx)("div",{className:"inline-flex items-center justify-center w-10 h-10 rounded-full bg-green-500/10 text-green-500",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"lock_open"})}),(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsx)("p",{className:"text-sm font-medium",children:"No authentication required"}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"This provider is ready to use. Optionally route requests through a proxy pool to bypass IP-based limits."})]}),p&&(0,s.jsx)(d.default,{variant:"success",size:"sm",children:"Saved"})]}),(0,s.jsx)(o.default,{label:"Proxy Pool",value:l,onChange:e=>b(e.target.value),disabled:u,options:[{value:c,label:"None (direct)"},...t.map(e=>({value:e.id,label:e.name}))]})]})}m.propTypes={providerId:n().string.isRequired}},11059:(e,t,r)=>{r.d(t,{C:()=>a});var s=r(12115);function a(e=2e3){let[t,r]=(0,s.useState)(null),l=(0,s.useRef)(null);return{copied:t,copy:(0,s.useCallback)((t,s="default")=>{(async()=>{if(navigator?.clipboard?.writeText)await navigator.clipboard.writeText(t);else{let e=document.createElement("textarea");e.value=t,e.style.position="fixed",e.style.opacity="0",document.body.appendChild(e),e.select(),document.execCommand("copy"),document.body.removeChild(e)}})(),r(s),l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{r(null)},e)},[e])}}},11910:(e,t,r)=>{r.d(t,{default:()=>l});var s=r(95155),a=r(31474);function l({label:e,type:t="text",placeholder:r,value:n,onChange:i,error:o,hint:d,icon:c,disabled:m=!1,required:u=!1,className:x,inputClassName:p,...h}){return(0,s.jsxs)("div",{className:(0,a.cn)("flex flex-col gap-1.5",x),children:[e&&(0,s.jsxs)("label",{className:"text-sm font-medium text-text-main",children:[e,u&&(0,s.jsx)("span",{className:"text-red-500 ml-1",children:"*"})]}),(0,s.jsxs)("div",{className:"relative",children:[c&&(0,s.jsx)("div",{className:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none text-text-muted",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:c})}),(0,s.jsx)("input",{type:t,placeholder:r,value:n,onChange:i,disabled:m,className:(0,a.cn)("w-full py-2.5 px-3 text-sm text-text-main bg-surface-2 rounded-[10px]","border border-transparent placeholder-text-muted/70","focus:outline-none focus:ring-2 focus:ring-brand-500/30 focus:border-brand-500/40","transition-all duration-150 ease-out disabled:opacity-50 disabled:cursor-not-allowed","text-[16px] sm:text-sm",c&&"pl-10",o&&"ring-1 ring-red-500 focus:ring-2 focus:ring-red-500/40 border-red-500/40",p),...h})]}),o&&(0,s.jsxs)("p",{className:"text-xs text-red-500 flex items-center gap-1",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"error"}),o]}),d&&!o&&(0,s.jsx)("p",{className:"text-xs text-text-muted",children:d})]})}},12494:(e,t,r)=>{r.d(t,{ns:()=>m,wB:()=>u});var s=r(52679),a=r(28777);let l=[{id:"@cf/meta/llama-3.1-8b-instruct",name:"Cloudflare: Llama 3.1 8B Instruct"},{id:"@cf/meta/llama-3.1-70b-instruct",name:"Cloudflare: Llama 3.1 70B Instruct"},{id:"@cf/deepseek-ai/deepseek-r1-distill-qwen-32b",name:"Cloudflare: DeepSeek R1 Distill Qwen 32B"},{id:"@cf/qwen/qwen1.5-14b-chat-awq",name:"Cloudflare: Qwen 1.5 14B Chat AWQ"}];function n(e){return"string"==typeof e?e.trim():""}function i(e){return e&&"object"==typeof e&&!Array.isArray(e)?e:{}}function o(e){return Array.isArray(e)?e.map(e=>String(e||"").trim()).filter(Boolean):[]}function d(e=""){let t=n(e);return t?(0,s.mq)(t)||(0,s.gb)(t)?t:(0,s.wG)(t)||t:""}function c(e){return[...e].sort((e,t)=>{let r=e.source||"",s=t.source||"";if(r!==s){let e={builtin:0,connection:1,alias:2,current:3};return(e[r]??9)-(e[s]??9)}return String(e.id||"").localeCompare(String(t.id||""))})}async function m({providerId:e="",connections:t=[],currentModel:r=""}={}){let u=n(e);if(!u)return{models:[],warning:"Provider is empty"};let x=d(u),p={},h=[],b="";try{let[e,t]=await Promise.all([fetch("/api/models/alias",{cache:"no-store"}),fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(x)}`,{cache:"no-store"})]);if(e.ok){let t=await e.json();p=i(t.aliases)}else b="Failed to load model aliases from local DB.";if(t.ok){let e=await t.json();h=o(e.ids)}}catch(e){b=e.message||"Failed to load local model list."}let f=function({providerId:e="",aliases:t={},disabledIds:r=[],connections:s=[],currentModel:m=""}={}){let u=n(e);if(!u)return[];let x=d(u),p=new Set(o(r)),h=i(t),b=function(e="",t=""){return[...new Set([t,e].map(n).filter(Boolean))].map(e=>`${e}/`)}(u,x),f=new Set,g=[],y=(e,t,r="builtin")=>{let s=n(e);!s||f.has(s)||p.has(s)&&"current"!==r||(f.add(s),g.push({id:s,name:n(t)||s,source:r}))};for(let e of(0,a.KC)(u)||[])e&&(!e.type||"llm"===e.type)&&y(e.id,e.name||e.displayName||e.id,"builtin");if("cloudflare-ai"===u&&0===g.length)for(let e of l)y(e.id,e.name,"builtin");for(let e of s||[])e&&e.provider===u&&y(e.defaultModel,e.defaultModel,"connection");for(let[e,t]of Object.entries(h)){let r=function(e,t){let r=n(e);if(!r)return"";for(let e of t)if(r.startsWith(e))return r.slice(e.length).trim();return""}(t,b);r&&y(r,e&&e!==r?`${r} (${e})`:r,"alias")}let v=n(m);return v&&y(v,`${v} (current)`,"current"),c(g)}({providerId:u,aliases:p,disabledIds:h,connections:t,currentModel:r});if(!b&&0===f.length){let e=s.Q2?.[u]?.name||u;b=`No local Available Models found for ${e}. Add models in Available Models first, then reopen this healthcheck dialog.`}return{models:f,warning:b}}function u(e=[],t=""){let r=n(t);return!r||(e||[]).some(e=>e.id===r)?e:c([...e||[],{id:r,name:`${r} (current)`,source:"current"}])}},14932:(e,t,r)=>{r.d(t,{A:()=>o});var s=r(95155),a=r(12115),l=r(47650);let n=[{icon:"terminal",label:"Terminal",desc:"Full shell access"},{icon:"cast",label:"Desktop",desc:"Screen sharing"},{icon:"folder_open",label:"Files",desc:"Browse & edit files"}],i=[{icon:"qr_code_scanner",text:"Scan QR to connect instantly"},{icon:"wifi_off",text:"No port forwarding needed"},{icon:"devices",text:"Works on any device"}];function o({isOpen:e,onClose:t}){return((0,a.useEffect)(()=>{if(!e)return;document.body.style.overflow="hidden";let r=e=>{"Escape"===e.key&&t()};return document.addEventListener("keydown",r),()=>{document.body.style.overflow="",document.removeEventListener("keydown",r)}},[e,t]),e)?(0,l.createPortal)((0,s.jsxs)("div",{className:"fixed inset-0 z-[9999] flex items-center justify-center p-4",children:[(0,s.jsx)("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-[2px] fade-in",onClick:t}),(0,s.jsxs)("div",{className:"relative w-full max-w-sm rounded-[14px] overflow-hidden shadow-[var(--shadow-elev)] fade-in flex flex-col bg-surface border border-border-subtle",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border-subtle",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("div",{className:"w-7 h-7 rounded-[8px] flex items-center justify-center bg-primary",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-white text-base",children:"terminal"})}),(0,s.jsx)("span",{className:"text-xs font-bold uppercase tracking-wider text-primary font-mono",children:"9Remote"})]}),(0,s.jsx)("button",{onClick:t,className:"p-1.5 rounded-[10px] text-text-muted hover:bg-surface-2 hover:text-text-main transition-colors",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-base",children:"close"})})]}),(0,s.jsxs)("div",{className:"px-7 py-7 pb-9 flex flex-col gap-6",children:[(0,s.jsxs)("div",{className:"flex flex-col items-center gap-2 text-center mt-2",children:[(0,s.jsx)("div",{className:"w-14 h-14 rounded-[14px] flex items-center justify-center mb-1 bg-primary shadow-[var(--shadow-warm)]",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-white text-[30px]",children:"terminal"})}),(0,s.jsx)("h1",{className:"text-lg font-bold text-text-main tracking-tight",children:"9Remote"}),(0,s.jsx)("p",{className:"text-xs text-text-muted leading-5 max-w-[220px]",children:"Access your terminal, desktop & files from anywhere"})]}),(0,s.jsx)("div",{className:"flex gap-2 w-full",children:n.map(({icon:e,label:t,desc:r})=>(0,s.jsxs)("div",{className:"flex-1 flex flex-col items-center gap-1.5 py-4 px-1 rounded-[10px] border border-border-subtle bg-surface-2",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-primary text-[22px]",children:e}),(0,s.jsx)("p",{className:"text-xs font-semibold text-text-main",children:t}),(0,s.jsx)("p",{className:"text-[10px] text-text-muted text-center leading-4",children:r})]},t))}),(0,s.jsx)("div",{className:"flex flex-col gap-3 w-full",children:i.map(({icon:e,text:t})=>(0,s.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,s.jsx)("span",{className:"material-symbols-outlined flex-shrink-0 text-primary text-[16px]",children:e}),(0,s.jsx)("span",{className:"text-xs text-text-muted",children:t})]},e))}),(0,s.jsxs)("button",{onClick:()=>window.open("https://9remote.cc","_blank"),className:"w-full py-3 flex items-center justify-center gap-2 text-sm font-semibold text-white rounded-[10px] bg-primary hover:bg-primary-hover shadow-[var(--shadow-warm)] active:scale-[0.98] transition-all",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-base",children:"open_in_new"}),"Get 9Remote"]})]})]})]}),document.body):null}},21110:(e,t,r)=>{r.d(t,{ThemeProvider:()=>n});var s=r(95155),a=r(12115),l=r(90085);function n({children:e}){let{initTheme:t}=(0,l.A)();return(0,a.useEffect)(()=>{t()},[t]),(0,s.jsx)(s.Fragment,{children:e})}},21931:(e,t,r)=>{r.d(t,{default:()=>d});var s=r(95155),a=r(12115),l=r(47650),n=r(93308),i=r(73006);let o=e=>({en:{name:"English",flag:"\uD83C\uDDFA\uD83C\uDDF8"},vi:{name:"Tiếng Việt",flag:"\uD83C\uDDFB\uD83C\uDDF3"},"zh-CN":{name:"简体中文",flag:"\uD83C\uDDE8\uD83C\uDDF3"},"zh-TW":{name:"繁體中文",flag:"\uD83C\uDDF9\uD83C\uDDFC"},ja:{name:"日本語",flag:"\uD83C\uDDEF\uD83C\uDDF5"},"pt-BR":{name:"Portugu\xeas (Brasil)",flag:"\uD83C\uDDE7\uD83C\uDDF7"},"pt-PT":{name:"Portugu\xeas (Portugal)",flag:"\uD83C\uDDF5\uD83C\uDDF9"},ko:{name:"한국어",flag:"\uD83C\uDDF0\uD83C\uDDF7"},es:{name:"Espa\xf1ol",flag:"\uD83C\uDDEA\uD83C\uDDF8"},de:{name:"Deutsch",flag:"\uD83C\uDDE9\uD83C\uDDEA"},fr:{name:"Fran\xe7ais",flag:"\uD83C\uDDEB\uD83C\uDDF7"},he:{name:"עברית",flag:"\uD83C\uDDEE\uD83C\uDDF1"},ar:{name:"العربية",flag:"\uD83C\uDDF8\uD83C\uDDE6"},ru:{name:"Русский",flag:"\uD83C\uDDF7\uD83C\uDDFA"},pl:{name:"Polski",flag:"\uD83C\uDDF5\uD83C\uDDF1"},cs:{name:"Čeština",flag:"\uD83C\uDDE8\uD83C\uDDFF"},nl:{name:"Nederlands",flag:"\uD83C\uDDF3\uD83C\uDDF1"},tr:{name:"T\xfcrk\xe7e",flag:"\uD83C\uDDF9\uD83C\uDDF7"},uk:{name:"Українська",flag:"\uD83C\uDDFA\uD83C\uDDE6"},tl:{name:"Tagalog",flag:"\uD83C\uDDF5\uD83C\uDDED"},id:{name:"Indonesia",flag:"\uD83C\uDDEE\uD83C\uDDE9"},th:{name:"ไทย",flag:"\uD83C\uDDF9\uD83C\uDDED"},hi:{name:"हिन्दी",flag:"\uD83C\uDDEE\uD83C\uDDF3"},bn:{name:"বাংলা",flag:"\uD83C\uDDE7\uD83C\uDDE9"},ur:{name:"اردو",flag:"\uD83C\uDDF5\uD83C\uDDF0"},ro:{name:"Rom\xe2nă",flag:"\uD83C\uDDF7\uD83C\uDDF4"},sv:{name:"Svenska",flag:"\uD83C\uDDF8\uD83C\uDDEA"},it:{name:"Italiano",flag:"\uD83C\uDDEE\uD83C\uDDF9"},el:{name:"Ελληνικά",flag:"\uD83C\uDDEC\uD83C\uDDF7"},hu:{name:"Magyar",flag:"\uD83C\uDDED\uD83C\uDDFA"},fi:{name:"Suomi",flag:"\uD83C\uDDEB\uD83C\uDDEE"},da:{name:"Dansk",flag:"\uD83C\uDDE9\uD83C\uDDF0"},no:{name:"Norsk",flag:"\uD83C\uDDF3\uD83C\uDDF4"}})[e]||{name:e,flag:"\uD83C\uDF10"};function d({className:e="",isOpen:t,onClose:r,hideTrigger:c=!1}){let[m,u]=(0,a.useState)("en"),[x,p]=(0,a.useState)(!1),[h,b]=(0,a.useState)(!1),f=(0,a.useRef)(null),g="boolean"==typeof t,y=g?t:h,v=e=>{g?!e&&r&&r(m):b(e)};(0,a.useEffect)(()=>{u(function(){if("u"<typeof document)return"en";let e=document.cookie.split(";").find(e=>e.trim().startsWith(`${n.CL}=`)),t=e?decodeURIComponent(e.split("=")[1]):"en";return(0,n.QC)(t)}())},[]),(0,a.useEffect)(()=>{function e(e){f.current&&!f.current.contains(e.target)&&v(!1)}if(y)return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[y]);let j=async e=>{if(e!==m&&!x){p(!0),v(!1);try{await fetch("/api/locale",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({locale:e})}),await (0,i.wn)(),u(e)}catch(e){console.error("Failed to set locale:",e)}finally{p(!1)}}};return(0,s.jsxs)("div",{className:e,children:[!c&&(0,s.jsxs)("button",{onClick:()=>v(!y),disabled:x,className:"flex items-center gap-2 px-3 py-2 rounded-lg text-text-muted hover:text-text-main hover:bg-surface/60 transition-colors",title:"Language","data-i18n-skip":"true",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"language"}),(0,s.jsx)("span",{className:"text-sm font-medium",children:o(m).name}),(0,s.jsx)("span",{className:"text-lg",children:o(m).flag})]}),y&&(0,l.createPortal)((0,s.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4","data-i18n-skip":"true",children:[(0,s.jsx)("div",{className:"absolute inset-0 bg-black/30 backdrop-blur-sm",onClick:()=>v(!1)}),(0,s.jsxs)("div",{ref:f,className:"relative w-full bg-surface border border-black/10 dark:border-white/10 rounded-xl shadow-2xl animate-in fade-in zoom-in-95 duration-200 max-w-2xl flex flex-col max-h-[80vh]",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between p-3 border-b border-black/5 dark:border-white/5",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Select Language"}),(0,s.jsx)("button",{onClick:()=>v(!1),className:"p-1.5 rounded-lg text-text-muted hover:bg-black/5 dark:hover:bg-white/5 transition-colors","aria-label":"Close",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"close"})})]}),(0,s.jsx)("div",{className:"p-6 overflow-y-auto flex-1",children:(0,s.jsx)("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(100px,1fr))] gap-2",children:n.YZ.map(e=>{let t=m===e,r=o(e);return(0,s.jsxs)("button",{onClick:()=>j(e),disabled:x,className:`flex flex-col items-center justify-start gap-1 px-2 py-3 rounded-lg text-xs font-medium transition-colors w-full ${t?"bg-primary/15 text-primary ring-2 ring-primary":"text-text-main hover:bg-black/5 dark:hover:bg-white/5"} ${x?"opacity-70 cursor-wait":""}`,title:r.name,children:[(0,s.jsx)("span",{className:"text-2xl",children:r.flag}),(0,s.jsx)("span",{className:"text-center leading-tight line-clamp-2 h-8 flex items-center",children:r.name}),t&&(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"check"})]},e)})})})]})]}),document.body)]})}},23615:(e,t,r)=>{r.d(t,{default:()=>n});var s=r(95155),a=r(12115),l=r(84588);function n(){let[e,t]=(0,a.useState)([]),[r,n]=(0,a.useState)(!0),[i,o]=(0,a.useState)(!0);(0,a.useEffect)(()=>{d()},[]),(0,a.useEffect)(()=>{let e;return i&&(e=setInterval(()=>{d(!1)},3e3)),()=>clearInterval(e)},[i]);let d=async(e=!0)=>{e&&n(!0);try{let e=await fetch("/api/usage/request-logs");if(e.ok){let r=await e.json();t(r)}}catch(e){console.error("Failed to fetch logs:",e)}finally{e&&n(!1)}};return(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)("h2",{className:"text-xl font-semibold",children:"Request Logs"}),(0,s.jsx)("div",{className:"flex items-center gap-2",children:(0,s.jsxs)("label",{className:"text-sm font-medium text-text-muted flex items-center gap-2 cursor-pointer",children:[(0,s.jsx)("span",{children:"Auto Refresh (3s)"}),(0,s.jsx)("div",{onClick:()=>o(!i),className:`relative inline-flex h-5 w-9 items-center rounded-full transition-colors focus:outline-none ${i?"bg-primary":"bg-bg-subtle border border-border"}`,children:(0,s.jsx)("span",{className:`inline-block h-3 w-3 transform rounded-full bg-white transition-transform ${i?"translate-x-5":"translate-x-1"}`})})]})})]}),(0,s.jsx)(l.default,{className:"overflow-hidden bg-black/5 dark:bg-black/20",children:(0,s.jsx)("div",{className:"p-0 overflow-x-auto max-h-[600px] overflow-y-auto font-mono text-xs",children:r&&0===e.length?(0,s.jsx)("div",{className:"p-8 text-center text-text-muted",children:"Loading logs..."}):0===e.length?(0,s.jsx)("div",{className:"p-8 text-center text-text-muted",children:"No logs recorded yet."}):(0,s.jsxs)("table",{className:"w-full text-left border-collapse whitespace-nowrap",children:[(0,s.jsx)("thead",{className:"sticky top-0 bg-bg-subtle border-b border-border z-10",children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{className:"px-3 py-2 border-r border-border",children:"DateTime"}),(0,s.jsx)("th",{className:"px-3 py-2 border-r border-border",children:"Model"}),(0,s.jsx)("th",{className:"px-3 py-2 border-r border-border",children:"Provider"}),(0,s.jsx)("th",{className:"px-3 py-2 border-r border-border",children:"Account"}),(0,s.jsx)("th",{className:"px-3 py-2 border-r border-border",children:"In"}),(0,s.jsx)("th",{className:"px-3 py-2 border-r border-border",children:"Out"}),(0,s.jsx)("th",{className:"px-3 py-2",children:"Status"})]})}),(0,s.jsx)("tbody",{className:"divide-y divide-border/50",children:e.map((e,t)=>{let r=e.split(" | ");if(r.length<7)return null;let a=r[6],l=a.includes("PENDING"),n=a.includes("FAILED"),i=a.includes("OK");return(0,s.jsxs)("tr",{className:`hover:bg-primary/5 transition-colors ${l?"bg-primary/5":""}`,children:[(0,s.jsx)("td",{className:"px-3 py-1.5 border-r border-border text-text-muted",children:r[0]}),(0,s.jsx)("td",{className:"px-3 py-1.5 border-r border-border font-medium",children:r[1]}),(0,s.jsx)("td",{className:"px-3 py-1.5 border-r border-border",children:(0,s.jsx)("span",{className:"px-1.5 py-0.5 rounded bg-bg-subtle border border-border text-[10px] uppercase font-bold",children:r[2]})}),(0,s.jsx)("td",{className:"px-3 py-1.5 border-r border-border truncate max-w-[150px]",title:r[3],children:r[3]}),(0,s.jsx)("td",{className:"px-3 py-1.5 border-r border-border text-right text-primary",children:r[4]}),(0,s.jsx)("td",{className:"px-3 py-1.5 border-r border-border text-right text-success",children:r[5]}),(0,s.jsx)("td",{className:`px-3 py-1.5 font-bold ${i?"text-success":n?"text-error":"text-primary animate-pulse"}`,children:a})]},t)})})]})})}),(0,s.jsx)("div",{className:"text-[10px] text-text-muted italic",children:"Logs are loaded from the request history database."})]})}},23936:(e,t,r)=>{r.d(t,{default:()=>o});var s=r(95155),a=r(12115),l=r(14051),n=r.n(l),i=r(35497);function o({isOpen:e,onSuccess:t,onClose:r}){let[l,n]=(0,a.useState)(""),[d,c]=(0,a.useState)(!1),[m,u]=(0,a.useState)(null),[x,p]=(0,a.useState)(!1),h=async()=>{if(!l.trim())return void u("Please paste your cookie");c(!0),u(null);try{let e=await fetch("/api/oauth/iflow/cookie",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cookie:l.trim()})}),r=await e.json();if(!e.ok)throw Error(r.error||"Authentication failed");p(!0),setTimeout(()=>{t?.(),b()},1500)}catch(e){u(e.message)}finally{c(!1)}},b=()=>{n(""),u(null),p(!1),r?.()};return(0,s.jsx)(i.aF,{isOpen:e,onClose:b,title:"iFlow Cookie Authentication",children:(0,s.jsx)("div",{className:"space-y-4",children:x?(0,s.jsxs)("div",{className:"text-center py-8",children:[(0,s.jsx)("div",{className:"text-6xl mb-4",children:"✅"}),(0,s.jsx)("p",{className:"text-lg font-medium text-text-primary",children:"Authentication Successful!"}),(0,s.jsx)("p",{className:"text-sm text-text-muted mt-2",children:"Fresh API key obtained"})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsxs)("p",{className:"text-sm text-text-muted",children:["To get a fresh API key, paste your browser cookie from"," ",(0,s.jsx)("a",{href:"https://platform.iflow.cn",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"platform.iflow.cn"})]}),(0,s.jsxs)("div",{className:"bg-surface-secondary p-3 rounded-lg text-xs space-y-2",children:[(0,s.jsx)("p",{className:"font-medium text-text-primary",children:"How to get cookie:"}),(0,s.jsxs)("ol",{className:"list-decimal list-inside space-y-1 text-text-muted",children:[(0,s.jsx)("li",{children:"Open platform.iflow.cn in your browser"}),(0,s.jsx)("li",{children:"Login to your account"}),(0,s.jsx)("li",{children:"Open DevTools (F12) → Application/Storage → Cookies"}),(0,s.jsx)("li",{children:"Copy the entire cookie string (must include BXAuth)"}),(0,s.jsx)("li",{children:"Paste it below"})]})]})]}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("label",{className:"block text-sm font-medium text-text-primary",children:"Cookie String"}),(0,s.jsx)("textarea",{value:l,onChange:e=>n(e.target.value),placeholder:"BXAuth=xxx; ...",className:"w-full px-3 py-2 bg-surface-secondary border border-border rounded-lg text-sm text-text-primary placeholder-text-muted focus:outline-none focus:ring-2 focus:ring-primary resize-none",rows:4,disabled:d})]}),m&&(0,s.jsx)("div",{className:"p-3 bg-error/10 border border-error/20 rounded-lg",children:(0,s.jsx)("p",{className:"text-sm text-error",children:m})}),(0,s.jsxs)("div",{className:"flex gap-3 pt-2",children:[(0,s.jsx)(i.$n,{variant:"secondary",onClick:b,disabled:d,fullWidth:!0,children:"Cancel"}),(0,s.jsx)(i.$n,{onClick:h,loading:d,fullWidth:!0,children:"Authenticate"})]})]})})})}o.propTypes={isOpen:n().bool.isRequired,onSuccess:n().func,onClose:n().func}},25086:(e,t,r)=>{r.d(t,{CardSkeleton:()=>o,PageLoading:()=>n,Skeleton:()=>i,Spinner:()=>l,default:()=>d});var s=r(95155),a=r(31474);function l({size:e="md",className:t}){return(0,s.jsx)("span",{className:(0,a.cn)("material-symbols-outlined animate-spin text-brand-500",{sm:"size-4",md:"size-6",lg:"size-8",xl:"size-12"}[e],t),children:"progress_activity"})}function n({message:e="Loading..."}){return(0,s.jsxs)("div",{className:"fixed inset-0 z-50 flex flex-col items-center justify-center bg-bg",children:[(0,s.jsx)(l,{size:"xl"}),(0,s.jsx)("p",{className:"mt-4 text-text-muted",children:e})]})}function i({className:e,...t}){return(0,s.jsx)("div",{className:(0,a.cn)("animate-pulse rounded-[10px] bg-surface-2",e),...t})}function o(){return(0,s.jsxs)("div",{className:"p-6 rounded-[14px] border border-border-subtle bg-surface shadow-[var(--shadow-soft)]",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,s.jsx)(i,{className:"h-4 w-24"}),(0,s.jsx)(i,{className:"size-10 rounded-[10px]"})]}),(0,s.jsx)(i,{className:"h-8 w-16 mb-2"}),(0,s.jsx)(i,{className:"h-3 w-20"})]})}function d({type:e="spinner",...t}){switch(e){case"page":return(0,s.jsx)(n,{...t});case"skeleton":return(0,s.jsx)(i,{...t});case"card":return(0,s.jsx)(o,{...t});default:return(0,s.jsx)(l,{...t})}}},28058:(e,t,r)=>{r.d(t,{default:()=>n});var s=r(95155),a=r(12115),l=r(81127);function n({isOpen:e,onClose:t,onAdd:r,addedNames:i=[]}){let[o,d]=(0,a.useState)([]),[c,m]=(0,a.useState)(!1),[u,x]=(0,a.useState)(""),[p,h]=(0,a.useState)("all"),[b,f]=(0,a.useState)(null),[g,y]=(0,a.useState)(null),[v,j]=(0,a.useState)({}),[N,w]=(0,a.useState)({}),[k,C]=(0,a.useState)({});(0,a.useEffect)(()=>{!e||o.length>0||(m(!0),fetch("/api/cli-tools/cowork-mcp-registry").then(e=>e.json()).then(e=>{e.error?f(e.error):d(e.servers||[])}).catch(e=>f(e.message)).finally(()=>m(!1)))},[e]);let S=(0,a.useMemo)(()=>new Set(i),[i]),T=(0,a.useMemo)(()=>{let e=u.trim().toLowerCase();return o.filter(t=>("authless"!==p||!t.oauth)&&("oauth"!==p||!!t.oauth)&&(!e||(t.title||"").toLowerCase().includes(e)||(t.description||"").toLowerCase().includes(e)||(t.name||"").toLowerCase().includes(e)))},[o,u,p]),A=async e=>{if(!v[e.url]){w(t=>({...t,[e.url]:!0}));try{let t=await fetch("/api/cli-tools/cowork-mcp-tools",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:e.url})}),r=await t.json(),s=r.tools||[],a=Array.isArray(e.toolNames)?e.toolNames:[],l=s.length>0?s.map(e=>e.name):a;j(t=>({...t,[e.url]:{tools:s,requiresAuth:!!r.requiresAuth,error:r.error}})),C(t=>({...t,[e.url]:Object.fromEntries(l.map(e=>[e,!0]))}))}catch(t){j(r=>({...r,[e.url]:{tools:[],error:t.message}}))}finally{w(t=>({...t,[e.url]:!1}))}}},_=(e,t)=>{let r=k[e]||{};C(s=>({...s,[e]:Object.fromEntries(Object.keys(r).map(e=>[e,t]))}))};return(0,s.jsx)(l.default,{isOpen:e,onClose:t,title:"Browse MCP Marketplace",size:"lg",children:(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("input",{type:"text",value:u,onChange:e=>x(e.target.value),placeholder:"Search by name or description...",className:"flex-1 px-2 py-1.5 bg-surface rounded text-xs border border-border focus:outline-none focus:ring-1 focus:ring-primary/50"}),(0,s.jsxs)("select",{value:p,onChange:e=>h(e.target.value),className:"px-2 py-1.5 bg-surface rounded text-xs border border-border focus:outline-none focus:ring-1 focus:ring-primary/50",children:[(0,s.jsx)("option",{value:"all",children:"All"}),(0,s.jsx)("option",{value:"authless",children:"Authless"}),(0,s.jsx)("option",{value:"oauth",children:"OAuth"})]})]}),b&&(0,s.jsx)("div",{className:"px-2 py-1.5 rounded text-xs bg-red-500/10 text-red-600",children:b}),c&&(0,s.jsxs)("div",{className:"flex items-center gap-2 text-text-muted text-xs py-4 justify-center",children:[(0,s.jsx)("span",{className:"material-symbols-outlined animate-spin text-[18px]",children:"progress_activity"}),(0,s.jsx)("span",{children:"Loading registry..."})]}),!c&&(0,s.jsxs)("div",{className:"flex flex-col gap-1 max-h-[60vh] overflow-y-auto",children:[0===T.length&&(0,s.jsx)("div",{className:"text-center text-xs text-text-muted py-6",children:"No servers match filter"}),T.map(e=>{let t=S.has(e.slug||e.name),a=g===e.url,l=v[e.url],n=N[e.url],i=k[e.url]||{},o=Object.keys(i),d=Object.values(i).filter(Boolean).length;return(0,s.jsxs)("div",{className:"rounded border border-transparent hover:border-border",children:[(0,s.jsxs)("div",{className:"flex items-start gap-2 px-2 py-2 hover:bg-black/5 dark:hover:bg-white/5",children:[e.iconUrl?(0,s.jsx)("img",{src:e.iconUrl,alt:"",className:"size-7 rounded shrink-0 object-contain",onError:e=>{e.target.style.display="none"}}):(0,s.jsx)("div",{className:"size-7 rounded bg-surface shrink-0"}),(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsxs)("div",{className:"flex items-center gap-1.5 flex-wrap",children:[(0,s.jsx)("span",{className:"font-medium text-xs",children:e.title}),e.oauth?(0,s.jsx)("span",{className:"px-1 py-0.5 text-[9px] rounded bg-amber-500/10 text-amber-600",children:"OAuth"}):(0,s.jsx)("span",{className:"px-1 py-0.5 text-[9px] rounded bg-green-500/10 text-green-600",children:"Authless"}),e.toolCount>0&&(0,s.jsxs)("span",{className:"text-[10px] text-text-muted",children:[e.toolCount," tools"]})]}),e.description&&(0,s.jsx)("p",{className:"text-[10px] text-text-muted line-clamp-2 mt-0.5",children:e.description})]}),(0,s.jsx)("button",{onClick:()=>t?null:void(g===e.url?y(null):(y(e.url),A(e))),disabled:t,className:`shrink-0 px-2 py-1 rounded text-[10px] font-medium transition-colors ${t?"bg-green-500/10 text-green-600 cursor-default":a?"bg-surface border border-border text-text-muted hover:bg-black/5":"bg-primary/10 border border-primary/40 text-primary hover:bg-primary/20"}`,children:t?"Added":a?"Cancel":"+ Add"})]}),a&&(0,s.jsxs)("div",{className:"px-3 py-2 bg-surface/40 border-t border-border flex flex-col gap-2",children:[n&&(0,s.jsxs)("div",{className:"flex items-center gap-2 text-text-muted text-[10px] py-1",children:[(0,s.jsx)("span",{className:"material-symbols-outlined animate-spin text-[14px]",children:"progress_activity"}),(0,s.jsx)("span",{children:"Probing server for tools..."})]}),!n&&l?.requiresAuth&&(0,s.jsx)("p",{className:"text-[10px] text-amber-600 bg-amber-500/10 px-2 py-1 rounded",children:"\uD83D\uDD10 OAuth required. Add now and authenticate after Apply; tool list will be discovered after first connect."}),!n&&l?.error&&!l?.requiresAuth&&(0,s.jsxs)("p",{className:"text-[10px] text-red-600 bg-red-500/10 px-2 py-1 rounded",children:["Probe failed: ",l.error]}),!n&&0===o.length&&!l?.requiresAuth&&!l?.error&&(0,s.jsx)("p",{className:"text-[10px] text-text-muted",children:"No tools advertised by server."}),!n&&o.length>0&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("span",{className:"text-[10px] text-text-muted",children:[d,"/",o.length," tools enabled"]}),(0,s.jsxs)("div",{className:"flex gap-1",children:[(0,s.jsx)("button",{onClick:()=>_(e.url,!0),className:"text-[10px] text-primary hover:underline",children:"All"}),(0,s.jsx)("span",{className:"text-[10px] text-text-muted",children:"\xb7"}),(0,s.jsx)("button",{onClick:()=>_(e.url,!1),className:"text-[10px] text-primary hover:underline",children:"None"})]})]}),(0,s.jsx)("div",{className:"grid grid-cols-2 gap-1 max-h-40 overflow-y-auto",children:o.map(t=>(0,s.jsxs)("label",{className:"flex items-center gap-1.5 text-[10px] cursor-pointer hover:bg-black/5 dark:hover:bg-white/5 px-1 rounded",children:[(0,s.jsx)("input",{type:"checkbox",checked:!!i[t],onChange:()=>{var r;return r=e.url,void C(e=>({...e,[r]:{...e[r],[t]:!e[r]?.[t]}}))},className:"size-3"}),(0,s.jsx)("span",{className:"truncate",children:t})]},t))})]}),(0,s.jsx)("button",{onClick:()=>{let t,s;return s=Object.keys(t=k[e.url]||{}).filter(e=>t[e]),void(r?.({name:e.slug||e.name,title:e.title,description:e.description,url:e.url,transport:e.transport,oauth:e.oauth,toolNames:s}),y(null))},className:"self-end px-2 py-1 rounded text-[10px] font-medium bg-primary text-white hover:bg-primary/90",children:"✓ Confirm Add"})]})]},e.url)})]}),(0,s.jsxs)("div",{className:"text-[10px] text-text-muted text-right",children:[T.length," of ",o.length," servers"]})]})})}},28067:(e,t,r)=>{r.d(t,{default:()=>l});var s=r(95155),a=r(31474);function l({options:e=[],value:t,onChange:r,size:n="md",className:i}){let o={sm:"h-7 text-xs",md:"h-9 text-sm",lg:"h-11 text-base"};return(0,s.jsx)("div",{className:(0,a.cn)("inline-flex items-center p-1 rounded-[10px] overflow-x-auto","bg-surface-2",i),children:e.map(e=>(0,s.jsxs)("button",{onClick:()=>r(e.value),className:(0,a.cn)("shrink-0 px-4 rounded-[8px] font-medium transition-all",o[n],t===e.value?"bg-surface text-text-main shadow-sm":"text-text-muted hover:text-text-main"),children:[e.icon&&(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px] mr-1.5",children:e.icon}),e.label]},e.value))})}},28815:(e,t,r)=>{r.d(t,{default:()=>o});var s=r(95155),a=r(12115),l=r(81127),n=r(92542),i=r(11059);function o({isOpen:e,onClose:t,title:r="Manual Configuration",configs:d=[]}){let{copy:c}=(0,i.C)(),[m,u]=(0,a.useState)(null);return(0,s.jsx)(l.default,{isOpen:e,onClose:t,title:r,size:"xl",children:(0,s.jsx)("div",{className:"flex flex-col gap-4",children:d.map((e,t)=>(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)("span",{className:"text-sm font-medium text-text-main",children:e.filename}),(0,s.jsxs)(n.default,{variant:"ghost",size:"sm",onClick:()=>{var r;return r=e.content,void(c(r,`manualconfig-${t}`),u(t),setTimeout(()=>u(null),2e3))},children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:m===t?"check":"content_copy"}),m===t?"Copied!":"Copy"]})]}),(0,s.jsx)("pre",{className:"px-3 py-2 bg-black/5 dark:bg-white/5 rounded font-mono text-xs overflow-x-auto whitespace-pre-wrap break-all max-h-60 overflow-y-auto border border-border",children:e.content})]},t))})})}},30815:(e,t,r)=>{r.d(t,{default:()=>o});var s=r(95155),a=r(12115),l=r(14051),n=r.n(l),i=r(35497);function o({isOpen:e,onSuccess:t,onClose:r}){let[l,n]=(0,a.useState)(""),[d,c]=(0,a.useState)(""),[m,u]=(0,a.useState)(null),[x,p]=(0,a.useState)(!1),[h,b]=(0,a.useState)(!1),[f,g]=(0,a.useState)(!1),[y,v]=(0,a.useState)(!1),j=async()=>{b(!0),u(null),g(!1),v(!1);try{let e=await fetch("/api/oauth/cursor/auto-import"),t=await e.json();t.found?(n(t.accessToken),c(t.machineId),g(!0)):t.windowsManual?v(!0):u(t.error||"Could not auto-detect tokens")}catch(e){u("Failed to auto-detect tokens")}finally{b(!1)}};(0,a.useEffect)(()=>{e&&j()},[e]);let N=async()=>{if(!l.trim())return void u("Please enter an access token");if(!d.trim())return void u("Please enter a machine ID");p(!0),u(null);try{let e=await fetch("/api/oauth/cursor/import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accessToken:l.trim(),machineId:d.trim()})}),s=await e.json();if(!e.ok)throw Error(s.error||"Import failed");t?.(),r()}catch(e){u(e.message)}finally{p(!1)}};return(0,s.jsx)(i.aF,{isOpen:e,title:"Connect Cursor IDE",onClose:r,children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[h&&(0,s.jsxs)("div",{className:"text-center py-6",children:[(0,s.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-primary/10 flex items-center justify-center",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-3xl text-primary animate-spin",children:"progress_activity"})}),(0,s.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Auto-detecting tokens..."}),(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"Reading from Cursor IDE database"})]}),!h&&(0,s.jsxs)(s.Fragment,{children:[f&&(0,s.jsx)("div",{className:"bg-green-50 dark:bg-green-900/20 p-3 rounded-lg border border-green-200 dark:border-green-800",children:(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-green-600 dark:text-green-400",children:"check_circle"}),(0,s.jsx)("p",{className:"text-sm text-green-800 dark:text-green-200",children:"Tokens auto-detected from Cursor IDE successfully!"})]})}),y&&(0,s.jsxs)("div",{className:"bg-amber-50 dark:bg-amber-900/20 p-3 rounded-lg border border-amber-200 dark:border-amber-800 flex flex-col gap-2",children:[(0,s.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-amber-600 dark:text-amber-400",children:"info"}),(0,s.jsx)("p",{className:"text-sm font-medium text-amber-800 dark:text-amber-200",children:"Could not read Cursor database automatically."})]}),(0,s.jsxs)("p",{className:"text-xs text-amber-700 dark:text-amber-300",children:["Make sure Cursor IDE has been opened at least once, then click ",(0,s.jsx)("strong",{children:"Retry"}),". If the problem persists, paste your tokens manually below."]}),(0,s.jsx)(i.$n,{onClick:j,variant:"outline",fullWidth:!0,children:"Retry"})]}),!f&&!y&&!m&&(0,s.jsx)("div",{className:"bg-blue-50 dark:bg-blue-900/20 p-3 rounded-lg border border-blue-200 dark:border-blue-800",children:(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-blue-600 dark:text-blue-400",children:"info"}),(0,s.jsx)("p",{className:"text-sm text-blue-800 dark:text-blue-200",children:"Cursor IDE not detected. Please paste your tokens manually."})]})}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("label",{className:"block text-sm font-medium mb-2",children:["Access Token ",(0,s.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,s.jsx)("textarea",{value:l,onChange:e=>n(e.target.value),placeholder:"Access token will be auto-filled...",rows:3,className:"w-full px-3 py-2 text-sm font-mono border border-border rounded-lg bg-background focus:outline-none focus:border-primary resize-none"})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("label",{className:"block text-sm font-medium mb-2",children:["Machine ID ",(0,s.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,s.jsx)(i.pd,{value:d,onChange:e=>c(e.target.value),placeholder:"Machine ID will be auto-filled...",className:"font-mono text-sm"})]}),m&&(0,s.jsx)("div",{className:"bg-red-50 dark:bg-red-900/20 p-3 rounded-lg border border-red-200 dark:border-red-800",children:(0,s.jsx)("p",{className:"text-sm text-red-600 dark:text-red-400",children:m})}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(i.$n,{onClick:N,fullWidth:!0,disabled:x||!l.trim()||!d.trim(),children:x?"Importing...":"Import Token"}),(0,s.jsx)(i.$n,{onClick:r,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})})}o.propTypes={isOpen:n().bool.isRequired,onSuccess:n().func,onClose:n().func.isRequired}},31474:(e,t,r)=>{r.d(t,{cn:()=>s});function s(...e){return e.filter(Boolean).join(" ").replace(/\s+/g," ").trim()}},35497:(e,t,r)=>{r.d(t,{x0:()=>w.default,Ex:()=>d.default,$n:()=>s.default,Zp:()=>n.default,Qv:()=>o.CardSkeleton,CK:()=>p.default,uo:()=>i.ConfirmModal,G9:()=>y.default,wI:()=>N.default,vj:()=>j.default,vE:()=>v.default,pd:()=>a.default,Mh:()=>g.default,uR:()=>x.default,Nf:()=>h.default,aF:()=>i.default,rq:()=>u.default,gw:()=>k.default,LF:()=>m.default,Wx:()=>T.default,gM:()=>f.default,Iz:()=>C.default,l6:()=>l.default,lM:()=>c.default,m_:()=>S.default,jK:()=>b.default});var s=r(92542),a=r(11910),l=r(98),n=r(84588),i=r(81127),o=r(25086);r(56319);var d=r(56061),c=r(98542);r(38587),r(21110),r(92622),r(74891),r(92173);var m=r(90882),u=r(72908),x=r(28815),p=r(45455),h=r(28058),b=r(4809);r(21931),r(36548),r(80752),r(40197);var f=r(23615);r(61500);var g=r(62899);r(94230);var y=r(30815),v=r(23936),j=r(95088),N=r(73579),w=r(96748),k=r(4823),C=r(28067),S=r(97677),T=r(51825);r(44656),r(70255),r(86671),r(91450)},36548:(e,t,r)=>{r.d(t,{default:()=>n});var s=r(95155),a=r(12115),l=r(14932);function n(){let[e,t]=(0,a.useState)(!1);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("button",{onClick:()=>t(!0),className:"relative flex items-center gap-1.5 px-2.5 py-1.5 rounded-lg transition-all text-text-muted hover:text-text-main hover:bg-black/5 dark:hover:bg-white/5",title:"9Remote",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"computer"}),(0,s.jsx)("span",{className:"text-xs font-medium",children:"Remote"})]}),(0,s.jsx)(l.A,{isOpen:e,onClose:()=>t(!1)})]})}},38003:(e,t,r)=>{r.d(t,{C:()=>s});let s=(0,r(1934).v)(e=>({query:"",placeholder:"",visible:!1,setQuery:t=>e({query:t}),register:(t="Search...")=>e({visible:!0,placeholder:t,query:""}),unregister:()=>e({visible:!1,placeholder:"",query:""})}))},38587:(e,t,r)=>{r.d(t,{default:()=>n});var s=r(95155),a=r(1620),l=r(31474);function n({className:e,variant:t="default"}){let{isDark:r,toggleTheme:i}=(0,a.D)(),o={default:(0,l.cn)("flex items-center justify-center size-10 rounded-full","text-text-muted hover:text-text-main","hover:bg-surface-2 transition-colors"),card:(0,l.cn)("flex items-center justify-center size-11 rounded-full","bg-surface/60 hover:bg-surface","border border-border","backdrop-blur-md shadow-sm hover:shadow-[var(--shadow-warm)]","text-text-muted hover:text-brand-500","transition-all group")};return(0,s.jsx)("button",{onClick:i,className:(0,l.cn)(o[t],e),"aria-label":`Switch to ${r?"light":"dark"} mode`,title:`Switch to ${r?"light":"dark"} mode`,children:(0,s.jsx)("span",{className:(0,l.cn)("material-symbols-outlined text-[22px]","card"===t&&"transition-transform duration-300 group-hover:rotate-12"),children:r?"light_mode":"dark_mode"})})}},40197:(e,t,r)=>{r.d(t,{default:()=>c});var s=r(95155),a=r(12115),l=r(47650),n=r(14051),i=r.n(n),o=r(9233),d=r(90620);function c({isOpen:e,onClose:t}){let[r,n]=(0,a.useState)(""),[i,m]=(0,a.useState)(!1),[u,x]=(0,a.useState)(""),p=(0,a.useRef)(null);return((0,a.useEffect)(()=>{e&&!r&&(m(!0),x(""),fetch(d.Nu.changelogUrl).then(e=>{if(!e.ok)throw Error(`HTTP ${e.status}`);return e.text()}).then(e=>n(o.xI.parse(e))).catch(e=>x(e.message||"Failed to load")).finally(()=>m(!1)))},[e,r]),(0,a.useEffect)(()=>{let r=e=>{p.current&&!p.current.contains(e.target)&&t()};if(e)return document.addEventListener("mousedown",r),()=>document.removeEventListener("mousedown",r)},[e,t]),!e||"u"<typeof document)?null:(0,l.createPortal)((0,s.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[(0,s.jsx)("div",{className:"absolute inset-0 bg-black/30 backdrop-blur-sm",onClick:t}),(0,s.jsxs)("div",{ref:p,className:"relative w-full bg-surface border border-black/10 dark:border-white/10 rounded-xl shadow-2xl animate-in fade-in zoom-in-95 duration-200 max-w-3xl flex flex-col max-h-[85vh]",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between p-3 border-b border-black/5 dark:border-white/5",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Change Log"}),(0,s.jsx)("button",{onClick:t,className:"p-1.5 rounded-lg text-text-muted hover:bg-black/5 dark:hover:bg-white/5 transition-colors","aria-label":"Close",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"close"})})]}),(0,s.jsxs)("div",{className:"p-6 overflow-y-auto flex-1",children:[i&&(0,s.jsxs)("div",{className:"flex items-center justify-center py-10 text-text-muted",children:[(0,s.jsx)("span",{className:"material-symbols-outlined animate-spin mr-2",children:"progress_activity"}),"Loading..."]}),u&&(0,s.jsxs)("div",{className:"text-red-500 py-4",children:["Failed to load changelog: ",u]}),!i&&!u&&r&&(0,s.jsx)("div",{className:"changelog-body text-text-main",dangerouslySetInnerHTML:{__html:r}})]})]})]}),document.body)}o.xI.setOptions({gfm:!0,breaks:!0}),c.propTypes={isOpen:i().bool.isRequired,onClose:i().func.isRequired}},45455:(e,t,r)=>{r.d(t,{default:()=>m});var s=r(95155),a=r(12115),l=r(81127),n=r(11910),i=r(92542),o=r(72908);let d=/^[a-zA-Z0-9_.\-]+$/;function c({index:e,model:t,isFirst:r,isLast:l,onEdit:n,onMoveUp:i,onMoveDown:o,onRemove:d}){let[m,u]=(0,a.useState)(!1),[x,p]=(0,a.useState)(t),h=()=>{let e=x.trim();e&&e!==t?n(e):p(t),u(!1)};return(0,s.jsxs)("div",{className:"group flex min-w-0 items-center gap-1.5 rounded-md bg-black/[0.02] px-2 py-1 transition-colors hover:bg-black/[0.04] dark:bg-white/[0.02] dark:hover:bg-white/[0.04]",children:[(0,s.jsx)("span",{className:"text-[10px] font-medium text-text-muted w-3 text-center shrink-0",children:e+1}),m?(0,s.jsx)("input",{autoFocus:!0,value:x,onChange:e=>p(e.target.value),onBlur:h,onKeyDown:e=>{"Enter"===e.key&&h(),"Escape"===e.key&&(p(t),u(!1))},className:"min-w-0 flex-1 rounded border border-primary/40 bg-white px-1.5 py-0.5 font-mono text-xs text-text-main outline-none dark:bg-black/20"}):(0,s.jsx)("div",{className:"min-w-0 flex-1 cursor-text truncate rounded px-1.5 py-0.5 font-mono text-xs text-text-main hover:bg-black/5 dark:hover:bg-white/5",onClick:()=>u(!0),title:"Click to edit",children:t}),(0,s.jsxs)("div",{className:"flex shrink-0 items-center gap-0.5",children:[(0,s.jsx)("button",{onClick:i,disabled:r,className:`p-0.5 rounded ${r?"text-text-muted/20 cursor-not-allowed":"text-text-muted hover:text-primary hover:bg-black/5 dark:hover:bg-white/5"}`,title:"Move up",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"arrow_upward"})}),(0,s.jsx)("button",{onClick:o,disabled:l,className:`p-0.5 rounded ${l?"text-text-muted/20 cursor-not-allowed":"text-text-muted hover:text-primary hover:bg-black/5 dark:hover:bg-white/5"}`,title:"Move down",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"arrow_downward"})})]}),(0,s.jsx)("button",{onClick:d,className:"p-0.5 hover:bg-red-500/10 rounded text-text-muted hover:text-red-500 transition-all",title:"Remove",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"close"})})]})}function m({isOpen:e,combo:t,comboStrategy:r={},onClose:u,onSave:x,activeProviders:p,kindFilter:h=null,forcePrefix:b="",title:f}){let g=t?.name?b&&t.name.startsWith(b)?t.name.slice(b.length):t.name:"",[y,v]=(0,a.useState)(g),[j,N]=(0,a.useState)(t?.models||[]),[w,k]=(0,a.useState)(!1),[C,S]=(0,a.useState)(!1),[T,A]=(0,a.useState)(""),[_,I]=(0,a.useState)({});(0,a.useEffect)(()=>{e&&fetch("/api/models/alias").then(e=>e.ok?e.json():null).then(e=>e&&I(e.aliases||{})).catch(()=>{})},[e]);let M=e=>{if(!e.trim())return A("Name is required"),!1;let t=b+e;return d.test(t)?(A(""),!0):(A("Only letters, numbers, -, _ and . allowed"),!1)},$=e=>{let t=e.target.value;b&&t.startsWith(b)&&(t=t.slice(b.length)),v(t),t?M(t):A("")},P=async()=>{M(y)&&(S(!0),await x({name:b+y.trim(),models:j}),S(!1))},R=!!t,E=r?.fallbackStrategy||"fallback";return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(l.default,{isOpen:e,onClose:u,title:f||(R?"Edit Combo":"Create Combo"),children:(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsxs)("div",{children:[b?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("label",{className:"text-sm font-medium mb-1 block",children:"Combo Name"}),(0,s.jsxs)("div",{className:"flex items-stretch",children:[(0,s.jsx)("span",{className:"inline-flex items-center px-2 rounded-l border border-r-0 border-black/10 dark:border-white/10 bg-black/[0.04] dark:bg-white/[0.04] text-text-muted font-mono text-sm",children:b}),(0,s.jsx)("input",{value:y,onChange:$,placeholder:"my-combo",className:"flex-1 min-w-0 rounded-r border border-black/10 dark:border-white/10 bg-white dark:bg-black/20 px-2 py-1.5 font-mono text-sm outline-none focus:border-primary"})]}),T&&(0,s.jsx)("p",{className:"text-[11px] text-red-500 mt-0.5",children:T})]}):(0,s.jsx)(n.default,{label:"Combo Name",value:y,onChange:$,placeholder:"my-combo",error:T}),(0,s.jsxs)("p",{className:"text-[10px] text-text-muted mt-0.5",children:[b?`Auto-prefixed with "${b}". `:"","Only letters, numbers, -, _ and . allowed"]})]}),(0,s.jsxs)("div",{className:"rounded-lg border border-primary/15 bg-primary/5 px-3 py-2 text-xs text-text-muted",children:[(0,s.jsxs)("div",{className:"flex items-center gap-1.5 font-medium text-primary",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"route"}),"Routing: ","least-latency"===E?"Least latency":"p2c"===E?"P2C":"round-robin"===E?"Round Robin":"Fallback priority"]}),(0,s.jsx)("p",{className:"mt-1",children:"Strategy, LAN health, and tag rules are saved in settings.comboStrategies and can be edited from the Combo card."})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Models"}),0===j.length?(0,s.jsxs)("div",{className:"text-center py-4 border border-dashed border-black/10 dark:border-white/10 rounded-lg bg-black/[0.01] dark:bg-white/[0.01]",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-text-muted text-xl mb-1",children:"layers"}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"No models added yet"})]}):(0,s.jsx)("div",{className:"flex max-h-[55vh] min-w-0 flex-col gap-1 overflow-y-auto sm:max-h-[350px]",children:j.map((e,t)=>(0,s.jsx)(c,{index:t,model:e,isFirst:0===t,isLast:t===j.length-1,onEdit:e=>{let r=[...j];r[t]=e,N(r)},onMoveUp:()=>(e=>{if(0===e)return;let t=[...j];[t[e-1],t[e]]=[t[e],t[e-1]],N(t)})(t),onMoveDown:()=>(e=>{if(e===j.length-1)return;let t=[...j];[t[e],t[e+1]]=[t[e+1],t[e]],N(t)})(t),onRemove:()=>N(j.filter((e,r)=>r!==t))},t))}),(0,s.jsxs)("button",{onClick:()=>k(!0),className:"w-full mt-2 py-2 border border-dashed border-black/10 dark:border-white/10 rounded-lg text-xs text-primary font-medium hover:text-primary hover:border-primary/50 transition-colors flex items-center justify-center gap-1",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"add"}),"Add Model"]})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-2 pt-1 sm:flex-row",children:[(0,s.jsx)(i.default,{onClick:u,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,s.jsx)(i.default,{onClick:P,fullWidth:!0,size:"sm",disabled:!y.trim()||!!T||C,children:C?"Saving...":R?"Save":"Create"})]})]})}),(0,s.jsx)(o.default,{isOpen:w,onClose:()=>k(!1),onSelect:e=>{j.includes(e.value)||N([...j,e.value])},onDeselect:e=>{N(j.filter(t=>t!==e.value))},activeProviders:p,modelAliases:_,title:"Add Model to Combo",kindFilter:h,addedModelValues:j,closeOnSelect:!1})]})}},51825:(e,t,r)=>{r.d(t,{default:()=>n});var s=r(95155),a=r(84588);let l={mode:{label:"Mode",format:e=>e},defaultModel:{label:"Model",format:e=>e,mono:!0},baseUrl:{label:"Endpoint",format:e=>e,isLink:!0,mono:!0},costPerQuery:{label:"Cost / call",format:e=>0===e?"Free":`$${e.toFixed(4)}`},pricingUrl:{label:"Pricing",format:()=>"View pricing",isLink:!0},freeTier:{label:"Free tier",format:e=>e},freeMonthlyQuota:{label:"Free quota",format:e=>0===e?"—":e>=999999?"Unlimited":`${e.toLocaleString()} / mo`},searchTypes:{label:"Types",format:e=>e.join(", ")},formats:{label:"Formats",format:e=>e.join(", ")},maxMaxResults:{label:"Max results",format:e=>e},maxCharacters:{label:"Max chars",format:e=>e.toLocaleString()}};function n({config:e,provider:t,title:r="Provider Info"}){if(!e)return null;let i=Object.entries(l).filter(([t])=>void 0!==e[t]&&null!==e[t]&&""!==e[t]).map(([t,r])=>({key:t,label:r.label,value:r.format(e[t]),isLink:r.isLink,mono:r.mono,raw:e[t]})),o=t?.notice?.apiKeyUrl||t?.website,d=t?.notice?.text;return(0,s.jsxs)(a.default,{children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:r}),o&&(0,s.jsxs)("a",{href:o,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),"Get API Key"]})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-x-6 gap-y-2",children:[i.map(e=>(0,s.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,s.jsx)("span",{className:"text-xs text-text-muted w-28 shrink-0",children:e.label}),e.isLink?(0,s.jsx)("a",{href:e.raw,target:"_blank",rel:"noopener noreferrer",className:`text-sm text-primary hover:underline truncate ${e.mono?"font-mono":""}`,children:e.value}):(0,s.jsx)("span",{className:`text-sm text-text-main truncate ${e.mono?"font-mono":""}`,children:e.value})]},e.key)),d&&(0,s.jsxs)("div",{className:"flex items-start gap-3 min-w-0 sm:col-span-2",children:[(0,s.jsx)("span",{className:"text-xs text-text-muted w-28 shrink-0 mt-0.5",children:"Notice"}),(0,s.jsx)("span",{className:"text-sm text-text-main leading-relaxed",children:d})]})]})]})}},56061:(e,t,r)=>{r.d(t,{default:()=>i});var s=r(95155),a=r(31474);let l={default:"bg-surface-2 text-text-muted",primary:"bg-brand-500/10 text-brand-600 dark:text-brand-300",success:"bg-green-500/10 text-green-600 dark:text-green-400",warning:"bg-yellow-500/10 text-yellow-600 dark:text-yellow-400",error:"bg-red-500/10 text-red-600 dark:text-red-400",info:"bg-blue-500/10 text-blue-600 dark:text-blue-400"},n={sm:"px-2 py-0.5 text-[10px]",md:"px-2.5 py-1 text-xs",lg:"px-3 py-1.5 text-sm"};function i({children:e,variant:t="default",size:r="md",dot:o=!1,icon:d,className:c}){return(0,s.jsxs)("span",{className:(0,a.cn)("inline-flex items-center gap-1.5 rounded-full font-semibold",l[t],n[r],c),children:[o&&(0,s.jsx)("span",{className:(0,a.cn)("size-1.5 rounded-full","success"===t&&"bg-green-500","warning"===t&&"bg-yellow-500","error"===t&&"bg-red-500","info"===t&&"bg-blue-500","primary"===t&&"bg-brand-500","default"===t&&"bg-gray-500")}),d&&(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:d}),e]})}},56319:(e,t,r)=>{r.d(t,{default:()=>l});var s=r(95155),a=r(31474);function l({src:e,alt:t="Avatar",name:r,size:n="md",className:i}){let o={xs:"size-6 text-xs",sm:"size-8 text-sm",md:"size-10 text-base",lg:"size-12 text-lg",xl:"size-16 text-xl"};return e?(0,s.jsx)("div",{className:(0,a.cn)("rounded-full bg-cover bg-center bg-no-repeat","ring-2 ring-white dark:ring-surface-dark shadow-sm",o[n],i),style:{backgroundImage:`url(${e})`},role:"img","aria-label":t}):(0,s.jsx)("div",{className:(0,a.cn)("rounded-full flex items-center justify-center font-semibold text-white","ring-2 ring-white dark:ring-surface-dark shadow-sm",o[n],(e=>{if(!e)return"bg-primary";let t=["bg-red-500","bg-orange-500","bg-amber-500","bg-yellow-500","bg-lime-500","bg-green-500","bg-emerald-500","bg-teal-500","bg-cyan-500","bg-sky-500","bg-blue-500","bg-indigo-500","bg-violet-500","bg-purple-500","bg-fuchsia-500","bg-pink-500","bg-rose-500"],r=e.charCodeAt(0)%t.length;return t[r]})(r),i),role:"img","aria-label":t,children:(e=>{if(!e)return"?";let t=e.split(" ");return t.length>=2?`${t[0][0]}${t[1][0]}`.toUpperCase():e.substring(0,2).toUpperCase()})(r)})}},57250:(e,t,r)=>{r.d(t,{A:()=>i});var s=r(95155),a=r(12115),l=r(14051),n=r.n(l);function i({src:e,alt:t,size:r=32,className:l="",fallbackText:n="?",fallbackColor:o}){let[d,c]=(0,a.useState)(!1);return!e||d?(0,s.jsx)("span",{className:`inline-flex items-center justify-center font-bold rounded-lg ${l}`.trim(),style:{width:r,height:r,color:o,fontSize:Math.max(10,Math.floor(.38*r))},children:n}):(0,s.jsx)("img",{src:e,alt:t,width:r,height:r,className:l,onError:()=>c(!0)})}i.propTypes={src:n().string,alt:n().string,size:n().number,className:n().string,fallbackText:n().string,fallbackColor:n().string}},61500:(e,t,r)=>{r.d(t,{default:()=>o});var s=r(95155),a=r(12115),l=r(14051),n=r.n(l),i=r(35497);function o({isOpen:e,onMethodSelect:t,onClose:r}){let[l,n]=(0,a.useState)(null),[d,c]=(0,a.useState)(""),[m,u]=(0,a.useState)("us-east-1"),[x,p]=(0,a.useState)(""),[h,b]=(0,a.useState)(null),[f,g]=(0,a.useState)(!1),[y,v]=(0,a.useState)(!1),[j,N]=(0,a.useState)(!1);(0,a.useEffect)(()=>{"import"===l&&e&&(async()=>{v(!0),b(null),N(!1);try{let e=await fetch("/api/oauth/kiro/auto-import"),t=await e.json();t.found?(p(t.refreshToken),N(!0)):b(t.error||"Could not auto-detect token")}catch(e){b("Failed to auto-detect token")}finally{v(!1)}})()},[l,e]);let w=e=>{n(e),b(null)},k=()=>{n(null),b(null)},C=async()=>{if(!x.trim())return void b("Please enter a refresh token");g(!0),b(null);try{let e=await fetch("/api/oauth/kiro/import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({refreshToken:x.trim()})}),r=await e.json();if(!e.ok)throw Error(r.error||"Import failed");t("import")}catch(e){b(e.message)}finally{g(!1)}},S=e=>{t("social",{provider:e})};return(0,s.jsx)(i.aF,{isOpen:e,title:"Connect Kiro",onClose:r,size:"lg",children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[!l&&(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Choose your authentication method:"}),(0,s.jsx)("button",{onClick:()=>t("builder-id"),className:"w-full p-4 text-left border border-border rounded-lg hover:bg-sidebar transition-colors",children:(0,s.jsxs)("div",{className:"flex items-start gap-3",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-primary mt-0.5",children:"shield"}),(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsx)("h3",{className:"font-semibold mb-1",children:"AWS Builder ID"}),(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"Recommended for most users. Free AWS account required."})]})]})}),(0,s.jsx)("button",{onClick:()=>w("idc"),className:"w-full p-4 text-left border border-border rounded-lg hover:bg-sidebar transition-colors",children:(0,s.jsxs)("div",{className:"flex items-start gap-3",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-primary mt-0.5",children:"business"}),(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsx)("h3",{className:"font-semibold mb-1",children:"AWS IAM Identity Center"}),(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"For enterprise users with custom AWS IAM Identity Center."})]})]})}),(0,s.jsx)("button",{onClick:()=>w("social-google"),className:"hidden w-full p-4 text-left border border-border rounded-lg hover:bg-sidebar transition-colors",children:(0,s.jsxs)("div",{className:"flex items-start gap-3",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-primary mt-0.5",children:"account_circle"}),(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsx)("h3",{className:"font-semibold mb-1",children:"Google Account"}),(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"Login with your Google account (manual callback)."})]})]})}),(0,s.jsx)("button",{onClick:()=>w("social-github"),className:"hidden w-full p-4 text-left border border-border rounded-lg hover:bg-sidebar transition-colors",children:(0,s.jsxs)("div",{className:"flex items-start gap-3",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-primary mt-0.5",children:"code"}),(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsx)("h3",{className:"font-semibold mb-1",children:"GitHub Account"}),(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"Login with your GitHub account (manual callback)."})]})]})}),(0,s.jsx)("button",{onClick:()=>w("import"),className:"w-full p-4 text-left border border-border rounded-lg hover:bg-sidebar transition-colors",children:(0,s.jsxs)("div",{className:"flex items-start gap-3",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-primary mt-0.5",children:"file_upload"}),(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsx)("h3",{className:"font-semibold mb-1",children:"Import Token"}),(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"Paste refresh token from Kiro IDE."})]})]})})]}),"idc"===l&&(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("label",{className:"block text-sm font-medium mb-2",children:["IDC Start URL ",(0,s.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,s.jsx)(i.pd,{value:d,onChange:e=>c(e.target.value),placeholder:"https://your-org.awsapps.com/start",className:"font-mono text-sm"}),(0,s.jsx)("p",{className:"text-xs text-text-muted mt-1",children:"Your organization's AWS IAM Identity Center URL"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"block text-sm font-medium mb-2",children:"AWS Region"}),(0,s.jsx)(i.pd,{value:m,onChange:e=>u(e.target.value),placeholder:"us-east-1",className:"font-mono text-sm"}),(0,s.jsx)("p",{className:"text-xs text-text-muted mt-1",children:"AWS region for your Identity Center (default: us-east-1)"})]}),h&&(0,s.jsx)("p",{className:"text-sm text-red-600",children:h}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(i.$n,{onClick:()=>{d.trim()?t("idc",{startUrl:d.trim(),region:m}):b("Please enter your IDC start URL")},fullWidth:!0,children:"Continue"}),(0,s.jsx)(i.$n,{onClick:k,variant:"ghost",fullWidth:!0,children:"Back"})]})]}),"social-google"===l&&(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsx)("div",{className:"bg-amber-50 dark:bg-amber-900/20 p-4 rounded-lg border border-amber-200 dark:border-amber-800",children:(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-amber-600 dark:text-amber-400",children:"info"}),(0,s.jsxs)("div",{className:"flex-1 text-sm",children:[(0,s.jsx)("p",{className:"font-medium text-amber-900 dark:text-amber-100 mb-1",children:"Manual Callback Required"}),(0,s.jsx)("p",{className:"text-amber-800 dark:text-amber-200",children:"After login, you'll need to copy the callback URL from your browser and paste it back here."})]})]})}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(i.$n,{onClick:()=>S("google"),fullWidth:!0,children:"Continue with Google"}),(0,s.jsx)(i.$n,{onClick:k,variant:"ghost",fullWidth:!0,children:"Back"})]})]}),"social-github"===l&&(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsx)("div",{className:"bg-amber-50 dark:bg-amber-900/20 p-4 rounded-lg border border-amber-200 dark:border-amber-800",children:(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-amber-600 dark:text-amber-400",children:"info"}),(0,s.jsxs)("div",{className:"flex-1 text-sm",children:[(0,s.jsx)("p",{className:"font-medium text-amber-900 dark:text-amber-100 mb-1",children:"Manual Callback Required"}),(0,s.jsx)("p",{className:"text-amber-800 dark:text-amber-200",children:"After login, you'll need to copy the callback URL from your browser and paste it back here."})]})]})}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(i.$n,{onClick:()=>S("github"),fullWidth:!0,children:"Continue with GitHub"}),(0,s.jsx)(i.$n,{onClick:k,variant:"ghost",fullWidth:!0,children:"Back"})]})]}),"import"===l&&(0,s.jsxs)("div",{className:"space-y-4",children:[y&&(0,s.jsxs)("div",{className:"text-center py-6",children:[(0,s.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-primary/10 flex items-center justify-center",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-3xl text-primary animate-spin",children:"progress_activity"})}),(0,s.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Auto-detecting token..."}),(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"Reading from AWS SSO cache"})]}),!y&&(0,s.jsxs)(s.Fragment,{children:[j&&(0,s.jsx)("div",{className:"bg-green-50 dark:bg-green-900/20 p-3 rounded-lg border border-green-200 dark:border-green-800",children:(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-green-600 dark:text-green-400",children:"check_circle"}),(0,s.jsx)("p",{className:"text-sm text-green-800 dark:text-green-200",children:"Token auto-detected from Kiro IDE successfully!"})]})}),!j&&!h&&(0,s.jsx)("div",{className:"bg-blue-50 dark:bg-blue-900/20 p-3 rounded-lg border border-blue-200 dark:border-blue-800",children:(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-blue-600 dark:text-blue-400",children:"info"}),(0,s.jsx)("p",{className:"text-sm text-blue-800 dark:text-blue-200",children:"Kiro IDE not detected. Please paste your refresh token manually."})]})}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("label",{className:"block text-sm font-medium mb-2",children:["Refresh Token ",(0,s.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,s.jsx)(i.pd,{value:x,onChange:e=>p(e.target.value),placeholder:"Token will be auto-filled...",className:"font-mono text-sm"})]}),h&&(0,s.jsx)("div",{className:"bg-red-50 dark:bg-red-900/20 p-3 rounded-lg border border-red-200 dark:border-red-800",children:(0,s.jsx)("p",{className:"text-sm text-red-600 dark:text-red-400",children:h})}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(i.$n,{onClick:C,fullWidth:!0,disabled:f||!x.trim(),children:f?"Importing...":"Import Token"}),(0,s.jsx)(i.$n,{onClick:k,variant:"ghost",fullWidth:!0,children:"Back"})]})]})]})]})})}o.propTypes={isOpen:n().bool.isRequired,onMethodSelect:n().func.isRequired,onClose:n().func.isRequired}},62899:(e,t,r)=>{r.d(t,{default:()=>c});var s=r(95155),a=r(12115),l=r(14051),n=r.n(l),i=r(90882),o=r(61500),d=r(94230);function c({isOpen:e,providerInfo:t,onSuccess:r,onClose:l}){let[n,m]=(0,a.useState)(null),[u,x]=(0,a.useState)(null),[p,h]=(0,a.useState)(null),b=(0,a.useCallback)((e,t)=>{"builder-id"===e?m("builder-id"):"idc"===e?(m("idc"),h(t)):"social"===e?(m("social"),x(t.provider)):"import"===e&&r?.()},[r]),f=()=>{m(null),x(null),h(null)};return n?"builder-id"===n||"idc"===n?(0,s.jsx)(i.default,{isOpen:e,provider:"kiro",providerInfo:t,onSuccess:()=>{m(null),h(null),r?.(),l?.()},onClose:f,idcConfig:p}):"social"===n&&u?(0,s.jsx)(d.default,{isOpen:e,provider:u,onSuccess:()=>{m(null),x(null),r?.(),l?.()},onClose:f}):null:(0,s.jsx)(o.default,{isOpen:e,onMethodSelect:b,onClose:l})}c.propTypes={isOpen:n().bool.isRequired,providerInfo:n().shape({name:n().string}),onSuccess:n().func,onClose:n().func.isRequired}},65921:(e,t,r)=>{r.d(t,{i:()=>l});var s=r(1934);let a=0,l=(0,s.v)((e,t)=>({notifications:[],addNotification:r=>{let s=++a,l={id:s,type:r.type||"info",message:r.message,title:r.title||null,duration:r.duration??5e3,dismissible:r.dismissible??!0,createdAt:Date.now()};return e(e=>({notifications:[...e.notifications,l]})),l.duration>0&&setTimeout(()=>t().removeNotification(s),l.duration),s},removeNotification:t=>{e(e=>({notifications:e.notifications.filter(e=>e.id!==t)}))},clearAll:()=>e({notifications:[]}),success:(e,r)=>t().addNotification({type:"success",message:e,title:r}),error:(e,r)=>t().addNotification({type:"error",message:e,title:r,duration:8e3}),warning:(e,r)=>t().addNotification({type:"warning",message:e,title:r}),info:(e,r)=>t().addNotification({type:"info",message:e,title:r})}))},70255:(e,t,r)=>{r.d(t,{default:()=>i});var s=r(12115),a=r(44656);let l="branding-favicon-link";function n(e,t){if("u"<typeof document)return;let r=document.getElementById(l);r||((r=document.createElement("link")).id=l,r.rel="icon",document.head.appendChild(r)),t&&(r.type=t),r.href=e}function i(){let{siteTitle:e,faviconUrl:t,faviconMime:r}=(0,a.useBranding)();return(0,s.useEffect)(()=>{if(!e)return;let t=document.title;return document.title=e,()=>{document.title=t}},[e]),(0,s.useEffect)(()=>{t?n(t,r||void 0):n("/favicon.svg","image/svg+xml")},[t,r]),null}},72908:(e,t,r)=>{r.d(t,{default:()=>u});var s=r(95155),a=r(12115),l=r(14051),n=r.n(l),i=r(57250),o=r(28777),d=r(52679);let c=[...Object.keys(d.zN),...Object.keys(d.IS),...Object.keys(d.nJ),...Object.keys(d.fg)],m=Object.keys(d.IS).filter(e=>d.IS[e].noAuth);function u({isOpen:e,onClose:t,onSelect:r,onDeselect:l,selectedModel:n,activeProviders:x=[],title:p="Select Model",modelAliases:h={},kindFilter:b=null,addedModelValues:f=[],closeOnSelect:g=!0,personalOnly:y=!1,extraModels:v=[]}){let j=(0,a.useMemo)(()=>b?x.filter(e=>{let t=d.Q2[e.provider];return(t?.serviceKinds||["llm"]).includes(b)}):x,[x,b]),[N,w]=(0,a.useState)(""),[k,C]=(0,a.useState)([]),[S,T]=(0,a.useState)([]),[A,_]=(0,a.useState)([]),[I,M]=(0,a.useState)({}),$=(e,t="combo")=>{if(!e||"object"!=typeof e)return null;let r=String(e.exposedModel||e.model||e.alias||e.name||e.id||"").trim();if(!r)return null;let s=String(e.exposedModel||e.name||r).trim()||r,a=String(e.name||e.id||"").trim(),l=String(e.type||e.comboType||e.kindType||"combo").trim();return{...e,id:e.id||r,name:s,value:r,label:s,internalName:a,pickerSource:t,pickerType:l}},P=async()=>{try{let e=await fetch("/api/combos",{cache:"no-store"}),t=[];if(e.ok)for(let r of(await e.json()).combos||[]){let e=$(r,"legacy");e&&t.push(e)}let r=new Set,s=[];for(let e of t){let t=String(e.value||e.name||"").trim();!t||r.has(t)||(r.add(t),s.push(e))}s.sort((e,t)=>String(e.value||e.name).localeCompare(String(t.value||t.name))),C(s)}catch(e){console.error("Error fetching combos:",e),C([])}};(0,a.useEffect)(()=>{e&&!y&&P()},[e,y]);let R=async()=>{try{let e=await fetch("/api/provider-nodes");if(!e.ok)throw Error(`Failed to fetch provider nodes: ${e.status}`);let t=await e.json();T(t.nodes||[])}catch(e){console.error("Error fetching provider nodes:",e),T([])}};(0,a.useEffect)(()=>{e&&!y&&R()},[e,y]);let E=async()=>{try{let e=await fetch("/api/models/custom");if(!e.ok)throw Error(`Failed to fetch custom models: ${e.status}`);let t=await e.json();_(t.models||[])}catch(e){console.error("Error fetching custom models:",e),_([])}};(0,a.useEffect)(()=>{e&&!y&&E()},[e,y]);let O=async()=>{try{let e=await fetch("/api/models/disabled");if(!e.ok)throw Error(`Failed to fetch disabled models: ${e.status}`);let t=await e.json();M(t.disabled||{})}catch(e){console.error("Error fetching disabled models:",e),M({})}};(0,a.useEffect)(()=>{e&&O()},[e]);let L=(0,a.useMemo)(()=>({...d.zN,...d.IS,...d.nJ,...d.fg}),[]),z=(0,a.useMemo)(()=>{let e={},t=new Set(["webSearch","webFetch"]),r=new Set(["image","tts","stt","embedding","imageToText"]),s=new Set(["tts","image","webFetch"]);return[...new Set([...j.map(e=>e.provider),...y?[]:b?m.filter(e=>(d.Q2[e]?.serviceKinds||["llm"]).includes(b)):m])].sort((e,t)=>{let r=c.indexOf(e),s=c.indexOf(t);return(-1===r?999:r)-(-1===s?999:s)}).forEach(a=>{let l=(0,d.wG)(a),n=L[a]||{name:a,color:"#666"},i=(0,d.mq)(a)||(0,d.gb)(a);if(b&&t.has(b)){e[a]={name:n.name,alias:l,color:n.color,models:[{id:a,name:n.name,value:a}]};return}if(n.passthroughModels){let t=Object.entries(h).filter(([,e])=>e.startsWith(`${l}/`)).map(([e,t])=>({id:t.replace(`${l}/`,""),name:e,value:t}));if(b&&r.has(b)&&0===(t=(0,o.KC)(a).filter(e=>e.type===b).map(e=>({id:e.id,name:e.name,value:`${l}/${e.id}`,type:e.type}))).length&&s.has(b)&&(n.serviceKinds||["llm"]).includes(b)&&(t=[{id:a,name:n.name,value:l}]),t.length>0){let r=S.find(e=>e.id===a),s=r?.name||n.name;e[a]={name:s,alias:l,color:n.color,models:t}}}else if(i){if(b&&r.has(b))return;let t=x.find(e=>e.provider===a),s=S.find(e=>e.id===a),l=t?.name||s?.name||n.name,i=t?.providerSpecificData?.prefix||s?.prefix||a,o=Object.entries(h).filter(([,e])=>e.startsWith(`${a}/`)).map(([e,t])=>({id:t.replace(`${a}/`,""),name:e,value:`${i}/${t.replace(`${a}/`,"")}`})),d=o.length>0?o:[{id:`__placeholder__${a}`,name:`${i}/model-id`,value:`${i}/model-id`,isPlaceholder:!0}];e[a]={name:l,alias:i,color:n.color,models:d,isCustom:!0,hasModels:o.length>0}}else{var c;let t=(0,o.KC)(a),i=new Set(t.map(e=>e.id)),d=t.length>0,m=Object.entries(h).filter(([e,t])=>t.startsWith(`${l}/`)&&(!d||e===t.replace(`${l}/`,""))&&!i.has(t.replace(`${l}/`,""))).map(([e,t])=>({id:t.replace(`${l}/`,""),name:e,value:t,isCustom:!0})),u=new Set(m.map(e=>e.id)),x=A.filter(e=>e.providerAlias===l&&!i.has(e.id)&&!u.has(e.id)).map(e=>({id:e.id,name:e.name||e.id,value:`${l}/${e.id}`,isCustom:!0})),p=[...t.map(e=>({id:e.id,name:e.name,value:`${l}/${e.id}`,type:e.type})),...m,...x],f=new Set,g=(c=p.filter(e=>!f.has(e.value)&&(f.add(e.value),!0)),b?r.has(b)?c.filter(e=>e.isPlaceholder||e.type===b):c:c.filter(e=>e.isPlaceholder||!e.type||"llm"===e.type));0===g.length&&b&&s.has(b)&&(n.serviceKinds||["llm"]).includes(b)&&(g=[{id:a,name:n.name,value:l}]),g.length>0&&(e[a]={name:n.name,alias:l,color:n.color,models:g})}}),Object.entries(e).forEach(([t,r])=>{let s=new Set([...I[(0,d.wG)(t)]||[],...I[t]||[]]);0!==s.size&&(r.models=r.models.filter(e=>!s.has(e.id)),0===r.models.length&&delete e[t])}),e},[j,h,L,S,A,I,b,x,y]),q=(0,a.useMemo)(()=>{if(b)return[];let e=[...new Set((v||[]).map(e=>String(e||"").trim()).filter(Boolean))];if(!N.trim())return e;let t=N.toLowerCase();return e.filter(e=>e.toLowerCase().includes(t))},[v,N,b]),U=(0,a.useMemo)(()=>{if(b)return[];if(!N.trim())return k;let e=N.toLowerCase();return k.filter(t=>[t.name,t.value,t.exposedModel,t.internalName,t.description,t.pickerType].map(e=>String(e||"").toLowerCase()).some(t=>t.includes(e)))},[k,N,b]),D=(0,a.useMemo)(()=>{let e=N.trim().toLowerCase(),t={};return Object.entries(z).forEach(([r,s])=>{var a;let l=s.models;if(e){let t=s.name.toLowerCase().includes(e);if(0===(l=l.filter(t=>t.name.toLowerCase().includes(e)||t.id.toLowerCase().includes(e))).length&&!t)return}t[r]={...s,models:[...(a=l).filter(e=>f.includes(e.value)).sort((e,t)=>e.name.localeCompare(t.name)),...a.filter(e=>!f.includes(e.value)).sort((e,t)=>e.name.localeCompare(t.name))]}}),t},[z,N,f]),F=e=>{let s=e?.value||e?.name||e;f.includes(s)&&l?l(e):r(e),g&&(t(),w(""))},W=()=>{t(),w("")};return e?(0,s.jsx)("div",{className:"fixed inset-0 z-[300] flex items-center justify-center bg-black/65 p-4 backdrop-blur-sm",onMouseDown:e=>{e.target===e.currentTarget&&W()},role:"dialog","aria-modal":"true","aria-label":p,children:(0,s.jsxs)("div",{className:"flex max-h-[88vh] w-full max-w-3xl flex-col overflow-hidden rounded-2xl border border-border bg-white shadow-2xl dark:bg-zinc-950",onMouseDown:e=>e.stopPropagation(),children:[(0,s.jsxs)("div",{className:"flex items-start justify-between gap-3 border-b border-border px-4 py-3",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("h2",{className:"truncate text-base font-semibold text-text-main",children:p}),(0,s.jsx)("p",{className:"mt-0.5 text-xs text-text-muted",children:"Click to add models to the combo. Click an added item again to remove it."})]}),(0,s.jsx)("button",{type:"button",onClick:W,className:"rounded-lg p-1.5 text-text-muted transition hover:bg-surface hover:text-text-main","aria-label":"Close",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"close"})})]}),(0,s.jsxs)("div",{className:"min-h-0 flex-1 overflow-hidden bg-white p-4 dark:bg-zinc-950",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 mb-3 px-2.5 py-2 bg-primary/8 border border-primary/20 rounded-lg text-xs text-text-muted",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-primary shrink-0",style:{fontSize:"14px"},children:"info"}),(0,s.jsx)("span",{children:"Click to add, click again to remove. Changes are saved automatically."})]}),(0,s.jsx)("div",{className:"mb-3",children:(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)("span",{className:"material-symbols-outlined absolute left-2.5 top-1/2 -translate-y-1/2 text-text-muted text-[16px]",children:"search"}),(0,s.jsx)("input",{type:"text",placeholder:"Search...",value:N,onChange:e=>w(e.target.value),className:"w-full rounded-xl border border-border bg-white py-2 pl-9 pr-3 text-sm text-text-main shadow-sm outline-none focus:border-primary focus:ring-2 focus:ring-primary/20 dark:bg-zinc-900"})]})}),(0,s.jsxs)("div",{className:"max-h-[58vh] overflow-y-auto space-y-3 pr-1",children:[q.length>0&&(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center gap-1.5 mb-1.5 sticky top-0 z-10 bg-white py-1 dark:bg-zinc-950",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-primary text-[14px]",children:"verified"}),(0,s.jsx)("span",{className:"text-xs font-medium text-primary",children:"Default models"}),(0,s.jsxs)("span",{className:"text-[10px] text-text-muted",children:["(",q.length,")"]})]}),(0,s.jsx)("div",{className:"flex flex-wrap gap-1.5",children:q.map(e=>{let t=f.includes(e),r=n===e;return(0,s.jsxs)("button",{onClick:()=>F({id:e,name:e,value:e}),className:`
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5497],{98:(e,t,r)=>{r.d(t,{default:()=>l});var s=r(95155),a=r(31474);function l({label:e,options:t=[],value:r,onChange:n,placeholder:i="Select an option",error:o,hint:d,disabled:c=!1,required:m=!1,className:u,selectClassName:x,...p}){return(0,s.jsxs)("div",{className:(0,a.cn)("flex flex-col gap-1.5",u),children:[e&&(0,s.jsxs)("label",{className:"text-sm font-medium text-text-main",children:[e,m&&(0,s.jsx)("span",{className:"text-red-500 ml-1",children:"*"})]}),(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsxs)("select",{value:r,onChange:n,disabled:c,className:(0,a.cn)("w-full py-2.5 px-3 pr-10 text-sm text-text-main","bg-surface-2 border border-transparent rounded-[10px] appearance-none","focus:outline-none focus:ring-2 focus:ring-brand-500/30 focus:border-brand-500/40","transition-all duration-150 disabled:opacity-50 disabled:cursor-not-allowed","text-[16px] sm:text-sm",o&&"ring-1 ring-red-500 focus:ring-2 focus:ring-red-500/40 border-red-500/40",x),...p,children:[(0,s.jsx)("option",{value:"",disabled:!0,children:i}),t.map(e=>(0,s.jsx)("option",{value:e.value,children:e.label},e.value))]}),(0,s.jsx)("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none text-text-muted",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"expand_more"})})]}),o&&(0,s.jsxs)("p",{className:"text-xs text-red-500 flex items-center gap-1",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"error"}),o]}),d&&!o&&(0,s.jsx)("p",{className:"text-xs text-text-muted",children:d})]})}},1620:(e,t,r)=>{r.d(t,{D:()=>o});var s=r(12115),a=r(90085);function l(e){let t=window.matchMedia("(prefers-color-scheme: dark)");return t.addEventListener("change",e),()=>t.removeEventListener("change",e)}function n(){return window.matchMedia("(prefers-color-scheme: dark)").matches}function i(){return!1}function o(){let{theme:e,setTheme:t,toggleTheme:r,initTheme:o}=(0,a.A)(),d=(0,s.useSyncExternalStore)(l,n,i);(0,s.useEffect)(()=>{o()},[o]),(0,s.useEffect)(()=>{if("system"!==e)return;let t=window.matchMedia("(prefers-color-scheme: dark)"),r=()=>o();return t.addEventListener("change",r),()=>t.removeEventListener("change",r)},[e,o]);let c="dark"===e||"system"===e&&d;return{theme:e,setTheme:t,toggleTheme:r,isDark:c}}},4809:(e,t,r)=>{r.d(t,{default:()=>ea});var s=r(95155),a=r(12115),l=r(73321),n=r(52679),i=r(56061),o=r(84588),d=r(14051),c=r.n(d);let m=(e,t=0)=>{let r=Number(e);return Number.isFinite(r)?r:t},u=e=>new Intl.NumberFormat().format(m(e));function x({stats:e}){let t;return(0,s.jsxs)("div",{className:"grid min-w-0 grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-4 sm:gap-4",children:[(0,s.jsxs)(o.default,{className:"flex min-w-0 flex-col gap-1 px-4 py-3",children:[(0,s.jsx)("span",{className:"text-text-muted text-sm uppercase font-semibold",children:"Total Requests"}),(0,s.jsx)("span",{className:"truncate text-2xl font-bold",children:u(e.totalRequests)})]}),(0,s.jsxs)(o.default,{className:"flex min-w-0 flex-col gap-1 px-4 py-3",children:[(0,s.jsx)("span",{className:"text-text-muted text-sm uppercase font-semibold",children:"Total Input Tokens"}),(0,s.jsx)("span",{className:"truncate text-2xl font-bold text-primary",children:u(e.totalPromptTokens)})]}),(0,s.jsxs)(o.default,{className:"flex min-w-0 flex-col gap-1 px-4 py-3",children:[(0,s.jsx)("span",{className:"text-text-muted text-sm uppercase font-semibold",children:"Output Tokens"}),(0,s.jsx)("span",{className:"truncate text-2xl font-bold text-success",children:u(e.totalCompletionTokens)})]}),(0,s.jsxs)(o.default,{className:"flex min-w-0 flex-col gap-1 px-4 py-3",children:[(0,s.jsx)("span",{className:"text-text-muted text-sm uppercase font-semibold",children:"Est. Cost"}),(0,s.jsxs)("span",{className:"truncate text-2xl font-bold text-warning",children:["~",(t=e.totalCost,`$${m(t).toFixed(2)}`)]}),(0,s.jsx)("span",{className:"text-[10px] text-text-muted",children:"Estimated, not actual billing"})]})]})}x.propTypes={stats:c().object.isRequired};let p=(e,t=0)=>{let r=Number(e);return Number.isFinite(r)?r:t},h=e=>new Intl.NumberFormat().format(p(e)),b=e=>`$${p(e).toFixed(2)}`;function f(e){if(!e)return"Never";let t=Math.floor((Date.now()-new Date(e))/6e4);return t<1?"Just now":t<60?`${t}m ago`:t<1440?`${Math.floor(t/60)}h ago`:new Date(e).toLocaleDateString()}function g({field:e,currentSort:t,currentOrder:r}){return t!==e?(0,s.jsx)("span",{className:"ml-1 opacity-20",children:"↕"}):(0,s.jsx)("span",{className:"ml-1",children:"asc"===r?"↑":"↓"})}function y({item:e,viewMode:t,isSummary:r=!1}){return"tokens"===t?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:r&&void 0===e.promptTokens?"—":h(e.promptTokens)}),(0,s.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:r&&void 0===e.completionTokens?"—":h(e.completionTokens)}),(0,s.jsx)("td",{className:"px-6 py-3 text-right font-medium",children:h(e.totalTokens)})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:r&&void 0===e.inputCost?"—":b(e.inputCost)}),(0,s.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:r&&void 0===e.outputCost?"—":b(e.outputCost)}),(0,s.jsx)("td",{className:"px-6 py-3 text-right font-medium text-warning",children:b(e.totalCost||e.cost)})]})}function v({title:e,columns:t,groupedData:r,tableType:l,sortBy:n,sortOrder:i,onToggleSort:d,viewMode:c,storageKey:m,renderDetailCells:u,renderSummaryCells:x,emptyMessage:p}){let[h,b]=(0,a.useState)(new Set);(0,a.useEffect)(()=>{try{let e=localStorage.getItem(m);e&&b(new Set(JSON.parse(e)))}catch(e){console.error(`Failed to load ${m}:`,e)}},[m]),(0,a.useEffect)(()=>{try{localStorage.setItem(m,JSON.stringify([...h]))}catch(e){console.error(`Failed to save ${m}:`,e)}},[h,m]);let f=(0,a.useCallback)(e=>{b(t=>{let r=new Set(t);return r.has(e)?r.delete(e):r.add(e),r})},[]),j=(0,a.useMemo)(()=>"tokens"===c?[{field:"promptTokens",label:"Input Tokens"},{field:"completionTokens",label:"Output Tokens"},{field:"totalTokens",label:"Total Tokens"}]:[{field:"promptTokens",label:"Input Cost"},{field:"completionTokens",label:"Output Cost"},{field:"cost",label:"Total Cost"}],[c]),N=t.length+j.length;return(0,s.jsxs)(o.default,{className:"overflow-hidden",children:[(0,s.jsx)("div",{className:"p-4 border-b border-border bg-bg-subtle/50",children:(0,s.jsx)("h3",{className:"font-semibold",children:e})}),(0,s.jsx)("div",{className:"overflow-x-auto",children:(0,s.jsxs)("table",{className:"w-full text-sm text-left",children:[(0,s.jsx)("thead",{className:"bg-bg-subtle/30 text-text-muted uppercase text-xs",children:(0,s.jsxs)("tr",{children:[t.map(e=>(0,s.jsxs)("th",{className:`px-6 py-3 cursor-pointer hover:bg-bg-subtle/50 ${"right"===e.align?"text-right":""}`,onClick:()=>d(l,e.field),children:[e.label," ",(0,s.jsx)(g,{field:e.field,currentSort:n,currentOrder:i})]},e.field)),j.map(e=>(0,s.jsxs)("th",{className:"px-6 py-3 text-right cursor-pointer hover:bg-bg-subtle/50",onClick:()=>d(l,e.field),children:[e.label," ",(0,s.jsx)(g,{field:e.field,currentSort:n,currentOrder:i})]},e.field))]})}),(0,s.jsxs)("tbody",{className:"divide-y divide-border",children:[r.map(e=>(0,s.jsxs)(a.Fragment,{children:[(0,s.jsxs)("tr",{className:"group-summary cursor-pointer hover:bg-bg-subtle/50 transition-colors",onClick:()=>f(e.groupKey),children:[(0,s.jsx)("td",{className:"px-6 py-3",children:(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:`material-symbols-outlined text-[18px] text-text-muted transition-transform ${h.has(e.groupKey)?"rotate-90":""}`,children:"chevron_right"}),(0,s.jsx)("span",{className:`font-medium transition-colors ${e.summary.pending>0?"text-primary":""}`,children:e.groupKey})]})}),x(e),(0,s.jsx)(y,{item:e.summary,viewMode:c,isSummary:!0})]}),h.has(e.groupKey)&&e.items.map(e=>(0,s.jsxs)("tr",{className:"group-detail hover:bg-bg-subtle/20 transition-colors",children:[u(e),(0,s.jsx)(y,{item:e,viewMode:c})]},`detail-${e.key}`))]},e.groupKey)),0===r.length&&(0,s.jsx)("tr",{children:(0,s.jsx)("td",{colSpan:N,className:"px-6 py-8 text-center text-text-muted",children:p})})]})]})})]})}g.propTypes={field:c().string.isRequired,currentSort:c().string.isRequired,currentOrder:c().string.isRequired},y.propTypes={item:c().object.isRequired,viewMode:c().string.isRequired,isSummary:c().bool},v.propTypes={title:c().string.isRequired,columns:c().arrayOf(c().shape({field:c().string.isRequired,label:c().string.isRequired,align:c().string})).isRequired,groupedData:c().array.isRequired,tableType:c().string.isRequired,sortBy:c().string.isRequired,sortOrder:c().string.isRequired,onToggleSort:c().func.isRequired,viewMode:c().string.isRequired,storageKey:c().string.isRequired,renderDetailCells:c().func.isRequired,renderSummaryCells:c().func.isRequired,emptyMessage:c().string.isRequired};var j=r(81750),N=r(6793);function w({data:e}){let{label:t,color:r,imageUrl:l,textIcon:n,active:i}=e,[o,d]=(0,a.useState)(!1);return(0,s.jsxs)("div",{className:"flex items-center gap-2.5 px-4 py-2.5 rounded-lg border-2 transition-all duration-300 bg-bg",style:{borderColor:i?r:"var(--color-border)",boxShadow:i?`0 0 16px ${r}40`:"none",minWidth:"150px"},children:[(0,s.jsx)(j.h7,{type:"target",position:N.yX.Top,id:"top",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,s.jsx)(j.h7,{type:"target",position:N.yX.Bottom,id:"bottom",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,s.jsx)(j.h7,{type:"target",position:N.yX.Left,id:"left",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,s.jsx)(j.h7,{type:"target",position:N.yX.Right,id:"right",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,s.jsx)("div",{className:"w-8 h-8 rounded-md flex items-center justify-center shrink-0",style:{backgroundColor:`${r}15`},children:o?(0,s.jsx)("span",{className:"text-sm font-bold",style:{color:r},children:n}):(0,s.jsx)("img",{src:l,alt:t,className:"w-6 h-6 rounded-sm object-contain",onError:()=>d(!0)})}),(0,s.jsx)("span",{className:"text-base font-medium truncate",style:{color:i?r:"var(--color-text)"},children:t}),i&&(0,s.jsxs)("span",{className:"relative flex h-2 w-2 shrink-0",children:[(0,s.jsx)("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full opacity-75",style:{backgroundColor:r}}),(0,s.jsx)("span",{className:"relative inline-flex rounded-full h-2 w-2",style:{backgroundColor:r}})]})]})}function k({data:e}){return(0,s.jsxs)("div",{className:"flex items-center justify-center px-5 py-3 rounded-xl border-2 border-primary bg-primary/5 shadow-md min-w-[130px]",children:[(0,s.jsx)(j.h7,{type:"source",position:N.yX.Top,id:"top",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,s.jsx)(j.h7,{type:"source",position:N.yX.Bottom,id:"bottom",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,s.jsx)(j.h7,{type:"source",position:N.yX.Left,id:"left",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,s.jsx)(j.h7,{type:"source",position:N.yX.Right,id:"right",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,s.jsx)("img",{src:"/favicon.svg",alt:"Bluerouter",className:"w-6 h-6 mr-2"}),(0,s.jsx)("span",{className:"text-sm font-bold text-primary",children:"Blue Router"}),e.activeCount>0&&(0,s.jsx)("span",{className:"ml-2 px-1.5 py-0.5 rounded-full bg-primary text-white text-xs font-bold",children:e.activeCount})]})}r(53255),w.propTypes={data:c().object.isRequired},k.propTypes={data:c().object.isRequired};let C={provider:w,router:k};function S({providers:e=[],activeRequests:t=[],lastProvider:r="",errorProvider:l=""}){let i=(0,a.useMemo)(()=>t.map(e=>e.provider?.toLowerCase()).filter(Boolean).sort().join(","),[t]),o=r?.toLowerCase()||"",d=l?.toLowerCase()||"",c=(0,a.useMemo)(()=>new Set(i?i.split(","):[]),[i]),m=(0,a.useMemo)(()=>new Set(o?[o]:[]),[o]),u=(0,a.useMemo)(()=>new Set(d?[d]:[]),[d]),x=(0,a.useRef)({}),[p,h]=(0,a.useState)(0);(0,a.useEffect)(()=>{let e=x.current,t=Date.now();for(let r of c)e[r]||(e[r]=t);for(let t of Object.keys(e))c.has(t)||delete e[t]},[c]),(0,a.useEffect)(()=>{if(0===c.size)return;let e=setInterval(()=>h(e=>e+1),1e3);return()=>clearInterval(e)},[c]);let b=(0,a.useMemo)(()=>{let e=Date.now(),t=new Set;for(let r of c){let s=x.current[r];(!s||e-s<6e4)&&t.add(r)}return t},[c,p]),{nodes:f,edges:g}=(0,a.useMemo)(()=>(function(e,t,r,s){let a=e.length,l=Math.max(320,204*a/(2*Math.PI)),i=Math.max(200,.55*l);if(0===a)return{nodes:[{id:"router",type:"router",position:{x:0,y:0},data:{activeCount:0},draggable:!1}],edges:[]};let o=[],d=[];return o.push({id:"router",type:"router",position:{x:-60,y:-22},data:{activeCount:t.size},draggable:!1}),e.forEach((e,c)=>{var m,u;let x,p,h=(m=e.provider,n.Q2[m]||{color:"#6b7280",name:m}),b=t.has(e.provider?.toLowerCase()),f=!b&&r.has(e.provider?.toLowerCase()),g=!b&&s.has(e.provider?.toLowerCase()),y=`provider-${e.provider}`,v={label:(h.name!==e.provider?h.name:null)||e.name||e.provider,color:h.color||"#6b7280",imageUrl:(u=e.provider,`/providers/${u}.png`),textIcon:h.textIcon||(e.provider||"?").slice(0,2).toUpperCase(),active:b},j=-Math.PI/2+2*Math.PI*c/a,N=l*Math.cos(j),w=i*Math.sin(j);Math.abs(j+Math.PI/2)<Math.PI/4||Math.abs(j-3*Math.PI/2)<Math.PI/4?(x="top",p="bottom"):Math.abs(j-Math.PI/2)<Math.PI/4?(x="bottom",p="top"):N>0?(x="right",p="left"):(x="left",p="right"),o.push({id:y,type:"provider",position:{x:N-90,y:w-15},data:v,draggable:!1}),d.push({id:`e-${y}`,source:"router",sourceHandle:x,target:y,targetHandle:p,animated:b,style:(h.color,g?{stroke:"#ef4444",strokeWidth:2.5,opacity:.9}:b?{stroke:"#22c55e",strokeWidth:2.5,opacity:.9}:f?{stroke:"#f59e0b",strokeWidth:2,opacity:.7}:{stroke:"var(--color-border)",strokeWidth:1,opacity:.3})})}),{nodes:o,edges:d}})(e,b,m,u),[e,b,o,d]),y=(0,a.useMemo)(()=>e.map(e=>e.provider).sort().join(","),[e]),v=(0,a.useRef)(null),N=(0,a.useRef)(null),w={padding:.2,duration:200},k=(0,a.useCallback)(e=>{v.current=e,setTimeout(()=>e.fitView(w),50)},[]);return(0,a.useEffect)(()=>{let e=N.current;if(!e)return;let t=new ResizeObserver(()=>{v.current&&v.current.fitView(w)});return t.observe(e),()=>t.disconnect()},[]),(0,a.useEffect)(()=>{if(v.current){let e=setTimeout(()=>v.current.fitView(w),50);return()=>clearTimeout(e)}},[f.length]),(0,s.jsx)("div",{ref:N,className:"h-[320px] w-full min-w-0 rounded-lg border border-border bg-bg-subtle/30 sm:h-[480px]",children:0===e.length?(0,s.jsx)("div",{className:"h-full flex items-center justify-center text-text-muted text-sm",children:"No providers connected"}):(0,s.jsx)(j.Gc,{nodes:f,edges:g,nodeTypes:C,fitView:!0,fitViewOptions:w,minZoom:.1,maxZoom:2,onInit:k,proOptions:{hideAttribution:!0},panOnDrag:!0,zoomOnScroll:!0,zoomOnPinch:!0,zoomOnDoubleClick:!0,preventScrolling:!1,nodesDraggable:!1,nodesConnectable:!1,elementsSelectable:!1,children:(0,s.jsx)(j.H2,{showInteractive:!1,className:"react-flow-controls-custom"})},y)})}S.propTypes={providers:c().arrayOf(c().shape({id:c().string,provider:c().string,name:c().string})),activeRequests:c().arrayOf(c().shape({provider:c().string,model:c().string,account:c().string})),lastProvider:c().string,errorProvider:c().string};var T=r(1728),A=r(63346),_=r(28408),I=r(32539),M=r(59656),$=r(95543),P=r(40968);let R=(e,t=0)=>{let r=Number(e);return Number.isFinite(r)?r:t},E=e=>{let t=R(e);return t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}K`:String(t)},O=e=>`$${R(e).toFixed(4)}`;function L({period:e="7d"}){let[t,r]=(0,a.useState)([]),[l,n]=(0,a.useState)(!0),[i,d]=(0,a.useState)("tokens"),c=(0,a.useCallback)(async()=>{n(!0);try{let t=await fetch(`/api/usage/chart?period=${e}`);if(t.ok){let e=await t.json();r(e)}}catch(e){console.error("Failed to fetch chart data:",e)}finally{n(!1)}},[e]);(0,a.useEffect)(()=>{c()},[c]);let m=t.map(e=>({...e,tokens:R(e.tokens),cost:R(e.cost)})),u=m.some(e=>e.tokens>0||e.cost>0);return(0,s.jsxs)(o.default,{className:"flex min-w-0 flex-col gap-3 p-3 sm:p-4",children:[(0,s.jsxs)("div",{className:"grid w-full grid-cols-2 items-center gap-1 rounded-lg border border-border bg-bg-subtle p-1 sm:w-auto sm:self-start",children:[(0,s.jsx)("button",{onClick:()=>d("tokens"),className:`px-3 py-1 rounded-md text-sm font-medium transition-colors ${"tokens"===i?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-bg-hover"}`,children:"Tokens"}),(0,s.jsx)("button",{onClick:()=>d("cost"),className:`px-3 py-1 rounded-md text-sm font-medium transition-colors ${"cost"===i?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-bg-hover"}`,children:"Cost"})]}),l?(0,s.jsx)("div",{className:"h-48 flex items-center justify-center text-text-muted text-sm",children:"Loading..."}):u?(0,s.jsx)(T.u,{width:"100%",height:220,children:(0,s.jsxs)(A.Q,{data:m,margin:{top:4,right:8,left:0,bottom:0},children:[(0,s.jsxs)("defs",{children:[(0,s.jsxs)("linearGradient",{id:"gradTokens",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,s.jsx)("stop",{offset:"5%",stopColor:"#6366f1",stopOpacity:.25}),(0,s.jsx)("stop",{offset:"95%",stopColor:"#6366f1",stopOpacity:0})]}),(0,s.jsxs)("linearGradient",{id:"gradCost",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,s.jsx)("stop",{offset:"5%",stopColor:"#f59e0b",stopOpacity:.25}),(0,s.jsx)("stop",{offset:"95%",stopColor:"#f59e0b",stopOpacity:0})]})]}),(0,s.jsx)(_.d,{strokeDasharray:"3 3",strokeOpacity:.1}),(0,s.jsx)(I.W,{dataKey:"label",tick:{fontSize:10,fill:"currentColor",fillOpacity:.5},tickLine:!1,axisLine:!1,interval:"preserveStartEnd"}),(0,s.jsx)(M.h,{tick:{fontSize:10,fill:"currentColor",fillOpacity:.5},tickLine:!1,axisLine:!1,tickFormatter:"tokens"===i?E:O,width:50}),(0,s.jsx)($.m,{contentStyle:{backgroundColor:"var(--color-bg)",border:"1px solid var(--color-border)",borderRadius:"8px",fontSize:"12px"},formatter:(e,t)=>"tokens"===t?[E(e),"Tokens"]:[O(e),"Cost"]}),"tokens"===i?(0,s.jsx)(P.Gk,{type:"monotone",dataKey:"tokens",stroke:"#6366f1",strokeWidth:2,fill:"url(#gradTokens)",dot:!1,activeDot:{r:4}}):(0,s.jsx)(P.Gk,{type:"monotone",dataKey:"cost",stroke:"#f59e0b",strokeWidth:2,fill:"url(#gradCost)",dot:!1,activeDot:{r:4}})]})}):(0,s.jsx)("div",{className:"h-48 flex items-center justify-center text-text-muted text-sm",children:"No data for this period"})]})}function z(e){let t=n.Q2[e];return!t?.serviceKinds||t.serviceKinds.includes("llm")}function q(e){let t=String(e||"").trim();if(!t)return"";try{return new URL(t).hostname||""}catch{return t.replace(/^https?:\/\//,"").replace(/\/.*$/,"").replace(/:\d+$/,"")}}function U(e){let t=String(e||"").trim();return/^openai-compatible-chat-[0-9a-f-]{20,}$/i.test(t)||/^openai-compatible-[0-9a-f-]{20,}$/i.test(t)}function D(e){return String(e||"").trim()}function F(e=[]){let t={},r={};for(let s of e||[]){let e=function(e={}){let t=D(e.provider||e.providerId||e.provider_id||e.id),r=D(e.accountName||e.account_name||e.displayName||e.display_name||e.name||e.email||e.label||e.connectionName||e.connection_name),s=q(e.endpoint)||q(e.baseUrl)||q(e.baseURL)||q(e.base_url)||q(e.providerUrl)||q(e.provider_url)||q(e.url),a=D(e.email);return{providerId:t,accountName:r,displayName:D(e.displayName||e.display_name),email:a,endpointHost:s,ownerUser:D(e.ownerUser||e.owner_user),isPersonal:"personal"===e.scope||"private"===e.visibility||!!(e.ownerUser||e.owner_user)}}(s);for(let r of[s.id,s.connectionId,s.connection_id].map(D).filter(Boolean))t[r]||(t[r]=e);e.accountName&&!r[e.accountName]&&(r[e.accountName]=e)}return{byConnectionId:t,byAccount:r}}function W(e={},t={}){let r=e.model||e.rawModel||e.raw_model||"-",s=function(e={},t={}){let r=function(e={},t={}){for(let r of[e.connectionId,e.connection_id].map(D).filter(Boolean))if(t.byConnectionId?.[r])return t.byConnectionId[r];let r=D(e.accountName||e.account_name||e.keyName||e.key_name||e.connectionName||e.connection_name||e.providerName||e.provider_name||e.providerLabel||e.provider_label);return r&&t.byAccount?.[r]?t.byAccount[r]:null}(e,t),s=function(e={},t=null){let r=D(e.provider||e.providerId||e.provider_id).toLowerCase();if(!(!0===e.isPersonalOAuth||!0===e.is_personal_oauth||"personal"===e.connectionScope||"personal"===e.connection_scope||"private"===e.visibility||t?.isPersonal)||!r)return"";let s=D(e.ownerUser||e.owner_user||e.apiKeyOwner||e.api_key_owner||t?.ownerUser),a=D(e.accountEmail||e.account_email||e.email||t?.email),l=D(e.accountDisplayName||e.account_display_name||e.accountName||e.account_name||e.connectionName||e.connection_name||t?.accountName||t?.displayName),n=[];return(s&&n.push(s),l&&l!==s&&l!==a&&n.push(l),a&&a!==s&&n.push(a),n.length)?(n.push(r),n.join("/")):""}(e,r);if(s)return s;if(r){let e=r.providerId,t=r.accountName,s=r.endpointHost;if(e&&!U(e)){if(r.isPersonal&&r.ownerUser){let s=[r.ownerUser];return t&&t!==r.ownerUser&&t!==r.email&&s.push(t),r.email&&r.email!==r.ownerUser&&s.push(r.email),s.push(e),s.join("/")}return t&&t!==e?`${e}/${t}`:e}if(t)return t;if(s)return s}let a=q(e.endpoint)||q(e.providerUrl)||q(e.provider_url)||q(e.baseUrl)||q(e.baseURL)||q(e.base_url)||q(e.url);if(a)return a;let l=D(e.provider||e.providerId||e.provider_id),n=D(e.accountName||e.account_name||e.keyName||e.key_name||e.connectionName||e.connection_name||e.providerName||e.provider_name||e.providerLabel||e.provider_label);return l&&!U(l)?n&&n!==l?`${l}/${n}`:l:n||""}(e,t),a=D(e.provider||e.providerId||e.provider_id);return!s||"-"===r||String(r).startsWith(`${s}/`)?r:a&&String(r).startsWith(`${a}/`)&&(s.startsWith(`${a}/`)||s.endsWith(`/${a}`))?`${s}/${String(r).slice(a.length+1)}`:`${s}/${r}`}function K({timestamp:e}){let t,[,r]=(0,a.useState)(0);return(0,a.useEffect)(()=>{let e=setInterval(()=>r(e=>e+1),1e3);return()=>clearInterval(e)},[]),(0,s.jsx)(s.Fragment,{children:(t=Math.floor((Date.now()-new Date(e))/1e3))<60?`${t}s ago`:t<3600?`${Math.floor(t/60)}m ago`:t<86400?`${Math.floor(t/3600)}h ago`:`${Math.floor(t/86400)}d ago`})}L.propTypes={period:c().string};let B=new Set(["ok","success","succeeded","complete","completed","done","200 ok"]),V=new Set(["pending","running","queued","in_progress","in-progress"]);function G(e={}){let t,r=String(e.status||e.statusText||e.status_text||"").trim().toLowerCase(),s=(t=String(r||"").match(/\b([1-5]\d{2})\b/))?Number(t[1]):null,a=function(...e){for(let t of e){if(null==t||""===t)continue;let e=Number(t);if(Number.isFinite(e))return e}return null}(e.statusCode,e.status_code,e.gatewayStatusCode,e.gateway_status_code,e.upstreamStatusCode,e.upstream_status_code,s),l=D(e.errorCode||e.error_code),n=D(e.errorType||e.error_type),i=D(e.errorMessageShort||e.error_message_short||e.message||e.error);if(V.has(r))return{kind:"pending",label:"PENDING",title:"Request is still pending/running.",dotClass:"bg-amber-500",rowClass:"hover:bg-amber-50/60",badgeClass:"bg-amber-100 text-amber-700 border border-amber-200"};if(/\b(error|fail|failed|failure|timeout|cancelled|canceled)\b/i.test(r)||null!==a&&a>=400||l||n||i){let t=null!==a?`ERR ${a}`:r?r.toUpperCase():"ERROR",s=[`Status: ${t}`,l?`Code: ${l}`:"",n?`Type: ${n}`:"",i?`Message: ${i}`:"",e.endpoint?`Endpoint: ${e.endpoint}`:""].filter(Boolean);return{kind:"error",label:t,title:s.join("\n"),dotClass:"bg-error",rowClass:"hover:bg-error/5",badgeClass:"bg-error/10 text-error border border-error/20"}}return null!==a&&a>=200&&a<300||!r||B.has(r)?{kind:"success",label:a?`OK ${a}`:"OK",title:"Request completed successfully.",dotClass:"bg-success",rowClass:"hover:bg-bg-subtle",badgeClass:"bg-success/10 text-success border border-success/20"}:{kind:"unknown",label:r?r.toUpperCase():"UNKNOWN",title:r?`Status: ${r}`:"Unknown request status.",dotClass:"bg-text-muted",rowClass:"hover:bg-bg-subtle",badgeClass:"bg-bg-subtle text-text-muted border border-border"}}function Q({request:e}){let{promptTokens:t,completionTokens:r,totalTokens:a}=function(e={}){let t=Number(e.promptTokens??e.prompt_tokens??0)||0,r=Number(e.completionTokens??e.completion_tokens??0)||0,s=Number(e.totalTokens??e.total_tokens??t+r)||0;return{promptTokens:t,completionTokens:r,totalTokens:s}}(e),l=G(e);return"success"===l.kind&&a>0?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("span",{className:"text-primary",children:[h(t),"↑"]})," ",(0,s.jsxs)("span",{className:"text-success",children:[h(r),"↓"]})]}):"success"===l.kind?(0,s.jsx)("div",{className:"flex items-center justify-end",title:"Request completed, but no token usage was reported.",children:(0,s.jsx)("span",{className:"inline-flex items-center rounded-full border border-border bg-bg-subtle px-2 py-0.5 text-[10px] font-semibold leading-4 text-text-muted",children:"NO USAGE"})}):(0,s.jsxs)("div",{className:"flex items-center justify-end gap-1.5",title:l.title,children:[(0,s.jsx)("span",{className:`inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-semibold leading-4 ${l.badgeClass}`,children:l.label}),a>0&&(0,s.jsxs)("span",{className:"text-[11px] text-text-muted whitespace-nowrap",children:[h(t),"↑ ",h(r),"↓"]})]})}function J({requests:e=[],providers:t=[]}){let r=(0,a.useMemo)(()=>F(t),[t]),l=(0,a.useMemo)(()=>Array.isArray(e)?e.filter(e=>"success"===G(e).kind):[],[e]),n=Math.max(0,(Array.isArray(e)?e.length:0)-l.length);return(0,s.jsxs)(o.default,{className:"flex min-w-0 flex-col overflow-hidden",padding:"sm",style:{height:480},children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-2 px-1 py-2 border-b border-border shrink-0",children:[(0,s.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,s.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wide",children:"Recent Requests"}),(0,s.jsx)("span",{className:"inline-flex items-center rounded-full border border-success/20 bg-success/10 px-2 py-0.5 text-[10px] font-semibold uppercase leading-4 text-success",children:"Success only"})]}),n>0&&(0,s.jsxs)("span",{className:"shrink-0 text-[11px] text-text-muted",title:"Error, pending and failed requests are intentionally hidden here. Use the Errors/Analytics views for troubleshooting.",children:[h(n)," hidden"]})]}),l.length?(0,s.jsx)("div",{className:"flex-1 overflow-y-auto",children:(0,s.jsxs)("table",{className:"w-full min-w-[300px] border-collapse text-xs",children:[(0,s.jsx)("thead",{className:"sticky top-0 bg-bg z-10",children:(0,s.jsxs)("tr",{className:"border-b border-border",children:[(0,s.jsx)("th",{className:"py-1.5 text-left font-semibold text-text-muted w-2"}),(0,s.jsx)("th",{className:"py-1.5 text-left font-semibold text-text-muted",children:"Model"}),(0,s.jsx)("th",{className:"py-1.5 text-right font-semibold text-text-muted whitespace-nowrap",children:"In / Out"}),(0,s.jsx)("th",{className:"py-1.5 text-right font-semibold text-text-muted",children:"When"})]})}),(0,s.jsx)("tbody",{className:"divide-y divide-border/50",children:l.map((e,t)=>{let a=W(e,r);return(0,s.jsxs)("tr",{className:"hover:bg-bg-subtle transition-colors",children:[(0,s.jsx)("td",{className:"py-1.5",children:(0,s.jsx)("span",{className:"block w-1.5 h-1.5 rounded-full bg-success"})}),(0,s.jsx)("td",{className:"py-1.5 font-mono truncate max-w-[240px]",title:a,children:a}),(0,s.jsx)("td",{className:"py-1.5 text-right whitespace-nowrap",children:(0,s.jsx)(Q,{request:e})}),(0,s.jsx)("td",{className:"py-1.5 text-right text-text-muted whitespace-nowrap",children:(0,s.jsx)(K,{timestamp:e.timestamp})})]},e.requestId||e.id||`${e.timestamp||"request"}-${t}`)})})]})}):(0,s.jsxs)("div",{className:"flex-1 flex flex-col items-center justify-center gap-1 px-4 text-center text-sm",children:[(0,s.jsx)("div",{className:"font-medium text-text-main",children:"No successful requests yet."}),n>0&&(0,s.jsxs)("div",{className:"max-w-[260px] text-xs text-text-muted",children:[h(n)," non-success request",1===n?"":"s"," hidden from this usage-focused list."]})]})]})}function H(e,t={},r,s){return Object.entries(e||{}).map(([e,r])=>{let s=(r.promptTokens||0)+(r.completionTokens||0),a=r.cost||0,l=s>0?(r.promptTokens||0)*(a/s):0,n=s>0?(r.completionTokens||0)*(a/s):0;return{...r,key:e,totalTokens:s,totalCost:a,inputCost:l,outputCost:n,pending:t[e]||0}}).sort((e,t)=>{let a=e[r],l=t[r];return("string"==typeof a&&(a=a.toLowerCase()),"string"==typeof l&&(l=l.toLowerCase()),a<l)?"asc"===s?-1:1:a>l?"asc"===s?1:-1:0})}function X(e,t){if(!Array.isArray(e))return[];let r={};return e.forEach(e=>{let s=function(e,t){switch(t){case"rawModel":return e.rawModel||"Unknown Model";case"accountName":return e.accountName||`Account ${e.connectionId?.slice(0,8)}...`||"Unknown Account";case"keyName":return e.keyName||"Unknown Key";case"endpoint":return e.endpoint||"Unknown Endpoint";default:return e[t]||"Unknown"}}(e,t);r[s]||(r[s]={groupKey:s,summary:{requests:0,promptTokens:0,completionTokens:0,totalTokens:0,cost:0,inputCost:0,outputCost:0,lastUsed:null,pending:0},items:[]});let a=r[s].summary;a.requests+=e.requests||0,a.promptTokens+=e.promptTokens||0,a.completionTokens+=e.completionTokens||0,a.totalTokens+=e.totalTokens||0,a.cost+=e.cost||0,a.inputCost+=e.inputCost||0,a.outputCost+=e.outputCost||0,a.pending+=e.pending||0,e.lastUsed&&(!a.lastUsed||new Date(e.lastUsed)>new Date(a.lastUsed))&&(a.lastUsed=e.lastUsed),r[s].items.push(e)}),Object.values(r)}let Y=[{field:"rawModel",label:"Model"},{field:"provider",label:"Provider"},{field:"requests",label:"Requests",align:"right"},{field:"lastUsed",label:"Last Used",align:"right"}],Z=[{field:"accountName",label:"Account"},{field:"rawModel",label:"Model"},{field:"provider",label:"Provider"},{field:"requests",label:"Requests",align:"right"},{field:"lastUsed",label:"Last Used",align:"right"}],ee=[{field:"keyName",label:"API Key Name"},{field:"rawModel",label:"Model"},{field:"provider",label:"Provider"},{field:"requests",label:"Requests",align:"right"},{field:"lastUsed",label:"Last Used",align:"right"}],et=[{field:"endpoint",label:"Endpoint"},{field:"rawModel",label:"Model"},{field:"provider",label:"Provider"},{field:"requests",label:"Requests",align:"right"},{field:"lastUsed",label:"Last Used",align:"right"}],er=[{value:"model",label:"Usage by Model"},{value:"account",label:"Usage by Account"},{value:"apiKey",label:"Usage by API Key"},{value:"endpoint",label:"Usage by Endpoint"}],es=[{value:"today",label:"Today"},{value:"24h",label:"24h"},{value:"7d",label:"7D"},{value:"30d",label:"30D"},{value:"60d",label:"60D"}];function ea({period:e,setPeriod:t,hidePeriodSelector:r=!1}={}){let o=(0,l.useRouter)(),d=(0,l.useSearchParams)(),c=d.get("sortBy")||"rawModel",m=d.get("sortOrder")||"asc",[u,p]=(0,a.useState)(null),[b,g]=(0,a.useState)(!0),[y,j]=(0,a.useState)(!1),[N,w]=(0,a.useState)("model"),[k,C]=(0,a.useState)("costs"),[T,A]=(0,a.useState)([]),[_,I]=(0,a.useState)("today"),M=(0,a.useRef)(!0),$=e??_,P=t??I,R=(0,a.useMemo)(()=>F(T),[T]);(0,a.useEffect)(()=>{fetch("/api/providers").then(e=>e.ok?e.json():null).then(e=>{let t=(e?.connections||[]).filter(e=>!1!==e.isActive&&!!z(e.provider)),r=new Set(t.map(e=>e.provider));A([...t,...Object.values(n.IS).filter(e=>e.noAuth&&!r.has(e.id)&&z(e.id)).map(e=>({provider:e.id,name:e.name}))])}).catch(()=>{})},[]),(0,a.useEffect)(()=>{M.current?(M.current=!1,g(!0)):j(!0),fetch(`/api/usage/stats?period=${$}`).then(e=>e.ok?e.json():null).then(e=>{e&&p(t=>({...t,...e}))}).catch(()=>{}).finally(()=>{g(!1),j(!1)})},[$]),(0,a.useEffect)(()=>{let e=new EventSource("/api/usage/stream");return e.onmessage=e=>{try{let t=JSON.parse(e.data);p(e=>({...e||{},activeRequests:t.activeRequests,recentRequests:t.recentRequests,errorProvider:t.errorProvider,pending:t.pending})),g(!1)}catch(e){console.error("[SSE CLIENT] parse error:",e)}},e.onerror=()=>g(!1),()=>e.close()},[]);let E=(0,a.useCallback)((e,t)=>{let r=new URLSearchParams(d.toString());r.get("sortBy")===t?r.set("sortOrder","asc"===r.get("sortOrder")?"desc":"asc"):(r.set("sortBy",t),r.set("sortOrder","asc")),o.replace(`?${r.toString()}`,{scroll:!1})},[d,o]),O=(0,a.useMemo)(()=>{if(!u)return null;switch(N){case"model":{let e=u.pending?.byModel||{};return{columns:Y,groupedData:X(H(u.byModel,e,c,m),"rawModel"),storageKey:"usage-stats:expanded-models",emptyMessage:"No usage recorded yet.",renderSummaryCells:e=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,s.jsx)("td",{className:"px-6 py-3 text-right",children:h(e.summary.requests)}),(0,s.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:f(e.summary.lastUsed)})]}),renderDetailCells:e=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("td",{className:`px-6 py-3 font-medium transition-colors ${e.pending>0?"text-primary":""}`,title:W(e,R),children:W(e,R)}),(0,s.jsx)("td",{className:"px-6 py-3",children:(0,s.jsx)(i.default,{variant:e.pending>0?"primary":"neutral",size:"sm",children:e.provider})}),(0,s.jsx)("td",{className:"px-6 py-3 text-right",children:h(e.requests)}),(0,s.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:f(e.lastUsed)})]})}}case"account":{let e={};return u?.pending?.byAccount&&Object.entries(u.byAccount||{}).forEach(([t,r])=>{let s=u.pending.byAccount[r.connectionId];if(s){let a=r.provider?`${r.rawModel} (${r.provider})`:r.rawModel;e[t]=s[a]||0}}),{columns:Z,groupedData:X(H(u.byAccount,e,c,m),"accountName"),storageKey:"usage-stats:expanded-accounts",emptyMessage:"No account-specific usage recorded yet.",renderSummaryCells:e=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,s.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,s.jsx)("td",{className:"px-6 py-3 text-right",children:h(e.summary.requests)}),(0,s.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:f(e.summary.lastUsed)})]}),renderDetailCells:e=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("td",{className:`px-6 py-3 font-medium transition-colors ${e.pending>0?"text-primary":""}`,children:e.accountName||`Account ${e.connectionId?.slice(0,8)}...`}),(0,s.jsx)("td",{className:`px-6 py-3 font-medium transition-colors ${e.pending>0?"text-primary":""}`,title:e.rawModel,children:e.rawModel}),(0,s.jsx)("td",{className:"px-6 py-3",children:(0,s.jsx)(i.default,{variant:e.pending>0?"primary":"neutral",size:"sm",children:e.provider})}),(0,s.jsx)("td",{className:"px-6 py-3 text-right",children:h(e.requests)}),(0,s.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:f(e.lastUsed)})]})}}case"apiKey":return{columns:ee,groupedData:X(H(u.byApiKey,{},c,m),"keyName"),storageKey:"usage-stats:expanded-apikeys",emptyMessage:"No API key usage recorded yet.",renderSummaryCells:e=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,s.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,s.jsx)("td",{className:"px-6 py-3 text-right",children:h(e.summary.requests)}),(0,s.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:f(e.summary.lastUsed)})]}),renderDetailCells:e=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("td",{className:"px-6 py-3 font-medium",children:e.keyName}),(0,s.jsx)("td",{className:"px-6 py-3",title:W(e,R),children:W(e,R)}),(0,s.jsx)("td",{className:"px-6 py-3",children:(0,s.jsx)(i.default,{variant:"neutral",size:"sm",children:e.provider})}),(0,s.jsx)("td",{className:"px-6 py-3 text-right",children:h(e.requests)}),(0,s.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:f(e.lastUsed)})]})};default:return{columns:et,groupedData:X(H(u.byEndpoint,{},c,m),"endpoint"),storageKey:"usage-stats:expanded-endpoints",emptyMessage:"No endpoint usage recorded yet.",renderSummaryCells:e=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,s.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,s.jsx)("td",{className:"px-6 py-3 text-right",children:h(e.summary.requests)}),(0,s.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:f(e.summary.lastUsed)})]}),renderDetailCells:e=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("td",{className:"px-6 py-3 font-medium font-mono text-sm",children:e.endpoint}),(0,s.jsx)("td",{className:"px-6 py-3",title:W(e,R),children:W(e,R)}),(0,s.jsx)("td",{className:"px-6 py-3",children:(0,s.jsx)(i.default,{variant:"neutral",size:"sm",children:e.provider})}),(0,s.jsx)("td",{className:"px-6 py-3 text-right",children:h(e.requests)}),(0,s.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:f(e.lastUsed)})]})}}},[u,N,c,m,R]);if(!u&&!b)return(0,s.jsx)("div",{className:"text-text-muted",children:"Failed to load usage statistics."});let q=(0,s.jsx)("div",{className:"flex items-center justify-center py-12 text-text-muted",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[32px] animate-spin",children:"progress_activity"})});return(0,s.jsxs)("div",{className:"flex min-w-0 flex-col gap-6",children:[!r&&(0,s.jsxs)("div",{className:"flex w-full items-center gap-2 sm:w-auto sm:self-end",children:[(0,s.jsx)("div",{className:"grid flex-1 grid-cols-5 items-center gap-1 rounded-lg border border-border bg-bg-subtle p-1 sm:flex sm:flex-none",children:es.map(e=>(0,s.jsx)("button",{onClick:()=>P(e.value),disabled:y,className:`rounded-md px-3 py-1 text-sm font-medium transition-colors ${$===e.value?"bg-primary text-white shadow-sm":"text-text-muted hover:bg-bg-hover hover:text-text"}`,children:e.label},e.value))}),y&&(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px] text-text-muted animate-spin",children:"progress_activity"})]}),b?q:(0,s.jsx)(x,{stats:u}),b?q:(0,s.jsxs)("div",{className:"grid min-w-0 grid-cols-1 items-stretch gap-2 lg:grid-cols-[minmax(0,2fr)_minmax(280px,1fr)]",children:[(0,s.jsx)(S,{providers:T,activeRequests:u.activeRequests||[],lastProvider:u.recentRequests?.[0]?.provider||"",errorProvider:u.errorProvider||""}),(0,s.jsx)(J,{requests:u.recentRequests||[],providers:T})]}),b?q:(0,s.jsx)(L,{period:$}),(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsx)("select",{value:N,onChange:e=>w(e.target.value),className:"w-full rounded-lg border border-border bg-surface px-3 py-1.5 text-sm font-medium text-text-main focus:outline-none focus:ring-2 focus:ring-primary/50 sm:w-auto",style:{colorScheme:"auto"},children:er.map(e=>(0,s.jsx)("option",{value:e.value,children:e.label},e.value))}),(0,s.jsxs)("div",{className:"grid grid-cols-2 items-center gap-1 rounded-lg border border-border bg-bg-subtle p-1 sm:flex",children:[(0,s.jsx)("button",{onClick:()=>C("costs"),className:`px-3 py-1 rounded-md text-sm font-medium transition-colors ${"costs"===k?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-bg-hover"}`,children:"Costs"}),(0,s.jsx)("button",{onClick:()=>C("tokens"),className:`px-3 py-1 rounded-md text-sm font-medium transition-colors ${"tokens"===k?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-bg-hover"}`,children:"Tokens"})]})]}),b?q:O&&(0,s.jsx)(v,{title:"",columns:O.columns,groupedData:O.groupedData,tableType:N,sortBy:c,sortOrder:m,onToggleSort:E,viewMode:k,storageKey:O.storageKey,renderSummaryCells:O.renderSummaryCells,renderDetailCells:O.renderDetailCells,emptyMessage:O.emptyMessage})]})]})}},4823:(e,t,r)=>{r.d(t,{default:()=>m});var s=r(95155),a=r(12115),l=r(14051),n=r.n(l),i=r(84588),o=r(98),d=r(56061);let c="__none__";function m({providerId:e}){let[t,r]=(0,a.useState)([]),[l,n]=(0,a.useState)(c),[u,x]=(0,a.useState)(!1),[p,h]=(0,a.useState)(!1);(0,a.useEffect)(()=>{let t=!1;return Promise.all([fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}).then(e=>e.ok?e.json():{proxyPools:[]}),fetch("/api/settings",{cache:"no-store"}).then(e=>e.ok?e.json():{})]).then(([s,a])=>{t||(r(s.proxyPools||[]),n(((a.providerStrategies||{})[e]||{}).proxyPoolId||c))}).catch(()=>{}),()=>{t=!0}},[e]);let b=async t=>{n(t),x(!0);try{let r=await fetch("/api/settings",{cache:"no-store"}),s=(r.ok?await r.json():{}).providerStrategies||{},a={...s[e]||{}};t===c?delete a.proxyPoolId:a.proxyPoolId=t;let l={...s};0===Object.keys(a).length?delete l[e]:l[e]=a,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:l})}),h(!0),setTimeout(()=>h(!1),1500)}catch(e){console.log("Save proxyPoolId error:",e)}finally{x(!1)}};return(0,s.jsxs)(i.default,{children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,s.jsx)("div",{className:"inline-flex items-center justify-center w-10 h-10 rounded-full bg-green-500/10 text-green-500",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"lock_open"})}),(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsx)("p",{className:"text-sm font-medium",children:"No authentication required"}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"This provider is ready to use. Optionally route requests through a proxy pool to bypass IP-based limits."})]}),p&&(0,s.jsx)(d.default,{variant:"success",size:"sm",children:"Saved"})]}),(0,s.jsx)(o.default,{label:"Proxy Pool",value:l,onChange:e=>b(e.target.value),disabled:u,options:[{value:c,label:"None (direct)"},...t.map(e=>({value:e.id,label:e.name}))]})]})}m.propTypes={providerId:n().string.isRequired}},11059:(e,t,r)=>{r.d(t,{C:()=>a});var s=r(12115);function a(e=2e3){let[t,r]=(0,s.useState)(null),l=(0,s.useRef)(null);return{copied:t,copy:(0,s.useCallback)((t,s="default")=>{(async()=>{if(navigator?.clipboard?.writeText)await navigator.clipboard.writeText(t);else{let e=document.createElement("textarea");e.value=t,e.style.position="fixed",e.style.opacity="0",document.body.appendChild(e),e.select(),document.execCommand("copy"),document.body.removeChild(e)}})(),r(s),l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{r(null)},e)},[e])}}},11910:(e,t,r)=>{r.d(t,{default:()=>l});var s=r(95155),a=r(31474);function l({label:e,type:t="text",placeholder:r,value:n,onChange:i,error:o,hint:d,icon:c,disabled:m=!1,required:u=!1,className:x,inputClassName:p,...h}){return(0,s.jsxs)("div",{className:(0,a.cn)("flex flex-col gap-1.5",x),children:[e&&(0,s.jsxs)("label",{className:"text-sm font-medium text-text-main",children:[e,u&&(0,s.jsx)("span",{className:"text-red-500 ml-1",children:"*"})]}),(0,s.jsxs)("div",{className:"relative",children:[c&&(0,s.jsx)("div",{className:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none text-text-muted",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:c})}),(0,s.jsx)("input",{type:t,placeholder:r,value:n,onChange:i,disabled:m,className:(0,a.cn)("w-full py-2.5 px-3 text-sm text-text-main bg-surface-2 rounded-[10px]","border border-transparent placeholder-text-muted/70","focus:outline-none focus:ring-2 focus:ring-brand-500/30 focus:border-brand-500/40","transition-all duration-150 ease-out disabled:opacity-50 disabled:cursor-not-allowed","text-[16px] sm:text-sm",c&&"pl-10",o&&"ring-1 ring-red-500 focus:ring-2 focus:ring-red-500/40 border-red-500/40",p),...h})]}),o&&(0,s.jsxs)("p",{className:"text-xs text-red-500 flex items-center gap-1",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"error"}),o]}),d&&!o&&(0,s.jsx)("p",{className:"text-xs text-text-muted",children:d})]})}},12494:(e,t,r)=>{r.d(t,{ns:()=>m,wB:()=>u});var s=r(52679),a=r(28777);let l=[{id:"@cf/meta/llama-3.1-8b-instruct",name:"Cloudflare: Llama 3.1 8B Instruct"},{id:"@cf/meta/llama-3.1-70b-instruct",name:"Cloudflare: Llama 3.1 70B Instruct"},{id:"@cf/deepseek-ai/deepseek-r1-distill-qwen-32b",name:"Cloudflare: DeepSeek R1 Distill Qwen 32B"},{id:"@cf/qwen/qwen1.5-14b-chat-awq",name:"Cloudflare: Qwen 1.5 14B Chat AWQ"}];function n(e){return"string"==typeof e?e.trim():""}function i(e){return e&&"object"==typeof e&&!Array.isArray(e)?e:{}}function o(e){return Array.isArray(e)?e.map(e=>String(e||"").trim()).filter(Boolean):[]}function d(e=""){let t=n(e);return t?(0,s.mq)(t)||(0,s.gb)(t)?t:(0,s.wG)(t)||t:""}function c(e){return[...e].sort((e,t)=>{let r=e.source||"",s=t.source||"";if(r!==s){let e={builtin:0,connection:1,alias:2,current:3};return(e[r]??9)-(e[s]??9)}return String(e.id||"").localeCompare(String(t.id||""))})}async function m({providerId:e="",connections:t=[],currentModel:r=""}={}){let u=n(e);if(!u)return{models:[],warning:"Provider is empty"};let x=d(u),p={},h=[],b="";try{let[e,t]=await Promise.all([fetch("/api/models/alias",{cache:"no-store"}),fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(x)}`,{cache:"no-store"})]);if(e.ok){let t=await e.json();p=i(t.aliases)}else b="Failed to load model aliases from local DB.";if(t.ok){let e=await t.json();h=o(e.ids)}}catch(e){b=e.message||"Failed to load local model list."}let f=function({providerId:e="",aliases:t={},disabledIds:r=[],connections:s=[],currentModel:m=""}={}){let u=n(e);if(!u)return[];let x=d(u),p=new Set(o(r)),h=i(t),b=function(e="",t=""){return[...new Set([t,e].map(n).filter(Boolean))].map(e=>`${e}/`)}(u,x),f=new Set,g=[],y=(e,t,r="builtin")=>{let s=n(e);!s||f.has(s)||p.has(s)&&"current"!==r||(f.add(s),g.push({id:s,name:n(t)||s,source:r}))};for(let e of(0,a.KC)(u)||[])e&&(!e.type||"llm"===e.type)&&y(e.id,e.name||e.displayName||e.id,"builtin");if("cloudflare-ai"===u&&0===g.length)for(let e of l)y(e.id,e.name,"builtin");for(let e of s||[])e&&e.provider===u&&y(e.defaultModel,e.defaultModel,"connection");for(let[e,t]of Object.entries(h)){let r=function(e,t){let r=n(e);if(!r)return"";for(let e of t)if(r.startsWith(e))return r.slice(e.length).trim();return""}(t,b);r&&y(r,e&&e!==r?`${r} (${e})`:r,"alias")}let v=n(m);return v&&y(v,`${v} (current)`,"current"),c(g)}({providerId:u,aliases:p,disabledIds:h,connections:t,currentModel:r});if(!b&&0===f.length){let e=s.Q2?.[u]?.name||u;b=`No local Available Models found for ${e}. Add models in Available Models first, then reopen this healthcheck dialog.`}return{models:f,warning:b}}function u(e=[],t=""){let r=n(t);return!r||(e||[]).some(e=>e.id===r)?e:c([...e||[],{id:r,name:`${r} (current)`,source:"current"}])}},14932:(e,t,r)=>{r.d(t,{A:()=>o});var s=r(95155),a=r(12115),l=r(47650);let n=[{icon:"terminal",label:"Terminal",desc:"Full shell access"},{icon:"cast",label:"Desktop",desc:"Screen sharing"},{icon:"folder_open",label:"Files",desc:"Browse & edit files"}],i=[{icon:"qr_code_scanner",text:"Scan QR to connect instantly"},{icon:"wifi_off",text:"No port forwarding needed"},{icon:"devices",text:"Works on any device"}];function o({isOpen:e,onClose:t}){return((0,a.useEffect)(()=>{if(!e)return;document.body.style.overflow="hidden";let r=e=>{"Escape"===e.key&&t()};return document.addEventListener("keydown",r),()=>{document.body.style.overflow="",document.removeEventListener("keydown",r)}},[e,t]),e)?(0,l.createPortal)((0,s.jsxs)("div",{className:"fixed inset-0 z-[9999] flex items-center justify-center p-4",children:[(0,s.jsx)("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-[2px] fade-in",onClick:t}),(0,s.jsxs)("div",{className:"relative w-full max-w-sm rounded-[14px] overflow-hidden shadow-[var(--shadow-elev)] fade-in flex flex-col bg-surface border border-border-subtle",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border-subtle",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("div",{className:"w-7 h-7 rounded-[8px] flex items-center justify-center bg-primary",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-white text-base",children:"terminal"})}),(0,s.jsx)("span",{className:"text-xs font-bold uppercase tracking-wider text-primary font-mono",children:"9Remote"})]}),(0,s.jsx)("button",{onClick:t,className:"p-1.5 rounded-[10px] text-text-muted hover:bg-surface-2 hover:text-text-main transition-colors",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-base",children:"close"})})]}),(0,s.jsxs)("div",{className:"px-7 py-7 pb-9 flex flex-col gap-6",children:[(0,s.jsxs)("div",{className:"flex flex-col items-center gap-2 text-center mt-2",children:[(0,s.jsx)("div",{className:"w-14 h-14 rounded-[14px] flex items-center justify-center mb-1 bg-primary shadow-[var(--shadow-warm)]",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-white text-[30px]",children:"terminal"})}),(0,s.jsx)("h1",{className:"text-lg font-bold text-text-main tracking-tight",children:"9Remote"}),(0,s.jsx)("p",{className:"text-xs text-text-muted leading-5 max-w-[220px]",children:"Access your terminal, desktop & files from anywhere"})]}),(0,s.jsx)("div",{className:"flex gap-2 w-full",children:n.map(({icon:e,label:t,desc:r})=>(0,s.jsxs)("div",{className:"flex-1 flex flex-col items-center gap-1.5 py-4 px-1 rounded-[10px] border border-border-subtle bg-surface-2",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-primary text-[22px]",children:e}),(0,s.jsx)("p",{className:"text-xs font-semibold text-text-main",children:t}),(0,s.jsx)("p",{className:"text-[10px] text-text-muted text-center leading-4",children:r})]},t))}),(0,s.jsx)("div",{className:"flex flex-col gap-3 w-full",children:i.map(({icon:e,text:t})=>(0,s.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,s.jsx)("span",{className:"material-symbols-outlined flex-shrink-0 text-primary text-[16px]",children:e}),(0,s.jsx)("span",{className:"text-xs text-text-muted",children:t})]},e))}),(0,s.jsxs)("button",{onClick:()=>window.open("https://9remote.cc","_blank"),className:"w-full py-3 flex items-center justify-center gap-2 text-sm font-semibold text-white rounded-[10px] bg-primary hover:bg-primary-hover shadow-[var(--shadow-warm)] active:scale-[0.98] transition-all",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-base",children:"open_in_new"}),"Get 9Remote"]})]})]})]}),document.body):null}},21110:(e,t,r)=>{r.d(t,{ThemeProvider:()=>n});var s=r(95155),a=r(12115),l=r(90085);function n({children:e}){let{initTheme:t}=(0,l.A)();return(0,a.useEffect)(()=>{t()},[t]),(0,s.jsx)(s.Fragment,{children:e})}},21931:(e,t,r)=>{r.d(t,{default:()=>d});var s=r(95155),a=r(12115),l=r(47650),n=r(93308),i=r(73006);let o=e=>({en:{name:"English",flag:"\uD83C\uDDFA\uD83C\uDDF8"},vi:{name:"Tiếng Việt",flag:"\uD83C\uDDFB\uD83C\uDDF3"},"zh-CN":{name:"简体中文",flag:"\uD83C\uDDE8\uD83C\uDDF3"},"zh-TW":{name:"繁體中文",flag:"\uD83C\uDDF9\uD83C\uDDFC"},ja:{name:"日本語",flag:"\uD83C\uDDEF\uD83C\uDDF5"},"pt-BR":{name:"Portugu\xeas (Brasil)",flag:"\uD83C\uDDE7\uD83C\uDDF7"},"pt-PT":{name:"Portugu\xeas (Portugal)",flag:"\uD83C\uDDF5\uD83C\uDDF9"},ko:{name:"한국어",flag:"\uD83C\uDDF0\uD83C\uDDF7"},es:{name:"Espa\xf1ol",flag:"\uD83C\uDDEA\uD83C\uDDF8"},de:{name:"Deutsch",flag:"\uD83C\uDDE9\uD83C\uDDEA"},fr:{name:"Fran\xe7ais",flag:"\uD83C\uDDEB\uD83C\uDDF7"},he:{name:"עברית",flag:"\uD83C\uDDEE\uD83C\uDDF1"},ar:{name:"العربية",flag:"\uD83C\uDDF8\uD83C\uDDE6"},ru:{name:"Русский",flag:"\uD83C\uDDF7\uD83C\uDDFA"},pl:{name:"Polski",flag:"\uD83C\uDDF5\uD83C\uDDF1"},cs:{name:"Čeština",flag:"\uD83C\uDDE8\uD83C\uDDFF"},nl:{name:"Nederlands",flag:"\uD83C\uDDF3\uD83C\uDDF1"},tr:{name:"T\xfcrk\xe7e",flag:"\uD83C\uDDF9\uD83C\uDDF7"},uk:{name:"Українська",flag:"\uD83C\uDDFA\uD83C\uDDE6"},tl:{name:"Tagalog",flag:"\uD83C\uDDF5\uD83C\uDDED"},id:{name:"Indonesia",flag:"\uD83C\uDDEE\uD83C\uDDE9"},th:{name:"ไทย",flag:"\uD83C\uDDF9\uD83C\uDDED"},hi:{name:"हिन्दी",flag:"\uD83C\uDDEE\uD83C\uDDF3"},bn:{name:"বাংলা",flag:"\uD83C\uDDE7\uD83C\uDDE9"},ur:{name:"اردو",flag:"\uD83C\uDDF5\uD83C\uDDF0"},ro:{name:"Rom\xe2nă",flag:"\uD83C\uDDF7\uD83C\uDDF4"},sv:{name:"Svenska",flag:"\uD83C\uDDF8\uD83C\uDDEA"},it:{name:"Italiano",flag:"\uD83C\uDDEE\uD83C\uDDF9"},el:{name:"Ελληνικά",flag:"\uD83C\uDDEC\uD83C\uDDF7"},hu:{name:"Magyar",flag:"\uD83C\uDDED\uD83C\uDDFA"},fi:{name:"Suomi",flag:"\uD83C\uDDEB\uD83C\uDDEE"},da:{name:"Dansk",flag:"\uD83C\uDDE9\uD83C\uDDF0"},no:{name:"Norsk",flag:"\uD83C\uDDF3\uD83C\uDDF4"}})[e]||{name:e,flag:"\uD83C\uDF10"};function d({className:e="",isOpen:t,onClose:r,hideTrigger:c=!1}){let[m,u]=(0,a.useState)("en"),[x,p]=(0,a.useState)(!1),[h,b]=(0,a.useState)(!1),f=(0,a.useRef)(null),g="boolean"==typeof t,y=g?t:h,v=e=>{g?!e&&r&&r(m):b(e)};(0,a.useEffect)(()=>{u(function(){if("u"<typeof document)return"en";let e=document.cookie.split(";").find(e=>e.trim().startsWith(`${n.CL}=`)),t=e?decodeURIComponent(e.split("=")[1]):"en";return(0,n.QC)(t)}())},[]),(0,a.useEffect)(()=>{function e(e){f.current&&!f.current.contains(e.target)&&v(!1)}if(y)return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[y]);let j=async e=>{if(e!==m&&!x){p(!0),v(!1);try{await fetch("/api/locale",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({locale:e})}),await (0,i.wn)(),u(e)}catch(e){console.error("Failed to set locale:",e)}finally{p(!1)}}};return(0,s.jsxs)("div",{className:e,children:[!c&&(0,s.jsxs)("button",{onClick:()=>v(!y),disabled:x,className:"flex items-center gap-2 px-3 py-2 rounded-lg text-text-muted hover:text-text-main hover:bg-surface/60 transition-colors",title:"Language","data-i18n-skip":"true",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"language"}),(0,s.jsx)("span",{className:"text-sm font-medium",children:o(m).name}),(0,s.jsx)("span",{className:"text-lg",children:o(m).flag})]}),y&&(0,l.createPortal)((0,s.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4","data-i18n-skip":"true",children:[(0,s.jsx)("div",{className:"absolute inset-0 bg-black/30 backdrop-blur-sm",onClick:()=>v(!1)}),(0,s.jsxs)("div",{ref:f,className:"relative w-full bg-surface border border-black/10 dark:border-white/10 rounded-xl shadow-2xl animate-in fade-in zoom-in-95 duration-200 max-w-2xl flex flex-col max-h-[80vh]",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between p-3 border-b border-black/5 dark:border-white/5",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Select Language"}),(0,s.jsx)("button",{onClick:()=>v(!1),className:"p-1.5 rounded-lg text-text-muted hover:bg-black/5 dark:hover:bg-white/5 transition-colors","aria-label":"Close",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"close"})})]}),(0,s.jsx)("div",{className:"p-6 overflow-y-auto flex-1",children:(0,s.jsx)("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(100px,1fr))] gap-2",children:n.YZ.map(e=>{let t=m===e,r=o(e);return(0,s.jsxs)("button",{onClick:()=>j(e),disabled:x,className:`flex flex-col items-center justify-start gap-1 px-2 py-3 rounded-lg text-xs font-medium transition-colors w-full ${t?"bg-primary/15 text-primary ring-2 ring-primary":"text-text-main hover:bg-black/5 dark:hover:bg-white/5"} ${x?"opacity-70 cursor-wait":""}`,title:r.name,children:[(0,s.jsx)("span",{className:"text-2xl",children:r.flag}),(0,s.jsx)("span",{className:"text-center leading-tight line-clamp-2 h-8 flex items-center",children:r.name}),t&&(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"check"})]},e)})})})]})]}),document.body)]})}},23615:(e,t,r)=>{r.d(t,{default:()=>n});var s=r(95155),a=r(12115),l=r(84588);function n(){let[e,t]=(0,a.useState)([]),[r,n]=(0,a.useState)(!0),[i,o]=(0,a.useState)(!0);(0,a.useEffect)(()=>{d()},[]),(0,a.useEffect)(()=>{let e;return i&&(e=setInterval(()=>{d(!1)},3e3)),()=>clearInterval(e)},[i]);let d=async(e=!0)=>{e&&n(!0);try{let e=await fetch("/api/usage/request-logs");if(e.ok){let r=await e.json();t(r)}}catch(e){console.error("Failed to fetch logs:",e)}finally{e&&n(!1)}};return(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)("h2",{className:"text-xl font-semibold",children:"Request Logs"}),(0,s.jsx)("div",{className:"flex items-center gap-2",children:(0,s.jsxs)("label",{className:"text-sm font-medium text-text-muted flex items-center gap-2 cursor-pointer",children:[(0,s.jsx)("span",{children:"Auto Refresh (3s)"}),(0,s.jsx)("div",{onClick:()=>o(!i),className:`relative inline-flex h-5 w-9 items-center rounded-full transition-colors focus:outline-none ${i?"bg-primary":"bg-bg-subtle border border-border"}`,children:(0,s.jsx)("span",{className:`inline-block h-3 w-3 transform rounded-full bg-white transition-transform ${i?"translate-x-5":"translate-x-1"}`})})]})})]}),(0,s.jsx)(l.default,{className:"overflow-hidden bg-black/5 dark:bg-black/20",children:(0,s.jsx)("div",{className:"p-0 overflow-x-auto max-h-[600px] overflow-y-auto font-mono text-xs",children:r&&0===e.length?(0,s.jsx)("div",{className:"p-8 text-center text-text-muted",children:"Loading logs..."}):0===e.length?(0,s.jsx)("div",{className:"p-8 text-center text-text-muted",children:"No logs recorded yet."}):(0,s.jsxs)("table",{className:"w-full text-left border-collapse whitespace-nowrap",children:[(0,s.jsx)("thead",{className:"sticky top-0 bg-bg-subtle border-b border-border z-10",children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{className:"px-3 py-2 border-r border-border",children:"DateTime"}),(0,s.jsx)("th",{className:"px-3 py-2 border-r border-border",children:"Model"}),(0,s.jsx)("th",{className:"px-3 py-2 border-r border-border",children:"Provider"}),(0,s.jsx)("th",{className:"px-3 py-2 border-r border-border",children:"Account"}),(0,s.jsx)("th",{className:"px-3 py-2 border-r border-border",children:"In"}),(0,s.jsx)("th",{className:"px-3 py-2 border-r border-border",children:"Out"}),(0,s.jsx)("th",{className:"px-3 py-2",children:"Status"})]})}),(0,s.jsx)("tbody",{className:"divide-y divide-border/50",children:e.map((e,t)=>{let r=e.split(" | ");if(r.length<7)return null;let a=r[6],l=a.includes("PENDING"),n=a.includes("FAILED"),i=a.includes("OK");return(0,s.jsxs)("tr",{className:`hover:bg-primary/5 transition-colors ${l?"bg-primary/5":""}`,children:[(0,s.jsx)("td",{className:"px-3 py-1.5 border-r border-border text-text-muted",children:r[0]}),(0,s.jsx)("td",{className:"px-3 py-1.5 border-r border-border font-medium",children:r[1]}),(0,s.jsx)("td",{className:"px-3 py-1.5 border-r border-border",children:(0,s.jsx)("span",{className:"px-1.5 py-0.5 rounded bg-bg-subtle border border-border text-[10px] uppercase font-bold",children:r[2]})}),(0,s.jsx)("td",{className:"px-3 py-1.5 border-r border-border truncate max-w-[150px]",title:r[3],children:r[3]}),(0,s.jsx)("td",{className:"px-3 py-1.5 border-r border-border text-right text-primary",children:r[4]}),(0,s.jsx)("td",{className:"px-3 py-1.5 border-r border-border text-right text-success",children:r[5]}),(0,s.jsx)("td",{className:`px-3 py-1.5 font-bold ${i?"text-success":n?"text-error":"text-primary animate-pulse"}`,children:a})]},t)})})]})})}),(0,s.jsx)("div",{className:"text-[10px] text-text-muted italic",children:"Logs are loaded from the request history database."})]})}},23936:(e,t,r)=>{r.d(t,{default:()=>o});var s=r(95155),a=r(12115),l=r(14051),n=r.n(l),i=r(35497);function o({isOpen:e,onSuccess:t,onClose:r}){let[l,n]=(0,a.useState)(""),[d,c]=(0,a.useState)(!1),[m,u]=(0,a.useState)(null),[x,p]=(0,a.useState)(!1),h=async()=>{if(!l.trim())return void u("Please paste your cookie");c(!0),u(null);try{let e=await fetch("/api/oauth/iflow/cookie",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cookie:l.trim()})}),r=await e.json();if(!e.ok)throw Error(r.error||"Authentication failed");p(!0),setTimeout(()=>{t?.(),b()},1500)}catch(e){u(e.message)}finally{c(!1)}},b=()=>{n(""),u(null),p(!1),r?.()};return(0,s.jsx)(i.aF,{isOpen:e,onClose:b,title:"iFlow Cookie Authentication",children:(0,s.jsx)("div",{className:"space-y-4",children:x?(0,s.jsxs)("div",{className:"text-center py-8",children:[(0,s.jsx)("div",{className:"text-6xl mb-4",children:"✅"}),(0,s.jsx)("p",{className:"text-lg font-medium text-text-primary",children:"Authentication Successful!"}),(0,s.jsx)("p",{className:"text-sm text-text-muted mt-2",children:"Fresh API key obtained"})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsxs)("p",{className:"text-sm text-text-muted",children:["To get a fresh API key, paste your browser cookie from"," ",(0,s.jsx)("a",{href:"https://platform.iflow.cn",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"platform.iflow.cn"})]}),(0,s.jsxs)("div",{className:"bg-surface-secondary p-3 rounded-lg text-xs space-y-2",children:[(0,s.jsx)("p",{className:"font-medium text-text-primary",children:"How to get cookie:"}),(0,s.jsxs)("ol",{className:"list-decimal list-inside space-y-1 text-text-muted",children:[(0,s.jsx)("li",{children:"Open platform.iflow.cn in your browser"}),(0,s.jsx)("li",{children:"Login to your account"}),(0,s.jsx)("li",{children:"Open DevTools (F12) → Application/Storage → Cookies"}),(0,s.jsx)("li",{children:"Copy the entire cookie string (must include BXAuth)"}),(0,s.jsx)("li",{children:"Paste it below"})]})]})]}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("label",{className:"block text-sm font-medium text-text-primary",children:"Cookie String"}),(0,s.jsx)("textarea",{value:l,onChange:e=>n(e.target.value),placeholder:"BXAuth=xxx; ...",className:"w-full px-3 py-2 bg-surface-secondary border border-border rounded-lg text-sm text-text-primary placeholder-text-muted focus:outline-none focus:ring-2 focus:ring-primary resize-none",rows:4,disabled:d})]}),m&&(0,s.jsx)("div",{className:"p-3 bg-error/10 border border-error/20 rounded-lg",children:(0,s.jsx)("p",{className:"text-sm text-error",children:m})}),(0,s.jsxs)("div",{className:"flex gap-3 pt-2",children:[(0,s.jsx)(i.$n,{variant:"secondary",onClick:b,disabled:d,fullWidth:!0,children:"Cancel"}),(0,s.jsx)(i.$n,{onClick:h,loading:d,fullWidth:!0,children:"Authenticate"})]})]})})})}o.propTypes={isOpen:n().bool.isRequired,onSuccess:n().func,onClose:n().func}},25086:(e,t,r)=>{r.d(t,{CardSkeleton:()=>o,PageLoading:()=>n,Skeleton:()=>i,Spinner:()=>l,default:()=>d});var s=r(95155),a=r(31474);function l({size:e="md",className:t}){return(0,s.jsx)("span",{className:(0,a.cn)("material-symbols-outlined animate-spin text-brand-500",{sm:"size-4",md:"size-6",lg:"size-8",xl:"size-12"}[e],t),children:"progress_activity"})}function n({message:e="Loading..."}){return(0,s.jsxs)("div",{className:"fixed inset-0 z-50 flex flex-col items-center justify-center bg-bg",children:[(0,s.jsx)(l,{size:"xl"}),(0,s.jsx)("p",{className:"mt-4 text-text-muted",children:e})]})}function i({className:e,...t}){return(0,s.jsx)("div",{className:(0,a.cn)("animate-pulse rounded-[10px] bg-surface-2",e),...t})}function o(){return(0,s.jsxs)("div",{className:"p-6 rounded-[14px] border border-border-subtle bg-surface shadow-[var(--shadow-soft)]",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,s.jsx)(i,{className:"h-4 w-24"}),(0,s.jsx)(i,{className:"size-10 rounded-[10px]"})]}),(0,s.jsx)(i,{className:"h-8 w-16 mb-2"}),(0,s.jsx)(i,{className:"h-3 w-20"})]})}function d({type:e="spinner",...t}){switch(e){case"page":return(0,s.jsx)(n,{...t});case"skeleton":return(0,s.jsx)(i,{...t});case"card":return(0,s.jsx)(o,{...t});default:return(0,s.jsx)(l,{...t})}}},28058:(e,t,r)=>{r.d(t,{default:()=>n});var s=r(95155),a=r(12115),l=r(81127);function n({isOpen:e,onClose:t,onAdd:r,addedNames:i=[]}){let[o,d]=(0,a.useState)([]),[c,m]=(0,a.useState)(!1),[u,x]=(0,a.useState)(""),[p,h]=(0,a.useState)("all"),[b,f]=(0,a.useState)(null),[g,y]=(0,a.useState)(null),[v,j]=(0,a.useState)({}),[N,w]=(0,a.useState)({}),[k,C]=(0,a.useState)({});(0,a.useEffect)(()=>{!e||o.length>0||(m(!0),fetch("/api/cli-tools/cowork-mcp-registry").then(e=>e.json()).then(e=>{e.error?f(e.error):d(e.servers||[])}).catch(e=>f(e.message)).finally(()=>m(!1)))},[e]);let S=(0,a.useMemo)(()=>new Set(i),[i]),T=(0,a.useMemo)(()=>{let e=u.trim().toLowerCase();return o.filter(t=>("authless"!==p||!t.oauth)&&("oauth"!==p||!!t.oauth)&&(!e||(t.title||"").toLowerCase().includes(e)||(t.description||"").toLowerCase().includes(e)||(t.name||"").toLowerCase().includes(e)))},[o,u,p]),A=async e=>{if(!v[e.url]){w(t=>({...t,[e.url]:!0}));try{let t=await fetch("/api/cli-tools/cowork-mcp-tools",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:e.url})}),r=await t.json(),s=r.tools||[],a=Array.isArray(e.toolNames)?e.toolNames:[],l=s.length>0?s.map(e=>e.name):a;j(t=>({...t,[e.url]:{tools:s,requiresAuth:!!r.requiresAuth,error:r.error}})),C(t=>({...t,[e.url]:Object.fromEntries(l.map(e=>[e,!0]))}))}catch(t){j(r=>({...r,[e.url]:{tools:[],error:t.message}}))}finally{w(t=>({...t,[e.url]:!1}))}}},_=(e,t)=>{let r=k[e]||{};C(s=>({...s,[e]:Object.fromEntries(Object.keys(r).map(e=>[e,t]))}))};return(0,s.jsx)(l.default,{isOpen:e,onClose:t,title:"Browse MCP Marketplace",size:"lg",children:(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("input",{type:"text",value:u,onChange:e=>x(e.target.value),placeholder:"Search by name or description...",className:"flex-1 px-2 py-1.5 bg-surface rounded text-xs border border-border focus:outline-none focus:ring-1 focus:ring-primary/50"}),(0,s.jsxs)("select",{value:p,onChange:e=>h(e.target.value),className:"px-2 py-1.5 bg-surface rounded text-xs border border-border focus:outline-none focus:ring-1 focus:ring-primary/50",children:[(0,s.jsx)("option",{value:"all",children:"All"}),(0,s.jsx)("option",{value:"authless",children:"Authless"}),(0,s.jsx)("option",{value:"oauth",children:"OAuth"})]})]}),b&&(0,s.jsx)("div",{className:"px-2 py-1.5 rounded text-xs bg-red-500/10 text-red-600",children:b}),c&&(0,s.jsxs)("div",{className:"flex items-center gap-2 text-text-muted text-xs py-4 justify-center",children:[(0,s.jsx)("span",{className:"material-symbols-outlined animate-spin text-[18px]",children:"progress_activity"}),(0,s.jsx)("span",{children:"Loading registry..."})]}),!c&&(0,s.jsxs)("div",{className:"flex flex-col gap-1 max-h-[60vh] overflow-y-auto",children:[0===T.length&&(0,s.jsx)("div",{className:"text-center text-xs text-text-muted py-6",children:"No servers match filter"}),T.map(e=>{let t=S.has(e.slug||e.name),a=g===e.url,l=v[e.url],n=N[e.url],i=k[e.url]||{},o=Object.keys(i),d=Object.values(i).filter(Boolean).length;return(0,s.jsxs)("div",{className:"rounded border border-transparent hover:border-border",children:[(0,s.jsxs)("div",{className:"flex items-start gap-2 px-2 py-2 hover:bg-black/5 dark:hover:bg-white/5",children:[e.iconUrl?(0,s.jsx)("img",{src:e.iconUrl,alt:"",className:"size-7 rounded shrink-0 object-contain",onError:e=>{e.target.style.display="none"}}):(0,s.jsx)("div",{className:"size-7 rounded bg-surface shrink-0"}),(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsxs)("div",{className:"flex items-center gap-1.5 flex-wrap",children:[(0,s.jsx)("span",{className:"font-medium text-xs",children:e.title}),e.oauth?(0,s.jsx)("span",{className:"px-1 py-0.5 text-[9px] rounded bg-amber-500/10 text-amber-600",children:"OAuth"}):(0,s.jsx)("span",{className:"px-1 py-0.5 text-[9px] rounded bg-green-500/10 text-green-600",children:"Authless"}),e.toolCount>0&&(0,s.jsxs)("span",{className:"text-[10px] text-text-muted",children:[e.toolCount," tools"]})]}),e.description&&(0,s.jsx)("p",{className:"text-[10px] text-text-muted line-clamp-2 mt-0.5",children:e.description})]}),(0,s.jsx)("button",{onClick:()=>t?null:void(g===e.url?y(null):(y(e.url),A(e))),disabled:t,className:`shrink-0 px-2 py-1 rounded text-[10px] font-medium transition-colors ${t?"bg-green-500/10 text-green-600 cursor-default":a?"bg-surface border border-border text-text-muted hover:bg-black/5":"bg-primary/10 border border-primary/40 text-primary hover:bg-primary/20"}`,children:t?"Added":a?"Cancel":"+ Add"})]}),a&&(0,s.jsxs)("div",{className:"px-3 py-2 bg-surface/40 border-t border-border flex flex-col gap-2",children:[n&&(0,s.jsxs)("div",{className:"flex items-center gap-2 text-text-muted text-[10px] py-1",children:[(0,s.jsx)("span",{className:"material-symbols-outlined animate-spin text-[14px]",children:"progress_activity"}),(0,s.jsx)("span",{children:"Probing server for tools..."})]}),!n&&l?.requiresAuth&&(0,s.jsx)("p",{className:"text-[10px] text-amber-600 bg-amber-500/10 px-2 py-1 rounded",children:"\uD83D\uDD10 OAuth required. Add now and authenticate after Apply; tool list will be discovered after first connect."}),!n&&l?.error&&!l?.requiresAuth&&(0,s.jsxs)("p",{className:"text-[10px] text-red-600 bg-red-500/10 px-2 py-1 rounded",children:["Probe failed: ",l.error]}),!n&&0===o.length&&!l?.requiresAuth&&!l?.error&&(0,s.jsx)("p",{className:"text-[10px] text-text-muted",children:"No tools advertised by server."}),!n&&o.length>0&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("span",{className:"text-[10px] text-text-muted",children:[d,"/",o.length," tools enabled"]}),(0,s.jsxs)("div",{className:"flex gap-1",children:[(0,s.jsx)("button",{onClick:()=>_(e.url,!0),className:"text-[10px] text-primary hover:underline",children:"All"}),(0,s.jsx)("span",{className:"text-[10px] text-text-muted",children:"\xb7"}),(0,s.jsx)("button",{onClick:()=>_(e.url,!1),className:"text-[10px] text-primary hover:underline",children:"None"})]})]}),(0,s.jsx)("div",{className:"grid grid-cols-2 gap-1 max-h-40 overflow-y-auto",children:o.map(t=>(0,s.jsxs)("label",{className:"flex items-center gap-1.5 text-[10px] cursor-pointer hover:bg-black/5 dark:hover:bg-white/5 px-1 rounded",children:[(0,s.jsx)("input",{type:"checkbox",checked:!!i[t],onChange:()=>{var r;return r=e.url,void C(e=>({...e,[r]:{...e[r],[t]:!e[r]?.[t]}}))},className:"size-3"}),(0,s.jsx)("span",{className:"truncate",children:t})]},t))})]}),(0,s.jsx)("button",{onClick:()=>{let t,s;return s=Object.keys(t=k[e.url]||{}).filter(e=>t[e]),void(r?.({name:e.slug||e.name,title:e.title,description:e.description,url:e.url,transport:e.transport,oauth:e.oauth,toolNames:s}),y(null))},className:"self-end px-2 py-1 rounded text-[10px] font-medium bg-primary text-white hover:bg-primary/90",children:"✓ Confirm Add"})]})]},e.url)})]}),(0,s.jsxs)("div",{className:"text-[10px] text-text-muted text-right",children:[T.length," of ",o.length," servers"]})]})})}},28067:(e,t,r)=>{r.d(t,{default:()=>l});var s=r(95155),a=r(31474);function l({options:e=[],value:t,onChange:r,size:n="md",className:i}){let o={sm:"h-7 text-xs",md:"h-9 text-sm",lg:"h-11 text-base"};return(0,s.jsx)("div",{className:(0,a.cn)("inline-flex items-center p-1 rounded-[10px] overflow-x-auto","bg-surface-2",i),children:e.map(e=>(0,s.jsxs)("button",{onClick:()=>r(e.value),className:(0,a.cn)("shrink-0 px-4 rounded-[8px] font-medium transition-all",o[n],t===e.value?"bg-surface text-text-main shadow-sm":"text-text-muted hover:text-text-main"),children:[e.icon&&(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px] mr-1.5",children:e.icon}),e.label]},e.value))})}},28815:(e,t,r)=>{r.d(t,{default:()=>o});var s=r(95155),a=r(12115),l=r(81127),n=r(92542),i=r(11059);function o({isOpen:e,onClose:t,title:r="Manual Configuration",configs:d=[]}){let{copy:c}=(0,i.C)(),[m,u]=(0,a.useState)(null);return(0,s.jsx)(l.default,{isOpen:e,onClose:t,title:r,size:"xl",children:(0,s.jsx)("div",{className:"flex flex-col gap-4",children:d.map((e,t)=>(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)("span",{className:"text-sm font-medium text-text-main",children:e.filename}),(0,s.jsxs)(n.default,{variant:"ghost",size:"sm",onClick:()=>{var r;return r=e.content,void(c(r,`manualconfig-${t}`),u(t),setTimeout(()=>u(null),2e3))},children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:m===t?"check":"content_copy"}),m===t?"Copied!":"Copy"]})]}),(0,s.jsx)("pre",{className:"px-3 py-2 bg-black/5 dark:bg-white/5 rounded font-mono text-xs overflow-x-auto whitespace-pre-wrap break-all max-h-60 overflow-y-auto border border-border",children:e.content})]},t))})})}},30815:(e,t,r)=>{r.d(t,{default:()=>o});var s=r(95155),a=r(12115),l=r(14051),n=r.n(l),i=r(35497);function o({isOpen:e,onSuccess:t,onClose:r}){let[l,n]=(0,a.useState)(""),[d,c]=(0,a.useState)(""),[m,u]=(0,a.useState)(null),[x,p]=(0,a.useState)(!1),[h,b]=(0,a.useState)(!1),[f,g]=(0,a.useState)(!1),[y,v]=(0,a.useState)(!1),j=async()=>{b(!0),u(null),g(!1),v(!1);try{let e=await fetch("/api/oauth/cursor/auto-import"),t=await e.json();t.found?(n(t.accessToken),c(t.machineId),g(!0)):t.windowsManual?v(!0):u(t.error||"Could not auto-detect tokens")}catch(e){u("Failed to auto-detect tokens")}finally{b(!1)}};(0,a.useEffect)(()=>{e&&j()},[e]);let N=async()=>{if(!l.trim())return void u("Please enter an access token");if(!d.trim())return void u("Please enter a machine ID");p(!0),u(null);try{let e=await fetch("/api/oauth/cursor/import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accessToken:l.trim(),machineId:d.trim()})}),s=await e.json();if(!e.ok)throw Error(s.error||"Import failed");t?.(),r()}catch(e){u(e.message)}finally{p(!1)}};return(0,s.jsx)(i.aF,{isOpen:e,title:"Connect Cursor IDE",onClose:r,children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[h&&(0,s.jsxs)("div",{className:"text-center py-6",children:[(0,s.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-primary/10 flex items-center justify-center",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-3xl text-primary animate-spin",children:"progress_activity"})}),(0,s.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Auto-detecting tokens..."}),(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"Reading from Cursor IDE database"})]}),!h&&(0,s.jsxs)(s.Fragment,{children:[f&&(0,s.jsx)("div",{className:"bg-green-50 dark:bg-green-900/20 p-3 rounded-lg border border-green-200 dark:border-green-800",children:(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-green-600 dark:text-green-400",children:"check_circle"}),(0,s.jsx)("p",{className:"text-sm text-green-800 dark:text-green-200",children:"Tokens auto-detected from Cursor IDE successfully!"})]})}),y&&(0,s.jsxs)("div",{className:"bg-amber-50 dark:bg-amber-900/20 p-3 rounded-lg border border-amber-200 dark:border-amber-800 flex flex-col gap-2",children:[(0,s.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-amber-600 dark:text-amber-400",children:"info"}),(0,s.jsx)("p",{className:"text-sm font-medium text-amber-800 dark:text-amber-200",children:"Could not read Cursor database automatically."})]}),(0,s.jsxs)("p",{className:"text-xs text-amber-700 dark:text-amber-300",children:["Make sure Cursor IDE has been opened at least once, then click ",(0,s.jsx)("strong",{children:"Retry"}),". If the problem persists, paste your tokens manually below."]}),(0,s.jsx)(i.$n,{onClick:j,variant:"outline",fullWidth:!0,children:"Retry"})]}),!f&&!y&&!m&&(0,s.jsx)("div",{className:"bg-blue-50 dark:bg-blue-900/20 p-3 rounded-lg border border-blue-200 dark:border-blue-800",children:(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-blue-600 dark:text-blue-400",children:"info"}),(0,s.jsx)("p",{className:"text-sm text-blue-800 dark:text-blue-200",children:"Cursor IDE not detected. Please paste your tokens manually."})]})}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("label",{className:"block text-sm font-medium mb-2",children:["Access Token ",(0,s.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,s.jsx)("textarea",{value:l,onChange:e=>n(e.target.value),placeholder:"Access token will be auto-filled...",rows:3,className:"w-full px-3 py-2 text-sm font-mono border border-border rounded-lg bg-background focus:outline-none focus:border-primary resize-none"})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("label",{className:"block text-sm font-medium mb-2",children:["Machine ID ",(0,s.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,s.jsx)(i.pd,{value:d,onChange:e=>c(e.target.value),placeholder:"Machine ID will be auto-filled...",className:"font-mono text-sm"})]}),m&&(0,s.jsx)("div",{className:"bg-red-50 dark:bg-red-900/20 p-3 rounded-lg border border-red-200 dark:border-red-800",children:(0,s.jsx)("p",{className:"text-sm text-red-600 dark:text-red-400",children:m})}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(i.$n,{onClick:N,fullWidth:!0,disabled:x||!l.trim()||!d.trim(),children:x?"Importing...":"Import Token"}),(0,s.jsx)(i.$n,{onClick:r,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})})}o.propTypes={isOpen:n().bool.isRequired,onSuccess:n().func,onClose:n().func.isRequired}},31474:(e,t,r)=>{r.d(t,{cn:()=>s});function s(...e){return e.filter(Boolean).join(" ").replace(/\s+/g," ").trim()}},35497:(e,t,r)=>{r.d(t,{x0:()=>w.default,Ex:()=>d.default,$n:()=>s.default,Zp:()=>n.default,Qv:()=>o.CardSkeleton,CK:()=>p.default,uo:()=>i.ConfirmModal,G9:()=>y.default,wI:()=>N.default,vj:()=>j.default,vE:()=>v.default,pd:()=>a.default,Mh:()=>g.default,uR:()=>x.default,Nf:()=>h.default,aF:()=>i.default,rq:()=>u.default,gw:()=>k.default,LF:()=>m.default,Wx:()=>T.default,gM:()=>f.default,Iz:()=>C.default,l6:()=>l.default,lM:()=>c.default,m_:()=>S.default,jK:()=>b.default});var s=r(92542),a=r(11910),l=r(98),n=r(84588),i=r(81127),o=r(25086);r(56319);var d=r(56061),c=r(98542);r(38587),r(21110),r(92622),r(74891),r(92173);var m=r(90882),u=r(72908),x=r(28815),p=r(45455),h=r(28058),b=r(4809);r(21931),r(36548),r(80752),r(40197);var f=r(23615);r(61500);var g=r(62899);r(94230);var y=r(30815),v=r(23936),j=r(95088),N=r(73579),w=r(96748),k=r(4823),C=r(28067),S=r(97677),T=r(51825);r(44656),r(70255),r(86671),r(91450)},36548:(e,t,r)=>{r.d(t,{default:()=>n});var s=r(95155),a=r(12115),l=r(14932);function n(){let[e,t]=(0,a.useState)(!1);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("button",{onClick:()=>t(!0),className:"relative flex items-center gap-1.5 px-2.5 py-1.5 rounded-lg transition-all text-text-muted hover:text-text-main hover:bg-black/5 dark:hover:bg-white/5",title:"9Remote",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"computer"}),(0,s.jsx)("span",{className:"text-xs font-medium",children:"Remote"})]}),(0,s.jsx)(l.A,{isOpen:e,onClose:()=>t(!1)})]})}},38003:(e,t,r)=>{r.d(t,{C:()=>s});let s=(0,r(1934).v)(e=>({query:"",placeholder:"",visible:!1,setQuery:t=>e({query:t}),register:(t="Search...")=>e({visible:!0,placeholder:t,query:""}),unregister:()=>e({visible:!1,placeholder:"",query:""})}))},38587:(e,t,r)=>{r.d(t,{default:()=>n});var s=r(95155),a=r(1620),l=r(31474);function n({className:e,variant:t="default"}){let{isDark:r,toggleTheme:i}=(0,a.D)(),o={default:(0,l.cn)("flex items-center justify-center size-10 rounded-full","text-text-muted hover:text-text-main","hover:bg-surface-2 transition-colors"),card:(0,l.cn)("flex items-center justify-center size-11 rounded-full","bg-surface/60 hover:bg-surface","border border-border","backdrop-blur-md shadow-sm hover:shadow-[var(--shadow-warm)]","text-text-muted hover:text-brand-500","transition-all group")};return(0,s.jsx)("button",{onClick:i,className:(0,l.cn)(o[t],e),"aria-label":`Switch to ${r?"light":"dark"} mode`,title:`Switch to ${r?"light":"dark"} mode`,children:(0,s.jsx)("span",{className:(0,l.cn)("material-symbols-outlined text-[22px]","card"===t&&"transition-transform duration-300 group-hover:rotate-12"),children:r?"light_mode":"dark_mode"})})}},40197:(e,t,r)=>{r.d(t,{default:()=>c});var s=r(95155),a=r(12115),l=r(47650),n=r(14051),i=r.n(n),o=r(9233),d=r(90620);function c({isOpen:e,onClose:t}){let[r,n]=(0,a.useState)(""),[i,m]=(0,a.useState)(!1),[u,x]=(0,a.useState)(""),p=(0,a.useRef)(null);return((0,a.useEffect)(()=>{e&&!r&&(m(!0),x(""),fetch(d.Nu.changelogUrl).then(e=>{if(!e.ok)throw Error(`HTTP ${e.status}`);return e.text()}).then(e=>n(o.xI.parse(e))).catch(e=>x(e.message||"Failed to load")).finally(()=>m(!1)))},[e,r]),(0,a.useEffect)(()=>{let r=e=>{p.current&&!p.current.contains(e.target)&&t()};if(e)return document.addEventListener("mousedown",r),()=>document.removeEventListener("mousedown",r)},[e,t]),!e||"u"<typeof document)?null:(0,l.createPortal)((0,s.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[(0,s.jsx)("div",{className:"absolute inset-0 bg-black/30 backdrop-blur-sm",onClick:t}),(0,s.jsxs)("div",{ref:p,className:"relative w-full bg-surface border border-black/10 dark:border-white/10 rounded-xl shadow-2xl animate-in fade-in zoom-in-95 duration-200 max-w-3xl flex flex-col max-h-[85vh]",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between p-3 border-b border-black/5 dark:border-white/5",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Change Log"}),(0,s.jsx)("button",{onClick:t,className:"p-1.5 rounded-lg text-text-muted hover:bg-black/5 dark:hover:bg-white/5 transition-colors","aria-label":"Close",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"close"})})]}),(0,s.jsxs)("div",{className:"p-6 overflow-y-auto flex-1",children:[i&&(0,s.jsxs)("div",{className:"flex items-center justify-center py-10 text-text-muted",children:[(0,s.jsx)("span",{className:"material-symbols-outlined animate-spin mr-2",children:"progress_activity"}),"Loading..."]}),u&&(0,s.jsxs)("div",{className:"text-red-500 py-4",children:["Failed to load changelog: ",u]}),!i&&!u&&r&&(0,s.jsx)("div",{className:"changelog-body text-text-main",dangerouslySetInnerHTML:{__html:r}})]})]})]}),document.body)}o.xI.setOptions({gfm:!0,breaks:!0}),c.propTypes={isOpen:i().bool.isRequired,onClose:i().func.isRequired}},45455:(e,t,r)=>{r.d(t,{default:()=>m});var s=r(95155),a=r(12115),l=r(81127),n=r(11910),i=r(92542),o=r(72908);let d=/^[a-zA-Z0-9_.\-]+$/;function c({index:e,model:t,isFirst:r,isLast:l,onEdit:n,onMoveUp:i,onMoveDown:o,onRemove:d}){let[m,u]=(0,a.useState)(!1),[x,p]=(0,a.useState)(t),h=()=>{let e=x.trim();e&&e!==t?n(e):p(t),u(!1)};return(0,s.jsxs)("div",{className:"group flex min-w-0 items-center gap-1.5 rounded-md bg-black/[0.02] px-2 py-1 transition-colors hover:bg-black/[0.04] dark:bg-white/[0.02] dark:hover:bg-white/[0.04]",children:[(0,s.jsx)("span",{className:"text-[10px] font-medium text-text-muted w-3 text-center shrink-0",children:e+1}),m?(0,s.jsx)("input",{autoFocus:!0,value:x,onChange:e=>p(e.target.value),onBlur:h,onKeyDown:e=>{"Enter"===e.key&&h(),"Escape"===e.key&&(p(t),u(!1))},className:"min-w-0 flex-1 rounded border border-primary/40 bg-white px-1.5 py-0.5 font-mono text-xs text-text-main outline-none dark:bg-black/20"}):(0,s.jsx)("div",{className:"min-w-0 flex-1 cursor-text truncate rounded px-1.5 py-0.5 font-mono text-xs text-text-main hover:bg-black/5 dark:hover:bg-white/5",onClick:()=>u(!0),title:"Click to edit",children:t}),(0,s.jsxs)("div",{className:"flex shrink-0 items-center gap-0.5",children:[(0,s.jsx)("button",{onClick:i,disabled:r,className:`p-0.5 rounded ${r?"text-text-muted/20 cursor-not-allowed":"text-text-muted hover:text-primary hover:bg-black/5 dark:hover:bg-white/5"}`,title:"Move up",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"arrow_upward"})}),(0,s.jsx)("button",{onClick:o,disabled:l,className:`p-0.5 rounded ${l?"text-text-muted/20 cursor-not-allowed":"text-text-muted hover:text-primary hover:bg-black/5 dark:hover:bg-white/5"}`,title:"Move down",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"arrow_downward"})})]}),(0,s.jsx)("button",{onClick:d,className:"p-0.5 hover:bg-red-500/10 rounded text-text-muted hover:text-red-500 transition-all",title:"Remove",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"close"})})]})}function m({isOpen:e,combo:t,comboStrategy:r={},onClose:u,onSave:x,activeProviders:p,kindFilter:h=null,forcePrefix:b="",title:f}){let g=t?.name?b&&t.name.startsWith(b)?t.name.slice(b.length):t.name:"",[y,v]=(0,a.useState)(g),[j,N]=(0,a.useState)(t?.models||[]),[w,k]=(0,a.useState)(!1),[C,S]=(0,a.useState)(!1),[T,A]=(0,a.useState)(""),[_,I]=(0,a.useState)({});(0,a.useEffect)(()=>{e&&fetch("/api/models/alias").then(e=>e.ok?e.json():null).then(e=>e&&I(e.aliases||{})).catch(()=>{})},[e]);let M=e=>{if(!e.trim())return A("Name is required"),!1;let t=b+e;return d.test(t)?(A(""),!0):(A("Only letters, numbers, -, _ and . allowed"),!1)},$=e=>{let t=e.target.value;b&&t.startsWith(b)&&(t=t.slice(b.length)),v(t),t?M(t):A("")},P=async()=>{M(y)&&(S(!0),await x({name:b+y.trim(),models:j}),S(!1))},R=!!t,E=r?.fallbackStrategy||"fallback";return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(l.default,{isOpen:e,onClose:u,title:f||(R?"Edit Combo":"Create Combo"),children:(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsxs)("div",{children:[b?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("label",{className:"text-sm font-medium mb-1 block",children:"Combo Name"}),(0,s.jsxs)("div",{className:"flex items-stretch",children:[(0,s.jsx)("span",{className:"inline-flex items-center px-2 rounded-l border border-r-0 border-black/10 dark:border-white/10 bg-black/[0.04] dark:bg-white/[0.04] text-text-muted font-mono text-sm",children:b}),(0,s.jsx)("input",{value:y,onChange:$,placeholder:"my-combo",className:"flex-1 min-w-0 rounded-r border border-black/10 dark:border-white/10 bg-white dark:bg-black/20 px-2 py-1.5 font-mono text-sm outline-none focus:border-primary"})]}),T&&(0,s.jsx)("p",{className:"text-[11px] text-red-500 mt-0.5",children:T})]}):(0,s.jsx)(n.default,{label:"Combo Name",value:y,onChange:$,placeholder:"my-combo",error:T}),(0,s.jsxs)("p",{className:"text-[10px] text-text-muted mt-0.5",children:[b?`Auto-prefixed with "${b}". `:"","Only letters, numbers, -, _ and . allowed"]})]}),(0,s.jsxs)("div",{className:"rounded-lg border border-primary/15 bg-primary/5 px-3 py-2 text-xs text-text-muted",children:[(0,s.jsxs)("div",{className:"flex items-center gap-1.5 font-medium text-primary",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"route"}),"Routing: ","least-latency"===E?"Least latency":"p2c"===E?"P2C":"round-robin"===E?"Round Robin":"Fallback priority"]}),(0,s.jsx)("p",{className:"mt-1",children:"Strategy, LAN health, and tag rules are saved in settings.comboStrategies and can be edited from the Combo card."})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Models"}),0===j.length?(0,s.jsxs)("div",{className:"text-center py-4 border border-dashed border-black/10 dark:border-white/10 rounded-lg bg-black/[0.01] dark:bg-white/[0.01]",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-text-muted text-xl mb-1",children:"layers"}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"No models added yet"})]}):(0,s.jsx)("div",{className:"flex max-h-[55vh] min-w-0 flex-col gap-1 overflow-y-auto sm:max-h-[350px]",children:j.map((e,t)=>(0,s.jsx)(c,{index:t,model:e,isFirst:0===t,isLast:t===j.length-1,onEdit:e=>{let r=[...j];r[t]=e,N(r)},onMoveUp:()=>(e=>{if(0===e)return;let t=[...j];[t[e-1],t[e]]=[t[e],t[e-1]],N(t)})(t),onMoveDown:()=>(e=>{if(e===j.length-1)return;let t=[...j];[t[e],t[e+1]]=[t[e+1],t[e]],N(t)})(t),onRemove:()=>N(j.filter((e,r)=>r!==t))},t))}),(0,s.jsxs)("button",{onClick:()=>k(!0),className:"w-full mt-2 py-2 border border-dashed border-black/10 dark:border-white/10 rounded-lg text-xs text-primary font-medium hover:text-primary hover:border-primary/50 transition-colors flex items-center justify-center gap-1",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"add"}),"Add Model"]})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-2 pt-1 sm:flex-row",children:[(0,s.jsx)(i.default,{onClick:u,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,s.jsx)(i.default,{onClick:P,fullWidth:!0,size:"sm",disabled:!y.trim()||!!T||C,children:C?"Saving...":R?"Save":"Create"})]})]})}),(0,s.jsx)(o.default,{isOpen:w,onClose:()=>k(!1),onSelect:e=>{j.includes(e.value)||N([...j,e.value])},onDeselect:e=>{N(j.filter(t=>t!==e.value))},activeProviders:p,modelAliases:_,title:"Add Model to Combo",kindFilter:h,addedModelValues:j,closeOnSelect:!1})]})}},51825:(e,t,r)=>{r.d(t,{default:()=>n});var s=r(95155),a=r(84588);let l={mode:{label:"Mode",format:e=>e},defaultModel:{label:"Model",format:e=>e,mono:!0},baseUrl:{label:"Endpoint",format:e=>e,isLink:!0,mono:!0},costPerQuery:{label:"Cost / call",format:e=>0===e?"Free":`$${e.toFixed(4)}`},pricingUrl:{label:"Pricing",format:()=>"View pricing",isLink:!0},freeTier:{label:"Free tier",format:e=>e},freeMonthlyQuota:{label:"Free quota",format:e=>0===e?"—":e>=999999?"Unlimited":`${e.toLocaleString()} / mo`},searchTypes:{label:"Types",format:e=>e.join(", ")},formats:{label:"Formats",format:e=>e.join(", ")},maxMaxResults:{label:"Max results",format:e=>e},maxCharacters:{label:"Max chars",format:e=>e.toLocaleString()}};function n({config:e,provider:t,title:r="Provider Info"}){if(!e)return null;let i=Object.entries(l).filter(([t])=>void 0!==e[t]&&null!==e[t]&&""!==e[t]).map(([t,r])=>({key:t,label:r.label,value:r.format(e[t]),isLink:r.isLink,mono:r.mono,raw:e[t]})),o=t?.notice?.apiKeyUrl||t?.website,d=t?.notice?.text;return(0,s.jsxs)(a.default,{children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:r}),o&&(0,s.jsxs)("a",{href:o,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),"Get API Key"]})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-x-6 gap-y-2",children:[i.map(e=>(0,s.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,s.jsx)("span",{className:"text-xs text-text-muted w-28 shrink-0",children:e.label}),e.isLink?(0,s.jsx)("a",{href:e.raw,target:"_blank",rel:"noopener noreferrer",className:`text-sm text-primary hover:underline truncate ${e.mono?"font-mono":""}`,children:e.value}):(0,s.jsx)("span",{className:`text-sm text-text-main truncate ${e.mono?"font-mono":""}`,children:e.value})]},e.key)),d&&(0,s.jsxs)("div",{className:"flex items-start gap-3 min-w-0 sm:col-span-2",children:[(0,s.jsx)("span",{className:"text-xs text-text-muted w-28 shrink-0 mt-0.5",children:"Notice"}),(0,s.jsx)("span",{className:"text-sm text-text-main leading-relaxed",children:d})]})]})]})}},56061:(e,t,r)=>{r.d(t,{default:()=>i});var s=r(95155),a=r(31474);let l={default:"bg-surface-2 text-text-muted",primary:"bg-brand-500/10 text-brand-600 dark:text-brand-300",success:"bg-green-500/10 text-green-600 dark:text-green-400",warning:"bg-yellow-500/10 text-yellow-600 dark:text-yellow-400",error:"bg-red-500/10 text-red-600 dark:text-red-400",info:"bg-blue-500/10 text-blue-600 dark:text-blue-400"},n={sm:"px-2 py-0.5 text-[10px]",md:"px-2.5 py-1 text-xs",lg:"px-3 py-1.5 text-sm"};function i({children:e,variant:t="default",size:r="md",dot:o=!1,icon:d,className:c}){return(0,s.jsxs)("span",{className:(0,a.cn)("inline-flex items-center gap-1.5 rounded-full font-semibold",l[t],n[r],c),children:[o&&(0,s.jsx)("span",{className:(0,a.cn)("size-1.5 rounded-full","success"===t&&"bg-green-500","warning"===t&&"bg-yellow-500","error"===t&&"bg-red-500","info"===t&&"bg-blue-500","primary"===t&&"bg-brand-500","default"===t&&"bg-gray-500")}),d&&(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:d}),e]})}},56319:(e,t,r)=>{r.d(t,{default:()=>l});var s=r(95155),a=r(31474);function l({src:e,alt:t="Avatar",name:r,size:n="md",className:i}){let o={xs:"size-6 text-xs",sm:"size-8 text-sm",md:"size-10 text-base",lg:"size-12 text-lg",xl:"size-16 text-xl"};return e?(0,s.jsx)("div",{className:(0,a.cn)("rounded-full bg-cover bg-center bg-no-repeat","ring-2 ring-white dark:ring-surface-dark shadow-sm",o[n],i),style:{backgroundImage:`url(${e})`},role:"img","aria-label":t}):(0,s.jsx)("div",{className:(0,a.cn)("rounded-full flex items-center justify-center font-semibold text-white","ring-2 ring-white dark:ring-surface-dark shadow-sm",o[n],(e=>{if(!e)return"bg-primary";let t=["bg-red-500","bg-orange-500","bg-amber-500","bg-yellow-500","bg-lime-500","bg-green-500","bg-emerald-500","bg-teal-500","bg-cyan-500","bg-sky-500","bg-blue-500","bg-indigo-500","bg-violet-500","bg-purple-500","bg-fuchsia-500","bg-pink-500","bg-rose-500"],r=e.charCodeAt(0)%t.length;return t[r]})(r),i),role:"img","aria-label":t,children:(e=>{if(!e)return"?";let t=e.split(" ");return t.length>=2?`${t[0][0]}${t[1][0]}`.toUpperCase():e.substring(0,2).toUpperCase()})(r)})}},57250:(e,t,r)=>{r.d(t,{A:()=>i});var s=r(95155),a=r(12115),l=r(14051),n=r.n(l);function i({src:e,alt:t,size:r=32,className:l="",fallbackText:n="?",fallbackColor:o}){let[d,c]=(0,a.useState)(!1);return!e||d?(0,s.jsx)("span",{className:`inline-flex items-center justify-center font-bold rounded-lg ${l}`.trim(),style:{width:r,height:r,color:o,fontSize:Math.max(10,Math.floor(.38*r))},children:n}):(0,s.jsx)("img",{src:e,alt:t,width:r,height:r,className:l,onError:()=>c(!0)})}i.propTypes={src:n().string,alt:n().string,size:n().number,className:n().string,fallbackText:n().string,fallbackColor:n().string}},61500:(e,t,r)=>{r.d(t,{default:()=>o});var s=r(95155),a=r(12115),l=r(14051),n=r.n(l),i=r(35497);function o({isOpen:e,onMethodSelect:t,onClose:r}){let[l,n]=(0,a.useState)(null),[d,c]=(0,a.useState)(""),[m,u]=(0,a.useState)("us-east-1"),[x,p]=(0,a.useState)(""),[h,b]=(0,a.useState)(null),[f,g]=(0,a.useState)(!1),[y,v]=(0,a.useState)(!1),[j,N]=(0,a.useState)(!1);(0,a.useEffect)(()=>{"import"===l&&e&&(async()=>{v(!0),b(null),N(!1);try{let e=await fetch("/api/oauth/kiro/auto-import"),t=await e.json();t.found?(p(t.refreshToken),N(!0)):b(t.error||"Could not auto-detect token")}catch(e){b("Failed to auto-detect token")}finally{v(!1)}})()},[l,e]);let w=e=>{n(e),b(null)},k=()=>{n(null),b(null)},C=async()=>{if(!x.trim())return void b("Please enter a refresh token");g(!0),b(null);try{let e=await fetch("/api/oauth/kiro/import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({refreshToken:x.trim()})}),r=await e.json();if(!e.ok)throw Error(r.error||"Import failed");t("import")}catch(e){b(e.message)}finally{g(!1)}},S=e=>{t("social",{provider:e})};return(0,s.jsx)(i.aF,{isOpen:e,title:"Connect Kiro",onClose:r,size:"lg",children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[!l&&(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Choose your authentication method:"}),(0,s.jsx)("button",{onClick:()=>t("builder-id"),className:"w-full p-4 text-left border border-border rounded-lg hover:bg-sidebar transition-colors",children:(0,s.jsxs)("div",{className:"flex items-start gap-3",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-primary mt-0.5",children:"shield"}),(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsx)("h3",{className:"font-semibold mb-1",children:"AWS Builder ID"}),(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"Recommended for most users. Free AWS account required."})]})]})}),(0,s.jsx)("button",{onClick:()=>w("idc"),className:"w-full p-4 text-left border border-border rounded-lg hover:bg-sidebar transition-colors",children:(0,s.jsxs)("div",{className:"flex items-start gap-3",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-primary mt-0.5",children:"business"}),(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsx)("h3",{className:"font-semibold mb-1",children:"AWS IAM Identity Center"}),(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"For enterprise users with custom AWS IAM Identity Center."})]})]})}),(0,s.jsx)("button",{onClick:()=>w("social-google"),className:"hidden w-full p-4 text-left border border-border rounded-lg hover:bg-sidebar transition-colors",children:(0,s.jsxs)("div",{className:"flex items-start gap-3",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-primary mt-0.5",children:"account_circle"}),(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsx)("h3",{className:"font-semibold mb-1",children:"Google Account"}),(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"Login with your Google account (manual callback)."})]})]})}),(0,s.jsx)("button",{onClick:()=>w("social-github"),className:"hidden w-full p-4 text-left border border-border rounded-lg hover:bg-sidebar transition-colors",children:(0,s.jsxs)("div",{className:"flex items-start gap-3",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-primary mt-0.5",children:"code"}),(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsx)("h3",{className:"font-semibold mb-1",children:"GitHub Account"}),(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"Login with your GitHub account (manual callback)."})]})]})}),(0,s.jsx)("button",{onClick:()=>w("import"),className:"w-full p-4 text-left border border-border rounded-lg hover:bg-sidebar transition-colors",children:(0,s.jsxs)("div",{className:"flex items-start gap-3",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-primary mt-0.5",children:"file_upload"}),(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsx)("h3",{className:"font-semibold mb-1",children:"Import Token"}),(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"Paste refresh token from Kiro IDE."})]})]})})]}),"idc"===l&&(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("label",{className:"block text-sm font-medium mb-2",children:["IDC Start URL ",(0,s.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,s.jsx)(i.pd,{value:d,onChange:e=>c(e.target.value),placeholder:"https://your-org.awsapps.com/start",className:"font-mono text-sm"}),(0,s.jsx)("p",{className:"text-xs text-text-muted mt-1",children:"Your organization's AWS IAM Identity Center URL"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"block text-sm font-medium mb-2",children:"AWS Region"}),(0,s.jsx)(i.pd,{value:m,onChange:e=>u(e.target.value),placeholder:"us-east-1",className:"font-mono text-sm"}),(0,s.jsx)("p",{className:"text-xs text-text-muted mt-1",children:"AWS region for your Identity Center (default: us-east-1)"})]}),h&&(0,s.jsx)("p",{className:"text-sm text-red-600",children:h}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(i.$n,{onClick:()=>{d.trim()?t("idc",{startUrl:d.trim(),region:m}):b("Please enter your IDC start URL")},fullWidth:!0,children:"Continue"}),(0,s.jsx)(i.$n,{onClick:k,variant:"ghost",fullWidth:!0,children:"Back"})]})]}),"social-google"===l&&(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsx)("div",{className:"bg-amber-50 dark:bg-amber-900/20 p-4 rounded-lg border border-amber-200 dark:border-amber-800",children:(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-amber-600 dark:text-amber-400",children:"info"}),(0,s.jsxs)("div",{className:"flex-1 text-sm",children:[(0,s.jsx)("p",{className:"font-medium text-amber-900 dark:text-amber-100 mb-1",children:"Manual Callback Required"}),(0,s.jsx)("p",{className:"text-amber-800 dark:text-amber-200",children:"After login, you'll need to copy the callback URL from your browser and paste it back here."})]})]})}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(i.$n,{onClick:()=>S("google"),fullWidth:!0,children:"Continue with Google"}),(0,s.jsx)(i.$n,{onClick:k,variant:"ghost",fullWidth:!0,children:"Back"})]})]}),"social-github"===l&&(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsx)("div",{className:"bg-amber-50 dark:bg-amber-900/20 p-4 rounded-lg border border-amber-200 dark:border-amber-800",children:(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-amber-600 dark:text-amber-400",children:"info"}),(0,s.jsxs)("div",{className:"flex-1 text-sm",children:[(0,s.jsx)("p",{className:"font-medium text-amber-900 dark:text-amber-100 mb-1",children:"Manual Callback Required"}),(0,s.jsx)("p",{className:"text-amber-800 dark:text-amber-200",children:"After login, you'll need to copy the callback URL from your browser and paste it back here."})]})]})}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(i.$n,{onClick:()=>S("github"),fullWidth:!0,children:"Continue with GitHub"}),(0,s.jsx)(i.$n,{onClick:k,variant:"ghost",fullWidth:!0,children:"Back"})]})]}),"import"===l&&(0,s.jsxs)("div",{className:"space-y-4",children:[y&&(0,s.jsxs)("div",{className:"text-center py-6",children:[(0,s.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-primary/10 flex items-center justify-center",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-3xl text-primary animate-spin",children:"progress_activity"})}),(0,s.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Auto-detecting token..."}),(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"Reading from AWS SSO cache"})]}),!y&&(0,s.jsxs)(s.Fragment,{children:[j&&(0,s.jsx)("div",{className:"bg-green-50 dark:bg-green-900/20 p-3 rounded-lg border border-green-200 dark:border-green-800",children:(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-green-600 dark:text-green-400",children:"check_circle"}),(0,s.jsx)("p",{className:"text-sm text-green-800 dark:text-green-200",children:"Token auto-detected from Kiro IDE successfully!"})]})}),!j&&!h&&(0,s.jsx)("div",{className:"bg-blue-50 dark:bg-blue-900/20 p-3 rounded-lg border border-blue-200 dark:border-blue-800",children:(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-blue-600 dark:text-blue-400",children:"info"}),(0,s.jsx)("p",{className:"text-sm text-blue-800 dark:text-blue-200",children:"Kiro IDE not detected. Please paste your refresh token manually."})]})}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("label",{className:"block text-sm font-medium mb-2",children:["Refresh Token ",(0,s.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,s.jsx)(i.pd,{value:x,onChange:e=>p(e.target.value),placeholder:"Token will be auto-filled...",className:"font-mono text-sm"})]}),h&&(0,s.jsx)("div",{className:"bg-red-50 dark:bg-red-900/20 p-3 rounded-lg border border-red-200 dark:border-red-800",children:(0,s.jsx)("p",{className:"text-sm text-red-600 dark:text-red-400",children:h})}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(i.$n,{onClick:C,fullWidth:!0,disabled:f||!x.trim(),children:f?"Importing...":"Import Token"}),(0,s.jsx)(i.$n,{onClick:k,variant:"ghost",fullWidth:!0,children:"Back"})]})]})]})]})})}o.propTypes={isOpen:n().bool.isRequired,onMethodSelect:n().func.isRequired,onClose:n().func.isRequired}},62899:(e,t,r)=>{r.d(t,{default:()=>c});var s=r(95155),a=r(12115),l=r(14051),n=r.n(l),i=r(90882),o=r(61500),d=r(94230);function c({isOpen:e,providerInfo:t,onSuccess:r,onClose:l}){let[n,m]=(0,a.useState)(null),[u,x]=(0,a.useState)(null),[p,h]=(0,a.useState)(null),b=(0,a.useCallback)((e,t)=>{"builder-id"===e?m("builder-id"):"idc"===e?(m("idc"),h(t)):"social"===e?(m("social"),x(t.provider)):"import"===e&&r?.()},[r]),f=()=>{m(null),x(null),h(null)};return n?"builder-id"===n||"idc"===n?(0,s.jsx)(i.default,{isOpen:e,provider:"kiro",providerInfo:t,onSuccess:()=>{m(null),h(null),r?.(),l?.()},onClose:f,idcConfig:p}):"social"===n&&u?(0,s.jsx)(d.default,{isOpen:e,provider:u,onSuccess:()=>{m(null),x(null),r?.(),l?.()},onClose:f}):null:(0,s.jsx)(o.default,{isOpen:e,onMethodSelect:b,onClose:l})}c.propTypes={isOpen:n().bool.isRequired,providerInfo:n().shape({name:n().string}),onSuccess:n().func,onClose:n().func.isRequired}},65921:(e,t,r)=>{r.d(t,{i:()=>l});var s=r(1934);let a=0,l=(0,s.v)((e,t)=>({notifications:[],addNotification:r=>{let s=++a,l={id:s,type:r.type||"info",message:r.message,title:r.title||null,duration:r.duration??5e3,dismissible:r.dismissible??!0,createdAt:Date.now()};return e(e=>({notifications:[...e.notifications,l]})),l.duration>0&&setTimeout(()=>t().removeNotification(s),l.duration),s},removeNotification:t=>{e(e=>({notifications:e.notifications.filter(e=>e.id!==t)}))},clearAll:()=>e({notifications:[]}),success:(e,r)=>t().addNotification({type:"success",message:e,title:r}),error:(e,r)=>t().addNotification({type:"error",message:e,title:r,duration:8e3}),warning:(e,r)=>t().addNotification({type:"warning",message:e,title:r}),info:(e,r)=>t().addNotification({type:"info",message:e,title:r})}))},70255:(e,t,r)=>{r.d(t,{default:()=>i});var s=r(12115),a=r(44656);let l="branding-favicon-link";function n(e,t){if("u"<typeof document)return;let r=document.getElementById(l);r||((r=document.createElement("link")).id=l,r.rel="icon",document.head.appendChild(r)),t&&(r.type=t),r.href=e}function i(){let{siteTitle:e,faviconUrl:t,faviconMime:r}=(0,a.useBranding)();return(0,s.useEffect)(()=>{if(!e)return;let t=document.title;return document.title=e,()=>{document.title=t}},[e]),(0,s.useEffect)(()=>{t?n(t,r||void 0):n("/favicon.svg","image/svg+xml")},[t,r]),null}},72908:(e,t,r)=>{r.d(t,{default:()=>u});var s=r(95155),a=r(12115),l=r(14051),n=r.n(l),i=r(57250),o=r(28777),d=r(52679);let c=[...Object.keys(d.zN),...Object.keys(d.IS),...Object.keys(d.nJ),...Object.keys(d.fg)],m=Object.keys(d.IS).filter(e=>d.IS[e].noAuth);function u({isOpen:e,onClose:t,onSelect:r,onDeselect:l,selectedModel:n,activeProviders:x=[],title:p="Select Model",modelAliases:h={},kindFilter:b=null,addedModelValues:f=[],closeOnSelect:g=!0,personalOnly:y=!1,extraModels:v=[]}){let j=(0,a.useMemo)(()=>b?x.filter(e=>{let t=d.Q2[e.provider];return(t?.serviceKinds||["llm"]).includes(b)}):x,[x,b]),[N,w]=(0,a.useState)(""),[k,C]=(0,a.useState)([]),[S,T]=(0,a.useState)([]),[A,_]=(0,a.useState)([]),[I,M]=(0,a.useState)({}),$=(e,t="combo")=>{if(!e||"object"!=typeof e)return null;let r=String(e.exposedModel||e.model||e.alias||e.name||e.id||"").trim();if(!r)return null;let s=String(e.exposedModel||e.name||r).trim()||r,a=String(e.name||e.id||"").trim(),l=String(e.type||e.comboType||e.kindType||"combo").trim();return{...e,id:e.id||r,name:s,value:r,label:s,internalName:a,pickerSource:t,pickerType:l}},P=async()=>{try{let e=await fetch("/api/combos",{cache:"no-store"}),t=[];if(e.ok)for(let r of(await e.json()).combos||[]){let e=$(r,"legacy");e&&t.push(e)}let r=new Set,s=[];for(let e of t){let t=String(e.value||e.name||"").trim();!t||r.has(t)||(r.add(t),s.push(e))}s.sort((e,t)=>String(e.value||e.name).localeCompare(String(t.value||t.name))),C(s)}catch(e){console.error("Error fetching combos:",e),C([])}};(0,a.useEffect)(()=>{e&&!y&&P()},[e,y]);let R=async()=>{try{let e=await fetch("/api/provider-nodes");if(!e.ok)throw Error(`Failed to fetch provider nodes: ${e.status}`);let t=await e.json();T(t.nodes||[])}catch(e){console.error("Error fetching provider nodes:",e),T([])}};(0,a.useEffect)(()=>{e&&!y&&R()},[e,y]);let E=async()=>{try{let e=await fetch("/api/models/custom");if(!e.ok)throw Error(`Failed to fetch custom models: ${e.status}`);let t=await e.json();_(t.models||[])}catch(e){console.error("Error fetching custom models:",e),_([])}};(0,a.useEffect)(()=>{e&&!y&&E()},[e,y]);let O=async()=>{try{let e=await fetch("/api/models/disabled");if(!e.ok)throw Error(`Failed to fetch disabled models: ${e.status}`);let t=await e.json();M(t.disabled||{})}catch(e){console.error("Error fetching disabled models:",e),M({})}};(0,a.useEffect)(()=>{e&&O()},[e]);let L=(0,a.useMemo)(()=>({...d.zN,...d.IS,...d.nJ,...d.fg}),[]),z=(0,a.useMemo)(()=>{let e={},t=new Set(["webSearch","webFetch"]),r=new Set(["image","tts","stt","embedding","imageToText"]),s=new Set(["tts","image","webFetch"]);return[...new Set([...j.map(e=>e.provider),...y?[]:b?m.filter(e=>(d.Q2[e]?.serviceKinds||["llm"]).includes(b)):m])].sort((e,t)=>{let r=c.indexOf(e),s=c.indexOf(t);return(-1===r?999:r)-(-1===s?999:s)}).forEach(a=>{let l=(0,d.wG)(a),n=L[a]||{name:a,color:"#666"},i=(0,d.mq)(a)||(0,d.gb)(a);if(b&&t.has(b)){e[a]={name:n.name,alias:l,color:n.color,models:[{id:a,name:n.name,value:a}]};return}if(n.passthroughModels){let t=Object.entries(h).filter(([,e])=>e.startsWith(`${l}/`)).map(([e,t])=>({id:t.replace(`${l}/`,""),name:e,value:t}));if(b&&r.has(b)&&0===(t=(0,o.KC)(a).filter(e=>e.type===b).map(e=>({id:e.id,name:e.name,value:`${l}/${e.id}`,type:e.type}))).length&&s.has(b)&&(n.serviceKinds||["llm"]).includes(b)&&(t=[{id:a,name:n.name,value:l}]),t.length>0){let r=S.find(e=>e.id===a),s=r?.name||n.name;e[a]={name:s,alias:l,color:n.color,models:t}}}else if(i){if(b&&r.has(b))return;let t=x.find(e=>e.provider===a),s=S.find(e=>e.id===a),l=t?.name||s?.name||n.name,i=t?.providerSpecificData?.prefix||s?.prefix||a,o=Object.entries(h).filter(([,e])=>e.startsWith(`${a}/`)).map(([e,t])=>({id:t.replace(`${a}/`,""),name:e,value:`${i}/${t.replace(`${a}/`,"")}`})),d=o.length>0?o:[{id:`__placeholder__${a}`,name:`${i}/model-id`,value:`${i}/model-id`,isPlaceholder:!0}];e[a]={name:l,alias:i,color:n.color,models:d,isCustom:!0,hasModels:o.length>0}}else{var c;let t=(0,o.KC)(a),i=new Set(t.map(e=>e.id)),d=t.length>0,m=Object.entries(h).filter(([e,t])=>t.startsWith(`${l}/`)&&(!d||e===t.replace(`${l}/`,""))&&!i.has(t.replace(`${l}/`,""))).map(([e,t])=>({id:t.replace(`${l}/`,""),name:e,value:t,isCustom:!0})),u=new Set(m.map(e=>e.id)),x=A.filter(e=>e.providerAlias===l&&!i.has(e.id)&&!u.has(e.id)).map(e=>({id:e.id,name:e.name||e.id,value:`${l}/${e.id}`,isCustom:!0})),p=[...t.map(e=>({id:e.id,name:e.name,value:`${l}/${e.id}`,type:e.type})),...m,...x],f=new Set,g=(c=p.filter(e=>!f.has(e.value)&&(f.add(e.value),!0)),b?r.has(b)?c.filter(e=>e.isPlaceholder||e.type===b):c:c.filter(e=>e.isPlaceholder||!e.type||"llm"===e.type));0===g.length&&b&&s.has(b)&&(n.serviceKinds||["llm"]).includes(b)&&(g=[{id:a,name:n.name,value:l}]),g.length>0&&(e[a]={name:n.name,alias:l,color:n.color,models:g})}}),Object.entries(e).forEach(([t,r])=>{let s=new Set([...I[(0,d.wG)(t)]||[],...I[t]||[]]);0!==s.size&&(r.models=r.models.filter(e=>!s.has(e.id)),0===r.models.length&&delete e[t])}),e},[j,h,L,S,A,I,b,x,y]),q=(0,a.useMemo)(()=>{if(b)return[];let e=[...new Set((v||[]).map(e=>String(e||"").trim()).filter(Boolean))];if(!N.trim())return e;let t=N.toLowerCase();return e.filter(e=>e.toLowerCase().includes(t))},[v,N,b]),U=(0,a.useMemo)(()=>{if(b)return[];if(!N.trim())return k;let e=N.toLowerCase();return k.filter(t=>[t.name,t.value,t.exposedModel,t.internalName,t.description,t.pickerType].map(e=>String(e||"").toLowerCase()).some(t=>t.includes(e)))},[k,N,b]),D=(0,a.useMemo)(()=>{let e=N.trim().toLowerCase(),t={};return Object.entries(z).forEach(([r,s])=>{var a;let l=s.models;if(e){let t=s.name.toLowerCase().includes(e);if(0===(l=l.filter(t=>t.name.toLowerCase().includes(e)||t.id.toLowerCase().includes(e))).length&&!t)return}t[r]={...s,models:[...(a=l).filter(e=>f.includes(e.value)).sort((e,t)=>e.name.localeCompare(t.name)),...a.filter(e=>!f.includes(e.value)).sort((e,t)=>e.name.localeCompare(t.name))]}}),t},[z,N,f]),F=e=>{let s=e?.value||e?.name||e;f.includes(s)&&l?l(e):r(e),g&&(t(),w(""))},W=()=>{t(),w("")};return e?(0,s.jsx)("div",{className:"fixed inset-0 z-[300] flex items-center justify-center bg-black/65 p-4 backdrop-blur-sm",onMouseDown:e=>{e.target===e.currentTarget&&W()},role:"dialog","aria-modal":"true","aria-label":p,children:(0,s.jsxs)("div",{className:"flex max-h-[88vh] w-full max-w-3xl flex-col overflow-hidden rounded-2xl border border-border bg-white shadow-2xl dark:bg-zinc-950",onMouseDown:e=>e.stopPropagation(),children:[(0,s.jsxs)("div",{className:"flex items-start justify-between gap-3 border-b border-border px-4 py-3",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("h2",{className:"truncate text-base font-semibold text-text-main",children:p}),(0,s.jsx)("p",{className:"mt-0.5 text-xs text-text-muted",children:"Click to add models to the combo. Click an added item again to remove it."})]}),(0,s.jsx)("button",{type:"button",onClick:W,className:"rounded-lg p-1.5 text-text-muted transition hover:bg-surface hover:text-text-main","aria-label":"Close",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"close"})})]}),(0,s.jsxs)("div",{className:"min-h-0 flex-1 overflow-hidden bg-white p-4 dark:bg-zinc-950",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 mb-3 px-2.5 py-2 bg-primary/8 border border-primary/20 rounded-lg text-xs text-text-muted",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-primary shrink-0",style:{fontSize:"14px"},children:"info"}),(0,s.jsx)("span",{children:"Click to add, click again to remove. Changes are saved automatically."})]}),(0,s.jsx)("div",{className:"mb-3",children:(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)("span",{className:"material-symbols-outlined absolute left-2.5 top-1/2 -translate-y-1/2 text-text-muted text-[16px]",children:"search"}),(0,s.jsx)("input",{type:"text",placeholder:"Search...",value:N,onChange:e=>w(e.target.value),className:"w-full rounded-xl border border-border bg-white py-2 pl-9 pr-3 text-sm text-text-main shadow-sm outline-none focus:border-primary focus:ring-2 focus:ring-primary/20 dark:bg-zinc-900"})]})}),(0,s.jsxs)("div",{className:"max-h-[58vh] overflow-y-auto space-y-3 pr-1",children:[q.length>0&&(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center gap-1.5 mb-1.5 sticky top-0 z-10 bg-white py-1 dark:bg-zinc-950",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-primary text-[14px]",children:"verified"}),(0,s.jsx)("span",{className:"text-xs font-medium text-primary",children:"Default models"}),(0,s.jsxs)("span",{className:"text-[10px] text-text-muted",children:["(",q.length,")"]})]}),(0,s.jsx)("div",{className:"flex flex-wrap gap-1.5",children:q.map(e=>{let t=f.includes(e),r=n===e;return(0,s.jsxs)("button",{onClick:()=>F({id:e,name:e,value:e}),className:`
2
2
  px-2 py-1 rounded-xl text-xs font-medium transition-all border hover:cursor-pointer flex items-center gap-1
3
3
  ${r?"bg-primary text-white border-primary":t?"bg-primary border-primary text-white hover:bg-primary-hover":"bg-surface border-border text-text-main hover:border-primary/50 hover:bg-primary/5"}
4
4
  `,title:e,children:[t&&(0,s.jsx)("span",{className:"material-symbols-outlined leading-none",style:{fontSize:"10px"},children:"check"}),(0,s.jsx)("span",{children:e})]},`extra-${e}`)})})]}),U.length>0&&(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center gap-1.5 mb-1.5 sticky top-0 z-10 bg-white py-1 dark:bg-zinc-950",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-primary text-[14px]",children:"layers"}),(0,s.jsx)("span",{className:"text-xs font-medium text-primary",children:"Combos"}),(0,s.jsxs)("span",{className:"text-[10px] text-text-muted",children:["(",U.length,")"]})]}),(0,s.jsx)("div",{className:"flex flex-wrap gap-1.5",children:U.map(e=>{let t=e.value||e.exposedModel||e.model||e.name||e.id,r=e.name||t,a=f.includes(t),l=n===t;return(0,s.jsxs)("button",{onClick:()=>F({id:t,name:r,value:t,combo:e}),className:`