@hivemagnus/magnus-ui 1.1.2 → 1.1.3

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 (145) hide show
  1. package/dist/app/apps/dashboard/.next/BUILD_ID +1 -1
  2. package/dist/app/apps/dashboard/.next/build-manifest.json +3 -3
  3. package/dist/app/apps/dashboard/.next/prerender-manifest.json +3 -3
  4. package/dist/app/apps/dashboard/.next/required-server-files.json +2 -2
  5. package/dist/app/apps/dashboard/.next/server/app/_global-error.html +1 -1
  6. package/dist/app/apps/dashboard/.next/server/app/_global-error.rsc +1 -1
  7. package/dist/app/apps/dashboard/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  8. package/dist/app/apps/dashboard/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  9. package/dist/app/apps/dashboard/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  10. package/dist/app/apps/dashboard/.next/server/app/_not-found/page.js.nft.json +1 -1
  11. package/dist/app/apps/dashboard/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  12. package/dist/app/apps/dashboard/.next/server/app/anomalies/[anomalyId]/page.js.nft.json +1 -1
  13. package/dist/app/apps/dashboard/.next/server/app/anomalies/[anomalyId]/page_client-reference-manifest.js +1 -1
  14. package/dist/app/apps/dashboard/.next/server/app/anomalies/page.js.nft.json +1 -1
  15. package/dist/app/apps/dashboard/.next/server/app/anomalies/page_client-reference-manifest.js +1 -1
  16. package/dist/app/apps/dashboard/.next/server/app/anomalies/remediation/page.js.nft.json +1 -1
  17. package/dist/app/apps/dashboard/.next/server/app/anomalies/remediation/page_client-reference-manifest.js +1 -1
  18. package/dist/app/apps/dashboard/.next/server/app/api-docs/page.js.nft.json +1 -1
  19. package/dist/app/apps/dashboard/.next/server/app/api-docs/page_client-reference-manifest.js +1 -1
  20. package/dist/app/apps/dashboard/.next/server/app/application-operations/page.js.nft.json +1 -1
  21. package/dist/app/apps/dashboard/.next/server/app/application-operations/page_client-reference-manifest.js +1 -1
  22. package/dist/app/apps/dashboard/.next/server/app/ardent/installations/page.js.nft.json +1 -1
  23. package/dist/app/apps/dashboard/.next/server/app/ardent/installations/page_client-reference-manifest.js +1 -1
  24. package/dist/app/apps/dashboard/.next/server/app/ardent/page.js.nft.json +1 -1
  25. package/dist/app/apps/dashboard/.next/server/app/ardent/page_client-reference-manifest.js +1 -1
  26. package/dist/app/apps/dashboard/.next/server/app/ardent/profiles/[id]/page.js.nft.json +1 -1
  27. package/dist/app/apps/dashboard/.next/server/app/ardent/profiles/[id]/page_client-reference-manifest.js +1 -1
  28. package/dist/app/apps/dashboard/.next/server/app/ardent/profiles/page.js.nft.json +1 -1
  29. package/dist/app/apps/dashboard/.next/server/app/ardent/profiles/page_client-reference-manifest.js +1 -1
  30. package/dist/app/apps/dashboard/.next/server/app/audit/page.js.nft.json +1 -1
  31. package/dist/app/apps/dashboard/.next/server/app/audit/page_client-reference-manifest.js +1 -1
  32. package/dist/app/apps/dashboard/.next/server/app/codex/installations/page.js.nft.json +1 -1
  33. package/dist/app/apps/dashboard/.next/server/app/codex/installations/page_client-reference-manifest.js +1 -1
  34. package/dist/app/apps/dashboard/.next/server/app/codex/page.js.nft.json +1 -1
  35. package/dist/app/apps/dashboard/.next/server/app/codex/page_client-reference-manifest.js +1 -1
  36. package/dist/app/apps/dashboard/.next/server/app/commands/page.js.nft.json +1 -1
  37. package/dist/app/apps/dashboard/.next/server/app/commands/page_client-reference-manifest.js +1 -1
  38. package/dist/app/apps/dashboard/.next/server/app/cron/page/server-reference-manifest.json +1 -1
  39. package/dist/app/apps/dashboard/.next/server/app/cron/page.js.nft.json +1 -1
  40. package/dist/app/apps/dashboard/.next/server/app/cron/page_client-reference-manifest.js +1 -1
  41. package/dist/app/apps/dashboard/.next/server/app/files/page.js.nft.json +1 -1
  42. package/dist/app/apps/dashboard/.next/server/app/files/page_client-reference-manifest.js +1 -1
  43. package/dist/app/apps/dashboard/.next/server/app/fleet-map/page.js.nft.json +1 -1
  44. package/dist/app/apps/dashboard/.next/server/app/fleet-map/page_client-reference-manifest.js +1 -1
  45. package/dist/app/apps/dashboard/.next/server/app/fleet-readiness/page.js.nft.json +1 -1
  46. package/dist/app/apps/dashboard/.next/server/app/fleet-readiness/page_client-reference-manifest.js +1 -1
  47. package/dist/app/apps/dashboard/.next/server/app/fleet-timeline/page.js.nft.json +1 -1
  48. package/dist/app/apps/dashboard/.next/server/app/fleet-timeline/page_client-reference-manifest.js +1 -1
  49. package/dist/app/apps/dashboard/.next/server/app/governor/operations/page.js.nft.json +1 -1
  50. package/dist/app/apps/dashboard/.next/server/app/governor/operations/page_client-reference-manifest.js +1 -1
  51. package/dist/app/apps/dashboard/.next/server/app/governor/share/[token]/page.js.nft.json +1 -1
  52. package/dist/app/apps/dashboard/.next/server/app/governor/share/[token]/page_client-reference-manifest.js +1 -1
  53. package/dist/app/apps/dashboard/.next/server/app/hermes-drift/page.js.nft.json +1 -1
  54. package/dist/app/apps/dashboard/.next/server/app/hermes-drift/page_client-reference-manifest.js +1 -1
  55. package/dist/app/apps/dashboard/.next/server/app/hermes-security/page.js.nft.json +1 -1
  56. package/dist/app/apps/dashboard/.next/server/app/hermes-security/page_client-reference-manifest.js +1 -1
  57. package/dist/app/apps/dashboard/.next/server/app/incidents/page.js.nft.json +1 -1
  58. package/dist/app/apps/dashboard/.next/server/app/incidents/page_client-reference-manifest.js +1 -1
  59. package/dist/app/apps/dashboard/.next/server/app/library/page.js.nft.json +1 -1
  60. package/dist/app/apps/dashboard/.next/server/app/library/page_client-reference-manifest.js +1 -1
  61. package/dist/app/apps/dashboard/.next/server/app/login/page.js.nft.json +1 -1
  62. package/dist/app/apps/dashboard/.next/server/app/login/page_client-reference-manifest.js +1 -1
  63. package/dist/app/apps/dashboard/.next/server/app/logs/page.js.nft.json +1 -1
  64. package/dist/app/apps/dashboard/.next/server/app/logs/page_client-reference-manifest.js +1 -1
  65. package/dist/app/apps/dashboard/.next/server/app/mission-control/page.js.nft.json +1 -1
  66. package/dist/app/apps/dashboard/.next/server/app/mission-control/page_client-reference-manifest.js +1 -1
  67. package/dist/app/apps/dashboard/.next/server/app/nodes/[nodeId]/page.js.nft.json +1 -1
  68. package/dist/app/apps/dashboard/.next/server/app/nodes/[nodeId]/page_client-reference-manifest.js +1 -1
  69. package/dist/app/apps/dashboard/.next/server/app/nodes/page.js.nft.json +1 -1
  70. package/dist/app/apps/dashboard/.next/server/app/nodes/page_client-reference-manifest.js +1 -1
  71. package/dist/app/apps/dashboard/.next/server/app/notifications/page.js.nft.json +1 -1
  72. package/dist/app/apps/dashboard/.next/server/app/notifications/page_client-reference-manifest.js +1 -1
  73. package/dist/app/apps/dashboard/.next/server/app/orchestra/installations/page.js.nft.json +1 -1
  74. package/dist/app/apps/dashboard/.next/server/app/orchestra/installations/page_client-reference-manifest.js +1 -1
  75. package/dist/app/apps/dashboard/.next/server/app/orchestra/page.js.nft.json +1 -1
  76. package/dist/app/apps/dashboard/.next/server/app/orchestra/page_client-reference-manifest.js +1 -1
  77. package/dist/app/apps/dashboard/.next/server/app/orchestra/profiles/page.js.nft.json +1 -1
  78. package/dist/app/apps/dashboard/.next/server/app/orchestra/profiles/page_client-reference-manifest.js +1 -1
  79. package/dist/app/apps/dashboard/.next/server/app/orchestra/web-gateway/page.js.nft.json +1 -1
  80. package/dist/app/apps/dashboard/.next/server/app/orchestra/web-gateway/page_client-reference-manifest.js +1 -1
  81. package/dist/app/apps/dashboard/.next/server/app/page.js.nft.json +1 -1
  82. package/dist/app/apps/dashboard/.next/server/app/page_client-reference-manifest.js +1 -1
  83. package/dist/app/apps/dashboard/.next/server/app/retention/page.js.nft.json +1 -1
  84. package/dist/app/apps/dashboard/.next/server/app/retention/page_client-reference-manifest.js +1 -1
  85. package/dist/app/apps/dashboard/.next/server/app/roles/page.js.nft.json +1 -1
  86. package/dist/app/apps/dashboard/.next/server/app/roles/page_client-reference-manifest.js +1 -1
  87. package/dist/app/apps/dashboard/.next/server/app/rollouts/page.js.nft.json +1 -1
  88. package/dist/app/apps/dashboard/.next/server/app/rollouts/page_client-reference-manifest.js +1 -1
  89. package/dist/app/apps/dashboard/.next/server/app/security-fusion/cases/[caseId]/page.js.nft.json +1 -1
  90. package/dist/app/apps/dashboard/.next/server/app/security-fusion/cases/[caseId]/page_client-reference-manifest.js +1 -1
  91. package/dist/app/apps/dashboard/.next/server/app/security-fusion/cases/page.js.nft.json +1 -1
  92. package/dist/app/apps/dashboard/.next/server/app/security-fusion/cases/page_client-reference-manifest.js +1 -1
  93. package/dist/app/apps/dashboard/.next/server/app/security-fusion/entities/page.js.nft.json +1 -1
  94. package/dist/app/apps/dashboard/.next/server/app/security-fusion/entities/page_client-reference-manifest.js +1 -1
  95. package/dist/app/apps/dashboard/.next/server/app/security-fusion/events/page.js.nft.json +1 -1
  96. package/dist/app/apps/dashboard/.next/server/app/security-fusion/events/page_client-reference-manifest.js +1 -1
  97. package/dist/app/apps/dashboard/.next/server/app/security-fusion/evidence/page.js.nft.json +1 -1
  98. package/dist/app/apps/dashboard/.next/server/app/security-fusion/evidence/page_client-reference-manifest.js +1 -1
  99. package/dist/app/apps/dashboard/.next/server/app/security-fusion/page.js.nft.json +1 -1
  100. package/dist/app/apps/dashboard/.next/server/app/security-fusion/page_client-reference-manifest.js +1 -1
  101. package/dist/app/apps/dashboard/.next/server/app/security-fusion/policies/page.js.nft.json +1 -1
  102. package/dist/app/apps/dashboard/.next/server/app/security-fusion/policies/page_client-reference-manifest.js +1 -1
  103. package/dist/app/apps/dashboard/.next/server/app/security-fusion/sources/page.js.nft.json +1 -1
  104. package/dist/app/apps/dashboard/.next/server/app/security-fusion/sources/page_client-reference-manifest.js +1 -1
  105. package/dist/app/apps/dashboard/.next/server/app/skills/page/server-reference-manifest.json +1 -1
  106. package/dist/app/apps/dashboard/.next/server/app/skills/page.js.nft.json +1 -1
  107. package/dist/app/apps/dashboard/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  108. package/dist/app/apps/dashboard/.next/server/app/webhooks/[id]/page.js.nft.json +1 -1
  109. package/dist/app/apps/dashboard/.next/server/app/webhooks/[id]/page_client-reference-manifest.js +1 -1
  110. package/dist/app/apps/dashboard/.next/server/app/webhooks/new/page.js.nft.json +1 -1
  111. package/dist/app/apps/dashboard/.next/server/app/webhooks/new/page_client-reference-manifest.js +1 -1
  112. package/dist/app/apps/dashboard/.next/server/app/webhooks/page.js.nft.json +1 -1
  113. package/dist/app/apps/dashboard/.next/server/app/webhooks/page_client-reference-manifest.js +1 -1
  114. package/dist/app/apps/dashboard/.next/server/chunks/ssr/[root-of-the-server]__08sgyyf_y8ab8._.js +1 -1
  115. package/dist/app/apps/dashboard/.next/server/chunks/ssr/[root-of-the-server]__11pe-l2-ko65_._.js +1 -1
  116. package/dist/app/apps/dashboard/.next/server/chunks/ssr/[root-of-the-server]__1xjrbdi2jn6ud._.js +1 -1
  117. package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_0gs_s688kgg1i._.js +1 -1
  118. package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_cron_page_tsx_1i3duyygc0_tg._.js +1 -1
  119. package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_nodes_[nodeId]_page_tsx_1q7fqu18oklzc._.js +1 -1
  120. package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_nodes_nodes-client_tsx_0pt4iarhpqbgn._.js +1 -1
  121. package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_skills_page_tsx_0n5zp4xad38in._.js +1 -1
  122. package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_lib_api-client_ts_0tho-kkk5ez7h._.js +1 -1
  123. package/dist/app/apps/dashboard/.next/server/chunks/ssr/{node_modules_@xterm_1wjdgthvv3w9h._.js → node_modules_@xterm_0b-c6-qudh_kd._.js} +1 -1
  124. package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_refresh-ccw-dot_mjs_0v31ayeyeyyf8._.js +1 -1
  125. package/dist/app/apps/dashboard/.next/server/middleware-build-manifest.js +3 -3
  126. package/dist/app/apps/dashboard/.next/server/pages/500.html +1 -1
  127. package/dist/app/apps/dashboard/.next/server/preview-props.json +3 -3
  128. package/dist/app/apps/dashboard/.next/server/server-reference-manifest.js +1 -1
  129. package/dist/app/apps/dashboard/.next/server/server-reference-manifest.json +3 -3
  130. package/dist/app/apps/dashboard/.next/static/chunks/0a3qf_gj8th4c.js +1 -0
  131. package/dist/app/apps/dashboard/.next/static/chunks/{3vb0dg3il6-rb.js → 2yfl6coqli4y3.js} +2 -2
  132. package/dist/app/apps/dashboard/.next/static/chunks/{1v4hz3-8oktml.js → 2ysc_m5pnuadd.js} +1 -1
  133. package/dist/app/apps/dashboard/.next/static/chunks/3kbm-1q4uj4zs.js +15 -0
  134. package/dist/app/apps/dashboard/.next/static/chunks/{0lt-ikcy1lvod.js → 3kwz1ugids2ek.js} +1 -1
  135. package/dist/app/apps/dashboard/.next/static/chunks/{26rmh4jb1a3nq.js → 3ov5prjb4ltwe.js} +1 -1
  136. package/dist/app/apps/dashboard/.next/static/chunks/{1u_ran46erfqh.js → 3r533x_m9xzjf.js} +1 -1
  137. package/dist/app/apps/dashboard/.next/static/chunks/{260f1oy-xd4cg.js → 42j8jklku-x6g.js} +1 -1
  138. package/dist/app/apps/dashboard/package.json +2 -2
  139. package/dist/app/apps/dashboard/server.js +1 -1
  140. package/package.json +2 -2
  141. package/dist/app/apps/dashboard/.next/static/chunks/0qfvdc54-_wls.js +0 -15
  142. package/dist/app/apps/dashboard/.next/static/chunks/3q0oq5yy3hszn.js +0 -1
  143. /package/dist/app/apps/dashboard/.next/static/{RJzcgsvLiZvGVu7o2g_Hd → zDewzwaaY08Lyq4IF1Bft}/_buildManifest.js +0 -0
  144. /package/dist/app/apps/dashboard/.next/static/{RJzcgsvLiZvGVu7o2g_Hd → zDewzwaaY08Lyq4IF1Bft}/_clientMiddlewareManifest.js +0 -0
  145. /package/dist/app/apps/dashboard/.next/static/{RJzcgsvLiZvGVu7o2g_Hd → zDewzwaaY08Lyq4IF1Bft}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- (()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,57108,e=>{var r=e.i(43476),t=e.i(46670);e.s(["f",0,function({configuration:e}){if(e?.memoryProvider!=="hivemem")return null;let a=e.hiveMemToken,n=a?.status??"unknown";return(0,r.jsxs)("span",{className:"flex flex-wrap items-center gap-1.5",children:[(0,r.jsxs)(t.t,{variant:"valid"===n?"success":"expiring"===n||"unreachable"===n||"unknown"===n?"warning":"danger",children:["Token ",n]}),a?.expiresAt&&(0,r.jsxs)("time",{dateTime:a.expiresAt,title:"HiveMem token expiration",children:["expires ",new Date(a.expiresAt).toLocaleString()]}),a?.checkedAt&&(0,r.jsxs)("time",{dateTime:a.checkedAt,className:"text-text-muted/70",title:"Last HiveMem authentication check",children:["checked ",new Date(a.checkedAt).toLocaleString()]})]})}])},46670,e=>{var r=e.i(43476),t=e.i(78571);let a={default:"border-border text-text-muted",success:"border-success/40 text-success bg-success/5 shadow-[0_0_6px_rgba(0,255,65,0.15)]",warning:"border-warning/40 text-warning bg-warning/5 shadow-[0_0_6px_rgba(255,179,0,0.15)]",danger:"border-danger/40 text-danger bg-danger/5 shadow-[0_0_6px_rgba(255,23,68,0.15)]",info:"border-info/40 text-info bg-info/5 shadow-[0_0_6px_rgba(0,176,255,0.15)]"},n={default:"bg-text-muted",success:"bg-success",warning:"bg-warning",danger:"bg-danger",info:"bg-info"};e.s(["t",0,function({children:e,variant:s="default",className:l,dot:i=!1,pulse:o=!1}){return(0,r.jsxs)("span",{className:(0,t.f)("inline-flex items-center gap-1.5 rounded-chip border px-2 py-0.5 text-[10px] font-bold uppercase tracking-wider",a[s],l),children:[i&&(0,r.jsxs)("span",{"aria-hidden":"true",className:"relative inline-flex h-1.5 w-1.5",children:[o&&(0,r.jsx)("span",{className:(0,t.f)("absolute inset-0 rounded-full animate-halo",n[s])}),(0,r.jsx)("span",{className:(0,t.f)("relative inline-flex h-1.5 w-1.5 rounded-full",n[s])})]}),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=>{var r=e.i(43476),t=e.i(56420);let a={name:"arrow-down-right",size:24,node:[["path",{d:"m7 7 10 10",key:"1fmybs"}],["path",{d:"M17 7v10H7",key:"6fjiku"}]]};a.node;let n=(0,t.f)(a);var s=e.i(75775),l=e.i(78571),i=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:t=100,tone:a,thresholds:n=o.q,label:s,size:i="xs",showValue:x=!1,valueLabel:h,glow:m,className:f,testId:p}){let g="number"==typeof e&&Number.isFinite(e),v=g?Math.max(0,Math.min(100,e/(t||1)*100)):0,b=a??(g?(0,o.Z)(v,n):"muted"),j=m||!a&&g&&v>=n.warn,y=h??(g?`${v.toFixed(+(v<10&&v>0))}%`:"—");return(0,r.jsxs)("div",{className:(0,l.f)("flex min-w-0 items-center gap-2",f),"data-testid":p,children:[(0,r.jsx)("div",{role:"meter","aria-label":s,"aria-valuemin":0,"aria-valuemax":t,"aria-valuenow":g?e:void 0,"aria-valuetext":y,className:(0,l.f)("relative flex-1 overflow-hidden rounded-full bg-border/70",d[i]),children:(0,r.jsx)("div",{style:{"--meter":`${v}%`},className:(0,l.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,r.jsx)("span",{className:(0,l.f)("num w-11 shrink-0 text-right text-[11px]",g?o.T[b]:"text-text-muted"),children:y})]})}e.s(["f",0,u],51196);var x=e.i(71645);function h({values:e,tone:t="primary",width:a=160,height:n=32,area:s=!0,max:i,percent:c=!1,threshold:d,live:u=!0,emptyLabel:m="not enough data",className:f,testId:p,label:g,stretch:v=!1}){let b=`spark${(0,x.useId)().replace(/:/g,"")}`;if(e.length<2)return(0,r.jsx)("div",{className:(0,l.f)("flex h-8 items-center text-xs italic text-text-muted",f),"data-testid":p,children:m});let j=o.v[t],y=i??(c?Math.max(100,...e):Math.max(...e,d??0)||1),N=n-4,w=a/(e.length-1),k=e=>2+N-Math.max(0,e)/y*N,_=e.map((e,r)=>[r*w,k(e)]),M=_.map(([e,r])=>`${e.toFixed(1)},${r.toFixed(1)}`).join(" "),S=_[_.length-1];return(0,r.jsxs)("svg",{width:v?"100%":a,height:n,viewBox:`0 0 ${a} ${n}`,preserveAspectRatio:v?"none":void 0,className:(0,l.f)("block overflow-visible",f),"data-testid":p,role:g?"img":void 0,"aria-label":g,"aria-hidden":!g||void 0,children:[s&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("defs",{children:(0,r.jsxs)("linearGradient",{id:b,x1:"0",x2:"0",y1:"0",y2:"1",children:[(0,r.jsx)("stop",{offset:"0%",stopColor:j,stopOpacity:.35}),(0,r.jsx)("stop",{offset:"100%",stopColor:j,stopOpacity:0})]})}),(0,r.jsx)("polygon",{points:`0,${n} ${M} ${a},${n}`,fill:`url(#${b})`})]}),void 0!==d&&(0,r.jsx)("line",{x1:0,x2:a,y1:k(d),y2:k(d),stroke:"var(--color-warning)",strokeOpacity:.5,strokeDasharray:"3 3",strokeWidth:1}),(0,r.jsx)("polyline",{fill:"none",stroke:j,strokeWidth:1.5,vectorEffect:"non-scaling-stroke",strokeLinejoin:"round",strokeLinecap:"round",points:M}),u&&!v&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("circle",{cx:S[0],cy:S[1],r:2.5,fill:j,className:"origin-center animate-halo [transform-box:fill-box]"}),(0,r.jsx)("circle",{cx:S[0],cy:S[1],r:2,fill:j})]})]})}e.s(["f",0,h],55427),e.s(["N",0,function({title:e,description:t,children:a,className:n,action:s,tone:l,corners:o=!1,...c}){return(0,r.jsx)(i.f,{...c,tone:l,corners:o,title:e,description:t,action:s,className:n,children:a})},"n",0,function({label:e,value:t,icon:a,trend:c,spark:d,meter:x,delta:m,tone:f="primary",className:p,testId:g}){let v=!m||m.value>=0===(m.positiveIsGood??!0);return(0,r.jsxs)(i.f,{tone:f,className:(0,l.f)("overflow-hidden",p),testId:g,children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)("span",{className:"text-[10px] font-medium uppercase tracking-[0.15em] text-text-muted",children:e}),a&&(0,r.jsx)("span",{className:"text-primary/60",children:a})]}),(0,r.jsxs)("div",{className:"mt-2 flex items-end justify-between gap-2",children:[(0,r.jsx)("div",{className:(0,l.f)("num text-2xl font-bold","primary"===f?"text-primary neon-text":o.T[f]),children:t}),m&&0!==m.value&&(0,r.jsxs)("span",{className:(0,l.f)("num mb-1 inline-flex items-center gap-0.5 text-[11px]",v?"text-success":"text-danger"),children:[m.value>0?(0,r.jsx)(s.f,{className:"h-3 w-3"}):(0,r.jsx)(n,{className:"h-3 w-3"}),Math.abs(m.value).toFixed(+!Number.isInteger(m.value)),m.unit]})]}),c&&(0,r.jsx)("div",{className:(0,l.f)("mt-1 text-[11px]",c.positive?"text-success":"text-danger"),children:c.value}),void 0!==x&&(0,r.jsx)(u,{value:x,className:"mt-3",label:e}),d&&d.length>1&&(0,r.jsx)("div",{className:"-mx-5 -mb-5 mt-3 opacity-80",children:(0,r.jsx)(h,{values:d,tone:f,width:240,height:28,stretch:!0,live:!1})})]})}],93999)},54149,21176,e=>{var r=e.i(43476),t=e.i(71645),a=e.i(78571),n=e.i(35084);e.s(["f",0,function({value:e,max:s=100,label:l,sublabel:i,tone:o,thresholds:c=n.q,higherIsBetter:d=!1,size:u=140,display:x,ticks:h=!0,hideLabel:m=!1,className:f,testId:p}){let g=(0,t.useId)().replace(/:/g,""),v="number"==typeof e&&Number.isFinite(e),b=v?Math.max(0,Math.min(100,e/(s||1)*100)):0,j=o??(v?d?(0,n.Z)(100-b,c):(0,n.Z)(b,c):"muted"),y=Math.max(4,Math.round(u/16)),N=50-y/2-4,w=2*Math.PI*N,k=.75*w,_=k*b/100,M=u>=140,S=x??(v?`${Math.round(b)}%`:"—"),C=h?Array.from({length:11},(e,t)=>{let a=(135+270*t/10)*Math.PI/180,n=50-(t%5==0?4:2.5);return(0,r.jsx)("line",{x1:50+48.5*Math.cos(a),y1:50+48.5*Math.sin(a),x2:50+n*Math.cos(a),y2:50+n*Math.sin(a),stroke:"var(--color-border-strong)",strokeWidth:.8},t)}):null;return(0,r.jsxs)("div",{role:"img","aria-label":`${l}: ${S}`,"data-testid":p,className:(0,a.f)("relative inline-flex flex-col items-center",f),style:{width:u},children:[(0,r.jsxs)("svg",{viewBox:"0 0 100 100",width:u,height:u,"aria-hidden":"true",className:"overflow-visible",children:[M&&(0,r.jsx)("defs",{children:(0,r.jsxs)("filter",{id:`g${g}`,x:"-30%",y:"-30%",width:"160%",height:"160%",children:[(0,r.jsx)("feGaussianBlur",{stdDeviation:"2.2",result:"blur"}),(0,r.jsxs)("feMerge",{children:[(0,r.jsx)("feMergeNode",{in:"blur"}),(0,r.jsx)("feMergeNode",{in:"SourceGraphic"})]})]})}),C,(0,r.jsx)("circle",{cx:50,cy:50,r:N,fill:"none",stroke:"var(--color-border)",strokeWidth:y,strokeLinecap:"round",strokeDasharray:`${k} ${w}`,transform:"rotate(135 50 50)"}),(0,r.jsx)("circle",{cx:50,cy:50,r:N,fill:"none",stroke:n.v[j],strokeWidth:y,strokeLinecap:"round",transform:"rotate(135 50 50)",filter:M?`url(#g${g})`:void 0,style:{"--dash":`${_} ${w}`},className:"[stroke-dasharray:var(--dash)] transition-[stroke-dasharray] duration-1000 ease-out-expo starting:[stroke-dasharray:0_1000]"})]}),(0,r.jsxs)("div",{className:"pointer-events-none absolute inset-0 flex flex-col items-center justify-center",style:{height:u},children:[(0,r.jsx)("span",{className:(0,a.f)("num font-bold leading-none",n.T[j],M&&n.z[j]),style:{fontSize:Math.max(12,.2*u)},children:S}),i&&(0,r.jsx)("span",{className:"num mt-1 text-text-muted",style:{fontSize:Math.max(9,.075*u)},children:i})]}),!m&&(0,r.jsx)("span",{className:"-mt-[10%] text-center text-[10px] font-medium uppercase tracking-[0.15em] text-text-muted",children:l})]})}],54149);var s=e.i(70703),l=e.i(65369);let i=(0,s.default)(()=>e.A(1321),{loadableGenerated:{modules:[69944]},ssr:!1,loading:()=>(0,r.jsx)(l.l,{className:"h-[180px] w-full"})});e.s(["f",0,i],21176)},3062,e=>{var r=e.i(43476),t=e.i(78571),a=e.i(35084);let n={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)]"},s={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"},i={none:"",sm:"p-3",md:"p-5",lg:"p-6"};e.s(["f",0,function({tone:e="primary",corners:o=!0,interactive:c=!0,hero:d=!1,title:u,description:x,icon:h,action:m,as:f="div",padding:p="md",testId:g,className:v,children:b,...j}){return(0,r.jsxs)(f,{...j,"data-testid":g??j["data-testid"],className:(0,t.f)("relative rounded-panel border border-border bg-surface transition-colors duration-300",i[p],o&&"panel-corners",o&&n[e],c&&"glow-hover",c&&s[e],c&&l[e],d&&"grid-bg overflow-hidden bg-surface/80",v),children:[(u||m||h)&&(0,r.jsxs)("div",{className:"mb-4 flex items-start justify-between gap-3",children:[(0,r.jsxs)("div",{className:"flex min-w-0 items-start gap-2",children:[h&&(0,r.jsx)("span",{className:(0,t.f)("mt-0.5 shrink-0",a.T[e]),children:h}),(0,r.jsxs)("div",{className:"min-w-0",children:[u&&(0,r.jsx)("h3",{className:"text-xs font-bold uppercase tracking-wider",children:u}),x&&(0,r.jsx)("p",{className:"mt-0.5 text-[11px] text-text-muted",children:x})]})]}),m]}),b]})}])},65369,e=>{var r=e.i(43476),t=e.i(78571);function a({className:e}){return(0,r.jsx)("div",{"aria-hidden":"true",className:(0,t.f)("skeleton h-3 w-full",e)})}e.s(["l",0,a,"g",0,function({count:e=4,className:n}){return(0,r.jsx)("div",{role:"status","aria-label":"Loading",className:(0,t.f)("grid gap-4 sm:grid-cols-2 lg:grid-cols-4",n),children:Array.from({length:e},(e,t)=>(0,r.jsxs)("div",{className:"panel-corners rounded-panel border border-border bg-surface p-5",children:[(0,r.jsx)(a,{className:"h-2 w-1/2"}),(0,r.jsx)(a,{className:"mt-4 h-7 w-2/3"}),(0,r.jsx)(a,{className:"mt-3 h-1 w-full opacity-60"})]},t))})},"F",0,function({rows:e=5,cols:n=4,className:s}){return(0,r.jsxs)("div",{role:"status","aria-label":"Loading",className:(0,t.f)("overflow-hidden rounded-panel border border-border",s),children:[(0,r.jsx)("div",{className:"flex gap-4 border-b border-border bg-surface px-4 py-3",children:Array.from({length:n},(e,t)=>(0,r.jsx)(a,{className:"h-2 flex-1 opacity-60"},t))}),Array.from({length:e},(e,s)=>(0,r.jsx)("div",{className:"flex gap-4 border-b border-border/50 px-4 py-3 last:border-0",children:Array.from({length:n},(e,n)=>(0,r.jsx)(a,{className:(0,t.f)("h-3 flex-1",(s+n)%3==0&&"max-w-[60%]")},n))},s))]})},"Q",0,function({lines:e=3,className:n}){let s=["w-full","w-11/12","w-4/5","w-2/3","w-3/4"];return(0,r.jsx)("div",{role:"status","aria-label":"Loading",className:(0,t.f)("space-y-2",n),children:Array.from({length:e},(e,t)=>(0,r.jsx)(a,{className:s[t%s.length]},t))})}])},75723,e=>{var r=e.i(43476),t=e.i(78571),a=e.i(46670);let n={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"},s={success:"bg-success",warning:"bg-warning",danger:"bg-danger",info:"bg-info",default:"bg-text-muted"},l=new Set(["ONLINE","RUNNING","ACTIVE","HEALTHY","CRITICAL","UPDATING","PROVISIONING"]);e.s(["f",0,function({status:e,pulse:i,size:o="sm",className:c,label:d}){let u=(0,a.k)(e),x=i??l.has(e.toUpperCase()),h="xs"===o?"h-1.5 w-1.5":"h-2 w-2";return(0,r.jsxs)("span",{className:(0,t.f)("relative inline-flex shrink-0",h,c),role:d?"img":void 0,"aria-label":d,"aria-hidden":!d||void 0,children:[x&&(0,r.jsx)("span",{className:(0,t.f)("absolute inset-0 rounded-full animate-halo",s[u])}),(0,r.jsx)("span",{className:(0,t.f)("relative inline-flex rounded-full",h,n[u])})]})}])},71417,e=>{e.s(["L",0,function(e){if(0===e)return"0 B";let r=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,r)).toFixed(1))} ${["B","KB","MB","GB","TB"][r]}`},"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=>{var r=e.i(56420);let t={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"}]]};t.node;let a=(0,r.f)(t);e.s(["f",0,a],79432)},9347,e=>{var r=e.i(56420);let t={name:"arrow-left",size:24,node:[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]};t.node;let a=(0,r.f)(t);e.s(["f",0,a],9347)},75775,e=>{var r=e.i(56420);let t={name:"arrow-up-right",size:24,node:[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]};t.node;let a=(0,r.f)(t);e.s(["f",0,a],75775)},82022,e=>{var r=e.i(56420);let t={name:"external-link",size:24,node:[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]};t.node;let a=(0,r.f)(t);e.s(["f",0,a],82022)},57665,e=>{var r=e.i(56420);let t={name:"power",size:24,node:[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]};t.node;let a=(0,r.f)(t);e.s(["f",0,a],57665)},86207,14098,e=>{var r=e.i(56420);let t={name:"refresh-ccw-dot",size:24,node:[["path",{d:"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"14sxne"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16",key:"1hlbsb"}],["path",{d:"M16 16h5v5",key:"ccwih5"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]]};t.node;let a=(0,r.f)(t);e.s(["f",0,a],86207);var n=e.i(43476),s=e.i(71645),l=e.i(68759),i=e.i(32568),o=e.i(82983),c=e.i(41220),d=e.i(32781);e.s(["E",0,function({open:e,node:r,onClose:t,onSaved:a}){let[u,x]=(0,s.useState)([]),[h,m]=(0,s.useState)(""),[f,p]=(0,s.useState)(!0),[g,v]=(0,s.useState)(!1),[b,j]=(0,s.useState)(""),[y,N]=(0,s.useState)(!1);(0,s.useEffect)(()=>{e&&(j(""),m(r?.role?.id??""),p(!0),N(!0),(async()=>{try{let e=await o.f.roles.list();x(e.data??[])}catch{j("Failed to load roles")}finally{N(!1)}})())},[e,r?.role?.id]);let w=async()=>{if(r){v(!0),j("");try{let e=r.role?.id;e&&e!==h&&await o.f.roles.unassign(e,{nodeIds:[r.id]}),h&&await o.f.roles.assign(h,{nodeIds:[r.id],defer:!f});let n=h?u.find(e=>e.id===h)??null:null;a(n),t()}catch(e){j(e instanceof Error?e.message:"Failed to assign role")}finally{v(!1)}}},k=async()=>{if(r?.role){v(!0),j("");try{await o.f.roles.unassign(r.role.id,{nodeIds:[r.id]}),a(null),t()}catch(e){j(e instanceof Error?e.message:"Failed to unassign role")}finally{v(!1)}}},_=()=>{j(""),v(!1),t()};return(0,n.jsx)(i.n,{open:e,onClose:_,title:r?.role?"Change Role":"Assign Role",description:r?`Node: ${r.name}`:"",icon:(0,n.jsx)(c.f,{className:"h-5 w-5 text-primary"}),children:(0,n.jsxs)("div",{className:"space-y-4",children:[y?(0,n.jsxs)("div",{className:"flex items-center gap-2 py-4 text-xs text-text-muted",children:[(0,n.jsx)(d.f,{className:"h-4 w-4 animate-spin"}),"Loading roles…"]}):0===u.length?(0,n.jsx)("p",{className:"text-xs text-text-muted py-4",children:"No roles found. Create a role first on the Roles page."}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(i.G,{label:"Role",children:(0,n.jsxs)("select",{value:h,onChange:e=>m(e.target.value),className:i.N,children:[(0,n.jsx)("option",{value:"",children:"— No role —"}),u.map(e=>(0,n.jsx)("option",{value:e.id,children:e.name},e.id))]})}),h&&(0,n.jsxs)("label",{className:"flex items-center gap-2 text-xs cursor-pointer",children:[(0,n.jsx)("input",{type:"checkbox",checked:f,onChange:e=>p(e.target.checked),className:"rounded border-border"}),"Apply role immediately"]})]}),b&&(0,n.jsx)("div",{className:"rounded border border-danger/30 bg-danger/10 px-3 py-2 text-xs text-danger",children:b}),(0,n.jsxs)("div",{className:"flex justify-between pt-2",children:[(0,n.jsx)("div",{children:r?.role&&(0,n.jsx)(l.K,{variant:"secondary",size:"sm",onClick:()=>void k(),disabled:g,children:"Unassign Role"})}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(l.K,{variant:"secondary",size:"sm",onClick:_,children:"Cancel"}),(0,n.jsx)(l.K,{size:"sm",onClick:()=>void w(),disabled:g||!h||0===u.length,icon:g?(0,n.jsx)(d.f,{className:"h-3.5 w-3.5 animate-spin"}):void 0,children:g?"Saving…":r?.role?"Change Role":"Assign Role"})]})]})]})})},"F",0,function({open:e,node:r,onClose:t,onSaved:a}){let[u,x]=(0,s.useState)(""),[h,m]=(0,s.useState)(""),[f,p]=(0,s.useState)(""),[g,v]=(0,s.useState)(!1),[b,j]=(0,s.useState)("");(0,s.useEffect)(()=>{if(r){x(r.name);try{let e=JSON.parse(r.tags);m(e.join(", "))}catch{m("")}p(r.status),j("")}},[r]);let y=async()=>{if(r&&u.trim()){v(!0),j("");try{let e=h.split(",").map(e=>e.trim()).filter(Boolean);await o.f.nodes.update(r.id,{name:u.trim(),tags:e,status:f.toUpperCase()}),a(),t()}catch(e){j(e instanceof Error?e.message:"Failed to update node")}finally{v(!1)}}},N=()=>{j(""),v(!1),t()};return(0,n.jsx)(i.n,{open:e,onClose:N,title:"Edit Node",description:r?`${r.hostname}`:"",icon:(0,n.jsx)(c.f,{className:"h-5 w-5 text-primary"}),children:(0,n.jsxs)("div",{className:"space-y-4",children:[(0,n.jsx)(i.G,{label:"Name",required:!0,children:(0,n.jsx)("input",{type:"text",value:u,onChange:e=>x(e.target.value),className:i.W})}),(0,n.jsx)(i.G,{label:"Status",children:(0,n.jsxs)("select",{value:f,onChange:e=>p(e.target.value),className:i.N,children:[(0,n.jsx)("option",{value:"ONLINE",children:"ONLINE"}),(0,n.jsx)("option",{value:"OFFLINE",children:"OFFLINE"}),(0,n.jsx)("option",{value:"DEGRADED",children:"DEGRADED"}),(0,n.jsx)("option",{value:"PROVISIONING",children:"PROVISIONING"}),(0,n.jsx)("option",{value:"MAINTENANCE",children:"MAINTENANCE"})]})}),(0,n.jsxs)(i.G,{label:"Tags",children:[(0,n.jsx)("input",{type:"text",value:h,onChange:e=>m(e.target.value),placeholder:"web, production, us-east",className:i.W}),(0,n.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:"Comma-separated list of tags"})]}),b&&(0,n.jsx)("div",{className:"rounded border border-danger/30 bg-danger/10 px-3 py-2 text-xs text-danger",children:b}),(0,n.jsxs)("div",{className:"flex justify-end gap-2 pt-2",children:[(0,n.jsx)(l.K,{variant:"secondary",size:"sm",onClick:N,children:"Cancel"}),(0,n.jsx)(l.K,{size:"sm",onClick:()=>void y(),disabled:g||!u.trim(),icon:g?(0,n.jsx)(d.f,{className:"h-3.5 w-3.5 animate-spin"}):void 0,children:g?"Saving…":"Save Changes"})]})]})})},"M",0,function({open:e,onClose:r,onRegistered:t}){let[a,u]=(0,s.useState)(""),[x,h]=(0,s.useState)(""),[m,f]=(0,s.useState)("4100"),[p,g]=(0,s.useState)("linux"),[v,b]=(0,s.useState)("x86_64"),[j,y]=(0,s.useState)(""),[N,w]=(0,s.useState)(!1),[k,_]=(0,s.useState)(""),M=async()=>{if(a.trim()&&x.trim()){w(!0),_("");try{let e=j.split(",").map(e=>e.trim()).filter(Boolean);await o.f.nodes.register({name:a.trim(),hostname:x.trim(),ipAddress:x.trim(),port:Number(m)||4100,os:p,arch:v,tags:e,agentVersion:"1.1.2"}),t(),S()}catch(e){_(e instanceof Error?e.message:"Failed to register node")}finally{w(!1)}}},S=()=>{u(""),h(""),f("4100"),g("linux"),b("x86_64"),y(""),_(""),w(!1),r()};return(0,n.jsx)(i.n,{open:e,onClose:S,title:"Register Node",description:"Manually register a node already running the agent",icon:(0,n.jsx)(c.f,{className:"h-5 w-5 text-primary"}),children:(0,n.jsxs)("div",{className:"space-y-4",children:[(0,n.jsx)(i.G,{label:"Node Name",required:!0,children:(0,n.jsx)("input",{type:"text",value:a,onChange:e=>u(e.target.value),placeholder:"web-server-01",className:i.W,autoFocus:!0})}),(0,n.jsx)(i.G,{label:"FQDN / Hostname",required:!0,children:(0,n.jsx)("input",{type:"text",value:x,onChange:e=>h(e.target.value),placeholder:"node-1.example.com",className:i.W})}),(0,n.jsxs)("div",{className:"grid grid-cols-3 gap-3",children:[(0,n.jsx)(i.G,{label:"Port",children:(0,n.jsx)("input",{type:"number",value:m,onChange:e=>f(e.target.value),className:i.W})}),(0,n.jsx)(i.G,{label:"OS",children:(0,n.jsxs)("select",{value:p,onChange:e=>g(e.target.value),className:i.N,children:[(0,n.jsx)("option",{value:"linux",children:"Linux"}),(0,n.jsx)("option",{value:"darwin",children:"macOS"}),(0,n.jsx)("option",{value:"windows",children:"Windows"})]})}),(0,n.jsx)(i.G,{label:"Architecture",children:(0,n.jsxs)("select",{value:v,onChange:e=>b(e.target.value),className:i.N,children:[(0,n.jsx)("option",{value:"x86_64",children:"x86_64"}),(0,n.jsx)("option",{value:"aarch64",children:"aarch64"}),(0,n.jsx)("option",{value:"arm",children:"arm"})]})})]}),(0,n.jsxs)(i.G,{label:"Tags",children:[(0,n.jsx)("input",{type:"text",value:j,onChange:e=>y(e.target.value),placeholder:"web, production, us-east",className:i.W}),(0,n.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:"Comma-separated"})]}),k&&(0,n.jsx)("div",{className:"rounded border border-danger/30 bg-danger/10 px-3 py-2 text-xs text-danger",children:k}),(0,n.jsxs)("div",{className:"flex justify-end gap-2 pt-2",children:[(0,n.jsx)(l.K,{variant:"secondary",size:"sm",onClick:S,children:"Cancel"}),(0,n.jsx)(l.K,{size:"sm",onClick:()=>void M(),disabled:N||!a.trim()||!x.trim(),icon:N?(0,n.jsx)(d.f,{className:"h-3.5 w-3.5 animate-spin"}):void 0,children:N?"Registering…":"Register Node"})]})]})})}],14098)},25398,e=>{var r=e.i(56420);let t={name:"rotate-cw",size:24,node:[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]};t.node;let a=(0,r.f)(t);e.s(["f",0,a],25398)},90317,(e,r,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var a={bindSnapshot:function(){return d},createAsyncLocalStorage:function(){return o},createSnapshot:function(){return u},getOrCreateGlobalAsyncLocalStorage:function(){return c}};for(var n in a)Object.defineProperty(t,n,{enumerable:!0,get:a[n]});let s=Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available");class l{disable(){throw s}getStore(){}run(){throw s}exit(){throw s}enterWith(){throw s}static bind(e){return e}}let i="u">typeof globalThis&&globalThis.AsyncLocalStorage;function o(){return i?new i:new l}function c(e){let r=Symbol.for(`@next/${e}@16.4.3`),t=globalThis;return t[r]??=o()}function d(e){return i?i.bind(e):l.bind(e)}function u(){return i?i.snapshot():function(e,...r){return e(...r)}}},42344,(e,r,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"workAsyncStorageInstance",{enumerable:!0,get:function(){return a}});let a=(0,e.r(90317).getOrCreateGlobalAsyncLocalStorage)("work-async-storage")},63599,(e,r,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"workAsyncStorage",{enumerable:!0,get:function(){return a.workAsyncStorageInstance}});let a=e.r(42344)},70703,(e,r,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n}});let a=e.r(55682)._(e.r(69093));function n(e,r){let t={};"function"==typeof e&&(t.loader=e);let n={...t,...r};return(0,a.default)({...n,modules:n.loadableGenerated?.modules})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),r.exports=t.default)},9885,(e,r,t)=>{function a(e){return e.split("/").map(e=>encodeURIComponent(e)).join("/")}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"encodeURIPath",{enumerable:!0,get:function(){return a}})},67585,(e,r,t)=>{e.i(47167),Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BailoutToCSRForNextDynamic",{enumerable:!0,get:function(){return l}});let a=e.r(71645),n=e.r(74080);e.r(32061);let s=e.r(49354).createReactBrowserBailoutReason.bind(null,"next/dynamic");function l({children:e}){return(0,a.use)((0,n.browser)(s)),e}},69093,(e,r,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return c}});let a=e.r(43476),n=e.r(71645),s=e.r(67585),l=e.r(52157);function i(e){return{default:e&&"default"in e?e.default:e}}let o={loader:()=>Promise.resolve(i(()=>null)),loading:null,ssr:!0},c=function(e){let r={...o,...e},t=(0,n.lazy)(()=>r.loader().then(i)),c=r.loading;function d(e){let i=c?(0,a.jsx)(c,{isLoading:!0,pastDelay:!0,error:null}):null,o=!r.ssr||!!r.loading,d=o?n.Suspense:n.Fragment,u=r.ssr?(0,a.jsxs)(a.Fragment,{children:["u"<typeof window?(0,a.jsx)(l.PreloadChunks,{moduleIds:r.modules}):null,(0,a.jsx)(t,{...e})]}):(0,a.jsx)(s.BailoutToCSRForNextDynamic,{children:(0,a.jsx)(t,{...e})});return(0,a.jsx)(d,{...o?{fallback:i}:{},children:u})}return d.displayName="LoadableComponent",d}},52157,(e,r,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"PreloadChunks",{enumerable:!0,get:function(){return o}});let a=e.r(43476),n=e.r(74080),s=e.r(63599),l=e.r(9885),i=e.r(43369);function o({moduleIds:e}){if("u">typeof window)return null;let r=s.workAsyncStorage.getStore();if(void 0===r)return null;let t=[];if(r.reactLoadableManifest&&e){let a=r.reactLoadableManifest;for(let r of e){if(!a[r])continue;let e=a[r].files;t.push(...e)}}if(0===t.length)return null;let c=(0,i.getAssetTokenQuery)();return(0,a.jsx)(a.Fragment,{children:t.map(e=>{let t=`${r.assetPrefix}/_next/${(0,l.encodeURIPath)(e)}${c}`;return e.endsWith(".css")?(0,a.jsx)("link",{precedence:"dynamic",href:t,rel:"stylesheet",as:"style",nonce:r.nonce},e):((0,n.preload)(t,{as:"script",fetchPriority:"low",nonce:r.nonce}),null)})})}},49354,(e,r,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var a={createReactBrowserBailoutReason:function(){return l},getReactBrowserBailoutReason:function(){return i},isNextBrowserBailoutError:function(){return o}};for(var n in a)Object.defineProperty(t,n,{enumerable:!0,get:a[n]});let s=Symbol.for("next.browser-bailout-reason");function l(e){return{$$typeof:s,reason:e}}function i(e){let r=e?.cause;return r?.$$typeof===s?r.reason:void 0}function o(e){return void 0!==i(e)}}])})();
1
+ (()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,57108,e=>{var r=e.i(43476),t=e.i(46670);e.s(["f",0,function({configuration:e}){if(e?.memoryProvider!=="hivemem")return null;let a=e.hiveMemToken,n=a?.status??"unknown";return(0,r.jsxs)("span",{className:"flex flex-wrap items-center gap-1.5",children:[(0,r.jsxs)(t.t,{variant:"valid"===n?"success":"expiring"===n||"unreachable"===n||"unknown"===n?"warning":"danger",children:["Token ",n]}),a?.expiresAt&&(0,r.jsxs)("time",{dateTime:a.expiresAt,title:"HiveMem token expiration",children:["expires ",new Date(a.expiresAt).toLocaleString()]}),a?.checkedAt&&(0,r.jsxs)("time",{dateTime:a.checkedAt,className:"text-text-muted/70",title:"Last HiveMem authentication check",children:["checked ",new Date(a.checkedAt).toLocaleString()]})]})}])},46670,e=>{var r=e.i(43476),t=e.i(78571);let a={default:"border-border text-text-muted",success:"border-success/40 text-success bg-success/5 shadow-[0_0_6px_rgba(0,255,65,0.15)]",warning:"border-warning/40 text-warning bg-warning/5 shadow-[0_0_6px_rgba(255,179,0,0.15)]",danger:"border-danger/40 text-danger bg-danger/5 shadow-[0_0_6px_rgba(255,23,68,0.15)]",info:"border-info/40 text-info bg-info/5 shadow-[0_0_6px_rgba(0,176,255,0.15)]"},n={default:"bg-text-muted",success:"bg-success",warning:"bg-warning",danger:"bg-danger",info:"bg-info"};e.s(["t",0,function({children:e,variant:s="default",className:l,dot:i=!1,pulse:o=!1}){return(0,r.jsxs)("span",{className:(0,t.f)("inline-flex items-center gap-1.5 rounded-chip border px-2 py-0.5 text-[10px] font-bold uppercase tracking-wider",a[s],l),children:[i&&(0,r.jsxs)("span",{"aria-hidden":"true",className:"relative inline-flex h-1.5 w-1.5",children:[o&&(0,r.jsx)("span",{className:(0,t.f)("absolute inset-0 rounded-full animate-halo",n[s])}),(0,r.jsx)("span",{className:(0,t.f)("relative inline-flex h-1.5 w-1.5 rounded-full",n[s])})]}),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=>{var r=e.i(43476),t=e.i(56420);let a={name:"arrow-down-right",size:24,node:[["path",{d:"m7 7 10 10",key:"1fmybs"}],["path",{d:"M17 7v10H7",key:"6fjiku"}]]};a.node;let n=(0,t.f)(a);var s=e.i(75775),l=e.i(78571),i=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:t=100,tone:a,thresholds:n=o.q,label:s,size:i="xs",showValue:x=!1,valueLabel:h,glow:m,className:f,testId:p}){let g="number"==typeof e&&Number.isFinite(e),v=g?Math.max(0,Math.min(100,e/(t||1)*100)):0,b=a??(g?(0,o.Z)(v,n):"muted"),j=m||!a&&g&&v>=n.warn,y=h??(g?`${v.toFixed(+(v<10&&v>0))}%`:"—");return(0,r.jsxs)("div",{className:(0,l.f)("flex min-w-0 items-center gap-2",f),"data-testid":p,children:[(0,r.jsx)("div",{role:"meter","aria-label":s,"aria-valuemin":0,"aria-valuemax":t,"aria-valuenow":g?e:void 0,"aria-valuetext":y,className:(0,l.f)("relative flex-1 overflow-hidden rounded-full bg-border/70",d[i]),children:(0,r.jsx)("div",{style:{"--meter":`${v}%`},className:(0,l.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,r.jsx)("span",{className:(0,l.f)("num w-11 shrink-0 text-right text-[11px]",g?o.T[b]:"text-text-muted"),children:y})]})}e.s(["f",0,u],51196);var x=e.i(71645);function h({values:e,tone:t="primary",width:a=160,height:n=32,area:s=!0,max:i,percent:c=!1,threshold:d,live:u=!0,emptyLabel:m="not enough data",className:f,testId:p,label:g,stretch:v=!1}){let b=`spark${(0,x.useId)().replace(/:/g,"")}`;if(e.length<2)return(0,r.jsx)("div",{className:(0,l.f)("flex h-8 items-center text-xs italic text-text-muted",f),"data-testid":p,children:m});let j=o.v[t],y=i??(c?Math.max(100,...e):Math.max(...e,d??0)||1),N=n-4,w=a/(e.length-1),k=e=>2+N-Math.max(0,e)/y*N,_=e.map((e,r)=>[r*w,k(e)]),M=_.map(([e,r])=>`${e.toFixed(1)},${r.toFixed(1)}`).join(" "),S=_[_.length-1];return(0,r.jsxs)("svg",{width:v?"100%":a,height:n,viewBox:`0 0 ${a} ${n}`,preserveAspectRatio:v?"none":void 0,className:(0,l.f)("block overflow-visible",f),"data-testid":p,role:g?"img":void 0,"aria-label":g,"aria-hidden":!g||void 0,children:[s&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("defs",{children:(0,r.jsxs)("linearGradient",{id:b,x1:"0",x2:"0",y1:"0",y2:"1",children:[(0,r.jsx)("stop",{offset:"0%",stopColor:j,stopOpacity:.35}),(0,r.jsx)("stop",{offset:"100%",stopColor:j,stopOpacity:0})]})}),(0,r.jsx)("polygon",{points:`0,${n} ${M} ${a},${n}`,fill:`url(#${b})`})]}),void 0!==d&&(0,r.jsx)("line",{x1:0,x2:a,y1:k(d),y2:k(d),stroke:"var(--color-warning)",strokeOpacity:.5,strokeDasharray:"3 3",strokeWidth:1}),(0,r.jsx)("polyline",{fill:"none",stroke:j,strokeWidth:1.5,vectorEffect:"non-scaling-stroke",strokeLinejoin:"round",strokeLinecap:"round",points:M}),u&&!v&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("circle",{cx:S[0],cy:S[1],r:2.5,fill:j,className:"origin-center animate-halo [transform-box:fill-box]"}),(0,r.jsx)("circle",{cx:S[0],cy:S[1],r:2,fill:j})]})]})}e.s(["f",0,h],55427),e.s(["N",0,function({title:e,description:t,children:a,className:n,action:s,tone:l,corners:o=!1,...c}){return(0,r.jsx)(i.f,{...c,tone:l,corners:o,title:e,description:t,action:s,className:n,children:a})},"n",0,function({label:e,value:t,icon:a,trend:c,spark:d,meter:x,delta:m,tone:f="primary",className:p,testId:g}){let v=!m||m.value>=0===(m.positiveIsGood??!0);return(0,r.jsxs)(i.f,{tone:f,className:(0,l.f)("overflow-hidden",p),testId:g,children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)("span",{className:"text-[10px] font-medium uppercase tracking-[0.15em] text-text-muted",children:e}),a&&(0,r.jsx)("span",{className:"text-primary/60",children:a})]}),(0,r.jsxs)("div",{className:"mt-2 flex items-end justify-between gap-2",children:[(0,r.jsx)("div",{className:(0,l.f)("num text-2xl font-bold","primary"===f?"text-primary neon-text":o.T[f]),children:t}),m&&0!==m.value&&(0,r.jsxs)("span",{className:(0,l.f)("num mb-1 inline-flex items-center gap-0.5 text-[11px]",v?"text-success":"text-danger"),children:[m.value>0?(0,r.jsx)(s.f,{className:"h-3 w-3"}):(0,r.jsx)(n,{className:"h-3 w-3"}),Math.abs(m.value).toFixed(+!Number.isInteger(m.value)),m.unit]})]}),c&&(0,r.jsx)("div",{className:(0,l.f)("mt-1 text-[11px]",c.positive?"text-success":"text-danger"),children:c.value}),void 0!==x&&(0,r.jsx)(u,{value:x,className:"mt-3",label:e}),d&&d.length>1&&(0,r.jsx)("div",{className:"-mx-5 -mb-5 mt-3 opacity-80",children:(0,r.jsx)(h,{values:d,tone:f,width:240,height:28,stretch:!0,live:!1})})]})}],93999)},54149,21176,e=>{var r=e.i(43476),t=e.i(71645),a=e.i(78571),n=e.i(35084);e.s(["f",0,function({value:e,max:s=100,label:l,sublabel:i,tone:o,thresholds:c=n.q,higherIsBetter:d=!1,size:u=140,display:x,ticks:h=!0,hideLabel:m=!1,className:f,testId:p}){let g=(0,t.useId)().replace(/:/g,""),v="number"==typeof e&&Number.isFinite(e),b=v?Math.max(0,Math.min(100,e/(s||1)*100)):0,j=o??(v?d?(0,n.Z)(100-b,c):(0,n.Z)(b,c):"muted"),y=Math.max(4,Math.round(u/16)),N=50-y/2-4,w=2*Math.PI*N,k=.75*w,_=k*b/100,M=u>=140,S=x??(v?`${Math.round(b)}%`:"—"),C=h?Array.from({length:11},(e,t)=>{let a=(135+270*t/10)*Math.PI/180,n=50-(t%5==0?4:2.5);return(0,r.jsx)("line",{x1:50+48.5*Math.cos(a),y1:50+48.5*Math.sin(a),x2:50+n*Math.cos(a),y2:50+n*Math.sin(a),stroke:"var(--color-border-strong)",strokeWidth:.8},t)}):null;return(0,r.jsxs)("div",{role:"img","aria-label":`${l}: ${S}`,"data-testid":p,className:(0,a.f)("relative inline-flex flex-col items-center",f),style:{width:u},children:[(0,r.jsxs)("svg",{viewBox:"0 0 100 100",width:u,height:u,"aria-hidden":"true",className:"overflow-visible",children:[M&&(0,r.jsx)("defs",{children:(0,r.jsxs)("filter",{id:`g${g}`,x:"-30%",y:"-30%",width:"160%",height:"160%",children:[(0,r.jsx)("feGaussianBlur",{stdDeviation:"2.2",result:"blur"}),(0,r.jsxs)("feMerge",{children:[(0,r.jsx)("feMergeNode",{in:"blur"}),(0,r.jsx)("feMergeNode",{in:"SourceGraphic"})]})]})}),C,(0,r.jsx)("circle",{cx:50,cy:50,r:N,fill:"none",stroke:"var(--color-border)",strokeWidth:y,strokeLinecap:"round",strokeDasharray:`${k} ${w}`,transform:"rotate(135 50 50)"}),(0,r.jsx)("circle",{cx:50,cy:50,r:N,fill:"none",stroke:n.v[j],strokeWidth:y,strokeLinecap:"round",transform:"rotate(135 50 50)",filter:M?`url(#g${g})`:void 0,style:{"--dash":`${_} ${w}`},className:"[stroke-dasharray:var(--dash)] transition-[stroke-dasharray] duration-1000 ease-out-expo starting:[stroke-dasharray:0_1000]"})]}),(0,r.jsxs)("div",{className:"pointer-events-none absolute inset-0 flex flex-col items-center justify-center",style:{height:u},children:[(0,r.jsx)("span",{className:(0,a.f)("num font-bold leading-none",n.T[j],M&&n.z[j]),style:{fontSize:Math.max(12,.2*u)},children:S}),i&&(0,r.jsx)("span",{className:"num mt-1 text-text-muted",style:{fontSize:Math.max(9,.075*u)},children:i})]}),!m&&(0,r.jsx)("span",{className:"-mt-[10%] text-center text-[10px] font-medium uppercase tracking-[0.15em] text-text-muted",children:l})]})}],54149);var s=e.i(70703),l=e.i(65369);let i=(0,s.default)(()=>e.A(1321),{loadableGenerated:{modules:[69944]},ssr:!1,loading:()=>(0,r.jsx)(l.l,{className:"h-[180px] w-full"})});e.s(["f",0,i],21176)},3062,e=>{var r=e.i(43476),t=e.i(78571),a=e.i(35084);let n={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)]"},s={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"},i={none:"",sm:"p-3",md:"p-5",lg:"p-6"};e.s(["f",0,function({tone:e="primary",corners:o=!0,interactive:c=!0,hero:d=!1,title:u,description:x,icon:h,action:m,as:f="div",padding:p="md",testId:g,className:v,children:b,...j}){return(0,r.jsxs)(f,{...j,"data-testid":g??j["data-testid"],className:(0,t.f)("relative rounded-panel border border-border bg-surface transition-colors duration-300",i[p],o&&"panel-corners",o&&n[e],c&&"glow-hover",c&&s[e],c&&l[e],d&&"grid-bg overflow-hidden bg-surface/80",v),children:[(u||m||h)&&(0,r.jsxs)("div",{className:"mb-4 flex items-start justify-between gap-3",children:[(0,r.jsxs)("div",{className:"flex min-w-0 items-start gap-2",children:[h&&(0,r.jsx)("span",{className:(0,t.f)("mt-0.5 shrink-0",a.T[e]),children:h}),(0,r.jsxs)("div",{className:"min-w-0",children:[u&&(0,r.jsx)("h3",{className:"text-xs font-bold uppercase tracking-wider",children:u}),x&&(0,r.jsx)("p",{className:"mt-0.5 text-[11px] text-text-muted",children:x})]})]}),m]}),b]})}])},65369,e=>{var r=e.i(43476),t=e.i(78571);function a({className:e}){return(0,r.jsx)("div",{"aria-hidden":"true",className:(0,t.f)("skeleton h-3 w-full",e)})}e.s(["l",0,a,"g",0,function({count:e=4,className:n}){return(0,r.jsx)("div",{role:"status","aria-label":"Loading",className:(0,t.f)("grid gap-4 sm:grid-cols-2 lg:grid-cols-4",n),children:Array.from({length:e},(e,t)=>(0,r.jsxs)("div",{className:"panel-corners rounded-panel border border-border bg-surface p-5",children:[(0,r.jsx)(a,{className:"h-2 w-1/2"}),(0,r.jsx)(a,{className:"mt-4 h-7 w-2/3"}),(0,r.jsx)(a,{className:"mt-3 h-1 w-full opacity-60"})]},t))})},"F",0,function({rows:e=5,cols:n=4,className:s}){return(0,r.jsxs)("div",{role:"status","aria-label":"Loading",className:(0,t.f)("overflow-hidden rounded-panel border border-border",s),children:[(0,r.jsx)("div",{className:"flex gap-4 border-b border-border bg-surface px-4 py-3",children:Array.from({length:n},(e,t)=>(0,r.jsx)(a,{className:"h-2 flex-1 opacity-60"},t))}),Array.from({length:e},(e,s)=>(0,r.jsx)("div",{className:"flex gap-4 border-b border-border/50 px-4 py-3 last:border-0",children:Array.from({length:n},(e,n)=>(0,r.jsx)(a,{className:(0,t.f)("h-3 flex-1",(s+n)%3==0&&"max-w-[60%]")},n))},s))]})},"Q",0,function({lines:e=3,className:n}){let s=["w-full","w-11/12","w-4/5","w-2/3","w-3/4"];return(0,r.jsx)("div",{role:"status","aria-label":"Loading",className:(0,t.f)("space-y-2",n),children:Array.from({length:e},(e,t)=>(0,r.jsx)(a,{className:s[t%s.length]},t))})}])},75723,e=>{var r=e.i(43476),t=e.i(78571),a=e.i(46670);let n={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"},s={success:"bg-success",warning:"bg-warning",danger:"bg-danger",info:"bg-info",default:"bg-text-muted"},l=new Set(["ONLINE","RUNNING","ACTIVE","HEALTHY","CRITICAL","UPDATING","PROVISIONING"]);e.s(["f",0,function({status:e,pulse:i,size:o="sm",className:c,label:d}){let u=(0,a.k)(e),x=i??l.has(e.toUpperCase()),h="xs"===o?"h-1.5 w-1.5":"h-2 w-2";return(0,r.jsxs)("span",{className:(0,t.f)("relative inline-flex shrink-0",h,c),role:d?"img":void 0,"aria-label":d,"aria-hidden":!d||void 0,children:[x&&(0,r.jsx)("span",{className:(0,t.f)("absolute inset-0 rounded-full animate-halo",s[u])}),(0,r.jsx)("span",{className:(0,t.f)("relative inline-flex rounded-full",h,n[u])})]})}])},71417,e=>{e.s(["L",0,function(e){if(0===e)return"0 B";let r=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,r)).toFixed(1))} ${["B","KB","MB","GB","TB"][r]}`},"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=>{var r=e.i(56420);let t={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"}]]};t.node;let a=(0,r.f)(t);e.s(["f",0,a],79432)},9347,e=>{var r=e.i(56420);let t={name:"arrow-left",size:24,node:[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]};t.node;let a=(0,r.f)(t);e.s(["f",0,a],9347)},75775,e=>{var r=e.i(56420);let t={name:"arrow-up-right",size:24,node:[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]};t.node;let a=(0,r.f)(t);e.s(["f",0,a],75775)},82022,e=>{var r=e.i(56420);let t={name:"external-link",size:24,node:[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]};t.node;let a=(0,r.f)(t);e.s(["f",0,a],82022)},57665,e=>{var r=e.i(56420);let t={name:"power",size:24,node:[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]};t.node;let a=(0,r.f)(t);e.s(["f",0,a],57665)},86207,14098,e=>{var r=e.i(56420);let t={name:"refresh-ccw-dot",size:24,node:[["path",{d:"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"14sxne"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16",key:"1hlbsb"}],["path",{d:"M16 16h5v5",key:"ccwih5"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]]};t.node;let a=(0,r.f)(t);e.s(["f",0,a],86207);var n=e.i(43476),s=e.i(71645),l=e.i(68759),i=e.i(32568),o=e.i(82983),c=e.i(41220),d=e.i(32781);e.s(["E",0,function({open:e,node:r,onClose:t,onSaved:a}){let[u,x]=(0,s.useState)([]),[h,m]=(0,s.useState)(""),[f,p]=(0,s.useState)(!0),[g,v]=(0,s.useState)(!1),[b,j]=(0,s.useState)(""),[y,N]=(0,s.useState)(!1);(0,s.useEffect)(()=>{e&&(j(""),m(r?.role?.id??""),p(!0),N(!0),(async()=>{try{let e=await o.f.roles.list();x(e.data??[])}catch{j("Failed to load roles")}finally{N(!1)}})())},[e,r?.role?.id]);let w=async()=>{if(r){v(!0),j("");try{let e=r.role?.id;e&&e!==h&&await o.f.roles.unassign(e,{nodeIds:[r.id]}),h&&await o.f.roles.assign(h,{nodeIds:[r.id],defer:!f});let n=h?u.find(e=>e.id===h)??null:null;a(n),t()}catch(e){j(e instanceof Error?e.message:"Failed to assign role")}finally{v(!1)}}},k=async()=>{if(r?.role){v(!0),j("");try{await o.f.roles.unassign(r.role.id,{nodeIds:[r.id]}),a(null),t()}catch(e){j(e instanceof Error?e.message:"Failed to unassign role")}finally{v(!1)}}},_=()=>{j(""),v(!1),t()};return(0,n.jsx)(i.n,{open:e,onClose:_,title:r?.role?"Change Role":"Assign Role",description:r?`Node: ${r.name}`:"",icon:(0,n.jsx)(c.f,{className:"h-5 w-5 text-primary"}),children:(0,n.jsxs)("div",{className:"space-y-4",children:[y?(0,n.jsxs)("div",{className:"flex items-center gap-2 py-4 text-xs text-text-muted",children:[(0,n.jsx)(d.f,{className:"h-4 w-4 animate-spin"}),"Loading roles…"]}):0===u.length?(0,n.jsx)("p",{className:"text-xs text-text-muted py-4",children:"No roles found. Create a role first on the Roles page."}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(i.G,{label:"Role",children:(0,n.jsxs)("select",{value:h,onChange:e=>m(e.target.value),className:i.N,children:[(0,n.jsx)("option",{value:"",children:"— No role —"}),u.map(e=>(0,n.jsx)("option",{value:e.id,children:e.name},e.id))]})}),h&&(0,n.jsxs)("label",{className:"flex items-center gap-2 text-xs cursor-pointer",children:[(0,n.jsx)("input",{type:"checkbox",checked:f,onChange:e=>p(e.target.checked),className:"rounded border-border"}),"Apply role immediately"]})]}),b&&(0,n.jsx)("div",{className:"rounded border border-danger/30 bg-danger/10 px-3 py-2 text-xs text-danger",children:b}),(0,n.jsxs)("div",{className:"flex justify-between pt-2",children:[(0,n.jsx)("div",{children:r?.role&&(0,n.jsx)(l.K,{variant:"secondary",size:"sm",onClick:()=>void k(),disabled:g,children:"Unassign Role"})}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(l.K,{variant:"secondary",size:"sm",onClick:_,children:"Cancel"}),(0,n.jsx)(l.K,{size:"sm",onClick:()=>void w(),disabled:g||!h||0===u.length,icon:g?(0,n.jsx)(d.f,{className:"h-3.5 w-3.5 animate-spin"}):void 0,children:g?"Saving…":r?.role?"Change Role":"Assign Role"})]})]})]})})},"F",0,function({open:e,node:r,onClose:t,onSaved:a}){let[u,x]=(0,s.useState)(""),[h,m]=(0,s.useState)(""),[f,p]=(0,s.useState)(""),[g,v]=(0,s.useState)(!1),[b,j]=(0,s.useState)("");(0,s.useEffect)(()=>{if(r){x(r.name);try{let e=JSON.parse(r.tags);m(e.join(", "))}catch{m("")}p(r.status),j("")}},[r]);let y=async()=>{if(r&&u.trim()){v(!0),j("");try{let e=h.split(",").map(e=>e.trim()).filter(Boolean);await o.f.nodes.update(r.id,{name:u.trim(),tags:e,status:f.toUpperCase()}),a(),t()}catch(e){j(e instanceof Error?e.message:"Failed to update node")}finally{v(!1)}}},N=()=>{j(""),v(!1),t()};return(0,n.jsx)(i.n,{open:e,onClose:N,title:"Edit Node",description:r?`${r.hostname}`:"",icon:(0,n.jsx)(c.f,{className:"h-5 w-5 text-primary"}),children:(0,n.jsxs)("div",{className:"space-y-4",children:[(0,n.jsx)(i.G,{label:"Name",required:!0,children:(0,n.jsx)("input",{type:"text",value:u,onChange:e=>x(e.target.value),className:i.W})}),(0,n.jsx)(i.G,{label:"Status",children:(0,n.jsxs)("select",{value:f,onChange:e=>p(e.target.value),className:i.N,children:[(0,n.jsx)("option",{value:"ONLINE",children:"ONLINE"}),(0,n.jsx)("option",{value:"OFFLINE",children:"OFFLINE"}),(0,n.jsx)("option",{value:"DEGRADED",children:"DEGRADED"}),(0,n.jsx)("option",{value:"PROVISIONING",children:"PROVISIONING"}),(0,n.jsx)("option",{value:"MAINTENANCE",children:"MAINTENANCE"})]})}),(0,n.jsxs)(i.G,{label:"Tags",children:[(0,n.jsx)("input",{type:"text",value:h,onChange:e=>m(e.target.value),placeholder:"web, production, us-east",className:i.W}),(0,n.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:"Comma-separated list of tags"})]}),b&&(0,n.jsx)("div",{className:"rounded border border-danger/30 bg-danger/10 px-3 py-2 text-xs text-danger",children:b}),(0,n.jsxs)("div",{className:"flex justify-end gap-2 pt-2",children:[(0,n.jsx)(l.K,{variant:"secondary",size:"sm",onClick:N,children:"Cancel"}),(0,n.jsx)(l.K,{size:"sm",onClick:()=>void y(),disabled:g||!u.trim(),icon:g?(0,n.jsx)(d.f,{className:"h-3.5 w-3.5 animate-spin"}):void 0,children:g?"Saving…":"Save Changes"})]})]})})},"M",0,function({open:e,onClose:r,onRegistered:t}){let[a,u]=(0,s.useState)(""),[x,h]=(0,s.useState)(""),[m,f]=(0,s.useState)("4100"),[p,g]=(0,s.useState)("linux"),[v,b]=(0,s.useState)("x86_64"),[j,y]=(0,s.useState)(""),[N,w]=(0,s.useState)(!1),[k,_]=(0,s.useState)(""),M=async()=>{if(a.trim()&&x.trim()){w(!0),_("");try{let e=j.split(",").map(e=>e.trim()).filter(Boolean);await o.f.nodes.register({name:a.trim(),hostname:x.trim(),ipAddress:x.trim(),port:Number(m)||4100,os:p,arch:v,tags:e,agentVersion:"1.1.3"}),t(),S()}catch(e){_(e instanceof Error?e.message:"Failed to register node")}finally{w(!1)}}},S=()=>{u(""),h(""),f("4100"),g("linux"),b("x86_64"),y(""),_(""),w(!1),r()};return(0,n.jsx)(i.n,{open:e,onClose:S,title:"Register Node",description:"Manually register a node already running the agent",icon:(0,n.jsx)(c.f,{className:"h-5 w-5 text-primary"}),children:(0,n.jsxs)("div",{className:"space-y-4",children:[(0,n.jsx)(i.G,{label:"Node Name",required:!0,children:(0,n.jsx)("input",{type:"text",value:a,onChange:e=>u(e.target.value),placeholder:"web-server-01",className:i.W,autoFocus:!0})}),(0,n.jsx)(i.G,{label:"FQDN / Hostname",required:!0,children:(0,n.jsx)("input",{type:"text",value:x,onChange:e=>h(e.target.value),placeholder:"node-1.example.com",className:i.W})}),(0,n.jsxs)("div",{className:"grid grid-cols-3 gap-3",children:[(0,n.jsx)(i.G,{label:"Port",children:(0,n.jsx)("input",{type:"number",value:m,onChange:e=>f(e.target.value),className:i.W})}),(0,n.jsx)(i.G,{label:"OS",children:(0,n.jsxs)("select",{value:p,onChange:e=>g(e.target.value),className:i.N,children:[(0,n.jsx)("option",{value:"linux",children:"Linux"}),(0,n.jsx)("option",{value:"darwin",children:"macOS"}),(0,n.jsx)("option",{value:"windows",children:"Windows"})]})}),(0,n.jsx)(i.G,{label:"Architecture",children:(0,n.jsxs)("select",{value:v,onChange:e=>b(e.target.value),className:i.N,children:[(0,n.jsx)("option",{value:"x86_64",children:"x86_64"}),(0,n.jsx)("option",{value:"aarch64",children:"aarch64"}),(0,n.jsx)("option",{value:"arm",children:"arm"})]})})]}),(0,n.jsxs)(i.G,{label:"Tags",children:[(0,n.jsx)("input",{type:"text",value:j,onChange:e=>y(e.target.value),placeholder:"web, production, us-east",className:i.W}),(0,n.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:"Comma-separated"})]}),k&&(0,n.jsx)("div",{className:"rounded border border-danger/30 bg-danger/10 px-3 py-2 text-xs text-danger",children:k}),(0,n.jsxs)("div",{className:"flex justify-end gap-2 pt-2",children:[(0,n.jsx)(l.K,{variant:"secondary",size:"sm",onClick:S,children:"Cancel"}),(0,n.jsx)(l.K,{size:"sm",onClick:()=>void M(),disabled:N||!a.trim()||!x.trim(),icon:N?(0,n.jsx)(d.f,{className:"h-3.5 w-3.5 animate-spin"}):void 0,children:N?"Registering…":"Register Node"})]})]})})}],14098)},25398,e=>{var r=e.i(56420);let t={name:"rotate-cw",size:24,node:[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]};t.node;let a=(0,r.f)(t);e.s(["f",0,a],25398)},90317,(e,r,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var a={bindSnapshot:function(){return d},createAsyncLocalStorage:function(){return o},createSnapshot:function(){return u},getOrCreateGlobalAsyncLocalStorage:function(){return c}};for(var n in a)Object.defineProperty(t,n,{enumerable:!0,get:a[n]});let s=Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available");class l{disable(){throw s}getStore(){}run(){throw s}exit(){throw s}enterWith(){throw s}static bind(e){return e}}let i="u">typeof globalThis&&globalThis.AsyncLocalStorage;function o(){return i?new i:new l}function c(e){let r=Symbol.for(`@next/${e}@16.4.3`),t=globalThis;return t[r]??=o()}function d(e){return i?i.bind(e):l.bind(e)}function u(){return i?i.snapshot():function(e,...r){return e(...r)}}},42344,(e,r,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"workAsyncStorageInstance",{enumerable:!0,get:function(){return a}});let a=(0,e.r(90317).getOrCreateGlobalAsyncLocalStorage)("work-async-storage")},63599,(e,r,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"workAsyncStorage",{enumerable:!0,get:function(){return a.workAsyncStorageInstance}});let a=e.r(42344)},70703,(e,r,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n}});let a=e.r(55682)._(e.r(69093));function n(e,r){let t={};"function"==typeof e&&(t.loader=e);let n={...t,...r};return(0,a.default)({...n,modules:n.loadableGenerated?.modules})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),r.exports=t.default)},9885,(e,r,t)=>{function a(e){return e.split("/").map(e=>encodeURIComponent(e)).join("/")}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"encodeURIPath",{enumerable:!0,get:function(){return a}})},67585,(e,r,t)=>{e.i(47167),Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BailoutToCSRForNextDynamic",{enumerable:!0,get:function(){return l}});let a=e.r(71645),n=e.r(74080);e.r(32061);let s=e.r(49354).createReactBrowserBailoutReason.bind(null,"next/dynamic");function l({children:e}){return(0,a.use)((0,n.browser)(s)),e}},69093,(e,r,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return c}});let a=e.r(43476),n=e.r(71645),s=e.r(67585),l=e.r(52157);function i(e){return{default:e&&"default"in e?e.default:e}}let o={loader:()=>Promise.resolve(i(()=>null)),loading:null,ssr:!0},c=function(e){let r={...o,...e},t=(0,n.lazy)(()=>r.loader().then(i)),c=r.loading;function d(e){let i=c?(0,a.jsx)(c,{isLoading:!0,pastDelay:!0,error:null}):null,o=!r.ssr||!!r.loading,d=o?n.Suspense:n.Fragment,u=r.ssr?(0,a.jsxs)(a.Fragment,{children:["u"<typeof window?(0,a.jsx)(l.PreloadChunks,{moduleIds:r.modules}):null,(0,a.jsx)(t,{...e})]}):(0,a.jsx)(s.BailoutToCSRForNextDynamic,{children:(0,a.jsx)(t,{...e})});return(0,a.jsx)(d,{...o?{fallback:i}:{},children:u})}return d.displayName="LoadableComponent",d}},52157,(e,r,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"PreloadChunks",{enumerable:!0,get:function(){return o}});let a=e.r(43476),n=e.r(74080),s=e.r(63599),l=e.r(9885),i=e.r(43369);function o({moduleIds:e}){if("u">typeof window)return null;let r=s.workAsyncStorage.getStore();if(void 0===r)return null;let t=[];if(r.reactLoadableManifest&&e){let a=r.reactLoadableManifest;for(let r of e){if(!a[r])continue;let e=a[r].files;t.push(...e)}}if(0===t.length)return null;let c=(0,i.getAssetTokenQuery)();return(0,a.jsx)(a.Fragment,{children:t.map(e=>{let t=`${r.assetPrefix}/_next/${(0,l.encodeURIPath)(e)}${c}`;return e.endsWith(".css")?(0,a.jsx)("link",{precedence:"dynamic",href:t,rel:"stylesheet",as:"style",nonce:r.nonce},e):((0,n.preload)(t,{as:"script",fetchPriority:"low",nonce:r.nonce}),null)})})}},49354,(e,r,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var a={createReactBrowserBailoutReason:function(){return l},getReactBrowserBailoutReason:function(){return i},isNextBrowserBailoutError:function(){return o}};for(var n in a)Object.defineProperty(t,n,{enumerable:!0,get:a[n]});let s=Symbol.for("next.browser-bailout-reason");function l(e){return{$$typeof:s,reason:e}}function i(e){let r=e?.cause;return r?.$$typeof===s?r.reason:void 0}function o(e){return void 0!==i(e)}}])})();
@@ -1 +1 @@
1
- (()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,47061,e=>{var s=e.i(43476),t=e.i(71645),a=e.i(68759),r=e.i(46670),n=e.i(93999),i=e.i(32568),l=e.i(82983),c=e.i(34479),o=e.i(4050),d=e.i(95187);let x=(0,d.createServerReference)("40e8faac3d47122c38c2296e6d0fc97769e3ec40f2",d.callServer,void 0,d.findSourceMapURL,"scanCron");var m=e.i(78571),h=e.i(63376),u=e.i(88187),p=e.i(41120),f=e.i(66595),j=e.i(74544),v=e.i(41220),g=e.i(16327),b=e.i(67927),N=e.i(25981),w=e.i(32781),y=e.i(4139),k=e.i(49882),S=e.i(53138),_=e.i(51757),C=e.i(83967);e.s(["default",0,function(){let{activeNode:e}=(0,o.l)(),[d,I]=(0,t.useState)([]),[E,$]=(0,t.useState)(!1),[L,M]=(0,t.useState)(null),[D,z]=(0,t.useState)(!1),[R,T]=(0,t.useState)(""),[O,A]=(0,t.useState)(new Set),[P,F]=(0,t.useState)(null),[U,G]=(0,t.useState)("1.0.0"),[W,K]=(0,t.useState)(""),[H,q]=(0,t.useState)(!1),B=(0,t.useCallback)(async()=>{$(!0),I([]),M(null);let s=Date.now();try{let s=await x(e.id);if(s.success&&Array.isArray(s.data)){let e=s.data.map(e=>({...e,status:"error"===e.status?"error":"done"}));I(e);let t=new Set(e.filter(e=>e.jobs.length>0).map(e=>e.nodeId));A(t.size>0?t:new Set(e.map(e=>e.nodeId)))}else M(s.error?.message??"Scan returned unsuccessful response")}catch(s){let e=s instanceof Error?s.message:"Scan request failed";M(e)}finally{let e=Date.now()-s;e<1500&&await new Promise(s=>setTimeout(s,1500-e)),$(!1),z(!0)}},[e]);(0,t.useEffect)(()=>{e&&B()},[e,B]);let J=d.reduce((e,s)=>e+("done"===s.status?s.jobs.length:0),0),V=d.filter(e=>"done"===e.status).length,Q=d.filter(e=>"error"===e.status).length,Y=e=>{if(!R)return!0;let s=R.toLowerCase();return e.name.toLowerCase().includes(s)||e.command.toLowerCase().includes(s)||e.schedule.toLowerCase().includes(s)||(e.user?.toLowerCase().includes(s)??!1)},Z=async()=>{if(P&&U){q(!0);try{let e=JSON.stringify({name:P.job.name,version:U,schedule:P.job.schedule,command:P.job.command,description:W},null,2);await l.f.library.files.create({name:`${P.job.name} v${U}`,fileName:`${P.job.name}-${U}.json`,mimeType:"application/x-magnus-cronjob",content:e,tags:["cronjob","cron"]}),F(null),G("1.0.0"),K("")}catch{}finally{q(!1)}}};return(0,s.jsxs)(h.U,{className:"space-y-6",children:[(0,s.jsx)(h.z,{children:(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h1",{className:"text-lg font-bold uppercase tracking-wider",children:"Cron Jobs"}),(0,s.jsx)("p",{className:"text-[11px] text-text-muted uppercase tracking-wider",children:"Discover and manage scheduled jobs across your fleet"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[D&&!E&&(0,s.jsxs)("span",{className:"text-[10px] text-text-muted uppercase tracking-wider mr-2",children:[d.length," node",1!==d.length?"s":""," · ",J," job",1!==J?"s":"",Q>0&&` \xb7 ${Q} error${1!==Q?"s":""}`]}),(0,s.jsxs)(a.K,{variant:"secondary",size:"sm",onClick:()=>void B(),disabled:E,children:[(0,s.jsx)(p.f,{className:(0,m.f)("h-3.5 w-3.5 mr-1.5",E&&"animate-spin")}),E?"Scanning...":"Rescan"]})]})]})}),E&&(0,s.jsx)(h.z,{children:(0,s.jsx)(u.f,{title:"Scanning Nodes for Cron Jobs",description:"Probing all online nodes...",nodes:d.map(e=>({nodeId:e.nodeId,nodeName:e.nodeName,status:e.status,error:e.error})),scanning:!0})}),!E&&D&&J>0&&(0,s.jsx)(h.z,{children:(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)(f.f,{className:"absolute left-3 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-text-muted"}),(0,s.jsx)("input",{type:"text",placeholder:"Search jobs by name, command, or schedule...",value:R,onChange:e=>T(e.target.value),className:(0,m.f)(i.W,"pl-9")})]})}),!E&&D&&L&&(0,s.jsx)(h.z,{children:(0,s.jsx)(n.N,{children:(0,s.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[(0,s.jsx)(S.f,{className:"h-10 w-10 text-danger/60 mb-3"}),(0,s.jsx)("p",{className:"text-xs font-bold text-danger mb-1",children:"Scan Failed"}),(0,s.jsx)("p",{className:"text-[11px] text-text-muted max-w-md",children:L}),(0,s.jsxs)(a.K,{variant:"secondary",size:"sm",className:"mt-4",onClick:()=>void B(),children:[(0,s.jsx)(p.f,{className:"h-3.5 w-3.5 mr-1.5"}),"Retry Scan"]})]})})}),!E&&D&&!L&&(0,s.jsxs)(s.Fragment,{children:[0===d.length?(0,s.jsx)(h.z,{children:(0,s.jsx)(n.N,{children:(0,s.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[(0,s.jsx)(v.f,{className:"h-10 w-10 text-text-muted/40 mb-3"}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"No online nodes found to scan. Ensure at least one node agent is running and connected."})]})})}):d.map(e=>{let t=O.has(e.nodeId),i=e.jobs.filter(Y);return(0,s.jsx)(h.z,{children:(0,s.jsxs)(n.N,{className:"overflow-hidden",children:[(0,s.jsxs)("button",{onClick:()=>{var s;return s=e.nodeId,void A(e=>{let t=new Set(e);return t.has(s)?t.delete(s):t.add(s),t})},className:"w-full flex items-center gap-4 p-4 text-left hover:bg-surface-hover transition-all",children:[(0,s.jsx)("div",{className:"flex h-9 w-9 items-center justify-center rounded border border-primary/30 bg-primary/5 shrink-0",children:(0,s.jsx)(v.f,{className:"h-4 w-4 text-primary"})}),(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"text-xs font-bold uppercase tracking-wider",children:e.nodeName}),"done"===e.status&&(0,s.jsxs)(r.t,{variant:e.jobs.length>0?"success":"default",children:[e.jobs.length," job",1!==e.jobs.length?"s":""]}),"error"===e.status&&((0,c.f)(e.error)?(0,s.jsx)(r.t,{variant:"default",children:"Disabled"}):(0,s.jsx)(r.t,{variant:"danger",children:"Error"}))]}),"error"===e.status&&e.error&&(0,s.jsx)("p",{className:(0,m.f)("text-[11px] mt-0.5 truncate",(0,c.f)(e.error)?"text-text-muted":"text-danger"),children:(0,c.f)(e.error)??e.error}),"done"===e.status&&0===e.jobs.length&&(0,s.jsx)("p",{className:"text-[11px] text-text-muted mt-0.5",children:"No cron jobs found on this node"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:["done"===e.status?(0,s.jsx)(_.f,{className:"h-4 w-4 text-success"}):(0,s.jsx)(C.f,{className:"h-4 w-4 text-danger"}),t?(0,s.jsx)(g.f,{className:"h-4 w-4 text-text-muted"}):(0,s.jsx)(b.f,{className:"h-4 w-4 text-text-muted"})]})]}),t&&"done"===e.status&&(0,s.jsx)("div",{className:"border-t border-border/50 bg-bg/50",children:0===i.length?(0,s.jsx)("div",{className:"flex items-center justify-center py-8 text-center",children:(0,s.jsx)("p",{className:"text-[11px] text-text-muted",children:0===e.jobs.length?"No cron jobs found on this node.":"No jobs match your search on this node."})}):(0,s.jsx)("div",{className:"divide-y divide-border/30",children:i.map((t,n)=>(0,s.jsxs)("div",{className:"p-4 space-y-3",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(j.f,{className:"h-4 w-4 text-primary"}),(0,s.jsx)("span",{className:"text-xs font-bold",children:t.name}),t.user&&(0,s.jsx)(r.t,{variant:"default",children:t.user}),(0,s.jsx)(r.t,{variant:"info",children:t.schedule})]}),(0,s.jsxs)(a.K,{size:"sm",variant:"secondary",onClick:()=>{F({job:t,nodeId:e.nodeId,nodeName:e.nodeName}),G("1.0.0"),K("")},children:[(0,s.jsx)(N.f,{className:"h-3 w-3 mr-1"}),"Publish"]})]}),(0,s.jsxs)("div",{className:"flex items-center gap-1 text-[11px] text-text-muted",children:[(0,s.jsx)(k.f,{className:"h-3 w-3"}),function(e){let s=e.split(/\s+/);if(s.length<5)return e;let[t,a,r,n,i]=s;return"*"===t&&"*"===a&&"*"===r&&"*"===n&&"*"===i?"Every minute":"0"===t&&"*"===a&&"*"===r&&"*"===n&&"*"===i?"Every hour":"0"===t&&"0"===a&&"*"===r&&"*"===n&&"*"===i?"Daily at midnight":t?.startsWith("*/")?`Every ${t.slice(2)} minutes`:a?.startsWith("*/")?`Every ${a.slice(2)} hours`:e}(t.schedule)]}),(0,s.jsxs)("div",{className:"flex items-start gap-2 rounded border border-border bg-surface p-3",children:[(0,s.jsx)(y.f,{className:"h-3.5 w-3.5 text-primary mt-0.5 shrink-0"}),(0,s.jsx)("pre",{className:"text-xs whitespace-pre-wrap break-all flex-1",children:t.command})]})]},`${t.name}-${n}`))})})]})},e.nodeId)}),d.length>0&&(0,s.jsx)(h.z,{children:(0,s.jsxs)("div",{className:"flex items-center justify-between text-[10px] text-text-muted uppercase tracking-wider",children:[(0,s.jsxs)("span",{children:[V," node",1!==V?"s":""," scanned ·"," ",J," job",1!==J?"s":""," discovered"]}),Q>0&&(0,s.jsxs)("span",{className:"text-danger",children:[Q," node",1!==Q?"s":""," unreachable"]})]})})]}),(0,s.jsx)(i.n,{open:!!P,onClose:()=>F(null),title:"Publish to Library",description:P?.job.name??"",icon:(0,s.jsx)(N.f,{className:"h-5 w-5 text-primary"}),children:(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("label",{className:"block text-[11px] font-bold uppercase tracking-wider mb-1.5",children:["Version ",(0,s.jsx)("span",{className:"text-accent",children:"*"})]}),(0,s.jsx)("input",{type:"text",value:U,onChange:e=>G(e.target.value),placeholder:"1.0.0",className:i.W})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"block text-[11px] font-bold uppercase tracking-wider mb-1.5",children:"Description"}),(0,s.jsx)("input",{type:"text",value:W,onChange:e=>K(e.target.value),placeholder:"What does this cron job do?",className:i.W})]}),P&&(0,s.jsxs)("div",{className:"rounded border border-border bg-bg p-3 text-xs space-y-1",children:[(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"text-text-muted",children:"Source:"})," ",P.nodeName]}),(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"text-text-muted",children:"Schedule:"})," ",P.job.schedule]}),(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"text-text-muted",children:"Command:"})," ",(0,s.jsx)("span",{className:"text-primary",children:P.job.command})]})]}),(0,s.jsxs)("div",{className:"flex justify-end gap-2 pt-2",children:[(0,s.jsx)(a.K,{variant:"secondary",size:"sm",onClick:()=>F(null),children:"Cancel"}),(0,s.jsx)(a.K,{size:"sm",onClick:()=>void Z(),disabled:H||!U,children:H?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(w.f,{className:"h-3.5 w-3.5 animate-spin mr-1.5"}),"Publishing..."]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(N.f,{className:"h-3.5 w-3.5 mr-1.5"}),"Publish"]})})]})]})})]})}],47061)},46670,e=>{var s=e.i(43476),t=e.i(78571);let a={default:"border-border text-text-muted",success:"border-success/40 text-success bg-success/5 shadow-[0_0_6px_rgba(0,255,65,0.15)]",warning:"border-warning/40 text-warning bg-warning/5 shadow-[0_0_6px_rgba(255,179,0,0.15)]",danger:"border-danger/40 text-danger bg-danger/5 shadow-[0_0_6px_rgba(255,23,68,0.15)]",info:"border-info/40 text-info bg-info/5 shadow-[0_0_6px_rgba(0,176,255,0.15)]"},r={default:"bg-text-muted",success:"bg-success",warning:"bg-warning",danger:"bg-danger",info:"bg-info"};e.s(["t",0,function({children:e,variant:n="default",className:i,dot:l=!1,pulse:c=!1}){return(0,s.jsxs)("span",{className:(0,t.f)("inline-flex items-center gap-1.5 rounded-chip border px-2 py-0.5 text-[10px] font-bold uppercase tracking-wider",a[n],i),children:[l&&(0,s.jsxs)("span",{"aria-hidden":"true",className:"relative inline-flex h-1.5 w-1.5",children:[c&&(0,s.jsx)("span",{className:(0,t.f)("absolute inset-0 rounded-full animate-halo",r[n])}),(0,s.jsx)("span",{className:(0,t.f)("relative inline-flex h-1.5 w-1.5 rounded-full",r[n])})]}),e]})},"k",0,function(e){switch(e.toUpperCase()){case"ONLINE":case"COMPLETED":case"ACTIVE":case"RUNNING":case"INSTALLED":case"HEALTHY":return"success";case"DEGRADED":case"PAUSED":case"QUEUED":case"PENDING":case"INSTALLING":return"warning";case"OFFLINE":case"FAILED":case"ERROR":case"TIMEOUT":case"CANCELLED":case"DECOMMISSIONED":case"CRITICAL":return"danger";case"PROVISIONING":case"UPDATING":return"info";default:return"default"}}])},93999,51196,55427,e=>{var s=e.i(43476),t=e.i(56420);let a={name:"arrow-down-right",size:24,node:[["path",{d:"m7 7 10 10",key:"1fmybs"}],["path",{d:"M17 7v10H7",key:"6fjiku"}]]};a.node;let r=(0,t.f)(a);var n=e.i(75775),i=e.i(78571),l=e.i(3062),c=e.i(35084);let o={warning:"shadow-[0_0_6px_var(--color-warning)]",danger:"shadow-[0_0_8px_var(--color-danger)]",accent:"shadow-[0_0_6px_var(--color-accent)]",primary:"shadow-[0_0_6px_var(--color-primary)]"},d={xs:"h-1",sm:"h-1.5",md:"h-2"};function x({value:e,max:t=100,tone:a,thresholds:r=c.q,label:n,size:l="xs",showValue:m=!1,valueLabel:h,glow:u,className:p,testId:f}){let j="number"==typeof e&&Number.isFinite(e),v=j?Math.max(0,Math.min(100,e/(t||1)*100)):0,g=a??(j?(0,c.Z)(v,r):"muted"),b=u||!a&&j&&v>=r.warn,N=h??(j?`${v.toFixed(+(v<10&&v>0))}%`:"—");return(0,s.jsxs)("div",{className:(0,i.f)("flex min-w-0 items-center gap-2",p),"data-testid":f,children:[(0,s.jsx)("div",{role:"meter","aria-label":n,"aria-valuemin":0,"aria-valuemax":t,"aria-valuenow":j?e:void 0,"aria-valuetext":N,className:(0,i.f)("relative flex-1 overflow-hidden rounded-full bg-border/70",d[l]),children:(0,s.jsx)("div",{style:{"--meter":`${v}%`},className:(0,i.f)("h-full w-(--meter) rounded-full transition-[width] duration-700 ease-out-expo starting:w-0",c.H[g],b&&o[g])})}),m&&(0,s.jsx)("span",{className:(0,i.f)("num w-11 shrink-0 text-right text-[11px]",j?c.T[g]:"text-text-muted"),children:N})]})}e.s(["f",0,x],51196);var m=e.i(71645);function h({values:e,tone:t="primary",width:a=160,height:r=32,area:n=!0,max:l,percent:o=!1,threshold:d,live:x=!0,emptyLabel:u="not enough data",className:p,testId:f,label:j,stretch:v=!1}){let g=`spark${(0,m.useId)().replace(/:/g,"")}`;if(e.length<2)return(0,s.jsx)("div",{className:(0,i.f)("flex h-8 items-center text-xs italic text-text-muted",p),"data-testid":f,children:u});let b=c.v[t],N=l??(o?Math.max(100,...e):Math.max(...e,d??0)||1),w=r-4,y=a/(e.length-1),k=e=>2+w-Math.max(0,e)/N*w,S=e.map((e,s)=>[s*y,k(e)]),_=S.map(([e,s])=>`${e.toFixed(1)},${s.toFixed(1)}`).join(" "),C=S[S.length-1];return(0,s.jsxs)("svg",{width:v?"100%":a,height:r,viewBox:`0 0 ${a} ${r}`,preserveAspectRatio:v?"none":void 0,className:(0,i.f)("block overflow-visible",p),"data-testid":f,role:j?"img":void 0,"aria-label":j,"aria-hidden":!j||void 0,children:[n&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("defs",{children:(0,s.jsxs)("linearGradient",{id:g,x1:"0",x2:"0",y1:"0",y2:"1",children:[(0,s.jsx)("stop",{offset:"0%",stopColor:b,stopOpacity:.35}),(0,s.jsx)("stop",{offset:"100%",stopColor:b,stopOpacity:0})]})}),(0,s.jsx)("polygon",{points:`0,${r} ${_} ${a},${r}`,fill:`url(#${g})`})]}),void 0!==d&&(0,s.jsx)("line",{x1:0,x2:a,y1:k(d),y2:k(d),stroke:"var(--color-warning)",strokeOpacity:.5,strokeDasharray:"3 3",strokeWidth:1}),(0,s.jsx)("polyline",{fill:"none",stroke:b,strokeWidth:1.5,vectorEffect:"non-scaling-stroke",strokeLinejoin:"round",strokeLinecap:"round",points:_}),x&&!v&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("circle",{cx:C[0],cy:C[1],r:2.5,fill:b,className:"origin-center animate-halo [transform-box:fill-box]"}),(0,s.jsx)("circle",{cx:C[0],cy:C[1],r:2,fill:b})]})]})}e.s(["f",0,h],55427),e.s(["N",0,function({title:e,description:t,children:a,className:r,action:n,tone:i,corners:c=!1,...o}){return(0,s.jsx)(l.f,{...o,tone:i,corners:c,title:e,description:t,action:n,className:r,children:a})},"n",0,function({label:e,value:t,icon:a,trend:o,spark:d,meter:m,delta:u,tone:p="primary",className:f,testId:j}){let v=!u||u.value>=0===(u.positiveIsGood??!0);return(0,s.jsxs)(l.f,{tone:p,className:(0,i.f)("overflow-hidden",f),testId:j,children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)("span",{className:"text-[10px] font-medium uppercase tracking-[0.15em] text-text-muted",children:e}),a&&(0,s.jsx)("span",{className:"text-primary/60",children:a})]}),(0,s.jsxs)("div",{className:"mt-2 flex items-end justify-between gap-2",children:[(0,s.jsx)("div",{className:(0,i.f)("num text-2xl font-bold","primary"===p?"text-primary neon-text":c.T[p]),children:t}),u&&0!==u.value&&(0,s.jsxs)("span",{className:(0,i.f)("num mb-1 inline-flex items-center gap-0.5 text-[11px]",v?"text-success":"text-danger"),children:[u.value>0?(0,s.jsx)(n.f,{className:"h-3 w-3"}):(0,s.jsx)(r,{className:"h-3 w-3"}),Math.abs(u.value).toFixed(+!Number.isInteger(u.value)),u.unit]})]}),o&&(0,s.jsx)("div",{className:(0,i.f)("mt-1 text-[11px]",o.positive?"text-success":"text-danger"),children:o.value}),void 0!==m&&(0,s.jsx)(x,{value:m,className:"mt-3",label:e}),d&&d.length>1&&(0,s.jsx)("div",{className:"-mx-5 -mb-5 mt-3 opacity-80",children:(0,s.jsx)(h,{values:d,tone:p,width:240,height:28,stretch:!0,live:!1})})]})}],93999)},3062,e=>{var s=e.i(43476),t=e.i(78571),a=e.i(35084);let r={primary:"[--panel-corner-color:color-mix(in_srgb,var(--color-primary)_60%,transparent)]",accent:"[--panel-corner-color:color-mix(in_srgb,var(--color-accent)_70%,transparent)]",success:"[--panel-corner-color:color-mix(in_srgb,var(--color-success)_60%,transparent)]",warning:"[--panel-corner-color:color-mix(in_srgb,var(--color-warning)_70%,transparent)]",danger:"[--panel-corner-color:color-mix(in_srgb,var(--color-danger)_70%,transparent)]",info:"[--panel-corner-color:color-mix(in_srgb,var(--color-info)_60%,transparent)]",muted:"[--panel-corner-color:var(--color-border-strong)]"},n={primary:"[--glow-hover-color:var(--color-glow)]",accent:"[--glow-hover-color:var(--color-glow-accent)]",success:"[--glow-hover-color:var(--color-glow-success)]",warning:"[--glow-hover-color:var(--color-glow-warning)]",danger:"[--glow-hover-color:var(--color-glow-danger)]",info:"[--glow-hover-color:var(--color-glow)]",muted:"[--glow-hover-color:var(--color-glow)]"},i={primary:"hover:border-primary/30",accent:"hover:border-accent/40",success:"hover:border-success/30",warning:"hover:border-warning/40",danger:"hover:border-danger/40",info:"hover:border-info/30",muted:"hover:border-border-strong"},l={none:"",sm:"p-3",md:"p-5",lg:"p-6"};e.s(["f",0,function({tone:e="primary",corners:c=!0,interactive:o=!0,hero:d=!1,title:x,description:m,icon:h,action:u,as:p="div",padding:f="md",testId:j,className:v,children:g,...b}){return(0,s.jsxs)(p,{...b,"data-testid":j??b["data-testid"],className:(0,t.f)("relative rounded-panel border border-border bg-surface transition-colors duration-300",l[f],c&&"panel-corners",c&&r[e],o&&"glow-hover",o&&n[e],o&&i[e],d&&"grid-bg overflow-hidden bg-surface/80",v),children:[(x||u||h)&&(0,s.jsxs)("div",{className:"mb-4 flex items-start justify-between gap-3",children:[(0,s.jsxs)("div",{className:"flex min-w-0 items-start gap-2",children:[h&&(0,s.jsx)("span",{className:(0,t.f)("mt-0.5 shrink-0",a.T[e]),children:h}),(0,s.jsxs)("div",{className:"min-w-0",children:[x&&(0,s.jsx)("h3",{className:"text-xs font-bold uppercase tracking-wider",children:x}),m&&(0,s.jsx)("p",{className:"mt-0.5 text-[11px] text-text-muted",children:m})]})]}),u]}),g]})}])},63376,e=>{var s=e.i(43476);e.s(["z",0,function({children:e,className:t}){return(0,s.jsx)("div",{className:`animate-page-in${t?` ${t}`:""}`,children:e})},"U",0,function({children:e,className:t}){return(0,s.jsx)("div",{className:t,children:e})}])},88187,25981,e=>{var s=e.i(43476),t=e.i(32181),a=e.i(32781),r=e.i(51757),n=e.i(83967),i=e.i(15331);e.s(["f",0,function({title:e,description:l,nodes:c,scanning:o}){return(0,s.jsxs)(t.f.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},transition:{duration:.4,ease:[.16,1,.3,1]},className:"rounded border border-primary/30 bg-surface p-6 relative overflow-hidden",children:[o&&(0,s.jsx)(t.f.div,{className:"absolute inset-0 pointer-events-none",initial:{opacity:0},animate:{opacity:1},children:(0,s.jsx)(t.f.div,{className:"absolute left-0 right-0 h-px bg-gradient-to-r from-transparent via-primary/60 to-transparent",animate:{top:["0%","100%"]},transition:{duration:2,repeat:1/0,ease:"linear"}})}),(0,s.jsx)("div",{className:"absolute inset-0 rounded pointer-events-none",style:{boxShadow:o?"0 0 20px var(--color-glow), inset 0 0 20px rgba(0,229,255,0.03)":"none",transition:"box-shadow 0.5s ease"}}),(0,s.jsxs)("div",{className:"relative z-10",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[o?(0,s.jsx)(t.f.div,{animate:{rotate:360},transition:{duration:2,repeat:1/0,ease:"linear"},children:(0,s.jsx)(i.f,{className:"h-5 w-5 text-primary"})}):(0,s.jsx)(r.f,{className:"h-5 w-5 text-success"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"text-sm font-bold uppercase tracking-wider",children:o?e:"Scan Complete"}),l&&(0,s.jsx)("p",{className:"text-[11px] text-text-muted",children:l})]})]}),c.length>0&&(0,s.jsx)("div",{className:"space-y-2",children:c.map((e,i)=>(0,s.jsxs)(t.f.div,{initial:{opacity:0,x:-8},animate:{opacity:1,x:0},transition:{delay:.05*i,duration:.3},className:"flex items-center gap-3 text-xs",children:["scanning"===e.status&&(0,s.jsx)(a.f,{className:"h-3.5 w-3.5 text-primary animate-spin"}),"done"===e.status&&(0,s.jsx)(r.f,{className:"h-3.5 w-3.5 text-success"}),"error"===e.status&&(0,s.jsx)(n.f,{className:"h-3.5 w-3.5 text-danger"}),(0,s.jsx)("span",{className:"text-text",children:e.nodeName}),"error"===e.status&&e.error&&(0,s.jsx)("span",{className:"text-[10px] text-danger/70 truncate max-w-[200px]",children:e.error})]},e.nodeId))}),0===c.length&&o&&(0,s.jsx)("p",{className:"text-[11px] text-text-muted",children:"Discovering nodes..."})]})]})}],88187);var l=e.i(56420);let c={name:"upload",size:24,node:[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]};c.node;let o=(0,l.f)(c);e.s(["f",0,o],25981)},75775,e=>{var s=e.i(56420);let t={name:"arrow-up-right",size:24,node:[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]};t.node;let a=(0,s.f)(t);e.s(["f",0,a],75775)},49882,e=>{var s=e.i(56420);let t={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"}]]};t.node;let a=(0,s.f)(t);e.s(["f",0,a],49882)},95187,(e,s,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var a={callServer:function(){return n.callServer},createServerReference:function(){return l.createServerReference},findSourceMapURL:function(){return i.findSourceMapURL}};for(var r in a)Object.defineProperty(t,r,{enumerable:!0,get:a[r]});let n=e.r(32120),i=e.r(92245),l=e.r(35326)}])})();
1
+ (()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,47061,e=>{var s=e.i(43476),t=e.i(71645),a=e.i(68759),r=e.i(46670),n=e.i(93999),i=e.i(32568),l=e.i(82983),c=e.i(34479),o=e.i(4050),d=e.i(95187);let x=(0,d.createServerReference)("40628eaeab29d1c035239bac5d35b8e181fbb0cceb",d.callServer,void 0,d.findSourceMapURL,"scanCron");var m=e.i(78571),h=e.i(63376),u=e.i(88187),p=e.i(41120),f=e.i(66595),j=e.i(74544),v=e.i(41220),g=e.i(16327),b=e.i(67927),N=e.i(25981),w=e.i(32781),y=e.i(4139),k=e.i(49882),S=e.i(53138),_=e.i(51757),C=e.i(83967);e.s(["default",0,function(){let{activeNode:e}=(0,o.l)(),[d,I]=(0,t.useState)([]),[E,$]=(0,t.useState)(!1),[L,M]=(0,t.useState)(null),[D,z]=(0,t.useState)(!1),[R,T]=(0,t.useState)(""),[O,A]=(0,t.useState)(new Set),[P,F]=(0,t.useState)(null),[U,G]=(0,t.useState)("1.0.0"),[W,K]=(0,t.useState)(""),[H,q]=(0,t.useState)(!1),B=(0,t.useCallback)(async()=>{$(!0),I([]),M(null);let s=Date.now();try{let s=await x(e.id);if(s.success&&Array.isArray(s.data)){let e=s.data.map(e=>({...e,status:"error"===e.status?"error":"done"}));I(e);let t=new Set(e.filter(e=>e.jobs.length>0).map(e=>e.nodeId));A(t.size>0?t:new Set(e.map(e=>e.nodeId)))}else M(s.error?.message??"Scan returned unsuccessful response")}catch(s){let e=s instanceof Error?s.message:"Scan request failed";M(e)}finally{let e=Date.now()-s;e<1500&&await new Promise(s=>setTimeout(s,1500-e)),$(!1),z(!0)}},[e]);(0,t.useEffect)(()=>{e&&B()},[e,B]);let J=d.reduce((e,s)=>e+("done"===s.status?s.jobs.length:0),0),V=d.filter(e=>"done"===e.status).length,Q=d.filter(e=>"error"===e.status).length,Y=e=>{if(!R)return!0;let s=R.toLowerCase();return e.name.toLowerCase().includes(s)||e.command.toLowerCase().includes(s)||e.schedule.toLowerCase().includes(s)||(e.user?.toLowerCase().includes(s)??!1)},Z=async()=>{if(P&&U){q(!0);try{let e=JSON.stringify({name:P.job.name,version:U,schedule:P.job.schedule,command:P.job.command,description:W},null,2);await l.f.library.files.create({name:`${P.job.name} v${U}`,fileName:`${P.job.name}-${U}.json`,mimeType:"application/x-magnus-cronjob",content:e,tags:["cronjob","cron"]}),F(null),G("1.0.0"),K("")}catch{}finally{q(!1)}}};return(0,s.jsxs)(h.U,{className:"space-y-6",children:[(0,s.jsx)(h.z,{children:(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h1",{className:"text-lg font-bold uppercase tracking-wider",children:"Cron Jobs"}),(0,s.jsx)("p",{className:"text-[11px] text-text-muted uppercase tracking-wider",children:"Discover and manage scheduled jobs across your fleet"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[D&&!E&&(0,s.jsxs)("span",{className:"text-[10px] text-text-muted uppercase tracking-wider mr-2",children:[d.length," node",1!==d.length?"s":""," · ",J," job",1!==J?"s":"",Q>0&&` \xb7 ${Q} error${1!==Q?"s":""}`]}),(0,s.jsxs)(a.K,{variant:"secondary",size:"sm",onClick:()=>void B(),disabled:E,children:[(0,s.jsx)(p.f,{className:(0,m.f)("h-3.5 w-3.5 mr-1.5",E&&"animate-spin")}),E?"Scanning...":"Rescan"]})]})]})}),E&&(0,s.jsx)(h.z,{children:(0,s.jsx)(u.f,{title:"Scanning Nodes for Cron Jobs",description:"Probing all online nodes...",nodes:d.map(e=>({nodeId:e.nodeId,nodeName:e.nodeName,status:e.status,error:e.error})),scanning:!0})}),!E&&D&&J>0&&(0,s.jsx)(h.z,{children:(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)(f.f,{className:"absolute left-3 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-text-muted"}),(0,s.jsx)("input",{type:"text",placeholder:"Search jobs by name, command, or schedule...",value:R,onChange:e=>T(e.target.value),className:(0,m.f)(i.W,"pl-9")})]})}),!E&&D&&L&&(0,s.jsx)(h.z,{children:(0,s.jsx)(n.N,{children:(0,s.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[(0,s.jsx)(S.f,{className:"h-10 w-10 text-danger/60 mb-3"}),(0,s.jsx)("p",{className:"text-xs font-bold text-danger mb-1",children:"Scan Failed"}),(0,s.jsx)("p",{className:"text-[11px] text-text-muted max-w-md",children:L}),(0,s.jsxs)(a.K,{variant:"secondary",size:"sm",className:"mt-4",onClick:()=>void B(),children:[(0,s.jsx)(p.f,{className:"h-3.5 w-3.5 mr-1.5"}),"Retry Scan"]})]})})}),!E&&D&&!L&&(0,s.jsxs)(s.Fragment,{children:[0===d.length?(0,s.jsx)(h.z,{children:(0,s.jsx)(n.N,{children:(0,s.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[(0,s.jsx)(v.f,{className:"h-10 w-10 text-text-muted/40 mb-3"}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"No online nodes found to scan. Ensure at least one node agent is running and connected."})]})})}):d.map(e=>{let t=O.has(e.nodeId),i=e.jobs.filter(Y);return(0,s.jsx)(h.z,{children:(0,s.jsxs)(n.N,{className:"overflow-hidden",children:[(0,s.jsxs)("button",{onClick:()=>{var s;return s=e.nodeId,void A(e=>{let t=new Set(e);return t.has(s)?t.delete(s):t.add(s),t})},className:"w-full flex items-center gap-4 p-4 text-left hover:bg-surface-hover transition-all",children:[(0,s.jsx)("div",{className:"flex h-9 w-9 items-center justify-center rounded border border-primary/30 bg-primary/5 shrink-0",children:(0,s.jsx)(v.f,{className:"h-4 w-4 text-primary"})}),(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"text-xs font-bold uppercase tracking-wider",children:e.nodeName}),"done"===e.status&&(0,s.jsxs)(r.t,{variant:e.jobs.length>0?"success":"default",children:[e.jobs.length," job",1!==e.jobs.length?"s":""]}),"error"===e.status&&((0,c.f)(e.error)?(0,s.jsx)(r.t,{variant:"default",children:"Disabled"}):(0,s.jsx)(r.t,{variant:"danger",children:"Error"}))]}),"error"===e.status&&e.error&&(0,s.jsx)("p",{className:(0,m.f)("text-[11px] mt-0.5 truncate",(0,c.f)(e.error)?"text-text-muted":"text-danger"),children:(0,c.f)(e.error)??e.error}),"done"===e.status&&0===e.jobs.length&&(0,s.jsx)("p",{className:"text-[11px] text-text-muted mt-0.5",children:"No cron jobs found on this node"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:["done"===e.status?(0,s.jsx)(_.f,{className:"h-4 w-4 text-success"}):(0,s.jsx)(C.f,{className:"h-4 w-4 text-danger"}),t?(0,s.jsx)(g.f,{className:"h-4 w-4 text-text-muted"}):(0,s.jsx)(b.f,{className:"h-4 w-4 text-text-muted"})]})]}),t&&"done"===e.status&&(0,s.jsx)("div",{className:"border-t border-border/50 bg-bg/50",children:0===i.length?(0,s.jsx)("div",{className:"flex items-center justify-center py-8 text-center",children:(0,s.jsx)("p",{className:"text-[11px] text-text-muted",children:0===e.jobs.length?"No cron jobs found on this node.":"No jobs match your search on this node."})}):(0,s.jsx)("div",{className:"divide-y divide-border/30",children:i.map((t,n)=>(0,s.jsxs)("div",{className:"p-4 space-y-3",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(j.f,{className:"h-4 w-4 text-primary"}),(0,s.jsx)("span",{className:"text-xs font-bold",children:t.name}),t.user&&(0,s.jsx)(r.t,{variant:"default",children:t.user}),(0,s.jsx)(r.t,{variant:"info",children:t.schedule})]}),(0,s.jsxs)(a.K,{size:"sm",variant:"secondary",onClick:()=>{F({job:t,nodeId:e.nodeId,nodeName:e.nodeName}),G("1.0.0"),K("")},children:[(0,s.jsx)(N.f,{className:"h-3 w-3 mr-1"}),"Publish"]})]}),(0,s.jsxs)("div",{className:"flex items-center gap-1 text-[11px] text-text-muted",children:[(0,s.jsx)(k.f,{className:"h-3 w-3"}),function(e){let s=e.split(/\s+/);if(s.length<5)return e;let[t,a,r,n,i]=s;return"*"===t&&"*"===a&&"*"===r&&"*"===n&&"*"===i?"Every minute":"0"===t&&"*"===a&&"*"===r&&"*"===n&&"*"===i?"Every hour":"0"===t&&"0"===a&&"*"===r&&"*"===n&&"*"===i?"Daily at midnight":t?.startsWith("*/")?`Every ${t.slice(2)} minutes`:a?.startsWith("*/")?`Every ${a.slice(2)} hours`:e}(t.schedule)]}),(0,s.jsxs)("div",{className:"flex items-start gap-2 rounded border border-border bg-surface p-3",children:[(0,s.jsx)(y.f,{className:"h-3.5 w-3.5 text-primary mt-0.5 shrink-0"}),(0,s.jsx)("pre",{className:"text-xs whitespace-pre-wrap break-all flex-1",children:t.command})]})]},`${t.name}-${n}`))})})]})},e.nodeId)}),d.length>0&&(0,s.jsx)(h.z,{children:(0,s.jsxs)("div",{className:"flex items-center justify-between text-[10px] text-text-muted uppercase tracking-wider",children:[(0,s.jsxs)("span",{children:[V," node",1!==V?"s":""," scanned ·"," ",J," job",1!==J?"s":""," discovered"]}),Q>0&&(0,s.jsxs)("span",{className:"text-danger",children:[Q," node",1!==Q?"s":""," unreachable"]})]})})]}),(0,s.jsx)(i.n,{open:!!P,onClose:()=>F(null),title:"Publish to Library",description:P?.job.name??"",icon:(0,s.jsx)(N.f,{className:"h-5 w-5 text-primary"}),children:(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("label",{className:"block text-[11px] font-bold uppercase tracking-wider mb-1.5",children:["Version ",(0,s.jsx)("span",{className:"text-accent",children:"*"})]}),(0,s.jsx)("input",{type:"text",value:U,onChange:e=>G(e.target.value),placeholder:"1.0.0",className:i.W})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"block text-[11px] font-bold uppercase tracking-wider mb-1.5",children:"Description"}),(0,s.jsx)("input",{type:"text",value:W,onChange:e=>K(e.target.value),placeholder:"What does this cron job do?",className:i.W})]}),P&&(0,s.jsxs)("div",{className:"rounded border border-border bg-bg p-3 text-xs space-y-1",children:[(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"text-text-muted",children:"Source:"})," ",P.nodeName]}),(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"text-text-muted",children:"Schedule:"})," ",P.job.schedule]}),(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"text-text-muted",children:"Command:"})," ",(0,s.jsx)("span",{className:"text-primary",children:P.job.command})]})]}),(0,s.jsxs)("div",{className:"flex justify-end gap-2 pt-2",children:[(0,s.jsx)(a.K,{variant:"secondary",size:"sm",onClick:()=>F(null),children:"Cancel"}),(0,s.jsx)(a.K,{size:"sm",onClick:()=>void Z(),disabled:H||!U,children:H?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(w.f,{className:"h-3.5 w-3.5 animate-spin mr-1.5"}),"Publishing..."]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(N.f,{className:"h-3.5 w-3.5 mr-1.5"}),"Publish"]})})]})]})})]})}],47061)},46670,e=>{var s=e.i(43476),t=e.i(78571);let a={default:"border-border text-text-muted",success:"border-success/40 text-success bg-success/5 shadow-[0_0_6px_rgba(0,255,65,0.15)]",warning:"border-warning/40 text-warning bg-warning/5 shadow-[0_0_6px_rgba(255,179,0,0.15)]",danger:"border-danger/40 text-danger bg-danger/5 shadow-[0_0_6px_rgba(255,23,68,0.15)]",info:"border-info/40 text-info bg-info/5 shadow-[0_0_6px_rgba(0,176,255,0.15)]"},r={default:"bg-text-muted",success:"bg-success",warning:"bg-warning",danger:"bg-danger",info:"bg-info"};e.s(["t",0,function({children:e,variant:n="default",className:i,dot:l=!1,pulse:c=!1}){return(0,s.jsxs)("span",{className:(0,t.f)("inline-flex items-center gap-1.5 rounded-chip border px-2 py-0.5 text-[10px] font-bold uppercase tracking-wider",a[n],i),children:[l&&(0,s.jsxs)("span",{"aria-hidden":"true",className:"relative inline-flex h-1.5 w-1.5",children:[c&&(0,s.jsx)("span",{className:(0,t.f)("absolute inset-0 rounded-full animate-halo",r[n])}),(0,s.jsx)("span",{className:(0,t.f)("relative inline-flex h-1.5 w-1.5 rounded-full",r[n])})]}),e]})},"k",0,function(e){switch(e.toUpperCase()){case"ONLINE":case"COMPLETED":case"ACTIVE":case"RUNNING":case"INSTALLED":case"HEALTHY":return"success";case"DEGRADED":case"PAUSED":case"QUEUED":case"PENDING":case"INSTALLING":return"warning";case"OFFLINE":case"FAILED":case"ERROR":case"TIMEOUT":case"CANCELLED":case"DECOMMISSIONED":case"CRITICAL":return"danger";case"PROVISIONING":case"UPDATING":return"info";default:return"default"}}])},93999,51196,55427,e=>{var s=e.i(43476),t=e.i(56420);let a={name:"arrow-down-right",size:24,node:[["path",{d:"m7 7 10 10",key:"1fmybs"}],["path",{d:"M17 7v10H7",key:"6fjiku"}]]};a.node;let r=(0,t.f)(a);var n=e.i(75775),i=e.i(78571),l=e.i(3062),c=e.i(35084);let o={warning:"shadow-[0_0_6px_var(--color-warning)]",danger:"shadow-[0_0_8px_var(--color-danger)]",accent:"shadow-[0_0_6px_var(--color-accent)]",primary:"shadow-[0_0_6px_var(--color-primary)]"},d={xs:"h-1",sm:"h-1.5",md:"h-2"};function x({value:e,max:t=100,tone:a,thresholds:r=c.q,label:n,size:l="xs",showValue:m=!1,valueLabel:h,glow:u,className:p,testId:f}){let j="number"==typeof e&&Number.isFinite(e),v=j?Math.max(0,Math.min(100,e/(t||1)*100)):0,g=a??(j?(0,c.Z)(v,r):"muted"),b=u||!a&&j&&v>=r.warn,N=h??(j?`${v.toFixed(+(v<10&&v>0))}%`:"—");return(0,s.jsxs)("div",{className:(0,i.f)("flex min-w-0 items-center gap-2",p),"data-testid":f,children:[(0,s.jsx)("div",{role:"meter","aria-label":n,"aria-valuemin":0,"aria-valuemax":t,"aria-valuenow":j?e:void 0,"aria-valuetext":N,className:(0,i.f)("relative flex-1 overflow-hidden rounded-full bg-border/70",d[l]),children:(0,s.jsx)("div",{style:{"--meter":`${v}%`},className:(0,i.f)("h-full w-(--meter) rounded-full transition-[width] duration-700 ease-out-expo starting:w-0",c.H[g],b&&o[g])})}),m&&(0,s.jsx)("span",{className:(0,i.f)("num w-11 shrink-0 text-right text-[11px]",j?c.T[g]:"text-text-muted"),children:N})]})}e.s(["f",0,x],51196);var m=e.i(71645);function h({values:e,tone:t="primary",width:a=160,height:r=32,area:n=!0,max:l,percent:o=!1,threshold:d,live:x=!0,emptyLabel:u="not enough data",className:p,testId:f,label:j,stretch:v=!1}){let g=`spark${(0,m.useId)().replace(/:/g,"")}`;if(e.length<2)return(0,s.jsx)("div",{className:(0,i.f)("flex h-8 items-center text-xs italic text-text-muted",p),"data-testid":f,children:u});let b=c.v[t],N=l??(o?Math.max(100,...e):Math.max(...e,d??0)||1),w=r-4,y=a/(e.length-1),k=e=>2+w-Math.max(0,e)/N*w,S=e.map((e,s)=>[s*y,k(e)]),_=S.map(([e,s])=>`${e.toFixed(1)},${s.toFixed(1)}`).join(" "),C=S[S.length-1];return(0,s.jsxs)("svg",{width:v?"100%":a,height:r,viewBox:`0 0 ${a} ${r}`,preserveAspectRatio:v?"none":void 0,className:(0,i.f)("block overflow-visible",p),"data-testid":f,role:j?"img":void 0,"aria-label":j,"aria-hidden":!j||void 0,children:[n&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("defs",{children:(0,s.jsxs)("linearGradient",{id:g,x1:"0",x2:"0",y1:"0",y2:"1",children:[(0,s.jsx)("stop",{offset:"0%",stopColor:b,stopOpacity:.35}),(0,s.jsx)("stop",{offset:"100%",stopColor:b,stopOpacity:0})]})}),(0,s.jsx)("polygon",{points:`0,${r} ${_} ${a},${r}`,fill:`url(#${g})`})]}),void 0!==d&&(0,s.jsx)("line",{x1:0,x2:a,y1:k(d),y2:k(d),stroke:"var(--color-warning)",strokeOpacity:.5,strokeDasharray:"3 3",strokeWidth:1}),(0,s.jsx)("polyline",{fill:"none",stroke:b,strokeWidth:1.5,vectorEffect:"non-scaling-stroke",strokeLinejoin:"round",strokeLinecap:"round",points:_}),x&&!v&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("circle",{cx:C[0],cy:C[1],r:2.5,fill:b,className:"origin-center animate-halo [transform-box:fill-box]"}),(0,s.jsx)("circle",{cx:C[0],cy:C[1],r:2,fill:b})]})]})}e.s(["f",0,h],55427),e.s(["N",0,function({title:e,description:t,children:a,className:r,action:n,tone:i,corners:c=!1,...o}){return(0,s.jsx)(l.f,{...o,tone:i,corners:c,title:e,description:t,action:n,className:r,children:a})},"n",0,function({label:e,value:t,icon:a,trend:o,spark:d,meter:m,delta:u,tone:p="primary",className:f,testId:j}){let v=!u||u.value>=0===(u.positiveIsGood??!0);return(0,s.jsxs)(l.f,{tone:p,className:(0,i.f)("overflow-hidden",f),testId:j,children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)("span",{className:"text-[10px] font-medium uppercase tracking-[0.15em] text-text-muted",children:e}),a&&(0,s.jsx)("span",{className:"text-primary/60",children:a})]}),(0,s.jsxs)("div",{className:"mt-2 flex items-end justify-between gap-2",children:[(0,s.jsx)("div",{className:(0,i.f)("num text-2xl font-bold","primary"===p?"text-primary neon-text":c.T[p]),children:t}),u&&0!==u.value&&(0,s.jsxs)("span",{className:(0,i.f)("num mb-1 inline-flex items-center gap-0.5 text-[11px]",v?"text-success":"text-danger"),children:[u.value>0?(0,s.jsx)(n.f,{className:"h-3 w-3"}):(0,s.jsx)(r,{className:"h-3 w-3"}),Math.abs(u.value).toFixed(+!Number.isInteger(u.value)),u.unit]})]}),o&&(0,s.jsx)("div",{className:(0,i.f)("mt-1 text-[11px]",o.positive?"text-success":"text-danger"),children:o.value}),void 0!==m&&(0,s.jsx)(x,{value:m,className:"mt-3",label:e}),d&&d.length>1&&(0,s.jsx)("div",{className:"-mx-5 -mb-5 mt-3 opacity-80",children:(0,s.jsx)(h,{values:d,tone:p,width:240,height:28,stretch:!0,live:!1})})]})}],93999)},3062,e=>{var s=e.i(43476),t=e.i(78571),a=e.i(35084);let r={primary:"[--panel-corner-color:color-mix(in_srgb,var(--color-primary)_60%,transparent)]",accent:"[--panel-corner-color:color-mix(in_srgb,var(--color-accent)_70%,transparent)]",success:"[--panel-corner-color:color-mix(in_srgb,var(--color-success)_60%,transparent)]",warning:"[--panel-corner-color:color-mix(in_srgb,var(--color-warning)_70%,transparent)]",danger:"[--panel-corner-color:color-mix(in_srgb,var(--color-danger)_70%,transparent)]",info:"[--panel-corner-color:color-mix(in_srgb,var(--color-info)_60%,transparent)]",muted:"[--panel-corner-color:var(--color-border-strong)]"},n={primary:"[--glow-hover-color:var(--color-glow)]",accent:"[--glow-hover-color:var(--color-glow-accent)]",success:"[--glow-hover-color:var(--color-glow-success)]",warning:"[--glow-hover-color:var(--color-glow-warning)]",danger:"[--glow-hover-color:var(--color-glow-danger)]",info:"[--glow-hover-color:var(--color-glow)]",muted:"[--glow-hover-color:var(--color-glow)]"},i={primary:"hover:border-primary/30",accent:"hover:border-accent/40",success:"hover:border-success/30",warning:"hover:border-warning/40",danger:"hover:border-danger/40",info:"hover:border-info/30",muted:"hover:border-border-strong"},l={none:"",sm:"p-3",md:"p-5",lg:"p-6"};e.s(["f",0,function({tone:e="primary",corners:c=!0,interactive:o=!0,hero:d=!1,title:x,description:m,icon:h,action:u,as:p="div",padding:f="md",testId:j,className:v,children:g,...b}){return(0,s.jsxs)(p,{...b,"data-testid":j??b["data-testid"],className:(0,t.f)("relative rounded-panel border border-border bg-surface transition-colors duration-300",l[f],c&&"panel-corners",c&&r[e],o&&"glow-hover",o&&n[e],o&&i[e],d&&"grid-bg overflow-hidden bg-surface/80",v),children:[(x||u||h)&&(0,s.jsxs)("div",{className:"mb-4 flex items-start justify-between gap-3",children:[(0,s.jsxs)("div",{className:"flex min-w-0 items-start gap-2",children:[h&&(0,s.jsx)("span",{className:(0,t.f)("mt-0.5 shrink-0",a.T[e]),children:h}),(0,s.jsxs)("div",{className:"min-w-0",children:[x&&(0,s.jsx)("h3",{className:"text-xs font-bold uppercase tracking-wider",children:x}),m&&(0,s.jsx)("p",{className:"mt-0.5 text-[11px] text-text-muted",children:m})]})]}),u]}),g]})}])},63376,e=>{var s=e.i(43476);e.s(["z",0,function({children:e,className:t}){return(0,s.jsx)("div",{className:`animate-page-in${t?` ${t}`:""}`,children:e})},"U",0,function({children:e,className:t}){return(0,s.jsx)("div",{className:t,children:e})}])},88187,25981,e=>{var s=e.i(43476),t=e.i(32181),a=e.i(32781),r=e.i(51757),n=e.i(83967),i=e.i(15331);e.s(["f",0,function({title:e,description:l,nodes:c,scanning:o}){return(0,s.jsxs)(t.f.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},transition:{duration:.4,ease:[.16,1,.3,1]},className:"rounded border border-primary/30 bg-surface p-6 relative overflow-hidden",children:[o&&(0,s.jsx)(t.f.div,{className:"absolute inset-0 pointer-events-none",initial:{opacity:0},animate:{opacity:1},children:(0,s.jsx)(t.f.div,{className:"absolute left-0 right-0 h-px bg-gradient-to-r from-transparent via-primary/60 to-transparent",animate:{top:["0%","100%"]},transition:{duration:2,repeat:1/0,ease:"linear"}})}),(0,s.jsx)("div",{className:"absolute inset-0 rounded pointer-events-none",style:{boxShadow:o?"0 0 20px var(--color-glow), inset 0 0 20px rgba(0,229,255,0.03)":"none",transition:"box-shadow 0.5s ease"}}),(0,s.jsxs)("div",{className:"relative z-10",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[o?(0,s.jsx)(t.f.div,{animate:{rotate:360},transition:{duration:2,repeat:1/0,ease:"linear"},children:(0,s.jsx)(i.f,{className:"h-5 w-5 text-primary"})}):(0,s.jsx)(r.f,{className:"h-5 w-5 text-success"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"text-sm font-bold uppercase tracking-wider",children:o?e:"Scan Complete"}),l&&(0,s.jsx)("p",{className:"text-[11px] text-text-muted",children:l})]})]}),c.length>0&&(0,s.jsx)("div",{className:"space-y-2",children:c.map((e,i)=>(0,s.jsxs)(t.f.div,{initial:{opacity:0,x:-8},animate:{opacity:1,x:0},transition:{delay:.05*i,duration:.3},className:"flex items-center gap-3 text-xs",children:["scanning"===e.status&&(0,s.jsx)(a.f,{className:"h-3.5 w-3.5 text-primary animate-spin"}),"done"===e.status&&(0,s.jsx)(r.f,{className:"h-3.5 w-3.5 text-success"}),"error"===e.status&&(0,s.jsx)(n.f,{className:"h-3.5 w-3.5 text-danger"}),(0,s.jsx)("span",{className:"text-text",children:e.nodeName}),"error"===e.status&&e.error&&(0,s.jsx)("span",{className:"text-[10px] text-danger/70 truncate max-w-[200px]",children:e.error})]},e.nodeId))}),0===c.length&&o&&(0,s.jsx)("p",{className:"text-[11px] text-text-muted",children:"Discovering nodes..."})]})]})}],88187);var l=e.i(56420);let c={name:"upload",size:24,node:[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]};c.node;let o=(0,l.f)(c);e.s(["f",0,o],25981)},75775,e=>{var s=e.i(56420);let t={name:"arrow-up-right",size:24,node:[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]};t.node;let a=(0,s.f)(t);e.s(["f",0,a],75775)},49882,e=>{var s=e.i(56420);let t={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"}]]};t.node;let a=(0,s.f)(t);e.s(["f",0,a],49882)},95187,(e,s,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var a={callServer:function(){return n.callServer},createServerReference:function(){return l.createServerReference},findSourceMapURL:function(){return i.findSourceMapURL}};for(var r in a)Object.defineProperty(t,r,{enumerable:!0,get:a[r]});let n=e.r(32120),i=e.r(92245),l=e.r(35326)}])})();
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hivemagnus/magnus-ui",
3
- "version": "1.1.2",
3
+ "version": "1.1.3",
4
4
  "description": "Magnus UI: web console for the Magnus fleet control plane, shipped as a prebuilt Next.js server with the magnus-ui CLI",
5
5
  "keywords": [
6
6
  "magnus",
@@ -64,7 +64,7 @@
64
64
  "ws": "^8.22.0"
65
65
  },
66
66
  "devDependencies": {
67
- "@hivemagnus/magnus-contracts": "1.1.2",
67
+ "@hivemagnus/magnus-contracts": "1.1.3",
68
68
  "@playwright/test": "^1.64.1",
69
69
  "@tailwindcss/postcss": "^4.0.0",
70
70
  "@types/node": "^24.19.2",
@@ -15,7 +15,7 @@ const currentPort = parseInt(process.env.PORT, 10) || 3000
15
15
  const hostname = process.env.HOSTNAME || '0.0.0.0'
16
16
 
17
17
  let keepAliveTimeout = parseInt(process.env.KEEP_ALIVE_TIMEOUT, 10)
18
- const nextConfig = {"env":{"NEXT_PUBLIC_API_URL":"https://localhost:4000","NEXT_PUBLIC_AGENT_VERSION":"1.1.2","NEXT_PUBLIC_MAGNUS_VERSION":"1.1.2"},"webpack":null,"typescript":{"ignoreBuildErrors":false},"typedRoutes":false,"distDir":"./.next","cleanDistDir":true,"assetPrefix":"","cacheMaxMemorySize":52428800,"configOrigin":"next.config.ts","useFileSystemPublicRoutes":true,"generateEtags":true,"pageExtensions":["tsx","ts","jsx","js"],"instrumentationClientInject":[],"poweredByHeader":true,"compress":true,"images":{"deviceSizes":[640,750,828,1080,1200,1920,2048,3840],"imageSizes":[32,48,64,96,128,256,384],"path":"/_next/image","loader":"default","loaderFile":"","domains":[],"disableStaticImages":false,"minimumCacheTTL":14400,"formats":["image/webp"],"maximumRedirects":3,"maximumResponseBody":50000000,"dangerouslyAllowLocalIP":false,"dangerouslyAllowSVG":false,"contentSecurityPolicy":"script-src 'none'; frame-src 'none'; sandbox;","contentDispositionType":"attachment","localPatterns":[{"pathname":"**","search":""}],"remotePatterns":[],"qualities":[75],"unoptimized":false,"customCacheHandler":false},"devIndicators":{"position":"bottom-left"},"onDemandEntries":{"maxInactiveAge":60000,"pagesBufferLength":5},"basePath":"","sassOptions":{},"trailingSlash":false,"i18n":null,"productionBrowserSourceMaps":false,"excludeDefaultMomentLocales":true,"reactProductionProfiling":false,"reactStrictMode":true,"reactMaxHeadersLength":6000,"httpAgentOptions":{"keepAlive":true},"logging":{"serverFunctions":true,"browserToTerminal":"warn"},"compiler":{},"expireTime":31536000,"staticPageGenerationTimeout":60,"output":"standalone","modularizeImports":{"@mui/icons-material":{"transform":"@mui/icons-material/{{member}}"},"lodash":{"transform":"lodash/{{member}}"}},"outputFileTracingRoot":"/opt/magnus-ui-build","enablePrerenderSourceMaps":true,"cacheComponents":false,"cacheLife":{"default":{"stale":300,"revalidate":900,"expire":4294967294},"seconds":{"stale":30,"revalidate":1,"expire":60},"minutes":{"stale":300,"revalidate":60,"expire":3600},"hours":{"stale":300,"revalidate":3600,"expire":86400},"days":{"stale":300,"revalidate":86400,"expire":604800},"weeks":{"stale":300,"revalidate":604800,"expire":2592000},"max":{"stale":300,"revalidate":2592000,"expire":31536000}},"cacheHandlers":{},"deprecated":{},"experimental":{"agentUpgrade":"security","agentFeedback":false,"coldCacheBadge":false,"collapseAdapterRoutes":true,"devValidationWorker":true,"useSkewCookie":false,"cssChunking":true,"multiZoneDraftMode":false,"appNavFailHandling":false,"parallelRouteMetadata":false,"prerenderEarlyExit":true,"serverMinification":true,"linkNoTouchStart":false,"caseSensitiveRoutes":false,"cachedNavigations":false,"dynamicOnHover":false,"reactBrowserBailout":true,"useOffline":false,"varyParams":true,"optimisticRouting":true,"concurrentRouterQueue":false,"instrumentationClientRouterTransitionEvents":false,"prefetchInlining":{"maxSize":2048,"maxBundleSize":10240},"preloadEntriesOnStart":true,"clientRouterFilter":true,"clientRouterFilterRedirects":false,"fetchCacheKeyPrefix":"","proxyPrefetch":"flexible","optimisticClientCache":true,"manualClientBasePath":false,"cpus":3,"memoryBasedWorkersCount":false,"imgOptConcurrency":null,"imgOptOperationCache":null,"imgOptTimeoutInSeconds":7,"imgOptMaxInputPixels":268402689,"imgOptSequentialRead":null,"imgOptMozjpeg":true,"isrFlushToDisk":true,"workerThreads":false,"optimizeCss":false,"nextScriptWorkers":false,"scrollRestoration":false,"externalDir":false,"devMemoryThresholdRestart":true,"disableOptimizedLoading":false,"gzipSize":true,"craCompat":false,"esmExternals":true,"fullySpecified":false,"swcTraceProfiling":false,"forceSwcTransforms":false,"requestInsights":false,"largePageDataBytes":128000,"typedEnv":false,"parallelServerCompiles":false,"parallelServerBuildTraces":false,"ppr":false,"authInterrupts":false,"webpackMemoryOptimizations":false,"optimizeServerReact":true,"strictRouteTypes":false,"useTypeScriptCli":true,"removeUncaughtErrorAndRejectionListeners":false,"validateRSCRequestHeaders":true,"staleTimes":{"dynamic":0,"static":300},"reactDebugChannel":true,"serverComponentsHmrCache":true,"serverComponentsHmrCancellation":false,"staticGenerationMaxConcurrency":8,"staticGenerationMinPagesPerWorker":25,"transitionIndicator":false,"gestureTransition":false,"inlineCss":false,"useCache":false,"useCacheStaticRootParamTracking":false,"globalNotFound":false,"explicitParallelRouteChildren":true,"strictRouteMatching":true,"browserDebugInfoInTerminal":"warn","lockDistDir":true,"disableResumeDataCacheCompression":false,"proxyClientMaxBodySize":10485760,"hideLogsAfterAbort":false,"mcpServer":true,"exposeRuntimeErrorsToHMR":false,"turbopackFileSystemCacheForDev":true,"turbopackFileSystemCacheForBuild":true,"turbopackStaleOutputMaxAge":604800000,"turbopackInferModuleSideEffects":true,"turbopackPluginRuntimeStrategy":"childProcesses","turbopackSharedRuntime":true,"serverActions":{"bodySizeLimit":"2mb"},"turbopackMemoryEvictionMode":"auto","optimizePackageImports":["lucide-react","date-fns","lodash-es","ramda","antd","react-bootstrap","ahooks","@ant-design/icons","@headlessui/react","@headlessui-float/react","@heroicons/react/20/solid","@heroicons/react/24/solid","@heroicons/react/24/outline","@visx/visx","@tremor/react","rxjs","@mui/material","@mui/icons-material","recharts","react-use","effect","@effect/schema","@effect/platform","@effect/platform-node","@effect/platform-browser","@effect/platform-bun","@effect/sql","@effect/sql-mssql","@effect/sql-mysql2","@effect/sql-pg","@effect/sql-sqlite-node","@effect/sql-sqlite-bun","@effect/sql-sqlite-wasm","@effect/sql-sqlite-react-native","@effect/rpc","@effect/rpc-http","@effect/typeclass","@effect/experimental","@effect/opentelemetry","@material-ui/core","@material-ui/icons","@tabler/icons-react","mui-core","react-icons/ai","react-icons/bi","react-icons/bs","react-icons/cg","react-icons/ci","react-icons/di","react-icons/fa","react-icons/fa6","react-icons/fc","react-icons/fi","react-icons/gi","react-icons/go","react-icons/gr","react-icons/hi","react-icons/hi2","react-icons/im","react-icons/io","react-icons/io5","react-icons/lia","react-icons/lib","react-icons/lu","react-icons/md","react-icons/pi","react-icons/ri","react-icons/rx","react-icons/si","react-icons/sl","react-icons/tb","react-icons/tfi","react-icons/ti","react-icons/vsc","react-icons/wi"],"useCacheTimeout":54,"instantInsights":{"validationLevel":"warning"},"trustHostHeader":false,"isExperimentalCompile":false},"htmlLimitedBots":"[\\w-]+-Google|Google-[\\w-]+|Chrome-Lighthouse|Slurp|DuckDuckBot|baiduspider|yandex|sogou|bitlybot|tumblr|vkShare|quora link preview|redditbot|ia_archiver|Bingbot|BingPreview|applebot|facebookexternalhit|facebookcatalog|Twitterbot|LinkedInBot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|Yeti|googleweblight","bundlePagesRouterDependencies":false,"configFileName":"next.config.ts","serverExternalPackages":["ssh2"],"turbopack":{"root":"/opt/magnus-ui-build"},"repoRoot":"/opt/magnus-ui-build","distDirRoot":".next","_originalRewrites":{"beforeFiles":[],"afterFiles":[{"source":"/dashboard-plugins/:path*","destination":"/api/hermes/dashboard/dashboard-plugins/:path*"},{"source":"/kanban","destination":"/api/hermes/dashboard/kanban"}],"fallback":[]},"_originalRedirects":[{"source":"/hermes","destination":"/orchestra/installations","permanent":true},{"source":"/hermes/installations","destination":"/orchestra/installations","permanent":true},{"source":"/hermes/profiles","destination":"/orchestra/profiles","permanent":true},{"source":"/orchestra/agents","destination":"/orchestra/installations","permanent":true}]}
18
+ const nextConfig = {"env":{"NEXT_PUBLIC_API_URL":"https://localhost:4000","NEXT_PUBLIC_AGENT_VERSION":"1.1.3","NEXT_PUBLIC_MAGNUS_VERSION":"1.1.3"},"webpack":null,"typescript":{"ignoreBuildErrors":false},"typedRoutes":false,"distDir":"./.next","cleanDistDir":true,"assetPrefix":"","cacheMaxMemorySize":52428800,"configOrigin":"next.config.ts","useFileSystemPublicRoutes":true,"generateEtags":true,"pageExtensions":["tsx","ts","jsx","js"],"instrumentationClientInject":[],"poweredByHeader":true,"compress":true,"images":{"deviceSizes":[640,750,828,1080,1200,1920,2048,3840],"imageSizes":[32,48,64,96,128,256,384],"path":"/_next/image","loader":"default","loaderFile":"","domains":[],"disableStaticImages":false,"minimumCacheTTL":14400,"formats":["image/webp"],"maximumRedirects":3,"maximumResponseBody":50000000,"dangerouslyAllowLocalIP":false,"dangerouslyAllowSVG":false,"contentSecurityPolicy":"script-src 'none'; frame-src 'none'; sandbox;","contentDispositionType":"attachment","localPatterns":[{"pathname":"**","search":""}],"remotePatterns":[],"qualities":[75],"unoptimized":false,"customCacheHandler":false},"devIndicators":{"position":"bottom-left"},"onDemandEntries":{"maxInactiveAge":60000,"pagesBufferLength":5},"basePath":"","sassOptions":{},"trailingSlash":false,"i18n":null,"productionBrowserSourceMaps":false,"excludeDefaultMomentLocales":true,"reactProductionProfiling":false,"reactStrictMode":true,"reactMaxHeadersLength":6000,"httpAgentOptions":{"keepAlive":true},"logging":{"serverFunctions":true,"browserToTerminal":"warn"},"compiler":{},"expireTime":31536000,"staticPageGenerationTimeout":60,"output":"standalone","modularizeImports":{"@mui/icons-material":{"transform":"@mui/icons-material/{{member}}"},"lodash":{"transform":"lodash/{{member}}"}},"outputFileTracingRoot":"/opt/magnus-ui-build","enablePrerenderSourceMaps":true,"cacheComponents":false,"cacheLife":{"default":{"stale":300,"revalidate":900,"expire":4294967294},"seconds":{"stale":30,"revalidate":1,"expire":60},"minutes":{"stale":300,"revalidate":60,"expire":3600},"hours":{"stale":300,"revalidate":3600,"expire":86400},"days":{"stale":300,"revalidate":86400,"expire":604800},"weeks":{"stale":300,"revalidate":604800,"expire":2592000},"max":{"stale":300,"revalidate":2592000,"expire":31536000}},"cacheHandlers":{},"deprecated":{},"experimental":{"agentUpgrade":"security","agentFeedback":false,"coldCacheBadge":false,"collapseAdapterRoutes":true,"devValidationWorker":true,"useSkewCookie":false,"cssChunking":true,"multiZoneDraftMode":false,"appNavFailHandling":false,"parallelRouteMetadata":false,"prerenderEarlyExit":true,"serverMinification":true,"linkNoTouchStart":false,"caseSensitiveRoutes":false,"cachedNavigations":false,"dynamicOnHover":false,"reactBrowserBailout":true,"useOffline":false,"varyParams":true,"optimisticRouting":true,"concurrentRouterQueue":false,"instrumentationClientRouterTransitionEvents":false,"prefetchInlining":{"maxSize":2048,"maxBundleSize":10240},"preloadEntriesOnStart":true,"clientRouterFilter":true,"clientRouterFilterRedirects":false,"fetchCacheKeyPrefix":"","proxyPrefetch":"flexible","optimisticClientCache":true,"manualClientBasePath":false,"cpus":3,"memoryBasedWorkersCount":false,"imgOptConcurrency":null,"imgOptOperationCache":null,"imgOptTimeoutInSeconds":7,"imgOptMaxInputPixels":268402689,"imgOptSequentialRead":null,"imgOptMozjpeg":true,"isrFlushToDisk":true,"workerThreads":false,"optimizeCss":false,"nextScriptWorkers":false,"scrollRestoration":false,"externalDir":false,"devMemoryThresholdRestart":true,"disableOptimizedLoading":false,"gzipSize":true,"craCompat":false,"esmExternals":true,"fullySpecified":false,"swcTraceProfiling":false,"forceSwcTransforms":false,"requestInsights":false,"largePageDataBytes":128000,"typedEnv":false,"parallelServerCompiles":false,"parallelServerBuildTraces":false,"ppr":false,"authInterrupts":false,"webpackMemoryOptimizations":false,"optimizeServerReact":true,"strictRouteTypes":false,"useTypeScriptCli":true,"removeUncaughtErrorAndRejectionListeners":false,"validateRSCRequestHeaders":true,"staleTimes":{"dynamic":0,"static":300},"reactDebugChannel":true,"serverComponentsHmrCache":true,"serverComponentsHmrCancellation":false,"staticGenerationMaxConcurrency":8,"staticGenerationMinPagesPerWorker":25,"transitionIndicator":false,"gestureTransition":false,"inlineCss":false,"useCache":false,"useCacheStaticRootParamTracking":false,"globalNotFound":false,"explicitParallelRouteChildren":true,"strictRouteMatching":true,"browserDebugInfoInTerminal":"warn","lockDistDir":true,"disableResumeDataCacheCompression":false,"proxyClientMaxBodySize":10485760,"hideLogsAfterAbort":false,"mcpServer":true,"exposeRuntimeErrorsToHMR":false,"turbopackFileSystemCacheForDev":true,"turbopackFileSystemCacheForBuild":true,"turbopackStaleOutputMaxAge":604800000,"turbopackInferModuleSideEffects":true,"turbopackPluginRuntimeStrategy":"childProcesses","turbopackSharedRuntime":true,"serverActions":{"bodySizeLimit":"2mb"},"turbopackMemoryEvictionMode":"auto","optimizePackageImports":["lucide-react","date-fns","lodash-es","ramda","antd","react-bootstrap","ahooks","@ant-design/icons","@headlessui/react","@headlessui-float/react","@heroicons/react/20/solid","@heroicons/react/24/solid","@heroicons/react/24/outline","@visx/visx","@tremor/react","rxjs","@mui/material","@mui/icons-material","recharts","react-use","effect","@effect/schema","@effect/platform","@effect/platform-node","@effect/platform-browser","@effect/platform-bun","@effect/sql","@effect/sql-mssql","@effect/sql-mysql2","@effect/sql-pg","@effect/sql-sqlite-node","@effect/sql-sqlite-bun","@effect/sql-sqlite-wasm","@effect/sql-sqlite-react-native","@effect/rpc","@effect/rpc-http","@effect/typeclass","@effect/experimental","@effect/opentelemetry","@material-ui/core","@material-ui/icons","@tabler/icons-react","mui-core","react-icons/ai","react-icons/bi","react-icons/bs","react-icons/cg","react-icons/ci","react-icons/di","react-icons/fa","react-icons/fa6","react-icons/fc","react-icons/fi","react-icons/gi","react-icons/go","react-icons/gr","react-icons/hi","react-icons/hi2","react-icons/im","react-icons/io","react-icons/io5","react-icons/lia","react-icons/lib","react-icons/lu","react-icons/md","react-icons/pi","react-icons/ri","react-icons/rx","react-icons/si","react-icons/sl","react-icons/tb","react-icons/tfi","react-icons/ti","react-icons/vsc","react-icons/wi"],"useCacheTimeout":54,"instantInsights":{"validationLevel":"warning"},"trustHostHeader":false,"isExperimentalCompile":false},"htmlLimitedBots":"[\\w-]+-Google|Google-[\\w-]+|Chrome-Lighthouse|Slurp|DuckDuckBot|baiduspider|yandex|sogou|bitlybot|tumblr|vkShare|quora link preview|redditbot|ia_archiver|Bingbot|BingPreview|applebot|facebookexternalhit|facebookcatalog|Twitterbot|LinkedInBot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|Yeti|googleweblight","bundlePagesRouterDependencies":false,"configFileName":"next.config.ts","serverExternalPackages":["ssh2"],"turbopack":{"root":"/opt/magnus-ui-build"},"repoRoot":"/opt/magnus-ui-build","distDirRoot":".next","_originalRewrites":{"beforeFiles":[],"afterFiles":[{"source":"/dashboard-plugins/:path*","destination":"/api/hermes/dashboard/dashboard-plugins/:path*"},{"source":"/kanban","destination":"/api/hermes/dashboard/kanban"}],"fallback":[]},"_originalRedirects":[{"source":"/hermes","destination":"/orchestra/installations","permanent":true},{"source":"/hermes/installations","destination":"/orchestra/installations","permanent":true},{"source":"/hermes/profiles","destination":"/orchestra/profiles","permanent":true},{"source":"/orchestra/agents","destination":"/orchestra/installations","permanent":true}]}
19
19
 
20
20
  process.env.__NEXT_PRIVATE_STANDALONE_CONFIG = JSON.stringify(nextConfig)
21
21
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hivemagnus/magnus-ui",
3
- "version": "1.1.2",
3
+ "version": "1.1.3",
4
4
  "description": "Magnus UI: web console for the Magnus fleet control plane, shipped as a prebuilt Next.js server with the magnus-ui CLI",
5
5
  "keywords": [
6
6
  "magnus",
@@ -64,7 +64,7 @@
64
64
  "ws": "^8.22.0"
65
65
  },
66
66
  "devDependencies": {
67
- "@hivemagnus/magnus-contracts": "1.1.2",
67
+ "@hivemagnus/magnus-contracts": "1.1.3",
68
68
  "@playwright/test": "^1.64.1",
69
69
  "@tailwindcss/postcss": "^4.0.0",
70
70
  "@types/node": "^24.19.2",
@@ -1,15 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,86421,e=>{"use strict";var t=e.i(43476),s=e.i(71645),a=e.i(93999),r=e.i(46670),n=e.i(68759),i=e.i(71417),l=e.i(82983),c=e.i(4050),d=e.i(77071),o=e.i(41120),u=e.i(15281),m=e.i(59659),x=e.i(66627),p=e.i(32781),h=e.i(99847),f=e.i(53138),g=e.i(84026),j=e.i(4139),b=e.i(86207),y=e.i(57665),N=e.i(41220),v=e.i(69174);let w=["/boot","/snap","/var/lib/docker/","/var/lib/containers/"],k=new Set(["iso9660","squashfs"]);var C=e.i(22016),S=e.i(14098),R=e.i(64971),E=e.i(62368),U=e.i(95925),z=e.i(69846),P=e.i(56420);let A={name:"chevron-up",size:24,node:[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]};A.node;let $=(0,P.f)(A);var I=e.i(66794),O=e.i(35673),_=e.i(39430);function T(e){return e?.isGitRepo!==!1&&e?.legacyGitSelfUpdate===!0}function F(){let{activeNode:e,removeNode:a}=(0,c.l)(),[i,d]=(0,s.useState)("checking"),u=(0,s.useRef)(null),[x,h]=(0,s.useState)(null),[f,g]=(0,s.useState)(!1),[j,b]=(0,s.useState)(null),[y,w]=(0,s.useState)(null),[k,C]=(0,s.useState)("idle"),[S,P]=(0,s.useState)(null),[A,F]=(0,s.useState)(null),[K,B]=(0,s.useState)(!1),[D,L]=(0,s.useState)(null),[V,q]=(0,s.useState)(!1),G=(0,s.useCallback)(async()=>{try{let t=(0,_.L)(e.url),s=await fetch("/api/proxy/health",{method:"GET",headers:t,signal:AbortSignal.timeout(8e3)});d(s.ok?"online":"offline")}catch{d("offline")}},[e.url]),M=(0,s.useCallback)(async()=>{try{let e=await l.f.selfUpdate.version();e.success&&h(e.data??null)}catch{}},[]);(0,s.useEffect)(()=>(d("checking"),h(null),g(!1),w(null),P(null),F(null),G(),M(),u.current=setInterval(()=>{G()},3e4),()=>{u.current&&(clearInterval(u.current),u.current=null)}),[e.id,G,M]);let J=async()=>{C("checking"),F(null),P(null);try{let e=await l.f.selfUpdate.status();e.success&&b(e.data??null);let t=await l.f.selfUpdate.check();t.success&&(w(t.data??null),t.data.error?F(t.data.error):t.data.available||P("Already up to date."))}catch(t){let e="Failed to check for updates";if(t&&"object"==typeof t&&"response"in t)try{let s=(0,R.R)(await (0,R.O)(t));s&&(e=s)}catch{}else t instanceof Error&&(e=t.message);F(e)}finally{C("idle")}},H=async e=>{C("applying"),F(null),P(null);try{let t=await l.f.selfUpdate.apply(e);if(t.success){let e=t.data;if(!e)return;e.updated?P(`Updated from v${e.previousVersion} → v${e.currentVersion}`+(e.restart?.scheduled?`. Restarting via ${e.restart.method}…`:". Restart manually to apply.")):P("Code pulled but no version change detected."),w(null),M();let s=await l.f.selfUpdate.status();s.success&&b(s.data??null)}}catch(e){F(e instanceof Error?e.message:"Update failed")}finally{C("idle")}},W=async()=>{C("restarting"),F(null);try{let e=await l.f.selfUpdate.restart();e.success&&P(`Restart scheduled via ${e.data.method}. Reconnecting shortly…`)}catch(e){F(e instanceof Error?e.message:"Restart failed")}finally{C("idle")}},Y=async()=>{if(confirm(`Delete control node "${e.name}"? You'll be switched to another node.`))try{await a(e.id)}catch{}};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"rounded border border-border bg-surface",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-5 py-3",children:[(0,t.jsx)("div",{className:"flex items-center gap-4 min-w-0",children:(0,t.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,t.jsx)(N.f,{className:"h-4.5 w-4.5 text-primary shrink-0"}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 rounded border border-border bg-bg px-2.5 py-1 text-xs font-bold min-w-0",children:[(0,t.jsx)(N.f,{className:"h-3.5 w-3.5 shrink-0 text-text-muted"}),(0,t.jsx)("span",{className:"truncate",children:e.name})]}),(0,t.jsx)("button",{onClick:()=>{L(e.id),q(!1),B(!0)},className:"rounded border border-border bg-bg p-1.5 text-text-muted transition-all hover:bg-surface-hover hover:text-text hover:border-primary/30 hover:shadow-[0_0_20px_var(--color-glow)]",title:"Control Node Settings",children:(0,t.jsx)(I.f,{className:"h-3.5 w-3.5"})}),(()=>{switch(i){case"checking":return(0,t.jsxs)(r.t,{variant:"info",children:[(0,t.jsx)(p.f,{className:"mr-1 h-3 w-3 animate-spin"}),"Checking"]});case"online":return(0,t.jsx)(r.t,{variant:"success",children:"Online"});case"offline":return(0,t.jsx)(r.t,{variant:"danger",children:"Offline"})}})()]}),(0,t.jsxs)("div",{className:"text-xs text-text-muted truncate mt-0.5",children:[e.url,x&&(0,t.jsxs)("span",{className:"ml-2",children:["v",x.controlApiVersion]})]})]})]})}),(0,t.jsxs)("div",{className:"flex items-center gap-1 shrink-0",children:[(0,t.jsxs)(n.K,{variant:"ghost",size:"sm",title:"Check for updates",onClick:()=>{f?g(!1):(g(!0),(async()=>{try{let e=await l.f.selfUpdate.status();e.success&&(b(e.data??null),T(e.data)&&J())}catch{}})())},children:[(0,t.jsx)(v.f,{className:"h-3.5 w-3.5 text-primary"}),(0,t.jsx)("span",{className:"hidden sm:inline",children:"Update"})]}),(0,t.jsx)(n.K,{variant:"ghost",size:"sm",title:"Delete control node",onClick:()=>void Y(),children:(0,t.jsx)(m.f,{className:"h-3.5 w-3.5 text-danger"})}),(0,t.jsx)(n.K,{variant:"ghost",size:"sm",title:"Refresh status",onClick:()=>{d("checking"),G(),M()},children:(0,t.jsx)(o.f,{className:"h-3.5 w-3.5"})})]})]}),f&&(0,t.jsxs)("div",{className:"border-t border-border px-5 py-3 space-y-3",children:[A&&(0,t.jsx)("div",{className:"rounded border border-danger/30 bg-danger/10 p-3 text-xs text-danger",children:A}),S&&(0,t.jsx)("div",{className:"rounded border border-success/30 bg-success/10 p-3 text-xs text-success",children:S}),j&&(0,t.jsxs)("div",{className:"flex flex-wrap gap-x-6 gap-y-1 text-[11px] text-text-muted",children:[(0,t.jsxs)("span",{children:["Control API: ",(0,t.jsxs)("span",{className:"text-text",children:["v",j.controlApiVersion]})]}),(0,t.jsxs)("span",{children:["Agent: ",(0,t.jsxs)("span",{className:"text-text",children:["v",j.agentVersion]})]}),j.gitBranch&&(0,t.jsxs)("span",{className:"flex items-center gap-1",children:[(0,t.jsx)(z.f,{className:"h-3 w-3"}),(0,t.jsx)("span",{className:"text-text",children:j.gitBranch})]}),j.gitCommit&&(0,t.jsxs)("span",{children:["Commit: ",(0,t.jsx)("span",{className:"text-text",children:j.gitCommit})]}),j.lastChecked&&(0,t.jsxs)("span",{children:["Checked: ",new Date(j.lastChecked).toLocaleString()]})]}),j&&!T(j)&&(0,t.jsxs)("div",{className:"rounded border border-primary/30 bg-primary/10 p-3 text-xs text-text-muted",children:[(0,t.jsx)("span",{className:"font-bold text-primary",children:"Upgrade on the server host"}),(0,t.jsxs)("span",{className:"ml-1",children:["with ",(0,t.jsx)("code",{className:"rounded bg-surface px-1 text-text",children:j.upgradeCommand??"magnus upgrade"}),": it backs up the database, migrates, restarts and switches back automatically if the new version is unhealthy."]})]}),y?.available&&(0,t.jsxs)("div",{className:"rounded border border-warning/30 bg-warning/10 p-3 text-xs",children:[(0,t.jsx)("span",{className:"font-bold text-warning uppercase tracking-wider",children:"Update available"}),(0,t.jsxs)("span",{className:"text-text-muted ml-1",children:["— ",y.behindBy," commit",1!==y.behindBy?"s":""," behind (",y.currentCommit," → ",y.remoteCommit,")"]})]}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[T(j)&&(0,t.jsx)(n.K,{variant:"secondary",size:"sm",onClick:()=>void J(),disabled:"idle"!==k,icon:"checking"===k?(0,t.jsx)(p.f,{className:"h-3.5 w-3.5 animate-spin"}):(0,t.jsx)(o.f,{className:"h-3.5 w-3.5"}),children:"checking"===k?"Checking…":"Check for Updates"}),T(j)&&y?.available&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.K,{variant:"primary",size:"sm",onClick:()=>void H(!1),disabled:"idle"!==k,icon:"applying"===k?(0,t.jsx)(p.f,{className:"h-3.5 w-3.5 animate-spin"}):(0,t.jsx)(E.f,{className:"h-3.5 w-3.5"}),children:"applying"===k?"Updating…":"Pull & Build"}),(0,t.jsx)(n.K,{variant:"primary",size:"sm",onClick:()=>void H(!0),disabled:"idle"!==k,icon:"applying"===k?(0,t.jsx)(p.f,{className:"h-3.5 w-3.5 animate-spin"}):(0,t.jsx)(U.f,{className:"h-3.5 w-3.5"}),children:"applying"===k?"Updating…":"Pull, Build & Restart"})]}),T(j)&&(0,t.jsx)(n.K,{variant:"ghost",size:"sm",onClick:()=>void W(),disabled:"idle"!==k,icon:"restarting"===k?(0,t.jsx)(p.f,{className:"h-3.5 w-3.5 animate-spin"}):(0,t.jsx)(U.f,{className:"h-3.5 w-3.5"}),children:"restarting"===k?"Restarting…":"Restart Only"}),(0,t.jsx)("div",{className:"ml-auto",children:(0,t.jsx)(n.K,{variant:"ghost",size:"sm",onClick:()=>g(!1),icon:(0,t.jsx)($,{className:"h-3.5 w-3.5"}),children:"Close"})})]})]})]}),(0,t.jsx)(O.f,{open:K,onClose:()=>{B(!1),L(null),q(!1),G(),M()},editNodeId:D,createMode:V})]})}var K=e.i(32568);function B({open:a,onClose:r,node:n}){let i=(0,s.useRef)(null),l=(0,s.useRef)(null),c=(0,s.useRef)(null),d=(0,s.useRef)(null),o=(0,s.useRef)(!1),u=(0,s.useRef)(null),[m,x]=(0,s.useState)("connecting"),p=(0,s.useRef)(""),h=(0,s.useRef)(null),f=(0,s.useCallback)(()=>{h.current=null;let e=p.current;e&&d.current&&(p.current="",fetch("/api/terminal/input",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:d.current,data:e})}).catch(()=>{}))},[]),g=(0,s.useCallback)(()=>{if(!o.current){o.current=!0,h.current&&(clearTimeout(h.current),h.current=null),u.current?.abort(),u.current=null,d.current&&(fetch("/api/terminal/close",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:d.current})}).catch(()=>{}),d.current=null);try{l.current?.dispose()}catch{}l.current=null,c.current=null}},[]);(0,s.useEffect)(()=>{if(!a||!n||!i.current)return;o.current=!1,x("connecting");let t=!1;(async()=>{let s,{Terminal:a}=await e.A(37138),{FitAddon:r}=await e.A(59439);if(!document.getElementById("xterm-css")){let e=document.createElement("style");e.id="xterm-css",e.textContent=`
2
- .xterm { position: relative; user-select: none; }
3
- .xterm.focus, .xterm:focus { outline: none; }
4
- .xterm .xterm-helpers { position: absolute; top: 0; z-index: 5; }
5
- .xterm .xterm-helper-textarea { padding: 0; border: 0; margin: 0; position: absolute; opacity: 0; left: -9999em; top: 0; width: 0; height: 0; z-index: -5; white-space: nowrap; overflow: hidden; resize: none; }
6
- .xterm .composition-view { display: none; position: absolute; white-space: nowrap; z-index: 1; }
7
- .xterm .xterm-viewport { background-color: transparent !important; overflow-y: scroll; cursor: default; position: absolute; right: 0; left: 0; top: 0; bottom: 0; scrollbar-width: thin; scrollbar-color: #5a5a7a transparent; }
8
- .xterm .xterm-screen { position: relative; }
9
- .xterm .xterm-screen canvas { position: absolute; left: 0; top: 0; }
10
- .xterm .xterm-decoration-container .xterm-decoration { z-index: 6; position: absolute; }
11
- .xterm .xterm-decoration-top-layer { z-index: 7; position: relative; }
12
- `,document.head.appendChild(e)}if(t||o.current)return;let m=new a({cursorBlink:!0,scrollback:1e3,fontFamily:'"JetBrains Mono", "Fira Code", "Cascadia Code", monospace',fontSize:13,theme:{background:"#06060d",foreground:"#e0e0ec",cursor:"#00e5ff",cursorAccent:"#06060d",selectionBackground:"#00e5ff33",black:"#06060d",red:"#ff1744",green:"#00ff41",yellow:"#ffb300",blue:"#00b0ff",magenta:"#ff006e",cyan:"#00e5ff",white:"#e0e0ec",brightBlack:"#5a5a7a",brightRed:"#ff5252",brightGreen:"#69f0ae",brightYellow:"#ffd740",brightBlue:"#40c4ff",brightMagenta:"#ff4081",brightCyan:"#18ffff",brightWhite:"#ffffff"}}),g=new r;if(m.loadAddon(g),l.current=m,c.current=g,i.current&&(m.open(i.current),requestAnimationFrame(()=>{o.current||g.fit()})),t||o.current)return;let j=g.proposeDimensions(),b=j?.cols??120,y=j?.rows??30,N=n.hostname||n.ipAddress;m.write(`\x1b[38;2;138;138;171mConnecting to ${N} as ${N===n.hostname?n.hostname:n.ipAddress}...\x1b[0m\r
13
- `);try{let e=await fetch("/api/terminal/open",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({host:N,cols:b,rows:y})});if(!e.ok){let t=await e.json().catch(()=>({}));throw Error(t.error??`HTTP ${e.status}`)}d.current=s=(await e.json()).sessionId}catch(s){if(t||o.current)return;let e=s instanceof Error?s.message:"Unknown error";m.write(`\r
14
- \x1b[31mFailed to open session: ${e}\x1b[0m\r
15
- `),x("error");return}if(t||o.current)return;x("connected");let v=new AbortController;u.current=v,(async()=>{try{let e=await fetch(`/api/terminal/stream?sessionId=${encodeURIComponent(s)}`,{signal:v.signal});if(!e.ok||!e.body){t||o.current||(m.write("\r\n\x1b[31mFailed to connect output stream\x1b[0m\r\n"),x("error"));return}let a=e.body.getReader();for(;;){let{done:e,value:s}=await a.read();if(e||t||o.current)break;s&&m.write(s)}}catch(e){if(e instanceof DOMException&&"AbortError"===e.name)return}t||o.current||(x("closed"),m.write("\r\n\x1b[38;2;138;138;171m── Session ended ──\x1b[0m\r\n"))})(),m.onData(e=>{!o.current&&d.current&&(p.current+=e,h.current||(h.current=setTimeout(f,16)))}),m.onResize(({cols:e,rows:t})=>{!o.current&&d.current&&fetch("/api/terminal/resize",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:d.current,cols:e,rows:t})}).catch(()=>{})})})();let s=()=>{c.current&&!o.current&&c.current.fit()};return window.addEventListener("resize",s),()=>{t=!0,window.removeEventListener("resize",s),g()}},[a,n,g,f]);let b=(0,s.useCallback)(()=>{g(),r()},[g,r]);return n?(0,t.jsx)(K.n,{open:a,onClose:b,title:`Terminal: ${n.name}`,description:"Interactive SSH session",icon:(0,t.jsx)(j.f,{className:"h-5 w-5 text-primary"}),className:"max-w-5xl",children:(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsxs)("div",{className:"absolute top-0 right-0 z-10 flex items-center gap-1.5 px-2 py-1",children:[(0,t.jsx)("div",{className:`h-1.5 w-1.5 rounded-full ${"connected"===m?"bg-success":"connecting"===m?"bg-warning animate-pulse":"error"===m?"bg-danger":"bg-text-muted"}`}),(0,t.jsx)("span",{className:"text-[10px] uppercase tracking-wider text-text-muted",children:m})]}),(0,t.jsx)("div",{ref:i,className:"h-[65vh] w-full rounded border border-border/50 bg-[#06060d] p-1 overflow-hidden"})]})}):null}var D=e.i(63376),L=e.i(67683),V=e.i(73404),q=e.i(51196),G=e.i(75723),M=e.i(2067),J=e.i(65369),H=e.i(51757),W=e.i(83967);let Y={pending:{label:"Queued",variant:"default"},requested:{label:"Installing",variant:"info"},confirmed:{label:"Upgraded",variant:"success"},reverted:{label:"Reverted",variant:"danger"},failed:{label:"Failed",variant:"danger"},skipped:{label:"Skipped",variant:"default"}};function Q({open:e,onClose:a,onFinished:i}){let[c,d]=(0,s.useState)(null),[o,u]=(0,s.useState)(new Set),[m,x]=(0,s.useState)(null),[h,f]=(0,s.useState)(null),[g,j]=(0,s.useState)(!1),b=(0,s.useCallback)(async()=>{f(null);try{let e=await l.f.agentUpgrades.eligibility();d(e),u(new Set(e.nodes.filter(e=>e.eligible).map(e=>e.nodeId))),e.latestRun?.status==="running"&&x(e.latestRun)}catch(e){f(e instanceof Error?e.message:String(e))}},[]);(0,s.useEffect)(()=>{e&&(x(null),b())},[e,b]),(0,s.useEffect)(()=>{if(!m||"running"!==m.status)return;let e=window.setInterval(()=>{l.f.agentUpgrades.run(m.id).then(e=>{x(e),"running"!==e.status&&i?.()}).catch(()=>void 0)},5e3);return()=>window.clearInterval(e)},[m,i]);let y=(0,s.useMemo)(()=>c?.nodes.filter(e=>e.eligible).length??0,[c]),N=async()=>{j(!0),f(null);try{x(await l.f.agentUpgrades.start({nodeIds:[...o],version:c?.version}))}catch(e){f(e instanceof Error?e.message:String(e))}finally{j(!1)}};return(0,t.jsx)(K.n,{open:e,onClose:a,title:"Upgrade agents",icon:(0,t.jsx)(v.f,{className:"h-4 w-4"}),description:c?`Target: magnus-agent ${c.version} (the version this server ships with)`:void 0,className:"max-w-2xl",children:(0,t.jsxs)("div",{className:"space-y-4 text-[11px]",children:[h&&(0,t.jsx)("div",{className:"rounded border border-danger/40 bg-danger/10 px-3 py-2 text-danger",children:h}),c&&!c.upgradesEnabled&&(0,t.jsxs)("div",{className:"rounded border border-warning/40 bg-warning/10 px-3 py-2 text-warning",children:["Agent upgrades are off: ",c.disabledReason]}),!c&&!h&&(0,t.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,t.jsx)(p.f,{className:"h-4 w-4 animate-spin"})," Checking agents…"]}),c&&!m&&(0,t.jsxs)("ul",{className:"max-h-80 divide-y divide-border/40 overflow-y-auto rounded border border-border","data-testid":"agent-upgrade-candidates",children:[c.nodes.map(e=>(0,t.jsxs)("li",{className:`flex items-center gap-3 px-3 py-2 ${e.eligible&&c.upgradesEnabled?"":"opacity-50"}`,title:e.reason??void 0,children:[(0,t.jsx)("input",{type:"checkbox","aria-label":`Upgrade ${e.name}`,checked:o.has(e.nodeId),disabled:!e.eligible||!c.upgradesEnabled,onChange:()=>{let t;return t=e.nodeId,u(e=>{let s=new Set(e);return s.has(t)?s.delete(t):s.add(t),s})}}),(0,t.jsx)("span",{className:"w-40 truncate font-medium text-text",children:e.name}),(0,t.jsx)("span",{className:"num w-20 text-text-muted",children:e.version}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate text-text-muted",children:e.eligible?`→ ${c.version}`:e.reason})]},e.nodeId)),0===c.nodes.length&&(0,t.jsx)("li",{className:"px-3 py-2 text-text-muted",children:"No nodes registered."})]}),m&&(0,t.jsxs)("div",{className:"space-y-2","data-testid":"agent-upgrade-run",children:[(0,t.jsxs)("p",{className:"flex items-center gap-2",children:["running"===m.status&&(0,t.jsx)(p.f,{className:"h-4 w-4 animate-spin text-primary"}),"succeeded"===m.status&&(0,t.jsx)(H.f,{className:"h-4 w-4 text-success"}),"failed"===m.status&&(0,t.jsx)(W.f,{className:"h-4 w-4 text-danger"}),(0,t.jsx)("span",{className:"font-bold uppercase tracking-wider",children:"running"===m.status?`Upgrading to ${m.version}`:m.message??m.status})]}),(0,t.jsx)("ul",{className:"max-h-80 divide-y divide-border/40 overflow-y-auto rounded border border-border",children:m.nodes.map((e,s)=>(0,t.jsxs)("li",{className:"flex items-center gap-3 px-3 py-2",children:[(0,t.jsxs)("span",{className:"w-40 truncate font-medium text-text",children:[e.name,0===s?" (canary)":""]}),(0,t.jsxs)("span",{className:"num w-28 text-text-muted",children:[e.from," → ",m.version]}),(0,t.jsxs)(r.t,{variant:Y[e.state].variant,children:["requested"===e.state&&(0,t.jsx)(p.f,{className:"mr-1 inline h-3 w-3 animate-spin"}),"reverted"===e.state&&(0,t.jsx)(U.f,{className:"mr-1 inline h-3 w-3"}),Y[e.state].label]}),e.detail&&(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate text-text-muted",title:e.detail,children:e.detail})]},e.nodeId))})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("p",{className:"text-text-muted",children:"The first agent is a canary. Each agent switches back by itself if the new version does not report a heartbeat in time; the run stops at the first failure."}),(0,t.jsxs)("div",{className:"flex shrink-0 gap-2",children:[(0,t.jsx)(n.K,{variant:"secondary",size:"sm",onClick:a,children:m&&"running"!==m.status?"Close":"Cancel"}),!m&&(0,t.jsxs)(n.K,{variant:"primary",size:"sm",onClick:()=>void N(),"data-testid":"agent-upgrade-start",disabled:g||0===o.size||!c?.upgradesEnabled,icon:g?(0,t.jsx)(p.f,{className:"h-3.5 w-3.5 animate-spin"}):(0,t.jsx)(v.f,{className:"h-3.5 w-3.5"}),children:["Upgrade ",o.size||y," agent",1===(o.size||y)?"":"s"]})]})]})]})})}function X(e){try{let t=JSON.parse(e);if("string"==typeof t.deployError)return{label:"Deploy failed",message:t.deployError};if("string"==typeof t.upgradeError)return{label:"Upgrade failed",message:t.upgradeError};return null}catch{return null}}e.s(["default",0,function({initialNodes:e,initialTailscaleSummary:R}){let E,U,{activeNode:z}=(0,c.l)(),[P,A]=(0,s.useState)(e),[$,I]=(0,s.useState)((!!e.length||void 0===e)&&!1),[O,_]=(0,s.useState)(null),[T,K]=(0,s.useState)(!1),[H,W]=(0,s.useState)(!1);(0,s.useEffect)(()=>{"agents"===new URLSearchParams(window.location.search).get("upgrade")&&W(!0)},[]);let[Y,Z]=(0,s.useState)(null),[ee,et]=(0,s.useState)(null),[es,ea]=(0,s.useState)(!1),[er,en]=(0,s.useState)([]),[ei,el]=(0,s.useState)(null),[ec,ed]=(0,s.useState)({}),[eo,eu]=(0,s.useState)(null),[em,ex]=(0,s.useState)(R),ep=(0,s.useRef)(null),eh=(0,s.useRef)({}),[ef,eg]=(0,s.useState)(e.length>0),ej=(0,s.useCallback)(async(e=!1)=>{try{e||I(!0),_(null);let[t,s,a]=await Promise.all([l.f.nodes.list(),l.f.nodes.systemUpdatesSummary().catch(()=>null),l.f.nodes.tailscaleSummary().catch(()=>null)]),r=t.data.map(e=>{if(e.role)return delete eh.current[e.id],e;let t=eh.current[e.id];return void 0!==t?{...e,role:t}:e});A(r),eu(s?.data??null),ex(a?.data??null);let n=await Promise.all(r.map(async e=>{try{let t=await l.f.nodes.health(e.id);return[e.id,t.data]}catch{return[e.id,null]}}));ed(Object.fromEntries(n.filter(e=>null!==e[1])))}catch(a){let t=a instanceof Error?a.message:String(a),s="Failed to fetch"===t||t.includes("TypeError")||t.includes("NetworkError")||t.includes("ECONNREFUSED")||t.includes("timeout");e||_(s?`Control node unreachable (${z.name})`:t)}finally{e||I(!1)}},[z.name]);(0,s.useEffect)(()=>{if(ef){eg(!1),(async()=>{e.length>0&&ed(Object.fromEntries((await Promise.all(e.map(async e=>{try{let t=await l.f.nodes.health(e.id);return[e.id,t.data]}catch{return[e.id,null]}}))).filter(e=>null!==e[1])));try{let e=await l.f.nodes.systemUpdatesSummary();eu(e.data)}catch{eu(null)}try{let e=await l.f.nodes.tailscaleSummary();ex(e.data??null)}catch{ex(null)}})();return}A([]),_(null),en([]),ed({}),eu(null),ex(null),eh.current={},ej()},[z.id]),(0,s.useEffect)(()=>{let e=P.some(e=>"PROVISIONING"===e.status||e.agent?.status==="UPDATING");return e&&!ep.current?ep.current=setInterval(()=>{ej(!0)},4e3):!e&&ep.current&&(clearInterval(ep.current),ep.current=null),()=>{ep.current&&(clearInterval(ep.current),ep.current=null)}},[P,ej]);let eb=async e=>{if(confirm(`Delete node "${e.name}"? This will permanently remove it and all associated data.`))try{await l.f.nodes.delete(e.id),ej()}catch{}},ey=async()=>{ea(!0),en([]);try{let e=await l.f.discovery.scan(5e3);e.success&&Array.isArray(e.data)&&en(e.data)}catch{}finally{ea(!1)}};return(0,t.jsxs)(D.U,{className:"space-y-6",children:[(0,t.jsx)(D.z,{children:(0,t.jsx)(V.f,{title:"Nodes",eyebrow:"Fleet",description:"Manage your Magnus fleet nodes",status:P.length>0?(0,t.jsxs)("span",{className:"flex 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)(G.f,{status:"ONLINE",size:"xs"}),(0,t.jsx)("span",{className:"num",children:P.filter(e=>"ONLINE"===e.status).length})," online"]}),(0,t.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(G.f,{status:"OFFLINE",size:"xs",pulse:!1}),(0,t.jsx)("span",{className:"num",children:P.filter(e=>"OFFLINE"===e.status).length})," offline"]})]}):void 0,actions:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.K,{variant:"secondary",size:"sm",icon:(0,t.jsx)(o.f,{className:"h-3.5 w-3.5"}),onClick:()=>void ej(),children:"Refresh"}),(0,t.jsx)(n.K,{variant:"secondary",size:"sm",icon:(0,t.jsx)(v.f,{className:"h-3.5 w-3.5"}),onClick:()=>W(!0),"data-testid":"open-agent-upgrade",children:"Upgrade Agents"}),(0,t.jsx)(n.K,{variant:"secondary",size:"sm",icon:(0,t.jsx)(d.f,{className:"h-3.5 w-3.5"}),onClick:()=>K(!0),children:"Register Node"})]})})}),(0,t.jsx)(D.z,{children:(0,t.jsx)(F,{})}),em&&(0,t.jsx)(D.z,{children:(0,t.jsx)(L.f,{summary:em,showAction:!1})}),eo&&(0,t.jsx)(D.z,{children:(0,t.jsx)("section",{className:"panel-corners overflow-hidden rounded-panel border border-border bg-surface","aria-label":"System update readiness",children:(0,t.jsxs)("div",{className:"grid grid-cols-2 divide-x divide-y divide-border/60 sm:grid-cols-4 sm:divide-y-0",children:[(0,t.jsxs)("div",{className:"col-span-2 flex items-center gap-3 px-4 py-3 sm:col-span-1",children:[(0,t.jsx)("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-panel border border-primary/30 bg-primary/10 text-primary shadow-[0_0_10px_var(--color-glow)]",children:(0,t.jsx)(b.f,{className:"h-4 w-4"})}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("p",{className:"text-[10px] font-bold uppercase tracking-[0.16em] text-text-muted",children:"Auto-update coverage"}),(0,t.jsxs)("p",{className:"num mt-0.5 text-sm font-semibold",children:[eo.enabled," / ",eo.reporting," enabled"]}),(0,t.jsx)(q.f,{className:"mt-1.5",value:eo.reporting>0?eo.enabled/eo.reporting*100:null,tone:eo.enabled===eo.reporting?"success":"warning",label:"Auto-update coverage"})]})]}),(0,t.jsxs)("div",{className:"px-4 py-3",children:[(0,t.jsx)("p",{className:"text-[10px] font-bold uppercase tracking-[0.16em] text-text-muted",children:"Action needed"}),(0,t.jsx)("p",{className:`num mt-1 text-lg font-bold ${eo.actionNeeded?"text-warning glow-text-warning":"text-success"}`,children:eo.actionNeeded})]}),(0,t.jsxs)("div",{className:"px-4 py-3",children:[(0,t.jsx)("p",{className:"text-[10px] font-bold uppercase tracking-[0.16em] text-text-muted",children:"Reboot debt"}),(0,t.jsxs)("p",{className:`num mt-1 flex items-center gap-1.5 text-lg font-bold ${eo.rebootRequired?"text-danger glow-text-danger":"text-success"}`,children:[eo.rebootRequired?(0,t.jsx)(y.f,{className:"h-4 w-4"}):null,eo.rebootRequired]})]}),(0,t.jsxs)("div",{className:"px-4 py-3",children:[(0,t.jsx)("p",{className:"text-[10px] font-bold uppercase tracking-[0.16em] text-text-muted",children:"Reporting"}),(0,t.jsxs)("p",{className:"num mt-1 text-lg font-bold",children:[eo.reporting," / ",eo.total]})]})]})})}),(0,t.jsx)(D.z,{children:(0,t.jsx)(a.N,{children:O?O.startsWith("Control node unreachable")?(0,t.jsx)(M.f,{tone:"warning",icon:(0,t.jsx)(x.f,{className:"h-5 w-5"}),title:O,description:"Cannot connect to this Control Node. Verify it is running and reachable.",action:(0,t.jsx)(n.K,{variant:"secondary",size:"sm",onClick:()=>void ej(),children:"Retry"})}):(0,t.jsx)(M.f,{tone:"danger",icon:(0,t.jsx)(h.f,{className:"h-5 w-5"}),title:"Error loading nodes",description:O,action:(0,t.jsx)(n.K,{variant:"secondary",size:"sm",onClick:()=>void ej(),children:"Retry"})}):$?(0,t.jsx)(J.F,{rows:6,cols:9,className:"border-0"}):0===P.length?(0,t.jsx)(M.f,{tone:"primary",icon:(0,t.jsx)(N.f,{className:"h-5 w-5"}),title:"No nodes registered",description:"Register your first Magnus node to get started.",action:(0,t.jsx)(n.K,{size:"sm",icon:(0,t.jsx)(d.f,{className:"h-3.5 w-3.5"}),onClick:()=>K(!0),children:"Register Node"})}):(0,t.jsx)("div",{className:"max-h-[70vh] overflow-auto",children:(0,t.jsxs)("table",{className:"w-full text-[11px]",children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{className:"sticky top-0 z-10 border-b border-primary/30 bg-surface/95 text-left text-[10px] font-bold uppercase tracking-[0.15em] text-text-muted shadow-[0_1px_0_var(--color-primary),0_4px_12px_-6px_var(--color-glow)] backdrop-blur-sm",children:[(0,t.jsx)("th",{className:"pb-3 pr-4",children:"Name"}),(0,t.jsx)("th",{className:"pb-3 pr-4",children:"Host"}),(0,t.jsx)("th",{className:"pb-3 pr-4",children:"Address"}),(0,t.jsx)("th",{className:"pb-3 pr-4",children:"Status"}),(0,t.jsx)("th",{className:"pb-3 pr-4",children:"Agent"}),(0,t.jsx)("th",{className:"pb-3 pr-4",children:"Role"}),(0,t.jsx)("th",{className:"pb-3 pr-4",children:"CPU"}),(0,t.jsx)("th",{className:"pb-3 pr-4",children:"Memory"}),(0,t.jsx)("th",{className:"pb-3 pr-4",children:"Persistent Disk"}),(0,t.jsx)("th",{className:"pb-3 pr-4",children:"Updates"}),(0,t.jsx)("th",{className:"pb-3 pr-4",children:"Tailscale key"}),(0,t.jsx)("th",{className:"pb-3 pr-4",children:"Last Heartbeat"}),(0,t.jsx)("th",{className:"pb-3",children:"Actions"})]})}),(0,t.jsx)("tbody",{className:"divide-y divide-border/50",children:P.map(e=>{var s;let a=ec[e.id],l=(function(e){if(Array.isArray(e))return e;if(!e)return[];try{let t=JSON.parse(e);return Array.isArray(t)?t:[]}catch{return[]}})(a?.disks).filter(e=>"/"===e.mountPoint||"/home"===e.mountPoint||e.mountPoint.startsWith("/home/")||e.mountPoint.startsWith("/mnt/")||e.mountPoint.startsWith("/srv/")).filter(e=>!w.some(t=>e.mountPoint===t||e.mountPoint.startsWith(t))).filter(e=>!k.has((e.filesystemType??"").toLowerCase())).sort((e,t)=>t.usagePercent-e.usagePercent)[0]??null,c=l?(s=l.usagePercent)>=95?"critical":s>=80?"warning":"normal":null,d=eo?.nodes.find(t=>t.id===e.id)?.systemUpdates??null,o=em?.nodes.find(t=>t.id===e.id)?.tailscale??null;return(0,t.jsxs)("tr",{className:"group/row relative transition-colors hover:bg-primary/[0.03] [&>td:first-child]:shadow-[inset_2px_0_0_transparent] hover:[&>td:first-child]:shadow-[inset_2px_0_0_var(--color-primary)]",children:[(0,t.jsx)("td",{className:"py-3 pl-2 pr-4",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(G.f,{status:e.status,size:"xs"}),"ONLINE"===e.status&&(0,t.jsx)("button",{onClick:()=>el(e),title:`Open terminal on ${e.name}`,className:"flex h-6 w-6 items-center justify-center rounded border border-border/50 text-text-muted hover:text-primary hover:border-primary/40 transition-colors",children:(0,t.jsx)(j.f,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(C.default,{href:`/nodes/${e.id}`,className:"font-medium text-primary hover:text-primary-hover transition-colors",children:e.name})]})}),(0,t.jsx)("td",{className:"py-3 pr-4 text-text-muted",children:e.hostname}),(0,t.jsxs)("td",{className:"py-3 pr-4 text-text-muted",children:[e.ipAddress,":",e.port]}),(0,t.jsx)("td",{className:"py-3 pr-4",children:(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(r.t,{variant:(0,r.k)(e.status),children:e.status}),("DEGRADED"===e.status||e.agent?.status==="ERROR")&&X(e.metadata)&&(0,t.jsx)("span",{title:`${X(e.metadata).label}: ${X(e.metadata).message}`,children:(0,t.jsx)(h.f,{className:"h-3.5 w-3.5 text-danger cursor-help"})}),"PROVISIONING"===e.status&&(0,t.jsx)(p.f,{className:"h-3.5 w-3.5 text-info animate-spin"})]})}),(0,t.jsx)("td",{className:"py-3 pr-4 text-text-muted",children:(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[e.agent?`v${e.agent.version}`:"—",e.agent?.status==="UPDATING"&&(0,t.jsx)(p.f,{className:"h-3 w-3 text-info animate-spin"})]})}),(0,t.jsx)("td",{className:"py-3 pr-4",children:e.role?(0,t.jsxs)("button",{className:"inline-flex items-center gap-1 rounded border border-primary/30 bg-primary/5 px-2 py-0.5 text-[10px] font-bold uppercase tracking-wider text-primary hover:bg-primary/10 hover:border-primary/50 transition-all cursor-pointer",onClick:()=>et(e),title:"Change role",children:[(0,t.jsx)(g.f,{className:"h-3 w-3"}),e.role.name]}):(0,t.jsx)("button",{className:"text-[10px] text-text-muted hover:text-primary transition-colors cursor-pointer uppercase tracking-wider",onClick:()=>et(e),children:"+ Assign"})}),(0,t.jsx)("td",{className:"py-3 pr-4 text-text-muted",children:a?(0,t.jsx)(q.f,{value:a.cpuUsagePercent,label:`${e.name} CPU`,valueLabel:`${a.cpuUsagePercent.toFixed(1)}%`,showValue:!0,className:"w-28"}):"—"}),(0,t.jsx)("td",{className:"py-3 pr-4 text-text-muted",children:a?(0,t.jsxs)("div",{className:"w-36",children:[(0,t.jsx)(q.f,{value:a.memoryPercent,label:`${e.name} memory`,showValue:!0}),(0,t.jsxs)("span",{className:"num mt-0.5 block text-[10px] text-text-muted/80",children:[(a.memoryUsedBytes/0x40000000).toFixed(1)," / ",(a.memoryTotalBytes/0x40000000).toFixed(1)," GB"]})]}):"—"}),(0,t.jsx)("td",{className:"py-3 pr-4",children:l?(0,t.jsxs)("span",{className:"flex w-36 flex-col gap-0.5",title:`${l.mountPoint} filesystem is ${l.usagePercent}% used${"normal"===c?"":" — disk usage anomaly"}`,children:[(0,t.jsx)(q.f,{value:l.usagePercent,tone:"critical"===c?"danger":"warning"===c?"warning":"success",label:`${e.name} ${l.mountPoint} disk`,valueLabel:`${l.usagePercent.toFixed(0)}%`,glow:"normal"!==c,showValue:!0}),(0,t.jsxs)("span",{className:"flex items-center gap-1 text-[10px] text-text-muted",children:["normal"!==c&&(0,t.jsx)(f.f,{"aria-label":`${c} disk usage anomaly`,className:"critical"===c?"h-3 w-3 text-danger":"h-3 w-3 text-warning"}),l.mountPoint]})]}):(0,t.jsx)("span",{className:"text-text-muted",children:"—"})}),(0,t.jsx)("td",{className:"py-3 pr-4",children:d?d.rebootRequired?(0,t.jsx)(r.t,{variant:"danger",children:"reboot required"}):"enabled"===d.automaticUpdates?(0,t.jsx)(r.t,{variant:"success",children:"automatic"}):"unsupported"===d.automaticUpdates?(0,t.jsx)(r.t,{variant:"default",children:"unsupported"}):(0,t.jsx)(r.t,{variant:"warning",children:"enable updates"}):(0,t.jsx)(r.t,{variant:"default",children:"awaiting agent"})}),(0,t.jsx)("td",{className:"py-3 pr-4",title:o?.keyExpiry?`Expires ${o.keyExpiry}`:void 0,children:o?o.expiryEnabled?o.expired?(0,t.jsx)(r.t,{variant:"danger",children:"expired"}):null===o.daysRemaining?(0,t.jsx)(r.t,{variant:"default",children:"unknown"}):o.requiresRenewal?(0,t.jsxs)(r.t,{variant:"warning",children:[o.daysRemaining,"d"]}):(0,t.jsxs)(r.t,{variant:"success",children:[o.daysRemaining,"d"]}):(0,t.jsx)(r.t,{variant:"success",children:"no expiry"}):(0,t.jsx)(r.t,{variant:"default",children:"awaiting agent"})}),(0,t.jsx)("td",{className:"num py-3 pr-4 text-text-muted",children:(0,i.C)(e.lastHeartbeatAt)}),(0,t.jsx)("td",{className:"py-3",children:(0,t.jsxs)("div",{className:"flex gap-1",children:[(0,t.jsx)(C.default,{href:`/nodes/${e.id}`,children:(0,t.jsx)(n.K,{variant:"ghost",size:"sm",children:"View"})}),(0,t.jsx)(n.K,{variant:"ghost",size:"sm",onClick:()=>Z(e),children:(0,t.jsx)(u.f,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(n.K,{variant:"ghost",size:"sm",onClick:()=>void eb(e),children:(0,t.jsx)(m.f,{className:"h-3.5 w-3.5 text-danger"})})]})})]},e.id)})})]})})})}),(0,t.jsx)(D.z,{children:(0,t.jsxs)(a.N,{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(x.f,{className:"h-4 w-4 text-primary"}),(0,t.jsx)("h2",{className:"text-xs font-bold uppercase tracking-wider",children:"Network Discovery"}),(0,t.jsx)("span",{className:"text-[11px] text-text-muted",children:"— Unadopted agents found on the local network"})]}),(0,t.jsx)(n.K,{variant:"secondary",size:"sm",icon:es?(0,t.jsx)(p.f,{className:"h-3.5 w-3.5 animate-spin"}):(0,t.jsx)(x.f,{className:"h-3.5 w-3.5"}),onClick:()=>void ey(),disabled:es,children:es?"Scanning…":"Scan Network"})]}),0===er.length?es?(0,t.jsxs)("div",{className:"flex flex-col items-center gap-3 py-6",children:[(0,t.jsxs)("div",{className:"relative h-16 w-16 overflow-hidden rounded-full border border-primary/30 shadow-[0_0_16px_var(--color-glow)]",children:[(0,t.jsx)("div",{className:"absolute inset-0 animate-sweep rounded-full bg-[conic-gradient(from_0deg,transparent_0deg,transparent_280deg,var(--color-primary)_360deg)] opacity-60"}),(0,t.jsx)("div",{className:"absolute inset-[30%] rounded-full border border-primary/20"})]}),(0,t.jsx)("p",{className:"text-[11px] uppercase tracking-wider text-primary",children:"Broadcasting discovery probe…"})]}):(0,t.jsx)(M.f,{compact:!0,icon:(0,t.jsx)(x.f,{className:"h-4 w-4"}),title:"No scan results yet",description:'Click "Scan Network" to discover unadopted agents on your network.'}):(E=er.filter(e=>!e.registered),U=er.filter(e=>e.registered),0===E.length?(0,t.jsxs)("div",{className:"py-6 text-center text-[11px] text-text-muted",children:["All ",U.length," discovered agent",1!==U.length?"s":""," already registered. No new nodes to adopt."]}):(0,t.jsxs)("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:"Hostname"}),(0,t.jsx)("th",{className:"pb-3 pr-4",children:"IP Address"}),(0,t.jsx)("th",{className:"pb-3 pr-4",children:"Port"}),(0,t.jsx)("th",{className:"pb-3 pr-4",children:"Agent Version"}),(0,t.jsx)("th",{className:"pb-3",children:"Registration"})]})}),(0,t.jsx)("tbody",{className:"divide-y divide-border/50",children:E.map(e=>(0,t.jsxs)("tr",{className:"hover:bg-surface-hover transition-colors",children:[(0,t.jsx)("td",{className:"py-3 pr-4 font-medium",children:e.fqdn||e.hostname}),(0,t.jsx)("td",{className:"py-3 pr-4 text-text-muted",children:e.ip}),(0,t.jsx)("td",{className:"py-3 pr-4 text-text-muted",children:e.port}),(0,t.jsxs)("td",{className:"py-3 pr-4 text-text-muted",children:["v",e.version]}),(0,t.jsx)("td",{className:"py-3 text-text-muted",children:"Use the reviewed key-only agent deploy runbook, then register the authenticated heartbeat."})]},`${e.ip}:${e.port}`))})]}),U.length>0&&(0,t.jsxs)("p",{className:"mt-3 text-xs text-text-muted",children:[U.length," already-registered agent",1!==U.length?"s":""," ","hidden from this list."]})]}))]})}),(0,t.jsx)(Q,{open:H,onClose:()=>W(!1),onFinished:()=>void ej()}),(0,t.jsx)(S.M,{open:T,onClose:()=>K(!1),onRegistered:()=>void ej()}),(0,t.jsx)(S.F,{open:!!Y,node:Y,onClose:()=>Z(null),onSaved:()=>void ej()}),(0,t.jsx)(S.E,{open:!!ee,node:ee,onClose:()=>et(null),onSaved:e=>{ee&&(eh.current[ee.id]=e,A(t=>t.map(t=>t.id===ee.id?{...t,role:e}:t))),ej()}}),(0,t.jsx)(B,{open:!!ei,onClose:()=>el(null),node:ei})]})}],86421)}]);