@jheavenknows/bluerouter 5.1.62 → 5.2.2
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.
- package/app/.next-cli-build/BUILD_ID +1 -1
- package/app/.next-cli-build/app-path-routes-manifest.json +13 -11
- package/app/.next-cli-build/build-manifest.json +2 -2
- package/app/.next-cli-build/routes-manifest.json +12 -0
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/analytics/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/analytics/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/analytics/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/api-keys/page.js +3 -3
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/api-keys/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/api-keys/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +3 -3
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cluster/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cluster/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cluster/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +3 -3
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalcloudprovider/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalcloudprovider/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalcloudprovider/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalcloudprovidermonitor/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalcloudprovidermonitor/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalcloudprovidermonitor/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalquota/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalquota/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalquota/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/prompt-logs/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/prompt-logs/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/prompt-logs/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/provider-health/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/provider-health/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/provider-health/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +3 -3
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/resource-monitor/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/resource-monitor/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/resource-monitor/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_global-error/page.js +2 -2
- package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_global-error.html +1 -1
- package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found/page.js +2 -2
- package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_not-found.html +1 -1
- package/app/.next-cli-build/server/app/_not-found.rsc +5 -5
- package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/api/auth/ldap/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/ldap/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/ldap/users/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/ldap/users/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/login/route.js +2 -2
- package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/branding/[asset]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/branding/[asset]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/branding/route.js +1 -1
- package/app/.next-cli-build/server/app/api/branding/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/branding/upload/route.js +1 -1
- package/app/.next-cli-build/server/app/api/branding/upload/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/autostart/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/autostart/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/prompt-log-db/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/prompt-log-db/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/root-ca/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/root-ca/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +3 -3
- package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/qwen-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/qwen-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cluster/config/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cluster/config/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cluster/heartbeat/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cluster/heartbeat/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cluster/peers/[id]/command/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cluster/peers/[id]/command/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cluster/peers/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cluster/peers/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cluster/peers/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cluster/peers/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cluster/snapshot/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cluster/snapshot/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cluster/sync/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cluster/sync/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cluster/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cluster/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/[id]/route.js +2 -2
- package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/dashboard/analytics/ai-models/route.js +1 -0
- package/app/.next-cli-build/server/app/api/dashboard/analytics/ai-models/route.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/api/dashboard/analytics/ai-models/route_client-reference-manifest.js +1 -0
- package/app/.next-cli-build/server/app/api/dashboard/analytics/analyze/route.js +47 -0
- package/app/.next-cli-build/server/app/api/dashboard/analytics/analyze/route.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/api/dashboard/analytics/analyze/route_client-reference-manifest.js +1 -0
- package/app/.next-cli-build/server/app/api/dashboard/analytics/route.js +1 -329
- package/app/.next-cli-build/server/app/api/dashboard/analytics/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/dashboard/combos/route.js +1 -1
- package/app/.next-cli-build/server/app/api/dashboard/combos/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/dashboard/endpoint/route.js +1 -1
- package/app/.next-cli-build/server/app/api/dashboard/endpoint/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/options/route.js +1 -1
- package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/options/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/dashboard/token-saver/route.js +2 -2
- package/app/.next-cli-build/server/app/api/dashboard/token-saver/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/health/route.js +1 -1
- package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/init/route.js +1 -1
- package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/keys/[id]/caveman-test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/keys/[id]/caveman-test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/keys/[id]/rotate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/keys/[id]/rotate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/keys/route.js +2 -2
- package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
- package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +2 -2
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +2 -2
- package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +2 -2
- package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +2 -2
- package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/api-key-models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/api-key-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/import-models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/import-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/models/[...routeModel]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/models/[...routeModel]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/usage/route.js +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/usage/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-providers/client/route.js +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-providers/client/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-providers/monitor/route.js +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-providers/monitor/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-providers/permissions/route.js +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-providers/permissions/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-providers/route.js +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-providers/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-providers/routing/route.js +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-providers/routing/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pricing/recalculate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/pricing/recalculate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
- package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-health/route.js +1 -1
- package/app/.next-cli-build/server/app/api/provider-health/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +2 -2
- package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +2 -2
- package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +2 -2
- package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/resource-monitor/[id]/route.js +3 -3
- package/app/.next-cli-build/server/app/api/resource-monitor/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/resource-monitor/ai-models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/resource-monitor/ai-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/resource-monitor/analyze/route.js +3 -3
- package/app/.next-cli-build/server/app/api/resource-monitor/analyze/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/resource-monitor/history/route.js +1 -1
- package/app/.next-cli-build/server/app/api/resource-monitor/history/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/resource-monitor/route.js +3 -3
- package/app/.next-cli-build/server/app/api/resource-monitor/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
- package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tags/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
- package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +2 -2
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-login/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-login/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-start-daemon/route.js +2 -2
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-start-daemon/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/stream/route.js +2 -2
- package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/restart/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/restart/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/callback/page.js +2 -2
- package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/callback.html +1 -1
- package/app/.next-cli-build/server/app/callback.rsc +5 -5
- package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/analytics.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/analytics.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/analytics.segments/!KGRhc2hib2FyZCk/dashboard/analytics/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/analytics.segments/!KGRhc2hib2FyZCk/dashboard/analytics.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/analytics.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/analytics.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/analytics.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/analytics.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/analytics.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/analytics.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/api-keys.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/api-keys.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/api-keys.segments/!KGRhc2hib2FyZCk/dashboard/api-keys/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/api-keys.segments/!KGRhc2hib2FyZCk/dashboard/api-keys.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/api-keys.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/api-keys.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/api-keys.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/api-keys.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/api-keys.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/api-keys.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/cluster.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/cluster.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/cluster.segments/!KGRhc2hib2FyZCk/dashboard/cluster/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/cluster.segments/!KGRhc2hib2FyZCk/dashboard/cluster.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/cluster.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/cluster.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/cluster.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/cluster.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/cluster.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/cluster.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/prompt-logs.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/prompt-logs.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/!KGRhc2hib2FyZCk/dashboard/prompt-logs/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/!KGRhc2hib2FyZCk/dashboard/prompt-logs.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/provider-health.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/provider-health.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/provider-health.segments/!KGRhc2hib2FyZCk/dashboard/provider-health/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/provider-health.segments/!KGRhc2hib2FyZCk/dashboard/provider-health.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/provider-health.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/provider-health.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/provider-health.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/provider-health.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/provider-health.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/provider-health.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/quota.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/quota.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/resource-monitor.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/resource-monitor.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/resource-monitor.segments/!KGRhc2hib2FyZCk/dashboard/resource-monitor/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/resource-monitor.segments/!KGRhc2hib2FyZCk/dashboard/resource-monitor.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/resource-monitor.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/resource-monitor.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/resource-monitor.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/resource-monitor.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/resource-monitor.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/resource-monitor.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +2 -2
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard.html +1 -1
- package/app/.next-cli-build/server/app/dashboard.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/favicon.ico/route.js +1 -1
- package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/index.html +1 -1
- package/app/.next-cli-build/server/app/index.rsc +5 -5
- package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/landing/page.js +2 -2
- package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/landing.html +1 -1
- package/app/.next-cli-build/server/app/landing.rsc +5 -5
- package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/login/page.js +2 -2
- package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/login.html +1 -1
- package/app/.next-cli-build/server/app/login.rsc +6 -6
- package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
- package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/page.js +2 -2
- package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app-paths-manifest.json +13 -11
- package/app/.next-cli-build/server/chunks/2664.js +1 -0
- package/app/.next-cli-build/server/chunks/2731.js +375 -0
- package/app/.next-cli-build/server/chunks/{3248.js → 3031.js} +2 -2
- package/app/.next-cli-build/server/chunks/3110.js +1 -1
- package/app/.next-cli-build/server/chunks/402.js +1 -1
- package/app/.next-cli-build/server/chunks/4746.js +1 -1
- package/app/.next-cli-build/server/chunks/4790.js +1 -1
- package/app/.next-cli-build/server/chunks/5434.js +329 -0
- package/app/.next-cli-build/server/chunks/5810.js +384 -0
- package/app/.next-cli-build/server/chunks/{9479.js → 6118.js} +1 -1
- package/app/.next-cli-build/server/chunks/6328.js +1 -1
- package/app/.next-cli-build/server/chunks/6759.js +1 -1
- package/app/.next-cli-build/server/chunks/6811.js +1 -1
- package/app/.next-cli-build/server/chunks/689.js +6 -6
- package/app/.next-cli-build/server/chunks/6977.js +4 -233
- package/app/.next-cli-build/server/chunks/8352.js +2 -2
- package/app/.next-cli-build/server/chunks/8491.js +2 -2
- package/app/.next-cli-build/server/instrumentation.js +1 -1
- package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
- package/app/.next-cli-build/server/middleware.js +3 -3
- package/app/.next-cli-build/server/pages/404.html +1 -1
- package/app/.next-cli-build/server/pages/500.html +1 -1
- package/app/.next-cli-build/static/BIH1g3Yd5VQncWi8LdEE6/_buildManifest.js +1 -0
- package/app/.next-cli-build/static/chunks/{5263-750f758e19269333.js → 5263-16490fa9b29bdb76.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/analytics/page-614fffe896b7f62a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/resource-monitor/{page-05d2cd8e11e930dc.js → page-5f479cc10bd09c16.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/_global-error/page-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/ldap/test/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/ldap/users/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/login/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/status/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/branding/[asset]/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/branding/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/branding/upload/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/autostart/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/prompt-log-db/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/root-ca/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/qwen-settings/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cluster/config/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cluster/heartbeat/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cluster/peers/[id]/command/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cluster/peers/[id]/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cluster/peers/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cluster/snapshot/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cluster/sync/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cluster/test/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/combos/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/dashboard/analytics/ai-models/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/dashboard/analytics/analyze/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/dashboard/analytics/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/dashboard/combos/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/dashboard/endpoint/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/dashboard/prompt-logs/[id]/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/dashboard/prompt-logs/options/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/dashboard/prompt-logs/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/dashboard/token-saver/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/health/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/init/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/keys/[id]/caveman-test/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/keys/[id]/rotate/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/keys/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/locale/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/alias/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/availability/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/custom/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/test/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/[id]/api-key-models/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/[id]/import-models/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/[id]/models/[...routeModel]/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/[id]/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/[id]/usage/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/client/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/monitor/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/permissions/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/routing/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pricing/recalculate/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pricing/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-health/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/client/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/resource-monitor/[id]/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/resource-monitor/ai-models/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/resource-monitor/analyze/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/resource-monitor/history/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/resource-monitor/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/database/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/shutdown/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tags/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/load/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/save/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/send/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-login/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-start-daemon/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/history/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/search/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/restart/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/update/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/page-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-9dd8e15354833c59.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-9dd8e15354833c59.js +1 -0
- package/app/cli/.build-home/AppData/Roaming/bluerouter/db/data.sqlite-shm +0 -0
- package/app/cli/.build-home/AppData/Roaming/bluerouter/db/data.sqlite-wal +0 -0
- package/app/package.json +1 -1
- package/package.json +1 -1
- package/app/.next-cli-build/static/bnvY5yHUWbTyTB23sa7Ba/_buildManifest.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/analytics/page-c63cf50756d71ffe.js +0 -1
- package/app/.next-cli-build/static/chunks/app/_global-error/page-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/ldap/test/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/ldap/users/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/login/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/status/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/branding/[asset]/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/branding/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/branding/upload/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/autostart/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/prompt-log-db/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/root-ca/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/qwen-settings/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cluster/config/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cluster/heartbeat/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cluster/peers/[id]/command/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cluster/peers/[id]/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cluster/peers/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cluster/snapshot/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cluster/sync/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cluster/test/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/combos/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/dashboard/analytics/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/dashboard/combos/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/dashboard/endpoint/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/dashboard/prompt-logs/[id]/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/dashboard/prompt-logs/options/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/dashboard/prompt-logs/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/dashboard/token-saver/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/health/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/init/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/keys/[id]/caveman-test/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/keys/[id]/rotate/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/keys/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/locale/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/alias/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/availability/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/custom/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/test/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/[id]/api-key-models/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/[id]/import-models/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/[id]/models/[...routeModel]/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/[id]/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/[id]/usage/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/client/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/monitor/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/permissions/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/routing/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pricing/recalculate/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pricing/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-health/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/client/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/resource-monitor/[id]/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/resource-monitor/ai-models/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/resource-monitor/analyze/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/resource-monitor/history/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/resource-monitor/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/database/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/shutdown/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tags/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/load/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/save/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/send/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-login/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-start-daemon/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/history/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/search/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/restart/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/update/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/app/page-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-4e0a15ae7b98e3a3.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-4e0a15ae7b98e3a3.js +0 -1
- /package/app/.next-cli-build/static/{bnvY5yHUWbTyTB23sa7Ba → BIH1g3Yd5VQncWi8LdEE6}/_ssgManifest.js +0 -0
- /package/app/cli/.build-home/AppData/Roaming/bluerouter/db/backups/{upgrade-5.1.57-to-5.1.58-5.1.58-20260722-113541 → upgrade-5.1.61-to-5.1.62-5.1.62-20260722-130430}/data.sqlite +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8978],{14051:(e,t,s)=>{e.exports=s(34701)()},34701:(e,t,s)=>{"use strict";var n=s(82114);function r(){}function l(){}l.resetWarningCache=r,e.exports=function(){function e(e,t,s,r,l,a){if(a!==n){var i=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var s={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:l,resetWarningCache:r};return s.PropTypes=s,s}},39944:(e,t,s)=>{Promise.resolve().then(s.bind(s,70959))},70959:(e,t,s)=>{"use strict";s.d(t,{default:()=>en});var n=s(95155),r=s(12115),l=s(94027);let a=[{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"}],i=[{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"}],o="blueRouterAnalyticsTab",d={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 c({status:e}){let t=d[e]||d.unknown;return(0,n.jsxs)("span",{className:N("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 x(){let[e,t]=(0,r.useState)([]),[s,l]=(0,r.useState)(""),[a,i]=(0,r.useState)(null),[o,d]=(0,r.useState)(!1),[x,m]=(0,r.useState)(!1),[u,h]=(0,r.useState)(""),[p,b]=(0,r.useState)(!1);(0,r.useEffect)(()=>{(async()=>{let e="";try{let t=await fetch("/api/dashboard/analytics/analyze",{cache:"no-store"}),s=await t.json().catch(()=>({}));t.ok&&(i(s.analysis||null),d(!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),l(t=>{let s=t||e;return s&&n.some(e=>e.value===s)?s:n[0]?.value||""})}catch{t([])}finally{b(!0)}})()},[]);let g=(0,r.useCallback)(e=>{l(e),fetch("/api/dashboard/analytics/analyze",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:e})}).catch(()=>{})},[]),j=(0,r.useCallback)(async()=>{if(!s)return;let e=s.indexOf("::"),t=s.slice(0,e),n=s.slice(e+2);m(!0),h("");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");i(s.analysis)}catch(e){h(e?.message||"Kh\xf4ng thể ph\xe2n t\xedch")}finally{m(!1)}},[s]);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:[o?(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=>g(e.target.value),disabled:!e.length||o,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:j,disabled:!s||o||x,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:x?"progress_activity":"auto_awesome"}),x?"Đang ph\xe2n t\xedch...":"Ph\xe2n t\xedch lại"]})]}),u?(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:u}):null,a?(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:a.modelLabel})]}),(0,n.jsxs)("span",{children:["Cập nhật l\xfac ",a.generatedAt?new Date(a.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)(c,{status:a.status}),(0,n.jsx)("span",{className:"text-xs text-text-muted",children:"vLLM local:"}),(0,n.jsx)(c,{status:a.vllmStatus}),"number"==typeof a.vllmServerCount?(0,n.jsxs)("span",{className:"text-xs text-text-subtle",children:["(",a.vllmServerCount," node)"]}):null]}),(0,n.jsx)("div",{className:"whitespace-pre-wrap rounded-2xl border border-border bg-surface-2/40 p-5 text-sm leading-6 text-text-main",children:a.summary})]}):!x&&p?(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 m(e,t=0){return Number(e||0).toLocaleString("vi-VN",{maximumFractionDigits:t})}function u(e){let t=Number(e||0);return Intl.NumberFormat("vi-VN",{notation:"compact",maximumFractionDigits:1}).format(t)}function h(e){let t=100*Number(e||0);return`${t.toLocaleString("vi-VN",{maximumFractionDigits:1})}%`}function p(e){let t=Number(e||0);return t?`$${t.toLocaleString("vi-VN",{minimumFractionDigits:4,maximumFractionDigits:6})}`:"$0"}function b(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 g(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 j(e){return null==e||Number.isNaN(Number(e))?"-":`${Number(e).toLocaleString("vi-VN",{maximumFractionDigits:0})}/100`}function y(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 v(e){if(!e)return"-";try{let t=y(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 k(e){if(!e)return"";try{let t=y(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 f(){let{isAdmin:e,isMonitorAdmin:t,isAiGatewaysMonitor:s}=(0,l.s)();return e||t||s}function N(...e){return e.filter(Boolean).join(" ")}function T(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone||"UTC"}catch{return"UTC"}}function w(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 q({children:e,className:t=""}){return(0,n.jsx)("div",{className:N("min-w-0 rounded-2xl border border-border bg-surface p-5 shadow-sm",t),children:e})}function S({icon:e,label:t,value:s,hint:r,help:l,tone:a="blue"}){return(0,n.jsx)(q,{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}),r?(0,n.jsx)("div",{className:"mt-2 text-xs text-text-muted",children:r}):null,l?(0,n.jsx)("div",{className:"mt-1 text-[11px] leading-4 text-text-muted/70",children:l}):null]}),(0,n.jsx)("div",{className:N("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 P({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 I({value:e,onChange:t,placeholder:s="",type:r="text"}){return(0,n.jsx)("input",{value:e||"",type:r,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 M(){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 L({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 C({data:e=[],valueKey:t="totalTokens",secondaryKey:s="requests",height:r=220}){let l=e||[],a=Math.max(...l.map(e=>Number(e[t]||0)),1),i=Math.max(...l.map(e=>Number(e[s]||0)),1);return 0===l.length?(0,n.jsx)(L,{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:r},children:l.map((e,l)=>{let o=Math.max(2,Number(e[t]||0)/a*(r-42)),d=Math.max(2,Number(e[s]||0)/i*(r-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:k(e.label)}),(0,n.jsxs)("div",{className:"mt-1 text-text-muted",children:["Request: ",m(e.requests)]}),(0,n.jsxs)("div",{className:"text-text-muted",children:["Input token: ",m(e.promptTokens)]}),(0,n.jsxs)("div",{className:"text-text-muted",children:["Output token: ",m(e.completionTokens)]}),(0,n.jsxs)("div",{className:"text-text-muted",children:["Tổng token: ",m(e.totalTokens)]}),(0,n.jsxs)("div",{className:"text-text-muted",children:["Lỗi: ",m(e.errors)]})]})]})},`${e.label}-${l}`)})}),(0,n.jsxs)("div",{className:"mt-3 flex justify-between gap-2 text-[11px] text-text-muted",children:[(0,n.jsx)("span",{children:k(l[0]?.label)}),(0,n.jsx)("span",{children:k(l[Math.floor(l.length/2)]?.label)}),(0,n.jsx)("span",{children:k(l[l.length-1]?.label)})]})]})})}function A(){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 $({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:N("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:N("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)(L,{title:s})}function K({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 ",m(e.count??e.requests??e.totalTokens??0)]},e.key))}):(0,n.jsx)("span",{className:"text-text-muted",children:"-"})}function O({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:[u(e.totalTokens)," token"]}),(0,n.jsxs)("div",{className:"text-text-muted",children:["In ",u(e.promptTokens)," / Out ",u(e.completionTokens)]})]})}function F({leaderboard:e={}}){let t=f(),s=e.rows||[],r=e.status||"warming",l="ready"===r?`${e.periodLabel||"H\xf4m nay"} \xb7 cập nhật ${v(e.generatedAt)} \xb7 refresh nền mỗi ${Math.round((e.refreshEveryMs||9e5)/6e4)} ph\xfat`:"error"===r?"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)(q,{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:l})]}),(0,n.jsx)($,{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:N("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:[h(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=>m(e.requests)},{key:"tokens",label:"Token",render:e=>(0,n.jsx)(O,{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 ",m(e.apiKeyCount)," \xb7 IP ",m(e.sourceIpCount)]}),(0,n.jsxs)("div",{children:["Model ",m(e.modelCount)," \xb7 Provider ",m(e.providerCount)]})]})},{key:"lastSeen",label:"Last seen",render:e=>v(e.lastSeen)}]})]})}function E({value:e}){let t=Number(e||0);return(0,n.jsx)("span",{className:N("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:h(t)})}function _({level:e,label:t}){let s=String(e||"none");return(0,n.jsx)("span",{className:N("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 U({level:e,label:t}){let s=String(e||"normal");return(0,n.jsx)("span",{className:N("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:N("rounded-full px-2 py-1 text-xs font-semibold",s.cls),children:s.label})}function H({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 D({icon:e,label:t,value:s,hint:r,tone:l="slate"}){return(0,n.jsx)("div",{className:N("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"}[l]||"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:m(s)}),r?(0,n.jsx)("div",{className:"mt-1 text-xs opacity-80",children:r}):null]}),(0,n.jsx)("span",{className:"material-symbols-outlined text-[24px] opacity-80",children:e})]})})}function B({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:N("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 G({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 z(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:r,onExportCsv:l,loading:i,showProviderFilters:o=!0}){let d=(e,s)=>{let n=null;t(t=>{if("period"===e&&"custom"===s){let e,r;return n={...t,period:s,...((r=new Date(e=new Date)).setHours(8,0,0,0),{dateFrom:z(r),dateTo:z(e)})}}return{...t,[e]:s}}),n&&r?.(n)};return(0,n.jsxs)(q,{children:[(0,n.jsxs)("div",{className:"grid gap-3 md:grid-cols-2 xl:grid-cols-6",children:[(0,n.jsx)(P,{label:"Khoảng thời gian",children:(0,n.jsx)(R,{value:e.period,onChange:e=>d("period",e),children:a.map(e=>(0,n.jsx)("option",{value:e.value,children:e.label},e.value))})}),(0,n.jsx)(P,{label:"Từ ng\xe0y",children:(0,n.jsx)(I,{type:"datetime-local",value:e.dateFrom,onChange:e=>d("dateFrom",e)})}),(0,n.jsx)(P,{label:"Đến ng\xe0y",children:(0,n.jsx)(I,{type:"datetime-local",value:e.dateTo,onChange:e=>d("dateTo",e)})}),o?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(P,{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)(P,{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)(P,{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)(P,{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)(P,{label:"Source IP",children:(0,n.jsx)(I,{value:e.clientIp,onChange:e=>d("clientIp",e),placeholder:"172.16.253.1"})}),(0,n.jsx)(P,{label:"Source tool",children:(0,n.jsx)(I,{value:e.sourceTool,onChange:e=>d("sourceTool",e),placeholder:"copilot, antigravity..."})}),(0,n.jsx)(P,{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)(P,{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)(P,{label:"Session / keyword",children:(0,n.jsx)(I,{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:l,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:()=>r?.(),disabled:i,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"}),i?"Đang tải...":"Refresh"]})]})]})]})}function X({data:e}){let t=f(),s=e.overview||{},r=e.latency||{},l=e.experience||{};return(0,n.jsxs)("div",{className:"space-y-5",children:[(0,n.jsx)(F,{leaderboard:e.tokenLeaderboard}),(0,n.jsxs)("div",{className:"grid gap-4 md:grid-cols-2 xl:grid-cols-4",children:[(0,n.jsx)(S,{icon:"call_made",label:"Tổng request",value:m(s.requests),hint:`${m(s.requestsPerMinute,2)} request/ph\xfat`,help:"Số request khớp bộ lọc hiện tại."}),(0,n.jsx)(S,{icon:"check_circle",label:"Th\xe0nh c\xf4ng",value:m(s.success),hint:`Tỷ lệ lỗi ${h(s.errorRate)}`,help:"Request trả về th\xe0nh c\xf4ng v\xe0 c\xf3 trạng th\xe1i OK.",tone:"green"}),(0,n.jsx)(S,{icon:"dns",label:"Lỗi server/provider",value:m(s.serverErrorEvents),hint:`Server-impacting ${h(s.serverErrorRate)} \xb7 client ${m(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)(S,{icon:"speed",label:"Trải nghiệm",value:j(l.score),hint:`${l.label||"-"} \xb7 ${m(l.samples)} mẫu`,help:"Điểm tổng hợp từ latency, TTFT, lỗi v\xe0 tốc độ phản hồi.",tone:l.tone||"purple"}),(0,n.jsx)(S,{icon:"timer",label:"Latency P95",value:b(l.p95LatencyMs||r.p95Ms),hint:`AVG ${b(l.avgLatencyMs||r.avgMs)} \xb7 P50 ${b(l.p50LatencyMs||r.p50Ms)}`,help:"95% request ho\xe0n tất nhanh hơn gi\xe1 trị n\xe0y.",tone:"purple"}),(0,n.jsx)(S,{icon:"bolt",label:"TTFT P95",value:b(l.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:l.slowTtftRate>=.2?"amber":"blue"}),(0,n.jsx)(S,{icon:"input",label:"Input P95",value:u(l.p95PromptTokens||0),hint:`Avg ${u(l.avgPromptTokens||s.avgPromptTokens)} \xb7 >=30k ${h(l.longInputRate)}`,help:"95% request c\xf3 k\xedch thước input nhỏ hơn gi\xe1 trị n\xe0y."}),(0,n.jsx)(S,{icon:"psychology_alt",label:"Auto-off thinking",value:h(e.thinkingAnalytics?.autoOffRate),hint:`${m(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)(S,{icon:"data_object",label:"Large context >=50k",value:h(e.largeContextAnalytics?.gte50kRate),hint:`>=100k ${h(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)(S,{icon:"person_alert",label:"Top user nặng",value:s.topHeavyUser||"-",hint:`Chiếm ${h(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)(S,{icon:"running_with_errors",label:"Request chậm",value:h(l.slowRequestRate),hint:`>= ${b(l.thresholds?.slowLatencyMs||45e3)} \xb7 max ${b(l.maxLatencyMs)}`,help:"Tỷ lệ request vượt ngưỡng chậm đ\xe3 cấu h\xecnh.",tone:l.slowRequestRate>=.2?"amber":"green"}),(0,n.jsx)(S,{icon:"output",label:"Output tokens",value:u(s.completionTokens),hint:`Avg ${m(s.avgCompletionTokens,1)} / request`,help:"Tổng token model sinh ra."}),(0,n.jsx)(S,{icon:"token",label:"Tổng tokens",value:u(s.totalTokens),hint:`${u(s.tokensPerMinute)} token/ph\xfat`,help:"Tổng input + output token.",tone:"amber"}),(0,n.jsx)(S,{icon:"speed",label:"Output speed",value:g(l.decodeTokensPerSecond," tok/s"),hint:`Latency/10k input ${b(l.latencyMsPer10kInputTokens)}`,help:"Tốc độ sinh token trung b\xecnh sau khi model bắt đầu trả lời.",tone:"slate"}),(0,n.jsx)(S,{icon:"payments",label:"Cost ước t\xednh",value:p(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)(q,{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)(A,{})]}),(0,n.jsx)(C,{data:e.timeSeries||[]})]}),(0,n.jsxs)(q,{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",b(l.avgLatencyMs||r.avgMs)],["Latency P50",b(l.p50LatencyMs||r.p50Ms)],["Latency P99",b(l.p99LatencyMs||r.p99Ms)],["TTFT P95",b(l.p95TtftMs)],["Input P95",u(l.p95PromptTokens||0)],["Long input >=30k",h(l.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?m(t):t})]},e))})]})]}),(0,n.jsxs)("div",{className:"grid gap-5 xl:grid-cols-2",children:[(0,n.jsxs)(q,{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)($,{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=>m(e.requests)},{key:"tokens",label:"Token",render:e=>(0,n.jsx)(O,{row:e})},{key:"input",label:"P95/Max input",render:e=>(0,n.jsxs)("div",{className:"text-xs",children:[(0,n.jsx)("div",{children:u(e.p95PromptTokens||0)}),(0,n.jsxs)("div",{className:"text-text-muted",children:["max ",u(e.maxPromptTokens||0)]})]})}]})]}),(0,n.jsxs)(q,{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)($,{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=>m(e.requests)},{key:"tokens",label:"Token",render:e=>(0,n.jsx)(O,{row:e})},{key:"heavy",label:"Nặng",render:e=>(0,n.jsxs)("span",{className:"text-xs text-text-muted",children:[m(e.heavyRequests||0)," req"]})}],empty:"Kh\xf4ng c\xf3 Source IP c\xf3 token trong khoảng lọc."})]})]})]})}function J({data:e}){let t=f(),s=e.clientRequests||{},r=s.summary||{},l=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 ",m(e.heavyRequests)," \xb7 ",h(e.heavyRequestRate)]}),(0,n.jsxs)("div",{className:"text-text-muted",children:["P95 input ",u(e.p95PromptTokens)," \xb7 Max ",u(e.maxPromptTokens)]}),(0,n.jsxs)("div",{className:"text-text-muted",children:[">=70k ",m(e.extremeInputRequests)," \xb7 ",h(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)(S,{icon:"person_alert",label:"Top user nặng nhất",value:r.topUserLabel||"-",hint:`${u(r.topUserTokens)} token \xb7 ${h(r.topUserTokenShare)} tổng token`,tone:r.topUserTokenShare>=.35?"amber":"slate"}),(0,n.jsx)(S,{icon:"vpn_key",label:"Top API key nhiều token",value:r.topApiKeyLabel||"-",hint:`${u(r.topApiKeyTokens)} token \xb7 ${h(r.topApiKeyTokenShare)} tổng token`,tone:r.topApiKeyTokenShare>=.35?"amber":"blue"}),(0,n.jsx)(S,{icon:"lan",label:"Top IP nhiều token",value:r.topSourceIpLabel||"-",hint:`${u(r.topSourceIpTokens)} token \xb7 ${h(r.topSourceIpTokenShare)} tổng token`,tone:r.topSourceIpTokenShare>=.35?"amber":"purple"}),(0,n.jsx)(S,{icon:"input",label:"Input d\xe0i >=30k",value:h(r.longInputBucketShare||0),hint:`>=70k ${h(r.extremeInputShare||0)}`,tone:(r.extremeInputShare||0)>=.1?"amber":"green"}),(0,n.jsx)(S,{icon:"groups",label:"User/API key được theo d\xf5i",value:m(r.trackedUsers||0),hint:"Theo owner/API key fingerprint/source IP",tone:"blue"}),(0,n.jsx)(S,{icon:"network_check",label:"Top IP request nặng",value:r.topSourceIpHeavyLabel||"-",hint:`${m(r.topSourceIpHeavyRequests||0)} request >=30k input/total`,tone:r.topSourceIpHeavyRequests?"amber":"slate"}),(0,n.jsx)(S,{icon:"report",label:"Client lỗi nhiều",value:m(r.problemClients||0),hint:"Nh\xf3m user/API key c\xf3 error rows",tone:r.problemClients?"amber":"green"})]}),(0,n.jsxs)(q,{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)($,{rows:l,columns:[{key:"user",label:"User/API key",render:c},{key:"quality",label:"\xc1p lực",render:e=>(0,n.jsx)(U,{level:e.level,label:e.pressureLabel})},{key:"requests",label:"Req",render:e=>m(e.requests)},{key:"tokens",label:"Token",render:e=>(0,n.jsx)(O,{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 ",u(e.avgPromptTokens)," \xb7 P95 ",u(e.p95PromptTokens)]}),(0,n.jsxs)("div",{className:"text-text-muted",children:["Max ",u(e.maxPromptTokens)," \xb7 >=30k ",h(e.longInputRate)]}),(0,n.jsxs)("div",{className:"text-text-muted",children:[">=50k ",h(e.hugeInputRate)," \xb7 >=70k ",h(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 ",b(e.p95LatencyMs)," \xb7 Max ",b(e.maxLatencyMs)]}),(0,n.jsxs)("div",{className:"text-text-muted",children:["TTFT P95 ",b(e.p95TtftMs)," \xb7 Slow ",h(e.slowRequestRate)]})]})},{key:"topModels",label:"Top model",render:e=>(0,n.jsx)(K,{items:e.topModels})},{key:"topIps",label:"IP / Tool",render:e=>(0,n.jsxs)("div",{className:"space-y-1",children:[(0,n.jsx)(K,{items:e.topIps}),(0,n.jsx)(K,{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 ",m(e.apiKeyCount)," \xb7 IP ",m(e.sourceIpCount)," \xb7 Tool ",m(e.sourceToolCount)]}),(0,n.jsxs)("div",{children:["Session ",m(e.sessionCount)," \xb7 Last ",v(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)(q,{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)($,{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=>m(e.requests)},{key:"tokens",label:"Token",render:e=>(0,n.jsx)(O,{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 ",m(e.sourceIpCount)," \xb7 Tool ",m(e.sourceToolCount)]}),(0,n.jsxs)("div",{children:["Model ",m(e.modelCount)," \xb7 Provider ",m(e.providerCount)]})]})},{key:"lastSeen",label:"Last seen",render:e=>v(e.lastSeen)}],empty:"Kh\xf4ng c\xf3 API key c\xf3 token trong khoảng lọc."})]}),(0,n.jsxs)(q,{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)($,{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 ",m(e.sourceToolCount)," \xb7 API key ",m(e.apiKeyCount)]}),(0,n.jsxs)("div",{className:"text-xs text-text-muted",children:["Model ",m(e.modelCount)," \xb7 Provider ",m(e.providerCount)]})]})},{key:"requests",label:"Req",render:e=>m(e.requests)},{key:"tokens",label:"Token",render:e=>(0,n.jsx)(O,{row:e})},{key:"input",label:"Input nặng",render:x},{key:"lastSeen",label:"Last seen",render:e=>v(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)(q,{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)($,{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=>m(e.requests)},{key:"share",label:"Tỷ trọng",render:e=>h(e.share)},{key:"tokens",label:"Token",render:e=>(0,n.jsx)(O,{row:e})},{key:"latency",label:"Latency P95/MAX",render:e=>(0,n.jsxs)("div",{className:"text-xs",children:[(0,n.jsxs)("div",{children:[b(e.p95LatencyMs)," / ",b(e.maxLatencyMs)]}),(0,n.jsxs)("div",{className:"text-text-muted",children:["TTFT P95 ",b(e.p95TtftMs)]})]})}],empty:"Kh\xf4ng c\xf3 dữ liệu bucket input."})]}),(0,n.jsxs)(q,{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)($,{rows:a,columns:[{key:"user",label:"Client",render:c},{key:"requests",label:"Req",render:e=>m(e.requests)},{key:"errors",label:"Lỗi",render:e=>m(e.errors)},{key:"errorRate",label:"Error %",render:e=>(0,n.jsx)(E,{value:e.errorRate})},{key:"tokens",label:"Token",render:e=>(0,n.jsx)(O,{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=>v(e.lastSeen)}],empty:"Kh\xf4ng c\xf3 client lỗi theo bộ lọc hiện tại."})]})]}),(0,n.jsxs)(q,{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 Z({data:e}){let t=f();return(0,n.jsxs)(q,{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)($,{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=>m(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 ",m(e.success)]}),(0,n.jsxs)("div",{className:"text-red-600",children:["Lỗi ",m(e.errors)]})]})},{key:"tokens",label:"In/Out token",render:e=>(0,n.jsx)(O,{row:e})},{key:"cost",label:"Cost",render:e=>p(e.cost)},{key:"errorRate",label:"Error %",render:e=>(0,n.jsx)(E,{value:e.errorRate})},{key:"topModels",label:"Top model",render:e=>(0,n.jsx)(K,{items:e.topModels})},{key:"topProviders",label:"Top provider",render:e=>(0,n.jsx)(K,{items:e.topProviders})},{key:"lastSeen",label:"Last seen",render:e=>v(e.lastSeen)}]})]})}function Y({data:e}){let t=e.clientRequests?.topSourceIpsByTokens||[],s=e.clientRequests?.topSourceIpsByHeavyRequests||[],r=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 ",m(e.apiKeyCount)," \xb7 Tool ",m(e.sourceToolCount)]}),(0,n.jsxs)("div",{className:"text-xs text-text-muted",children:["Model ",m(e.modelCount)," \xb7 Provider ",m(e.providerCount)]})]});return(0,n.jsxs)("div",{className:"grid gap-5 xl:grid-cols-2",children:[(0,n.jsxs)(q,{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)($,{rows:t,columns:[{key:"ip",label:"Source IP",render:r},{key:"requests",label:"Req",render:e=>m(e.requests)},{key:"tokens",label:"Token",render:e=>(0,n.jsx)(O,{row:e})},{key:"lastSeen",label:"Last seen",render:e=>v(e.lastSeen)}],empty:"Kh\xf4ng c\xf3 Source IP c\xf3 token trong khoảng lọc."})]}),(0,n.jsxs)(q,{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)($,{rows:s,columns:[{key:"ip",label:"Source IP",render:r},{key:"requests",label:"Req",render:e=>m(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 ",m(e.heavyRequests)," \xb7 ",h(e.heavyRequestRate)]}),(0,n.jsxs)("div",{className:"text-text-muted",children:["P95 input ",u(e.p95PromptTokens)," \xb7 Max ",u(e.maxPromptTokens)]}),(0,n.jsxs)("div",{className:"text-text-muted",children:[">=70k ",m(e.extremeInputRequests)," \xb7 ",h(e.extremeInputRate)]})]})},{key:"tokens",label:"Token",render:e=>(0,n.jsx)(O,{row:e})},{key:"lastSeen",label:"Last seen",render:e=>v(e.lastSeen)}],empty:"Kh\xf4ng c\xf3 Source IP gửi request nặng trong khoảng lọc."})]}),(0,n.jsxs)(q,{children:[(0,n.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Source IP từ Prompt Logs"}),(0,n.jsx)($,{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=>m(e.requests)},{key:"errors",label:"Lỗi",render:e=>m(e.errors)},{key:"errorRate",label:"Error %",render:e=>(0,n.jsx)(E,{value:e.errorRate})},{key:"topTools",label:"Tools",render:e=>(0,n.jsx)(K,{items:e.topTools})},{key:"topModels",label:"Models",render:e=>(0,n.jsx)(K,{items:e.topModels})},{key:"lastSeen",label:"Last seen",render:e=>v(e.lastSeen)}]})]}),(0,n.jsxs)(q,{children:[(0,n.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Source tool"}),(0,n.jsx)($,{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=>m(e.requests)},{key:"errors",label:"Lỗi",render:e=>m(e.errors)},{key:"errorRate",label:"Error %",render:e=>(0,n.jsx)(E,{value:e.errorRate})},{key:"topIps",label:"Top IP",render:e=>(0,n.jsx)(K,{items:e.topIps})},{key:"topModels",label:"Top model",render:e=>(0,n.jsx)(K,{items:e.topModels})},{key:"lastSeen",label:"Last seen",render:e=>v(e.lastSeen)}]})]}),(0,n.jsxs)(q,{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)($,{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=>m(e.requests)},{key:"errors",label:"Lỗi",render:e=>m(e.errors)},{key:"topIps",label:"IP",render:e=>(0,n.jsx)(K,{items:e.topIps})},{key:"topTools",label:"Tool",render:e=>(0,n.jsx)(K,{items:e.topTools})},{key:"topModels",label:"Model",render:e=>(0,n.jsx)(K,{items:e.topModels})},{key:"lastSeen",label:"Last seen",render:e=>v(e.lastSeen)}]})]})]})}function Q({data:e}){return(0,n.jsxs)("div",{className:"space-y-5",children:[(0,n.jsxs)(q,{children:[(0,n.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Provider"}),(0,n.jsx)($,{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=>m(e.requests)},{key:"tokens",label:"Token",render:e=>(0,n.jsx)(O,{row:e})},{key:"cost",label:"Cost",render:e=>p(e.cost)},{key:"errorRate",label:"Error %",render:e=>(0,n.jsx)(E,{value:e.errorRate})},{key:"topModels",label:"Top model",render:e=>(0,n.jsx)(K,{items:e.topModels})},{key:"lastSeen",label:"Last seen",render:e=>v(e.lastSeen)}]})]}),(0,n.jsxs)("div",{className:"grid gap-5 xl:grid-cols-2",children:[(0,n.jsxs)(q,{children:[(0,n.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Model"}),(0,n.jsx)($,{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=>m(e.requests)},{key:"tokens",label:"Token",render:e=>(0,n.jsx)(O,{row:e})},{key:"errorRate",label:"Lỗi",render:e=>(0,n.jsx)(E,{value:e.errorRate})}]})]}),(0,n.jsxs)(q,{children:[(0,n.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Provider account / connection"}),(0,n.jsx)($,{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=>m(e.requests)},{key:"tokens",label:"Token",render:e=>(0,n.jsx)(O,{row:e})},{key:"errorRate",label:"Lỗi",render:e=>(0,n.jsx)(E,{value:e.errorRate})}]})]})]}),(0,n.jsxs)(q,{children:[(0,n.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Endpoint"}),(0,n.jsx)($,{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=>m(e.requests)},{key:"tokens",label:"Token",render:e=>(0,n.jsx)(O,{row:e})},{key:"cost",label:"Cost",render:e=>p(e.cost)},{key:"errorRate",label:"Error %",render:e=>(0,n.jsx)(E,{value:e.errorRate})},{key:"lastSeen",label:"Last seen",render:e=>v(e.lastSeen)}]})]})]})}function ee({data:e}){let t=f(),s=e.experience||{},r=s.thresholds||{},l=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)(S,{icon:"verified",label:"Đ\xe1nh gi\xe1 tổng",value:j(s.score),hint:`${s.label||"-"} \xb7 ${m(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)(S,{icon:"timer",label:"Latency AVG / P95",value:`${b(s.avgLatencyMs)} / ${b(s.p95LatencyMs)}`,hint:`P50 ${b(s.p50LatencyMs)} \xb7 P99 ${b(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)(S,{icon:"bolt",label:"TTFT AVG / P95",value:`${b(s.avgTtftMs)} / ${b(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)(S,{icon:"keyboard_double_arrow_up",label:"Input AVG / P95",value:`${u(s.avgPromptTokens)} / ${u(s.p95PromptTokens)}`,hint:`>=30k ${h(s.longInputRate)} \xb7 >=50k ${h(s.hugeInputRate)}`,help:"Input c\xe0ng lớn th\xec prompt eval v\xe0 TTFT thường c\xe0ng cao."}),(0,n.jsx)(S,{icon:"running_with_errors",label:"Slow request",value:h(s.slowRequestRate),hint:`Latency >= ${b(r.slowLatencyMs||45e3)} \xb7 rất chậm ${h(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)(S,{icon:"pending_actions",label:"Slow TTFT",value:h(s.slowTtftRate),hint:`TTFT >= ${b(r.slowTtftMs||2e4)}`,help:"Tỷ lệ request chờ token đầu ti\xean qu\xe1 l\xe2u.",tone:s.slowTtftRate>=.2?"amber":"green"}),(0,n.jsx)(S,{icon:"speed",label:"Output tốc độ",value:g(s.decodeTokensPerSecond," tok/s"),hint:`Output/latency ${g(s.outputTokensPerSecond," tok/s")}`,tone:"slate"}),(0,n.jsx)(S,{icon:"data_usage",label:"Latency / 10k input",value:b(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)(S,{icon:"psychology_alt",label:"Thinking auto-off",value:h(l.autoOffRate),hint:`${m(l.autoOffRequests||0)} / ${m(l.totalRequests||0)} request`,help:"Request bị tắt thinking tự động do vượt ngưỡng prompt chars.",tone:(l.autoOffRate||0)>=.3?"amber":"green"}),(0,n.jsx)(S,{icon:"toggle_off",label:"Thinking OFF",value:h(l.thinkingOffRate),hint:`ON ${h(l.thinkingOnRate)} \xb7 unknown ${h(l.unknownRate)}`,help:"Tỷ lệ request cuối c\xf9ng chạy ở chế độ kh\xf4ng thinking.",tone:(l.thinkingOffRate||0)>=.5?"blue":"slate"}),(0,n.jsx)(S,{icon:"data_object",label:"Large context",value:h(a.gte50kRate),hint:`>=30k ${h(a.gte30kRate)} \xb7 >=100k ${h(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)(q,{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",m(l.thinkingOnRequests||0),h(l.thinkingOnRate)],["Thinking OFF",m(l.thinkingOffRequests||0),h(l.thinkingOffRate)],["Auto-off hit",m(l.autoOffRequests||0),h(l.autoOffRate)],["C\xf3 ngưỡng auto-off",m(l.thresholdConfiguredRequests||0),`hit ${h(l.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)($,{rows:l.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=>m(e.requests)},{key:"autoOff",label:"Auto-off",render:e=>(0,n.jsxs)("div",{className:"text-xs",children:[(0,n.jsx)("div",{children:m(e.autoOffRequests)}),(0,n.jsx)("div",{className:"text-text-muted",children:h(e.autoOffRate)})]})},{key:"thinking",label:"ON/OFF",render:e=>(0,n.jsxs)("div",{className:"text-xs",children:[(0,n.jsxs)("div",{children:["ON ",m(e.thinkingOnRequests)]}),(0,n.jsxs)("div",{className:"text-text-muted",children:["OFF ",m(e.thinkingOffRequests)]})]})},{key:"chars",label:"Chars avg/max",render:e=>(0,n.jsxs)("div",{className:"text-xs",children:[(0,n.jsx)("div",{children:u(e.avgPromptChars)}),(0,n.jsxs)("div",{className:"text-text-muted",children:["max ",u(e.maxPromptChars)]})]})}]})})]}),(0,n.jsxs)(q,{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:m(t||0)}),(0,n.jsx)("div",{className:"mt-1 text-xs text-text-muted",children:h(s)})]},e))}),(0,n.jsx)("div",{className:"mt-4",children:(0,n.jsx)($,{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:m(e.requests)}),(0,n.jsx)("div",{className:"text-text-muted",children:h(e.share)})]})},{key:"chars",label:"Size avg/max",render:e=>(0,n.jsxs)("div",{className:"text-xs",children:[(0,n.jsx)("div",{children:u(e.avgRequestSize)}),(0,n.jsxs)("div",{className:"text-text-muted",children:["max ",u(e.maxRequestSize)]})]})},{key:"latency",label:"Latency/TTFT",render:e=>(0,n.jsxs)("div",{className:"text-xs",children:[(0,n.jsx)("div",{children:b(e.avgLatencyMs)}),(0,n.jsxs)("div",{className:"text-text-muted",children:["TTFT ",b(e.avgTtftMs)]})]})},{key:"autoOff",label:"Auto-off",render:e=>(0,n.jsxs)("div",{className:"text-xs",children:[(0,n.jsx)("div",{children:m(e.autoOffRequests)}),(0,n.jsx)("div",{className:"text-text-muted",children:h(e.autoOffRate)})]})}]})})]})]}),(0,n.jsxs)(q,{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)(q,{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)($,{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)(_,{level:e.level,label:e.labelQuality}),(0,n.jsx)("div",{className:"text-xs text-text-muted",children:j(e.score)})]})},{key:"samples",label:"Mẫu",render:e=>m(e.samples)},{key:"latency",label:"Latency P50/P95/MAX",render:e=>(0,n.jsxs)("div",{className:"text-xs",children:[(0,n.jsxs)("div",{children:[b(e.p50LatencyMs)," / ",b(e.p95LatencyMs)]}),(0,n.jsxs)("div",{className:"text-text-muted",children:["max ",b(e.maxLatencyMs)]})]})},{key:"ttft",label:"TTFT P95",render:e=>b(e.p95TtftMs)},{key:"input",label:"Input avg/P95",render:e=>(0,n.jsxs)("div",{className:"text-xs",children:[(0,n.jsxs)("div",{children:[u(e.avgPromptTokens)," / ",u(e.p95PromptTokens)]}),(0,n.jsxs)("div",{className:"text-text-muted",children:[">=30k ",h(e.longInputRate)]})]})},{key:"slow",label:"Chậm",render:e=>(0,n.jsx)(E,{value:e.slowRequestRate})},{key:"speed",label:"Output tok/s",render:e=>g(e.outputTokensPerSecond," tok/s")}]})]}),(0,n.jsxs)(q,{children:[(0,n.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Request chậm nhất"}),(0,n.jsx)($,{rows:o,empty:"Kh\xf4ng c\xf3 request chậm trong khoảng lọc.",columns:[{key:"timestamp",label:"Time",render:e=>v(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:b(e.latencyMs)}),(0,n.jsxs)("div",{className:"text-text-muted",children:["TTFT ",b(e.ttftMs)]})]})},{key:"tokens",label:"In / Out",render:e=>(0,n.jsx)(O,{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 et({data:e}){let t=f(),s=e.requestErrors||{},r=s.summary||{},l=e.overview||{},a=Number(l.serverErrorRate||0),i=Number(l.clientErrorRate||0),o=Number(l.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=>m(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)(H,{row:e})},{key:"lastSeen",label:"Last seen",render:e=>v(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)(D,{icon:"dns",label:"Server/provider",value:r.serverImpacting||0,hint:`${h(a)} tr\xean tổng request`,tone:r.serverImpacting?"red":"green"}),(0,n.jsx)(D,{icon:"cloud_off",label:"Upstream",value:r.upstream||0,hint:"Provider/model server, timeout, network, 5xx",tone:r.upstream?"red":"green"}),(0,n.jsx)(D,{icon:"router",label:"Gateway",value:r.gateway||0,hint:"Lỗi nội bộ BlueRouter/gateway",tone:r.gateway?"purple":"green"}),(0,n.jsx)(D,{icon:"integration_instructions",label:"Client/request",value:r.client||0,hint:`${h(i)} do endpoint/model/body/auth`,tone:r.client?"slate":"green"}),(0,n.jsx)(D,{icon:"speed",label:"Rate/quota",value:r.rateLimit||0,hint:`${h(o)} rate-limit/quota`,tone:r.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)(B,{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)(q,{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:[m(r.serverImpacting||0)," lỗi"]})]}),(0,n.jsx)($,{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)(q,{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)($,{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)(q,{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)($,{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=>m(e.requests)},{key:"lastSeen",label:"Last seen",render:e=>v(e.lastSeen)}],empty:"Kh\xf4ng c\xf3 lỗi để ph\xe2n loại."})]})]}),s.topRateLimitErrors?.length?(0,n.jsxs)(q,{children:[(0,n.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Rate limit / quota"}),(0,n.jsx)($,{rows:s.topRateLimitErrors||[],columns:d})]}):null,(0,n.jsxs)(q,{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)($,{rows:[...e.groups?.errors||[]].sort((e,t)=>new Date(y(t.lastSeen)||0)-new Date(y(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=>m(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=>v(e.lastSeen)}]})]}),(0,n.jsxs)(q,{children:[(0,n.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Status distribution"}),(0,n.jsx)($,{rows:e.groups?.statuses||[],columns:[{key:"label",label:"Status"},{key:"requests",label:"Requests",render:e=>m(e.requests)},{key:"tokens",label:"Token",render:e=>(0,n.jsx)(O,{row:e})},{key:"errorRate",label:"Error %",render:e=>(0,n.jsx)(E,{value:e.errorRate})}]})]})]})}function es({data:e}){let t=f();return(0,n.jsxs)("div",{className:"space-y-5",children:[(0,n.jsxs)(q,{children:[(0,n.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Top request nặng token"}),(0,n.jsx)($,{rows:e.heavyRequests||[],columns:[{key:"timestamp",label:"Time",render:e=>v(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)(O,{row:e})},{key:"status",label:"Status"}]})]}),(0,n.jsxs)(q,{children:[(0,n.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Recent usage"}),(0,n.jsx)($,{rows:e.recentUsage||[],columns:[{key:"timestamp",label:"Time",render:e=>v(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)(O,{row:e})},{key:"cost",label:"Cost",render:e=>p(e.cost)},{key:"status",label:"Status"}]})]})]})}function en(){let{isAdmin:e,isMonitorAdmin:t,isAiGatewaysMonitor:s}=(0,l.s)(),[a,d]=(0,r.useState)({period:"today",dateFrom:"",dateTo:"",provider:"",model:"",connectionId:"",status:"",endpoint:"",apiKey:"",clientIp:"",sourceTool:"",sessionId:"",keyword:""}),[c,m]=(0,r.useState)(null),[u,h]=(0,r.useState)(!0),[p,b]=(0,r.useState)(""),[g,j]=(0,r.useState)("overview"),[y,k]=(0,r.useState)(null),f=function(e,t=450){let[s,n]=(0,r.useState)(e);return(0,r.useEffect)(()=>{let s=setTimeout(()=>n(e),t);return()=>clearTimeout(s)},[e,t]),s}(a,450),q=(0,r.useRef)(0),S=(0,r.useCallback)(async({clear:e=!1,filtersOverride:t=null}={})=>{let s=q.current+1;q.current=s,e&&m(null),h(!0),b("");let n=Date.now();try{let e=t||f,r=w(e,{timeZone:T()}),l=await fetch(`/api/dashboard/analytics?${r}`,{cache:"no-store"}),a=await l.json().catch(()=>({}));if(s!==q.current)return;if(!l.ok)throw Error(a.error||"Kh\xf4ng tải được dữ liệu analytics");m(a),k({loadedMs:Date.now()-n,cacheState:a.cacheState||"",cacheAgeMs:a.cacheAgeMs||0})}catch(e){if(s!==q.current)return;b(e.message||"Kh\xf4ng tải được dữ liệu analytics")}finally{s===q.current&&h(!1)}},[f]);(0,r.useEffect)(()=>{S({clear:!0})},[S]),(0,r.useEffect)(()=>{let e=localStorage.getItem(o);e&&j(e)},[]),(0,r.useEffect)(()=>{localStorage.setItem(o,g)},[g]);let P=c?.options||{},R=(0,r.useMemo)(()=>c?.generatedAt?v(c.generatedAt):"-",[c]);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: ",R]}),y?(0,n.jsxs)("div",{className:"mt-0.5 text-xs",children:["Loaded in ",y.loadedMs>=1e3?`${(y.loadedMs/1e3).toLocaleString("vi-VN",{maximumFractionDigits:1})}s`:`${y.loadedMs}ms`,"hit"===y.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",y.cacheAgeMs?` \xb7 ${Math.round(y.cacheAgeMs/1e3)}s`:""]}):"joined"===y.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"===y.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:a,setFilters:d,options:P,onRefresh:e=>S({filtersOverride:e||a}),onExportCsv:()=>{let e=w(a,{format:"csv",timeZone:T()});window.open(`/api/dashboard/analytics?${e}`,"_blank","noopener,noreferrer")},loading:u,showProviderFilters:e||t||s}),p?(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"}),p]}):null,c?.qualityNotes?.length?(0,n.jsx)(G,{notes:c.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:()=>j(e.value),className:N("flex items-center gap-2 rounded-xl px-3 py-2 text-sm font-medium transition",g===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))}),u&&!c?(0,n.jsx)(M,{}):null,!u&&c&&c.overview?.requests===0&&0===(c.promptLogs?.total||0)?(0,n.jsx)(L,{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,c?(0,n.jsxs)(n.Fragment,{children:["overview"===g?(0,n.jsx)(X,{data:c}):null,"apiKeys"===g?(0,n.jsx)(Z,{data:c}):null,"clients"===g?(0,n.jsx)(J,{data:c}):null,"sources"===g?(0,n.jsx)(Y,{data:c}):null,"providers"===g?(0,n.jsx)(Q,{data:c}):null,"experience"===g?(0,n.jsx)(ee,{data:c}):null,"errors"===g?(0,n.jsx)(et,{data:c}):null,"raw"===g?(0,n.jsx)(es,{data:c}):null]}):null,"aiHealth"===g?(0,n.jsx)(x,{}):null]})}},82114:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},94027:(e,t,s)=>{"use strict";s.d(t,{Y:()=>o,s:()=>d});var n=s(95155),r=s(12115),l=s(14051),a=s.n(l);let i=(0,r.createContext)(null);function o({children:e}){let[t,s]=(0,r.useState)(null),[l,a]=(0,r.useState)(!0),[d,c]=(0,r.useState)(""),x=(0,r.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,r.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,r.useMemo)(()=>{let e,s,n,r,l;return s=(e=t&&"object"==typeof t?t:{}).displayName||e.oidcName||e.oidcEmail||e.userId||"",n=!0===e.isAdmin,r=!0===e.isMonitorAdmin,l=!0===e.isAiGatewaysMonitor,{status:e,displayName:s,userId:e.userId||"",loginMethod:e.loginMethod||"",role:e.role||"guest",isAdmin:n,isMonitorAdmin:r,isAiGatewaysMonitor:l,canManageApiKeys:!0===e.canManageApiKeys||n||r,canUseMonitorAdminTabs:!0===e.canUseMonitorAdminTabs||n||r,canViewAllAnalytics:!0===e.canViewAllAnalytics||n||r||l}},[t]),u=(0,r.useMemo)(()=>({...m,loading:l,error:d,reload:x}),[m,l,d,x]);return(0,n.jsx)(i.Provider,{value:u,children:e})}function d(){let e=(0,r.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,[8441,3794,7358],()=>e(e.s=39944)),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1205],{98:(e,t,s)=>{"use strict";s.d(t,{default:()=>l});var r=s(95155),a=s(31474);function l({label:e,options:t=[],value:s,onChange:n,placeholder:i="Select an option",error:d,hint:o,disabled:c=!1,required:x=!1,className:m,selectClassName:u,...h}){return(0,r.jsxs)("div",{className:(0,a.cn)("flex flex-col gap-1.5",m),children:[e&&(0,r.jsxs)("label",{className:"text-sm font-medium text-text-main",children:[e,x&&(0,r.jsx)("span",{className:"text-red-500 ml-1",children:"*"})]}),(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsxs)("select",{value:s,onChange:n,disabled:c,className:(0,a.cn)("w-full py-2.5 px-3 pr-10 text-sm text-text-main","bg-surface-2 border border-transparent rounded-[10px] appearance-none","focus:outline-none focus:ring-2 focus:ring-brand-500/30 focus:border-brand-500/40","transition-all duration-150 disabled:opacity-50 disabled:cursor-not-allowed","text-[16px] sm:text-sm",d&&"ring-1 ring-red-500 focus:ring-2 focus:ring-red-500/40 border-red-500/40",u),...h,children:[(0,r.jsx)("option",{value:"",disabled:!0,children:i}),function(e){let t=new Map,s=[];for(let r of e){if(!r.group){s.push(r);continue}t.has(r.group)||t.set(r.group,[]),t.get(r.group).push(r)}let a=[];for(let[e,s]of t)a.push((0,r.jsx)("optgroup",{label:e,children:s.map(e=>(0,r.jsx)("option",{value:e.value,children:e.label},e.value))},e));for(let e of s)a.push((0,r.jsx)("option",{value:e.value,children:e.label},e.value));return a}(t)]}),(0,r.jsx)("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none text-text-muted",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"expand_more"})})]}),d&&(0,r.jsxs)("p",{className:"text-xs text-red-500 flex items-center gap-1",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"error"}),d]}),o&&!d&&(0,r.jsx)("p",{className:"text-xs text-text-muted",children:o})]})}},11910:(e,t,s)=>{"use strict";s.d(t,{default:()=>l});var r=s(95155),a=s(31474);function l({label:e,type:t="text",placeholder:s,value:n,onChange:i,error:d,hint:o,icon:c,disabled:x=!1,required:m=!1,className:u,inputClassName:h,...p}){return(0,r.jsxs)("div",{className:(0,a.cn)("flex flex-col gap-1.5",u),children:[e&&(0,r.jsxs)("label",{className:"text-sm font-medium text-text-main",children:[e,m&&(0,r.jsx)("span",{className:"text-red-500 ml-1",children:"*"})]}),(0,r.jsxs)("div",{className:"relative",children:[c&&(0,r.jsx)("div",{className:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none text-text-muted",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:c})}),(0,r.jsx)("input",{type:t,placeholder:s,value:n,onChange:i,disabled:x,className:(0,a.cn)("w-full py-2.5 px-3 text-sm text-text-main bg-surface-2 rounded-[10px]","border border-transparent placeholder-text-muted/70","focus:outline-none focus:ring-2 focus:ring-brand-500/30 focus:border-brand-500/40","transition-all duration-150 ease-out disabled:opacity-50 disabled:cursor-not-allowed","text-[16px] sm:text-sm",c&&"pl-10",d&&"ring-1 ring-red-500 focus:ring-2 focus:ring-red-500/40 border-red-500/40",h),...p})]}),d&&(0,r.jsxs)("p",{className:"text-xs text-red-500 flex items-center gap-1",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"error"}),d]}),o&&!d&&(0,r.jsx)("p",{className:"text-xs text-text-muted",children:o})]})}},31474:(e,t,s)=>{"use strict";function r(...e){return e.filter(Boolean).join(" ").replace(/\s+/g," ").trim()}s.d(t,{cn:()=>r})},56061:(e,t,s)=>{"use strict";s.d(t,{default:()=>i});var r=s(95155),a=s(31474);let l={default:"bg-surface-2 text-text-muted",primary:"bg-brand-500/10 text-brand-600 dark:text-brand-300",success:"bg-green-500/10 text-green-600 dark:text-green-400",warning:"bg-yellow-500/10 text-yellow-600 dark:text-yellow-400",error:"bg-red-500/10 text-red-600 dark:text-red-400",info:"bg-blue-500/10 text-blue-600 dark:text-blue-400"},n={sm:"px-2 py-0.5 text-[10px]",md:"px-2.5 py-1 text-xs",lg:"px-3 py-1.5 text-sm"};function i({children:e,variant:t="default",size:s="md",dot:d=!1,icon:o,className:c}){return(0,r.jsxs)("span",{className:(0,a.cn)("inline-flex items-center gap-1.5 rounded-full font-semibold",l[t],n[s],c),children:[d&&(0,r.jsx)("span",{className:(0,a.cn)("size-1.5 rounded-full","success"===t&&"bg-green-500","warning"===t&&"bg-yellow-500","error"===t&&"bg-red-500","info"===t&&"bg-blue-500","primary"===t&&"bg-brand-500","default"===t&&"bg-gray-500")}),o&&(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:o}),e]})}},81127:(e,t,s)=>{"use strict";s.d(t,{ConfirmModal:()=>m,default:()=>x});var r=s(95155),a=s(12115),l=s(31474),n=s(92542),i=s(97677);let d=[],o="";function c(){1===d.length?(o=document.body.style.overflow,document.body.style.overflow="hidden"):0===d.length&&(document.body.style.overflow=o)}function x({isOpen:e,onClose:t,title:s,children:n,footer:o,size:m="md",closeOnOverlay:u=!0,showTrafficLights:h=!0,busy:p=!1,className:b}){let g=(0,a.useRef)({onClose:t,busy:p});return(g.current.onClose=t,g.current.busy=p,(0,a.useEffect)(()=>{if(!e)return;let t=g.current;d.push(t),c();let s=e=>{if("Escape"!==e.key)return;let s=d[d.length-1];s!==t||s.busy||(e.preventDefault(),s.onClose())};return document.addEventListener("keydown",s),()=>{document.removeEventListener("keydown",s);let e=d.indexOf(t);-1!==e&&d.splice(e,1),c()}},[e]),e)?(0,r.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[(0,r.jsx)("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-[2px] fade-in",onClick:u&&!p?t:void 0}),(0,r.jsxs)("div",{className:(0,l.cn)("relative w-full bg-surface","border border-border-subtle","rounded-[14px] shadow-[var(--shadow-elev)]","fade-in",{sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl",full:"max-w-4xl"}[m],b),children:[(s||h)&&(0,r.jsxs)("div",{className:"flex items-center justify-between p-2 border-b border-border-subtle",children:[(0,r.jsxs)("div",{className:"flex items-center",children:[h&&(0,r.jsxs)("div",{className:"hidden md:flex items-center gap-2 mr-4 ml-2",children:[(0,r.jsx)(i.default,{text:"Close",position:"top",color:"#FF5F56",children:(0,r.jsx)("button",{onClick:t,disabled:p,"aria-label":"Close",title:"Close",className:"w-4 h-4 rounded-full bg-[#FF5F56] hover:brightness-90 transition-all cursor-pointer flex items-center justify-center group/dot disabled:cursor-not-allowed disabled:opacity-50",children:(0,r.jsx)("span",{className:"text-[9px] font-bold text-white opacity-0 group-hover/dot:opacity-100 transition-opacity leading-none",children:"✕"})})}),(0,r.jsx)("div",{className:"w-4 h-4 rounded-full bg-[#3a3a3a]/20 dark:bg-white/15 cursor-not-allowed"}),(0,r.jsx)("div",{className:"w-4 h-4 rounded-full bg-[#3a3a3a]/20 dark:bg-white/15 cursor-not-allowed"})]}),s&&(0,r.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:s})]}),(0,r.jsx)("button",{onClick:t,disabled:p,"aria-label":"Close",className:"md:hidden p-1.5 rounded-[10px] text-text-muted hover:bg-surface-2 hover:text-text-main transition-colors disabled:cursor-not-allowed disabled:opacity-50",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"close"})})]}),(0,r.jsx)("div",{className:"p-6 max-h-[calc(85vh-100px)] overflow-y-auto custom-scrollbar",children:n}),o&&(0,r.jsx)("div",{className:"flex items-center justify-end gap-3 p-6 border-t border-border-subtle",children:o})]})]}):null}function m({isOpen:e,onClose:t,onConfirm:s,title:a="Confirm",message:l,confirmText:i="Confirm",cancelText:d="Cancel",variant:o="danger",loading:c=!1}){return(0,r.jsx)(x,{isOpen:e,onClose:t,title:a,size:"sm",busy:c,footer:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.default,{variant:"ghost",onClick:t,disabled:c,children:d}),(0,r.jsx)(n.default,{variant:o,onClick:s,loading:c,children:i})]}),children:(0,r.jsx)("p",{className:"text-text-muted",children:l})})}},86243:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>O});var r=s(95155),a=s(12115),l=s(1728),n=s(90639),i=s(28408),d=s(32539),o=s(59656),c=s(65671),x=s(34122),m=s(16746),u=s(96647),h=s(29010),p=s(56061),b=s(92542),g=s(11910),f=s(81127),j=s(98);let v={name:"",host:"",sshPort:"22",sshUser:"",sshPassword:"",useSudo:!0,sudoPassword:"",agentPort:"19998",installAgent:!0};function y(e){return{name:e?.name||"",host:e?.host||"",sshPort:String(e?.sshPort||22),sshUser:e?.sshUser||"",sshPassword:"",useSudo:e?.useSudo!==!1,sudoPassword:"",agentPort:String(e?.agentPort||19998),installAgent:!0}}function N(e){var t;let s;return!!e?.lastStatus&&(!e.lastError||Date.now()-(Number.isFinite(s=(t=e?.lastStatusAt)?new Date(t).getTime():0)?s:0)<=3e4)}function w(e){return Math.max(0,Math.min(100,Number(e)||0))}function k(e,t=1){let s=Number(e)||0;if(!s)return"0 B";let r=["B","KB","MB","GB","TB","PB"],a=Math.min(r.length-1,Math.floor(Math.log(s)/Math.log(1024)));return`${(s/1024**a).toFixed(a>2?t:0)} ${r[a]}`}function S(e){return e?new Date(e).toLocaleTimeString("vi-VN",{hour12:!1}):"--:--:--"}function C({value:e,label:t,detail:s,color:a="var(--color-brand-500)",icon:l}){let n=w(e),i=2*Math.PI*49;return(0,r.jsxs)("div",{className:"flex min-w-0 flex-col items-center",children:[(0,r.jsxs)("div",{className:"relative h-36 w-36",children:[(0,r.jsxs)("svg",{className:"h-full w-full -rotate-90",viewBox:"0 0 120 120","aria-hidden":"true",children:[(0,r.jsx)("circle",{cx:"60",cy:"60",r:49,fill:"none",stroke:"var(--color-surface-2)",strokeWidth:"8"}),(0,r.jsx)("circle",{cx:"60",cy:"60",r:49,fill:"none",stroke:a,strokeWidth:"8",strokeLinecap:"round",strokeDasharray:i,strokeDashoffset:i*(1-n/100),className:"transition-all duration-700"})]}),(0,r.jsxs)("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-center",children:[l?(0,r.jsx)("span",{className:"material-symbols-outlined mb-0.5 text-[19px] text-text-muted",children:l}):null,(0,r.jsxs)("strong",{className:"text-2xl font-semibold tracking-tight text-text-main",children:[n.toFixed(+(n<10)),"%"]}),(0,r.jsx)("span",{className:"mt-0.5 text-xs font-medium text-text-muted",children:t})]})]}),(0,r.jsx)("div",{className:"mt-2 max-w-full truncate text-center text-xs text-text-subtle",title:s,children:s})]})}function P({online:e}){return(0,r.jsx)("span",{className:`h-2.5 w-2.5 shrink-0 rounded-full ${e?"bg-emerald-500 shadow-[0_0_0_4px_rgba(16,185,129,.12)]":"bg-red-400 shadow-[0_0_0_4px_rgba(248,113,113,.12)]"}`})}function $({servers:e,selectedId:t,onSelect:s}){return(0,r.jsx)("div",{className:"flex gap-3 overflow-x-auto pb-1 scroll-thin-x",children:e.map(e=>{let a=e.id===t,l=N(e);return(0,r.jsxs)("button",{type:"button",onClick:()=>s(e.id),className:`min-w-[240px] rounded-2xl border p-4 text-left transition ${a?"border-primary bg-primary/5 shadow-[var(--shadow-warm)]":"border-border bg-surface hover:border-primary/40"}`,children:[(0,r.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(P,{online:l}),(0,r.jsx)("div",{className:"truncate font-semibold text-text-main",children:e.name})]}),(0,r.jsxs)("div",{className:"mt-1.5 truncate font-mono text-xs text-text-muted",children:[e.host,":",e.agentPort]})]}),(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px] text-text-subtle",children:"dns"})]}),(0,r.jsxs)("div",{className:"mt-3 flex items-center justify-between text-xs text-text-muted",children:[(0,r.jsx)("span",{children:l?"Đang hoạt động":"Mất kết nối"}),(0,r.jsx)("span",{children:S(e.lastStatusAt)})]})]},e.id)})})}function U({icon:e,label:t,value:s,sublabel:a,colorClass:l="text-primary",children:n}){return(0,r.jsxs)("div",{className:"rounded-2xl border border-border bg-surface p-4 shadow-[var(--shadow-soft)]",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)("div",{className:`flex h-10 w-10 items-center justify-center rounded-xl bg-surface-2 ${l}`,children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[22px]",children:e})}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("div",{className:"text-xs font-medium uppercase tracking-wider text-text-muted",children:t}),(0,r.jsx)("div",{className:"mt-0.5 truncate text-lg font-semibold text-text-main",children:s})]})]}),a?(0,r.jsx)("div",{className:"mt-3 truncate text-xs text-text-subtle",children:a}):null,n]})}function M({data:e,dataKey:t,label:s,color:a,unit:m="%"}){return(0,r.jsxs)("div",{className:"rounded-2xl border border-border bg-surface p-5 shadow-[var(--shadow-soft)]",children:[(0,r.jsxs)("div",{className:"mb-4 flex items-center justify-between",children:[(0,r.jsx)("h3",{className:"font-semibold text-text-main",children:s}),(0,r.jsx)("span",{className:"text-xs text-text-muted",children:"60 mẫu gần nhất"})]}),(0,r.jsx)("div",{className:"h-44",children:(0,r.jsx)(l.u,{width:"100%",height:"100%",children:(0,r.jsxs)(n.Q,{data:e,margin:{top:6,right:4,left:-22,bottom:0},children:[(0,r.jsx)("defs",{children:(0,r.jsxs)("linearGradient",{id:`fill-${t}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,r.jsx)("stop",{offset:"0%",stopColor:a,stopOpacity:.3}),(0,r.jsx)("stop",{offset:"100%",stopColor:a,stopOpacity:.02})]})}),(0,r.jsx)(i.d,{stroke:"var(--color-border-subtle)",strokeDasharray:"4 4",vertical:!1}),(0,r.jsx)(d.W,{dataKey:"time",hide:!0}),(0,r.jsx)(o.h,{domain:[0,"auto"],tick:{fill:"var(--color-text-subtle)",fontSize:11},axisLine:!1,tickLine:!1}),(0,r.jsx)(c.m,{contentStyle:{background:"var(--color-surface)",border:"1px solid var(--color-border)",borderRadius:12,fontSize:12},formatter:e=>[`${Number(e).toFixed(1)}${m}`,s]}),(0,r.jsx)(x.Gk,{type:"monotone",dataKey:t,stroke:a,fill:`url(#fill-${t})`,strokeWidth:2.2,dot:!1,isAnimationActive:!1})]})})})]})}let A=["#10b981","#06b6d4","#8b5cf6","#f59e0b","#ef4444","#3b82f6","#ec4899","#84cc16"];function T(e){return e?.uuid||`index-${e?.index??0}`}function I({data:e,gpus:t}){let s=(t||[]).map((e,t)=>({id:T(e),dataKey:`gpu${t}`,name:`GPU ${e.index} \xb7 ${e.name}`,color:A[t%A.length]})),a=e.map(e=>{let t={time:e.time};return s.forEach(s=>{let r=e.gpus?.find(e=>e.id===s.id);t[s.dataKey]=r?.usagePercent??null}),t});return(0,r.jsxs)("div",{className:"mb-5 rounded-2xl border border-border bg-surface p-5 shadow-[var(--shadow-soft)]",children:[(0,r.jsxs)("div",{className:"mb-4 flex flex-wrap items-start justify-between gap-2",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h4",{className:"font-semibold text-text-main",children:"GPU usage history"}),(0,r.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:"Mỗi đường biểu diễn mức tải realtime của một NVIDIA GPU."})]}),(0,r.jsx)("span",{className:"rounded-full bg-emerald-500/10 px-2.5 py-1 text-xs font-medium text-emerald-600 dark:text-emerald-400",children:"60 mẫu gần nhất"})]}),(0,r.jsx)("div",{className:"h-64",children:(0,r.jsx)(l.u,{width:"100%",height:"100%",children:(0,r.jsxs)(m.b,{data:a,margin:{top:8,right:12,left:-16,bottom:2},children:[(0,r.jsx)(i.d,{stroke:"var(--color-border-subtle)",strokeDasharray:"4 4",vertical:!1}),(0,r.jsx)(d.W,{dataKey:"time",tickFormatter:S,minTickGap:36,tick:{fill:"var(--color-text-subtle)",fontSize:11},axisLine:!1,tickLine:!1}),(0,r.jsx)(o.h,{domain:[0,100],ticks:[0,25,50,75,100],tickFormatter:e=>`${e}%`,tick:{fill:"var(--color-text-subtle)",fontSize:11},axisLine:!1,tickLine:!1}),(0,r.jsx)(c.m,{contentStyle:{background:"var(--color-surface)",border:"1px solid var(--color-border)",borderRadius:12,fontSize:12},labelFormatter:e=>`Thời gian ${S(e)}`,formatter:(e,t)=>[`${Number(e).toFixed(1)}%`,t]}),(0,r.jsx)(u.s,{iconType:"circle",iconSize:8,wrapperStyle:{fontSize:12,paddingTop:12},formatter:e=>(0,r.jsx)("span",{className:"text-text-muted",children:e})}),s.map(e=>(0,r.jsx)(h.N1,{type:"monotone",dataKey:e.dataKey,name:e.name,stroke:e.color,strokeWidth:2.4,dot:!1,connectNulls:!1,isAnimationActive:!1},e.id))]})})})]})}let D=[{value:"1h",label:"1 giờ"},{value:"6h",label:"6 giờ"},{value:"24h",label:"24 giờ"},{value:"7d",label:"7 ng\xe0y"},{value:"30d",label:"30 ng\xe0y"}];function _(e){return e?new Date(e).toLocaleString("vi-VN",{day:"2-digit",month:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!1}):"—"}function L({title:e,description:t,data:s,series:a,domain:n=[0,100],valueFormatter:x=e=>`${Number(e).toFixed(1)}%`,axisFormatter:p=e=>`${e}%`}){return(0,r.jsxs)("div",{className:"rounded-2xl border border-border bg-surface p-5 shadow-[var(--shadow-soft)]",children:[(0,r.jsxs)("div",{className:"mb-4",children:[(0,r.jsx)("h4",{className:"font-semibold text-text-main",children:e}),t?(0,r.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:t}):null]}),(0,r.jsx)("div",{className:"h-64",children:(0,r.jsx)(l.u,{width:"100%",height:"100%",children:(0,r.jsxs)(m.b,{data:s,margin:{top:8,right:12,left:-8,bottom:2},children:[(0,r.jsx)(i.d,{stroke:"var(--color-border-subtle)",strokeDasharray:"4 4",vertical:!1}),(0,r.jsx)(d.W,{dataKey:"time",tickFormatter:_,minTickGap:48,tick:{fill:"var(--color-text-subtle)",fontSize:10},axisLine:!1,tickLine:!1}),(0,r.jsx)(o.h,{domain:n,tickFormatter:p,width:58,tick:{fill:"var(--color-text-subtle)",fontSize:10},axisLine:!1,tickLine:!1}),(0,r.jsx)(c.m,{contentStyle:{background:"var(--color-surface)",border:"1px solid var(--color-border)",borderRadius:12,fontSize:12},labelFormatter:e=>_(e),formatter:(e,t)=>[x(e),t]}),(0,r.jsx)(u.s,{iconType:"circle",iconSize:8,wrapperStyle:{fontSize:12,paddingTop:12},formatter:e=>(0,r.jsx)("span",{className:"text-text-muted",children:e})}),a.map(e=>(0,r.jsx)(h.N1,{type:"monotone",dataKey:e.key,name:e.name,stroke:e.color,strokeWidth:2.2,dot:!1,connectNulls:!1,isAnimationActive:!1},e.key))]})})})]})}function F({server:e,data:t,meta:s,period:l,onPeriodChange:n,loading:i,error:d}){let o=(0,a.useMemo)(()=>{let e=new Map;return t.forEach(t=>{(t.gpus||[]).forEach(t=>{e.has(t.id)||e.set(t.id,t)})}),[...e.values()].map((e,t)=>({id:e.id,key:`gpu${t}`,name:`GPU ${e.index} \xb7 ${e.name}`,color:A[t%A.length]}))},[t]),c=(0,a.useCallback)(e=>t.map(t=>{let s={time:t.time};return o.forEach(r=>{let a=t.gpus?.find(e=>e.id===r.id);s[r.key]=a?.[e]??null}),s}),[t,o]);return(0,r.jsxs)("section",{className:"overflow-hidden rounded-3xl border border-border bg-surface shadow-[var(--shadow-soft)]",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-4 border-b border-border px-6 py-5",children:[(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-4",children:[(0,r.jsx)("div",{className:"flex h-12 w-12 items-center justify-center rounded-2xl bg-violet-500/10 text-violet-500",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[27px]",children:"monitoring"})}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsxs)("h3",{className:"truncate text-lg font-semibold text-text-main",children:["Lịch sử \xb7 ",e.name]}),(0,r.jsxs)("p",{className:"mt-1 text-xs text-text-muted",children:["Sample mỗi ph\xfat \xb7 lưu tối đa ",s?.retentionDays||30," ng\xe0y"]})]})]}),(0,r.jsx)("div",{className:"flex flex-wrap gap-1 rounded-xl bg-surface-2 p-1",children:D.map(e=>(0,r.jsx)("button",{type:"button",onClick:()=>n(e.value),className:`rounded-lg px-3 py-2 text-xs font-semibold transition ${l===e.value?"bg-surface text-primary shadow-sm":"text-text-muted hover:text-text-main"}`,children:e.label},e.value))})]}),i?(0,r.jsxs)("div",{className:"flex min-h-[420px] items-center justify-center text-sm text-text-muted",children:[(0,r.jsx)("span",{className:"material-symbols-outlined mr-2 animate-spin",children:"progress_activity"}),"Đang tải dữ liệu lịch sử..."]}):d?(0,r.jsx)("div",{className:"m-6 rounded-2xl border border-red-500/20 bg-red-500/10 p-5 text-sm text-red-600 dark:text-red-300",children:d}):t.length?(0,r.jsxs)("div",{className:"space-y-5 p-6",children:[(0,r.jsxs)("div",{className:"grid gap-4 sm:grid-cols-3",children:[(0,r.jsx)(U,{icon:"database",label:"Số điểm hiển thị",value:t.length.toLocaleString("vi-VN"),sublabel:`Bucket ${s?.bucketMinutes||1} ph\xfat`,colorClass:"text-violet-500"}),(0,r.jsx)(U,{icon:"date_range",label:"Từ thời điểm",value:_(t[0]?.time),sublabel:"Điểm đầu ti\xean trong khoảng đ\xe3 chọn",colorClass:"text-cyan-500"}),(0,r.jsx)(U,{icon:"memory",label:"NVIDIA GPU",value:`${o.length} card`,sublabel:"Theo d\xf5i ri\xeang bằng GPU UUID",colorClass:"text-emerald-500"})]}),(0,r.jsxs)("div",{className:"grid gap-5 xl:grid-cols-2",children:[(0,r.jsx)(L,{title:"CPU, RAM & Disk usage",description:"Tỷ lệ sử dụng t\xe0i nguy\xean hệ thống theo thời gian.",data:t,series:[{key:"cpu",name:"CPU",color:"#3b9dec"},{key:"memory",name:"RAM",color:"#8b5cf6"},{key:"disk",name:"Disk",color:"#f59e0b"}]}),(0,r.jsx)(L,{title:"Network throughput",description:"Tốc độ nhận v\xe0 gửi trung b\xecnh trong mỗi bucket.",data:t,domain:[0,"auto"],series:[{key:"networkRxBps",name:"Download",color:"#06b6d4"},{key:"networkTxBps",name:"Upload",color:"#ec4899"}],valueFormatter:e=>`${k(e)}/s`,axisFormatter:e=>k(e)})]}),o.length?(0,r.jsxs)("div",{className:"grid gap-5 xl:grid-cols-2",children:[(0,r.jsx)(L,{title:"NVIDIA GPU usage",description:"Mức tải của từng GPU, ph\xe2n biệt theo UUID.",data:c("usagePercent"),series:o}),(0,r.jsx)(L,{title:"GPU VRAM usage",description:"Phần trăm VRAM đ\xe3 sử dụng tr\xean từng card.",data:c("memoryUsagePercent"),series:o}),(0,r.jsx)(L,{title:"GPU temperature",description:"Nhiệt độ trung b\xecnh của từng card trong mỗi bucket.",data:c("temperatureC"),domain:[0,"auto"],series:o,valueFormatter:e=>`${Number(e).toFixed(1)}\xb0C`,axisFormatter:e=>`${e}\xb0`}),(0,r.jsx)(L,{title:"GPU power draw",description:"C\xf4ng suất ti\xeau thụ trung b\xecnh của từng card.",data:c("powerDrawW"),domain:[0,"auto"],series:o,valueFormatter:e=>`${Number(e).toFixed(1)} W`,axisFormatter:e=>`${e}W`})]}):null]}):(0,r.jsxs)("div",{className:"flex min-h-[420px] flex-col items-center justify-center px-6 text-center",children:[(0,r.jsx)("div",{className:"flex h-16 w-16 items-center justify-center rounded-2xl bg-violet-500/10 text-violet-500",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[34px]",children:"hourglass_empty"})}),(0,r.jsx)("h4",{className:"mt-5 font-semibold text-text-main",children:"Chưa c\xf3 dữ liệu lịch sử"}),(0,r.jsx)("p",{className:"mt-2 max-w-md text-sm leading-6 text-text-muted",children:"Collector đ\xe3 được bật v\xe0 sẽ ghi mẫu đầu ti\xean trong v\xf2ng một ph\xfat. Dữ liệu vẫn tiếp tục được thu thập khi kh\xf4ng mở dashboard."})]})]})}function E({gpu:e}){let t=w(e.memoryUsagePercent);return(0,r.jsxs)("div",{className:"overflow-hidden rounded-2xl border border-border bg-surface shadow-[var(--shadow-soft)]",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between border-b border-border-subtle bg-gradient-to-r from-emerald-500/8 to-cyan-500/5 px-5 py-4",children:[(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,r.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-xl bg-emerald-500/10 text-emerald-500",children:(0,r.jsx)("span",{className:"material-symbols-outlined",children:"memory"})}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsxs)("div",{className:"truncate font-semibold text-text-main",children:["GPU ",e.index," \xb7 ",e.name]}),(0,r.jsxs)("div",{className:"mt-0.5 text-xs text-text-muted",children:["NVIDIA Driver ",e.driverVersion||"—"]})]})]}),(0,r.jsx)("span",{className:"rounded-full bg-emerald-500/10 px-2.5 py-1 text-xs font-semibold text-emerald-600 dark:text-emerald-400",children:"NVIDIA"})]}),(0,r.jsxs)("div",{className:"grid gap-5 p-5 sm:grid-cols-[150px_1fr]",children:[(0,r.jsx)(C,{value:e.usagePercent,label:"GPU Load",detail:`${e.temperatureC??"—"}\xb0C`,color:"#10b981"}),(0,r.jsxs)("div",{className:"space-y-5",children:[(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"mb-2 flex items-center justify-between text-sm",children:[(0,r.jsx)("span",{className:"text-text-muted",children:"VRAM"}),(0,r.jsxs)("span",{className:"font-semibold text-text-main",children:[k(1048576*(e.memoryUsedMb||0))," /"," ",k(1048576*(e.memoryTotalMb||0))]})]}),(0,r.jsx)("div",{className:"h-2.5 overflow-hidden rounded-full bg-surface-2",children:(0,r.jsx)("div",{className:"h-full rounded-full bg-emerald-500 transition-all duration-700",style:{width:`${t}%`}})}),(0,r.jsxs)("div",{className:"mt-1.5 text-right text-xs text-text-subtle",children:[t.toFixed(1),"% đ\xe3 d\xf9ng"]})]}),(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,r.jsxs)("div",{className:"rounded-xl bg-surface-2 p-3",children:[(0,r.jsx)("div",{className:"text-xs text-text-muted",children:"Nhiệt độ"}),(0,r.jsxs)("div",{className:"mt-1 text-lg font-semibold text-text-main",children:[e.temperatureC??"—","\xb0C"]})]}),(0,r.jsxs)("div",{className:"rounded-xl bg-surface-2 p-3",children:[(0,r.jsx)("div",{className:"text-xs text-text-muted",children:"C\xf4ng suất"}),(0,r.jsxs)("div",{className:"mt-1 text-lg font-semibold text-text-main",children:[e.powerDrawW??"—",(0,r.jsxs)("span",{className:"text-xs font-normal text-text-muted",children:[" ","/ ",e.powerLimitW??"—"," W"]})]})]})]})]})]})]})}function K({open:e,onClose:t,onCreated:s}){let[l,n]=(0,a.useState)(v),[i,d]=(0,a.useState)(!1),[o,c]=(0,a.useState)(""),x=(e,t)=>n(s=>({...s,[e]:t}));(0,a.useEffect)(()=>{e&&(n(v),c(""))},[e]);let m=async e=>{e.preventDefault(),d(!0),c("");try{let e=await fetch("/api/resource-monitor",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)}),r=await e.json().catch(()=>({}));if(!e.ok)throw Error(r.error||"Kh\xf4ng thể th\xeam server");await s(r.server,r.install),t()}catch(e){c(e?.message||"Kh\xf4ng thể th\xeam server")}finally{d(!1)}};return(0,r.jsx)(f.default,{isOpen:e,onClose:t,title:"Th\xeam Linux server",size:"xl",busy:i,footer:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(b.default,{variant:"ghost",onClick:t,disabled:i,children:"Hủy"}),(0,r.jsx)(b.default,{onClick:m,loading:i,icon:"rocket_launch",children:"C\xe0i agent & th\xeam server"})]}),children:(0,r.jsxs)("form",{onSubmit:m,className:"space-y-5",children:[(0,r.jsx)("div",{className:"rounded-xl border border-primary/20 bg-primary/5 p-4 text-sm text-text-muted",children:(0,r.jsxs)("div",{className:"flex gap-3",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary",children:"auto_fix_high"}),(0,r.jsx)("p",{children:"BlueRouter sẽ SSH v\xe0o m\xe1y, d\xf9ng quyền sudo để c\xe0i Python agent dưới dạng systemd service. Sau lần n\xe0y bạn kh\xf4ng cần thao t\xe1c th\xeam tr\xean Linux."})]})}),(0,r.jsxs)("div",{className:"grid gap-4 sm:grid-cols-2",children:[(0,r.jsx)(g.default,{label:"T\xean hiển thị",value:l.name,onChange:e=>x("name",e.target.value),placeholder:"GPU Worker 01",icon:"dns"}),(0,r.jsx)(g.default,{required:!0,label:"Hostname / IP",value:l.host,onChange:e=>x("host",e.target.value),placeholder:"192.168.1.50",icon:"lan"}),(0,r.jsx)(g.default,{required:!0,label:"SSH user",value:l.sshUser,onChange:e=>x("sshUser",e.target.value),placeholder:"ubuntu",icon:"person"}),(0,r.jsx)(g.default,{label:"SSH port",type:"number",value:l.sshPort,onChange:e=>x("sshPort",e.target.value)}),(0,r.jsx)(g.default,{label:"SSH password",type:"password",value:l.sshPassword,onChange:e=>x("sshPassword",e.target.value),placeholder:"Để trống nếu d\xf9ng SSH key",hint:"Chỉ d\xf9ng trong l\xfac c\xe0i, kh\xf4ng lưu v\xe0o database."}),(0,r.jsx)(g.default,{label:"Agent port",type:"number",value:l.agentPort,onChange:e=>x("agentPort",e.target.value),hint:"Mặc định 19998; dashboard server phải truy cập được port n\xe0y."})]}),(0,r.jsxs)("label",{className:"flex cursor-pointer items-start gap-3 rounded-xl border border-border bg-surface-2/60 p-4",children:[(0,r.jsx)("input",{type:"checkbox",checked:l.useSudo,onChange:e=>x("useSudo",e.target.checked),className:"mt-1 h-4 w-4"}),(0,r.jsxs)("span",{children:[(0,r.jsx)("span",{className:"block text-sm font-semibold text-text-main",children:"User cần sudo để c\xe0i service"}),(0,r.jsx)("span",{className:"mt-1 block text-xs text-text-muted",children:"Tắt nếu đăng nhập trực tiếp bằng root."})]})]}),l.useSudo?(0,r.jsx)(g.default,{label:"Sudo password",type:"password",value:l.sudoPassword,onChange:e=>x("sudoPassword",e.target.value),placeholder:"Mặc định d\xf9ng c\xf9ng SSH password"}):null,o?(0,r.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:o}):null]})})}function G({open:e,server:t,onClose:s,onUpdated:l}){let[n,i]=(0,a.useState)(y(t)),[d,o]=(0,a.useState)(!1),[c,x]=(0,a.useState)(""),m=(e,t)=>i(s=>({...s,[e]:t}));(0,a.useEffect)(()=>{e&&(i(y(t)),x(""))},[e,t]);let u=async e=>{if(e.preventDefault(),t?.id){o(!0),x("");try{let e=await fetch(`/api/resource-monitor/${t.id}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:n.name,host:n.host,sshPort:n.sshPort,sshUser:n.sshUser,useSudo:n.useSudo,agentPort:n.agentPort})}),r=await e.json().catch(()=>({}));if(!e.ok)throw Error(r.error||"Kh\xf4ng thể lưu server");let a=null;if(n.installAgent){let e=await fetch(`/api/resource-monitor/${t.id}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sshPassword:n.sshPassword,sudoPassword:n.sudoPassword})}),s=await e.json().catch(()=>({}));a={ok:e.ok&&!1!==s.ok,log:s.log,error:s.error}}await l(r.server,a),s()}catch(e){x(e?.message||"Kh\xf4ng thể cập nhật server")}finally{o(!1)}}};return(0,r.jsx)(f.default,{isOpen:e,onClose:s,title:"Sửa Linux server",size:"xl",busy:d,footer:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(b.default,{variant:"ghost",onClick:s,disabled:d,children:"Hủy"}),(0,r.jsx)(b.default,{onClick:u,loading:d,icon:"save",children:"Lưu & c\xe0i lại agent"})]}),children:(0,r.jsxs)("form",{onSubmit:u,className:"space-y-5",children:[(0,r.jsxs)("div",{className:"grid gap-4 sm:grid-cols-2",children:[(0,r.jsx)(g.default,{label:"T\xean hiển thị",value:n.name,onChange:e=>m("name",e.target.value),placeholder:"GPU Worker 01",icon:"dns"}),(0,r.jsx)(g.default,{required:!0,label:"Hostname / IP",value:n.host,onChange:e=>m("host",e.target.value),placeholder:"192.168.1.50",icon:"lan"}),(0,r.jsx)(g.default,{required:!0,label:"SSH user",value:n.sshUser,onChange:e=>m("sshUser",e.target.value),placeholder:"ubuntu",icon:"person"}),(0,r.jsx)(g.default,{label:"SSH port",type:"number",value:n.sshPort,onChange:e=>m("sshPort",e.target.value)}),(0,r.jsx)(g.default,{label:"SSH password",type:"password",value:n.sshPassword,onChange:e=>m("sshPassword",e.target.value),placeholder:"Nhập lại nếu trước đ\xf3 sai",hint:"Chỉ d\xf9ng để c\xe0i lại agent, kh\xf4ng lưu v\xe0o database."}),(0,r.jsx)(g.default,{label:"Agent port",type:"number",value:n.agentPort,onChange:e=>m("agentPort",e.target.value)})]}),(0,r.jsxs)("label",{className:"flex cursor-pointer items-start gap-3 rounded-xl border border-border bg-surface-2/60 p-4",children:[(0,r.jsx)("input",{type:"checkbox",checked:n.useSudo,onChange:e=>m("useSudo",e.target.checked),className:"mt-1 h-4 w-4"}),(0,r.jsxs)("span",{children:[(0,r.jsx)("span",{className:"block text-sm font-semibold text-text-main",children:"User cần sudo để c\xe0i service"}),(0,r.jsx)("span",{className:"mt-1 block text-xs text-text-muted",children:"Tắt nếu đăng nhập trực tiếp bằng root."})]})]}),n.useSudo?(0,r.jsx)(g.default,{label:"Sudo password",type:"password",value:n.sudoPassword,onChange:e=>m("sudoPassword",e.target.value),placeholder:"Mặc định d\xf9ng c\xf9ng SSH password"}):null,(0,r.jsxs)("label",{className:"flex cursor-pointer items-start gap-3 rounded-xl border border-border bg-surface-2/60 p-4",children:[(0,r.jsx)("input",{type:"checkbox",checked:n.installAgent,onChange:e=>m("installAgent",e.target.checked),className:"mt-1 h-4 w-4"}),(0,r.jsxs)("span",{children:[(0,r.jsx)("span",{className:"block text-sm font-semibold text-text-main",children:"C\xe0i lại agent sau khi lưu"}),(0,r.jsx)("span",{className:"mt-1 block text-xs text-text-muted",children:"Bật mục n\xe0y khi cần nhập lại account/password SSH hoặc đổi port."})]})]}),c?(0,r.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:c}):null]})})}let B={normal:{variant:"success",label:"B\xecnh thường"},warning:{variant:"warning",label:"Cảnh b\xe1o"},critical:{variant:"error",label:"Qu\xe1 tải"},unknown:{variant:"default",label:"Kh\xf4ng r\xf5"}};function z({modelOptions:e,selectedModel:t,onSelectModel:s,analysis:a,loading:l,error:n,onAnalyze:i,standby:d}){return(0,r.jsxs)("section",{className:"overflow-hidden rounded-3xl border border-border bg-surface shadow-[var(--shadow-soft)]",children:[(0,r.jsx)("div",{className:"flex flex-wrap items-center justify-between gap-4 border-b border-border px-6 py-5",children:(0,r.jsxs)("div",{className:"flex items-center gap-4",children:[(0,r.jsx)("div",{className:"flex h-12 w-12 items-center justify-center rounded-2xl bg-primary/10 text-primary",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[27px]",children:"neurology"})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"text-lg font-semibold text-text-main",children:"Đ\xe1nh gi\xe1 AI t\xecnh trạng server"}),(0,r.jsx)("p",{className:"mt-0.5 text-xs text-text-muted",children:"Ph\xe2n t\xedch giờ l\xe0m việc h\xf4m nay (8:00 - 18:00) tr\xean to\xe0n bộ Linux server."})]})]})}),(0,r.jsxs)("div",{className:"space-y-5 p-6",children:[d?(0,r.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,r.jsxs)("div",{className:"flex flex-wrap items-end gap-3",children:[(0,r.jsx)(j.default,{className:"min-w-[280px] flex-1",label:"AI model d\xf9ng để ph\xe2n t\xedch",options:e,value:t,onChange:e=>s(e.target.value),placeholder:e.length?"Chọn model":"Chưa c\xf3 kết nối AI n\xe0o đang hoạt động",disabled:!e.length||d}),(0,r.jsx)(b.default,{icon:"auto_awesome",onClick:i,loading:l,disabled:!t||d,children:"Ph\xe2n t\xedch lại"})]}),n?(0,r.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:n}):null,a?(0,r.jsxs)("div",{className:"space-y-5",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2 text-xs text-text-muted",children:[(0,r.jsxs)("span",{children:["Model: ",(0,r.jsx)("span",{className:"font-semibold",children:a.modelLabel})]}),(0,r.jsxs)("span",{children:["Cập nhật l\xfac ",S(a.generatedAt)]})]}),(0,r.jsx)("div",{className:"whitespace-pre-wrap rounded-2xl border border-border bg-surface-2/40 p-5 text-sm leading-6 text-text-main",children:a.summary}),a.servers?.length?(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"mb-3 flex items-center gap-2",children:[(0,r.jsx)("span",{className:"h-5 w-1 rounded-full bg-primary"}),(0,r.jsx)("h4",{className:"font-semibold text-text-main",children:"Trạng th\xe1i từng server"})]}),(0,r.jsx)("div",{className:"grid gap-3 sm:grid-cols-2 xl:grid-cols-3",children:a.servers.map(e=>{let t=B[e.status]||B.unknown;return(0,r.jsxs)("div",{className:"flex items-center justify-between rounded-xl border border-border bg-surface px-4 py-3",children:[(0,r.jsx)("span",{className:"truncate text-sm font-medium text-text-main",children:e.name}),(0,r.jsx)(p.default,{variant:t.variant,dot:!0,children:t.label})]},e.serverId)})})]}):null]}):l?null:(0,r.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.'})]})]})}function O(){let e,t,s,l,[n,i]=(0,a.useState)("realtime"),[d,o]=(0,a.useState)([]),[c,x]=(0,a.useState)(""),[m,u]=(0,a.useState)({}),[h,p]=(0,a.useState)(!0),[g,j]=(0,a.useState)(!1),[v,y]=(0,a.useState)(!1),[A,D]=(0,a.useState)(!1),[_,L]=(0,a.useState)(null),[B,O]=(0,a.useState)(!1),[R,H]=(0,a.useState)(null),[V,W]=(0,a.useState)("24h"),[q,J]=(0,a.useState)([]),[X,Q]=(0,a.useState)(null),[Y,Z]=(0,a.useState)(!1),[ee,et]=(0,a.useState)(""),[es,er]=(0,a.useState)(!1),[ea,el]=(0,a.useState)([]),[en,ei]=(0,a.useState)(""),[ed,eo]=(0,a.useState)(null),[ec,ex]=(0,a.useState)(!1),[em,eu]=(0,a.useState)(""),eh=(0,a.useRef)(0),ep=(0,a.useCallback)(async({quiet:e=!1}={})=>{e||j(!0);try{let e=await fetch("/api/resource-monitor",{cache:"no-store"}),t=await e.json().catch(()=>({}));if(!e.ok)throw Error(t.error||"Kh\xf4ng tải được server");let s=t.servers||[];er(!0===t.standby),o(s),x(e=>e&&s.some(t=>t.id===e)?e:s[0]?.id||""),u(e=>{let t={...e};return s.forEach(e=>{if(!N(e))return;let s=e.lastStatus,r={time:s.updatedAt||new Date().toISOString(),cpu:s.cpu?.usagePercent||0,memory:s.memory?.usagePercent||0,disk:s.disks?.[0]?.usagePercent||0,gpu:s.gpus?.length?Math.max(...s.gpus.map(e=>e.usagePercent||0)):0,gpus:(s.gpus||[]).map(e=>({id:T(e),usagePercent:w(e.usagePercent)}))},a=t[e.id]||[];t[e.id]=a.at(-1)?.time===r.time?a:[...a,r].slice(-60)}),t})}catch(t){e||H({type:"error",text:t?.message||"Kh\xf4ng tải được server"})}finally{p(!1),e||j(!1)}},[]),eb=(0,a.useCallback)(async()=>{if(!c)return;let e=++eh.current;Z(!0),et("");try{let t=await fetch(`/api/resource-monitor/history?serverId=${encodeURIComponent(c)}&period=${encodeURIComponent(V)}`,{cache:"no-store"}),s=await t.json().catch(()=>({}));if(!t.ok)throw Error(s.error||"Kh\xf4ng tải được lịch sử t\xe0i nguy\xean");if(eh.current!==e)return;J(s.points||[]),Q(s)}catch(t){if(eh.current!==e)return;et(t?.message||"Kh\xf4ng tải được lịch sử t\xe0i nguy\xean"),J([])}finally{eh.current===e&&Z(!1)}},[V,c]);(0,a.useEffect)(()=>{let e,t=!1;ep();let s=async()=>{await ep({quiet:!0}),t||(e=setTimeout(s,4e3))};return e=setTimeout(s,4e3),()=>{t=!0,clearTimeout(e)}},[ep]),(0,a.useEffect)(()=>{if("history"!==n||!c)return;eb();let e=setInterval(eb,6e4);return()=>clearInterval(e)},[n,eb,c]);let eg=(0,a.useCallback)(e=>{ei(e),fetch("/api/resource-monitor/analyze",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:e})}).catch(()=>{})},[]),ef=(0,a.useCallback)(async()=>{if(!en)return;let e=en.indexOf("::"),t=en.slice(0,e),s=en.slice(e+2);ex(!0),eu("");try{let e=await fetch("/api/resource-monitor/analyze",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({connectionId:t,model:s})}),r=await e.json().catch(()=>({}));if(!e.ok)throw Error(r.error||"Kh\xf4ng thể ph\xe2n t\xedch t\xe0i nguy\xean");eo(r.analysis)}catch(e){eu(e?.message||"Kh\xf4ng thể ph\xe2n t\xedch t\xe0i nguy\xean")}finally{ex(!1)}},[en]);(0,a.useEffect)(()=>{"ai"===n&&(async()=>{let e="";try{let t=await fetch("/api/resource-monitor/analyze",{cache:"no-store"}),s=await t.json().catch(()=>({}));t.ok&&(eo(s.analysis||null),e=s.selectedModel||"")}catch{}try{let t=await fetch("/api/resource-monitor/ai-models",{cache:"no-store"}),s=(await t.json().catch(()=>({}))).options||[];el(s),ei(t=>{let r=t||e;return r&&s.some(e=>e.value===r)?r:s[0]?.value||""})}catch{el([])}})()},[n]);let ej=(0,a.useMemo)(()=>d.find(e=>e.id===c)||null,[d,c]),ev=ej?.lastStatus,ey=N(ej),eN=ev?.disks?.[0],ew=m[c]||[],ek=async()=>{if(_){O(!0);try{if(!(await fetch(`/api/resource-monitor/${_.id}`,{method:"DELETE"})).ok)throw Error("Kh\xf4ng thể x\xf3a server");L(null),await ep()}catch(e){H({type:"error",text:e.message})}finally{O(!1)}}};return h?(0,r.jsxs)("div",{className:"flex min-h-[50vh] items-center justify-center text-text-muted",children:[(0,r.jsx)("span",{className:"material-symbols-outlined mr-2 animate-spin",children:"progress_activity"}),"Đang tải t\xe0i nguy\xean server..."]}):(0,r.jsxs)("div",{className:"space-y-6",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h2",{className:"text-xl font-semibold text-text-main",children:"Linux Resource Monitor"}),(0,r.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Theo d\xf5i realtime CPU, RAM, disk, network v\xe0 to\xe0n bộ NVIDIA GPU."})]}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(b.default,{variant:"secondary",icon:"refresh",onClick:()=>"history"===n?eb():ep(),loading:"history"===n?Y:g,children:"L\xe0m mới"}),(0,r.jsx)(b.default,{icon:"add",onClick:()=>y(!0),disabled:es,children:"Th\xeam server"})]})]}),es?(0,r.jsx)("div",{className:"rounded-xl border border-blue-500/30 bg-blue-500/10 px-4 py-3 text-sm text-blue-700 dark:text-blue-300",children:"Standby mode: Resource Monitor chỉ hiển thị snapshot từ Master. Node n\xe0y kh\xf4ng polling agent v\xe0 kh\xf4ng cho sửa danh s\xe1ch server."}):null,(0,r.jsxs)("div",{className:"flex w-fit rounded-xl border border-border bg-surface p-1 shadow-[var(--shadow-soft)]",children:[(0,r.jsxs)("button",{type:"button",onClick:()=>i("realtime"),className:`flex items-center gap-2 rounded-lg px-4 py-2.5 text-sm font-semibold transition ${"realtime"===n?"bg-primary text-white shadow-sm":"text-text-muted hover:bg-surface-2 hover:text-text-main"}`,children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[19px]",children:"monitor_heart"}),"Realtime Monitor"]}),(0,r.jsxs)("button",{type:"button",onClick:()=>i("history"),className:`flex items-center gap-2 rounded-lg px-4 py-2.5 text-sm font-semibold transition ${"history"===n?"bg-primary text-white shadow-sm":"text-text-muted hover:bg-surface-2 hover:text-text-main"}`,children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[19px]",children:"query_stats"}),"History"]}),(0,r.jsxs)("button",{type:"button",onClick:()=>i("ai"),className:`flex items-center gap-2 rounded-lg px-4 py-2.5 text-sm font-semibold transition ${"ai"===n?"bg-primary text-white shadow-sm":"text-text-muted hover:bg-surface-2 hover:text-text-main"}`,children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[19px]",children:"neurology"}),"Đ\xe1nh gi\xe1 AI"]})]}),R?(0,r.jsxs)("div",{className:`flex items-center justify-between rounded-xl border px-4 py-3 text-sm ${"error"===R.type?"border-red-500/20 bg-red-500/10 text-red-600 dark:text-red-300":"border-amber-500/20 bg-amber-500/10 text-amber-700 dark:text-amber-300"}`,children:[(0,r.jsx)("span",{children:R.text}),(0,r.jsx)("button",{onClick:()=>H(null),children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"close"})})]}):null,d.length?(0,r.jsxs)(r.Fragment,{children:["ai"!==n?(0,r.jsx)($,{servers:d,selectedId:c,onSelect:x}):null,"ai"===n?(0,r.jsx)(z,{modelOptions:ea,selectedModel:en,onSelectModel:eg,analysis:ed,loading:ec,error:em,onAnalyze:ef,standby:es}):ej?"realtime"===n?(0,r.jsxs)("section",{className:"overflow-hidden rounded-3xl border border-border bg-surface shadow-[var(--shadow-soft)]",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4 border-b border-border px-6 py-5",children:[(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-4",children:[(0,r.jsx)("div",{className:"flex h-12 w-12 items-center justify-center rounded-2xl bg-primary/10 text-primary",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[27px]",children:"dns"})}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(P,{online:ey}),(0,r.jsx)("h3",{className:"truncate text-lg font-semibold text-text-main",children:ej.name})]}),(0,r.jsxs)("div",{className:"mt-1 flex flex-wrap gap-x-3 text-xs text-text-muted",children:[(0,r.jsx)("span",{className:"font-mono",children:ej.host}),ev?.os?(0,r.jsx)("span",{children:ev.os}):null,ev?.uptimeSeconds?(0,r.jsxs)("span",{children:["Uptime ",(t=Math.floor((e=Number(ev.uptimeSeconds)||0)/86400),s=Math.floor(e%86400/3600),l=Math.floor(e%3600/60),t?`${t} ng\xe0y ${s} giờ`:s?`${s} giờ ${l} ph\xfat`:`${l} ph\xfat`)]}):null]})]})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:`rounded-full px-3 py-1.5 text-xs font-semibold ${ey?"bg-emerald-500/10 text-emerald-600 dark:text-emerald-400":"bg-red-500/10 text-red-600 dark:text-red-300"}`,children:ey?"Online":"Offline"}),es?null:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("button",{type:"button",onClick:()=>D(!0),className:"rounded-xl p-2 text-text-muted hover:bg-primary/10 hover:text-primary",title:"Sửa server v\xe0 c\xe0i lại agent",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"edit"})}),(0,r.jsx)("button",{type:"button",onClick:()=>L(ej),className:"rounded-xl p-2 text-text-muted hover:bg-red-500/10 hover:text-red-500",title:"X\xf3a khỏi dashboard",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"delete"})})]})]})]}),ey?null:(0,r.jsx)("div",{className:"m-6 rounded-2xl border border-amber-500/20 bg-amber-500/8 p-5",children:(0,r.jsxs)("div",{className:"flex gap-3",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-amber-500",children:"cloud_off"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"font-semibold text-text-main",children:"Kh\xf4ng kết nối được agent"}),(0,r.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:ej.lastError||"Agent chưa gửi dữ liệu. Kiểm tra firewall v\xe0 agent port."}),ej.lastInstallLog?(0,r.jsxs)("details",{className:"mt-3",children:[(0,r.jsx)("summary",{className:"cursor-pointer text-xs font-semibold text-amber-600",children:"Xem log c\xe0i đặt"}),(0,r.jsx)("pre",{className:"mt-2 max-h-48 overflow-auto whitespace-pre-wrap rounded-xl bg-black/80 p-3 text-xs text-white",children:ej.lastInstallLog})]}):null]})]})}),ev?(0,r.jsxs)("div",{className:"space-y-7 p-6",children:[(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"mb-5 flex items-center gap-2",children:[(0,r.jsx)("span",{className:"h-5 w-1 rounded-full bg-primary"}),(0,r.jsx)("h3",{className:"font-semibold text-text-main",children:"Tổng quan t\xe0i nguy\xean"}),(0,r.jsxs)("span",{className:"ml-auto text-xs text-text-muted",children:["Cập nhật ",S(ej.lastStatusAt)]})]}),(0,r.jsxs)("div",{className:"grid gap-5 sm:grid-cols-2 xl:grid-cols-4",children:[(0,r.jsx)(C,{value:ev.cpu?.usagePercent,label:"CPU",detail:`${ev.cpu?.cores||0} cores \xb7 Load ${ev.cpu?.load1??0}`,icon:"developer_board"}),(0,r.jsx)(C,{value:ev.memory?.usagePercent,label:"RAM",detail:`${k(ev.memory?.usedBytes)} / ${k(ev.memory?.totalBytes)}`,icon:"memory_alt"}),(0,r.jsx)(C,{value:eN?.usagePercent,label:"Disk /",detail:`${k(eN?.usedBytes)} / ${k(eN?.totalBytes)}`,icon:"hard_drive"}),(0,r.jsx)(C,{value:ev.gpus?.length?Math.max(...ev.gpus.map(e=>e.usagePercent||0)):0,label:ev.gpus?.length?`${ev.gpus.length} NVIDIA GPU`:"GPU",detail:ev.gpus?.length?`${ev.gpus.length} card được ph\xe1t hiện`:"Kh\xf4ng c\xf3 NVIDIA GPU",color:"#10b981",icon:"memory"})]})]}),(0,r.jsxs)("div",{className:"grid gap-4 sm:grid-cols-2 xl:grid-cols-4",children:[(0,r.jsx)(U,{icon:"developer_board",label:"CPU",value:ev.cpu?.model||`${ev.cpu?.cores||0} cores`,sublabel:`Load average ${ev.cpu?.load1??0} / ${ev.cpu?.load5??0} / ${ev.cpu?.load15??0}`}),(0,r.jsx)(U,{icon:"swap_vert",label:"Network realtime",value:`↓ ${k(ev.network?.rxBytesPerSecond)}/s`,sublabel:`↑ ${k(ev.network?.txBytesPerSecond)}/s`,colorClass:"text-cyan-500"}),(0,r.jsx)(U,{icon:"hard_drive",label:"Disk root",value:`${k(eN?.freeBytes)} trống`,sublabel:`${eN?.device||"root"} \xb7 ${eN?.filesystem||"filesystem"}`,colorClass:"text-violet-500"}),(0,r.jsx)(U,{icon:"memory",label:"Swap",value:k(ev.memory?.swapUsedBytes),sublabel:`Tổng ${k(ev.memory?.swapTotalBytes)}`,colorClass:"text-amber-500"})]}),(0,r.jsxs)("div",{className:"grid gap-5 xl:grid-cols-2",children:[(0,r.jsx)(M,{data:ew,dataKey:"cpu",label:"CPU usage",color:"#3b9dec"}),(0,r.jsx)(M,{data:ew,dataKey:"memory",label:"RAM usage",color:"#8b5cf6"})]}),(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"mb-4 flex items-center gap-2",children:[(0,r.jsx)("span",{className:"h-5 w-1 rounded-full bg-emerald-500"}),(0,r.jsxs)("h3",{className:"font-semibold text-text-main",children:["NVIDIA GPU (",ev.gpus?.length||0,")"]})]}),ev.gpus?.length?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(I,{data:ew,gpus:ev.gpus}),(0,r.jsx)("div",{className:"grid gap-5 xl:grid-cols-2",children:ev.gpus.map(e=>(0,r.jsx)(E,{gpu:e},e.uuid||e.index))})]}):(0,r.jsxs)("div",{className:"rounded-2xl border border-dashed border-border bg-surface-2/40 py-10 text-center text-sm text-text-muted",children:["Kh\xf4ng ph\xe1t hiện NVIDIA GPU hoặc"," ",(0,r.jsx)("span",{className:"font-mono",children:"nvidia-smi"})," chưa sẵn s\xe0ng."]})]})]}):null]}):(0,r.jsx)(F,{server:ej,data:q,meta:X,period:V,onPeriodChange:W,loading:Y,error:ee}):null]}):(0,r.jsxs)("div",{className:"flex min-h-[460px] flex-col items-center justify-center rounded-3xl border border-dashed border-border bg-surface px-6 text-center",children:[(0,r.jsx)("div",{className:"flex h-20 w-20 items-center justify-center rounded-3xl bg-primary/10 text-primary",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[42px]",children:"monitor_heart"})}),(0,r.jsx)("h3",{className:"mt-6 text-xl font-semibold text-text-main",children:"Chưa c\xf3 Linux server"}),(0,r.jsx)("p",{className:"mt-2 max-w-lg text-sm leading-6 text-text-muted",children:"Th\xeam server bằng t\xe0i khoản SSH c\xf3 quyền sudo. BlueRouter sẽ tự c\xe0i agent systemd v\xe0 bắt đầu hiển thị t\xe0i nguy\xean ngay tại đ\xe2y."}),es?null:(0,r.jsx)(b.default,{className:"mt-6",icon:"add",onClick:()=>y(!0),children:"Th\xeam server đầu ti\xean"})]}),(0,r.jsx)(K,{open:v&&!es,onClose:()=>y(!1),onCreated:async(e,t)=>{t&&!t.ok&&H({type:"warning",text:"Đ\xe3 lưu server nhưng c\xe0i agent chưa th\xe0nh c\xf4ng. Mở server để xem log."}),await ep()}}),(0,r.jsx)(G,{open:A&&!es,server:ej,onClose:()=>D(!1),onUpdated:async(e,t)=>{t&&!t.ok&&H({type:"warning",text:"Đ\xe3 lưu server nhưng c\xe0i lại agent chưa th\xe0nh c\xf4ng. Mở server để xem log."}),await ep()}}),(0,r.jsx)(f.ConfirmModal,{isOpen:!!_,onClose:()=>L(null),onConfirm:ek,loading:B,variant:"danger",title:"X\xf3a server khỏi dashboard?",confirmText:"X\xf3a server",cancelText:"Hủy",message:"Server sẽ ngừng được theo d\xf5i. Agent systemd tr\xean Linux kh\xf4ng bị gỡ tự động."})]})}},92542:(e,t,s)=>{"use strict";s.d(t,{default:()=>i});var r=s(95155),a=s(31474);let l={primary:"bg-brand-500 hover:bg-brand-600 text-white shadow-sm disabled:bg-surface-3 disabled:text-text-muted",secondary:"bg-surface-2 hover:bg-surface-3 text-text-main border border-border disabled:opacity-50",outline:"border border-border text-text-main hover:bg-surface-2 hover:border-brand-500/40",ghost:"text-text-muted hover:bg-surface-2 hover:text-text-main",danger:"bg-red-500 hover:bg-red-600 text-white shadow-sm disabled:bg-surface-3 disabled:text-text-muted",success:"bg-green-600 hover:bg-green-700 text-white shadow-sm disabled:bg-surface-3 disabled:text-text-muted"},n={sm:"h-7 px-3 text-xs rounded-[8px]",md:"h-9 px-4 text-sm rounded-[10px]",lg:"h-11 px-6 text-sm rounded-[10px]"};function i({children:e,variant:t="primary",size:s="md",icon:d,iconRight:o,disabled:c=!1,loading:x=!1,fullWidth:m=!1,className:u,...h}){return(0,r.jsxs)("button",{className:(0,a.cn)("inline-flex items-center justify-center gap-2 font-semibold transition-all duration-150 ease-out cursor-pointer","active:scale-[0.97] disabled:opacity-50 disabled:cursor-not-allowed disabled:active:scale-100",l[t],n[s],m&&"w-full",u),disabled:c||x,...h,children:[x?(0,r.jsx)("span",{className:"material-symbols-outlined animate-spin text-[18px]",children:"progress_activity"}):d?(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:d}):null,e,o&&!x&&(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:o})]})}},96413:(e,t,s)=>{Promise.resolve().then(s.bind(s,86243))},97677:(e,t,s)=>{"use strict";s.d(t,{default:()=>a});var r=s(95155);function a({text:e,children:t,position:s="top",color:l}){let n=l?"":"bg-gray-900";return(0,r.jsxs)("div",{className:"relative inline-flex group",children:[t,(0,r.jsx)("div",{className:`pointer-events-none absolute ${{top:"bottom-full left-1/2 -translate-x-1/2 mb-1.5",bottom:"top-full left-1/2 -translate-x-1/2 mt-1.5",left:"right-full top-1/2 -translate-y-1/2 mr-1.5",right:"left-full top-1/2 -translate-y-1/2 ml-1.5"}[s]} z-50 w-max max-w-56 rounded px-2 py-1 text-[11px] leading-snug ${n} text-white opacity-0 group-hover:opacity-100 transition-opacity duration-150 whitespace-normal`,style:l?{backgroundColor:l}:{},children:e})]})}}},e=>{e.O(0,[506,6483,8441,3794,7358],()=>e(e.s=96413)),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1205],{98:(e,t,s)=>{"use strict";s.d(t,{default:()=>l});var r=s(95155),a=s(31474);function l({label:e,options:t=[],value:s,onChange:n,placeholder:i="Select an option",error:d,hint:o,disabled:c=!1,required:x=!1,className:m,selectClassName:u,...h}){return(0,r.jsxs)("div",{className:(0,a.cn)("flex flex-col gap-1.5",m),children:[e&&(0,r.jsxs)("label",{className:"text-sm font-medium text-text-main",children:[e,x&&(0,r.jsx)("span",{className:"text-red-500 ml-1",children:"*"})]}),(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsxs)("select",{value:s,onChange:n,disabled:c,className:(0,a.cn)("w-full py-2.5 px-3 pr-10 text-sm text-text-main","bg-surface-2 border border-transparent rounded-[10px] appearance-none","focus:outline-none focus:ring-2 focus:ring-brand-500/30 focus:border-brand-500/40","transition-all duration-150 disabled:opacity-50 disabled:cursor-not-allowed","text-[16px] sm:text-sm",d&&"ring-1 ring-red-500 focus:ring-2 focus:ring-red-500/40 border-red-500/40",u),...h,children:[(0,r.jsx)("option",{value:"",disabled:!0,children:i}),function(e){let t=new Map,s=[];for(let r of e){if(!r.group){s.push(r);continue}t.has(r.group)||t.set(r.group,[]),t.get(r.group).push(r)}let a=[];for(let[e,s]of t)a.push((0,r.jsx)("optgroup",{label:e,children:s.map(e=>(0,r.jsx)("option",{value:e.value,children:e.label},e.value))},e));for(let e of s)a.push((0,r.jsx)("option",{value:e.value,children:e.label},e.value));return a}(t)]}),(0,r.jsx)("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none text-text-muted",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"expand_more"})})]}),d&&(0,r.jsxs)("p",{className:"text-xs text-red-500 flex items-center gap-1",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"error"}),d]}),o&&!d&&(0,r.jsx)("p",{className:"text-xs text-text-muted",children:o})]})}},11910:(e,t,s)=>{"use strict";s.d(t,{default:()=>l});var r=s(95155),a=s(31474);function l({label:e,type:t="text",placeholder:s,value:n,onChange:i,error:d,hint:o,icon:c,disabled:x=!1,required:m=!1,className:u,inputClassName:h,...p}){return(0,r.jsxs)("div",{className:(0,a.cn)("flex flex-col gap-1.5",u),children:[e&&(0,r.jsxs)("label",{className:"text-sm font-medium text-text-main",children:[e,m&&(0,r.jsx)("span",{className:"text-red-500 ml-1",children:"*"})]}),(0,r.jsxs)("div",{className:"relative",children:[c&&(0,r.jsx)("div",{className:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none text-text-muted",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:c})}),(0,r.jsx)("input",{type:t,placeholder:s,value:n,onChange:i,disabled:x,className:(0,a.cn)("w-full py-2.5 px-3 text-sm text-text-main bg-surface-2 rounded-[10px]","border border-transparent placeholder-text-muted/70","focus:outline-none focus:ring-2 focus:ring-brand-500/30 focus:border-brand-500/40","transition-all duration-150 ease-out disabled:opacity-50 disabled:cursor-not-allowed","text-[16px] sm:text-sm",c&&"pl-10",d&&"ring-1 ring-red-500 focus:ring-2 focus:ring-red-500/40 border-red-500/40",h),...p})]}),d&&(0,r.jsxs)("p",{className:"text-xs text-red-500 flex items-center gap-1",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"error"}),d]}),o&&!d&&(0,r.jsx)("p",{className:"text-xs text-text-muted",children:o})]})}},31474:(e,t,s)=>{"use strict";function r(...e){return e.filter(Boolean).join(" ").replace(/\s+/g," ").trim()}s.d(t,{cn:()=>r})},56061:(e,t,s)=>{"use strict";s.d(t,{default:()=>i});var r=s(95155),a=s(31474);let l={default:"bg-surface-2 text-text-muted",primary:"bg-brand-500/10 text-brand-600 dark:text-brand-300",success:"bg-green-500/10 text-green-600 dark:text-green-400",warning:"bg-yellow-500/10 text-yellow-600 dark:text-yellow-400",error:"bg-red-500/10 text-red-600 dark:text-red-400",info:"bg-blue-500/10 text-blue-600 dark:text-blue-400"},n={sm:"px-2 py-0.5 text-[10px]",md:"px-2.5 py-1 text-xs",lg:"px-3 py-1.5 text-sm"};function i({children:e,variant:t="default",size:s="md",dot:d=!1,icon:o,className:c}){return(0,r.jsxs)("span",{className:(0,a.cn)("inline-flex items-center gap-1.5 rounded-full font-semibold",l[t],n[s],c),children:[d&&(0,r.jsx)("span",{className:(0,a.cn)("size-1.5 rounded-full","success"===t&&"bg-green-500","warning"===t&&"bg-yellow-500","error"===t&&"bg-red-500","info"===t&&"bg-blue-500","primary"===t&&"bg-brand-500","default"===t&&"bg-gray-500")}),o&&(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:o}),e]})}},81127:(e,t,s)=>{"use strict";s.d(t,{ConfirmModal:()=>m,default:()=>x});var r=s(95155),a=s(12115),l=s(31474),n=s(92542),i=s(97677);let d=[],o="";function c(){1===d.length?(o=document.body.style.overflow,document.body.style.overflow="hidden"):0===d.length&&(document.body.style.overflow=o)}function x({isOpen:e,onClose:t,title:s,children:n,footer:o,size:m="md",closeOnOverlay:u=!0,showTrafficLights:h=!0,busy:p=!1,className:b}){let g=(0,a.useRef)({onClose:t,busy:p});return(g.current.onClose=t,g.current.busy=p,(0,a.useEffect)(()=>{if(!e)return;let t=g.current;d.push(t),c();let s=e=>{if("Escape"!==e.key)return;let s=d[d.length-1];s!==t||s.busy||(e.preventDefault(),s.onClose())};return document.addEventListener("keydown",s),()=>{document.removeEventListener("keydown",s);let e=d.indexOf(t);-1!==e&&d.splice(e,1),c()}},[e]),e)?(0,r.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[(0,r.jsx)("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-[2px] fade-in",onClick:u&&!p?t:void 0}),(0,r.jsxs)("div",{className:(0,l.cn)("relative w-full bg-surface","border border-border-subtle","rounded-[14px] shadow-[var(--shadow-elev)]","fade-in",{sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl",full:"max-w-4xl"}[m],b),children:[(s||h)&&(0,r.jsxs)("div",{className:"flex items-center justify-between p-2 border-b border-border-subtle",children:[(0,r.jsxs)("div",{className:"flex items-center",children:[h&&(0,r.jsxs)("div",{className:"hidden md:flex items-center gap-2 mr-4 ml-2",children:[(0,r.jsx)(i.default,{text:"Close",position:"top",color:"#FF5F56",children:(0,r.jsx)("button",{onClick:t,disabled:p,"aria-label":"Close",title:"Close",className:"w-4 h-4 rounded-full bg-[#FF5F56] hover:brightness-90 transition-all cursor-pointer flex items-center justify-center group/dot disabled:cursor-not-allowed disabled:opacity-50",children:(0,r.jsx)("span",{className:"text-[9px] font-bold text-white opacity-0 group-hover/dot:opacity-100 transition-opacity leading-none",children:"✕"})})}),(0,r.jsx)("div",{className:"w-4 h-4 rounded-full bg-[#3a3a3a]/20 dark:bg-white/15 cursor-not-allowed"}),(0,r.jsx)("div",{className:"w-4 h-4 rounded-full bg-[#3a3a3a]/20 dark:bg-white/15 cursor-not-allowed"})]}),s&&(0,r.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:s})]}),(0,r.jsx)("button",{onClick:t,disabled:p,"aria-label":"Close",className:"md:hidden p-1.5 rounded-[10px] text-text-muted hover:bg-surface-2 hover:text-text-main transition-colors disabled:cursor-not-allowed disabled:opacity-50",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"close"})})]}),(0,r.jsx)("div",{className:"p-6 max-h-[calc(85vh-100px)] overflow-y-auto custom-scrollbar",children:n}),o&&(0,r.jsx)("div",{className:"flex items-center justify-end gap-3 p-6 border-t border-border-subtle",children:o})]})]}):null}function m({isOpen:e,onClose:t,onConfirm:s,title:a="Confirm",message:l,confirmText:i="Confirm",cancelText:d="Cancel",variant:o="danger",loading:c=!1}){return(0,r.jsx)(x,{isOpen:e,onClose:t,title:a,size:"sm",busy:c,footer:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.default,{variant:"ghost",onClick:t,disabled:c,children:d}),(0,r.jsx)(n.default,{variant:o,onClick:s,loading:c,children:i})]}),children:(0,r.jsx)("p",{className:"text-text-muted",children:l})})}},86243:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>z});var r=s(95155),a=s(12115),l=s(1728),n=s(90639),i=s(28408),d=s(32539),o=s(59656),c=s(65671),x=s(34122),m=s(16746),u=s(96647),h=s(29010),p=s(56061),b=s(92542),g=s(11910),f=s(81127),j=s(98);let v={name:"",host:"",sshPort:"22",sshUser:"",sshPassword:"",useSudo:!0,sudoPassword:"",agentPort:"19998",installAgent:!0};function y(e){return{name:e?.name||"",host:e?.host||"",sshPort:String(e?.sshPort||22),sshUser:e?.sshUser||"",sshPassword:"",useSudo:e?.useSudo!==!1,sudoPassword:"",agentPort:String(e?.agentPort||19998),installAgent:!0}}function N(e){var t;let s;return!!e?.lastStatus&&(!e.lastError||Date.now()-(Number.isFinite(s=(t=e?.lastStatusAt)?new Date(t).getTime():0)?s:0)<=3e4)}function w(e){return Math.max(0,Math.min(100,Number(e)||0))}function k(e,t=1){let s=Number(e)||0;if(!s)return"0 B";let r=["B","KB","MB","GB","TB","PB"],a=Math.min(r.length-1,Math.floor(Math.log(s)/Math.log(1024)));return`${(s/1024**a).toFixed(a>2?t:0)} ${r[a]}`}function S(e){return e?new Date(e).toLocaleTimeString("vi-VN",{hour12:!1}):"--:--:--"}function C({value:e,label:t,detail:s,color:a="var(--color-brand-500)",icon:l}){let n=w(e),i=2*Math.PI*49;return(0,r.jsxs)("div",{className:"flex min-w-0 flex-col items-center",children:[(0,r.jsxs)("div",{className:"relative h-36 w-36",children:[(0,r.jsxs)("svg",{className:"h-full w-full -rotate-90",viewBox:"0 0 120 120","aria-hidden":"true",children:[(0,r.jsx)("circle",{cx:"60",cy:"60",r:49,fill:"none",stroke:"var(--color-surface-2)",strokeWidth:"8"}),(0,r.jsx)("circle",{cx:"60",cy:"60",r:49,fill:"none",stroke:a,strokeWidth:"8",strokeLinecap:"round",strokeDasharray:i,strokeDashoffset:i*(1-n/100),className:"transition-all duration-700"})]}),(0,r.jsxs)("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-center",children:[l?(0,r.jsx)("span",{className:"material-symbols-outlined mb-0.5 text-[19px] text-text-muted",children:l}):null,(0,r.jsxs)("strong",{className:"text-2xl font-semibold tracking-tight text-text-main",children:[n.toFixed(+(n<10)),"%"]}),(0,r.jsx)("span",{className:"mt-0.5 text-xs font-medium text-text-muted",children:t})]})]}),(0,r.jsx)("div",{className:"mt-2 max-w-full truncate text-center text-xs text-text-subtle",title:s,children:s})]})}function P({online:e}){return(0,r.jsx)("span",{className:`h-2.5 w-2.5 shrink-0 rounded-full ${e?"bg-emerald-500 shadow-[0_0_0_4px_rgba(16,185,129,.12)]":"bg-red-400 shadow-[0_0_0_4px_rgba(248,113,113,.12)]"}`})}function $({servers:e,selectedId:t,onSelect:s}){return(0,r.jsx)("div",{className:"flex gap-3 overflow-x-auto pb-1 scroll-thin-x",children:e.map(e=>{let a=e.id===t,l=N(e);return(0,r.jsxs)("button",{type:"button",onClick:()=>s(e.id),className:`min-w-[240px] rounded-2xl border p-4 text-left transition ${a?"border-primary bg-primary/5 shadow-[var(--shadow-warm)]":"border-border bg-surface hover:border-primary/40"}`,children:[(0,r.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(P,{online:l}),(0,r.jsx)("div",{className:"truncate font-semibold text-text-main",children:e.name})]}),(0,r.jsxs)("div",{className:"mt-1.5 truncate font-mono text-xs text-text-muted",children:[e.host,":",e.agentPort]})]}),(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px] text-text-subtle",children:"dns"})]}),(0,r.jsxs)("div",{className:"mt-3 flex items-center justify-between text-xs text-text-muted",children:[(0,r.jsx)("span",{children:l?"Đang hoạt động":"Mất kết nối"}),(0,r.jsx)("span",{children:S(e.lastStatusAt)})]})]},e.id)})})}function U({icon:e,label:t,value:s,sublabel:a,colorClass:l="text-primary",children:n}){return(0,r.jsxs)("div",{className:"rounded-2xl border border-border bg-surface p-4 shadow-[var(--shadow-soft)]",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)("div",{className:`flex h-10 w-10 items-center justify-center rounded-xl bg-surface-2 ${l}`,children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[22px]",children:e})}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("div",{className:"text-xs font-medium uppercase tracking-wider text-text-muted",children:t}),(0,r.jsx)("div",{className:"mt-0.5 truncate text-lg font-semibold text-text-main",children:s})]})]}),a?(0,r.jsx)("div",{className:"mt-3 truncate text-xs text-text-subtle",children:a}):null,n]})}function M({data:e,dataKey:t,label:s,color:a,unit:m="%"}){return(0,r.jsxs)("div",{className:"rounded-2xl border border-border bg-surface p-5 shadow-[var(--shadow-soft)]",children:[(0,r.jsxs)("div",{className:"mb-4 flex items-center justify-between",children:[(0,r.jsx)("h3",{className:"font-semibold text-text-main",children:s}),(0,r.jsx)("span",{className:"text-xs text-text-muted",children:"60 mẫu gần nhất"})]}),(0,r.jsx)("div",{className:"h-44",children:(0,r.jsx)(l.u,{width:"100%",height:"100%",children:(0,r.jsxs)(n.Q,{data:e,margin:{top:6,right:4,left:-22,bottom:0},children:[(0,r.jsx)("defs",{children:(0,r.jsxs)("linearGradient",{id:`fill-${t}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,r.jsx)("stop",{offset:"0%",stopColor:a,stopOpacity:.3}),(0,r.jsx)("stop",{offset:"100%",stopColor:a,stopOpacity:.02})]})}),(0,r.jsx)(i.d,{stroke:"var(--color-border-subtle)",strokeDasharray:"4 4",vertical:!1}),(0,r.jsx)(d.W,{dataKey:"time",hide:!0}),(0,r.jsx)(o.h,{domain:[0,"auto"],tick:{fill:"var(--color-text-subtle)",fontSize:11},axisLine:!1,tickLine:!1}),(0,r.jsx)(c.m,{contentStyle:{background:"var(--color-surface)",border:"1px solid var(--color-border)",borderRadius:12,fontSize:12},formatter:e=>[`${Number(e).toFixed(1)}${m}`,s]}),(0,r.jsx)(x.Gk,{type:"monotone",dataKey:t,stroke:a,fill:`url(#fill-${t})`,strokeWidth:2.2,dot:!1,isAnimationActive:!1})]})})})]})}let T=["#10b981","#06b6d4","#8b5cf6","#f59e0b","#ef4444","#3b82f6","#ec4899","#84cc16"];function A(e){return e?.uuid||`index-${e?.index??0}`}function I({data:e,gpus:t}){let s=(t||[]).map((e,t)=>({id:A(e),dataKey:`gpu${t}`,name:`GPU ${e.index} \xb7 ${e.name}`,color:T[t%T.length]})),a=e.map(e=>{let t={time:e.time};return s.forEach(s=>{let r=e.gpus?.find(e=>e.id===s.id);t[s.dataKey]=r?.usagePercent??null}),t});return(0,r.jsxs)("div",{className:"mb-5 rounded-2xl border border-border bg-surface p-5 shadow-[var(--shadow-soft)]",children:[(0,r.jsxs)("div",{className:"mb-4 flex flex-wrap items-start justify-between gap-2",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h4",{className:"font-semibold text-text-main",children:"GPU usage history"}),(0,r.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:"Mỗi đường biểu diễn mức tải realtime của một NVIDIA GPU."})]}),(0,r.jsx)("span",{className:"rounded-full bg-emerald-500/10 px-2.5 py-1 text-xs font-medium text-emerald-600 dark:text-emerald-400",children:"60 mẫu gần nhất"})]}),(0,r.jsx)("div",{className:"h-64",children:(0,r.jsx)(l.u,{width:"100%",height:"100%",children:(0,r.jsxs)(m.b,{data:a,margin:{top:8,right:12,left:-16,bottom:2},children:[(0,r.jsx)(i.d,{stroke:"var(--color-border-subtle)",strokeDasharray:"4 4",vertical:!1}),(0,r.jsx)(d.W,{dataKey:"time",tickFormatter:S,minTickGap:36,tick:{fill:"var(--color-text-subtle)",fontSize:11},axisLine:!1,tickLine:!1}),(0,r.jsx)(o.h,{domain:[0,100],ticks:[0,25,50,75,100],tickFormatter:e=>`${e}%`,tick:{fill:"var(--color-text-subtle)",fontSize:11},axisLine:!1,tickLine:!1}),(0,r.jsx)(c.m,{contentStyle:{background:"var(--color-surface)",border:"1px solid var(--color-border)",borderRadius:12,fontSize:12},labelFormatter:e=>`Thời gian ${S(e)}`,formatter:(e,t)=>[`${Number(e).toFixed(1)}%`,t]}),(0,r.jsx)(u.s,{iconType:"circle",iconSize:8,wrapperStyle:{fontSize:12,paddingTop:12},formatter:e=>(0,r.jsx)("span",{className:"text-text-muted",children:e})}),s.map(e=>(0,r.jsx)(h.N1,{type:"monotone",dataKey:e.dataKey,name:e.name,stroke:e.color,strokeWidth:2.4,dot:!1,connectNulls:!1,isAnimationActive:!1},e.id))]})})})]})}let D=[{value:"1h",label:"1 giờ"},{value:"6h",label:"6 giờ"},{value:"24h",label:"24 giờ"},{value:"7d",label:"7 ng\xe0y"},{value:"30d",label:"30 ng\xe0y"}];function _(e){return e?new Date(e).toLocaleString("vi-VN",{day:"2-digit",month:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!1}):"—"}function L({title:e,description:t,data:s,series:a,domain:n=[0,100],valueFormatter:x=e=>`${Number(e).toFixed(1)}%`,axisFormatter:p=e=>`${e}%`}){return(0,r.jsxs)("div",{className:"rounded-2xl border border-border bg-surface p-5 shadow-[var(--shadow-soft)]",children:[(0,r.jsxs)("div",{className:"mb-4",children:[(0,r.jsx)("h4",{className:"font-semibold text-text-main",children:e}),t?(0,r.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:t}):null]}),(0,r.jsx)("div",{className:"h-64",children:(0,r.jsx)(l.u,{width:"100%",height:"100%",children:(0,r.jsxs)(m.b,{data:s,margin:{top:8,right:12,left:-8,bottom:2},children:[(0,r.jsx)(i.d,{stroke:"var(--color-border-subtle)",strokeDasharray:"4 4",vertical:!1}),(0,r.jsx)(d.W,{dataKey:"time",tickFormatter:_,minTickGap:48,tick:{fill:"var(--color-text-subtle)",fontSize:10},axisLine:!1,tickLine:!1}),(0,r.jsx)(o.h,{domain:n,tickFormatter:p,width:58,tick:{fill:"var(--color-text-subtle)",fontSize:10},axisLine:!1,tickLine:!1}),(0,r.jsx)(c.m,{contentStyle:{background:"var(--color-surface)",border:"1px solid var(--color-border)",borderRadius:12,fontSize:12},labelFormatter:e=>_(e),formatter:(e,t)=>[x(e),t]}),(0,r.jsx)(u.s,{iconType:"circle",iconSize:8,wrapperStyle:{fontSize:12,paddingTop:12},formatter:e=>(0,r.jsx)("span",{className:"text-text-muted",children:e})}),a.map(e=>(0,r.jsx)(h.N1,{type:"monotone",dataKey:e.key,name:e.name,stroke:e.color,strokeWidth:2.2,dot:!1,connectNulls:!1,isAnimationActive:!1},e.key))]})})})]})}function F({server:e,data:t,meta:s,period:l,onPeriodChange:n,loading:i,error:d}){let o=(0,a.useMemo)(()=>{let e=new Map;return t.forEach(t=>{(t.gpus||[]).forEach(t=>{e.has(t.id)||e.set(t.id,t)})}),[...e.values()].map((e,t)=>({id:e.id,key:`gpu${t}`,name:`GPU ${e.index} \xb7 ${e.name}`,color:T[t%T.length]}))},[t]),c=(0,a.useCallback)(e=>t.map(t=>{let s={time:t.time};return o.forEach(r=>{let a=t.gpus?.find(e=>e.id===r.id);s[r.key]=a?.[e]??null}),s}),[t,o]);return(0,r.jsxs)("section",{className:"overflow-hidden rounded-3xl border border-border bg-surface shadow-[var(--shadow-soft)]",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-4 border-b border-border px-6 py-5",children:[(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-4",children:[(0,r.jsx)("div",{className:"flex h-12 w-12 items-center justify-center rounded-2xl bg-violet-500/10 text-violet-500",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[27px]",children:"monitoring"})}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsxs)("h3",{className:"truncate text-lg font-semibold text-text-main",children:["Lịch sử \xb7 ",e.name]}),(0,r.jsxs)("p",{className:"mt-1 text-xs text-text-muted",children:["Sample mỗi ph\xfat \xb7 lưu tối đa ",s?.retentionDays||30," ng\xe0y"]})]})]}),(0,r.jsx)("div",{className:"flex flex-wrap gap-1 rounded-xl bg-surface-2 p-1",children:D.map(e=>(0,r.jsx)("button",{type:"button",onClick:()=>n(e.value),className:`rounded-lg px-3 py-2 text-xs font-semibold transition ${l===e.value?"bg-surface text-primary shadow-sm":"text-text-muted hover:text-text-main"}`,children:e.label},e.value))})]}),i?(0,r.jsxs)("div",{className:"flex min-h-[420px] items-center justify-center text-sm text-text-muted",children:[(0,r.jsx)("span",{className:"material-symbols-outlined mr-2 animate-spin",children:"progress_activity"}),"Đang tải dữ liệu lịch sử..."]}):d?(0,r.jsx)("div",{className:"m-6 rounded-2xl border border-red-500/20 bg-red-500/10 p-5 text-sm text-red-600 dark:text-red-300",children:d}):t.length?(0,r.jsxs)("div",{className:"space-y-5 p-6",children:[(0,r.jsxs)("div",{className:"grid gap-4 sm:grid-cols-3",children:[(0,r.jsx)(U,{icon:"database",label:"Số điểm hiển thị",value:t.length.toLocaleString("vi-VN"),sublabel:`Bucket ${s?.bucketMinutes||1} ph\xfat`,colorClass:"text-violet-500"}),(0,r.jsx)(U,{icon:"date_range",label:"Từ thời điểm",value:_(t[0]?.time),sublabel:"Điểm đầu ti\xean trong khoảng đ\xe3 chọn",colorClass:"text-cyan-500"}),(0,r.jsx)(U,{icon:"memory",label:"NVIDIA GPU",value:`${o.length} card`,sublabel:"Theo d\xf5i ri\xeang bằng GPU UUID",colorClass:"text-emerald-500"})]}),(0,r.jsxs)("div",{className:"grid gap-5 xl:grid-cols-2",children:[(0,r.jsx)(L,{title:"CPU, RAM & Disk usage",description:"Tỷ lệ sử dụng t\xe0i nguy\xean hệ thống theo thời gian.",data:t,series:[{key:"cpu",name:"CPU",color:"#3b9dec"},{key:"memory",name:"RAM",color:"#8b5cf6"},{key:"disk",name:"Disk",color:"#f59e0b"}]}),(0,r.jsx)(L,{title:"Network throughput",description:"Tốc độ nhận v\xe0 gửi trung b\xecnh trong mỗi bucket.",data:t,domain:[0,"auto"],series:[{key:"networkRxBps",name:"Download",color:"#06b6d4"},{key:"networkTxBps",name:"Upload",color:"#ec4899"}],valueFormatter:e=>`${k(e)}/s`,axisFormatter:e=>k(e)})]}),o.length?(0,r.jsxs)("div",{className:"grid gap-5 xl:grid-cols-2",children:[(0,r.jsx)(L,{title:"NVIDIA GPU usage",description:"Mức tải của từng GPU, ph\xe2n biệt theo UUID.",data:c("usagePercent"),series:o}),(0,r.jsx)(L,{title:"GPU VRAM usage",description:"Phần trăm VRAM đ\xe3 sử dụng tr\xean từng card.",data:c("memoryUsagePercent"),series:o}),(0,r.jsx)(L,{title:"GPU temperature",description:"Nhiệt độ trung b\xecnh của từng card trong mỗi bucket.",data:c("temperatureC"),domain:[0,"auto"],series:o,valueFormatter:e=>`${Number(e).toFixed(1)}\xb0C`,axisFormatter:e=>`${e}\xb0`}),(0,r.jsx)(L,{title:"GPU power draw",description:"C\xf4ng suất ti\xeau thụ trung b\xecnh của từng card.",data:c("powerDrawW"),domain:[0,"auto"],series:o,valueFormatter:e=>`${Number(e).toFixed(1)} W`,axisFormatter:e=>`${e}W`})]}):null]}):(0,r.jsxs)("div",{className:"flex min-h-[420px] flex-col items-center justify-center px-6 text-center",children:[(0,r.jsx)("div",{className:"flex h-16 w-16 items-center justify-center rounded-2xl bg-violet-500/10 text-violet-500",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[34px]",children:"hourglass_empty"})}),(0,r.jsx)("h4",{className:"mt-5 font-semibold text-text-main",children:"Chưa c\xf3 dữ liệu lịch sử"}),(0,r.jsx)("p",{className:"mt-2 max-w-md text-sm leading-6 text-text-muted",children:"Collector đ\xe3 được bật v\xe0 sẽ ghi mẫu đầu ti\xean trong v\xf2ng một ph\xfat. Dữ liệu vẫn tiếp tục được thu thập khi kh\xf4ng mở dashboard."})]})]})}function E({gpu:e}){let t=w(e.memoryUsagePercent);return(0,r.jsxs)("div",{className:"overflow-hidden rounded-2xl border border-border bg-surface shadow-[var(--shadow-soft)]",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between border-b border-border-subtle bg-gradient-to-r from-emerald-500/8 to-cyan-500/5 px-5 py-4",children:[(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,r.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-xl bg-emerald-500/10 text-emerald-500",children:(0,r.jsx)("span",{className:"material-symbols-outlined",children:"memory"})}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsxs)("div",{className:"truncate font-semibold text-text-main",children:["GPU ",e.index," \xb7 ",e.name]}),(0,r.jsxs)("div",{className:"mt-0.5 text-xs text-text-muted",children:["NVIDIA Driver ",e.driverVersion||"—"]})]})]}),(0,r.jsx)("span",{className:"rounded-full bg-emerald-500/10 px-2.5 py-1 text-xs font-semibold text-emerald-600 dark:text-emerald-400",children:"NVIDIA"})]}),(0,r.jsxs)("div",{className:"grid gap-5 p-5 sm:grid-cols-[150px_1fr]",children:[(0,r.jsx)(C,{value:e.usagePercent,label:"GPU Load",detail:`${e.temperatureC??"—"}\xb0C`,color:"#10b981"}),(0,r.jsxs)("div",{className:"space-y-5",children:[(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"mb-2 flex items-center justify-between text-sm",children:[(0,r.jsx)("span",{className:"text-text-muted",children:"VRAM"}),(0,r.jsxs)("span",{className:"font-semibold text-text-main",children:[k(1048576*(e.memoryUsedMb||0))," /"," ",k(1048576*(e.memoryTotalMb||0))]})]}),(0,r.jsx)("div",{className:"h-2.5 overflow-hidden rounded-full bg-surface-2",children:(0,r.jsx)("div",{className:"h-full rounded-full bg-emerald-500 transition-all duration-700",style:{width:`${t}%`}})}),(0,r.jsxs)("div",{className:"mt-1.5 text-right text-xs text-text-subtle",children:[t.toFixed(1),"% đ\xe3 d\xf9ng"]})]}),(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,r.jsxs)("div",{className:"rounded-xl bg-surface-2 p-3",children:[(0,r.jsx)("div",{className:"text-xs text-text-muted",children:"Nhiệt độ"}),(0,r.jsxs)("div",{className:"mt-1 text-lg font-semibold text-text-main",children:[e.temperatureC??"—","\xb0C"]})]}),(0,r.jsxs)("div",{className:"rounded-xl bg-surface-2 p-3",children:[(0,r.jsx)("div",{className:"text-xs text-text-muted",children:"C\xf4ng suất"}),(0,r.jsxs)("div",{className:"mt-1 text-lg font-semibold text-text-main",children:[e.powerDrawW??"—",(0,r.jsxs)("span",{className:"text-xs font-normal text-text-muted",children:[" ","/ ",e.powerLimitW??"—"," W"]})]})]})]})]})]})]})}function K({open:e,onClose:t,onCreated:s}){let[l,n]=(0,a.useState)(v),[i,d]=(0,a.useState)(!1),[o,c]=(0,a.useState)(""),x=(e,t)=>n(s=>({...s,[e]:t}));(0,a.useEffect)(()=>{e&&(n(v),c(""))},[e]);let m=async e=>{e.preventDefault(),d(!0),c("");try{let e=await fetch("/api/resource-monitor",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)}),r=await e.json().catch(()=>({}));if(!e.ok)throw Error(r.error||"Kh\xf4ng thể th\xeam server");await s(r.server,r.install),t()}catch(e){c(e?.message||"Kh\xf4ng thể th\xeam server")}finally{d(!1)}};return(0,r.jsx)(f.default,{isOpen:e,onClose:t,title:"Th\xeam Linux server",size:"xl",busy:i,footer:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(b.default,{variant:"ghost",onClick:t,disabled:i,children:"Hủy"}),(0,r.jsx)(b.default,{onClick:m,loading:i,icon:"rocket_launch",children:"C\xe0i agent & th\xeam server"})]}),children:(0,r.jsxs)("form",{onSubmit:m,className:"space-y-5",children:[(0,r.jsx)("div",{className:"rounded-xl border border-primary/20 bg-primary/5 p-4 text-sm text-text-muted",children:(0,r.jsxs)("div",{className:"flex gap-3",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary",children:"auto_fix_high"}),(0,r.jsx)("p",{children:"BlueRouter sẽ SSH v\xe0o m\xe1y, d\xf9ng quyền sudo để c\xe0i Python agent dưới dạng systemd service. Sau lần n\xe0y bạn kh\xf4ng cần thao t\xe1c th\xeam tr\xean Linux."})]})}),(0,r.jsxs)("div",{className:"grid gap-4 sm:grid-cols-2",children:[(0,r.jsx)(g.default,{label:"T\xean hiển thị",value:l.name,onChange:e=>x("name",e.target.value),placeholder:"GPU Worker 01",icon:"dns"}),(0,r.jsx)(g.default,{required:!0,label:"Hostname / IP",value:l.host,onChange:e=>x("host",e.target.value),placeholder:"192.168.1.50",icon:"lan"}),(0,r.jsx)(g.default,{required:!0,label:"SSH user",value:l.sshUser,onChange:e=>x("sshUser",e.target.value),placeholder:"ubuntu",icon:"person"}),(0,r.jsx)(g.default,{label:"SSH port",type:"number",value:l.sshPort,onChange:e=>x("sshPort",e.target.value)}),(0,r.jsx)(g.default,{label:"SSH password",type:"password",value:l.sshPassword,onChange:e=>x("sshPassword",e.target.value),placeholder:"Để trống nếu d\xf9ng SSH key",hint:"Chỉ d\xf9ng trong l\xfac c\xe0i, kh\xf4ng lưu v\xe0o database."}),(0,r.jsx)(g.default,{label:"Agent port",type:"number",value:l.agentPort,onChange:e=>x("agentPort",e.target.value),hint:"Mặc định 19998; dashboard server phải truy cập được port n\xe0y."})]}),(0,r.jsxs)("label",{className:"flex cursor-pointer items-start gap-3 rounded-xl border border-border bg-surface-2/60 p-4",children:[(0,r.jsx)("input",{type:"checkbox",checked:l.useSudo,onChange:e=>x("useSudo",e.target.checked),className:"mt-1 h-4 w-4"}),(0,r.jsxs)("span",{children:[(0,r.jsx)("span",{className:"block text-sm font-semibold text-text-main",children:"User cần sudo để c\xe0i service"}),(0,r.jsx)("span",{className:"mt-1 block text-xs text-text-muted",children:"Tắt nếu đăng nhập trực tiếp bằng root."})]})]}),l.useSudo?(0,r.jsx)(g.default,{label:"Sudo password",type:"password",value:l.sudoPassword,onChange:e=>x("sudoPassword",e.target.value),placeholder:"Mặc định d\xf9ng c\xf9ng SSH password"}):null,o?(0,r.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:o}):null]})})}function G({open:e,server:t,onClose:s,onUpdated:l}){let[n,i]=(0,a.useState)(y(t)),[d,o]=(0,a.useState)(!1),[c,x]=(0,a.useState)(""),m=(e,t)=>i(s=>({...s,[e]:t}));(0,a.useEffect)(()=>{e&&(i(y(t)),x(""))},[e,t]);let u=async e=>{if(e.preventDefault(),t?.id){o(!0),x("");try{let e=await fetch(`/api/resource-monitor/${t.id}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:n.name,host:n.host,sshPort:n.sshPort,sshUser:n.sshUser,useSudo:n.useSudo,agentPort:n.agentPort})}),r=await e.json().catch(()=>({}));if(!e.ok)throw Error(r.error||"Kh\xf4ng thể lưu server");let a=null;if(n.installAgent){let e=await fetch(`/api/resource-monitor/${t.id}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sshPassword:n.sshPassword,sudoPassword:n.sudoPassword})}),s=await e.json().catch(()=>({}));a={ok:e.ok&&!1!==s.ok,log:s.log,error:s.error}}await l(r.server,a),s()}catch(e){x(e?.message||"Kh\xf4ng thể cập nhật server")}finally{o(!1)}}};return(0,r.jsx)(f.default,{isOpen:e,onClose:s,title:"Sửa Linux server",size:"xl",busy:d,footer:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(b.default,{variant:"ghost",onClick:s,disabled:d,children:"Hủy"}),(0,r.jsx)(b.default,{onClick:u,loading:d,icon:"save",children:"Lưu & c\xe0i lại agent"})]}),children:(0,r.jsxs)("form",{onSubmit:u,className:"space-y-5",children:[(0,r.jsxs)("div",{className:"grid gap-4 sm:grid-cols-2",children:[(0,r.jsx)(g.default,{label:"T\xean hiển thị",value:n.name,onChange:e=>m("name",e.target.value),placeholder:"GPU Worker 01",icon:"dns"}),(0,r.jsx)(g.default,{required:!0,label:"Hostname / IP",value:n.host,onChange:e=>m("host",e.target.value),placeholder:"192.168.1.50",icon:"lan"}),(0,r.jsx)(g.default,{required:!0,label:"SSH user",value:n.sshUser,onChange:e=>m("sshUser",e.target.value),placeholder:"ubuntu",icon:"person"}),(0,r.jsx)(g.default,{label:"SSH port",type:"number",value:n.sshPort,onChange:e=>m("sshPort",e.target.value)}),(0,r.jsx)(g.default,{label:"SSH password",type:"password",value:n.sshPassword,onChange:e=>m("sshPassword",e.target.value),placeholder:"Nhập lại nếu trước đ\xf3 sai",hint:"Chỉ d\xf9ng để c\xe0i lại agent, kh\xf4ng lưu v\xe0o database."}),(0,r.jsx)(g.default,{label:"Agent port",type:"number",value:n.agentPort,onChange:e=>m("agentPort",e.target.value)})]}),(0,r.jsxs)("label",{className:"flex cursor-pointer items-start gap-3 rounded-xl border border-border bg-surface-2/60 p-4",children:[(0,r.jsx)("input",{type:"checkbox",checked:n.useSudo,onChange:e=>m("useSudo",e.target.checked),className:"mt-1 h-4 w-4"}),(0,r.jsxs)("span",{children:[(0,r.jsx)("span",{className:"block text-sm font-semibold text-text-main",children:"User cần sudo để c\xe0i service"}),(0,r.jsx)("span",{className:"mt-1 block text-xs text-text-muted",children:"Tắt nếu đăng nhập trực tiếp bằng root."})]})]}),n.useSudo?(0,r.jsx)(g.default,{label:"Sudo password",type:"password",value:n.sudoPassword,onChange:e=>m("sudoPassword",e.target.value),placeholder:"Mặc định d\xf9ng c\xf9ng SSH password"}):null,(0,r.jsxs)("label",{className:"flex cursor-pointer items-start gap-3 rounded-xl border border-border bg-surface-2/60 p-4",children:[(0,r.jsx)("input",{type:"checkbox",checked:n.installAgent,onChange:e=>m("installAgent",e.target.checked),className:"mt-1 h-4 w-4"}),(0,r.jsxs)("span",{children:[(0,r.jsx)("span",{className:"block text-sm font-semibold text-text-main",children:"C\xe0i lại agent sau khi lưu"}),(0,r.jsx)("span",{className:"mt-1 block text-xs text-text-muted",children:"Bật mục n\xe0y khi cần nhập lại account/password SSH hoặc đổi port."})]})]}),c?(0,r.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:c}):null]})})}let B={normal:{variant:"success",label:"B\xecnh thường"},warning:{variant:"warning",label:"Cảnh b\xe1o"},critical:{variant:"error",label:"Qu\xe1 tải"},unknown:{variant:"default",label:"Kh\xf4ng r\xf5"}};function R({modelOptions:e,selectedModel:t,onSelectModel:s,analysis:a,loading:l,error:n,onAnalyze:i,standby:d}){return(0,r.jsxs)("section",{className:"overflow-hidden rounded-3xl border border-border bg-surface shadow-[var(--shadow-soft)]",children:[(0,r.jsx)("div",{className:"flex flex-wrap items-center justify-between gap-4 border-b border-border px-6 py-5",children:(0,r.jsxs)("div",{className:"flex items-center gap-4",children:[(0,r.jsx)("div",{className:"flex h-12 w-12 items-center justify-center rounded-2xl bg-primary/10 text-primary",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[27px]",children:"neurology"})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"text-lg font-semibold text-text-main",children:"Đ\xe1nh gi\xe1 AI t\xecnh trạng server"}),(0,r.jsx)("p",{className:"mt-0.5 text-xs text-text-muted",children:"Ph\xe2n t\xedch giờ l\xe0m việc h\xf4m nay (8:00 - 18:00) tr\xean to\xe0n bộ Linux server."})]})]})}),(0,r.jsxs)("div",{className:"space-y-5 p-6",children:[d?(0,r.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,r.jsxs)("div",{className:"flex flex-wrap items-end gap-3",children:[(0,r.jsx)(j.default,{className:"min-w-[280px] flex-1",label:"AI model d\xf9ng để ph\xe2n t\xedch",options:e,value:t,onChange:e=>s(e.target.value),placeholder:e.length?"Chọn model":"Chưa c\xf3 kết nối AI n\xe0o đang hoạt động",disabled:!e.length||d}),(0,r.jsx)(b.default,{icon:"auto_awesome",onClick:i,loading:l,disabled:!t||d,children:"Ph\xe2n t\xedch lại"})]}),n?(0,r.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:n}):null,a?(0,r.jsxs)("div",{className:"space-y-5",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2 text-xs text-text-muted",children:[(0,r.jsxs)("span",{children:["Model: ",(0,r.jsx)("span",{className:"font-semibold",children:a.modelLabel})]}),(0,r.jsxs)("span",{children:["Cập nhật l\xfac ",S(a.generatedAt)]})]}),(0,r.jsx)("div",{className:"whitespace-pre-wrap rounded-2xl border border-border bg-surface-2/40 p-5 text-sm leading-6 text-text-main",children:a.summary}),a.servers?.length?(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"mb-3 flex items-center gap-2",children:[(0,r.jsx)("span",{className:"h-5 w-1 rounded-full bg-primary"}),(0,r.jsx)("h4",{className:"font-semibold text-text-main",children:"Trạng th\xe1i từng server"})]}),(0,r.jsx)("div",{className:"grid gap-3 sm:grid-cols-2 xl:grid-cols-3",children:a.servers.map(e=>{let t=B[e.status]||B.unknown;return(0,r.jsxs)("div",{className:"flex items-center justify-between rounded-xl border border-border bg-surface px-4 py-3",children:[(0,r.jsx)("span",{className:"truncate text-sm font-medium text-text-main",children:e.name}),(0,r.jsx)(p.default,{variant:t.variant,dot:!0,children:t.label})]},e.serverId)})})]}):null]}):l?null:(0,r.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.'})]})]})}function z(){let e,t,s,l,[n,i]=(0,a.useState)("realtime"),[d,o]=(0,a.useState)([]),[c,x]=(0,a.useState)(""),[m,u]=(0,a.useState)({}),[h,p]=(0,a.useState)(!0),[g,j]=(0,a.useState)(!1),[v,y]=(0,a.useState)(!1),[T,D]=(0,a.useState)(!1),[_,L]=(0,a.useState)(null),[B,z]=(0,a.useState)(!1),[O,H]=(0,a.useState)(null),[V,W]=(0,a.useState)("24h"),[q,J]=(0,a.useState)([]),[X,Q]=(0,a.useState)(null),[Y,Z]=(0,a.useState)(!1),[ee,et]=(0,a.useState)(""),[es,er]=(0,a.useState)(!1),[ea,el]=(0,a.useState)([]),[en,ei]=(0,a.useState)(""),[ed,eo]=(0,a.useState)(null),[ec,ex]=(0,a.useState)(!1),[em,eu]=(0,a.useState)(""),eh=(0,a.useRef)(0),ep=(0,a.useCallback)(async({quiet:e=!1}={})=>{e||j(!0);try{let e=await fetch("/api/resource-monitor",{cache:"no-store"}),t=await e.json().catch(()=>({}));if(!e.ok)throw Error(t.error||"Kh\xf4ng tải được server");let s=t.servers||[];er(!0===t.standby),o(s),x(e=>e&&s.some(t=>t.id===e)?e:s[0]?.id||""),u(e=>{let t={...e};return s.forEach(e=>{if(!N(e))return;let s=e.lastStatus,r={time:s.updatedAt||new Date().toISOString(),cpu:s.cpu?.usagePercent||0,memory:s.memory?.usagePercent||0,disk:s.disks?.[0]?.usagePercent||0,gpu:s.gpus?.length?Math.max(...s.gpus.map(e=>e.usagePercent||0)):0,gpus:(s.gpus||[]).map(e=>({id:A(e),usagePercent:w(e.usagePercent)}))},a=t[e.id]||[];t[e.id]=a.at(-1)?.time===r.time?a:[...a,r].slice(-60)}),t})}catch(t){e||H({type:"error",text:t?.message||"Kh\xf4ng tải được server"})}finally{p(!1),e||j(!1)}},[]),eb=(0,a.useCallback)(async()=>{if(!c)return;let e=++eh.current;Z(!0),et("");try{let t=await fetch(`/api/resource-monitor/history?serverId=${encodeURIComponent(c)}&period=${encodeURIComponent(V)}`,{cache:"no-store"}),s=await t.json().catch(()=>({}));if(!t.ok)throw Error(s.error||"Kh\xf4ng tải được lịch sử t\xe0i nguy\xean");if(eh.current!==e)return;J(s.points||[]),Q(s)}catch(t){if(eh.current!==e)return;et(t?.message||"Kh\xf4ng tải được lịch sử t\xe0i nguy\xean"),J([])}finally{eh.current===e&&Z(!1)}},[V,c]);(0,a.useEffect)(()=>{let e,t=!1;ep();let s=async()=>{await ep({quiet:!0}),t||(e=setTimeout(s,4e3))};return e=setTimeout(s,4e3),()=>{t=!0,clearTimeout(e)}},[ep]),(0,a.useEffect)(()=>{if("history"!==n||!c)return;eb();let e=setInterval(eb,6e4);return()=>clearInterval(e)},[n,eb,c]),(0,a.useEffect)(()=>{let e=localStorage.getItem("blueRouterResourceMonitorTab");e&&i(e)},[]),(0,a.useEffect)(()=>{localStorage.setItem("blueRouterResourceMonitorTab",n)},[n]);let eg=(0,a.useCallback)(e=>{ei(e),fetch("/api/resource-monitor/analyze",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:e})}).catch(()=>{})},[]),ef=(0,a.useCallback)(async()=>{if(!en)return;let e=en.indexOf("::"),t=en.slice(0,e),s=en.slice(e+2);ex(!0),eu("");try{let e=await fetch("/api/resource-monitor/analyze",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({connectionId:t,model:s})}),r=await e.json().catch(()=>({}));if(!e.ok)throw Error(r.error||"Kh\xf4ng thể ph\xe2n t\xedch t\xe0i nguy\xean");eo(r.analysis)}catch(e){eu(e?.message||"Kh\xf4ng thể ph\xe2n t\xedch t\xe0i nguy\xean")}finally{ex(!1)}},[en]);(0,a.useEffect)(()=>{"ai"===n&&(async()=>{let e="";try{let t=await fetch("/api/resource-monitor/analyze",{cache:"no-store"}),s=await t.json().catch(()=>({}));t.ok&&(eo(s.analysis||null),e=s.selectedModel||"")}catch{}try{let t=await fetch("/api/resource-monitor/ai-models",{cache:"no-store"}),s=(await t.json().catch(()=>({}))).options||[];el(s),ei(t=>{let r=t||e;return r&&s.some(e=>e.value===r)?r:s[0]?.value||""})}catch{el([])}})()},[n]);let ej=(0,a.useMemo)(()=>d.find(e=>e.id===c)||null,[d,c]),ev=ej?.lastStatus,ey=N(ej),eN=ev?.disks?.[0],ew=m[c]||[],ek=async()=>{if(_){z(!0);try{if(!(await fetch(`/api/resource-monitor/${_.id}`,{method:"DELETE"})).ok)throw Error("Kh\xf4ng thể x\xf3a server");L(null),await ep()}catch(e){H({type:"error",text:e.message})}finally{z(!1)}}};return h?(0,r.jsxs)("div",{className:"flex min-h-[50vh] items-center justify-center text-text-muted",children:[(0,r.jsx)("span",{className:"material-symbols-outlined mr-2 animate-spin",children:"progress_activity"}),"Đang tải t\xe0i nguy\xean server..."]}):(0,r.jsxs)("div",{className:"space-y-6",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h2",{className:"text-xl font-semibold text-text-main",children:"Linux Resource Monitor"}),(0,r.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Theo d\xf5i realtime CPU, RAM, disk, network v\xe0 to\xe0n bộ NVIDIA GPU."})]}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(b.default,{variant:"secondary",icon:"refresh",onClick:()=>"history"===n?eb():ep(),loading:"history"===n?Y:g,children:"L\xe0m mới"}),(0,r.jsx)(b.default,{icon:"add",onClick:()=>y(!0),disabled:es,children:"Th\xeam server"})]})]}),es?(0,r.jsx)("div",{className:"rounded-xl border border-blue-500/30 bg-blue-500/10 px-4 py-3 text-sm text-blue-700 dark:text-blue-300",children:"Standby mode: Resource Monitor chỉ hiển thị snapshot từ Master. Node n\xe0y kh\xf4ng polling agent v\xe0 kh\xf4ng cho sửa danh s\xe1ch server."}):null,(0,r.jsxs)("div",{className:"flex w-fit rounded-xl border border-border bg-surface p-1 shadow-[var(--shadow-soft)]",children:[(0,r.jsxs)("button",{type:"button",onClick:()=>i("realtime"),className:`flex items-center gap-2 rounded-lg px-4 py-2.5 text-sm font-semibold transition ${"realtime"===n?"bg-primary text-white shadow-sm":"text-text-muted hover:bg-surface-2 hover:text-text-main"}`,children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[19px]",children:"monitor_heart"}),"Realtime Monitor"]}),(0,r.jsxs)("button",{type:"button",onClick:()=>i("history"),className:`flex items-center gap-2 rounded-lg px-4 py-2.5 text-sm font-semibold transition ${"history"===n?"bg-primary text-white shadow-sm":"text-text-muted hover:bg-surface-2 hover:text-text-main"}`,children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[19px]",children:"query_stats"}),"History"]}),(0,r.jsxs)("button",{type:"button",onClick:()=>i("ai"),className:`flex items-center gap-2 rounded-lg px-4 py-2.5 text-sm font-semibold transition ${"ai"===n?"bg-primary text-white shadow-sm":"text-text-muted hover:bg-surface-2 hover:text-text-main"}`,children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[19px]",children:"neurology"}),"Đ\xe1nh gi\xe1 AI"]})]}),O?(0,r.jsxs)("div",{className:`flex items-center justify-between rounded-xl border px-4 py-3 text-sm ${"error"===O.type?"border-red-500/20 bg-red-500/10 text-red-600 dark:text-red-300":"border-amber-500/20 bg-amber-500/10 text-amber-700 dark:text-amber-300"}`,children:[(0,r.jsx)("span",{children:O.text}),(0,r.jsx)("button",{onClick:()=>H(null),children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"close"})})]}):null,d.length?(0,r.jsxs)(r.Fragment,{children:["ai"!==n?(0,r.jsx)($,{servers:d,selectedId:c,onSelect:x}):null,"ai"===n?(0,r.jsx)(R,{modelOptions:ea,selectedModel:en,onSelectModel:eg,analysis:ed,loading:ec,error:em,onAnalyze:ef,standby:es}):ej?"realtime"===n?(0,r.jsxs)("section",{className:"overflow-hidden rounded-3xl border border-border bg-surface shadow-[var(--shadow-soft)]",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4 border-b border-border px-6 py-5",children:[(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-4",children:[(0,r.jsx)("div",{className:"flex h-12 w-12 items-center justify-center rounded-2xl bg-primary/10 text-primary",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[27px]",children:"dns"})}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(P,{online:ey}),(0,r.jsx)("h3",{className:"truncate text-lg font-semibold text-text-main",children:ej.name})]}),(0,r.jsxs)("div",{className:"mt-1 flex flex-wrap gap-x-3 text-xs text-text-muted",children:[(0,r.jsx)("span",{className:"font-mono",children:ej.host}),ev?.os?(0,r.jsx)("span",{children:ev.os}):null,ev?.uptimeSeconds?(0,r.jsxs)("span",{children:["Uptime ",(t=Math.floor((e=Number(ev.uptimeSeconds)||0)/86400),s=Math.floor(e%86400/3600),l=Math.floor(e%3600/60),t?`${t} ng\xe0y ${s} giờ`:s?`${s} giờ ${l} ph\xfat`:`${l} ph\xfat`)]}):null]})]})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:`rounded-full px-3 py-1.5 text-xs font-semibold ${ey?"bg-emerald-500/10 text-emerald-600 dark:text-emerald-400":"bg-red-500/10 text-red-600 dark:text-red-300"}`,children:ey?"Online":"Offline"}),es?null:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("button",{type:"button",onClick:()=>D(!0),className:"rounded-xl p-2 text-text-muted hover:bg-primary/10 hover:text-primary",title:"Sửa server v\xe0 c\xe0i lại agent",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"edit"})}),(0,r.jsx)("button",{type:"button",onClick:()=>L(ej),className:"rounded-xl p-2 text-text-muted hover:bg-red-500/10 hover:text-red-500",title:"X\xf3a khỏi dashboard",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"delete"})})]})]})]}),ey?null:(0,r.jsx)("div",{className:"m-6 rounded-2xl border border-amber-500/20 bg-amber-500/8 p-5",children:(0,r.jsxs)("div",{className:"flex gap-3",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-amber-500",children:"cloud_off"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"font-semibold text-text-main",children:"Kh\xf4ng kết nối được agent"}),(0,r.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:ej.lastError||"Agent chưa gửi dữ liệu. Kiểm tra firewall v\xe0 agent port."}),ej.lastInstallLog?(0,r.jsxs)("details",{className:"mt-3",children:[(0,r.jsx)("summary",{className:"cursor-pointer text-xs font-semibold text-amber-600",children:"Xem log c\xe0i đặt"}),(0,r.jsx)("pre",{className:"mt-2 max-h-48 overflow-auto whitespace-pre-wrap rounded-xl bg-black/80 p-3 text-xs text-white",children:ej.lastInstallLog})]}):null]})]})}),ev?(0,r.jsxs)("div",{className:"space-y-7 p-6",children:[(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"mb-5 flex items-center gap-2",children:[(0,r.jsx)("span",{className:"h-5 w-1 rounded-full bg-primary"}),(0,r.jsx)("h3",{className:"font-semibold text-text-main",children:"Tổng quan t\xe0i nguy\xean"}),(0,r.jsxs)("span",{className:"ml-auto text-xs text-text-muted",children:["Cập nhật ",S(ej.lastStatusAt)]})]}),(0,r.jsxs)("div",{className:"grid gap-5 sm:grid-cols-2 xl:grid-cols-4",children:[(0,r.jsx)(C,{value:ev.cpu?.usagePercent,label:"CPU",detail:`${ev.cpu?.cores||0} cores \xb7 Load ${ev.cpu?.load1??0}`,icon:"developer_board"}),(0,r.jsx)(C,{value:ev.memory?.usagePercent,label:"RAM",detail:`${k(ev.memory?.usedBytes)} / ${k(ev.memory?.totalBytes)}`,icon:"memory_alt"}),(0,r.jsx)(C,{value:eN?.usagePercent,label:"Disk /",detail:`${k(eN?.usedBytes)} / ${k(eN?.totalBytes)}`,icon:"hard_drive"}),(0,r.jsx)(C,{value:ev.gpus?.length?Math.max(...ev.gpus.map(e=>e.usagePercent||0)):0,label:ev.gpus?.length?`${ev.gpus.length} NVIDIA GPU`:"GPU",detail:ev.gpus?.length?`${ev.gpus.length} card được ph\xe1t hiện`:"Kh\xf4ng c\xf3 NVIDIA GPU",color:"#10b981",icon:"memory"})]})]}),(0,r.jsxs)("div",{className:"grid gap-4 sm:grid-cols-2 xl:grid-cols-4",children:[(0,r.jsx)(U,{icon:"developer_board",label:"CPU",value:ev.cpu?.model||`${ev.cpu?.cores||0} cores`,sublabel:`Load average ${ev.cpu?.load1??0} / ${ev.cpu?.load5??0} / ${ev.cpu?.load15??0}`}),(0,r.jsx)(U,{icon:"swap_vert",label:"Network realtime",value:`↓ ${k(ev.network?.rxBytesPerSecond)}/s`,sublabel:`↑ ${k(ev.network?.txBytesPerSecond)}/s`,colorClass:"text-cyan-500"}),(0,r.jsx)(U,{icon:"hard_drive",label:"Disk root",value:`${k(eN?.freeBytes)} trống`,sublabel:`${eN?.device||"root"} \xb7 ${eN?.filesystem||"filesystem"}`,colorClass:"text-violet-500"}),(0,r.jsx)(U,{icon:"memory",label:"Swap",value:k(ev.memory?.swapUsedBytes),sublabel:`Tổng ${k(ev.memory?.swapTotalBytes)}`,colorClass:"text-amber-500"})]}),(0,r.jsxs)("div",{className:"grid gap-5 xl:grid-cols-2",children:[(0,r.jsx)(M,{data:ew,dataKey:"cpu",label:"CPU usage",color:"#3b9dec"}),(0,r.jsx)(M,{data:ew,dataKey:"memory",label:"RAM usage",color:"#8b5cf6"})]}),(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"mb-4 flex items-center gap-2",children:[(0,r.jsx)("span",{className:"h-5 w-1 rounded-full bg-emerald-500"}),(0,r.jsxs)("h3",{className:"font-semibold text-text-main",children:["NVIDIA GPU (",ev.gpus?.length||0,")"]})]}),ev.gpus?.length?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(I,{data:ew,gpus:ev.gpus}),(0,r.jsx)("div",{className:"grid gap-5 xl:grid-cols-2",children:ev.gpus.map(e=>(0,r.jsx)(E,{gpu:e},e.uuid||e.index))})]}):(0,r.jsxs)("div",{className:"rounded-2xl border border-dashed border-border bg-surface-2/40 py-10 text-center text-sm text-text-muted",children:["Kh\xf4ng ph\xe1t hiện NVIDIA GPU hoặc"," ",(0,r.jsx)("span",{className:"font-mono",children:"nvidia-smi"})," chưa sẵn s\xe0ng."]})]})]}):null]}):(0,r.jsx)(F,{server:ej,data:q,meta:X,period:V,onPeriodChange:W,loading:Y,error:ee}):null]}):(0,r.jsxs)("div",{className:"flex min-h-[460px] flex-col items-center justify-center rounded-3xl border border-dashed border-border bg-surface px-6 text-center",children:[(0,r.jsx)("div",{className:"flex h-20 w-20 items-center justify-center rounded-3xl bg-primary/10 text-primary",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[42px]",children:"monitor_heart"})}),(0,r.jsx)("h3",{className:"mt-6 text-xl font-semibold text-text-main",children:"Chưa c\xf3 Linux server"}),(0,r.jsx)("p",{className:"mt-2 max-w-lg text-sm leading-6 text-text-muted",children:"Th\xeam server bằng t\xe0i khoản SSH c\xf3 quyền sudo. BlueRouter sẽ tự c\xe0i agent systemd v\xe0 bắt đầu hiển thị t\xe0i nguy\xean ngay tại đ\xe2y."}),es?null:(0,r.jsx)(b.default,{className:"mt-6",icon:"add",onClick:()=>y(!0),children:"Th\xeam server đầu ti\xean"})]}),(0,r.jsx)(K,{open:v&&!es,onClose:()=>y(!1),onCreated:async(e,t)=>{t&&!t.ok&&H({type:"warning",text:"Đ\xe3 lưu server nhưng c\xe0i agent chưa th\xe0nh c\xf4ng. Mở server để xem log."}),await ep()}}),(0,r.jsx)(G,{open:T&&!es,server:ej,onClose:()=>D(!1),onUpdated:async(e,t)=>{t&&!t.ok&&H({type:"warning",text:"Đ\xe3 lưu server nhưng c\xe0i lại agent chưa th\xe0nh c\xf4ng. Mở server để xem log."}),await ep()}}),(0,r.jsx)(f.ConfirmModal,{isOpen:!!_,onClose:()=>L(null),onConfirm:ek,loading:B,variant:"danger",title:"X\xf3a server khỏi dashboard?",confirmText:"X\xf3a server",cancelText:"Hủy",message:"Server sẽ ngừng được theo d\xf5i. Agent systemd tr\xean Linux kh\xf4ng bị gỡ tự động."})]})}},92542:(e,t,s)=>{"use strict";s.d(t,{default:()=>i});var r=s(95155),a=s(31474);let l={primary:"bg-brand-500 hover:bg-brand-600 text-white shadow-sm disabled:bg-surface-3 disabled:text-text-muted",secondary:"bg-surface-2 hover:bg-surface-3 text-text-main border border-border disabled:opacity-50",outline:"border border-border text-text-main hover:bg-surface-2 hover:border-brand-500/40",ghost:"text-text-muted hover:bg-surface-2 hover:text-text-main",danger:"bg-red-500 hover:bg-red-600 text-white shadow-sm disabled:bg-surface-3 disabled:text-text-muted",success:"bg-green-600 hover:bg-green-700 text-white shadow-sm disabled:bg-surface-3 disabled:text-text-muted"},n={sm:"h-7 px-3 text-xs rounded-[8px]",md:"h-9 px-4 text-sm rounded-[10px]",lg:"h-11 px-6 text-sm rounded-[10px]"};function i({children:e,variant:t="primary",size:s="md",icon:d,iconRight:o,disabled:c=!1,loading:x=!1,fullWidth:m=!1,className:u,...h}){return(0,r.jsxs)("button",{className:(0,a.cn)("inline-flex items-center justify-center gap-2 font-semibold transition-all duration-150 ease-out cursor-pointer","active:scale-[0.97] disabled:opacity-50 disabled:cursor-not-allowed disabled:active:scale-100",l[t],n[s],m&&"w-full",u),disabled:c||x,...h,children:[x?(0,r.jsx)("span",{className:"material-symbols-outlined animate-spin text-[18px]",children:"progress_activity"}):d?(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:d}):null,e,o&&!x&&(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:o})]})}},96413:(e,t,s)=>{Promise.resolve().then(s.bind(s,86243))},97677:(e,t,s)=>{"use strict";s.d(t,{default:()=>a});var r=s(95155);function a({text:e,children:t,position:s="top",color:l}){let n=l?"":"bg-gray-900";return(0,r.jsxs)("div",{className:"relative inline-flex group",children:[t,(0,r.jsx)("div",{className:`pointer-events-none absolute ${{top:"bottom-full left-1/2 -translate-x-1/2 mb-1.5",bottom:"top-full left-1/2 -translate-x-1/2 mt-1.5",left:"right-full top-1/2 -translate-y-1/2 mr-1.5",right:"left-full top-1/2 -translate-y-1/2 ml-1.5"}[s]} z-50 w-max max-w-56 rounded px-2 py-1 text-[11px] leading-snug ${n} text-white opacity-0 group-hover:opacity-100 transition-opacity duration-150 whitespace-normal`,style:l?{backgroundColor:l}:{},children:e})]})}}},e=>{e.O(0,[506,6483,8441,3794,7358],()=>e(e.s=96413)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,219,312,335,342,387,451,501,516,543,552,654,675,747,748,754,767,874,887,907,931,948,992,997,1077,1088,1091,1110,1118,1173,1200,1243,1288,1320,1337,1382,1451,1512,1566,1666,1674,1697,1860,1907,1910,1946,1949,2121,2198,2222,2284,2296,2525,2536,2627,2772,2785,2792,2797,2919,2922,3025,3038,3079,3161,3195,3352,3397,3472,3507,3510,3549,3562,3568,3577,3883,3888,4010,4061,4078,4118,4245,4286,4422,4444,4486,4544,4612,4656,4674,4761,4871,4896,4993,5018,5032,5091,5107,5177,5211,5226,5338,5418,5466,5606,5637,5685,5703,5745,5922,6091,6107,6121,6268,6319,6479,6529,6547,6580,6594,6642,6740,6743,6819,6919,6988,7131,7158,7241,7249,7311,7429,7445,7473,7508,7520,7545,7656,7758,7824,7851,7960,7988,8026,8095,8167,8207,8246,8273,8351,8433,8453,8489,8573,8648,8736,8791,8814,8870,8948,8974,8975,9027,9069,9088,9141,9199,9226,9230,9321,9395,9461,9619,9678,9709,9951],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,219,312,335,342,387,451,501,516,543,552,654,675,747,748,754,767,874,887,907,931,948,992,997,1077,1088,1091,1110,1118,1173,1200,1243,1288,1320,1337,1382,1451,1512,1566,1666,1674,1697,1860,1907,1910,1946,1949,2121,2198,2222,2284,2296,2525,2536,2627,2772,2785,2792,2797,2919,2922,3025,3038,3079,3161,3195,3352,3397,3472,3507,3510,3549,3562,3568,3577,3883,3888,4010,4061,4078,4118,4245,4286,4422,4444,4486,4544,4612,4656,4674,4761,4871,4896,4993,5018,5032,5091,5107,5177,5211,5226,5338,5418,5466,5606,5637,5685,5703,5745,5922,6091,6107,6121,6268,6319,6479,6529,6547,6580,6594,6642,6740,6743,6819,6919,6988,7131,7158,7241,7249,7311,7429,7445,7473,7508,7520,7545,7656,7758,7824,7851,7960,7988,8026,8095,8167,8207,8246,8273,8351,8433,8453,8489,8573,8648,8736,8791,8814,8870,8948,8974,8975,9027,9069,9088,9141,9199,9226,9230,9321,9395,9461,9619,9678,9709,9951],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,219,312,335,342,387,451,501,516,543,552,654,675,747,748,754,767,874,887,907,931,948,992,997,1077,1088,1091,1110,1118,1173,1200,1243,1288,1320,1337,1382,1451,1512,1566,1666,1674,1697,1860,1907,1910,1946,1949,2121,2198,2222,2284,2296,2525,2536,2627,2772,2785,2792,2797,2919,2922,3025,3038,3079,3161,3195,3352,3397,3472,3507,3510,3549,3562,3568,3577,3883,3888,4010,4061,4078,4118,4245,4286,4422,4444,4486,4544,4612,4656,4674,4761,4871,4896,4993,5018,5032,5091,5107,5177,5211,5226,5338,5418,5466,5606,5637,5685,5703,5745,5922,6091,6107,6121,6268,6319,6479,6529,6547,6580,6594,6642,6740,6743,6819,6919,6988,7131,7158,7241,7249,7311,7429,7445,7473,7508,7520,7545,7656,7758,7824,7851,7960,7988,8026,8095,8167,8207,8246,8273,8351,8433,8453,8489,8573,8648,8736,8791,8814,8870,8948,8974,8975,9027,9069,9088,9141,9199,9226,9230,9321,9395,9461,9619,9678,9709,9951],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,219,312,335,342,387,451,501,516,543,552,654,675,747,748,754,767,874,887,907,931,948,992,997,1077,1088,1091,1110,1118,1173,1200,1243,1288,1320,1337,1382,1451,1512,1566,1666,1674,1697,1860,1907,1910,1946,1949,2121,2198,2222,2284,2296,2525,2536,2627,2772,2785,2792,2797,2919,2922,3025,3038,3079,3161,3195,3352,3397,3472,3507,3510,3549,3562,3568,3577,3883,3888,4010,4061,4078,4118,4245,4286,4422,4444,4486,4544,4612,4656,4674,4761,4871,4896,4993,5018,5032,5091,5107,5177,5211,5226,5338,5418,5466,5606,5637,5685,5703,5745,5922,6091,6107,6121,6268,6319,6479,6529,6547,6580,6594,6642,6740,6743,6819,6919,6988,7131,7158,7241,7249,7311,7429,7445,7473,7508,7520,7545,7656,7758,7824,7851,7960,7988,8026,8095,8167,8207,8246,8273,8351,8433,8453,8489,8573,8648,8736,8791,8814,8870,8948,8974,8975,9027,9069,9088,9141,9199,9226,9230,9321,9395,9461,9619,9678,9709,9951],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,219,312,335,342,387,451,501,516,543,552,654,675,747,748,754,767,874,887,907,931,948,992,997,1077,1088,1091,1110,1118,1173,1200,1243,1288,1320,1337,1382,1451,1512,1566,1666,1674,1697,1860,1907,1910,1946,1949,2121,2198,2222,2284,2296,2525,2536,2627,2772,2785,2792,2797,2919,2922,3025,3038,3079,3161,3195,3352,3397,3472,3507,3510,3549,3562,3568,3577,3883,3888,4010,4061,4078,4118,4245,4286,4422,4444,4486,4544,4612,4656,4674,4761,4871,4896,4993,5018,5032,5091,5107,5177,5211,5226,5338,5418,5466,5606,5637,5685,5703,5745,5922,6091,6107,6121,6268,6319,6479,6529,6547,6580,6594,6642,6740,6743,6819,6919,6988,7131,7158,7241,7249,7311,7429,7445,7473,7508,7520,7545,7656,7758,7824,7851,7960,7988,8026,8095,8167,8207,8246,8273,8351,8433,8453,8489,8573,8648,8736,8791,8814,8870,8948,8974,8975,9027,9069,9088,9141,9199,9226,9230,9321,9395,9461,9619,9678,9709,9951],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-9dd8e15354833c59.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,219,312,335,342,387,451,501,516,543,552,654,675,747,748,754,767,874,887,907,931,948,992,997,1077,1088,1091,1110,1118,1173,1200,1243,1288,1320,1337,1382,1451,1512,1566,1666,1674,1697,1860,1907,1910,1946,1949,2121,2198,2222,2284,2296,2525,2536,2627,2772,2785,2792,2797,2919,2922,3025,3038,3079,3161,3195,3352,3397,3472,3507,3510,3549,3562,3568,3577,3883,3888,4010,4061,4078,4118,4245,4286,4422,4444,4486,4544,4612,4656,4674,4761,4871,4896,4993,5018,5032,5091,5107,5177,5211,5226,5338,5418,5466,5606,5637,5685,5703,5745,5922,6091,6107,6121,6268,6319,6479,6529,6547,6580,6594,6642,6740,6743,6819,6919,6988,7131,7158,7241,7249,7311,7429,7445,7473,7508,7520,7545,7656,7758,7824,7851,7960,7988,8026,8095,8167,8207,8246,8273,8351,8433,8453,8489,8573,8648,8736,8791,8814,8870,8948,8974,8975,9027,9069,9088,9141,9199,9226,9230,9321,9395,9461,9619,9678,9709,9951],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,219,312,335,342,387,451,501,516,543,552,654,675,747,748,754,767,874,887,907,931,948,992,997,1077,1088,1091,1110,1118,1173,1200,1243,1288,1320,1337,1382,1451,1512,1566,1666,1674,1697,1860,1907,1910,1946,1949,2121,2198,2222,2284,2296,2525,2536,2627,2772,2785,2792,2797,2919,2922,3025,3038,3079,3161,3195,3352,3397,3472,3507,3510,3549,3562,3568,3577,3883,3888,4010,4061,4078,4118,4245,4286,4422,4444,4486,4544,4612,4656,4674,4761,4871,4896,4993,5018,5032,5091,5107,5177,5211,5226,5338,5418,5466,5606,5637,5685,5703,5745,5922,6091,6107,6121,6268,6319,6479,6529,6547,6580,6594,6642,6740,6743,6819,6919,6988,7131,7158,7241,7249,7311,7429,7445,7473,7508,7520,7545,7656,7758,7824,7851,7960,7988,8026,8095,8167,8207,8246,8273,8351,8433,8453,8489,8573,8648,8736,8791,8814,8870,8948,8974,8975,9027,9069,9088,9141,9199,9226,9230,9321,9395,9461,9619,9678,9709,9951],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,219,312,335,342,387,451,501,516,543,552,654,675,747,748,754,767,874,887,907,931,948,992,997,1077,1088,1091,1110,1118,1173,1200,1243,1288,1320,1337,1382,1451,1512,1566,1666,1674,1697,1860,1907,1910,1946,1949,2121,2198,2222,2284,2296,2525,2536,2627,2772,2785,2792,2797,2919,2922,3025,3038,3079,3161,3195,3352,3397,3472,3507,3510,3549,3562,3568,3577,3883,3888,4010,4061,4078,4118,4245,4286,4422,4444,4486,4544,4612,4656,4674,4761,4871,4896,4993,5018,5032,5091,5107,5177,5211,5226,5338,5418,5466,5606,5637,5685,5703,5745,5922,6091,6107,6121,6268,6319,6479,6529,6547,6580,6594,6642,6740,6743,6819,6919,6988,7131,7158,7241,7249,7311,7429,7445,7473,7508,7520,7545,7656,7758,7824,7851,7960,7988,8026,8095,8167,8207,8246,8273,8351,8433,8453,8489,8573,8648,8736,8791,8814,8870,8948,8974,8975,9027,9069,9088,9141,9199,9226,9230,9321,9395,9461,9619,9678,9709,9951],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,219,312,335,342,387,451,501,516,543,552,654,675,747,748,754,767,874,887,907,931,948,992,997,1077,1088,1091,1110,1118,1173,1200,1243,1288,1320,1337,1382,1451,1512,1566,1666,1674,1697,1860,1907,1910,1946,1949,2121,2198,2222,2284,2296,2525,2536,2627,2772,2785,2792,2797,2919,2922,3025,3038,3079,3161,3195,3352,3397,3472,3507,3510,3549,3562,3568,3577,3883,3888,4010,4061,4078,4118,4245,4286,4422,4444,4486,4544,4612,4656,4674,4761,4871,4896,4993,5018,5032,5091,5107,5177,5211,5226,5338,5418,5466,5606,5637,5685,5703,5745,5922,6091,6107,6121,6268,6319,6479,6529,6547,6580,6594,6642,6740,6743,6819,6919,6988,7131,7158,7241,7249,7311,7429,7445,7473,7508,7520,7545,7656,7758,7824,7851,7960,7988,8026,8095,8167,8207,8246,8273,8351,8433,8453,8489,8573,8648,8736,8791,8814,8870,8948,8974,8975,9027,9069,9088,9141,9199,9226,9230,9321,9395,9461,9619,9678,9709,9951],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|