@aeolus-fleet/console 0.28.0 → 0.28.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/standalone/packages/console/.next/BUILD_ID +1 -1
- package/.next/standalone/packages/console/.next/build-manifest.json +3 -3
- package/.next/standalone/packages/console/.next/prerender-manifest.json +3 -3
- package/.next/standalone/packages/console/.next/server/app/(console)/fleet-health/[cause]/page/server-reference-manifest.json +14 -14
- package/.next/standalone/packages/console/.next/server/app/(console)/fleet-health/[cause]/page.js.nft.json +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/fleet-health/[cause]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/fleet-health/page/server-reference-manifest.json +14 -14
- package/.next/standalone/packages/console/.next/server/app/(console)/fleet-health/page.js.nft.json +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/fleet-health/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/inbox/page/server-reference-manifest.json +14 -14
- package/.next/standalone/packages/console/.next/server/app/(console)/inbox/page.js.nft.json +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/inbox/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/labels/page/server-reference-manifest.json +14 -14
- package/.next/standalone/packages/console/.next/server/app/(console)/labels/page.js.nft.json +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/labels/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/needs-attention/page/server-reference-manifest.json +14 -14
- package/.next/standalone/packages/console/.next/server/app/(console)/needs-attention/page.js.nft.json +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/needs-attention/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/needs-crew/page/server-reference-manifest.json +14 -14
- package/.next/standalone/packages/console/.next/server/app/(console)/needs-crew/page.js.nft.json +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/needs-crew/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/network/page/server-reference-manifest.json +14 -14
- package/.next/standalone/packages/console/.next/server/app/(console)/network/page.js.nft.json +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/network/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/page/server-reference-manifest.json +14 -14
- package/.next/standalone/packages/console/.next/server/app/(console)/page.js.nft.json +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/settings/page/server-reference-manifest.json +14 -14
- package/.next/standalone/packages/console/.next/server/app/(console)/settings/page.js.nft.json +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/settings/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/ships/[shipId]/page/server-reference-manifest.json +14 -14
- package/.next/standalone/packages/console/.next/server/app/(console)/ships/[shipId]/page.js.nft.json +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/ships/[shipId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/[squadronId]/page/server-reference-manifest.json +14 -14
- package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/[squadronId]/page.js.nft.json +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/[squadronId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/blueprints/[name]/page/server-reference-manifest.json +14 -14
- package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/blueprints/[name]/page.js.nft.json +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/blueprints/[name]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/page/server-reference-manifest.json +14 -14
- package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/page.js.nft.json +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/templates/[name]/page/server-reference-manifest.json +14 -14
- package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/templates/[name]/page.js.nft.json +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/templates/[name]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/trierarchs/[shipId]/page/server-reference-manifest.json +14 -14
- package/.next/standalone/packages/console/.next/server/app/(console)/trierarchs/[shipId]/page.js.nft.json +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/trierarchs/[shipId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/trierarchs/page/server-reference-manifest.json +14 -14
- package/.next/standalone/packages/console/.next/server/app/(console)/trierarchs/page.js.nft.json +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/trierarchs/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/console/.next/server/app/_global-error.html +1 -1
- package/.next/standalone/packages/console/.next/server/app/_global-error.rsc +1 -1
- package/.next/standalone/packages/console/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/packages/console/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/standalone/packages/console/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/packages/console/.next/server/app/api/reads/[read]/route.js.nft.json +1 -1
- package/.next/standalone/packages/console/.next/server/app/version/route.js.nft.json +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/[root-of-the-server]__06f_104._.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/[root-of-the-server]__1cfwaji._.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/0mxb_server_app_(console)_squadrons_blueprints_[name]_page_actions_1ccrd2_.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/0mxb_server_app_(console)_squadrons_templates_[name]_page_actions_0qzhozy.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/0ysl_console__next-internal_server_app_(console)_fleet-health_page_actions_0dxyn06.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/0ysl_console__next-internal_server_app_(console)_needs-crew_page_actions_0rhp085.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/0ysl_console__next-internal_server_app_(console)_network_page_actions_1qbofc5.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/0ysl_console__next-internal_server_app_(console)_settings_page_actions_07zyuya.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/0ysl_console__next-internal_server_app_(console)_ships_[shipId]_page_actions_09ros_6.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/0ysl_console__next-internal_server_app_(console)_squadrons_page_actions_04wqu1c.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/0ysl_console__next-internal_server_app_(console)_trierarchs_page_actions_13sd72a.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/{0ysl_console_features_trierarchs_ui_organisms_clear-worktree-dialog_tsx_0bjmfgt._.js → 0ysl_console_features_trierarchs_ui_organisms_clear-worktree-dialog_tsx_1317p-q._.js} +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/1eui__next-internal_server_app_(console)_fleet-health_[cause]_page_actions_196vwwc.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/1eui__next-internal_server_app_(console)_needs-attention_page_actions_17c4s8j.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/1eui__next-internal_server_app_(console)_squadrons_[squadronId]_page_actions_0183_z3.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/1eui__next-internal_server_app_(console)_trierarchs_[shipId]_page_actions_1yx88bk.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/{_0l0tk4l._.js → _07gombw._.js} +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/_0eeox-9._.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/_0h21fie._.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/{_0_em4v9._.js → _0rxmuqz._.js} +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/{_1dxl4q7._.js → _11kd6ba._.js} +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/{_1tngh39._.js → _1a8rkag._.js} +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/_1dwmj6t._.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/_1u0h4gj._.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/{packages_console_0c-5j2y._.js → packages_console_0fashga._.js} +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/{packages_console_1gvn9tp._.js → packages_console_0mw328z._.js} +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/{packages_console_0--rmb8._.js → packages_console_121u9ci._.js} +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console__next-internal_server_app_(console)_inbox_page_actions_1g5uv6y.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console__next-internal_server_app_(console)_labels_page_actions_14z7vqr.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console__next-internal_server_app_(console)_page_actions_05lw-oq.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_app_(console)_settings_page_tsx_1p8ay87._.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/{packages_console_components_organisms_crew-line-dialog_tsx_1i1mps-._.js → packages_console_components_organisms_crew-line-dialog_tsx_1hro237._.js} +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/{packages_console_features_0dttltf._.js → packages_console_features_1w4_d-7._.js} +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/{packages_console_features_squadrons_organisms_form-squadron-dialog_tsx_04r0j4c._.js → packages_console_features_squadrons_organisms_form-squadron-dialog_tsx_0iy9qp1._.js} +1 -1
- package/.next/standalone/packages/console/.next/server/middleware-build-manifest.js +3 -3
- package/.next/standalone/packages/console/.next/server/pages/500.html +1 -1
- package/.next/standalone/packages/console/.next/server/server-reference-manifest.js +1 -1
- package/.next/standalone/packages/console/.next/server/server-reference-manifest.json +15 -15
- package/.next/standalone/packages/console/.next/static/chunks/{21vk0o3lx9oh1.js → 16uyfps7c1xj6.js} +1 -1
- package/.next/standalone/packages/console/.next/static/chunks/1e5jqgsx_ixev.js +1 -0
- package/.next/standalone/packages/console/.next/static/chunks/{2p-_e59ng41pt.js → 1od7uozkhtt39.js} +1 -1
- package/.next/standalone/packages/console/.next/static/chunks/{0yca02wd039-o.js → 3ew37_k6shef6.js} +1 -1
- package/.next/standalone/packages/console/package.json +3 -3
- package/README.md +1 -1
- package/package.json +3 -3
- package/.next/standalone/packages/console/.next/static/chunks/1yoc4-zamu_sm.js +0 -1
- /package/.next/standalone/packages/console/.next/static/{8zn2b33vGieFxkimJl4au → a78dlby20rZF8ZnmPRYuF}/_buildManifest.js +0 -0
- /package/.next/standalone/packages/console/.next/static/{8zn2b33vGieFxkimJl4au → a78dlby20rZF8ZnmPRYuF}/_clientMiddlewareManifest.js +0 -0
- /package/.next/standalone/packages/console/.next/static/{8zn2b33vGieFxkimJl4au → a78dlby20rZF8ZnmPRYuF}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,24071,e=>{"use strict";var t=e.i(56420);let s={name:"chevron-left",size:24,node:[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]};s.node;let a=(0,t.default)(s);e.s(["ChevronLeft",0,a],24071)},67927,e=>{"use strict";var t=e.i(56420);let s={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};s.node;let a=(0,t.default)(s);e.s(["ChevronRight",0,a],67927)},36518,e=>{"use strict";var t=e.i(56420);let s={name:"cloud-off",size:24,node:[["path",{d:"M10.94 5.274A7 7 0 0 1 15.71 10h1.79a4.5 4.5 0 0 1 4.222 6.057",key:"1uxyv8"}],["path",{d:"M18.796 18.81A4.5 4.5 0 0 1 17.5 19H9A7 7 0 0 1 5.79 5.78",key:"99tcn7"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]};s.node;let a=(0,t.default)(s);e.s(["CloudOff",0,a],36518)},58925,e=>{"use strict";var t=e.i(56420);let s={name:"key-round",size:24,node:[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]};s.node;let a=(0,t.default)(s);e.s(["KeyRound",0,a],58925)},77071,e=>{"use strict";var t=e.i(56420);let s={name:"plus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]};s.node;let a=(0,t.default)(s);e.s(["Plus",0,a],77071)},25398,e=>{"use strict";var t=e.i(56420);let s={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"}]]};s.node;let a=(0,t.default)(s);e.s(["RotateCw",0,a],25398)},66595,e=>{"use strict";var t=e.i(56420);let s={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};s.node;let a=(0,t.default)(s);e.s(["Search",0,a],66595)},19759,e=>{"use strict";var t=e.i(56420);let s={name:"square-pen",size:24,node:[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],aliases:["pen-box","edit","pen-square"]};s.node;let a=(0,t.default)(s);e.s(["SquarePen",0,a],19759)},66787,e=>{"use strict";var t=e.i(56420);let s={name:"triangle-alert",size:24,node:[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["alert-triangle"]};s.node;let a=(0,t.default)(s);e.s(["TriangleAlert",0,a],66787)},89275,e=>{"use strict";var t=e.i(43476),s=e.i(56420);let a={name:"globe",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]};a.node;let r=(0,s.default)(a),n={name:"link-2",size:24,node:[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]};n.node;let i=(0,s.default)(n);var o=e.i(15905),l=e.i(17981),d=e.i(88393);function c({settings:e,loadError:s,onRetry:a,isConnecting:n,connectError:u,onConnect:m}){return void 0!==s?(0,t.jsx)(l.InlineError,{title:"Couldn’t read the gateway",description:s,onRetry:a}):void 0===e?(0,t.jsx)(d.LoadingSkeleton,{variant:"detail",rows:2,label:"Loading the gateway"}):"none"===e.state?null:(0,t.jsxs)("section",{"aria-labelledby":"settings-gateway","data-testid":"settings-gateway",className:"flex flex-col gap-3 rounded-lg border border-border bg-card p-4",children:[(0,t.jsxs)("h2",{id:"settings-gateway",className:"flex items-center gap-2 text-body font-semibold [&_svg]:size-(--size-icon) [&_svg]:text-muted-foreground",children:[(0,t.jsx)(r,{"aria-hidden":!0}),"Gateway"]}),"connected"===e.state?(0,t.jsxs)("p",{className:"text-body","data-testid":"settings-gateway-state",children:["Connected as ",(0,t.jsx)("span",{className:"font-mono",children:e.ship?.name})," ",(0,t.jsxs)("span",{className:"font-mono text-muted-foreground",children:["(",e.ship?.shipId,")"]}),". It commissions an app ship for each outside party you approve."]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"text-body","data-testid":"settings-gateway-state",children:"Not connected. Connecting commissions the ship gateway, which reads the fleet and commissions an app ship for each outside party you approve, or gives it a new starting prompt, and hands its secret to the gateway. No one sees the secret."}),(0,t.jsx)("div",{children:(0,t.jsx)(o.Button,{variant:"primary",icon:(0,t.jsx)(i,{"aria-hidden":!0}),isLoading:n,onClick:m,"data-testid":"settings-gateway-connect",children:"Connect gateway"})}),void 0!==u&&(0,t.jsx)(l.InlineError,{variant:"field",title:"Couldn’t connect the gateway",description:u})]})]})}function u({settings:e,loadError:s,onRetry:a,isConnecting:r,connectError:n,onConnect:c}){return void 0!==s?(0,t.jsx)(l.InlineError,{title:"Couldn’t read squadrons",description:s,onRetry:a}):void 0===e?(0,t.jsx)(d.LoadingSkeleton,{variant:"detail",rows:2,label:"Loading squadrons"}):"none"===e.state?null:(0,t.jsxs)("section",{"aria-labelledby":"settings-squadrons","data-testid":"settings-squadrons",className:"flex flex-col gap-3 rounded-lg border border-border bg-card p-4",children:[(0,t.jsx)("h2",{id:"settings-squadrons",className:"text-body font-semibold",children:"Squadrons"}),"connected"===e.state?(0,t.jsxs)("p",{className:"text-body","data-testid":"settings-squadrons-state",children:["Connected as ",(0,t.jsx)("span",{className:"font-mono",children:e.ship?.name})," ",(0,t.jsxs)("span",{className:"font-mono text-muted-foreground",children:["(",e.ship?.shipId,")"]})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"text-body","data-testid":"settings-squadrons-state",children:"Not connected. Connecting commissions the ship squadrons, with fleet read and manage, or gives it a new starting prompt, and hands its secret to squadrons. No one sees the secret."}),(0,t.jsx)("div",{children:(0,t.jsx)(o.Button,{variant:"primary",icon:(0,t.jsx)(i,{"aria-hidden":!0}),isLoading:r,onClick:c,"data-testid":"settings-squadrons-connect",children:"Connect squadrons"})}),void 0!==n&&(0,t.jsx)(l.InlineError,{variant:"field",title:"Couldn’t connect squadrons",description:n})]})]})}var m=e.i(22768),h=e.i(58925),x=e.i(77071),p=e.i(25398),g=e.i(66787),f=e.i(71645),v=e.i(49635),b=e.i(18310),j=e.i(24010),y=e.i(94945),N=e.i(12470),w=e.i(91727),k=e.i(67874),C=e.i(51588);let S=".aeolus/squadrons";function R({isAdding:e,addError:s,onAdd:a}){let r=(0,f.useId)(),n=(0,f.useId)(),i=(0,f.useId)(),[d,c]=(0,f.useState)(""),[u,m]=(0,f.useState)(""),[h,p]=(0,f.useState)("");return(0,t.jsxs)("form",{noValidate:!0,"data-testid":"repositories-add",className:"flex flex-col gap-3 rounded-md border border-border p-3",onSubmit:e=>{e.preventDefault();let t=u.trim(),s=h.trim();a({url:d.trim(),...""===t?{}:{path:t},...""===s?{}:{token:s}},()=>{c(""),m(""),p("")})},children:[(0,t.jsxs)("div",{className:"grid gap-3 sm:grid-cols-[minmax(0,2fr)_minmax(0,1fr)]",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)(w.Label,{htmlFor:r,children:"Repository URL"}),(0,t.jsx)(N.Input,{id:r,isMono:!0,autoComplete:"off",spellCheck:!1,placeholder:"https://github.com/acme/squadron-templates.git","data-testid":"repositories-url",value:d,onChange:e=>{c(e.target.value)}})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)(w.Label,{htmlFor:n,children:"Path (optional)"}),(0,t.jsx)(N.Input,{id:n,isMono:!0,autoComplete:"off",spellCheck:!1,placeholder:S,"data-testid":"repositories-path",value:u,onChange:e=>{m(e.target.value)}})]})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)(w.Label,{htmlFor:i,children:"Read token (optional, for a private repository)"}),(0,t.jsx)(N.Input,{id:i,type:"password",autoComplete:"new-password","data-testid":"repositories-token",value:h,onChange:e=>{p(e.target.value)}}),(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:"Entered once and never shown again. To change it, remove the repository and add it again."})]}),void 0===s?null:(0,t.jsx)(l.InlineError,{title:"Couldn’t add the repository",description:`${s} The list shows what squadrons holds.`}),(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.jsx)(o.Button,{type:"submit",variant:"primary",icon:(0,t.jsx)(x.Plus,{"aria-hidden":!0}),isLoading:e,disabled:""===d.trim(),"data-testid":"repositories-add-submit",children:e?"Adding":"Add repository"})})]})}function z(e,t){return e.map(({name:e,versions:s})=>"template"===t?`${e}@${s.join(", ")}`:`${e} v${s.join(", v")}`).join(" · ")}function q({contents:e,path:s}){let{templates:a,blueprints:r,leftOut:n}=e;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("dl",{"data-testid":"repositories-found",className:"grid grid-cols-[auto_minmax(0,1fr)] gap-x-3 gap-y-0.5 text-meta",children:0===a.length&&0===r.length?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("dt",{className:"text-muted-foreground",children:"Found"}),(0,t.jsxs)("dd",{children:["No templates or blueprints under ",s]})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("dt",{className:"text-muted-foreground",children:"Templates"}),(0,t.jsx)("dd",{className:"font-mono",children:0===a.length?"None":z(a,"template")}),(0,t.jsx)("dt",{className:"text-muted-foreground",children:"Blueprints"}),(0,t.jsx)("dd",{className:"font-mono",children:0===r.length?"None":z(r,"blueprint")})]})}),0===n.length?null:(0,t.jsxs)("div",{"data-testid":"repositories-left-out",className:"flex flex-col gap-1.5 rounded-md border border-tone-attention-border bg-tone-attention-bg p-2.5 text-tone-attention-fg",children:[(0,t.jsxs)("p",{className:"flex items-center gap-1.5 text-meta font-medium",children:[(0,t.jsx)(g.TriangleAlert,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0"}),"Left out: ",n.length,". Fix ",1===n.length?"it":"them"," in git, tag again, then refresh."]}),(0,t.jsx)("ul",{className:"flex flex-col gap-1",children:n.map(e=>(0,t.jsxs)("li",{"data-testid":"repositories-left-out-item",className:"text-meta text-foreground",children:[(0,t.jsx)("span",{className:"font-mono",children:(0,b.leftOutLabel)(e)}),": ",e.message]},`${e.kind} ${e.name}@${String(e.version)}`))})]})]})}function D({repository:e,contents:s,now:a,onRemove:r}){let{lastFetch:n}=e;return(0,t.jsxs)("li",{"data-testid":"repositories-row",className:"flex flex-col gap-1.5 px-3 py-2.5",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(C.RepositoryName,{name:e.name}),e.path===S?null:(0,t.jsx)("span",{className:"font-mono text-meta text-muted-foreground",children:e.path}),e.hasToken?(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 text-meta text-muted-foreground",children:[(0,t.jsx)(h.KeyRound,{"aria-hidden":!0,className:"size-(--size-icon-sm)"}),"Token"]}):null,(0,t.jsx)("span",{className:"ml-auto text-meta text-muted-foreground","data-testid":"repositories-fetched",children:null===n?"Not fetched yet":`Fetched ${(0,v.relativeTime)(new Date(n.at),a)}`}),(0,t.jsx)(o.Button,{size:"xs",variant:"ghost","data-testid":"repositories-remove",onClick:r,children:"Remove"})]}),n?.error?(0,t.jsxs)("p",{"data-testid":"repositories-error",className:"flex items-start gap-1.5 text-meta text-destructive-text",children:[(0,t.jsx)(m.CircleAlert,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon-sm) shrink-0"}),(0,t.jsxs)("span",{children:["The last fetch failed: ",(0,t.jsx)("span",{className:"font-mono",children:n.error})]})]}):null,void 0===s||null===n||null!==n.error&&s.templates.length+s.blueprints.length+s.leftOut.length===0?null:(0,t.jsx)(q,{contents:s,path:e.path})]})}function A(e){let{repositories:s,catalogue:a,state:r,error:n,onRetry:i,isRemoving:c,removeError:u,onRemove:m,onRemoveClosed:h,isRefreshing:x,refreshError:g,onRefresh:v,now:N}=e,[w,C]=(0,f.useState)(void 0);return(0,t.jsxs)("section",{"aria-labelledby":"settings-repositories","data-testid":"settings-repositories",className:"flex flex-col gap-3 rounded-lg border border-border bg-card p-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsx)("h2",{id:"settings-repositories",className:"text-body font-semibold",children:"Repositories"}),(0,t.jsx)(o.Button,{size:"xs",icon:(0,t.jsx)(p.RotateCw,{"aria-hidden":!0}),isLoading:x,disabled:0===s.length,onClick:v,"data-testid":"repositories-refresh",children:"Refresh"})]}),(0,t.jsxs)("p",{className:"text-meta text-muted-foreground",children:["squadrons reads templates and blueprints from these repositories, under ",S," unless a repository sets its own path. It fetches one when you add it, when you refresh, and once each time squadrons connects or starts."]}),void 0===g?null:(0,t.jsx)(l.InlineError,{variant:"section",title:"Couldn’t refresh",description:g}),"loading"===r?(0,t.jsx)(d.LoadingSkeleton,{variant:"list",rows:2,label:"Loading the repositories"}):"error"===r?(0,t.jsx)(l.InlineError,{title:"Couldn’t read the repositories",description:n,onRetry:i}):0===s.length?(0,t.jsx)(k.EmptyState,{variant:"section",title:"No repositories yet",description:"Add one to read its templates and blueprints."}):(0,t.jsx)("ul",{className:"divide-y divide-border overflow-hidden rounded-md border border-border",children:s.map(e=>(0,t.jsx)(D,{repository:e,...void 0===a?{}:{contents:(0,b.repositoryContents)(a,e.name)},now:N,onRemove:()=>{C(e.name)}},e.name))}),(0,t.jsx)(R,{isAdding:e.isAdding,addError:e.addError,onAdd:e.onAdd}),(0,t.jsx)(j.AlertDialog,{open:void 0!==w,onOpenChange:e=>{e||c||(C(void 0),h())},children:(0,t.jsxs)(j.AlertDialogContent,{"data-testid":"repositories-remove-dialog",className:y.dialogSurface.phoneSheet,children:[(0,t.jsxs)(j.AlertDialogHeader,{children:[(0,t.jsxs)(j.AlertDialogTitle,{children:["Remove ",w,"?"]}),(0,t.jsx)(j.AlertDialogDescription,{children:"Its templates and blueprints leave the catalogue at once. Squadrons formed from them keep the versions they formed from."})]}),void 0===u?null:(0,t.jsx)(l.InlineError,{title:"Couldn’t remove the repository",description:`${u} The list shows what squadrons holds.`}),(0,t.jsxs)(j.AlertDialogFooter,{children:[(0,t.jsx)(j.AlertDialogClose,{render:(0,t.jsx)(o.Button,{disabled:c}),children:"Cancel"}),(0,t.jsx)(o.Button,{variant:"destructive",isLoading:c,"data-testid":"repositories-remove-confirm",onClick:()=>{void 0!==w&&m(w,()=>{C(void 0),h()})},children:"Remove repository"})]})]})})]})}var I=e.i(86875),L=e.i(22016);function E({settings:e,loadError:s,onRetry:a,isConnecting:r,connectError:n,onConnect:c}){return void 0!==s?(0,t.jsx)(l.InlineError,{title:"Couldn’t read the trierarch plugin",description:s,onRetry:a}):void 0===e?(0,t.jsx)(d.LoadingSkeleton,{variant:"detail",rows:2,label:"Loading the trierarch plugin"}):(0,t.jsxs)("section",{"aria-labelledby":"settings-trierarchs","data-testid":"settings-trierarchs",className:"flex flex-col gap-3 rounded-lg border border-border bg-card p-4",children:[(0,t.jsxs)("h2",{id:"settings-trierarchs",className:"flex items-center gap-2 text-body font-semibold [&_svg]:size-(--size-icon) [&_svg]:text-muted-foreground",children:[(0,t.jsx)(I.ShipWheel,{"aria-hidden":!0}),"Trierarchs"]}),"none"===e.state?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("p",{className:"text-body","data-testid":"settings-trierarchs-state",children:["Not set up. ","Starts, restarts and stops sessions for crew requests on your machines. Without it, crew requests wait on Needs crew for you to crew by hand."]}),(0,t.jsx)("div",{children:(0,t.jsx)(o.Button,{size:"sm",nativeButton:!1,render:(0,t.jsx)(L.default,{href:"/trierarchs"}),"data-testid":"settings-trierarchs-how",children:"How to set it up"})})]}):"connected"===e.state?(0,t.jsxs)("p",{className:"text-body","data-testid":"settings-trierarchs-state",children:["Connected as ",(0,t.jsx)("span",{className:"font-mono",children:e.ship?.name})," ",(0,t.jsxs)("span",{className:"font-mono text-muted-foreground",children:["(",e.ship?.shipId,")"]})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"text-body","data-testid":"settings-trierarchs-state",children:"Not connected. Connecting commissions the ship trierarch-plugin, which reads and manages the fleet and assigns crew requests, or gives it a new starting prompt, and hands its secret to the trierarch plugin. No one sees the secret."}),(0,t.jsx)("div",{children:(0,t.jsx)(o.Button,{variant:"primary",icon:(0,t.jsx)(i,{"aria-hidden":!0}),isLoading:r,onClick:c,"data-testid":"settings-trierarchs-connect",children:"Connect trierarch plugin"})}),void 0!==n&&(0,t.jsx)(l.InlineError,{variant:"field",title:"Couldn’t connect the trierarch plugin",description:n})]})]})}var T=e.i(77821),P=e.i(87964),B=e.i(50980),K=e.i(28459),M=e.i(96676),$=e.i(78485),F=e.i(18423),H=e.i(86165),O=e.i(48695),_=e.i(3979),U=e.i(265);e.s(["default",0,function(){let e=(0,M.useNow)(),s=(0,P.useConsoleFrame)(),a=(0,H.useHasSquadrons)(),r=(0,K.useNeedsAttention)(),n=(0,H.useSquadronsSettings)(),i=(0,H.useConnectSquadrons)(),o=(0,U.useTrierarchPluginSettings)(),l=(0,U.useConnectTrierarchPlugin)(),d=(0,B.useGatewaySettings)(),m=(0,B.useConnectGateway)(),h=(0,F.useLiveFleet)(),x=(0,H.useSquadronsConnection)(),p=(0,O.useRepositories)(),g=(0,O.useCatalogue)(),f=(0,O.useAddRepository)(),v=(0,O.useRemoveRepository)(),b=(0,O.useRefreshCatalogue)(),j=(0,_.usePluginNav)();return(0,$.useSignInWhenSessionEnds)([r.error,h.error]),(0,t.jsxs)(T.ListPage,{...s,title:"Settings",description:"How this installation runs. Only argo, the operator, sees this page.",live:h.live,children:[a&&(0,t.jsx)(u,{settings:n.data,loadError:n.isError?n.error.message:void 0,onRetry:()=>{n.refetch()},isConnecting:i.isPending,connectError:i.isError?i.error.message:void 0,onConnect:()=>{i.mutate()}}),j.hasSettings&&(0,t.jsx)(E,{settings:o.data,loadError:o.isError?o.error.message:void 0,onRetry:()=>{o.refetch()},isConnecting:l.isPending,connectError:l.isError?l.error.message:void 0,onConnect:()=>{l.mutate()}}),j.hasSettings&&(0,t.jsx)(c,{settings:d.data,loadError:d.isError?d.error.message:void 0,onRetry:()=>{d.refetch()},isConnecting:m.isPending,connectError:m.isError?m.error.message:void 0,onConnect:()=>{m.mutate()}}),"connected"===x&&(0,t.jsx)(A,{repositories:p.data??[],...void 0===g.data?{}:{catalogue:g.data},state:p.isError?"error":p.data?"ready":"loading",error:p.error?.message,onRetry:()=>{p.refetch()},isAdding:f.isPending,addError:f.error?.message,onAdd:(e,t)=>{f.mutate(e,{onSuccess:t})},isRemoving:v.isPending,removeError:v.error?.message,onRemove:(e,t)=>{v.mutate(e,{onSuccess:t})},onRemoveClosed:()=>{v.reset()},isRefreshing:b.isPending,refreshError:b.error?.message,onRefresh:()=>{b.mutate()},now:e})]})}],89275)},24010,e=>{"use strict";var t=e.i(43476);e.s([],58762),e.i(58762);var s=e.i(66250),a=e.i(2820),r=e.i(56736),n=e.i(9793),i=e.i(84324),o=e.i(64951),l=e.i(77173);let d=e.i(13488).DialogTrigger;var c=e.i(74217),u=e.i(25326);class m extends u.DialogHandle{}e.s(["Backdrop",()=>a.DialogBackdrop,"Close",()=>r.DialogClose,"Description",()=>n.DialogDescription,"Handle",0,m,"Popup",()=>i.DialogPopup,"Portal",()=>o.DialogPortal,"Root",0,function(e){return(0,s.useRenderDialogRoot)("alert-dialog",e)},"Title",()=>l.DialogTitle,"Trigger",0,d,"Viewport",()=>c.DialogViewport,"createHandle",0,function(){return new m}],34604);var h=e.i(34604),h=h,x=e.i(90063),p=e.i(94945);e.s(["AlertDialog",0,function(e){return(0,t.jsx)(h.Root,{"data-slot":"alert-dialog",...e})},"AlertDialogClose",0,function(e){return(0,t.jsx)(h.Close,{"data-slot":"alert-dialog-close",...e})},"AlertDialogContent",0,function({className:e,size:s,children:a,...r}){return(0,t.jsxs)(h.Portal,{children:[(0,t.jsx)(h.Backdrop,{"data-slot":"alert-dialog-overlay",className:p.dialogSurface.overlay}),(0,t.jsx)(h.Popup,{"data-slot":"alert-dialog-content",className:(0,x.classNames)(p.dialogSurface.popup({size:s}),e),...r,children:a})]})},"AlertDialogDescription",0,function({className:e,...s}){return(0,t.jsx)(h.Description,{"data-slot":"alert-dialog-description",className:(0,x.classNames)(p.dialogSurface.description,e),...s})},"AlertDialogFooter",0,function({className:e,...s}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-footer",className:(0,x.classNames)(p.dialogSurface.footer,e),...s})},"AlertDialogHeader",0,function({className:e,...s}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-header",className:(0,x.classNames)(p.dialogSurface.header,e),...s})},"AlertDialogTitle",0,function({className:e,...s}){return(0,t.jsx)(h.Title,{"data-slot":"alert-dialog-title",className:(0,x.classNames)(p.dialogSurface.title,e),...s})}],24010)},94945,e=>{"use strict";let t={overlay:"fixed inset-0 isolate z-50 bg-overlay duration-(--duration-base) data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",popup:(0,e.i(25913).cva)("fixed top-1/2 left-1/2 z-50 grid max-h-[calc(100dvh-var(--spacing)*8)] w-full max-w-[calc(100%-var(--spacing)*8)] -translate-x-1/2 -translate-y-1/2 gap-4 overflow-y-auto rounded-xl border border-border bg-popover p-6 text-body text-popover-foreground shadow-lg duration-(--duration-base) outline-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 motion-reduce:data-open:zoom-in-100 motion-reduce:data-closed:zoom-out-100",{variants:{size:{sm:"sm:max-w-(--size-dialog-sm)",md:"sm:max-w-(--size-dialog-md)"}},defaultVariants:{size:"sm"}}),header:"flex flex-col gap-2",footer:"flex flex-col-reverse gap-2 pt-1 sm:flex-row sm:justify-end",title:"text-heading font-semibold text-foreground",description:"text-body text-muted-foreground",phoneSheet:"max-sm:top-auto max-sm:bottom-0 max-sm:left-0 max-sm:max-w-full max-sm:translate-x-0 max-sm:translate-y-0 max-sm:rounded-none max-sm:rounded-t-2xl max-sm:border-x-0 max-sm:border-b-0 max-sm:px-4 max-sm:pb-[max(calc(var(--spacing)*4),env(safe-area-inset-bottom))] max-sm:[&_[data-slot=button]]:h-(--size-control-touch) max-sm:[&_[data-slot=button]]:w-full",phoneFullScreen:"max-sm:top-0 max-sm:left-0 max-sm:h-dvh max-sm:max-w-full max-sm:translate-x-0 max-sm:translate-y-0 max-sm:content-start max-sm:overflow-y-auto max-sm:rounded-none max-sm:border-0"};e.s(["dialogSurface",0,t])},36651,e=>{"use strict";var t=e.i(43476),s=e.i(90063);e.s(["Kbd",0,function({className:e,...a}){return(0,t.jsx)("kbd",{"data-slot":"kbd",className:(0,s.classNames)("inline-flex h-5 min-w-5 shrink-0 items-center justify-center rounded-xs border border-border bg-muted px-1.25 font-sans text-micro font-medium text-muted-foreground max-sm:hidden",e),...a})}])},91727,e=>{"use strict";var t=e.i(43476),s=e.i(90063);e.s(["Label",0,function({className:e,htmlFor:a,...r}){return(0,t.jsx)("label",{"data-slot":"label",htmlFor:a,className:(0,s.classNames)("text-body font-medium text-foreground select-none",e),...r})}])},19321,e=>{"use strict";var t=e.i(43476),s=e.i(90063);e.s(["Skeleton",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"skeleton","aria-hidden":!0,className:(0,s.classNames)("animate-pulse rounded-sm bg-secondary [animation-duration:var(--duration-pulse)] motion-reduce:animate-none",e),...a})}])},67874,e=>{"use strict";var t=e.i(43476),s=e.i(90063);e.s(["EmptyState",0,function({title:e,description:a,icon:r,action:n,variant:i="page",className:o}){return"section"===i?(0,t.jsxs)("p",{"data-slot":"empty-state","data-variant":i,className:(0,s.classNames)("rounded-lg border border-border px-4 py-3 text-center text-meta text-muted-foreground",o),children:[e,a?(0,t.jsxs)(t.Fragment,{children:[" ",a]}):null]}):"no-results"===i?(0,t.jsxs)("div",{"data-slot":"empty-state","data-variant":i,className:(0,s.classNames)("flex flex-col items-center gap-2.5 rounded-lg border border-border bg-card px-4 py-6 text-center",o),children:[(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:e}),n]}):(0,t.jsxs)("div",{"data-slot":"empty-state","data-variant":i,className:(0,s.classNames)("flex flex-col items-center gap-3 rounded-lg border border-dashed border-border bg-card px-6 py-10 text-center",o),children:[r?(0,t.jsx)("span",{"aria-hidden":!0,className:"flex size-10 items-center justify-center rounded-lg border border-border bg-muted text-muted-foreground [&_svg]:size-(--size-icon-xl)",children:r}):null,(0,t.jsx)("h2",{className:"text-heading font-semibold text-foreground max-sm:text-heading-touch",children:e}),a?(0,t.jsx)("p",{className:"max-w-96 text-meta text-muted-foreground max-sm:text-body-touch",children:a}):null,n?(0,t.jsx)("div",{className:"mt-1 max-sm:w-full max-sm:[&>*]:w-full",children:n}):null]})}])},17981,e=>{"use strict";var t=e.i(43476),s=e.i(22768),a=e.i(36518),r=e.i(25398),n=e.i(90063),i=e.i(15905);e.s(["InlineError",0,function({title:e,description:o,detail:l,onRetry:d,variant:c="section",id:u,className:m}){return"field"===c?(0,t.jsxs)("p",{id:u,"data-slot":"inline-error","data-variant":c,className:(0,n.classNames)("flex items-center gap-1.5 text-meta text-destructive-text [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0",m),children:[(0,t.jsx)(s.CircleAlert,{"aria-hidden":!0}),e]}):"section"===c?(0,t.jsxs)("div",{role:"alert","data-slot":"inline-error","data-variant":c,className:(0,n.classNames)("flex gap-2 rounded-lg border border-tone-attention-border bg-tone-attention-bg p-3 text-tone-attention-fg",m),children:[(0,t.jsx)(s.CircleAlert,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon) shrink-0"}),(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("p",{className:"text-body font-medium",children:e}),o?(0,t.jsx)("p",{className:"text-meta text-foreground",children:o}):null,d?(0,t.jsx)(i.Button,{size:"xs",icon:(0,t.jsx)(r.RotateCw,{"aria-hidden":!0}),onClick:d,className:"self-start",children:"Try again"}):null]})]}):(0,t.jsxs)("div",{role:"alert","data-slot":"inline-error","data-variant":c,className:(0,n.classNames)("flex flex-col items-center gap-3 rounded-lg border border-border bg-card px-6 py-10 text-center",m),children:[(0,t.jsx)("span",{"aria-hidden":!0,className:"flex size-10 items-center justify-center rounded-lg border border-tone-attention-border bg-tone-attention-bg text-tone-attention-fg [&_svg]:size-(--size-icon-xl)",children:(0,t.jsx)(a.CloudOff,{})}),(0,t.jsx)("h2",{className:"text-heading font-semibold text-foreground max-sm:text-heading-touch",children:e}),o?(0,t.jsx)("p",{className:"max-w-96 text-meta text-muted-foreground max-sm:text-body-touch",children:o}):null,l?(0,t.jsx)("code",{className:"rounded-sm border border-border bg-muted px-2 py-0.5 font-mono text-id text-muted-foreground",children:l}):null,d?(0,t.jsx)("div",{className:"flex items-center gap-2 max-sm:w-full max-sm:flex-col",children:(0,t.jsx)(i.Button,{size:"sm",icon:(0,t.jsx)(r.RotateCw,{"aria-hidden":!0}),onClick:d,className:"max-sm:w-full",children:"Try again"})}):null]})}])},88393,e=>{"use strict";var t=e.i(43476),s=e.i(90063),a=e.i(19321);function r(e){return Array.from({length:e},(e,t)=>`row-${String(t)}`)}e.s(["LoadingSkeleton",0,function({variant:e,rows:n=4,label:i="Loading",className:o}){return(0,t.jsxs)("div",{role:"status","data-slot":"loading-skeleton","data-variant":e,className:(0,s.classNames)("w-full",o),children:[(0,t.jsx)("span",{className:"sr-only",children:i}),"table"===e?(0,t.jsxs)("div",{className:"overflow-hidden rounded-lg border border-border bg-card shadow-sm",children:[(0,t.jsx)("div",{className:"h-(--size-row-header) border-b border-border bg-muted"}),r(n).map(e=>(0,t.jsxs)("div",{className:"flex h-(--size-row) items-center gap-8 border-b border-border px-4 last:border-0",children:[(0,t.jsx)(a.Skeleton,{className:"h-2.5 w-24"}),(0,t.jsx)(a.Skeleton,{className:"h-5 w-16"}),(0,t.jsx)(a.Skeleton,{className:"h-5 w-20"}),(0,t.jsx)(a.Skeleton,{className:"h-2.5 w-28"})]},e))]}):null,"cards"===e?(0,t.jsx)("div",{className:"grid grid-cols-2 gap-3 lg:grid-cols-4",children:r(4).map(e=>(0,t.jsxs)("div",{className:"flex flex-col gap-3 rounded-lg border border-border bg-card p-4",children:[(0,t.jsx)(a.Skeleton,{className:"h-2.5 w-20"}),(0,t.jsx)(a.Skeleton,{className:"h-6 w-10"}),(0,t.jsx)(a.Skeleton,{className:"h-2.5 w-28"})]},e))}):null,"detail"===e?(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,t.jsx)(a.Skeleton,{className:"h-7 w-48"}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(a.Skeleton,{className:"h-5 w-20"}),(0,t.jsx)(a.Skeleton,{className:"h-5 w-16"})]}),(0,t.jsx)(a.Skeleton,{className:"h-16 w-full rounded-lg"})]}):null,"list"===e?(0,t.jsx)("div",{className:"overflow-hidden rounded-lg border border-border bg-card",children:r(n).map(e=>(0,t.jsxs)("div",{className:"flex flex-col gap-2.5 border-b border-border px-3.5 py-3 last:border-0",children:[(0,t.jsxs)("div",{className:"flex justify-between",children:[(0,t.jsx)(a.Skeleton,{className:"h-3 w-28"}),(0,t.jsx)(a.Skeleton,{className:"h-5 w-16"})]}),(0,t.jsx)(a.Skeleton,{className:"h-2.5 w-44"})]},e))}):null]})}])},77880,85538,e=>{"use strict";var t=e.i(43476),s=e.i(67927),a=e.i(66595),r=e.i(19759),n=e.i(22016),i=e.i(15905),o=e.i(36651),l=e.i(90063);let d={live:{label:"Live",dot:"bg-tone-ok-fg"},reconnecting:{label:"Reconnecting",dot:"bg-tone-waiting-fg"},offline:{label:"Offline",dot:"bg-tone-attention-fg"}};function c({state:e,className:s}){let{label:a,dot:r}=d[e];return(0,t.jsxs)("span",{"data-slot":"live-status","data-state":e,"aria-live":"polite",className:(0,l.classNames)("inline-flex items-center gap-1.5 text-meta text-muted-foreground",s),children:[(0,t.jsx)("span",{"aria-hidden":!0,className:(0,l.classNames)("size-2 shrink-0 rounded-full",r)}),a]})}e.s(["Header",0,function({breadcrumb:e,parents:l=[],live:d,onCompose:u,onSearch:m}){return(0,t.jsxs)("header",{"data-slot":"header",className:"sticky top-0 z-30 hidden h-(--size-header) shrink-0 items-center justify-between gap-4 border-b border-border bg-background px-6 sm:flex",children:[(0,t.jsx)("nav",{"aria-label":"Breadcrumb","data-testid":"header-breadcrumb",className:"min-w-0 text-body",children:(0,t.jsxs)("ol",{className:"flex min-w-0 items-center gap-1.5",children:[l.map(e=>(0,t.jsxs)("li",{className:"flex shrink-0 items-center gap-1.5",children:[(0,t.jsx)(n.default,{href:e.href,className:"text-muted-foreground hover:text-foreground hover:underline",children:e.label}),(0,t.jsx)(s.ChevronRight,{"aria-hidden":!0,className:"size-3.5 text-muted-foreground"})]},e.href)),(0,t.jsx)("li",{"aria-current":"page",className:"truncate font-medium text-foreground",children:e})]})}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(c,{state:d}),m?(0,t.jsxs)(i.Button,{size:"sm",icon:(0,t.jsx)(a.Search,{"aria-hidden":!0}),"data-testid":"header-search",className:"w-60 justify-start font-normal text-muted-foreground",onClick:m,children:[(0,t.jsx)("span",{className:"grow text-left",children:"Search ships or jump to"}),(0,t.jsx)(o.Kbd,{children:"⌘K"})]}):null,u?(0,t.jsx)(i.Button,{size:"sm",icon:(0,t.jsx)(r.SquarePen,{"aria-hidden":!0}),"data-testid":"header-compose",onClick:u,children:"Compose"}):null]})]})}],77880);var u=e.i(24071),m=e.i(57957);e.s(["TopBar",0,function({title:e,live:s,actions:r,back:o,account:l,onSearch:d}){let h=d&&!o?d:void 0;return(0,t.jsxs)("header",{"data-slot":"top-bar","data-mode":o?"detail":"root",className:"sticky top-0 z-30 flex h-(--size-header) items-center gap-2.5 border-b border-border bg-background px-4 sm:hidden",children:[o?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(n.default,{href:o.href,className:"-ml-1.5 inline-flex h-(--size-control-touch) shrink-0 items-center gap-0.5 rounded-md pr-2 text-body-touch text-foreground focus-visible:outline-2 focus-visible:outline-ring [&_svg]:size-(--size-icon)",children:[(0,t.jsx)(u.ChevronLeft,{"aria-hidden":!0}),o.label]}),(0,t.jsx)("p",{className:"min-w-0 flex-1 truncate text-center text-body-touch font-semibold text-foreground",children:e})]}):(0,t.jsx)("h1",{className:"truncate text-title-touch font-semibold tracking-tight text-foreground",children:e}),(0,t.jsx)(c,{state:s}),r||h||l&&!o?(0,t.jsxs)("div",{className:"ml-auto flex items-center gap-1",children:[h?(0,t.jsx)(i.Button,{variant:"ghost",size:"touch",isIconOnly:!0,"aria-label":"Search ships or jump to","data-testid":"top-bar-search",onClick:h,children:(0,t.jsx)(a.Search,{"aria-hidden":!0})}):null,r,l&&!o?(0,t.jsx)(m.AccountMenuSheet,{...l}):null]}):null]})}],85538)},77821,e=>{"use strict";var t=e.i(43476),s=e.i(19759),a=e.i(15905),r=e.i(77880),n=e.i(85538);e.s(["ListPage",0,function({title:e,description:i,titleMeta:o,primaryAction:l,toolbar:d,live:c,onCompose:u,onSearch:m,account:h,banner:x,phoneTopBar:p,children:g}){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.Header,{breadcrumb:e,live:c,onCompose:u,onSearch:m}),x,p??(0,t.jsx)(n.TopBar,{title:e,live:c,account:h,onSearch:m,actions:u?(0,t.jsx)(a.Button,{variant:"ghost",size:"touch",isIconOnly:!0,"aria-label":"Compose","data-testid":"top-bar-compose",onClick:u,children:(0,t.jsx)(s.SquarePen,{"aria-hidden":!0})}):void 0}),(0,t.jsxs)("main",{className:"flex grow flex-col gap-5 px-8 py-6 max-sm:gap-3.5 max-sm:px-4 max-sm:pt-3.5 max-sm:pb-[calc(var(--size-tabbar)+var(--spacing)*4)]",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4 max-sm:gap-3",children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-1",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-x-2.5 gap-y-1",children:[(0,t.jsx)("h1",{className:"text-title font-semibold tracking-tight text-foreground max-sm:hidden",children:e}),o]}),i?(0,t.jsx)("p",{className:"text-meta text-muted-foreground max-sm:text-body-touch",children:i}):null]}),l?(0,t.jsx)("div",{className:"shrink-0 max-sm:w-full max-sm:[&>*]:w-full",children:l}):null]}),d,g]})]})}])},18423,e=>{"use strict";var t=e.i(12598),s=e.i(5861),a=e.i(71645),r=e.i(86413),n=e.i(27702);let i=new Set(["FleetInitialised","ShipCommissioned","ShipClaimed","LeaseRevoked","CredentialRevoked","StartingPromptIssued","ShipRetired","DeliveryAcknowledged","DeliveryUndeliverable","ShipReported","CrewRequested","CrewRequestRemoved","CrewAssigned","CrewStatusChanged","CrewRequestExplained","CrewRequestGivenBack","LabelAssigned","LabelUnassigned","LabelRetired"]);async function o(e,t){await e.cancelQueries({queryKey:t,predicate:e=>void 0===e.state.data&&"fetching"===e.state.fetchStatus}),await e.invalidateQueries({queryKey:t})}let l=new Set(["LabelDefined","LabelValuesChanged","LabelRetired","LabelAssigned","LabelUnassigned","LabelDeleted"]),d=new Set(["DeliveryUndeliverable","DeliveryNotHandled","DeliveryDismissed"]),c=new Set(["NetworkRulesSet","NetworkRulesDraftSaved","NetworkRulesDraftDiscarded","NetworkRulesDeclared","BuiltInRuleChanged"]);e.s(["useLiveFleet",0,function(){let e=(0,n.useTRPC)(),u=(0,t.useQueryClient)(),[m,h]=(0,a.useState)(new Set),x=e=>{o(u,e)},p=(0,s.useSubscription)(e.fleet.events.subscriptionOptions({lastEventId:null},{onData:({data:t})=>{var s,a,n,o,u;if("resync"===t.kind){x(e.fleet.pathKey()),x(r.INBOX_KEY);return}let{event:m}=t;for(let t of new Set([m.shipId,m.actorShipId]))null!==t&&(x(e.fleet.ship.queryKey({shipId:t})),x(e.fleet.shipTimeline.queryKey({shipId:t})),x(e.fleet.shipWay.queryKey({shipId:t})));if(null!==m.messageId&&(x(e.fleet.shipMessages.pathKey()),x(e.fleet.shipWay.pathKey()),x(e.fleet.message.queryKey({messageId:m.messageId})),x(e.fleet.inbox.pathKey()),x(r.INBOX_KEY),x(e.fleet.health.queryKey())),s=m.type,d.has(s)&&x(e.fleet.needsAttention.queryKey()),a=m.type,l.has(a)&&x(e.fleet.labels.queryKey()),"NetworkRulesDeclared"===m.type&&x(e.fleet.declaredNetworkRules.queryKey()),("BuiltInRuleChanged"===(n=m.type)||"NetworkRulesSet"===n)&&x(e.fleet.builtInRules.queryKey()),o=m.type,c.has(o)&&(x(e.fleet.networkRules.queryKey()),x(e.fleet.networkRulesDraftChanges.queryKey()),x(e.fleet.explainReach.pathKey())),u=m.type,!i.has(u))return;x(e.fleet.list.queryKey()),x(e.fleet.health.queryKey());let{shipId:p}=m;"ShipCommissioned"===m.type&&null!==p&&h(e=>new Set([...e,p]))}}));return{live:function(e){switch(e){case"pending":return"live";case"connecting":return"reconnecting";case"idle":case"error":return"offline"}}(p.status),newShipIds:m,error:p.error}}])},28459,e=>{"use strict";var t=e.i(54616),s=e.i(66027),a=e.i(12598),r=e.i(27702);function n(e){let t=String(e.attempts-1);return e.isPushed?`Handed ${t} times, never confirmed; fifth refused: undeliverable.`:`Handed (pulled) ${t} times, never acknowledged; fifth receive refused: undeliverable.`}let i="Acknowledged, then its turn died; handed once more, and that turn died too: not handled.";function o(){let e=(0,r.useTRPC)(),t=(0,a.useQueryClient)();return()=>t.invalidateQueries({queryKey:e.fleet.pathKey()})}e.s(["DISMISSED_TOAST",0,{title:"Delivery dismissed",description:"It stays in the timelines as dismissed."},"attentionReason",0,function(e){switch(e.state){case"undeliverable":return n(e);case"notHandled":return null===e.reason?i:`${i} Its crew said: ${e.reason}.`}},"canResend",0,function(e){return!e.message.isPing},"deliveryWithId",0,function(e,t){return e?.find(e=>e.deliveryId===t)},"resentToast",0,function(e){return{title:"Message resent",description:`A new message went to ${function(e){let{recipient:t}=e.message;return"ship"===t.kind?t.ship.name:`any ship of type ${t.type}`}(e)}. The original is dismissed.`}},"undeliverableReason",0,n,"useDismissDelivery",0,function(){let e=(0,r.useTRPC)(),s=o();return(0,t.useMutation)(e.fleet.dismiss.mutationOptions({onSuccess:s}))},"useNeedsAttention",0,function(){let e=(0,r.useTRPC)();return(0,s.useQuery)(e.fleet.needsAttention.queryOptions())},"useResendDelivery",0,function(){let e=(0,r.useTRPC)(),s=o();return(0,t.useMutation)(e.fleet.resend.mutationOptions({onSuccess:s}))}])},18310,51588,e=>{"use strict";function t(e){let t=/^github\.com\/([^/]+\/[^/]+)$/.exec(e);return t?.[1]===void 0?{label:e,isGitHub:!1}:{label:t[1],isGitHub:!0}}function s(e,t){let s=new Map;for(let{name:a,version:r}of e.filter(e=>e.repository===t))s.set(a,[...s.get(a)??[],r]);return[...s].map(([e,t])=>({name:e,versions:t.toSorted((e,t)=>e-t)})).toSorted((e,t)=>e.name.localeCompare(t.name))}e.s(["leftOutLabel",0,function(e){let{kind:t,name:s,version:a}=e;return"blueprint"===t?`blueprint ${s} v${String(a)}`:`${t} ${s}@${String(a)}`},"repositoryContents",0,function(e,t){return{templates:s(e.templates,t),blueprints:s(e.blueprints,t),leftOut:e.problems.filter(e=>e.repository===t)}},"repositoryLabel",0,t,"versionFileUrl",0,function(e){let{label:s,isGitHub:a}=t(e.repository);return a?`https://github.com/${s}/blob/${e.commit}/${encodeURI(e.file)}`:void 0}],18310);var a=e.i(43476),r=e.i(56420);let n={name:"folder-git-2",size:24,node:[["path",{d:"M18 19a5 5 0 0 1-5-5v8",key:"sz5oeg"}],["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]]};n.node;let i=(0,r.default)(n);function o(){return(0,a.jsx)("svg",{"aria-hidden":!0,viewBox:"0 0 16 16",fill:"currentColor",className:"size-(--size-icon-sm) shrink-0",children:(0,a.jsx)("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"})})}e.s(["RepositoryName",0,function({name:e,href:s}){let{label:r,isGitHub:n}=t(e),l=(0,a.jsxs)(a.Fragment,{children:[n?(0,a.jsx)(o,{}):(0,a.jsx)(i,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0 text-muted-foreground"}),(0,a.jsx)("span",{className:"truncate",children:r})]}),d="inline-flex min-w-0 items-center gap-1.5 font-medium";return void 0===s?(0,a.jsx)("span",{title:e,className:d,children:l}):(0,a.jsx)("a",{href:s,target:"_blank",rel:"noreferrer",title:e,className:`${d} hover:underline`,children:l})}],51588)}]);
|
package/.next/standalone/packages/console/.next/static/chunks/{2p-_e59ng41pt.js → 1od7uozkhtt39.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,36135,e=>{"use strict";var t=e.i(43476),n=e.i(18566),s=e.i(71645),r=e.i(79432),a=e.i(83140),i=e.i(44594),o=e.i(18964),d=e.i(7921),u=e.i(66794),l=e.i(60011),c=e.i(49287),h=e.i(86875),p=e.i(22016),m=e.i(94859),x=e.i(66390),f=e.i(31513),g=e.i(57957);let v="relative flex h-(--size-control) items-center gap-2.5 rounded-md px-2.5 text-body text-muted-foreground transition-colors duration-(--duration-fast) hover:bg-accent hover:text-foreground aria-[current=page]:bg-accent aria-[current=page]:font-medium aria-[current=page]:text-foreground max-lg:justify-center max-lg:px-0 [&_svg]:size-(--size-icon) [&_svg]:shrink-0";function b({href:e,label:n,icon:s,isActive:r,testId:a,count:i}){return(0,t.jsxs)(p.default,{href:e,"aria-current":r?"page":void 0,"data-testid":a,className:v,children:[s,(0,t.jsx)("span",{className:"grow max-lg:sr-only",children:n}),i]})}function w({count:e,testId:n="nav-inbox-count"}){return void 0===e||0===e?null:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(x.Badge,{variant:"count","data-testid":n,className:"max-lg:sr-only",children:[e,(0,t.jsx)("span",{className:"sr-only",children:" open"})]}),(0,t.jsx)("span",{"aria-hidden":!0,className:"absolute top-1.5 right-4 size-1.5 rounded-full bg-primary lg:hidden"})]})}function y({count:e}){return void 0===e||0===e?null:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(x.Badge,{variant:"count-neutral","data-testid":"nav-needs-crew-count",className:"max-lg:sr-only",children:[e,(0,t.jsx)("span",{className:"sr-only",children:" need crew"})]}),(0,t.jsx)("span",{"aria-hidden":!0,className:"absolute top-1.5 right-4 size-1.5 rounded-full bg-muted-foreground lg:hidden"})]})}function k({count:e,testId:n,words:s}){return void 0===e||0===e?null:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(x.Badge,{variant:"count-attention","data-testid":n,className:"max-lg:sr-only",children:[e,(0,t.jsxs)("span",{className:"sr-only",children:[" ",s]})]}),(0,t.jsx)("span",{"aria-hidden":!0,className:"absolute top-1.5 right-4 size-1.5 rounded-full bg-tone-attention-fg lg:hidden"})]})}function j({active:e,inboxCount:n,stuckCount:s,needsCrewCount:p,hasSquadrons:x=!1,hasTrierarchs:C=!1,trierarchsCount:q,hasNetwork:S=!1,hasSettings:N=!1,...A}){return(0,t.jsxs)("aside",{"data-slot":"sidebar",className:"sticky top-0 hidden h-dvh w-(--size-rail) shrink-0 flex-col border-r border-border bg-sidebar text-sidebar-foreground sm:flex lg:w-(--size-sidebar)",children:[(0,t.jsxs)("div",{className:"flex h-(--size-header) items-center gap-2.5 px-4 max-lg:justify-center max-lg:px-0",children:[(0,t.jsx)(m.Avatar,{kind:"app",size:28}),(0,t.jsxs)("div",{className:"flex flex-col max-lg:sr-only",children:[(0,t.jsx)("span",{className:"text-body font-semibold text-foreground",children:"Aeolus"}),(0,t.jsx)("span",{className:"text-caption text-muted-foreground",children:"Operator console"})]})]}),(0,t.jsxs)("nav",{"aria-label":"Console",className:"flex grow flex-col gap-0.5 px-2.5 py-2",children:[(0,t.jsx)(b,{href:"/",label:"Fleet overview",icon:(0,t.jsx)(c.Ship,{"aria-hidden":!0}),isActive:"overview"===e,testId:"nav-overview"}),(0,t.jsx)(b,{href:"/fleet-health",label:"Health",icon:(0,t.jsx)(r.Activity,{"aria-hidden":!0}),isActive:"health"===e,testId:"nav-health",count:(0,t.jsx)(k,{count:s,testId:"nav-health-count",words:"stuck"})}),(0,t.jsx)(b,{href:"/needs-crew",label:"Needs crew",icon:(0,t.jsx)(o.ListChecks,{"aria-hidden":!0}),isActive:"needs-crew"===e,testId:"nav-needs-crew",count:(0,t.jsx)(y,{count:p})}),x&&(0,t.jsx)(b,{href:"/squadrons",label:"Squadrons",icon:(0,t.jsx)(l.Shapes,{"aria-hidden":!0}),isActive:"squadrons"===e,testId:"nav-squadrons"}),C&&(0,t.jsx)(b,{href:"/trierarchs",label:"Trierarchs",icon:(0,t.jsx)(h.ShipWheel,{"aria-hidden":!0}),isActive:"trierarchs"===e,testId:"nav-trierarchs",count:(0,t.jsx)(k,{count:q,testId:"nav-trierarchs-count",words:"silent"})}),(0,t.jsx)(b,{href:"/inbox",label:"Inbox",icon:(0,t.jsx)(i.Inbox,{"aria-hidden":!0}),isActive:"inbox"===e,testId:"nav-inbox",count:(0,t.jsx)(w,{count:n})})]}),(0,t.jsxs)("div",{className:"px-2.5 pb-2",children:[S&&(0,t.jsx)(b,{href:"/network",label:"Network",icon:(0,t.jsx)(d.Network,{"aria-hidden":!0}),isActive:"network"===e,testId:"nav-network"}),N&&(0,t.jsx)(b,{href:"/settings",label:"Settings",icon:(0,t.jsx)(u.Settings,{"aria-hidden":!0}),isActive:"settings"===e,testId:"nav-settings"}),(0,t.jsxs)("a",{href:f.SOURCE_URL,target:"_blank",rel:"noreferrer","data-testid":"nav-source",className:v,children:[(0,t.jsx)(a.CodeXml,{"aria-hidden":!0}),(0,t.jsx)("span",{className:"grow max-lg:sr-only",children:"Source on GitHub"}),(0,t.jsx)("span",{className:"sr-only",children:" (opens in a new tab)"})]})]}),(0,t.jsx)("div",{className:"border-t border-border p-2.5",children:(0,t.jsx)(g.AccountMenu,{...A})})]})}var C=e.i(90063);function q({href:e,label:n,icon:s,isActive:r,testId:a,count:i}){let o=i?.value!==void 0&&i.value>0;return(0,t.jsxs)(p.default,{href:e,"aria-current":r?"page":void 0,"data-testid":a,className:"flex grow flex-col items-center justify-center gap-1 text-micro text-muted-foreground outline-none focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-ring aria-[current=page]:font-medium aria-[current=page]:text-primary [&_svg]:size-(--size-icon-tab)",children:[(0,t.jsxs)("span",{className:"relative",children:[s,o?(0,t.jsxs)("span",{"data-testid":`${a}-count`,className:(0,C.classNames)("absolute -top-1.5 -right-2 flex h-4 min-w-4 items-center justify-center rounded-full px-1 text-micro font-semibold tabular-nums","primary"===i.tone?"bg-primary text-primary-foreground":"bg-destructive text-destructive-foreground"),children:[i.value,(0,t.jsxs)("span",{className:"sr-only",children:[" ",i.words]})]}):null]}),n]})}function S({active:e,inboxCount:n,stuckCount:s,hasSquadrons:a=!1,hasTrierarchs:o=!1,trierarchsCount:d}){return(0,t.jsxs)("nav",{"aria-label":"Console","data-slot":"tab-bar",className:"fixed inset-x-0 bottom-0 z-40 flex min-h-(--size-tabbar) border-t border-border bg-background pb-[env(safe-area-inset-bottom)] sm:hidden [body:has([data-hides-tab-bar])_&]:hidden",children:[(0,t.jsx)(q,{href:"/",label:"Fleet",icon:(0,t.jsx)(c.Ship,{"aria-hidden":!0}),isActive:"fleet"===e,testId:"tab-fleet"}),(0,t.jsx)(q,{href:"/fleet-health",label:"Health",icon:(0,t.jsx)(r.Activity,{"aria-hidden":!0}),isActive:"health"===e,testId:"tab-health",count:{value:s,tone:"attention",words:"stuck"}}),a&&(0,t.jsx)(q,{href:"/squadrons",label:"Squadrons",icon:(0,t.jsx)(l.Shapes,{"aria-hidden":!0}),isActive:"squadrons"===e,testId:"tab-squadrons"}),o&&(0,t.jsx)(q,{href:"/trierarchs",label:"Trierarchs",icon:(0,t.jsx)(h.ShipWheel,{"aria-hidden":!0}),isActive:"trierarchs"===e,testId:"tab-trierarchs",count:{value:d,tone:"attention",words:"silent"}}),(0,t.jsx)(q,{href:"/inbox",label:"Inbox",icon:(0,t.jsx)(i.Inbox,{"aria-hidden":!0}),isActive:"inbox"===e,testId:"tab-inbox",count:{value:n,tone:"primary",words:"open"}})]})}function N({nav:e,account:n,children:s}){return(0,t.jsxs)("div",{className:"flex min-h-dvh bg-background",children:[(0,t.jsx)(j,{active:e.active,inboxCount:e.inboxCount,stuckCount:e.stuckCount,needsCrewCount:e.needsCrewCount,hasSquadrons:e.hasSquadrons,hasTrierarchs:e.hasTrierarchs,trierarchsCount:e.trierarchsCount,hasNetwork:e.hasNetwork,hasSettings:e.hasSettings,...n}),(0,t.jsx)("div",{className:"flex min-w-0 grow flex-col",children:s}),(0,t.jsx)(S,{active:"overview"===e.active||"needs-crew"===e.active?"fleet":"settings"===e.active||"network"===e.active?void 0:e.active,hasSquadrons:e.hasSquadrons,hasTrierarchs:e.hasTrierarchs,trierarchsCount:e.trierarchsCount,inboxCount:e.inboxCount,stuckCount:e.stuckCount})]})}var A=e.i(17540),T=e.i(90262),I=e.i(43223),O=e.i(5387),R=e.i(86165),z=e.i(48695),P=e.i(84294);let B=(0,A.lazyDialog)(()=>e.A(85260).then(e=>e.CommandPalette),e=>e.isOpen);function M({isOpen:e,onOpenChange:r,onCompose:a}){let i=(0,n.useRouter)(),o=(0,O.useFleetSnapshot)(),d=(0,R.useHasSquadrons)(),u=(0,z.useSquadrons)(),l=(0,z.useCatalogue)(),c=(0,T.useAccess)();return(0,s.useEffect)(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&"k"===e.key.toLowerCase()&&(e.preventDefault(),r(!0))};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[r]),(0,t.jsx)(B,{isOpen:e,onOpenChange:r,items:(0,I.allowedPaletteItems)((0,I.paletteItemsOf)(o.data??[],d?{squadrons:u.data??[],blueprints:(0,P.blueprintChoices)(l.data??{blueprints:[]})}:void 0),c),onSelect:e=>{switch(e.kind){case"ship":case"page":case"squadron":case"squadron-action":case"blueprint":i.push(e.href);return;case"action":"compose"===e.id?a():"form-squadron"===e.id?i.push("/squadrons?form=new"):i.push("/?commission=new")}}})}var F=e.i(65041),H=e.i(54616),E=e.i(66027),L=e.i(12598),$=e.i(41880),K=e.i(32150),Q=e.i(27702);function D(e){return e.split(/[?#]/)[0]??e}function _(e){let t=new MutationObserver(e);return t.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["class","hidden","style"]}),window.addEventListener("resize",e),()=>{t.disconnect(),window.removeEventListener("resize",e)}}let G="(width < 40rem)";function U(e){let t=window.matchMedia(G);return t.addEventListener("change",e),()=>{t.removeEventListener("change",e)}}function W(){let e=(0,Q.useTRPC)(),t=(0,n.useRouter)(),s=(0,n.usePathname)(),r=(0,L.useQueryClient)(),a=(0,E.useQuery)(e.console.guide.queryOptions()),i=e.console.guide.queryKey(),o=(0,H.useMutation)(e.console.recordGuideProgress.mutationOptions({onMutate:e=>{r.setQueryData(i,t=>t?{...t,progress:e}:t)},onError:()=>{(0,$.showToast)({title:"Couldn’t keep your place in the tour",description:"The server did not answer. Try again.",tone:"error"})},onSettled:()=>r.invalidateQueries({queryKey:i})})),{track:d}=(0,K.useAnalytics)(),u=a.data?.steps??[],l=a.data?.progress.step??0,c=function(e){if(e?.progress.state!=="open")return;let t=e.steps[e.progress.step];return void 0===t?void 0:{step:t,index:e.progress.step,total:e.steps.length}}(a.data??void 0),h=e=>{o.mutate(e);let n=u[e.step];"open"===e.state&&void 0!==n&&D(n.path)!==s&&t.push(n.path)},p=e=>{h({step:e,state:"open"}),d({name:"tour_step_reached",step:e+1,total:u.length})};return{view:c,onBack:()=>{p(Math.max(l-1,0))},onNext:()=>{p(Math.min(l+1,u.length-1))},onSkip:()=>{h({step:l,state:"skipped"}),d({name:"tour_skipped",step:l+1})},onFinish:()=>{h({step:l,state:"finished"}),d({name:"tour_finished"})},onTakeTour:0===u.length?void 0:()=>{h({step:0,state:"open"})}}}var X=e.i(15905),Y=e.i(6734);function V({index:e,total:n,onBack:s,onNext:r,onSkip:a,onFinish:i,children:o}){let d=e===n-1;return(0,t.jsxs)("div",{className:"flex w-80 max-w-[calc(100vw-2rem)] flex-col gap-2 p-4",children:[(0,t.jsxs)("p",{className:"text-caption text-muted-foreground","data-testid":"tour-step-count",children:[e+1," of ",n]}),o,(0,t.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[d?null:(0,t.jsx)(X.Button,{size:"sm",variant:"ghost","data-testid":"tour-step-skip",onClick:a,children:"Skip"}),(0,t.jsx)("span",{className:"grow"}),0===e?null:(0,t.jsx)(X.Button,{size:"sm","data-testid":"tour-step-back",onClick:s,children:"Back"}),d?(0,t.jsx)(X.Button,{size:"sm",variant:"primary","data-testid":"tour-step-finish",onClick:i,children:"Finish"}):(0,t.jsx)(X.Button,{size:"sm",variant:"primary","data-testid":"tour-step-next",onClick:r,children:"Next"})]})]})}function J(e){let{title:n,text:s,anchor:r,side:a}=e;return null===r?(0,t.jsx)("div",{role:"dialog","aria-labelledby":"tour-step-title","aria-describedby":"tour-step-text","data-testid":"tour-step","data-placement":"centred",className:"fixed top-1/2 left-1/2 z-50 -translate-1/2 rounded-xl border border-border bg-popover text-popover-foreground shadow-lg",children:(0,t.jsxs)(V,{...e,children:[(0,t.jsx)("h2",{id:"tour-step-title",className:"text-body font-semibold text-foreground",children:n}),(0,t.jsx)("p",{id:"tour-step-text",className:"text-body text-muted-foreground",children:s})]})}):(0,t.jsx)(Y.Popover,{open:!0,modal:!1,children:(0,t.jsx)(Y.PopoverContent,{anchor:r,side:a,"data-testid":"tour-step","data-placement":"anchored",children:(0,t.jsxs)(V,{...e,children:[(0,t.jsx)(Y.PopoverTitle,{className:"text-body font-semibold text-foreground",children:n}),(0,t.jsx)(Y.PopoverDescription,{className:"text-body text-muted-foreground",children:s})]})})})}function Z(){var e;let r,a,{view:i,onBack:o,onNext:d,onSkip:u,onFinish:l}=W(),c=(e=i?.step,r=(0,n.usePathname)(),a=e?void 0!==e.anchor&&D(e.path)===r?`[data-testid="${e.anchor}"]`:void 0:void 0,(0,s.useSyncExternalStore)(_,()=>void 0===a?null:[...document.querySelectorAll(a)].find(e=>e.getClientRects().length>0)??null,()=>null));(0,s.useLayoutEffect)(()=>{c?.scrollIntoView({block:"center",inline:"nearest"})},[c]);let h=(0,s.useSyncExternalStore)(U,()=>window.matchMedia(G).matches?"top":"bottom",()=>"bottom");return(!function(e){let{track:t}=(0,K.useAnalytics)(),n=(0,s.useRef)(!1),r=void 0!==e,a=e?.index===0;(0,s.useEffect)(()=>{r&&!n.current&&a&&t({name:"tour_started"}),n.current=r},[r,a,t])}(i),i)?(0,t.jsx)(J,{title:i.step.title,text:i.step.text,index:i.index,total:i.total,anchor:c,side:h,onBack:o,onNext:d,onSkip:u,onFinish:l}):null}var ee=e.i(10818),et=e.i(63676);function en({notice:e,onDismiss:n,onSignOut:s}){return(0,t.jsxs)("div",{role:"status","data-testid":"notice","data-notice-id":e.id,className:"flex items-start gap-2 border-b border-border bg-muted px-8 py-2.5 max-sm:px-4",children:[(0,t.jsx)(ee.Info,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon) shrink-0 text-muted-foreground"}),(0,t.jsxs)("div",{className:"flex min-w-0 grow flex-wrap items-baseline gap-x-3 gap-y-1",children:[(0,t.jsx)("p",{className:"text-meta text-foreground",children:e.text}),e.links.map(e=>!0===e.isSignOut?(0,t.jsx)("button",{type:"button","data-testid":"notice-link",className:"text-meta font-medium text-foreground underline underline-offset-2",onClick:()=>s?.(e),children:e.label},e.label):(0,t.jsx)("a",{href:e.url,"data-testid":"notice-link",className:"text-meta font-medium text-foreground underline underline-offset-2",children:e.label},e.label))]}),e.isDismissible&&n?(0,t.jsx)(X.Button,{variant:"ghost",size:"xs",isIconOnly:!0,"aria-label":"Dismiss","data-testid":"notice-dismiss",onClick:n,children:(0,t.jsx)(et.X,{"aria-hidden":!0})}):null]})}var es=e.i(78485);function er(){let{notices:e,onDismiss:n,onSignOut:s}=function(){let e=(0,Q.useTRPC)(),t=(0,L.useQueryClient)(),n=(0,E.useQuery)(e.console.notices.queryOptions()),s=(0,H.useMutation)(e.console.dismissNotice.mutationOptions({onSuccess:()=>t.invalidateQueries({queryKey:e.console.notices.queryKey()}),onError:()=>{(0,$.showToast)({title:"Couldn’t dismiss the notice",description:"The server did not answer. Try again.",tone:"error"})}})),{signOut:r}=(0,es.useSignOut)();return{notices:n.data??[],onDismiss:e=>{s.mutate({noticeId:e})},onSignOut:e=>{r(e.url??"/sign-in",()=>{(0,$.showToast)({title:"Couldn’t sign out",description:"The server did not answer. You are still signed in.",tone:"error"})})}}}();return 0===e.length?null:(0,t.jsx)("div",{"data-testid":"notices",children:e.map(e=>(0,t.jsx)(en,{notice:e,onDismiss:()=>{n(e.id)},onSignOut:s},e.id))})}var ea=e.i(87600),ei=e.i(95014),eo=e.i(25242),ed=e.i(94070),eu=e.i(3979),el=e.i(87964),ec=e.i(86413),eh=e.i(90437),ep=e.i(96676);e.s(["SignedInLayout",0,function({children:e}){let r=function(e){let t=(0,Q.useTRPC)(),n=(0,L.useQueryClient)(),s=(0,E.useQuery)(t.console.account.queryOptions()),r=s.data?.session.accountId??null,a=(0,E.useQuery)({queryKey:["account-name",r],queryFn:()=>(0,ed.fetchConsoleRead)({read:"account-name"}),enabled:null!==r}),i=(0,ea.useHostedAccountUrl)(),{themes:o}=(0,eo.useConsoleConstants)(),d=W(),u=(0,eu.usePluginNav)(),l=(0,H.useMutation)(t.console.setTheme.mutationOptions({onMutate:({theme:e})=>{(0,ei.applyTheme)(e),n.setQueryData(t.console.account.queryKey(),t=>t?.kind!=="operator"?t:{...t,theme:e})},onError:()=>{(0,$.showToast)({title:"Couldn’t save the theme",description:"It applies here until the page reloads.",tone:"error"})}})),{signOut:c,isSigningOut:h}=(0,es.useSignOut)(),p=()=>{c("/sign-in",()=>{(0,$.showToast)({title:"Couldn’t sign out",description:"The server did not answer. You are still signed in.",tone:"error",action:{label:"Try again",onClick:p}})})};return{...u.hasSettings?{settingsHref:"/settings"}:{},...u.hasNetwork?{networkHref:"/network"}:{},account:s.data,..."string"==typeof a.data?{accountName:a.data}:{},themes:o,onThemeChange:e=>{l.mutate({theme:e})},onSignOut:p,isSigningOut:h,now:e,...void 0===i?{}:{accountUrl:i},...void 0===d.onTakeTour?{}:{onTakeTour:d.onTakeTour}}}((0,ep.useNow)()),a=(0,T.useAccess)(),i=(0,ec.useOpenInboxCount)(),o=(0,eh.useStuckCount)(),d=(0,eu.usePluginNav)(),u=(0,el.destinationOf)((0,n.usePathname)()),[l,c]=(0,s.useState)(!1),[h,p]=(0,s.useState)(!1),m=()=>{c(!0)};return(0,t.jsxs)(el.ConsoleFrameContext,{value:{account:r,onCompose:a.canSend?m:void 0,onSearch:()=>{p(!0)},banner:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(er,{}),(0,t.jsx)(Z,{})]})},children:[(0,t.jsx)(N,{nav:{active:u,inboxCount:i,stuckCount:o,...d},account:r,children:e}),(0,t.jsx)(F.ComposeMessage,{isOpen:l,onOpenChange:c}),(0,t.jsx)(M,{isOpen:h,onOpenChange:p,onCompose:m})]})}],36135)},43223,e=>{"use strict";var t=e.i(84294);let n={compose:"canSend",commission:"canManage","form-squadron":"canManage"};e.s(["allowedPaletteItems",0,function(e,t){return e.filter(e=>"action"===e.kind?t[n[e.id]]:"squadron-action"!==e.kind||t.canManage)},"paletteGroups",0,function(e,t){let n=t.trim().toLowerCase(),s=e.filter(e=>""===n?"squadron-action"!==e.kind:("ship"===e.kind?[e.name,e.type]:"squadron"===e.kind?[e.id,e.blueprint]:"squadron-action"===e.kind?[e.squadronId]:"blueprint"===e.kind?[e.name]:[e.label]).some(e=>e.toLowerCase().includes(n))),r=s.filter(e=>"ship"===e.kind);return[{key:"actions",label:"Actions",items:s.filter(e=>"action"===e.kind||"squadron-action"===e.kind)},{key:"ships",label:"Ships",items:""===n?r.slice(0,8):r},{key:"squadrons",label:"Squadrons",items:s.filter(e=>"squadron"===e.kind)},{key:"blueprints",label:"Blueprints",items:s.filter(e=>"blueprint"===e.kind)},{key:"pages",label:"Go to",items:s.filter(e=>"page"===e.kind)}].filter(e=>e.items.length>0)},"paletteItemsOf",0,function(e,n){return[{kind:"action",id:"commission",label:"Commission ship"},...n?[{kind:"action",id:"form-squadron",label:"Form squadron"}]:[],{kind:"action",id:"compose",label:"Compose a message"},...e.filter(e=>"agent"===e.kind&&"retired"!==e.status).map(e=>({kind:"ship",id:e.id,name:e.name,type:e.type,status:e.status,href:`/ships/${e.id}`})),...(n?.squadrons??[]).filter(e=>"disbanded"!==e.state).map(e=>({kind:"squadron",id:e.id,blueprint:e.blueprint.name,state:e.state,href:`/squadrons/${e.id}`})),...(n?.squadrons??[]).filter(e=>"sailing"===e.state).flatMap(e=>[{kind:"squadron-action",id:`add-member:${e.id}`,squadronId:e.id,action:"add-member",label:`Add member to ${e.id}…`,href:`/squadrons/${e.id}?action=add-member`},{kind:"squadron-action",id:`stand-down:${e.id}`,squadronId:e.id,action:"stand-down",label:`Stand down ${e.id}…`,href:`/squadrons/${e.id}?action=stand-down`}]),...(n?.blueprints??[]).map(e=>({kind:"blueprint",id:e.key,name:e.name,version:e.versions[0]?.version??0,href:(0,t.blueprintPath)(e)})),{kind:"page",id:"overview",label:"Fleet overview",href:"/"},...n?[{kind:"page",id:"squadrons",label:"Squadrons",href:"/squadrons"}]:[],{kind:"page",id:"inbox",label:"Operator inbox",href:"/inbox"},{kind:"page",id:"health",label:"Health",href:"/fleet-health"}]},"paletteKeyOf",0,function(e){return`${e.kind}:${e.id}`}])},85260,e=>{e.v(t=>Promise.all(["static/chunks/2rl754q2x339f.js"].map(t=>e.l(t))).then(()=>t(31432)))},81489,e=>{e.v(t=>Promise.all(["static/chunks/2-ncr8s35g33z.js","static/chunks/3gw93hpgh57gl.js","static/chunks/24bvw3_s7h3f3.js"].map(t=>e.l(t))).then(()=>t(72268)))},54492,e=>{"use strict";e.s(["crewRequestAction",0,function(e){switch(e.kind){case"none":return;case"needsCrew":return"remove";case"crewedByHand":return"release";case"assigned":return"releasing"===e.status?void 0:"release"}},"crewRequestStage",0,function(e){let t=e.crewRequest;return null===t?{kind:"none"}:null!==t.assignedTo?{kind:"assigned",requestedAt:t.requestedAt,trierarch:t.assignedTo,status:t.status??"crewing",attempt:t.attempt,startedAt:t.startedAt}:null!==t.crewedBy?{kind:"crewedByHand",requestedAt:t.requestedAt,crewedBy:t.crewedBy,since:e.crewedSince??null}:{kind:"needsCrew",requestedAt:t.requestedAt,reason:t.reason}},"isRestartable",0,function(e){return"assigned"===e.kind&&"crashed"===e.status},"releaseSteps",0,function(e){return"crewedByHand"===e.kind?["removeCrewRequest","release"]:["removeCrewRequest"]},"requestedBy",0,function(e){return e.find(e=>"CrewRequested"===e.type)?.actor??null},"restartWords",0,function({status:e,attempt:t}){let n=`${String(t)} ${1===t?"restart":"restarts"}`;switch(e){case"restarting":return`attempt ${String(t)}`;case"crashed":return n;case"running":return 0===t?void 0:n;case"crewing":case"releasing":return}},"statusChangedAt",0,function(e){return e.find(e=>"CrewStatusChanged"===e.type)?.occurredAt}])},90437,e=>{"use strict";var t=e.i(66027),n=e.i(27702);function s(){let e=(0,n.useTRPC)();return(0,t.useQuery)(e.fleet.health.queryOptions(void 0,{refetchInterval:6e4}))}function r(e){return e?.stuck.reduce((e,t)=>e+t.count,0)}e.s(["stuckCountOf",0,r,"useFleetHealth",0,s,"useStuckCount",0,function(){return r(s().data)}])},50980,e=>{"use strict";var t=e.i(54616),n=e.i(12598),s=e.i(76580),r=e.i(94070),a=e.i(95187);let i=(0,a.createServerReference)("00266230c7d3b36667add7c71f2b3fb5ee8f96ab25",a.callServer,void 0,a.findSourceMapURL,"connectGateway");var o=e.i(2660);let d=["gateway","connection"];function u(){return(0,s.useConsoleRead)({queryKey:d,queryFn:()=>(0,r.fetchConsoleRead)({read:"gateway-connection"})})}e.s(["useConnectGateway",0,function(){let e=(0,n.useQueryClient)();return(0,t.useMutation)({mutationFn:async()=>(0,o.dataOf)(await i()),onSuccess:t=>{e.setQueryData(d,t)}})},"useGatewaySettings",0,u,"useHasGateway",0,function(){let e=u();return void 0!==e.data&&"none"!==e.data.state}],50980)},96676,e=>{"use strict";let t;var n=e.i(71645);let s=Date.now(),r=new Set;function a(e){return r.add(e),t??=setInterval(()=>{for(let e of(s=Date.now(),r))e()},1e4),()=>{r.delete(e),0===r.size&&(clearInterval(t),t=void 0)}}function i(){return s}e.s(["useNow",0,function(){return new Date((0,n.useSyncExternalStore)(a,i,i))}])},3979,49841,e=>{"use strict";var t=e.i(90262),n=e.i(5387),s=e.i(50980),r=e.i(54492);function a(e,t){return e.filter(e=>(function(e,t){if("retired"===e.status)return!1;let n=(0,r.crewRequestStage)(e);return t.hasTrierarchs?"needsCrew"===n.kind||"assigned"===n.kind&&"running"!==n.status&&"releasing"!==n.status:"needsCrew"===n.kind&&"awaitingCrew"===e.status})(e,t)).toSorted((e,t)=>(e.crewRequest?.requestedAt??"").localeCompare(t.crewRequest?.requestedAt??""))}let i={crewing:{tone:"active",word:"Crewing"},running:{tone:"ok",word:"Running"},restarting:{tone:"waiting",word:"Restarting"},crashed:{tone:"attention",word:"Crashed"},releasing:{tone:"active",word:"Releasing"}};e.s(["crewRequestKey",0,function(e){return"assigned"===e.kind?e.status:e.kind},"crewRequestKeyWord",0,function(e){return"none"===e?"No request":"needsCrew"===e?"Needs crew":"crewedByHand"===e?"Crewed by hand":i[e].word},"crewRequestKeysOf",0,function(e){return["none","needsCrew","crewedByHand",...e]},"handCrewOf",0,function(e){return null===e.startingPrompt?{kind:"no-prompt"}:e.startingPrompt.isClaimed?{kind:"crew-ended",endedAt:e.awaitingCrewSince}:{kind:"prompt-unclaimed",issuedAt:e.startingPrompt.issuedAt}},"needsCrew",0,a],49841);var o=e.i(86165),d=e.i(14695),u=e.i(265);e.s(["usePluginNav",0,function(){let e=(0,t.useAccess)(),r=(0,o.useHasSquadrons)(),i=(0,u.useHasTrierarchPlugin)(),l=(0,s.useHasGateway)(),c=(0,u.useMachines)(),h=(0,n.useFleetSnapshot)();return{...void 0===h.data?{}:{needsCrewCount:a(h.data,{hasTrierarchs:i}).length},hasSquadrons:r,hasTrierarchs:i,...void 0===c.data?{}:{trierarchsCount:(0,d.silentCount)(c.data)},hasNetwork:e.canEditNetwork,hasSettings:e.canManage&&(r||i||l)}}],3979)}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,36135,e=>{"use strict";var t=e.i(43476),n=e.i(18566),s=e.i(71645),r=e.i(79432),a=e.i(83140),i=e.i(44594),o=e.i(18964),d=e.i(7921),u=e.i(66794),l=e.i(60011),c=e.i(49287),h=e.i(86875),p=e.i(22016),m=e.i(94859),x=e.i(66390),f=e.i(31513),g=e.i(57957);let v="relative flex h-(--size-control) items-center gap-2.5 rounded-md px-2.5 text-body text-muted-foreground transition-colors duration-(--duration-fast) hover:bg-accent hover:text-foreground aria-[current=page]:bg-accent aria-[current=page]:font-medium aria-[current=page]:text-foreground max-lg:justify-center max-lg:px-0 [&_svg]:size-(--size-icon) [&_svg]:shrink-0";function b({href:e,label:n,icon:s,isActive:r,testId:a,count:i}){return(0,t.jsxs)(p.default,{href:e,"aria-current":r?"page":void 0,"data-testid":a,className:v,children:[s,(0,t.jsx)("span",{className:"grow max-lg:sr-only",children:n}),i]})}function w({count:e,testId:n="nav-inbox-count"}){return void 0===e||0===e?null:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(x.Badge,{variant:"count","data-testid":n,className:"max-lg:sr-only",children:[e,(0,t.jsx)("span",{className:"sr-only",children:" open"})]}),(0,t.jsx)("span",{"aria-hidden":!0,className:"absolute top-1.5 right-4 size-1.5 rounded-full bg-primary lg:hidden"})]})}function y({count:e}){return void 0===e||0===e?null:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(x.Badge,{variant:"count-neutral","data-testid":"nav-needs-crew-count",className:"max-lg:sr-only",children:[e,(0,t.jsx)("span",{className:"sr-only",children:" need crew"})]}),(0,t.jsx)("span",{"aria-hidden":!0,className:"absolute top-1.5 right-4 size-1.5 rounded-full bg-muted-foreground lg:hidden"})]})}function k({count:e,testId:n,words:s}){return void 0===e||0===e?null:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(x.Badge,{variant:"count-attention","data-testid":n,className:"max-lg:sr-only",children:[e,(0,t.jsxs)("span",{className:"sr-only",children:[" ",s]})]}),(0,t.jsx)("span",{"aria-hidden":!0,className:"absolute top-1.5 right-4 size-1.5 rounded-full bg-tone-attention-fg lg:hidden"})]})}function j({active:e,inboxCount:n,stuckCount:s,needsCrewCount:p,hasSquadrons:x=!1,hasTrierarchs:C=!1,trierarchsCount:q,hasNetwork:S=!1,hasSettings:N=!1,...A}){return(0,t.jsxs)("aside",{"data-slot":"sidebar",className:"sticky top-0 hidden h-dvh w-(--size-rail) shrink-0 flex-col border-r border-border bg-sidebar text-sidebar-foreground sm:flex lg:w-(--size-sidebar)",children:[(0,t.jsxs)("div",{className:"flex h-(--size-header) items-center gap-2.5 px-4 max-lg:justify-center max-lg:px-0",children:[(0,t.jsx)(m.Avatar,{kind:"app",size:28}),(0,t.jsxs)("div",{className:"flex flex-col max-lg:sr-only",children:[(0,t.jsx)("span",{className:"text-body font-semibold text-foreground",children:"Aeolus"}),(0,t.jsx)("span",{className:"text-caption text-muted-foreground",children:"Operator console"})]})]}),(0,t.jsxs)("nav",{"aria-label":"Console",className:"flex grow flex-col gap-0.5 px-2.5 py-2",children:[(0,t.jsx)(b,{href:"/",label:"Fleet overview",icon:(0,t.jsx)(c.Ship,{"aria-hidden":!0}),isActive:"overview"===e,testId:"nav-overview"}),(0,t.jsx)(b,{href:"/fleet-health",label:"Health",icon:(0,t.jsx)(r.Activity,{"aria-hidden":!0}),isActive:"health"===e,testId:"nav-health",count:(0,t.jsx)(k,{count:s,testId:"nav-health-count",words:"stuck"})}),(0,t.jsx)(b,{href:"/needs-crew",label:"Needs crew",icon:(0,t.jsx)(o.ListChecks,{"aria-hidden":!0}),isActive:"needs-crew"===e,testId:"nav-needs-crew",count:(0,t.jsx)(y,{count:p})}),x&&(0,t.jsx)(b,{href:"/squadrons",label:"Squadrons",icon:(0,t.jsx)(l.Shapes,{"aria-hidden":!0}),isActive:"squadrons"===e,testId:"nav-squadrons"}),C&&(0,t.jsx)(b,{href:"/trierarchs",label:"Trierarchs",icon:(0,t.jsx)(h.ShipWheel,{"aria-hidden":!0}),isActive:"trierarchs"===e,testId:"nav-trierarchs",count:(0,t.jsx)(k,{count:q,testId:"nav-trierarchs-count",words:"silent"})}),(0,t.jsx)(b,{href:"/inbox",label:"Inbox",icon:(0,t.jsx)(i.Inbox,{"aria-hidden":!0}),isActive:"inbox"===e,testId:"nav-inbox",count:(0,t.jsx)(w,{count:n})})]}),(0,t.jsxs)("div",{className:"px-2.5 pb-2",children:[S&&(0,t.jsx)(b,{href:"/network",label:"Network",icon:(0,t.jsx)(d.Network,{"aria-hidden":!0}),isActive:"network"===e,testId:"nav-network"}),N&&(0,t.jsx)(b,{href:"/settings",label:"Settings",icon:(0,t.jsx)(u.Settings,{"aria-hidden":!0}),isActive:"settings"===e,testId:"nav-settings"}),(0,t.jsxs)("a",{href:f.SOURCE_URL,target:"_blank",rel:"noreferrer","data-testid":"nav-source",className:v,children:[(0,t.jsx)(a.CodeXml,{"aria-hidden":!0}),(0,t.jsx)("span",{className:"grow max-lg:sr-only",children:"Source on GitHub"}),(0,t.jsx)("span",{className:"sr-only",children:" (opens in a new tab)"})]})]}),(0,t.jsx)("div",{className:"border-t border-border p-2.5",children:(0,t.jsx)(g.AccountMenu,{...A})})]})}var C=e.i(90063);function q({href:e,label:n,icon:s,isActive:r,testId:a,count:i}){let o=i?.value!==void 0&&i.value>0;return(0,t.jsxs)(p.default,{href:e,"aria-current":r?"page":void 0,"data-testid":a,className:"flex grow flex-col items-center justify-center gap-1 text-micro text-muted-foreground outline-none focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-ring aria-[current=page]:font-medium aria-[current=page]:text-primary [&_svg]:size-(--size-icon-tab)",children:[(0,t.jsxs)("span",{className:"relative",children:[s,o?(0,t.jsxs)("span",{"data-testid":`${a}-count`,className:(0,C.classNames)("absolute -top-1.5 -right-2 flex h-4 min-w-4 items-center justify-center rounded-full px-1 text-micro font-semibold tabular-nums","primary"===i.tone?"bg-primary text-primary-foreground":"bg-destructive text-destructive-foreground"),children:[i.value,(0,t.jsxs)("span",{className:"sr-only",children:[" ",i.words]})]}):null]}),n]})}function S({active:e,inboxCount:n,stuckCount:s,hasSquadrons:a=!1,hasTrierarchs:o=!1,trierarchsCount:d}){return(0,t.jsxs)("nav",{"aria-label":"Console","data-slot":"tab-bar",className:"fixed inset-x-0 bottom-0 z-40 flex min-h-(--size-tabbar) border-t border-border bg-background pb-[env(safe-area-inset-bottom)] sm:hidden [body:has([data-hides-tab-bar])_&]:hidden",children:[(0,t.jsx)(q,{href:"/",label:"Fleet",icon:(0,t.jsx)(c.Ship,{"aria-hidden":!0}),isActive:"fleet"===e,testId:"tab-fleet"}),(0,t.jsx)(q,{href:"/fleet-health",label:"Health",icon:(0,t.jsx)(r.Activity,{"aria-hidden":!0}),isActive:"health"===e,testId:"tab-health",count:{value:s,tone:"attention",words:"stuck"}}),a&&(0,t.jsx)(q,{href:"/squadrons",label:"Squadrons",icon:(0,t.jsx)(l.Shapes,{"aria-hidden":!0}),isActive:"squadrons"===e,testId:"tab-squadrons"}),o&&(0,t.jsx)(q,{href:"/trierarchs",label:"Trierarchs",icon:(0,t.jsx)(h.ShipWheel,{"aria-hidden":!0}),isActive:"trierarchs"===e,testId:"tab-trierarchs",count:{value:d,tone:"attention",words:"silent"}}),(0,t.jsx)(q,{href:"/inbox",label:"Inbox",icon:(0,t.jsx)(i.Inbox,{"aria-hidden":!0}),isActive:"inbox"===e,testId:"tab-inbox",count:{value:n,tone:"primary",words:"open"}})]})}function N({nav:e,account:n,children:s}){return(0,t.jsxs)("div",{className:"flex min-h-dvh bg-background",children:[(0,t.jsx)(j,{active:e.active,inboxCount:e.inboxCount,stuckCount:e.stuckCount,needsCrewCount:e.needsCrewCount,hasSquadrons:e.hasSquadrons,hasTrierarchs:e.hasTrierarchs,trierarchsCount:e.trierarchsCount,hasNetwork:e.hasNetwork,hasSettings:e.hasSettings,...n}),(0,t.jsx)("div",{className:"flex min-w-0 grow flex-col",children:s}),(0,t.jsx)(S,{active:"overview"===e.active||"needs-crew"===e.active?"fleet":"settings"===e.active||"network"===e.active?void 0:e.active,hasSquadrons:e.hasSquadrons,hasTrierarchs:e.hasTrierarchs,trierarchsCount:e.trierarchsCount,inboxCount:e.inboxCount,stuckCount:e.stuckCount})]})}var A=e.i(17540),T=e.i(90262),I=e.i(43223),O=e.i(5387),R=e.i(86165),z=e.i(48695),P=e.i(84294);let B=(0,A.lazyDialog)(()=>e.A(85260).then(e=>e.CommandPalette),e=>e.isOpen);function M({isOpen:e,onOpenChange:r,onCompose:a}){let i=(0,n.useRouter)(),o=(0,O.useFleetSnapshot)(),d=(0,R.useHasSquadrons)(),u=(0,z.useSquadrons)(),l=(0,z.useCatalogue)(),c=(0,T.useAccess)();return(0,s.useEffect)(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&"k"===e.key.toLowerCase()&&(e.preventDefault(),r(!0))};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[r]),(0,t.jsx)(B,{isOpen:e,onOpenChange:r,items:(0,I.allowedPaletteItems)((0,I.paletteItemsOf)(o.data??[],d?{squadrons:u.data??[],blueprints:(0,P.blueprintChoices)(l.data??{blueprints:[]})}:void 0),c),onSelect:e=>{switch(e.kind){case"ship":case"page":case"squadron":case"squadron-action":case"blueprint":i.push(e.href);return;case"action":"compose"===e.id?a():"form-squadron"===e.id?i.push("/squadrons?form=new"):i.push("/?commission=new")}}})}var F=e.i(65041),H=e.i(54616),E=e.i(66027),L=e.i(12598),$=e.i(41880),K=e.i(32150),Q=e.i(27702);function D(e){return e.split(/[?#]/)[0]??e}function _(e){let t=new MutationObserver(e);return t.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["class","hidden","style"]}),window.addEventListener("resize",e),()=>{t.disconnect(),window.removeEventListener("resize",e)}}let G="(width < 40rem)";function U(e){let t=window.matchMedia(G);return t.addEventListener("change",e),()=>{t.removeEventListener("change",e)}}function W(){let e=(0,Q.useTRPC)(),t=(0,n.useRouter)(),s=(0,n.usePathname)(),r=(0,L.useQueryClient)(),a=(0,E.useQuery)(e.console.guide.queryOptions()),i=e.console.guide.queryKey(),o=(0,H.useMutation)(e.console.recordGuideProgress.mutationOptions({onMutate:e=>{r.setQueryData(i,t=>t?{...t,progress:e}:t)},onError:()=>{(0,$.showToast)({title:"Couldn’t keep your place in the tour",description:"The server did not answer. Try again.",tone:"error"})},onSettled:()=>r.invalidateQueries({queryKey:i})})),{track:d}=(0,K.useAnalytics)(),u=a.data?.steps??[],l=a.data?.progress.step??0,c=function(e){if(e?.progress.state!=="open")return;let t=e.steps[e.progress.step];return void 0===t?void 0:{step:t,index:e.progress.step,total:e.steps.length}}(a.data??void 0),h=e=>{o.mutate(e);let n=u[e.step];"open"===e.state&&void 0!==n&&D(n.path)!==s&&t.push(n.path)},p=e=>{h({step:e,state:"open"}),d({name:"tour_step_reached",step:e+1,total:u.length})};return{view:c,onBack:()=>{p(Math.max(l-1,0))},onNext:()=>{p(Math.min(l+1,u.length-1))},onSkip:()=>{h({step:l,state:"skipped"}),d({name:"tour_skipped",step:l+1})},onFinish:()=>{h({step:l,state:"finished"}),d({name:"tour_finished"})},onTakeTour:0===u.length?void 0:()=>{h({step:0,state:"open"})}}}var X=e.i(15905),Y=e.i(6734);function V({index:e,total:n,onBack:s,onNext:r,onSkip:a,onFinish:i,children:o}){let d=e===n-1;return(0,t.jsxs)("div",{className:"flex w-80 max-w-[calc(100vw-2rem)] flex-col gap-2 p-4",children:[(0,t.jsxs)("p",{className:"text-caption text-muted-foreground","data-testid":"tour-step-count",children:[e+1," of ",n]}),o,(0,t.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[d?null:(0,t.jsx)(X.Button,{size:"sm",variant:"ghost","data-testid":"tour-step-skip",onClick:a,children:"Skip"}),(0,t.jsx)("span",{className:"grow"}),0===e?null:(0,t.jsx)(X.Button,{size:"sm","data-testid":"tour-step-back",onClick:s,children:"Back"}),d?(0,t.jsx)(X.Button,{size:"sm",variant:"primary","data-testid":"tour-step-finish",onClick:i,children:"Finish"}):(0,t.jsx)(X.Button,{size:"sm",variant:"primary","data-testid":"tour-step-next",onClick:r,children:"Next"})]})]})}function J(e){let{title:n,text:s,anchor:r,side:a}=e;return null===r?(0,t.jsx)("div",{role:"dialog","aria-labelledby":"tour-step-title","aria-describedby":"tour-step-text","data-testid":"tour-step","data-placement":"centred",className:"fixed top-1/2 left-1/2 z-50 -translate-1/2 rounded-xl border border-border bg-popover text-popover-foreground shadow-lg",children:(0,t.jsxs)(V,{...e,children:[(0,t.jsx)("h2",{id:"tour-step-title",className:"text-body font-semibold text-foreground",children:n}),(0,t.jsx)("p",{id:"tour-step-text",className:"text-body text-muted-foreground",children:s})]})}):(0,t.jsx)(Y.Popover,{open:!0,modal:!1,children:(0,t.jsx)(Y.PopoverContent,{anchor:r,side:a,"data-testid":"tour-step","data-placement":"anchored",children:(0,t.jsxs)(V,{...e,children:[(0,t.jsx)(Y.PopoverTitle,{className:"text-body font-semibold text-foreground",children:n}),(0,t.jsx)(Y.PopoverDescription,{className:"text-body text-muted-foreground",children:s})]})})})}function Z(){var e;let r,a,{view:i,onBack:o,onNext:d,onSkip:u,onFinish:l}=W(),c=(e=i?.step,r=(0,n.usePathname)(),a=e?void 0!==e.anchor&&D(e.path)===r?`[data-testid="${e.anchor}"]`:void 0:void 0,(0,s.useSyncExternalStore)(_,()=>void 0===a?null:[...document.querySelectorAll(a)].find(e=>e.getClientRects().length>0)??null,()=>null));(0,s.useLayoutEffect)(()=>{c?.scrollIntoView({block:"center",inline:"nearest"})},[c]);let h=(0,s.useSyncExternalStore)(U,()=>window.matchMedia(G).matches?"top":"bottom",()=>"bottom");return(!function(e){let{track:t}=(0,K.useAnalytics)(),n=(0,s.useRef)(!1),r=void 0!==e,a=e?.index===0;(0,s.useEffect)(()=>{r&&!n.current&&a&&t({name:"tour_started"}),n.current=r},[r,a,t])}(i),i)?(0,t.jsx)(J,{title:i.step.title,text:i.step.text,index:i.index,total:i.total,anchor:c,side:h,onBack:o,onNext:d,onSkip:u,onFinish:l}):null}var ee=e.i(10818),et=e.i(63676);function en({notice:e,onDismiss:n,onSignOut:s}){return(0,t.jsxs)("div",{role:"status","data-testid":"notice","data-notice-id":e.id,className:"flex items-start gap-2 border-b border-border bg-muted px-8 py-2.5 max-sm:px-4",children:[(0,t.jsx)(ee.Info,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon) shrink-0 text-muted-foreground"}),(0,t.jsxs)("div",{className:"flex min-w-0 grow flex-wrap items-baseline gap-x-3 gap-y-1",children:[(0,t.jsx)("p",{className:"text-meta text-foreground",children:e.text}),e.links.map(e=>!0===e.isSignOut?(0,t.jsx)("button",{type:"button","data-testid":"notice-link",className:"text-meta font-medium text-foreground underline underline-offset-2",onClick:()=>s?.(e),children:e.label},e.label):(0,t.jsx)("a",{href:e.url,"data-testid":"notice-link",className:"text-meta font-medium text-foreground underline underline-offset-2",children:e.label},e.label))]}),e.isDismissible&&n?(0,t.jsx)(X.Button,{variant:"ghost",size:"xs",isIconOnly:!0,"aria-label":"Dismiss","data-testid":"notice-dismiss",onClick:n,children:(0,t.jsx)(et.X,{"aria-hidden":!0})}):null]})}var es=e.i(78485);function er(){let{notices:e,onDismiss:n,onSignOut:s}=function(){let e=(0,Q.useTRPC)(),t=(0,L.useQueryClient)(),n=(0,E.useQuery)(e.console.notices.queryOptions()),s=(0,H.useMutation)(e.console.dismissNotice.mutationOptions({onSuccess:()=>t.invalidateQueries({queryKey:e.console.notices.queryKey()}),onError:()=>{(0,$.showToast)({title:"Couldn’t dismiss the notice",description:"The server did not answer. Try again.",tone:"error"})}})),{signOut:r}=(0,es.useSignOut)();return{notices:n.data??[],onDismiss:e=>{s.mutate({noticeId:e})},onSignOut:e=>{r(e.url??"/sign-in",()=>{(0,$.showToast)({title:"Couldn’t sign out",description:"The server did not answer. You are still signed in.",tone:"error"})})}}}();return 0===e.length?null:(0,t.jsx)("div",{"data-testid":"notices",children:e.map(e=>(0,t.jsx)(en,{notice:e,onDismiss:()=>{n(e.id)},onSignOut:s},e.id))})}var ea=e.i(87600),ei=e.i(95014),eo=e.i(25242),ed=e.i(94070),eu=e.i(3979),el=e.i(87964),ec=e.i(86413),eh=e.i(90437),ep=e.i(96676);e.s(["SignedInLayout",0,function({children:e}){let r=function(e){let t=(0,Q.useTRPC)(),n=(0,L.useQueryClient)(),s=(0,E.useQuery)(t.console.account.queryOptions()),r=s.data?.session.accountId??null,a=(0,E.useQuery)({queryKey:["account-name",r],queryFn:()=>(0,ed.fetchConsoleRead)({read:"account-name"}),enabled:null!==r}),i=(0,ea.useHostedAccountUrl)(),{themes:o}=(0,eo.useConsoleConstants)(),d=W(),u=(0,eu.usePluginNav)(),l=(0,H.useMutation)(t.console.setTheme.mutationOptions({onMutate:({theme:e})=>{(0,ei.applyTheme)(e),n.setQueryData(t.console.account.queryKey(),t=>t?.kind!=="operator"?t:{...t,theme:e})},onError:()=>{(0,$.showToast)({title:"Couldn’t save the theme",description:"It applies here until the page reloads.",tone:"error"})}})),{signOut:c,isSigningOut:h}=(0,es.useSignOut)(),p=()=>{c("/sign-in",()=>{(0,$.showToast)({title:"Couldn’t sign out",description:"The server did not answer. You are still signed in.",tone:"error",action:{label:"Try again",onClick:p}})})};return{...u.hasSettings?{settingsHref:"/settings"}:{},...u.hasNetwork?{networkHref:"/network"}:{},account:s.data,..."string"==typeof a.data?{accountName:a.data}:{},themes:o,onThemeChange:e=>{l.mutate({theme:e})},onSignOut:p,isSigningOut:h,now:e,...void 0===i?{}:{accountUrl:i},...void 0===d.onTakeTour?{}:{onTakeTour:d.onTakeTour}}}((0,ep.useNow)()),a=(0,T.useAccess)(),i=(0,ec.useOpenInboxCount)(),o=(0,eh.useStuckCount)(),d=(0,eu.usePluginNav)(),u=(0,el.destinationOf)((0,n.usePathname)()),[l,c]=(0,s.useState)(!1),[h,p]=(0,s.useState)(!1),m=()=>{c(!0)};return(0,t.jsxs)(el.ConsoleFrameContext,{value:{account:r,onCompose:a.canSend?m:void 0,onSearch:()=>{p(!0)},banner:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(er,{}),(0,t.jsx)(Z,{})]})},children:[(0,t.jsx)(N,{nav:{active:u,inboxCount:i,stuckCount:o,...d},account:r,children:e}),(0,t.jsx)(F.ComposeMessage,{isOpen:l,onOpenChange:c}),(0,t.jsx)(M,{isOpen:h,onOpenChange:p,onCompose:m})]})}],36135)},43223,e=>{"use strict";var t=e.i(84294);let n={compose:"canSend",commission:"canManage","form-squadron":"canManage"};e.s(["allowedPaletteItems",0,function(e,t){return e.filter(e=>"action"===e.kind?t[n[e.id]]:"squadron-action"!==e.kind||t.canManage)},"paletteGroups",0,function(e,t){let n=t.trim().toLowerCase(),s=e.filter(e=>""===n?"squadron-action"!==e.kind:("ship"===e.kind?[e.name,e.type]:"squadron"===e.kind?[e.id,e.blueprint]:"squadron-action"===e.kind?[e.squadronId]:"blueprint"===e.kind?[e.name]:[e.label]).some(e=>e.toLowerCase().includes(n))),r=s.filter(e=>"ship"===e.kind);return[{key:"actions",label:"Actions",items:s.filter(e=>"action"===e.kind||"squadron-action"===e.kind)},{key:"ships",label:"Ships",items:""===n?r.slice(0,8):r},{key:"squadrons",label:"Squadrons",items:s.filter(e=>"squadron"===e.kind)},{key:"blueprints",label:"Blueprints",items:s.filter(e=>"blueprint"===e.kind)},{key:"pages",label:"Go to",items:s.filter(e=>"page"===e.kind)}].filter(e=>e.items.length>0)},"paletteItemsOf",0,function(e,n){return[{kind:"action",id:"commission",label:"Commission ship"},...n?[{kind:"action",id:"form-squadron",label:"Form squadron"}]:[],{kind:"action",id:"compose",label:"Compose a message"},...e.filter(e=>"agent"===e.kind&&"retired"!==e.status).map(e=>({kind:"ship",id:e.id,name:e.name,type:e.type,status:e.status,href:`/ships/${e.id}`})),...(n?.squadrons??[]).filter(e=>"disbanded"!==e.state).map(e=>({kind:"squadron",id:e.id,blueprint:e.blueprint.name,state:e.state,href:`/squadrons/${e.id}`})),...(n?.squadrons??[]).filter(e=>"sailing"===e.state).flatMap(e=>[{kind:"squadron-action",id:`add-member:${e.id}`,squadronId:e.id,action:"add-member",label:`Add member to ${e.id}…`,href:`/squadrons/${e.id}?action=add-member`},{kind:"squadron-action",id:`stand-down:${e.id}`,squadronId:e.id,action:"stand-down",label:`Stand down ${e.id}…`,href:`/squadrons/${e.id}?action=stand-down`}]),...(n?.blueprints??[]).map(e=>({kind:"blueprint",id:e.key,name:e.name,version:e.versions[0]?.version??0,href:(0,t.blueprintPath)(e)})),{kind:"page",id:"overview",label:"Fleet overview",href:"/"},...n?[{kind:"page",id:"squadrons",label:"Squadrons",href:"/squadrons"}]:[],{kind:"page",id:"inbox",label:"Operator inbox",href:"/inbox"},{kind:"page",id:"health",label:"Health",href:"/fleet-health"}]},"paletteKeyOf",0,function(e){return`${e.kind}:${e.id}`}])},85260,e=>{e.v(t=>Promise.all(["static/chunks/2rl754q2x339f.js"].map(t=>e.l(t))).then(()=>t(31432)))},81489,e=>{e.v(t=>Promise.all(["static/chunks/2-ncr8s35g33z.js","static/chunks/3gw93hpgh57gl.js","static/chunks/24bvw3_s7h3f3.js"].map(t=>e.l(t))).then(()=>t(72268)))},54492,e=>{"use strict";e.s(["crewRequestAction",0,function(e){switch(e.kind){case"none":return;case"needsCrew":return"remove";case"crewedByHand":return"release";case"assigned":return"releasing"===e.status?void 0:"release"}},"crewRequestStage",0,function(e){let t=e.crewRequest;return null===t?{kind:"none"}:null!==t.assignedTo?{kind:"assigned",requestedAt:t.requestedAt,trierarch:t.assignedTo,status:t.status??"crewing",attempt:t.attempt,startedAt:t.startedAt}:null!==t.crewedBy?{kind:"crewedByHand",requestedAt:t.requestedAt,crewedBy:t.crewedBy,since:e.crewedSince??null}:{kind:"needsCrew",requestedAt:t.requestedAt,reason:t.reason}},"isRestartable",0,function(e){return"assigned"===e.kind&&"crashed"===e.status},"releaseSteps",0,function(e){return"crewedByHand"===e.kind?["removeCrewRequest","release"]:["removeCrewRequest"]},"requestedBy",0,function(e){return e.find(e=>"CrewRequested"===e.type)?.actor??null},"restartWords",0,function({status:e,attempt:t}){let n=`${String(t)} ${1===t?"restart":"restarts"}`;switch(e){case"restarting":return`attempt ${String(t)}`;case"crashed":return n;case"running":return 0===t?void 0:n;case"crewing":case"releasing":return}},"statusChangedAt",0,function(e){return e.find(e=>"CrewStatusChanged"===e.type)?.occurredAt}])},90437,e=>{"use strict";var t=e.i(66027),n=e.i(27702);function s(){let e=(0,n.useTRPC)();return(0,t.useQuery)(e.fleet.health.queryOptions(void 0,{refetchInterval:6e4}))}function r(e){return e?.stuck.reduce((e,t)=>e+t.count,0)}e.s(["stuckCountOf",0,r,"useFleetHealth",0,s,"useStuckCount",0,function(){return r(s().data)}])},50980,e=>{"use strict";var t=e.i(54616),n=e.i(12598),s=e.i(76580),r=e.i(94070),a=e.i(95187);let i=(0,a.createServerReference)("003af875d912598fbcf897cfcdf46e3abd294a8895",a.callServer,void 0,a.findSourceMapURL,"connectGateway");var o=e.i(2660);let d=["gateway","connection"];function u(){return(0,s.useConsoleRead)({queryKey:d,queryFn:()=>(0,r.fetchConsoleRead)({read:"gateway-connection"})})}e.s(["useConnectGateway",0,function(){let e=(0,n.useQueryClient)();return(0,t.useMutation)({mutationFn:async()=>(0,o.dataOf)(await i()),onSuccess:t=>{e.setQueryData(d,t)}})},"useGatewaySettings",0,u,"useHasGateway",0,function(){let e=u();return void 0!==e.data&&"none"!==e.data.state}],50980)},96676,e=>{"use strict";let t;var n=e.i(71645);let s=Date.now(),r=new Set;function a(e){return r.add(e),t??=setInterval(()=>{for(let e of(s=Date.now(),r))e()},1e4),()=>{r.delete(e),0===r.size&&(clearInterval(t),t=void 0)}}function i(){return s}e.s(["useNow",0,function(){return new Date((0,n.useSyncExternalStore)(a,i,i))}])},3979,49841,e=>{"use strict";var t=e.i(90262),n=e.i(5387),s=e.i(50980),r=e.i(54492);function a(e,t){return e.filter(e=>(function(e,t){if("retired"===e.status)return!1;let n=(0,r.crewRequestStage)(e);return t.hasTrierarchs?"needsCrew"===n.kind||"assigned"===n.kind&&"running"!==n.status&&"releasing"!==n.status:"needsCrew"===n.kind&&"awaitingCrew"===e.status})(e,t)).toSorted((e,t)=>(e.crewRequest?.requestedAt??"").localeCompare(t.crewRequest?.requestedAt??""))}let i={crewing:{tone:"active",word:"Crewing"},running:{tone:"ok",word:"Running"},restarting:{tone:"waiting",word:"Restarting"},crashed:{tone:"attention",word:"Crashed"},releasing:{tone:"active",word:"Releasing"}};e.s(["crewRequestKey",0,function(e){return"assigned"===e.kind?e.status:e.kind},"crewRequestKeyWord",0,function(e){return"none"===e?"No request":"needsCrew"===e?"Needs crew":"crewedByHand"===e?"Crewed by hand":i[e].word},"crewRequestKeysOf",0,function(e){return["none","needsCrew","crewedByHand",...e]},"handCrewOf",0,function(e){return null===e.startingPrompt?{kind:"no-prompt"}:e.startingPrompt.isClaimed?{kind:"crew-ended",endedAt:e.awaitingCrewSince}:{kind:"prompt-unclaimed",issuedAt:e.startingPrompt.issuedAt}},"needsCrew",0,a],49841);var o=e.i(86165),d=e.i(14695),u=e.i(265);e.s(["usePluginNav",0,function(){let e=(0,t.useAccess)(),r=(0,o.useHasSquadrons)(),i=(0,u.useHasTrierarchPlugin)(),l=(0,s.useHasGateway)(),c=(0,u.useMachines)(),h=(0,n.useFleetSnapshot)();return{...void 0===h.data?{}:{needsCrewCount:a(h.data,{hasTrierarchs:i}).length},hasSquadrons:r,hasTrierarchs:i,...void 0===c.data?{}:{trierarchsCount:(0,d.silentCount)(c.data)},hasNetwork:e.canEditNetwork,hasSettings:e.canManage&&(r||i||l)}}],3979)}]);
|
package/.next/standalone/packages/console/.next/static/chunks/{0yca02wd039-o.js → 3ew37_k6shef6.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,13082,e=>{"use strict";var t=e.i(71645),n=e.i(74735),o=e.i(28744),r=e.i(65420),i=e.i(8868),s=e.i(39957),a=e.i(29315),u=e.i(51321),l=e.i(84446),d=e.i(96296),c=e.i(75606),p=e.i(56434);let f=o.platform.os.mac&&o.platform.engine.webkit;e.s(["useFocus",0,function(e,o={}){let{enabled:g=!0,delay:m}=o,v="rootStore"in e?e.rootStore:e,{events:h,dataRef:x}=v.context,b=t.useRef(!1),S=t.useRef(null),y=t.useRef(!0),R=(0,s.useTimeout)();t.useEffect(()=>{let e=v.select("domReferenceElement");if(!g)return;let t=(0,a.getWindow)(e);return(0,r.mergeCleanups)((0,n.addEventListener)(t,"blur",function(){let e=v.select("domReferenceElement");!v.select("open")&&(0,a.isHTMLElement)(e)&&e===(0,l.activeElement)((0,i.ownerDocument)(e))&&(b.current=!0,S.current=e)}),f&&(0,n.addEventListener)(t,"keydown",function(){y.current=!0},!0),f&&(0,n.addEventListener)(t,"pointerdown",function(){y.current=!1},!0))},[v,g]),t.useEffect(()=>{if(g)return h.on("openchange",e),()=>{h.off("openchange",e)};function e(e){if(e.reason===p.REASONS.triggerPress||e.reason===p.REASONS.escapeKey){let e=v.select("domReferenceElement");(0,a.isElement)(e)&&(S.current=e,b.current=!0)}}},[h,g,v]);let E=t.useMemo(()=>{function e(){b.current=!1,S.current=null}return{onMouseLeave(){e()},onFocus(t){let n=t.currentTarget;if(b.current){if(S.current===n)return;e()}let o=(0,l.getTarget)(t.nativeEvent);if((0,a.isElement)(o)){if(f&&!t.relatedTarget){if(!y.current&&!(0,d.isTypeableElement)(o))return}else if(!(0,d.matchesFocusVisible)(o))return}let r=(0,d.isTargetInsideEnabledTrigger)(t.relatedTarget,v.context.triggerElements),{nativeEvent:i,currentTarget:s}=t,u="function"==typeof m?m():m;v.select("open")&&r||0===u||void 0===u?v.setOpen(!0,(0,c.createChangeEventDetails)(p.REASONS.triggerFocus,i,s)):R.start(u,()=>{b.current||v.setOpen(!0,(0,c.createChangeEventDetails)(p.REASONS.triggerFocus,i,s))})},onBlur(t){e();let n=t.relatedTarget,o=t.nativeEvent,r=(0,a.isElement)(n)&&n.hasAttribute((0,u.createAttribute)("focus-guard"))&&"outside"===n.getAttribute("data-type");R.start(0,()=>{let e=v.select("domReferenceElement"),t=(0,l.activeElement)((0,i.ownerDocument)(e));if(!n&&t===e||(0,l.contains)(x.current.floatingContext?.refs.floating.current,t)||(0,l.contains)(e,t)||r)return;let s=n??t;(0,d.isTargetInsideEnabledTrigger)(s,v.context.triggerElements)||v.setOpen(!1,(0,c.createChangeEventDetails)(p.REASONS.triggerFocus,o))})}}},[x,m,v,R]);return t.useMemo(()=>g?{reference:E,trigger:E}:{},[g,E])}])},61027,3414,78921,82370,89554,66506,85996,71714,81194,1545,91384,58307,64270,19712,82264,62050,82593,5953,7447,36481,74671,63947,77450,e=>{"use strict";e.s([],61027);var t=e.i(71645),n=e.i(33332);let o=t.createContext(void 0);function r(e){let r=t.useContext(o);if(void 0===r&&!e)throw Error((0,n.default)(33));return r}e.s(["MenuPositionerContext",0,o,"useMenuPositionerContext",0,r],3414);let i=t.createContext(void 0);function s(e){let o=t.useContext(i);if(void 0===o&&!e)throw Error((0,n.default)(36));return o}e.s(["MenuRootContext",0,i,"useMenuRootContext",0,s],78921);var a=e.i(52245),u=e.i(79938);let l=t.forwardRef(function(e,t){let{render:n,className:o,style:i,...l}=e,{store:d}=s(),{arrowRef:c,side:p,align:f,arrowUncentered:g,arrowStyles:m}=r(),v=d.useState("open");return(0,a.useRenderElement)("div",e,{ref:[c,t],stateAttributesMapping:u.popupStateMapping,state:{open:v,side:p,align:f,uncentered:g},props:{style:m,"aria-hidden":!0,...l}})});e.s(["MenuArrow",0,l],82370);let d=t.createContext(void 0);function c(e=!0){let o=t.useContext(d);if(void 0===o&&!e)throw Error((0,n.default)(25));return o}var p=e.i(56434);let f=t.forwardRef(function(e,t){let{render:n,className:o,style:r,...i}=e,{store:l}=s(),d=l.useState("open"),f=l.useState("mounted"),g=l.useState("transitionStatus"),m=l.useState("lastOpenChangeReason"),v=c();return(0,a.useRenderElement)("div",e,{ref:v?.backdropRef?[t,v.backdropRef]:t,state:{open:d,transitionStatus:g},stateAttributesMapping:u.popupTransitionStateMapping,props:[{role:"presentation",hidden:!f,style:{pointerEvents:m===p.REASONS.triggerHover?"none":void 0,userSelect:"none",WebkitUserSelect:"none"}},i]})});e.s(["MenuBackdrop",0,f],89554);var g=e.i(51437),m=e.i(56789);let v=t.createContext(void 0);var h=e.i(28918),x=e.i(40886),b=e.i(76782),S=e.i(28744),y=e.i(64350);function R(e){let{closeOnClick:n,highlighted:o,id:r,nodeId:i,store:s,typingRef:a,itemRef:u,itemMetadata:l}=e,{events:d}=s.useState("floatingTreeRoot"),f=s.useState("open"),g=c(!0),m=void 0!==g;return t.useMemo(()=>({id:r,role:"menuitem",tabIndex:f&&o?0:-1,onKeyDown(e){" "===e.key&&a?.current&&e.preventDefault()},onMouseMove(e){i&&d.emit("itemhover",{nodeId:i,target:e.currentTarget})},onClick(e){n&&d.emit("close",{domEvent:e,reason:p.REASONS.itemPress})},onMouseUp(e){if(g){let t=g.initialCursorPointRef.current;if(g.initialCursorPointRef.current=null,m&&t&&1>=Math.abs(e.clientX-t.x)&&1>=Math.abs(e.clientY-t.y)||m&&!S.platform.os.mac&&2===e.button)return}u.current&&s.context.allowMouseUpTriggerRef.current&&(!m||2===e.button)&&"regular-item"===l.type&&(0,y.dispatchClickWithModifiers)(u.current,e,{detail:1})}}),[n,o,r,d,i,f,s,a,u,g,m,l])}let E={type:"regular-item"};function M(e){let{closeOnClick:n,disabled:o,highlighted:r,id:i,store:s,typingRef:a=s.context.typingRef,nativeButton:u,itemMetadata:l,nodeId:d}=e,c=t.useRef(null),{getButtonProps:p,buttonRef:f}=(0,x.useButton)({disabled:o,focusableWhenDisabled:!0,native:u,composite:!0}),g=R({closeOnClick:n,highlighted:r,id:i,nodeId:d,store:s,typingRef:a,itemRef:c,itemMetadata:l}),m=t.useCallback(e=>(0,b.mergeProps)(g,{onMouseEnter(){"submenu-trigger"===l.type&&l.setActive()}},e,p),[g,p,l]),v=(0,h.useMergedRefs)(c,f);return t.useMemo(()=>({getItemProps:m,itemRef:v}),[m,v])}e.s(["REGULAR_ITEM",0,E,"useMenuItem",0,M],66506);var C=e.i(73553),I=e.i(88015);let w={checked:e=>e?{"data-checked":""}:{"data-unchecked":""},...e.i(74354).transitionStatusMapping};var k=e.i(75606),O=e.i(43476);let T=t.forwardRef(function(e,n){let{render:o,className:i,id:u,label:l,nativeButton:d=!1,disabled:c=!1,closeOnClick:f=!1,checked:h,defaultChecked:x,onCheckedChange:b,style:S,...y}=e,R=(0,C.useCompositeListItem)({guess:!0,label:l}),T=r(!0),P=(0,I.useBaseUiId)(u),{store:N}=s(),j=N.useState("disabled"),A=c||j,D=N.useState("isActive",R.index),L=N.useState("itemProps"),[z,F]=(0,g.useControlled)({controlled:h,default:x??!1,name:"MenuCheckboxItem",state:"checked"}),{getItemProps:_,itemRef:U}=M({closeOnClick:f,disabled:A,highlighted:D,id:P,store:N,nativeButton:d,nodeId:T?.context.nodeId,itemMetadata:E}),H=t.useMemo(()=>({disabled:A,highlighted:D,checked:z}),[A,D,z]),B=(0,a.useRenderElement)("div",e,{state:H,stateAttributesMapping:w,props:[L,{role:"menuitemcheckbox","aria-checked":z,onClick:function(e){let t=(0,k.createChangeEventDetails)(p.REASONS.itemPress,e.nativeEvent,void 0,{preventUnmountOnClose:m.NOOP});b?.(!z,t),t.isCanceled||F(e=>!e)}},y,_],ref:[U,n,R.ref]});return(0,O.jsx)(v.Provider,{value:H,children:B})});e.s(["MenuCheckboxItem",0,T],85996);var P=e.i(23910),N=e.i(37584);let j=t.forwardRef(function(e,o){let{render:r,className:i,style:s,keepMounted:u=!1,...l}=e,d=function(){let e=t.useContext(v);if(void 0===e)throw Error((0,n.default)(30));return e}(),c=t.useRef(null),{transitionStatus:p,mounted:f,setMounted:g}=(0,P.useTransitionStatus)(d.checked);(0,N.useOpenChangeComplete)({batch:!0,enabled:!d.checked,open:d.checked,ref:c,onComplete(){d.checked||g(!1)}});let m={checked:d.checked,disabled:d.disabled,highlighted:d.highlighted,transitionStatus:p};return(0,a.useRenderElement)("span",e,{state:m,ref:[o,c],stateAttributesMapping:w,props:{"aria-hidden":!0,...l},enabled:u||f})});e.s(["MenuCheckboxItemIndicator",0,j],71714);let A=t.createContext(void 0),D=t.forwardRef(function(e,n){let{render:o,className:r,style:i,...s}=e,[u,l]=t.useState(void 0),d=(0,a.useRenderElement)("div",e,{ref:n,props:{role:"group","aria-labelledby":u,...s}});return(0,O.jsx)(A.Provider,{value:l,children:d})});e.s(["MenuGroup",0,D],81194);var L=e.i(46376);let z=t.forwardRef(function(e,o){let{render:r,className:i,style:s,id:u,...l}=e,d=(0,I.useBaseUiId)(u),c=function(){let e=t.useContext(A);if(void 0===e)throw Error((0,n.default)(31));return e}();return(0,L.useIsoLayoutEffect)(()=>(c(d),()=>{c(e=>e===d?void 0:e)}),[c,d]),(0,a.useRenderElement)("div",e,{ref:o,props:{id:d,"aria-hidden":!0,...l}})});e.s(["MenuGroupLabel",0,z],1545);let F=t.forwardRef(function(e,t){let{render:n,className:o,id:i,label:u,nativeButton:l=!1,disabled:d=!1,closeOnClick:c=!0,style:p,...f}=e,g=(0,C.useCompositeListItem)({guess:!0,label:u}),m=r(!0),v=(0,I.useBaseUiId)(i),{store:h}=s(),x=h.useState("disabled"),b=d||x,S=h.useState("isActive",g.index),y=h.useState("itemProps"),{getItemProps:R,itemRef:w}=M({closeOnClick:c,disabled:b,highlighted:S,id:v,store:h,nativeButton:l,nodeId:m?.context.nodeId,itemMetadata:E});return(0,a.useRenderElement)("div",e,{state:{disabled:b,highlighted:S},props:[y,f,R],ref:[w,t,g.ref]})});e.s(["MenuItem",0,F],91384);let _=t.forwardRef(function(e,n){let{render:o,className:i,id:u,label:l,closeOnClick:d=!1,style:c,...p}=e,f=t.useRef(null),g=(0,C.useCompositeListItem)({guess:!0,label:l}),m=r(!0),v=m?.context.nodeId,h=(0,I.useBaseUiId)(u),{store:S}=s(),y=S.useState("isActive",g.index),M=S.useState("itemProps"),w=S.context.typingRef,{getButtonProps:k,buttonRef:O}=(0,x.useButton)({native:!1,composite:!0}),T=R({closeOnClick:d,highlighted:y,id:h,nodeId:v,store:S,typingRef:w,itemRef:f,itemMetadata:E});return(0,a.useRenderElement)("a",e,{state:{highlighted:y},props:[M,p,function(e){return(0,b.mergeProps)(T,e,k)}],ref:[f,O,n,g.ref]})});e.s(["MenuLinkItem",0,_],58307);var U=e.i(61487),H=e.i(31157),B=e.i(96533),G=e.i(73327),K=e.i(53984);let Y=t.forwardRef(function(e,n){let{render:o,className:i,style:l,finalFocus:d,...c}=e,{store:f}=s(),{side:g,align:m}=r(),v=null!=(0,B.useToolbarRootContext)(!0),h=f.useState("open"),x=f.useState("transitionStatus"),b=f.useState("popupProps"),S=f.useState("mounted"),y=f.useState("instantType"),R=f.useState("activeTriggerElement"),E=f.useState("parent"),M=f.useState("lastOpenChangeReason"),C=f.useState("rootId"),I=f.useState("floatingRootContext"),w=f.useState("floatingTreeRoot"),T=f.useState("closeDelay"),P=f.useState("hoverEnabled"),j=f.useState("disabled"),A=f.useState("openMethod"),D="context-menu"===E.type;(0,N.useOpenChangeComplete)({open:h,ref:f.context.popupRef,onComplete(){h&&f.context.onOpenChangeComplete?.(!0)}}),t.useEffect(()=>{function e(e){f.setOpen(!1,(0,k.createChangeEventDetails)(e.reason,e.domEvent))}return w.events.on("close",e),()=>{w.events.off("close",e)}},[w.events,f]),(0,H.useHoverFloatingInteraction)(I,{enabled:P&&!j&&!D&&"menubar"!==E.type,closeDelay:T});let L=f.useStateSetter("popupElement"),z={transitionStatus:x,side:g,align:m,open:h,nested:"menu"===E.type,instant:y},F=(0,a.useRenderElement)("div",e,{state:z,ref:[n,f.context.popupRef,L],stateAttributesMapping:u.popupTransitionStateMapping,props:[b,{onKeyDown(e){v&&G.COMPOSITE_KEYS.has(e.key)&&e.stopPropagation()}},(0,K.getDisabledMountTransitionStyles)(x),c,{"data-rootownerid":C}]}),_=void 0===E.type||D;return(R||"menubar"===E.type&&M!==p.REASONS.outsidePress)&&(_=!0),(0,O.jsx)(U.FloatingFocusManager,{context:I,openInteractionType:A,modal:D,disabled:!S,returnFocus:void 0===d?_:d,initialFocus:"menu"!==E.type,restoreFocus:!0,externalTree:"menubar"!==E.type?w:void 0,previousFocusableElement:R,nextFocusableElement:void 0===E.type?f.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:void 0===E.type?f.context.beforeContentFocusGuardRef:void 0,children:F})});e.s(["MenuPopup",0,Y],64270);var V=e.i(26674);let $=t.createContext(void 0),W=t.forwardRef(function(e,t){let{keepMounted:n=!1,...o}=e,{store:r,parent:i}=s();if(!(r.useState("mounted")||n))return null;let a="menu"===i.type||"menubar"===i.type?"group":void 0;return(0,O.jsx)($.Provider,{value:n,children:(0,O.jsx)(V.FloatingPortal,{ref:t,...o,portalOwnerRole:a})})});e.s(["MenuPortal",0,W],19712);var q=e.i(44394),J=e.i(39957),Q=e.i(46420),X=e.i(23706),Z=e.i(53687),ee=e.i(426),et=e.i(38396),en=e.i(22640),eo=e.i(89579),er=e.i(33383);let ei=t.forwardRef(function(e,r){let{anchor:i,positionMethod:a="absolute",className:u,render:l,side:d,align:f,sideOffset:g=0,alignOffset:m=0,collisionBoundary:v="clipping-ancestors",collisionPadding:h=5,arrowPadding:x=5,sticky:b=!1,disableAnchorTracking:S=!1,collisionAvoidance:y=et.DROPDOWN_COLLISION_AVOIDANCE,style:R,...E}=e,{store:M}=s(),C=function(){let e=t.useContext($);if(void 0===e)throw Error((0,n.default)(32));return e}(),I=c(!0),w=M.useState("parent"),T=M.useState("floatingRootContext"),P=M.useState("floatingTreeRoot"),N=M.useState("mounted"),j=M.useState("open"),A=M.useState("modal"),D=M.useState("openMethod"),z=M.useState("activeTriggerElement"),F=M.useState("transitionStatus"),_=M.useState("positionerElement"),U=M.useState("instantType"),H=M.useState("adaptiveOrigin"),B=M.useState("lastOpenChangeReason"),G=M.useState("floatingNodeId"),K=M.useState("floatingParentNodeId"),Y=T.useState("domReferenceElement"),V=t.useRef(null),W=(0,en.useAnimationsFinished)(_),ei=i,es=g,ea=m,eu=f,el=y;"context-menu"===w.type&&(ei=i??w.context?.anchor,eu=eu??"start",d||"center"===eu||(ea=e.alignOffset??2,es=e.sideOffset??-5));let ed=d,ec=eu;"menu"===w.type?(ed=ed??"inline-end",ec=ec??"start",el=e.collisionAvoidance??et.POPUP_COLLISION_AVOIDANCE):"menubar"===w.type&&(ed=ed??("vertical"===w.context.orientation?"inline-end":"bottom"),ec=ec??"start");let ep="context-menu"===w.type,ef=(0,X.useAnchorPositioning)({anchor:ei,floatingRootContext:T,positionMethod:I?"fixed":a,mounted:N,side:ed,sideOffset:es,align:ec,alignOffset:ea,arrowPadding:ep?0:x,collisionBoundary:v,collisionPadding:h,sticky:b,nodeId:G,keepMounted:C,disableAnchorTracking:S,collisionAvoidance:el,shift:ep?{crossAxis:!("side"in el&&"flip"===el.side),rootBoundary:"layoutViewport"}:void 0,externalTree:P,adaptiveOrigin:H});t.useEffect(()=>{function e(e){e.open&&(e.parentNodeId===G&&M.set("hoverEnabled",!1),e.nodeId!==G&&e.parentNodeId===M.select("floatingParentNodeId")&&M.setOpen(!1,(0,k.createChangeEventDetails)(p.REASONS.siblingOpen)))}return P.events.on("menuopenchange",e),()=>{P.events.off("menuopenchange",e)}},[M,P.events,G]),t.useEffect(()=>{if(null!=M.select("floatingParentNodeId"))return P.events.on("menuopenchange",e),()=>{P.events.off("menuopenchange",e)};function e(e){if(e.open||e.nodeId!==M.select("floatingParentNodeId"))return;let t=e.reason??p.REASONS.siblingOpen;M.setOpen(!1,(0,k.createChangeEventDetails)(t))}},[P.events,M]);let eg=(0,J.useTimeout)();t.useEffect(()=>{j||eg.clear()},[j,eg]),t.useEffect(()=>{function e(e){if(j&&e.nodeId===M.select("floatingParentNodeId"))if(e.target&&z&&z!==e.target){let e=M.select("closeDelay");e>0?eg.isStarted()||eg.start(e,()=>{M.setOpen(!1,(0,k.createChangeEventDetails)(p.REASONS.siblingOpen))}):M.setOpen(!1,(0,k.createChangeEventDetails)(p.REASONS.siblingOpen))}else eg.clear()}return P.events.on("itemhover",e),()=>{P.events.off("itemhover",e)}},[P.events,j,z,M,eg]),t.useEffect(()=>{let e={open:j,nodeId:G,parentNodeId:K,reason:M.select("lastOpenChangeReason")};P.events.emit("menuopenchange",e)},[P.events,j,M,G,K]),(0,L.useIsoLayoutEffect)(()=>{let e=V.current;if(Y&&(V.current=Y),e&&Y&&Y!==e){M.set("instantType",void 0);let e=new AbortController;return W(()=>{M.set("instantType","trigger-change")},e.signal),()=>{e.abort()}}},[Y,W,M]);let em={open:j,side:ef.side,align:ef.align,anchorHidden:ef.anchorHidden,nested:"menu"===w.type,instant:U},ev="menubar"===w.type&&w.context.modal,eh=A&&B!==p.REASONS.triggerHover;(0,er.useAnchoredPopupScrollLock)(j&&(ev||eh),"touch"===D,_,z);let ex=(0,eo.usePositioner)(e,em,{styles:ef.positionerStyles,transitionStatus:F,props:E,refs:[r,M.useStateSetter("positionerElement")],hidden:!N,inert:!j}),eb=N&&"menu"!==w.type&&("menubar"!==w.type&&A&&B!==p.REASONS.triggerHover||"menubar"===w.type&&w.context.modal),eS=null;return"menubar"===w.type?eS=w.context.contentElement:void 0===w.type&&(eS=z),(0,O.jsxs)(o.Provider,{value:ef,children:[eb&&(0,O.jsx)(ee.InternalBackdrop,{ref:"context-menu"===w.type||"nested-context-menu"===w.type?w.context.internalBackdropRef:null,inert:(0,q.inertValue)(!j),cutout:eS}),(0,O.jsx)(Q.FloatingNode,{id:G,children:(0,O.jsx)(Z.CompositeList,{elementsRef:M.context.itemDomElements,labelsRef:M.context.itemLabels,children:ex})})]})});e.s(["MenuPositioner",0,ei],82264);var es=e.i(67865);let ea=t.createContext(void 0),eu=t.memo(t.forwardRef(function(e,n){let{render:o,className:r,value:i,defaultValue:s,onValueChange:u,disabled:l=!1,style:d,"aria-labelledby":c,...p}=e,[f,m]=t.useState(void 0),[v,h]=(0,g.useControlled)({controlled:i,default:s,name:"MenuRadioGroup"}),x=(0,es.useStableCallback)((e,t)=>{u?.(e,t),t.isCanceled||h(e)}),b=(0,a.useRenderElement)("div",e,{state:{disabled:l},ref:n,props:{role:"group","aria-labelledby":c??f,"aria-disabled":l||void 0,...p}}),S=t.useMemo(()=>({value:v,setValue:x,disabled:l}),[v,x,l]);return(0,O.jsx)(A.Provider,{value:m,children:(0,O.jsx)(ea.Provider,{value:S,children:b})})}));e.s(["MenuRadioGroup",0,eu],62050);let el=t.createContext(void 0),ed=t.forwardRef(function(e,o){let{render:i,className:u,id:l,label:d,nativeButton:c=!1,disabled:f=!1,closeOnClick:g=!1,value:v,style:h,...x}=e,b=(0,C.useCompositeListItem)({guess:!0,label:d}),S=r(!0),y=(0,I.useBaseUiId)(l),{store:R}=s(),T=R.useState("isActive",b.index),P=R.useState("itemProps"),{value:N,setValue:j,disabled:A}=function(){let e=t.useContext(ea);if(void 0===e)throw Error((0,n.default)(34));return e}(),D=R.useState("disabled"),L=f||A||D,z=N===v,{getItemProps:F,itemRef:_}=M({closeOnClick:g,disabled:L,highlighted:T,id:y,store:R,nativeButton:c,nodeId:S?.context.nodeId,itemMetadata:E}),U=t.useMemo(()=>({disabled:L,highlighted:T,checked:z}),[L,T,z]),H=(0,a.useRenderElement)("div",e,{state:U,stateAttributesMapping:w,props:[P,{role:"menuitemradio","aria-checked":z,onClick:function(e){j(v,(0,k.createChangeEventDetails)(p.REASONS.itemPress,e.nativeEvent,void 0,{preventUnmountOnClose:m.NOOP}))}},x,F],ref:[_,o,b.ref]});return(0,O.jsx)(el.Provider,{value:U,children:H})});e.s(["MenuRadioItem",0,ed],82593);let ec=t.forwardRef(function(e,o){let{render:r,className:i,style:s,keepMounted:u=!1,...l}=e,d=function(){let e=t.useContext(el);if(void 0===e)throw Error((0,n.default)(35));return e}(),c=t.useRef(null),{transitionStatus:p,mounted:f,setMounted:g}=(0,P.useTransitionStatus)(d.checked);(0,N.useOpenChangeComplete)({batch:!0,enabled:!d.checked,open:d.checked,ref:c,onComplete(){d.checked||g(!1)}});let m={checked:d.checked,disabled:d.disabled,highlighted:d.highlighted,transitionStatus:p};return(0,a.useRenderElement)("span",e,{state:m,stateAttributesMapping:w,ref:[o,c],props:{"aria-hidden":!0,...l},enabled:u||f})});e.s(["MenuRadioItemIndicator",0,ec],5953);var ep=e.i(83977),ef=e.i(88940),eg=e.i(96499),em=e.i(17989),ev=e.i(60891),eh=e.i(5049),ex=e.i(50527);let eb=t.createContext(null);function eS(e){let o=t.useContext(eb);if(null===o&&!e)throw Error((0,n.default)(5));return o}e.s(["useMenubarContext",0,eS],7447);var ey=e.i(72855),eR=e.i(32199),eE=e.i(26352),eM=e.i(79248),eC=e.i(18478),eI=e.i(16786),ew=e.i(90627);let ek={...eI.popupStoreSelectors,disabled:e=>"menubar"===e.parent.type&&e.parent.context.disabled||e.disabled,modal:e=>(void 0===e.parent.type||"context-menu"===e.parent.type)&&(e.modal??!0),openMethod:e=>e.openMethod,allowMouseEnter:e=>e.allowMouseEnter,highlightItemOnHover:e=>e.highlightItemOnHover,parent:e=>e.parent,rootId:e=>"menu"===e.parent.type?e.parent.store.select("rootId"):void 0!==e.parent.type?e.parent.context.rootId:e.rootId,activeIndex:e=>e.activeIndex,isActive:(e,t)=>e.activeIndex===t,hoverEnabled:e=>e.hoverEnabled,instantType:e=>e.instantType,lastOpenChangeReason:e=>e.openChangeReason,floatingTreeRoot:e=>"menu"===e.parent.type?e.parent.store.select("floatingTreeRoot"):e.floatingTreeRoot,floatingNodeId:e=>e.floatingNodeId,floatingParentNodeId:e=>e.floatingParentNodeId,itemProps:e=>e.itemProps,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin,keyboardEventRelay:e=>e.keyboardEventRelay?e.keyboardEventRelay:"menu"===e.parent.type?e.parent.store.select("keyboardEventRelay"):void 0};class eO extends eE.ReactStore{constructor(e,t,n=!1){const o=new ew.PopupTriggerMap;super(eP(o,t,n,e),eT(o),ek),this.unsubscribeParentListener=this.observe("parent",e=>{if(this.unsubscribeParentListener?.(),"menu"===e.type){let t=e.store.select("rootId"),n=e.store.select("floatingTreeRoot"),o=e.store.select("keyboardEventRelay");this.unsubscribeParentListener=e.store.subscribe(()=>{let r=e.store.select("rootId"),i=e.store.select("floatingTreeRoot"),s=e.store.select("keyboardEventRelay");(t!==r||n!==i||o!==s)&&(t=r,n=i,o=s,this.notifyAll())}),this.context.allowMouseUpTriggerRef=e.store.context.allowMouseUpTriggerRef;return}void 0!==e.type&&(this.context.allowMouseUpTriggerRef=e.context.allowMouseUpTriggerRef),this.unsubscribeParentListener=null})}setOpen(e,t){this.state.floatingRootContext.context.events.emit("setOpen",{open:e,eventDetails:t})}unsubscribeParentListener=null}function eT(e){return{positionerRef:t.createRef(),popupRef:t.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},allowMouseUpTriggerRef:{current:!1},triggerFocusTargetRef:t.createRef(),beforeContentFocusGuardRef:t.createRef(),onOpenChangeComplete:void 0,triggerElements:e}}function eP(e,t,n=!1,o){return{...(0,eI.createInitialPopupStoreState)(e,t,n),disabled:!1,modal:!0,openMethod:null,allowMouseEnter:!1,highlightItemOnHover:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new eM.FloatingTreeStore,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:m.EMPTY_OBJECT,keyboardEventRelay:void 0,closeDelay:0,adaptiveOrigin:void 0,...o}}e.s(["MenuStore",0,eO,"createNullMenuStore",0,function(){let e=new ew.PopupTriggerMap;return Object.assign(new eC.NullStore(Object.freeze(eP(e)),Object.freeze(eT(e)),ek),{setOpen:m.NOOP})}],36481);var eN=e.i(64111);let ej=t.createContext(void 0);function eA(){return t.useContext(ej)}e.s(["MenuSubmenuRootContext",0,ej,"useMenuSubmenuRootContext",0,eA],74671);let eD=(0,eg.fastComponent)(function(e){var n,o,r;let a,{children:u,open:l,onOpenChange:d,onOpenChangeComplete:f,defaultOpen:g=!1,disabled:v=!1,modal:h,loopFocus:x=!0,orientation:S="vertical",actionsRef:y,closeParentOnEsc:R=!1,handle:E,triggerId:M,defaultTriggerId:C=null,highlightItemOnHover:I=!0}=e,w=c(!0),T=s(!0),P=eS(!0),N=eA(),j=t.useMemo(()=>N&&T?{type:"menu",store:T.store}:P?{type:"menubar",context:P}:w&&!T?{type:"context-menu",context:w}:{type:void 0},[w,T,P,N]),A=(0,ep.useId)(),D=(0,ep.useId)(),z=(0,Q.useFloatingParentNodeId)(),F="menu"===j.type?j.store:void 0,_=(l??g)&&F?.state.transitionStatus==="starting",U=(0,ef.useRefWithInit)(()=>_?F?.state.instantType:void 0).current,H=(n={open:g,openProp:l,activeTriggerId:C,triggerIdProp:M,parent:j,disabled:v,highlightItemOnHover:I,modal:void 0===j.type?h:void 0,rootId:A,instantType:U},o=D,r=null!=z,(0,ef.useRefWithInit)(()=>new eO(n,o,r)).current);H.useControlledProp("openProp",l),H.useControlledProp("triggerIdProp",M),H.useContextCallback("onOpenChangeComplete",f);let B=H.useState("floatingTreeRoot"),G=(0,Q.useFloatingNodeId)(B),K=H.useState("open"),Y=H.useState("activeTriggerElement"),V=H.useState("positionerElement"),$=H.useState("hoverEnabled"),W=H.useState("disabled"),q=H.useState("lastOpenChangeReason"),X=H.useState("parent"),Z=H.useState("activeIndex"),ee=H.useState("payload"),eo=H.useState("floatingParentNodeId"),er=t.useRef(null),ei=t.useRef("context-menu"!==X.type),ea=(0,J.useTimeout)(),eu=t.useRef(!0),el=(0,J.useTimeout)(),ed=null!=eo,{openMethod:ec,triggerProps:eg}=(0,eR.useOpenInteractionType)(K);H.useSyncedValues({disabled:v,highlightItemOnHover:I,modal:void 0===X.type?h:void 0,openMethod:ec,rootId:A}),(0,eN.useImplicitActiveTrigger)(H);let{forceUnmount:eb,transitionStatus:eE}=(0,eN.useOpenStateTransitions)(K,H,()=>{H.set("allowMouseEnter",!1)},_),eM=(0,en.useAnimationsFinished)(H.context.popupRef);t.useEffect(()=>{if(void 0===U)return;let e=()=>{H.state.instantType===U&&H.set("instantType",void 0)};if(!K)return void e();if(void 0!==eE)return;if(null==H.context.popupRef.current)return void e();let t=new AbortController;return eM(e,t.signal),()=>{t.abort()}},[U,K,eE,eM,H]),(0,L.useIsoLayoutEffect)(()=>{w&&!T?H.update({parent:{type:"context-menu",context:w},floatingNodeId:G,floatingParentNodeId:z}):T&&H.update({floatingNodeId:G,floatingParentNodeId:z})},[w,T,G,z,H]),t.useEffect(()=>{if(K||(er.current=null),"context-menu"===X.type){if(!K){ea.clear(),ei.current=!1;return}ea.start(500,()=>{ei.current=!0})}},[ea,K,X.type]),(0,L.useIsoLayoutEffect)(()=>{K||$||H.set("hoverEnabled",!0)},[K,$,H]);let eC=(0,es.useStableCallback)((e,t)=>{let n=t.reason;if(!e&&!H.select("open")||K===e&&t.trigger===Y&&q===n)return;let o=(0,eN.attachPreventUnmountOnClose)(t);if(e||null!=t.trigger||(t.trigger=Y??void 0),d?.(e,t),t.isCanceled)return;H.state.floatingRootContext.dispatchOpenChange(e,t);let r=t.event;if(!1===e&&r?.type==="click"&&"touch"===r.pointerType&&!eu.current)return;e&&n===p.REASONS.triggerFocus?(eu.current=!1,el.start(300,()=>{eu.current=!0})):(eu.current=!0,el.clear());let i=(n===p.REASONS.triggerPress||n===p.REASONS.itemPress)&&0===r.detail,s=!e&&(n===p.REASONS.escapeKey||null==n);er.current=t.event;let a=(0,eN.createPopupOpenState)(H.state,e,t.trigger,o());a.openChangeReason=n,"menubar"===X.type&&(n===p.REASONS.triggerFocus||n===p.REASONS.focusOut||n===p.REASONS.triggerHover||n===p.REASONS.listNavigation||n===p.REASONS.siblingOpen)?a.instantType="group":i||s?a.instantType=i?"click":"dismiss":a.instantType=void 0,H.update(a)}),eI=(0,ex.useSyncedFloatingRootContext)({popupStore:H,floatingRootContext:H.state.floatingRootContext,floatingId:D,nested:null!=z,onOpenChange:eC}),ew=eI.context.events;(0,L.useIsoLayoutEffect)(()=>{let e=({open:e,eventDetails:t})=>eC(e,t);return ew.on("setOpen",e),()=>{ew?.off("setOpen",e)}},[ew,eC]);let ek=t.useCallback(()=>{H.setOpen(!1,(0,k.createChangeEventDetails)(p.REASONS.imperativeAction))},[H]);t.useImperativeHandle(y,()=>({unmount:eb,close:ek}),[eb,ek]),"context-menu"===X.type&&(a=X.context),t.useImperativeHandle(a?.positionerRef,()=>V,[V]),t.useImperativeHandle(a?.actionsRef,()=>({setOpen:eC}),[eC]);let eT=(0,em.useDismiss)(eI,{enabled:!W,bubbles:{escapeKey:R&&"menu"===X.type},outsidePress:()=>"context-menu"!==X.type||er.current?.type==="contextmenu"||ei.current,externalTree:ed?B:void 0}),eP=(0,ey.useDirection)(),ej=t.useCallback(e=>{H.select("activeIndex")!==e&&H.set("activeIndex",e)},[H]),eD=(0,ev.useListNavigation)(eI,{enabled:!W,listRef:H.context.itemDomElements,activeIndex:Z,nested:void 0!==X.type,loopFocus:x,orientation:S,parentOrientation:"menubar"===X.type?X.context.orientation:void 0,rtl:"rtl"===eP,disabledIndices:m.EMPTY_ARRAY,onNavigate:ej,openOnArrowKeyDown:"context-menu"!==X.type,externalTree:ed?B:void 0,focusItemOnHover:I}),eL=t.useCallback(e=>{H.context.typingRef.current=e},[H]),ez=(0,eh.useTypeahead)(eI,{enabled:!W,listRef:H.context.itemLabels,elementsRef:H.context.itemDomElements,activeIndex:Z,resetMs:et.TYPEAHEAD_RESET_MS,onMatch:e=>{K&&e!==Z&&H.set("activeIndex",e)},onTyping:eL}),eF=t.useMemo(()=>{let e=(0,b.mergeProps)(ez.reference,eD.reference,eT.reference,{onMouseMove(){H.set("allowMouseEnter",!0)}},eg);return e["aria-haspopup"]="menu",e["aria-expanded"]=K,e},[H,ez.reference,eD.reference,eT.reference,eg,K]),e_=t.useMemo(()=>{let e=(0,b.mergeProps)(eD.trigger,eT.trigger,eg);return e["aria-haspopup"]="menu",e["aria-expanded"]=!1,e},[eD.trigger,eT.trigger,eg]);(0,ef.useRefWithInit)(()=>(H.update({inactiveTriggerProps:e_}),null));let eU=t.useMemo(()=>(0,b.mergeProps)(eN.FOCUSABLE_POPUP_PROPS,{id:D,role:"menu","aria-orientation":"horizontal"===S?"horizontal":void 0,"aria-labelledby":Y?.id,onMouseMove(){H.set("allowMouseEnter",!0),"menu"===X.type&&H.set("hoverEnabled",!1)},onClick(){H.select("hoverEnabled")&&H.set("hoverEnabled",!1)},onKeyDown(e){let t=H.select("keyboardEventRelay");t&&!e.isPropagationStopped()&&t(e)}},ez.floating,eD.floating,eT.floating),[Y,D,S,X.type,H,ez.floating,eD.floating,eT.floating]),eH=eD.item??m.EMPTY_OBJECT;(0,eN.usePopupInteractionProps)(H,{floatingRootContext:eI,activeTriggerProps:eF,inactiveTriggerProps:e_,popupProps:eU,itemProps:eH});let eB=t.useMemo(()=>({store:H,parent:j}),[H,j]),eG=(0,O.jsxs)(i.Provider,{value:eB,children:[E&&(0,O.jsx)(eN.PopupHandleAttachment,{handle:E,store:H}),"function"==typeof u?u({payload:ee}):u]});return void 0===X.type||"context-menu"===X.type?(0,O.jsx)(Q.FloatingTree,{externalTree:B,children:eG}):eG});e.s(["MenuRoot",0,eD],63947),e.s(["MenuSubmenuRoot",0,function(e){let n=s().store,o=t.useMemo(()=>({parentMenu:n}),[n]);return(0,O.jsx)(ej.Provider,{value:o,children:(0,O.jsx)(eD,{...e})})}],77450)},8619,e=>{"use strict";var t=e.i(56420);let n={name:"circle-user-round",size:24,node:[["path",{d:"M17.925 20.056a6 6 0 0 0-11.851.001",key:"z69sun"}],["circle",{cx:"12",cy:"11",r:"4",key:"1gt34v"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],aliases:["user-circle-2"]};n.node;let o=(0,t.default)(n);e.s(["CircleUserRound",0,o],8619)},83140,e=>{"use strict";var t=e.i(56420);let n={name:"code-xml",size:24,node:[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],aliases:["code-2"]};n.node;let o=(0,t.default)(n);e.s(["CodeXml",0,o],83140)},28276,91772,e=>{"use strict";var t=e.i(56420);let n={name:"compass",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",key:"9ktpf1"}]]};n.node;let o=(0,t.default)(n);e.s(["Compass",0,o],28276);let r={name:"laptop-minimal",size:24,node:[["rect",{width:"18",height:"12",x:"3",y:"4",rx:"2",ry:"2",key:"1qhy41"}],["line",{x1:"2",x2:"22",y1:"20",y2:"20",key:"ni3hll"}]],aliases:["laptop-2"]};r.node;let i=(0,t.default)(r);e.s(["LaptopMinimal",0,i],91772)},67784,e=>{"use strict";var t=e.i(56420);let n={name:"log-out",size:24,node:[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]]};n.node;let o=(0,t.default)(n);e.s(["LogOut",0,o],67784)},96699,e=>{"use strict";var t=e.i(56420);let n={name:"moon",size:24,node:[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]};n.node;let o=(0,t.default)(n);e.s(["Moon",0,o],96699)},7921,e=>{"use strict";var t=e.i(56420);let n={name:"network",size:24,node:[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]};n.node;let o=(0,t.default)(n);e.s(["Network",0,o],7921)},66794,e=>{"use strict";var t=e.i(56420);let n={name:"settings",size:24,node:[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]};n.node;let o=(0,t.default)(n);e.s(["Settings",0,o],66794)},35965,95014,e=>{"use strict";var t=e.i(56420);let n={name:"sun",size:24,node:[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]};n.node;let o=(0,t.default)(n);e.s(["Sun",0,o],35965);var r=e.i(49635);e.s(["THEME_LABELS",0,{light:"Light",dark:"Dark",system:"System"},"applyTheme",0,function(e){let t=document.documentElement;t.dataset.theme=e;let n="dark"===e||"system"===e&&window.matchMedia("(prefers-color-scheme: dark)").matches;t.classList.toggle("dark",n)},"sessionSince",0,function(e,t){let n=new Date(e.since),o=n.toDateString()===t.toDateString()?(0,r.clockTime)(n):(0,r.shortDateTime)(n);return`Device \xb7 ${e.device}, since ${o}`}],95014)},95187,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o={callServer:function(){return i.callServer},createServerReference:function(){return a.createServerReference},findSourceMapURL:function(){return s.findSourceMapURL}};for(var r in o)Object.defineProperty(n,r,{enumerable:!0,get:o[r]});let i=e.r(32120),s=e.r(92245),a=e.r(35326)},57334,48990,e=>{"use strict";var t=e.i(43476);e.i(61027);var n=e.i(82370),o=e.i(89554),r=e.i(85996),i=e.i(71714),s=e.i(81194),a=e.i(1545),u=e.i(91384),l=e.i(58307),d=e.i(64270),c=e.i(19712),p=e.i(82264),f=e.i(62050),g=e.i(82593),m=e.i(5953),v=e.i(63947),h=e.i(77450),x=e.i(33332),b=e.i(71645),S=e.i(39957),y=e.i(8868),R=e.i(96499),E=e.i(67865),M=e.i(46376),C=e.i(56789),I=e.i(50316),w=e.i(85689),k=e.i(46420),O=e.i(13082),T=e.i(72135),P=e.i(79248),N=e.i(84446),j=e.i(78921),A=e.i(79938),D=e.i(52245),L=e.i(40886),z=e.i(64042),F=e.i(95530);function _(e){let{render:t,className:n,style:o,state:r=C.EMPTY_OBJECT,props:i=C.EMPTY_ARRAY,refs:s=C.EMPTY_ARRAY,metadata:a,stateAttributesMapping:u,tag:l="div",...d}=e,{compositeProps:c,compositeRef:p}=(0,F.useCompositeItem)({metadata:a});return(0,D.useRenderElement)(l,e,{state:r,ref:[p,...s],props:[c,...i,d],stateAttributesMapping:u})}e.s(["CompositeItem",0,_],48990);var U=e.i(38452),H=e.i(29315),B=e.i(59636),G=e.i(64111),K=e.i(46570),Y=e.i(88015),V=e.i(56434),$=e.i(7447),W=e.i(38396),q=e.i(52535),J=e.i(76782);let Q=(0,R.fastComponentRef)(function(e,n){let o,{render:r,className:i,style:s,disabled:a=!1,nativeButton:u=!0,id:l,openOnHover:d,delay:c=100,closeDelay:p=0,handle:f,payload:g,...m}=e,v=(0,j.useMenuRootContext)(!0),h=(0,B.usePopupHandleStore)(f)??v?.store;if(!h)throw Error((0,x.default)(85));let R=(0,Y.useBaseUiId)(l),F=h.useState("isTriggerActive",R),Q=h.useState("floatingRootContext"),X=h.useState("isOpenedByTrigger",R),Z=h.useState("triggerPopupId",R),ee=b.useRef(null),et=(o=(0,$.useMenubarContext)(!0),b.useMemo(()=>o?{type:"menubar",context:o}:{type:void 0},[o])),en=(0,U.useCompositeRootContext)(!0),eo=(0,k.useFloatingTree)(),er=b.useMemo(()=>eo??new P.FloatingTreeStore,[eo]),ei=(0,k.useFloatingNodeId)(er),es=(0,k.useFloatingParentNodeId)(),{registerTrigger:ea,isMountedByThisTrigger:eu}=(0,G.useTriggerDataForwarding)(R,ee,h,{payload:g,closeDelay:p,parent:et,floatingTreeRoot:er,floatingNodeId:ei,floatingParentNodeId:es,keyboardEventRelay:en?.relayKeyboardEvent}),el="menubar"===et.type,ed=h.useState("disabled"),ec=a||ed||el&&et.context.disabled,{getButtonProps:ep,buttonRef:ef}=(0,L.useButton)({disabled:ec,native:u});b.useEffect(()=>{X||void 0!==et.type||(h.context.allowMouseUpTriggerRef.current=!1)},[h,X,et.type]);let eg=b.useRef(null),em=(0,S.useTimeout)(),ev=(0,E.useStableCallback)(e=>{if(!eg.current)return;em.clear(),h.context.allowMouseUpTriggerRef.current=!1;let t=e.target;(0,N.contains)(eg.current,t)||(0,N.contains)(h.select("positionerElement"),t)||t===eg.current||null!=t&&function e(t){return(0,H.isHTMLElement)(t)&&t.hasAttribute("data-rootownerid")?t.getAttribute("data-rootownerid"):(0,H.isLastTraversableNode)(t)?void 0:e((0,H.getParentNode)(t))}(t)===h.select("rootId")||(0,z.isMouseWithinBounds)(e,eg.current)||er.events.emit("close",{domEvent:e,reason:V.REASONS.cancelOpen})});b.useEffect(()=>{X&&h.select("lastOpenChangeReason")===V.REASONS.triggerHover&&(0,y.ownerDocument)(eg.current).addEventListener("mouseup",ev,{once:!0})},[X,ev,h]);let eh=el&&et.context.hasSubmenuOpen,ex=d??eh,eb=(0,T.useHoverReferenceInteraction)(Q,{enabled:ex&&!ec&&(!el||eh&&!eu),handleClose:(0,I.safePolygon)({blockPointerEvents:!el}),mouseOnly:!0,move:!1,restMs:void 0===et.type?c:void 0,delay:{close:p},triggerElementRef:ee,externalTree:er,isActiveTrigger:F,isClosing:()=>"ending"===h.select("transitionStatus")}),eS=function(e,t){let n=(0,S.useTimeout)(),[o,r]=b.useState(!1);return(0,M.useIsoLayoutEffect)(()=>{e&&t===V.REASONS.triggerHover?(r(!0),n.start(W.PATIENT_CLICK_THRESHOLD,()=>{r(!1)})):e||(n.clear(),r(!1))},[e,t,n]),o}(X,h.select("lastOpenChangeReason")),ey=(0,w.useClick)(Q,{enabled:!ec,event:X&&el?"click":"mousedown",toggle:!0,ignoreMouse:!1,stickIfOpen:void 0===et.type&&eS}),eR=(0,O.useFocus)(Q,{enabled:!ec&&eh}),eE=function(e){let{enabled:t=!0,mouseDownAction:n,open:o}=e,r=b.useRef(!1);return b.useMemo(()=>t?{onMouseDown:e=>{("open"===n&&!o||"close"===n&&o)&&(r.current=!0,(0,y.ownerDocument)(e.currentTarget).addEventListener("click",()=>{r.current=!1},{once:!0}))},onClick:e=>{r.current&&(r.current=!1,e.preventBaseUIHandler())}}:C.EMPTY_OBJECT,[t,n,o])}({open:X,enabled:el,mouseDownAction:"open"}),eM=b.useMemo(()=>(0,J.mergeProps)(eR.reference,ey.reference),[eR.reference,ey.reference]),eC=h.useState("triggerProps",eu),{preFocusGuardRef:eI,handlePreFocusGuardFocus:ew,handleFocusTargetFocus:ek}=(0,K.useTriggerFocusGuards)(h,ee),eO={disabled:ec,open:X},eT=[eg,n,ef,ea,ee],eP=[eM,eb??C.EMPTY_OBJECT,eC,{"aria-haspopup":"menu","aria-controls":Z,id:R,onMouseDown:e=>{h.select("open")||(em.start(200,()=>{h.context.allowMouseUpTriggerRef.current=!0}),(0,y.ownerDocument)(e.currentTarget).addEventListener("mouseup",ev,{once:!0}))}},el?{role:"menuitem"}:{},eE,m,ep],eN=(0,D.useRenderElement)("button",e,{enabled:!el,stateAttributesMapping:A.pressableTriggerOpenStateMapping,state:eO,ref:eT,props:eP});return el?(0,t.jsx)(_,{tag:"button",render:r,className:i,style:s,state:eO,refs:eT,props:eP,stateAttributesMapping:A.pressableTriggerOpenStateMapping}):X?(0,t.jsxs)(b.Fragment,{children:[(0,t.jsx)(q.FocusGuard,{ref:eI,onFocus:ew},`${R}-pre-focus-guard`),(0,t.jsx)(b.Fragment,{children:eN},R),(0,t.jsx)(q.FocusGuard,{ref:h.context.triggerFocusTargetRef,onFocus:ek},`${R}-post-focus-guard`)]}):(0,t.jsx)(b.Fragment,{children:eN},R)});var X=e.i(3414),Z=e.i(18390);let ee=b.forwardRef(function(e,t){let{render:n,className:o,style:r,children:i,...s}=e,{store:a}=(0,j.useMenuRootContext)(),{side:u}=(0,X.useMenuPositionerContext)(),l=a.useState("instantType"),{children:d,state:c}=(0,Z.usePopupViewport)({store:a,side:u,children:i}),p={activationDirection:c.activationDirection,transitioning:c.transitioning,instant:l};return(0,D.useRenderElement)("div",e,{state:p,ref:t,props:[s,{children:d}],stateAttributesMapping:Z.popupViewportStateMapping})}),et=b.forwardRef(function(e,t){let{className:n,render:o,orientation:r="horizontal",style:i,...s}=e;return(0,D.useRenderElement)("div",e,{state:{orientation:r},ref:t,props:[{role:"separator","aria-orientation":r},s]})});var en=e.i(28744),eo=e.i(73553),er=e.i(66506),ei=e.i(74671);let es={"aria-expanded":void 0},ea=b.forwardRef(function(e,t){let{render:n,className:o,style:r,label:i,id:s,nativeButton:a=!1,openOnHover:u=!0,delay:l=100,closeDelay:d=0,disabled:c=!1,...p}=e,f=(0,ei.useMenuSubmenuRootContext)();if(!f?.parentMenu)throw Error((0,x.default)(37));let g=(0,eo.useCompositeListItem)({guess:!0,label:i}),m=(0,X.useMenuPositionerContext)(),{store:v}=(0,j.useMenuRootContext)(),h=(0,Y.useBaseUiId)(s),S=v.useState("open"),y=v.useState("floatingRootContext"),R=v.useState("floatingTreeRoot"),k=v.useState("triggerPopupId",h),O=(0,G.useTriggerRegistration)(h,v),P=(0,E.useStableCallback)(e=>{O(e),null!==e&&v.select("open")&&null==v.select("activeTriggerId")&&v.update({activeTriggerId:h??null,activeTriggerElement:e,closeDelay:d})}),N=b.useRef(null),L=b.useCallback(e=>{N.current=e,v.set("activeTriggerElement",e)},[v]);(0,M.useIsoLayoutEffect)(()=>(P(N.current),()=>P(null)),[P,h,v]),v.useSyncedValue("closeDelay",d);let z=f.parentMenu,F=v.useState("disabled"),_=z.useState("disabled"),U=c||F||_,H=z.useState("itemProps"),B=z.useState("isActive",g.index),K=b.useMemo(()=>({type:"submenu-trigger",setActive(){z.select("highlightItemOnHover")&&z.set("activeIndex",g.index)}}),[z,g.index]),{getItemProps:$,itemRef:W}=(0,er.useMenuItem)({closeOnClick:!1,disabled:U,highlighted:B,id:h,store:v,typingRef:z.context.typingRef,nativeButton:a,itemMetadata:K,nodeId:m?.context.nodeId}),q=v.useState("hoverEnabled"),J=(0,T.useHoverReferenceInteraction)(y,{enabled:q&&u&&!U,handleClose:(0,I.safePolygon)({blockPointerEvents:!0}),mouseOnly:!0,move:!0,restMs:l,delay:{open:l,close:d},shouldOpen:l>0?()=>z.select("allowMouseEnter"):void 0,triggerElementRef:N,externalTree:R,isClosing:()=>"ending"===v.select("transitionStatus"),guardStaleOpen:!0}),Q=(0,w.useClick)(y,{enabled:!U,event:"mousedown",toggle:!u,ignoreMouse:u,stickIfOpen:!1}).reference??C.EMPTY_OBJECT,Z=v.useState("triggerProps",!0);delete Z.id;let ee=v.useState("openMethod"),et=v.useState("lastOpenChangeReason")===V.REASONS.listNavigation||"keyboard"===ee,ea=S&&et&&en.platform.screenReader.voiceOver;return(0,D.useRenderElement)("div",e,{state:{disabled:U,highlighted:B,open:S},stateAttributesMapping:A.triggerOpenStateMapping,props:[Q,J,Z,H,ea?es:void 0,{"aria-controls":k,tabIndex:S||B?0:-1,onBlur(){B&&z.set("activeIndex",null)}},p,$],ref:[t,g.ref,W,P,L]})});var eu=e.i(36481),el=e.i(64170);class ed extends el.BasePopupHandle{constructor(){super((0,eu.createNullMenuStore)(),"Menu")}open(e){this.openByTrigger(e)}close(){this.closePopup()}get isOpen(){return this.attachedStore?.select("open")??!1}}e.s(["Arrow",()=>n.MenuArrow,"Backdrop",()=>o.MenuBackdrop,"CheckboxItem",()=>r.MenuCheckboxItem,"CheckboxItemIndicator",()=>i.MenuCheckboxItemIndicator,"Group",()=>s.MenuGroup,"GroupLabel",()=>a.MenuGroupLabel,"Handle",0,ed,"Item",()=>u.MenuItem,"LinkItem",()=>l.MenuLinkItem,"Popup",()=>d.MenuPopup,"Portal",()=>c.MenuPortal,"Positioner",()=>p.MenuPositioner,"RadioGroup",()=>f.MenuRadioGroup,"RadioItem",()=>g.MenuRadioItem,"RadioItemIndicator",()=>m.MenuRadioItemIndicator,"Root",()=>v.MenuRoot,"Separator",0,et,"SubmenuRoot",()=>h.MenuSubmenuRoot,"SubmenuTrigger",0,ea,"Trigger",0,Q,"Viewport",0,ee,"createHandle",0,function(){return new ed}],60948);var ec=e.i(60948),ec=ec,ep=e.i(89664),ef=e.i(90063);e.s(["DropdownMenu",0,function(e){return(0,t.jsx)(ec.Root,{"data-slot":"dropdown-menu",...e})},"DropdownMenuContent",0,function({align:e="end",side:n="bottom",sideOffset:o=4,className:r,...i}){return(0,t.jsx)(ec.Portal,{children:(0,t.jsx)(ec.Positioner,{className:"isolate z-50 outline-none",align:e,side:n,sideOffset:o,children:(0,t.jsx)(ec.Popup,{"data-slot":"dropdown-menu-content",className:(0,ef.classNames)("max-h-(--available-height) min-w-48 origin-(--transform-origin) overflow-y-auto rounded-xl border border-border bg-popover p-1 text-popover-foreground shadow-lg duration-(--duration-fast) outline-none data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",r),...i})})})},"DropdownMenuGroup",0,function(e){return(0,t.jsx)(ec.Group,{"data-slot":"dropdown-menu-group",...e})},"DropdownMenuItem",0,function({className:e,variant:n="default",...o}){return(0,t.jsx)(ec.Item,{"data-slot":"dropdown-menu-item","data-variant":n,className:(0,ef.classNames)("relative flex h-8.5 items-center gap-2.5 rounded-sm px-2.5 text-body text-foreground outline-none select-none data-highlighted:bg-accent focus-visible:outline-2 focus-visible:outline-ring data-disabled:pointer-events-none data-disabled:opacity-45 data-[variant=destructive]:text-destructive-text [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-(--size-icon) [&_svg]:text-muted-foreground data-[variant=destructive]:[&_svg]:text-destructive-text",e),...o})},"DropdownMenuLabel",0,function({className:e,...n}){return(0,t.jsx)(ec.GroupLabel,{"data-slot":"dropdown-menu-label",className:(0,ef.classNames)("px-2.5 pt-1.5 pb-1 text-caption text-muted-foreground",e),...n})},"DropdownMenuRadioGroup",0,function(e){return(0,t.jsx)(ec.RadioGroup,{"data-slot":"dropdown-menu-radio-group",...e})},"DropdownMenuRadioItem",0,function({className:e,children:n,...o}){return(0,t.jsxs)(ec.RadioItem,{"data-slot":"dropdown-menu-radio-item",className:(0,ef.classNames)("relative flex h-8.5 items-center gap-2.5 rounded-sm px-2.5 text-body text-foreground outline-none select-none data-highlighted:bg-accent focus-visible:outline-2 focus-visible:outline-ring data-disabled:pointer-events-none data-disabled:opacity-45 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-(--size-icon) [&_svg]:text-muted-foreground",e),...o,children:[n,(0,t.jsx)(ec.RadioItemIndicator,{className:"ml-auto flex",children:(0,t.jsx)(ep.Check,{"aria-hidden":!0,className:"text-foreground"})})]})},"DropdownMenuSeparator",0,function({className:e,...n}){return(0,t.jsx)(ec.Separator,{"data-slot":"dropdown-menu-separator",className:(0,ef.classNames)("-mx-1 my-1 h-px bg-border",e),...n})},"DropdownMenuTrigger",0,function(e){return(0,t.jsx)(ec.Trigger,{"data-slot":"dropdown-menu-trigger",...e})}],57334)},57957,e=>{"use strict";var t=e.i(43476),n=e.i(63707),o=e.i(8619),r=e.i(83140),i=e.i(28276),s=e.i(91772),a=e.i(11568),u=e.i(67784),l=e.i(46513),d=e.i(96699),c=e.i(7921),p=e.i(66794),f=e.i(35965),g=e.i(22016),m=e.i(71645),v=e.i(90063),h=e.i(31513),x=e.i(95014),b=e.i(94859),S=e.i(15905),y=e.i(57334),R=e.i(75305),E=e.i(60592);let M="Your account",C="Take the tour",I={light:f.Sun,dark:d.Moon,system:l.Monitor};function w(e){return e?.kind==="viewer"?{name:"viewer",detail:"Read-only"}:{name:"Operator",detail:e?.email??" "}}function k(e){return e?.kind!=="viewer"}function O(e,t){return t.find(t=>t===e)}function T({account:e,accountName:n,now:o}){let{name:r,detail:i}=w(e);return(0,t.jsxs)("div",{className:"flex flex-col gap-2 px-2.5 pt-2 pb-2.5",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,t.jsx)(b.Avatar,{kind:"account",size:28,name:r}),(0,t.jsxs)("span",{className:"flex min-w-0 flex-col",children:[(0,t.jsx)("span",{className:"truncate text-body font-medium text-foreground",children:r}),(0,t.jsx)("span",{"data-testid":"account-detail",className:"truncate text-caption text-muted-foreground",children:e?.kind==="viewer"?"Sees the whole fleet, changes nothing":i})]})]}),(0,t.jsxs)("p",{"data-testid":"account-session",className:"flex items-start gap-1.5 text-caption text-muted-foreground",children:[(0,t.jsx)(s.LaptopMinimal,{"aria-hidden":!0,className:"mt-px size-(--size-icon-sm) shrink-0"}),e?(0,t.jsxs)("span",{children:["This session: ",(0,t.jsx)("span",{className:"font-medium text-foreground",children:(0,x.sessionSince)(e.session,o)})]}):(0,t.jsx)("span",{children:"This session"})]}),e?.session.accountId?(0,t.jsxs)("p",{"data-testid":"account-signed-in-as",className:"truncate text-caption text-muted-foreground",children:["Signed in as ",(0,t.jsx)("span",{className:"font-medium text-foreground",children:n??e.session.accountId})]}):null]})}function P({isSigningOut:e}){return e?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(a.LoaderCircle,{"aria-hidden":!0,className:"animate-spin motion-reduce:animate-none"}),"Signing out"]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(u.LogOut,{"aria-hidden":!0}),"Sign out"]})}e.s(["AccountMenu",0,function({account:e,accountName:r,themes:s,onThemeChange:a,onSignOut:u,isSigningOut:l,now:d,accountUrl:c,onTakeTour:p}){let{name:f,detail:g}=w(e),m=e?.kind==="operator"?e.theme:void 0;return(0,t.jsxs)(y.DropdownMenu,{children:[(0,t.jsxs)(y.DropdownMenuTrigger,{"data-testid":"account-menu","aria-label":`Account menu, ${f}${e?`, ${g}`:""}`,className:"flex w-full items-center gap-2.5 rounded-md p-1.5 text-left transition-colors duration-(--duration-fast) outline-none hover:bg-accent focus-visible:outline-2 focus-visible:outline-ring aria-expanded:bg-accent max-lg:justify-center",children:[(0,t.jsx)(b.Avatar,{kind:"account",size:28,name:f}),(0,t.jsxs)("span",{className:"flex min-w-0 grow flex-col max-lg:sr-only",children:[(0,t.jsx)("span",{className:"truncate text-body font-medium text-foreground",children:f}),(0,t.jsx)("span",{className:"truncate text-caption text-muted-foreground",children:g})]}),(0,t.jsx)(n.ChevronsUpDown,{"aria-hidden":!0,className:"size-(--size-icon) shrink-0 text-muted-foreground max-lg:hidden"})]}),(0,t.jsxs)(y.DropdownMenuContent,{side:"top",align:"start",className:"w-64",children:[(0,t.jsx)(T,{account:e,accountName:r,now:d}),void 0===c||e?.kind==="viewer"?null:(0,t.jsxs)(y.DropdownMenuItem,{"data-testid":"account-hosted",render:e=>(0,t.jsx)("a",{...e,href:c,children:e.children}),children:[(0,t.jsx)(o.CircleUserRound,{"aria-hidden":!0}),M]}),void 0===p?null:(0,t.jsxs)(y.DropdownMenuItem,{"data-testid":"account-take-tour",onClick:p,children:[(0,t.jsx)(i.Compass,{"aria-hidden":!0}),C]}),k(e)&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(y.DropdownMenuSeparator,{}),(0,t.jsxs)(y.DropdownMenuGroup,{children:[(0,t.jsx)(y.DropdownMenuLabel,{children:"Theme"}),(0,t.jsx)(y.DropdownMenuRadioGroup,{value:m??null,onValueChange:e=>{let t=O(e,s);void 0!==t&&a(t)},children:s.map(n=>{let o=I[n];return(0,t.jsxs)(y.DropdownMenuRadioItem,{value:n,disabled:void 0===e,closeOnClick:!1,"data-testid":`account-theme-${n}`,children:[(0,t.jsx)(o,{"aria-hidden":!0}),x.THEME_LABELS[n]]},n)})})]})]}),(0,t.jsx)(y.DropdownMenuSeparator,{}),(0,t.jsx)(y.DropdownMenuItem,{"data-testid":"account-sign-out",disabled:l,closeOnClick:!1,onClick:u,children:(0,t.jsx)(P,{isSigningOut:l})})]})]})},"AccountMenuSheet",0,function({account:e,accountName:n,themes:s,onThemeChange:a,onSignOut:u,isSigningOut:l,now:d,accountUrl:f,onTakeTour:y,settingsHref:N,networkHref:j}){let[A,D]=(0,m.useState)(!1),{name:L,detail:z}=w(e),F=e?.kind==="operator"?e.theme:void 0;return(0,t.jsxs)(R.Sheet,{open:A,onOpenChange:D,children:[(0,t.jsx)(R.SheetTrigger,{"data-testid":"account-menu","aria-label":`Account menu, ${L}${e?`, ${z}`:""}`,className:"inline-flex size-(--size-control-touch) shrink-0 items-center justify-center rounded-full outline-none focus-visible:outline-2 focus-visible:outline-ring",children:(0,t.jsx)(b.Avatar,{kind:"account",size:28,name:L})}),(0,t.jsxs)(R.SheetContent,{side:"bottom","data-testid":"account-sheet",className:"gap-3",children:[(0,t.jsx)(R.SheetTitle,{className:"sr-only",children:"Account"}),(0,t.jsx)(T,{account:e,accountName:n,now:d}),void 0===f||e?.kind==="viewer"?null:(0,t.jsxs)("a",{href:f,"data-testid":"account-hosted",className:"flex h-(--size-control-touch) items-center gap-2.5 border-t border-border pt-3 text-body-touch text-foreground outline-none focus-visible:outline-2 focus-visible:outline-ring [&_svg]:size-(--size-icon) [&_svg]:text-muted-foreground",children:[(0,t.jsx)(o.CircleUserRound,{"aria-hidden":!0}),M]}),void 0===y?null:(0,t.jsxs)("button",{type:"button","data-testid":"account-take-tour",onClick:()=>{D(!1),y()},className:"flex h-(--size-control-touch) items-center gap-2.5 border-t border-border pt-3 text-body-touch text-foreground outline-none focus-visible:outline-2 focus-visible:outline-ring [&_svg]:size-(--size-icon) [&_svg]:text-muted-foreground",children:[(0,t.jsx)(i.Compass,{"aria-hidden":!0}),C]}),void 0===j?null:(0,t.jsxs)(g.default,{href:j,"data-testid":"account-network",onClick:()=>{D(!1)},className:"flex h-(--size-control-touch) items-center gap-2.5 border-t border-border pt-3 text-body-touch text-foreground outline-none focus-visible:outline-2 focus-visible:outline-ring [&_svg]:size-(--size-icon) [&_svg]:text-muted-foreground",children:[(0,t.jsx)(c.Network,{"aria-hidden":!0}),"Network"]}),void 0===N?null:(0,t.jsxs)(g.default,{href:N,"data-testid":"account-settings",onClick:()=>{D(!1)},className:"flex h-(--size-control-touch) items-center gap-2.5 border-t border-border pt-3 text-body-touch text-foreground outline-none focus-visible:outline-2 focus-visible:outline-ring [&_svg]:size-(--size-icon) [&_svg]:text-muted-foreground",children:[(0,t.jsx)(p.Settings,{"aria-hidden":!0}),"Settings"]}),k(e)&&(0,t.jsxs)("div",{className:"flex flex-col gap-1.5 border-t border-border pt-3",children:[(0,t.jsx)("p",{className:"text-caption text-muted-foreground",children:"Theme"}),(0,t.jsx)(E.Tabs,{value:F??null,onValueChange:e=>{let t=O(e,s);void 0!==t&&a(t)},children:(0,t.jsx)(E.TabsList,{"aria-label":"Theme",className:"w-full",children:s.map(n=>{let o=I[n];return(0,t.jsxs)(E.TabsTrigger,{value:n,disabled:void 0===e,"data-testid":`account-theme-${n}`,className:"grow",children:[(0,t.jsx)(o,{"aria-hidden":!0}),x.THEME_LABELS[n]]},n)})})})]}),(0,t.jsxs)("a",{href:h.SOURCE_URL,target:"_blank",rel:"noreferrer","data-testid":"account-source",className:"flex h-(--size-control-touch) items-center gap-2.5 border-t border-border pt-3 text-body-touch text-foreground outline-none focus-visible:outline-2 focus-visible:outline-ring [&_svg]:size-(--size-icon) [&_svg]:text-muted-foreground",children:[(0,t.jsx)(r.CodeXml,{"aria-hidden":!0}),"Source on GitHub",(0,t.jsx)("span",{className:"sr-only",children:" (opens in a new tab)"})]}),(0,t.jsx)("button",{type:"button","data-testid":"account-sign-out",disabled:l,onClick:u,className:(0,v.classNames)("flex h-(--size-control-touch) items-center gap-2.5 border-t border-border pt-3 text-body-touch text-foreground outline-none focus-visible:outline-2 focus-visible:outline-ring disabled:opacity-60 [&_svg]:size-(--size-icon) [&_svg]:text-muted-foreground"),children:(0,t.jsx)(P,{isSigningOut:l})}),(0,t.jsx)(R.SheetClose,{render:(0,t.jsx)(S.Button,{size:"touch",className:"w-full"}),children:"Cancel"})]})]})}])},87964,e=>{"use strict";var t=e.i(71645);let n=(0,t.createContext)(void 0);e.s(["ConsoleFrameContext",0,n,"destinationOf",0,function(e){let[,t=""]=e.split("/");switch(t){case"needs-crew":case"squadrons":case"trierarchs":case"inbox":case"network":case"settings":return t;case"fleet-health":case"needs-attention":return"health";default:return"overview"}},"useConsoleFrame",0,function(){let e=(0,t.useContext)(n);if(void 0===e)throw Error("useConsoleFrame runs inside the signed-in route layout, which provides it");return e}])},76580,2660,94070,e=>{"use strict";var t=e.i(66027),n=e.i(78485);function o(e){if("refused"===e.kind)throw Error(e.message);return e.data}e.s(["useConsoleRead",0,function(e){let o=(0,t.useQuery)(e);return(0,n.useSignInWhenSessionEnds)([o.error]),o}],76580),e.s(["dataOf",0,o],2660);let r="The console did not answer: try again in a moment";class i extends Error{data;constructor(e,t){super(e),this.data=t?{code:"UNAUTHORIZED",refusal:"SIGNED_IN_ELSEWHERE"}:{code:"UNAUTHORIZED"}}}async function s(e,t=fetch){var n;let a,u,l=void 0===e.input?"":`?input=${encodeURIComponent(JSON.stringify(e.input))}`;try{let n=await t(`/api/reads/${e.read}${l}`,{cache:"no-store"});u=n.status,a=await n.json()}catch{throw Error(r)}if(!("object"==typeof(n=a)&&null!==n&&"kind"in n&&("answered"===n.kind||"refused"===n.kind)))throw Error(r);if(401===u&&"refused"===a.kind)throw new i(a.message,"refusal"in a&&"SIGNED_IN_ELSEWHERE"===a.refusal);return o(a)}e.s(["fetchConsoleRead",0,s],94070)},86413,47249,e=>{"use strict";var t=e.i(54616),n=e.i(12598),o=e.i(76580),r=e.i(94070);function i(e){return"question"===e.kind?null===e.question.answer&&null===e.stale:"acknowledged"!==e.state}e.s(["isOpenEntry",0,i],47249);var s=e.i(2660),a=e.i(95187);let u=(0,a.createServerReference)("4050ea5ffb605a0448357c634894dc42d70e5b9aa5",a.callServer,void 0,a.findSourceMapURL,"answerQuestion");var l=e.i(27702);let d=["inbox"];function c(){return(0,o.useConsoleRead)({queryKey:d,queryFn:()=>(0,r.fetchConsoleRead)({read:"inbox"})})}function p(){let e=(0,l.useTRPC)(),t=(0,n.useQueryClient)();return async()=>{await Promise.all([t.invalidateQueries({queryKey:d}),t.invalidateQueries({queryKey:e.fleet.pathKey()})])}}e.s(["INBOX_KEY",0,d,"inboxPathOf",0,function(e){let t=new URLSearchParams;"open"!==e.filter&&t.set("filter",e.filter),void 0!==e.deliveryId&&t.set("message",e.deliveryId);let n=t.toString();return""===n?"/inbox":`/inbox?${n}`},"readInboxFilter",0,function(e){return"done"===e||"all"===e?e:"open"},"useAnswer",0,function(){let e=p();return(0,t.useMutation)({mutationFn:async e=>(0,s.dataOf)(await u(e)),onSuccess:e})},"useInboxEntries",0,c,"useMarkDone",0,function(){let e=(0,l.useTRPC)(),n=p();return(0,t.useMutation)(e.fleet.markDone.mutationOptions({onSuccess:n}))},"useMarkRead",0,function(){let e=(0,l.useTRPC)(),n=p();return(0,t.useMutation)(e.fleet.markRead.mutationOptions({onSuccess:n}))},"useOpenInboxCount",0,function(){return c().data?.filter(i).length},"useReply",0,function(){let e=(0,l.useTRPC)(),n=p();return(0,t.useMutation)(e.fleet.reply.mutationOptions({onSuccess:n}))}],86413)}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,13082,e=>{"use strict";var t=e.i(71645),n=e.i(74735),o=e.i(28744),r=e.i(65420),i=e.i(8868),s=e.i(39957),a=e.i(29315),u=e.i(51321),l=e.i(84446),d=e.i(96296),c=e.i(75606),p=e.i(56434);let f=o.platform.os.mac&&o.platform.engine.webkit;e.s(["useFocus",0,function(e,o={}){let{enabled:g=!0,delay:m}=o,v="rootStore"in e?e.rootStore:e,{events:h,dataRef:x}=v.context,b=t.useRef(!1),S=t.useRef(null),y=t.useRef(!0),R=(0,s.useTimeout)();t.useEffect(()=>{let e=v.select("domReferenceElement");if(!g)return;let t=(0,a.getWindow)(e);return(0,r.mergeCleanups)((0,n.addEventListener)(t,"blur",function(){let e=v.select("domReferenceElement");!v.select("open")&&(0,a.isHTMLElement)(e)&&e===(0,l.activeElement)((0,i.ownerDocument)(e))&&(b.current=!0,S.current=e)}),f&&(0,n.addEventListener)(t,"keydown",function(){y.current=!0},!0),f&&(0,n.addEventListener)(t,"pointerdown",function(){y.current=!1},!0))},[v,g]),t.useEffect(()=>{if(g)return h.on("openchange",e),()=>{h.off("openchange",e)};function e(e){if(e.reason===p.REASONS.triggerPress||e.reason===p.REASONS.escapeKey){let e=v.select("domReferenceElement");(0,a.isElement)(e)&&(S.current=e,b.current=!0)}}},[h,g,v]);let E=t.useMemo(()=>{function e(){b.current=!1,S.current=null}return{onMouseLeave(){e()},onFocus(t){let n=t.currentTarget;if(b.current){if(S.current===n)return;e()}let o=(0,l.getTarget)(t.nativeEvent);if((0,a.isElement)(o)){if(f&&!t.relatedTarget){if(!y.current&&!(0,d.isTypeableElement)(o))return}else if(!(0,d.matchesFocusVisible)(o))return}let r=(0,d.isTargetInsideEnabledTrigger)(t.relatedTarget,v.context.triggerElements),{nativeEvent:i,currentTarget:s}=t,u="function"==typeof m?m():m;v.select("open")&&r||0===u||void 0===u?v.setOpen(!0,(0,c.createChangeEventDetails)(p.REASONS.triggerFocus,i,s)):R.start(u,()=>{b.current||v.setOpen(!0,(0,c.createChangeEventDetails)(p.REASONS.triggerFocus,i,s))})},onBlur(t){e();let n=t.relatedTarget,o=t.nativeEvent,r=(0,a.isElement)(n)&&n.hasAttribute((0,u.createAttribute)("focus-guard"))&&"outside"===n.getAttribute("data-type");R.start(0,()=>{let e=v.select("domReferenceElement"),t=(0,l.activeElement)((0,i.ownerDocument)(e));if(!n&&t===e||(0,l.contains)(x.current.floatingContext?.refs.floating.current,t)||(0,l.contains)(e,t)||r)return;let s=n??t;(0,d.isTargetInsideEnabledTrigger)(s,v.context.triggerElements)||v.setOpen(!1,(0,c.createChangeEventDetails)(p.REASONS.triggerFocus,o))})}}},[x,m,v,R]);return t.useMemo(()=>g?{reference:E,trigger:E}:{},[g,E])}])},61027,3414,78921,82370,89554,66506,85996,71714,81194,1545,91384,58307,64270,19712,82264,62050,82593,5953,7447,36481,74671,63947,77450,e=>{"use strict";e.s([],61027);var t=e.i(71645),n=e.i(33332);let o=t.createContext(void 0);function r(e){let r=t.useContext(o);if(void 0===r&&!e)throw Error((0,n.default)(33));return r}e.s(["MenuPositionerContext",0,o,"useMenuPositionerContext",0,r],3414);let i=t.createContext(void 0);function s(e){let o=t.useContext(i);if(void 0===o&&!e)throw Error((0,n.default)(36));return o}e.s(["MenuRootContext",0,i,"useMenuRootContext",0,s],78921);var a=e.i(52245),u=e.i(79938);let l=t.forwardRef(function(e,t){let{render:n,className:o,style:i,...l}=e,{store:d}=s(),{arrowRef:c,side:p,align:f,arrowUncentered:g,arrowStyles:m}=r(),v=d.useState("open");return(0,a.useRenderElement)("div",e,{ref:[c,t],stateAttributesMapping:u.popupStateMapping,state:{open:v,side:p,align:f,uncentered:g},props:{style:m,"aria-hidden":!0,...l}})});e.s(["MenuArrow",0,l],82370);let d=t.createContext(void 0);function c(e=!0){let o=t.useContext(d);if(void 0===o&&!e)throw Error((0,n.default)(25));return o}var p=e.i(56434);let f=t.forwardRef(function(e,t){let{render:n,className:o,style:r,...i}=e,{store:l}=s(),d=l.useState("open"),f=l.useState("mounted"),g=l.useState("transitionStatus"),m=l.useState("lastOpenChangeReason"),v=c();return(0,a.useRenderElement)("div",e,{ref:v?.backdropRef?[t,v.backdropRef]:t,state:{open:d,transitionStatus:g},stateAttributesMapping:u.popupTransitionStateMapping,props:[{role:"presentation",hidden:!f,style:{pointerEvents:m===p.REASONS.triggerHover?"none":void 0,userSelect:"none",WebkitUserSelect:"none"}},i]})});e.s(["MenuBackdrop",0,f],89554);var g=e.i(51437),m=e.i(56789);let v=t.createContext(void 0);var h=e.i(28918),x=e.i(40886),b=e.i(76782),S=e.i(28744),y=e.i(64350);function R(e){let{closeOnClick:n,highlighted:o,id:r,nodeId:i,store:s,typingRef:a,itemRef:u,itemMetadata:l}=e,{events:d}=s.useState("floatingTreeRoot"),f=s.useState("open"),g=c(!0),m=void 0!==g;return t.useMemo(()=>({id:r,role:"menuitem",tabIndex:f&&o?0:-1,onKeyDown(e){" "===e.key&&a?.current&&e.preventDefault()},onMouseMove(e){i&&d.emit("itemhover",{nodeId:i,target:e.currentTarget})},onClick(e){n&&d.emit("close",{domEvent:e,reason:p.REASONS.itemPress})},onMouseUp(e){if(g){let t=g.initialCursorPointRef.current;if(g.initialCursorPointRef.current=null,m&&t&&1>=Math.abs(e.clientX-t.x)&&1>=Math.abs(e.clientY-t.y)||m&&!S.platform.os.mac&&2===e.button)return}u.current&&s.context.allowMouseUpTriggerRef.current&&(!m||2===e.button)&&"regular-item"===l.type&&(0,y.dispatchClickWithModifiers)(u.current,e,{detail:1})}}),[n,o,r,d,i,f,s,a,u,g,m,l])}let E={type:"regular-item"};function M(e){let{closeOnClick:n,disabled:o,highlighted:r,id:i,store:s,typingRef:a=s.context.typingRef,nativeButton:u,itemMetadata:l,nodeId:d}=e,c=t.useRef(null),{getButtonProps:p,buttonRef:f}=(0,x.useButton)({disabled:o,focusableWhenDisabled:!0,native:u,composite:!0}),g=R({closeOnClick:n,highlighted:r,id:i,nodeId:d,store:s,typingRef:a,itemRef:c,itemMetadata:l}),m=t.useCallback(e=>(0,b.mergeProps)(g,{onMouseEnter(){"submenu-trigger"===l.type&&l.setActive()}},e,p),[g,p,l]),v=(0,h.useMergedRefs)(c,f);return t.useMemo(()=>({getItemProps:m,itemRef:v}),[m,v])}e.s(["REGULAR_ITEM",0,E,"useMenuItem",0,M],66506);var C=e.i(73553),I=e.i(88015);let w={checked:e=>e?{"data-checked":""}:{"data-unchecked":""},...e.i(74354).transitionStatusMapping};var k=e.i(75606),O=e.i(43476);let T=t.forwardRef(function(e,n){let{render:o,className:i,id:u,label:l,nativeButton:d=!1,disabled:c=!1,closeOnClick:f=!1,checked:h,defaultChecked:x,onCheckedChange:b,style:S,...y}=e,R=(0,C.useCompositeListItem)({guess:!0,label:l}),T=r(!0),P=(0,I.useBaseUiId)(u),{store:N}=s(),j=N.useState("disabled"),A=c||j,D=N.useState("isActive",R.index),L=N.useState("itemProps"),[z,F]=(0,g.useControlled)({controlled:h,default:x??!1,name:"MenuCheckboxItem",state:"checked"}),{getItemProps:_,itemRef:U}=M({closeOnClick:f,disabled:A,highlighted:D,id:P,store:N,nativeButton:d,nodeId:T?.context.nodeId,itemMetadata:E}),H=t.useMemo(()=>({disabled:A,highlighted:D,checked:z}),[A,D,z]),B=(0,a.useRenderElement)("div",e,{state:H,stateAttributesMapping:w,props:[L,{role:"menuitemcheckbox","aria-checked":z,onClick:function(e){let t=(0,k.createChangeEventDetails)(p.REASONS.itemPress,e.nativeEvent,void 0,{preventUnmountOnClose:m.NOOP});b?.(!z,t),t.isCanceled||F(e=>!e)}},y,_],ref:[U,n,R.ref]});return(0,O.jsx)(v.Provider,{value:H,children:B})});e.s(["MenuCheckboxItem",0,T],85996);var P=e.i(23910),N=e.i(37584);let j=t.forwardRef(function(e,o){let{render:r,className:i,style:s,keepMounted:u=!1,...l}=e,d=function(){let e=t.useContext(v);if(void 0===e)throw Error((0,n.default)(30));return e}(),c=t.useRef(null),{transitionStatus:p,mounted:f,setMounted:g}=(0,P.useTransitionStatus)(d.checked);(0,N.useOpenChangeComplete)({batch:!0,enabled:!d.checked,open:d.checked,ref:c,onComplete(){d.checked||g(!1)}});let m={checked:d.checked,disabled:d.disabled,highlighted:d.highlighted,transitionStatus:p};return(0,a.useRenderElement)("span",e,{state:m,ref:[o,c],stateAttributesMapping:w,props:{"aria-hidden":!0,...l},enabled:u||f})});e.s(["MenuCheckboxItemIndicator",0,j],71714);let A=t.createContext(void 0),D=t.forwardRef(function(e,n){let{render:o,className:r,style:i,...s}=e,[u,l]=t.useState(void 0),d=(0,a.useRenderElement)("div",e,{ref:n,props:{role:"group","aria-labelledby":u,...s}});return(0,O.jsx)(A.Provider,{value:l,children:d})});e.s(["MenuGroup",0,D],81194);var L=e.i(46376);let z=t.forwardRef(function(e,o){let{render:r,className:i,style:s,id:u,...l}=e,d=(0,I.useBaseUiId)(u),c=function(){let e=t.useContext(A);if(void 0===e)throw Error((0,n.default)(31));return e}();return(0,L.useIsoLayoutEffect)(()=>(c(d),()=>{c(e=>e===d?void 0:e)}),[c,d]),(0,a.useRenderElement)("div",e,{ref:o,props:{id:d,"aria-hidden":!0,...l}})});e.s(["MenuGroupLabel",0,z],1545);let F=t.forwardRef(function(e,t){let{render:n,className:o,id:i,label:u,nativeButton:l=!1,disabled:d=!1,closeOnClick:c=!0,style:p,...f}=e,g=(0,C.useCompositeListItem)({guess:!0,label:u}),m=r(!0),v=(0,I.useBaseUiId)(i),{store:h}=s(),x=h.useState("disabled"),b=d||x,S=h.useState("isActive",g.index),y=h.useState("itemProps"),{getItemProps:R,itemRef:w}=M({closeOnClick:c,disabled:b,highlighted:S,id:v,store:h,nativeButton:l,nodeId:m?.context.nodeId,itemMetadata:E});return(0,a.useRenderElement)("div",e,{state:{disabled:b,highlighted:S},props:[y,f,R],ref:[w,t,g.ref]})});e.s(["MenuItem",0,F],91384);let _=t.forwardRef(function(e,n){let{render:o,className:i,id:u,label:l,closeOnClick:d=!1,style:c,...p}=e,f=t.useRef(null),g=(0,C.useCompositeListItem)({guess:!0,label:l}),m=r(!0),v=m?.context.nodeId,h=(0,I.useBaseUiId)(u),{store:S}=s(),y=S.useState("isActive",g.index),M=S.useState("itemProps"),w=S.context.typingRef,{getButtonProps:k,buttonRef:O}=(0,x.useButton)({native:!1,composite:!0}),T=R({closeOnClick:d,highlighted:y,id:h,nodeId:v,store:S,typingRef:w,itemRef:f,itemMetadata:E});return(0,a.useRenderElement)("a",e,{state:{highlighted:y},props:[M,p,function(e){return(0,b.mergeProps)(T,e,k)}],ref:[f,O,n,g.ref]})});e.s(["MenuLinkItem",0,_],58307);var U=e.i(61487),H=e.i(31157),B=e.i(96533),G=e.i(73327),K=e.i(53984);let Y=t.forwardRef(function(e,n){let{render:o,className:i,style:l,finalFocus:d,...c}=e,{store:f}=s(),{side:g,align:m}=r(),v=null!=(0,B.useToolbarRootContext)(!0),h=f.useState("open"),x=f.useState("transitionStatus"),b=f.useState("popupProps"),S=f.useState("mounted"),y=f.useState("instantType"),R=f.useState("activeTriggerElement"),E=f.useState("parent"),M=f.useState("lastOpenChangeReason"),C=f.useState("rootId"),I=f.useState("floatingRootContext"),w=f.useState("floatingTreeRoot"),T=f.useState("closeDelay"),P=f.useState("hoverEnabled"),j=f.useState("disabled"),A=f.useState("openMethod"),D="context-menu"===E.type;(0,N.useOpenChangeComplete)({open:h,ref:f.context.popupRef,onComplete(){h&&f.context.onOpenChangeComplete?.(!0)}}),t.useEffect(()=>{function e(e){f.setOpen(!1,(0,k.createChangeEventDetails)(e.reason,e.domEvent))}return w.events.on("close",e),()=>{w.events.off("close",e)}},[w.events,f]),(0,H.useHoverFloatingInteraction)(I,{enabled:P&&!j&&!D&&"menubar"!==E.type,closeDelay:T});let L=f.useStateSetter("popupElement"),z={transitionStatus:x,side:g,align:m,open:h,nested:"menu"===E.type,instant:y},F=(0,a.useRenderElement)("div",e,{state:z,ref:[n,f.context.popupRef,L],stateAttributesMapping:u.popupTransitionStateMapping,props:[b,{onKeyDown(e){v&&G.COMPOSITE_KEYS.has(e.key)&&e.stopPropagation()}},(0,K.getDisabledMountTransitionStyles)(x),c,{"data-rootownerid":C}]}),_=void 0===E.type||D;return(R||"menubar"===E.type&&M!==p.REASONS.outsidePress)&&(_=!0),(0,O.jsx)(U.FloatingFocusManager,{context:I,openInteractionType:A,modal:D,disabled:!S,returnFocus:void 0===d?_:d,initialFocus:"menu"!==E.type,restoreFocus:!0,externalTree:"menubar"!==E.type?w:void 0,previousFocusableElement:R,nextFocusableElement:void 0===E.type?f.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:void 0===E.type?f.context.beforeContentFocusGuardRef:void 0,children:F})});e.s(["MenuPopup",0,Y],64270);var V=e.i(26674);let $=t.createContext(void 0),W=t.forwardRef(function(e,t){let{keepMounted:n=!1,...o}=e,{store:r,parent:i}=s();if(!(r.useState("mounted")||n))return null;let a="menu"===i.type||"menubar"===i.type?"group":void 0;return(0,O.jsx)($.Provider,{value:n,children:(0,O.jsx)(V.FloatingPortal,{ref:t,...o,portalOwnerRole:a})})});e.s(["MenuPortal",0,W],19712);var q=e.i(44394),J=e.i(39957),Q=e.i(46420),X=e.i(23706),Z=e.i(53687),ee=e.i(426),et=e.i(38396),en=e.i(22640),eo=e.i(89579),er=e.i(33383);let ei=t.forwardRef(function(e,r){let{anchor:i,positionMethod:a="absolute",className:u,render:l,side:d,align:f,sideOffset:g=0,alignOffset:m=0,collisionBoundary:v="clipping-ancestors",collisionPadding:h=5,arrowPadding:x=5,sticky:b=!1,disableAnchorTracking:S=!1,collisionAvoidance:y=et.DROPDOWN_COLLISION_AVOIDANCE,style:R,...E}=e,{store:M}=s(),C=function(){let e=t.useContext($);if(void 0===e)throw Error((0,n.default)(32));return e}(),I=c(!0),w=M.useState("parent"),T=M.useState("floatingRootContext"),P=M.useState("floatingTreeRoot"),N=M.useState("mounted"),j=M.useState("open"),A=M.useState("modal"),D=M.useState("openMethod"),z=M.useState("activeTriggerElement"),F=M.useState("transitionStatus"),_=M.useState("positionerElement"),U=M.useState("instantType"),H=M.useState("adaptiveOrigin"),B=M.useState("lastOpenChangeReason"),G=M.useState("floatingNodeId"),K=M.useState("floatingParentNodeId"),Y=T.useState("domReferenceElement"),V=t.useRef(null),W=(0,en.useAnimationsFinished)(_),ei=i,es=g,ea=m,eu=f,el=y;"context-menu"===w.type&&(ei=i??w.context?.anchor,eu=eu??"start",d||"center"===eu||(ea=e.alignOffset??2,es=e.sideOffset??-5));let ed=d,ec=eu;"menu"===w.type?(ed=ed??"inline-end",ec=ec??"start",el=e.collisionAvoidance??et.POPUP_COLLISION_AVOIDANCE):"menubar"===w.type&&(ed=ed??("vertical"===w.context.orientation?"inline-end":"bottom"),ec=ec??"start");let ep="context-menu"===w.type,ef=(0,X.useAnchorPositioning)({anchor:ei,floatingRootContext:T,positionMethod:I?"fixed":a,mounted:N,side:ed,sideOffset:es,align:ec,alignOffset:ea,arrowPadding:ep?0:x,collisionBoundary:v,collisionPadding:h,sticky:b,nodeId:G,keepMounted:C,disableAnchorTracking:S,collisionAvoidance:el,shift:ep?{crossAxis:!("side"in el&&"flip"===el.side),rootBoundary:"layoutViewport"}:void 0,externalTree:P,adaptiveOrigin:H});t.useEffect(()=>{function e(e){e.open&&(e.parentNodeId===G&&M.set("hoverEnabled",!1),e.nodeId!==G&&e.parentNodeId===M.select("floatingParentNodeId")&&M.setOpen(!1,(0,k.createChangeEventDetails)(p.REASONS.siblingOpen)))}return P.events.on("menuopenchange",e),()=>{P.events.off("menuopenchange",e)}},[M,P.events,G]),t.useEffect(()=>{if(null!=M.select("floatingParentNodeId"))return P.events.on("menuopenchange",e),()=>{P.events.off("menuopenchange",e)};function e(e){if(e.open||e.nodeId!==M.select("floatingParentNodeId"))return;let t=e.reason??p.REASONS.siblingOpen;M.setOpen(!1,(0,k.createChangeEventDetails)(t))}},[P.events,M]);let eg=(0,J.useTimeout)();t.useEffect(()=>{j||eg.clear()},[j,eg]),t.useEffect(()=>{function e(e){if(j&&e.nodeId===M.select("floatingParentNodeId"))if(e.target&&z&&z!==e.target){let e=M.select("closeDelay");e>0?eg.isStarted()||eg.start(e,()=>{M.setOpen(!1,(0,k.createChangeEventDetails)(p.REASONS.siblingOpen))}):M.setOpen(!1,(0,k.createChangeEventDetails)(p.REASONS.siblingOpen))}else eg.clear()}return P.events.on("itemhover",e),()=>{P.events.off("itemhover",e)}},[P.events,j,z,M,eg]),t.useEffect(()=>{let e={open:j,nodeId:G,parentNodeId:K,reason:M.select("lastOpenChangeReason")};P.events.emit("menuopenchange",e)},[P.events,j,M,G,K]),(0,L.useIsoLayoutEffect)(()=>{let e=V.current;if(Y&&(V.current=Y),e&&Y&&Y!==e){M.set("instantType",void 0);let e=new AbortController;return W(()=>{M.set("instantType","trigger-change")},e.signal),()=>{e.abort()}}},[Y,W,M]);let em={open:j,side:ef.side,align:ef.align,anchorHidden:ef.anchorHidden,nested:"menu"===w.type,instant:U},ev="menubar"===w.type&&w.context.modal,eh=A&&B!==p.REASONS.triggerHover;(0,er.useAnchoredPopupScrollLock)(j&&(ev||eh),"touch"===D,_,z);let ex=(0,eo.usePositioner)(e,em,{styles:ef.positionerStyles,transitionStatus:F,props:E,refs:[r,M.useStateSetter("positionerElement")],hidden:!N,inert:!j}),eb=N&&"menu"!==w.type&&("menubar"!==w.type&&A&&B!==p.REASONS.triggerHover||"menubar"===w.type&&w.context.modal),eS=null;return"menubar"===w.type?eS=w.context.contentElement:void 0===w.type&&(eS=z),(0,O.jsxs)(o.Provider,{value:ef,children:[eb&&(0,O.jsx)(ee.InternalBackdrop,{ref:"context-menu"===w.type||"nested-context-menu"===w.type?w.context.internalBackdropRef:null,inert:(0,q.inertValue)(!j),cutout:eS}),(0,O.jsx)(Q.FloatingNode,{id:G,children:(0,O.jsx)(Z.CompositeList,{elementsRef:M.context.itemDomElements,labelsRef:M.context.itemLabels,children:ex})})]})});e.s(["MenuPositioner",0,ei],82264);var es=e.i(67865);let ea=t.createContext(void 0),eu=t.memo(t.forwardRef(function(e,n){let{render:o,className:r,value:i,defaultValue:s,onValueChange:u,disabled:l=!1,style:d,"aria-labelledby":c,...p}=e,[f,m]=t.useState(void 0),[v,h]=(0,g.useControlled)({controlled:i,default:s,name:"MenuRadioGroup"}),x=(0,es.useStableCallback)((e,t)=>{u?.(e,t),t.isCanceled||h(e)}),b=(0,a.useRenderElement)("div",e,{state:{disabled:l},ref:n,props:{role:"group","aria-labelledby":c??f,"aria-disabled":l||void 0,...p}}),S=t.useMemo(()=>({value:v,setValue:x,disabled:l}),[v,x,l]);return(0,O.jsx)(A.Provider,{value:m,children:(0,O.jsx)(ea.Provider,{value:S,children:b})})}));e.s(["MenuRadioGroup",0,eu],62050);let el=t.createContext(void 0),ed=t.forwardRef(function(e,o){let{render:i,className:u,id:l,label:d,nativeButton:c=!1,disabled:f=!1,closeOnClick:g=!1,value:v,style:h,...x}=e,b=(0,C.useCompositeListItem)({guess:!0,label:d}),S=r(!0),y=(0,I.useBaseUiId)(l),{store:R}=s(),T=R.useState("isActive",b.index),P=R.useState("itemProps"),{value:N,setValue:j,disabled:A}=function(){let e=t.useContext(ea);if(void 0===e)throw Error((0,n.default)(34));return e}(),D=R.useState("disabled"),L=f||A||D,z=N===v,{getItemProps:F,itemRef:_}=M({closeOnClick:g,disabled:L,highlighted:T,id:y,store:R,nativeButton:c,nodeId:S?.context.nodeId,itemMetadata:E}),U=t.useMemo(()=>({disabled:L,highlighted:T,checked:z}),[L,T,z]),H=(0,a.useRenderElement)("div",e,{state:U,stateAttributesMapping:w,props:[P,{role:"menuitemradio","aria-checked":z,onClick:function(e){j(v,(0,k.createChangeEventDetails)(p.REASONS.itemPress,e.nativeEvent,void 0,{preventUnmountOnClose:m.NOOP}))}},x,F],ref:[_,o,b.ref]});return(0,O.jsx)(el.Provider,{value:U,children:H})});e.s(["MenuRadioItem",0,ed],82593);let ec=t.forwardRef(function(e,o){let{render:r,className:i,style:s,keepMounted:u=!1,...l}=e,d=function(){let e=t.useContext(el);if(void 0===e)throw Error((0,n.default)(35));return e}(),c=t.useRef(null),{transitionStatus:p,mounted:f,setMounted:g}=(0,P.useTransitionStatus)(d.checked);(0,N.useOpenChangeComplete)({batch:!0,enabled:!d.checked,open:d.checked,ref:c,onComplete(){d.checked||g(!1)}});let m={checked:d.checked,disabled:d.disabled,highlighted:d.highlighted,transitionStatus:p};return(0,a.useRenderElement)("span",e,{state:m,stateAttributesMapping:w,ref:[o,c],props:{"aria-hidden":!0,...l},enabled:u||f})});e.s(["MenuRadioItemIndicator",0,ec],5953);var ep=e.i(83977),ef=e.i(88940),eg=e.i(96499),em=e.i(17989),ev=e.i(60891),eh=e.i(5049),ex=e.i(50527);let eb=t.createContext(null);function eS(e){let o=t.useContext(eb);if(null===o&&!e)throw Error((0,n.default)(5));return o}e.s(["useMenubarContext",0,eS],7447);var ey=e.i(72855),eR=e.i(32199),eE=e.i(26352),eM=e.i(79248),eC=e.i(18478),eI=e.i(16786),ew=e.i(90627);let ek={...eI.popupStoreSelectors,disabled:e=>"menubar"===e.parent.type&&e.parent.context.disabled||e.disabled,modal:e=>(void 0===e.parent.type||"context-menu"===e.parent.type)&&(e.modal??!0),openMethod:e=>e.openMethod,allowMouseEnter:e=>e.allowMouseEnter,highlightItemOnHover:e=>e.highlightItemOnHover,parent:e=>e.parent,rootId:e=>"menu"===e.parent.type?e.parent.store.select("rootId"):void 0!==e.parent.type?e.parent.context.rootId:e.rootId,activeIndex:e=>e.activeIndex,isActive:(e,t)=>e.activeIndex===t,hoverEnabled:e=>e.hoverEnabled,instantType:e=>e.instantType,lastOpenChangeReason:e=>e.openChangeReason,floatingTreeRoot:e=>"menu"===e.parent.type?e.parent.store.select("floatingTreeRoot"):e.floatingTreeRoot,floatingNodeId:e=>e.floatingNodeId,floatingParentNodeId:e=>e.floatingParentNodeId,itemProps:e=>e.itemProps,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin,keyboardEventRelay:e=>e.keyboardEventRelay?e.keyboardEventRelay:"menu"===e.parent.type?e.parent.store.select("keyboardEventRelay"):void 0};class eO extends eE.ReactStore{constructor(e,t,n=!1){const o=new ew.PopupTriggerMap;super(eP(o,t,n,e),eT(o),ek),this.unsubscribeParentListener=this.observe("parent",e=>{if(this.unsubscribeParentListener?.(),"menu"===e.type){let t=e.store.select("rootId"),n=e.store.select("floatingTreeRoot"),o=e.store.select("keyboardEventRelay");this.unsubscribeParentListener=e.store.subscribe(()=>{let r=e.store.select("rootId"),i=e.store.select("floatingTreeRoot"),s=e.store.select("keyboardEventRelay");(t!==r||n!==i||o!==s)&&(t=r,n=i,o=s,this.notifyAll())}),this.context.allowMouseUpTriggerRef=e.store.context.allowMouseUpTriggerRef;return}void 0!==e.type&&(this.context.allowMouseUpTriggerRef=e.context.allowMouseUpTriggerRef),this.unsubscribeParentListener=null})}setOpen(e,t){this.state.floatingRootContext.context.events.emit("setOpen",{open:e,eventDetails:t})}unsubscribeParentListener=null}function eT(e){return{positionerRef:t.createRef(),popupRef:t.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},allowMouseUpTriggerRef:{current:!1},triggerFocusTargetRef:t.createRef(),beforeContentFocusGuardRef:t.createRef(),onOpenChangeComplete:void 0,triggerElements:e}}function eP(e,t,n=!1,o){return{...(0,eI.createInitialPopupStoreState)(e,t,n),disabled:!1,modal:!0,openMethod:null,allowMouseEnter:!1,highlightItemOnHover:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new eM.FloatingTreeStore,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:m.EMPTY_OBJECT,keyboardEventRelay:void 0,closeDelay:0,adaptiveOrigin:void 0,...o}}e.s(["MenuStore",0,eO,"createNullMenuStore",0,function(){let e=new ew.PopupTriggerMap;return Object.assign(new eC.NullStore(Object.freeze(eP(e)),Object.freeze(eT(e)),ek),{setOpen:m.NOOP})}],36481);var eN=e.i(64111);let ej=t.createContext(void 0);function eA(){return t.useContext(ej)}e.s(["MenuSubmenuRootContext",0,ej,"useMenuSubmenuRootContext",0,eA],74671);let eD=(0,eg.fastComponent)(function(e){var n,o,r;let a,{children:u,open:l,onOpenChange:d,onOpenChangeComplete:f,defaultOpen:g=!1,disabled:v=!1,modal:h,loopFocus:x=!0,orientation:S="vertical",actionsRef:y,closeParentOnEsc:R=!1,handle:E,triggerId:M,defaultTriggerId:C=null,highlightItemOnHover:I=!0}=e,w=c(!0),T=s(!0),P=eS(!0),N=eA(),j=t.useMemo(()=>N&&T?{type:"menu",store:T.store}:P?{type:"menubar",context:P}:w&&!T?{type:"context-menu",context:w}:{type:void 0},[w,T,P,N]),A=(0,ep.useId)(),D=(0,ep.useId)(),z=(0,Q.useFloatingParentNodeId)(),F="menu"===j.type?j.store:void 0,_=(l??g)&&F?.state.transitionStatus==="starting",U=(0,ef.useRefWithInit)(()=>_?F?.state.instantType:void 0).current,H=(n={open:g,openProp:l,activeTriggerId:C,triggerIdProp:M,parent:j,disabled:v,highlightItemOnHover:I,modal:void 0===j.type?h:void 0,rootId:A,instantType:U},o=D,r=null!=z,(0,ef.useRefWithInit)(()=>new eO(n,o,r)).current);H.useControlledProp("openProp",l),H.useControlledProp("triggerIdProp",M),H.useContextCallback("onOpenChangeComplete",f);let B=H.useState("floatingTreeRoot"),G=(0,Q.useFloatingNodeId)(B),K=H.useState("open"),Y=H.useState("activeTriggerElement"),V=H.useState("positionerElement"),$=H.useState("hoverEnabled"),W=H.useState("disabled"),q=H.useState("lastOpenChangeReason"),X=H.useState("parent"),Z=H.useState("activeIndex"),ee=H.useState("payload"),eo=H.useState("floatingParentNodeId"),er=t.useRef(null),ei=t.useRef("context-menu"!==X.type),ea=(0,J.useTimeout)(),eu=t.useRef(!0),el=(0,J.useTimeout)(),ed=null!=eo,{openMethod:ec,triggerProps:eg}=(0,eR.useOpenInteractionType)(K);H.useSyncedValues({disabled:v,highlightItemOnHover:I,modal:void 0===X.type?h:void 0,openMethod:ec,rootId:A}),(0,eN.useImplicitActiveTrigger)(H);let{forceUnmount:eb,transitionStatus:eE}=(0,eN.useOpenStateTransitions)(K,H,()=>{H.set("allowMouseEnter",!1)},_),eM=(0,en.useAnimationsFinished)(H.context.popupRef);t.useEffect(()=>{if(void 0===U)return;let e=()=>{H.state.instantType===U&&H.set("instantType",void 0)};if(!K)return void e();if(void 0!==eE)return;if(null==H.context.popupRef.current)return void e();let t=new AbortController;return eM(e,t.signal),()=>{t.abort()}},[U,K,eE,eM,H]),(0,L.useIsoLayoutEffect)(()=>{w&&!T?H.update({parent:{type:"context-menu",context:w},floatingNodeId:G,floatingParentNodeId:z}):T&&H.update({floatingNodeId:G,floatingParentNodeId:z})},[w,T,G,z,H]),t.useEffect(()=>{if(K||(er.current=null),"context-menu"===X.type){if(!K){ea.clear(),ei.current=!1;return}ea.start(500,()=>{ei.current=!0})}},[ea,K,X.type]),(0,L.useIsoLayoutEffect)(()=>{K||$||H.set("hoverEnabled",!0)},[K,$,H]);let eC=(0,es.useStableCallback)((e,t)=>{let n=t.reason;if(!e&&!H.select("open")||K===e&&t.trigger===Y&&q===n)return;let o=(0,eN.attachPreventUnmountOnClose)(t);if(e||null!=t.trigger||(t.trigger=Y??void 0),d?.(e,t),t.isCanceled)return;H.state.floatingRootContext.dispatchOpenChange(e,t);let r=t.event;if(!1===e&&r?.type==="click"&&"touch"===r.pointerType&&!eu.current)return;e&&n===p.REASONS.triggerFocus?(eu.current=!1,el.start(300,()=>{eu.current=!0})):(eu.current=!0,el.clear());let i=(n===p.REASONS.triggerPress||n===p.REASONS.itemPress)&&0===r.detail,s=!e&&(n===p.REASONS.escapeKey||null==n);er.current=t.event;let a=(0,eN.createPopupOpenState)(H.state,e,t.trigger,o());a.openChangeReason=n,"menubar"===X.type&&(n===p.REASONS.triggerFocus||n===p.REASONS.focusOut||n===p.REASONS.triggerHover||n===p.REASONS.listNavigation||n===p.REASONS.siblingOpen)?a.instantType="group":i||s?a.instantType=i?"click":"dismiss":a.instantType=void 0,H.update(a)}),eI=(0,ex.useSyncedFloatingRootContext)({popupStore:H,floatingRootContext:H.state.floatingRootContext,floatingId:D,nested:null!=z,onOpenChange:eC}),ew=eI.context.events;(0,L.useIsoLayoutEffect)(()=>{let e=({open:e,eventDetails:t})=>eC(e,t);return ew.on("setOpen",e),()=>{ew?.off("setOpen",e)}},[ew,eC]);let ek=t.useCallback(()=>{H.setOpen(!1,(0,k.createChangeEventDetails)(p.REASONS.imperativeAction))},[H]);t.useImperativeHandle(y,()=>({unmount:eb,close:ek}),[eb,ek]),"context-menu"===X.type&&(a=X.context),t.useImperativeHandle(a?.positionerRef,()=>V,[V]),t.useImperativeHandle(a?.actionsRef,()=>({setOpen:eC}),[eC]);let eT=(0,em.useDismiss)(eI,{enabled:!W,bubbles:{escapeKey:R&&"menu"===X.type},outsidePress:()=>"context-menu"!==X.type||er.current?.type==="contextmenu"||ei.current,externalTree:ed?B:void 0}),eP=(0,ey.useDirection)(),ej=t.useCallback(e=>{H.select("activeIndex")!==e&&H.set("activeIndex",e)},[H]),eD=(0,ev.useListNavigation)(eI,{enabled:!W,listRef:H.context.itemDomElements,activeIndex:Z,nested:void 0!==X.type,loopFocus:x,orientation:S,parentOrientation:"menubar"===X.type?X.context.orientation:void 0,rtl:"rtl"===eP,disabledIndices:m.EMPTY_ARRAY,onNavigate:ej,openOnArrowKeyDown:"context-menu"!==X.type,externalTree:ed?B:void 0,focusItemOnHover:I}),eL=t.useCallback(e=>{H.context.typingRef.current=e},[H]),ez=(0,eh.useTypeahead)(eI,{enabled:!W,listRef:H.context.itemLabels,elementsRef:H.context.itemDomElements,activeIndex:Z,resetMs:et.TYPEAHEAD_RESET_MS,onMatch:e=>{K&&e!==Z&&H.set("activeIndex",e)},onTyping:eL}),eF=t.useMemo(()=>{let e=(0,b.mergeProps)(ez.reference,eD.reference,eT.reference,{onMouseMove(){H.set("allowMouseEnter",!0)}},eg);return e["aria-haspopup"]="menu",e["aria-expanded"]=K,e},[H,ez.reference,eD.reference,eT.reference,eg,K]),e_=t.useMemo(()=>{let e=(0,b.mergeProps)(eD.trigger,eT.trigger,eg);return e["aria-haspopup"]="menu",e["aria-expanded"]=!1,e},[eD.trigger,eT.trigger,eg]);(0,ef.useRefWithInit)(()=>(H.update({inactiveTriggerProps:e_}),null));let eU=t.useMemo(()=>(0,b.mergeProps)(eN.FOCUSABLE_POPUP_PROPS,{id:D,role:"menu","aria-orientation":"horizontal"===S?"horizontal":void 0,"aria-labelledby":Y?.id,onMouseMove(){H.set("allowMouseEnter",!0),"menu"===X.type&&H.set("hoverEnabled",!1)},onClick(){H.select("hoverEnabled")&&H.set("hoverEnabled",!1)},onKeyDown(e){let t=H.select("keyboardEventRelay");t&&!e.isPropagationStopped()&&t(e)}},ez.floating,eD.floating,eT.floating),[Y,D,S,X.type,H,ez.floating,eD.floating,eT.floating]),eH=eD.item??m.EMPTY_OBJECT;(0,eN.usePopupInteractionProps)(H,{floatingRootContext:eI,activeTriggerProps:eF,inactiveTriggerProps:e_,popupProps:eU,itemProps:eH});let eB=t.useMemo(()=>({store:H,parent:j}),[H,j]),eG=(0,O.jsxs)(i.Provider,{value:eB,children:[E&&(0,O.jsx)(eN.PopupHandleAttachment,{handle:E,store:H}),"function"==typeof u?u({payload:ee}):u]});return void 0===X.type||"context-menu"===X.type?(0,O.jsx)(Q.FloatingTree,{externalTree:B,children:eG}):eG});e.s(["MenuRoot",0,eD],63947),e.s(["MenuSubmenuRoot",0,function(e){let n=s().store,o=t.useMemo(()=>({parentMenu:n}),[n]);return(0,O.jsx)(ej.Provider,{value:o,children:(0,O.jsx)(eD,{...e})})}],77450)},8619,e=>{"use strict";var t=e.i(56420);let n={name:"circle-user-round",size:24,node:[["path",{d:"M17.925 20.056a6 6 0 0 0-11.851.001",key:"z69sun"}],["circle",{cx:"12",cy:"11",r:"4",key:"1gt34v"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],aliases:["user-circle-2"]};n.node;let o=(0,t.default)(n);e.s(["CircleUserRound",0,o],8619)},83140,e=>{"use strict";var t=e.i(56420);let n={name:"code-xml",size:24,node:[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],aliases:["code-2"]};n.node;let o=(0,t.default)(n);e.s(["CodeXml",0,o],83140)},28276,91772,e=>{"use strict";var t=e.i(56420);let n={name:"compass",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",key:"9ktpf1"}]]};n.node;let o=(0,t.default)(n);e.s(["Compass",0,o],28276);let r={name:"laptop-minimal",size:24,node:[["rect",{width:"18",height:"12",x:"3",y:"4",rx:"2",ry:"2",key:"1qhy41"}],["line",{x1:"2",x2:"22",y1:"20",y2:"20",key:"ni3hll"}]],aliases:["laptop-2"]};r.node;let i=(0,t.default)(r);e.s(["LaptopMinimal",0,i],91772)},67784,e=>{"use strict";var t=e.i(56420);let n={name:"log-out",size:24,node:[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]]};n.node;let o=(0,t.default)(n);e.s(["LogOut",0,o],67784)},96699,e=>{"use strict";var t=e.i(56420);let n={name:"moon",size:24,node:[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]};n.node;let o=(0,t.default)(n);e.s(["Moon",0,o],96699)},7921,e=>{"use strict";var t=e.i(56420);let n={name:"network",size:24,node:[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]};n.node;let o=(0,t.default)(n);e.s(["Network",0,o],7921)},66794,e=>{"use strict";var t=e.i(56420);let n={name:"settings",size:24,node:[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]};n.node;let o=(0,t.default)(n);e.s(["Settings",0,o],66794)},35965,95014,e=>{"use strict";var t=e.i(56420);let n={name:"sun",size:24,node:[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]};n.node;let o=(0,t.default)(n);e.s(["Sun",0,o],35965);var r=e.i(49635);e.s(["THEME_LABELS",0,{light:"Light",dark:"Dark",system:"System"},"applyTheme",0,function(e){let t=document.documentElement;t.dataset.theme=e;let n="dark"===e||"system"===e&&window.matchMedia("(prefers-color-scheme: dark)").matches;t.classList.toggle("dark",n)},"sessionSince",0,function(e,t){let n=new Date(e.since),o=n.toDateString()===t.toDateString()?(0,r.clockTime)(n):(0,r.shortDateTime)(n);return`Device \xb7 ${e.device}, since ${o}`}],95014)},95187,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o={callServer:function(){return i.callServer},createServerReference:function(){return a.createServerReference},findSourceMapURL:function(){return s.findSourceMapURL}};for(var r in o)Object.defineProperty(n,r,{enumerable:!0,get:o[r]});let i=e.r(32120),s=e.r(92245),a=e.r(35326)},57334,48990,e=>{"use strict";var t=e.i(43476);e.i(61027);var n=e.i(82370),o=e.i(89554),r=e.i(85996),i=e.i(71714),s=e.i(81194),a=e.i(1545),u=e.i(91384),l=e.i(58307),d=e.i(64270),c=e.i(19712),p=e.i(82264),f=e.i(62050),g=e.i(82593),m=e.i(5953),v=e.i(63947),h=e.i(77450),x=e.i(33332),b=e.i(71645),S=e.i(39957),y=e.i(8868),R=e.i(96499),E=e.i(67865),M=e.i(46376),C=e.i(56789),I=e.i(50316),w=e.i(85689),k=e.i(46420),O=e.i(13082),T=e.i(72135),P=e.i(79248),N=e.i(84446),j=e.i(78921),A=e.i(79938),D=e.i(52245),L=e.i(40886),z=e.i(64042),F=e.i(95530);function _(e){let{render:t,className:n,style:o,state:r=C.EMPTY_OBJECT,props:i=C.EMPTY_ARRAY,refs:s=C.EMPTY_ARRAY,metadata:a,stateAttributesMapping:u,tag:l="div",...d}=e,{compositeProps:c,compositeRef:p}=(0,F.useCompositeItem)({metadata:a});return(0,D.useRenderElement)(l,e,{state:r,ref:[p,...s],props:[c,...i,d],stateAttributesMapping:u})}e.s(["CompositeItem",0,_],48990);var U=e.i(38452),H=e.i(29315),B=e.i(59636),G=e.i(64111),K=e.i(46570),Y=e.i(88015),V=e.i(56434),$=e.i(7447),W=e.i(38396),q=e.i(52535),J=e.i(76782);let Q=(0,R.fastComponentRef)(function(e,n){let o,{render:r,className:i,style:s,disabled:a=!1,nativeButton:u=!0,id:l,openOnHover:d,delay:c=100,closeDelay:p=0,handle:f,payload:g,...m}=e,v=(0,j.useMenuRootContext)(!0),h=(0,B.usePopupHandleStore)(f)??v?.store;if(!h)throw Error((0,x.default)(85));let R=(0,Y.useBaseUiId)(l),F=h.useState("isTriggerActive",R),Q=h.useState("floatingRootContext"),X=h.useState("isOpenedByTrigger",R),Z=h.useState("triggerPopupId",R),ee=b.useRef(null),et=(o=(0,$.useMenubarContext)(!0),b.useMemo(()=>o?{type:"menubar",context:o}:{type:void 0},[o])),en=(0,U.useCompositeRootContext)(!0),eo=(0,k.useFloatingTree)(),er=b.useMemo(()=>eo??new P.FloatingTreeStore,[eo]),ei=(0,k.useFloatingNodeId)(er),es=(0,k.useFloatingParentNodeId)(),{registerTrigger:ea,isMountedByThisTrigger:eu}=(0,G.useTriggerDataForwarding)(R,ee,h,{payload:g,closeDelay:p,parent:et,floatingTreeRoot:er,floatingNodeId:ei,floatingParentNodeId:es,keyboardEventRelay:en?.relayKeyboardEvent}),el="menubar"===et.type,ed=h.useState("disabled"),ec=a||ed||el&&et.context.disabled,{getButtonProps:ep,buttonRef:ef}=(0,L.useButton)({disabled:ec,native:u});b.useEffect(()=>{X||void 0!==et.type||(h.context.allowMouseUpTriggerRef.current=!1)},[h,X,et.type]);let eg=b.useRef(null),em=(0,S.useTimeout)(),ev=(0,E.useStableCallback)(e=>{if(!eg.current)return;em.clear(),h.context.allowMouseUpTriggerRef.current=!1;let t=e.target;(0,N.contains)(eg.current,t)||(0,N.contains)(h.select("positionerElement"),t)||t===eg.current||null!=t&&function e(t){return(0,H.isHTMLElement)(t)&&t.hasAttribute("data-rootownerid")?t.getAttribute("data-rootownerid"):(0,H.isLastTraversableNode)(t)?void 0:e((0,H.getParentNode)(t))}(t)===h.select("rootId")||(0,z.isMouseWithinBounds)(e,eg.current)||er.events.emit("close",{domEvent:e,reason:V.REASONS.cancelOpen})});b.useEffect(()=>{X&&h.select("lastOpenChangeReason")===V.REASONS.triggerHover&&(0,y.ownerDocument)(eg.current).addEventListener("mouseup",ev,{once:!0})},[X,ev,h]);let eh=el&&et.context.hasSubmenuOpen,ex=d??eh,eb=(0,T.useHoverReferenceInteraction)(Q,{enabled:ex&&!ec&&(!el||eh&&!eu),handleClose:(0,I.safePolygon)({blockPointerEvents:!el}),mouseOnly:!0,move:!1,restMs:void 0===et.type?c:void 0,delay:{close:p},triggerElementRef:ee,externalTree:er,isActiveTrigger:F,isClosing:()=>"ending"===h.select("transitionStatus")}),eS=function(e,t){let n=(0,S.useTimeout)(),[o,r]=b.useState(!1);return(0,M.useIsoLayoutEffect)(()=>{e&&t===V.REASONS.triggerHover?(r(!0),n.start(W.PATIENT_CLICK_THRESHOLD,()=>{r(!1)})):e||(n.clear(),r(!1))},[e,t,n]),o}(X,h.select("lastOpenChangeReason")),ey=(0,w.useClick)(Q,{enabled:!ec,event:X&&el?"click":"mousedown",toggle:!0,ignoreMouse:!1,stickIfOpen:void 0===et.type&&eS}),eR=(0,O.useFocus)(Q,{enabled:!ec&&eh}),eE=function(e){let{enabled:t=!0,mouseDownAction:n,open:o}=e,r=b.useRef(!1);return b.useMemo(()=>t?{onMouseDown:e=>{("open"===n&&!o||"close"===n&&o)&&(r.current=!0,(0,y.ownerDocument)(e.currentTarget).addEventListener("click",()=>{r.current=!1},{once:!0}))},onClick:e=>{r.current&&(r.current=!1,e.preventBaseUIHandler())}}:C.EMPTY_OBJECT,[t,n,o])}({open:X,enabled:el,mouseDownAction:"open"}),eM=b.useMemo(()=>(0,J.mergeProps)(eR.reference,ey.reference),[eR.reference,ey.reference]),eC=h.useState("triggerProps",eu),{preFocusGuardRef:eI,handlePreFocusGuardFocus:ew,handleFocusTargetFocus:ek}=(0,K.useTriggerFocusGuards)(h,ee),eO={disabled:ec,open:X},eT=[eg,n,ef,ea,ee],eP=[eM,eb??C.EMPTY_OBJECT,eC,{"aria-haspopup":"menu","aria-controls":Z,id:R,onMouseDown:e=>{h.select("open")||(em.start(200,()=>{h.context.allowMouseUpTriggerRef.current=!0}),(0,y.ownerDocument)(e.currentTarget).addEventListener("mouseup",ev,{once:!0}))}},el?{role:"menuitem"}:{},eE,m,ep],eN=(0,D.useRenderElement)("button",e,{enabled:!el,stateAttributesMapping:A.pressableTriggerOpenStateMapping,state:eO,ref:eT,props:eP});return el?(0,t.jsx)(_,{tag:"button",render:r,className:i,style:s,state:eO,refs:eT,props:eP,stateAttributesMapping:A.pressableTriggerOpenStateMapping}):X?(0,t.jsxs)(b.Fragment,{children:[(0,t.jsx)(q.FocusGuard,{ref:eI,onFocus:ew},`${R}-pre-focus-guard`),(0,t.jsx)(b.Fragment,{children:eN},R),(0,t.jsx)(q.FocusGuard,{ref:h.context.triggerFocusTargetRef,onFocus:ek},`${R}-post-focus-guard`)]}):(0,t.jsx)(b.Fragment,{children:eN},R)});var X=e.i(3414),Z=e.i(18390);let ee=b.forwardRef(function(e,t){let{render:n,className:o,style:r,children:i,...s}=e,{store:a}=(0,j.useMenuRootContext)(),{side:u}=(0,X.useMenuPositionerContext)(),l=a.useState("instantType"),{children:d,state:c}=(0,Z.usePopupViewport)({store:a,side:u,children:i}),p={activationDirection:c.activationDirection,transitioning:c.transitioning,instant:l};return(0,D.useRenderElement)("div",e,{state:p,ref:t,props:[s,{children:d}],stateAttributesMapping:Z.popupViewportStateMapping})}),et=b.forwardRef(function(e,t){let{className:n,render:o,orientation:r="horizontal",style:i,...s}=e;return(0,D.useRenderElement)("div",e,{state:{orientation:r},ref:t,props:[{role:"separator","aria-orientation":r},s]})});var en=e.i(28744),eo=e.i(73553),er=e.i(66506),ei=e.i(74671);let es={"aria-expanded":void 0},ea=b.forwardRef(function(e,t){let{render:n,className:o,style:r,label:i,id:s,nativeButton:a=!1,openOnHover:u=!0,delay:l=100,closeDelay:d=0,disabled:c=!1,...p}=e,f=(0,ei.useMenuSubmenuRootContext)();if(!f?.parentMenu)throw Error((0,x.default)(37));let g=(0,eo.useCompositeListItem)({guess:!0,label:i}),m=(0,X.useMenuPositionerContext)(),{store:v}=(0,j.useMenuRootContext)(),h=(0,Y.useBaseUiId)(s),S=v.useState("open"),y=v.useState("floatingRootContext"),R=v.useState("floatingTreeRoot"),k=v.useState("triggerPopupId",h),O=(0,G.useTriggerRegistration)(h,v),P=(0,E.useStableCallback)(e=>{O(e),null!==e&&v.select("open")&&null==v.select("activeTriggerId")&&v.update({activeTriggerId:h??null,activeTriggerElement:e,closeDelay:d})}),N=b.useRef(null),L=b.useCallback(e=>{N.current=e,v.set("activeTriggerElement",e)},[v]);(0,M.useIsoLayoutEffect)(()=>(P(N.current),()=>P(null)),[P,h,v]),v.useSyncedValue("closeDelay",d);let z=f.parentMenu,F=v.useState("disabled"),_=z.useState("disabled"),U=c||F||_,H=z.useState("itemProps"),B=z.useState("isActive",g.index),K=b.useMemo(()=>({type:"submenu-trigger",setActive(){z.select("highlightItemOnHover")&&z.set("activeIndex",g.index)}}),[z,g.index]),{getItemProps:$,itemRef:W}=(0,er.useMenuItem)({closeOnClick:!1,disabled:U,highlighted:B,id:h,store:v,typingRef:z.context.typingRef,nativeButton:a,itemMetadata:K,nodeId:m?.context.nodeId}),q=v.useState("hoverEnabled"),J=(0,T.useHoverReferenceInteraction)(y,{enabled:q&&u&&!U,handleClose:(0,I.safePolygon)({blockPointerEvents:!0}),mouseOnly:!0,move:!0,restMs:l,delay:{open:l,close:d},shouldOpen:l>0?()=>z.select("allowMouseEnter"):void 0,triggerElementRef:N,externalTree:R,isClosing:()=>"ending"===v.select("transitionStatus"),guardStaleOpen:!0}),Q=(0,w.useClick)(y,{enabled:!U,event:"mousedown",toggle:!u,ignoreMouse:u,stickIfOpen:!1}).reference??C.EMPTY_OBJECT,Z=v.useState("triggerProps",!0);delete Z.id;let ee=v.useState("openMethod"),et=v.useState("lastOpenChangeReason")===V.REASONS.listNavigation||"keyboard"===ee,ea=S&&et&&en.platform.screenReader.voiceOver;return(0,D.useRenderElement)("div",e,{state:{disabled:U,highlighted:B,open:S},stateAttributesMapping:A.triggerOpenStateMapping,props:[Q,J,Z,H,ea?es:void 0,{"aria-controls":k,tabIndex:S||B?0:-1,onBlur(){B&&z.set("activeIndex",null)}},p,$],ref:[t,g.ref,W,P,L]})});var eu=e.i(36481),el=e.i(64170);class ed extends el.BasePopupHandle{constructor(){super((0,eu.createNullMenuStore)(),"Menu")}open(e){this.openByTrigger(e)}close(){this.closePopup()}get isOpen(){return this.attachedStore?.select("open")??!1}}e.s(["Arrow",()=>n.MenuArrow,"Backdrop",()=>o.MenuBackdrop,"CheckboxItem",()=>r.MenuCheckboxItem,"CheckboxItemIndicator",()=>i.MenuCheckboxItemIndicator,"Group",()=>s.MenuGroup,"GroupLabel",()=>a.MenuGroupLabel,"Handle",0,ed,"Item",()=>u.MenuItem,"LinkItem",()=>l.MenuLinkItem,"Popup",()=>d.MenuPopup,"Portal",()=>c.MenuPortal,"Positioner",()=>p.MenuPositioner,"RadioGroup",()=>f.MenuRadioGroup,"RadioItem",()=>g.MenuRadioItem,"RadioItemIndicator",()=>m.MenuRadioItemIndicator,"Root",()=>v.MenuRoot,"Separator",0,et,"SubmenuRoot",()=>h.MenuSubmenuRoot,"SubmenuTrigger",0,ea,"Trigger",0,Q,"Viewport",0,ee,"createHandle",0,function(){return new ed}],60948);var ec=e.i(60948),ec=ec,ep=e.i(89664),ef=e.i(90063);e.s(["DropdownMenu",0,function(e){return(0,t.jsx)(ec.Root,{"data-slot":"dropdown-menu",...e})},"DropdownMenuContent",0,function({align:e="end",side:n="bottom",sideOffset:o=4,className:r,...i}){return(0,t.jsx)(ec.Portal,{children:(0,t.jsx)(ec.Positioner,{className:"isolate z-50 outline-none",align:e,side:n,sideOffset:o,children:(0,t.jsx)(ec.Popup,{"data-slot":"dropdown-menu-content",className:(0,ef.classNames)("max-h-(--available-height) min-w-48 origin-(--transform-origin) overflow-y-auto rounded-xl border border-border bg-popover p-1 text-popover-foreground shadow-lg duration-(--duration-fast) outline-none data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",r),...i})})})},"DropdownMenuGroup",0,function(e){return(0,t.jsx)(ec.Group,{"data-slot":"dropdown-menu-group",...e})},"DropdownMenuItem",0,function({className:e,variant:n="default",...o}){return(0,t.jsx)(ec.Item,{"data-slot":"dropdown-menu-item","data-variant":n,className:(0,ef.classNames)("relative flex h-8.5 items-center gap-2.5 rounded-sm px-2.5 text-body text-foreground outline-none select-none data-highlighted:bg-accent focus-visible:outline-2 focus-visible:outline-ring data-disabled:pointer-events-none data-disabled:opacity-45 data-[variant=destructive]:text-destructive-text [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-(--size-icon) [&_svg]:text-muted-foreground data-[variant=destructive]:[&_svg]:text-destructive-text",e),...o})},"DropdownMenuLabel",0,function({className:e,...n}){return(0,t.jsx)(ec.GroupLabel,{"data-slot":"dropdown-menu-label",className:(0,ef.classNames)("px-2.5 pt-1.5 pb-1 text-caption text-muted-foreground",e),...n})},"DropdownMenuRadioGroup",0,function(e){return(0,t.jsx)(ec.RadioGroup,{"data-slot":"dropdown-menu-radio-group",...e})},"DropdownMenuRadioItem",0,function({className:e,children:n,...o}){return(0,t.jsxs)(ec.RadioItem,{"data-slot":"dropdown-menu-radio-item",className:(0,ef.classNames)("relative flex h-8.5 items-center gap-2.5 rounded-sm px-2.5 text-body text-foreground outline-none select-none data-highlighted:bg-accent focus-visible:outline-2 focus-visible:outline-ring data-disabled:pointer-events-none data-disabled:opacity-45 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-(--size-icon) [&_svg]:text-muted-foreground",e),...o,children:[n,(0,t.jsx)(ec.RadioItemIndicator,{className:"ml-auto flex",children:(0,t.jsx)(ep.Check,{"aria-hidden":!0,className:"text-foreground"})})]})},"DropdownMenuSeparator",0,function({className:e,...n}){return(0,t.jsx)(ec.Separator,{"data-slot":"dropdown-menu-separator",className:(0,ef.classNames)("-mx-1 my-1 h-px bg-border",e),...n})},"DropdownMenuTrigger",0,function(e){return(0,t.jsx)(ec.Trigger,{"data-slot":"dropdown-menu-trigger",...e})}],57334)},57957,e=>{"use strict";var t=e.i(43476),n=e.i(63707),o=e.i(8619),r=e.i(83140),i=e.i(28276),s=e.i(91772),a=e.i(11568),u=e.i(67784),l=e.i(46513),d=e.i(96699),c=e.i(7921),p=e.i(66794),f=e.i(35965),g=e.i(22016),m=e.i(71645),v=e.i(90063),h=e.i(31513),x=e.i(95014),b=e.i(94859),S=e.i(15905),y=e.i(57334),R=e.i(75305),E=e.i(60592);let M="Your account",C="Take the tour",I={light:f.Sun,dark:d.Moon,system:l.Monitor};function w(e){return e?.kind==="viewer"?{name:"viewer",detail:"Read-only"}:{name:"Operator",detail:e?.email??" "}}function k(e){return e?.kind!=="viewer"}function O(e,t){return t.find(t=>t===e)}function T({account:e,accountName:n,now:o}){let{name:r,detail:i}=w(e);return(0,t.jsxs)("div",{className:"flex flex-col gap-2 px-2.5 pt-2 pb-2.5",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,t.jsx)(b.Avatar,{kind:"account",size:28,name:r}),(0,t.jsxs)("span",{className:"flex min-w-0 flex-col",children:[(0,t.jsx)("span",{className:"truncate text-body font-medium text-foreground",children:r}),(0,t.jsx)("span",{"data-testid":"account-detail",className:"truncate text-caption text-muted-foreground",children:e?.kind==="viewer"?"Sees the whole fleet, changes nothing":i})]})]}),(0,t.jsxs)("p",{"data-testid":"account-session",className:"flex items-start gap-1.5 text-caption text-muted-foreground",children:[(0,t.jsx)(s.LaptopMinimal,{"aria-hidden":!0,className:"mt-px size-(--size-icon-sm) shrink-0"}),e?(0,t.jsxs)("span",{children:["This session: ",(0,t.jsx)("span",{className:"font-medium text-foreground",children:(0,x.sessionSince)(e.session,o)})]}):(0,t.jsx)("span",{children:"This session"})]}),e?.session.accountId?(0,t.jsxs)("p",{"data-testid":"account-signed-in-as",className:"truncate text-caption text-muted-foreground",children:["Signed in as ",(0,t.jsx)("span",{className:"font-medium text-foreground",children:n??e.session.accountId})]}):null]})}function P({isSigningOut:e}){return e?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(a.LoaderCircle,{"aria-hidden":!0,className:"animate-spin motion-reduce:animate-none"}),"Signing out"]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(u.LogOut,{"aria-hidden":!0}),"Sign out"]})}e.s(["AccountMenu",0,function({account:e,accountName:r,themes:s,onThemeChange:a,onSignOut:u,isSigningOut:l,now:d,accountUrl:c,onTakeTour:p}){let{name:f,detail:g}=w(e),m=e?.kind==="operator"?e.theme:void 0;return(0,t.jsxs)(y.DropdownMenu,{children:[(0,t.jsxs)(y.DropdownMenuTrigger,{"data-testid":"account-menu","aria-label":`Account menu, ${f}${e?`, ${g}`:""}`,className:"flex w-full items-center gap-2.5 rounded-md p-1.5 text-left transition-colors duration-(--duration-fast) outline-none hover:bg-accent focus-visible:outline-2 focus-visible:outline-ring aria-expanded:bg-accent max-lg:justify-center",children:[(0,t.jsx)(b.Avatar,{kind:"account",size:28,name:f}),(0,t.jsxs)("span",{className:"flex min-w-0 grow flex-col max-lg:sr-only",children:[(0,t.jsx)("span",{className:"truncate text-body font-medium text-foreground",children:f}),(0,t.jsx)("span",{className:"truncate text-caption text-muted-foreground",children:g})]}),(0,t.jsx)(n.ChevronsUpDown,{"aria-hidden":!0,className:"size-(--size-icon) shrink-0 text-muted-foreground max-lg:hidden"})]}),(0,t.jsxs)(y.DropdownMenuContent,{side:"top",align:"start",className:"w-64",children:[(0,t.jsx)(T,{account:e,accountName:r,now:d}),void 0===c||e?.kind==="viewer"?null:(0,t.jsxs)(y.DropdownMenuItem,{"data-testid":"account-hosted",render:e=>(0,t.jsx)("a",{...e,href:c,children:e.children}),children:[(0,t.jsx)(o.CircleUserRound,{"aria-hidden":!0}),M]}),void 0===p?null:(0,t.jsxs)(y.DropdownMenuItem,{"data-testid":"account-take-tour",onClick:p,children:[(0,t.jsx)(i.Compass,{"aria-hidden":!0}),C]}),k(e)&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(y.DropdownMenuSeparator,{}),(0,t.jsxs)(y.DropdownMenuGroup,{children:[(0,t.jsx)(y.DropdownMenuLabel,{children:"Theme"}),(0,t.jsx)(y.DropdownMenuRadioGroup,{value:m??null,onValueChange:e=>{let t=O(e,s);void 0!==t&&a(t)},children:s.map(n=>{let o=I[n];return(0,t.jsxs)(y.DropdownMenuRadioItem,{value:n,disabled:void 0===e,closeOnClick:!1,"data-testid":`account-theme-${n}`,children:[(0,t.jsx)(o,{"aria-hidden":!0}),x.THEME_LABELS[n]]},n)})})]})]}),(0,t.jsx)(y.DropdownMenuSeparator,{}),(0,t.jsx)(y.DropdownMenuItem,{"data-testid":"account-sign-out",disabled:l,closeOnClick:!1,onClick:u,children:(0,t.jsx)(P,{isSigningOut:l})})]})]})},"AccountMenuSheet",0,function({account:e,accountName:n,themes:s,onThemeChange:a,onSignOut:u,isSigningOut:l,now:d,accountUrl:f,onTakeTour:y,settingsHref:N,networkHref:j}){let[A,D]=(0,m.useState)(!1),{name:L,detail:z}=w(e),F=e?.kind==="operator"?e.theme:void 0;return(0,t.jsxs)(R.Sheet,{open:A,onOpenChange:D,children:[(0,t.jsx)(R.SheetTrigger,{"data-testid":"account-menu","aria-label":`Account menu, ${L}${e?`, ${z}`:""}`,className:"inline-flex size-(--size-control-touch) shrink-0 items-center justify-center rounded-full outline-none focus-visible:outline-2 focus-visible:outline-ring",children:(0,t.jsx)(b.Avatar,{kind:"account",size:28,name:L})}),(0,t.jsxs)(R.SheetContent,{side:"bottom","data-testid":"account-sheet",className:"gap-3",children:[(0,t.jsx)(R.SheetTitle,{className:"sr-only",children:"Account"}),(0,t.jsx)(T,{account:e,accountName:n,now:d}),void 0===f||e?.kind==="viewer"?null:(0,t.jsxs)("a",{href:f,"data-testid":"account-hosted",className:"flex h-(--size-control-touch) items-center gap-2.5 border-t border-border pt-3 text-body-touch text-foreground outline-none focus-visible:outline-2 focus-visible:outline-ring [&_svg]:size-(--size-icon) [&_svg]:text-muted-foreground",children:[(0,t.jsx)(o.CircleUserRound,{"aria-hidden":!0}),M]}),void 0===y?null:(0,t.jsxs)("button",{type:"button","data-testid":"account-take-tour",onClick:()=>{D(!1),y()},className:"flex h-(--size-control-touch) items-center gap-2.5 border-t border-border pt-3 text-body-touch text-foreground outline-none focus-visible:outline-2 focus-visible:outline-ring [&_svg]:size-(--size-icon) [&_svg]:text-muted-foreground",children:[(0,t.jsx)(i.Compass,{"aria-hidden":!0}),C]}),void 0===j?null:(0,t.jsxs)(g.default,{href:j,"data-testid":"account-network",onClick:()=>{D(!1)},className:"flex h-(--size-control-touch) items-center gap-2.5 border-t border-border pt-3 text-body-touch text-foreground outline-none focus-visible:outline-2 focus-visible:outline-ring [&_svg]:size-(--size-icon) [&_svg]:text-muted-foreground",children:[(0,t.jsx)(c.Network,{"aria-hidden":!0}),"Network"]}),void 0===N?null:(0,t.jsxs)(g.default,{href:N,"data-testid":"account-settings",onClick:()=>{D(!1)},className:"flex h-(--size-control-touch) items-center gap-2.5 border-t border-border pt-3 text-body-touch text-foreground outline-none focus-visible:outline-2 focus-visible:outline-ring [&_svg]:size-(--size-icon) [&_svg]:text-muted-foreground",children:[(0,t.jsx)(p.Settings,{"aria-hidden":!0}),"Settings"]}),k(e)&&(0,t.jsxs)("div",{className:"flex flex-col gap-1.5 border-t border-border pt-3",children:[(0,t.jsx)("p",{className:"text-caption text-muted-foreground",children:"Theme"}),(0,t.jsx)(E.Tabs,{value:F??null,onValueChange:e=>{let t=O(e,s);void 0!==t&&a(t)},children:(0,t.jsx)(E.TabsList,{"aria-label":"Theme",className:"w-full",children:s.map(n=>{let o=I[n];return(0,t.jsxs)(E.TabsTrigger,{value:n,disabled:void 0===e,"data-testid":`account-theme-${n}`,className:"grow",children:[(0,t.jsx)(o,{"aria-hidden":!0}),x.THEME_LABELS[n]]},n)})})})]}),(0,t.jsxs)("a",{href:h.SOURCE_URL,target:"_blank",rel:"noreferrer","data-testid":"account-source",className:"flex h-(--size-control-touch) items-center gap-2.5 border-t border-border pt-3 text-body-touch text-foreground outline-none focus-visible:outline-2 focus-visible:outline-ring [&_svg]:size-(--size-icon) [&_svg]:text-muted-foreground",children:[(0,t.jsx)(r.CodeXml,{"aria-hidden":!0}),"Source on GitHub",(0,t.jsx)("span",{className:"sr-only",children:" (opens in a new tab)"})]}),(0,t.jsx)("button",{type:"button","data-testid":"account-sign-out",disabled:l,onClick:u,className:(0,v.classNames)("flex h-(--size-control-touch) items-center gap-2.5 border-t border-border pt-3 text-body-touch text-foreground outline-none focus-visible:outline-2 focus-visible:outline-ring disabled:opacity-60 [&_svg]:size-(--size-icon) [&_svg]:text-muted-foreground"),children:(0,t.jsx)(P,{isSigningOut:l})}),(0,t.jsx)(R.SheetClose,{render:(0,t.jsx)(S.Button,{size:"touch",className:"w-full"}),children:"Cancel"})]})]})}])},87964,e=>{"use strict";var t=e.i(71645);let n=(0,t.createContext)(void 0);e.s(["ConsoleFrameContext",0,n,"destinationOf",0,function(e){let[,t=""]=e.split("/");switch(t){case"needs-crew":case"squadrons":case"trierarchs":case"inbox":case"network":case"settings":return t;case"fleet-health":case"needs-attention":return"health";default:return"overview"}},"useConsoleFrame",0,function(){let e=(0,t.useContext)(n);if(void 0===e)throw Error("useConsoleFrame runs inside the signed-in route layout, which provides it");return e}])},76580,2660,94070,e=>{"use strict";var t=e.i(66027),n=e.i(78485);function o(e){if("refused"===e.kind)throw Error(e.message);return e.data}e.s(["useConsoleRead",0,function(e){let o=(0,t.useQuery)(e);return(0,n.useSignInWhenSessionEnds)([o.error]),o}],76580),e.s(["dataOf",0,o],2660);let r="The console did not answer: try again in a moment";class i extends Error{data;constructor(e,t){super(e),this.data=t?{code:"UNAUTHORIZED",refusal:"SIGNED_IN_ELSEWHERE"}:{code:"UNAUTHORIZED"}}}async function s(e,t=fetch){var n;let a,u,l=void 0===e.input?"":`?input=${encodeURIComponent(JSON.stringify(e.input))}`;try{let n=await t(`/api/reads/${e.read}${l}`,{cache:"no-store"});u=n.status,a=await n.json()}catch{throw Error(r)}if(!("object"==typeof(n=a)&&null!==n&&"kind"in n&&("answered"===n.kind||"refused"===n.kind)))throw Error(r);if(401===u&&"refused"===a.kind)throw new i(a.message,"refusal"in a&&"SIGNED_IN_ELSEWHERE"===a.refusal);return o(a)}e.s(["fetchConsoleRead",0,s],94070)},86413,47249,e=>{"use strict";var t=e.i(54616),n=e.i(12598),o=e.i(76580),r=e.i(94070);function i(e){return"question"===e.kind?null===e.question.answer&&null===e.stale:"acknowledged"!==e.state}e.s(["isOpenEntry",0,i],47249);var s=e.i(2660),a=e.i(95187);let u=(0,a.createServerReference)("40954f70f40c72c560f440d902408ce0ba0e1e796e",a.callServer,void 0,a.findSourceMapURL,"answerQuestion");var l=e.i(27702);let d=["inbox"];function c(){return(0,o.useConsoleRead)({queryKey:d,queryFn:()=>(0,r.fetchConsoleRead)({read:"inbox"})})}function p(){let e=(0,l.useTRPC)(),t=(0,n.useQueryClient)();return async()=>{await Promise.all([t.invalidateQueries({queryKey:d}),t.invalidateQueries({queryKey:e.fleet.pathKey()})])}}e.s(["INBOX_KEY",0,d,"inboxPathOf",0,function(e){let t=new URLSearchParams;"open"!==e.filter&&t.set("filter",e.filter),void 0!==e.deliveryId&&t.set("message",e.deliveryId);let n=t.toString();return""===n?"/inbox":`/inbox?${n}`},"readInboxFilter",0,function(e){return"done"===e||"all"===e?e:"open"},"useAnswer",0,function(){let e=p();return(0,t.useMutation)({mutationFn:async e=>(0,s.dataOf)(await u(e)),onSuccess:e})},"useInboxEntries",0,c,"useMarkDone",0,function(){let e=(0,l.useTRPC)(),n=p();return(0,t.useMutation)(e.fleet.markDone.mutationOptions({onSuccess:n}))},"useMarkRead",0,function(){let e=(0,l.useTRPC)(),n=p();return(0,t.useMutation)(e.fleet.markRead.mutationOptions({onSuccess:n}))},"useOpenInboxCount",0,function(){return c().data?.filter(i).length},"useReply",0,function(){let e=(0,l.useTRPC)(),n=p();return(0,t.useMutation)(e.fleet.reply.mutationOptions({onSuccess:n}))}],86413)}]);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aeolus-fleet/console",
|
|
3
|
-
"version": "0.28.
|
|
3
|
+
"version": "0.28.1",
|
|
4
4
|
"description": "The Aeolus console: see every ship, answer your agents and manage the fleet from any device.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai-agents",
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
"postpack": "rm LICENSE"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@aeolus-fleet/common": "0.28.
|
|
44
|
-
"@aeolus-fleet/core": "0.28.
|
|
43
|
+
"@aeolus-fleet/common": "0.28.1",
|
|
44
|
+
"@aeolus-fleet/core": "0.28.1",
|
|
45
45
|
"@base-ui/react": "^1.8.0",
|
|
46
46
|
"@storybook/addon-vitest": "^10.6.1",
|
|
47
47
|
"@storybook/nextjs-vite": "^10.6.1",
|
package/README.md
CHANGED
|
@@ -41,7 +41,7 @@ Environment variables, read when the app runs, never when it is built:
|
|
|
41
41
|
| `AEOLUS_HOSTED_ANALYTICS_HOST` | unset | The provider's https address, such as `https://eu.i.posthog.com`. The web app's server sends there; the browser only ever posts to the web app's own `/api/analytics` |
|
|
42
42
|
| `AEOLUS_SQUADRONS_URL` | unset | Where squadrons runs, read by the web app's server only: the browser never calls squadrons. Unset means the console has no squadrons. Settings then connects it: the web app's server commissions the management ship (`squadrons`, with `fleet:read`, `fleet:commission`, `fleet:manage`, `labels:define`, `labels:assign`, `fleet:on-behalf` and `scopes:declare`) or gives it a new starting prompt, and hands its secret to squadrons server to server; no one sees the secret. It reaches the server at `AEOLUS_SERVER_INTERNAL_URL` (or `AEOLUS_SERVER_URL`) from the web app's server too |
|
|
43
43
|
| `AEOLUS_TRIERARCH_PLUGIN_URL` | unset | Where the trierarch plugin runs, read by the web app's server only: the browser never calls it. Unset means the console has no trierarch plugin. Settings then connects it: the web app's server commissions its ship (`trierarch-plugin`, with `fleet:read`, `fleet:commission`, `crew:assign`, `crew:run`, `labels:define` and `labels:assign`) or gives it a new starting prompt, and hands its secret to the trierarch plugin server to server; no one sees the secret |
|
|
44
|
-
| `AEOLUS_GATEWAY_URL` | unset | Where the gateway runs, read by the web app's server only: the browser never calls it. Unset means the console has no gateway. Settings then connects it: the web app's server commissions its ship (`gateway`, with `fleet:read`, `fleet:commission
|
|
44
|
+
| `AEOLUS_GATEWAY_URL` | unset | Where the gateway runs, read by the web app's server only: the browser never calls it. Unset means the console has no gateway. Settings then connects it: the web app's server commissions its ship (`gateway`, with `fleet:read`, `fleet:commission`, `fleet:on-behalf`, `scopes:declare` and `fleet:verify`) or gives it a new starting prompt, and hands its secret to the gateway server to server; no one sees the secret. The gateway serves its own pages |
|
|
45
45
|
| `AEOLUS_PAGASAE_URL`, `AEOLUS_PAGASAE_CONSOLE_TOKEN` | unset | pagasae's address and the token it knows as `CONSOLE_TOKEN`, read by the web app's server only. Set, the account menu shows the account signed in as argo by the name pagasae gives it, asked each time it shows and never stored (decisions 0054, 0058); unset, or while pagasae gives none, by its id |
|
|
46
46
|
| `PORT` | `3000` | Port to listen on |
|
|
47
47
|
| `HOST` | `127.0.0.1` | Interface to listen on |
|