@aeolus-fleet/console 0.27.0 → 0.27.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/standalone/packages/console/.next/BUILD_ID +1 -1
- package/.next/standalone/packages/console/.next/build-manifest.json +3 -3
- package/.next/standalone/packages/console/.next/prerender-manifest.json +3 -3
- package/.next/standalone/packages/console/.next/server/app/(console)/fleet-health/[cause]/page/server-reference-manifest.json +16 -16
- package/.next/standalone/packages/console/.next/server/app/(console)/fleet-health/[cause]/page.js.nft.json +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/fleet-health/[cause]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/fleet-health/page/server-reference-manifest.json +16 -16
- package/.next/standalone/packages/console/.next/server/app/(console)/fleet-health/page.js.nft.json +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/fleet-health/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/inbox/page/server-reference-manifest.json +16 -16
- package/.next/standalone/packages/console/.next/server/app/(console)/inbox/page.js.nft.json +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/inbox/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/labels/page/server-reference-manifest.json +16 -16
- package/.next/standalone/packages/console/.next/server/app/(console)/labels/page.js.nft.json +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/labels/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/needs-attention/page/server-reference-manifest.json +16 -16
- package/.next/standalone/packages/console/.next/server/app/(console)/needs-attention/page.js.nft.json +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/needs-attention/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/needs-crew/page/server-reference-manifest.json +16 -16
- package/.next/standalone/packages/console/.next/server/app/(console)/needs-crew/page.js.nft.json +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/needs-crew/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/network/page/server-reference-manifest.json +16 -16
- package/.next/standalone/packages/console/.next/server/app/(console)/network/page.js.nft.json +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/network/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/page/react-loadable-manifest.json +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/page/server-reference-manifest.json +16 -16
- package/.next/standalone/packages/console/.next/server/app/(console)/page.js.nft.json +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/settings/page/server-reference-manifest.json +16 -16
- package/.next/standalone/packages/console/.next/server/app/(console)/settings/page.js.nft.json +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/settings/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/ships/[shipId]/page/react-loadable-manifest.json +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/ships/[shipId]/page/server-reference-manifest.json +16 -16
- package/.next/standalone/packages/console/.next/server/app/(console)/ships/[shipId]/page.js.nft.json +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/ships/[shipId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/[squadronId]/page/server-reference-manifest.json +16 -16
- package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/[squadronId]/page.js.nft.json +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/[squadronId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/blueprints/[name]/page/react-loadable-manifest.json +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/blueprints/[name]/page/server-reference-manifest.json +16 -16
- package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/blueprints/[name]/page.js.nft.json +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/blueprints/[name]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/page/react-loadable-manifest.json +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/page/server-reference-manifest.json +16 -16
- package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/page.js.nft.json +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/templates/[name]/page/server-reference-manifest.json +16 -16
- package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/templates/[name]/page.js.nft.json +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/templates/[name]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/trierarchs/[shipId]/page/server-reference-manifest.json +16 -16
- package/.next/standalone/packages/console/.next/server/app/(console)/trierarchs/[shipId]/page.js.nft.json +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/trierarchs/[shipId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/trierarchs/page/server-reference-manifest.json +16 -16
- package/.next/standalone/packages/console/.next/server/app/(console)/trierarchs/page.js.nft.json +1 -1
- package/.next/standalone/packages/console/.next/server/app/(console)/trierarchs/page_client-reference-manifest.js +1 -1
- package/.next/standalone/packages/console/.next/server/app/_global-error.html +1 -1
- package/.next/standalone/packages/console/.next/server/app/_global-error.rsc +1 -1
- package/.next/standalone/packages/console/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/packages/console/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/standalone/packages/console/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/packages/console/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/standalone/packages/console/.next/server/app/api/reads/[read]/route.js.nft.json +1 -1
- package/.next/standalone/packages/console/.next/server/app/sign-in/failed/page.js.nft.json +1 -1
- package/.next/standalone/packages/console/.next/server/app/sign-in/page.js.nft.json +1 -1
- package/.next/standalone/packages/console/.next/server/app/version/route.js.nft.json +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/[root-of-the-server]__06f_104._.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/[root-of-the-server]__1cfwaji._.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/_1uqphll._.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/0mxb_server_app_(console)_squadrons_blueprints_[name]_page_actions_170owr_.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/0mxb_server_app_(console)_squadrons_templates_[name]_page_actions_09abrr0.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/0ysl_console__next-internal_server_app_(console)_fleet-health_page_actions_1gb6-fk.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/0ysl_console__next-internal_server_app_(console)_needs-crew_page_actions_08gu8-f.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/0ysl_console__next-internal_server_app_(console)_network_page_actions_1muuv-j.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/0ysl_console__next-internal_server_app_(console)_settings_page_actions_0b6qztr.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/0ysl_console__next-internal_server_app_(console)_ships_[shipId]_page_actions_0g2nd1p.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/0ysl_console__next-internal_server_app_(console)_squadrons_page_actions_1x3afts.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/0ysl_console__next-internal_server_app_(console)_trierarchs_page_actions_1ow37mz.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/1eui__next-internal_server_app_(console)_fleet-health_[cause]_page_actions_1kltvcl.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/1eui__next-internal_server_app_(console)_needs-attention_page_actions_1jfgclw.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/1eui__next-internal_server_app_(console)_squadrons_[squadronId]_page_actions_1lzqlye.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/1eui__next-internal_server_app_(console)_trierarchs_[shipId]_page_actions_0l7bxva.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/_065633k._.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/{_050ulkd._.js → _0dgwyy6._.js} +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/_0eeox-9._.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/{_1vc4auf._.js → _0ljoc6_._.js} +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/_15_xzod._.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/_1_9jlty._.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/{_1j1ejbw._.js → _1calzjj._.js} +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/_1u0h4gj._.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_common_dist_1_gq_cl._.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/{packages_console_18f93ie._.js → packages_console_095mmim._.js} +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/{packages_console_2004f3v._.js → packages_console_13ry5_2._.js} +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/{packages_console_0969g9_._.js → packages_console_1myu9eb._.js} +2 -2
- package/.next/standalone/packages/console/.next/server/chunks/ssr/{packages_console_1clix79._.js → packages_console_1pds_ub._.js} +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console__next-internal_server_app_(console)_inbox_page_actions_0q9_xye.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console__next-internal_server_app_(console)_labels_page_actions_0tk7mqs.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console__next-internal_server_app_(console)_page_actions_1ftjjyq.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_app_(console)_network_network-page_tsx_0qc3h-9._.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_app_(console)_ships_[shipId]_ship-page_tsx_0oahz0r._.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/{packages_console_components_organisms_crew-line-dialog_tsx_1qorkk0._.js → packages_console_components_organisms_crew-line-dialog_tsx_1tmwb3z._.js} +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_features_ship_ui_organisms_message-sheet_tsx_08bg9ly._.js +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/{packages_console_features_squadrons_organisms_form-squadron-dialog_tsx_0ditu5u._.js → packages_console_features_squadrons_organisms_form-squadron-dialog_tsx_11piudw._.js} +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/{packages_console_features_squadrons_organisms_form-squadron-dialog_tsx_13oketj._.js → packages_console_features_squadrons_organisms_form-squadron-dialog_tsx_1_2jov8._.js} +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/{packages_console_features_trierarchs_organisms_clear-worktree-dialog_tsx_1vigea_._.js → packages_console_features_trierarchs_organisms_clear-worktree-dialog_tsx_0dogayz._.js} +1 -1
- package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_lib_1b-azvo._.js +1 -1
- package/.next/standalone/packages/console/.next/server/middleware-build-manifest.js +3 -3
- package/.next/standalone/packages/console/.next/server/pages/500.html +1 -1
- package/.next/standalone/packages/console/.next/server/server-reference-manifest.js +1 -1
- package/.next/standalone/packages/console/.next/server/server-reference-manifest.json +17 -17
- package/.next/standalone/packages/console/.next/static/chunks/0k_f9ghdbhdlh.js +1 -0
- package/.next/standalone/packages/console/.next/static/chunks/{40js517zsadm9.js → 1gmxwgg3tuq9j.js} +1 -1
- package/.next/standalone/packages/console/.next/static/chunks/{323r-smxvi-fc.js → 1l5d_-f5_4n13.js} +1 -1
- package/.next/standalone/packages/console/.next/static/chunks/{2600yzum9pa4e.js → 1lu3lt0jl2qe-.js} +1 -1
- package/.next/standalone/packages/console/.next/static/chunks/{2qc_m8dbgxc8w.js → 2chqk2x196ti0.js} +1 -1
- package/.next/standalone/packages/console/.next/static/chunks/2j2d4nw9_nas6.js +1 -0
- package/.next/standalone/packages/console/.next/static/chunks/{38klmgk3bgj3s.js → 2l7g6epwsx9wf.js} +1 -1
- package/.next/standalone/packages/console/.next/static/chunks/{25l_2rj6pvegd.js → 2y5xx24gswylp.js} +1 -1
- package/.next/standalone/packages/console/.next/static/chunks/{41ur4zm093e1l.js → 318sjnwsspety.js} +1 -1
- package/.next/standalone/packages/console/.next/static/chunks/{2fkwzi80oyuv-.js → 36n7fei4v2kye.js} +1 -1
- package/.next/standalone/packages/console/.next/static/chunks/{2n_dccp7oi2ad.js → 3f5v4p3jz0k1g.js} +1 -1
- package/.next/standalone/packages/console/.next/static/chunks/3n6d3yt_vtnne.js +1 -0
- package/.next/standalone/packages/console/.next/static/chunks/{3kvklsjp8y-7e.js → 3o8213x94m4o3.js} +1 -1
- package/.next/standalone/packages/console/.next/static/chunks/{0o8q0d16-yt3a.js → 3qrq-wd28w60w.js} +1 -1
- package/.next/standalone/packages/console/.next/static/chunks/{20l4-ecv_oo2h.js → 420usygo4rcxp.js} +1 -1
- package/.next/standalone/packages/console/package.json +3 -3
- package/README.md +2 -2
- package/package.json +3 -3
- package/.next/standalone/packages/console/.next/static/chunks/061rac_vo9o5d.js +0 -1
- package/.next/standalone/packages/console/.next/static/chunks/0sagpcmh6omoj.js +0 -1
- package/.next/standalone/packages/console/.next/static/chunks/18rsibme2venq.js +0 -1
- /package/.next/standalone/packages/console/.next/static/{ZV7FLBaZ7IVExYMj-OJbA → Idv688KqeLyROC1itAuuQ}/_buildManifest.js +0 -0
- /package/.next/standalone/packages/console/.next/static/{ZV7FLBaZ7IVExYMj-OJbA → Idv688KqeLyROC1itAuuQ}/_clientMiddlewareManifest.js +0 -0
- /package/.next/standalone/packages/console/.next/static/{ZV7FLBaZ7IVExYMj-OJbA → Idv688KqeLyROC1itAuuQ}/_ssgManifest.js +0 -0
package/.next/standalone/packages/console/.next/static/chunks/{2fkwzi80oyuv-.js → 36n7fei4v2kye.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,31421,e=>{"use strict";var t=e.i(71645),a=e.i(46376),r=e.i(88015);e.s(["useAriaLabelledBy",0,function(e,n,i,l=!0,s){let[o,d]=t.useState(),u=(0,r.useBaseUiId)(s?`${s}-label`:void 0),c=e??n??o;return(0,a.useIsoLayoutEffect)(()=>{let t=e||n||!l?void 0:function(e,t){let a=function(e){if(!e)return;let t=e.parentElement;if(t&&"LABEL"===t.tagName)return t;let a=e.id;if(a){let t=e.nextElementSibling;if(t&&t.htmlFor===a)return t}let r=e.labels;return r&&r[0]}(e);if(a)return!a.id&&t&&(a.id=t),a.id||void 0}(i.current,u);o!==t&&d(t)}),c}])},86698,e=>{"use strict";e.s(["serializeValue",0,function(e){if(null==e)return"";if("string"==typeof e)return e;try{return JSON.stringify(e)}catch{return String(e)}}])},13203,65858,84325,42191,50001,18438,e=>{"use strict";var t=e.i(71645);e.s(["useOnFirstRender",0,function(e){let a=t.useRef(!0);a.current&&(a.current=!1,e())}],13203);var a=e.i(29315),r=e.i(83977),n=e.i(46376),i=e.i(88940),l=e.i(90627),s=e.i(46420),o=e.i(56341);e.s(["useFloatingRootContext",0,function(e){let{open:t=!1,onOpenChange:d,elements:u={}}=e,c=(0,r.useId)(),m=null!=(0,s.useFloatingParentNodeId)(),f=(0,i.useRefWithInit)(()=>new o.FloatingRootStore({open:t,transitionStatus:void 0,onOpenChange:d,referenceElement:u.reference??null,floatingElement:u.floating??null,triggerElements:new l.PopupTriggerMap,floatingId:c,syncOnly:!1,nested:m})).current;return(0,n.useIsoLayoutEffect)(()=>{let e={open:t,floatingId:c};void 0!==u.reference&&(e.referenceElement=u.reference,e.domReferenceElement=(0,a.isElement)(u.reference)?u.reference:null),void 0!==u.floating&&(e.floatingElement=u.floating),f.update(e)},[t,c,u.reference,u.floating,f]),f.context.onOpenChange=d,f.context.nested=m,f}],65858);let d=(e,t)=>Object.is(e,t);function u(e,t,a){return null==e||null==t?Object.is(e,t):a(e,t)}function c(e,t,a){return!!e&&e.some(e=>void 0!==e&&u(t,e,a))}function m(e,t,a){return e?e.findIndex(e=>void 0!==e&&u(e,t,a)):-1}function f(e,t,a,r){let n=r&&Array.isArray(t)?e.findIndex(function(e,t){if(t!==d)return a=>c(e,a,t);let a=new Set(e);return a.delete(void 0),t=>a.has(t)&&(0!==t||e.some(e=>Object.is(t,e)))}(t,a)):m(e,t,a);return -1===n?null:n}e.s(["compareItemEquality",0,u,"defaultItemEquality",0,d,"findItemIndex",0,m,"findSelectionIndex",0,f,"isSelectedValueDirty",0,function(e,t,a){return Array.isArray(e)&&Array.isArray(t)?!function(e,t,a=Object.is){let{length:r}=e;if(r!==t.length)return!1;for(let n=0;n<r;n+=1)if(!a(e[n],t[n]))return!1;return!0}(e,t,(e,t)=>u(e,t,a)):e!==t},"removeItem",0,function(e,t,a){return e.filter(e=>!u(t,e,a))},"resolveSelectedIndex",0,function(e,t,a,r,n,i){return c(r,t,n)?null!=i&&e>i&&c(r,a[i],n)?i:e:e===i?f(a,r,n,!0):i},"selectedValueIncludes",0,c],84325);var h=e.i(86698),p=e.i(43476);function x(e){var t;return"object"==typeof(t=e?.[0])&&null!=t&&Array.isArray(t.items)}function b(e){return x(e)?e.flatMap(e=>e.items):e}function g(e,t){if(t&&null!=e)return t(e)??"";if(e&&"object"==typeof e){if("label"in e&&null!=e.label)return String(e.label);if("value"in e)return String(e.value)}return(0,h.serializeValue)(e)}function v(e,t,a){if(a&&null!=e)return a(e);if(e&&"object"==typeof e&&"label"in e&&null!=e.label)return e.label;if(t&&!Array.isArray(t))return(Object.hasOwn(t,e)?t[e]:void 0)??g(e,a);if(Array.isArray(t)){let r=b(t);if(null==e||"object"!=typeof e){let t=r.find(t=>t.value===e);return t&&null!=t.label?t.label:g(e,a)}if("value"in e){let t=r.find(t=>t&&t.value===e.value);if(t&&null!=t.label)return t.label}}return g(e,a)}e.s(["flattenLeafItems",0,b,"hasNullItemLabel",0,function(e){if(!Array.isArray(e))return null!=e&&"null"in e;if(x(e)){for(let t of e)for(let e of t.items)if(e&&null==e.value&&null!=e.label)return!0;return!1}for(let t of e)if(t&&null==t.value&&null!=t.label)return!0;return!1},"isGroupedItems",0,x,"resolveMultipleLabels",0,function(e,a,r){return e.reduce((e,n,i)=>(i>0&&e.push(", "),e.push((0,p.jsx)(t.Fragment,{children:v(n,a,r)},i)),e),[])},"resolveSelectedLabel",0,v,"stringifyAsLabel",0,g,"stringifyAsValue",0,function(e,t){return t&&null!=e?t(e)??"":e&&"object"==typeof e&&"value"in e&&"label"in e?(0,h.serializeValue)(e.value):(0,h.serializeValue)(e)}],42191),e.s(["getDefaultLabelId",0,function(e){return null==e?void 0:`${e}-label`},"resolveAriaLabelledBy",0,function(e,t){return e??t}],50001);var y=e.i(52245);let j=t.forwardRef(function(e,t){let{className:a,render:r,orientation:n="horizontal",style:i,...l}=e;return(0,y.useRenderElement)("div",e,{state:{orientation:n},ref:t,props:[{role:"presentation"},l]})});e.s(["ListboxSeparator",0,j],18438)},68877,e=>{"use strict";var t=e.i(56420);let a={name:"arrow-right",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]};a.node;let r=(0,t.default)(a);e.s(["ArrowRight",0,r],68877)},47211,e=>{"use strict";var t=e.i(56420);let a={name:"ban",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}]]};a.node;let r=(0,t.default)(a);e.s(["Ban",0,r],47211)},92150,e=>{"use strict";var t=e.i(56420);let a={name:"boxes",size:24,node:[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]]};a.node;let r=(0,t.default)(a);e.s(["Boxes",0,r],92150)},16327,e=>{"use strict";var t=e.i(56420);let a={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};a.node;let r=(0,t.default)(a);e.s(["ChevronDown",0,r],16327)},24071,e=>{"use strict";var t=e.i(56420);let a={name:"chevron-left",size:24,node:[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]};a.node;let r=(0,t.default)(a);e.s(["ChevronLeft",0,r],24071)},67927,e=>{"use strict";var t=e.i(56420);let a={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};a.node;let r=(0,t.default)(a);e.s(["ChevronRight",0,r],67927)},36518,e=>{"use strict";var t=e.i(56420);let a={name:"cloud-off",size:24,node:[["path",{d:"M10.94 5.274A7 7 0 0 1 15.71 10h1.79a4.5 4.5 0 0 1 4.222 6.057",key:"1uxyv8"}],["path",{d:"M18.796 18.81A4.5 4.5 0 0 1 17.5 19H9A7 7 0 0 1 5.79 5.78",key:"99tcn7"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]};a.node;let r=(0,t.default)(a);e.s(["CloudOff",0,r],36518)},29870,e=>{"use strict";var t=e.i(56420);let a={name:"lock",size:24,node:[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]};a.node;let r=(0,t.default)(a);e.s(["Lock",0,r],29870)},77071,e=>{"use strict";var t=e.i(56420);let a={name:"plus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]};a.node;let r=(0,t.default)(a);e.s(["Plus",0,r],77071)},25398,e=>{"use strict";var t=e.i(56420);let a={name:"rotate-cw",size:24,node:[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]};a.node;let r=(0,t.default)(a);e.s(["RotateCw",0,r],25398)},66595,e=>{"use strict";var t=e.i(56420);let a={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};a.node;let r=(0,t.default)(a);e.s(["Search",0,r],66595)},19759,e=>{"use strict";var t=e.i(56420);let a={name:"square-pen",size:24,node:[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],aliases:["pen-box","edit","pen-square"]};a.node;let r=(0,t.default)(a);e.s(["SquarePen",0,r],19759)},59659,e=>{"use strict";var t=e.i(56420);let a={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};a.node;let r=(0,t.default)(a);e.s(["Trash2",0,r],59659)},24010,e=>{"use strict";var t=e.i(43476);e.s([],58762),e.i(58762);var a=e.i(66250),r=e.i(2820),n=e.i(56736),i=e.i(9793),l=e.i(84324),s=e.i(64951),o=e.i(77173);let d=e.i(13488).DialogTrigger;var u=e.i(74217),c=e.i(25326);class m extends c.DialogHandle{}e.s(["Backdrop",()=>r.DialogBackdrop,"Close",()=>n.DialogClose,"Description",()=>i.DialogDescription,"Handle",0,m,"Popup",()=>l.DialogPopup,"Portal",()=>s.DialogPortal,"Root",0,function(e){return(0,a.useRenderDialogRoot)("alert-dialog",e)},"Title",()=>o.DialogTitle,"Trigger",0,d,"Viewport",()=>u.DialogViewport,"createHandle",0,function(){return new m}],34604);var f=e.i(34604),f=f,h=e.i(90063),p=e.i(94945);e.s(["AlertDialog",0,function(e){return(0,t.jsx)(f.Root,{"data-slot":"alert-dialog",...e})},"AlertDialogClose",0,function(e){return(0,t.jsx)(f.Close,{"data-slot":"alert-dialog-close",...e})},"AlertDialogContent",0,function({className:e,size:a,children:r,...n}){return(0,t.jsxs)(f.Portal,{children:[(0,t.jsx)(f.Backdrop,{"data-slot":"alert-dialog-overlay",className:p.dialogSurface.overlay}),(0,t.jsx)(f.Popup,{"data-slot":"alert-dialog-content",className:(0,h.classNames)(p.dialogSurface.popup({size:a}),e),...n,children:r})]})},"AlertDialogDescription",0,function({className:e,...a}){return(0,t.jsx)(f.Description,{"data-slot":"alert-dialog-description",className:(0,h.classNames)(p.dialogSurface.description,e),...a})},"AlertDialogFooter",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-footer",className:(0,h.classNames)(p.dialogSurface.footer,e),...a})},"AlertDialogHeader",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-header",className:(0,h.classNames)(p.dialogSurface.header,e),...a})},"AlertDialogTitle",0,function({className:e,...a}){return(0,t.jsx)(f.Title,{"data-slot":"alert-dialog-title",className:(0,h.classNames)(p.dialogSurface.title,e),...a})}],24010)},94945,e=>{"use strict";let t={overlay:"fixed inset-0 isolate z-50 bg-overlay duration-(--duration-base) data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",popup:(0,e.i(25913).cva)("fixed top-1/2 left-1/2 z-50 grid max-h-[calc(100dvh-var(--spacing)*8)] w-full max-w-[calc(100%-var(--spacing)*8)] -translate-x-1/2 -translate-y-1/2 gap-4 overflow-y-auto rounded-xl border border-border bg-popover p-6 text-body text-popover-foreground shadow-lg duration-(--duration-base) outline-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 motion-reduce:data-open:zoom-in-100 motion-reduce:data-closed:zoom-out-100",{variants:{size:{sm:"sm:max-w-(--size-dialog-sm)",md:"sm:max-w-(--size-dialog-md)"}},defaultVariants:{size:"sm"}}),header:"flex flex-col gap-2",footer:"flex flex-col-reverse gap-2 pt-1 sm:flex-row sm:justify-end",title:"text-heading font-semibold text-foreground",description:"text-body text-muted-foreground",phoneSheet:"max-sm:top-auto max-sm:bottom-0 max-sm:left-0 max-sm:max-w-full max-sm:translate-x-0 max-sm:translate-y-0 max-sm:rounded-none max-sm:rounded-t-2xl max-sm:border-x-0 max-sm:border-b-0 max-sm:px-4 max-sm:pb-[max(calc(var(--spacing)*4),env(safe-area-inset-bottom))] max-sm:[&_[data-slot=button]]:h-(--size-control-touch) max-sm:[&_[data-slot=button]]:w-full",phoneFullScreen:"max-sm:top-0 max-sm:left-0 max-sm:h-dvh max-sm:max-w-full max-sm:translate-x-0 max-sm:translate-y-0 max-sm:content-start max-sm:overflow-y-auto max-sm:rounded-none max-sm:border-0"};e.s(["dialogSurface",0,t])},36651,e=>{"use strict";var t=e.i(43476),a=e.i(90063);e.s(["Kbd",0,function({className:e,...r}){return(0,t.jsx)("kbd",{"data-slot":"kbd",className:(0,a.classNames)("inline-flex h-5 min-w-5 shrink-0 items-center justify-center rounded-xs border border-border bg-muted px-1.25 font-sans text-micro font-medium text-muted-foreground max-sm:hidden",e),...r})}])},91727,e=>{"use strict";var t=e.i(43476),a=e.i(90063);e.s(["Label",0,function({className:e,htmlFor:r,...n}){return(0,t.jsx)("label",{"data-slot":"label",htmlFor:r,className:(0,a.classNames)("text-body font-medium text-foreground select-none",e),...n})}])},19321,e=>{"use strict";var t=e.i(43476),a=e.i(90063);e.s(["Skeleton",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"skeleton","aria-hidden":!0,className:(0,a.classNames)("animate-pulse rounded-sm bg-secondary [animation-duration:var(--duration-pulse)] motion-reduce:animate-none",e),...r})}])},75867,e=>{"use strict";var t=e.i(43476);e.s([],24305),e.i(24305);var a=e.i(71645),r=e.i(51437),n=e.i(28918),i=e.i(46376),l=e.i(2077),s=e.i(56789),o=e.i(52245),d=e.i(88015),u=e.i(40886),c=e.i(33332);let m=a.createContext(void 0),f={...e.i(75812).fieldValidityMapping,checked:e=>e?{"data-checked":""}:{"data-unchecked":""}};var h=e.i(64350),p=e.i(69690),x=e.i(81104),b=e.i(84708),g=e.i(47778),v=e.i(31421),y=e.i(38489),j=e.i(75606),k=e.i(56434),z=e.i(6039);let w=a.forwardRef(function(e,c){let{checked:w,className:N,defaultChecked:S,"aria-labelledby":I,form:R,id:C,inputRef:A,name:M,nativeButton:O=!1,onCheckedChange:D,readOnly:T=!1,required:E=!1,disabled:L=!1,render:B,uncheckedValue:V,value:P,style:q,...K}=e,{clearErrors:$}=(0,b.useFormContext)(),{state:F,setTouched:_,setDirty:H,validityData:U,setFilled:W,setFocused:Q,validationMode:G,disabled:J,name:X,validation:Y}=(0,p.useFieldRootContext)(),{labelId:Z}=(0,g.useLabelableContext)(),ee=J||L,et=X??M,ea=a.useRef(null),er=(0,n.useMergedRefs)(ea,A,Y.inputRef),en=a.useRef(null),ei=(0,d.useBaseUiId)(),el=(0,y.useLabelableId)({id:C}),es=O?void 0:el,[eo,ed]=(0,r.useControlled)({controlled:w,default:!!S,name:"Switch",state:"checked"});(0,x.useRegisterFieldControl)(en,ei,eo,void 0,!ee,M),(0,i.useIsoLayoutEffect)(()=>{W(eo)},[eo,W]),(0,z.useValueChanged)(eo,()=>{$(et),H(eo!==U.initialValue),Y.change(eo)});let{getButtonProps:eu,buttonRef:ec}=(0,u.useButton)({disabled:ee,native:O}),em=(0,v.useAriaLabelledBy)(I,Z,ea,!O,es),ef={...Y.getValidationProps(ee),checked:eo,disabled:ee,form:R,id:es,name:et,required:E,style:et?l.visuallyHiddenInput:l.visuallyHidden,tabIndex:-1,type:"checkbox","aria-hidden":!0,ref:er,onChange(e){if(e.nativeEvent.defaultPrevented)return;if(T)return void e.preventDefault();let t=e.currentTarget.checked,a=(0,j.createChangeEventDetails)(k.REASONS.none,e.nativeEvent);D?.(t,a),a.isCanceled||ed(t)},onClick(e){e.stopPropagation()},onFocus(){en.current?.focus()},...void 0!==P?{value:P}:s.EMPTY_OBJECT},eh=a.useMemo(()=>({...F,checked:eo,disabled:ee,readOnly:T,required:E}),[F,eo,ee,T,E]),ep=(0,o.useRenderElement)("span",e,{state:eh,ref:[c,en,ec],props:[{id:O?el:ei,role:"switch","aria-checked":eo,"aria-readonly":T||void 0,"aria-required":E||void 0,"aria-labelledby":em,onFocus(){ee||Q(!0)},onBlur(){let e=ea.current;e&&!ee&&(_(!0),Q(!1),"onBlur"===G&&Y.commit(e.checked))},onClick(e){if(T||ee)return;e.preventDefault();let t=ea.current;t&&(0,h.dispatchClickWithModifiers)(t,e)}},K,eu,e=>Y.getValidationProps(ee,e)],stateAttributesMapping:f});return(0,t.jsxs)(m.Provider,{value:eh,children:[ep,!eo&&et&&void 0!==V&&(0,t.jsx)("input",{type:"hidden",form:R,name:et,value:V,disabled:ee}),(0,t.jsx)("input",{...ef,suppressHydrationWarning:!0})]})}),N=a.forwardRef(function(e,t){let{render:r,className:n,style:i,...l}=e,s=function(){let e=a.useContext(m);if(void 0===e)throw Error((0,c.default)(63));return e}();return(0,o.useRenderElement)("span",e,{state:s,ref:t,stateAttributesMapping:f,props:l})});e.s(["Root",0,w,"Thumb",0,N],50994);var S=e.i(50994),S=S,I=e.i(90063);e.s(["Switch",0,function({className:e,...a}){return(0,t.jsx)(S.Root,{"data-slot":"switch",className:(0,I.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),...a,children:(0,t.jsx)(S.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)},67874,e=>{"use strict";var t=e.i(43476),a=e.i(90063);e.s(["EmptyState",0,function({title:e,description:r,icon:n,action:i,variant:l="page",className:s}){return"section"===l?(0,t.jsxs)("p",{"data-slot":"empty-state","data-variant":l,className:(0,a.classNames)("rounded-lg border border-border px-4 py-3 text-center text-meta text-muted-foreground",s),children:[e,r?(0,t.jsxs)(t.Fragment,{children:[" ",r]}):null]}):"no-results"===l?(0,t.jsxs)("div",{"data-slot":"empty-state","data-variant":l,className:(0,a.classNames)("flex flex-col items-center gap-2.5 rounded-lg border border-border bg-card px-4 py-6 text-center",s),children:[(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:e}),i]}):(0,t.jsxs)("div",{"data-slot":"empty-state","data-variant":l,className:(0,a.classNames)("flex flex-col items-center gap-3 rounded-lg border border-dashed border-border bg-card px-6 py-10 text-center",s),children:[n?(0,t.jsx)("span",{"aria-hidden":!0,className:"flex size-10 items-center justify-center rounded-lg border border-border bg-muted text-muted-foreground [&_svg]:size-(--size-icon-xl)",children:n}):null,(0,t.jsx)("h2",{className:"text-heading font-semibold text-foreground max-sm:text-heading-touch",children:e}),r?(0,t.jsx)("p",{className:"max-w-96 text-meta text-muted-foreground max-sm:text-body-touch",children:r}):null,i?(0,t.jsx)("div",{className:"mt-1 max-sm:w-full max-sm:[&>*]:w-full",children:i}):null]})}])},17981,e=>{"use strict";var t=e.i(43476),a=e.i(22768),r=e.i(36518),n=e.i(25398),i=e.i(90063),l=e.i(15905);e.s(["InlineError",0,function({title:e,description:s,detail:o,onRetry:d,variant:u="section",id:c,className:m}){return"field"===u?(0,t.jsxs)("p",{id:c,"data-slot":"inline-error","data-variant":u,className:(0,i.classNames)("flex items-center gap-1.5 text-meta text-destructive-text [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0",m),children:[(0,t.jsx)(a.CircleAlert,{"aria-hidden":!0}),e]}):"section"===u?(0,t.jsxs)("div",{role:"alert","data-slot":"inline-error","data-variant":u,className:(0,i.classNames)("flex gap-2 rounded-lg border border-tone-attention-border bg-tone-attention-bg p-3 text-tone-attention-fg",m),children:[(0,t.jsx)(a.CircleAlert,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon) shrink-0"}),(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("p",{className:"text-body font-medium",children:e}),s?(0,t.jsx)("p",{className:"text-meta text-foreground",children:s}):null,d?(0,t.jsx)(l.Button,{size:"xs",icon:(0,t.jsx)(n.RotateCw,{"aria-hidden":!0}),onClick:d,className:"self-start",children:"Try again"}):null]})]}):(0,t.jsxs)("div",{role:"alert","data-slot":"inline-error","data-variant":u,className:(0,i.classNames)("flex flex-col items-center gap-3 rounded-lg border border-border bg-card px-6 py-10 text-center",m),children:[(0,t.jsx)("span",{"aria-hidden":!0,className:"flex size-10 items-center justify-center rounded-lg border border-tone-attention-border bg-tone-attention-bg text-tone-attention-fg [&_svg]:size-(--size-icon-xl)",children:(0,t.jsx)(r.CloudOff,{})}),(0,t.jsx)("h2",{className:"text-heading font-semibold text-foreground max-sm:text-heading-touch",children:e}),s?(0,t.jsx)("p",{className:"max-w-96 text-meta text-muted-foreground max-sm:text-body-touch",children:s}):null,o?(0,t.jsx)("code",{className:"rounded-sm border border-border bg-muted px-2 py-0.5 font-mono text-id text-muted-foreground",children:o}):null,d?(0,t.jsx)("div",{className:"flex items-center gap-2 max-sm:w-full max-sm:flex-col",children:(0,t.jsx)(l.Button,{size:"sm",icon:(0,t.jsx)(n.RotateCw,{"aria-hidden":!0}),onClick:d,className:"max-sm:w-full",children:"Try again"})}):null]})}])},95960,e=>{"use strict";var t=e.i(43476),a=e.i(92150),r=e.i(49287),n=e.i(86875),i=e.i(56420);let l={name:"tag-x",size:24,node:[["path",{d:"m16.5 6.5-3.914-3.914A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.43 2.43 0 0 0 3.42 0l1.79-1.79",key:"hu94c9"}],["path",{d:"m16.5 10.5 5 5",key:"1jo8bf"}],["path",{d:"m21.5 10.5-5 5",key:"jzei60"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]};l.node;let s=(0,i.default)(l);var o=e.i(63676),d=e.i(90063),u=e.i(80581);let c={"trierarch-plugin":n.ShipWheel,squadrons:a.Boxes,ship:r.Ship,gone:s};e.s(["LabelChip",0,function({chip:e,onRemove:a,testId:r,className:n,trailing:i,meaning:l}){let s="none"===e.mark?null:c[e.mark],m=`${e.key}=${e.value}`,f=void 0===l?(0,u.chipTitleOf)(e):`${(0,u.chipTitleOf)(e)}. ${l}`;return(0,t.jsxs)("span",{role:"group","aria-label":f,"data-slot":"label-chip","data-testid":r,title:f,className:(0,d.classNames)("inline-flex h-5.5 max-w-full min-w-0 shrink-0 items-center gap-1 rounded-sm border border-border bg-secondary px-1.5 font-mono text-id whitespace-nowrap text-foreground [&_svg]:size-3 [&_svg]:shrink-0 [&_svg]:text-muted-foreground","gone"===e.mark?"border-dashed":null,n),children:[null===s?null:(0,t.jsx)(s,{"aria-hidden":!0}),(0,t.jsxs)("span",{className:"truncate",children:[(0,t.jsxs)("span",{className:"text-muted-foreground",children:[e.key,"="]}),(0,t.jsx)("span",{className:"font-medium",children:e.value})]}),i,void 0===a?null:(0,t.jsx)("button",{type:"button","aria-label":`Remove ${m}`,onClick:a,className:"-mr-1 ml-0.5 inline-flex size-4 items-center justify-center rounded-xs text-muted-foreground hover:bg-accent hover:text-foreground focus-visible:outline-2 focus-visible:outline-ring",children:(0,t.jsx)(o.X,{"aria-hidden":!0})})]})}],95960)},88393,e=>{"use strict";var t=e.i(43476),a=e.i(90063),r=e.i(19321);function n(e){return Array.from({length:e},(e,t)=>`row-${String(t)}`)}e.s(["LoadingSkeleton",0,function({variant:e,rows:i=4,label:l="Loading",className:s}){return(0,t.jsxs)("div",{role:"status","data-slot":"loading-skeleton","data-variant":e,className:(0,a.classNames)("w-full",s),children:[(0,t.jsx)("span",{className:"sr-only",children:l}),"table"===e?(0,t.jsxs)("div",{className:"overflow-hidden rounded-lg border border-border bg-card shadow-sm",children:[(0,t.jsx)("div",{className:"h-(--size-row-header) border-b border-border bg-muted"}),n(i).map(e=>(0,t.jsxs)("div",{className:"flex h-(--size-row) items-center gap-8 border-b border-border px-4 last:border-0",children:[(0,t.jsx)(r.Skeleton,{className:"h-2.5 w-24"}),(0,t.jsx)(r.Skeleton,{className:"h-5 w-16"}),(0,t.jsx)(r.Skeleton,{className:"h-5 w-20"}),(0,t.jsx)(r.Skeleton,{className:"h-2.5 w-28"})]},e))]}):null,"cards"===e?(0,t.jsx)("div",{className:"grid grid-cols-2 gap-3 lg:grid-cols-4",children:n(4).map(e=>(0,t.jsxs)("div",{className:"flex flex-col gap-3 rounded-lg border border-border bg-card p-4",children:[(0,t.jsx)(r.Skeleton,{className:"h-2.5 w-20"}),(0,t.jsx)(r.Skeleton,{className:"h-6 w-10"}),(0,t.jsx)(r.Skeleton,{className:"h-2.5 w-28"})]},e))}):null,"detail"===e?(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,t.jsx)(r.Skeleton,{className:"h-7 w-48"}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(r.Skeleton,{className:"h-5 w-20"}),(0,t.jsx)(r.Skeleton,{className:"h-5 w-16"})]}),(0,t.jsx)(r.Skeleton,{className:"h-16 w-full rounded-lg"})]}):null,"list"===e?(0,t.jsx)("div",{className:"overflow-hidden rounded-lg border border-border bg-card",children:n(i).map(e=>(0,t.jsxs)("div",{className:"flex flex-col gap-2.5 border-b border-border px-3.5 py-3 last:border-0",children:[(0,t.jsxs)("div",{className:"flex justify-between",children:[(0,t.jsx)(r.Skeleton,{className:"h-3 w-28"}),(0,t.jsx)(r.Skeleton,{className:"h-5 w-16"})]}),(0,t.jsx)(r.Skeleton,{className:"h-2.5 w-44"})]},e))}):null]})}])},77880,85538,e=>{"use strict";var t=e.i(43476),a=e.i(67927),r=e.i(66595),n=e.i(19759),i=e.i(22016),l=e.i(15905),s=e.i(36651),o=e.i(90063);let d={live:{label:"Live",dot:"bg-tone-ok-fg"},reconnecting:{label:"Reconnecting",dot:"bg-tone-waiting-fg"},offline:{label:"Offline",dot:"bg-tone-attention-fg"}};function u({state:e,className:a}){let{label:r,dot:n}=d[e];return(0,t.jsxs)("span",{"data-slot":"live-status","data-state":e,"aria-live":"polite",className:(0,o.classNames)("inline-flex items-center gap-1.5 text-meta text-muted-foreground",a),children:[(0,t.jsx)("span",{"aria-hidden":!0,className:(0,o.classNames)("size-2 shrink-0 rounded-full",n)}),r]})}e.s(["Header",0,function({breadcrumb:e,parents:o=[],live:d,onCompose:c,onSearch:m}){return(0,t.jsxs)("header",{"data-slot":"header",className:"sticky top-0 z-30 hidden h-(--size-header) shrink-0 items-center justify-between gap-4 border-b border-border bg-background px-6 sm:flex",children:[(0,t.jsx)("nav",{"aria-label":"Breadcrumb","data-testid":"header-breadcrumb",className:"min-w-0 text-body",children:(0,t.jsxs)("ol",{className:"flex min-w-0 items-center gap-1.5",children:[o.map(e=>(0,t.jsxs)("li",{className:"flex shrink-0 items-center gap-1.5",children:[(0,t.jsx)(i.default,{href:e.href,className:"text-muted-foreground hover:text-foreground hover:underline",children:e.label}),(0,t.jsx)(a.ChevronRight,{"aria-hidden":!0,className:"size-3.5 text-muted-foreground"})]},e.href)),(0,t.jsx)("li",{"aria-current":"page",className:"truncate font-medium text-foreground",children:e})]})}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(u,{state:d}),m?(0,t.jsxs)(l.Button,{size:"sm",icon:(0,t.jsx)(r.Search,{"aria-hidden":!0}),"data-testid":"header-search",className:"w-60 justify-start font-normal text-muted-foreground",onClick:m,children:[(0,t.jsx)("span",{className:"grow text-left",children:"Search ships or jump to"}),(0,t.jsx)(s.Kbd,{children:"⌘K"})]}):null,c?(0,t.jsx)(l.Button,{size:"sm",icon:(0,t.jsx)(n.SquarePen,{"aria-hidden":!0}),"data-testid":"header-compose",onClick:c,children:"Compose"}):null]})]})}],77880);var c=e.i(24071),m=e.i(57957);e.s(["TopBar",0,function({title:e,live:a,actions:n,back:s,account:o,onSearch:d}){let f=d&&!s?d:void 0;return(0,t.jsxs)("header",{"data-slot":"top-bar","data-mode":s?"detail":"root",className:"sticky top-0 z-30 flex h-(--size-header) items-center gap-2.5 border-b border-border bg-background px-4 sm:hidden",children:[s?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(i.default,{href:s.href,className:"-ml-1.5 inline-flex h-(--size-control-touch) shrink-0 items-center gap-0.5 rounded-md pr-2 text-body-touch text-foreground focus-visible:outline-2 focus-visible:outline-ring [&_svg]:size-(--size-icon)",children:[(0,t.jsx)(c.ChevronLeft,{"aria-hidden":!0}),s.label]}),(0,t.jsx)("p",{className:"min-w-0 flex-1 truncate text-center text-body-touch font-semibold text-foreground",children:e})]}):(0,t.jsx)("h1",{className:"truncate text-title-touch font-semibold tracking-tight text-foreground",children:e}),(0,t.jsx)(u,{state:a}),n||f||o&&!s?(0,t.jsxs)("div",{className:"ml-auto flex items-center gap-1",children:[f?(0,t.jsx)(l.Button,{variant:"ghost",size:"touch",isIconOnly:!0,"aria-label":"Search ships or jump to","data-testid":"top-bar-search",onClick:f,children:(0,t.jsx)(r.Search,{"aria-hidden":!0})}):null,n,o&&!s?(0,t.jsx)(m.AccountMenuSheet,{...o}):null]}):null]})}],85538)},77821,e=>{"use strict";var t=e.i(43476),a=e.i(19759),r=e.i(15905),n=e.i(77880),i=e.i(85538);e.s(["ListPage",0,function({title:e,description:l,titleMeta:s,primaryAction:o,toolbar:d,live:u,onCompose:c,onSearch:m,account:f,banner:h,phoneTopBar:p,children:x}){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.Header,{breadcrumb:e,live:u,onCompose:c,onSearch:m}),h,p??(0,t.jsx)(i.TopBar,{title:e,live:u,account:f,onSearch:m,actions:c?(0,t.jsx)(r.Button,{variant:"ghost",size:"touch",isIconOnly:!0,"aria-label":"Compose","data-testid":"top-bar-compose",onClick:c,children:(0,t.jsx)(a.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}),s]}),l?(0,t.jsx)("p",{className:"text-meta text-muted-foreground max-sm:text-body-touch",children:l}):null]}),o?(0,t.jsx)("div",{className:"shrink-0 max-sm:w-full max-sm:[&>*]:w-full",children:o}):null]}),d,x]})]})}])},18423,e=>{"use strict";var t=e.i(12598),a=e.i(5861),r=e.i(71645),n=e.i(86413),i=e.i(27702);let l=new Set(["FleetInitialised","ShipCommissioned","ShipClaimed","LeaseRevoked","CredentialRevoked","StartingPromptIssued","ShipRetired","DeliveryAcknowledged","DeliveryUndeliverable","ShipReported","CrewRequested","CrewRequestRemoved","CrewAssigned","CrewStatusChanged","CrewRequestExplained","CrewRequestGivenBack","LabelAssigned","LabelUnassigned","LabelRetired"]);async function s(e,t){await e.cancelQueries({queryKey:t,predicate:e=>void 0===e.state.data&&"fetching"===e.state.fetchStatus}),await e.invalidateQueries({queryKey:t})}let o=new Set(["LabelDefined","LabelValuesChanged","LabelRetired","LabelAssigned","LabelUnassigned","LabelDeleted"]),d=new Set(["DeliveryUndeliverable","DeliveryNotHandled","DeliveryDismissed"]);e.s(["useLiveFleet",0,function(){let e=(0,i.useTRPC)(),u=(0,t.useQueryClient)(),[c,m]=(0,r.useState)(new Set),f=e=>{s(u,e)},h=(0,a.useSubscription)(e.fleet.events.subscriptionOptions({lastEventId:null},{onData:({data:t})=>{var a,r,i,s;if("resync"===t.kind){f(e.fleet.pathKey()),f(n.INBOX_KEY);return}let{event:u}=t;for(let t of new Set([u.shipId,u.actorShipId]))null!==t&&(f(e.fleet.ship.queryKey({shipId:t})),f(e.fleet.shipTimeline.queryKey({shipId:t})),f(e.fleet.shipWay.queryKey({shipId:t})));if(null!==u.messageId&&(f(e.fleet.shipMessages.pathKey()),f(e.fleet.shipWay.pathKey()),f(e.fleet.message.queryKey({messageId:u.messageId})),f(e.fleet.inbox.pathKey()),f(n.INBOX_KEY),f(e.fleet.health.queryKey())),a=u.type,d.has(a)&&f(e.fleet.needsAttention.queryKey()),r=u.type,o.has(r)&&f(e.fleet.labels.queryKey()),"NetworkRulesDeclared"===u.type&&f(e.fleet.declaredNetworkRules.queryKey()),("BuiltInRuleChanged"===(i=u.type)||"NetworkPluginUnregistered"===i)&&f(e.fleet.builtInRules.queryKey()),s=u.type,!l.has(s))return;f(e.fleet.list.queryKey()),f(e.fleet.health.queryKey());let{shipId:c}=u;"ShipCommissioned"===u.type&&null!==c&&m(e=>new Set([...e,c]))}}));return{live:function(e){switch(e){case"pending":return"live";case"connecting":return"reconnecting";case"idle":case"error":return"offline"}}(h.status),newShipIds:c,error:h.error}}])},28459,e=>{"use strict";var t=e.i(54616),a=e.i(66027),r=e.i(12598),n=e.i(27702);function i(e){let t=String(e.attempts-1);return e.isPushed?`Handed ${t} times, never confirmed; fifth refused: undeliverable.`:`Handed (pulled) ${t} times, never acknowledged; fifth receive refused: undeliverable.`}let l="Acknowledged, then its turn died; handed once more, and that turn died too: not handled.";function s(){let e=(0,n.useTRPC)(),t=(0,r.useQueryClient)();return()=>t.invalidateQueries({queryKey:e.fleet.pathKey()})}e.s(["DISMISSED_TOAST",0,{title:"Delivery dismissed",description:"It stays in the timelines as dismissed."},"attentionReason",0,function(e){switch(e.state){case"undeliverable":return i(e);case"notHandled":return null===e.reason?l:`${l} Its crew said: ${e.reason}.`}},"canResend",0,function(e){return!e.message.isPing},"deliveryWithId",0,function(e,t){return e?.find(e=>e.deliveryId===t)},"resentToast",0,function(e){return{title:"Message resent",description:`A new message went to ${function(e){let{recipient:t}=e.message;return"ship"===t.kind?t.ship.name:`any ship of type ${t.type}`}(e)}. The original is dismissed.`}},"undeliverableReason",0,i,"useDismissDelivery",0,function(){let e=(0,n.useTRPC)(),a=s();return(0,t.useMutation)(e.fleet.dismiss.mutationOptions({onSuccess:a}))},"useNeedsAttention",0,function(){let e=(0,n.useTRPC)();return(0,a.useQuery)(e.fleet.needsAttention.queryOptions())},"useResendDelivery",0,function(){let e=(0,n.useTRPC)(),a=s();return(0,t.useMutation)(e.fleet.resend.mutationOptions({onSuccess:a}))}])},37338,11514,e=>{"use strict";var t=e.i(81307),a=e.i(83615);let r=t.z.string(),n=t.z.object({id:(0,a.idSchema)("labelValue"),value:t.z.string()}),i=t.z.object({labelId:(0,a.idSchema)("label"),key:t.z.string(),valueId:(0,a.idSchema)("labelValue"),value:t.z.string()});t.z.object({valueIds:t.z.array((0,a.idSchema)("labelValue")).optional()}).optional(),t.z.object({key:r,values:t.z.array(r)}),t.z.object({labelId:(0,a.idSchema)("label"),values:t.z.array(n)}),t.z.object({labelId:(0,a.idSchema)("label"),values:t.z.array(r)}),t.z.object({values:t.z.array(n)}),t.z.object({labelId:(0,a.idSchema)("label")}),t.z.object({key:r,value:r}),t.z.object({labelId:(0,a.idSchema)("label"),valueId:(0,a.idSchema)("labelValue")}),t.z.object({shipId:(0,a.idSchema)("ship"),valueId:(0,a.idSchema)("labelValue")}),t.z.object({});let l=t.z.object({id:(0,a.idSchema)("label"),key:t.z.string(),values:t.z.array(n),owner:t.z.object({id:(0,a.idSchema)("ship"),name:t.z.string()})});t.z.array(l);let s=t.z.union([(0,a.idSchema)("labelValue"),t.z.object({labelId:(0,a.idSchema)("label"),value:t.z.enum(["*","#"])}),t.z.object({owner:t.z.union([(0,a.idSchema)("ship"),t.z.enum(["*","#"])])})]);function o(e){return"string"!=typeof e&&"owner"in e}let d=t.z.array(s),u=["send","read","manage"],c=t.z.object({verb:t.z.enum(u),from:d,to:d});t.z.object({rules:t.z.array(c)});let m=["argo","owner","answer","viewerRead","open"];t.z.object({rule:t.z.enum(m),verb:t.z.enum(u).optional(),isOn:t.z.boolean()}).refine(e=>"open"===e.rule==(void 0!==e.verb),{message:"open names its verb, and no other built-in rule names one",path:["verb"]});let f=t.z.union([t.z.object({rule:t.z.enum(["argo","owner","answer","viewerRead"]),isOn:t.z.boolean()}),t.z.object({rule:t.z.literal("open"),verb:t.z.enum(u),isOn:t.z.boolean()})]);t.z.array(f),t.z.object({version:t.z.int().min(1)}),t.z.object({rules:t.z.array(c)}),t.z.object({rules:t.z.int().min(0)}),t.z.array(t.z.object({shipId:(0,a.idSchema)("ship"),rules:t.z.array(c)})),t.z.object({whileUnavailable:t.z.enum(["block-all","open-all","keep-latest"]),notRespondingAfterSeconds:t.z.int().min(60).max(86400)});let h=t.z.object({id:(0,a.idSchema)("ship"),name:t.z.string(),labels:t.z.array(i),owner:t.z.object({id:(0,a.idSchema)("ship"),name:t.z.string()}).nullable()}),p=t.z.object({id:(0,a.idSchema)("reachRefusal"),at:t.z.iso.datetime(),sender:h,askedBy:h.nullable(),recipient:t.z.discriminatedUnion("kind",[t.z.object({kind:t.z.literal("ship"),ship:h}),t.z.object({kind:t.z.literal("type"),type:t.z.string(),ships:t.z.array(h)})]),verb:t.z.enum(u),settingsVersion:t.z.int().min(1),whilePluginUnavailable:t.z.enum(["block-all","keep-latest"]).nullable()});t.z.array(p),t.z.object({fromShipId:(0,a.idSchema)("ship"),toShipId:(0,a.idSchema)("ship").optional()});let x=t.z.union([t.z.object({builtIn:t.z.enum(m)}),t.z.object({plugin:t.z.int().min(0)}),t.z.object({declared:(0,a.idSchema)("ship"),index:t.z.int().min(0)})]),b=t.z.array(t.z.object({shipId:(0,a.idSchema)("ship"),rule:x}));t.z.object({send:b,read:b,manage:b}),e.s(["NETWORK_VERBS",0,u,"isOwnerTerm",0,o],11514);var g=e.i(80581);function v(e){return"all-to-all"===e.kind?null:e.rules.map(e=>({verb:e.verb,from:[...e.from],to:[...e.to]}))}function y(e,t){return"all-to-all"===e.kind?e:{kind:"rules",rules:e.rules.map(e=>e.key===t.key?t.change(e):e)}}function j(e,t){return k(e)===k(t)}function k(e){return"string"==typeof e?e:o(e)?`owner=${e.owner}`:`${e.labelId}=${e.value}`}function z(e,t){let a=e["from"===t?"to":"from"];return e[t].filter(e=>"string"!=typeof e&&!o(e)&&"#"===e.value&&!a.some(t=>j(t,e)))}function w(e,t){let a=e=>e.some(e=>o(e)&&"#"===e.owner);return a(e[t])&&!a(e["from"===t?"to":"from"])}e.s(["OWNER_TERM_MEANINGS",0,{"*":"Any owner","#":"The same owner as the other side"},"TERM_MEANINGS",0,{"*":"Any value","#":"The same value as the other side"},"VERB_WORDS",0,{send:"May send to",read:"May read",manage:"May manage"},"addRule",0,function(e,t){return"all-to-all"===e.kind||e.rules.length>=t.limits.rulesMax?e:{kind:"rules",rules:[...e.rules,{key:t.newKey(),verb:"send",from:[],to:[]}]}},"addTerm",0,function(e,t){return y(e,{key:t.rule,change:e=>{let a=e[t.side];return a.some(e=>j(e,t.term))||a.length>=t.limits.selectorMax?e:{...e,[t.side]:[...a,t.term]}}})},"draftOf",0,function(e,t){return null===e?{kind:"all-to-all"}:{kind:"rules",rules:e.map(e=>({key:t(),verb:e.verb,from:[...e.from],to:[...e.to]}))}},"hasSameValueOnOneSide",0,function(e){return"rules"===e.kind&&e.rules.some(e=>z(e,"from").length+z(e,"to").length>0||w(e,"from")||w(e,"to"))},"isChanged",0,function(e,t){return JSON.stringify(v(e))!==JSON.stringify(t)},"ownerChoicesOf",0,function(e){return e.ships.filter(e=>("operator"===e.kind||"person"===e.kind)&&"retired"!==e.status).map(e=>({shipId:e.id,name:e.name}))},"removeRule",0,function(e,t){return"all-to-all"===e.kind?e:{kind:"rules",rules:e.rules.filter(e=>e.key!==t)}},"removeTerm",0,function(e,t){return y(e,{key:t.rule,change:e=>({...e,[t.side]:e[t.side].filter(e=>!j(e,t.term))})})},"rulesOf",0,v,"sameValueProblemOf",0,function(e,t){let[a]=z(e,t.side);if(void 0===a)return w(e,t.side)?"owner=# needs owner=# on the other side: # matches the same owner there.":void 0;let r=t.context.labels.find(e=>e.id===a.labelId)?.key??a.labelId;return`${r}=# needs ${r}=# on the other side: # matches the same value there.`},"selectorOf",0,function(e,t){let a=[],r=[],n=[];for(let i of e){if(o(i)){let e=function(e,t){if("*"===e.owner||"#"===e.owner)return{term:e,text:`owner=${e.owner}`};let a=t.ships.find(t=>t.id===e.owner);return void 0===a?void 0:{term:e,text:`owner=${a.name}`}}(i,t);void 0===e?n.push(i):r.push(e);continue}let e=function(e,t){if("string"==typeof e){let[a]=(0,g.pickedChips)([e],t);return void 0===a?void 0:{labelId:a.labelId,key:a.key,value:a.value,mark:a.mark,ownerName:a.ownerName,term:e}}let a=t.labels.find(t=>t.id===e.labelId);if(void 0===a)return;let r=t.ownerOf.get(a.id);return{labelId:a.id,key:a.key,value:e.value,mark:r?.mark??"ship",ownerName:r?.name??a.owner.name,term:e}}(i,t);void 0===e?n.push(i):a.push(e)}return{chips:a,owners:r,unknown:n}},"setRulesOn",0,function(e,t){return t?"rules"===e.kind?e:{kind:"rules",rules:[]}:{kind:"all-to-all"}},"setVerb",0,function(e,t){return y(e,{key:t.rule,change:e=>({...e,verb:t.verb})})},"supplyNote",0,function(e){switch(e){case"supplied":return"Saved. The fleet enforces them from now on.";case"waiting":return"Saved. The fleet does not answer yet: the networking plugin supplies them as soon as it does.";case"not-connected":case"unregistered":return"Saved."}},"termKeyOf",0,k],37338)}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,31421,e=>{"use strict";var t=e.i(71645),a=e.i(46376),r=e.i(88015);e.s(["useAriaLabelledBy",0,function(e,n,i,l=!0,s){let[o,d]=t.useState(),u=(0,r.useBaseUiId)(s?`${s}-label`:void 0),c=e??n??o;return(0,a.useIsoLayoutEffect)(()=>{let t=e||n||!l?void 0:function(e,t){let a=function(e){if(!e)return;let t=e.parentElement;if(t&&"LABEL"===t.tagName)return t;let a=e.id;if(a){let t=e.nextElementSibling;if(t&&t.htmlFor===a)return t}let r=e.labels;return r&&r[0]}(e);if(a)return!a.id&&t&&(a.id=t),a.id||void 0}(i.current,u);o!==t&&d(t)}),c}])},86698,e=>{"use strict";e.s(["serializeValue",0,function(e){if(null==e)return"";if("string"==typeof e)return e;try{return JSON.stringify(e)}catch{return String(e)}}])},13203,65858,84325,42191,50001,18438,e=>{"use strict";var t=e.i(71645);e.s(["useOnFirstRender",0,function(e){let a=t.useRef(!0);a.current&&(a.current=!1,e())}],13203);var a=e.i(29315),r=e.i(83977),n=e.i(46376),i=e.i(88940),l=e.i(90627),s=e.i(46420),o=e.i(56341);e.s(["useFloatingRootContext",0,function(e){let{open:t=!1,onOpenChange:d,elements:u={}}=e,c=(0,r.useId)(),m=null!=(0,s.useFloatingParentNodeId)(),f=(0,i.useRefWithInit)(()=>new o.FloatingRootStore({open:t,transitionStatus:void 0,onOpenChange:d,referenceElement:u.reference??null,floatingElement:u.floating??null,triggerElements:new l.PopupTriggerMap,floatingId:c,syncOnly:!1,nested:m})).current;return(0,n.useIsoLayoutEffect)(()=>{let e={open:t,floatingId:c};void 0!==u.reference&&(e.referenceElement=u.reference,e.domReferenceElement=(0,a.isElement)(u.reference)?u.reference:null),void 0!==u.floating&&(e.floatingElement=u.floating),f.update(e)},[t,c,u.reference,u.floating,f]),f.context.onOpenChange=d,f.context.nested=m,f}],65858);let d=(e,t)=>Object.is(e,t);function u(e,t,a){return null==e||null==t?Object.is(e,t):a(e,t)}function c(e,t,a){return!!e&&e.some(e=>void 0!==e&&u(t,e,a))}function m(e,t,a){return e?e.findIndex(e=>void 0!==e&&u(e,t,a)):-1}function f(e,t,a,r){let n=r&&Array.isArray(t)?e.findIndex(function(e,t){if(t!==d)return a=>c(e,a,t);let a=new Set(e);return a.delete(void 0),t=>a.has(t)&&(0!==t||e.some(e=>Object.is(t,e)))}(t,a)):m(e,t,a);return -1===n?null:n}e.s(["compareItemEquality",0,u,"defaultItemEquality",0,d,"findItemIndex",0,m,"findSelectionIndex",0,f,"isSelectedValueDirty",0,function(e,t,a){return Array.isArray(e)&&Array.isArray(t)?!function(e,t,a=Object.is){let{length:r}=e;if(r!==t.length)return!1;for(let n=0;n<r;n+=1)if(!a(e[n],t[n]))return!1;return!0}(e,t,(e,t)=>u(e,t,a)):e!==t},"removeItem",0,function(e,t,a){return e.filter(e=>!u(t,e,a))},"resolveSelectedIndex",0,function(e,t,a,r,n,i){return c(r,t,n)?null!=i&&e>i&&c(r,a[i],n)?i:e:e===i?f(a,r,n,!0):i},"selectedValueIncludes",0,c],84325);var h=e.i(86698),p=e.i(43476);function x(e){var t;return"object"==typeof(t=e?.[0])&&null!=t&&Array.isArray(t.items)}function b(e){return x(e)?e.flatMap(e=>e.items):e}function g(e,t){if(t&&null!=e)return t(e)??"";if(e&&"object"==typeof e){if("label"in e&&null!=e.label)return String(e.label);if("value"in e)return String(e.value)}return(0,h.serializeValue)(e)}function v(e,t,a){if(a&&null!=e)return a(e);if(e&&"object"==typeof e&&"label"in e&&null!=e.label)return e.label;if(t&&!Array.isArray(t))return(Object.hasOwn(t,e)?t[e]:void 0)??g(e,a);if(Array.isArray(t)){let r=b(t);if(null==e||"object"!=typeof e){let t=r.find(t=>t.value===e);return t&&null!=t.label?t.label:g(e,a)}if("value"in e){let t=r.find(t=>t&&t.value===e.value);if(t&&null!=t.label)return t.label}}return g(e,a)}e.s(["flattenLeafItems",0,b,"hasNullItemLabel",0,function(e){if(!Array.isArray(e))return null!=e&&"null"in e;if(x(e)){for(let t of e)for(let e of t.items)if(e&&null==e.value&&null!=e.label)return!0;return!1}for(let t of e)if(t&&null==t.value&&null!=t.label)return!0;return!1},"isGroupedItems",0,x,"resolveMultipleLabels",0,function(e,a,r){return e.reduce((e,n,i)=>(i>0&&e.push(", "),e.push((0,p.jsx)(t.Fragment,{children:v(n,a,r)},i)),e),[])},"resolveSelectedLabel",0,v,"stringifyAsLabel",0,g,"stringifyAsValue",0,function(e,t){return t&&null!=e?t(e)??"":e&&"object"==typeof e&&"value"in e&&"label"in e?(0,h.serializeValue)(e.value):(0,h.serializeValue)(e)}],42191),e.s(["getDefaultLabelId",0,function(e){return null==e?void 0:`${e}-label`},"resolveAriaLabelledBy",0,function(e,t){return e??t}],50001);var y=e.i(52245);let j=t.forwardRef(function(e,t){let{className:a,render:r,orientation:n="horizontal",style:i,...l}=e;return(0,y.useRenderElement)("div",e,{state:{orientation:n},ref:t,props:[{role:"presentation"},l]})});e.s(["ListboxSeparator",0,j],18438)},68877,e=>{"use strict";var t=e.i(56420);let a={name:"arrow-right",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]};a.node;let r=(0,t.default)(a);e.s(["ArrowRight",0,r],68877)},47211,e=>{"use strict";var t=e.i(56420);let a={name:"ban",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}]]};a.node;let r=(0,t.default)(a);e.s(["Ban",0,r],47211)},92150,e=>{"use strict";var t=e.i(56420);let a={name:"boxes",size:24,node:[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]]};a.node;let r=(0,t.default)(a);e.s(["Boxes",0,r],92150)},16327,e=>{"use strict";var t=e.i(56420);let a={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};a.node;let r=(0,t.default)(a);e.s(["ChevronDown",0,r],16327)},24071,e=>{"use strict";var t=e.i(56420);let a={name:"chevron-left",size:24,node:[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]};a.node;let r=(0,t.default)(a);e.s(["ChevronLeft",0,r],24071)},67927,e=>{"use strict";var t=e.i(56420);let a={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};a.node;let r=(0,t.default)(a);e.s(["ChevronRight",0,r],67927)},36518,e=>{"use strict";var t=e.i(56420);let a={name:"cloud-off",size:24,node:[["path",{d:"M10.94 5.274A7 7 0 0 1 15.71 10h1.79a4.5 4.5 0 0 1 4.222 6.057",key:"1uxyv8"}],["path",{d:"M18.796 18.81A4.5 4.5 0 0 1 17.5 19H9A7 7 0 0 1 5.79 5.78",key:"99tcn7"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]};a.node;let r=(0,t.default)(a);e.s(["CloudOff",0,r],36518)},29870,e=>{"use strict";var t=e.i(56420);let a={name:"lock",size:24,node:[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]};a.node;let r=(0,t.default)(a);e.s(["Lock",0,r],29870)},77071,e=>{"use strict";var t=e.i(56420);let a={name:"plus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]};a.node;let r=(0,t.default)(a);e.s(["Plus",0,r],77071)},25398,e=>{"use strict";var t=e.i(56420);let a={name:"rotate-cw",size:24,node:[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]};a.node;let r=(0,t.default)(a);e.s(["RotateCw",0,r],25398)},66595,e=>{"use strict";var t=e.i(56420);let a={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};a.node;let r=(0,t.default)(a);e.s(["Search",0,r],66595)},19759,e=>{"use strict";var t=e.i(56420);let a={name:"square-pen",size:24,node:[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],aliases:["pen-box","edit","pen-square"]};a.node;let r=(0,t.default)(a);e.s(["SquarePen",0,r],19759)},59659,e=>{"use strict";var t=e.i(56420);let a={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};a.node;let r=(0,t.default)(a);e.s(["Trash2",0,r],59659)},24010,e=>{"use strict";var t=e.i(43476);e.s([],58762),e.i(58762);var a=e.i(66250),r=e.i(2820),n=e.i(56736),i=e.i(9793),l=e.i(84324),s=e.i(64951),o=e.i(77173);let d=e.i(13488).DialogTrigger;var u=e.i(74217),c=e.i(25326);class m extends c.DialogHandle{}e.s(["Backdrop",()=>r.DialogBackdrop,"Close",()=>n.DialogClose,"Description",()=>i.DialogDescription,"Handle",0,m,"Popup",()=>l.DialogPopup,"Portal",()=>s.DialogPortal,"Root",0,function(e){return(0,a.useRenderDialogRoot)("alert-dialog",e)},"Title",()=>o.DialogTitle,"Trigger",0,d,"Viewport",()=>u.DialogViewport,"createHandle",0,function(){return new m}],34604);var f=e.i(34604),f=f,h=e.i(90063),p=e.i(94945);e.s(["AlertDialog",0,function(e){return(0,t.jsx)(f.Root,{"data-slot":"alert-dialog",...e})},"AlertDialogClose",0,function(e){return(0,t.jsx)(f.Close,{"data-slot":"alert-dialog-close",...e})},"AlertDialogContent",0,function({className:e,size:a,children:r,...n}){return(0,t.jsxs)(f.Portal,{children:[(0,t.jsx)(f.Backdrop,{"data-slot":"alert-dialog-overlay",className:p.dialogSurface.overlay}),(0,t.jsx)(f.Popup,{"data-slot":"alert-dialog-content",className:(0,h.classNames)(p.dialogSurface.popup({size:a}),e),...n,children:r})]})},"AlertDialogDescription",0,function({className:e,...a}){return(0,t.jsx)(f.Description,{"data-slot":"alert-dialog-description",className:(0,h.classNames)(p.dialogSurface.description,e),...a})},"AlertDialogFooter",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-footer",className:(0,h.classNames)(p.dialogSurface.footer,e),...a})},"AlertDialogHeader",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-header",className:(0,h.classNames)(p.dialogSurface.header,e),...a})},"AlertDialogTitle",0,function({className:e,...a}){return(0,t.jsx)(f.Title,{"data-slot":"alert-dialog-title",className:(0,h.classNames)(p.dialogSurface.title,e),...a})}],24010)},94945,e=>{"use strict";let t={overlay:"fixed inset-0 isolate z-50 bg-overlay duration-(--duration-base) data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",popup:(0,e.i(25913).cva)("fixed top-1/2 left-1/2 z-50 grid max-h-[calc(100dvh-var(--spacing)*8)] w-full max-w-[calc(100%-var(--spacing)*8)] -translate-x-1/2 -translate-y-1/2 gap-4 overflow-y-auto rounded-xl border border-border bg-popover p-6 text-body text-popover-foreground shadow-lg duration-(--duration-base) outline-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 motion-reduce:data-open:zoom-in-100 motion-reduce:data-closed:zoom-out-100",{variants:{size:{sm:"sm:max-w-(--size-dialog-sm)",md:"sm:max-w-(--size-dialog-md)"}},defaultVariants:{size:"sm"}}),header:"flex flex-col gap-2",footer:"flex flex-col-reverse gap-2 pt-1 sm:flex-row sm:justify-end",title:"text-heading font-semibold text-foreground",description:"text-body text-muted-foreground",phoneSheet:"max-sm:top-auto max-sm:bottom-0 max-sm:left-0 max-sm:max-w-full max-sm:translate-x-0 max-sm:translate-y-0 max-sm:rounded-none max-sm:rounded-t-2xl max-sm:border-x-0 max-sm:border-b-0 max-sm:px-4 max-sm:pb-[max(calc(var(--spacing)*4),env(safe-area-inset-bottom))] max-sm:[&_[data-slot=button]]:h-(--size-control-touch) max-sm:[&_[data-slot=button]]:w-full",phoneFullScreen:"max-sm:top-0 max-sm:left-0 max-sm:h-dvh max-sm:max-w-full max-sm:translate-x-0 max-sm:translate-y-0 max-sm:content-start max-sm:overflow-y-auto max-sm:rounded-none max-sm:border-0"};e.s(["dialogSurface",0,t])},36651,e=>{"use strict";var t=e.i(43476),a=e.i(90063);e.s(["Kbd",0,function({className:e,...r}){return(0,t.jsx)("kbd",{"data-slot":"kbd",className:(0,a.classNames)("inline-flex h-5 min-w-5 shrink-0 items-center justify-center rounded-xs border border-border bg-muted px-1.25 font-sans text-micro font-medium text-muted-foreground max-sm:hidden",e),...r})}])},91727,e=>{"use strict";var t=e.i(43476),a=e.i(90063);e.s(["Label",0,function({className:e,htmlFor:r,...n}){return(0,t.jsx)("label",{"data-slot":"label",htmlFor:r,className:(0,a.classNames)("text-body font-medium text-foreground select-none",e),...n})}])},19321,e=>{"use strict";var t=e.i(43476),a=e.i(90063);e.s(["Skeleton",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"skeleton","aria-hidden":!0,className:(0,a.classNames)("animate-pulse rounded-sm bg-secondary [animation-duration:var(--duration-pulse)] motion-reduce:animate-none",e),...r})}])},75867,e=>{"use strict";var t=e.i(43476);e.s([],24305),e.i(24305);var a=e.i(71645),r=e.i(51437),n=e.i(28918),i=e.i(46376),l=e.i(2077),s=e.i(56789),o=e.i(52245),d=e.i(88015),u=e.i(40886),c=e.i(33332);let m=a.createContext(void 0),f={...e.i(75812).fieldValidityMapping,checked:e=>e?{"data-checked":""}:{"data-unchecked":""}};var h=e.i(64350),p=e.i(69690),x=e.i(81104),b=e.i(84708),g=e.i(47778),v=e.i(31421),y=e.i(38489),j=e.i(75606),k=e.i(56434),z=e.i(6039);let w=a.forwardRef(function(e,c){let{checked:w,className:N,defaultChecked:S,"aria-labelledby":I,form:R,id:C,inputRef:A,name:M,nativeButton:O=!1,onCheckedChange:D,readOnly:T=!1,required:E=!1,disabled:L=!1,render:B,uncheckedValue:V,value:P,style:q,...K}=e,{clearErrors:$}=(0,b.useFormContext)(),{state:F,setTouched:_,setDirty:H,validityData:U,setFilled:W,setFocused:Q,validationMode:G,disabled:J,name:X,validation:Y}=(0,p.useFieldRootContext)(),{labelId:Z}=(0,g.useLabelableContext)(),ee=J||L,et=X??M,ea=a.useRef(null),er=(0,n.useMergedRefs)(ea,A,Y.inputRef),en=a.useRef(null),ei=(0,d.useBaseUiId)(),el=(0,y.useLabelableId)({id:C}),es=O?void 0:el,[eo,ed]=(0,r.useControlled)({controlled:w,default:!!S,name:"Switch",state:"checked"});(0,x.useRegisterFieldControl)(en,ei,eo,void 0,!ee,M),(0,i.useIsoLayoutEffect)(()=>{W(eo)},[eo,W]),(0,z.useValueChanged)(eo,()=>{$(et),H(eo!==U.initialValue),Y.change(eo)});let{getButtonProps:eu,buttonRef:ec}=(0,u.useButton)({disabled:ee,native:O}),em=(0,v.useAriaLabelledBy)(I,Z,ea,!O,es),ef={...Y.getValidationProps(ee),checked:eo,disabled:ee,form:R,id:es,name:et,required:E,style:et?l.visuallyHiddenInput:l.visuallyHidden,tabIndex:-1,type:"checkbox","aria-hidden":!0,ref:er,onChange(e){if(e.nativeEvent.defaultPrevented)return;if(T)return void e.preventDefault();let t=e.currentTarget.checked,a=(0,j.createChangeEventDetails)(k.REASONS.none,e.nativeEvent);D?.(t,a),a.isCanceled||ed(t)},onClick(e){e.stopPropagation()},onFocus(){en.current?.focus()},...void 0!==P?{value:P}:s.EMPTY_OBJECT},eh=a.useMemo(()=>({...F,checked:eo,disabled:ee,readOnly:T,required:E}),[F,eo,ee,T,E]),ep=(0,o.useRenderElement)("span",e,{state:eh,ref:[c,en,ec],props:[{id:O?el:ei,role:"switch","aria-checked":eo,"aria-readonly":T||void 0,"aria-required":E||void 0,"aria-labelledby":em,onFocus(){ee||Q(!0)},onBlur(){let e=ea.current;e&&!ee&&(_(!0),Q(!1),"onBlur"===G&&Y.commit(e.checked))},onClick(e){if(T||ee)return;e.preventDefault();let t=ea.current;t&&(0,h.dispatchClickWithModifiers)(t,e)}},K,eu,e=>Y.getValidationProps(ee,e)],stateAttributesMapping:f});return(0,t.jsxs)(m.Provider,{value:eh,children:[ep,!eo&&et&&void 0!==V&&(0,t.jsx)("input",{type:"hidden",form:R,name:et,value:V,disabled:ee}),(0,t.jsx)("input",{...ef,suppressHydrationWarning:!0})]})}),N=a.forwardRef(function(e,t){let{render:r,className:n,style:i,...l}=e,s=function(){let e=a.useContext(m);if(void 0===e)throw Error((0,c.default)(63));return e}();return(0,o.useRenderElement)("span",e,{state:s,ref:t,stateAttributesMapping:f,props:l})});e.s(["Root",0,w,"Thumb",0,N],50994);var S=e.i(50994),S=S,I=e.i(90063);e.s(["Switch",0,function({className:e,...a}){return(0,t.jsx)(S.Root,{"data-slot":"switch",className:(0,I.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),...a,children:(0,t.jsx)(S.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)},67874,e=>{"use strict";var t=e.i(43476),a=e.i(90063);e.s(["EmptyState",0,function({title:e,description:r,icon:n,action:i,variant:l="page",className:s}){return"section"===l?(0,t.jsxs)("p",{"data-slot":"empty-state","data-variant":l,className:(0,a.classNames)("rounded-lg border border-border px-4 py-3 text-center text-meta text-muted-foreground",s),children:[e,r?(0,t.jsxs)(t.Fragment,{children:[" ",r]}):null]}):"no-results"===l?(0,t.jsxs)("div",{"data-slot":"empty-state","data-variant":l,className:(0,a.classNames)("flex flex-col items-center gap-2.5 rounded-lg border border-border bg-card px-4 py-6 text-center",s),children:[(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:e}),i]}):(0,t.jsxs)("div",{"data-slot":"empty-state","data-variant":l,className:(0,a.classNames)("flex flex-col items-center gap-3 rounded-lg border border-dashed border-border bg-card px-6 py-10 text-center",s),children:[n?(0,t.jsx)("span",{"aria-hidden":!0,className:"flex size-10 items-center justify-center rounded-lg border border-border bg-muted text-muted-foreground [&_svg]:size-(--size-icon-xl)",children:n}):null,(0,t.jsx)("h2",{className:"text-heading font-semibold text-foreground max-sm:text-heading-touch",children:e}),r?(0,t.jsx)("p",{className:"max-w-96 text-meta text-muted-foreground max-sm:text-body-touch",children:r}):null,i?(0,t.jsx)("div",{className:"mt-1 max-sm:w-full max-sm:[&>*]:w-full",children:i}):null]})}])},17981,e=>{"use strict";var t=e.i(43476),a=e.i(22768),r=e.i(36518),n=e.i(25398),i=e.i(90063),l=e.i(15905);e.s(["InlineError",0,function({title:e,description:s,detail:o,onRetry:d,variant:u="section",id:c,className:m}){return"field"===u?(0,t.jsxs)("p",{id:c,"data-slot":"inline-error","data-variant":u,className:(0,i.classNames)("flex items-center gap-1.5 text-meta text-destructive-text [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0",m),children:[(0,t.jsx)(a.CircleAlert,{"aria-hidden":!0}),e]}):"section"===u?(0,t.jsxs)("div",{role:"alert","data-slot":"inline-error","data-variant":u,className:(0,i.classNames)("flex gap-2 rounded-lg border border-tone-attention-border bg-tone-attention-bg p-3 text-tone-attention-fg",m),children:[(0,t.jsx)(a.CircleAlert,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon) shrink-0"}),(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("p",{className:"text-body font-medium",children:e}),s?(0,t.jsx)("p",{className:"text-meta text-foreground",children:s}):null,d?(0,t.jsx)(l.Button,{size:"xs",icon:(0,t.jsx)(n.RotateCw,{"aria-hidden":!0}),onClick:d,className:"self-start",children:"Try again"}):null]})]}):(0,t.jsxs)("div",{role:"alert","data-slot":"inline-error","data-variant":u,className:(0,i.classNames)("flex flex-col items-center gap-3 rounded-lg border border-border bg-card px-6 py-10 text-center",m),children:[(0,t.jsx)("span",{"aria-hidden":!0,className:"flex size-10 items-center justify-center rounded-lg border border-tone-attention-border bg-tone-attention-bg text-tone-attention-fg [&_svg]:size-(--size-icon-xl)",children:(0,t.jsx)(r.CloudOff,{})}),(0,t.jsx)("h2",{className:"text-heading font-semibold text-foreground max-sm:text-heading-touch",children:e}),s?(0,t.jsx)("p",{className:"max-w-96 text-meta text-muted-foreground max-sm:text-body-touch",children:s}):null,o?(0,t.jsx)("code",{className:"rounded-sm border border-border bg-muted px-2 py-0.5 font-mono text-id text-muted-foreground",children:o}):null,d?(0,t.jsx)("div",{className:"flex items-center gap-2 max-sm:w-full max-sm:flex-col",children:(0,t.jsx)(l.Button,{size:"sm",icon:(0,t.jsx)(n.RotateCw,{"aria-hidden":!0}),onClick:d,className:"max-sm:w-full",children:"Try again"})}):null]})}])},95960,e=>{"use strict";var t=e.i(43476),a=e.i(92150),r=e.i(49287),n=e.i(86875),i=e.i(56420);let l={name:"tag-x",size:24,node:[["path",{d:"m16.5 6.5-3.914-3.914A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.43 2.43 0 0 0 3.42 0l1.79-1.79",key:"hu94c9"}],["path",{d:"m16.5 10.5 5 5",key:"1jo8bf"}],["path",{d:"m21.5 10.5-5 5",key:"jzei60"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]};l.node;let s=(0,i.default)(l);var o=e.i(63676),d=e.i(90063),u=e.i(80581);let c={"trierarch-plugin":n.ShipWheel,squadrons:a.Boxes,ship:r.Ship,gone:s};e.s(["LabelChip",0,function({chip:e,onRemove:a,testId:r,className:n,trailing:i,meaning:l}){let s="none"===e.mark?null:c[e.mark],m=`${e.key}=${e.value}`,f=void 0===l?(0,u.chipTitleOf)(e):`${(0,u.chipTitleOf)(e)}. ${l}`;return(0,t.jsxs)("span",{role:"group","aria-label":f,"data-slot":"label-chip","data-testid":r,title:f,className:(0,d.classNames)("inline-flex h-5.5 max-w-full min-w-0 shrink-0 items-center gap-1 rounded-sm border border-border bg-secondary px-1.5 font-mono text-id whitespace-nowrap text-foreground [&_svg]:size-3 [&_svg]:shrink-0 [&_svg]:text-muted-foreground","gone"===e.mark?"border-dashed":null,n),children:[null===s?null:(0,t.jsx)(s,{"aria-hidden":!0}),(0,t.jsxs)("span",{className:"truncate",children:[(0,t.jsxs)("span",{className:"text-muted-foreground",children:[e.key,"="]}),(0,t.jsx)("span",{className:"font-medium",children:e.value})]}),i,void 0===a?null:(0,t.jsx)("button",{type:"button","aria-label":`Remove ${m}`,onClick:a,className:"-mr-1 ml-0.5 inline-flex size-4 items-center justify-center rounded-xs text-muted-foreground hover:bg-accent hover:text-foreground focus-visible:outline-2 focus-visible:outline-ring",children:(0,t.jsx)(o.X,{"aria-hidden":!0})})]})}],95960)},88393,e=>{"use strict";var t=e.i(43476),a=e.i(90063),r=e.i(19321);function n(e){return Array.from({length:e},(e,t)=>`row-${String(t)}`)}e.s(["LoadingSkeleton",0,function({variant:e,rows:i=4,label:l="Loading",className:s}){return(0,t.jsxs)("div",{role:"status","data-slot":"loading-skeleton","data-variant":e,className:(0,a.classNames)("w-full",s),children:[(0,t.jsx)("span",{className:"sr-only",children:l}),"table"===e?(0,t.jsxs)("div",{className:"overflow-hidden rounded-lg border border-border bg-card shadow-sm",children:[(0,t.jsx)("div",{className:"h-(--size-row-header) border-b border-border bg-muted"}),n(i).map(e=>(0,t.jsxs)("div",{className:"flex h-(--size-row) items-center gap-8 border-b border-border px-4 last:border-0",children:[(0,t.jsx)(r.Skeleton,{className:"h-2.5 w-24"}),(0,t.jsx)(r.Skeleton,{className:"h-5 w-16"}),(0,t.jsx)(r.Skeleton,{className:"h-5 w-20"}),(0,t.jsx)(r.Skeleton,{className:"h-2.5 w-28"})]},e))]}):null,"cards"===e?(0,t.jsx)("div",{className:"grid grid-cols-2 gap-3 lg:grid-cols-4",children:n(4).map(e=>(0,t.jsxs)("div",{className:"flex flex-col gap-3 rounded-lg border border-border bg-card p-4",children:[(0,t.jsx)(r.Skeleton,{className:"h-2.5 w-20"}),(0,t.jsx)(r.Skeleton,{className:"h-6 w-10"}),(0,t.jsx)(r.Skeleton,{className:"h-2.5 w-28"})]},e))}):null,"detail"===e?(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,t.jsx)(r.Skeleton,{className:"h-7 w-48"}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(r.Skeleton,{className:"h-5 w-20"}),(0,t.jsx)(r.Skeleton,{className:"h-5 w-16"})]}),(0,t.jsx)(r.Skeleton,{className:"h-16 w-full rounded-lg"})]}):null,"list"===e?(0,t.jsx)("div",{className:"overflow-hidden rounded-lg border border-border bg-card",children:n(i).map(e=>(0,t.jsxs)("div",{className:"flex flex-col gap-2.5 border-b border-border px-3.5 py-3 last:border-0",children:[(0,t.jsxs)("div",{className:"flex justify-between",children:[(0,t.jsx)(r.Skeleton,{className:"h-3 w-28"}),(0,t.jsx)(r.Skeleton,{className:"h-5 w-16"})]}),(0,t.jsx)(r.Skeleton,{className:"h-2.5 w-44"})]},e))}):null]})}])},77880,85538,e=>{"use strict";var t=e.i(43476),a=e.i(67927),r=e.i(66595),n=e.i(19759),i=e.i(22016),l=e.i(15905),s=e.i(36651),o=e.i(90063);let d={live:{label:"Live",dot:"bg-tone-ok-fg"},reconnecting:{label:"Reconnecting",dot:"bg-tone-waiting-fg"},offline:{label:"Offline",dot:"bg-tone-attention-fg"}};function u({state:e,className:a}){let{label:r,dot:n}=d[e];return(0,t.jsxs)("span",{"data-slot":"live-status","data-state":e,"aria-live":"polite",className:(0,o.classNames)("inline-flex items-center gap-1.5 text-meta text-muted-foreground",a),children:[(0,t.jsx)("span",{"aria-hidden":!0,className:(0,o.classNames)("size-2 shrink-0 rounded-full",n)}),r]})}e.s(["Header",0,function({breadcrumb:e,parents:o=[],live:d,onCompose:c,onSearch:m}){return(0,t.jsxs)("header",{"data-slot":"header",className:"sticky top-0 z-30 hidden h-(--size-header) shrink-0 items-center justify-between gap-4 border-b border-border bg-background px-6 sm:flex",children:[(0,t.jsx)("nav",{"aria-label":"Breadcrumb","data-testid":"header-breadcrumb",className:"min-w-0 text-body",children:(0,t.jsxs)("ol",{className:"flex min-w-0 items-center gap-1.5",children:[o.map(e=>(0,t.jsxs)("li",{className:"flex shrink-0 items-center gap-1.5",children:[(0,t.jsx)(i.default,{href:e.href,className:"text-muted-foreground hover:text-foreground hover:underline",children:e.label}),(0,t.jsx)(a.ChevronRight,{"aria-hidden":!0,className:"size-3.5 text-muted-foreground"})]},e.href)),(0,t.jsx)("li",{"aria-current":"page",className:"truncate font-medium text-foreground",children:e})]})}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(u,{state:d}),m?(0,t.jsxs)(l.Button,{size:"sm",icon:(0,t.jsx)(r.Search,{"aria-hidden":!0}),"data-testid":"header-search",className:"w-60 justify-start font-normal text-muted-foreground",onClick:m,children:[(0,t.jsx)("span",{className:"grow text-left",children:"Search ships or jump to"}),(0,t.jsx)(s.Kbd,{children:"⌘K"})]}):null,c?(0,t.jsx)(l.Button,{size:"sm",icon:(0,t.jsx)(n.SquarePen,{"aria-hidden":!0}),"data-testid":"header-compose",onClick:c,children:"Compose"}):null]})]})}],77880);var c=e.i(24071),m=e.i(57957);e.s(["TopBar",0,function({title:e,live:a,actions:n,back:s,account:o,onSearch:d}){let f=d&&!s?d:void 0;return(0,t.jsxs)("header",{"data-slot":"top-bar","data-mode":s?"detail":"root",className:"sticky top-0 z-30 flex h-(--size-header) items-center gap-2.5 border-b border-border bg-background px-4 sm:hidden",children:[s?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(i.default,{href:s.href,className:"-ml-1.5 inline-flex h-(--size-control-touch) shrink-0 items-center gap-0.5 rounded-md pr-2 text-body-touch text-foreground focus-visible:outline-2 focus-visible:outline-ring [&_svg]:size-(--size-icon)",children:[(0,t.jsx)(c.ChevronLeft,{"aria-hidden":!0}),s.label]}),(0,t.jsx)("p",{className:"min-w-0 flex-1 truncate text-center text-body-touch font-semibold text-foreground",children:e})]}):(0,t.jsx)("h1",{className:"truncate text-title-touch font-semibold tracking-tight text-foreground",children:e}),(0,t.jsx)(u,{state:a}),n||f||o&&!s?(0,t.jsxs)("div",{className:"ml-auto flex items-center gap-1",children:[f?(0,t.jsx)(l.Button,{variant:"ghost",size:"touch",isIconOnly:!0,"aria-label":"Search ships or jump to","data-testid":"top-bar-search",onClick:f,children:(0,t.jsx)(r.Search,{"aria-hidden":!0})}):null,n,o&&!s?(0,t.jsx)(m.AccountMenuSheet,{...o}):null]}):null]})}],85538)},77821,e=>{"use strict";var t=e.i(43476),a=e.i(19759),r=e.i(15905),n=e.i(77880),i=e.i(85538);e.s(["ListPage",0,function({title:e,description:l,titleMeta:s,primaryAction:o,toolbar:d,live:u,onCompose:c,onSearch:m,account:f,banner:h,phoneTopBar:p,children:x}){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.Header,{breadcrumb:e,live:u,onCompose:c,onSearch:m}),h,p??(0,t.jsx)(i.TopBar,{title:e,live:u,account:f,onSearch:m,actions:c?(0,t.jsx)(r.Button,{variant:"ghost",size:"touch",isIconOnly:!0,"aria-label":"Compose","data-testid":"top-bar-compose",onClick:c,children:(0,t.jsx)(a.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}),s]}),l?(0,t.jsx)("p",{className:"text-meta text-muted-foreground max-sm:text-body-touch",children:l}):null]}),o?(0,t.jsx)("div",{className:"shrink-0 max-sm:w-full max-sm:[&>*]:w-full",children:o}):null]}),d,x]})]})}])},18423,e=>{"use strict";var t=e.i(12598),a=e.i(5861),r=e.i(71645),n=e.i(86413),i=e.i(27702);let l=new Set(["FleetInitialised","ShipCommissioned","ShipClaimed","LeaseRevoked","CredentialRevoked","StartingPromptIssued","ShipRetired","DeliveryAcknowledged","DeliveryUndeliverable","ShipReported","CrewRequested","CrewRequestRemoved","CrewAssigned","CrewStatusChanged","CrewRequestExplained","CrewRequestGivenBack","LabelAssigned","LabelUnassigned","LabelRetired"]);async function s(e,t){await e.cancelQueries({queryKey:t,predicate:e=>void 0===e.state.data&&"fetching"===e.state.fetchStatus}),await e.invalidateQueries({queryKey:t})}let o=new Set(["LabelDefined","LabelValuesChanged","LabelRetired","LabelAssigned","LabelUnassigned","LabelDeleted"]),d=new Set(["DeliveryUndeliverable","DeliveryNotHandled","DeliveryDismissed"]);e.s(["useLiveFleet",0,function(){let e=(0,i.useTRPC)(),u=(0,t.useQueryClient)(),[c,m]=(0,r.useState)(new Set),f=e=>{s(u,e)},h=(0,a.useSubscription)(e.fleet.events.subscriptionOptions({lastEventId:null},{onData:({data:t})=>{var a,r,i,s;if("resync"===t.kind){f(e.fleet.pathKey()),f(n.INBOX_KEY);return}let{event:u}=t;for(let t of new Set([u.shipId,u.actorShipId]))null!==t&&(f(e.fleet.ship.queryKey({shipId:t})),f(e.fleet.shipTimeline.queryKey({shipId:t})),f(e.fleet.shipWay.queryKey({shipId:t})));if(null!==u.messageId&&(f(e.fleet.shipMessages.pathKey()),f(e.fleet.shipWay.pathKey()),f(e.fleet.message.queryKey({messageId:u.messageId})),f(e.fleet.inbox.pathKey()),f(n.INBOX_KEY),f(e.fleet.health.queryKey())),a=u.type,d.has(a)&&f(e.fleet.needsAttention.queryKey()),r=u.type,o.has(r)&&f(e.fleet.labels.queryKey()),"NetworkRulesDeclared"===u.type&&f(e.fleet.declaredNetworkRules.queryKey()),("BuiltInRuleChanged"===(i=u.type)||"NetworkPluginUnregistered"===i)&&f(e.fleet.builtInRules.queryKey()),s=u.type,!l.has(s))return;f(e.fleet.list.queryKey()),f(e.fleet.health.queryKey());let{shipId:c}=u;"ShipCommissioned"===u.type&&null!==c&&m(e=>new Set([...e,c]))}}));return{live:function(e){switch(e){case"pending":return"live";case"connecting":return"reconnecting";case"idle":case"error":return"offline"}}(h.status),newShipIds:c,error:h.error}}])},28459,e=>{"use strict";var t=e.i(54616),a=e.i(66027),r=e.i(12598),n=e.i(27702);function i(e){let t=String(e.attempts-1);return e.isPushed?`Handed ${t} times, never confirmed; fifth refused: undeliverable.`:`Handed (pulled) ${t} times, never acknowledged; fifth receive refused: undeliverable.`}let l="Acknowledged, then its turn died; handed once more, and that turn died too: not handled.";function s(){let e=(0,n.useTRPC)(),t=(0,r.useQueryClient)();return()=>t.invalidateQueries({queryKey:e.fleet.pathKey()})}e.s(["DISMISSED_TOAST",0,{title:"Delivery dismissed",description:"It stays in the timelines as dismissed."},"attentionReason",0,function(e){switch(e.state){case"undeliverable":return i(e);case"notHandled":return null===e.reason?l:`${l} Its crew said: ${e.reason}.`}},"canResend",0,function(e){return!e.message.isPing},"deliveryWithId",0,function(e,t){return e?.find(e=>e.deliveryId===t)},"resentToast",0,function(e){return{title:"Message resent",description:`A new message went to ${function(e){let{recipient:t}=e.message;return"ship"===t.kind?t.ship.name:`any ship of type ${t.type}`}(e)}. The original is dismissed.`}},"undeliverableReason",0,i,"useDismissDelivery",0,function(){let e=(0,n.useTRPC)(),a=s();return(0,t.useMutation)(e.fleet.dismiss.mutationOptions({onSuccess:a}))},"useNeedsAttention",0,function(){let e=(0,n.useTRPC)();return(0,a.useQuery)(e.fleet.needsAttention.queryOptions())},"useResendDelivery",0,function(){let e=(0,n.useTRPC)(),a=s();return(0,t.useMutation)(e.fleet.resend.mutationOptions({onSuccess:a}))}])},37338,11514,e=>{"use strict";var t=e.i(81307),a=e.i(83615);let r=t.z.string(),n=t.z.object({id:(0,a.idSchema)("labelValue"),value:t.z.string()}),i=t.z.object({labelId:(0,a.idSchema)("label"),key:t.z.string(),valueId:(0,a.idSchema)("labelValue"),value:t.z.string()});t.z.object({valueIds:t.z.array((0,a.idSchema)("labelValue")).optional()}).optional(),t.z.object({key:r,values:t.z.array(r)}),t.z.object({labelId:(0,a.idSchema)("label"),values:t.z.array(n)}),t.z.object({labelId:(0,a.idSchema)("label"),values:t.z.array(r)}),t.z.object({values:t.z.array(n)}),t.z.object({labelId:(0,a.idSchema)("label")}),t.z.object({key:r,value:r}),t.z.object({labelId:(0,a.idSchema)("label"),valueId:(0,a.idSchema)("labelValue")}),t.z.object({shipId:(0,a.idSchema)("ship"),valueId:(0,a.idSchema)("labelValue")}),t.z.object({});let l=t.z.object({id:(0,a.idSchema)("label"),key:t.z.string(),values:t.z.array(n),owner:t.z.object({id:(0,a.idSchema)("ship"),name:t.z.string()})});t.z.array(l);let s=t.z.union([(0,a.idSchema)("labelValue"),t.z.object({labelId:(0,a.idSchema)("label"),value:t.z.enum(["*","#"])}),t.z.object({owner:t.z.union([(0,a.idSchema)("ship"),t.z.enum(["*","#"])])})]);function o(e){return"string"!=typeof e&&"owner"in e}let d=t.z.array(s),u=["send","read","manage"],c=t.z.object({verb:t.z.enum(u),from:d,to:d});t.z.object({rules:t.z.array(c)});let m=["argo","owner","answer","pluginRead","viewerRead","open"];t.z.object({rule:t.z.enum(m),verb:t.z.enum(u).optional(),isOn:t.z.boolean()}).refine(e=>"open"===e.rule==(void 0!==e.verb),{message:"open names its verb, and no other built-in rule names one",path:["verb"]});let f=t.z.union([t.z.object({rule:t.z.enum(["argo","owner","answer","pluginRead","viewerRead"]),isOn:t.z.boolean()}),t.z.object({rule:t.z.literal("open"),verb:t.z.enum(u),isOn:t.z.boolean()})]);t.z.array(f),t.z.object({shipId:(0,a.idSchema)("ship"),registeredAt:t.z.iso.datetime()}).nullable(),t.z.object({version:t.z.int().min(1)}),t.z.object({rules:t.z.array(c)}),t.z.object({rules:t.z.int().min(0)}),t.z.array(t.z.object({shipId:(0,a.idSchema)("ship"),rules:t.z.array(c)})),t.z.object({whileUnavailable:t.z.enum(["block-all","open-all","keep-latest"]),notRespondingAfterSeconds:t.z.int().min(60).max(86400)});let h=t.z.object({id:(0,a.idSchema)("ship"),name:t.z.string(),labels:t.z.array(i),owner:t.z.object({id:(0,a.idSchema)("ship"),name:t.z.string()}).nullable()}),p=t.z.object({id:(0,a.idSchema)("reachRefusal"),at:t.z.iso.datetime(),sender:h,askedBy:h.nullable(),recipient:t.z.discriminatedUnion("kind",[t.z.object({kind:t.z.literal("ship"),ship:h}),t.z.object({kind:t.z.literal("type"),type:t.z.string(),ships:t.z.array(h)})]),verb:t.z.enum(u),settingsVersion:t.z.int().min(1),whilePluginUnavailable:t.z.enum(["block-all","keep-latest"]).nullable()});t.z.array(p),t.z.object({fromShipId:(0,a.idSchema)("ship"),toShipId:(0,a.idSchema)("ship").optional()});let x=t.z.union([t.z.object({builtIn:t.z.enum(m)}),t.z.object({plugin:t.z.int().min(0)}),t.z.object({declared:(0,a.idSchema)("ship"),index:t.z.int().min(0)})]),b=t.z.array(t.z.object({shipId:(0,a.idSchema)("ship"),rule:x}));t.z.object({send:b,read:b,manage:b}),e.s(["NETWORK_VERBS",0,u,"isOwnerTerm",0,o],11514);var g=e.i(80581);function v(e){return"all-to-all"===e.kind?null:e.rules.map(e=>({verb:e.verb,from:[...e.from],to:[...e.to]}))}function y(e,t){return"all-to-all"===e.kind?e:{kind:"rules",rules:e.rules.map(e=>e.key===t.key?t.change(e):e)}}function j(e,t){return k(e)===k(t)}function k(e){return"string"==typeof e?e:o(e)?`owner=${e.owner}`:`${e.labelId}=${e.value}`}function z(e,t){let a=e["from"===t?"to":"from"];return e[t].filter(e=>"string"!=typeof e&&!o(e)&&"#"===e.value&&!a.some(t=>j(t,e)))}function w(e,t){let a=e=>e.some(e=>o(e)&&"#"===e.owner);return a(e[t])&&!a(e["from"===t?"to":"from"])}e.s(["OWNER_TERM_MEANINGS",0,{"*":"Any owner","#":"The same owner as the other side"},"TERM_MEANINGS",0,{"*":"Any value","#":"The same value as the other side"},"VERB_WORDS",0,{send:"May send to",read:"May read",manage:"May manage"},"addRule",0,function(e,t){return"all-to-all"===e.kind||e.rules.length>=t.limits.rulesMax?e:{kind:"rules",rules:[...e.rules,{key:t.newKey(),verb:"send",from:[],to:[]}]}},"addTerm",0,function(e,t){return y(e,{key:t.rule,change:e=>{let a=e[t.side];return a.some(e=>j(e,t.term))||a.length>=t.limits.selectorMax?e:{...e,[t.side]:[...a,t.term]}}})},"draftOf",0,function(e,t){return null===e?{kind:"all-to-all"}:{kind:"rules",rules:e.map(e=>({key:t(),verb:e.verb,from:[...e.from],to:[...e.to]}))}},"hasSameValueOnOneSide",0,function(e){return"rules"===e.kind&&e.rules.some(e=>z(e,"from").length+z(e,"to").length>0||w(e,"from")||w(e,"to"))},"isChanged",0,function(e,t){return JSON.stringify(v(e))!==JSON.stringify(t)},"ownerChoicesOf",0,function(e){return e.ships.filter(e=>("operator"===e.kind||"person"===e.kind)&&"retired"!==e.status).map(e=>({shipId:e.id,name:e.name}))},"removeRule",0,function(e,t){return"all-to-all"===e.kind?e:{kind:"rules",rules:e.rules.filter(e=>e.key!==t)}},"removeTerm",0,function(e,t){return y(e,{key:t.rule,change:e=>({...e,[t.side]:e[t.side].filter(e=>!j(e,t.term))})})},"rulesOf",0,v,"sameValueProblemOf",0,function(e,t){let[a]=z(e,t.side);if(void 0===a)return w(e,t.side)?"owner=# needs owner=# on the other side: # matches the same owner there.":void 0;let r=t.context.labels.find(e=>e.id===a.labelId)?.key??a.labelId;return`${r}=# needs ${r}=# on the other side: # matches the same value there.`},"selectorOf",0,function(e,t){let a=[],r=[],n=[];for(let i of e){if(o(i)){let e=function(e,t){if("*"===e.owner||"#"===e.owner)return{term:e,text:`owner=${e.owner}`};let a=t.ships.find(t=>t.id===e.owner);return void 0===a?void 0:{term:e,text:`owner=${a.name}`}}(i,t);void 0===e?n.push(i):r.push(e);continue}let e=function(e,t){if("string"==typeof e){let[a]=(0,g.pickedChips)([e],t);return void 0===a?void 0:{labelId:a.labelId,key:a.key,value:a.value,mark:a.mark,ownerName:a.ownerName,term:e}}let a=t.labels.find(t=>t.id===e.labelId);if(void 0===a)return;let r=t.ownerOf.get(a.id);return{labelId:a.id,key:a.key,value:e.value,mark:r?.mark??"ship",ownerName:r?.name??a.owner.name,term:e}}(i,t);void 0===e?n.push(i):a.push(e)}return{chips:a,owners:r,unknown:n}},"setRulesOn",0,function(e,t){return t?"rules"===e.kind?e:{kind:"rules",rules:[]}:{kind:"all-to-all"}},"setVerb",0,function(e,t){return y(e,{key:t.rule,change:e=>({...e,verb:t.verb})})},"supplyNote",0,function(e){switch(e){case"supplied":return"Saved. The fleet enforces them from now on.";case"waiting":return"Saved. The fleet does not answer yet: the networking plugin supplies them as soon as it does.";case"not-connected":case"unregistered":return"Saved."}},"termKeyOf",0,k],37338)}]);
|
package/.next/standalone/packages/console/.next/static/chunks/{2n_dccp7oi2ad.js → 3f5v4p3jz0k1g.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,92150,e=>{"use strict";var t=e.i(56420);let a={name:"boxes",size:24,node:[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]]};a.node;let s=(0,t.default)(a);e.s(["Boxes",0,s],92150)},94945,e=>{"use strict";let t={overlay:"fixed inset-0 isolate z-50 bg-overlay duration-(--duration-base) data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",popup:(0,e.i(25913).cva)("fixed top-1/2 left-1/2 z-50 grid max-h-[calc(100dvh-var(--spacing)*8)] w-full max-w-[calc(100%-var(--spacing)*8)] -translate-x-1/2 -translate-y-1/2 gap-4 overflow-y-auto rounded-xl border border-border bg-popover p-6 text-body text-popover-foreground shadow-lg duration-(--duration-base) outline-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 motion-reduce:data-open:zoom-in-100 motion-reduce:data-closed:zoom-out-100",{variants:{size:{sm:"sm:max-w-(--size-dialog-sm)",md:"sm:max-w-(--size-dialog-md)"}},defaultVariants:{size:"sm"}}),header:"flex flex-col gap-2",footer:"flex flex-col-reverse gap-2 pt-1 sm:flex-row sm:justify-end",title:"text-heading font-semibold text-foreground",description:"text-body text-muted-foreground",phoneSheet:"max-sm:top-auto max-sm:bottom-0 max-sm:left-0 max-sm:max-w-full max-sm:translate-x-0 max-sm:translate-y-0 max-sm:rounded-none max-sm:rounded-t-2xl max-sm:border-x-0 max-sm:border-b-0 max-sm:px-4 max-sm:pb-[max(calc(var(--spacing)*4),env(safe-area-inset-bottom))] max-sm:[&_[data-slot=button]]:h-(--size-control-touch) max-sm:[&_[data-slot=button]]:w-full",phoneFullScreen:"max-sm:top-0 max-sm:left-0 max-sm:h-dvh max-sm:max-w-full max-sm:translate-x-0 max-sm:translate-y-0 max-sm:content-start max-sm:overflow-y-auto max-sm:rounded-none max-sm:border-0"};e.s(["dialogSurface",0,t])},22212,e=>{"use strict";var t=e.i(43476),a=e.i(53753),s=e.i(90063),n=e.i(94945);e.s(["Dialog",0,function(e){return(0,t.jsx)(a.Dialog.Root,{"data-slot":"dialog",...e})},"DialogClose",0,function(e){return(0,t.jsx)(a.Dialog.Close,{"data-slot":"dialog-close",...e})},"DialogContent",0,function({className:e,size:r,children:i,...o}){return(0,t.jsxs)(a.Dialog.Portal,{children:[(0,t.jsx)(a.Dialog.Backdrop,{"data-slot":"dialog-overlay",className:n.dialogSurface.overlay}),(0,t.jsx)(a.Dialog.Popup,{"data-slot":"dialog-content",className:(0,s.classNames)(n.dialogSurface.popup({size:r}),e),...o,children:i})]})},"DialogDescription",0,function({className:e,...r}){return(0,t.jsx)(a.Dialog.Description,{"data-slot":"dialog-description",className:(0,s.classNames)(n.dialogSurface.description,e),...r})},"DialogFooter",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"dialog-footer",className:(0,s.classNames)(n.dialogSurface.footer,e),...a})},"DialogHeader",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"dialog-header",className:(0,s.classNames)(n.dialogSurface.header,e),...a})},"DialogTitle",0,function({className:e,...r}){return(0,t.jsx)(a.Dialog.Title,{"data-slot":"dialog-title",className:(0,s.classNames)(n.dialogSurface.title,e),...r})}])},43988,e=>{"use strict";var t=e.i(43476),a=e.i(25913),s=e.i(90063);let n=(0,a.cva)("w-full min-w-0 resize-none rounded-md border border-input bg-card px-3 py-2 text-foreground shadow-sm transition-[border-color,box-shadow] duration-(--duration-fast) outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/22 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/16 disabled:cursor-not-allowed disabled:bg-muted disabled:opacity-50 disabled:shadow-none",{variants:{size:{md:"text-body",touch:"rounded-lg text-input-touch"},isMono:{true:"font-mono",false:""}},compoundVariants:[{size:"md",isMono:!0,className:"text-code"}],defaultVariants:{size:"md",isMono:!1}});e.s(["Textarea",0,function({className:e,size:a,isMono:r,rows:i=4,...o}){return(0,t.jsx)("textarea",{"data-slot":"textarea",rows:i,className:(0,s.classNames)(n({size:a,isMono:r}),e),...o})}])},95960,e=>{"use strict";var t=e.i(43476),a=e.i(92150),s=e.i(49287),n=e.i(86875),r=e.i(56420);let i={name:"tag-x",size:24,node:[["path",{d:"m16.5 6.5-3.914-3.914A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.43 2.43 0 0 0 3.42 0l1.79-1.79",key:"hu94c9"}],["path",{d:"m16.5 10.5 5 5",key:"1jo8bf"}],["path",{d:"m21.5 10.5-5 5",key:"jzei60"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]};i.node;let o=(0,r.default)(i);var l=e.i(63676),d=e.i(90063),m=e.i(80581);let c={"trierarch-plugin":n.ShipWheel,squadrons:a.Boxes,ship:s.Ship,gone:o};e.s(["LabelChip",0,function({chip:e,onRemove:a,testId:s,className:n,trailing:r,meaning:i}){let o="none"===e.mark?null:c[e.mark],u=`${e.key}=${e.value}`,h=void 0===i?(0,m.chipTitleOf)(e):`${(0,m.chipTitleOf)(e)}. ${i}`;return(0,t.jsxs)("span",{role:"group","aria-label":h,"data-slot":"label-chip","data-testid":s,title:h,className:(0,d.classNames)("inline-flex h-5.5 max-w-full min-w-0 shrink-0 items-center gap-1 rounded-sm border border-border bg-secondary px-1.5 font-mono text-id whitespace-nowrap text-foreground [&_svg]:size-3 [&_svg]:shrink-0 [&_svg]:text-muted-foreground","gone"===e.mark?"border-dashed":null,n),children:[null===o?null:(0,t.jsx)(o,{"aria-hidden":!0}),(0,t.jsxs)("span",{className:"truncate",children:[(0,t.jsxs)("span",{className:"text-muted-foreground",children:[e.key,"="]}),(0,t.jsx)("span",{className:"font-medium",children:e.value})]}),r,void 0===a?null:(0,t.jsx)("button",{type:"button","aria-label":`Remove ${u}`,onClick:a,className:"-mr-1 ml-0.5 inline-flex size-4 items-center justify-center rounded-xs text-muted-foreground hover:bg-accent hover:text-foreground focus-visible:outline-2 focus-visible:outline-ring",children:(0,t.jsx)(l.X,{"aria-hidden":!0})})]})}],95960)},67858,e=>{e.v(t=>Promise.all(["static/chunks/20l4-ecv_oo2h.js","static/chunks/3vr80dn3nyqqi.js"].map(t=>e.l(t))).then(()=>t(59068)))},4032,e=>{"use strict";var t=e.i(43476),a=e.i(22768),s=e.i(74544),n=e.i(77071),r=e.i(63676),i=e.i(22016),o=e.i(71645),l=e.i(70703),d=e.i(78608),m=e.i(15905),c=e.i(6734),u=e.i(95960);let h=(0,l.default)(()=>e.A(67858).then(e=>e.LabelPicker),{loadableGenerated:{modules:[59068]},ssr:!1});function x({groups:e,picked:a,isDisabled:s,onAdd:r}){let[l,d]=(0,o.useState)(!1);return(0,t.jsxs)(c.Popover,{open:l,onOpenChange:d,children:[(0,t.jsx)(c.PopoverTrigger,{render:(0,t.jsx)(m.Button,{type:"button",variant:"ghost",size:"xs",icon:(0,t.jsx)(n.Plus,{}),disabled:s,"data-testid":"machine-labels-add"}),children:"Add label"}),(0,t.jsxs)(c.PopoverContent,{align:"start",sideOffset:6,className:"w-80 p-2","data-testid":"machine-labels-popover",children:[(0,t.jsx)("span",{className:"block px-2 pt-1 pb-2 text-body font-medium",children:"Machine label"}),(0,t.jsx)(h,{groups:e,pickedValueIds:a.map(e=>e.valueId),countWord:"machine",onPick:e=>{d(!1),r(e)}}),(0,t.jsxs)("p",{className:"mt-2 flex items-center justify-between gap-2 border-t border-border px-2 pt-2 text-meta text-muted-foreground",children:["Exact matches, all must hold.",(0,t.jsx)(i.default,{href:"/labels",className:"font-medium text-foreground hover:underline",children:"Manage labels"})]})]})]})}e.s(["MachineLabelsField",0,function({shipName:e,picked:n,groups:i,match:l,max:m,isDisabled:c,onAdd:h,onRemove:p,unknown:f=[],onRemoveUnknown:g}){let b=(0,d.noMatchWords)(n.length);return(0,t.jsxs)("div",{className:"flex flex-col gap-1.5","data-testid":"machine-labels",children:[(0,t.jsxs)("span",{className:"text-body font-medium",children:["Machine labels",(0,t.jsx)("span",{className:"font-normal text-muted-foreground",children:" optional"})]}),(0,t.jsxs)("div",{className:"flex min-h-(--size-control-sm) flex-wrap items-center gap-1.5",children:[0===n.length?(0,t.jsx)("span",{className:"text-meta text-muted-foreground",children:"Any machine"}):null,n.map((e,a)=>(0,t.jsxs)(o.Fragment,{children:[0===a?null:(0,t.jsx)("span",{className:"text-meta text-muted-foreground",children:"and"}),(0,t.jsx)(u.LabelChip,{chip:e,testId:"machine-label",...c?{}:{onRemove:()=>{p(e.valueId)}}})]},e.valueId)),f.map(e=>(0,t.jsxs)("span",{"data-testid":"machine-label-unknown",title:`${e}: not in this fleet`,className:"inline-flex h-5.5 items-center gap-1 rounded-sm border border-tone-attention-border bg-tone-attention-bg px-1.5 font-mono text-id text-tone-attention-fg [&_svg]:size-3",children:[(0,t.jsx)(a.CircleAlert,{"aria-hidden":!0}),e,void 0===g||c?null:(0,t.jsx)("button",{type:"button","aria-label":`Remove ${e}`,onClick:()=>{g(e)},className:"-mr-1 ml-0.5 inline-flex size-4 items-center justify-center rounded-xs hover:bg-accent focus-visible:outline-2 focus-visible:outline-ring",children:(0,t.jsx)(r.X,{"aria-hidden":!0})})]},e)),n.length+f.length>=m?null:(0,t.jsx)(x,{groups:i,picked:n,isDisabled:c,onAdd:h})]}),0===f.length?null:(0,t.jsxs)("p",{role:"alert","data-testid":"machine-labels-unknown-note",className:"text-meta text-tone-attention-fg",children:["Not in this fleet: ",f.join(", "),". Forming refuses ",1===f.length?"it":"them",": define ",1===f.length?"it":"them"," on the Labels page, or remove ",1===f.length?"it":"them"," here."]}),0===n.length?null:0===l.matching.length?(0,t.jsxs)("p",{role:"status","data-testid":"machine-labels-match",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 [&_svg]:mt-0.5 [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0",children:[(0,t.jsx)(s.Clock,{"aria-hidden":!0}),(0,t.jsxs)("span",{children:["No machine matches ",b.these,". You can still request: it waits on Needs crew until a machine ",b.carries,"."]})]}):(0,t.jsxs)("p",{className:"text-meta","data-testid":"machine-labels-match",children:["Matches ",l.matching.length," of ",l.total," ",1===l.total?"machine":"machines",": ",l.matching.join(", "),"."]}),(0,t.jsxs)("p",{className:"text-meta text-muted-foreground",children:["The plugin places ",e," only on a machine that carries every label here. Leave it empty for any machine."]})]})}])},92963,e=>{"use strict";var t=e.i(43476),a=e.i(10818),s=e.i(25398),n=e.i(71645),r=e.i(96994),i=e.i(84294),o=e.i(15905),l=e.i(22212),d=e.i(94945),m=e.i(91727),c=e.i(46033),u=e.i(14732),h=e.i(17981),x=e.i(16327),p=e.i(67927),f=e.i(85595),g=e.i(52886),b=e.i(90063),v=e.i(66616),j=e.i(12470),k=e.i(43988),y=e.i(4032);function w({id:e,label:a,isRequired:s,hint:n,children:r}){return(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsxs)(m.Label,{htmlFor:e,children:[a,(0,t.jsx)("span",{className:"font-normal text-muted-foreground",children:s?" required":" optional"})]}),r,void 0===n?null:(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:n})]})}function N({id:e,items:a,value:s,onPick:n,isDisabled:r,testId:i}){return(0,t.jsxs)(c.Select,{items:a,value:s,disabled:r,onValueChange:e=>{n("string"==typeof e?e:"")},children:[(0,t.jsx)(c.SelectTrigger,{id:e,"data-testid":i,children:(0,t.jsx)(c.SelectValue,{})}),(0,t.jsx)(c.SelectContent,{children:Object.entries(a).map(([e,a])=>(0,t.jsx)(c.SelectItem,{value:e,children:a},e))})]})}function C(e){return"string"==typeof e?e:JSON.stringify(e)}function S({member:e,offers:a,workspaces:s,machineLabels:i,isOpen:o,onOpenChange:l,isDisabled:d,error:m,onChange:c}){let u={workspace:(0,n.useId)(),harness:(0,n.useId)(),options:(0,n.useId)(),firstPrompt:(0,n.useId)(),parameters:(0,n.useId)()},D=(0,r.missingOf)(e),T=a.find(t=>t.harness===e.harness),z={"":"The trierarch’s default",...Object.fromEntries(a.map(e=>[e.harness,(0,v.harnessWord)(e.harness)])),...""===e.harness||T?{}:{[e.harness]:(0,v.harnessWord)(e.harness)}},F=new Set((T?.options??[]).map(e=>e.name)),q=Object.entries(e.options).filter(([e])=>!F.has(e)),I=o?x.ChevronDown:p.ChevronRight;return(0,t.jsxs)("section",{"aria-label":e.slot,"data-testid":"member-crew-section",className:(0,b.classNames)("flex flex-col rounded-lg border bg-card",void 0===m?"border-border":"border-tone-attention-border"),children:[(0,t.jsxs)("button",{type:"button","aria-expanded":o,"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:()=>{l(!o)},children:[(0,t.jsx)(I,{"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===D.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)(f.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)(g.CircleDashed,{"aria-hidden":!0}),"Needs ",D.join(", ")]})]}),void 0===m?null:(0,t.jsx)("div",{className:"px-3.5 pb-3",children:(0,t.jsx)(h.InlineError,{variant:"field",title:m})}),o?(0,t.jsxs)("div",{className:"flex flex-col gap-4 border-t border-border px-3.5 py-3.5",children:[(0,t.jsx)(w,{id:u.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)(N,{id:u.workspace,items:s,value:void 0===e.workspace?"":(0,r.workspaceItemOf)(e.workspace),isDisabled:d,testId:"member-crew-workspace",onPick:t=>{c({...e,workspace:(0,r.workspaceFromItem)(t)})}})}),(0,t.jsx)(w,{id:u.harness,label:"Harness",children:(0,t.jsx)(N,{id:u.harness,items:z,value:e.harness,isDisabled:d,testId:"member-crew-harness",onPick:t=>{c({...e,harness:t})}})}),(T?.options??[]).map((a,s)=>(0,t.jsx)(w,{id:`${u.options}-${String(s)}`,label:a.name,children:(0,t.jsx)(N,{id:`${u.options}-${String(s)}`,items:{"":"The trierarch’s default",...Object.fromEntries(a.values.map(e=>[e,e===a.defaultValue?`${e} (default)`:e])),..."string"==typeof e.options[a.name]&&!a.values.includes(C(e.options[a.name]))?{[C(e.options[a.name])]:C(e.options[a.name])}:{}},value:void 0===e.options[a.name]?"":C(e.options[a.name]),isDisabled:d,testId:"member-crew-option",onPick:t=>{let s=Object.fromEntries(Object.entries(e.options).filter(([e])=>e!==a.name));c({...e,options:""===t?s:{...s,[a.name]:t}})}})},a.name)),0===q.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:q.map(([e,a])=>(0,t.jsxs)("li",{className:"rounded-sm bg-secondary px-1.5 py-0.5 font-mono text-id",children:[e,"=",C(a)]},e))})]}),void 0===i?null:(0,t.jsx)(y.MachineLabelsField,{shipName:e.slot,picked:i.chipsOf(e.machineLabels),groups:i.groups,match:i.matchOf(e.machineLabels),max:i.max,isDisabled:d,unknown:e.unknownLabels,onAdd:t=>{c({...e,machineLabels:[...e.machineLabels,t]})},onRemove:t=>{c({...e,machineLabels:e.machineLabels.filter(e=>e!==t)})},onRemoveUnknown:t=>{c({...e,unknownLabels:e.unknownLabels.filter(e=>e!==t)})}}),(0,t.jsx)(w,{id:u.firstPrompt,label:"First prompt",hint:"The session starts with it, on its first start only.",children:(0,t.jsx)(k.Textarea,{id:u.firstPrompt,value:e.firstPrompt,disabled:d,"data-testid":"member-crew-first-prompt",rows:2,onChange:t=>{c({...e,firstPrompt:t.target.value})}})}),e.parameters.map((a,s)=>(0,t.jsx)(w,{id:`${u.parameters}-${String(s)}`,label:a.name,isRequired:!0,hint:a.description,children:(0,t.jsx)(j.Input,{id:`${u.parameters}-${String(s)}`,value:a.value,disabled:d,"aria-invalid":""===a.value.trim()||void 0,"data-testid":"member-crew-parameter",onChange:t=>{c({...e,parameters:e.parameters.map(e=>e.name===a.name?{...e,value:t.target.value}:e)})}})},a.name))]}):null]})}function D({drafts:e,crew:a,isPending:s,error:i,onBack:d,onSubmit:u}){let x=(0,n.useId)(),[p,f]=(0,n.useState)(()=>(0,r.membersOf)(e,a.context)),[g,b]=(0,n.useState)(()=>new Set((0,r.membersOf)(e,a.context).filter(e=>(0,r.missingOf)(e).length>0).map(e=>e.slot))),v=(0,r.workspaceItemsOf)(a.offers,p),{ready:j,total:k}=(0,r.readyCount)(p),y=j===k,w=void 0===i?void 0:(0,r.labelErrorSlot)(i,{members:p,context:a.context}),N=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,N&&Object.keys(v).length>0?(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)(m.Label,{htmlFor:x,children:"Workspace for every member without one"}),(0,t.jsxs)(c.Select,{items:{"":"Pick a workspace",...v},value:"",disabled:s,onValueChange:e=>{let t="string"==typeof e?(0,r.workspaceFromItem)(e):void 0;void 0!==t&&f(e=>(0,r.withWorkspaceForAll)(e,t))},children:[(0,t.jsx)(c.SelectTrigger,{id:x,"data-testid":"form-squadron-workspace-all",children:(0,t.jsx)(c.SelectValue,{})}),(0,t.jsx)(c.SelectContent,{children:Object.entries(v).map(([e,a])=>(0,t.jsx)(c.SelectItem,{value:e,children:a},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)(S,{member:e,offers:a.offers,workspaces:v,...void 0===a.machineLabels?{}:{machineLabels:a.machineLabels},isOpen:g.has(e.slot)||w===e.slot,onOpenChange:t=>{b(a=>{let s=new Set(a);return t?s.add(e.slot):s.delete(e.slot),s})},isDisabled:s,...w===e.slot&&void 0!==i?{error:i}:{},onChange:e=>{f(t=>t.map(t=>t.slot===e.slot?e:t))}},e.slot))}),void 0!==i&&void 0===w?(0,t.jsx)(h.InlineError,{variant:"field",title:"Couldn’t form the squadron",description:i}):null,(0,t.jsxs)(l.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:[j," of ",k," ",1===k?"member":"members"," ready"]}),(0,t.jsx)(o.Button,{type:"button",disabled:s,onClick:d,children:"Back"}),(0,t.jsx)(o.Button,{variant:"primary",isLoading:s,disabled:!y,"data-testid":"form-squadron-submit",onClick:()=>{u(p)},children:s?"Forming":"Form squadron"})]})]})}function T({blueprints:e,templates:r,isPending:d,error:x,onSubmit:p,initial:f,crew:g,onPicked:b}){let[v,j]=(0,n.useState)(1),[k,y]=(0,n.useState)(f?.key??e[0]?.key),w=e.find(e=>e.key===k)??e[0],[N,C]=(0,n.useState)(f?.version??w?.versions[0]?.version),S=w?.versions.find(e=>e.version===N)??w?.versions[0];if(!w||!S)return null;if(1===v){let a=Object.fromEntries(w.versions.map((e,t)=>[String(e.version),`v${String(e.version)}${0===t?" (latest)":""}`]));return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(l.DialogHeader,{children:[(0,t.jsx)(l.DialogTitle,{children:"Form a squadron"}),(0,t.jsx)(l.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 a=e.versions[0],s=e.key===w.key;return(0,t.jsxs)("button",{type:"button",role:"radio","aria-checked":s,"data-testid":"form-squadron-blueprint",onClick:()=>{y(e.key),C(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",a?.version,", latest"]})]}),(0,t.jsx)("span",{className:"text-meta text-muted-foreground",children:a?.description})]},e.key)})})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)(m.Label,{htmlFor:"form-squadron-version",children:"Version"}),(0,t.jsxs)(c.Select,{items:a,value:String(S.version),onValueChange:e=>{C(Number(e))},children:[(0,t.jsx)(c.SelectTrigger,{id:"form-squadron-version","aria-label":"Version",children:(0,t.jsx)(c.SelectValue,{})}),(0,t.jsx)(c.SelectContent,{children:Object.entries(a).map(([e,a])=>(0,t.jsx)(c.SelectItem,{value:e,children:a},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)(l.DialogFooter,{children:[(0,t.jsx)(l.DialogClose,{render:(0,t.jsx)(o.Button,{type:"button"}),children:"Cancel"}),(0,t.jsx)(o.Button,{variant:"primary","data-testid":"form-squadron-preview",onClick:()=>{b?.({repository:S.repository,name:S.name,version:S.version}),j(2)},children:void 0===g?"Preview roles":"Next: the members"})]})]})}let z={repository:S.repository,name:S.name,version:S.version};if(void 0!==g)return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(l.DialogHeader,{children:[(0,t.jsxs)(l.DialogTitle,{children:["Form a squadron from ",S.name," v",S.version]}),(0,t.jsxs)(l.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,i.memberCount)(S)," member ships and a flagship, and requests a crew for each member."]})]}),"ready"===g.state?(0,t.jsx)(D,{drafts:g.members,crew:g,isPending:d,...void 0===x?{}:{error:x},onBack:()=>{j(1)},onSubmit:e=>{p(z,e)}}):(0,t.jsxs)(t.Fragment,{children:["loading"===g.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)(h.InlineError,{variant:"field",title:"Couldn’t read the members’ crew settings",description:g.error??"Try again in a moment."}),(0,t.jsx)("div",{children:(0,t.jsx)(o.Button,{size:"sm",icon:(0,t.jsx)(s.RotateCw,{}),onClick:g.onRetry,children:"Try again"})})]}),(0,t.jsxs)(l.DialogFooter,{children:[(0,t.jsx)(o.Button,{type:"button",onClick:()=>{j(1)},children:"Back"}),(0,t.jsx)(o.Button,{variant:"primary",disabled:!0,"data-testid":"form-squadron-submit",children:"Form squadron"})]})]})]});let F=(0,i.rolePreviews)(S,r);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(l.DialogHeader,{children:[(0,t.jsxs)(l.DialogTitle,{children:["Form a squadron from ",S.name," v",S.version]}),(0,t.jsxs)(l.DialogDescription,{children:["Step 2 of 2. ",(0,i.memberCount)(S)," member ships and a flagship are commissioned when you confirm."]})]}),(0,t.jsxs)(u.Table,{children:[(0,t.jsx)(u.TableHeader,{children:(0,t.jsxs)(u.TableRow,{children:[(0,t.jsx)(u.TableHead,{children:"Role"}),(0,t.jsx)(u.TableHead,{children:"Template"}),(0,t.jsx)(u.TableHead,{children:"Members"}),(0,t.jsx)(u.TableHead,{children:"Check-in"})]})}),(0,t.jsx)(u.TableBody,{children:F.map(e=>(0,t.jsxs)(u.TableRow,{children:[(0,t.jsx)(u.TableCell,{className:"font-mono",children:e.role}),(0,t.jsx)(u.TableCell,{className:"font-mono",children:e.template}),(0,t.jsx)(u.TableCell,{children:e.count}),(0,t.jsx)(u.TableCell,{children:void 0===e.checkInMinutes?"unknown":(0,i.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)(a.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!==x&&(0,t.jsx)(h.InlineError,{variant:"field",title:"Couldn’t form the squadron",description:x}),(0,t.jsxs)(l.DialogFooter,{children:[(0,t.jsx)(o.Button,{type:"button",disabled:d,onClick:()=>{j(1)},children:"Back"}),(0,t.jsx)(o.Button,{variant:"primary",isLoading:d,"data-testid":"form-squadron-submit",onClick:()=>{p(z)},children:d?"Forming":"Form squadron"})]})]})}e.s(["FormSquadronDialog",0,function(e){let{isOpen:a,onOpenChange:s,isPending:n}=e;return(0,t.jsx)(l.Dialog,{open:a,onOpenChange:e=>{n||s(e)},children:(0,t.jsx)(l.DialogContent,{size:"md","data-testid":"form-squadron-dialog",className:d.dialogSurface.phoneFullScreen,children:(0,t.jsx)(T,{...e})})})}],92963)},66616,e=>{"use strict";var t=e.i(49635);let a={"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 s(e){return a[e]?.word??e}e.s(["crewLineHarnessWord",0,function(e){return"chat"===e?"Chat":s(e)},"harnessDetection",0,function(e,a){if(void 0===e.version)return;if(void 0===e.modelsConfirmedAt||null===e.modelsConfirmedAt)return`${e.version} \xb7 no model confirmed`;let s=(0,t.relativeTime)(new Date(e.modelsConfirmedAt),a);return`${e.version} \xb7 models confirmed ${"Just now"===s?"just now":s}`},"harnessKind",0,function(e){return a[e]?.kind},"harnessWord",0,s])}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,92150,e=>{"use strict";var t=e.i(56420);let a={name:"boxes",size:24,node:[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]]};a.node;let s=(0,t.default)(a);e.s(["Boxes",0,s],92150)},94945,e=>{"use strict";let t={overlay:"fixed inset-0 isolate z-50 bg-overlay duration-(--duration-base) data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",popup:(0,e.i(25913).cva)("fixed top-1/2 left-1/2 z-50 grid max-h-[calc(100dvh-var(--spacing)*8)] w-full max-w-[calc(100%-var(--spacing)*8)] -translate-x-1/2 -translate-y-1/2 gap-4 overflow-y-auto rounded-xl border border-border bg-popover p-6 text-body text-popover-foreground shadow-lg duration-(--duration-base) outline-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 motion-reduce:data-open:zoom-in-100 motion-reduce:data-closed:zoom-out-100",{variants:{size:{sm:"sm:max-w-(--size-dialog-sm)",md:"sm:max-w-(--size-dialog-md)"}},defaultVariants:{size:"sm"}}),header:"flex flex-col gap-2",footer:"flex flex-col-reverse gap-2 pt-1 sm:flex-row sm:justify-end",title:"text-heading font-semibold text-foreground",description:"text-body text-muted-foreground",phoneSheet:"max-sm:top-auto max-sm:bottom-0 max-sm:left-0 max-sm:max-w-full max-sm:translate-x-0 max-sm:translate-y-0 max-sm:rounded-none max-sm:rounded-t-2xl max-sm:border-x-0 max-sm:border-b-0 max-sm:px-4 max-sm:pb-[max(calc(var(--spacing)*4),env(safe-area-inset-bottom))] max-sm:[&_[data-slot=button]]:h-(--size-control-touch) max-sm:[&_[data-slot=button]]:w-full",phoneFullScreen:"max-sm:top-0 max-sm:left-0 max-sm:h-dvh max-sm:max-w-full max-sm:translate-x-0 max-sm:translate-y-0 max-sm:content-start max-sm:overflow-y-auto max-sm:rounded-none max-sm:border-0"};e.s(["dialogSurface",0,t])},22212,e=>{"use strict";var t=e.i(43476),a=e.i(53753),s=e.i(90063),n=e.i(94945);e.s(["Dialog",0,function(e){return(0,t.jsx)(a.Dialog.Root,{"data-slot":"dialog",...e})},"DialogClose",0,function(e){return(0,t.jsx)(a.Dialog.Close,{"data-slot":"dialog-close",...e})},"DialogContent",0,function({className:e,size:r,children:i,...o}){return(0,t.jsxs)(a.Dialog.Portal,{children:[(0,t.jsx)(a.Dialog.Backdrop,{"data-slot":"dialog-overlay",className:n.dialogSurface.overlay}),(0,t.jsx)(a.Dialog.Popup,{"data-slot":"dialog-content",className:(0,s.classNames)(n.dialogSurface.popup({size:r}),e),...o,children:i})]})},"DialogDescription",0,function({className:e,...r}){return(0,t.jsx)(a.Dialog.Description,{"data-slot":"dialog-description",className:(0,s.classNames)(n.dialogSurface.description,e),...r})},"DialogFooter",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"dialog-footer",className:(0,s.classNames)(n.dialogSurface.footer,e),...a})},"DialogHeader",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"dialog-header",className:(0,s.classNames)(n.dialogSurface.header,e),...a})},"DialogTitle",0,function({className:e,...r}){return(0,t.jsx)(a.Dialog.Title,{"data-slot":"dialog-title",className:(0,s.classNames)(n.dialogSurface.title,e),...r})}])},43988,e=>{"use strict";var t=e.i(43476),a=e.i(25913),s=e.i(90063);let n=(0,a.cva)("w-full min-w-0 resize-none rounded-md border border-input bg-card px-3 py-2 text-foreground shadow-sm transition-[border-color,box-shadow] duration-(--duration-fast) outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/22 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/16 disabled:cursor-not-allowed disabled:bg-muted disabled:opacity-50 disabled:shadow-none",{variants:{size:{md:"text-body",touch:"rounded-lg text-input-touch"},isMono:{true:"font-mono",false:""}},compoundVariants:[{size:"md",isMono:!0,className:"text-code"}],defaultVariants:{size:"md",isMono:!1}});e.s(["Textarea",0,function({className:e,size:a,isMono:r,rows:i=4,...o}){return(0,t.jsx)("textarea",{"data-slot":"textarea",rows:i,className:(0,s.classNames)(n({size:a,isMono:r}),e),...o})}])},95960,e=>{"use strict";var t=e.i(43476),a=e.i(92150),s=e.i(49287),n=e.i(86875),r=e.i(56420);let i={name:"tag-x",size:24,node:[["path",{d:"m16.5 6.5-3.914-3.914A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.43 2.43 0 0 0 3.42 0l1.79-1.79",key:"hu94c9"}],["path",{d:"m16.5 10.5 5 5",key:"1jo8bf"}],["path",{d:"m21.5 10.5-5 5",key:"jzei60"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]};i.node;let o=(0,r.default)(i);var l=e.i(63676),d=e.i(90063),m=e.i(80581);let c={"trierarch-plugin":n.ShipWheel,squadrons:a.Boxes,ship:s.Ship,gone:o};e.s(["LabelChip",0,function({chip:e,onRemove:a,testId:s,className:n,trailing:r,meaning:i}){let o="none"===e.mark?null:c[e.mark],u=`${e.key}=${e.value}`,h=void 0===i?(0,m.chipTitleOf)(e):`${(0,m.chipTitleOf)(e)}. ${i}`;return(0,t.jsxs)("span",{role:"group","aria-label":h,"data-slot":"label-chip","data-testid":s,title:h,className:(0,d.classNames)("inline-flex h-5.5 max-w-full min-w-0 shrink-0 items-center gap-1 rounded-sm border border-border bg-secondary px-1.5 font-mono text-id whitespace-nowrap text-foreground [&_svg]:size-3 [&_svg]:shrink-0 [&_svg]:text-muted-foreground","gone"===e.mark?"border-dashed":null,n),children:[null===o?null:(0,t.jsx)(o,{"aria-hidden":!0}),(0,t.jsxs)("span",{className:"truncate",children:[(0,t.jsxs)("span",{className:"text-muted-foreground",children:[e.key,"="]}),(0,t.jsx)("span",{className:"font-medium",children:e.value})]}),r,void 0===a?null:(0,t.jsx)("button",{type:"button","aria-label":`Remove ${u}`,onClick:a,className:"-mr-1 ml-0.5 inline-flex size-4 items-center justify-center rounded-xs text-muted-foreground hover:bg-accent hover:text-foreground focus-visible:outline-2 focus-visible:outline-ring",children:(0,t.jsx)(l.X,{"aria-hidden":!0})})]})}],95960)},67858,e=>{e.v(t=>Promise.all(["static/chunks/420usygo4rcxp.js","static/chunks/3vr80dn3nyqqi.js"].map(t=>e.l(t))).then(()=>t(59068)))},4032,e=>{"use strict";var t=e.i(43476),a=e.i(22768),s=e.i(74544),n=e.i(77071),r=e.i(63676),i=e.i(22016),o=e.i(71645),l=e.i(70703),d=e.i(78608),m=e.i(15905),c=e.i(6734),u=e.i(95960);let h=(0,l.default)(()=>e.A(67858).then(e=>e.LabelPicker),{loadableGenerated:{modules:[59068]},ssr:!1});function x({groups:e,picked:a,isDisabled:s,onAdd:r}){let[l,d]=(0,o.useState)(!1);return(0,t.jsxs)(c.Popover,{open:l,onOpenChange:d,children:[(0,t.jsx)(c.PopoverTrigger,{render:(0,t.jsx)(m.Button,{type:"button",variant:"ghost",size:"xs",icon:(0,t.jsx)(n.Plus,{}),disabled:s,"data-testid":"machine-labels-add"}),children:"Add label"}),(0,t.jsxs)(c.PopoverContent,{align:"start",sideOffset:6,className:"w-80 p-2","data-testid":"machine-labels-popover",children:[(0,t.jsx)("span",{className:"block px-2 pt-1 pb-2 text-body font-medium",children:"Machine label"}),(0,t.jsx)(h,{groups:e,pickedValueIds:a.map(e=>e.valueId),countWord:"machine",onPick:e=>{d(!1),r(e)}}),(0,t.jsxs)("p",{className:"mt-2 flex items-center justify-between gap-2 border-t border-border px-2 pt-2 text-meta text-muted-foreground",children:["Exact matches, all must hold.",(0,t.jsx)(i.default,{href:"/labels",className:"font-medium text-foreground hover:underline",children:"Manage labels"})]})]})]})}e.s(["MachineLabelsField",0,function({shipName:e,picked:n,groups:i,match:l,max:m,isDisabled:c,onAdd:h,onRemove:p,unknown:f=[],onRemoveUnknown:g}){let b=(0,d.noMatchWords)(n.length);return(0,t.jsxs)("div",{className:"flex flex-col gap-1.5","data-testid":"machine-labels",children:[(0,t.jsxs)("span",{className:"text-body font-medium",children:["Machine labels",(0,t.jsx)("span",{className:"font-normal text-muted-foreground",children:" optional"})]}),(0,t.jsxs)("div",{className:"flex min-h-(--size-control-sm) flex-wrap items-center gap-1.5",children:[0===n.length?(0,t.jsx)("span",{className:"text-meta text-muted-foreground",children:"Any machine"}):null,n.map((e,a)=>(0,t.jsxs)(o.Fragment,{children:[0===a?null:(0,t.jsx)("span",{className:"text-meta text-muted-foreground",children:"and"}),(0,t.jsx)(u.LabelChip,{chip:e,testId:"machine-label",...c?{}:{onRemove:()=>{p(e.valueId)}}})]},e.valueId)),f.map(e=>(0,t.jsxs)("span",{"data-testid":"machine-label-unknown",title:`${e}: not in this fleet`,className:"inline-flex h-5.5 items-center gap-1 rounded-sm border border-tone-attention-border bg-tone-attention-bg px-1.5 font-mono text-id text-tone-attention-fg [&_svg]:size-3",children:[(0,t.jsx)(a.CircleAlert,{"aria-hidden":!0}),e,void 0===g||c?null:(0,t.jsx)("button",{type:"button","aria-label":`Remove ${e}`,onClick:()=>{g(e)},className:"-mr-1 ml-0.5 inline-flex size-4 items-center justify-center rounded-xs hover:bg-accent focus-visible:outline-2 focus-visible:outline-ring",children:(0,t.jsx)(r.X,{"aria-hidden":!0})})]},e)),n.length+f.length>=m?null:(0,t.jsx)(x,{groups:i,picked:n,isDisabled:c,onAdd:h})]}),0===f.length?null:(0,t.jsxs)("p",{role:"alert","data-testid":"machine-labels-unknown-note",className:"text-meta text-tone-attention-fg",children:["Not in this fleet: ",f.join(", "),". Forming refuses ",1===f.length?"it":"them",": define ",1===f.length?"it":"them"," on the Labels page, or remove ",1===f.length?"it":"them"," here."]}),0===n.length?null:0===l.matching.length?(0,t.jsxs)("p",{role:"status","data-testid":"machine-labels-match",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 [&_svg]:mt-0.5 [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0",children:[(0,t.jsx)(s.Clock,{"aria-hidden":!0}),(0,t.jsxs)("span",{children:["No machine matches ",b.these,". You can still request: it waits on Needs crew until a machine ",b.carries,"."]})]}):(0,t.jsxs)("p",{className:"text-meta","data-testid":"machine-labels-match",children:["Matches ",l.matching.length," of ",l.total," ",1===l.total?"machine":"machines",": ",l.matching.join(", "),"."]}),(0,t.jsxs)("p",{className:"text-meta text-muted-foreground",children:["The plugin places ",e," only on a machine that carries every label here. Leave it empty for any machine."]})]})}])},92963,e=>{"use strict";var t=e.i(43476),a=e.i(10818),s=e.i(25398),n=e.i(71645),r=e.i(96994),i=e.i(84294),o=e.i(15905),l=e.i(22212),d=e.i(94945),m=e.i(91727),c=e.i(46033),u=e.i(14732),h=e.i(17981),x=e.i(16327),p=e.i(67927),f=e.i(85595),g=e.i(52886),b=e.i(90063),v=e.i(66616),j=e.i(12470),k=e.i(43988),y=e.i(4032);function w({id:e,label:a,isRequired:s,hint:n,children:r}){return(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsxs)(m.Label,{htmlFor:e,children:[a,(0,t.jsx)("span",{className:"font-normal text-muted-foreground",children:s?" required":" optional"})]}),r,void 0===n?null:(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:n})]})}function N({id:e,items:a,value:s,onPick:n,isDisabled:r,testId:i}){return(0,t.jsxs)(c.Select,{items:a,value:s,disabled:r,onValueChange:e=>{n("string"==typeof e?e:"")},children:[(0,t.jsx)(c.SelectTrigger,{id:e,"data-testid":i,children:(0,t.jsx)(c.SelectValue,{})}),(0,t.jsx)(c.SelectContent,{children:Object.entries(a).map(([e,a])=>(0,t.jsx)(c.SelectItem,{value:e,children:a},e))})]})}function C(e){return"string"==typeof e?e:JSON.stringify(e)}function S({member:e,offers:a,workspaces:s,machineLabels:i,isOpen:o,onOpenChange:l,isDisabled:d,error:m,onChange:c}){let u={workspace:(0,n.useId)(),harness:(0,n.useId)(),options:(0,n.useId)(),firstPrompt:(0,n.useId)(),parameters:(0,n.useId)()},D=(0,r.missingOf)(e),T=a.find(t=>t.harness===e.harness),z={"":"The trierarch’s default",...Object.fromEntries(a.map(e=>[e.harness,(0,v.harnessWord)(e.harness)])),...""===e.harness||T?{}:{[e.harness]:(0,v.harnessWord)(e.harness)}},F=new Set((T?.options??[]).map(e=>e.name)),q=Object.entries(e.options).filter(([e])=>!F.has(e)),I=o?x.ChevronDown:p.ChevronRight;return(0,t.jsxs)("section",{"aria-label":e.slot,"data-testid":"member-crew-section",className:(0,b.classNames)("flex flex-col rounded-lg border bg-card",void 0===m?"border-border":"border-tone-attention-border"),children:[(0,t.jsxs)("button",{type:"button","aria-expanded":o,"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:()=>{l(!o)},children:[(0,t.jsx)(I,{"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===D.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)(f.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)(g.CircleDashed,{"aria-hidden":!0}),"Needs ",D.join(", ")]})]}),void 0===m?null:(0,t.jsx)("div",{className:"px-3.5 pb-3",children:(0,t.jsx)(h.InlineError,{variant:"field",title:m})}),o?(0,t.jsxs)("div",{className:"flex flex-col gap-4 border-t border-border px-3.5 py-3.5",children:[(0,t.jsx)(w,{id:u.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)(N,{id:u.workspace,items:s,value:void 0===e.workspace?"":(0,r.workspaceItemOf)(e.workspace),isDisabled:d,testId:"member-crew-workspace",onPick:t=>{c({...e,workspace:(0,r.workspaceFromItem)(t)})}})}),(0,t.jsx)(w,{id:u.harness,label:"Harness",children:(0,t.jsx)(N,{id:u.harness,items:z,value:e.harness,isDisabled:d,testId:"member-crew-harness",onPick:t=>{c({...e,harness:t})}})}),(T?.options??[]).map((a,s)=>(0,t.jsx)(w,{id:`${u.options}-${String(s)}`,label:a.name,children:(0,t.jsx)(N,{id:`${u.options}-${String(s)}`,items:{"":"The trierarch’s default",...Object.fromEntries(a.values.map(e=>[e,e===a.defaultValue?`${e} (default)`:e])),..."string"==typeof e.options[a.name]&&!a.values.includes(C(e.options[a.name]))?{[C(e.options[a.name])]:C(e.options[a.name])}:{}},value:void 0===e.options[a.name]?"":C(e.options[a.name]),isDisabled:d,testId:"member-crew-option",onPick:t=>{let s=Object.fromEntries(Object.entries(e.options).filter(([e])=>e!==a.name));c({...e,options:""===t?s:{...s,[a.name]:t}})}})},a.name)),0===q.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:q.map(([e,a])=>(0,t.jsxs)("li",{className:"rounded-sm bg-secondary px-1.5 py-0.5 font-mono text-id",children:[e,"=",C(a)]},e))})]}),void 0===i?null:(0,t.jsx)(y.MachineLabelsField,{shipName:e.slot,picked:i.chipsOf(e.machineLabels),groups:i.groups,match:i.matchOf(e.machineLabels),max:i.max,isDisabled:d,unknown:e.unknownLabels,onAdd:t=>{c({...e,machineLabels:[...e.machineLabels,t]})},onRemove:t=>{c({...e,machineLabels:e.machineLabels.filter(e=>e!==t)})},onRemoveUnknown:t=>{c({...e,unknownLabels:e.unknownLabels.filter(e=>e!==t)})}}),(0,t.jsx)(w,{id:u.firstPrompt,label:"First prompt",hint:"The session starts with it, on its first start only.",children:(0,t.jsx)(k.Textarea,{id:u.firstPrompt,value:e.firstPrompt,disabled:d,"data-testid":"member-crew-first-prompt",rows:2,onChange:t=>{c({...e,firstPrompt:t.target.value})}})}),e.parameters.map((a,s)=>(0,t.jsx)(w,{id:`${u.parameters}-${String(s)}`,label:a.name,isRequired:!0,hint:a.description,children:(0,t.jsx)(j.Input,{id:`${u.parameters}-${String(s)}`,value:a.value,disabled:d,"aria-invalid":""===a.value.trim()||void 0,"data-testid":"member-crew-parameter",onChange:t=>{c({...e,parameters:e.parameters.map(e=>e.name===a.name?{...e,value:t.target.value}:e)})}})},a.name))]}):null]})}function D({drafts:e,crew:a,isPending:s,error:i,onBack:d,onSubmit:u}){let x=(0,n.useId)(),[p,f]=(0,n.useState)(()=>(0,r.membersOf)(e,a.context)),[g,b]=(0,n.useState)(()=>new Set((0,r.membersOf)(e,a.context).filter(e=>(0,r.missingOf)(e).length>0).map(e=>e.slot))),v=(0,r.workspaceItemsOf)(a.offers,p),{ready:j,total:k}=(0,r.readyCount)(p),y=j===k,w=void 0===i?void 0:(0,r.labelErrorSlot)(i,{members:p,context:a.context}),N=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,N&&Object.keys(v).length>0?(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)(m.Label,{htmlFor:x,children:"Workspace for every member without one"}),(0,t.jsxs)(c.Select,{items:{"":"Pick a workspace",...v},value:"",disabled:s,onValueChange:e=>{let t="string"==typeof e?(0,r.workspaceFromItem)(e):void 0;void 0!==t&&f(e=>(0,r.withWorkspaceForAll)(e,t))},children:[(0,t.jsx)(c.SelectTrigger,{id:x,"data-testid":"form-squadron-workspace-all",children:(0,t.jsx)(c.SelectValue,{})}),(0,t.jsx)(c.SelectContent,{children:Object.entries(v).map(([e,a])=>(0,t.jsx)(c.SelectItem,{value:e,children:a},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)(S,{member:e,offers:a.offers,workspaces:v,...void 0===a.machineLabels?{}:{machineLabels:a.machineLabels},isOpen:g.has(e.slot)||w===e.slot,onOpenChange:t=>{b(a=>{let s=new Set(a);return t?s.add(e.slot):s.delete(e.slot),s})},isDisabled:s,...w===e.slot&&void 0!==i?{error:i}:{},onChange:e=>{f(t=>t.map(t=>t.slot===e.slot?e:t))}},e.slot))}),void 0!==i&&void 0===w?(0,t.jsx)(h.InlineError,{variant:"field",title:"Couldn’t form the squadron",description:i}):null,(0,t.jsxs)(l.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:[j," of ",k," ",1===k?"member":"members"," ready"]}),(0,t.jsx)(o.Button,{type:"button",disabled:s,onClick:d,children:"Back"}),(0,t.jsx)(o.Button,{variant:"primary",isLoading:s,disabled:!y,"data-testid":"form-squadron-submit",onClick:()=>{u(p)},children:s?"Forming":"Form squadron"})]})]})}function T({blueprints:e,templates:r,isPending:d,error:x,onSubmit:p,initial:f,crew:g,onPicked:b}){let[v,j]=(0,n.useState)(1),[k,y]=(0,n.useState)(f?.key??e[0]?.key),w=e.find(e=>e.key===k)??e[0],[N,C]=(0,n.useState)(f?.version??w?.versions[0]?.version),S=w?.versions.find(e=>e.version===N)??w?.versions[0];if(!w||!S)return null;if(1===v){let a=Object.fromEntries(w.versions.map((e,t)=>[String(e.version),`v${String(e.version)}${0===t?" (latest)":""}`]));return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(l.DialogHeader,{children:[(0,t.jsx)(l.DialogTitle,{children:"Form a squadron"}),(0,t.jsx)(l.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 a=e.versions[0],s=e.key===w.key;return(0,t.jsxs)("button",{type:"button",role:"radio","aria-checked":s,"data-testid":"form-squadron-blueprint",onClick:()=>{y(e.key),C(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",a?.version,", latest"]})]}),(0,t.jsx)("span",{className:"text-meta text-muted-foreground",children:a?.description})]},e.key)})})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)(m.Label,{htmlFor:"form-squadron-version",children:"Version"}),(0,t.jsxs)(c.Select,{items:a,value:String(S.version),onValueChange:e=>{C(Number(e))},children:[(0,t.jsx)(c.SelectTrigger,{id:"form-squadron-version","aria-label":"Version",children:(0,t.jsx)(c.SelectValue,{})}),(0,t.jsx)(c.SelectContent,{children:Object.entries(a).map(([e,a])=>(0,t.jsx)(c.SelectItem,{value:e,children:a},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)(l.DialogFooter,{children:[(0,t.jsx)(l.DialogClose,{render:(0,t.jsx)(o.Button,{type:"button"}),children:"Cancel"}),(0,t.jsx)(o.Button,{variant:"primary","data-testid":"form-squadron-preview",onClick:()=>{b?.({repository:S.repository,name:S.name,version:S.version}),j(2)},children:void 0===g?"Preview roles":"Next: the members"})]})]})}let z={repository:S.repository,name:S.name,version:S.version};if(void 0!==g)return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(l.DialogHeader,{children:[(0,t.jsxs)(l.DialogTitle,{children:["Form a squadron from ",S.name," v",S.version]}),(0,t.jsxs)(l.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,i.memberCount)(S)," member ships and a flagship, and requests a crew for each member."]})]}),"ready"===g.state?(0,t.jsx)(D,{drafts:g.members,crew:g,isPending:d,...void 0===x?{}:{error:x},onBack:()=>{j(1)},onSubmit:e=>{p(z,e)}}):(0,t.jsxs)(t.Fragment,{children:["loading"===g.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)(h.InlineError,{variant:"field",title:"Couldn’t read the members’ crew settings",description:g.error??"Try again in a moment."}),(0,t.jsx)("div",{children:(0,t.jsx)(o.Button,{size:"sm",icon:(0,t.jsx)(s.RotateCw,{}),onClick:g.onRetry,children:"Try again"})})]}),(0,t.jsxs)(l.DialogFooter,{children:[(0,t.jsx)(o.Button,{type:"button",onClick:()=>{j(1)},children:"Back"}),(0,t.jsx)(o.Button,{variant:"primary",disabled:!0,"data-testid":"form-squadron-submit",children:"Form squadron"})]})]})]});let F=(0,i.rolePreviews)(S,r);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(l.DialogHeader,{children:[(0,t.jsxs)(l.DialogTitle,{children:["Form a squadron from ",S.name," v",S.version]}),(0,t.jsxs)(l.DialogDescription,{children:["Step 2 of 2. ",(0,i.memberCount)(S)," member ships and a flagship are commissioned when you confirm."]})]}),(0,t.jsxs)(u.Table,{children:[(0,t.jsx)(u.TableHeader,{children:(0,t.jsxs)(u.TableRow,{children:[(0,t.jsx)(u.TableHead,{children:"Role"}),(0,t.jsx)(u.TableHead,{children:"Template"}),(0,t.jsx)(u.TableHead,{children:"Members"}),(0,t.jsx)(u.TableHead,{children:"Check-in"})]})}),(0,t.jsx)(u.TableBody,{children:F.map(e=>(0,t.jsxs)(u.TableRow,{children:[(0,t.jsx)(u.TableCell,{className:"font-mono",children:e.role}),(0,t.jsx)(u.TableCell,{className:"font-mono",children:e.template}),(0,t.jsx)(u.TableCell,{children:e.count}),(0,t.jsx)(u.TableCell,{children:void 0===e.checkInMinutes?"unknown":(0,i.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)(a.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!==x&&(0,t.jsx)(h.InlineError,{variant:"field",title:"Couldn’t form the squadron",description:x}),(0,t.jsxs)(l.DialogFooter,{children:[(0,t.jsx)(o.Button,{type:"button",disabled:d,onClick:()=>{j(1)},children:"Back"}),(0,t.jsx)(o.Button,{variant:"primary",isLoading:d,"data-testid":"form-squadron-submit",onClick:()=>{p(z)},children:d?"Forming":"Form squadron"})]})]})}e.s(["FormSquadronDialog",0,function(e){let{isOpen:a,onOpenChange:s,isPending:n}=e;return(0,t.jsx)(l.Dialog,{open:a,onOpenChange:e=>{n||s(e)},children:(0,t.jsx)(l.DialogContent,{size:"md","data-testid":"form-squadron-dialog",className:d.dialogSurface.phoneFullScreen,children:(0,t.jsx)(T,{...e})})})}],92963)},66616,e=>{"use strict";var t=e.i(49635);let a={"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 s(e){return a[e]?.word??e}e.s(["crewLineHarnessWord",0,function(e){return"chat"===e?"Chat":s(e)},"harnessDetection",0,function(e,a){if(void 0===e.version)return;if(void 0===e.modelsConfirmedAt||null===e.modelsConfirmedAt)return`${e.version} \xb7 no model confirmed`;let s=(0,t.relativeTime)(new Date(e.modelsConfirmedAt),a);return`${e.version} \xb7 models confirmed ${"Just now"===s?"just now":s}`},"harnessKind",0,function(e){return a[e]?.kind},"harnessWord",0,s])}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,67928,t=>{t.v(o=>Promise.all(["static/chunks/3o8213x94m4o3.js","static/chunks/05j0kzgxaeurj.js"].map(o=>t.l(o))).then(()=>o(92963)))}]);
|
package/.next/standalone/packages/console/.next/static/chunks/{3kvklsjp8y-7e.js → 3o8213x94m4o3.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,92150,e=>{"use strict";var t=e.i(56420);let s={name:"boxes",size:24,node:[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]]};s.node;let a=(0,t.default)(s);e.s(["Boxes",0,a],92150)},22212,e=>{"use strict";var t=e.i(43476),s=e.i(53753),a=e.i(90063),i=e.i(94945);e.s(["Dialog",0,function(e){return(0,t.jsx)(s.Dialog.Root,{"data-slot":"dialog",...e})},"DialogClose",0,function(e){return(0,t.jsx)(s.Dialog.Close,{"data-slot":"dialog-close",...e})},"DialogContent",0,function({className:e,size:n,children:r,...o}){return(0,t.jsxs)(s.Dialog.Portal,{children:[(0,t.jsx)(s.Dialog.Backdrop,{"data-slot":"dialog-overlay",className:i.dialogSurface.overlay}),(0,t.jsx)(s.Dialog.Popup,{"data-slot":"dialog-content",className:(0,a.classNames)(i.dialogSurface.popup({size:n}),e),...o,children:r})]})},"DialogDescription",0,function({className:e,...n}){return(0,t.jsx)(s.Dialog.Description,{"data-slot":"dialog-description",className:(0,a.classNames)(i.dialogSurface.description,e),...n})},"DialogFooter",0,function({className:e,...s}){return(0,t.jsx)("div",{"data-slot":"dialog-footer",className:(0,a.classNames)(i.dialogSurface.footer,e),...s})},"DialogHeader",0,function({className:e,...s}){return(0,t.jsx)("div",{"data-slot":"dialog-header",className:(0,a.classNames)(i.dialogSurface.header,e),...s})},"DialogTitle",0,function({className:e,...n}){return(0,t.jsx)(s.Dialog.Title,{"data-slot":"dialog-title",className:(0,a.classNames)(i.dialogSurface.title,e),...n})}])},43988,e=>{"use strict";var t=e.i(43476),s=e.i(25913),a=e.i(90063);let i=(0,s.cva)("w-full min-w-0 resize-none rounded-md border border-input bg-card px-3 py-2 text-foreground shadow-sm transition-[border-color,box-shadow] duration-(--duration-fast) outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/22 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/16 disabled:cursor-not-allowed disabled:bg-muted disabled:opacity-50 disabled:shadow-none",{variants:{size:{md:"text-body",touch:"rounded-lg text-input-touch"},isMono:{true:"font-mono",false:""}},compoundVariants:[{size:"md",isMono:!0,className:"text-code"}],defaultVariants:{size:"md",isMono:!1}});e.s(["Textarea",0,function({className:e,size:s,isMono:n,rows:r=4,...o}){return(0,t.jsx)("textarea",{"data-slot":"textarea",rows:r,className:(0,a.classNames)(i({size:s,isMono:n}),e),...o})}])},95960,e=>{"use strict";var t=e.i(43476),s=e.i(92150),a=e.i(49287),i=e.i(86875),n=e.i(56420);let r={name:"tag-x",size:24,node:[["path",{d:"m16.5 6.5-3.914-3.914A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.43 2.43 0 0 0 3.42 0l1.79-1.79",key:"hu94c9"}],["path",{d:"m16.5 10.5 5 5",key:"1jo8bf"}],["path",{d:"m21.5 10.5-5 5",key:"jzei60"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]};r.node;let o=(0,n.default)(r);var l=e.i(63676),d=e.i(90063),c=e.i(80581);let m={"trierarch-plugin":i.ShipWheel,squadrons:s.Boxes,ship:a.Ship,gone:o};e.s(["LabelChip",0,function({chip:e,onRemove:s,testId:a,className:i,trailing:n,meaning:r}){let o="none"===e.mark?null:m[e.mark],h=`${e.key}=${e.value}`,u=void 0===r?(0,c.chipTitleOf)(e):`${(0,c.chipTitleOf)(e)}. ${r}`;return(0,t.jsxs)("span",{role:"group","aria-label":u,"data-slot":"label-chip","data-testid":a,title:u,className:(0,d.classNames)("inline-flex h-5.5 max-w-full min-w-0 shrink-0 items-center gap-1 rounded-sm border border-border bg-secondary px-1.5 font-mono text-id whitespace-nowrap text-foreground [&_svg]:size-3 [&_svg]:shrink-0 [&_svg]:text-muted-foreground","gone"===e.mark?"border-dashed":null,i),children:[null===o?null:(0,t.jsx)(o,{"aria-hidden":!0}),(0,t.jsxs)("span",{className:"truncate",children:[(0,t.jsxs)("span",{className:"text-muted-foreground",children:[e.key,"="]}),(0,t.jsx)("span",{className:"font-medium",children:e.value})]}),n,void 0===s?null:(0,t.jsx)("button",{type:"button","aria-label":`Remove ${h}`,onClick:s,className:"-mr-1 ml-0.5 inline-flex size-4 items-center justify-center rounded-xs text-muted-foreground hover:bg-accent hover:text-foreground focus-visible:outline-2 focus-visible:outline-ring",children:(0,t.jsx)(l.X,{"aria-hidden":!0})})]})}],95960)},67858,e=>{e.v(t=>Promise.all(["static/chunks/20l4-ecv_oo2h.js","static/chunks/3vr80dn3nyqqi.js"].map(t=>e.l(t))).then(()=>t(59068)))},4032,e=>{"use strict";var t=e.i(43476),s=e.i(22768),a=e.i(74544),i=e.i(77071),n=e.i(63676),r=e.i(22016),o=e.i(71645),l=e.i(70703),d=e.i(78608),c=e.i(15905),m=e.i(6734),h=e.i(95960);let u=(0,l.default)(()=>e.A(67858).then(e=>e.LabelPicker),{loadableGenerated:{modules:[59068]},ssr:!1});function x({groups:e,picked:s,isDisabled:a,onAdd:n}){let[l,d]=(0,o.useState)(!1);return(0,t.jsxs)(m.Popover,{open:l,onOpenChange:d,children:[(0,t.jsx)(m.PopoverTrigger,{render:(0,t.jsx)(c.Button,{type:"button",variant:"ghost",size:"xs",icon:(0,t.jsx)(i.Plus,{}),disabled:a,"data-testid":"machine-labels-add"}),children:"Add label"}),(0,t.jsxs)(m.PopoverContent,{align:"start",sideOffset:6,className:"w-80 p-2","data-testid":"machine-labels-popover",children:[(0,t.jsx)("span",{className:"block px-2 pt-1 pb-2 text-body font-medium",children:"Machine label"}),(0,t.jsx)(u,{groups:e,pickedValueIds:s.map(e=>e.valueId),countWord:"machine",onPick:e=>{d(!1),n(e)}}),(0,t.jsxs)("p",{className:"mt-2 flex items-center justify-between gap-2 border-t border-border px-2 pt-2 text-meta text-muted-foreground",children:["Exact matches, all must hold.",(0,t.jsx)(r.default,{href:"/labels",className:"font-medium text-foreground hover:underline",children:"Manage labels"})]})]})]})}e.s(["MachineLabelsField",0,function({shipName:e,picked:i,groups:r,match:l,max:c,isDisabled:m,onAdd:u,onRemove:p,unknown:f=[],onRemoveUnknown:g}){let b=(0,d.noMatchWords)(i.length);return(0,t.jsxs)("div",{className:"flex flex-col gap-1.5","data-testid":"machine-labels",children:[(0,t.jsxs)("span",{className:"text-body font-medium",children:["Machine labels",(0,t.jsx)("span",{className:"font-normal text-muted-foreground",children:" optional"})]}),(0,t.jsxs)("div",{className:"flex min-h-(--size-control-sm) flex-wrap items-center gap-1.5",children:[0===i.length?(0,t.jsx)("span",{className:"text-meta text-muted-foreground",children:"Any machine"}):null,i.map((e,s)=>(0,t.jsxs)(o.Fragment,{children:[0===s?null:(0,t.jsx)("span",{className:"text-meta text-muted-foreground",children:"and"}),(0,t.jsx)(h.LabelChip,{chip:e,testId:"machine-label",...m?{}:{onRemove:()=>{p(e.valueId)}}})]},e.valueId)),f.map(e=>(0,t.jsxs)("span",{"data-testid":"machine-label-unknown",title:`${e}: not in this fleet`,className:"inline-flex h-5.5 items-center gap-1 rounded-sm border border-tone-attention-border bg-tone-attention-bg px-1.5 font-mono text-id text-tone-attention-fg [&_svg]:size-3",children:[(0,t.jsx)(s.CircleAlert,{"aria-hidden":!0}),e,void 0===g||m?null:(0,t.jsx)("button",{type:"button","aria-label":`Remove ${e}`,onClick:()=>{g(e)},className:"-mr-1 ml-0.5 inline-flex size-4 items-center justify-center rounded-xs hover:bg-accent focus-visible:outline-2 focus-visible:outline-ring",children:(0,t.jsx)(n.X,{"aria-hidden":!0})})]},e)),i.length+f.length>=c?null:(0,t.jsx)(x,{groups:r,picked:i,isDisabled:m,onAdd:u})]}),0===f.length?null:(0,t.jsxs)("p",{role:"alert","data-testid":"machine-labels-unknown-note",className:"text-meta text-tone-attention-fg",children:["Not in this fleet: ",f.join(", "),". Forming refuses ",1===f.length?"it":"them",": define ",1===f.length?"it":"them"," on the Labels page, or remove ",1===f.length?"it":"them"," here."]}),0===i.length?null:0===l.matching.length?(0,t.jsxs)("p",{role:"status","data-testid":"machine-labels-match",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 [&_svg]:mt-0.5 [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0",children:[(0,t.jsx)(a.Clock,{"aria-hidden":!0}),(0,t.jsxs)("span",{children:["No machine matches ",b.these,". You can still request: it waits on Needs crew until a machine ",b.carries,"."]})]}):(0,t.jsxs)("p",{className:"text-meta","data-testid":"machine-labels-match",children:["Matches ",l.matching.length," of ",l.total," ",1===l.total?"machine":"machines",": ",l.matching.join(", "),"."]}),(0,t.jsxs)("p",{className:"text-meta text-muted-foreground",children:["The plugin places ",e," only on a machine that carries every label here. Leave it empty for any machine."]})]})}])},92963,e=>{"use strict";var t=e.i(43476),s=e.i(10818),a=e.i(25398),i=e.i(71645),n=e.i(96994),r=e.i(84294),o=e.i(15905),l=e.i(22212),d=e.i(94945),c=e.i(91727),m=e.i(46033),h=e.i(14732),u=e.i(17981),x=e.i(16327),p=e.i(67927),f=e.i(85595),g=e.i(52886),b=e.i(90063),j=e.i(66616),v=e.i(12470),k=e.i(43988),y=e.i(4032);function w({id:e,label:s,isRequired:a,hint:i,children:n}){return(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsxs)(c.Label,{htmlFor:e,children:[s,(0,t.jsx)("span",{className:"font-normal text-muted-foreground",children:a?" required":" optional"})]}),n,void 0===i?null:(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:i})]})}function N({id:e,items:s,value:a,onPick:i,isDisabled:n,testId:r}){return(0,t.jsxs)(m.Select,{items:s,value:a,disabled:n,onValueChange:e=>{i("string"==typeof e?e:"")},children:[(0,t.jsx)(m.SelectTrigger,{id:e,"data-testid":r,children:(0,t.jsx)(m.SelectValue,{})}),(0,t.jsx)(m.SelectContent,{children:Object.entries(s).map(([e,s])=>(0,t.jsx)(m.SelectItem,{value:e,children:s},e))})]})}function C(e){return"string"==typeof e?e:JSON.stringify(e)}function S({member:e,offers:s,workspaces:a,machineLabels:r,isOpen:o,onOpenChange:l,isDisabled:d,error:c,onChange:m}){let h={workspace:(0,i.useId)(),harness:(0,i.useId)(),options:(0,i.useId)(),firstPrompt:(0,i.useId)(),parameters:(0,i.useId)()},D=(0,n.missingOf)(e),T=s.find(t=>t.harness===e.harness),q={"":"The trierarch’s default",...Object.fromEntries(s.map(e=>[e.harness,(0,j.harnessWord)(e.harness)])),...""===e.harness||T?{}:{[e.harness]:(0,j.harnessWord)(e.harness)}},F=new Set((T?.options??[]).map(e=>e.name)),I=Object.entries(e.options).filter(([e])=>!F.has(e)),O=o?x.ChevronDown:p.ChevronRight;return(0,t.jsxs)("section",{"aria-label":e.slot,"data-testid":"member-crew-section",className:(0,b.classNames)("flex flex-col rounded-lg border bg-card",void 0===c?"border-border":"border-tone-attention-border"),children:[(0,t.jsxs)("button",{type:"button","aria-expanded":o,"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:()=>{l(!o)},children:[(0,t.jsx)(O,{"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===D.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)(f.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)(g.CircleDashed,{"aria-hidden":!0}),"Needs ",D.join(", ")]})]}),void 0===c?null:(0,t.jsx)("div",{className:"px-3.5 pb-3",children:(0,t.jsx)(u.InlineError,{variant:"field",title:c})}),o?(0,t.jsxs)("div",{className:"flex flex-col gap-4 border-t border-border px-3.5 py-3.5",children:[(0,t.jsx)(w,{id:h.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)(N,{id:h.workspace,items:a,value:void 0===e.workspace?"":(0,n.workspaceItemOf)(e.workspace),isDisabled:d,testId:"member-crew-workspace",onPick:t=>{m({...e,workspace:(0,n.workspaceFromItem)(t)})}})}),(0,t.jsx)(w,{id:h.harness,label:"Harness",children:(0,t.jsx)(N,{id:h.harness,items:q,value:e.harness,isDisabled:d,testId:"member-crew-harness",onPick:t=>{m({...e,harness:t})}})}),(T?.options??[]).map((s,a)=>(0,t.jsx)(w,{id:`${h.options}-${String(a)}`,label:s.name,children:(0,t.jsx)(N,{id:`${h.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(C(e.options[s.name]))?{[C(e.options[s.name])]:C(e.options[s.name])}:{}},value:void 0===e.options[s.name]?"":C(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));m({...e,options:""===t?a:{...a,[s.name]:t}})}})},s.name)),0===I.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:I.map(([e,s])=>(0,t.jsxs)("li",{className:"rounded-sm bg-secondary px-1.5 py-0.5 font-mono text-id",children:[e,"=",C(s)]},e))})]}),void 0===r?null:(0,t.jsx)(y.MachineLabelsField,{shipName:e.slot,picked:r.chipsOf(e.machineLabels),groups:r.groups,match:r.matchOf(e.machineLabels),max:r.max,isDisabled:d,unknown:e.unknownLabels,onAdd:t=>{m({...e,machineLabels:[...e.machineLabels,t]})},onRemove:t=>{m({...e,machineLabels:e.machineLabels.filter(e=>e!==t)})},onRemoveUnknown:t=>{m({...e,unknownLabels:e.unknownLabels.filter(e=>e!==t)})}}),(0,t.jsx)(w,{id:h.firstPrompt,label:"First prompt",hint:"The session starts with it, on its first start only.",children:(0,t.jsx)(k.Textarea,{id:h.firstPrompt,value:e.firstPrompt,disabled:d,"data-testid":"member-crew-first-prompt",rows:2,onChange:t=>{m({...e,firstPrompt:t.target.value})}})}),e.parameters.map((s,a)=>(0,t.jsx)(w,{id:`${h.parameters}-${String(a)}`,label:s.name,isRequired:!0,hint:s.description,children:(0,t.jsx)(v.Input,{id:`${h.parameters}-${String(a)}`,value:s.value,disabled:d,"aria-invalid":""===s.value.trim()||void 0,"data-testid":"member-crew-parameter",onChange:t=>{m({...e,parameters:e.parameters.map(e=>e.name===s.name?{...e,value:t.target.value}:e)})}})},s.name))]}):null]})}function D({drafts:e,crew:s,isPending:a,error:r,onBack:d,onSubmit:h}){let x=(0,i.useId)(),[p,f]=(0,i.useState)(()=>(0,n.membersOf)(e,s.context)),[g,b]=(0,i.useState)(()=>new Set((0,n.membersOf)(e,s.context).filter(e=>(0,n.missingOf)(e).length>0).map(e=>e.slot))),j=(0,n.workspaceItemsOf)(s.offers,p),{ready:v,total:k}=(0,n.readyCount)(p),y=v===k,w=void 0===r?void 0:(0,n.labelErrorSlot)(r,{members:p,context:s.context}),N=p.some(e=>void 0===e.workspace);return(0,t.jsxs)(t.Fragment,{children:[0===s.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,N&&Object.keys(j).length>0?(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)(c.Label,{htmlFor:x,children:"Workspace for every member without one"}),(0,t.jsxs)(m.Select,{items:{"":"Pick a workspace",...j},value:"",disabled:a,onValueChange:e=>{let t="string"==typeof e?(0,n.workspaceFromItem)(e):void 0;void 0!==t&&f(e=>(0,n.withWorkspaceForAll)(e,t))},children:[(0,t.jsx)(m.SelectTrigger,{id:x,"data-testid":"form-squadron-workspace-all",children:(0,t.jsx)(m.SelectValue,{})}),(0,t.jsx)(m.SelectContent,{children:Object.entries(j).map(([e,s])=>(0,t.jsx)(m.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)(S,{member:e,offers:s.offers,workspaces:j,...void 0===s.machineLabels?{}:{machineLabels:s.machineLabels},isOpen:g.has(e.slot)||w===e.slot,onOpenChange:t=>{b(s=>{let a=new Set(s);return t?a.add(e.slot):a.delete(e.slot),a})},isDisabled:a,...w===e.slot&&void 0!==r?{error:r}:{},onChange:e=>{f(t=>t.map(t=>t.slot===e.slot?e:t))}},e.slot))}),void 0!==r&&void 0===w?(0,t.jsx)(u.InlineError,{variant:"field",title:"Couldn’t form the squadron",description:r}):null,(0,t.jsxs)(l.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:[v," of ",k," ",1===k?"member":"members"," ready"]}),(0,t.jsx)(o.Button,{type:"button",disabled:a,onClick:d,children:"Back"}),(0,t.jsx)(o.Button,{variant:"primary",isLoading:a,disabled:!y,"data-testid":"form-squadron-submit",onClick:()=>{h(p)},children:a?"Forming":"Form squadron"})]})]})}function T({blueprints:e,templates:n,isPending:d,error:x,onSubmit:p,initial:f,crew:g,onPicked:b}){let[j,v]=(0,i.useState)(1),[k,y]=(0,i.useState)(f?.key??e[0]?.key),w=e.find(e=>e.key===k)??e[0],[N,C]=(0,i.useState)(f?.version??w?.versions[0]?.version),S=w?.versions.find(e=>e.version===N)??w?.versions[0];if(!w||!S)return null;if(1===j){let s=Object.fromEntries(w.versions.map((e,t)=>[String(e.version),`v${String(e.version)}${0===t?" (latest)":""}`]));return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(l.DialogHeader,{children:[(0,t.jsx)(l.DialogTitle,{children:"Form a squadron"}),(0,t.jsx)(l.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===w.key;return(0,t.jsxs)("button",{type:"button",role:"radio","aria-checked":a,"data-testid":"form-squadron-blueprint",onClick:()=>{y(e.key),C(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)(c.Label,{htmlFor:"form-squadron-version",children:"Version"}),(0,t.jsxs)(m.Select,{items:s,value:String(S.version),onValueChange:e=>{C(Number(e))},children:[(0,t.jsx)(m.SelectTrigger,{id:"form-squadron-version","aria-label":"Version",children:(0,t.jsx)(m.SelectValue,{})}),(0,t.jsx)(m.SelectContent,{children:Object.entries(s).map(([e,s])=>(0,t.jsx)(m.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)(l.DialogFooter,{children:[(0,t.jsx)(l.DialogClose,{render:(0,t.jsx)(o.Button,{type:"button"}),children:"Cancel"}),(0,t.jsx)(o.Button,{variant:"primary","data-testid":"form-squadron-preview",onClick:()=>{b?.({repository:S.repository,name:S.name,version:S.version}),v(2)},children:void 0===g?"Preview roles":"Next: the members"})]})]})}let q={repository:S.repository,name:S.name,version:S.version};if(void 0!==g)return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(l.DialogHeader,{children:[(0,t.jsxs)(l.DialogTitle,{children:["Form a squadron from ",S.name," v",S.version]}),(0,t.jsxs)(l.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,r.memberCount)(S)," member ships and a flagship, and requests a crew for each member."]})]}),"ready"===g.state?(0,t.jsx)(D,{drafts:g.members,crew:g,isPending:d,...void 0===x?{}:{error:x},onBack:()=>{v(1)},onSubmit:e=>{p(q,e)}}):(0,t.jsxs)(t.Fragment,{children:["loading"===g.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)(u.InlineError,{variant:"field",title:"Couldn’t read the members’ crew settings",description:g.error??"Try again in a moment."}),(0,t.jsx)("div",{children:(0,t.jsx)(o.Button,{size:"sm",icon:(0,t.jsx)(a.RotateCw,{}),onClick:g.onRetry,children:"Try again"})})]}),(0,t.jsxs)(l.DialogFooter,{children:[(0,t.jsx)(o.Button,{type:"button",onClick:()=>{v(1)},children:"Back"}),(0,t.jsx)(o.Button,{variant:"primary",disabled:!0,"data-testid":"form-squadron-submit",children:"Form squadron"})]})]})]});let F=(0,r.rolePreviews)(S,n);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(l.DialogHeader,{children:[(0,t.jsxs)(l.DialogTitle,{children:["Form a squadron from ",S.name," v",S.version]}),(0,t.jsxs)(l.DialogDescription,{children:["Step 2 of 2. ",(0,r.memberCount)(S)," member ships and a flagship are commissioned when you confirm."]})]}),(0,t.jsxs)(h.Table,{children:[(0,t.jsx)(h.TableHeader,{children:(0,t.jsxs)(h.TableRow,{children:[(0,t.jsx)(h.TableHead,{children:"Role"}),(0,t.jsx)(h.TableHead,{children:"Template"}),(0,t.jsx)(h.TableHead,{children:"Members"}),(0,t.jsx)(h.TableHead,{children:"Check-in"})]})}),(0,t.jsx)(h.TableBody,{children:F.map(e=>(0,t.jsxs)(h.TableRow,{children:[(0,t.jsx)(h.TableCell,{className:"font-mono",children:e.role}),(0,t.jsx)(h.TableCell,{className:"font-mono",children:e.template}),(0,t.jsx)(h.TableCell,{children:e.count}),(0,t.jsx)(h.TableCell,{children:void 0===e.checkInMinutes?"unknown":(0,r.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)(s.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!==x&&(0,t.jsx)(u.InlineError,{variant:"field",title:"Couldn’t form the squadron",description:x}),(0,t.jsxs)(l.DialogFooter,{children:[(0,t.jsx)(o.Button,{type:"button",disabled:d,onClick:()=>{v(1)},children:"Back"}),(0,t.jsx)(o.Button,{variant:"primary",isLoading:d,"data-testid":"form-squadron-submit",onClick:()=>{p(q)},children:d?"Forming":"Form squadron"})]})]})}e.s(["FormSquadronDialog",0,function(e){let{isOpen:s,onOpenChange:a,isPending:i}=e;return(0,t.jsx)(l.Dialog,{open:s,onOpenChange:e=>{i||a(e)},children:(0,t.jsx)(l.DialogContent,{size:"md","data-testid":"form-squadron-dialog",className:d.dialogSurface.phoneFullScreen,children:(0,t.jsx)(T,{...e})})})}],92963)},66616,e=>{"use strict";var t=e.i(49635);let s={"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 a(e){return s[e]?.word??e}e.s(["crewLineHarnessWord",0,function(e){return"chat"===e?"Chat":a(e)},"harnessDetection",0,function(e,s){if(void 0===e.version)return;if(void 0===e.modelsConfirmedAt||null===e.modelsConfirmedAt)return`${e.version} \xb7 no model confirmed`;let a=(0,t.relativeTime)(new Date(e.modelsConfirmedAt),s);return`${e.version} \xb7 models confirmed ${"Just now"===a?"just now":a}`},"harnessKind",0,function(e){return s[e]?.kind},"harnessWord",0,a])}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,92150,e=>{"use strict";var t=e.i(56420);let s={name:"boxes",size:24,node:[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]]};s.node;let a=(0,t.default)(s);e.s(["Boxes",0,a],92150)},22212,e=>{"use strict";var t=e.i(43476),s=e.i(53753),a=e.i(90063),i=e.i(94945);e.s(["Dialog",0,function(e){return(0,t.jsx)(s.Dialog.Root,{"data-slot":"dialog",...e})},"DialogClose",0,function(e){return(0,t.jsx)(s.Dialog.Close,{"data-slot":"dialog-close",...e})},"DialogContent",0,function({className:e,size:n,children:r,...o}){return(0,t.jsxs)(s.Dialog.Portal,{children:[(0,t.jsx)(s.Dialog.Backdrop,{"data-slot":"dialog-overlay",className:i.dialogSurface.overlay}),(0,t.jsx)(s.Dialog.Popup,{"data-slot":"dialog-content",className:(0,a.classNames)(i.dialogSurface.popup({size:n}),e),...o,children:r})]})},"DialogDescription",0,function({className:e,...n}){return(0,t.jsx)(s.Dialog.Description,{"data-slot":"dialog-description",className:(0,a.classNames)(i.dialogSurface.description,e),...n})},"DialogFooter",0,function({className:e,...s}){return(0,t.jsx)("div",{"data-slot":"dialog-footer",className:(0,a.classNames)(i.dialogSurface.footer,e),...s})},"DialogHeader",0,function({className:e,...s}){return(0,t.jsx)("div",{"data-slot":"dialog-header",className:(0,a.classNames)(i.dialogSurface.header,e),...s})},"DialogTitle",0,function({className:e,...n}){return(0,t.jsx)(s.Dialog.Title,{"data-slot":"dialog-title",className:(0,a.classNames)(i.dialogSurface.title,e),...n})}])},43988,e=>{"use strict";var t=e.i(43476),s=e.i(25913),a=e.i(90063);let i=(0,s.cva)("w-full min-w-0 resize-none rounded-md border border-input bg-card px-3 py-2 text-foreground shadow-sm transition-[border-color,box-shadow] duration-(--duration-fast) outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/22 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/16 disabled:cursor-not-allowed disabled:bg-muted disabled:opacity-50 disabled:shadow-none",{variants:{size:{md:"text-body",touch:"rounded-lg text-input-touch"},isMono:{true:"font-mono",false:""}},compoundVariants:[{size:"md",isMono:!0,className:"text-code"}],defaultVariants:{size:"md",isMono:!1}});e.s(["Textarea",0,function({className:e,size:s,isMono:n,rows:r=4,...o}){return(0,t.jsx)("textarea",{"data-slot":"textarea",rows:r,className:(0,a.classNames)(i({size:s,isMono:n}),e),...o})}])},95960,e=>{"use strict";var t=e.i(43476),s=e.i(92150),a=e.i(49287),i=e.i(86875),n=e.i(56420);let r={name:"tag-x",size:24,node:[["path",{d:"m16.5 6.5-3.914-3.914A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.43 2.43 0 0 0 3.42 0l1.79-1.79",key:"hu94c9"}],["path",{d:"m16.5 10.5 5 5",key:"1jo8bf"}],["path",{d:"m21.5 10.5-5 5",key:"jzei60"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]};r.node;let o=(0,n.default)(r);var l=e.i(63676),d=e.i(90063),c=e.i(80581);let m={"trierarch-plugin":i.ShipWheel,squadrons:s.Boxes,ship:a.Ship,gone:o};e.s(["LabelChip",0,function({chip:e,onRemove:s,testId:a,className:i,trailing:n,meaning:r}){let o="none"===e.mark?null:m[e.mark],u=`${e.key}=${e.value}`,h=void 0===r?(0,c.chipTitleOf)(e):`${(0,c.chipTitleOf)(e)}. ${r}`;return(0,t.jsxs)("span",{role:"group","aria-label":h,"data-slot":"label-chip","data-testid":a,title:h,className:(0,d.classNames)("inline-flex h-5.5 max-w-full min-w-0 shrink-0 items-center gap-1 rounded-sm border border-border bg-secondary px-1.5 font-mono text-id whitespace-nowrap text-foreground [&_svg]:size-3 [&_svg]:shrink-0 [&_svg]:text-muted-foreground","gone"===e.mark?"border-dashed":null,i),children:[null===o?null:(0,t.jsx)(o,{"aria-hidden":!0}),(0,t.jsxs)("span",{className:"truncate",children:[(0,t.jsxs)("span",{className:"text-muted-foreground",children:[e.key,"="]}),(0,t.jsx)("span",{className:"font-medium",children:e.value})]}),n,void 0===s?null:(0,t.jsx)("button",{type:"button","aria-label":`Remove ${u}`,onClick:s,className:"-mr-1 ml-0.5 inline-flex size-4 items-center justify-center rounded-xs text-muted-foreground hover:bg-accent hover:text-foreground focus-visible:outline-2 focus-visible:outline-ring",children:(0,t.jsx)(l.X,{"aria-hidden":!0})})]})}],95960)},67858,e=>{e.v(t=>Promise.all(["static/chunks/420usygo4rcxp.js","static/chunks/3vr80dn3nyqqi.js"].map(t=>e.l(t))).then(()=>t(59068)))},4032,e=>{"use strict";var t=e.i(43476),s=e.i(22768),a=e.i(74544),i=e.i(77071),n=e.i(63676),r=e.i(22016),o=e.i(71645),l=e.i(70703),d=e.i(78608),c=e.i(15905),m=e.i(6734),u=e.i(95960);let h=(0,l.default)(()=>e.A(67858).then(e=>e.LabelPicker),{loadableGenerated:{modules:[59068]},ssr:!1});function x({groups:e,picked:s,isDisabled:a,onAdd:n}){let[l,d]=(0,o.useState)(!1);return(0,t.jsxs)(m.Popover,{open:l,onOpenChange:d,children:[(0,t.jsx)(m.PopoverTrigger,{render:(0,t.jsx)(c.Button,{type:"button",variant:"ghost",size:"xs",icon:(0,t.jsx)(i.Plus,{}),disabled:a,"data-testid":"machine-labels-add"}),children:"Add label"}),(0,t.jsxs)(m.PopoverContent,{align:"start",sideOffset:6,className:"w-80 p-2","data-testid":"machine-labels-popover",children:[(0,t.jsx)("span",{className:"block px-2 pt-1 pb-2 text-body font-medium",children:"Machine label"}),(0,t.jsx)(h,{groups:e,pickedValueIds:s.map(e=>e.valueId),countWord:"machine",onPick:e=>{d(!1),n(e)}}),(0,t.jsxs)("p",{className:"mt-2 flex items-center justify-between gap-2 border-t border-border px-2 pt-2 text-meta text-muted-foreground",children:["Exact matches, all must hold.",(0,t.jsx)(r.default,{href:"/labels",className:"font-medium text-foreground hover:underline",children:"Manage labels"})]})]})]})}e.s(["MachineLabelsField",0,function({shipName:e,picked:i,groups:r,match:l,max:c,isDisabled:m,onAdd:h,onRemove:p,unknown:f=[],onRemoveUnknown:g}){let b=(0,d.noMatchWords)(i.length);return(0,t.jsxs)("div",{className:"flex flex-col gap-1.5","data-testid":"machine-labels",children:[(0,t.jsxs)("span",{className:"text-body font-medium",children:["Machine labels",(0,t.jsx)("span",{className:"font-normal text-muted-foreground",children:" optional"})]}),(0,t.jsxs)("div",{className:"flex min-h-(--size-control-sm) flex-wrap items-center gap-1.5",children:[0===i.length?(0,t.jsx)("span",{className:"text-meta text-muted-foreground",children:"Any machine"}):null,i.map((e,s)=>(0,t.jsxs)(o.Fragment,{children:[0===s?null:(0,t.jsx)("span",{className:"text-meta text-muted-foreground",children:"and"}),(0,t.jsx)(u.LabelChip,{chip:e,testId:"machine-label",...m?{}:{onRemove:()=>{p(e.valueId)}}})]},e.valueId)),f.map(e=>(0,t.jsxs)("span",{"data-testid":"machine-label-unknown",title:`${e}: not in this fleet`,className:"inline-flex h-5.5 items-center gap-1 rounded-sm border border-tone-attention-border bg-tone-attention-bg px-1.5 font-mono text-id text-tone-attention-fg [&_svg]:size-3",children:[(0,t.jsx)(s.CircleAlert,{"aria-hidden":!0}),e,void 0===g||m?null:(0,t.jsx)("button",{type:"button","aria-label":`Remove ${e}`,onClick:()=>{g(e)},className:"-mr-1 ml-0.5 inline-flex size-4 items-center justify-center rounded-xs hover:bg-accent focus-visible:outline-2 focus-visible:outline-ring",children:(0,t.jsx)(n.X,{"aria-hidden":!0})})]},e)),i.length+f.length>=c?null:(0,t.jsx)(x,{groups:r,picked:i,isDisabled:m,onAdd:h})]}),0===f.length?null:(0,t.jsxs)("p",{role:"alert","data-testid":"machine-labels-unknown-note",className:"text-meta text-tone-attention-fg",children:["Not in this fleet: ",f.join(", "),". Forming refuses ",1===f.length?"it":"them",": define ",1===f.length?"it":"them"," on the Labels page, or remove ",1===f.length?"it":"them"," here."]}),0===i.length?null:0===l.matching.length?(0,t.jsxs)("p",{role:"status","data-testid":"machine-labels-match",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 [&_svg]:mt-0.5 [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0",children:[(0,t.jsx)(a.Clock,{"aria-hidden":!0}),(0,t.jsxs)("span",{children:["No machine matches ",b.these,". You can still request: it waits on Needs crew until a machine ",b.carries,"."]})]}):(0,t.jsxs)("p",{className:"text-meta","data-testid":"machine-labels-match",children:["Matches ",l.matching.length," of ",l.total," ",1===l.total?"machine":"machines",": ",l.matching.join(", "),"."]}),(0,t.jsxs)("p",{className:"text-meta text-muted-foreground",children:["The plugin places ",e," only on a machine that carries every label here. Leave it empty for any machine."]})]})}])},92963,e=>{"use strict";var t=e.i(43476),s=e.i(10818),a=e.i(25398),i=e.i(71645),n=e.i(96994),r=e.i(84294),o=e.i(15905),l=e.i(22212),d=e.i(94945),c=e.i(91727),m=e.i(46033),u=e.i(14732),h=e.i(17981),x=e.i(16327),p=e.i(67927),f=e.i(85595),g=e.i(52886),b=e.i(90063),j=e.i(66616),v=e.i(12470),k=e.i(43988),y=e.i(4032);function w({id:e,label:s,isRequired:a,hint:i,children:n}){return(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsxs)(c.Label,{htmlFor:e,children:[s,(0,t.jsx)("span",{className:"font-normal text-muted-foreground",children:a?" required":" optional"})]}),n,void 0===i?null:(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:i})]})}function N({id:e,items:s,value:a,onPick:i,isDisabled:n,testId:r}){return(0,t.jsxs)(m.Select,{items:s,value:a,disabled:n,onValueChange:e=>{i("string"==typeof e?e:"")},children:[(0,t.jsx)(m.SelectTrigger,{id:e,"data-testid":r,children:(0,t.jsx)(m.SelectValue,{})}),(0,t.jsx)(m.SelectContent,{children:Object.entries(s).map(([e,s])=>(0,t.jsx)(m.SelectItem,{value:e,children:s},e))})]})}function C(e){return"string"==typeof e?e:JSON.stringify(e)}function S({member:e,offers:s,workspaces:a,machineLabels:r,isOpen:o,onOpenChange:l,isDisabled:d,error:c,onChange:m}){let u={workspace:(0,i.useId)(),harness:(0,i.useId)(),options:(0,i.useId)(),firstPrompt:(0,i.useId)(),parameters:(0,i.useId)()},D=(0,n.missingOf)(e),T=s.find(t=>t.harness===e.harness),q={"":"The trierarch’s default",...Object.fromEntries(s.map(e=>[e.harness,(0,j.harnessWord)(e.harness)])),...""===e.harness||T?{}:{[e.harness]:(0,j.harnessWord)(e.harness)}},F=new Set((T?.options??[]).map(e=>e.name)),I=Object.entries(e.options).filter(([e])=>!F.has(e)),O=o?x.ChevronDown:p.ChevronRight;return(0,t.jsxs)("section",{"aria-label":e.slot,"data-testid":"member-crew-section",className:(0,b.classNames)("flex flex-col rounded-lg border bg-card",void 0===c?"border-border":"border-tone-attention-border"),children:[(0,t.jsxs)("button",{type:"button","aria-expanded":o,"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:()=>{l(!o)},children:[(0,t.jsx)(O,{"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===D.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)(f.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)(g.CircleDashed,{"aria-hidden":!0}),"Needs ",D.join(", ")]})]}),void 0===c?null:(0,t.jsx)("div",{className:"px-3.5 pb-3",children:(0,t.jsx)(h.InlineError,{variant:"field",title:c})}),o?(0,t.jsxs)("div",{className:"flex flex-col gap-4 border-t border-border px-3.5 py-3.5",children:[(0,t.jsx)(w,{id:u.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)(N,{id:u.workspace,items:a,value:void 0===e.workspace?"":(0,n.workspaceItemOf)(e.workspace),isDisabled:d,testId:"member-crew-workspace",onPick:t=>{m({...e,workspace:(0,n.workspaceFromItem)(t)})}})}),(0,t.jsx)(w,{id:u.harness,label:"Harness",children:(0,t.jsx)(N,{id:u.harness,items:q,value:e.harness,isDisabled:d,testId:"member-crew-harness",onPick:t=>{m({...e,harness:t})}})}),(T?.options??[]).map((s,a)=>(0,t.jsx)(w,{id:`${u.options}-${String(a)}`,label:s.name,children:(0,t.jsx)(N,{id:`${u.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(C(e.options[s.name]))?{[C(e.options[s.name])]:C(e.options[s.name])}:{}},value:void 0===e.options[s.name]?"":C(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));m({...e,options:""===t?a:{...a,[s.name]:t}})}})},s.name)),0===I.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:I.map(([e,s])=>(0,t.jsxs)("li",{className:"rounded-sm bg-secondary px-1.5 py-0.5 font-mono text-id",children:[e,"=",C(s)]},e))})]}),void 0===r?null:(0,t.jsx)(y.MachineLabelsField,{shipName:e.slot,picked:r.chipsOf(e.machineLabels),groups:r.groups,match:r.matchOf(e.machineLabels),max:r.max,isDisabled:d,unknown:e.unknownLabels,onAdd:t=>{m({...e,machineLabels:[...e.machineLabels,t]})},onRemove:t=>{m({...e,machineLabels:e.machineLabels.filter(e=>e!==t)})},onRemoveUnknown:t=>{m({...e,unknownLabels:e.unknownLabels.filter(e=>e!==t)})}}),(0,t.jsx)(w,{id:u.firstPrompt,label:"First prompt",hint:"The session starts with it, on its first start only.",children:(0,t.jsx)(k.Textarea,{id:u.firstPrompt,value:e.firstPrompt,disabled:d,"data-testid":"member-crew-first-prompt",rows:2,onChange:t=>{m({...e,firstPrompt:t.target.value})}})}),e.parameters.map((s,a)=>(0,t.jsx)(w,{id:`${u.parameters}-${String(a)}`,label:s.name,isRequired:!0,hint:s.description,children:(0,t.jsx)(v.Input,{id:`${u.parameters}-${String(a)}`,value:s.value,disabled:d,"aria-invalid":""===s.value.trim()||void 0,"data-testid":"member-crew-parameter",onChange:t=>{m({...e,parameters:e.parameters.map(e=>e.name===s.name?{...e,value:t.target.value}:e)})}})},s.name))]}):null]})}function D({drafts:e,crew:s,isPending:a,error:r,onBack:d,onSubmit:u}){let x=(0,i.useId)(),[p,f]=(0,i.useState)(()=>(0,n.membersOf)(e,s.context)),[g,b]=(0,i.useState)(()=>new Set((0,n.membersOf)(e,s.context).filter(e=>(0,n.missingOf)(e).length>0).map(e=>e.slot))),j=(0,n.workspaceItemsOf)(s.offers,p),{ready:v,total:k}=(0,n.readyCount)(p),y=v===k,w=void 0===r?void 0:(0,n.labelErrorSlot)(r,{members:p,context:s.context}),N=p.some(e=>void 0===e.workspace);return(0,t.jsxs)(t.Fragment,{children:[0===s.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,N&&Object.keys(j).length>0?(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)(c.Label,{htmlFor:x,children:"Workspace for every member without one"}),(0,t.jsxs)(m.Select,{items:{"":"Pick a workspace",...j},value:"",disabled:a,onValueChange:e=>{let t="string"==typeof e?(0,n.workspaceFromItem)(e):void 0;void 0!==t&&f(e=>(0,n.withWorkspaceForAll)(e,t))},children:[(0,t.jsx)(m.SelectTrigger,{id:x,"data-testid":"form-squadron-workspace-all",children:(0,t.jsx)(m.SelectValue,{})}),(0,t.jsx)(m.SelectContent,{children:Object.entries(j).map(([e,s])=>(0,t.jsx)(m.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)(S,{member:e,offers:s.offers,workspaces:j,...void 0===s.machineLabels?{}:{machineLabels:s.machineLabels},isOpen:g.has(e.slot)||w===e.slot,onOpenChange:t=>{b(s=>{let a=new Set(s);return t?a.add(e.slot):a.delete(e.slot),a})},isDisabled:a,...w===e.slot&&void 0!==r?{error:r}:{},onChange:e=>{f(t=>t.map(t=>t.slot===e.slot?e:t))}},e.slot))}),void 0!==r&&void 0===w?(0,t.jsx)(h.InlineError,{variant:"field",title:"Couldn’t form the squadron",description:r}):null,(0,t.jsxs)(l.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:[v," of ",k," ",1===k?"member":"members"," ready"]}),(0,t.jsx)(o.Button,{type:"button",disabled:a,onClick:d,children:"Back"}),(0,t.jsx)(o.Button,{variant:"primary",isLoading:a,disabled:!y,"data-testid":"form-squadron-submit",onClick:()=>{u(p)},children:a?"Forming":"Form squadron"})]})]})}function T({blueprints:e,templates:n,isPending:d,error:x,onSubmit:p,initial:f,crew:g,onPicked:b}){let[j,v]=(0,i.useState)(1),[k,y]=(0,i.useState)(f?.key??e[0]?.key),w=e.find(e=>e.key===k)??e[0],[N,C]=(0,i.useState)(f?.version??w?.versions[0]?.version),S=w?.versions.find(e=>e.version===N)??w?.versions[0];if(!w||!S)return null;if(1===j){let s=Object.fromEntries(w.versions.map((e,t)=>[String(e.version),`v${String(e.version)}${0===t?" (latest)":""}`]));return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(l.DialogHeader,{children:[(0,t.jsx)(l.DialogTitle,{children:"Form a squadron"}),(0,t.jsx)(l.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===w.key;return(0,t.jsxs)("button",{type:"button",role:"radio","aria-checked":a,"data-testid":"form-squadron-blueprint",onClick:()=>{y(e.key),C(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)(c.Label,{htmlFor:"form-squadron-version",children:"Version"}),(0,t.jsxs)(m.Select,{items:s,value:String(S.version),onValueChange:e=>{C(Number(e))},children:[(0,t.jsx)(m.SelectTrigger,{id:"form-squadron-version","aria-label":"Version",children:(0,t.jsx)(m.SelectValue,{})}),(0,t.jsx)(m.SelectContent,{children:Object.entries(s).map(([e,s])=>(0,t.jsx)(m.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)(l.DialogFooter,{children:[(0,t.jsx)(l.DialogClose,{render:(0,t.jsx)(o.Button,{type:"button"}),children:"Cancel"}),(0,t.jsx)(o.Button,{variant:"primary","data-testid":"form-squadron-preview",onClick:()=>{b?.({repository:S.repository,name:S.name,version:S.version}),v(2)},children:void 0===g?"Preview roles":"Next: the members"})]})]})}let q={repository:S.repository,name:S.name,version:S.version};if(void 0!==g)return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(l.DialogHeader,{children:[(0,t.jsxs)(l.DialogTitle,{children:["Form a squadron from ",S.name," v",S.version]}),(0,t.jsxs)(l.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,r.memberCount)(S)," member ships and a flagship, and requests a crew for each member."]})]}),"ready"===g.state?(0,t.jsx)(D,{drafts:g.members,crew:g,isPending:d,...void 0===x?{}:{error:x},onBack:()=>{v(1)},onSubmit:e=>{p(q,e)}}):(0,t.jsxs)(t.Fragment,{children:["loading"===g.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)(h.InlineError,{variant:"field",title:"Couldn’t read the members’ crew settings",description:g.error??"Try again in a moment."}),(0,t.jsx)("div",{children:(0,t.jsx)(o.Button,{size:"sm",icon:(0,t.jsx)(a.RotateCw,{}),onClick:g.onRetry,children:"Try again"})})]}),(0,t.jsxs)(l.DialogFooter,{children:[(0,t.jsx)(o.Button,{type:"button",onClick:()=>{v(1)},children:"Back"}),(0,t.jsx)(o.Button,{variant:"primary",disabled:!0,"data-testid":"form-squadron-submit",children:"Form squadron"})]})]})]});let F=(0,r.rolePreviews)(S,n);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(l.DialogHeader,{children:[(0,t.jsxs)(l.DialogTitle,{children:["Form a squadron from ",S.name," v",S.version]}),(0,t.jsxs)(l.DialogDescription,{children:["Step 2 of 2. ",(0,r.memberCount)(S)," member ships and a flagship are commissioned when you confirm."]})]}),(0,t.jsxs)(u.Table,{children:[(0,t.jsx)(u.TableHeader,{children:(0,t.jsxs)(u.TableRow,{children:[(0,t.jsx)(u.TableHead,{children:"Role"}),(0,t.jsx)(u.TableHead,{children:"Template"}),(0,t.jsx)(u.TableHead,{children:"Members"}),(0,t.jsx)(u.TableHead,{children:"Check-in"})]})}),(0,t.jsx)(u.TableBody,{children:F.map(e=>(0,t.jsxs)(u.TableRow,{children:[(0,t.jsx)(u.TableCell,{className:"font-mono",children:e.role}),(0,t.jsx)(u.TableCell,{className:"font-mono",children:e.template}),(0,t.jsx)(u.TableCell,{children:e.count}),(0,t.jsx)(u.TableCell,{children:void 0===e.checkInMinutes?"unknown":(0,r.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)(s.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!==x&&(0,t.jsx)(h.InlineError,{variant:"field",title:"Couldn’t form the squadron",description:x}),(0,t.jsxs)(l.DialogFooter,{children:[(0,t.jsx)(o.Button,{type:"button",disabled:d,onClick:()=>{v(1)},children:"Back"}),(0,t.jsx)(o.Button,{variant:"primary",isLoading:d,"data-testid":"form-squadron-submit",onClick:()=>{p(q)},children:d?"Forming":"Form squadron"})]})]})}e.s(["FormSquadronDialog",0,function(e){let{isOpen:s,onOpenChange:a,isPending:i}=e;return(0,t.jsx)(l.Dialog,{open:s,onOpenChange:e=>{i||a(e)},children:(0,t.jsx)(l.DialogContent,{size:"md","data-testid":"form-squadron-dialog",className:d.dialogSurface.phoneFullScreen,children:(0,t.jsx)(T,{...e})})})}],92963)},66616,e=>{"use strict";var t=e.i(49635);let s={"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 a(e){return s[e]?.word??e}e.s(["crewLineHarnessWord",0,function(e){return"chat"===e?"Chat":a(e)},"harnessDetection",0,function(e,s){if(void 0===e.version)return;if(void 0===e.modelsConfirmedAt||null===e.modelsConfirmedAt)return`${e.version} \xb7 no model confirmed`;let a=(0,t.relativeTime)(new Date(e.modelsConfirmedAt),s);return`${e.version} \xb7 models confirmed ${"Just now"===a?"just now":a}`},"harnessKind",0,function(e){return s[e]?.kind},"harnessWord",0,a])}]);
|