@hivemagnus/magnus-ui 3.1.0 → 3.1.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/README.md +1 -1
- package/dist/app/apps/dashboard/.next/BUILD_ID +1 -1
- package/dist/app/apps/dashboard/.next/build-manifest.json +56 -56
- package/dist/app/apps/dashboard/.next/prerender-manifest.json +3 -3
- package/dist/app/apps/dashboard/.next/required-server-files.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/_global-error/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/_global-error.html +1 -1
- package/dist/app/apps/dashboard/.next/server/app/_global-error.rsc +1 -1
- package/dist/app/apps/dashboard/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/dist/app/apps/dashboard/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/dist/app/apps/dashboard/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/dist/app/apps/dashboard/.next/server/app/_not-found/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/anomalies/[anomalyId]/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/anomalies/[anomalyId]/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/anomalies/[anomalyId]/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/anomalies/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/anomalies/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/anomalies/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/anomalies/remediation/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/anomalies/remediation/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/anomalies/remediation/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/auth/hive/callback/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/auth/hive/configured/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/auth/hive/start/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/auth/login/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/auth/logout/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/auth/me/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/control-nodes/[id]/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/control-nodes/migrate/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/control-nodes/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/federation/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/health/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/hermes/dashboard/[[...path]]/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/hive-router/dashboard/[[...path]]/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/proxy/[...path]/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/terminal/close/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/terminal/input/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/terminal/open/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/terminal/resize/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/terminal/stream/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api-docs/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/api-docs/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api-docs/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/application-operations/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/application-operations/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/application-operations/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/ardent/installations/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/ardent/installations/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/ardent/installations/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/ardent/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/ardent/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/ardent/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/ardent/profiles/[id]/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/ardent/profiles/[id]/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/ardent/profiles/[id]/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/ardent/profiles/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/ardent/profiles/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/ardent/profiles/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/audit/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/audit/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/audit/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/codex/installations/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/codex/installations/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/codex/installations/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/codex/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/codex/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/codex/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/commands/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/commands/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/commands/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/cron/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/cron/page/server-reference-manifest.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/cron/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/cron/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/files/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/files/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/files/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/fleet-map/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/fleet-map/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/fleet-map/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/fleet-readiness/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/fleet-readiness/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/fleet-readiness/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/fleet-timeline/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/fleet-timeline/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/fleet-timeline/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/governor/operations/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/governor/operations/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/governor/operations/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/governor/share/[token]/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/governor/share/[token]/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/governor/share/[token]/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/hermes-drift/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/hermes-drift/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/hermes-drift/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/hermes-security/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/hermes-security/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/hermes-security/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/icon.svg/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/incidents/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/incidents/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/incidents/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/library/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/library/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/library/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/login/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/login/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/logs/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/logs/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/logs/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/mission-control/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/mission-control/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/mission-control/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/nodes/[nodeId]/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/nodes/[nodeId]/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/nodes/[nodeId]/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/nodes/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/nodes/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/nodes/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/notifications/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/notifications/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/notifications/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/orchestra/installations/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/orchestra/installations/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/orchestra/installations/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/orchestra/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/orchestra/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/orchestra/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/orchestra/profiles/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/orchestra/profiles/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/orchestra/profiles/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/orchestra/web-gateway/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/orchestra/web-gateway/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/orchestra/web-gateway/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/retention/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/retention/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/retention/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/roles/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/roles/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/roles/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/rollouts/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/rollouts/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/rollouts/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/cases/[caseId]/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/cases/[caseId]/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/cases/[caseId]/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/cases/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/cases/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/cases/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/entities/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/entities/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/entities/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/events/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/events/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/events/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/evidence/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/evidence/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/evidence/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/policies/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/policies/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/policies/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/sources/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/sources/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/sources/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/skills/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/skills/page/server-reference-manifest.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/skills/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/skills/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/webhooks/[id]/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/webhooks/[id]/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/webhooks/[id]/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/webhooks/new/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/webhooks/new/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/webhooks/new/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/webhooks/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/webhooks/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/webhooks/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__0ywmf3079vsm1._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__15bjnu5yieigz._.js +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/apps_dashboard_src_lib_hive-login_ts_0ab2iq7-rpy13._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/node_modules_0_mv4bximoofw._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/node_modules_0u9pfz6tlfjqv._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/node_modules_1ovxb0oub71q-._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/[root-of-the-server]__06giq9g4me8eh._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/[root-of-the-server]__08sgyyf_y8ab8._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/[root-of-the-server]__11pe-l2-ko65_._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_0caxc2bc6a__r._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_0zrtbhvhztqnh._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_0zsjpnu4iitoz._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_1ml_bvfb1fitq._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_1oebzzj_en62h._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_0gs_s688kgg1i._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_cron_page_tsx_1i3duyygc0_tg._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_skills_page_tsx_0n5zp4xad38in._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{node_modules_@xterm_120daugm414or._.js → node_modules_@xterm_05ka2ob3ivi4y._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_next_dist_0tg97786c_yac._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/middleware-build-manifest.js +56 -56
- package/dist/app/apps/dashboard/.next/server/pages/500.html +1 -1
- package/dist/app/apps/dashboard/.next/server/preview-props.json +3 -3
- package/dist/app/apps/dashboard/.next/server/server-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/server-reference-manifest.json +3 -3
- package/dist/app/apps/dashboard/.next/static/chunks/{3z4_b86_ztp8q.js → 0dx1k-upfbcqq.js} +1 -1
- package/dist/app/apps/dashboard/.next/static/chunks/{07uou-f2ig2z3.js → 0nekvgtqt8goj.js} +1 -1
- package/dist/app/apps/dashboard/.next/static/chunks/{2d7iofjrbu67d.js → 11_rje3imu339.js} +1 -1
- package/dist/app/apps/dashboard/.next/static/chunks/{01o36-nzvnb50.js → 1owzwalm4tlhy.js} +1 -1
- package/dist/app/apps/dashboard/.next/static/chunks/1z8yy1fep3eml.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/{2gglvzjgngh6n.js → 2mdh6b0vlfm-b.js} +1 -1
- package/dist/app/apps/dashboard/.next/static/chunks/{3l8w-h8da7s_r.js → 35q52lg40ayb-.js} +1 -1
- package/dist/app/apps/dashboard/.next/static/chunks/{0prxb5rrnyazx.js → 377hi9txc4zi_.js} +1 -1
- package/dist/app/apps/dashboard/package.json +8 -8
- package/dist/app/apps/dashboard/server.js +1 -1
- package/dist/app/node_modules/@next/env/package.json +1 -1
- package/dist/app/node_modules/next/dist/build/swc/index.js +1 -1
- package/dist/app/node_modules/next/dist/compiled/next-server/app-page-turbo-experimental.runtime.prod.js +1 -1
- package/dist/app/node_modules/next/dist/compiled/next-server/app-page-turbo.runtime.prod.js +1 -1
- package/dist/app/node_modules/next/dist/compiled/next-server/app-route-turbo.runtime.prod.js +1 -1
- package/dist/app/node_modules/next/dist/lib/patch-incorrect-lockfile.js +3 -3
- package/dist/app/node_modules/next/dist/server/app-render/async-local-storage.js +1 -1
- package/dist/app/node_modules/next/dist/server/base-http/node.js +7 -2
- package/dist/app/node_modules/next/dist/server/config.js +1 -1
- package/dist/app/node_modules/next/dist/server/dev/hot-reloader-turbopack.js +2 -2
- package/dist/app/node_modules/next/dist/server/dev/hot-reloader-webpack.js +1 -1
- package/dist/app/node_modules/next/dist/server/lib/app-info-log.js +1 -1
- package/dist/app/node_modules/next/dist/server/lib/router-server.js +1 -1
- package/dist/app/node_modules/next/dist/server/lib/start-server.js +1 -1
- package/dist/app/node_modules/next/dist/server/lib/trace/tracer.js +1 -1
- package/dist/app/node_modules/next/dist/server/use-cache/use-cache-wrapper.js +1 -1
- package/dist/app/node_modules/next/dist/telemetry/anonymous-meta.js +1 -1
- package/dist/app/node_modules/next/dist/telemetry/events/swc-load-failure.js +1 -1
- package/dist/app/node_modules/next/dist/telemetry/events/version.js +2 -2
- package/dist/app/node_modules/next/package.json +10 -10
- package/package.json +8 -8
- package/dist/app/apps/dashboard/.next/static/chunks/3gd78w81m3ouh.js +0 -1
- /package/dist/app/apps/dashboard/.next/static/{LwCb7cxSJ3jJXNJIZN5vo → 7HUKUI81m5Gwn1gSbDBFT}/_buildManifest.js +0 -0
- /package/dist/app/apps/dashboard/.next/static/{LwCb7cxSJ3jJXNJIZN5vo → 7HUKUI81m5Gwn1gSbDBFT}/_clientMiddlewareManifest.js +0 -0
- /package/dist/app/apps/dashboard/.next/static/{LwCb7cxSJ3jJXNJIZN5vo → 7HUKUI81m5Gwn1gSbDBFT}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,59180,e=>{"use strict";var s=e.i(43476),t=e.i(71645),a=e.i(68759),r=e.i(46670),n=e.i(93999),i=e.i(32568),l=e.i(82983),c=e.i(4050),o=e.i(95187);let d=(0,o.createServerReference)("406e787aaf2acf5178fea11f1394d531646e00d02d",o.callServer,void 0,o.findSourceMapURL,"scanSkills");var x=e.i(78571),m=e.i(63376),p=e.i(88187),h=e.i(41120),u=e.i(66595),f=e.i(79258),g=e.i(41220),v=e.i(56420);let j={name:"tag",size:24,node:[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]};j.node;let N=(0,v.f)(j);var b=e.i(89360),w=e.i(16327),y=e.i(67927),k=e.i(72382),S=e.i(25981),_=e.i(32781),I=e.i(64155),C=e.i(51757),z=e.i(83967);e.s(["default",0,function(){let{activeNode:e}=(0,c.l)(),[o,v]=(0,t.useState)([]),[j,E]=(0,t.useState)(!1),[M,L]=(0,t.useState)(null),[A,D]=(0,t.useState)(!1),[$,P]=(0,t.useState)(""),[T,R]=(0,t.useState)(new Set),[F,O]=(0,t.useState)(null),[U,G]=(0,t.useState)(null),[H,K]=(0,t.useState)(""),[V,q]=(0,t.useState)(!1),W=(0,t.useCallback)(async()=>{E(!0),v([]),L(null);let s=Date.now();try{let s=await d(e.id);if(s.success&&Array.isArray(s.data)){let e=s.data.map(e=>({...e,status:"error"===e.status?"error":"done",skills:e.skills.map(e=>({...e,files:e.files.map(e=>"string"==typeof e?{name:e,content:""}:e)}))}));v(e);let t=new Set(e.filter(e=>e.skills.length>0).map(e=>e.nodeId));R(t.size>0?t:new Set(e.map(e=>e.nodeId)))}else L(s.error?.message??"Scan returned unsuccessful response")}catch(s){let e=s instanceof Error?s.message:"Scan request failed";L(e)}finally{let e=Date.now()-s;e<1500&&await new Promise(s=>setTimeout(s,1500-e)),E(!1),D(!0)}},[e]);(0,t.useEffect)(()=>{e&&W()},[e,W]);let B=o.reduce((e,s)=>e+("done"===s.status?s.skills.length:0),0),J=o.filter(e=>"done"===e.status).length,Q=o.filter(e=>"error"===e.status).length,Y=e=>{if(!$)return!0;let s=$.toLowerCase();return e.name.toLowerCase().includes(s)||e.description.toLowerCase().includes(s)||e.tags.some(e=>e.toLowerCase().includes(s))},Z=async()=>{if(U&&H){q(!0);try{let e={name:U.skill.name,version:H,description:U.skill.description,author:U.skill.author,entryPoint:U.skill.entryPoint,dependencies:U.skill.dependencies,tags:U.skill.tags},s={};for(let e of U.skill.files)s[e.name]=e.content;let t=JSON.stringify({manifest:e,files:s},null,2);await l.f.library.files.create({name:`${U.skill.name} v${H}`,fileName:`${U.skill.name}-${H}.json`,mimeType:"application/x-magnus-skill",content:t,tags:["skill",...U.skill.tags]}),G(null),K("")}catch{}finally{q(!1)}}};return(0,s.jsxs)(m.U,{className:"space-y-6",children:[(0,s.jsx)(m.z,{children:(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h1",{className:"text-lg font-bold uppercase tracking-wider",children:"Skills"}),(0,s.jsx)("p",{className:"text-[11px] text-text-muted uppercase tracking-wider",children:"Discover and manage Hermes Agent skills across your fleet"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[A&&!j&&(0,s.jsxs)("span",{className:"text-[10px] text-text-muted uppercase tracking-wider mr-2",children:[o.length," node",1!==o.length?"s":""," · ",B," skill",1!==B?"s":"",Q>0&&` \xb7 ${Q} error${1!==Q?"s":""}`]}),(0,s.jsxs)(a.K,{variant:"secondary",size:"sm",onClick:()=>void W(),disabled:j,children:[(0,s.jsx)(h.f,{className:(0,x.f)("h-3.5 w-3.5 mr-1.5",j&&"animate-spin")}),j?"Scanning...":"Rescan"]})]})]})}),j&&(0,s.jsx)(m.z,{children:(0,s.jsx)(p.f,{title:"Scanning Nodes for Skills",description:"Probing all online nodes...",nodes:o.map(e=>({nodeId:e.nodeId,nodeName:e.nodeName,status:e.status,error:e.error})),scanning:!0})}),!j&&A&&B>0&&(0,s.jsx)(m.z,{children:(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)(u.f,{className:"absolute left-3 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-text-muted"}),(0,s.jsx)("input",{type:"text",placeholder:"Search skills by name, description, or tag...",value:$,onChange:e=>P(e.target.value),className:(0,x.f)(i.W,"pl-9")})]})}),!j&&A&&M&&(0,s.jsx)(m.z,{children:(0,s.jsx)(n.N,{children:(0,s.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[(0,s.jsx)(I.f,{className:"h-10 w-10 text-danger/60 mb-3"}),(0,s.jsx)("p",{className:"text-xs font-bold text-danger mb-1",children:"Scan Failed"}),(0,s.jsx)("p",{className:"text-[11px] text-text-muted max-w-md",children:M}),(0,s.jsxs)(a.K,{variant:"secondary",size:"sm",className:"mt-4",onClick:()=>void W(),children:[(0,s.jsx)(h.f,{className:"h-3.5 w-3.5 mr-1.5"}),"Retry Scan"]})]})})}),!j&&A&&!M&&(0,s.jsxs)(s.Fragment,{children:[0===o.length?(0,s.jsx)(m.z,{children:(0,s.jsx)(n.N,{children:(0,s.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[(0,s.jsx)(g.f,{className:"h-10 w-10 text-text-muted/40 mb-3"}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"No online nodes found to scan. Ensure at least one node agent is running and connected."})]})})}):o.map(e=>{let t=T.has(e.nodeId),i=e.skills.filter(Y);return(0,s.jsx)(m.z,{children:(0,s.jsxs)(n.N,{className:"overflow-hidden",children:[(0,s.jsxs)("button",{onClick:()=>{var s;return s=e.nodeId,void R(e=>{let t=new Set(e);return t.has(s)?t.delete(s):t.add(s),t})},className:"w-full flex items-center gap-4 p-4 text-left hover:bg-surface-hover transition-all",children:[(0,s.jsx)("div",{className:"flex h-9 w-9 items-center justify-center rounded border border-primary/30 bg-primary/5 shrink-0",children:(0,s.jsx)(g.f,{className:"h-4 w-4 text-primary"})}),(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"text-xs font-bold uppercase tracking-wider",children:e.nodeName}),"done"===e.status&&(0,s.jsxs)(r.t,{variant:e.skills.length>0?"success":"default",children:[e.skills.length," skill",1!==e.skills.length?"s":""]}),"error"===e.status&&(0,s.jsx)(r.t,{variant:"danger",children:"Error"})]}),"error"===e.status&&e.error&&(0,s.jsx)("p",{className:"text-[11px] text-danger mt-0.5 truncate",children:e.error}),"done"===e.status&&0===e.skills.length&&(0,s.jsx)("p",{className:"text-[11px] text-text-muted mt-0.5",children:"No skills installed on this node"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:["done"===e.status?(0,s.jsx)(C.f,{className:"h-4 w-4 text-success"}):(0,s.jsx)(z.f,{className:"h-4 w-4 text-danger"}),t?(0,s.jsx)(w.f,{className:"h-4 w-4 text-text-muted"}):(0,s.jsx)(y.f,{className:"h-4 w-4 text-text-muted"})]})]}),t&&"done"===e.status&&(0,s.jsx)("div",{className:"border-t border-border/50 bg-bg/50",children:0===i.length?(0,s.jsx)("div",{className:"flex items-center justify-center py-8 text-center",children:(0,s.jsx)("p",{className:"text-[11px] text-text-muted",children:0===e.skills.length?"No skills installed on this node. Deploy skills from the Library.":"No skills match your search on this node."})}):(0,s.jsx)("div",{className:"divide-y divide-border/30",children:i.map(t=>(0,s.jsxs)("div",{className:"p-4 space-y-3",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(f.f,{className:"h-4 w-4 text-primary"}),(0,s.jsx)("span",{className:"text-xs font-bold",children:t.name}),(0,s.jsx)(r.t,{variant:"info",children:t.version})]}),(0,s.jsxs)(a.K,{size:"sm",variant:"secondary",onClick:()=>{G({skill:t,nodeId:e.nodeId,nodeName:e.nodeName}),K(t.version)},children:[(0,s.jsx)(S.f,{className:"h-3 w-3 mr-1"}),"Publish"]})]}),t.description&&(0,s.jsx)("p",{className:"text-[11px] text-text-muted",children:t.description}),t.tags.length>0&&(0,s.jsx)("div",{className:"flex flex-wrap gap-1",children:t.tags.map(e=>(0,s.jsxs)(r.t,{variant:"default",children:[(0,s.jsx)(N,{className:"h-2.5 w-2.5 mr-1"}),e]},e))}),(0,s.jsxs)("div",{className:"grid grid-cols-3 gap-3",children:[(0,s.jsxs)("div",{className:"rounded border border-border bg-surface p-2",children:[(0,s.jsx)("p",{className:"text-[10px] font-bold uppercase tracking-wider text-text-muted mb-0.5",children:"Author"}),(0,s.jsx)("p",{className:"text-[11px]",children:t.author||"—"})]}),(0,s.jsxs)("div",{className:"rounded border border-border bg-surface p-2",children:[(0,s.jsx)("p",{className:"text-[10px] font-bold uppercase tracking-wider text-text-muted mb-0.5",children:"Entry Point"}),(0,s.jsx)("p",{className:"text-[11px]",children:t.entryPoint||"—"})]}),(0,s.jsxs)("div",{className:"rounded border border-border bg-surface p-2",children:[(0,s.jsx)("p",{className:"text-[10px] font-bold uppercase tracking-wider text-text-muted mb-0.5",children:"Dependencies"}),(0,s.jsx)("p",{className:"text-[11px]",children:t.dependencies.length>0?t.dependencies.join(", "):"—"})]})]}),t.files.length>0&&(0,s.jsxs)("div",{children:[(0,s.jsxs)("p",{className:"text-[10px] font-bold uppercase tracking-wider text-text-muted mb-1.5",children:["Files (",t.files.length,")"]}),(0,s.jsx)("div",{className:"space-y-1",children:t.files.map(e=>(0,s.jsxs)("button",{onClick:()=>O(e),className:"flex items-center gap-2 rounded border border-border/50 px-3 py-1.5 text-xs hover:border-primary/30 hover:shadow-[0_0_20px_var(--color-glow)] transition-all w-full text-left",children:[(0,s.jsx)(b.f,{className:"h-3 w-3 text-primary"}),(0,s.jsx)("span",{children:e.name}),(0,s.jsx)(k.f,{className:"h-3 w-3 text-text-muted ml-auto"})]},e.name))})]})]},t.name))})})]})},e.nodeId)}),o.length>0&&(0,s.jsx)(m.z,{children:(0,s.jsxs)("div",{className:"flex items-center justify-between text-[10px] text-text-muted uppercase tracking-wider",children:[(0,s.jsxs)("span",{children:[J," node",1!==J?"s":""," scanned ·"," ",B," skill",1!==B?"s":""," discovered"]}),Q>0&&(0,s.jsxs)("span",{className:"text-danger",children:[Q," node",1!==Q?"s":""," unreachable"]})]})})]}),(0,s.jsx)(i.n,{open:!!F,onClose:()=>O(null),title:F?.name??"File",icon:(0,s.jsx)(b.f,{className:"h-5 w-5 text-primary"}),className:"max-w-3xl",children:(0,s.jsx)("pre",{className:"rounded border border-border bg-bg p-4 text-xs overflow-auto max-h-96 whitespace-pre-wrap",children:F?.content||"(empty)"})}),(0,s.jsx)(i.n,{open:!!U,onClose:()=>G(null),title:"Publish to Library",description:U?.skill.name??"",icon:(0,s.jsx)(S.f,{className:"h-5 w-5 text-primary"}),children:(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("label",{className:"block text-[11px] font-bold uppercase tracking-wider mb-1.5",children:["Version ",(0,s.jsx)("span",{className:"text-accent",children:"*"})]}),(0,s.jsx)("input",{type:"text",value:H,onChange:e=>K(e.target.value),placeholder:"1.0.0",className:i.W})]}),U&&(0,s.jsxs)("div",{className:"rounded border border-border bg-bg p-3 text-xs space-y-1",children:[(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"text-text-muted",children:"Source:"})," ",U.nodeName]}),(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"text-text-muted",children:"Files:"})," ",U.skill.files.length," files"]}),(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"text-text-muted",children:"Tags:"})," ",["skill",...U.skill.tags].join(", ")]})]}),(0,s.jsxs)("div",{className:"flex justify-end gap-2 pt-2",children:[(0,s.jsx)(a.K,{variant:"secondary",size:"sm",onClick:()=>G(null),children:"Cancel"}),(0,s.jsx)(a.K,{size:"sm",onClick:()=>void Z(),disabled:V||!H,children:V?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(_.f,{className:"h-3.5 w-3.5 animate-spin mr-1.5"}),"Publishing..."]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(S.f,{className:"h-3.5 w-3.5 mr-1.5"}),"Publish"]})})]})]})})]})}],59180)},46670,e=>{"use strict";var s=e.i(43476),t=e.i(78571);let a={default:"border-border text-text-muted",success:"border-success/40 text-success bg-success/5 shadow-[0_0_6px_rgba(0,255,65,0.15)]",warning:"border-warning/40 text-warning bg-warning/5 shadow-[0_0_6px_rgba(255,179,0,0.15)]",danger:"border-danger/40 text-danger bg-danger/5 shadow-[0_0_6px_rgba(255,23,68,0.15)]",info:"border-info/40 text-info bg-info/5 shadow-[0_0_6px_rgba(0,176,255,0.15)]"},r={default:"bg-text-muted",success:"bg-success",warning:"bg-warning",danger:"bg-danger",info:"bg-info"};e.s(["t",0,function({children:e,variant:n="default",className:i,dot:l=!1,pulse:c=!1}){return(0,s.jsxs)("span",{className:(0,t.f)("inline-flex items-center gap-1.5 rounded-chip border px-2 py-0.5 text-[10px] font-bold uppercase tracking-wider",a[n],i),children:[l&&(0,s.jsxs)("span",{"aria-hidden":"true",className:"relative inline-flex h-1.5 w-1.5",children:[c&&(0,s.jsx)("span",{className:(0,t.f)("absolute inset-0 rounded-full animate-halo",r[n])}),(0,s.jsx)("span",{className:(0,t.f)("relative inline-flex h-1.5 w-1.5 rounded-full",r[n])})]}),e]})},"k",0,function(e){switch(e.toUpperCase()){case"ONLINE":case"COMPLETED":case"ACTIVE":case"RUNNING":case"INSTALLED":case"HEALTHY":return"success";case"DEGRADED":case"PAUSED":case"QUEUED":case"PENDING":case"INSTALLING":return"warning";case"OFFLINE":case"FAILED":case"ERROR":case"TIMEOUT":case"CANCELLED":case"DECOMMISSIONED":case"CRITICAL":return"danger";case"PROVISIONING":case"UPDATING":return"info";default:return"default"}}])},93999,51196,55427,e=>{"use strict";var s=e.i(43476),t=e.i(56420);let a={name:"arrow-down-right",size:24,node:[["path",{d:"m7 7 10 10",key:"1fmybs"}],["path",{d:"M17 7v10H7",key:"6fjiku"}]]};a.node;let r=(0,t.f)(a);var n=e.i(75775),i=e.i(78571),l=e.i(3062),c=e.i(35084);let o={warning:"shadow-[0_0_6px_var(--color-warning)]",danger:"shadow-[0_0_8px_var(--color-danger)]",accent:"shadow-[0_0_6px_var(--color-accent)]",primary:"shadow-[0_0_6px_var(--color-primary)]"},d={xs:"h-1",sm:"h-1.5",md:"h-2"};function x({value:e,max:t=100,tone:a,thresholds:r=c.q,label:n,size:l="xs",showValue:m=!1,valueLabel:p,glow:h,className:u,testId:f}){let g="number"==typeof e&&Number.isFinite(e),v=g?Math.max(0,Math.min(100,e/(t||1)*100)):0,j=a??(g?(0,c.Z)(v,r):"muted"),N=h||!a&&g&&v>=r.warn,b=p??(g?`${v.toFixed(+(v<10&&v>0))}%`:"—");return(0,s.jsxs)("div",{className:(0,i.f)("flex min-w-0 items-center gap-2",u),"data-testid":f,children:[(0,s.jsx)("div",{role:"meter","aria-label":n,"aria-valuemin":0,"aria-valuemax":t,"aria-valuenow":g?e:void 0,"aria-valuetext":b,className:(0,i.f)("relative flex-1 overflow-hidden rounded-full bg-border/70",d[l]),children:(0,s.jsx)("div",{style:{"--meter":`${v}%`},className:(0,i.f)("h-full w-(--meter) rounded-full transition-[width] duration-700 ease-out-expo starting:w-0",c.H[j],N&&o[j])})}),m&&(0,s.jsx)("span",{className:(0,i.f)("num w-11 shrink-0 text-right text-[11px]",g?c.T[j]:"text-text-muted"),children:b})]})}e.s(["f",0,x],51196);var m=e.i(71645);function p({values:e,tone:t="primary",width:a=160,height:r=32,area:n=!0,max:l,percent:o=!1,threshold:d,live:x=!0,emptyLabel:h="not enough data",className:u,testId:f,label:g,stretch:v=!1}){let j=`spark${(0,m.useId)().replace(/:/g,"")}`;if(e.length<2)return(0,s.jsx)("div",{className:(0,i.f)("flex h-8 items-center text-xs italic text-text-muted",u),"data-testid":f,children:h});let N=c.v[t],b=l??(o?Math.max(100,...e):Math.max(...e,d??0)||1),w=r-4,y=a/(e.length-1),k=e=>2+w-Math.max(0,e)/b*w,S=e.map((e,s)=>[s*y,k(e)]),_=S.map(([e,s])=>`${e.toFixed(1)},${s.toFixed(1)}`).join(" "),I=S[S.length-1];return(0,s.jsxs)("svg",{width:v?"100%":a,height:r,viewBox:`0 0 ${a} ${r}`,preserveAspectRatio:v?"none":void 0,className:(0,i.f)("block overflow-visible",u),"data-testid":f,role:g?"img":void 0,"aria-label":g,"aria-hidden":!g||void 0,children:[n&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("defs",{children:(0,s.jsxs)("linearGradient",{id:j,x1:"0",x2:"0",y1:"0",y2:"1",children:[(0,s.jsx)("stop",{offset:"0%",stopColor:N,stopOpacity:.35}),(0,s.jsx)("stop",{offset:"100%",stopColor:N,stopOpacity:0})]})}),(0,s.jsx)("polygon",{points:`0,${r} ${_} ${a},${r}`,fill:`url(#${j})`})]}),void 0!==d&&(0,s.jsx)("line",{x1:0,x2:a,y1:k(d),y2:k(d),stroke:"var(--color-warning)",strokeOpacity:.5,strokeDasharray:"3 3",strokeWidth:1}),(0,s.jsx)("polyline",{fill:"none",stroke:N,strokeWidth:1.5,vectorEffect:"non-scaling-stroke",strokeLinejoin:"round",strokeLinecap:"round",points:_}),x&&!v&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("circle",{cx:I[0],cy:I[1],r:2.5,fill:N,className:"origin-center animate-halo [transform-box:fill-box]"}),(0,s.jsx)("circle",{cx:I[0],cy:I[1],r:2,fill:N})]})]})}e.s(["f",0,p],55427),e.s(["N",0,function({title:e,description:t,children:a,className:r,action:n,tone:i,corners:c=!1,...o}){return(0,s.jsx)(l.f,{...o,tone:i,corners:c,title:e,description:t,action:n,className:r,children:a})},"n",0,function({label:e,value:t,icon:a,trend:o,spark:d,meter:m,delta:h,tone:u="primary",className:f,testId:g}){let v=!h||h.value>=0===(h.positiveIsGood??!0);return(0,s.jsxs)(l.f,{tone:u,className:(0,i.f)("overflow-hidden",f),testId:g,children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)("span",{className:"text-[10px] font-medium uppercase tracking-[0.15em] text-text-muted",children:e}),a&&(0,s.jsx)("span",{className:"text-primary/60",children:a})]}),(0,s.jsxs)("div",{className:"mt-2 flex items-end justify-between gap-2",children:[(0,s.jsx)("div",{className:(0,i.f)("num text-2xl font-bold","primary"===u?"text-primary neon-text":c.T[u]),children:t}),h&&0!==h.value&&(0,s.jsxs)("span",{className:(0,i.f)("num mb-1 inline-flex items-center gap-0.5 text-[11px]",v?"text-success":"text-danger"),children:[h.value>0?(0,s.jsx)(n.f,{className:"h-3 w-3"}):(0,s.jsx)(r,{className:"h-3 w-3"}),Math.abs(h.value).toFixed(+!Number.isInteger(h.value)),h.unit]})]}),o&&(0,s.jsx)("div",{className:(0,i.f)("mt-1 text-[11px]",o.positive?"text-success":"text-danger"),children:o.value}),void 0!==m&&(0,s.jsx)(x,{value:m,className:"mt-3",label:e}),d&&d.length>1&&(0,s.jsx)("div",{className:"-mx-5 -mb-5 mt-3 opacity-80",children:(0,s.jsx)(p,{values:d,tone:u,width:240,height:28,stretch:!0,live:!1})})]})}],93999)},3062,e=>{"use strict";var s=e.i(43476),t=e.i(78571),a=e.i(35084);let r={primary:"[--panel-corner-color:color-mix(in_srgb,var(--color-primary)_60%,transparent)]",accent:"[--panel-corner-color:color-mix(in_srgb,var(--color-accent)_70%,transparent)]",success:"[--panel-corner-color:color-mix(in_srgb,var(--color-success)_60%,transparent)]",warning:"[--panel-corner-color:color-mix(in_srgb,var(--color-warning)_70%,transparent)]",danger:"[--panel-corner-color:color-mix(in_srgb,var(--color-danger)_70%,transparent)]",info:"[--panel-corner-color:color-mix(in_srgb,var(--color-info)_60%,transparent)]",muted:"[--panel-corner-color:var(--color-border-strong)]"},n={primary:"[--glow-hover-color:var(--color-glow)]",accent:"[--glow-hover-color:var(--color-glow-accent)]",success:"[--glow-hover-color:var(--color-glow-success)]",warning:"[--glow-hover-color:var(--color-glow-warning)]",danger:"[--glow-hover-color:var(--color-glow-danger)]",info:"[--glow-hover-color:var(--color-glow)]",muted:"[--glow-hover-color:var(--color-glow)]"},i={primary:"hover:border-primary/30",accent:"hover:border-accent/40",success:"hover:border-success/30",warning:"hover:border-warning/40",danger:"hover:border-danger/40",info:"hover:border-info/30",muted:"hover:border-border-strong"},l={none:"",sm:"p-3",md:"p-5",lg:"p-6"};e.s(["f",0,function({tone:e="primary",corners:c=!0,interactive:o=!0,hero:d=!1,title:x,description:m,icon:p,action:h,as:u="div",padding:f="md",testId:g,className:v,children:j,...N}){return(0,s.jsxs)(u,{...N,"data-testid":g??N["data-testid"],className:(0,t.f)("relative rounded-panel border border-border bg-surface transition-colors duration-300",l[f],c&&"panel-corners",c&&r[e],o&&"glow-hover",o&&n[e],o&&i[e],d&&"grid-bg overflow-hidden bg-surface/80",v),children:[(x||h||p)&&(0,s.jsxs)("div",{className:"mb-4 flex items-start justify-between gap-3",children:[(0,s.jsxs)("div",{className:"flex min-w-0 items-start gap-2",children:[p&&(0,s.jsx)("span",{className:(0,t.f)("mt-0.5 shrink-0",a.T[e]),children:p}),(0,s.jsxs)("div",{className:"min-w-0",children:[x&&(0,s.jsx)("h3",{className:"text-xs font-bold uppercase tracking-wider",children:x}),m&&(0,s.jsx)("p",{className:"mt-0.5 text-[11px] text-text-muted",children:m})]})]}),h]}),j]})}])},63376,e=>{"use strict";var s=e.i(43476);e.s(["z",0,function({children:e,className:t}){return(0,s.jsx)("div",{className:`animate-page-in${t?` ${t}`:""}`,children:e})},"U",0,function({children:e,className:t}){return(0,s.jsx)("div",{className:t,children:e})}])},88187,25981,e=>{"use strict";var s=e.i(43476),t=e.i(32181),a=e.i(32781),r=e.i(51757),n=e.i(83967),i=e.i(15331);e.s(["f",0,function({title:e,description:l,nodes:c,scanning:o}){return(0,s.jsxs)(t.f.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},transition:{duration:.4,ease:[.16,1,.3,1]},className:"rounded border border-primary/30 bg-surface p-6 relative overflow-hidden",children:[o&&(0,s.jsx)(t.f.div,{className:"absolute inset-0 pointer-events-none",initial:{opacity:0},animate:{opacity:1},children:(0,s.jsx)(t.f.div,{className:"absolute left-0 right-0 h-px bg-gradient-to-r from-transparent via-primary/60 to-transparent",animate:{top:["0%","100%"]},transition:{duration:2,repeat:1/0,ease:"linear"}})}),(0,s.jsx)("div",{className:"absolute inset-0 rounded pointer-events-none",style:{boxShadow:o?"0 0 20px var(--color-glow), inset 0 0 20px rgba(0,229,255,0.03)":"none",transition:"box-shadow 0.5s ease"}}),(0,s.jsxs)("div",{className:"relative z-10",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[o?(0,s.jsx)(t.f.div,{animate:{rotate:360},transition:{duration:2,repeat:1/0,ease:"linear"},children:(0,s.jsx)(i.f,{className:"h-5 w-5 text-primary"})}):(0,s.jsx)(r.f,{className:"h-5 w-5 text-success"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"text-sm font-bold uppercase tracking-wider",children:o?e:"Scan Complete"}),l&&(0,s.jsx)("p",{className:"text-[11px] text-text-muted",children:l})]})]}),c.length>0&&(0,s.jsx)("div",{className:"space-y-2",children:c.map((e,i)=>(0,s.jsxs)(t.f.div,{initial:{opacity:0,x:-8},animate:{opacity:1,x:0},transition:{delay:.05*i,duration:.3},className:"flex items-center gap-3 text-xs",children:["scanning"===e.status&&(0,s.jsx)(a.f,{className:"h-3.5 w-3.5 text-primary animate-spin"}),"done"===e.status&&(0,s.jsx)(r.f,{className:"h-3.5 w-3.5 text-success"}),"error"===e.status&&(0,s.jsx)(n.f,{className:"h-3.5 w-3.5 text-danger"}),(0,s.jsx)("span",{className:"text-text",children:e.nodeName}),"error"===e.status&&e.error&&(0,s.jsx)("span",{className:"text-[10px] text-danger/70 truncate max-w-[200px]",children:e.error})]},e.nodeId))}),0===c.length&&o&&(0,s.jsx)("p",{className:"text-[11px] text-text-muted",children:"Discovering nodes..."})]})]})}],88187);var l=e.i(56420);let c={name:"upload",size:24,node:[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]};c.node;let o=(0,l.f)(c);e.s(["f",0,o],25981)},75775,e=>{"use strict";var s=e.i(56420);let t={name:"arrow-up-right",size:24,node:[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]};t.node;let a=(0,s.f)(t);e.s(["f",0,a],75775)},72382,e=>{"use strict";var s=e.i(56420);let t={name:"eye",size:24,node:[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]};t.node;let a=(0,s.f)(t);e.s(["f",0,a],72382)},89360,e=>{"use strict";var s=e.i(56420);let t={name:"file-code",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]]};t.node;let a=(0,s.f)(t);e.s(["f",0,a],89360)},79258,e=>{"use strict";var s=e.i(56420);let t={name:"package",size:24,node:[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]};t.node;let a=(0,s.f)(t);e.s(["f",0,a],79258)},95187,(e,s,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a={callServer:function(){return n.callServer},createServerReference:function(){return l.createServerReference},findSourceMapURL:function(){return i.findSourceMapURL}};for(var r in a)Object.defineProperty(t,r,{enumerable:!0,get:a[r]});let n=e.r(32120),i=e.r(92245),l=e.r(35326)}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,59180,e=>{"use strict";var s=e.i(43476),t=e.i(71645),a=e.i(68759),r=e.i(46670),n=e.i(93999),i=e.i(32568),l=e.i(82983),c=e.i(4050),d=e.i(95187);let o=(0,d.createServerReference)("4004d8dfd899547d64bca4a9d759648fdfac18b74d",d.callServer,void 0,d.findSourceMapURL,"scanSkills");var x=e.i(78571),m=e.i(63376),p=e.i(88187),h=e.i(41120),u=e.i(66595),f=e.i(79258),g=e.i(41220),v=e.i(56420);let j={name:"tag",size:24,node:[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]};j.node;let N=(0,v.f)(j);var b=e.i(89360),w=e.i(16327),y=e.i(67927),k=e.i(72382),S=e.i(25981),_=e.i(32781),I=e.i(64155),C=e.i(51757),z=e.i(83967);e.s(["default",0,function(){let{activeNode:e}=(0,c.l)(),[d,v]=(0,t.useState)([]),[j,E]=(0,t.useState)(!1),[M,L]=(0,t.useState)(null),[A,D]=(0,t.useState)(!1),[$,P]=(0,t.useState)(""),[T,R]=(0,t.useState)(new Set),[F,O]=(0,t.useState)(null),[U,G]=(0,t.useState)(null),[H,K]=(0,t.useState)(""),[V,q]=(0,t.useState)(!1),W=(0,t.useCallback)(async()=>{E(!0),v([]),L(null);let s=Date.now();try{let s=await o(e.id);if(s.success&&Array.isArray(s.data)){let e=s.data.map(e=>({...e,status:"error"===e.status?"error":"done",skills:e.skills.map(e=>({...e,files:e.files.map(e=>"string"==typeof e?{name:e,content:""}:e)}))}));v(e);let t=new Set(e.filter(e=>e.skills.length>0).map(e=>e.nodeId));R(t.size>0?t:new Set(e.map(e=>e.nodeId)))}else L(s.error?.message??"Scan returned unsuccessful response")}catch(s){let e=s instanceof Error?s.message:"Scan request failed";L(e)}finally{let e=Date.now()-s;e<1500&&await new Promise(s=>setTimeout(s,1500-e)),E(!1),D(!0)}},[e]);(0,t.useEffect)(()=>{e&&W()},[e,W]);let B=d.reduce((e,s)=>e+("done"===s.status?s.skills.length:0),0),J=d.filter(e=>"done"===e.status).length,Q=d.filter(e=>"error"===e.status).length,Y=e=>{if(!$)return!0;let s=$.toLowerCase();return e.name.toLowerCase().includes(s)||e.description.toLowerCase().includes(s)||e.tags.some(e=>e.toLowerCase().includes(s))},Z=async()=>{if(U&&H){q(!0);try{let e={name:U.skill.name,version:H,description:U.skill.description,author:U.skill.author,entryPoint:U.skill.entryPoint,dependencies:U.skill.dependencies,tags:U.skill.tags},s={};for(let e of U.skill.files)s[e.name]=e.content;let t=JSON.stringify({manifest:e,files:s},null,2);await l.f.library.files.create({name:`${U.skill.name} v${H}`,fileName:`${U.skill.name}-${H}.json`,mimeType:"application/x-magnus-skill",content:t,tags:["skill",...U.skill.tags]}),G(null),K("")}catch{}finally{q(!1)}}};return(0,s.jsxs)(m.U,{className:"space-y-6",children:[(0,s.jsx)(m.z,{children:(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h1",{className:"text-lg font-bold uppercase tracking-wider",children:"Skills"}),(0,s.jsx)("p",{className:"text-[11px] text-text-muted uppercase tracking-wider",children:"Discover and manage Hermes Agent skills across your fleet"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[A&&!j&&(0,s.jsxs)("span",{className:"text-[10px] text-text-muted uppercase tracking-wider mr-2",children:[d.length," node",1!==d.length?"s":""," · ",B," skill",1!==B?"s":"",Q>0&&` \xb7 ${Q} error${1!==Q?"s":""}`]}),(0,s.jsxs)(a.K,{variant:"secondary",size:"sm",onClick:()=>void W(),disabled:j,children:[(0,s.jsx)(h.f,{className:(0,x.f)("h-3.5 w-3.5 mr-1.5",j&&"animate-spin")}),j?"Scanning...":"Rescan"]})]})]})}),j&&(0,s.jsx)(m.z,{children:(0,s.jsx)(p.f,{title:"Scanning Nodes for Skills",description:"Probing all online nodes...",nodes:d.map(e=>({nodeId:e.nodeId,nodeName:e.nodeName,status:e.status,error:e.error})),scanning:!0})}),!j&&A&&B>0&&(0,s.jsx)(m.z,{children:(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)(u.f,{className:"absolute left-3 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-text-muted"}),(0,s.jsx)("input",{type:"text",placeholder:"Search skills by name, description, or tag...",value:$,onChange:e=>P(e.target.value),className:(0,x.f)(i.W,"pl-9")})]})}),!j&&A&&M&&(0,s.jsx)(m.z,{children:(0,s.jsx)(n.N,{children:(0,s.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[(0,s.jsx)(I.f,{className:"h-10 w-10 text-danger/60 mb-3"}),(0,s.jsx)("p",{className:"text-xs font-bold text-danger mb-1",children:"Scan Failed"}),(0,s.jsx)("p",{className:"text-[11px] text-text-muted max-w-md",children:M}),(0,s.jsxs)(a.K,{variant:"secondary",size:"sm",className:"mt-4",onClick:()=>void W(),children:[(0,s.jsx)(h.f,{className:"h-3.5 w-3.5 mr-1.5"}),"Retry Scan"]})]})})}),!j&&A&&!M&&(0,s.jsxs)(s.Fragment,{children:[0===d.length?(0,s.jsx)(m.z,{children:(0,s.jsx)(n.N,{children:(0,s.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[(0,s.jsx)(g.f,{className:"h-10 w-10 text-text-muted/40 mb-3"}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"No online nodes found to scan. Ensure at least one node agent is running and connected."})]})})}):d.map(e=>{let t=T.has(e.nodeId),i=e.skills.filter(Y);return(0,s.jsx)(m.z,{children:(0,s.jsxs)(n.N,{className:"overflow-hidden",children:[(0,s.jsxs)("button",{onClick:()=>{var s;return s=e.nodeId,void R(e=>{let t=new Set(e);return t.has(s)?t.delete(s):t.add(s),t})},className:"w-full flex items-center gap-4 p-4 text-left hover:bg-surface-hover transition-all",children:[(0,s.jsx)("div",{className:"flex h-9 w-9 items-center justify-center rounded border border-primary/30 bg-primary/5 shrink-0",children:(0,s.jsx)(g.f,{className:"h-4 w-4 text-primary"})}),(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"text-xs font-bold uppercase tracking-wider",children:e.nodeName}),"done"===e.status&&(0,s.jsxs)(r.t,{variant:e.skills.length>0?"success":"default",children:[e.skills.length," skill",1!==e.skills.length?"s":""]}),"error"===e.status&&(0,s.jsx)(r.t,{variant:"danger",children:"Error"})]}),"error"===e.status&&e.error&&(0,s.jsx)("p",{className:"text-[11px] text-danger mt-0.5 truncate",children:e.error}),"done"===e.status&&0===e.skills.length&&(0,s.jsx)("p",{className:"text-[11px] text-text-muted mt-0.5",children:"No skills installed on this node"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:["done"===e.status?(0,s.jsx)(C.f,{className:"h-4 w-4 text-success"}):(0,s.jsx)(z.f,{className:"h-4 w-4 text-danger"}),t?(0,s.jsx)(w.f,{className:"h-4 w-4 text-text-muted"}):(0,s.jsx)(y.f,{className:"h-4 w-4 text-text-muted"})]})]}),t&&"done"===e.status&&(0,s.jsx)("div",{className:"border-t border-border/50 bg-bg/50",children:0===i.length?(0,s.jsx)("div",{className:"flex items-center justify-center py-8 text-center",children:(0,s.jsx)("p",{className:"text-[11px] text-text-muted",children:0===e.skills.length?"No skills installed on this node. Deploy skills from the Library.":"No skills match your search on this node."})}):(0,s.jsx)("div",{className:"divide-y divide-border/30",children:i.map(t=>(0,s.jsxs)("div",{className:"p-4 space-y-3",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(f.f,{className:"h-4 w-4 text-primary"}),(0,s.jsx)("span",{className:"text-xs font-bold",children:t.name}),(0,s.jsx)(r.t,{variant:"info",children:t.version})]}),(0,s.jsxs)(a.K,{size:"sm",variant:"secondary",onClick:()=>{G({skill:t,nodeId:e.nodeId,nodeName:e.nodeName}),K(t.version)},children:[(0,s.jsx)(S.f,{className:"h-3 w-3 mr-1"}),"Publish"]})]}),t.description&&(0,s.jsx)("p",{className:"text-[11px] text-text-muted",children:t.description}),t.tags.length>0&&(0,s.jsx)("div",{className:"flex flex-wrap gap-1",children:t.tags.map(e=>(0,s.jsxs)(r.t,{variant:"default",children:[(0,s.jsx)(N,{className:"h-2.5 w-2.5 mr-1"}),e]},e))}),(0,s.jsxs)("div",{className:"grid grid-cols-3 gap-3",children:[(0,s.jsxs)("div",{className:"rounded border border-border bg-surface p-2",children:[(0,s.jsx)("p",{className:"text-[10px] font-bold uppercase tracking-wider text-text-muted mb-0.5",children:"Author"}),(0,s.jsx)("p",{className:"text-[11px]",children:t.author||"—"})]}),(0,s.jsxs)("div",{className:"rounded border border-border bg-surface p-2",children:[(0,s.jsx)("p",{className:"text-[10px] font-bold uppercase tracking-wider text-text-muted mb-0.5",children:"Entry Point"}),(0,s.jsx)("p",{className:"text-[11px]",children:t.entryPoint||"—"})]}),(0,s.jsxs)("div",{className:"rounded border border-border bg-surface p-2",children:[(0,s.jsx)("p",{className:"text-[10px] font-bold uppercase tracking-wider text-text-muted mb-0.5",children:"Dependencies"}),(0,s.jsx)("p",{className:"text-[11px]",children:t.dependencies.length>0?t.dependencies.join(", "):"—"})]})]}),t.files.length>0&&(0,s.jsxs)("div",{children:[(0,s.jsxs)("p",{className:"text-[10px] font-bold uppercase tracking-wider text-text-muted mb-1.5",children:["Files (",t.files.length,")"]}),(0,s.jsx)("div",{className:"space-y-1",children:t.files.map(e=>(0,s.jsxs)("button",{onClick:()=>O(e),className:"flex items-center gap-2 rounded border border-border/50 px-3 py-1.5 text-xs hover:border-primary/30 hover:shadow-[0_0_20px_var(--color-glow)] transition-all w-full text-left",children:[(0,s.jsx)(b.f,{className:"h-3 w-3 text-primary"}),(0,s.jsx)("span",{children:e.name}),(0,s.jsx)(k.f,{className:"h-3 w-3 text-text-muted ml-auto"})]},e.name))})]})]},t.name))})})]})},e.nodeId)}),d.length>0&&(0,s.jsx)(m.z,{children:(0,s.jsxs)("div",{className:"flex items-center justify-between text-[10px] text-text-muted uppercase tracking-wider",children:[(0,s.jsxs)("span",{children:[J," node",1!==J?"s":""," scanned ·"," ",B," skill",1!==B?"s":""," discovered"]}),Q>0&&(0,s.jsxs)("span",{className:"text-danger",children:[Q," node",1!==Q?"s":""," unreachable"]})]})})]}),(0,s.jsx)(i.n,{open:!!F,onClose:()=>O(null),title:F?.name??"File",icon:(0,s.jsx)(b.f,{className:"h-5 w-5 text-primary"}),className:"max-w-3xl",children:(0,s.jsx)("pre",{className:"rounded border border-border bg-bg p-4 text-xs overflow-auto max-h-96 whitespace-pre-wrap",children:F?.content||"(empty)"})}),(0,s.jsx)(i.n,{open:!!U,onClose:()=>G(null),title:"Publish to Library",description:U?.skill.name??"",icon:(0,s.jsx)(S.f,{className:"h-5 w-5 text-primary"}),children:(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("label",{className:"block text-[11px] font-bold uppercase tracking-wider mb-1.5",children:["Version ",(0,s.jsx)("span",{className:"text-accent",children:"*"})]}),(0,s.jsx)("input",{type:"text",value:H,onChange:e=>K(e.target.value),placeholder:"1.0.0",className:i.W})]}),U&&(0,s.jsxs)("div",{className:"rounded border border-border bg-bg p-3 text-xs space-y-1",children:[(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"text-text-muted",children:"Source:"})," ",U.nodeName]}),(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"text-text-muted",children:"Files:"})," ",U.skill.files.length," files"]}),(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"text-text-muted",children:"Tags:"})," ",["skill",...U.skill.tags].join(", ")]})]}),(0,s.jsxs)("div",{className:"flex justify-end gap-2 pt-2",children:[(0,s.jsx)(a.K,{variant:"secondary",size:"sm",onClick:()=>G(null),children:"Cancel"}),(0,s.jsx)(a.K,{size:"sm",onClick:()=>void Z(),disabled:V||!H,children:V?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(_.f,{className:"h-3.5 w-3.5 animate-spin mr-1.5"}),"Publishing..."]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(S.f,{className:"h-3.5 w-3.5 mr-1.5"}),"Publish"]})})]})]})})]})}],59180)},46670,e=>{"use strict";var s=e.i(43476),t=e.i(78571);let a={default:"border-border text-text-muted",success:"border-success/40 text-success bg-success/5 shadow-[0_0_6px_rgba(0,255,65,0.15)]",warning:"border-warning/40 text-warning bg-warning/5 shadow-[0_0_6px_rgba(255,179,0,0.15)]",danger:"border-danger/40 text-danger bg-danger/5 shadow-[0_0_6px_rgba(255,23,68,0.15)]",info:"border-info/40 text-info bg-info/5 shadow-[0_0_6px_rgba(0,176,255,0.15)]"},r={default:"bg-text-muted",success:"bg-success",warning:"bg-warning",danger:"bg-danger",info:"bg-info"};e.s(["t",0,function({children:e,variant:n="default",className:i,dot:l=!1,pulse:c=!1}){return(0,s.jsxs)("span",{className:(0,t.f)("inline-flex items-center gap-1.5 rounded-chip border px-2 py-0.5 text-[10px] font-bold uppercase tracking-wider",a[n],i),children:[l&&(0,s.jsxs)("span",{"aria-hidden":"true",className:"relative inline-flex h-1.5 w-1.5",children:[c&&(0,s.jsx)("span",{className:(0,t.f)("absolute inset-0 rounded-full animate-halo",r[n])}),(0,s.jsx)("span",{className:(0,t.f)("relative inline-flex h-1.5 w-1.5 rounded-full",r[n])})]}),e]})},"k",0,function(e){switch(e.toUpperCase()){case"ONLINE":case"COMPLETED":case"ACTIVE":case"RUNNING":case"INSTALLED":case"HEALTHY":return"success";case"DEGRADED":case"PAUSED":case"QUEUED":case"PENDING":case"INSTALLING":return"warning";case"OFFLINE":case"FAILED":case"ERROR":case"TIMEOUT":case"CANCELLED":case"DECOMMISSIONED":case"CRITICAL":return"danger";case"PROVISIONING":case"UPDATING":return"info";default:return"default"}}])},93999,51196,55427,e=>{"use strict";var s=e.i(43476),t=e.i(56420);let a={name:"arrow-down-right",size:24,node:[["path",{d:"m7 7 10 10",key:"1fmybs"}],["path",{d:"M17 7v10H7",key:"6fjiku"}]]};a.node;let r=(0,t.f)(a);var n=e.i(75775),i=e.i(78571),l=e.i(3062),c=e.i(35084);let d={warning:"shadow-[0_0_6px_var(--color-warning)]",danger:"shadow-[0_0_8px_var(--color-danger)]",accent:"shadow-[0_0_6px_var(--color-accent)]",primary:"shadow-[0_0_6px_var(--color-primary)]"},o={xs:"h-1",sm:"h-1.5",md:"h-2"};function x({value:e,max:t=100,tone:a,thresholds:r=c.q,label:n,size:l="xs",showValue:m=!1,valueLabel:p,glow:h,className:u,testId:f}){let g="number"==typeof e&&Number.isFinite(e),v=g?Math.max(0,Math.min(100,e/(t||1)*100)):0,j=a??(g?(0,c.Z)(v,r):"muted"),N=h||!a&&g&&v>=r.warn,b=p??(g?`${v.toFixed(+(v<10&&v>0))}%`:"—");return(0,s.jsxs)("div",{className:(0,i.f)("flex min-w-0 items-center gap-2",u),"data-testid":f,children:[(0,s.jsx)("div",{role:"meter","aria-label":n,"aria-valuemin":0,"aria-valuemax":t,"aria-valuenow":g?e:void 0,"aria-valuetext":b,className:(0,i.f)("relative flex-1 overflow-hidden rounded-full bg-border/70",o[l]),children:(0,s.jsx)("div",{style:{"--meter":`${v}%`},className:(0,i.f)("h-full w-(--meter) rounded-full transition-[width] duration-700 ease-out-expo starting:w-0",c.H[j],N&&d[j])})}),m&&(0,s.jsx)("span",{className:(0,i.f)("num w-11 shrink-0 text-right text-[11px]",g?c.T[j]:"text-text-muted"),children:b})]})}e.s(["f",0,x],51196);var m=e.i(71645);function p({values:e,tone:t="primary",width:a=160,height:r=32,area:n=!0,max:l,percent:d=!1,threshold:o,live:x=!0,emptyLabel:h="not enough data",className:u,testId:f,label:g,stretch:v=!1}){let j=`spark${(0,m.useId)().replace(/:/g,"")}`;if(e.length<2)return(0,s.jsx)("div",{className:(0,i.f)("flex h-8 items-center text-xs italic text-text-muted",u),"data-testid":f,children:h});let N=c.v[t],b=l??(d?Math.max(100,...e):Math.max(...e,o??0)||1),w=r-4,y=a/(e.length-1),k=e=>2+w-Math.max(0,e)/b*w,S=e.map((e,s)=>[s*y,k(e)]),_=S.map(([e,s])=>`${e.toFixed(1)},${s.toFixed(1)}`).join(" "),I=S[S.length-1];return(0,s.jsxs)("svg",{width:v?"100%":a,height:r,viewBox:`0 0 ${a} ${r}`,preserveAspectRatio:v?"none":void 0,className:(0,i.f)("block overflow-visible",u),"data-testid":f,role:g?"img":void 0,"aria-label":g,"aria-hidden":!g||void 0,children:[n&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("defs",{children:(0,s.jsxs)("linearGradient",{id:j,x1:"0",x2:"0",y1:"0",y2:"1",children:[(0,s.jsx)("stop",{offset:"0%",stopColor:N,stopOpacity:.35}),(0,s.jsx)("stop",{offset:"100%",stopColor:N,stopOpacity:0})]})}),(0,s.jsx)("polygon",{points:`0,${r} ${_} ${a},${r}`,fill:`url(#${j})`})]}),void 0!==o&&(0,s.jsx)("line",{x1:0,x2:a,y1:k(o),y2:k(o),stroke:"var(--color-warning)",strokeOpacity:.5,strokeDasharray:"3 3",strokeWidth:1}),(0,s.jsx)("polyline",{fill:"none",stroke:N,strokeWidth:1.5,vectorEffect:"non-scaling-stroke",strokeLinejoin:"round",strokeLinecap:"round",points:_}),x&&!v&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("circle",{cx:I[0],cy:I[1],r:2.5,fill:N,className:"origin-center animate-halo [transform-box:fill-box]"}),(0,s.jsx)("circle",{cx:I[0],cy:I[1],r:2,fill:N})]})]})}e.s(["f",0,p],55427),e.s(["N",0,function({title:e,description:t,children:a,className:r,action:n,tone:i,corners:c=!1,...d}){return(0,s.jsx)(l.f,{...d,tone:i,corners:c,title:e,description:t,action:n,className:r,children:a})},"n",0,function({label:e,value:t,icon:a,trend:d,spark:o,meter:m,delta:h,tone:u="primary",className:f,testId:g}){let v=!h||h.value>=0===(h.positiveIsGood??!0);return(0,s.jsxs)(l.f,{tone:u,className:(0,i.f)("overflow-hidden",f),testId:g,children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)("span",{className:"text-[10px] font-medium uppercase tracking-[0.15em] text-text-muted",children:e}),a&&(0,s.jsx)("span",{className:"text-primary/60",children:a})]}),(0,s.jsxs)("div",{className:"mt-2 flex items-end justify-between gap-2",children:[(0,s.jsx)("div",{className:(0,i.f)("num text-2xl font-bold","primary"===u?"text-primary neon-text":c.T[u]),children:t}),h&&0!==h.value&&(0,s.jsxs)("span",{className:(0,i.f)("num mb-1 inline-flex items-center gap-0.5 text-[11px]",v?"text-success":"text-danger"),children:[h.value>0?(0,s.jsx)(n.f,{className:"h-3 w-3"}):(0,s.jsx)(r,{className:"h-3 w-3"}),Math.abs(h.value).toFixed(+!Number.isInteger(h.value)),h.unit]})]}),d&&(0,s.jsx)("div",{className:(0,i.f)("mt-1 text-[11px]",d.positive?"text-success":"text-danger"),children:d.value}),void 0!==m&&(0,s.jsx)(x,{value:m,className:"mt-3",label:e}),o&&o.length>1&&(0,s.jsx)("div",{className:"-mx-5 -mb-5 mt-3 opacity-80",children:(0,s.jsx)(p,{values:o,tone:u,width:240,height:28,stretch:!0,live:!1})})]})}],93999)},3062,e=>{"use strict";var s=e.i(43476),t=e.i(78571),a=e.i(35084);let r={primary:"[--panel-corner-color:color-mix(in_srgb,var(--color-primary)_60%,transparent)]",accent:"[--panel-corner-color:color-mix(in_srgb,var(--color-accent)_70%,transparent)]",success:"[--panel-corner-color:color-mix(in_srgb,var(--color-success)_60%,transparent)]",warning:"[--panel-corner-color:color-mix(in_srgb,var(--color-warning)_70%,transparent)]",danger:"[--panel-corner-color:color-mix(in_srgb,var(--color-danger)_70%,transparent)]",info:"[--panel-corner-color:color-mix(in_srgb,var(--color-info)_60%,transparent)]",muted:"[--panel-corner-color:var(--color-border-strong)]"},n={primary:"[--glow-hover-color:var(--color-glow)]",accent:"[--glow-hover-color:var(--color-glow-accent)]",success:"[--glow-hover-color:var(--color-glow-success)]",warning:"[--glow-hover-color:var(--color-glow-warning)]",danger:"[--glow-hover-color:var(--color-glow-danger)]",info:"[--glow-hover-color:var(--color-glow)]",muted:"[--glow-hover-color:var(--color-glow)]"},i={primary:"hover:border-primary/30",accent:"hover:border-accent/40",success:"hover:border-success/30",warning:"hover:border-warning/40",danger:"hover:border-danger/40",info:"hover:border-info/30",muted:"hover:border-border-strong"},l={none:"",sm:"p-3",md:"p-5",lg:"p-6"};e.s(["f",0,function({tone:e="primary",corners:c=!0,interactive:d=!0,hero:o=!1,title:x,description:m,icon:p,action:h,as:u="div",padding:f="md",testId:g,className:v,children:j,...N}){return(0,s.jsxs)(u,{...N,"data-testid":g??N["data-testid"],className:(0,t.f)("relative rounded-panel border border-border bg-surface transition-colors duration-300",l[f],c&&"panel-corners",c&&r[e],d&&"glow-hover",d&&n[e],d&&i[e],o&&"grid-bg overflow-hidden bg-surface/80",v),children:[(x||h||p)&&(0,s.jsxs)("div",{className:"mb-4 flex items-start justify-between gap-3",children:[(0,s.jsxs)("div",{className:"flex min-w-0 items-start gap-2",children:[p&&(0,s.jsx)("span",{className:(0,t.f)("mt-0.5 shrink-0",a.T[e]),children:p}),(0,s.jsxs)("div",{className:"min-w-0",children:[x&&(0,s.jsx)("h3",{className:"text-xs font-bold uppercase tracking-wider",children:x}),m&&(0,s.jsx)("p",{className:"mt-0.5 text-[11px] text-text-muted",children:m})]})]}),h]}),j]})}])},63376,e=>{"use strict";var s=e.i(43476);e.s(["z",0,function({children:e,className:t}){return(0,s.jsx)("div",{className:`animate-page-in${t?` ${t}`:""}`,children:e})},"U",0,function({children:e,className:t}){return(0,s.jsx)("div",{className:t,children:e})}])},88187,25981,e=>{"use strict";var s=e.i(43476),t=e.i(32181),a=e.i(32781),r=e.i(51757),n=e.i(83967),i=e.i(15331);e.s(["f",0,function({title:e,description:l,nodes:c,scanning:d}){return(0,s.jsxs)(t.f.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},transition:{duration:.4,ease:[.16,1,.3,1]},className:"rounded border border-primary/30 bg-surface p-6 relative overflow-hidden",children:[d&&(0,s.jsx)(t.f.div,{className:"absolute inset-0 pointer-events-none",initial:{opacity:0},animate:{opacity:1},children:(0,s.jsx)(t.f.div,{className:"absolute left-0 right-0 h-px bg-gradient-to-r from-transparent via-primary/60 to-transparent",animate:{top:["0%","100%"]},transition:{duration:2,repeat:1/0,ease:"linear"}})}),(0,s.jsx)("div",{className:"absolute inset-0 rounded pointer-events-none",style:{boxShadow:d?"0 0 20px var(--color-glow), inset 0 0 20px rgba(0,229,255,0.03)":"none",transition:"box-shadow 0.5s ease"}}),(0,s.jsxs)("div",{className:"relative z-10",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[d?(0,s.jsx)(t.f.div,{animate:{rotate:360},transition:{duration:2,repeat:1/0,ease:"linear"},children:(0,s.jsx)(i.f,{className:"h-5 w-5 text-primary"})}):(0,s.jsx)(r.f,{className:"h-5 w-5 text-success"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"text-sm font-bold uppercase tracking-wider",children:d?e:"Scan Complete"}),l&&(0,s.jsx)("p",{className:"text-[11px] text-text-muted",children:l})]})]}),c.length>0&&(0,s.jsx)("div",{className:"space-y-2",children:c.map((e,i)=>(0,s.jsxs)(t.f.div,{initial:{opacity:0,x:-8},animate:{opacity:1,x:0},transition:{delay:.05*i,duration:.3},className:"flex items-center gap-3 text-xs",children:["scanning"===e.status&&(0,s.jsx)(a.f,{className:"h-3.5 w-3.5 text-primary animate-spin"}),"done"===e.status&&(0,s.jsx)(r.f,{className:"h-3.5 w-3.5 text-success"}),"error"===e.status&&(0,s.jsx)(n.f,{className:"h-3.5 w-3.5 text-danger"}),(0,s.jsx)("span",{className:"text-text",children:e.nodeName}),"error"===e.status&&e.error&&(0,s.jsx)("span",{className:"text-[10px] text-danger/70 truncate max-w-[200px]",children:e.error})]},e.nodeId))}),0===c.length&&d&&(0,s.jsx)("p",{className:"text-[11px] text-text-muted",children:"Discovering nodes..."})]})]})}],88187);var l=e.i(56420);let c={name:"upload",size:24,node:[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]};c.node;let d=(0,l.f)(c);e.s(["f",0,d],25981)},75775,e=>{"use strict";var s=e.i(56420);let t={name:"arrow-up-right",size:24,node:[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]};t.node;let a=(0,s.f)(t);e.s(["f",0,a],75775)},72382,e=>{"use strict";var s=e.i(56420);let t={name:"eye",size:24,node:[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]};t.node;let a=(0,s.f)(t);e.s(["f",0,a],72382)},89360,e=>{"use strict";var s=e.i(56420);let t={name:"file-code",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]]};t.node;let a=(0,s.f)(t);e.s(["f",0,a],89360)},79258,e=>{"use strict";var s=e.i(56420);let t={name:"package",size:24,node:[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]};t.node;let a=(0,s.f)(t);e.s(["f",0,a],79258)},95187,(e,s,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a={callServer:function(){return n.callServer},createServerReference:function(){return l.createServerReference},findSourceMapURL:function(){return i.findSourceMapURL}};for(var r in a)Object.defineProperty(t,r,{enumerable:!0,get:a[r]});let n=e.r(32120),i=e.r(92245),l=e.r(35326)}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,8593,e=>{"use strict";var t=e.i(43476),s=e.i(71645),r=e.i(93999),a=e.i(46670),n=e.i(41220),i=e.i(4139),l=e.i(74544),o=e.i(79432),c=e.i(41120),d=e.i(28623),u=e.i(64155),x=e.i(10818),m=e.i(92026),f=e.i(56420);let p={name:"pin",size:24,node:[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]]};p.node;let h=(0,f.f)(p),g={name:"pin-off",size:24,node:[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89",key:"znwnzq"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11",key:"c9qhm2"}]]};g.node;let v=(0,f.f)(g),b={name:"globe",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]};b.node;let j=(0,f.f)(b);var w=e.i(82954),y=e.i(15331),N=e.i(3062),_=e.i(73404),k=e.i(54149),I=e.i(51196),M=e.i(75723),$=e.i(78571),A=e.i(72603);function S({value:e,decimals:r=0,prefix:a="",suffix:n="",format:i,duration:l=600,className:o}){let c="number"==typeof e&&Number.isFinite(e),[d,u]=(0,s.useState)(c?e:null),x=(0,s.useRef)(c?e:null);(0,s.useEffect)(()=>{if(!c){x.current=null,u(null);return}let t=x.current;if(x.current=e,null===t||t===e||(0,A.d)())return void u(e);let s=0,r=performance.now(),a=n=>{let i=Math.min(1,(n-r)/l);u(t+(e-t)*(i>=1?1:1-Math.pow(2,-10*i))),i<1&&(s=requestAnimationFrame(a))};return s=requestAnimationFrame(a),()=>cancelAnimationFrame(s)},[c,e,l]);let m=null===d?"—":`${a}${i?i(d):d.toFixed(r)}${n}`;return(0,t.jsx)("span",{className:(0,$.f)("num",o),children:m})}var C=e.i(2067),O=e.i(65369),P=e.i(21176);let E={online:"bg-success shadow-[0_0_6px_var(--color-success)]",degraded:"bg-warning shadow-[0_0_6px_var(--color-warning)]",offline:"bg-danger shadow-[0_0_8px_var(--color-danger)]",provisioning:"bg-info shadow-[0_0_6px_var(--color-info)]"};function F(e){let t=43758.5453*Math.sin(12.9898*e+78.233);return t-Math.floor(t)}function L({counts:e,size:s=176,className:r}){let a=[],n=1;for(let t of["offline","degraded","provisioning","online"])for(let s=0;s<e[t]&&a.length<64;s++,n++){let e="online"===t?[.45,.92]:"provisioning"===t?[.3,.7]:[.15,.55],r=e[0]+F(n)*(e[1]-e[0]),i=F(n+101)*Math.PI*2;a.push({key:`${t}-${s}`,status:t,x:50+Math.cos(i)*r*50,y:50+Math.sin(i)*r*50})}let i=e.online+e.degraded+e.offline+e.provisioning;return(0,t.jsxs)("div",{role:"img","aria-label":`Fleet radar: ${e.online} online, ${e.degraded} degraded, ${e.offline} offline, ${e.provisioning} provisioning`,className:(0,$.f)("relative shrink-0 overflow-hidden rounded-full border border-primary/30 bg-bg shadow-[0_0_24px_var(--color-glow),inset_0_0_24px_var(--color-glow)]",r),style:{width:s,height:s},children:[(0,t.jsx)("div",{className:"absolute inset-[16%] rounded-full border border-primary/15"}),(0,t.jsx)("div",{className:"absolute inset-[33%] rounded-full border border-primary/15"}),(0,t.jsx)("div",{className:"absolute inset-y-0 left-1/2 w-px bg-primary/10"}),(0,t.jsx)("div",{className:"absolute inset-x-0 top-1/2 h-px bg-primary/10"}),(0,t.jsx)("div",{"aria-hidden":"true",className:"absolute inset-0 animate-sweep rounded-full bg-[conic-gradient(from_0deg,transparent_0deg,transparent_290deg,color-mix(in_srgb,var(--color-primary)_35%,transparent)_355deg,var(--color-primary)_360deg)] opacity-70"}),a.map(e=>(0,t.jsx)("span",{"aria-hidden":"true",className:(0,$.f)("absolute h-1.5 w-1.5 -translate-x-1/2 -translate-y-1/2 rounded-full",E[e.status],"offline"===e.status&&"animate-pulse"),style:{left:`${e.x}%`,top:`${e.y}%`}},e.key)),(0,t.jsxs)("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:[(0,t.jsx)("span",{className:"num text-2xl font-bold text-primary glow-text-primary",children:i}),(0,t.jsx)("span",{className:"text-[9px] uppercase tracking-[0.25em] text-text-muted",children:"nodes"})]})]})}var R=e.i(1092);function T(e,t){return e.map(e=>e[t]).filter(e=>"number"==typeof e&&Number.isFinite(e))}var z=e.i(68759),D=e.i(82983),U=e.i(4050),G=e.i(71417),B=e.i(63376),V=e.i(22016),H=e.i(67683);function q({href:e,label:s,icon:r}){return(0,t.jsxs)(V.default,{href:e,className:"glow-hover group flex flex-col items-center gap-2 rounded-panel border border-border bg-surface-raised/60 p-4 text-center transition-colors duration-300 hover:border-primary/50 hover:bg-primary/5",children:[(0,t.jsx)("span",{className:"text-primary transition-all group-hover:drop-shadow-[0_0_8px_var(--color-primary)]",children:r}),(0,t.jsx)("span",{className:"text-[11px] font-medium uppercase tracking-wider text-text-muted group-hover:text-primary transition-colors",children:s})]})}e.s(["default",0,function({initialStats:e,initialTailscaleSummary:f}){let p,g,{activeNode:b,nodes:$}=(0,U.l)(),[A,E]=(0,s.useState)(e),[F,J]=(0,s.useState)(f),[W,K]=(0,s.useState)(!e),[Q,X]=(0,s.useState)([]),[Z,Y]=(0,s.useState)(null),[ee,et]=(0,s.useState)([]),es=(0,s.useRef)(!!e),[er,ea]=(0,s.useState)(!1),[en,ei]=(0,s.useState)([]),el=(0,s.useCallback)(async()=>{try{let e=await fetch("/api/federation"),t=await e.json();t.success&&(E(t.data.aggregated),ei(t.data.fleets))}catch{}},[]),eo=(0,s.useCallback)(async()=>{let e=await D.f.nodes.tailscaleSummary().catch(()=>null);e?.success&&e.data&&J(e.data)},[]),ec=(0,s.useCallback)(async(e=!1)=>{try{e||K(!0),eo();let t=await D.f.stats.overview();t.success&&E(t.data)}catch(t){let e=t instanceof Error?t.message:String(t);console.error("[DashboardPage] fetchStats error:",e)}finally{e||K(!1)}},[eo]);(0,s.useEffect)(()=>{if(er){el();let e=setInterval(()=>void el(),15e3);return()=>clearInterval(e)}if(es.current){es.current=!1,f||eo();let e=setInterval(()=>void ec(!0),15e3);return()=>clearInterval(e)}E(null),K(!0),ec();let e=setInterval(()=>void ec(!0),15e3);return()=>clearInterval(e)},[ec,el,eo,b.id,er,f]);let ed=(0,s.useCallback)(async()=>{try{let[e,t]=await Promise.all([D.f.assistant.getInsights(),D.f.assistant.listPinnedInsights()]);X(e.data?.insights??[]),Y(e.data?.generatedAt??null),et(t.data?.pins??[])}catch{}},[]);async function eu(e){let t=ee.find(t=>t.title===e.title&&t.body===e.body);try{t?await D.f.assistant.unpinInsight(t.id):await D.f.assistant.pinInsight({...e,generatedAt:Z??void 0}),await ed()}catch{}}(0,s.useEffect)(()=>{ed();let e=setInterval(()=>void ed(),3e5);return()=>clearInterval(e)},[ed]);let ex=function(e,t){let[r,a]=(0,s.useState)([]);(0,s.useEffect)(()=>{a(function(e){try{let t=window.sessionStorage.getItem(e),s=t?JSON.parse(t):null;return Array.isArray(s)?s.slice(-40):[]}catch{return[]}}(e))},[e]);let n=t?JSON.stringify(t):null;return(0,s.useEffect)(()=>{if(!n)return;let t=JSON.parse(n);a(s=>{let r=Date.now(),a=s[s.length-1];if(a&&r-a.t<5e3&&JSON.stringify({...a,t:void 0})===JSON.stringify({...t,t:void 0}))return s;let n=[...s,{...t,t:r}].slice(-40);try{window.sessionStorage.setItem(e,JSON.stringify(n))}catch{}return n})},[e,n]),r}(`magnus:overview:${er?"federation":b.id}`,A?{online:A.nodes.online,active:A.commands.running+A.commands.pending,cron:A.cron.active,cpu:A.health.avgCpuPercent,mem:A.health.avgMemoryPercent}:null),em=ex.length>1?ex[ex.length-2]:void 0,ef=(e,t)=>{let s=em?.[e];return"number"==typeof s&&"number"==typeof t?Math.round((t-s)*10)/10:void 0},ep=A?.health.avgCpuPercent??null,eh=A?.health.avgMemoryPercent??null,eg=A&&A.nodes.total>0?A.nodes.online/A.nodes.total*100:null,ev=A?A.nodes.offline>0?{label:"Nodes offline",tone:"danger"}:A.nodes.degraded>0?{label:"Degraded",tone:"warning"}:{label:"All systems nominal",tone:"success"}:{label:"Acquiring",tone:"muted"},eb=A?A.health.reportingNodes>0?{value:`${A.health.reportingNodes} node${1!==A.health.reportingNodes?"s":""} reporting`,positive:!0}:{value:"No health data",positive:!1}:{value:"Connecting…",positive:!0},ej=ex.map(e=>({t:e.t,cpu:e.cpu??null,mem:e.mem??null}));return(0,t.jsxs)(B.U,{className:"space-y-6",children:[(0,t.jsx)(B.z,{children:(0,t.jsx)(_.f,{title:er?"Federated Fleet Overview":"Fleet Overview",eyebrow:er?"Federation · live":"Fleet · live",description:er?`Aggregated stats across ${en.length} control node${1!==en.length?"s":""}`:"Real-time status of your Magnus fleet",status:(0,t.jsx)(a.t,{variant:"muted"===ev.tone?"default":"danger"===ev.tone?"danger":"warning"===ev.tone?"warning":"success",dot:!0,pulse:"success"!==ev.tone,children:ev.label}),actions:(0,t.jsxs)(t.Fragment,{children:[$.length>1&&(0,t.jsx)(z.K,{variant:er?"primary":"secondary",size:"sm",icon:(0,t.jsx)(j,{className:"h-3.5 w-3.5"}),onClick:()=>ea(e=>!e),children:er?"All Fleets":"Single Fleet"}),(0,t.jsx)(z.K,{variant:"secondary",size:"sm",icon:(0,t.jsx)(c.f,{className:"h-3.5 w-3.5"}),onClick:()=>er?void el():void ec(),children:"Refresh"})]})})}),!er&&F&&(0,t.jsx)(B.z,{children:(0,t.jsx)(H.f,{summary:F})}),(0,t.jsx)(B.z,{children:(0,t.jsx)(N.f,{hero:!0,padding:"lg",tone:"danger"===ev.tone?"danger":"warning"===ev.tone?"warning":"primary",testId:"overview-hero",children:!A&&W?(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-around gap-6","aria-busy":"true",children:[[0,1,2].map(e=>(0,t.jsx)("div",{className:"skeleton h-36 w-36 rounded-full opacity-60"},e)),(0,t.jsx)("div",{className:"skeleton h-44 w-44 rounded-full opacity-60"})]}):(0,t.jsxs)("div",{className:"grid gap-6 xl:grid-cols-[auto_1fr]",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-center gap-6 sm:justify-start",children:[(0,t.jsx)(L,{counts:{online:A?.nodes.online??0,degraded:A?.nodes.degraded??0,offline:A?.nodes.offline??0,provisioning:A?.nodes.provisioning??0}}),(0,t.jsxs)("div",{className:"flex flex-wrap justify-center gap-4",children:[(0,t.jsx)(k.f,{value:eg,label:"Nodes online",tone:A?A.nodes.offline>0?"danger":A.nodes.online<A.nodes.total?"warning":"success":"muted",display:A?`${A.nodes.online}/${A.nodes.total}`:void 0,size:150,testId:"overview-gauge-online"}),(0,t.jsx)(k.f,{value:ep,label:"Avg CPU",size:150,sublabel:A?`${A.health.reportingNodes} reporting`:void 0,testId:"overview-gauge-cpu"}),(0,t.jsx)(k.f,{value:eh,label:"Avg memory",size:150,testId:"overview-gauge-mem"})]})]}),(0,t.jsxs)("div",{className:"flex min-w-0 flex-col",children:[(0,t.jsxs)("div",{className:"mb-2 flex items-center justify-between gap-3",children:[(0,t.jsx)("span",{className:"text-[10px] font-bold uppercase tracking-[0.2em] text-text-muted",children:"CPU / memory · this session"}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3 text-[10px] uppercase tracking-wider text-text-muted",children:[(0,t.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(M.f,{status:"ONLINE",size:"xs",pulse:!1}),A?.nodes.online??0," up"]}),(0,t.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(M.f,{status:"DEGRADED",size:"xs"}),A?.nodes.degraded??0," degraded"]}),(0,t.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(M.f,{status:"OFFLINE",size:"xs",pulse:(A?.nodes.offline??0)>0}),A?.nodes.offline??0," down"]}),(0,t.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(M.f,{status:"PROVISIONING",size:"xs",pulse:!1}),A?.nodes.provisioning??0," provisioning"]})]})]}),ej.length>1?(0,t.jsx)(P.f,{data:ej,xKey:"t",percent:!0,height:170,formatX:e=>new Date(Number(e)).toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit"}),series:[{key:"cpu",label:"CPU",tone:"primary"},{key:"mem",label:"Memory",tone:"accent"}],testId:"overview-session-chart"}):(0,t.jsxs)("div",{className:"flex h-[170px] items-center justify-center rounded-panel border border-dashed border-primary/20 text-[11px] uppercase tracking-wider text-text-muted",children:[(0,t.jsx)("span",{className:"mr-2 inline-block h-1.5 w-1.5 animate-pulse rounded-full bg-primary"}),"Collecting samples — trend appears after the next poll"]})]})]})})}),(0,t.jsx)(B.z,{children:(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",children:[(0,t.jsx)(r.n,{label:"Total Nodes",value:A?(0,t.jsx)(S,{value:A.nodes.total}):"—",icon:(0,t.jsx)(n.f,{className:"h-4 w-4"}),trend:A?{value:`${A.nodes.online} online`,positive:A.nodes.online>0}:{value:"Loading…",positive:!0},spark:T(ex,"online"),delta:void 0!==(p=ef("online",A?.nodes.online))?{value:p,unit:" up"}:void 0}),(0,t.jsx)(r.n,{label:"Active Commands",value:A?(0,t.jsx)(S,{value:A.commands.running+A.commands.pending}):"—",icon:(0,t.jsx)(i.f,{className:"h-4 w-4"}),trend:A?{value:`${A.commands.total} total`,positive:!0}:void 0,spark:T(ex,"active"),tone:"accent"}),(0,t.jsx)(r.n,{label:"Cron Jobs",value:A?(0,t.jsx)(S,{value:A.cron.total}):"—",icon:(0,t.jsx)(l.f,{className:"h-4 w-4"}),trend:A?{value:`${A.cron.active} active`,positive:A.cron.active>0}:void 0,spark:T(ex,"cron")}),(0,t.jsx)(r.n,{label:"System Health",value:W||null===ep?"—":(0,t.jsx)(S,{value:ep,decimals:+!Number.isInteger(ep),suffix:"% CPU"}),icon:(0,t.jsx)(o.f,{className:"h-4 w-4"}),trend:eb,meter:W?void 0:ep,delta:void 0!==(g=ef("cpu",ep))?{value:g,unit:"%",positiveIsGood:!1}:void 0,tone:null!==ep&&ep>=90?"danger":null!==ep&&ep>=70?"warning":"primary"})]})}),er&&en.length>0&&(0,t.jsx)(B.z,{children:(0,t.jsx)(N.f,{title:"Fleet Breakdown",children:(0,t.jsx)("div",{className:"space-y-2",children:en.map(e=>(0,t.jsxs)("div",{className:"grid grid-cols-1 items-center gap-3 rounded-chip border border-border/50 bg-surface-raised px-4 py-2.5 text-xs sm:grid-cols-[minmax(0,1fr)_minmax(0,1.2fr)_auto]",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(M.f,{status:e.stats?"ONLINE":"OFFLINE"}),(0,t.jsx)("span",{className:"font-medium",children:e.nodeName})]}),e.stats?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(I.f,{value:e.stats.nodes.total>0?e.stats.nodes.online/e.stats.nodes.total*100:null,tone:e.stats.nodes.offline>0?"warning":"success",label:`${e.nodeName} nodes online`,valueLabel:`${e.stats.nodes.online}/${e.stats.nodes.total}`,showValue:!0}),(0,t.jsxs)("div",{className:"flex items-center gap-4 text-text-muted",children:[(0,t.jsxs)("span",{className:"num",children:[e.stats.nodes.total," nodes"]}),(0,t.jsxs)("span",{className:"num",children:[e.stats.commands.running," running"]})]})]}):(0,t.jsx)(a.t,{variant:(0,a.k)("OFFLINE"),className:"justify-self-start",children:"Unreachable"})]},e.nodeId))})})}),(0,t.jsx)(B.z,{children:(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-3",children:[(0,t.jsx)(N.f,{title:"Recent Commands",icon:(0,t.jsx)(i.f,{className:"h-3.5 w-3.5"}),children:A?0===A.recentCommands.length?(0,t.jsx)(C.f,{compact:!0,icon:(0,t.jsx)(i.f,{className:"h-4 w-4"}),title:"No commands dispatched yet",action:(0,t.jsx)(V.default,{href:"/commands",className:"text-[11px] uppercase tracking-wider text-primary hover:underline",children:"Run a command →"})}):(0,t.jsx)("div",{className:"space-y-1.5",children:A.recentCommands.map(e=>(0,t.jsxs)("div",{className:"scan-sweep flex items-center justify-between gap-2 rounded-chip border border-border/50 bg-surface-raised/60 px-3 py-2 text-[11px] transition-colors hover:border-primary/30",children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,t.jsx)(M.f,{status:e.status,size:"xs"}),(0,t.jsx)("code",{className:"truncate text-primary",children:e.command}),e.node&&(0,t.jsxs)("span",{className:"shrink-0 text-text-muted",children:["on ",e.node.name]})]}),(0,t.jsxs)("div",{className:"ml-2 flex shrink-0 items-center gap-2",children:[(0,t.jsx)(a.t,{variant:(0,a.k)(e.status),children:e.status}),(0,t.jsx)("span",{className:"num hidden text-text-muted sm:inline",children:(0,G.C)(e.createdAt)})]})]},`${e.id}-${e.status}`))}):W?(0,t.jsx)(O.Q,{lines:4}):(0,t.jsx)(C.f,{compact:!0,title:"Stats unavailable",description:"The Control API did not answer; retrying every 15 seconds.",tone:"warning"})}),(0,t.jsx)(N.f,{title:"Recent Activity",tone:"accent",icon:(0,t.jsx)(w.f,{className:"h-3.5 w-3.5"}),children:A?0===A.recentAudit.length?(0,t.jsx)(C.f,{compact:!0,icon:(0,t.jsx)(w.f,{className:"h-4 w-4"}),title:"No audit events yet"}):(0,t.jsx)("ol",{className:"relative space-y-1.5 border-l border-accent/20 pl-3",children:A.recentAudit.map(e=>(0,t.jsxs)("li",{className:"relative flex items-center justify-between gap-2 rounded-chip px-2 py-1.5 text-[11px] transition-colors hover:bg-accent/5",children:[(0,t.jsx)("span",{"aria-hidden":"true",className:"absolute -left-[15.5px] top-1/2 h-1.5 w-1.5 -translate-y-1/2 rounded-full bg-accent shadow-[0_0_6px_var(--color-accent)]"}),(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,t.jsx)("span",{className:"truncate font-medium text-text",children:e.action}),e.targetType&&(0,t.jsxs)("span",{className:"truncate text-text-muted",children:[e.targetType,e.targetId?` ${e.targetId.slice(0,8)}…`:""]})]}),(0,t.jsx)("span",{className:"num shrink-0 text-text-muted",children:(0,G.C)(e.timestamp)})]},e.id))}):W?(0,t.jsx)(O.Q,{lines:4}):(0,t.jsx)(C.f,{compact:!0,title:"Audit feed unavailable",tone:"warning"})}),(0,t.jsx)(N.f,{title:"Live Event Stream",icon:(0,t.jsx)(y.f,{className:"h-3.5 w-3.5"}),tone:"success",children:(0,t.jsx)(R.d,{limit:7})})]})}),(0,t.jsx)(B.z,{children:(0,t.jsx)(N.f,{title:"Quick Actions",interactive:!1,children:(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-4",children:[(0,t.jsx)(q,{href:"/nodes",label:"Manage Nodes",icon:(0,t.jsx)(n.f,{className:"h-5 w-5"})}),(0,t.jsx)(q,{href:"/commands",label:"Run Command",icon:(0,t.jsx)(i.f,{className:"h-5 w-5"})}),(0,t.jsx)(q,{href:"/cron",label:"Cron Jobs",icon:(0,t.jsx)(l.f,{className:"h-5 w-5"})}),(0,t.jsx)(q,{href:"/files",label:"Edit Files",icon:(0,t.jsx)(o.f,{className:"h-5 w-5"})})]})})}),(ee.length>0||Q.length>0)&&(0,t.jsx)(B.z,{children:(0,t.jsxs)(N.f,{title:"AI Insights",icon:(0,t.jsx)(d.f,{className:"h-4 w-4"}),action:Z?(0,t.jsxs)("span",{className:"num text-[10px] text-text-muted",children:["Updated ",(0,G.C)(Z)]}):void 0,children:[ee.length>0&&(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)("p",{className:"mb-2 text-[10px] font-bold uppercase tracking-wider text-text-muted",children:"Pinned"}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-2 lg:grid-cols-2",children:ee.map(e=>(0,t.jsxs)("div",{className:"rounded-chip border border-primary/25 bg-primary/5 px-3 py-2 shadow-[inset_2px_0_0_var(--color-primary)]",children:[(0,t.jsxs)("div",{className:"mb-1 flex items-start justify-between gap-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-xs font-bold text-text",children:e.title}),(0,t.jsxs)("p",{className:"text-[10px] text-text-muted",children:["Pinned ",(0,G.C)(e.pinnedAt)]})]}),(0,t.jsx)("button",{onClick:()=>void D.f.assistant.unpinInsight(e.id).then(ed),className:"rounded p-1 text-text-muted transition-colors hover:text-warning",title:"Unpin insight",children:(0,t.jsx)(v,{className:"h-3.5 w-3.5"})})]}),(0,t.jsx)("p",{className:"text-[11px] text-text-muted",children:e.body})]},e.id))})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-3",children:Q.slice(0,6).map((e,s)=>{let r="critical"===e.severity?m.f:"warning"===e.severity?u.f:x.f,a="critical"===e.severity?"text-danger border-danger/30 bg-danger/5 shadow-[inset_2px_0_0_var(--color-danger),0_0_12px_var(--color-glow-danger)]":"warning"===e.severity?"text-warning border-warning/30 bg-warning/5 shadow-[inset_2px_0_0_var(--color-warning)]":"text-info border-info/30 bg-info/5 shadow-[inset_2px_0_0_var(--color-info)]",n=ee.some(t=>t.title===e.title&&t.body===e.body);return(0,t.jsxs)("div",{className:`rounded-chip border px-3 py-2 ${a}`,children:[(0,t.jsxs)("div",{className:"mb-1 flex items-start justify-between gap-2",children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-1.5",children:[(0,t.jsx)(r,{className:"h-3.5 w-3.5 flex-shrink-0"}),(0,t.jsx)("span",{className:"truncate text-xs font-bold",children:e.title})]}),(0,t.jsx)("button",{onClick:()=>void eu(e),className:"rounded p-1 transition-colors hover:bg-white/5",title:n?"Unpin insight":"Pin insight",children:n?(0,t.jsx)(v,{className:"h-3 w-3"}):(0,t.jsx)(h,{className:"h-3 w-3"})})]}),(0,t.jsx)("p",{className:"line-clamp-2 text-[10px] opacity-80",children:e.body})]},s)})})]})})]})}],8593)},67683,e=>{"use strict";var t=e.i(43476),s=e.i(22016),r=e.i(64155),a=e.i(83902);e.s(["f",0,function({summary:e,showAction:n=!0}){let i=e.nodes.filter(e=>e.tailscale?.requiresRenewal).sort((e,t)=>e.tailscale?.expired!==t.tailscale?.expired?e.tailscale?.expired?-1:1:(e.tailscale?.daysRemaining??Number.MAX_SAFE_INTEGER)-(t.tailscale?.daysRemaining??Number.MAX_SAFE_INTEGER));if(0===i.length)return null;let l=i.some(e=>e.tailscale?.expired),o=l?a.f:r.f,c=l?{panel:"border-danger/40 bg-danger/5",rail:"bg-danger",icon:"bg-danger/10 text-danger",text:"text-danger",chip:"border-danger/30 text-danger",action:"border-danger/40 text-danger hover:bg-danger/10"}:{panel:"border-warning/40 bg-warning/5",rail:"bg-warning",icon:"bg-warning/10 text-warning",text:"text-warning",chip:"border-warning/30 text-warning",action:"border-warning/40 text-warning hover:bg-warning/10"};return(0,t.jsxs)("section",{id:"tailscale-renewal",role:"alert","aria-label":"Tailscale renewal alert",className:`relative overflow-hidden rounded border px-4 py-3 ${c.panel}`,children:[(0,t.jsx)("div",{className:`absolute inset-y-0 left-0 w-0.5 ${c.rail}`}),(0,t.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-start gap-3",children:[(0,t.jsx)("div",{className:`mt-0.5 flex h-8 w-8 shrink-0 items-center justify-center rounded ${c.icon}`,children:(0,t.jsx)(o,{className:"h-4 w-4"})}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("p",{className:`text-xs font-bold uppercase tracking-[0.14em] ${c.text}`,children:l?"Tailscale access expired":"Tailscale renewal due"}),(0,t.jsxs)("p",{className:"mt-1 text-[11px] text-text-muted",children:[i.length," node ",1===i.length?"key needs":"keys need"," renewal within ",e.warningDays," days. Renew before tailnet access is interrupted."]}),(0,t.jsx)("div",{className:"mt-2 flex flex-wrap gap-1.5",children:i.map(e=>(0,t.jsxs)("span",{title:e.tailscale?.keyExpiry?`Expires ${e.tailscale.keyExpiry}`:void 0,className:`inline-flex items-center gap-1 rounded border bg-background/40 px-2 py-0.5 font-mono text-[10px] ${c.chip}`,children:[(0,t.jsx)("span",{className:"font-semibold",children:e.name}),(0,t.jsx)("span",{"aria-hidden":"true",children:"·"}),(0,t.jsx)("span",{children:e.tailscale?.expired?"expired":`${e.tailscale?.daysRemaining??"?"}d`})]},e.id))})]})]}),n&&(0,t.jsx)(s.default,{href:"/nodes#tailscale-renewal",className:`shrink-0 self-start rounded border px-3 py-1.5 text-[10px] font-bold uppercase tracking-wider transition-colors sm:self-center ${c.action}`,children:"Review nodes"})]})]})}])},46670,e=>{"use strict";var t=e.i(43476),s=e.i(78571);let r={default:"border-border text-text-muted",success:"border-success/40 text-success bg-success/5 shadow-[0_0_6px_rgba(0,255,65,0.15)]",warning:"border-warning/40 text-warning bg-warning/5 shadow-[0_0_6px_rgba(255,179,0,0.15)]",danger:"border-danger/40 text-danger bg-danger/5 shadow-[0_0_6px_rgba(255,23,68,0.15)]",info:"border-info/40 text-info bg-info/5 shadow-[0_0_6px_rgba(0,176,255,0.15)]"},a={default:"bg-text-muted",success:"bg-success",warning:"bg-warning",danger:"bg-danger",info:"bg-info"};e.s(["t",0,function({children:e,variant:n="default",className:i,dot:l=!1,pulse:o=!1}){return(0,t.jsxs)("span",{className:(0,s.f)("inline-flex items-center gap-1.5 rounded-chip border px-2 py-0.5 text-[10px] font-bold uppercase tracking-wider",r[n],i),children:[l&&(0,t.jsxs)("span",{"aria-hidden":"true",className:"relative inline-flex h-1.5 w-1.5",children:[o&&(0,t.jsx)("span",{className:(0,s.f)("absolute inset-0 rounded-full animate-halo",a[n])}),(0,t.jsx)("span",{className:(0,s.f)("relative inline-flex h-1.5 w-1.5 rounded-full",a[n])})]}),e]})},"k",0,function(e){switch(e.toUpperCase()){case"ONLINE":case"COMPLETED":case"ACTIVE":case"RUNNING":case"INSTALLED":case"HEALTHY":return"success";case"DEGRADED":case"PAUSED":case"QUEUED":case"PENDING":case"INSTALLING":return"warning";case"OFFLINE":case"FAILED":case"ERROR":case"TIMEOUT":case"CANCELLED":case"DECOMMISSIONED":case"CRITICAL":return"danger";case"PROVISIONING":case"UPDATING":return"info";default:return"default"}}])},93999,51196,55427,e=>{"use strict";var t=e.i(43476),s=e.i(56420);let r={name:"arrow-down-right",size:24,node:[["path",{d:"m7 7 10 10",key:"1fmybs"}],["path",{d:"M17 7v10H7",key:"6fjiku"}]]};r.node;let a=(0,s.f)(r);var n=e.i(75775),i=e.i(78571),l=e.i(3062),o=e.i(35084);let c={warning:"shadow-[0_0_6px_var(--color-warning)]",danger:"shadow-[0_0_8px_var(--color-danger)]",accent:"shadow-[0_0_6px_var(--color-accent)]",primary:"shadow-[0_0_6px_var(--color-primary)]"},d={xs:"h-1",sm:"h-1.5",md:"h-2"};function u({value:e,max:s=100,tone:r,thresholds:a=o.q,label:n,size:l="xs",showValue:x=!1,valueLabel:m,glow:f,className:p,testId:h}){let g="number"==typeof e&&Number.isFinite(e),v=g?Math.max(0,Math.min(100,e/(s||1)*100)):0,b=r??(g?(0,o.Z)(v,a):"muted"),j=f||!r&&g&&v>=a.warn,w=m??(g?`${v.toFixed(+(v<10&&v>0))}%`:"—");return(0,t.jsxs)("div",{className:(0,i.f)("flex min-w-0 items-center gap-2",p),"data-testid":h,children:[(0,t.jsx)("div",{role:"meter","aria-label":n,"aria-valuemin":0,"aria-valuemax":s,"aria-valuenow":g?e:void 0,"aria-valuetext":w,className:(0,i.f)("relative flex-1 overflow-hidden rounded-full bg-border/70",d[l]),children:(0,t.jsx)("div",{style:{"--meter":`${v}%`},className:(0,i.f)("h-full w-(--meter) rounded-full transition-[width] duration-700 ease-out-expo starting:w-0",o.H[b],j&&c[b])})}),x&&(0,t.jsx)("span",{className:(0,i.f)("num w-11 shrink-0 text-right text-[11px]",g?o.T[b]:"text-text-muted"),children:w})]})}e.s(["f",0,u],51196);var x=e.i(71645);function m({values:e,tone:s="primary",width:r=160,height:a=32,area:n=!0,max:l,percent:c=!1,threshold:d,live:u=!0,emptyLabel:f="not enough data",className:p,testId:h,label:g,stretch:v=!1}){let b=`spark${(0,x.useId)().replace(/:/g,"")}`;if(e.length<2)return(0,t.jsx)("div",{className:(0,i.f)("flex h-8 items-center text-xs italic text-text-muted",p),"data-testid":h,children:f});let j=o.v[s],w=l??(c?Math.max(100,...e):Math.max(...e,d??0)||1),y=a-4,N=r/(e.length-1),_=e=>2+y-Math.max(0,e)/w*y,k=e.map((e,t)=>[t*N,_(e)]),I=k.map(([e,t])=>`${e.toFixed(1)},${t.toFixed(1)}`).join(" "),M=k[k.length-1];return(0,t.jsxs)("svg",{width:v?"100%":r,height:a,viewBox:`0 0 ${r} ${a}`,preserveAspectRatio:v?"none":void 0,className:(0,i.f)("block overflow-visible",p),"data-testid":h,role:g?"img":void 0,"aria-label":g,"aria-hidden":!g||void 0,children:[n&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("defs",{children:(0,t.jsxs)("linearGradient",{id:b,x1:"0",x2:"0",y1:"0",y2:"1",children:[(0,t.jsx)("stop",{offset:"0%",stopColor:j,stopOpacity:.35}),(0,t.jsx)("stop",{offset:"100%",stopColor:j,stopOpacity:0})]})}),(0,t.jsx)("polygon",{points:`0,${a} ${I} ${r},${a}`,fill:`url(#${b})`})]}),void 0!==d&&(0,t.jsx)("line",{x1:0,x2:r,y1:_(d),y2:_(d),stroke:"var(--color-warning)",strokeOpacity:.5,strokeDasharray:"3 3",strokeWidth:1}),(0,t.jsx)("polyline",{fill:"none",stroke:j,strokeWidth:1.5,vectorEffect:"non-scaling-stroke",strokeLinejoin:"round",strokeLinecap:"round",points:I}),u&&!v&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("circle",{cx:M[0],cy:M[1],r:2.5,fill:j,className:"origin-center animate-halo [transform-box:fill-box]"}),(0,t.jsx)("circle",{cx:M[0],cy:M[1],r:2,fill:j})]})]})}e.s(["f",0,m],55427),e.s(["N",0,function({title:e,description:s,children:r,className:a,action:n,tone:i,corners:o=!1,...c}){return(0,t.jsx)(l.f,{...c,tone:i,corners:o,title:e,description:s,action:n,className:a,children:r})},"n",0,function({label:e,value:s,icon:r,trend:c,spark:d,meter:x,delta:f,tone:p="primary",className:h,testId:g}){let v=!f||f.value>=0===(f.positiveIsGood??!0);return(0,t.jsxs)(l.f,{tone:p,className:(0,i.f)("overflow-hidden",h),testId:g,children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("span",{className:"text-[10px] font-medium uppercase tracking-[0.15em] text-text-muted",children:e}),r&&(0,t.jsx)("span",{className:"text-primary/60",children:r})]}),(0,t.jsxs)("div",{className:"mt-2 flex items-end justify-between gap-2",children:[(0,t.jsx)("div",{className:(0,i.f)("num text-2xl font-bold","primary"===p?"text-primary neon-text":o.T[p]),children:s}),f&&0!==f.value&&(0,t.jsxs)("span",{className:(0,i.f)("num mb-1 inline-flex items-center gap-0.5 text-[11px]",v?"text-success":"text-danger"),children:[f.value>0?(0,t.jsx)(n.f,{className:"h-3 w-3"}):(0,t.jsx)(a,{className:"h-3 w-3"}),Math.abs(f.value).toFixed(+!Number.isInteger(f.value)),f.unit]})]}),c&&(0,t.jsx)("div",{className:(0,i.f)("mt-1 text-[11px]",c.positive?"text-success":"text-danger"),children:c.value}),void 0!==x&&(0,t.jsx)(u,{value:x,className:"mt-3",label:e}),d&&d.length>1&&(0,t.jsx)("div",{className:"-mx-5 -mb-5 mt-3 opacity-80",children:(0,t.jsx)(m,{values:d,tone:p,width:240,height:28,stretch:!0,live:!1})})]})}],93999)},54149,21176,e=>{"use strict";var t=e.i(43476),s=e.i(71645),r=e.i(78571),a=e.i(35084);e.s(["f",0,function({value:e,max:n=100,label:i,sublabel:l,tone:o,thresholds:c=a.q,higherIsBetter:d=!1,size:u=140,display:x,ticks:m=!0,hideLabel:f=!1,className:p,testId:h}){let g=(0,s.useId)().replace(/:/g,""),v="number"==typeof e&&Number.isFinite(e),b=v?Math.max(0,Math.min(100,e/(n||1)*100)):0,j=o??(v?d?(0,a.Z)(100-b,c):(0,a.Z)(b,c):"muted"),w=Math.max(4,Math.round(u/16)),y=50-w/2-4,N=2*Math.PI*y,_=.75*N,k=_*b/100,I=u>=140,M=x??(v?`${Math.round(b)}%`:"—"),$=m?Array.from({length:11},(e,s)=>{let r=(135+270*s/10)*Math.PI/180,a=50-(s%5==0?4:2.5);return(0,t.jsx)("line",{x1:50+48.5*Math.cos(r),y1:50+48.5*Math.sin(r),x2:50+a*Math.cos(r),y2:50+a*Math.sin(r),stroke:"var(--color-border-strong)",strokeWidth:.8},s)}):null;return(0,t.jsxs)("div",{role:"img","aria-label":`${i}: ${M}`,"data-testid":h,className:(0,r.f)("relative inline-flex flex-col items-center",p),style:{width:u},children:[(0,t.jsxs)("svg",{viewBox:"0 0 100 100",width:u,height:u,"aria-hidden":"true",className:"overflow-visible",children:[I&&(0,t.jsx)("defs",{children:(0,t.jsxs)("filter",{id:`g${g}`,x:"-30%",y:"-30%",width:"160%",height:"160%",children:[(0,t.jsx)("feGaussianBlur",{stdDeviation:"2.2",result:"blur"}),(0,t.jsxs)("feMerge",{children:[(0,t.jsx)("feMergeNode",{in:"blur"}),(0,t.jsx)("feMergeNode",{in:"SourceGraphic"})]})]})}),$,(0,t.jsx)("circle",{cx:50,cy:50,r:y,fill:"none",stroke:"var(--color-border)",strokeWidth:w,strokeLinecap:"round",strokeDasharray:`${_} ${N}`,transform:"rotate(135 50 50)"}),(0,t.jsx)("circle",{cx:50,cy:50,r:y,fill:"none",stroke:a.v[j],strokeWidth:w,strokeLinecap:"round",transform:"rotate(135 50 50)",filter:I?`url(#g${g})`:void 0,style:{"--dash":`${k} ${N}`},className:"[stroke-dasharray:var(--dash)] transition-[stroke-dasharray] duration-1000 ease-out-expo starting:[stroke-dasharray:0_1000]"})]}),(0,t.jsxs)("div",{className:"pointer-events-none absolute inset-0 flex flex-col items-center justify-center",style:{height:u},children:[(0,t.jsx)("span",{className:(0,r.f)("num font-bold leading-none",a.T[j],I&&a.z[j]),style:{fontSize:Math.max(12,.2*u)},children:M}),l&&(0,t.jsx)("span",{className:"num mt-1 text-text-muted",style:{fontSize:Math.max(9,.075*u)},children:l})]}),!f&&(0,t.jsx)("span",{className:"-mt-[10%] text-center text-[10px] font-medium uppercase tracking-[0.15em] text-text-muted",children:i})]})}],54149);var n=e.i(70703),i=e.i(65369);let l=(0,n.default)(()=>e.A(1321),{loadableGenerated:{modules:[69944]},ssr:!1,loading:()=>(0,t.jsx)(i.l,{className:"h-[180px] w-full"})});e.s(["f",0,l],21176)},3062,e=>{"use strict";var t=e.i(43476),s=e.i(78571),r=e.i(35084);let a={primary:"[--panel-corner-color:color-mix(in_srgb,var(--color-primary)_60%,transparent)]",accent:"[--panel-corner-color:color-mix(in_srgb,var(--color-accent)_70%,transparent)]",success:"[--panel-corner-color:color-mix(in_srgb,var(--color-success)_60%,transparent)]",warning:"[--panel-corner-color:color-mix(in_srgb,var(--color-warning)_70%,transparent)]",danger:"[--panel-corner-color:color-mix(in_srgb,var(--color-danger)_70%,transparent)]",info:"[--panel-corner-color:color-mix(in_srgb,var(--color-info)_60%,transparent)]",muted:"[--panel-corner-color:var(--color-border-strong)]"},n={primary:"[--glow-hover-color:var(--color-glow)]",accent:"[--glow-hover-color:var(--color-glow-accent)]",success:"[--glow-hover-color:var(--color-glow-success)]",warning:"[--glow-hover-color:var(--color-glow-warning)]",danger:"[--glow-hover-color:var(--color-glow-danger)]",info:"[--glow-hover-color:var(--color-glow)]",muted:"[--glow-hover-color:var(--color-glow)]"},i={primary:"hover:border-primary/30",accent:"hover:border-accent/40",success:"hover:border-success/30",warning:"hover:border-warning/40",danger:"hover:border-danger/40",info:"hover:border-info/30",muted:"hover:border-border-strong"},l={none:"",sm:"p-3",md:"p-5",lg:"p-6"};e.s(["f",0,function({tone:e="primary",corners:o=!0,interactive:c=!0,hero:d=!1,title:u,description:x,icon:m,action:f,as:p="div",padding:h="md",testId:g,className:v,children:b,...j}){return(0,t.jsxs)(p,{...j,"data-testid":g??j["data-testid"],className:(0,s.f)("relative rounded-panel border border-border bg-surface transition-colors duration-300",l[h],o&&"panel-corners",o&&a[e],c&&"glow-hover",c&&n[e],c&&i[e],d&&"grid-bg overflow-hidden bg-surface/80",v),children:[(u||f||m)&&(0,t.jsxs)("div",{className:"mb-4 flex items-start justify-between gap-3",children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-start gap-2",children:[m&&(0,t.jsx)("span",{className:(0,s.f)("mt-0.5 shrink-0",r.T[e]),children:m}),(0,t.jsxs)("div",{className:"min-w-0",children:[u&&(0,t.jsx)("h3",{className:"text-xs font-bold uppercase tracking-wider",children:u}),x&&(0,t.jsx)("p",{className:"mt-0.5 text-[11px] text-text-muted",children:x})]})]}),f]}),b]})}])},73404,e=>{"use strict";var t=e.i(43476),s=e.i(78571),r=e.i(35084);e.s(["f",0,function({title:e,eyebrow:a,description:n,icon:i,actions:l,status:o,tone:c="primary",className:d,testId:u}){return(0,t.jsxs)("div",{"data-testid":u,className:(0,s.f)("flex flex-wrap items-end justify-between gap-4",d),children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-start gap-3",children:[i&&(0,t.jsx)("span",{"aria-hidden":"true",className:(0,s.f)("mt-0.5 flex h-10 w-10 shrink-0 items-center justify-center rounded-panel border bg-surface","accent"===c?"border-accent/40 shadow-[0_0_14px_var(--color-glow-accent)]":"border-primary/40 shadow-[0_0_14px_var(--color-glow)]",r.T[c]),children:i}),(0,t.jsxs)("div",{className:"min-w-0",children:[a&&(0,t.jsxs)("p",{className:(0,s.f)("mb-1 text-[10px] font-medium uppercase tracking-[0.3em]",r.T[c],"opacity-80"),children:[(0,t.jsx)("span",{"aria-hidden":"true",children:"// "}),a]}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,t.jsx)("h1",{className:(0,s.f)("text-xl font-bold uppercase tracking-wider",r.T[c],r.z[c]),children:e}),o]}),n&&(0,t.jsx)("p",{className:"mt-1 max-w-3xl text-xs text-text-muted",children:n})]})]}),l&&(0,t.jsx)("div",{className:"flex flex-wrap items-center gap-2",children:l})]})}])},63376,e=>{"use strict";var t=e.i(43476);e.s(["z",0,function({children:e,className:s}){return(0,t.jsx)("div",{className:`animate-page-in${s?` ${s}`:""}`,children:e})},"U",0,function({children:e,className:s}){return(0,t.jsx)("div",{className:s,children:e})}])},65369,e=>{"use strict";var t=e.i(43476),s=e.i(78571);function r({className:e}){return(0,t.jsx)("div",{"aria-hidden":"true",className:(0,s.f)("skeleton h-3 w-full",e)})}e.s(["l",0,r,"g",0,function({count:e=4,className:a}){return(0,t.jsx)("div",{role:"status","aria-label":"Loading",className:(0,s.f)("grid gap-4 sm:grid-cols-2 lg:grid-cols-4",a),children:Array.from({length:e},(e,s)=>(0,t.jsxs)("div",{className:"panel-corners rounded-panel border border-border bg-surface p-5",children:[(0,t.jsx)(r,{className:"h-2 w-1/2"}),(0,t.jsx)(r,{className:"mt-4 h-7 w-2/3"}),(0,t.jsx)(r,{className:"mt-3 h-1 w-full opacity-60"})]},s))})},"F",0,function({rows:e=5,cols:a=4,className:n}){return(0,t.jsxs)("div",{role:"status","aria-label":"Loading",className:(0,s.f)("overflow-hidden rounded-panel border border-border",n),children:[(0,t.jsx)("div",{className:"flex gap-4 border-b border-border bg-surface px-4 py-3",children:Array.from({length:a},(e,s)=>(0,t.jsx)(r,{className:"h-2 flex-1 opacity-60"},s))}),Array.from({length:e},(e,n)=>(0,t.jsx)("div",{className:"flex gap-4 border-b border-border/50 px-4 py-3 last:border-0",children:Array.from({length:a},(e,a)=>(0,t.jsx)(r,{className:(0,s.f)("h-3 flex-1",(n+a)%3==0&&"max-w-[60%]")},a))},n))]})},"Q",0,function({lines:e=3,className:a}){let n=["w-full","w-11/12","w-4/5","w-2/3","w-3/4"];return(0,t.jsx)("div",{role:"status","aria-label":"Loading",className:(0,s.f)("space-y-2",a),children:Array.from({length:e},(e,s)=>(0,t.jsx)(r,{className:n[s%n.length]},s))})}])},75723,e=>{"use strict";var t=e.i(43476),s=e.i(78571),r=e.i(46670);let a={success:"bg-success shadow-[0_0_6px_var(--color-success)]",warning:"bg-warning shadow-[0_0_6px_var(--color-warning)]",danger:"bg-danger shadow-[0_0_6px_var(--color-danger)]",info:"bg-info shadow-[0_0_6px_var(--color-info)]",default:"bg-text-muted"},n={success:"bg-success",warning:"bg-warning",danger:"bg-danger",info:"bg-info",default:"bg-text-muted"},i=new Set(["ONLINE","RUNNING","ACTIVE","HEALTHY","CRITICAL","UPDATING","PROVISIONING"]);e.s(["f",0,function({status:e,pulse:l,size:o="sm",className:c,label:d}){let u=(0,r.k)(e),x=l??i.has(e.toUpperCase()),m="xs"===o?"h-1.5 w-1.5":"h-2 w-2";return(0,t.jsxs)("span",{className:(0,s.f)("relative inline-flex shrink-0",m,c),role:d?"img":void 0,"aria-label":d,"aria-hidden":!d||void 0,children:[x&&(0,t.jsx)("span",{className:(0,s.f)("absolute inset-0 rounded-full animate-halo",n[u])}),(0,t.jsx)("span",{className:(0,s.f)("relative inline-flex rounded-full",m,a[u])})]})}])},71417,e=>{"use strict";e.s(["L",0,function(e){if(0===e)return"0 B";let t=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,t)).toFixed(1))} ${["B","KB","MB","GB","TB"][t]}`},"C",0,function(e){return e?("string"==typeof e?new Date(e):e).toLocaleString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}):"—"}])},79432,e=>{"use strict";var t=e.i(56420);let s={name:"activity",size:24,node:[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]};s.node;let r=(0,t.f)(s);e.s(["f",0,r],79432)},75775,e=>{"use strict";var t=e.i(56420);let s={name:"arrow-up-right",size:24,node:[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]};s.node;let r=(0,t.f)(s);e.s(["f",0,r],75775)},83902,e=>{"use strict";var t=e.i(56420);let s={name:"shield-exclamation-point",size:24,node:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],aliases:["shield-alert"]};s.node;let r=(0,t.f)(s);e.s(["f",0,r],83902)},90317,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});var r={bindSnapshot:function(){return d},createAsyncLocalStorage:function(){return o},createSnapshot:function(){return u},getOrCreateGlobalAsyncLocalStorage:function(){return c}};for(var a in r)Object.defineProperty(s,a,{enumerable:!0,get:r[a]});let n=Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available");class i{disable(){throw n}getStore(){}run(){throw n}exit(){throw n}enterWith(){throw n}static bind(e){return e}}let l="u">typeof globalThis&&globalThis.AsyncLocalStorage;function o(){return l?new l:new i}function c(e){let t=Symbol.for(`@next/${e}@16.4.5`),s=globalThis;return s[t]??=o()}function d(e){return l?l.bind(e):i.bind(e)}function u(){return l?l.snapshot():function(e,...t){return e(...t)}}},42344,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"workAsyncStorageInstance",{enumerable:!0,get:function(){return r}});let r=(0,e.r(90317).getOrCreateGlobalAsyncLocalStorage)("work-async-storage")},63599,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"workAsyncStorage",{enumerable:!0,get:function(){return r.workAsyncStorageInstance}});let r=e.r(42344)},70703,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"default",{enumerable:!0,get:function(){return a}});let r=e.r(55682)._(e.r(69093));function a(e,t){let s={};"function"==typeof e&&(s.loader=e);let a={...s,...t};return(0,r.default)({...a,modules:a.loadableGenerated?.modules})}("function"==typeof s.default||"object"==typeof s.default&&null!==s.default)&&void 0===s.default.__esModule&&(Object.defineProperty(s.default,"__esModule",{value:!0}),Object.assign(s.default,s),t.exports=s.default)},9885,(e,t,s)=>{"use strict";function r(e){return e.split("/").map(e=>encodeURIComponent(e)).join("/")}Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"encodeURIPath",{enumerable:!0,get:function(){return r}})},67585,(e,t,s)=>{"use strict";e.i(47167),Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"BailoutToCSRForNextDynamic",{enumerable:!0,get:function(){return i}});let r=e.r(71645),a=e.r(74080);e.r(32061);let n=e.r(49354).createReactBrowserBailoutReason.bind(null,"next/dynamic");function i({children:e}){return(0,r.use)((0,a.browser)(n)),e}},69093,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"default",{enumerable:!0,get:function(){return c}});let r=e.r(43476),a=e.r(71645),n=e.r(67585),i=e.r(52157);function l(e){return{default:e&&"default"in e?e.default:e}}let o={loader:()=>Promise.resolve(l(()=>null)),loading:null,ssr:!0},c=function(e){let t={...o,...e},s=(0,a.lazy)(()=>t.loader().then(l)),c=t.loading;function d(e){let l=c?(0,r.jsx)(c,{isLoading:!0,pastDelay:!0,error:null}):null,o=!t.ssr||!!t.loading,d=o?a.Suspense:a.Fragment,u=t.ssr?(0,r.jsxs)(r.Fragment,{children:["u"<typeof window?(0,r.jsx)(i.PreloadChunks,{moduleIds:t.modules}):null,(0,r.jsx)(s,{...e})]}):(0,r.jsx)(n.BailoutToCSRForNextDynamic,{children:(0,r.jsx)(s,{...e})});return(0,r.jsx)(d,{...o?{fallback:l}:{},children:u})}return d.displayName="LoadableComponent",d}},52157,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"PreloadChunks",{enumerable:!0,get:function(){return o}});let r=e.r(43476),a=e.r(74080),n=e.r(63599),i=e.r(9885),l=e.r(43369);function o({moduleIds:e}){if("u">typeof window)return null;let t=n.workAsyncStorage.getStore();if(void 0===t)return null;let s=[];if(t.reactLoadableManifest&&e){let r=t.reactLoadableManifest;for(let t of e){if(!r[t])continue;let e=r[t].files;s.push(...e)}}if(0===s.length)return null;let c=(0,l.getAssetTokenQuery)();return(0,r.jsx)(r.Fragment,{children:s.map(e=>{let s=`${t.assetPrefix}/_next/${(0,i.encodeURIPath)(e)}${c}`;return e.endsWith(".css")?(0,r.jsx)("link",{precedence:"dynamic",href:s,rel:"stylesheet",as:"style",nonce:t.nonce},e):((0,a.preload)(s,{as:"script",fetchPriority:"low",nonce:t.nonce}),null)})})}},49354,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});var r={createReactBrowserBailoutReason:function(){return i},getReactBrowserBailoutReason:function(){return l},isNextBrowserBailoutError:function(){return o}};for(var a in r)Object.defineProperty(s,a,{enumerable:!0,get:r[a]});let n=Symbol.for("next.browser-bailout-reason");function i(e){return{$$typeof:n,reason:e}}function l(e){let t=e?.cause;return t?.$$typeof===n?t.reason:void 0}function o(e){return void 0!==l(e)}}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,8593,e=>{"use strict";var t=e.i(43476),s=e.i(71645),r=e.i(93999),a=e.i(46670),n=e.i(41220),i=e.i(4139),l=e.i(74544),o=e.i(79432),c=e.i(41120),d=e.i(28623),u=e.i(64155),x=e.i(10818),m=e.i(92026),f=e.i(56420);let p={name:"pin",size:24,node:[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]]};p.node;let h=(0,f.f)(p),g={name:"pin-off",size:24,node:[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89",key:"znwnzq"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11",key:"c9qhm2"}]]};g.node;let v=(0,f.f)(g),b={name:"globe",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]};b.node;let j=(0,f.f)(b);var w=e.i(82954),y=e.i(15331),N=e.i(3062),_=e.i(73404),k=e.i(54149),I=e.i(51196),M=e.i(75723),$=e.i(78571),A=e.i(72603);function S({value:e,decimals:r=0,prefix:a="",suffix:n="",format:i,duration:l=600,className:o}){let c="number"==typeof e&&Number.isFinite(e),[d,u]=(0,s.useState)(c?e:null),x=(0,s.useRef)(c?e:null);(0,s.useEffect)(()=>{if(!c){x.current=null,u(null);return}let t=x.current;if(x.current=e,null===t||t===e||(0,A.d)())return void u(e);let s=0,r=performance.now(),a=n=>{let i=Math.min(1,(n-r)/l);u(t+(e-t)*(i>=1?1:1-Math.pow(2,-10*i))),i<1&&(s=requestAnimationFrame(a))};return s=requestAnimationFrame(a),()=>cancelAnimationFrame(s)},[c,e,l]);let m=null===d?"—":`${a}${i?i(d):d.toFixed(r)}${n}`;return(0,t.jsx)("span",{className:(0,$.f)("num",o),children:m})}var C=e.i(2067),O=e.i(65369),P=e.i(21176);let E={online:"bg-success shadow-[0_0_6px_var(--color-success)]",degraded:"bg-warning shadow-[0_0_6px_var(--color-warning)]",offline:"bg-danger shadow-[0_0_8px_var(--color-danger)]",provisioning:"bg-info shadow-[0_0_6px_var(--color-info)]"};function F(e){let t=43758.5453*Math.sin(12.9898*e+78.233);return t-Math.floor(t)}function L({counts:e,size:s=176,className:r}){let a=[],n=1;for(let t of["offline","degraded","provisioning","online"])for(let s=0;s<e[t]&&a.length<64;s++,n++){let e="online"===t?[.45,.92]:"provisioning"===t?[.3,.7]:[.15,.55],r=e[0]+F(n)*(e[1]-e[0]),i=F(n+101)*Math.PI*2;a.push({key:`${t}-${s}`,status:t,x:50+Math.cos(i)*r*50,y:50+Math.sin(i)*r*50})}let i=e.online+e.degraded+e.offline+e.provisioning;return(0,t.jsxs)("div",{role:"img","aria-label":`Fleet radar: ${e.online} online, ${e.degraded} degraded, ${e.offline} offline, ${e.provisioning} provisioning`,className:(0,$.f)("relative shrink-0 overflow-hidden rounded-full border border-primary/30 bg-bg shadow-[0_0_24px_var(--color-glow),inset_0_0_24px_var(--color-glow)]",r),style:{width:s,height:s},children:[(0,t.jsx)("div",{className:"absolute inset-[16%] rounded-full border border-primary/15"}),(0,t.jsx)("div",{className:"absolute inset-[33%] rounded-full border border-primary/15"}),(0,t.jsx)("div",{className:"absolute inset-y-0 left-1/2 w-px bg-primary/10"}),(0,t.jsx)("div",{className:"absolute inset-x-0 top-1/2 h-px bg-primary/10"}),(0,t.jsx)("div",{"aria-hidden":"true",className:"absolute inset-0 animate-sweep rounded-full bg-[conic-gradient(from_0deg,transparent_0deg,transparent_290deg,color-mix(in_srgb,var(--color-primary)_35%,transparent)_355deg,var(--color-primary)_360deg)] opacity-70"}),a.map(e=>(0,t.jsx)("span",{"aria-hidden":"true",className:(0,$.f)("absolute h-1.5 w-1.5 -translate-x-1/2 -translate-y-1/2 rounded-full",E[e.status],"offline"===e.status&&"animate-pulse"),style:{left:`${e.x}%`,top:`${e.y}%`}},e.key)),(0,t.jsxs)("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:[(0,t.jsx)("span",{className:"num text-2xl font-bold text-primary glow-text-primary",children:i}),(0,t.jsx)("span",{className:"text-[9px] uppercase tracking-[0.25em] text-text-muted",children:"nodes"})]})]})}var R=e.i(1092);function T(e,t){return e.map(e=>e[t]).filter(e=>"number"==typeof e&&Number.isFinite(e))}var z=e.i(68759),D=e.i(82983),U=e.i(4050),G=e.i(71417),B=e.i(63376),V=e.i(22016),H=e.i(67683);function q({href:e,label:s,icon:r}){return(0,t.jsxs)(V.default,{href:e,className:"glow-hover group flex flex-col items-center gap-2 rounded-panel border border-border bg-surface-raised/60 p-4 text-center transition-colors duration-300 hover:border-primary/50 hover:bg-primary/5",children:[(0,t.jsx)("span",{className:"text-primary transition-all group-hover:drop-shadow-[0_0_8px_var(--color-primary)]",children:r}),(0,t.jsx)("span",{className:"text-[11px] font-medium uppercase tracking-wider text-text-muted group-hover:text-primary transition-colors",children:s})]})}e.s(["default",0,function({initialStats:e,initialTailscaleSummary:f}){let p,g,{activeNode:b,nodes:$}=(0,U.l)(),[A,E]=(0,s.useState)(e),[F,J]=(0,s.useState)(f),[W,K]=(0,s.useState)(!e),[Q,X]=(0,s.useState)([]),[Z,Y]=(0,s.useState)(null),[ee,et]=(0,s.useState)([]),es=(0,s.useRef)(!!e),[er,ea]=(0,s.useState)(!1),[en,ei]=(0,s.useState)([]),el=(0,s.useCallback)(async()=>{try{let e=await fetch("/api/federation"),t=await e.json();t.success&&(E(t.data.aggregated),ei(t.data.fleets))}catch{}},[]),eo=(0,s.useCallback)(async()=>{let e=await D.f.nodes.tailscaleSummary().catch(()=>null);e?.success&&e.data&&J(e.data)},[]),ec=(0,s.useCallback)(async(e=!1)=>{try{e||K(!0),eo();let t=await D.f.stats.overview();t.success&&E(t.data)}catch(t){let e=t instanceof Error?t.message:String(t);console.error("[DashboardPage] fetchStats error:",e)}finally{e||K(!1)}},[eo]);(0,s.useEffect)(()=>{if(er){el();let e=setInterval(()=>void el(),15e3);return()=>clearInterval(e)}if(es.current){es.current=!1,f||eo();let e=setInterval(()=>void ec(!0),15e3);return()=>clearInterval(e)}E(null),K(!0),ec();let e=setInterval(()=>void ec(!0),15e3);return()=>clearInterval(e)},[ec,el,eo,b.id,er,f]);let ed=(0,s.useCallback)(async()=>{try{let[e,t]=await Promise.all([D.f.assistant.getInsights(),D.f.assistant.listPinnedInsights()]);X(e.data?.insights??[]),Y(e.data?.generatedAt??null),et(t.data?.pins??[])}catch{}},[]);async function eu(e){let t=ee.find(t=>t.title===e.title&&t.body===e.body);try{t?await D.f.assistant.unpinInsight(t.id):await D.f.assistant.pinInsight({...e,generatedAt:Z??void 0}),await ed()}catch{}}(0,s.useEffect)(()=>{ed();let e=setInterval(()=>void ed(),3e5);return()=>clearInterval(e)},[ed]);let ex=function(e,t){let[r,a]=(0,s.useState)([]);(0,s.useEffect)(()=>{a(function(e){try{let t=window.sessionStorage.getItem(e),s=t?JSON.parse(t):null;return Array.isArray(s)?s.slice(-40):[]}catch{return[]}}(e))},[e]);let n=t?JSON.stringify(t):null;return(0,s.useEffect)(()=>{if(!n)return;let t=JSON.parse(n);a(s=>{let r=Date.now(),a=s[s.length-1];if(a&&r-a.t<5e3&&JSON.stringify({...a,t:void 0})===JSON.stringify({...t,t:void 0}))return s;let n=[...s,{...t,t:r}].slice(-40);try{window.sessionStorage.setItem(e,JSON.stringify(n))}catch{}return n})},[e,n]),r}(`magnus:overview:${er?"federation":b.id}`,A?{online:A.nodes.online,active:A.commands.running+A.commands.pending,cron:A.cron.active,cpu:A.health.avgCpuPercent,mem:A.health.avgMemoryPercent}:null),em=ex.length>1?ex[ex.length-2]:void 0,ef=(e,t)=>{let s=em?.[e];return"number"==typeof s&&"number"==typeof t?Math.round((t-s)*10)/10:void 0},ep=A?.health.avgCpuPercent??null,eh=A?.health.avgMemoryPercent??null,eg=A&&A.nodes.total>0?A.nodes.online/A.nodes.total*100:null,ev=A?A.nodes.offline>0?{label:"Nodes offline",tone:"danger"}:A.nodes.degraded>0?{label:"Degraded",tone:"warning"}:{label:"All systems nominal",tone:"success"}:{label:"Acquiring",tone:"muted"},eb=A?A.health.reportingNodes>0?{value:`${A.health.reportingNodes} node${1!==A.health.reportingNodes?"s":""} reporting`,positive:!0}:{value:"No health data",positive:!1}:{value:"Connecting…",positive:!0},ej=ex.map(e=>({t:e.t,cpu:e.cpu??null,mem:e.mem??null}));return(0,t.jsxs)(B.U,{className:"space-y-6",children:[(0,t.jsx)(B.z,{children:(0,t.jsx)(_.f,{title:er?"Federated Fleet Overview":"Fleet Overview",eyebrow:er?"Federation · live":"Fleet · live",description:er?`Aggregated stats across ${en.length} control node${1!==en.length?"s":""}`:"Real-time status of your Magnus fleet",status:(0,t.jsx)(a.t,{variant:"muted"===ev.tone?"default":"danger"===ev.tone?"danger":"warning"===ev.tone?"warning":"success",dot:!0,pulse:"success"!==ev.tone,children:ev.label}),actions:(0,t.jsxs)(t.Fragment,{children:[$.length>1&&(0,t.jsx)(z.K,{variant:er?"primary":"secondary",size:"sm",icon:(0,t.jsx)(j,{className:"h-3.5 w-3.5"}),onClick:()=>ea(e=>!e),children:er?"All Fleets":"Single Fleet"}),(0,t.jsx)(z.K,{variant:"secondary",size:"sm",icon:(0,t.jsx)(c.f,{className:"h-3.5 w-3.5"}),onClick:()=>er?void el():void ec(),children:"Refresh"})]})})}),!er&&F&&(0,t.jsx)(B.z,{children:(0,t.jsx)(H.f,{summary:F})}),(0,t.jsx)(B.z,{children:(0,t.jsx)(N.f,{hero:!0,padding:"lg",tone:"danger"===ev.tone?"danger":"warning"===ev.tone?"warning":"primary",testId:"overview-hero",children:!A&&W?(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-around gap-6","aria-busy":"true",children:[[0,1,2].map(e=>(0,t.jsx)("div",{className:"skeleton h-36 w-36 rounded-full opacity-60"},e)),(0,t.jsx)("div",{className:"skeleton h-44 w-44 rounded-full opacity-60"})]}):(0,t.jsxs)("div",{className:"grid gap-6 xl:grid-cols-[auto_1fr]",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-center gap-6 sm:justify-start",children:[(0,t.jsx)(L,{counts:{online:A?.nodes.online??0,degraded:A?.nodes.degraded??0,offline:A?.nodes.offline??0,provisioning:A?.nodes.provisioning??0}}),(0,t.jsxs)("div",{className:"flex flex-wrap justify-center gap-4",children:[(0,t.jsx)(k.f,{value:eg,label:"Nodes online",tone:A?A.nodes.offline>0?"danger":A.nodes.online<A.nodes.total?"warning":"success":"muted",display:A?`${A.nodes.online}/${A.nodes.total}`:void 0,size:150,testId:"overview-gauge-online"}),(0,t.jsx)(k.f,{value:ep,label:"Avg CPU",size:150,sublabel:A?`${A.health.reportingNodes} reporting`:void 0,testId:"overview-gauge-cpu"}),(0,t.jsx)(k.f,{value:eh,label:"Avg memory",size:150,testId:"overview-gauge-mem"})]})]}),(0,t.jsxs)("div",{className:"flex min-w-0 flex-col",children:[(0,t.jsxs)("div",{className:"mb-2 flex items-center justify-between gap-3",children:[(0,t.jsx)("span",{className:"text-[10px] font-bold uppercase tracking-[0.2em] text-text-muted",children:"CPU / memory · this session"}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3 text-[10px] uppercase tracking-wider text-text-muted",children:[(0,t.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(M.f,{status:"ONLINE",size:"xs",pulse:!1}),A?.nodes.online??0," up"]}),(0,t.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(M.f,{status:"DEGRADED",size:"xs"}),A?.nodes.degraded??0," degraded"]}),(0,t.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(M.f,{status:"OFFLINE",size:"xs",pulse:(A?.nodes.offline??0)>0}),A?.nodes.offline??0," down"]}),(0,t.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(M.f,{status:"PROVISIONING",size:"xs",pulse:!1}),A?.nodes.provisioning??0," provisioning"]})]})]}),ej.length>1?(0,t.jsx)(P.f,{data:ej,xKey:"t",percent:!0,height:170,formatX:e=>new Date(Number(e)).toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit"}),series:[{key:"cpu",label:"CPU",tone:"primary"},{key:"mem",label:"Memory",tone:"accent"}],testId:"overview-session-chart"}):(0,t.jsxs)("div",{className:"flex h-[170px] items-center justify-center rounded-panel border border-dashed border-primary/20 text-[11px] uppercase tracking-wider text-text-muted",children:[(0,t.jsx)("span",{className:"mr-2 inline-block h-1.5 w-1.5 animate-pulse rounded-full bg-primary"}),"Collecting samples — trend appears after the next poll"]})]})]})})}),(0,t.jsx)(B.z,{children:(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",children:[(0,t.jsx)(r.n,{label:"Total Nodes",value:A?(0,t.jsx)(S,{value:A.nodes.total}):"—",icon:(0,t.jsx)(n.f,{className:"h-4 w-4"}),trend:A?{value:`${A.nodes.online} online`,positive:A.nodes.online>0}:{value:"Loading…",positive:!0},spark:T(ex,"online"),delta:void 0!==(p=ef("online",A?.nodes.online))?{value:p,unit:" up"}:void 0}),(0,t.jsx)(r.n,{label:"Active Commands",value:A?(0,t.jsx)(S,{value:A.commands.running+A.commands.pending}):"—",icon:(0,t.jsx)(i.f,{className:"h-4 w-4"}),trend:A?{value:`${A.commands.total} total`,positive:!0}:void 0,spark:T(ex,"active"),tone:"accent"}),(0,t.jsx)(r.n,{label:"Cron Jobs",value:A?(0,t.jsx)(S,{value:A.cron.total}):"—",icon:(0,t.jsx)(l.f,{className:"h-4 w-4"}),trend:A?{value:`${A.cron.active} active`,positive:A.cron.active>0}:void 0,spark:T(ex,"cron")}),(0,t.jsx)(r.n,{label:"System Health",value:W||null===ep?"—":(0,t.jsx)(S,{value:ep,decimals:+!Number.isInteger(ep),suffix:"% CPU"}),icon:(0,t.jsx)(o.f,{className:"h-4 w-4"}),trend:eb,meter:W?void 0:ep,delta:void 0!==(g=ef("cpu",ep))?{value:g,unit:"%",positiveIsGood:!1}:void 0,tone:null!==ep&&ep>=90?"danger":null!==ep&&ep>=70?"warning":"primary"})]})}),er&&en.length>0&&(0,t.jsx)(B.z,{children:(0,t.jsx)(N.f,{title:"Fleet Breakdown",children:(0,t.jsx)("div",{className:"space-y-2",children:en.map(e=>(0,t.jsxs)("div",{className:"grid grid-cols-1 items-center gap-3 rounded-chip border border-border/50 bg-surface-raised px-4 py-2.5 text-xs sm:grid-cols-[minmax(0,1fr)_minmax(0,1.2fr)_auto]",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(M.f,{status:e.stats?"ONLINE":"OFFLINE"}),(0,t.jsx)("span",{className:"font-medium",children:e.nodeName})]}),e.stats?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(I.f,{value:e.stats.nodes.total>0?e.stats.nodes.online/e.stats.nodes.total*100:null,tone:e.stats.nodes.offline>0?"warning":"success",label:`${e.nodeName} nodes online`,valueLabel:`${e.stats.nodes.online}/${e.stats.nodes.total}`,showValue:!0}),(0,t.jsxs)("div",{className:"flex items-center gap-4 text-text-muted",children:[(0,t.jsxs)("span",{className:"num",children:[e.stats.nodes.total," nodes"]}),(0,t.jsxs)("span",{className:"num",children:[e.stats.commands.running," running"]})]})]}):(0,t.jsx)(a.t,{variant:(0,a.k)("OFFLINE"),className:"justify-self-start",children:"Unreachable"})]},e.nodeId))})})}),(0,t.jsx)(B.z,{children:(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-3",children:[(0,t.jsx)(N.f,{title:"Recent Commands",icon:(0,t.jsx)(i.f,{className:"h-3.5 w-3.5"}),children:A?0===A.recentCommands.length?(0,t.jsx)(C.f,{compact:!0,icon:(0,t.jsx)(i.f,{className:"h-4 w-4"}),title:"No commands dispatched yet",action:(0,t.jsx)(V.default,{href:"/commands",className:"text-[11px] uppercase tracking-wider text-primary hover:underline",children:"Run a command →"})}):(0,t.jsx)("div",{className:"space-y-1.5",children:A.recentCommands.map(e=>(0,t.jsxs)("div",{className:"scan-sweep flex items-center justify-between gap-2 rounded-chip border border-border/50 bg-surface-raised/60 px-3 py-2 text-[11px] transition-colors hover:border-primary/30",children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,t.jsx)(M.f,{status:e.status,size:"xs"}),(0,t.jsx)("code",{className:"truncate text-primary",children:e.command}),e.node&&(0,t.jsxs)("span",{className:"shrink-0 text-text-muted",children:["on ",e.node.name]})]}),(0,t.jsxs)("div",{className:"ml-2 flex shrink-0 items-center gap-2",children:[(0,t.jsx)(a.t,{variant:(0,a.k)(e.status),children:e.status}),(0,t.jsx)("span",{className:"num hidden text-text-muted sm:inline",children:(0,G.C)(e.createdAt)})]})]},`${e.id}-${e.status}`))}):W?(0,t.jsx)(O.Q,{lines:4}):(0,t.jsx)(C.f,{compact:!0,title:"Stats unavailable",description:"The Control API did not answer; retrying every 15 seconds.",tone:"warning"})}),(0,t.jsx)(N.f,{title:"Recent Activity",tone:"accent",icon:(0,t.jsx)(w.f,{className:"h-3.5 w-3.5"}),children:A?0===A.recentAudit.length?(0,t.jsx)(C.f,{compact:!0,icon:(0,t.jsx)(w.f,{className:"h-4 w-4"}),title:"No audit events yet"}):(0,t.jsx)("ol",{className:"relative space-y-1.5 border-l border-accent/20 pl-3",children:A.recentAudit.map(e=>(0,t.jsxs)("li",{className:"relative flex items-center justify-between gap-2 rounded-chip px-2 py-1.5 text-[11px] transition-colors hover:bg-accent/5",children:[(0,t.jsx)("span",{"aria-hidden":"true",className:"absolute -left-[15.5px] top-1/2 h-1.5 w-1.5 -translate-y-1/2 rounded-full bg-accent shadow-[0_0_6px_var(--color-accent)]"}),(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,t.jsx)("span",{className:"truncate font-medium text-text",children:e.action}),e.targetType&&(0,t.jsxs)("span",{className:"truncate text-text-muted",children:[e.targetType,e.targetId?` ${e.targetId.slice(0,8)}…`:""]})]}),(0,t.jsx)("span",{className:"num shrink-0 text-text-muted",children:(0,G.C)(e.timestamp)})]},e.id))}):W?(0,t.jsx)(O.Q,{lines:4}):(0,t.jsx)(C.f,{compact:!0,title:"Audit feed unavailable",tone:"warning"})}),(0,t.jsx)(N.f,{title:"Live Event Stream",icon:(0,t.jsx)(y.f,{className:"h-3.5 w-3.5"}),tone:"success",children:(0,t.jsx)(R.d,{limit:7})})]})}),(0,t.jsx)(B.z,{children:(0,t.jsx)(N.f,{title:"Quick Actions",interactive:!1,children:(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-4",children:[(0,t.jsx)(q,{href:"/nodes",label:"Manage Nodes",icon:(0,t.jsx)(n.f,{className:"h-5 w-5"})}),(0,t.jsx)(q,{href:"/commands",label:"Run Command",icon:(0,t.jsx)(i.f,{className:"h-5 w-5"})}),(0,t.jsx)(q,{href:"/cron",label:"Cron Jobs",icon:(0,t.jsx)(l.f,{className:"h-5 w-5"})}),(0,t.jsx)(q,{href:"/files",label:"Edit Files",icon:(0,t.jsx)(o.f,{className:"h-5 w-5"})})]})})}),(ee.length>0||Q.length>0)&&(0,t.jsx)(B.z,{children:(0,t.jsxs)(N.f,{title:"AI Insights",icon:(0,t.jsx)(d.f,{className:"h-4 w-4"}),action:Z?(0,t.jsxs)("span",{className:"num text-[10px] text-text-muted",children:["Updated ",(0,G.C)(Z)]}):void 0,children:[ee.length>0&&(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)("p",{className:"mb-2 text-[10px] font-bold uppercase tracking-wider text-text-muted",children:"Pinned"}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-2 lg:grid-cols-2",children:ee.map(e=>(0,t.jsxs)("div",{className:"rounded-chip border border-primary/25 bg-primary/5 px-3 py-2 shadow-[inset_2px_0_0_var(--color-primary)]",children:[(0,t.jsxs)("div",{className:"mb-1 flex items-start justify-between gap-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-xs font-bold text-text",children:e.title}),(0,t.jsxs)("p",{className:"text-[10px] text-text-muted",children:["Pinned ",(0,G.C)(e.pinnedAt)]})]}),(0,t.jsx)("button",{onClick:()=>void D.f.assistant.unpinInsight(e.id).then(ed),className:"rounded p-1 text-text-muted transition-colors hover:text-warning",title:"Unpin insight",children:(0,t.jsx)(v,{className:"h-3.5 w-3.5"})})]}),(0,t.jsx)("p",{className:"text-[11px] text-text-muted",children:e.body})]},e.id))})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-3",children:Q.slice(0,6).map((e,s)=>{let r="critical"===e.severity?m.f:"warning"===e.severity?u.f:x.f,a="critical"===e.severity?"text-danger border-danger/30 bg-danger/5 shadow-[inset_2px_0_0_var(--color-danger),0_0_12px_var(--color-glow-danger)]":"warning"===e.severity?"text-warning border-warning/30 bg-warning/5 shadow-[inset_2px_0_0_var(--color-warning)]":"text-info border-info/30 bg-info/5 shadow-[inset_2px_0_0_var(--color-info)]",n=ee.some(t=>t.title===e.title&&t.body===e.body);return(0,t.jsxs)("div",{className:`rounded-chip border px-3 py-2 ${a}`,children:[(0,t.jsxs)("div",{className:"mb-1 flex items-start justify-between gap-2",children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-1.5",children:[(0,t.jsx)(r,{className:"h-3.5 w-3.5 flex-shrink-0"}),(0,t.jsx)("span",{className:"truncate text-xs font-bold",children:e.title})]}),(0,t.jsx)("button",{onClick:()=>void eu(e),className:"rounded p-1 transition-colors hover:bg-white/5",title:n?"Unpin insight":"Pin insight",children:n?(0,t.jsx)(v,{className:"h-3 w-3"}):(0,t.jsx)(h,{className:"h-3 w-3"})})]}),(0,t.jsx)("p",{className:"line-clamp-2 text-[10px] opacity-80",children:e.body})]},s)})})]})})]})}],8593)},67683,e=>{"use strict";var t=e.i(43476),s=e.i(22016),r=e.i(64155),a=e.i(83902);e.s(["f",0,function({summary:e,showAction:n=!0}){let i=e.nodes.filter(e=>e.tailscale?.requiresRenewal).sort((e,t)=>e.tailscale?.expired!==t.tailscale?.expired?e.tailscale?.expired?-1:1:(e.tailscale?.daysRemaining??Number.MAX_SAFE_INTEGER)-(t.tailscale?.daysRemaining??Number.MAX_SAFE_INTEGER));if(0===i.length)return null;let l=i.some(e=>e.tailscale?.expired),o=l?a.f:r.f,c=l?{panel:"border-danger/40 bg-danger/5",rail:"bg-danger",icon:"bg-danger/10 text-danger",text:"text-danger",chip:"border-danger/30 text-danger",action:"border-danger/40 text-danger hover:bg-danger/10"}:{panel:"border-warning/40 bg-warning/5",rail:"bg-warning",icon:"bg-warning/10 text-warning",text:"text-warning",chip:"border-warning/30 text-warning",action:"border-warning/40 text-warning hover:bg-warning/10"};return(0,t.jsxs)("section",{id:"tailscale-renewal",role:"alert","aria-label":"Tailscale renewal alert",className:`relative overflow-hidden rounded border px-4 py-3 ${c.panel}`,children:[(0,t.jsx)("div",{className:`absolute inset-y-0 left-0 w-0.5 ${c.rail}`}),(0,t.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-start gap-3",children:[(0,t.jsx)("div",{className:`mt-0.5 flex h-8 w-8 shrink-0 items-center justify-center rounded ${c.icon}`,children:(0,t.jsx)(o,{className:"h-4 w-4"})}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("p",{className:`text-xs font-bold uppercase tracking-[0.14em] ${c.text}`,children:l?"Tailscale access expired":"Tailscale renewal due"}),(0,t.jsxs)("p",{className:"mt-1 text-[11px] text-text-muted",children:[i.length," node ",1===i.length?"key needs":"keys need"," renewal within ",e.warningDays," days. Renew before tailnet access is interrupted."]}),(0,t.jsx)("div",{className:"mt-2 flex flex-wrap gap-1.5",children:i.map(e=>(0,t.jsxs)("span",{title:e.tailscale?.keyExpiry?`Expires ${e.tailscale.keyExpiry}`:void 0,className:`inline-flex items-center gap-1 rounded border bg-background/40 px-2 py-0.5 font-mono text-[10px] ${c.chip}`,children:[(0,t.jsx)("span",{className:"font-semibold",children:e.name}),(0,t.jsx)("span",{"aria-hidden":"true",children:"·"}),(0,t.jsx)("span",{children:e.tailscale?.expired?"expired":`${e.tailscale?.daysRemaining??"?"}d`})]},e.id))})]})]}),n&&(0,t.jsx)(s.default,{href:"/nodes#tailscale-renewal",className:`shrink-0 self-start rounded border px-3 py-1.5 text-[10px] font-bold uppercase tracking-wider transition-colors sm:self-center ${c.action}`,children:"Review nodes"})]})]})}])},46670,e=>{"use strict";var t=e.i(43476),s=e.i(78571);let r={default:"border-border text-text-muted",success:"border-success/40 text-success bg-success/5 shadow-[0_0_6px_rgba(0,255,65,0.15)]",warning:"border-warning/40 text-warning bg-warning/5 shadow-[0_0_6px_rgba(255,179,0,0.15)]",danger:"border-danger/40 text-danger bg-danger/5 shadow-[0_0_6px_rgba(255,23,68,0.15)]",info:"border-info/40 text-info bg-info/5 shadow-[0_0_6px_rgba(0,176,255,0.15)]"},a={default:"bg-text-muted",success:"bg-success",warning:"bg-warning",danger:"bg-danger",info:"bg-info"};e.s(["t",0,function({children:e,variant:n="default",className:i,dot:l=!1,pulse:o=!1}){return(0,t.jsxs)("span",{className:(0,s.f)("inline-flex items-center gap-1.5 rounded-chip border px-2 py-0.5 text-[10px] font-bold uppercase tracking-wider",r[n],i),children:[l&&(0,t.jsxs)("span",{"aria-hidden":"true",className:"relative inline-flex h-1.5 w-1.5",children:[o&&(0,t.jsx)("span",{className:(0,s.f)("absolute inset-0 rounded-full animate-halo",a[n])}),(0,t.jsx)("span",{className:(0,s.f)("relative inline-flex h-1.5 w-1.5 rounded-full",a[n])})]}),e]})},"k",0,function(e){switch(e.toUpperCase()){case"ONLINE":case"COMPLETED":case"ACTIVE":case"RUNNING":case"INSTALLED":case"HEALTHY":return"success";case"DEGRADED":case"PAUSED":case"QUEUED":case"PENDING":case"INSTALLING":return"warning";case"OFFLINE":case"FAILED":case"ERROR":case"TIMEOUT":case"CANCELLED":case"DECOMMISSIONED":case"CRITICAL":return"danger";case"PROVISIONING":case"UPDATING":return"info";default:return"default"}}])},93999,51196,55427,e=>{"use strict";var t=e.i(43476),s=e.i(56420);let r={name:"arrow-down-right",size:24,node:[["path",{d:"m7 7 10 10",key:"1fmybs"}],["path",{d:"M17 7v10H7",key:"6fjiku"}]]};r.node;let a=(0,s.f)(r);var n=e.i(75775),i=e.i(78571),l=e.i(3062),o=e.i(35084);let c={warning:"shadow-[0_0_6px_var(--color-warning)]",danger:"shadow-[0_0_8px_var(--color-danger)]",accent:"shadow-[0_0_6px_var(--color-accent)]",primary:"shadow-[0_0_6px_var(--color-primary)]"},d={xs:"h-1",sm:"h-1.5",md:"h-2"};function u({value:e,max:s=100,tone:r,thresholds:a=o.q,label:n,size:l="xs",showValue:x=!1,valueLabel:m,glow:f,className:p,testId:h}){let g="number"==typeof e&&Number.isFinite(e),v=g?Math.max(0,Math.min(100,e/(s||1)*100)):0,b=r??(g?(0,o.Z)(v,a):"muted"),j=f||!r&&g&&v>=a.warn,w=m??(g?`${v.toFixed(+(v<10&&v>0))}%`:"—");return(0,t.jsxs)("div",{className:(0,i.f)("flex min-w-0 items-center gap-2",p),"data-testid":h,children:[(0,t.jsx)("div",{role:"meter","aria-label":n,"aria-valuemin":0,"aria-valuemax":s,"aria-valuenow":g?e:void 0,"aria-valuetext":w,className:(0,i.f)("relative flex-1 overflow-hidden rounded-full bg-border/70",d[l]),children:(0,t.jsx)("div",{style:{"--meter":`${v}%`},className:(0,i.f)("h-full w-(--meter) rounded-full transition-[width] duration-700 ease-out-expo starting:w-0",o.H[b],j&&c[b])})}),x&&(0,t.jsx)("span",{className:(0,i.f)("num w-11 shrink-0 text-right text-[11px]",g?o.T[b]:"text-text-muted"),children:w})]})}e.s(["f",0,u],51196);var x=e.i(71645);function m({values:e,tone:s="primary",width:r=160,height:a=32,area:n=!0,max:l,percent:c=!1,threshold:d,live:u=!0,emptyLabel:f="not enough data",className:p,testId:h,label:g,stretch:v=!1}){let b=`spark${(0,x.useId)().replace(/:/g,"")}`;if(e.length<2)return(0,t.jsx)("div",{className:(0,i.f)("flex h-8 items-center text-xs italic text-text-muted",p),"data-testid":h,children:f});let j=o.v[s],w=l??(c?Math.max(100,...e):Math.max(...e,d??0)||1),y=a-4,N=r/(e.length-1),_=e=>2+y-Math.max(0,e)/w*y,k=e.map((e,t)=>[t*N,_(e)]),I=k.map(([e,t])=>`${e.toFixed(1)},${t.toFixed(1)}`).join(" "),M=k[k.length-1];return(0,t.jsxs)("svg",{width:v?"100%":r,height:a,viewBox:`0 0 ${r} ${a}`,preserveAspectRatio:v?"none":void 0,className:(0,i.f)("block overflow-visible",p),"data-testid":h,role:g?"img":void 0,"aria-label":g,"aria-hidden":!g||void 0,children:[n&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("defs",{children:(0,t.jsxs)("linearGradient",{id:b,x1:"0",x2:"0",y1:"0",y2:"1",children:[(0,t.jsx)("stop",{offset:"0%",stopColor:j,stopOpacity:.35}),(0,t.jsx)("stop",{offset:"100%",stopColor:j,stopOpacity:0})]})}),(0,t.jsx)("polygon",{points:`0,${a} ${I} ${r},${a}`,fill:`url(#${b})`})]}),void 0!==d&&(0,t.jsx)("line",{x1:0,x2:r,y1:_(d),y2:_(d),stroke:"var(--color-warning)",strokeOpacity:.5,strokeDasharray:"3 3",strokeWidth:1}),(0,t.jsx)("polyline",{fill:"none",stroke:j,strokeWidth:1.5,vectorEffect:"non-scaling-stroke",strokeLinejoin:"round",strokeLinecap:"round",points:I}),u&&!v&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("circle",{cx:M[0],cy:M[1],r:2.5,fill:j,className:"origin-center animate-halo [transform-box:fill-box]"}),(0,t.jsx)("circle",{cx:M[0],cy:M[1],r:2,fill:j})]})]})}e.s(["f",0,m],55427),e.s(["N",0,function({title:e,description:s,children:r,className:a,action:n,tone:i,corners:o=!1,...c}){return(0,t.jsx)(l.f,{...c,tone:i,corners:o,title:e,description:s,action:n,className:a,children:r})},"n",0,function({label:e,value:s,icon:r,trend:c,spark:d,meter:x,delta:f,tone:p="primary",className:h,testId:g}){let v=!f||f.value>=0===(f.positiveIsGood??!0);return(0,t.jsxs)(l.f,{tone:p,className:(0,i.f)("overflow-hidden",h),testId:g,children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("span",{className:"text-[10px] font-medium uppercase tracking-[0.15em] text-text-muted",children:e}),r&&(0,t.jsx)("span",{className:"text-primary/60",children:r})]}),(0,t.jsxs)("div",{className:"mt-2 flex items-end justify-between gap-2",children:[(0,t.jsx)("div",{className:(0,i.f)("num text-2xl font-bold","primary"===p?"text-primary neon-text":o.T[p]),children:s}),f&&0!==f.value&&(0,t.jsxs)("span",{className:(0,i.f)("num mb-1 inline-flex items-center gap-0.5 text-[11px]",v?"text-success":"text-danger"),children:[f.value>0?(0,t.jsx)(n.f,{className:"h-3 w-3"}):(0,t.jsx)(a,{className:"h-3 w-3"}),Math.abs(f.value).toFixed(+!Number.isInteger(f.value)),f.unit]})]}),c&&(0,t.jsx)("div",{className:(0,i.f)("mt-1 text-[11px]",c.positive?"text-success":"text-danger"),children:c.value}),void 0!==x&&(0,t.jsx)(u,{value:x,className:"mt-3",label:e}),d&&d.length>1&&(0,t.jsx)("div",{className:"-mx-5 -mb-5 mt-3 opacity-80",children:(0,t.jsx)(m,{values:d,tone:p,width:240,height:28,stretch:!0,live:!1})})]})}],93999)},54149,21176,e=>{"use strict";var t=e.i(43476),s=e.i(71645),r=e.i(78571),a=e.i(35084);e.s(["f",0,function({value:e,max:n=100,label:i,sublabel:l,tone:o,thresholds:c=a.q,higherIsBetter:d=!1,size:u=140,display:x,ticks:m=!0,hideLabel:f=!1,className:p,testId:h}){let g=(0,s.useId)().replace(/:/g,""),v="number"==typeof e&&Number.isFinite(e),b=v?Math.max(0,Math.min(100,e/(n||1)*100)):0,j=o??(v?d?(0,a.Z)(100-b,c):(0,a.Z)(b,c):"muted"),w=Math.max(4,Math.round(u/16)),y=50-w/2-4,N=2*Math.PI*y,_=.75*N,k=_*b/100,I=u>=140,M=x??(v?`${Math.round(b)}%`:"—"),$=m?Array.from({length:11},(e,s)=>{let r=(135+270*s/10)*Math.PI/180,a=50-(s%5==0?4:2.5);return(0,t.jsx)("line",{x1:50+48.5*Math.cos(r),y1:50+48.5*Math.sin(r),x2:50+a*Math.cos(r),y2:50+a*Math.sin(r),stroke:"var(--color-border-strong)",strokeWidth:.8},s)}):null;return(0,t.jsxs)("div",{role:"img","aria-label":`${i}: ${M}`,"data-testid":h,className:(0,r.f)("relative inline-flex flex-col items-center",p),style:{width:u},children:[(0,t.jsxs)("svg",{viewBox:"0 0 100 100",width:u,height:u,"aria-hidden":"true",className:"overflow-visible",children:[I&&(0,t.jsx)("defs",{children:(0,t.jsxs)("filter",{id:`g${g}`,x:"-30%",y:"-30%",width:"160%",height:"160%",children:[(0,t.jsx)("feGaussianBlur",{stdDeviation:"2.2",result:"blur"}),(0,t.jsxs)("feMerge",{children:[(0,t.jsx)("feMergeNode",{in:"blur"}),(0,t.jsx)("feMergeNode",{in:"SourceGraphic"})]})]})}),$,(0,t.jsx)("circle",{cx:50,cy:50,r:y,fill:"none",stroke:"var(--color-border)",strokeWidth:w,strokeLinecap:"round",strokeDasharray:`${_} ${N}`,transform:"rotate(135 50 50)"}),(0,t.jsx)("circle",{cx:50,cy:50,r:y,fill:"none",stroke:a.v[j],strokeWidth:w,strokeLinecap:"round",transform:"rotate(135 50 50)",filter:I?`url(#g${g})`:void 0,style:{"--dash":`${k} ${N}`},className:"[stroke-dasharray:var(--dash)] transition-[stroke-dasharray] duration-1000 ease-out-expo starting:[stroke-dasharray:0_1000]"})]}),(0,t.jsxs)("div",{className:"pointer-events-none absolute inset-0 flex flex-col items-center justify-center",style:{height:u},children:[(0,t.jsx)("span",{className:(0,r.f)("num font-bold leading-none",a.T[j],I&&a.z[j]),style:{fontSize:Math.max(12,.2*u)},children:M}),l&&(0,t.jsx)("span",{className:"num mt-1 text-text-muted",style:{fontSize:Math.max(9,.075*u)},children:l})]}),!f&&(0,t.jsx)("span",{className:"-mt-[10%] text-center text-[10px] font-medium uppercase tracking-[0.15em] text-text-muted",children:i})]})}],54149);var n=e.i(70703),i=e.i(65369);let l=(0,n.default)(()=>e.A(1321),{loadableGenerated:{modules:[69944]},ssr:!1,loading:()=>(0,t.jsx)(i.l,{className:"h-[180px] w-full"})});e.s(["f",0,l],21176)},3062,e=>{"use strict";var t=e.i(43476),s=e.i(78571),r=e.i(35084);let a={primary:"[--panel-corner-color:color-mix(in_srgb,var(--color-primary)_60%,transparent)]",accent:"[--panel-corner-color:color-mix(in_srgb,var(--color-accent)_70%,transparent)]",success:"[--panel-corner-color:color-mix(in_srgb,var(--color-success)_60%,transparent)]",warning:"[--panel-corner-color:color-mix(in_srgb,var(--color-warning)_70%,transparent)]",danger:"[--panel-corner-color:color-mix(in_srgb,var(--color-danger)_70%,transparent)]",info:"[--panel-corner-color:color-mix(in_srgb,var(--color-info)_60%,transparent)]",muted:"[--panel-corner-color:var(--color-border-strong)]"},n={primary:"[--glow-hover-color:var(--color-glow)]",accent:"[--glow-hover-color:var(--color-glow-accent)]",success:"[--glow-hover-color:var(--color-glow-success)]",warning:"[--glow-hover-color:var(--color-glow-warning)]",danger:"[--glow-hover-color:var(--color-glow-danger)]",info:"[--glow-hover-color:var(--color-glow)]",muted:"[--glow-hover-color:var(--color-glow)]"},i={primary:"hover:border-primary/30",accent:"hover:border-accent/40",success:"hover:border-success/30",warning:"hover:border-warning/40",danger:"hover:border-danger/40",info:"hover:border-info/30",muted:"hover:border-border-strong"},l={none:"",sm:"p-3",md:"p-5",lg:"p-6"};e.s(["f",0,function({tone:e="primary",corners:o=!0,interactive:c=!0,hero:d=!1,title:u,description:x,icon:m,action:f,as:p="div",padding:h="md",testId:g,className:v,children:b,...j}){return(0,t.jsxs)(p,{...j,"data-testid":g??j["data-testid"],className:(0,s.f)("relative rounded-panel border border-border bg-surface transition-colors duration-300",l[h],o&&"panel-corners",o&&a[e],c&&"glow-hover",c&&n[e],c&&i[e],d&&"grid-bg overflow-hidden bg-surface/80",v),children:[(u||f||m)&&(0,t.jsxs)("div",{className:"mb-4 flex items-start justify-between gap-3",children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-start gap-2",children:[m&&(0,t.jsx)("span",{className:(0,s.f)("mt-0.5 shrink-0",r.T[e]),children:m}),(0,t.jsxs)("div",{className:"min-w-0",children:[u&&(0,t.jsx)("h3",{className:"text-xs font-bold uppercase tracking-wider",children:u}),x&&(0,t.jsx)("p",{className:"mt-0.5 text-[11px] text-text-muted",children:x})]})]}),f]}),b]})}])},73404,e=>{"use strict";var t=e.i(43476),s=e.i(78571),r=e.i(35084);e.s(["f",0,function({title:e,eyebrow:a,description:n,icon:i,actions:l,status:o,tone:c="primary",className:d,testId:u}){return(0,t.jsxs)("div",{"data-testid":u,className:(0,s.f)("flex flex-wrap items-end justify-between gap-4",d),children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-start gap-3",children:[i&&(0,t.jsx)("span",{"aria-hidden":"true",className:(0,s.f)("mt-0.5 flex h-10 w-10 shrink-0 items-center justify-center rounded-panel border bg-surface","accent"===c?"border-accent/40 shadow-[0_0_14px_var(--color-glow-accent)]":"border-primary/40 shadow-[0_0_14px_var(--color-glow)]",r.T[c]),children:i}),(0,t.jsxs)("div",{className:"min-w-0",children:[a&&(0,t.jsxs)("p",{className:(0,s.f)("mb-1 text-[10px] font-medium uppercase tracking-[0.3em]",r.T[c],"opacity-80"),children:[(0,t.jsx)("span",{"aria-hidden":"true",children:"// "}),a]}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,t.jsx)("h1",{className:(0,s.f)("text-xl font-bold uppercase tracking-wider",r.T[c],r.z[c]),children:e}),o]}),n&&(0,t.jsx)("p",{className:"mt-1 max-w-3xl text-xs text-text-muted",children:n})]})]}),l&&(0,t.jsx)("div",{className:"flex flex-wrap items-center gap-2",children:l})]})}])},63376,e=>{"use strict";var t=e.i(43476);e.s(["z",0,function({children:e,className:s}){return(0,t.jsx)("div",{className:`animate-page-in${s?` ${s}`:""}`,children:e})},"U",0,function({children:e,className:s}){return(0,t.jsx)("div",{className:s,children:e})}])},65369,e=>{"use strict";var t=e.i(43476),s=e.i(78571);function r({className:e}){return(0,t.jsx)("div",{"aria-hidden":"true",className:(0,s.f)("skeleton h-3 w-full",e)})}e.s(["l",0,r,"g",0,function({count:e=4,className:a}){return(0,t.jsx)("div",{role:"status","aria-label":"Loading",className:(0,s.f)("grid gap-4 sm:grid-cols-2 lg:grid-cols-4",a),children:Array.from({length:e},(e,s)=>(0,t.jsxs)("div",{className:"panel-corners rounded-panel border border-border bg-surface p-5",children:[(0,t.jsx)(r,{className:"h-2 w-1/2"}),(0,t.jsx)(r,{className:"mt-4 h-7 w-2/3"}),(0,t.jsx)(r,{className:"mt-3 h-1 w-full opacity-60"})]},s))})},"F",0,function({rows:e=5,cols:a=4,className:n}){return(0,t.jsxs)("div",{role:"status","aria-label":"Loading",className:(0,s.f)("overflow-hidden rounded-panel border border-border",n),children:[(0,t.jsx)("div",{className:"flex gap-4 border-b border-border bg-surface px-4 py-3",children:Array.from({length:a},(e,s)=>(0,t.jsx)(r,{className:"h-2 flex-1 opacity-60"},s))}),Array.from({length:e},(e,n)=>(0,t.jsx)("div",{className:"flex gap-4 border-b border-border/50 px-4 py-3 last:border-0",children:Array.from({length:a},(e,a)=>(0,t.jsx)(r,{className:(0,s.f)("h-3 flex-1",(n+a)%3==0&&"max-w-[60%]")},a))},n))]})},"Q",0,function({lines:e=3,className:a}){let n=["w-full","w-11/12","w-4/5","w-2/3","w-3/4"];return(0,t.jsx)("div",{role:"status","aria-label":"Loading",className:(0,s.f)("space-y-2",a),children:Array.from({length:e},(e,s)=>(0,t.jsx)(r,{className:n[s%n.length]},s))})}])},75723,e=>{"use strict";var t=e.i(43476),s=e.i(78571),r=e.i(46670);let a={success:"bg-success shadow-[0_0_6px_var(--color-success)]",warning:"bg-warning shadow-[0_0_6px_var(--color-warning)]",danger:"bg-danger shadow-[0_0_6px_var(--color-danger)]",info:"bg-info shadow-[0_0_6px_var(--color-info)]",default:"bg-text-muted"},n={success:"bg-success",warning:"bg-warning",danger:"bg-danger",info:"bg-info",default:"bg-text-muted"},i=new Set(["ONLINE","RUNNING","ACTIVE","HEALTHY","CRITICAL","UPDATING","PROVISIONING"]);e.s(["f",0,function({status:e,pulse:l,size:o="sm",className:c,label:d}){let u=(0,r.k)(e),x=l??i.has(e.toUpperCase()),m="xs"===o?"h-1.5 w-1.5":"h-2 w-2";return(0,t.jsxs)("span",{className:(0,s.f)("relative inline-flex shrink-0",m,c),role:d?"img":void 0,"aria-label":d,"aria-hidden":!d||void 0,children:[x&&(0,t.jsx)("span",{className:(0,s.f)("absolute inset-0 rounded-full animate-halo",n[u])}),(0,t.jsx)("span",{className:(0,s.f)("relative inline-flex rounded-full",m,a[u])})]})}])},71417,e=>{"use strict";e.s(["L",0,function(e){if(0===e)return"0 B";let t=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,t)).toFixed(1))} ${["B","KB","MB","GB","TB"][t]}`},"C",0,function(e){return e?("string"==typeof e?new Date(e):e).toLocaleString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}):"—"}])},79432,e=>{"use strict";var t=e.i(56420);let s={name:"activity",size:24,node:[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]};s.node;let r=(0,t.f)(s);e.s(["f",0,r],79432)},75775,e=>{"use strict";var t=e.i(56420);let s={name:"arrow-up-right",size:24,node:[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]};s.node;let r=(0,t.f)(s);e.s(["f",0,r],75775)},83902,e=>{"use strict";var t=e.i(56420);let s={name:"shield-exclamation-point",size:24,node:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],aliases:["shield-alert"]};s.node;let r=(0,t.f)(s);e.s(["f",0,r],83902)},90317,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});var r={bindSnapshot:function(){return d},createAsyncLocalStorage:function(){return o},createSnapshot:function(){return u},getOrCreateGlobalAsyncLocalStorage:function(){return c}};for(var a in r)Object.defineProperty(s,a,{enumerable:!0,get:r[a]});let n=Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available");class i{disable(){throw n}getStore(){}run(){throw n}exit(){throw n}enterWith(){throw n}static bind(e){return e}}let l="u">typeof globalThis&&globalThis.AsyncLocalStorage;function o(){return l?new l:new i}function c(e){let t=Symbol.for(`@next/${e}@16.4.6`),s=globalThis;return s[t]??=o()}function d(e){return l?l.bind(e):i.bind(e)}function u(){return l?l.snapshot():function(e,...t){return e(...t)}}},42344,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"workAsyncStorageInstance",{enumerable:!0,get:function(){return r}});let r=(0,e.r(90317).getOrCreateGlobalAsyncLocalStorage)("work-async-storage")},63599,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"workAsyncStorage",{enumerable:!0,get:function(){return r.workAsyncStorageInstance}});let r=e.r(42344)},70703,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"default",{enumerable:!0,get:function(){return a}});let r=e.r(55682)._(e.r(69093));function a(e,t){let s={};"function"==typeof e&&(s.loader=e);let a={...s,...t};return(0,r.default)({...a,modules:a.loadableGenerated?.modules})}("function"==typeof s.default||"object"==typeof s.default&&null!==s.default)&&void 0===s.default.__esModule&&(Object.defineProperty(s.default,"__esModule",{value:!0}),Object.assign(s.default,s),t.exports=s.default)},9885,(e,t,s)=>{"use strict";function r(e){return e.split("/").map(e=>encodeURIComponent(e)).join("/")}Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"encodeURIPath",{enumerable:!0,get:function(){return r}})},67585,(e,t,s)=>{"use strict";e.i(47167),Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"BailoutToCSRForNextDynamic",{enumerable:!0,get:function(){return i}});let r=e.r(71645),a=e.r(74080);e.r(32061);let n=e.r(49354).createReactBrowserBailoutReason.bind(null,"next/dynamic");function i({children:e}){return(0,r.use)((0,a.browser)(n)),e}},69093,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"default",{enumerable:!0,get:function(){return c}});let r=e.r(43476),a=e.r(71645),n=e.r(67585),i=e.r(52157);function l(e){return{default:e&&"default"in e?e.default:e}}let o={loader:()=>Promise.resolve(l(()=>null)),loading:null,ssr:!0},c=function(e){let t={...o,...e},s=(0,a.lazy)(()=>t.loader().then(l)),c=t.loading;function d(e){let l=c?(0,r.jsx)(c,{isLoading:!0,pastDelay:!0,error:null}):null,o=!t.ssr||!!t.loading,d=o?a.Suspense:a.Fragment,u=t.ssr?(0,r.jsxs)(r.Fragment,{children:["u"<typeof window?(0,r.jsx)(i.PreloadChunks,{moduleIds:t.modules}):null,(0,r.jsx)(s,{...e})]}):(0,r.jsx)(n.BailoutToCSRForNextDynamic,{children:(0,r.jsx)(s,{...e})});return(0,r.jsx)(d,{...o?{fallback:l}:{},children:u})}return d.displayName="LoadableComponent",d}},52157,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"PreloadChunks",{enumerable:!0,get:function(){return o}});let r=e.r(43476),a=e.r(74080),n=e.r(63599),i=e.r(9885),l=e.r(43369);function o({moduleIds:e}){if("u">typeof window)return null;let t=n.workAsyncStorage.getStore();if(void 0===t)return null;let s=[];if(t.reactLoadableManifest&&e){let r=t.reactLoadableManifest;for(let t of e){if(!r[t])continue;let e=r[t].files;s.push(...e)}}if(0===s.length)return null;let c=(0,l.getAssetTokenQuery)();return(0,r.jsx)(r.Fragment,{children:s.map(e=>{let s=`${t.assetPrefix}/_next/${(0,i.encodeURIPath)(e)}${c}`;return e.endsWith(".css")?(0,r.jsx)("link",{precedence:"dynamic",href:s,rel:"stylesheet",as:"style",nonce:t.nonce},e):((0,a.preload)(s,{as:"script",fetchPriority:"low",nonce:t.nonce}),null)})})}},49354,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});var r={createReactBrowserBailoutReason:function(){return i},getReactBrowserBailoutReason:function(){return l},isNextBrowserBailoutError:function(){return o}};for(var a in r)Object.defineProperty(s,a,{enumerable:!0,get:r[a]});let n=Symbol.for("next.browser-bailout-reason");function i(e){return{$$typeof:n,reason:e}}function l(e){let t=e?.cause;return t?.$$typeof===n?t.reason:void 0}function o(e){return void 0!==l(e)}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,53721,e=>{"use strict";var t=e.i(43476),r=e.i(64155),a=e.i(46670),s=e.i(63646);e.s(["x",0,function({readiness:e}){return e?.status!=="not-ready"?null:(0,t.jsx)("span",{title:(0,s.K)(e),"data-testid":"upgrade-readiness-badge",children:(0,t.jsxs)(a.t,{variant:"warning",children:[(0,t.jsx)(r.f,{className:"mr-1 inline h-3 w-3"}),"Upgrade blocked (",e.problems.length,")"]})})},"a",0,function({readiness:e}){return e?.status!=="not-ready"?null:(0,t.jsxs)("div",{className:"rounded border border-warning/40 bg-warning/10 px-3 py-2 text-[11px]","data-testid":"upgrade-readiness-panel",children:[(0,t.jsxs)("p",{className:"flex items-center gap-2 font-bold uppercase tracking-wider text-warning",children:[(0,t.jsx)(r.f,{className:"h-3.5 w-3.5"})," This node could not take an agent upgrade now"]}),(0,t.jsx)("ul",{className:"mt-2 space-y-2",children:e.problems.map(e=>(0,t.jsxs)("li",{children:[(0,t.jsxs)("p",{className:"font-medium text-text",children:[(0,t.jsx)("span",{className:"num",children:e.code}),": ",e.detail]}),(0,t.jsx)("p",{className:"text-text-muted",children:e.remedy})]},`${e.code}-${e.detail}`))})]})}])},57108,e=>{"use strict";var t=e.i(43476),r=e.i(46670);e.s(["f",0,function({configuration:e}){if(e?.memoryProvider!=="hivemem")return null;let a=e.hiveMemToken,s=a?.status??"unknown";return(0,t.jsxs)("span",{className:"flex flex-wrap items-center gap-1.5",children:[(0,t.jsxs)(r.t,{variant:"valid"===s?"success":"expiring"===s||"unreachable"===s||"unknown"===s?"warning":"danger",children:["Token ",s]}),a?.expiresAt&&(0,t.jsxs)("time",{dateTime:a.expiresAt,title:"HiveMem token expiration",children:["expires ",new Date(a.expiresAt).toLocaleString()]}),a?.checkedAt&&(0,t.jsxs)("time",{dateTime:a.checkedAt,className:"text-text-muted/70",title:"Last HiveMem authentication check",children:["checked ",new Date(a.checkedAt).toLocaleString()]})]})}])},46670,e=>{"use strict";var t=e.i(43476),r=e.i(78571);let a={default:"border-border text-text-muted",success:"border-success/40 text-success bg-success/5 shadow-[0_0_6px_rgba(0,255,65,0.15)]",warning:"border-warning/40 text-warning bg-warning/5 shadow-[0_0_6px_rgba(255,179,0,0.15)]",danger:"border-danger/40 text-danger bg-danger/5 shadow-[0_0_6px_rgba(255,23,68,0.15)]",info:"border-info/40 text-info bg-info/5 shadow-[0_0_6px_rgba(0,176,255,0.15)]"},s={default:"bg-text-muted",success:"bg-success",warning:"bg-warning",danger:"bg-danger",info:"bg-info"};e.s(["t",0,function({children:e,variant:n="default",className:i,dot:l=!1,pulse:o=!1}){return(0,t.jsxs)("span",{className:(0,r.f)("inline-flex items-center gap-1.5 rounded-chip border px-2 py-0.5 text-[10px] font-bold uppercase tracking-wider",a[n],i),children:[l&&(0,t.jsxs)("span",{"aria-hidden":"true",className:"relative inline-flex h-1.5 w-1.5",children:[o&&(0,t.jsx)("span",{className:(0,r.f)("absolute inset-0 rounded-full animate-halo",s[n])}),(0,t.jsx)("span",{className:(0,r.f)("relative inline-flex h-1.5 w-1.5 rounded-full",s[n])})]}),e]})},"k",0,function(e){switch(e.toUpperCase()){case"ONLINE":case"COMPLETED":case"ACTIVE":case"RUNNING":case"INSTALLED":case"HEALTHY":return"success";case"DEGRADED":case"PAUSED":case"QUEUED":case"PENDING":case"INSTALLING":return"warning";case"OFFLINE":case"FAILED":case"ERROR":case"TIMEOUT":case"CANCELLED":case"DECOMMISSIONED":case"CRITICAL":return"danger";case"PROVISIONING":case"UPDATING":return"info";default:return"default"}}])},93999,51196,55427,e=>{"use strict";var t=e.i(43476),r=e.i(56420);let a={name:"arrow-down-right",size:24,node:[["path",{d:"m7 7 10 10",key:"1fmybs"}],["path",{d:"M17 7v10H7",key:"6fjiku"}]]};a.node;let s=(0,r.f)(a);var n=e.i(75775),i=e.i(78571),l=e.i(3062),o=e.i(35084);let c={warning:"shadow-[0_0_6px_var(--color-warning)]",danger:"shadow-[0_0_8px_var(--color-danger)]",accent:"shadow-[0_0_6px_var(--color-accent)]",primary:"shadow-[0_0_6px_var(--color-primary)]"},d={xs:"h-1",sm:"h-1.5",md:"h-2"};function u({value:e,max:r=100,tone:a,thresholds:s=o.q,label:n,size:l="xs",showValue:x=!1,valueLabel:h,glow:m,className:f,testId:p}){let g="number"==typeof e&&Number.isFinite(e),v=g?Math.max(0,Math.min(100,e/(r||1)*100)):0,b=a??(g?(0,o.Z)(v,s):"muted"),j=m||!a&&g&&v>=s.warn,y=h??(g?`${v.toFixed(+(v<10&&v>0))}%`:"—");return(0,t.jsxs)("div",{className:(0,i.f)("flex min-w-0 items-center gap-2",f),"data-testid":p,children:[(0,t.jsx)("div",{role:"meter","aria-label":n,"aria-valuemin":0,"aria-valuemax":r,"aria-valuenow":g?e:void 0,"aria-valuetext":y,className:(0,i.f)("relative flex-1 overflow-hidden rounded-full bg-border/70",d[l]),children:(0,t.jsx)("div",{style:{"--meter":`${v}%`},className:(0,i.f)("h-full w-(--meter) rounded-full transition-[width] duration-700 ease-out-expo starting:w-0",o.H[b],j&&c[b])})}),x&&(0,t.jsx)("span",{className:(0,i.f)("num w-11 shrink-0 text-right text-[11px]",g?o.T[b]:"text-text-muted"),children:y})]})}e.s(["f",0,u],51196);var x=e.i(71645);function h({values:e,tone:r="primary",width:a=160,height:s=32,area:n=!0,max:l,percent:c=!1,threshold:d,live:u=!0,emptyLabel:m="not enough data",className:f,testId:p,label:g,stretch:v=!1}){let b=`spark${(0,x.useId)().replace(/:/g,"")}`;if(e.length<2)return(0,t.jsx)("div",{className:(0,i.f)("flex h-8 items-center text-xs italic text-text-muted",f),"data-testid":p,children:m});let j=o.v[r],y=l??(c?Math.max(100,...e):Math.max(...e,d??0)||1),N=s-4,w=a/(e.length-1),k=e=>2+N-Math.max(0,e)/y*N,_=e.map((e,t)=>[t*w,k(e)]),M=_.map(([e,t])=>`${e.toFixed(1)},${t.toFixed(1)}`).join(" "),S=_[_.length-1];return(0,t.jsxs)("svg",{width:v?"100%":a,height:s,viewBox:`0 0 ${a} ${s}`,preserveAspectRatio:v?"none":void 0,className:(0,i.f)("block overflow-visible",f),"data-testid":p,role:g?"img":void 0,"aria-label":g,"aria-hidden":!g||void 0,children:[n&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("defs",{children:(0,t.jsxs)("linearGradient",{id:b,x1:"0",x2:"0",y1:"0",y2:"1",children:[(0,t.jsx)("stop",{offset:"0%",stopColor:j,stopOpacity:.35}),(0,t.jsx)("stop",{offset:"100%",stopColor:j,stopOpacity:0})]})}),(0,t.jsx)("polygon",{points:`0,${s} ${M} ${a},${s}`,fill:`url(#${b})`})]}),void 0!==d&&(0,t.jsx)("line",{x1:0,x2:a,y1:k(d),y2:k(d),stroke:"var(--color-warning)",strokeOpacity:.5,strokeDasharray:"3 3",strokeWidth:1}),(0,t.jsx)("polyline",{fill:"none",stroke:j,strokeWidth:1.5,vectorEffect:"non-scaling-stroke",strokeLinejoin:"round",strokeLinecap:"round",points:M}),u&&!v&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("circle",{cx:S[0],cy:S[1],r:2.5,fill:j,className:"origin-center animate-halo [transform-box:fill-box]"}),(0,t.jsx)("circle",{cx:S[0],cy:S[1],r:2,fill:j})]})]})}e.s(["f",0,h],55427),e.s(["N",0,function({title:e,description:r,children:a,className:s,action:n,tone:i,corners:o=!1,...c}){return(0,t.jsx)(l.f,{...c,tone:i,corners:o,title:e,description:r,action:n,className:s,children:a})},"n",0,function({label:e,value:r,icon:a,trend:c,spark:d,meter:x,delta:m,tone:f="primary",className:p,testId:g}){let v=!m||m.value>=0===(m.positiveIsGood??!0);return(0,t.jsxs)(l.f,{tone:f,className:(0,i.f)("overflow-hidden",p),testId:g,children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("span",{className:"text-[10px] font-medium uppercase tracking-[0.15em] text-text-muted",children:e}),a&&(0,t.jsx)("span",{className:"text-primary/60",children:a})]}),(0,t.jsxs)("div",{className:"mt-2 flex items-end justify-between gap-2",children:[(0,t.jsx)("div",{className:(0,i.f)("num text-2xl font-bold","primary"===f?"text-primary neon-text":o.T[f]),children:r}),m&&0!==m.value&&(0,t.jsxs)("span",{className:(0,i.f)("num mb-1 inline-flex items-center gap-0.5 text-[11px]",v?"text-success":"text-danger"),children:[m.value>0?(0,t.jsx)(n.f,{className:"h-3 w-3"}):(0,t.jsx)(s,{className:"h-3 w-3"}),Math.abs(m.value).toFixed(+!Number.isInteger(m.value)),m.unit]})]}),c&&(0,t.jsx)("div",{className:(0,i.f)("mt-1 text-[11px]",c.positive?"text-success":"text-danger"),children:c.value}),void 0!==x&&(0,t.jsx)(u,{value:x,className:"mt-3",label:e}),d&&d.length>1&&(0,t.jsx)("div",{className:"-mx-5 -mb-5 mt-3 opacity-80",children:(0,t.jsx)(h,{values:d,tone:f,width:240,height:28,stretch:!0,live:!1})})]})}],93999)},54149,21176,e=>{"use strict";var t=e.i(43476),r=e.i(71645),a=e.i(78571),s=e.i(35084);e.s(["f",0,function({value:e,max:n=100,label:i,sublabel:l,tone:o,thresholds:c=s.q,higherIsBetter:d=!1,size:u=140,display:x,ticks:h=!0,hideLabel:m=!1,className:f,testId:p}){let g=(0,r.useId)().replace(/:/g,""),v="number"==typeof e&&Number.isFinite(e),b=v?Math.max(0,Math.min(100,e/(n||1)*100)):0,j=o??(v?d?(0,s.Z)(100-b,c):(0,s.Z)(b,c):"muted"),y=Math.max(4,Math.round(u/16)),N=50-y/2-4,w=2*Math.PI*N,k=.75*w,_=k*b/100,M=u>=140,S=x??(v?`${Math.round(b)}%`:"—"),C=h?Array.from({length:11},(e,r)=>{let a=(135+270*r/10)*Math.PI/180,s=50-(r%5==0?4:2.5);return(0,t.jsx)("line",{x1:50+48.5*Math.cos(a),y1:50+48.5*Math.sin(a),x2:50+s*Math.cos(a),y2:50+s*Math.sin(a),stroke:"var(--color-border-strong)",strokeWidth:.8},r)}):null;return(0,t.jsxs)("div",{role:"img","aria-label":`${i}: ${S}`,"data-testid":p,className:(0,a.f)("relative inline-flex flex-col items-center",f),style:{width:u},children:[(0,t.jsxs)("svg",{viewBox:"0 0 100 100",width:u,height:u,"aria-hidden":"true",className:"overflow-visible",children:[M&&(0,t.jsx)("defs",{children:(0,t.jsxs)("filter",{id:`g${g}`,x:"-30%",y:"-30%",width:"160%",height:"160%",children:[(0,t.jsx)("feGaussianBlur",{stdDeviation:"2.2",result:"blur"}),(0,t.jsxs)("feMerge",{children:[(0,t.jsx)("feMergeNode",{in:"blur"}),(0,t.jsx)("feMergeNode",{in:"SourceGraphic"})]})]})}),C,(0,t.jsx)("circle",{cx:50,cy:50,r:N,fill:"none",stroke:"var(--color-border)",strokeWidth:y,strokeLinecap:"round",strokeDasharray:`${k} ${w}`,transform:"rotate(135 50 50)"}),(0,t.jsx)("circle",{cx:50,cy:50,r:N,fill:"none",stroke:s.v[j],strokeWidth:y,strokeLinecap:"round",transform:"rotate(135 50 50)",filter:M?`url(#g${g})`:void 0,style:{"--dash":`${_} ${w}`},className:"[stroke-dasharray:var(--dash)] transition-[stroke-dasharray] duration-1000 ease-out-expo starting:[stroke-dasharray:0_1000]"})]}),(0,t.jsxs)("div",{className:"pointer-events-none absolute inset-0 flex flex-col items-center justify-center",style:{height:u},children:[(0,t.jsx)("span",{className:(0,a.f)("num font-bold leading-none",s.T[j],M&&s.z[j]),style:{fontSize:Math.max(12,.2*u)},children:S}),l&&(0,t.jsx)("span",{className:"num mt-1 text-text-muted",style:{fontSize:Math.max(9,.075*u)},children:l})]}),!m&&(0,t.jsx)("span",{className:"-mt-[10%] text-center text-[10px] font-medium uppercase tracking-[0.15em] text-text-muted",children:i})]})}],54149);var n=e.i(70703),i=e.i(65369);let l=(0,n.default)(()=>e.A(1321),{loadableGenerated:{modules:[69944]},ssr:!1,loading:()=>(0,t.jsx)(i.l,{className:"h-[180px] w-full"})});e.s(["f",0,l],21176)},3062,e=>{"use strict";var t=e.i(43476),r=e.i(78571),a=e.i(35084);let s={primary:"[--panel-corner-color:color-mix(in_srgb,var(--color-primary)_60%,transparent)]",accent:"[--panel-corner-color:color-mix(in_srgb,var(--color-accent)_70%,transparent)]",success:"[--panel-corner-color:color-mix(in_srgb,var(--color-success)_60%,transparent)]",warning:"[--panel-corner-color:color-mix(in_srgb,var(--color-warning)_70%,transparent)]",danger:"[--panel-corner-color:color-mix(in_srgb,var(--color-danger)_70%,transparent)]",info:"[--panel-corner-color:color-mix(in_srgb,var(--color-info)_60%,transparent)]",muted:"[--panel-corner-color:var(--color-border-strong)]"},n={primary:"[--glow-hover-color:var(--color-glow)]",accent:"[--glow-hover-color:var(--color-glow-accent)]",success:"[--glow-hover-color:var(--color-glow-success)]",warning:"[--glow-hover-color:var(--color-glow-warning)]",danger:"[--glow-hover-color:var(--color-glow-danger)]",info:"[--glow-hover-color:var(--color-glow)]",muted:"[--glow-hover-color:var(--color-glow)]"},i={primary:"hover:border-primary/30",accent:"hover:border-accent/40",success:"hover:border-success/30",warning:"hover:border-warning/40",danger:"hover:border-danger/40",info:"hover:border-info/30",muted:"hover:border-border-strong"},l={none:"",sm:"p-3",md:"p-5",lg:"p-6"};e.s(["f",0,function({tone:e="primary",corners:o=!0,interactive:c=!0,hero:d=!1,title:u,description:x,icon:h,action:m,as:f="div",padding:p="md",testId:g,className:v,children:b,...j}){return(0,t.jsxs)(f,{...j,"data-testid":g??j["data-testid"],className:(0,r.f)("relative rounded-panel border border-border bg-surface transition-colors duration-300",l[p],o&&"panel-corners",o&&s[e],c&&"glow-hover",c&&n[e],c&&i[e],d&&"grid-bg overflow-hidden bg-surface/80",v),children:[(u||m||h)&&(0,t.jsxs)("div",{className:"mb-4 flex items-start justify-between gap-3",children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-start gap-2",children:[h&&(0,t.jsx)("span",{className:(0,r.f)("mt-0.5 shrink-0",a.T[e]),children:h}),(0,t.jsxs)("div",{className:"min-w-0",children:[u&&(0,t.jsx)("h3",{className:"text-xs font-bold uppercase tracking-wider",children:u}),x&&(0,t.jsx)("p",{className:"mt-0.5 text-[11px] text-text-muted",children:x})]})]}),m]}),b]})}])},65369,e=>{"use strict";var t=e.i(43476),r=e.i(78571);function a({className:e}){return(0,t.jsx)("div",{"aria-hidden":"true",className:(0,r.f)("skeleton h-3 w-full",e)})}e.s(["l",0,a,"g",0,function({count:e=4,className:s}){return(0,t.jsx)("div",{role:"status","aria-label":"Loading",className:(0,r.f)("grid gap-4 sm:grid-cols-2 lg:grid-cols-4",s),children:Array.from({length:e},(e,r)=>(0,t.jsxs)("div",{className:"panel-corners rounded-panel border border-border bg-surface p-5",children:[(0,t.jsx)(a,{className:"h-2 w-1/2"}),(0,t.jsx)(a,{className:"mt-4 h-7 w-2/3"}),(0,t.jsx)(a,{className:"mt-3 h-1 w-full opacity-60"})]},r))})},"F",0,function({rows:e=5,cols:s=4,className:n}){return(0,t.jsxs)("div",{role:"status","aria-label":"Loading",className:(0,r.f)("overflow-hidden rounded-panel border border-border",n),children:[(0,t.jsx)("div",{className:"flex gap-4 border-b border-border bg-surface px-4 py-3",children:Array.from({length:s},(e,r)=>(0,t.jsx)(a,{className:"h-2 flex-1 opacity-60"},r))}),Array.from({length:e},(e,n)=>(0,t.jsx)("div",{className:"flex gap-4 border-b border-border/50 px-4 py-3 last:border-0",children:Array.from({length:s},(e,s)=>(0,t.jsx)(a,{className:(0,r.f)("h-3 flex-1",(n+s)%3==0&&"max-w-[60%]")},s))},n))]})},"Q",0,function({lines:e=3,className:s}){let n=["w-full","w-11/12","w-4/5","w-2/3","w-3/4"];return(0,t.jsx)("div",{role:"status","aria-label":"Loading",className:(0,r.f)("space-y-2",s),children:Array.from({length:e},(e,r)=>(0,t.jsx)(a,{className:n[r%n.length]},r))})}])},75723,e=>{"use strict";var t=e.i(43476),r=e.i(78571),a=e.i(46670);let s={success:"bg-success shadow-[0_0_6px_var(--color-success)]",warning:"bg-warning shadow-[0_0_6px_var(--color-warning)]",danger:"bg-danger shadow-[0_0_6px_var(--color-danger)]",info:"bg-info shadow-[0_0_6px_var(--color-info)]",default:"bg-text-muted"},n={success:"bg-success",warning:"bg-warning",danger:"bg-danger",info:"bg-info",default:"bg-text-muted"},i=new Set(["ONLINE","RUNNING","ACTIVE","HEALTHY","CRITICAL","UPDATING","PROVISIONING"]);e.s(["f",0,function({status:e,pulse:l,size:o="sm",className:c,label:d}){let u=(0,a.k)(e),x=l??i.has(e.toUpperCase()),h="xs"===o?"h-1.5 w-1.5":"h-2 w-2";return(0,t.jsxs)("span",{className:(0,r.f)("relative inline-flex shrink-0",h,c),role:d?"img":void 0,"aria-label":d,"aria-hidden":!d||void 0,children:[x&&(0,t.jsx)("span",{className:(0,r.f)("absolute inset-0 rounded-full animate-halo",n[u])}),(0,t.jsx)("span",{className:(0,r.f)("relative inline-flex rounded-full",h,s[u])})]})}])},71417,e=>{"use strict";e.s(["L",0,function(e){if(0===e)return"0 B";let t=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,t)).toFixed(1))} ${["B","KB","MB","GB","TB"][t]}`},"C",0,function(e){return e?("string"==typeof e?new Date(e):e).toLocaleString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}):"—"}])},79432,e=>{"use strict";var t=e.i(56420);let r={name:"activity",size:24,node:[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]};r.node;let a=(0,t.f)(r);e.s(["f",0,a],79432)},9347,e=>{"use strict";var t=e.i(56420);let r={name:"arrow-left",size:24,node:[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]};r.node;let a=(0,t.f)(r);e.s(["f",0,a],9347)},75775,e=>{"use strict";var t=e.i(56420);let r={name:"arrow-up-right",size:24,node:[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]};r.node;let a=(0,t.f)(r);e.s(["f",0,a],75775)},82022,e=>{"use strict";var t=e.i(56420);let r={name:"external-link",size:24,node:[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]};r.node;let a=(0,t.f)(r);e.s(["f",0,a],82022)},57665,e=>{"use strict";var t=e.i(56420);let r={name:"power",size:24,node:[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]};r.node;let a=(0,t.f)(r);e.s(["f",0,a],57665)},86207,14098,e=>{"use strict";var t=e.i(56420);let r={name:"refresh-ccw-dot",size:24,node:[["path",{d:"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"14sxne"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16",key:"1hlbsb"}],["path",{d:"M16 16h5v5",key:"ccwih5"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]]};r.node;let a=(0,t.f)(r);e.s(["f",0,a],86207);var s=e.i(43476),n=e.i(71645),i=e.i(68759),l=e.i(32568),o=e.i(82983),c=e.i(41220),d=e.i(32781);e.s(["E",0,function({open:e,node:t,onClose:r,onSaved:a}){let[u,x]=(0,n.useState)([]),[h,m]=(0,n.useState)(""),[f,p]=(0,n.useState)(!0),[g,v]=(0,n.useState)(!1),[b,j]=(0,n.useState)(""),[y,N]=(0,n.useState)(!1);(0,n.useEffect)(()=>{e&&(j(""),m(t?.role?.id??""),p(!0),N(!0),(async()=>{try{let e=await o.f.roles.list();x(e.data??[])}catch{j("Failed to load roles")}finally{N(!1)}})())},[e,t?.role?.id]);let w=async()=>{if(t){v(!0),j("");try{let e=t.role?.id;e&&e!==h&&await o.f.roles.unassign(e,{nodeIds:[t.id]}),h&&await o.f.roles.assign(h,{nodeIds:[t.id],defer:!f});let s=h?u.find(e=>e.id===h)??null:null;a(s),r()}catch(e){j(e instanceof Error?e.message:"Failed to assign role")}finally{v(!1)}}},k=async()=>{if(t?.role){v(!0),j("");try{await o.f.roles.unassign(t.role.id,{nodeIds:[t.id]}),a(null),r()}catch(e){j(e instanceof Error?e.message:"Failed to unassign role")}finally{v(!1)}}},_=()=>{j(""),v(!1),r()};return(0,s.jsx)(l.n,{open:e,onClose:_,title:t?.role?"Change Role":"Assign Role",description:t?`Node: ${t.name}`:"",icon:(0,s.jsx)(c.f,{className:"h-5 w-5 text-primary"}),children:(0,s.jsxs)("div",{className:"space-y-4",children:[y?(0,s.jsxs)("div",{className:"flex items-center gap-2 py-4 text-xs text-text-muted",children:[(0,s.jsx)(d.f,{className:"h-4 w-4 animate-spin"}),"Loading roles…"]}):0===u.length?(0,s.jsx)("p",{className:"text-xs text-text-muted py-4",children:"No roles found. Create a role first on the Roles page."}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(l.G,{label:"Role",children:(0,s.jsxs)("select",{value:h,onChange:e=>m(e.target.value),className:l.N,children:[(0,s.jsx)("option",{value:"",children:"— No role —"}),u.map(e=>(0,s.jsx)("option",{value:e.id,children:e.name},e.id))]})}),h&&(0,s.jsxs)("label",{className:"flex items-center gap-2 text-xs cursor-pointer",children:[(0,s.jsx)("input",{type:"checkbox",checked:f,onChange:e=>p(e.target.checked),className:"rounded border-border"}),"Apply role immediately"]})]}),b&&(0,s.jsx)("div",{className:"rounded border border-danger/30 bg-danger/10 px-3 py-2 text-xs text-danger",children:b}),(0,s.jsxs)("div",{className:"flex justify-between pt-2",children:[(0,s.jsx)("div",{children:t?.role&&(0,s.jsx)(i.K,{variant:"secondary",size:"sm",onClick:()=>void k(),disabled:g,children:"Unassign Role"})}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(i.K,{variant:"secondary",size:"sm",onClick:_,children:"Cancel"}),(0,s.jsx)(i.K,{size:"sm",onClick:()=>void w(),disabled:g||!h||0===u.length,icon:g?(0,s.jsx)(d.f,{className:"h-3.5 w-3.5 animate-spin"}):void 0,children:g?"Saving…":t?.role?"Change Role":"Assign Role"})]})]})]})})},"F",0,function({open:e,node:t,onClose:r,onSaved:a}){let[u,x]=(0,n.useState)(""),[h,m]=(0,n.useState)(""),[f,p]=(0,n.useState)(""),[g,v]=(0,n.useState)(!1),[b,j]=(0,n.useState)("");(0,n.useEffect)(()=>{if(t){x(t.name);try{let e=JSON.parse(t.tags);m(e.join(", "))}catch{m("")}p(t.status),j("")}},[t]);let y=async()=>{if(t&&u.trim()){v(!0),j("");try{let e=h.split(",").map(e=>e.trim()).filter(Boolean);await o.f.nodes.update(t.id,{name:u.trim(),tags:e,status:f.toUpperCase()}),a(),r()}catch(e){j(e instanceof Error?e.message:"Failed to update node")}finally{v(!1)}}},N=()=>{j(""),v(!1),r()};return(0,s.jsx)(l.n,{open:e,onClose:N,title:"Edit Node",description:t?`${t.hostname}`:"",icon:(0,s.jsx)(c.f,{className:"h-5 w-5 text-primary"}),children:(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsx)(l.G,{label:"Name",required:!0,children:(0,s.jsx)("input",{type:"text",value:u,onChange:e=>x(e.target.value),className:l.W})}),(0,s.jsx)(l.G,{label:"Status",children:(0,s.jsxs)("select",{value:f,onChange:e=>p(e.target.value),className:l.N,children:[(0,s.jsx)("option",{value:"ONLINE",children:"ONLINE"}),(0,s.jsx)("option",{value:"OFFLINE",children:"OFFLINE"}),(0,s.jsx)("option",{value:"DEGRADED",children:"DEGRADED"}),(0,s.jsx)("option",{value:"PROVISIONING",children:"PROVISIONING"}),(0,s.jsx)("option",{value:"MAINTENANCE",children:"MAINTENANCE"})]})}),(0,s.jsxs)(l.G,{label:"Tags",children:[(0,s.jsx)("input",{type:"text",value:h,onChange:e=>m(e.target.value),placeholder:"web, production, us-east",className:l.W}),(0,s.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:"Comma-separated list of tags"})]}),b&&(0,s.jsx)("div",{className:"rounded border border-danger/30 bg-danger/10 px-3 py-2 text-xs text-danger",children:b}),(0,s.jsxs)("div",{className:"flex justify-end gap-2 pt-2",children:[(0,s.jsx)(i.K,{variant:"secondary",size:"sm",onClick:N,children:"Cancel"}),(0,s.jsx)(i.K,{size:"sm",onClick:()=>void y(),disabled:g||!u.trim(),icon:g?(0,s.jsx)(d.f,{className:"h-3.5 w-3.5 animate-spin"}):void 0,children:g?"Saving…":"Save Changes"})]})]})})},"M",0,function({open:e,onClose:t,onRegistered:r}){let[a,u]=(0,n.useState)(""),[x,h]=(0,n.useState)(""),[m,f]=(0,n.useState)("4100"),[p,g]=(0,n.useState)("linux"),[v,b]=(0,n.useState)("x86_64"),[j,y]=(0,n.useState)(""),[N,w]=(0,n.useState)(!1),[k,_]=(0,n.useState)(""),M=async()=>{if(a.trim()&&x.trim()){w(!0),_("");try{let e=j.split(",").map(e=>e.trim()).filter(Boolean);await o.f.nodes.register({name:a.trim(),hostname:x.trim(),ipAddress:x.trim(),port:Number(m)||4100,os:p,arch:v,tags:e,agentVersion:"3.1.0"}),r(),S()}catch(e){_(e instanceof Error?e.message:"Failed to register node")}finally{w(!1)}}},S=()=>{u(""),h(""),f("4100"),g("linux"),b("x86_64"),y(""),_(""),w(!1),t()};return(0,s.jsx)(l.n,{open:e,onClose:S,title:"Register Node",description:"Manually register a node already running the agent",icon:(0,s.jsx)(c.f,{className:"h-5 w-5 text-primary"}),children:(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsx)(l.G,{label:"Node Name",required:!0,children:(0,s.jsx)("input",{type:"text",value:a,onChange:e=>u(e.target.value),placeholder:"web-server-01",className:l.W,autoFocus:!0})}),(0,s.jsx)(l.G,{label:"FQDN / Hostname",required:!0,children:(0,s.jsx)("input",{type:"text",value:x,onChange:e=>h(e.target.value),placeholder:"node-1.example.com",className:l.W})}),(0,s.jsxs)("div",{className:"grid grid-cols-3 gap-3",children:[(0,s.jsx)(l.G,{label:"Port",children:(0,s.jsx)("input",{type:"number",value:m,onChange:e=>f(e.target.value),className:l.W})}),(0,s.jsx)(l.G,{label:"OS",children:(0,s.jsxs)("select",{value:p,onChange:e=>g(e.target.value),className:l.N,children:[(0,s.jsx)("option",{value:"linux",children:"Linux"}),(0,s.jsx)("option",{value:"darwin",children:"macOS"}),(0,s.jsx)("option",{value:"windows",children:"Windows"})]})}),(0,s.jsx)(l.G,{label:"Architecture",children:(0,s.jsxs)("select",{value:v,onChange:e=>b(e.target.value),className:l.N,children:[(0,s.jsx)("option",{value:"x86_64",children:"x86_64"}),(0,s.jsx)("option",{value:"aarch64",children:"aarch64"}),(0,s.jsx)("option",{value:"arm",children:"arm"})]})})]}),(0,s.jsxs)(l.G,{label:"Tags",children:[(0,s.jsx)("input",{type:"text",value:j,onChange:e=>y(e.target.value),placeholder:"web, production, us-east",className:l.W}),(0,s.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:"Comma-separated"})]}),k&&(0,s.jsx)("div",{className:"rounded border border-danger/30 bg-danger/10 px-3 py-2 text-xs text-danger",children:k}),(0,s.jsxs)("div",{className:"flex justify-end gap-2 pt-2",children:[(0,s.jsx)(i.K,{variant:"secondary",size:"sm",onClick:S,children:"Cancel"}),(0,s.jsx)(i.K,{size:"sm",onClick:()=>void M(),disabled:N||!a.trim()||!x.trim(),icon:N?(0,s.jsx)(d.f,{className:"h-3.5 w-3.5 animate-spin"}):void 0,children:N?"Registering…":"Register Node"})]})]})})}],14098)},25398,e=>{"use strict";var t=e.i(56420);let r={name:"rotate-cw",size:24,node:[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]};r.node;let a=(0,t.f)(r);e.s(["f",0,a],25398)},90317,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={bindSnapshot:function(){return d},createAsyncLocalStorage:function(){return o},createSnapshot:function(){return u},getOrCreateGlobalAsyncLocalStorage:function(){return c}};for(var s in a)Object.defineProperty(r,s,{enumerable:!0,get:a[s]});let n=Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available");class i{disable(){throw n}getStore(){}run(){throw n}exit(){throw n}enterWith(){throw n}static bind(e){return e}}let l="u">typeof globalThis&&globalThis.AsyncLocalStorage;function o(){return l?new l:new i}function c(e){let t=Symbol.for(`@next/${e}@16.4.5`),r=globalThis;return r[t]??=o()}function d(e){return l?l.bind(e):i.bind(e)}function u(){return l?l.snapshot():function(e,...t){return e(...t)}}},42344,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"workAsyncStorageInstance",{enumerable:!0,get:function(){return a}});let a=(0,e.r(90317).getOrCreateGlobalAsyncLocalStorage)("work-async-storage")},63599,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"workAsyncStorage",{enumerable:!0,get:function(){return a.workAsyncStorageInstance}});let a=e.r(42344)},70703,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return s}});let a=e.r(55682)._(e.r(69093));function s(e,t){let r={};"function"==typeof e&&(r.loader=e);let s={...r,...t};return(0,a.default)({...s,modules:s.loadableGenerated?.modules})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},9885,(e,t,r)=>{"use strict";function a(e){return e.split("/").map(e=>encodeURIComponent(e)).join("/")}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"encodeURIPath",{enumerable:!0,get:function(){return a}})},67585,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"BailoutToCSRForNextDynamic",{enumerable:!0,get:function(){return i}});let a=e.r(71645),s=e.r(74080);e.r(32061);let n=e.r(49354).createReactBrowserBailoutReason.bind(null,"next/dynamic");function i({children:e}){return(0,a.use)((0,s.browser)(n)),e}},69093,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return c}});let a=e.r(43476),s=e.r(71645),n=e.r(67585),i=e.r(52157);function l(e){return{default:e&&"default"in e?e.default:e}}let o={loader:()=>Promise.resolve(l(()=>null)),loading:null,ssr:!0},c=function(e){let t={...o,...e},r=(0,s.lazy)(()=>t.loader().then(l)),c=t.loading;function d(e){let l=c?(0,a.jsx)(c,{isLoading:!0,pastDelay:!0,error:null}):null,o=!t.ssr||!!t.loading,d=o?s.Suspense:s.Fragment,u=t.ssr?(0,a.jsxs)(a.Fragment,{children:["u"<typeof window?(0,a.jsx)(i.PreloadChunks,{moduleIds:t.modules}):null,(0,a.jsx)(r,{...e})]}):(0,a.jsx)(n.BailoutToCSRForNextDynamic,{children:(0,a.jsx)(r,{...e})});return(0,a.jsx)(d,{...o?{fallback:l}:{},children:u})}return d.displayName="LoadableComponent",d}},52157,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"PreloadChunks",{enumerable:!0,get:function(){return o}});let a=e.r(43476),s=e.r(74080),n=e.r(63599),i=e.r(9885),l=e.r(43369);function o({moduleIds:e}){if("u">typeof window)return null;let t=n.workAsyncStorage.getStore();if(void 0===t)return null;let r=[];if(t.reactLoadableManifest&&e){let a=t.reactLoadableManifest;for(let t of e){if(!a[t])continue;let e=a[t].files;r.push(...e)}}if(0===r.length)return null;let c=(0,l.getAssetTokenQuery)();return(0,a.jsx)(a.Fragment,{children:r.map(e=>{let r=`${t.assetPrefix}/_next/${(0,i.encodeURIPath)(e)}${c}`;return e.endsWith(".css")?(0,a.jsx)("link",{precedence:"dynamic",href:r,rel:"stylesheet",as:"style",nonce:t.nonce},e):((0,s.preload)(r,{as:"script",fetchPriority:"low",nonce:t.nonce}),null)})})}},49354,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={createReactBrowserBailoutReason:function(){return i},getReactBrowserBailoutReason:function(){return l},isNextBrowserBailoutError:function(){return o}};for(var s in a)Object.defineProperty(r,s,{enumerable:!0,get:a[s]});let n=Symbol.for("next.browser-bailout-reason");function i(e){return{$$typeof:n,reason:e}}function l(e){let t=e?.cause;return t?.$$typeof===n?t.reason:void 0}function o(e){return void 0!==l(e)}}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,53721,e=>{"use strict";var t=e.i(43476),r=e.i(64155),a=e.i(46670),s=e.i(63646);e.s(["x",0,function({readiness:e}){return e?.status!=="not-ready"?null:(0,t.jsx)("span",{title:(0,s.K)(e),"data-testid":"upgrade-readiness-badge",children:(0,t.jsxs)(a.t,{variant:"warning",children:[(0,t.jsx)(r.f,{className:"mr-1 inline h-3 w-3"}),"Upgrade blocked (",e.problems.length,")"]})})},"a",0,function({readiness:e}){return e?.status!=="not-ready"?null:(0,t.jsxs)("div",{className:"rounded border border-warning/40 bg-warning/10 px-3 py-2 text-[11px]","data-testid":"upgrade-readiness-panel",children:[(0,t.jsxs)("p",{className:"flex items-center gap-2 font-bold uppercase tracking-wider text-warning",children:[(0,t.jsx)(r.f,{className:"h-3.5 w-3.5"})," This node could not take an agent upgrade now"]}),(0,t.jsx)("ul",{className:"mt-2 space-y-2",children:e.problems.map(e=>(0,t.jsxs)("li",{children:[(0,t.jsxs)("p",{className:"font-medium text-text",children:[(0,t.jsx)("span",{className:"num",children:e.code}),": ",e.detail]}),(0,t.jsx)("p",{className:"text-text-muted",children:e.remedy})]},`${e.code}-${e.detail}`))})]})}])},57108,e=>{"use strict";var t=e.i(43476),r=e.i(46670);e.s(["f",0,function({configuration:e}){if(e?.memoryProvider!=="hivemem")return null;let a=e.hiveMemToken,s=a?.status??"unknown";return(0,t.jsxs)("span",{className:"flex flex-wrap items-center gap-1.5",children:[(0,t.jsxs)(r.t,{variant:"valid"===s?"success":"expiring"===s||"unreachable"===s||"unknown"===s?"warning":"danger",children:["Token ",s]}),a?.expiresAt&&(0,t.jsxs)("time",{dateTime:a.expiresAt,title:"HiveMem token expiration",children:["expires ",new Date(a.expiresAt).toLocaleString()]}),a?.checkedAt&&(0,t.jsxs)("time",{dateTime:a.checkedAt,className:"text-text-muted/70",title:"Last HiveMem authentication check",children:["checked ",new Date(a.checkedAt).toLocaleString()]})]})}])},46670,e=>{"use strict";var t=e.i(43476),r=e.i(78571);let a={default:"border-border text-text-muted",success:"border-success/40 text-success bg-success/5 shadow-[0_0_6px_rgba(0,255,65,0.15)]",warning:"border-warning/40 text-warning bg-warning/5 shadow-[0_0_6px_rgba(255,179,0,0.15)]",danger:"border-danger/40 text-danger bg-danger/5 shadow-[0_0_6px_rgba(255,23,68,0.15)]",info:"border-info/40 text-info bg-info/5 shadow-[0_0_6px_rgba(0,176,255,0.15)]"},s={default:"bg-text-muted",success:"bg-success",warning:"bg-warning",danger:"bg-danger",info:"bg-info"};e.s(["t",0,function({children:e,variant:n="default",className:i,dot:l=!1,pulse:o=!1}){return(0,t.jsxs)("span",{className:(0,r.f)("inline-flex items-center gap-1.5 rounded-chip border px-2 py-0.5 text-[10px] font-bold uppercase tracking-wider",a[n],i),children:[l&&(0,t.jsxs)("span",{"aria-hidden":"true",className:"relative inline-flex h-1.5 w-1.5",children:[o&&(0,t.jsx)("span",{className:(0,r.f)("absolute inset-0 rounded-full animate-halo",s[n])}),(0,t.jsx)("span",{className:(0,r.f)("relative inline-flex h-1.5 w-1.5 rounded-full",s[n])})]}),e]})},"k",0,function(e){switch(e.toUpperCase()){case"ONLINE":case"COMPLETED":case"ACTIVE":case"RUNNING":case"INSTALLED":case"HEALTHY":return"success";case"DEGRADED":case"PAUSED":case"QUEUED":case"PENDING":case"INSTALLING":return"warning";case"OFFLINE":case"FAILED":case"ERROR":case"TIMEOUT":case"CANCELLED":case"DECOMMISSIONED":case"CRITICAL":return"danger";case"PROVISIONING":case"UPDATING":return"info";default:return"default"}}])},93999,51196,55427,e=>{"use strict";var t=e.i(43476),r=e.i(56420);let a={name:"arrow-down-right",size:24,node:[["path",{d:"m7 7 10 10",key:"1fmybs"}],["path",{d:"M17 7v10H7",key:"6fjiku"}]]};a.node;let s=(0,r.f)(a);var n=e.i(75775),i=e.i(78571),l=e.i(3062),o=e.i(35084);let c={warning:"shadow-[0_0_6px_var(--color-warning)]",danger:"shadow-[0_0_8px_var(--color-danger)]",accent:"shadow-[0_0_6px_var(--color-accent)]",primary:"shadow-[0_0_6px_var(--color-primary)]"},d={xs:"h-1",sm:"h-1.5",md:"h-2"};function u({value:e,max:r=100,tone:a,thresholds:s=o.q,label:n,size:l="xs",showValue:x=!1,valueLabel:h,glow:m,className:f,testId:p}){let g="number"==typeof e&&Number.isFinite(e),v=g?Math.max(0,Math.min(100,e/(r||1)*100)):0,b=a??(g?(0,o.Z)(v,s):"muted"),j=m||!a&&g&&v>=s.warn,y=h??(g?`${v.toFixed(+(v<10&&v>0))}%`:"—");return(0,t.jsxs)("div",{className:(0,i.f)("flex min-w-0 items-center gap-2",f),"data-testid":p,children:[(0,t.jsx)("div",{role:"meter","aria-label":n,"aria-valuemin":0,"aria-valuemax":r,"aria-valuenow":g?e:void 0,"aria-valuetext":y,className:(0,i.f)("relative flex-1 overflow-hidden rounded-full bg-border/70",d[l]),children:(0,t.jsx)("div",{style:{"--meter":`${v}%`},className:(0,i.f)("h-full w-(--meter) rounded-full transition-[width] duration-700 ease-out-expo starting:w-0",o.H[b],j&&c[b])})}),x&&(0,t.jsx)("span",{className:(0,i.f)("num w-11 shrink-0 text-right text-[11px]",g?o.T[b]:"text-text-muted"),children:y})]})}e.s(["f",0,u],51196);var x=e.i(71645);function h({values:e,tone:r="primary",width:a=160,height:s=32,area:n=!0,max:l,percent:c=!1,threshold:d,live:u=!0,emptyLabel:m="not enough data",className:f,testId:p,label:g,stretch:v=!1}){let b=`spark${(0,x.useId)().replace(/:/g,"")}`;if(e.length<2)return(0,t.jsx)("div",{className:(0,i.f)("flex h-8 items-center text-xs italic text-text-muted",f),"data-testid":p,children:m});let j=o.v[r],y=l??(c?Math.max(100,...e):Math.max(...e,d??0)||1),N=s-4,w=a/(e.length-1),k=e=>2+N-Math.max(0,e)/y*N,_=e.map((e,t)=>[t*w,k(e)]),M=_.map(([e,t])=>`${e.toFixed(1)},${t.toFixed(1)}`).join(" "),S=_[_.length-1];return(0,t.jsxs)("svg",{width:v?"100%":a,height:s,viewBox:`0 0 ${a} ${s}`,preserveAspectRatio:v?"none":void 0,className:(0,i.f)("block overflow-visible",f),"data-testid":p,role:g?"img":void 0,"aria-label":g,"aria-hidden":!g||void 0,children:[n&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("defs",{children:(0,t.jsxs)("linearGradient",{id:b,x1:"0",x2:"0",y1:"0",y2:"1",children:[(0,t.jsx)("stop",{offset:"0%",stopColor:j,stopOpacity:.35}),(0,t.jsx)("stop",{offset:"100%",stopColor:j,stopOpacity:0})]})}),(0,t.jsx)("polygon",{points:`0,${s} ${M} ${a},${s}`,fill:`url(#${b})`})]}),void 0!==d&&(0,t.jsx)("line",{x1:0,x2:a,y1:k(d),y2:k(d),stroke:"var(--color-warning)",strokeOpacity:.5,strokeDasharray:"3 3",strokeWidth:1}),(0,t.jsx)("polyline",{fill:"none",stroke:j,strokeWidth:1.5,vectorEffect:"non-scaling-stroke",strokeLinejoin:"round",strokeLinecap:"round",points:M}),u&&!v&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("circle",{cx:S[0],cy:S[1],r:2.5,fill:j,className:"origin-center animate-halo [transform-box:fill-box]"}),(0,t.jsx)("circle",{cx:S[0],cy:S[1],r:2,fill:j})]})]})}e.s(["f",0,h],55427),e.s(["N",0,function({title:e,description:r,children:a,className:s,action:n,tone:i,corners:o=!1,...c}){return(0,t.jsx)(l.f,{...c,tone:i,corners:o,title:e,description:r,action:n,className:s,children:a})},"n",0,function({label:e,value:r,icon:a,trend:c,spark:d,meter:x,delta:m,tone:f="primary",className:p,testId:g}){let v=!m||m.value>=0===(m.positiveIsGood??!0);return(0,t.jsxs)(l.f,{tone:f,className:(0,i.f)("overflow-hidden",p),testId:g,children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("span",{className:"text-[10px] font-medium uppercase tracking-[0.15em] text-text-muted",children:e}),a&&(0,t.jsx)("span",{className:"text-primary/60",children:a})]}),(0,t.jsxs)("div",{className:"mt-2 flex items-end justify-between gap-2",children:[(0,t.jsx)("div",{className:(0,i.f)("num text-2xl font-bold","primary"===f?"text-primary neon-text":o.T[f]),children:r}),m&&0!==m.value&&(0,t.jsxs)("span",{className:(0,i.f)("num mb-1 inline-flex items-center gap-0.5 text-[11px]",v?"text-success":"text-danger"),children:[m.value>0?(0,t.jsx)(n.f,{className:"h-3 w-3"}):(0,t.jsx)(s,{className:"h-3 w-3"}),Math.abs(m.value).toFixed(+!Number.isInteger(m.value)),m.unit]})]}),c&&(0,t.jsx)("div",{className:(0,i.f)("mt-1 text-[11px]",c.positive?"text-success":"text-danger"),children:c.value}),void 0!==x&&(0,t.jsx)(u,{value:x,className:"mt-3",label:e}),d&&d.length>1&&(0,t.jsx)("div",{className:"-mx-5 -mb-5 mt-3 opacity-80",children:(0,t.jsx)(h,{values:d,tone:f,width:240,height:28,stretch:!0,live:!1})})]})}],93999)},54149,21176,e=>{"use strict";var t=e.i(43476),r=e.i(71645),a=e.i(78571),s=e.i(35084);e.s(["f",0,function({value:e,max:n=100,label:i,sublabel:l,tone:o,thresholds:c=s.q,higherIsBetter:d=!1,size:u=140,display:x,ticks:h=!0,hideLabel:m=!1,className:f,testId:p}){let g=(0,r.useId)().replace(/:/g,""),v="number"==typeof e&&Number.isFinite(e),b=v?Math.max(0,Math.min(100,e/(n||1)*100)):0,j=o??(v?d?(0,s.Z)(100-b,c):(0,s.Z)(b,c):"muted"),y=Math.max(4,Math.round(u/16)),N=50-y/2-4,w=2*Math.PI*N,k=.75*w,_=k*b/100,M=u>=140,S=x??(v?`${Math.round(b)}%`:"—"),C=h?Array.from({length:11},(e,r)=>{let a=(135+270*r/10)*Math.PI/180,s=50-(r%5==0?4:2.5);return(0,t.jsx)("line",{x1:50+48.5*Math.cos(a),y1:50+48.5*Math.sin(a),x2:50+s*Math.cos(a),y2:50+s*Math.sin(a),stroke:"var(--color-border-strong)",strokeWidth:.8},r)}):null;return(0,t.jsxs)("div",{role:"img","aria-label":`${i}: ${S}`,"data-testid":p,className:(0,a.f)("relative inline-flex flex-col items-center",f),style:{width:u},children:[(0,t.jsxs)("svg",{viewBox:"0 0 100 100",width:u,height:u,"aria-hidden":"true",className:"overflow-visible",children:[M&&(0,t.jsx)("defs",{children:(0,t.jsxs)("filter",{id:`g${g}`,x:"-30%",y:"-30%",width:"160%",height:"160%",children:[(0,t.jsx)("feGaussianBlur",{stdDeviation:"2.2",result:"blur"}),(0,t.jsxs)("feMerge",{children:[(0,t.jsx)("feMergeNode",{in:"blur"}),(0,t.jsx)("feMergeNode",{in:"SourceGraphic"})]})]})}),C,(0,t.jsx)("circle",{cx:50,cy:50,r:N,fill:"none",stroke:"var(--color-border)",strokeWidth:y,strokeLinecap:"round",strokeDasharray:`${k} ${w}`,transform:"rotate(135 50 50)"}),(0,t.jsx)("circle",{cx:50,cy:50,r:N,fill:"none",stroke:s.v[j],strokeWidth:y,strokeLinecap:"round",transform:"rotate(135 50 50)",filter:M?`url(#g${g})`:void 0,style:{"--dash":`${_} ${w}`},className:"[stroke-dasharray:var(--dash)] transition-[stroke-dasharray] duration-1000 ease-out-expo starting:[stroke-dasharray:0_1000]"})]}),(0,t.jsxs)("div",{className:"pointer-events-none absolute inset-0 flex flex-col items-center justify-center",style:{height:u},children:[(0,t.jsx)("span",{className:(0,a.f)("num font-bold leading-none",s.T[j],M&&s.z[j]),style:{fontSize:Math.max(12,.2*u)},children:S}),l&&(0,t.jsx)("span",{className:"num mt-1 text-text-muted",style:{fontSize:Math.max(9,.075*u)},children:l})]}),!m&&(0,t.jsx)("span",{className:"-mt-[10%] text-center text-[10px] font-medium uppercase tracking-[0.15em] text-text-muted",children:i})]})}],54149);var n=e.i(70703),i=e.i(65369);let l=(0,n.default)(()=>e.A(1321),{loadableGenerated:{modules:[69944]},ssr:!1,loading:()=>(0,t.jsx)(i.l,{className:"h-[180px] w-full"})});e.s(["f",0,l],21176)},3062,e=>{"use strict";var t=e.i(43476),r=e.i(78571),a=e.i(35084);let s={primary:"[--panel-corner-color:color-mix(in_srgb,var(--color-primary)_60%,transparent)]",accent:"[--panel-corner-color:color-mix(in_srgb,var(--color-accent)_70%,transparent)]",success:"[--panel-corner-color:color-mix(in_srgb,var(--color-success)_60%,transparent)]",warning:"[--panel-corner-color:color-mix(in_srgb,var(--color-warning)_70%,transparent)]",danger:"[--panel-corner-color:color-mix(in_srgb,var(--color-danger)_70%,transparent)]",info:"[--panel-corner-color:color-mix(in_srgb,var(--color-info)_60%,transparent)]",muted:"[--panel-corner-color:var(--color-border-strong)]"},n={primary:"[--glow-hover-color:var(--color-glow)]",accent:"[--glow-hover-color:var(--color-glow-accent)]",success:"[--glow-hover-color:var(--color-glow-success)]",warning:"[--glow-hover-color:var(--color-glow-warning)]",danger:"[--glow-hover-color:var(--color-glow-danger)]",info:"[--glow-hover-color:var(--color-glow)]",muted:"[--glow-hover-color:var(--color-glow)]"},i={primary:"hover:border-primary/30",accent:"hover:border-accent/40",success:"hover:border-success/30",warning:"hover:border-warning/40",danger:"hover:border-danger/40",info:"hover:border-info/30",muted:"hover:border-border-strong"},l={none:"",sm:"p-3",md:"p-5",lg:"p-6"};e.s(["f",0,function({tone:e="primary",corners:o=!0,interactive:c=!0,hero:d=!1,title:u,description:x,icon:h,action:m,as:f="div",padding:p="md",testId:g,className:v,children:b,...j}){return(0,t.jsxs)(f,{...j,"data-testid":g??j["data-testid"],className:(0,r.f)("relative rounded-panel border border-border bg-surface transition-colors duration-300",l[p],o&&"panel-corners",o&&s[e],c&&"glow-hover",c&&n[e],c&&i[e],d&&"grid-bg overflow-hidden bg-surface/80",v),children:[(u||m||h)&&(0,t.jsxs)("div",{className:"mb-4 flex items-start justify-between gap-3",children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-start gap-2",children:[h&&(0,t.jsx)("span",{className:(0,r.f)("mt-0.5 shrink-0",a.T[e]),children:h}),(0,t.jsxs)("div",{className:"min-w-0",children:[u&&(0,t.jsx)("h3",{className:"text-xs font-bold uppercase tracking-wider",children:u}),x&&(0,t.jsx)("p",{className:"mt-0.5 text-[11px] text-text-muted",children:x})]})]}),m]}),b]})}])},65369,e=>{"use strict";var t=e.i(43476),r=e.i(78571);function a({className:e}){return(0,t.jsx)("div",{"aria-hidden":"true",className:(0,r.f)("skeleton h-3 w-full",e)})}e.s(["l",0,a,"g",0,function({count:e=4,className:s}){return(0,t.jsx)("div",{role:"status","aria-label":"Loading",className:(0,r.f)("grid gap-4 sm:grid-cols-2 lg:grid-cols-4",s),children:Array.from({length:e},(e,r)=>(0,t.jsxs)("div",{className:"panel-corners rounded-panel border border-border bg-surface p-5",children:[(0,t.jsx)(a,{className:"h-2 w-1/2"}),(0,t.jsx)(a,{className:"mt-4 h-7 w-2/3"}),(0,t.jsx)(a,{className:"mt-3 h-1 w-full opacity-60"})]},r))})},"F",0,function({rows:e=5,cols:s=4,className:n}){return(0,t.jsxs)("div",{role:"status","aria-label":"Loading",className:(0,r.f)("overflow-hidden rounded-panel border border-border",n),children:[(0,t.jsx)("div",{className:"flex gap-4 border-b border-border bg-surface px-4 py-3",children:Array.from({length:s},(e,r)=>(0,t.jsx)(a,{className:"h-2 flex-1 opacity-60"},r))}),Array.from({length:e},(e,n)=>(0,t.jsx)("div",{className:"flex gap-4 border-b border-border/50 px-4 py-3 last:border-0",children:Array.from({length:s},(e,s)=>(0,t.jsx)(a,{className:(0,r.f)("h-3 flex-1",(n+s)%3==0&&"max-w-[60%]")},s))},n))]})},"Q",0,function({lines:e=3,className:s}){let n=["w-full","w-11/12","w-4/5","w-2/3","w-3/4"];return(0,t.jsx)("div",{role:"status","aria-label":"Loading",className:(0,r.f)("space-y-2",s),children:Array.from({length:e},(e,r)=>(0,t.jsx)(a,{className:n[r%n.length]},r))})}])},75723,e=>{"use strict";var t=e.i(43476),r=e.i(78571),a=e.i(46670);let s={success:"bg-success shadow-[0_0_6px_var(--color-success)]",warning:"bg-warning shadow-[0_0_6px_var(--color-warning)]",danger:"bg-danger shadow-[0_0_6px_var(--color-danger)]",info:"bg-info shadow-[0_0_6px_var(--color-info)]",default:"bg-text-muted"},n={success:"bg-success",warning:"bg-warning",danger:"bg-danger",info:"bg-info",default:"bg-text-muted"},i=new Set(["ONLINE","RUNNING","ACTIVE","HEALTHY","CRITICAL","UPDATING","PROVISIONING"]);e.s(["f",0,function({status:e,pulse:l,size:o="sm",className:c,label:d}){let u=(0,a.k)(e),x=l??i.has(e.toUpperCase()),h="xs"===o?"h-1.5 w-1.5":"h-2 w-2";return(0,t.jsxs)("span",{className:(0,r.f)("relative inline-flex shrink-0",h,c),role:d?"img":void 0,"aria-label":d,"aria-hidden":!d||void 0,children:[x&&(0,t.jsx)("span",{className:(0,r.f)("absolute inset-0 rounded-full animate-halo",n[u])}),(0,t.jsx)("span",{className:(0,r.f)("relative inline-flex rounded-full",h,s[u])})]})}])},71417,e=>{"use strict";e.s(["L",0,function(e){if(0===e)return"0 B";let t=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,t)).toFixed(1))} ${["B","KB","MB","GB","TB"][t]}`},"C",0,function(e){return e?("string"==typeof e?new Date(e):e).toLocaleString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}):"—"}])},79432,e=>{"use strict";var t=e.i(56420);let r={name:"activity",size:24,node:[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]};r.node;let a=(0,t.f)(r);e.s(["f",0,a],79432)},9347,e=>{"use strict";var t=e.i(56420);let r={name:"arrow-left",size:24,node:[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]};r.node;let a=(0,t.f)(r);e.s(["f",0,a],9347)},75775,e=>{"use strict";var t=e.i(56420);let r={name:"arrow-up-right",size:24,node:[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]};r.node;let a=(0,t.f)(r);e.s(["f",0,a],75775)},82022,e=>{"use strict";var t=e.i(56420);let r={name:"external-link",size:24,node:[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]};r.node;let a=(0,t.f)(r);e.s(["f",0,a],82022)},57665,e=>{"use strict";var t=e.i(56420);let r={name:"power",size:24,node:[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]};r.node;let a=(0,t.f)(r);e.s(["f",0,a],57665)},86207,14098,e=>{"use strict";var t=e.i(56420);let r={name:"refresh-ccw-dot",size:24,node:[["path",{d:"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"14sxne"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16",key:"1hlbsb"}],["path",{d:"M16 16h5v5",key:"ccwih5"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]]};r.node;let a=(0,t.f)(r);e.s(["f",0,a],86207);var s=e.i(43476),n=e.i(71645),i=e.i(68759),l=e.i(32568),o=e.i(82983),c=e.i(41220),d=e.i(32781);e.s(["E",0,function({open:e,node:t,onClose:r,onSaved:a}){let[u,x]=(0,n.useState)([]),[h,m]=(0,n.useState)(""),[f,p]=(0,n.useState)(!0),[g,v]=(0,n.useState)(!1),[b,j]=(0,n.useState)(""),[y,N]=(0,n.useState)(!1);(0,n.useEffect)(()=>{e&&(j(""),m(t?.role?.id??""),p(!0),N(!0),(async()=>{try{let e=await o.f.roles.list();x(e.data??[])}catch{j("Failed to load roles")}finally{N(!1)}})())},[e,t?.role?.id]);let w=async()=>{if(t){v(!0),j("");try{let e=t.role?.id;e&&e!==h&&await o.f.roles.unassign(e,{nodeIds:[t.id]}),h&&await o.f.roles.assign(h,{nodeIds:[t.id],defer:!f});let s=h?u.find(e=>e.id===h)??null:null;a(s),r()}catch(e){j(e instanceof Error?e.message:"Failed to assign role")}finally{v(!1)}}},k=async()=>{if(t?.role){v(!0),j("");try{await o.f.roles.unassign(t.role.id,{nodeIds:[t.id]}),a(null),r()}catch(e){j(e instanceof Error?e.message:"Failed to unassign role")}finally{v(!1)}}},_=()=>{j(""),v(!1),r()};return(0,s.jsx)(l.n,{open:e,onClose:_,title:t?.role?"Change Role":"Assign Role",description:t?`Node: ${t.name}`:"",icon:(0,s.jsx)(c.f,{className:"h-5 w-5 text-primary"}),children:(0,s.jsxs)("div",{className:"space-y-4",children:[y?(0,s.jsxs)("div",{className:"flex items-center gap-2 py-4 text-xs text-text-muted",children:[(0,s.jsx)(d.f,{className:"h-4 w-4 animate-spin"}),"Loading roles…"]}):0===u.length?(0,s.jsx)("p",{className:"text-xs text-text-muted py-4",children:"No roles found. Create a role first on the Roles page."}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(l.G,{label:"Role",children:(0,s.jsxs)("select",{value:h,onChange:e=>m(e.target.value),className:l.N,children:[(0,s.jsx)("option",{value:"",children:"— No role —"}),u.map(e=>(0,s.jsx)("option",{value:e.id,children:e.name},e.id))]})}),h&&(0,s.jsxs)("label",{className:"flex items-center gap-2 text-xs cursor-pointer",children:[(0,s.jsx)("input",{type:"checkbox",checked:f,onChange:e=>p(e.target.checked),className:"rounded border-border"}),"Apply role immediately"]})]}),b&&(0,s.jsx)("div",{className:"rounded border border-danger/30 bg-danger/10 px-3 py-2 text-xs text-danger",children:b}),(0,s.jsxs)("div",{className:"flex justify-between pt-2",children:[(0,s.jsx)("div",{children:t?.role&&(0,s.jsx)(i.K,{variant:"secondary",size:"sm",onClick:()=>void k(),disabled:g,children:"Unassign Role"})}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(i.K,{variant:"secondary",size:"sm",onClick:_,children:"Cancel"}),(0,s.jsx)(i.K,{size:"sm",onClick:()=>void w(),disabled:g||!h||0===u.length,icon:g?(0,s.jsx)(d.f,{className:"h-3.5 w-3.5 animate-spin"}):void 0,children:g?"Saving…":t?.role?"Change Role":"Assign Role"})]})]})]})})},"F",0,function({open:e,node:t,onClose:r,onSaved:a}){let[u,x]=(0,n.useState)(""),[h,m]=(0,n.useState)(""),[f,p]=(0,n.useState)(""),[g,v]=(0,n.useState)(!1),[b,j]=(0,n.useState)("");(0,n.useEffect)(()=>{if(t){x(t.name);try{let e=JSON.parse(t.tags);m(e.join(", "))}catch{m("")}p(t.status),j("")}},[t]);let y=async()=>{if(t&&u.trim()){v(!0),j("");try{let e=h.split(",").map(e=>e.trim()).filter(Boolean);await o.f.nodes.update(t.id,{name:u.trim(),tags:e,status:f.toUpperCase()}),a(),r()}catch(e){j(e instanceof Error?e.message:"Failed to update node")}finally{v(!1)}}},N=()=>{j(""),v(!1),r()};return(0,s.jsx)(l.n,{open:e,onClose:N,title:"Edit Node",description:t?`${t.hostname}`:"",icon:(0,s.jsx)(c.f,{className:"h-5 w-5 text-primary"}),children:(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsx)(l.G,{label:"Name",required:!0,children:(0,s.jsx)("input",{type:"text",value:u,onChange:e=>x(e.target.value),className:l.W})}),(0,s.jsx)(l.G,{label:"Status",children:(0,s.jsxs)("select",{value:f,onChange:e=>p(e.target.value),className:l.N,children:[(0,s.jsx)("option",{value:"ONLINE",children:"ONLINE"}),(0,s.jsx)("option",{value:"OFFLINE",children:"OFFLINE"}),(0,s.jsx)("option",{value:"DEGRADED",children:"DEGRADED"}),(0,s.jsx)("option",{value:"PROVISIONING",children:"PROVISIONING"}),(0,s.jsx)("option",{value:"MAINTENANCE",children:"MAINTENANCE"})]})}),(0,s.jsxs)(l.G,{label:"Tags",children:[(0,s.jsx)("input",{type:"text",value:h,onChange:e=>m(e.target.value),placeholder:"web, production, us-east",className:l.W}),(0,s.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:"Comma-separated list of tags"})]}),b&&(0,s.jsx)("div",{className:"rounded border border-danger/30 bg-danger/10 px-3 py-2 text-xs text-danger",children:b}),(0,s.jsxs)("div",{className:"flex justify-end gap-2 pt-2",children:[(0,s.jsx)(i.K,{variant:"secondary",size:"sm",onClick:N,children:"Cancel"}),(0,s.jsx)(i.K,{size:"sm",onClick:()=>void y(),disabled:g||!u.trim(),icon:g?(0,s.jsx)(d.f,{className:"h-3.5 w-3.5 animate-spin"}):void 0,children:g?"Saving…":"Save Changes"})]})]})})},"M",0,function({open:e,onClose:t,onRegistered:r}){let[a,u]=(0,n.useState)(""),[x,h]=(0,n.useState)(""),[m,f]=(0,n.useState)("4100"),[p,g]=(0,n.useState)("linux"),[v,b]=(0,n.useState)("x86_64"),[j,y]=(0,n.useState)(""),[N,w]=(0,n.useState)(!1),[k,_]=(0,n.useState)(""),M=async()=>{if(a.trim()&&x.trim()){w(!0),_("");try{let e=j.split(",").map(e=>e.trim()).filter(Boolean);await o.f.nodes.register({name:a.trim(),hostname:x.trim(),ipAddress:x.trim(),port:Number(m)||4100,os:p,arch:v,tags:e,agentVersion:"3.1.2"}),r(),S()}catch(e){_(e instanceof Error?e.message:"Failed to register node")}finally{w(!1)}}},S=()=>{u(""),h(""),f("4100"),g("linux"),b("x86_64"),y(""),_(""),w(!1),t()};return(0,s.jsx)(l.n,{open:e,onClose:S,title:"Register Node",description:"Manually register a node already running the agent",icon:(0,s.jsx)(c.f,{className:"h-5 w-5 text-primary"}),children:(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsx)(l.G,{label:"Node Name",required:!0,children:(0,s.jsx)("input",{type:"text",value:a,onChange:e=>u(e.target.value),placeholder:"web-server-01",className:l.W,autoFocus:!0})}),(0,s.jsx)(l.G,{label:"FQDN / Hostname",required:!0,children:(0,s.jsx)("input",{type:"text",value:x,onChange:e=>h(e.target.value),placeholder:"node-1.example.com",className:l.W})}),(0,s.jsxs)("div",{className:"grid grid-cols-3 gap-3",children:[(0,s.jsx)(l.G,{label:"Port",children:(0,s.jsx)("input",{type:"number",value:m,onChange:e=>f(e.target.value),className:l.W})}),(0,s.jsx)(l.G,{label:"OS",children:(0,s.jsxs)("select",{value:p,onChange:e=>g(e.target.value),className:l.N,children:[(0,s.jsx)("option",{value:"linux",children:"Linux"}),(0,s.jsx)("option",{value:"darwin",children:"macOS"}),(0,s.jsx)("option",{value:"windows",children:"Windows"})]})}),(0,s.jsx)(l.G,{label:"Architecture",children:(0,s.jsxs)("select",{value:v,onChange:e=>b(e.target.value),className:l.N,children:[(0,s.jsx)("option",{value:"x86_64",children:"x86_64"}),(0,s.jsx)("option",{value:"aarch64",children:"aarch64"}),(0,s.jsx)("option",{value:"arm",children:"arm"})]})})]}),(0,s.jsxs)(l.G,{label:"Tags",children:[(0,s.jsx)("input",{type:"text",value:j,onChange:e=>y(e.target.value),placeholder:"web, production, us-east",className:l.W}),(0,s.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:"Comma-separated"})]}),k&&(0,s.jsx)("div",{className:"rounded border border-danger/30 bg-danger/10 px-3 py-2 text-xs text-danger",children:k}),(0,s.jsxs)("div",{className:"flex justify-end gap-2 pt-2",children:[(0,s.jsx)(i.K,{variant:"secondary",size:"sm",onClick:S,children:"Cancel"}),(0,s.jsx)(i.K,{size:"sm",onClick:()=>void M(),disabled:N||!a.trim()||!x.trim(),icon:N?(0,s.jsx)(d.f,{className:"h-3.5 w-3.5 animate-spin"}):void 0,children:N?"Registering…":"Register Node"})]})]})})}],14098)},25398,e=>{"use strict";var t=e.i(56420);let r={name:"rotate-cw",size:24,node:[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]};r.node;let a=(0,t.f)(r);e.s(["f",0,a],25398)},90317,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={bindSnapshot:function(){return d},createAsyncLocalStorage:function(){return o},createSnapshot:function(){return u},getOrCreateGlobalAsyncLocalStorage:function(){return c}};for(var s in a)Object.defineProperty(r,s,{enumerable:!0,get:a[s]});let n=Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available");class i{disable(){throw n}getStore(){}run(){throw n}exit(){throw n}enterWith(){throw n}static bind(e){return e}}let l="u">typeof globalThis&&globalThis.AsyncLocalStorage;function o(){return l?new l:new i}function c(e){let t=Symbol.for(`@next/${e}@16.4.6`),r=globalThis;return r[t]??=o()}function d(e){return l?l.bind(e):i.bind(e)}function u(){return l?l.snapshot():function(e,...t){return e(...t)}}},42344,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"workAsyncStorageInstance",{enumerable:!0,get:function(){return a}});let a=(0,e.r(90317).getOrCreateGlobalAsyncLocalStorage)("work-async-storage")},63599,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"workAsyncStorage",{enumerable:!0,get:function(){return a.workAsyncStorageInstance}});let a=e.r(42344)},70703,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return s}});let a=e.r(55682)._(e.r(69093));function s(e,t){let r={};"function"==typeof e&&(r.loader=e);let s={...r,...t};return(0,a.default)({...s,modules:s.loadableGenerated?.modules})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},9885,(e,t,r)=>{"use strict";function a(e){return e.split("/").map(e=>encodeURIComponent(e)).join("/")}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"encodeURIPath",{enumerable:!0,get:function(){return a}})},67585,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"BailoutToCSRForNextDynamic",{enumerable:!0,get:function(){return i}});let a=e.r(71645),s=e.r(74080);e.r(32061);let n=e.r(49354).createReactBrowserBailoutReason.bind(null,"next/dynamic");function i({children:e}){return(0,a.use)((0,s.browser)(n)),e}},69093,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return c}});let a=e.r(43476),s=e.r(71645),n=e.r(67585),i=e.r(52157);function l(e){return{default:e&&"default"in e?e.default:e}}let o={loader:()=>Promise.resolve(l(()=>null)),loading:null,ssr:!0},c=function(e){let t={...o,...e},r=(0,s.lazy)(()=>t.loader().then(l)),c=t.loading;function d(e){let l=c?(0,a.jsx)(c,{isLoading:!0,pastDelay:!0,error:null}):null,o=!t.ssr||!!t.loading,d=o?s.Suspense:s.Fragment,u=t.ssr?(0,a.jsxs)(a.Fragment,{children:["u"<typeof window?(0,a.jsx)(i.PreloadChunks,{moduleIds:t.modules}):null,(0,a.jsx)(r,{...e})]}):(0,a.jsx)(n.BailoutToCSRForNextDynamic,{children:(0,a.jsx)(r,{...e})});return(0,a.jsx)(d,{...o?{fallback:l}:{},children:u})}return d.displayName="LoadableComponent",d}},52157,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"PreloadChunks",{enumerable:!0,get:function(){return o}});let a=e.r(43476),s=e.r(74080),n=e.r(63599),i=e.r(9885),l=e.r(43369);function o({moduleIds:e}){if("u">typeof window)return null;let t=n.workAsyncStorage.getStore();if(void 0===t)return null;let r=[];if(t.reactLoadableManifest&&e){let a=t.reactLoadableManifest;for(let t of e){if(!a[t])continue;let e=a[t].files;r.push(...e)}}if(0===r.length)return null;let c=(0,l.getAssetTokenQuery)();return(0,a.jsx)(a.Fragment,{children:r.map(e=>{let r=`${t.assetPrefix}/_next/${(0,i.encodeURIPath)(e)}${c}`;return e.endsWith(".css")?(0,a.jsx)("link",{precedence:"dynamic",href:r,rel:"stylesheet",as:"style",nonce:t.nonce},e):((0,s.preload)(r,{as:"script",fetchPriority:"low",nonce:t.nonce}),null)})})}},49354,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={createReactBrowserBailoutReason:function(){return i},getReactBrowserBailoutReason:function(){return l},isNextBrowserBailoutError:function(){return o}};for(var s in a)Object.defineProperty(r,s,{enumerable:!0,get:a[s]});let n=Symbol.for("next.browser-bailout-reason");function i(e){return{$$typeof:n,reason:e}}function l(e){let t=e?.cause;return t?.$$typeof===n?t.reason:void 0}function o(e){return void 0!==l(e)}}]);
|