@aeolus-fleet/console 0.20.0 → 0.20.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/build-manifest.json +3 -3
- package/.next/fallback-build-manifest.json +3 -3
- package/.next/prerender-manifest.json +3 -3
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/api/squadrons/[procedure]/route.js.nft.json +1 -1
- package/.next/server/app/inbox/page.js.nft.json +1 -1
- package/.next/server/app/inbox/page_client-reference-manifest.js +1 -1
- package/.next/server/app/labels/page.js.nft.json +1 -1
- package/.next/server/app/labels/page_client-reference-manifest.js +1 -1
- package/.next/server/app/needs-attention/page.js.nft.json +1 -1
- package/.next/server/app/needs-attention/page_client-reference-manifest.js +1 -1
- package/.next/server/app/needs-crew/page.js.nft.json +1 -1
- package/.next/server/app/needs-crew/page_client-reference-manifest.js +1 -1
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings/page.js.nft.json +1 -1
- package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/.next/server/app/ships/[shipId]/page.js.nft.json +1 -1
- package/.next/server/app/ships/[shipId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/sign-in/failed/page.js.nft.json +1 -1
- package/.next/server/app/sign-in/failed/page_client-reference-manifest.js +1 -1
- package/.next/server/app/sign-in/page.js.nft.json +1 -1
- package/.next/server/app/sign-in/page_client-reference-manifest.js +1 -1
- package/.next/server/app/squadrons/[squadronId]/page.js.nft.json +1 -1
- package/.next/server/app/squadrons/[squadronId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/squadrons/blueprints/[name]/page.js.nft.json +1 -1
- package/.next/server/app/squadrons/blueprints/[name]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/squadrons/connection/route.js.nft.json +1 -1
- package/.next/server/app/squadrons/page.js.nft.json +1 -1
- package/.next/server/app/squadrons/page_client-reference-manifest.js +1 -1
- package/.next/server/app/squadrons/templates/[name]/page.js.nft.json +1 -1
- package/.next/server/app/squadrons/templates/[name]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/trierarch-plugin/connection/route.js.nft.json +1 -1
- package/.next/server/app/trierarchs/[shipId]/page.js.nft.json +1 -1
- package/.next/server/app/trierarchs/[shipId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/trierarchs/page.js.nft.json +1 -1
- package/.next/server/app/trierarchs/page_client-reference-manifest.js +1 -1
- package/.next/server/app/version/route.js.nft.json +1 -1
- package/.next/server/chunks/[root-of-the-server]__1f_8ohl._.js +1 -1
- package/.next/server/chunks/_0h366h9._.js +1 -1
- package/.next/server/chunks/packages_console_lib_connect-plugin_ts_197hf-1._.js +1 -1
- package/.next/server/chunks/ssr/_0dogq79._.js +1 -1
- package/.next/server/chunks/ssr/_0rvujxo._.js +1 -1
- package/.next/server/chunks/ssr/_0s2b6hb._.js +1 -1
- package/.next/server/chunks/ssr/_0sko-kt._.js +1 -1
- package/.next/server/chunks/ssr/{_1bqclkf._.js → _0sv2xqb._.js} +2 -2
- package/.next/server/chunks/ssr/_0wr_wnm._.js +3 -0
- package/.next/server/chunks/ssr/_0wtj0e-._.js +1 -1
- package/.next/server/chunks/ssr/{_0n4kirm._.js → _0xc3etp._.js} +2 -2
- package/.next/server/chunks/ssr/_0xvm1ng._.js +1 -1
- package/.next/server/chunks/ssr/_0ziovn_._.js +1 -1
- package/.next/server/chunks/ssr/_11cgy8n._.js +3 -0
- package/.next/server/chunks/ssr/_1442xyx._.js +1 -1
- package/.next/server/chunks/ssr/_14rijy-._.js +3 -0
- package/.next/server/chunks/ssr/{_08f4mzr._.js → _17u4fan._.js} +2 -2
- package/.next/server/chunks/ssr/_181kpys._.js +1 -1
- package/.next/server/chunks/ssr/_19e0e-9._.js +1 -1
- package/.next/server/chunks/ssr/_1_h504-._.js +3 -0
- package/.next/server/chunks/ssr/_1al_cqt._.js +3 -0
- package/.next/server/chunks/ssr/_1bmk6y_._.js +3 -0
- package/.next/server/chunks/ssr/{_1oqoc4e._.js → _1ejhqt9._.js} +2 -2
- package/.next/server/chunks/ssr/_1ezhc7m._.js +3 -0
- package/.next/server/chunks/ssr/_1kv8ma5._.js +1 -1
- package/.next/server/chunks/ssr/_1ommvbv._.js +1 -1
- package/.next/server/chunks/ssr/{_0mob-i2._.js → _1on9mjs._.js} +2 -2
- package/.next/server/chunks/ssr/_1oofkty._.js +1 -1
- package/.next/server/chunks/ssr/_1r6ce_7._.js +1 -1
- package/.next/server/chunks/ssr/{_1tsejml._.js → _208q2q8._.js} +1 -1
- package/.next/server/chunks/ssr/node_modules_next_dist_0kq7z60._.js +1 -1
- package/.next/server/chunks/ssr/packages_console_0edevze._.js +3 -0
- package/.next/server/chunks/ssr/packages_console_0oso305._.js +3 -0
- package/.next/server/chunks/ssr/packages_console_0y7h5dm._.js +3 -0
- package/.next/server/chunks/ssr/packages_console_1stwpsk._.js +3 -0
- package/.next/server/chunks/ssr/packages_console_app_page_tsx_16ln4px._.js +1 -1
- package/.next/server/chunks/ssr/packages_console_app_ships_[shipId]_page_tsx_0fudjay._.js +1 -1
- package/.next/server/chunks/ssr/packages_console_app_squadrons_[squadronId]_page_tsx_1umxs1g._.js +1 -1
- package/.next/server/chunks/ssr/packages_console_app_squadrons_page_tsx_1w6ym6z._.js +1 -1
- package/.next/server/chunks/ssr/packages_console_app_trierarchs_[shipId]_page_tsx_1rqyoj3._.js +1 -1
- package/.next/server/chunks/ssr/packages_console_components_1-5gwzg._.js +1 -1
- package/.next/server/chunks/ssr/packages_console_components_organisms_form-squadron_tsx_1-qlsje._.js +3 -0
- package/.next/server/middleware-build-manifest.js +3 -3
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.js +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/{26dg2z_6kosr0.js → 0r8dost92fvd7.js} +1 -1
- package/.next/static/chunks/0y1nvhxr03jkb.js +1 -0
- package/.next/static/chunks/1dj9u_t1hus9k.js +1 -0
- package/.next/static/chunks/1ntkufzth29k5.js +1 -0
- package/.next/static/chunks/{39-cyg4qvxgbm.js → 21y50ct8e_pis.js} +1 -1
- package/.next/static/chunks/{21jwgqx67q8ql.js → 23hfit3epwjh0.js} +1 -1
- package/.next/static/chunks/25amuen1qm2o7.js +1 -0
- package/.next/static/chunks/28vyyv4krlzx3.js +1 -0
- package/.next/static/chunks/2b-ho-tbr3sac.js +1 -0
- package/.next/static/chunks/{3jsj5ozfio3me.js → 2c6e9e-s7rbf3.js} +1 -1
- package/.next/static/chunks/2ie6mvt-ssazt.js +1 -0
- package/.next/static/chunks/2n90taswwrii-.js +1 -0
- package/.next/static/chunks/{2_txjvbug4b86.js → 2r2aklt62ojhs.js} +1 -1
- package/.next/static/chunks/3061rp6nl670n.js +1 -0
- package/.next/static/chunks/3ba10-qig9f07.js +1 -0
- package/.next/static/chunks/3drxrwegn5v1p.css +3 -0
- package/.next/static/chunks/3jhje-hiar2ex.js +1 -0
- package/.next/static/chunks/3plldogn92kay.js +1 -0
- package/.next/static/chunks/3pu5ywtisj_fp.js +1 -0
- package/.next/static/chunks/3vl7dc6v-u8w0.js +1 -0
- package/.next/static/chunks/3x1-acncumcu6.js +1 -0
- package/.next/static/chunks/{3b5uomyz3knol.js → 3z61krti-vbu2.js} +1 -1
- package/.next/static/chunks/{0e6zs-5ou_ra4.js → 414186x82sxkk.js} +1 -1
- package/package.json +3 -3
- package/.next/server/chunks/ssr/_01f7zv3._.js +0 -3
- package/.next/server/chunks/ssr/_0bmd2ey._.js +0 -3
- package/.next/server/chunks/ssr/_0i0_i88._.js +0 -3
- package/.next/server/chunks/ssr/_0t1jjxf._.js +0 -3
- package/.next/server/chunks/ssr/_20pku2-._.js +0 -3
- package/.next/server/chunks/ssr/packages_console_023iioa._.js +0 -3
- package/.next/server/chunks/ssr/packages_console_0lv43wr._.js +0 -3
- package/.next/server/chunks/ssr/packages_console_lib_crew-settings-form_ts_1_mrtph._.js +0 -3
- package/.next/static/chunks/00pjrzynt0in-.js +0 -1
- package/.next/static/chunks/0ez9e35zkfaz5.js +0 -1
- package/.next/static/chunks/0vlyibw4rexm7.js +0 -1
- package/.next/static/chunks/16o3i61aw3cj2.js +0 -1
- package/.next/static/chunks/17quvh6filhxh.js +0 -1
- package/.next/static/chunks/19x_u3cmb9s_j.js +0 -1
- package/.next/static/chunks/1mbia-jrmgpuu.js +0 -1
- package/.next/static/chunks/2c1daktq2hun-.css +0 -3
- package/.next/static/chunks/2k5tcu7bvrhet.js +0 -1
- package/.next/static/chunks/2mvb-x6v93lfc.js +0 -1
- package/.next/static/chunks/2ne-qdcv-7ck1.js +0 -1
- package/.next/static/chunks/30ux5-xn650iq.js +0 -1
- package/.next/static/chunks/3e1veij7vs6ao.js +0 -1
- package/.next/static/chunks/3eaxbdj-y982h.js +0 -1
- package/.next/static/chunks/3evbxrltn9tcu.js +0 -1
- /package/.next/static/{LHmQaS8aizP80vXh3K-ws → va-oYqdgsZx7jVoPSVC3a}/_buildManifest.js +0 -0
- /package/.next/static/{LHmQaS8aizP80vXh3K-ws → va-oYqdgsZx7jVoPSVC3a}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{LHmQaS8aizP80vXh3K-ws → va-oYqdgsZx7jVoPSVC3a}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,59493,e=>{"use strict";var t=e.i(43476),s=e.i(77071),a=e.i(18566),r=e.i(71645),n=e.i(15905),i=e.i(60592),o=e.i(67927),l=e.i(77913),d=e.i(22016),c=e.i(49635),m=e.i(18310),u=e.i(84294),h=e.i(14732),p=e.i(67874),x=e.i(17981),f=e.i(88393),b=e.i(51588);function g({blueprints:e,squadrons:s,state:a,error:r,onRetry:n}){if("loading"===a)return(0,t.jsx)(f.LoadingSkeleton,{variant:"table",label:"Loading blueprints"});if("error"===a)return(0,t.jsx)(x.InlineError,{variant:"page",title:"Couldn’t read blueprints from git",description:"The squadron manager couldn’t fetch the squadrons repository. Running squadrons are not affected.",detail:r,onRetry:n});if(0===e.length)return(0,t.jsx)(p.EmptyState,{icon:(0,t.jsx)(l.DraftingCompass,{"aria-hidden":!0}),title:"No blueprints in git",description:"The squadron manager reads blueprints from .aeolus/squadrons/blueprints. Commit one there; it shows up here on its own."});let i=e.flatMap(e=>{let t=e.versions[0];return t?[{blueprint:e,latest:t,formed:(0,u.squadronsText)((0,u.squadronsFromBlueprint)(s,e))}]:[]});return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(h.Table,{"data-testid":"blueprint-table",className:"max-sm:hidden",children:[(0,t.jsx)(h.TableHeader,{children:(0,t.jsxs)(h.TableRow,{children:[(0,t.jsx)(h.TableHead,{children:"Blueprint"}),(0,t.jsx)(h.TableHead,{children:"Source"}),(0,t.jsx)(h.TableHead,{children:"Latest"}),(0,t.jsx)(h.TableHead,{children:"Roles"}),(0,t.jsx)(h.TableHead,{children:"Squadrons"}),(0,t.jsx)(h.TableHead,{children:"Committed"})]})}),(0,t.jsx)(h.TableBody,{children:i.map(({blueprint:e,latest:s,formed:a})=>(0,t.jsxs)(h.TableRow,{"data-testid":"blueprint-row",children:[(0,t.jsx)(h.TableCell,{className:"font-medium",children:(0,t.jsx)(d.default,{href:(0,u.blueprintPath)(e),className:"hover:underline",children:e.name})}),(0,t.jsx)(h.TableCell,{"data-testid":"blueprint-row-source",children:(0,t.jsx)(b.RepositoryName,{name:s.repository,href:(0,m.versionFileUrl)(s)})}),(0,t.jsxs)(h.TableCell,{children:["v",s.version]}),(0,t.jsx)(h.TableCell,{children:(0,u.rolesText)(s)}),(0,t.jsx)(h.TableCell,{className:""===a?"text-muted-foreground":void 0,children:""===a?"None":a}),(0,t.jsxs)(h.TableCell,{className:"text-muted-foreground",children:[(0,c.dayMonth)(new Date(s.committedAt))," · ",(0,t.jsx)("span",{className:"font-mono",children:s.commit.slice(0,7)})]})]},e.key))})]}),(0,t.jsx)("ul",{className:"divide-y divide-border overflow-hidden rounded-lg border border-border sm:hidden",children:i.map(({blueprint:e,latest:s})=>(0,t.jsx)("li",{children:(0,t.jsxs)(d.default,{href:(0,u.blueprintPath)(e),className:"flex items-center gap-2 px-3 py-2.5",children:[(0,t.jsxs)("span",{className:"flex min-w-0 grow flex-col gap-0.5",children:[(0,t.jsxs)("span",{className:"font-medium",children:[e.name," ",(0,t.jsxs)("span",{className:"text-meta font-normal text-muted-foreground",children:["v",s.version]})]}),(0,t.jsx)("span",{className:"truncate text-meta text-muted-foreground",children:(0,u.rolesText)(s)}),(0,t.jsx)("span",{className:"flex min-w-0 text-meta text-muted-foreground",children:(0,t.jsx)(b.RepositoryName,{name:s.repository})})]}),(0,t.jsx)(o.ChevronRight,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0 text-muted-foreground"})]})},e.key))})]})}var j=e.i(56420);let v={name:"layout-template",size:24,node:[["rect",{width:"18",height:"7",x:"3",y:"3",rx:"1",key:"f1a2em"}],["rect",{width:"9",height:"7",x:"3",y:"14",rx:"1",key:"jqznyg"}],["rect",{width:"5",height:"7",x:"16",y:"14",rx:"1",key:"q5h2i8"}]]};v.node;let w=(0,j.default)(v);function y({templates:e,blueprints:s,state:a,error:r,onRetry:n}){if("loading"===a)return(0,t.jsx)(f.LoadingSkeleton,{variant:"table",label:"Loading templates"});if("error"===a)return(0,t.jsx)(x.InlineError,{variant:"page",title:"Couldn’t read templates from git",description:"The squadron manager couldn’t fetch the squadrons repository. Running squadrons are not affected.",detail:r,onRetry:n});if(0===e.length)return(0,t.jsx)(p.EmptyState,{icon:(0,t.jsx)(w,{"aria-hidden":!0}),title:"No templates in git",description:"The squadron manager reads templates from .aeolus/squadrons/templates. Commit one there; it shows up here on its own."});let i=e.flatMap(e=>{let t=e.versions[0];return t?[{template:e,latest:t,users:function(e,t){let s=new Map;for(let e of t){let t=`${e.repository}#${e.name}`,a=s.get(t);(!a||a.version<e.version)&&s.set(t,e)}return(0,u.blueprintsUsing)([...s.values()],e).map(e=>e.name).sort().join(", ")}(e,s)}]:[]});return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(h.Table,{"data-testid":"template-table",className:"max-sm:hidden",children:[(0,t.jsx)(h.TableHeader,{children:(0,t.jsxs)(h.TableRow,{children:[(0,t.jsx)(h.TableHead,{children:"Template"}),(0,t.jsx)(h.TableHead,{children:"Source"}),(0,t.jsx)(h.TableHead,{children:"Latest"}),(0,t.jsx)(h.TableHead,{children:"Check-in"}),(0,t.jsx)(h.TableHead,{children:"Used by blueprints"}),(0,t.jsx)(h.TableHead,{children:"Committed"})]})}),(0,t.jsx)(h.TableBody,{children:i.map(({template:e,latest:s,users:a})=>(0,t.jsxs)(h.TableRow,{"data-testid":"template-row",children:[(0,t.jsx)(h.TableCell,{className:"font-medium",children:(0,t.jsx)(d.default,{href:(0,u.templatePath)(e),className:"hover:underline",children:e.name})}),(0,t.jsx)(h.TableCell,{"data-testid":"template-row-source",children:(0,t.jsx)(b.RepositoryName,{name:s.repository,href:(0,m.versionFileUrl)(s)})}),(0,t.jsxs)(h.TableCell,{children:["v",s.version]}),(0,t.jsx)(h.TableCell,{children:(0,u.checkInText)(s.checkInMinutes)}),(0,t.jsx)(h.TableCell,{className:""===a?"text-muted-foreground":void 0,children:""===a?"None":a}),(0,t.jsx)(h.TableCell,{className:"text-muted-foreground",children:(0,c.dayMonth)(new Date(s.committedAt))})]},e.key))})]}),(0,t.jsx)("ul",{className:"divide-y divide-border overflow-hidden rounded-lg border border-border sm:hidden",children:i.map(({template:e,latest:s})=>(0,t.jsx)("li",{children:(0,t.jsxs)(d.default,{href:(0,u.templatePath)(e),className:"flex items-center gap-2 px-3 py-2.5",children:[(0,t.jsxs)("span",{className:"flex min-w-0 grow flex-col gap-0.5",children:[(0,t.jsxs)("span",{className:"font-medium",children:[e.name," ",(0,t.jsxs)("span",{className:"text-meta font-normal text-muted-foreground",children:["v",s.version]})]}),(0,t.jsx)("span",{className:"text-meta text-muted-foreground",children:(0,u.checkInText)(s.checkInMinutes)}),(0,t.jsx)("span",{className:"flex min-w-0 text-meta text-muted-foreground",children:(0,t.jsx)(b.RepositoryName,{name:s.repository})})]}),(0,t.jsx)(o.ChevronRight,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0 text-muted-foreground"})]})},e.key))})]})}var k=e.i(44824),C=e.i(45608),N=e.i(95475),S=e.i(2767),T=e.i(71164),q=e.i(60011);let R={name:"wifi-off",size:24,node:[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]};R.node;let L=(0,j.default)(R);var F=e.i(48695);let B="state",O="blueprint",H="disbanded";var I=e.i(12470),$=e.i(91727),E=e.i(46033),D=e.i(75867),P=e.i(19249),M=e.i(78865);function z({squadrons:e,state:a,hasBlueprints:r,error:i,onRetry:o,onForm:l,view:d,onViewChange:c}){let m;if("loading"===a)return(0,t.jsx)(f.LoadingSkeleton,{variant:"table",label:"Loading squadrons"});if("error"===a)return(0,t.jsx)(x.InlineError,{title:"Couldn’t load squadrons",description:"The console couldn’t reach the squadron manager. Your ships keep running; nothing is lost.",detail:i,onRetry:o});if(0===e.length)return r?(0,t.jsx)(p.EmptyState,{icon:(0,t.jsx)(q.Shapes,{"aria-hidden":!0}),title:"No squadrons yet",description:"A squadron is a team of ships formed from a blueprint: a planner, implementers, a tester. You start each member's session by hand with its crew line.",action:l&&(0,t.jsx)(n.Button,{variant:"primary",icon:(0,t.jsx)(s.Plus,{"aria-hidden":!0}),onClick:l,"data-testid":"squadrons-form-first",children:"Form your first squadron"})}):(0,t.jsx)(p.EmptyState,{icon:(0,t.jsx)(L,{"aria-hidden":!0}),title:"No blueprints found",description:"The squadron manager reads blueprints and templates from git. Add a blueprint there; it shows up here on its own."});let u=(m=d.query.trim().toLowerCase(),e.filter(e=>(d.isDisbandedShown||"disbanded"!==e.state)&&("all"===d.state||e.state===d.state)&&("all"===d.blueprint||e.blueprint.name===d.blueprint)&&(""===m||e.id.toLowerCase().includes(m)||e.blueprint.name.toLowerCase().includes(m))));return(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,t.jsx)(V,{squadrons:e,view:d,onViewChange:c,shownCount:u.length}),0===u.length?(0,t.jsx)(p.EmptyState,{variant:"no-results",title:"No squadrons match",action:(0,t.jsx)(n.Button,{onClick:()=>{c({query:"",state:"all",blueprint:"all",isDisbandedShown:d.isDisbandedShown})},children:"Clear filters"})}):(0,t.jsx)(U,{squadrons:u})]})}let A={all:"All",forming:"Forming",sailing:"Sailing","standing-down":"Standing down"};function V({squadrons:e,view:s,onViewChange:a,shownCount:r}){let n={all:"All",...Object.fromEntries([...new Set(e.map(e=>e.blueprint.name))].toSorted((e,t)=>e.localeCompare(t)).map(e=>[e,e]))};return(0,t.jsxs)("div",{"data-slot":"squadrons-toolbar",className:"flex flex-wrap items-center gap-2",children:[(0,t.jsx)("div",{className:"w-60 max-sm:min-w-0 max-sm:flex-1",children:(0,t.jsx)(I.Input,{type:"search","aria-label":"Search squadrons",placeholder:"Search squadrons","data-testid":"squadrons-search",value:s.query,onChange:e=>{a({...s,query:e.target.value})}})}),(0,t.jsxs)(E.Select,{items:A,value:s.state,onValueChange:e=>{null!==e&&Object.hasOwn(A,e)&&a({...s,state:e})},children:[(0,t.jsx)(E.SelectTrigger,{size:"sm","aria-label":"State","data-testid":"squadrons-filter-state",children:(0,t.jsxs)("span",{className:"flex gap-1.5",children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:"State"}),(0,t.jsx)(E.SelectValue,{className:"font-medium"})]})}),(0,t.jsx)(E.SelectContent,{children:Object.entries(A).map(([e,s])=>(0,t.jsx)(E.SelectItem,{value:e,children:s},e))})]}),(0,t.jsxs)(E.Select,{items:n,value:s.blueprint,onValueChange:e=>{null!==e&&a({...s,blueprint:e})},children:[(0,t.jsx)(E.SelectTrigger,{size:"sm","aria-label":"Blueprint","data-testid":"squadrons-filter-blueprint",children:(0,t.jsxs)("span",{className:"flex gap-1.5",children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:"Blueprint"}),(0,t.jsx)(E.SelectValue,{className:"font-medium"})]})}),(0,t.jsx)(E.SelectContent,{children:Object.entries(n).map(([e,s])=>(0,t.jsx)(E.SelectItem,{value:e,className:"all"===e?void 0:"font-mono",children:s},e))})]}),(0,t.jsxs)("div",{className:"inline-flex items-center gap-2 sm:ml-auto",children:[(0,t.jsx)(D.Switch,{id:"squadrons-show-disbanded","data-testid":"squadrons-show-disbanded",checked:s.isDisbandedShown,onCheckedChange:e=>{a({...s,isDisbandedShown:e})}}),(0,t.jsxs)($.Label,{htmlFor:"squadrons-show-disbanded",className:"text-meta font-normal text-muted-foreground",children:["Show disbanded (",e.filter(e=>"disbanded"===e.state).length,")"]}),(0,t.jsxs)("span",{className:"text-meta text-muted-foreground",children:[r," of ",e.length," squadrons"]})]})]})}function U({squadrons:e}){return(0,t.jsxs)(h.Table,{"data-testid":"squadrons-table",children:[(0,t.jsx)(h.TableHeader,{children:(0,t.jsxs)(h.TableRow,{children:[(0,t.jsx)(h.TableHead,{children:"Squadron"}),(0,t.jsx)(h.TableHead,{children:"Blueprint"}),(0,t.jsx)(h.TableHead,{children:"State"}),(0,t.jsx)(h.TableHead,{children:"Members"}),(0,t.jsx)(h.TableHead,{children:"Health"}),(0,t.jsx)(h.TableHead,{children:"Formed"})]})}),(0,t.jsx)(h.TableBody,{children:e.map(e=>(0,t.jsxs)(h.TableRow,{"data-testid":"squadrons-row",children:[(0,t.jsx)(h.TableCell,{children:(0,t.jsx)(d.default,{href:`/squadrons/${e.id}`,className:"font-medium hover:underline",children:e.id})}),(0,t.jsx)(h.TableCell,{children:(0,t.jsxs)(d.default,{href:(0,u.blueprintPath)(e.blueprint),className:"hover:underline",children:[(0,t.jsx)("span",{className:"font-mono",children:e.blueprint.name})," ",(0,t.jsxs)("span",{className:"text-muted-foreground",children:["v",e.blueprint.version]})]})}),(0,t.jsx)(h.TableCell,{children:(0,t.jsx)(M.StatusBadge,{status:e.state})}),(0,t.jsx)(h.TableCell,{children:function(e){if("forming"===e.state){let{onStation:t,total:s}=(0,u.stationCount)(e);return`${String(t)} of ${String(s)} on station`}return`${String(e.members.length)} ${1===e.members.length?"member":"members"}`}(e)}),(0,t.jsx)(h.TableCell,{children:(0,t.jsx)(P.HealthSummary,{counts:(0,u.healthCounts)(e.members)})}),(0,t.jsx)(h.TableCell,{className:"text-muted-foreground",children:(0,c.shortDateTime)(new Date(e.formedAt))})]},e.id))})]})}var _=e.i(87792),W=e.i(33939),Y=e.i(90262),G=e.i(88721),J=e.i(86413),K=e.i(18423),Q=e.i(28459),X=e.i(96676),Z=e.i(78485),ee=e.i(86165),et=e.i(3979);let es=["squadrons","blueprints","templates"];function ea(e){return es.find(t=>t===e)??"squadrons"}e.s(["default",0,function({searchParams:e}){var o,l;let d,c=(0,a.useRouter)(),m=(0,r.use)(e),h={query:(o=new URLSearchParams(Object.entries(m).flatMap(([e,t])=>"string"==typeof t?[[e,t]]:[]))).get("q")??"",state:(l=o.get(B),void 0===(d=F.SQUADRON_STATES.find(e=>e===l))||"disbanded"===d?"all":d),blueprint:o.get(O)??"all",isDisbandedShown:"1"===o.get(H)},p="new"===m.form,x=ea(m.tab),f=e=>{let t,s=(t=new URLSearchParams,""!==e.query&&t.set("q",e.query),"all"!==e.state&&t.set(B,e.state),"all"!==e.blueprint&&t.set(O,e.blueprint),e.isDisbandedShown&&t.set(H,"1"),t).toString();c.replace(""===s?"/squadrons":`/squadrons?${s}`,{scroll:!1})},b=(0,X.useNow)(),j=(0,G.useAccountMenu)(b),v=(0,J.useOpenInboxCount)(),w=(0,Q.useNeedsAttention)(),q=(0,Q.useAttentionCount)(),R=(0,K.useLiveFleet)(),L=(0,F.useSquadrons)(),I=(0,ee.useSquadronsConnection)(),$=(0,F.useCatalogue)(),[E,D]=(0,r.useState)(!1),P=(0,Y.useAccess)(),M=(0,et.usePluginNav)(),[A,V]=(0,r.useState)(!1),[U,es]=(0,r.useState)(!1);(0,Z.useSignInWhenSessionEnds)([w.error,R.error]);let er=(0,u.blueprintChoices)($.data??{blueprints:[]}),en=()=>{D(!0)};return(0,t.jsxs)(_.ListLayout,{title:"Squadrons",description:"Teams of ships formed from blueprints in git.",live:R.live,nav:{active:"squadrons",inboxCount:v,attentionCount:q,...M},primaryAction:P.canManage&&er.length>0?(0,t.jsx)(n.Button,{variant:"primary",icon:(0,t.jsx)(s.Plus,{"aria-hidden":!0}),onClick:en,"data-testid":"squadrons-form",children:"Form squadron"}):void 0,onCompose:P.canSend?()=>{V(!0)}:void 0,onSearch:()=>{es(!0)},account:j,banner:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(S.ConsoleNotices,{}),(0,t.jsx)(N.ConsoleGuide,{})]}),children:["not-connected"===I?(0,t.jsx)(W.SquadronsNotConnected,{}):(0,t.jsxs)(i.Tabs,{value:x,onValueChange:e=>{let t=ea(e);c.replace("squadrons"===t?"/squadrons":`/squadrons?tab=${t}`,{scroll:!1})},children:[(0,t.jsxs)(i.TabsList,{variant:"line","aria-label":"Squadrons sections",children:[(0,t.jsx)(i.TabsTrigger,{variant:"line",value:"squadrons","data-testid":"squadrons-tab-squadrons",children:"Squadrons"}),(0,t.jsx)(i.TabsTrigger,{variant:"line",value:"blueprints","data-testid":"squadrons-tab-blueprints",children:"Blueprints"}),(0,t.jsx)(i.TabsTrigger,{variant:"line",value:"templates","data-testid":"squadrons-tab-templates",children:"Templates"})]}),(0,t.jsx)(i.TabsContent,{value:"squadrons",className:"pt-4",children:(0,t.jsx)(z,{squadrons:L.data??[],state:L.isError?"error":L.data?"ready":"loading",hasBlueprints:er.length>0,error:L.error?.message,onRetry:()=>{L.refetch()},onForm:P.canManage?en:void 0,view:h,onViewChange:f})}),(0,t.jsx)(i.TabsContent,{value:"blueprints",className:"pt-4",children:(0,t.jsx)(g,{blueprints:er,squadrons:L.data??[],state:$.isError?"error":$.data?"ready":"loading",error:$.error?.message,onRetry:()=>{$.refetch()}})}),(0,t.jsx)(i.TabsContent,{value:"templates",className:"pt-4",children:(0,t.jsx)(y,{templates:(0,u.templateChoices)($.data??{templates:[]}),blueprints:$.data?.blueprints??[],state:$.isError?"error":$.data?"ready":"loading",error:$.error?.message,onRetry:()=>{$.refetch()}})})]}),er.length>0&&(0,t.jsx)(T.FormSquadron,{blueprints:er,templates:$.data?.templates??[],isOpen:E||p,onOpenChange:e=>{D(e),!e&&p&&f(h)},onFormed:e=>{D(!1),c.push(`/squadrons/${e}`)}}),(0,t.jsx)(k.ComposeMessage,{isOpen:A,onOpenChange:V}),(0,t.jsx)(C.ConsoleCommands,{isOpen:U,onOpenChange:es,onCompose:()=>{V(!0)}})]})}],59493)},75867,e=>{"use strict";var t=e.i(43476);e.s([],24305),e.i(24305);var s=e.i(71645),a=e.i(51437),r=e.i(28918),n=e.i(46376),i=e.i(2077),o=e.i(56789),l=e.i(52245),d=e.i(88015),c=e.i(40886),m=e.i(33332);let u=s.createContext(void 0),h={...e.i(75812).fieldValidityMapping,checked:e=>e?{"data-checked":""}:{"data-unchecked":""}};var p=e.i(64350),x=e.i(69690),f=e.i(81104),b=e.i(84708),g=e.i(47778),j=e.i(38489),v=e.i(75606),w=e.i(56434),y=e.i(6039);let k=s.forwardRef(function(e,m){let{checked:k,className:C,defaultChecked:N,"aria-labelledby":S,form:T,id:q,inputRef:R,name:L,nativeButton:F=!1,onCheckedChange:B,readOnly:O=!1,required:H=!1,disabled:I=!1,render:$,uncheckedValue:E,value:D,style:P,...M}=e,{clearErrors:z}=(0,b.useFormContext)(),{state:A,setTouched:V,setDirty:U,validityData:_,setFilled:W,setFocused:Y,validationMode:G,disabled:J,name:K,validation:Q}=(0,x.useFieldRootContext)(),{labelId:X}=(0,g.useLabelableContext)(),Z=J||I,ee=K??L,et=s.useRef(null),es=(0,r.useMergedRefs)(et,R,Q.inputRef),ea=s.useRef(null),er=(0,d.useBaseUiId)(),en=(0,j.useLabelableId)({id:q}),ei=F?void 0:en,[eo,el]=(0,a.useControlled)({controlled:k,default:!!N,name:"Switch",state:"checked"});(0,f.useRegisterFieldControl)(ea,er,eo,void 0,!Z,L),(0,n.useIsoLayoutEffect)(()=>{W(eo)},[eo,W]),(0,y.useValueChanged)(eo,()=>{z(ee),U(eo!==_.initialValue),Q.change(eo)});let{getButtonProps:ed,buttonRef:ec}=(0,c.useButton)({disabled:Z,native:F}),em=function(e,t,a,r=!0,i){let[o,l]=s.useState(),c=(0,d.useBaseUiId)(i?`${i}-label`:void 0),m=e??t??o;return(0,n.useIsoLayoutEffect)(()=>{let s=e||t||!r?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}(a.current,c);o!==s&&l(s)}),m}(S,X,et,!F,ei),eu={...Q.getValidationProps(Z),checked:eo,disabled:Z,form:T,id:ei,name:ee,required:H,style:ee?i.visuallyHiddenInput:i.visuallyHidden,tabIndex:-1,type:"checkbox","aria-hidden":!0,ref:es,onChange(e){if(e.nativeEvent.defaultPrevented)return;if(O)return void e.preventDefault();let t=e.currentTarget.checked,s=(0,v.createChangeEventDetails)(w.REASONS.none,e.nativeEvent);B?.(t,s),s.isCanceled||el(t)},onClick(e){e.stopPropagation()},onFocus(){ea.current?.focus()},...void 0!==D?{value:D}:o.EMPTY_OBJECT},eh=s.useMemo(()=>({...A,checked:eo,disabled:Z,readOnly:O,required:H}),[A,eo,Z,O,H]),ep=(0,l.useRenderElement)("span",e,{state:eh,ref:[m,ea,ec],props:[{id:F?en:er,role:"switch","aria-checked":eo,"aria-readonly":O||void 0,"aria-required":H||void 0,"aria-labelledby":em,onFocus(){Z||Y(!0)},onBlur(){let e=et.current;e&&!Z&&(V(!0),Y(!1),"onBlur"===G&&Q.commit(e.checked))},onClick(e){if(O||Z)return;e.preventDefault();let t=et.current;t&&(0,p.dispatchClickWithModifiers)(t,e)}},M,ed,e=>Q.getValidationProps(Z,e)],stateAttributesMapping:h});return(0,t.jsxs)(u.Provider,{value:eh,children:[ep,!eo&&ee&&void 0!==E&&(0,t.jsx)("input",{type:"hidden",form:T,name:ee,value:E,disabled:Z}),(0,t.jsx)("input",{...eu,suppressHydrationWarning:!0})]})}),C=s.forwardRef(function(e,t){let{render:a,className:r,style:n,...i}=e,o=function(){let e=s.useContext(u);if(void 0===e)throw Error((0,m.default)(63));return e}();return(0,l.useRenderElement)("span",e,{state:o,ref:t,stateAttributesMapping:h,props:i})});e.s(["Root",0,k,"Thumb",0,C],50994);var N=e.i(50994),N=N,S=e.i(90063);e.s(["Switch",0,function({className:e,...s}){return(0,t.jsx)(N.Root,{"data-slot":"switch",className:(0,S.classNames)("peer inline-flex h-5 w-8.5 shrink-0 items-center rounded-full border border-transparent bg-input p-0.5 transition-colors duration-(--duration-fast) outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring data-checked:bg-primary data-disabled:opacity-45",e),...s,children:(0,t.jsx)(N.Thumb,{"data-slot":"switch-thumb",className:"pointer-events-none block size-4 rounded-full bg-card shadow-sm transition-transform duration-(--duration-fast) data-checked:translate-x-3.5"})})}],75867)},14732,e=>{"use strict";var t=e.i(43476),s=e.i(90063);e.s(["Table",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto rounded-lg border border-border bg-card shadow-sm",children:(0,t.jsx)("table",{"data-slot":"table",className:(0,s.classNames)("w-full caption-bottom text-body",e),...a})})},"TableBody",0,function({className:e,...a}){return(0,t.jsx)("tbody",{"data-slot":"table-body",className:(0,s.classNames)("[&_tr:last-child]:border-0",e),...a})},"TableCell",0,function({className:e,...a}){return(0,t.jsx)("td",{"data-slot":"table-cell",className:(0,s.classNames)("px-4 align-middle",e),...a})},"TableHead",0,function({className:e,...a}){return(0,t.jsx)("th",{"data-slot":"table-head",className:(0,s.classNames)("px-4 text-left align-middle text-caption font-medium whitespace-nowrap text-muted-foreground",e),...a})},"TableHeader",0,function({className:e,...a}){return(0,t.jsx)("thead",{"data-slot":"table-header",className:(0,s.classNames)("bg-muted [&_tr]:border-b",e),...a})},"TableRow",0,function({className:e,...a}){return(0,t.jsx)("tr",{"data-slot":"table-row",className:(0,s.classNames)("h-(--size-row) border-b border-border transition-colors duration-(--duration-fast) hover:bg-muted has-focus-visible:outline-2 has-focus-visible:-outline-offset-2 has-focus-visible:outline-ring data-new:animate-highlight [thead_&]:h-(--size-row-header) [thead_&]:hover:bg-transparent",e),...a})}])},19249,e=>{"use strict";var t=e.i(43476),s=e.i(90063);let a={"on-time":{label:"On time",dot:"bg-tone-ok-fg",text:"text-tone-ok-fg"},late:{label:"Late",dot:"bg-tone-waiting-fg",text:"text-tone-waiting-fg"},silent:{label:"Silent",dot:"bg-tone-attention-fg",text:"text-tone-attention-fg"},"standing-down":{label:"Standing down",dot:"bg-tone-active-fg",text:"text-tone-active-fg"},"not-on-station":{label:"Not on station",dot:"border border-dashed border-muted-foreground",text:"text-foreground"}};function r({health:e}){return(0,t.jsx)("span",{"aria-hidden":!0,className:(0,s.classNames)("size-2 shrink-0 rounded-full",a[e].dot)})}e.s(["HealthIndicator",0,function({health:e,detail:n,className:i}){return(0,t.jsxs)("span",{"data-slot":"health-indicator","data-health":e,className:(0,s.classNames)("inline-flex items-center gap-1.5 text-meta",i),children:[(0,t.jsx)(r,{health:e}),(0,t.jsx)("span",{className:(0,s.classNames)("font-medium",a[e].text),children:a[e].label}),void 0!==n&&(0,t.jsx)("span",{className:"text-muted-foreground",children:n})]})},"HealthSummary",0,function({counts:e,className:n}){return(0,t.jsx)("span",{"data-slot":"health-summary",className:(0,s.classNames)("inline-flex flex-wrap items-center gap-x-3 gap-y-1 text-meta",n),children:e.map(({health:e,count:s})=>(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,t.jsx)(r,{health:e}),(0,t.jsxs)("span",{children:[s," ",a[e].label.toLowerCase()]})]},e))})}])},33939,e=>{"use strict";var t=e.i(43476),s=e.i(94831),a=e.i(22016),r=e.i(15905),n=e.i(67874);e.s(["SquadronsNotConnected",0,function(){return(0,t.jsx)(n.EmptyState,{icon:(0,t.jsx)(s.Unplug,{"aria-hidden":!0}),title:"Squadrons is not connected",description:"Connect it in Settings; squadrons, blueprints and templates show up here then.",action:(0,t.jsx)(r.Button,{nativeButton:!1,render:(0,t.jsx)(a.default,{href:"/settings"}),"data-testid":"squadrons-open-settings",children:"Open Settings"})})}])},71164,e=>{"use strict";var t=e.i(43476),s=e.i(71645),a=e.i(10649),r=e.i(5387),n=e.i(80581);function i(e,t){return t?.labels.find(t=>t.key===e.key)?.values.find(t=>t.value===e.value)?.id}function o(e,t){return e.map(e=>{let s=e.crew.machineLabels??[];return{slot:e.slot,role:e.role,template:`${e.template.name}@${String(e.template.version)}`,harness:e.crew.harness??"",workspace:function(e){if(void 0!==e)return"worktree"===e.kind?{kind:"worktree",repository:e.repository}:{kind:"folder",name:e.name}}(e.crew.workspace),firstPrompt:e.crew.firstPrompt??"",options:{...e.crew.options},machineLabels:s.flatMap(e=>i(e,t)??[]),unknownLabels:s.filter(e=>void 0===i(e,t)).map(e=>`${e.key}=${e.value}`),parameters:e.parameters.map(e=>({name:e.name,description:e.description,value:e.value??""}))}})}function l(e){return[...void 0===e.workspace?["workspace"]:[],...e.parameters.filter(e=>""===e.value.trim()).map(e=>e.name)]}function d(e,t){return[...void 0===t?[]:(0,n.pickedChips)(e.machineLabels,t).map(e=>({key:e.key,value:e.value})),...e.unknownLabels.map(e=>{let[t="",s=""]=e.split("=");return{key:t,value:s}})]}function c(e){return"worktree"===e.kind?`worktree:${e.repository}`:`folder:${e.name}`}function m(e){let[t,...s]=e.split(":"),a=s.join(":");return"worktree"===t?{kind:"worktree",repository:a}:"folder"===t?{kind:"folder",name:a}:void 0}var u=e.i(78608),h=e.i(48695),p=e.i(265),x=e.i(10818),f=e.i(25398),b=e.i(84294),g=e.i(15905),j=e.i(22212),v=e.i(94945),w=e.i(91727),y=e.i(46033),k=e.i(14732),C=e.i(17981),N=e.i(16327),S=e.i(67927),T=e.i(85595),q=e.i(52886),R=e.i(90063),L=e.i(66616),F=e.i(12470),B=e.i(43988),O=e.i(4032);function H({id:e,label:s,isRequired:a,hint:r,children:n}){return(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsxs)(w.Label,{htmlFor:e,children:[s,(0,t.jsx)("span",{className:"font-normal text-muted-foreground",children:a?" required":" optional"})]}),n,void 0===r?null:(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:r})]})}function I({id:e,items:s,value:a,onPick:r,isDisabled:n,testId:i}){return(0,t.jsxs)(y.Select,{items:s,value:a,disabled:n,onValueChange:e=>{r("string"==typeof e?e:"")},children:[(0,t.jsx)(y.SelectTrigger,{id:e,"data-testid":i,children:(0,t.jsx)(y.SelectValue,{})}),(0,t.jsx)(y.SelectContent,{children:Object.entries(s).map(([e,s])=>(0,t.jsx)(y.SelectItem,{value:e,children:s},e))})]})}function $(e){return"string"==typeof e?e:JSON.stringify(e)}function E({member:e,offers:a,workspaces:r,machineLabels:n,isOpen:i,onOpenChange:o,isDisabled:d,error:u,onChange:h}){let p={workspace:(0,s.useId)(),harness:(0,s.useId)(),options:(0,s.useId)(),firstPrompt:(0,s.useId)(),parameters:(0,s.useId)()},x=l(e),f=a.find(t=>t.harness===e.harness),b={"":"The trierarch’s default",...Object.fromEntries(a.map(e=>[e.harness,(0,L.harnessWord)(e.harness)])),...""===e.harness||f?{}:{[e.harness]:(0,L.harnessWord)(e.harness)}},g=new Set((f?.options??[]).map(e=>e.name)),j=Object.entries(e.options).filter(([e])=>!g.has(e)),v=i?N.ChevronDown:S.ChevronRight;return(0,t.jsxs)("section",{"aria-label":e.slot,"data-testid":"member-crew-section",className:(0,R.classNames)("flex flex-col rounded-lg border bg-card",void 0===u?"border-border":"border-tone-attention-border"),children:[(0,t.jsxs)("button",{type:"button","aria-expanded":i,"data-testid":"member-crew-toggle",className:"flex min-h-11 items-center gap-2.5 px-3.5 py-2 text-left focus-visible:outline-2 focus-visible:outline-ring [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0",onClick:()=>{o(!i)},children:[(0,t.jsx)(v,{"aria-hidden":!0,className:"text-muted-foreground"}),(0,t.jsx)("span",{className:"font-mono text-body font-medium",children:e.slot}),(0,t.jsx)("span",{className:"font-mono text-meta text-muted-foreground",children:e.template}),(0,t.jsx)("span",{className:"flex-1"}),0===x.length?(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 text-meta text-tone-ok-fg","data-testid":"member-crew-ready",children:[(0,t.jsx)(T.CircleCheck,{"aria-hidden":!0}),"Ready"]}):(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 text-meta text-tone-waiting-fg","data-testid":"member-crew-missing",children:[(0,t.jsx)(q.CircleDashed,{"aria-hidden":!0}),"Needs ",x.join(", ")]})]}),void 0===u?null:(0,t.jsx)("div",{className:"px-3.5 pb-3",children:(0,t.jsx)(C.InlineError,{variant:"field",title:u})}),i?(0,t.jsxs)("div",{className:"flex flex-col gap-4 border-t border-border px-3.5 py-3.5",children:[(0,t.jsx)(H,{id:p.workspace,label:"Workspace",isRequired:!0,hint:"A repository gets a new git worktree for this ship; a folder is used as it is.",children:(0,t.jsx)(I,{id:p.workspace,items:r,value:void 0===e.workspace?"":c(e.workspace),isDisabled:d,testId:"member-crew-workspace",onPick:t=>{h({...e,workspace:m(t)})}})}),(0,t.jsx)(H,{id:p.harness,label:"Harness",children:(0,t.jsx)(I,{id:p.harness,items:b,value:e.harness,isDisabled:d,testId:"member-crew-harness",onPick:t=>{h({...e,harness:t})}})}),(f?.options??[]).map((s,a)=>(0,t.jsx)(H,{id:`${p.options}-${String(a)}`,label:s.name,children:(0,t.jsx)(I,{id:`${p.options}-${String(a)}`,items:{"":"The trierarch’s default",...Object.fromEntries(s.values.map(e=>[e,e===s.defaultValue?`${e} (default)`:e])),..."string"==typeof e.options[s.name]&&!s.values.includes($(e.options[s.name]))?{[$(e.options[s.name])]:$(e.options[s.name])}:{}},value:void 0===e.options[s.name]?"":$(e.options[s.name]),isDisabled:d,testId:"member-crew-option",onPick:t=>{let a=Object.fromEntries(Object.entries(e.options).filter(([e])=>e!==s.name));h({...e,options:""===t?a:{...a,[s.name]:t}})}})},s.name)),0===j.length?null:(0,t.jsxs)("div",{className:"flex flex-col gap-1","data-testid":"member-crew-file-options",children:[(0,t.jsx)("span",{className:"text-body font-medium",children:"From its files"}),(0,t.jsx)("ul",{className:"flex flex-wrap gap-1.5",children:j.map(([e,s])=>(0,t.jsxs)("li",{className:"rounded-sm bg-secondary px-1.5 py-0.5 font-mono text-id",children:[e,"=",$(s)]},e))})]}),void 0===n?null:(0,t.jsx)(O.MachineLabelsField,{shipName:e.slot,picked:n.chipsOf(e.machineLabels),groups:n.groups,match:n.matchOf(e.machineLabels),isDisabled:d,unknown:e.unknownLabels,onAdd:t=>{h({...e,machineLabels:[...e.machineLabels,t]})},onRemove:t=>{h({...e,machineLabels:e.machineLabels.filter(e=>e!==t)})},onRemoveUnknown:t=>{h({...e,unknownLabels:e.unknownLabels.filter(e=>e!==t)})}}),(0,t.jsx)(H,{id:p.firstPrompt,label:"First prompt",hint:"The session starts with it, on its first start only.",children:(0,t.jsx)(B.Textarea,{id:p.firstPrompt,value:e.firstPrompt,disabled:d,"data-testid":"member-crew-first-prompt",rows:2,onChange:t=>{h({...e,firstPrompt:t.target.value})}})}),e.parameters.map((s,a)=>(0,t.jsx)(H,{id:`${p.parameters}-${String(a)}`,label:s.name,isRequired:!0,hint:s.description,children:(0,t.jsx)(F.Input,{id:`${p.parameters}-${String(a)}`,value:s.value,disabled:d,"aria-invalid":""===s.value.trim()||void 0,"data-testid":"member-crew-parameter",onChange:t=>{h({...e,parameters:e.parameters.map(e=>e.name===s.name?{...e,value:t.target.value}:e)})}})},s.name))]}):null]})}function D({drafts:e,crew:a,isPending:r,error:n,onBack:i,onSubmit:u}){let h=(0,s.useId)(),[p,x]=(0,s.useState)(()=>o(e,a.context)),[f,b]=(0,s.useState)(()=>new Set(o(e,a.context).filter(e=>l(e).length>0).map(e=>e.slot))),v=function(e,t){let s=new Map;for(let t of e){for(let e of t.repositories)s.set(c({kind:"worktree",repository:e}),`${e} \xb7 new worktree`);for(let e of t.folders)s.set(c({kind:"folder",name:e}),`${e} \xb7 folder, as it is`)}for(let{workspace:e}of t)void 0===e||s.has(c(e))||s.set(c(e),"worktree"===e.kind?`${e.repository} \xb7 new worktree, no machine offers it yet`:`${e.name} \xb7 folder, no machine offers it yet`);return Object.fromEntries(s)}(a.offers,p),{ready:k,total:N}={ready:p.filter(e=>0===l(e).length).length,total:p.length},S=k===N,T=void 0===n?void 0:function(e,t){let{members:s,context:a}=t,[,r]=/machine label (\S+?),/.exec(e)??[];if(void 0!==r)return s.find(e=>d(e,a).some(e=>`${e.key}=${e.value}`===r))?.slot}(n,{members:p,context:a.context}),q=p.some(e=>void 0===e.workspace);return(0,t.jsxs)(t.Fragment,{children:[0===a.offers.length?(0,t.jsx)("p",{role:"status",className:"rounded-md border border-tone-waiting-border bg-tone-waiting-bg px-3 py-2 text-meta text-tone-waiting-fg",children:"No machine answers with what it offers yet, so there is no workspace to pick. Join a machine under Trierarchs, or wait for its trierarch to report."}):null,q&&Object.keys(v).length>0?(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)(w.Label,{htmlFor:h,children:"Workspace for every member without one"}),(0,t.jsxs)(y.Select,{items:{"":"Pick a workspace",...v},value:"",disabled:r,onValueChange:e=>{let t="string"==typeof e?m(e):void 0;void 0!==t&&x(e=>e.map(e=>void 0===e.workspace?{...e,workspace:t}:e))},children:[(0,t.jsx)(y.SelectTrigger,{id:h,"data-testid":"form-squadron-workspace-all",children:(0,t.jsx)(y.SelectValue,{})}),(0,t.jsx)(y.SelectContent,{children:Object.entries(v).map(([e,s])=>(0,t.jsx)(y.SelectItem,{value:e,children:s},e))})]})]}):null,(0,t.jsx)("div",{className:"-mx-1 flex max-h-[55vh] flex-col gap-2 overflow-y-auto px-1 max-sm:max-h-none max-sm:flex-1","data-testid":"form-squadron-members",children:p.map(e=>(0,t.jsx)(E,{member:e,offers:a.offers,workspaces:v,...void 0===a.machineLabels?{}:{machineLabels:a.machineLabels},isOpen:f.has(e.slot)||T===e.slot,onOpenChange:t=>{b(s=>{let a=new Set(s);return t?a.add(e.slot):a.delete(e.slot),a})},isDisabled:r,...T===e.slot&&void 0!==n?{error:n}:{},onChange:e=>{x(t=>t.map(t=>t.slot===e.slot?e:t))}},e.slot))}),void 0!==n&&void 0===T?(0,t.jsx)(C.InlineError,{variant:"field",title:"Couldn’t form the squadron",description:n}):null,(0,t.jsxs)(j.DialogFooter,{className:"items-center border-t border-border pt-3",children:[(0,t.jsxs)("span",{className:"mr-auto text-meta tabular-nums","data-testid":"form-squadron-ready","aria-live":"polite",children:[k," of ",N," ",1===N?"member":"members"," ready"]}),(0,t.jsx)(g.Button,{type:"button",disabled:r,onClick:i,children:"Back"}),(0,t.jsx)(g.Button,{variant:"primary",isLoading:r,disabled:!S,"data-testid":"form-squadron-submit",onClick:()=>{u(p)},children:r?"Forming":"Form squadron"})]})]})}function P({blueprints:e,templates:a,isPending:r,error:n,onSubmit:i,initial:o,crew:l,onPicked:d}){let[c,m]=(0,s.useState)(1),[u,h]=(0,s.useState)(o?.key??e[0]?.key),p=e.find(e=>e.key===u)??e[0],[v,N]=(0,s.useState)(o?.version??p?.versions[0]?.version),S=p?.versions.find(e=>e.version===v)??p?.versions[0];if(!p||!S)return null;if(1===c){let s=Object.fromEntries(p.versions.map((e,t)=>[String(e.version),`v${String(e.version)}${0===t?" (latest)":""}`]));return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(j.DialogHeader,{children:[(0,t.jsx)(j.DialogTitle,{children:"Form a squadron"}),(0,t.jsx)(j.DialogDescription,{children:"Step 1 of 2. Pick a blueprint and the version to form it from."})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("span",{className:"text-meta font-medium",children:"Blueprint"}),(0,t.jsx)("div",{role:"radiogroup","aria-label":"Blueprint",className:"flex flex-col gap-2",children:e.map(e=>{let s=e.versions[0],a=e.key===p.key;return(0,t.jsxs)("button",{type:"button",role:"radio","aria-checked":a,"data-testid":"form-squadron-blueprint",onClick:()=>{h(e.key),N(e.versions[0]?.version)},className:"flex flex-col items-start gap-0.5 rounded-md border border-border px-3 py-2 text-left aria-checked:border-primary aria-checked:ring-1 aria-checked:ring-primary",children:[(0,t.jsxs)("span",{className:"text-body font-medium",children:[e.name," ",(0,t.jsxs)("span",{className:"font-mono text-meta text-muted-foreground",children:["v",s?.version,", latest"]})]}),(0,t.jsx)("span",{className:"text-meta text-muted-foreground",children:s?.description})]},e.key)})})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)(w.Label,{htmlFor:"form-squadron-version",children:"Version"}),(0,t.jsxs)(y.Select,{items:s,value:String(S.version),onValueChange:e=>{N(Number(e))},children:[(0,t.jsx)(y.SelectTrigger,{id:"form-squadron-version","aria-label":"Version",children:(0,t.jsx)(y.SelectValue,{})}),(0,t.jsx)(y.SelectContent,{children:Object.entries(s).map(([e,s])=>(0,t.jsx)(y.SelectItem,{value:e,children:s},e))})]}),(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:"Older versions stay available. Squadrons keep the version they were formed with."})]}),(0,t.jsxs)(j.DialogFooter,{children:[(0,t.jsx)(j.DialogClose,{render:(0,t.jsx)(g.Button,{type:"button"}),children:"Cancel"}),(0,t.jsx)(g.Button,{variant:"primary","data-testid":"form-squadron-preview",onClick:()=>{d?.({repository:S.repository,name:S.name,version:S.version}),m(2)},children:void 0===l?"Preview roles":"Next: the members"})]})]})}let T={repository:S.repository,name:S.name,version:S.version};if(void 0!==l)return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(j.DialogHeader,{children:[(0,t.jsxs)(j.DialogTitle,{children:["Form a squadron from ",S.name," v",S.version]}),(0,t.jsxs)(j.DialogDescription,{children:["Step 2 of 2. Each member, prefilled from its template and the blueprint. A workspace and every parameter are needed; the rest is optional. Forming commissions ",(0,b.memberCount)(S)," member ships and a flagship, and requests a crew for each member."]})]}),"ready"===l.state?(0,t.jsx)(D,{drafts:l.members,crew:l,isPending:r,...void 0===n?{}:{error:n},onBack:()=>{m(1)},onSubmit:e=>{i(T,e)}}):(0,t.jsxs)(t.Fragment,{children:["loading"===l.state?(0,t.jsx)("p",{className:"text-meta text-muted-foreground","data-testid":"form-squadron-members-loading",children:"Reading each member’s crew settings from its files."}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(C.InlineError,{variant:"field",title:"Couldn’t read the members’ crew settings",description:l.error??"Try again in a moment."}),(0,t.jsx)("div",{children:(0,t.jsx)(g.Button,{size:"sm",icon:(0,t.jsx)(f.RotateCw,{}),onClick:l.onRetry,children:"Try again"})})]}),(0,t.jsxs)(j.DialogFooter,{children:[(0,t.jsx)(g.Button,{type:"button",onClick:()=>{m(1)},children:"Back"}),(0,t.jsx)(g.Button,{variant:"primary",disabled:!0,"data-testid":"form-squadron-submit",children:"Form squadron"})]})]})]});let q=(0,b.rolePreviews)(S,a);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(j.DialogHeader,{children:[(0,t.jsxs)(j.DialogTitle,{children:["Form a squadron from ",S.name," v",S.version]}),(0,t.jsxs)(j.DialogDescription,{children:["Step 2 of 2. ",(0,b.memberCount)(S)," member ships and a flagship are commissioned when you confirm."]})]}),(0,t.jsxs)(k.Table,{children:[(0,t.jsx)(k.TableHeader,{children:(0,t.jsxs)(k.TableRow,{children:[(0,t.jsx)(k.TableHead,{children:"Role"}),(0,t.jsx)(k.TableHead,{children:"Template"}),(0,t.jsx)(k.TableHead,{children:"Members"}),(0,t.jsx)(k.TableHead,{children:"Check-in"})]})}),(0,t.jsx)(k.TableBody,{children:q.map(e=>(0,t.jsxs)(k.TableRow,{children:[(0,t.jsx)(k.TableCell,{className:"font-mono",children:e.role}),(0,t.jsx)(k.TableCell,{className:"font-mono",children:e.template}),(0,t.jsx)(k.TableCell,{children:e.count}),(0,t.jsx)(k.TableCell,{children:void 0===e.checkInMinutes?"unknown":(0,b.checkInText)(e.checkInMinutes)})]},e.role))})]}),(0,t.jsxs)("p",{className:"flex items-start gap-2 rounded-md bg-muted px-3 py-2 text-meta text-muted-foreground",children:[(0,t.jsx)(x.Info,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon-sm) shrink-0"}),(0,t.jsxs)("span",{children:["The flagship is named as the squadron, ",(0,t.jsxs)("span",{className:"font-mono",children:[S.name,"-"]})," plus six random characters: the squadron's address. Members are named by role."]})]}),(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:"Next you get crew lines and a launch note per member. You start each session by hand; the squadron sails once every member is on station."}),void 0!==n&&(0,t.jsx)(C.InlineError,{variant:"field",title:"Couldn’t form the squadron",description:n}),(0,t.jsxs)(j.DialogFooter,{children:[(0,t.jsx)(g.Button,{type:"button",disabled:r,onClick:()=>{m(1)},children:"Back"}),(0,t.jsx)(g.Button,{variant:"primary",isLoading:r,"data-testid":"form-squadron-submit",onClick:()=>{i(T)},children:r?"Forming":"Form squadron"})]})]})}function M(e){let{isOpen:s,onOpenChange:a,isPending:r}=e;return(0,t.jsx)(j.Dialog,{open:s,onOpenChange:e=>{r||a(e)},children:(0,t.jsx)(j.DialogContent,{size:"md","data-testid":"form-squadron-dialog",className:v.dialogSurface.phoneFullScreen,children:(0,t.jsx)(P,{...e})})})}e.s(["FormSquadron",0,function({blueprints:e,templates:n,isOpen:i,onOpenChange:o,initial:l,onFormed:c}){let m=(0,p.useHasTrierarchPlugin)(),x=(0,h.useFormSquadron)(),[f,b]=(0,s.useState)(),g=(0,h.useBlueprintCrew)(m?f:void 0),j=(0,p.useMachines)(),v=(0,r.useLabelContext)(),w=void 0===v||void 0===j.data?void 0:(0,u.machineLabelsInputOf)(v,j.data);return(0,t.jsx)(M,{blueprints:e,templates:n,...void 0===l?{}:{initial:l},isOpen:i,onOpenChange:o,isPending:x.isPending,...null===x.error?{}:{error:x.error.message},onPicked:e=>{x.reset(),b(e)},...m?{crew:{state:g.isError||j.isError?"error":void 0===g.data||void 0===j.data?"loading":"ready",members:g.data??[],offers:(0,a.offersOf)(j.data??[]),...void 0===v?{}:{context:v},...void 0===w?{}:{machineLabels:w},...null===g.error?null===j.error?{}:{error:j.error.message}:{error:g.error.message},onRetry:()=>{g.refetch(),j.refetch()}}}:{},onSubmit:(e,t)=>{x.mutate({blueprint:e,...void 0===t?{}:{members:Object.fromEntries(t.map(e=>[e.slot,{crew:{...""===e.harness?{}:{harness:e.harness},...void 0===e.workspace?{}:{workspace:e.workspace},...""===e.firstPrompt.trim()?{}:{firstPrompt:e.firstPrompt},options:e.options,machineLabels:d(e,v)},parameters:Object.fromEntries(e.parameters.map(e=>[e.name,e.value]))}]))}},{onSuccess:e=>{c(e.squadronId)}})}})}],71164)},87792,e=>{"use strict";var t=e.i(43476),s=e.i(19759),a=e.i(15905),r=e.i(77880),n=e.i(36779),i=e.i(15034),o=e.i(85538);e.s(["ListLayout",0,function({title:e,description:l,titleMeta:d,primaryAction:c,toolbar:m,live:u,nav:h,onCompose:p,onSearch:x,account:f,banner:b,children:g}){return(0,t.jsxs)("div",{className:"flex min-h-dvh bg-background",children:[(0,t.jsx)(n.Sidebar,{active:h.active,inboxCount:h.inboxCount,attentionCount:h.attentionCount,needsCrewCount:h.needsCrewCount,hasSquadrons:h.hasSquadrons,hasTrierarchs:h.hasTrierarchs,trierarchsCount:h.trierarchsCount,hasSettings:h.hasSettings,...f}),(0,t.jsxs)("div",{className:"flex min-w-0 grow flex-col",children:[(0,t.jsx)(r.Header,{breadcrumb:e,live:u,onCompose:p,onSearch:x}),b,(0,t.jsx)(o.TopBar,{title:e,live:u,account:f,onSearch:x,actions:p?(0,t.jsx)(a.Button,{variant:"ghost",size:"touch",isIconOnly:!0,"aria-label":"Compose","data-testid":"top-bar-compose",onClick:p,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}),d]}),l?(0,t.jsx)("p",{className:"text-meta text-muted-foreground max-sm:text-body-touch",children:l}):null]}),c?(0,t.jsx)("div",{className:"shrink-0 max-sm:w-full max-sm:[&>*]:w-full",children:c}):null]}),m,g]})]}),(0,t.jsx)(i.TabBar,{active:"overview"===h.active||"needs-crew"===h.active?"fleet":"settings"===h.active?void 0:h.active,hasSquadrons:h.hasSquadrons,hasTrierarchs:h.hasTrierarchs,trierarchsCount:h.trierarchsCount,inboxCount:h.inboxCount,attentionCount:h.attentionCount})]})}])},18310,51588,e=>{"use strict";function t(e){let t=/^github\.com\/([^/]+\/[^/]+)$/.exec(e);return t?.[1]===void 0?{label:e,isGitHub:!1}:{label:t[1],isGitHub:!0}}function s(e,t){let s=new Map;for(let{name:a,version:r}of e.filter(e=>e.repository===t))s.set(a,[...s.get(a)??[],r]);return[...s].map(([e,t])=>({name:e,versions:t.toSorted((e,t)=>e-t)})).toSorted((e,t)=>e.name.localeCompare(t.name))}e.s(["leftOutLabel",0,function(e){let{kind:t,name:s,version:a}=e;return"blueprint"===t?`blueprint ${s} v${String(a)}`:`${t} ${s}@${String(a)}`},"repositoryContents",0,function(e,t){return{templates:s(e.templates,t),blueprints:s(e.blueprints,t),leftOut:e.problems.filter(e=>e.repository===t)}},"repositoryLabel",0,t,"versionFileUrl",0,function(e){let{label:s,isGitHub:a}=t(e.repository);return a?`https://github.com/${s}/blob/${e.commit}/${encodeURI(e.file)}`:void 0}],18310);var a=e.i(43476),r=e.i(56420);let n={name:"folder-git-2",size:24,node:[["path",{d:"M18 19a5 5 0 0 1-5-5v8",key:"sz5oeg"}],["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]]};n.node;let i=(0,r.default)(n);function o(){return(0,a.jsx)("svg",{"aria-hidden":!0,viewBox:"0 0 16 16",fill:"currentColor",className:"size-(--size-icon-sm) shrink-0",children:(0,a.jsx)("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"})})}e.s(["RepositoryName",0,function({name:e,href:s}){let{label:r,isGitHub:n}=t(e),l=(0,a.jsxs)(a.Fragment,{children:[n?(0,a.jsx)(o,{}):(0,a.jsx)(i,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0 text-muted-foreground"}),(0,a.jsx)("span",{className:"truncate",children:r})]}),d="inline-flex min-w-0 items-center gap-1.5 font-medium";return void 0===s?(0,a.jsx)("span",{title:e,className:d,children:l}):(0,a.jsx)("a",{href:s,target:"_blank",rel:"noreferrer",title:e,className:`${d} hover:underline`,children:l})}],51588)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,86247,e=>{"use strict";var t=e.i(56420);let i={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"]};i.node;let s=(0,t.default)(i);e.s(["Ellipsis",0,s],86247)},18236,e=>{"use strict";var t=e.i(56420);let i={name:"file-key",size:24,node:[["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M4 12v6",key:"bg1pfk"}],["path",{d:"M4 14h2",key:"1sf9f8"}],["path",{d:"M9.65 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v4",key:"d56i0q"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],aliases:["file-key-2"]};i.node;let s=(0,t.default)(i);e.s(["FileKey",0,s],18236)},58925,e=>{"use strict";var t=e.i(56420);let i={name:"key-round",size:24,node:[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]};i.node;let s=(0,t.default)(i);e.s(["KeyRound",0,s],58925)},68997,e=>{"use strict";var t=e.i(56420);let i={name:"pen",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"}]],aliases:["edit-2"]};i.node;let s=(0,t.default)(i);e.s(["Pen",0,s],68997)},15331,71139,73330,e=>{"use strict";var t=e.i(56420);let i={name:"radio",size:24,node:[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478",key:"1fwjs5"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134",key:"ehdyv1"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134",key:"1q22gi"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478",key:"r2q7qm"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]};i.node;let s=(0,t.default)(i);e.s(["Radio",0,s],15331);let n={name:"user-x",size:24,node:[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"17",x2:"22",y1:"8",y2:"13",key:"3nzzx3"}],["line",{x1:"22",x2:"17",y1:"8",y2:"13",key:"1swrse"}]]};n.node;let a=(0,t.default)(n);e.s(["UserX",0,a],71139);var r=e.i(49635);e.s(["canPing",0,function(e){return"agent"===e.kind&&"crewed"===e.status},"pingLine",0,function(e,t){let i=new Date(e.sentAt);switch(e.state){case"waiting":{let e=(0,r.relativeTime)(i,t);return`Pinged ${"Just now"===e?"just now":e}, no answer yet`}case"answered":var s;let n;return null===e.answeredAt?"Answered ping":`Answered ping in ${(n=Math.max(0,(s=new Date(e.answeredAt)).getTime()-i.getTime()))<6e4?`${String(Math.round(n/1e3))} s`:(0,r.duration)(i,s)}`;case"received":return"Received, not answered with pong";case"undeliverable":return"Ping not answered: undeliverable"}}],73330)},83035,e=>{"use strict";var t=e.i(56420);let i={name:"square-terminal",size:24,node:[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]],aliases:["terminal-square"]};i.node;let s=(0,t.default)(i);e.s(["SquareTerminal",0,s],83035)},68401,e=>{"use strict";var t=e.i(56420);let i={name:"tags",size:24,node:[["path",{d:"M13.172 2a2 2 0 0 1 1.414.586l6.71 6.71a2.4 2.4 0 0 1 0 3.408l-4.592 4.592a2.4 2.4 0 0 1-3.408 0l-6.71-6.71A2 2 0 0 1 6 9.172V3a1 1 0 0 1 1-1z",key:"16rjxf"}],["path",{d:"M2 7v6.172a2 2 0 0 0 .586 1.414l6.71 6.71a2.4 2.4 0 0 0 3.191.193",key:"178nd4"}],["circle",{cx:"10.5",cy:"6.5",r:".5",fill:"currentColor",key:"12ikhr"}]]};i.node;let s=(0,t.default)(i);e.s(["Tags",0,s],68401)},37817,e=>{"use strict";var t=e.i(56420);let i={name:"undo-2",size:24,node:[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]]};i.node;let s=(0,t.default)(i);e.s(["Undo2",0,s],37817)},49319,e=>{"use strict";var t=e.i(56420);let i={name:"user-minus",size:24,node:[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]};i.node;let s=(0,t.default)(i);e.s(["UserMinus",0,s],49319)},82303,e=>{"use strict";var t=e.i(56420);let i={name:"users",size:24,node:[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]};i.node;let s=(0,t.default)(i);e.s(["Users",0,s],82303)},91703,e=>{"use strict";var t=e.i(43476),i=e.i(83035),s=e.i(90063),n=e.i(61966);e.s(["CodeBlock",0,function({label:e,code:a,isWrapped:r=!1,copyValue:o,copyLabel:l=`Copy ${e.toLowerCase()}`,onCopied:d,onCopyFailed:c,codeTestId:h,copyTestId:u}){return(0,t.jsxs)("div",{"data-slot":"code-block",className:"overflow-hidden rounded-lg border border-border bg-muted",children:[(0,t.jsxs)("div",{className:"flex h-9 items-center justify-between gap-2 border-b border-border pr-1.5 pl-3",children:[(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5 text-caption text-muted-foreground",children:[(0,t.jsx)(i.SquareTerminal,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0"}),(0,t.jsx)("span",{className:"truncate",children:e})]}),(0,t.jsx)(n.CopyButton,{value:o??a,label:l,isLabeled:!0,onCopied:d,onCopyFailed:c,"data-testid":u})]}),(0,t.jsx)("pre",{"data-testid":h,className:(0,s.classNames)("overflow-x-auto px-3 py-3 font-mono text-code text-foreground",r?"break-all whitespace-pre-wrap":"whitespace-pre"),children:a})]})}])},61966,8734,e=>{"use strict";var t=e.i(43476),i=e.i(89664),s=e.i(56420);let n={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"}]]};n.node;let a=(0,s.default)(n);e.s(["Copy",0,a],8734);var r=e.i(71645),o=e.i(15905);e.s(["CopyButton",0,function({value:e,label:s,size:n="xs",isLabeled:l=!1,onCopied:d,onCopyFailed:c,className:h,"data-testid":u}){let[p,m]=(0,r.useState)(!1);async function x(){try{await navigator.clipboard.writeText(e)}catch{c?.();return}m(!0),d?.(),setTimeout(()=>{m(!1)},1500)}return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.Button,{variant:"ghost",size:n,isIconOnly:!l,"aria-label":s,title:l?void 0:s,icon:p?(0,t.jsx)(i.Check,{"aria-hidden":!0}):(0,t.jsx)(a,{"aria-hidden":!0}),className:h,"data-testid":u,onClick:()=>{x()},children:l?p?"Copied":"Copy":null}),(0,t.jsx)("span",{role:"status",className:"sr-only",children:p?"Copied.":""})]})}],61966)},1009,e=>{"use strict";var t=e.i(43476);e.s(["ConsequenceList",0,function({consequences:e}){return(0,t.jsx)("ul",{className:"flex flex-col gap-2 rounded-lg border border-border bg-muted p-3 text-meta text-foreground",children:e.map(({icon:e,text:i})=>(0,t.jsxs)("li",{className:"flex gap-2",children:[(0,t.jsx)(e,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon-sm) shrink-0 text-muted-foreground"}),(0,t.jsx)("span",{children:i})]},i))})}])},56478,e=>{"use strict";var t=e.i(43476),i=e.i(66616),s=e.i(91703);e.s(["CrewLines",0,function({crewLines:e,subject:n,testIdPrefix:a,onCopied:r,onCopyFailed:o}){return e.map(({harness:e,line:l})=>(0,t.jsx)(s.CodeBlock,{label:`Crew line, ${(0,i.harnessWord)(e)} with the aeolus plugin`,code:l,isWrapped:!0,copyLabel:`Copy the ${(0,i.harnessWord)(e)} crew line for ${n}`,codeTestId:`${a}-${e}`,copyTestId:`${a}-${e}-copy`,onCopied:r,onCopyFailed:o},e))}])},69374,e=>{"use strict";var t=e.i(43476),i=e.i(71645),s=e.i(26808),n=e.i(12470),a=e.i(91727);e.s(["TypedConfirm",0,function({expected:e,value:r,onValueChange:o,"data-testid":l="retire-typed-confirm"}){let d=(0,i.useId)(),c=(0,i.useId)();return(0,t.jsxs)("div",{"data-testid":l,className:"flex flex-col gap-1.5",children:[(0,t.jsxs)(a.Label,{htmlFor:d,className:"text-meta",children:["Type ",(0,t.jsx)("code",{className:"rounded-xs bg-muted px-1 py-0.5 font-mono text-id",children:e})," to confirm"]}),(0,t.jsx)(n.Input,{id:d,isMono:!0,autoComplete:"off",autoCapitalize:"off",autoCorrect:"off",spellCheck:!1,"aria-describedby":c,className:"max-sm:h-(--size-control-touch) max-sm:text-input-touch",value:r,onChange:e=>{o(e.target.value)}}),(0,t.jsx)("p",{id:c,"aria-live":"polite",className:"text-meta text-muted-foreground",children:""===r?"Case and hyphens must match.":(0,s.isTypedMatch)(e,r)?"Matches. The button is now active.":"Doesn’t match yet."})]})}])},29244,88280,39844,e=>{"use strict";var t=e.i(43476),i=e.i(52886),s=e.i(18236),n=e.i(58925),a=e.i(37817),r=e.i(26808),o=e.i(24010),l=e.i(15905),d=e.i(94945),c=e.i(1009),h=e.i(17981);let u={release:{title:"Release",action:"Release ship",busy:"Releasing",failed:"Couldn’t release the ship",testId:"release-dialog"},recrew:{title:"Re-crew",action:"Re-crew ship",busy:"Re-crewing",failed:"Couldn’t re-crew the ship",testId:"recrew-dialog"}};e.s(["ReleaseDialog",0,function(e){let{shipName:p,sessionLocation:m,mode:x="release",isOpen:g,onOpenChange:f,isPending:y,error:b,onConfirm:j}=e,v=u[x],w=m?`The session on ${m}`:"The session crewing it";return(0,t.jsx)(o.AlertDialog,{open:g,onOpenChange:e=>{y||f(e)},children:(0,t.jsxs)(o.AlertDialogContent,{"data-testid":v.testId,className:d.dialogSurface.phoneSheet,children:[(0,t.jsxs)(o.AlertDialogHeader,{children:[(0,t.jsxs)(o.AlertDialogTitle,{children:[v.title," ",p,"?"]}),(0,t.jsxs)(o.AlertDialogDescription,{children:[w," loses this ship now."]})]}),(0,t.jsx)(c.ConsequenceList,{consequences:function(e){let{shipName:t,inFlightCount:o,mode:l="release"}=e;return[{icon:n.KeyRound,text:"Its secret and crew token stop working, so that session cannot come back."},{icon:a.Undo2,text:(0,r.inFlightLine)(o)},"release"===l?{icon:i.CircleDashed,text:`${t} shows as Awaiting crew until you get a new starting prompt.`}:{icon:s.FileKey,text:"A new starting prompt and its crew lines are shown once, for the new crew."}]}(e)}),void 0===b?null:(0,t.jsx)(h.InlineError,{title:v.failed,description:`${b} Nothing changed; the session still holds the ship.`}),(0,t.jsxs)(o.AlertDialogFooter,{children:[(0,t.jsx)(o.AlertDialogClose,{render:(0,t.jsx)(l.Button,{disabled:y}),children:"Cancel"}),(0,t.jsx)(l.Button,{variant:"primary",isLoading:y,onClick:j,children:y?v.busy:v.action})]})]})})}],29244),e.i(31627);var p=e.i(44827),m=e.i(85595),x=e.i(16984),g=e.i(66787),f=e.i(71645),y=e.i(90063),b=e.i(65160),j=e.i(22212),v=e.i(12470),w=e.i(91727);function k({shipName:e,activeNames:i,isPending:s,error:n,onSubmit:a}){let r=(0,f.useId)(),o=(0,f.useId)(),[d,c]=(0,f.useState)(""),u=(0,b.checkShipName)(d,{activeNames:i,current:e}),C="invalid"===u.kind||"reserved"===u.kind||"taken"===u.kind,N="available"===u.kind;return(0,t.jsxs)("form",{noValidate:!0,className:"contents",onSubmit:e=>{e.preventDefault(),N&&a(d)},children:[(0,t.jsxs)(j.DialogHeader,{children:[(0,t.jsxs)(j.DialogTitle,{children:["Rename ",e]}),(0,t.jsx)(j.DialogDescription,{children:"The ship keeps its id, inbox and history."})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsxs)("div",{className:"flex items-baseline justify-between",children:[(0,t.jsx)(w.Label,{htmlFor:r,children:"New name"}),(0,t.jsxs)("span",{className:"text-caption text-muted-foreground tabular-nums",children:[d.length," / ",p.SHIP_HANDLE_MAX_LENGTH]})]}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(v.Input,{id:r,isMono:!0,autoComplete:"off",autoCapitalize:"off",spellCheck:!1,placeholder:e,"data-testid":"rename-name","aria-invalid":!!C||void 0,"aria-describedby":o,className:"pr-9 max-sm:h-(--size-control-touch) max-sm:text-input-touch",value:d,onChange:e=>{c((0,b.asHandle)(e.target.value))}}),"available"===u.kind?(0,t.jsx)(m.CircleCheck,{"aria-hidden":!0,className:"absolute top-1/2 right-3 size-(--size-icon) -translate-y-1/2 text-tone-ok-fg"}):C?(0,t.jsx)(x.CircleX,{"aria-hidden":!0,className:"absolute top-1/2 right-3 size-(--size-icon) -translate-y-1/2 text-destructive-text"}):null]}),(0,t.jsx)("p",{id:o,"aria-live":"polite",className:(0,y.classNames)("text-meta",C?"text-destructive-text":"text-muted-foreground"),children:u.message})]}),(0,t.jsxs)("div",{className:"flex gap-2 rounded-lg border border-tone-waiting-border bg-tone-waiting-bg p-3 text-tone-waiting-fg",children:[(0,t.jsx)(g.TriangleAlert,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon) shrink-0"}),(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsxs)("p",{className:"text-body font-medium",children:["Ships that address ",e," by name stop reaching it"]}),(0,t.jsx)("p",{className:"text-meta text-foreground",children:"Messages already sent are unaffected, because they are stored by ship id."})]})]}),void 0===n?null:(0,t.jsx)(h.InlineError,{title:"Couldn’t rename the ship",description:`${n} Nothing changed.`}),(0,t.jsxs)(j.DialogFooter,{children:[(0,t.jsx)(j.DialogClose,{render:(0,t.jsx)(l.Button,{type:"button",disabled:s}),children:"Cancel"}),(0,t.jsx)(l.Button,{type:"submit",variant:"primary",isLoading:s,disabled:!N,"data-testid":"rename-submit",children:s?"Renaming":"Rename ship"})]})]})}e.s(["RenameDialog",0,function(e){let{isOpen:i,onOpenChange:s,isPending:n}=e;return(0,t.jsx)(j.Dialog,{open:i,onOpenChange:e=>{n||s(e)},children:(0,t.jsx)(j.DialogContent,{"data-testid":"rename-dialog",className:d.dialogSurface.phoneFullScreen,children:(0,t.jsx)(k,{...e})})})}],88280);var C=e.i(80799),N=e.i(68401),D=e.i(71139),S=e.i(82303),I=e.i(69374);function M({openDeliveries:e}){return 0===e?(0,t.jsxs)("p",{className:"flex items-center gap-2 rounded-lg border border-tone-ok-border bg-tone-ok-bg px-3 py-2 text-meta text-tone-ok-fg",children:[(0,t.jsx)(m.CircleCheck,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0"}),"Its inbox is empty, so no deliveries are affected."]}):(0,t.jsxs)("div",{className:"flex gap-2 rounded-lg border border-tone-attention-border bg-tone-attention-bg p-3 text-tone-attention-fg",children:[(0,t.jsx)(g.TriangleAlert,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon) shrink-0"}),(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("p",{className:"text-body font-medium",children:(0,r.abandonedLine)(e)}),(0,t.jsx)("p",{className:"text-meta text-foreground",children:"Each is marked Abandoned and its sender can see that."})]})]})}function z(e){var i;let{shipName:s,openDeliveries:a,isCrewed:d,isPending:u,error:p,onConfirm:m}=e,[x,g]=(0,f.useState)(""),y=a>0,b=!y||(0,r.isTypedMatch)(s,x);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(o.AlertDialogHeader,{children:[(0,t.jsxs)(o.AlertDialogTitle,{children:["Retire ",s,"?"]}),(0,t.jsx)(o.AlertDialogDescription,{children:"Retiring ends this ship for good. Its history stays available read-only. This can’t be undone."})]}),(0,t.jsx)(M,{openDeliveries:a}),(0,t.jsx)(c.ConsequenceList,{consequences:(i=e.labelLines??[],[...d?[{icon:D.UserX,text:"The session crewing it loses it now."}]:[],...i.map(e=>({icon:N.Tags,text:e})),{icon:n.KeyRound,text:"Its secret stops working."},{icon:C.Tag,text:"It is never crewed or messaged again, and its name is free for a new ship."},{icon:S.Users,text:"Deliveries to its type stay, for the other ships of the type."}])}),y?(0,t.jsx)(I.TypedConfirm,{expected:s,value:x,onValueChange:g}):null,void 0===p?null:(0,t.jsx)(h.InlineError,{title:"Couldn’t retire the ship",description:`${p} Nothing changed.`}),(0,t.jsxs)(o.AlertDialogFooter,{children:[(0,t.jsx)(o.AlertDialogClose,{render:(0,t.jsx)(l.Button,{disabled:u}),children:"Cancel"}),(0,t.jsx)(l.Button,{variant:"destructive",isLoading:u,disabled:!b,onClick:m,children:(0,r.retireButtonLabel)(a)})]})]})}e.s(["RetireDialog",0,function(e){let{isOpen:i,onOpenChange:s,isPending:n}=e;return(0,t.jsx)(o.AlertDialog,{open:i,onOpenChange:e=>{n||s(e)},children:(0,t.jsx)(o.AlertDialogContent,{"data-testid":"retire-dialog",className:d.dialogSurface.phoneSheet,children:(0,t.jsx)(z,{...e})})})}],39844)},48287,e=>{"use strict";var t=e.i(43476),i=e.i(76561),s=e.i(85595),n=e.i(66787),a=e.i(82303),r=e.i(71645),o=e.i(26808),l=e.i(46150),d=e.i(24010),c=e.i(15905),h=e.i(94945),u=e.i(1009),p=e.i(17981),m=e.i(69374);let x={one:"delivery",many:"deliveries"};function g({role:e,othersOfRole:t,blueprint:i}){let s=0===t.length?`no ${e}`:`${String(t.length)} ${e}`;return void 0===i?`The squadron then has ${s}.`:`The squadron then has ${s}; blueprint ${i.label} has ${String(i.count)}.`}function f(e){let{squadronId:h,member:f,othersOfRole:y,blueprint:b,openDeliveries:j,inFlightDeliveries:v,isPending:w,error:k,onConfirm:C}=e,[N,D]=(0,r.useState)(""),S=j>0,I=!S||(0,o.isTypedMatch)(f.name,N),M=0===y.length;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(d.AlertDialogHeader,{children:[(0,t.jsxs)(d.AlertDialogTitle,{children:["Remove ",f.name," from ",h,"?"]}),(0,t.jsx)(d.AlertDialogDescription,{children:S?(0,t.jsx)(t.Fragment,{children:"Its ship is retired for good. This can't be undone."}):(0,t.jsx)(t.Fragment,{children:"This can't be undone. Add a member to get the role back."})})]}),S?(0,t.jsxs)("div",{role:"alert",className:"flex gap-2 rounded-lg border border-tone-attention-border bg-tone-attention-bg p-3 text-meta text-tone-attention-fg",children:[(0,t.jsx)(n.TriangleAlert,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon-sm) shrink-0"}),(0,t.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,t.jsx)("p",{className:"font-medium",children:(0,o.abandonedLine)(j)}),(0,t.jsxs)("p",{className:"text-foreground",children:[j-v," pending, ",v," in flight in its inbox. Each is marked Abandoned and its sender can see that."]})]})]}):(0,t.jsx)(u.ConsequenceList,{consequences:[{icon:i.Archive,text:`Its ship ${f.name} is retired. Its history stays read-only.`},{icon:a.Users,text:g({role:f.role,othersOfRole:y,blueprint:b})}]}),M&&(0,t.jsxs)("p",{"data-testid":"remove-member-last-of-role",className:"flex items-start gap-2 rounded-lg border border-tone-waiting-border bg-tone-waiting-bg px-3 py-2 text-meta text-tone-waiting-fg",children:[(0,t.jsx)(n.TriangleAlert,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon-sm) shrink-0"}),(0,t.jsxs)("span",{children:[(0,t.jsxs)("span",{className:"font-medium",children:["The last ",f.role,"."]})," ",(0,t.jsxs)("span",{className:"text-foreground",children:[g({role:f.role,othersOfRole:y,blueprint:b})," Work for the role waits until a member is added."]})]})]}),!S&&(0,t.jsxs)("p",{className:"flex items-center gap-2 rounded-lg border border-tone-ok-border bg-tone-ok-bg px-3 py-2 text-meta text-tone-ok-fg",children:[(0,t.jsx)(s.CircleCheck,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0"}),"Its inbox is empty, so no deliveries are affected."]}),S?(0,t.jsx)(m.TypedConfirm,{expected:f.name,value:N,onValueChange:D}):null,void 0!==k&&(0,t.jsx)(p.InlineError,{title:"Couldn’t remove the member",description:`${k} Nothing changed.`}),(0,t.jsxs)(d.AlertDialogFooter,{children:[(0,t.jsx)(d.AlertDialogClose,{render:(0,t.jsx)(c.Button,{disabled:w}),children:"Cancel"}),(0,t.jsx)(c.Button,{variant:"destructive",isLoading:w,disabled:!I,onClick:C,"data-testid":"remove-member-confirm",children:S?`Remove and abandon ${(0,l.counted)(j,x)}`:"Remove member"})]})]})}e.s(["RemoveMemberDialog",0,function(e){let{isOpen:i,onOpenChange:s,isPending:n}=e;return(0,t.jsx)(d.AlertDialog,{open:i,onOpenChange:e=>{n||s(e)},children:(0,t.jsx)(d.AlertDialogContent,{"data-testid":"remove-member-dialog",className:h.dialogSurface.phoneSheet,children:(0,t.jsx)(f,{...e})})})}])},5894,e=>{"use strict";var t=e.i(43476),i=e.i(76561),s=e.i(8734),n=e.i(86247),a=e.i(44594),r=e.i(58925),o=e.i(68997),l=e.i(15331),d=e.i(60011),c=e.i(19759),h=e.i(49319),u=e.i(57443),p=e.i(71139),m=e.i(22016),x=e.i(71645),g=e.i(5387),f=e.i(90262),y=e.i(80581),b=e.i(73330),j=e.i(53573),v=e.i(86165),w=e.i(48695),k=e.i(84294),C=e.i(84156),N=e.i(15905),D=e.i(57334),S=e.i(75305),I=e.i(41880),M=e.i(44824),z=e.i(29244),T=e.i(39874),L=e.i(48287),A=e.i(88280),R=e.i(39844),P=e.i(82532);function O({action:e,className:i}){let s=e.isPrimary?"primary":e.isDestructive||"rename"===e.key?"ghost":"secondary";return void 0!==e.href?(0,t.jsx)(N.Button,{size:"xs",variant:s,nativeButton:!1,"data-testid":e.testId,className:i,render:(0,t.jsx)(m.default,{href:e.href}),children:e.label}):(0,t.jsx)(N.Button,{size:"xs",variant:s,"data-testid":e.testId,disabled:e.isDisabled,isLoading:e.isLoading,className:i,onClick:e.onSelect,children:e.label})}function $(e,t){let i=e[t-1],s=e[t];return void 0!==i&&void 0!==s&&(!0===i.isMenuOnly&&!0!==s.isMenuOnly||!0===s.isDestructive&&!0!==i.isDestructive)}function q({layout:e,ship:i,actions:s}){if("next"===e){let e=s.find(e=>"prompt"===e.key||"crew-line"===e.key&&!0===e.isPrimary);return e?(0,t.jsx)(O,{action:{...e,isPrimary:!1},className:"max-sm:h-(--size-control-touch) max-sm:w-full max-sm:text-body-touch"}):null}if("buttons"===e){let e=s.filter(e=>!0!==e.isMenuOnly);return 0===e.length?null:(0,t.jsx)("div",{className:"flex flex-wrap items-center justify-end gap-2 max-sm:justify-start",children:e.map(e=>(0,t.jsx)(O,{action:e},e.key))})}let a=(0,t.jsx)(N.Button,{size:"sheet"===e?"touch":"xs",variant:"ghost",isIconOnly:!0,"aria-label":`Actions for ${i.name}`,icon:(0,t.jsx)(n.Ellipsis,{}),"data-testid":"fleet-actions"});return"sheet"===e?(0,t.jsxs)(S.Sheet,{children:[(0,t.jsx)(S.SheetTrigger,{render:a}),(0,t.jsxs)(S.SheetContent,{side:"bottom","data-testid":"fleet-row-sheet",children:[(0,t.jsx)(S.SheetHeader,{children:(0,t.jsx)(S.SheetTitle,{children:i.name})}),(0,t.jsx)("ul",{className:"flex flex-col pb-2",children:s.map((e,i)=>(0,t.jsx)("li",{className:$(s,i)?"mt-1 border-t border-border pt-1":void 0,children:(0,t.jsxs)(S.SheetClose,{render:void 0===e.href?(0,t.jsx)("button",{type:"button",disabled:e.isDisabled,onClick:e.onSelect}):(0,t.jsx)(m.default,{href:e.href}),"data-testid":e.testId,className:`flex h-(--size-control-touch) w-full items-center gap-3 px-4 text-left text-body-touch disabled:opacity-45 [&_svg]:size-(--size-icon) [&_svg]:shrink-0 ${e.isDestructive?"text-destructive-text":"text-foreground"}`,children:[(0,t.jsx)(e.icon,{"aria-hidden":!0}),e.menuLabel.replace(/…$/,"")]})},e.key))}),(0,t.jsx)("div",{className:"px-4 pb-4",children:(0,t.jsx)(S.SheetClose,{render:(0,t.jsx)(N.Button,{size:"touch",className:"w-full"}),children:"Cancel"})})]})]}):(0,t.jsxs)(D.DropdownMenu,{children:[(0,t.jsx)(D.DropdownMenuTrigger,{render:a}),(0,t.jsx)(D.DropdownMenuContent,{children:s.map((e,i)=>(0,t.jsxs)(x.Fragment,{children:[$(s,i)?(0,t.jsx)(D.DropdownMenuSeparator,{}):null,void 0===e.href?(0,t.jsxs)(D.DropdownMenuItem,{"data-testid":e.testId,disabled:e.isDisabled,variant:e.isDestructive?"destructive":"default",onClick:e.onSelect,children:[(0,t.jsx)(e.icon,{"aria-hidden":!0}),e.menuLabel]}):(0,t.jsxs)(D.DropdownMenuItem,{"data-testid":e.testId,render:(0,t.jsx)(m.default,{href:e.href}),children:[(0,t.jsx)(e.icon,{"aria-hidden":!0}),e.menuLabel]})]},e.key))})]})}e.s(["ShipActions",0,function({ship:e,layout:n="buttons"}){var m,N;let D=(0,f.useAccess)(),[S,O]=(0,x.useState)(),[$,F]=(0,x.useState)(!1),[B,U]=(0,x.useState)(void 0),H=(0,g.useGetStartingPrompt)(),E=(0,g.useReleaseShip)(),K=(0,g.useRetireShip)(),V=(0,g.useRecrewShip)(),G=(0,g.useRenameShip)(),X=(0,g.usePingShip)(),W=(0,g.useFleetSnapshot)(),_=(0,g.useLabelContext)(),J=(0,j.useShip)("release"===S||"recrew"===S||"retire"===S||"remove"===S?e.id:void 0),Q=(0,v.useSquadronsConnection)(),Y=(0,w.useSquadrons)(),Z=(0,w.useRemoveMember)(),ee=Y.data?.find(t=>"disbanded"!==t.state&&(t.flagship.shipId===e.id||t.members.some(t=>t.shipId===e.id))),et=void 0!==ee&&ee.flagship.shipId!==e.id,ei=(0,j.useShip)(et&&"retired"!==e.status?e.id:void 0),es=ee?.members.find(t=>t.shipId===e.id),en=(0,T.useNewCrewLineFlow)(ee&&es?{squadronId:ee.id,member:es,ship:ei.data}:void 0),ea="unknown"===Q||"connected"===Q&&!Y.isFetched,er=()=>{O(void 0)},eo=H.data??V.data,el=eo?"shown":H.isError?"error":"issuing",ed=e=>()=>{E.reset(),K.reset(),V.reset(),G.reset(),Z.reset(),O(e)},ec=async()=>{try{await navigator.clipboard.writeText(e.id),(0,I.showToast)({title:"Ship id copied",description:e.id,tone:"success"})}catch{(0,I.showToast)({title:"Couldn’t copy the ship id",description:e.id,tone:"error"})}},eh=ee?.flagship.shipId===e.id,eu={key:"message",label:"Message",menuLabel:"Message this ship…",icon:c.SquarePen,testId:"fleet-ship-message",onSelect:()=>{F(!0)},isMenuOnly:!0,needs:"canSend"},ep={key:"copy",label:"Copy ship id",menuLabel:"Copy ship id",icon:s.Copy,testId:"fleet-ship-copy-id",onSelect:()=>{ec()},isMenuOnly:!0},em=(0,b.canPing)(e)?[{key:"ping",label:"Ping",menuLabel:"Ping",icon:l.Radio,testId:"fleet-ship-ping",onSelect:()=>{X.mutate({shipId:e.id},{onSuccess:({isNew:t})=>{(0,I.showToast)(t?{title:`Pinged ${e.name}`,description:"Its session answers with pong on its next turn.",tone:"success"}:{title:`A ping already waits for ${e.name}`,description:"Pings never stack: this is the one shown.",tone:"info"})},onError:t=>{(0,I.showToast)({title:`Couldn’t ping ${e.name}`,description:t.message,tone:"error"})}})},isLoading:X.isPending,needs:"canManage"}]:[],ex=[];return"operator"===e.kind?ex.push({key:"inbox",label:"Open inbox",menuLabel:"Open inbox",icon:a.Inbox,testId:"fleet-ship-open-inbox",href:"/inbox",isMenuOnly:!0},ep):"retired"===e.status||"viewer"===e.kind?ex.push(ep):eh?ex.push({key:"squadron",label:"Open squadron",menuLabel:"Open squadron",icon:d.Shapes,testId:"fleet-ship-open-squadron",href:`/squadrons/${ee.id}`}):ea?ex.push(eu,ep,...em):es&&ee?(ex.push(eu,ep,...em,{key:"crew-line",label:"Get new crew line",menuLabel:"Get new crew line…",icon:r.KeyRound,testId:"fleet-ship-new-crew-line",onSelect:en.start,needs:"canManage",isDisabled:!en.isReady,isPrimary:"silent"===es.health}),"crewed"===e.status&&ex.push({key:"release",label:"Release",menuLabel:"Release ship…",icon:p.UserX,testId:"fleet-ship-release",onSelect:ed("release"),needs:"canManage"}),("sailing"===ee.state||"standing-down"===ee.state)&&ex.push({key:"remove",label:"Remove from squadron",menuLabel:"Remove from squadron…",icon:h.UserMinus,testId:"fleet-ship-remove",onSelect:ed("remove"),isDestructive:!0,needs:"canManage"})):(ex.push(eu,ep),"awaitingCrew"===e.status?ex.push({key:"prompt",label:"Get starting prompt",menuLabel:"Get starting prompt…",icon:r.KeyRound,testId:"fleet-ship-prompt",onSelect:()=>{H.reset(),V.reset(),U((0,C.isUnclaimedPromptOut)(e)&&e.startingPrompt?{issuedAt:e.startingPrompt.issuedAt}:void 0),O("prompt"),H.mutate({shipId:e.id})},needs:"canManage"}):ex.push(...em,{key:"recrew",label:"Re-crew",menuLabel:"Re-crew…",icon:u.UserPlus,testId:"fleet-ship-recrew",onSelect:ed("recrew"),needs:"canManage"},{key:"release",label:"Release",menuLabel:"Release ship…",icon:p.UserX,testId:"fleet-ship-release",onSelect:ed("release"),needs:"canManage"}),ex.push({key:"rename",label:"Rename",menuLabel:"Rename…",icon:o.Pen,testId:"fleet-ship-rename",onSelect:ed("rename"),needs:"canManage"},{key:"retire",label:"Retire",menuLabel:"Retire ship…",icon:i.Archive,testId:"fleet-ship-retire",onSelect:ed("retire"),isDestructive:!0,needs:"canManage"})),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(q,{layout:n,ship:e,actions:(m=ex,N=D,m.filter(e=>void 0===e.needs||N[e.needs]))}),(0,t.jsx)(z.ReleaseDialog,{shipName:e.name,sessionLocation:null===e.location?null:e.location.description??e.location.kind.toLowerCase(),inFlightCount:J.data?.inFlightDeliveries??0,mode:"recrew"===S?"recrew":"release",isOpen:("release"===S||"recrew"===S)&&void 0!==J.data,onOpenChange:e=>{e||er()},isPending:E.isPending||V.isPending,error:("recrew"===S?V.error:E.error)?.message,onConfirm:()=>{"recrew"===S?V.mutate({shipId:e.id},{onSuccess:()=>{U(void 0),O("prompt")}}):E.mutate({shipId:e.id},{onSuccess:er})}}),(0,t.jsx)(R.RetireDialog,{shipName:e.name,openDeliveries:J.data?.openDeliveries??0,isCrewed:"crewed"===e.status,isOpen:"retire"===S&&void 0!==J.data,onOpenChange:e=>{e||er()},isPending:K.isPending,error:K.error?.message,onConfirm:()=>{K.mutate({shipId:e.id},{onSuccess:er})},labelLines:void 0===_?void 0:(0,y.retireLabelLines)((0,y.retiredLabelsOf)(e,_))}),ee&&es&&(0,t.jsx)(L.RemoveMemberDialog,{squadronId:ee.id,member:es,othersOfRole:(0,k.otherMembersOfRole)(ee,es.shipId),openDeliveries:J.data?.openDeliveries??0,inFlightDeliveries:J.data?.inFlightDeliveries??0,isOpen:"remove"===S&&void 0!==J.data,onOpenChange:e=>{e||er()},isPending:Z.isPending,error:Z.error?.message,onConfirm:()=>{Z.mutate({squadronId:ee.id,shipId:es.shipId},{onSuccess:er})}}),(0,t.jsx)(A.RenameDialog,{shipName:e.name,activeNames:(W.data??[]).filter(e=>"retired"!==e.status).map(e=>e.name),isOpen:"rename"===S,onOpenChange:e=>{e||er()},isPending:G.isPending,error:G.error?.message,onSubmit:t=>{G.mutate({shipId:e.id,name:t},{onSuccess:er})}}),(0,t.jsx)(P.StartingPromptDialog,{shipName:e.name,state:el,prompt:eo?.prompt,crewLines:eo?.crewLines,replacesUnclaimed:B,error:H.error?.message,isOpen:"prompt"===S,onOpenChange:e=>{e||(H.reset(),V.reset(),er())},onConfirm:()=>{V.reset(),H.mutate({shipId:e.id})}}),en.dialog,$&&(0,t.jsx)(M.ComposeMessage,{isOpen:!0,onOpenChange:F,toShipId:e.id})]})}])},82532,e=>{"use strict";var t=e.i(43476),i=e.i(22768),s=e.i(10818),n=e.i(25398),a=e.i(71645),r=e.i(49635),o=e.i(15905),l=e.i(91703),d=e.i(22212),c=e.i(94945),h=e.i(19321),u=e.i(56478),p=e.i(17981);function m({shipName:e,prompt:n,crewLines:r}){let[o,d]=(0,a.useState)(!1),c=()=>{d(!1)},h=()=>{d(!0)};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("p",{className:"flex gap-2 rounded-lg border border-border bg-muted px-3 py-2 text-meta text-foreground",children:[(0,t.jsx)(s.Info,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon-sm) shrink-0 text-muted-foreground"}),(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"font-medium",children:"Shown once. Copy it now."})," If you lose it, get a new one; this one then stops working."]})]}),(0,t.jsx)(l.CodeBlock,{label:`Starting prompt for ${e}`,code:n,isWrapped:!0,copyLabel:`Copy the starting prompt for ${e}`,codeTestId:"starting-prompt-text",copyTestId:"starting-prompt-copy",onCopied:c,onCopyFailed:h}),(0,t.jsx)(u.CrewLines,{crewLines:r,subject:e,testIdPrefix:"starting-prompt-crew-line",onCopied:c,onCopyFailed:h}),(0,t.jsx)("p",{role:"status",className:"flex items-center gap-1.5 text-meta text-destructive-text empty:hidden",children:o?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.CircleAlert,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0"}),"Could not copy: select the text and copy it by hand."]}):null})]})}e.s(["StartingPromptDialog",0,function(e){let{shipName:i,state:s,prompt:a,crewLines:l,replacesUnclaimed:u,error:x,isOpen:g,onOpenChange:f,onConfirm:y}=e,b="issuing"===s;return(0,t.jsx)(d.Dialog,{open:g,onOpenChange:e=>{b||f(e)},children:(0,t.jsxs)(d.DialogContent,{size:"md","data-testid":"starting-prompt-dialog",className:c.dialogSurface.phoneFullScreen,children:[(0,t.jsxs)(d.DialogHeader,{children:[(0,t.jsxs)(d.DialogTitle,{children:["Starting prompt for ",i]}),(0,t.jsxs)(d.DialogDescription,{children:["Paste it into the agent session that should crew this ship, or a crew line into Claude Code or Codex with the aeolus plugin. Any earlier prompt for ",i," stops working now."]})]}),"error"!==s&&u?(0,t.jsxs)("p",{className:"rounded-lg border border-tone-waiting-border bg-tone-waiting-bg px-3 py-2 text-meta text-tone-waiting-fg",children:["This prompt stops the one issued"," ",(0,t.jsx)("time",{dateTime:u.issuedAt,children:(0,r.shortDateTime)(new Date(u.issuedAt))})," ","working."]}):null,b?(0,t.jsxs)("div",{"aria-busy":!0,className:"flex flex-col gap-3",children:[(0,t.jsx)("span",{className:"sr-only",children:"Issuing a starting prompt..."}),(0,t.jsx)(h.Skeleton,{className:"h-10 w-full rounded-lg"}),(0,t.jsx)(h.Skeleton,{className:"h-40 w-full rounded-lg"})]}):null,"shown"===s&&void 0!==a&&void 0!==l?(0,t.jsx)(m,{shipName:i,prompt:a,crewLines:l}):null,"error"===s?(0,t.jsx)(p.InlineError,{title:"Couldn’t issue a starting prompt",description:`${x??"The server did not answer."} No new secret was created; any earlier prompt still works.`}):null,(0,t.jsxs)(d.DialogFooter,{children:["issuing"===s||"shown"===s?(0,t.jsx)(d.DialogClose,{render:(0,t.jsx)(o.Button,{variant:"primary",disabled:b}),children:"Done"}):null,"error"===s?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(d.DialogClose,{render:(0,t.jsx)(o.Button,{}),children:"Close"}),(0,t.jsx)(o.Button,{variant:"primary",icon:(0,t.jsx)(n.RotateCw,{}),onClick:y,children:"Try again"})]}):null]})]})})}])},84156,e=>{"use strict";e.s(["isUnclaimedPromptOut",0,function(e){return null!==e.startingPrompt&&!e.startingPrompt.isClaimed}])}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,79432,19002,11147,e=>{"use strict";var t=e.i(56420);let s={name:"activity",size:24,node:[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]};s.node;let i=(0,t.default)(s);e.s(["Activity",0,i],79432);let r={name:"circle-pause",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"10",x2:"10",y1:"15",y2:"9",key:"c1nkhi"}],["line",{x1:"14",x2:"14",y1:"15",y2:"9",key:"h65svq"}]],aliases:["pause-circle"]};r.node;let n=(0,t.default)(r);e.s(["CirclePause",0,n],19002);let a={name:"octagon-pause",size:24,node:[["path",{d:"M10 15V9",key:"1lckn7"}],["path",{d:"M14 15V9",key:"1muqhk"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}]],aliases:["pause-octagon"]};a.node;let l=(0,t.default)(a);e.s(["OctagonPause",0,l],11147)},37750,e=>{"use strict";var t=e.i(56420);let s={name:"app-window",size:24,node:[["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}],["path",{d:"M10 4v4",key:"pp8u80"}],["path",{d:"M2 8h20",key:"d11cs7"}],["path",{d:"M6 4v4",key:"1svtjw"}]]};s.node;let i=(0,t.default)(s);e.s(["AppWindow",0,i],37750)},71567,e=>{"use strict";var t=e.i(56420);let s={name:"bot",size:24,node:[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]};s.node;let i=(0,t.default)(s);e.s(["Bot",0,i],71567)},26091,e=>{"use strict";var t=e.i(56420);let s={name:"file-text",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]};s.node;let i=(0,t.default)(s);e.s(["FileText",0,i],26091)},31458,e=>{"use strict";var t=e.i(56420);let s={name:"flag",size:24,node:[["path",{d:"M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528",key:"1jaruq"}]]};s.node;let i=(0,t.default)(s);e.s(["Flag",0,i],31458)},69309,e=>{"use strict";var t=e.i(56420);let s={name:"plug",size:24,node:[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z",key:"1xoxul"}],["path",{d:"M9 8V2",key:"14iosj"}]]};s.node;let i=(0,t.default)(s);e.s(["Plug",0,i],69309)},24010,e=>{"use strict";var t=e.i(43476);e.s([],58762),e.i(58762);var s=e.i(66250),i=e.i(2820),r=e.i(56736),n=e.i(9793),a=e.i(84324),l=e.i(64951),o=e.i(77173);let d=e.i(13488).DialogTrigger;var c=e.i(74217),u=e.i(25326);class h extends u.DialogHandle{}e.s(["Backdrop",()=>i.DialogBackdrop,"Close",()=>r.DialogClose,"Description",()=>n.DialogDescription,"Handle",0,h,"Popup",()=>a.DialogPopup,"Portal",()=>l.DialogPortal,"Root",0,function(e){return(0,s.useRenderDialogRoot)("alert-dialog",e)},"Title",()=>o.DialogTitle,"Trigger",0,d,"Viewport",()=>c.DialogViewport,"createHandle",0,function(){return new h}],34604);var p=e.i(34604),p=p,m=e.i(90063),f=e.i(94945);e.s(["AlertDialog",0,function(e){return(0,t.jsx)(p.Root,{"data-slot":"alert-dialog",...e})},"AlertDialogClose",0,function(e){return(0,t.jsx)(p.Close,{"data-slot":"alert-dialog-close",...e})},"AlertDialogContent",0,function({className:e,size:s,children:i,...r}){return(0,t.jsxs)(p.Portal,{children:[(0,t.jsx)(p.Backdrop,{"data-slot":"alert-dialog-overlay",className:f.dialogSurface.overlay}),(0,t.jsx)(p.Popup,{"data-slot":"alert-dialog-content",className:(0,m.classNames)(f.dialogSurface.popup({size:s}),e),...r,children:i})]})},"AlertDialogDescription",0,function({className:e,...s}){return(0,t.jsx)(p.Description,{"data-slot":"alert-dialog-description",className:(0,m.classNames)(f.dialogSurface.description,e),...s})},"AlertDialogFooter",0,function({className:e,...s}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-footer",className:(0,m.classNames)(f.dialogSurface.footer,e),...s})},"AlertDialogHeader",0,function({className:e,...s}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-header",className:(0,m.classNames)(f.dialogSurface.header,e),...s})},"AlertDialogTitle",0,function({className:e,...s}){return(0,t.jsx)(p.Title,{"data-slot":"alert-dialog-title",className:(0,m.classNames)(f.dialogSurface.title,e),...s})}],24010)},75774,e=>{"use strict";var t=e.i(43476),s=e.i(71645),i=e.i(10649),r=e.i(9677),n=e.i(66616),a=e.i(91727),l=e.i(46033),o=e.i(43988),d=e.i(17981),c=e.i(4032);function u({id:e,label:s,isOptional:i,hint:r,error:n,children:l}){return(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsxs)(a.Label,{htmlFor:e,children:[s,i?(0,t.jsx)("span",{className:"font-normal text-muted-foreground",children:" optional"}):null]}),l,void 0===r?null:(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:r}),void 0===n?null:(0,t.jsx)(d.InlineError,{variant:"field",title:n})]})}function h({id:e,items:s,value:i,onPick:r,isDisabled:n,testId:a}){return(0,t.jsxs)(l.Select,{items:s,value:i,disabled:n,onValueChange:e=>{"string"==typeof e&&r(e)},children:[(0,t.jsx)(l.SelectTrigger,{id:e,className:"h-(--size-control) w-full","data-testid":a,children:(0,t.jsx)(l.SelectValue,{})}),(0,t.jsx)(l.SelectContent,{children:Object.entries(s).map(([e,s])=>(0,t.jsx)(l.SelectItem,{value:e,children:s},e))})]})}e.s(["CrewSettingsFields",0,function({offers:e,values:a,onChange:l,squadrons:d,refusal:p,isDisabled:m=!1,machineLabels:f}){var g;let x={harness:(0,s.useId)(),workspace:(0,s.useId)(),options:(0,s.useId)(),firstPrompt:(0,s.useId)(),squadron:(0,s.useId)()},y=e.find(e=>e.harness===a.harness),b=e=>p?.field===e?p.reason:void 0,w=(0,i.promptBytes)(a.firstPrompt),v=w>r.FIRST_PROMPT_MAX_BYTES,j=Object.fromEntries([...(y?.repositories??[]).map(e=>[`worktree:${e}`,`${e} \xb7 new worktree`]),...(y?.folders??[]).map(e=>[`folder:${e}`,`${e} \xb7 folder, as it is`])]);return(0,t.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"crew-settings-fields",children:[(0,t.jsx)(u,{id:x.harness,label:"Harness",error:b("harness"),children:(0,t.jsx)(h,{id:x.harness,items:Object.fromEntries(e.map(e=>[e.harness,(0,n.harnessWord)(e.harness)])),value:a.harness,isDisabled:m,testId:"crew-settings-harness",onPick:t=>{l((0,i.withHarness)(a,{harness:t,offers:e}))}})}),(0,t.jsx)(u,{id:x.workspace,label:"Workspace",hint:"A repository gets a new git worktree for this ship; a folder is used as it is, shared by the ships in it.",error:b("workspace"),children:(0,t.jsx)(h,{id:x.workspace,items:j,value:void 0===(g=a.workspace)?"":"worktree"===g.kind?`worktree:${g.repository}`:`folder:${g.name}`,isDisabled:m,testId:"crew-settings-workspace",onPick:e=>{l({...a,workspace:function(e){let[t,...s]=e.split(":"),i=s.join(":");return"worktree"===t?{kind:"worktree",repository:i}:"folder"===t?{kind:"folder",name:i}:void 0}(e)})}})}),void 0===f?null:(0,t.jsx)(c.MachineLabelsField,{shipName:f.shipName,picked:f.chipsOf(a.machineLabels),groups:f.groups,match:f.matchOf(a.machineLabels),isDisabled:m,onAdd:e=>{l({...a,machineLabels:[...a.machineLabels,e]})},onRemove:e=>{l({...a,machineLabels:a.machineLabels.filter(t=>t!==e)})}}),(y?.options??[]).map((e,s)=>(0,t.jsx)(u,{id:`${x.options}-${String(s)}`,label:e.name,error:0===s?b("options"):void 0,children:(0,t.jsx)(h,{id:`${x.options}-${String(s)}`,items:Object.fromEntries(e.values.map(t=>[t,t===e.defaultValue?`${t} (default)`:t])),value:a.options[e.name]??"",isDisabled:m,testId:`crew-settings-option-${e.name}`,onPick:t=>{l({...a,options:{...a.options,[e.name]:t}})}})},e.name)),(0,t.jsx)(u,{id:x.firstPrompt,label:"First prompt",isOptional:!0,hint:(0,t.jsxs)("span",{className:"flex justify-between gap-3",children:[(0,t.jsx)("span",{children:"The session starts with it, on its first start only."}),(0,t.jsxs)("span",{className:"tabular-nums",children:[(0,i.byteSize)(w)," of ",(0,i.byteSize)(r.FIRST_PROMPT_MAX_BYTES)]})]}),error:v?`A first prompt is at most ${(0,i.byteSize)(r.FIRST_PROMPT_MAX_BYTES)}.`:b("firstPrompt"),children:(0,t.jsx)(o.Textarea,{id:x.firstPrompt,rows:3,disabled:m,"aria-invalid":!!v||void 0,"data-testid":"crew-settings-first-prompt",value:a.firstPrompt,onChange:e=>{l({...a,firstPrompt:e.target.value})}})}),void 0===d?null:(0,t.jsx)(u,{id:x.squadron,label:"Squadron",isOptional:!0,hint:"The session starts with that squadron’s crew line and template.",error:b("squadron"),children:(0,t.jsx)(h,{id:x.squadron,items:{"":"None",...Object.fromEntries(d.map(e=>[e,e]))},value:a.squadron,isDisabled:m,testId:"crew-settings-squadron",onPick:e=>{l({...a,squadron:e})}})})]})}])},63481,e=>{"use strict";var t=e.i(43476),s=e.i(37750),i=e.i(71567),r=e.i(56420);let n={name:"cloud",size:24,node:[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]]};n.node;let a=(0,r.default)(n),l={name:"laptop",size:24,node:[["path",{d:"M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z",key:"1pdavp"}],["path",{d:"M20.054 15.987H3.946",key:"14rxg9"}]]};l.node;let o=(0,r.default)(l),d={name:"map-pin",size:24,node:[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]};d.node;let c=(0,r.default)(d),u={name:"message-circle",size:24,node:[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]]};u.node;let h=(0,r.default)(u),p={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"}]]};p.node;let m=(0,r.default)(p);var f=e.i(83035),g=e.i(94831),x=e.i(90063),y=e.i(66616),b=e.i(40798);let w={DEVICE:o,CLOUD:a,SERVER:m,OTHER:c},v={coding:f.SquareTerminal,chat:h,bot:i.Bot,console:s.AppWindow},j={md:"text-body",sm:"text-meta"};e.s(["LocationTag",0,function({kind:e,description:s=null,harness:i=null,isCompact:r=!1,size:n="md",className:a}){let l=(0,x.classNames)("inline-flex min-w-0 items-center gap-1.5 text-muted-foreground [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0",j[n],a);if(null===e)return(0,t.jsxs)("span",{"data-slot":"location-tag",className:l,children:[(0,t.jsx)(g.Unplug,{"aria-hidden":!0}),"No session"]});let o=w[e],d=(0,b.locationKindWord)(e),c=null===s?d:`${d} \xb7 ${s}`;if(null!==i){let e=(0,y.harnessKind)(i),r=void 0===e?void 0:v[e],n=(0,y.harnessWord)(i);return(0,t.jsxs)("span",{"data-slot":"location-tag",className:l,title:null===s?`${n} \xb7 ${d}`:`${n} \xb7 ${d}: ${s}`,children:[void 0===r?null:(0,t.jsx)(r,{"aria-hidden":!0}),(0,t.jsx)("span",{className:"truncate text-foreground",children:n}),(0,t.jsx)("span",{"aria-hidden":!0,children:"·"}),(0,t.jsx)(o,{"aria-hidden":!0}),(0,t.jsx)("span",{className:"truncate",children:d}),null===s?null:(0,t.jsxs)("span",{className:"sr-only",children:[": ",s]})]})}return r?(0,t.jsxs)("span",{"data-slot":"location-tag",className:l,title:c,children:[(0,t.jsx)(o,{"aria-hidden":!0}),(0,t.jsxs)("span",{className:"sr-only",children:[d,": "]}),(0,t.jsx)("span",{className:"truncate text-foreground",children:s??d})]}):(0,t.jsxs)("span",{"data-slot":"location-tag",className:l,children:[(0,t.jsx)(o,{"aria-hidden":!0}),(0,t.jsxs)("span",{className:"truncate",children:[d,null===s?null:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{"aria-hidden":!0,children:" · "}),(0,t.jsx)("span",{className:"sr-only",children:", "}),(0,t.jsx)("span",{className:"text-foreground",children:s})]})]})]})}],63481)},81830,e=>{"use strict";var t=e.i(43476),s=e.i(79432),i=e.i(19002),r=e.i(11147),n=e.i(90063),a=e.i(49635),l=e.i(93361);let o={working:s.Activity,blocked:r.OctagonPause,idle:i.CirclePause},d={active:"text-tone-active-fg",waiting:"text-tone-waiting-fg",ended:"text-tone-ended-fg"};e.s(["ReportLine",0,function({report:e,now:s,variant:i,isTimeInTitle:r=!1,testId:c}){let u="full"===i,h=(0,n.classNames)("flex min-w-0 items-center gap-1.5",u?"text-body":"text-meta");if(null===e)return(0,t.jsx)("span",{"data-testid":c,"data-state":"none",className:(0,n.classNames)(h,"text-muted-foreground"),children:"No report yet"});let p=o[e.state],m=d[l.REPORT_TONES[e.state]],f=new Date(e.reportedAt);return(0,t.jsxs)("span",{"data-testid":c,"data-state":e.state,title:r?`${(0,l.reportText)(e)} \xb7 ${(0,l.reportedWhen)(f,s)}`:(0,l.reportText)(e),className:h,children:[(0,t.jsx)(p,{"aria-hidden":!0,className:(0,n.classNames)("size-(--size-icon-sm) shrink-0",m)}),(0,t.jsx)("span",{className:(0,n.classNames)("shrink-0 font-medium",m),children:l.REPORT_STATE_WORDS[e.state]}),null===e.note?null:(0,t.jsx)("span",{className:"min-w-0 truncate text-foreground",children:e.note}),r?null:(0,t.jsx)("time",{dateTime:e.reportedAt,title:(0,a.fullDateTime)(f),className:"shrink-0 text-muted-foreground tabular-nums",children:u?`\xb7 ${(0,l.reportedWhen)(f,s)}`:(0,l.reportAge)(f,s)})]})}])},39874,26808,82880,3067,42211,e=>{"use strict";var t=e.i(43476),s=e.i(71645),i=e.i(46150);let r={one:"delivery",many:"deliveries"};function n(e){if(0===e)return"Nothing is in flight, so no delivery moves.";let t=1===e?"returns":"return";return`${(0,i.counted)(e,{one:"in-flight delivery",many:"in-flight deliveries"})} ${t} to pending. Nothing is lost.`}function a(e){if("crewed"===e.status){let t=null===e.location?"the session crewing it":`the session on ${e.location.description??e.location.kind.toLowerCase()}`;return`This ends ${t}. ${n(e.inFlightDeliveries)}`}if(null!==e.startingPrompt&&!e.startingPrompt.isClaimed)return"The crew line issued earlier, not claimed yet, stops working."}e.s(["abandonedLine",0,function(e){return`${(0,i.counted)(e,r)} will be abandoned`},"inFlightLine",0,n,"isTypedMatch",0,function(e,t){return t===e},"newCrewLineReplaced",0,a,"retireButtonLabel",0,function(e){return 0===e?"Retire ship":`Retire and abandon ${(0,i.counted)(e,r)}`}],26808);var l=e.i(48695),o=e.i(15905),d=e.i(10818),c=e.i(25398),u=e.i(22212),h=e.i(94945),p=e.i(19321),m=e.i(66616),f=e.i(61966),g=e.i(60592);function x({crewLines:e,subject:i,testIdPrefix:r,onCopied:n,onCopyFailed:a}){let[l,o]=(0,s.useState)(e[0]?.harness),d=e.find(e=>e.harness===l)??e[0];if(!d)return null;let c=(0,m.crewLineHarnessWord)(d.harness);return(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-2 max-sm:flex-col max-sm:items-stretch",children:[(0,t.jsx)(g.Tabs,{value:d.harness,onValueChange:t=>{let s=e.find(e=>e.harness===t);s&&o(s.harness)},children:(0,t.jsx)(g.TabsList,{"aria-label":`Crew ${i} from`,children:e.map(e=>(0,t.jsx)(g.TabsTrigger,{value:e.harness,"data-testid":`${r}-${e.harness}-tab`,children:(0,m.crewLineHarnessWord)(e.harness)},e.harness))})}),(0,t.jsx)("code",{"data-testid":`${r}-${d.harness}`,title:d.line,className:"min-w-0 grow truncate rounded-md bg-muted px-2 py-1 font-mono text-code text-foreground",children:d.line}),(0,t.jsx)(f.CopyButton,{value:d.line,label:`Copy the ${c} crew line for ${i}`,isLabeled:!0,onCopied:n,onCopyFailed:a,"data-testid":`${r}-${d.harness}-copy`})]})}e.s(["CompactCrewLine",0,x],82880);var y=e.i(17981),b=e.i(26091);function w({note:e,model:s,template:i,testId:r}){return null===e&&null===s?null:(0,t.jsxs)("div",{className:"flex items-start gap-2 rounded-md bg-muted px-3 py-2 text-meta",children:[(0,t.jsx)(b.FileText,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon-sm) shrink-0 text-muted-foreground"}),(0,t.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,t.jsxs)("span",{className:"text-muted-foreground",children:["Launch note",void 0===i?"":` \xb7 ${i}`]}),null!==e&&(0,t.jsx)("span",{"data-testid":r,children:e}),null!==s&&(0,t.jsxs)("span",{children:["Runs ",(0,t.jsx)("span",{className:"font-mono",children:s})]})]})]})}function v({memberName:e,template:s,launchNote:i,model:r,crewLines:n}){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(w,{note:i,model:r,template:s,testId:"crew-line-launch-note"}),(0,t.jsx)(x,{crewLines:n,subject:e,testIdPrefix:"crew-line-text"}),(0,t.jsxs)("p",{className:"flex items-center gap-1.5 text-meta text-muted-foreground",children:[(0,t.jsx)(d.Info,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0"}),(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"font-medium",children:"Shown once."})," Paste the crew line into Claude Code or Codex started where the launch note says, or into a chat client with the fleet’s connector. A new crew line stops it working."]})]})]})}function j({memberName:e,state:s,template:i,launchNote:r=null,model:n=null,crewLines:a,error:l,isOpen:d,onOpenChange:m,onConfirm:f}){let g="issuing"===s;return(0,t.jsx)(u.Dialog,{open:d,onOpenChange:e=>{g||m(e)},children:(0,t.jsxs)(u.DialogContent,{size:"md","data-testid":"crew-line-dialog",className:h.dialogSurface.phoneFullScreen,children:[(0,t.jsxs)(u.DialogHeader,{children:[(0,t.jsxs)(u.DialogTitle,{children:["Crew line for ",e]}),(0,t.jsx)(u.DialogDescription,{children:"Start Claude Code or Codex where the launch note says, or open a chat client with the fleet’s connector, then paste its crew line. The member is on station once its session checks in."})]}),g&&(0,t.jsxs)("div",{"aria-busy":!0,className:"flex flex-col gap-3",children:[(0,t.jsx)("span",{className:"sr-only",children:"Issuing a crew line..."}),(0,t.jsx)(p.Skeleton,{className:"h-10 w-full rounded-lg"}),(0,t.jsx)(p.Skeleton,{className:"h-28 w-full rounded-lg"})]}),"shown"===s&&void 0!==a&&(0,t.jsx)(v,{memberName:e,template:i,launchNote:r,model:n,crewLines:a}),"error"===s&&(0,t.jsx)(y.InlineError,{title:"Couldn’t issue a crew line",description:`${l??"The squadron manager did not answer."} No new secret was created; an earlier crew line still works.`}),(0,t.jsxs)(u.DialogFooter,{children:[("shown"===s||g)&&(0,t.jsx)(u.DialogClose,{render:(0,t.jsx)(o.Button,{variant:"primary","data-testid":"crew-line-done",disabled:g}),children:"Done"}),"error"===s&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(u.DialogClose,{render:(0,t.jsx)(o.Button,{}),children:"Close"}),(0,t.jsx)(o.Button,{variant:"primary",icon:(0,t.jsx)(c.RotateCw,{"aria-hidden":!0}),"data-testid":"crew-line-retry",onClick:f,children:"Try again"})]})]})]})})}e.s(["LaunchNote",0,w],3067),e.s(["CrewLineDialog",0,j],42211);var k=e.i(24010);function S({memberName:e,replacedText:s,isOpen:i,onOpenChange:r,onConfirm:n}){return(0,t.jsx)(k.AlertDialog,{open:i,onOpenChange:r,children:(0,t.jsxs)(k.AlertDialogContent,{"data-testid":"new-crew-line-confirm",className:h.dialogSurface.phoneSheet,children:[(0,t.jsxs)(k.AlertDialogHeader,{children:[(0,t.jsxs)(k.AlertDialogTitle,{children:["Get a new crew line for ",e,"?"]}),(0,t.jsx)(k.AlertDialogDescription,{children:s??"Its new secret is shown once, with its launch note."})]}),(0,t.jsxs)(k.AlertDialogFooter,{children:[(0,t.jsx)(k.AlertDialogClose,{render:(0,t.jsx)(o.Button,{}),children:"Cancel"}),(0,t.jsx)(o.Button,{variant:"primary","data-testid":"new-crew-line-confirm-submit",onClick:n,children:"Get new crew line"})]})]})})}function N(e){let i=(0,l.useNewCrewLine)(),[r,n]=(0,s.useState)(!1),[o,d]=(0,s.useState)(!1),[c,u]=(0,s.useState)(void 0),h=()=>{e&&i.mutate({squadronId:e.squadronId,shipId:e.member.shipId})},p=i.data?"shown":i.isError?"error":"issuing";return{isReady:e?.ship!==void 0,start:()=>{e?.ship&&(i.reset(),u(a(e.ship)),d(!0))},dialog:e?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(S,{memberName:e.member.name,replacedText:c,isOpen:o,onOpenChange:d,onConfirm:()=>{d(!1),n(!0),h()}}),(0,t.jsx)(j,{memberName:e.member.name,state:p,template:e.template,launchNote:i.data?.launchNote,model:i.data?.model,crewLines:i.data?.crewLines,error:i.error?.message,isOpen:r,onOpenChange:e=>{n(e),e||i.reset()},onConfirm:h})]}):null}}e.s(["GetNewCrewLine",0,function({isPrimary:e=!1,testId:s,...i}){let r=N(i);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.Button,{size:"xs",variant:e?"primary":"secondary",disabled:!r.isReady,"data-testid":s,onClick:r.start,children:"Get new crew line"}),r.dialog]})},"useNewCrewLineFlow",0,N],39874)},9176,e=>{"use strict";var t=e.i(86165),s=e.i(265);e.s(["usePluginShipIds",0,function(){let e=(0,t.useSquadronsSettings)(),i=(0,s.useTrierarchPluginSettings)();return new Set([e.data,i.data].flatMap(e=>{if(e?.configured!==!0)return[];let t=e.connection.ship?.shipId??e.connection.lastShipId;return null===t?[]:[t]}))}])},93361,e=>{"use strict";e.i(31627);var t=e.i(94661),s=e.i(49635);let i={working:"Working",blocked:"Blocked",idle:"Idle"};e.s(["REPORT_STATE_WORDS",0,i,"REPORT_TONES",0,{working:"active",blocked:"waiting",idle:"ended"},"reportAge",0,function(e,t){let i=Math.max(0,t.getTime()-e.getTime());return i<6e4?`${String(Math.floor(i/1e3))} s`:i<36e5?`${String(Math.floor(i/6e4))} min`:i<864e5?`${String(Math.floor(i/36e5))} h`:(0,s.relativeTime)(e,t)},"reportDetailsJson",0,function(e){return JSON.stringify(e,null,2)},"reportDetailsLabel",0,function(e){return`JSON \xb7 ${String((0,t.reportDetailsBytes)(e))} bytes`},"reportText",0,function(e){let t=i[e.state];return null===e.note?t:`${t}: ${e.note}`},"reportedWhen",0,function(e,t){let i=(0,s.relativeTime)(e,t);return`reported ${"Just now"===i?"just now":i}`}])},53573,e=>{"use strict";e.i(31627);var t=e.i(83615),s=e.i(19273),i=e.i(12598),r=e.i(81384),n=e.i(73664),a=e.i(27001),l=e.i(54440),o=e.i(71645),d=e.i(15823),c=e.i(40143),u=e.i(69230);function h(e,t){let s=new Set(t);return e.filter(e=>!s.has(e))}var p=class extends d.Subscribable{#e;#t;#s;#i;#r;#n;#a;#l;#o;#d=[];constructor(e,t,s){super(),this.#e=e,this.#i=s,this.#s=[],this.#r=[],this.#t=[],this.setQueries(t)}onSubscribe(){1===this.listeners.size&&this.#r.forEach(e=>{e.subscribe(t=>{this.#c(e,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#r.forEach(e=>{e.destroy()})}setQueries(e,t){this.#s=e,this.#i=t,c.notifyManager.batch(()=>{let e=this.#r,t=this.#u(this.#s);t.forEach(e=>e.observer.setOptions(e.defaultedQueryOptions));let i=t.map(e=>e.observer),r=i.map(e=>e.getCurrentResult()),n=e.length!==i.length,a=i.some((t,s)=>t!==e[s]),l=n||a,o=!!l||r.some((e,t)=>{let i=this.#t[t];return!i||!(0,s.shallowEqualObjects)(e,i)});(l||o)&&(l&&(this.#d=t,this.#r=i),this.#t=r,this.hasListeners()&&(l&&(h(e,i).forEach(e=>{e.destroy()}),h(i,e).forEach(e=>{e.subscribe(t=>{this.#c(e,t)})})),this.#h()))})}getCurrentResult(){return this.#t}getQueries(){return this.#r.map(e=>e.getCurrentQuery())}getObservers(){return this.#r}getOptimisticResult(e,t){let s=this.#u(e),i=s.map(e=>e.observer.getOptimisticResult(e.defaultedQueryOptions)),r=s.map(e=>e.defaultedQueryOptions.queryHash);return[i,e=>this.#p(e??i,t,r),()=>this.#m(i,s)]}#m(e,t){let s=new Set;return t.map((i,r)=>{let n=e[r];return i.defaultedQueryOptions.notifyOnChangeProps?n:i.observer.trackResult(n,e=>{s.has(e)||(s.add(e),t.forEach(t=>{t.observer.trackProp(e)}))})})}#p(e,t,i){if(t){let r=this.#o,n=void 0!==i&&void 0!==r&&(r.length!==i.length||i.some((e,t)=>e!==r[t]));return(this.#t!==this.#l||n||t!==this.#a)&&(this.#a=t,this.#l=this.#t,void 0!==i&&(this.#o=i),this.#n=(0,s.replaceEqualDeep)(this.#n,t(e))),this.#n}return e}#f(){return!this.#i?.combine||this.#r.some((e,t)=>e.options.suspense&&this.#t[t]?.data===void 0)}#u(e){let t=new Map;this.#r.forEach(e=>{let s=e.options.queryHash;if(!s)return;let i=t.get(s);i?i.push(e):t.set(s,[e])});let s=[];return e.forEach(e=>{let i=this.#e.defaultQueryOptions(e),r=t.get(i.queryHash)?.shift()??new u.QueryObserver(this.#e,i);s.push({defaultedQueryOptions:i,observer:r})}),s}#c(e,t){let s=this.#r.indexOf(e);-1!==s&&(this.#t=this.#t.slice(),this.#t[s]=t,this.#h())}#h(){if(this.hasListeners()){let e=this.#f(),t=this.#n,s=e?t:this.#p(this.#m(this.#t,this.#d),this.#i?.combine);(e||t!==s)&&c.notifyManager.batch(()=>{this.listeners.forEach(e=>{e(this.#t)})})}}},m=e.i(66027),f=e.i(5387),g=e.i(27702);e.s(["useMessage",0,function(e){let t=(0,g.useTRPC)();return(0,m.useQuery)(t.fleet.message.queryOptions(void 0===e?s.skipToken:{messageId:e}))},"useShip",0,function(e){let t=(0,g.useTRPC)();return(0,m.useQuery)(t.fleet.ship.queryOptions(void 0===e?s.skipToken:{shipId:e},{refetchInterval:f.LAST_SEEN_REFRESH_MS}))},"useShipMessages",0,function(e){let t=(0,g.useTRPC)();return(0,m.useQuery)(t.fleet.shipMessages.queryOptions({shipId:e}))},"useShipTimeline",0,function(e){let t=(0,g.useTRPC)();return(0,m.useQuery)(t.fleet.shipTimeline.queryOptions({shipId:e}))},"useShips",0,function(e){let d=(0,g.useTRPC)(),h=function({queries:e,...t}){let d=(0,i.useQueryClient)(void 0),h=(0,r.useIsRestoring)(),m=(0,n.useQueryErrorResetBoundary)(),f=!1!==t.subscribed,g=o.useMemo(()=>e.map(e=>{let t=d.defaultQueryOptions(e);return t._optimisticResults=h?"isRestoring":f?"optimistic":void 0,t}),[e,d,h,f]);g.forEach(e=>{(0,l.ensureSuspenseTimers)(e);let t=d.getQueryCache().get(e.queryHash);(0,a.ensurePreventErrorBoundaryRetry)(e,m,t)}),(0,a.useClearResetErrorBoundary)(m);let[x]=o.useState(()=>new p(d,g,t)),[y,b,w]=x.getOptimisticResult(g,t.combine),v=!h&&f;o.useSyncExternalStore(o.useCallback(e=>v?x.subscribe(c.notifyManager.batchCalls(e)):s.noop,[x,v]),()=>x.getCurrentResult(),()=>x.getCurrentResult()),o.useEffect(()=>{x.setQueries(g,t)},[g,t,x]);let j=y.some((e,t)=>(0,l.shouldSuspend)(g[t],e))?y.flatMap((e,t)=>{let s=g[t];if(s&&(0,l.shouldSuspend)(s,e)){let e=new u.QueryObserver(d,s);return(0,l.fetchOptimistic)(s,e,m)}return[]}):[];if(j.length>0)throw Promise.all(j);let k=y.find((e,t)=>{let s=g[t];return s&&(0,a.getHasError)({result:e,errorResetBoundary:m,throwOnError:s.throwOnError,query:d.getQueryCache().get(s.queryHash),suspense:s.suspense})});if(k)throw k.error;return b(w())}({queries:e.flatMap(e=>{let s=(0,t.idSchema)("ship").safeParse(e);return s.success?[s.data]:[]}).map(e=>d.fleet.ship.queryOptions({shipId:e},{refetchInterval:f.LAST_SEEN_REFRESH_MS}))}),m=new Map;for(let e of h)e.data&&m.set(e.data.id,e.data);return m}],53573)}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,52376,e=>{"use strict";e.s([],4824),e.i(4824);var t=e.i(71645),r=e.i(52245),n=e.i(33332);let s=t.createContext(void 0);function i(){let e=t.useContext(s);if(void 0===e)throw Error((0,n.default)(13));return e}let o={imageLoadingStatus:()=>null};var a=e.i(43476);let u=t.forwardRef(function(e,n){let{className:i,render:u,style:l,...c}=e,[d,f]=t.useState("idle"),h=t.useMemo(()=>({imageLoadingStatus:d,setImageLoadingStatus:f}),[d,f]),p=(0,r.useRenderElement)("span",e,{state:{imageLoadingStatus:d},ref:n,props:c,stateAttributesMapping:o});return(0,a.jsx)(s.Provider,{value:h,children:p})});var l=e.i(67865),c=e.i(46376),d=e.i(37584),f=e.i(74354),h=e.i(23910),p=e.i(56789);let g={...o,...f.transitionStatusMapping},m=t.forwardRef(function(e,n){let{className:s,render:o,onLoadingStatusChange:a,keepMounted:u=!1,style:f,sizes:m,srcSet:y,src:b,...v}=e,{setImageLoadingStatus:S}=i(),[C,E]=function(e,{referrerPolicy:r,crossOrigin:n,sizes:s,srcSet:i},o){let a=t.useState("idle"),u=a[1];return(0,c.useIsoLayoutEffect)(()=>{if(!o)return p.NOOP;if(!e&&!i)return u("error"),p.NOOP;let t=!0,a=new window.Image,l=e=>()=>{t&&u(e)};return u("loading"),a.onload=l("loaded"),a.onerror=l("error"),r&&(a.referrerPolicy=r),a.crossOrigin=n??null,s&&(a.sizes=s),i&&(a.srcset=i),e&&(a.src=e),a.complete&&u(a.naturalWidth>0?"loaded":"error"),()=>{t=!1}},[o,e,i,s,n,r,u]),a}(b,e,!u),R="loaded"===C,{mounted:k,transitionStatus:O,setMounted:P}=(0,h.useTransitionStatus)(R),x=t.useRef(null),w=t.useRef(!0);(0,c.useIsoLayoutEffect)(()=>{if(!u)return;let e=w.current;w.current=!1;let t=x.current;if(!t)return;if(!t.complete)return void E("loading");let r=t.naturalWidth>0?"loaded":"error";E(r),"loaded"===r&&e&&P(!0)},[u,b,y,m,v.crossOrigin,v.referrerPolicy,o,E,P]);let T=u?{"data-loading":"loading"===C?"":void 0,"data-error":"error"===C?"":void 0,"aria-hidden":"loaded"!==C||void 0,onLoad(){E("loaded")},onError(){E("error")}}:void 0,A=(0,l.useStableCallback)(e=>{a?.(e),S(e)});(0,c.useIsoLayoutEffect)(()=>{"idle"!==C&&A(C)},[C,A]),(0,c.useIsoLayoutEffect)(()=>()=>S("idle"),[S]),(0,d.useOpenChangeComplete)({enabled:!R,open:R,ref:x,onComplete(){R||P(!1)}});let I=u||k,M={};void 0!==m&&(M.sizes=m),void 0!==y&&(M.srcSet=y),void 0!==b&&(M.src=b);let j=(0,r.useRenderElement)("img",e,{state:{imageLoadingStatus:C,transitionStatus:u&&"ending"===O?void 0:O},ref:[n,x],props:[T,v,M],stateAttributesMapping:g,enabled:I});return I?j:null});var y=e.i(39957);let b=t.forwardRef(function(e,n){let{className:s,render:a,delay:u=0,style:l,...c}=e,{imageLoadingStatus:d}=i(),[f,h]=t.useState(0===u),p=(0,y.useTimeout)();return t.useEffect(()=>(u>0?p.start(u,()=>h(!0)):h(!0),p.clear),[p,u]),(0,r.useRenderElement)("span",e,{state:{imageLoadingStatus:d},ref:n,props:c,stateAttributesMapping:o,enabled:"loaded"!==d&&(0===u||f)})});e.s(["Fallback",0,b,"Image",0,m,"Root",0,u],14751);var v=e.i(14751);e.s(["Avatar",0,v],52376)},80862,e=>{"use strict";e.s(["endingStyle",0,"data-ending-style","startingStyle",0,"data-starting-style"])},74354,e=>{"use strict";var t=e.i(80862);let r={[t.startingStyle]:""},n={[t.endingStyle]:""};e.s(["transitionStatusMapping",0,{transitionStatus:e=>"starting"===e?r:"ending"===e?n:null}])},37584,22640,e=>{"use strict";var t=e.i(71645),r=e.i(67865),n=e.i(74080),s=e.i(8445),i=e.i(94603),o=e.i(80862);let a=null;function u(e,t=!1,l=!1){let c=(0,s.useAnimationFrame)();return(0,r.useStableCallback)((r,s=null)=>{c.cancel();let u=(0,i.resolveRef)(e);if(null==u)return;let d=()=>{if(!l)return void n.flushSync(r);if(!a){let e=[];a=e,queueMicrotask(()=>{a=null,n.flushSync(()=>{for(let t of e)t()})})}a.push(()=>{s?.aborted||r()})};if("function"!=typeof u.getAnimations||globalThis.BASE_UI_ANIMATIONS_DISABLED)return void r();function f(){Promise.all(u.getAnimations().map(e=>e.finished)).then(()=>{s?.aborted||d()},()=>{s?.aborted||(u.getAnimations().some(e=>e.pending||"finished"!==e.playState)?f():d())})}if(t){let e=o.startingStyle;if(!u.hasAttribute(e))return void c.request(f);let t=new MutationObserver(()=>{u.hasAttribute(e)||(t.disconnect(),f())});return t.observe(u,{attributes:!0,attributeFilter:[e]}),void s?.addEventListener("abort",()=>t.disconnect(),{once:!0})}c.request(f)})}e.s(["useAnimationsFinished",0,u],22640),e.s(["useOpenChangeComplete",0,function(e){let{enabled:n=!0,open:s,ref:i,batch:o=!1,onComplete:a}=e,l=(0,r.useStableCallback)(a),c=u(i,s,o);t.useEffect(()=>{if(!n)return;let e=new AbortController;return c(l,e.signal),()=>{e.abort()}},[n,s,l,c])}],37584)},23910,e=>{"use strict";var t=e.i(71645),r=e.i(46376),n=e.i(8445);e.s(["useTransitionStatus",0,function(e,s=!1,i=!1,o=!1){let[a,u]=t.useState(e&&s?"idle":void 0),[l,c]=t.useState(e&&!o);return e&&!l&&(c(!0),u("starting")),e||!l||"ending"===a||i||u("ending"),e||l||"ending"!==a||u(void 0),(0,r.useIsoLayoutEffect)(()=>{if(!e&&l&&"ending"!==a&&i){let e=n.AnimationFrame.request(()=>{u("ending")});return()=>{n.AnimationFrame.cancel(e)}}},[e,l,a,i]),(0,r.useIsoLayoutEffect)(()=>{if(!e||s)return;let t=n.AnimationFrame.request(()=>{u(void 0)});return()=>{n.AnimationFrame.cancel(t)}},[s,e]),(0,r.useIsoLayoutEffect)(()=>{if(!e||!s)return;e&&l&&"idle"!==a&&u("starting");let t=n.AnimationFrame.request(()=>{u("idle")});return()=>{n.AnimationFrame.cancel(t)}},[s,e,l,a]),{mounted:l,setMounted:c,transitionStatus:a}}])},94603,e=>{"use strict";e.s(["resolveRef",0,function(e){return null==e?e:"current"in e?e.current:e}])},8445,e=>{"use strict";e.i(47167);var t=e.i(88940),r=e.i(26300);let n=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let r=0;r<t.length;r+=1)t[r]?.(e)};request(e){let t=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,this.isScheduled||(requestAnimationFrame(this.tick),this.isScheduled=!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||null!==this.callbacks[t]&&(this.callbacks[t]=null,this.callbacksCount-=1)}};class s{static create(){return new s}static request(e){return n.request(e)}static cancel(e){return n.cancel(e)}currentId=null;request(e){this.cancel(),this.currentId=n.request(()=>{this.currentId=null,e()})}cancel=()=>{null!==this.currentId&&(n.cancel(this.currentId),this.currentId=null)};disposeEffect=()=>this.cancel}e.s(["AnimationFrame",0,s,"useAnimationFrame",0,function(){let e=(0,t.useRefWithInit)(s.create).current;return(0,r.useOnMount)(e.disposeEffect),e}])},26300,e=>{"use strict";var t=e.i(71645),r=e.i(56789);e.s(["useOnMount",0,function(e){t.useEffect(e,r.EMPTY_ARRAY)}])},39957,e=>{"use strict";var t=e.i(88940),r=e.i(26300);class n{static create(){return new n}currentId=0;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=0,t()},e)}isStarted(){return 0!==this.currentId}clear=()=>{0!==this.currentId&&(clearTimeout(this.currentId),this.currentId=0)};disposeEffect=()=>this.clear}e.s(["Timeout",0,n,"useTimeout",0,function(){let e=(0,t.useRefWithInit)(n.create).current;return(0,r.useOnMount)(e.disposeEffect),e}])},49287,e=>{"use strict";var t=e.i(56420);let r={name:"ship",size:24,node:[["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 9.189V13",key:"yp40p3"}],["path",{d:"M19 12V6a2 2 0 00-2-2H7a2 2 0 00-2 2v6",key:"1wcigf"}],["path",{d:"M19.38 19A11.6 11.6 0 0021 13l-8.188-3.639a2 2 0 00-1.624 0L3 13.001a11.6 11.6 0 002.81 7.76",key:"1kdp0u"}],["path",{d:"M2 20c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1s1.2 1 2.5 1c2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"1l8w7g"}]]};r.node;let n=(0,t.default)(r);e.s(["Ship",0,n],49287)},22016,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return y},useLinkStatus:function(){return v}};for(var s in n)Object.defineProperty(r,s,{enumerable:!0,get:n[s]});let i=e.r(90809),o=e.r(43476),a=i._(e.r(71645)),u=e.r(95057),l=e.r(8372),c=e.r(18581),d=e.r(18967),f=e.r(5550),h=e.r(88540),p=e.r(91949),g=e.r(73668),m=e.r(9396);function y(t){var r;let n,s,i,[y,v]=(0,a.useOptimistic)(p.IDLE_LINK_STATUS),S=(0,a.useRef)(null),{href:C,as:E,children:R,prefetch:k=null,passHref:O,replace:P,shallow:x,scroll:w,onClick:T,onMouseEnter:A,onTouchStart:I,legacyBehavior:M=!1,onNavigate:j,transitionTypes:_,ref:N,unstable_dynamicOnHover:L,...D}=t;n=R,M&&("string"==typeof n||"number"==typeof n)&&(n=(0,o.jsx)("a",{children:n}));let q=a.default.useContext(l.AppRouterContext),F=!1!==k,Q=!1===k?"none":!0===k?"full":"auto",z="none"!==Q?"auto"===Q?m.FetchStrategy.PPR:m.FetchStrategy.Full:m.FetchStrategy.PPR,U="string"==typeof(r=E||C)?r:(0,u.formatUrl)(r);if(M){if(n?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});s=a.default.Children.only(n)}let B=M?s&&"object"==typeof s&&s.ref:N,$,H=a.default.useCallback(e=>(null!==q&&(S.current=(0,p.mountLinkInstance)(e,U,q,z,F,v,$)),()=>{S.current&&((0,p.unmountLinkForCurrentNavigation)(S.current),S.current=null),(0,p.unmountPrefetchableInstance)(e)}),[F,U,q,z,v,$]),K={ref:(0,c.useMergedRef)(H,B),onClick(t){M||"function"!=typeof T||T(t),M&&s.props&&"function"==typeof s.props.onClick&&s.props.onClick(t),!q||t.defaultPrevented||function(t,r,n,s,i,o,u,l="none"){if("u">typeof window){let c,{nodeName:d}=t.currentTarget;if("A"===d.toUpperCase()&&((c=t.currentTarget.getAttribute("target"))&&"_self"!==c||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,g.isLocalURL)(r)){s&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),o){let e=!1;if(o({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:f}=e.r(99781);a.default.startTransition(()=>{f(r,s?"replace":"push",!1===i?h.ScrollBehavior.NoScroll:h.ScrollBehavior.Default,n.current,u,l)})}}(t,U,S,P,w,j,_,Q)},onMouseEnter(e){M||"function"!=typeof A||A(e),M&&s.props&&"function"==typeof s.props.onMouseEnter&&s.props.onMouseEnter(e),q&&F&&(0,p.onNavigationIntent)(e.currentTarget,!0===L)},onTouchStart:function(e){M||"function"!=typeof I||I(e),M&&s.props&&"function"==typeof s.props.onTouchStart&&s.props.onTouchStart(e),q&&F&&(0,p.onNavigationIntent)(e.currentTarget,!0===L)}};return(0,d.isAbsoluteUrl)(U)?K.href=U:M&&!O&&("a"!==s.type||"href"in s.props)||(K.href=(0,f.addBasePath)(U)),i=M?a.default.cloneElement(s,K):(0,o.jsx)("a",{...D,...K,children:n}),(0,o.jsx)(b.Provider,{value:y,children:i})}let b=(0,a.createContext)(p.IDLE_LINK_STATUS),v=()=>(0,a.useContext)(b);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},18581,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return s}});let n=e.r(71645);function s(e,t){let r=(0,n.useRef)(null),s=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=s.current;t&&(s.current=null,t())}else e&&(r.current=i(e,n)),t&&(s.current=i(t,n))},[e,t])}function i(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},18967,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={DecodeError:function(){return y},MiddlewareNotFoundError:function(){return C},MissingStaticPage:function(){return S},NormalizeError:function(){return b},PageNotFoundError:function(){return v},SP:function(){return g},ST:function(){return m},WEB_VITALS:function(){return i},execOnce:function(){return o},getDisplayName:function(){return d},getLocationOrigin:function(){return l},getURL:function(){return c},isAbsoluteUrl:function(){return u},isResSent:function(){return f},loadGetInitialProps:function(){return p},normalizeRepeatedSlashes:function(){return h},stringifyError:function(){return E}};for(var s in n)Object.defineProperty(r,s,{enumerable:!0,get:n[s]});let i=["CLS","FCP","FID","INP","LCP","TTFB"];function o(e){let t,r=!1;return(...n)=>(r||(r=!0,t=e(...n)),t)}let a=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,u=e=>{let t=e.charCodeAt(0);return!!(t>=65&&t<=90||t>=97&&t<=122)&&a.test(e)};function l(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function c(){let{href:e}=window.location,t=l();return e.substring(t.length)}function d(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function f(e){return e.finished||e.headersSent}function h(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function p(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await p(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&f(r))return n;if(!n)throw Object.defineProperty(Error(`"${d(e)}.getInitialProps()" should resolve to an object. But found "${n}" instead.`),"__NEXT_ERROR_CODE",{value:"E1025",enumerable:!1,configurable:!0});return n}let g="u">typeof performance,m=g&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class y extends Error{}class b extends Error{}class v extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class S extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class C extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function E(e){return JSON.stringify({message:e.message,stack:e.stack})}},73668,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return i}});let n=e.r(18967),s=e.r(52817);function i(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,s.hasBasePath)(r.pathname)}catch(e){return!1}}},98183,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={assign:function(){return u},searchParamsToUrlQuery:function(){return i},urlQueryToSearchParams:function(){return a}};for(var s in n)Object.defineProperty(r,s,{enumerable:!0,get:n[s]});function i(e){let t={};for(let[r,n]of e.entries()){let e=t[r];void 0===e?t[r]=n:Array.isArray(e)?e.push(n):t[r]=[e,n]}return t}function o(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function a(e){let t=new URLSearchParams;for(let[r,n]of Object.entries(e))if(Array.isArray(n))for(let e of n)t.append(r,o(e));else t.set(r,o(n));return t}function u(e,...t){for(let r of t){for(let t of r.keys())e.delete(t);for(let[t,n]of r.entries())e.append(t,n)}return e}},95057,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return a},formatWithValidation:function(){return l},urlObjectKeys:function(){return u}};for(var s in n)Object.defineProperty(r,s,{enumerable:!0,get:n[s]});let i=e.r(90809)._(e.r(98183)),o=/https?|ftp|gopher|file/;function a(e){let{auth:t,hostname:r}=e,n=e.protocol||"",s=e.pathname||"",a=e.hash||"",u=e.query||"",l=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?l=t+e.host:r&&(l=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(l+=":"+e.port)),u&&"object"==typeof u&&(u=String(i.urlQueryToSearchParams(u)));let c=e.search||u&&`?${u}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||o.test(n))&&!1!==l?(l="//"+(l||""),s&&"/"!==s[0]&&(s="/"+s)):l||(l=""),a&&"#"!==a[0]&&(a="#"+a),c&&"?"!==c[0]&&(c="?"+c),s=s.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${n}${l}${s}${c}${a}`}let u=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function l(e){return a(e)}},24010,e=>{"use strict";var t=e.i(43476);e.s([],58762),e.i(58762);var r=e.i(66250),n=e.i(2820),s=e.i(56736),i=e.i(9793),o=e.i(84324),a=e.i(64951),u=e.i(77173);let l=e.i(13488).DialogTrigger;var c=e.i(74217),d=e.i(25326);class f extends d.DialogHandle{}e.s(["Backdrop",()=>n.DialogBackdrop,"Close",()=>s.DialogClose,"Description",()=>i.DialogDescription,"Handle",0,f,"Popup",()=>o.DialogPopup,"Portal",()=>a.DialogPortal,"Root",0,function(e){return(0,r.useRenderDialogRoot)("alert-dialog",e)},"Title",()=>u.DialogTitle,"Trigger",0,l,"Viewport",()=>c.DialogViewport,"createHandle",0,function(){return new f}],34604);var h=e.i(34604),h=h,p=e.i(90063),g=e.i(94945);e.s(["AlertDialog",0,function(e){return(0,t.jsx)(h.Root,{"data-slot":"alert-dialog",...e})},"AlertDialogClose",0,function(e){return(0,t.jsx)(h.Close,{"data-slot":"alert-dialog-close",...e})},"AlertDialogContent",0,function({className:e,size:r,children:n,...s}){return(0,t.jsxs)(h.Portal,{children:[(0,t.jsx)(h.Backdrop,{"data-slot":"alert-dialog-overlay",className:g.dialogSurface.overlay}),(0,t.jsx)(h.Popup,{"data-slot":"alert-dialog-content",className:(0,p.classNames)(g.dialogSurface.popup({size:r}),e),...s,children:n})]})},"AlertDialogDescription",0,function({className:e,...r}){return(0,t.jsx)(h.Description,{"data-slot":"alert-dialog-description",className:(0,p.classNames)(g.dialogSurface.description,e),...r})},"AlertDialogFooter",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-footer",className:(0,p.classNames)(g.dialogSurface.footer,e),...r})},"AlertDialogHeader",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-header",className:(0,p.classNames)(g.dialogSurface.header,e),...r})},"AlertDialogTitle",0,function({className:e,...r}){return(0,t.jsx)(h.Title,{"data-slot":"alert-dialog-title",className:(0,p.classNames)(g.dialogSurface.title,e),...r})}],24010)},94859,26478,e=>{"use strict";var t=e.i(43476),r=e.i(52376),n=e.i(25913),s=e.i(49287),i=e.i(56420);let o={name:"user-round",size:24,node:[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]],aliases:["user-2"]};o.node;let a=(0,i.default)(o);e.s(["UserRound",0,a],26478);var u=e.i(90063);let l=(0,n.cva)("inline-flex shrink-0 items-center justify-center overflow-hidden font-semibold uppercase select-none",{variants:{kind:{app:"rounded-sm bg-primary text-primary-foreground",account:"rounded-full bg-secondary font-sans text-foreground",ship:"rounded-sm bg-secondary font-mono text-foreground",argo:"rounded-sm bg-highlight text-primary",retired:"rounded-sm border border-dashed border-input font-mono font-medium text-muted-foreground"},size:{20:"size-5 text-micro [&_svg]:size-3",28:"size-7 text-micro [&_svg]:size-(--size-icon-sm)",36:"size-9 text-caption [&_svg]:size-(--size-icon)"}},defaultVariants:{kind:"ship",size:28}});e.s(["Avatar",0,function({kind:e="ship",size:n,name:i="",className:o}){let c=e??"ship";return(0,t.jsx)(r.Avatar.Root,{"aria-hidden":!0,"data-slot":"avatar",className:(0,u.classNames)(l({kind:e,size:n}),o),children:(0,t.jsx)(r.Avatar.Fallback,{children:"app"===c?(0,t.jsx)(s.Ship,{"aria-hidden":!0}):"argo"===c?(0,t.jsx)(a,{"aria-hidden":!0}):i.replaceAll("-","").slice(0,2)})})}],94859)},61966,8734,e=>{"use strict";var t=e.i(43476),r=e.i(89664),n=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 i=(0,n.default)(s);e.s(["Copy",0,i],8734);var o=e.i(71645),a=e.i(15905);e.s(["CopyButton",0,function({value:e,label:n,size:s="xs",isLabeled:u=!1,onCopied:l,onCopyFailed:c,className:d,"data-testid":f}){let[h,p]=(0,o.useState)(!1);async function g(){try{await navigator.clipboard.writeText(e)}catch{c?.();return}p(!0),l?.(),setTimeout(()=>{p(!1)},1500)}return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(a.Button,{variant:"ghost",size:s,isIconOnly:!u,"aria-label":n,title:u?void 0:n,icon:h?(0,t.jsx)(r.Check,{"aria-hidden":!0}):(0,t.jsx)(i,{"aria-hidden":!0}),className:d,"data-testid":f,onClick:()=>{g()},children:u?h?"Copied":"Copy":null}),(0,t.jsx)("span",{role:"status",className:"sr-only",children:h?"Copied.":""})]})}],61966)},66616,e=>{"use strict";let t={"claude-code":{word:"Claude Code",kind:"coding"},codex:{word:"Codex",kind:"coding"},"claude-chat":{word:"Claude chat",kind:"chat"},chatgpt:{word:"ChatGPT",kind:"chat"},grok:{word:"Grok",kind:"chat"},grokbot:{word:"Grokbot",kind:"bot"},console:{word:"Console",kind:"console"}};function r(e){return t[e]?.word??e}e.s(["crewLineHarnessWord",0,function(e){return"chat"===e?"Chat":r(e)},"harnessKind",0,function(e){return t[e]?.kind},"harnessWord",0,r])},53573,e=>{"use strict";e.i(31627);var t=e.i(83615),r=e.i(19273),n=e.i(12598),s=e.i(81384),i=e.i(73664),o=e.i(27001),a=e.i(54440),u=e.i(71645),l=e.i(15823),c=e.i(40143),d=e.i(69230);function f(e,t){let r=new Set(t);return e.filter(e=>!r.has(e))}var h=class extends l.Subscribable{#e;#t;#r;#n;#s;#i;#o;#a;#u;#l=[];constructor(e,t,r){super(),this.#e=e,this.#n=r,this.#r=[],this.#s=[],this.#t=[],this.setQueries(t)}onSubscribe(){1===this.listeners.size&&this.#s.forEach(e=>{e.subscribe(t=>{this.#c(e,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#s.forEach(e=>{e.destroy()})}setQueries(e,t){this.#r=e,this.#n=t,c.notifyManager.batch(()=>{let e=this.#s,t=this.#d(this.#r);t.forEach(e=>e.observer.setOptions(e.defaultedQueryOptions));let n=t.map(e=>e.observer),s=n.map(e=>e.getCurrentResult()),i=e.length!==n.length,o=n.some((t,r)=>t!==e[r]),a=i||o,u=!!a||s.some((e,t)=>{let n=this.#t[t];return!n||!(0,r.shallowEqualObjects)(e,n)});(a||u)&&(a&&(this.#l=t,this.#s=n),this.#t=s,this.hasListeners()&&(a&&(f(e,n).forEach(e=>{e.destroy()}),f(n,e).forEach(e=>{e.subscribe(t=>{this.#c(e,t)})})),this.#f()))})}getCurrentResult(){return this.#t}getQueries(){return this.#s.map(e=>e.getCurrentQuery())}getObservers(){return this.#s}getOptimisticResult(e,t){let r=this.#d(e),n=r.map(e=>e.observer.getOptimisticResult(e.defaultedQueryOptions)),s=r.map(e=>e.defaultedQueryOptions.queryHash);return[n,e=>this.#h(e??n,t,s),()=>this.#p(n,r)]}#p(e,t){let r=new Set;return t.map((n,s)=>{let i=e[s];return n.defaultedQueryOptions.notifyOnChangeProps?i:n.observer.trackResult(i,e=>{r.has(e)||(r.add(e),t.forEach(t=>{t.observer.trackProp(e)}))})})}#h(e,t,n){if(t){let s=this.#u,i=void 0!==n&&void 0!==s&&(s.length!==n.length||n.some((e,t)=>e!==s[t]));return(this.#t!==this.#a||i||t!==this.#o)&&(this.#o=t,this.#a=this.#t,void 0!==n&&(this.#u=n),this.#i=(0,r.replaceEqualDeep)(this.#i,t(e))),this.#i}return e}#g(){return!this.#n?.combine||this.#s.some((e,t)=>e.options.suspense&&this.#t[t]?.data===void 0)}#d(e){let t=new Map;this.#s.forEach(e=>{let r=e.options.queryHash;if(!r)return;let n=t.get(r);n?n.push(e):t.set(r,[e])});let r=[];return e.forEach(e=>{let n=this.#e.defaultQueryOptions(e),s=t.get(n.queryHash)?.shift()??new d.QueryObserver(this.#e,n);r.push({defaultedQueryOptions:n,observer:s})}),r}#c(e,t){let r=this.#s.indexOf(e);-1!==r&&(this.#t=this.#t.slice(),this.#t[r]=t,this.#f())}#f(){if(this.hasListeners()){let e=this.#g(),t=this.#i,r=e?t:this.#h(this.#p(this.#t,this.#l),this.#n?.combine);(e||t!==r)&&c.notifyManager.batch(()=>{this.listeners.forEach(e=>{e(this.#t)})})}}},p=e.i(66027),g=e.i(5387),m=e.i(27702);e.s(["useMessage",0,function(e){let t=(0,m.useTRPC)();return(0,p.useQuery)(t.fleet.message.queryOptions(void 0===e?r.skipToken:{messageId:e}))},"useShip",0,function(e){let t=(0,m.useTRPC)();return(0,p.useQuery)(t.fleet.ship.queryOptions(void 0===e?r.skipToken:{shipId:e},{refetchInterval:g.LAST_SEEN_REFRESH_MS}))},"useShipMessages",0,function(e){let t=(0,m.useTRPC)();return(0,p.useQuery)(t.fleet.shipMessages.queryOptions({shipId:e}))},"useShipTimeline",0,function(e){let t=(0,m.useTRPC)();return(0,p.useQuery)(t.fleet.shipTimeline.queryOptions({shipId:e}))},"useShips",0,function(e){let l=(0,m.useTRPC)(),f=function({queries:e,...t}){let l=(0,n.useQueryClient)(void 0),f=(0,s.useIsRestoring)(),p=(0,i.useQueryErrorResetBoundary)(),g=!1!==t.subscribed,m=u.useMemo(()=>e.map(e=>{let t=l.defaultQueryOptions(e);return t._optimisticResults=f?"isRestoring":g?"optimistic":void 0,t}),[e,l,f,g]);m.forEach(e=>{(0,a.ensureSuspenseTimers)(e);let t=l.getQueryCache().get(e.queryHash);(0,o.ensurePreventErrorBoundaryRetry)(e,p,t)}),(0,o.useClearResetErrorBoundary)(p);let[y]=u.useState(()=>new h(l,m,t)),[b,v,S]=y.getOptimisticResult(m,t.combine),C=!f&&g;u.useSyncExternalStore(u.useCallback(e=>C?y.subscribe(c.notifyManager.batchCalls(e)):r.noop,[y,C]),()=>y.getCurrentResult(),()=>y.getCurrentResult()),u.useEffect(()=>{y.setQueries(m,t)},[m,t,y]);let E=b.some((e,t)=>(0,a.shouldSuspend)(m[t],e))?b.flatMap((e,t)=>{let r=m[t];if(r&&(0,a.shouldSuspend)(r,e)){let e=new d.QueryObserver(l,r);return(0,a.fetchOptimistic)(r,e,p)}return[]}):[];if(E.length>0)throw Promise.all(E);let R=b.find((e,t)=>{let r=m[t];return r&&(0,o.getHasError)({result:e,errorResetBoundary:p,throwOnError:r.throwOnError,query:l.getQueryCache().get(r.queryHash),suspense:r.suspense})});if(R)throw R.error;return v(S())}({queries:e.flatMap(e=>{let r=(0,t.idSchema)("ship").safeParse(e);return r.success?[r.data]:[]}).map(e=>l.fleet.ship.queryOptions({shipId:e},{refetchInterval:g.LAST_SEEN_REFRESH_MS}))}),p=new Map;for(let e of f)e.data&&p.set(e.data.id,e.data);return p}],53573)}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,52376,e=>{"use strict";e.s([],4824),e.i(4824);var t=e.i(71645),r=e.i(52245),n=e.i(33332);let s=t.createContext(void 0);function i(){let e=t.useContext(s);if(void 0===e)throw Error((0,n.default)(13));return e}let o={imageLoadingStatus:()=>null};var a=e.i(43476);let u=t.forwardRef(function(e,n){let{className:i,render:u,style:l,...c}=e,[d,f]=t.useState("idle"),h=t.useMemo(()=>({imageLoadingStatus:d,setImageLoadingStatus:f}),[d,f]),p=(0,r.useRenderElement)("span",e,{state:{imageLoadingStatus:d},ref:n,props:c,stateAttributesMapping:o});return(0,a.jsx)(s.Provider,{value:h,children:p})});var l=e.i(67865),c=e.i(46376),d=e.i(37584),f=e.i(74354),h=e.i(23910),p=e.i(56789);let g={...o,...f.transitionStatusMapping},m=t.forwardRef(function(e,n){let{className:s,render:o,onLoadingStatusChange:a,keepMounted:u=!1,style:f,sizes:m,srcSet:y,src:b,...v}=e,{setImageLoadingStatus:S}=i(),[C,E]=function(e,{referrerPolicy:r,crossOrigin:n,sizes:s,srcSet:i},o){let a=t.useState("idle"),u=a[1];return(0,c.useIsoLayoutEffect)(()=>{if(!o)return p.NOOP;if(!e&&!i)return u("error"),p.NOOP;let t=!0,a=new window.Image,l=e=>()=>{t&&u(e)};return u("loading"),a.onload=l("loaded"),a.onerror=l("error"),r&&(a.referrerPolicy=r),a.crossOrigin=n??null,s&&(a.sizes=s),i&&(a.srcset=i),e&&(a.src=e),a.complete&&u(a.naturalWidth>0?"loaded":"error"),()=>{t=!1}},[o,e,i,s,n,r,u]),a}(b,e,!u),R="loaded"===C,{mounted:k,transitionStatus:O,setMounted:x}=(0,h.useTransitionStatus)(R),P=t.useRef(null),w=t.useRef(!0);(0,c.useIsoLayoutEffect)(()=>{if(!u)return;let e=w.current;w.current=!1;let t=P.current;if(!t)return;if(!t.complete)return void E("loading");let r=t.naturalWidth>0?"loaded":"error";E(r),"loaded"===r&&e&&x(!0)},[u,b,y,m,v.crossOrigin,v.referrerPolicy,o,E,x]);let A=u?{"data-loading":"loading"===C?"":void 0,"data-error":"error"===C?"":void 0,"aria-hidden":"loaded"!==C||void 0,onLoad(){E("loaded")},onError(){E("error")}}:void 0,T=(0,l.useStableCallback)(e=>{a?.(e),S(e)});(0,c.useIsoLayoutEffect)(()=>{"idle"!==C&&T(C)},[C,T]),(0,c.useIsoLayoutEffect)(()=>()=>S("idle"),[S]),(0,d.useOpenChangeComplete)({enabled:!R,open:R,ref:P,onComplete(){R||x(!1)}});let I=u||k,M={};void 0!==m&&(M.sizes=m),void 0!==y&&(M.srcSet=y),void 0!==b&&(M.src=b);let j=(0,r.useRenderElement)("img",e,{state:{imageLoadingStatus:C,transitionStatus:u&&"ending"===O?void 0:O},ref:[n,P],props:[A,v,M],stateAttributesMapping:g,enabled:I});return I?j:null});var y=e.i(39957);let b=t.forwardRef(function(e,n){let{className:s,render:a,delay:u=0,style:l,...c}=e,{imageLoadingStatus:d}=i(),[f,h]=t.useState(0===u),p=(0,y.useTimeout)();return t.useEffect(()=>(u>0?p.start(u,()=>h(!0)):h(!0),p.clear),[p,u]),(0,r.useRenderElement)("span",e,{state:{imageLoadingStatus:d},ref:n,props:c,stateAttributesMapping:o,enabled:"loaded"!==d&&(0===u||f)})});e.s(["Fallback",0,b,"Image",0,m,"Root",0,u],14751);var v=e.i(14751);e.s(["Avatar",0,v],52376)},80862,e=>{"use strict";e.s(["endingStyle",0,"data-ending-style","startingStyle",0,"data-starting-style"])},74354,e=>{"use strict";var t=e.i(80862);let r={[t.startingStyle]:""},n={[t.endingStyle]:""};e.s(["transitionStatusMapping",0,{transitionStatus:e=>"starting"===e?r:"ending"===e?n:null}])},37584,22640,e=>{"use strict";var t=e.i(71645),r=e.i(67865),n=e.i(74080),s=e.i(8445),i=e.i(94603),o=e.i(80862);let a=null;function u(e,t=!1,l=!1){let c=(0,s.useAnimationFrame)();return(0,r.useStableCallback)((r,s=null)=>{c.cancel();let u=(0,i.resolveRef)(e);if(null==u)return;let d=()=>{if(!l)return void n.flushSync(r);if(!a){let e=[];a=e,queueMicrotask(()=>{a=null,n.flushSync(()=>{for(let t of e)t()})})}a.push(()=>{s?.aborted||r()})};if("function"!=typeof u.getAnimations||globalThis.BASE_UI_ANIMATIONS_DISABLED)return void r();function f(){Promise.all(u.getAnimations().map(e=>e.finished)).then(()=>{s?.aborted||d()},()=>{s?.aborted||(u.getAnimations().some(e=>e.pending||"finished"!==e.playState)?f():d())})}if(t){let e=o.startingStyle;if(!u.hasAttribute(e))return void c.request(f);let t=new MutationObserver(()=>{u.hasAttribute(e)||(t.disconnect(),f())});return t.observe(u,{attributes:!0,attributeFilter:[e]}),void s?.addEventListener("abort",()=>t.disconnect(),{once:!0})}c.request(f)})}e.s(["useAnimationsFinished",0,u],22640),e.s(["useOpenChangeComplete",0,function(e){let{enabled:n=!0,open:s,ref:i,batch:o=!1,onComplete:a}=e,l=(0,r.useStableCallback)(a),c=u(i,s,o);t.useEffect(()=>{if(!n)return;let e=new AbortController;return c(l,e.signal),()=>{e.abort()}},[n,s,l,c])}],37584)},23910,e=>{"use strict";var t=e.i(71645),r=e.i(46376),n=e.i(8445);e.s(["useTransitionStatus",0,function(e,s=!1,i=!1,o=!1){let[a,u]=t.useState(e&&s?"idle":void 0),[l,c]=t.useState(e&&!o);return e&&!l&&(c(!0),u("starting")),e||!l||"ending"===a||i||u("ending"),e||l||"ending"!==a||u(void 0),(0,r.useIsoLayoutEffect)(()=>{if(!e&&l&&"ending"!==a&&i){let e=n.AnimationFrame.request(()=>{u("ending")});return()=>{n.AnimationFrame.cancel(e)}}},[e,l,a,i]),(0,r.useIsoLayoutEffect)(()=>{if(!e||s)return;let t=n.AnimationFrame.request(()=>{u(void 0)});return()=>{n.AnimationFrame.cancel(t)}},[s,e]),(0,r.useIsoLayoutEffect)(()=>{if(!e||!s)return;e&&l&&"idle"!==a&&u("starting");let t=n.AnimationFrame.request(()=>{u("idle")});return()=>{n.AnimationFrame.cancel(t)}},[s,e,l,a]),{mounted:l,setMounted:c,transitionStatus:a}}])},94603,e=>{"use strict";e.s(["resolveRef",0,function(e){return null==e?e:"current"in e?e.current:e}])},8445,e=>{"use strict";e.i(47167);var t=e.i(88940),r=e.i(26300);let n=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let r=0;r<t.length;r+=1)t[r]?.(e)};request(e){let t=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,this.isScheduled||(requestAnimationFrame(this.tick),this.isScheduled=!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||null!==this.callbacks[t]&&(this.callbacks[t]=null,this.callbacksCount-=1)}};class s{static create(){return new s}static request(e){return n.request(e)}static cancel(e){return n.cancel(e)}currentId=null;request(e){this.cancel(),this.currentId=n.request(()=>{this.currentId=null,e()})}cancel=()=>{null!==this.currentId&&(n.cancel(this.currentId),this.currentId=null)};disposeEffect=()=>this.cancel}e.s(["AnimationFrame",0,s,"useAnimationFrame",0,function(){let e=(0,t.useRefWithInit)(s.create).current;return(0,r.useOnMount)(e.disposeEffect),e}])},26300,e=>{"use strict";var t=e.i(71645),r=e.i(56789);e.s(["useOnMount",0,function(e){t.useEffect(e,r.EMPTY_ARRAY)}])},39957,e=>{"use strict";var t=e.i(88940),r=e.i(26300);class n{static create(){return new n}currentId=0;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=0,t()},e)}isStarted(){return 0!==this.currentId}clear=()=>{0!==this.currentId&&(clearTimeout(this.currentId),this.currentId=0)};disposeEffect=()=>this.clear}e.s(["Timeout",0,n,"useTimeout",0,function(){let e=(0,t.useRefWithInit)(n.create).current;return(0,r.useOnMount)(e.disposeEffect),e}])},49287,e=>{"use strict";var t=e.i(56420);let r={name:"ship",size:24,node:[["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 9.189V13",key:"yp40p3"}],["path",{d:"M19 12V6a2 2 0 00-2-2H7a2 2 0 00-2 2v6",key:"1wcigf"}],["path",{d:"M19.38 19A11.6 11.6 0 0021 13l-8.188-3.639a2 2 0 00-1.624 0L3 13.001a11.6 11.6 0 002.81 7.76",key:"1kdp0u"}],["path",{d:"M2 20c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1s1.2 1 2.5 1c2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"1l8w7g"}]]};r.node;let n=(0,t.default)(r);e.s(["Ship",0,n],49287)},22016,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return y},useLinkStatus:function(){return v}};for(var s in n)Object.defineProperty(r,s,{enumerable:!0,get:n[s]});let i=e.r(90809),o=e.r(43476),a=i._(e.r(71645)),u=e.r(95057),l=e.r(8372),c=e.r(18581),d=e.r(18967),f=e.r(5550),h=e.r(88540),p=e.r(91949),g=e.r(73668),m=e.r(9396);function y(t){var r;let n,s,i,[y,v]=(0,a.useOptimistic)(p.IDLE_LINK_STATUS),S=(0,a.useRef)(null),{href:C,as:E,children:R,prefetch:k=null,passHref:O,replace:x,shallow:P,scroll:w,onClick:A,onMouseEnter:T,onTouchStart:I,legacyBehavior:M=!1,onNavigate:j,transitionTypes:_,ref:N,unstable_dynamicOnHover:L,...D}=t;n=R,M&&("string"==typeof n||"number"==typeof n)&&(n=(0,o.jsx)("a",{children:n}));let q=a.default.useContext(l.AppRouterContext),F=!1!==k,Q=!1===k?"none":!0===k?"full":"auto",z="none"!==Q?"auto"===Q?m.FetchStrategy.PPR:m.FetchStrategy.Full:m.FetchStrategy.PPR,U="string"==typeof(r=E||C)?r:(0,u.formatUrl)(r);if(M){if(n?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});s=a.default.Children.only(n)}let B=M?s&&"object"==typeof s&&s.ref:N,$,H=a.default.useCallback(e=>(null!==q&&(S.current=(0,p.mountLinkInstance)(e,U,q,z,F,v,$)),()=>{S.current&&((0,p.unmountLinkForCurrentNavigation)(S.current),S.current=null),(0,p.unmountPrefetchableInstance)(e)}),[F,U,q,z,v,$]),K={ref:(0,c.useMergedRef)(H,B),onClick(t){M||"function"!=typeof A||A(t),M&&s.props&&"function"==typeof s.props.onClick&&s.props.onClick(t),!q||t.defaultPrevented||function(t,r,n,s,i,o,u,l="none"){if("u">typeof window){let c,{nodeName:d}=t.currentTarget;if("A"===d.toUpperCase()&&((c=t.currentTarget.getAttribute("target"))&&"_self"!==c||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,g.isLocalURL)(r)){s&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),o){let e=!1;if(o({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:f}=e.r(99781);a.default.startTransition(()=>{f(r,s?"replace":"push",!1===i?h.ScrollBehavior.NoScroll:h.ScrollBehavior.Default,n.current,u,l)})}}(t,U,S,x,w,j,_,Q)},onMouseEnter(e){M||"function"!=typeof T||T(e),M&&s.props&&"function"==typeof s.props.onMouseEnter&&s.props.onMouseEnter(e),q&&F&&(0,p.onNavigationIntent)(e.currentTarget,!0===L)},onTouchStart:function(e){M||"function"!=typeof I||I(e),M&&s.props&&"function"==typeof s.props.onTouchStart&&s.props.onTouchStart(e),q&&F&&(0,p.onNavigationIntent)(e.currentTarget,!0===L)}};return(0,d.isAbsoluteUrl)(U)?K.href=U:M&&!O&&("a"!==s.type||"href"in s.props)||(K.href=(0,f.addBasePath)(U)),i=M?a.default.cloneElement(s,K):(0,o.jsx)("a",{...D,...K,children:n}),(0,o.jsx)(b.Provider,{value:y,children:i})}let b=(0,a.createContext)(p.IDLE_LINK_STATUS),v=()=>(0,a.useContext)(b);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},18581,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return s}});let n=e.r(71645);function s(e,t){let r=(0,n.useRef)(null),s=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=s.current;t&&(s.current=null,t())}else e&&(r.current=i(e,n)),t&&(s.current=i(t,n))},[e,t])}function i(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},18967,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={DecodeError:function(){return y},MiddlewareNotFoundError:function(){return C},MissingStaticPage:function(){return S},NormalizeError:function(){return b},PageNotFoundError:function(){return v},SP:function(){return g},ST:function(){return m},WEB_VITALS:function(){return i},execOnce:function(){return o},getDisplayName:function(){return d},getLocationOrigin:function(){return l},getURL:function(){return c},isAbsoluteUrl:function(){return u},isResSent:function(){return f},loadGetInitialProps:function(){return p},normalizeRepeatedSlashes:function(){return h},stringifyError:function(){return E}};for(var s in n)Object.defineProperty(r,s,{enumerable:!0,get:n[s]});let i=["CLS","FCP","FID","INP","LCP","TTFB"];function o(e){let t,r=!1;return(...n)=>(r||(r=!0,t=e(...n)),t)}let a=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,u=e=>{let t=e.charCodeAt(0);return!!(t>=65&&t<=90||t>=97&&t<=122)&&a.test(e)};function l(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function c(){let{href:e}=window.location,t=l();return e.substring(t.length)}function d(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function f(e){return e.finished||e.headersSent}function h(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function p(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await p(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&f(r))return n;if(!n)throw Object.defineProperty(Error(`"${d(e)}.getInitialProps()" should resolve to an object. But found "${n}" instead.`),"__NEXT_ERROR_CODE",{value:"E1025",enumerable:!1,configurable:!0});return n}let g="u">typeof performance,m=g&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class y extends Error{}class b extends Error{}class v extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class S extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class C extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function E(e){return JSON.stringify({message:e.message,stack:e.stack})}},73668,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return i}});let n=e.r(18967),s=e.r(52817);function i(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,s.hasBasePath)(r.pathname)}catch(e){return!1}}},98183,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={assign:function(){return u},searchParamsToUrlQuery:function(){return i},urlQueryToSearchParams:function(){return a}};for(var s in n)Object.defineProperty(r,s,{enumerable:!0,get:n[s]});function i(e){let t={};for(let[r,n]of e.entries()){let e=t[r];void 0===e?t[r]=n:Array.isArray(e)?e.push(n):t[r]=[e,n]}return t}function o(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function a(e){let t=new URLSearchParams;for(let[r,n]of Object.entries(e))if(Array.isArray(n))for(let e of n)t.append(r,o(e));else t.set(r,o(n));return t}function u(e,...t){for(let r of t){for(let t of r.keys())e.delete(t);for(let[t,n]of r.entries())e.append(t,n)}return e}},95057,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return a},formatWithValidation:function(){return l},urlObjectKeys:function(){return u}};for(var s in n)Object.defineProperty(r,s,{enumerable:!0,get:n[s]});let i=e.r(90809)._(e.r(98183)),o=/https?|ftp|gopher|file/;function a(e){let{auth:t,hostname:r}=e,n=e.protocol||"",s=e.pathname||"",a=e.hash||"",u=e.query||"",l=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?l=t+e.host:r&&(l=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(l+=":"+e.port)),u&&"object"==typeof u&&(u=String(i.urlQueryToSearchParams(u)));let c=e.search||u&&`?${u}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||o.test(n))&&!1!==l?(l="//"+(l||""),s&&"/"!==s[0]&&(s="/"+s)):l||(l=""),a&&"#"!==a[0]&&(a="#"+a),c&&"?"!==c[0]&&(c="?"+c),s=s.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${n}${l}${s}${c}${a}`}let u=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function l(e){return a(e)}},24010,e=>{"use strict";var t=e.i(43476);e.s([],58762),e.i(58762);var r=e.i(66250),n=e.i(2820),s=e.i(56736),i=e.i(9793),o=e.i(84324),a=e.i(64951),u=e.i(77173);let l=e.i(13488).DialogTrigger;var c=e.i(74217),d=e.i(25326);class f extends d.DialogHandle{}e.s(["Backdrop",()=>n.DialogBackdrop,"Close",()=>s.DialogClose,"Description",()=>i.DialogDescription,"Handle",0,f,"Popup",()=>o.DialogPopup,"Portal",()=>a.DialogPortal,"Root",0,function(e){return(0,r.useRenderDialogRoot)("alert-dialog",e)},"Title",()=>u.DialogTitle,"Trigger",0,l,"Viewport",()=>c.DialogViewport,"createHandle",0,function(){return new f}],34604);var h=e.i(34604),h=h,p=e.i(90063),g=e.i(94945);e.s(["AlertDialog",0,function(e){return(0,t.jsx)(h.Root,{"data-slot":"alert-dialog",...e})},"AlertDialogClose",0,function(e){return(0,t.jsx)(h.Close,{"data-slot":"alert-dialog-close",...e})},"AlertDialogContent",0,function({className:e,size:r,children:n,...s}){return(0,t.jsxs)(h.Portal,{children:[(0,t.jsx)(h.Backdrop,{"data-slot":"alert-dialog-overlay",className:g.dialogSurface.overlay}),(0,t.jsx)(h.Popup,{"data-slot":"alert-dialog-content",className:(0,p.classNames)(g.dialogSurface.popup({size:r}),e),...s,children:n})]})},"AlertDialogDescription",0,function({className:e,...r}){return(0,t.jsx)(h.Description,{"data-slot":"alert-dialog-description",className:(0,p.classNames)(g.dialogSurface.description,e),...r})},"AlertDialogFooter",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-footer",className:(0,p.classNames)(g.dialogSurface.footer,e),...r})},"AlertDialogHeader",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-header",className:(0,p.classNames)(g.dialogSurface.header,e),...r})},"AlertDialogTitle",0,function({className:e,...r}){return(0,t.jsx)(h.Title,{"data-slot":"alert-dialog-title",className:(0,p.classNames)(g.dialogSurface.title,e),...r})}],24010)},94859,26478,e=>{"use strict";var t=e.i(43476),r=e.i(52376),n=e.i(25913),s=e.i(49287),i=e.i(56420);let o={name:"user-round",size:24,node:[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]],aliases:["user-2"]};o.node;let a=(0,i.default)(o);e.s(["UserRound",0,a],26478);var u=e.i(90063);let l=(0,n.cva)("inline-flex shrink-0 items-center justify-center overflow-hidden font-semibold uppercase select-none",{variants:{kind:{app:"rounded-sm bg-primary text-primary-foreground",account:"rounded-full bg-secondary font-sans text-foreground",ship:"rounded-sm bg-secondary font-mono text-foreground",argo:"rounded-sm bg-highlight text-primary",retired:"rounded-sm border border-dashed border-input font-mono font-medium text-muted-foreground"},size:{20:"size-5 text-micro [&_svg]:size-3",28:"size-7 text-micro [&_svg]:size-(--size-icon-sm)",36:"size-9 text-caption [&_svg]:size-(--size-icon)"}},defaultVariants:{kind:"ship",size:28}});e.s(["Avatar",0,function({kind:e="ship",size:n,name:i="",className:o}){let c=e??"ship";return(0,t.jsx)(r.Avatar.Root,{"aria-hidden":!0,"data-slot":"avatar",className:(0,u.classNames)(l({kind:e,size:n}),o),children:(0,t.jsx)(r.Avatar.Fallback,{children:"app"===c?(0,t.jsx)(s.Ship,{"aria-hidden":!0}):"argo"===c?(0,t.jsx)(a,{"aria-hidden":!0}):i.replaceAll("-","").slice(0,2)})})}],94859)},61966,8734,e=>{"use strict";var t=e.i(43476),r=e.i(89664),n=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 i=(0,n.default)(s);e.s(["Copy",0,i],8734);var o=e.i(71645),a=e.i(15905);e.s(["CopyButton",0,function({value:e,label:n,size:s="xs",isLabeled:u=!1,onCopied:l,onCopyFailed:c,className:d,"data-testid":f}){let[h,p]=(0,o.useState)(!1);async function g(){try{await navigator.clipboard.writeText(e)}catch{c?.();return}p(!0),l?.(),setTimeout(()=>{p(!1)},1500)}return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(a.Button,{variant:"ghost",size:s,isIconOnly:!u,"aria-label":n,title:u?void 0:n,icon:h?(0,t.jsx)(r.Check,{"aria-hidden":!0}):(0,t.jsx)(i,{"aria-hidden":!0}),className:d,"data-testid":f,onClick:()=>{g()},children:u?h?"Copied":"Copy":null}),(0,t.jsx)("span",{role:"status",className:"sr-only",children:h?"Copied.":""})]})}],61966)},66616,e=>{"use strict";var t=e.i(49635);let r={"claude-code":{word:"Claude Code",kind:"coding"},codex:{word:"Codex",kind:"coding"},"claude-chat":{word:"Claude chat",kind:"chat"},chatgpt:{word:"ChatGPT",kind:"chat"},grok:{word:"Grok",kind:"chat"},grokbot:{word:"Grokbot",kind:"bot"},console:{word:"Console",kind:"console"}};function n(e){return r[e]?.word??e}e.s(["crewLineHarnessWord",0,function(e){return"chat"===e?"Chat":n(e)},"harnessDetection",0,function(e,r){if(void 0===e.version)return;if(void 0===e.modelsConfirmedAt||null===e.modelsConfirmedAt)return`${e.version} \xb7 no model confirmed`;let n=(0,t.relativeTime)(new Date(e.modelsConfirmedAt),r);return`${e.version} \xb7 models confirmed ${"Just now"===n?"just now":n}`},"harnessKind",0,function(e){return r[e]?.kind},"harnessWord",0,n])},53573,e=>{"use strict";e.i(31627);var t=e.i(83615),r=e.i(19273),n=e.i(12598),s=e.i(81384),i=e.i(73664),o=e.i(27001),a=e.i(54440),u=e.i(71645),l=e.i(15823),c=e.i(40143),d=e.i(69230);function f(e,t){let r=new Set(t);return e.filter(e=>!r.has(e))}var h=class extends l.Subscribable{#e;#t;#r;#n;#s;#i;#o;#a;#u;#l=[];constructor(e,t,r){super(),this.#e=e,this.#n=r,this.#r=[],this.#s=[],this.#t=[],this.setQueries(t)}onSubscribe(){1===this.listeners.size&&this.#s.forEach(e=>{e.subscribe(t=>{this.#c(e,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#s.forEach(e=>{e.destroy()})}setQueries(e,t){this.#r=e,this.#n=t,c.notifyManager.batch(()=>{let e=this.#s,t=this.#d(this.#r);t.forEach(e=>e.observer.setOptions(e.defaultedQueryOptions));let n=t.map(e=>e.observer),s=n.map(e=>e.getCurrentResult()),i=e.length!==n.length,o=n.some((t,r)=>t!==e[r]),a=i||o,u=!!a||s.some((e,t)=>{let n=this.#t[t];return!n||!(0,r.shallowEqualObjects)(e,n)});(a||u)&&(a&&(this.#l=t,this.#s=n),this.#t=s,this.hasListeners()&&(a&&(f(e,n).forEach(e=>{e.destroy()}),f(n,e).forEach(e=>{e.subscribe(t=>{this.#c(e,t)})})),this.#f()))})}getCurrentResult(){return this.#t}getQueries(){return this.#s.map(e=>e.getCurrentQuery())}getObservers(){return this.#s}getOptimisticResult(e,t){let r=this.#d(e),n=r.map(e=>e.observer.getOptimisticResult(e.defaultedQueryOptions)),s=r.map(e=>e.defaultedQueryOptions.queryHash);return[n,e=>this.#h(e??n,t,s),()=>this.#p(n,r)]}#p(e,t){let r=new Set;return t.map((n,s)=>{let i=e[s];return n.defaultedQueryOptions.notifyOnChangeProps?i:n.observer.trackResult(i,e=>{r.has(e)||(r.add(e),t.forEach(t=>{t.observer.trackProp(e)}))})})}#h(e,t,n){if(t){let s=this.#u,i=void 0!==n&&void 0!==s&&(s.length!==n.length||n.some((e,t)=>e!==s[t]));return(this.#t!==this.#a||i||t!==this.#o)&&(this.#o=t,this.#a=this.#t,void 0!==n&&(this.#u=n),this.#i=(0,r.replaceEqualDeep)(this.#i,t(e))),this.#i}return e}#g(){return!this.#n?.combine||this.#s.some((e,t)=>e.options.suspense&&this.#t[t]?.data===void 0)}#d(e){let t=new Map;this.#s.forEach(e=>{let r=e.options.queryHash;if(!r)return;let n=t.get(r);n?n.push(e):t.set(r,[e])});let r=[];return e.forEach(e=>{let n=this.#e.defaultQueryOptions(e),s=t.get(n.queryHash)?.shift()??new d.QueryObserver(this.#e,n);r.push({defaultedQueryOptions:n,observer:s})}),r}#c(e,t){let r=this.#s.indexOf(e);-1!==r&&(this.#t=this.#t.slice(),this.#t[r]=t,this.#f())}#f(){if(this.hasListeners()){let e=this.#g(),t=this.#i,r=e?t:this.#h(this.#p(this.#t,this.#l),this.#n?.combine);(e||t!==r)&&c.notifyManager.batch(()=>{this.listeners.forEach(e=>{e(this.#t)})})}}},p=e.i(66027),g=e.i(5387),m=e.i(27702);e.s(["useMessage",0,function(e){let t=(0,m.useTRPC)();return(0,p.useQuery)(t.fleet.message.queryOptions(void 0===e?r.skipToken:{messageId:e}))},"useShip",0,function(e){let t=(0,m.useTRPC)();return(0,p.useQuery)(t.fleet.ship.queryOptions(void 0===e?r.skipToken:{shipId:e},{refetchInterval:g.LAST_SEEN_REFRESH_MS}))},"useShipMessages",0,function(e){let t=(0,m.useTRPC)();return(0,p.useQuery)(t.fleet.shipMessages.queryOptions({shipId:e}))},"useShipTimeline",0,function(e){let t=(0,m.useTRPC)();return(0,p.useQuery)(t.fleet.shipTimeline.queryOptions({shipId:e}))},"useShips",0,function(e){let l=(0,m.useTRPC)(),f=function({queries:e,...t}){let l=(0,n.useQueryClient)(void 0),f=(0,s.useIsRestoring)(),p=(0,i.useQueryErrorResetBoundary)(),g=!1!==t.subscribed,m=u.useMemo(()=>e.map(e=>{let t=l.defaultQueryOptions(e);return t._optimisticResults=f?"isRestoring":g?"optimistic":void 0,t}),[e,l,f,g]);m.forEach(e=>{(0,a.ensureSuspenseTimers)(e);let t=l.getQueryCache().get(e.queryHash);(0,o.ensurePreventErrorBoundaryRetry)(e,p,t)}),(0,o.useClearResetErrorBoundary)(p);let[y]=u.useState(()=>new h(l,m,t)),[b,v,S]=y.getOptimisticResult(m,t.combine),C=!f&&g;u.useSyncExternalStore(u.useCallback(e=>C?y.subscribe(c.notifyManager.batchCalls(e)):r.noop,[y,C]),()=>y.getCurrentResult(),()=>y.getCurrentResult()),u.useEffect(()=>{y.setQueries(m,t)},[m,t,y]);let E=b.some((e,t)=>(0,a.shouldSuspend)(m[t],e))?b.flatMap((e,t)=>{let r=m[t];if(r&&(0,a.shouldSuspend)(r,e)){let e=new d.QueryObserver(l,r);return(0,a.fetchOptimistic)(r,e,p)}return[]}):[];if(E.length>0)throw Promise.all(E);let R=b.find((e,t)=>{let r=m[t];return r&&(0,o.getHasError)({result:e,errorResetBoundary:p,throwOnError:r.throwOnError,query:l.getQueryCache().get(r.queryHash),suspense:r.suspense})});if(R)throw R.error;return v(S())}({queries:e.flatMap(e=>{let r=(0,t.idSchema)("ship").safeParse(e);return r.success?[r.data]:[]}).map(e=>l.fleet.ship.queryOptions({shipId:e},{refetchInterval:g.LAST_SEEN_REFRESH_MS}))}),p=new Map;for(let e of f)e.data&&p.set(e.data.id,e.data);return p}],53573)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,52376,e=>{"use strict";e.s([],4824),e.i(4824);var t=e.i(71645),r=e.i(52245),n=e.i(33332);let s=t.createContext(void 0);function i(){let e=t.useContext(s);if(void 0===e)throw Error((0,n.default)(13));return e}let o={imageLoadingStatus:()=>null};var a=e.i(43476);let u=t.forwardRef(function(e,n){let{className:i,render:u,style:l,...c}=e,[d,f]=t.useState("idle"),h=t.useMemo(()=>({imageLoadingStatus:d,setImageLoadingStatus:f}),[d,f]),p=(0,r.useRenderElement)("span",e,{state:{imageLoadingStatus:d},ref:n,props:c,stateAttributesMapping:o});return(0,a.jsx)(s.Provider,{value:h,children:p})});var l=e.i(67865),c=e.i(46376),d=e.i(37584),f=e.i(74354),h=e.i(23910),p=e.i(56789);let g={...o,...f.transitionStatusMapping},m=t.forwardRef(function(e,n){let{className:s,render:o,onLoadingStatusChange:a,keepMounted:u=!1,style:f,sizes:m,srcSet:b,src:y,...v}=e,{setImageLoadingStatus:S}=i(),[E,C]=function(e,{referrerPolicy:r,crossOrigin:n,sizes:s,srcSet:i},o){let a=t.useState("idle"),u=a[1];return(0,c.useIsoLayoutEffect)(()=>{if(!o)return p.NOOP;if(!e&&!i)return u("error"),p.NOOP;let t=!0,a=new window.Image,l=e=>()=>{t&&u(e)};return u("loading"),a.onload=l("loaded"),a.onerror=l("error"),r&&(a.referrerPolicy=r),a.crossOrigin=n??null,s&&(a.sizes=s),i&&(a.srcset=i),e&&(a.src=e),a.complete&&u(a.naturalWidth>0?"loaded":"error"),()=>{t=!1}},[o,e,i,s,n,r,u]),a}(y,e,!u),R="loaded"===E,{mounted:k,transitionStatus:O,setMounted:P}=(0,h.useTransitionStatus)(R),A=t.useRef(null),w=t.useRef(!0);(0,c.useIsoLayoutEffect)(()=>{if(!u)return;let e=w.current;w.current=!1;let t=A.current;if(!t)return;if(!t.complete)return void C("loading");let r=t.naturalWidth>0?"loaded":"error";C(r),"loaded"===r&&e&&P(!0)},[u,y,b,m,v.crossOrigin,v.referrerPolicy,o,C,P]);let T=u?{"data-loading":"loading"===E?"":void 0,"data-error":"error"===E?"":void 0,"aria-hidden":"loaded"!==E||void 0,onLoad(){C("loaded")},onError(){C("error")}}:void 0,x=(0,l.useStableCallback)(e=>{a?.(e),S(e)});(0,c.useIsoLayoutEffect)(()=>{"idle"!==E&&x(E)},[E,x]),(0,c.useIsoLayoutEffect)(()=>()=>S("idle"),[S]),(0,d.useOpenChangeComplete)({enabled:!R,open:R,ref:A,onComplete(){R||P(!1)}});let I=u||k,M={};void 0!==m&&(M.sizes=m),void 0!==b&&(M.srcSet=b),void 0!==y&&(M.src=y);let _=(0,r.useRenderElement)("img",e,{state:{imageLoadingStatus:E,transitionStatus:u&&"ending"===O?void 0:O},ref:[n,A],props:[T,v,M],stateAttributesMapping:g,enabled:I});return I?_:null});var b=e.i(39957);let y=t.forwardRef(function(e,n){let{className:s,render:a,delay:u=0,style:l,...c}=e,{imageLoadingStatus:d}=i(),[f,h]=t.useState(0===u),p=(0,b.useTimeout)();return t.useEffect(()=>(u>0?p.start(u,()=>h(!0)):h(!0),p.clear),[p,u]),(0,r.useRenderElement)("span",e,{state:{imageLoadingStatus:d},ref:n,props:c,stateAttributesMapping:o,enabled:"loaded"!==d&&(0===u||f)})});e.s(["Fallback",0,y,"Image",0,m,"Root",0,u],14751);var v=e.i(14751);e.s(["Avatar",0,v],52376)},80862,e=>{"use strict";e.s(["endingStyle",0,"data-ending-style","startingStyle",0,"data-starting-style"])},74354,e=>{"use strict";var t=e.i(80862);let r={[t.startingStyle]:""},n={[t.endingStyle]:""};e.s(["transitionStatusMapping",0,{transitionStatus:e=>"starting"===e?r:"ending"===e?n:null}])},37584,22640,e=>{"use strict";var t=e.i(71645),r=e.i(67865),n=e.i(74080),s=e.i(8445),i=e.i(94603),o=e.i(80862);let a=null;function u(e,t=!1,l=!1){let c=(0,s.useAnimationFrame)();return(0,r.useStableCallback)((r,s=null)=>{c.cancel();let u=(0,i.resolveRef)(e);if(null==u)return;let d=()=>{if(!l)return void n.flushSync(r);if(!a){let e=[];a=e,queueMicrotask(()=>{a=null,n.flushSync(()=>{for(let t of e)t()})})}a.push(()=>{s?.aborted||r()})};if("function"!=typeof u.getAnimations||globalThis.BASE_UI_ANIMATIONS_DISABLED)return void r();function f(){Promise.all(u.getAnimations().map(e=>e.finished)).then(()=>{s?.aborted||d()},()=>{s?.aborted||(u.getAnimations().some(e=>e.pending||"finished"!==e.playState)?f():d())})}if(t){let e=o.startingStyle;if(!u.hasAttribute(e))return void c.request(f);let t=new MutationObserver(()=>{u.hasAttribute(e)||(t.disconnect(),f())});return t.observe(u,{attributes:!0,attributeFilter:[e]}),void s?.addEventListener("abort",()=>t.disconnect(),{once:!0})}c.request(f)})}e.s(["useAnimationsFinished",0,u],22640),e.s(["useOpenChangeComplete",0,function(e){let{enabled:n=!0,open:s,ref:i,batch:o=!1,onComplete:a}=e,l=(0,r.useStableCallback)(a),c=u(i,s,o);t.useEffect(()=>{if(!n)return;let e=new AbortController;return c(l,e.signal),()=>{e.abort()}},[n,s,l,c])}],37584)},23910,e=>{"use strict";var t=e.i(71645),r=e.i(46376),n=e.i(8445);e.s(["useTransitionStatus",0,function(e,s=!1,i=!1,o=!1){let[a,u]=t.useState(e&&s?"idle":void 0),[l,c]=t.useState(e&&!o);return e&&!l&&(c(!0),u("starting")),e||!l||"ending"===a||i||u("ending"),e||l||"ending"!==a||u(void 0),(0,r.useIsoLayoutEffect)(()=>{if(!e&&l&&"ending"!==a&&i){let e=n.AnimationFrame.request(()=>{u("ending")});return()=>{n.AnimationFrame.cancel(e)}}},[e,l,a,i]),(0,r.useIsoLayoutEffect)(()=>{if(!e||s)return;let t=n.AnimationFrame.request(()=>{u(void 0)});return()=>{n.AnimationFrame.cancel(t)}},[s,e]),(0,r.useIsoLayoutEffect)(()=>{if(!e||!s)return;e&&l&&"idle"!==a&&u("starting");let t=n.AnimationFrame.request(()=>{u("idle")});return()=>{n.AnimationFrame.cancel(t)}},[s,e,l,a]),{mounted:l,setMounted:c,transitionStatus:a}}])},94603,e=>{"use strict";e.s(["resolveRef",0,function(e){return null==e?e:"current"in e?e.current:e}])},8445,e=>{"use strict";e.i(47167);var t=e.i(88940),r=e.i(26300);let n=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let r=0;r<t.length;r+=1)t[r]?.(e)};request(e){let t=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,this.isScheduled||(requestAnimationFrame(this.tick),this.isScheduled=!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||null!==this.callbacks[t]&&(this.callbacks[t]=null,this.callbacksCount-=1)}};class s{static create(){return new s}static request(e){return n.request(e)}static cancel(e){return n.cancel(e)}currentId=null;request(e){this.cancel(),this.currentId=n.request(()=>{this.currentId=null,e()})}cancel=()=>{null!==this.currentId&&(n.cancel(this.currentId),this.currentId=null)};disposeEffect=()=>this.cancel}e.s(["AnimationFrame",0,s,"useAnimationFrame",0,function(){let e=(0,t.useRefWithInit)(s.create).current;return(0,r.useOnMount)(e.disposeEffect),e}])},26300,e=>{"use strict";var t=e.i(71645),r=e.i(56789);e.s(["useOnMount",0,function(e){t.useEffect(e,r.EMPTY_ARRAY)}])},39957,e=>{"use strict";var t=e.i(88940),r=e.i(26300);class n{static create(){return new n}currentId=0;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=0,t()},e)}isStarted(){return 0!==this.currentId}clear=()=>{0!==this.currentId&&(clearTimeout(this.currentId),this.currentId=0)};disposeEffect=()=>this.clear}e.s(["Timeout",0,n,"useTimeout",0,function(){let e=(0,t.useRefWithInit)(n.create).current;return(0,r.useOnMount)(e.disposeEffect),e}])},49287,e=>{"use strict";var t=e.i(56420);let r={name:"ship",size:24,node:[["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 9.189V13",key:"yp40p3"}],["path",{d:"M19 12V6a2 2 0 00-2-2H7a2 2 0 00-2 2v6",key:"1wcigf"}],["path",{d:"M19.38 19A11.6 11.6 0 0021 13l-8.188-3.639a2 2 0 00-1.624 0L3 13.001a11.6 11.6 0 002.81 7.76",key:"1kdp0u"}],["path",{d:"M2 20c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1s1.2 1 2.5 1c2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"1l8w7g"}]]};r.node;let n=(0,t.default)(r);e.s(["Ship",0,n],49287)},22016,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return b},useLinkStatus:function(){return v}};for(var s in n)Object.defineProperty(r,s,{enumerable:!0,get:n[s]});let i=e.r(90809),o=e.r(43476),a=i._(e.r(71645)),u=e.r(95057),l=e.r(8372),c=e.r(18581),d=e.r(18967),f=e.r(5550),h=e.r(88540),p=e.r(91949),g=e.r(73668),m=e.r(9396);function b(t){var r;let n,s,i,[b,v]=(0,a.useOptimistic)(p.IDLE_LINK_STATUS),S=(0,a.useRef)(null),{href:E,as:C,children:R,prefetch:k=null,passHref:O,replace:P,shallow:A,scroll:w,onClick:T,onMouseEnter:x,onTouchStart:I,legacyBehavior:M=!1,onNavigate:_,transitionTypes:j,ref:N,unstable_dynamicOnHover:L,...D}=t;n=R,M&&("string"==typeof n||"number"==typeof n)&&(n=(0,o.jsx)("a",{children:n}));let q=a.default.useContext(l.AppRouterContext),F=!1!==k,Q=!1===k?"none":!0===k?"full":"auto",U="none"!==Q?"auto"===Q?m.FetchStrategy.PPR:m.FetchStrategy.Full:m.FetchStrategy.PPR,z="string"==typeof(r=C||E)?r:(0,u.formatUrl)(r);if(M){if(n?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});s=a.default.Children.only(n)}let $=M?s&&"object"==typeof s&&s.ref:N,B,H=a.default.useCallback(e=>(null!==q&&(S.current=(0,p.mountLinkInstance)(e,z,q,U,F,v,B)),()=>{S.current&&((0,p.unmountLinkForCurrentNavigation)(S.current),S.current=null),(0,p.unmountPrefetchableInstance)(e)}),[F,z,q,U,v,B]),K={ref:(0,c.useMergedRef)(H,$),onClick(t){M||"function"!=typeof T||T(t),M&&s.props&&"function"==typeof s.props.onClick&&s.props.onClick(t),!q||t.defaultPrevented||function(t,r,n,s,i,o,u,l="none"){if("u">typeof window){let c,{nodeName:d}=t.currentTarget;if("A"===d.toUpperCase()&&((c=t.currentTarget.getAttribute("target"))&&"_self"!==c||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,g.isLocalURL)(r)){s&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),o){let e=!1;if(o({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:f}=e.r(99781);a.default.startTransition(()=>{f(r,s?"replace":"push",!1===i?h.ScrollBehavior.NoScroll:h.ScrollBehavior.Default,n.current,u,l)})}}(t,z,S,P,w,_,j,Q)},onMouseEnter(e){M||"function"!=typeof x||x(e),M&&s.props&&"function"==typeof s.props.onMouseEnter&&s.props.onMouseEnter(e),q&&F&&(0,p.onNavigationIntent)(e.currentTarget,!0===L)},onTouchStart:function(e){M||"function"!=typeof I||I(e),M&&s.props&&"function"==typeof s.props.onTouchStart&&s.props.onTouchStart(e),q&&F&&(0,p.onNavigationIntent)(e.currentTarget,!0===L)}};return(0,d.isAbsoluteUrl)(z)?K.href=z:M&&!O&&("a"!==s.type||"href"in s.props)||(K.href=(0,f.addBasePath)(z)),i=M?a.default.cloneElement(s,K):(0,o.jsx)("a",{...D,...K,children:n}),(0,o.jsx)(y.Provider,{value:b,children:i})}let y=(0,a.createContext)(p.IDLE_LINK_STATUS),v=()=>(0,a.useContext)(y);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},18581,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return s}});let n=e.r(71645);function s(e,t){let r=(0,n.useRef)(null),s=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=s.current;t&&(s.current=null,t())}else e&&(r.current=i(e,n)),t&&(s.current=i(t,n))},[e,t])}function i(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},18967,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={DecodeError:function(){return b},MiddlewareNotFoundError:function(){return E},MissingStaticPage:function(){return S},NormalizeError:function(){return y},PageNotFoundError:function(){return v},SP:function(){return g},ST:function(){return m},WEB_VITALS:function(){return i},execOnce:function(){return o},getDisplayName:function(){return d},getLocationOrigin:function(){return l},getURL:function(){return c},isAbsoluteUrl:function(){return u},isResSent:function(){return f},loadGetInitialProps:function(){return p},normalizeRepeatedSlashes:function(){return h},stringifyError:function(){return C}};for(var s in n)Object.defineProperty(r,s,{enumerable:!0,get:n[s]});let i=["CLS","FCP","FID","INP","LCP","TTFB"];function o(e){let t,r=!1;return(...n)=>(r||(r=!0,t=e(...n)),t)}let a=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,u=e=>{let t=e.charCodeAt(0);return!!(t>=65&&t<=90||t>=97&&t<=122)&&a.test(e)};function l(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function c(){let{href:e}=window.location,t=l();return e.substring(t.length)}function d(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function f(e){return e.finished||e.headersSent}function h(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function p(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await p(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&f(r))return n;if(!n)throw Object.defineProperty(Error(`"${d(e)}.getInitialProps()" should resolve to an object. But found "${n}" instead.`),"__NEXT_ERROR_CODE",{value:"E1025",enumerable:!1,configurable:!0});return n}let g="u">typeof performance,m=g&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class b extends Error{}class y extends Error{}class v extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class S extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class E extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function C(e){return JSON.stringify({message:e.message,stack:e.stack})}},73668,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return i}});let n=e.r(18967),s=e.r(52817);function i(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,s.hasBasePath)(r.pathname)}catch(e){return!1}}},98183,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={assign:function(){return u},searchParamsToUrlQuery:function(){return i},urlQueryToSearchParams:function(){return a}};for(var s in n)Object.defineProperty(r,s,{enumerable:!0,get:n[s]});function i(e){let t={};for(let[r,n]of e.entries()){let e=t[r];void 0===e?t[r]=n:Array.isArray(e)?e.push(n):t[r]=[e,n]}return t}function o(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function a(e){let t=new URLSearchParams;for(let[r,n]of Object.entries(e))if(Array.isArray(n))for(let e of n)t.append(r,o(e));else t.set(r,o(n));return t}function u(e,...t){for(let r of t){for(let t of r.keys())e.delete(t);for(let[t,n]of r.entries())e.append(t,n)}return e}},95057,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return a},formatWithValidation:function(){return l},urlObjectKeys:function(){return u}};for(var s in n)Object.defineProperty(r,s,{enumerable:!0,get:n[s]});let i=e.r(90809)._(e.r(98183)),o=/https?|ftp|gopher|file/;function a(e){let{auth:t,hostname:r}=e,n=e.protocol||"",s=e.pathname||"",a=e.hash||"",u=e.query||"",l=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?l=t+e.host:r&&(l=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(l+=":"+e.port)),u&&"object"==typeof u&&(u=String(i.urlQueryToSearchParams(u)));let c=e.search||u&&`?${u}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||o.test(n))&&!1!==l?(l="//"+(l||""),s&&"/"!==s[0]&&(s="/"+s)):l||(l=""),a&&"#"!==a[0]&&(a="#"+a),c&&"?"!==c[0]&&(c="?"+c),s=s.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${n}${l}${s}${c}${a}`}let u=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function l(e){return a(e)}},24010,e=>{"use strict";var t=e.i(43476);e.s([],58762),e.i(58762);var r=e.i(66250),n=e.i(2820),s=e.i(56736),i=e.i(9793),o=e.i(84324),a=e.i(64951),u=e.i(77173);let l=e.i(13488).DialogTrigger;var c=e.i(74217),d=e.i(25326);class f extends d.DialogHandle{}e.s(["Backdrop",()=>n.DialogBackdrop,"Close",()=>s.DialogClose,"Description",()=>i.DialogDescription,"Handle",0,f,"Popup",()=>o.DialogPopup,"Portal",()=>a.DialogPortal,"Root",0,function(e){return(0,r.useRenderDialogRoot)("alert-dialog",e)},"Title",()=>u.DialogTitle,"Trigger",0,l,"Viewport",()=>c.DialogViewport,"createHandle",0,function(){return new f}],34604);var h=e.i(34604),h=h,p=e.i(90063),g=e.i(94945);e.s(["AlertDialog",0,function(e){return(0,t.jsx)(h.Root,{"data-slot":"alert-dialog",...e})},"AlertDialogClose",0,function(e){return(0,t.jsx)(h.Close,{"data-slot":"alert-dialog-close",...e})},"AlertDialogContent",0,function({className:e,size:r,children:n,...s}){return(0,t.jsxs)(h.Portal,{children:[(0,t.jsx)(h.Backdrop,{"data-slot":"alert-dialog-overlay",className:g.dialogSurface.overlay}),(0,t.jsx)(h.Popup,{"data-slot":"alert-dialog-content",className:(0,p.classNames)(g.dialogSurface.popup({size:r}),e),...s,children:n})]})},"AlertDialogDescription",0,function({className:e,...r}){return(0,t.jsx)(h.Description,{"data-slot":"alert-dialog-description",className:(0,p.classNames)(g.dialogSurface.description,e),...r})},"AlertDialogFooter",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-footer",className:(0,p.classNames)(g.dialogSurface.footer,e),...r})},"AlertDialogHeader",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-header",className:(0,p.classNames)(g.dialogSurface.header,e),...r})},"AlertDialogTitle",0,function({className:e,...r}){return(0,t.jsx)(h.Title,{"data-slot":"alert-dialog-title",className:(0,p.classNames)(g.dialogSurface.title,e),...r})}],24010)},94859,26478,e=>{"use strict";var t=e.i(43476),r=e.i(52376),n=e.i(25913),s=e.i(49287),i=e.i(56420);let o={name:"user-round",size:24,node:[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]],aliases:["user-2"]};o.node;let a=(0,i.default)(o);e.s(["UserRound",0,a],26478);var u=e.i(90063);let l=(0,n.cva)("inline-flex shrink-0 items-center justify-center overflow-hidden font-semibold uppercase select-none",{variants:{kind:{app:"rounded-sm bg-primary text-primary-foreground",account:"rounded-full bg-secondary font-sans text-foreground",ship:"rounded-sm bg-secondary font-mono text-foreground",argo:"rounded-sm bg-highlight text-primary",retired:"rounded-sm border border-dashed border-input font-mono font-medium text-muted-foreground"},size:{20:"size-5 text-micro [&_svg]:size-3",28:"size-7 text-micro [&_svg]:size-(--size-icon-sm)",36:"size-9 text-caption [&_svg]:size-(--size-icon)"}},defaultVariants:{kind:"ship",size:28}});e.s(["Avatar",0,function({kind:e="ship",size:n,name:i="",className:o}){let c=e??"ship";return(0,t.jsx)(r.Avatar.Root,{"aria-hidden":!0,"data-slot":"avatar",className:(0,u.classNames)(l({kind:e,size:n}),o),children:(0,t.jsx)(r.Avatar.Fallback,{children:"app"===c?(0,t.jsx)(s.Ship,{"aria-hidden":!0}):"argo"===c?(0,t.jsx)(a,{"aria-hidden":!0}):i.replaceAll("-","").slice(0,2)})})}],94859)},66616,e=>{"use strict";var t=e.i(49635);let r={"claude-code":{word:"Claude Code",kind:"coding"},codex:{word:"Codex",kind:"coding"},"claude-chat":{word:"Claude chat",kind:"chat"},chatgpt:{word:"ChatGPT",kind:"chat"},grok:{word:"Grok",kind:"chat"},grokbot:{word:"Grokbot",kind:"bot"},console:{word:"Console",kind:"console"}};function n(e){return r[e]?.word??e}e.s(["crewLineHarnessWord",0,function(e){return"chat"===e?"Chat":n(e)},"harnessDetection",0,function(e,r){if(void 0===e.version)return;if(void 0===e.modelsConfirmedAt||null===e.modelsConfirmedAt)return`${e.version} \xb7 no model confirmed`;let n=(0,t.relativeTime)(new Date(e.modelsConfirmedAt),r);return`${e.version} \xb7 models confirmed ${"Just now"===n?"just now":n}`},"harnessKind",0,function(e){return r[e]?.kind},"harnessWord",0,n])},53573,e=>{"use strict";e.i(31627);var t=e.i(83615),r=e.i(19273),n=e.i(12598),s=e.i(81384),i=e.i(73664),o=e.i(27001),a=e.i(54440),u=e.i(71645),l=e.i(15823),c=e.i(40143),d=e.i(69230);function f(e,t){let r=new Set(t);return e.filter(e=>!r.has(e))}var h=class extends l.Subscribable{#e;#t;#r;#n;#s;#i;#o;#a;#u;#l=[];constructor(e,t,r){super(),this.#e=e,this.#n=r,this.#r=[],this.#s=[],this.#t=[],this.setQueries(t)}onSubscribe(){1===this.listeners.size&&this.#s.forEach(e=>{e.subscribe(t=>{this.#c(e,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#s.forEach(e=>{e.destroy()})}setQueries(e,t){this.#r=e,this.#n=t,c.notifyManager.batch(()=>{let e=this.#s,t=this.#d(this.#r);t.forEach(e=>e.observer.setOptions(e.defaultedQueryOptions));let n=t.map(e=>e.observer),s=n.map(e=>e.getCurrentResult()),i=e.length!==n.length,o=n.some((t,r)=>t!==e[r]),a=i||o,u=!!a||s.some((e,t)=>{let n=this.#t[t];return!n||!(0,r.shallowEqualObjects)(e,n)});(a||u)&&(a&&(this.#l=t,this.#s=n),this.#t=s,this.hasListeners()&&(a&&(f(e,n).forEach(e=>{e.destroy()}),f(n,e).forEach(e=>{e.subscribe(t=>{this.#c(e,t)})})),this.#f()))})}getCurrentResult(){return this.#t}getQueries(){return this.#s.map(e=>e.getCurrentQuery())}getObservers(){return this.#s}getOptimisticResult(e,t){let r=this.#d(e),n=r.map(e=>e.observer.getOptimisticResult(e.defaultedQueryOptions)),s=r.map(e=>e.defaultedQueryOptions.queryHash);return[n,e=>this.#h(e??n,t,s),()=>this.#p(n,r)]}#p(e,t){let r=new Set;return t.map((n,s)=>{let i=e[s];return n.defaultedQueryOptions.notifyOnChangeProps?i:n.observer.trackResult(i,e=>{r.has(e)||(r.add(e),t.forEach(t=>{t.observer.trackProp(e)}))})})}#h(e,t,n){if(t){let s=this.#u,i=void 0!==n&&void 0!==s&&(s.length!==n.length||n.some((e,t)=>e!==s[t]));return(this.#t!==this.#a||i||t!==this.#o)&&(this.#o=t,this.#a=this.#t,void 0!==n&&(this.#u=n),this.#i=(0,r.replaceEqualDeep)(this.#i,t(e))),this.#i}return e}#g(){return!this.#n?.combine||this.#s.some((e,t)=>e.options.suspense&&this.#t[t]?.data===void 0)}#d(e){let t=new Map;this.#s.forEach(e=>{let r=e.options.queryHash;if(!r)return;let n=t.get(r);n?n.push(e):t.set(r,[e])});let r=[];return e.forEach(e=>{let n=this.#e.defaultQueryOptions(e),s=t.get(n.queryHash)?.shift()??new d.QueryObserver(this.#e,n);r.push({defaultedQueryOptions:n,observer:s})}),r}#c(e,t){let r=this.#s.indexOf(e);-1!==r&&(this.#t=this.#t.slice(),this.#t[r]=t,this.#f())}#f(){if(this.hasListeners()){let e=this.#g(),t=this.#i,r=e?t:this.#h(this.#p(this.#t,this.#l),this.#n?.combine);(e||t!==r)&&c.notifyManager.batch(()=>{this.listeners.forEach(e=>{e(this.#t)})})}}},p=e.i(66027),g=e.i(5387),m=e.i(27702);e.s(["useMessage",0,function(e){let t=(0,m.useTRPC)();return(0,p.useQuery)(t.fleet.message.queryOptions(void 0===e?r.skipToken:{messageId:e}))},"useShip",0,function(e){let t=(0,m.useTRPC)();return(0,p.useQuery)(t.fleet.ship.queryOptions(void 0===e?r.skipToken:{shipId:e},{refetchInterval:g.LAST_SEEN_REFRESH_MS}))},"useShipMessages",0,function(e){let t=(0,m.useTRPC)();return(0,p.useQuery)(t.fleet.shipMessages.queryOptions({shipId:e}))},"useShipTimeline",0,function(e){let t=(0,m.useTRPC)();return(0,p.useQuery)(t.fleet.shipTimeline.queryOptions({shipId:e}))},"useShips",0,function(e){let l=(0,m.useTRPC)(),f=function({queries:e,...t}){let l=(0,n.useQueryClient)(void 0),f=(0,s.useIsRestoring)(),p=(0,i.useQueryErrorResetBoundary)(),g=!1!==t.subscribed,m=u.useMemo(()=>e.map(e=>{let t=l.defaultQueryOptions(e);return t._optimisticResults=f?"isRestoring":g?"optimistic":void 0,t}),[e,l,f,g]);m.forEach(e=>{(0,a.ensureSuspenseTimers)(e);let t=l.getQueryCache().get(e.queryHash);(0,o.ensurePreventErrorBoundaryRetry)(e,p,t)}),(0,o.useClearResetErrorBoundary)(p);let[b]=u.useState(()=>new h(l,m,t)),[y,v,S]=b.getOptimisticResult(m,t.combine),E=!f&&g;u.useSyncExternalStore(u.useCallback(e=>E?b.subscribe(c.notifyManager.batchCalls(e)):r.noop,[b,E]),()=>b.getCurrentResult(),()=>b.getCurrentResult()),u.useEffect(()=>{b.setQueries(m,t)},[m,t,b]);let C=y.some((e,t)=>(0,a.shouldSuspend)(m[t],e))?y.flatMap((e,t)=>{let r=m[t];if(r&&(0,a.shouldSuspend)(r,e)){let e=new d.QueryObserver(l,r);return(0,a.fetchOptimistic)(r,e,p)}return[]}):[];if(C.length>0)throw Promise.all(C);let R=y.find((e,t)=>{let r=m[t];return r&&(0,o.getHasError)({result:e,errorResetBoundary:p,throwOnError:r.throwOnError,query:l.getQueryCache().get(r.queryHash),suspense:r.suspense})});if(R)throw R.error;return v(S())}({queries:e.flatMap(e=>{let r=(0,t.idSchema)("ship").safeParse(e);return r.success?[r.data]:[]}).map(e=>l.fleet.ship.queryOptions({shipId:e},{refetchInterval:g.LAST_SEEN_REFRESH_MS}))}),p=new Map;for(let e of f)e.data&&p.set(e.data.id,e.data);return p}],53573)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,69644,69846,e=>{"use strict";var t=e.i(56420);let i={name:"folder-open",size:24,node:[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]};i.node;let s=(0,t.default)(i);e.s(["FolderOpen",0,s],69644);let n={name:"git-branch",size:24,node:[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]]};n.node;let a=(0,t.default)(n);e.s(["GitBranch",0,a],69846)},83035,e=>{"use strict";var t=e.i(56420);let i={name:"square-terminal",size:24,node:[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]],aliases:["terminal-square"]};i.node;let s=(0,t.default)(i);e.s(["SquareTerminal",0,s],83035)},27290,e=>{"use strict";var t=e.i(43476),i=e.i(77071),s=e.i(71645),n=e.i(66390),a=e.i(15905),r=e.i(44824),o=e.i(45608),l=e.i(95475),d=e.i(2767);e.i(31627);var c=e.i(44827),h=e.i(22768),m=e.i(85595),u=e.i(16984),x=e.i(10818),p=e.i(90063),g=e.i(65160),f=e.i(91703),j=e.i(22212),v=e.i(94945),b=e.i(12470),y=e.i(91727),w=e.i(56478),C=e.i(17981);function N({activeNames:e,isPending:i,error:n,onSubmit:r}){let o=(0,s.useId)(),l=(0,s.useId)(),[d,h]=(0,s.useState)(""),x=(0,g.checkShipName)(d,{activeNames:e}),f="invalid"===x.kind||"reserved"===x.kind||"taken"===x.kind,v="available"===x.kind;return(0,t.jsxs)("form",{noValidate:!0,className:"contents",onSubmit:e=>{e.preventDefault(),v&&r(d)},children:[(0,t.jsxs)(j.DialogHeader,{children:[(0,t.jsx)(j.DialogTitle,{children:"Join a machine"}),(0,t.jsx)(j.DialogDescription,{children:"The trierarch plugin commissions a trierarch ship of this name. You then run its setup line on the machine, and the trierarch there starts sessions for the crew requests it is given."})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsxs)("div",{className:"flex items-baseline justify-between",children:[(0,t.jsx)(y.Label,{htmlFor:o,children:"Name"}),(0,t.jsxs)("span",{className:"text-caption text-muted-foreground tabular-nums",children:[d.length," / ",c.SHIP_HANDLE_MAX_LENGTH]})]}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(b.Input,{id:o,isMono:!0,autoComplete:"off",autoCapitalize:"off",spellCheck:!1,placeholder:"trierarch-mac","data-testid":"join-machine-name","aria-invalid":!!f||void 0,"aria-describedby":l,className:"pr-9 max-sm:h-(--size-control-touch) max-sm:text-input-touch",value:d,onChange:e=>{h((0,g.asHandle)(e.target.value))}}),"available"===x.kind?(0,t.jsx)(m.CircleCheck,{"aria-hidden":!0,className:"absolute top-1/2 right-3 size-(--size-icon) -translate-y-1/2 text-tone-ok-fg"}):f?(0,t.jsx)(u.CircleX,{"aria-hidden":!0,className:"absolute top-1/2 right-3 size-(--size-icon) -translate-y-1/2 text-destructive-text"}):null]}),(0,t.jsx)("p",{id:l,"aria-live":"polite",className:(0,p.classNames)("text-meta",f?"text-destructive-text":"text-muted-foreground"),children:x.message})]}),void 0===n?null:(0,t.jsx)(C.InlineError,{title:"Couldn’t join the machine",description:`${n} Nothing changed.`}),(0,t.jsxs)(j.DialogFooter,{children:[(0,t.jsx)(j.DialogClose,{render:(0,t.jsx)(a.Button,{type:"button",disabled:i}),children:"Cancel"}),(0,t.jsx)(a.Button,{type:"submit",variant:"primary",isLoading:i,disabled:!v,"data-testid":"join-machine-submit",children:i?"Joining":"Join machine"})]})]})}function k({joined:e}){let[i,n]=(0,s.useState)(!1),r=()=>{n(!1)},o=()=>{n(!0)};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(j.DialogHeader,{children:[(0,t.jsxs)(j.DialogTitle,{children:[e.name," joined"]}),(0,t.jsxs)(j.DialogDescription,{children:["Run the setup line on the machine. It installs the trierarch, which then crews ",e.name," and reports what the machine offers."]})]}),(0,t.jsxs)("p",{className:"flex gap-2 rounded-lg border border-border bg-muted px-3 py-2 text-meta text-foreground",children:[(0,t.jsx)(x.Info,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon-sm) shrink-0 text-muted-foreground"}),(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"font-medium",children:"Shown once. Copy it now."})," It carries the ship’s secret. If you lose it, get a new starting prompt on ",e.name,"’s ship page."]})]}),(0,t.jsx)(f.CodeBlock,{label:"Setup line",code:e.setupLine,isWrapped:!0,copyLabel:`Copy the setup line for ${e.name}`,codeTestId:"join-machine-setup-line",copyTestId:"join-machine-setup-line-copy",onCopied:r,onCopyFailed:o}),(0,t.jsx)(f.CodeBlock,{label:`Starting prompt for ${e.name}`,code:e.prompt,isWrapped:!0,copyLabel:`Copy the starting prompt for ${e.name}`,codeTestId:"join-machine-prompt",onCopied:r,onCopyFailed:o}),(0,t.jsx)(w.CrewLines,{crewLines:e.crewLines,subject:e.name,testIdPrefix:"join-machine-crew-line",onCopied:r,onCopyFailed:o}),(0,t.jsx)("p",{role:"status",className:"flex items-center gap-1.5 text-meta text-destructive-text empty:hidden",children:i?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(h.CircleAlert,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0"}),"Could not copy: select the text and copy it by hand."]}):null}),(0,t.jsx)(j.DialogFooter,{children:(0,t.jsx)(j.DialogClose,{render:(0,t.jsx)(a.Button,{variant:"primary"}),children:"Done"})})]})}function S(e){let{isOpen:i,onOpenChange:s,isPending:n,joined:a}=e;return(0,t.jsx)(j.Dialog,{open:i,onOpenChange:e=>{n||s(e)},children:(0,t.jsx)(j.DialogContent,{size:"md","data-testid":"join-machine-dialog",className:v.dialogSurface.phoneFullScreen,children:void 0===a?(0,t.jsx)(N,{...e}):(0,t.jsx)(k,{joined:a})})})}var T=e.i(42383),z=e.i(87792),L=e.i(90262),B=e.i(88721),I=e.i(5387),D=e.i(86413),$=e.i(18423),A=e.i(28459),O=e.i(96676),F=e.i(3979),M=e.i(78485),q=e.i(265);e.s(["default",0,function(){let e=(0,O.useNow)(),c=(0,B.useAccountMenu)(e),h=(0,D.useOpenInboxCount)(),m=(0,A.useNeedsAttention)(),u=(0,A.useAttentionCount)(),x=(0,$.useLiveFleet)(),p=(0,I.useFleetSnapshot)(),g=(0,q.useTrierarchPluginConnection)(),f=(0,q.useMachines)(),j=(0,q.useTrierarchPluginVersion)(),v=(0,q.useJoinMachine)(),b=(0,L.useAccess)(),y=(0,F.usePluginNav)(),[w,C]=(0,s.useState)(!1),[N,k]=(0,s.useState)(!1),[_,W]=(0,s.useState)(!1);(0,M.useSignInWhenSessionEnds)([m.error,x.error]);let H=b.canManage&&"connected"===g,P=()=>{v.reset(),C(!0)};return(0,t.jsxs)(z.ListLayout,{title:"Trierarchs",titleMeta:void 0===j?void 0:(0,t.jsxs)(n.Badge,{variant:"outline","data-testid":"trierarchs-plugin-version",children:["trierarch plugin ",j]}),description:"none"===g?"Not set up.":"Machines that run sessions for crew requests. The plugin picks a trierarch for each request.",live:x.live,nav:{active:"trierarchs",inboxCount:h,attentionCount:u,...y},primaryAction:H?(0,t.jsx)(a.Button,{variant:"primary",icon:(0,t.jsx)(i.Plus,{"aria-hidden":!0}),onClick:P,"data-testid":"trierarchs-join",children:"Join a machine"}):void 0,onCompose:b.canSend?()=>{k(!0)}:void 0,onSearch:()=>{W(!0)},account:c,banner:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(d.ConsoleNotices,{}),(0,t.jsx)(l.ConsoleGuide,{})]}),children:[(0,t.jsx)(T.MachineList,{connection:g,machines:f.data,ships:p.data??[],error:f.isError?f.error.message:void 0,onRetry:()=>{f.refetch()},onJoin:H?P:void 0,now:e}),H&&(0,t.jsx)(S,{activeNames:(p.data??[]).filter(e=>"retired"!==e.status).map(e=>e.name),isOpen:w,onOpenChange:e=>{C(e),e||v.reset()},isPending:v.isPending,error:v.error?.message,joined:v.data,onSubmit:e=>{v.mutate(e)}}),(0,t.jsx)(r.ComposeMessage,{isOpen:N,onOpenChange:k}),(0,t.jsx)(o.ConsoleCommands,{isOpen:_,onOpenChange:W,onCompose:()=>{k(!0)}})]})}],27290)},91703,e=>{"use strict";var t=e.i(43476),i=e.i(83035),s=e.i(90063),n=e.i(61966);e.s(["CodeBlock",0,function({label:e,code:a,isWrapped:r=!1,copyValue:o,copyLabel:l=`Copy ${e.toLowerCase()}`,onCopied:d,onCopyFailed:c,codeTestId:h,copyTestId:m}){return(0,t.jsxs)("div",{"data-slot":"code-block",className:"overflow-hidden rounded-lg border border-border bg-muted",children:[(0,t.jsxs)("div",{className:"flex h-9 items-center justify-between gap-2 border-b border-border pr-1.5 pl-3",children:[(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5 text-caption text-muted-foreground",children:[(0,t.jsx)(i.SquareTerminal,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0"}),(0,t.jsx)("span",{className:"truncate",children:e})]}),(0,t.jsx)(n.CopyButton,{value:o??a,label:l,isLabeled:!0,onCopied:d,onCopyFailed:c,"data-testid":m})]}),(0,t.jsx)("pre",{"data-testid":h,className:(0,s.classNames)("overflow-x-auto px-3 py-3 font-mono text-code text-foreground",r?"break-all whitespace-pre-wrap":"whitespace-pre"),children:a})]})}])},61966,8734,e=>{"use strict";var t=e.i(43476),i=e.i(89664),s=e.i(56420);let n={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"}]]};n.node;let a=(0,s.default)(n);e.s(["Copy",0,a],8734);var r=e.i(71645),o=e.i(15905);e.s(["CopyButton",0,function({value:e,label:s,size:n="xs",isLabeled:l=!1,onCopied:d,onCopyFailed:c,className:h,"data-testid":m}){let[u,x]=(0,r.useState)(!1);async function p(){try{await navigator.clipboard.writeText(e)}catch{c?.();return}x(!0),d?.(),setTimeout(()=>{x(!1)},1500)}return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.Button,{variant:"ghost",size:n,isIconOnly:!l,"aria-label":s,title:l?void 0:s,icon:u?(0,t.jsx)(i.Check,{"aria-hidden":!0}):(0,t.jsx)(a,{"aria-hidden":!0}),className:h,"data-testid":m,onClick:()=>{p()},children:l?u?"Copied":"Copy":null}),(0,t.jsx)("span",{role:"status",className:"sr-only",children:u?"Copied.":""})]})}],61966)},54422,e=>{"use strict";var t=e.i(43476),i=e.i(90063),s=e.i(14695);let n={running:"bg-tone-ok-fg",crewing:"bg-tone-active-fg",releasing:"bg-tone-active-fg",restarting:"bg-tone-waiting-fg",crashed:"bg-tone-attention-fg"};e.s(["CapacityBar",0,function({spots:e,caps:a,unknownText:r="Unknown",testId:o}){let l=(0,s.capacityLine)(e,a);if(void 0===a||void 0===l)return(0,t.jsx)("span",{"data-testid":o,className:"text-meta text-muted-foreground",children:r});let d=Math.max(0,a.ships-e.length);return(0,t.jsxs)("span",{role:"img","aria-label":l,"data-testid":o,className:"inline-flex min-w-0 flex-wrap items-center gap-x-2 gap-y-1",children:[(0,t.jsxs)("span",{"aria-hidden":!0,className:"inline-flex shrink-0 gap-0.5",children:[e.map((e,s)=>(0,t.jsx)("span",{title:`Spot ${String(s+1)}: ${e.name}, ${e.status}`,className:(0,i.classNames)("h-2 w-3 rounded-xs",n[e.status])},e.shipId)),Array.from({length:d},(i,s)=>(0,t.jsx)("span",{title:`Spot ${String(e.length+s+1)}: vacant`,className:"h-2 w-3 rounded-xs border border-input"},`free-${String(s)}`))]}),(0,t.jsx)("span",{className:"text-meta tabular-nums",children:l})]})}])},56478,e=>{"use strict";var t=e.i(43476),i=e.i(66616),s=e.i(91703);e.s(["CrewLines",0,function({crewLines:e,subject:n,testIdPrefix:a,onCopied:r,onCopyFailed:o}){return e.map(({harness:e,line:l})=>(0,t.jsx)(s.CodeBlock,{label:`Crew line, ${(0,i.harnessWord)(e)} with the aeolus plugin`,code:l,isWrapped:!0,copyLabel:`Copy the ${(0,i.harnessWord)(e)} crew line for ${n}`,codeTestId:`${a}-${e}`,copyTestId:`${a}-${e}-copy`,onCopied:r,onCopyFailed:o},e))}])},42383,94313,e=>{"use strict";var t=e.i(43476),i=e.i(77071),s=e.i(86875),n=e.i(94831),a=e.i(22016),r=e.i(14695),o=e.i(31513),l=e.i(15905),d=e.i(67874),c=e.i(17981),h=e.i(88393),m=e.i(71567),u=e.i(52886),x=e.i(69644),p=e.i(69846),g=e.i(66787),f=e.i(66616),j=e.i(49635),v=e.i(66390),b=e.i(54422),y=e.i(63481);let w={alive:"border-tone-ok-border bg-tone-ok-bg text-tone-ok-fg",silent:"border-tone-attention-border bg-tone-attention-bg text-tone-attention-fg","not-started":"border-tone-waiting-border bg-tone-waiting-bg text-tone-waiting-fg"},C={alive:"Alive",silent:"Not answering","not-started":"Not started"};function N({machine:e,now:i}){let n=(0,r.machineLiveness)(e),a=null===e.lastSeenAt?null:new Date(e.lastSeenAt);return(0,t.jsxs)("span",{className:"inline-flex flex-wrap items-center gap-x-2 gap-y-1 text-meta","data-testid":"machine-liveness","data-liveness":n,children:[(0,t.jsxs)(v.Badge,{variant:"outline",className:w[n],children:["alive"===n?(0,t.jsx)(s.ShipWheel,{"aria-hidden":!0}):(0,t.jsx)(u.CircleDashed,{"aria-hidden":!0}),C[n]]}),null===a?(0,t.jsx)("span",{className:"text-muted-foreground",children:"· run its setup line on the machine"}):(0,t.jsxs)("time",{dateTime:e.lastSeenAt??void 0,title:(0,j.fullDateTime)(a),className:"text-muted-foreground tabular-nums",children:["· ","silent"===n?`since ${(0,j.clockTime)(a)}`:(0,j.lastSeen)(a,i).replace("Last seen","seen")]})]})}function k(e,t){let i=(0,j.relativeTime)(e,t);return"Just now"===i?"just now":i}function S({title:e,children:i,className:s}){return(0,t.jsxs)("div",{className:`flex min-w-0 flex-col gap-2 px-4.5 py-4 ${s??""}`,children:[(0,t.jsx)("span",{className:"text-caption font-medium text-muted-foreground",children:e}),i]})}function T({harness:e,now:i}){let s=(0,f.harnessDetection)(e,i);return(0,t.jsxs)("div",{className:"flex flex-col gap-1.5 border-t border-border py-2.5 first-of-type:border-t-0 first-of-type:pt-0",children:[(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-body font-medium [&_svg]:size-(--size-icon-sm) [&_svg]:text-muted-foreground",children:[(0,t.jsx)(m.Bot,{"aria-hidden":!0}),(0,f.harnessWord)(e.harness),void 0===s?null:(0,t.jsx)("span",{className:"font-normal text-meta text-muted-foreground",children:s})]}),(0,r.harnessOptions)(e.options).map(e=>(0,t.jsxs)("span",{className:"flex flex-wrap items-center gap-x-2.5 gap-y-1 text-meta",children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:e.name}),e.values.map(i=>(0,t.jsxs)("span",{className:"font-mono text-id whitespace-nowrap",children:[i,i===e.defaultValue?(0,t.jsx)("span",{className:"font-sans text-muted-foreground",children:" (default)"}):null]},i))]},e.name)),0===e.flags.length?null:(0,t.jsx)("span",{className:"flex flex-wrap items-center gap-1.5",children:e.flags.map(i=>e.riskyFlags?.includes(i)===!0?(0,t.jsxs)("code",{"data-testid":"machine-risky-flag",title:"Risky: every launch runs without its harness's safeguards",className:"inline-flex items-center gap-1 rounded-sm border border-tone-waiting-border bg-tone-waiting-bg px-1.5 font-mono text-id text-tone-waiting-fg [&_svg]:size-(--size-icon-sm)",children:[(0,t.jsx)(g.TriangleAlert,{"aria-hidden":!0}),i,(0,t.jsx)("span",{className:"sr-only",children:" (risky)"})]},i):(0,t.jsx)("code",{className:"rounded-sm bg-muted px-1.5 font-mono text-id",children:i},i))})]})}function z({title:e,icon:i,names:s}){return(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("span",{className:"text-caption text-muted-foreground",children:e}),0===s.length?(0,t.jsx)("span",{className:"text-meta text-muted-foreground",children:"None"}):s.map(e=>(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-meta [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0 [&_svg]:text-muted-foreground",children:[i,e]},e))]})}function L({workspaces:e}){return(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,t.jsx)(z,{title:"Repositories · a new worktree per ship",icon:(0,t.jsx)(p.GitBranch,{"aria-hidden":!0}),names:e.repositories}),(0,t.jsx)(z,{title:"Folders · used as they are",icon:(0,t.jsx)(x.FolderOpen,{"aria-hidden":!0}),names:e.folders})]})}function B({machine:e,spots:i,location:n,now:r}){let{details:o,report:l}=e,d=null===l?null:new Date(l.reportedAt);return(0,t.jsxs)("section",{"aria-label":e.name,"data-testid":"machine-card",className:"grid grid-cols-[minmax(0,18.75rem)_minmax(0,1.25fr)_minmax(0,1fr)] divide-x divide-border rounded-lg border border-border bg-card shadow-sm max-lg:grid-cols-1 max-lg:divide-x-0 max-lg:divide-y",children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-2.5 px-4.5 py-4",children:[(0,t.jsxs)(a.default,{href:`/trierarchs/${e.shipId}`,"data-testid":"machine-card-name",className:"inline-flex items-center gap-2 text-section font-semibold hover:underline [&_svg]:size-(--size-icon) [&_svg]:text-muted-foreground",children:[(0,t.jsx)(s.ShipWheel,{"aria-hidden":!0}),e.name]}),(0,t.jsx)(N,{machine:e,now:r}),(0,t.jsxs)("span",{className:"flex flex-wrap items-center gap-1.5 text-meta text-muted-foreground",children:[(0,t.jsx)(y.LocationTag,{kind:n?.kind??null,description:n?.description}),null===o?null:(0,t.jsxs)("span",{className:"font-mono text-id",children:["· trierarch ",o.version]})]}),(0,t.jsx)("div",{role:"separator",className:"h-px bg-border"}),(0,t.jsx)("span",{className:"text-caption font-medium text-muted-foreground",children:"Capacity"}),(0,t.jsx)(b.CapacityBar,{spots:i,caps:o?.caps,testId:"machine-card-capacity",unknownText:null===d?"Unknown until it answers":`Unknown since ${(0,j.clockTime)(d)}`}),null===d?null:(0,t.jsxs)("time",{dateTime:l?.reportedAt,title:(0,j.fullDateTime)(d),className:"text-meta text-muted-foreground",children:["Last answer ",k(d,r)]})]}),(0,t.jsx)(S,{title:"Harnesses, options and flags",children:null===o?(0,t.jsx)("span",{className:"text-meta text-muted-foreground",children:"Unknown until it answers"}):o.harnesses.map(e=>(0,t.jsx)(T,{harness:e,now:r},e.harness))}),(0,t.jsx)(S,{title:"Workspaces",children:null===o?(0,t.jsx)("span",{className:"text-meta text-muted-foreground",children:"Unknown until it answers"}):(0,t.jsx)(L,{workspaces:o.workspaces})})]})}e.s(["HarnessOffer",0,T,"MachineCard",0,B,"MachineLiveness",0,N,"WorkspaceOffer",0,L,"lastAnswer",0,k],94313);let I=`${o.SOURCE_URL}/tree/main/packages/trierarch-plugin#readme`;e.s(["MachineList",0,function({connection:e,machines:o,ships:m,error:u,onRetry:x,onJoin:p,now:g}){return"none"===e?(0,t.jsx)(d.EmptyState,{icon:(0,t.jsx)(s.ShipWheel,{"aria-hidden":!0}),title:"The trierarch plugin is not set up for this fleet",description:"Crew requests work without it: they wait on Needs crew and you crew each ship by hand with its starting prompt. With the plugin, trierarchs on your machines start, restart and stop those sessions for you.",action:(0,t.jsx)(l.Button,{nativeButton:!1,render:({children:e,...i})=>(0,t.jsx)("a",{href:I,target:"_blank",rel:"noreferrer",...i,children:e}),"data-testid":"trierarchs-setup",children:"How to set up the trierarch plugin"})}):"not-connected"===e?(0,t.jsx)(d.EmptyState,{icon:(0,t.jsx)(n.Unplug,{"aria-hidden":!0}),title:"The trierarch plugin is not connected",description:"Connect it in Settings; its machines show up here then.",action:(0,t.jsx)(l.Button,{nativeButton:!1,render:(0,t.jsx)(a.default,{href:"/settings"}),"data-testid":"trierarchs-open-settings",children:"Open Settings"})}):void 0!==u?(0,t.jsx)(c.InlineError,{variant:"page",title:"Couldn’t read the machines",description:"Nothing changed.",detail:u,onRetry:x}):void 0===o||"unknown"===e?(0,t.jsx)(h.LoadingSkeleton,{variant:"cards",rows:2,label:"Loading the machines"}):0===o.length?(0,t.jsx)(d.EmptyState,{icon:(0,t.jsx)(s.ShipWheel,{"aria-hidden":!0}),title:"No machines yet",description:"Join a machine: its trierarch then starts sessions there for the crew requests the plugin gives it.",action:p?(0,t.jsx)(l.Button,{variant:"primary",icon:(0,t.jsx)(i.Plus,{"aria-hidden":!0}),onClick:p,"data-testid":"trierarchs-join-empty",children:"Join a machine"}):void 0}):(0,t.jsx)("div",{className:"flex flex-col gap-4","data-testid":"machine-list",children:o.map(e=>(0,t.jsx)(B,{machine:e,spots:(0,r.spotsOf)(e,m),location:m.find(t=>t.id===e.shipId)?.location??null,now:g},e.shipId))})}],42383)},87792,e=>{"use strict";var t=e.i(43476),i=e.i(19759),s=e.i(15905),n=e.i(77880),a=e.i(36779),r=e.i(15034),o=e.i(85538);e.s(["ListLayout",0,function({title:e,description:l,titleMeta:d,primaryAction:c,toolbar:h,live:m,nav:u,onCompose:x,onSearch:p,account:g,banner:f,children:j}){return(0,t.jsxs)("div",{className:"flex min-h-dvh bg-background",children:[(0,t.jsx)(a.Sidebar,{active:u.active,inboxCount:u.inboxCount,attentionCount:u.attentionCount,needsCrewCount:u.needsCrewCount,hasSquadrons:u.hasSquadrons,hasTrierarchs:u.hasTrierarchs,trierarchsCount:u.trierarchsCount,hasSettings:u.hasSettings,...g}),(0,t.jsxs)("div",{className:"flex min-w-0 grow flex-col",children:[(0,t.jsx)(n.Header,{breadcrumb:e,live:m,onCompose:x,onSearch:p}),f,(0,t.jsx)(o.TopBar,{title:e,live:m,account:g,onSearch:p,actions:x?(0,t.jsx)(s.Button,{variant:"ghost",size:"touch",isIconOnly:!0,"aria-label":"Compose","data-testid":"top-bar-compose",onClick:x,children:(0,t.jsx)(i.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}),d]}),l?(0,t.jsx)("p",{className:"text-meta text-muted-foreground max-sm:text-body-touch",children:l}):null]}),c?(0,t.jsx)("div",{className:"shrink-0 max-sm:w-full max-sm:[&>*]:w-full",children:c}):null]}),h,j]})]}),(0,t.jsx)(r.TabBar,{active:"overview"===u.active||"needs-crew"===u.active?"fleet":"settings"===u.active?void 0:u.active,hasSquadrons:u.hasSquadrons,hasTrierarchs:u.hasTrierarchs,trierarchsCount:u.trierarchsCount,inboxCount:u.inboxCount,attentionCount:u.attentionCount})]})}])}]);
|