@jheavenknows/bluerouter 5.2.12 → 5.2.14

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 (496) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +15 -15
  3. package/app/.next-cli-build/build-manifest.json +2 -2
  4. package/app/.next-cli-build/server/app/(dashboard)/dashboard/analytics/page.js +1 -1
  5. package/app/.next-cli-build/server/app/(dashboard)/dashboard/analytics/page_client-reference-manifest.js +1 -1
  6. package/app/.next-cli-build/server/app/(dashboard)/dashboard/api-keys/page_client-reference-manifest.js +1 -1
  7. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cluster/page_client-reference-manifest.js +1 -1
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalcloudprovider/page_client-reference-manifest.js +1 -1
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalcloudprovidermonitor/page_client-reference-manifest.js +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalquota/page_client-reference-manifest.js +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/prompt-logs/page_client-reference-manifest.js +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/provider-health/page_client-reference-manifest.js +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/resource-monitor/page_client-reference-manifest.js +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  40. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  41. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  42. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  43. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  44. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  45. package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  46. package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  47. package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  48. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  49. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  50. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  51. package/app/.next-cli-build/server/app/_not-found.rsc +6 -6
  52. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +6 -6
  53. package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  54. package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +6 -6
  55. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  56. package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  57. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  58. package/app/.next-cli-build/server/app/api/auth/ldap/test/route.js.nft.json +1 -1
  59. package/app/.next-cli-build/server/app/api/auth/ldap/users/route.js.nft.json +1 -1
  60. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  61. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  62. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  63. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  64. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  65. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  66. package/app/.next-cli-build/server/app/api/branding/[asset]/route.js.nft.json +1 -1
  67. package/app/.next-cli-build/server/app/api/branding/route.js.nft.json +1 -1
  68. package/app/.next-cli-build/server/app/api/branding/upload/route.js.nft.json +1 -1
  69. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  70. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  71. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/autostart/route.js.nft.json +1 -1
  72. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/prompt-log-db/route.js.nft.json +1 -1
  73. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/root-ca/route.js.nft.json +1 -1
  74. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  75. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  76. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  77. package/app/.next-cli-build/server/app/api/cluster/config/route.js.nft.json +1 -1
  78. package/app/.next-cli-build/server/app/api/cluster/heartbeat/route.js.nft.json +1 -1
  79. package/app/.next-cli-build/server/app/api/cluster/peers/[id]/command/route.js.nft.json +1 -1
  80. package/app/.next-cli-build/server/app/api/cluster/peers/[id]/route.js.nft.json +1 -1
  81. package/app/.next-cli-build/server/app/api/cluster/peers/route.js.nft.json +1 -1
  82. package/app/.next-cli-build/server/app/api/cluster/snapshot/route.js.nft.json +1 -1
  83. package/app/.next-cli-build/server/app/api/cluster/sync/route.js.nft.json +1 -1
  84. package/app/.next-cli-build/server/app/api/cluster/test/route.js.nft.json +1 -1
  85. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  86. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  87. package/app/.next-cli-build/server/app/api/dashboard/analytics/ai-models/route.js.nft.json +1 -1
  88. package/app/.next-cli-build/server/app/api/dashboard/analytics/analyze/route.js +30 -16
  89. package/app/.next-cli-build/server/app/api/dashboard/analytics/analyze/route.js.nft.json +1 -1
  90. package/app/.next-cli-build/server/app/api/dashboard/analytics/route.js.nft.json +1 -1
  91. package/app/.next-cli-build/server/app/api/dashboard/combos/route.js.nft.json +1 -1
  92. package/app/.next-cli-build/server/app/api/dashboard/endpoint/route.js.nft.json +1 -1
  93. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/[id]/route.js.nft.json +1 -1
  94. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/options/route.js.nft.json +1 -1
  95. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/route.js.nft.json +1 -1
  96. package/app/.next-cli-build/server/app/api/dashboard/token-saver/route.js.nft.json +1 -1
  97. package/app/.next-cli-build/server/app/api/keys/[id]/caveman-test/route.js.nft.json +1 -1
  98. package/app/.next-cli-build/server/app/api/keys/[id]/rotate/route.js.nft.json +1 -1
  99. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  100. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  101. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  102. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  103. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  104. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  105. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  106. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  107. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  108. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  109. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  110. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  111. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  112. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  113. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  114. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  115. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  116. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  117. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  118. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  119. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  120. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  121. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  122. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  123. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/api-key-models/route.js.nft.json +1 -1
  124. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/import-models/route.js.nft.json +1 -1
  125. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/models/[...routeModel]/route.js.nft.json +1 -1
  126. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/route.js.nft.json +1 -1
  127. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/usage/route.js.nft.json +1 -1
  128. package/app/.next-cli-build/server/app/api/personal-cloud-providers/client/route.js.nft.json +1 -1
  129. package/app/.next-cli-build/server/app/api/personal-cloud-providers/monitor/route.js.nft.json +1 -1
  130. package/app/.next-cli-build/server/app/api/personal-cloud-providers/permissions/route.js.nft.json +1 -1
  131. package/app/.next-cli-build/server/app/api/personal-cloud-providers/route.js.nft.json +1 -1
  132. package/app/.next-cli-build/server/app/api/personal-cloud-providers/routing/route.js.nft.json +1 -1
  133. package/app/.next-cli-build/server/app/api/pricing/recalculate/route.js.nft.json +1 -1
  134. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  135. package/app/.next-cli-build/server/app/api/provider-health/route.js.nft.json +1 -1
  136. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  137. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  138. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  139. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  140. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  141. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  142. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  143. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  144. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  145. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  146. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  147. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  148. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  149. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  150. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  151. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  152. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  153. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  154. package/app/.next-cli-build/server/app/api/resource-monitor/[id]/route.js.nft.json +1 -1
  155. package/app/.next-cli-build/server/app/api/resource-monitor/ai-models/route.js.nft.json +1 -1
  156. package/app/.next-cli-build/server/app/api/resource-monitor/analyze/route.js.nft.json +1 -1
  157. package/app/.next-cli-build/server/app/api/resource-monitor/history/route.js.nft.json +1 -1
  158. package/app/.next-cli-build/server/app/api/resource-monitor/route.js.nft.json +1 -1
  159. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  160. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  161. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  162. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  163. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +1 -1
  164. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  165. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  166. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  167. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  168. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  169. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  170. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  171. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  172. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  173. package/app/.next-cli-build/server/app/api/tunnel/tailscale-login/route.js.nft.json +1 -1
  174. package/app/.next-cli-build/server/app/api/tunnel/tailscale-start-daemon/route.js.nft.json +1 -1
  175. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  176. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  177. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  178. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  179. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  180. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  181. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  182. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  183. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  184. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  185. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  186. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  187. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  188. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  189. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  190. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  191. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  192. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  193. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  194. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  195. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  196. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  197. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  198. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  199. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  200. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  201. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  202. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  203. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  204. package/app/.next-cli-build/server/app/callback.html +1 -1
  205. package/app/.next-cli-build/server/app/callback.rsc +6 -6
  206. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +6 -6
  207. package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
  208. package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +6 -6
  209. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
  210. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  211. package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
  212. package/app/.next-cli-build/server/app/dashboard/analytics.html +1 -1
  213. package/app/.next-cli-build/server/app/dashboard/analytics.rsc +8 -8
  214. package/app/.next-cli-build/server/app/dashboard/analytics.segments/!KGRhc2hib2FyZCk/dashboard/analytics/__PAGE__.segment.rsc +2 -2
  215. package/app/.next-cli-build/server/app/dashboard/analytics.segments/!KGRhc2hib2FyZCk/dashboard/analytics.segment.rsc +1 -1
  216. package/app/.next-cli-build/server/app/dashboard/analytics.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  217. package/app/.next-cli-build/server/app/dashboard/analytics.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  218. package/app/.next-cli-build/server/app/dashboard/analytics.segments/_full.segment.rsc +8 -8
  219. package/app/.next-cli-build/server/app/dashboard/analytics.segments/_head.segment.rsc +1 -1
  220. package/app/.next-cli-build/server/app/dashboard/analytics.segments/_index.segment.rsc +6 -6
  221. package/app/.next-cli-build/server/app/dashboard/analytics.segments/_tree.segment.rsc +2 -2
  222. package/app/.next-cli-build/server/app/dashboard/api-keys.html +1 -1
  223. package/app/.next-cli-build/server/app/dashboard/api-keys.rsc +8 -8
  224. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/!KGRhc2hib2FyZCk/dashboard/api-keys/__PAGE__.segment.rsc +2 -2
  225. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/!KGRhc2hib2FyZCk/dashboard/api-keys.segment.rsc +1 -1
  226. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  227. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  228. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/_full.segment.rsc +8 -8
  229. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/_head.segment.rsc +1 -1
  230. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/_index.segment.rsc +6 -6
  231. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/_tree.segment.rsc +2 -2
  232. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  233. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +8 -8
  234. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
  235. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
  236. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  237. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  238. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +8 -8
  239. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
  240. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +6 -6
  241. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
  242. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  243. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +8 -8
  244. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
  245. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
  246. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  247. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  248. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +8 -8
  249. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
  250. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +6 -6
  251. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
  252. package/app/.next-cli-build/server/app/dashboard/cluster.html +1 -1
  253. package/app/.next-cli-build/server/app/dashboard/cluster.rsc +7 -7
  254. package/app/.next-cli-build/server/app/dashboard/cluster.segments/!KGRhc2hib2FyZCk/dashboard/cluster/__PAGE__.segment.rsc +1 -1
  255. package/app/.next-cli-build/server/app/dashboard/cluster.segments/!KGRhc2hib2FyZCk/dashboard/cluster.segment.rsc +1 -1
  256. package/app/.next-cli-build/server/app/dashboard/cluster.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  257. package/app/.next-cli-build/server/app/dashboard/cluster.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  258. package/app/.next-cli-build/server/app/dashboard/cluster.segments/_full.segment.rsc +7 -7
  259. package/app/.next-cli-build/server/app/dashboard/cluster.segments/_head.segment.rsc +1 -1
  260. package/app/.next-cli-build/server/app/dashboard/cluster.segments/_index.segment.rsc +6 -6
  261. package/app/.next-cli-build/server/app/dashboard/cluster.segments/_tree.segment.rsc +2 -2
  262. package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  263. package/app/.next-cli-build/server/app/dashboard/combos.rsc +8 -8
  264. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  265. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
  266. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  267. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  268. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +8 -8
  269. package/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
  270. package/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +6 -6
  271. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
  272. package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  273. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +8 -8
  274. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
  275. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
  276. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  277. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  278. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +8 -8
  279. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
  280. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +6 -6
  281. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
  282. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  283. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +8 -8
  284. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
  285. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
  286. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
  287. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  288. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  289. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +8 -8
  290. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
  291. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +6 -6
  292. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +2 -2
  293. package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  294. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +8 -8
  295. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
  296. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
  297. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  298. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  299. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +8 -8
  300. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
  301. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +6 -6
  302. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
  303. package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  304. package/app/.next-cli-build/server/app/dashboard/profile.rsc +8 -8
  305. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
  306. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
  307. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  308. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  309. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +8 -8
  310. package/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
  311. package/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +6 -6
  312. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
  313. package/app/.next-cli-build/server/app/dashboard/prompt-logs.html +1 -1
  314. package/app/.next-cli-build/server/app/dashboard/prompt-logs.rsc +7 -7
  315. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/!KGRhc2hib2FyZCk/dashboard/prompt-logs/__PAGE__.segment.rsc +1 -1
  316. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/!KGRhc2hib2FyZCk/dashboard/prompt-logs.segment.rsc +1 -1
  317. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  318. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  319. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/_full.segment.rsc +7 -7
  320. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/_head.segment.rsc +1 -1
  321. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/_index.segment.rsc +6 -6
  322. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/_tree.segment.rsc +2 -2
  323. package/app/.next-cli-build/server/app/dashboard/provider-health.html +1 -1
  324. package/app/.next-cli-build/server/app/dashboard/provider-health.rsc +7 -7
  325. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/!KGRhc2hib2FyZCk/dashboard/provider-health/__PAGE__.segment.rsc +1 -1
  326. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/!KGRhc2hib2FyZCk/dashboard/provider-health.segment.rsc +1 -1
  327. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  328. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  329. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/_full.segment.rsc +7 -7
  330. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/_head.segment.rsc +1 -1
  331. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/_index.segment.rsc +6 -6
  332. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/_tree.segment.rsc +2 -2
  333. package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  334. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +8 -8
  335. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  336. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
  337. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  338. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  339. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  340. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +8 -8
  341. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
  342. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +6 -6
  343. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
  344. package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  345. package/app/.next-cli-build/server/app/dashboard/providers.rsc +8 -8
  346. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  347. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  348. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  349. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  350. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +8 -8
  351. package/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
  352. package/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +6 -6
  353. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
  354. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  355. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +8 -8
  356. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
  357. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
  358. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  359. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  360. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +8 -8
  361. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
  362. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +6 -6
  363. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
  364. package/app/.next-cli-build/server/app/dashboard/quota.html +1 -1
  365. package/app/.next-cli-build/server/app/dashboard/quota.rsc +9 -9
  366. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
  367. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
  368. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  369. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  370. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +9 -9
  371. package/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
  372. package/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +6 -6
  373. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
  374. package/app/.next-cli-build/server/app/dashboard/resource-monitor.html +1 -1
  375. package/app/.next-cli-build/server/app/dashboard/resource-monitor.rsc +7 -7
  376. package/app/.next-cli-build/server/app/dashboard/resource-monitor.segments/!KGRhc2hib2FyZCk/dashboard/resource-monitor/__PAGE__.segment.rsc +1 -1
  377. package/app/.next-cli-build/server/app/dashboard/resource-monitor.segments/!KGRhc2hib2FyZCk/dashboard/resource-monitor.segment.rsc +1 -1
  378. package/app/.next-cli-build/server/app/dashboard/resource-monitor.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  379. package/app/.next-cli-build/server/app/dashboard/resource-monitor.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  380. package/app/.next-cli-build/server/app/dashboard/resource-monitor.segments/_full.segment.rsc +7 -7
  381. package/app/.next-cli-build/server/app/dashboard/resource-monitor.segments/_head.segment.rsc +1 -1
  382. package/app/.next-cli-build/server/app/dashboard/resource-monitor.segments/_index.segment.rsc +6 -6
  383. package/app/.next-cli-build/server/app/dashboard/resource-monitor.segments/_tree.segment.rsc +2 -2
  384. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  385. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  386. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +6 -6
  387. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +6 -6
  388. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  389. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +6 -6
  390. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  391. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
  392. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  393. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  394. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  395. package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  396. package/app/.next-cli-build/server/app/dashboard/skills.rsc +8 -8
  397. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +2 -2
  398. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills.segment.rsc +1 -1
  399. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  400. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  401. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +8 -8
  402. package/app/.next-cli-build/server/app/dashboard/skills.segments/_head.segment.rsc +1 -1
  403. package/app/.next-cli-build/server/app/dashboard/skills.segments/_index.segment.rsc +6 -6
  404. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +2 -2
  405. package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
  406. package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +7 -7
  407. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +1 -1
  408. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver.segment.rsc +1 -1
  409. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  410. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  411. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +7 -7
  412. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_head.segment.rsc +1 -1
  413. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_index.segment.rsc +6 -6
  414. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +2 -2
  415. package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  416. package/app/.next-cli-build/server/app/dashboard/translator.rsc +8 -8
  417. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  418. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
  419. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  420. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  421. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +8 -8
  422. package/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
  423. package/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +6 -6
  424. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
  425. package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  426. package/app/.next-cli-build/server/app/dashboard/usage.rsc +8 -8
  427. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
  428. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
  429. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  430. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  431. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +8 -8
  432. package/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
  433. package/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +6 -6
  434. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
  435. package/app/.next-cli-build/server/app/dashboard.html +1 -1
  436. package/app/.next-cli-build/server/app/dashboard.rsc +8 -8
  437. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
  438. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  439. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  440. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +8 -8
  441. package/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
  442. package/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +6 -6
  443. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +2 -2
  444. package/app/.next-cli-build/server/app/index.html +1 -1
  445. package/app/.next-cli-build/server/app/index.rsc +6 -6
  446. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  447. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +6 -6
  448. package/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
  449. package/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +6 -6
  450. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
  451. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  452. package/app/.next-cli-build/server/app/landing.html +1 -1
  453. package/app/.next-cli-build/server/app/landing.rsc +6 -6
  454. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +6 -6
  455. package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
  456. package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +6 -6
  457. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
  458. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
  459. package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
  460. package/app/.next-cli-build/server/app/login/page.js +2 -2
  461. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  462. package/app/.next-cli-build/server/app/login.html +1 -1
  463. package/app/.next-cli-build/server/app/login.rsc +7 -7
  464. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +7 -7
  465. package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
  466. package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +6 -6
  467. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
  468. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  469. package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
  470. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  471. package/app/.next-cli-build/server/app-paths-manifest.json +15 -15
  472. package/app/.next-cli-build/server/chunks/2731.js +30 -16
  473. package/app/.next-cli-build/server/chunks/3110.js +1 -1
  474. package/app/.next-cli-build/server/chunks/402.js +1 -1
  475. package/app/.next-cli-build/server/chunks/4746.js +1 -1
  476. package/app/.next-cli-build/server/chunks/6328.js +1 -1
  477. package/app/.next-cli-build/server/chunks/6759.js +1 -1
  478. package/app/.next-cli-build/server/chunks/6811.js +1 -1
  479. package/app/.next-cli-build/server/chunks/689.js +1 -1
  480. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  481. package/app/.next-cli-build/server/middleware.js +1 -1
  482. package/app/.next-cli-build/server/pages/404.html +1 -1
  483. package/app/.next-cli-build/server/pages/500.html +1 -1
  484. package/app/.next-cli-build/static/chunks/{5263-da00ea4d22d29534.js → 5263-f3451ed7ebe7bdd5.js} +1 -1
  485. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/analytics/page-e1974abdaef5071e.js +1 -0
  486. package/app/.next-cli-build/static/chunks/app/login/page-62f5a0e3540ad0ee.js +1 -0
  487. package/app/.next-cli-build/static/css/{db6f4427d10c1051.css → ec06a7392934be8e.css} +1 -1
  488. package/app/cli/.build-home/AppData/Roaming/bluerouter/db/data.sqlite-shm +0 -0
  489. package/app/cli/.build-home/AppData/Roaming/bluerouter/db/data.sqlite-wal +0 -0
  490. package/app/package.json +1 -1
  491. package/package.json +1 -1
  492. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/analytics/page-d5a9cb0ecf61d1ff.js +0 -1
  493. package/app/.next-cli-build/static/chunks/app/login/page-f91aeeb0177c9f49.js +0 -1
  494. /package/app/.next-cli-build/static/{8rCgYelfbF-PWQlZQM_p7 → KpWibGG_c8Bt5S32s6vsu}/_buildManifest.js +0 -0
  495. /package/app/.next-cli-build/static/{8rCgYelfbF-PWQlZQM_p7 → KpWibGG_c8Bt5S32s6vsu}/_ssgManifest.js +0 -0
  496. /package/app/cli/.build-home/AppData/Roaming/bluerouter/db/backups/{upgrade-5.2.7-to-5.2.8-5.2.8-20260722-150410 → upgrade-5.2.11-to-5.2.12-5.2.12-20260722-161320}/data.sqlite +0 -0
package/app/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bluerouter-app",
3
- "version": "5.2.12",
3
+ "version": "5.2.14",
4
4
  "description": "Router web dashboard",
5
5
  "private": false,
6
6
  "scripts": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jheavenknows/bluerouter",
3
- "version": "5.2.12",
3
+ "version": "5.2.14",
4
4
  "description": "Bluerouter CLI - Start and manage Bluerouter server",
5
5
  "bin": {
6
6
  "bluerouter": "./cli.js"
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8978],{39944:(e,t,s)=>{Promise.resolve().then(s.bind(s,70959))},70959:(e,t,s)=>{"use strict";s.d(t,{default:()=>el});var n=s(95155),l=s(12115),r=s(9233),a=s(94027);r.xI.setOptions({gfm:!0,breaks:!0});let i=[{value:"today",label:"H\xf4m nay"},{value:"todayWorking",label:"H\xf4m nay (Working time)"},{value:"yesterday",label:"H\xf4m qua"},{value:"yesterdayWorking",label:"H\xf4m qua (Working time)"},{value:"24h",label:"24 giờ"},{value:"thisWeek",label:"Tuần n\xe0y"},{value:"lastWeek",label:"Tuần trước"},{value:"7d",label:"7 ng\xe0y"},{value:"thisMonth",label:"Th\xe1ng n\xe0y"},{value:"lastMonth",label:"Th\xe1ng trước"},{value:"30d",label:"30 ng\xe0y"},{value:"60d",label:"60 ng\xe0y"},{value:"all",label:"Tất cả (60 ng\xe0y)"},{value:"custom",label:"T\xf9y chọn"}],o=[{value:"overview",label:"Tổng quan",icon:"dashboard"},{value:"apiKeys",label:"API keys",icon:"vpn_key"},{value:"clients",label:"Client/User",icon:"groups"},{value:"sources",label:"Source IP / Tool",icon:"hub"},{value:"providers",label:"Provider / Model",icon:"dns"},{value:"experience",label:"Trải nghiệm",icon:"speed"},{value:"errors",label:"Lỗi & bất thường",icon:"warning"},{value:"raw",label:"Raw usage",icon:"table"},{value:"aiHealth",label:"Đ\xe1nh gi\xe1 AI",icon:"neurology"}],d="blueRouterAnalyticsTab",c={normal:{className:"border-emerald-500/20 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300",label:"B\xecnh thường"},warning:{className:"border-amber-500/20 bg-amber-500/10 text-amber-700 dark:text-amber-300",label:"Cảnh b\xe1o"},critical:{className:"border-red-500/20 bg-red-500/10 text-red-700 dark:text-red-300",label:"Nghi\xeam trọng"},no_traffic:{className:"border-border bg-surface-2 text-text-muted",label:"Kh\xf4ng c\xf3 lưu lượng"},unknown:{className:"border-border bg-surface-2 text-text-muted",label:"Kh\xf4ng r\xf5"}};function x({status:e}){let t=c[e]||c.unknown;return(0,n.jsxs)("span",{className:T("inline-flex items-center gap-1.5 rounded-full border px-2.5 py-1 text-xs font-semibold",t.className),children:[(0,n.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-current"}),t.label]})}function m(){let[e,t]=(0,l.useState)([]),[s,a]=(0,l.useState)(""),[i,o]=(0,l.useState)(null),[d,c]=(0,l.useState)(!1),[m,u]=(0,l.useState)(!1),[h,p]=(0,l.useState)(""),[b,g]=(0,l.useState)(!1);(0,l.useEffect)(()=>{(async()=>{let e="";try{let t=await fetch("/api/dashboard/analytics/analyze",{cache:"no-store"}),s=await t.json().catch(()=>({}));t.ok&&(o(s.analysis||null),c(!0===s.standby),e=s.selectedModel||"")}catch{}try{let s=await fetch("/api/dashboard/analytics/ai-models",{cache:"no-store"}),n=(await s.json().catch(()=>({}))).options||[];t(n),a(t=>{let s=t||e;return s&&n.some(e=>e.value===s)?s:n[0]?.value||""})}catch{t([])}finally{g(!0)}})()},[]);let j=(0,l.useCallback)(e=>{a(e),fetch("/api/dashboard/analytics/analyze",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:e})}).catch(()=>{})},[]),y=(0,l.useCallback)(async()=>{if(!s)return;let e=s.indexOf("::"),t=s.slice(0,e),n=s.slice(e+2);u(!0),p("");try{let e=await fetch("/api/dashboard/analytics/analyze",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({connectionId:t,model:n})}),s=await e.json().catch(()=>({}));if(!e.ok)throw Error(s.error||"Kh\xf4ng thể ph\xe2n t\xedch");o(s.analysis)}catch(e){p(e?.message||"Kh\xf4ng thể ph\xe2n t\xedch")}finally{u(!1)}},[s]),v=(0,l.useMemo)(()=>i?.summary?r.xI.parse(i.summary):"",[i]);return(0,n.jsxs)("section",{className:"overflow-hidden rounded-3xl border border-border bg-surface shadow-[var(--shadow-soft)]",children:[(0,n.jsx)("div",{className:"flex flex-wrap items-center justify-between gap-4 border-b border-border px-6 py-5",children:(0,n.jsxs)("div",{className:"flex items-center gap-4",children:[(0,n.jsx)("div",{className:"flex h-12 w-12 items-center justify-center rounded-2xl bg-primary/10 text-primary",children:(0,n.jsx)("span",{className:"material-symbols-outlined text-[27px]",children:"neurology"})}),(0,n.jsxs)("div",{children:[(0,n.jsx)("h3",{className:"text-lg font-semibold text-text-main",children:"Đ\xe1nh gi\xe1 AI về trải nghiệm & hiệu năng"}),(0,n.jsx)("p",{className:"mt-0.5 text-xs text-text-muted",children:'Ph\xe2n t\xedch giờ l\xe0m việc h\xf4m nay, tập trung v\xe0o tab "Trải nghiệm" v\xe0 c\xe1c vLLM AI server local. Chạy nền tự động mỗi 1 giờ.'})]})]})}),(0,n.jsxs)("div",{className:"space-y-5 p-6",children:[d?(0,n.jsx)("div",{className:"rounded-xl border border-amber-500/20 bg-amber-500/10 px-4 py-3 text-sm text-amber-700 dark:text-amber-300",children:"Standby mode: kết quả ph\xe2n t\xedch được đồng bộ tự động từ Master. Node n\xe0y kh\xf4ng tự chạy ph\xe2n t\xedch AI."}):null,(0,n.jsxs)("div",{className:"flex flex-wrap items-end gap-3",children:[(0,n.jsxs)("label",{className:"flex min-w-[280px] flex-1 flex-col gap-1.5 text-sm",children:[(0,n.jsx)("span",{className:"text-xs font-medium text-text-muted",children:"AI model d\xf9ng để ph\xe2n t\xedch"}),(0,n.jsxs)("select",{className:"rounded-xl border border-border bg-surface px-3 py-2.5 text-sm text-text-main disabled:opacity-60",value:s,onChange:e=>j(e.target.value),disabled:!e.length||d,children:[e.length?null:(0,n.jsx)("option",{value:"",children:"Chưa c\xf3 kết nối AI n\xe0o đang hoạt động"}),e.map(e=>(0,n.jsx)("option",{value:e.value,children:e.label},e.value))]})]}),(0,n.jsxs)("button",{type:"button",onClick:y,disabled:!s||d||m,className:"flex items-center gap-2 rounded-xl bg-primary px-4 py-2.5 text-sm font-semibold text-white shadow-sm transition disabled:cursor-not-allowed disabled:opacity-60",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:m?"progress_activity":"auto_awesome"}),m?"Đang ph\xe2n t\xedch...":"Ph\xe2n t\xedch lại"]})]}),h?(0,n.jsx)("div",{className:"rounded-xl border border-red-500/20 bg-red-500/10 px-4 py-3 text-sm text-red-600 dark:text-red-300",children:h}):null,i?(0,n.jsxs)("div",{className:"space-y-5",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2 text-xs text-text-muted",children:[(0,n.jsxs)("span",{children:["Model: ",(0,n.jsx)("span",{className:"font-semibold",children:i.modelLabel})]}),(0,n.jsxs)("span",{children:["Cập nhật l\xfac ",i.generatedAt?new Date(i.generatedAt).toLocaleString("vi-VN"):"-"]})]}),(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,n.jsx)("span",{className:"text-xs text-text-muted",children:"Tổng quan:"}),(0,n.jsx)(x,{status:i.status}),(0,n.jsx)("span",{className:"text-xs text-text-muted",children:"vLLM local:"}),(0,n.jsx)(x,{status:i.vllmStatus}),"number"==typeof i.vllmServerCount?(0,n.jsxs)("span",{className:"text-xs text-text-subtle",children:["(",i.vllmServerCount," node)"]}):null]}),(0,n.jsx)("div",{className:"analytics-ai-body rounded-2xl border border-border bg-surface-2/40 p-5 text-sm leading-6 text-text-main",dangerouslySetInnerHTML:{__html:v}})]}):!m&&b?(0,n.jsx)("div",{className:"rounded-2xl border border-dashed border-border bg-surface-2/40 py-10 text-center text-sm text-text-muted",children:'Chưa c\xf3 ph\xe2n t\xedch n\xe0o — bấm "Ph\xe2n t\xedch lại" để bắt đầu.'}):null]})]})}function u(e,t=0){return Number(e||0).toLocaleString("vi-VN",{maximumFractionDigits:t})}function h(e){let t=Number(e||0);return Intl.NumberFormat("vi-VN",{notation:"compact",maximumFractionDigits:1}).format(t)}function p(e){let t=100*Number(e||0);return`${t.toLocaleString("vi-VN",{maximumFractionDigits:1})}%`}function b(e){let t=Number(e||0);return t?`$${t.toLocaleString("vi-VN",{minimumFractionDigits:4,maximumFractionDigits:6})}`:"$0"}function g(e){if(null==e||Number.isNaN(Number(e)))return"-";let t=Number(e);return t>=1e3?`${(t/1e3).toLocaleString("vi-VN",{maximumFractionDigits:2})}s`:`${t.toLocaleString("vi-VN",{maximumFractionDigits:0})}ms`}function j(e,t="/s"){if(null==e||Number.isNaN(Number(e)))return"-";let s=Number(e);return`${s.toLocaleString("vi-VN",{maximumFractionDigits:s>=10?1:2})}${t}`}function y(e){return null==e||Number.isNaN(Number(e))?"-":`${Number(e).toLocaleString("vi-VN",{maximumFractionDigits:0})}/100`}function v(e){if(!e)return null;let t=String(e).trim();return new Date(/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}(?:\.\d+)?$/.test(t)?`${t.replace(" ","T")}Z`:t)}function k(e){if(!e)return"-";try{let t=v(e);if(!t||Number.isNaN(t.getTime()))return String(e);return t.toLocaleString("vi-VN",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})}catch{return String(e)}}function f(e){if(!e)return"";try{let t=v(e);if(!t||Number.isNaN(t.getTime()))return String(e);return t.toLocaleString("vi-VN",{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!1})}catch{return String(e)}}function N(){let{isAdmin:e,isMonitorAdmin:t,isAiGatewaysMonitor:s}=(0,a.s)();return e||t||s}function T(...e){return e.filter(Boolean).join(" ")}function w(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone||"UTC"}catch{return"UTC"}}function q(e,t={}){let s=new URLSearchParams;return Object.entries({...e,...t}).forEach(([e,t])=>{let n=String(t??"").trim();n&&s.set(e,n)}),s.toString()}function S({children:e,className:t=""}){return(0,n.jsx)("div",{className:T("min-w-0 rounded-2xl border border-border bg-surface p-5 shadow-sm",t),children:e})}function P({icon:e,label:t,value:s,hint:l,help:r,tone:a="blue"}){return(0,n.jsx)(S,{className:"min-h-[126px]",children:(0,n.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"text-sm font-medium text-text-muted",children:t}),(0,n.jsx)("div",{className:"mt-2 text-2xl font-semibold text-text-main",children:s}),l?(0,n.jsx)("div",{className:"mt-2 text-xs text-text-muted",children:l}):null,r?(0,n.jsx)("div",{className:"mt-1 text-[11px] leading-4 text-text-muted/70",children:r}):null]}),(0,n.jsx)("div",{className:T("flex h-10 w-10 items-center justify-center rounded-xl",{blue:"bg-blue-500/10 text-blue-600 dark:text-blue-300",green:"bg-green-500/10 text-green-600 dark:text-green-300",red:"bg-red-500/10 text-red-600 dark:text-red-300",amber:"bg-amber-500/10 text-amber-600 dark:text-amber-300",purple:"bg-purple-500/10 text-purple-600 dark:text-purple-300",slate:"bg-slate-500/10 text-slate-600 dark:text-slate-300"}[a]||"bg-blue-500/10 text-blue-600 dark:text-blue-300"),children:(0,n.jsx)("span",{className:"material-symbols-outlined text-[22px]",children:e})})]})})}function I({label:e,children:t}){return(0,n.jsxs)("label",{className:"space-y-1.5 text-xs font-medium text-text-muted",children:[(0,n.jsx)("span",{children:e}),t]})}function R({value:e,onChange:t,children:s}){return(0,n.jsx)("select",{value:e||"",onChange:e=>t(e.target.value),className:"h-10 w-full rounded-xl border border-border bg-background px-3 text-sm text-text-main outline-none transition focus:border-primary/60 focus:ring-2 focus:ring-primary/20",children:s})}function M({value:e,onChange:t,placeholder:s="",type:l="text"}){return(0,n.jsx)("input",{value:e||"",type:l,onChange:e=>t(e.target.value),placeholder:s,className:"h-10 w-full rounded-xl border border-border bg-background px-3 text-sm text-text-main outline-none transition placeholder:text-text-muted/60 focus:border-primary/60 focus:ring-2 focus:ring-primary/20"})}function L(){return(0,n.jsxs)("div",{className:"space-y-4",children:[(0,n.jsx)("div",{className:"grid gap-4 md:grid-cols-2 xl:grid-cols-4",children:Array.from({length:8}).map((e,t)=>(0,n.jsx)("div",{className:"h-32 animate-pulse rounded-2xl border border-border bg-surface"},t))}),(0,n.jsx)("div",{className:"h-80 animate-pulse rounded-2xl border border-border bg-surface"})]})}function C({title:e="Kh\xf4ng c\xf3 dữ liệu",description:t="Kh\xf4ng t\xecm thấy dữ liệu theo bộ lọc hiện tại."}){return(0,n.jsxs)("div",{className:"flex min-h-[180px] flex-col items-center justify-center rounded-2xl border border-dashed border-border bg-surface/60 p-8 text-center",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-4xl text-text-muted",children:"database_off"}),(0,n.jsx)("div",{className:"mt-3 text-sm font-semibold text-text-main",children:e}),(0,n.jsx)("div",{className:"mt-1 max-w-xl text-sm text-text-muted",children:t})]})}function A({data:e=[],valueKey:t="totalTokens",secondaryKey:s="requests",height:l=220}){let r=e||[],a=Math.max(...r.map(e=>Number(e[t]||0)),1),i=Math.max(...r.map(e=>Number(e[s]||0)),1);return 0===r.length?(0,n.jsx)(C,{description:"Chưa c\xf3 time-series trong khoảng thời gian n\xe0y."}):(0,n.jsx)("div",{className:"overflow-x-auto",children:(0,n.jsxs)("div",{className:"min-w-[720px]",children:[(0,n.jsx)("div",{className:"flex items-end gap-1",style:{height:l},children:r.map((e,r)=>{let o=Math.max(2,Number(e[t]||0)/a*(l-42)),d=Math.max(2,Number(e[s]||0)/i*(l-42));return(0,n.jsx)("div",{className:"group flex flex-1 flex-col items-center justify-end gap-1",children:(0,n.jsxs)("div",{className:"relative flex h-full w-full max-w-[34px] items-end justify-center gap-0.5",children:[(0,n.jsx)("div",{className:"w-2 rounded-t bg-primary/70",style:{height:o}}),(0,n.jsx)("div",{className:"w-2 rounded-t bg-amber-500/70",style:{height:d}}),(0,n.jsxs)("div",{className:"pointer-events-none absolute bottom-full left-1/2 z-20 hidden w-56 -translate-x-1/2 rounded-xl border border-border bg-surface p-3 text-left text-xs shadow-xl group-hover:block",children:[(0,n.jsx)("div",{className:"font-semibold text-text-main",children:f(e.label)}),(0,n.jsxs)("div",{className:"mt-1 text-text-muted",children:["Request: ",u(e.requests)]}),(0,n.jsxs)("div",{className:"text-text-muted",children:["Input token: ",u(e.promptTokens)]}),(0,n.jsxs)("div",{className:"text-text-muted",children:["Output token: ",u(e.completionTokens)]}),(0,n.jsxs)("div",{className:"text-text-muted",children:["Tổng token: ",u(e.totalTokens)]}),(0,n.jsxs)("div",{className:"text-text-muted",children:["Lỗi: ",u(e.errors)]})]})]})},`${e.label}-${r}`)})}),(0,n.jsxs)("div",{className:"mt-3 flex justify-between gap-2 text-[11px] text-text-muted",children:[(0,n.jsx)("span",{children:f(r[0]?.label)}),(0,n.jsx)("span",{children:f(r[Math.floor(r.length/2)]?.label)}),(0,n.jsx)("span",{children:f(r[r.length-1]?.label)})]})]})})}function $(){return(0,n.jsxs)("div",{className:"flex flex-wrap gap-3 text-xs text-text-muted",children:[(0,n.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,n.jsx)("span",{className:"h-2.5 w-2.5 rounded-sm bg-primary/70"}),"Token"]}),(0,n.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,n.jsx)("span",{className:"h-2.5 w-2.5 rounded-sm bg-amber-500/70"}),"Request"]})]})}function K({columns:e,rows:t,empty:s="Kh\xf4ng c\xf3 dữ liệu"}){return t&&0!==t.length?(0,n.jsx)("div",{className:"overflow-x-auto overflow-y-auto rounded-2xl border border-border",style:{maxHeight:"500px"},children:(0,n.jsxs)("table",{className:"min-w-full divide-y divide-border text-sm",children:[(0,n.jsx)("thead",{className:"bg-background/70",children:(0,n.jsx)("tr",{children:e.map(e=>(0,n.jsx)("th",{className:T("whitespace-nowrap px-4 py-3 text-left text-xs font-semibold uppercase tracking-wide text-text-muted",e.className),children:e.label},e.key))})}),(0,n.jsx)("tbody",{className:"divide-y divide-border bg-surface",children:t.map((t,s)=>(0,n.jsx)("tr",{className:"hover:bg-background/60",children:e.map(e=>(0,n.jsx)("td",{className:T("whitespace-nowrap px-4 py-3 align-top text-text-main",e.className),children:e.render?e.render(t,s):t[e.key]??"-"},e.key))},t.key||t.id||`${t.label}-${s}`))})]})}):(0,n.jsx)(C,{title:s})}function O({items:e=[]}){return e&&0!==e.length?(0,n.jsx)("div",{className:"flex max-w-[360px] flex-wrap gap-1.5",children:e.slice(0,3).map(e=>(0,n.jsxs)("span",{className:"rounded-full bg-primary/10 px-2 py-0.5 text-xs text-primary",children:[e.label||e.key," \xb7 ",u(e.count??e.requests??e.totalTokens??0)]},e.key))}):(0,n.jsx)("span",{className:"text-text-muted",children:"-"})}function F({row:e}){return(0,n.jsxs)("div",{className:"space-y-1 text-xs",children:[(0,n.jsxs)("div",{className:"font-semibold text-text-main",children:[h(e.totalTokens)," token"]}),(0,n.jsxs)("div",{className:"text-text-muted",children:["In ",h(e.promptTokens)," / Out ",h(e.completionTokens)]})]})}function E({leaderboard:e={}}){let t=N(),s=e.rows||[],l=e.status||"warming",r="ready"===l?`${e.periodLabel||"H\xf4m nay"} \xb7 cập nhật ${k(e.generatedAt)} \xb7 refresh nền mỗi ${Math.round((e.refreshEveryMs||9e5)/6e4)} ph\xfat`:"error"===l?"Leaderboard đang chờ job nền tổng hợp lại dữ liệu.":"Leaderboard đang được job nền khởi tạo.";return(0,n.jsxs)(S,{className:"border-amber-500/20 bg-amber-500/[0.03]",children:[(0,n.jsxs)("div",{className:"mb-4 flex flex-wrap items-start justify-between gap-3",children:[(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-2xl text-amber-500",children:"crown"}),(0,n.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Top 5 vinh danh token"})]}),(0,n.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Xếp hạng theo API key owner d\xf9ng nhiều input + output token nhất."})]}),(0,n.jsx)("span",{className:"rounded-full bg-amber-500/10 px-3 py-1 text-xs font-semibold text-amber-700 dark:text-amber-300",children:r})]}),(0,n.jsx)(K,{rows:s,empty:"Chưa c\xf3 snapshot leaderboard từ job nền.",columns:[{key:"rank",label:"Hạng",render:e=>(0,n.jsxs)("div",{className:"flex min-w-[170px] items-center gap-3",children:[(0,n.jsx)("div",{className:T("flex h-10 w-10 shrink-0 items-center justify-center rounded-xl",1===e.rank?"bg-amber-500/15 text-amber-600":"bg-primary/10 text-primary"),children:(0,n.jsx)("span",{className:"material-symbols-outlined text-[22px]",children:"crown"})}),(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"font-semibold text-text-main",children:["#",e.rank," \xb7 ",e.title]}),(0,n.jsxs)("div",{className:"text-xs text-text-muted",children:[p(e.tokenShare||0)," tổng token"]})]})]})},{key:"owner",label:"Owner",render:e=>(0,n.jsxs)("div",{className:"min-w-[210px]",children:[(0,n.jsx)("div",{className:"font-semibold text-text-main",children:e.ownerUser||e.label}),(0,n.jsxs)("div",{className:"text-xs text-text-muted",children:[e.apiKeyName||"API key",t&&e.apiKeyFingerprint?` \xb7 ${e.apiKeyFingerprint}`:""]})]})},{key:"requests",label:"Req",render:e=>u(e.requests)},{key:"tokens",label:"Token",render:e=>(0,n.jsx)(F,{row:e})},{key:"scope",label:"Phạm vi",render:e=>(0,n.jsxs)("div",{className:"text-xs text-text-muted",children:[(0,n.jsxs)("div",{children:["API key ",u(e.apiKeyCount)," \xb7 IP ",u(e.sourceIpCount)]}),(0,n.jsxs)("div",{children:["Model ",u(e.modelCount)," \xb7 Provider ",u(e.providerCount)]})]})},{key:"lastSeen",label:"Last seen",render:e=>k(e.lastSeen)}]})]})}function _({value:e}){let t=Number(e||0);return(0,n.jsx)("span",{className:T("rounded-full px-2 py-1 text-xs font-semibold",t>=.2?"bg-red-500/10 text-red-600 dark:text-red-300":t>=.05?"bg-amber-500/10 text-amber-600 dark:text-amber-300":"bg-green-500/10 text-green-600 dark:text-green-300"),children:p(t)})}function U({level:e,label:t}){let s=String(e||"none");return(0,n.jsx)("span",{className:T("rounded-full px-2 py-1 text-xs font-semibold",{fast:"bg-green-500/10 text-green-700 dark:text-green-300",ok:"bg-blue-500/10 text-blue-700 dark:text-blue-300",slow:"bg-amber-500/10 text-amber-700 dark:text-amber-300",very_slow:"bg-red-500/10 text-red-700 dark:text-red-300",low_sample:"bg-amber-500/10 text-amber-700 dark:text-amber-300",none:"bg-slate-500/10 text-slate-700 dark:text-slate-300"}[s]||"bg-slate-500/10 text-slate-700 dark:text-slate-300"),children:t||"-"})}function H({level:e,label:t}){let s=String(e||"normal");return(0,n.jsx)("span",{className:T("rounded-full px-2 py-1 text-xs font-semibold",{critical:"bg-red-500/10 text-red-700 dark:text-red-300",high:"bg-amber-500/10 text-amber-700 dark:text-amber-300",medium:"bg-blue-500/10 text-blue-700 dark:text-blue-300",normal:"bg-green-500/10 text-green-700 dark:text-green-300",none:"bg-slate-500/10 text-slate-700 dark:text-slate-300"}[s]||"bg-slate-500/10 text-slate-700 dark:text-slate-300"),children:t||"-"})}function V({value:e}){let t=String(e||"unknown"),s={gateway:{label:"Gateway",cls:"bg-purple-500/10 text-purple-700 dark:text-purple-300"},upstream:{label:"Upstream",cls:"bg-red-500/10 text-red-700 dark:text-red-300"},client:{label:"Client",cls:"bg-slate-500/10 text-slate-700 dark:text-slate-300"},rate_limit:{label:"Rate limit",cls:"bg-amber-500/10 text-amber-700 dark:text-amber-300"},unknown:{label:"Unknown",cls:"bg-zinc-500/10 text-zinc-700 dark:text-zinc-300"}}[t]||{label:t,cls:"bg-zinc-500/10 text-zinc-700 dark:text-zinc-300"};return(0,n.jsx)("span",{className:T("rounded-full px-2 py-1 text-xs font-semibold",s.cls),children:s.label})}function D({row:e}){let t=e.sampleMessage||e.errorMessageShort||"";return t?(0,n.jsx)("span",{className:"block max-w-[360px] truncate text-xs text-text-muted",title:t,children:t}):(0,n.jsx)("span",{className:"text-text-muted",children:"-"})}function B({icon:e,label:t,value:s,hint:l,tone:r="slate"}){return(0,n.jsx)("div",{className:T("rounded-2xl border p-4 shadow-sm",{red:"border-red-500/20 bg-red-500/10 text-red-700 dark:text-red-300",amber:"border-amber-500/20 bg-amber-500/10 text-amber-700 dark:text-amber-300",purple:"border-purple-500/20 bg-purple-500/10 text-purple-700 dark:text-purple-300",slate:"border-border bg-surface text-text-main",green:"border-green-500/20 bg-green-500/10 text-green-700 dark:text-green-300"}[r]||"border-border bg-surface text-text-main"),children:(0,n.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"text-xs font-semibold uppercase tracking-wide opacity-75",children:t}),(0,n.jsx)("div",{className:"mt-2 text-2xl font-bold",children:u(s)}),l?(0,n.jsx)("div",{className:"mt-1 text-xs opacity-80",children:l}):null]}),(0,n.jsx)("span",{className:"material-symbols-outlined text-[24px] opacity-80",children:e})]})})}function G({anomaly:e}){let t="danger"===e.level?"border-red-500/30 bg-red-500/10 text-red-700 dark:text-red-300":"border-amber-500/30 bg-amber-500/10 text-amber-700 dark:text-amber-300",s="danger"===e.level?"error":"warning";return(0,n.jsx)("div",{className:T("rounded-2xl border p-4",t),children:(0,n.jsxs)("div",{className:"flex gap-3",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-[22px]",children:s}),(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"font-semibold",children:e.title}),(0,n.jsx)("div",{className:"mt-1 text-sm opacity-90",children:e.detail})]})]})})}function z({notes:e=[]}){return e.length?(0,n.jsx)("div",{className:"space-y-2 rounded-2xl border border-blue-500/20 bg-blue-500/10 p-4 text-sm text-blue-700 dark:text-blue-300",children:e.map((e,t)=>(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"info"}),(0,n.jsx)("span",{children:e})]},t))}):null}function X(e){let t=e=>String(e).padStart(2,"0");return`${e.getFullYear()}-${t(e.getMonth()+1)}-${t(e.getDate())}T${t(e.getHours())}:${t(e.getMinutes())}`}function W({filters:e,setFilters:t,options:s,onRefresh:l,onExportCsv:r,loading:a,showProviderFilters:o=!0}){let d=(e,s)=>{let n=null;t(t=>{if("period"===e&&"custom"===s){let e,l;return n={...t,period:s,...((l=new Date(e=new Date)).setHours(8,0,0,0),{dateFrom:X(l),dateTo:X(e)})}}return{...t,[e]:s}}),n&&l?.(n)};return(0,n.jsxs)(S,{children:[(0,n.jsxs)("div",{className:"grid gap-3 md:grid-cols-2 xl:grid-cols-6",children:[(0,n.jsx)(I,{label:"Khoảng thời gian",children:(0,n.jsx)(R,{value:e.period,onChange:e=>d("period",e),children:i.map(e=>(0,n.jsx)("option",{value:e.value,children:e.label},e.value))})}),(0,n.jsx)(I,{label:"Từ ng\xe0y",children:(0,n.jsx)(M,{type:"datetime-local",value:e.dateFrom,onChange:e=>d("dateFrom",e)})}),(0,n.jsx)(I,{label:"Đến ng\xe0y",children:(0,n.jsx)(M,{type:"datetime-local",value:e.dateTo,onChange:e=>d("dateTo",e)})}),o?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(I,{label:"Provider",children:(0,n.jsxs)(R,{value:e.provider,onChange:e=>d("provider",e),children:[(0,n.jsx)("option",{value:"",children:"Tất cả provider"}),(s.providers||[]).map(e=>{let t="string"==typeof e?e:e.value,s="string"==typeof e?e:e.label||e.value;return(0,n.jsx)("option",{value:t,children:s},t)})]})}),(0,n.jsx)(I,{label:"Model",children:(0,n.jsxs)(R,{value:e.model,onChange:e=>d("model",e),children:[(0,n.jsx)("option",{value:"",children:"Tất cả model"}),(s.models||[]).map(e=>(0,n.jsx)("option",{value:e,children:e},e))]})}),(0,n.jsx)(I,{label:"Provider account",children:(0,n.jsxs)(R,{value:e.connectionId,onChange:e=>d("connectionId",e),children:[(0,n.jsx)("option",{value:"",children:"Tất cả account"}),(s.connections||[]).map(e=>(0,n.jsx)("option",{value:e.value,children:e.label},e.value))]})})]}):null,(0,n.jsx)(I,{label:"API key",children:(0,n.jsxs)(R,{value:e.apiKey,onChange:e=>d("apiKey",e),children:[(0,n.jsx)("option",{value:"",children:"Tất cả API key"}),(s.apiKeys||[]).map(e=>(0,n.jsx)("option",{value:e.value,children:e.label},e.value))]})}),(0,n.jsx)(I,{label:"Source IP",children:(0,n.jsx)(M,{value:e.clientIp,onChange:e=>d("clientIp",e),placeholder:"172.16.253.1"})}),(0,n.jsx)(I,{label:"Source tool",children:(0,n.jsx)(M,{value:e.sourceTool,onChange:e=>d("sourceTool",e),placeholder:"copilot, antigravity..."})}),(0,n.jsx)(I,{label:"Endpoint",children:(0,n.jsxs)(R,{value:e.endpoint,onChange:e=>d("endpoint",e),children:[(0,n.jsx)("option",{value:"",children:"Tất cả endpoint"}),(s.endpoints||[]).map(e=>(0,n.jsx)("option",{value:e,children:e},e))]})}),(0,n.jsx)(I,{label:"Status",children:(0,n.jsxs)(R,{value:e.status,onChange:e=>d("status",e),children:[(0,n.jsx)("option",{value:"",children:"Tất cả status"}),(s.statuses||[]).map(e=>(0,n.jsx)("option",{value:e,children:e},e))]})}),(0,n.jsx)(I,{label:"Session / keyword",children:(0,n.jsx)(M,{value:e.sessionId||e.keyword,onChange:e=>d("keyword",e),placeholder:"session, prompt, error..."})})]}),(0,n.jsxs)("div",{className:"mt-4 flex flex-wrap items-center justify-between gap-3",children:[(0,n.jsx)("div",{className:"text-xs text-text-muted",children:"Token/cost lấy từ UsageHistory. Source IP/tool/session lấy từ Prompt Logs."}),(0,n.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,n.jsx)("button",{onClick:()=>t({period:"today",dateFrom:"",dateTo:"",provider:"",model:"",connectionId:"",status:"",endpoint:"",apiKey:"",clientIp:"",sourceTool:"",sessionId:"",keyword:""}),className:"rounded-xl border border-border px-3 py-2 text-sm font-medium text-text-main hover:bg-background",children:"Reset"}),(0,n.jsxs)("button",{onClick:r,className:"rounded-xl border border-border px-3 py-2 text-sm font-medium text-text-main hover:bg-background",children:[(0,n.jsx)("span",{className:"material-symbols-outlined mr-1 align-[-4px] text-[18px]",children:"download"}),"Export CSV"]}),(0,n.jsxs)("button",{onClick:()=>l?.(),disabled:a,className:"rounded-xl bg-primary px-4 py-2 text-sm font-semibold text-white shadow-sm disabled:opacity-60",children:[(0,n.jsx)("span",{className:"material-symbols-outlined mr-1 align-[-4px] text-[18px]",children:"refresh"}),a?"Đang tải...":"Refresh"]})]})]})]})}function J({data:e}){let t=N(),s=e.overview||{},l=e.latency||{},r=e.experience||{};return(0,n.jsxs)("div",{className:"space-y-5",children:[(0,n.jsx)(E,{leaderboard:e.tokenLeaderboard}),(0,n.jsxs)("div",{className:"grid gap-4 md:grid-cols-2 xl:grid-cols-4",children:[(0,n.jsx)(P,{icon:"call_made",label:"Tổng request",value:u(s.requests),hint:`${u(s.requestsPerMinute,2)} request/ph\xfat`,help:"Số request khớp bộ lọc hiện tại."}),(0,n.jsx)(P,{icon:"check_circle",label:"Th\xe0nh c\xf4ng",value:u(s.success),hint:`Tỷ lệ lỗi ${p(s.errorRate)}`,help:"Request trả về th\xe0nh c\xf4ng v\xe0 c\xf3 trạng th\xe1i OK.",tone:"green"}),(0,n.jsx)(P,{icon:"dns",label:"Lỗi server/provider",value:u(s.serverErrorEvents),hint:`Server-impacting ${p(s.serverErrorRate)} \xb7 client ${u(s.clientErrorEvents)}`,help:"Lỗi từ gateway, provider hoặc model server; t\xe1ch ri\xeang lỗi client.",tone:s.serverErrorEvents?"red":"green"}),(0,n.jsx)(P,{icon:"speed",label:"Trải nghiệm",value:y(r.score),hint:`${r.label||"-"} \xb7 ${u(r.samples)} mẫu`,help:"Điểm tổng hợp từ latency, TTFT, lỗi v\xe0 tốc độ phản hồi.",tone:r.tone||"purple"}),(0,n.jsx)(P,{icon:"timer",label:"Latency P95",value:g(r.p95LatencyMs||l.p95Ms),hint:`AVG ${g(r.avgLatencyMs||l.avgMs)} \xb7 P50 ${g(r.p50LatencyMs||l.p50Ms)}`,help:"95% request ho\xe0n tất nhanh hơn gi\xe1 trị n\xe0y.",tone:"purple"}),(0,n.jsx)(P,{icon:"bolt",label:"TTFT P95",value:g(r.p95TtftMs),hint:"Thời gian chờ token đầu ti\xean",help:"95% request nhận token đầu ti\xean nhanh hơn gi\xe1 trị n\xe0y.",tone:r.slowTtftRate>=.2?"amber":"blue"}),(0,n.jsx)(P,{icon:"input",label:"Input P95",value:h(r.p95PromptTokens||0),hint:`Avg ${h(r.avgPromptTokens||s.avgPromptTokens)} \xb7 >=30k ${p(r.longInputRate)}`,help:"95% request c\xf3 k\xedch thước input nhỏ hơn gi\xe1 trị n\xe0y."}),(0,n.jsx)(P,{icon:"psychology_alt",label:"Auto-off thinking",value:p(e.thinkingAnalytics?.autoOffRate),hint:`${u(e.thinkingAnalytics?.autoOffRequests||0)} request bị tắt theo policy`,help:"Tỷ lệ request bị tắt thinking do vượt ngưỡng hoặc policy.",tone:(e.thinkingAnalytics?.autoOffRate||0)>=.3?"amber":"slate"}),(0,n.jsx)(P,{icon:"data_object",label:"Large context >=50k",value:p(e.largeContextAnalytics?.gte50kRate),hint:`>=100k ${p(e.largeContextAnalytics?.gte100kRate)}`,help:"Tỷ lệ request c\xf3 context rất lớn, dễ l\xe0m tăng TTFT/latency.",tone:(e.largeContextAnalytics?.gte50kRate||0)>=.3?"amber":"slate"}),(0,n.jsx)(P,{icon:"person_alert",label:"Top user nặng",value:s.topHeavyUser||"-",hint:`Chiếm ${p(s.topHeavyUserTokenShare)} tổng token`,help:"User/API key ti\xeau thụ nhiều token nhất trong bộ lọc.",tone:s.topHeavyUserTokenShare>=.35?"amber":"slate"}),(0,n.jsx)(P,{icon:"running_with_errors",label:"Request chậm",value:p(r.slowRequestRate),hint:`>= ${g(r.thresholds?.slowLatencyMs||45e3)} \xb7 max ${g(r.maxLatencyMs)}`,help:"Tỷ lệ request vượt ngưỡng chậm đ\xe3 cấu h\xecnh.",tone:r.slowRequestRate>=.2?"amber":"green"}),(0,n.jsx)(P,{icon:"output",label:"Output tokens",value:h(s.completionTokens),hint:`Avg ${u(s.avgCompletionTokens,1)} / request`,help:"Tổng token model sinh ra."}),(0,n.jsx)(P,{icon:"token",label:"Tổng tokens",value:h(s.totalTokens),hint:`${h(s.tokensPerMinute)} token/ph\xfat`,help:"Tổng input + output token.",tone:"amber"}),(0,n.jsx)(P,{icon:"speed",label:"Output speed",value:j(r.decodeTokensPerSecond," tok/s"),hint:`Latency/10k input ${g(r.latencyMsPer10kInputTokens)}`,help:"Tốc độ sinh token trung b\xecnh sau khi model bắt đầu trả lời.",tone:"slate"}),(0,n.jsx)(P,{icon:"payments",label:"Cost ước t\xednh",value:b(s.cost),hint:"Dựa tr\xean pricing đ\xe3 cấu h\xecnh",help:"Chi ph\xed suy ra từ token usage v\xe0 bảng gi\xe1 hiện tại.",tone:"green"})]}),(0,n.jsxs)("div",{className:"grid min-w-0 gap-5 xl:grid-cols-[2fr_1fr]",children:[(0,n.jsxs)(S,{children:[(0,n.jsxs)("div",{className:"mb-4 flex flex-wrap items-center justify-between gap-3",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Tần suất request & token theo thời gian"}),(0,n.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Cột xanh l\xe0 token, cột v\xe0ng l\xe0 số request trong từng bucket thời gian."})]}),(0,n.jsx)($,{})]}),(0,n.jsx)(A,{data:e.timeSeries||[]})]}),(0,n.jsxs)(S,{children:[(0,n.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"T\xf3m tắt active"}),(0,n.jsx)("div",{className:"mt-4 space-y-3",children:[["API key đang d\xf9ng",s.activeApiKeys],["Provider active",s.activeProviders],["Model active",s.activeModels],["Endpoint active",s.activeEndpoints],["Cached tokens",s.cachedTokens],["Reasoning tokens",s.reasoningTokens],["Latency AVG",g(r.avgLatencyMs||l.avgMs)],["Latency P50",g(r.p50LatencyMs||l.p50Ms)],["Latency P99",g(r.p99LatencyMs||l.p99Ms)],["TTFT P95",g(r.p95TtftMs)],["Input P95",h(r.p95PromptTokens||0)],["Long input >=30k",p(r.longInputRate)]].map(([e,t])=>(0,n.jsxs)("div",{className:"flex items-center justify-between rounded-xl bg-background px-3 py-2",children:[(0,n.jsx)("span",{className:"text-sm text-text-muted",children:e}),(0,n.jsx)("span",{className:"font-semibold text-text-main",children:"number"==typeof t?u(t):t})]},e))})]})]}),(0,n.jsxs)("div",{className:"grid gap-5 xl:grid-cols-2",children:[(0,n.jsxs)(S,{children:[(0,n.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Top API key d\xf9ng nhiều token"}),(0,n.jsx)(K,{rows:(e.clientRequests?.topApiKeysByTokens||e.groups?.apiKeys||[]).slice(0,8),columns:[{key:"name",label:"API key",render:e=>(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"font-semibold",children:e.name||e.label}),(0,n.jsxs)("div",{className:"text-xs text-text-muted",children:[t?e.fingerprint||e.apiKeyFingerprint:"",e.ownerUser||e.apiKeyOwner?`${t&&(e.fingerprint||e.apiKeyFingerprint)?" \xb7 ":""}${e.ownerUser||e.apiKeyOwner}`:""]})]})},{key:"requests",label:"Req",render:e=>u(e.requests)},{key:"tokens",label:"Token",render:e=>(0,n.jsx)(F,{row:e})},{key:"input",label:"P95/Max input",render:e=>(0,n.jsxs)("div",{className:"text-xs",children:[(0,n.jsx)("div",{children:h(e.p95PromptTokens||0)}),(0,n.jsxs)("div",{className:"text-text-muted",children:["max ",h(e.maxPromptTokens||0)]})]})}]})]}),(0,n.jsxs)(S,{children:[(0,n.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Top Source IP d\xf9ng nhiều token"}),(0,n.jsx)(K,{rows:(e.clientRequests?.topSourceIpsByTokens||[]).slice(0,8),columns:[{key:"label",label:"Source IP",render:e=>(0,n.jsx)("span",{className:"font-mono text-xs",children:e.label})},{key:"requests",label:"Req",render:e=>u(e.requests)},{key:"tokens",label:"Token",render:e=>(0,n.jsx)(F,{row:e})},{key:"heavy",label:"Nặng",render:e=>(0,n.jsxs)("span",{className:"text-xs text-text-muted",children:[u(e.heavyRequests||0)," req"]})}],empty:"Kh\xf4ng c\xf3 Source IP c\xf3 token trong khoảng lọc."})]})]})]})}function Z({data:e}){let t=N(),s=e.clientRequests||{},l=s.summary||{},r=s.topHeavyUsers||[],a=s.topProblemClients||[],i=s.topApiKeysByTokens||[],o=s.topSourceIpsByTokens||[];s.topSourceIpsByHeavyRequests;let d=s.inputBuckets||[],c=e=>(0,n.jsxs)("div",{className:"min-w-[220px]",children:[(0,n.jsx)("div",{className:"font-semibold text-text-main",children:e.label}),(0,n.jsx)("div",{className:"mt-1 text-xs text-text-muted",children:e.ownerUser?`Owner ${e.ownerUser}`:e.apiKeyName||"Kh\xf4ng c\xf3 owner"}),(0,n.jsx)("div",{className:"font-mono text-[11px] text-text-muted",children:t?e.apiKeyFingerprint||e.primaryClientIp||e.key:e.primaryClientIp||""})]}),x=e=>(0,n.jsxs)("div",{className:"space-y-1 text-xs",children:[(0,n.jsxs)("div",{children:["Nặng ",u(e.heavyRequests)," \xb7 ",p(e.heavyRequestRate)]}),(0,n.jsxs)("div",{className:"text-text-muted",children:["P95 input ",h(e.p95PromptTokens)," \xb7 Max ",h(e.maxPromptTokens)]}),(0,n.jsxs)("div",{className:"text-text-muted",children:[">=70k ",u(e.extremeInputRequests)," \xb7 ",p(e.extremeInputRate)]})]});return(0,n.jsxs)("div",{className:"space-y-5",children:[(0,n.jsxs)("div",{className:"grid gap-4 md:grid-cols-2 xl:grid-cols-4",children:[(0,n.jsx)(P,{icon:"person_alert",label:"Top user nặng nhất",value:l.topUserLabel||"-",hint:`${h(l.topUserTokens)} token \xb7 ${p(l.topUserTokenShare)} tổng token`,tone:l.topUserTokenShare>=.35?"amber":"slate"}),(0,n.jsx)(P,{icon:"vpn_key",label:"Top API key nhiều token",value:l.topApiKeyLabel||"-",hint:`${h(l.topApiKeyTokens)} token \xb7 ${p(l.topApiKeyTokenShare)} tổng token`,tone:l.topApiKeyTokenShare>=.35?"amber":"blue"}),(0,n.jsx)(P,{icon:"lan",label:"Top IP nhiều token",value:l.topSourceIpLabel||"-",hint:`${h(l.topSourceIpTokens)} token \xb7 ${p(l.topSourceIpTokenShare)} tổng token`,tone:l.topSourceIpTokenShare>=.35?"amber":"purple"}),(0,n.jsx)(P,{icon:"input",label:"Input d\xe0i >=30k",value:p(l.longInputBucketShare||0),hint:`>=70k ${p(l.extremeInputShare||0)}`,tone:(l.extremeInputShare||0)>=.1?"amber":"green"}),(0,n.jsx)(P,{icon:"groups",label:"User/API key được theo d\xf5i",value:u(l.trackedUsers||0),hint:"Theo owner/API key fingerprint/source IP",tone:"blue"}),(0,n.jsx)(P,{icon:"network_check",label:"Top IP request nặng",value:l.topSourceIpHeavyLabel||"-",hint:`${u(l.topSourceIpHeavyRequests||0)} request >=30k input/total`,tone:l.topSourceIpHeavyRequests?"amber":"slate"}),(0,n.jsx)(P,{icon:"report",label:"Client lỗi nhiều",value:u(l.problemClients||0),hint:"Nh\xf3m user/API key c\xf3 error rows",tone:l.problemClients?"amber":"green"})]}),(0,n.jsxs)(S,{children:[(0,n.jsxs)("div",{className:"mb-4 flex flex-wrap items-start justify-between gap-3",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Top user/API key gửi request nặng nhất"}),(0,n.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Xếp theo tổng input/output token của request th\xe0nh c\xf4ng c\xf3 token. D\xf9ng để ph\xe1t hiện user VS Code/agent đang tạo tải long-context lớn."})]}),(0,n.jsx)("span",{className:"rounded-full bg-primary/10 px-3 py-1 text-xs font-semibold text-primary",children:"Kh\xf4ng hiển thị full bearer token"})]}),(0,n.jsx)(K,{rows:r,columns:[{key:"user",label:"User/API key",render:c},{key:"quality",label:"\xc1p lực",render:e=>(0,n.jsx)(H,{level:e.level,label:e.pressureLabel})},{key:"requests",label:"Req",render:e=>u(e.requests)},{key:"tokens",label:"Token",render:e=>(0,n.jsx)(F,{row:e})},{key:"input",label:"Input pressure",render:e=>(0,n.jsxs)("div",{className:"space-y-1 text-xs",children:[(0,n.jsxs)("div",{children:["Avg ",h(e.avgPromptTokens)," \xb7 P95 ",h(e.p95PromptTokens)]}),(0,n.jsxs)("div",{className:"text-text-muted",children:["Max ",h(e.maxPromptTokens)," \xb7 >=30k ",p(e.longInputRate)]}),(0,n.jsxs)("div",{className:"text-text-muted",children:[">=50k ",p(e.hugeInputRate)," \xb7 >=70k ",p(e.extremeInputRate)]})]})},{key:"latency",label:"Latency / TTFT",render:e=>(0,n.jsxs)("div",{className:"space-y-1 text-xs",children:[(0,n.jsxs)("div",{children:["P95 ",g(e.p95LatencyMs)," \xb7 Max ",g(e.maxLatencyMs)]}),(0,n.jsxs)("div",{className:"text-text-muted",children:["TTFT P95 ",g(e.p95TtftMs)," \xb7 Slow ",p(e.slowRequestRate)]})]})},{key:"topModels",label:"Top model",render:e=>(0,n.jsx)(O,{items:e.topModels})},{key:"topIps",label:"IP / Tool",render:e=>(0,n.jsxs)("div",{className:"space-y-1",children:[(0,n.jsx)(O,{items:e.topIps}),(0,n.jsx)(O,{items:e.topTools})]})},{key:"meta",label:"Meta",render:e=>(0,n.jsxs)("div",{className:"space-y-1 text-xs text-text-muted",children:[(0,n.jsxs)("div",{children:["Key ",u(e.apiKeyCount)," \xb7 IP ",u(e.sourceIpCount)," \xb7 Tool ",u(e.sourceToolCount)]}),(0,n.jsxs)("div",{children:["Session ",u(e.sessionCount)," \xb7 Last ",k(e.lastSeen)]})]})}],empty:"Kh\xf4ng c\xf3 request th\xe0nh c\xf4ng c\xf3 token trong khoảng lọc."})]}),(0,n.jsxs)("div",{className:"grid gap-5 xl:grid-cols-2",children:[(0,n.jsxs)(S,{children:[(0,n.jsxs)("div",{className:"mb-4",children:[(0,n.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Top API key d\xf9ng nhiều token nhất"}),(0,n.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Xếp theo tổng input + output token từ UsageHistory, kh\xf4ng lộ full bearer token."})]}),(0,n.jsx)(K,{rows:i,columns:[{key:"apiKey",label:"API key",render:e=>(0,n.jsxs)("div",{className:"min-w-[220px]",children:[(0,n.jsx)("div",{className:"font-semibold text-text-main",children:e.label}),(0,n.jsx)("div",{className:"mt-1 text-xs text-text-muted",children:e.apiKeyOwner?`Owner ${e.apiKeyOwner}`:e.apiKeyName||e.primarySourceTool||"-"}),(0,n.jsx)("div",{className:"font-mono text-[11px] text-text-muted",children:t?e.apiKeyFingerprint||e.primaryClientIp||e.key:e.primaryClientIp||""})]})},{key:"requests",label:"Req",render:e=>u(e.requests)},{key:"tokens",label:"Token",render:e=>(0,n.jsx)(F,{row:e})},{key:"input",label:"Input nặng",render:x},{key:"meta",label:"Nguồn",render:e=>(0,n.jsxs)("div",{className:"text-xs text-text-muted",children:[(0,n.jsxs)("div",{children:["IP ",u(e.sourceIpCount)," \xb7 Tool ",u(e.sourceToolCount)]}),(0,n.jsxs)("div",{children:["Model ",u(e.modelCount)," \xb7 Provider ",u(e.providerCount)]})]})},{key:"lastSeen",label:"Last seen",render:e=>k(e.lastSeen)}],empty:"Kh\xf4ng c\xf3 API key c\xf3 token trong khoảng lọc."})]}),(0,n.jsxs)(S,{children:[(0,n.jsxs)("div",{className:"mb-4",children:[(0,n.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Top Source IP d\xf9ng nhiều token nhất"}),(0,n.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Dựa tr\xean UsageHistory n\xean c\xf3 input/output token, kh\xe1c với bảng Source IP từ Prompt Logs chỉ đếm log."})]}),(0,n.jsx)(K,{rows:o,columns:[{key:"ip",label:"Source IP",render:e=>(0,n.jsxs)("div",{className:"min-w-[180px]",children:[(0,n.jsx)("div",{className:"font-mono text-sm font-semibold text-text-main",children:e.label}),(0,n.jsxs)("div",{className:"mt-1 text-xs text-text-muted",children:["Tool ",u(e.sourceToolCount)," \xb7 API key ",u(e.apiKeyCount)]}),(0,n.jsxs)("div",{className:"text-xs text-text-muted",children:["Model ",u(e.modelCount)," \xb7 Provider ",u(e.providerCount)]})]})},{key:"requests",label:"Req",render:e=>u(e.requests)},{key:"tokens",label:"Token",render:e=>(0,n.jsx)(F,{row:e})},{key:"input",label:"Input nặng",render:x},{key:"lastSeen",label:"Last seen",render:e=>k(e.lastSeen)}],empty:"Kh\xf4ng c\xf3 Source IP c\xf3 token trong khoảng lọc."})]})]}),(0,n.jsxs)("div",{className:"grid gap-5 xl:grid-cols-2",children:[(0,n.jsxs)(S,{children:[(0,n.jsxs)("div",{className:"mb-4",children:[(0,n.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Ph\xe2n bố request theo k\xedch thước input"}),(0,n.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Gi\xfap admin biết workload đang l\xe0 chat ngắn hay long-context VS Code/agent."})]}),(0,n.jsx)(K,{rows:d,columns:[{key:"label",label:"Input bucket",render:e=>(0,n.jsx)("span",{className:"font-mono text-xs",children:e.label})},{key:"requests",label:"Req",render:e=>u(e.requests)},{key:"share",label:"Tỷ trọng",render:e=>p(e.share)},{key:"tokens",label:"Token",render:e=>(0,n.jsx)(F,{row:e})},{key:"latency",label:"Latency P95/MAX",render:e=>(0,n.jsxs)("div",{className:"text-xs",children:[(0,n.jsxs)("div",{children:[g(e.p95LatencyMs)," / ",g(e.maxLatencyMs)]}),(0,n.jsxs)("div",{className:"text-text-muted",children:["TTFT P95 ",g(e.p95TtftMs)]})]})}],empty:"Kh\xf4ng c\xf3 dữ liệu bucket input."})]}),(0,n.jsxs)(S,{children:[(0,n.jsxs)("div",{className:"mb-4",children:[(0,n.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Client/API key lỗi nhiều"}),(0,n.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"D\xf9ng để ph\xe1t hiện sai endpoint/model/auth/policy hoặc client tool cấu h\xecnh sai."})]}),(0,n.jsx)(K,{rows:a,columns:[{key:"user",label:"Client",render:c},{key:"requests",label:"Req",render:e=>u(e.requests)},{key:"errors",label:"Lỗi",render:e=>u(e.errors)},{key:"errorRate",label:"Error %",render:e=>(0,n.jsx)(_,{value:e.errorRate})},{key:"tokens",label:"Token",render:e=>(0,n.jsx)(F,{row:e})},{key:"source",label:"IP/Tool",render:e=>(0,n.jsxs)("div",{className:"text-xs",children:[(0,n.jsx)("div",{className:"font-mono",children:e.primaryClientIp||"-"}),(0,n.jsx)("div",{className:"text-text-muted",children:e.primarySourceTool||"-"})]})},{key:"lastSeen",label:"Last seen",render:e=>k(e.lastSeen)}],empty:"Kh\xf4ng c\xf3 client lỗi theo bộ lọc hiện tại."})]})]}),(0,n.jsxs)(S,{children:[(0,n.jsxs)("div",{className:"mb-4",children:[(0,n.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"G\xf3c nh\xecn monitor client n\xean d\xf9ng"}),(0,n.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"C\xe1c chỉ số n\xe0y bổ sung cho latency/model để admin ph\xe2n biệt server chậm hay client gửi request qu\xe1 nặng."})]}),(0,n.jsx)("div",{className:"grid gap-3 text-sm md:grid-cols-2 xl:grid-cols-3",children:[["Token/user","X\xe1c định user/API key tạo tải lớn nhất, hữu \xedch cho quota v\xe0 hướng dẫn workflow VS Code."],["Input bucket","Nếu phần lớn request nằm ở 30k-70k+, P95/P99 cao chủ yếu do prompt eval/context d\xe0i."],["TTFT theo user","TTFT cao cho một user thường l\xe0 input d\xe0i hoặc chờ slot, kh\xf4ng nhất thiết provider lỗi."],["Error theo client","T\xe1ch lỗi sai endpoint/model/API key khỏi lỗi server/provider để kh\xf4ng cảnh b\xe1o nhầm."],["Source IP/tool","Ph\xe1t hiện m\xe1y/tool gửi request nhiều hoặc cấu h\xecnh sai."],["Top request nặng","D\xf9ng Raw usage để drill-down request cụ thể khi một user k\xe9o tải hệ thống."]].map(([e,t])=>(0,n.jsxs)("div",{className:"rounded-xl border border-border bg-background p-3",children:[(0,n.jsx)("div",{className:"font-semibold text-text-main",children:e}),(0,n.jsx)("div",{className:"mt-1 text-xs text-text-muted",children:t})]},e))})]})]})}function Q({data:e}){let t=N();return(0,n.jsxs)(S,{children:[(0,n.jsxs)("div",{className:"mb-4",children:[(0,n.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Thống k\xea theo API key"}),(0,n.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Kh\xf4ng hiển thị full bearer token. Dashboard chỉ d\xf9ng fingerprint/masked key."})]}),(0,n.jsx)(K,{rows:e.groups?.apiKeys||[],columns:[{key:"name",label:"API key",render:e=>(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"font-semibold",children:e.name}),(0,n.jsxs)("div",{className:"text-xs text-text-muted",children:[t?e.fingerprint:"",e.ownerUser?`${t&&e.fingerprint?" \xb7 ":""}Owner: ${e.ownerUser}`:""]})]})},{key:"requests",label:"Requests",render:e=>u(e.requests)},{key:"success",label:"OK/Lỗi",render:e=>(0,n.jsxs)("div",{className:"text-xs",children:[(0,n.jsxs)("div",{className:"text-green-600",children:["OK ",u(e.success)]}),(0,n.jsxs)("div",{className:"text-red-600",children:["Lỗi ",u(e.errors)]})]})},{key:"tokens",label:"In/Out token",render:e=>(0,n.jsx)(F,{row:e})},{key:"cost",label:"Cost",render:e=>b(e.cost)},{key:"errorRate",label:"Error %",render:e=>(0,n.jsx)(_,{value:e.errorRate})},{key:"topModels",label:"Top model",render:e=>(0,n.jsx)(O,{items:e.topModels})},{key:"topProviders",label:"Top provider",render:e=>(0,n.jsx)(O,{items:e.topProviders})},{key:"lastSeen",label:"Last seen",render:e=>k(e.lastSeen)}]})]})}function Y({data:e}){let t=e.clientRequests?.topSourceIpsByTokens||[],s=e.clientRequests?.topSourceIpsByHeavyRequests||[],l=e=>(0,n.jsxs)("div",{className:"min-w-[180px]",children:[(0,n.jsx)("div",{className:"font-mono text-sm font-semibold text-text-main",children:e.label}),(0,n.jsxs)("div",{className:"mt-1 text-xs text-text-muted",children:["API key ",u(e.apiKeyCount)," \xb7 Tool ",u(e.sourceToolCount)]}),(0,n.jsxs)("div",{className:"text-xs text-text-muted",children:["Model ",u(e.modelCount)," \xb7 Provider ",u(e.providerCount)]})]});return(0,n.jsxs)("div",{className:"grid gap-5 xl:grid-cols-2",children:[(0,n.jsxs)(S,{children:[(0,n.jsxs)("div",{className:"mb-4",children:[(0,n.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Top IP d\xf9ng nhiều token nhất"}),(0,n.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Aggregate từ UsageHistory, xếp theo tổng input + output token."})]}),(0,n.jsx)(K,{rows:t,columns:[{key:"ip",label:"Source IP",render:l},{key:"requests",label:"Req",render:e=>u(e.requests)},{key:"tokens",label:"Token",render:e=>(0,n.jsx)(F,{row:e})},{key:"lastSeen",label:"Last seen",render:e=>k(e.lastSeen)}],empty:"Kh\xf4ng c\xf3 Source IP c\xf3 token trong khoảng lọc."})]}),(0,n.jsxs)(S,{children:[(0,n.jsxs)("div",{className:"mb-4",children:[(0,n.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Top IP gửi request nặng nhất"}),(0,n.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Xếp theo số request input/total token từ 30k trở l\xean, sau đ\xf3 theo max/P95 input."})]}),(0,n.jsx)(K,{rows:s,columns:[{key:"ip",label:"Source IP",render:l},{key:"requests",label:"Req",render:e=>u(e.requests)},{key:"heavy",label:"Request nặng",render:e=>(0,n.jsxs)("div",{className:"space-y-1 text-xs",children:[(0,n.jsxs)("div",{children:["Nặng ",u(e.heavyRequests)," \xb7 ",p(e.heavyRequestRate)]}),(0,n.jsxs)("div",{className:"text-text-muted",children:["P95 input ",h(e.p95PromptTokens)," \xb7 Max ",h(e.maxPromptTokens)]}),(0,n.jsxs)("div",{className:"text-text-muted",children:[">=70k ",u(e.extremeInputRequests)," \xb7 ",p(e.extremeInputRate)]})]})},{key:"tokens",label:"Token",render:e=>(0,n.jsx)(F,{row:e})},{key:"lastSeen",label:"Last seen",render:e=>k(e.lastSeen)}],empty:"Kh\xf4ng c\xf3 Source IP gửi request nặng trong khoảng lọc."})]}),(0,n.jsxs)(S,{children:[(0,n.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Source IP từ Prompt Logs"}),(0,n.jsx)(K,{rows:e.promptLogs?.topClientIps||[],columns:[{key:"label",label:"IP",render:e=>(0,n.jsx)("span",{className:"font-mono text-xs",children:e.label})},{key:"requests",label:"Logs",render:e=>u(e.requests)},{key:"errors",label:"Lỗi",render:e=>u(e.errors)},{key:"errorRate",label:"Error %",render:e=>(0,n.jsx)(_,{value:e.errorRate})},{key:"topTools",label:"Tools",render:e=>(0,n.jsx)(O,{items:e.topTools})},{key:"topModels",label:"Models",render:e=>(0,n.jsx)(O,{items:e.topModels})},{key:"lastSeen",label:"Last seen",render:e=>k(e.lastSeen)}]})]}),(0,n.jsxs)(S,{children:[(0,n.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Source tool"}),(0,n.jsx)(K,{rows:e.promptLogs?.topSourceTools||[],columns:[{key:"label",label:"Tool",render:e=>(0,n.jsx)("span",{className:"font-semibold",children:e.label})},{key:"requests",label:"Logs",render:e=>u(e.requests)},{key:"errors",label:"Lỗi",render:e=>u(e.errors)},{key:"errorRate",label:"Error %",render:e=>(0,n.jsx)(_,{value:e.errorRate})},{key:"topIps",label:"Top IP",render:e=>(0,n.jsx)(O,{items:e.topIps})},{key:"topModels",label:"Top model",render:e=>(0,n.jsx)(O,{items:e.topModels})},{key:"lastSeen",label:"Last seen",render:e=>k(e.lastSeen)}]})]}),(0,n.jsxs)(S,{className:"xl:col-span-2",children:[(0,n.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Session nhiều hoạt động"}),(0,n.jsx)(K,{rows:e.promptLogs?.topSessions||[],columns:[{key:"label",label:"Session",render:e=>(0,n.jsx)("span",{className:"font-mono text-xs",children:e.label})},{key:"requests",label:"Logs",render:e=>u(e.requests)},{key:"errors",label:"Lỗi",render:e=>u(e.errors)},{key:"topIps",label:"IP",render:e=>(0,n.jsx)(O,{items:e.topIps})},{key:"topTools",label:"Tool",render:e=>(0,n.jsx)(O,{items:e.topTools})},{key:"topModels",label:"Model",render:e=>(0,n.jsx)(O,{items:e.topModels})},{key:"lastSeen",label:"Last seen",render:e=>k(e.lastSeen)}]})]})]})}function ee({data:e}){return(0,n.jsxs)("div",{className:"space-y-5",children:[(0,n.jsxs)(S,{children:[(0,n.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Provider"}),(0,n.jsx)(K,{rows:e.groups?.providers||[],columns:[{key:"label",label:"Provider",render:e=>(0,n.jsx)("span",{className:"font-semibold",children:e.label})},{key:"requests",label:"Requests",render:e=>u(e.requests)},{key:"tokens",label:"Token",render:e=>(0,n.jsx)(F,{row:e})},{key:"cost",label:"Cost",render:e=>b(e.cost)},{key:"errorRate",label:"Error %",render:e=>(0,n.jsx)(_,{value:e.errorRate})},{key:"topModels",label:"Top model",render:e=>(0,n.jsx)(O,{items:e.topModels})},{key:"lastSeen",label:"Last seen",render:e=>k(e.lastSeen)}]})]}),(0,n.jsxs)("div",{className:"grid gap-5 xl:grid-cols-2",children:[(0,n.jsxs)(S,{children:[(0,n.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Model"}),(0,n.jsx)(K,{rows:e.groups?.models||[],columns:[{key:"label",label:"Model",render:e=>(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"font-semibold",children:e.model}),(0,n.jsx)("div",{className:"text-xs text-text-muted",children:e.providerLabel||e.provider})]})},{key:"requests",label:"Req",render:e=>u(e.requests)},{key:"tokens",label:"Token",render:e=>(0,n.jsx)(F,{row:e})},{key:"errorRate",label:"Lỗi",render:e=>(0,n.jsx)(_,{value:e.errorRate})}]})]}),(0,n.jsxs)(S,{children:[(0,n.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Provider account / connection"}),(0,n.jsx)(K,{rows:e.groups?.providerAccounts||[],columns:[{key:"label",label:"Account",render:e=>(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"font-semibold",children:e.label}),(0,n.jsx)("div",{className:"text-xs text-text-muted",children:e.providerLabel||e.provider||e.connectionId})]})},{key:"requests",label:"Req",render:e=>u(e.requests)},{key:"tokens",label:"Token",render:e=>(0,n.jsx)(F,{row:e})},{key:"errorRate",label:"Lỗi",render:e=>(0,n.jsx)(_,{value:e.errorRate})}]})]})]}),(0,n.jsxs)(S,{children:[(0,n.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Endpoint"}),(0,n.jsx)(K,{rows:e.groups?.endpoints||[],columns:[{key:"label",label:"Endpoint",render:e=>(0,n.jsx)("span",{className:"font-mono text-xs",children:e.label})},{key:"requests",label:"Requests",render:e=>u(e.requests)},{key:"tokens",label:"Token",render:e=>(0,n.jsx)(F,{row:e})},{key:"cost",label:"Cost",render:e=>b(e.cost)},{key:"errorRate",label:"Error %",render:e=>(0,n.jsx)(_,{value:e.errorRate})},{key:"lastSeen",label:"Last seen",render:e=>k(e.lastSeen)}]})]})]})}function et({data:e}){let t=N(),s=e.experience||{},l=s.thresholds||{},r=e.thinkingAnalytics||{},a=e.largeContextAnalytics||{},i=s.byModel||[],o=s.slowestRequests||[];return(0,n.jsxs)("div",{className:"space-y-5",children:[(0,n.jsxs)("div",{className:"grid gap-4 md:grid-cols-2 xl:grid-cols-4",children:[(0,n.jsx)(P,{icon:"verified",label:"Đ\xe1nh gi\xe1 tổng",value:y(s.score),hint:`${s.label||"-"} \xb7 ${u(s.samples)} mẫu success c\xf3 token`,help:"Điểm chất lượng trải nghiệm tổng hợp từ c\xe1c request th\xe0nh c\xf4ng c\xf3 token.",tone:s.tone||"slate"}),(0,n.jsx)(P,{icon:"timer",label:"Latency AVG / P95",value:`${g(s.avgLatencyMs)} / ${g(s.p95LatencyMs)}`,hint:`P50 ${g(s.p50LatencyMs)} \xb7 P99 ${g(s.p99LatencyMs)}`,help:"AVG l\xe0 trung b\xecnh; P95 thể hiện nh\xf3m 5% request chậm nhất.",tone:"purple"}),(0,n.jsx)(P,{icon:"bolt",label:"TTFT AVG / P95",value:`${g(s.avgTtftMs)} / ${g(s.p95TtftMs)}`,hint:"TTFT cao thường l\xe0 queue/prompt eval/input d\xe0i",help:"Thời gian từ l\xfac gửi request đến token đầu ti\xean.",tone:s.slowTtftRate>=.2?"amber":"blue"}),(0,n.jsx)(P,{icon:"keyboard_double_arrow_up",label:"Input AVG / P95",value:`${h(s.avgPromptTokens)} / ${h(s.p95PromptTokens)}`,hint:`>=30k ${p(s.longInputRate)} \xb7 >=50k ${p(s.hugeInputRate)}`,help:"Input c\xe0ng lớn th\xec prompt eval v\xe0 TTFT thường c\xe0ng cao."}),(0,n.jsx)(P,{icon:"running_with_errors",label:"Slow request",value:p(s.slowRequestRate),hint:`Latency >= ${g(l.slowLatencyMs||45e3)} \xb7 rất chậm ${p(s.verySlowRequestRate)}`,help:"Tỷ lệ request ho\xe0n tất chậm hơn ngưỡng vận h\xe0nh.",tone:s.slowRequestRate>=.2?"amber":"green"}),(0,n.jsx)(P,{icon:"pending_actions",label:"Slow TTFT",value:p(s.slowTtftRate),hint:`TTFT >= ${g(l.slowTtftMs||2e4)}`,help:"Tỷ lệ request chờ token đầu ti\xean qu\xe1 l\xe2u.",tone:s.slowTtftRate>=.2?"amber":"green"}),(0,n.jsx)(P,{icon:"speed",label:"Output tốc độ",value:j(s.decodeTokensPerSecond," tok/s"),hint:`Output/latency ${j(s.outputTokensPerSecond," tok/s")}`,tone:"slate"}),(0,n.jsx)(P,{icon:"data_usage",label:"Latency / 10k input",value:g(s.latencyMsPer10kInputTokens),hint:"Hữu \xedch khi VS Code gửi 30k–70k token",help:"Chuẩn h\xf3a latency theo k\xedch thước input để so s\xe1nh c\xf4ng bằng hơn.",tone:"slate"}),(0,n.jsx)(P,{icon:"psychology_alt",label:"Thinking auto-off",value:p(r.autoOffRate),hint:`${u(r.autoOffRequests||0)} / ${u(r.totalRequests||0)} request`,help:"Request bị tắt thinking tự động do vượt ngưỡng prompt chars.",tone:(r.autoOffRate||0)>=.3?"amber":"green"}),(0,n.jsx)(P,{icon:"toggle_off",label:"Thinking OFF",value:p(r.thinkingOffRate),hint:`ON ${p(r.thinkingOnRate)} \xb7 unknown ${p(r.unknownRate)}`,help:"Tỷ lệ request cuối c\xf9ng chạy ở chế độ kh\xf4ng thinking.",tone:(r.thinkingOffRate||0)>=.5?"blue":"slate"}),(0,n.jsx)(P,{icon:"data_object",label:"Large context",value:p(a.gte50kRate),hint:`>=30k ${p(a.gte30kRate)} \xb7 >=100k ${p(a.gte100kRate)}`,help:"Tỷ lệ request c\xf3 context lớn; thường l\xe0 nguy\xean nh\xe2n l\xe0m P95/P99 tăng.",tone:(a.gte50kRate||0)>=.3?"amber":"slate"})]}),(0,n.jsxs)("div",{className:"grid gap-5 xl:grid-cols-2",children:[(0,n.jsxs)(S,{children:[(0,n.jsxs)("div",{className:"mb-4",children:[(0,n.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Thinking Analytics"}),(0,n.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Theo d\xf5i request bật/tắt thinking v\xe0 tỷ lệ auto-off do vượt ngưỡng prompt chars."})]}),(0,n.jsx)("div",{className:"grid gap-3 md:grid-cols-2",children:[["Thinking ON",u(r.thinkingOnRequests||0),p(r.thinkingOnRate)],["Thinking OFF",u(r.thinkingOffRequests||0),p(r.thinkingOffRate)],["Auto-off hit",u(r.autoOffRequests||0),p(r.autoOffRate)],["C\xf3 ngưỡng auto-off",u(r.thresholdConfiguredRequests||0),`hit ${p(r.autoOffEligibleHitRate)}`]].map(([e,t,s])=>(0,n.jsxs)("div",{className:"rounded-2xl bg-background p-4",children:[(0,n.jsx)("div",{className:"text-xs font-semibold uppercase tracking-wide text-text-muted",children:e}),(0,n.jsx)("div",{className:"mt-2 text-xl font-semibold text-text-main",children:t}),(0,n.jsx)("div",{className:"mt-1 text-xs text-text-muted",children:s})]},e))}),(0,n.jsx)("div",{className:"mt-4",children:(0,n.jsx)(K,{rows:r.byModel||[],empty:"Chưa c\xf3 dữ liệu thinking trong khoảng lọc.",columns:[{key:"model",label:"Model",render:e=>(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"font-semibold",children:e.model}),(0,n.jsx)("div",{className:"text-xs text-text-muted",children:e.provider})]})},{key:"requests",label:"Req",render:e=>u(e.requests)},{key:"autoOff",label:"Auto-off",render:e=>(0,n.jsxs)("div",{className:"text-xs",children:[(0,n.jsx)("div",{children:u(e.autoOffRequests)}),(0,n.jsx)("div",{className:"text-text-muted",children:p(e.autoOffRate)})]})},{key:"thinking",label:"ON/OFF",render:e=>(0,n.jsxs)("div",{className:"text-xs",children:[(0,n.jsxs)("div",{children:["ON ",u(e.thinkingOnRequests)]}),(0,n.jsxs)("div",{className:"text-text-muted",children:["OFF ",u(e.thinkingOffRequests)]})]})},{key:"chars",label:"Chars avg/max",render:e=>(0,n.jsxs)("div",{className:"text-xs",children:[(0,n.jsx)("div",{children:h(e.avgPromptChars)}),(0,n.jsxs)("div",{className:"text-text-muted",children:["max ",h(e.maxPromptChars)]})]})}]})})]}),(0,n.jsxs)(S,{children:[(0,n.jsxs)("div",{className:"mb-4",children:[(0,n.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Large Context Analytics"}),(0,n.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Bucket theo request size, ưu ti\xean prompt chars; nếu chưa c\xf3 chars th\xec fallback prompt tokens."})]}),(0,n.jsx)("div",{className:"grid gap-3 md:grid-cols-3",children:[[">=30k",a.gte30kRequests,a.gte30kRate],[">=50k",a.gte50kRequests,a.gte50kRate],[">=100k",a.gte100kRequests,a.gte100kRate]].map(([e,t,s])=>(0,n.jsxs)("div",{className:"rounded-2xl bg-background p-4",children:[(0,n.jsx)("div",{className:"text-xs font-semibold uppercase tracking-wide text-text-muted",children:e}),(0,n.jsx)("div",{className:"mt-2 text-xl font-semibold text-text-main",children:u(t||0)}),(0,n.jsx)("div",{className:"mt-1 text-xs text-text-muted",children:p(s)})]},e))}),(0,n.jsx)("div",{className:"mt-4",children:(0,n.jsx)(K,{rows:a.buckets||[],empty:"Chưa c\xf3 large context buckets trong khoảng lọc.",columns:[{key:"label",label:"Bucket",render:e=>(0,n.jsx)("span",{className:"font-semibold",children:e.label})},{key:"requests",label:"Req",render:e=>(0,n.jsxs)("div",{className:"text-xs",children:[(0,n.jsx)("div",{children:u(e.requests)}),(0,n.jsx)("div",{className:"text-text-muted",children:p(e.share)})]})},{key:"chars",label:"Size avg/max",render:e=>(0,n.jsxs)("div",{className:"text-xs",children:[(0,n.jsx)("div",{children:h(e.avgRequestSize)}),(0,n.jsxs)("div",{className:"text-text-muted",children:["max ",h(e.maxRequestSize)]})]})},{key:"latency",label:"Latency/TTFT",render:e=>(0,n.jsxs)("div",{className:"text-xs",children:[(0,n.jsx)("div",{children:g(e.avgLatencyMs)}),(0,n.jsxs)("div",{className:"text-text-muted",children:["TTFT ",g(e.avgTtftMs)]})]})},{key:"autoOff",label:"Auto-off",render:e=>(0,n.jsxs)("div",{className:"text-xs",children:[(0,n.jsx)("div",{children:u(e.autoOffRequests)}),(0,n.jsx)("div",{className:"text-text-muted",children:p(e.autoOffRate)})]})}]})})]})]}),(0,n.jsxs)(S,{children:[(0,n.jsxs)("div",{className:"mb-4",children:[(0,n.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"C\xe1ch đọc trải nghiệm user"}),(0,n.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Nh\xf3m n\xe0y chỉ t\xednh request th\xe0nh c\xf4ng c\xf3 token v\xe0 latency > 0. Error/pending/success 0-token kh\xf4ng trộn v\xe0o tốc độ model. TTFT l\xe0 thời gian tới token đầu ti\xean; với VS Code input 30k–70k, TTFT cao thường phản \xe1nh chờ slot hoặc prompt eval d\xe0i."})]}),(0,n.jsxs)("div",{className:"grid gap-3 md:grid-cols-3",children:[(0,n.jsxs)("div",{className:"rounded-2xl bg-background p-4",children:[(0,n.jsx)("div",{className:"text-xs font-semibold uppercase tracking-wide text-text-muted",children:"Nhanh/chậm thực tế"}),(0,n.jsx)("div",{className:"mt-2 text-sm text-text-main",children:"Latency AVG/P50/P95/MAX cho biết user phải chờ bao l\xe2u để request ho\xe0n tất."})]}),(0,n.jsxs)("div",{className:"rounded-2xl bg-background p-4",children:[(0,n.jsx)("div",{className:"text-xs font-semibold uppercase tracking-wide text-text-muted",children:"Queue hoặc prompt eval"}),(0,n.jsx)("div",{className:"mt-2 text-sm text-text-main",children:"TTFT cao + input P95 cao l\xe0 t\xedn hiệu request d\xe0i, hết slot hoặc upstream đang queue."})]}),(0,n.jsxs)("div",{className:"rounded-2xl bg-background p-4",children:[(0,n.jsx)("div",{className:"text-xs font-semibold uppercase tracking-wide text-text-muted",children:"VS Code / agent"}),(0,n.jsx)("div",{className:"mt-2 text-sm text-text-main",children:"Theo d\xf5i tỷ lệ input >=30k/50k/70k để biết P95/P99 cao c\xf3 phải do context cực d\xe0i hay kh\xf4ng."})]})]})]}),(0,n.jsxs)(S,{children:[(0,n.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Chất lượng phản hồi theo provider/model"}),(0,n.jsx)(K,{rows:i,empty:"Chưa c\xf3 mẫu latency cho model trong khoảng lọc.",columns:[{key:"model",label:"Model",render:e=>(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"font-semibold",children:e.model}),(0,n.jsx)("div",{className:"text-xs text-text-muted",children:e.providerLabel||e.provider})]})},{key:"quality",label:"Đ\xe1nh gi\xe1",render:e=>(0,n.jsxs)("div",{className:"space-y-1",children:[(0,n.jsx)(U,{level:e.level,label:e.labelQuality}),(0,n.jsx)("div",{className:"text-xs text-text-muted",children:y(e.score)})]})},{key:"samples",label:"Mẫu",render:e=>u(e.samples)},{key:"latency",label:"Latency P50/P95/MAX",render:e=>(0,n.jsxs)("div",{className:"text-xs",children:[(0,n.jsxs)("div",{children:[g(e.p50LatencyMs)," / ",g(e.p95LatencyMs)]}),(0,n.jsxs)("div",{className:"text-text-muted",children:["max ",g(e.maxLatencyMs)]})]})},{key:"ttft",label:"TTFT P95",render:e=>g(e.p95TtftMs)},{key:"input",label:"Input avg/P95",render:e=>(0,n.jsxs)("div",{className:"text-xs",children:[(0,n.jsxs)("div",{children:[h(e.avgPromptTokens)," / ",h(e.p95PromptTokens)]}),(0,n.jsxs)("div",{className:"text-text-muted",children:[">=30k ",p(e.longInputRate)]})]})},{key:"slow",label:"Chậm",render:e=>(0,n.jsx)(_,{value:e.slowRequestRate})},{key:"speed",label:"Output tok/s",render:e=>j(e.outputTokensPerSecond," tok/s")}]})]}),(0,n.jsxs)(S,{children:[(0,n.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Request chậm nhất"}),(0,n.jsx)(K,{rows:o,empty:"Kh\xf4ng c\xf3 request chậm trong khoảng lọc.",columns:[{key:"timestamp",label:"Time",render:e=>k(e.timestamp)},{key:"model",label:"Model",render:e=>(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"font-semibold",children:e.model}),(0,n.jsx)("div",{className:"text-xs text-text-muted",children:e.providerLabel||e.provider})]})},{key:"latency",label:"Latency / TTFT",render:e=>(0,n.jsxs)("div",{className:"text-xs",children:[(0,n.jsx)("div",{className:"font-semibold",children:g(e.latencyMs)}),(0,n.jsxs)("div",{className:"text-text-muted",children:["TTFT ",g(e.ttftMs)]})]})},{key:"tokens",label:"In / Out",render:e=>(0,n.jsx)(F,{row:e})},{key:"apiKeyName",label:"API key",render:e=>(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{children:e.apiKeyName}),t?(0,n.jsx)("div",{className:"font-mono text-xs text-text-muted",children:e.apiKeyFingerprint}):null]})},{key:"sourceTool",label:"Tool/IP",render:e=>(0,n.jsxs)("div",{className:"text-xs",children:[(0,n.jsx)("div",{children:e.sourceTool||"-"}),(0,n.jsx)("div",{className:"font-mono text-text-muted",children:e.clientIp||"-"})]})},{key:"endpoint",label:"Endpoint",render:e=>(0,n.jsx)("span",{className:"font-mono text-xs",children:e.endpoint||"-"})}]})]})]})}function es({data:e}){let t=N(),s=e.requestErrors||{},l=s.summary||{},r=e.overview||{},a=Number(r.serverErrorRate||0),i=Number(r.clientErrorRate||0),o=Number(r.rateLimitErrorRate||0),d=[{key:"faultOwner",label:"Loại",render:e=>(0,n.jsx)(V,{value:e.faultOwner})},{key:"status",label:"Status",render:e=>(0,n.jsx)("span",{className:"rounded-full bg-red-500/10 px-2 py-1 text-xs font-semibold text-red-600 dark:text-red-300",children:e.status})},{key:"provider",label:"Provider",render:e=>e.providerLabel||e.provider},{key:"model",label:"Model"},{key:"endpoint",label:"Endpoint",render:e=>(0,n.jsx)("span",{className:"font-mono text-xs",children:e.endpoint})},{key:"requests",label:"Lỗi",render:e=>u(e.errors||e.requests)},{key:"errorType",label:"Type",render:e=>(0,n.jsx)("span",{className:"font-mono text-xs",children:e.errorType||e.errorCode||"-"})},{key:"sampleMessage",label:"Sample",render:e=>(0,n.jsx)(D,{row:e})},{key:"lastSeen",label:"Last seen",render:e=>k(e.lastSeen)}];return(0,n.jsxs)("div",{className:"space-y-5",children:[(0,n.jsxs)("div",{className:"grid gap-4 md:grid-cols-2 xl:grid-cols-5",children:[(0,n.jsx)(B,{icon:"dns",label:"Server/provider",value:l.serverImpacting||0,hint:`${p(a)} tr\xean tổng request`,tone:l.serverImpacting?"red":"green"}),(0,n.jsx)(B,{icon:"cloud_off",label:"Upstream",value:l.upstream||0,hint:"Provider/model server, timeout, network, 5xx",tone:l.upstream?"red":"green"}),(0,n.jsx)(B,{icon:"router",label:"Gateway",value:l.gateway||0,hint:"Lỗi nội bộ BlueRouter/gateway",tone:l.gateway?"purple":"green"}),(0,n.jsx)(B,{icon:"integration_instructions",label:"Client/request",value:l.client||0,hint:`${p(i)} do endpoint/model/body/auth`,tone:l.client?"slate":"green"}),(0,n.jsx)(B,{icon:"speed",label:"Rate/quota",value:l.rateLimit||0,hint:`${p(o)} rate-limit/quota`,tone:l.rateLimit?"amber":"green"})]}),(0,n.jsx)("div",{className:"rounded-2xl border border-blue-500/20 bg-blue-500/10 p-4 text-sm text-blue-700 dark:text-blue-300",children:(0,n.jsxs)("div",{className:"flex gap-3",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-[22px]",children:"rule_settings"}),(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"font-semibold",children:"Ph\xe2n loại lỗi đ\xe3 t\xe1ch client khỏi server/provider"}),(0,n.jsxs)("div",{className:"mt-1 opacity-90",children:["Cảnh b\xe1o vận h\xe0nh n\xean ưu ti\xean nh\xf3m ",(0,n.jsx)("b",{children:"Server/provider"})," gồm gateway, upstream, timeout, network v\xe0 5xx. Nh\xf3m ",(0,n.jsx)("b",{children:"Client/request"})," vẫn được log đầy đủ nhưng thường l\xe0 sai endpoint, model, auth, JSON/body hoặc context."]})]})]})}),e.anomalies?.length?(0,n.jsx)("div",{className:"grid gap-4 xl:grid-cols-2",children:e.anomalies.map((e,t)=>(0,n.jsx)(G,{anomaly:e},t))}):(0,n.jsxs)("div",{className:"rounded-2xl border border-green-500/20 bg-green-500/10 p-4 text-sm text-green-700 dark:text-green-300",children:[(0,n.jsx)("span",{className:"material-symbols-outlined mr-2 align-[-5px]",children:"check_circle"}),"Chưa ph\xe1t hiện bất thường server/provider r\xf5 r\xe0ng theo bộ lọc hiện tại."]}),(0,n.jsxs)(S,{children:[(0,n.jsxs)("div",{className:"mb-4 flex flex-wrap items-start justify-between gap-3",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Lỗi server/provider cần xử l\xfd"}),(0,n.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Chỉ gồm gateway/upstream/server-impacting errors. Đ\xe2y l\xe0 bảng quan trọng nhất cho vận h\xe0nh."})]}),(0,n.jsxs)("span",{className:"rounded-full bg-red-500/10 px-3 py-1 text-xs font-semibold text-red-600 dark:text-red-300",children:[u(l.serverImpacting||0)," lỗi"]})]}),(0,n.jsx)(K,{rows:s.topServerErrors||[],columns:d,empty:"Kh\xf4ng c\xf3 lỗi server/provider trong khoảng lọc."})]}),(0,n.jsxs)("div",{className:"grid gap-5 xl:grid-cols-2",children:[(0,n.jsxs)(S,{children:[(0,n.jsxs)("div",{className:"mb-4",children:[(0,n.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Lỗi client/request sai"}),(0,n.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Sai endpoint, model, auth, JSON/body, context length. D\xf9ng để hướng dẫn client sửa request."})]}),(0,n.jsx)(K,{rows:s.topClientErrors||[],columns:d.filter(e=>!["sampleMessage"].includes(e.key)),empty:"Kh\xf4ng c\xf3 lỗi client/request trong khoảng lọc."})]}),(0,n.jsxs)(S,{children:[(0,n.jsxs)("div",{className:"mb-4",children:[(0,n.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Ph\xe2n bố loại lỗi"}),(0,n.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"T\xe1ch nguồn chịu tr\xe1ch nhiệm để kh\xf4ng nhầm lỗi client th\xe0nh lỗi server."})]}),(0,n.jsx)(K,{rows:s.byFaultOwner||[],columns:[{key:"faultOwner",label:"Loại",render:e=>(0,n.jsx)(V,{value:e.faultOwner||e.key})},{key:"requests",label:"Số lỗi",render:e=>u(e.requests)},{key:"lastSeen",label:"Last seen",render:e=>k(e.lastSeen)}],empty:"Kh\xf4ng c\xf3 lỗi để ph\xe2n loại."})]})]}),s.topRateLimitErrors?.length?(0,n.jsxs)(S,{children:[(0,n.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Rate limit / quota"}),(0,n.jsx)(K,{rows:s.topRateLimitErrors||[],columns:d})]}):null,(0,n.jsxs)(S,{children:[(0,n.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Tất cả lỗi raw theo status/provider/model/endpoint"}),(0,n.jsx)(K,{rows:[...e.groups?.errors||[]].sort((e,t)=>new Date(v(t.lastSeen)||0)-new Date(v(e.lastSeen)||0)||Number(t.errors||t.requests||0)-Number(e.errors||e.requests||0)),columns:[{key:"faultOwner",label:"Loại",render:e=>(0,n.jsx)(V,{value:e.faultOwner})},{key:"status",label:"Status",render:e=>(0,n.jsx)("span",{className:"rounded-full bg-red-500/10 px-2 py-1 text-xs font-semibold text-red-600 dark:text-red-300",children:e.status})},{key:"provider",label:"Provider",render:e=>e.providerLabel||e.provider},{key:"model",label:"Model"},{key:"endpoint",label:"Endpoint",render:e=>(0,n.jsx)("span",{className:"font-mono text-xs",children:e.endpoint})},{key:"requests",label:"Lỗi",render:e=>u(e.errors||e.requests)},{key:"apiKey",label:"API key",render:e=>(0,n.jsx)("span",{className:"font-mono text-xs",children:t?e.apiKey:e.apiKeyName||"•••"})},{key:"lastSeen",label:"Last seen",render:e=>k(e.lastSeen)}]})]}),(0,n.jsxs)(S,{children:[(0,n.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Status distribution"}),(0,n.jsx)(K,{rows:e.groups?.statuses||[],columns:[{key:"label",label:"Status"},{key:"requests",label:"Requests",render:e=>u(e.requests)},{key:"tokens",label:"Token",render:e=>(0,n.jsx)(F,{row:e})},{key:"errorRate",label:"Error %",render:e=>(0,n.jsx)(_,{value:e.errorRate})}]})]})]})}function en({data:e}){let t=N();return(0,n.jsxs)("div",{className:"space-y-5",children:[(0,n.jsxs)(S,{children:[(0,n.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Top request nặng token"}),(0,n.jsx)(K,{rows:e.heavyRequests||[],columns:[{key:"timestamp",label:"Time",render:e=>k(e.timestamp)},{key:"model",label:"Model",render:e=>(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"font-semibold",children:e.model}),(0,n.jsx)("div",{className:"text-xs text-text-muted",children:e.providerLabel||e.provider})]})},{key:"apiKeyName",label:"API key",render:e=>(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{children:e.apiKeyName}),t?(0,n.jsx)("div",{className:"font-mono text-xs text-text-muted",children:e.apiKeyFingerprint}):null]})},{key:"accountName",label:"Account"},{key:"endpoint",label:"Endpoint",render:e=>(0,n.jsx)("span",{className:"font-mono text-xs",children:e.endpoint})},{key:"tokens",label:"Token",render:e=>(0,n.jsx)(F,{row:e})},{key:"status",label:"Status"}]})]}),(0,n.jsxs)(S,{children:[(0,n.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Recent usage"}),(0,n.jsx)(K,{rows:e.recentUsage||[],columns:[{key:"timestamp",label:"Time",render:e=>k(e.timestamp)},{key:"provider",label:"Provider",render:e=>e.providerLabel||e.provider},{key:"model",label:"Model"},{key:"apiKeyName",label:"API key"},{key:"tokens",label:"Token",render:e=>(0,n.jsx)(F,{row:e})},{key:"cost",label:"Cost",render:e=>b(e.cost)},{key:"status",label:"Status"}]})]})]})}function el(){let{isAdmin:e,isMonitorAdmin:t,isAiGatewaysMonitor:s}=(0,a.s)(),r=e||t||s,i=(0,l.useMemo)(()=>e?o:o.filter(e=>"aiHealth"!==e.value),[e]),[c,x]=(0,l.useState)({period:"today",dateFrom:"",dateTo:"",provider:"",model:"",connectionId:"",status:"",endpoint:"",apiKey:"",clientIp:"",sourceTool:"",sessionId:"",keyword:""}),[u,h]=(0,l.useState)(null),[p,b]=(0,l.useState)(!0),[g,j]=(0,l.useState)(""),[y,v]=(0,l.useState)("overview"),[f,N]=(0,l.useState)(null),S=function(e,t=450){let[s,n]=(0,l.useState)(e);return(0,l.useEffect)(()=>{let s=setTimeout(()=>n(e),t);return()=>clearTimeout(s)},[e,t]),s}(c,450),P=(0,l.useRef)(0),I=(0,l.useCallback)(async({clear:e=!1,filtersOverride:t=null}={})=>{let s=P.current+1;P.current=s,e&&h(null),b(!0),j("");let n=Date.now();try{let e=t||S,l=q(e,{timeZone:w()}),r=await fetch(`/api/dashboard/analytics?${l}`,{cache:"no-store"}),a=await r.json().catch(()=>({}));if(s!==P.current)return;if(!r.ok)throw Error(a.error||"Kh\xf4ng tải được dữ liệu analytics");h(a),N({loadedMs:Date.now()-n,cacheState:a.cacheState||"",cacheAgeMs:a.cacheAgeMs||0})}catch(e){if(s!==P.current)return;j(e.message||"Kh\xf4ng tải được dữ liệu analytics")}finally{s===P.current&&b(!1)}},[S]);(0,l.useEffect)(()=>{I({clear:!0})},[I]),(0,l.useEffect)(()=>{let e=localStorage.getItem(d);e&&i.some(t=>t.value===e)&&v(e)},[i]),(0,l.useEffect)(()=>{i.some(e=>e.value===y)||v("overview")},[i,y]),(0,l.useEffect)(()=>{localStorage.setItem(d,y)},[y]);let R=u?.options||{},M=(0,l.useMemo)(()=>u?.generatedAt?k(u.generatedAt):"-",[u]);return(0,n.jsxs)("div",{className:"space-y-5 p-4 md:p-6",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"flex items-center gap-2 text-primary",children:[(0,n.jsx)("span",{className:"material-symbols-outlined",children:"monitoring"}),(0,n.jsx)("span",{className:"text-sm font-semibold uppercase tracking-wide",children:"BlueRouter Analytics"})]}),(0,n.jsx)("h1",{className:"mt-2 text-2xl font-bold text-text-main",children:"Thống k\xea sử dụng Gateway"}),(0,n.jsx)("p",{className:"mt-1 max-w-3xl text-sm text-text-muted",children:"Theo d\xf5i tần suất request, input/output token, API key, provider, model, endpoint, Source IP, source tool v\xe0 lỗi vận h\xe0nh."})]}),(0,n.jsxs)("div",{className:"flex items-center gap-3 rounded-2xl border border-border bg-surface px-4 py-3 text-sm text-text-muted",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"schedule"}),(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{children:["Generated: ",M]}),f?(0,n.jsxs)("div",{className:"mt-0.5 text-xs",children:["Loaded in ",f.loadedMs>=1e3?`${(f.loadedMs/1e3).toLocaleString("vi-VN",{maximumFractionDigits:1})}s`:`${f.loadedMs}ms`,"hit"===f.cacheState?(0,n.jsxs)("span",{className:"ml-1.5 rounded bg-emerald-500/10 px-1.5 py-0.5 font-medium text-emerald-500",children:["cache hit",f.cacheAgeMs?` \xb7 ${Math.round(f.cacheAgeMs/1e3)}s`:""]}):"joined"===f.cacheState?(0,n.jsx)("span",{className:"ml-1.5 rounded bg-sky-500/10 px-1.5 py-0.5 font-medium text-sky-500",children:"shared compute"}):"fresh"===f.cacheState?(0,n.jsx)("span",{className:"ml-1.5 rounded bg-amber-500/10 px-1.5 py-0.5 font-medium text-amber-500",children:"fresh compute"}):null]}):null]})]})]}),(0,n.jsx)(W,{filters:c,setFilters:x,options:R,onRefresh:e=>I({filtersOverride:e||c}),onExportCsv:()=>{let e=q(c,{format:"csv",timeZone:w()});window.open(`/api/dashboard/analytics?${e}`,"_blank","noopener,noreferrer")},loading:p,showProviderFilters:r}),g?(0,n.jsxs)("div",{className:"rounded-2xl border border-red-500/30 bg-red-500/10 p-4 text-sm text-red-700 dark:text-red-300",children:[(0,n.jsx)("span",{className:"material-symbols-outlined mr-2 align-[-5px]",children:"error"}),g]}):null,u?.qualityNotes?.length?(0,n.jsx)(z,{notes:u.qualityNotes}):null,(0,n.jsx)("div",{className:"flex flex-wrap gap-2 rounded-2xl border border-border bg-surface p-2",children:i.map(e=>(0,n.jsxs)("button",{onClick:()=>v(e.value),className:T("flex items-center gap-2 rounded-xl px-3 py-2 text-sm font-medium transition",y===e.value?"bg-primary text-white shadow-sm":"text-text-muted hover:bg-background hover:text-text-main"),children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:e.icon}),e.label]},e.value))}),p&&!u?(0,n.jsx)(L,{}):null,!p&&u&&u.overview?.requests===0&&0===(u.promptLogs?.total||0)?(0,n.jsx)(C,{title:"Chưa c\xf3 dữ liệu analytics",description:"Kh\xf4ng c\xf3 UsageHistory hoặc Prompt Logs theo bộ lọc hiện tại."}):null,u?(0,n.jsxs)(n.Fragment,{children:["overview"===y?(0,n.jsx)(J,{data:u}):null,"apiKeys"===y?(0,n.jsx)(Q,{data:u}):null,"clients"===y?(0,n.jsx)(Z,{data:u}):null,"sources"===y?(0,n.jsx)(Y,{data:u}):null,"providers"===y?(0,n.jsx)(ee,{data:u}):null,"experience"===y?(0,n.jsx)(et,{data:u}):null,"errors"===y?(0,n.jsx)(es,{data:u}):null,"raw"===y?(0,n.jsx)(en,{data:u}):null]}):null,"aiHealth"===y&&e?(0,n.jsx)(m,{}):null]})}},94027:(e,t,s)=>{"use strict";s.d(t,{Y:()=>o,s:()=>d});var n=s(95155),l=s(12115),r=s(14051),a=s.n(r);let i=(0,l.createContext)(null);function o({children:e}){let[t,s]=(0,l.useState)(null),[r,a]=(0,l.useState)(!0),[d,c]=(0,l.useState)(""),x=(0,l.useCallback)(async()=>{a(!0),c("");try{let e=await fetch("/api/auth/status",{cache:"no-store"}),t=await e.json().catch(()=>({}));if(!e.ok)throw Error(t?.error||"Kh\xf4ng tải được trạng th\xe1i đăng nhập");return s(t||{}),t||{}}catch(e){return c(e?.message||"Kh\xf4ng tải được trạng th\xe1i đăng nhập"),s({}),{}}finally{a(!1)}},[]);(0,l.useEffect)(()=>{let e=!1;return(async()=>{a(!0),c("");try{let t=await fetch("/api/auth/status",{cache:"no-store"}),n=await t.json().catch(()=>({}));if(e)return;if(!t.ok)throw Error(n?.error||"Kh\xf4ng tải được trạng th\xe1i đăng nhập");s(n||{})}catch(t){e||(c(t?.message||"Kh\xf4ng tải được trạng th\xe1i đăng nhập"),s({}))}finally{e||a(!1)}})(),()=>{e=!0}},[]);let m=(0,l.useMemo)(()=>{let e,s,n,l,r;return s=(e=t&&"object"==typeof t?t:{}).displayName||e.oidcName||e.oidcEmail||e.userId||"",n=!0===e.isAdmin,l=!0===e.isMonitorAdmin,r=!0===e.isAiGatewaysMonitor,{status:e,displayName:s,userId:e.userId||"",loginMethod:e.loginMethod||"",role:e.role||"guest",isAdmin:n,isMonitorAdmin:l,isAiGatewaysMonitor:r,canManageApiKeys:!0===e.canManageApiKeys||n||l,canUseMonitorAdminTabs:!0===e.canUseMonitorAdminTabs||n||l,canViewAllAnalytics:!0===e.canViewAllAnalytics||n||l||r}},[t]),u=(0,l.useMemo)(()=>({...m,loading:r,error:d,reload:x}),[m,r,d,x]);return(0,n.jsx)(i.Provider,{value:u,children:e})}function d(){let e=(0,l.useContext)(i);return e||{status:{},displayName:"",userId:"",loginMethod:"",role:"admin",isAdmin:!0,isMonitorAdmin:!1,isAiGatewaysMonitor:!1,canManageApiKeys:!0,canUseMonitorAdminTabs:!0,canViewAllAnalytics:!0,loading:!1,error:"",reload:async()=>({})}}o.propTypes={children:a().node}}},e=>{e.O(0,[9959,8441,3794,7358],()=>e(e.s=39944)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4520],{33796:(e,a,t)=>{Promise.resolve().then(t.bind(t,83016))},54642:e=>{var a;"u">typeof __nccwpck_require__&&(__nccwpck_require__.ab="//"),(a={}).endianness=function(){return"LE"},a.hostname=function(){return"u">typeof location?location.hostname:""},a.loadavg=function(){return[]},a.uptime=function(){return 0},a.freemem=function(){return Number.MAX_VALUE},a.totalmem=function(){return Number.MAX_VALUE},a.cpus=function(){return[]},a.type=function(){return"Browser"},a.release=function(){return"u">typeof navigator?navigator.appVersion:""},a.networkInterfaces=a.getNetworkInterfaces=function(){return{}},a.arch=function(){return"javascript"},a.platform=function(){return"browser"},a.tmpdir=a.tmpDir=function(){return"/tmp"},a.EOL="\n",a.homedir=function(){return"/"},e.exports=a},83016:(e,a,t)=>{"use strict";t.r(a),t.d(a,{default:()=>u});var r=t(95155),c=t(39092),s=t.n(c),n=t(12115),i=t(73321),o=t(90620),l=t(44656);let d=[{badge:"CHAT",title:"AI Web Chat",description:"Tr\xf2 chuyện với AI nội bộ, hỗ trợ viết code, ph\xe2n t\xedch t\xe0i liệu, brainstorm \xfd tưởng v\xe0 hỏi đ\xe1p kỹ thuật.",href:"https://ai.fujinet.vn/",cta:"Mở AI Chat",icon:"chat",accent:"#d946ef",accentRgb:"217,70,239"},{badge:"DỊCH",title:"AI Translator",description:"Dịch Word, Excel, PowerPoint, h\xecnh ảnh v\xe0 PDF bằng AI, ưu ti\xean giữ nguy\xean định dạng gốc.",href:"https://translate-workspace.fujinet.vn",cta:"Mở Translator",icon:"translate",accent:"#a855f7",accentRgb:"168,85,247"},{badge:"TICKET",title:"IT Support",description:"Gửi y\xeau cầu hỗ trợ kỹ thuật, theo d\xf5i tiến độ ticket, trao đổi với IT v\xe0 xem lịch sử xử l\xfd sự cố.",href:"https://itsupport.fujinet.vn",cta:"Gửi Ticket",icon:"support",accent:"#3b82f6",accentRgb:"59,130,246"},{badge:"MEETING",title:"Web Meeting",description:"Họp video conference nội bộ trực tuyến, hỗ trợ chia sẻ m\xe0n h\xecnh, trao đổi nh\xf3m v\xe0 l\xe0m việc từ xa.",href:"https://meeting.fujinet.net",cta:"V\xe0o Meeting",icon:"meeting",accent:"#10b981",accentRgb:"16,185,129"},{badge:"ASSET",title:"IT Resource",description:"Quản l\xfd thiết bị, t\xe0i khoản, VPN, Work From Home v\xe0 c\xe1c dịch vụ hạ tầng CNTT nội bộ.",href:"https://itresource.fujinet.net/",cta:"Mở Resource",icon:"resource",accent:"#06b6d4",accentRgb:"6,182,212"}],x="fjs-login-weekly-style",g=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],f=[{id:"sunday",dayLabel:"Chủ nhật",shortLabel:"CN",name:"Solar Genesis",pageBg:"radial-gradient(circle at 8% -10%, rgba(251,191,36,0.30), transparent 31%), radial-gradient(circle at 92% 18%, rgba(244,63,94,0.24), transparent 30%), radial-gradient(circle at 50% 112%, rgba(34,211,238,0.16), transparent 34%), #150b07",heroGradient:"linear-gradient(135deg, #3b1607 0%, #7c2d12 42%, #f97316 100%)",titleGradient:"linear-gradient(135deg, #fff7ed 0%, #fed7aa 42%, #fef08a 72%, #a7f3d0 100%)",buttonGradient:"linear-gradient(90deg, #f97316 0%, #f43f5e 54%, #facc15 100%)",footerIconGradient:"linear-gradient(135deg, #f97316, #f43f5e)",primary:"#f97316",secondary:"#f43f5e",accent:"#facc15",primaryRgb:"249,115,22",secondaryRgb:"244,63,94",accentRgb:"250,204,21",softText:"rgba(255,237,213,0.78)",mutedText:"rgba(255,237,213,0.50)",heroSubtitle:"rgba(254,215,170,0.74)",heroBody:"rgba(255,237,213,0.78)",formBg:"linear-gradient(180deg, #fffaf4 0%, #ffffff 46%, #fff7ed 100%)",cardBg:"linear-gradient(180deg, rgba(255,255,255,0.075), rgba(255,255,255,0.030))",aurora:["rgba(249,115,22,0.30)","rgba(244,63,94,0.26)","rgba(250,204,21,0.22)","rgba(34,211,238,0.13)"],panelOrbs:["rgba(251,146,60,0.44)","rgba(244,63,94,0.36)","rgba(250,204,21,0.18)"],formOrbs:["rgba(249,115,22,0.14)","rgba(244,63,94,0.10)"],serviceAccents:[{accent:"#f97316",accentRgb:"249,115,22"},{accent:"#f43f5e",accentRgb:"244,63,94"},{accent:"#facc15",accentRgb:"250,204,21"},{accent:"#22c55e",accentRgb:"34,197,94"},{accent:"#06b6d4",accentRgb:"6,182,212"}]},{id:"monday",dayLabel:"Thứ 2",shortLabel:"T2",name:"Ocean Intelligence",pageBg:"radial-gradient(circle at 5% 0%, rgba(14,165,233,0.30), transparent 32%), radial-gradient(circle at 88% 20%, rgba(37,99,235,0.26), transparent 34%), radial-gradient(circle at 50% 110%, rgba(45,212,191,0.18), transparent 32%), #06111f",heroGradient:"linear-gradient(135deg, #082f49 0%, #1e3a8a 48%, #0891b2 100%)",titleGradient:"linear-gradient(135deg, #dffafe 0%, #bfdbfe 45%, #67e8f9 75%, #ffffff 100%)",buttonGradient:"linear-gradient(90deg, #0284c7 0%, #2563eb 52%, #22d3ee 100%)",footerIconGradient:"linear-gradient(135deg, #0284c7, #22d3ee)",primary:"#0284c7",secondary:"#2563eb",accent:"#22d3ee",primaryRgb:"2,132,199",secondaryRgb:"37,99,235",accentRgb:"34,211,238",softText:"rgba(224,242,254,0.80)",mutedText:"rgba(224,242,254,0.48)",heroSubtitle:"rgba(186,230,253,0.78)",heroBody:"rgba(224,242,254,0.76)",formBg:"linear-gradient(180deg, #f0f9ff 0%, #ffffff 48%, #eff6ff 100%)",cardBg:"linear-gradient(180deg, rgba(240,249,255,0.075), rgba(255,255,255,0.026))",aurora:["rgba(14,165,233,0.30)","rgba(37,99,235,0.27)","rgba(34,211,238,0.20)","rgba(16,185,129,0.12)"],panelOrbs:["rgba(14,165,233,0.42)","rgba(37,99,235,0.42)","rgba(34,211,238,0.18)"],formOrbs:["rgba(14,165,233,0.13)","rgba(37,99,235,0.10)"],serviceAccents:[{accent:"#0ea5e9",accentRgb:"14,165,233"},{accent:"#2563eb",accentRgb:"37,99,235"},{accent:"#22d3ee",accentRgb:"34,211,238"},{accent:"#14b8a6",accentRgb:"20,184,166"},{accent:"#38bdf8",accentRgb:"56,189,248"}]},{id:"tuesday",dayLabel:"Thứ 3",shortLabel:"T3",name:"Crimson Forge",pageBg:"radial-gradient(circle at 6% -10%, rgba(239,68,68,0.30), transparent 31%), radial-gradient(circle at 92% 18%, rgba(249,115,22,0.24), transparent 31%), radial-gradient(circle at 48% 112%, rgba(168,85,247,0.17), transparent 34%), #16070b",heroGradient:"linear-gradient(135deg, #450a0a 0%, #7f1d1d 45%, #9a3412 100%)",titleGradient:"linear-gradient(135deg, #fee2e2 0%, #fecaca 36%, #fed7aa 66%, #f5d0fe 100%)",buttonGradient:"linear-gradient(90deg, #dc2626 0%, #f97316 52%, #a855f7 100%)",footerIconGradient:"linear-gradient(135deg, #dc2626, #f97316)",primary:"#dc2626",secondary:"#f97316",accent:"#a855f7",primaryRgb:"220,38,38",secondaryRgb:"249,115,22",accentRgb:"168,85,247",softText:"rgba(254,226,226,0.80)",mutedText:"rgba(254,226,226,0.48)",heroSubtitle:"rgba(254,202,202,0.74)",heroBody:"rgba(254,226,226,0.76)",formBg:"linear-gradient(180deg, #fff7f7 0%, #ffffff 48%, #fff1f2 100%)",cardBg:"linear-gradient(180deg, rgba(255,255,255,0.072), rgba(255,255,255,0.026))",aurora:["rgba(239,68,68,0.30)","rgba(249,115,22,0.26)","rgba(168,85,247,0.19)","rgba(250,204,21,0.10)"],panelOrbs:["rgba(239,68,68,0.45)","rgba(249,115,22,0.38)","rgba(168,85,247,0.18)"],formOrbs:["rgba(239,68,68,0.12)","rgba(249,115,22,0.10)"],serviceAccents:[{accent:"#ef4444",accentRgb:"239,68,68"},{accent:"#f97316",accentRgb:"249,115,22"},{accent:"#a855f7",accentRgb:"168,85,247"},{accent:"#f59e0b",accentRgb:"245,158,11"},{accent:"#fb7185",accentRgb:"251,113,133"}]},{id:"wednesday",dayLabel:"Thứ 4",shortLabel:"T4",name:"Emerald Matrix",pageBg:"radial-gradient(circle at 8% -8%, rgba(16,185,129,0.30), transparent 31%), radial-gradient(circle at 90% 18%, rgba(20,184,166,0.24), transparent 31%), radial-gradient(circle at 50% 112%, rgba(132,204,22,0.16), transparent 33%), #06140f",heroGradient:"linear-gradient(135deg, #052e16 0%, #064e3b 48%, #0f766e 100%)",titleGradient:"linear-gradient(135deg, #dcfce7 0%, #a7f3d0 43%, #5eead4 72%, #ecfccb 100%)",buttonGradient:"linear-gradient(90deg, #059669 0%, #14b8a6 52%, #84cc16 100%)",footerIconGradient:"linear-gradient(135deg, #059669, #84cc16)",primary:"#059669",secondary:"#14b8a6",accent:"#84cc16",primaryRgb:"5,150,105",secondaryRgb:"20,184,166",accentRgb:"132,204,22",softText:"rgba(220,252,231,0.80)",mutedText:"rgba(220,252,231,0.48)",heroSubtitle:"rgba(167,243,208,0.76)",heroBody:"rgba(220,252,231,0.76)",formBg:"linear-gradient(180deg, #f0fdf4 0%, #ffffff 48%, #ecfdf5 100%)",cardBg:"linear-gradient(180deg, rgba(236,253,245,0.074), rgba(255,255,255,0.026))",aurora:["rgba(16,185,129,0.30)","rgba(20,184,166,0.25)","rgba(132,204,22,0.18)","rgba(34,211,238,0.10)"],panelOrbs:["rgba(16,185,129,0.42)","rgba(20,184,166,0.38)","rgba(132,204,22,0.17)"],formOrbs:["rgba(16,185,129,0.12)","rgba(20,184,166,0.10)"],serviceAccents:[{accent:"#10b981",accentRgb:"16,185,129"},{accent:"#14b8a6",accentRgb:"20,184,166"},{accent:"#84cc16",accentRgb:"132,204,22"},{accent:"#22c55e",accentRgb:"34,197,94"},{accent:"#06b6d4",accentRgb:"6,182,212"}]},{id:"thursday",dayLabel:"Thứ 5",shortLabel:"T5",name:"Royal Nebula",pageBg:"radial-gradient(circle at 8% -8%, rgba(99,102,241,0.31), transparent 31%), radial-gradient(circle at 90% 20%, rgba(139,92,246,0.27), transparent 32%), radial-gradient(circle at 50% 112%, rgba(6,182,212,0.17), transparent 33%), #090b22",heroGradient:"linear-gradient(135deg, #172554 0%, #312e81 48%, #581c87 100%)",titleGradient:"linear-gradient(135deg, #e0e7ff 0%, #ddd6fe 45%, #c4b5fd 72%, #a5f3fc 100%)",buttonGradient:"linear-gradient(90deg, #4f46e5 0%, #8b5cf6 52%, #06b6d4 100%)",footerIconGradient:"linear-gradient(135deg, #4f46e5, #8b5cf6)",primary:"#4f46e5",secondary:"#8b5cf6",accent:"#06b6d4",primaryRgb:"79,70,229",secondaryRgb:"139,92,246",accentRgb:"6,182,212",softText:"rgba(224,231,255,0.80)",mutedText:"rgba(224,231,255,0.48)",heroSubtitle:"rgba(221,214,254,0.76)",heroBody:"rgba(224,231,255,0.76)",formBg:"linear-gradient(180deg, #f8f7ff 0%, #ffffff 48%, #f0f9ff 100%)",cardBg:"linear-gradient(180deg, rgba(255,255,255,0.074), rgba(255,255,255,0.028))",aurora:["rgba(99,102,241,0.30)","rgba(139,92,246,0.28)","rgba(6,182,212,0.17)","rgba(59,130,246,0.13)"],panelOrbs:["rgba(99,102,241,0.42)","rgba(139,92,246,0.42)","rgba(6,182,212,0.17)"],formOrbs:["rgba(99,102,241,0.12)","rgba(139,92,246,0.10)"],serviceAccents:[{accent:"#6366f1",accentRgb:"99,102,241"},{accent:"#8b5cf6",accentRgb:"139,92,246"},{accent:"#3b82f6",accentRgb:"59,130,246"},{accent:"#06b6d4",accentRgb:"6,182,212"},{accent:"#a855f7",accentRgb:"168,85,247"}]},{id:"friday",dayLabel:"Thứ 6",shortLabel:"T6",name:"Cyber Sakura",pageBg:"radial-gradient(circle at 8% -8%, rgba(236,72,153,0.29), transparent 31%), radial-gradient(circle at 90% 18%, rgba(217,70,239,0.25), transparent 32%), radial-gradient(circle at 48% 112%, rgba(251,113,133,0.18), transparent 32%), #17071a",heroGradient:"linear-gradient(135deg, #500724 0%, #831843 45%, #86198f 100%)",titleGradient:"linear-gradient(135deg, #fce7f3 0%, #fbcfe8 40%, #f5d0fe 70%, #fed7aa 100%)",buttonGradient:"linear-gradient(90deg, #db2777 0%, #d946ef 52%, #fb7185 100%)",footerIconGradient:"linear-gradient(135deg, #db2777, #d946ef)",primary:"#db2777",secondary:"#d946ef",accent:"#fb7185",primaryRgb:"219,39,119",secondaryRgb:"217,70,239",accentRgb:"251,113,133",softText:"rgba(252,231,243,0.80)",mutedText:"rgba(252,231,243,0.48)",heroSubtitle:"rgba(251,207,232,0.76)",heroBody:"rgba(252,231,243,0.76)",formBg:"linear-gradient(180deg, #fff5fb 0%, #ffffff 48%, #fdf4ff 100%)",cardBg:"linear-gradient(180deg, rgba(255,255,255,0.074), rgba(255,255,255,0.026))",aurora:["rgba(236,72,153,0.30)","rgba(217,70,239,0.26)","rgba(251,113,133,0.18)","rgba(251,146,60,0.12)"],panelOrbs:["rgba(236,72,153,0.42)","rgba(217,70,239,0.40)","rgba(251,113,133,0.17)"],formOrbs:["rgba(236,72,153,0.12)","rgba(217,70,239,0.10)"],serviceAccents:[{accent:"#ec4899",accentRgb:"236,72,153"},{accent:"#d946ef",accentRgb:"217,70,239"},{accent:"#fb7185",accentRgb:"251,113,133"},{accent:"#f97316",accentRgb:"249,115,22"},{accent:"#a855f7",accentRgb:"168,85,247"}]},{id:"saturday",dayLabel:"Thứ 7",shortLabel:"T7",name:"Aurora Command",pageBg:"#0a0a1f",heroGradient:"linear-gradient(135deg, #1e1b4b 0%, #4c1d95 48%, #581c87 100%)",titleGradient:"linear-gradient(135deg, #ddd6fe 0%, #f5d0fe 52%, #a5f3fc 100%)",buttonGradient:"linear-gradient(90deg, #4f46e5 0%, #7c3aed 50%, #9333ea 100%)",footerIconGradient:"linear-gradient(135deg, #4f46e5, #7c3aed)",primary:"#4f46e5",secondary:"#7c3aed",accent:"#22d3ee",primaryRgb:"79,70,229",secondaryRgb:"124,58,237",accentRgb:"34,211,238",softText:"rgba(237,233,254,0.80)",mutedText:"rgba(237,233,254,0.48)",heroSubtitle:"rgba(221,214,254,0.70)",heroBody:"rgba(237,233,254,0.76)",formBg:"#ffffff",cardBg:"linear-gradient(180deg, rgba(255,255,255,0.060), rgba(255,255,255,0.030))",aurora:["rgba(124,58,237,0.30)","rgba(79,70,229,0.30)","rgba(217,70,239,0.25)","rgba(6,182,212,0.15)"],panelOrbs:["rgba(217,70,239,0.40)","rgba(99,102,241,0.40)","rgba(236,72,153,0.20)"],formOrbs:["rgba(124,58,237,0.12)","rgba(79,70,229,0.10)"],serviceAccents:[{accent:"#d946ef",accentRgb:"217,70,239"},{accent:"#a855f7",accentRgb:"168,85,247"},{accent:"#3b82f6",accentRgb:"59,130,246"},{accent:"#10b981",accentRgb:"16,185,129"},{accent:"#06b6d4",accentRgb:"6,182,212"}]}],b=f.reduce((e,a)=>(e[a.id]=a,e),{}),h="saturday";function p({name:e,className:a="h-5 w-5"}){let t={className:a,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};return"chat"===e?(0,r.jsxs)("svg",{...t,children:[(0,r.jsx)("path",{d:"M7.5 8.5h9"}),(0,r.jsx)("path",{d:"M7.5 12h5.5"}),(0,r.jsx)("path",{d:"M21 11.5a7.5 7.5 0 0 1-7.5 7.5H8l-5 3v-5.2A7.5 7.5 0 1 1 21 11.5Z"})]}):"translate"===e?(0,r.jsxs)("svg",{...t,children:[(0,r.jsx)("path",{d:"M4 5h7"}),(0,r.jsx)("path",{d:"M8 3v2"}),(0,r.jsx)("path",{d:"M10 5c-.6 3.2-2.4 5.7-5 7.5"}),(0,r.jsx)("path",{d:"M5 8c1.2 1.8 2.7 3.2 4.7 4.2"}),(0,r.jsx)("path",{d:"m14 21 4-9 4 9"}),(0,r.jsx)("path",{d:"M15.5 17.5h5"})]}):"support"===e?(0,r.jsxs)("svg",{...t,children:[(0,r.jsx)("path",{d:"M4 13a8 8 0 0 1 16 0"}),(0,r.jsx)("path",{d:"M18 19a3 3 0 0 1-3 3h-2"}),(0,r.jsx)("path",{d:"M4 13v3a2 2 0 0 0 2 2h1v-7H6a2 2 0 0 0-2 2Z"}),(0,r.jsx)("path",{d:"M20 13v3a2 2 0 0 1-2 2h-1v-7h1a2 2 0 0 1 2 2Z"})]}):"meeting"===e?(0,r.jsxs)("svg",{...t,children:[(0,r.jsx)("rect",{x:"3",y:"6",width:"13",height:"12",rx:"2"}),(0,r.jsx)("path",{d:"m16 10 5-3v10l-5-3"}),(0,r.jsx)("path",{d:"M7.5 10h4"}),(0,r.jsx)("path",{d:"M7.5 14h2.5"})]}):"resource"===e?(0,r.jsxs)("svg",{...t,children:[(0,r.jsx)("rect",{x:"4",y:"5",width:"16",height:"11",rx:"2"}),(0,r.jsx)("path",{d:"M8 20h8"}),(0,r.jsx)("path",{d:"M12 16v4"}),(0,r.jsx)("path",{d:"M8 9h8"}),(0,r.jsx)("path",{d:"M8 12h4"})]}):null}function m({service:e}){return(0,r.jsxs)("a",{href:e.href,target:"_blank",rel:"noopener noreferrer",className:"group relative flex flex-col justify-between overflow-hidden rounded-2xl border border-white/12 p-4 backdrop-blur-xl transition-all duration-300 hover:-translate-y-1 hover:border-white/25",style:{background:e.cardBg,boxShadow:"0 8px 24px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.05)"},children:[(0,r.jsx)("div",{className:"pointer-events-none absolute -right-8 -top-8 h-24 w-24 rounded-full opacity-50 blur-2xl transition-opacity duration-300 group-hover:opacity-80",style:{background:e.accent}}),(0,r.jsx)("div",{className:"pointer-events-none absolute inset-x-0 bottom-0 h-px opacity-0 transition-opacity duration-300 group-hover:opacity-100",style:{background:`linear-gradient(90deg, transparent, ${e.accent}, transparent)`}}),(0,r.jsxs)("div",{className:"relative z-10 mb-3 flex items-center justify-between",children:[(0,r.jsx)("span",{className:"rounded-full px-2.5 py-0.5 text-[9px] font-black uppercase tracking-[0.18em] text-white shadow-lg",style:{background:e.accent,boxShadow:`0 4px 12px rgba(${e.accentRgb}, 0.4)`},children:e.badge}),(0,r.jsx)("span",{className:"grid h-8 w-8 place-items-center rounded-xl bg-white/95 shadow-md ring-1 ring-white/20 transition-transform group-hover:scale-110 group-hover:rotate-3",style:{color:e.accent},children:(0,r.jsx)(p,{name:e.icon,className:"h-4 w-4"})})]}),(0,r.jsxs)("div",{className:"relative z-10 flex-1",children:[(0,r.jsx)("h3",{className:"text-sm font-bold text-white",children:e.title}),(0,r.jsx)("p",{className:"mt-1 text-[11px] leading-relaxed text-white/55 line-clamp-2",children:e.description})]}),(0,r.jsxs)("div",{className:"relative z-10 mt-3 flex items-center gap-1.5 text-[10px] font-black uppercase tracking-[0.14em] transition-colors group-hover:text-white",style:{color:e.ctaColor},children:[e.cta,(0,r.jsx)("svg",{className:"h-3 w-3 transition-transform group-hover:translate-x-1",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round",children:(0,r.jsx)("path",{d:"M5 12h14M13 5l7 7-7 7"})})]})]})}function u(){let[e,a]=(0,n.useState)("admin"),[t,c]=(0,n.useState)(""),[p,u]=(0,n.useState)(!1),[j,y]=(0,n.useState)(""),[v,w]=(0,n.useState)(""),[k,N]=(0,n.useState)(0),[R,L]=(0,n.useState)(!1),[M,C]=(0,n.useState)(null),[S,B]=(0,n.useState)("password"),[T,I]=(0,n.useState)(!1),[A,G]=(0,n.useState)("Sign in with OIDC"),[_,$]=(0,n.useState)(!1),[O,W]=(0,n.useState)(!1),[E,P]=(0,n.useState)("admin"),[D,z]=(0,n.useState)("auto"),[F,V]=(0,n.useState)(h),[Z,H]=(0,n.useState)(!1),U=(0,i.useRouter)(),q=(0,l.useBranding)(),Q=q?.logoUrl||null,J=q?.siteTitle||"",X=q?.siteShortName||"Fujinet",K=J||o.vQ?.name||"FJS Digital Workspace",Y=b["auto"===D?F:D]||b.saturday,ee=d.map((e,a)=>({...e,...Y.serviceAccents[a]||{},cardBg:Y.cardBg,ctaColor:Y.heroSubtitle}));(0,n.useEffect)(()=>{let e=()=>{let e;V(g[new Date().getDay()]||h),z("auto"===(e=window.localStorage.getItem(x))||b[e]?e:"auto"),H(!0)};e(),window.addEventListener("focus",e);let a=()=>{document.hidden||e()};return document.addEventListener("visibilitychange",a),()=>{window.removeEventListener("focus",e),document.removeEventListener("visibilitychange",a)}},[]);let ea=e=>{let a="auto"===e||b[e]?e:"auto";z(a),window.localStorage.setItem(x,a)};(0,n.useEffect)(()=>{if(k<=0)return;let e=setInterval(()=>N(e=>e>0?e-1:0),1e3);return()=>clearInterval(e)},[k]),(0,n.useEffect)(()=>{!async function(){let e=new AbortController,t=setTimeout(()=>e.abort(),5e3),r=window.location.origin;try{let c=await fetch(`${r}/api/auth/status`,{signal:e.signal});if(clearTimeout(t),c.ok){let e=await c.json();C(!!e.hasPassword),B(e.authMode||"password"),I(!0===e.oidcConfigured),G(e.oidcLoginLabel||"Sign in with OIDC"),$(!0===e.ldapEnabled),W(!0===e.ldapConfigured),P(e.localLoginUsername||"admin"),a(e.localLoginUsername||"admin")}else C(!0)}catch{clearTimeout(t),C(!0)}}()},[U]);let et=async a=>{a.preventDefault(),L(!0),y(""),w("");try{let a=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:e,password:t,loginType:"auto"})});if(a.ok)U.push("/dashboard"),U.refresh();else{let e=await a.json();y(e.error||"Invalid account or password"),e.resetHint&&w(e.resetHint),e.retryAfter&&N(Number(e.retryAfter))}}catch{y("An error occurred. Please try again.")}finally{L(!1)}},er=T&&["oidc","both"].includes(S),ec="oidc"!==S||!T,es=_&&O&&ec;return(0,r.jsxs)("main",{"data-theme-ready":Z?"true":"false",style:{"--theme-primary":Y.primary,"--theme-secondary":Y.secondary,"--theme-accent":Y.accent,"--theme-primary-rgb":Y.primaryRgb,"--theme-secondary-rgb":Y.secondaryRgb,"--theme-accent-rgb":Y.accentRgb,"--theme-button-gradient":Y.buttonGradient,"--theme-footer-icon-gradient":Y.footerIconGradient,"--theme-soft-text":Y.softText,"--theme-muted-text":Y.mutedText,background:Y.pageBg},className:"jsx-39c38f012cc9c82a relative min-h-screen overflow-hidden text-slate-800",children:[(0,r.jsxs)("div",{className:"jsx-39c38f012cc9c82a pointer-events-none absolute inset-0",children:[(0,r.jsx)("div",{style:{background:Y.aurora[0]},className:"jsx-39c38f012cc9c82a absolute -top-40 -left-40 h-[600px] w-[600px] rounded-full blur-[120px] animate-[floaty_12s_ease-in-out_infinite]"}),(0,r.jsx)("div",{style:{background:Y.aurora[1]},className:"jsx-39c38f012cc9c82a absolute top-1/3 -right-40 h-[500px] w-[500px] rounded-full blur-[120px] animate-[floaty_14s_ease-in-out_infinite_-3s]"}),(0,r.jsx)("div",{style:{background:Y.aurora[2]},className:"jsx-39c38f012cc9c82a absolute -bottom-40 left-1/3 h-[550px] w-[550px] rounded-full blur-[120px] animate-[floaty_16s_ease-in-out_infinite_-6s]"}),(0,r.jsx)("div",{style:{background:Y.aurora[3]},className:"jsx-39c38f012cc9c82a absolute top-1/2 left-1/2 h-[400px] w-[400px] -translate-x-1/2 -translate-y-1/2 rounded-full blur-[100px] animate-[floaty_10s_ease-in-out_infinite_-2s]"})]}),(0,r.jsx)(s(),{id:"39c38f012cc9c82a",children:'@keyframes floaty{0%,100%{transform:translate(0,0)scale(1)}33%{transform:translate(40px,-30px)scale(1.08)}66%{transform:translate(-30px,20px)scale(.95)}}@keyframes shimmer{0%{transform:translatex(-100%)}100%{transform:translatex(200%)}}@keyframes fadeUp{from{opacity:0;transform:translatey(20px)}to{opacity:1;transform:translatey(0)}}.shimmer-btn::after{content:"";position:absolute;top:0;left:0;bottom:0;width:60%;background:linear-gradient(90deg,transparent,rgba(255,255,255,.3),transparent);animation:shimmer 2.8s ease-in-out infinite;pointer-events:none}.fade-up{animation:fadeUp.6s ease-out backwards}.theme-input-icon{transition:color.2s ease}.theme-input-wrap:focus-within .theme-input-icon{color:var(--theme-primary)!important}.theme-input:focus{border-color:var(--theme-primary)!important;box-shadow:0 10px 24px rgba(var(--theme-primary-rgb),.12),0 0 0 4px rgba(var(--theme-primary-rgb),.12)!important}.theme-outline-button:hover{border-color:rgba(var(--theme-primary-rgb),.38)!important;background:rgba(var(--theme-primary-rgb),.055)!important;box-shadow:0 12px 28px rgba(var(--theme-primary-rgb),.1)!important}.theme-submit-btn{background:var(--theme-button-gradient);box-shadow:0 18px 42px rgba(var(--theme-primary-rgb),.3)}.theme-submit-btn:hover{box-shadow:0 22px 52px rgba(var(--theme-primary-rgb),.4)}.theme-footer-mark{background:var(--theme-footer-icon-gradient)}.theme-footer-link{color:var(--theme-soft-text)}.theme-footer-link:hover{color:#fff;text-decoration:underline}.theme-input-wrap button:hover{color:var(--theme-primary)!important}.theme-style-panel{border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.04);box-shadow:inset 0 1px 0 rgba(255,255,255,.06),0 12px 32px rgba(0,0,0,.12)}.theme-style-palette{display:inline-flex;align-items:center;gap:6px;padding:4px;border-radius:14px;background:rgba(255,255,255,.055);border:1px solid rgba(255,255,255,.085)}.theme-style-swatch{position:relative;width:28px;height:28px;flex:0 0 28px;display:grid;place-items:center;border:1px solid rgba(255,255,255,.18);border-radius:8px;color:#fff;cursor:pointer;overflow:hidden;outline:none;box-shadow:inset 0 1px 0 rgba(255,255,255,.22),0 8px 18px rgba(0,0,0,.18);transition:transform.16s ease,border-color.16s ease,box-shadow.16s ease,opacity.16s ease}.theme-style-swatch::before{content:"";position:absolute;inset:0;background:linear-gradient(135deg,rgba(255,255,255,.3),transparent 45%,rgba(0,0,0,.18));pointer-events:none}.theme-style-swatch:hover{transform:translatey(-2px)scale(1.04);border-color:rgba(255,255,255,.62);box-shadow:inset 0 1px 0 rgba(255,255,255,.3),0 12px 26px rgba(0,0,0,.24),0 0 0 4px rgba(var(--theme-accent-rgb),.1)}.theme-style-swatch:focus-visible{border-color:rgba(255,255,255,.92);box-shadow:inset 0 1px 0 rgba(255,255,255,.28),0 0 0 4px rgba(var(--theme-accent-rgb),.18),0 14px 28px rgba(0,0,0,.24)}.theme-style-swatch.is-active{border-color:rgba(255,255,255,.95);box-shadow:inset 0 1px 0 rgba(255,255,255,.32),0 0 0 3px rgba(var(--theme-accent-rgb),.2),0 14px 30px rgba(0,0,0,.28)}.theme-style-swatch.is-active::after{content:"✓";position:absolute;right:-1px;top:-1px;width:14px;height:14px;display:grid;place-items:center;border-radius:0 7px 0 8px;background:rgba(2,6,23,.82);color:#fff;font-size:9px;font-weight:1000;line-height:1;box-shadow:0 4px 12px rgba(0,0,0,.22)}.theme-style-swatch-auto span{position:relative;z-index:1;font-size:10px;font-weight:1000;letter-spacing:-.03em;text-shadow:0 1px 8px rgba(0,0,0,.42)}@media(max-width:420px){.theme-style-palette{gap:5px}.theme-style-swatch{width:25px;height:25px;flex-basis:25px;border-radius:7px}}'}),(0,r.jsxs)("div",{className:"jsx-39c38f012cc9c82a relative z-10 mx-auto flex min-h-screen max-w-7xl flex-col justify-center px-4 py-6 sm:px-6 lg:px-8 lg:py-8",children:[(0,r.jsxs)("div",{style:{boxShadow:"0 30px 90px rgba(0,0,0,0.45)"},className:"jsx-39c38f012cc9c82a grid w-full overflow-hidden rounded-[2rem] border border-white/10 bg-white/[0.02] backdrop-blur-2xl fade-up lg:grid-cols-[1.1fr_0.9fr]",children:[(0,r.jsxs)("div",{style:{background:Y.heroGradient},className:"jsx-39c38f012cc9c82a relative hidden overflow-hidden p-8 lg:flex lg:flex-col lg:justify-between lg:p-10",children:[(0,r.jsx)("div",{style:{background:Y.panelOrbs[0]},className:"jsx-39c38f012cc9c82a pointer-events-none absolute -top-20 -right-20 h-72 w-72 rounded-full blur-[60px]"}),(0,r.jsx)("div",{style:{background:Y.panelOrbs[1]},className:"jsx-39c38f012cc9c82a pointer-events-none absolute -bottom-20 -left-20 h-72 w-72 rounded-full blur-[60px]"}),(0,r.jsx)("div",{style:{background:Y.panelOrbs[2]},className:"jsx-39c38f012cc9c82a pointer-events-none absolute top-1/2 left-1/2 h-48 w-48 -translate-x-1/2 -translate-y-1/2 rounded-full blur-[50px]"}),(0,r.jsx)("div",{style:{backgroundImage:"linear-gradient(rgba(255,255,255,0.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.07) 1px, transparent 1px)",backgroundSize:"32px 32px",maskImage:"radial-gradient(ellipse at center, black 30%, transparent 75%)",WebkitMaskImage:"radial-gradient(ellipse at center, black 30%, transparent 75%)"},className:"jsx-39c38f012cc9c82a pointer-events-none absolute inset-0 opacity-40"}),(0,r.jsxs)("div",{className:"jsx-39c38f012cc9c82a relative z-10 flex flex-col gap-3",children:[(0,r.jsx)("div",{style:{width:"fit-content"},className:"jsx-39c38f012cc9c82a inline-flex h-12 items-center rounded-2xl bg-white/95 px-4 shadow-2xl shadow-indigo-900/40 ring-1 ring-white/20",children:(0,r.jsx)("img",{src:Q||"/fjslogo.svg",alt:K,className:"jsx-39c38f012cc9c82a h-7 w-auto"})}),(0,r.jsx)("div",{style:{color:Y.heroSubtitle},className:"jsx-39c38f012cc9c82a text-[11px] uppercase tracking-[0.18em]",children:"Software Solutions \xb7 Internal Portal"})]}),(0,r.jsxs)("div",{className:"jsx-39c38f012cc9c82a relative z-10",children:[(0,r.jsxs)("div",{style:{background:`rgba(${Y.primaryRgb}, 0.13)`},className:"jsx-39c38f012cc9c82a mb-5 inline-flex items-center gap-2 rounded-full border border-white/20 px-3.5 py-1.5 text-[10px] font-semibold uppercase tracking-[0.18em] text-white backdrop-blur-md",children:[(0,r.jsxs)("span",{className:"jsx-39c38f012cc9c82a relative flex h-1.5 w-1.5",children:[(0,r.jsx)("span",{className:"jsx-39c38f012cc9c82a absolute inline-flex h-full w-full animate-ping rounded-full bg-emerald-400 opacity-75"}),(0,r.jsx)("span",{className:"jsx-39c38f012cc9c82a relative inline-flex h-1.5 w-1.5 rounded-full bg-emerald-400"})]}),J?`${J} \xb7 Internal`:"AI Router Gateway \xb7 Internal"]}),(0,r.jsxs)("h1",{className:"jsx-39c38f012cc9c82a text-3xl font-black leading-[1.1] tracking-tight text-white xl:text-4xl",children:["Truy cập cổng"," ",(0,r.jsx)("span",{style:{backgroundImage:Y.titleGradient},className:"jsx-39c38f012cc9c82a bg-clip-text text-transparent",children:"AI nội bộ"})," ",X]}),(0,r.jsx)("p",{style:{color:Y.heroBody},className:"jsx-39c38f012cc9c82a mt-4 max-w-md text-sm leading-relaxed",children:"API key gateway d\xf9ng chung cho to\xe0n bộ workload AI — translation, coding assistance, agent runtime v\xe0 internal services."})]}),(0,r.jsx)("div",{className:"jsx-39c38f012cc9c82a relative z-10 space-y-2.5",children:[{icon:(0,r.jsx)("path",{d:"M16.5 10.5V7a4.5 4.5 0 0 0-9 0v3.5M5 10.5h14v9a1.5 1.5 0 0 1-1.5 1.5h-11A1.5 1.5 0 0 1 5 19.5v-9Z",className:"jsx-39c38f012cc9c82a"}),text:"Đăng nhập bằng t\xe0i khoản nội bộ"},{icon:(0,r.jsx)("path",{d:"M12 3 4 6.5v5C4 16.5 7.5 20.5 12 21c4.5-.5 8-4.5 8-9.5v-5L12 3Z",className:"jsx-39c38f012cc9c82a"}),text:"Quản l\xfd & tự cấp API key"},{icon:(0,r.jsx)("path",{d:"M13 2 3 14h7l-1 8 10-12h-7l1-8Z",className:"jsx-39c38f012cc9c82a"}),text:"Self-hosted \xb7 bảo mật dữ liệu"}].map((e,a)=>(0,r.jsxs)("div",{style:{color:Y.heroBody},className:"jsx-39c38f012cc9c82a flex items-center gap-3 text-[13px]",children:[(0,r.jsx)("div",{className:"jsx-39c38f012cc9c82a flex h-8 w-8 shrink-0 items-center justify-center rounded-xl border border-white/15 bg-white/10 backdrop-blur-md",children:(0,r.jsx)("svg",{fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"jsx-39c38f012cc9c82a h-3.5 w-3.5 text-white",children:e.icon})}),(0,r.jsx)("span",{className:"jsx-39c38f012cc9c82a",children:e.text})]},a))})]}),(0,r.jsxs)("div",{style:{background:Y.formBg},className:"jsx-39c38f012cc9c82a relative flex flex-col p-7 sm:p-10",children:[(0,r.jsx)("div",{style:{background:Y.formOrbs[0]},className:"jsx-39c38f012cc9c82a pointer-events-none absolute -top-24 -right-24 h-72 w-72 rounded-full blur-3xl"}),(0,r.jsx)("div",{style:{background:Y.formOrbs[1]},className:"jsx-39c38f012cc9c82a pointer-events-none absolute -bottom-24 -left-24 h-64 w-64 rounded-full blur-3xl"}),(0,r.jsxs)("div",{className:"jsx-39c38f012cc9c82a mb-6 flex items-center gap-3 lg:hidden",children:[(0,r.jsx)("div",{style:{background:Y.buttonGradient,boxShadow:`0 12px 28px rgba(${Y.primaryRgb}, 0.24)`},className:"jsx-39c38f012cc9c82a inline-flex h-10 items-center rounded-xl px-3 shadow-lg",children:(0,r.jsx)("img",{src:Q||"/fjslogo.svg",alt:K,className:`jsx-39c38f012cc9c82a h-6 w-auto ${Q?"":"brightness-0 invert"}`})}),(0,r.jsx)("div",{className:"jsx-39c38f012cc9c82a",children:(0,r.jsx)("div",{style:{color:Y.primary},className:"jsx-39c38f012cc9c82a text-[10px] uppercase tracking-[0.18em]",children:J||"AI Router Gateway"})})]}),(0,r.jsxs)("div",{className:"jsx-39c38f012cc9c82a relative z-10 flex flex-1 flex-col",children:[(0,r.jsxs)("div",{className:"jsx-39c38f012cc9c82a",children:[(0,r.jsxs)("span",{style:{background:Y.buttonGradient,boxShadow:`0 12px 28px rgba(${Y.primaryRgb}, 0.22)`},className:"jsx-39c38f012cc9c82a inline-flex items-center gap-1.5 rounded-full px-3 py-1 text-[10px] font-black uppercase tracking-[0.18em] text-white shadow-lg",children:[(0,r.jsxs)("svg",{fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,className:"jsx-39c38f012cc9c82a h-3 w-3",children:[(0,r.jsx)("rect",{x:"4",y:"11",width:"16",height:"9",rx:"2",className:"jsx-39c38f012cc9c82a"}),(0,r.jsx)("path",{d:"M8 11V7a4 4 0 0 1 8 0v4",className:"jsx-39c38f012cc9c82a"})]}),"Đăng nhập"]}),(0,r.jsx)("h2",{className:"jsx-39c38f012cc9c82a mt-3 text-2xl font-black tracking-tight text-slate-950",children:"Ch\xe0o mừng trở lại"}),(0,r.jsx)("p",{className:"jsx-39c38f012cc9c82a mt-1.5 text-sm text-slate-500",children:"Đăng nhập để quản l\xfd API key & route AI traffic nội bộ."})]}),null===M?(0,r.jsxs)("div",{className:"jsx-39c38f012cc9c82a mt-6 flex items-center justify-center gap-3 rounded-2xl border border-slate-200 bg-slate-50/80 px-4 py-5 text-sm text-slate-500",children:[(0,r.jsxs)("svg",{style:{color:Y.primary},fill:"none",viewBox:"0 0 24 24",className:"jsx-39c38f012cc9c82a h-4 w-4 animate-spin",children:[(0,r.jsx)("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"3",className:"jsx-39c38f012cc9c82a opacity-25"}),(0,r.jsx)("path",{fill:"currentColor",d:"M4 12a8 8 0 0 1 8-8V0C5.4 0 0 5.4 0 12h4Z",className:"jsx-39c38f012cc9c82a opacity-75"})]}),"Đang tải cấu h\xecnh x\xe1c thực..."]}):(0,r.jsxs)("div",{className:"jsx-39c38f012cc9c82a mt-6",children:[er&&(0,r.jsxs)("button",{type:"button",onClick:()=>{window.location.href="/api/auth/oidc/start"},className:"jsx-39c38f012cc9c82a theme-outline-button group mb-3 flex w-full items-center justify-center gap-2.5 rounded-2xl border border-slate-200 bg-white px-4 py-2.5 text-sm font-bold text-slate-700 shadow-sm transition-all hover:-translate-y-0.5",children:[(0,r.jsxs)("svg",{style:{color:Y.primary},fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.2,strokeLinecap:"round",strokeLinejoin:"round",className:"jsx-39c38f012cc9c82a h-4 w-4",children:[(0,r.jsx)("circle",{cx:"12",cy:"12",r:"10",className:"jsx-39c38f012cc9c82a"}),(0,r.jsx)("path",{d:"m9 12 2 2 4-4",className:"jsx-39c38f012cc9c82a"})]}),A,(0,r.jsx)("svg",{fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,className:"jsx-39c38f012cc9c82a h-3.5 w-3.5 text-slate-400 transition-transform group-hover:translate-x-0.5",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 12h14M13 5l7 7-7 7",className:"jsx-39c38f012cc9c82a"})})]}),er&&ec&&(0,r.jsxs)("div",{className:"jsx-39c38f012cc9c82a mb-3 flex items-center gap-3 text-[11px] font-semibold uppercase tracking-[0.18em] text-slate-400",children:[(0,r.jsx)("span",{className:"jsx-39c38f012cc9c82a h-px flex-1 bg-slate-200"}),"hoặc",(0,r.jsx)("span",{className:"jsx-39c38f012cc9c82a h-px flex-1 bg-slate-200"})]}),ec?(0,r.jsxs)("form",{onSubmit:et,className:"jsx-39c38f012cc9c82a space-y-3",children:[(0,r.jsxs)("div",{className:"jsx-39c38f012cc9c82a",children:[(0,r.jsx)("label",{className:"jsx-39c38f012cc9c82a mb-1 block text-[11px] font-black uppercase tracking-[0.16em] text-slate-500",children:"T\xe0i khoản"}),(0,r.jsxs)("div",{className:"jsx-39c38f012cc9c82a theme-input-wrap group relative",children:[(0,r.jsx)("span",{className:"jsx-39c38f012cc9c82a theme-input-icon pointer-events-none absolute left-3.5 top-1/2 -translate-y-1/2 text-slate-400 transition-colors",children:(0,r.jsxs)("svg",{fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"jsx-39c38f012cc9c82a h-4 w-4",children:[(0,r.jsx)("circle",{cx:"12",cy:"8",r:"4",className:"jsx-39c38f012cc9c82a"}),(0,r.jsx)("path",{d:"M4 21c0-4.4 3.6-8 8-8s8 3.6 8 8",className:"jsx-39c38f012cc9c82a"})]})}),(0,r.jsx)("input",{value:e,onChange:e=>a(e.target.value),placeholder:es?"admin hoặc LDAP username":E||"admin",autoFocus:!er,required:!0,className:"jsx-39c38f012cc9c82a theme-input w-full rounded-2xl border border-slate-200 bg-white py-2.5 pl-11 pr-3.5 text-sm font-medium text-slate-900 shadow-sm outline-none transition-all placeholder:font-normal placeholder:text-slate-400"})]})]}),(0,r.jsxs)("div",{className:"jsx-39c38f012cc9c82a",children:[(0,r.jsx)("label",{className:"jsx-39c38f012cc9c82a mb-1 block text-[11px] font-black uppercase tracking-[0.16em] text-slate-500",children:"Mật khẩu"}),(0,r.jsxs)("div",{className:"jsx-39c38f012cc9c82a theme-input-wrap group relative",children:[(0,r.jsx)("span",{className:"jsx-39c38f012cc9c82a theme-input-icon pointer-events-none absolute left-3.5 top-1/2 -translate-y-1/2 text-slate-400 transition-colors",children:(0,r.jsxs)("svg",{fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"jsx-39c38f012cc9c82a h-4 w-4",children:[(0,r.jsx)("rect",{x:"4",y:"11",width:"16",height:"10",rx:"2",className:"jsx-39c38f012cc9c82a"}),(0,r.jsx)("path",{d:"M8 11V7a4 4 0 0 1 8 0v4",className:"jsx-39c38f012cc9c82a"})]})}),(0,r.jsx)("input",{type:p?"text":"password",value:t,onChange:e=>c(e.target.value),placeholder:"Nhập mật khẩu",required:!0,className:"jsx-39c38f012cc9c82a theme-input w-full rounded-2xl border border-slate-200 bg-white py-2.5 pl-11 pr-11 text-sm font-medium text-slate-900 shadow-sm outline-none transition-all placeholder:font-normal placeholder:text-slate-400"}),(0,r.jsx)("button",{type:"button",onClick:()=>u(e=>!e),tabIndex:-1,style:{"--hover-color":Y.primary},"aria-label":p?"Ẩn mật khẩu":"Hiện mật khẩu",className:"jsx-39c38f012cc9c82a absolute right-3 top-1/2 -translate-y-1/2 rounded-lg p-1.5 text-slate-400 transition-colors hover:bg-slate-100",children:p?(0,r.jsxs)("svg",{fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"jsx-39c38f012cc9c82a h-4 w-4",children:[(0,r.jsx)("path",{d:"M3 3l18 18",className:"jsx-39c38f012cc9c82a"}),(0,r.jsx)("path",{d:"M10.6 6.1A10.5 10.5 0 0 1 12 6c6.5 0 10 7 10 7a17 17 0 0 1-2.2 3.2M6.6 6.6A17 17 0 0 0 2 13s3.5 7 10 7a10 10 0 0 0 5.4-1.6",className:"jsx-39c38f012cc9c82a"}),(0,r.jsx)("path",{d:"M9.9 9.9a3 3 0 0 0 4.2 4.2",className:"jsx-39c38f012cc9c82a"})]}):(0,r.jsxs)("svg",{fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"jsx-39c38f012cc9c82a h-4 w-4",children:[(0,r.jsx)("path",{d:"M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12Z",className:"jsx-39c38f012cc9c82a"}),(0,r.jsx)("circle",{cx:"12",cy:"12",r:"3",className:"jsx-39c38f012cc9c82a"})]})})]})]}),"oidc"===S&&!T&&(0,r.jsxs)("div",{className:"jsx-39c38f012cc9c82a flex items-start gap-2.5 rounded-2xl border border-amber-200 bg-amber-50 p-2.5 text-xs text-amber-800",children:[(0,r.jsx)("svg",{fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,className:"jsx-39c38f012cc9c82a mt-0.5 h-4 w-4 shrink-0",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v4m0 4h.01M10.3 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0Z",className:"jsx-39c38f012cc9c82a"})}),(0,r.jsx)("span",{className:"jsx-39c38f012cc9c82a",children:"OIDC đang bật nhưng chưa cấu h\xecnh. Password login vẫn d\xf9ng được để recovery."})]}),"both"===S&&T&&(0,r.jsxs)("div",{style:{borderColor:`rgba(${Y.primaryRgb}, 0.22)`,background:`rgba(${Y.primaryRgb}, 0.075)`,color:Y.primary},className:"jsx-39c38f012cc9c82a flex items-start gap-2.5 rounded-2xl border p-2.5 text-xs",children:[(0,r.jsxs)("svg",{fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,className:"jsx-39c38f012cc9c82a mt-0.5 h-4 w-4 shrink-0",children:[(0,r.jsx)("circle",{cx:"12",cy:"12",r:"10",className:"jsx-39c38f012cc9c82a"}),(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 16v-4m0-4h.01",className:"jsx-39c38f012cc9c82a"})]}),(0,r.jsx)("span",{className:"jsx-39c38f012cc9c82a",children:"Password/OIDC login đều khả dụng."})]}),j&&(0,r.jsxs)("div",{className:"jsx-39c38f012cc9c82a flex items-start gap-2.5 rounded-2xl border border-red-200 bg-red-50 p-2.5 text-sm text-red-700",children:[(0,r.jsxs)("svg",{fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,className:"jsx-39c38f012cc9c82a mt-0.5 h-4 w-4 shrink-0",children:[(0,r.jsx)("circle",{cx:"12",cy:"12",r:"10",className:"jsx-39c38f012cc9c82a"}),(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 8v4m0 4h.01",className:"jsx-39c38f012cc9c82a"})]}),(0,r.jsx)("span",{className:"jsx-39c38f012cc9c82a",children:j})]}),k>0&&(0,r.jsxs)("div",{className:"jsx-39c38f012cc9c82a flex items-start gap-2.5 rounded-2xl border border-red-200 bg-red-50 p-2.5 text-sm text-red-700",children:[(0,r.jsxs)("svg",{fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,className:"jsx-39c38f012cc9c82a mt-0.5 h-4 w-4 shrink-0",children:[(0,r.jsx)("circle",{cx:"12",cy:"12",r:"10",className:"jsx-39c38f012cc9c82a"}),(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6l4 2",className:"jsx-39c38f012cc9c82a"})]}),(0,r.jsxs)("span",{className:"jsx-39c38f012cc9c82a",children:["Đ\xe3 kh\xf3a. Thử lại sau ",k,"s."]})]}),v&&(0,r.jsxs)("div",{className:"jsx-39c38f012cc9c82a rounded-2xl border border-slate-200 bg-slate-50 p-2.5 text-xs text-slate-600",children:["Qu\xean mật khẩu? Mở"," ",(0,r.jsx)("span",{className:"jsx-39c38f012cc9c82a rounded bg-slate-200/70 px-1.5 py-0.5 font-mono text-[11px]",children:"bluerouter"})," ","CLI tr\xean host → Settings → Reset Password to Default."]}),(0,r.jsx)("button",{type:"submit",disabled:R||k>0,className:"jsx-39c38f012cc9c82a theme-submit-btn shimmer-btn relative mt-1 flex w-full items-center justify-center gap-2 overflow-hidden rounded-2xl px-4 py-3 text-sm font-black uppercase tracking-[0.06em] text-white transition-all hover:-translate-y-0.5 active:translate-y-0 disabled:cursor-not-allowed disabled:opacity-60 disabled:hover:translate-y-0",children:(0,r.jsx)("span",{className:"jsx-39c38f012cc9c82a relative z-10 flex items-center gap-2",children:R?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("svg",{fill:"none",viewBox:"0 0 24 24",className:"jsx-39c38f012cc9c82a h-4 w-4 animate-spin",children:[(0,r.jsx)("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"3",className:"jsx-39c38f012cc9c82a opacity-25"}),(0,r.jsx)("path",{fill:"currentColor",d:"M4 12a8 8 0 0 1 8-8V0C5.4 0 0 5.4 0 12h4Z",className:"jsx-39c38f012cc9c82a opacity-75"})]}),"Đang đăng nhập..."]}):k>0?(0,r.jsxs)(r.Fragment,{children:["Đợi ",k,"s"]}):(0,r.jsxs)(r.Fragment,{children:["Đăng nhập",(0,r.jsx)("svg",{fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round",className:"jsx-39c38f012cc9c82a h-4 w-4",children:(0,r.jsx)("path",{d:"M5 12h14M13 5l7 7-7 7",className:"jsx-39c38f012cc9c82a"})})]})})}),!1===M&&(0,r.jsx)("p",{className:"jsx-39c38f012cc9c82a text-center text-xs text-slate-500",children:"Chưa c\xf3 custom password. Default password vẫn d\xf9ng được cho đến khi bạn đổi."})]}):j&&(0,r.jsx)("div",{className:"jsx-39c38f012cc9c82a rounded-2xl border border-red-200 bg-red-50 p-3 text-sm text-red-700",children:j})]})]})]})]}),(0,r.jsxs)("div",{style:{animationDelay:"0.15s"},className:"jsx-39c38f012cc9c82a relative z-10 mt-6 fade-up",children:[(0,r.jsxs)("div",{className:"jsx-39c38f012cc9c82a mb-4 flex items-center justify-between",children:[(0,r.jsxs)("div",{className:"jsx-39c38f012cc9c82a flex items-center gap-3",children:[(0,r.jsx)("span",{style:{background:`linear-gradient(90deg, transparent, rgba(${Y.accentRgb}, 0.62))`},className:"jsx-39c38f012cc9c82a h-px w-8"}),(0,r.jsx)("span",{style:{color:Y.heroSubtitle},className:"jsx-39c38f012cc9c82a text-[11px] font-black uppercase tracking-[0.22em]",children:"Hệ thống nội bộ"}),(0,r.jsx)("span",{style:{background:`linear-gradient(270deg, transparent, rgba(${Y.accentRgb}, 0.62))`},className:"jsx-39c38f012cc9c82a h-px w-8"})]}),(0,r.jsx)("span",{className:"jsx-39c38f012cc9c82a text-[11px] text-white/40",children:"Truy cập nhanh c\xe1c dịch vụ"})]}),(0,r.jsx)("div",{className:"jsx-39c38f012cc9c82a grid gap-3 sm:grid-cols-2 lg:grid-cols-5",children:ee.map(e=>(0,r.jsx)(m,{service:e},e.badge))})]}),(0,r.jsxs)("footer",{className:"jsx-39c38f012cc9c82a relative z-10 mt-6 flex flex-col items-center justify-between gap-3 border-t border-white/10 pt-5 text-xs text-white/40 sm:flex-row",children:[(0,r.jsxs)("div",{className:"jsx-39c38f012cc9c82a flex items-center gap-3",children:[(0,r.jsx)("div",{className:"jsx-39c38f012cc9c82a theme-footer-mark flex h-8 w-8 items-center justify-center rounded-xl text-white shadow-lg ring-1 ring-white/10",children:(0,r.jsxs)("svg",{fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.2,strokeLinecap:"round",strokeLinejoin:"round",className:"jsx-39c38f012cc9c82a h-4 w-4",children:[(0,r.jsx)("path",{d:"M12 3.75 19.5 8v8L12 20.25 4.5 16V8L12 3.75Z",className:"jsx-39c38f012cc9c82a"}),(0,r.jsx)("path",{d:"M12 8v8",className:"jsx-39c38f012cc9c82a"}),(0,r.jsx)("path",{d:"m7.5 10.25 4.5 2.5 4.5-2.5",className:"jsx-39c38f012cc9c82a"})]})}),(0,r.jsxs)("div",{className:"jsx-39c38f012cc9c82a leading-tight",children:[(0,r.jsx)("div",{className:"jsx-39c38f012cc9c82a font-semibold text-white/70",children:"Fujinet Internal Portal"}),(0,r.jsx)("div",{className:"jsx-39c38f012cc9c82a text-[11px] text-white/40",children:"AI Workspace \xb7 Meeting \xb7 Support \xb7 Resource"})]})]}),(0,r.jsxs)("div",{className:"jsx-39c38f012cc9c82a flex flex-col items-center gap-3 sm:flex-row",children:[(0,r.jsxs)("div",{className:"jsx-39c38f012cc9c82a theme-style-panel flex items-center gap-2 rounded-2xl px-2.5 py-2 text-[11px] text-white/50 backdrop-blur-md",children:[(0,r.jsx)("span",{style:{background:Y.accent,boxShadow:`0 0 18px rgba(${Y.accentRgb}, 0.75)`},className:"jsx-39c38f012cc9c82a h-2.5 w-2.5 rounded-full shadow-lg"}),(0,r.jsx)("span",{className:"jsx-39c38f012cc9c82a hidden font-semibold text-white/55 md:inline",children:"Style"}),(0,r.jsxs)("div",{role:"radiogroup","aria-label":"Chọn phong c\xe1ch m\xe0u sắc",className:"jsx-39c38f012cc9c82a theme-style-palette",children:[(0,r.jsx)("button",{type:"button",role:"radio","aria-checked":"auto"===D,"aria-label":`Auto theo ng\xe0y - ${Y.dayLabel} - ${Y.name}`,title:`Auto \xb7 ${Y.dayLabel} \xb7 ${Y.name}`,onClick:()=>ea("auto"),style:{background:`conic-gradient(from 135deg, ${Y.primary}, ${Y.secondary}, ${Y.accent}, ${Y.primary})`},className:`jsx-39c38f012cc9c82a theme-style-swatch theme-style-swatch-auto ${"auto"===D?"is-active":""}`,children:(0,r.jsx)("span",{className:"jsx-39c38f012cc9c82a",children:"A"})}),f.map(e=>{let a=D===e.id;return(0,r.jsx)("button",{type:"button",role:"radio","aria-checked":a,"aria-label":`${e.dayLabel} - ${e.name}`,title:`${e.dayLabel} \xb7 ${e.name}`,onClick:()=>ea(e.id),style:{background:`linear-gradient(135deg, ${e.primary} 0%, ${e.secondary} 52%, ${e.accent} 100%)`},className:`jsx-39c38f012cc9c82a theme-style-swatch ${a?"is-active":""}`},e.id)})]})]}),(0,r.jsxs)("div",{className:"jsx-39c38f012cc9c82a text-white/50",children:["\xa9 2026 Fujinet Systems."," ",(0,r.jsx)("a",{href:"mailto:itadmin@fujinet.net",className:"jsx-39c38f012cc9c82a theme-footer-link font-semibold",children:"Contact: itadmin@fujinet.net"})]})]})]})]})]})}}},e=>{e.O(0,[5242,5564,5263,8441,3794,7358],()=>e(e.s=33796)),_N_E=e.O()}]);