@jheavenknows/bluerouter 4.0.25 → 4.0.28

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 (1254) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +3 -3
  3. package/app/.next-cli-build/build-manifest.json +2 -2
  4. package/app/.next-cli-build/prerender-manifest.json +3 -3
  5. package/app/.next-cli-build/required-server-files.json +1 -1
  6. package/app/.next-cli-build/server/app/(dashboard)/dashboard/analytics/page.js +2 -2
  7. package/app/.next-cli-build/server/app/(dashboard)/dashboard/analytics/page.js.nft.json +1 -1
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/analytics/page_client-reference-manifest.js +1 -1
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/api-keys/page.js +2 -2
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/api-keys/page.js.nft.json +1 -1
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/api-keys/page_client-reference-manifest.js +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +1 -1
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +1 -1
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +1 -1
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +1 -1
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +2 -2
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +2 -2
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +1 -1
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +1 -1
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +1 -1
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +2 -2
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +1 -1
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +1 -1
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +1 -1
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/prompt-logs/page.js +1 -1
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/prompt-logs/page.js.nft.json +1 -1
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/prompt-logs/page_client-reference-manifest.js +1 -1
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/provider-health/page.js +1 -1
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/provider-health/page.js.nft.json +1 -1
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/provider-health/page_client-reference-manifest.js +1 -1
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +1 -1
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +1 -1
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +1 -1
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +1 -1
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  71. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  72. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +1 -1
  73. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  74. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  75. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +2 -2
  76. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  77. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  78. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +2 -2
  79. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  80. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  81. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  82. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  83. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  84. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  85. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  86. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  87. package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  88. package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  89. package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  90. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  91. package/app/.next-cli-build/server/app/_not-found/page.js +1 -1
  92. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  93. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  94. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  95. package/app/.next-cli-build/server/app/_not-found.rsc +4 -4
  96. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +4 -4
  97. package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  98. package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +4 -4
  99. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  100. package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  101. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  102. package/app/.next-cli-build/server/app/api/auth/ldap/test/route.js +1 -1
  103. package/app/.next-cli-build/server/app/api/auth/ldap/test/route.js.nft.json +1 -1
  104. package/app/.next-cli-build/server/app/api/auth/ldap/users/route.js +1 -1
  105. package/app/.next-cli-build/server/app/api/auth/ldap/users/route.js.nft.json +1 -1
  106. package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
  107. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  108. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  109. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  110. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  111. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  112. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  113. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  114. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  115. package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  116. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  117. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +4 -4
  118. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  119. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  120. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  121. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/autostart/route.js +1 -1
  122. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/autostart/route.js.nft.json +1 -1
  123. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/prompt-log-db/route.js +1 -1
  124. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/prompt-log-db/route.js.nft.json +1 -1
  125. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/root-ca/route.js.nft.json +1 -1
  126. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  127. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  128. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
  129. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  130. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +2 -2
  131. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  132. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
  133. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  134. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +2 -2
  135. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  136. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
  137. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  138. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
  139. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  140. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
  141. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  142. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +2 -2
  143. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  144. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +1 -1
  145. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  146. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +2 -2
  147. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  148. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
  149. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  150. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
  151. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  152. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
  153. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  154. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +2 -2
  155. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  156. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  157. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  158. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  159. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  160. package/app/.next-cli-build/server/app/api/dashboard/analytics/route.js +54 -95
  161. package/app/.next-cli-build/server/app/api/dashboard/analytics/route.js.nft.json +1 -1
  162. package/app/.next-cli-build/server/app/api/dashboard/combos/route.js +1 -1
  163. package/app/.next-cli-build/server/app/api/dashboard/combos/route.js.nft.json +1 -1
  164. package/app/.next-cli-build/server/app/api/dashboard/endpoint/route.js +1 -1
  165. package/app/.next-cli-build/server/app/api/dashboard/endpoint/route.js.nft.json +1 -1
  166. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/[id]/route.js +1 -1
  167. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/[id]/route.js.nft.json +1 -1
  168. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/options/route.js +1 -1
  169. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/options/route.js.nft.json +1 -1
  170. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/route.js +1 -1
  171. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/route.js.nft.json +1 -1
  172. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  173. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  174. package/app/.next-cli-build/server/app/api/keys/[id]/rotate/route.js +1 -1
  175. package/app/.next-cli-build/server/app/api/keys/[id]/rotate/route.js.nft.json +1 -1
  176. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  177. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  178. package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  179. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  180. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  181. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  182. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  183. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  184. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  185. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  186. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  187. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  188. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  189. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  190. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  191. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  192. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  193. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  194. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  195. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  196. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  197. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  198. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  199. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  200. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  201. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  202. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  203. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  204. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  205. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  206. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  207. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  208. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  209. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  210. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  211. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  212. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  213. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  214. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  215. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  216. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  217. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  218. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  219. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  220. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  221. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  222. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  223. package/app/.next-cli-build/server/app/api/provider-health/route.js +1 -1
  224. package/app/.next-cli-build/server/app/api/provider-health/route.js.nft.json +1 -1
  225. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  226. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  227. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  228. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  229. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  230. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  231. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  232. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  233. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  234. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  235. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  236. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  237. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  238. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  239. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  240. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  241. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  242. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  243. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  244. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  245. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  246. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  247. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  248. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  249. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  250. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  251. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  252. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +1 -1
  253. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  254. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +1 -1
  255. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  256. package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  257. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  258. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +1 -1
  259. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  260. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  261. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  262. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
  263. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  264. package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  265. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  266. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  267. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  268. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  269. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  270. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  271. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  272. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +1 -1
  273. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  274. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  275. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  276. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  277. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  278. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  279. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  280. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  281. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  282. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  283. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  284. package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
  285. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  286. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  287. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  288. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  289. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  290. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  291. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +2 -2
  292. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  293. package/app/.next-cli-build/server/app/api/tunnel/tailscale-login/route.js.nft.json +1 -1
  294. package/app/.next-cli-build/server/app/api/tunnel/tailscale-start-daemon/route.js +1 -1
  295. package/app/.next-cli-build/server/app/api/tunnel/tailscale-start-daemon/route.js.nft.json +1 -1
  296. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  297. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  298. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  299. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  300. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  301. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  302. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  303. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  304. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  305. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  306. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  307. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  308. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  309. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  310. package/app/.next-cli-build/server/app/api/usage/stream/route.js +1 -1
  311. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  312. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  313. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  314. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  315. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  316. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  317. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  318. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  319. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  320. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  321. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  322. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  323. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
  324. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  325. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  326. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  327. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  328. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  329. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  330. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  331. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  332. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  333. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  334. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  335. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  336. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  337. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  338. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  339. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  340. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  341. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  342. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  343. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  344. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  345. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  346. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  347. package/app/.next-cli-build/server/app/api/version/restart/route.js.nft.json +1 -1
  348. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  349. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  350. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  351. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  352. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  353. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  354. package/app/.next-cli-build/server/app/callback/page.js +1 -1
  355. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  356. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  357. package/app/.next-cli-build/server/app/callback.html +1 -1
  358. package/app/.next-cli-build/server/app/callback.rsc +4 -4
  359. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +4 -4
  360. package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
  361. package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +4 -4
  362. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
  363. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  364. package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
  365. package/app/.next-cli-build/server/app/dashboard/analytics.html +1 -1
  366. package/app/.next-cli-build/server/app/dashboard/analytics.rsc +5 -5
  367. package/app/.next-cli-build/server/app/dashboard/analytics.segments/!KGRhc2hib2FyZCk/dashboard/analytics/__PAGE__.segment.rsc +1 -1
  368. package/app/.next-cli-build/server/app/dashboard/analytics.segments/!KGRhc2hib2FyZCk/dashboard/analytics.segment.rsc +1 -1
  369. package/app/.next-cli-build/server/app/dashboard/analytics.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  370. package/app/.next-cli-build/server/app/dashboard/analytics.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  371. package/app/.next-cli-build/server/app/dashboard/analytics.segments/_full.segment.rsc +5 -5
  372. package/app/.next-cli-build/server/app/dashboard/analytics.segments/_head.segment.rsc +1 -1
  373. package/app/.next-cli-build/server/app/dashboard/analytics.segments/_index.segment.rsc +4 -4
  374. package/app/.next-cli-build/server/app/dashboard/analytics.segments/_tree.segment.rsc +2 -2
  375. package/app/.next-cli-build/server/app/dashboard/api-keys.html +1 -1
  376. package/app/.next-cli-build/server/app/dashboard/api-keys.rsc +6 -6
  377. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/!KGRhc2hib2FyZCk/dashboard/api-keys/__PAGE__.segment.rsc +2 -2
  378. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/!KGRhc2hib2FyZCk/dashboard/api-keys.segment.rsc +1 -1
  379. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  380. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  381. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/_full.segment.rsc +6 -6
  382. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/_head.segment.rsc +1 -1
  383. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/_index.segment.rsc +4 -4
  384. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/_tree.segment.rsc +2 -2
  385. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  386. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +6 -6
  387. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
  388. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
  389. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  390. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  391. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +6 -6
  392. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
  393. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +4 -4
  394. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
  395. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  396. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +7 -7
  397. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
  398. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
  399. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  400. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  401. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +7 -7
  402. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
  403. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +4 -4
  404. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
  405. package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  406. package/app/.next-cli-build/server/app/dashboard/combos.rsc +6 -6
  407. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  408. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
  409. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  410. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  411. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +6 -6
  412. package/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
  413. package/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +4 -4
  414. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
  415. package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  416. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +7 -7
  417. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
  418. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
  419. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  420. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  421. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +7 -7
  422. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
  423. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +4 -4
  424. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
  425. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  426. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +6 -6
  427. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
  428. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
  429. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
  430. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  431. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  432. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +6 -6
  433. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
  434. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +4 -4
  435. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +2 -2
  436. package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  437. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +6 -6
  438. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
  439. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
  440. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  441. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  442. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +6 -6
  443. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
  444. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +4 -4
  445. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
  446. package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  447. package/app/.next-cli-build/server/app/dashboard/profile.rsc +5 -5
  448. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +1 -1
  449. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
  450. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  451. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  452. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +5 -5
  453. package/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
  454. package/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +4 -4
  455. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
  456. package/app/.next-cli-build/server/app/dashboard/prompt-logs.html +1 -1
  457. package/app/.next-cli-build/server/app/dashboard/prompt-logs.rsc +5 -5
  458. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/!KGRhc2hib2FyZCk/dashboard/prompt-logs/__PAGE__.segment.rsc +1 -1
  459. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/!KGRhc2hib2FyZCk/dashboard/prompt-logs.segment.rsc +1 -1
  460. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  461. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  462. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/_full.segment.rsc +5 -5
  463. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/_head.segment.rsc +1 -1
  464. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/_index.segment.rsc +4 -4
  465. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/_tree.segment.rsc +2 -2
  466. package/app/.next-cli-build/server/app/dashboard/provider-health.html +1 -1
  467. package/app/.next-cli-build/server/app/dashboard/provider-health.rsc +5 -5
  468. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/!KGRhc2hib2FyZCk/dashboard/provider-health/__PAGE__.segment.rsc +1 -1
  469. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/!KGRhc2hib2FyZCk/dashboard/provider-health.segment.rsc +1 -1
  470. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  471. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  472. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/_full.segment.rsc +5 -5
  473. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/_head.segment.rsc +1 -1
  474. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/_index.segment.rsc +4 -4
  475. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/_tree.segment.rsc +2 -2
  476. package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  477. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +6 -6
  478. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  479. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
  480. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  481. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  482. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  483. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +6 -6
  484. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
  485. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +4 -4
  486. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
  487. package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  488. package/app/.next-cli-build/server/app/dashboard/providers.rsc +6 -6
  489. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  490. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  491. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  492. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  493. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +6 -6
  494. package/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
  495. package/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +4 -4
  496. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
  497. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  498. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +6 -6
  499. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
  500. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
  501. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  502. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  503. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +6 -6
  504. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
  505. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +4 -4
  506. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
  507. package/app/.next-cli-build/server/app/dashboard/quota.html +1 -1
  508. package/app/.next-cli-build/server/app/dashboard/quota.rsc +7 -7
  509. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
  510. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
  511. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  512. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  513. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +7 -7
  514. package/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
  515. package/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +4 -4
  516. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
  517. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +1 -1
  518. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  519. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  520. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  521. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +4 -4
  522. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +4 -4
  523. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  524. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +4 -4
  525. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  526. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
  527. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  528. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  529. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  530. package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  531. package/app/.next-cli-build/server/app/dashboard/skills.rsc +6 -6
  532. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +2 -2
  533. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills.segment.rsc +1 -1
  534. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  535. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  536. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +6 -6
  537. package/app/.next-cli-build/server/app/dashboard/skills.segments/_head.segment.rsc +1 -1
  538. package/app/.next-cli-build/server/app/dashboard/skills.segments/_index.segment.rsc +4 -4
  539. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +2 -2
  540. package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  541. package/app/.next-cli-build/server/app/dashboard/translator.rsc +6 -6
  542. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  543. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
  544. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  545. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  546. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +6 -6
  547. package/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
  548. package/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +4 -4
  549. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
  550. package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  551. package/app/.next-cli-build/server/app/dashboard/usage.rsc +6 -6
  552. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
  553. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
  554. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  555. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  556. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +6 -6
  557. package/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
  558. package/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +4 -4
  559. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
  560. package/app/.next-cli-build/server/app/dashboard.html +1 -1
  561. package/app/.next-cli-build/server/app/dashboard.rsc +7 -7
  562. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
  563. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  564. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  565. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +7 -7
  566. package/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
  567. package/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +4 -4
  568. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +2 -2
  569. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  570. package/app/.next-cli-build/server/app/index.html +1 -1
  571. package/app/.next-cli-build/server/app/index.rsc +4 -4
  572. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  573. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +4 -4
  574. package/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
  575. package/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +4 -4
  576. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
  577. package/app/.next-cli-build/server/app/landing/page.js +1 -1
  578. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  579. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  580. package/app/.next-cli-build/server/app/landing.html +1 -1
  581. package/app/.next-cli-build/server/app/landing.rsc +4 -4
  582. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +4 -4
  583. package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
  584. package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +4 -4
  585. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
  586. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
  587. package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
  588. package/app/.next-cli-build/server/app/login/page.js +1 -1
  589. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  590. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  591. package/app/.next-cli-build/server/app/login.html +1 -1
  592. package/app/.next-cli-build/server/app/login.rsc +5 -5
  593. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +5 -5
  594. package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
  595. package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +4 -4
  596. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
  597. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  598. package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
  599. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  600. package/app/.next-cli-build/server/app/page.js +1 -1
  601. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  602. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  603. package/app/.next-cli-build/server/app-paths-manifest.json +3 -3
  604. package/app/.next-cli-build/server/chunks/2338.js +3 -3
  605. package/app/.next-cli-build/server/chunks/3110.js +1 -1
  606. package/app/.next-cli-build/server/chunks/4746.js +1 -1
  607. package/app/.next-cli-build/server/chunks/4803.js +1 -1
  608. package/app/.next-cli-build/server/chunks/5199.js +1 -1
  609. package/app/.next-cli-build/server/chunks/6604.js +1 -1
  610. package/app/.next-cli-build/server/chunks/7013.js +64 -0
  611. package/app/.next-cli-build/server/chunks/7130.js +1 -1
  612. package/app/.next-cli-build/server/chunks/7153.js +1 -1
  613. package/app/.next-cli-build/server/chunks/7774.js +2 -2
  614. package/app/.next-cli-build/server/chunks/7965.js +1 -1
  615. package/app/.next-cli-build/server/chunks/8520.js +1 -1
  616. package/app/.next-cli-build/server/instrumentation.js +1 -1
  617. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  618. package/app/.next-cli-build/server/middleware.js +1 -1
  619. package/app/.next-cli-build/server/pages/404.html +1 -1
  620. package/app/.next-cli-build/server/pages/500.html +1 -1
  621. package/app/.next-cli-build/server/server-reference-manifest.js +1 -1
  622. package/app/.next-cli-build/server/server-reference-manifest.json +1 -1
  623. package/app/.next-cli-build/static/chunks/2649-64ab34e3d24f7ee7.js +64 -0
  624. package/app/.next-cli-build/static/chunks/{5497-870b5871cedc0773.js → 5497-ce954c5879356437.js} +1 -1
  625. package/app/.next-cli-build/static/chunks/{620-3fad809f8e73a159.js → 620-eec0042b66ea4100.js} +1 -1
  626. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/api-keys/{page-14652e1e3f23d4e2.js → page-72e184938f05df76.js} +1 -1
  627. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/{page-b695d2f55cd6af03.js → page-4308e0b6f3d8403d.js} +1 -1
  628. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/{page-01933493e3363a09.js → page-9034072dfa0105a7.js} +1 -1
  629. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/{page-38ed8bfcbff79895.js → page-f995a0c42926bd26.js} +1 -1
  630. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/{page-de1de12f69a56655.js → page-3b2b7d730578e68c.js} +1 -1
  631. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/{page-f896fc077aa42dd3.js → page-542bcb64915fdf7a.js} +1 -1
  632. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/{page-caccf16e222355f2.js → page-7c0aa594e13a03e4.js} +1 -1
  633. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-1708f027fd5082f7.js → page-d54c6fd49daa5492.js} +1 -1
  634. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/{page-4196202cf3f283b2.js → page-c333349ef4f702ea.js} +1 -1
  635. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/{page-b89c7420bae22256.js → page-3eb3aa8fce4e9fca.js} +1 -1
  636. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/{page-1270ed400b7de918.js → page-bd9b7161f474edd2.js} +1 -1
  637. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/{page-546f317cda8ecaa3.js → page-54d1a2f86248c78f.js} +1 -1
  638. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/{page-caccf16e222355f2.js → page-7c0aa594e13a03e4.js} +1 -1
  639. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/{page-3c2cc260fa5c3c0c.js → page-26cc3553a595d900.js} +1 -1
  640. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/new/{page-62f9b3e0a1cde612.js → page-6fca0372fe983e90.js} +1 -1
  641. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/{page-a4e48c6734079591.js → page-2acb54313cbe19b9.js} +1 -1
  642. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/{page-92f63ce188ab0114.js → page-4269c3e96ee1766d.js} +1 -1
  643. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/{page-a411567133fd5c37.js → page-b73c6d5dd2a69b38.js} +1 -1
  644. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/{page-9fc6922c510f9354.js → page-d62fea52c76a298a.js} +1 -1
  645. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/{page-897405b2761abb0b.js → page-605f635e10f7c8ce.js} +1 -1
  646. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/{page-12b90445ca91aa88.js → page-17fbcb9cd6d99545.js} +1 -1
  647. package/app/.next-cli-build/static/chunks/app/(dashboard)/{layout-872e9f4deabd99c8.js → layout-4b6fb89cc79d45dc.js} +1 -1
  648. package/app/.next-cli-build/static/css/1dccf115a553d145.css +1 -0
  649. package/app/cli/.build-home/AppData/Roaming/bluerouter/db/backups/{upgrade-4.0.20-to-4.0.21-4.0.21-20260619-162133 → upgrade-4.0.10-to-4.0.11-4.0.11-20260618-193244}/data.sqlite +0 -0
  650. package/app/cli/.build-home/AppData/Roaming/bluerouter/db/backups/{upgrade-4.0.21-to-4.0.22-4.0.22-20260619-165137 → upgrade-4.0.11-to-4.0.12-4.0.12-20260618-194553}/data.sqlite +0 -0
  651. package/app/cli/.build-home/AppData/Roaming/bluerouter/db/backups/{upgrade-4.0.22-to-4.0.23-4.0.23-20260619-165849 → upgrade-4.0.12-to-4.0.14-4.0.14-20260619-220611}/data.sqlite +0 -0
  652. package/app/cli/.build-home/AppData/Roaming/bluerouter/db/backups/{upgrade-4.0.23-to-4.0.24-4.0.24-20260619-172749 → upgrade-4.0.14-to-4.0.27-4.0.27-20260619-221058}/data.sqlite +0 -0
  653. package/app/cli/.build-home/AppData/Roaming/bluerouter/db/data.sqlite +0 -0
  654. package/app/cli/.build-home/AppData/Roaming/bluerouter/db/data.sqlite-shm +0 -0
  655. package/app/cli/.build-home/AppData/Roaming/bluerouter/db/data.sqlite-wal +0 -0
  656. package/app/cli/.build-home/AppData/Roaming/bluerouter/jwt-secret +1 -1
  657. package/app/cli/.build-home/AppData/Roaming/bluerouter/machine-id +1 -1
  658. package/app/cli/.build-home/AppData/Roaming/nextjs-nodejs/Config/config.json +3 -3
  659. package/app/node_modules/baseline-browser-mapping/dist/index.cjs +1 -1
  660. package/app/node_modules/baseline-browser-mapping/package.json +2 -2
  661. package/app/node_modules/caniuse-lite/data/agents.js +1 -1
  662. package/app/node_modules/caniuse-lite/data/browserVersions.js +1 -1
  663. package/app/node_modules/caniuse-lite/data/features/aac.js +1 -1
  664. package/app/node_modules/caniuse-lite/data/features/abortcontroller.js +1 -1
  665. package/app/node_modules/caniuse-lite/data/features/ac3-ec3.js +1 -1
  666. package/app/node_modules/caniuse-lite/data/features/accelerometer.js +1 -1
  667. package/app/node_modules/caniuse-lite/data/features/addeventlistener.js +1 -1
  668. package/app/node_modules/caniuse-lite/data/features/alternate-stylesheet.js +1 -1
  669. package/app/node_modules/caniuse-lite/data/features/ambient-light.js +1 -1
  670. package/app/node_modules/caniuse-lite/data/features/apng.js +1 -1
  671. package/app/node_modules/caniuse-lite/data/features/array-find-index.js +1 -1
  672. package/app/node_modules/caniuse-lite/data/features/array-find.js +1 -1
  673. package/app/node_modules/caniuse-lite/data/features/array-flat.js +1 -1
  674. package/app/node_modules/caniuse-lite/data/features/array-includes.js +1 -1
  675. package/app/node_modules/caniuse-lite/data/features/arrow-functions.js +1 -1
  676. package/app/node_modules/caniuse-lite/data/features/asmjs.js +1 -1
  677. package/app/node_modules/caniuse-lite/data/features/async-clipboard.js +1 -1
  678. package/app/node_modules/caniuse-lite/data/features/async-functions.js +1 -1
  679. package/app/node_modules/caniuse-lite/data/features/atob-btoa.js +1 -1
  680. package/app/node_modules/caniuse-lite/data/features/audio-api.js +1 -1
  681. package/app/node_modules/caniuse-lite/data/features/audio.js +1 -1
  682. package/app/node_modules/caniuse-lite/data/features/audiotracks.js +1 -1
  683. package/app/node_modules/caniuse-lite/data/features/autofocus.js +1 -1
  684. package/app/node_modules/caniuse-lite/data/features/auxclick.js +1 -1
  685. package/app/node_modules/caniuse-lite/data/features/av1.js +1 -1
  686. package/app/node_modules/caniuse-lite/data/features/avif.js +1 -1
  687. package/app/node_modules/caniuse-lite/data/features/background-attachment.js +1 -1
  688. package/app/node_modules/caniuse-lite/data/features/background-clip-text.js +1 -1
  689. package/app/node_modules/caniuse-lite/data/features/background-img-opts.js +1 -1
  690. package/app/node_modules/caniuse-lite/data/features/background-position-x-y.js +1 -1
  691. package/app/node_modules/caniuse-lite/data/features/background-repeat-round-space.js +1 -1
  692. package/app/node_modules/caniuse-lite/data/features/background-sync.js +1 -1
  693. package/app/node_modules/caniuse-lite/data/features/battery-status.js +1 -1
  694. package/app/node_modules/caniuse-lite/data/features/beacon.js +1 -1
  695. package/app/node_modules/caniuse-lite/data/features/beforeafterprint.js +1 -1
  696. package/app/node_modules/caniuse-lite/data/features/bigint.js +1 -1
  697. package/app/node_modules/caniuse-lite/data/features/blobbuilder.js +1 -1
  698. package/app/node_modules/caniuse-lite/data/features/bloburls.js +1 -1
  699. package/app/node_modules/caniuse-lite/data/features/border-image.js +1 -1
  700. package/app/node_modules/caniuse-lite/data/features/border-radius.js +1 -1
  701. package/app/node_modules/caniuse-lite/data/features/broadcastchannel.js +1 -1
  702. package/app/node_modules/caniuse-lite/data/features/brotli.js +1 -1
  703. package/app/node_modules/caniuse-lite/data/features/calc.js +1 -1
  704. package/app/node_modules/caniuse-lite/data/features/canvas-blending.js +1 -1
  705. package/app/node_modules/caniuse-lite/data/features/canvas-text.js +1 -1
  706. package/app/node_modules/caniuse-lite/data/features/canvas.js +1 -1
  707. package/app/node_modules/caniuse-lite/data/features/ch-unit.js +1 -1
  708. package/app/node_modules/caniuse-lite/data/features/chacha20-poly1305.js +1 -1
  709. package/app/node_modules/caniuse-lite/data/features/channel-messaging.js +1 -1
  710. package/app/node_modules/caniuse-lite/data/features/childnode-remove.js +1 -1
  711. package/app/node_modules/caniuse-lite/data/features/classlist.js +1 -1
  712. package/app/node_modules/caniuse-lite/data/features/client-hints-dpr-width-viewport.js +1 -1
  713. package/app/node_modules/caniuse-lite/data/features/clipboard.js +1 -1
  714. package/app/node_modules/caniuse-lite/data/features/colr-v1.js +1 -1
  715. package/app/node_modules/caniuse-lite/data/features/colr.js +1 -1
  716. package/app/node_modules/caniuse-lite/data/features/comparedocumentposition.js +1 -1
  717. package/app/node_modules/caniuse-lite/data/features/console-basic.js +1 -1
  718. package/app/node_modules/caniuse-lite/data/features/console-time.js +1 -1
  719. package/app/node_modules/caniuse-lite/data/features/const.js +1 -1
  720. package/app/node_modules/caniuse-lite/data/features/constraint-validation.js +1 -1
  721. package/app/node_modules/caniuse-lite/data/features/contenteditable.js +1 -1
  722. package/app/node_modules/caniuse-lite/data/features/contentsecuritypolicy.js +1 -1
  723. package/app/node_modules/caniuse-lite/data/features/contentsecuritypolicy2.js +1 -1
  724. package/app/node_modules/caniuse-lite/data/features/cookie-store-api.js +1 -1
  725. package/app/node_modules/caniuse-lite/data/features/cors.js +1 -1
  726. package/app/node_modules/caniuse-lite/data/features/createimagebitmap.js +1 -1
  727. package/app/node_modules/caniuse-lite/data/features/credential-management.js +1 -1
  728. package/app/node_modules/caniuse-lite/data/features/cross-document-view-transitions.js +1 -1
  729. package/app/node_modules/caniuse-lite/data/features/cryptography.js +1 -1
  730. package/app/node_modules/caniuse-lite/data/features/css-all.js +1 -1
  731. package/app/node_modules/caniuse-lite/data/features/css-anchor-positioning.js +1 -1
  732. package/app/node_modules/caniuse-lite/data/features/css-animation.js +1 -1
  733. package/app/node_modules/caniuse-lite/data/features/css-any-link.js +1 -1
  734. package/app/node_modules/caniuse-lite/data/features/css-appearance.js +1 -1
  735. package/app/node_modules/caniuse-lite/data/features/css-at-counter-style.js +1 -1
  736. package/app/node_modules/caniuse-lite/data/features/css-autofill.js +1 -1
  737. package/app/node_modules/caniuse-lite/data/features/css-backdrop-filter.js +1 -1
  738. package/app/node_modules/caniuse-lite/data/features/css-background-offsets.js +1 -1
  739. package/app/node_modules/caniuse-lite/data/features/css-backgroundblendmode.js +1 -1
  740. package/app/node_modules/caniuse-lite/data/features/css-boxdecorationbreak.js +1 -1
  741. package/app/node_modules/caniuse-lite/data/features/css-boxshadow.js +1 -1
  742. package/app/node_modules/caniuse-lite/data/features/css-canvas.js +1 -1
  743. package/app/node_modules/caniuse-lite/data/features/css-caret-color.js +1 -1
  744. package/app/node_modules/caniuse-lite/data/features/css-cascade-layers.js +1 -1
  745. package/app/node_modules/caniuse-lite/data/features/css-cascade-scope.js +1 -1
  746. package/app/node_modules/caniuse-lite/data/features/css-case-insensitive.js +1 -1
  747. package/app/node_modules/caniuse-lite/data/features/css-clip-path.js +1 -1
  748. package/app/node_modules/caniuse-lite/data/features/css-color-adjust.js +1 -1
  749. package/app/node_modules/caniuse-lite/data/features/css-color-function.js +1 -1
  750. package/app/node_modules/caniuse-lite/data/features/css-conic-gradients.js +1 -1
  751. package/app/node_modules/caniuse-lite/data/features/css-container-queries-style.js +1 -1
  752. package/app/node_modules/caniuse-lite/data/features/css-container-queries.js +1 -1
  753. package/app/node_modules/caniuse-lite/data/features/css-container-query-units.js +1 -1
  754. package/app/node_modules/caniuse-lite/data/features/css-containment.js +1 -1
  755. package/app/node_modules/caniuse-lite/data/features/css-content-visibility.js +1 -1
  756. package/app/node_modules/caniuse-lite/data/features/css-counters.js +1 -1
  757. package/app/node_modules/caniuse-lite/data/features/css-crisp-edges.js +1 -1
  758. package/app/node_modules/caniuse-lite/data/features/css-cross-fade.js +1 -1
  759. package/app/node_modules/caniuse-lite/data/features/css-default-pseudo.js +1 -1
  760. package/app/node_modules/caniuse-lite/data/features/css-descendant-gtgt.js +1 -1
  761. package/app/node_modules/caniuse-lite/data/features/css-deviceadaptation.js +1 -1
  762. package/app/node_modules/caniuse-lite/data/features/css-dir-pseudo.js +1 -1
  763. package/app/node_modules/caniuse-lite/data/features/css-display-contents.js +1 -1
  764. package/app/node_modules/caniuse-lite/data/features/css-element-function.js +1 -1
  765. package/app/node_modules/caniuse-lite/data/features/css-env-function.js +1 -1
  766. package/app/node_modules/caniuse-lite/data/features/css-exclusions.js +1 -1
  767. package/app/node_modules/caniuse-lite/data/features/css-featurequeries.js +1 -1
  768. package/app/node_modules/caniuse-lite/data/features/css-file-selector-button.js +1 -1
  769. package/app/node_modules/caniuse-lite/data/features/css-filter-function.js +1 -1
  770. package/app/node_modules/caniuse-lite/data/features/css-filters.js +1 -1
  771. package/app/node_modules/caniuse-lite/data/features/css-first-letter.js +1 -1
  772. package/app/node_modules/caniuse-lite/data/features/css-first-line.js +1 -1
  773. package/app/node_modules/caniuse-lite/data/features/css-fixed.js +1 -1
  774. package/app/node_modules/caniuse-lite/data/features/css-focus-visible.js +1 -1
  775. package/app/node_modules/caniuse-lite/data/features/css-focus-within.js +1 -1
  776. package/app/node_modules/caniuse-lite/data/features/css-font-palette.js +1 -1
  777. package/app/node_modules/caniuse-lite/data/features/css-font-rendering-controls.js +1 -1
  778. package/app/node_modules/caniuse-lite/data/features/css-font-stretch.js +1 -1
  779. package/app/node_modules/caniuse-lite/data/features/css-gencontent.js +1 -1
  780. package/app/node_modules/caniuse-lite/data/features/css-gradients.js +1 -1
  781. package/app/node_modules/caniuse-lite/data/features/css-grid-animation.js +1 -1
  782. package/app/node_modules/caniuse-lite/data/features/css-grid-lanes.js +1 -1
  783. package/app/node_modules/caniuse-lite/data/features/css-grid.js +1 -1
  784. package/app/node_modules/caniuse-lite/data/features/css-hanging-punctuation.js +1 -1
  785. package/app/node_modules/caniuse-lite/data/features/css-has.js +1 -1
  786. package/app/node_modules/caniuse-lite/data/features/css-hyphens.js +1 -1
  787. package/app/node_modules/caniuse-lite/data/features/css-if.js +1 -1
  788. package/app/node_modules/caniuse-lite/data/features/css-image-orientation.js +1 -1
  789. package/app/node_modules/caniuse-lite/data/features/css-image-set.js +1 -1
  790. package/app/node_modules/caniuse-lite/data/features/css-in-out-of-range.js +1 -1
  791. package/app/node_modules/caniuse-lite/data/features/css-indeterminate-pseudo.js +1 -1
  792. package/app/node_modules/caniuse-lite/data/features/css-initial-letter.js +1 -1
  793. package/app/node_modules/caniuse-lite/data/features/css-initial-value.js +1 -1
  794. package/app/node_modules/caniuse-lite/data/features/css-lch-lab.js +1 -1
  795. package/app/node_modules/caniuse-lite/data/features/css-letter-spacing.js +1 -1
  796. package/app/node_modules/caniuse-lite/data/features/css-line-clamp.js +1 -1
  797. package/app/node_modules/caniuse-lite/data/features/css-logical-props.js +1 -1
  798. package/app/node_modules/caniuse-lite/data/features/css-marker-pseudo.js +1 -1
  799. package/app/node_modules/caniuse-lite/data/features/css-masks.js +1 -1
  800. package/app/node_modules/caniuse-lite/data/features/css-matches-pseudo.js +1 -1
  801. package/app/node_modules/caniuse-lite/data/features/css-math-functions.js +1 -1
  802. package/app/node_modules/caniuse-lite/data/features/css-media-interaction.js +1 -1
  803. package/app/node_modules/caniuse-lite/data/features/css-media-range-syntax.js +1 -1
  804. package/app/node_modules/caniuse-lite/data/features/css-media-resolution.js +1 -1
  805. package/app/node_modules/caniuse-lite/data/features/css-media-scripting.js +1 -1
  806. package/app/node_modules/caniuse-lite/data/features/css-mediaqueries.js +1 -1
  807. package/app/node_modules/caniuse-lite/data/features/css-mixblendmode.js +1 -1
  808. package/app/node_modules/caniuse-lite/data/features/css-module-scripts.js +1 -1
  809. package/app/node_modules/caniuse-lite/data/features/css-motion-paths.js +1 -1
  810. package/app/node_modules/caniuse-lite/data/features/css-namespaces.js +1 -1
  811. package/app/node_modules/caniuse-lite/data/features/css-nesting.js +1 -1
  812. package/app/node_modules/caniuse-lite/data/features/css-not-sel-list.js +1 -1
  813. package/app/node_modules/caniuse-lite/data/features/css-nth-child-of.js +1 -1
  814. package/app/node_modules/caniuse-lite/data/features/css-opacity.js +1 -1
  815. package/app/node_modules/caniuse-lite/data/features/css-optional-pseudo.js +1 -1
  816. package/app/node_modules/caniuse-lite/data/features/css-overflow-anchor.js +1 -1
  817. package/app/node_modules/caniuse-lite/data/features/css-overflow-overlay.js +1 -1
  818. package/app/node_modules/caniuse-lite/data/features/css-overflow.js +1 -1
  819. package/app/node_modules/caniuse-lite/data/features/css-overscroll-behavior.js +1 -1
  820. package/app/node_modules/caniuse-lite/data/features/css-page-break.js +1 -1
  821. package/app/node_modules/caniuse-lite/data/features/css-paged-media.js +1 -1
  822. package/app/node_modules/caniuse-lite/data/features/css-paint-api.js +1 -1
  823. package/app/node_modules/caniuse-lite/data/features/css-placeholder-shown.js +1 -1
  824. package/app/node_modules/caniuse-lite/data/features/css-placeholder.js +1 -1
  825. package/app/node_modules/caniuse-lite/data/features/css-print-color-adjust.js +1 -1
  826. package/app/node_modules/caniuse-lite/data/features/css-read-only-write.js +1 -1
  827. package/app/node_modules/caniuse-lite/data/features/css-rebeccapurple.js +1 -1
  828. package/app/node_modules/caniuse-lite/data/features/css-reflections.js +1 -1
  829. package/app/node_modules/caniuse-lite/data/features/css-regions.js +1 -1
  830. package/app/node_modules/caniuse-lite/data/features/css-relative-colors.js +1 -1
  831. package/app/node_modules/caniuse-lite/data/features/css-repeating-gradients.js +1 -1
  832. package/app/node_modules/caniuse-lite/data/features/css-resize.js +1 -1
  833. package/app/node_modules/caniuse-lite/data/features/css-revert-value.js +1 -1
  834. package/app/node_modules/caniuse-lite/data/features/css-rrggbbaa.js +1 -1
  835. package/app/node_modules/caniuse-lite/data/features/css-scroll-behavior.js +1 -1
  836. package/app/node_modules/caniuse-lite/data/features/css-scrollbar.js +1 -1
  837. package/app/node_modules/caniuse-lite/data/features/css-sel2.js +1 -1
  838. package/app/node_modules/caniuse-lite/data/features/css-sel3.js +1 -1
  839. package/app/node_modules/caniuse-lite/data/features/css-selection.js +1 -1
  840. package/app/node_modules/caniuse-lite/data/features/css-shapes.js +1 -1
  841. package/app/node_modules/caniuse-lite/data/features/css-snappoints.js +1 -1
  842. package/app/node_modules/caniuse-lite/data/features/css-sticky.js +1 -1
  843. package/app/node_modules/caniuse-lite/data/features/css-subgrid.js +1 -1
  844. package/app/node_modules/caniuse-lite/data/features/css-supports-api.js +1 -1
  845. package/app/node_modules/caniuse-lite/data/features/css-table.js +1 -1
  846. package/app/node_modules/caniuse-lite/data/features/css-text-align-last.js +1 -1
  847. package/app/node_modules/caniuse-lite/data/features/css-text-box-trim.js +1 -1
  848. package/app/node_modules/caniuse-lite/data/features/css-text-indent.js +1 -1
  849. package/app/node_modules/caniuse-lite/data/features/css-text-justify.js +1 -1
  850. package/app/node_modules/caniuse-lite/data/features/css-text-orientation.js +1 -1
  851. package/app/node_modules/caniuse-lite/data/features/css-text-spacing.js +1 -1
  852. package/app/node_modules/caniuse-lite/data/features/css-text-wrap-balance.js +1 -1
  853. package/app/node_modules/caniuse-lite/data/features/css-textshadow.js +1 -1
  854. package/app/node_modules/caniuse-lite/data/features/css-touch-action.js +1 -1
  855. package/app/node_modules/caniuse-lite/data/features/css-transitions.js +1 -1
  856. package/app/node_modules/caniuse-lite/data/features/css-unicode-bidi.js +1 -1
  857. package/app/node_modules/caniuse-lite/data/features/css-unset-value.js +1 -1
  858. package/app/node_modules/caniuse-lite/data/features/css-variables.js +1 -1
  859. package/app/node_modules/caniuse-lite/data/features/css-when-else.js +1 -1
  860. package/app/node_modules/caniuse-lite/data/features/css-widows-orphans.js +1 -1
  861. package/app/node_modules/caniuse-lite/data/features/css-width-stretch.js +1 -1
  862. package/app/node_modules/caniuse-lite/data/features/css-writing-mode.js +1 -1
  863. package/app/node_modules/caniuse-lite/data/features/css-zoom.js +1 -1
  864. package/app/node_modules/caniuse-lite/data/features/css3-attr.js +1 -1
  865. package/app/node_modules/caniuse-lite/data/features/css3-boxsizing.js +1 -1
  866. package/app/node_modules/caniuse-lite/data/features/css3-colors.js +1 -1
  867. package/app/node_modules/caniuse-lite/data/features/css3-cursors-grab.js +1 -1
  868. package/app/node_modules/caniuse-lite/data/features/css3-cursors-newer.js +1 -1
  869. package/app/node_modules/caniuse-lite/data/features/css3-cursors.js +1 -1
  870. package/app/node_modules/caniuse-lite/data/features/css3-tabsize.js +1 -1
  871. package/app/node_modules/caniuse-lite/data/features/currentcolor.js +1 -1
  872. package/app/node_modules/caniuse-lite/data/features/custom-elements.js +1 -1
  873. package/app/node_modules/caniuse-lite/data/features/custom-elementsv1.js +1 -1
  874. package/app/node_modules/caniuse-lite/data/features/customevent.js +1 -1
  875. package/app/node_modules/caniuse-lite/data/features/customizable-select.js +1 -1
  876. package/app/node_modules/caniuse-lite/data/features/datalist.js +1 -1
  877. package/app/node_modules/caniuse-lite/data/features/dataset.js +1 -1
  878. package/app/node_modules/caniuse-lite/data/features/datauri.js +1 -1
  879. package/app/node_modules/caniuse-lite/data/features/date-tolocaledatestring.js +1 -1
  880. package/app/node_modules/caniuse-lite/data/features/declarative-shadow-dom.js +1 -1
  881. package/app/node_modules/caniuse-lite/data/features/decorators.js +1 -1
  882. package/app/node_modules/caniuse-lite/data/features/details.js +1 -1
  883. package/app/node_modules/caniuse-lite/data/features/deviceorientation.js +1 -1
  884. package/app/node_modules/caniuse-lite/data/features/devicepixelratio.js +1 -1
  885. package/app/node_modules/caniuse-lite/data/features/dialog.js +1 -1
  886. package/app/node_modules/caniuse-lite/data/features/dispatchevent.js +1 -1
  887. package/app/node_modules/caniuse-lite/data/features/dnssec.js +1 -1
  888. package/app/node_modules/caniuse-lite/data/features/do-not-track.js +1 -1
  889. package/app/node_modules/caniuse-lite/data/features/document-currentscript.js +1 -1
  890. package/app/node_modules/caniuse-lite/data/features/document-evaluate-xpath.js +1 -1
  891. package/app/node_modules/caniuse-lite/data/features/document-execcommand.js +1 -1
  892. package/app/node_modules/caniuse-lite/data/features/document-policy.js +1 -1
  893. package/app/node_modules/caniuse-lite/data/features/document-scrollingelement.js +1 -1
  894. package/app/node_modules/caniuse-lite/data/features/documenthead.js +1 -1
  895. package/app/node_modules/caniuse-lite/data/features/dom-manip-convenience.js +1 -1
  896. package/app/node_modules/caniuse-lite/data/features/dom-range.js +1 -1
  897. package/app/node_modules/caniuse-lite/data/features/domcontentloaded.js +1 -1
  898. package/app/node_modules/caniuse-lite/data/features/dommatrix.js +1 -1
  899. package/app/node_modules/caniuse-lite/data/features/download.js +1 -1
  900. package/app/node_modules/caniuse-lite/data/features/dragndrop.js +1 -1
  901. package/app/node_modules/caniuse-lite/data/features/element-closest.js +1 -1
  902. package/app/node_modules/caniuse-lite/data/features/element-from-point.js +1 -1
  903. package/app/node_modules/caniuse-lite/data/features/element-scroll-methods.js +1 -1
  904. package/app/node_modules/caniuse-lite/data/features/eme.js +1 -1
  905. package/app/node_modules/caniuse-lite/data/features/eot.js +1 -1
  906. package/app/node_modules/caniuse-lite/data/features/es5.js +1 -1
  907. package/app/node_modules/caniuse-lite/data/features/es6-class.js +1 -1
  908. package/app/node_modules/caniuse-lite/data/features/es6-generators.js +1 -1
  909. package/app/node_modules/caniuse-lite/data/features/es6-module-dynamic-import.js +1 -1
  910. package/app/node_modules/caniuse-lite/data/features/es6-module.js +1 -1
  911. package/app/node_modules/caniuse-lite/data/features/es6-number.js +1 -1
  912. package/app/node_modules/caniuse-lite/data/features/es6-string-includes.js +1 -1
  913. package/app/node_modules/caniuse-lite/data/features/es6.js +1 -1
  914. package/app/node_modules/caniuse-lite/data/features/eventsource.js +1 -1
  915. package/app/node_modules/caniuse-lite/data/features/extended-system-fonts.js +1 -1
  916. package/app/node_modules/caniuse-lite/data/features/feature-policy.js +1 -1
  917. package/app/node_modules/caniuse-lite/data/features/fetch.js +1 -1
  918. package/app/node_modules/caniuse-lite/data/features/fieldset-disabled.js +1 -1
  919. package/app/node_modules/caniuse-lite/data/features/fileapi.js +1 -1
  920. package/app/node_modules/caniuse-lite/data/features/filereader.js +1 -1
  921. package/app/node_modules/caniuse-lite/data/features/filereadersync.js +1 -1
  922. package/app/node_modules/caniuse-lite/data/features/filesystem.js +1 -1
  923. package/app/node_modules/caniuse-lite/data/features/flac.js +1 -1
  924. package/app/node_modules/caniuse-lite/data/features/flexbox-gap.js +1 -1
  925. package/app/node_modules/caniuse-lite/data/features/flexbox.js +1 -1
  926. package/app/node_modules/caniuse-lite/data/features/flow-root.js +1 -1
  927. package/app/node_modules/caniuse-lite/data/features/focusin-focusout-events.js +1 -1
  928. package/app/node_modules/caniuse-lite/data/features/font-family-system-ui.js +1 -1
  929. package/app/node_modules/caniuse-lite/data/features/font-feature.js +1 -1
  930. package/app/node_modules/caniuse-lite/data/features/font-kerning.js +1 -1
  931. package/app/node_modules/caniuse-lite/data/features/font-loading.js +1 -1
  932. package/app/node_modules/caniuse-lite/data/features/font-size-adjust.js +1 -1
  933. package/app/node_modules/caniuse-lite/data/features/font-smooth.js +1 -1
  934. package/app/node_modules/caniuse-lite/data/features/font-unicode-range.js +1 -1
  935. package/app/node_modules/caniuse-lite/data/features/font-variant-alternates.js +1 -1
  936. package/app/node_modules/caniuse-lite/data/features/font-variant-numeric.js +1 -1
  937. package/app/node_modules/caniuse-lite/data/features/fontface.js +1 -1
  938. package/app/node_modules/caniuse-lite/data/features/form-attribute.js +1 -1
  939. package/app/node_modules/caniuse-lite/data/features/form-submit-attributes.js +1 -1
  940. package/app/node_modules/caniuse-lite/data/features/form-validation.js +1 -1
  941. package/app/node_modules/caniuse-lite/data/features/forms.js +1 -1
  942. package/app/node_modules/caniuse-lite/data/features/fullscreen.js +1 -1
  943. package/app/node_modules/caniuse-lite/data/features/gamepad.js +1 -1
  944. package/app/node_modules/caniuse-lite/data/features/geolocation.js +1 -1
  945. package/app/node_modules/caniuse-lite/data/features/getboundingclientrect.js +1 -1
  946. package/app/node_modules/caniuse-lite/data/features/getcomputedstyle.js +1 -1
  947. package/app/node_modules/caniuse-lite/data/features/getelementsbyclassname.js +1 -1
  948. package/app/node_modules/caniuse-lite/data/features/getrandomvalues.js +1 -1
  949. package/app/node_modules/caniuse-lite/data/features/gyroscope.js +1 -1
  950. package/app/node_modules/caniuse-lite/data/features/hardwareconcurrency.js +1 -1
  951. package/app/node_modules/caniuse-lite/data/features/hashchange.js +1 -1
  952. package/app/node_modules/caniuse-lite/data/features/heif.js +1 -1
  953. package/app/node_modules/caniuse-lite/data/features/hevc.js +1 -1
  954. package/app/node_modules/caniuse-lite/data/features/hidden.js +1 -1
  955. package/app/node_modules/caniuse-lite/data/features/high-resolution-time.js +1 -1
  956. package/app/node_modules/caniuse-lite/data/features/history.js +1 -1
  957. package/app/node_modules/caniuse-lite/data/features/html-media-capture.js +1 -1
  958. package/app/node_modules/caniuse-lite/data/features/html5semantic.js +1 -1
  959. package/app/node_modules/caniuse-lite/data/features/http-live-streaming.js +1 -1
  960. package/app/node_modules/caniuse-lite/data/features/http2.js +1 -1
  961. package/app/node_modules/caniuse-lite/data/features/http3.js +1 -1
  962. package/app/node_modules/caniuse-lite/data/features/iframe-sandbox.js +1 -1
  963. package/app/node_modules/caniuse-lite/data/features/iframe-seamless.js +1 -1
  964. package/app/node_modules/caniuse-lite/data/features/iframe-srcdoc.js +1 -1
  965. package/app/node_modules/caniuse-lite/data/features/imagecapture.js +1 -1
  966. package/app/node_modules/caniuse-lite/data/features/ime.js +1 -1
  967. package/app/node_modules/caniuse-lite/data/features/img-naturalwidth-naturalheight.js +1 -1
  968. package/app/node_modules/caniuse-lite/data/features/import-maps.js +1 -1
  969. package/app/node_modules/caniuse-lite/data/features/imports.js +1 -1
  970. package/app/node_modules/caniuse-lite/data/features/indeterminate-checkbox.js +1 -1
  971. package/app/node_modules/caniuse-lite/data/features/indexeddb.js +1 -1
  972. package/app/node_modules/caniuse-lite/data/features/indexeddb2.js +1 -1
  973. package/app/node_modules/caniuse-lite/data/features/inline-block.js +1 -1
  974. package/app/node_modules/caniuse-lite/data/features/innertext.js +1 -1
  975. package/app/node_modules/caniuse-lite/data/features/input-autocomplete-onoff.js +1 -1
  976. package/app/node_modules/caniuse-lite/data/features/input-color.js +1 -1
  977. package/app/node_modules/caniuse-lite/data/features/input-datetime.js +1 -1
  978. package/app/node_modules/caniuse-lite/data/features/input-email-tel-url.js +1 -1
  979. package/app/node_modules/caniuse-lite/data/features/input-event.js +1 -1
  980. package/app/node_modules/caniuse-lite/data/features/input-file-accept.js +1 -1
  981. package/app/node_modules/caniuse-lite/data/features/input-file-directory.js +1 -1
  982. package/app/node_modules/caniuse-lite/data/features/input-file-multiple.js +1 -1
  983. package/app/node_modules/caniuse-lite/data/features/input-inputmode.js +1 -1
  984. package/app/node_modules/caniuse-lite/data/features/input-minlength.js +1 -1
  985. package/app/node_modules/caniuse-lite/data/features/input-number.js +1 -1
  986. package/app/node_modules/caniuse-lite/data/features/input-pattern.js +1 -1
  987. package/app/node_modules/caniuse-lite/data/features/input-placeholder.js +1 -1
  988. package/app/node_modules/caniuse-lite/data/features/input-range.js +1 -1
  989. package/app/node_modules/caniuse-lite/data/features/input-search.js +1 -1
  990. package/app/node_modules/caniuse-lite/data/features/input-selection.js +1 -1
  991. package/app/node_modules/caniuse-lite/data/features/insert-adjacent.js +1 -1
  992. package/app/node_modules/caniuse-lite/data/features/insertadjacenthtml.js +1 -1
  993. package/app/node_modules/caniuse-lite/data/features/internationalization.js +1 -1
  994. package/app/node_modules/caniuse-lite/data/features/intersectionobserver-v2.js +1 -1
  995. package/app/node_modules/caniuse-lite/data/features/intersectionobserver.js +1 -1
  996. package/app/node_modules/caniuse-lite/data/features/intl-pluralrules.js +1 -1
  997. package/app/node_modules/caniuse-lite/data/features/intrinsic-width.js +1 -1
  998. package/app/node_modules/caniuse-lite/data/features/jpeg2000.js +1 -1
  999. package/app/node_modules/caniuse-lite/data/features/jpegxl.js +1 -1
  1000. package/app/node_modules/caniuse-lite/data/features/jpegxr.js +1 -1
  1001. package/app/node_modules/caniuse-lite/data/features/js-regexp-lookbehind.js +1 -1
  1002. package/app/node_modules/caniuse-lite/data/features/json.js +1 -1
  1003. package/app/node_modules/caniuse-lite/data/features/justify-content-space-evenly.js +1 -1
  1004. package/app/node_modules/caniuse-lite/data/features/kerning-pairs-ligatures.js +1 -1
  1005. package/app/node_modules/caniuse-lite/data/features/keyboardevent-charcode.js +1 -1
  1006. package/app/node_modules/caniuse-lite/data/features/keyboardevent-code.js +1 -1
  1007. package/app/node_modules/caniuse-lite/data/features/keyboardevent-getmodifierstate.js +1 -1
  1008. package/app/node_modules/caniuse-lite/data/features/keyboardevent-key.js +1 -1
  1009. package/app/node_modules/caniuse-lite/data/features/keyboardevent-location.js +1 -1
  1010. package/app/node_modules/caniuse-lite/data/features/keyboardevent-which.js +1 -1
  1011. package/app/node_modules/caniuse-lite/data/features/lazyload.js +1 -1
  1012. package/app/node_modules/caniuse-lite/data/features/let.js +1 -1
  1013. package/app/node_modules/caniuse-lite/data/features/link-icon-png.js +1 -1
  1014. package/app/node_modules/caniuse-lite/data/features/link-icon-svg.js +1 -1
  1015. package/app/node_modules/caniuse-lite/data/features/link-rel-dns-prefetch.js +1 -1
  1016. package/app/node_modules/caniuse-lite/data/features/link-rel-modulepreload.js +1 -1
  1017. package/app/node_modules/caniuse-lite/data/features/link-rel-preconnect.js +1 -1
  1018. package/app/node_modules/caniuse-lite/data/features/link-rel-prefetch.js +1 -1
  1019. package/app/node_modules/caniuse-lite/data/features/link-rel-preload.js +1 -1
  1020. package/app/node_modules/caniuse-lite/data/features/link-rel-prerender.js +1 -1
  1021. package/app/node_modules/caniuse-lite/data/features/loading-lazy-attr.js +1 -1
  1022. package/app/node_modules/caniuse-lite/data/features/loading-lazy-media.js +1 -1
  1023. package/app/node_modules/caniuse-lite/data/features/localecompare.js +1 -1
  1024. package/app/node_modules/caniuse-lite/data/features/magnetometer.js +1 -1
  1025. package/app/node_modules/caniuse-lite/data/features/matchesselector.js +1 -1
  1026. package/app/node_modules/caniuse-lite/data/features/matchmedia.js +1 -1
  1027. package/app/node_modules/caniuse-lite/data/features/mathml.js +1 -1
  1028. package/app/node_modules/caniuse-lite/data/features/maxlength.js +1 -1
  1029. package/app/node_modules/caniuse-lite/data/features/mdn-css-backdrop-pseudo-element.js +1 -1
  1030. package/app/node_modules/caniuse-lite/data/features/mdn-css-unicode-bidi-isolate-override.js +1 -1
  1031. package/app/node_modules/caniuse-lite/data/features/mdn-css-unicode-bidi-isolate.js +1 -1
  1032. package/app/node_modules/caniuse-lite/data/features/mdn-css-unicode-bidi-plaintext.js +1 -1
  1033. package/app/node_modules/caniuse-lite/data/features/mdn-text-decoration-color.js +1 -1
  1034. package/app/node_modules/caniuse-lite/data/features/mdn-text-decoration-line.js +1 -1
  1035. package/app/node_modules/caniuse-lite/data/features/mdn-text-decoration-shorthand.js +1 -1
  1036. package/app/node_modules/caniuse-lite/data/features/mdn-text-decoration-style.js +1 -1
  1037. package/app/node_modules/caniuse-lite/data/features/media-fragments.js +1 -1
  1038. package/app/node_modules/caniuse-lite/data/features/mediacapture-fromelement.js +1 -1
  1039. package/app/node_modules/caniuse-lite/data/features/mediarecorder.js +1 -1
  1040. package/app/node_modules/caniuse-lite/data/features/mediasource.js +1 -1
  1041. package/app/node_modules/caniuse-lite/data/features/menu.js +1 -1
  1042. package/app/node_modules/caniuse-lite/data/features/meta-theme-color.js +1 -1
  1043. package/app/node_modules/caniuse-lite/data/features/meter.js +1 -1
  1044. package/app/node_modules/caniuse-lite/data/features/midi.js +1 -1
  1045. package/app/node_modules/caniuse-lite/data/features/minmaxwh.js +1 -1
  1046. package/app/node_modules/caniuse-lite/data/features/mp3.js +1 -1
  1047. package/app/node_modules/caniuse-lite/data/features/mpeg-dash.js +1 -1
  1048. package/app/node_modules/caniuse-lite/data/features/mpeg4.js +1 -1
  1049. package/app/node_modules/caniuse-lite/data/features/multibackgrounds.js +1 -1
  1050. package/app/node_modules/caniuse-lite/data/features/multicolumn.js +1 -1
  1051. package/app/node_modules/caniuse-lite/data/features/mutation-events.js +1 -1
  1052. package/app/node_modules/caniuse-lite/data/features/mutationobserver.js +1 -1
  1053. package/app/node_modules/caniuse-lite/data/features/namevalue-storage.js +1 -1
  1054. package/app/node_modules/caniuse-lite/data/features/native-filesystem-api.js +1 -1
  1055. package/app/node_modules/caniuse-lite/data/features/nav-timing.js +1 -1
  1056. package/app/node_modules/caniuse-lite/data/features/netinfo.js +1 -1
  1057. package/app/node_modules/caniuse-lite/data/features/notifications.js +1 -1
  1058. package/app/node_modules/caniuse-lite/data/features/object-entries.js +1 -1
  1059. package/app/node_modules/caniuse-lite/data/features/object-fit.js +1 -1
  1060. package/app/node_modules/caniuse-lite/data/features/object-observe.js +1 -1
  1061. package/app/node_modules/caniuse-lite/data/features/object-values.js +1 -1
  1062. package/app/node_modules/caniuse-lite/data/features/objectrtc.js +1 -1
  1063. package/app/node_modules/caniuse-lite/data/features/offline-apps.js +1 -1
  1064. package/app/node_modules/caniuse-lite/data/features/offscreencanvas.js +1 -1
  1065. package/app/node_modules/caniuse-lite/data/features/ogg-vorbis.js +1 -1
  1066. package/app/node_modules/caniuse-lite/data/features/ogv.js +1 -1
  1067. package/app/node_modules/caniuse-lite/data/features/ol-reversed.js +1 -1
  1068. package/app/node_modules/caniuse-lite/data/features/once-event-listener.js +1 -1
  1069. package/app/node_modules/caniuse-lite/data/features/online-status.js +1 -1
  1070. package/app/node_modules/caniuse-lite/data/features/opus.js +1 -1
  1071. package/app/node_modules/caniuse-lite/data/features/orientation-sensor.js +1 -1
  1072. package/app/node_modules/caniuse-lite/data/features/outline.js +1 -1
  1073. package/app/node_modules/caniuse-lite/data/features/pad-start-end.js +1 -1
  1074. package/app/node_modules/caniuse-lite/data/features/page-transition-events.js +1 -1
  1075. package/app/node_modules/caniuse-lite/data/features/pagevisibility.js +1 -1
  1076. package/app/node_modules/caniuse-lite/data/features/passive-event-listener.js +1 -1
  1077. package/app/node_modules/caniuse-lite/data/features/passkeys.js +1 -1
  1078. package/app/node_modules/caniuse-lite/data/features/passwordrules.js +1 -1
  1079. package/app/node_modules/caniuse-lite/data/features/path2d.js +1 -1
  1080. package/app/node_modules/caniuse-lite/data/features/payment-request.js +1 -1
  1081. package/app/node_modules/caniuse-lite/data/features/pdf-viewer.js +1 -1
  1082. package/app/node_modules/caniuse-lite/data/features/permissions-api.js +1 -1
  1083. package/app/node_modules/caniuse-lite/data/features/permissions-policy.js +1 -1
  1084. package/app/node_modules/caniuse-lite/data/features/picture-in-picture.js +1 -1
  1085. package/app/node_modules/caniuse-lite/data/features/picture.js +1 -1
  1086. package/app/node_modules/caniuse-lite/data/features/ping.js +1 -1
  1087. package/app/node_modules/caniuse-lite/data/features/png-alpha.js +1 -1
  1088. package/app/node_modules/caniuse-lite/data/features/pointer-events.js +1 -1
  1089. package/app/node_modules/caniuse-lite/data/features/pointer.js +1 -1
  1090. package/app/node_modules/caniuse-lite/data/features/pointerlock.js +1 -1
  1091. package/app/node_modules/caniuse-lite/data/features/portals.js +1 -1
  1092. package/app/node_modules/caniuse-lite/data/features/prefers-color-scheme.js +1 -1
  1093. package/app/node_modules/caniuse-lite/data/features/prefers-reduced-motion.js +1 -1
  1094. package/app/node_modules/caniuse-lite/data/features/progress.js +1 -1
  1095. package/app/node_modules/caniuse-lite/data/features/promise-finally.js +1 -1
  1096. package/app/node_modules/caniuse-lite/data/features/promises.js +1 -1
  1097. package/app/node_modules/caniuse-lite/data/features/proximity.js +1 -1
  1098. package/app/node_modules/caniuse-lite/data/features/proxy.js +1 -1
  1099. package/app/node_modules/caniuse-lite/data/features/publickeypinning.js +1 -1
  1100. package/app/node_modules/caniuse-lite/data/features/push-api.js +1 -1
  1101. package/app/node_modules/caniuse-lite/data/features/queryselector.js +1 -1
  1102. package/app/node_modules/caniuse-lite/data/features/readonly-attr.js +1 -1
  1103. package/app/node_modules/caniuse-lite/data/features/referrer-policy.js +1 -1
  1104. package/app/node_modules/caniuse-lite/data/features/registerprotocolhandler.js +1 -1
  1105. package/app/node_modules/caniuse-lite/data/features/rel-noopener.js +1 -1
  1106. package/app/node_modules/caniuse-lite/data/features/rel-noreferrer.js +1 -1
  1107. package/app/node_modules/caniuse-lite/data/features/rellist.js +1 -1
  1108. package/app/node_modules/caniuse-lite/data/features/rem.js +1 -1
  1109. package/app/node_modules/caniuse-lite/data/features/requestanimationframe.js +1 -1
  1110. package/app/node_modules/caniuse-lite/data/features/requestidlecallback.js +1 -1
  1111. package/app/node_modules/caniuse-lite/data/features/resizeobserver.js +1 -1
  1112. package/app/node_modules/caniuse-lite/data/features/resource-timing.js +1 -1
  1113. package/app/node_modules/caniuse-lite/data/features/rest-parameters.js +1 -1
  1114. package/app/node_modules/caniuse-lite/data/features/rtcpeerconnection.js +1 -1
  1115. package/app/node_modules/caniuse-lite/data/features/ruby.js +1 -1
  1116. package/app/node_modules/caniuse-lite/data/features/run-in.js +1 -1
  1117. package/app/node_modules/caniuse-lite/data/features/same-site-cookie-attribute.js +1 -1
  1118. package/app/node_modules/caniuse-lite/data/features/screen-orientation.js +1 -1
  1119. package/app/node_modules/caniuse-lite/data/features/script-async.js +1 -1
  1120. package/app/node_modules/caniuse-lite/data/features/script-defer.js +1 -1
  1121. package/app/node_modules/caniuse-lite/data/features/scrollintoview.js +1 -1
  1122. package/app/node_modules/caniuse-lite/data/features/scrollintoviewifneeded.js +1 -1
  1123. package/app/node_modules/caniuse-lite/data/features/sdch.js +1 -1
  1124. package/app/node_modules/caniuse-lite/data/features/selection-api.js +1 -1
  1125. package/app/node_modules/caniuse-lite/data/features/server-timing.js +1 -1
  1126. package/app/node_modules/caniuse-lite/data/features/serviceworkers.js +1 -1
  1127. package/app/node_modules/caniuse-lite/data/features/setimmediate.js +1 -1
  1128. package/app/node_modules/caniuse-lite/data/features/shadowdom.js +1 -1
  1129. package/app/node_modules/caniuse-lite/data/features/shadowdomv1.js +1 -1
  1130. package/app/node_modules/caniuse-lite/data/features/sharedarraybuffer.js +1 -1
  1131. package/app/node_modules/caniuse-lite/data/features/sharedworkers.js +1 -1
  1132. package/app/node_modules/caniuse-lite/data/features/sni.js +1 -1
  1133. package/app/node_modules/caniuse-lite/data/features/spdy.js +1 -1
  1134. package/app/node_modules/caniuse-lite/data/features/speech-recognition.js +1 -1
  1135. package/app/node_modules/caniuse-lite/data/features/speech-synthesis.js +1 -1
  1136. package/app/node_modules/caniuse-lite/data/features/spellcheck-attribute.js +1 -1
  1137. package/app/node_modules/caniuse-lite/data/features/sql-storage.js +1 -1
  1138. package/app/node_modules/caniuse-lite/data/features/srcset.js +1 -1
  1139. package/app/node_modules/caniuse-lite/data/features/stream.js +1 -1
  1140. package/app/node_modules/caniuse-lite/data/features/streams.js +1 -1
  1141. package/app/node_modules/caniuse-lite/data/features/stricttransportsecurity.js +1 -1
  1142. package/app/node_modules/caniuse-lite/data/features/style-scoped.js +1 -1
  1143. package/app/node_modules/caniuse-lite/data/features/subresource-bundling.js +1 -1
  1144. package/app/node_modules/caniuse-lite/data/features/subresource-integrity.js +1 -1
  1145. package/app/node_modules/caniuse-lite/data/features/svg-css.js +1 -1
  1146. package/app/node_modules/caniuse-lite/data/features/svg-filters.js +1 -1
  1147. package/app/node_modules/caniuse-lite/data/features/svg-fonts.js +1 -1
  1148. package/app/node_modules/caniuse-lite/data/features/svg-fragment.js +1 -1
  1149. package/app/node_modules/caniuse-lite/data/features/svg-html.js +1 -1
  1150. package/app/node_modules/caniuse-lite/data/features/svg-html5.js +1 -1
  1151. package/app/node_modules/caniuse-lite/data/features/svg-img.js +1 -1
  1152. package/app/node_modules/caniuse-lite/data/features/svg-smil.js +1 -1
  1153. package/app/node_modules/caniuse-lite/data/features/svg.js +1 -1
  1154. package/app/node_modules/caniuse-lite/data/features/sxg.js +1 -1
  1155. package/app/node_modules/caniuse-lite/data/features/tabindex-attr.js +1 -1
  1156. package/app/node_modules/caniuse-lite/data/features/template-literals.js +1 -1
  1157. package/app/node_modules/caniuse-lite/data/features/template.js +1 -1
  1158. package/app/node_modules/caniuse-lite/data/features/temporal.js +1 -1
  1159. package/app/node_modules/caniuse-lite/data/features/testfeat.js +1 -1
  1160. package/app/node_modules/caniuse-lite/data/features/text-decoration.js +1 -1
  1161. package/app/node_modules/caniuse-lite/data/features/text-emphasis.js +1 -1
  1162. package/app/node_modules/caniuse-lite/data/features/text-overflow.js +1 -1
  1163. package/app/node_modules/caniuse-lite/data/features/text-size-adjust.js +1 -1
  1164. package/app/node_modules/caniuse-lite/data/features/text-stroke.js +1 -1
  1165. package/app/node_modules/caniuse-lite/data/features/textcontent.js +1 -1
  1166. package/app/node_modules/caniuse-lite/data/features/textencoder.js +1 -1
  1167. package/app/node_modules/caniuse-lite/data/features/tls1-1.js +1 -1
  1168. package/app/node_modules/caniuse-lite/data/features/tls1-2.js +1 -1
  1169. package/app/node_modules/caniuse-lite/data/features/tls1-3.js +1 -1
  1170. package/app/node_modules/caniuse-lite/data/features/touch.js +1 -1
  1171. package/app/node_modules/caniuse-lite/data/features/transforms2d.js +1 -1
  1172. package/app/node_modules/caniuse-lite/data/features/transforms3d.js +1 -1
  1173. package/app/node_modules/caniuse-lite/data/features/trusted-types.js +1 -1
  1174. package/app/node_modules/caniuse-lite/data/features/ttf.js +1 -1
  1175. package/app/node_modules/caniuse-lite/data/features/typedarrays.js +1 -1
  1176. package/app/node_modules/caniuse-lite/data/features/u2f.js +1 -1
  1177. package/app/node_modules/caniuse-lite/data/features/unhandledrejection.js +1 -1
  1178. package/app/node_modules/caniuse-lite/data/features/upgradeinsecurerequests.js +1 -1
  1179. package/app/node_modules/caniuse-lite/data/features/url-scroll-to-text-fragment.js +1 -1
  1180. package/app/node_modules/caniuse-lite/data/features/url.js +1 -1
  1181. package/app/node_modules/caniuse-lite/data/features/urlsearchparams.js +1 -1
  1182. package/app/node_modules/caniuse-lite/data/features/use-strict.js +1 -1
  1183. package/app/node_modules/caniuse-lite/data/features/user-select-none.js +1 -1
  1184. package/app/node_modules/caniuse-lite/data/features/user-timing.js +1 -1
  1185. package/app/node_modules/caniuse-lite/data/features/variable-fonts.js +1 -1
  1186. package/app/node_modules/caniuse-lite/data/features/vector-effect.js +1 -1
  1187. package/app/node_modules/caniuse-lite/data/features/vibration.js +1 -1
  1188. package/app/node_modules/caniuse-lite/data/features/video.js +1 -1
  1189. package/app/node_modules/caniuse-lite/data/features/videotracks.js +1 -1
  1190. package/app/node_modules/caniuse-lite/data/features/view-transitions.js +1 -1
  1191. package/app/node_modules/caniuse-lite/data/features/viewport-unit-variants.js +1 -1
  1192. package/app/node_modules/caniuse-lite/data/features/viewport-units.js +1 -1
  1193. package/app/node_modules/caniuse-lite/data/features/wai-aria.js +1 -1
  1194. package/app/node_modules/caniuse-lite/data/features/wake-lock.js +1 -1
  1195. package/app/node_modules/caniuse-lite/data/features/wasm-bigint.js +1 -1
  1196. package/app/node_modules/caniuse-lite/data/features/wasm-bulk-memory.js +1 -1
  1197. package/app/node_modules/caniuse-lite/data/features/wasm-extended-const.js +1 -1
  1198. package/app/node_modules/caniuse-lite/data/features/wasm-gc.js +1 -1
  1199. package/app/node_modules/caniuse-lite/data/features/wasm-multi-memory.js +1 -1
  1200. package/app/node_modules/caniuse-lite/data/features/wasm-multi-value.js +1 -1
  1201. package/app/node_modules/caniuse-lite/data/features/wasm-mutable-globals.js +1 -1
  1202. package/app/node_modules/caniuse-lite/data/features/wasm-nontrapping-fptoint.js +1 -1
  1203. package/app/node_modules/caniuse-lite/data/features/wasm-reference-types.js +1 -1
  1204. package/app/node_modules/caniuse-lite/data/features/wasm-relaxed-simd.js +1 -1
  1205. package/app/node_modules/caniuse-lite/data/features/wasm-signext.js +1 -1
  1206. package/app/node_modules/caniuse-lite/data/features/wasm-simd.js +1 -1
  1207. package/app/node_modules/caniuse-lite/data/features/wasm-tail-calls.js +1 -1
  1208. package/app/node_modules/caniuse-lite/data/features/wasm-threads.js +1 -1
  1209. package/app/node_modules/caniuse-lite/data/features/wasm.js +1 -1
  1210. package/app/node_modules/caniuse-lite/data/features/wav.js +1 -1
  1211. package/app/node_modules/caniuse-lite/data/features/wbr-element.js +1 -1
  1212. package/app/node_modules/caniuse-lite/data/features/web-animation.js +1 -1
  1213. package/app/node_modules/caniuse-lite/data/features/web-app-manifest.js +1 -1
  1214. package/app/node_modules/caniuse-lite/data/features/web-bluetooth.js +1 -1
  1215. package/app/node_modules/caniuse-lite/data/features/web-serial.js +1 -1
  1216. package/app/node_modules/caniuse-lite/data/features/web-share.js +1 -1
  1217. package/app/node_modules/caniuse-lite/data/features/webauthn.js +1 -1
  1218. package/app/node_modules/caniuse-lite/data/features/webcodecs.js +1 -1
  1219. package/app/node_modules/caniuse-lite/data/features/webgl.js +1 -1
  1220. package/app/node_modules/caniuse-lite/data/features/webgl2.js +1 -1
  1221. package/app/node_modules/caniuse-lite/data/features/webgpu.js +1 -1
  1222. package/app/node_modules/caniuse-lite/data/features/webhid.js +1 -1
  1223. package/app/node_modules/caniuse-lite/data/features/webkit-user-drag.js +1 -1
  1224. package/app/node_modules/caniuse-lite/data/features/webm.js +1 -1
  1225. package/app/node_modules/caniuse-lite/data/features/webnfc.js +1 -1
  1226. package/app/node_modules/caniuse-lite/data/features/webp.js +1 -1
  1227. package/app/node_modules/caniuse-lite/data/features/websockets.js +1 -1
  1228. package/app/node_modules/caniuse-lite/data/features/webtransport.js +1 -1
  1229. package/app/node_modules/caniuse-lite/data/features/webusb.js +1 -1
  1230. package/app/node_modules/caniuse-lite/data/features/webvr.js +1 -1
  1231. package/app/node_modules/caniuse-lite/data/features/webvtt.js +1 -1
  1232. package/app/node_modules/caniuse-lite/data/features/webworkers.js +1 -1
  1233. package/app/node_modules/caniuse-lite/data/features/webxr.js +1 -1
  1234. package/app/node_modules/caniuse-lite/data/features/will-change.js +1 -1
  1235. package/app/node_modules/caniuse-lite/data/features/woff.js +1 -1
  1236. package/app/node_modules/caniuse-lite/data/features/woff2.js +1 -1
  1237. package/app/node_modules/caniuse-lite/data/features/word-break.js +1 -1
  1238. package/app/node_modules/caniuse-lite/data/features/wordwrap.js +1 -1
  1239. package/app/node_modules/caniuse-lite/data/features/x-doc-messaging.js +1 -1
  1240. package/app/node_modules/caniuse-lite/data/features/x-frame-options.js +1 -1
  1241. package/app/node_modules/caniuse-lite/data/features/xhr2.js +1 -1
  1242. package/app/node_modules/caniuse-lite/data/features/xhtml.js +1 -1
  1243. package/app/node_modules/caniuse-lite/data/features/xhtmlsmil.js +1 -1
  1244. package/app/node_modules/caniuse-lite/data/features/xml-serializer.js +1 -1
  1245. package/app/node_modules/caniuse-lite/data/features/zstd.js +1 -1
  1246. package/app/node_modules/caniuse-lite/package.json +1 -1
  1247. package/app/package.json +1 -1
  1248. package/app/server.js +1 -1
  1249. package/package.json +1 -1
  1250. package/app/.next-cli-build/server/chunks/3913.js +0 -64
  1251. package/app/.next-cli-build/static/chunks/1051-eec0f271123ef82f.js +0 -64
  1252. package/app/.next-cli-build/static/css/9ac79f64f04552a6.css +0 -1
  1253. /package/app/.next-cli-build/static/{v5zgkdUL6bxuv6xR83LZX → eUbQJr4P3b6rBescMCctW}/_buildManifest.js +0 -0
  1254. /package/app/.next-cli-build/static/{v5zgkdUL6bxuv6xR83LZX → eUbQJr4P3b6rBescMCctW}/_ssgManifest.js +0 -0
@@ -1,4 +1,4 @@
1
- "use strict";(()=>{var a={};a.id=451,a.ids=[451],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},1932:a=>{a.exports=require("url")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},4573:a=>{a.exports=require("node:buffer")},9588:(a,b,c)=>{c.d(b,{I8:()=>j,Tv:()=>t,aV:()=>n,bz:()=>p,hH:()=>s,oW:()=>r,s0:()=>l,ub:()=>m,vZ:()=>o});var d=c(65573),e=c(23211),f=c(89718),g=c(33792),h=c(90389);function i(a){return String(a||"").trim().toLowerCase()}function j(a){return i(a)}function k(a={}){return[a.ldapUsername,a.ldapEmail,a.ldapName,a.oidcEmail,a.oidcName,a.localUsername,a.username,a.email].map(i).filter(Boolean)}function l(a={}){let b=k(a),c=b[0]||"local",d=a.ldapName||a.ldapEmail||a.oidcName||a.oidcEmail||a.localUsername||c;return{userId:c,displayName:d,loginMethod:a.oidc?"OIDC":a.ldap?"LDAP":"Local",candidates:b}}function m(a={},b={}){var c;if(!b?.authenticated)return!1;if(b.local||!b.ldap&&!b.oidc||b.role===h.hS.ADMIN||!0===b.ldapIsAdmin)return!0;let d=Array.isArray(c=a.ldapAllowedUsers)?c.map(i).filter(Boolean):String(c||"").split(/[,\n]/).map(i).filter(Boolean);return 0!==d.length&&k(b).some(a=>d.includes(a))}function n(a={},b={}){return!(!b?.authenticated||m(a,b))&&(b.role===h.hS.MONITOR_ADMIN||!0===b.ldapIsMonitorAdmin)}function o(a={},b={}){return b?.authenticated?m(a,b)?h.hS.ADMIN:n(a,b)?h.hS.MONITOR_ADMIN:h.hS.USER:h.hS.GUEST}function p(a={}){return!0===a.isAdmin||!0===a.isMonitorAdmin}async function q(){let a=await (0,f.mt)(),b=await (0,d.UL)(),c=await (0,g.dY)(b.get("auth_token")?.value);if(!c?.authenticated)return{authenticated:!1,isAdmin:!1,isMonitorAdmin:!1,role:h.hS.GUEST,userId:"",displayName:"Guest",loginMethod:"None",settings:{...a,requireLogin:!0},session:null};let e=l(c||{}),i=o(a,c||{}),j=i===h.hS.ADMIN,k=i===h.hS.MONITOR_ADMIN;return{authenticated:!0,isAdmin:j,isMonitorAdmin:k,role:i,canManageApiKeys:j||k,canUseMonitorAdminTabs:j||k,...e,settings:{...a,requireLogin:!0},session:c}}async function r(){let a=await q();return a.authenticated?{access:a,response:null}:{access:a,response:e.NextResponse.json({error:"Authentication required"},{status:401})}}async function s(a={}){let{allowMonitorAdmin:b=!1}=a||{},{access:c,response:d}=await r();return d?{access:c,response:d}:c.isAdmin||b&&c.isMonitorAdmin?{access:c,response:null}:{access:c,response:e.NextResponse.json({error:"Admin access required"},{status:403})}}function t(a,b){if(!a?.authenticated||!b)return!1;if(p(a))return!0;let c=i(a.userId),d=i(b.ownerUser),e=i(b.createdByUser);return!!c&&(d===c||e===c)}},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19771:a=>{a.exports=require("process")},21820:a=>{a.exports=require("os")},27910:a=>{a.exports=require("stream")},28354:a=>{a.exports=require("util")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33792:(a,b,c)=>{c.d(b,{Dc:()=>p,OZ:()=>s,YK:()=>n,dY:()=>q,tm:()=>r});var d=c(86935),e=c(69614),f=c(73024),g=c.n(f),h=c(76760),i=c.n(h),j=c(77598),k=c.n(j),l=c(49120);let m=new TextEncoder().encode(function(){if(process.env.JWT_SECRET)return process.env.JWT_SECRET;let a=i().join(l.DATA_DIR,"jwt-secret");try{return g().readFileSync(a,"utf8").trim()}catch{}g().mkdirSync(l.DATA_DIR,{recursive:!0});let b=k().randomBytes(32).toString("hex");return g().writeFileSync(a,b,{mode:384}),b}());function n(a){let b="true"===process.env.AUTH_COOKIE_SECURE,c=a?.headers?.get?.("x-forwarded-proto");return b||"https"===c}async function o(a={}){return new d.P({authenticated:!0,...a}).setProtectedHeader({alg:"HS256"}).setIssuedAt().setExpirationTime("24h").sign(m)}async function p(a){if(!a)return!1;try{return await (0,e.V)(a,m),!0}catch{return!1}}async function q(a){if(!a)return null;try{let{payload:b}=await (0,e.V)(a,m);return b}catch{return null}}async function r(a,b,c={}){let d=await o(c);a.set("auth_token",d,{httpOnly:!0,secure:n(b),sameSite:"lax",path:"/"})}function s(a){a.delete("auth_token")}},33873:a=>{a.exports=require("path")},34631:a=>{a.exports=require("tls")},41204:a=>{a.exports=require("string_decoder")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},46293:a=>{a.exports=require("sql.js")},50122:(a,b,c)=>{c.d(b,{k:()=>e});let d=[];for(let a=0;a<256;++a)d.push((a+256).toString(16).slice(1));function e(a,b=0){return(d[a[b+0]]+d[a[b+1]]+d[a[b+2]]+d[a[b+3]]+"-"+d[a[b+4]]+d[a[b+5]]+"-"+d[a[b+6]]+d[a[b+7]]+"-"+d[a[b+8]]+d[a[b+9]]+"-"+d[a[b+10]]+d[a[b+11]]+d[a[b+12]]+d[a[b+13]]+d[a[b+14]]+d[a[b+15]]).toLowerCase()}},53053:a=>{a.exports=require("node:diagnostics_channel")},55511:a=>{a.exports=require("crypto")},61066:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>be,patchFetch:()=>bd,routeModule:()=>a9,serverHooks:()=>bc,workAsyncStorage:()=>ba,workUnitAsyncStorage:()=>bb});var d={};c.r(d),c.d(d,{GET:()=>a8,dynamic:()=>a6});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(23211),w=c(36366),x=c(644),y=c(45903),z=c(97242);let A=new Set;function B(a){return String(a||"").trim()}function C(a,b=0){let c=Number(a);return Number.isFinite(c)?c:b}async function D(){return(0,y.I6)(await (0,y.L7)())}async function E(a){let b=new(await Promise.resolve().then(c.bind(c,64939))).Client({host:a.host,port:Number(a.port||5432),database:a.database,user:a.username,password:a.password,ssl:!!a.ssl&&{rejectUnauthorized:!1}});return await b.connect(),{type:"postgres",query:async(a,c=[])=>(await b.query(a,c)).rows,queryOne:async(a,c=[])=>(await b.query(a,c)).rows[0]||null,async exec(a,c=[]){await b.query(a,c)},async close(){await b.end()}}}async function F(a){let b=await c.e(8491).then(c.t.bind(c,38491,19)),d=await b.createConnection({host:a.host,port:Number(a.port||3306),database:a.database,user:a.username,password:a.password,ssl:a.ssl?{}:void 0,dateStrings:!0,connectTimeout:3e3});return{type:"mysql",async query(a,b=[]){let[c]=await d.query(a,b);return c},async queryOne(a,b=[]){let[c]=await d.query(a,b);return c[0]||null},async exec(a,b=[]){await d.query(a,b)},async close(){await d.end()}}}async function G(a){if("postgres"===a.type)return E(a);if("mysql"===a.type)return F(a);throw Error(`Unsupported prompt log database type: ${a.type}`)}async function H(){await (0,z.DU)().catch(()=>null)}async function I(a){if(!a.enabled)return;let b=`${a.type}:${a.host||""}:${a.port||""}:${a.database||""}`;if(!A.has(b))try{await H(a),A.add(b)}catch(a){console.warn("[prompt-log-analytics] Unable to ensure indexes:",a?.message||a)}}async function J(a,b,c,d,e=50){let f=Math.max(1,Math.min(500,Number(e)||50));return await a.query(`SELECT ${c},
1
+ "use strict";(()=>{var a={};a.id=451,a.ids=[451],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},1932:a=>{a.exports=require("url")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},4573:a=>{a.exports=require("node:buffer")},9588:(a,b,c)=>{c.d(b,{I8:()=>j,Tv:()=>t,aV:()=>n,bz:()=>p,hH:()=>s,oW:()=>r,s0:()=>l,ub:()=>m,vZ:()=>o});var d=c(65573),e=c(23211),f=c(89718),g=c(33792),h=c(90389);function i(a){return String(a||"").trim().toLowerCase()}function j(a){return i(a)}function k(a={}){return[a.ldapUsername,a.ldapEmail,a.ldapName,a.oidcEmail,a.oidcName,a.localUsername,a.username,a.email].map(i).filter(Boolean)}function l(a={}){let b=k(a),c=b[0]||"local",d=a.ldapName||a.ldapEmail||a.oidcName||a.oidcEmail||a.localUsername||c;return{userId:c,displayName:d,loginMethod:a.oidc?"OIDC":a.ldap?"LDAP":"Local",candidates:b}}function m(a={},b={}){var c;if(!b?.authenticated)return!1;if(b.local||!b.ldap&&!b.oidc||b.role===h.hS.ADMIN||!0===b.ldapIsAdmin)return!0;let d=Array.isArray(c=a.ldapAllowedUsers)?c.map(i).filter(Boolean):String(c||"").split(/[,\n]/).map(i).filter(Boolean);return 0!==d.length&&k(b).some(a=>d.includes(a))}function n(a={},b={}){return!(!b?.authenticated||m(a,b))&&(b.role===h.hS.MONITOR_ADMIN||!0===b.ldapIsMonitorAdmin)}function o(a={},b={}){return b?.authenticated?m(a,b)?h.hS.ADMIN:n(a,b)?h.hS.MONITOR_ADMIN:h.hS.USER:h.hS.GUEST}function p(a={}){return!0===a.isAdmin||!0===a.isMonitorAdmin}async function q(){let a=await (0,f.mt)(),b=await (0,d.UL)(),c=await (0,g.dY)(b.get("auth_token")?.value);if(!c?.authenticated)return{authenticated:!1,isAdmin:!1,isMonitorAdmin:!1,role:h.hS.GUEST,userId:"",displayName:"Guest",loginMethod:"None",settings:{...a,requireLogin:!0},session:null};let e=l(c||{}),i=o(a,c||{}),j=i===h.hS.ADMIN,k=i===h.hS.MONITOR_ADMIN;return{authenticated:!0,isAdmin:j,isMonitorAdmin:k,role:i,canManageApiKeys:j||k,canUseMonitorAdminTabs:j||k,...e,settings:{...a,requireLogin:!0},session:c}}async function r(){let a=await q();return a.authenticated?{access:a,response:null}:{access:a,response:e.NextResponse.json({error:"Authentication required"},{status:401})}}async function s(a={}){let{allowMonitorAdmin:b=!1}=a||{},{access:c,response:d}=await r();return d?{access:c,response:d}:c.isAdmin||b&&c.isMonitorAdmin?{access:c,response:null}:{access:c,response:e.NextResponse.json({error:"Admin access required"},{status:403})}}function t(a,b){if(!a?.authenticated||!b)return!1;if(p(a))return!0;let c=i(a.userId),d=i(b.ownerUser),e=i(b.createdByUser);return!!c&&(d===c||e===c)}},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19771:a=>{a.exports=require("process")},21820:a=>{a.exports=require("os")},27910:a=>{a.exports=require("stream")},28354:a=>{a.exports=require("util")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33792:(a,b,c)=>{c.d(b,{Dc:()=>p,OZ:()=>s,YK:()=>n,dY:()=>q,tm:()=>r});var d=c(86935),e=c(69614),f=c(73024),g=c.n(f),h=c(76760),i=c.n(h),j=c(77598),k=c.n(j),l=c(49120);let m=new TextEncoder().encode(function(){if(process.env.JWT_SECRET)return process.env.JWT_SECRET;let a=i().join(l.DATA_DIR,"jwt-secret");try{return g().readFileSync(a,"utf8").trim()}catch{}g().mkdirSync(l.DATA_DIR,{recursive:!0});let b=k().randomBytes(32).toString("hex");return g().writeFileSync(a,b,{mode:384}),b}());function n(a){let b="true"===process.env.AUTH_COOKIE_SECURE,c=a?.headers?.get?.("x-forwarded-proto");return b||"https"===c}async function o(a={}){return new d.P({authenticated:!0,...a}).setProtectedHeader({alg:"HS256"}).setIssuedAt().setExpirationTime("24h").sign(m)}async function p(a){if(!a)return!1;try{return await (0,e.V)(a,m),!0}catch{return!1}}async function q(a){if(!a)return null;try{let{payload:b}=await (0,e.V)(a,m);return b}catch{return null}}async function r(a,b,c={}){let d=await o(c);a.set("auth_token",d,{httpOnly:!0,secure:n(b),sameSite:"lax",path:"/"})}function s(a){a.delete("auth_token")}},33873:a=>{a.exports=require("path")},34631:a=>{a.exports=require("tls")},41204:a=>{a.exports=require("string_decoder")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},46293:a=>{a.exports=require("sql.js")},50122:(a,b,c)=>{c.d(b,{k:()=>e});let d=[];for(let a=0;a<256;++a)d.push((a+256).toString(16).slice(1));function e(a,b=0){return(d[a[b+0]]+d[a[b+1]]+d[a[b+2]]+d[a[b+3]]+"-"+d[a[b+4]]+d[a[b+5]]+"-"+d[a[b+6]]+d[a[b+7]]+"-"+d[a[b+8]]+d[a[b+9]]+"-"+d[a[b+10]]+d[a[b+11]]+d[a[b+12]]+d[a[b+13]]+d[a[b+14]]+d[a[b+15]]).toLowerCase()}},53053:a=>{a.exports=require("node:diagnostics_channel")},55511:a=>{a.exports=require("crypto")},61066:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>a8,patchFetch:()=>a7,routeModule:()=>a3,serverHooks:()=>a6,workAsyncStorage:()=>a4,workUnitAsyncStorage:()=>a5});var d={};c.r(d),c.d(d,{GET:()=>a2,dynamic:()=>a0});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(23211),w=c(36366),x=c(644),y=c(45903),z=c(97242);let A=new Set;function B(a){return String(a||"").trim()}function C(a,b=0){let c=Number(a);return Number.isFinite(c)?c:b}async function D(){return(0,y.I6)(await (0,y.L7)())}async function E(a){let b=new(await Promise.resolve().then(c.bind(c,64939))).Client({host:a.host,port:Number(a.port||5432),database:a.database,user:a.username,password:a.password,ssl:!!a.ssl&&{rejectUnauthorized:!1}});return await b.connect(),{type:"postgres",query:async(a,c=[])=>(await b.query(a,c)).rows,queryOne:async(a,c=[])=>(await b.query(a,c)).rows[0]||null,async exec(a,c=[]){await b.query(a,c)},async close(){await b.end()}}}async function F(a){let b=await c.e(8491).then(c.t.bind(c,38491,19)),d=await b.createConnection({host:a.host,port:Number(a.port||3306),database:a.database,user:a.username,password:a.password,ssl:a.ssl?{}:void 0,dateStrings:!0,connectTimeout:3e3});return{type:"mysql",async query(a,b=[]){let[c]=await d.query(a,b);return c},async queryOne(a,b=[]){let[c]=await d.query(a,b);return c[0]||null},async exec(a,b=[]){await d.query(a,b)},async close(){await d.end()}}}async function G(a){if("postgres"===a.type)return E(a);if("mysql"===a.type)return F(a);throw Error(`Unsupported prompt log database type: ${a.type}`)}async function H(){await (0,z.DU)().catch(()=>null)}async function I(a){if(!a.enabled)return;let b=`${a.type}:${a.host||""}:${a.port||""}:${a.database||""}`;if(!A.has(b))try{await H(a),A.add(b)}catch(a){console.warn("[prompt-log-analytics] Unable to ensure indexes:",a?.message||a)}}async function J(a,b,c,d,e=50){let f=Math.max(1,Math.min(500,Number(e)||50));return await a.query(`SELECT ${c},
2
2
  COUNT(*) AS requests,
3
3
  SUM(CASE WHEN error_text IS NOT NULL AND error_text <> '' THEN 1
4
4
  WHEN status_code IS NOT NULL AND CONCAT('', status_code) NOT LIKE '2%' THEN 1
@@ -45,81 +45,40 @@
45
45
  COALESCE(SUM(CASE WHEN ${U} THEN COALESCE(promptTokens, 0) + COALESCE(completionTokens, 0) ELSE 0 END), 0) AS totalTokens,
46
46
  COALESCE(SUM(CASE WHEN ${U} THEN COALESCE(cost, 0) ELSE 0 END), 0) AS cost,
47
47
  MAX(timestamp) AS lastSeen
48
- `;function W(a){return String(a||"").trim()}function X(a){return W(a).toLowerCase()}function Y(a,b=0){let c=Number(a);return Number.isFinite(c)?c:b}let Z=process.env.DASHBOARD_TIME_ZONE||process.env.APP_TIMEZONE||"UTC",$=(()=>{try{return Intl.DateTimeFormat().resolvedOptions().timeZone||"UTC"}catch{return"UTC"}})(),_=`(
49
- SELECT
50
- id,
51
- timestamp,
52
- provider,
53
- model,
54
- connection_id AS connectionId,
55
- api_key_fingerprint AS apiKey,
56
- api_key_id AS apiKeyId,
57
- api_key_fingerprint AS apiKeyFingerprint,
58
- api_key_name AS apiKeyName,
59
- api_key_owner AS apiKeyOwner,
60
- endpoint,
61
- request_id AS requestId,
62
- session_id AS sessionId,
63
- client_ip AS clientIp,
64
- client_ip_normalized AS clientIpNormalized,
65
- client_host AS clientHost,
66
- client_user_agent AS clientUserAgent,
67
- source_tool AS sourceTool,
68
- source_tool_label AS sourceToolLabel,
69
- source_host AS sourceHost,
70
- latency_ms AS latencyMs,
71
- ttft_ms AS ttftMs,
72
- status_code AS statusCode,
73
- error_code AS errorCode,
74
- error_type AS errorType,
75
- error_message_short AS errorMessageShort,
76
- is_streaming AS isStreaming,
77
- is_combo AS isCombo,
78
- combo_name AS comboName,
79
- prompt_tokens AS promptTokens,
80
- completion_tokens AS completionTokens,
81
- total_tokens AS totalTokens,
82
- cached_tokens AS cachedTokens,
83
- reasoning_tokens AS reasoningTokens,
84
- cost,
85
- status,
86
- tokens_json AS tokens,
87
- meta_json AS meta
88
- FROM usage_events
89
- ) usageHistory`;function aa(a=new Date,b=Z){return new Intl.DateTimeFormat("en-CA",{timeZone:b,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hourCycle:"h23"}).formatToParts(a).reduce((a,b)=>("literal"!==b.type&&(a[b.type]=Number(b.value)),a),{})}function ab(a=new Date,b=Z){let c=aa(a,b);return Date.UTC(c.year,c.month-1,c.day,c.hour,c.minute,c.second||0)-a.getTime()}function ac({year:a,month:b,day:c,hour:d=0,minute:e=0,second:f=0,millisecond:g=0},h=Z){let i=new Date(Date.UTC(a,b-1,c,d,e,f,g)),j=new Date(i.getTime()-ab(i,h));return new Date(i.getTime()-ab(j,h))}function ad(a,b=Z){let c=W(a);if(!c)return null;if(/Z$|[+-]\d{2}:?\d{2}$/.test(c)){let a=new Date(c);return Number.isNaN(a.getTime())?null:a}let d=c.match(/^(\d{4})-(\d{2})-(\d{2})(?:[T ](\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,3}))?)?)?$/);if(d)return ac({year:Number(d[1]),month:Number(d[2]),day:Number(d[3]),hour:Number(d[4]||0),minute:Number(d[5]||0),second:Number(d[6]||0),millisecond:Number(String(d[7]||"0").padEnd(3,"0"))},b);let e=new Date(c);return Number.isNaN(e.getTime())?null:e}function ae(a){if(!a)return"";let b=a instanceof Date?a:new Date(a);if(Number.isNaN(b.getTime()))return"";let c=(a,b=2)=>String(a).padStart(b,"0");return`${b.getUTCFullYear()}-${c(b.getUTCMonth()+1)}-${c(b.getUTCDate())} ${c(b.getUTCHours())}:${c(b.getUTCMinutes())}:${c(b.getUTCSeconds())}.${c(b.getUTCMilliseconds(),3)}`}function af(a=new Date,b=Z){let c=aa(a,b);return ac({year:c.year,month:c.month,day:c.day},b)}function ag(a,b){let c=new Date(a);return c.setUTCDate(c.getUTCDate()+b),c}function ah(a=new Date,b=Z){let c={Sun:0,Mon:1,Tue:2,Wed:3,Thu:4,Fri:5,Sat:6}[new Intl.DateTimeFormat("en-US",{timeZone:b,weekday:"short"}).format(a)]??1;return ag(af(a,b),0===c?-6:1-c)}function ai(a=new Date,b=Z){let c=aa(a,b);return ac({year:c.year,month:c.month,day:1},b)}function aj(a={}){var b;return{...function(a={}){let b=P.has(a.period)?a.period:"24h",c=function(a){let b=W(a)||Z;try{return Intl.DateTimeFormat("en-US",{timeZone:b}).format(new Date),b}catch{return Z}}(a.timeZone),d=new Date,e=null,f=d;if("custom"===b){let b=ad(a.dateFrom,c),g=ad(a.dateTo,c);e=b||new Date(d.getTime()-864e5),f=g||d}else if("today"===b)e=af(d,c);else if("yesterday"===b){let a=af(d,c);e=ag(a,-1),f=a}else if("24h"===b)e=new Date(d.getTime()-864e5);else if("thisWeek"===b)e=ah(d,c);else if("lastWeek"===b){let a=ah(d,c);e=ag(a,-7),f=a}else if("7d"===b)e=new Date(d.getTime()-6048e5);else if("thisMonth"===b)e=ai(d,c);else if("lastMonth"===b){let a=ai(d,c);e=function(a,b=Z){let c=aa(a,b);return ac({year:c.year,month:c.month+-1,day:c.day},b)}(a,c),f=a}else e="30d"===b?new Date(d.getTime()-2592e6):"60d"===b?new Date(d.getTime()-5184e6):null;if(e&&f&&e>f){let a=e;e=f,f=a}return{period:b,timeZone:c,serverTimeZone:$,start:e,end:f,startIso:e?e.toISOString():"",endIso:f?f.toISOString():"",startStored:e?ae(e):"",endStored:f?ae(f):""}}(a),provider:W(a.provider),model:W(a.model),connectionId:W(a.connectionId),status:W(a.status),endpoint:W(a.endpoint),apiKey:W(a.apiKey),clientIp:W(a.clientIp||a.sourceIp),sourceTool:W(a.sourceTool),sessionId:W(a.sessionId),keyword:W(a.keyword),maxPromptLogRows:Math.max(200,Math.min(1500,Math.floor(Y(a.maxPromptLogRows,1500)))),userOwnedOnly:!0===a.userOwnedOnly||"1"===a.userOwnedOnly||"true"===a.userOwnedOnly,ownerCandidates:Array.isArray(b=a.ownerCandidates)?[...new Set(b.map(a=>X(a)).filter(Boolean))]:[...new Set(String(b||"").split(/[,\s]+/).map(a=>X(a)).filter(Boolean))]}}function ak(a){let b,c=W(a);return c?(b=W(c))?b.length<=12?b:`${b.slice(0,8)}...${b.slice(-4)}`:"local-no-key":"local-no-key"}async function al(a){try{let b=await a.all("SELECT * FROM apiKeys ORDER BY createdAt DESC")||[],c=new Map,d=new Map,e=[];for(let a of b){let b=function(a={}){let b=W(a.key),c=ak(b);return{id:W(a.id),key:b,fingerprint:c,masked:c,name:W(a.name)||c,ownerUser:W(a.ownerUser||a.owner_user),createdByUser:W(a.createdByUser||a.created_by_user),machineId:W(a.machineId||a.machine_id),isActive:void 0===a.isActive||1===a.isActive||!0===a.isActive,createdAt:W(a.createdAt||a.created_at)}}(a);e.push(b),b.key&&c.set(b.key,b),d.set(b.fingerprint,b)}return{rows:b,all:e,byKey:c,byFingerprint:d}}catch{return{rows:[],all:[],byKey:new Map,byFingerprint:new Map}}}async function am(a){let b=new Map;try{for(let c of await a.all("SELECT id, provider, name, email, isActive FROM providerConnections")||[])b.set(c.id,{id:c.id,provider:c.provider||"",name:c.name||c.email||c.id,email:c.email||"",isActive:1===c.isActive||!0===c.isActive})}catch{}try{for(let c of await a.all("SELECT id, type, name FROM providerNodes")||[]){let a=W(c.id);if(!a)continue;let d=W(c.name)||a;b.set(a,{id:a,provider:a,type:W(c.type),name:d,isProviderNode:!0})}}catch{}return b}function an(a,b=new Map){let c=W(a);if(!c)return"unknown";let d=b.get(c);if(d?.name)return d.name;let e=[...b.values()].filter(a=>a.provider===c&&a.name&&a.name!==c);return 1===e.length?e[0].name:c}function ao(a){let b=Y(a.errors,0),c=Y(a.success,0),d=Y(a.pending,0),e=Y(a.requests,c+b),f=Y(a.promptTokens,0),g=Y(a.completionTokens,0),h=Y(a.totalTokens,f+g),i=c+b||e;return{...a,requests:e,success:c,errors:b,pending:d,totalTokens:h,errorRate:i?b/i:0,avgPromptTokens:e?f/e:0,avgCompletionTokens:e?g/e:0,avgTokens:e?h/e:0}}function ap(a,b=null,c={}){let d=[],e=[];if((a.startStored||a.startIso)&&(d.push("timestamp >= ?"),e.push(a.startStored||a.startIso)),(a.endStored||a.endIso)&&(d.push("timestamp < ?"),e.push(a.endStored||a.endIso)),a.provider&&"provider"!==c.skip&&(d.push("provider = ?"),e.push(a.provider)),a.model&&"model"!==c.skip&&(d.push("model = ?"),e.push(a.model)),a.connectionId&&"connectionId"!==c.skip&&(d.push("connectionId = ?"),e.push(a.connectionId)),a.status&&"status"!==c.skip&&(d.push("status = ?"),e.push(a.status)),a.endpoint&&"endpoint"!==c.skip&&(d.push("endpoint = ?"),e.push(a.endpoint)),b&&"apiKey"!==c.skip)if(b.noMatch)d.push("1 = 0");else{let a=[];if((b.keys||[]).length>0){let c=b.keys.map(()=>"?").join(", ");a.push(`(apiKey IN (${c}) OR apiKeyFingerprint IN (${c}) OR apiKeyId IN (${c}))`),e.push(...b.keys,...b.keys,...b.keys)}if(b.filter){a.push("(apiKeyFingerprint LIKE ? OR apiKeyName LIKE ? OR apiKeyOwner LIKE ? OR apiKeyId LIKE ?)");let c=`%${b.filter}%`;e.push(c,c,c,c)}b.includeLocal&&a.push("(apiKey IS NULL OR apiKey = '' OR apiKeyFingerprint = 'local-no-key')"),a.length&&d.push(`(${a.join(" OR ")})`)}let f=a.ownerScope;if(f?.enabled&&"apiKey"!==c.skip)if(f.noMatch)d.push("1 = 0");else{let a=[];if((f.identifiers||[]).length>0){let b=f.identifiers.map(()=>"?").join(", ");a.push(`(apiKey IN (${b}) OR apiKeyFingerprint IN (${b}) OR apiKeyId IN (${b}))`),e.push(...f.identifiers,...f.identifiers,...f.identifiers)}if((f.owners||[]).length>0){let b=f.owners.map(()=>"?").join(", ");a.push(`lower(COALESCE(apiKeyOwner, '')) IN (${b})`),e.push(...f.owners)}d.push(a.length?`(${a.join(" OR ")})`:"1 = 0")}if(a.clientIp&&"clientIp"!==c.skip&&(d.push("clientIpNormalized LIKE ?"),e.push(`%${a.clientIp}%`)),a.sourceTool&&"sourceTool"!==c.skip){d.push("(sourceTool LIKE ? OR sourceToolLabel LIKE ? OR sourceHost LIKE ?)");let b=`%${a.sourceTool}%`;e.push(b,b,b)}return a.sessionId&&"sessionId"!==c.skip&&(d.push("sessionId = ?"),e.push(a.sessionId)),{clause:d.length?`WHERE ${d.join(" AND ")}`:"",params:e}}function aq(a,b){return Math.floor(a/b)*b}async function ar(a,b,c){let d=ap(b,c);return await a.get(`SELECT MIN(timestamp) AS minTs, MAX(timestamp) AS maxTs FROM ${_} ${d.clause}`,d.params)||{}}async function as(a,b,c){let d=ap(b,c),e=await a.get(`SELECT
48
+ `;function W(a){return String(a||"").trim()}function X(a){return W(a).toLowerCase()}function Y(a,b=0){let c=Number(a);return Number.isFinite(c)?c:b}function Z(a){let b=W(a);if(!b)return"";let c=new Date(b);return Number.isNaN(c.getTime())?"":c.toISOString()}function $(a=new Date){let b=new Date(a);return b.setHours(0,0,0,0),b}function _(a,b){let c=new Date(a);return c.setDate(c.getDate()+b),c}function aa(a=new Date){let b=$(a),c=b.getDay();return _(b,0===c?-6:1-c)}function ab(a=new Date){let b=new Date(a);return b.setDate(1),b.setHours(0,0,0,0),b}function ac(a={}){var b;return{...function(a={}){let b=P.has(a.period)?a.period:"24h",c=new Date,d=null,e=c;if("custom"===b){let b=Z(a.dateFrom),f=Z(a.dateTo);d=new Date(b||c.getTime()-864e5),e=f?new Date(f):c}else if("today"===b)d=$(c);else if("yesterday"===b){let a=$(c);d=_(a,-1),e=a}else if("24h"===b)d=new Date(c.getTime()-864e5);else if("thisWeek"===b)d=aa(c);else if("lastWeek"===b){let a=aa(c);d=_(a,-7),e=a}else if("7d"===b)d=new Date(c.getTime()-6048e5);else if("thisMonth"===b)d=ab(c);else if("lastMonth"===b){let a=ab(c);(d=new Date(a)).setMonth(d.getMonth()-1),e=a}else d="30d"===b?new Date(c.getTime()-2592e6):"60d"===b?new Date(c.getTime()-5184e6):null;if(d&&e&&d>e){let a=d;d=e,e=a}return{period:b,start:d,end:e,startIso:d?d.toISOString():"",endIso:e?e.toISOString():""}}(a),provider:W(a.provider),model:W(a.model),connectionId:W(a.connectionId),status:W(a.status),endpoint:W(a.endpoint),apiKey:W(a.apiKey),clientIp:W(a.clientIp||a.sourceIp),sourceTool:W(a.sourceTool),sessionId:W(a.sessionId),keyword:W(a.keyword),maxPromptLogRows:Math.max(200,Math.min(1500,Math.floor(Y(a.maxPromptLogRows,1500)))),userOwnedOnly:!0===a.userOwnedOnly||"1"===a.userOwnedOnly||"true"===a.userOwnedOnly,ownerCandidates:Array.isArray(b=a.ownerCandidates)?[...new Set(b.map(a=>X(a)).filter(Boolean))]:[...new Set(String(b||"").split(/[,\s]+/).map(a=>X(a)).filter(Boolean))]}}function ad(a){let b,c=W(a);return c?(b=W(c))?b.length<=12?b:`${b.slice(0,8)}...${b.slice(-4)}`:"local-no-key":"local-no-key"}async function ae(a){try{let b=await a.all("SELECT * FROM apiKeys ORDER BY createdAt DESC")||[],c=new Map,d=new Map,e=[];for(let a of b){let b=function(a={}){let b=W(a.key),c=ad(b);return{id:W(a.id),key:b,fingerprint:c,masked:c,name:W(a.name)||c,ownerUser:W(a.ownerUser||a.owner_user),createdByUser:W(a.createdByUser||a.created_by_user),machineId:W(a.machineId||a.machine_id),isActive:void 0===a.isActive||1===a.isActive||!0===a.isActive,createdAt:W(a.createdAt||a.created_at)}}(a);e.push(b),b.key&&c.set(b.key,b),d.set(b.fingerprint,b)}return{rows:b,all:e,byKey:c,byFingerprint:d}}catch{return{rows:[],all:[],byKey:new Map,byFingerprint:new Map}}}async function af(a){let b=new Map;try{for(let c of await a.all("SELECT id, provider, name, email, isActive FROM providerConnections")||[])b.set(c.id,{id:c.id,provider:c.provider||"",name:c.name||c.email||c.id,email:c.email||"",isActive:1===c.isActive||!0===c.isActive})}catch{}try{for(let c of await a.all("SELECT id, type, name FROM providerNodes")||[]){let a=W(c.id);if(!a)continue;let d=W(c.name)||a;b.set(a,{id:a,provider:a,type:W(c.type),name:d,isProviderNode:!0})}}catch{}return b}function ag(a,b=new Map){let c=W(a);if(!c)return"unknown";let d=b.get(c);if(d?.name)return d.name;let e=[...b.values()].filter(a=>a.provider===c&&a.name&&a.name!==c);return 1===e.length?e[0].name:c}function ah(a){let b=Y(a.errors,0),c=Y(a.success,0),d=Y(a.pending,0),e=Y(a.requests,c+b),f=Y(a.promptTokens,0),g=Y(a.completionTokens,0),h=Y(a.totalTokens,f+g),i=c+b||e;return{...a,requests:e,success:c,errors:b,pending:d,totalTokens:h,errorRate:i?b/i:0,avgPromptTokens:e?f/e:0,avgCompletionTokens:e?g/e:0,avgTokens:e?h/e:0}}function ai(a,b=null,c={}){let d=[],e=[];if(a.startIso&&(d.push("timestamp >= ?"),e.push(a.startIso)),a.endIso&&(d.push("timestamp <= ?"),e.push(a.endIso)),a.provider&&"provider"!==c.skip&&(d.push("provider = ?"),e.push(a.provider)),a.model&&"model"!==c.skip&&(d.push("model = ?"),e.push(a.model)),a.connectionId&&"connectionId"!==c.skip&&(d.push("connectionId = ?"),e.push(a.connectionId)),a.status&&"status"!==c.skip&&(d.push("status = ?"),e.push(a.status)),a.endpoint&&"endpoint"!==c.skip&&(d.push("endpoint = ?"),e.push(a.endpoint)),b&&"apiKey"!==c.skip)if(b.noMatch)d.push("1 = 0");else{let a=[];if((b.keys||[]).length>0){let c=b.keys.map(()=>"?").join(", ");a.push(`(apiKey IN (${c}) OR apiKeyFingerprint IN (${c}) OR apiKeyId IN (${c}))`),e.push(...b.keys,...b.keys,...b.keys)}if(b.filter){a.push("(apiKeyFingerprint LIKE ? OR apiKeyName LIKE ? OR apiKeyOwner LIKE ? OR apiKeyId LIKE ?)");let c=`%${b.filter}%`;e.push(c,c,c,c)}b.includeLocal&&a.push("(apiKey IS NULL OR apiKey = '' OR apiKeyFingerprint = 'local-no-key')"),a.length&&d.push(`(${a.join(" OR ")})`)}let f=a.ownerScope;if(f?.enabled&&"apiKey"!==c.skip)if(f.noMatch)d.push("1 = 0");else{let a=[];if((f.identifiers||[]).length>0){let b=f.identifiers.map(()=>"?").join(", ");a.push(`(apiKey IN (${b}) OR apiKeyFingerprint IN (${b}) OR apiKeyId IN (${b}))`),e.push(...f.identifiers,...f.identifiers,...f.identifiers)}if((f.owners||[]).length>0){let b=f.owners.map(()=>"?").join(", ");a.push(`lower(COALESCE(apiKeyOwner, '')) IN (${b})`),e.push(...f.owners)}d.push(a.length?`(${a.join(" OR ")})`:"1 = 0")}if(a.clientIp&&"clientIp"!==c.skip&&(d.push("clientIpNormalized LIKE ?"),e.push(`%${a.clientIp}%`)),a.sourceTool&&"sourceTool"!==c.skip){d.push("(sourceTool LIKE ? OR sourceToolLabel LIKE ? OR sourceHost LIKE ?)");let b=`%${a.sourceTool}%`;e.push(b,b,b)}return a.sessionId&&"sessionId"!==c.skip&&(d.push("sessionId = ?"),e.push(a.sessionId)),{clause:d.length?`WHERE ${d.join(" AND ")}`:"",params:e}}function aj(a,b){return Math.floor(a/b)*b}async function ak(a,b,c){let d=ai(b,c);return await a.get(`SELECT MIN(timestamp) AS minTs, MAX(timestamp) AS maxTs FROM usageHistory ${d.clause}`,d.params)||{}}async function al(a,b,c){let d=ai(b,c),e=await a.get(`SELECT
90
49
  ${V},
91
50
  COUNT(DISTINCT COALESCE(NULLIF(apiKeyId, ''), NULLIF(apiKeyFingerprint, ''), NULLIF(apiKey, ''))) AS activeApiKeys,
92
51
  COUNT(DISTINCT NULLIF(provider, '')) AS activeProviders,
93
52
  COUNT(DISTINCT NULLIF(model, '')) AS activeModels,
94
53
  COUNT(DISTINCT NULLIF(endpoint, '')) AS activeEndpoints
95
- FROM ${_}
96
- ${d.clause}`,d.params)||{},f=function(a={}){return ao({requests:Y(a.requests,0),success:Y(a.success,0),errors:Y(a.errors,0),pending:Y(a.pending,0),promptTokens:Y(a.promptTokens,0),completionTokens:Y(a.completionTokens,0),totalTokens:Y(a.totalTokens,0),cachedTokens:Y(a.cachedTokens,0),reasoningTokens:Y(a.reasoningTokens,0),cost:Y(a.cost,0),lastSeen:a.lastSeen||""})}(e),g=b.start&&b.end?Math.max(1,(b.end.getTime()-b.start.getTime())/6e4):1;return{...f,activeApiKeys:Y(e.activeApiKeys,0),activeProviders:Y(e.activeProviders,0),activeModels:Y(e.activeModels,0),activeEndpoints:Y(e.activeEndpoints,0),requestsPerMinute:f.requests/g,tokensPerMinute:f.totalTokens/g,inputOutputRatio:f.completionTokens?f.promptTokens/f.completionTokens:f.promptTokens?null:0}}function at(a,b={}){return ao({key:W(a.key)||"unknown",label:W(a.label||a.key)||"unknown",requests:Y(a.requests,0),success:Y(a.success,0),errors:Y(a.errors,0),pending:Y(a.pending,0),promptTokens:Y(a.promptTokens,0),completionTokens:Y(a.completionTokens,0),totalTokens:Y(a.totalTokens,0),cachedTokens:0,reasoningTokens:0,cost:Y(a.cost,0),lastSeen:a.lastSeen||"",...b})}async function au(a,b,c,d,e,f=[],g=50,h="requests DESC, totalTokens DESC"){let i=ap(b,c);return await a.all(`SELECT
54
+ FROM usageHistory
55
+ ${d.clause}`,d.params)||{},f=function(a={}){return ah({requests:Y(a.requests,0),success:Y(a.success,0),errors:Y(a.errors,0),pending:Y(a.pending,0),promptTokens:Y(a.promptTokens,0),completionTokens:Y(a.completionTokens,0),totalTokens:Y(a.totalTokens,0),cachedTokens:Y(a.cachedTokens,0),reasoningTokens:Y(a.reasoningTokens,0),cost:Y(a.cost,0),lastSeen:a.lastSeen||""})}(e),g=b.start&&b.end?Math.max(1,(b.end.getTime()-b.start.getTime())/6e4):1;return{...f,activeApiKeys:Y(e.activeApiKeys,0),activeProviders:Y(e.activeProviders,0),activeModels:Y(e.activeModels,0),activeEndpoints:Y(e.activeEndpoints,0),requestsPerMinute:f.requests/g,tokensPerMinute:f.totalTokens/g,inputOutputRatio:f.completionTokens?f.promptTokens/f.completionTokens:f.promptTokens?null:0}}function am(a,b={}){return ah({key:W(a.key)||"unknown",label:W(a.label||a.key)||"unknown",requests:Y(a.requests,0),success:Y(a.success,0),errors:Y(a.errors,0),pending:Y(a.pending,0),promptTokens:Y(a.promptTokens,0),completionTokens:Y(a.completionTokens,0),totalTokens:Y(a.totalTokens,0),cachedTokens:0,reasoningTokens:0,cost:Y(a.cost,0),lastSeen:a.lastSeen||"",...b})}async function an(a,b,c,d,e,f=[],g=50,h="requests DESC, totalTokens DESC"){let i=ai(b,c);return await a.all(`SELECT
97
56
  ${d},
98
57
  ${V}
99
- FROM ${_}
58
+ FROM usageHistory
100
59
  ${i.clause}
101
60
  GROUP BY ${e}
102
61
  ORDER BY ${h}
103
- LIMIT ?`,[...f,...i.params,g])||[]}async function av(a,b,c,d,e=new Map){let f=ap(b,c),g=f.clause?`${f.clause} AND ${U}`:`WHERE ${U}`,h=`COALESCE(NULLIF(${d}, ''), 'unknown')`,i=await a.all(`SELECT
62
+ LIMIT ?`,[...f,...i.params,g])||[]}async function ao(a,b,c,d,e=new Map){let f=ai(b,c),g=f.clause?`${f.clause} AND ${U}`:`WHERE ${U}`,h=`COALESCE(NULLIF(${d}, ''), 'unknown')`,i=await a.all(`SELECT
104
63
  COALESCE(NULLIF(apiKeyId, ''), NULLIF(apiKeyFingerprint, ''), NULLIF(apiKey, ''), 'local-no-key') AS apiKeyGroupKey,
105
64
  ${h} AS itemKey,
106
65
  COUNT(*) AS requests,
107
66
  COALESCE(SUM(COALESCE(promptTokens, 0) + COALESCE(completionTokens, 0)), 0) AS totalTokens,
108
67
  MAX(timestamp) AS lastSeen
109
- FROM ${_}
68
+ FROM usageHistory
110
69
  ${g}
111
70
  GROUP BY COALESCE(NULLIF(apiKeyId, ''), NULLIF(apiKeyFingerprint, ''), NULLIF(apiKey, ''), 'local-no-key'), ${h}
112
- ORDER BY apiKeyGroupKey ASC, requests DESC, totalTokens DESC`,f.params)||[],j=new Map;for(let a of i){let b=W(a.itemKey)||"unknown",c="provider"===d?an(b,e):b;!function(a,b,c,d=3){if(!b||!c?.key)return;let e=a.get(b)||[];e.push(c),e.sort((a,b)=>b.requests-a.requests||b.totalTokens-a.totalTokens||String(a.label).localeCompare(String(b.label))),a.set(b,e.slice(0,d))}(j,a.apiKeyGroupKey,{key:b,label:c,requests:Y(a.requests,0),totalTokens:Y(a.totalTokens,0),lastSeen:a.lastSeen||""})}return j}async function aw(a,b,c,d,e){let f=await au(a,b,e,"COALESCE(NULLIF(provider, ''), 'unknown') AS key, COALESCE(NULLIF(provider, ''), 'unknown') AS label","COALESCE(NULLIF(provider, ''), 'unknown')"),g=await au(a,b,e,`
71
+ ORDER BY apiKeyGroupKey ASC, requests DESC, totalTokens DESC`,f.params)||[],j=new Map;for(let a of i){let b=W(a.itemKey)||"unknown",c="provider"===d?ag(b,e):b;!function(a,b,c,d=3){if(!b||!c?.key)return;let e=a.get(b)||[];e.push(c),e.sort((a,b)=>b.requests-a.requests||b.totalTokens-a.totalTokens||String(a.label).localeCompare(String(b.label))),a.set(b,e.slice(0,d))}(j,a.apiKeyGroupKey,{key:b,label:c,requests:Y(a.requests,0),totalTokens:Y(a.totalTokens,0),lastSeen:a.lastSeen||""})}return j}async function ap(a,b,c,d,e){let f=await an(a,b,e,"COALESCE(NULLIF(provider, ''), 'unknown') AS key, COALESCE(NULLIF(provider, ''), 'unknown') AS label","COALESCE(NULLIF(provider, ''), 'unknown')"),g=await an(a,b,e,`
113
72
  COALESCE(NULLIF(provider, ''), 'unknown') || '|' || COALESCE(NULLIF(model, ''), 'unknown') AS key,
114
73
  COALESCE(NULLIF(provider, ''), 'unknown') AS provider,
115
74
  COALESCE(NULLIF(model, ''), 'unknown') AS model,
116
75
  COALESCE(NULLIF(model, ''), 'unknown') || ' (' || COALESCE(NULLIF(provider, ''), 'unknown') || ')' AS label
117
- `,"COALESCE(NULLIF(provider, ''), 'unknown'), COALESCE(NULLIF(model, ''), 'unknown')"),h=await au(a,b,e,`
76
+ `,"COALESCE(NULLIF(provider, ''), 'unknown'), COALESCE(NULLIF(model, ''), 'unknown')"),h=await an(a,b,e,`
118
77
  COALESCE(NULLIF(connectionId, ''), 'unknown') AS key,
119
78
  COALESCE(NULLIF(connectionId, ''), 'unknown') AS connectionId,
120
79
  COALESCE(NULLIF(provider, ''), 'unknown') AS provider,
121
80
  COALESCE(NULLIF(connectionId, ''), 'unknown') AS label
122
- `,"COALESCE(NULLIF(connectionId, ''), 'unknown')"),i=await au(a,b,e,"COALESCE(NULLIF(endpoint, ''), 'unknown') AS key, COALESCE(NULLIF(endpoint, ''), 'unknown') AS label","COALESCE(NULLIF(endpoint, ''), 'unknown')"),j=await au(a,b,e,"COALESCE(NULLIF(apiKeyId, ''), NULLIF(apiKeyFingerprint, ''), NULLIF(apiKey, ''), 'local-no-key') AS key, COALESCE(NULLIF(apiKeyFingerprint, ''), NULLIF(apiKey, ''), 'local-no-key') AS rawApiKey, COALESCE(NULLIF(apiKeyName, ''), '') AS apiKeyName, COALESCE(NULLIF(apiKeyOwner, ''), '') AS apiKeyOwner, COALESCE(NULLIF(apiKeyId, ''), '') AS apiKeyId","COALESCE(NULLIF(apiKeyId, ''), NULLIF(apiKeyFingerprint, ''), NULLIF(apiKey, ''), 'local-no-key')"),k=await av(a,b,e,"model",d),l=await av(a,b,e,"provider",d),m=await av(a,b,e,"endpoint",d),n=await au(a,b,e,"COALESCE(NULLIF(status, ''), 'ok') AS key, COALESCE(NULLIF(status, ''), 'ok') AS label","COALESCE(NULLIF(status, ''), 'ok')"),o=ap(b,e),p=await a.all(`SELECT
81
+ `,"COALESCE(NULLIF(connectionId, ''), 'unknown')"),i=await an(a,b,e,"COALESCE(NULLIF(endpoint, ''), 'unknown') AS key, COALESCE(NULLIF(endpoint, ''), 'unknown') AS label","COALESCE(NULLIF(endpoint, ''), 'unknown')"),j=await an(a,b,e,"COALESCE(NULLIF(apiKeyId, ''), NULLIF(apiKeyFingerprint, ''), NULLIF(apiKey, ''), 'local-no-key') AS key, COALESCE(NULLIF(apiKeyFingerprint, ''), NULLIF(apiKey, ''), 'local-no-key') AS rawApiKey, COALESCE(NULLIF(apiKeyName, ''), '') AS apiKeyName, COALESCE(NULLIF(apiKeyOwner, ''), '') AS apiKeyOwner, COALESCE(NULLIF(apiKeyId, ''), '') AS apiKeyId","COALESCE(NULLIF(apiKeyId, ''), NULLIF(apiKeyFingerprint, ''), NULLIF(apiKey, ''), 'local-no-key')"),k=await ao(a,b,e,"model",d),l=await ao(a,b,e,"provider",d),m=await ao(a,b,e,"endpoint",d),n=await an(a,b,e,"COALESCE(NULLIF(status, ''), 'ok') AS key, COALESCE(NULLIF(status, ''), 'ok') AS label","COALESCE(NULLIF(status, ''), 'ok')"),o=ai(b,e),p=await a.all(`SELECT
123
82
  COALESCE(NULLIF(status, ''), 'error') AS status,
124
83
  COALESCE(NULLIF(provider, ''), 'unknown') AS provider,
125
84
  COALESCE(NULLIF(model, ''), 'unknown') AS model,
@@ -127,28 +86,28 @@
127
86
  COALESCE(NULLIF(apiKeyId, ''), NULLIF(apiKeyFingerprint, ''), NULLIF(apiKey, ''), 'local-no-key') AS rawApiKey,
128
87
  COALESCE(NULLIF(status, ''), 'error') || '|' || COALESCE(NULLIF(provider, ''), 'unknown') || '|' || COALESCE(NULLIF(model, ''), 'unknown') || '|' || COALESCE(NULLIF(endpoint, ''), 'unknown') AS key,
129
88
  ${V}
130
- FROM ${_}
89
+ FROM usageHistory
131
90
  ${o.clause?`${o.clause} AND NOT ${S} AND NOT ${T}`:`WHERE NOT ${S} AND NOT ${T}`}
132
91
  GROUP BY COALESCE(NULLIF(status, ''), 'error'), COALESCE(NULLIF(provider, ''), 'unknown'), COALESCE(NULLIF(model, ''), 'unknown'), COALESCE(NULLIF(endpoint, ''), 'unknown'), COALESCE(NULLIF(apiKeyId, ''), NULLIF(apiKeyFingerprint, ''), NULLIF(apiKey, ''), 'local-no-key')
133
- ORDER BY lastSeen DESC, errors DESC, requests DESC
134
- LIMIT ?`,[...o.params,100])||[],q=f.map(a=>at(a,{label:an(a.key||a.label,d),provider:a.key||a.label||"unknown",topModels:[],topApiKeys:[]})),r=g.map(a=>at(a,{provider:a.provider||"",providerLabel:an(a.provider,d),model:a.model||"",label:`${a.model||"unknown"} (${an(a.provider,d)})`,topApiKeys:[]})),s=h.map(a=>{let b=d.get(a.connectionId);return at(a,{label:b?.name||a.connectionId||"unknown",provider:b?.provider||a.provider||"",providerLabel:an(b?.provider||a.provider,d),connectionId:a.connectionId||"",topModels:[]})}),t=i.map(a=>at(a)),u=j.map(a=>{let b="local-no-key"===a.rawApiKey?"":a.rawApiKey,d=c.byKey.get(b)||c.byFingerprint.get(b)||c.all.find(b=>b.id===a.apiKeyId||b.id===a.key),e=d?.fingerprint||ak(b),f=a.apiKeyName||d?.name||(b?e:"Local / kh\xf4ng d\xf9ng API key");return at(a,{key:a.apiKeyId||e,label:f,name:f,fingerprint:e,apiKeyId:a.apiKeyId||d?.id||"",ownerUser:a.apiKeyOwner||d?.ownerUser||"",createdByUser:d?.createdByUser||"",isActive:d?.isActive??null,topModels:k.get(a.key)||[],topProviders:l.get(a.key)||[],topEndpoints:m.get(a.key)||[]})});return{providers:q,models:r,providerAccounts:s,endpoints:t,apiKeys:u,statuses:n.map(a=>at(a)),errors:p.map(a=>{let b="local-no-key"===a.rawApiKey?"":a.rawApiKey,e=c.byKey.get(b)||c.byFingerprint.get(b)||c.all.find(a=>a.id===b);return at(a,{label:a.status||"error",status:a.status||"error",provider:a.provider||"unknown",providerLabel:an(a.provider,d),model:a.model||"unknown",endpoint:a.endpoint||"unknown",apiKey:e?.fingerprint||ak(b)})})}}async function ax(a,b,c,d={}){let e=function(a,b,c){let d=a.start?a.start.getTime():NaN,e=a.end?a.end.getTime():Date.now();if(!Number.isFinite(d)){let a=b?new Date(b).getTime():NaN,f=c?new Date(c).getTime():NaN;Number.isFinite(a)&&(d=a),Number.isFinite(f)&&(e=f)}Number.isFinite(d)||(d=e-864e5);let f=Math.max(1,e-d);return f<=216e5?3e5:f<=1296e5?36e5:f<=6912e5?216e5:f<=648e7?864e5:6048e5}(b,d.minTs,d.maxTs),f=Math.max(60,Math.floor(e/1e3)),g=b.start?b.start.getTime():new Date(d.minTs||Date.now()-864e5).getTime(),h=b.end?b.end.getTime():new Date(d.maxTs||Date.now()).getTime();Number.isFinite(g)||(g=Date.now()-864e5),Number.isFinite(h)||(h=Date.now());let i=Math.floor(((h=Math.max(g=aq(g,e),h))-g)/e)+1,j=f*(i>240?Math.ceil(i/240):1),k=1e3*j,l=ap(b,c),m=await a.all(`SELECT
92
+ ORDER BY errors DESC, requests DESC, lastSeen DESC
93
+ LIMIT ?`,[...o.params,100])||[],q=f.map(a=>am(a,{label:ag(a.key||a.label,d),provider:a.key||a.label||"unknown",topModels:[],topApiKeys:[]})),r=g.map(a=>am(a,{provider:a.provider||"",providerLabel:ag(a.provider,d),model:a.model||"",label:`${a.model||"unknown"} (${ag(a.provider,d)})`,topApiKeys:[]})),s=h.map(a=>{let b=d.get(a.connectionId);return am(a,{label:b?.name||a.connectionId||"unknown",provider:b?.provider||a.provider||"",providerLabel:ag(b?.provider||a.provider,d),connectionId:a.connectionId||"",topModels:[]})}),t=i.map(a=>am(a)),u=j.map(a=>{let b="local-no-key"===a.rawApiKey?"":a.rawApiKey,d=c.byKey.get(b)||c.byFingerprint.get(b)||c.all.find(b=>b.id===a.apiKeyId||b.id===a.key),e=d?.fingerprint||ad(b),f=a.apiKeyName||d?.name||(b?e:"Local / kh\xf4ng d\xf9ng API key");return am(a,{key:a.apiKeyId||e,label:f,name:f,fingerprint:e,apiKeyId:a.apiKeyId||d?.id||"",ownerUser:a.apiKeyOwner||d?.ownerUser||"",createdByUser:d?.createdByUser||"",isActive:d?.isActive??null,topModels:k.get(a.key)||[],topProviders:l.get(a.key)||[],topEndpoints:m.get(a.key)||[]})});return{providers:q,models:r,providerAccounts:s,endpoints:t,apiKeys:u,statuses:n.map(a=>am(a)),errors:p.map(a=>{let b="local-no-key"===a.rawApiKey?"":a.rawApiKey,e=c.byKey.get(b)||c.byFingerprint.get(b)||c.all.find(a=>a.id===b);return am(a,{label:a.status||"error",status:a.status||"error",provider:a.provider||"unknown",providerLabel:ag(a.provider,d),model:a.model||"unknown",endpoint:a.endpoint||"unknown",apiKey:e?.fingerprint||ad(b)})})}}async function aq(a,b,c,d={}){let e=function(a,b,c){let d=a.start?a.start.getTime():NaN,e=a.end?a.end.getTime():Date.now();if(!Number.isFinite(d)){let a=b?new Date(b).getTime():NaN,f=c?new Date(c).getTime():NaN;Number.isFinite(a)&&(d=a),Number.isFinite(f)&&(e=f)}Number.isFinite(d)||(d=e-864e5);let f=Math.max(1,e-d);return f<=216e5?3e5:f<=1296e5?36e5:f<=6912e5?216e5:f<=648e7?864e5:6048e5}(b,d.minTs,d.maxTs),f=Math.max(60,Math.floor(e/1e3)),g=b.start?b.start.getTime():new Date(d.minTs||Date.now()-864e5).getTime(),h=b.end?b.end.getTime():new Date(d.maxTs||Date.now()).getTime();Number.isFinite(g)||(g=Date.now()-864e5),Number.isFinite(h)||(h=Date.now());let i=Math.floor(((h=Math.max(g=aj(g,e),h))-g)/e)+1,j=f*(i>240?Math.ceil(i/240):1),k=1e3*j,l=ai(b,c),m=await a.all(`SELECT
135
94
  ((CAST(strftime('%s', timestamp) AS INTEGER) / ?) * ?) AS bucketSec,
136
95
  ${V}
137
- FROM ${_}
96
+ FROM usageHistory
138
97
  ${l.clause}
139
98
  GROUP BY bucketSec
140
99
  HAVING bucketSec IS NOT NULL
141
- ORDER BY bucketSec ASC`,[j,j,...l.params])||[],n=new Map;for(let a=aq(g,k);a<h;a+=k)n.set(a,{ts:a,label:new Date(a).toISOString(),requests:0,success:0,errors:0,pending:0,promptTokens:0,completionTokens:0,totalTokens:0,cost:0});for(let a of m){let b=1e3*Y(a.bucketSec,0);b&&n.set(b,{ts:b,label:new Date(b).toISOString(),requests:Y(a.requests,0),success:Y(a.success,0),errors:Y(a.errors,0),pending:Y(a.pending,0),promptTokens:Y(a.promptTokens,0),completionTokens:Y(a.completionTokens,0),totalTokens:Y(a.totalTokens,0),cost:Y(a.cost,0)})}return[...n.values()].sort((a,b)=>a.ts-b.ts)}function ay(a,b){if(!a.length)return null;let c=[...a].sort((a,b)=>a-b),d=Math.min(c.length-1,Math.max(0,Math.ceil(b/100*c.length)-1));return c[d]}async function az(a,b,c){try{let d=ap(b,c),e=d.clause?`${d.clause} AND`:"WHERE",f=[...d.params],g=await a.get(`SELECT COUNT(*) AS samples, AVG(latencyMs) AS avgMs
142
- FROM ${_}
100
+ ORDER BY bucketSec ASC`,[j,j,...l.params])||[],n=new Map;for(let a=aj(g,k);a<=h;a+=k)n.set(a,{ts:a,label:new Date(a).toISOString(),requests:0,success:0,errors:0,pending:0,promptTokens:0,completionTokens:0,totalTokens:0,cost:0});for(let a of m){let b=1e3*Y(a.bucketSec,0);b&&n.set(b,{ts:b,label:new Date(b).toISOString(),requests:Y(a.requests,0),success:Y(a.success,0),errors:Y(a.errors,0),pending:Y(a.pending,0),promptTokens:Y(a.promptTokens,0),completionTokens:Y(a.completionTokens,0),totalTokens:Y(a.totalTokens,0),cost:Y(a.cost,0)})}return[...n.values()].sort((a,b)=>a.ts-b.ts)}function ar(a,b){if(!a.length)return null;let c=[...a].sort((a,b)=>a-b),d=Math.min(c.length-1,Math.max(0,Math.ceil(b/100*c.length)-1));return c[d]}async function as(a,b,c){try{let d=ai(b,c),e=d.clause?`${d.clause} AND`:"WHERE",f=[...d.params],g=await a.get(`SELECT COUNT(*) AS samples, AVG(latencyMs) AS avgMs
101
+ FROM usageHistory
143
102
  ${e} latencyMs IS NOT NULL AND latencyMs > 0`,f)||{},h=Y(g.samples,0),i=async b=>{if(!h)return null;let c=Math.max(0,Math.min(h-1,Math.ceil(b/100*h)-1)),d=await a.get(`SELECT latencyMs
144
- FROM ${_}
103
+ FROM usageHistory
145
104
  ${e} latencyMs IS NOT NULL AND latencyMs > 0
146
105
  ORDER BY latencyMs ASC
147
- LIMIT 1 OFFSET ?`,[...f,c]);return d?Y(d.latencyMs,null):null};if(h>0)return{samples:h,avgMs:Y(g.avgMs,null),p50Ms:await i(50),p95Ms:await i(95),p99Ms:await i(99)}}catch{}let d=[];try{let c,e,f=(c=[],e=[],(b.startStored||b.startIso)&&(c.push("timestamp >= ?"),e.push(b.startStored||b.startIso)),(b.endStored||b.endIso)&&(c.push("timestamp < ?"),e.push(b.endStored||b.endIso)),b.provider&&(c.push("provider = ?"),e.push(b.provider)),b.model&&(c.push("model = ?"),e.push(b.model)),b.connectionId&&(c.push("connectionId = ?"),e.push(b.connectionId)),b.status&&(c.push("status = ?"),e.push(b.status)),{clause:c.length?`WHERE ${c.join(" AND ")}`:"",params:e});d=await a.all(`SELECT data FROM requestDetails ${f.clause} ORDER BY timestamp DESC LIMIT ?`,[...f.params,3e3])||[]}catch{d=[]}let e=[];for(let a of d){let b=function(a){let b=a?.latency||{};for(let c of[b.totalMs,b.total_ms,b.durationMs,b.duration_ms,b.elapsedMs,b.elapsed_ms,b.responseMs,b.response_ms,b.ms,b.total,a?.durationMs,a?.latencyMs]){let a=Number(c);if(Number.isFinite(a)&&a>=0)return a}return null}((0,x.q)(a.data,{})||{});Number.isFinite(b)&&e.push(b)}let f=e.reduce((a,b)=>a+b,0);return{samples:e.length,avgMs:e.length?f/e.length:null,p50Ms:ay(e,50),p95Ms:ay(e,95),p99Ms:ay(e,99)}}function aA(a,b,c={}){let d=ap(a,b,c),e=[U,S,"(COALESCE(promptTokens, 0) + COALESCE(completionTokens, 0)) > 0"];c.latencyOnly&&e.push("latencyMs IS NOT NULL AND latencyMs > 0"),c.ttftOnly&&e.push("ttftMs IS NOT NULL AND ttftMs > 0");let f=e.join(" AND ");return{clause:d.clause?`${d.clause} AND ${f}`:`WHERE ${f}`,params:d.params}}async function aB(a,b,c){try{let d=b.clause?`${b.clause} AND`:"WHERE",e=await a.get(`SELECT COUNT(*) AS samples FROM ${_} ${d} ${c}`,b.params)||{};return Y(e.samples,0)}catch{return 0}}async function aC(a,b,c,d,e,f){if(!f||!new Set(["latencyMs","ttftMs","promptTokens","completionTokens","totalTokens"]).has(c))return null;let g=Math.max(0,Math.min(f-1,Math.ceil(e/100*f)-1));try{let e=await a.get(`SELECT ${c} AS value
148
- FROM ${_}
149
- ${b.clause?`${b.clause} AND`:"WHERE"} ${d}
106
+ LIMIT 1 OFFSET ?`,[...f,c]);return d?Y(d.latencyMs,null):null};if(h>0)return{samples:h,avgMs:Y(g.avgMs,null),p50Ms:await i(50),p95Ms:await i(95),p99Ms:await i(99)}}catch{}let d=[];try{let c,e,f=(c=[],e=[],b.startIso&&(c.push("timestamp >= ?"),e.push(b.startIso)),b.endIso&&(c.push("timestamp <= ?"),e.push(b.endIso)),b.provider&&(c.push("provider = ?"),e.push(b.provider)),b.model&&(c.push("model = ?"),e.push(b.model)),b.connectionId&&(c.push("connectionId = ?"),e.push(b.connectionId)),b.status&&(c.push("status = ?"),e.push(b.status)),{clause:c.length?`WHERE ${c.join(" AND ")}`:"",params:e});d=await a.all(`SELECT data FROM requestDetails ${f.clause} ORDER BY timestamp DESC LIMIT ?`,[...f.params,3e3])||[]}catch{d=[]}let e=[];for(let a of d){let b=function(a){let b=a?.latency||{};for(let c of[b.totalMs,b.total_ms,b.durationMs,b.duration_ms,b.elapsedMs,b.elapsed_ms,b.responseMs,b.response_ms,b.ms,b.total,a?.durationMs,a?.latencyMs]){let a=Number(c);if(Number.isFinite(a)&&a>=0)return a}return null}((0,x.q)(a.data,{})||{});Number.isFinite(b)&&e.push(b)}let f=e.reduce((a,b)=>a+b,0);return{samples:e.length,avgMs:e.length?f/e.length:null,p50Ms:ar(e,50),p95Ms:ar(e,95),p99Ms:ar(e,99)}}function at(a,b,c={}){let d=ai(a,b,c),e=[U,S,"(COALESCE(promptTokens, 0) + COALESCE(completionTokens, 0)) > 0"];c.latencyOnly&&e.push("latencyMs IS NOT NULL AND latencyMs > 0"),c.ttftOnly&&e.push("ttftMs IS NOT NULL AND ttftMs > 0");let f=e.join(" AND ");return{clause:d.clause?`${d.clause} AND ${f}`:`WHERE ${f}`,params:d.params}}async function au(a,b,c){try{let d=await a.get(`SELECT COUNT(*) AS samples FROM usageHistory ${b.clause} AND ${c}`,b.params)||{};return Y(d.samples,0)}catch{return 0}}async function av(a,b,c,d,e,f){if(!f||!new Set(["latencyMs","ttftMs","promptTokens","completionTokens","totalTokens"]).has(c))return null;let g=Math.max(0,Math.min(f-1,Math.ceil(e/100*f)-1));try{let e=await a.get(`SELECT ${c} AS value
107
+ FROM usageHistory
108
+ ${b.clause} AND ${d}
150
109
  ORDER BY ${c} ASC
151
- LIMIT 1 OFFSET ?`,[...b.params,g]);return e?Y(e.value,null):null}catch{return null}}function aD({samples:a=0,p95LatencyMs:b=0,p95TtftMs:c=0,slowRequestRate:d=0,errorRate:e=0}={}){if(!a)return{level:"none",label:"Chưa c\xf3 mẫu",tone:"slate",score:null};if(a<10)return{level:"low_sample",label:"\xcdt mẫu",tone:"amber",score:null};let f=100;return(b>0&&(b>9e4?f-=35:b>45e3?f-=20:b>15e3&&(f-=8)),c>0&&(c>45e3?f-=30:c>2e4?f-=16:c>8e3&&(f-=6)),f-=Math.min(30,Math.round(100*d)),f-=Math.min(25,Math.round(100*e)),(f=Math.max(0,Math.min(100,f)))>=85)?{level:"fast",label:"Nhanh",tone:"green",score:f}:f>=70?{level:"ok",label:"Ổn",tone:"blue",score:f}:f>=50?{level:"slow",label:"Chậm",tone:"amber",score:f}:{level:"very_slow",label:"Rất chậm",tone:"red",score:f}}async function aE(a,b,c,d={}){let e=aA(b,c,{latencyOnly:!0}),f={};try{f=await a.get(`SELECT
110
+ LIMIT 1 OFFSET ?`,[...b.params,g]);return e?Y(e.value,null):null}catch{return null}}function aw({samples:a=0,p95LatencyMs:b=0,p95TtftMs:c=0,slowRequestRate:d=0,errorRate:e=0}={}){if(!a)return{level:"none",label:"Chưa c\xf3 mẫu",tone:"slate",score:null};if(a<10)return{level:"low_sample",label:"\xcdt mẫu",tone:"amber",score:null};let f=100;return(b>0&&(b>9e4?f-=35:b>45e3?f-=20:b>15e3&&(f-=8)),c>0&&(c>45e3?f-=30:c>2e4?f-=16:c>8e3&&(f-=6)),f-=Math.min(30,Math.round(100*d)),f-=Math.min(25,Math.round(100*e)),(f=Math.max(0,Math.min(100,f)))>=85)?{level:"fast",label:"Nhanh",tone:"green",score:f}:f>=70?{level:"ok",label:"Ổn",tone:"blue",score:f}:f>=50?{level:"slow",label:"Chậm",tone:"amber",score:f}:{level:"very_slow",label:"Rất chậm",tone:"red",score:f}}async function ax(a,b,c,d={}){let e=at(b,c,{latencyOnly:!0}),f={};try{f=await a.get(`SELECT
152
111
  COUNT(*) AS samples,
153
112
  AVG(latencyMs) AS avgLatencyMs,
154
113
  MIN(latencyMs) AS minLatencyMs,
@@ -174,8 +133,8 @@
174
133
  SUM(CASE WHEN promptTokens >= ? THEN 1 ELSE 0 END) AS longInputRequests,
175
134
  SUM(CASE WHEN promptTokens >= ? THEN 1 ELSE 0 END) AS hugeInputRequests,
176
135
  SUM(CASE WHEN promptTokens >= ? THEN 1 ELSE 0 END) AS extremeInputRequests
177
- FROM ${_}
178
- ${e.clause}`,[45e3,9e4,2e4,3e4,5e4,7e4,...e.params])||{}}catch{f={}}let g=Y(f.samples,0),h=await aB(a,e,"ttftMs IS NOT NULL AND ttftMs > 0"),i=await aB(a,e,"promptTokens IS NOT NULL AND promptTokens > 0"),j=await aB(a,e,"completionTokens IS NOT NULL AND completionTokens > 0"),k=await aC(a,e,"latencyMs","latencyMs IS NOT NULL AND latencyMs > 0",50,g),l=await aC(a,e,"latencyMs","latencyMs IS NOT NULL AND latencyMs > 0",95,g),m=await aC(a,e,"latencyMs","latencyMs IS NOT NULL AND latencyMs > 0",99,g),n=await aC(a,e,"ttftMs","ttftMs IS NOT NULL AND ttftMs > 0",50,h),o=await aC(a,e,"ttftMs","ttftMs IS NOT NULL AND ttftMs > 0",95,h),p=await aC(a,e,"ttftMs","ttftMs IS NOT NULL AND ttftMs > 0",99,h),q=await aC(a,e,"promptTokens","promptTokens IS NOT NULL AND promptTokens > 0",50,i),r=await aC(a,e,"promptTokens","promptTokens IS NOT NULL AND promptTokens > 0",95,i),s=await aC(a,e,"promptTokens","promptTokens IS NOT NULL AND promptTokens > 0",99,i),t=await aC(a,e,"completionTokens","completionTokens IS NOT NULL AND completionTokens > 0",95,j),u=Y(f.slowRequests,0),v=Y(f.verySlowRequests,0),w=Y(f.slowTtftRequests,0),x=Y(f.longInputRequests,0),y=Y(f.hugeInputRequests,0),z=Y(f.extremeInputRequests,0),A=Y(f.totalPromptTokens,0),B=Y(f.totalLatencyMs,0),C=Y(f.totalTtftMs,0),D=Y(f.promptTokensWithTtft,0),E=Y(f.completionTokensWithLatency,0),F=Y(f.latencyMsWithOutput,0),G=Y(f.completionTokensAfterTtft,0),H=Y(f.decodeMs,0),I=g?u/g:0,J=g?v/g:0,K=h?w/h:0,L=g?x/g:0,M=g?y/g:0,N=g?z/g:0,O=aD({samples:g,p95LatencyMs:Y(l,0),p95TtftMs:Y(o,0),slowRequestRate:I,errorRate:Y(d.errorRate,0)});return{samples:g,ttftSamples:h,inputSamples:i,outputSamples:j,label:O.label,level:O.level,tone:O.tone,score:O.score,thresholds:{slowLatencyMs:45e3,verySlowLatencyMs:9e4,slowTtftMs:2e4,longInputTokens:3e4,hugeInputTokens:5e4,extremeInputTokens:7e4},avgLatencyMs:Y(f.avgLatencyMs,null),minLatencyMs:Y(f.minLatencyMs,null),maxLatencyMs:Y(f.maxLatencyMs,null),p50LatencyMs:k,p95LatencyMs:l,p99LatencyMs:m,avgTtftMs:Y(f.avgTtftMs,null),maxTtftMs:Y(f.maxTtftMs,null),p50TtftMs:n,p95TtftMs:o,p99TtftMs:p,avgPromptTokens:Y(f.avgPromptTokens,0),maxPromptTokens:Y(f.maxPromptTokens,0),p50PromptTokens:q,p95PromptTokens:r,p99PromptTokens:s,avgCompletionTokens:Y(f.avgCompletionTokens,0),maxCompletionTokens:Y(f.maxCompletionTokens,0),p95CompletionTokens:t,slowRequests:u,verySlowRequests:v,slowTtftRequests:w,longInputRequests:x,hugeInputRequests:y,extremeInputRequests:z,slowRequestRate:I,verySlowRequestRate:J,slowTtftRate:K,longInputRate:L,hugeInputRate:M,extremeInputRate:N,approxInputTokensPerSecond:C>0?D/(C/1e3):null,outputTokensPerSecond:F>0?E/(F/1e3):null,decodeTokensPerSecond:H>0?G/(H/1e3):null,latencyMsPer10kInputTokens:A>0?B/(A/1e4):null}}async function aF(a,b,c,d=new Map){let e=aA(b,c,{latencyOnly:!0});try{return(await a.all(`WITH base AS (
136
+ FROM usageHistory
137
+ ${e.clause}`,[45e3,9e4,2e4,3e4,5e4,7e4,...e.params])||{}}catch{f={}}let g=Y(f.samples,0),h=await au(a,e,"ttftMs IS NOT NULL AND ttftMs > 0"),i=await au(a,e,"promptTokens IS NOT NULL AND promptTokens > 0"),j=await au(a,e,"completionTokens IS NOT NULL AND completionTokens > 0"),k=await av(a,e,"latencyMs","latencyMs IS NOT NULL AND latencyMs > 0",50,g),l=await av(a,e,"latencyMs","latencyMs IS NOT NULL AND latencyMs > 0",95,g),m=await av(a,e,"latencyMs","latencyMs IS NOT NULL AND latencyMs > 0",99,g),n=await av(a,e,"ttftMs","ttftMs IS NOT NULL AND ttftMs > 0",50,h),o=await av(a,e,"ttftMs","ttftMs IS NOT NULL AND ttftMs > 0",95,h),p=await av(a,e,"ttftMs","ttftMs IS NOT NULL AND ttftMs > 0",99,h),q=await av(a,e,"promptTokens","promptTokens IS NOT NULL AND promptTokens > 0",50,i),r=await av(a,e,"promptTokens","promptTokens IS NOT NULL AND promptTokens > 0",95,i),s=await av(a,e,"promptTokens","promptTokens IS NOT NULL AND promptTokens > 0",99,i),t=await av(a,e,"completionTokens","completionTokens IS NOT NULL AND completionTokens > 0",95,j),u=Y(f.slowRequests,0),v=Y(f.verySlowRequests,0),w=Y(f.slowTtftRequests,0),x=Y(f.longInputRequests,0),y=Y(f.hugeInputRequests,0),z=Y(f.extremeInputRequests,0),A=Y(f.totalPromptTokens,0),B=Y(f.totalLatencyMs,0),C=Y(f.totalTtftMs,0),D=Y(f.promptTokensWithTtft,0),E=Y(f.completionTokensWithLatency,0),F=Y(f.latencyMsWithOutput,0),G=Y(f.completionTokensAfterTtft,0),H=Y(f.decodeMs,0),I=g?u/g:0,J=g?v/g:0,K=h?w/h:0,L=g?x/g:0,M=g?y/g:0,N=g?z/g:0,O=aw({samples:g,p95LatencyMs:Y(l,0),p95TtftMs:Y(o,0),slowRequestRate:I,errorRate:Y(d.errorRate,0)});return{samples:g,ttftSamples:h,inputSamples:i,outputSamples:j,label:O.label,level:O.level,tone:O.tone,score:O.score,thresholds:{slowLatencyMs:45e3,verySlowLatencyMs:9e4,slowTtftMs:2e4,longInputTokens:3e4,hugeInputTokens:5e4,extremeInputTokens:7e4},avgLatencyMs:Y(f.avgLatencyMs,null),minLatencyMs:Y(f.minLatencyMs,null),maxLatencyMs:Y(f.maxLatencyMs,null),p50LatencyMs:k,p95LatencyMs:l,p99LatencyMs:m,avgTtftMs:Y(f.avgTtftMs,null),maxTtftMs:Y(f.maxTtftMs,null),p50TtftMs:n,p95TtftMs:o,p99TtftMs:p,avgPromptTokens:Y(f.avgPromptTokens,0),maxPromptTokens:Y(f.maxPromptTokens,0),p50PromptTokens:q,p95PromptTokens:r,p99PromptTokens:s,avgCompletionTokens:Y(f.avgCompletionTokens,0),maxCompletionTokens:Y(f.maxCompletionTokens,0),p95CompletionTokens:t,slowRequests:u,verySlowRequests:v,slowTtftRequests:w,longInputRequests:x,hugeInputRequests:y,extremeInputRequests:z,slowRequestRate:I,verySlowRequestRate:J,slowTtftRate:K,longInputRate:L,hugeInputRate:M,extremeInputRate:N,approxInputTokensPerSecond:C>0?D/(C/1e3):null,outputTokensPerSecond:F>0?E/(F/1e3):null,decodeTokensPerSecond:H>0?G/(H/1e3):null,latencyMsPer10kInputTokens:A>0?B/(A/1e4):null}}async function ay(a,b,c,d=new Map){let e=at(b,c,{latencyOnly:!0});try{return(await a.all(`WITH base AS (
179
138
  SELECT
180
139
  COALESCE(NULLIF(provider, ''), 'unknown') AS provider,
181
140
  COALESCE(NULLIF(model, ''), 'unknown') AS model,
@@ -183,7 +142,7 @@
183
142
  ttftMs,
184
143
  promptTokens,
185
144
  completionTokens
186
- FROM ${_}
145
+ FROM usageHistory
187
146
  ${e.clause}
188
147
  ), ranked AS (
189
148
  SELECT
@@ -223,38 +182,38 @@
223
182
  FROM ranked
224
183
  GROUP BY provider, model
225
184
  ORDER BY samples DESC, p95LatencyMs DESC
226
- LIMIT ?`,[...e.params,45e3,2e4,3e4,5e4,30])||[]).map(a=>{let b=Y(a.samples,0),c=b?Y(a.slowRequests,0)/b:0,e=b?Y(a.slowTtftRequests,0)/b:0,f=b?Y(a.longInputRequests,0)/b:0,g=b?Y(a.hugeInputRequests,0)/b:0,h=aD({samples:b,p95LatencyMs:Y(a.p95LatencyMs,0),p95TtftMs:Y(a.p95TtftMs,0),slowRequestRate:c});return{key:a.key,provider:a.provider,providerLabel:an(a.provider,d),model:a.model,label:`${a.model} (${an(a.provider,d)})`,samples:b,level:h.level,labelQuality:h.label,tone:h.tone,score:h.score,avgLatencyMs:Y(a.avgLatencyMs,null),p50LatencyMs:Y(a.p50LatencyMs,null),p95LatencyMs:Y(a.p95LatencyMs,null),maxLatencyMs:Y(a.maxLatencyMs,null),avgTtftMs:Y(a.avgTtftMs,null),p95TtftMs:Y(a.p95TtftMs,null),maxTtftMs:Y(a.maxTtftMs,null),avgPromptTokens:Y(a.avgPromptTokens,0),p95PromptTokens:Y(a.p95PromptTokensApprox,0),maxPromptTokens:Y(a.maxPromptTokens,0),avgCompletionTokens:Y(a.avgCompletionTokens,0),slowRequests:Y(a.slowRequests,0),slowRequestRate:c,slowTtftRate:e,longInputRate:f,hugeInputRate:g,outputTokensPerSecond:Y(a.totalLatencyMs,0)>0?Y(a.totalCompletionTokens,0)/(Y(a.totalLatencyMs,0)/1e3):null}})}catch(a){return console.error("[analytics] Failed to build model experience stats:",a?.message||a),[]}}async function aG(a,b,c,d,e){try{let f=aA(b,c,{latencyOnly:!0});return(await a.all(`SELECT id, timestamp, provider, model, connectionId, apiKey, apiKeyId, apiKeyFingerprint, apiKeyName, endpoint, clientIp, clientIpNormalized, sourceTool, sourceToolLabel, sessionId, latencyMs, ttftMs, statusCode, errorCode, errorType, promptTokens, completionTokens, cost, status, tokens
227
- FROM ${_}
185
+ LIMIT ?`,[...e.params,45e3,2e4,3e4,5e4,30])||[]).map(a=>{let b=Y(a.samples,0),c=b?Y(a.slowRequests,0)/b:0,e=b?Y(a.slowTtftRequests,0)/b:0,f=b?Y(a.longInputRequests,0)/b:0,g=b?Y(a.hugeInputRequests,0)/b:0,h=aw({samples:b,p95LatencyMs:Y(a.p95LatencyMs,0),p95TtftMs:Y(a.p95TtftMs,0),slowRequestRate:c});return{key:a.key,provider:a.provider,providerLabel:ag(a.provider,d),model:a.model,label:`${a.model} (${ag(a.provider,d)})`,samples:b,level:h.level,labelQuality:h.label,tone:h.tone,score:h.score,avgLatencyMs:Y(a.avgLatencyMs,null),p50LatencyMs:Y(a.p50LatencyMs,null),p95LatencyMs:Y(a.p95LatencyMs,null),maxLatencyMs:Y(a.maxLatencyMs,null),avgTtftMs:Y(a.avgTtftMs,null),p95TtftMs:Y(a.p95TtftMs,null),maxTtftMs:Y(a.maxTtftMs,null),avgPromptTokens:Y(a.avgPromptTokens,0),p95PromptTokens:Y(a.p95PromptTokensApprox,0),maxPromptTokens:Y(a.maxPromptTokens,0),avgCompletionTokens:Y(a.avgCompletionTokens,0),slowRequests:Y(a.slowRequests,0),slowRequestRate:c,slowTtftRate:e,longInputRate:f,hugeInputRate:g,outputTokensPerSecond:Y(a.totalLatencyMs,0)>0?Y(a.totalCompletionTokens,0)/(Y(a.totalLatencyMs,0)/1e3):null}})}catch(a){return console.error("[analytics] Failed to build model experience stats:",a?.message||a),[]}}async function az(a,b,c,d,e){try{let f=at(b,c,{latencyOnly:!0});return(await a.all(`SELECT id, timestamp, provider, model, connectionId, apiKey, apiKeyId, apiKeyFingerprint, apiKeyName, endpoint, clientIp, clientIpNormalized, sourceTool, sourceToolLabel, sessionId, latencyMs, ttftMs, statusCode, errorCode, errorType, promptTokens, completionTokens, cost, status, tokens
186
+ FROM usageHistory
228
187
  ${f.clause}
229
188
  ORDER BY latencyMs DESC
230
- LIMIT ?`,[...f.params,20])||[]).map(a=>aH(a,d,e))}catch{return[]}}function aH(a,b,c){let d=function(a={}){let b=(0,x.q)(a.tokens,{})||{},c=Y(a.promptTokens,0)||Y(b.prompt_tokens,0)||Y(b.input_tokens,0),d=Y(a.completionTokens,0)||Y(b.completion_tokens,0)||Y(b.output_tokens,0);return{promptTokens:c,completionTokens:d,totalTokens:c+d,cachedTokens:Y(b.cached_tokens,0)||Y(b.cache_read_input_tokens,0)||Y(b.prompt_tokens_details?.cached_tokens,0),reasoningTokens:Y(b.reasoning_tokens,0)||Y(b.completion_tokens_details?.reasoning_tokens,0)||Y(b.output_tokens_details?.reasoning_tokens,0)}}(a),e=b.get(a.apiKey)||b.get(a.apiKeyFingerprint)||null,f=c.get(a.connectionId)||null;return{id:a.id,timestamp:a.timestamp,provider:a.provider||"",providerLabel:an(a.provider,c),model:a.model||"",connectionId:a.connectionId||"",accountName:f?.name||a.connectionId||"",apiKeyName:a.apiKeyName||e?.name||(a.apiKeyFingerprint||a.apiKey?ak(a.apiKeyFingerprint||a.apiKey):"Local"),apiKeyFingerprint:a.apiKeyFingerprint||e?.fingerprint||ak(a.apiKey),apiKeyId:a.apiKeyId||e?.id||"",clientIp:a.clientIpNormalized||a.clientIp||"",sourceTool:a.sourceTool||a.sourceToolLabel||"",sessionId:a.sessionId||"",latencyMs:Y(a.latencyMs,0),ttftMs:Y(a.ttftMs,0),statusCode:a.statusCode||null,errorCode:a.errorCode||"",errorType:a.errorType||"",endpoint:a.endpoint||"",status:a.status||"ok",promptTokens:d.promptTokens,completionTokens:d.completionTokens,totalTokens:d.totalTokens,cachedTokens:d.cachedTokens,reasoningTokens:d.reasoningTokens,cost:Y(a.cost,0)}}async function aI(a,b,c,d,e){let f=ap(b,c);return(await a.all(`SELECT id, timestamp, provider, model, connectionId, apiKey, apiKeyId, apiKeyFingerprint, apiKeyName, endpoint, clientIp, clientIpNormalized, sourceTool, sourceToolLabel, sessionId, latencyMs, ttftMs, statusCode, errorCode, errorType, promptTokens, completionTokens, cost, status, tokens
231
- FROM ${_}
189
+ LIMIT ?`,[...f.params,20])||[]).map(a=>aA(a,d,e))}catch{return[]}}function aA(a,b,c){let d=function(a={}){let b=(0,x.q)(a.tokens,{})||{},c=Y(a.promptTokens,0)||Y(b.prompt_tokens,0)||Y(b.input_tokens,0),d=Y(a.completionTokens,0)||Y(b.completion_tokens,0)||Y(b.output_tokens,0);return{promptTokens:c,completionTokens:d,totalTokens:c+d,cachedTokens:Y(b.cached_tokens,0)||Y(b.cache_read_input_tokens,0)||Y(b.prompt_tokens_details?.cached_tokens,0),reasoningTokens:Y(b.reasoning_tokens,0)||Y(b.completion_tokens_details?.reasoning_tokens,0)||Y(b.output_tokens_details?.reasoning_tokens,0)}}(a),e=b.get(a.apiKey)||b.get(a.apiKeyFingerprint)||null,f=c.get(a.connectionId)||null;return{id:a.id,timestamp:a.timestamp,provider:a.provider||"",providerLabel:ag(a.provider,c),model:a.model||"",connectionId:a.connectionId||"",accountName:f?.name||a.connectionId||"",apiKeyName:a.apiKeyName||e?.name||(a.apiKeyFingerprint||a.apiKey?ad(a.apiKeyFingerprint||a.apiKey):"Local"),apiKeyFingerprint:a.apiKeyFingerprint||e?.fingerprint||ad(a.apiKey),apiKeyId:a.apiKeyId||e?.id||"",clientIp:a.clientIpNormalized||a.clientIp||"",sourceTool:a.sourceTool||a.sourceToolLabel||"",sessionId:a.sessionId||"",latencyMs:Y(a.latencyMs,0),ttftMs:Y(a.ttftMs,0),statusCode:a.statusCode||null,errorCode:a.errorCode||"",errorType:a.errorType||"",endpoint:a.endpoint||"",status:a.status||"ok",promptTokens:d.promptTokens,completionTokens:d.completionTokens,totalTokens:d.totalTokens,cachedTokens:d.cachedTokens,reasoningTokens:d.reasoningTokens,cost:Y(a.cost,0)}}async function aB(a,b,c,d,e){let f=ai(b,c);return(await a.all(`SELECT id, timestamp, provider, model, connectionId, apiKey, apiKeyId, apiKeyFingerprint, apiKeyName, endpoint, clientIp, clientIpNormalized, sourceTool, sourceToolLabel, sessionId, latencyMs, ttftMs, statusCode, errorCode, errorType, promptTokens, completionTokens, cost, status, tokens
190
+ FROM usageHistory
232
191
  ${f.clause}
233
192
  ORDER BY timestamp DESC
234
- LIMIT ?`,[...f.params,50])||[]).map(a=>aH(a,d,e))}async function aJ(a,b,c,d,e){let f=ap(b,c);return(await a.all(`SELECT id, timestamp, provider, model, connectionId, apiKey, apiKeyId, apiKeyFingerprint, apiKeyName, endpoint, clientIp, clientIpNormalized, sourceTool, sourceToolLabel, sessionId, latencyMs, ttftMs, statusCode, errorCode, errorType, promptTokens, completionTokens, cost, status, tokens
235
- FROM ${_}
193
+ LIMIT ?`,[...f.params,50])||[]).map(a=>aA(a,d,e))}async function aC(a,b,c,d,e){let f=ai(b,c);return(await a.all(`SELECT id, timestamp, provider, model, connectionId, apiKey, apiKeyId, apiKeyFingerprint, apiKeyName, endpoint, clientIp, clientIpNormalized, sourceTool, sourceToolLabel, sessionId, latencyMs, ttftMs, statusCode, errorCode, errorType, promptTokens, completionTokens, cost, status, tokens
194
+ FROM usageHistory
236
195
  ${f.clause}
237
196
  ORDER BY (COALESCE(promptTokens, 0) + COALESCE(completionTokens, 0)) DESC, timestamp DESC
238
- LIMIT ?`,[...f.params,20])||[]).map(a=>aH(a,d,e))}function aK(a,b,c=b){let d=function(a,b=a){let c=W(a);return c?{value:c,label:W(b)||c}:null}(b,c);return d&&(a.some(a=>a.value===d.value)||a.unshift(d)),a}function aL(a){return{...a,provider:"",model:"",connectionId:"",status:"",endpoint:"",apiKey:""}}async function aM(a,b,c,d=500){let e=ap(aL(b),null),f=e.clause?`${e.clause} AND`:"WHERE";return(await a.all(`SELECT DISTINCT ${c} AS value
239
- FROM ${_}
197
+ LIMIT ?`,[...f.params,20])||[]).map(a=>aA(a,d,e))}function aD(a,b,c=b){let d=function(a,b=a){let c=W(a);return c?{value:c,label:W(b)||c}:null}(b,c);return d&&(a.some(a=>a.value===d.value)||a.unshift(d)),a}function aE(a){return{...a,provider:"",model:"",connectionId:"",status:"",endpoint:"",apiKey:""}}async function aF(a,b,c,d=500){let e=ai(aE(b),null),f=e.clause?`${e.clause} AND`:"WHERE";return(await a.all(`SELECT DISTINCT ${c} AS value
198
+ FROM usageHistory
240
199
  ${f} ${c} IS NOT NULL AND ${c} <> ''
241
200
  ORDER BY ${c} ASC
242
- LIMIT ?`,[...e.params,d])||[]).map(a=>W(a.value)).filter(Boolean)}async function aN(a,b){let c=ap(aL(b),null),d=c.clause?`${c.clause} AND`:"WHERE";try{let b=await a.get(`SELECT 1 AS hasLocal
243
- FROM ${_}
201
+ LIMIT ?`,[...e.params,d])||[]).map(a=>W(a.value)).filter(Boolean)}async function aG(a,b){let c=ai(aE(b),null),d=c.clause?`${c.clause} AND`:"WHERE";try{let b=await a.get(`SELECT 1 AS hasLocal
202
+ FROM usageHistory
244
203
  ${d} (apiKey IS NULL OR apiKey = '')
245
- LIMIT 1`,c.params);return!!b?.hasLocal}catch{return!1}}async function aO(a,b,c,d){let e=await aM(a,b,"provider",500),f=await aM(a,b,"model",1e3),g=await aM(a,b,"endpoint",500),h=await aM(a,b,"status",200),i=(await aM(a,b,"connectionId",1e3)).map(a=>{let b=c.get(a),d=an(b?.provider||a,c),e=b?.name?`${b.name}${d&&d!==b.name?` \xb7 ${d}`:""}`:d||a;return{value:a,label:e}}),j=[];for(let c of(await aN(a,b)&&j.push({value:"local-no-key",label:"Local / kh\xf4ng d\xf9ng API key"}),(function(a={},b={}){let c=a.all||[],d=b.ownerScope;if(!d?.enabled)return c;if(d.noMatch)return[];let e=new Set((d.identifiers||[]).map(a=>W(a)).filter(Boolean)),f=new Set((d.ids||[]).map(a=>W(a)).filter(Boolean)),g=new Set((d.fingerprints||[]).map(a=>W(a)).filter(Boolean)),h=new Set((d.owners||[]).map(a=>X(a)).filter(Boolean));return c.filter(a=>!!a&&(a.key&&e.has(a.key)||a.id&&(e.has(a.id)||f.has(a.id))||a.fingerprint&&(e.has(a.fingerprint)||g.has(a.fingerprint))||a.ownerUser&&h.has(X(a.ownerUser))))})(d,b).slice(0,500)))j.push({value:c.fingerprint,label:`${c.name||c.fingerprint}${c.ownerUser?` \xb7 ${c.ownerUser}`:""}`});aK(i,b.connectionId,b.connectionId),aK(j,b.apiKey,b.apiKey);let k=e.map(a=>({value:a,label:an(a,c)})),l=f.map(a=>({value:a,label:a})),m=g.map(a=>({value:a,label:a})),n=h.map(a=>({value:a,label:a}));return aK(k,b.provider,b.provider),aK(l,b.model,b.model),aK(m,b.endpoint,b.endpoint),aK(n,b.status,b.status),{providers:k,models:l.map(a=>a.value),endpoints:m.map(a=>a.value),statuses:n.map(a=>a.value),connections:i,apiKeys:j,clientIps:[],sourceTools:[]}}async function aP(a,b,c,d,e,f,g=new Map){let h=await aO(a,b,g,e);return h.clientIps=(d.topClientIps||[]).map(a=>a.key).filter(Boolean),h.sourceTools=(d.topSourceTools||[]).map(a=>a.key).filter(Boolean),h}let aQ="COALESCE(NULLIF(apiKeyOwner, ''), NULLIF(apiKeyName, ''), NULLIF(apiKeyFingerprint, ''), NULLIF(apiKeyId, ''), NULLIF(clientIpNormalized, ''), 'local-no-key')",aR="COALESCE(NULLIF(apiKeyOwner, ''), NULLIF(apiKeyName, ''), NULLIF(apiKeyFingerprint, ''), NULLIF(clientIpNormalized, ''), 'Local / kh\xf4ng API key')",aS="COALESCE(NULLIF(clientIpNormalized, ''), NULLIF(clientIp, ''), 'unknown')";async function aT(a,b,c,d,e=new Map){if(!new Set(["model","provider","endpoint","clientIpNormalized","sourceTool"]).has(d))return new Map;let f=aA(b,c),g=`COALESCE(NULLIF(${d}, ''), 'unknown')`;try{let b=await a.all(`SELECT
246
- ${aQ} AS clientKey,
204
+ LIMIT 1`,c.params);return!!b?.hasLocal}catch{return!1}}async function aH(a,b,c,d){let e=await aF(a,b,"provider",500),f=await aF(a,b,"model",1e3),g=await aF(a,b,"endpoint",500),h=await aF(a,b,"status",200),i=(await aF(a,b,"connectionId",1e3)).map(a=>{let b=c.get(a),d=ag(b?.provider||a,c),e=b?.name?`${b.name}${d&&d!==b.name?` \xb7 ${d}`:""}`:d||a;return{value:a,label:e}}),j=[];for(let c of(await aG(a,b)&&j.push({value:"local-no-key",label:"Local / kh\xf4ng d\xf9ng API key"}),(function(a={},b={}){let c=a.all||[],d=b.ownerScope;if(!d?.enabled)return c;if(d.noMatch)return[];let e=new Set((d.identifiers||[]).map(a=>W(a)).filter(Boolean)),f=new Set((d.ids||[]).map(a=>W(a)).filter(Boolean)),g=new Set((d.fingerprints||[]).map(a=>W(a)).filter(Boolean)),h=new Set((d.owners||[]).map(a=>X(a)).filter(Boolean));return c.filter(a=>!!a&&(a.key&&e.has(a.key)||a.id&&(e.has(a.id)||f.has(a.id))||a.fingerprint&&(e.has(a.fingerprint)||g.has(a.fingerprint))||a.ownerUser&&h.has(X(a.ownerUser))))})(d,b).slice(0,500)))j.push({value:c.fingerprint,label:`${c.name||c.fingerprint}${c.ownerUser?` \xb7 ${c.ownerUser}`:""}`});aD(i,b.connectionId,b.connectionId),aD(j,b.apiKey,b.apiKey);let k=e.map(a=>({value:a,label:ag(a,c)})),l=f.map(a=>({value:a,label:a})),m=g.map(a=>({value:a,label:a})),n=h.map(a=>({value:a,label:a}));return aD(k,b.provider,b.provider),aD(l,b.model,b.model),aD(m,b.endpoint,b.endpoint),aD(n,b.status,b.status),{providers:k,models:l.map(a=>a.value),endpoints:m.map(a=>a.value),statuses:n.map(a=>a.value),connections:i,apiKeys:j,clientIps:[],sourceTools:[]}}async function aI(a,b,c,d,e,f,g=new Map){let h=await aH(a,b,g,e);return h.clientIps=(d.topClientIps||[]).map(a=>a.key).filter(Boolean),h.sourceTools=(d.topSourceTools||[]).map(a=>a.key).filter(Boolean),h}let aJ="COALESCE(NULLIF(apiKeyOwner, ''), NULLIF(apiKeyName, ''), NULLIF(apiKeyFingerprint, ''), NULLIF(apiKeyId, ''), NULLIF(clientIpNormalized, ''), 'local-no-key')",aK="COALESCE(NULLIF(apiKeyOwner, ''), NULLIF(apiKeyName, ''), NULLIF(apiKeyFingerprint, ''), NULLIF(clientIpNormalized, ''), 'Local / kh\xf4ng API key')",aL="COALESCE(NULLIF(clientIpNormalized, ''), NULLIF(clientIp, ''), 'unknown')";async function aM(a,b,c,d,e=new Map){if(!new Set(["model","provider","endpoint","clientIpNormalized","sourceTool"]).has(d))return new Map;let f=at(b,c),g=`COALESCE(NULLIF(${d}, ''), 'unknown')`;try{let b=await a.all(`SELECT
205
+ ${aJ} AS clientKey,
247
206
  ${g} AS itemKey,
248
207
  COUNT(*) AS requests,
249
208
  COALESCE(SUM(COALESCE(promptTokens, 0) + COALESCE(completionTokens, 0)), 0) AS totalTokens,
250
209
  MAX(timestamp) AS lastSeen
251
- FROM ${_}
210
+ FROM usageHistory
252
211
  ${f.clause}
253
- GROUP BY ${aQ}, ${g}
254
- ORDER BY clientKey ASC, requests DESC, totalTokens DESC`,f.params)||[],c=new Map;for(let a of b){let b=W(a.itemKey)||"unknown",f="provider"===d?an(b,e):b;!function(a,b,c,d=3){if(!b||!c?.key)return;let e=a.get(b)||[];e.push(c),e.sort((a,b)=>b.requests-a.requests||b.totalTokens-a.totalTokens||String(a.label).localeCompare(String(b.label))),a.set(b,e.slice(0,d))}(c,a.clientKey,{key:b,label:f,requests:Y(a.requests,0),totalTokens:Y(a.totalTokens,0),lastSeen:a.lastSeen||""})}return c}catch(a){return console.error("[analytics] Failed to build client top usage map:",a?.message||a),new Map}}function aU(a={},b={}){let c=Y(a.requests,0),d=Y(a.success,c),e=Y(a.errors,0),f=Y(a.promptTokens,0),g=Y(a.completionTokens,0),h=Y(a.totalTokens,f+g),i=Y(a.p95PromptTokens,0),j=Y(a.p95LatencyMs,null),k=c?e/c:0,l=c?Y(a.longInputRequests,0)/c:0,m=c?Y(a.hugeInputRequests,0)/c:0,n=c?Y(a.extremeInputRequests,0)/c:0,o=c?Y(a.slowRequests,0)/c:0,p=function({requests:a=0,p95PromptTokens:b=0,p95LatencyMs:c=0,longInputRate:d=0,errorRate:e=0}={}){return a?b>=7e4||d>=.5||c>=9e4?{level:"critical",label:"Rất nặng",tone:"red"}:b>=5e4||d>=.3||c>=45e3||e>=.2?{level:"high",label:"Nặng",tone:"amber"}:b>=3e4||d>=.1||e>=.05?{level:"medium",label:"Cần theo d\xf5i",tone:"blue"}:{level:"normal",label:"Ổn",tone:"green"}:{level:"none",label:"Chưa c\xf3 mẫu",tone:"slate"}}({requests:c,p95PromptTokens:i,p95LatencyMs:Y(j,0),longInputRate:l,errorRate:k});return{key:W(a.clientKey)||"unknown",label:W(a.clientLabel||a.clientKey)||"unknown",ownerUser:W(a.ownerUser),apiKeyName:W(a.apiKeyName),apiKeyFingerprint:W(a.apiKeyFingerprint),primaryClientIp:W(a.primaryClientIp),primarySourceTool:W(a.primarySourceTool),apiKeyCount:Y(a.apiKeyCount,0),sourceIpCount:Y(a.sourceIpCount,0),sourceToolCount:Y(a.sourceToolCount,0),sessionCount:Y(a.sessionCount,0),requests:c,success:d,errors:e,errorRate:k,promptTokens:f,completionTokens:g,totalTokens:h,cost:Y(a.cost,0),avgPromptTokens:c?f/c:0,avgCompletionTokens:c?g/c:0,avgTokens:c?h/c:0,p50PromptTokens:Y(a.p50PromptTokens,0),p95PromptTokens:i,maxPromptTokens:Y(a.maxPromptTokens,0),avgLatencyMs:Y(a.avgLatencyMs,null),p95LatencyMs:j,maxLatencyMs:Y(a.maxLatencyMs,null),avgTtftMs:Y(a.avgTtftMs,null),p95TtftMs:Y(a.p95TtftMs,null),longInputRequests:Y(a.longInputRequests,0),hugeInputRequests:Y(a.hugeInputRequests,0),extremeInputRequests:Y(a.extremeInputRequests,0),slowRequests:Y(a.slowRequests,0),slowTtftRequests:Y(a.slowTtftRequests,0),longInputRate:l,hugeInputRate:m,extremeInputRate:n,slowRequestRate:o,slowTtftRate:c?Y(a.slowTtftRequests,0)/c:0,outputTokensPerSecond:Y(a.totalLatencyMs,0)>0?g/(Y(a.totalLatencyMs,0)/1e3):null,level:p.level,pressureLabel:p.label,tone:p.tone,lastSeen:a.lastSeen||"",...b}}async function aV(a,b,c,{dimension:d="apiKey",order:e="tokens",limit:f=25}={}){let g=aA(b,c),h="sourceIp"===d;try{return(await a.all(`WITH base AS (
212
+ GROUP BY ${aJ}, ${g}
213
+ ORDER BY clientKey ASC, requests DESC, totalTokens DESC`,f.params)||[],c=new Map;for(let a of b){let b=W(a.itemKey)||"unknown",f="provider"===d?ag(b,e):b;!function(a,b,c,d=3){if(!b||!c?.key)return;let e=a.get(b)||[];e.push(c),e.sort((a,b)=>b.requests-a.requests||b.totalTokens-a.totalTokens||String(a.label).localeCompare(String(b.label))),a.set(b,e.slice(0,d))}(c,a.clientKey,{key:b,label:f,requests:Y(a.requests,0),totalTokens:Y(a.totalTokens,0),lastSeen:a.lastSeen||""})}return c}catch(a){return console.error("[analytics] Failed to build client top usage map:",a?.message||a),new Map}}function aN(a={},b={}){let c=Y(a.requests,0),d=Y(a.success,c),e=Y(a.errors,0),f=Y(a.promptTokens,0),g=Y(a.completionTokens,0),h=Y(a.totalTokens,f+g),i=Y(a.p95PromptTokens,0),j=Y(a.p95LatencyMs,null),k=c?e/c:0,l=c?Y(a.longInputRequests,0)/c:0,m=c?Y(a.hugeInputRequests,0)/c:0,n=c?Y(a.extremeInputRequests,0)/c:0,o=c?Y(a.slowRequests,0)/c:0,p=function({requests:a=0,p95PromptTokens:b=0,p95LatencyMs:c=0,longInputRate:d=0,errorRate:e=0}={}){return a?b>=7e4||d>=.5||c>=9e4?{level:"critical",label:"Rất nặng",tone:"red"}:b>=5e4||d>=.3||c>=45e3||e>=.2?{level:"high",label:"Nặng",tone:"amber"}:b>=3e4||d>=.1||e>=.05?{level:"medium",label:"Cần theo d\xf5i",tone:"blue"}:{level:"normal",label:"Ổn",tone:"green"}:{level:"none",label:"Chưa c\xf3 mẫu",tone:"slate"}}({requests:c,p95PromptTokens:i,p95LatencyMs:Y(j,0),longInputRate:l,errorRate:k});return{key:W(a.clientKey)||"unknown",label:W(a.clientLabel||a.clientKey)||"unknown",ownerUser:W(a.ownerUser),apiKeyName:W(a.apiKeyName),apiKeyFingerprint:W(a.apiKeyFingerprint),primaryClientIp:W(a.primaryClientIp),primarySourceTool:W(a.primarySourceTool),apiKeyCount:Y(a.apiKeyCount,0),sourceIpCount:Y(a.sourceIpCount,0),sourceToolCount:Y(a.sourceToolCount,0),sessionCount:Y(a.sessionCount,0),requests:c,success:d,errors:e,errorRate:k,promptTokens:f,completionTokens:g,totalTokens:h,cost:Y(a.cost,0),avgPromptTokens:c?f/c:0,avgCompletionTokens:c?g/c:0,avgTokens:c?h/c:0,p50PromptTokens:Y(a.p50PromptTokens,0),p95PromptTokens:i,maxPromptTokens:Y(a.maxPromptTokens,0),avgLatencyMs:Y(a.avgLatencyMs,null),p95LatencyMs:j,maxLatencyMs:Y(a.maxLatencyMs,null),avgTtftMs:Y(a.avgTtftMs,null),p95TtftMs:Y(a.p95TtftMs,null),longInputRequests:Y(a.longInputRequests,0),hugeInputRequests:Y(a.hugeInputRequests,0),extremeInputRequests:Y(a.extremeInputRequests,0),slowRequests:Y(a.slowRequests,0),slowTtftRequests:Y(a.slowTtftRequests,0),longInputRate:l,hugeInputRate:m,extremeInputRate:n,slowRequestRate:o,slowTtftRate:c?Y(a.slowTtftRequests,0)/c:0,outputTokensPerSecond:Y(a.totalLatencyMs,0)>0?g/(Y(a.totalLatencyMs,0)/1e3):null,level:p.level,pressureLabel:p.label,tone:p.tone,lastSeen:a.lastSeen||"",...b}}async function aO(a,b,c,{dimension:d="apiKey",order:e="tokens",limit:f=25}={}){let g=at(b,c),h="sourceIp"===d;try{return(await a.all(`WITH base AS (
255
214
  SELECT
256
- ${h?aS:"COALESCE(NULLIF(apiKeyId, ''), NULLIF(apiKeyFingerprint, ''), NULLIF(apiKey, ''), 'local-no-key')"} AS groupKey,
257
- ${h?aS:"COALESCE(NULLIF(apiKeyName, ''), NULLIF(apiKeyOwner, ''), NULLIF(apiKeyFingerprint, ''), 'Local / kh\xf4ng API key')"} AS groupLabel,
215
+ ${h?aL:"COALESCE(NULLIF(apiKeyId, ''), NULLIF(apiKeyFingerprint, ''), NULLIF(apiKey, ''), 'local-no-key')"} AS groupKey,
216
+ ${h?aL:"COALESCE(NULLIF(apiKeyName, ''), NULLIF(apiKeyOwner, ''), NULLIF(apiKeyFingerprint, ''), 'Local / kh\xf4ng API key')"} AS groupLabel,
258
217
  COALESCE(NULLIF(apiKeyId, ''), NULLIF(apiKeyFingerprint, ''), NULLIF(apiKey, ''), 'local-no-key') AS apiKeyStable,
259
218
  COALESCE(NULLIF(apiKeyName, ''), '') AS apiKeyName,
260
219
  COALESCE(NULLIF(apiKeyOwner, ''), '') AS apiKeyOwner,
@@ -268,7 +227,7 @@
268
227
  COALESCE(completionTokens, 0) AS completionTokens,
269
228
  COALESCE(promptTokens, 0) + COALESCE(completionTokens, 0) AS totalTokens,
270
229
  COALESCE(cost, 0) AS cost
271
- FROM ${_}
230
+ FROM usageHistory
272
231
  ${g.clause}
273
232
  ), ranked AS (
274
233
  SELECT
@@ -311,10 +270,10 @@
311
270
  GROUP BY groupKey
312
271
  HAVING groupKey <> 'unknown'
313
272
  ORDER BY ${"heavy"===e?"heavyRequests DESC, maxPromptTokens DESC, promptTokens DESC, totalTokens DESC, requests DESC":"totalTokens DESC, promptTokens DESC, requests DESC, maxPromptTokens DESC"}
314
- LIMIT ?`,[...g.params,3e4,5e4,7e4,3e4,3e4,f])||[]).map(a=>(function(a={},b={}){let c=Y(a.requests,0),d=Y(a.promptTokens,0),e=Y(a.completionTokens,0),f=Y(a.totalTokens,d+e);return{key:W(a.key||a.groupKey)||"unknown",label:W(a.label||a.groupLabel||a.key||a.groupKey)||"unknown",requests:c,promptTokens:d,completionTokens:e,totalTokens:f,cost:Y(a.cost,0),avgPromptTokens:c?d/c:0,avgCompletionTokens:c?e/c:0,avgTokens:c?f/c:0,p95PromptTokens:Y(a.p95PromptTokens,0),maxPromptTokens:Y(a.maxPromptTokens,0),p95TotalTokens:Y(a.p95TotalTokens,0),maxTotalTokens:Y(a.maxTotalTokens,0),longInputRequests:Y(a.longInputRequests,0),hugeInputRequests:Y(a.hugeInputRequests,0),extremeInputRequests:Y(a.extremeInputRequests,0),heavyRequests:Y(a.heavyRequests,0),longInputRate:c?Y(a.longInputRequests,0)/c:0,hugeInputRate:c?Y(a.hugeInputRequests,0)/c:0,extremeInputRate:c?Y(a.extremeInputRequests,0)/c:0,heavyRequestRate:c?Y(a.heavyRequests,0)/c:0,apiKeyCount:Y(a.apiKeyCount,0),sourceIpCount:Y(a.sourceIpCount,0),sourceToolCount:Y(a.sourceToolCount,0),modelCount:Y(a.modelCount,0),providerCount:Y(a.providerCount,0),lastSeen:a.lastSeen||"",...b}})(a,{apiKeyName:W(a.apiKeyName),apiKeyOwner:W(a.apiKeyOwner),apiKeyFingerprint:W(a.apiKeyFingerprint),primaryClientIp:W(a.primaryClientIp),primarySourceTool:W(a.primarySourceTool)}))}catch(a){return console.error(`[analytics] Failed to build top ${d} ${e} consumers:`,a?.message||a),[]}}async function aW(a,b,c){return await aV(a,b,c,{dimension:"apiKey",order:"tokens",limit:25})}async function aX(a,b,c){return await aV(a,b,c,{dimension:"sourceIp",order:"tokens",limit:25})}async function aY(a,b,c){return await aV(a,b,c,{dimension:"sourceIp",order:"heavy",limit:25})}async function aZ(a,b,c,d=new Map){let e=aA(b,c),f=await aT(a,b,c,"model",d),g=await aT(a,b,c,"provider",d),h=await aT(a,b,c,"endpoint",d),i=await aT(a,b,c,"clientIpNormalized",d),j=await aT(a,b,c,"sourceTool",d);try{return(await a.all(`WITH base AS (
273
+ LIMIT ?`,[...g.params,3e4,5e4,7e4,3e4,3e4,f])||[]).map(a=>(function(a={},b={}){let c=Y(a.requests,0),d=Y(a.promptTokens,0),e=Y(a.completionTokens,0),f=Y(a.totalTokens,d+e);return{key:W(a.key||a.groupKey)||"unknown",label:W(a.label||a.groupLabel||a.key||a.groupKey)||"unknown",requests:c,promptTokens:d,completionTokens:e,totalTokens:f,cost:Y(a.cost,0),avgPromptTokens:c?d/c:0,avgCompletionTokens:c?e/c:0,avgTokens:c?f/c:0,p95PromptTokens:Y(a.p95PromptTokens,0),maxPromptTokens:Y(a.maxPromptTokens,0),p95TotalTokens:Y(a.p95TotalTokens,0),maxTotalTokens:Y(a.maxTotalTokens,0),longInputRequests:Y(a.longInputRequests,0),hugeInputRequests:Y(a.hugeInputRequests,0),extremeInputRequests:Y(a.extremeInputRequests,0),heavyRequests:Y(a.heavyRequests,0),longInputRate:c?Y(a.longInputRequests,0)/c:0,hugeInputRate:c?Y(a.hugeInputRequests,0)/c:0,extremeInputRate:c?Y(a.extremeInputRequests,0)/c:0,heavyRequestRate:c?Y(a.heavyRequests,0)/c:0,apiKeyCount:Y(a.apiKeyCount,0),sourceIpCount:Y(a.sourceIpCount,0),sourceToolCount:Y(a.sourceToolCount,0),modelCount:Y(a.modelCount,0),providerCount:Y(a.providerCount,0),lastSeen:a.lastSeen||"",...b}})(a,{apiKeyName:W(a.apiKeyName),apiKeyOwner:W(a.apiKeyOwner),apiKeyFingerprint:W(a.apiKeyFingerprint),primaryClientIp:W(a.primaryClientIp),primarySourceTool:W(a.primarySourceTool)}))}catch(a){return console.error(`[analytics] Failed to build top ${d} ${e} consumers:`,a?.message||a),[]}}async function aP(a,b,c){return await aO(a,b,c,{dimension:"apiKey",order:"tokens",limit:25})}async function aQ(a,b,c){return await aO(a,b,c,{dimension:"sourceIp",order:"tokens",limit:25})}async function aR(a,b,c){return await aO(a,b,c,{dimension:"sourceIp",order:"heavy",limit:25})}async function aS(a,b,c,d=new Map){let e=at(b,c),f=await aM(a,b,c,"model",d),g=await aM(a,b,c,"provider",d),h=await aM(a,b,c,"endpoint",d),i=await aM(a,b,c,"clientIpNormalized",d),j=await aM(a,b,c,"sourceTool",d);try{return(await a.all(`WITH base AS (
315
274
  SELECT
316
- ${aQ} AS clientKey,
317
- ${aR} AS clientLabel,
275
+ ${aJ} AS clientKey,
276
+ ${aK} AS clientLabel,
318
277
  COALESCE(NULLIF(apiKeyOwner, ''), '') AS ownerUser,
319
278
  COALESCE(NULLIF(apiKeyName, ''), '') AS apiKeyName,
320
279
  COALESCE(NULLIF(apiKeyFingerprint, ''), '') AS apiKeyFingerprint,
@@ -329,7 +288,7 @@
329
288
  latencyMs,
330
289
  ttftMs,
331
290
  cost
332
- FROM ${_}
291
+ FROM usageHistory
333
292
  ${e.clause}
334
293
  ), ranked AS (
335
294
  SELECT
@@ -378,9 +337,9 @@
378
337
  FROM ranked
379
338
  GROUP BY clientKey
380
339
  ORDER BY promptTokens DESC, totalTokens DESC, requests DESC
381
- LIMIT ?`,[...e.params,3e4,5e4,7e4,45e3,2e4,25])||[]).map(a=>aU(a,{topModels:f.get(a.clientKey)||[],topProviders:g.get(a.clientKey)||[],topEndpoints:h.get(a.clientKey)||[],topIps:i.get(a.clientKey)||[],topTools:j.get(a.clientKey)||[]}))}catch(a){return console.error("[analytics] Failed to build top heavy users:",a?.message||a),[]}}async function a$(a,b,c){let d=ap(b,c);try{return(await a.all(`SELECT
382
- ${aQ} AS clientKey,
383
- ${aR} AS clientLabel,
340
+ LIMIT ?`,[...e.params,3e4,5e4,7e4,45e3,2e4,25])||[]).map(a=>aN(a,{topModels:f.get(a.clientKey)||[],topProviders:g.get(a.clientKey)||[],topEndpoints:h.get(a.clientKey)||[],topIps:i.get(a.clientKey)||[],topTools:j.get(a.clientKey)||[]}))}catch(a){return console.error("[analytics] Failed to build top heavy users:",a?.message||a),[]}}async function aT(a,b,c){let d=ai(b,c);try{return(await a.all(`SELECT
341
+ ${aJ} AS clientKey,
342
+ ${aK} AS clientLabel,
384
343
  COALESCE(NULLIF(apiKeyOwner, ''), '') AS ownerUser,
385
344
  COALESCE(NULLIF(apiKeyName, ''), '') AS apiKeyName,
386
345
  COALESCE(NULLIF(apiKeyFingerprint, ''), '') AS apiKeyFingerprint,
@@ -393,12 +352,12 @@
393
352
  SUM(CASE WHEN ${U} THEN COALESCE(completionTokens, 0) ELSE 0 END) AS completionTokens,
394
353
  SUM(CASE WHEN ${U} THEN COALESCE(promptTokens, 0) + COALESCE(completionTokens, 0) ELSE 0 END) AS totalTokens,
395
354
  MAX(timestamp) AS lastSeen
396
- FROM ${_}
355
+ FROM usageHistory
397
356
  ${d.clause}
398
- GROUP BY ${aQ}
357
+ GROUP BY ${aJ}
399
358
  HAVING errors > 0
400
359
  ORDER BY errors DESC, requests DESC
401
- LIMIT ?`,[...d.params,25])||[]).map(a=>aU(a))}catch(a){return console.error("[analytics] Failed to build problem clients:",a?.message||a),[]}}async function a_(a,b,c){let d=aA(b,c);try{let b=await a.all(`WITH base AS (
360
+ LIMIT ?`,[...d.params,25])||[]).map(a=>aN(a))}catch(a){return console.error("[analytics] Failed to build problem clients:",a?.message||a),[]}}async function aU(a,b,c){let d=at(b,c);try{let b=await a.all(`WITH base AS (
402
361
  SELECT
403
362
  CASE
404
363
  WHEN promptTokens < 2000 THEN 'lt2k'
@@ -429,7 +388,7 @@
429
388
  COALESCE(promptTokens, 0) + COALESCE(completionTokens, 0) AS totalTokens,
430
389
  latencyMs,
431
390
  ttftMs
432
- FROM ${_}
391
+ FROM usageHistory
433
392
  ${d.clause}
434
393
  ), ranked AS (
435
394
  SELECT
@@ -456,7 +415,7 @@
456
415
  MIN(CASE WHEN ttftMs > 0 AND ttftRank >= ((cnt * 95 + 99) / 100) THEN ttftMs END) AS p95TtftMs
457
416
  FROM ranked
458
417
  GROUP BY bucketKey, label, sortOrder
459
- ORDER BY sortOrder ASC`,d.params)||[],c=b.reduce((a,b)=>a+Y(b.requests,0),0);return b.map(a=>({key:a.key,label:a.label,requests:Y(a.requests,0),share:c?Y(a.requests,0)/c:0,promptTokens:Y(a.promptTokens,0),completionTokens:Y(a.completionTokens,0),totalTokens:Y(a.totalTokens,0),avgPromptTokens:Y(a.avgPromptTokens,0),maxPromptTokens:Y(a.maxPromptTokens,0),avgLatencyMs:Y(a.avgLatencyMs,null),p95LatencyMs:Y(a.p95LatencyMs,null),maxLatencyMs:Y(a.maxLatencyMs,null),avgTtftMs:Y(a.avgTtftMs,null),p95TtftMs:Y(a.p95TtftMs,null)}))}catch(a){return console.error("[analytics] Failed to build input size buckets:",a?.message||a),[]}}async function a0(a,b,c,d={},e=new Map){let f=await aZ(a,b,c,e),g=await a$(a,b,c),h=await aW(a,b,c),i=await aX(a,b,c),j=await aY(a,b,c),k=await a_(a,b,c),l=f[0]||null,m=h[0]||null,n=i[0]||null,o=j[0]||null,p=f.reduce((a,b)=>a+Y(b.totalTokens,0),0),q=Y(d.totalTokens,0),r=l&&q?Y(l.totalTokens,0)/q:0,s=m&&q?Y(m.totalTokens,0)/q:0,t=n&&q?Y(n.totalTokens,0)/q:0,u=k.filter(a=>["30k-50k","50k-70k",">=70k"].includes(a.label)).reduce((a,b)=>a+Y(b.share,0),0),v=k.find(a=>">=70k"===a.label)||null;return{summary:{trackedUsers:f.length,topUserLabel:l?.label||"-",topUserTokens:l?.totalTokens||0,topUserTokenShare:r,topUsersTokenShare:q?p/q:0,topApiKeyLabel:m?.label||"-",topApiKeyTokens:m?.totalTokens||0,topApiKeyTokenShare:s,topSourceIpLabel:n?.label||"-",topSourceIpTokens:n?.totalTokens||0,topSourceIpTokenShare:t,topSourceIpHeavyLabel:o?.label||"-",topSourceIpHeavyRequests:o?.heavyRequests||0,longInputBucketShare:u,extremeInputShare:v?.share||0,problemClients:g.length},topHeavyUsers:f,topProblemClients:g,topApiKeysByTokens:h,topSourceIpsByTokens:i,topSourceIpsByHeavyRequests:j,inputBuckets:k}}function a1(a){let b=String(a??"");return/[",\n\r]/.test(b)?`"${b.replace(/"/g,'""')}"`:b}async function a2(a,b=4){let c=[a].filter(Boolean),d=Math.max(0,Math.max(1,Math.min(6,Number(b)||4))-c.length);if(d<=0)return c;for(let a of(await Promise.all(Array.from({length:d},async()=>{try{return await (0,O.d9)()}catch(a){return console.warn("[dashboardAnalytics] Extra MySQL analytics connection unavailable:",a?.message||a),null}}))))a&&c.push(a);return c}async function a3(a=[]){let b=[...new Set((a||[]).filter(Boolean))];await Promise.all(b.map(a=>a?.close?.().catch(()=>{})))}async function a4(a={}){let b=JSON.stringify(aj(a)),c=(global._dashboardAnalyticsV2Cache||(global._dashboardAnalyticsV2Cache=new Map),global._dashboardAnalyticsV2Cache),d=c.get(b);if(d&&Date.now()-d.createdAt<15e3)return d.data;let e=aj(a),f=await (0,w.c)(),g=await (0,O.d9)().catch(a=>(console.error("[dashboardAnalytics] MySQL observability query adapter unavailable; SQLite fallback is disabled:",a?.message||a),null));if(!g)throw Error("MySQL observability is not configured or unavailable; SQLite analytics fallback is disabled.");let h=[g];try{h=await a2(g,1);let a=function(a,b=0){return Array.isArray(a)&&0!==a.length?a[Math.abs(b)%a.length]||a[0]:null}(h,0),d=await al(f),i=await am(f),j=e.userOwnedOnly?function(a=[],b={}){let c=[...new Set((a||[]).map(a=>X(a)).filter(Boolean))];if(0===c.length)return{enabled:!0,noMatch:!0,owners:[],identifiers:[],ids:[],fingerprints:[]};let d=new Set(c),e=new Set,f=new Set,g=new Set;for(let a of b.all||[]){let b=X(a.ownerUser);b&&d.has(b)&&(a.key&&e.add(a.key),a.id&&(e.add(a.id),f.add(a.id)),a.fingerprint&&(e.add(a.fingerprint),g.add(a.fingerprint)))}return{enabled:!0,noMatch:0===e.size,owners:c,identifiers:[...e],ids:[...f],fingerprints:[...g]}}(e.ownerCandidates,d):null,k=j?{...e,ownerScope:j}:e,l=function(a,b){let c=X(a);if(!c)return null;let d=[],e=!1;for(let a of(["local","local-no-key","no-key","khong-key","kh\xf4ng-key","kh\xf4ng d\xf9ng api key"].some(a=>a.includes(c)||c.includes(a))&&(e=!0),b.all||[]))[a.key,a.id,a.name,a.ownerUser,a.createdByUser,a.machineId,a.fingerprint,a.masked].some(a=>X(a).includes(c))&&a.key&&d.push(a.key);return a.length>=16&&!d.includes(a)&&d.push(a),{keys:[...new Set(d)],includeLocal:e,noMatch:0===d.length&&!e,filter:c}}(k.apiKey,d),m=await ar(a,k,l),n=await as(a,k,l),o=await aw(a,k,d,i,l),p=await az(a,k,l),q=k.userOwnedOnly?function(a="disabled"){return{disabled:!0,reason:a,missing:!1,total:0,sampled:0,dbInfo:{},models:[],stages:[],topClientIps:[],topSourceTools:[],topSessions:[],topStages:[],topModels:[],topAccounts:[],topStatuses:[]}}("user_owned_scope_no_api_key_columns"):await M({keyword:k.keyword,model:k.model,sourceTool:k.sourceTool,clientIp:k.clientIp,sessionId:k.sessionId,dateFrom:k.startStored||k.startIso,dateTo:k.endStored||k.endIso}),r=await (0,N.Wl)({keyword:k.keyword,provider:k.provider,model:k.model,connectionId:k.connectionId,endpoint:k.endpoint,apiKey:k.apiKey,apiKeyScope:j,status:k.status,sourceTool:k.sourceTool,clientIp:k.clientIp,sessionId:k.sessionId,dateFrom:k.startIso,dateTo:k.endIso}),s=r?.summary||{};n.rawErrorEvents=Y(r?.total,0),n.serverErrorEvents=Y(s.serverImpacting,0),n.gatewayErrorEvents=Y(s.gateway,0),n.upstreamErrorEvents=Y(s.upstream,0),n.clientErrorEvents=Y(s.client,0),n.rateLimitErrorEvents=Y(s.rateLimit,0),n.unknownErrorEvents=Y(s.unknown,0),n.serverErrorRate=n.requests?n.serverErrorEvents/n.requests:0,n.clientErrorRate=n.requests?n.clientErrorEvents/n.requests:0,n.rateLimitErrorRate=n.requests?n.rateLimitErrorEvents/n.requests:0,r?.topErrors?.length&&(o.errors=r.topErrors);let t=new Map([...d.byKey.entries(),...d.byFingerprint.entries()]),u=await aE(a,k,l,n),v=await a0(a,k,l,n,i),w=await ax(a,k,l,m),x=await aI(a,k,l,t,i),y=await aJ(a,k,l,t,i),z=await aF(a,k,l,i),A=await aG(a,k,l,t,i);u.byModel=z,u.slowestRequests=A,n.userExperienceScore=u.score,n.userExperienceLabel=u.label,n.slowRequestRate=u.slowRequestRate,n.longInputRate=u.longInputRate,n.topHeavyUser=v.summary?.topUserLabel||"",n.topHeavyUserTokenShare=v.summary?.topUserTokenShare||0,n.extremeInputShare=v.summary?.extremeInputShare||0;let B=await aP(a,k,o,q,d,l,i),C=function({overview:a,groups:b,promptLogStats:c,requestErrorStats:d,experience:e,clientRequests:f}){let g=[],h=d?.summary||{},i=Y(h.serverImpacting,0),j=Y(h.client,0),k=Y(h.rateLimit,0),l=Y(a.serverErrorRate,a.requests?i/a.requests:0),m=Y(a.clientErrorRate,a.requests?j/a.requests:0);a.requests>=10&&i>=3&&l>=.05?g.push({level:l>=.15?"danger":"warning",title:"Tỷ lệ lỗi server/provider cao",detail:`${i.toLocaleString("vi-VN")} lỗi server-impacting (${(100*l).toFixed(1)}% request) trong khoảng thời gian đang lọc. Ưu ti\xean kiểm tra upstream/provider, gateway, timeout v\xe0 5xx.`}):a.requests>=10&&a.errorRate>=.2&&m>=.1?g.push({level:"warning",title:"Nhiều lỗi do client/request",detail:`${j.toLocaleString("vi-VN")} lỗi được ph\xe2n loại l\xe0 client-side (${(100*m).toFixed(1)}% request): sai endpoint/model/auth/body/context. Kh\xf4ng n\xean t\xednh nh\xf3m n\xe0y như lỗi server.`}):a.requests>=10&&a.errorRate>=.2&&g.push({level:"warning",title:"Tỷ lệ lỗi tổng cao",detail:`Tổng lỗi usage l\xe0 ${(100*a.errorRate).toFixed(1)}%, nhưng lỗi server-impacting chỉ ${(100*l).toFixed(1)}%. Xem ph\xe2n loại client/server b\xean dưới trước khi kết luận provider hỏng.`}),k>=5&&a.requests>0&&k/a.requests>=.05&&g.push({level:"warning",title:"Rate limit / quota đ\xe1ng ch\xfa \xfd",detail:`${k.toLocaleString("vi-VN")} lỗi rate-limit/quota trong khoảng lọc. Kiểm tra policy API key, quota provider hoặc ph\xe2n tải model.`});let n=b.apiKeys?.[0];n&&a.totalTokens>0&&n.totalTokens/a.totalTokens>=.5&&g.push({level:"warning",title:"Một API key d\xf9ng phần lớn token",detail:`${n.name||n.fingerprint} đang d\xf9ng ${(n.totalTokens/a.totalTokens*100).toFixed(1)}% tổng token.`});let o=c?.topClientIps?.[0];o&&c.total>0&&o.requests/c.total>=.5&&o.requests>=20&&g.push({level:"warning",title:"Một IP chiếm phần lớn request prompt log",detail:`${o.label} chiếm ${(o.requests/c.total*100).toFixed(1)}% prompt logs trong to\xe0n bộ dữ liệu khớp bộ lọc.`});let p=d?.topServerErrors?.[0];return p&&p.requests>=5&&g.push({level:p.requests>=20?"danger":"warning",title:"Provider/Gateway c\xf3 lỗi cần xử l\xfd",detail:`${p.provider||p.errorSource||"unknown"}/${p.model||"unknown"} c\xf3 ${p.requests.toLocaleString("vi-VN")} lỗi ${p.errorType||p.status||"server-impacting"}.`}),e?.samples>=10&&Y(e.slowRequestRate,0)>=.2&&g.push({level:e.slowRequestRate>=.4?"danger":"warning",title:"Nhiều request phản hồi chậm",detail:`${(100*e.slowRequestRate).toFixed(1)}% request th\xe0nh c\xf4ng c\xf3 latency >= 45s. Kiểm tra request input d\xe0i, chờ slot/upstream queue v\xe0 tải model server.`}),e?.samples>=10&&Y(e.longInputRate,0)>=.3&&g.push({level:"warning",title:"Tỷ lệ request input d\xe0i cao",detail:`${(100*e.longInputRate).toFixed(1)}% request c\xf3 input >= 30k token. Với VS Code/agent, P95/P99 latency cao c\xf3 thể chủ yếu do prompt eval v\xe0 chờ slot, kh\xf4ng phải do output chậm.`}),f?.summary?.topUserTokenShare>=.35&&g.push({level:f.summary.topUserTokenShare>=.6?"danger":"warning",title:"Token usage tập trung v\xe0o một user/API key",detail:`${f.summary.topUserLabel||"Một client"} đang chiếm ${(100*f.summary.topUserTokenShare).toFixed(1)}% tổng token trong khoảng lọc. N\xean kiểm tra quota, workflow VS Code/agent v\xe0 request input d\xe0i của client n\xe0y.`}),f?.summary?.extremeInputShare>=.1&&g.push({level:f.summary.extremeInputShare>=.25?"danger":"warning",title:"Nhiều request cực d\xe0i >=70k token",detail:`${(100*f.summary.extremeInputShare).toFixed(1)}% request th\xe0nh c\xf4ng c\xf3 input >=70k token. Đ\xe2y l\xe0 nh\xf3m dễ k\xe9o TTFT/P95/P99 l\xean cao v\xe0 l\xe0m request nhỏ phải chờ slot.`}),g}({overview:n,groups:o,promptLogStats:q,requestErrorStats:r,experience:u,clientRequests:v}),D={generatedAt:new Date().toISOString(),analyticsVersion:"v3.10-request-errors-mysql-group-concat-separator",filters:{period:k.period,timeZone:k.timeZone,serverTimeZone:k.serverTimeZone,startIso:k.startIso,endIso:k.endIso,startStored:k.startStored,endStored:k.endStored,provider:k.provider,model:k.model,connectionId:k.connectionId,status:k.status,endpoint:k.endpoint,apiKey:k.apiKey,clientIp:k.clientIp,sourceTool:k.sourceTool,sessionId:k.sessionId,keyword:k.keyword,userOwnedOnly:k.userOwnedOnly},overview:n,latency:p,experience:u,clientRequests:v,timeSeries:w,groups:o,promptLogs:q,requestErrors:r,anomalies:C,recentUsage:x,heavyRequests:y,options:B,qualityNotes:[]};if(await a3(h),c.set(b,{createdAt:Date.now(),data:D}),c.size>100){for(let[a,b]of c)if(Date.now()-b.createdAt>15e3&&c.delete(a),c.size<=100)break}return D}catch(a){throw await a3(h),console.error("[dashboardAnalytics] MySQL observability query failed; SQLite fallback is disabled:",a?.message||a),a}}var a5=c(9588);let a6="force-dynamic",a7=["period","dateFrom","dateTo","provider","model","connectionId","status","endpoint","apiKey","clientIp","sourceIp","sourceTool","sessionId","keyword","maxPromptLogRows","timeZone"];async function a8(a){try{let{access:b,response:c}=await (0,a5.oW)();if(c)return c;let{searchParams:d}=new URL(a.url),e=function(a){let b={};for(let c of a7){let d=a.get(c);null!==d&&""!==String(d).trim()&&(b[c]=d)}return b}(d),f=b.isAdmin||b.isMonitorAdmin?e:{...e,userOwnedOnly:!0,ownerCandidates:[...new Set([...b.candidates||[],b.userId].map(a5.I8).filter(Boolean))]},g=await a4(f);if("csv"===d.get("format")){let a=(function(a){let b=[];for(let[c,d]of(b.push(["section","key","label","requests","success","errors","errorRate","inputTokens","outputTokens","totalTokens","cost","lastSeen"]),[["providers",a.groups.providers],["models",a.groups.models],["providerAccounts",a.groups.providerAccounts],["apiKeys",a.groups.apiKeys],["endpoints",a.groups.endpoints],["clientIps",a.promptLogs.topClientIps],["sourceTools",a.promptLogs.topSourceTools],["requestErrors",a.requestErrors?.topErrors||a.groups.errors],["modelExperience",a.experience?.byModel||[]],["clientHeavyUsers",a.clientRequests?.topHeavyUsers||[]],["clientTopApiKeysByTokens",a.clientRequests?.topApiKeysByTokens||[]],["clientTopSourceIpsByTokens",a.clientRequests?.topSourceIpsByTokens||[]],["clientTopSourceIpsByHeavyRequests",a.clientRequests?.topSourceIpsByHeavyRequests||[]],["clientProblemClients",a.clientRequests?.topProblemClients||[]],["inputBuckets",a.clientRequests?.inputBuckets||[]]]))for(let a of d||[])b.push([c,a.key||"",a.label||a.name||"",a.requests||0,a.success||0,a.errors||0,a.errorRate||0,a.promptTokens||0,a.completionTokens||0,a.totalTokens||0,a.cost||0,a.lastSeen||""]);return b})(g).map(a=>a.map(a1).join(",")).join("\n");return new Response(a,{status:200,headers:{"Content-Type":"text/csv; charset=utf-8","Content-Disposition":`attachment; filename="bluerouter-analytics-${new Date().toISOString().slice(0,10)}.csv"`,"Cache-Control":"no-store"}})}return v.NextResponse.json(g,{headers:{"Cache-Control":"no-store"}})}catch(a){return console.error("[analytics] Failed to build dashboard analytics:",a),v.NextResponse.json({error:a?.message||"Failed to build dashboard analytics"},{status:500})}}let a9=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/dashboard/analytics/route",pathname:"/api/dashboard/analytics",filename:"route",bundlePath:"app/api/dashboard/analytics/route"},distDir:".next-cli-build",relativeProjectDir:"",resolvedPagePath:"D:\\bluerouter\\src\\app\\api\\dashboard\\analytics\\route.js",nextConfigOutput:"standalone",userland:d,...{}}),{workAsyncStorage:ba,workUnitAsyncStorage:bb,serverHooks:bc}=a9;function bd(){return(0,g.patchFetch)({workAsyncStorage:ba,workUnitAsyncStorage:bb})}async function be(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),a9.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/dashboard/analytics/route";"/index"===d&&(d="/");let e=await a9.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:z,prerenderManifest:A,routerServerContext:B,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,resolvedPathname:E,clientReferenceManifest:F,serverActionsManifest:G}=e,H=(0,k.normalizeAppPath)(d),I=!!(A.dynamicRoutes[H]||A.routes[E]),J=async()=>((null==B?void 0:B.render404)?await B.render404(a,b,y,!1):b.end("This page could not be found"),null);if(I&&!z){let a=!!A.routes[E],b=A.dynamicRoutes[H];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await J();throw new t.NoFallbackError}}let K=null;!I||a9.isDev||z||(K="/index"===(K=E)?"/":K);let L=!0===a9.isDev||!I,M=I&&!L;G&&F&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:F,serverActionsManifest:G});let N=a.method||"GET",O=(0,i.getTracer)(),P=O.getActiveScopeSpan(),Q=!!(null==B?void 0:B.isWrappedByNextServer),R=!!(0,h.getRequestMeta)(a,"minimalMode"),S=(0,h.getRequestMeta)(a,"incrementalCache")||await a9.getIncrementalCache(a,x,A,R);null==S||S.resetRequestCache(),globalThis.__incrementalCache=S;let T={params:w,previewProps:A.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:L,incrementalCache:S,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>a9.onRequestError(a,b,d,e,B)},sharedContext:{buildId:g,deploymentId:v}},U=new l.NodeNextRequest(a),V=new l.NodeNextResponse(b),W=m.NextRequestAdapter.fromNodeNextRequest(U,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>a9.handle(W,T).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=O.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${N} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${N} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!R&&C&&D&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=T.renderOpts.fetchMetrics;let h=T.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=T.renderOpts.collectedTags;if(!I)return await (0,p.I)(U,V,d,T.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==T.renderOpts.collectedRevalidate&&!(T.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&T.renderOpts.collectedRevalidate,e=void 0===T.renderOpts.collectedExpire||T.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:T.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await a9.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),b}},k=await a9.handleResponse({req:a,nextConfig:x,cacheKey:K,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:R});if(!I)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});R||b.setHeader("x-nextjs-cache",C?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),z&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return R&&I||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(U,V,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};Q&&P?await h(P):(e=O.getActiveScopeSpan(),await O.withPropagatedContext(a.headers,()=>O.trace(n.BaseServerSpan.handleRequest,{spanName:`${N} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":N,"http.target":a.url}},h),void 0,!Q))}catch(b){if(b instanceof t.NoFallbackError||await a9.onRequestError(a,b,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),I)throw b;return await (0,p.I)(U,V,new Response(null,{status:500})),null}}},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},64939:a=>{a.exports=import("pg")},66136:a=>{a.exports=require("timers")},69614:(a,b,c)=>{c.d(b,{V:()=>p});var d=c(88888),e=c(91356),f=c(99129),g=c(73575),h=c(41570),i=c(19035),j=c(24762),k=c(80308),l=c(11980);async function m(a,b,c){if(!(0,i.Gv)(a))throw new f.Ye("Flattened JWS must be an object");if(void 0===a.protected&&void 0===a.header)throw new f.Ye('Flattened JWS must have either of the "protected" or "header" members');if(void 0!==a.protected&&"string"!=typeof a.protected)throw new f.Ye("JWS Protected Header incorrect type");if(void 0===a.payload)throw new f.Ye("JWS Payload missing");if("string"!=typeof a.signature)throw new f.Ye("JWS Signature missing or incorrect type");if(void 0!==a.header&&!(0,i.Gv)(a.header))throw new f.Ye("JWS Unprotected Header incorrect type");let m={};if(a.protected)try{let b=(0,d.D)(a.protected);m=JSON.parse(g.D0.decode(b))}catch{throw new f.Ye("JWS Protected Header is invalid")}if(!(0,i.fz)(m,a.header))throw new f.Ye("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");let n={...m,...a.header},o=(0,k.n)(f.Ye,new Map([["b64",!0]]),c?.crit,m,n),p=!0;if(o.has("b64")&&"boolean"!=typeof(p=m.b64))throw new f.Ye('The "b64" (base64url-encode payload) Header Parameter must be a boolean');let{alg:q}=n;if("string"!=typeof q||!q)throw new f.Ye('JWS "alg" (Algorithm) Header Parameter missing or invalid');let r=c&&function(a,b){if(void 0!==b&&(!Array.isArray(b)||b.some(a=>"string"!=typeof a)))throw TypeError(`"${a}" option must be an array of strings`);if(b)return new Set(b)}("algorithms",c.algorithms);if(r&&!r.has(q))throw new f.Rb('"alg" (Algorithm) Header Parameter value not allowed');if(p){if("string"!=typeof a.payload)throw new f.Ye("JWS Payload must be a string")}else if("string"!=typeof a.payload&&!(a.payload instanceof Uint8Array))throw new f.Ye("JWS Payload must be a string or an Uint8Array instance");let s=!1;"function"==typeof b&&(b=await b(m,a),s=!0),(0,j.y)(q,b,"verify");let t=(0,g.xW)(void 0!==a.protected?(0,g.lF)(a.protected):new Uint8Array,(0,g.lF)("."),"string"==typeof a.payload?p?(0,g.lF)(a.payload):g.Rd.encode(a.payload):a.payload),u=(0,h.h2)(a.signature,"signature",f.Ye),v=await (0,l.l)(b,q);if(!await (0,e.MX)(q,v,u,t))throw new f.h2;let w={payload:p?(0,h.h2)(a.payload,"payload",f.Ye):"string"==typeof a.payload?g.Rd.encode(a.payload):a.payload};return(void 0!==a.protected&&(w.protectedHeader=m),void 0!==a.header&&(w.unprotectedHeader=a.header),s)?{...w,key:v}:w}async function n(a,b,c){if(a instanceof Uint8Array&&(a=g.D0.decode(a)),"string"!=typeof a)throw new f.Ye("Compact JWS must be a string or Uint8Array");let{0:d,1:e,2:h,length:i}=a.split(".");if(3!==i)throw new f.Ye("Invalid Compact JWS");let j=await m({payload:e,protected:d,signature:h},b,c),k={payload:j.payload,protectedHeader:j.protectedHeader};return"function"==typeof b?{...k,key:j.key}:k}var o=c(17347);async function p(a,b,c){let d=await n(a,b,c);if(d.protectedHeader.crit?.includes("b64")&&!1===d.protectedHeader.b64)throw new f.Dp("JWTs MUST NOT use unencoded payload");let e={payload:(0,o.k6)(d.protectedHeader,d.payload,c),protectedHeader:d.protectedHeader};return"function"==typeof b?{...e,key:d.key}:e}},73024:a=>{a.exports=require("node:fs")},74075:a=>{a.exports=require("zlib")},76760:a=>{a.exports=require("node:path")},77598:a=>{a.exports=require("node:crypto")},79428:a=>{a.exports=require("buffer")},79868:a=>{a.exports=require("node:sqlite")},81787:a=>{a.exports=require("bun:sqlite")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87550:a=>{a.exports=require("better-sqlite3")},90389:(a,b,c)=>{c.d(b,{hS:()=>d});let d=Object.freeze({ADMIN:"admin",MONITOR_ADMIN:"monitor_admin",USER:"user",GUEST:"guest"});Object.freeze([{href:"/dashboard/endpoint",label:"Endpoint",icon:"api"},{href:"/dashboard/api-keys",label:"API Keys",icon:"vpn_key"},{href:"/dashboard/usage",label:"Usage",icon:"bar_chart"},{href:"/dashboard/analytics",label:"Analytics",icon:"monitoring"},{href:"/dashboard/quota",label:"Quota Tracker",icon:"data_usage"},{href:"/dashboard/prompt-logs",label:"Prompt Logs",icon:"manage_search"}]),Object.freeze(["/dashboard","/dashboard/endpoint","/dashboard/api-keys","/dashboard/usage","/dashboard/analytics","/dashboard/quota","/dashboard/prompt-logs"])},91645:a=>{a.exports=require("net")},94735:a=>{a.exports=require("events")},94755:(a,b,c)=>{c.d(b,{A:()=>i});var d=c(77598);let e={randomUUID:d.randomUUID},f=new Uint8Array(256),g=f.length;var h=c(50122);let i=function(a,b,c){if(e.randomUUID&&!b&&!a)return e.randomUUID();var i=a,j=c;let k=(i=i||{}).random??i.rng?.()??(g>f.length-16&&((0,d.randomFillSync)(f),g=0),f.slice(g,g+=16));if(k.length<16)throw Error("Random bytes length must be >= 16");if(k[6]=15&k[6]|64,k[8]=63&k[8]|128,b){if((j=j||0)<0||j+16>b.length)throw RangeError(`UUID byte range ${j}:${j+15} is out of buffer bounds`);for(let a=0;a<16;++a)b[j+a]=k[a];return b}return(0,h.k)(k)}},97242:(a,b,c)=>{c.d(b,{DU:()=>s,Ws:()=>t,_3:()=>v,nv:()=>u});var d=c(45903);let e=new Set;function f(a,b,c=null){let d=Number(a);if(!Number.isFinite(d)||d<0)return b;let e=Math.floor(d);return c?Math.min(e,c):e}function g(a){return String(a||"").trim()}async function h(){return(0,d.I6)(await (0,d.L7)())}async function i(a){let b=new(await Promise.resolve().then(c.bind(c,64939))).Client({host:a.host,port:Number(a.port||5432),database:a.database,user:a.username,password:a.password,ssl:!!a.ssl&&{rejectUnauthorized:!1}});return await b.connect(),{type:"postgres",query:async(a,c=[])=>(await b.query(a,c)).rows,queryOne:async(a,c=[])=>(await b.query(a,c)).rows[0]||null,async exec(a,c=[]){await b.query(a,c)},async close(){await b.end()}}}async function j(a){let b=await c.e(8491).then(c.t.bind(c,38491,19)),d=await b.createConnection({host:a.host,port:Number(a.port||3306),database:a.database,user:a.username,password:a.password,ssl:a.ssl?{}:void 0,dateStrings:!0,connectTimeout:3e3});return{type:"mysql",async query(a,b=[]){let[c]=await d.query(a,b);return c},async queryOne(a,b=[]){let[c]=await d.query(a,b);return c[0]||null},async exec(a,b=[]){await d.query(a,b)},async close(){await d.end()}}}async function k(a){if("postgres"===a.type)return i(a);if("mysql"===a.type)return j(a);throw Error(`Unsupported prompt log database type: ${a.type}`)}async function l(a,b){if(!b||b.full_request_json)return b;let c=function(a={}){return String(a.payload_hash||function(a){if(!a)return{};if("object"==typeof a)return a;try{return JSON.parse(a)}catch{return{}}}(a.meta_json).payloadHash||"").trim()}(b);if(!c)return b;try{let d=await a.queryOne("SELECT COUNT(1) AS count FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'prompt_log_payloads'");if(0===Number(d?.count||0))return b;let e=await a.queryOne("SELECT payload_json FROM prompt_log_payloads WHERE payload_hash = ?",[c]);if(!e)return b;let f=e.payload_json;return{...b,full_request_json:"string"==typeof f?f:JSON.stringify(f)}}catch{return b}}async function m(a){let b=await i(a);try{for(let a of["CREATE INDEX IF NOT EXISTS idx_prompt_logs_created_id ON prompt_logs (created_at DESC, id)","CREATE INDEX IF NOT EXISTS idx_prompt_logs_stage_created_at ON prompt_logs (stage, created_at DESC)","CREATE INDEX IF NOT EXISTS idx_prompt_logs_model_created_at ON prompt_logs (model, created_at DESC)","CREATE INDEX IF NOT EXISTS idx_prompt_logs_display_model_created_at ON prompt_logs (display_model, created_at DESC)","CREATE INDEX IF NOT EXISTS idx_prompt_logs_session_created_at ON prompt_logs (session_id, created_at DESC)","CREATE INDEX IF NOT EXISTS idx_prompt_logs_client_ip_created_at ON prompt_logs (client_ip, created_at DESC)","CREATE INDEX IF NOT EXISTS idx_prompt_logs_source_tool_created_at ON prompt_logs (source_tool, created_at DESC)","CREATE INDEX IF NOT EXISTS idx_prompt_logs_connection_created_at ON prompt_logs (connection_id, created_at DESC)","CREATE INDEX IF NOT EXISTS idx_prompt_logs_account_created_at ON prompt_logs (account_name, created_at DESC)","CREATE INDEX IF NOT EXISTS idx_prompt_logs_provider_created_at ON prompt_logs (provider, created_at DESC)","CREATE INDEX IF NOT EXISTS idx_prompt_logs_status_created_at ON prompt_logs (status_code, created_at DESC)","CREATE INDEX IF NOT EXISTS idx_prompt_logs_payload_hash ON prompt_logs (payload_hash)"])await b.exec(a)}finally{await b.close()}}async function n(a,b,c){let d=await a.queryOne("SELECT COUNT(1) AS count FROM INFORMATION_SCHEMA.STATISTICS WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'prompt_logs' AND INDEX_NAME = ?",[b]);0===Number(d?.count||0)&&await a.exec(c)}async function o(a){let b=await j(a);try{let a=await b.queryOne("SELECT COUNT(1) AS count FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'prompt_logs'");if(0===Number(a?.count||0))return;for(let[a,c]of[["idx_prompt_logs_created_id","CREATE INDEX idx_prompt_logs_created_id ON prompt_logs (created_at DESC, id)"],["idx_prompt_logs_stage_created_at","CREATE INDEX idx_prompt_logs_stage_created_at ON prompt_logs (stage, created_at DESC)"],["idx_prompt_logs_model_created_at","CREATE INDEX idx_prompt_logs_model_created_at ON prompt_logs (model, created_at DESC)"],["idx_prompt_logs_display_model_created_at","CREATE INDEX idx_prompt_logs_display_model_created_at ON prompt_logs (display_model, created_at DESC)"],["idx_prompt_logs_session_created_at","CREATE INDEX idx_prompt_logs_session_created_at ON prompt_logs (session_id, created_at DESC)"],["idx_prompt_logs_client_ip_created_at","CREATE INDEX idx_prompt_logs_client_ip_created_at ON prompt_logs (client_ip, created_at DESC)"],["idx_prompt_logs_source_tool_created_at","CREATE INDEX idx_prompt_logs_source_tool_created_at ON prompt_logs (source_tool, created_at DESC)"],["idx_prompt_logs_connection_created_at","CREATE INDEX idx_prompt_logs_connection_created_at ON prompt_logs (connection_id, created_at DESC)"],["idx_prompt_logs_account_created_at","CREATE INDEX idx_prompt_logs_account_created_at ON prompt_logs (account_name, created_at DESC)"],["idx_prompt_logs_provider_created_at","CREATE INDEX idx_prompt_logs_provider_created_at ON prompt_logs (provider, created_at DESC)"],["idx_prompt_logs_status_created_at","CREATE INDEX idx_prompt_logs_status_created_at ON prompt_logs (status_code, created_at DESC)"],["idx_prompt_logs_payload_hash","CREATE INDEX idx_prompt_logs_payload_hash ON prompt_logs (payload_hash)"]])await n(b,a,c)}finally{await b.close()}}async function p(a){if(!a.enabled)return;let b=`${a.type}:${a.host||""}:${a.port||""}:${a.database||""}`;if(!e.has(b))try{if("postgres"===a.type)await m(a);else if("mysql"===a.type)await o(a);else throw Error(`Unsupported prompt log database type: ${a.type}`);e.add(b)}catch(a){console.warn("[prompt-logs] Unable to ensure query indexes:",a.message)}}async function q(a){let b=await k(a);try{let c=(await b.query("SELECT DISTINCT COALESCE(NULLIF(display_model, ''), model) AS model FROM prompt_logs WHERE model IS NOT NULL AND model <> '' ORDER BY model LIMIT 300")).map(a=>a.model),d=(await b.query("SELECT DISTINCT stage FROM prompt_logs WHERE stage IS NOT NULL AND stage <> '' ORDER BY stage LIMIT 100")).map(a=>a.stage);return{models:c,stages:d,dbInfo:{type:a.type,host:a.host,database:a.database}}}finally{await b.close()}}async function r(a,b){let c=a.type,d=await k(a);try{let e=function(a,b){let c=[],d=[],e=a=>(d.push(a),"postgres"===b)?`$${d.length}`:"?",f="postgres"===b?"ILIKE":"LIKE";if(a.keyword){let b=`%${a.keyword}%`;c.push(`(${["prompt_text","response_text","error_text","model","endpoint","provider_url","provider","account_name","connection_id","display_model","session_id","client_ip","client_host","client_user_agent","source_tool","source_tool_label","source_host"].map(a=>`${a} ${f} ${e(b)}`).join(" OR ")})`)}if(a.model&&c.push(`(model = ${e(a.model)} OR display_model = ${e(a.model)})`),a.stage&&c.push(`stage = ${e(a.stage)}`),a.sessionId&&c.push(`session_id = ${e(a.sessionId)}`),a.clientIp&&c.push(`client_ip ${f} ${e(`%${a.clientIp}%`)}`),a.sourceTool){let b=`%${a.sourceTool}%`;c.push(`(source_tool ${f} ${e(b)} OR source_tool_label ${f} ${e(b)} OR source_host ${f} ${e(b)})`)}return a.dateFrom&&c.push(`created_at >= ${e(a.dateFrom)}`),a.dateTo&&c.push(`created_at <= ${e(a.dateTo)}`),{clause:c.length?`WHERE ${c.join(" AND ")}`:"",params:d,add:e}}(b,c),f=[...e.params],g=await d.queryOne(`SELECT COUNT(*) AS count FROM prompt_logs ${e.clause}`,f),h=e.add(b.limit),i=e.add(b.offset),j="postgres"===c?"LEFT(coalesce(prompt_text,''), 900)":"SUBSTRING(coalesce(prompt_text,''), 1, 900)",k="postgres"===c?"char_length(coalesce(prompt_text,''))":"CHAR_LENGTH(coalesce(prompt_text,''))",l="postgres"===c?"LEFT(coalesce(response_text,''), 400)":"SUBSTRING(coalesce(response_text,''), 1, 400)",m=await d.query(`
418
+ ORDER BY sortOrder ASC`,d.params)||[],c=b.reduce((a,b)=>a+Y(b.requests,0),0);return b.map(a=>({key:a.key,label:a.label,requests:Y(a.requests,0),share:c?Y(a.requests,0)/c:0,promptTokens:Y(a.promptTokens,0),completionTokens:Y(a.completionTokens,0),totalTokens:Y(a.totalTokens,0),avgPromptTokens:Y(a.avgPromptTokens,0),maxPromptTokens:Y(a.maxPromptTokens,0),avgLatencyMs:Y(a.avgLatencyMs,null),p95LatencyMs:Y(a.p95LatencyMs,null),maxLatencyMs:Y(a.maxLatencyMs,null),avgTtftMs:Y(a.avgTtftMs,null),p95TtftMs:Y(a.p95TtftMs,null)}))}catch(a){return console.error("[analytics] Failed to build input size buckets:",a?.message||a),[]}}async function aV(a,b,c,d={},e=new Map){let f=await aS(a,b,c,e),g=await aT(a,b,c),h=await aP(a,b,c),i=await aQ(a,b,c),j=await aR(a,b,c),k=await aU(a,b,c),l=f[0]||null,m=h[0]||null,n=i[0]||null,o=j[0]||null,p=f.reduce((a,b)=>a+Y(b.totalTokens,0),0),q=Y(d.totalTokens,0),r=l&&q?Y(l.totalTokens,0)/q:0,s=m&&q?Y(m.totalTokens,0)/q:0,t=n&&q?Y(n.totalTokens,0)/q:0,u=k.filter(a=>["30k-50k","50k-70k",">=70k"].includes(a.label)).reduce((a,b)=>a+Y(b.share,0),0),v=k.find(a=>">=70k"===a.label)||null;return{summary:{trackedUsers:f.length,topUserLabel:l?.label||"-",topUserTokens:l?.totalTokens||0,topUserTokenShare:r,topUsersTokenShare:q?p/q:0,topApiKeyLabel:m?.label||"-",topApiKeyTokens:m?.totalTokens||0,topApiKeyTokenShare:s,topSourceIpLabel:n?.label||"-",topSourceIpTokens:n?.totalTokens||0,topSourceIpTokenShare:t,topSourceIpHeavyLabel:o?.label||"-",topSourceIpHeavyRequests:o?.heavyRequests||0,longInputBucketShare:u,extremeInputShare:v?.share||0,problemClients:g.length},topHeavyUsers:f,topProblemClients:g,topApiKeysByTokens:h,topSourceIpsByTokens:i,topSourceIpsByHeavyRequests:j,inputBuckets:k}}function aW(a){let b=String(a??"");return/[",\n\r]/.test(b)?`"${b.replace(/"/g,'""')}"`:b}async function aX(a,b=4){let c=[a].filter(Boolean),d=Math.max(0,Math.max(1,Math.min(6,Number(b)||4))-c.length);if(d<=0)return c;for(let a of(await Promise.all(Array.from({length:d},async()=>{try{return await (0,O.d9)()}catch(a){return console.warn("[dashboardAnalytics] Extra MySQL analytics connection unavailable:",a?.message||a),null}}))))a&&c.push(a);return c}function aY(a,b=0){return Array.isArray(a)&&0!==a.length?a[Math.abs(b)%a.length]||a[0]:null}async function aZ(a=[]){let b=[...new Set((a||[]).filter(Boolean))];await Promise.all(b.map(a=>a?.close?.().catch(()=>{})))}async function a$(a={}){let b=JSON.stringify(ac(a)),c=(global._dashboardAnalyticsV2Cache||(global._dashboardAnalyticsV2Cache=new Map),global._dashboardAnalyticsV2Cache),d=c.get(b);if(d&&Date.now()-d.createdAt<15e3)return d.data;let e=ac(a),f=await (0,w.c)(),g=await (0,O.d9)().catch(a=>(console.error("[dashboardAnalytics] MySQL observability query adapter unavailable; SQLite fallback is disabled:",a?.message||a),null));if(!g)throw Error("MySQL observability is not configured or unavailable; SQLite analytics fallback is disabled.");let h=[g];try{h=await aX(g,3);let a=aY(h,0),[d,i]=await Promise.all([ae(f),af(f)]),j=e.userOwnedOnly?function(a=[],b={}){let c=[...new Set((a||[]).map(a=>X(a)).filter(Boolean))];if(0===c.length)return{enabled:!0,noMatch:!0,owners:[],identifiers:[],ids:[],fingerprints:[]};let d=new Set(c),e=new Set,f=new Set,g=new Set;for(let a of b.all||[]){let b=X(a.ownerUser);b&&d.has(b)&&(a.key&&e.add(a.key),a.id&&(e.add(a.id),f.add(a.id)),a.fingerprint&&(e.add(a.fingerprint),g.add(a.fingerprint)))}return{enabled:!0,noMatch:0===e.size,owners:c,identifiers:[...e],ids:[...f],fingerprints:[...g]}}(e.ownerCandidates,d):null,k=j?{...e,ownerScope:j}:e,l=function(a,b){let c=X(a);if(!c)return null;let d=[],e=!1;for(let a of(["local","local-no-key","no-key","khong-key","kh\xf4ng-key","kh\xf4ng d\xf9ng api key"].some(a=>a.includes(c)||c.includes(a))&&(e=!0),b.all||[]))[a.key,a.id,a.name,a.ownerUser,a.createdByUser,a.machineId,a.fingerprint,a.masked].some(a=>X(a).includes(c))&&a.key&&d.push(a.key);return a.length>=16&&!d.includes(a)&&d.push(a),{keys:[...new Set(d)],includeLocal:e,noMatch:0===d.length&&!e,filter:c}}(k.apiKey,d),m=k.userOwnedOnly?Promise.resolve(function(a="disabled"){return{disabled:!0,reason:a,missing:!1,total:0,sampled:0,dbInfo:{},models:[],stages:[],topClientIps:[],topSourceTools:[],topSessions:[],topStages:[],topModels:[],topAccounts:[],topStatuses:[]}}("user_owned_scope_no_api_key_columns")):M({keyword:k.keyword,model:k.model,sourceTool:k.sourceTool,clientIp:k.clientIp,sessionId:k.sessionId,dateFrom:k.startIso,dateTo:k.endIso}),n=(0,N.Wl)({keyword:k.keyword,provider:k.provider,model:k.model,connectionId:k.connectionId,endpoint:k.endpoint,apiKey:k.apiKey,apiKeyScope:j,status:k.status,sourceTool:k.sourceTool,clientIp:k.clientIp,sessionId:k.sessionId,dateFrom:k.startIso,dateTo:k.endIso}),[o,p,q,r,s,t]=await Promise.all([ak(aY(h,0),k,l),al(aY(h,1),k,l),ap(aY(h,2),k,d,i,l),as(aY(h,3),k,l),m,n]),u=function(a={},b=new Map){if(!a||"object"!=typeof a)return a;let c=a=>Array.isArray(a)?a.map(a=>(function(a={},b=new Map){if(!a||"object"!=typeof a)return a;let c=W(a.provider||a.errorSource||a.providerId),d=W(a.providerLabel)||ag(c,b),e={...a};for(let a of["sample","sampleMessage","errorMessage","errorMessageShort","message","details"])"string"==typeof e[a]&&(e[a]=function(a,b,c){let d="string"==typeof a?a:"";return d&&b&&c&&b!==c?d.split(b).join(c):a}(e[a],c,d));return{...e,provider:c,providerLabel:d,label:W(e.label)||d||c||"unknown"}})(a,b)):[];return{...a,topErrors:c(a.topErrors),topServerErrors:c(a.topServerErrors),topClientErrors:c(a.topClientErrors),topRateLimitErrors:c(a.topRateLimitErrors),errorDistribution:c(a.errorDistribution),byFaultOwner:c(a.byFaultOwner),byProvider:c(a.byProvider)}}(t,i),v=u?.summary||{};p.rawErrorEvents=Y(u?.total,0),p.serverErrorEvents=Y(v.serverImpacting,0),p.gatewayErrorEvents=Y(v.gateway,0),p.upstreamErrorEvents=Y(v.upstream,0),p.clientErrorEvents=Y(v.client,0),p.rateLimitErrorEvents=Y(v.rateLimit,0),p.unknownErrorEvents=Y(v.unknown,0),p.serverErrorRate=p.requests?p.serverErrorEvents/p.requests:0,p.clientErrorRate=p.requests?p.clientErrorEvents/p.requests:0,p.rateLimitErrorRate=p.requests?p.rateLimitErrorEvents/p.requests:0,u?.topErrors?.length&&(q.errors=u.topErrors);let w=new Map([...d.byKey.entries(),...d.byFingerprint.entries()]),[x,y,z,A,B]=await Promise.all([ax(aY(h,0),k,l,p),aV(aY(h,1),k,l,p,i),aq(aY(h,2),k,l,o),aB(aY(h,3),k,l,w,i),aC(aY(h,0),k,l,w,i)]),[C,D]=await Promise.all([ay(aY(h,1),k,l,i),az(aY(h,2),k,l,w,i)]);x.byModel=C,x.slowestRequests=D,p.userExperienceScore=x.score,p.userExperienceLabel=x.label,p.slowRequestRate=x.slowRequestRate,p.longInputRate=x.longInputRate,p.topHeavyUser=y.summary?.topUserLabel||"",p.topHeavyUserTokenShare=y.summary?.topUserTokenShare||0,p.extremeInputShare=y.summary?.extremeInputShare||0;let E=await aI(a,k,q,s,d,l,i),F=function({overview:a,groups:b,promptLogStats:c,requestErrorStats:d,experience:e,clientRequests:f}){let g=[],h=d?.summary||{},i=Y(h.serverImpacting,0),j=Y(h.client,0),k=Y(h.rateLimit,0),l=Y(a.serverErrorRate,a.requests?i/a.requests:0),m=Y(a.clientErrorRate,a.requests?j/a.requests:0);a.requests>=10&&i>=3&&l>=.05?g.push({level:l>=.15?"danger":"warning",title:"Tỷ lệ lỗi server/provider cao",detail:`${i.toLocaleString("vi-VN")} lỗi server-impacting (${(100*l).toFixed(1)}% request) trong khoảng thời gian đang lọc. Ưu ti\xean kiểm tra upstream/provider, gateway, timeout v\xe0 5xx.`}):a.requests>=10&&a.errorRate>=.2&&m>=.1?g.push({level:"warning",title:"Nhiều lỗi do client/request",detail:`${j.toLocaleString("vi-VN")} lỗi được ph\xe2n loại l\xe0 client-side (${(100*m).toFixed(1)}% request): sai endpoint/model/auth/body/context. Kh\xf4ng n\xean t\xednh nh\xf3m n\xe0y như lỗi server.`}):a.requests>=10&&a.errorRate>=.2&&g.push({level:"warning",title:"Tỷ lệ lỗi tổng cao",detail:`Tổng lỗi usage l\xe0 ${(100*a.errorRate).toFixed(1)}%, nhưng lỗi server-impacting chỉ ${(100*l).toFixed(1)}%. Xem ph\xe2n loại client/server b\xean dưới trước khi kết luận provider hỏng.`}),k>=5&&a.requests>0&&k/a.requests>=.05&&g.push({level:"warning",title:"Rate limit / quota đ\xe1ng ch\xfa \xfd",detail:`${k.toLocaleString("vi-VN")} lỗi rate-limit/quota trong khoảng lọc. Kiểm tra policy API key, quota provider hoặc ph\xe2n tải model.`});let n=b.apiKeys?.[0];n&&a.totalTokens>0&&n.totalTokens/a.totalTokens>=.5&&g.push({level:"warning",title:"Một API key d\xf9ng phần lớn token",detail:`${n.name||n.fingerprint} đang d\xf9ng ${(n.totalTokens/a.totalTokens*100).toFixed(1)}% tổng token.`});let o=c?.topClientIps?.[0];o&&c.total>0&&o.requests/c.total>=.5&&o.requests>=20&&g.push({level:"warning",title:"Một IP chiếm phần lớn request prompt log",detail:`${o.label} chiếm ${(o.requests/c.total*100).toFixed(1)}% prompt logs trong to\xe0n bộ dữ liệu khớp bộ lọc.`});let p=d?.topServerErrors?.[0];return p&&p.requests>=5&&g.push({level:p.requests>=20?"danger":"warning",title:"Provider/Gateway c\xf3 lỗi cần xử l\xfd",detail:`${p.providerLabel||p.provider||p.errorSource||"unknown"}/${p.model||"unknown"} c\xf3 ${p.requests.toLocaleString("vi-VN")} lỗi ${p.errorType||p.status||"server-impacting"}.`}),e?.samples>=10&&Y(e.slowRequestRate,0)>=.2&&g.push({level:e.slowRequestRate>=.4?"danger":"warning",title:"Nhiều request phản hồi chậm",detail:`${(100*e.slowRequestRate).toFixed(1)}% request th\xe0nh c\xf4ng c\xf3 latency >= 45s. Kiểm tra request input d\xe0i, chờ slot/upstream queue v\xe0 tải model server.`}),e?.samples>=10&&Y(e.longInputRate,0)>=.3&&g.push({level:"warning",title:"Tỷ lệ request input d\xe0i cao",detail:`${(100*e.longInputRate).toFixed(1)}% request c\xf3 input >= 30k token. Với VS Code/agent, P95/P99 latency cao c\xf3 thể chủ yếu do prompt eval v\xe0 chờ slot, kh\xf4ng phải do output chậm.`}),f?.summary?.topUserTokenShare>=.35&&g.push({level:f.summary.topUserTokenShare>=.6?"danger":"warning",title:"Token usage tập trung v\xe0o một user/API key",detail:`${f.summary.topUserLabel||"Một client"} đang chiếm ${(100*f.summary.topUserTokenShare).toFixed(1)}% tổng token trong khoảng lọc. N\xean kiểm tra quota, workflow VS Code/agent v\xe0 request input d\xe0i của client n\xe0y.`}),f?.summary?.extremeInputShare>=.1&&g.push({level:f.summary.extremeInputShare>=.25?"danger":"warning",title:"Nhiều request cực d\xe0i >=70k token",detail:`${(100*f.summary.extremeInputShare).toFixed(1)}% request th\xe0nh c\xf4ng c\xf3 input >=70k token. Đ\xe2y l\xe0 nh\xf3m dễ k\xe9o TTFT/P95/P99 l\xean cao v\xe0 l\xe0m request nhỏ phải chờ slot.`}),g}({overview:p,groups:q,promptLogStats:s,requestErrorStats:u,experience:x,clientRequests:y}),G={generatedAt:new Date().toISOString(),analyticsVersion:"v3.5-token-consumer-monitor",filters:{period:k.period,startIso:k.startIso,endIso:k.endIso,provider:k.provider,model:k.model,connectionId:k.connectionId,status:k.status,endpoint:k.endpoint,apiKey:k.apiKey,clientIp:k.clientIp,sourceTool:k.sourceTool,sessionId:k.sessionId,keyword:k.keyword,userOwnedOnly:k.userOwnedOnly},overview:p,latency:r,experience:x,clientRequests:y,timeSeries:z,groups:q,promptLogs:s,requestErrors:u,anomalies:F,recentUsage:A,heavyRequests:B,options:E,qualityNotes:[]};if(await aZ(h),c.set(b,{createdAt:Date.now(),data:G}),c.size>100){for(let[a,b]of c)if(Date.now()-b.createdAt>15e3&&c.delete(a),c.size<=100)break}return G}catch(a){throw await aZ(h),console.error("[dashboardAnalytics] MySQL observability query failed; SQLite fallback is disabled:",a?.message||a),a}}var a_=c(9588);let a0="force-dynamic",a1=["period","dateFrom","dateTo","provider","model","connectionId","status","endpoint","apiKey","clientIp","sourceIp","sourceTool","sessionId","keyword","maxPromptLogRows","timeZone"];async function a2(a){try{let{access:b,response:c}=await (0,a_.oW)();if(c)return c;let{searchParams:d}=new URL(a.url),e=function(a){let b={};for(let c of a1){let d=a.get(c);null!==d&&""!==String(d).trim()&&(b[c]=d)}return b}(d),f=b.isAdmin||b.isMonitorAdmin?e:{...e,userOwnedOnly:!0,ownerCandidates:[...new Set([...b.candidates||[],b.userId].map(a_.I8).filter(Boolean))]},g=await a$(f);if("csv"===d.get("format")){let a=(function(a){let b=[];for(let[c,d]of(b.push(["section","key","label","requests","success","errors","errorRate","inputTokens","outputTokens","totalTokens","cost","lastSeen"]),[["providers",a.groups.providers],["models",a.groups.models],["providerAccounts",a.groups.providerAccounts],["apiKeys",a.groups.apiKeys],["endpoints",a.groups.endpoints],["clientIps",a.promptLogs.topClientIps],["sourceTools",a.promptLogs.topSourceTools],["requestErrors",a.requestErrors?.topErrors||a.groups.errors],["modelExperience",a.experience?.byModel||[]],["clientHeavyUsers",a.clientRequests?.topHeavyUsers||[]],["clientTopApiKeysByTokens",a.clientRequests?.topApiKeysByTokens||[]],["clientTopSourceIpsByTokens",a.clientRequests?.topSourceIpsByTokens||[]],["clientTopSourceIpsByHeavyRequests",a.clientRequests?.topSourceIpsByHeavyRequests||[]],["clientProblemClients",a.clientRequests?.topProblemClients||[]],["inputBuckets",a.clientRequests?.inputBuckets||[]]]))for(let a of d||[])b.push([c,a.key||"",a.label||a.name||"",a.requests||0,a.success||0,a.errors||0,a.errorRate||0,a.promptTokens||0,a.completionTokens||0,a.totalTokens||0,a.cost||0,a.lastSeen||""]);return b})(g).map(a=>a.map(aW).join(",")).join("\n");return new Response(a,{status:200,headers:{"Content-Type":"text/csv; charset=utf-8","Content-Disposition":`attachment; filename="bluerouter-analytics-${new Date().toISOString().slice(0,10)}.csv"`,"Cache-Control":"no-store"}})}return v.NextResponse.json(g,{headers:{"Cache-Control":"no-store"}})}catch(a){return console.error("[analytics] Failed to build dashboard analytics:",a),v.NextResponse.json({error:a?.message||"Failed to build dashboard analytics"},{status:500})}}let a3=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/dashboard/analytics/route",pathname:"/api/dashboard/analytics",filename:"route",bundlePath:"app/api/dashboard/analytics/route"},distDir:".next-cli-build",relativeProjectDir:"",resolvedPagePath:"D:\\bluerouter\\src\\app\\api\\dashboard\\analytics\\route.js",nextConfigOutput:"standalone",userland:d,...{}}),{workAsyncStorage:a4,workUnitAsyncStorage:a5,serverHooks:a6}=a3;function a7(){return(0,g.patchFetch)({workAsyncStorage:a4,workUnitAsyncStorage:a5})}async function a8(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),a3.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/dashboard/analytics/route";"/index"===d&&(d="/");let e=await a3.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:z,prerenderManifest:A,routerServerContext:B,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,resolvedPathname:E,clientReferenceManifest:F,serverActionsManifest:G}=e,H=(0,k.normalizeAppPath)(d),I=!!(A.dynamicRoutes[H]||A.routes[E]),J=async()=>((null==B?void 0:B.render404)?await B.render404(a,b,y,!1):b.end("This page could not be found"),null);if(I&&!z){let a=!!A.routes[E],b=A.dynamicRoutes[H];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await J();throw new t.NoFallbackError}}let K=null;!I||a3.isDev||z||(K="/index"===(K=E)?"/":K);let L=!0===a3.isDev||!I,M=I&&!L;G&&F&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:F,serverActionsManifest:G});let N=a.method||"GET",O=(0,i.getTracer)(),P=O.getActiveScopeSpan(),Q=!!(null==B?void 0:B.isWrappedByNextServer),R=!!(0,h.getRequestMeta)(a,"minimalMode"),S=(0,h.getRequestMeta)(a,"incrementalCache")||await a3.getIncrementalCache(a,x,A,R);null==S||S.resetRequestCache(),globalThis.__incrementalCache=S;let T={params:w,previewProps:A.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:L,incrementalCache:S,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>a3.onRequestError(a,b,d,e,B)},sharedContext:{buildId:g,deploymentId:v}},U=new l.NodeNextRequest(a),V=new l.NodeNextResponse(b),W=m.NextRequestAdapter.fromNodeNextRequest(U,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>a3.handle(W,T).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=O.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${N} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${N} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!R&&C&&D&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=T.renderOpts.fetchMetrics;let h=T.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=T.renderOpts.collectedTags;if(!I)return await (0,p.I)(U,V,d,T.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==T.renderOpts.collectedRevalidate&&!(T.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&T.renderOpts.collectedRevalidate,e=void 0===T.renderOpts.collectedExpire||T.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:T.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await a3.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),b}},k=await a3.handleResponse({req:a,nextConfig:x,cacheKey:K,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:R});if(!I)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});R||b.setHeader("x-nextjs-cache",C?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),z&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return R&&I||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(U,V,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};Q&&P?await h(P):(e=O.getActiveScopeSpan(),await O.withPropagatedContext(a.headers,()=>O.trace(n.BaseServerSpan.handleRequest,{spanName:`${N} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":N,"http.target":a.url}},h),void 0,!Q))}catch(b){if(b instanceof t.NoFallbackError||await a3.onRequestError(a,b,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),I)throw b;return await (0,p.I)(U,V,new Response(null,{status:500})),null}}},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},64939:a=>{a.exports=import("pg")},66136:a=>{a.exports=require("timers")},69614:(a,b,c)=>{c.d(b,{V:()=>p});var d=c(88888),e=c(91356),f=c(99129),g=c(73575),h=c(41570),i=c(19035),j=c(24762),k=c(80308),l=c(11980);async function m(a,b,c){if(!(0,i.Gv)(a))throw new f.Ye("Flattened JWS must be an object");if(void 0===a.protected&&void 0===a.header)throw new f.Ye('Flattened JWS must have either of the "protected" or "header" members');if(void 0!==a.protected&&"string"!=typeof a.protected)throw new f.Ye("JWS Protected Header incorrect type");if(void 0===a.payload)throw new f.Ye("JWS Payload missing");if("string"!=typeof a.signature)throw new f.Ye("JWS Signature missing or incorrect type");if(void 0!==a.header&&!(0,i.Gv)(a.header))throw new f.Ye("JWS Unprotected Header incorrect type");let m={};if(a.protected)try{let b=(0,d.D)(a.protected);m=JSON.parse(g.D0.decode(b))}catch{throw new f.Ye("JWS Protected Header is invalid")}if(!(0,i.fz)(m,a.header))throw new f.Ye("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");let n={...m,...a.header},o=(0,k.n)(f.Ye,new Map([["b64",!0]]),c?.crit,m,n),p=!0;if(o.has("b64")&&"boolean"!=typeof(p=m.b64))throw new f.Ye('The "b64" (base64url-encode payload) Header Parameter must be a boolean');let{alg:q}=n;if("string"!=typeof q||!q)throw new f.Ye('JWS "alg" (Algorithm) Header Parameter missing or invalid');let r=c&&function(a,b){if(void 0!==b&&(!Array.isArray(b)||b.some(a=>"string"!=typeof a)))throw TypeError(`"${a}" option must be an array of strings`);if(b)return new Set(b)}("algorithms",c.algorithms);if(r&&!r.has(q))throw new f.Rb('"alg" (Algorithm) Header Parameter value not allowed');if(p){if("string"!=typeof a.payload)throw new f.Ye("JWS Payload must be a string")}else if("string"!=typeof a.payload&&!(a.payload instanceof Uint8Array))throw new f.Ye("JWS Payload must be a string or an Uint8Array instance");let s=!1;"function"==typeof b&&(b=await b(m,a),s=!0),(0,j.y)(q,b,"verify");let t=(0,g.xW)(void 0!==a.protected?(0,g.lF)(a.protected):new Uint8Array,(0,g.lF)("."),"string"==typeof a.payload?p?(0,g.lF)(a.payload):g.Rd.encode(a.payload):a.payload),u=(0,h.h2)(a.signature,"signature",f.Ye),v=await (0,l.l)(b,q);if(!await (0,e.MX)(q,v,u,t))throw new f.h2;let w={payload:p?(0,h.h2)(a.payload,"payload",f.Ye):"string"==typeof a.payload?g.Rd.encode(a.payload):a.payload};return(void 0!==a.protected&&(w.protectedHeader=m),void 0!==a.header&&(w.unprotectedHeader=a.header),s)?{...w,key:v}:w}async function n(a,b,c){if(a instanceof Uint8Array&&(a=g.D0.decode(a)),"string"!=typeof a)throw new f.Ye("Compact JWS must be a string or Uint8Array");let{0:d,1:e,2:h,length:i}=a.split(".");if(3!==i)throw new f.Ye("Invalid Compact JWS");let j=await m({payload:e,protected:d,signature:h},b,c),k={payload:j.payload,protectedHeader:j.protectedHeader};return"function"==typeof b?{...k,key:j.key}:k}var o=c(17347);async function p(a,b,c){let d=await n(a,b,c);if(d.protectedHeader.crit?.includes("b64")&&!1===d.protectedHeader.b64)throw new f.Dp("JWTs MUST NOT use unencoded payload");let e={payload:(0,o.k6)(d.protectedHeader,d.payload,c),protectedHeader:d.protectedHeader};return"function"==typeof b?{...e,key:d.key}:e}},73024:a=>{a.exports=require("node:fs")},74075:a=>{a.exports=require("zlib")},76760:a=>{a.exports=require("node:path")},77598:a=>{a.exports=require("node:crypto")},79428:a=>{a.exports=require("buffer")},80099:a=>{a.exports=require("node:sqlite")},81787:a=>{a.exports=require("bun:sqlite")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87550:a=>{a.exports=require("better-sqlite3")},90389:(a,b,c)=>{c.d(b,{hS:()=>d});let d=Object.freeze({ADMIN:"admin",MONITOR_ADMIN:"monitor_admin",USER:"user",GUEST:"guest"});Object.freeze([{href:"/dashboard/endpoint",label:"Endpoint",icon:"api"},{href:"/dashboard/api-keys",label:"API Keys",icon:"vpn_key"},{href:"/dashboard/usage",label:"Usage",icon:"bar_chart"},{href:"/dashboard/analytics",label:"Analytics",icon:"monitoring"},{href:"/dashboard/quota",label:"Quota Tracker",icon:"data_usage"},{href:"/dashboard/prompt-logs",label:"Prompt Logs",icon:"manage_search"}]),Object.freeze(["/dashboard","/dashboard/endpoint","/dashboard/api-keys","/dashboard/usage","/dashboard/analytics","/dashboard/quota","/dashboard/prompt-logs"])},91645:a=>{a.exports=require("net")},94735:a=>{a.exports=require("events")},94755:(a,b,c)=>{c.d(b,{A:()=>i});var d=c(77598);let e={randomUUID:d.randomUUID},f=new Uint8Array(256),g=f.length;var h=c(50122);let i=function(a,b,c){if(e.randomUUID&&!b&&!a)return e.randomUUID();var i=a,j=c;let k=(i=i||{}).random??i.rng?.()??(g>f.length-16&&((0,d.randomFillSync)(f),g=0),f.slice(g,g+=16));if(k.length<16)throw Error("Random bytes length must be >= 16");if(k[6]=15&k[6]|64,k[8]=63&k[8]|128,b){if((j=j||0)<0||j+16>b.length)throw RangeError(`UUID byte range ${j}:${j+15} is out of buffer bounds`);for(let a=0;a<16;++a)b[j+a]=k[a];return b}return(0,h.k)(k)}},97242:(a,b,c)=>{c.d(b,{DU:()=>s,Ws:()=>t,_3:()=>v,nv:()=>u});var d=c(45903);let e=new Set;function f(a,b,c=null){let d=Number(a);if(!Number.isFinite(d)||d<0)return b;let e=Math.floor(d);return c?Math.min(e,c):e}function g(a){return String(a||"").trim()}async function h(){return(0,d.I6)(await (0,d.L7)())}async function i(a){let b=new(await Promise.resolve().then(c.bind(c,64939))).Client({host:a.host,port:Number(a.port||5432),database:a.database,user:a.username,password:a.password,ssl:!!a.ssl&&{rejectUnauthorized:!1}});return await b.connect(),{type:"postgres",query:async(a,c=[])=>(await b.query(a,c)).rows,queryOne:async(a,c=[])=>(await b.query(a,c)).rows[0]||null,async exec(a,c=[]){await b.query(a,c)},async close(){await b.end()}}}async function j(a){let b=await c.e(8491).then(c.t.bind(c,38491,19)),d=await b.createConnection({host:a.host,port:Number(a.port||3306),database:a.database,user:a.username,password:a.password,ssl:a.ssl?{}:void 0,dateStrings:!0,connectTimeout:3e3});return{type:"mysql",async query(a,b=[]){let[c]=await d.query(a,b);return c},async queryOne(a,b=[]){let[c]=await d.query(a,b);return c[0]||null},async exec(a,b=[]){await d.query(a,b)},async close(){await d.end()}}}async function k(a){if("postgres"===a.type)return i(a);if("mysql"===a.type)return j(a);throw Error(`Unsupported prompt log database type: ${a.type}`)}async function l(a,b){if(!b||b.full_request_json)return b;let c=function(a={}){return String(a.payload_hash||function(a){if(!a)return{};if("object"==typeof a)return a;try{return JSON.parse(a)}catch{return{}}}(a.meta_json).payloadHash||"").trim()}(b);if(!c)return b;try{let d=await a.queryOne("SELECT COUNT(1) AS count FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'prompt_log_payloads'");if(0===Number(d?.count||0))return b;let e=await a.queryOne("SELECT payload_json FROM prompt_log_payloads WHERE payload_hash = ?",[c]);if(!e)return b;let f=e.payload_json;return{...b,full_request_json:"string"==typeof f?f:JSON.stringify(f)}}catch{return b}}async function m(a){let b=await i(a);try{for(let a of["CREATE INDEX IF NOT EXISTS idx_prompt_logs_created_id ON prompt_logs (created_at DESC, id)","CREATE INDEX IF NOT EXISTS idx_prompt_logs_stage_created_at ON prompt_logs (stage, created_at DESC)","CREATE INDEX IF NOT EXISTS idx_prompt_logs_model_created_at ON prompt_logs (model, created_at DESC)","CREATE INDEX IF NOT EXISTS idx_prompt_logs_display_model_created_at ON prompt_logs (display_model, created_at DESC)","CREATE INDEX IF NOT EXISTS idx_prompt_logs_session_created_at ON prompt_logs (session_id, created_at DESC)","CREATE INDEX IF NOT EXISTS idx_prompt_logs_client_ip_created_at ON prompt_logs (client_ip, created_at DESC)","CREATE INDEX IF NOT EXISTS idx_prompt_logs_source_tool_created_at ON prompt_logs (source_tool, created_at DESC)","CREATE INDEX IF NOT EXISTS idx_prompt_logs_connection_created_at ON prompt_logs (connection_id, created_at DESC)","CREATE INDEX IF NOT EXISTS idx_prompt_logs_account_created_at ON prompt_logs (account_name, created_at DESC)","CREATE INDEX IF NOT EXISTS idx_prompt_logs_provider_created_at ON prompt_logs (provider, created_at DESC)","CREATE INDEX IF NOT EXISTS idx_prompt_logs_status_created_at ON prompt_logs (status_code, created_at DESC)","CREATE INDEX IF NOT EXISTS idx_prompt_logs_payload_hash ON prompt_logs (payload_hash)"])await b.exec(a)}finally{await b.close()}}async function n(a,b,c){let d=await a.queryOne("SELECT COUNT(1) AS count FROM INFORMATION_SCHEMA.STATISTICS WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'prompt_logs' AND INDEX_NAME = ?",[b]);0===Number(d?.count||0)&&await a.exec(c)}async function o(a){let b=await j(a);try{let a=await b.queryOne("SELECT COUNT(1) AS count FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'prompt_logs'");if(0===Number(a?.count||0))return;for(let[a,c]of[["idx_prompt_logs_created_id","CREATE INDEX idx_prompt_logs_created_id ON prompt_logs (created_at DESC, id)"],["idx_prompt_logs_stage_created_at","CREATE INDEX idx_prompt_logs_stage_created_at ON prompt_logs (stage, created_at DESC)"],["idx_prompt_logs_model_created_at","CREATE INDEX idx_prompt_logs_model_created_at ON prompt_logs (model, created_at DESC)"],["idx_prompt_logs_display_model_created_at","CREATE INDEX idx_prompt_logs_display_model_created_at ON prompt_logs (display_model, created_at DESC)"],["idx_prompt_logs_session_created_at","CREATE INDEX idx_prompt_logs_session_created_at ON prompt_logs (session_id, created_at DESC)"],["idx_prompt_logs_client_ip_created_at","CREATE INDEX idx_prompt_logs_client_ip_created_at ON prompt_logs (client_ip, created_at DESC)"],["idx_prompt_logs_source_tool_created_at","CREATE INDEX idx_prompt_logs_source_tool_created_at ON prompt_logs (source_tool, created_at DESC)"],["idx_prompt_logs_connection_created_at","CREATE INDEX idx_prompt_logs_connection_created_at ON prompt_logs (connection_id, created_at DESC)"],["idx_prompt_logs_account_created_at","CREATE INDEX idx_prompt_logs_account_created_at ON prompt_logs (account_name, created_at DESC)"],["idx_prompt_logs_provider_created_at","CREATE INDEX idx_prompt_logs_provider_created_at ON prompt_logs (provider, created_at DESC)"],["idx_prompt_logs_status_created_at","CREATE INDEX idx_prompt_logs_status_created_at ON prompt_logs (status_code, created_at DESC)"],["idx_prompt_logs_payload_hash","CREATE INDEX idx_prompt_logs_payload_hash ON prompt_logs (payload_hash)"]])await n(b,a,c)}finally{await b.close()}}async function p(a){if(!a.enabled)return;let b=`${a.type}:${a.host||""}:${a.port||""}:${a.database||""}`;if(!e.has(b))try{if("postgres"===a.type)await m(a);else if("mysql"===a.type)await o(a);else throw Error(`Unsupported prompt log database type: ${a.type}`);e.add(b)}catch(a){console.warn("[prompt-logs] Unable to ensure query indexes:",a.message)}}async function q(a){let b=await k(a);try{let c=(await b.query("SELECT DISTINCT COALESCE(NULLIF(display_model, ''), model) AS model FROM prompt_logs WHERE model IS NOT NULL AND model <> '' ORDER BY model LIMIT 300")).map(a=>a.model),d=(await b.query("SELECT DISTINCT stage FROM prompt_logs WHERE stage IS NOT NULL AND stage <> '' ORDER BY stage LIMIT 100")).map(a=>a.stage);return{models:c,stages:d,dbInfo:{type:a.type,host:a.host,database:a.database}}}finally{await b.close()}}async function r(a,b){let c=a.type,d=await k(a);try{let e=function(a,b){let c=[],d=[],e=a=>(d.push(a),"postgres"===b)?`$${d.length}`:"?",f="postgres"===b?"ILIKE":"LIKE";if(a.keyword){let b=`%${a.keyword}%`;c.push(`(${["prompt_text","response_text","error_text","model","endpoint","provider_url","provider","account_name","connection_id","display_model","session_id","client_ip","client_host","client_user_agent","source_tool","source_tool_label","source_host"].map(a=>`${a} ${f} ${e(b)}`).join(" OR ")})`)}if(a.model&&c.push(`(model = ${e(a.model)} OR display_model = ${e(a.model)})`),a.stage&&c.push(`stage = ${e(a.stage)}`),a.sessionId&&c.push(`session_id = ${e(a.sessionId)}`),a.clientIp&&c.push(`client_ip ${f} ${e(`%${a.clientIp}%`)}`),a.sourceTool){let b=`%${a.sourceTool}%`;c.push(`(source_tool ${f} ${e(b)} OR source_tool_label ${f} ${e(b)} OR source_host ${f} ${e(b)})`)}return a.dateFrom&&c.push(`created_at >= ${e(a.dateFrom)}`),a.dateTo&&c.push(`created_at <= ${e(a.dateTo)}`),{clause:c.length?`WHERE ${c.join(" AND ")}`:"",params:d,add:e}}(b,c),f=[...e.params],g=await d.queryOne(`SELECT COUNT(*) AS count FROM prompt_logs ${e.clause}`,f),h=e.add(b.limit),i=e.add(b.offset),j="postgres"===c?"LEFT(coalesce(prompt_text,''), 900)":"SUBSTRING(coalesce(prompt_text,''), 1, 900)",k="postgres"===c?"char_length(coalesce(prompt_text,''))":"CHAR_LENGTH(coalesce(prompt_text,''))",l="postgres"===c?"LEFT(coalesce(response_text,''), 400)":"SUBSTRING(coalesce(response_text,''), 1, 400)",m=await d.query(`
460
419
  SELECT
461
420
  id,
462
421
  created_at,