@hivemagnus/magnus-ui 3.6.0 → 3.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (279) hide show
  1. package/.env.example +5 -4
  2. package/README.md +52 -4
  3. package/bin/magnus-ui.mjs +118 -2
  4. package/dist/app/apps/dashboard/.next/BUILD_ID +1 -1
  5. package/dist/app/apps/dashboard/.next/build-manifest.json +3 -3
  6. package/dist/app/apps/dashboard/.next/prerender-manifest.json +3 -3
  7. package/dist/app/apps/dashboard/.next/required-server-files.json +2 -16
  8. package/dist/app/apps/dashboard/.next/routes-manifest.json +9 -20
  9. package/dist/app/apps/dashboard/.next/server/app/_global-error.html +1 -1
  10. package/dist/app/apps/dashboard/.next/server/app/_global-error.rsc +1 -1
  11. package/dist/app/apps/dashboard/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  12. package/dist/app/apps/dashboard/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  13. package/dist/app/apps/dashboard/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  14. package/dist/app/apps/dashboard/.next/server/app/_not-found/page.js.nft.json +1 -1
  15. package/dist/app/apps/dashboard/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  16. package/dist/app/apps/dashboard/.next/server/app/anomalies/[anomalyId]/page.js.nft.json +1 -1
  17. package/dist/app/apps/dashboard/.next/server/app/anomalies/[anomalyId]/page_client-reference-manifest.js +1 -1
  18. package/dist/app/apps/dashboard/.next/server/app/anomalies/page.js.nft.json +1 -1
  19. package/dist/app/apps/dashboard/.next/server/app/anomalies/page_client-reference-manifest.js +1 -1
  20. package/dist/app/apps/dashboard/.next/server/app/anomalies/remediation/page.js.nft.json +1 -1
  21. package/dist/app/apps/dashboard/.next/server/app/anomalies/remediation/page_client-reference-manifest.js +1 -1
  22. package/dist/app/apps/dashboard/.next/server/app/api/auth/hive/callback/route.js.nft.json +1 -1
  23. package/dist/app/apps/dashboard/.next/server/app/api/auth/hive/configured/route.js.nft.json +1 -1
  24. package/dist/app/apps/dashboard/.next/server/app/api/auth/hive/start/route.js.nft.json +1 -1
  25. package/dist/app/apps/dashboard/.next/server/app/api/auth/login/route.js.nft.json +1 -1
  26. package/dist/app/apps/dashboard/.next/server/app/api/auth/logout/route.js +6 -5
  27. package/dist/app/apps/dashboard/.next/server/app/api/auth/logout/route.js.nft.json +1 -1
  28. package/dist/app/apps/dashboard/.next/server/app/api/auth/me/route.js.nft.json +1 -1
  29. package/dist/app/apps/dashboard/.next/server/app/api/control-nodes/[id]/route.js +2 -2
  30. package/dist/app/apps/dashboard/.next/server/app/api/control-nodes/[id]/route.js.nft.json +1 -1
  31. package/dist/app/apps/dashboard/.next/server/app/api/control-nodes/route.js +2 -2
  32. package/dist/app/apps/dashboard/.next/server/app/api/control-nodes/route.js.nft.json +1 -1
  33. package/dist/app/apps/dashboard/.next/server/app/api/federation/route.js +3 -3
  34. package/dist/app/apps/dashboard/.next/server/app/api/federation/route.js.nft.json +1 -1
  35. package/dist/app/apps/dashboard/.next/server/app/api/health/route.js.nft.json +1 -1
  36. package/dist/app/apps/dashboard/.next/server/app/api/hermes/dashboard/[[...path]]/route.js +8 -6
  37. package/dist/app/apps/dashboard/.next/server/app/api/hermes/dashboard/[[...path]]/route.js.nft.json +1 -1
  38. package/dist/app/apps/dashboard/.next/server/app/api/hive-router/dashboard/[[...path]]/route.js +7 -5
  39. package/dist/app/apps/dashboard/.next/server/app/api/hive-router/dashboard/[[...path]]/route.js.nft.json +1 -1
  40. package/dist/app/apps/dashboard/.next/server/app/api/proxy/[...path]/route.js +5 -5
  41. package/dist/app/apps/dashboard/.next/server/app/api/proxy/[...path]/route.js.nft.json +1 -1
  42. package/dist/app/apps/dashboard/.next/server/app/api/terminal/close/route.js.nft.json +1 -1
  43. package/dist/app/apps/dashboard/.next/server/app/api/terminal/input/route.js.nft.json +1 -1
  44. package/dist/app/apps/dashboard/.next/server/app/api/terminal/open/route.js +4 -4
  45. package/dist/app/apps/dashboard/.next/server/app/api/terminal/open/route.js.nft.json +1 -1
  46. package/dist/app/apps/dashboard/.next/server/app/api/terminal/resize/route.js.nft.json +1 -1
  47. package/dist/app/apps/dashboard/.next/server/app/api/terminal/stream/route.js.nft.json +1 -1
  48. package/dist/app/apps/dashboard/.next/server/app/api-docs/page.js.nft.json +1 -1
  49. package/dist/app/apps/dashboard/.next/server/app/api-docs/page_client-reference-manifest.js +1 -1
  50. package/dist/app/apps/dashboard/.next/server/app/application-operations/page.js.nft.json +1 -1
  51. package/dist/app/apps/dashboard/.next/server/app/application-operations/page_client-reference-manifest.js +1 -1
  52. package/dist/app/apps/dashboard/.next/server/app/ardent/installations/page.js.nft.json +1 -1
  53. package/dist/app/apps/dashboard/.next/server/app/ardent/installations/page_client-reference-manifest.js +1 -1
  54. package/dist/app/apps/dashboard/.next/server/app/ardent/page.js.nft.json +1 -1
  55. package/dist/app/apps/dashboard/.next/server/app/ardent/page_client-reference-manifest.js +1 -1
  56. package/dist/app/apps/dashboard/.next/server/app/ardent/profiles/[id]/page.js.nft.json +1 -1
  57. package/dist/app/apps/dashboard/.next/server/app/ardent/profiles/[id]/page_client-reference-manifest.js +1 -1
  58. package/dist/app/apps/dashboard/.next/server/app/ardent/profiles/page.js.nft.json +1 -1
  59. package/dist/app/apps/dashboard/.next/server/app/ardent/profiles/page_client-reference-manifest.js +1 -1
  60. package/dist/app/apps/dashboard/.next/server/app/audit/page.js +1 -1
  61. package/dist/app/apps/dashboard/.next/server/app/audit/page.js.nft.json +1 -1
  62. package/dist/app/apps/dashboard/.next/server/app/audit/page_client-reference-manifest.js +1 -1
  63. package/dist/app/apps/dashboard/.next/server/app/codex/installations/page.js.nft.json +1 -1
  64. package/dist/app/apps/dashboard/.next/server/app/codex/installations/page_client-reference-manifest.js +1 -1
  65. package/dist/app/apps/dashboard/.next/server/app/codex/page.js.nft.json +1 -1
  66. package/dist/app/apps/dashboard/.next/server/app/codex/page_client-reference-manifest.js +1 -1
  67. package/dist/app/apps/dashboard/.next/server/app/commands/page.js.nft.json +1 -1
  68. package/dist/app/apps/dashboard/.next/server/app/commands/page_client-reference-manifest.js +1 -1
  69. package/dist/app/apps/dashboard/.next/server/app/cron/page/server-reference-manifest.json +1 -1
  70. package/dist/app/apps/dashboard/.next/server/app/cron/page.js +1 -1
  71. package/dist/app/apps/dashboard/.next/server/app/cron/page.js.nft.json +1 -1
  72. package/dist/app/apps/dashboard/.next/server/app/cron/page_client-reference-manifest.js +1 -1
  73. package/dist/app/apps/dashboard/.next/server/app/files/page.js.nft.json +1 -1
  74. package/dist/app/apps/dashboard/.next/server/app/files/page_client-reference-manifest.js +1 -1
  75. package/dist/app/apps/dashboard/.next/server/app/fleet-map/page.js.nft.json +1 -1
  76. package/dist/app/apps/dashboard/.next/server/app/fleet-map/page_client-reference-manifest.js +1 -1
  77. package/dist/app/apps/dashboard/.next/server/app/fleet-readiness/page.js +1 -1
  78. package/dist/app/apps/dashboard/.next/server/app/fleet-readiness/page.js.nft.json +1 -1
  79. package/dist/app/apps/dashboard/.next/server/app/fleet-readiness/page_client-reference-manifest.js +1 -1
  80. package/dist/app/apps/dashboard/.next/server/app/fleet-timeline/page.js +1 -1
  81. package/dist/app/apps/dashboard/.next/server/app/fleet-timeline/page.js.nft.json +1 -1
  82. package/dist/app/apps/dashboard/.next/server/app/fleet-timeline/page_client-reference-manifest.js +1 -1
  83. package/dist/app/apps/dashboard/.next/server/app/governor/operations/page.js.nft.json +1 -1
  84. package/dist/app/apps/dashboard/.next/server/app/governor/operations/page_client-reference-manifest.js +1 -1
  85. package/dist/app/apps/dashboard/.next/server/app/hermes-drift/page.js +1 -1
  86. package/dist/app/apps/dashboard/.next/server/app/hermes-drift/page.js.nft.json +1 -1
  87. package/dist/app/apps/dashboard/.next/server/app/hermes-drift/page_client-reference-manifest.js +1 -1
  88. package/dist/app/apps/dashboard/.next/server/app/hermes-security/page.js.nft.json +1 -1
  89. package/dist/app/apps/dashboard/.next/server/app/hermes-security/page_client-reference-manifest.js +1 -1
  90. package/dist/app/apps/dashboard/.next/server/app/incidents/page.js +1 -1
  91. package/dist/app/apps/dashboard/.next/server/app/incidents/page.js.nft.json +1 -1
  92. package/dist/app/apps/dashboard/.next/server/app/incidents/page_client-reference-manifest.js +1 -1
  93. package/dist/app/apps/dashboard/.next/server/app/library/page.js +1 -1
  94. package/dist/app/apps/dashboard/.next/server/app/library/page.js.nft.json +1 -1
  95. package/dist/app/apps/dashboard/.next/server/app/library/page_client-reference-manifest.js +1 -1
  96. package/dist/app/apps/dashboard/.next/server/app/login/page.js.nft.json +1 -1
  97. package/dist/app/apps/dashboard/.next/server/app/login/page_client-reference-manifest.js +1 -1
  98. package/dist/app/apps/dashboard/.next/server/app/logs/page.js.nft.json +1 -1
  99. package/dist/app/apps/dashboard/.next/server/app/logs/page_client-reference-manifest.js +1 -1
  100. package/dist/app/apps/dashboard/.next/server/app/mission-control/page.js +1 -1
  101. package/dist/app/apps/dashboard/.next/server/app/mission-control/page.js.nft.json +1 -1
  102. package/dist/app/apps/dashboard/.next/server/app/mission-control/page_client-reference-manifest.js +1 -1
  103. package/dist/app/apps/dashboard/.next/server/app/nodes/[nodeId]/page.js.nft.json +1 -1
  104. package/dist/app/apps/dashboard/.next/server/app/nodes/[nodeId]/page_client-reference-manifest.js +1 -1
  105. package/dist/app/apps/dashboard/.next/server/app/nodes/page.js +1 -1
  106. package/dist/app/apps/dashboard/.next/server/app/nodes/page.js.nft.json +1 -1
  107. package/dist/app/apps/dashboard/.next/server/app/nodes/page_client-reference-manifest.js +1 -1
  108. package/dist/app/apps/dashboard/.next/server/app/notifications/page.js.nft.json +1 -1
  109. package/dist/app/apps/dashboard/.next/server/app/notifications/page_client-reference-manifest.js +1 -1
  110. package/dist/app/apps/dashboard/.next/server/app/orchestra/installations/page.js.nft.json +1 -1
  111. package/dist/app/apps/dashboard/.next/server/app/orchestra/installations/page_client-reference-manifest.js +1 -1
  112. package/dist/app/apps/dashboard/.next/server/app/orchestra/page.js.nft.json +1 -1
  113. package/dist/app/apps/dashboard/.next/server/app/orchestra/page_client-reference-manifest.js +1 -1
  114. package/dist/app/apps/dashboard/.next/server/app/orchestra/profiles/page.js.nft.json +1 -1
  115. package/dist/app/apps/dashboard/.next/server/app/orchestra/profiles/page_client-reference-manifest.js +1 -1
  116. package/dist/app/apps/dashboard/.next/server/app/orchestra/web-gateway/page.js.nft.json +1 -1
  117. package/dist/app/apps/dashboard/.next/server/app/orchestra/web-gateway/page_client-reference-manifest.js +1 -1
  118. package/dist/app/apps/dashboard/.next/server/app/page.js +1 -1
  119. package/dist/app/apps/dashboard/.next/server/app/page.js.nft.json +1 -1
  120. package/dist/app/apps/dashboard/.next/server/app/page_client-reference-manifest.js +1 -1
  121. package/dist/app/apps/dashboard/.next/server/app/retention/page.js +1 -1
  122. package/dist/app/apps/dashboard/.next/server/app/retention/page.js.nft.json +1 -1
  123. package/dist/app/apps/dashboard/.next/server/app/retention/page_client-reference-manifest.js +1 -1
  124. package/dist/app/apps/dashboard/.next/server/app/roles/page.js +1 -1
  125. package/dist/app/apps/dashboard/.next/server/app/roles/page.js.nft.json +1 -1
  126. package/dist/app/apps/dashboard/.next/server/app/roles/page_client-reference-manifest.js +1 -1
  127. package/dist/app/apps/dashboard/.next/server/app/rollouts/page.js.nft.json +1 -1
  128. package/dist/app/apps/dashboard/.next/server/app/rollouts/page_client-reference-manifest.js +1 -1
  129. package/dist/app/apps/dashboard/.next/server/app/security-fusion/cases/[caseId]/page.js.nft.json +1 -1
  130. package/dist/app/apps/dashboard/.next/server/app/security-fusion/cases/[caseId]/page_client-reference-manifest.js +1 -1
  131. package/dist/app/apps/dashboard/.next/server/app/security-fusion/cases/page.js.nft.json +1 -1
  132. package/dist/app/apps/dashboard/.next/server/app/security-fusion/cases/page_client-reference-manifest.js +1 -1
  133. package/dist/app/apps/dashboard/.next/server/app/security-fusion/entities/page.js.nft.json +1 -1
  134. package/dist/app/apps/dashboard/.next/server/app/security-fusion/entities/page_client-reference-manifest.js +1 -1
  135. package/dist/app/apps/dashboard/.next/server/app/security-fusion/events/page.js.nft.json +1 -1
  136. package/dist/app/apps/dashboard/.next/server/app/security-fusion/events/page_client-reference-manifest.js +1 -1
  137. package/dist/app/apps/dashboard/.next/server/app/security-fusion/evidence/page.js.nft.json +1 -1
  138. package/dist/app/apps/dashboard/.next/server/app/security-fusion/evidence/page_client-reference-manifest.js +1 -1
  139. package/dist/app/apps/dashboard/.next/server/app/security-fusion/page.js +1 -1
  140. package/dist/app/apps/dashboard/.next/server/app/security-fusion/page.js.nft.json +1 -1
  141. package/dist/app/apps/dashboard/.next/server/app/security-fusion/page_client-reference-manifest.js +1 -1
  142. package/dist/app/apps/dashboard/.next/server/app/security-fusion/policies/page.js.nft.json +1 -1
  143. package/dist/app/apps/dashboard/.next/server/app/security-fusion/policies/page_client-reference-manifest.js +1 -1
  144. package/dist/app/apps/dashboard/.next/server/app/security-fusion/sources/page.js.nft.json +1 -1
  145. package/dist/app/apps/dashboard/.next/server/app/security-fusion/sources/page_client-reference-manifest.js +1 -1
  146. package/dist/app/apps/dashboard/.next/server/app/skills/page/server-reference-manifest.json +1 -1
  147. package/dist/app/apps/dashboard/.next/server/app/skills/page.js +1 -1
  148. package/dist/app/apps/dashboard/.next/server/app/skills/page.js.nft.json +1 -1
  149. package/dist/app/apps/dashboard/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  150. package/dist/app/apps/dashboard/.next/server/app/webhooks/[id]/page.js.nft.json +1 -1
  151. package/dist/app/apps/dashboard/.next/server/app/webhooks/[id]/page_client-reference-manifest.js +1 -1
  152. package/dist/app/apps/dashboard/.next/server/app/webhooks/new/page.js.nft.json +1 -1
  153. package/dist/app/apps/dashboard/.next/server/app/webhooks/new/page_client-reference-manifest.js +1 -1
  154. package/dist/app/apps/dashboard/.next/server/app/webhooks/page.js.nft.json +1 -1
  155. package/dist/app/apps/dashboard/.next/server/app/webhooks/page_client-reference-manifest.js +1 -1
  156. package/dist/app/apps/dashboard/.next/server/chunks/{[externals]__0lufsyh_0gqup._.js → [externals]__1k43kg5-icx7b._.js} +1 -1
  157. package/dist/app/apps/dashboard/.next/server/chunks/{[root-of-the-server]__0vzssf5bgd660._.js → [root-of-the-server]__0ndj_rhwp_6vf._.js} +1 -1
  158. package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__0ywmf3079vsm1._.js +1 -1
  159. package/dist/app/apps/dashboard/.next/server/chunks/{[root-of-the-server]__05vapur0p6d-l._.js → [root-of-the-server]__15_4jl4ba_7y3._.js} +1 -1
  160. package/dist/app/apps/dashboard/.next/server/chunks/{[root-of-the-server]__0iiv9pxo2yauj._.js → [root-of-the-server]__1cxla67mqwfdr._.js} +1 -1
  161. package/dist/app/apps/dashboard/.next/server/chunks/{[root-of-the-server]__0fwm7idn_76uf._.js → [root-of-the-server]__1rrn6p9afghbt._.js} +1 -1
  162. package/dist/app/apps/dashboard/.next/server/chunks/{[root-of-the-server]__0ioimsx71gr0o._.js → [root-of-the-server]__1wj2nw17pv5g8._.js} +1 -1
  163. package/dist/app/apps/dashboard/.next/server/chunks/_0jvoc4-ta3zc0._.js +1 -1
  164. package/dist/app/apps/dashboard/.next/server/chunks/_0oj6_-g5b2lvi._.js +1 -1
  165. package/dist/app/apps/dashboard/.next/server/chunks/_0rwz3f0jh1ty0._.js +1 -1
  166. package/dist/app/apps/dashboard/.next/server/chunks/_0s788ryrplkp6._.js +1 -1
  167. package/dist/app/apps/dashboard/.next/server/chunks/_1-ntqfqk_4-f0._.js +1 -1
  168. package/dist/app/apps/dashboard/.next/server/chunks/_120rsoc_nc7_3._.js +1 -1
  169. package/dist/app/apps/dashboard/.next/server/chunks/_1ilhtkg33m99h._.js +1 -1
  170. package/dist/app/apps/dashboard/.next/server/chunks/_1xodprib7qa_j._.js +2 -2
  171. package/dist/app/apps/dashboard/.next/server/chunks/apps_dashboard_runtime-embed-isolation_mjs_1ovehd-pl97ex._.js +3 -0
  172. package/dist/app/apps/dashboard/.next/server/chunks/apps_dashboard_src_lib_auth_ts_1hhq1tq6hjj-e._.js +2 -2
  173. package/dist/app/apps/dashboard/.next/server/chunks/apps_dashboard_src_lib_control-nodes-store_ts_01hjyte7nc7l2._.js +3 -2
  174. package/dist/app/apps/dashboard/.next/server/chunks/apps_dashboard_src_lib_embedded-frame_ts_1dw1tog69m3ap._.js +3 -0
  175. package/dist/app/apps/dashboard/.next/server/chunks/apps_dashboard_src_lib_hive-login_ts_0ab2iq7-rpy13._.js +1 -1
  176. package/dist/app/apps/dashboard/.next/server/chunks/ssr/[root-of-the-server]__02wumq04h7-2m._.js +1 -1
  177. package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__1koj-a25tcc9z._.js → [root-of-the-server]__0az7ayfxt936j._.js} +2 -2
  178. package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__02rfo46o0ocq7._.js → [root-of-the-server]__0cbjirfjkahyz._.js} +1 -1
  179. package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__0l7okklk-ix9t._.js → [root-of-the-server]__0mtl30w3r3d8n._.js} +1 -1
  180. package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__1w1bkuf_-8zxm._.js → [root-of-the-server]__0n1mehgazoyys._.js} +1 -1
  181. package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__1y4za7l5ph9o-._.js → [root-of-the-server]__0piptu4qrcax4._.js} +1 -1
  182. package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__0neu-iblb1_-5._.js → [root-of-the-server]__0qoxqg_z229qc._.js} +1 -1
  183. package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__1jb0a4bkg6dd1._.js → [root-of-the-server]__0yvtveej1dtd6._.js} +1 -1
  184. package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__000ndthd0hd5v._.js → [root-of-the-server]__0zftzxoekcfyw._.js} +1 -1
  185. package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__202zczfuwkbzi._.js → [root-of-the-server]__15i5sz08w-tg0._.js} +1 -1
  186. package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__1ria97bl22vsq._.js → [root-of-the-server]__18k_-53xs-qpk._.js} +2 -2
  187. package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__1jtg9fc0ny1cg._.js → [root-of-the-server]__1cesdboqyg7rq._.js} +1 -1
  188. package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__1wsrd6m1h8q7q._.js → [root-of-the-server]__1p0rsbsf87odz._.js} +1 -1
  189. package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__1l8__2gqqi590._.js → [root-of-the-server]__1un9oi8-bokqt._.js} +1 -1
  190. package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__1gwofuehw8lyc._.js → [root-of-the-server]__206hwh476sy80._.js} +1 -1
  191. package/dist/app/apps/dashboard/.next/server/chunks/ssr/_07u8d93e_m_yo._.js +3 -2
  192. package/dist/app/apps/dashboard/.next/server/chunks/ssr/_0caxc2bc6a__r._.js +1 -1
  193. package/dist/app/apps/dashboard/.next/server/chunks/ssr/_1oebzzj_en62h._.js +1 -1
  194. package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_runtime-environment_mjs_11tpywm9_soif._.js +1 -1
  195. package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_0gs_s688kgg1i._.js +1 -1
  196. package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_anomalies_remediation_page_tsx_179m33swiclif._.js +1 -1
  197. package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_ardent_installations_page_tsx_0nvqgacugy6nf._.js +1 -1
  198. package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_audit_audit-client_tsx_0iyab_tlw5yus._.js +1 -1
  199. package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_cron_page_tsx_1i3duyygc0_tg._.js +1 -1
  200. package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_files_page_tsx_1kls9-qinldks._.js +1 -1
  201. package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_governor_operations_page_tsx_1tvdkgil8mlgk._.js +1 -1
  202. package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_login_page_tsx_12_rihimtav2a._.js +1 -1
  203. package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_logs_page_tsx_0473-hcpj1mqr._.js +1 -1
  204. package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_mission-control_page_tsx_0crgxncex_u3w._.js +1 -1
  205. package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_nodes_[nodeId]_page_tsx_1q7fqu18oklzc._.js +1 -1
  206. package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_nodes_nodes-client_tsx_0pt4iarhpqbgn._.js +1 -1
  207. package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_orchestra_web-gateway_page_tsx_1fz12np0wk27t._.js +1 -1
  208. package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_security-fusion_page_tsx_0d314q7yh6fx8._.js +1 -1
  209. package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_skills_page_tsx_0n5zp4xad38in._.js +1 -1
  210. package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_webhooks_webhook-form_tsx_02z3be5wx7-cb._.js +1 -1
  211. package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_components_ui_card_tsx_1pngl2ib-xo5t._.js +1 -1
  212. package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_components_ui_node-selector_tsx_1ci6ldznpaofq._.js +1 -1
  213. package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_lib_api-client_ts_0tho-kkk5ez7h._.js +1 -1
  214. package/dist/app/apps/dashboard/.next/server/middleware-build-manifest.js +3 -3
  215. package/dist/app/apps/dashboard/.next/server/pages/500.html +1 -1
  216. package/dist/app/apps/dashboard/.next/server/preview-props.json +3 -3
  217. package/dist/app/apps/dashboard/.next/server/server-reference-manifest.js +1 -1
  218. package/dist/app/apps/dashboard/.next/server/server-reference-manifest.json +3 -3
  219. package/dist/app/apps/dashboard/.next/static/chunks/{369vzlcjad-gn.js → 017x1uhn9l7nw.js} +1 -1
  220. package/dist/app/apps/dashboard/.next/static/chunks/{1-vn8cqro-f08.js → 06_2psos--paq.js} +1 -1
  221. package/dist/app/apps/dashboard/.next/static/chunks/0i8g96dmx-fbo.css +2 -0
  222. package/dist/app/apps/dashboard/.next/static/chunks/0nalo72r7vipw.js +1 -0
  223. package/dist/app/apps/dashboard/.next/static/chunks/0pswbe-19xxl5.js +1 -0
  224. package/dist/app/apps/dashboard/.next/static/chunks/{3ntnj6ts2r3e2.js → 0s2skhp7086pc.js} +1 -1
  225. package/dist/app/apps/dashboard/.next/static/chunks/{0nekvgtqt8goj.js → 0zsp_alwy1f3v.js} +1 -1
  226. package/dist/app/apps/dashboard/.next/static/chunks/1fpi73pmpn8v5.js +1 -0
  227. package/dist/app/apps/dashboard/.next/static/chunks/1gko0bkguj_g0.js +1 -0
  228. package/dist/app/apps/dashboard/.next/static/chunks/{0lxf5l-ugq-09.js → 1t6g3-pjlavb5.js} +1 -1
  229. package/dist/app/apps/dashboard/.next/static/chunks/{1bn40ef0zair9.js → 1ygangs-zn4yl.js} +1 -1
  230. package/dist/app/apps/dashboard/.next/static/chunks/2_eadjwf4989d.js +1 -0
  231. package/dist/app/apps/dashboard/.next/static/chunks/2fzv4_us4q1w_.js +1 -0
  232. package/dist/app/apps/dashboard/.next/static/chunks/{1cvbtmsr4d3ci.js → 2isl5q2zhjwiw.js} +1 -1
  233. package/dist/app/apps/dashboard/.next/static/chunks/2jaw-lni6k_dt.js +1 -0
  234. package/dist/app/apps/dashboard/.next/static/chunks/2sh8fn_vg-vs5.js +1 -0
  235. package/dist/app/apps/dashboard/.next/static/chunks/{1kx48jg-4j5iv.js → 2u4_fj_v8i521.js} +2 -2
  236. package/dist/app/apps/dashboard/.next/static/chunks/{0d6kculhmue59.js → 2zj24fir1fm27.js} +1 -1
  237. package/dist/app/apps/dashboard/.next/static/chunks/{3w-7xko96ljib.js → 2zjjqqg5z63sl.js} +1 -1
  238. package/dist/app/apps/dashboard/.next/static/chunks/337js55ro9g08.js +1 -0
  239. package/dist/app/apps/dashboard/.next/static/chunks/{37kstof-v-jwi.js → 33xay7yclh_jd.js} +1 -1
  240. package/dist/app/apps/dashboard/.next/static/chunks/34yff9n0mbd1h.js +1 -0
  241. package/dist/app/apps/dashboard/.next/static/chunks/{05p7s0xtb3koa.js → 3eo_31lzj51v9.js} +1 -1
  242. package/dist/app/apps/dashboard/.next/static/chunks/{12ju76tjcqh_z.js → 3f73kvi1pwabq.js} +4 -4
  243. package/dist/app/apps/dashboard/.next/static/chunks/{23o8zfgrdxuhk.js → 3kh386y5gla53.js} +1 -1
  244. package/dist/app/apps/dashboard/.next/static/chunks/3mwn69j8d-q9v.js +4 -0
  245. package/dist/app/apps/dashboard/.next/static/chunks/3p_wvl3sieoi4.js +1 -0
  246. package/dist/app/apps/dashboard/.next/static/chunks/{0yb36s9l-f3_w.js → 3qrrim22gq-vp.js} +1 -1
  247. package/dist/app/apps/dashboard/.next/static/chunks/3ui3xvxcdyc0r.js +1 -0
  248. package/dist/app/apps/dashboard/.next/static/chunks/3ya4-24grz_0f.js +1 -0
  249. package/dist/app/apps/dashboard/.next/static/chunks/{37pb0l96d03rk.js → 42j6wpibe0zrn.js} +1 -1
  250. package/dist/app/apps/dashboard/.next/static/chunks/4369o9c3gezxt.js +6 -0
  251. package/dist/app/apps/dashboard/.next/static/rWpgppq64sqgeZO3-MlD1/_buildManifest.js +11 -0
  252. package/dist/app/apps/dashboard/package.json +3 -2
  253. package/dist/app/apps/dashboard/runtime-control-node-credentials.mjs +638 -0
  254. package/dist/app/apps/dashboard/runtime-embed-isolation.mjs +450 -0
  255. package/dist/app/apps/dashboard/runtime-environment.mjs +1 -1
  256. package/dist/app/apps/dashboard/runtime-integrations.mjs +4 -4
  257. package/dist/app/apps/dashboard/server-tls.mjs +96 -47
  258. package/dist/app/apps/dashboard/server.js +1 -1
  259. package/npm-shrinkwrap.json +4 -3
  260. package/package.json +3 -2
  261. package/dist/app/apps/dashboard/.next/static/IOi-LmbFghqZcllGm0tny/_buildManifest.js +0 -20
  262. package/dist/app/apps/dashboard/.next/static/chunks/015s19fe5dtkp.css +0 -2
  263. package/dist/app/apps/dashboard/.next/static/chunks/06xzeulnw897e.js +0 -1
  264. package/dist/app/apps/dashboard/.next/static/chunks/07tx3h4lr-lxl.js +0 -6
  265. package/dist/app/apps/dashboard/.next/static/chunks/0j0dzrd0ev-gx.js +0 -1
  266. package/dist/app/apps/dashboard/.next/static/chunks/1-pj3rx01kcq0.js +0 -4
  267. package/dist/app/apps/dashboard/.next/static/chunks/1j5vpju4k1wlj.js +0 -1
  268. package/dist/app/apps/dashboard/.next/static/chunks/1kjl44-64ume7.js +0 -1
  269. package/dist/app/apps/dashboard/.next/static/chunks/28zpgt1trm_m4.js +0 -1
  270. package/dist/app/apps/dashboard/.next/static/chunks/2lk4ailve7631.js +0 -1
  271. package/dist/app/apps/dashboard/.next/static/chunks/2lulmsr2vjuw5.js +0 -1
  272. package/dist/app/apps/dashboard/.next/static/chunks/30npcziw-f8ld.js +0 -1
  273. package/dist/app/apps/dashboard/.next/static/chunks/31hx4x8k9707e.js +0 -1
  274. package/dist/app/apps/dashboard/.next/static/chunks/34mzv0h7jkx20.js +0 -1
  275. package/dist/app/apps/dashboard/.next/static/chunks/3cw8xs2dab1g-.js +0 -1
  276. package/dist/app/apps/dashboard/.next/static/chunks/3gjll_bse9v1f.js +0 -1
  277. package/dist/app/apps/dashboard/.next/static/chunks/3qq-otw-t-6b0.js +0 -1
  278. /package/dist/app/apps/dashboard/.next/static/{IOi-LmbFghqZcllGm0tny → rWpgppq64sqgeZO3-MlD1}/_clientMiddlewareManifest.js +0 -0
  279. /package/dist/app/apps/dashboard/.next/static/{IOi-LmbFghqZcllGm0tny → rWpgppq64sqgeZO3-MlD1}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,7415,e=>{"use strict";var a=e.i(43476),r=e.i(71645),s=e.i(22016),t=e.i(79432),n=e.i(61837),n=n,i=e.i(52330),l=e.i(58925),o=e.i(41120),c=e.i(41220),d=e.i(82983),x=e.i(46670),m=e.i(68759),u=e.i(93999),h=e.i(63376),p=e.i(49292);e.s(["default",0,function(){let[e,f]=(0,r.useState)([]),[g,v]=(0,r.useState)(!0),[b,j]=(0,r.useState)(""),[w,N]=(0,r.useState)(null);async function y(e){N(e.nodeId),j("");try{let a=await d.f.codex.update(e.nodeId);if(!a.data)throw Error(a.error?.message??"Codex update failed");let r=a.data;f(e=>e.map(e=>e.nodeId===r.nodeId?r:e))}catch(a){j(`${e.nodeName}: ${a instanceof Error?a.message:"Codex update failed"}`)}finally{N(null)}}async function _(e=!1){v(!0),j("");try{f((await d.f.codex.installations(e)).data??[])}catch(e){j(e instanceof Error?e.message:"Failed to load Codex fleet state")}finally{v(!1)}}(0,r.useEffect)(()=>{_()},[]);let I=e.filter(e=>e.installed&&e.reachable),k=I.filter(e=>e.auth.oauth),C=I.filter(e=>e.updateAvailable),E=I.filter(e=>!e.auth.oauth),A=(0,r.useMemo)(()=>I.find(e=>e.latestVersion)?.latestVersion??"unavailable",[I]);return(0,a.jsxs)(h.U,{className:"space-y-6",children:[(0,a.jsx)(h.z,{children:(0,a.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-lg font-bold uppercase tracking-wider text-primary",children:"Codex Agents"}),(0,a.jsx)("p",{className:"mt-1 text-[11px] uppercase tracking-wider text-text-muted",children:"ChatGPT OAuth and CLI release posture · API tokens disabled"})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(m.K,{size:"sm",variant:"secondary",disabled:g||null!==w,icon:(0,a.jsx)(o.f,{className:`h-3.5 w-3.5 ${g?"animate-spin":""}`}),onClick:()=>void _(!0),children:"Refresh"}),(0,a.jsxs)(s.default,{href:"/codex/installations",className:"inline-flex h-8 items-center gap-2 rounded border border-primary/60 bg-primary/10 px-3 text-[11px] font-medium uppercase tracking-wider text-primary hover:bg-primary/20",children:[(0,a.jsx)(c.f,{className:"h-3.5 w-3.5"}),"Installations"]})]})]})}),b&&(0,a.jsx)("div",{role:"alert",className:"rounded border border-danger/30 bg-danger/10 p-4 text-xs text-danger",children:b}),(0,a.jsx)(h.z,{children:(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-4",children:[(0,a.jsx)(u.n,{label:"Codex Installed",value:I.length,icon:(0,a.jsx)(i.f,{className:"h-4 w-4"})}),(0,a.jsx)(u.n,{label:"OAuth Healthy",value:k.length,icon:(0,a.jsx)(l.f,{className:"h-4 w-4"})}),(0,a.jsx)(u.n,{label:"Updates Available",value:C.length,icon:(0,a.jsx)(o.f,{className:"h-4 w-4"})}),(0,a.jsx)(u.n,{label:"Needs Login",value:E.length,icon:(0,a.jsx)(n.f,{className:"h-4 w-4"})})]})}),(0,a.jsx)(h.z,{children:(0,a.jsx)(u.N,{title:"Fleet Posture",description:`Latest published Codex CLI: ${A}`,children:(0,a.jsxs)("div",{className:"space-y-2",children:[I.map(e=>(0,a.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3 rounded border border-border/50 bg-bg/50 px-3 py-2",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-xs font-medium text-text",children:e.nodeName}),(0,a.jsx)("p",{className:"mt-0.5 font-mono text-[10px] text-text-muted",children:e.version??(e.reachable?"not installed":"agent unreachable")})]}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[e.updateAvailable&&(0,a.jsx)(x.t,{variant:"warning",children:"update"}),(0,a.jsx)(x.t,{variant:e.auth.oauth?"success":e.reachable?"warning":"danger",children:e.auth.oauth?"OAuth current":e.reachable?e.auth.status.replaceAll("_"," "):"unreachable"}),(0,p.f)(e)&&(0,a.jsx)(m.K,{size:"sm",variant:"secondary",disabled:g||null!==w,"aria-label":`Update Codex on ${e.nodeName}`,icon:(0,a.jsx)(o.f,{className:`h-3.5 w-3.5 ${w===e.nodeId?"animate-spin":""}`}),onClick:()=>void y(e),children:w===e.nodeId?"Updating Codex…":e.latestVersion?"Update Codex":"Check & Update Codex"})]})]},e.nodeId)),!g&&0===I.length&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["No Codex installations were detected across ",e.length," managed nodes."]}),g&&(0,a.jsxs)("p",{className:"inline-flex items-center gap-2 text-xs text-text-muted",children:[(0,a.jsx)(t.f,{className:"h-3.5 w-3.5 animate-pulse"}),"Loading cached Codex fleet state..."]})]})})})]})}],7415)},46670,e=>{"use strict";var a=e.i(43476),r=e.i(78571);let s={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)]"},t={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,a.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",s[n],i),children:[l&&(0,a.jsxs)("span",{"aria-hidden":"true",className:"relative inline-flex h-1.5 w-1.5",children:[o&&(0,a.jsx)("span",{className:(0,r.f)("absolute inset-0 rounded-full animate-halo",t[n])}),(0,a.jsx)("span",{className:(0,r.f)("relative inline-flex h-1.5 w-1.5 rounded-full",t[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 a=e.i(43476),r=e.i(56420);let s={name:"arrow-down-right",size:24,node:[["path",{d:"m7 7 10 10",key:"1fmybs"}],["path",{d:"M17 7v10H7",key:"6fjiku"}]]};s.node;let t=(0,r.f)(s);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 x({value:e,max:r=100,tone:s,thresholds:t=o.q,label:n,size:l="xs",showValue:m=!1,valueLabel:u,glow:h,className:p,testId:f}){let g="number"==typeof e&&Number.isFinite(e),v=g?Math.max(0,Math.min(100,e/(r||1)*100)):0,b=s??(g?(0,o.Z)(v,t):"muted"),j=h||!s&&g&&v>=t.warn,w=u??(g?`${v.toFixed(+(v<10&&v>0))}%`:"—");return(0,a.jsxs)("div",{className:(0,i.f)("flex min-w-0 items-center gap-2",p),"data-testid":f,children:[(0,a.jsx)("div",{...g?{role:"meter","aria-label":n,"aria-valuemin":0,"aria-valuemax":r,"aria-valuenow":e,"aria-valuetext":w}:{role:"img","aria-label":n?`${n}: no data`:"No data"},className:(0,i.f)("relative flex-1 overflow-hidden rounded-full bg-border/70",d[l]),children:(0,a.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])})}),m&&(0,a.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,x],51196);var m=e.i(71645);function u({values:e,tone:r="primary",width:s=160,height:t=32,area:n=!0,max:l,percent:c=!1,threshold:d,live:x=!0,emptyLabel:h="not enough data",className:p,testId:f,label:g,stretch:v=!1}){let b=`spark${(0,m.useId)().replace(/:/g,"")}`;if(e.length<2)return(0,a.jsx)("div",{className:(0,i.f)("flex h-8 items-center text-xs italic text-text-muted",p),"data-testid":f,children:h});let j=o.v[r],w=l??(c?Math.max(100,...e):Math.max(...e,d??0)||1),N=t-4,y=s/(e.length-1),_=e=>2+N-Math.max(0,e)/w*N,I=e.map((e,a)=>[a*y,_(e)]),k=I.map(([e,a])=>`${e.toFixed(1)},${a.toFixed(1)}`).join(" "),C=I[I.length-1];return(0,a.jsxs)("svg",{width:v?"100%":s,height:t,viewBox:`0 0 ${s} ${t}`,preserveAspectRatio:v?"none":void 0,className:(0,i.f)("block overflow-visible",p),"data-testid":f,role:g?"img":void 0,"aria-label":g,"aria-hidden":!g||void 0,children:[n&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("defs",{children:(0,a.jsxs)("linearGradient",{id:b,x1:"0",x2:"0",y1:"0",y2:"1",children:[(0,a.jsx)("stop",{offset:"0%",stopColor:j,stopOpacity:.35}),(0,a.jsx)("stop",{offset:"100%",stopColor:j,stopOpacity:0})]})}),(0,a.jsx)("polygon",{points:`0,${t} ${k} ${s},${t}`,fill:`url(#${b})`})]}),void 0!==d&&(0,a.jsx)("line",{x1:0,x2:s,y1:_(d),y2:_(d),stroke:"var(--color-warning)",strokeOpacity:.5,strokeDasharray:"3 3",strokeWidth:1}),(0,a.jsx)("polyline",{fill:"none",stroke:j,strokeWidth:1.5,vectorEffect:"non-scaling-stroke",strokeLinejoin:"round",strokeLinecap:"round",points:k}),x&&!v&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("circle",{cx:C[0],cy:C[1],r:2.5,fill:j,className:"origin-center animate-halo [transform-box:fill-box]"}),(0,a.jsx)("circle",{cx:C[0],cy:C[1],r:2,fill:j})]})]})}e.s(["f",0,u],55427),e.s(["N",0,function({title:e,description:r,children:s,className:t,action:n,tone:i,corners:o=!1,...c}){return(0,a.jsx)(l.f,{...c,tone:i,corners:o,title:e,description:r,action:n,className:t,children:s})},"n",0,function({label:e,value:r,icon:s,trend:c,spark:d,meter:m,delta:h,tone:p="primary",className:f,testId:g}){let v=!h||h.value>=0===(h.positiveIsGood??!0);return(0,a.jsxs)(l.f,{tone:p,className:(0,i.f)("overflow-hidden",f),testId:g,children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("span",{className:"text-[10px] font-medium uppercase tracking-[0.15em] text-text-muted",children:e}),s&&(0,a.jsx)("span",{className:"text-primary/60",children:s})]}),(0,a.jsxs)("div",{className:"mt-2 flex items-end justify-between gap-2",children:[(0,a.jsx)("div",{className:(0,i.f)("num text-2xl font-bold","primary"===p?"text-primary neon-text":o.T[p]),children:r}),h&&0!==h.value&&(0,a.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,a.jsx)(n.f,{className:"h-3 w-3"}):(0,a.jsx)(t,{className:"h-3 w-3"}),Math.abs(h.value).toFixed(+!Number.isInteger(h.value)),h.unit]})]}),c&&(0,a.jsx)("div",{className:(0,i.f)("mt-1 text-[11px]",c.positive?"text-success":"text-danger"),children:c.value}),void 0!==m&&(0,a.jsx)(x,{value:m,className:"mt-3",label:e}),d&&d.length>1&&(0,a.jsx)("div",{className:"-mx-5 -mb-5 mt-3 opacity-80",children:(0,a.jsx)(u,{values:d,tone:p,width:240,height:28,stretch:!0,live:!1})})]})}],93999)},3062,e=>{"use strict";var a=e.i(43476),r=e.i(78571),s=e.i(35084);let t={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:x,description:m,icon:u,action:h,as:p="div",padding:f="md",testId:g,className:v,children:b,...j}){return(0,a.jsxs)(p,{...j,"data-testid":g??j["data-testid"],className:(0,r.f)("relative rounded-panel border border-border bg-surface transition-colors duration-300",l[f],o&&"panel-corners",o&&t[e],c&&"glow-hover",c&&n[e],c&&i[e],d&&"grid-bg overflow-hidden bg-surface/80",v),children:[(x||h||u)&&(0,a.jsxs)("div",{className:"mb-4 flex items-start justify-between gap-3",children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-start gap-2",children:[u&&(0,a.jsx)("span",{className:(0,r.f)("mt-0.5 shrink-0",s.T[e]),children:u}),(0,a.jsxs)("div",{className:"min-w-0",children:[x&&(0,a.jsx)("h3",{className:"text-xs font-bold uppercase tracking-wider",children:x}),m&&(0,a.jsx)("p",{className:"mt-0.5 text-[11px] text-text-muted",children:m})]})]}),h]}),b]})}])},63376,e=>{"use strict";var a=e.i(43476);e.s(["z",0,function({children:e,className:r}){return(0,a.jsx)("div",{className:`animate-page-in${r?` ${r}`:""}`,children:e})},"U",0,function({children:e,className:r}){return(0,a.jsx)("div",{className:r,children:e})}])},49292,e=>{"use strict";e.s(["f",0,function(e){return e.installed&&e.updateSupported&&(e.updateAvailable||!e.latestVersion)}])},79432,e=>{"use strict";var a=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 s=(0,a.f)(r);e.s(["f",0,s],79432)},75775,e=>{"use strict";var a=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 s=(0,a.f)(r);e.s(["f",0,s],75775)}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,87027,e=>{"use strict";var t=e.i(43476),r=e.i(71645),s=e.i(93999),a=e.i(68759),i=e.i(46670),n=e.i(32568),l=e.i(82983),c=e.i(4050),o=e.i(71417),d=e.i(41120),x=e.i(26091),p=e.i(49882),m=e.i(63376);function u(){return new Date().toISOString().slice(0,10)}function h(e){if("string"==typeof e)try{return JSON.parse(e)}catch{return{raw:e}}return e??{}}function g(e){return e.includes("delete")||e.includes("decommission")||e.includes("cancel")?"danger":e.includes("create")||e.includes("register")||e.includes("deploy")||e.includes("push")?"success":e.includes("update")||e.includes("assign")?"warning":"info"}e.s(["default",0,function({initialEvents:e,initialDays:f}){let{activeNode:b}=(0,c.l)(),[v,j]=(0,r.useState)(e),[N,w]=(0,r.useState)(!1),[y,k]=(0,r.useState)("unverified"),[_,I]=(0,r.useState)(null),[T,E]=(0,r.useState)(f),[C,S]=(0,r.useState)(u()),[M,A]=(0,r.useState)(!0),O=(0,r.useCallback)(async()=>{try{let e=(await l.f.audit.days()).data;E(e)}catch{}},[]),D=(0,r.useCallback)(async e=>{try{w(!0);let t=await l.f.audit.list({pageSize:200,date:e});j(t.data);let r=t.meta;k(r?.verification?.state??"unverified")}catch{k("unverified")}finally{w(!1)}},[]);(0,r.useEffect)(()=>{M&&A(!1),O(),D(C)},[b.id]),(0,r.useEffect)(()=>{M||D(C)},[C]);let L=_?h(_.details):{},$=T.includes(u())?T:[u(),...T];return(0,t.jsxs)(m.U,{className:"space-y-6",children:[(0,t.jsx)(m.z,{children:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:"text-lg font-bold uppercase tracking-wider",children:"Audit Log"}),(0,t.jsx)("p",{className:"mt-1 text-[11px] text-text-muted uppercase tracking-wider",children:"Fleet actions with verified or explicitly partial legacy integrity"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(p.f,{className:"h-4 w-4 text-primary/60"}),(0,t.jsx)("select",{"aria-label":"Audit day",value:C,onChange:e=>{S(e.target.value)},className:"rounded border border-border bg-bg px-3 py-1.5 text-xs text-text focus:border-primary focus:outline-none focus:shadow-[0_0_8px_var(--color-glow)] transition-all",children:$.map(e=>(0,t.jsx)("option",{value:e,children:e===u()?`Today (${e})`:e},e))})]}),(0,t.jsx)(a.K,{variant:"secondary",size:"sm",icon:(0,t.jsx)(d.f,{className:"h-3.5 w-3.5"}),onClick:()=>{O(),D(C)},children:"Refresh"})]})]})}),(0,t.jsx)(m.z,{children:(0,t.jsxs)(s.N,{children:[(0,t.jsxs)("p",{role:"status",className:"mb-4 text-xs",children:["Chain: ",y,". Legacy partial signatures do not protect targets, details, actor type or IP address."]}),N?(0,t.jsx)("div",{className:"py-8 text-center text-[11px] text-text-muted",children:"Loading audit trail…"}):0===v.length?(0,t.jsxs)("div",{className:"py-8 text-center text-[11px] text-text-muted",children:["No audit events for ",C,"."]}):(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)("table",{className:"w-full text-[11px]",children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{className:"border-b border-primary/20 text-left text-[10px] font-bold uppercase tracking-[0.15em] text-text-muted",children:[(0,t.jsx)("th",{className:"pb-3 pr-4",children:"Timestamp"}),(0,t.jsx)("th",{className:"pb-3 pr-4",children:"Action"}),(0,t.jsx)("th",{className:"pb-3 pr-4",children:"Actor"}),(0,t.jsx)("th",{className:"pb-3 pr-4",children:"Target"}),(0,t.jsx)("th",{className:"pb-3",children:"Integrity"}),(0,t.jsx)("th",{className:"pb-3",children:"Details"})]})}),(0,t.jsx)("tbody",{className:"divide-y divide-border/50",children:v.map(e=>(0,t.jsxs)("tr",{className:"hover:bg-surface-hover cursor-pointer transition-colors",onClick:()=>I(e),children:[(0,t.jsx)("td",{className:"py-3 pr-4 text-text-muted",children:(0,o.C)(e.timestamp)}),(0,t.jsx)("td",{className:"py-3 pr-4",children:(0,t.jsx)(i.t,{variant:g(e.action),children:e.action})}),(0,t.jsxs)("td",{className:"py-3 pr-4 text-text-muted",children:[(0,t.jsxs)("span",{className:"text-[11px]",children:[e.actorId.slice(0,10),"…"]}),(0,t.jsxs)("span",{className:"ml-1 text-[10px]",children:["(",e.actorType,")"]})]}),(0,t.jsxs)("td",{className:"py-3 pr-4 text-text-muted",children:[e.targetType,":",e.targetId.slice(0,10)]}),(0,t.jsx)("td",{children:e.verificationState??"unverified"}),(0,t.jsx)("td",{className:"max-w-[200px] truncate py-3 text-[11px] text-text-muted",children:JSON.stringify("string"==typeof e.details?h(e.details):e.details)})]},e.id))})]})})]})}),(0,t.jsx)(n.n,{open:!!_,onClose:()=>I(null),title:"Audit Event",description:_?.action??"",icon:(0,t.jsx)(x.f,{className:"h-5 w-5 text-primary"}),className:"max-w-2xl",children:_&&(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,t.jsxs)("div",{className:"rounded border border-border bg-bg p-3",children:[(0,t.jsx)("p",{className:"text-[10px] font-bold uppercase tracking-wider text-text-muted mb-1",children:"Action"}),(0,t.jsx)(i.t,{variant:g(_.action),children:_.action})]}),(0,t.jsxs)("div",{className:"rounded border border-border bg-bg p-3",children:[(0,t.jsx)("p",{className:"text-[10px] font-bold uppercase tracking-wider text-text-muted mb-1",children:"Timestamp"}),(0,t.jsx)("p",{className:"text-xs",children:(0,o.C)(_.timestamp)})]}),(0,t.jsxs)("div",{className:"rounded border border-border bg-bg p-3",children:[(0,t.jsx)("p",{className:"text-[10px] font-bold uppercase tracking-wider text-text-muted mb-1",children:"Actor"}),(0,t.jsx)("p",{className:"text-xs",children:_.actorId}),(0,t.jsx)("p",{className:"text-[10px] text-text-muted",children:_.actorType})]}),(0,t.jsxs)("div",{className:"rounded border border-border bg-bg p-3",children:[(0,t.jsx)("p",{className:"text-[10px] font-bold uppercase tracking-wider text-text-muted mb-1",children:"Target"}),(0,t.jsx)("p",{className:"text-xs",children:_.targetId}),(0,t.jsx)("p",{className:"text-[10px] text-text-muted",children:_.targetType})]})]}),(0,t.jsxs)("div",{className:"rounded border border-border bg-bg p-3",children:[(0,t.jsx)("p",{className:"text-[10px] font-bold uppercase tracking-wider text-text-muted mb-1",children:"Event ID"}),(0,t.jsx)("p",{className:"text-xs text-text-muted",children:_.id})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-[10px] font-bold uppercase tracking-wider text-text-muted mb-2",children:"Details"}),0===Object.keys(L).length?(0,t.jsx)("p",{className:"text-[11px] text-text-muted italic",children:"No additional details"}):(0,t.jsx)("div",{className:"rounded border border-border bg-bg p-3 space-y-2",children:Object.entries(L).map(([e,r])=>(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)("span",{className:"text-[11px] font-bold text-primary min-w-[100px] shrink-0",children:e}),(0,t.jsx)("span",{className:"text-[11px] text-text-muted break-all",children:"object"==typeof r?JSON.stringify(r,null,2):String(r)})]},e))})]}),(0,t.jsx)("div",{className:"flex justify-end pt-2",children:(0,t.jsx)(a.K,{variant:"secondary",size:"sm",onClick:()=>I(null),children:"Close"})})]})})]})}])},46670,e=>{"use strict";var t=e.i(43476),r=e.i(78571);let s={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:i="default",className:n,dot:l=!1,pulse:c=!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",s[i],n),children:[l&&(0,t.jsxs)("span",{"aria-hidden":"true",className:"relative inline-flex h-1.5 w-1.5",children:[c&&(0,t.jsx)("span",{className:(0,r.f)("absolute inset-0 rounded-full animate-halo",a[i])}),(0,t.jsx)("span",{className:(0,r.f)("relative inline-flex h-1.5 w-1.5 rounded-full",a[i])})]}),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 s={name:"arrow-down-right",size:24,node:[["path",{d:"m7 7 10 10",key:"1fmybs"}],["path",{d:"M17 7v10H7",key:"6fjiku"}]]};s.node;let a=(0,r.f)(s);var i=e.i(75775),n=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:r=100,tone:s,thresholds:a=c.q,label:i,size:l="xs",showValue:p=!1,valueLabel:m,glow:u,className:h,testId:g}){let f="number"==typeof e&&Number.isFinite(e),b=f?Math.max(0,Math.min(100,e/(r||1)*100)):0,v=s??(f?(0,c.Z)(b,a):"muted"),j=u||!s&&f&&b>=a.warn,N=m??(f?`${b.toFixed(+(b<10&&b>0))}%`:"—");return(0,t.jsxs)("div",{className:(0,n.f)("flex min-w-0 items-center gap-2",h),"data-testid":g,children:[(0,t.jsx)("div",{...f?{role:"meter","aria-label":i,"aria-valuemin":0,"aria-valuemax":r,"aria-valuenow":e,"aria-valuetext":N}:{role:"img","aria-label":i?`${i}: no data`:"No data"},className:(0,n.f)("relative flex-1 overflow-hidden rounded-full bg-border/70",d[l]),children:(0,t.jsx)("div",{style:{"--meter":`${b}%`},className:(0,n.f)("h-full w-(--meter) rounded-full transition-[width] duration-700 ease-out-expo starting:w-0",c.H[v],j&&o[v])})}),p&&(0,t.jsx)("span",{className:(0,n.f)("num w-11 shrink-0 text-right text-[11px]",f?c.T[v]:"text-text-muted"),children:N})]})}e.s(["f",0,x],51196);var p=e.i(71645);function m({values:e,tone:r="primary",width:s=160,height:a=32,area:i=!0,max:l,percent:o=!1,threshold:d,live:x=!0,emptyLabel:u="not enough data",className:h,testId:g,label:f,stretch:b=!1}){let v=`spark${(0,p.useId)().replace(/:/g,"")}`;if(e.length<2)return(0,t.jsx)("div",{className:(0,n.f)("flex h-8 items-center text-xs italic text-text-muted",h),"data-testid":g,children:u});let j=c.v[r],N=l??(o?Math.max(100,...e):Math.max(...e,d??0)||1),w=a-4,y=s/(e.length-1),k=e=>2+w-Math.max(0,e)/N*w,_=e.map((e,t)=>[t*y,k(e)]),I=_.map(([e,t])=>`${e.toFixed(1)},${t.toFixed(1)}`).join(" "),T=_[_.length-1];return(0,t.jsxs)("svg",{width:b?"100%":s,height:a,viewBox:`0 0 ${s} ${a}`,preserveAspectRatio:b?"none":void 0,className:(0,n.f)("block overflow-visible",h),"data-testid":g,role:f?"img":void 0,"aria-label":f,"aria-hidden":!f||void 0,children:[i&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("defs",{children:(0,t.jsxs)("linearGradient",{id:v,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} ${s},${a}`,fill:`url(#${v})`})]}),void 0!==d&&(0,t.jsx)("line",{x1:0,x2:s,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:I}),x&&!b&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("circle",{cx:T[0],cy:T[1],r:2.5,fill:j,className:"origin-center animate-halo [transform-box:fill-box]"}),(0,t.jsx)("circle",{cx:T[0],cy:T[1],r:2,fill:j})]})]})}e.s(["f",0,m],55427),e.s(["N",0,function({title:e,description:r,children:s,className:a,action:i,tone:n,corners:c=!1,...o}){return(0,t.jsx)(l.f,{...o,tone:n,corners:c,title:e,description:r,action:i,className:a,children:s})},"n",0,function({label:e,value:r,icon:s,trend:o,spark:d,meter:p,delta:u,tone:h="primary",className:g,testId:f}){let b=!u||u.value>=0===(u.positiveIsGood??!0);return(0,t.jsxs)(l.f,{tone:h,className:(0,n.f)("overflow-hidden",g),testId:f,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}),s&&(0,t.jsx)("span",{className:"text-primary/60",children:s})]}),(0,t.jsxs)("div",{className:"mt-2 flex items-end justify-between gap-2",children:[(0,t.jsx)("div",{className:(0,n.f)("num text-2xl font-bold","primary"===h?"text-primary neon-text":c.T[h]),children:r}),u&&0!==u.value&&(0,t.jsxs)("span",{className:(0,n.f)("num mb-1 inline-flex items-center gap-0.5 text-[11px]",b?"text-success":"text-danger"),children:[u.value>0?(0,t.jsx)(i.f,{className:"h-3 w-3"}):(0,t.jsx)(a,{className:"h-3 w-3"}),Math.abs(u.value).toFixed(+!Number.isInteger(u.value)),u.unit]})]}),o&&(0,t.jsx)("div",{className:(0,n.f)("mt-1 text-[11px]",o.positive?"text-success":"text-danger"),children:o.value}),void 0!==p&&(0,t.jsx)(x,{value:p,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:h,width:240,height:28,stretch:!0,live:!1})})]})}],93999)},3062,e=>{"use strict";var t=e.i(43476),r=e.i(78571),s=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)]"},i={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)]"},n={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:p,icon:m,action:u,as:h="div",padding:g="md",testId:f,className:b,children:v,...j}){return(0,t.jsxs)(h,{...j,"data-testid":f??j["data-testid"],className:(0,r.f)("relative rounded-panel border border-border bg-surface transition-colors duration-300",l[g],c&&"panel-corners",c&&a[e],o&&"glow-hover",o&&i[e],o&&n[e],d&&"grid-bg overflow-hidden bg-surface/80",b),children:[(x||u||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,r.f)("mt-0.5 shrink-0",s.T[e]),children:m}),(0,t.jsxs)("div",{className:"min-w-0",children:[x&&(0,t.jsx)("h3",{className:"text-xs font-bold uppercase tracking-wider",children:x}),p&&(0,t.jsx)("p",{className:"mt-0.5 text-[11px] text-text-muted",children:p})]})]}),u]}),v]})}])},63376,e=>{"use strict";var t=e.i(43476);e.s(["z",0,function({children:e,className:r}){return(0,t.jsx)("div",{className:`animate-page-in${r?` ${r}`:""}`,children:e})},"U",0,function({children:e,className:r}){return(0,t.jsx)("div",{className:r,children:e})}])},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"}):"—"}])},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 s=(0,t.f)(r);e.s(["f",0,s],75775)},49882,e=>{"use strict";var t=e.i(56420);let r={name:"calendar",size:24,node:[["path",{d:"M8 2v3",key:"1ioesn"}],["path",{d:"M16 2v3",key:"otl347"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}],["path",{d:"M3 9h18",key:"1pudct"}]]};r.node;let s=(0,t.f)(r);e.s(["f",0,s],49882)}]);
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,67617,e=>{"use strict";var t=e.i(43476),r=e.i(71645),s=e.i(22016),a=e.i(79432),n=e.i(71567),i=e.i(9584),l=e.i(90985),o=e.i(9041),c=e.i(41220),d=e.i(82303),x=e.i(82983),m=e.i(93999),h=e.i(46670),u=e.i(63376);function p(e){return e?new Date(e).toLocaleString():"never"}function g(e){return"not_installed"!==e.status}function f({label:e,detail:r,href:a,icon:n}){return(0,t.jsxs)(s.default,{href:a,className:"group flex min-h-24 items-start gap-3 rounded border border-border/50 bg-surface px-4 py-3 transition-all hover:border-accent/50 hover:bg-bg/70",children:[(0,t.jsx)("span",{className:"mt-0.5 text-accent/70 group-hover:text-accent",children:n}),(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"block text-xs font-bold uppercase tracking-wider text-text group-hover:text-accent",children:e}),(0,t.jsx)("span",{className:"mt-1 block text-[11px] leading-5 text-text-muted",children:r})]})]})}e.s(["default",0,function(){let[e,v]=(0,r.useState)([]),[b,j]=(0,r.useState)([]),[w,N]=(0,r.useState)(!0),[y,k]=(0,r.useState)("");(0,r.useEffect)(()=>{let e=!0;async function t(r=!1){r&&N(!0),k("");try{let[t,r]=await Promise.all([x.f.hermes.installations(),x.f.hermes.profiles()]);if(!e)return;v(t.data??[]),j(r.data??[])}catch(t){e&&k(t instanceof Error?t.message:"Failed to load Hermes Agent inventory")}finally{e&&N(!1)}}t(!0);let r=window.setInterval(()=>void t(),3e4);return()=>{e=!1,window.clearInterval(r)}},[]);let _=(0,r.useMemo)(()=>{let e=new Map;for(let t of b)e.set(t.installationId,[...e.get(t.installationId)??[],t]);return e},[b]),I=(0,r.useMemo)(()=>e.filter(g),[e]),E=(0,r.useMemo)(()=>new Set(I.map(e=>e.id)),[I]),S=b.filter(e=>E.has(e.installationId)).filter(e=>"running"===e.gatewayStatus).length,M=I.filter(e=>"running"===e.status||"detected"===e.status).length,$=I.filter(e=>"running"===e.dashboardStatus).length;return(0,t.jsxs)(u.U,{className:"space-y-6",children:[(0,t.jsx)(u.z,{children:(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:"text-lg font-bold uppercase tracking-wider text-primary",children:"Hermes Agents"}),(0,t.jsx)("p",{className:"mt-1 text-[11px] uppercase tracking-wider text-text-muted",children:w?"Loading inventory...":`${I.length} detected installation${1===I.length?"":"s"} \xb7 latest sync ${p(I[0]?.lastSyncedAt??null)}`})]}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsxs)(s.default,{href:"/orchestra/installations",className:"inline-flex h-8 items-center justify-center gap-2 rounded border border-border bg-surface px-3 text-[11px] font-medium uppercase tracking-wider text-text-muted transition-all hover:border-primary/40 hover:text-text",children:[(0,t.jsx)(c.f,{className:"h-3.5 w-3.5"}),"Installations"]}),(0,t.jsxs)(s.default,{href:"/orchestra/web-gateway",className:"inline-flex h-8 items-center justify-center gap-2 rounded border border-primary/60 bg-primary/10 px-3 text-[11px] font-medium uppercase tracking-wider text-primary transition-all hover:border-primary hover:bg-primary/20",children:[(0,t.jsx)(o.f,{className:"h-3.5 w-3.5"}),"Dashboard"]})]})]})}),y&&(0,t.jsx)("div",{className:"rounded border border-danger/30 bg-danger/10 p-4 text-xs text-danger",children:y}),(0,t.jsx)(u.z,{children:(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-4",children:[(0,t.jsx)(m.n,{label:"Installations",value:I.length,icon:(0,t.jsx)(c.f,{className:"h-4 w-4"})}),(0,t.jsx)(m.n,{label:"Healthy Installs",value:M,icon:(0,t.jsx)(a.f,{className:"h-4 w-4"})}),(0,t.jsx)(m.n,{label:"Dashboard Tunnels",value:$,icon:(0,t.jsx)(o.f,{className:"h-4 w-4"})}),(0,t.jsx)(m.n,{label:"Running Gateways",value:S,icon:(0,t.jsx)(n.f,{className:"h-4 w-4"})})]})}),(0,t.jsx)(u.z,{children:(0,t.jsxs)("div",{className:"grid gap-3 md:grid-cols-3",children:[(0,t.jsx)(f,{label:"Installations",detail:"Survey Hermes Agent runtime, home, version, and service posture.",href:"/orchestra/installations",icon:(0,t.jsx)(c.f,{className:"h-4 w-4"})}),(0,t.jsx)(f,{label:"Profiles",detail:"Review discovered profiles and their running configuration snapshots.",href:"/orchestra/profiles",icon:(0,t.jsx)(d.f,{className:"h-4 w-4"})}),(0,t.jsx)(f,{label:"Web Gateway",detail:"Open the selected Hermes dashboard frame for inspection.",href:"/orchestra/web-gateway",icon:(0,t.jsx)(l.f,{className:"h-4 w-4"})})]})}),(0,t.jsx)(u.z,{children:(0,t.jsx)(m.N,{title:"Installation Inventory",description:"Runtime, dashboard, gateway, and profile posture",children:(0,t.jsxs)("div",{className:"space-y-3",children:[I.map(e=>{let r=_.get(e.id)??e.profiles??[];return(0,t.jsxs)("div",{className:"rounded border border-border/50 bg-bg/50 p-3",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-sm font-medium text-text",children:e.displayName??e.hostname}),(0,t.jsxs)("p",{className:"mt-1 font-mono text-[10px] text-text-muted",children:[e.hostname," · ",e.hermesHome]})]}),(0,t.jsx)(h.t,{variant:(0,h.k)(e.status),children:e.status})]}),(0,t.jsxs)("div",{className:"mt-3 grid gap-2 text-[11px] text-text-muted sm:grid-cols-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"block uppercase tracking-wider text-text-muted/70",children:"Version"}),(0,t.jsx)("span",{className:"font-mono text-text",children:e.version??"unknown"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"block uppercase tracking-wider text-text-muted/70",children:"Dashboard"}),(0,t.jsx)(h.t,{variant:(0,h.k)(e.dashboardStatus),children:e.dashboardStatus})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"block uppercase tracking-wider text-text-muted/70",children:"Gateway"}),(0,t.jsx)(h.t,{variant:(0,h.k)(e.gatewayStatus),children:e.gatewayStatus})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"block uppercase tracking-wider text-text-muted/70",children:"Profiles"}),(0,t.jsx)("span",{className:"text-text",children:r.length})]})]}),(0,t.jsxs)("div",{className:"mt-3 flex flex-wrap items-center gap-2",children:[(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 rounded border border-border px-2 py-1 font-mono text-[10px] text-text-muted",children:[(0,t.jsx)(o.f,{className:"h-3 w-3"}),`127.0.0.1:${e.dashboardPort} on ${e.hostname}`]}),(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 rounded border border-border px-2 py-1 text-[10px] text-text-muted",children:[(0,t.jsx)(i.f,{className:"h-3 w-3"}),"synced ",p(e.lastSyncedAt)]}),(0,t.jsx)(s.default,{className:"text-[10px] font-bold uppercase tracking-wider text-accent hover:underline",href:`/orchestra/web-gateway?installationId=${encodeURIComponent(e.id)}`,children:"Gateway"})]})]},e.id)}),!w&&0===I.length&&(0,t.jsx)("p",{className:"text-xs text-text-muted",children:"No Hermes installations detected yet."})]})})})]})}])},46670,e=>{"use strict";var t=e.i(43476),r=e.i(78571);let s={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,r.f)("inline-flex items-center gap-1.5 rounded-chip border px-2 py-0.5 text-[10px] font-bold uppercase tracking-wider",s[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",a[n])}),(0,t.jsx)("span",{className:(0,r.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),r=e.i(56420);let s={name:"arrow-down-right",size:24,node:[["path",{d:"m7 7 10 10",key:"1fmybs"}],["path",{d:"M17 7v10H7",key:"6fjiku"}]]};s.node;let a=(0,r.f)(s);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 x({value:e,max:r=100,tone:s,thresholds:a=o.q,label:n,size:l="xs",showValue:m=!1,valueLabel:h,glow:u,className:p,testId:g}){let f="number"==typeof e&&Number.isFinite(e),v=f?Math.max(0,Math.min(100,e/(r||1)*100)):0,b=s??(f?(0,o.Z)(v,a):"muted"),j=u||!s&&f&&v>=a.warn,w=h??(f?`${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":g,children:[(0,t.jsx)("div",{role:"meter","aria-label":n,"aria-valuemin":0,"aria-valuemax":r,"aria-valuenow":f?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])})}),m&&(0,t.jsx)("span",{className:(0,i.f)("num w-11 shrink-0 text-right text-[11px]",f?o.T[b]:"text-text-muted"),children:w})]})}e.s(["f",0,x],51196);var m=e.i(71645);function h({values:e,tone:r="primary",width:s=160,height:a=32,area:n=!0,max:l,percent:c=!1,threshold:d,live:x=!0,emptyLabel:u="not enough data",className:p,testId:g,label:f,stretch:v=!1}){let b=`spark${(0,m.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":g,children:u});let j=o.v[r],w=l??(c?Math.max(100,...e):Math.max(...e,d??0)||1),N=a-4,y=s/(e.length-1),k=e=>2+N-Math.max(0,e)/w*N,_=e.map((e,t)=>[t*y,k(e)]),I=_.map(([e,t])=>`${e.toFixed(1)},${t.toFixed(1)}`).join(" "),E=_[_.length-1];return(0,t.jsxs)("svg",{width:v?"100%":s,height:a,viewBox:`0 0 ${s} ${a}`,preserveAspectRatio:v?"none":void 0,className:(0,i.f)("block overflow-visible",p),"data-testid":g,role:f?"img":void 0,"aria-label":f,"aria-hidden":!f||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} ${s},${a}`,fill:`url(#${b})`})]}),void 0!==d&&(0,t.jsx)("line",{x1:0,x2:s,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:I}),x&&!v&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("circle",{cx:E[0],cy:E[1],r:2.5,fill:j,className:"origin-center animate-halo [transform-box:fill-box]"}),(0,t.jsx)("circle",{cx:E[0],cy:E[1],r:2,fill:j})]})]})}e.s(["f",0,h],55427),e.s(["N",0,function({title:e,description:r,children:s,className:a,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:a,children:s})},"n",0,function({label:e,value:r,icon:s,trend:c,spark:d,meter:m,delta:u,tone:p="primary",className:g,testId:f}){let v=!u||u.value>=0===(u.positiveIsGood??!0);return(0,t.jsxs)(l.f,{tone:p,className:(0,i.f)("overflow-hidden",g),testId:f,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}),s&&(0,t.jsx)("span",{className:"text-primary/60",children:s})]}),(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:r}),u&&0!==u.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:[u.value>0?(0,t.jsx)(n.f,{className:"h-3 w-3"}):(0,t.jsx)(a,{className:"h-3 w-3"}),Math.abs(u.value).toFixed(+!Number.isInteger(u.value)),u.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!==m&&(0,t.jsx)(x,{value:m,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:p,width:240,height:28,stretch:!0,live:!1})})]})}],93999)},3062,e=>{"use strict";var t=e.i(43476),r=e.i(78571),s=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:x,description:m,icon:h,action:u,as:p="div",padding:g="md",testId:f,className:v,children:b,...j}){return(0,t.jsxs)(p,{...j,"data-testid":f??j["data-testid"],className:(0,r.f)("relative rounded-panel border border-border bg-surface transition-colors duration-300",l[g],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:[(x||u||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",s.T[e]),children:h}),(0,t.jsxs)("div",{className:"min-w-0",children:[x&&(0,t.jsx)("h3",{className:"text-xs font-bold uppercase tracking-wider",children:x}),m&&(0,t.jsx)("p",{className:"mt-0.5 text-[11px] text-text-muted",children:m})]})]}),u]}),b]})}])},63376,e=>{"use strict";var t=e.i(43476);e.s(["z",0,function({children:e,className:r}){return(0,t.jsx)("div",{className:`animate-page-in${r?` ${r}`:""}`,children:e})},"U",0,function({children:e,className:r}){return(0,t.jsx)("div",{className:r,children:e})}])},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 s=(0,t.f)(r);e.s(["f",0,s],79432)},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 s=(0,t.f)(r);e.s(["f",0,s],75775)},9041,e=>{"use strict";var t=e.i(56420);let r={name:"monitor-dot",size:24,node:[["path",{d:"M12 17v4",key:"1riwvh"}],["path",{d:"M22 12.307V15a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h8.693",key:"1dx6ho"}],["path",{d:"M8 21h8",key:"1ev6f3"}],["circle",{cx:"19",cy:"6",r:"3",key:"108a5v"}]]};r.node;let s=(0,t.f)(r);e.s(["f",0,s],9041)}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,67617,e=>{"use strict";var t=e.i(43476),r=e.i(71645),a=e.i(22016),s=e.i(79432),n=e.i(71567),i=e.i(9584),l=e.i(90985),o=e.i(9041),c=e.i(41220),d=e.i(82303),x=e.i(82983),m=e.i(93999),h=e.i(46670),u=e.i(63376);function p(e){return e?new Date(e).toLocaleString():"never"}function g(e){return"not_installed"!==e.status}function f({label:e,detail:r,href:s,icon:n}){return(0,t.jsxs)(a.default,{href:s,className:"group flex min-h-24 items-start gap-3 rounded border border-border/50 bg-surface px-4 py-3 transition-all hover:border-accent/50 hover:bg-bg/70",children:[(0,t.jsx)("span",{className:"mt-0.5 text-accent/70 group-hover:text-accent",children:n}),(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"block text-xs font-bold uppercase tracking-wider text-text group-hover:text-accent",children:e}),(0,t.jsx)("span",{className:"mt-1 block text-[11px] leading-5 text-text-muted",children:r})]})]})}e.s(["default",0,function(){let[e,v]=(0,r.useState)([]),[b,j]=(0,r.useState)([]),[w,N]=(0,r.useState)(!0),[y,k]=(0,r.useState)("");(0,r.useEffect)(()=>{let e=!0;async function t(r=!1){r&&N(!0),k("");try{let[t,r]=await Promise.all([x.f.hermes.installations(),x.f.hermes.profiles()]);if(!e)return;v(t.data??[]),j(r.data??[])}catch(t){e&&k(t instanceof Error?t.message:"Failed to load Hermes Agent inventory")}finally{e&&N(!1)}}t(!0);let r=window.setInterval(()=>void t(),3e4);return()=>{e=!1,window.clearInterval(r)}},[]);let _=(0,r.useMemo)(()=>{let e=new Map;for(let t of b)e.set(t.installationId,[...e.get(t.installationId)??[],t]);return e},[b]),I=(0,r.useMemo)(()=>e.filter(g),[e]),E=(0,r.useMemo)(()=>new Set(I.map(e=>e.id)),[I]),S=b.filter(e=>E.has(e.installationId)).filter(e=>"running"===e.gatewayStatus).length,M=I.filter(e=>"running"===e.status||"detected"===e.status).length,$=I.filter(e=>"running"===e.dashboardStatus).length;return(0,t.jsxs)(u.U,{className:"space-y-6",children:[(0,t.jsx)(u.z,{children:(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:"text-lg font-bold uppercase tracking-wider text-primary",children:"Hermes Agents"}),(0,t.jsx)("p",{className:"mt-1 text-[11px] uppercase tracking-wider text-text-muted",children:w?"Loading inventory...":`${I.length} detected installation${1===I.length?"":"s"} \xb7 latest sync ${p(I[0]?.lastSyncedAt??null)}`})]}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsxs)(a.default,{href:"/orchestra/installations",className:"inline-flex h-8 items-center justify-center gap-2 rounded border border-border bg-surface px-3 text-[11px] font-medium uppercase tracking-wider text-text-muted transition-all hover:border-primary/40 hover:text-text",children:[(0,t.jsx)(c.f,{className:"h-3.5 w-3.5"}),"Installations"]}),(0,t.jsxs)(a.default,{href:"/orchestra/web-gateway",className:"inline-flex h-8 items-center justify-center gap-2 rounded border border-primary/60 bg-primary/10 px-3 text-[11px] font-medium uppercase tracking-wider text-primary transition-all hover:border-primary hover:bg-primary/20",children:[(0,t.jsx)(o.f,{className:"h-3.5 w-3.5"}),"Dashboard"]})]})]})}),y&&(0,t.jsx)("div",{className:"rounded border border-danger/30 bg-danger/10 p-4 text-xs text-danger",children:y}),(0,t.jsx)(u.z,{children:(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-4",children:[(0,t.jsx)(m.n,{label:"Installations",value:I.length,icon:(0,t.jsx)(c.f,{className:"h-4 w-4"})}),(0,t.jsx)(m.n,{label:"Healthy Installs",value:M,icon:(0,t.jsx)(s.f,{className:"h-4 w-4"})}),(0,t.jsx)(m.n,{label:"Dashboard Tunnels",value:$,icon:(0,t.jsx)(o.f,{className:"h-4 w-4"})}),(0,t.jsx)(m.n,{label:"Running Gateways",value:S,icon:(0,t.jsx)(n.f,{className:"h-4 w-4"})})]})}),(0,t.jsx)(u.z,{children:(0,t.jsxs)("div",{className:"grid gap-3 md:grid-cols-3",children:[(0,t.jsx)(f,{label:"Installations",detail:"Survey Hermes Agent runtime, home, version, and service posture.",href:"/orchestra/installations",icon:(0,t.jsx)(c.f,{className:"h-4 w-4"})}),(0,t.jsx)(f,{label:"Profiles",detail:"Review discovered profiles and their running configuration snapshots.",href:"/orchestra/profiles",icon:(0,t.jsx)(d.f,{className:"h-4 w-4"})}),(0,t.jsx)(f,{label:"Web Gateway",detail:"Open the selected Hermes dashboard frame for inspection.",href:"/orchestra/web-gateway",icon:(0,t.jsx)(l.f,{className:"h-4 w-4"})})]})}),(0,t.jsx)(u.z,{children:(0,t.jsx)(m.N,{title:"Installation Inventory",description:"Runtime, dashboard, gateway, and profile posture",children:(0,t.jsxs)("div",{className:"space-y-3",children:[I.map(e=>{let r=_.get(e.id)??e.profiles??[];return(0,t.jsxs)("div",{className:"rounded border border-border/50 bg-bg/50 p-3",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-sm font-medium text-text",children:e.displayName??e.hostname}),(0,t.jsxs)("p",{className:"mt-1 font-mono text-[10px] text-text-muted",children:[e.hostname," · ",e.hermesHome]})]}),(0,t.jsx)(h.t,{variant:(0,h.k)(e.status),children:e.status})]}),(0,t.jsxs)("div",{className:"mt-3 grid gap-2 text-[11px] text-text-muted sm:grid-cols-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"block uppercase tracking-wider text-text-muted/70",children:"Version"}),(0,t.jsx)("span",{className:"font-mono text-text",children:e.version??"unknown"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"block uppercase tracking-wider text-text-muted/70",children:"Dashboard"}),(0,t.jsx)(h.t,{variant:(0,h.k)(e.dashboardStatus),children:e.dashboardStatus})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"block uppercase tracking-wider text-text-muted/70",children:"Gateway"}),(0,t.jsx)(h.t,{variant:(0,h.k)(e.gatewayStatus),children:e.gatewayStatus})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"block uppercase tracking-wider text-text-muted/70",children:"Profiles"}),(0,t.jsx)("span",{className:"text-text",children:r.length})]})]}),(0,t.jsxs)("div",{className:"mt-3 flex flex-wrap items-center gap-2",children:[(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 rounded border border-border px-2 py-1 font-mono text-[10px] text-text-muted",children:[(0,t.jsx)(o.f,{className:"h-3 w-3"}),`127.0.0.1:${e.dashboardPort} on ${e.hostname}`]}),(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 rounded border border-border px-2 py-1 text-[10px] text-text-muted",children:[(0,t.jsx)(i.f,{className:"h-3 w-3"}),"synced ",p(e.lastSyncedAt)]}),(0,t.jsx)(a.default,{className:"text-[10px] font-bold uppercase tracking-wider text-accent hover:underline",href:`/orchestra/web-gateway?installationId=${encodeURIComponent(e.id)}`,children:"Gateway"})]})]},e.id)}),!w&&0===I.length&&(0,t.jsx)("p",{className:"text-xs text-text-muted",children:"No Hermes installations detected yet."})]})})})]})}])},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 x({value:e,max:r=100,tone:a,thresholds:s=o.q,label:n,size:l="xs",showValue:m=!1,valueLabel:h,glow:u,className:p,testId:g}){let f="number"==typeof e&&Number.isFinite(e),v=f?Math.max(0,Math.min(100,e/(r||1)*100)):0,b=a??(f?(0,o.Z)(v,s):"muted"),j=u||!a&&f&&v>=s.warn,w=h??(f?`${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":g,children:[(0,t.jsx)("div",{...f?{role:"meter","aria-label":n,"aria-valuemin":0,"aria-valuemax":r,"aria-valuenow":e,"aria-valuetext":w}:{role:"img","aria-label":n?`${n}: no data`:"No data"},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])})}),m&&(0,t.jsx)("span",{className:(0,i.f)("num w-11 shrink-0 text-right text-[11px]",f?o.T[b]:"text-text-muted"),children:w})]})}e.s(["f",0,x],51196);var m=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:x=!0,emptyLabel:u="not enough data",className:p,testId:g,label:f,stretch:v=!1}){let b=`spark${(0,m.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":g,children:u});let j=o.v[r],w=l??(c?Math.max(100,...e):Math.max(...e,d??0)||1),N=s-4,y=a/(e.length-1),k=e=>2+N-Math.max(0,e)/w*N,_=e.map((e,t)=>[t*y,k(e)]),I=_.map(([e,t])=>`${e.toFixed(1)},${t.toFixed(1)}`).join(" "),E=_[_.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",p),"data-testid":g,role:f?"img":void 0,"aria-label":f,"aria-hidden":!f||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} ${I} ${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:I}),x&&!v&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("circle",{cx:E[0],cy:E[1],r:2.5,fill:j,className:"origin-center animate-halo [transform-box:fill-box]"}),(0,t.jsx)("circle",{cx:E[0],cy:E[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:m,delta:u,tone:p="primary",className:g,testId:f}){let v=!u||u.value>=0===(u.positiveIsGood??!0);return(0,t.jsxs)(l.f,{tone:p,className:(0,i.f)("overflow-hidden",g),testId:f,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"===p?"text-primary neon-text":o.T[p]),children:r}),u&&0!==u.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:[u.value>0?(0,t.jsx)(n.f,{className:"h-3 w-3"}):(0,t.jsx)(s,{className:"h-3 w-3"}),Math.abs(u.value).toFixed(+!Number.isInteger(u.value)),u.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!==m&&(0,t.jsx)(x,{value:m,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:p,width:240,height:28,stretch:!0,live:!1})})]})}],93999)},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:x,description:m,icon:h,action:u,as:p="div",padding:g="md",testId:f,className:v,children:b,...j}){return(0,t.jsxs)(p,{...j,"data-testid":f??j["data-testid"],className:(0,r.f)("relative rounded-panel border border-border bg-surface transition-colors duration-300",l[g],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:[(x||u||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:[x&&(0,t.jsx)("h3",{className:"text-xs font-bold uppercase tracking-wider",children:x}),m&&(0,t.jsx)("p",{className:"mt-0.5 text-[11px] text-text-muted",children:m})]})]}),u]}),b]})}])},63376,e=>{"use strict";var t=e.i(43476);e.s(["z",0,function({children:e,className:r}){return(0,t.jsx)("div",{className:`animate-page-in${r?` ${r}`:""}`,children:e})},"U",0,function({children:e,className:r}){return(0,t.jsx)("div",{className:r,children:e})}])},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)},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)},9041,e=>{"use strict";var t=e.i(56420);let r={name:"monitor-dot",size:24,node:[["path",{d:"M12 17v4",key:"1riwvh"}],["path",{d:"M22 12.307V15a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h8.693",key:"1dx6ho"}],["path",{d:"M8 21h8",key:"1ev6f3"}],["circle",{cx:"19",cy:"6",r:"3",key:"108a5v"}]]};r.node;let a=(0,t.f)(r);e.s(["f",0,a],9041)}]);
@@ -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.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
+ (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",{...g?{role:"meter","aria-label":n,"aria-valuemin":0,"aria-valuemax":s,"aria-valuenow":e,"aria-valuetext":w}:{role:"img","aria-label":n?`${n}: no data`:"No data"},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)}}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,99594,e=>{"use strict";var t=e.i(43476),a=e.i(64971),s=e.i(71645),r=e.i(93999),i=e.i(68759),l=e.i(31624),n=e.i(32568),o=e.i(82983),d=e.i(56420);let c={name:"folder",size:24,node:[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]};c.node;let x=(0,d.f)(c);var m=e.i(26091);let h={name:"arrow-up",size:24,node:[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]};h.node;let p=(0,d.f)(h);var u=e.i(32781),f=e.i(49817),g=e.i(41120),b=e.i(89360),v=e.i(29600);let y={name:"file-image",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"}],["circle",{cx:"10",cy:"12",r:"2",key:"737tya"}],["path",{d:"m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22",key:"wt3hpn"}]]};y.node;let j=(0,d.f)(y),N={name:"file-archive",size:24,node:[["path",{d:"M13.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v11.5",key:"4pqfef"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M8 12v-1",key:"1ej8lb"}],["path",{d:"M8 18v-2",key:"qcmpov"}],["path",{d:"M8 7V6",key:"1nbb54"}],["circle",{cx:"8",cy:"20",r:"2",key:"ckkr5m"}]]};N.node;let w=(0,d.f)(N);function k({open:e,onClose:a,nodeId:r,currentPath:l,onSelect:d,runAsUser:c}){let[h,y]=(0,s.useState)(l||"~"),[N,C]=(0,s.useState)(""),[_,S]=(0,s.useState)([]),[z,M]=(0,s.useState)(!1),[$,E]=(0,s.useState)(null),L=(0,s.useCallback)(async e=>{if(r){M(!0),E(null);try{let t=`cd ${JSON.stringify(e)} 2>/dev/null || cd ~ ; echo "CWD:$(pwd)" ; ls -laF --time-style=long-iso 2>/dev/null || ls -laF 2>/dev/null`,a=c?`runuser -l ${c} -c ${"'"+t.replace(/'/g,"'\\''")+"'"}`:t,s=(await o.f.quickCommand.exec(r,{command:a,args:[],timeoutSeconds:10})).data;if(!s){E("Failed to list directory"),M(!1);return}if(0!==s.exitCode&&!s.stdout){E(s.stderr||`Failed to list directory (exit ${s.exitCode})`),M(!1);return}let i=s.stdout.split("\n").filter(Boolean),l=i.find(e=>e.startsWith("CWD:")),n=l?l.replace("CWD:","").trim():e;C(n),y(n);let d=[];for(let e of i){if(e.startsWith("CWD:")||e.startsWith("total "))continue;let t=e.split(/\s+/);if(t.length<8)continue;let a=t[0]??"",s=t[4]??"0",r=`${t[5]??""} ${t[6]??""}`,i=t.slice(7).join(" ");if(!i||"."===i||".."===i)continue;let l=a.startsWith("l"),n=l?i.split(" -> ")[0]??i:i,o=n.replace(/[/@*|]$/,""),c=n.endsWith("/")||l&&i.endsWith("/"),x=a.startsWith("d")||c;d.push({name:o,isDirectory:x,size:s,permissions:a,modified:r})}d.sort((e,t)=>e.isDirectory!==t.isDirectory?e.isDirectory?-1:1:e.name.localeCompare(t.name)),S(d)}catch(e){E(e instanceof Error?e.message:"Failed to browse files")}finally{M(!1)}}},[r,c]);(0,s.useEffect)(()=>{if(e&&r){let e=l||"~";y(e),L(e)}},[e,r]);let D=e=>{L("/"===N?`/${e}`:`${N}/${e}`)},F=e=>{d("/"===N?`/${e}`:`${N}/${e}`),a()};return e?(0,t.jsx)(n.n,{open:e,onClose:a,title:"Browse Files",description:N||h,icon:(0,t.jsx)(x,{className:"h-5 w-5 text-primary"}),className:"max-w-2xl",children:(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(i.K,{variant:"ghost",size:"sm",onClick:()=>{L(N.replace(/\/[^/]+\/?$/,"")||"/")},disabled:z||"/"===N,title:"Go up",children:(0,t.jsx)(p,{className:"h-4 w-4"})}),(0,t.jsx)(i.K,{variant:"ghost",size:"sm",onClick:()=>void L("~"),disabled:z,title:"Home directory",children:(0,t.jsx)(f.f,{className:"h-4 w-4"})}),(0,t.jsx)(i.K,{variant:"ghost",size:"sm",onClick:()=>void L(N||h),disabled:z,title:"Refresh",children:(0,t.jsx)(g.f,{className:`h-4 w-4 ${z?"animate-spin":""}`})}),(0,t.jsx)("div",{className:"flex-1 rounded border border-border bg-bg px-3 py-1.5 text-xs text-text-muted truncate",children:N||h})]}),$&&(0,t.jsx)("div",{className:"rounded bg-danger/10 border border-danger/30 p-3",children:(0,t.jsx)("p",{className:"text-xs text-danger",children:$})}),(0,t.jsx)("div",{className:"h-96 overflow-y-auto rounded border border-border",children:z?(0,t.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,t.jsx)(u.f,{className:"h-6 w-6 animate-spin text-text-muted"})}):0===_.length?(0,t.jsx)("div",{className:"py-8 text-center text-xs text-text-muted",children:"Empty directory"}):(0,t.jsxs)("table",{className:"w-full text-xs",children:[(0,t.jsx)("thead",{className:"sticky top-0 bg-surface z-10",children:(0,t.jsxs)("tr",{className:"border-b border-border text-[10px] font-bold uppercase tracking-[0.15em] text-text-muted",children:[(0,t.jsx)("th",{className:"px-3 py-2 text-left",children:"Name"}),(0,t.jsx)("th",{className:"px-3 py-2 text-right w-24",children:"Size"}),(0,t.jsx)("th",{className:"px-3 py-2 text-right w-40 hidden sm:table-cell",children:"Modified"})]})}),(0,t.jsx)("tbody",{children:_.map(e=>{var a;let s;return(0,t.jsxs)("tr",{className:"border-b border-border/50 hover:bg-surface-hover hover:shadow-[0_0_20px_var(--color-glow)] cursor-pointer transition-all",onClick:()=>e.isDirectory?D(e.name):F(e.name),onDoubleClick:()=>e.isDirectory?D(e.name):F(e.name),children:[(0,t.jsx)("td",{className:"px-3 py-2",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[function(e,a){if(a)return(0,t.jsx)(x,{className:"h-4 w-4 text-warning shrink-0"});let s=e.split(".").pop()?.toLowerCase()??"";return["ts","tsx","js","jsx","py","sh","json","yaml","yml","toml"].includes(s)?(0,t.jsx)(b.f,{className:"h-4 w-4 text-primary shrink-0"}):["png","jpg","jpeg","gif","svg","webp","ico"].includes(s)?(0,t.jsx)(j,{className:"h-4 w-4 text-accent shrink-0"}):["tar","gz","zip","bz2","xz","deb","rpm"].includes(s)?(0,t.jsx)(w,{className:"h-4 w-4 text-warning shrink-0"}):["md","txt","log","conf","cfg","ini","env"].includes(s)?(0,t.jsx)(m.f,{className:"h-4 w-4 text-success shrink-0"}):(0,t.jsx)(v.f,{className:"h-4 w-4 text-text-muted shrink-0"})}(e.name,e.isDirectory),(0,t.jsxs)("span",{className:e.isDirectory?"font-bold text-warning":"",children:[e.name,e.isDirectory?"/":""]})]})}),(0,t.jsx)("td",{className:"px-3 py-2 text-right text-xs text-text-muted",children:e.isDirectory?"—":isNaN(s=parseInt(a=e.size,10))?a:s<1024?`${s} B`:s<1048576?`${(s/1024).toFixed(1)} KB`:s<0x40000000?`${(s/1048576).toFixed(1)} MB`:`${(s/0x40000000).toFixed(1)} GB`}),(0,t.jsx)("td",{className:"px-3 py-2 text-right text-xs text-text-muted hidden sm:table-cell",children:e.modified})]},e.name)})})]})}),(0,t.jsx)("p",{className:"text-xs text-text-muted",children:"Click a folder to navigate into it. Click a file to select it."})]})}):null}var C=e.i(46670),_=e.i(71417),S=e.i(70533),z=e.i(66595),M=e.i(15170),$=e.i(5015),E=e.i(63676);function L({open:e,onClose:a,onSelect:r,title:l}){let[d,c]=(0,s.useState)([]),[x,h]=(0,s.useState)(""),[p,u]=(0,s.useState)(!1),f=(0,s.useCallback)(async()=>{u(!0);try{let e={pageSize:"100"};x&&(e.query=x);let t=await o.f.library.files.list(e);c(t.data)}catch{}finally{u(!1)}},[x]);(0,s.useEffect)(()=>{e&&f()},[e,f]),(0,s.useEffect)(()=>{if(!e)return;let t=setTimeout(()=>{f()},300);return()=>clearTimeout(t)},[x,e,f]);let g=async e=>{try{let t=(await o.f.library.files.get(e.id)).data;r({id:t.id,name:t.name,fileName:t.fileName,content:t.content}),a()}catch{}};return(0,t.jsx)(n.n,{open:e,onClose:a,title:l??"Load from Library",description:"Select a library file to load into the editor",icon:(0,t.jsx)(S.f,{className:"h-5 w-5 text-primary"}),className:"max-w-2xl",children:(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(z.f,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-muted"}),(0,t.jsx)("input",{type:"text",value:x,onChange:e=>h(e.target.value),placeholder:"Search library files…",className:"w-full rounded border border-border bg-bg py-2 pl-10 pr-4 text-xs text-text placeholder:text-text-muted focus:border-primary focus:outline-none focus:ring-1 focus:ring-primary focus:shadow-[0_0_8px_var(--color-glow)] transition-all",autoFocus:!0}),x&&(0,t.jsx)("button",{onClick:()=>h(""),className:"absolute right-3 top-1/2 -translate-y-1/2 text-text-muted hover:text-text",children:(0,t.jsx)(E.X,{className:"h-3.5 w-3.5"})})]}),(0,t.jsx)("div",{className:"max-h-80 overflow-y-auto rounded border border-border divide-y divide-border",children:p?(0,t.jsx)("div",{className:"py-8 text-center text-xs text-text-muted",children:"Loading…"}):0===d.length?(0,t.jsx)("div",{className:"py-8 text-center text-xs text-text-muted",children:x?"No files match your search":"No library files yet"}):d.map(e=>{var a,s;return(0,t.jsxs)("button",{onClick:()=>void g(e),className:"flex w-full items-center gap-3 px-4 py-3 text-left transition-all hover:bg-surface-hover hover:shadow-[0_0_20px_var(--color-glow)]",children:[(0,t.jsx)("div",{className:"flex h-8 w-8 items-center justify-center rounded bg-primary/10 text-primary shrink-0",children:(a=e.mimeType).startsWith("image/")?(0,t.jsx)(M.f,{className:"h-4 w-4"}):"application/json"===a?(0,t.jsx)($.f,{className:"h-4 w-4"}):"text/markdown"===a||"text/plain"===a?(0,t.jsx)(m.f,{className:"h-4 w-4"}):(0,t.jsx)(v.f,{className:"h-4 w-4"})}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-xs font-bold truncate",children:e.name}),(0,t.jsx)("span",{className:"text-xs text-text-muted",children:e.fileName})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 mt-0.5",children:[(0,t.jsx)(C.t,{children:{"text/markdown":"Markdown","text/plain":"Text","application/json":"JSON","application/pdf":"PDF","image/png":"PNG","image/jpeg":"JPEG","image/svg+xml":"SVG"}[s=e.mimeType]??s.split("/")[1]?.toUpperCase()??"File"}),(0,t.jsx)("span",{className:"text-xs text-text-muted",children:(0,_.L)(e.sizeBytes)}),e.category&&(0,t.jsx)("span",{className:"inline-flex items-center gap-1 rounded-full px-1.5 py-0.5 text-xs",style:{backgroundColor:`${e.category.color}20`,color:e.category.color},children:e.category.name})]})]}),(0,t.jsx)("span",{className:"text-xs text-text-muted shrink-0",children:(0,_.C)(e.updatedAt)})]},e.id)})}),(0,t.jsx)("div",{className:"flex justify-end pt-1",children:(0,t.jsx)(i.K,{variant:"secondary",size:"sm",onClick:a,children:"Cancel"})})]})})}function D({open:e,onClose:a,fileName:r,content:l,onSaved:d}){let[c,x]=(0,s.useState)(""),[m,h]=(0,s.useState)(!1),[p,u]=(0,s.useState)("");(0,s.useEffect)(()=>{e&&(x(r.replace(/\.[^/.]+$/,"")||""),u(""))},[e,r]);let f=async()=>{if(c.trim()){h(!0),u("");try{await o.f.library.files.create({name:c.trim(),fileName:r||`${c.trim()}.md`,mimeType:r.endsWith(".json")?"application/json":"text/markdown",content:l}),d(),a()}catch(e){u(e instanceof Error?e.message:"Failed to save to library")}finally{h(!1)}}};return(0,t.jsx)(n.n,{open:e,onClose:a,title:"Save to Library",description:"Save the current editor content as a library file",icon:(0,t.jsx)(S.f,{className:"h-5 w-5 text-primary"}),children:(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-[11px] font-bold uppercase tracking-wider text-text-muted mb-1.5",children:"Display Name"}),(0,t.jsx)("input",{type:"text",value:c,onChange:e=>x(e.target.value),placeholder:"e.g. SOUL",className:"w-full rounded border border-border bg-bg px-3 py-2 text-xs text-text placeholder:text-text-muted focus:border-primary focus:outline-none focus:ring-1 focus:ring-primary focus:shadow-[0_0_8px_var(--color-glow)] transition-all",autoFocus:!0})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-[11px] font-bold uppercase tracking-wider text-text-muted mb-1.5",children:"File Name"}),(0,t.jsx)("input",{type:"text",value:r,disabled:!0,className:"w-full rounded border border-border bg-bg px-3 py-2 text-xs text-text-muted"})]}),(0,t.jsxs)("p",{className:"text-xs text-text-muted",children:["Content size: ",(0,_.L)(new TextEncoder().encode(l).length)]}),p&&(0,t.jsx)("div",{className:"rounded border border-danger/30 bg-danger/10 px-3 py-2 text-xs text-danger",children:p}),(0,t.jsxs)("div",{className:"flex justify-end gap-2 pt-2",children:[(0,t.jsx)(i.K,{variant:"secondary",size:"sm",onClick:a,children:"Cancel"}),(0,t.jsx)(i.K,{size:"sm",onClick:()=>void f(),disabled:m||!c.trim(),children:m?"Saving…":"Save to Library"})]})]})})}var F=e.i(56522),I=e.i(62368),A=e.i(69644),T=e.i(56423),O=e.i(84026),P=e.i(63376);e.s(["default",0,function(){let[e,n]=(0,s.useState)(""),[d,c]=(0,s.useState)(""),[x,h]=(0,s.useState)(""),[p,f]=(0,s.useState)(!1),[g,b]=(0,s.useState)(!1),[v,y]=(0,s.useState)(null),[j,N]=(0,s.useState)(!1),[w,C]=(0,s.useState)(!1),[_,z]=(0,s.useState)(!1),[M,$]=(0,s.useState)(null),[E,B]=(0,s.useState)(!0),[U,K]=(0,s.useState)(null),G=async(e,t)=>{if(e&&"object"==typeof e&&"response"in e)try{let t=await (0,a.O)(e),s=t?.error&&"object"==typeof t.error?t.error?.message:void 0;if(s)return s;let r=t?.data;if(Array.isArray(r)){let e=r.filter(e=>"failed"===e.status);if(e.length>0)return e.map(e=>e.error||"Unknown error").join("; ")}}catch{}return e instanceof Error?"Failed to fetch"===e.message?"Control node unreachable":e.message:t},W=async t=>{let a=t??d;if(e&&a){f(!0),y(null);try{let t=(await o.f.files.read(e,a)).data;h(t.content)}catch(t){let e=await G(t,"Could not read file from node");y(`Read failed: ${e}`),h("")}finally{f(!1)}}},H=async()=>{if(e&&d){f(!0),b(!1),y(null);try{let t=(await o.f.files.update({nodeIds:[e],filePath:d,content:x,createIfMissing:!0,backup:E})).data,a=t?.filter(e=>"failed"===e.status)??[];if(a.length>0){let e=a.map(e=>e.error||"Unknown error").join("; ");y(`Push failed: ${e}`)}else b(!0),setTimeout(()=>b(!1),3e3)}catch(t){let e=await G(t,"Could not push file to node");y(`Push failed: ${e}`)}finally{f(!1)}}},R=async()=>{if(e&&d){f(!0),y(null),K(null);try{let t=await o.f.files.update({nodeIds:[e],filePath:d,content:x,createIfMissing:!0,backup:E,previewOnly:!0});K(t.data)}catch(t){let e=await G(t,"Could not preview file update");y(`Preview failed: ${e}`)}finally{f(!1)}}},V=async()=>{if(M&&x)try{await o.f.library.files.update(M,{content:x}),b(!0),setTimeout(()=>b(!1),3e3)}catch{z(!0)}else z(!0)};return(0,t.jsxs)(P.U,{className:"space-y-6",children:[(0,t.jsx)(P.z,{children:(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:"text-lg font-bold uppercase tracking-wider",children:"File Manager"}),(0,t.jsx)("p",{className:"mt-1 text-[11px] text-text-muted uppercase tracking-wider",children:"Read and update Magnus workspace files across nodes"})]})}),(0,t.jsx)(P.z,{children:(0,t.jsxs)(r.N,{title:"Target",children:[(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-3",children:[(0,t.jsx)(l.f,{value:e,onChange:e=>n(Array.isArray(e)?e[0]??"":e),label:"Node",placeholder:"Select a node…"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{id:"file-path-label",className:"mb-1 block text-[11px] font-bold uppercase tracking-wider text-text-muted",children:"File Path"}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>N(!0),disabled:!e,"aria-labelledby":"file-path-label file-path-value",className:"flex-1 flex items-center gap-2 rounded border border-border bg-bg px-3 py-2 text-left text-xs cursor-pointer hover:border-primary/40 hover:shadow-[0_0_8px_var(--color-glow)] transition-all disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,t.jsx)(m.f,{className:"h-3.5 w-3.5 text-text-muted shrink-0"}),(0,t.jsx)("span",{id:"file-path-value",className:d?"":"text-text-muted",children:d||"Browse to select a file…"})]}),(0,t.jsx)(i.K,{variant:"secondary",size:"sm",onClick:()=>N(!0),disabled:!e,title:"Browse files on node",children:(0,t.jsx)(A.f,{className:"h-4 w-4"})})]})]}),(0,t.jsx)("div",{className:"flex items-end gap-2",children:(0,t.jsxs)(i.K,{variant:"secondary",onClick:()=>void W(),disabled:p||!e||!d,children:[(0,t.jsx)(I.f,{className:"h-4 w-4"}),"Pull"]})})]}),(0,t.jsxs)("label",{className:"mt-4 inline-flex items-center gap-2 text-[11px] uppercase tracking-wider text-text-muted",children:[(0,t.jsx)("input",{type:"checkbox",checked:E,onChange:e=>B(e.target.checked)}),"Create remote backup before write"]})]})}),(0,t.jsx)(k,{open:j,onClose:()=>N(!1),nodeId:e,currentPath:"~",onSelect:e=>{c(e),W(e)},runAsUser:null}),v&&(0,t.jsx)(P.z,{children:(0,t.jsxs)("div",{className:"rounded border border-danger/40 bg-danger/5 px-4 py-3 text-[11px] text-danger flex items-center justify-between shadow-[0_0_8px_rgba(255,23,68,0.15)]",children:[(0,t.jsx)("span",{children:v}),(0,t.jsx)("button",{onClick:()=>y(null),className:"ml-4 text-danger hover:text-danger/80 text-[10px] uppercase tracking-wider",children:"Dismiss"})]})}),U&&(0,t.jsx)(P.z,{children:(0,t.jsxs)("div",{className:"rounded border border-primary/30 bg-primary/5 px-4 py-3 text-[11px] uppercase tracking-wider text-primary",children:["Policy: ",U.policy," · targets: ",U.targetCount," · backup: ",U.backupPlanned?"planned":"off"," · bytes: ",U.contentBytes]})}),(0,t.jsx)(P.z,{children:(0,t.jsxs)(r.N,{title:"File Editor",action:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[g&&(0,t.jsx)("span",{className:"text-xs text-success",children:"Saved!"}),(0,t.jsxs)(i.K,{variant:"secondary",size:"sm",onClick:()=>C(!0),children:[(0,t.jsx)(T.f,{className:"h-3.5 w-3.5"}),"Load from Library"]}),(0,t.jsxs)(i.K,{variant:"secondary",size:"sm",onClick:()=>void V(),disabled:!x,children:[(0,t.jsx)(S.f,{className:"h-3.5 w-3.5"}),M?"Save to Library":"Save as Library File"]}),(0,t.jsxs)(i.K,{variant:"secondary",size:"sm",onClick:()=>void R(),disabled:p||!e||!d,children:[(0,t.jsx)(O.f,{className:"h-3.5 w-3.5"}),"Preview"]}),(0,t.jsxs)(i.K,{size:"sm",onClick:()=>void H(),disabled:p||!e,children:[p?(0,t.jsx)(u.f,{className:"h-3.5 w-3.5 animate-spin"}):(0,t.jsx)(F.f,{className:"h-3.5 w-3.5"}),"Push to Node"]})]}),children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 border-b border-border/50 pb-3 mb-3",children:[(0,t.jsx)(m.f,{className:"h-4 w-4 text-primary"}),(0,t.jsx)("span",{className:"text-[11px] text-primary",children:d||"No file selected"})]}),(0,t.jsx)("textarea",{value:x,onChange:e=>h(e.target.value),placeholder:"File content will appear here after pulling from a node…",rows:20,className:"w-full rounded border border-border bg-bg p-4 text-xs leading-relaxed outline-none focus:border-primary focus:shadow-[0_0_12px_var(--color-glow)] transition-all text-text"})]})}),(0,t.jsx)(L,{open:w,onClose:()=>C(!1),onSelect:e=>{h(e.content),$(e.id),d||c(e.fileName)}}),(0,t.jsx)(D,{open:_,onClose:()=>z(!1),fileName:d.split("/").pop()??(d||"untitled.md"),content:x,onSaved:()=>{b(!0),setTimeout(()=>b(!1),3e3)}})]})}],99594)},46670,e=>{"use strict";var t=e.i(43476),a=e.i(78571);let s={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:i="default",className:l,dot:n=!1,pulse:o=!1}){return(0,t.jsxs)("span",{className:(0,a.f)("inline-flex items-center gap-1.5 rounded-chip border px-2 py-0.5 text-[10px] font-bold uppercase tracking-wider",s[i],l),children:[n&&(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,a.f)("absolute inset-0 rounded-full animate-halo",r[i])}),(0,t.jsx)("span",{className:(0,a.f)("relative inline-flex h-1.5 w-1.5 rounded-full",r[i])})]}),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),a=e.i(56420);let s={name:"arrow-down-right",size:24,node:[["path",{d:"m7 7 10 10",key:"1fmybs"}],["path",{d:"M17 7v10H7",key:"6fjiku"}]]};s.node;let r=(0,a.f)(s);var i=e.i(75775),l=e.i(78571),n=e.i(3062),o=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)]"},c={xs:"h-1",sm:"h-1.5",md:"h-2"};function x({value:e,max:a=100,tone:s,thresholds:r=o.q,label:i,size:n="xs",showValue:m=!1,valueLabel:h,glow:p,className:u,testId:f}){let g="number"==typeof e&&Number.isFinite(e),b=g?Math.max(0,Math.min(100,e/(a||1)*100)):0,v=s??(g?(0,o.Z)(b,r):"muted"),y=p||!s&&g&&b>=r.warn,j=h??(g?`${b.toFixed(+(b<10&&b>0))}%`:"—");return(0,t.jsxs)("div",{className:(0,l.f)("flex min-w-0 items-center gap-2",u),"data-testid":f,children:[(0,t.jsx)("div",{...g?{role:"meter","aria-label":i,"aria-valuemin":0,"aria-valuemax":a,"aria-valuenow":e,"aria-valuetext":j}:{role:"img","aria-label":i?`${i}: no data`:"No data"},className:(0,l.f)("relative flex-1 overflow-hidden rounded-full bg-border/70",c[n]),children:(0,t.jsx)("div",{style:{"--meter":`${b}%`},className:(0,l.f)("h-full w-(--meter) rounded-full transition-[width] duration-700 ease-out-expo starting:w-0",o.H[v],y&&d[v])})}),m&&(0,t.jsx)("span",{className:(0,l.f)("num w-11 shrink-0 text-right text-[11px]",g?o.T[v]:"text-text-muted"),children:j})]})}e.s(["f",0,x],51196);var m=e.i(71645);function h({values:e,tone:a="primary",width:s=160,height:r=32,area:i=!0,max:n,percent:d=!1,threshold:c,live:x=!0,emptyLabel:p="not enough data",className:u,testId:f,label:g,stretch:b=!1}){let v=`spark${(0,m.useId)().replace(/:/g,"")}`;if(e.length<2)return(0,t.jsx)("div",{className:(0,l.f)("flex h-8 items-center text-xs italic text-text-muted",u),"data-testid":f,children:p});let y=o.v[a],j=n??(d?Math.max(100,...e):Math.max(...e,c??0)||1),N=r-4,w=s/(e.length-1),k=e=>2+N-Math.max(0,e)/j*N,C=e.map((e,t)=>[t*w,k(e)]),_=C.map(([e,t])=>`${e.toFixed(1)},${t.toFixed(1)}`).join(" "),S=C[C.length-1];return(0,t.jsxs)("svg",{width:b?"100%":s,height:r,viewBox:`0 0 ${s} ${r}`,preserveAspectRatio:b?"none":void 0,className:(0,l.f)("block overflow-visible",u),"data-testid":f,role:g?"img":void 0,"aria-label":g,"aria-hidden":!g||void 0,children:[i&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("defs",{children:(0,t.jsxs)("linearGradient",{id:v,x1:"0",x2:"0",y1:"0",y2:"1",children:[(0,t.jsx)("stop",{offset:"0%",stopColor:y,stopOpacity:.35}),(0,t.jsx)("stop",{offset:"100%",stopColor:y,stopOpacity:0})]})}),(0,t.jsx)("polygon",{points:`0,${r} ${_} ${s},${r}`,fill:`url(#${v})`})]}),void 0!==c&&(0,t.jsx)("line",{x1:0,x2:s,y1:k(c),y2:k(c),stroke:"var(--color-warning)",strokeOpacity:.5,strokeDasharray:"3 3",strokeWidth:1}),(0,t.jsx)("polyline",{fill:"none",stroke:y,strokeWidth:1.5,vectorEffect:"non-scaling-stroke",strokeLinejoin:"round",strokeLinecap:"round",points:_}),x&&!b&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("circle",{cx:S[0],cy:S[1],r:2.5,fill:y,className:"origin-center animate-halo [transform-box:fill-box]"}),(0,t.jsx)("circle",{cx:S[0],cy:S[1],r:2,fill:y})]})]})}e.s(["f",0,h],55427),e.s(["N",0,function({title:e,description:a,children:s,className:r,action:i,tone:l,corners:o=!1,...d}){return(0,t.jsx)(n.f,{...d,tone:l,corners:o,title:e,description:a,action:i,className:r,children:s})},"n",0,function({label:e,value:a,icon:s,trend:d,spark:c,meter:m,delta:p,tone:u="primary",className:f,testId:g}){let b=!p||p.value>=0===(p.positiveIsGood??!0);return(0,t.jsxs)(n.f,{tone:u,className:(0,l.f)("overflow-hidden",f),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}),s&&(0,t.jsx)("span",{className:"text-primary/60",children:s})]}),(0,t.jsxs)("div",{className:"mt-2 flex items-end justify-between gap-2",children:[(0,t.jsx)("div",{className:(0,l.f)("num text-2xl font-bold","primary"===u?"text-primary neon-text":o.T[u]),children:a}),p&&0!==p.value&&(0,t.jsxs)("span",{className:(0,l.f)("num mb-1 inline-flex items-center gap-0.5 text-[11px]",b?"text-success":"text-danger"),children:[p.value>0?(0,t.jsx)(i.f,{className:"h-3 w-3"}):(0,t.jsx)(r,{className:"h-3 w-3"}),Math.abs(p.value).toFixed(+!Number.isInteger(p.value)),p.unit]})]}),d&&(0,t.jsx)("div",{className:(0,l.f)("mt-1 text-[11px]",d.positive?"text-success":"text-danger"),children:d.value}),void 0!==m&&(0,t.jsx)(x,{value:m,className:"mt-3",label:e}),c&&c.length>1&&(0,t.jsx)("div",{className:"-mx-5 -mb-5 mt-3 opacity-80",children:(0,t.jsx)(h,{values:c,tone:u,width:240,height:28,stretch:!0,live:!1})})]})}],93999)},3062,e=>{"use strict";var t=e.i(43476),a=e.i(78571),s=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)]"},i={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)]"},l={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"},n={none:"",sm:"p-3",md:"p-5",lg:"p-6"};e.s(["f",0,function({tone:e="primary",corners:o=!0,interactive:d=!0,hero:c=!1,title:x,description:m,icon:h,action:p,as:u="div",padding:f="md",testId:g,className:b,children:v,...y}){return(0,t.jsxs)(u,{...y,"data-testid":g??y["data-testid"],className:(0,a.f)("relative rounded-panel border border-border bg-surface transition-colors duration-300",n[f],o&&"panel-corners",o&&r[e],d&&"glow-hover",d&&i[e],d&&l[e],c&&"grid-bg overflow-hidden bg-surface/80",b),children:[(x||p||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,a.f)("mt-0.5 shrink-0",s.T[e]),children:h}),(0,t.jsxs)("div",{className:"min-w-0",children:[x&&(0,t.jsx)("h3",{className:"text-xs font-bold uppercase tracking-wider",children:x}),m&&(0,t.jsx)("p",{className:"mt-0.5 text-[11px] text-text-muted",children:m})]})]}),p]}),v]})}])},31624,e=>{"use strict";var t=e.i(43476),a=e.i(71645),s=e.i(82983),r=e.i(41220);e.s(["f",0,function({value:e,onChange:i,multi:l=!1,showAll:n=!1,label:o="Node",placeholder:d="Select a node…",className:c="",disabled:x=!1}){let[m,h]=(0,a.useState)([]),[p,u]=(0,a.useState)(!0),f=(0,a.useId)();if((0,a.useEffect)(()=>{(async()=>{try{let e=(await s.f.nodes.list({pageSize:100})).data??[];h(e)}catch{}finally{u(!1)}})()},[]),l){let a=Array.isArray(e)?e:e?[e]:[],s=a.length===m.length&&m.length>0,l=m.filter(e=>"ONLINE"===e.status);return(0,t.jsxs)("div",{className:c,children:[o&&(0,t.jsx)("label",{className:"mb-1 block text-[11px] font-bold uppercase tracking-wider text-text-muted",children:o}),(0,t.jsx)("div",{className:"max-h-48 overflow-y-auto rounded border border-border bg-bg p-2 space-y-1",children:p?(0,t.jsx)("p",{className:"px-2 py-1 text-xs text-text-muted",children:"Loading nodes…"}):0===m.length?(0,t.jsx)("p",{className:"px-2 py-1 text-xs text-text-muted",children:"No nodes found"}):(0,t.jsxs)(t.Fragment,{children:[n&&l.length>0&&(0,t.jsxs)("label",{className:"flex items-center gap-2 rounded px-2 py-1.5 hover:border-primary/30 hover:shadow-[0_0_20px_var(--color-glow)] hover:bg-surface-hover cursor-pointer border-b border-border mb-1 pb-2 transition-all",children:[(0,t.jsx)("input",{type:"checkbox",checked:s,onChange:()=>{s?i([]):i(l.map(e=>e.id))},disabled:x,className:"accent-primary"}),(0,t.jsx)(r.f,{className:"h-3.5 w-3.5 text-primary"}),(0,t.jsx)("span",{className:"text-xs font-bold",children:"All Nodes"}),(0,t.jsxs)("span",{className:"ml-auto text-[11px] text-text-muted",children:[l.length," online"]})]}),m.map(e=>(0,t.jsxs)("label",{className:"flex items-center gap-2 rounded px-2 py-1.5 hover:border-primary/30 hover:shadow-[0_0_20px_var(--color-glow)] hover:bg-surface-hover cursor-pointer transition-all",children:[(0,t.jsx)("input",{type:"checkbox",checked:a.includes(e.id),onChange:()=>{var t;return t=e.id,void i(a.includes(t)?a.filter(e=>e!==t):[...a,t])},disabled:x||"ONLINE"!==e.status,className:"accent-primary"}),(0,t.jsx)("span",{className:`inline-block h-2 w-2 rounded-full ${"ONLINE"===e.status?"bg-success":"DEGRADED"===e.status?"bg-warning":"bg-text-muted"}`}),(0,t.jsx)("span",{className:`text-xs ${"ONLINE"!==e.status?"text-text-muted":""}`,children:e.name}),(0,t.jsx)("span",{className:"ml-auto text-[11px] text-text-muted",children:e.hostname})]},e.id))]})})]})}let g=Array.isArray(e)?e[0]??"":e;return(0,t.jsxs)("div",{className:c,children:[o&&(0,t.jsx)("label",{htmlFor:f,className:"mb-1 block text-[11px] font-bold uppercase tracking-wider text-text-muted",children:o}),(0,t.jsxs)("select",{id:f,"aria-label":o?void 0:"Node",value:g,onChange:e=>i(e.target.value),disabled:x||p,className:"w-full rounded border border-border bg-bg px-3 py-2 text-xs outline-none focus:border-primary focus:shadow-[0_0_8px_var(--color-glow)] hover:border-primary/30 hover:shadow-[0_0_20px_var(--color-glow)] transition-all",children:[(0,t.jsx)("option",{value:"",children:p?"Loading nodes…":d}),m.map(e=>(0,t.jsxs)("option",{value:e.id,disabled:"ONLINE"!==e.status,children:[e.name," — ",e.hostname," (",e.status,")"]},e.id))]})]})}])},63376,e=>{"use strict";var t=e.i(43476);e.s(["z",0,function({children:e,className:a}){return(0,t.jsx)("div",{className:`animate-page-in${a?` ${a}`:""}`,children:e})},"U",0,function({children:e,className:a}){return(0,t.jsx)("div",{className:a,children:e})}])},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"}):"—"}])},75775,e=>{"use strict";var t=e.i(56420);let a={name:"arrow-up-right",size:24,node:[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]};a.node;let s=(0,t.f)(a);e.s(["f",0,s],75775)},89360,e=>{"use strict";var t=e.i(56420);let a={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"}]]};a.node;let s=(0,t.f)(a);e.s(["f",0,s],89360)},29600,e=>{"use strict";var t=e.i(56420);let a={name:"file",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"}]]};a.node;let s=(0,t.f)(a);e.s(["f",0,s],29600)},69644,e=>{"use strict";var t=e.i(56420);let a={name:"folder-open",size:24,node:[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]};a.node;let s=(0,t.f)(a);e.s(["f",0,s],69644)},49817,e=>{"use strict";var t=e.i(56420);let a={name:"house",size:24,node:[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],aliases:["home"]};a.node;let s=(0,t.f)(a);e.s(["f",0,s],49817)},15170,5015,e=>{"use strict";var t=e.i(56420);let a={name:"image",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]};a.node;let s=(0,t.f)(a);e.s(["f",0,s],15170);let r={name:"file-braces",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 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]],aliases:["file-json"]};r.node;let i=(0,t.f)(r);e.s(["f",0,i],5015)},56522,e=>{"use strict";var t=e.i(56420);let a={name:"save",size:24,node:[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]};a.node;let s=(0,t.f)(a);e.s(["f",0,s],56522)}]);