@aeolus-fleet/console 0.28.2 → 0.28.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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_0i0l1qp._.js → 0ysl_console_features_trierarchs_ui_organisms_clear-worktree-dialog_tsx_0xsufp6._.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/_0eeox-9._.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/{_1gz4-du._.js → _0gaycoj._.js} +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/_0q3cblh._.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/_0qft7s4._.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/_0qo94ne._.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/_0ulogg0._.js +3 -0
- package/.next/standalone/packages/console/.next/server/chunks/ssr/_0z9_vmu._.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/{_1ahxcm_._.js → _13glq4v._.js} +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/{_0oso5ke._.js → _18wvycx._.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/{_0kf6nva._.js → _1goyv2m._.js} +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/_1svohzj._.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/_1yr1u1_._.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/{packages_console_02e024f._.js → packages_console_0tb6slk._.js} +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/{packages_console_0_14dli._.js → packages_console_10p4oa0._.js} +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/{packages_console_1xsnp3g._.js → packages_console_1e5xv3c._.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_components_organisms_crew-line-dialog_tsx_0gvko9u._.js → packages_console_components_organisms_crew-line-dialog_tsx_10ic0jx._.js} +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/{packages_console_features_1s0ws5z._.js → packages_console_features_10l91-9._.js} +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/{packages_console_features_squadrons_organisms_form-squadron-dialog_tsx_0u45tfm._.js → packages_console_features_squadrons_organisms_form-squadron-dialog_tsx_18a-ikh._.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/{0k37l03brt1lx.js → 07fu9dcwa8gxg.js} +1 -1
- package/.next/standalone/packages/console/.next/static/chunks/{1619u51m6z_zy.js → 0kuif7aw271c8.js} +1 -1
- package/.next/standalone/packages/console/.next/static/chunks/{0-fzym4ddbgfl.js → 0wfjsy5tg3f5e.js} +1 -1
- package/.next/standalone/packages/console/.next/static/chunks/{2lposccpgczy6.js → 1f9n-u_wk0h0z.js} +1 -1
- package/.next/standalone/packages/console/.next/static/chunks/{2luplqg0e_2uu.js → 1g0s6oau289ch.js} +1 -1
- package/.next/standalone/packages/console/.next/static/chunks/{12bv9goo6bo3g.js → 1lb3vicavory4.js} +1 -1
- package/.next/standalone/packages/console/.next/static/chunks/{2cgenpdif8p18.js → 1rncy8otm-mdl.js} +1 -1
- package/.next/standalone/packages/console/.next/static/chunks/{22sev5tbikm_p.js → 1y84-8pn5z-yf.js} +1 -1
- package/.next/standalone/packages/console/.next/static/chunks/{0qpp7ptesfktl.js → 2ffgwmm-2s67e.js} +1 -1
- package/.next/standalone/packages/console/.next/static/chunks/{1e5jqgsx_ixev.js → 2n5j8o83jx0pa.js} +1 -1
- package/.next/standalone/packages/console/.next/static/chunks/{0q7s6fjx5zvzy.js → 2rnnem2_dp22_.js} +1 -1
- package/.next/standalone/packages/console/.next/static/chunks/{02_0efuv8zr04.js → 2ut57cu4zz5tr.js} +1 -1
- package/.next/standalone/packages/console/.next/static/chunks/{14e-f0w_cfqhg.js → 2vrrs04ad7ixx.js} +1 -1
- package/.next/standalone/packages/console/.next/static/chunks/{2e383naxva7i6.js → 3698wv8cb8cwt.js} +1 -1
- package/.next/standalone/packages/console/.next/static/chunks/{3su35xz056zu0.js → 3cmed7o3h-y6p.js} +1 -1
- package/.next/standalone/packages/console/.next/static/chunks/{0u8cdjuofezss.js → 3e0k_3qlcm9yl.js} +1 -1
- package/.next/standalone/packages/console/.next/static/chunks/{41t0n1c_xovg1.js → 3e3zqxdrtx589.js} +1 -1
- package/.next/standalone/packages/console/.next/static/chunks/3pji8axxz6oas.js +1 -0
- package/.next/standalone/packages/console/.next/static/chunks/3xvonltm45tuc.js +1 -0
- package/.next/standalone/packages/console/package.json +3 -3
- package/package.json +3 -3
- package/.next/standalone/packages/console/.next/server/chunks/ssr/_0h21fie._.js +0 -3
- package/.next/standalone/packages/console/.next/static/chunks/2do8biailpt9q.js +0 -1
- package/.next/standalone/packages/console/.next/static/chunks/3l_z58wbwf7v6.js +0 -1
- /package/.next/standalone/packages/console/.next/static/{xh_6szRQLXv1U5hRaPsHB → mdxdjzB3-wk2MuucguEaJ}/_buildManifest.js +0 -0
- /package/.next/standalone/packages/console/.next/static/{xh_6szRQLXv1U5hRaPsHB → mdxdjzB3-wk2MuucguEaJ}/_clientMiddlewareManifest.js +0 -0
- /package/.next/standalone/packages/console/.next/static/{xh_6szRQLXv1U5hRaPsHB → mdxdjzB3-wk2MuucguEaJ}/_ssgManifest.js +0 -0
package/.next/standalone/packages/console/.next/static/chunks/{2e383naxva7i6.js → 3698wv8cb8cwt.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,24071,e=>{"use strict";var s=e.i(56420);let t={name:"chevron-left",size:24,node:[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]};t.node;let a=(0,s.default)(t);e.s(["ChevronLeft",0,a],24071)},67927,e=>{"use strict";var s=e.i(56420);let t={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};t.node;let a=(0,s.default)(t);e.s(["ChevronRight",0,a],67927)},66595,e=>{"use strict";var s=e.i(56420);let t={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};t.node;let a=(0,s.default)(t);e.s(["Search",0,a],66595)},19759,e=>{"use strict";var s=e.i(56420);let t={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"]};t.node;let a=(0,s.default)(t);e.s(["SquarePen",0,a],19759)},39334,e=>{"use strict";var s=e.i(43476),t=e.i(62687),a=e.i(65041),r=e.i(57665),n=e.i(71645),i=e.i(17540),l=e.i(90262),d=e.i(54492),o=e.i(5387),c=e.i(53573),u=e.i(15905);let m=(0,i.lazyDialog)(()=>e.A(5419).then(e=>e.CrewReleaseDialog),e=>e.isOpen);function h({ship:e}){let t=(0,l.useAccess)(),a=(0,o.useRemoveCrewRequest)(),[i,x]=(0,n.useState)(!1),p=(0,c.useShip)(i?e.id:void 0),f=(0,d.crewRequestStage)(e);return t.canManage&&"assigned"===f.kind&&"crashed"===f.status?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(u.Button,{size:"xs",icon:(0,s.jsx)(r.Power,{}),"data-testid":"needs-crew-release",onClick:()=>{a.reset(),x(!0)},children:"Release…"}),(0,s.jsx)(m,{shipName:e.name,stage:f,inFlightCount:p.data?.inFlightDeliveries??0,isOpen:i&&void 0!==p.data,onOpenChange:x,isPending:a.isPending,error:null===a.error?void 0:`${a.error.message} Nothing changed.`,onConfirm:()=>{a.mutate({shipId:e.id},{onSuccess:()=>{x(!1)}})}})]}):null}var x=e.i(21959),p=e.i(15327),f=e.i(18964),g=e.i(86875),j=e.i(22016),w=e.i(49841),b=e.i(49635),v=e.i(66390),y=e.i(67874),N=e.i(17981),k=e.i(88393),S=e.i(78865);function C({at:e,now:t}){let a=new Date(e);return(0,s.jsx)("time",{dateTime:e,title:(0,b.fullDateTime)(a),className:"tabular-nums",children:t.getTime()-a.getTime()<864e5?`Today, ${(0,b.clockTime)(a)}`:(0,b.shortDateTime)(a)})}function R({ship:e,now:t}){let a=(0,w.handCrewOf)(e);switch(a.kind){case"no-prompt":return(0,s.jsx)("span",{className:"text-muted-foreground",children:"No starting prompt issued"});case"prompt-unclaimed":return(0,s.jsxs)("span",{className:"flex flex-col",children:[(0,s.jsxs)("span",{children:["Prompt issued ",(0,s.jsx)(C,{at:a.issuedAt,now:t})]}),(0,s.jsx)("span",{className:"text-muted-foreground",children:"No session has taken it yet"})]});case"crew-ended":return(0,s.jsxs)("span",{className:"flex flex-col",children:[(0,s.jsx)("span",{children:"Was crewed by hand"}),null===a.endedAt?null:(0,s.jsxs)("span",{className:"text-muted-foreground",children:["Lease ended ",(0,s.jsx)(C,{at:a.endedAt,now:t})]})]})}}function q({ship:e}){let t=(0,d.crewRequestStage)(e);return"assigned"===t.kind?(0,s.jsxs)("span",{className:"flex flex-wrap items-center gap-x-2 gap-y-1",children:[(0,s.jsx)(S.StatusBadge,{status:t.status}),(0,s.jsxs)("span",{className:"inline-flex items-center gap-1",children:["on",(0,s.jsxs)(j.default,{href:`/trierarchs/${t.trierarch.id}`,className:"inline-flex items-center gap-1 font-medium underline decoration-input underline-offset-3 [&_svg]:size-(--size-icon-sm) [&_svg]:text-muted-foreground",children:[(0,s.jsx)(g.ShipWheel,{"aria-hidden":!0}),t.trierarch.name]})]})]}):(0,s.jsxs)("span",{className:"flex flex-wrap items-center gap-x-2 gap-y-1",children:[(0,s.jsx)(S.StatusBadge,{status:"needsCrew"}),(0,s.jsx)("span",{className:"text-muted-foreground",children:"needsCrew"===t.kind&&null!==t.reason?t.reason:"Not assigned yet"})]})}let z="grid items-center gap-x-4 gap-y-1.5 px-4 py-3 max-sm:grid-cols-1 max-sm:px-3.5 sm:grid-cols-[minmax(0,1fr)_minmax(0,1.6fr)_minmax(0,1fr)_minmax(0,11rem)]";function D({ships:e,hasTrierarchs:t,error:a,onRetry:r,actionOf:n,now:i}){return void 0!==a?(0,s.jsx)(N.InlineError,{variant:"page",title:"Couldn’t read the fleet",description:"Nothing changed.",detail:a,onRetry:r}):void 0===e?(0,s.jsx)(k.LoadingSkeleton,{variant:"table",rows:3,label:"Loading Needs crew"}):0===e.length?(0,s.jsx)(y.EmptyState,{icon:(0,s.jsx)(f.ListChecks,{"aria-hidden":!0}),title:"Nothing needs crew",description:t?"Every crew request is running. A request shows here while it waits for a trierarch, is crewing, restarting or crashed.":"No ship with a crew request awaits crew. Request a crew on a ship’s page to put it here."}):(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsxs)("div",{className:"overflow-hidden rounded-lg border border-border bg-card","data-testid":"needs-crew-list",children:[(0,s.jsxs)("div",{className:`${z} border-b border-border bg-muted py-2.5 text-caption font-medium text-muted-foreground max-sm:hidden`,"aria-hidden":!0,children:[(0,s.jsx)("span",{children:"Ship"}),(0,s.jsx)("span",{children:t?"Status":"Crew"}),(0,s.jsx)("span",{children:"Requested"}),(0,s.jsx)("span",{className:"sr-only",children:"Next step"})]}),(0,s.jsx)("ul",{className:"divide-y divide-border",children:e.map(e=>(0,s.jsxs)("li",{className:`${z} text-body`,"data-testid":"needs-crew-row",children:[(0,s.jsxs)("span",{className:"flex min-w-0 items-center gap-2",children:[(0,s.jsx)(j.default,{href:`/ships/${e.id}`,className:"truncate font-medium hover:underline","data-testid":"needs-crew-ship",children:e.name}),(0,s.jsx)(v.Badge,{variant:"type",children:e.type})]}),(0,s.jsx)("span",{className:"min-w-0 text-meta",children:t?(0,s.jsx)(q,{ship:e}):(0,s.jsx)(R,{ship:e,now:i})}),(0,s.jsx)("span",{className:"flex flex-col text-meta",children:null===e.crewRequest?null:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(C,{at:e.crewRequest.requestedAt,now:i}),i.getTime()-new Date(e.crewRequest.requestedAt).getTime()<864e5?(0,s.jsx)("span",{className:"text-muted-foreground",children:(0,b.relativeTime)(new Date(e.crewRequest.requestedAt),i)}):null]})}),(0,s.jsx)("span",{className:"flex justify-end max-sm:justify-start",children:n?.(e)})]},e.id))})]}),(0,s.jsx)("p",{className:"text-meta text-muted-foreground",children:t?"Running requests are not listed here; the fleet overview shows them. A request stays until you release the ship.":"A request stays until you remove it or release the ship. With the trierarch plugin, trierarchs crew these for you."})]})}var T=e.i(77821),A=e.i(87964),I=e.i(18423),K=e.i(28459),P=e.i(96676),L=e.i(3979),B=e.i(78485);e.s(["default",0,function(){let e=(0,P.useNow)(),r=(0,A.useConsoleFrame)(),n=(0,K.useNeedsAttention)(),i=(0,I.useLiveFleet)(),l=(0,o.useFleetSnapshot)(),d=(0,L.usePluginNav)();(0,B.useSignInWhenSessionEnds)([n.error,i.error,l.error]);let{hasTrierarchs:c}=d;return(0,s.jsx)(T.ListPage,{...r,title:"Needs crew",description:c?"Ships with a crew request that are not running. Trierarchs crew them; you step in when one crashes or waits for room.":"Ships you asked to keep crewed that have no crew. Crew each one by hand; crewing it fulfils the request.",live:i.live,toolbar:(0,s.jsx)(t.FleetSegments,{active:"needs-crew",needsCrewCount:d.needsCrewCount}),children:(0,s.jsx)(D,{ships:void 0===l.data?void 0:(0,w.needsCrew)(l.data,{hasTrierarchs:c}),hasTrierarchs:c,error:l.isError?l.error.message:void 0,onRetry:()=>{l.refetch()},actionOf:e=>c?(0,s.jsx)(h,{ship:e}):(0,s.jsx)(x.ShipActions,{ship:e,layout:"next",compose:a.ComposeMessage,crewLineFlow:p.NewCrewLineFlow}),now:e})})}],39334)},36651,e=>{"use strict";var s=e.i(43476),t=e.i(90063);e.s(["Kbd",0,function({className:e,...a}){return(0,s.jsx)("kbd",{"data-slot":"kbd",className:(0,t.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})}])},19321,e=>{"use strict";var s=e.i(43476),t=e.i(90063);e.s(["Skeleton",0,function({className:e,...a}){return(0,s.jsx)("div",{"data-slot":"skeleton","aria-hidden":!0,className:(0,t.classNames)("animate-pulse rounded-sm bg-secondary [animation-duration:var(--duration-pulse)] motion-reduce:animate-none",e),...a})}])},67874,e=>{"use strict";var s=e.i(43476),t=e.i(90063);e.s(["EmptyState",0,function({title:e,description:a,icon:r,action:n,variant:i="page",className:l}){return"section"===i?(0,s.jsxs)("p",{"data-slot":"empty-state","data-variant":i,className:(0,t.classNames)("rounded-lg border border-border px-4 py-3 text-center text-meta text-muted-foreground",l),children:[e,a?(0,s.jsxs)(s.Fragment,{children:[" ",a]}):null]}):"no-results"===i?(0,s.jsxs)("div",{"data-slot":"empty-state","data-variant":i,className:(0,t.classNames)("flex flex-col items-center gap-2.5 rounded-lg border border-border bg-card px-4 py-6 text-center",l),children:[(0,s.jsx)("p",{className:"text-meta text-muted-foreground",children:e}),n]}):(0,s.jsxs)("div",{"data-slot":"empty-state","data-variant":i,className:(0,t.classNames)("flex flex-col items-center gap-3 rounded-lg border border-dashed border-border bg-card px-6 py-10 text-center",l),children:[r?(0,s.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,s.jsx)("h2",{className:"text-heading font-semibold text-foreground max-sm:text-heading-touch",children:e}),a?(0,s.jsx)("p",{className:"max-w-96 text-meta text-muted-foreground max-sm:text-body-touch",children:a}):null,n?(0,s.jsx)("div",{className:"mt-1 max-sm:w-full max-sm:[&>*]:w-full",children:n}):null]})}])},62687,e=>{"use strict";var s=e.i(43476),t=e.i(22016),a=e.i(90063);e.s(["FleetSegments",0,function({active:e,needsCrewCount:r}){let n=e=>(0,a.classNames)("flex h-(--size-control-touch) grow items-center justify-center gap-1.5 rounded-md text-body-touch font-medium",e?"bg-card text-foreground shadow-sm":"text-muted-foreground");return(0,s.jsxs)("nav",{"aria-label":"Fleet views",className:"flex gap-0.5 rounded-lg border border-border bg-muted p-0.5 sm:hidden","data-testid":"fleet-segments",children:[(0,s.jsx)(t.default,{href:"/","aria-current":"ships"===e?"page":void 0,className:n("ships"===e),"data-testid":"fleet-segment-ships",children:"Ships"}),(0,s.jsxs)(t.default,{href:"/needs-crew","aria-current":"needs-crew"===e?"page":void 0,className:n("needs-crew"===e),"data-testid":"fleet-segment-needs-crew",children:["Needs crew",void 0===r||0===r?null:(0,s.jsx)("span",{className:"text-micro tabular-nums",children:r})]})]})}])},88393,e=>{"use strict";var s=e.i(43476),t=e.i(90063),a=e.i(19321);function r(e){return Array.from({length:e},(e,s)=>`row-${String(s)}`)}e.s(["LoadingSkeleton",0,function({variant:e,rows:n=4,label:i="Loading",className:l}){return(0,s.jsxs)("div",{role:"status","data-slot":"loading-skeleton","data-variant":e,className:(0,t.classNames)("w-full",l),children:[(0,s.jsx)("span",{className:"sr-only",children:i}),"table"===e?(0,s.jsxs)("div",{className:"overflow-hidden rounded-lg border border-border bg-card shadow-sm",children:[(0,s.jsx)("div",{className:"h-(--size-row-header) border-b border-border bg-muted"}),r(n).map(e=>(0,s.jsxs)("div",{className:"flex h-(--size-row) items-center gap-8 border-b border-border px-4 last:border-0",children:[(0,s.jsx)(a.Skeleton,{className:"h-2.5 w-24"}),(0,s.jsx)(a.Skeleton,{className:"h-5 w-16"}),(0,s.jsx)(a.Skeleton,{className:"h-5 w-20"}),(0,s.jsx)(a.Skeleton,{className:"h-2.5 w-28"})]},e))]}):null,"cards"===e?(0,s.jsx)("div",{className:"grid grid-cols-2 gap-3 lg:grid-cols-4",children:r(4).map(e=>(0,s.jsxs)("div",{className:"flex flex-col gap-3 rounded-lg border border-border bg-card p-4",children:[(0,s.jsx)(a.Skeleton,{className:"h-2.5 w-20"}),(0,s.jsx)(a.Skeleton,{className:"h-6 w-10"}),(0,s.jsx)(a.Skeleton,{className:"h-2.5 w-28"})]},e))}):null,"detail"===e?(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsx)(a.Skeleton,{className:"h-7 w-48"}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(a.Skeleton,{className:"h-5 w-20"}),(0,s.jsx)(a.Skeleton,{className:"h-5 w-16"})]}),(0,s.jsx)(a.Skeleton,{className:"h-16 w-full rounded-lg"})]}):null,"list"===e?(0,s.jsx)("div",{className:"overflow-hidden rounded-lg border border-border bg-card",children:r(n).map(e=>(0,s.jsxs)("div",{className:"flex flex-col gap-2.5 border-b border-border px-3.5 py-3 last:border-0",children:[(0,s.jsxs)("div",{className:"flex justify-between",children:[(0,s.jsx)(a.Skeleton,{className:"h-3 w-28"}),(0,s.jsx)(a.Skeleton,{className:"h-5 w-16"})]}),(0,s.jsx)(a.Skeleton,{className:"h-2.5 w-44"})]},e))}):null]})}])},88207,e=>{e.v(s=>Promise.all(["static/chunks/13adqemu7o09r.js"].map(s=>e.l(s))).then(()=>s(42211)))},5419,e=>{e.v(s=>Promise.all(["static/chunks/40x7asvp3p80z.js"].map(s=>e.l(s))).then(()=>s(4510)))},77880,85538,e=>{"use strict";var s=e.i(43476),t=e.i(67927),a=e.i(66595),r=e.i(19759),n=e.i(22016),i=e.i(15905),l=e.i(36651),d=e.i(90063);let o={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:t}){let{label:a,dot:r}=o[e];return(0,s.jsxs)("span",{"data-slot":"live-status","data-state":e,"aria-live":"polite",className:(0,d.classNames)("inline-flex items-center gap-1.5 text-meta text-muted-foreground",t),children:[(0,s.jsx)("span",{"aria-hidden":!0,className:(0,d.classNames)("size-2 shrink-0 rounded-full",r)}),a]})}e.s(["Header",0,function({breadcrumb:e,parents:d=[],live:o,onCompose:u,onSearch:m}){return(0,s.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,s.jsx)("nav",{"aria-label":"Breadcrumb","data-testid":"header-breadcrumb",className:"min-w-0 text-body",children:(0,s.jsxs)("ol",{className:"flex min-w-0 items-center gap-1.5",children:[d.map(e=>(0,s.jsxs)("li",{className:"flex shrink-0 items-center gap-1.5",children:[(0,s.jsx)(n.default,{href:e.href,className:"text-muted-foreground hover:text-foreground hover:underline",children:e.label}),(0,s.jsx)(t.ChevronRight,{"aria-hidden":!0,className:"size-3.5 text-muted-foreground"})]},e.href)),(0,s.jsx)("li",{"aria-current":"page",className:"truncate font-medium text-foreground",children:e})]})}),(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)(c,{state:o}),m?(0,s.jsxs)(i.Button,{size:"sm",icon:(0,s.jsx)(a.Search,{"aria-hidden":!0}),"data-testid":"header-search",className:"w-60 justify-start font-normal text-muted-foreground",onClick:m,children:[(0,s.jsx)("span",{className:"grow text-left",children:"Search ships or jump to"}),(0,s.jsx)(l.Kbd,{children:"⌘K"})]}):null,u?(0,s.jsx)(i.Button,{size:"sm",icon:(0,s.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:t,actions:r,back:l,account:d,onSearch:o}){let h=o&&!l?o:void 0;return(0,s.jsxs)("header",{"data-slot":"top-bar","data-mode":l?"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:[l?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(n.default,{href:l.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,s.jsx)(u.ChevronLeft,{"aria-hidden":!0}),l.label]}),(0,s.jsx)("p",{className:"min-w-0 flex-1 truncate text-center text-body-touch font-semibold text-foreground",children:e})]}):(0,s.jsx)("h1",{className:"truncate text-title-touch font-semibold tracking-tight text-foreground",children:e}),(0,s.jsx)(c,{state:t}),r||h||d&&!l?(0,s.jsxs)("div",{className:"ml-auto flex items-center gap-1",children:[h?(0,s.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,s.jsx)(a.Search,{"aria-hidden":!0})}):null,r,d&&!l?(0,s.jsx)(m.AccountMenuSheet,{...d}):null]}):null]})}],85538)},77821,e=>{"use strict";var s=e.i(43476),t=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:l,primaryAction:d,toolbar:o,live:c,onCompose:u,onSearch:m,account:h,banner:x,phoneTopBar:p,children:f}){return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.Header,{breadcrumb:e,live:c,onCompose:u,onSearch:m}),x,p??(0,s.jsx)(n.TopBar,{title:e,live:c,account:h,onSearch:m,actions:u?(0,s.jsx)(a.Button,{variant:"ghost",size:"touch",isIconOnly:!0,"aria-label":"Compose","data-testid":"top-bar-compose",onClick:u,children:(0,s.jsx)(t.SquarePen,{"aria-hidden":!0})}):void 0}),(0,s.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,s.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4 max-sm:gap-3",children:[(0,s.jsxs)("div",{className:"flex min-w-0 flex-col gap-1",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-x-2.5 gap-y-1",children:[(0,s.jsx)("h1",{className:"text-title font-semibold tracking-tight text-foreground max-sm:hidden",children:e}),l]}),i?(0,s.jsx)("p",{className:"text-meta text-muted-foreground max-sm:text-body-touch",children:i}):null]}),d?(0,s.jsx)("div",{className:"shrink-0 max-sm:w-full max-sm:[&>*]:w-full",children:d}):null]}),o,f]})]})}])},88138,e=>{e.v(s=>Promise.all(["static/chunks/01ew2ssfbg4fk.js","static/chunks/2-ncr8s35g33z.js"].map(s=>e.l(s))).then(()=>s(48287)))},95953,e=>{e.v(s=>Promise.all(["static/chunks/3nkqw06zkp9-v.js"].map(s=>e.l(s))).then(()=>s(82532)))},26403,e=>{e.v(s=>Promise.all(["static/chunks/3ratrwsbommzd.js"].map(s=>e.l(s))).then(()=>s(54988)))},57993,e=>{e.v(s=>Promise.all(["static/chunks/00i6q5loemcdb.js","static/chunks/2-ncr8s35g33z.js"].map(s=>e.l(s))).then(()=>s(75027)))},41585,e=>{e.v(s=>Promise.all(["static/chunks/32eiz8wfxjh13.js","static/chunks/2-ncr8s35g33z.js"].map(s=>e.l(s))).then(()=>s(11896)))},18423,e=>{"use strict";var s=e.i(12598),t=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 l(e,s){await e.cancelQueries({queryKey:s,predicate:e=>void 0===e.state.data&&"fetching"===e.state.fetchStatus}),await e.invalidateQueries({queryKey:s})}let d=new Set(["LabelDefined","LabelValuesChanged","LabelRetired","LabelAssigned","LabelUnassigned","LabelDeleted"]),o=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,s.useQueryClient)(),[m,h]=(0,a.useState)(new Set),x=e=>{l(u,e)},p=(0,t.useSubscription)(e.fleet.events.subscriptionOptions({lastEventId:null},{onData:({data:s})=>{var t,a,n,l,u;if("resync"===s.kind){x(e.fleet.pathKey()),x(r.INBOX_KEY);return}let{event:m}=s;for(let s of new Set([m.shipId,m.actorShipId]))null!==s&&(x(e.fleet.ship.queryKey({shipId:s})),x(e.fleet.shipTimeline.queryKey({shipId:s})),x(e.fleet.shipWay.queryKey({shipId:s})));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())),t=m.type,o.has(t)&&x(e.fleet.needsAttention.queryKey()),a=m.type,d.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()),l=m.type,c.has(l)&&(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 s=e.i(54616),t=e.i(66027),a=e.i(12598),r=e.i(27702);function n(e){let s=String(e.attempts-1);return e.isPushed?`Handed ${s} times, never confirmed; fifth refused: undeliverable.`:`Handed (pulled) ${s} 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 l(){let e=(0,r.useTRPC)(),s=(0,a.useQueryClient)();return()=>s.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,s){return e?.find(e=>e.deliveryId===s)},"resentToast",0,function(e){return{title:"Message resent",description:`A new message went to ${function(e){let{recipient:s}=e.message;return"ship"===s.kind?s.ship.name:`any ship of type ${s.type}`}(e)}. The original is dismissed.`}},"undeliverableReason",0,n,"useDismissDelivery",0,function(){let e=(0,r.useTRPC)(),t=l();return(0,s.useMutation)(e.fleet.dismiss.mutationOptions({onSuccess:t}))},"useNeedsAttention",0,function(){let e=(0,r.useTRPC)();return(0,t.useQuery)(e.fleet.needsAttention.queryOptions())},"useResendDelivery",0,function(){let e=(0,r.useTRPC)(),t=l();return(0,s.useMutation)(e.fleet.resend.mutationOptions({onSuccess:t}))}])}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,24071,e=>{"use strict";var s=e.i(56420);let t={name:"chevron-left",size:24,node:[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]};t.node;let a=(0,s.default)(t);e.s(["ChevronLeft",0,a],24071)},67927,e=>{"use strict";var s=e.i(56420);let t={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};t.node;let a=(0,s.default)(t);e.s(["ChevronRight",0,a],67927)},66595,e=>{"use strict";var s=e.i(56420);let t={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};t.node;let a=(0,s.default)(t);e.s(["Search",0,a],66595)},19759,e=>{"use strict";var s=e.i(56420);let t={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"]};t.node;let a=(0,s.default)(t);e.s(["SquarePen",0,a],19759)},39334,e=>{"use strict";var s=e.i(43476),t=e.i(62687),a=e.i(65041),r=e.i(57665),n=e.i(71645),i=e.i(17540),l=e.i(90262),d=e.i(54492),o=e.i(5387),c=e.i(53573),u=e.i(15905);let h=(0,i.lazyDialog)(()=>e.A(5419).then(e=>e.CrewReleaseDialog),e=>e.isOpen);function m({ship:e}){let t=(0,l.useAccess)(),a=(0,o.useRemoveCrewRequest)(),[i,x]=(0,n.useState)(!1),p=(0,c.useShip)(i?e.id:void 0),f=(0,d.crewRequestStage)(e);return t.canManage&&"assigned"===f.kind&&"crashed"===f.status?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(u.Button,{size:"xs",icon:(0,s.jsx)(r.Power,{}),"data-testid":"needs-crew-release",onClick:()=>{a.reset(),x(!0)},children:"Release…"}),(0,s.jsx)(h,{shipName:e.name,stage:f,inFlightCount:p.data?.inFlightDeliveries??0,isOpen:i&&void 0!==p.data,onOpenChange:x,isPending:a.isPending,error:null===a.error?void 0:`${a.error.message} Nothing changed.`,onConfirm:()=>{a.mutate({shipId:e.id},{onSuccess:()=>{x(!1)}})}})]}):null}var x=e.i(21959),p=e.i(15327),f=e.i(18964),g=e.i(86875),j=e.i(22016),w=e.i(60356),b=e.i(49635),v=e.i(66390),y=e.i(67874),N=e.i(17981),k=e.i(88393),S=e.i(78865);function q({at:e,now:t}){let a=new Date(e);return(0,s.jsx)("time",{dateTime:e,title:(0,b.fullDateTime)(a),className:"tabular-nums",children:t.getTime()-a.getTime()<864e5?`Today, ${(0,b.clockTime)(a)}`:(0,b.shortDateTime)(a)})}function C({ship:e,now:t}){let a=(0,w.handCrewOf)(e);switch(a.kind){case"no-prompt":return(0,s.jsx)("span",{className:"text-muted-foreground",children:"No starting prompt issued"});case"prompt-unclaimed":return(0,s.jsxs)("span",{className:"flex flex-col",children:[(0,s.jsxs)("span",{children:["Prompt issued ",(0,s.jsx)(q,{at:a.issuedAt,now:t})]}),(0,s.jsx)("span",{className:"text-muted-foreground",children:"No session has taken it yet"})]});case"crew-ended":return(0,s.jsxs)("span",{className:"flex flex-col",children:[(0,s.jsx)("span",{children:"Was crewed by hand"}),null===a.endedAt?null:(0,s.jsxs)("span",{className:"text-muted-foreground",children:["Lease ended ",(0,s.jsx)(q,{at:a.endedAt,now:t})]})]})}}function R({ship:e}){let t=(0,d.crewRequestStage)(e);return"assigned"===t.kind?(0,s.jsxs)("span",{className:"flex flex-wrap items-center gap-x-2 gap-y-1",children:[(0,s.jsx)(S.StatusBadge,{status:t.status}),(0,s.jsxs)("span",{className:"inline-flex items-center gap-1",children:["on",(0,s.jsxs)(j.default,{href:`/trierarchs/${t.trierarch.id}`,className:"inline-flex items-center gap-1 font-medium underline decoration-input underline-offset-3 [&_svg]:size-(--size-icon-sm) [&_svg]:text-muted-foreground",children:[(0,s.jsx)(g.ShipWheel,{"aria-hidden":!0}),t.trierarch.name]})]})]}):(0,s.jsxs)("span",{className:"flex flex-wrap items-center gap-x-2 gap-y-1",children:[(0,s.jsx)(S.StatusBadge,{status:"needsCrew"}),(0,s.jsx)("span",{className:"text-muted-foreground",children:"needsCrew"===t.kind&&null!==t.reason?t.reason:"Not assigned yet"})]})}let z="grid items-center gap-x-4 gap-y-1.5 px-4 py-3 max-sm:grid-cols-1 max-sm:px-3.5 sm:grid-cols-[minmax(0,1fr)_minmax(0,1.6fr)_minmax(0,1fr)_minmax(0,11rem)]";function K({ships:e,hasTrierarchs:t,error:a,onRetry:r,actionOf:n,now:i}){return void 0!==a?(0,s.jsx)(N.InlineError,{variant:"page",title:"Couldn’t read the fleet",description:"Nothing changed.",detail:a,onRetry:r}):void 0===e?(0,s.jsx)(k.LoadingSkeleton,{variant:"table",rows:3,label:"Loading Needs crew"}):0===e.length?(0,s.jsx)(y.EmptyState,{icon:(0,s.jsx)(f.ListChecks,{"aria-hidden":!0}),title:"Nothing needs crew",description:t?"Every crew request is running. A request shows here while it waits for a trierarch, is crewing, restarting or crashed.":"No ship with a crew request awaits crew. Request a crew on a ship’s page to put it here."}):(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsxs)("div",{className:"overflow-hidden rounded-lg border border-border bg-card","data-testid":"needs-crew-list",children:[(0,s.jsxs)("div",{className:`${z} border-b border-border bg-muted py-2.5 text-caption font-medium text-muted-foreground max-sm:hidden`,"aria-hidden":!0,children:[(0,s.jsx)("span",{children:"Ship"}),(0,s.jsx)("span",{children:t?"Status":"Crew"}),(0,s.jsx)("span",{children:"Requested"}),(0,s.jsx)("span",{className:"sr-only",children:"Next step"})]}),(0,s.jsx)("ul",{className:"divide-y divide-border",children:e.map(e=>(0,s.jsxs)("li",{className:`${z} text-body`,"data-testid":"needs-crew-row",children:[(0,s.jsxs)("span",{className:"flex min-w-0 items-center gap-2",children:[(0,s.jsx)(j.default,{href:`/ships/${e.id}`,className:"truncate font-medium hover:underline","data-testid":"needs-crew-ship",children:e.name}),(0,s.jsx)(v.Badge,{variant:"type",children:e.type})]}),(0,s.jsx)("span",{className:"min-w-0 text-meta",children:t?(0,s.jsx)(R,{ship:e}):(0,s.jsx)(C,{ship:e,now:i})}),(0,s.jsx)("span",{className:"flex flex-col text-meta",children:null===e.crewRequest?null:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(q,{at:e.crewRequest.requestedAt,now:i}),i.getTime()-new Date(e.crewRequest.requestedAt).getTime()<864e5?(0,s.jsx)("span",{className:"text-muted-foreground",children:(0,b.relativeTime)(new Date(e.crewRequest.requestedAt),i)}):null]})}),(0,s.jsx)("span",{className:"flex justify-end max-sm:justify-start",children:n?.(e)})]},e.id))})]}),(0,s.jsx)("p",{className:"text-meta text-muted-foreground",children:t?"Running requests are not listed here; the fleet overview shows them. A request stays until you release the ship.":"A request stays until you remove it or release the ship. With the trierarch plugin, trierarchs crew these for you."})]})}var D=e.i(77821),A=e.i(87964),T=e.i(18423),I=e.i(28459),P=e.i(96676),L=e.i(3979),B=e.i(78485);e.s(["default",0,function(){let e=(0,P.useNow)(),r=(0,A.useConsoleFrame)(),n=(0,I.useNeedsAttention)(),i=(0,T.useLiveFleet)(),l=(0,o.useFleetSnapshot)(),d=(0,L.usePluginNav)();(0,B.useSignInWhenSessionEnds)([n.error,i.error,l.error]);let{hasTrierarchs:c}=d;return(0,s.jsx)(D.ListPage,{...r,title:"Needs crew",description:c?"Ships with a crew request that are not running. Trierarchs crew them; you step in when one crashes or waits for room.":"Ships you asked to keep crewed that have no crew. Crew each one by hand; crewing it fulfils the request.",live:i.live,toolbar:(0,s.jsx)(t.FleetSegments,{active:"needs-crew",needsCrewCount:d.needsCrewCount}),children:(0,s.jsx)(K,{ships:void 0===l.data?void 0:(0,w.needsCrew)(l.data,{hasTrierarchs:c}),hasTrierarchs:c,error:l.isError?l.error.message:void 0,onRetry:()=>{l.refetch()},actionOf:e=>c?(0,s.jsx)(m,{ship:e}):(0,s.jsx)(x.ShipActions,{ship:e,layout:"next",compose:a.ComposeMessage,crewLineFlow:p.NewCrewLineFlow}),now:e})})}],39334)},36651,e=>{"use strict";var s=e.i(43476),t=e.i(90063);e.s(["Kbd",0,function({className:e,...a}){return(0,s.jsx)("kbd",{"data-slot":"kbd",className:(0,t.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})}])},19321,e=>{"use strict";var s=e.i(43476),t=e.i(90063);e.s(["Skeleton",0,function({className:e,...a}){return(0,s.jsx)("div",{"data-slot":"skeleton","aria-hidden":!0,className:(0,t.classNames)("animate-pulse rounded-sm bg-secondary [animation-duration:var(--duration-pulse)] motion-reduce:animate-none",e),...a})}])},67874,e=>{"use strict";var s=e.i(43476),t=e.i(90063);e.s(["EmptyState",0,function({title:e,description:a,icon:r,action:n,variant:i="page",className:l}){return"section"===i?(0,s.jsxs)("p",{"data-slot":"empty-state","data-variant":i,className:(0,t.classNames)("rounded-lg border border-border px-4 py-3 text-center text-meta text-muted-foreground",l),children:[e,a?(0,s.jsxs)(s.Fragment,{children:[" ",a]}):null]}):"no-results"===i?(0,s.jsxs)("div",{"data-slot":"empty-state","data-variant":i,className:(0,t.classNames)("flex flex-col items-center gap-2.5 rounded-lg border border-border bg-card px-4 py-6 text-center",l),children:[(0,s.jsx)("p",{className:"text-meta text-muted-foreground",children:e}),n]}):(0,s.jsxs)("div",{"data-slot":"empty-state","data-variant":i,className:(0,t.classNames)("flex flex-col items-center gap-3 rounded-lg border border-dashed border-border bg-card px-6 py-10 text-center",l),children:[r?(0,s.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,s.jsx)("h2",{className:"text-heading font-semibold text-foreground max-sm:text-heading-touch",children:e}),a?(0,s.jsx)("p",{className:"max-w-96 text-meta text-muted-foreground max-sm:text-body-touch",children:a}):null,n?(0,s.jsx)("div",{className:"mt-1 max-sm:w-full max-sm:[&>*]:w-full",children:n}):null]})}])},62687,e=>{"use strict";var s=e.i(43476),t=e.i(22016),a=e.i(90063);e.s(["FleetSegments",0,function({active:e,needsCrewCount:r}){let n=e=>(0,a.classNames)("flex h-(--size-control-touch) grow items-center justify-center gap-1.5 rounded-md text-body-touch font-medium",e?"bg-card text-foreground shadow-sm":"text-muted-foreground");return(0,s.jsxs)("nav",{"aria-label":"Fleet views",className:"flex gap-0.5 rounded-lg border border-border bg-muted p-0.5 sm:hidden","data-testid":"fleet-segments",children:[(0,s.jsx)(t.default,{href:"/","aria-current":"ships"===e?"page":void 0,className:n("ships"===e),"data-testid":"fleet-segment-ships",children:"Ships"}),(0,s.jsxs)(t.default,{href:"/needs-crew","aria-current":"needs-crew"===e?"page":void 0,className:n("needs-crew"===e),"data-testid":"fleet-segment-needs-crew",children:["Needs crew",void 0===r||0===r?null:(0,s.jsx)("span",{className:"text-micro tabular-nums",children:r})]})]})}])},88393,e=>{"use strict";var s=e.i(43476),t=e.i(90063),a=e.i(19321);function r(e){return Array.from({length:e},(e,s)=>`row-${String(s)}`)}e.s(["LoadingSkeleton",0,function({variant:e,rows:n=4,label:i="Loading",className:l}){return(0,s.jsxs)("div",{role:"status","data-slot":"loading-skeleton","data-variant":e,className:(0,t.classNames)("w-full",l),children:[(0,s.jsx)("span",{className:"sr-only",children:i}),"table"===e?(0,s.jsxs)("div",{className:"overflow-hidden rounded-lg border border-border bg-card shadow-sm",children:[(0,s.jsx)("div",{className:"h-(--size-row-header) border-b border-border bg-muted"}),r(n).map(e=>(0,s.jsxs)("div",{className:"flex h-(--size-row) items-center gap-8 border-b border-border px-4 last:border-0",children:[(0,s.jsx)(a.Skeleton,{className:"h-2.5 w-24"}),(0,s.jsx)(a.Skeleton,{className:"h-5 w-16"}),(0,s.jsx)(a.Skeleton,{className:"h-5 w-20"}),(0,s.jsx)(a.Skeleton,{className:"h-2.5 w-28"})]},e))]}):null,"cards"===e?(0,s.jsx)("div",{className:"grid grid-cols-2 gap-3 lg:grid-cols-4",children:r(4).map(e=>(0,s.jsxs)("div",{className:"flex flex-col gap-3 rounded-lg border border-border bg-card p-4",children:[(0,s.jsx)(a.Skeleton,{className:"h-2.5 w-20"}),(0,s.jsx)(a.Skeleton,{className:"h-6 w-10"}),(0,s.jsx)(a.Skeleton,{className:"h-2.5 w-28"})]},e))}):null,"detail"===e?(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsx)(a.Skeleton,{className:"h-7 w-48"}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(a.Skeleton,{className:"h-5 w-20"}),(0,s.jsx)(a.Skeleton,{className:"h-5 w-16"})]}),(0,s.jsx)(a.Skeleton,{className:"h-16 w-full rounded-lg"})]}):null,"list"===e?(0,s.jsx)("div",{className:"overflow-hidden rounded-lg border border-border bg-card",children:r(n).map(e=>(0,s.jsxs)("div",{className:"flex flex-col gap-2.5 border-b border-border px-3.5 py-3 last:border-0",children:[(0,s.jsxs)("div",{className:"flex justify-between",children:[(0,s.jsx)(a.Skeleton,{className:"h-3 w-28"}),(0,s.jsx)(a.Skeleton,{className:"h-5 w-16"})]}),(0,s.jsx)(a.Skeleton,{className:"h-2.5 w-44"})]},e))}):null]})}])},88207,e=>{e.v(s=>Promise.all(["static/chunks/13adqemu7o09r.js"].map(s=>e.l(s))).then(()=>s(42211)))},5419,e=>{e.v(s=>Promise.all(["static/chunks/40x7asvp3p80z.js"].map(s=>e.l(s))).then(()=>s(4510)))},77880,85538,e=>{"use strict";var s=e.i(43476),t=e.i(67927),a=e.i(66595),r=e.i(19759),n=e.i(22016),i=e.i(15905),l=e.i(36651),d=e.i(90063);let o={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:t}){let{label:a,dot:r}=o[e];return(0,s.jsxs)("span",{"data-slot":"live-status","data-state":e,"aria-live":"polite",className:(0,d.classNames)("inline-flex items-center gap-1.5 text-meta text-muted-foreground",t),children:[(0,s.jsx)("span",{"aria-hidden":!0,className:(0,d.classNames)("size-2 shrink-0 rounded-full",r)}),a]})}e.s(["Header",0,function({breadcrumb:e,parents:d=[],live:o,onCompose:u,onSearch:h}){return(0,s.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,s.jsx)("nav",{"aria-label":"Breadcrumb","data-testid":"header-breadcrumb",className:"min-w-0 text-body",children:(0,s.jsxs)("ol",{className:"flex min-w-0 items-center gap-1.5",children:[d.map(e=>(0,s.jsxs)("li",{className:"flex shrink-0 items-center gap-1.5",children:[(0,s.jsx)(n.default,{href:e.href,className:"text-muted-foreground hover:text-foreground hover:underline",children:e.label}),(0,s.jsx)(t.ChevronRight,{"aria-hidden":!0,className:"size-3.5 text-muted-foreground"})]},e.href)),(0,s.jsx)("li",{"aria-current":"page",className:"truncate font-medium text-foreground",children:e})]})}),(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)(c,{state:o}),h?(0,s.jsxs)(i.Button,{size:"sm",icon:(0,s.jsx)(a.Search,{"aria-hidden":!0}),"data-testid":"header-search",className:"w-60 justify-start font-normal text-muted-foreground",onClick:h,children:[(0,s.jsx)("span",{className:"grow text-left",children:"Search ships or jump to"}),(0,s.jsx)(l.Kbd,{children:"⌘K"})]}):null,u?(0,s.jsx)(i.Button,{size:"sm",icon:(0,s.jsx)(r.SquarePen,{"aria-hidden":!0}),"data-testid":"header-compose",onClick:u,children:"Compose"}):null]})]})}],77880);var u=e.i(24071),h=e.i(57957);e.s(["TopBar",0,function({title:e,live:t,actions:r,back:l,account:d,onSearch:o}){let m=o&&!l?o:void 0;return(0,s.jsxs)("header",{"data-slot":"top-bar","data-mode":l?"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:[l?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(n.default,{href:l.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,s.jsx)(u.ChevronLeft,{"aria-hidden":!0}),l.label]}),(0,s.jsx)("p",{className:"min-w-0 flex-1 truncate text-center text-body-touch font-semibold text-foreground",children:e})]}):(0,s.jsx)("h1",{className:"truncate text-title-touch font-semibold tracking-tight text-foreground",children:e}),(0,s.jsx)(c,{state:t}),r||m||d&&!l?(0,s.jsxs)("div",{className:"ml-auto flex items-center gap-1",children:[m?(0,s.jsx)(i.Button,{variant:"ghost",size:"touch",isIconOnly:!0,"aria-label":"Search ships or jump to","data-testid":"top-bar-search",onClick:m,children:(0,s.jsx)(a.Search,{"aria-hidden":!0})}):null,r,d&&!l?(0,s.jsx)(h.AccountMenuSheet,{...d}):null]}):null]})}],85538)},77821,e=>{"use strict";var s=e.i(43476),t=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:l,primaryAction:d,toolbar:o,live:c,onCompose:u,onSearch:h,account:m,banner:x,phoneTopBar:p,children:f}){return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.Header,{breadcrumb:e,live:c,onCompose:u,onSearch:h}),x,p??(0,s.jsx)(n.TopBar,{title:e,live:c,account:m,onSearch:h,actions:u?(0,s.jsx)(a.Button,{variant:"ghost",size:"touch",isIconOnly:!0,"aria-label":"Compose","data-testid":"top-bar-compose",onClick:u,children:(0,s.jsx)(t.SquarePen,{"aria-hidden":!0})}):void 0}),(0,s.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,s.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4 max-sm:gap-3",children:[(0,s.jsxs)("div",{className:"flex min-w-0 flex-col gap-1",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-x-2.5 gap-y-1",children:[(0,s.jsx)("h1",{className:"text-title font-semibold tracking-tight text-foreground max-sm:hidden",children:e}),l]}),i?(0,s.jsx)("p",{className:"text-meta text-muted-foreground max-sm:text-body-touch",children:i}):null]}),d?(0,s.jsx)("div",{className:"shrink-0 max-sm:w-full max-sm:[&>*]:w-full",children:d}):null]}),o,f]})]})}])},88138,e=>{e.v(s=>Promise.all(["static/chunks/01ew2ssfbg4fk.js","static/chunks/2-ncr8s35g33z.js"].map(s=>e.l(s))).then(()=>s(48287)))},95953,e=>{e.v(s=>Promise.all(["static/chunks/3nkqw06zkp9-v.js"].map(s=>e.l(s))).then(()=>s(82532)))},26403,e=>{e.v(s=>Promise.all(["static/chunks/3ratrwsbommzd.js"].map(s=>e.l(s))).then(()=>s(54988)))},57993,e=>{e.v(s=>Promise.all(["static/chunks/00i6q5loemcdb.js","static/chunks/2-ncr8s35g33z.js"].map(s=>e.l(s))).then(()=>s(75027)))},41585,e=>{e.v(s=>Promise.all(["static/chunks/32eiz8wfxjh13.js","static/chunks/2-ncr8s35g33z.js"].map(s=>e.l(s))).then(()=>s(11896)))},18423,e=>{"use strict";var s=e.i(12598),t=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"]),l=new Set(["LabelDefined","LabelValuesChanged","LabelRetired","LabelAssigned","LabelUnassigned","LabelDeleted"]),d=new Set(["DeliveryUndeliverable","DeliveryNotHandled","DeliveryDismissed"]),o=new Set(["NetworkRulesSet","NetworkRulesDraftSaved","NetworkRulesDraftDiscarded","NetworkRulesDeclared","BuiltInRuleChanged"]);e.s(["useLiveFleet",0,function(){let e=(0,n.useTRPC)(),c=(0,s.useQueryClient)(),[u,h]=(0,a.useState)(new Set),[m]=(0,a.useState)(()=>{let e,s,t,a;return e=new Set,s=new Set,t=e=>c.invalidateQueries({queryKey:e,exact:!0},{cancelRefetch:!1}),a=async a=>{e.add(a.queryHash);let r=a.isBehind;try{for(await t(a.queryKey);r||s.delete(a.queryHash);)r=!1,await t(a.queryKey)}finally{e.delete(a.queryHash)}},t=>{for(let r of c.getQueryCache().findAll({queryKey:t}))e.has(r.queryHash)?s.add(r.queryHash):a({queryHash:r.queryHash,queryKey:r.queryKey,isBehind:"fetching"===r.state.fetchStatus})}}),x=(0,t.useSubscription)(e.fleet.events.subscriptionOptions({lastEventId:null},{onData:({data:s})=>{var t,a,n,c,u;if("resync"===s.kind){m(e.fleet.pathKey()),m(r.INBOX_KEY);return}let{event:x}=s;for(let s of new Set([x.shipId,x.actorShipId]))null!==s&&(m(e.fleet.ship.queryKey({shipId:s})),m(e.fleet.shipTimeline.queryKey({shipId:s})),m(e.fleet.shipWay.queryKey({shipId:s})));if(null!==x.messageId&&(m(e.fleet.shipMessages.pathKey()),m(e.fleet.shipWay.pathKey()),m(e.fleet.message.queryKey({messageId:x.messageId})),m(e.fleet.inbox.pathKey()),m(r.INBOX_KEY),m(e.fleet.health.queryKey())),t=x.type,d.has(t)&&m(e.fleet.needsAttention.queryKey()),a=x.type,l.has(a)&&m(e.fleet.labels.queryKey()),"NetworkRulesDeclared"===x.type&&m(e.fleet.declaredNetworkRules.queryKey()),("BuiltInRuleChanged"===(n=x.type)||"NetworkRulesSet"===n)&&m(e.fleet.builtInRules.queryKey()),c=x.type,o.has(c)&&(m(e.fleet.networkRules.queryKey()),m(e.fleet.networkRulesDraftChanges.queryKey()),m(e.fleet.explainReach.pathKey())),u=x.type,!i.has(u))return;m(e.fleet.list.queryKey()),m(e.fleet.health.queryKey());let{shipId:p}=x;"ShipCommissioned"===x.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"}}(x.status),newShipIds:u,error:x.error}}])},28459,e=>{"use strict";var s=e.i(54616),t=e.i(66027),a=e.i(12598),r=e.i(27702);function n(e){let s=String(e.attempts-1);return e.isPushed?`Handed ${s} times, never confirmed; fifth refused: undeliverable.`:`Handed (pulled) ${s} 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 l(){let e=(0,r.useTRPC)(),s=(0,a.useQueryClient)();return()=>s.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,s){return e?.find(e=>e.deliveryId===s)},"resentToast",0,function(e){return{title:"Message resent",description:`A new message went to ${function(e){let{recipient:s}=e.message;return"ship"===s.kind?s.ship.name:`any ship of type ${s.type}`}(e)}. The original is dismissed.`}},"undeliverableReason",0,n,"useDismissDelivery",0,function(){let e=(0,r.useTRPC)(),t=l();return(0,s.useMutation)(e.fleet.dismiss.mutationOptions({onSuccess:t}))},"useNeedsAttention",0,function(){let e=(0,r.useTRPC)();return(0,t.useQuery)(e.fleet.needsAttention.queryOptions())},"useResendDelivery",0,function(){let e=(0,r.useTRPC)(),t=l();return(0,s.useMutation)(e.fleet.resend.mutationOptions({onSuccess:t}))}])}]);
|
package/.next/standalone/packages/console/.next/static/chunks/{3su35xz056zu0.js → 3cmed7o3h-y6p.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)("407ebda86b0cbb5441563b80c0d8b152d89ba8d8d1",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),y=t.useRef(null),S=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,y.current=e)}),f&&(0,n.addEventListener)(t,"keydown",function(){S.current=!0},!0),f&&(0,n.addEventListener)(t,"pointerdown",function(){S.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)&&(y.current=e,b.current=!0)}}},[h,g,v]);let E=t.useMemo(()=>{function e(){b.current=!1,y.current=null}return{onMouseLeave(){e()},onFocus(t){let n=t.currentTarget;if(b.current){if(y.current===n)return;e()}let o=(0,l.getTarget)(t.nativeEvent);if((0,a.isElement)(o)){if(f&&!t.relatedTarget){if(!S.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),y=e.i(28744),S=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&&!y.platform.os.mac&&2===e.button)return}u.current&&s.context.allowMouseUpTriggerRef.current&&(!m||2===e.button)&&"regular-item"===l.type&&(0,S.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:y,...S}=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)}},S,_],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,y=h.useState("isActive",g.index),S=h.useState("itemProps"),{getItemProps:R,itemRef:w}=M({closeOnClick:c,disabled:b,highlighted:y,id:v,store:h,nativeButton:l,nodeId:m?.context.nodeId,itemMetadata:E});return(0,a.useRenderElement)("div",e,{state:{disabled:b,highlighted:y},props:[S,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:y}=s(),S=y.useState("isActive",g.index),M=y.useState("itemProps"),w=y.context.typingRef,{getButtonProps:k,buttonRef:O}=(0,x.useButton)({native:!1,composite:!0}),T=R({closeOnClick:d,highlighted:S,id:h,nodeId:v,store:y,typingRef:w,itemRef:f,itemMetadata:E});return(0,a.useRenderElement)("a",e,{state:{highlighted:S},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"),y=f.useState("mounted"),S=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:S},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:!y,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:y=!1,collisionAvoidance:S=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=S;"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:y,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),ey=null;return"menubar"===w.type?ey=w.context.contentElement:void 0===w.type&&(ey=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:ey}),(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}}),y=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:y,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}),y=r(!0),S=(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:S,store:R,nativeButton:c,nodeId:y?.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 ey(e){let o=t.useContext(eb);if(null===o&&!e)throw Error((0,n.default)(5));return o}e.s(["useMenubarContext",0,ey],7447);var eS=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:y="vertical",actionsRef:S,closeParentOnEsc:R=!1,handle:E,triggerId:M,defaultTriggerId:C=null,highlightItemOnHover:I=!0}=e,w=c(!0),T=s(!0),P=ey(!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(S,()=>({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,eS.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:y,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"===y?"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,y,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),y=e.i(39957),S=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,y.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,S.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")}),ey=function(e,t){let n=(0,y.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")),eS=(0,w.useClick)(Q,{enabled:!ec,event:X&&el?"click":"mousedown",toggle:!0,ignoreMouse:!1,stickIfOpen:void 0===et.type&&ey}),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,S.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,eS.reference),[eR.reference,eS.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,S.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),y=v.useState("open"),S=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)(S,{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)(S,{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=y&&et&&en.platform.screenReader.voiceOver;return(0,D.useRenderElement)("div",e,{state:{disabled:U,highlighted:B,open:y},stateAttributesMapping:A.triggerOpenStateMapping,props:[Q,J,Z,H,ea?es:void 0,{"aria-controls":k,tabIndex:y||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),y=e.i(15905),S=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)(S.DropdownMenu,{children:[(0,t.jsxs)(S.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)(S.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)(S.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)(S.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)(S.DropdownMenuSeparator,{}),(0,t.jsxs)(S.DropdownMenuGroup,{children:[(0,t.jsx)(S.DropdownMenuLabel,{children:"Theme"}),(0,t.jsx)(S.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)(S.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)(S.DropdownMenuSeparator,{}),(0,t.jsx)(S.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:S,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===S?null:(0,t.jsxs)("button",{type:"button","data-testid":"account-take-tour",onClick:()=>{D(!1),S()},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)(y.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}async function r(e,t){let n;try{n=await e()}catch{throw Error(t)}return o("refused"===n.kind&&""===n.message.trim()?{kind:"refused",message:t}:n)}e.s(["useConsoleRead",0,function(e){let o=(0,t.useQuery)(e);return(0,n.useSignInWhenSessionEnds)([o.error]),o}],76580),e.s(["dataFrom",0,r,"dataOf",0,o],2660);let i="The console did not answer: try again in a moment";class s extends Error{data;constructor(e,t){super(e),this.data=t?{code:"UNAUTHORIZED",refusal:"SIGNED_IN_ELSEWHERE"}:{code:"UNAUTHORIZED"}}}async function a(e,t=fetch){var n;let r,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,r=await n.json()}catch{throw Error(i)}if(!("object"==typeof(n=r)&&null!==n&&"kind"in n&&("answered"===n.kind||"refused"===n.kind)))throw Error(i);if(401===u&&"refused"===r.kind)throw new s(r.message,"refusal"in r&&"SIGNED_IN_ELSEWHERE"===r.refusal);return o(r)}e.s(["fetchConsoleRead",0,a],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)("4043bfe3e549a68b8ac6b402e7fbddaaa65d986d6b",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)}]);
|
package/.next/standalone/packages/console/.next/static/chunks/{0u8cdjuofezss.js → 3e0k_3qlcm9yl.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,31421,e=>{"use strict";var t=e.i(71645),s=e.i(46376),a=e.i(88015);e.s(["useAriaLabelledBy",0,function(e,r,i,n=!0,l){let[d,o]=t.useState(),c=(0,a.useBaseUiId)(l?`${l}-label`:void 0),u=e??r??d;return(0,s.useIsoLayoutEffect)(()=>{let t=e||r||!n?void 0:function(e,t){let s=function(e){if(!e)return;let t=e.parentElement;if(t&&"LABEL"===t.tagName)return t;let s=e.id;if(s){let t=e.nextElementSibling;if(t&&t.htmlFor===s)return t}let a=e.labels;return a&&a[0]}(e);if(s)return!s.id&&t&&(s.id=t),s.id||void 0}(i.current,c);d!==t&&o(t)}),u}])},86698,e=>{"use strict";e.s(["serializeValue",0,function(e){if(null==e)return"";if("string"==typeof e)return e;try{return JSON.stringify(e)}catch{return String(e)}}])},16327,e=>{"use strict";var t=e.i(56420);let s={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};s.node;let a=(0,t.default)(s);e.s(["ChevronDown",0,a],16327)},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)},52886,e=>{"use strict";var t=e.i(56420);let s={name:"circle-dashed",size:24,node:[["path",{d:"M10.1 2.182a10 10 0 0 1 3.8 0",key:"5ilxe3"}],["path",{d:"M13.9 21.818a10 10 0 0 1-3.8 0",key:"11zvb9"}],["path",{d:"M17.609 3.721a10 10 0 0 1 2.69 2.7",key:"1iw5b2"}],["path",{d:"M2.182 13.9a10 10 0 0 1 0-3.8",key:"c0bmvh"}],["path",{d:"M20.279 17.609a10 10 0 0 1-2.7 2.69",key:"1ruxm7"}],["path",{d:"M21.818 10.1a10 10 0 0 1 0 3.8",key:"qkgqxc"}],["path",{d:"M3.721 6.391a10 10 0 0 1 2.7-2.69",key:"1mcia2"}],["path",{d:"M6.391 20.279a10 10 0 0 1-2.69-2.7",key:"1fvljs"}]]};s.node;let a=(0,t.default)(s);e.s(["CircleDashed",0,a],52886)},75043,e=>{"use strict";var t=e.i(56420);let s={name:"circle-question-mark",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["help-circle","circle-help"]};s.node;let a=(0,t.default)(s);e.s(["default",0,a])},21048,e=>{"use strict";var t=e.i(56420);let s={name:"circle-slash",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"9",x2:"15",y1:"15",y2:"9",key:"1dfufj"}]]};s.node;let a=(0,t.default)(s);e.s(["CircleSlash",0,a],21048)},8734,e=>{"use strict";var t=e.i(56420);let s={name:"copy",size:24,node:[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]};s.node;let a=(0,t.default)(s);e.s(["Copy",0,a],8734)},86247,e=>{"use strict";var t=e.i(56420);let s={name:"ellipsis",size:24,node:[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],aliases:["more-horizontal"]};s.node;let a=(0,t.default)(s);e.s(["Ellipsis",0,a],86247)},15281,e=>{"use strict";var t=e.i(56420);let s={name:"pencil",size:24,node:[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]};s.node;let a=(0,t.default)(s);e.s(["Pencil",0,a],15281)},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)},30274,e=>{"use strict";var t=e.i(56420);let s={name:"send",size:24,node:[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]};s.node;let a=(0,t.default)(s);e.s(["Send",0,a],30274)},41220,e=>{"use strict";var t=e.i(56420);let s={name:"server",size:24,node:[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]};s.node;let a=(0,t.default)(s);e.s(["Server",0,a],41220)},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)},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})}])},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})}])},43988,e=>{"use strict";var t=e.i(43476),s=e.i(25913),a=e.i(90063);let r=(0,s.cva)("w-full min-w-0 resize-none rounded-md border border-input bg-card px-3 py-2 text-foreground shadow-sm transition-[border-color,box-shadow] duration-(--duration-fast) outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/22 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/16 disabled:cursor-not-allowed disabled:bg-muted disabled:opacity-50 disabled:shadow-none",{variants:{size:{md:"text-body",touch:"rounded-lg text-input-touch"},isMono:{true:"font-mono",false:""}},compoundVariants:[{size:"md",isMono:!0,className:"text-code"}],defaultVariants:{size:"md",isMono:!1}});e.s(["Textarea",0,function({className:e,size:s,isMono:i,rows:n=4,...l}){return(0,t.jsx)("textarea",{"data-slot":"textarea",rows:n,className:(0,a.classNames)(r({size:s,isMono:i}),e),...l})}])},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:i,variant:n="page",className:l}){return"section"===n?(0,t.jsxs)("p",{"data-slot":"empty-state","data-variant":n,className:(0,s.classNames)("rounded-lg border border-border px-4 py-3 text-center text-meta text-muted-foreground",l),children:[e,a?(0,t.jsxs)(t.Fragment,{children:[" ",a]}):null]}):"no-results"===n?(0,t.jsxs)("div",{"data-slot":"empty-state","data-variant":n,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",l),children:[(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:e}),i]}):(0,t.jsxs)("div",{"data-slot":"empty-state","data-variant":n,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",l),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,i?(0,t.jsx)("div",{className:"mt-1 max-sm:w-full max-sm:[&>*]:w-full",children:i}):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:i=4,label:n="Loading",className:l}){return(0,t.jsxs)("div",{role:"status","data-slot":"loading-skeleton","data-variant":e,className:(0,s.classNames)("w-full",l),children:[(0,t.jsx)("span",{className:"sr-only",children:n}),"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(i).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(i).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]})}])},39448,e=>{"use strict";var t=e.i(43476),s=e.i(25913),a=e.i(22016),r=e.i(90063);let i=(0,s.cva)("min-w-0 truncate font-sans font-medium",{variants:{size:{body:"text-body text-foreground",meta:"text-meta text-muted-foreground",title:"text-title font-semibold tracking-tight text-foreground max-sm:text-title-touch"}},defaultVariants:{size:"body"}});e.s(["ShipName",0,function({name:e,shipId:s,size:n,isSuffixShown:l=!1,isOperator:d=!1,href:o,className:c}){let u=o?(0,t.jsx)(a.default,{href:o,className:(0,r.classNames)(i({size:n}),"rounded-xs underline-offset-3 hover:underline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring"),title:e,children:e}):(0,t.jsx)("span",{className:i({size:n}),title:e,children:e});return(0,t.jsxs)("span",{"data-slot":"ship-name",className:(0,r.classNames)("inline-flex min-w-0 items-baseline gap-1.5",c),children:[u,d?(0,t.jsx)("span",{className:"shrink-0 font-normal text-muted-foreground",children:"(you)"}):null,l&&!d?(0,t.jsxs)("span",{className:"shrink-0 font-mono text-id text-muted-foreground uppercase",children:[(0,t.jsx)("span",{"aria-hidden":!0,children:"· "}),s.slice(-4)]}):null]})}])},77880,85538,e=>{"use strict";var t=e.i(43476),s=e.i(67927),a=e.i(66595),r=e.i(19759),i=e.i(22016),n=e.i(15905),l=e.i(36651),d=e.i(90063);let o={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}=o[e];return(0,t.jsxs)("span",{"data-slot":"live-status","data-state":e,"aria-live":"polite",className:(0,d.classNames)("inline-flex items-center gap-1.5 text-meta text-muted-foreground",s),children:[(0,t.jsx)("span",{"aria-hidden":!0,className:(0,d.classNames)("size-2 shrink-0 rounded-full",r)}),a]})}e.s(["Header",0,function({breadcrumb:e,parents:d=[],live:o,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:[d.map(e=>(0,t.jsxs)("li",{className:"flex shrink-0 items-center gap-1.5",children:[(0,t.jsx)(i.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:o}),m?(0,t.jsxs)(n.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)(l.Kbd,{children:"⌘K"})]}):null,u?(0,t.jsx)(n.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:l,account:d,onSearch:o}){let h=o&&!l?o:void 0;return(0,t.jsxs)("header",{"data-slot":"top-bar","data-mode":l?"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:[l?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(i.default,{href:l.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}),l.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||d&&!l?(0,t.jsxs)("div",{className:"ml-auto flex items-center gap-1",children:[h?(0,t.jsx)(n.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,d&&!l?(0,t.jsx)(m.AccountMenuSheet,{...d}):null]}):null]})}],85538)},77821,e=>{"use strict";var t=e.i(43476),s=e.i(19759),a=e.i(15905),r=e.i(77880),i=e.i(85538);e.s(["ListPage",0,function({title:e,description:n,titleMeta:l,primaryAction:d,toolbar:o,live:c,onCompose:u,onSearch:m,account:h,banner:x,phoneTopBar:f,children:p}){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.Header,{breadcrumb:e,live:c,onCompose:u,onSearch:m}),x,f??(0,t.jsx)(i.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}),l]}),n?(0,t.jsx)("p",{className:"text-meta text-muted-foreground max-sm:text-body-touch",children:n}):null]}),d?(0,t.jsx)("div",{className:"shrink-0 max-sm:w-full max-sm:[&>*]:w-full",children:d}):null]}),o,p]})]})}])},18423,e=>{"use strict";var t=e.i(12598),s=e.i(5861),a=e.i(71645),r=e.i(86413),i=e.i(27702);let n=new Set(["FleetInitialised","ShipCommissioned","ShipClaimed","LeaseRevoked","CredentialRevoked","StartingPromptIssued","ShipRetired","DeliveryAcknowledged","DeliveryUndeliverable","ShipReported","CrewRequested","CrewRequestRemoved","CrewAssigned","CrewStatusChanged","CrewRequestExplained","CrewRequestGivenBack","LabelAssigned","LabelUnassigned","LabelRetired"]);async function l(e,t){await e.cancelQueries({queryKey:t,predicate:e=>void 0===e.state.data&&"fetching"===e.state.fetchStatus}),await e.invalidateQueries({queryKey:t})}let d=new Set(["LabelDefined","LabelValuesChanged","LabelRetired","LabelAssigned","LabelUnassigned","LabelDeleted"]),o=new Set(["DeliveryUndeliverable","DeliveryNotHandled","DeliveryDismissed"]),c=new Set(["NetworkRulesSet","NetworkRulesDraftSaved","NetworkRulesDraftDiscarded","NetworkRulesDeclared","BuiltInRuleChanged"]);e.s(["useLiveFleet",0,function(){let e=(0,i.useTRPC)(),u=(0,t.useQueryClient)(),[m,h]=(0,a.useState)(new Set),x=e=>{l(u,e)},f=(0,s.useSubscription)(e.fleet.events.subscriptionOptions({lastEventId:null},{onData:({data:t})=>{var s,a,i,l,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,o.has(s)&&x(e.fleet.needsAttention.queryKey()),a=m.type,d.has(a)&&x(e.fleet.labels.queryKey()),"NetworkRulesDeclared"===m.type&&x(e.fleet.declaredNetworkRules.queryKey()),("BuiltInRuleChanged"===(i=m.type)||"NetworkRulesSet"===i)&&x(e.fleet.builtInRules.queryKey()),l=m.type,c.has(l)&&(x(e.fleet.networkRules.queryKey()),x(e.fleet.networkRulesDraftChanges.queryKey()),x(e.fleet.explainReach.pathKey())),u=m.type,!n.has(u))return;x(e.fleet.list.queryKey()),x(e.fleet.health.queryKey());let{shipId:f}=m;"ShipCommissioned"===m.type&&null!==f&&h(e=>new Set([...e,f]))}}));return{live:function(e){switch(e){case"pending":return"live";case"connecting":return"reconnecting";case"idle":case"error":return"offline"}}(f.status),newShipIds:m,error:f.error}}])},74470,31071,e=>{"use strict";var t=e.i(71645);let s=/Mac|iPhone|iPad|iPod/;function a(e){return"mac"===e?"⌘↵":"Ctrl ↵"}function r(e){return"Enter"===e.key&&(e.metaKey||e.ctrlKey)&&!e.isComposing}function i(){return()=>void 0}function n(){var e;return e=navigator.userAgent,s.test(e)?"mac":"other"}function l(){return null}e.s(["isSendShortcut",0,r,"sendShortcutAria",0,function(e){return"mac"===e?"Meta+Enter":"Control+Enter"},"sendShortcutKeys",0,a,"submitOnSendShortcut",0,function(e){let{key:t,metaKey:s,ctrlKey:a}=e;r({key:t,metaKey:s,ctrlKey:a,isComposing:e.nativeEvent.isComposing})&&(e.preventDefault(),e.currentTarget.form?.requestSubmit())},"useShortcutPlatform",0,function(){return(0,t.useSyncExternalStore)(i,n,l)}],74470);var d=e.i(43476),o=e.i(36651);e.s(["SendShortcutHint",0,function({platform:e}){return(0,d.jsx)(o.Kbd,{"aria-hidden":!0,"data-testid":"send-shortcut-hint",className:"border-primary-foreground/25 bg-primary-foreground/10 text-primary-foreground",children:a(e)})}],31071)},46150,e=>{"use strict";e.s(["OPERATOR_NAME",0,"argo","capitalised",0,function(e){return e.charAt(0).toUpperCase()+e.slice(1)},"counted",0,function(e,t){return`${String(e)} ${1===e?t.one:t.many}`},"ship",0,function(e){return{kind:"ship",party:e}},"text",0,function(e){return{kind:"text",text:e}}])}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,31421,e=>{"use strict";var t=e.i(71645),s=e.i(46376),a=e.i(88015);e.s(["useAriaLabelledBy",0,function(e,r,i,n=!0,l){let[d,o]=t.useState(),c=(0,a.useBaseUiId)(l?`${l}-label`:void 0),u=e??r??d;return(0,s.useIsoLayoutEffect)(()=>{let t=e||r||!n?void 0:function(e,t){let s=function(e){if(!e)return;let t=e.parentElement;if(t&&"LABEL"===t.tagName)return t;let s=e.id;if(s){let t=e.nextElementSibling;if(t&&t.htmlFor===s)return t}let a=e.labels;return a&&a[0]}(e);if(s)return!s.id&&t&&(s.id=t),s.id||void 0}(i.current,c);d!==t&&o(t)}),u}])},86698,e=>{"use strict";e.s(["serializeValue",0,function(e){if(null==e)return"";if("string"==typeof e)return e;try{return JSON.stringify(e)}catch{return String(e)}}])},16327,e=>{"use strict";var t=e.i(56420);let s={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};s.node;let a=(0,t.default)(s);e.s(["ChevronDown",0,a],16327)},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)},52886,e=>{"use strict";var t=e.i(56420);let s={name:"circle-dashed",size:24,node:[["path",{d:"M10.1 2.182a10 10 0 0 1 3.8 0",key:"5ilxe3"}],["path",{d:"M13.9 21.818a10 10 0 0 1-3.8 0",key:"11zvb9"}],["path",{d:"M17.609 3.721a10 10 0 0 1 2.69 2.7",key:"1iw5b2"}],["path",{d:"M2.182 13.9a10 10 0 0 1 0-3.8",key:"c0bmvh"}],["path",{d:"M20.279 17.609a10 10 0 0 1-2.7 2.69",key:"1ruxm7"}],["path",{d:"M21.818 10.1a10 10 0 0 1 0 3.8",key:"qkgqxc"}],["path",{d:"M3.721 6.391a10 10 0 0 1 2.7-2.69",key:"1mcia2"}],["path",{d:"M6.391 20.279a10 10 0 0 1-2.69-2.7",key:"1fvljs"}]]};s.node;let a=(0,t.default)(s);e.s(["CircleDashed",0,a],52886)},75043,e=>{"use strict";var t=e.i(56420);let s={name:"circle-question-mark",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["help-circle","circle-help"]};s.node;let a=(0,t.default)(s);e.s(["default",0,a])},21048,e=>{"use strict";var t=e.i(56420);let s={name:"circle-slash",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"9",x2:"15",y1:"15",y2:"9",key:"1dfufj"}]]};s.node;let a=(0,t.default)(s);e.s(["CircleSlash",0,a],21048)},8734,e=>{"use strict";var t=e.i(56420);let s={name:"copy",size:24,node:[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]};s.node;let a=(0,t.default)(s);e.s(["Copy",0,a],8734)},86247,e=>{"use strict";var t=e.i(56420);let s={name:"ellipsis",size:24,node:[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],aliases:["more-horizontal"]};s.node;let a=(0,t.default)(s);e.s(["Ellipsis",0,a],86247)},15281,e=>{"use strict";var t=e.i(56420);let s={name:"pencil",size:24,node:[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]};s.node;let a=(0,t.default)(s);e.s(["Pencil",0,a],15281)},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)},30274,e=>{"use strict";var t=e.i(56420);let s={name:"send",size:24,node:[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]};s.node;let a=(0,t.default)(s);e.s(["Send",0,a],30274)},41220,e=>{"use strict";var t=e.i(56420);let s={name:"server",size:24,node:[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]};s.node;let a=(0,t.default)(s);e.s(["Server",0,a],41220)},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)},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})}])},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})}])},43988,e=>{"use strict";var t=e.i(43476),s=e.i(25913),a=e.i(90063);let r=(0,s.cva)("w-full min-w-0 resize-none rounded-md border border-input bg-card px-3 py-2 text-foreground shadow-sm transition-[border-color,box-shadow] duration-(--duration-fast) outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/22 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/16 disabled:cursor-not-allowed disabled:bg-muted disabled:opacity-50 disabled:shadow-none",{variants:{size:{md:"text-body",touch:"rounded-lg text-input-touch"},isMono:{true:"font-mono",false:""}},compoundVariants:[{size:"md",isMono:!0,className:"text-code"}],defaultVariants:{size:"md",isMono:!1}});e.s(["Textarea",0,function({className:e,size:s,isMono:i,rows:n=4,...l}){return(0,t.jsx)("textarea",{"data-slot":"textarea",rows:n,className:(0,a.classNames)(r({size:s,isMono:i}),e),...l})}])},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:i,variant:n="page",className:l}){return"section"===n?(0,t.jsxs)("p",{"data-slot":"empty-state","data-variant":n,className:(0,s.classNames)("rounded-lg border border-border px-4 py-3 text-center text-meta text-muted-foreground",l),children:[e,a?(0,t.jsxs)(t.Fragment,{children:[" ",a]}):null]}):"no-results"===n?(0,t.jsxs)("div",{"data-slot":"empty-state","data-variant":n,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",l),children:[(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:e}),i]}):(0,t.jsxs)("div",{"data-slot":"empty-state","data-variant":n,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",l),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,i?(0,t.jsx)("div",{className:"mt-1 max-sm:w-full max-sm:[&>*]:w-full",children:i}):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:i=4,label:n="Loading",className:l}){return(0,t.jsxs)("div",{role:"status","data-slot":"loading-skeleton","data-variant":e,className:(0,s.classNames)("w-full",l),children:[(0,t.jsx)("span",{className:"sr-only",children:n}),"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(i).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(i).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]})}])},39448,e=>{"use strict";var t=e.i(43476),s=e.i(25913),a=e.i(22016),r=e.i(90063);let i=(0,s.cva)("min-w-0 truncate font-sans font-medium",{variants:{size:{body:"text-body text-foreground",meta:"text-meta text-muted-foreground",title:"text-title font-semibold tracking-tight text-foreground max-sm:text-title-touch"}},defaultVariants:{size:"body"}});e.s(["ShipName",0,function({name:e,shipId:s,size:n,isSuffixShown:l=!1,isOperator:d=!1,href:o,className:c}){let u=o?(0,t.jsx)(a.default,{href:o,className:(0,r.classNames)(i({size:n}),"rounded-xs underline-offset-3 hover:underline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring"),title:e,children:e}):(0,t.jsx)("span",{className:i({size:n}),title:e,children:e});return(0,t.jsxs)("span",{"data-slot":"ship-name",className:(0,r.classNames)("inline-flex min-w-0 items-baseline gap-1.5",c),children:[u,d?(0,t.jsx)("span",{className:"shrink-0 font-normal text-muted-foreground",children:"(you)"}):null,l&&!d?(0,t.jsxs)("span",{className:"shrink-0 font-mono text-id text-muted-foreground uppercase",children:[(0,t.jsx)("span",{"aria-hidden":!0,children:"· "}),s.slice(-4)]}):null]})}])},77880,85538,e=>{"use strict";var t=e.i(43476),s=e.i(67927),a=e.i(66595),r=e.i(19759),i=e.i(22016),n=e.i(15905),l=e.i(36651),d=e.i(90063);let o={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}=o[e];return(0,t.jsxs)("span",{"data-slot":"live-status","data-state":e,"aria-live":"polite",className:(0,d.classNames)("inline-flex items-center gap-1.5 text-meta text-muted-foreground",s),children:[(0,t.jsx)("span",{"aria-hidden":!0,className:(0,d.classNames)("size-2 shrink-0 rounded-full",r)}),a]})}e.s(["Header",0,function({breadcrumb:e,parents:d=[],live:o,onCompose:u,onSearch:h}){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:[d.map(e=>(0,t.jsxs)("li",{className:"flex shrink-0 items-center gap-1.5",children:[(0,t.jsx)(i.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:o}),h?(0,t.jsxs)(n.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:h,children:[(0,t.jsx)("span",{className:"grow text-left",children:"Search ships or jump to"}),(0,t.jsx)(l.Kbd,{children:"⌘K"})]}):null,u?(0,t.jsx)(n.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),h=e.i(57957);e.s(["TopBar",0,function({title:e,live:s,actions:r,back:l,account:d,onSearch:o}){let m=o&&!l?o:void 0;return(0,t.jsxs)("header",{"data-slot":"top-bar","data-mode":l?"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:[l?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(i.default,{href:l.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}),l.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||m||d&&!l?(0,t.jsxs)("div",{className:"ml-auto flex items-center gap-1",children:[m?(0,t.jsx)(n.Button,{variant:"ghost",size:"touch",isIconOnly:!0,"aria-label":"Search ships or jump to","data-testid":"top-bar-search",onClick:m,children:(0,t.jsx)(a.Search,{"aria-hidden":!0})}):null,r,d&&!l?(0,t.jsx)(h.AccountMenuSheet,{...d}):null]}):null]})}],85538)},77821,e=>{"use strict";var t=e.i(43476),s=e.i(19759),a=e.i(15905),r=e.i(77880),i=e.i(85538);e.s(["ListPage",0,function({title:e,description:n,titleMeta:l,primaryAction:d,toolbar:o,live:c,onCompose:u,onSearch:h,account:m,banner:x,phoneTopBar:f,children:p}){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.Header,{breadcrumb:e,live:c,onCompose:u,onSearch:h}),x,f??(0,t.jsx)(i.TopBar,{title:e,live:c,account:m,onSearch:h,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}),l]}),n?(0,t.jsx)("p",{className:"text-meta text-muted-foreground max-sm:text-body-touch",children:n}):null]}),d?(0,t.jsx)("div",{className:"shrink-0 max-sm:w-full max-sm:[&>*]:w-full",children:d}):null]}),o,p]})]})}])},18423,e=>{"use strict";var t=e.i(12598),s=e.i(5861),a=e.i(71645),r=e.i(86413),i=e.i(27702);let n=new Set(["FleetInitialised","ShipCommissioned","ShipClaimed","LeaseRevoked","CredentialRevoked","StartingPromptIssued","ShipRetired","DeliveryAcknowledged","DeliveryUndeliverable","ShipReported","CrewRequested","CrewRequestRemoved","CrewAssigned","CrewStatusChanged","CrewRequestExplained","CrewRequestGivenBack","LabelAssigned","LabelUnassigned","LabelRetired"]),l=new Set(["LabelDefined","LabelValuesChanged","LabelRetired","LabelAssigned","LabelUnassigned","LabelDeleted"]),d=new Set(["DeliveryUndeliverable","DeliveryNotHandled","DeliveryDismissed"]),o=new Set(["NetworkRulesSet","NetworkRulesDraftSaved","NetworkRulesDraftDiscarded","NetworkRulesDeclared","BuiltInRuleChanged"]);e.s(["useLiveFleet",0,function(){let e=(0,i.useTRPC)(),c=(0,t.useQueryClient)(),[u,h]=(0,a.useState)(new Set),[m]=(0,a.useState)(()=>{let e,t,s,a;return e=new Set,t=new Set,s=e=>c.invalidateQueries({queryKey:e,exact:!0},{cancelRefetch:!1}),a=async a=>{e.add(a.queryHash);let r=a.isBehind;try{for(await s(a.queryKey);r||t.delete(a.queryHash);)r=!1,await s(a.queryKey)}finally{e.delete(a.queryHash)}},s=>{for(let r of c.getQueryCache().findAll({queryKey:s}))e.has(r.queryHash)?t.add(r.queryHash):a({queryHash:r.queryHash,queryKey:r.queryKey,isBehind:"fetching"===r.state.fetchStatus})}}),x=(0,s.useSubscription)(e.fleet.events.subscriptionOptions({lastEventId:null},{onData:({data:t})=>{var s,a,i,c,u;if("resync"===t.kind){m(e.fleet.pathKey()),m(r.INBOX_KEY);return}let{event:x}=t;for(let t of new Set([x.shipId,x.actorShipId]))null!==t&&(m(e.fleet.ship.queryKey({shipId:t})),m(e.fleet.shipTimeline.queryKey({shipId:t})),m(e.fleet.shipWay.queryKey({shipId:t})));if(null!==x.messageId&&(m(e.fleet.shipMessages.pathKey()),m(e.fleet.shipWay.pathKey()),m(e.fleet.message.queryKey({messageId:x.messageId})),m(e.fleet.inbox.pathKey()),m(r.INBOX_KEY),m(e.fleet.health.queryKey())),s=x.type,d.has(s)&&m(e.fleet.needsAttention.queryKey()),a=x.type,l.has(a)&&m(e.fleet.labels.queryKey()),"NetworkRulesDeclared"===x.type&&m(e.fleet.declaredNetworkRules.queryKey()),("BuiltInRuleChanged"===(i=x.type)||"NetworkRulesSet"===i)&&m(e.fleet.builtInRules.queryKey()),c=x.type,o.has(c)&&(m(e.fleet.networkRules.queryKey()),m(e.fleet.networkRulesDraftChanges.queryKey()),m(e.fleet.explainReach.pathKey())),u=x.type,!n.has(u))return;m(e.fleet.list.queryKey()),m(e.fleet.health.queryKey());let{shipId:f}=x;"ShipCommissioned"===x.type&&null!==f&&h(e=>new Set([...e,f]))}}));return{live:function(e){switch(e){case"pending":return"live";case"connecting":return"reconnecting";case"idle":case"error":return"offline"}}(x.status),newShipIds:u,error:x.error}}])},74470,31071,e=>{"use strict";var t=e.i(71645);let s=/Mac|iPhone|iPad|iPod/;function a(e){return"mac"===e?"⌘↵":"Ctrl ↵"}function r(e){return"Enter"===e.key&&(e.metaKey||e.ctrlKey)&&!e.isComposing}function i(){return()=>void 0}function n(){var e;return e=navigator.userAgent,s.test(e)?"mac":"other"}function l(){return null}e.s(["isSendShortcut",0,r,"sendShortcutAria",0,function(e){return"mac"===e?"Meta+Enter":"Control+Enter"},"sendShortcutKeys",0,a,"submitOnSendShortcut",0,function(e){let{key:t,metaKey:s,ctrlKey:a}=e;r({key:t,metaKey:s,ctrlKey:a,isComposing:e.nativeEvent.isComposing})&&(e.preventDefault(),e.currentTarget.form?.requestSubmit())},"useShortcutPlatform",0,function(){return(0,t.useSyncExternalStore)(i,n,l)}],74470);var d=e.i(43476),o=e.i(36651);e.s(["SendShortcutHint",0,function({platform:e}){return(0,d.jsx)(o.Kbd,{"aria-hidden":!0,"data-testid":"send-shortcut-hint",className:"border-primary-foreground/25 bg-primary-foreground/10 text-primary-foreground",children:a(e)})}],31071)},46150,e=>{"use strict";e.s(["OPERATOR_NAME",0,"argo","capitalised",0,function(e){return e.charAt(0).toUpperCase()+e.slice(1)},"counted",0,function(e,t){return`${String(e)} ${1===e?t.one:t.many}`},"ship",0,function(e){return{kind:"ship",party:e}},"text",0,function(e){return{kind:"text",text:e}}])}]);
|