9router-proxy 0.6.7 → 0.6.9

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 (544) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +9 -9
  3. package/app/.next-cli-build/build-manifest.json +4 -4
  4. package/app/.next-cli-build/prerender-manifest.json +3 -3
  5. package/app/.next-cli-build/react-loadable-manifest.json +1 -1
  6. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +1 -1
  7. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +1 -1
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +1 -1
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +1 -1
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +1 -1
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +1 -1
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +1 -1
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +1 -1
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +1 -1
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +1 -1
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +1 -1
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +1 -1
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +1 -1
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +1 -1
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +1 -1
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +1 -1
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js +1 -1
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +1 -1
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +1 -1
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +1 -1
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +1 -1
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  71. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  72. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +1 -1
  73. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  74. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  75. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  76. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  77. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  78. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  79. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  80. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  81. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  82. package/app/.next-cli-build/server/app/_not-found/page.js +1 -1
  83. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  84. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  85. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  86. package/app/.next-cli-build/server/app/_not-found.rsc +3 -3
  87. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +3 -3
  88. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +3 -3
  89. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  90. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  91. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  92. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  93. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  94. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  95. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
  96. package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js.nft.json +1 -1
  97. package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js.nft.json +1 -1
  98. package/app/.next-cli-build/server/app/api/auth/saml/start/route.js.nft.json +1 -1
  99. package/app/.next-cli-build/server/app/api/auth/saml/test/route.js.nft.json +1 -1
  100. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  101. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +5 -5
  102. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  103. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  104. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  105. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  106. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
  107. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  108. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +1 -1
  109. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  110. package/app/.next-cli-build/server/app/api/cli-tools/codewhale-settings/route.js +2 -2
  111. package/app/.next-cli-build/server/app/api/cli-tools/codewhale-settings/route.js.nft.json +1 -1
  112. package/app/.next-cli-build/server/app/api/cli-tools/codex-profiles/route.js.nft.json +1 -1
  113. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  114. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +2 -2
  115. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  116. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +1 -1
  117. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  118. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +1 -1
  119. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  120. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
  121. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  122. package/app/.next-cli-build/server/app/api/cli-tools/crush-settings/route.js +2 -2
  123. package/app/.next-cli-build/server/app/api/cli-tools/crush-settings/route.js.nft.json +1 -1
  124. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +2 -2
  125. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  126. package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js +1 -1
  127. package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js.nft.json +1 -1
  128. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +2 -2
  129. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  130. package/app/.next-cli-build/server/app/api/cli-tools/forge-settings/route.js +2 -2
  131. package/app/.next-cli-build/server/app/api/cli-tools/forge-settings/route.js.nft.json +1 -1
  132. package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js +1 -1
  133. package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js.nft.json +1 -1
  134. package/app/.next-cli-build/server/app/api/cli-tools/hermes-profiles/route.js.nft.json +1 -1
  135. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +1 -1
  136. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  137. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
  138. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  139. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
  140. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  141. package/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route.js +2 -2
  142. package/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route.js.nft.json +1 -1
  143. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
  144. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  145. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +1 -1
  146. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  147. package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js +2 -2
  148. package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js.nft.json +1 -1
  149. package/app/.next-cli-build/server/app/api/cli-tools/smelt-settings/route.js +2 -2
  150. package/app/.next-cli-build/server/app/api/cli-tools/smelt-settings/route.js.nft.json +1 -1
  151. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  152. package/app/.next-cli-build/server/app/api/combos/presets/route.js.nft.json +1 -1
  153. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  154. package/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
  155. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
  156. package/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
  157. package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  158. package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  159. package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  160. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  161. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  162. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  163. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  164. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  165. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  166. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  167. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  168. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  169. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  170. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  171. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  172. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  173. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  174. package/app/.next-cli-build/server/app/api/models/catalog-sync/route.js.nft.json +1 -1
  175. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  176. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  177. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  178. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  179. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  180. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  181. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  182. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  183. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  184. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  185. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  186. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  187. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  188. package/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js.nft.json +1 -1
  189. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  190. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  191. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  192. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  193. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  194. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  195. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  196. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js.nft.json +1 -1
  197. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js +1 -1
  198. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js.nft.json +1 -1
  199. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/start/route.js.nft.json +1 -1
  200. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/status/route.js.nft.json +1 -1
  201. package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js.nft.json +1 -1
  202. package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js +1 -1
  203. package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js.nft.json +1 -1
  204. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  205. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  206. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  207. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  208. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  209. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  210. package/app/.next-cli-build/server/app/api/providers/[id]/overrides/route.js.nft.json +1 -1
  211. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  212. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  213. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  214. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  215. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  216. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  217. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  218. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  219. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
  220. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  221. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  222. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  223. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  224. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  225. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  226. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  227. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  228. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  229. package/app/.next-cli-build/server/app/api/proxy-pools/netlify-deploy/route.js.nft.json +1 -1
  230. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  231. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  232. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
  233. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
  234. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js.nft.json +1 -1
  235. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
  236. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
  237. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
  238. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
  239. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
  240. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  241. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  242. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  243. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  244. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  245. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  246. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  247. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  248. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  249. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  250. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  251. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  252. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  253. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  254. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  255. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  256. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  257. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  258. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  259. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  260. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  261. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  262. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  263. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  264. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  265. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +2 -2
  266. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  267. package/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js +1 -1
  268. package/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js.nft.json +1 -1
  269. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  270. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  271. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  272. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  273. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  274. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  275. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  276. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  277. package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
  278. package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  279. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  280. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  281. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  282. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  283. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  284. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  285. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  286. package/app/.next-cli-build/server/app/api/usage/stream/route.js +1 -1
  287. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  288. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  289. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  290. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  291. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  292. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  293. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  294. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  295. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  296. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  297. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
  298. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  299. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  300. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  301. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  302. package/app/.next-cli-build/server/app/api/v1/models/[...model]/route.js +1 -1
  303. package/app/.next-cli-build/server/app/api/v1/models/[...model]/route.js.nft.json +1 -1
  304. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  305. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  306. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  307. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  308. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  309. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  310. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  311. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  312. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  313. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  314. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  315. package/app/.next-cli-build/server/app/api/v1/systemone/route.js +1 -1
  316. package/app/.next-cli-build/server/app/api/v1/systemone/route.js.nft.json +1 -1
  317. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js +1 -1
  318. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js.nft.json +1 -1
  319. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js +1 -1
  320. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -1
  321. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js +1 -1
  322. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -1
  323. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js +1 -1
  324. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js.nft.json +1 -1
  325. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  326. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  327. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  328. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  329. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  330. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  331. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  332. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  333. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  334. package/app/.next-cli-build/server/app/callback/page.js +1 -1
  335. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  336. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  337. package/app/.next-cli-build/server/app/callback.html +1 -1
  338. package/app/.next-cli-build/server/app/callback.rsc +3 -3
  339. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +3 -3
  340. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +1 -1
  341. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +3 -3
  342. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  343. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +3 -3
  344. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +3 -3
  345. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +3 -3
  346. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +1 -1
  347. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  348. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +4 -4
  349. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +4 -4
  350. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +4 -4
  351. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +1 -1
  352. package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  353. package/app/.next-cli-build/server/app/dashboard/combos.rsc +3 -3
  354. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +3 -3
  355. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +3 -3
  356. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +1 -1
  357. package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  358. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +4 -4
  359. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +4 -4
  360. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +4 -4
  361. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +1 -1
  362. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  363. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +3 -3
  364. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +3 -3
  365. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +3 -3
  366. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +1 -1
  367. package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  368. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +3 -3
  369. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +3 -3
  370. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +3 -3
  371. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +1 -1
  372. package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  373. package/app/.next-cli-build/server/app/dashboard/profile.rsc +3 -3
  374. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +3 -3
  375. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +3 -3
  376. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +1 -1
  377. package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  378. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +3 -3
  379. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +3 -3
  380. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +3 -3
  381. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +1 -1
  382. package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  383. package/app/.next-cli-build/server/app/dashboard/providers.rsc +3 -3
  384. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +3 -3
  385. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +3 -3
  386. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +1 -1
  387. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  388. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +3 -3
  389. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +3 -3
  390. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +3 -3
  391. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +1 -1
  392. package/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
  393. package/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +3 -3
  394. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +3 -3
  395. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +3 -3
  396. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +1 -1
  397. package/app/.next-cli-build/server/app/dashboard/quota.html +1 -1
  398. package/app/.next-cli-build/server/app/dashboard/quota.rsc +3 -3
  399. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
  400. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +3 -3
  401. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +1 -1
  402. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +1 -1
  403. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  404. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  405. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  406. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +3 -3
  407. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +3 -3
  408. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +1 -1
  409. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +3 -3
  410. package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  411. package/app/.next-cli-build/server/app/dashboard/skills.rsc +3 -3
  412. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +3 -3
  413. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +3 -3
  414. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +1 -1
  415. package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
  416. package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +3 -3
  417. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +3 -3
  418. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +3 -3
  419. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +1 -1
  420. package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  421. package/app/.next-cli-build/server/app/dashboard/translator.rsc +4 -4
  422. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +4 -4
  423. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +4 -4
  424. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +1 -1
  425. package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  426. package/app/.next-cli-build/server/app/dashboard/usage.rsc +4 -4
  427. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +4 -4
  428. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +4 -4
  429. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +1 -1
  430. package/app/.next-cli-build/server/app/dashboard.html +1 -1
  431. package/app/.next-cli-build/server/app/dashboard.rsc +4 -4
  432. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +4 -4
  433. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +4 -4
  434. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +1 -1
  435. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  436. package/app/.next-cli-build/server/app/index.html +1 -1
  437. package/app/.next-cli-build/server/app/index.rsc +3 -3
  438. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +3 -3
  439. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +3 -3
  440. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +1 -1
  441. package/app/.next-cli-build/server/app/landing/page.js +1 -1
  442. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  443. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  444. package/app/.next-cli-build/server/app/landing.html +1 -1
  445. package/app/.next-cli-build/server/app/landing.rsc +3 -3
  446. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +3 -3
  447. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +1 -1
  448. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +3 -3
  449. package/app/.next-cli-build/server/app/login/page.js +1 -1
  450. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  451. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  452. package/app/.next-cli-build/server/app/login.html +1 -1
  453. package/app/.next-cli-build/server/app/login.rsc +3 -3
  454. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +3 -3
  455. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +1 -1
  456. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +3 -3
  457. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  458. package/app/.next-cli-build/server/app/page.js +1 -1
  459. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  460. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  461. package/app/.next-cli-build/server/app-paths-manifest.json +9 -9
  462. package/app/.next-cli-build/server/chunks/1051.js +1 -1
  463. package/app/.next-cli-build/server/chunks/1350.js +1 -1
  464. package/app/.next-cli-build/server/chunks/1757.js +1 -1
  465. package/app/.next-cli-build/server/chunks/1836.js +17 -0
  466. package/app/.next-cli-build/server/chunks/2132.js +1 -1
  467. package/app/.next-cli-build/server/chunks/2375.js +1 -1
  468. package/app/.next-cli-build/server/chunks/2430.js +1 -1
  469. package/app/.next-cli-build/server/chunks/2970.js +2 -2
  470. package/app/.next-cli-build/server/chunks/3210.js +1 -1
  471. package/app/.next-cli-build/server/chunks/3711.js +1 -1
  472. package/app/.next-cli-build/server/chunks/{4957.js → 3811.js} +1 -1
  473. package/app/.next-cli-build/server/chunks/3943.js +1 -1
  474. package/app/.next-cli-build/server/chunks/412.js +2 -2
  475. package/app/.next-cli-build/server/chunks/4123.js +1 -1
  476. package/app/.next-cli-build/server/chunks/5026.js +1 -1
  477. package/app/.next-cli-build/server/chunks/5081.js +5 -5
  478. package/app/.next-cli-build/server/chunks/5330.js +2 -10
  479. package/app/.next-cli-build/server/chunks/5615.js +2 -2
  480. package/app/.next-cli-build/server/chunks/562.js +1 -1
  481. package/app/.next-cli-build/server/chunks/614.js +7 -7
  482. package/app/.next-cli-build/server/chunks/6171.js +7 -0
  483. package/app/.next-cli-build/server/chunks/7774.js +13 -13
  484. package/app/.next-cli-build/server/chunks/7995.js +13 -13
  485. package/app/.next-cli-build/server/chunks/8499.js +2 -2
  486. package/app/.next-cli-build/server/chunks/869.js +1 -1
  487. package/app/.next-cli-build/server/chunks/8895.js +8 -14
  488. package/app/.next-cli-build/server/chunks/9100.js +3 -3
  489. package/app/.next-cli-build/server/chunks/9604.js +1 -1
  490. package/app/.next-cli-build/server/chunks/9609.js +1 -1
  491. package/app/.next-cli-build/server/chunks/9696.js +1 -1
  492. package/app/.next-cli-build/server/instrumentation.js.nft.json +1 -1
  493. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  494. package/app/.next-cli-build/server/middleware-react-loadable-manifest.js +1 -1
  495. package/app/.next-cli-build/server/middleware.js +2 -2
  496. package/app/.next-cli-build/server/middleware.js.nft.json +1 -1
  497. package/app/.next-cli-build/server/pages/404.html +1 -1
  498. package/app/.next-cli-build/server/pages/500.html +1 -1
  499. package/app/.next-cli-build/server/preview-props.json +3 -3
  500. package/app/.next-cli-build/server/server-reference-manifest.js +1 -1
  501. package/app/.next-cli-build/server/server-reference-manifest.json +1 -1
  502. package/app/.next-cli-build/static/chunks/{1321-e1eb08dc90ca8225.js → 1321-b89cfee091cdd169.js} +1 -1
  503. package/app/.next-cli-build/static/chunks/{3794-ba54cbd6a46cf18d.js → 3794-04350b0fcecd82e5.js} +1 -1
  504. package/app/.next-cli-build/static/chunks/5497-76da5aae5c912ea5.js +7 -0
  505. package/app/.next-cli-build/static/chunks/{6808-9540d7ac65c3e6a0.js → 6808-89bf09eb1e95c74d.js} +1 -1
  506. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/{page-71e83cc4ee98552c.js → page-4e0bbe4dacaf47c0.js} +1 -1
  507. package/app/.next-cli-build/static/chunks/{main-39ed0ef7f2dd4724.js → main-ca004678a0b6b16d.js} +1 -1
  508. package/app/.next-cli-build/static/chunks/webpack-f32df626b66ad66c.js +1 -0
  509. package/app/node_modules/@aws-sdk/credential-providers/package.json +1 -1
  510. package/app/node_modules/@next/env/package.json +1 -1
  511. package/app/node_modules/baseline-browser-mapping/dist/index.cjs +1 -1
  512. package/app/node_modules/baseline-browser-mapping/package.json +3 -3
  513. package/app/node_modules/next/dist/build/swc/index.js +1 -1
  514. package/app/node_modules/next/dist/build/webpack-config.js +3 -3
  515. package/app/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js +2 -2
  516. package/app/node_modules/next/dist/compiled/next-server/app-page-turbo-experimental.runtime.prod.js +2 -2
  517. package/app/node_modules/next/dist/compiled/next-server/app-page-turbo.runtime.prod.js +2 -2
  518. package/app/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js +2 -2
  519. package/app/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js +1 -1
  520. package/app/node_modules/next/dist/lib/patch-incorrect-lockfile.js +3 -3
  521. package/app/node_modules/next/dist/server/app-render/async-local-storage.js +1 -1
  522. package/app/node_modules/next/dist/server/config.js +1 -1
  523. package/app/node_modules/next/dist/server/dev/hot-reloader-turbopack.js +2 -2
  524. package/app/node_modules/next/dist/server/dev/hot-reloader-webpack.js +1 -1
  525. package/app/node_modules/next/dist/server/lib/app-info-log.js +1 -1
  526. package/app/node_modules/next/dist/server/lib/generate-agent-files.js +3 -3
  527. package/app/node_modules/next/dist/server/lib/router-server.js +1 -1
  528. package/app/node_modules/next/dist/server/lib/start-server.js +1 -1
  529. package/app/node_modules/next/dist/server/lib/trace/tracer.js +1 -1
  530. package/app/node_modules/next/dist/server/typescript/rules/config.js +2 -2
  531. package/app/node_modules/next/dist/telemetry/anonymous-meta.js +1 -1
  532. package/app/node_modules/next/dist/telemetry/events/swc-load-failure.js +1 -1
  533. package/app/node_modules/next/dist/telemetry/events/version.js +2 -2
  534. package/app/node_modules/next/package.json +11 -11
  535. package/app/node_modules/sql.js/dist/sql-wasm.js +93 -93
  536. package/app/node_modules/sql.js/package.json +14 -14
  537. package/app/package.json +1 -1
  538. package/package.json +1 -1
  539. package/app/.next-cli-build/server/chunks/6249.js +0 -9
  540. package/app/.next-cli-build/server/chunks/7552.js +0 -1
  541. package/app/.next-cli-build/static/chunks/5497-b110055710e4cd3d.js +0 -7
  542. package/app/.next-cli-build/static/chunks/webpack-5f6ec7a371f60dd5.js +0 -1
  543. /package/app/.next-cli-build/static/{Sr_51TFvT48vlWKUwVulU → gP6myLWXiPD5PGe6Eqewr}/_buildManifest.js +0 -0
  544. /package/app/.next-cli-build/static/{Sr_51TFvT48vlWKUwVulU → gP6myLWXiPD5PGe6Eqewr}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6808],{5214:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"workAsyncStorage",{enumerable:!0,get:function(){return r.workAsyncStorageInstance}});let r=s(17828)},6808:(e,t,s)=>{s.r(t),s.d(t,{default:()=>D});var r=s(95155),l=s(12115),a=s(73321),n=s(88105),o=s(56061),i=s(84588),d=s(14051),c=s.n(d);let u=e=>new Intl.NumberFormat().format(e||0),m=e=>`$${(e||0).toFixed(2)}`;function x({stats:e}){return(0,r.jsxs)("div",{className:"grid min-w-0 grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-5 sm:gap-4",children:[(0,r.jsxs)(i.default,{className:"flex min-w-0 flex-col items-center text-center gap-1 px-3 py-3 sm:px-4",children:[(0,r.jsx)("span",{className:"text-text-muted text-xs uppercase font-semibold sm:text-sm",children:"Total Requests"}),(0,r.jsx)("span",{className:"w-full truncate text-lg font-bold xl:text-xl",title:u(e.totalRequests),children:u(e.totalRequests)})]}),(0,r.jsxs)(i.default,{className:"flex min-w-0 flex-col items-center text-center gap-1 px-3 py-3 sm:px-4",children:[(0,r.jsx)("span",{className:"text-text-muted text-xs uppercase font-semibold sm:text-sm",children:"Total Input Tokens"}),(0,r.jsx)("span",{className:"w-full truncate text-lg font-bold text-primary xl:text-xl",title:u(e.totalPromptTokens),children:u(e.totalPromptTokens)})]}),(0,r.jsxs)(i.default,{className:"flex min-w-0 flex-col items-center text-center gap-1 px-3 py-3 sm:px-4",children:[(0,r.jsx)("span",{className:"text-text-muted text-xs uppercase font-semibold sm:text-sm",children:"Cached Tokens"}),(0,r.jsx)("span",{className:"w-full truncate text-lg font-bold text-info xl:text-xl",title:u(e.totalCachedTokens),children:u(e.totalCachedTokens)})]}),(0,r.jsxs)(i.default,{className:"flex min-w-0 flex-col items-center text-center gap-1 px-3 py-3 sm:px-4",children:[(0,r.jsx)("span",{className:"text-text-muted text-xs uppercase font-semibold sm:text-sm",children:"Output Tokens"}),(0,r.jsx)("span",{className:"w-full truncate text-lg font-bold text-success xl:text-xl",title:u(e.totalCompletionTokens),children:u(e.totalCompletionTokens)})]}),(0,r.jsxs)(i.default,{className:"flex min-w-0 flex-col items-center text-center gap-1 px-3 py-3 sm:px-4",children:[(0,r.jsx)("span",{className:"text-text-muted text-xs uppercase font-semibold sm:text-sm",children:"Est. Cost"}),(0,r.jsxs)("span",{className:"w-full truncate text-lg font-bold text-warning xl:text-xl",title:`~${m(e.totalCost)}`,children:["~",m(e.totalCost)]}),(0,r.jsx)("span",{className:"text-[10px] text-text-muted",children:"Estimated, not actual billing"})]})]})}x.propTypes={stats:c().object.isRequired};let p=e=>new Intl.NumberFormat().format(e||0),h=e=>`$${(e||0).toFixed(2)}`;function g(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 f({field:e,currentSort:t,currentOrder:s}){return t!==e?(0,r.jsx)("span",{className:"ml-1 opacity-20",children:"↕"}):(0,r.jsx)("span",{className:"ml-1",children:"asc"===s?"↑":"↓"})}function y({item:e,viewMode:t,isSummary:s=!1}){return"tokens"===t?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:s&&void 0===e.promptTokens?"—":p(e.promptTokens)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:e.cachedTokens?p(e.cachedTokens):"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:s&&void 0===e.completionTokens?"—":p(e.completionTokens)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right font-medium",children:p(e.totalTokens)})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:s&&void 0===e.inputCost?"—":h(e.inputCost)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:e.cachedCost?h(e.cachedCost):"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:s&&void 0===e.outputCost?"—":h(e.outputCost)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right font-medium text-warning",children:h(e.totalCost||e.cost)})]})}function b({title:e,columns:t,groupedData:s,tableType:a,sortBy:n,sortOrder:o,onToggleSort:d,viewMode:c,storageKey:u,renderDetailCells:m,renderSummaryCells:x,emptyMessage:p}){let[h,g]=(0,l.useState)(new Set);(0,l.useEffect)(()=>{try{let e=localStorage.getItem(u);e&&g(new Set(JSON.parse(e)))}catch(e){console.error(`Failed to load ${u}:`,e)}},[u]),(0,l.useEffect)(()=>{try{localStorage.setItem(u,JSON.stringify([...h]))}catch(e){console.error(`Failed to save ${u}:`,e)}},[h,u]);let j=(0,l.useCallback)(e=>{g(t=>{let s=new Set(t);return s.has(e)?s.delete(e):s.add(e),s})},[]),N=(0,l.useMemo)(()=>"tokens"===c?[{field:"promptTokens",label:"Input Tokens"},{field:"cachedTokens",label:"Cached"},{field:"completionTokens",label:"Output Tokens"},{field:"totalTokens",label:"Total Tokens"}]:[{field:"promptTokens",label:"Input Cost"},{field:"cachedCost",label:"Cached Cost"},{field:"completionTokens",label:"Output Cost"},{field:"cost",label:"Total Cost"}],[c]),v=t.length+N.length;return(0,r.jsxs)(i.default,{className:"overflow-hidden",children:[(0,r.jsx)("div",{className:"p-4 border-b border-border bg-bg-subtle/50",children:(0,r.jsx)("h3",{className:"font-semibold",children:e})}),(0,r.jsx)("div",{className:"overflow-x-auto",children:(0,r.jsxs)("table",{className:"w-full text-sm text-left",children:[(0,r.jsx)("thead",{className:"bg-bg-subtle/30 text-text-muted uppercase text-xs",children:(0,r.jsxs)("tr",{children:[t.map(e=>(0,r.jsxs)("th",{className:`px-6 py-3 cursor-pointer hover:bg-bg-subtle/50 ${"right"===e.align?"text-right":""}`,onClick:()=>d(a,e.field),children:[e.label," ",(0,r.jsx)(f,{field:e.field,currentSort:n,currentOrder:o})]},e.field)),N.map(e=>(0,r.jsxs)("th",{className:"px-6 py-3 text-right cursor-pointer hover:bg-bg-subtle/50",onClick:()=>d(a,e.field),children:[e.label," ",(0,r.jsx)(f,{field:e.field,currentSort:n,currentOrder:o})]},e.field))]})}),(0,r.jsxs)("tbody",{className:"divide-y divide-border",children:[s.map(e=>(0,r.jsxs)(l.Fragment,{children:[(0,r.jsxs)("tr",{className:"group-summary cursor-pointer hover:bg-bg-subtle/50 transition-colors",onClick:()=>j(e.groupKey),children:[(0,r.jsx)("td",{className:"px-6 py-3",children:(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:`material-symbols-outlined text-[18px] text-text-muted transition-transform ${h.has(e.groupKey)?"rotate-90":""}`,children:"chevron_right"}),(0,r.jsx)("span",{className:`font-medium transition-colors ${e.summary.pending>0?"text-primary":""}`,children:e.groupKey})]})}),x(e),(0,r.jsx)(y,{item:e.summary,viewMode:c,isSummary:!0})]}),h.has(e.groupKey)&&e.items.map(e=>(0,r.jsxs)("tr",{className:"group-detail hover:bg-bg-subtle/20 transition-colors",children:[m(e),(0,r.jsx)(y,{item:e,viewMode:c})]},`detail-${e.key}`))]},e.groupKey)),0===s.length&&(0,r.jsx)("tr",{children:(0,r.jsx)("td",{colSpan:v,className:"px-6 py-8 text-center text-text-muted",children:p})})]})]})})]})}f.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},b.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=s(37206);function N(e){let t=n.Q2[e];return!t?.serviceKinds||t.serviceKinds.includes("llm")}let v=(0,j.default)(()=>Promise.all([s.e(2574),s.e(3862),s.e(3842),s.e(6357),s.e(3521)]).then(s.bind(s,63521)),{loadableGenerated:{webpack:()=>[63521]},ssr:!1}),w=(0,j.default)(()=>Promise.all([s.e(3842),s.e(5815),s.e(1649),s.e(124)]).then(s.bind(s,10124)),{loadableGenerated:{webpack:()=>[10124]},ssr:!1}),k=(0,j.default)(()=>Promise.all([s.e(3842),s.e(5815),s.e(8569),s.e(2435)]).then(s.bind(s,82435)),{loadableGenerated:{webpack:()=>[82435]},ssr:!1}),C=(0,j.default)(()=>Promise.all([s.e(3842),s.e(5815),s.e(8569),s.e(5462)]).then(s.bind(s,65462)),{loadableGenerated:{webpack:()=>[65462]},ssr:!1});function T({timestamp:e}){let t,[,s]=(0,l.useState)(0);return(0,l.useEffect)(()=>{let e=setInterval(()=>s(e=>e+1),1e3);return()=>clearInterval(e)},[]),(0,r.jsx)(r.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`})}function S({requests:e=[]}){return(0,r.jsxs)(i.default,{className:"flex min-w-0 flex-col overflow-hidden",padding:"sm",style:{height:480},children:[(0,r.jsx)("div",{className:"px-1 py-2 border-b border-border shrink-0",children:(0,r.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wide",children:"Recent Requests"})}),e.length?(0,r.jsx)("div",{className:"flex-1 overflow-y-auto",children:(0,r.jsxs)("table",{className:"w-full min-w-[300px] border-collapse text-xs",children:[(0,r.jsx)("thead",{className:"sticky top-0 bg-bg z-10",children:(0,r.jsxs)("tr",{className:"border-b border-border",children:[(0,r.jsx)("th",{className:"py-1.5 text-left font-semibold text-text-muted w-2"}),(0,r.jsx)("th",{className:"py-1.5 text-left font-semibold text-text-muted",children:"Model"}),(0,r.jsx)("th",{className:"py-1.5 text-right font-semibold text-text-muted whitespace-nowrap",children:"In / Out"}),(0,r.jsx)("th",{className:"py-1.5 text-right font-semibold text-text-muted",children:"When"})]})}),(0,r.jsx)("tbody",{className:"divide-y divide-border/50",children:e.map((e,t)=>{let s=!e.status||"ok"===e.status||"success"===e.status;return(0,r.jsxs)("tr",{className:"hover:bg-bg-subtle transition-colors",children:[(0,r.jsx)("td",{className:"py-1.5",children:(0,r.jsx)("span",{className:`block w-1.5 h-1.5 rounded-full ${s?"bg-success":"bg-error"}`})}),(0,r.jsx)("td",{className:"py-1.5 font-mono truncate max-w-[120px]",title:e.model,children:e.model}),(0,r.jsxs)("td",{className:"py-1.5 text-right whitespace-nowrap",children:[(0,r.jsxs)("span",{className:"text-primary",children:[p(e.promptTokens),"↑"]})," ",(0,r.jsxs)("span",{className:"text-success",children:[p(e.completionTokens),"↓"]})]}),(0,r.jsx)("td",{className:"py-1.5 text-right text-text-muted whitespace-nowrap",children:(0,r.jsx)(T,{timestamp:e.timestamp})})]},t)})})]})}):(0,r.jsx)("div",{className:"flex-1 flex items-center justify-center text-text-muted text-sm",children:"No requests yet."})]})}function M(e,t={},s,r){return Object.entries(e||{}).map(([e,s])=>{let r=(s.promptTokens||0)+(s.completionTokens||0),l=s.cost||0,a=s.cachedTokens||0,n=Math.max(0,(s.promptTokens||0)-a),o=r>0?(s.completionTokens||0)*(l/r):0;return{...s,key:e,totalTokens:r,totalCost:l,inputCost:r>0?l/r*n:0,cachedCost:r>0?l/r*a:0,outputCost:o,pending:t[e]||0}}).sort((e,t)=>{let l=e[s],a=t[s];return("string"==typeof l&&(l=l.toLowerCase()),"string"==typeof a&&(a=a.toLowerCase()),l<a)?"asc"===r?-1:1:l>a?"asc"===r?1:-1:0})}function q(e,t){if(!Array.isArray(e))return[];let s={};return e.forEach(e=>{let r=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);s[r]||(s[r]={groupKey:r,summary:{requests:0,promptTokens:0,completionTokens:0,cachedTokens:0,totalTokens:0,cost:0,inputCost:0,cachedCost:0,outputCost:0,lastUsed:null,pending:0},items:[]});let l=s[r].summary;l.requests+=e.requests||0,l.promptTokens+=e.promptTokens||0,l.completionTokens+=e.completionTokens||0,l.cachedTokens+=e.cachedTokens||0,l.totalTokens+=e.totalTokens||0,l.cost+=e.cost||0,l.inputCost+=e.inputCost||0,l.cachedCost+=e.cachedCost||0,l.outputCost+=e.outputCost||0,l.pending+=e.pending||0,e.lastUsed&&(!l.lastUsed||new Date(e.lastUsed)>new Date(l.lastUsed))&&(l.lastUsed=e.lastUsed),s[r].items.push(e)}),Object.values(s)}let R=[{field:"rawModel",label:"Model"},{field:"provider",label:"Provider"},{field:"requests",label:"Requests",align:"right"},{field:"lastUsed",label:"Last Used",align:"right"}],P=[{field:"rawModel",label:"Model"},{field:"provider",label:"Provider"},{field:"accountName",label:"Account"},{field:"requests",label:"Requests",align:"right"},{field:"lastUsed",label:"Last Used",align:"right"}],O=[{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"}],$=[{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"}],U=[{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"}],_=[{value:"today",label:"Today"},{value:"24h",label:"24h"},{value:"7d",label:"7D"},{value:"30d",label:"30D"},{value:"60d",label:"60D"},{value:"all",label:"All"}];function D({period:e,setPeriod:t,hidePeriodSelector:s=!1}={}){let i=(0,a.useRouter)(),d=(0,a.useSearchParams)(),c=d.get("sortBy")||"rawModel",u=d.get("sortOrder")||"asc",[m,h]=(0,l.useState)(null),[f,y]=(0,l.useState)(!0),[j,T]=(0,l.useState)(!1),[A,F]=(0,l.useState)("model"),[E,I]=(0,l.useState)("costs"),[K,L]=(0,l.useState)([]),[B,G]=(0,l.useState)("today"),z=(0,l.useRef)(!0),J=(0,l.useRef)(!1),Q=e??B,W=t??G;(0,l.useEffect)(()=>{Promise.all([fetch("/api/providers").then(e=>e.ok?e.json():null),fetch("/api/provider-nodes").then(e=>e.ok?e.json():null)]).then(([e,t])=>{let s={};for(let e of t?.nodes||[])s[e.id]=e.name;let r=new Set;L([...(e?.connections||[]).filter(e=>!(!1===e.isActive||!N(e.provider)||n.Q2[e.provider]?.hidden||r.has(e.provider))&&(r.add(e.provider),!0)).map(e=>({...e,nodeName:s[e.provider]||null})),...Object.values(n.IS).filter(e=>e.noAuth&&!e.hidden&&!r.has(e.id)&&N(e.id)).map(e=>({provider:e.id,name:e.name}))])}).catch(()=>{})},[]),(0,l.useEffect)(()=>{z.current?(z.current=!1,y(!0)):T(!0),fetch(`/api/usage/stats?period=${Q}`).then(e=>e.ok?e.json():null).then(e=>{e&&(J.current=!0,h(t=>({...t,...e})))}).catch(()=>{}).finally(()=>{y(!1),T(!1)})},[Q]),(0,l.useEffect)(()=>{let e=new EventSource("/api/usage/stream");return e.onmessage=e=>{try{let t=JSON.parse(e.data);h(e=>e?{...e,activeRequests:t.activeRequests,recentRequests:t.recentRequests,errorProvider:t.errorProvider,pending:t.pending}:e),J.current&&y(!1)}catch(e){console.error("[SSE CLIENT] parse error:",e)}},e.onerror=()=>y(!1),()=>e.close()},[]);let H=(0,l.useCallback)((e,t)=>{let s=new URLSearchParams(d.toString());s.get("sortBy")===t?s.set("sortOrder","asc"===s.get("sortOrder")?"desc":"asc"):(s.set("sortBy",t),s.set("sortOrder","asc")),i.replace(`?${s.toString()}`,{scroll:!1})},[d,i]),V=(0,l.useMemo)(()=>{if(!m)return null;switch(A){case"model":{let e=m.pending?.byModel||{};return{columns:R,groupedData:q(M(m.byModel,e,c,u),"rawModel"),storageKey:"usage-stats:expanded-models",emptyMessage:"No usage recorded yet.",renderSummaryCells:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:p(e.summary.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:g(e.summary.lastUsed)})]}),renderDetailCells:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:`px-6 py-3 font-medium transition-colors ${e.pending>0?"text-primary":""}`,children:e.rawModel}),(0,r.jsx)("td",{className:"px-6 py-3",children:(0,r.jsx)(o.default,{variant:e.pending>0?"primary":"neutral",size:"sm",children:e.provider})}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:p(e.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:g(e.lastUsed)})]})}}case"account":{let e={};return m?.pending?.byAccount&&Object.entries(m.byAccount||{}).forEach(([t,s])=>{let r=m.pending.byAccount[s.connectionId];if(r){let l=s.provider?`${s.rawModel} (${s.provider})`:s.rawModel;e[t]=r[l]||0}}),{columns:P,groupedData:q(M(m.byAccount,e,c,u),"accountName"),storageKey:"usage-stats:expanded-accounts",emptyMessage:"No account-specific usage recorded yet.",renderSummaryCells:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:p(e.summary.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:g(e.summary.lastUsed)})]}),renderDetailCells:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.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,r.jsx)("td",{className:`px-6 py-3 font-medium transition-colors ${e.pending>0?"text-primary":""}`,children:e.rawModel}),(0,r.jsx)("td",{className:"px-6 py-3",children:(0,r.jsx)(o.default,{variant:e.pending>0?"primary":"neutral",size:"sm",children:e.provider})}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:p(e.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:g(e.lastUsed)})]})}}case"apiKey":return{columns:O,groupedData:q(M(m.byApiKey,{},c,u),"keyName"),storageKey:"usage-stats:expanded-apikeys",emptyMessage:"No API key usage recorded yet.",renderSummaryCells:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:p(e.summary.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:g(e.summary.lastUsed)})]}),renderDetailCells:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 font-medium",children:e.keyName}),(0,r.jsx)("td",{className:"px-6 py-3",children:e.rawModel}),(0,r.jsx)("td",{className:"px-6 py-3",children:(0,r.jsx)(o.default,{variant:"neutral",size:"sm",children:e.provider})}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:p(e.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:g(e.lastUsed)})]})};default:return{columns:$,groupedData:q(M(m.byEndpoint,{},c,u),"endpoint"),storageKey:"usage-stats:expanded-endpoints",emptyMessage:"No endpoint usage recorded yet.",renderSummaryCells:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:p(e.summary.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:g(e.summary.lastUsed)})]}),renderDetailCells:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 font-medium font-mono text-sm",children:e.endpoint}),(0,r.jsx)("td",{className:"px-6 py-3",children:e.rawModel}),(0,r.jsx)("td",{className:"px-6 py-3",children:(0,r.jsx)(o.default,{variant:"neutral",size:"sm",children:e.provider})}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:p(e.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:g(e.lastUsed)})]})}}},[m,A,c,u]);if(!m&&!f)return(0,r.jsx)("div",{className:"text-text-muted",children:"Failed to load usage statistics."});let X=(0,r.jsx)("div",{className:"flex items-center justify-center py-12 text-text-muted",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[32px] animate-spin",children:"progress_activity"})});return(0,r.jsxs)("div",{className:"flex min-w-0 flex-col gap-6",children:[!s&&(0,r.jsxs)("div",{className:"flex w-full items-center gap-2 sm:w-auto sm:self-end",children:[(0,r.jsx)("div",{className:"grid flex-1 grid-cols-6 items-center gap-1 rounded-lg border border-border bg-bg-subtle p-1 sm:flex sm:flex-none",children:_.map(e=>(0,r.jsx)("button",{onClick:()=>W(e.value),disabled:j,className:`rounded-md px-3 py-1 text-sm font-medium transition-colors ${Q===e.value?"bg-primary text-white shadow-sm":"text-text-muted hover:bg-bg-hover hover:text-text"}`,children:e.label},e.value))}),j&&(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px] text-text-muted animate-spin",children:"progress_activity"})]}),f?X:(0,r.jsx)(x,{stats:m}),f?X:(0,r.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,r.jsx)(v,{providers:K,activeRequests:m.activeRequests||[],lastProvider:m.recentRequests?.[0]?.provider||"",errorProvider:m.errorProvider||""}),(0,r.jsx)(S,{requests:m.recentRequests||[]})]}),f?X:(0,r.jsx)(w,{period:Q}),!f&&(m.byProvider||m.byModel)&&(0,r.jsxs)("div",{className:"grid min-w-0 grid-cols-1 gap-2 lg:grid-cols-2",children:[(0,r.jsx)(k,{byProvider:m.byProvider}),(0,r.jsx)(C,{byModel:m.byModel})]}),(0,r.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,r.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,r.jsx)("select",{value:A,onChange:e=>F(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:U.map(e=>(0,r.jsx)("option",{value:e.value,children:e.label},e.value))}),(0,r.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,r.jsx)("button",{onClick:()=>I("costs"),className:`px-3 py-1 rounded-md text-sm font-medium transition-colors ${"costs"===E?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-bg-hover"}`,children:"Costs"}),(0,r.jsx)("button",{onClick:()=>I("tokens"),className:`px-3 py-1 rounded-md text-sm font-medium transition-colors ${"tokens"===E?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-bg-hover"}`,children:"Tokens"})]})]}),f?X:V&&(0,r.jsx)(b,{title:"",columns:V.columns,groupedData:V.groupedData,tableType:A,sortBy:c,sortOrder:u,onToggleSort:H,viewMode:E,storageKey:V.storageKey,renderSummaryCells:V.renderSummaryCells,renderDetailCells:V.renderDetailCells,emptyMessage:V.emptyMessage})]})]})}},17828:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"workAsyncStorageInstance",{enumerable:!0,get:function(){return r}});let r=(0,s(64054).getOrCreateGlobalAsyncLocalStorage)("work-async-storage")},21957:(e,t,s)=>{function r({moduleIds:e}){return null}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"PreloadChunks",{enumerable:!0,get:function(){return r}}),s(95155),s(47650),s(5214),s(2451),s(53887)},37206:(e,t,s)=>{s.d(t,{default:()=>l.a});var r=s(75707),l=s.n(r)},41112:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BailoutToCSRForNextDynamic",{enumerable:!0,get:function(){return n}});let r=s(12115),l=s(47650);s(1980);let a=s(60614).createReactBrowserBailoutReason.bind(null,"next/dynamic");function n({children:e}){return(0,r.use)((0,l.browser)(a)),e}},60614:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var s={createReactBrowserBailoutReason:function(){return a},getReactBrowserBailoutReason:function(){return n},isNextBrowserBailoutError:function(){return o}};for(var r in s)Object.defineProperty(t,r,{enumerable:!0,get:s[r]});let l=Symbol.for("next.browser-bailout-reason");function a(e){return{$$typeof:l,reason:e}}function n(e){let t=e?.cause;return t?.$$typeof===l?t.reason:void 0}function o(e){return void 0!==n(e)}},64054:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var s={bindSnapshot:function(){return d},createAsyncLocalStorage:function(){return o},createSnapshot:function(){return c},getOrCreateGlobalAsyncLocalStorage:function(){return i}};for(var r in s)Object.defineProperty(t,r,{enumerable:!0,get:s[r]});let l=Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available");class a{disable(){throw l}getStore(){}run(){throw l}exit(){throw l}enterWith(){throw l}static bind(e){return e}}let n="u">typeof globalThis&&globalThis.AsyncLocalStorage;function o(){return n?new n:new a}function i(e){let t=Symbol.for(`@next/${e}@16.4.0`),s=globalThis;return s[t]??=o()}function d(e){return n?n.bind(e):a.bind(e)}function c(){return n?n.snapshot():function(e,...t){return e(...t)}}},68635:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return i}});let r=s(95155),l=s(12115),a=s(41112);function n(e){return{default:e&&"default"in e?e.default:e}}s(21957);let o={loader:()=>Promise.resolve(n(()=>null)),loading:null,ssr:!0},i=function(e){let t={...o,...e},s=(0,l.lazy)(()=>t.loader().then(n)),i=t.loading;function d(e){let n=i?(0,r.jsx)(i,{isLoading:!0,pastDelay:!0,error:null}):null,o=!t.ssr||!!t.loading,d=o?l.Suspense:l.Fragment,c=t.ssr?(0,r.jsxs)(r.Fragment,{children:[null,(0,r.jsx)(s,{...e})]}):(0,r.jsx)(a.BailoutToCSRForNextDynamic,{children:(0,r.jsx)(s,{...e})});return(0,r.jsx)(d,{...o?{fallback:n}:{},children:c})}return d.displayName="LoadableComponent",d}},75707:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return l}});let r=s(73623)._(s(68635));function l(e,t){let s={};"function"==typeof e&&(s.loader=e);let l={...s,...t};return(0,r.default)({...l,modules:l.loadableGenerated?.modules})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}}]);
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6808],{5214:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"workAsyncStorage",{enumerable:!0,get:function(){return r.workAsyncStorageInstance}});let r=s(17828)},6808:(e,t,s)=>{s.r(t),s.d(t,{default:()=>D});var r=s(95155),l=s(12115),a=s(73321),n=s(88105),o=s(56061),i=s(84588),d=s(14051),c=s.n(d);let u=e=>new Intl.NumberFormat().format(e||0),m=e=>`$${(e||0).toFixed(2)}`;function x({stats:e}){return(0,r.jsxs)("div",{className:"grid min-w-0 grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-5 sm:gap-4",children:[(0,r.jsxs)(i.default,{className:"flex min-w-0 flex-col items-center text-center gap-1 px-3 py-3 sm:px-4",children:[(0,r.jsx)("span",{className:"text-text-muted text-xs uppercase font-semibold sm:text-sm",children:"Total Requests"}),(0,r.jsx)("span",{className:"w-full truncate text-lg font-bold xl:text-xl",title:u(e.totalRequests),children:u(e.totalRequests)})]}),(0,r.jsxs)(i.default,{className:"flex min-w-0 flex-col items-center text-center gap-1 px-3 py-3 sm:px-4",children:[(0,r.jsx)("span",{className:"text-text-muted text-xs uppercase font-semibold sm:text-sm",children:"Total Input Tokens"}),(0,r.jsx)("span",{className:"w-full truncate text-lg font-bold text-primary xl:text-xl",title:u(e.totalPromptTokens),children:u(e.totalPromptTokens)})]}),(0,r.jsxs)(i.default,{className:"flex min-w-0 flex-col items-center text-center gap-1 px-3 py-3 sm:px-4",children:[(0,r.jsx)("span",{className:"text-text-muted text-xs uppercase font-semibold sm:text-sm",children:"Cached Tokens"}),(0,r.jsx)("span",{className:"w-full truncate text-lg font-bold text-info xl:text-xl",title:u(e.totalCachedTokens),children:u(e.totalCachedTokens)})]}),(0,r.jsxs)(i.default,{className:"flex min-w-0 flex-col items-center text-center gap-1 px-3 py-3 sm:px-4",children:[(0,r.jsx)("span",{className:"text-text-muted text-xs uppercase font-semibold sm:text-sm",children:"Output Tokens"}),(0,r.jsx)("span",{className:"w-full truncate text-lg font-bold text-success xl:text-xl",title:u(e.totalCompletionTokens),children:u(e.totalCompletionTokens)})]}),(0,r.jsxs)(i.default,{className:"flex min-w-0 flex-col items-center text-center gap-1 px-3 py-3 sm:px-4",children:[(0,r.jsx)("span",{className:"text-text-muted text-xs uppercase font-semibold sm:text-sm",children:"Est. Cost"}),(0,r.jsxs)("span",{className:"w-full truncate text-lg font-bold text-warning xl:text-xl",title:`~${m(e.totalCost)}`,children:["~",m(e.totalCost)]}),(0,r.jsx)("span",{className:"text-[10px] text-text-muted",children:"Estimated, not actual billing"})]})]})}x.propTypes={stats:c().object.isRequired};let p=e=>new Intl.NumberFormat().format(e||0),h=e=>`$${(e||0).toFixed(2)}`;function g(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 f({field:e,currentSort:t,currentOrder:s}){return t!==e?(0,r.jsx)("span",{className:"ml-1 opacity-20",children:"↕"}):(0,r.jsx)("span",{className:"ml-1",children:"asc"===s?"↑":"↓"})}function y({item:e,viewMode:t,isSummary:s=!1}){return"tokens"===t?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:s&&void 0===e.promptTokens?"—":p(e.promptTokens)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:e.cachedTokens?p(e.cachedTokens):"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:s&&void 0===e.completionTokens?"—":p(e.completionTokens)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right font-medium",children:p(e.totalTokens)})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:s&&void 0===e.inputCost?"—":h(e.inputCost)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:e.cachedCost?h(e.cachedCost):"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:s&&void 0===e.outputCost?"—":h(e.outputCost)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right font-medium text-warning",children:h(e.totalCost||e.cost)})]})}function b({title:e,columns:t,groupedData:s,tableType:a,sortBy:n,sortOrder:o,onToggleSort:d,viewMode:c,storageKey:u,renderDetailCells:m,renderSummaryCells:x,emptyMessage:p}){let[h,g]=(0,l.useState)(new Set);(0,l.useEffect)(()=>{try{let e=localStorage.getItem(u);e&&g(new Set(JSON.parse(e)))}catch(e){console.error(`Failed to load ${u}:`,e)}},[u]),(0,l.useEffect)(()=>{try{localStorage.setItem(u,JSON.stringify([...h]))}catch(e){console.error(`Failed to save ${u}:`,e)}},[h,u]);let j=(0,l.useCallback)(e=>{g(t=>{let s=new Set(t);return s.has(e)?s.delete(e):s.add(e),s})},[]),N=(0,l.useMemo)(()=>"tokens"===c?[{field:"promptTokens",label:"Input Tokens"},{field:"cachedTokens",label:"Cached"},{field:"completionTokens",label:"Output Tokens"},{field:"totalTokens",label:"Total Tokens"}]:[{field:"promptTokens",label:"Input Cost"},{field:"cachedCost",label:"Cached Cost"},{field:"completionTokens",label:"Output Cost"},{field:"cost",label:"Total Cost"}],[c]),v=t.length+N.length;return(0,r.jsxs)(i.default,{className:"overflow-hidden",children:[(0,r.jsx)("div",{className:"p-4 border-b border-border bg-bg-subtle/50",children:(0,r.jsx)("h3",{className:"font-semibold",children:e})}),(0,r.jsx)("div",{className:"overflow-x-auto",children:(0,r.jsxs)("table",{className:"w-full text-sm text-left",children:[(0,r.jsx)("thead",{className:"bg-bg-subtle/30 text-text-muted uppercase text-xs",children:(0,r.jsxs)("tr",{children:[t.map(e=>(0,r.jsxs)("th",{className:`px-6 py-3 cursor-pointer hover:bg-bg-subtle/50 ${"right"===e.align?"text-right":""}`,onClick:()=>d(a,e.field),children:[e.label," ",(0,r.jsx)(f,{field:e.field,currentSort:n,currentOrder:o})]},e.field)),N.map(e=>(0,r.jsxs)("th",{className:"px-6 py-3 text-right cursor-pointer hover:bg-bg-subtle/50",onClick:()=>d(a,e.field),children:[e.label," ",(0,r.jsx)(f,{field:e.field,currentSort:n,currentOrder:o})]},e.field))]})}),(0,r.jsxs)("tbody",{className:"divide-y divide-border",children:[s.map(e=>(0,r.jsxs)(l.Fragment,{children:[(0,r.jsxs)("tr",{className:"group-summary cursor-pointer hover:bg-bg-subtle/50 transition-colors",onClick:()=>j(e.groupKey),children:[(0,r.jsx)("td",{className:"px-6 py-3",children:(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:`material-symbols-outlined text-[18px] text-text-muted transition-transform ${h.has(e.groupKey)?"rotate-90":""}`,children:"chevron_right"}),(0,r.jsx)("span",{className:`font-medium transition-colors ${e.summary.pending>0?"text-primary":""}`,children:e.groupKey})]})}),x(e),(0,r.jsx)(y,{item:e.summary,viewMode:c,isSummary:!0})]}),h.has(e.groupKey)&&e.items.map(e=>(0,r.jsxs)("tr",{className:"group-detail hover:bg-bg-subtle/20 transition-colors",children:[m(e),(0,r.jsx)(y,{item:e,viewMode:c})]},`detail-${e.key}`))]},e.groupKey)),0===s.length&&(0,r.jsx)("tr",{children:(0,r.jsx)("td",{colSpan:v,className:"px-6 py-8 text-center text-text-muted",children:p})})]})]})})]})}f.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},b.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=s(37206);function N(e){let t=n.Q2[e];return!t?.serviceKinds||t.serviceKinds.includes("llm")}let v=(0,j.default)(()=>Promise.all([s.e(2574),s.e(3862),s.e(3842),s.e(6357),s.e(3521)]).then(s.bind(s,63521)),{loadableGenerated:{webpack:()=>[63521]},ssr:!1}),w=(0,j.default)(()=>Promise.all([s.e(3842),s.e(5815),s.e(1649),s.e(124)]).then(s.bind(s,10124)),{loadableGenerated:{webpack:()=>[10124]},ssr:!1}),k=(0,j.default)(()=>Promise.all([s.e(3842),s.e(5815),s.e(8569),s.e(2435)]).then(s.bind(s,82435)),{loadableGenerated:{webpack:()=>[82435]},ssr:!1}),C=(0,j.default)(()=>Promise.all([s.e(3842),s.e(5815),s.e(8569),s.e(5462)]).then(s.bind(s,65462)),{loadableGenerated:{webpack:()=>[65462]},ssr:!1});function T({timestamp:e}){let t,[,s]=(0,l.useState)(0);return(0,l.useEffect)(()=>{let e=setInterval(()=>s(e=>e+1),1e3);return()=>clearInterval(e)},[]),(0,r.jsx)(r.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`})}function S({requests:e=[]}){return(0,r.jsxs)(i.default,{className:"flex min-w-0 flex-col overflow-hidden",padding:"sm",style:{height:480},children:[(0,r.jsx)("div",{className:"px-1 py-2 border-b border-border shrink-0",children:(0,r.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wide",children:"Recent Requests"})}),e.length?(0,r.jsx)("div",{className:"flex-1 overflow-y-auto",children:(0,r.jsxs)("table",{className:"w-full min-w-[300px] border-collapse text-xs",children:[(0,r.jsx)("thead",{className:"sticky top-0 bg-bg z-10",children:(0,r.jsxs)("tr",{className:"border-b border-border",children:[(0,r.jsx)("th",{className:"py-1.5 text-left font-semibold text-text-muted w-2"}),(0,r.jsx)("th",{className:"py-1.5 text-left font-semibold text-text-muted",children:"Model"}),(0,r.jsx)("th",{className:"py-1.5 text-right font-semibold text-text-muted whitespace-nowrap",children:"In / Out"}),(0,r.jsx)("th",{className:"py-1.5 text-right font-semibold text-text-muted",children:"When"})]})}),(0,r.jsx)("tbody",{className:"divide-y divide-border/50",children:e.map((e,t)=>{let s=!e.status||"ok"===e.status||"success"===e.status;return(0,r.jsxs)("tr",{className:"hover:bg-bg-subtle transition-colors",children:[(0,r.jsx)("td",{className:"py-1.5",children:(0,r.jsx)("span",{className:`block w-1.5 h-1.5 rounded-full ${s?"bg-success":"bg-error"}`})}),(0,r.jsx)("td",{className:"py-1.5 font-mono truncate max-w-[120px]",title:e.model,children:e.model}),(0,r.jsxs)("td",{className:"py-1.5 text-right whitespace-nowrap",children:[(0,r.jsxs)("span",{className:"text-primary",children:[p(e.promptTokens),"↑"]})," ",(0,r.jsxs)("span",{className:"text-success",children:[p(e.completionTokens),"↓"]})]}),(0,r.jsx)("td",{className:"py-1.5 text-right text-text-muted whitespace-nowrap",children:(0,r.jsx)(T,{timestamp:e.timestamp})})]},t)})})]})}):(0,r.jsx)("div",{className:"flex-1 flex items-center justify-center text-text-muted text-sm",children:"No requests yet."})]})}function M(e,t={},s,r){return Object.entries(e||{}).map(([e,s])=>{let r=(s.promptTokens||0)+(s.completionTokens||0),l=s.cost||0,a=s.cachedTokens||0,n=Math.max(0,(s.promptTokens||0)-a),o=r>0?(s.completionTokens||0)*(l/r):0;return{...s,key:e,totalTokens:r,totalCost:l,inputCost:r>0?l/r*n:0,cachedCost:r>0?l/r*a:0,outputCost:o,pending:t[e]||0}}).sort((e,t)=>{let l=e[s],a=t[s];return("string"==typeof l&&(l=l.toLowerCase()),"string"==typeof a&&(a=a.toLowerCase()),l<a)?"asc"===r?-1:1:l>a?"asc"===r?1:-1:0})}function q(e,t){if(!Array.isArray(e))return[];let s={};return e.forEach(e=>{let r=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);s[r]||(s[r]={groupKey:r,summary:{requests:0,promptTokens:0,completionTokens:0,cachedTokens:0,totalTokens:0,cost:0,inputCost:0,cachedCost:0,outputCost:0,lastUsed:null,pending:0},items:[]});let l=s[r].summary;l.requests+=e.requests||0,l.promptTokens+=e.promptTokens||0,l.completionTokens+=e.completionTokens||0,l.cachedTokens+=e.cachedTokens||0,l.totalTokens+=e.totalTokens||0,l.cost+=e.cost||0,l.inputCost+=e.inputCost||0,l.cachedCost+=e.cachedCost||0,l.outputCost+=e.outputCost||0,l.pending+=e.pending||0,e.lastUsed&&(!l.lastUsed||new Date(e.lastUsed)>new Date(l.lastUsed))&&(l.lastUsed=e.lastUsed),s[r].items.push(e)}),Object.values(s)}let R=[{field:"rawModel",label:"Model"},{field:"provider",label:"Provider"},{field:"requests",label:"Requests",align:"right"},{field:"lastUsed",label:"Last Used",align:"right"}],P=[{field:"rawModel",label:"Model"},{field:"provider",label:"Provider"},{field:"accountName",label:"Account"},{field:"requests",label:"Requests",align:"right"},{field:"lastUsed",label:"Last Used",align:"right"}],O=[{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"}],$=[{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"}],U=[{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"}],_=[{value:"today",label:"Today"},{value:"24h",label:"24h"},{value:"7d",label:"7D"},{value:"30d",label:"30D"},{value:"60d",label:"60D"},{value:"all",label:"All"}];function D({period:e,setPeriod:t,hidePeriodSelector:s=!1}={}){let i=(0,a.useRouter)(),d=(0,a.useSearchParams)(),c=d.get("sortBy")||"rawModel",u=d.get("sortOrder")||"asc",[m,h]=(0,l.useState)(null),[f,y]=(0,l.useState)(!0),[j,T]=(0,l.useState)(!1),[A,F]=(0,l.useState)("model"),[E,I]=(0,l.useState)("costs"),[K,L]=(0,l.useState)([]),[B,G]=(0,l.useState)("today"),z=(0,l.useRef)(!0),J=(0,l.useRef)(!1),Q=e??B,W=t??G;(0,l.useEffect)(()=>{Promise.all([fetch("/api/providers").then(e=>e.ok?e.json():null),fetch("/api/provider-nodes").then(e=>e.ok?e.json():null)]).then(([e,t])=>{let s={};for(let e of t?.nodes||[])s[e.id]=e.name;let r=new Set;L([...(e?.connections||[]).filter(e=>!(!1===e.isActive||!N(e.provider)||n.Q2[e.provider]?.hidden||r.has(e.provider))&&(r.add(e.provider),!0)).map(e=>({...e,nodeName:s[e.provider]||null})),...Object.values(n.IS).filter(e=>e.noAuth&&!e.hidden&&!r.has(e.id)&&N(e.id)).map(e=>({provider:e.id,name:e.name}))])}).catch(()=>{})},[]),(0,l.useEffect)(()=>{z.current?(z.current=!1,y(!0)):T(!0),fetch(`/api/usage/stats?period=${Q}`).then(e=>e.ok?e.json():null).then(e=>{e&&(J.current=!0,h(t=>({...t,...e})))}).catch(()=>{}).finally(()=>{y(!1),T(!1)})},[Q]),(0,l.useEffect)(()=>{let e=new EventSource("/api/usage/stream");return e.onmessage=e=>{try{let t=JSON.parse(e.data);h(e=>e?{...e,activeRequests:t.activeRequests,recentRequests:t.recentRequests,errorProvider:t.errorProvider,pending:t.pending}:e),J.current&&y(!1)}catch(e){console.error("[SSE CLIENT] parse error:",e)}},e.onerror=()=>y(!1),()=>e.close()},[]);let H=(0,l.useCallback)((e,t)=>{let s=new URLSearchParams(d.toString());s.get("sortBy")===t?s.set("sortOrder","asc"===s.get("sortOrder")?"desc":"asc"):(s.set("sortBy",t),s.set("sortOrder","asc")),i.replace(`?${s.toString()}`,{scroll:!1})},[d,i]),V=(0,l.useMemo)(()=>{if(!m)return null;switch(A){case"model":{let e=m.pending?.byModel||{};return{columns:R,groupedData:q(M(m.byModel,e,c,u),"rawModel"),storageKey:"usage-stats:expanded-models",emptyMessage:"No usage recorded yet.",renderSummaryCells:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:p(e.summary.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:g(e.summary.lastUsed)})]}),renderDetailCells:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:`px-6 py-3 font-medium transition-colors ${e.pending>0?"text-primary":""}`,children:e.rawModel}),(0,r.jsx)("td",{className:"px-6 py-3",children:(0,r.jsx)(o.default,{variant:e.pending>0?"primary":"neutral",size:"sm",children:e.provider})}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:p(e.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:g(e.lastUsed)})]})}}case"account":{let e={};return m?.pending?.byAccount&&Object.entries(m.byAccount||{}).forEach(([t,s])=>{let r=m.pending.byAccount[s.connectionId];if(r){let l=s.provider?`${s.rawModel} (${s.provider})`:s.rawModel;e[t]=r[l]||0}}),{columns:P,groupedData:q(M(m.byAccount,e,c,u),"accountName"),storageKey:"usage-stats:expanded-accounts",emptyMessage:"No account-specific usage recorded yet.",renderSummaryCells:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:p(e.summary.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:g(e.summary.lastUsed)})]}),renderDetailCells:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.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,r.jsx)("td",{className:`px-6 py-3 font-medium transition-colors ${e.pending>0?"text-primary":""}`,children:e.rawModel}),(0,r.jsx)("td",{className:"px-6 py-3",children:(0,r.jsx)(o.default,{variant:e.pending>0?"primary":"neutral",size:"sm",children:e.provider})}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:p(e.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:g(e.lastUsed)})]})}}case"apiKey":return{columns:O,groupedData:q(M(m.byApiKey,{},c,u),"keyName"),storageKey:"usage-stats:expanded-apikeys",emptyMessage:"No API key usage recorded yet.",renderSummaryCells:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:p(e.summary.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:g(e.summary.lastUsed)})]}),renderDetailCells:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 font-medium",children:e.keyName}),(0,r.jsx)("td",{className:"px-6 py-3",children:e.rawModel}),(0,r.jsx)("td",{className:"px-6 py-3",children:(0,r.jsx)(o.default,{variant:"neutral",size:"sm",children:e.provider})}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:p(e.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:g(e.lastUsed)})]})};default:return{columns:$,groupedData:q(M(m.byEndpoint,{},c,u),"endpoint"),storageKey:"usage-stats:expanded-endpoints",emptyMessage:"No endpoint usage recorded yet.",renderSummaryCells:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:p(e.summary.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:g(e.summary.lastUsed)})]}),renderDetailCells:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 font-medium font-mono text-sm",children:e.endpoint}),(0,r.jsx)("td",{className:"px-6 py-3",children:e.rawModel}),(0,r.jsx)("td",{className:"px-6 py-3",children:(0,r.jsx)(o.default,{variant:"neutral",size:"sm",children:e.provider})}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:p(e.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:g(e.lastUsed)})]})}}},[m,A,c,u]);if(!m&&!f)return(0,r.jsx)("div",{className:"text-text-muted",children:"Failed to load usage statistics."});let X=(0,r.jsx)("div",{className:"flex items-center justify-center py-12 text-text-muted",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[32px] animate-spin",children:"progress_activity"})});return(0,r.jsxs)("div",{className:"flex min-w-0 flex-col gap-6",children:[!s&&(0,r.jsxs)("div",{className:"flex w-full items-center gap-2 sm:w-auto sm:self-end",children:[(0,r.jsx)("div",{className:"grid flex-1 grid-cols-6 items-center gap-1 rounded-lg border border-border bg-bg-subtle p-1 sm:flex sm:flex-none",children:_.map(e=>(0,r.jsx)("button",{onClick:()=>W(e.value),disabled:j,className:`rounded-md px-3 py-1 text-sm font-medium transition-colors ${Q===e.value?"bg-primary text-white shadow-sm":"text-text-muted hover:bg-bg-hover hover:text-text"}`,children:e.label},e.value))}),j&&(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px] text-text-muted animate-spin",children:"progress_activity"})]}),f?X:(0,r.jsx)(x,{stats:m}),f?X:(0,r.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,r.jsx)(v,{providers:K,activeRequests:m.activeRequests||[],lastProvider:m.recentRequests?.[0]?.provider||"",errorProvider:m.errorProvider||""}),(0,r.jsx)(S,{requests:m.recentRequests||[]})]}),f?X:(0,r.jsx)(w,{period:Q}),!f&&(m.byProvider||m.byModel)&&(0,r.jsxs)("div",{className:"grid min-w-0 grid-cols-1 gap-2 lg:grid-cols-2",children:[(0,r.jsx)(k,{byProvider:m.byProvider}),(0,r.jsx)(C,{byModel:m.byModel})]}),(0,r.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,r.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,r.jsx)("select",{value:A,onChange:e=>F(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:U.map(e=>(0,r.jsx)("option",{value:e.value,children:e.label},e.value))}),(0,r.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,r.jsx)("button",{onClick:()=>I("costs"),className:`px-3 py-1 rounded-md text-sm font-medium transition-colors ${"costs"===E?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-bg-hover"}`,children:"Costs"}),(0,r.jsx)("button",{onClick:()=>I("tokens"),className:`px-3 py-1 rounded-md text-sm font-medium transition-colors ${"tokens"===E?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-bg-hover"}`,children:"Tokens"})]})]}),f?X:V&&(0,r.jsx)(b,{title:"",columns:V.columns,groupedData:V.groupedData,tableType:A,sortBy:c,sortOrder:u,onToggleSort:H,viewMode:E,storageKey:V.storageKey,renderSummaryCells:V.renderSummaryCells,renderDetailCells:V.renderDetailCells,emptyMessage:V.emptyMessage})]})]})}},17828:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"workAsyncStorageInstance",{enumerable:!0,get:function(){return r}});let r=(0,s(64054).getOrCreateGlobalAsyncLocalStorage)("work-async-storage")},21957:(e,t,s)=>{function r({moduleIds:e}){return null}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"PreloadChunks",{enumerable:!0,get:function(){return r}}),s(95155),s(47650),s(5214),s(2451),s(53887)},37206:(e,t,s)=>{s.d(t,{default:()=>l.a});var r=s(75707),l=s.n(r)},41112:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BailoutToCSRForNextDynamic",{enumerable:!0,get:function(){return n}});let r=s(12115),l=s(47650);s(1980);let a=s(60614).createReactBrowserBailoutReason.bind(null,"next/dynamic");function n({children:e}){return(0,r.use)((0,l.browser)(a)),e}},60614:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var s={createReactBrowserBailoutReason:function(){return a},getReactBrowserBailoutReason:function(){return n},isNextBrowserBailoutError:function(){return o}};for(var r in s)Object.defineProperty(t,r,{enumerable:!0,get:s[r]});let l=Symbol.for("next.browser-bailout-reason");function a(e){return{$$typeof:l,reason:e}}function n(e){let t=e?.cause;return t?.$$typeof===l?t.reason:void 0}function o(e){return void 0!==n(e)}},64054:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var s={bindSnapshot:function(){return d},createAsyncLocalStorage:function(){return o},createSnapshot:function(){return c},getOrCreateGlobalAsyncLocalStorage:function(){return i}};for(var r in s)Object.defineProperty(t,r,{enumerable:!0,get:s[r]});let l=Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available");class a{disable(){throw l}getStore(){}run(){throw l}exit(){throw l}enterWith(){throw l}static bind(e){return e}}let n="u">typeof globalThis&&globalThis.AsyncLocalStorage;function o(){return n?new n:new a}function i(e){let t=Symbol.for(`@next/${e}@16.4.2`),s=globalThis;return s[t]??=o()}function d(e){return n?n.bind(e):a.bind(e)}function c(){return n?n.snapshot():function(e,...t){return e(...t)}}},68635:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return i}});let r=s(95155),l=s(12115),a=s(41112);function n(e){return{default:e&&"default"in e?e.default:e}}s(21957);let o={loader:()=>Promise.resolve(n(()=>null)),loading:null,ssr:!0},i=function(e){let t={...o,...e},s=(0,l.lazy)(()=>t.loader().then(n)),i=t.loading;function d(e){let n=i?(0,r.jsx)(i,{isLoading:!0,pastDelay:!0,error:null}):null,o=!t.ssr||!!t.loading,d=o?l.Suspense:l.Fragment,c=t.ssr?(0,r.jsxs)(r.Fragment,{children:[null,(0,r.jsx)(s,{...e})]}):(0,r.jsx)(a.BailoutToCSRForNextDynamic,{children:(0,r.jsx)(s,{...e})});return(0,r.jsx)(d,{...o?{fallback:n}:{},children:c})}return d.displayName="LoadableComponent",d}},75707:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return l}});let r=s(73623)._(s(68635));function l(e,t){let s={};"function"==typeof e&&(s.loader=e);let l={...s,...t};return(0,r.default)({...l,modules:l.loadableGenerated?.modules})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3528],{5214:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"workAsyncStorage",{enumerable:!0,get:function(){return n.workAsyncStorageInstance}});let n=r(17828)},17828:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"workAsyncStorageInstance",{enumerable:!0,get:function(){return n}});let n=(0,r(64054).getOrCreateGlobalAsyncLocalStorage)("work-async-storage")},21957:(e,t,r)=>{"use strict";function n({moduleIds:e}){return null}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"PreloadChunks",{enumerable:!0,get:function(){return n}}),r(95155),r(47650),r(5214),r(2451),r(53887)},37206:(e,t,r)=>{"use strict";r.d(t,{default:()=>a.a});var n=r(75707),a=r.n(n)},41112:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BailoutToCSRForNextDynamic",{enumerable:!0,get:function(){return s}});let n=r(12115),a=r(47650);r(1980);let o=r(60614).createReactBrowserBailoutReason.bind(null,"next/dynamic");function s({children:e}){return(0,n.use)((0,a.browser)(o)),e}},49275:(e,t,r)=>{Promise.resolve().then(r.bind(r,76084))},60614:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={createReactBrowserBailoutReason:function(){return o},getReactBrowserBailoutReason:function(){return s},isNextBrowserBailoutError:function(){return l}};for(var n in r)Object.defineProperty(t,n,{enumerable:!0,get:r[n]});let a=Symbol.for("next.browser-bailout-reason");function o(e){return{$$typeof:a,reason:e}}function s(e){let t=e?.cause;return t?.$$typeof===a?t.reason:void 0}function l(e){return void 0!==s(e)}},64054:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={bindSnapshot:function(){return d},createAsyncLocalStorage:function(){return l},createSnapshot:function(){return c},getOrCreateGlobalAsyncLocalStorage:function(){return i}};for(var n in r)Object.defineProperty(t,n,{enumerable:!0,get:r[n]});let a=Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available");class o{disable(){throw a}getStore(){}run(){throw a}exit(){throw a}enterWith(){throw a}static bind(e){return e}}let s="u">typeof globalThis&&globalThis.AsyncLocalStorage;function l(){return s?new s:new o}function i(e){let t=Symbol.for(`@next/${e}@16.4.0`),r=globalThis;return r[t]??=l()}function d(e){return s?s.bind(e):o.bind(e)}function c(){return s?s.snapshot():function(e,...t){return e(...t)}}},68635:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return i}});let n=r(95155),a=r(12115),o=r(41112);function s(e){return{default:e&&"default"in e?e.default:e}}r(21957);let l={loader:()=>Promise.resolve(s(()=>null)),loading:null,ssr:!0},i=function(e){let t={...l,...e},r=(0,a.lazy)(()=>t.loader().then(s)),i=t.loading;function d(e){let s=i?(0,n.jsx)(i,{isLoading:!0,pastDelay:!0,error:null}):null,l=!t.ssr||!!t.loading,d=l?a.Suspense:a.Fragment,c=t.ssr?(0,n.jsxs)(n.Fragment,{children:[null,(0,n.jsx)(r,{...e})]}):(0,n.jsx)(o.BailoutToCSRForNextDynamic,{children:(0,n.jsx)(r,{...e})});return(0,n.jsx)(d,{...l?{fallback:s}:{},children:c})}return d.displayName="LoadableComponent",d}},75707:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return a}});let n=r(73623)._(r(68635));function a(e,t){let r={};"function"==typeof e&&(r.loader=e);let a={...r,...t};return(0,n.default)({...a,modules:a.loadableGenerated?.modules})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},76084:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>c});var n=r(95155),a=r(12115),o=r(35497),s=r(11059);let l=(0,r(37206).default)(()=>r.e(8202).then(r.bind(r,28202)),{loadableGenerated:{webpack:()=>[28202]},ssr:!1}),i=[{id:1,label:"Client Request",file:"1_req_client.json",lang:"json",desc:"Raw request from client"},{id:2,label:"Source Body",file:"2_req_source.json",lang:"json",desc:"After initial conversion"},{id:3,label:"OpenAI Intermediate",file:"3_req_openai.json",lang:"json",desc:"source → openai"},{id:4,label:"Target Request",file:"4_req_target.json",lang:"json",desc:"openai → target + URL + headers"},{id:5,label:"Provider Response",file:"5_res_provider.txt",lang:"text",desc:"Raw SSE from provider"},{id:6,label:"OpenAI Response",file:"6_res_openai.txt",lang:"text",desc:"target → openai (response)"},{id:7,label:"Client Response",file:"7_res_client.txt",lang:"text",desc:"Final response to client"}],d={minimap:{enabled:!1},fontSize:12,lineNumbers:"on",scrollBeyondLastLine:!1,wordWrap:"on",automaticLayout:!0};function c(){let[e,t]=(0,a.useState)({}),[r,c]=(0,a.useState)({1:!0}),[f,p]=(0,a.useState)({}),[x,m]=(0,a.useState)(null),g=(e,t)=>p(r=>({...r,[e]:t})),b=(e,r)=>t(t=>({...t,[e]:r})),y=e=>c(t=>{let r={};return i.forEach(e=>{r[e.id]=!1}),r[e]=!0,r}),h=async e=>{let t=i.find(t=>t.id===e);g(`load-${e}`,!0);try{let r=await fetch(`/api/translator/load?file=${t.file}`),n=await r.json();n.success?(b(e,n.content),1===e&&await j(n.content)):alert(n.error||"File not found")}catch(e){alert(e.message)}g(`load-${e}`,!1)},j=async e=>{try{let t="string"==typeof e?JSON.parse(e):e,r=await fetch("/api/translator/translate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({step:1,body:t})}),n=await r.json();n.success&&m(n.result)}catch{}},v=(e,t)=>fetch("/api/translator/save",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({file:e,content:t})}).catch(()=>{}),_=async()=>{g("toOpenAI",!0);try{let t=e[1],r=JSON.parse(t);v("1_req_client.json",t),v("2_req_source.json",JSON.stringify({timestamp:new Date().toISOString(),headers:{},body:r.body||r},null,2));let n=await fetch("/api/translator/translate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({step:2,body:r})}),a=await n.json();if(!a.success)return void alert(a.error);let o=JSON.stringify(a.result.body,null,2);b(3,o),y(3)}catch(e){alert(e.message)}g("toOpenAI",!1)},w=async()=>{g("toTarget",!0);try{let t=e[3],r=JSON.parse(t);v("3_req_openai.json",t);let n=await fetch("/api/translator/translate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({step:3,body:{...r,provider:x?.provider,model:x?.model}})}),a=await n.json();if(!a.success)return void alert(a.error);let o={...a.result,provider:x?.provider,model:x?.model};b(4,JSON.stringify(o,null,2)),y(4)}catch(e){alert(e.message)}g("toTarget",!1)},O=async()=>{g("send",!0);try{let t=e[4],r=JSON.parse(t);v("4_req_target.json",t);let n=r.provider||x?.provider,a=r.model||x?.model;if(!n||!a)return void alert("Missing provider or model. Please run step 1 first to detect them.");let o=await fetch("/api/translator/send",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:n,model:a,body:r.body||r})});if(!o.ok){let e=await o.json().catch(()=>({error:o.statusText}));alert(e.error||"Send failed");return}let s=o.body.getReader(),l=new TextDecoder,i="";for(;;){let{done:e,value:t}=await s.read();if(e)break;i+=l.decode(t,{stream:!0})}b(5,i),y(5),await fetch("/api/translator/save",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({file:"5_res_provider.txt",content:i})})}catch(e){alert(e.message)}finally{g("send",!1)}},{copy:S}=(0,s.C)(),N=async t=>{e[t]&&S(e[t],`translator-step-${t}`)};return(0,n.jsxs)("div",{className:"p-8 space-y-3",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("h1",{className:"text-2xl font-bold text-text-main",children:"Translator Debug"}),(0,n.jsx)("p",{className:"text-sm text-text-muted mt-1",children:"Replay request flow — matches log files"})]}),x&&(0,n.jsxs)("div",{className:"flex items-center gap-2 flex-wrap justify-end",children:[(0,n.jsx)(u,{label:"src",value:x.sourceFormat,color:"blue"}),(0,n.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,n.jsx)(u,{label:"dst",value:x.targetFormat,color:"orange"}),(0,n.jsx)(u,{label:"provider",value:x.provider,color:"green"}),(0,n.jsx)(u,{label:"model",value:x.model,color:"purple"})]})]}),i.map(t=>{var a;let s=1===(a=t.id)?(0,n.jsx)(o.$n,{size:"sm",icon:"arrow_forward",loading:f.toOpenAI,onClick:_,children:"→ OpenAI"}):3===a?(0,n.jsx)(o.$n,{size:"sm",icon:"arrow_forward",loading:f.toTarget,onClick:w,children:"→ Target"}):4===a?(0,n.jsx)(o.$n,{size:"sm",icon:"send",loading:f.send,onClick:O,children:"Send"}):null,i=!!r[t.id],u=e[t.id]||"";return(0,n.jsx)(o.Zp,{children:(0,n.jsxs)("div",{className:"p-4 space-y-3",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between",children:[(0,n.jsxs)("button",{onClick:()=>{let e;return e=t.id,c(t=>({...t,[e]:!t[e]}))},className:"flex items-center gap-2 flex-1 text-left group",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-[20px] text-text-muted group-hover:text-primary transition-colors",children:i?"expand_more":"chevron_right"}),(0,n.jsx)("span",{className:"text-xs font-mono text-text-muted/60 w-4",children:t.id}),(0,n.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:t.label}),(0,n.jsx)("span",{className:"text-xs text-text-muted/60 font-mono",children:t.file}),u&&(0,n.jsxs)("span",{className:"text-xs text-green-500",children:["(",u.length," chars)"]})]}),!i&&(0,n.jsxs)("div",{className:"flex gap-1 shrink-0",children:[(0,n.jsx)(o.$n,{size:"sm",variant:"ghost",icon:"folder_open",loading:f[`load-${t.id}`],onClick:()=>h(t.id)}),s]})]}),i&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"border border-border rounded-lg overflow-hidden",children:(0,n.jsx)(l,{height:"400px",defaultLanguage:"text"===t.lang?"plaintext":"json",value:u,onChange:e=>{b(t.id,e||""),1===t.id&&j(e||"")},theme:"vs-dark",options:d})}),(0,n.jsxs)("div",{className:"flex gap-2 flex-wrap",children:[(0,n.jsx)(o.$n,{size:"sm",variant:"outline",icon:"folder_open",loading:f[`load-${t.id}`],onClick:()=>h(t.id),children:"Load"}),(0,n.jsx)(o.$n,{size:"sm",variant:"outline",icon:"data_object",onClick:()=>(t=>{try{let r=JSON.parse(e[t]);b(t,JSON.stringify(r,null,2))}catch{}})(t.id),children:"Format"}),(0,n.jsx)(o.$n,{size:"sm",variant:"outline",icon:"content_copy",onClick:()=>N(t.id),children:"Copy"}),s]})]})]})},t.id)})]})}function u({label:e,value:t,color:r}){return(0,n.jsxs)("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs font-mono ${{blue:"bg-blue-500/10 text-blue-500",orange:"bg-orange-500/10 text-orange-500",green:"bg-green-500/10 text-green-500",purple:"bg-purple-500/10 text-purple-500"}[r]}`,children:[(0,n.jsxs)("span",{className:"text-text-muted/70 font-sans text-[10px]",children:[e,":"]}),t]})}}},e=>{e.O(0,[763,1321,705,5497,8441,3794,7358],()=>e(e.s=49275)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3528],{5214:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"workAsyncStorage",{enumerable:!0,get:function(){return n.workAsyncStorageInstance}});let n=r(17828)},17828:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"workAsyncStorageInstance",{enumerable:!0,get:function(){return n}});let n=(0,r(64054).getOrCreateGlobalAsyncLocalStorage)("work-async-storage")},21957:(e,t,r)=>{"use strict";function n({moduleIds:e}){return null}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"PreloadChunks",{enumerable:!0,get:function(){return n}}),r(95155),r(47650),r(5214),r(2451),r(53887)},37206:(e,t,r)=>{"use strict";r.d(t,{default:()=>a.a});var n=r(75707),a=r.n(n)},41112:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BailoutToCSRForNextDynamic",{enumerable:!0,get:function(){return s}});let n=r(12115),a=r(47650);r(1980);let o=r(60614).createReactBrowserBailoutReason.bind(null,"next/dynamic");function s({children:e}){return(0,n.use)((0,a.browser)(o)),e}},49275:(e,t,r)=>{Promise.resolve().then(r.bind(r,76084))},60614:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={createReactBrowserBailoutReason:function(){return o},getReactBrowserBailoutReason:function(){return s},isNextBrowserBailoutError:function(){return l}};for(var n in r)Object.defineProperty(t,n,{enumerable:!0,get:r[n]});let a=Symbol.for("next.browser-bailout-reason");function o(e){return{$$typeof:a,reason:e}}function s(e){let t=e?.cause;return t?.$$typeof===a?t.reason:void 0}function l(e){return void 0!==s(e)}},64054:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={bindSnapshot:function(){return d},createAsyncLocalStorage:function(){return l},createSnapshot:function(){return c},getOrCreateGlobalAsyncLocalStorage:function(){return i}};for(var n in r)Object.defineProperty(t,n,{enumerable:!0,get:r[n]});let a=Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available");class o{disable(){throw a}getStore(){}run(){throw a}exit(){throw a}enterWith(){throw a}static bind(e){return e}}let s="u">typeof globalThis&&globalThis.AsyncLocalStorage;function l(){return s?new s:new o}function i(e){let t=Symbol.for(`@next/${e}@16.4.2`),r=globalThis;return r[t]??=l()}function d(e){return s?s.bind(e):o.bind(e)}function c(){return s?s.snapshot():function(e,...t){return e(...t)}}},68635:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return i}});let n=r(95155),a=r(12115),o=r(41112);function s(e){return{default:e&&"default"in e?e.default:e}}r(21957);let l={loader:()=>Promise.resolve(s(()=>null)),loading:null,ssr:!0},i=function(e){let t={...l,...e},r=(0,a.lazy)(()=>t.loader().then(s)),i=t.loading;function d(e){let s=i?(0,n.jsx)(i,{isLoading:!0,pastDelay:!0,error:null}):null,l=!t.ssr||!!t.loading,d=l?a.Suspense:a.Fragment,c=t.ssr?(0,n.jsxs)(n.Fragment,{children:[null,(0,n.jsx)(r,{...e})]}):(0,n.jsx)(o.BailoutToCSRForNextDynamic,{children:(0,n.jsx)(r,{...e})});return(0,n.jsx)(d,{...l?{fallback:s}:{},children:c})}return d.displayName="LoadableComponent",d}},75707:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return a}});let n=r(73623)._(r(68635));function a(e,t){let r={};"function"==typeof e&&(r.loader=e);let a={...r,...t};return(0,n.default)({...a,modules:a.loadableGenerated?.modules})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},76084:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>c});var n=r(95155),a=r(12115),o=r(35497),s=r(11059);let l=(0,r(37206).default)(()=>r.e(8202).then(r.bind(r,28202)),{loadableGenerated:{webpack:()=>[28202]},ssr:!1}),i=[{id:1,label:"Client Request",file:"1_req_client.json",lang:"json",desc:"Raw request from client"},{id:2,label:"Source Body",file:"2_req_source.json",lang:"json",desc:"After initial conversion"},{id:3,label:"OpenAI Intermediate",file:"3_req_openai.json",lang:"json",desc:"source → openai"},{id:4,label:"Target Request",file:"4_req_target.json",lang:"json",desc:"openai → target + URL + headers"},{id:5,label:"Provider Response",file:"5_res_provider.txt",lang:"text",desc:"Raw SSE from provider"},{id:6,label:"OpenAI Response",file:"6_res_openai.txt",lang:"text",desc:"target → openai (response)"},{id:7,label:"Client Response",file:"7_res_client.txt",lang:"text",desc:"Final response to client"}],d={minimap:{enabled:!1},fontSize:12,lineNumbers:"on",scrollBeyondLastLine:!1,wordWrap:"on",automaticLayout:!0};function c(){let[e,t]=(0,a.useState)({}),[r,c]=(0,a.useState)({1:!0}),[f,p]=(0,a.useState)({}),[x,m]=(0,a.useState)(null),g=(e,t)=>p(r=>({...r,[e]:t})),b=(e,r)=>t(t=>({...t,[e]:r})),y=e=>c(t=>{let r={};return i.forEach(e=>{r[e.id]=!1}),r[e]=!0,r}),h=async e=>{let t=i.find(t=>t.id===e);g(`load-${e}`,!0);try{let r=await fetch(`/api/translator/load?file=${t.file}`),n=await r.json();n.success?(b(e,n.content),1===e&&await j(n.content)):alert(n.error||"File not found")}catch(e){alert(e.message)}g(`load-${e}`,!1)},j=async e=>{try{let t="string"==typeof e?JSON.parse(e):e,r=await fetch("/api/translator/translate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({step:1,body:t})}),n=await r.json();n.success&&m(n.result)}catch{}},v=(e,t)=>fetch("/api/translator/save",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({file:e,content:t})}).catch(()=>{}),_=async()=>{g("toOpenAI",!0);try{let t=e[1],r=JSON.parse(t);v("1_req_client.json",t),v("2_req_source.json",JSON.stringify({timestamp:new Date().toISOString(),headers:{},body:r.body||r},null,2));let n=await fetch("/api/translator/translate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({step:2,body:r})}),a=await n.json();if(!a.success)return void alert(a.error);let o=JSON.stringify(a.result.body,null,2);b(3,o),y(3)}catch(e){alert(e.message)}g("toOpenAI",!1)},w=async()=>{g("toTarget",!0);try{let t=e[3],r=JSON.parse(t);v("3_req_openai.json",t);let n=await fetch("/api/translator/translate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({step:3,body:{...r,provider:x?.provider,model:x?.model}})}),a=await n.json();if(!a.success)return void alert(a.error);let o={...a.result,provider:x?.provider,model:x?.model};b(4,JSON.stringify(o,null,2)),y(4)}catch(e){alert(e.message)}g("toTarget",!1)},O=async()=>{g("send",!0);try{let t=e[4],r=JSON.parse(t);v("4_req_target.json",t);let n=r.provider||x?.provider,a=r.model||x?.model;if(!n||!a)return void alert("Missing provider or model. Please run step 1 first to detect them.");let o=await fetch("/api/translator/send",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:n,model:a,body:r.body||r})});if(!o.ok){let e=await o.json().catch(()=>({error:o.statusText}));alert(e.error||"Send failed");return}let s=o.body.getReader(),l=new TextDecoder,i="";for(;;){let{done:e,value:t}=await s.read();if(e)break;i+=l.decode(t,{stream:!0})}b(5,i),y(5),await fetch("/api/translator/save",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({file:"5_res_provider.txt",content:i})})}catch(e){alert(e.message)}finally{g("send",!1)}},{copy:S}=(0,s.C)(),N=async t=>{e[t]&&S(e[t],`translator-step-${t}`)};return(0,n.jsxs)("div",{className:"p-8 space-y-3",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("h1",{className:"text-2xl font-bold text-text-main",children:"Translator Debug"}),(0,n.jsx)("p",{className:"text-sm text-text-muted mt-1",children:"Replay request flow — matches log files"})]}),x&&(0,n.jsxs)("div",{className:"flex items-center gap-2 flex-wrap justify-end",children:[(0,n.jsx)(u,{label:"src",value:x.sourceFormat,color:"blue"}),(0,n.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,n.jsx)(u,{label:"dst",value:x.targetFormat,color:"orange"}),(0,n.jsx)(u,{label:"provider",value:x.provider,color:"green"}),(0,n.jsx)(u,{label:"model",value:x.model,color:"purple"})]})]}),i.map(t=>{var a;let s=1===(a=t.id)?(0,n.jsx)(o.$n,{size:"sm",icon:"arrow_forward",loading:f.toOpenAI,onClick:_,children:"→ OpenAI"}):3===a?(0,n.jsx)(o.$n,{size:"sm",icon:"arrow_forward",loading:f.toTarget,onClick:w,children:"→ Target"}):4===a?(0,n.jsx)(o.$n,{size:"sm",icon:"send",loading:f.send,onClick:O,children:"Send"}):null,i=!!r[t.id],u=e[t.id]||"";return(0,n.jsx)(o.Zp,{children:(0,n.jsxs)("div",{className:"p-4 space-y-3",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between",children:[(0,n.jsxs)("button",{onClick:()=>{let e;return e=t.id,c(t=>({...t,[e]:!t[e]}))},className:"flex items-center gap-2 flex-1 text-left group",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-[20px] text-text-muted group-hover:text-primary transition-colors",children:i?"expand_more":"chevron_right"}),(0,n.jsx)("span",{className:"text-xs font-mono text-text-muted/60 w-4",children:t.id}),(0,n.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:t.label}),(0,n.jsx)("span",{className:"text-xs text-text-muted/60 font-mono",children:t.file}),u&&(0,n.jsxs)("span",{className:"text-xs text-green-500",children:["(",u.length," chars)"]})]}),!i&&(0,n.jsxs)("div",{className:"flex gap-1 shrink-0",children:[(0,n.jsx)(o.$n,{size:"sm",variant:"ghost",icon:"folder_open",loading:f[`load-${t.id}`],onClick:()=>h(t.id)}),s]})]}),i&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"border border-border rounded-lg overflow-hidden",children:(0,n.jsx)(l,{height:"400px",defaultLanguage:"text"===t.lang?"plaintext":"json",value:u,onChange:e=>{b(t.id,e||""),1===t.id&&j(e||"")},theme:"vs-dark",options:d})}),(0,n.jsxs)("div",{className:"flex gap-2 flex-wrap",children:[(0,n.jsx)(o.$n,{size:"sm",variant:"outline",icon:"folder_open",loading:f[`load-${t.id}`],onClick:()=>h(t.id),children:"Load"}),(0,n.jsx)(o.$n,{size:"sm",variant:"outline",icon:"data_object",onClick:()=>(t=>{try{let r=JSON.parse(e[t]);b(t,JSON.stringify(r,null,2))}catch{}})(t.id),children:"Format"}),(0,n.jsx)(o.$n,{size:"sm",variant:"outline",icon:"content_copy",onClick:()=>N(t.id),children:"Copy"}),s]})]})]})},t.id)})]})}function u({label:e,value:t,color:r}){return(0,n.jsxs)("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs font-mono ${{blue:"bg-blue-500/10 text-blue-500",orange:"bg-orange-500/10 text-orange-500",green:"bg-green-500/10 text-green-500",purple:"bg-purple-500/10 text-purple-500"}[r]}`,children:[(0,n.jsxs)("span",{className:"text-text-muted/70 font-sans text-[10px]",children:[e,":"]}),t]})}}},e=>{e.O(0,[763,1321,705,5497,8441,3794,7358],()=>e(e.s=49275)),_N_E=e.O()}]);