@aeolus-fleet/console 0.19.0 → 0.20.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/BUILD_ID +1 -1
- package/.next/app-path-routes-manifest.json +6 -0
- package/.next/build-manifest.json +3 -3
- package/.next/fallback-build-manifest.json +3 -3
- package/.next/prerender-manifest.json +3 -3
- package/.next/routes-manifest.json +40 -0
- package/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/api/squadrons/[procedure]/route.js +1 -1
- package/.next/server/app/api/squadrons/[procedure]/route.js.nft.json +1 -1
- package/.next/server/app/api/trierarch-plugin/[procedure]/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/trierarch-plugin/[procedure]/route/build-manifest.json +12 -0
- package/.next/server/app/api/trierarch-plugin/[procedure]/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/trierarch-plugin/[procedure]/route.js +6 -0
- package/.next/server/app/api/trierarch-plugin/[procedure]/route.js.nft.json +1 -0
- package/.next/server/app/api/trierarch-plugin/[procedure]/route_client-reference-manifest.js +3 -0
- package/.next/server/app/health/route.js +1 -1
- package/.next/server/app/health/route.js.nft.json +1 -1
- package/.next/server/app/inbox/page.js.nft.json +1 -1
- package/.next/server/app/inbox/page_client-reference-manifest.js +1 -1
- package/.next/server/app/labels/page/app-paths-manifest.json +3 -0
- package/.next/server/app/labels/page/build-manifest.json +20 -0
- package/.next/server/app/labels/page/next-font-manifest.json +11 -0
- package/.next/server/app/labels/page/react-loadable-manifest.json +1 -0
- package/.next/server/app/labels/page/server-reference-manifest.json +4 -0
- package/.next/server/app/labels/page.js +14 -0
- package/.next/server/app/labels/page.js.nft.json +1 -0
- package/.next/server/app/labels/page_client-reference-manifest.js +3 -0
- package/.next/server/app/needs-attention/page.js.nft.json +1 -1
- package/.next/server/app/needs-attention/page_client-reference-manifest.js +1 -1
- package/.next/server/app/needs-crew/page/app-paths-manifest.json +3 -0
- package/.next/server/app/needs-crew/page/build-manifest.json +20 -0
- package/.next/server/app/needs-crew/page/next-font-manifest.json +11 -0
- package/.next/server/app/needs-crew/page/react-loadable-manifest.json +1 -0
- package/.next/server/app/needs-crew/page/server-reference-manifest.json +4 -0
- package/.next/server/app/needs-crew/page.js +14 -0
- package/.next/server/app/needs-crew/page.js.nft.json +1 -0
- package/.next/server/app/needs-crew/page_client-reference-manifest.js +3 -0
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings/page.js.nft.json +1 -1
- package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/.next/server/app/ships/[shipId]/page.js.nft.json +1 -1
- package/.next/server/app/ships/[shipId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/sign-in/failed/page.js.nft.json +1 -1
- package/.next/server/app/sign-in/failed/page_client-reference-manifest.js +1 -1
- package/.next/server/app/sign-in/page.js.nft.json +1 -1
- package/.next/server/app/sign-in/page_client-reference-manifest.js +1 -1
- package/.next/server/app/squadrons/[squadronId]/page.js.nft.json +1 -1
- package/.next/server/app/squadrons/[squadronId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/squadrons/blueprints/[name]/page.js.nft.json +1 -1
- package/.next/server/app/squadrons/blueprints/[name]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/squadrons/connection/route.js +3 -3
- package/.next/server/app/squadrons/connection/route.js.nft.json +1 -1
- package/.next/server/app/squadrons/page.js.nft.json +1 -1
- package/.next/server/app/squadrons/page_client-reference-manifest.js +1 -1
- package/.next/server/app/squadrons/templates/[name]/page.js.nft.json +1 -1
- package/.next/server/app/squadrons/templates/[name]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/trierarch-plugin/connection/route/app-paths-manifest.json +3 -0
- package/.next/server/app/trierarch-plugin/connection/route/build-manifest.json +12 -0
- package/.next/server/app/trierarch-plugin/connection/route/server-reference-manifest.json +4 -0
- package/.next/server/app/trierarch-plugin/connection/route.js +8 -0
- package/.next/server/app/trierarch-plugin/connection/route.js.nft.json +1 -0
- package/.next/server/app/trierarch-plugin/connection/route_client-reference-manifest.js +3 -0
- package/.next/server/app/trierarchs/[shipId]/page/app-paths-manifest.json +3 -0
- package/.next/server/app/trierarchs/[shipId]/page/build-manifest.json +20 -0
- package/.next/server/app/trierarchs/[shipId]/page/next-font-manifest.json +11 -0
- package/.next/server/app/trierarchs/[shipId]/page/react-loadable-manifest.json +1 -0
- package/.next/server/app/trierarchs/[shipId]/page/server-reference-manifest.json +4 -0
- package/.next/server/app/trierarchs/[shipId]/page.js +14 -0
- package/.next/server/app/trierarchs/[shipId]/page.js.nft.json +1 -0
- package/.next/server/app/trierarchs/[shipId]/page_client-reference-manifest.js +3 -0
- package/.next/server/app/trierarchs/page/app-paths-manifest.json +3 -0
- package/.next/server/app/trierarchs/page/build-manifest.json +20 -0
- package/.next/server/app/trierarchs/page/next-font-manifest.json +11 -0
- package/.next/server/app/trierarchs/page/react-loadable-manifest.json +1 -0
- package/.next/server/app/trierarchs/page/server-reference-manifest.json +4 -0
- package/.next/server/app/trierarchs/page.js +14 -0
- package/.next/server/app/trierarchs/page.js.nft.json +1 -0
- package/.next/server/app/trierarchs/page_client-reference-manifest.js +3 -0
- package/.next/server/app/version/route.js +3 -2
- package/.next/server/app/version/route.js.nft.json +1 -1
- package/.next/server/app-paths-manifest.json +6 -0
- package/.next/server/chunks/04lx_next-internal_server_app_api_trierarch-plugin_[procedure]_route_actions_0pov8t_.js +3 -0
- package/.next/server/chunks/1eui__next-internal_server_app_trierarch-plugin_connection_route_actions_1jgdi18.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__0w2mqex._.js → [root-of-the-server]__14rtv1n._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__1c6takz._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1f7engf._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1f_8ohl._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1h3r48l._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1kc3njk._.js +3 -0
- package/.next/server/chunks/_0h366h9._.js +3 -0
- package/.next/server/chunks/packages_console_lib_connect-plugin_ts_197hf-1._.js +3 -0
- package/.next/server/chunks/ssr/0ysl_console__next-internal_server_app_trierarchs_[shipId]_page_actions_0e_rw4u.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0qbhnxj._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__18derwo._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__18g_7b-._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__1m1u7bl._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__1uan58j._.js +3 -3
- package/.next/server/chunks/ssr/_06c6zlg._.js +3 -0
- package/.next/server/chunks/ssr/{_0plfddz._.js → _0dogq79._.js} +2 -2
- package/.next/server/chunks/ssr/_0exrpxl._.js +3 -0
- package/.next/server/chunks/ssr/_0gt230s._.js +3 -0
- package/.next/server/chunks/ssr/_0rvujxo._.js +3 -0
- package/.next/server/chunks/ssr/{_00yiulp._.js → _0s2b6hb._.js} +2 -2
- package/.next/server/chunks/ssr/{_050suap._.js → _0sko-kt._.js} +2 -2
- package/.next/server/chunks/ssr/_0snpwr0._.js +3 -0
- package/.next/server/chunks/ssr/{_0igx2qf._.js → _0sv2xqb._.js} +2 -2
- package/.next/server/chunks/ssr/_0udw2gs._.js +3 -0
- package/.next/server/chunks/ssr/_0wr_wnm._.js +3 -0
- package/.next/server/chunks/ssr/{_0-rsrfr._.js → _0wtj0e-._.js} +2 -2
- package/.next/server/chunks/ssr/_0xc3etp._.js +3 -0
- package/.next/server/chunks/ssr/_0xi2v5k._.js +3 -0
- package/.next/server/chunks/ssr/_0xvm1ng._.js +3 -0
- package/.next/server/chunks/ssr/_0ziovn_._.js +3 -0
- package/.next/server/chunks/ssr/_11cgy8n._.js +3 -0
- package/.next/server/chunks/ssr/_1442xyx._.js +3 -0
- package/.next/server/chunks/ssr/_14rijy-._.js +3 -0
- package/.next/server/chunks/ssr/_16jiag3._.js +3 -0
- package/.next/server/chunks/ssr/_17u4fan._.js +3 -0
- package/.next/server/chunks/ssr/_181kpys._.js +3 -0
- package/.next/server/chunks/ssr/_19e0e-9._.js +3 -3
- package/.next/server/chunks/ssr/_1_h504-._.js +3 -0
- package/.next/server/chunks/ssr/_1al_cqt._.js +3 -0
- package/.next/server/chunks/ssr/_1bmk6y_._.js +3 -0
- package/.next/server/chunks/ssr/_1cn9_0f._.js +3 -0
- package/.next/server/chunks/ssr/_1d6cgif._.js +3 -0
- package/.next/server/chunks/ssr/_1ejhqt9._.js +3 -0
- package/.next/server/chunks/ssr/_1ezhc7m._.js +3 -0
- package/.next/server/chunks/ssr/_1g2wuzd._.js +1 -1
- package/.next/server/chunks/ssr/_1hcta3c._.js +3 -0
- package/.next/server/chunks/ssr/_1kv8ma5._.js +3 -0
- package/.next/server/chunks/ssr/{_1s07u90._.js → _1lu1eda._.js} +2 -2
- package/.next/server/chunks/ssr/_1ntb2un._.js +3 -0
- package/.next/server/chunks/ssr/_1ommvbv._.js +3 -0
- package/.next/server/chunks/ssr/_1on9mjs._.js +3 -0
- package/.next/server/chunks/ssr/_1oofkty._.js +3 -0
- package/.next/server/chunks/ssr/_1r6ce_7._.js +3 -0
- package/.next/server/chunks/ssr/{_1s8-j5t._.js → _1ub6rp3._.js} +2 -2
- package/.next/server/chunks/ssr/_208q2q8._.js +3 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_0kq7z60._.js +1 -1
- package/.next/server/chunks/ssr/packages_console_03isfmy._.js +3 -0
- package/.next/server/chunks/ssr/packages_console_0edevze._.js +3 -0
- package/.next/server/chunks/ssr/packages_console_0oso305._.js +3 -0
- package/.next/server/chunks/ssr/packages_console_0y7h5dm._.js +3 -0
- package/.next/server/chunks/ssr/packages_console_10fqil_._.js +1 -1
- package/.next/server/chunks/ssr/packages_console_1stwpsk._.js +3 -0
- package/.next/server/chunks/ssr/packages_console__next-internal_server_app_labels_page_actions_0-7_20w.js +3 -0
- package/.next/server/chunks/ssr/packages_console__next-internal_server_app_needs-crew_page_actions_0rw7fgn.js +3 -0
- package/.next/server/chunks/ssr/packages_console__next-internal_server_app_trierarchs_page_actions_1zds6hw.js +3 -0
- package/.next/server/chunks/ssr/packages_console_app_inbox_page_tsx_1bpmlpx._.js +1 -1
- package/.next/server/chunks/ssr/packages_console_app_labels_page_tsx_0xxovjk._.js +3 -0
- package/.next/server/chunks/ssr/packages_console_app_needs-attention_page_tsx_1agfico._.js +1 -1
- package/.next/server/chunks/ssr/packages_console_app_page_tsx_16ln4px._.js +1 -1
- package/.next/server/chunks/ssr/packages_console_app_providers_tsx_06ai92n._.js +1 -1
- package/.next/server/chunks/ssr/packages_console_app_settings_page_tsx_1zqt7sk._.js +1 -1
- package/.next/server/chunks/ssr/packages_console_app_ships_[shipId]_page_tsx_0fudjay._.js +1 -1
- package/.next/server/chunks/ssr/packages_console_app_squadrons_[squadronId]_page_tsx_1umxs1g._.js +1 -1
- package/.next/server/chunks/ssr/packages_console_app_squadrons_page_tsx_1w6ym6z._.js +1 -1
- package/.next/server/chunks/ssr/packages_console_app_trierarchs_[shipId]_page_tsx_1rqyoj3._.js +3 -0
- package/.next/server/chunks/ssr/packages_console_components_1-5gwzg._.js +3 -0
- package/.next/server/chunks/ssr/packages_console_components_atoms_select_tsx_1v_3j3i._.js +1 -1
- package/.next/server/chunks/ssr/packages_console_components_organisms_form-squadron_tsx_1-qlsje._.js +3 -0
- package/.next/server/middleware-build-manifest.js +3 -3
- package/.next/server/next-font-manifest.js +1 -1
- package/.next/server/next-font-manifest.json +16 -0
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.js +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/038sk3qwghvto.js +1 -0
- package/.next/static/chunks/0f5-vxw1bk8ym.js +1 -0
- package/.next/static/chunks/0y1nvhxr03jkb.js +1 -0
- package/.next/static/chunks/{2ff-56ohrio7h.js → 0z1nza3zgavbi.js} +1 -1
- package/.next/static/chunks/177iv_tzmr_0a.js +1 -0
- package/.next/static/chunks/1auwxv_urmljv.js +1 -0
- package/.next/static/chunks/1bvfk_-_enrxp.js +1 -0
- package/.next/static/chunks/1ct431l_sosvm.js +1 -0
- package/.next/static/chunks/1h0f7mfr5wxsj.js +1 -0
- package/.next/static/chunks/1zuzmwfsw_7q0.js +1 -0
- package/.next/static/chunks/21y50ct8e_pis.js +1 -0
- package/.next/static/chunks/25amuen1qm2o7.js +1 -0
- package/.next/static/chunks/26dg2z_6kosr0.js +1 -0
- package/.next/static/chunks/28j4p-34f5axr.js +1 -0
- package/.next/static/chunks/28vyyv4krlzx3.js +1 -0
- package/.next/static/chunks/2b-ho-tbr3sac.js +1 -0
- package/.next/static/chunks/2r01e5tqyyrsv.js +1 -0
- package/.next/static/chunks/2r2aklt62ojhs.js +1 -0
- package/.next/static/chunks/2spn0c35v7c1b.js +1 -0
- package/.next/static/chunks/2wnrtdpkhbd_j.js +1 -0
- package/.next/static/chunks/{0hl9b82m3b_kf.js → 2zu1o4z0tmf0-.js} +1 -1
- package/.next/static/chunks/3061rp6nl670n.js +1 -0
- package/.next/static/chunks/32oc7qg77tpjj.js +1 -0
- package/.next/static/chunks/36_a72wj7_f-y.js +1 -0
- package/.next/static/chunks/3ba10-qig9f07.js +1 -0
- package/.next/static/chunks/3drxrwegn5v1p.css +3 -0
- package/.next/static/chunks/3jhje-hiar2ex.js +1 -0
- package/.next/static/chunks/3jsj5ozfio3me.js +1 -0
- package/.next/static/chunks/3pkfx52bufv4g.js +1 -0
- package/.next/static/chunks/3pu5ywtisj_fp.js +1 -0
- package/.next/static/chunks/{2z2hhi291ems4.js → 3splvoavlf-cc.js} +12 -12
- package/.next/static/chunks/{2quoh5csh67oz.js → 3t2amxc2hojri.js} +1 -1
- package/.next/static/chunks/3vl7dc6v-u8w0.js +1 -0
- package/.next/static/chunks/3x_52f9if0z-8.js +1 -0
- package/.next/static/chunks/3z61krti-vbu2.js +1 -0
- package/.next/static/chunks/{1cbzjk-qf984o.js → 414186x82sxkk.js} +1 -1
- package/.next/static/chunks/42y_hgylfwlq5.js +1 -0
- package/README.md +1 -0
- package/package.json +3 -3
- package/.next/server/chunks/[root-of-the-server]__0eg7gro._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__11ajlfh._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1w1vtvn._.js +0 -3
- package/.next/server/chunks/_1mul6_v._.js +0 -3
- package/.next/server/chunks/ssr/_01eh2h5._.js +0 -3
- package/.next/server/chunks/ssr/_05wjy-d._.js +0 -3
- package/.next/server/chunks/ssr/_09pq8b7._.js +0 -3
- package/.next/server/chunks/ssr/_0_6abve._.js +0 -3
- package/.next/server/chunks/ssr/_0aqa8e3._.js +0 -3
- package/.next/server/chunks/ssr/_0c1ebla._.js +0 -3
- package/.next/server/chunks/ssr/_0g98qoq._.js +0 -3
- package/.next/server/chunks/ssr/_0k0kffc._.js +0 -3
- package/.next/server/chunks/ssr/_0ksc8ky._.js +0 -3
- package/.next/server/chunks/ssr/_0nxk8e5._.js +0 -3
- package/.next/server/chunks/ssr/_0sh180u._.js +0 -3
- package/.next/server/chunks/ssr/_0t1jjxf._.js +0 -3
- package/.next/server/chunks/ssr/_0vz-_zq._.js +0 -3
- package/.next/server/chunks/ssr/_0y_ez3b._.js +0 -3
- package/.next/server/chunks/ssr/_0zz00ec._.js +0 -3
- package/.next/server/chunks/ssr/_101_mtq._.js +0 -3
- package/.next/server/chunks/ssr/_10vocmg._.js +0 -3
- package/.next/server/chunks/ssr/_16klr-g._.js +0 -3
- package/.next/server/chunks/ssr/_1_hm4gt._.js +0 -3
- package/.next/server/chunks/ssr/_1c2ijn5._.js +0 -3
- package/.next/server/chunks/ssr/_1jgnfkf._.js +0 -3
- package/.next/server/chunks/ssr/_1m_b36m._.js +0 -3
- package/.next/server/chunks/ssr/_1pif908._.js +0 -3
- package/.next/server/chunks/ssr/_20fp5al._.js +0 -3
- package/.next/server/chunks/ssr/packages_console_components_1_4zc74._.js +0 -3
- package/.next/static/chunks/04p19br-6pr3q.js +0 -1
- package/.next/static/chunks/05xsztb02v-3h.js +0 -1
- package/.next/static/chunks/0atm4wesk-4u8.js +0 -1
- package/.next/static/chunks/0es5vdu6lt-lm.css +0 -3
- package/.next/static/chunks/0jkliy--t1bbh.js +0 -1
- package/.next/static/chunks/0nchi43nyih52.js +0 -1
- package/.next/static/chunks/0oh4dxohbk7m8.js +0 -1
- package/.next/static/chunks/0w8wux_7extu3.js +0 -1
- package/.next/static/chunks/0xdkx7wg739q7.js +0 -1
- package/.next/static/chunks/1q-shkfypoia-.js +0 -1
- package/.next/static/chunks/1t5mkoni0wrc0.js +0 -1
- package/.next/static/chunks/21py3ha_f_e3-.js +0 -1
- package/.next/static/chunks/22wd2oyjf0iq_.js +0 -1
- package/.next/static/chunks/2mvb-x6v93lfc.js +0 -1
- package/.next/static/chunks/2t6jzvnrf9ejw.js +0 -1
- package/.next/static/chunks/32-17dotvltga.js +0 -1
- package/.next/static/chunks/3m4-wgj579r4x.js +0 -1
- package/.next/static/chunks/3tsjbqptivphr.js +0 -1
- package/.next/static/chunks/42-u_9nvmdste.js +0 -1
- /package/.next/static/{4BHf_wBvFUce1tC4Uw_GD → tBoOmC5nKBL5eqDmRV5Vd}/_buildManifest.js +0 -0
- /package/.next/static/{4BHf_wBvFUce1tC4Uw_GD → tBoOmC5nKBL5eqDmRV5Vd}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{4BHf_wBvFUce1tC4Uw_GD → tBoOmC5nKBL5eqDmRV5Vd}/_ssgManifest.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,90167,e=>{"use strict";var t=e.i(43476),s=e.i(18566),a=e.i(71645),n=e.i(41880),i=e.i(44824),l=e.i(45608),r=e.i(95475),o=e.i(2767),d=e.i(67927),c=e.i(85595),m=e.i(25398),u=e.i(90063),x=e.i(28459),h=e.i(69693),f=e.i(49635),p=e.i(46150),b=e.i(15905),g=e.i(14732),v=e.i(67874),j=e.i(17981),N=e.i(88393),y=e.i(39448),w=e.i(78865);function S({party:e}){let s=e.name===p.OPERATOR_NAME;return(0,t.jsx)(y.ShipName,{name:e.name,shipId:e.id,size:"meta",isOperator:s,isSuffixShown:!s})}function T({delivery:e}){let{sender:s,recipient:a}=e.message;return(0,t.jsxs)("span",{className:"flex min-w-0 flex-wrap items-baseline gap-x-1.5 text-meta text-muted-foreground",children:[(0,t.jsx)(S,{party:s}),(0,t.jsx)("span",{"aria-hidden":!0,children:"→"}),(0,t.jsx)("span",{className:"sr-only",children:"to"}),"ship"===a.kind?(0,t.jsx)(S,{party:a.ship}):(0,t.jsxs)("span",{children:["any ship of type ",a.type]})]})}function C({delivery:e}){let{payload:s,contentType:a}=e.message;return(0,t.jsx)("span",{className:(0,u.classNames)("block min-w-0 truncate text-foreground",(0,h.isJson)(a)?"font-mono text-id":"text-body max-sm:text-body-touch"),title:s,children:s.split("\n")[0]})}function k(e){return`Received ${String(e.attempts)} times, never acknowledged.`}function I(e){var t;return`the message from ${e.message.sender.name} to ${"ship"===(t=e.message.recipient).kind?t.ship.name:`any ship of type ${t.type}`}`}function R({delivery:e,onResend:s,onDismiss:a,pendingIds:n,layout:i}){let l=n.has(e.deliveryId),r="phone"===i;if(void 0===s&&void 0===a)return null;let o=void 0!==s&&(0,x.canResend)(e)?(0,t.jsx)(b.Button,{size:r?"touch":"sm",variant:r?"primary":"secondary",icon:(0,t.jsx)(m.RotateCw,{"aria-hidden":!0}),isLoading:l,"data-testid":"attention-resend","aria-label":`Resend ${I(e)}`,onClick:()=>{s(e.deliveryId)},className:r?"flex-1":void 0,children:"Resend"}):null,d=void 0===a?null:(0,t.jsx)(b.Button,{size:r?"touch":"sm",variant:r?"secondary":"ghost",disabled:l,"data-testid":"attention-dismiss","aria-label":`Dismiss ${I(e)}`,onClick:()=>{a(e.deliveryId)},className:r?"flex-1":void 0,children:"Dismiss"});return r?(0,t.jsxs)("div",{className:"flex gap-2 pt-1",children:[d,o]}):(0,t.jsxs)("div",{className:"flex items-center justify-end gap-1.5",children:[o,d]})}function O({deliveries:e,onOpen:s,now:a,...n}){return(0,t.jsxs)("div",{className:"flex flex-col gap-2 max-sm:hidden",children:[(0,t.jsxs)(g.Table,{"aria-label":"Undeliverable deliveries",children:[(0,t.jsx)(g.TableHeader,{children:(0,t.jsxs)(g.TableRow,{children:[(0,t.jsx)(g.TableHead,{children:"State"}),(0,t.jsx)(g.TableHead,{children:"Message"}),(0,t.jsx)(g.TableHead,{children:"Reason"}),(0,t.jsx)(g.TableHead,{children:"Since"}),(0,t.jsx)(g.TableHead,{children:"Actions"})]})}),(0,t.jsx)(g.TableBody,{children:e.map(e=>{let i=new Date(e.since);return(0,t.jsxs)(g.TableRow,{"data-testid":"attention-row","data-delivery-id":e.deliveryId,children:[(0,t.jsx)(g.TableCell,{className:"align-top",children:(0,t.jsx)(w.StatusBadge,{status:"undeliverable"})}),(0,t.jsx)(g.TableCell,{className:"max-w-96 align-top",children:(0,t.jsxs)("button",{type:"button","aria-label":`Open ${I(e)}`,onClick:()=>{s(e)},className:"flex w-full min-w-0 flex-col gap-0.5 rounded-xs text-left focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",children:[(0,t.jsx)(C,{delivery:e}),(0,t.jsx)(T,{delivery:e})]})}),(0,t.jsx)(g.TableCell,{className:"max-w-48 align-top text-meta whitespace-normal text-muted-foreground",children:k(e)}),(0,t.jsx)(g.TableCell,{className:"align-top",children:(0,t.jsxs)("span",{className:"flex flex-col gap-0.5 tabular-nums",children:[(0,t.jsx)("time",{dateTime:e.since,title:(0,f.fullDateTime)(i),className:"text-body text-foreground",children:(0,f.shortDateTime)(i)}),(0,t.jsxs)("span",{className:"text-meta text-muted-foreground",children:[(0,f.duration)(i,a)," ago"]})]})}),(0,t.jsx)(g.TableCell,{className:"align-top",children:(0,t.jsx)(R,{delivery:e,layout:"table",...n})})]},e.deliveryId)})})]}),(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:"Resend creates a new message with the same payload, linked to the original. Dismiss marks the delivery resolved. Abandoned deliveries are not listed here."})]})}function L({deliveries:e,onOpen:s,now:a,...n}){return(0,t.jsx)("ul",{"aria-label":"Undeliverable deliveries",className:"flex flex-col gap-3 sm:hidden",children:e.map(e=>{let i=new Date(e.since),l=a.getTime()-i.getTime()<864e5?(0,f.clockTime)(i):(0,f.shortDateTime)(i);return(0,t.jsxs)("li",{"data-testid":"attention-row","data-delivery-id":e.deliveryId,className:"flex flex-col gap-1.5 rounded-lg border border-border bg-card px-3.5 py-3",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsx)(w.StatusBadge,{status:"undeliverable"}),(0,t.jsxs)("button",{type:"button","aria-label":`Open ${I(e)}`,onClick:()=>{s(e)},className:"inline-flex items-center gap-1 rounded-xs text-meta text-muted-foreground tabular-nums focus-visible:outline-2 focus-visible:outline-ring [&_svg]:size-(--size-icon-sm)",children:[(0,f.duration)(i,a),(0,t.jsx)(d.ChevronRight,{"aria-hidden":!0})]})]}),(0,t.jsx)(C,{delivery:e}),(0,t.jsx)(T,{delivery:e}),(0,t.jsxs)("p",{className:"text-meta text-muted-foreground",children:[k(e)," Since"," ",(0,t.jsx)("time",{dateTime:e.since,title:(0,f.fullDateTime)(i),className:"tabular-nums",children:l}),"."]}),(0,t.jsx)(R,{delivery:e,layout:"phone",...n})]},e.deliveryId)})})}function z({deliveries:e,state:s,onRetry:a,...n}){return"loading"===s?(0,t.jsxs)("div",{"data-slot":"needs-attention-list","data-state":"loading",children:[(0,t.jsx)(N.LoadingSkeleton,{variant:"table",rows:2,label:"Loading Needs attention",className:"max-sm:hidden"}),(0,t.jsx)(N.LoadingSkeleton,{variant:"list",rows:2,label:"Loading Needs attention",className:"sm:hidden"})]}):"error"===s?(0,t.jsx)("div",{"data-slot":"needs-attention-list","data-state":"error","data-testid":"attention-error",children:(0,t.jsx)(j.InlineError,{variant:"page",title:"Couldn’t load Needs attention",description:"This page couldn’t reach the fleet server. Undeliverable deliveries are kept on the server, so nothing is lost.",onRetry:a})}):0===e.length?(0,t.jsx)("div",{"data-slot":"needs-attention-list","data-state":"empty","data-testid":"attention-empty",children:(0,t.jsx)(v.EmptyState,{icon:(0,t.jsx)(c.CircleCheck,{className:"text-tone-ok-fg"}),title:"Nothing needs your attention",description:"Undeliverable deliveries show up here as soon as they happen."})}):(0,t.jsxs)("div",{"data-slot":"needs-attention-list","data-state":"ready",className:"flex flex-col gap-3",children:[(0,t.jsx)(O,{deliveries:e,...n}),(0,t.jsx)(L,{deliveries:e,...n})]})}var D=e.i(39874),q=e.i(22016),A=e.i(84294),H=e.i(19249),$=e.i(81830),M=e.i(1935);function B({members:e,ships:s,now:a,renderAction:n}){return(0,t.jsx)("ul",{"data-testid":"silent-members",className:"divide-y divide-border overflow-hidden rounded-lg border border-border",children:e.map(({squadronId:e,member:i})=>{let{lastSeenAt:l}=i.crew;return(0,t.jsxs)("li",{"data-testid":"silent-member",className:"flex flex-wrap items-center gap-x-4 gap-y-1.5 px-3 py-2.5",children:[(0,t.jsxs)("span",{className:"flex min-w-0 flex-col gap-1",children:[(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[(0,t.jsx)(H.HealthIndicator,{health:"silent"}),(0,t.jsx)("span",{className:"font-medium",children:i.name})]}),(0,t.jsx)(M.SquadronTag,{squadronId:e,role:i.role,size:"sm"})]}),(0,t.jsxs)("span",{className:"flex flex-col text-meta",children:[(0,t.jsx)("span",{children:null===l?"never seen":`not seen for ${(0,f.duration)(new Date(l),a)}`}),(0,t.jsxs)("span",{className:"text-muted-foreground",children:["checks in ",(0,A.checkInText)(i.checkInMinutes)]})]}),(0,t.jsx)("span",{className:"grow",children:(0,t.jsx)($.ReportLine,{report:s.get(i.shipId)?.report??null,now:a,variant:"row",testId:"silent-member-report"})}),n?.({squadronId:e,member:i}),(0,t.jsxs)(q.default,{href:`/squadrons/${e}`,className:"inline-flex items-center gap-1 text-meta font-medium hover:underline",children:["Open",(0,t.jsx)(d.ChevronRight,{"aria-hidden":!0,className:"size-(--size-icon-sm)"})]})]},i.shipId)})})}var E=e.i(87792),_=e.i(90262),P=e.i(86413),U=e.i(18423),J=e.i(96676),F=e.i(88721),W=e.i(78485),G=e.i(5387),K=e.i(86165),V=e.i(53573),Q=e.i(48695);function X(e){return e instanceof Error?e.message:"Try again in a moment."}e.s(["default",0,function(){let e=(0,s.useRouter)(),d=(0,J.useNow)(),c=(0,x.useNeedsAttention)(),m=(0,x.useResendDelivery)(),u=(0,x.useDismissDelivery)(),h=(0,U.useLiveFleet)(),f=(0,F.useAccountMenu)(d),p=(0,K.useHasSquadrons)(),b=(0,Q.useSquadrons)(),g=(0,A.silentMembers)(b.data??[]),v=(0,V.useShips)(g.map(({member:e})=>e.shipId)),j=new Map(((0,G.useFleetSnapshot)().data??[]).map(e=>[e.id,e])),N=(0,x.useAttentionCount)(),y=(0,P.useOpenInboxCount)(),w=(0,_.useAccess)(),[S,T]=(0,a.useState)(!1),[C,k]=(0,a.useState)(!1);(0,W.useSignInWhenSessionEnds)([c.error,h.error]);let[I,R]=(0,a.useState)(new Set),O=(e,t)=>{R(t=>new Set([...t,e])),t().finally(()=>{R(t=>new Set([...t].filter(t=>t!==e)))})},L=(0,t.jsx)(z,{deliveries:c.data??[],state:c.isError?"error":c.data?"ready":"loading",onRetry:()=>{c.refetch()},onResend:w.canManage?e=>{let t=(0,x.deliveryWithId)(c.data,e);O(e,async()=>{try{await m.mutateAsync({deliveryId:e}),t&&(0,n.showToast)({...(0,x.resentToast)(t),tone:"success"})}catch(e){(0,n.showToast)({title:"Couldn’t resend the message",description:X(e),tone:"error"})}})}:void 0,onDismiss:w.canManage?e=>{O(e,async()=>{try{await u.mutateAsync({deliveryId:e}),(0,n.showToast)({...x.DISMISSED_TOAST,tone:"success"})}catch(e){(0,n.showToast)({title:"Couldn’t dismiss the delivery",description:X(e),tone:"error"})}})}:void 0,onOpen:t=>{e.push((0,x.messagePathOf)(t))},pendingIds:I,now:d});return(0,t.jsxs)(E.ListLayout,{title:"Needs attention",description:"Deliveries no ship acknowledged after five tries, oldest first. Resend or dismiss each one.",live:h.live,nav:{active:"attention",inboxCount:y,attentionCount:N,hasSquadrons:p,hasSettings:p&&w.canManage},onCompose:w.canSend?()=>{T(!0)}:void 0,onSearch:()=>{k(!0)},account:f,banner:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.ConsoleNotices,{}),(0,t.jsx)(r.ConsoleGuide,{})]}),children:[g.length>0?(0,t.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,t.jsxs)("section",{"aria-labelledby":"attention-undeliverable",className:"flex flex-col gap-2",children:[(0,t.jsxs)("h2",{id:"attention-undeliverable",className:"text-body font-semibold",children:["Undeliverable deliveries (",c.data?.length??0,")"]}),c.data?.length===0?(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:"None."}):L]}),(0,t.jsxs)("section",{"aria-labelledby":"attention-silent",className:"flex flex-col gap-2 max-sm:order-first",children:[(0,t.jsxs)("h2",{id:"attention-silent",className:"text-body font-semibold",children:["Silent members (",g.length,")"]}),(0,t.jsx)(B,{members:g,ships:j,now:d,renderAction:w.canManage?({squadronId:e,member:s})=>(0,t.jsx)(D.GetNewCrewLine,{squadronId:e,member:s,ship:v.get(s.shipId),isPrimary:!0,testId:"silent-member-new-crew-line"}):void 0}),(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:"A member is silent after 3 missed check-ins; only you can start its new session. Late members and blocked reports stay on their squadron page."})]})]}):L,(0,t.jsx)(i.ComposeMessage,{isOpen:S,onOpenChange:T}),(0,t.jsx)(l.ConsoleCommands,{isOpen:C,onOpenChange:k,onCompose:()=>{T(!0)}})]})}],90167)},14732,e=>{"use strict";var t=e.i(43476),s=e.i(90063);e.s(["Table",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto rounded-lg border border-border bg-card shadow-sm",children:(0,t.jsx)("table",{"data-slot":"table",className:(0,s.classNames)("w-full caption-bottom text-body",e),...a})})},"TableBody",0,function({className:e,...a}){return(0,t.jsx)("tbody",{"data-slot":"table-body",className:(0,s.classNames)("[&_tr:last-child]:border-0",e),...a})},"TableCell",0,function({className:e,...a}){return(0,t.jsx)("td",{"data-slot":"table-cell",className:(0,s.classNames)("px-4 align-middle",e),...a})},"TableHead",0,function({className:e,...a}){return(0,t.jsx)("th",{"data-slot":"table-head",className:(0,s.classNames)("px-4 text-left align-middle text-caption font-medium whitespace-nowrap text-muted-foreground",e),...a})},"TableHeader",0,function({className:e,...a}){return(0,t.jsx)("thead",{"data-slot":"table-header",className:(0,s.classNames)("bg-muted [&_tr]:border-b",e),...a})},"TableRow",0,function({className:e,...a}){return(0,t.jsx)("tr",{"data-slot":"table-row",className:(0,s.classNames)("h-(--size-row) border-b border-border transition-colors duration-(--duration-fast) hover:bg-muted has-focus-visible:outline-2 has-focus-visible:-outline-offset-2 has-focus-visible:outline-ring data-new:animate-highlight [thead_&]:h-(--size-row-header) [thead_&]:hover:bg-transparent",e),...a})}])},19249,e=>{"use strict";var t=e.i(43476),s=e.i(90063);let a={"on-time":{label:"On time",dot:"bg-tone-ok-fg",text:"text-tone-ok-fg"},late:{label:"Late",dot:"bg-tone-waiting-fg",text:"text-tone-waiting-fg"},silent:{label:"Silent",dot:"bg-tone-attention-fg",text:"text-tone-attention-fg"},"not-on-station":{label:"Not on station",dot:"border border-dashed border-muted-foreground",text:"text-foreground"}};function n({health:e}){return(0,t.jsx)("span",{"aria-hidden":!0,className:(0,s.classNames)("size-2 shrink-0 rounded-full",a[e].dot)})}e.s(["HealthIndicator",0,function({health:e,detail:i,className:l}){return(0,t.jsxs)("span",{"data-slot":"health-indicator","data-health":e,className:(0,s.classNames)("inline-flex items-center gap-1.5 text-meta",l),children:[(0,t.jsx)(n,{health:e}),(0,t.jsx)("span",{className:(0,s.classNames)("font-medium",a[e].text),children:a[e].label}),void 0!==i&&(0,t.jsx)("span",{className:"text-muted-foreground",children:i})]})},"HealthSummary",0,function({counts:e,className:i}){return(0,t.jsx)("span",{"data-slot":"health-summary",className:(0,s.classNames)("inline-flex flex-wrap items-center gap-x-3 gap-y-1 text-meta",i),children:e.map(({health:e,count:s})=>(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,t.jsx)(n,{health:e}),(0,t.jsxs)("span",{children:[s," ",a[e].label.toLowerCase()]})]},e))})}])},39448,e=>{"use strict";var t=e.i(43476),s=e.i(25913),a=e.i(22016),n=e.i(90063);let i=(0,s.cva)("min-w-0 truncate font-sans font-medium",{variants:{size:{body:"text-body text-foreground",meta:"text-meta text-muted-foreground",title:"text-title font-semibold tracking-tight text-foreground max-sm:text-title-touch"}},defaultVariants:{size:"body"}});e.s(["ShipName",0,function({name:e,shipId:s,size:l,isSuffixShown:r=!1,isOperator:o=!1,href:d,className:c}){let m=d?(0,t.jsx)(a.default,{href:d,className:(0,n.classNames)(i({size:l}),"rounded-xs underline-offset-3 hover:underline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring"),title:e,children:e}):(0,t.jsx)("span",{className:i({size:l}),title:e,children:e});return(0,t.jsxs)("span",{"data-slot":"ship-name",className:(0,n.classNames)("inline-flex min-w-0 items-baseline gap-1.5",c),children:[m,o?(0,t.jsx)("span",{className:"shrink-0 font-normal text-muted-foreground",children:"(you)"}):null,r&&!o?(0,t.jsxs)("span",{className:"shrink-0 font-mono text-id text-muted-foreground uppercase",children:[(0,t.jsx)("span",{"aria-hidden":!0,children:"· "}),s.slice(-4)]}):null]})}])},1935,e=>{"use strict";var t=e.i(43476),s=e.i(60011),a=e.i(22016),n=e.i(90063);e.s(["SquadronTag",0,function({squadronId:e,role:i,size:l="md",className:r}){return(0,t.jsxs)(a.default,{href:`/squadrons/${e}`,"data-slot":"squadron-tag",className:(0,n.classNames)("inline-flex max-w-full items-center gap-1 rounded-sm bg-secondary px-1.5 text-secondary-foreground hover:underline [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0","sm"===l?"h-5.5 text-meta":"h-6 text-body",r),children:[(0,t.jsx)(s.Shapes,{"aria-hidden":!0}),(0,t.jsx)("span",{className:"truncate font-medium",children:e}),void 0!==i&&(0,t.jsxs)("span",{className:"shrink-0 text-muted-foreground",children:["· ",i]})]})}])},87792,e=>{"use strict";var t=e.i(43476),s=e.i(19759),a=e.i(15905),n=e.i(77880),i=e.i(36779),l=e.i(15034),r=e.i(85538);e.s(["ListLayout",0,function({title:e,description:o,primaryAction:d,toolbar:c,live:m,nav:u,onCompose:x,onSearch:h,account:f,banner:p,children:b}){return(0,t.jsxs)("div",{className:"flex min-h-dvh bg-background",children:[(0,t.jsx)(i.Sidebar,{active:u.active,inboxCount:u.inboxCount,attentionCount:u.attentionCount,hasSquadrons:u.hasSquadrons,hasSettings:u.hasSettings,...f}),(0,t.jsxs)("div",{className:"flex min-w-0 grow flex-col",children:[(0,t.jsx)(n.Header,{breadcrumb:e,live:m,onCompose:x,onSearch:h}),p,(0,t.jsx)(r.TopBar,{title:e,live:m,account:f,onSearch:h,actions:x?(0,t.jsx)(a.Button,{variant:"ghost",size:"touch",isIconOnly:!0,"aria-label":"Compose","data-testid":"top-bar-compose",onClick:x,children:(0,t.jsx)(s.SquarePen,{"aria-hidden":!0})}):void 0}),(0,t.jsxs)("main",{className:"flex grow flex-col gap-5 px-8 py-6 max-sm:gap-3.5 max-sm:px-4 max-sm:pt-3.5 max-sm:pb-[calc(var(--size-tabbar)+var(--spacing)*4)]",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4 max-sm:gap-3",children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-1",children:[(0,t.jsx)("h1",{className:"text-title font-semibold tracking-tight text-foreground max-sm:hidden",children:e}),o?(0,t.jsx)("p",{className:"text-meta text-muted-foreground max-sm:text-body-touch",children:o}):null]}),d?(0,t.jsx)("div",{className:"shrink-0 max-sm:w-full max-sm:[&>*]:w-full",children:d}):null]}),c,b]})]}),(0,t.jsx)(l.TabBar,{active:"overview"===u.active?"fleet":"settings"===u.active?void 0:u.active,hasSquadrons:u.hasSquadrons,inboxCount:u.inboxCount,attentionCount:u.attentionCount})]})}])},69693,e=>{"use strict";var t=e.i(46150);function s(e){let t=e.split(";")[0]?.trim().toLowerCase()??"";return"application/json"===t||t.endsWith("+json")}e.s(["formattedPayload",0,function(e,t){if(s(t))try{return JSON.stringify(JSON.parse(e),null,2)}catch{return}},"isJson",0,s,"payloadLabel",0,function(e,a){let n=s(a)?"JSON":a.split(";")[0]?.trim()??a,i=new TextEncoder().encode(e).byteLength;return`${n} \xb7 ${(0,t.counted)(i,{one:"byte",many:"bytes"})}`}])}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,26091,e=>{"use strict";var t=e.i(56420);let i={name:"file-text",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]};i.node;let s=(0,t.default)(i);e.s(["FileText",0,s],26091)},68997,15331,71139,73330,84156,37817,29244,88280,39844,e=>{"use strict";var t=e.i(56420);let i={name:"pen",size:24,node:[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],aliases:["edit-2"]};i.node;let s=(0,t.default)(i);e.s(["Pen",0,s],68997);let n={name:"radio",size:24,node:[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478",key:"1fwjs5"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134",key:"ehdyv1"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134",key:"1q22gi"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478",key:"r2q7qm"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]};n.node;let a=(0,t.default)(n);e.s(["Radio",0,a],15331);let r={name:"user-x",size:24,node:[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"17",x2:"22",y1:"8",y2:"13",key:"3nzzx3"}],["line",{x1:"22",x2:"17",y1:"8",y2:"13",key:"1swrse"}]]};r.node;let o=(0,t.default)(r);e.s(["UserX",0,o],71139);var l=e.i(49635);e.s(["canPing",0,function(e){return"agent"===e.kind&&"crewed"===e.status},"pingLine",0,function(e,t){let i=new Date(e.sentAt);switch(e.state){case"waiting":{let e=(0,l.relativeTime)(i,t);return`Pinged ${"Just now"===e?"just now":e}, no answer yet`}case"answered":var s;let n;return null===e.answeredAt?"Answered ping":`Answered ping in ${(n=Math.max(0,(s=new Date(e.answeredAt)).getTime()-i.getTime()))<6e4?`${String(Math.round(n/1e3))} s`:(0,l.duration)(i,s)}`;case"received":return"Received, not answered with pong";case"undeliverable":return"Ping not answered: undeliverable"}}],73330),e.s(["isUnclaimedPromptOut",0,function(e){return null!==e.startingPrompt&&!e.startingPrompt.isClaimed}],84156);var d=e.i(43476),c=e.i(52886);let u={name:"file-key",size:24,node:[["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M4 12v6",key:"bg1pfk"}],["path",{d:"M4 14h2",key:"1sf9f8"}],["path",{d:"M9.65 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v4",key:"d56i0q"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],aliases:["file-key-2"]};u.node;let h=(0,t.default)(u);var p=e.i(58925);let m={name:"undo-2",size:24,node:[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]]};m.node;let x=(0,t.default)(m);e.s(["Undo2",0,x],37817);var g=e.i(26808),f=e.i(24010),b=e.i(15905),v=e.i(94945),y=e.i(1009),j=e.i(17981);let w={release:{title:"Release",action:"Release ship",busy:"Releasing",failed:"Couldn’t release the ship",testId:"release-dialog"},recrew:{title:"Re-crew",action:"Re-crew ship",busy:"Re-crewing",failed:"Couldn’t re-crew the ship",testId:"recrew-dialog"}};e.s(["ReleaseDialog",0,function(e){let{shipName:t,sessionLocation:i,mode:s="release",isOpen:n,onOpenChange:a,isPending:r,error:o,onConfirm:l}=e,u=w[s],m=i?`The session on ${i}`:"The session crewing it";return(0,d.jsx)(f.AlertDialog,{open:n,onOpenChange:e=>{r||a(e)},children:(0,d.jsxs)(f.AlertDialogContent,{"data-testid":u.testId,className:v.dialogSurface.phoneSheet,children:[(0,d.jsxs)(f.AlertDialogHeader,{children:[(0,d.jsxs)(f.AlertDialogTitle,{children:[u.title," ",t,"?"]}),(0,d.jsxs)(f.AlertDialogDescription,{children:[m," loses this ship now."]})]}),(0,d.jsx)(y.ConsequenceList,{consequences:function(e){let{shipName:t,inFlightCount:i,mode:s="release"}=e;return[{icon:p.KeyRound,text:"Its secret and crew token stop working, so that session cannot come back."},{icon:x,text:(0,g.inFlightLine)(i)},"release"===s?{icon:c.CircleDashed,text:`${t} shows as Awaiting crew until you get a new starting prompt.`}:{icon:h,text:"A new starting prompt and its crew lines are shown once, for the new crew."}]}(e)}),void 0===o?null:(0,d.jsx)(j.InlineError,{title:u.failed,description:`${o} Nothing changed; the session still holds the ship.`}),(0,d.jsxs)(f.AlertDialogFooter,{children:[(0,d.jsx)(f.AlertDialogClose,{render:(0,d.jsx)(b.Button,{disabled:r}),children:"Cancel"}),(0,d.jsx)(b.Button,{variant:"primary",isLoading:r,onClick:l,children:r?u.busy:u.action})]})]})})}],29244),e.i(31627);var C=e.i(44827),k=e.i(85595),N=e.i(16984),S=e.i(66787),D=e.i(71645),I=e.i(90063),R=e.i(65160),M=e.i(22212),T=e.i(12470),z=e.i(91727);function L({shipName:e,activeNames:t,isPending:i,error:s,onSubmit:n}){let a=(0,D.useId)(),r=(0,D.useId)(),[o,l]=(0,D.useState)(""),c=(0,R.checkShipName)(o,{activeNames:t,current:e}),u="invalid"===c.kind||"reserved"===c.kind||"taken"===c.kind,h="available"===c.kind;return(0,d.jsxs)("form",{noValidate:!0,className:"contents",onSubmit:e=>{e.preventDefault(),h&&n(o)},children:[(0,d.jsxs)(M.DialogHeader,{children:[(0,d.jsxs)(M.DialogTitle,{children:["Rename ",e]}),(0,d.jsx)(M.DialogDescription,{children:"The ship keeps its id, inbox and history."})]}),(0,d.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,d.jsxs)("div",{className:"flex items-baseline justify-between",children:[(0,d.jsx)(z.Label,{htmlFor:a,children:"New name"}),(0,d.jsxs)("span",{className:"text-caption text-muted-foreground tabular-nums",children:[o.length," / ",C.SHIP_HANDLE_MAX_LENGTH]})]}),(0,d.jsxs)("div",{className:"relative",children:[(0,d.jsx)(T.Input,{id:a,isMono:!0,autoComplete:"off",autoCapitalize:"off",spellCheck:!1,placeholder:e,"data-testid":"rename-name","aria-invalid":!!u||void 0,"aria-describedby":r,className:"pr-9 max-sm:h-(--size-control-touch) max-sm:text-input-touch",value:o,onChange:e=>{l((0,R.asHandle)(e.target.value))}}),"available"===c.kind?(0,d.jsx)(k.CircleCheck,{"aria-hidden":!0,className:"absolute top-1/2 right-3 size-(--size-icon) -translate-y-1/2 text-tone-ok-fg"}):u?(0,d.jsx)(N.CircleX,{"aria-hidden":!0,className:"absolute top-1/2 right-3 size-(--size-icon) -translate-y-1/2 text-destructive-text"}):null]}),(0,d.jsx)("p",{id:r,"aria-live":"polite",className:(0,I.classNames)("text-meta",u?"text-destructive-text":"text-muted-foreground"),children:c.message})]}),(0,d.jsxs)("div",{className:"flex gap-2 rounded-lg border border-tone-waiting-border bg-tone-waiting-bg p-3 text-tone-waiting-fg",children:[(0,d.jsx)(S.TriangleAlert,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon) shrink-0"}),(0,d.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,d.jsxs)("p",{className:"text-body font-medium",children:["Ships that address ",e," by name stop reaching it"]}),(0,d.jsx)("p",{className:"text-meta text-foreground",children:"Messages already sent are unaffected, because they are stored by ship id."})]})]}),void 0===s?null:(0,d.jsx)(j.InlineError,{title:"Couldn’t rename the ship",description:`${s} Nothing changed.`}),(0,d.jsxs)(M.DialogFooter,{children:[(0,d.jsx)(M.DialogClose,{render:(0,d.jsx)(b.Button,{type:"button",disabled:i}),children:"Cancel"}),(0,d.jsx)(b.Button,{type:"submit",variant:"primary",isLoading:i,disabled:!h,"data-testid":"rename-submit",children:i?"Renaming":"Rename ship"})]})]})}e.s(["RenameDialog",0,function(e){let{isOpen:t,onOpenChange:i,isPending:s}=e;return(0,d.jsx)(M.Dialog,{open:t,onOpenChange:e=>{s||i(e)},children:(0,d.jsx)(M.DialogContent,{"data-testid":"rename-dialog",className:v.dialogSurface.phoneFullScreen,children:(0,d.jsx)(L,{...e})})})}],88280);var P=e.i(80799),A=e.i(82303),O=e.i(69374);function q({openDeliveries:e}){return 0===e?(0,d.jsxs)("p",{className:"flex items-center gap-2 rounded-lg border border-tone-ok-border bg-tone-ok-bg px-3 py-2 text-meta text-tone-ok-fg",children:[(0,d.jsx)(k.CircleCheck,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0"}),"Its inbox is empty, so no deliveries are affected."]}):(0,d.jsxs)("div",{className:"flex gap-2 rounded-lg border border-tone-attention-border bg-tone-attention-bg p-3 text-tone-attention-fg",children:[(0,d.jsx)(S.TriangleAlert,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon) shrink-0"}),(0,d.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,d.jsx)("p",{className:"text-body font-medium",children:(0,g.abandonedLine)(e)}),(0,d.jsx)("p",{className:"text-meta text-foreground",children:"Each is marked Abandoned and its sender can see that."})]})]})}function B(e){let{shipName:t,openDeliveries:i,isCrewed:s,isPending:n,error:a,onConfirm:r}=e,[l,c]=(0,D.useState)(""),u=i>0,h=!u||(0,g.isTypedMatch)(t,l);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(f.AlertDialogHeader,{children:[(0,d.jsxs)(f.AlertDialogTitle,{children:["Retire ",t,"?"]}),(0,d.jsx)(f.AlertDialogDescription,{children:"Retiring ends this ship for good. Its history stays available read-only. This can’t be undone."})]}),(0,d.jsx)(q,{openDeliveries:i}),(0,d.jsx)(y.ConsequenceList,{consequences:[...s?[{icon:o,text:"The session crewing it loses it now."}]:[],{icon:p.KeyRound,text:"Its secret stops working."},{icon:P.Tag,text:"It is never crewed or messaged again, and its name is free for a new ship."},{icon:A.Users,text:"Deliveries to its type stay, for the other ships of the type."}]}),u?(0,d.jsx)(O.TypedConfirm,{expected:t,value:l,onValueChange:c}):null,void 0===a?null:(0,d.jsx)(j.InlineError,{title:"Couldn’t retire the ship",description:`${a} Nothing changed.`}),(0,d.jsxs)(f.AlertDialogFooter,{children:[(0,d.jsx)(f.AlertDialogClose,{render:(0,d.jsx)(b.Button,{disabled:n}),children:"Cancel"}),(0,d.jsx)(b.Button,{variant:"destructive",isLoading:n,disabled:!h,onClick:r,children:(0,g.retireButtonLabel)(i)})]})]})}e.s(["RetireDialog",0,function(e){let{isOpen:t,onOpenChange:i,isPending:s}=e;return(0,d.jsx)(f.AlertDialog,{open:t,onOpenChange:e=>{s||i(e)},children:(0,d.jsx)(f.AlertDialogContent,{"data-testid":"retire-dialog",className:v.dialogSurface.phoneSheet,children:(0,d.jsx)(B,{...e})})})}],39844)},83035,e=>{"use strict";var t=e.i(56420);let i={name:"square-terminal",size:24,node:[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]],aliases:["terminal-square"]};i.node;let s=(0,t.default)(i);e.s(["SquareTerminal",0,s],83035)},91703,e=>{"use strict";var t=e.i(43476),i=e.i(83035),s=e.i(90063),n=e.i(61966);e.s(["CodeBlock",0,function({label:e,code:a,isWrapped:r=!1,copyValue:o,copyLabel:l=`Copy ${e.toLowerCase()}`,onCopied:d,onCopyFailed:c,codeTestId:u,copyTestId:h}){return(0,t.jsxs)("div",{"data-slot":"code-block",className:"overflow-hidden rounded-lg border border-border bg-muted",children:[(0,t.jsxs)("div",{className:"flex h-9 items-center justify-between gap-2 border-b border-border pr-1.5 pl-3",children:[(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5 text-caption text-muted-foreground",children:[(0,t.jsx)(i.SquareTerminal,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0"}),(0,t.jsx)("span",{className:"truncate",children:e})]}),(0,t.jsx)(n.CopyButton,{value:o??a,label:l,isLabeled:!0,onCopied:d,onCopyFailed:c,"data-testid":h})]}),(0,t.jsx)("pre",{"data-testid":u,className:(0,s.classNames)("overflow-x-auto px-3 py-3 font-mono text-code text-foreground",r?"break-all whitespace-pre-wrap":"whitespace-pre"),children:a})]})}])},61966,8734,e=>{"use strict";var t=e.i(43476),i=e.i(89664),s=e.i(56420);let n={name:"copy",size:24,node:[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]};n.node;let a=(0,s.default)(n);e.s(["Copy",0,a],8734);var r=e.i(71645),o=e.i(15905);e.s(["CopyButton",0,function({value:e,label:s,size:n="xs",isLabeled:l=!1,onCopied:d,onCopyFailed:c,className:u,"data-testid":h}){let[p,m]=(0,r.useState)(!1);async function x(){try{await navigator.clipboard.writeText(e)}catch{c?.();return}m(!0),d?.(),setTimeout(()=>{m(!1)},1500)}return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.Button,{variant:"ghost",size:n,isIconOnly:!l,"aria-label":s,title:l?void 0:s,icon:p?(0,t.jsx)(i.Check,{"aria-hidden":!0}):(0,t.jsx)(a,{"aria-hidden":!0}),className:u,"data-testid":h,onClick:()=>{x()},children:l?p?"Copied":"Copy":null}),(0,t.jsx)("span",{role:"status",className:"sr-only",children:p?"Copied.":""})]})}],61966)},75867,e=>{"use strict";var t=e.i(43476);e.s([],24305),e.i(24305);var i=e.i(71645),s=e.i(51437),n=e.i(28918),a=e.i(46376),r=e.i(2077),o=e.i(56789),l=e.i(52245),d=e.i(88015),c=e.i(40886),u=e.i(33332);let h=i.createContext(void 0),p={...e.i(75812).fieldValidityMapping,checked:e=>e?{"data-checked":""}:{"data-unchecked":""}};var m=e.i(64350),x=e.i(69690),g=e.i(81104),f=e.i(84708),b=e.i(47778),v=e.i(38489),y=e.i(75606),j=e.i(56434),w=e.i(6039);let C=i.forwardRef(function(e,u){let{checked:C,className:k,defaultChecked:N,"aria-labelledby":S,form:D,id:I,inputRef:R,name:M,nativeButton:T=!1,onCheckedChange:z,readOnly:L=!1,required:P=!1,disabled:A=!1,render:O,uncheckedValue:q,value:B,style:F,...$}=e,{clearErrors:E}=(0,f.useFormContext)(),{state:H,setTouched:U,setDirty:_,validityData:V,setFilled:G,setFocused:K,validationMode:W,disabled:X,name:J,validation:Y}=(0,x.useFieldRootContext)(),{labelId:Q}=(0,b.useLabelableContext)(),Z=X||A,ee=J??M,et=i.useRef(null),ei=(0,n.useMergedRefs)(et,R,Y.inputRef),es=i.useRef(null),en=(0,d.useBaseUiId)(),ea=(0,v.useLabelableId)({id:I}),er=T?void 0:ea,[eo,el]=(0,s.useControlled)({controlled:C,default:!!N,name:"Switch",state:"checked"});(0,g.useRegisterFieldControl)(es,en,eo,void 0,!Z,M),(0,a.useIsoLayoutEffect)(()=>{G(eo)},[eo,G]),(0,w.useValueChanged)(eo,()=>{E(ee),_(eo!==V.initialValue),Y.change(eo)});let{getButtonProps:ed,buttonRef:ec}=(0,c.useButton)({disabled:Z,native:T}),eu=function(e,t,s,n=!0,r){let[o,l]=i.useState(),c=(0,d.useBaseUiId)(r?`${r}-label`:void 0),u=e??t??o;return(0,a.useIsoLayoutEffect)(()=>{let i=e||t||!n?void 0:function(e,t){let i=function(e){if(!e)return;let t=e.parentElement;if(t&&"LABEL"===t.tagName)return t;let i=e.id;if(i){let t=e.nextElementSibling;if(t&&t.htmlFor===i)return t}let s=e.labels;return s&&s[0]}(e);if(i)return!i.id&&t&&(i.id=t),i.id||void 0}(s.current,c);o!==i&&l(i)}),u}(S,Q,et,!T,er),eh={...Y.getValidationProps(Z),checked:eo,disabled:Z,form:D,id:er,name:ee,required:P,style:ee?r.visuallyHiddenInput:r.visuallyHidden,tabIndex:-1,type:"checkbox","aria-hidden":!0,ref:ei,onChange(e){if(e.nativeEvent.defaultPrevented)return;if(L)return void e.preventDefault();let t=e.currentTarget.checked,i=(0,y.createChangeEventDetails)(j.REASONS.none,e.nativeEvent);z?.(t,i),i.isCanceled||el(t)},onClick(e){e.stopPropagation()},onFocus(){es.current?.focus()},...void 0!==B?{value:B}:o.EMPTY_OBJECT},ep=i.useMemo(()=>({...H,checked:eo,disabled:Z,readOnly:L,required:P}),[H,eo,Z,L,P]),em=(0,l.useRenderElement)("span",e,{state:ep,ref:[u,es,ec],props:[{id:T?ea:en,role:"switch","aria-checked":eo,"aria-readonly":L||void 0,"aria-required":P||void 0,"aria-labelledby":eu,onFocus(){Z||K(!0)},onBlur(){let e=et.current;e&&!Z&&(U(!0),K(!1),"onBlur"===W&&Y.commit(e.checked))},onClick(e){if(L||Z)return;e.preventDefault();let t=et.current;t&&(0,m.dispatchClickWithModifiers)(t,e)}},$,ed,e=>Y.getValidationProps(Z,e)],stateAttributesMapping:p});return(0,t.jsxs)(h.Provider,{value:ep,children:[em,!eo&&ee&&void 0!==q&&(0,t.jsx)("input",{type:"hidden",form:D,name:ee,value:q,disabled:Z}),(0,t.jsx)("input",{...eh,suppressHydrationWarning:!0})]})}),k=i.forwardRef(function(e,t){let{render:s,className:n,style:a,...r}=e,o=function(){let e=i.useContext(h);if(void 0===e)throw Error((0,u.default)(63));return e}();return(0,l.useRenderElement)("span",e,{state:o,ref:t,stateAttributesMapping:p,props:r})});e.s(["Root",0,C,"Thumb",0,k],50994);var N=e.i(50994),N=N,S=e.i(90063);e.s(["Switch",0,function({className:e,...i}){return(0,t.jsx)(N.Root,{"data-slot":"switch",className:(0,S.classNames)("peer inline-flex h-5 w-8.5 shrink-0 items-center rounded-full border border-transparent bg-input p-0.5 transition-colors duration-(--duration-fast) outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring data-checked:bg-primary data-disabled:opacity-45",e),...i,children:(0,t.jsx)(N.Thumb,{"data-slot":"switch-thumb",className:"pointer-events-none block size-4 rounded-full bg-card shadow-sm transition-transform duration-(--duration-fast) data-checked:translate-x-3.5"})})}],75867)},14732,e=>{"use strict";var t=e.i(43476),i=e.i(90063);e.s(["Table",0,function({className:e,...s}){return(0,t.jsx)("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto rounded-lg border border-border bg-card shadow-sm",children:(0,t.jsx)("table",{"data-slot":"table",className:(0,i.classNames)("w-full caption-bottom text-body",e),...s})})},"TableBody",0,function({className:e,...s}){return(0,t.jsx)("tbody",{"data-slot":"table-body",className:(0,i.classNames)("[&_tr:last-child]:border-0",e),...s})},"TableCell",0,function({className:e,...s}){return(0,t.jsx)("td",{"data-slot":"table-cell",className:(0,i.classNames)("px-4 align-middle",e),...s})},"TableHead",0,function({className:e,...s}){return(0,t.jsx)("th",{"data-slot":"table-head",className:(0,i.classNames)("px-4 text-left align-middle text-caption font-medium whitespace-nowrap text-muted-foreground",e),...s})},"TableHeader",0,function({className:e,...s}){return(0,t.jsx)("thead",{"data-slot":"table-header",className:(0,i.classNames)("bg-muted [&_tr]:border-b",e),...s})},"TableRow",0,function({className:e,...s}){return(0,t.jsx)("tr",{"data-slot":"table-row",className:(0,i.classNames)("h-(--size-row) border-b border-border transition-colors duration-(--duration-fast) hover:bg-muted has-focus-visible:outline-2 has-focus-visible:-outline-offset-2 has-focus-visible:outline-ring data-new:animate-highlight [thead_&]:h-(--size-row-header) [thead_&]:hover:bg-transparent",e),...s})}])},39448,e=>{"use strict";var t=e.i(43476),i=e.i(25913),s=e.i(22016),n=e.i(90063);let a=(0,i.cva)("min-w-0 truncate font-sans font-medium",{variants:{size:{body:"text-body text-foreground",meta:"text-meta text-muted-foreground",title:"text-title font-semibold tracking-tight text-foreground max-sm:text-title-touch"}},defaultVariants:{size:"body"}});e.s(["ShipName",0,function({name:e,shipId:i,size:r,isSuffixShown:o=!1,isOperator:l=!1,href:d,className:c}){let u=d?(0,t.jsx)(s.default,{href:d,className:(0,n.classNames)(a({size:r}),"rounded-xs underline-offset-3 hover:underline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring"),title:e,children:e}):(0,t.jsx)("span",{className:a({size:r}),title:e,children:e});return(0,t.jsxs)("span",{"data-slot":"ship-name",className:(0,n.classNames)("inline-flex min-w-0 items-baseline gap-1.5",c),children:[u,l?(0,t.jsx)("span",{className:"shrink-0 font-normal text-muted-foreground",children:"(you)"}):null,o&&!l?(0,t.jsxs)("span",{className:"shrink-0 font-mono text-id text-muted-foreground uppercase",children:[(0,t.jsx)("span",{"aria-hidden":!0,children:"· "}),i.slice(-4)]}):null]})}])},1935,e=>{"use strict";var t=e.i(43476),i=e.i(60011),s=e.i(22016),n=e.i(90063);e.s(["SquadronTag",0,function({squadronId:e,role:a,size:r="md",className:o}){return(0,t.jsxs)(s.default,{href:`/squadrons/${e}`,"data-slot":"squadron-tag",className:(0,n.classNames)("inline-flex max-w-full items-center gap-1 rounded-sm bg-secondary px-1.5 text-secondary-foreground hover:underline [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0","sm"===r?"h-5.5 text-meta":"h-6 text-body",o),children:[(0,t.jsx)(i.Shapes,{"aria-hidden":!0}),(0,t.jsx)("span",{className:"truncate font-medium",children:e}),void 0!==a&&(0,t.jsxs)("span",{className:"shrink-0 text-muted-foreground",children:["· ",a]})]})}])},5894,e=>{"use strict";var t=e.i(43476),i=e.i(76561),s=e.i(8734),n=e.i(86247),a=e.i(44594),r=e.i(58925),o=e.i(68997),l=e.i(15331),d=e.i(60011),c=e.i(19759),u=e.i(49319),h=e.i(57443),p=e.i(71139),m=e.i(22016),x=e.i(71645),g=e.i(5387),f=e.i(90262),b=e.i(73330),v=e.i(53573),y=e.i(86165),j=e.i(48695),w=e.i(84294),C=e.i(84156),k=e.i(15905),N=e.i(57334),S=e.i(75305),D=e.i(41880),I=e.i(44824),R=e.i(29244),M=e.i(39874),T=e.i(48287),z=e.i(88280),L=e.i(39844),P=e.i(82532);function A({action:e,className:i}){let s=e.isPrimary?"primary":e.isDestructive||"rename"===e.key?"ghost":"secondary";return void 0!==e.href?(0,t.jsx)(k.Button,{size:"xs",variant:s,nativeButton:!1,"data-testid":e.testId,className:i,render:(0,t.jsx)(m.default,{href:e.href}),children:e.label}):(0,t.jsx)(k.Button,{size:"xs",variant:s,"data-testid":e.testId,disabled:e.isDisabled,isLoading:e.isLoading,className:i,onClick:e.onSelect,children:e.label})}function O(e,t){let i=e[t-1],s=e[t];return void 0!==i&&void 0!==s&&(!0===i.isMenuOnly&&!0!==s.isMenuOnly||!0===s.isDestructive&&!0!==i.isDestructive)}function q({layout:e,ship:i,actions:s}){if("next"===e){let e=s.find(e=>"prompt"===e.key||"crew-line"===e.key&&!0===e.isPrimary);return e?(0,t.jsx)(A,{action:{...e,isPrimary:!1},className:"max-sm:h-(--size-control-touch) max-sm:w-full max-sm:text-body-touch"}):null}if("buttons"===e){let e=s.filter(e=>!0!==e.isMenuOnly);return 0===e.length?null:(0,t.jsx)("div",{className:"flex flex-wrap items-center justify-end gap-2 max-sm:justify-start",children:e.map(e=>(0,t.jsx)(A,{action:e},e.key))})}let a=(0,t.jsx)(k.Button,{size:"sheet"===e?"touch":"xs",variant:"ghost",isIconOnly:!0,"aria-label":`Actions for ${i.name}`,icon:(0,t.jsx)(n.Ellipsis,{}),"data-testid":"fleet-actions"});return"sheet"===e?(0,t.jsxs)(S.Sheet,{children:[(0,t.jsx)(S.SheetTrigger,{render:a}),(0,t.jsxs)(S.SheetContent,{side:"bottom","data-testid":"fleet-row-sheet",children:[(0,t.jsx)(S.SheetHeader,{children:(0,t.jsx)(S.SheetTitle,{children:i.name})}),(0,t.jsx)("ul",{className:"flex flex-col pb-2",children:s.map((e,i)=>(0,t.jsx)("li",{className:O(s,i)?"mt-1 border-t border-border pt-1":void 0,children:(0,t.jsxs)(S.SheetClose,{render:void 0===e.href?(0,t.jsx)("button",{type:"button",disabled:e.isDisabled,onClick:e.onSelect}):(0,t.jsx)(m.default,{href:e.href}),"data-testid":e.testId,className:`flex h-(--size-control-touch) w-full items-center gap-3 px-4 text-left text-body-touch disabled:opacity-45 [&_svg]:size-(--size-icon) [&_svg]:shrink-0 ${e.isDestructive?"text-destructive-text":"text-foreground"}`,children:[(0,t.jsx)(e.icon,{"aria-hidden":!0}),e.menuLabel.replace(/…$/,"")]})},e.key))}),(0,t.jsx)("div",{className:"px-4 pb-4",children:(0,t.jsx)(S.SheetClose,{render:(0,t.jsx)(k.Button,{size:"touch",className:"w-full"}),children:"Cancel"})})]})]}):(0,t.jsxs)(N.DropdownMenu,{children:[(0,t.jsx)(N.DropdownMenuTrigger,{render:a}),(0,t.jsx)(N.DropdownMenuContent,{children:s.map((e,i)=>(0,t.jsxs)(x.Fragment,{children:[O(s,i)?(0,t.jsx)(N.DropdownMenuSeparator,{}):null,void 0===e.href?(0,t.jsxs)(N.DropdownMenuItem,{"data-testid":e.testId,disabled:e.isDisabled,variant:e.isDestructive?"destructive":"default",onClick:e.onSelect,children:[(0,t.jsx)(e.icon,{"aria-hidden":!0}),e.menuLabel]}):(0,t.jsxs)(N.DropdownMenuItem,{"data-testid":e.testId,render:(0,t.jsx)(m.default,{href:e.href}),children:[(0,t.jsx)(e.icon,{"aria-hidden":!0}),e.menuLabel]})]},e.key))})]})}e.s(["ShipActions",0,function({ship:e,layout:n="buttons"}){var m,k;let N=(0,f.useAccess)(),[S,A]=(0,x.useState)(),[O,B]=(0,x.useState)(!1),[F,$]=(0,x.useState)(void 0),E=(0,g.useGetStartingPrompt)(),H=(0,g.useReleaseShip)(),U=(0,g.useRetireShip)(),_=(0,g.useRecrewShip)(),V=(0,g.useRenameShip)(),G=(0,g.usePingShip)(),K=(0,g.useFleetSnapshot)(),W=(0,v.useShip)("release"===S||"recrew"===S||"retire"===S||"remove"===S?e.id:void 0),X=(0,y.useSquadronsConnection)(),J=(0,j.useSquadrons)(),Y=(0,j.useRemoveMember)(),Q=J.data?.find(t=>"disbanded"!==t.state&&(t.flagship.shipId===e.id||t.members.some(t=>t.shipId===e.id))),Z=void 0!==Q&&Q.flagship.shipId!==e.id,ee=(0,v.useShip)(Z&&"retired"!==e.status?e.id:void 0),et=Q?.members.find(t=>t.shipId===e.id),ei=(0,M.useNewCrewLineFlow)(Q&&et?{squadronId:Q.id,member:et,ship:ee.data}:void 0),es="unknown"===X||"connected"===X&&!J.isFetched,en=()=>{A(void 0)},ea=E.data??_.data,er=ea?"shown":E.isError?"error":"issuing",eo=e=>()=>{H.reset(),U.reset(),_.reset(),V.reset(),Y.reset(),A(e)},el=async()=>{try{await navigator.clipboard.writeText(e.id),(0,D.showToast)({title:"Ship id copied",description:e.id,tone:"success"})}catch{(0,D.showToast)({title:"Couldn’t copy the ship id",description:e.id,tone:"error"})}},ed=Q?.flagship.shipId===e.id,ec={key:"message",label:"Message",menuLabel:"Message this ship…",icon:c.SquarePen,testId:"fleet-ship-message",onSelect:()=>{B(!0)},isMenuOnly:!0,needs:"canSend"},eu={key:"copy",label:"Copy ship id",menuLabel:"Copy ship id",icon:s.Copy,testId:"fleet-ship-copy-id",onSelect:()=>{el()},isMenuOnly:!0},eh=(0,b.canPing)(e)?[{key:"ping",label:"Ping",menuLabel:"Ping",icon:l.Radio,testId:"fleet-ship-ping",onSelect:()=>{G.mutate({shipId:e.id},{onSuccess:({isNew:t})=>{(0,D.showToast)(t?{title:`Pinged ${e.name}`,description:"Its session answers with pong on its next turn.",tone:"success"}:{title:`A ping already waits for ${e.name}`,description:"Pings never stack: this is the one shown.",tone:"info"})},onError:t=>{(0,D.showToast)({title:`Couldn’t ping ${e.name}`,description:t.message,tone:"error"})}})},isLoading:G.isPending,needs:"canManage"}]:[],ep=[];return"operator"===e.kind?ep.push({key:"inbox",label:"Open inbox",menuLabel:"Open inbox",icon:a.Inbox,testId:"fleet-ship-open-inbox",href:"/inbox",isMenuOnly:!0},eu):"retired"===e.status||"viewer"===e.kind?ep.push(eu):ed?ep.push({key:"squadron",label:"Open squadron",menuLabel:"Open squadron",icon:d.Shapes,testId:"fleet-ship-open-squadron",href:`/squadrons/${Q.id}`}):es?ep.push(ec,eu,...eh):et&&Q?(ep.push(ec,eu,...eh,{key:"crew-line",label:"Get new crew line",menuLabel:"Get new crew line…",icon:r.KeyRound,testId:"fleet-ship-new-crew-line",onSelect:ei.start,needs:"canManage",isDisabled:!ei.isReady,isPrimary:"silent"===et.health}),"crewed"===e.status&&ep.push({key:"release",label:"Release",menuLabel:"Release ship…",icon:p.UserX,testId:"fleet-ship-release",onSelect:eo("release"),needs:"canManage"}),("sailing"===Q.state||"standing-down"===Q.state)&&ep.push({key:"remove",label:"Remove from squadron",menuLabel:"Remove from squadron…",icon:u.UserMinus,testId:"fleet-ship-remove",onSelect:eo("remove"),isDestructive:!0,needs:"canManage"})):(ep.push(ec,eu),"awaitingCrew"===e.status?ep.push({key:"prompt",label:"Get starting prompt",menuLabel:"Get starting prompt…",icon:r.KeyRound,testId:"fleet-ship-prompt",onSelect:()=>{E.reset(),_.reset(),$((0,C.isUnclaimedPromptOut)(e)&&e.startingPrompt?{issuedAt:e.startingPrompt.issuedAt}:void 0),A("prompt"),E.mutate({shipId:e.id})},needs:"canManage"}):ep.push(...eh,{key:"recrew",label:"Re-crew",menuLabel:"Re-crew…",icon:h.UserPlus,testId:"fleet-ship-recrew",onSelect:eo("recrew"),needs:"canManage"},{key:"release",label:"Release",menuLabel:"Release ship…",icon:p.UserX,testId:"fleet-ship-release",onSelect:eo("release"),needs:"canManage"}),ep.push({key:"rename",label:"Rename",menuLabel:"Rename…",icon:o.Pen,testId:"fleet-ship-rename",onSelect:eo("rename"),needs:"canManage"},{key:"retire",label:"Retire",menuLabel:"Retire ship…",icon:i.Archive,testId:"fleet-ship-retire",onSelect:eo("retire"),isDestructive:!0,needs:"canManage"})),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(q,{layout:n,ship:e,actions:(m=ep,k=N,m.filter(e=>void 0===e.needs||k[e.needs]))}),(0,t.jsx)(R.ReleaseDialog,{shipName:e.name,sessionLocation:null===e.location?null:e.location.description??e.location.kind.toLowerCase(),inFlightCount:W.data?.inFlightDeliveries??0,mode:"recrew"===S?"recrew":"release",isOpen:("release"===S||"recrew"===S)&&void 0!==W.data,onOpenChange:e=>{e||en()},isPending:H.isPending||_.isPending,error:("recrew"===S?_.error:H.error)?.message,onConfirm:()=>{"recrew"===S?_.mutate({shipId:e.id},{onSuccess:()=>{$(void 0),A("prompt")}}):H.mutate({shipId:e.id},{onSuccess:en})}}),(0,t.jsx)(L.RetireDialog,{shipName:e.name,openDeliveries:W.data?.openDeliveries??0,isCrewed:"crewed"===e.status,isOpen:"retire"===S&&void 0!==W.data,onOpenChange:e=>{e||en()},isPending:U.isPending,error:U.error?.message,onConfirm:()=>{U.mutate({shipId:e.id},{onSuccess:en})}}),Q&&et&&(0,t.jsx)(T.RemoveMemberDialog,{squadronId:Q.id,member:et,othersOfRole:(0,w.otherMembersOfRole)(Q,et.shipId),openDeliveries:W.data?.openDeliveries??0,inFlightDeliveries:W.data?.inFlightDeliveries??0,isOpen:"remove"===S&&void 0!==W.data,onOpenChange:e=>{e||en()},isPending:Y.isPending,error:Y.error?.message,onConfirm:()=>{Y.mutate({squadronId:Q.id,shipId:et.shipId},{onSuccess:en})}}),(0,t.jsx)(z.RenameDialog,{shipName:e.name,activeNames:(K.data??[]).filter(e=>"retired"!==e.status).map(e=>e.name),isOpen:"rename"===S,onOpenChange:e=>{e||en()},isPending:V.isPending,error:V.error?.message,onSubmit:t=>{V.mutate({shipId:e.id,name:t},{onSuccess:en})}}),(0,t.jsx)(P.StartingPromptDialog,{shipName:e.name,state:er,prompt:ea?.prompt,crewLines:ea?.crewLines,replacesUnclaimed:F,error:E.error?.message,isOpen:"prompt"===S,onOpenChange:e=>{e||(E.reset(),_.reset(),en())},onConfirm:()=>{_.reset(),E.mutate({shipId:e.id})}}),ei.dialog,O&&(0,t.jsx)(I.ComposeMessage,{isOpen:!0,onOpenChange:B,toShipId:e.id})]})}])},82532,e=>{"use strict";var t=e.i(43476),i=e.i(22768),s=e.i(10818),n=e.i(25398),a=e.i(71645),r=e.i(49635),o=e.i(15905),l=e.i(91703),d=e.i(22212),c=e.i(94945),u=e.i(19321),h=e.i(66616);function p({crewLines:e,subject:i,testIdPrefix:s,onCopied:n,onCopyFailed:a}){return e.map(({harness:e,line:r})=>(0,t.jsx)(l.CodeBlock,{label:`Crew line, ${(0,h.harnessWord)(e)} with the aeolus plugin`,code:r,isWrapped:!0,copyLabel:`Copy the ${(0,h.harnessWord)(e)} crew line for ${i}`,codeTestId:`${s}-${e}`,copyTestId:`${s}-${e}-copy`,onCopied:n,onCopyFailed:a},e))}var m=e.i(17981);function x({shipName:e,prompt:n,crewLines:r}){let[o,d]=(0,a.useState)(!1),c=()=>{d(!1)},u=()=>{d(!0)};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("p",{className:"flex gap-2 rounded-lg border border-border bg-muted px-3 py-2 text-meta text-foreground",children:[(0,t.jsx)(s.Info,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon-sm) shrink-0 text-muted-foreground"}),(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"font-medium",children:"Shown once. Copy it now."})," If you lose it, get a new one; this one then stops working."]})]}),(0,t.jsx)(l.CodeBlock,{label:`Starting prompt for ${e}`,code:n,isWrapped:!0,copyLabel:`Copy the starting prompt for ${e}`,codeTestId:"starting-prompt-text",copyTestId:"starting-prompt-copy",onCopied:c,onCopyFailed:u}),(0,t.jsx)(p,{crewLines:r,subject:e,testIdPrefix:"starting-prompt-crew-line",onCopied:c,onCopyFailed:u}),(0,t.jsx)("p",{role:"status",className:"flex items-center gap-1.5 text-meta text-destructive-text empty:hidden",children:o?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.CircleAlert,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0"}),"Could not copy: select the text and copy it by hand."]}):null})]})}e.s(["StartingPromptDialog",0,function(e){let{shipName:i,state:s,prompt:a,crewLines:l,replacesUnclaimed:h,error:p,isOpen:g,onOpenChange:f,onConfirm:b}=e,v="issuing"===s;return(0,t.jsx)(d.Dialog,{open:g,onOpenChange:e=>{v||f(e)},children:(0,t.jsxs)(d.DialogContent,{size:"md","data-testid":"starting-prompt-dialog",className:c.dialogSurface.phoneFullScreen,children:[(0,t.jsxs)(d.DialogHeader,{children:[(0,t.jsxs)(d.DialogTitle,{children:["Starting prompt for ",i]}),(0,t.jsxs)(d.DialogDescription,{children:["Paste it into the agent session that should crew this ship, or a crew line into Claude Code or Codex with the aeolus plugin. Any earlier prompt for ",i," stops working now."]})]}),"error"!==s&&h?(0,t.jsxs)("p",{className:"rounded-lg border border-tone-waiting-border bg-tone-waiting-bg px-3 py-2 text-meta text-tone-waiting-fg",children:["This prompt stops the one issued"," ",(0,t.jsx)("time",{dateTime:h.issuedAt,children:(0,r.shortDateTime)(new Date(h.issuedAt))})," ","working."]}):null,v?(0,t.jsxs)("div",{"aria-busy":!0,className:"flex flex-col gap-3",children:[(0,t.jsx)("span",{className:"sr-only",children:"Issuing a starting prompt..."}),(0,t.jsx)(u.Skeleton,{className:"h-10 w-full rounded-lg"}),(0,t.jsx)(u.Skeleton,{className:"h-40 w-full rounded-lg"})]}):null,"shown"===s&&void 0!==a&&void 0!==l?(0,t.jsx)(x,{shipName:i,prompt:a,crewLines:l}):null,"error"===s?(0,t.jsx)(m.InlineError,{title:"Couldn’t issue a starting prompt",description:`${p??"The server did not answer."} No new secret was created; any earlier prompt still works.`}):null,(0,t.jsxs)(d.DialogFooter,{children:["issuing"===s||"shown"===s?(0,t.jsx)(d.DialogClose,{render:(0,t.jsx)(o.Button,{variant:"primary",disabled:v}),children:"Done"}):null,"error"===s?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(d.DialogClose,{render:(0,t.jsx)(o.Button,{}),children:"Close"}),(0,t.jsx)(o.Button,{variant:"primary",icon:(0,t.jsx)(n.RotateCw,{}),onClick:b,children:"Try again"})]}):null]})]})})}],82532)},87792,e=>{"use strict";var t=e.i(43476),i=e.i(19759),s=e.i(15905),n=e.i(77880),a=e.i(36779),r=e.i(15034),o=e.i(85538);e.s(["ListLayout",0,function({title:e,description:l,primaryAction:d,toolbar:c,live:u,nav:h,onCompose:p,onSearch:m,account:x,banner:g,children:f}){return(0,t.jsxs)("div",{className:"flex min-h-dvh bg-background",children:[(0,t.jsx)(a.Sidebar,{active:h.active,inboxCount:h.inboxCount,attentionCount:h.attentionCount,hasSquadrons:h.hasSquadrons,hasSettings:h.hasSettings,...x}),(0,t.jsxs)("div",{className:"flex min-w-0 grow flex-col",children:[(0,t.jsx)(n.Header,{breadcrumb:e,live:u,onCompose:p,onSearch:m}),g,(0,t.jsx)(o.TopBar,{title:e,live:u,account:x,onSearch:m,actions:p?(0,t.jsx)(s.Button,{variant:"ghost",size:"touch",isIconOnly:!0,"aria-label":"Compose","data-testid":"top-bar-compose",onClick:p,children:(0,t.jsx)(i.SquarePen,{"aria-hidden":!0})}):void 0}),(0,t.jsxs)("main",{className:"flex grow flex-col gap-5 px-8 py-6 max-sm:gap-3.5 max-sm:px-4 max-sm:pt-3.5 max-sm:pb-[calc(var(--size-tabbar)+var(--spacing)*4)]",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4 max-sm:gap-3",children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-1",children:[(0,t.jsx)("h1",{className:"text-title font-semibold tracking-tight text-foreground max-sm:hidden",children:e}),l?(0,t.jsx)("p",{className:"text-meta text-muted-foreground max-sm:text-body-touch",children:l}):null]}),d?(0,t.jsx)("div",{className:"shrink-0 max-sm:w-full max-sm:[&>*]:w-full",children:d}):null]}),c,f]})]}),(0,t.jsx)(r.TabBar,{active:"overview"===h.active?"fleet":"settings"===h.active?void 0:h.active,hasSquadrons:h.hasSquadrons,inboxCount:h.inboxCount,attentionCount:h.attentionCount})]})}])}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,86695,e=>{"use strict";var s=e.i(43476);e.i(31627);var n=e.i(83615),t=e.i(18566),a=e.i(71645),i=e.i(44824),r=e.i(45608),o=e.i(95475),d=e.i(2767),l=e.i(67551),c=e.i(67927),m=e.i(44594),h=e.i(22016),u=e.i(49635),x=e.i(67874),p=e.i(17981),g=e.i(88393);function f({messages:e,state:n,error:t,onRetry:a,flagshipId:i,now:r}){return(0,s.jsxs)("section",{"aria-labelledby":"kept-messages","data-testid":"kept-messages",className:"flex flex-col gap-2",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,s.jsx)("h2",{id:"kept-messages",className:"text-body font-semibold",children:"Messages the flagship kept"}),(0,s.jsx)("p",{className:"text-meta text-muted-foreground",children:"Messages to the flagship it does not handle: kept here, never forwarded."})]}),"loading"===n?(0,s.jsx)(g.LoadingSkeleton,{variant:"list",rows:2,label:"Loading the kept messages"}):"error"===n?(0,s.jsx)(p.InlineError,{title:"Couldn’t load the kept messages",description:"The rest of the page is current. Try again in a moment.",detail:t,onRetry:a}):0===e.length?(0,s.jsx)(x.EmptyState,{variant:"section",icon:(0,s.jsx)(m.Inbox,{"aria-hidden":!0}),title:"No kept messages",description:"Every message to the flagship was the squadron's own."}):(0,s.jsx)("ul",{className:"divide-y divide-border overflow-hidden rounded-lg border border-border",children:e.map(e=>(0,s.jsx)("li",{"data-testid":"kept-message",children:(0,s.jsxs)(h.default,{href:`/ships/${i}?tab=messages&message=${e.messageId}`,className:"flex items-center gap-3 px-3 py-2.5 hover:bg-accent",children:[(0,s.jsxs)("span",{className:"flex min-w-0 grow flex-col gap-0.5",children:[(0,s.jsxs)("span",{className:"flex flex-wrap items-center gap-x-2 text-meta",children:[(0,s.jsx)("span",{className:"font-medium text-foreground",children:e.senderName}),(0,s.jsx)("span",{className:"font-mono text-muted-foreground",children:e.contentType}),(0,s.jsx)("time",{dateTime:e.receivedAt,className:"text-muted-foreground",children:(0,u.relativeTime)(new Date(e.receivedAt),r)})]}),(0,s.jsx)("span",{className:"truncate text-body",children:e.payload.split("\n")[0]??""})]}),(0,s.jsx)(c.ChevronRight,{"aria-hidden":!0,className:"size-(--size-icon) shrink-0 text-muted-foreground"}),(0,s.jsx)("span",{className:"sr-only",children:"Open the message"})]})},e.deliveryId))})]})}var j=e.i(76561),b=e.i(47211),v=e.i(81658),w=e.i(66787),N=e.i(26808),S=e.i(24010),y=e.i(15905),C=e.i(94945),k=e.i(1009),I=e.i(69374);function D(e){return`${String(e)} ${1===e?"delivery":"deliveries"}`}function q(e){let{squadronId:n,memberCount:t,openDeliveries:i,inFlightDeliveries:r,isForced:o=!1,isPending:d,error:l,onConfirm:c}=e,[m,h]=(0,a.useState)(""),u=o&&i>0,x=!u||(0,N.isTypedMatch)(n,m),g=void 0===l?null:(0,s.jsx)(p.InlineError,{title:"Couldn’t stand down the squadron",description:`${l} Nothing changed; the squadron still sails.`});return o?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(S.AlertDialogHeader,{children:[(0,s.jsxs)(S.AlertDialogTitle,{children:["Force stand down ",n,"?"]}),(0,s.jsx)(S.AlertDialogDescription,{children:"The squadron disbands right away. This can't be undone."})]}),i>0?(0,s.jsxs)("div",{role:"alert",className:"flex gap-2 rounded-lg border border-tone-attention-border bg-tone-attention-bg p-3 text-meta text-tone-attention-fg",children:[(0,s.jsx)(w.TriangleAlert,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon-sm) shrink-0"}),(0,s.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,s.jsxs)("p",{className:"font-medium",children:[D(i)," will be abandoned"]}),(0,s.jsxs)("p",{className:"text-foreground",children:["Members and the flagship retire now, without finishing. ",i-r," pending, ",r," in flight."]})]})]}):(0,s.jsx)(k.ConsequenceList,{consequences:[{icon:j.Archive,text:"Every member ship and the flagship retire now and the squadron is disbanded. No open work is lost."}]}),u?(0,s.jsx)(I.TypedConfirm,{expected:n,value:m,onValueChange:h}):null,g,(0,s.jsxs)(S.AlertDialogFooter,{children:[(0,s.jsx)(S.AlertDialogClose,{render:(0,s.jsx)(y.Button,{disabled:d}),children:"Cancel"}),(0,s.jsx)(y.Button,{variant:"destructive",isLoading:d,disabled:!x,onClick:c,"data-testid":"force-stand-down-confirm",children:i>0?`Stand down now and abandon ${D(i)}`:"Force stand down"})]})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(S.AlertDialogHeader,{children:[(0,s.jsxs)(S.AlertDialogTitle,{children:["Stand down ",n,"?"]}),(0,s.jsxs)(S.AlertDialogDescription,{children:["Its ",t," ",1===t?"member winds":"members wind"," down on their own. This can't be undone."]})]}),(0,s.jsx)(k.ConsequenceList,{consequences:[{icon:b.Ban,text:"No new work reaches its members; hand-offs stop."},{icon:v.Hourglass,text:`Members finish their open work: ${D(i)}.`},{icon:j.Archive,text:"Then each member ship and the flagship retire and the squadron is disbanded. History stays read-only."}]}),g,(0,s.jsxs)(S.AlertDialogFooter,{children:[(0,s.jsx)(S.AlertDialogClose,{render:(0,s.jsx)(y.Button,{disabled:d}),children:"Cancel"}),(0,s.jsx)(y.Button,{variant:"destructive",isLoading:d,onClick:c,"data-testid":"stand-down-confirm",children:d?"Standing down":"Stand down squadron"})]})]})}function M(e){let{isOpen:n,onOpenChange:t,isPending:a,isForced:i=!1}=e;return(0,s.jsx)(S.AlertDialog,{open:n,onOpenChange:e=>{a||t(e)},children:(0,s.jsx)(S.AlertDialogContent,{"data-testid":i?"force-stand-down-dialog":"stand-down-dialog",className:C.dialogSurface.phoneSheet,children:(0,s.jsx)(q,{...e})})})}var A=e.i(57443),T=e.i(84294),$=e.i(22212);function z({squadronId:e,blueprint:n,roles:t,isPending:i,error:r,onSubmit:o}){let[d,l]=(0,a.useState)(t[0]?.role),c=t.find(e=>e.role===d)??t[0];return c?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)($.DialogHeader,{children:[(0,s.jsxs)($.DialogTitle,{children:["Add a member to ",e]}),(0,s.jsx)($.DialogDescription,{children:"Roles come from its blueprint. Next you get the new member's crew lines."})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsx)("span",{className:"text-meta font-medium",children:"Role"}),(0,s.jsx)("div",{role:"radiogroup","aria-label":"Role",className:"flex flex-col gap-2",children:t.map(e=>(0,s.jsxs)("button",{type:"button",role:"radio","aria-checked":e.role===c.role,"data-testid":"add-member-role",onClick:()=>{l(e.role)},className:"flex items-center gap-3 rounded-md border border-border px-3 py-2 text-left text-meta aria-checked:border-primary aria-checked:ring-1 aria-checked:ring-primary",children:[(0,s.jsx)("span",{className:"rounded-sm bg-muted px-1.5 font-mono",children:e.role}),(0,s.jsx)("span",{className:"font-mono text-muted-foreground",children:e.template}),(0,s.jsxs)("span",{className:"ml-auto text-muted-foreground",children:[e.now," now"]})]},e.role))})]}),(0,s.jsxs)("p",{className:"flex items-start gap-2 rounded-md bg-muted px-3 py-2 text-meta text-muted-foreground",children:[(0,s.jsx)(A.UserPlus,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon-sm) shrink-0"}),(0,s.jsxs)("span",{children:["A new ship of the role ",c.role,", template ",(0,s.jsx)("span",{className:"font-mono",children:c.template}),void 0===c.checkInMinutes?"":`, checks in ${(0,T.checkInText)(c.checkInMinutes)}`,". Blueprint ",n," has ",c.inBlueprint," ",c.role,"; the squadron then has ",c.now+1,"."]})]}),void 0!==r&&(0,s.jsx)(p.InlineError,{variant:"field",title:"Couldn’t add the member",description:`${r} No ship was commissioned.`}),(0,s.jsxs)($.DialogFooter,{children:[(0,s.jsx)($.DialogClose,{render:(0,s.jsx)(y.Button,{type:"button",disabled:i}),children:"Cancel"}),(0,s.jsx)(y.Button,{variant:"primary",isLoading:i,"data-testid":"add-member-submit",onClick:()=>{o(c.role)},children:i?"Adding":"Add member"})]})]}):null}function O(e){let{isOpen:n,onOpenChange:t,isPending:a}=e;return(0,s.jsx)($.Dialog,{open:n,onOpenChange:e=>{a||t(e)},children:(0,s.jsx)($.DialogContent,{size:"md","data-testid":"add-member-dialog",className:C.dialogSurface.phoneFullScreen,children:(0,s.jsx)(z,{...e})})})}var F=e.i(42211),L=e.i(8734),R=e.i(86247),B=e.i(58925),P=e.i(19759),H=e.i(56420);let E={name:"square-arrow-out-up-right",size:24,node:[["path",{d:"M21 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h6",key:"y09zxi"}],["path",{d:"m21 3-9 9",key:"mpx6sq"}],["path",{d:"M15 3h6v6",key:"1q9fwt"}]],aliases:["arrow-up-right-from-square"]};E.node;let K=(0,H.default)(E);var U=e.i(49319),W=e.i(57334),_=e.i(75305),G=e.i(41880),V=e.i(39874);function J({squadronId:e,member:t,ship:r,template:o,canManage:d,canSend:l,isRemovable:c,onRemove:m}){let[u,x]=(0,a.useState)(!1),p="retired"===t.crew.status||r?.status==="retired",g=(0,V.useNewCrewLineFlow)(d&&!p?{squadronId:e,member:t,ship:r,template:o}:void 0),f=(0,n.idSchema)("ship").safeParse(t.shipId).data,j=async()=>{try{await navigator.clipboard.writeText(t.shipId),(0,G.showToast)({title:"Ship id copied",description:t.shipId,tone:"success"})}catch{(0,G.showToast)({title:"Couldn’t copy the ship id",description:t.shipId,tone:"error"})}},b=[{key:"open",label:"Open ship page",icon:K,testId:"member-open-ship",href:`/ships/${t.shipId}`},...l&&!p&&f?[{key:"message",label:"Message…",icon:P.SquarePen,testId:"member-message",onSelect:()=>{x(!0)}}]:[],...d&&!p?[{key:"crew-line",label:"Get new crew line…",icon:B.KeyRound,testId:"member-new-crew-line",onSelect:g.start}]:[],{key:"copy",label:"Copy ship id",icon:L.Copy,testId:"member-copy-id",onSelect:()=>void j()}],v=d&&c&&!p?{key:"remove",label:"Remove from squadron…",icon:U.UserMinus,testId:"member-remove",isDestructive:!0,onSelect:m}:void 0,w=e=>(0,s.jsx)(y.Button,{size:e,variant:"ghost",isIconOnly:!0,"aria-label":`Actions for ${t.name}`,icon:(0,s.jsx)(R.Ellipsis,{}),"data-testid":"member-actions"});return(0,s.jsxs)("span",{className:"flex shrink-0 items-center gap-1",children:[d&&!p&&"silent"===t.health&&(0,s.jsx)(y.Button,{size:"xs",disabled:!g.isReady,"data-testid":"member-new-crew-line-primary",onClick:g.start,children:"Get new crew line"}),(0,s.jsx)("span",{className:"max-sm:hidden",children:(0,s.jsxs)(W.DropdownMenu,{children:[(0,s.jsx)(W.DropdownMenuTrigger,{render:w("xs")}),(0,s.jsxs)(W.DropdownMenuContent,{align:"end",children:[b.map(e=>void 0===e.href?(0,s.jsxs)(W.DropdownMenuItem,{onClick:e.onSelect,"data-testid":e.testId,children:[(0,s.jsx)(e.icon,{"aria-hidden":!0}),e.label]},e.key):(0,s.jsxs)(W.DropdownMenuItem,{render:(0,s.jsx)(h.default,{href:e.href}),"data-testid":e.testId,children:[(0,s.jsx)(e.icon,{"aria-hidden":!0}),e.label]},e.key)),v&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(W.DropdownMenuSeparator,{}),(0,s.jsxs)(W.DropdownMenuItem,{variant:"destructive",onClick:v.onSelect,"data-testid":v.testId,children:[(0,s.jsx)(v.icon,{"aria-hidden":!0}),v.label]})]})]})]})}),(0,s.jsx)("span",{className:"sm:hidden",children:(0,s.jsxs)(_.Sheet,{children:[(0,s.jsx)(_.SheetTrigger,{render:w("touch")}),(0,s.jsxs)(_.SheetContent,{side:"bottom",children:[(0,s.jsx)(_.SheetHeader,{children:(0,s.jsx)(_.SheetTitle,{children:t.name})}),(0,s.jsx)("ul",{className:"flex flex-col pb-2",children:[...b,...v?[v]:[]].map(e=>(0,s.jsx)("li",{className:!0===e.isDestructive?"mt-1 border-t border-border pt-1":void 0,children:(0,s.jsxs)(_.SheetClose,{render:void 0===e.href?(0,s.jsx)("button",{type:"button",onClick:e.onSelect}):(0,s.jsx)(h.default,{href:e.href}),className:`flex h-(--size-control-touch) w-full items-center gap-3 px-4 text-left text-body-touch [&_svg]:size-(--size-icon) [&_svg]:shrink-0 ${!0===e.isDestructive?"text-destructive-text":"text-foreground"}`,children:[(0,s.jsx)(e.icon,{"aria-hidden":!0}),e.label.replace(/…$/,"")]})},e.key))}),(0,s.jsx)("div",{className:"px-4 pb-4",children:(0,s.jsx)(_.SheetClose,{render:(0,s.jsx)(y.Button,{size:"touch",className:"w-full"}),children:"Cancel"})})]})]})}),g.dialog,f&&(0,s.jsx)(i.ComposeMessage,{isOpen:u,onOpenChange:x,toShipId:f})]})}let Q={name:"octagon-x",size:24,node:[["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],aliases:["x-octagon"]};Q.node;let X=(0,H.default)(Q);var Y=e.i(47321);function Z({squadronId:e,offered:n,onAddMember:t,onMessageFlagship:a,onStandDown:i,onForceStandDown:r}){let o=async()=>{try{await navigator.clipboard.writeText(e),(0,G.showToast)({title:"Squadron id copied",description:e,tone:"success"})}catch{(0,G.showToast)({title:"Couldn’t copy the squadron id",description:e,tone:"error"})}},d={key:"copy",label:"Copy squadron id",icon:L.Copy,testId:"squadron-copy-id",onSelect:()=>void o()},l=[...n.canStandDown?[{key:"stand-down",label:"Stand down…",icon:Y.Waves,testId:"squadron-stand-down",isDestructive:!0,onSelect:i}]:[],...n.canForceStandDown?[{key:"force",label:"Force stand down…",icon:X,testId:"squadron-force-stand-down",isDestructive:!0,onSelect:r}]:[]],c=e=>(0,s.jsx)(y.Button,{size:e,variant:"ghost",isIconOnly:!0,"aria-label":"Squadron actions",icon:(0,s.jsx)(R.Ellipsis,{}),"data-testid":"squadron-actions"});return(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[n.canAddMember&&(0,s.jsx)(y.Button,{size:"xs",icon:(0,s.jsx)(A.UserPlus,{}),"data-testid":"squadron-add-member",onClick:t,children:"Add member"}),n.canMessageFlagship&&(0,s.jsx)(y.Button,{size:"xs",icon:(0,s.jsx)(P.SquarePen,{}),"data-testid":"squadron-message-flagship",onClick:a,children:"Message"}),(0,s.jsx)("div",{className:"max-sm:hidden",children:(0,s.jsxs)(W.DropdownMenu,{children:[(0,s.jsx)(W.DropdownMenuTrigger,{render:c("xs")}),(0,s.jsxs)(W.DropdownMenuContent,{align:"end",children:[(0,s.jsxs)(W.DropdownMenuItem,{onClick:d.onSelect,"data-testid":d.testId,children:[(0,s.jsx)(L.Copy,{"aria-hidden":!0}),d.label]}),l.length>0&&(0,s.jsx)(W.DropdownMenuSeparator,{}),l.map(e=>(0,s.jsxs)(W.DropdownMenuItem,{variant:"destructive",onClick:e.onSelect,"data-testid":e.testId,children:[(0,s.jsx)(e.icon,{"aria-hidden":!0}),e.label]},e.key))]})]})}),(0,s.jsx)("div",{className:"sm:hidden",children:(0,s.jsxs)(_.Sheet,{children:[(0,s.jsx)(_.SheetTrigger,{render:c("touch")}),(0,s.jsxs)(_.SheetContent,{side:"bottom","data-testid":"squadron-actions-sheet",children:[(0,s.jsx)(_.SheetHeader,{children:(0,s.jsx)(_.SheetTitle,{children:e})}),(0,s.jsx)("ul",{className:"flex flex-col pb-2",children:[d,...l].map((e,n)=>(0,s.jsx)("li",{className:1===n?"mt-1 border-t border-border pt-1":void 0,children:(0,s.jsxs)(_.SheetClose,{render:(0,s.jsx)("button",{type:"button",onClick:e.onSelect}),className:`flex h-(--size-control-touch) w-full items-center gap-3 px-4 text-left text-body-touch [&_svg]:size-(--size-icon) [&_svg]:shrink-0 ${!0===e.isDestructive?"text-destructive-text":"text-foreground"}`,children:[(0,s.jsx)(e.icon,{"aria-hidden":!0}),e.label.replace(/…$/,"")]})},e.key))}),(0,s.jsx)("div",{className:"px-4 pb-4",children:(0,s.jsx)(_.SheetClose,{render:(0,s.jsx)(y.Button,{size:"touch",className:"w-full"}),children:"Cancel"})})]})]})})]})}var ee=e.i(48287),es=e.i(10818),en=e.i(82880),et=e.i(19249),ea=e.i(3067),ei=e.i(63481),er=e.i(81830),eo=e.i(78865);function ed({ship:e,now:n}){return e?(0,s.jsxs)("div",{className:"flex grow flex-wrap items-center justify-end gap-x-4 gap-y-1 text-meta",children:["crewed"===e.status?(0,s.jsx)(er.ReportLine,{report:e.report,now:n,variant:"row",testId:"member-report"}):(0,s.jsx)(eo.StatusBadge,{status:e.status}),e.location?(0,s.jsx)(ei.LocationTag,{kind:e.location.kind,description:e.location.description,isCompact:!0,size:"sm"}):(0,s.jsx)("span",{className:"text-muted-foreground",children:"No session"}),(0,s.jsxs)("span",{className:"flex items-center gap-1 text-muted-foreground","data-testid":"member-inbox",children:[(0,s.jsx)(m.Inbox,{"aria-hidden":!0,className:"size-(--size-icon-sm)"}),e.openDeliveries,(0,s.jsx)("span",{className:"sr-only",children:" open"})]})]}):null}function el({role:e,blueprint:n,templates:t,count:a}){let i=n?.roles.find(s=>s.name===e)?.template,r=t.find(e=>e.repository===i?.repository&&e.name===i.name&&e.version===i.version);return(0,s.jsxs)("div",{className:"flex items-center gap-2 bg-muted px-3 py-1.5 text-meta",children:[(0,s.jsx)("span",{className:"rounded-sm bg-card px-1.5 font-mono",children:e}),i&&(0,s.jsx)("span",{className:"font-mono text-muted-foreground",children:`${i.name}@${String(i.version)}`}),r&&(0,s.jsxs)("span",{className:"text-muted-foreground",children:["checks in ",(0,T.checkInText)(r.checkInMinutes)]}),(0,s.jsxs)("span",{className:"ml-auto text-muted-foreground",children:[a," ",1===a?"member":"members"]})]})}function ec({issued:e,template:n}){return(0,s.jsxs)("div",{className:"flex flex-col gap-2 border-b border-border px-3 py-2.5",children:[(0,s.jsx)(ea.LaunchNote,{note:e.launchNote,model:e.model,template:n,testId:"member-launch-note"}),(0,s.jsxs)("p",{className:"flex items-center gap-1.5 text-meta text-muted-foreground",children:[(0,s.jsx)(es.Info,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0"}),(0,s.jsxs)("span",{children:[(0,s.jsx)("span",{className:"font-medium",children:"Shown once."})," Paste a member’s crew line into Claude Code or Codex started where the launch note says, or into a chat client with the fleet’s connector."]})]})]})}function em({member:e,issued:n,ship:t,now:a,renderActions:i}){return(0,s.jsxs)("li",{"data-testid":"member-row",className:"flex flex-col gap-2 px-3 py-2.5",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)(h.default,{href:`/ships/${e.shipId}`,className:"font-medium hover:underline","data-testid":"member-name",children:e.name}),(0,s.jsx)(et.HealthIndicator,{health:e.health,detail:function(e,{ship:s,now:n}){let{lastSeenAt:t}=e.crew;if("late"!==e.health&&"silent"!==e.health||null===t)return;let a=(0,u.lastSeen)(new Date(t),n).replace(/^Last/,"last"),i=s?.location?.description;return i?`${a} on ${i}`:a}(e,{ship:t,now:a}),className:"shrink-0"}),e.model.isMismatch&&(0,s.jsxs)("span",{className:"text-meta text-tone-attention-fg",children:["Runs ",e.model.stated??"an unstated model",", not ",e.model.pinned]}),(0,s.jsx)(ed,{ship:t,now:a}),i?.(e)]}),n&&(0,s.jsx)(en.CompactCrewLine,{crewLines:n.crewLines,subject:e.name,testIdPrefix:"member-crew-line"})]})}function eh({squadron:e,blueprint:n,templates:t,crewLines:a,ships:i,now:r,renderActions:o}){if(0===e.members.length)return(0,s.jsx)(x.EmptyState,{variant:"section",title:"No members",description:"This squadron has no members."});let d=e=>null===e.onStationAt?a.get(e.shipId):void 0;return(0,s.jsx)("div",{"data-testid":"member-list",className:"flex flex-col overflow-hidden rounded-lg border border-border",children:(0,T.membersByRole)(e.members).map(e=>{let a=n?.roles.find(s=>s.name===e.role)?.template,l=e.members.map(d).find(e=>void 0!==e);return(0,s.jsxs)("section",{"aria-label":`Role ${e.role}`,children:[(0,s.jsx)(el,{role:e.role,blueprint:n,templates:t,count:e.members.length}),l&&(0,s.jsx)(ec,{issued:l,template:a&&`${a.name}@${String(a.version)}`}),(0,s.jsx)("ul",{className:"divide-y divide-border",children:e.members.map(e=>(0,s.jsx)(em,{member:e,issued:d(e),ship:i.get(e.shipId),now:r,renderActions:o},e.shipId))})]},e.role)})})}var eu=e.i(90063);let ex={forming:{done:"on station",next:"Sails when all are on station"},standdown:{done:"finished their work",next:"Disbands when all are done"}};function ep({done:e,total:n,variant:t,className:a}){let i=ex[t],r=1===n?"member":"members";return(0,s.jsxs)("div",{"data-slot":"station-progress",role:"progressbar","aria-valuemin":0,"aria-valuemax":n,"aria-valuenow":e,"aria-label":`${String(e)} of ${String(n)} ${r} ${i.done}`,className:(0,eu.classNames)("flex flex-col gap-1.5",a),children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-baseline justify-between gap-2 text-meta",children:[(0,s.jsxs)("p",{role:"status","aria-live":"polite",className:"text-foreground","data-testid":"station-progress",children:[(0,s.jsxs)("span",{className:"font-medium",children:[e," of ",n," ",r]})," ",i.done]}),(0,s.jsx)("span",{className:"text-muted-foreground",children:i.next})]}),(0,s.jsx)("div",{"aria-hidden":!0,className:"flex gap-1",children:Array.from({length:n},(n,t)=>(0,s.jsx)("span",{className:(0,eu.classNames)("h-1.5 grow rounded-full",t<e?"bg-tone-ok-fg":"bg-muted")},`segment-${String(t)}`))})]})}function eg({squadron:e,squadronId:n,state:t,actions:a,onForceStandDown:i}){if("loading"===t)return(0,s.jsx)(g.LoadingSkeleton,{variant:"detail",rows:2,label:"Loading the squadron"});if("not-found"===t||!e)return(0,s.jsx)(x.EmptyState,{title:"No such squadron",description:`The squadron manager knows no squadron ${n}.`});let{onStation:r,total:o}=(0,T.stationCount)(e);return(0,s.jsxs)("header",{"data-testid":"squadron-header",className:"flex flex-col gap-3",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2.5",children:[(0,s.jsx)("h1",{className:"text-title font-semibold",children:e.id}),(0,s.jsx)(eo.StatusBadge,{status:e.state}),(0,s.jsxs)(h.default,{href:(0,T.blueprintPath)(e.blueprint),className:"text-meta text-muted-foreground hover:underline","data-testid":"squadron-blueprint",children:[(0,s.jsx)("span",{className:"font-mono",children:e.blueprint.name})," v",e.blueprint.version]}),a&&(0,s.jsx)("div",{className:"ml-auto flex gap-2",children:a})]}),(0,s.jsxs)("dl",{className:"flex flex-wrap gap-x-6 gap-y-1 text-meta text-muted-foreground",children:[(0,s.jsxs)("div",{className:"flex gap-1.5",children:[(0,s.jsx)("dt",{children:"Flagship"}),(0,s.jsx)("dd",{className:"font-mono text-foreground",children:e.flagship.name})]}),(0,s.jsxs)("div",{className:"flex gap-1.5",children:[(0,s.jsx)("dt",{children:"Members"}),(0,s.jsx)("dd",{className:"text-foreground",children:o})]}),(0,s.jsxs)("div",{className:"flex gap-1.5",children:[(0,s.jsx)("dt",{children:"Formed"}),(0,s.jsx)("dd",{className:"text-foreground",children:(0,u.shortDateTime)(new Date(e.formedAt))})]})]}),"standing-down"===e.state&&(0,s.jsxs)("div",{role:"status","data-testid":"squadron-state-notice",className:"flex flex-wrap items-center gap-3 rounded-lg border border-tone-waiting-border bg-tone-waiting-bg px-3 py-2.5 text-meta text-foreground",children:[(0,s.jsx)("span",{className:"grow",children:"No new work reaches its members. They finish their open work, then retire and the squadron disbands."}),i&&(0,s.jsx)(y.Button,{size:"xs","data-testid":"squadron-notice-force-stand-down",onClick:i,children:"Force stand down…"})]}),"disbanded"===e.state&&(0,s.jsxs)("div",{role:"status","data-testid":"squadron-state-notice",className:"rounded-lg border border-tone-ended-border bg-tone-ended-bg px-3 py-2.5 text-meta text-foreground",children:["Read-only. Its ",1===o?"1 member ship":`${String(o)} member ships`," and its flagship were retired; their history stays."]}),"forming"===e.state&&(0,s.jsx)(ep,{done:r,total:o,variant:"forming",className:"max-w-md"}),"standing-down"===e.state&&(0,s.jsx)(ep,{done:e.members.filter(e=>"retired"===e.crew.status).length,total:o,variant:"standdown",className:"max-w-md"})]})}var ef=e.i(274);let ej={working:"working",idle:"idle",blocked:"blocked"};function eb({label:e,children:n}){return(0,s.jsxs)("div",{className:"flex min-w-0 flex-col gap-1",children:[(0,s.jsx)("span",{className:"text-caption font-medium text-muted-foreground",children:e}),(0,s.jsx)("span",{className:"text-meta text-foreground",children:n})]})}function ev({health:e,work:n,openDeliveries:t,keptCount:a}){return(0,s.jsxs)("div",{"aria-label":"Squadron summary","data-testid":"squadron-summary",className:"grid grid-cols-4 gap-4 rounded-lg border border-border bg-card px-4 py-3 shadow-sm max-sm:grid-cols-2 max-sm:gap-3",children:[(0,s.jsx)(eb,{label:"Health",children:0===e.length?"None":(0,s.jsx)(et.HealthSummary,{counts:e})}),(0,s.jsx)(eb,{label:"Work",children:0===n.length?"None reported":n.map(({state:e,count:s})=>`${String(s)} ${ej[e]}`).join(", ")}),(0,s.jsx)(eb,{label:"Open deliveries",children:void 0===t?"…":`${String(t)} in member inboxes`}),(0,s.jsx)(eb,{label:"Kept by the flagship",children:void 0===a?"…":0===a?"None":String(a)})]})}var ew=e.i(33939),eN=e.i(90262),eS=e.i(88721),ey=e.i(86413),eC=e.i(18423),ek=e.i(28459),eI=e.i(96676),eD=e.i(78485),eq=e.i(53573),eM=e.i(86165),eA=e.i(48695);e.s(["default",0,function({params:e,searchParams:c}){let{squadronId:m}=(0,a.use)(e),h=(0,a.use)(c).action,u=(0,t.useRouter)(),x=(0,eI.useNow)(),p=(0,eS.useAccountMenu)(x),j=(0,eM.useHasSquadrons)(),b=(0,ey.useOpenInboxCount)(),v=(0,ek.useNeedsAttention)(),w=(0,ek.useAttentionCount)(),N=(0,eC.useLiveFleet)(),S=(0,eA.useSquadrons)(),y=(0,eM.useSquadronsConnection)(),C=(0,eA.useCatalogue)(),k=(0,eA.useIssuedCrewLines)(m),I=(0,eA.useKeptMessages)(m),D=(0,eA.useStandDown)(),[q,A]=(0,a.useState)(!1),$=(0,eA.useForceStandDown)(),[z,L]=(0,a.useState)(!1),R=(0,eA.useAddMember)(),[B,P]=(0,a.useState)(!1),[H,E]=(0,a.useState)(void 0),K=(0,eA.useRemoveMember)(),[U,W]=(0,a.useState)(void 0),_=(0,eN.useAccess)(),[G,V]=(0,a.useState)(!1),[Q,X]=(0,a.useState)(!1),[Y,es]=(0,a.useState)(!1);(0,eD.useSignInWhenSessionEnds)([v.error,N.error]);let en=S.data?.find(e=>e.id===m),et=(0,eq.useShips)(en?.members.map(e=>e.shipId)??[]),ea=[...et.values()].reduce((e,s)=>e+s.openDeliveries,0),ei=[...et.values()].reduce((e,s)=>e+s.inFlightDeliveries,0),er=C.data?.blueprints.find(e=>e.repository===en?.blueprint.repository&&e.name===en.blueprint.name&&e.version===en.blueprint.version),eo=en&&er?(0,T.roleOptions)(en,{blueprint:er,templates:C.data?.templates??[]}):[],ed=U?et.get(U.shipId):void 0,el=U?eo.find(e=>e.role===U.role):void 0,ec=en?(0,n.idSchema)("ship").safeParse(en.flagship.shipId).data:void 0,em=en?(0,T.squadronActionsOffered)(en,{canManage:_.canManage,canSend:_.canSend,hasRoles:eo.length>0}):void 0,eu="add-member"===h&&em?.canAddMember===!0,ex="stand-down"===h&&em?.canStandDown===!0,ep=()=>{void 0!==h&&u.replace(`/squadrons/${m}`,{scroll:!1})},ej=en?.state==="sailing"||en?.state==="standing-down";return(0,s.jsxs)(ef.DetailLayout,{title:m,parents:[{href:"/squadrons",label:"Squadrons"}],header:(0,s.jsx)(eg,{squadron:en,squadronId:m,state:S.data?en?"ready":"not-found":"loading",actions:en&&em?(0,s.jsx)(Z,{squadronId:en.id,offered:em,onAddMember:()=>{R.reset(),P(!0)},onMessageFlagship:()=>{X(!0)},onStandDown:()=>{D.reset(),A(!0)},onForceStandDown:()=>{$.reset(),L(!0)}}):void 0,onForceStandDown:_.canManage?()=>{$.reset(),L(!0)}:void 0}),live:N.live,nav:{active:"squadrons",inboxCount:b,attentionCount:w,hasSquadrons:j,hasSettings:j&&_.canManage},onCompose:_.canSend?()=>{V(!0)}:void 0,onSearch:()=>{es(!0)},account:p,banner:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(d.ConsoleNotices,{}),(0,s.jsx)(o.ConsoleGuide,{})]}),children:["not-connected"===y?(0,s.jsx)(ew.SquadronsNotConnected,{}):en?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(ev,{health:(0,T.healthCounts)(en.members),work:(0,T.workCounts)(en.members.map(e=>et.get(e.shipId)?.report??null)),openDeliveries:et.size===en.members.length?ea:void 0,keptCount:I.data?.length}),(0,s.jsx)(eh,{squadron:en,blueprint:er,templates:C.data?.templates??[],crewLines:k,ships:et,now:x,renderActions:e=>(0,s.jsx)(J,{squadronId:en.id,member:e,ship:et.get(e.shipId),template:eo.find(s=>s.role===e.role)?.template,canManage:_.canManage,canSend:_.canSend,isRemovable:ej,onRemove:()=>{K.reset(),W(e)}})})]}):S.data?null:(0,s.jsx)(g.LoadingSkeleton,{variant:"list",label:"Loading the members"}),er&&(0,s.jsx)(l.HandoffWiring,{blueprint:er}),en&&(0,s.jsx)(f,{messages:I.data??[],state:I.isError?"error":I.data?"ready":"loading",error:I.error?.message,onRetry:()=>{I.refetch()},flagshipId:en.flagship.shipId,now:x}),en&&(0,s.jsx)(M,{squadronId:en.id,memberCount:en.members.length,openDeliveries:ea,inFlightDeliveries:ei,isOpen:q||ex,onOpenChange:e=>{A(e),e||ep()},isPending:D.isPending,error:D.error?.message,onConfirm:()=>{D.mutate(en.id,{onSuccess:()=>{A(!1),ep()}})}}),en&&(0,s.jsx)(M,{isForced:!0,squadronId:en.id,memberCount:en.members.length,openDeliveries:ea,inFlightDeliveries:ei,isOpen:z,onOpenChange:L,isPending:$.isPending,error:$.error?.message,onConfirm:()=>{$.mutate(en.id,{onSuccess:()=>{L(!1)}})}}),en&&eo.length>0&&(0,s.jsx)(O,{squadronId:en.id,blueprint:`${en.blueprint.name} v${String(en.blueprint.version)}`,roles:eo,isOpen:B||eu,onOpenChange:e=>{P(e),e||ep()},isPending:R.isPending,error:R.error?.message,onSubmit:e=>{R.mutate({squadronId:en.id,role:e},{onSuccess:e=>{P(!1),ep(),E(e)}})}}),en&&U&&(0,s.jsx)(ee.RemoveMemberDialog,{squadronId:en.id,member:U,othersOfRole:(0,T.otherMembersOfRole)(en,U.shipId),blueprint:el?{label:`${en.blueprint.name} v${String(en.blueprint.version)}`,count:el.inBlueprint}:void 0,openDeliveries:ed?.openDeliveries??0,inFlightDeliveries:ed?.inFlightDeliveries??0,isOpen:void 0!==ed,onOpenChange:e=>{e||W(void 0)},isPending:K.isPending,error:K.error?.message,onConfirm:()=>{K.mutate({squadronId:en.id,shipId:U.shipId},{onSuccess:()=>{W(void 0)}})}}),H&&(0,s.jsx)(F.CrewLineDialog,{memberName:H.name,state:"shown",template:eo.find(e=>e.role===H.role)?.template,launchNote:H.launchNote,model:H.model,crewLines:H.crewLines,isOpen:!0,onOpenChange:e=>{e||E(void 0)}}),(0,s.jsx)(i.ComposeMessage,{isOpen:G,onOpenChange:V}),ec&&(0,s.jsx)(i.ComposeMessage,{isOpen:Q,onOpenChange:X,toShipId:ec}),(0,s.jsx)(r.ConsoleCommands,{isOpen:Y,onOpenChange:es,onCompose:()=>{V(!0)}})]})}],86695)}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,52376,e=>{"use strict";e.s([],4824),e.i(4824);var t=e.i(71645),r=e.i(52245),n=e.i(33332);let i=t.createContext(void 0);function s(){let e=t.useContext(i);if(void 0===e)throw Error((0,n.default)(13));return e}let a={imageLoadingStatus:()=>null};var o=e.i(43476);let l=t.forwardRef(function(e,n){let{className:s,render:l,style:u,...c}=e,[d,f]=t.useState("idle"),h=t.useMemo(()=>({imageLoadingStatus:d,setImageLoadingStatus:f}),[d,f]),p=(0,r.useRenderElement)("span",e,{state:{imageLoadingStatus:d},ref:n,props:c,stateAttributesMapping:a});return(0,o.jsx)(i.Provider,{value:h,children:p})});var u=e.i(67865),c=e.i(46376),d=e.i(37584),f=e.i(74354),h=e.i(23910),p=e.i(56789);let m={...a,...f.transitionStatusMapping},g=t.forwardRef(function(e,n){let{className:i,render:a,onLoadingStatusChange:o,keepMounted:l=!1,style:f,sizes:g,srcSet:y,src:b,...v}=e,{setImageLoadingStatus:x}=s(),[j,S]=function(e,{referrerPolicy:r,crossOrigin:n,sizes:i,srcSet:s},a){let o=t.useState("idle"),l=o[1];return(0,c.useIsoLayoutEffect)(()=>{if(!a)return p.NOOP;if(!e&&!s)return l("error"),p.NOOP;let t=!0,o=new window.Image,u=e=>()=>{t&&l(e)};return l("loading"),o.onload=u("loaded"),o.onerror=u("error"),r&&(o.referrerPolicy=r),o.crossOrigin=n??null,i&&(o.sizes=i),s&&(o.srcset=s),e&&(o.src=e),o.complete&&l(o.naturalWidth>0?"loaded":"error"),()=>{t=!1}},[a,e,s,i,n,r,l]),o}(b,e,!l),k="loaded"===j,{mounted:C,transitionStatus:E,setMounted:I}=(0,h.useTransitionStatus)(k),T=t.useRef(null),P=t.useRef(!0);(0,c.useIsoLayoutEffect)(()=>{if(!l)return;let e=P.current;P.current=!1;let t=T.current;if(!t)return;if(!t.complete)return void S("loading");let r=t.naturalWidth>0?"loaded":"error";S(r),"loaded"===r&&e&&I(!0)},[l,b,y,g,v.crossOrigin,v.referrerPolicy,a,S,I]);let O=l?{"data-loading":"loading"===j?"":void 0,"data-error":"error"===j?"":void 0,"aria-hidden":"loaded"!==j||void 0,onLoad(){S("loaded")},onError(){S("error")}}:void 0,A=(0,u.useStableCallback)(e=>{o?.(e),x(e)});(0,c.useIsoLayoutEffect)(()=>{"idle"!==j&&A(j)},[j,A]),(0,c.useIsoLayoutEffect)(()=>()=>x("idle"),[x]),(0,d.useOpenChangeComplete)({enabled:!k,open:k,ref:T,onComplete(){k||I(!1)}});let N=l||C,R={};void 0!==g&&(R.sizes=g),void 0!==y&&(R.srcSet=y),void 0!==b&&(R.src=b);let w=(0,r.useRenderElement)("img",e,{state:{imageLoadingStatus:j,transitionStatus:l&&"ending"===E?void 0:E},ref:[n,T],props:[O,v,R],stateAttributesMapping:m,enabled:N});return N?w:null});var y=e.i(39957);let b=t.forwardRef(function(e,n){let{className:i,render:o,delay:l=0,style:u,...c}=e,{imageLoadingStatus:d}=s(),[f,h]=t.useState(0===l),p=(0,y.useTimeout)();return t.useEffect(()=>(l>0?p.start(l,()=>h(!0)):h(!0),p.clear),[p,l]),(0,r.useRenderElement)("span",e,{state:{imageLoadingStatus:d},ref:n,props:c,stateAttributesMapping:a,enabled:"loaded"!==d&&(0===l||f)})});e.s(["Fallback",0,b,"Image",0,g,"Root",0,l],14751);var v=e.i(14751);e.s(["Avatar",0,v],52376)},80862,e=>{"use strict";e.s(["endingStyle",0,"data-ending-style","startingStyle",0,"data-starting-style"])},74354,e=>{"use strict";var t=e.i(80862);let r={[t.startingStyle]:""},n={[t.endingStyle]:""};e.s(["transitionStatusMapping",0,{transitionStatus:e=>"starting"===e?r:"ending"===e?n:null}])},37584,22640,e=>{"use strict";var t=e.i(71645),r=e.i(67865),n=e.i(74080),i=e.i(8445),s=e.i(94603),a=e.i(80862);let o=null;function l(e,t=!1,u=!1){let c=(0,i.useAnimationFrame)();return(0,r.useStableCallback)((r,i=null)=>{c.cancel();let l=(0,s.resolveRef)(e);if(null==l)return;let d=()=>{if(!u)return void n.flushSync(r);if(!o){let e=[];o=e,queueMicrotask(()=>{o=null,n.flushSync(()=>{for(let t of e)t()})})}o.push(()=>{i?.aborted||r()})};if("function"!=typeof l.getAnimations||globalThis.BASE_UI_ANIMATIONS_DISABLED)return void r();function f(){Promise.all(l.getAnimations().map(e=>e.finished)).then(()=>{i?.aborted||d()},()=>{i?.aborted||(l.getAnimations().some(e=>e.pending||"finished"!==e.playState)?f():d())})}if(t){let e=a.startingStyle;if(!l.hasAttribute(e))return void c.request(f);let t=new MutationObserver(()=>{l.hasAttribute(e)||(t.disconnect(),f())});return t.observe(l,{attributes:!0,attributeFilter:[e]}),void i?.addEventListener("abort",()=>t.disconnect(),{once:!0})}c.request(f)})}e.s(["useAnimationsFinished",0,l],22640),e.s(["useOpenChangeComplete",0,function(e){let{enabled:n=!0,open:i,ref:s,batch:a=!1,onComplete:o}=e,u=(0,r.useStableCallback)(o),c=l(s,i,a);t.useEffect(()=>{if(!n)return;let e=new AbortController;return c(u,e.signal),()=>{e.abort()}},[n,i,u,c])}],37584)},23910,e=>{"use strict";var t=e.i(71645),r=e.i(46376),n=e.i(8445);e.s(["useTransitionStatus",0,function(e,i=!1,s=!1,a=!1){let[o,l]=t.useState(e&&i?"idle":void 0),[u,c]=t.useState(e&&!a);return e&&!u&&(c(!0),l("starting")),e||!u||"ending"===o||s||l("ending"),e||u||"ending"!==o||l(void 0),(0,r.useIsoLayoutEffect)(()=>{if(!e&&u&&"ending"!==o&&s){let e=n.AnimationFrame.request(()=>{l("ending")});return()=>{n.AnimationFrame.cancel(e)}}},[e,u,o,s]),(0,r.useIsoLayoutEffect)(()=>{if(!e||i)return;let t=n.AnimationFrame.request(()=>{l(void 0)});return()=>{n.AnimationFrame.cancel(t)}},[i,e]),(0,r.useIsoLayoutEffect)(()=>{if(!e||!i)return;e&&u&&"idle"!==o&&l("starting");let t=n.AnimationFrame.request(()=>{l("idle")});return()=>{n.AnimationFrame.cancel(t)}},[i,e,u,o]),{mounted:u,setMounted:c,transitionStatus:o}}])},94603,e=>{"use strict";e.s(["resolveRef",0,function(e){return null==e?e:"current"in e?e.current:e}])},8445,e=>{"use strict";e.i(47167);var t=e.i(88940),r=e.i(26300);let n=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let r=0;r<t.length;r+=1)t[r]?.(e)};request(e){let t=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,this.isScheduled||(requestAnimationFrame(this.tick),this.isScheduled=!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||null!==this.callbacks[t]&&(this.callbacks[t]=null,this.callbacksCount-=1)}};class i{static create(){return new i}static request(e){return n.request(e)}static cancel(e){return n.cancel(e)}currentId=null;request(e){this.cancel(),this.currentId=n.request(()=>{this.currentId=null,e()})}cancel=()=>{null!==this.currentId&&(n.cancel(this.currentId),this.currentId=null)};disposeEffect=()=>this.cancel}e.s(["AnimationFrame",0,i,"useAnimationFrame",0,function(){let e=(0,t.useRefWithInit)(i.create).current;return(0,r.useOnMount)(e.disposeEffect),e}])},26300,e=>{"use strict";var t=e.i(71645),r=e.i(56789);e.s(["useOnMount",0,function(e){t.useEffect(e,r.EMPTY_ARRAY)}])},39957,e=>{"use strict";var t=e.i(88940),r=e.i(26300);class n{static create(){return new n}currentId=0;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=0,t()},e)}isStarted(){return 0!==this.currentId}clear=()=>{0!==this.currentId&&(clearTimeout(this.currentId),this.currentId=0)};disposeEffect=()=>this.clear}e.s(["Timeout",0,n,"useTimeout",0,function(){let e=(0,t.useRefWithInit)(n.create).current;return(0,r.useOnMount)(e.disposeEffect),e}])},49287,e=>{"use strict";var t=e.i(56420);let r={name:"ship",size:24,node:[["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 9.189V13",key:"yp40p3"}],["path",{d:"M19 12V6a2 2 0 00-2-2H7a2 2 0 00-2 2v6",key:"1wcigf"}],["path",{d:"M19.38 19A11.6 11.6 0 0021 13l-8.188-3.639a2 2 0 00-1.624 0L3 13.001a11.6 11.6 0 002.81 7.76",key:"1kdp0u"}],["path",{d:"M2 20c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1s1.2 1 2.5 1c2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"1l8w7g"}]]};r.node;let n=(0,t.default)(r);e.s(["Ship",0,n],49287)},94831,e=>{"use strict";var t=e.i(56420);let r={name:"unplug",size:24,node:[["path",{d:"m19 5 3-3",key:"yk6iyv"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m12 6 6 6 2.3-2.3a2.4 2.4 0 0 0 0-3.4l-2.6-2.6a2.4 2.4 0 0 0-3.4 0Z",key:"1snsnr"}]]};r.node;let n=(0,t.default)(r);e.s(["Unplug",0,n],94831)},22016,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return y},useLinkStatus:function(){return v}};for(var i in n)Object.defineProperty(r,i,{enumerable:!0,get:n[i]});let s=e.r(90809),a=e.r(43476),o=s._(e.r(71645)),l=e.r(95057),u=e.r(8372),c=e.r(18581),d=e.r(18967),f=e.r(5550),h=e.r(88540),p=e.r(91949),m=e.r(73668),g=e.r(9396);function y(t){var r;let n,i,s,[y,v]=(0,o.useOptimistic)(p.IDLE_LINK_STATUS),x=(0,o.useRef)(null),{href:j,as:S,children:k,prefetch:C=null,passHref:E,replace:I,shallow:T,scroll:P,onClick:O,onMouseEnter:A,onTouchStart:N,legacyBehavior:R=!1,onNavigate:w,transitionTypes:_,ref:M,unstable_dynamicOnHover:L,...F}=t;n=k,R&&("string"==typeof n||"number"==typeof n)&&(n=(0,a.jsx)("a",{children:n}));let q=o.default.useContext(u.AppRouterContext),D=!1!==C,z=!1===C?"none":!0===C?"full":"auto",B="none"!==z?"auto"===z?g.FetchStrategy.PPR:g.FetchStrategy.Full:g.FetchStrategy.PPR,U="string"==typeof(r=S||j)?r:(0,l.formatUrl)(r);if(R){if(n?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});i=o.default.Children.only(n)}let $=R?i&&"object"==typeof i&&i.ref:M,K,V=o.default.useCallback(e=>(null!==q&&(x.current=(0,p.mountLinkInstance)(e,U,q,B,D,v,K)),()=>{x.current&&((0,p.unmountLinkForCurrentNavigation)(x.current),x.current=null),(0,p.unmountPrefetchableInstance)(e)}),[D,U,q,B,v,K]),H={ref:(0,c.useMergedRef)(V,$),onClick(t){R||"function"!=typeof O||O(t),R&&i.props&&"function"==typeof i.props.onClick&&i.props.onClick(t),!q||t.defaultPrevented||function(t,r,n,i,s,a,l,u="none"){if("u">typeof window){let c,{nodeName:d}=t.currentTarget;if("A"===d.toUpperCase()&&((c=t.currentTarget.getAttribute("target"))&&"_self"!==c||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,m.isLocalURL)(r)){i&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),a){let e=!1;if(a({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:f}=e.r(99781);o.default.startTransition(()=>{f(r,i?"replace":"push",!1===s?h.ScrollBehavior.NoScroll:h.ScrollBehavior.Default,n.current,l,u)})}}(t,U,x,I,P,w,_,z)},onMouseEnter(e){R||"function"!=typeof A||A(e),R&&i.props&&"function"==typeof i.props.onMouseEnter&&i.props.onMouseEnter(e),q&&D&&(0,p.onNavigationIntent)(e.currentTarget,!0===L)},onTouchStart:function(e){R||"function"!=typeof N||N(e),R&&i.props&&"function"==typeof i.props.onTouchStart&&i.props.onTouchStart(e),q&&D&&(0,p.onNavigationIntent)(e.currentTarget,!0===L)}};return(0,d.isAbsoluteUrl)(U)?H.href=U:R&&!E&&("a"!==i.type||"href"in i.props)||(H.href=(0,f.addBasePath)(U)),s=R?o.default.cloneElement(i,H):(0,a.jsx)("a",{...F,...H,children:n}),(0,a.jsx)(b.Provider,{value:y,children:s})}let b=(0,o.createContext)(p.IDLE_LINK_STATUS),v=()=>(0,o.useContext)(b);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},18581,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return i}});let n=e.r(71645);function i(e,t){let r=(0,n.useRef)(null),i=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=i.current;t&&(i.current=null,t())}else e&&(r.current=s(e,n)),t&&(i.current=s(t,n))},[e,t])}function s(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},18967,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={DecodeError:function(){return y},MiddlewareNotFoundError:function(){return j},MissingStaticPage:function(){return x},NormalizeError:function(){return b},PageNotFoundError:function(){return v},SP:function(){return m},ST:function(){return g},WEB_VITALS:function(){return s},execOnce:function(){return a},getDisplayName:function(){return d},getLocationOrigin:function(){return u},getURL:function(){return c},isAbsoluteUrl:function(){return l},isResSent:function(){return f},loadGetInitialProps:function(){return p},normalizeRepeatedSlashes:function(){return h},stringifyError:function(){return S}};for(var i in n)Object.defineProperty(r,i,{enumerable:!0,get:n[i]});let s=["CLS","FCP","FID","INP","LCP","TTFB"];function a(e){let t,r=!1;return(...n)=>(r||(r=!0,t=e(...n)),t)}let o=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,l=e=>{let t=e.charCodeAt(0);return!!(t>=65&&t<=90||t>=97&&t<=122)&&o.test(e)};function u(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function c(){let{href:e}=window.location,t=u();return e.substring(t.length)}function d(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function f(e){return e.finished||e.headersSent}function h(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function p(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await p(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&f(r))return n;if(!n)throw Object.defineProperty(Error(`"${d(e)}.getInitialProps()" should resolve to an object. But found "${n}" instead.`),"__NEXT_ERROR_CODE",{value:"E1025",enumerable:!1,configurable:!0});return n}let m="u">typeof performance,g=m&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class y extends Error{}class b extends Error{}class v extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class x extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class j extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function S(e){return JSON.stringify({message:e.message,stack:e.stack})}},73668,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return s}});let n=e.r(18967),i=e.r(52817);function s(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,i.hasBasePath)(r.pathname)}catch(e){return!1}}},98183,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={assign:function(){return l},searchParamsToUrlQuery:function(){return s},urlQueryToSearchParams:function(){return o}};for(var i in n)Object.defineProperty(r,i,{enumerable:!0,get:n[i]});function s(e){let t={};for(let[r,n]of e.entries()){let e=t[r];void 0===e?t[r]=n:Array.isArray(e)?e.push(n):t[r]=[e,n]}return t}function a(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function o(e){let t=new URLSearchParams;for(let[r,n]of Object.entries(e))if(Array.isArray(n))for(let e of n)t.append(r,a(e));else t.set(r,a(n));return t}function l(e,...t){for(let r of t){for(let t of r.keys())e.delete(t);for(let[t,n]of r.entries())e.append(t,n)}return e}},95057,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return o},formatWithValidation:function(){return u},urlObjectKeys:function(){return l}};for(var i in n)Object.defineProperty(r,i,{enumerable:!0,get:n[i]});let s=e.r(90809)._(e.r(98183)),a=/https?|ftp|gopher|file/;function o(e){let{auth:t,hostname:r}=e,n=e.protocol||"",i=e.pathname||"",o=e.hash||"",l=e.query||"",u=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?u=t+e.host:r&&(u=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(u+=":"+e.port)),l&&"object"==typeof l&&(l=String(s.urlQueryToSearchParams(l)));let c=e.search||l&&`?${l}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||a.test(n))&&!1!==u?(u="//"+(u||""),i&&"/"!==i[0]&&(i="/"+i)):u||(u=""),o&&"#"!==o[0]&&(o="#"+o),c&&"?"!==c[0]&&(c="?"+c),i=i.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${n}${u}${i}${c}${o}`}let l=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function u(e){return o(e)}},94859,26478,e=>{"use strict";var t=e.i(43476),r=e.i(52376),n=e.i(25913),i=e.i(49287),s=e.i(56420);let a={name:"user-round",size:24,node:[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]],aliases:["user-2"]};a.node;let o=(0,s.default)(a);e.s(["UserRound",0,o],26478);var l=e.i(90063);let u=(0,n.cva)("inline-flex shrink-0 items-center justify-center overflow-hidden font-semibold uppercase select-none",{variants:{kind:{app:"rounded-sm bg-primary text-primary-foreground",account:"rounded-full bg-secondary font-sans text-foreground",ship:"rounded-sm bg-secondary font-mono text-foreground",argo:"rounded-sm bg-highlight text-primary",retired:"rounded-sm border border-dashed border-input font-mono font-medium text-muted-foreground"},size:{20:"size-5 text-micro [&_svg]:size-3",28:"size-7 text-micro [&_svg]:size-(--size-icon-sm)",36:"size-9 text-caption [&_svg]:size-(--size-icon)"}},defaultVariants:{kind:"ship",size:28}});e.s(["Avatar",0,function({kind:e="ship",size:n,name:s="",className:a}){let c=e??"ship";return(0,t.jsx)(r.Avatar.Root,{"aria-hidden":!0,"data-slot":"avatar",className:(0,l.classNames)(u({kind:e,size:n}),a),children:(0,t.jsx)(r.Avatar.Fallback,{children:"app"===c?(0,t.jsx)(i.Ship,{"aria-hidden":!0}):"argo"===c?(0,t.jsx)(o,{"aria-hidden":!0}):s.replaceAll("-","").slice(0,2)})})}],94859)},33939,e=>{"use strict";var t=e.i(43476),r=e.i(94831),n=e.i(22016),i=e.i(15905),s=e.i(67874);e.s(["SquadronsNotConnected",0,function(){return(0,t.jsx)(s.EmptyState,{icon:(0,t.jsx)(r.Unplug,{"aria-hidden":!0}),title:"Squadrons is not connected",description:"Connect it in Settings; squadrons, blueprints and templates show up here then.",action:(0,t.jsx)(i.Button,{nativeButton:!1,render:(0,t.jsx)(n.default,{href:"/settings"}),"data-testid":"squadrons-open-settings",children:"Open Settings"})})}])},85307,e=>{"use strict";var t=e.i(43476),r=e.i(10818),n=e.i(71645),i=e.i(84294),s=e.i(15905),a=e.i(22212),o=e.i(94945),l=e.i(91727),u=e.i(46033),c=e.i(14732),d=e.i(17981);function f({blueprints:e,templates:o,isPending:h,error:p,onSubmit:m,initial:g}){let[y,b]=(0,n.useState)(1),[v,x]=(0,n.useState)(g?.key??e[0]?.key),j=e.find(e=>e.key===v)??e[0],[S,k]=(0,n.useState)(g?.version??j?.versions[0]?.version),C=j?.versions.find(e=>e.version===S)??j?.versions[0];if(!j||!C)return null;if(1===y){let r=Object.fromEntries(j.versions.map((e,t)=>[String(e.version),`v${String(e.version)}${0===t?" (latest)":""}`]));return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(a.DialogHeader,{children:[(0,t.jsx)(a.DialogTitle,{children:"Form a squadron"}),(0,t.jsx)(a.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 r=e.versions[0],n=e.key===j.key;return(0,t.jsxs)("button",{type:"button",role:"radio","aria-checked":n,"data-testid":"form-squadron-blueprint",onClick:()=>{x(e.key),k(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",r?.version,", latest"]})]}),(0,t.jsx)("span",{className:"text-meta text-muted-foreground",children:r?.description})]},e.key)})})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)(l.Label,{htmlFor:"form-squadron-version",children:"Version"}),(0,t.jsxs)(u.Select,{items:r,value:String(C.version),onValueChange:e=>{k(Number(e))},children:[(0,t.jsx)(u.SelectTrigger,{id:"form-squadron-version","aria-label":"Version",children:(0,t.jsx)(u.SelectValue,{})}),(0,t.jsx)(u.SelectContent,{children:Object.entries(r).map(([e,r])=>(0,t.jsx)(u.SelectItem,{value:e,children:r},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)(a.DialogFooter,{children:[(0,t.jsx)(a.DialogClose,{render:(0,t.jsx)(s.Button,{type:"button"}),children:"Cancel"}),(0,t.jsx)(s.Button,{variant:"primary","data-testid":"form-squadron-preview",onClick:()=>{b(2)},children:"Preview roles"})]})]})}let E=(0,i.rolePreviews)(C,o);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(a.DialogHeader,{children:[(0,t.jsxs)(a.DialogTitle,{children:["Form a squadron from ",C.name," v",C.version]}),(0,t.jsxs)(a.DialogDescription,{children:["Step 2 of 2. ",(0,i.memberCount)(C)," member ships and a flagship are commissioned when you confirm."]})]}),(0,t.jsxs)(c.Table,{children:[(0,t.jsx)(c.TableHeader,{children:(0,t.jsxs)(c.TableRow,{children:[(0,t.jsx)(c.TableHead,{children:"Role"}),(0,t.jsx)(c.TableHead,{children:"Template"}),(0,t.jsx)(c.TableHead,{children:"Members"}),(0,t.jsx)(c.TableHead,{children:"Check-in"})]})}),(0,t.jsx)(c.TableBody,{children:E.map(e=>(0,t.jsxs)(c.TableRow,{children:[(0,t.jsx)(c.TableCell,{className:"font-mono",children:e.role}),(0,t.jsx)(c.TableCell,{className:"font-mono",children:e.template}),(0,t.jsx)(c.TableCell,{children:e.count}),(0,t.jsx)(c.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)(r.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:[C.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!==p&&(0,t.jsx)(d.InlineError,{variant:"field",title:"Couldn’t form the squadron",description:p}),(0,t.jsxs)(a.DialogFooter,{children:[(0,t.jsx)(s.Button,{type:"button",disabled:h,onClick:()=>{b(1)},children:"Back"}),(0,t.jsx)(s.Button,{variant:"primary",isLoading:h,"data-testid":"form-squadron-submit",onClick:()=>{m({repository:C.repository,name:C.name,version:C.version})},children:h?"Forming":"Form squadron"})]})]})}e.s(["FormSquadronDialog",0,function(e){let{isOpen:r,onOpenChange:n,isPending:i}=e;return(0,t.jsx)(a.Dialog,{open:r,onOpenChange:e=>{i||n(e)},children:(0,t.jsx)(a.DialogContent,{size:"md","data-testid":"form-squadron-dialog",className:o.dialogSurface.phoneFullScreen,children:(0,t.jsx)(f,{...e})})})}])}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,62219,e=>{"use strict";var t=e.i(43476),s=e.i(18566),n=e.i(71645),a=e.i(44824),i=e.i(45608),r=e.i(95475),l=e.i(2767),o=e.i(52886),d=e.i(66787),c=e.i(92870),u=e.i(22016),p=e.i(90063);let h={ok:"border-tone-ok-border bg-tone-ok-bg text-tone-ok-fg",waiting:"border-tone-waiting-border bg-tone-waiting-bg text-tone-waiting-fg",attention:"border-tone-attention-border bg-tone-attention-bg text-tone-attention-fg"};function m({label:e,shortLabel:s,value:n,detail:a,href:i,icon:r,tone:l,testId:o}){return(0,t.jsxs)(u.default,{href:i,"data-testid":o,className:"flex min-w-0 flex-col gap-2 rounded-lg border border-border bg-card px-4.5 py-4 shadow-sm transition-colors duration-(--duration-fast) hover:bg-accent max-sm:gap-1.5 max-sm:rounded-xl max-sm:px-3.5 max-sm:py-3",children:[(0,t.jsxs)("span",{className:"flex items-center justify-between gap-2 text-meta font-medium text-muted-foreground",children:[(0,t.jsx)("span",{className:"max-sm:hidden",children:e}),(0,t.jsx)("span",{className:"sm:hidden",children:s??e}),(0,t.jsx)("span",{className:(0,p.classNames)("flex size-6.5 shrink-0 items-center justify-center rounded-md border max-sm:size-5.5",h[l]),children:(0,t.jsx)(r,{"aria-hidden":!0,className:"size-3.5"})})]}),(0,t.jsx)("span",{className:"text-[28px] leading-none font-semibold tracking-tight tabular-nums text-foreground max-sm:text-2xl",children:n}),(0,t.jsx)("span",{className:"truncate text-meta text-muted-foreground",children:a})]})}var x=e.i(5387),f=e.i(28459),g=e.i(96676),v=e.i(49635);function j(e){return e.filter(e=>"agent"===e.kind&&"retired"!==e.status)}function w(){var e;let s,n,a,i,r=(0,x.useFleetSnapshot)(),l=(0,f.useNeedsAttention)(),u=(0,f.useAttentionCount)(),p=(0,g.useNow)();if(!r.data)return null;let h=(a=(n=(s=j((e={ships:r.data,undeliverable:l.data??[],now:p}).ships)).filter(e=>"awaitingCrew"===e.status)).flatMap(e=>null===e.awaitingCrewSince?[]:[{name:e.name,since:new Date(e.awaitingCrewSince)}]).sort((e,t)=>e.since.getTime()-t.since.getTime())[0],i=e.undeliverable.map(e=>new Date(e.since)).sort((e,t)=>e.getTime()-t.getTime())[0],{activeCount:s.length,crewedCount:s.filter(e=>"crewed"===e.status).length,awaitingCount:n.length,longestWait:a&&{name:a.name,wait:(0,v.duration)(a.since,e.now)},oldestUndeliverable:i&&(0,v.duration)(i,e.now)});return 0===h.activeCount?null:(0,t.jsxs)("div",{className:"grid grid-cols-3 gap-4 max-sm:grid-cols-2 max-sm:gap-2.5","data-testid":"overview-metrics",children:[(0,t.jsx)(m,{label:"Ships crewed",shortLabel:"Crewed",value:h.crewedCount,detail:`of ${String(h.activeCount)} active ships`,href:"/?status=crewed",icon:c.UserCheck,tone:"ok",testId:"overview-crewed"}),(0,t.jsx)(m,{label:"Awaiting crew",value:h.awaitingCount,detail:h.longestWait?`Longest wait: ${h.longestWait.name}, ${h.longestWait.wait}`:"Every active ship is crewed",href:"/?status=awaitingCrew",icon:o.CircleDashed,tone:"waiting",testId:"overview-awaiting"}),(0,t.jsx)(m,{label:"Needs attention",value:u??0,detail:h.oldestUndeliverable?`Undeliverable deliveries, oldest ${h.oldestUndeliverable}`:"Nothing needs you",href:"/needs-attention",icon:d.TriangleAlert,tone:"attention",testId:"overview-attention"})]})}var y=e.i(77071),b=e.i(15905),S=e.i(49092),C=e.i(87600),N=e.i(16752);e.i(31627);var k=e.i(73332),T=e.i(44827),R=e.i(85595),P=e.i(16984),O=e.i(80799),I=e.i(65160),E=e.i(33173),A=e.i(22212),M=e.i(94945),L=e.i(12470),z=e.i(91727),q=e.i(75867),D=e.i(43988),H=e.i(17981),F=e.i(77435);let $={"fleet:read":"Read the fleet","fleet:manage":"Manage the fleet","crew:assign":"Assign crews","crew:run":"Run crews"};function B({activeShips:e,isPending:s,error:a,shipLimit:i,accountUrl:r,onSubmit:l}){let o=(0,n.useId)(),d=(0,n.useId)(),c=(0,n.useId)(),u=(0,n.useId)(),h=(0,n.useId)(),[m,x]=(0,n.useState)(""),[f,g]=(0,n.useState)(""),[v,j]=(0,n.useState)(""),[w,y]=(0,n.useState)([]),S=(0,I.checkShipName)(m,{activeNames:e.map(e=>e.name)}),C="invalid"===S.kind||"reserved"===S.kind||"taken"===S.kind,M=f.trim(),V=T.shipHandleSchema.safeParse(M).success,U=""!==M&&!V,_=[...new Set(e.map(e=>e.type))].sort(),W="available"===S.kind&&V&&void 0===i;return(0,t.jsxs)("form",{noValidate:!0,"data-testid":"commission-form",className:"contents",onSubmit:e=>{e.preventDefault(),W&&l({name:m,type:M,...""===v.trim()?{}:{note:v},...0===w.length?{}:{fleetScopes:[...w]}})},children:[(0,t.jsxs)(A.DialogHeader,{children:[(0,t.jsx)(A.DialogTitle,{children:"Commission a ship"}),(0,t.jsx)(A.DialogDescription,{children:"A ship is a durable agent identity with its own inbox. Next, you get the starting prompt."})]}),void 0===i?null:(0,t.jsx)(F.LimitNotice,{...(0,N.shipLimitNotice)(i),accountUrl:r,testId:"commission-ship-limit"}),(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsxs)("div",{className:"flex items-baseline justify-between",children:[(0,t.jsx)(z.Label,{htmlFor:o,children:"Name"}),(0,t.jsxs)("span",{className:"text-caption text-muted-foreground tabular-nums",children:[m.length," / ",T.SHIP_HANDLE_MAX_LENGTH]})]}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(L.Input,{id:o,isMono:!0,autoComplete:"off",autoCapitalize:"off",spellCheck:!1,placeholder:"e.g. reviewer-02","data-testid":"commission-name","aria-invalid":!!C||void 0,"aria-describedby":d,className:"pr-9 max-sm:h-(--size-control-touch) max-sm:text-input-touch",value:m,onChange:e=>{x((0,I.asHandle)(e.target.value))}}),"available"===S.kind?(0,t.jsx)(R.CircleCheck,{"aria-hidden":!0,className:"absolute top-1/2 right-3 size-(--size-icon) -translate-y-1/2 text-tone-ok-fg"}):C?(0,t.jsx)(P.CircleX,{"aria-hidden":!0,className:"absolute top-1/2 right-3 size-(--size-icon) -translate-y-1/2 text-destructive-text"}):null]}),(0,t.jsx)("p",{id:d,"aria-live":"polite",className:(0,p.classNames)("text-meta",C?"text-destructive-text":"text-muted-foreground"),children:S.message})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)(z.Label,{htmlFor:c,children:"Type"}),(0,t.jsx)(E.Combobox,{id:c,options:_.map(e=>({value:e,label:e})),value:""===f?null:f,onValueChange:e=>{g(e??"")},isFreeText:!0,toQuery:I.asHandle,leadingIcon:(0,t.jsx)(O.Tag,{}),placeholder:"e.g. reviewer",isInvalid:U,"aria-describedby":u,"data-testid":"commission-type"}),(0,t.jsx)("p",{id:u,className:(0,p.classNames)("text-meta",U?"text-destructive-text":"text-muted-foreground"),children:U?`Use 1 to ${String(T.SHIP_HANDLE_MAX_LENGTH)} lowercase letters, digits, hyphens or colons.`:(0,I.typeHint)(f,e.filter(e=>e.type===M).length)})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)(z.Label,{htmlFor:h,children:"Note (optional)"}),(0,t.jsx)(D.Textarea,{id:h,rows:2,"data-testid":"commission-note",value:v,onChange:e=>{j(e.target.value)}})]}),(0,t.jsxs)("fieldset",{className:"flex flex-col gap-2",children:[(0,t.jsx)("legend",{className:"mb-1.5 text-body font-medium text-foreground",children:"Fleet access"}),k.FLEET_SCOPES.map(e=>(0,t.jsxs)("label",{className:"flex items-center justify-between gap-3 text-body text-foreground",children:[(0,t.jsxs)("span",{children:[$[e]," ",(0,t.jsx)("span",{className:"font-mono text-id text-muted-foreground",children:e})]}),(0,t.jsx)(q.Switch,{checked:w.includes(e),onCheckedChange:t=>{y(s=>t?[...s,e]:s.filter(t=>t!==e))},"data-testid":`commission-${e.replace(":","-")}`})]},e)),(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:"Every ship sends and receives. Fleet access lets its session act as the console does; crew ships lets a trierarch start their sessions. It cannot be changed later."})]}),void 0===a?null:(0,t.jsx)(H.InlineError,{title:"Not commissioned",description:a}),(0,t.jsxs)(A.DialogFooter,{children:[(0,t.jsx)(A.DialogClose,{render:(0,t.jsx)(b.Button,{type:"button",disabled:s}),children:"Cancel"}),(0,t.jsx)(b.Button,{type:"submit",variant:"primary",isLoading:s,disabled:!W,"data-testid":"commission-submit",children:s?"Commissioning":"Commission ship"})]})]})}function V(e){let{isOpen:s,onOpenChange:n,isPending:a}=e;return(0,t.jsx)(A.Dialog,{open:s,onOpenChange:e=>{a||n(e)},children:(0,t.jsx)(A.DialogContent,{size:"md","data-testid":"commission-dialog",className:M.dialogSurface.phoneFullScreen,children:(0,t.jsx)(B,{...e})})})}var U=e.i(82532);function _({isOpen:e,onOpenChange:s}){let a=(0,x.useFleetSnapshot)(),i=(0,S.useFleetLimits)(),r=(0,C.useHostedAccountUrl)(),l=(0,x.useCommissionShip)(),[o,d]=(0,n.useState)(!1),c=(a.data??[]).filter(e=>"retired"!==e.status);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(b.Button,{variant:"primary",icon:(0,t.jsx)(y.Plus,{}),"data-testid":"fleet-commission",onClick:()=>{l.reset(),s(!0)},children:"Commission ship"}),(0,t.jsx)(V,{activeShips:c,isOpen:e,onOpenChange:s,isPending:l.isPending,error:l.error?.message,shipLimit:(0,N.shipLimitReached)(i.data),accountUrl:r,onSubmit:e=>{l.mutate({...e,idempotencyKey:crypto.randomUUID()},{onSuccess:()=>{s(!1),d(!0)}})}}),(0,t.jsx)(U.StartingPromptDialog,{shipName:l.variables?.name??"",state:"shown",prompt:l.data?.prompt??void 0,crewLines:l.data?.crewLines??void 0,isOpen:o&&void 0!==l.data,onOpenChange:e=>{e||(d(!1),l.reset())},onConfirm:()=>void 0})]})}var W=e.i(56420);let X={name:"infinity",size:24,node:[["path",{d:"M6 16c5 0 7-8 12-8a4 4 0 0 1 0 8c-5 0-7-8-12-8a4 4 0 1 0 0 8",key:"18ogeb"}]]};X.node;let K=(0,W.default)(X);var Y=e.i(30274),G=e.i(49287),J=e.i(78865);let Q={ships:{label:"Ships",unit:"ships",Icon:G.Ship},messages:{label:"Messages today",unit:"messages",Icon:Y.Send}},Z={below:"bg-primary",at:"bg-tone-waiting-fg",over:"bg-tone-attention-fg"},ee={at:"at-limit",over:"over-limit"};function et({kind:e,count:s,limit:n,resetsAt:a}){let{label:i,unit:r,Icon:l}=Q[e],o=(0,N.meterState)({count:s,limit:n}),d=ee[o],c=(0,N.meterCaption)({count:s,limit:n}),u=null===n?0:0===n?1:Math.min(s/n,1);return(0,t.jsxs)("div",{"data-testid":`limit-meter-${e}`,"data-state":o,className:"flex flex-col gap-2 rounded-lg border border-border bg-card p-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-meta font-medium text-muted-foreground",children:[(0,t.jsx)(l,{"aria-hidden":!0,className:"size-(--size-icon-sm)"}),i]}),void 0===d?null:(0,t.jsx)(J.StatusBadge,{status:d})]}),(0,t.jsxs)("p",{className:"flex items-baseline gap-1.5",children:[(0,t.jsx)("span",{className:"text-metric font-semibold tabular-nums",children:(0,N.meterCount)(s)}),(0,t.jsx)("span",{className:"text-body text-muted-foreground",children:null===n?r:`of ${(0,N.meterCount)(n)} ${r}`})]}),null===n?(0,t.jsxs)("p",{className:"inline-flex items-center gap-1.5 text-meta text-muted-foreground",children:[(0,t.jsx)(K,{"aria-hidden":!0,className:"size-(--size-icon-sm)"}),"No limit"]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{role:"meter","aria-label":`${i}: ${String(s)} of ${String(n)}`,"aria-valuenow":s,"aria-valuemin":0,"aria-valuemax":n,className:"block h-1.5 overflow-hidden rounded-full bg-secondary",children:(0,t.jsx)("span",{className:(0,p.classNames)("block h-full rounded-full","none"===o?void 0:Z[o]),style:{width:`${String(100*u)}%`}})}),(0,t.jsxs)("p",{"data-testid":`limit-meter-${e}-caption`,className:"text-caption text-muted-foreground",children:[c,void 0===a?null:` \xb7 resets at ${(0,N.resetTime)(a)}`]})]})]})}function es(){let e=(0,S.useFleetLimits)().data,s=(0,C.useHostedAccountUrl)();return(0,N.hasLimits)(e)?(0,t.jsxs)("section",{"aria-labelledby":"overview-limits-title","data-testid":"overview-limits",className:"flex flex-col gap-2",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsx)("h2",{id:"overview-limits-title",className:"text-body font-semibold",children:"Limits"}),void 0===s?null:(0,t.jsx)("a",{href:s,"data-testid":"overview-limits-view",className:"text-meta font-medium text-primary underline underline-offset-2",children:"View limits"})]}),(0,t.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2",children:[(0,t.jsx)(et,{kind:"ships",count:e.ships.count,limit:e.ships.limit}),(0,t.jsx)(et,{kind:"messages",count:e.dailyMessages.count,limit:e.dailyMessages.limit,resetsAt:e.dailyMessages.resetsAt})]})]}):null}var en=e.i(48695),ea=e.i(84294);let ei={name:"eye",size:24,node:[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]};ei.node;let er=(0,W.default)(ei);var el=e.i(31458),eo=e.i(58925),ed=e.i(66595);let ec={name:"sliders-horizontal",size:24,node:[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]]};ec.node;let eu=(0,W.default)(ec);var ep=e.i(26478);let eh={query:"",filters:{status:"all",type:"all",squadron:"all",isRetiredShown:!1}},em="status",ex="type",ef="squadron",eg="retired";function ev(e,t){return[...new Set(e.filter(e=>t||"retired"!==e.status).map(e=>e.type))].toSorted((e,t)=>e.localeCompare(t))}function ej(e){return e.filter(e=>"retired"===e.status).length}function ew(e){return[...new Set([...e.values()].map(e=>e.squadronId))].toSorted((e,t)=>e.localeCompare(t))}let ey={crewed:"Crewed",awaitingCrew:"Awaiting crew"};function eb(e){return["all"===e.status?void 0:`Status: ${ey[e.status]}`,"all"===e.type?void 0:`Type: ${e.type}`,"all"===e.squadron?void 0:`Squadron: ${e.squadron}`,e.isRetiredShown?"Retired shown":void 0].filter(e=>void 0!==e)}var eS=e.i(66390),eC=e.i(46033),eN=e.i(75305),ek=e.i(14732),eT=e.i(67874),eR=e.i(88393);let eP={name:"signal",size:24,node:[["path",{d:"M2 20h.01",key:"4haj6o"}],["path",{d:"M7 20v-4",key:"j294jx"}],["path",{d:"M12 20v-8",key:"i3yub9"}],["path",{d:"M17 20V8",key:"1tkaf5"}],["path",{d:"M22 4v16",key:"sih9yq"}]]};eP.node;let eO=(0,W.default)(eP),eI={name:"signal-low",size:24,node:[["path",{d:"M2 20h.01",key:"4haj6o"}],["path",{d:"M7 20v-4",key:"j294jx"}]]};eI.node;let eE=(0,W.default)(eI),eA={name:"signal-medium",size:24,node:[["path",{d:"M2 20h.01",key:"4haj6o"}],["path",{d:"M7 20v-4",key:"j294jx"}],["path",{d:"M12 20v-8",key:"i3yub9"}]]};eA.node;let eM=(0,W.default)(eA);e.s([],51047),e.i(51047);var eL=e.i(96499),ez=e.i(56789),eq=e.i(46376),eD=e.i(33332);let eH=n.createContext(void 0);function eF(e){let t=n.useContext(eH);if(void 0===t&&!e)throw Error((0,eD.default)(72));return t}var e$=e.i(74735),eB=e.i(67865),eV=e.i(29315),eU=e.i(84446),e_=e.i(57940);function eW(e){return null!=e&&null!=e.clientX}var eX=e.i(17989),eK=e.i(75606),eY=e.i(64111),eG=e.i(76782),eJ=e.i(26352),eQ=e.i(56434),eZ=e.i(18478),e0=e.i(16786),e1=e.i(90627);let e2={...e0.popupStoreSelectors,disabled:e=>e.disabled,instantType:e=>e.instantType,isInstantPhase:e=>e.isInstantPhase,trackCursorAxis:e=>e.trackCursorAxis,disableHoverablePopup:e=>e.disableHoverablePopup,lastOpenChangeReason:e=>e.openChangeReason,closeOnClick:e=>e.closeOnClick,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin};class e5 extends eJ.ReactStore{constructor(e,t,s){const n=new e1.PopupTriggerMap;super(e4(e,n,t,s),e6(n),e2)}setOpen=(e,t)=>{(0,eY.applyPopupOpenChange)(this,e,t,{extraState:{openChangeReason:t.reason}})};cancelPendingOpen(e){this.state.floatingRootContext.dispatchOpenChange(!1,(0,eK.createChangeEventDetails)(eQ.REASONS.triggerPress,e))}}function e4(e,t,s,n=!1){return{...(0,e0.createInitialPopupStoreState)(t,s,n),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,adaptiveOrigin:void 0,...e}}function e6(e){return{popupRef:n.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:e}}let e7=(0,eL.fastComponent)(function(e){let{disabled:s=!1,defaultOpen:a=!1,open:i,disableHoverablePopup:r=!1,trackCursorAxis:l="none",actionsRef:o,onOpenChange:d,onOpenChangeComplete:c,handle:u,triggerId:p,defaultTriggerId:h=null,children:m}=e,x=(0,eY.usePopupRootStore)((e,t)=>new e5({open:a,openProp:i,activeTriggerId:h,triggerIdProp:p},e,t));x.useControlledProp("openProp",i),x.useControlledProp("triggerIdProp",p),x.useContextCallback("onOpenChange",d),x.useContextCallback("onOpenChangeComplete",c);let f=x.useState("open"),g=!s&&f,v=x.useState("activeTriggerId"),j=x.useState("mounted"),w=x.useState("payload");x.useSyncedValues({trackCursorAxis:l,disableHoverablePopup:r,disabled:s}),(0,eY.useImplicitActiveTrigger)(x,{closeOnActiveTriggerUnmount:!0});let{forceUnmount:y,transitionStatus:b}=(0,eY.useOpenStateTransitions)(g,x),S=x.useState("isInstantPhase"),C=x.useState("instantType"),N=x.useState("lastOpenChangeReason"),k=n.useRef(null);(0,eq.useIsoLayoutEffect)(()=>{f&&s&&x.setOpen(!1,(0,eK.createChangeEventDetails)(eQ.REASONS.disabled))},[f,s,x]),(0,eq.useIsoLayoutEffect)(()=>{"ending"===b&&N===eQ.REASONS.none||"ending"!==b&&S?("delay"!==C&&(k.current=C),x.set("instantType","delay")):null!==k.current&&(x.set("instantType",k.current),k.current=null)},[b,S,N,C,x]),(0,eq.useIsoLayoutEffect)(()=>{g&&null==v&&x.set("payload",void 0)},[x,v,g]),n.useImperativeHandle(o,()=>({unmount:y,close:()=>x.setOpen(!1,(0,eK.createChangeEventDetails)(eQ.REASONS.imperativeAction))}),[y,x]);let T=g||j||!s&&"none"!==l;return(0,t.jsxs)(eH.Provider,{value:x,children:[u&&(0,t.jsx)(eY.PopupHandleAttachment,{handle:u,store:x}),T&&(0,t.jsx)(e8,{store:x,disabled:s,trackCursorAxis:l}),"function"==typeof m?m({payload:w}):m]})});function e8({store:e,disabled:t,trackCursorAxis:s}){let a=e.useState("floatingRootContext"),i=(0,eX.useDismiss)(a,{enabled:!t,referencePress:()=>e.select("closeOnClick")}),r=function(e,t={}){let{enabled:s=!0,axis:a="both"}=t,i="rootStore"in e?e.rootStore:e,r=i.useState("open"),l=i.useState("floatingElement"),o=i.useState("domReferenceElement"),d=i.context.dataRef,c=n.useRef(!1),u=n.useRef(null),[p,h]=n.useState(),[m,x]=n.useState([]),f=(0,eB.useStableCallback)(e=>{i.set("positionReference",e)}),g=(0,eB.useStableCallback)((e,t,s)=>{if(!c.current&&(!d.current.openEvent||eW(d.current.openEvent))){var n,r;let l,c,u;i.set("positionReference",(n=s??o,r={x:e,y:t,axis:a,dataRef:d,pointerType:p},l=null,c=null,u=!1,{contextElement:n||void 0,getBoundingClientRect(){let e=n?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},t="x"===r.axis||"both"===r.axis,s="y"===r.axis||"both"===r.axis,a=["mouseenter","mousemove"].includes(r.dataRef.current.openEvent?.type||"")&&"touch"!==r.pointerType,i=e.width,o=e.height,d=e.x,p=e.y;return null==l&&r.x&&t&&(l=e.x-r.x),null==c&&r.y&&s&&(c=e.y-r.y),d-=l||0,p-=c||0,i=0,o=0,!u||a?(i="y"===r.axis?e.width:0,o="x"===r.axis?e.height:0,d=t&&null!=r.x?r.x:d,p=s&&null!=r.y?r.y:p):u&&!a&&(o="x"===r.axis?e.height:o,i="y"===r.axis?e.width:i),u=!0,{width:i,height:o,x:d,y:p,top:p,right:d+i,bottom:p+o,left:d}}}))}}),v=(0,eB.useStableCallback)(e=>{r?u.current||(g(e.clientX,e.clientY,e.currentTarget),x([])):g(e.clientX,e.clientY,e.currentTarget)}),j=(0,e_.isMouseLikePointerType)(p)?l:r;n.useEffect(()=>{if(!s)return void f(o);if(!j)return;function e(){u.current?.(),u.current=null}let t=(0,eV.getWindow)(l);return!d.current.openEvent||eW(d.current.openEvent)?u.current=(0,e$.addEventListener)(t,"mousemove",function(t){let s=(0,eU.getTarget)(t);(0,eU.contains)(l,s)?e():g(t.clientX,t.clientY)}):f(o),e},[j,s,l,d,o,i,g,f,m]),n.useEffect(()=>()=>{i.set("positionReference",null)},[i]),n.useEffect(()=>{s&&!l&&(c.current=!1)},[s,l]),n.useEffect(()=>{!s&&r&&(c.current=!0)},[s,r]);let w=n.useMemo(()=>{function e(e){h(e.pointerType)}return{onPointerDown:e,onPointerEnter:e,onMouseMove:v,onMouseEnter:v}},[v]);return n.useMemo(()=>s?{reference:w,trigger:w}:{},[s,w])}(a,{enabled:!t&&"none"!==s,axis:"none"===s?void 0:s}),l=n.useMemo(()=>(0,eG.mergeProps)(r.reference,i.reference),[r.reference,i.reference]);return(0,eY.usePopupInteractionProps)(e,{activeTriggerProps:l,inactiveTriggerProps:l,popupProps:i.floating??ez.EMPTY_OBJECT}),null}var e3=e.i(39957),e9=e.i(46265),te=e.i(79938),tt=e.i(52245),ts=e.i(59636),tn=e.i(88015);let ta=n.createContext(void 0);var ti=e.i(50316),tr=e.i(44681);let tl=n.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new e3.Timeout,currentIdRef:{current:null},currentContextRef:{current:null}});function to(e){let{children:s,delay:a,timeoutMs:i=0}=e,r=n.useRef(a),l=n.useRef(a),o=n.useRef(null),d=n.useRef(null),c=(0,e3.useTimeout)();return(0,eq.useIsoLayoutEffect)(()=>{if(l.current=a,!o.current){r.current=a;return}r.current={open:(0,tr.getDelay)(r.current,"open"),close:(0,tr.getDelay)(a,"close")}},[a,o,r,l]),(0,t.jsx)(tl.Provider,{value:n.useMemo(()=>({hasProvider:!0,delayRef:r,initialDelayRef:l,currentIdRef:o,timeoutMs:i,currentContextRef:d,timeout:c}),[i,c]),children:s})}var td=e.i(13082),tc=e.i(72135),tu=e.i(73752),tp=e.i(22846);let th="data-base-ui-tooltip-trigger";function tm(e){if("composedPath"in e){let t=e.composedPath();for(let e=0;e<t.length;e+=1){let s=t[e];if((0,eV.isElement)(s))return s}}let t=e.target;return(0,eV.isElement)(t)?t:null}let tx=(0,eL.fastComponentRef)(function(e,t){let{render:s,className:a,style:i,handle:r,payload:l,disabled:o,delay:d,closeOnClick:c=!0,closeDelay:u,id:p,...h}=e,m=eF(!0),x=(0,ts.usePopupHandleStore)(r)??m;if(!x)throw Error((0,eD.default)(82));let f=(0,tn.useBaseUiId)(p),g=x.useState("isTriggerActive",f),v=x.useState("isOpenedByTrigger",f),j=x.useState("floatingRootContext"),w=n.useRef(null),y=u??0,{registerTrigger:b,isMountedByThisTrigger:S}=(0,eY.useTriggerDataForwarding)(f,w,x,{payload:l,closeOnClick:c,closeDelay:y}),C=n.useContext(ta),{activeIdRef:N,delayRef:k,isInstantPhase:T,hasProvider:R}=function(e,t={open:!1}){let{open:s}=t,a="rootStore"in e?e.rootStore:e,i=a.useState("floatingId"),{currentIdRef:r,delayRef:l,timeoutMs:o,initialDelayRef:d,currentContextRef:c,hasProvider:u,timeout:p}=n.useContext(tl),[h,m]=n.useState(!1),x=n.useRef(s);return(0,eq.useIsoLayoutEffect)(()=>{x.current=s},[s]),(0,eq.useIsoLayoutEffect)(()=>{function e(){c.current?.setIsInstantPhase(!1),r.current=null,c.current=null,l.current=d.current,p.clear()}if(r.current&&!s&&r.current===i){if(m(!1),o)return p.start(o,()=>{a.select("open")||r.current&&r.current!==i||e()}),()=>{(x.current||r.current!==i)&&p.clear()};e()}},[s,i,r,l,o,d,c,p,a]),(0,eq.useIsoLayoutEffect)(()=>{if(!s)return;let e=c.current,t=r.current;p.clear(),c.current={onOpenChange:a.setOpen,setIsInstantPhase:m},r.current=i,l.current={open:0,close:(0,tr.getDelay)(d.current,"close")},null!==t&&t!==i?(m(!0),e?.setIsInstantPhase(!0),e?.onOpenChange(!1,(0,eK.createChangeEventDetails)(eQ.REASONS.none))):(m(!1),e?.setIsInstantPhase(!1))},[s,i,a,r,l,d,c,p]),(0,eq.useIsoLayoutEffect)(()=>()=>{r.current===i&&(c.current=null,x.current)&&(r.current=null,l.current=d.current,p.clear())},[c,r,l,i,d,p]),n.useMemo(()=>({activeIdRef:r,hasProvider:u,delayRef:l,isInstantPhase:h}),[r,u,l,h])}(j,{open:v}),P=(0,tu.useHoverInteractionSharedState)(j);x.useSyncedValue("isInstantPhase",T);let O=x.useState("disabled"),I=o??O,E=(0,e9.useValueAsRef)(I),A=x.useState("trackCursorAxis"),M=x.useState("disableHoverablePopup"),L=n.useRef(!1),z=(0,e3.useTimeout)(),q=n.useRef(void 0);function D(){return R&&null!=N.current?0:d??C??600}function H(e){let t=w.current;if(!t||!e)return!1;let s=function(e){let t=e;for(;t;){let e=t.closest(`[${th}]`);if(e)return e;let s=t.getRootNode();t="host"in s&&(0,eV.isElement)(s.host)?s.host:null}return null}(e);return null!==s&&s!==t&&(0,eU.contains)(t,s)}let F=(0,tc.useHoverReferenceInteraction)(j,{enabled:!I,mouseOnly:!0,move:!1,handleClose:M||"both"===A?null:(0,ti.safePolygon)(),restMs:D,delay:()=>null==u&&R?{close:(0,tr.getDelay)(k.current,"close")}:{close:y},triggerElementRef:w,isActiveTrigger:g,isClosing:()=>"ending"===x.select("transitionStatus"),shouldOpen:()=>!L.current}),$=(0,td.useFocus)(j,{enabled:!I}).reference,B=x.useState("triggerProps",S),V=S||"none"!==A;return(0,tt.useRenderElement)("button",e,{state:{open:v},ref:[t,b,w],props:[F,$,V?B:void 0,{onMouseOver(e){(e=>{let t,s=L.current,n=tm(e),a=(L.current=t=H(n),t&&(P.openChangeTimeout.clear(),P.restTimeout.clear(),P.restTimeoutPending=!1,z.clear()),t),i=w.current,r=i&&n&&(0,eU.contains)(i,n);if(a&&x.select("open")&&x.select("lastOpenChangeReason")===eQ.REASONS.triggerHover)return x.setOpen(!1,(0,eK.createChangeEventDetails)(eQ.REASONS.triggerHover,e));if(s&&!a&&r&&!E.current&&!x.select("open")&&i&&(0,e_.isMouseLikePointerType)(q.current)){let t=()=>{L.current||E.current||x.select("open")||x.setOpen(!0,(0,eK.createChangeEventDetails)(eQ.REASONS.triggerHover,e,i))},s=D();0===s?(z.clear(),t()):z.start(s,t)}})(e.nativeEvent)},onFocus(e){H(tm(e.nativeEvent))&&e.preventBaseUIHandler()},onMouseLeave(){L.current=!1,z.clear(),q.current=void 0},onPointerEnter(e){q.current=e.pointerType},onPointerDown(e){q.current=e.pointerType,x.set("closeOnClick",c),c&&!x.select("open")&&x.cancelPendingOpen(e.nativeEvent)},onClick(e){c&&!x.select("open")&&x.cancelPendingOpen(e.nativeEvent)},id:f,[tp.triggerDisabled]:I?"":void 0,[th]:I?void 0:""},h],stateAttributesMapping:te.triggerOpenStateMapping})}),tf=n.createContext(void 0);var tg=e.i(74080),tv=e.i(26674);let tj=n.forwardRef(function(e,s){let{children:a,container:i,className:r,render:l,style:o,...d}=e,{node:c,subtree:u}=(0,tv.useFloatingPortalNode)({container:i,ref:s,componentProps:e,elementProps:d});return u||c?(0,t.jsxs)(n.Fragment,{children:[u,c&&tg.createPortal(a,c)]}):null}),tw=n.forwardRef(function(e,s){let{keepMounted:n=!1,...a}=e;return eF().useState("mounted")||n?(0,t.jsx)(tf.Provider,{value:n,children:(0,t.jsx)(tj,{ref:s,...a})}):null}),ty=n.createContext(void 0);function tb(){let e=n.useContext(ty);if(void 0===e)throw Error((0,eD.default)(71));return e}var tS=e.i(23706),tC=e.i(38396),tN=e.i(89579);let tk=n.forwardRef(function(e,s){let{render:a,className:i,anchor:r,positionMethod:l="absolute",side:o="top",align:d="center",sideOffset:c=0,alignOffset:u=0,collisionBoundary:p="clipping-ancestors",collisionPadding:h=5,arrowPadding:m=5,sticky:x=!1,disableAnchorTracking:f=!1,collisionAvoidance:g=tC.POPUP_COLLISION_AVOIDANCE,style:v,...j}=e,w=eF(),y=function(){let e=n.useContext(tf);if(void 0===e)throw Error((0,eD.default)(70));return e}(),b=w.useState("open"),S=w.useState("mounted"),C=w.useState("trackCursorAxis"),N=w.useState("disableHoverablePopup"),k=w.useState("floatingRootContext"),T=w.useState("instantType"),R=w.useState("transitionStatus"),P=w.useState("adaptiveOrigin"),O=(0,tS.useAnchorPositioning)({anchor:r,positionMethod:l,floatingRootContext:k,mounted:S,side:o,sideOffset:c,align:d,alignOffset:u,collisionBoundary:p,collisionPadding:h,sticky:x,arrowPadding:m,disableAnchorTracking:f,keepMounted:y,collisionAvoidance:g,adaptiveOrigin:P}),I=n.useMemo(()=>({open:b,side:O.side,align:O.align,anchorHidden:O.anchorHidden,instant:"none"!==C?"tracking-cursor":T}),[b,O.side,O.align,O.anchorHidden,C,T]),E=(0,tN.usePositioner)(e,I,{styles:O.positionerStyles,transitionStatus:R,props:j,refs:[s,w.useStateSetter("positionerElement")],hidden:!S,inert:!b||"both"===C||N});return(0,t.jsx)(ty.Provider,{value:O,children:E})});var tT=e.i(37584),tR=e.i(53984),tP=e.i(31157);let tO=n.forwardRef(function(e,t){let{render:s,className:n,style:a,...i}=e,r=eF(),{side:l,align:o}=tb(),d=r.useState("open"),c=r.useState("instantType"),u=r.useState("transitionStatus"),p=r.useState("popupProps"),h=r.useState("floatingRootContext"),m=r.useState("disabled"),x=r.useState("closeDelay");(0,tT.useOpenChangeComplete)({open:d,ref:r.context.popupRef,onComplete(){d&&r.context.onOpenChangeComplete?.(!0)}}),(0,tP.useHoverFloatingInteraction)(h,{enabled:!m,closeDelay:x});let f=r.useStateSetter("popupElement");return(0,tt.useRenderElement)("div",e,{state:{open:d,side:l,align:o,instant:c,transitionStatus:u},ref:[t,r.context.popupRef,f],props:[eY.FOCUSABLE_POPUP_PROPS,p,(0,tR.getDisabledMountTransitionStyles)(u),i],stateAttributesMapping:te.popupTransitionStateMapping})}),tI=n.forwardRef(function(e,t){let{render:s,className:n,style:a,...i}=e,r=eF(),{arrowRef:l,side:o,align:d,arrowUncentered:c,arrowStyles:u}=tb(),p=r.useState("open"),h=r.useState("instantType");return(0,tt.useRenderElement)("div",e,{state:{open:p,side:o,align:d,uncentered:c,instant:h},ref:[t,l],props:[{style:u,"aria-hidden":!0},i],stateAttributesMapping:te.popupStateMapping})});var tE=e.i(18390);let tA=n.forwardRef(function(e,t){let{render:s,className:n,style:a,children:i,...r}=e,l=eF(),o=tb(),d=l.useState("instantType"),{children:c,state:u}=(0,tE.usePopupViewport)({store:l,side:o.side,children:i}),p={activationDirection:u.activationDirection,transitioning:u.transitioning,instant:d};return(0,tt.useRenderElement)("div",e,{state:p,ref:t,props:[r,{children:c}],stateAttributesMapping:tE.popupViewportStateMapping})});var tM=e.i(64170);class tL extends tM.BasePopupHandle{constructor(){super(function(){let e=new e1.PopupTriggerMap;return Object.assign(new eZ.NullStore(Object.freeze(e4(void 0,e)),Object.freeze(e6(e)),e2),{setOpen:ez.NOOP,cancelPendingOpen:ez.NOOP})}(),"Tooltip")}open(e){this.openByTrigger(e)}close(){this.closePopup()}get isOpen(){return this.attachedStore?.select("open")??!1}}e.s(["Arrow",0,tI,"Handle",0,tL,"Popup",0,tO,"Portal",0,tw,"Positioner",0,tk,"Provider",0,function(e){let{delay:s,closeDelay:a,timeout:i=400}=e,r=n.useMemo(()=>({open:s,close:a}),[s,a]);return(0,t.jsx)(ta.Provider,{value:s,children:(0,t.jsx)(to,{delay:r,timeoutMs:i,children:e.children})})},"Root",0,e7,"Trigger",0,tx,"Viewport",0,tA,"createHandle",0,function(){return new tL}],99643);var tz=e.i(99643),tz=tz;function tq(e){return(0,t.jsx)(tz.Root,{"data-slot":"tooltip",...e})}function tD(e){return(0,t.jsx)(tz.Trigger,{"data-slot":"tooltip-trigger",...e})}function tH({className:e,side:s="top",sideOffset:n=6,align:a="center",...i}){return(0,t.jsx)(tz.Portal,{children:(0,t.jsx)(tz.Positioner,{align:a,side:s,sideOffset:n,className:"isolate z-50 max-sm:hidden",children:(0,t.jsx)(tz.Popup,{"data-slot":"tooltip-content",className:(0,p.classNames)("w-fit max-w-xs origin-(--transform-origin) rounded-sm bg-foreground px-2 py-1 text-caption font-medium text-background shadow-md duration-(--duration-fast) data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),...i})})})}let tF={fresh:{Icon:eO,tone:"text-tone-ok-fg"},while:{Icon:eM,tone:"text-muted-foreground"},long:{Icon:eE,tone:"text-tone-waiting-fg"}};function t$({seenAt:e,now:s,testId:n}){let a;if(null===e)return null;let i=new Date(e),r=(a=s.getTime()-i.getTime())<6e4?"fresh":a<=9e5?"while":"long",{Icon:l,tone:o}=tF[r],d=(0,v.lastSeen)(i,s);return(0,t.jsxs)(tq,{children:[(0,t.jsx)(tD,{render:(0,t.jsx)("span",{role:"img","aria-label":d,"data-testid":n,"data-signal":r,className:(0,p.classNames)("inline-flex [&_svg]:size-(--size-icon) max-sm:[&_svg]:size-4",o)}),children:(0,t.jsx)(l,{"aria-hidden":!0})}),(0,t.jsx)(tH,{children:d})]})}var tB=e.i(63481);let tV={name:"package",size:24,node:[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]};tV.node;let tU=(0,W.default)(tV),t_={name:"sparkles",size:24,node:[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],aliases:["stars"]};t_.node;let tW=(0,W.default)(t_);function tX(e){return e.startsWith("@")||/@\d+\.\d+\.\d+$/.test(e)}function tK({model:e,isCrewed:s,now:n,testId:a}){if(!s)return null;if(null===e)return(0,t.jsx)("span",{"data-testid":a,className:"text-meta text-muted-foreground",children:"Not stated yet"});let i=tX(e.id),r=function(e,t){let s=new Date(e.statedAt),n=Math.max(0,t.getTime()-s.getTime()),a=tX(e.id)?"Software":"Model";if(n<6e4)return`${a}, stated ${String(Math.floor(n/1e3))} s ago`;let i=(0,v.relativeTime)(s,t);return`${a}, stated ${i.charAt(0).toLowerCase()}${i.slice(1)}`}(e,n);return(0,t.jsxs)(tq,{children:[(0,t.jsxs)(tD,{render:(0,t.jsx)("span",{"data-testid":a,"data-slot":"model-tag","data-software":i?"":void 0,className:(0,p.classNames)("inline-flex max-w-44 min-w-0 items-center gap-1 rounded-sm px-1.5 py-0.5 font-mono text-id [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0",i?"border border-dashed border-border text-muted-foreground":"bg-secondary text-secondary-foreground")}),children:[(0,t.jsx)(i?tU:tW,{"aria-hidden":!0}),(0,t.jsx)("span",{className:"truncate",children:e.id}),(0,t.jsxs)("span",{className:"sr-only",children:[", ",r]})]}),(0,t.jsx)(tH,{children:(0,t.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,t.jsx)("span",{className:"font-mono",children:e.id}),(0,t.jsx)("span",{className:"opacity-75",children:r})]})})]})}var tY=e.i(81830),tG=e.i(1935),tJ=e.i(39448);let tQ={all:"All",crewed:"Crewed",awaitingCrew:"Awaiting crew"};function tZ(e){return Object.hasOwn(tQ,e)}function t0({ship:e,squadron:s}){return"operator"===e.kind?(0,t.jsxs)(eS.Badge,{variant:"kind",children:[(0,t.jsx)(ep.UserRound,{"aria-hidden":!0}),"operator"]}):"viewer"===e.kind?(0,t.jsxs)(eS.Badge,{variant:"kind","data-testid":"fleet-viewer",children:[(0,t.jsx)(er,{"aria-hidden":!0}),"viewer"]}):s?.role===null?(0,t.jsxs)(eS.Badge,{variant:"kind","data-testid":"fleet-flagship",children:[(0,t.jsx)(el.Flag,{"aria-hidden":!0}),"flagship"]}):s?(0,t.jsx)(tG.SquadronTag,{squadronId:s.squadronId,role:s.role,size:"sm"}):null}function t1({ship:e,now:s}){let n=e.startingPrompt,a="inline-flex min-w-0 items-center gap-1.5 text-meta text-muted-foreground [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0";if(null===n)return(0,t.jsxs)("span",{className:a,children:[(0,t.jsx)(eo.KeyRound,{"aria-hidden":!0}),"No starting prompt issued"]});let i=new Date(n.issuedAt);return(0,t.jsxs)("span",{className:a,children:[(0,t.jsx)(eo.KeyRound,{"aria-hidden":!0}),(0,t.jsxs)("span",{className:"truncate",children:["Prompt issued"," ",(0,t.jsx)("time",{dateTime:n.issuedAt,title:(0,v.fullDateTime)(i),children:(0,v.relativeTime)(i,s)}),n.isClaimed?", claimed":", not claimed yet"]})]})}function t2({ship:e,now:s}){return"retired"===e.status?null===e.retiredAt?null:(0,t.jsxs)("span",{className:"truncate text-meta text-muted-foreground","data-testid":"fleet-retired-on",title:(0,v.fullDateTime)(new Date(e.retiredAt)),children:["Retired ",(0,v.dayMonth)(new Date(e.retiredAt))]}):"viewer"===e.kind?null:"awaitingCrew"===e.status?(0,t.jsx)(t1,{ship:e,now:s}):(0,t.jsx)(tB.LocationTag,{kind:"operator"===e.kind&&null!==e.location?"DEVICE":e.location?.kind??null,description:e.location?.description,harness:"operator"===e.kind?"console":e.harness,size:"sm"})}function t5({ship:e,now:s,next:n}){let a="agent"===e.kind&&"crewed"===e.status;return(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-2 max-sm:flex-col max-sm:items-stretch",children:[a?(0,t.jsx)(tY.ReportLine,{report:e.report,now:s,variant:"row",isTimeInTitle:!0,testId:"fleet-report"}):null,n]})}function t4({ships:e,view:s,onViewChange:n,size:a,squadronsOf:i}){let{filters:r}=s,l={all:"All",...Object.fromEntries(ev(e,r.isRetiredShown).map(e=>[e,e]))},o=ej(e),d="sm"===a?"fleet-show-retired":"fleet-show-retired-touch",c=e=>{n({...s,filters:{...r,...e}})},u="touch"===a;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(eC.Select,{items:tQ,value:r.status,onValueChange:e=>{null!==e&&tZ(e)&&c({status:e})},children:[(0,t.jsx)(eC.SelectTrigger,{size:a,"aria-label":"Status","data-testid":u?void 0:"fleet-filter-status",children:(0,t.jsxs)("span",{className:"flex gap-1.5",children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:"Status"}),(0,t.jsx)(eC.SelectValue,{className:"font-medium"})]})}),(0,t.jsx)(eC.SelectContent,{children:Object.entries(tQ).map(([e,s])=>(0,t.jsx)(eC.SelectItem,{value:e,children:s},e))})]}),(0,t.jsxs)(eC.Select,{items:l,value:r.type,onValueChange:e=>{null!==e&&c({type:e})},children:[(0,t.jsx)(eC.SelectTrigger,{size:a,"aria-label":"Type","data-testid":u?void 0:"fleet-filter-type",children:(0,t.jsxs)("span",{className:"flex gap-1.5",children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:"Type"}),(0,t.jsx)(eC.SelectValue,{className:"font-medium"})]})}),(0,t.jsx)(eC.SelectContent,{children:Object.entries(l).map(([e,s])=>(0,t.jsx)(eC.SelectItem,{value:e,className:"all"===e?void 0:"font-mono",children:s},e))})]}),i&&(0,t.jsxs)(eC.Select,{items:{all:"All",...Object.fromEntries(ew(i).map(e=>[e,e]))},value:r.squadron,onValueChange:e=>{null!==e&&c({squadron:e})},children:[(0,t.jsx)(eC.SelectTrigger,{size:a,"aria-label":"Squadron","data-testid":u?void 0:"fleet-filter-squadron",children:(0,t.jsxs)("span",{className:"flex gap-1.5",children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:"Squadron"}),(0,t.jsx)(eC.SelectValue,{className:"font-medium"})]})}),(0,t.jsxs)(eC.SelectContent,{children:[(0,t.jsx)(eC.SelectItem,{value:"all",children:"All"}),ew(i).map(e=>(0,t.jsx)(eC.SelectItem,{value:e,children:e},e))]})]}),eb(r).length>0&&!u?(0,t.jsx)(b.Button,{variant:"ghost",size:"xs","data-testid":"fleet-filters-clear",onClick:()=>{n({...s,filters:eh.filters})},children:"Clear filters"}):null,(0,t.jsxs)("div",{className:(0,p.classNames)("inline-flex items-center gap-2",u?"py-2":"sm:ml-auto"),children:[(0,t.jsx)(q.Switch,{id:d,"data-testid":u?void 0:"fleet-show-retired",checked:r.isRetiredShown,onCheckedChange:e=>{c({isRetiredShown:e})}}),(0,t.jsxs)(z.Label,{htmlFor:d,className:(0,p.classNames)("font-normal text-muted-foreground",u?"text-body-touch":"text-meta"),children:["Show retired (",o,")"]})]})]})}function t6({label:e,isOn:s,kind:n,onPick:a}){return(0,t.jsx)(b.Button,{variant:s?"primary":"secondary",size:"touch",role:"radio"===n?"radio":void 0,"aria-checked":"radio"===n?s:void 0,"aria-pressed":"toggle"===n?s:void 0,onClick:a,children:e})}function t7({ships:e,view:s,onViewChange:n,shownCount:a,squadronsOf:i}){let{filters:r}=s,l=e=>{n({...s,filters:{...r,...e}})},o=eb(r).length,d=ej(e);return(0,t.jsxs)(eN.Sheet,{children:[(0,t.jsx)(eN.SheetTrigger,{render:(0,t.jsx)(b.Button,{size:"touch",isIconOnly:!0,"aria-label":o>0?`Filter ships, ${String(o)} active`:"Filter ships","data-testid":"fleet-filters-open",icon:(0,t.jsx)(eu,{}),className:"relative sm:hidden",children:o>0?(0,t.jsx)("span",{"aria-hidden":!0,className:"absolute top-1.5 right-1.5 size-2 rounded-full bg-primary"}):null})}),(0,t.jsxs)(eN.SheetContent,{side:"bottom",children:[(0,t.jsxs)(eN.SheetHeader,{className:"flex-row items-center justify-between",children:[(0,t.jsx)(eN.SheetTitle,{children:"Filter ships"}),(0,t.jsx)(b.Button,{variant:"ghost",size:"touch","data-testid":"fleet-filters-reset",onClick:()=>{n({...s,filters:eh.filters})},children:"Reset"})]}),(0,t.jsxs)(eN.SheetBody,{className:"flex flex-col gap-4 pb-4",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("span",{id:"fleet-filter-status-label",className:"text-meta font-medium text-muted-foreground",children:"Status"}),(0,t.jsx)("div",{role:"radiogroup","aria-labelledby":"fleet-filter-status-label",className:"flex gap-1.5 [&>*]:flex-1",children:Object.entries(tQ).map(([e,s])=>(0,t.jsx)(t6,{label:s,kind:"radio",isOn:r.status===e,onPick:()=>{tZ(e)&&l({status:e})}},e))})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("span",{className:"text-meta font-medium text-muted-foreground",children:"Type"}),(0,t.jsx)("div",{role:"group","aria-label":"Type",className:"flex flex-wrap gap-1.5",children:["all",...ev(e,r.isRetiredShown)].map(e=>(0,t.jsx)(t6,{label:"all"===e?"All types":e,kind:"toggle",isOn:r.type===e,onPick:()=>{l({type:e})}},e))})]}),i&&(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("span",{id:"fleet-filter-squadron-label",className:"text-meta font-medium text-muted-foreground",children:"Squadron"}),(0,t.jsx)("div",{role:"radiogroup","aria-labelledby":"fleet-filter-squadron-label",className:"flex flex-wrap gap-1.5",children:["all",...ew(i)].map(e=>(0,t.jsx)(t6,{label:"all"===e?"All":e,kind:"radio",isOn:r.squadron===e,onPick:()=>{l({squadron:e})}},e))})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2 py-1",children:[(0,t.jsxs)(z.Label,{htmlFor:"fleet-show-retired-touch",className:"text-body-touch font-normal",children:["Show retired ships ",(0,t.jsxs)("span",{className:"text-muted-foreground",children:["(",d,")"]})]}),(0,t.jsx)(q.Switch,{id:"fleet-show-retired-touch",checked:r.isRetiredShown,onCheckedChange:e=>{l({isRetiredShown:e})}})]}),(0,t.jsx)(eN.SheetClose,{render:(0,t.jsx)(b.Button,{size:"touch","data-testid":"fleet-filters-apply"}),children:1===a?"Show 1 ship":`Show ${String(a)} ships`})]})]})]})}function t8({view:e,onViewChange:s}){let n=eb(e.filters);return 0===n.length?null:(0,t.jsxs)("div",{className:"flex w-full flex-wrap items-center gap-1.5 sm:hidden","data-testid":"fleet-filter-chips",children:[n.map(e=>(0,t.jsx)(eS.Badge,{variant:"outline",className:"max-w-full truncate",children:e},e)),(0,t.jsx)(b.Button,{variant:"ghost",size:"touch",onClick:()=>{s({...e,filters:eh.filters})},children:"Clear filters"})]})}function t3({ships:e,view:s,onViewChange:n,shownCount:a,squadronsOf:i}){return(0,t.jsxs)("div",{"data-slot":"fleet-toolbar",className:"flex flex-wrap items-center gap-2",children:[(0,t.jsx)("div",{className:"w-60 max-sm:min-w-0 max-sm:flex-1",children:(0,t.jsx)(L.Input,{type:"search","aria-label":"Search ships by name or type",placeholder:"Search ships by name","data-testid":"fleet-search",value:s.query,onChange:e=>{n({...s,query:e.target.value})},leadingIcon:(0,t.jsx)(ed.Search,{}),className:"h-(--size-control-sm) text-meta max-sm:h-(--size-control-touch) max-sm:text-input-touch"})}),(0,t.jsx)("div",{className:"flex flex-wrap items-center gap-2 max-sm:hidden sm:flex-1",children:(0,t.jsx)(t4,{ships:e,view:s,onViewChange:n,squadronsOf:i,size:"sm"})}),(0,t.jsx)(t7,{ships:e,view:s,onViewChange:n,shownCount:a,squadronsOf:i}),(0,t.jsx)(t8,{view:s,onViewChange:n}),(0,t.jsxs)("p",{"aria-live":"polite",className:"text-meta text-muted-foreground tabular-nums max-sm:w-full",children:[a," of ",e.length," ships"]})]})}function t9({ship:e}){return(0,t.jsx)(tJ.ShipName,{name:e.name,shipId:e.id,isSuffixShown:"retired"===e.status,href:`/ships/${e.id}`})}function se({ships:e,highlightedShipIds:s,now:n,renderRowActions:a,squadronsOf:i}){return(0,t.jsx)("div",{className:"max-sm:hidden",children:(0,t.jsxs)(ek.Table,{"aria-label":"Ships",children:[(0,t.jsx)(ek.TableHeader,{children:(0,t.jsxs)(ek.TableRow,{children:[(0,t.jsx)(ek.TableHead,{children:"Name"}),(0,t.jsx)(ek.TableHead,{children:"Status"}),(0,t.jsx)(ek.TableHead,{children:"Report"}),(0,t.jsx)(ek.TableHead,{children:"Runs on"}),(0,t.jsx)(ek.TableHead,{children:"Model"}),(0,t.jsx)(ek.TableHead,{children:"Seen"}),(0,t.jsx)(ek.TableHead,{children:(0,t.jsx)("span",{className:"sr-only",children:"Actions"})})]})}),(0,t.jsx)(ek.TableBody,{children:e.map(e=>(0,t.jsxs)(ek.TableRow,{"data-testid":`fleet-row-${e.name}`,"data-new":s?.has(e.id)?"":void 0,className:"h-12",children:[(0,t.jsx)(ek.TableCell,{className:"max-w-64",children:(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-2",children:[(0,t.jsx)(t9,{ship:e}),(0,t.jsx)(t0,{ship:e,squadron:i?.get(e.id)})]})}),(0,t.jsx)(ek.TableCell,{children:(0,t.jsx)(J.StatusBadge,{status:e.status})}),(0,t.jsx)(ek.TableCell,{className:"max-w-72",children:(0,t.jsx)(t5,{ship:e,now:n,next:a?.(e,"next")})}),(0,t.jsx)(ek.TableCell,{className:"max-w-56",children:(0,t.jsx)(t2,{ship:e,now:n})}),(0,t.jsx)(ek.TableCell,{children:"agent"!==e.kind?null:(0,t.jsx)(tK,{model:e.model,isCrewed:"crewed"===e.status,now:n,testId:"fleet-model"})}),(0,t.jsx)(ek.TableCell,{children:(0,t.jsx)(t$,{seenAt:e.lastSeenAt,now:n,testId:"fleet-last-seen"})}),(0,t.jsx)(ek.TableCell,{className:"w-10 text-right",children:a?.(e,"table")})]},e.id))})]})})}function st({ships:e,highlightedShipIds:s,now:n,renderRowActions:a,squadronsOf:i}){return(0,t.jsx)("ul",{"aria-label":"Ships",className:"overflow-hidden rounded-lg border border-border bg-card sm:hidden",children:e.map(e=>(0,t.jsxs)("li",{"data-testid":`fleet-card-${e.name}`,"data-new":s?.has(e.id)?"":void 0,className:"flex items-start gap-2 border-b border-border px-3.5 py-3 last:border-0 data-new:animate-highlight",children:[(0,t.jsxs)("div",{className:"flex min-w-0 grow flex-col gap-1.5",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3 text-body-touch",children:[(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-2",children:[(0,t.jsx)(t9,{ship:e}),(0,t.jsx)(t0,{ship:e,squadron:i?.get(e.id)})]}),(0,t.jsx)(J.StatusBadge,{status:e.status})]}),(0,t.jsx)(t5,{ship:e,now:n,next:a?.(e,"next")}),(0,t.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-x-3 gap-y-1",children:[(0,t.jsx)(t2,{ship:e,now:n}),"agent"!==e.kind?null:(0,t.jsx)(tK,{model:e.model,isCrewed:"crewed"===e.status,now:n}),(0,t.jsx)(t$,{seenAt:e.lastSeenAt,now:n})]})]}),a?.(e,"phone")]},e.id))})}function ss({ships:e,view:s,onViewChange:n,state:a,error:i,highlightedShipIds:r,now:l,renderRowActions:o,emptyAction:d,squadronsOf:c}){var u;let p;if("loading"===a)return(0,t.jsxs)("div",{"data-slot":"fleet-table","data-state":"loading",className:"flex flex-col gap-3",children:[(0,t.jsx)(eR.LoadingSkeleton,{variant:"table",rows:6,label:"Loading the fleet",className:"max-sm:hidden"}),(0,t.jsx)(eR.LoadingSkeleton,{variant:"list",rows:5,label:"Loading the fleet",className:"sm:hidden"})]});if("error"===a)return(0,t.jsx)(H.InlineError,{variant:"page",title:"Couldn’t load the fleet",description:"This page couldn’t reach the fleet server. Check that the server is running and reachable from this browser, then try again.",detail:i?.detail,retryNote:i?.retryNote,onRetry:i?.onRetry});let h={highlightedShipIds:r,now:l,renderRowActions:o,squadronsOf:c};if(e.every(e=>"operator"===e.kind||"retired"===e.status)){let s=e.filter(e=>"operator"===e.kind);return(0,t.jsxs)("div",{"data-slot":"fleet-table","data-state":"empty",className:"flex flex-col gap-3",children:[(0,t.jsx)(se,{ships:s,...h}),(0,t.jsx)(st,{ships:s,...h}),(0,t.jsx)(eT.EmptyState,{icon:(0,t.jsx)(G.Ship,{}),title:"No ships besides argo yet",description:"argo is your own ship: messages to the operator land in its inbox. Commission a ship to add an agent to the fleet.",action:d})]})}let m=(u={...s,squadronsOf:c},e.filter(e=>{let t;return(""===(t=u.query.trim().toLowerCase())||e.name.toLowerCase().includes(t)||e.type.toLowerCase().includes(t))&&function(e,t){let{filters:s,squadronsOf:n}=t;return("retired"!==e.status||!!s.isRetiredShown)&&("all"===s.squadron||n?.get(e.id)?.squadronId===s.squadron)&&("all"===s.status||e.status===s.status)&&("all"===s.type||e.type===s.type)}(e,u)}).toSorted((e,t)=>e.kind!==t.kind?"operator"===e.kind?-1:1:e.name.localeCompare(t.name)||e.id.localeCompare(t.id))),x=s.query.trim();return(0,t.jsxs)("div",{"data-slot":"fleet-table","data-state":"ready",className:"flex flex-col gap-3",children:[(0,t.jsx)(t3,{ships:e,view:s,onViewChange:n,shownCount:m.length,squadronsOf:c}),0===m.length?(0,t.jsx)(eT.EmptyState,{variant:"no-results",title:""===x?"No ships match these filters.":`No ships match “${x}”.`,action:(0,t.jsx)(b.Button,{size:"xs","data-testid":"fleet-clear-filters",onClick:()=>{n(eh)},children:(p=eb(s.filters).length>0,""===x?"Clear filters":p?"Clear search and filters":"Clear search")})}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(se,{ships:m,...h}),(0,t.jsx)(st,{ships:m,...h})]})]})}var sn=e.i(5894);function sa({view:e,onViewChange:s,newShipIds:n}){let a=(0,x.useFleetSnapshot)(),i=(0,g.useNow)(),r=(0,en.useSquadrons)();return(0,t.jsx)("section",{"aria-label":"Fleet",className:"flex flex-col gap-3",children:(0,t.jsx)(ss,{ships:a.data??[],view:e,onViewChange:s,state:a.isPending?"loading":a.isError?"error":"ready",error:{detail:a.error?.message,onRetry:()=>{a.refetch()}},highlightedShipIds:n,now:i,renderRowActions:(e,s)=>(0,t.jsx)(sn.ShipActions,{ship:e,layout:"table"===s?"menu":"phone"===s?"sheet":"next"}),squadronsOf:r.data?(0,ea.shipsInSquadrons)(r.data):void 0})})}var si=e.i(87792),sr=e.i(90262),sl=e.i(86413),so=e.i(18423),sd=e.i(88721),sc=e.i(78485),su=e.i(86165);e.s(["default",0,function({searchParams:e}){var o;let d,c=(0,s.useRouter)(),u=function(e){let t=new URLSearchParams;for(let[s,n]of Object.entries(e)){let e=Array.isArray(n)?n[0]:n;void 0!==e&&t.set(s,e)}return t}((0,n.use)(e)),p={query:u.get("q")??"",filters:{status:(o=u.get(em),(d=k.shipStatusSchema.safeParse(o)).success&&"retired"!==d.data?d.data:"all"),type:u.get(ex)??"all",squadron:u.get(ef)??"all",isRetiredShown:"1"===u.get(eg)}},h="new"===u.get("commission"),m=(0,x.useFleetSnapshot)(),v=(0,so.useLiveFleet)(),y=(0,g.useNow)(),b=(0,sd.useAccountMenu)(y),T=(0,su.useHasSquadrons)(),R=(0,N.messageLimitReached)((0,S.useFleetLimits)().data),P=(0,C.useHostedAccountUrl)(),O=(0,sl.useOpenInboxCount)(),I=(0,sr.useAccess)(),[E,A]=(0,n.useState)(!1),[M,L]=(0,n.useState)(!1),[z,q]=(0,n.useState)(!1),D=(0,f.useAttentionCount)();(0,sc.useSignInWhenSessionEnds)([m.error,v.error]);let H=e=>{let t,s=(t=new URLSearchParams,""!==e.query&&t.set("q",e.query),"all"!==e.filters.status&&t.set(em,e.filters.status),"all"!==e.filters.type&&t.set(ex,e.filters.type),"all"!==e.filters.squadron&&t.set(ef,e.filters.squadron),e.filters.isRetiredShown&&t.set(eg,"1"),t).toString();c.replace(""===s?"/":`/?${s}`,{scroll:!1})};return(0,t.jsxs)(si.ListLayout,{title:"Fleet overview",description:m.data?function(e){let t=j(e.ships).length,s=e.ships.filter(e=>"agent"===e.kind&&"retired"===e.status).length;if(0===t&&0===s)return e.canCommission?"Only argo so far. Ships you commission appear here.":"Only argo so far.";let n=0===s?"":`, ${String(s)} retired`;return`${1===t?"1 active ship":`${String(t)} active ships`} and argo${n}. Changes appear as they happen.`}({ships:m.data,canCommission:I.canManage}):"Loading your fleet",primaryAction:I.canManage?(0,t.jsx)(_,{isOpen:z||h,onOpenChange:e=>{q(e),!e&&h&&H(p)}}):void 0,live:v.live,nav:{active:"overview",inboxCount:O,attentionCount:D,hasSquadrons:T,hasSettings:T&&I.canManage},onCompose:I.canSend?()=>{A(!0)}:void 0,onSearch:()=>{L(!0)},account:b,banner:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(l.ConsoleNotices,{}),(0,t.jsx)(r.ConsoleGuide,{})]}),children:[void 0===R?null:(0,t.jsx)(F.LimitNotice,{...(0,N.messageLimitNotice)(R),accountUrl:P,testId:"overview-message-limit"}),(0,t.jsx)(es,{}),(0,t.jsx)(w,{}),(0,t.jsx)(sa,{view:p,onViewChange:H,newShipIds:v.newShipIds}),(0,t.jsx)(a.ComposeMessage,{isOpen:E,onOpenChange:A}),(0,t.jsx)(i.ConsoleCommands,{isOpen:M,onOpenChange:L,onCompose:()=>{A(!0)}})]})}],62219)}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,52376,e=>{"use strict";e.s([],4824),e.i(4824);var t=e.i(71645),r=e.i(52245),n=e.i(33332);let s=t.createContext(void 0);function i(){let e=t.useContext(s);if(void 0===e)throw Error((0,n.default)(13));return e}let a={imageLoadingStatus:()=>null};var o=e.i(43476);let l=t.forwardRef(function(e,n){let{className:i,render:l,style:u,...c}=e,[d,h]=t.useState("idle"),f=t.useMemo(()=>({imageLoadingStatus:d,setImageLoadingStatus:h}),[d,h]),p=(0,r.useRenderElement)("span",e,{state:{imageLoadingStatus:d},ref:n,props:c,stateAttributesMapping:a});return(0,o.jsx)(s.Provider,{value:f,children:p})});var u=e.i(67865),c=e.i(46376),d=e.i(37584),h=e.i(74354),f=e.i(23910),p=e.i(56789);let m={...a,...h.transitionStatusMapping},g=t.forwardRef(function(e,n){let{className:s,render:a,onLoadingStatusChange:o,keepMounted:l=!1,style:h,sizes:g,srcSet:y,src:b,...v}=e,{setImageLoadingStatus:x}=i(),[w,C]=function(e,{referrerPolicy:r,crossOrigin:n,sizes:s,srcSet:i},a){let o=t.useState("idle"),l=o[1];return(0,c.useIsoLayoutEffect)(()=>{if(!a)return p.NOOP;if(!e&&!i)return l("error"),p.NOOP;let t=!0,o=new window.Image,u=e=>()=>{t&&l(e)};return l("loading"),o.onload=u("loaded"),o.onerror=u("error"),r&&(o.referrerPolicy=r),o.crossOrigin=n??null,s&&(o.sizes=s),i&&(o.srcset=i),e&&(o.src=e),o.complete&&l(o.naturalWidth>0?"loaded":"error"),()=>{t=!1}},[a,e,i,s,n,r,l]),o}(b,e,!l),S="loaded"===w,{mounted:k,transitionStatus:j,setMounted:R}=(0,f.useTransitionStatus)(S),E=t.useRef(null),T=t.useRef(!0);(0,c.useIsoLayoutEffect)(()=>{if(!l)return;let e=T.current;T.current=!1;let t=E.current;if(!t)return;if(!t.complete)return void C("loading");let r=t.naturalWidth>0?"loaded":"error";C(r),"loaded"===r&&e&&R(!0)},[l,b,y,g,v.crossOrigin,v.referrerPolicy,a,C,R]);let O=l?{"data-loading":"loading"===w?"":void 0,"data-error":"error"===w?"":void 0,"aria-hidden":"loaded"!==w||void 0,onLoad(){C("loaded")},onError(){C("error")}}:void 0,N=(0,u.useStableCallback)(e=>{o?.(e),x(e)});(0,c.useIsoLayoutEffect)(()=>{"idle"!==w&&N(w)},[w,N]),(0,c.useIsoLayoutEffect)(()=>()=>x("idle"),[x]),(0,d.useOpenChangeComplete)({enabled:!S,open:S,ref:E,onComplete(){S||R(!1)}});let A=l||k,P={};void 0!==g&&(P.sizes=g),void 0!==y&&(P.srcSet=y),void 0!==b&&(P.src=b);let M=(0,r.useRenderElement)("img",e,{state:{imageLoadingStatus:w,transitionStatus:l&&"ending"===j?void 0:j},ref:[n,E],props:[O,v,P],stateAttributesMapping:m,enabled:A});return A?M:null});var y=e.i(39957);let b=t.forwardRef(function(e,n){let{className:s,render:o,delay:l=0,style:u,...c}=e,{imageLoadingStatus:d}=i(),[h,f]=t.useState(0===l),p=(0,y.useTimeout)();return t.useEffect(()=>(l>0?p.start(l,()=>f(!0)):f(!0),p.clear),[p,l]),(0,r.useRenderElement)("span",e,{state:{imageLoadingStatus:d},ref:n,props:c,stateAttributesMapping:a,enabled:"loaded"!==d&&(0===l||h)})});e.s(["Fallback",0,b,"Image",0,g,"Root",0,l],14751);var v=e.i(14751);e.s(["Avatar",0,v],52376)},80862,e=>{"use strict";e.s(["endingStyle",0,"data-ending-style","startingStyle",0,"data-starting-style"])},74354,e=>{"use strict";var t=e.i(80862);let r={[t.startingStyle]:""},n={[t.endingStyle]:""};e.s(["transitionStatusMapping",0,{transitionStatus:e=>"starting"===e?r:"ending"===e?n:null}])},37584,22640,e=>{"use strict";var t=e.i(71645),r=e.i(67865),n=e.i(74080),s=e.i(8445),i=e.i(94603),a=e.i(80862);let o=null;function l(e,t=!1,u=!1){let c=(0,s.useAnimationFrame)();return(0,r.useStableCallback)((r,s=null)=>{c.cancel();let l=(0,i.resolveRef)(e);if(null==l)return;let d=()=>{if(!u)return void n.flushSync(r);if(!o){let e=[];o=e,queueMicrotask(()=>{o=null,n.flushSync(()=>{for(let t of e)t()})})}o.push(()=>{s?.aborted||r()})};if("function"!=typeof l.getAnimations||globalThis.BASE_UI_ANIMATIONS_DISABLED)return void r();function h(){Promise.all(l.getAnimations().map(e=>e.finished)).then(()=>{s?.aborted||d()},()=>{s?.aborted||(l.getAnimations().some(e=>e.pending||"finished"!==e.playState)?h():d())})}if(t){let e=a.startingStyle;if(!l.hasAttribute(e))return void c.request(h);let t=new MutationObserver(()=>{l.hasAttribute(e)||(t.disconnect(),h())});return t.observe(l,{attributes:!0,attributeFilter:[e]}),void s?.addEventListener("abort",()=>t.disconnect(),{once:!0})}c.request(h)})}e.s(["useAnimationsFinished",0,l],22640),e.s(["useOpenChangeComplete",0,function(e){let{enabled:n=!0,open:s,ref:i,batch:a=!1,onComplete:o}=e,u=(0,r.useStableCallback)(o),c=l(i,s,a);t.useEffect(()=>{if(!n)return;let e=new AbortController;return c(u,e.signal),()=>{e.abort()}},[n,s,u,c])}],37584)},23910,e=>{"use strict";var t=e.i(71645),r=e.i(46376),n=e.i(8445);e.s(["useTransitionStatus",0,function(e,s=!1,i=!1,a=!1){let[o,l]=t.useState(e&&s?"idle":void 0),[u,c]=t.useState(e&&!a);return e&&!u&&(c(!0),l("starting")),e||!u||"ending"===o||i||l("ending"),e||u||"ending"!==o||l(void 0),(0,r.useIsoLayoutEffect)(()=>{if(!e&&u&&"ending"!==o&&i){let e=n.AnimationFrame.request(()=>{l("ending")});return()=>{n.AnimationFrame.cancel(e)}}},[e,u,o,i]),(0,r.useIsoLayoutEffect)(()=>{if(!e||s)return;let t=n.AnimationFrame.request(()=>{l(void 0)});return()=>{n.AnimationFrame.cancel(t)}},[s,e]),(0,r.useIsoLayoutEffect)(()=>{if(!e||!s)return;e&&u&&"idle"!==o&&l("starting");let t=n.AnimationFrame.request(()=>{l("idle")});return()=>{n.AnimationFrame.cancel(t)}},[s,e,u,o]),{mounted:u,setMounted:c,transitionStatus:o}}])},94603,e=>{"use strict";e.s(["resolveRef",0,function(e){return null==e?e:"current"in e?e.current:e}])},8445,e=>{"use strict";e.i(47167);var t=e.i(88940),r=e.i(26300);let n=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let r=0;r<t.length;r+=1)t[r]?.(e)};request(e){let t=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,this.isScheduled||(requestAnimationFrame(this.tick),this.isScheduled=!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||null!==this.callbacks[t]&&(this.callbacks[t]=null,this.callbacksCount-=1)}};class s{static create(){return new s}static request(e){return n.request(e)}static cancel(e){return n.cancel(e)}currentId=null;request(e){this.cancel(),this.currentId=n.request(()=>{this.currentId=null,e()})}cancel=()=>{null!==this.currentId&&(n.cancel(this.currentId),this.currentId=null)};disposeEffect=()=>this.cancel}e.s(["AnimationFrame",0,s,"useAnimationFrame",0,function(){let e=(0,t.useRefWithInit)(s.create).current;return(0,r.useOnMount)(e.disposeEffect),e}])},26300,e=>{"use strict";var t=e.i(71645),r=e.i(56789);e.s(["useOnMount",0,function(e){t.useEffect(e,r.EMPTY_ARRAY)}])},39957,e=>{"use strict";var t=e.i(88940),r=e.i(26300);class n{static create(){return new n}currentId=0;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=0,t()},e)}isStarted(){return 0!==this.currentId}clear=()=>{0!==this.currentId&&(clearTimeout(this.currentId),this.currentId=0)};disposeEffect=()=>this.clear}e.s(["Timeout",0,n,"useTimeout",0,function(){let e=(0,t.useRefWithInit)(n.create).current;return(0,r.useOnMount)(e.disposeEffect),e}])},79432,19002,11147,e=>{"use strict";var t=e.i(56420);let r={name:"activity",size:24,node:[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]};r.node;let n=(0,t.default)(r);e.s(["Activity",0,n],79432);let s={name:"circle-pause",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"10",x2:"10",y1:"15",y2:"9",key:"c1nkhi"}],["line",{x1:"14",x2:"14",y1:"15",y2:"9",key:"h65svq"}]],aliases:["pause-circle"]};s.node;let i=(0,t.default)(s);e.s(["CirclePause",0,i],19002);let a={name:"octagon-pause",size:24,node:[["path",{d:"M10 15V9",key:"1lckn7"}],["path",{d:"M14 15V9",key:"1muqhk"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}]],aliases:["pause-octagon"]};a.node;let o=(0,t.default)(a);e.s(["OctagonPause",0,o],11147)},26091,e=>{"use strict";var t=e.i(56420);let r={name:"file-text",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]};r.node;let n=(0,t.default)(r);e.s(["FileText",0,n],26091)},49287,e=>{"use strict";var t=e.i(56420);let r={name:"ship",size:24,node:[["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 9.189V13",key:"yp40p3"}],["path",{d:"M19 12V6a2 2 0 00-2-2H7a2 2 0 00-2 2v6",key:"1wcigf"}],["path",{d:"M19.38 19A11.6 11.6 0 0021 13l-8.188-3.639a2 2 0 00-1.624 0L3 13.001a11.6 11.6 0 002.81 7.76",key:"1kdp0u"}],["path",{d:"M2 20c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1s1.2 1 2.5 1c2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"1l8w7g"}]]};r.node;let n=(0,t.default)(r);e.s(["Ship",0,n],49287)},22016,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return y},useLinkStatus:function(){return v}};for(var s in n)Object.defineProperty(r,s,{enumerable:!0,get:n[s]});let i=e.r(90809),a=e.r(43476),o=i._(e.r(71645)),l=e.r(95057),u=e.r(8372),c=e.r(18581),d=e.r(18967),h=e.r(5550),f=e.r(88540),p=e.r(91949),m=e.r(73668),g=e.r(9396);function y(t){var r;let n,s,i,[y,v]=(0,o.useOptimistic)(p.IDLE_LINK_STATUS),x=(0,o.useRef)(null),{href:w,as:C,children:S,prefetch:k=null,passHref:j,replace:R,shallow:E,scroll:T,onClick:O,onMouseEnter:N,onTouchStart:A,legacyBehavior:P=!1,onNavigate:M,transitionTypes:I,ref:L,unstable_dynamicOnHover:D,..._}=t;n=S,P&&("string"==typeof n||"number"==typeof n)&&(n=(0,a.jsx)("a",{children:n}));let $=o.default.useContext(u.AppRouterContext),z=!1!==k,F=!1===k?"none":!0===k?"full":"auto",q="none"!==F?"auto"===F?g.FetchStrategy.PPR:g.FetchStrategy.Full:g.FetchStrategy.PPR,B="string"==typeof(r=C||w)?r:(0,l.formatUrl)(r);if(P){if(n?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});s=o.default.Children.only(n)}let Q=P?s&&"object"==typeof s&&s.ref:L,H,U=o.default.useCallback(e=>(null!==$&&(x.current=(0,p.mountLinkInstance)(e,B,$,q,z,v,H)),()=>{x.current&&((0,p.unmountLinkForCurrentNavigation)(x.current),x.current=null),(0,p.unmountPrefetchableInstance)(e)}),[z,B,$,q,v,H]),W={ref:(0,c.useMergedRef)(U,Q),onClick(t){P||"function"!=typeof O||O(t),P&&s.props&&"function"==typeof s.props.onClick&&s.props.onClick(t),!$||t.defaultPrevented||function(t,r,n,s,i,a,l,u="none"){if("u">typeof window){let c,{nodeName:d}=t.currentTarget;if("A"===d.toUpperCase()&&((c=t.currentTarget.getAttribute("target"))&&"_self"!==c||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,m.isLocalURL)(r)){s&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),a){let e=!1;if(a({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:h}=e.r(99781);o.default.startTransition(()=>{h(r,s?"replace":"push",!1===i?f.ScrollBehavior.NoScroll:f.ScrollBehavior.Default,n.current,l,u)})}}(t,B,x,R,T,M,I,F)},onMouseEnter(e){P||"function"!=typeof N||N(e),P&&s.props&&"function"==typeof s.props.onMouseEnter&&s.props.onMouseEnter(e),$&&z&&(0,p.onNavigationIntent)(e.currentTarget,!0===D)},onTouchStart:function(e){P||"function"!=typeof A||A(e),P&&s.props&&"function"==typeof s.props.onTouchStart&&s.props.onTouchStart(e),$&&z&&(0,p.onNavigationIntent)(e.currentTarget,!0===D)}};return(0,d.isAbsoluteUrl)(B)?W.href=B:P&&!j&&("a"!==s.type||"href"in s.props)||(W.href=(0,h.addBasePath)(B)),i=P?o.default.cloneElement(s,W):(0,a.jsx)("a",{..._,...W,children:n}),(0,a.jsx)(b.Provider,{value:y,children:i})}let b=(0,o.createContext)(p.IDLE_LINK_STATUS),v=()=>(0,o.useContext)(b);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},18581,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return s}});let n=e.r(71645);function s(e,t){let r=(0,n.useRef)(null),s=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=s.current;t&&(s.current=null,t())}else e&&(r.current=i(e,n)),t&&(s.current=i(t,n))},[e,t])}function i(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},18967,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={DecodeError:function(){return y},MiddlewareNotFoundError:function(){return w},MissingStaticPage:function(){return x},NormalizeError:function(){return b},PageNotFoundError:function(){return v},SP:function(){return m},ST:function(){return g},WEB_VITALS:function(){return i},execOnce:function(){return a},getDisplayName:function(){return d},getLocationOrigin:function(){return u},getURL:function(){return c},isAbsoluteUrl:function(){return l},isResSent:function(){return h},loadGetInitialProps:function(){return p},normalizeRepeatedSlashes:function(){return f},stringifyError:function(){return C}};for(var s in n)Object.defineProperty(r,s,{enumerable:!0,get:n[s]});let i=["CLS","FCP","FID","INP","LCP","TTFB"];function a(e){let t,r=!1;return(...n)=>(r||(r=!0,t=e(...n)),t)}let o=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,l=e=>{let t=e.charCodeAt(0);return!!(t>=65&&t<=90||t>=97&&t<=122)&&o.test(e)};function u(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function c(){let{href:e}=window.location,t=u();return e.substring(t.length)}function d(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function h(e){return e.finished||e.headersSent}function f(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function p(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await p(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&h(r))return n;if(!n)throw Object.defineProperty(Error(`"${d(e)}.getInitialProps()" should resolve to an object. But found "${n}" instead.`),"__NEXT_ERROR_CODE",{value:"E1025",enumerable:!1,configurable:!0});return n}let m="u">typeof performance,g=m&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class y extends Error{}class b extends Error{}class v extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class x extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class w extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function C(e){return JSON.stringify({message:e.message,stack:e.stack})}},73668,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return i}});let n=e.r(18967),s=e.r(52817);function i(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,s.hasBasePath)(r.pathname)}catch(e){return!1}}},98183,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={assign:function(){return l},searchParamsToUrlQuery:function(){return i},urlQueryToSearchParams:function(){return o}};for(var s in n)Object.defineProperty(r,s,{enumerable:!0,get:n[s]});function i(e){let t={};for(let[r,n]of e.entries()){let e=t[r];void 0===e?t[r]=n:Array.isArray(e)?e.push(n):t[r]=[e,n]}return t}function a(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function o(e){let t=new URLSearchParams;for(let[r,n]of Object.entries(e))if(Array.isArray(n))for(let e of n)t.append(r,a(e));else t.set(r,a(n));return t}function l(e,...t){for(let r of t){for(let t of r.keys())e.delete(t);for(let[t,n]of r.entries())e.append(t,n)}return e}},95057,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return o},formatWithValidation:function(){return u},urlObjectKeys:function(){return l}};for(var s in n)Object.defineProperty(r,s,{enumerable:!0,get:n[s]});let i=e.r(90809)._(e.r(98183)),a=/https?|ftp|gopher|file/;function o(e){let{auth:t,hostname:r}=e,n=e.protocol||"",s=e.pathname||"",o=e.hash||"",l=e.query||"",u=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?u=t+e.host:r&&(u=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(u+=":"+e.port)),l&&"object"==typeof l&&(l=String(i.urlQueryToSearchParams(l)));let c=e.search||l&&`?${l}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||a.test(n))&&!1!==u?(u="//"+(u||""),s&&"/"!==s[0]&&(s="/"+s)):u||(u=""),o&&"#"!==o[0]&&(o="#"+o),c&&"?"!==c[0]&&(c="?"+c),s=s.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${n}${u}${s}${c}${o}`}let l=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function u(e){return o(e)}},24010,e=>{"use strict";var t=e.i(43476);e.s([],58762),e.i(58762);var r=e.i(66250),n=e.i(2820),s=e.i(56736),i=e.i(9793),a=e.i(84324),o=e.i(64951),l=e.i(77173);let u=e.i(13488).DialogTrigger;var c=e.i(74217),d=e.i(25326);class h extends d.DialogHandle{}e.s(["Backdrop",()=>n.DialogBackdrop,"Close",()=>s.DialogClose,"Description",()=>i.DialogDescription,"Handle",0,h,"Popup",()=>a.DialogPopup,"Portal",()=>o.DialogPortal,"Root",0,function(e){return(0,r.useRenderDialogRoot)("alert-dialog",e)},"Title",()=>l.DialogTitle,"Trigger",0,u,"Viewport",()=>c.DialogViewport,"createHandle",0,function(){return new h}],34604);var f=e.i(34604),f=f,p=e.i(90063),m=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:r,children:n,...s}){return(0,t.jsxs)(f.Portal,{children:[(0,t.jsx)(f.Backdrop,{"data-slot":"alert-dialog-overlay",className:m.dialogSurface.overlay}),(0,t.jsx)(f.Popup,{"data-slot":"alert-dialog-content",className:(0,p.classNames)(m.dialogSurface.popup({size:r}),e),...s,children:n})]})},"AlertDialogDescription",0,function({className:e,...r}){return(0,t.jsx)(f.Description,{"data-slot":"alert-dialog-description",className:(0,p.classNames)(m.dialogSurface.description,e),...r})},"AlertDialogFooter",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-footer",className:(0,p.classNames)(m.dialogSurface.footer,e),...r})},"AlertDialogHeader",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-header",className:(0,p.classNames)(m.dialogSurface.header,e),...r})},"AlertDialogTitle",0,function({className:e,...r}){return(0,t.jsx)(f.Title,{"data-slot":"alert-dialog-title",className:(0,p.classNames)(m.dialogSurface.title,e),...r})}],24010)},94859,26478,e=>{"use strict";var t=e.i(43476),r=e.i(52376),n=e.i(25913),s=e.i(49287),i=e.i(56420);let a={name:"user-round",size:24,node:[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]],aliases:["user-2"]};a.node;let o=(0,i.default)(a);e.s(["UserRound",0,o],26478);var l=e.i(90063);let u=(0,n.cva)("inline-flex shrink-0 items-center justify-center overflow-hidden font-semibold uppercase select-none",{variants:{kind:{app:"rounded-sm bg-primary text-primary-foreground",account:"rounded-full bg-secondary font-sans text-foreground",ship:"rounded-sm bg-secondary font-mono text-foreground",argo:"rounded-sm bg-highlight text-primary",retired:"rounded-sm border border-dashed border-input font-mono font-medium text-muted-foreground"},size:{20:"size-5 text-micro [&_svg]:size-3",28:"size-7 text-micro [&_svg]:size-(--size-icon-sm)",36:"size-9 text-caption [&_svg]:size-(--size-icon)"}},defaultVariants:{kind:"ship",size:28}});e.s(["Avatar",0,function({kind:e="ship",size:n,name:i="",className:a}){let c=e??"ship";return(0,t.jsx)(r.Avatar.Root,{"aria-hidden":!0,"data-slot":"avatar",className:(0,l.classNames)(u({kind:e,size:n}),a),children:(0,t.jsx)(r.Avatar.Fallback,{children:"app"===c?(0,t.jsx)(s.Ship,{"aria-hidden":!0}):"argo"===c?(0,t.jsx)(o,{"aria-hidden":!0}):i.replaceAll("-","").slice(0,2)})})}],94859)},61966,8734,e=>{"use strict";var t=e.i(43476),r=e.i(89664),n=e.i(56420);let s={name:"copy",size:24,node:[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]};s.node;let i=(0,n.default)(s);e.s(["Copy",0,i],8734);var a=e.i(71645),o=e.i(15905);e.s(["CopyButton",0,function({value:e,label:n,size:s="xs",isLabeled:l=!1,onCopied:u,onCopyFailed:c,className:d,"data-testid":h}){let[f,p]=(0,a.useState)(!1);async function m(){try{await navigator.clipboard.writeText(e)}catch{c?.();return}p(!0),u?.(),setTimeout(()=>{p(!1)},1500)}return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.Button,{variant:"ghost",size:s,isIconOnly:!l,"aria-label":n,title:l?void 0:n,icon:f?(0,t.jsx)(r.Check,{"aria-hidden":!0}):(0,t.jsx)(i,{"aria-hidden":!0}),className:d,"data-testid":h,onClick:()=>{m()},children:l?f?"Copied":"Copy":null}),(0,t.jsx)("span",{role:"status",className:"sr-only",children:f?"Copied.":""})]})}],61966)},81830,e=>{"use strict";var t=e.i(43476),r=e.i(79432),n=e.i(19002),s=e.i(11147),i=e.i(90063),a=e.i(49635),o=e.i(93361);let l={working:r.Activity,blocked:s.OctagonPause,idle:n.CirclePause},u={active:"text-tone-active-fg",waiting:"text-tone-waiting-fg",ended:"text-tone-ended-fg"};e.s(["ReportLine",0,function({report:e,now:r,variant:n,isTimeInTitle:s=!1,testId:c}){let d="full"===n,h=(0,i.classNames)("flex min-w-0 items-center gap-1.5",d?"text-body":"text-meta");if(null===e)return(0,t.jsx)("span",{"data-testid":c,"data-state":"none",className:(0,i.classNames)(h,"text-muted-foreground"),children:"No report yet"});let f=l[e.state],p=u[o.REPORT_TONES[e.state]],m=new Date(e.reportedAt);return(0,t.jsxs)("span",{"data-testid":c,"data-state":e.state,title:s?`${(0,o.reportText)(e)} \xb7 ${(0,o.reportedWhen)(m,r)}`:(0,o.reportText)(e),className:h,children:[(0,t.jsx)(f,{"aria-hidden":!0,className:(0,i.classNames)("size-(--size-icon-sm) shrink-0",p)}),(0,t.jsx)("span",{className:(0,i.classNames)("shrink-0 font-medium",p),children:o.REPORT_STATE_WORDS[e.state]}),null===e.note?null:(0,t.jsx)("span",{className:"min-w-0 truncate text-foreground",children:e.note}),s?null:(0,t.jsx)("time",{dateTime:e.reportedAt,title:(0,a.fullDateTime)(m),className:"shrink-0 text-muted-foreground tabular-nums",children:d?`\xb7 ${(0,o.reportedWhen)(m,r)}`:(0,o.reportAge)(m,r)})]})}])},39874,82880,3067,42211,e=>{"use strict";var t=e.i(43476),r=e.i(71645),n=e.i(26808),s=e.i(48695),i=e.i(15905),a=e.i(10818),o=e.i(25398),l=e.i(22212),u=e.i(94945),c=e.i(19321),d=e.i(66616),h=e.i(61966),f=e.i(60592);function p({crewLines:e,subject:n,testIdPrefix:s,onCopied:i,onCopyFailed:a}){let[o,l]=(0,r.useState)(e[0]?.harness),u=e.find(e=>e.harness===o)??e[0];if(!u)return null;let c=(0,d.crewLineHarnessWord)(u.harness);return(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-2 max-sm:flex-col max-sm:items-stretch",children:[(0,t.jsx)(f.Tabs,{value:u.harness,onValueChange:t=>{let r=e.find(e=>e.harness===t);r&&l(r.harness)},children:(0,t.jsx)(f.TabsList,{"aria-label":`Crew ${n} from`,children:e.map(e=>(0,t.jsx)(f.TabsTrigger,{value:e.harness,"data-testid":`${s}-${e.harness}-tab`,children:(0,d.crewLineHarnessWord)(e.harness)},e.harness))})}),(0,t.jsx)("code",{"data-testid":`${s}-${u.harness}`,title:u.line,className:"min-w-0 grow truncate rounded-md bg-muted px-2 py-1 font-mono text-code text-foreground",children:u.line}),(0,t.jsx)(h.CopyButton,{value:u.line,label:`Copy the ${c} crew line for ${n}`,isLabeled:!0,onCopied:i,onCopyFailed:a,"data-testid":`${s}-${u.harness}-copy`})]})}e.s(["CompactCrewLine",0,p],82880);var m=e.i(17981),g=e.i(26091);function y({note:e,model:r,template:n,testId:s}){return null===e&&null===r?null:(0,t.jsxs)("div",{className:"flex items-start gap-2 rounded-md bg-muted px-3 py-2 text-meta",children:[(0,t.jsx)(g.FileText,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon-sm) shrink-0 text-muted-foreground"}),(0,t.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,t.jsxs)("span",{className:"text-muted-foreground",children:["Launch note",void 0===n?"":` \xb7 ${n}`]}),null!==e&&(0,t.jsx)("span",{"data-testid":s,children:e}),null!==r&&(0,t.jsxs)("span",{children:["Runs ",(0,t.jsx)("span",{className:"font-mono",children:r})]})]})]})}function b({memberName:e,template:r,launchNote:n,model:s,crewLines:i}){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(y,{note:n,model:s,template:r,testId:"crew-line-launch-note"}),(0,t.jsx)(p,{crewLines:i,subject:e,testIdPrefix:"crew-line-text"}),(0,t.jsxs)("p",{className:"flex items-center gap-1.5 text-meta text-muted-foreground",children:[(0,t.jsx)(a.Info,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0"}),(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"font-medium",children:"Shown once."})," Paste the crew line into Claude Code or Codex started where the launch note says, or into a chat client with the fleet’s connector. A new crew line stops it working."]})]})]})}function v({memberName:e,state:r,template:n,launchNote:s=null,model:a=null,crewLines:d,error:h,isOpen:f,onOpenChange:p,onConfirm:g}){let y="issuing"===r;return(0,t.jsx)(l.Dialog,{open:f,onOpenChange:e=>{y||p(e)},children:(0,t.jsxs)(l.DialogContent,{size:"md","data-testid":"crew-line-dialog",className:u.dialogSurface.phoneFullScreen,children:[(0,t.jsxs)(l.DialogHeader,{children:[(0,t.jsxs)(l.DialogTitle,{children:["Crew line for ",e]}),(0,t.jsx)(l.DialogDescription,{children:"Start Claude Code or Codex where the launch note says, or open a chat client with the fleet’s connector, then paste its crew line. The member is on station once its session checks in."})]}),y&&(0,t.jsxs)("div",{"aria-busy":!0,className:"flex flex-col gap-3",children:[(0,t.jsx)("span",{className:"sr-only",children:"Issuing a crew line..."}),(0,t.jsx)(c.Skeleton,{className:"h-10 w-full rounded-lg"}),(0,t.jsx)(c.Skeleton,{className:"h-28 w-full rounded-lg"})]}),"shown"===r&&void 0!==d&&(0,t.jsx)(b,{memberName:e,template:n,launchNote:s,model:a,crewLines:d}),"error"===r&&(0,t.jsx)(m.InlineError,{title:"Couldn’t issue a crew line",description:`${h??"The squadron manager did not answer."} No new secret was created; an earlier crew line still works.`}),(0,t.jsxs)(l.DialogFooter,{children:[("shown"===r||y)&&(0,t.jsx)(l.DialogClose,{render:(0,t.jsx)(i.Button,{variant:"primary","data-testid":"crew-line-done",disabled:y}),children:"Done"}),"error"===r&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(l.DialogClose,{render:(0,t.jsx)(i.Button,{}),children:"Close"}),(0,t.jsx)(i.Button,{variant:"primary",icon:(0,t.jsx)(o.RotateCw,{"aria-hidden":!0}),"data-testid":"crew-line-retry",onClick:g,children:"Try again"})]})]})]})})}e.s(["LaunchNote",0,y],3067),e.s(["CrewLineDialog",0,v],42211);var x=e.i(24010);function w({memberName:e,replacedText:r,isOpen:n,onOpenChange:s,onConfirm:a}){return(0,t.jsx)(x.AlertDialog,{open:n,onOpenChange:s,children:(0,t.jsxs)(x.AlertDialogContent,{"data-testid":"new-crew-line-confirm",className:u.dialogSurface.phoneSheet,children:[(0,t.jsxs)(x.AlertDialogHeader,{children:[(0,t.jsxs)(x.AlertDialogTitle,{children:["Get a new crew line for ",e,"?"]}),(0,t.jsx)(x.AlertDialogDescription,{children:r??"Its new secret is shown once, with its launch note."})]}),(0,t.jsxs)(x.AlertDialogFooter,{children:[(0,t.jsx)(x.AlertDialogClose,{render:(0,t.jsx)(i.Button,{}),children:"Cancel"}),(0,t.jsx)(i.Button,{variant:"primary","data-testid":"new-crew-line-confirm-submit",onClick:a,children:"Get new crew line"})]})]})})}function C(e){let i=(0,s.useNewCrewLine)(),[a,o]=(0,r.useState)(!1),[l,u]=(0,r.useState)(!1),[c,d]=(0,r.useState)(void 0),h=()=>{e&&i.mutate({squadronId:e.squadronId,shipId:e.member.shipId})},f=i.data?"shown":i.isError?"error":"issuing";return{isReady:e?.ship!==void 0,start:()=>{e?.ship&&(i.reset(),d((0,n.newCrewLineReplaced)(e.ship)),u(!0))},dialog:e?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(w,{memberName:e.member.name,replacedText:c,isOpen:l,onOpenChange:u,onConfirm:()=>{u(!1),o(!0),h()}}),(0,t.jsx)(v,{memberName:e.member.name,state:f,template:e.template,launchNote:i.data?.launchNote,model:i.data?.model,crewLines:i.data?.crewLines,error:i.error?.message,isOpen:a,onOpenChange:e=>{o(e),e||i.reset()},onConfirm:h})]}):null}}e.s(["GetNewCrewLine",0,function({isPrimary:e=!1,testId:r,...n}){let s=C(n);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.Button,{size:"xs",variant:e?"primary":"secondary",disabled:!s.isReady,"data-testid":r,onClick:s.start,children:"Get new crew line"}),s.dialog]})},"useNewCrewLineFlow",0,C],39874)},66616,e=>{"use strict";let t={"claude-code":{word:"Claude Code",kind:"coding"},codex:{word:"Codex",kind:"coding"},"claude-chat":{word:"Claude chat",kind:"chat"},chatgpt:{word:"ChatGPT",kind:"chat"},grok:{word:"Grok",kind:"chat"},grokbot:{word:"Grokbot",kind:"bot"},console:{word:"Console",kind:"console"}};function r(e){return t[e]?.word??e}e.s(["crewLineHarnessWord",0,function(e){return"chat"===e?"Chat":r(e)},"harnessKind",0,function(e){return t[e]?.kind},"harnessWord",0,r])},93361,e=>{"use strict";e.i(31627);var t=e.i(94661),r=e.i(49635);let n={working:"Working",blocked:"Blocked",idle:"Idle"};e.s(["REPORT_STATE_WORDS",0,n,"REPORT_TONES",0,{working:"active",blocked:"waiting",idle:"ended"},"reportAge",0,function(e,t){let n=Math.max(0,t.getTime()-e.getTime());return n<6e4?`${String(Math.floor(n/1e3))} s`:n<36e5?`${String(Math.floor(n/6e4))} min`:n<864e5?`${String(Math.floor(n/36e5))} h`:(0,r.relativeTime)(e,t)},"reportDetailsJson",0,function(e){return JSON.stringify(e,null,2)},"reportDetailsLabel",0,function(e){return`JSON \xb7 ${String((0,t.reportDetailsBytes)(e))} bytes`},"reportText",0,function(e){let t=n[e.state];return null===e.note?t:`${t}: ${e.note}`},"reportedWhen",0,function(e,t){let n=(0,r.relativeTime)(e,t);return`reported ${"Just now"===n?"just now":n}`}])},26808,e=>{"use strict";var t=e.i(46150);let r={one:"delivery",many:"deliveries"};function n(e){if(0===e)return"Nothing is in flight, so no delivery moves.";let r=1===e?"returns":"return";return`${(0,t.counted)(e,{one:"in-flight delivery",many:"in-flight deliveries"})} ${r} to pending. Nothing is lost.`}e.s(["abandonedLine",0,function(e){return`${(0,t.counted)(e,r)} will be abandoned`},"inFlightLine",0,n,"isTypedMatch",0,function(e,t){return t===e},"newCrewLineReplaced",0,function(e){if("crewed"===e.status){let t=null===e.location?"the session crewing it":`the session on ${e.location.description??e.location.kind.toLowerCase()}`;return`This ends ${t}. ${n(e.inFlightDeliveries)}`}if(null!==e.startingPrompt&&!e.startingPrompt.isClaimed)return"The crew line issued earlier, not claimed yet, stops working."},"retireButtonLabel",0,function(e){return 0===e?"Retire ship":`Retire and abandon ${(0,t.counted)(e,r)}`}])},53573,e=>{"use strict";e.i(31627);var t=e.i(83615),r=e.i(19273),n=e.i(12598),s=e.i(81384),i=e.i(73664),a=e.i(27001),o=e.i(54440),l=e.i(71645),u=e.i(15823),c=e.i(40143),d=e.i(69230);function h(e,t){let r=new Set(t);return e.filter(e=>!r.has(e))}var f=class extends u.Subscribable{#e;#t;#r;#n;#s;#i;#a;#o;#l;#u=[];constructor(e,t,r){super(),this.#e=e,this.#n=r,this.#r=[],this.#s=[],this.#t=[],this.setQueries(t)}onSubscribe(){1===this.listeners.size&&this.#s.forEach(e=>{e.subscribe(t=>{this.#c(e,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#s.forEach(e=>{e.destroy()})}setQueries(e,t){this.#r=e,this.#n=t,c.notifyManager.batch(()=>{let e=this.#s,t=this.#d(this.#r);t.forEach(e=>e.observer.setOptions(e.defaultedQueryOptions));let n=t.map(e=>e.observer),s=n.map(e=>e.getCurrentResult()),i=e.length!==n.length,a=n.some((t,r)=>t!==e[r]),o=i||a,l=!!o||s.some((e,t)=>{let n=this.#t[t];return!n||!(0,r.shallowEqualObjects)(e,n)});(o||l)&&(o&&(this.#u=t,this.#s=n),this.#t=s,this.hasListeners()&&(o&&(h(e,n).forEach(e=>{e.destroy()}),h(n,e).forEach(e=>{e.subscribe(t=>{this.#c(e,t)})})),this.#h()))})}getCurrentResult(){return this.#t}getQueries(){return this.#s.map(e=>e.getCurrentQuery())}getObservers(){return this.#s}getOptimisticResult(e,t){let r=this.#d(e),n=r.map(e=>e.observer.getOptimisticResult(e.defaultedQueryOptions)),s=r.map(e=>e.defaultedQueryOptions.queryHash);return[n,e=>this.#f(e??n,t,s),()=>this.#p(n,r)]}#p(e,t){let r=new Set;return t.map((n,s)=>{let i=e[s];return n.defaultedQueryOptions.notifyOnChangeProps?i:n.observer.trackResult(i,e=>{r.has(e)||(r.add(e),t.forEach(t=>{t.observer.trackProp(e)}))})})}#f(e,t,n){if(t){let s=this.#l,i=void 0!==n&&void 0!==s&&(s.length!==n.length||n.some((e,t)=>e!==s[t]));return(this.#t!==this.#o||i||t!==this.#a)&&(this.#a=t,this.#o=this.#t,void 0!==n&&(this.#l=n),this.#i=(0,r.replaceEqualDeep)(this.#i,t(e))),this.#i}return e}#m(){return!this.#n?.combine||this.#s.some((e,t)=>e.options.suspense&&this.#t[t]?.data===void 0)}#d(e){let t=new Map;this.#s.forEach(e=>{let r=e.options.queryHash;if(!r)return;let n=t.get(r);n?n.push(e):t.set(r,[e])});let r=[];return e.forEach(e=>{let n=this.#e.defaultQueryOptions(e),s=t.get(n.queryHash)?.shift()??new d.QueryObserver(this.#e,n);r.push({defaultedQueryOptions:n,observer:s})}),r}#c(e,t){let r=this.#s.indexOf(e);-1!==r&&(this.#t=this.#t.slice(),this.#t[r]=t,this.#h())}#h(){if(this.hasListeners()){let e=this.#m(),t=this.#i,r=e?t:this.#f(this.#p(this.#t,this.#u),this.#n?.combine);(e||t!==r)&&c.notifyManager.batch(()=>{this.listeners.forEach(e=>{e(this.#t)})})}}},p=e.i(66027),m=e.i(5387),g=e.i(27702);e.s(["useMessage",0,function(e){let t=(0,g.useTRPC)();return(0,p.useQuery)(t.fleet.message.queryOptions(void 0===e?r.skipToken:{messageId:e}))},"useShip",0,function(e){let t=(0,g.useTRPC)();return(0,p.useQuery)(t.fleet.ship.queryOptions(void 0===e?r.skipToken:{shipId:e},{refetchInterval:m.LAST_SEEN_REFRESH_MS}))},"useShipMessages",0,function(e){let t=(0,g.useTRPC)();return(0,p.useQuery)(t.fleet.shipMessages.queryOptions({shipId:e}))},"useShipTimeline",0,function(e){let t=(0,g.useTRPC)();return(0,p.useQuery)(t.fleet.shipTimeline.queryOptions({shipId:e}))},"useShips",0,function(e){let u=(0,g.useTRPC)(),h=function({queries:e,...t}){let u=(0,n.useQueryClient)(void 0),h=(0,s.useIsRestoring)(),p=(0,i.useQueryErrorResetBoundary)(),m=!1!==t.subscribed,g=l.useMemo(()=>e.map(e=>{let t=u.defaultQueryOptions(e);return t._optimisticResults=h?"isRestoring":m?"optimistic":void 0,t}),[e,u,h,m]);g.forEach(e=>{(0,o.ensureSuspenseTimers)(e);let t=u.getQueryCache().get(e.queryHash);(0,a.ensurePreventErrorBoundaryRetry)(e,p,t)}),(0,a.useClearResetErrorBoundary)(p);let[y]=l.useState(()=>new f(u,g,t)),[b,v,x]=y.getOptimisticResult(g,t.combine),w=!h&&m;l.useSyncExternalStore(l.useCallback(e=>w?y.subscribe(c.notifyManager.batchCalls(e)):r.noop,[y,w]),()=>y.getCurrentResult(),()=>y.getCurrentResult()),l.useEffect(()=>{y.setQueries(g,t)},[g,t,y]);let C=b.some((e,t)=>(0,o.shouldSuspend)(g[t],e))?b.flatMap((e,t)=>{let r=g[t];if(r&&(0,o.shouldSuspend)(r,e)){let e=new d.QueryObserver(u,r);return(0,o.fetchOptimistic)(r,e,p)}return[]}):[];if(C.length>0)throw Promise.all(C);let S=b.find((e,t)=>{let r=g[t];return r&&(0,a.getHasError)({result:e,errorResetBoundary:p,throwOnError:r.throwOnError,query:u.getQueryCache().get(r.queryHash),suspense:r.suspense})});if(S)throw S.error;return v(x())}({queries:e.flatMap(e=>{let r=(0,t.idSchema)("ship").safeParse(e);return r.success?[r.data]:[]}).map(e=>u.fleet.ship.queryOptions({shipId:e},{refetchInterval:m.LAST_SEEN_REFRESH_MS}))}),p=new Map;for(let e of h)e.data&&p.set(e.data.id,e.data);return p}],53573)}]);
|