@aeolus-fleet/console 0.38.0 → 0.38.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.
Files changed (400) hide show
  1. package/.next/standalone/packages/console/.next/BUILD_ID +1 -1
  2. package/.next/standalone/packages/console/.next/build-manifest.json +3 -3
  3. package/.next/standalone/packages/console/.next/prerender-manifest.json +3 -3
  4. package/.next/standalone/packages/console/.next/server/app/(console)/fleet-health/[cause]/page/server-reference-manifest.json +16 -16
  5. package/.next/standalone/packages/console/.next/server/app/(console)/fleet-health/[cause]/page.js.nft.json +1 -1
  6. package/.next/standalone/packages/console/.next/server/app/(console)/fleet-health/[cause]/page_client-reference-manifest.js +1 -1
  7. package/.next/standalone/packages/console/.next/server/app/(console)/fleet-health/page/server-reference-manifest.json +16 -16
  8. package/.next/standalone/packages/console/.next/server/app/(console)/fleet-health/page.js.nft.json +1 -1
  9. package/.next/standalone/packages/console/.next/server/app/(console)/fleet-health/page_client-reference-manifest.js +1 -1
  10. package/.next/standalone/packages/console/.next/server/app/(console)/inbox/page/server-reference-manifest.json +16 -16
  11. package/.next/standalone/packages/console/.next/server/app/(console)/inbox/page.js.nft.json +1 -1
  12. package/.next/standalone/packages/console/.next/server/app/(console)/inbox/page_client-reference-manifest.js +1 -1
  13. package/.next/standalone/packages/console/.next/server/app/(console)/labels/page/server-reference-manifest.json +16 -16
  14. package/.next/standalone/packages/console/.next/server/app/(console)/labels/page.js.nft.json +1 -1
  15. package/.next/standalone/packages/console/.next/server/app/(console)/labels/page_client-reference-manifest.js +1 -1
  16. package/.next/standalone/packages/console/.next/server/app/(console)/messages/[messageId]/page/server-reference-manifest.json +16 -16
  17. package/.next/standalone/packages/console/.next/server/app/(console)/messages/[messageId]/page.js.nft.json +1 -1
  18. package/.next/standalone/packages/console/.next/server/app/(console)/messages/[messageId]/page_client-reference-manifest.js +1 -1
  19. package/.next/standalone/packages/console/.next/server/app/(console)/needs-attention/page/server-reference-manifest.json +16 -16
  20. package/.next/standalone/packages/console/.next/server/app/(console)/needs-attention/page.js.nft.json +1 -1
  21. package/.next/standalone/packages/console/.next/server/app/(console)/needs-attention/page_client-reference-manifest.js +1 -1
  22. package/.next/standalone/packages/console/.next/server/app/(console)/needs-crew/page/server-reference-manifest.json +16 -16
  23. package/.next/standalone/packages/console/.next/server/app/(console)/needs-crew/page.js.nft.json +1 -1
  24. package/.next/standalone/packages/console/.next/server/app/(console)/needs-crew/page_client-reference-manifest.js +1 -1
  25. package/.next/standalone/packages/console/.next/server/app/(console)/network/page/react-loadable-manifest.json +1 -1
  26. package/.next/standalone/packages/console/.next/server/app/(console)/network/page/server-reference-manifest.json +16 -16
  27. package/.next/standalone/packages/console/.next/server/app/(console)/network/page.js.nft.json +1 -1
  28. package/.next/standalone/packages/console/.next/server/app/(console)/network/page_client-reference-manifest.js +1 -1
  29. package/.next/standalone/packages/console/.next/server/app/(console)/page/react-loadable-manifest.json +1 -1
  30. package/.next/standalone/packages/console/.next/server/app/(console)/page/server-reference-manifest.json +16 -16
  31. package/.next/standalone/packages/console/.next/server/app/(console)/page.js.nft.json +1 -1
  32. package/.next/standalone/packages/console/.next/server/app/(console)/page_client-reference-manifest.js +1 -1
  33. package/.next/standalone/packages/console/.next/server/app/(console)/scopes/page/server-reference-manifest.json +16 -16
  34. package/.next/standalone/packages/console/.next/server/app/(console)/scopes/page.js.nft.json +1 -1
  35. package/.next/standalone/packages/console/.next/server/app/(console)/scopes/page_client-reference-manifest.js +1 -1
  36. package/.next/standalone/packages/console/.next/server/app/(console)/sealing/page/server-reference-manifest.json +16 -16
  37. package/.next/standalone/packages/console/.next/server/app/(console)/sealing/page.js.nft.json +1 -1
  38. package/.next/standalone/packages/console/.next/server/app/(console)/sealing/page_client-reference-manifest.js +1 -1
  39. package/.next/standalone/packages/console/.next/server/app/(console)/settings/page/server-reference-manifest.json +16 -16
  40. package/.next/standalone/packages/console/.next/server/app/(console)/settings/page.js.nft.json +1 -1
  41. package/.next/standalone/packages/console/.next/server/app/(console)/settings/page_client-reference-manifest.js +1 -1
  42. package/.next/standalone/packages/console/.next/server/app/(console)/ships/[shipId]/page/react-loadable-manifest.json +1 -1
  43. package/.next/standalone/packages/console/.next/server/app/(console)/ships/[shipId]/page/server-reference-manifest.json +16 -16
  44. package/.next/standalone/packages/console/.next/server/app/(console)/ships/[shipId]/page.js.nft.json +1 -1
  45. package/.next/standalone/packages/console/.next/server/app/(console)/ships/[shipId]/page_client-reference-manifest.js +1 -1
  46. package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/[squadronId]/page/server-reference-manifest.json +16 -16
  47. package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/[squadronId]/page.js.nft.json +1 -1
  48. package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/[squadronId]/page_client-reference-manifest.js +1 -1
  49. package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/blueprints/[name]/page/react-loadable-manifest.json +2 -2
  50. package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/blueprints/[name]/page/server-reference-manifest.json +16 -16
  51. package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/blueprints/[name]/page.js.nft.json +1 -1
  52. package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/blueprints/[name]/page_client-reference-manifest.js +1 -1
  53. package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/page/react-loadable-manifest.json +1 -1
  54. package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/page/server-reference-manifest.json +16 -16
  55. package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/page.js.nft.json +1 -1
  56. package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/page_client-reference-manifest.js +1 -1
  57. package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/templates/[name]/page/server-reference-manifest.json +16 -16
  58. package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/templates/[name]/page.js.nft.json +1 -1
  59. package/.next/standalone/packages/console/.next/server/app/(console)/squadrons/templates/[name]/page_client-reference-manifest.js +1 -1
  60. package/.next/standalone/packages/console/.next/server/app/(console)/trierarchs/[shipId]/page/server-reference-manifest.json +16 -16
  61. package/.next/standalone/packages/console/.next/server/app/(console)/trierarchs/[shipId]/page.js.nft.json +1 -1
  62. package/.next/standalone/packages/console/.next/server/app/(console)/trierarchs/[shipId]/page_client-reference-manifest.js +1 -1
  63. package/.next/standalone/packages/console/.next/server/app/(console)/trierarchs/page/server-reference-manifest.json +16 -16
  64. package/.next/standalone/packages/console/.next/server/app/(console)/trierarchs/page.js.nft.json +1 -1
  65. package/.next/standalone/packages/console/.next/server/app/(console)/trierarchs/page_client-reference-manifest.js +1 -1
  66. package/.next/standalone/packages/console/.next/server/app/(console)/usage/page/server-reference-manifest.json +16 -16
  67. package/.next/standalone/packages/console/.next/server/app/(console)/usage/page.js.nft.json +1 -1
  68. package/.next/standalone/packages/console/.next/server/app/(console)/usage/page_client-reference-manifest.js +1 -1
  69. package/.next/standalone/packages/console/.next/server/app/_global-error.html +1 -1
  70. package/.next/standalone/packages/console/.next/server/app/_global-error.rsc +1 -1
  71. package/.next/standalone/packages/console/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  72. package/.next/standalone/packages/console/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  73. package/.next/standalone/packages/console/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  74. package/.next/standalone/packages/console/.next/server/app/_not-found/page.js.nft.json +1 -1
  75. package/.next/standalone/packages/console/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  76. package/.next/standalone/packages/console/.next/server/app/api/analytics/route.js.nft.json +1 -1
  77. package/.next/standalone/packages/console/.next/server/app/api/reads/[read]/route.js.nft.json +1 -1
  78. package/.next/standalone/packages/console/.next/server/app/api/reports/[procedure]/route.js.nft.json +1 -1
  79. package/.next/standalone/packages/console/.next/server/app/icon.svg/route.js.nft.json +1 -1
  80. package/.next/standalone/packages/console/.next/server/app/icon.svg.body +1 -19
  81. package/.next/standalone/packages/console/.next/server/app/sign-in/argo/confirm/page.js +1 -1
  82. package/.next/standalone/packages/console/.next/server/app/sign-in/argo/confirm/page.js.nft.json +1 -1
  83. package/.next/standalone/packages/console/.next/server/app/sign-in/argo/confirm/page_client-reference-manifest.js +1 -1
  84. package/.next/standalone/packages/console/.next/server/app/sign-in/argo/out/route.js.nft.json +1 -1
  85. package/.next/standalone/packages/console/.next/server/app/sign-in/argo/refused/page.js +1 -1
  86. package/.next/standalone/packages/console/.next/server/app/sign-in/argo/refused/page.js.nft.json +1 -1
  87. package/.next/standalone/packages/console/.next/server/app/sign-in/argo/refused/page_client-reference-manifest.js +1 -1
  88. package/.next/standalone/packages/console/.next/server/app/sign-in/argo/route.js.nft.json +1 -1
  89. package/.next/standalone/packages/console/.next/server/app/sign-in/done/route.js.nft.json +1 -1
  90. package/.next/standalone/packages/console/.next/server/app/sign-in/enter/route.js.nft.json +1 -1
  91. package/.next/standalone/packages/console/.next/server/app/sign-in/failed/page.js +1 -1
  92. package/.next/standalone/packages/console/.next/server/app/sign-in/failed/page.js.nft.json +1 -1
  93. package/.next/standalone/packages/console/.next/server/app/sign-in/failed/page_client-reference-manifest.js +1 -1
  94. package/.next/standalone/packages/console/.next/server/app/sign-in/no-rights/page.js +1 -1
  95. package/.next/standalone/packages/console/.next/server/app/sign-in/no-rights/page.js.nft.json +1 -1
  96. package/.next/standalone/packages/console/.next/server/app/sign-in/no-rights/page_client-reference-manifest.js +1 -1
  97. package/.next/standalone/packages/console/.next/server/app/sign-in/nothing-to-manage/page.js +1 -1
  98. package/.next/standalone/packages/console/.next/server/app/sign-in/nothing-to-manage/page.js.nft.json +1 -1
  99. package/.next/standalone/packages/console/.next/server/app/sign-in/nothing-to-manage/page_client-reference-manifest.js +1 -1
  100. package/.next/standalone/packages/console/.next/server/app/sign-in/out/route.js.nft.json +1 -1
  101. package/.next/standalone/packages/console/.next/server/app/sign-in/page.js +1 -1
  102. package/.next/standalone/packages/console/.next/server/app/sign-in/page.js.nft.json +1 -1
  103. package/.next/standalone/packages/console/.next/server/app/sign-in/page_client-reference-manifest.js +1 -1
  104. package/.next/standalone/packages/console/.next/server/app/sign-in/renew/route.js.nft.json +1 -1
  105. package/.next/standalone/packages/console/.next/server/app/sign-in/start/route.js.nft.json +1 -1
  106. package/.next/standalone/packages/console/.next/server/app/sign-in/unreachable/page.js +1 -1
  107. package/.next/standalone/packages/console/.next/server/app/sign-in/unreachable/page.js.nft.json +1 -1
  108. package/.next/standalone/packages/console/.next/server/app/sign-in/unreachable/page_client-reference-manifest.js +1 -1
  109. package/.next/standalone/packages/console/.next/server/app/version/route.js.nft.json +1 -1
  110. package/.next/standalone/packages/console/.next/server/chunks/_0j51ax68tkdi6._.js +3 -3
  111. package/.next/standalone/packages/console/.next/server/chunks/_0mfcng-1kq60t._.js +3 -3
  112. package/.next/standalone/packages/console/.next/server/chunks/_0s8mmswij9w-7._.js +3 -3
  113. package/.next/standalone/packages/console/.next/server/chunks/_15m2__j0o3bqs._.js +3 -3
  114. package/.next/standalone/packages/console/.next/server/chunks/_160ve7-a8_ywq._.js +3 -3
  115. package/.next/standalone/packages/console/.next/server/chunks/_17v26e_vrh6wu._.js +2 -2
  116. package/.next/standalone/packages/console/.next/server/chunks/_1nioma4g1tzvq._.js +3 -3
  117. package/.next/standalone/packages/console/.next/server/chunks/_1uqphllhxbl0-._.js +1 -1
  118. package/.next/standalone/packages/console/.next/server/chunks/packages_console_1wbjk69aa7h5_._.js +1 -1
  119. package/.next/standalone/packages/console/.next/server/chunks/ssr/0ysl_console_features_sealing_ui_organisms_recovery-key-dialog_tsx_204uv3qc_9c4e._.js +1 -1
  120. package/.next/standalone/packages/console/.next/server/chunks/ssr/0ysl_console_features_sealing_ui_organisms_turn-on-sealing-dialog_tsx_1_oe0ddt94p4c._.js +1 -1
  121. package/.next/standalone/packages/console/.next/server/chunks/ssr/0ysl_console_features_squadrons_ui_organisms_form-squadron-dialog_tsx_00objgim-e_v8._.js +1 -1
  122. package/.next/standalone/packages/console/.next/server/chunks/ssr/{0ysl_console_features_squadrons_ui_organisms_form-squadron-dialog_tsx_06chyznp1xh13._.js → 0ysl_console_features_squadrons_ui_organisms_form-squadron-dialog_tsx_0klw98ylb69qz._.js} +1 -1
  123. package/.next/standalone/packages/console/.next/server/chunks/ssr/0ysl_console_features_trierarchs_ui_organisms_join-machine-dialog_tsx_1yfk-eixp7pzp._.js +1 -1
  124. package/.next/standalone/packages/console/.next/server/chunks/ssr/1eui_features_sealing_ui_organisms_change-company-key-dialog_tsx_1zywkgni4cob3._.js +1 -1
  125. package/.next/standalone/packages/console/.next/server/chunks/ssr/[root-of-the-server]__001u9thorv7dn._.js +1 -1
  126. package/.next/standalone/packages/console/.next/server/chunks/ssr/[root-of-the-server]__01rcz7b9clnuh._.js +1 -1
  127. package/.next/standalone/packages/console/.next/server/chunks/ssr/[root-of-the-server]__03lusz6nloa4-._.js +1 -1
  128. package/.next/standalone/packages/console/.next/server/chunks/ssr/[root-of-the-server]__07b8_xu9imau7._.js +1 -1
  129. package/.next/standalone/packages/console/.next/server/chunks/ssr/[root-of-the-server]__08paotevwfn5m._.js +1 -1
  130. package/.next/standalone/packages/console/.next/server/chunks/ssr/[root-of-the-server]__08q3gavag3r8u._.js +1 -1
  131. package/.next/standalone/packages/console/.next/server/chunks/ssr/[root-of-the-server]__0h8juwcrh-vue._.js +1 -1
  132. package/.next/standalone/packages/console/.next/server/chunks/ssr/[root-of-the-server]__0hboyqcvqq0d_._.js +1 -1
  133. package/.next/standalone/packages/console/.next/server/chunks/ssr/[root-of-the-server]__0jntv2z3f0tpv._.js +1 -1
  134. package/.next/standalone/packages/console/.next/server/chunks/ssr/[root-of-the-server]__0nz9k_-gcqqxl._.js +1 -1
  135. package/.next/standalone/packages/console/.next/server/chunks/ssr/[root-of-the-server]__0sj9-5vm3d3_w._.js +1 -1
  136. package/.next/standalone/packages/console/.next/server/chunks/ssr/[root-of-the-server]__0xps-mnt5mlta._.js +1 -1
  137. package/.next/standalone/packages/console/.next/server/chunks/ssr/[root-of-the-server]__0xrg6kke92m41._.js +1 -1
  138. package/.next/standalone/packages/console/.next/server/chunks/ssr/[root-of-the-server]__1-_z4vi2pf-d7._.js +1 -1
  139. package/.next/standalone/packages/console/.next/server/chunks/ssr/[root-of-the-server]__17vl6ufd7t_u4._.js +1 -1
  140. package/.next/standalone/packages/console/.next/server/chunks/ssr/[root-of-the-server]__1f4i69_v2ahv3._.js +1 -1
  141. package/.next/standalone/packages/console/.next/server/chunks/ssr/[root-of-the-server]__1j3mh4ybq6s1-._.js +1 -1
  142. package/.next/standalone/packages/console/.next/server/chunks/ssr/[root-of-the-server]__1nzfmvj3zx0c6._.js +1 -1
  143. package/.next/standalone/packages/console/.next/server/chunks/ssr/[root-of-the-server]__1ovtyb8ttxb9v._.js +1 -1
  144. package/.next/standalone/packages/console/.next/server/chunks/ssr/[root-of-the-server]__1ram8u5ey1i5i._.js +1 -1
  145. package/.next/standalone/packages/console/.next/server/chunks/ssr/[root-of-the-server]__1zpkntnj7z-ql._.js +1 -1
  146. package/.next/standalone/packages/console/.next/server/chunks/ssr/[root-of-the-server]__206zswweppwie._.js +1 -1
  147. package/.next/standalone/packages/console/.next/server/chunks/ssr/_00vq1s3l3frwq._.js +3 -0
  148. package/.next/standalone/packages/console/.next/server/chunks/ssr/_0a5k9_pc_guhs._.js +1 -1
  149. package/.next/standalone/packages/console/.next/server/chunks/ssr/_0c57degb72f92._.js +3 -0
  150. package/.next/standalone/packages/console/.next/server/chunks/ssr/_0dskyctgdsq3u._.js +3 -0
  151. package/.next/standalone/packages/console/.next/server/chunks/ssr/_0hm9hjgqi_mms._.js +3 -0
  152. package/.next/standalone/packages/console/.next/server/chunks/ssr/{_1ylp9c-1_6qwe._.js → _0mc-_qsi-c-f1._.js} +2 -2
  153. package/.next/standalone/packages/console/.next/server/chunks/ssr/_0p_vpwtaka264._.js +3 -0
  154. package/.next/standalone/packages/console/.next/server/chunks/ssr/{_1ifp6lpdfmr7h._.js → _0s1h2iasv4duo._.js} +2 -2
  155. package/.next/standalone/packages/console/.next/server/chunks/ssr/_0ulikmhssjzfp._.js +3 -0
  156. package/.next/standalone/packages/console/.next/server/chunks/ssr/_0wo7e7auz11u_._.js +1 -1
  157. package/.next/standalone/packages/console/.next/server/chunks/ssr/{_1zg14d_1y3cdb._.js → _11376ehlub2k_._.js} +2 -2
  158. package/.next/standalone/packages/console/.next/server/chunks/ssr/_11z24bvk8dqor._.js +3 -0
  159. package/.next/standalone/packages/console/.next/server/chunks/ssr/_13wtf_novu5yx._.js +3 -0
  160. package/.next/standalone/packages/console/.next/server/chunks/ssr/_1bc8get8bkd3e._.js +1 -1
  161. package/.next/standalone/packages/console/.next/server/chunks/ssr/_1i7gtp3zic4lw._.js +3 -0
  162. package/.next/standalone/packages/console/.next/server/chunks/ssr/_1mxet3aex12oj._.js +3 -0
  163. package/.next/standalone/packages/console/.next/server/chunks/ssr/_1ojt05a6l_zs-._.js +3 -0
  164. package/.next/standalone/packages/console/.next/server/chunks/ssr/{_16yobizsdeqkp._.js → _1s2rn6y67eo65._.js} +1 -1
  165. package/.next/standalone/packages/console/.next/server/chunks/ssr/_1u0h4gj3mw97-._.js +1 -1
  166. package/.next/standalone/packages/console/.next/server/chunks/ssr/_1vgth0ym958bt._.js +3 -0
  167. package/.next/standalone/packages/console/.next/server/chunks/ssr/{_0712mzvomkz8n._.js → _1vtht2v0z0czn._.js} +2 -2
  168. package/.next/standalone/packages/console/.next/server/chunks/ssr/_1x3_77ihd0brj._.js +3 -0
  169. package/.next/standalone/packages/console/.next/server/chunks/ssr/_1ycy_-zmvf8r8._.js +3 -0
  170. package/.next/standalone/packages/console/.next/server/chunks/ssr/{node_modules_0ef24z728bst4._.js → node_modules_0vk0lrat-_wte._.js} +2 -2
  171. package/.next/standalone/packages/console/.next/server/chunks/ssr/node_modules_1kv95l0wdyf-u._.js +3 -0
  172. package/.next/standalone/packages/console/.next/server/chunks/ssr/node_modules_@tanstack_query-core_build_modern_queryClient_0eerhjzvdpmr5.js +3 -0
  173. package/.next/standalone/packages/console/.next/server/chunks/ssr/node_modules_zod_v4_classic_external_20o8zjcmwg7n9.js +3 -3
  174. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_0-k7onmx73di2._.js +3 -0
  175. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_000ibw8apr1sq._.js +3 -0
  176. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_00uzv_v-d7tyu._.js +3 -0
  177. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_08clfi8fv3bxg._.js +3 -0
  178. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_0e0rreuj-sndc._.js +3 -0
  179. package/.next/standalone/packages/console/.next/server/chunks/ssr/{packages_0-d4epz5whhyy._.js → packages_0f1vg_-aumhjb._.js} +2 -2
  180. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_0ohfyl-6q03tu._.js +3 -0
  181. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_1-aay-dqu1bbg._.js +1 -1
  182. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_1l0cyvknu7ifc._.js +1 -1
  183. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_1oowo2hvn-29x._.js +3 -0
  184. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_1z2n3sy-f8c8v._.js +1 -1
  185. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_07jhmqergipb9._.js +3 -0
  186. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_0cvxdaq56an-2._.js +1 -1
  187. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_0deebkzdrt66k._.js +1 -1
  188. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_0fj8fj_dfefer._.js +1 -1
  189. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_0g8wuvm9200dx._.js +1 -1
  190. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_0gb_ab5wr340f._.js +1 -1
  191. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_0p9496_ahzf02._.js +1 -1
  192. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_0pr_dn_qifobq._.js +1 -1
  193. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_0r1j1ff9-r1oq._.js +1 -1
  194. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_0spsmrxtu1yv7._.js +1 -1
  195. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_0x3yy4k4kl7e0._.js +1 -1
  196. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_0y6ht52r645g9._.js +1 -1
  197. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_13eoh7dscheba._.js +1 -1
  198. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_14ijvz4m00kwz._.js +1 -1
  199. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_1c3b5p3g1fhhe._.js +1 -1
  200. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_1dz1wwzmepxz2._.js +1 -1
  201. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_1ep4nyq96z4tz._.js +1 -1
  202. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_1ltwm3acq1a26._.js +1 -1
  203. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_1n9uau24zs092._.js +3 -0
  204. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_1qohymrp8tz2i._.js +1 -1
  205. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_1rkytyhzvvpv7._.js +1 -1
  206. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_1wk4mw6yyvcle._.js +3 -0
  207. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_1xfs-ahyxqs9h._.js +1 -1
  208. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_app_(console)_inbox_inbox-page_tsx_1lm_c0ku1ongx._.js +1 -1
  209. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_app_(console)_labels_page_tsx_1qggshdvn2k85._.js +1 -1
  210. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_app_(console)_network_network-page_tsx_0qc3h-94fvfmt._.js +1 -1
  211. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_app_(console)_overview-page_tsx_15siba6r7o4-o._.js +1 -1
  212. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_app_(console)_settings_page_tsx_1p8ay871g99mp._.js +1 -1
  213. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_app_(console)_signed-in-layout_tsx_13vv8foc0-76l._.js +1 -1
  214. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_app_(console)_squadrons_page_tsx_1xpvx8n99lhii._.js +1 -1
  215. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_app_(console)_trierarchs_[shipId]_page_tsx_1u845f4qxrxnd._.js +1 -1
  216. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_app_(console)_trierarchs_page_tsx_0muip60l89nhu._.js +1 -1
  217. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_app_providers_tsx_06ai92nlucn4w._.js +1 -1
  218. package/.next/standalone/packages/console/.next/server/chunks/ssr/{packages_console_components_0tajc64jv4p4d._.js → packages_console_components_1q39m-5orhif3._.js} +1 -1
  219. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_components_atoms_combobox_tsx_1cy612l_h2c5e._.js +1 -1
  220. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_components_molecules_crew-settings-fields_tsx_1hjvztxt75rb7._.js +1 -1
  221. package/.next/standalone/packages/console/.next/server/chunks/ssr/{packages_console_features_1jfrsmosp_f94._.js → packages_console_features_0-f8y-5xa6e2l._.js} +2 -2
  222. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_features_compose_organisms_compose-dialog_tsx_0_p3c-j-p7lmj._.js +1 -1
  223. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_features_fleet_ui_organisms_commission-dialog_tsx_1t37wt5ff0nb4._.js +1 -1
  224. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_features_labels_organisms_define-label-dialog_tsx_0af83_5v5mp_g._.js +1 -1
  225. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_features_labels_organisms_label-values-dialog_tsx_0p1ot21421ivd._.js +1 -1
  226. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_features_scopes_ui_organisms_scope-dialog_tsx_0tcpxdok6jf_e._.js +1 -1
  227. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_features_sealing_ui_organisms_02qi_q_obbhrk._.js +3 -0
  228. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_features_ship-actions_organisms_rename-dialog_tsx_11feb6ntv8oht._.js +1 -1
  229. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_features_sign-in_state_sign-in-form_tsx_0ffw0bltkeevh._.js +1 -1
  230. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_lib_squadrons-api_ts_0-ls9zi1hw-2n._.js +1 -1
  231. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_lib_trierarch-plugin_ts_1yl4g4k1mmd8u._.js +1 -1
  232. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_ui_dist_atoms_avatar_1ai0d9ec29wx_.js +1 -1
  233. package/.next/standalone/packages/console/.next/server/chunks/ssr/{packages_console_components_atoms_input_tsx_0ux0ulnncybt1._.js → packages_ui_dist_atoms_input_1_06uwyewnocf.js} +2 -2
  234. package/.next/standalone/packages/console/.next/server/chunks/ssr/{packages_console_components_atoms_label_tsx_111c5h3d7pyua._.js → packages_ui_dist_atoms_label_12sveegmf9f4d.js} +2 -2
  235. package/.next/standalone/packages/console/.next/server/chunks/ssr/{packages_console_components_atoms_switch_tsx_0orbqfu-_3s50._.js → packages_ui_dist_atoms_switch_1v-a1gbtq71z2.js} +2 -2
  236. package/.next/standalone/packages/console/.next/server/middleware-build-manifest.js +3 -3
  237. package/.next/standalone/packages/console/.next/server/pages/500.html +1 -1
  238. package/.next/standalone/packages/console/.next/server/preview-props.json +3 -3
  239. package/.next/standalone/packages/console/.next/server/server-reference-manifest.js +1 -1
  240. package/.next/standalone/packages/console/.next/server/server-reference-manifest.json +17 -17
  241. package/.next/standalone/packages/console/.next/static/chunks/05chdma0ol964.js +1 -0
  242. package/.next/standalone/packages/console/.next/static/chunks/05fwf3-fxvd5m.js +2 -0
  243. package/.next/standalone/packages/console/.next/static/chunks/{1vj86m07vgu7o.js → 0ayrppi2sb8x-.js} +1 -1
  244. package/.next/standalone/packages/console/.next/static/chunks/0c1hlwqf4hdml.js +1 -0
  245. package/.next/standalone/packages/console/.next/static/chunks/0ezf9x6wa6nxo.js +1 -0
  246. package/.next/standalone/packages/console/.next/static/chunks/0grjdkvpondwy.js +1 -0
  247. package/.next/standalone/packages/console/.next/static/chunks/{2p7agr7-7omh5.js → 0in4-2bs4x_gc.js} +1 -1
  248. package/.next/standalone/packages/console/.next/static/chunks/{3cbsf_chdsqwv.js → 0j9_09vmua2vo.js} +1 -1
  249. package/.next/standalone/packages/console/.next/static/chunks/0jkrnpjp2kgz5.js +1 -0
  250. package/.next/standalone/packages/console/.next/static/chunks/0vu2jqf1-hr93.js +1 -0
  251. package/.next/standalone/packages/console/.next/static/chunks/{1k-efo6im7n7z.js → 0xg288rgjhpd5.js} +1 -1
  252. package/.next/standalone/packages/console/.next/static/chunks/0y8giiv1vw2cf.js +1 -0
  253. package/.next/standalone/packages/console/.next/static/chunks/{25hge4bw-955w.js → 0yn1yyg6qtyng.js} +1 -1
  254. package/.next/standalone/packages/console/.next/static/chunks/0zb-no8hidxjs.js +1 -0
  255. package/.next/standalone/packages/console/.next/static/chunks/{2xo54fcrgmymu.js → 10hada2_02knq.js} +1 -1
  256. package/.next/standalone/packages/console/.next/static/chunks/1207wb459sahf.js +1 -0
  257. package/.next/standalone/packages/console/.next/static/chunks/122gkybdigp68.js +1 -0
  258. package/.next/standalone/packages/console/.next/static/chunks/138-5ko4y65ce.js +1 -0
  259. package/.next/standalone/packages/console/.next/static/chunks/{3-74ezr2m60y6.js → 15uffeh7yixaf.js} +1 -1
  260. package/.next/standalone/packages/console/.next/static/chunks/{29p630801k-5h.js → 16o203kluazek.js} +1 -1
  261. package/.next/standalone/packages/console/.next/static/chunks/{2ewcrbnk2r18x.js → 1835o4kio_3a8.js} +1 -1
  262. package/.next/standalone/packages/console/.next/static/chunks/18b9lpz3han1l.js +1 -0
  263. package/.next/standalone/packages/console/.next/static/chunks/1amjh3awiw_-n.js +1 -0
  264. package/.next/standalone/packages/console/.next/static/chunks/{29t_0_08b44v1.js → 1c2v5e2rz_ar5.js} +1 -1
  265. package/.next/standalone/packages/console/.next/static/chunks/1ihiyhlp5dgjl.js +1 -0
  266. package/.next/standalone/packages/console/.next/static/chunks/1jbwuif9e4aev.js +1 -0
  267. package/.next/standalone/packages/console/.next/static/chunks/1kfvp8fwve4n_.js +1 -0
  268. package/.next/standalone/packages/console/.next/static/chunks/1osfgd0qfmil5.js +1 -0
  269. package/.next/standalone/packages/console/.next/static/chunks/{1vcl7_wa1863u.js → 1s4w_wlngw6e0.js} +1 -1
  270. package/.next/standalone/packages/console/.next/static/chunks/1scbagy5tvblu.js +1 -0
  271. package/.next/standalone/packages/console/.next/static/chunks/1u3dr0x6mkefx.js +1 -0
  272. package/.next/standalone/packages/console/.next/static/chunks/1ua_9kxk3b5m1.js +1 -0
  273. package/.next/standalone/packages/console/.next/static/chunks/1wvg60p98acup.js +1 -0
  274. package/.next/standalone/packages/console/.next/static/chunks/{3vzrbk9imsn0m.js → 2083m6quv7ats.js} +1 -1
  275. package/.next/standalone/packages/console/.next/static/chunks/{20y4t9ra93_kw.js → 2114r41kxgehf.js} +1 -1
  276. package/.next/standalone/packages/console/.next/static/chunks/24_r7dc2i2_en.js +1 -0
  277. package/.next/standalone/packages/console/.next/static/chunks/24odyada8rana.js +1 -0
  278. package/.next/standalone/packages/console/.next/static/chunks/25vqg-bsdwfxl.js +1 -0
  279. package/.next/standalone/packages/console/.next/static/chunks/{1b76rzzthty44.js → 2643j-gwyr93x.js} +1 -1
  280. package/.next/standalone/packages/console/.next/static/chunks/26k05tl65m0n4.js +1 -0
  281. package/.next/standalone/packages/console/.next/static/chunks/2bzvxrbw1anad.js +1 -0
  282. package/.next/standalone/packages/console/.next/static/chunks/2eyg7g0ebvm37.js +1 -0
  283. package/.next/standalone/packages/console/.next/static/chunks/2goeyaunqmf_5.js +1 -0
  284. package/.next/standalone/packages/console/.next/static/chunks/{3xs_5u9bw41hi.js → 2hm0k_6rq5pm6.js} +1 -1
  285. package/.next/standalone/packages/console/.next/static/chunks/{2wd_ht310jndr.js → 2hq95ej_ksifs.js} +1 -1
  286. package/.next/standalone/packages/console/.next/static/chunks/2hzyqc_pse7ux.js +1 -0
  287. package/.next/standalone/packages/console/.next/static/chunks/{0zcn59qj0cbjd.js → 2k_3a4rct9ppo.js} +1 -1
  288. package/.next/standalone/packages/console/.next/static/chunks/{0xe_ahj55ltui.js → 2sxfbx0_zrwn9.js} +1 -1
  289. package/.next/standalone/packages/console/.next/static/chunks/2t_7p7xcb1fww.js +1 -0
  290. package/.next/standalone/packages/console/.next/static/chunks/{2x9ou8nz0e8q8.js → 2we1bb3-bi1_y.js} +1 -1
  291. package/.next/standalone/packages/console/.next/static/chunks/2ye27vfdh5w8w.js +1 -0
  292. package/.next/standalone/packages/console/.next/static/chunks/{14kj6isztodjt.css → 3-76w5ha8m1l_.css} +1 -1
  293. package/.next/standalone/packages/console/.next/static/chunks/32_mhpy8b9nvq.js +1 -0
  294. package/.next/standalone/packages/console/.next/static/chunks/3352v7y8pyvqc.js +1 -0
  295. package/.next/standalone/packages/console/.next/static/chunks/35co2q__yorb0.js +1 -0
  296. package/.next/standalone/packages/console/.next/static/chunks/365eou5npki1t.js +1 -0
  297. package/.next/standalone/packages/console/.next/static/chunks/{0dj6qoa19phux.js → 3_a4o8yqna8qt.js} +1 -1
  298. package/.next/standalone/packages/console/.next/static/chunks/3aed0vq63y5x2.js +1 -0
  299. package/.next/standalone/packages/console/.next/static/chunks/3ff1nom6sybiz.js +1 -0
  300. package/.next/standalone/packages/console/.next/static/chunks/3gi60b6qdwmsw.js +1 -0
  301. package/.next/standalone/packages/console/.next/static/chunks/{2w11mog-b6sbd.js → 3gjza8_3w9a7-.js} +1 -1
  302. package/.next/standalone/packages/console/.next/static/chunks/{2gk8m32j2f6ca.js → 3hdbq96mkhae7.js} +1 -1
  303. package/.next/standalone/packages/console/.next/static/chunks/{1rr9-d-t5lpt_.js → 3js7pdcxedu_8.js} +1 -1
  304. package/.next/standalone/packages/console/.next/static/chunks/3kpucgcfq2w5d.js +1 -0
  305. package/.next/standalone/packages/console/.next/static/chunks/3m7nquuptho13.js +1 -0
  306. package/.next/standalone/packages/console/.next/static/chunks/{1d_9j79h19cgi.js → 3mccwfqnkll8p.js} +1 -1
  307. package/.next/standalone/packages/console/.next/static/chunks/3nm3nxj4q5xhs.js +1 -0
  308. package/.next/standalone/packages/console/.next/static/chunks/{1ym8qti37-pdv.js → 3optj186wopm8.js} +1 -1
  309. package/.next/standalone/packages/console/.next/static/chunks/{0pfq7nvw7x16o.js → 3s54fm26_vp7o.js} +1 -1
  310. package/.next/standalone/packages/console/.next/static/chunks/3t3n63k8pvpal.js +1 -0
  311. package/.next/standalone/packages/console/.next/static/chunks/{2st0m94zntare.js → 3te_y3-s98-pw.js} +1 -1
  312. package/.next/standalone/packages/console/.next/static/chunks/3xhmaqxr19mm7.js +1 -0
  313. package/.next/standalone/packages/console/.next/static/chunks/3z36cvc4bhfe6.js +1 -0
  314. package/.next/standalone/packages/console/.next/static/chunks/{2zup7gjsqaik0.js → 3zaa6nj2pkz1o.js} +1 -1
  315. package/.next/standalone/packages/console/.next/static/chunks/4214er1of97ug.js +1 -0
  316. package/.next/standalone/packages/console/.next/static/chunks/452asebh9r6i0.js +1 -0
  317. package/.next/standalone/packages/console/.next/static/media/icon.1btn_u3uez_sn.svg +1 -0
  318. package/.next/standalone/packages/console/package.json +4 -4
  319. package/.next/standalone/packages/console/public/brand/aeolus-mark-light-slate.svg +1 -0
  320. package/.next/standalone/packages/console/public/brand/aeolus-mark-slate.svg +1 -0
  321. package/.next/standalone/packages/console/public/brand/aeolus-wordmark-light-slate.svg +1 -0
  322. package/.next/standalone/packages/console/public/brand/aeolus-wordmark-slate.svg +1 -0
  323. package/package.json +4 -4
  324. package/.next/standalone/packages/console/.next/server/chunks/ssr/_0-pfw_9tch0-9._.js +0 -3
  325. package/.next/standalone/packages/console/.next/server/chunks/ssr/_0pai71k09t6u5._.js +0 -3
  326. package/.next/standalone/packages/console/.next/server/chunks/ssr/_0vjgdft43dxh4._.js +0 -3
  327. package/.next/standalone/packages/console/.next/server/chunks/ssr/_0vr7cjzjfhevd._.js +0 -3
  328. package/.next/standalone/packages/console/.next/server/chunks/ssr/_0zq7s-prsig46._.js +0 -3
  329. package/.next/standalone/packages/console/.next/server/chunks/ssr/_14c5x8zkif6vi._.js +0 -3
  330. package/.next/standalone/packages/console/.next/server/chunks/ssr/_18x2s3b8i9058._.js +0 -3
  331. package/.next/standalone/packages/console/.next/server/chunks/ssr/_19yede9mxxv6l._.js +0 -3
  332. package/.next/standalone/packages/console/.next/server/chunks/ssr/_1m34rsy6u-vci._.js +0 -3
  333. package/.next/standalone/packages/console/.next/server/chunks/ssr/_1mazzdfxvzbzz._.js +0 -3
  334. package/.next/standalone/packages/console/.next/server/chunks/ssr/_1ml4jnl0uqd_-._.js +0 -3
  335. package/.next/standalone/packages/console/.next/server/chunks/ssr/_1nhowde6wd_hq._.js +0 -3
  336. package/.next/standalone/packages/console/.next/server/chunks/ssr/_1yc07tcffbnqt._.js +0 -3
  337. package/.next/standalone/packages/console/.next/server/chunks/ssr/_20xvnuodet9l_._.js +0 -3
  338. package/.next/standalone/packages/console/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_0ojxu_jxnccdp._.js +0 -3
  339. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_18atu2otazcwd._.js +0 -3
  340. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_0fzicjn1gpkoa._.js +0 -3
  341. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_1-fanr66tz2dr._.js +0 -3
  342. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_1a88v-2k3255e._.js +0 -3
  343. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_1c7xqe8cbp-mm._.js +0 -3
  344. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_1fil4lzb1fss3._.js +0 -3
  345. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_1hy85-qm_8481._.js +0 -3
  346. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_1p6riye_q22p-._.js +0 -3
  347. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_1wmrqrtqs39cp._.js +0 -3
  348. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_components_1p5a564zdn_d4._.js +0 -3
  349. package/.next/standalone/packages/console/.next/server/chunks/ssr/packages_console_features_sealing_ui_organisms_0fzionqfrb-wk._.js +0 -3
  350. package/.next/standalone/packages/console/.next/static/chunks/01-119tb2lg7s.js +0 -1
  351. package/.next/standalone/packages/console/.next/static/chunks/03bk2b8g3gelo.js +0 -1
  352. package/.next/standalone/packages/console/.next/static/chunks/07w2942d3hrw0.js +0 -1
  353. package/.next/standalone/packages/console/.next/static/chunks/082kze1yujdos.js +0 -1
  354. package/.next/standalone/packages/console/.next/static/chunks/0ccsr0ro4nuxy.js +0 -1
  355. package/.next/standalone/packages/console/.next/static/chunks/0i-_qcuuogd4d.js +0 -1
  356. package/.next/standalone/packages/console/.next/static/chunks/0jp6q22l0s_-8.js +0 -1
  357. package/.next/standalone/packages/console/.next/static/chunks/0mu5fd8r2uhb3.js +0 -1
  358. package/.next/standalone/packages/console/.next/static/chunks/0uua7stwbya26.js +0 -1
  359. package/.next/standalone/packages/console/.next/static/chunks/1-lus78hrhmq9.js +0 -1
  360. package/.next/standalone/packages/console/.next/static/chunks/10zv8ay4yhb53.js +0 -1
  361. package/.next/standalone/packages/console/.next/static/chunks/14t2wm9185jpd.js +0 -1
  362. package/.next/standalone/packages/console/.next/static/chunks/18menghw6jvpi.js +0 -1
  363. package/.next/standalone/packages/console/.next/static/chunks/1_eepva7s5su0.js +0 -1
  364. package/.next/standalone/packages/console/.next/static/chunks/1nptr3fcyl_w7.js +0 -1
  365. package/.next/standalone/packages/console/.next/static/chunks/1o116poi-jhdi.js +0 -1
  366. package/.next/standalone/packages/console/.next/static/chunks/1td-_4g-exxdg.js +0 -1
  367. package/.next/standalone/packages/console/.next/static/chunks/1uhdiqj8rv6sw.js +0 -1
  368. package/.next/standalone/packages/console/.next/static/chunks/1xh-o0zqyaxi0.js +0 -1
  369. package/.next/standalone/packages/console/.next/static/chunks/2-hsch-p-rdl4.js +0 -1
  370. package/.next/standalone/packages/console/.next/static/chunks/2-u01qvrx6wtx.js +0 -1
  371. package/.next/standalone/packages/console/.next/static/chunks/20a1mtjbq_zxk.js +0 -1
  372. package/.next/standalone/packages/console/.next/static/chunks/20cwdex99ra5j.js +0 -1
  373. package/.next/standalone/packages/console/.next/static/chunks/23qi9ra6lg4ew.js +0 -1
  374. package/.next/standalone/packages/console/.next/static/chunks/24atvv3m8uee0.js +0 -1
  375. package/.next/standalone/packages/console/.next/static/chunks/24n5avb04d_sp.js +0 -1
  376. package/.next/standalone/packages/console/.next/static/chunks/298y7ad8d-67p.js +0 -1
  377. package/.next/standalone/packages/console/.next/static/chunks/2af8kb091fpkt.js +0 -1
  378. package/.next/standalone/packages/console/.next/static/chunks/2c4c1n4__yy2z.js +0 -1
  379. package/.next/standalone/packages/console/.next/static/chunks/2d7lqmvpxzstq.js +0 -1
  380. package/.next/standalone/packages/console/.next/static/chunks/2fuma8adh1ec_.js +0 -1
  381. package/.next/standalone/packages/console/.next/static/chunks/2i0j20xoxltn3.js +0 -2
  382. package/.next/standalone/packages/console/.next/static/chunks/2k4lbg_hccl8s.js +0 -1
  383. package/.next/standalone/packages/console/.next/static/chunks/2lv5b9cqado3p.js +0 -1
  384. package/.next/standalone/packages/console/.next/static/chunks/2peemhs5ca61q.js +0 -1
  385. package/.next/standalone/packages/console/.next/static/chunks/2ppnnwi_1c4x5.js +0 -1
  386. package/.next/standalone/packages/console/.next/static/chunks/2sjgto_bbb1sc.js +0 -1
  387. package/.next/standalone/packages/console/.next/static/chunks/2vlzunx3o6_67.js +0 -1
  388. package/.next/standalone/packages/console/.next/static/chunks/2wdgsykapoy45.js +0 -1
  389. package/.next/standalone/packages/console/.next/static/chunks/30dsiw7r_h5o0.js +0 -1
  390. package/.next/standalone/packages/console/.next/static/chunks/31pzb0r-g6pwj.js +0 -1
  391. package/.next/standalone/packages/console/.next/static/chunks/3a3eequppki3-.js +0 -1
  392. package/.next/standalone/packages/console/.next/static/chunks/3d620ju--xpq_.js +0 -1
  393. package/.next/standalone/packages/console/.next/static/chunks/3feucup3z8i6v.js +0 -1
  394. package/.next/standalone/packages/console/.next/static/chunks/3l8cqezea1o5q.js +0 -1
  395. package/.next/standalone/packages/console/.next/static/chunks/3s9k3l7rx_372.js +0 -1
  396. package/.next/standalone/packages/console/.next/static/chunks/3xp8g86fvj24-.js +0 -1
  397. package/.next/standalone/packages/console/.next/static/media/icon.0h5hy2etdmq_n.svg +0 -19
  398. /package/.next/standalone/packages/console/.next/static/{onlz5fivzG7laawSHESIb → Vm2-Db5_5Gt5txrBYfpH0}/_buildManifest.js +0 -0
  399. /package/.next/standalone/packages/console/.next/static/{onlz5fivzG7laawSHESIb → Vm2-Db5_5Gt5txrBYfpH0}/_clientMiddlewareManifest.js +0 -0
  400. /package/.next/standalone/packages/console/.next/static/{onlz5fivzG7laawSHESIb → Vm2-Db5_5Gt5txrBYfpH0}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ (()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,716327,e=>{var t=e.i(456420);let a={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};a.node;let n=(0,t.f)(a);e.s(["f",0,n],716327)},24071,e=>{var t=e.i(456420);let a={name:"chevron-left",size:24,node:[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]};a.node;let n=(0,t.f)(a);e.s(["f",0,n],24071)},77071,e=>{var t=e.i(456420);let a={name:"plus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]};a.node;let n=(0,t.f)(a);e.s(["f",0,n],77071)},566595,e=>{var t=e.i(456420);let a={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};a.node;let n=(0,t.f)(a);e.s(["f",0,n],566595)},137529,e=>{e.s(["E",0,["alert","awaitingCrew","blocked","working","idle"],"V",0,function(e){return e.hasOpenAlert?"alert":"awaitingCrew"===e.status?"awaitingCrew":"blocked"===e.reportState?"blocked":"working"===e.reportState?"working":"idle"}])},33496,e=>{var t=e.i(843476),a=e.i(522016),n=e.i(681924),r=e.i(67874);function s(){return(0,t.jsx)(r.f,{title:"Page not found",description:"There is nothing at this address in your fleet.",action:(0,t.jsx)(n.f,{size:"sm",render:(0,t.jsx)(a.default,{href:"/"}),nativeButton:!1,"data-testid":"not-found-overview",children:"Back to the fleet overview"})})}var i=e.i(837631),l=e.i(787964),d=e.i(718423);e.s(["NotFoundPage",0,function(){let e=(0,l.y)(),a=(0,d.f)();return(0,t.jsx)(i.f,{switcher:e.switcher,account:e.account,onCompose:e.onCompose,onSearch:e.onSearch,banner:e.banner,title:"Page not found",parents:[{href:"/",label:"Fleet overview"}],live:a.live,header:null,children:(0,t.jsx)(s,{})})}],33496)},67874,e=>{var t=e.i(843476),a=e.i(812437);e.s(["f",0,function({title:e,description:n,icon:r,action:s,variant:i="page",className:l}){return"section"===i?(0,t.jsxs)("p",{"data-slot":"empty-state","data-variant":i,className:(0,a.f)("rounded-lg border border-border px-4 py-3 text-center text-meta text-muted-foreground",l),children:[e,n?(0,t.jsxs)(t.Fragment,{children:[" ",n]}):null]}):"no-results"===i?(0,t.jsxs)("div",{"data-slot":"empty-state","data-variant":i,className:(0,a.f)("flex flex-col items-center gap-2.5 rounded-lg border border-border bg-card px-4 py-6 text-center",l),children:[(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:e}),s]}):(0,t.jsxs)("div",{"data-slot":"empty-state","data-variant":i,className:(0,a.f)("flex flex-col items-center gap-3 rounded-lg border border-dashed border-border bg-card px-6 py-10 text-center",l),children:[r?(0,t.jsx)("span",{"aria-hidden":!0,className:"flex size-10 items-center justify-center rounded-lg border border-border bg-muted text-muted-foreground [&_svg]:size-(--size-icon-xl)",children:r}):null,(0,t.jsx)("h2",{className:"text-heading font-semibold text-foreground max-sm:text-heading-touch",children:e}),n?(0,t.jsx)("p",{className:"max-w-96 text-meta text-muted-foreground max-sm:text-body-touch",children:n}):null,s?(0,t.jsx)("div",{className:"mt-1 max-sm:w-full max-sm:[&>*]:w-full",children:s}):null]})}])},837631,e=>{var t=e.i(843476),a=e.i(577880),n=e.i(485538);e.s(["f",0,function({title:e,parents:r,header:s,children:i,sheet:l,live:d,switcher:o,onCompose:c,onSearch:u,banner:p}){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(a.f,{breadcrumb:e,parents:r,live:d,switcher:o,onCompose:c,onSearch:u}),p,(0,t.jsx)(n.f,{title:e,live:d,back:r[r.length-1]??r[0]}),(0,t.jsxs)("main",{className:"flex grow flex-col gap-4 px-6 py-5 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:[s,i]}),l]})}])},577880,485538,e=>{var t=e.i(843476),a=e.i(566595),n=e.i(371951),r=e.i(681924),s=e.i(462372),i=e.i(505792),l=e.i(812437);function d({switcher:e,switcherLayout:o="full",account:c,onSearch:u,searchLabel:p="Search or jump to",search:h="trigger",children:m,actions:f,className:x}){let g=u?"field"===h?(0,t.jsx)(r.f,{variant:"secondary",size:"md",icon:(0,t.jsx)(a.f,{"aria-hidden":!0}),"data-testid":"header-search",onClick:u,className:"w-50 justify-start font-normal text-muted-foreground outline-none focus-visible:outline-2 focus-visible:outline-ring",children:(0,t.jsx)("span",{className:"truncate",children:p})}):(0,t.jsxs)(r.f,{size:"sm",icon:(0,t.jsx)(a.f,{"aria-hidden":!0}),"data-testid":"header-search",className:"w-60 justify-start font-normal text-muted-foreground max-lg:w-auto",onClick:u,children:[(0,t.jsx)("span",{className:"grow text-left max-lg:sr-only",children:p}),(0,t.jsx)(s.f,{children:"⌘K"})]}):null;return(0,t.jsxs)("header",{"data-slot":"app-header",className:(0,l.f)("sticky top-0 z-30 flex h-(--size-header) shrink-0 items-center justify-between gap-4 border-b border-border bg-background px-6",x),children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[void 0===e?(0,t.jsx)("span",{"data-testid":"app-switcher-loading","aria-hidden":!0,className:"h-4 w-36 shrink-0 animate-pulse rounded bg-muted motion-reduce:animate-none"}):(0,t.jsx)(n.AppSwitcher,{switcher:e,layout:o,className:"shrink-0"}),m]}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center gap-3",children:["field"===h?g:null,f,"trigger"===h?g:null,void 0===c?null:(0,t.jsx)(i.AvatarMenu,{...c})]})]})}var o=e.i(77071),c=e.i(522016);let u={live:{label:"Live",dot:"bg-tone-ok-fg"},reconnecting:{label:"Reconnecting",dot:"bg-tone-waiting-fg"},offline:{label:"Offline",dot:"bg-tone-attention-fg"}};function p({state:e,className:a}){let{label:n,dot:r}=u[e];return(0,t.jsxs)("span",{"data-slot":"live-status","data-state":e,"aria-live":"polite",className:(0,l.f)("inline-flex items-center gap-1.5 text-meta text-muted-foreground",a),children:[(0,t.jsx)("span",{"aria-hidden":!0,className:(0,l.f)("size-2 shrink-0 rounded-full",r)}),n]})}e.s(["f",0,function({breadcrumb:e,parents:a=[],live:n,switcher:s,onCompose:i,onSearch:l}){return(0,t.jsxs)(d,{switcher:s,switcherLayout:"fleet",onSearch:l,search:"field",searchLabel:"Search",className:"hidden sm:flex",actions:i?(0,t.jsx)(r.f,{size:"sm",icon:(0,t.jsx)(o.f,{"aria-hidden":!0}),"data-testid":"header-compose",onClick:i,children:"Compose"}):null,children:[(0,t.jsx)("nav",{"aria-label":"Breadcrumb","data-testid":"header-breadcrumb",className:"-ml-2 flex min-w-0 items-center gap-3 text-body",children:(0,t.jsxs)("ol",{className:"flex min-w-0 items-center gap-1",children:[(0,t.jsx)("li",{"aria-hidden":!0,className:"text-muted-foreground",children:"/"}),a.map(e=>(0,t.jsxs)("li",{className:"flex shrink-0 items-center gap-1",children:[(0,t.jsx)(c.default,{href:e.href,className:"text-muted-foreground hover:text-foreground hover:underline",children:e.label}),(0,t.jsx)("span",{"aria-hidden":!0,className:"text-muted-foreground",children:"/"})]},e.href)),(0,t.jsx)("li",{"aria-current":"page",className:"truncate font-medium text-foreground",children:e})]})}),(0,t.jsx)(p,{state:n})]})}],577880);var h=e.i(24071);e.s(["f",0,function({title:e,live:s,actions:l,back:d,switcher:o,isTitled:u=!1,account:m,onSearch:f}){let x=f&&!d?f:void 0;return(0,t.jsxs)("header",{"data-slot":"top-bar","data-mode":d?"detail":"root",className:"sticky top-0 z-30 flex h-(--size-header) items-center gap-2.5 border-b border-border bg-background px-4 sm:hidden",children:[d?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(c.default,{href:d.href,className:"-ml-1.5 inline-flex h-(--size-control-touch) shrink-0 items-center gap-0.5 rounded-md pr-2 text-body-touch text-foreground focus-visible:outline-2 focus-visible:outline-ring [&_svg]:size-(--size-icon)",children:[(0,t.jsx)(h.f,{"aria-hidden":!0}),d.label]}),(0,t.jsx)("p",{className:"min-w-0 flex-1 truncate text-center text-body-touch font-semibold text-foreground",children:e})]}):o?(0,t.jsx)(n.AppSwitcher,{switcher:o,layout:"compact",...u?{title:e}:{},className:"min-w-0"}):(0,t.jsx)("p",{className:"truncate px-1.5 text-title-touch font-semibold text-foreground",children:u?e:"Console"}),(0,t.jsx)(p,{state:s,className:u&&!d?"ml-auto":void 0}),l||x||m&&!d?(0,t.jsxs)("div",{className:"ml-auto flex items-center gap-1",children:[x?(0,t.jsx)(r.f,{variant:"ghost",size:"touch",isIconOnly:!0,"aria-label":"Search ships or jump to","data-testid":"top-bar-search",onClick:x,children:(0,t.jsx)(a.f,{"aria-hidden":!0})}):null,l,m&&!d?(0,t.jsx)(i.AvatarMenuSheet,{...m}):null]}):null]})}],485538)},718423,e=>{var t=e.i(137529),a=e.i(540143),n=e.i(317751),r=e.i(912598),s=e.i(905861),i=e.i(271645),l=e.i(586413),d=e.i(123938),o=e.i(427702);let c=new Set(["FleetInitialised","ShipCommissioned","ShipClaimed","LeaseRevoked","CredentialRevoked","StartingPromptIssued","ShipRetired","DeliveryAcknowledged","DeliveryUndeliverable","ShipReported","CrewRequested","CrewRequestRemoved","CrewAssigned","CrewStatusChanged","CrewRequestExplained","CrewRequestGivenBack","LabelAssigned","LabelUnassigned","LabelRetired","AlertRaised","AlertCleared"]);function u(e,t){return e.pages.some(e=>e.items.some(e=>e.id===t))}function p(e){return"object"==typeof e&&null!==e}function h(e){return Array.isArray(e)?e:[]}function m(e){return"string"==typeof e&&e.startsWith("lbv_")}let f=new Set(["LabelDefined","LabelValuesChanged","LabelRetired","LabelAssigned","LabelUnassigned","LabelDeleted"]),x=new Set(["FleetSealingTurnedOn","FleetPayloadsSealed","FleetDataKeyCreated","FleetCompanyKeyChanged","FleetRecoveryKeyChanged","FleetKeysRecovered","FleetKeyUnavailable","FleetKeyAvailable"]),g=new Set(["FeatureFlagTurnedOn","FeatureFlagTurnedOff"]),y=new Set(["DeliveryUndeliverable","DeliveryNotHandled","DeliveryDismissed"]),w=new Set(["NetworkRulesSet","NetworkRulesDraftSaved","NetworkRulesDraftDiscarded","NetworkRulesDeclared","BuiltInRuleChanged"]);e.s(["f",0,function(){let e=(0,o.I)(),b=(0,r.d)(),[v,j]=(0,i.useState)(new Set),N=(0,d.h)(),[C]=(0,i.useState)(()=>{let r,s,i,d;return function(e){var r,s;let i,d,o,b,v,j,{trpc:N,queryClient:C,reload:S}=e,k=[...N.fleet.list.infiniteQueryKey()],D=()=>C.getQueriesData({queryKey:k}).flatMap(([,e])=>void 0===e?[]:[e]),K=(r={readRow:e=>C.query({...N.fleet.listedShip.queryOptions({shipId:e}),staleTime:0}),writeRow:t=>{let a=D().some(e=>!u(e,t.id));C.setQueriesData({queryKey:k},e=>e&&function(e,t){if(u(e,t.id))return{...e,pages:e.pages.map(e=>{var a;return{...e,items:(a=e.items,a.map(e=>e.id===t.id?t:e))}})};let[a,...n]=e.pages;return void 0===a?e:{...e,pages:[{...a,items:[t,...a.items]},...n]}}(e,t)),a&&e.onPlacedFirst(t.id)}},i=new Set,d=new Set,o=async e=>{i.add(e);try{do d.delete(e),r.writeRow(await r.readRow(e));while(d.has(e))}catch{}finally{i.delete(e),d.delete(e)}},e=>{i.has(e)?d.add(e):o(e)}),q=[...N.fleet.harbour.infiniteQueryKey()],z=()=>C.getQueriesData({queryKey:q}).flatMap(([e,t])=>void 0===t?[]:[e]),R=()=>z().length>0,I=new Set,F=(s=async()=>{let e=[...I];I.clear();let r=z(),s=new n.f;try{let[n,i]=await Promise.all([s.query({...N.fleet.harbour.queryOptions({limit:1}),staleTime:0}).then(e=>e.counts),Promise.all(e.map(async e=>({shipId:e,reads:await Promise.all(r.map(async a=>{let n=function(e){let[,a]=e,n=p(a)?a.input:void 0,r=p(n)?n.filter:void 0;if(p(r))return{..."string"==typeof r.nameQuery?{nameQuery:r.nameQuery}:{},...void 0===r.state?{}:{state:h(r.state).flatMap(e=>t.E.find(t=>t===e)??[])},...void 0===r.type?{}:{type:h(r.type).filter(e=>"string"==typeof e)},...void 0===r.valueIds?{}:{valueIds:h(r.valueIds).filter(m)}}}(a);return{queryKey:a,tile:(await s.query({...N.fleet.harbour.queryOptions(void 0===n?{shipIds:[e]}:{shipIds:[e],filter:n}),staleTime:0})).items[0]}}))})))]);a.f.batch(()=>{for(let{shipId:e,reads:t}of i)for(let{queryKey:a,tile:n}of t)C.setQueryData(a,t=>t&&function(e,t){let{shipId:a,tile:n}=t;if(void 0===n)return{...e,pages:e.pages.map(e=>({...e,items:e.items.filter(e=>e.id!==a)}))};if(e.pages.some(e=>e.items.some(e=>e.id===a)))return{...e,pages:e.pages.map(e=>({...e,items:e.items.map(e=>e.id===a?n:e)}))};let[r,...s]=e.pages;return void 0===r?e:{...e,pages:[{...r,items:[n,...r.items]},...s]}}(t,{shipId:e,tile:n}));null!==n&&(C.setQueryData(N.fleet.harbour.queryKey({limit:1}),e=>e&&{...e,counts:n}),C.setQueriesData({queryKey:q},e=>e&&function(e,t){let[a,...n]=e.pages;return void 0===a?e:{...e,pages:[{...a,counts:t},...n]}}(e,n)))})}catch(t){for(let t of e)I.add(t);throw t}finally{s.clear()}},b=new Set,v=new Set,j=async()=>{b.add("read");try{do v.delete("read"),await s();while(v.has("read"))}catch{}finally{b.delete("read"),v.delete("read")}},()=>{b.has("read")?v.add("read"):j()}),M=()=>{S(N.fleet.stuckCount.queryKey()),S(N.fleet.stuckSummary.queryKey()),S(N.fleet.stuck.pathKey())};return e=>{var t,a,n,r,s,i,d;if("resync"===e.kind){S(N.fleet.pathKey()),S(l.C);return}let{event:o}=e;for(let e of new Set([o.shipId,o.actorShipId]))null!==e&&(S(N.fleet.ship.queryKey({shipId:e})),S(N.fleet.shipTimeline.infiniteQueryKey({shipId:e})),S(N.fleet.shipWay.queryKey({shipId:e})));if(null!==o.messageId&&(S(N.fleet.shipMessages.pathKey()),S(N.fleet.shipWay.pathKey()),S(N.fleet.message.queryKey({messageId:o.messageId})),S(N.fleet.messageDeliveries.infiniteQueryKey({messageId:o.messageId})),S(N.fleet.inbox.pathKey()),S(N.fleet.inboxCount.queryKey()),S(l.C),M()),"DeliveryAcknowledged"===o.type&&S(N.fleet.acknowledged.queryKey()),t=o.type,y.has(t)&&S(N.fleet.needsAttention.pathKey()),a=o.type,f.has(a)&&S(N.fleet.labels.queryKey()),n=o.type,x.has(n)&&S(N.fleet.sealing.queryKey()),r=o.type,g.has(r)&&S(N.console.session.queryKey()),"NetworkRulesDeclared"===o.type&&S(N.fleet.declaredNetworkRules.queryKey()),("BuiltInRuleChanged"===(s=o.type)||"NetworkRulesSet"===s)&&S(N.fleet.builtInRules.queryKey()),i=o.type,w.has(i)&&(S(N.fleet.networkRules.queryKey()),S(N.fleet.networkRulesDraftChanges.queryKey()),S(N.fleet.explainReach.pathKey())),d=o.type,c.has(d)){if(D().length>0)for(let e of new Set([o.shipId,o.actorShipId]))null!==e&&K(e);if(R()||void 0!==C.getQueryData(N.fleet.harbour.queryKey({limit:1}))){for(let e of new Set([o.shipId,o.actorShipId]))null!==e&&R()&&I.add(e);F()}S(N.fleet.shipCounts.pathKey()),M()}}}({trpc:e,queryClient:b,reload:(r=new Set,s=new Set,i=e=>b.invalidateQueries({queryKey:e,exact:!0},{cancelRefetch:!1}),d=async e=>{r.add(e.queryHash);let t=e.isBehind;try{for(await i(e.queryKey);t||s.delete(e.queryHash);)t=!1,await i(e.queryKey)}finally{r.delete(e.queryHash)}},e=>{for(let t of b.getQueryCache().findAll({queryKey:e}))r.has(t.queryHash)?s.add(t.queryHash):d({queryHash:t.queryHash,queryKey:t.queryKey,isBehind:"fetching"===t.state.fetchStatus})}),onPlacedFirst:e=>{j(t=>new Set([...t,e]))}})}),S=(0,s.B)(e.fleet.events.subscriptionOptions({lastEventId:null},{onData:({data:e})=>{C(e)}}));return{live:"connecting"===S.status&&N?"live":function(e){switch(e){case"pending":return"live";case"connecting":return"reconnecting";case"idle":case"error":return"offline"}}(S.status),placedFirstShipIds:v,error:S.error}}])},371951,e=>{var t=e.i(843476),a=e.i(689664),n=e.i(716327),r=e.i(611568),s=e.i(271645),i=e.i(681924),l=e.i(646013),d=e.i(620388),o=e.i(812437);let c="inline-flex min-w-0 items-center gap-1 rounded-md px-1.5 py-1 text-body font-semibold text-foreground outline-none transition-colors duration-(--duration-fast) hover:bg-accent focus-visible:outline-2 focus-visible:outline-ring aria-expanded:bg-accent disabled:opacity-60";function u({isCurrent:e,isOpening:n}){return n?(0,t.jsx)(r.f,{"aria-hidden":!0,className:"ml-auto animate-spin motion-reduce:animate-none"}):e?(0,t.jsx)(a.f,{"aria-hidden":!0,className:"ml-auto"}):null}function p({url:e,name:a,isCurrent:n,opening:r,onOpen:s,testId:i}){let d=r?.url===e&&r.name===a;return(0,t.jsxs)(l.DropdownMenuItem,{"data-testid":i,"data-current":n||void 0,disabled:void 0!==r&&!d,closeOnClick:!1,render:r=>(0,t.jsx)("a",{...r,href:e,"aria-current":n?"page":void 0,onClick:t=>{r.onClick?.(t),s({url:e,name:a})},children:r.children}),children:[(0,t.jsx)("span",{className:"min-w-0 truncate",children:d?`Opening ${a}`:a}),(0,t.jsx)(u,{isCurrent:n,isOpening:d})]})}function h({url:e,name:a,isCurrent:n,opening:r,onOpen:s,testId:i}){let l=r?.url===e&&r.name===a;return(0,t.jsxs)("a",{href:e,"data-testid":i,"aria-current":n?"page":void 0,"aria-disabled":void 0!==r&&!l||void 0,onClick:t=>{void 0!==r?t.preventDefault():s({url:e,name:a})},className:"flex h-(--size-control-touch) items-center gap-2.5 rounded-md px-2 text-body-touch text-foreground outline-none focus-visible:outline-2 focus-visible:outline-ring aria-disabled:opacity-60 [&_svg]:size-(--size-icon) [&_svg]:text-muted-foreground",children:[(0,t.jsx)("span",{className:"min-w-0 truncate",children:l?`Opening ${a}`:a}),(0,t.jsx)(u,{isCurrent:n,isOpening:l})]})}function m({label:e,children:a}){return(0,t.jsxs)("div",{role:"group","aria-label":e,className:"flex flex-col gap-0.5",children:[(0,t.jsx)("p",{className:"px-2 text-caption font-medium text-muted-foreground",children:e}),a]})}e.s(["AppSwitcher",0,function({switcher:e,layout:a,title:u,className:f}){let[x,g]=(0,s.useState)(void 0),{fleet:y,appLabel:w,fleets:b,apps:v,canSwitch:j}=e;return j?"compact"===a?(0,t.jsxs)(d.Sheet,{children:[(0,t.jsxs)(d.SheetTrigger,{"data-testid":"app-switcher","aria-label":`Switch fleet or app: ${y.name}, ${w}`,className:(0,o.f)(c,"text-title-touch",f),children:[(0,t.jsx)("span",{className:"truncate",children:u??w}),void 0===x?(0,t.jsx)(n.f,{"aria-hidden":!0,className:"size-(--size-icon) shrink-0 text-muted-foreground"}):(0,t.jsx)(r.f,{"aria-hidden":!0,className:"size-(--size-icon) shrink-0 animate-spin motion-reduce:animate-none"})]}),(0,t.jsxs)(d.SheetContent,{side:"bottom","data-testid":"app-switcher-sheet",className:"gap-3",children:[(0,t.jsx)(d.SheetTitle,{className:"sr-only",children:"Switch fleet or app"}),(0,t.jsx)(m,{label:"Fleets",children:b.map(e=>(0,t.jsx)(h,{url:e.url,name:e.name,isCurrent:e.isCurrent,opening:x,onOpen:g,testId:"app-switcher-fleet"},e.id))}),(0,t.jsx)(m,{label:"Apps",children:v.map(e=>(0,t.jsx)(h,{url:e.url,name:e.label,isCurrent:e.isCurrent,opening:x,onOpen:g,testId:"app-switcher-app"},e.app))}),(0,t.jsx)(d.SheetClose,{render:(0,t.jsx)(i.f,{size:"touch",className:"w-full"}),children:"Cancel"})]})]}):"fleet"===a?(0,t.jsx)("nav",{"aria-label":"Fleet and app","data-testid":"app-switcher",className:(0,o.f)("flex min-w-0 items-center",f),children:(0,t.jsxs)(l.DropdownMenu,{children:[(0,t.jsxs)(l.DropdownMenuTrigger,{"data-testid":"app-switcher-fleets","aria-label":`Fleet: ${y.name}, ${w}. Switch fleet or app`,className:(0,o.f)(c,"-mx-1.5 font-normal text-muted-foreground hover:text-foreground"),children:[(0,t.jsx)("span",{className:"truncate",children:y.name}),void 0===x?null:(0,t.jsx)(r.f,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0 animate-spin motion-reduce:animate-none"})]}),(0,t.jsxs)(l.DropdownMenuContent,{align:"start",className:"w-56",children:[(0,t.jsxs)(l.DropdownMenuGroup,{children:[(0,t.jsx)(l.DropdownMenuLabel,{children:"Fleets"}),b.map(e=>(0,t.jsx)(p,{url:e.url,name:e.name,isCurrent:e.isCurrent,opening:x,onOpen:g,testId:"app-switcher-fleet"},e.id))]}),(0,t.jsx)(l.DropdownMenuSeparator,{}),(0,t.jsxs)(l.DropdownMenuGroup,{children:[(0,t.jsx)(l.DropdownMenuLabel,{children:"Apps"}),v.map(e=>(0,t.jsx)(p,{url:e.url,name:e.label,isCurrent:e.isCurrent,opening:x,onOpen:g,testId:"app-switcher-app"},e.app))]})]})]})}):(0,t.jsxs)("nav",{"aria-label":"Fleet and app","data-testid":"app-switcher",className:(0,o.f)("flex min-w-0 items-center gap-0.5",f),children:[(0,t.jsxs)(l.DropdownMenu,{children:[(0,t.jsx)(l.DropdownMenuTrigger,{"data-testid":"app-switcher-fleets","aria-label":`Fleet: ${y.name}. Switch fleet`,className:c,children:(0,t.jsx)("span",{className:"truncate",children:y.name})}),(0,t.jsx)(l.DropdownMenuContent,{align:"start",className:"w-56",children:(0,t.jsxs)(l.DropdownMenuGroup,{children:[(0,t.jsx)(l.DropdownMenuLabel,{children:"Fleets"}),b.map(e=>(0,t.jsx)(p,{url:e.url,name:e.name,isCurrent:e.isCurrent,opening:x,onOpen:g,testId:"app-switcher-fleet"},e.id))]})})]}),(0,t.jsx)("span",{"aria-hidden":!0,className:"text-muted-foreground",children:"/"}),(0,t.jsxs)(l.DropdownMenu,{children:[(0,t.jsxs)(l.DropdownMenuTrigger,{"data-testid":"app-switcher-apps","aria-label":`App: ${w}. Switch app`,className:c,children:[(0,t.jsx)("span",{className:"truncate",children:w}),void 0===x?(0,t.jsx)(n.f,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0 text-muted-foreground"}):(0,t.jsx)(r.f,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0 animate-spin motion-reduce:animate-none"})]}),(0,t.jsx)(l.DropdownMenuContent,{align:"start",className:"w-56",children:(0,t.jsxs)(l.DropdownMenuGroup,{children:[(0,t.jsx)(l.DropdownMenuLabel,{children:"Apps"}),v.map(e=>(0,t.jsx)(p,{url:e.url,name:e.label,isCurrent:e.isCurrent,opening:x,onOpen:g,testId:"app-switcher-app"},e.app))]})})]})]}):(0,t.jsxs)("p",{"data-testid":"app-switcher",className:(0,o.f)("flex min-w-0 items-center gap-1 px-1.5 text-body font-semibold text-foreground","fleet"===a&&"px-0 font-normal text-muted-foreground","compact"===a&&void 0!==u&&"text-title-touch",f),children:["compact"===a?null:(0,t.jsx)("span",{className:"truncate",children:y.name}),"full"===a?(0,t.jsx)("span",{"aria-hidden":!0,className:"text-muted-foreground",children:"/"}):null,"fleet"===a?null:(0,t.jsx)("span",{className:"truncate",children:u??w})]})}])}])})();
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,685260,s=>{s.v(t=>Promise.all(["static/chunks/3607tbp0omsa0.js"].map(t=>s.l(t))).then(()=>t(31432)))},81489,s=>{s.v(t=>Promise.all(["static/chunks/1uhdiqj8rv6sw.js","static/chunks/0dj6qoa19phux.js","static/chunks/03mm9yezkzzw5.js"].map(t=>s.l(t))).then(()=>t(372268)))}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,685260,s=>{s.v(t=>Promise.all(["static/chunks/3607tbp0omsa0.js"].map(t=>s.l(t))).then(()=>t(31432)))},81489,s=>{s.v(t=>Promise.all(["static/chunks/0ezf9x6wa6nxo.js","static/chunks/3_a4o8yqna8qt.js","static/chunks/03mm9yezkzzw5.js"].map(t=>s.l(t))).then(()=>t(372268)))}]);
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,446964,e=>{"use strict";var t=e.i(843476),n=e.i(716327),s=e.i(618566),i=e.i(271645),a=e.i(490262),r=e.i(787964),o=e.i(46929),l=e.i(586413);function d(e){return"question"===e.kind?null===e.question.answer&&null===e.stale:"acknowledged"!==e.state}var c=e.i(718423),m=e.i(296676),x=e.i(678485),u=e.i(681924),h=e.i(341880),p=e.i(298421),f=e.i(509892),g=e.i(485538),b=e.i(976580),j=e.i(994070),v=e.i(849635);function y(e){return e.toSorted((e,t)=>e.sentAt.localeCompare(t.sentAt))}function w(e){return e.toSorted((e,t)=>t.sentAt.localeCompare(e.sentAt))}function k(e){return e.filter(e=>"question"===e.kind)}function N(e){return y(k(e).filter(d))}var S=e.i(508734),I=e.i(386247),q=e.i(456420);let A={name:"mail-open",size:24,node:[["path",{d:"M21.2 8.4c.5.38.8.97.8 1.6v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V10a2 2 0 0 1 .8-1.6l8-6a2 2 0 0 1 2.4 0l8 6Z",key:"1jhwl8"}],["path",{d:"m22 10-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 10",key:"1qfld7"}]]};A.node;let C=(0,q.f)(A);var M=e.i(749287),$=e.i(522016),z=e.i(646013);function D({messageId:e,shipId:n,shipName:s,onMarkUnread:i,size:a}){return(0,t.jsxs)(z.DropdownMenu,{children:[(0,t.jsx)(z.DropdownMenuTrigger,{render:(0,t.jsx)(u.f,{variant:"ghost",size:a,isIconOnly:!0,"aria-label":"Message actions",icon:(0,t.jsx)(I.f,{}),"data-testid":"inbox-message-menu"})}),(0,t.jsxs)(z.DropdownMenuContent,{align:"end",children:[void 0===i?null:(0,t.jsxs)(z.DropdownMenuItem,{onClick:i,"data-testid":"inbox-mark-unread",children:[(0,t.jsx)(C,{"aria-hidden":!0}),"Mark as unread"]}),(0,t.jsxs)(z.DropdownMenuItem,{"data-testid":"inbox-copy-message-id",onClick:()=>{navigator.clipboard.writeText(e).then(()=>{(0,h._)({title:"Message id copied"})},()=>{(0,h._)({title:"Couldn’t copy the message id",description:e,tone:"error"})})},children:[(0,t.jsx)(S.f,{"aria-hidden":!0}),"Copy message id"]}),(0,t.jsxs)(z.DropdownMenuItem,{render:(0,t.jsx)($.default,{href:`/ships/${n}`}),"data-testid":"inbox-open-ship",children:[(0,t.jsx)(M.f,{"aria-hidden":!0}),"Open ",s]})]})]})}var P=e.i(285595),R=e.i(462372),_=e.i(67874),O=e.i(817981),T=e.i(188393),F=e.i(812437),K=e.i(766390),L=e.i(60592),E=e.i(152886),U=e.i(821048);let B={name:"replace",size:24,node:[["path",{d:"M14 4a1 1 0 0 1 1-1",key:"dhj8ez"}],["path",{d:"M15 10a1 1 0 0 1-1-1",key:"1mnyi5"}],["path",{d:"M21 4a1 1 0 0 0-1-1",key:"sfs9ap"}],["path",{d:"M21 9a1 1 0 0 1-1 1",key:"mp6qeo"}],["path",{d:"m3 7 3 3 3-3",key:"x25e72"}],["path",{d:"M6 10V5a2 2 0 0 1 2-2h2",key:"15xut4"}],["rect",{x:"3",y:"14",width:"7",height:"7",rx:"1",key:"1bkyp8"}]]};B.node;let Q=(0,q.f)(B);var Y=e.i(865713);function V(e){return"keyNotReachable"===e.sealing?"Sealed, key not reachable":e.text.headline}function W({entry:e,now:n}){let{question:s,stale:i}=e,a=s.options.find(({key:e})=>e===s.pick.option);if(null!==s.answer){let e=s.options.find(({key:e})=>e===s.answer?.option);return(0,t.jsxs)("span",{"data-answered":!0,className:"flex min-w-0 items-center gap-1.5 text-meta text-muted-foreground [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0",children:[(0,t.jsx)(P.f,{"aria-hidden":!0}),(0,t.jsx)("span",{className:"truncate",children:void 0===e?"Answered with a note":`Answered: ${String(e.key)}. ${e.label}`})]})}return null!==i?(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5 text-meta text-muted-foreground [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0",children:["withdrawn"===i.kind?(0,t.jsx)(U.f,{"aria-hidden":!0}):(0,t.jsx)(Q,{"aria-hidden":!0}),(0,t.jsx)("span",{className:"truncate",children:"withdrawn"===i.kind?"Withdrawn":"Replaced"})]}):(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5 text-meta text-muted-foreground max-sm:text-body [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0",children:[(0,t.jsx)(E.f,{"aria-hidden":!0}),(0,t.jsxs)("span",{className:"min-w-0 truncate",children:["Not answered, pick: ",(0,t.jsx)("span",{className:"font-medium text-foreground",children:void 0===a?String(s.pick.option):`${String(a.key)}. ${a.label}`})]}),(0,t.jsx)(K.f,{variant:"outline",className:"ml-auto shrink-0 tabular-nums","data-testid":"inbox-row-waiting",children:(0,v.m)(new Date(e.sentAt),n)})]})}function G({entry:e,isSelected:n,onSelect:s,now:i,isNested:a=!1}){let r=new Date(e.sentAt),o=null===e.readAt&&"acknowledged"!==e.state,l="question"===e.kind?e.question.title:V(e),d="keyNotReachable"===e.sealing;return(0,t.jsx)("li",{children:(0,t.jsxs)("button",{type:"button","data-testid":"question"===e.kind?"inbox-question-row":"inbox-row","data-delivery-id":e.deliveryId,"aria-current":n?"true":void 0,onClick:()=>{s(e.deliveryId)},className:(0,F.f)("relative flex w-full min-w-0 flex-col gap-1 border-b border-border py-3 pr-4 pl-7 text-left transition-colors duration-(--duration-fast) outline-none hover:bg-accent focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-ring aria-[current=true]:bg-accent max-sm:py-3.5",a?"pl-10":void 0),children:[o?(0,t.jsx)("span",{"aria-hidden":!0,className:(0,F.f)("absolute top-[1.15rem] size-2 rounded-full bg-primary",a?"left-5":"left-2.5")}):null,(0,t.jsxs)("span",{className:"flex min-w-0 items-baseline gap-2",children:[(0,t.jsx)("span",{className:(0,F.f)("min-w-0 truncate text-meta text-foreground max-sm:text-body",o?"font-medium":"text-muted-foreground"),children:e.sender.name}),(0,t.jsxs)("span",{className:"ml-auto flex shrink-0 items-center gap-1",children:["sealed"===e.sealing?(0,t.jsx)(Y.f,{variant:"icon",testId:"inbox-row-sealed"}):null,(0,t.jsx)("time",{dateTime:e.sentAt,title:(0,v.o)(r),className:"text-meta text-muted-foreground tabular-nums",children:i.getTime()-r.getTime()<864e5?(0,v.w)(r):(0,v.B)(r)})]})]}),(0,t.jsx)("span",{className:(0,F.f)("line-clamp-2 text-body text-foreground [overflow-wrap:anywhere] max-sm:text-body-touch",d?"font-medium text-muted-foreground":o?"font-semibold":"font-medium","question"===e.kind&&null!==e.stale?"text-muted-foreground line-through":void 0),children:""===l?"No text":l}),"question"===e.kind?(0,t.jsx)(W,{entry:e,now:i}):d||""===e.text.summary?null:(0,t.jsx)("span",{className:"truncate text-meta text-muted-foreground max-sm:text-body",children:e.text.summary}),o?(0,t.jsx)("span",{className:"sr-only",children:"Unread"}):null]})})}var H=e.i(689664),J=e.i(841220),X=e.i(890135);function Z({messages:e,isExpanded:s,onToggle:i,selectedId:a,onSelect:r,onDoneAll:o,isPending:l=!1,now:d}){let[c]=e;if(void 0===c)return null;let m=[...new Set(e.map(({sender:e})=>e.name))].join(", "),x=new Date(c.sentAt);return(0,t.jsxs)("li",{"data-testid":"inbox-plugin-group",children:[(0,t.jsxs)("div",{className:"flex items-stretch border-b border-border",children:[(0,t.jsxs)("button",{type:"button","aria-expanded":s,"data-testid":"inbox-plugin-group-toggle",onClick:i,className:"flex min-w-0 grow items-start gap-2 py-3 pr-2 pl-7 text-left transition-colors duration-(--duration-fast) outline-none hover:bg-accent focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-ring",children:[(0,t.jsxs)("span",{className:"flex min-w-0 grow flex-col gap-1",children:[(0,t.jsxs)("span",{className:"flex min-w-0 items-baseline gap-2 text-meta text-muted-foreground max-sm:text-body",children:[(0,t.jsx)(J.f,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0 self-center"}),(0,t.jsx)("span",{className:"min-w-0 truncate",children:m}),(0,t.jsx)("time",{dateTime:c.sentAt,title:(0,v.o)(x),className:"ml-auto shrink-0 tabular-nums",children:(0,v.w)(x)})]}),(0,t.jsx)("span",{className:"text-body font-medium text-foreground max-sm:text-body-touch",children:(0,X.v)(e.length,{one:"message from a plugin ship",many:"messages from plugin ships"})}),s?null:(0,t.jsx)("span",{className:"line-clamp-2 text-meta text-muted-foreground max-sm:text-body",children:e.map(V).join(" · ")})]}),(0,t.jsx)(n.f,{"aria-hidden":!0,className:(0,F.f)("mt-5 size-(--size-icon) shrink-0 text-muted-foreground transition-transform",s?"rotate-180":void 0)})]}),s&&void 0!==o?(0,t.jsx)("span",{className:"flex shrink-0 items-start py-3 pr-3",children:(0,t.jsx)(u.f,{size:"sm",icon:(0,t.jsx)(H.f,{"aria-hidden":!0}),isLoading:l,onClick:o,"data-testid":"inbox-plugin-group-done",children:"Done"})}):null]}),s?(0,t.jsx)("ul",{"aria-label":"Messages from plugin ships",children:e.map(e=>(0,t.jsx)(G,{entry:e,isSelected:e.deliveryId===a,onSelect:r,now:d,isNested:!0},e.deliveryId))}):null]})}let ee=[{value:"open",label:"Open",isDesktopOnly:!1},{value:"done",label:"Done",isDesktopOnly:!1},{value:"all",label:"All",isDesktopOnly:!0}];function et({segment:e,onSegmentChange:n,counts:s}){return(0,t.jsx)(L.i,{value:e,onValueChange:e=>{let t=ee.find(t=>t.value===e);t&&n(t.value)},children:(0,t.jsx)(L.U,{"aria-label":"Show",className:"w-full",children:ee.map(({value:e,label:n,isDesktopOnly:i})=>(0,t.jsxs)(L.k,{value:e,"data-testid":`inbox-filter-${e}`,className:(0,F.f)("grow",i?"max-sm:hidden":void 0),children:[n,void 0===s[e]||"open"!==e&&0===s[e]?null:(0,t.jsx)(L.m,{children:s[e]})]},e))})})}function en({title:e,count:n,isPrimary:s,meta:i}){return(0,t.jsxs)("h2",{className:"flex items-center gap-2 px-4 pt-4 pb-2 text-meta font-semibold text-foreground max-sm:px-1 max-sm:text-body-touch",children:[e,(0,t.jsx)(K.f,{variant:s?"count":"count-neutral",children:n}),void 0===i?null:(0,t.jsx)("span",{className:"ml-auto font-normal text-muted-foreground",children:i})]})}function es({view:e,segment:n,onSegmentChange:s,counts:i,waiting:a,selectedId:r,onSelect:o,isPluginGroupExpanded:l,onTogglePluginGroup:d,onPluginGroupDone:c,isPluginGroupPending:m,more:x,now:u}){let h;return(0,t.jsxs)("div",{"data-slot":"inbox-list",className:"flex flex-col",children:[(0,t.jsx)("div",{className:"p-2.5 max-sm:p-0 max-sm:pb-1",children:(0,t.jsx)(et,{segment:n,onSegmentChange:s,counts:i})}),0===e.questions.length?null:(0,t.jsxs)("section",{"aria-label":"Questions","data-testid":"inbox-questions",children:[(0,t.jsx)(en,{title:"Questions",count:e.questions.length,isPrimary:"open"===n,meta:"open"===n&&void 0!==a?`Oldest waits ${a}`:void 0}),(h=e.questions,(0,t.jsx)("ul",{"aria-label":"Questions to argo",className:"max-sm:overflow-hidden max-sm:rounded-lg max-sm:border max-sm:border-border max-sm:bg-card",children:h.map(e=>(0,t.jsx)(G,{entry:e,isSelected:e.deliveryId===r,onSelect:o,now:u},e.deliveryId))}))]}),e.messages.length+e.pluginMessages.length===0?null:(0,t.jsxs)("section",{"aria-label":"Messages","data-testid":"inbox-messages",children:[(0,t.jsx)(en,{title:"Messages",count:e.messages.length+e.pluginMessages.length,isPrimary:!1}),(0,t.jsxs)("ul",{"aria-label":"Messages to argo",className:"max-sm:overflow-hidden max-sm:rounded-lg max-sm:border max-sm:border-border max-sm:bg-card",children:[e.messages.map(e=>(0,t.jsx)(G,{entry:e,isSelected:e.deliveryId===r,onSelect:o,now:u},e.deliveryId)),(0,t.jsx)(Z,{messages:e.pluginMessages,isExpanded:l,onToggle:d,selectedId:r,onSelect:o,onDoneAll:c,isPending:m,now:u})]})]}),x]})}let ei={name:"external-link",size:24,node:[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]};ei.node;let ea=(0,q.f)(ei);var er=e.i(787703),eo=e.i(730274),el=e.i(559092),ed=e.i(974470),ec=e.i(443988),em=e.i(496755),ex=e.i(631071),eu=e.i(539448);function eh({inline:e}){switch(e.kind){case"text":return e.text;case"strong":return(0,t.jsx)("strong",{className:"font-semibold",children:e.children.map((e,n)=>(0,t.jsx)(eh,{inline:e},`${String(n)}-${e.kind}`))});case"emphasis":return(0,t.jsx)("em",{children:e.children.map((e,n)=>(0,t.jsx)(eh,{inline:e},`${String(n)}-${e.kind}`))});case"delete":return(0,t.jsx)("del",{children:e.children.map((e,n)=>(0,t.jsx)(eh,{inline:e},`${String(n)}-${e.kind}`))});case"code":return(0,t.jsx)("code",{className:"rounded-sm bg-muted px-1 font-mono text-code",children:e.text});case"link":return(0,t.jsx)("a",{href:e.url,target:"_blank",rel:"noreferrer noopener",className:"font-medium text-foreground underline underline-offset-2 [overflow-wrap:anywhere] hover:text-primary focus-visible:outline-2 focus-visible:outline-ring",children:e.children.map((e,n)=>(0,t.jsx)(eh,{inline:e},`${String(n)}-${e.kind}`))});case"break":return(0,t.jsx)("br",{})}}function ep({inlines:e}){return e.map((e,n)=>(0,t.jsx)(eh,{inline:e},`${String(n)}-${e.kind}`))}function ef({block:e}){switch(e.kind){case"paragraph":return(0,t.jsx)("p",{children:(0,t.jsx)(ep,{inlines:e.children})});case"heading":return(0,t.jsx)("p",{className:"font-semibold",children:(0,t.jsx)(ep,{inlines:e.children})});case"list":{let n=e.isOrdered?"ol":"ul";return(0,t.jsx)(n,{start:e.start??void 0,className:(0,F.f)("flex flex-col gap-1 pl-5",e.isOrdered?"list-decimal":"list-disc"),children:e.items.map((e,n)=>(0,t.jsx)("li",{className:"[&>p]:inline",children:(0,t.jsx)(eg,{blocks:e})},`${String(n)}-${String(e.length)}`))})}case"code":return(0,t.jsx)("pre",{className:"overflow-x-auto rounded-md border border-border bg-muted px-3 py-2 font-mono text-code whitespace-pre",children:e.text});case"quote":return(0,t.jsx)("blockquote",{className:"border-l-2 border-border pl-3 text-muted-foreground",children:(0,t.jsx)(eg,{blocks:e.children})});case"table":return(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsx)("table",{className:"text-meta",children:(0,t.jsx)("tbody",{children:e.rows.map((e,n)=>(0,t.jsx)("tr",{className:"border-b border-border",children:e.map((e,n)=>(0,t.jsx)("td",{className:"px-2 py-1 align-top",children:(0,t.jsx)(ep,{inlines:e})},`${String(n)}-${String(e.length)}`))},`${String(n)}-${String(e.length)}`))})})});case"rule":return(0,t.jsx)("hr",{className:"border-border"})}}function eg({blocks:e}){return e.map((e,n)=>(0,t.jsx)(ef,{block:e},`${String(n)}-${e.kind}`))}function eb({blocks:e,lineCount:n,className:s}){let a=n>12,[r,o]=(0,i.useState)(!1);if(0===e.length)return null;let l=a&&!r;return(0,t.jsxs)("div",{className:(0,F.f)("flex flex-col gap-2",s),children:[(0,t.jsx)("div",{"data-testid":"inbox-message-body","data-folded":l?"true":void 0,className:(0,F.f)("flex flex-col gap-3 text-prose text-foreground [overflow-wrap:anywhere] max-sm:text-body-touch",l?"max-h-72 overflow-hidden [mask-image:linear-gradient(to_bottom,black_70%,transparent)]":void 0),children:(0,t.jsx)(eg,{blocks:e})}),l?(0,t.jsxs)(u.f,{variant:"ghost",size:"sm",className:"self-start","data-testid":"inbox-show-all",onClick:()=>{o(!0)},children:["Show all ",n," lines"]}):null]})}function ej({link:e}){return(0,t.jsxs)("a",{href:e.url,target:"_blank",rel:"noreferrer noopener","data-testid":"inbox-link-row",className:"flex max-w-md items-center gap-3 rounded-lg border border-border bg-card px-3.5 py-2.5 transition-colors hover:bg-accent focus-visible:outline-2 focus-visible:outline-ring",children:["pull"===e.kind?(0,t.jsx)(er.f,{"aria-hidden":!0,className:"size-(--size-icon) shrink-0"}):(0,t.jsx)(el.f,{"aria-hidden":!0,className:"size-(--size-icon) shrink-0"}),(0,t.jsxs)("span",{className:"flex min-w-0 grow flex-col",children:[(0,t.jsx)("span",{className:"text-meta font-medium text-foreground",children:"pull"===e.kind?"Pull request":"Issue"}),(0,t.jsxs)("span",{className:"truncate font-mono text-id text-muted-foreground",children:[e.repository," #",e.number]})]}),(0,t.jsx)(ea,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0 text-muted-foreground"})]})}function ev({name:e,isArgo:n,sentAt:s,children:i}){let a=new Date(s);return(0,t.jsxs)("li",{"data-testid":"inbox-thread-message",className:(0,F.f)("flex flex-col gap-1 rounded-lg border px-3.5 py-2.5",n?"ml-10 border-transparent bg-muted max-sm:ml-8":"mr-10 border-border bg-card max-sm:mr-0"),children:[(0,t.jsxs)("p",{className:"text-meta text-muted-foreground",children:[(0,t.jsx)("span",{className:"font-medium text-foreground",children:n?"argo (you)":e})," ·"," ",(0,t.jsx)("time",{dateTime:s,title:(0,v.o)(a),children:(0,v.B)(a)})]}),i]})}function ey({thread:e,message:n}){return(void 0===e||0===e.length)&&0===n.replies.length?null:(0,t.jsxs)("section",{"aria-label":"In this thread",className:"flex max-w-xl flex-col gap-2",children:[void 0===e||0===e.length?null:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("h2",{className:"text-meta text-muted-foreground",children:"In this thread"}),(0,t.jsx)("ul",{className:"flex flex-col gap-2",children:e.map(e=>(0,t.jsxs)(ev,{name:e.sender.name,isArgo:e.isArgo,sentAt:e.sentAt,children:[(0,t.jsx)("p",{className:"text-body font-medium text-foreground [overflow-wrap:anywhere]",children:e.text.headline}),(0,t.jsx)(eb,{blocks:e.text.body,lineCount:e.text.lineCount})]},e.id))})]}),0===n.replies.length?null:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("h2",{className:"text-meta text-muted-foreground",children:"Your replies"}),(0,t.jsx)("ul",{className:"flex flex-col gap-2",children:n.replies.map(e=>(0,t.jsxs)(ev,{name:"argo",isArgo:!0,sentAt:e.sentAt,children:[(0,t.jsx)("p",{className:"text-body text-foreground [overflow-wrap:anywhere]",children:e.text.headline}),(0,t.jsx)(eb,{blocks:e.text.body,lineCount:e.text.lineCount})]},e.id))})]})]})}function ew({message:e}){if(null===e.doneAt)return null;let n=new Date(e.doneAt);return(0,t.jsxs)("p",{"data-testid":"inbox-done-notice",className:"flex items-center gap-2 rounded-md border border-tone-ok-border bg-tone-ok-bg px-3 py-2 text-meta text-tone-ok-fg [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0",children:[(0,t.jsx)(P.f,{"aria-hidden":!0}),"Done at"," ",(0,t.jsx)("time",{dateTime:e.doneAt,title:(0,v.o)(n),children:(0,v.w)(n)}),null===e.repliedWith?".":", when you replied."]})}function ek({message:e,onReply:n,onMarkDone:s,isPending:a,isPhone:r}){let[o,l]=(0,i.useState)(""),d=(0,ed.t)(),c="acknowledged"===e.state,m=""!==o.trim(),x=e.sender.name;return(0,t.jsxs)("form",{"data-testid":"inbox-action-bar",className:"flex items-end gap-2 border-t border-border bg-background px-5 py-3 max-sm:px-4 max-sm:pb-[calc(env(safe-area-inset-bottom)+var(--spacing)*3)]",onSubmit:e=>{e.preventDefault(),m&&!a&&n(o)},children:[(0,t.jsx)(ec.f,{"data-reply-field":!0,rows:m?3:1,size:r?"touch":"md","aria-label":`Reply to ${x}`,placeholder:`Reply to ${x}`,value:o,onChange:e=>{l(e.target.value)},onKeyDown:ed.q,"data-testid":"inbox-reply"}),m||c?(0,t.jsxs)(u.f,{type:"submit",variant:"primary",size:r?"touch":"md",icon:(0,t.jsx)(eo.f,{"aria-hidden":!0}),isLoading:a,disabled:!m&&!a,"aria-keyshortcuts":null===d?void 0:(0,ed.k)(d),"data-testid":"inbox-reply-send",children:["Send reply",null===d||r?null:(0,t.jsx)(ex.f,{platform:d})]}):(0,t.jsxs)(u.f,{type:"button",variant:"primary",size:r?"touch":"md",icon:(0,t.jsx)(H.f,{"aria-hidden":!0}),isLoading:a,"aria-keyshortcuts":"E","data-testid":"inbox-mark-done",onClick:s,children:["Done",r?null:(0,t.jsx)(R.f,{"aria-hidden":!0,className:"border-primary-foreground/25 bg-primary-foreground/10 text-primary-foreground",children:"E"})]})]})}function eN({message:e,thread:n,isPhone:s,onReply:i,onMarkDone:a,onMarkUnread:r,isPending:o,isReadOnly:l=!1,replyRefusal:d}){let c=new Date(e.sentAt),{sender:m,text:x}=e,h="acknowledged"===e.state,p="keyNotReachable"===e.sealing,f=p||""===x.headline?`Message from ${m.name}`:x.headline;return(0,t.jsxs)("article",{"aria-label":f,"data-testid":"inbox-message",className:"flex min-h-0 grow flex-col",children:[s?null:(0,t.jsxs)("div",{className:"flex items-center gap-2 border-b border-border px-5 py-2.5",children:[(0,t.jsx)("span",{className:"text-meta text-muted-foreground",children:"Message"}),(0,t.jsxs)("span",{className:"ml-auto flex items-center gap-1",children:[h||l?null:(0,t.jsx)(u.f,{variant:"ghost",size:"sm",disabled:o,onClick:r,"data-testid":"inbox-mark-unread",children:"Mark as unread"}),(0,t.jsx)(D,{messageId:e.messageId,shipId:m.id,shipName:m.name,size:"sm"})]})]}),(0,t.jsxs)("div",{className:"flex min-h-0 grow flex-col gap-5 overflow-y-auto px-5 py-5 max-sm:px-0 max-sm:py-3.5",children:[(0,t.jsxs)("header",{className:"flex flex-col gap-1.5",children:[e.isFromPlugin?(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"inline-flex size-7 items-center justify-center rounded-md bg-muted",children:(0,t.jsx)(J.f,{"aria-hidden":!0,className:"size-(--size-icon-sm)"})}),null===m.type?null:(0,t.jsx)(K.f,{variant:"outline",children:m.type})]}):null,(0,t.jsx)("h2",{className:"text-heading font-semibold [overflow-wrap:anywhere] max-sm:text-title-touch",children:p?f:""===x.headline?"No text":x.headline}),(0,t.jsxs)("p",{className:"flex flex-wrap items-center gap-1 text-meta text-muted-foreground",children:[(0,t.jsx)(eu.f,{name:m.name,shipId:m.id,isSuffixShown:m.isNameShared,size:"meta",className:"[&>span:first-child]:text-foreground"}),(0,t.jsx)("span",{"aria-hidden":!0,children:"·"}),(0,t.jsx)("time",{dateTime:e.sentAt,title:(0,v.o)(c),children:(0,v.B)(c)}),null===e.model?null:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{"aria-hidden":!0,children:"·"}),(0,t.jsx)("span",{className:"font-mono text-id",children:e.model})]}),"plain"===e.sealing?null:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{"aria-hidden":!0,children:"·"}),(0,t.jsx)(Y.f,{testId:"inbox-message-sealed"})]})]})]}),(0,t.jsx)(ew,{message:e}),p?(0,t.jsx)(em.f,{testId:"inbox-message-not-reachable"}):(0,t.jsx)(eb,{blocks:x.body,lineCount:x.lineCount}),0===x.links.length?null:(0,t.jsx)("div",{className:"flex flex-col gap-2",children:x.links.map(e=>(0,t.jsx)(ej,{link:e},e.url))}),(0,t.jsx)(ey,{thread:n,message:e})]}),l?(0,t.jsx)("p",{"data-testid":"inbox-read-only",className:"border-t border-border px-5 py-3 text-meta text-muted-foreground",children:"Read-only: you see argo’s inbox, and can’t reply or mark messages done."}):(0,t.jsxs)("div",{className:s?"sticky bottom-0 -mx-4":void 0,children:[void 0===d?null:(0,t.jsx)(O.f,{title:d.title,description:d.description,className:"mx-5 mb-2 max-sm:mx-4"}),(0,t.jsx)(ek,{message:e,onReply:i,onMarkDone:a,isPending:o,isPhone:s},`${e.deliveryId}-${e.state}`)]})]})}var eS=e.i(867927),eI=e.i(422768),eq=e.i(235056),eA=e.i(515281),eC=e.i(212470),eM=e.i(791727),e$=e.i(152678);function ez({deliveryId:e,title:n,onSelect:s,testId:i}){return(0,t.jsx)("button",{type:"button","data-testid":i,onClick:()=>{s(e)},className:"min-w-0 text-left font-medium text-foreground underline underline-offset-2 [overflow-wrap:anywhere] hover:text-primary focus-visible:outline-2 focus-visible:outline-ring",children:n})}function eD({question:e}){let{answer:n,options:s}=e.question;if(null===n)return null;let i=new Date(n.sentAt),a=s.find(({key:e})=>e===n.option);return(0,t.jsxs)("div",{"data-testid":"inbox-answered",className:"flex flex-col gap-1 rounded-md border border-tone-ok-border bg-tone-ok-bg px-3 py-2 text-meta text-tone-ok-fg max-sm:text-body",children:[(0,t.jsxs)("p",{className:"flex items-start gap-2 [&_svg]:mt-0.5 [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0",children:[(0,t.jsx)(P.f,{"aria-hidden":!0}),(0,t.jsxs)("span",{children:["You answered ",void 0===a?"with a note":(0,t.jsx)("span",{className:"font-semibold",children:`${String(a.key)}. ${a.label}`})," at"," ",(0,t.jsx)("time",{dateTime:n.sentAt,title:(0,v.o)(i),children:(0,v.w)(i)}),". ",e.sender.name," receives it as a reply."]})]}),null===n.note?null:(0,t.jsx)("p",{className:"pl-6 whitespace-pre-wrap [overflow-wrap:anywhere]",children:n.note})]})}function eP({question:e,onSelect:n}){let{stale:s}=e;if(null===s)return null;let i=new Date(s.sentAt);return(0,t.jsxs)("div",{role:"status","data-testid":"inbox-stale",className:"flex flex-col gap-1 rounded-md border border-tone-ended-border bg-tone-ended-bg px-3 py-2 text-meta text-tone-ended-fg",children:[(0,t.jsxs)("p",{className:"flex items-center gap-2 [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0",children:["withdrawn"===s.kind?(0,t.jsx)(U.f,{"aria-hidden":!0}):(0,t.jsx)(Q,{"aria-hidden":!0}),(0,t.jsxs)("span",{children:["withdrawn"===s.kind?"Withdrawn":"Replaced"," by ",e.sender.name," at"," ",(0,t.jsx)("time",{dateTime:s.sentAt,title:(0,v.o)(i),children:(0,v.w)(i)}),". It can’t be answered."]})]}),"replaced"===s.kind?(0,t.jsxs)("p",{className:"flex flex-wrap items-baseline gap-1",children:["Answer the new question: ",(0,t.jsx)(ez,{deliveryId:s.deliveryId,title:s.by.title,onSelect:n,testId:"inbox-replacement"})]}):null]})}function eR({option:e,question:n,isChosen:s,isSuggested:i=!1}){let{pick:a}=n.question,r=e.key===a.option;return(0,t.jsxs)("span",{className:"flex min-w-0 flex-col gap-0.5",children:[(0,t.jsxs)("span",{className:"flex flex-wrap items-center gap-2 text-body font-medium text-foreground max-sm:text-body-touch",children:[e.label,r?(0,t.jsx)(K.f,{variant:"outline",children:i?`${n.sender.name}’s pick, not sent`:`${n.sender.name}’s pick`}):null]}),""===e.detail?null:(0,t.jsx)("span",{className:"text-meta text-muted-foreground max-sm:text-body",children:e.detail}),r&&s?(0,t.jsxs)("span",{className:"mt-1.5 rounded-md bg-muted px-3 py-2 text-meta text-foreground max-sm:text-body",children:[(0,t.jsx)("span",{className:"font-semibold",children:"Why:"})," ",a.why]}):null]})}let e_="flex items-start gap-3 rounded-lg border px-4 py-3.5";function eO({question:e}){let{options:n,answer:s}=e.question;return(0,t.jsx)("ol",{"aria-label":"Options",className:"flex flex-col gap-2",children:n.map(n=>{let i=s?.option===n.key;return(0,t.jsx)("li",{"data-testid":`inbox-option-${String(n.key)}`,className:(0,F.f)(e_,i?"border-2 border-primary bg-card":"border-border bg-card"),children:(0,t.jsx)(eR,{option:n,question:e,isChosen:i})},n.key)})})}function eT({message:e}){return(0,t.jsxs)("p",{role:"alert","data-testid":"inbox-answer-failed",className:"flex gap-2 rounded-lg border border-tone-attention-border bg-tone-attention-bg px-3.5 py-2.5 text-meta text-tone-attention-fg max-sm:text-body [&_svg]:mt-0.5 [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0",children:[(0,t.jsx)(eI.f,{"aria-hidden":!0}),(0,t.jsxs)("span",{children:["Your answer was not sent: ",e,". Answer again to send it."]})]})}function eF({question:e,isPhone:n,onAnswer:s,isPending:a,failure:r,draft:o,onDraftChange:l}){let d=(0,i.useId)(),c=`${d}-note`,{options:m,pick:x}=e.question,h=function({failure:e,draft:t}){let n=e?.answer;return void 0!==n?{option:"option"in n?n.option:void 0,note:n.note??""}:t}({failure:r,draft:o}),[p,f]=(0,i.useState)(void 0===h?x.option:h.option),[g,b]=(0,i.useState)(h?.note??""),[j,v]=(0,i.useState)(void 0!==h),[y,w]=(0,i.useState)(!n||""!==g),k=e=>{f(e.option),b(e.note),l?.(e.option===x.option&&""===e.note.trim()?void 0:e)},N=e=>{v(!0),k({option:e,note:g})},S=(0,ed.t)(),I=e.sender.name,q=g.trim(),A=m.find(({key:e})=>e===p),C=function({option:e,hasNote:t}){return void 0===e?t?"Send note":void 0:t?`Answer: ${e}, with note`:`Answer: ${e}`}({option:A?.label,hasNote:""!==q});return(0,t.jsxs)("form",{className:"flex min-h-0 grow flex-col",onSubmit:e=>{e.preventDefault(),void 0===C||a||s(void 0===p?{note:q}:{option:p,...""===q?{}:{note:q}})},children:[(0,t.jsxs)("div",{className:"flex flex-col gap-4 px-5 pb-5 max-sm:px-0",children:[void 0===r?null:(0,t.jsx)(eT,{message:r.message}),(0,t.jsx)(e$.x,{"aria-label":"Options",value:p??0,onValueChange:e=>{N(e)},onClickCapture:e=>{let t=e.target instanceof Element?e.target.closest("[data-option-key]")?.getAttribute("data-option-key"):void 0;null!=t&&Number(t)===p&&(e.preventDefault(),e.stopPropagation(),N(void 0))},className:"flex flex-col gap-2",children:m.map(n=>{let s=`${d}-option-${String(n.key)}`,i=n.key===p,a=i&&!j;return(0,t.jsxs)("div",{"data-testid":`inbox-option-${String(n.key)}`,"data-option-key":n.key,"data-suggested":a?"true":void 0,className:(0,F.f)(e_,"bg-card",a?"border-2 border-dashed border-primary":i?"border-2 border-primary":"border-border"),children:[(0,t.jsx)(e$.a,{id:s,value:n.key,className:"mt-0.5"}),(0,t.jsx)("label",{htmlFor:s,className:"min-w-0 grow cursor-pointer",children:(0,t.jsx)(eR,{option:n,question:e,isChosen:i,isSuggested:a})})]},n.key)})}),n&&y?(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsxs)(eM.f,{htmlFor:c,children:["Note to ",I]}),(0,t.jsx)(ec.f,{id:c,rows:3,size:"touch",value:g,onChange:e=>{k({option:p,note:e.target.value})},"data-testid":"inbox-note"}),(0,t.jsx)("p",{className:"text-body text-muted-foreground",children:"Optional with an option. On its own, it asks for more context or says none fits."})]}):null]}),(0,t.jsxs)("div",{className:"mt-auto flex items-center gap-2 border-t border-border bg-background px-5 py-3 max-sm:sticky max-sm:bottom-0 max-sm:-mx-4 max-sm:px-4 max-sm:pb-[calc(env(safe-area-inset-bottom)+var(--spacing)*3)]",children:[n?y?null:(0,t.jsx)(u.f,{type:"button",variant:"ghost",size:"touch",icon:(0,t.jsx)(eA.f,{"aria-hidden":!0}),"data-testid":"inbox-add-note",onClick:()=>{w(!0)},children:"Add a note"}):(0,t.jsx)(eC.e,{id:c,"aria-label":`Note to ${I}`,placeholder:`Add a note to ${I} (optional)`,value:g,onChange:e=>{k({option:p,note:e.target.value})},onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),(0,ed.v)(e.nativeEvent)&&e.currentTarget.form?.requestSubmit())},className:"grow","data-testid":"inbox-note"}),(0,t.jsxs)(u.f,{type:"submit",variant:"primary",size:n?"touch":"md",icon:(0,t.jsx)(eo.f,{"aria-hidden":!0}),isLoading:a,disabled:void 0===C&&!a,"aria-keyshortcuts":null===S?void 0:(0,ed.k)(S),className:n?"grow":void 0,"data-testid":"inbox-answer",children:[C??"Pick an option or write a note",null===S||n?null:(0,t.jsx)(ex.f,{platform:S})]})]})]})}function eK({position:e,onSelect:n,isPhone:s}){let{next:i}=e;return void 0===i?null:(0,t.jsxs)("div",{className:"mt-auto flex flex-col items-stretch gap-2 border-t border-border bg-background px-5 py-3 max-sm:sticky max-sm:bottom-0 max-sm:-mx-4 max-sm:px-4 max-sm:pb-[calc(env(safe-area-inset-bottom)+var(--spacing)*3)] sm:flex-row sm:items-center sm:justify-end",children:[(0,t.jsx)("p",{className:"text-center text-meta text-muted-foreground max-sm:text-body",children:(0,X.v)(e.left,{one:"question left",many:"questions left"})}),(0,t.jsxs)(u.f,{variant:"primary",size:s?"touch":"md","data-testid":"inbox-next-question",onClick:()=>{n(i)},children:["Next question",(0,t.jsx)(eS.f,{"aria-hidden":!0})]})]})}function eL({question:e,position:n,isPhone:s,onAnswer:i,onSelect:a,isPending:r,now:o,isReadOnly:l=!1,failure:d,draft:c,onDraftChange:m}){let x=new Date(e.sentAt),{title:u,context:h,answer:p}=e.question,f=null===p&&null===e.stale;return(0,t.jsxs)("article",{"aria-label":u,"data-testid":"inbox-question",className:"flex min-h-0 grow flex-col",children:[(0,t.jsxs)("div",{className:(0,F.f)("flex min-h-0 grow flex-col overflow-y-auto",s?void 0:"pt-5"),children:[(0,t.jsxs)("div",{className:"flex flex-col gap-4 px-5 pb-5 max-sm:px-0 max-sm:pt-3.5",children:[(0,t.jsx)(eD,{question:e}),(0,t.jsx)(eP,{question:e,onSelect:a}),(0,t.jsxs)("header",{className:"flex flex-col gap-1.5",children:[f?(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[(0,t.jsxs)(K.f,{variant:"outline",className:"gap-1",children:[(0,t.jsx)(eq.f,{"aria-hidden":!0,className:"size-(--size-icon-sm)"}),"Question"]}),(0,t.jsxs)("span",{className:"text-meta text-muted-foreground","data-testid":"inbox-question-status",children:[(0,t.jsx)("span",{className:"font-medium text-foreground",children:"Not answered"})," · waiting ",(0,v.m)(x,o)]})]}):null,(0,t.jsx)("h2",{className:"text-heading font-semibold [overflow-wrap:anywhere] max-sm:text-title-touch",children:u}),(0,t.jsxs)("p",{className:"flex flex-wrap items-center gap-1 text-meta text-muted-foreground",children:[(0,t.jsx)(eu.f,{name:e.sender.name,shipId:e.sender.id,isSuffixShown:e.sender.isNameShared,size:"meta",className:"[&>span:first-child]:text-foreground"}),"asks ·"," ",(0,t.jsx)("time",{dateTime:e.sentAt,title:(0,v.o)(x),children:(0,v.B)(x)}),"plain"===e.sealing?null:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{"aria-hidden":!0,children:"·"}),(0,t.jsx)(Y.f,{testId:"inbox-question-sealed"})]})]}),null===e.replaces?null:(0,t.jsxs)("p",{className:"flex flex-wrap items-baseline gap-1 text-meta text-muted-foreground",children:["Replaces ",(0,t.jsx)(ez,{deliveryId:e.replaces.deliveryId,title:e.replaces.title,onSelect:a,testId:"inbox-replaces"})]})]}),""===h?null:(0,t.jsx)("p",{className:"text-body whitespace-pre-wrap text-foreground [overflow-wrap:anywhere] max-sm:text-body-touch",children:h}),!f||l?(0,t.jsx)(eO,{question:e}):null]}),f&&!l?(0,t.jsx)(eF,{question:e,isPhone:s,onAnswer:i,isPending:r,failure:d,draft:c,onDraftChange:m},e.deliveryId):null]}),l&&f?(0,t.jsx)("p",{"data-testid":"inbox-read-only",className:"border-t border-border px-5 py-3 text-meta text-muted-foreground",children:"Read-only: you see argo’s questions, and can’t answer them."}):null,f?null:(0,t.jsx)(eK,{position:n,onSelect:a,isPhone:s})]})}function eE({selected:e,isPhone:n,...s}){let i=s.pendingIds.has(e.deliveryId);return"question"===e.kind?(0,t.jsx)(eL,{question:e,position:s.questionPosition??{number:void 0,count:0,next:void 0,left:0},isPhone:n,onAnswer:t=>{s.onAnswer({deliveryId:e.deliveryId,answer:t})},onSelect:s.onSelect,isPending:i,now:s.now,isReadOnly:s.isReadOnly,failure:s.answerFailures?.get(e.deliveryId),draft:s.answerDrafts?.get(e.deliveryId),onDraftChange:t=>{s.onAnswerDraftChange?.({deliveryId:e.deliveryId,draft:t})}},e.deliveryId):(0,t.jsx)(eN,{message:e,thread:s.thread,isPhone:n,onReply:t=>{s.onReply({deliveryId:e.deliveryId,payload:t})},onMarkDone:()=>{s.onMarkDone(e.deliveryId)},onMarkUnread:()=>{s.onMarkUnread(e.deliveryId)},isPending:i,isReadOnly:s.isReadOnly,replyRefusal:s.replyRefusals?.get(e.deliveryId)},e.deliveryId)}function eU({selected:e,questionPosition:n,onMove:s}){if(e?.kind!=="question")return null;let i=n?.number;return(0,t.jsxs)("div",{className:"flex items-center gap-1 border-b border-border px-5 py-2.5",children:[(0,t.jsx)("span",{className:"text-meta text-muted-foreground","data-testid":"inbox-question-position",children:void 0===i?"Question":`Question ${String(i)} of ${String(n?.count??0)}`}),(0,t.jsxs)(u.f,{variant:"ghost",size:"sm",className:"ml-auto","aria-keyshortcuts":"K",onClick:()=>{s("previous")},children:["Previous ",(0,t.jsx)(R.f,{"aria-hidden":!0,children:"K"})]}),(0,t.jsxs)(u.f,{variant:"ghost",size:"sm","aria-keyshortcuts":"J",onClick:()=>{s("next")},children:["Next ",(0,t.jsx)(R.f,{"aria-hidden":!0,children:"J"})]})]})}function eB({segment:e,onSegmentChange:n}){return"open"===e?(0,t.jsx)("div",{"data-testid":"inbox-empty",className:"flex grow items-center justify-center p-6 max-sm:p-0",children:(0,t.jsx)(_.f,{icon:(0,t.jsx)(P.f,{}),title:"Nothing waits for you",description:"New ones show up here as ships send them.",action:(0,t.jsx)(u.f,{variant:"ghost",onClick:()=>{n("done")},children:"See done"})})}):(0,t.jsx)("div",{"data-testid":"inbox-empty",className:"flex grow items-center justify-center p-6 max-sm:p-0",children:(0,t.jsx)(_.f,{icon:(0,t.jsx)(P.f,{}),title:"done"===e?"Nothing done yet":"No messages for you",description:"done"===e?"Questions you answer and messages you mark done show up here.":"When a ship asks argo a question or sends it a message, it shows up here."})})}function eQ(e){return e.questions.length+e.messages.length+e.pluginMessages.length===0}function eY(e){let{state:n,onRetry:s,view:a,segment:r,selected:o,onSelect:l}=e;if(!function({selected:e,onMove:t,onMarkDone:n,isReadOnly:s}){(0,i.useEffect)(()=>{let i=i=>{var a;if(!(i.metaKey||i.ctrlKey||i.altKey||i.isComposing||(a=i.target)instanceof HTMLElement&&(a.isContentEditable||null!==a.closest('input, textarea, select, [role="menu"], [role="dialog"]'))))switch(i.key.toLowerCase()){case"j":i.preventDefault(),t("next");return;case"k":i.preventDefault(),t("previous");return;case"e":e?.kind==="message"&&"acknowledged"!==e.state&&!0!==s&&(i.preventDefault(),n(e.deliveryId));return;case"r":{let e=[...document.querySelectorAll("[data-reply-field]")].find(e=>null!==e.offsetParent);void 0!==e&&(i.preventDefault(),e.focus());return}}};return document.addEventListener("keydown",i),()=>{document.removeEventListener("keydown",i)}},[e,t,n,s])}(e),"loading"===n)return(0,t.jsxs)("div",{"data-slot":"operator-inbox","data-state":"loading",className:"grid gap-4 sm:grid-cols-[minmax(0,2fr)_minmax(0,3fr)]",children:[(0,t.jsx)(T.f,{variant:"list",rows:5,label:"Loading your inbox"}),(0,t.jsx)(T.f,{variant:"detail",label:"Loading the message",className:"max-sm:hidden"})]});if("error"===n)return(0,t.jsx)("div",{"data-slot":"operator-inbox","data-state":"error","data-testid":"inbox-error",children:(0,t.jsx)(O.f,{variant:"page",title:"Couldn’t load your inbox",description:"This page couldn’t reach the fleet server. Messages to argo are stored on the server, so nothing is lost.",onRetry:s})});let d=(0,t.jsx)(es,{...e,selectedId:o?.deliveryId,onSelect:e=>{l(e)}});return(0,t.jsxs)("div",{"data-slot":"operator-inbox","data-state":"ready",className:"flex grow flex-col",children:[(0,t.jsxs)("div",{className:"grid h-[calc(100dvh-12rem)] min-h-128 grid-cols-[minmax(20rem,24rem)_minmax(0,1fr)] overflow-hidden rounded-lg border border-border bg-card max-sm:hidden",children:[(0,t.jsxs)("div",{className:"flex min-h-0 flex-col overflow-y-auto border-r border-border",children:[d,eQ(a)&&!e.more?(0,t.jsx)(eB,{segment:r,onSegmentChange:e.onSegmentChange}):null]}),(0,t.jsx)("div",{className:"flex min-h-0 flex-col bg-background",children:o?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(eU,{selected:o,questionPosition:e.questionPosition,onMove:e.onMove}),(0,t.jsx)(eE,{...e,selected:o,isPhone:!1})]}):(0,t.jsx)("p",{className:"m-auto text-meta text-muted-foreground",children:eQ(a)?null:!0===e.isReadOnly?"Choose a question or message to read it.":"Choose a question to answer it, or a message to read it. J and K move."})})]}),(0,t.jsx)("div",{className:"flex grow flex-col gap-3 sm:hidden","data-hides-tab-bar":o?"":void 0,children:o?(0,t.jsx)(eE,{...e,selected:o,isPhone:!0}):(0,t.jsxs)(t.Fragment,{children:[d,eQ(a)&&!e.more?(0,t.jsx)(eB,{segment:r,onSegmentChange:e.onSegmentChange}):null]})})]})}function eV(e){return e instanceof Error?e.message:"Try again in a moment."}function eW({filterParameter:e,selectedId:S}){var I,q,A;let C,M,$,z,P,R=(0,s.useRouter)(),_=(0,m.f)(),O=(0,l.b)(e),T=(0,l.s)(O),F=(0,l.O)(),K=(0,l.V)(S),L=(0,l.P)(),E=(0,l.c)(),U=(0,l.W)(),B=(0,l.X)(),Q=(0,c.f)(),Y=(0,r.y)(),V=(0,a.Q)();(0,x.n)([Q.error]);let[W,G]=(0,i.useState)(new Set),[H,J]=(0,i.useState)(!1),[X,Z]=(0,i.useState)(!1),[ee,et]=(0,i.useState)(new Map),[en,es]=(0,i.useState)(new Map),[ei,ea]=(0,i.useState)(new Map),er=(0,i.useRef)(S),eo=T.items??[],el=(C=k(A=eo),M=w(A.filter(e=>"message"===e.kind)),{questions:[...y(C.filter(d)),...w(C.filter(e=>!d(e)))],messages:M.filter(e=>!e.isFromPlugin),pluginMessages:M.filter(e=>e.isFromPlugin)}),ed=[...el.questions,...el.messages,...el.pluginMessages].map(({deliveryId:e})=>e),ec=eo.find(e=>e.deliveryId===S)??K,em=N(eo).map(({deliveryId:e})=>e),ex=ec?.kind==="question"?(I=ec.deliveryId,$=em.indexOf(I),z=em.filter(e=>e!==I),P=-1===$?void 0:em[$+1],{number:-1===$?void 0:$+1,count:em.length,next:P??z[0],left:z.length}):void 0,eu=(q=ec?.kind==="message"?ec.inReplyTo:void 0,(0,b.f)({queryKey:[...l.C,"thread",q],queryFn:()=>null==q?Promise.resolve([]):(0,j.f)({read:"inbox-thread",input:{messageId:q}}),enabled:null!=q}).data),eh=e=>{R.replace((0,l.r)({filter:e.segment??O,deliveryId:e.deliveryId}),{scroll:!1})},ep=e=>{eh({deliveryId:e});let t=eo.find(t=>t.deliveryId===e);t?.readAt===null&&"acknowledged"!==t.state&&V.canReceive&&L.mutate({deliveryId:t.deliveryId,isRead:!0})},ef=({deliveryId:e,run:t,failure:n})=>{G(t=>new Set([...t,e])),t().catch(e=>{(0,h._)({title:n,description:eV(e),tone:"error"})}).finally(()=>{G(t=>new Set([...t].filter(t=>t!==e)))})},eg=(e,t)=>{es(n=>{let s=new Map(n);return void 0===t?s.delete(e):s.set(e,t),s})};(0,i.useEffect)(()=>{let e=er.current;if(er.current=S,void 0===e||e===S||!en.has(e))return;let t=T.items?.find(t=>t.deliveryId===e);t?.kind==="question"&&d(t)&&(0,h._)({title:`Your answer to “${t.question.title}” is not sent`,description:"Your choice and note wait on the question. Answer sends them.",tone:"info"})},[S,en,T.items]);let eb=e=>{ef({deliveryId:e,run:()=>L.mutateAsync({deliveryId:e,isRead:!1}),failure:"Couldn’t mark the message unread"}),eh({})},ej=el.pluginMessages.filter(d),ev=void 0===ec?void 0:(0,t.jsx)(g.f,{title:"",live:Q.live,back:{href:(0,l.r)({filter:O}),label:"Inbox"},actions:"question"===ec.kind?ex?.number===void 0?void 0:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("span",{className:"text-body-touch text-muted-foreground","data-testid":"inbox-question-position",children:[ex.number," of ",ex.count]}),void 0===ex.next?null:(0,t.jsx)(u.f,{variant:"ghost",size:"touch",isIconOnly:!0,"aria-label":"Next question",icon:(0,t.jsx)(n.f,{}),"data-testid":"inbox-next-question-top",onClick:()=>{ep(ex.next)}})]}):(0,t.jsx)(D,{messageId:ec.messageId,shipId:ec.sender.id,shipName:ec.sender.name,size:"touch",onMarkUnread:"acknowledged"!==ec.state&&V.canReceive?()=>{eb(ec.deliveryId)}:void 0})});return(0,t.jsx)(f.f,{...Y,title:"Inbox",live:Q.live,phoneTopBar:ev,children:(0,t.jsx)(eY,{state:T.isFailed?"error":void 0===T.items?"loading":"ready",onRetry:T.retry,view:el,segment:O,onSegmentChange:e=>{eh({segment:e})},counts:void 0===F?{}:{open:F},more:T.hasMore?(0,t.jsx)(p.f,{what:"older messages",isLoading:T.isLoadingMore,isFailed:T.isLoadMoreFailed,onLoad:T.loadMore,area:"inbox"}):null,waiting:function(e,t){let[n]=N(e);return void 0===n?void 0:(0,v.m)(new Date(n.sentAt),t)}(eo,_),selected:ec,thread:eu,questionPosition:ex,order:ed,onSelect:ep,onMove:e=>{let t=function(e,{current:t,direction:n}){let s=void 0===t?-1:e.indexOf(t);return -1===s?e[0]:e[Math.min(Math.max(s+("next"===n?1:-1),0),e.length-1)]}(ed,{current:ec?.deliveryId,direction:e});void 0!==t&&t!==ec?.deliveryId&&ep(t)},isPluginGroupExpanded:H,onTogglePluginGroup:()=>{J(e=>!e)},onPluginGroupDone:V.canReceive&&ej.length>0?()=>{Z(!0),Promise.allSettled(ej.map(({deliveryId:e})=>E.mutateAsync({deliveryId:e}))).then(e=>{let t=e.filter(e=>"rejected"===e.status).length;t>0&&(0,h._)({title:"Couldn’t mark every message done",description:`${String(t)} of ${String(e.length)} were not marked done. Try again in a moment.`,tone:"error"})}).finally(()=>{Z(!1)})}:void 0,isPluginGroupPending:X,onMarkDone:e=>{ef({deliveryId:e,run:()=>E.mutateAsync({deliveryId:e}),failure:"Couldn’t mark the message done"})},onMarkUnread:eb,onReply:({deliveryId:e,payload:t})=>{let n=t=>{ea(n=>{let s=new Map(n);return void 0===t?s.delete(e):s.set(e,t),s})};n(void 0),ef({deliveryId:e,run:()=>U.mutateAsync({deliveryId:e,payload:t,idempotencyKey:`reply-${e}-${crypto.randomUUID()}`}).catch(e=>{let t="KEY_UNAVAILABLE"===(0,o.v)(e)?{title:"Couldn’t send your reply",description:"Your company key is not reachable. Nothing was sent; your reply is kept."}:void 0;if(void 0===t)throw e;n(t)}),failure:"Couldn’t send the reply"})},onAnswer:({deliveryId:e,answer:t})=>{let n=function({previous:e,answer:t,newKey:n}){var s;let i,a=void 0!==e&&(s=e.answer,(i=e=>"option"in e?e.option:void 0)(s)===i(t)&&s.note===t.note)?e.idempotencyKey:n;return{answer:t,idempotencyKey:a,failure:void 0}}({previous:ee.get(e),answer:t,newKey:`answer-${e}-${crypto.randomUUID()}`}),s=t=>{et(n=>{let s=new Map(n);return void 0===t?s.delete(e):s.set(e,t),s})};s(n),eg(e,void 0);let i=eo.find(t=>t.deliveryId===e),a=i?.kind==="question"?i.question.title:"the question";G(t=>new Set([...t,e])),B.mutateAsync({deliveryId:e,answer:t,idempotencyKey:n.idempotencyKey}).then(()=>{s(void 0)}).catch(t=>{s({...n,failure:eV(t)}),er.current!==e&&(0,h._)({title:`Your answer to “${a}” was not sent`,description:eV(t),tone:"error"}),T.retry()}).finally(()=>{G(t=>new Set([...t].filter(t=>t!==e)))})},pendingIds:W,answerFailures:function(e){let t=new Map;for(let[n,{answer:s,failure:i}]of e)void 0!==i&&t.set(n,{answer:s,message:i});return t}(ee),replyRefusals:ei,answerDrafts:en,onAnswerDraftChange:({deliveryId:e,draft:t})=>{eg(e,t)},now:_,isReadOnly:!V.canReceive})})}e.s(["InboxPageFor",0,function({filterParameter:e,selectedId:n}){return(0,t.jsx)(eW,{...void 0===e?{}:{filterParameter:e},...void 0===n?{}:{selectedId:n}})}],446964)}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,446964,e=>{"use strict";var t=e.i(843476),n=e.i(716327),s=e.i(618566),i=e.i(271645),a=e.i(490262),r=e.i(787964),o=e.i(46929),l=e.i(586413);function d(e){return"question"===e.kind?null===e.question.answer&&null===e.stale:"acknowledged"!==e.state}var c=e.i(718423),m=e.i(296676),x=e.i(678485),u=e.i(681924),h=e.i(341880),p=e.i(298421),f=e.i(509892),g=e.i(485538),b=e.i(976580),j=e.i(994070),v=e.i(849635);function y(e){return e.toSorted((e,t)=>e.sentAt.localeCompare(t.sentAt))}function w(e){return e.toSorted((e,t)=>t.sentAt.localeCompare(e.sentAt))}function k(e){return e.filter(e=>"question"===e.kind)}function N(e){return y(k(e).filter(d))}var S=e.i(508734),I=e.i(386247),q=e.i(456420);let A={name:"mail-open",size:24,node:[["path",{d:"M21.2 8.4c.5.38.8.97.8 1.6v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V10a2 2 0 0 1 .8-1.6l8-6a2 2 0 0 1 2.4 0l8 6Z",key:"1jhwl8"}],["path",{d:"m22 10-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 10",key:"1qfld7"}]]};A.node;let C=(0,q.f)(A);var M=e.i(749287),$=e.i(522016),z=e.i(646013);function D({messageId:e,shipId:n,shipName:s,onMarkUnread:i,size:a}){return(0,t.jsxs)(z.DropdownMenu,{children:[(0,t.jsx)(z.DropdownMenuTrigger,{render:(0,t.jsx)(u.f,{variant:"ghost",size:a,isIconOnly:!0,"aria-label":"Message actions",icon:(0,t.jsx)(I.f,{}),"data-testid":"inbox-message-menu"})}),(0,t.jsxs)(z.DropdownMenuContent,{align:"end",children:[void 0===i?null:(0,t.jsxs)(z.DropdownMenuItem,{onClick:i,"data-testid":"inbox-mark-unread",children:[(0,t.jsx)(C,{"aria-hidden":!0}),"Mark as unread"]}),(0,t.jsxs)(z.DropdownMenuItem,{"data-testid":"inbox-copy-message-id",onClick:()=>{navigator.clipboard.writeText(e).then(()=>{(0,h._)({title:"Message id copied"})},()=>{(0,h._)({title:"Couldn’t copy the message id",description:e,tone:"error"})})},children:[(0,t.jsx)(S.f,{"aria-hidden":!0}),"Copy message id"]}),(0,t.jsxs)(z.DropdownMenuItem,{render:(0,t.jsx)($.default,{href:`/ships/${n}`}),"data-testid":"inbox-open-ship",children:[(0,t.jsx)(M.f,{"aria-hidden":!0}),"Open ",s]})]})]})}var P=e.i(285595),R=e.i(462372),_=e.i(67874),O=e.i(817981),T=e.i(188393),F=e.i(812437),K=e.i(766390),L=e.i(60592),E=e.i(152886),U=e.i(821048);let B={name:"replace",size:24,node:[["path",{d:"M14 4a1 1 0 0 1 1-1",key:"dhj8ez"}],["path",{d:"M15 10a1 1 0 0 1-1-1",key:"1mnyi5"}],["path",{d:"M21 4a1 1 0 0 0-1-1",key:"sfs9ap"}],["path",{d:"M21 9a1 1 0 0 1-1 1",key:"mp6qeo"}],["path",{d:"m3 7 3 3 3-3",key:"x25e72"}],["path",{d:"M6 10V5a2 2 0 0 1 2-2h2",key:"15xut4"}],["rect",{x:"3",y:"14",width:"7",height:"7",rx:"1",key:"1bkyp8"}]]};B.node;let Q=(0,q.f)(B);var Y=e.i(865713);function V(e){return"keyNotReachable"===e.sealing?"Sealed, key not reachable":e.text.headline}function W({entry:e,now:n}){let{question:s,stale:i}=e,a=s.options.find(({key:e})=>e===s.pick.option);if(null!==s.answer){let e=s.options.find(({key:e})=>e===s.answer?.option);return(0,t.jsxs)("span",{"data-answered":!0,className:"flex min-w-0 items-center gap-1.5 text-meta text-muted-foreground [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0",children:[(0,t.jsx)(P.f,{"aria-hidden":!0}),(0,t.jsx)("span",{className:"truncate",children:void 0===e?"Answered with a note":`Answered: ${String(e.key)}. ${e.label}`})]})}return null!==i?(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5 text-meta text-muted-foreground [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0",children:["withdrawn"===i.kind?(0,t.jsx)(U.f,{"aria-hidden":!0}):(0,t.jsx)(Q,{"aria-hidden":!0}),(0,t.jsx)("span",{className:"truncate",children:"withdrawn"===i.kind?"Withdrawn":"Replaced"})]}):(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5 text-meta text-muted-foreground max-sm:text-body [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0",children:[(0,t.jsx)(E.f,{"aria-hidden":!0}),(0,t.jsxs)("span",{className:"min-w-0 truncate",children:["Not answered, pick: ",(0,t.jsx)("span",{className:"font-medium text-foreground",children:void 0===a?String(s.pick.option):`${String(a.key)}. ${a.label}`})]}),(0,t.jsx)(K.f,{variant:"outline",className:"ml-auto shrink-0 tabular-nums","data-testid":"inbox-row-waiting",children:(0,v.m)(new Date(e.sentAt),n)})]})}function G({entry:e,isSelected:n,onSelect:s,now:i,isNested:a=!1}){let r=new Date(e.sentAt),o=null===e.readAt&&"acknowledged"!==e.state,l="question"===e.kind?e.question.title:V(e),d="keyNotReachable"===e.sealing;return(0,t.jsx)("li",{children:(0,t.jsxs)("button",{type:"button","data-testid":"question"===e.kind?"inbox-question-row":"inbox-row","data-delivery-id":e.deliveryId,"aria-current":n?"true":void 0,onClick:()=>{s(e.deliveryId)},className:(0,F.f)("relative flex w-full min-w-0 flex-col gap-1 border-b border-border py-3 pr-4 pl-7 text-left transition-colors duration-(--duration-fast) outline-none hover:bg-accent focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-ring aria-[current=true]:bg-accent max-sm:py-3.5",a?"pl-10":void 0),children:[o?(0,t.jsx)("span",{"aria-hidden":!0,className:(0,F.f)("absolute top-[1.15rem] size-2 rounded-full bg-primary",a?"left-5":"left-2.5")}):null,(0,t.jsxs)("span",{className:"flex min-w-0 items-baseline gap-2",children:[(0,t.jsx)("span",{className:(0,F.f)("min-w-0 truncate text-meta text-foreground max-sm:text-body",o?"font-medium":"text-muted-foreground"),children:e.sender.name}),(0,t.jsxs)("span",{className:"ml-auto flex shrink-0 items-center gap-1",children:["sealed"===e.sealing?(0,t.jsx)(Y.f,{variant:"icon",testId:"inbox-row-sealed"}):null,(0,t.jsx)("time",{dateTime:e.sentAt,title:(0,v.o)(r),className:"text-meta text-muted-foreground tabular-nums",children:i.getTime()-r.getTime()<864e5?(0,v.w)(r):(0,v.B)(r)})]})]}),(0,t.jsx)("span",{className:(0,F.f)("line-clamp-2 text-body text-foreground [overflow-wrap:anywhere] max-sm:text-body-touch",d?"font-medium text-muted-foreground":o?"font-semibold":"font-medium","question"===e.kind&&null!==e.stale?"text-muted-foreground line-through":void 0),children:""===l?"No text":l}),"question"===e.kind?(0,t.jsx)(W,{entry:e,now:i}):d||""===e.text.summary?null:(0,t.jsx)("span",{className:"truncate text-meta text-muted-foreground max-sm:text-body",children:e.text.summary}),o?(0,t.jsx)("span",{className:"sr-only",children:"Unread"}):null]})})}var H=e.i(689664),J=e.i(841220),X=e.i(890135);function Z({messages:e,isExpanded:s,onToggle:i,selectedId:a,onSelect:r,onDoneAll:o,isPending:l=!1,now:d}){let[c]=e;if(void 0===c)return null;let m=[...new Set(e.map(({sender:e})=>e.name))].join(", "),x=new Date(c.sentAt);return(0,t.jsxs)("li",{"data-testid":"inbox-plugin-group",children:[(0,t.jsxs)("div",{className:"flex items-stretch border-b border-border",children:[(0,t.jsxs)("button",{type:"button","aria-expanded":s,"data-testid":"inbox-plugin-group-toggle",onClick:i,className:"flex min-w-0 grow items-start gap-2 py-3 pr-2 pl-7 text-left transition-colors duration-(--duration-fast) outline-none hover:bg-accent focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-ring",children:[(0,t.jsxs)("span",{className:"flex min-w-0 grow flex-col gap-1",children:[(0,t.jsxs)("span",{className:"flex min-w-0 items-baseline gap-2 text-meta text-muted-foreground max-sm:text-body",children:[(0,t.jsx)(J.f,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0 self-center"}),(0,t.jsx)("span",{className:"min-w-0 truncate",children:m}),(0,t.jsx)("time",{dateTime:c.sentAt,title:(0,v.o)(x),className:"ml-auto shrink-0 tabular-nums",children:(0,v.w)(x)})]}),(0,t.jsx)("span",{className:"text-body font-medium text-foreground max-sm:text-body-touch",children:(0,X.v)(e.length,{one:"message from a plugin ship",many:"messages from plugin ships"})}),s?null:(0,t.jsx)("span",{className:"line-clamp-2 text-meta text-muted-foreground max-sm:text-body",children:e.map(V).join(" · ")})]}),(0,t.jsx)(n.f,{"aria-hidden":!0,className:(0,F.f)("mt-5 size-(--size-icon) shrink-0 text-muted-foreground transition-transform",s?"rotate-180":void 0)})]}),s&&void 0!==o?(0,t.jsx)("span",{className:"flex shrink-0 items-start py-3 pr-3",children:(0,t.jsx)(u.f,{size:"sm",icon:(0,t.jsx)(H.f,{"aria-hidden":!0}),isLoading:l,onClick:o,"data-testid":"inbox-plugin-group-done",children:"Done"})}):null]}),s?(0,t.jsx)("ul",{"aria-label":"Messages from plugin ships",children:e.map(e=>(0,t.jsx)(G,{entry:e,isSelected:e.deliveryId===a,onSelect:r,now:d,isNested:!0},e.deliveryId))}):null]})}let ee=[{value:"open",label:"Open",isDesktopOnly:!1},{value:"done",label:"Done",isDesktopOnly:!1},{value:"all",label:"All",isDesktopOnly:!0}];function et({segment:e,onSegmentChange:n,counts:s}){return(0,t.jsx)(L.i,{value:e,onValueChange:e=>{let t=ee.find(t=>t.value===e);t&&n(t.value)},children:(0,t.jsx)(L.U,{"aria-label":"Show",className:"w-full",children:ee.map(({value:e,label:n,isDesktopOnly:i})=>(0,t.jsxs)(L.k,{value:e,"data-testid":`inbox-filter-${e}`,className:(0,F.f)("grow",i?"max-sm:hidden":void 0),children:[n,void 0===s[e]||"open"!==e&&0===s[e]?null:(0,t.jsx)(L.m,{children:s[e]})]},e))})})}function en({title:e,count:n,isPrimary:s,meta:i}){return(0,t.jsxs)("h2",{className:"flex items-center gap-2 px-4 pt-4 pb-2 text-meta font-semibold text-foreground max-sm:px-1 max-sm:text-body-touch",children:[e,(0,t.jsx)(K.f,{variant:s?"count":"count-neutral",children:n}),void 0===i?null:(0,t.jsx)("span",{className:"ml-auto font-normal text-muted-foreground",children:i})]})}function es({view:e,segment:n,onSegmentChange:s,counts:i,waiting:a,selectedId:r,onSelect:o,isPluginGroupExpanded:l,onTogglePluginGroup:d,onPluginGroupDone:c,isPluginGroupPending:m,more:x,now:u}){let h;return(0,t.jsxs)("div",{"data-slot":"inbox-list",className:"flex flex-col",children:[(0,t.jsx)("div",{className:"p-2.5 max-sm:p-0 max-sm:pb-1",children:(0,t.jsx)(et,{segment:n,onSegmentChange:s,counts:i})}),0===e.questions.length?null:(0,t.jsxs)("section",{"aria-label":"Questions","data-testid":"inbox-questions",children:[(0,t.jsx)(en,{title:"Questions",count:e.questions.length,isPrimary:"open"===n,meta:"open"===n&&void 0!==a?`Oldest waits ${a}`:void 0}),(h=e.questions,(0,t.jsx)("ul",{"aria-label":"Questions to argo",className:"max-sm:overflow-hidden max-sm:rounded-lg max-sm:border max-sm:border-border max-sm:bg-card",children:h.map(e=>(0,t.jsx)(G,{entry:e,isSelected:e.deliveryId===r,onSelect:o,now:u},e.deliveryId))}))]}),e.messages.length+e.pluginMessages.length===0?null:(0,t.jsxs)("section",{"aria-label":"Messages","data-testid":"inbox-messages",children:[(0,t.jsx)(en,{title:"Messages",count:e.messages.length+e.pluginMessages.length,isPrimary:!1}),(0,t.jsxs)("ul",{"aria-label":"Messages to argo",className:"max-sm:overflow-hidden max-sm:rounded-lg max-sm:border max-sm:border-border max-sm:bg-card",children:[e.messages.map(e=>(0,t.jsx)(G,{entry:e,isSelected:e.deliveryId===r,onSelect:o,now:u},e.deliveryId)),(0,t.jsx)(Z,{messages:e.pluginMessages,isExpanded:l,onToggle:d,selectedId:r,onSelect:o,onDoneAll:c,isPending:m,now:u})]})]}),x]})}let ei={name:"external-link",size:24,node:[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]};ei.node;let ea=(0,q.f)(ei);var er=e.i(787703),eo=e.i(730274),el=e.i(559092),ed=e.i(974470),ec=e.i(443988),em=e.i(496755),ex=e.i(631071),eu=e.i(539448);function eh({inline:e}){switch(e.kind){case"text":return e.text;case"strong":return(0,t.jsx)("strong",{className:"font-semibold",children:e.children.map((e,n)=>(0,t.jsx)(eh,{inline:e},`${String(n)}-${e.kind}`))});case"emphasis":return(0,t.jsx)("em",{children:e.children.map((e,n)=>(0,t.jsx)(eh,{inline:e},`${String(n)}-${e.kind}`))});case"delete":return(0,t.jsx)("del",{children:e.children.map((e,n)=>(0,t.jsx)(eh,{inline:e},`${String(n)}-${e.kind}`))});case"code":return(0,t.jsx)("code",{className:"rounded-sm bg-muted px-1 font-mono text-code",children:e.text});case"link":return(0,t.jsx)("a",{href:e.url,target:"_blank",rel:"noreferrer noopener",className:"font-medium text-foreground underline underline-offset-2 [overflow-wrap:anywhere] hover:text-primary focus-visible:outline-2 focus-visible:outline-ring",children:e.children.map((e,n)=>(0,t.jsx)(eh,{inline:e},`${String(n)}-${e.kind}`))});case"break":return(0,t.jsx)("br",{})}}function ep({inlines:e}){return e.map((e,n)=>(0,t.jsx)(eh,{inline:e},`${String(n)}-${e.kind}`))}function ef({block:e}){switch(e.kind){case"paragraph":return(0,t.jsx)("p",{children:(0,t.jsx)(ep,{inlines:e.children})});case"heading":return(0,t.jsx)("p",{className:"font-semibold",children:(0,t.jsx)(ep,{inlines:e.children})});case"list":{let n=e.isOrdered?"ol":"ul";return(0,t.jsx)(n,{start:e.start??void 0,className:(0,F.f)("flex flex-col gap-1 pl-5",e.isOrdered?"list-decimal":"list-disc"),children:e.items.map((e,n)=>(0,t.jsx)("li",{className:"[&>p]:inline",children:(0,t.jsx)(eg,{blocks:e})},`${String(n)}-${String(e.length)}`))})}case"code":return(0,t.jsx)("pre",{className:"overflow-x-auto rounded-md border border-border bg-muted px-3 py-2 font-mono text-code whitespace-pre",children:e.text});case"quote":return(0,t.jsx)("blockquote",{className:"border-l-2 border-border pl-3 text-muted-foreground",children:(0,t.jsx)(eg,{blocks:e.children})});case"table":return(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsx)("table",{className:"text-meta",children:(0,t.jsx)("tbody",{children:e.rows.map((e,n)=>(0,t.jsx)("tr",{className:"border-b border-border",children:e.map((e,n)=>(0,t.jsx)("td",{className:"px-2 py-1 align-top",children:(0,t.jsx)(ep,{inlines:e})},`${String(n)}-${String(e.length)}`))},`${String(n)}-${String(e.length)}`))})})});case"rule":return(0,t.jsx)("hr",{className:"border-border"})}}function eg({blocks:e}){return e.map((e,n)=>(0,t.jsx)(ef,{block:e},`${String(n)}-${e.kind}`))}function eb({blocks:e,lineCount:n,className:s}){let a=n>12,[r,o]=(0,i.useState)(!1);if(0===e.length)return null;let l=a&&!r;return(0,t.jsxs)("div",{className:(0,F.f)("flex flex-col gap-2",s),children:[(0,t.jsx)("div",{"data-testid":"inbox-message-body","data-folded":l?"true":void 0,className:(0,F.f)("flex flex-col gap-3 text-prose text-foreground [overflow-wrap:anywhere] max-sm:text-body-touch",l?"max-h-72 overflow-hidden [mask-image:linear-gradient(to_bottom,black_70%,transparent)]":void 0),children:(0,t.jsx)(eg,{blocks:e})}),l?(0,t.jsxs)(u.f,{variant:"ghost",size:"sm",className:"self-start","data-testid":"inbox-show-all",onClick:()=>{o(!0)},children:["Show all ",n," lines"]}):null]})}function ej({link:e}){return(0,t.jsxs)("a",{href:e.url,target:"_blank",rel:"noreferrer noopener","data-testid":"inbox-link-row",className:"flex max-w-md items-center gap-3 rounded-lg border border-border bg-card px-3.5 py-2.5 transition-colors hover:bg-accent focus-visible:outline-2 focus-visible:outline-ring",children:["pull"===e.kind?(0,t.jsx)(er.f,{"aria-hidden":!0,className:"size-(--size-icon) shrink-0"}):(0,t.jsx)(el.f,{"aria-hidden":!0,className:"size-(--size-icon) shrink-0"}),(0,t.jsxs)("span",{className:"flex min-w-0 grow flex-col",children:[(0,t.jsx)("span",{className:"text-meta font-medium text-foreground",children:"pull"===e.kind?"Pull request":"Issue"}),(0,t.jsxs)("span",{className:"truncate font-mono text-id text-muted-foreground",children:[e.repository," #",e.number]})]}),(0,t.jsx)(ea,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0 text-muted-foreground"})]})}function ev({name:e,isArgo:n,sentAt:s,children:i}){let a=new Date(s);return(0,t.jsxs)("li",{"data-testid":"inbox-thread-message",className:(0,F.f)("flex flex-col gap-1 rounded-lg border px-3.5 py-2.5",n?"ml-10 border-transparent bg-muted max-sm:ml-8":"mr-10 border-border bg-card max-sm:mr-0"),children:[(0,t.jsxs)("p",{className:"text-meta text-muted-foreground",children:[(0,t.jsx)("span",{className:"font-medium text-foreground",children:n?"argo (you)":e})," ·"," ",(0,t.jsx)("time",{dateTime:s,title:(0,v.o)(a),children:(0,v.B)(a)})]}),i]})}function ey({thread:e,message:n}){return(void 0===e||0===e.length)&&0===n.replies.length?null:(0,t.jsxs)("section",{"aria-label":"In this thread",className:"flex max-w-xl flex-col gap-2",children:[void 0===e||0===e.length?null:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("h2",{className:"text-meta text-muted-foreground",children:"In this thread"}),(0,t.jsx)("ul",{className:"flex flex-col gap-2",children:e.map(e=>(0,t.jsxs)(ev,{name:e.sender.name,isArgo:e.isArgo,sentAt:e.sentAt,children:[(0,t.jsx)("p",{className:"text-body font-medium text-foreground [overflow-wrap:anywhere]",children:e.text.headline}),(0,t.jsx)(eb,{blocks:e.text.body,lineCount:e.text.lineCount})]},e.id))})]}),0===n.replies.length?null:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("h2",{className:"text-meta text-muted-foreground",children:"Your replies"}),(0,t.jsx)("ul",{className:"flex flex-col gap-2",children:n.replies.map(e=>(0,t.jsxs)(ev,{name:"argo",isArgo:!0,sentAt:e.sentAt,children:[(0,t.jsx)("p",{className:"text-body text-foreground [overflow-wrap:anywhere]",children:e.text.headline}),(0,t.jsx)(eb,{blocks:e.text.body,lineCount:e.text.lineCount})]},e.id))})]})]})}function ew({message:e}){if(null===e.doneAt)return null;let n=new Date(e.doneAt);return(0,t.jsxs)("p",{"data-testid":"inbox-done-notice",className:"flex items-center gap-2 rounded-md border border-tone-ok-border bg-tone-ok-bg px-3 py-2 text-meta text-tone-ok-fg [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0",children:[(0,t.jsx)(P.f,{"aria-hidden":!0}),"Done at"," ",(0,t.jsx)("time",{dateTime:e.doneAt,title:(0,v.o)(n),children:(0,v.w)(n)}),null===e.repliedWith?".":", when you replied."]})}function ek({message:e,onReply:n,onMarkDone:s,isPending:a,isPhone:r}){let[o,l]=(0,i.useState)(""),d=(0,ed.t)(),c="acknowledged"===e.state,m=""!==o.trim(),x=e.sender.name;return(0,t.jsxs)("form",{"data-testid":"inbox-action-bar",className:"flex items-end gap-2 border-t border-border bg-background px-5 py-3 max-sm:px-4 max-sm:pb-[calc(env(safe-area-inset-bottom)+var(--spacing)*3)]",onSubmit:e=>{e.preventDefault(),m&&!a&&n(o)},children:[(0,t.jsx)(ec.f,{"data-reply-field":!0,rows:m?3:1,size:r?"touch":"md","aria-label":`Reply to ${x}`,placeholder:`Reply to ${x}`,value:o,onChange:e=>{l(e.target.value)},onKeyDown:ed.q,"data-testid":"inbox-reply"}),m||c?(0,t.jsxs)(u.f,{type:"submit",variant:"primary",size:r?"touch":"md",icon:(0,t.jsx)(eo.f,{"aria-hidden":!0}),isLoading:a,disabled:!m&&!a,"aria-keyshortcuts":null===d?void 0:(0,ed.k)(d),"data-testid":"inbox-reply-send",children:["Send reply",null===d||r?null:(0,t.jsx)(ex.f,{platform:d})]}):(0,t.jsxs)(u.f,{type:"button",variant:"primary",size:r?"touch":"md",icon:(0,t.jsx)(H.f,{"aria-hidden":!0}),isLoading:a,"aria-keyshortcuts":"E","data-testid":"inbox-mark-done",onClick:s,children:["Done",r?null:(0,t.jsx)(R.f,{"aria-hidden":!0,className:"border-primary-foreground/25 bg-primary-foreground/10 text-primary-foreground",children:"E"})]})]})}function eN({message:e,thread:n,isPhone:s,onReply:i,onMarkDone:a,onMarkUnread:r,isPending:o,isReadOnly:l=!1,replyRefusal:d}){let c=new Date(e.sentAt),{sender:m,text:x}=e,h="acknowledged"===e.state,p="keyNotReachable"===e.sealing,f=p||""===x.headline?`Message from ${m.name}`:x.headline;return(0,t.jsxs)("article",{"aria-label":f,"data-testid":"inbox-message",className:"flex min-h-0 grow flex-col",children:[s?null:(0,t.jsxs)("div",{className:"flex items-center gap-2 border-b border-border px-5 py-2.5",children:[(0,t.jsx)("span",{className:"text-meta text-muted-foreground",children:"Message"}),(0,t.jsxs)("span",{className:"ml-auto flex items-center gap-1",children:[h||l?null:(0,t.jsx)(u.f,{variant:"ghost",size:"sm",disabled:o,onClick:r,"data-testid":"inbox-mark-unread",children:"Mark as unread"}),(0,t.jsx)(D,{messageId:e.messageId,shipId:m.id,shipName:m.name,size:"sm"})]})]}),(0,t.jsxs)("div",{className:"flex min-h-0 grow flex-col gap-5 overflow-y-auto px-5 py-5 max-sm:px-0 max-sm:py-3.5",children:[(0,t.jsxs)("header",{className:"flex flex-col gap-1.5",children:[e.isFromPlugin?(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"inline-flex size-7 items-center justify-center rounded-md bg-muted",children:(0,t.jsx)(J.f,{"aria-hidden":!0,className:"size-(--size-icon-sm)"})}),null===m.type?null:(0,t.jsx)(K.f,{variant:"outline",children:m.type})]}):null,(0,t.jsx)("h2",{className:"text-heading font-semibold [overflow-wrap:anywhere] max-sm:text-title-touch",children:p?f:""===x.headline?"No text":x.headline}),(0,t.jsxs)("p",{className:"flex flex-wrap items-center gap-1 text-meta text-muted-foreground",children:[(0,t.jsx)(eu.f,{name:m.name,shipId:m.id,isSuffixShown:m.isNameShared,size:"meta",className:"[&>span:first-child]:text-foreground"}),(0,t.jsx)("span",{"aria-hidden":!0,children:"·"}),(0,t.jsx)("time",{dateTime:e.sentAt,title:(0,v.o)(c),children:(0,v.B)(c)}),null===e.model?null:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{"aria-hidden":!0,children:"·"}),(0,t.jsx)("span",{className:"font-mono text-id",children:e.model})]}),"plain"===e.sealing?null:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{"aria-hidden":!0,children:"·"}),(0,t.jsx)(Y.f,{testId:"inbox-message-sealed"})]})]})]}),(0,t.jsx)(ew,{message:e}),p?(0,t.jsx)(em.f,{testId:"inbox-message-not-reachable"}):(0,t.jsx)(eb,{blocks:x.body,lineCount:x.lineCount}),0===x.links.length?null:(0,t.jsx)("div",{className:"flex flex-col gap-2",children:x.links.map(e=>(0,t.jsx)(ej,{link:e},e.url))}),(0,t.jsx)(ey,{thread:n,message:e})]}),l?(0,t.jsx)("p",{"data-testid":"inbox-read-only",className:"border-t border-border px-5 py-3 text-meta text-muted-foreground",children:"Read-only: you see argo’s inbox, and can’t reply or mark messages done."}):(0,t.jsxs)("div",{className:s?"sticky bottom-0 -mx-4":void 0,children:[void 0===d?null:(0,t.jsx)(O.f,{title:d.title,description:d.description,className:"mx-5 mb-2 max-sm:mx-4"}),(0,t.jsx)(ek,{message:e,onReply:i,onMarkDone:a,isPending:o,isPhone:s},`${e.deliveryId}-${e.state}`)]})]})}var eS=e.i(867927),eI=e.i(422768),eq=e.i(235056),eA=e.i(515281),eC=e.i(527256),eM=e.i(375773),e$=e.i(152678);function ez({deliveryId:e,title:n,onSelect:s,testId:i}){return(0,t.jsx)("button",{type:"button","data-testid":i,onClick:()=>{s(e)},className:"min-w-0 text-left font-medium text-foreground underline underline-offset-2 [overflow-wrap:anywhere] hover:text-primary focus-visible:outline-2 focus-visible:outline-ring",children:n})}function eD({question:e}){let{answer:n,options:s}=e.question;if(null===n)return null;let i=new Date(n.sentAt),a=s.find(({key:e})=>e===n.option);return(0,t.jsxs)("div",{"data-testid":"inbox-answered",className:"flex flex-col gap-1 rounded-md border border-tone-ok-border bg-tone-ok-bg px-3 py-2 text-meta text-tone-ok-fg max-sm:text-body",children:[(0,t.jsxs)("p",{className:"flex items-start gap-2 [&_svg]:mt-0.5 [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0",children:[(0,t.jsx)(P.f,{"aria-hidden":!0}),(0,t.jsxs)("span",{children:["You answered ",void 0===a?"with a note":(0,t.jsx)("span",{className:"font-semibold",children:`${String(a.key)}. ${a.label}`})," at"," ",(0,t.jsx)("time",{dateTime:n.sentAt,title:(0,v.o)(i),children:(0,v.w)(i)}),". ",e.sender.name," receives it as a reply."]})]}),null===n.note?null:(0,t.jsx)("p",{className:"pl-6 whitespace-pre-wrap [overflow-wrap:anywhere]",children:n.note})]})}function eP({question:e,onSelect:n}){let{stale:s}=e;if(null===s)return null;let i=new Date(s.sentAt);return(0,t.jsxs)("div",{role:"status","data-testid":"inbox-stale",className:"flex flex-col gap-1 rounded-md border border-tone-ended-border bg-tone-ended-bg px-3 py-2 text-meta text-tone-ended-fg",children:[(0,t.jsxs)("p",{className:"flex items-center gap-2 [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0",children:["withdrawn"===s.kind?(0,t.jsx)(U.f,{"aria-hidden":!0}):(0,t.jsx)(Q,{"aria-hidden":!0}),(0,t.jsxs)("span",{children:["withdrawn"===s.kind?"Withdrawn":"Replaced"," by ",e.sender.name," at"," ",(0,t.jsx)("time",{dateTime:s.sentAt,title:(0,v.o)(i),children:(0,v.w)(i)}),". It can’t be answered."]})]}),"replaced"===s.kind?(0,t.jsxs)("p",{className:"flex flex-wrap items-baseline gap-1",children:["Answer the new question: ",(0,t.jsx)(ez,{deliveryId:s.deliveryId,title:s.by.title,onSelect:n,testId:"inbox-replacement"})]}):null]})}function eR({option:e,question:n,isChosen:s,isSuggested:i=!1}){let{pick:a}=n.question,r=e.key===a.option;return(0,t.jsxs)("span",{className:"flex min-w-0 flex-col gap-0.5",children:[(0,t.jsxs)("span",{className:"flex flex-wrap items-center gap-2 text-body font-medium text-foreground max-sm:text-body-touch",children:[e.label,r?(0,t.jsx)(K.f,{variant:"outline",children:i?`${n.sender.name}’s pick, not sent`:`${n.sender.name}’s pick`}):null]}),""===e.detail?null:(0,t.jsx)("span",{className:"text-meta text-muted-foreground max-sm:text-body",children:e.detail}),r&&s?(0,t.jsxs)("span",{className:"mt-1.5 rounded-md bg-muted px-3 py-2 text-meta text-foreground max-sm:text-body",children:[(0,t.jsx)("span",{className:"font-semibold",children:"Why:"})," ",a.why]}):null]})}let e_="flex items-start gap-3 rounded-lg border px-4 py-3.5";function eO({question:e}){let{options:n,answer:s}=e.question;return(0,t.jsx)("ol",{"aria-label":"Options",className:"flex flex-col gap-2",children:n.map(n=>{let i=s?.option===n.key;return(0,t.jsx)("li",{"data-testid":`inbox-option-${String(n.key)}`,className:(0,F.f)(e_,i?"border-2 border-primary bg-card":"border-border bg-card"),children:(0,t.jsx)(eR,{option:n,question:e,isChosen:i})},n.key)})})}function eT({message:e}){return(0,t.jsxs)("p",{role:"alert","data-testid":"inbox-answer-failed",className:"flex gap-2 rounded-lg border border-tone-attention-border bg-tone-attention-bg px-3.5 py-2.5 text-meta text-tone-attention-fg max-sm:text-body [&_svg]:mt-0.5 [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0",children:[(0,t.jsx)(eI.f,{"aria-hidden":!0}),(0,t.jsxs)("span",{children:["Your answer was not sent: ",e,". Answer again to send it."]})]})}function eF({question:e,isPhone:n,onAnswer:s,isPending:a,failure:r,draft:o,onDraftChange:l}){let d=(0,i.useId)(),c=`${d}-note`,{options:m,pick:x}=e.question,h=function({failure:e,draft:t}){let n=e?.answer;return void 0!==n?{option:"option"in n?n.option:void 0,note:n.note??""}:t}({failure:r,draft:o}),[p,f]=(0,i.useState)(void 0===h?x.option:h.option),[g,b]=(0,i.useState)(h?.note??""),[j,v]=(0,i.useState)(void 0!==h),[y,w]=(0,i.useState)(!n||""!==g),k=e=>{f(e.option),b(e.note),l?.(e.option===x.option&&""===e.note.trim()?void 0:e)},N=e=>{v(!0),k({option:e,note:g})},S=(0,ed.t)(),I=e.sender.name,q=g.trim(),A=m.find(({key:e})=>e===p),C=function({option:e,hasNote:t}){return void 0===e?t?"Send note":void 0:t?`Answer: ${e}, with note`:`Answer: ${e}`}({option:A?.label,hasNote:""!==q});return(0,t.jsxs)("form",{className:"flex min-h-0 grow flex-col",onSubmit:e=>{e.preventDefault(),void 0===C||a||s(void 0===p?{note:q}:{option:p,...""===q?{}:{note:q}})},children:[(0,t.jsxs)("div",{className:"flex flex-col gap-4 px-5 pb-5 max-sm:px-0",children:[void 0===r?null:(0,t.jsx)(eT,{message:r.message}),(0,t.jsx)(e$.x,{"aria-label":"Options",value:p??0,onValueChange:e=>{N(e)},onClickCapture:e=>{let t=e.target instanceof Element?e.target.closest("[data-option-key]")?.getAttribute("data-option-key"):void 0;null!=t&&Number(t)===p&&(e.preventDefault(),e.stopPropagation(),N(void 0))},className:"flex flex-col gap-2",children:m.map(n=>{let s=`${d}-option-${String(n.key)}`,i=n.key===p,a=i&&!j;return(0,t.jsxs)("div",{"data-testid":`inbox-option-${String(n.key)}`,"data-option-key":n.key,"data-suggested":a?"true":void 0,className:(0,F.f)(e_,"bg-card",a?"border-2 border-dashed border-primary":i?"border-2 border-primary":"border-border"),children:[(0,t.jsx)(e$.a,{id:s,value:n.key,className:"mt-0.5"}),(0,t.jsx)("label",{htmlFor:s,className:"min-w-0 grow cursor-pointer",children:(0,t.jsx)(eR,{option:n,question:e,isChosen:i,isSuggested:a})})]},n.key)})}),n&&y?(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsxs)(eM.f,{htmlFor:c,children:["Note to ",I]}),(0,t.jsx)(ec.f,{id:c,rows:3,size:"touch",value:g,onChange:e=>{k({option:p,note:e.target.value})},"data-testid":"inbox-note"}),(0,t.jsx)("p",{className:"text-body text-muted-foreground",children:"Optional with an option. On its own, it asks for more context or says none fits."})]}):null]}),(0,t.jsxs)("div",{className:"mt-auto flex items-center gap-2 border-t border-border bg-background px-5 py-3 max-sm:sticky max-sm:bottom-0 max-sm:-mx-4 max-sm:px-4 max-sm:pb-[calc(env(safe-area-inset-bottom)+var(--spacing)*3)]",children:[n?y?null:(0,t.jsx)(u.f,{type:"button",variant:"ghost",size:"touch",icon:(0,t.jsx)(eA.f,{"aria-hidden":!0}),"data-testid":"inbox-add-note",onClick:()=>{w(!0)},children:"Add a note"}):(0,t.jsx)(eC.e,{id:c,"aria-label":`Note to ${I}`,placeholder:`Add a note to ${I} (optional)`,value:g,onChange:e=>{k({option:p,note:e.target.value})},onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),(0,ed.v)(e.nativeEvent)&&e.currentTarget.form?.requestSubmit())},className:"grow","data-testid":"inbox-note"}),(0,t.jsxs)(u.f,{type:"submit",variant:"primary",size:n?"touch":"md",icon:(0,t.jsx)(eo.f,{"aria-hidden":!0}),isLoading:a,disabled:void 0===C&&!a,"aria-keyshortcuts":null===S?void 0:(0,ed.k)(S),className:n?"grow":void 0,"data-testid":"inbox-answer",children:[C??"Pick an option or write a note",null===S||n?null:(0,t.jsx)(ex.f,{platform:S})]})]})]})}function eK({position:e,onSelect:n,isPhone:s}){let{next:i}=e;return void 0===i?null:(0,t.jsxs)("div",{className:"mt-auto flex flex-col items-stretch gap-2 border-t border-border bg-background px-5 py-3 max-sm:sticky max-sm:bottom-0 max-sm:-mx-4 max-sm:px-4 max-sm:pb-[calc(env(safe-area-inset-bottom)+var(--spacing)*3)] sm:flex-row sm:items-center sm:justify-end",children:[(0,t.jsx)("p",{className:"text-center text-meta text-muted-foreground max-sm:text-body",children:(0,X.v)(e.left,{one:"question left",many:"questions left"})}),(0,t.jsxs)(u.f,{variant:"primary",size:s?"touch":"md","data-testid":"inbox-next-question",onClick:()=>{n(i)},children:["Next question",(0,t.jsx)(eS.f,{"aria-hidden":!0})]})]})}function eL({question:e,position:n,isPhone:s,onAnswer:i,onSelect:a,isPending:r,now:o,isReadOnly:l=!1,failure:d,draft:c,onDraftChange:m}){let x=new Date(e.sentAt),{title:u,context:h,answer:p}=e.question,f=null===p&&null===e.stale;return(0,t.jsxs)("article",{"aria-label":u,"data-testid":"inbox-question",className:"flex min-h-0 grow flex-col",children:[(0,t.jsxs)("div",{className:(0,F.f)("flex min-h-0 grow flex-col overflow-y-auto",s?void 0:"pt-5"),children:[(0,t.jsxs)("div",{className:"flex flex-col gap-4 px-5 pb-5 max-sm:px-0 max-sm:pt-3.5",children:[(0,t.jsx)(eD,{question:e}),(0,t.jsx)(eP,{question:e,onSelect:a}),(0,t.jsxs)("header",{className:"flex flex-col gap-1.5",children:[f?(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[(0,t.jsxs)(K.f,{variant:"outline",className:"gap-1",children:[(0,t.jsx)(eq.f,{"aria-hidden":!0,className:"size-(--size-icon-sm)"}),"Question"]}),(0,t.jsxs)("span",{className:"text-meta text-muted-foreground","data-testid":"inbox-question-status",children:[(0,t.jsx)("span",{className:"font-medium text-foreground",children:"Not answered"})," · waiting ",(0,v.m)(x,o)]})]}):null,(0,t.jsx)("h2",{className:"text-heading font-semibold [overflow-wrap:anywhere] max-sm:text-title-touch",children:u}),(0,t.jsxs)("p",{className:"flex flex-wrap items-center gap-1 text-meta text-muted-foreground",children:[(0,t.jsx)(eu.f,{name:e.sender.name,shipId:e.sender.id,isSuffixShown:e.sender.isNameShared,size:"meta",className:"[&>span:first-child]:text-foreground"}),"asks ·"," ",(0,t.jsx)("time",{dateTime:e.sentAt,title:(0,v.o)(x),children:(0,v.B)(x)}),"plain"===e.sealing?null:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{"aria-hidden":!0,children:"·"}),(0,t.jsx)(Y.f,{testId:"inbox-question-sealed"})]})]}),null===e.replaces?null:(0,t.jsxs)("p",{className:"flex flex-wrap items-baseline gap-1 text-meta text-muted-foreground",children:["Replaces ",(0,t.jsx)(ez,{deliveryId:e.replaces.deliveryId,title:e.replaces.title,onSelect:a,testId:"inbox-replaces"})]})]}),""===h?null:(0,t.jsx)("p",{className:"text-body whitespace-pre-wrap text-foreground [overflow-wrap:anywhere] max-sm:text-body-touch",children:h}),!f||l?(0,t.jsx)(eO,{question:e}):null]}),f&&!l?(0,t.jsx)(eF,{question:e,isPhone:s,onAnswer:i,isPending:r,failure:d,draft:c,onDraftChange:m},e.deliveryId):null]}),l&&f?(0,t.jsx)("p",{"data-testid":"inbox-read-only",className:"border-t border-border px-5 py-3 text-meta text-muted-foreground",children:"Read-only: you see argo’s questions, and can’t answer them."}):null,f?null:(0,t.jsx)(eK,{position:n,onSelect:a,isPhone:s})]})}function eE({selected:e,isPhone:n,...s}){let i=s.pendingIds.has(e.deliveryId);return"question"===e.kind?(0,t.jsx)(eL,{question:e,position:s.questionPosition??{number:void 0,count:0,next:void 0,left:0},isPhone:n,onAnswer:t=>{s.onAnswer({deliveryId:e.deliveryId,answer:t})},onSelect:s.onSelect,isPending:i,now:s.now,isReadOnly:s.isReadOnly,failure:s.answerFailures?.get(e.deliveryId),draft:s.answerDrafts?.get(e.deliveryId),onDraftChange:t=>{s.onAnswerDraftChange?.({deliveryId:e.deliveryId,draft:t})}},e.deliveryId):(0,t.jsx)(eN,{message:e,thread:s.thread,isPhone:n,onReply:t=>{s.onReply({deliveryId:e.deliveryId,payload:t})},onMarkDone:()=>{s.onMarkDone(e.deliveryId)},onMarkUnread:()=>{s.onMarkUnread(e.deliveryId)},isPending:i,isReadOnly:s.isReadOnly,replyRefusal:s.replyRefusals?.get(e.deliveryId)},e.deliveryId)}function eU({selected:e,questionPosition:n,onMove:s}){if(e?.kind!=="question")return null;let i=n?.number;return(0,t.jsxs)("div",{className:"flex items-center gap-1 border-b border-border px-5 py-2.5",children:[(0,t.jsx)("span",{className:"text-meta text-muted-foreground","data-testid":"inbox-question-position",children:void 0===i?"Question":`Question ${String(i)} of ${String(n?.count??0)}`}),(0,t.jsxs)(u.f,{variant:"ghost",size:"sm",className:"ml-auto","aria-keyshortcuts":"K",onClick:()=>{s("previous")},children:["Previous ",(0,t.jsx)(R.f,{"aria-hidden":!0,children:"K"})]}),(0,t.jsxs)(u.f,{variant:"ghost",size:"sm","aria-keyshortcuts":"J",onClick:()=>{s("next")},children:["Next ",(0,t.jsx)(R.f,{"aria-hidden":!0,children:"J"})]})]})}function eB({segment:e,onSegmentChange:n}){return"open"===e?(0,t.jsx)("div",{"data-testid":"inbox-empty",className:"flex grow items-center justify-center p-6 max-sm:p-0",children:(0,t.jsx)(_.f,{icon:(0,t.jsx)(P.f,{}),title:"Nothing waits for you",description:"New ones show up here as ships send them.",action:(0,t.jsx)(u.f,{variant:"ghost",onClick:()=>{n("done")},children:"See done"})})}):(0,t.jsx)("div",{"data-testid":"inbox-empty",className:"flex grow items-center justify-center p-6 max-sm:p-0",children:(0,t.jsx)(_.f,{icon:(0,t.jsx)(P.f,{}),title:"done"===e?"Nothing done yet":"No messages for you",description:"done"===e?"Questions you answer and messages you mark done show up here.":"When a ship asks argo a question or sends it a message, it shows up here."})})}function eQ(e){return e.questions.length+e.messages.length+e.pluginMessages.length===0}function eY(e){let{state:n,onRetry:s,view:a,segment:r,selected:o,onSelect:l}=e;if(!function({selected:e,onMove:t,onMarkDone:n,isReadOnly:s}){(0,i.useEffect)(()=>{let i=i=>{var a;if(!(i.metaKey||i.ctrlKey||i.altKey||i.isComposing||(a=i.target)instanceof HTMLElement&&(a.isContentEditable||null!==a.closest('input, textarea, select, [role="menu"], [role="dialog"]'))))switch(i.key.toLowerCase()){case"j":i.preventDefault(),t("next");return;case"k":i.preventDefault(),t("previous");return;case"e":e?.kind==="message"&&"acknowledged"!==e.state&&!0!==s&&(i.preventDefault(),n(e.deliveryId));return;case"r":{let e=[...document.querySelectorAll("[data-reply-field]")].find(e=>null!==e.offsetParent);void 0!==e&&(i.preventDefault(),e.focus());return}}};return document.addEventListener("keydown",i),()=>{document.removeEventListener("keydown",i)}},[e,t,n,s])}(e),"loading"===n)return(0,t.jsxs)("div",{"data-slot":"operator-inbox","data-state":"loading",className:"grid gap-4 sm:grid-cols-[minmax(0,2fr)_minmax(0,3fr)]",children:[(0,t.jsx)(T.f,{variant:"list",rows:5,label:"Loading your inbox"}),(0,t.jsx)(T.f,{variant:"detail",label:"Loading the message",className:"max-sm:hidden"})]});if("error"===n)return(0,t.jsx)("div",{"data-slot":"operator-inbox","data-state":"error","data-testid":"inbox-error",children:(0,t.jsx)(O.f,{variant:"page",title:"Couldn’t load your inbox",description:"This page couldn’t reach the fleet server. Messages to argo are stored on the server, so nothing is lost.",onRetry:s})});let d=(0,t.jsx)(es,{...e,selectedId:o?.deliveryId,onSelect:e=>{l(e)}});return(0,t.jsxs)("div",{"data-slot":"operator-inbox","data-state":"ready",className:"flex grow flex-col",children:[(0,t.jsxs)("div",{className:"grid h-[calc(100dvh-12rem)] min-h-128 grid-cols-[minmax(20rem,24rem)_minmax(0,1fr)] overflow-hidden rounded-lg border border-border bg-card max-sm:hidden",children:[(0,t.jsxs)("div",{className:"flex min-h-0 flex-col overflow-y-auto border-r border-border",children:[d,eQ(a)&&!e.more?(0,t.jsx)(eB,{segment:r,onSegmentChange:e.onSegmentChange}):null]}),(0,t.jsx)("div",{className:"flex min-h-0 flex-col bg-background",children:o?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(eU,{selected:o,questionPosition:e.questionPosition,onMove:e.onMove}),(0,t.jsx)(eE,{...e,selected:o,isPhone:!1})]}):(0,t.jsx)("p",{className:"m-auto text-meta text-muted-foreground",children:eQ(a)?null:!0===e.isReadOnly?"Choose a question or message to read it.":"Choose a question to answer it, or a message to read it. J and K move."})})]}),(0,t.jsx)("div",{className:"flex grow flex-col gap-3 sm:hidden","data-hides-tab-bar":o?"":void 0,children:o?(0,t.jsx)(eE,{...e,selected:o,isPhone:!0}):(0,t.jsxs)(t.Fragment,{children:[d,eQ(a)&&!e.more?(0,t.jsx)(eB,{segment:r,onSegmentChange:e.onSegmentChange}):null]})})]})}function eV(e){return e instanceof Error?e.message:"Try again in a moment."}function eW({filterParameter:e,selectedId:S}){var I,q,A;let C,M,$,z,P,R=(0,s.useRouter)(),_=(0,m.f)(),O=(0,l.b)(e),T=(0,l.s)(O),F=(0,l.O)(),K=(0,l.V)(S),L=(0,l.P)(),E=(0,l.c)(),U=(0,l.W)(),B=(0,l.X)(),Q=(0,c.f)(),Y=(0,r.y)(),V=(0,a.Q)();(0,x.n)([Q.error]);let[W,G]=(0,i.useState)(new Set),[H,J]=(0,i.useState)(!1),[X,Z]=(0,i.useState)(!1),[ee,et]=(0,i.useState)(new Map),[en,es]=(0,i.useState)(new Map),[ei,ea]=(0,i.useState)(new Map),er=(0,i.useRef)(S),eo=T.items??[],el=(C=k(A=eo),M=w(A.filter(e=>"message"===e.kind)),{questions:[...y(C.filter(d)),...w(C.filter(e=>!d(e)))],messages:M.filter(e=>!e.isFromPlugin),pluginMessages:M.filter(e=>e.isFromPlugin)}),ed=[...el.questions,...el.messages,...el.pluginMessages].map(({deliveryId:e})=>e),ec=eo.find(e=>e.deliveryId===S)??K,em=N(eo).map(({deliveryId:e})=>e),ex=ec?.kind==="question"?(I=ec.deliveryId,$=em.indexOf(I),z=em.filter(e=>e!==I),P=-1===$?void 0:em[$+1],{number:-1===$?void 0:$+1,count:em.length,next:P??z[0],left:z.length}):void 0,eu=(q=ec?.kind==="message"?ec.inReplyTo:void 0,(0,b.f)({queryKey:[...l.C,"thread",q],queryFn:()=>null==q?Promise.resolve([]):(0,j.f)({read:"inbox-thread",input:{messageId:q}}),enabled:null!=q}).data),eh=e=>{R.replace((0,l.r)({filter:e.segment??O,deliveryId:e.deliveryId}),{scroll:!1})},ep=e=>{eh({deliveryId:e});let t=eo.find(t=>t.deliveryId===e);t?.readAt===null&&"acknowledged"!==t.state&&V.canReceive&&L.mutate({deliveryId:t.deliveryId,isRead:!0})},ef=({deliveryId:e,run:t,failure:n})=>{G(t=>new Set([...t,e])),t().catch(e=>{(0,h._)({title:n,description:eV(e),tone:"error"})}).finally(()=>{G(t=>new Set([...t].filter(t=>t!==e)))})},eg=(e,t)=>{es(n=>{let s=new Map(n);return void 0===t?s.delete(e):s.set(e,t),s})};(0,i.useEffect)(()=>{let e=er.current;if(er.current=S,void 0===e||e===S||!en.has(e))return;let t=T.items?.find(t=>t.deliveryId===e);t?.kind==="question"&&d(t)&&(0,h._)({title:`Your answer to “${t.question.title}” is not sent`,description:"Your choice and note wait on the question. Answer sends them.",tone:"info"})},[S,en,T.items]);let eb=e=>{ef({deliveryId:e,run:()=>L.mutateAsync({deliveryId:e,isRead:!1}),failure:"Couldn’t mark the message unread"}),eh({})},ej=el.pluginMessages.filter(d),ev=void 0===ec?void 0:(0,t.jsx)(g.f,{title:"",live:Q.live,back:{href:(0,l.r)({filter:O}),label:"Inbox"},actions:"question"===ec.kind?ex?.number===void 0?void 0:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("span",{className:"text-body-touch text-muted-foreground","data-testid":"inbox-question-position",children:[ex.number," of ",ex.count]}),void 0===ex.next?null:(0,t.jsx)(u.f,{variant:"ghost",size:"touch",isIconOnly:!0,"aria-label":"Next question",icon:(0,t.jsx)(n.f,{}),"data-testid":"inbox-next-question-top",onClick:()=>{ep(ex.next)}})]}):(0,t.jsx)(D,{messageId:ec.messageId,shipId:ec.sender.id,shipName:ec.sender.name,size:"touch",onMarkUnread:"acknowledged"!==ec.state&&V.canReceive?()=>{eb(ec.deliveryId)}:void 0})});return(0,t.jsx)(f.f,{...Y,title:"Inbox",live:Q.live,phoneTopBar:ev,children:(0,t.jsx)(eY,{state:T.isFailed?"error":void 0===T.items?"loading":"ready",onRetry:T.retry,view:el,segment:O,onSegmentChange:e=>{eh({segment:e})},counts:void 0===F?{}:{open:F},more:T.hasMore?(0,t.jsx)(p.f,{what:"older messages",isLoading:T.isLoadingMore,isFailed:T.isLoadMoreFailed,onLoad:T.loadMore,area:"inbox"}):null,waiting:function(e,t){let[n]=N(e);return void 0===n?void 0:(0,v.m)(new Date(n.sentAt),t)}(eo,_),selected:ec,thread:eu,questionPosition:ex,order:ed,onSelect:ep,onMove:e=>{let t=function(e,{current:t,direction:n}){let s=void 0===t?-1:e.indexOf(t);return -1===s?e[0]:e[Math.min(Math.max(s+("next"===n?1:-1),0),e.length-1)]}(ed,{current:ec?.deliveryId,direction:e});void 0!==t&&t!==ec?.deliveryId&&ep(t)},isPluginGroupExpanded:H,onTogglePluginGroup:()=>{J(e=>!e)},onPluginGroupDone:V.canReceive&&ej.length>0?()=>{Z(!0),Promise.allSettled(ej.map(({deliveryId:e})=>E.mutateAsync({deliveryId:e}))).then(e=>{let t=e.filter(e=>"rejected"===e.status).length;t>0&&(0,h._)({title:"Couldn’t mark every message done",description:`${String(t)} of ${String(e.length)} were not marked done. Try again in a moment.`,tone:"error"})}).finally(()=>{Z(!1)})}:void 0,isPluginGroupPending:X,onMarkDone:e=>{ef({deliveryId:e,run:()=>E.mutateAsync({deliveryId:e}),failure:"Couldn’t mark the message done"})},onMarkUnread:eb,onReply:({deliveryId:e,payload:t})=>{let n=t=>{ea(n=>{let s=new Map(n);return void 0===t?s.delete(e):s.set(e,t),s})};n(void 0),ef({deliveryId:e,run:()=>U.mutateAsync({deliveryId:e,payload:t,idempotencyKey:`reply-${e}-${crypto.randomUUID()}`}).catch(e=>{let t="KEY_UNAVAILABLE"===(0,o.v)(e)?{title:"Couldn’t send your reply",description:"Your company key is not reachable. Nothing was sent; your reply is kept."}:void 0;if(void 0===t)throw e;n(t)}),failure:"Couldn’t send the reply"})},onAnswer:({deliveryId:e,answer:t})=>{let n=function({previous:e,answer:t,newKey:n}){var s;let i,a=void 0!==e&&(s=e.answer,(i=e=>"option"in e?e.option:void 0)(s)===i(t)&&s.note===t.note)?e.idempotencyKey:n;return{answer:t,idempotencyKey:a,failure:void 0}}({previous:ee.get(e),answer:t,newKey:`answer-${e}-${crypto.randomUUID()}`}),s=t=>{et(n=>{let s=new Map(n);return void 0===t?s.delete(e):s.set(e,t),s})};s(n),eg(e,void 0);let i=eo.find(t=>t.deliveryId===e),a=i?.kind==="question"?i.question.title:"the question";G(t=>new Set([...t,e])),B.mutateAsync({deliveryId:e,answer:t,idempotencyKey:n.idempotencyKey}).then(()=>{s(void 0)}).catch(t=>{s({...n,failure:eV(t)}),er.current!==e&&(0,h._)({title:`Your answer to “${a}” was not sent`,description:eV(t),tone:"error"}),T.retry()}).finally(()=>{G(t=>new Set([...t].filter(t=>t!==e)))})},pendingIds:W,answerFailures:function(e){let t=new Map;for(let[n,{answer:s,failure:i}]of e)void 0!==i&&t.set(n,{answer:s,message:i});return t}(ee),replyRefusals:ei,answerDrafts:en,onAnswerDraftChange:({deliveryId:e,draft:t})=>{eg(e,t)},now:_,isReadOnly:!V.canReceive})})}e.s(["InboxPageFor",0,function({filterParameter:e,selectedId:n}){return(0,t.jsx)(eW,{...void 0===e?{}:{filterParameter:e},...void 0===n?{}:{selectedId:n}})}],446964)}]);
@@ -1 +1 @@
1
- (()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,716327,e=>{var t=e.i(456420);let a={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};a.node;let s=(0,t.f)(a);e.s(["f",0,s],716327)},24071,e=>{var t=e.i(456420);let a={name:"chevron-left",size:24,node:[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]};a.node;let s=(0,t.f)(a);e.s(["f",0,s],24071)},867927,e=>{var t=e.i(456420);let a={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};a.node;let s=(0,t.f)(a);e.s(["f",0,s],867927)},77071,e=>{var t=e.i(456420);let a={name:"plus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]};a.node;let s=(0,t.f)(a);e.s(["f",0,s],77071)},825398,e=>{var t=e.i(456420);let a={name:"rotate-cw",size:24,node:[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]};a.node;let s=(0,t.f)(a);e.s(["f",0,s],825398)},566595,e=>{var t=e.i(456420);let a={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};a.node;let s=(0,t.f)(a);e.s(["f",0,s],566595)},819759,e=>{var t=e.i(456420);let a={name:"square-pen",size:24,node:[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],aliases:["pen-box","edit","pen-square"]};a.node;let s=(0,t.f)(a);e.s(["f",0,s],819759)},137529,e=>{e.s(["E",0,["alert","awaitingCrew","blocked","working","idle"],"V",0,function(e){return e.hasOpenAlert?"alert":"awaitingCrew"===e.status?"awaitingCrew":"blocked"===e.reportState?"blocked":"working"===e.reportState?"working":"idle"}])},846980,e=>{var t=e.i(843476),a=e.i(509892),s=e.i(668269),n=e.i(749092),i=e.i(190437),r=e.i(442111),l=e.i(296676),d=e.i(849635),o=e.i(714695),c=e.i(500265),u=e.i(586448),m=e.i(427702),h=e.i(516634),p=e.i(812437),f=e.i(219321),x=e.i(817981),g=e.i(867927),b=e.i(522016),y=e.i(766390),j=e.i(681924),v=e.i(298421),w=e.i(78865),N=e.i(38614);function k({place:e}){return"ship"===e.kind?(0,t.jsx)("span",{className:"font-medium text-foreground",children:e.ship.name}):(0,t.jsx)(y.f,{variant:"type",children:e.type})}function C({total:e,read:a,notes:s,now:n}){let{cause:i,count:r}=e;return(0,t.jsxs)("section",{"aria-label":(0,w.g)(i),"data-testid":"health-cause","data-cause":i,className:"flex flex-col gap-3 rounded-lg border border-border bg-card p-3",children:[(0,t.jsxs)("header",{className:"flex items-start justify-between gap-3",children:[(0,t.jsxs)(b.default,{href:(0,h.M)(i),className:"group inline-flex items-center gap-1.5 rounded-md","data-testid":"health-cause-open",children:[(0,t.jsx)(w.T,{status:i}),(0,t.jsx)(g.f,{"aria-hidden":!0,className:"size-(--size-icon-sm) text-muted-foreground group-hover:text-foreground"}),(0,t.jsxs)("span",{className:"sr-only",children:["Open the deliveries ",(0,w.g)(i).toLowerCase()]})]}),(0,t.jsx)("span",{className:"text-metric font-semibold tabular-nums text-foreground max-sm:text-title-touch",children:r})]}),(0,t.jsx)("p",{className:"text-body text-muted-foreground max-sm:text-body-touch",children:h.A[i]}),a.isFailed?(0,t.jsx)(x.f,{title:"Couldn’t load where they wait",description:"Nothing changed in the fleet. The page tries again by itself.",onRetry:a.onRetry}):void 0===a.places?(0,t.jsxs)("div",{role:"status","data-testid":"health-places-loading",children:[(0,t.jsx)("span",{className:"sr-only",children:"Loading where they wait"}),(0,t.jsx)(f.f,{className:"h-16 w-full rounded-lg"})]}):(0,t.jsx)(S,{places:a.places,notes:s,now:n}),void 0!==a.places&&a.hasMore&&(0,t.jsx)(v.f,{what:"more places",isLoading:a.isLoadingMore,isFailed:a.isLoadMoreFailed,onLoad:a.onLoadMore,area:"health-places"})]})}function S({places:e,notes:a,now:s}){return(0,t.jsxs)("div",{className:"grid grid-cols-[minmax(0,1fr)_minmax(0,1.2fr)_auto] gap-x-4 max-sm:grid-cols-1",children:[(0,t.jsxs)("div",{className:"col-span-3 grid grid-cols-subgrid items-center text-caption font-medium text-muted-foreground max-sm:col-span-1",children:[(0,t.jsx)("span",{className:"max-sm:hidden",children:"Where, how long"}),(0,t.jsx)(N.q,{}),(0,t.jsx)("span",{className:"text-right max-sm:hidden",children:"Next step"})]}),(0,t.jsx)("ul",{className:"col-span-3 grid grid-cols-subgrid divide-y divide-border max-sm:col-span-1",children:e.map(e=>{let n=(0,h.F)(e),i=a.get(e),r=(0,d.m)(new Date(e.oldestSince),s);return(0,t.jsxs)("li",{"data-testid":"health-place",className:"col-span-3 grid grid-cols-subgrid items-center gap-y-2 py-3 last:pb-0 max-sm:col-span-1",children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-0.5",children:[(0,t.jsx)(k,{place:e.place}),(0,t.jsxs)("span",{className:"text-meta tabular-nums text-muted-foreground",children:[e.count," · oldest ",r]})]}),(0,t.jsx)(N.B,{waits:e.deliveries.map(e=>(0,h.Y)(e.since,s)),label:`${String(e.count)} waiting, the oldest ${r}`}),(0,t.jsx)(j.f,{variant:"secondary",size:"sm",nativeButton:!1,render:(0,t.jsx)(b.default,{href:n.href}),className:"max-sm:h-(--size-control-touch) max-sm:w-full max-sm:text-body-touch","data-testid":"health-next-step",children:n.label}),void 0!==i&&(0,t.jsx)("p",{className:"col-span-3 text-meta text-muted-foreground max-sm:col-span-1",children:i})]},`${e.cause}-${"ship"===e.place.kind?e.place.ship.id:e.place.type}`)})})]})}function M({perHour:e}){let a=Math.max(1,...e.map(e=>e.count));return(0,t.jsx)("div",{role:"img","aria-label":`Acknowledged per hour over the last 24 hours, at most ${Math.max(0,...e.map(e=>e.count))} in an hour`,"data-testid":"health-acknowledged-bars",className:"flex h-8 w-full items-end gap-0.5 sm:w-48",children:e.map(e=>(0,t.jsx)("span",{className:"min-h-0.5 flex-1 rounded-xs bg-tone-ok-fg opacity-75",style:{height:`${e.count/a*100}%`}},e.at))})}function z({acknowledged:e}){return(0,t.jsxs)("section",{"aria-label":"Delivering","data-testid":"health-delivering",className:"flex items-center gap-4 rounded-lg border border-border bg-card p-3 max-sm:flex-col max-sm:items-start max-sm:gap-3",children:[(0,t.jsx)(w.T,{status:"delivering"}),(0,t.jsx)("p",{className:"flex-1 text-body text-foreground max-sm:text-body-touch",children:null===e.medianMs?"Nothing acknowledged in the last 24 h.":(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"font-semibold tabular-nums",children:e.count})," acknowledged in the last 24 h, median"," ",(0,t.jsx)("span",{className:"font-semibold tabular-nums",children:(0,h.n)(e.medianMs,d.m)})," from send to acknowledgement."]})}),(0,t.jsx)(M,{perHour:e.perHour})]})}function I({perHour:e,marks:a}){let s=Math.max(5,5*Math.ceil(Math.max(0,...e.map(e=>e.count))/5)),n=Math.max(e.length-1,1),i=e=>100-e/s*100,[r]=e,l=e.slice(1).map((e,t)=>`H${(t+1)/n*1e3} V${i(e.count)}`),o=[`M0 ${i(r?.count??0)}`,...l].join(" "),c=`${o} H1000 V100 H0 Z`,u=e.at(-1)?.count??0,m=e.flatMap((e,t)=>t%24==12?[{index:t,label:(0,d.L)(new Date(e.at))}]:[]);return(0,t.jsxs)("figure",{"data-testid":"health-trend",className:"flex min-w-0 flex-col gap-2",children:[(0,t.jsx)("figcaption",{className:"text-meta font-medium text-foreground",children:"Stuck deliveries, last 7 days, per hour"}),(0,t.jsxs)("div",{className:"grid grid-cols-[auto_1fr] gap-x-2",children:[(0,t.jsx)("div",{"aria-hidden":!0,className:"relative h-36 w-5 text-caption tabular-nums text-muted-foreground",children:[s,s/2,0].map(e=>(0,t.jsx)("span",{className:"absolute right-0 -translate-y-1/2",style:{top:`${100-e/s*100}%`},children:e},e))}),(0,t.jsxs)("div",{className:"relative h-36",children:[(0,t.jsxs)("svg",{role:"img","aria-label":`Stuck deliveries per hour over the last 7 days: ${u} now, at most ${Math.max(0,...e.map(e=>e.count))}`,viewBox:"0 0 1000 100",preserveAspectRatio:"none",className:"size-full overflow-visible",children:[[0,s/2,s].map(e=>(0,t.jsx)("line",{x1:0,x2:1e3,y1:i(e),y2:i(e),className:"stroke-border",vectorEffect:"non-scaling-stroke"},e)),(0,t.jsx)("path",{d:c,className:"fill-tone-waiting-bg"}),(0,t.jsx)("path",{d:o,className:"fill-none stroke-tone-waiting-fg",strokeWidth:2,strokeLinejoin:"round",vectorEffect:"non-scaling-stroke"})]}),a.map(a=>(0,t.jsx)("span",{"aria-hidden":!0,"data-testid":"health-trend-mark",className:"absolute flex size-4 -translate-x-1/2 -translate-y-1/2 items-center justify-center rounded-full border-2 border-foreground bg-card text-micro font-semibold text-foreground max-sm:hidden",style:{left:`${a.hour/n*100}%`,top:`${i(e[a.hour]?.count??0)/100*100}%`},children:a.number},a.number)),(0,t.jsx)("span",{"aria-hidden":!0,className:"absolute size-2 -translate-1/2 rounded-full bg-tone-waiting-fg",style:{left:"100%",top:`${i(u)/100*100}%`}})]}),(0,t.jsx)("div",{"aria-hidden":!0,className:"relative col-start-2 h-4 text-caption text-muted-foreground",children:m.map(e=>(0,t.jsx)("span",{className:"absolute -translate-x-1/2 whitespace-nowrap max-sm:[&:nth-child(even)]:hidden",style:{left:`${e.index/n*100}%`},children:e.label},e.index))})]}),a.length>0&&(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:a.map((e,a)=>(0,t.jsxs)("span",{children:[a>0&&" · ",(0,t.jsx)("span",{className:"font-semibold text-foreground",children:e.number})," ",e.label]},e.number))})]})}function $({summary:e,stuckPerHour:a,places:s}){let n=(0,h.i)({summary:e,stuckPerHour:a});return(0,t.jsxs)("section",{"aria-label":"Verdict","data-testid":"health-verdict","data-verdict":n.kind,className:"grid gap-6 rounded-lg border border-border bg-card p-3 lg:grid-cols-[minmax(0,2fr)_minmax(0,3fr)] max-sm:gap-4",children:[(0,t.jsxs)("div",{className:"flex flex-col items-start gap-3",children:[(0,t.jsx)(w.T,{status:n.kind}),"stuck"===n.kind?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("p",{className:"text-section font-semibold text-foreground",children:[(0,t.jsx)("span",{className:"text-metric tabular-nums max-sm:text-title-touch","data-testid":"health-stuck-count",children:n.count})," ",1===n.count?"delivery":"deliveries"," stuck in ",n.places," ",1===n.places?"place":"places"]}),(0,t.jsxs)("p",{className:"text-body text-muted-foreground max-sm:text-body-touch",children:["Stuck since ",(0,d.B)(new Date(n.since)),". ",(0,h.S)(n)]}),(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:"Nothing is lost: each one is stored and moves on as soon as its cause is gone."})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"text-section font-semibold text-foreground",children:"Delivering. Nothing is stuck."}),(0,t.jsx)("p",{className:"text-body text-muted-foreground max-sm:text-body-touch",children:"Every delivery waits only on its ship to take it."})]})]}),(0,t.jsx)(I,{perHour:a,marks:(0,h.f)({places:s,stuckPerHour:a})})]})}var q=e.i(841220),D=e.i(721039);function F({machines:e,stuckByMachine:a,renderLiveness:s}){return(0,t.jsxs)("section",{"aria-labelledby":"health-machines","data-testid":"health-machines",className:"flex flex-col gap-3 rounded-lg border border-border bg-card p-3",children:[(0,t.jsxs)("header",{className:"flex flex-wrap items-baseline justify-between gap-2",children:[(0,t.jsx)("h2",{id:"health-machines",className:"text-section font-semibold text-foreground",children:"Machines"}),(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:"Each machine runs a trierarch that crews ships."})]}),(0,t.jsx)("ul",{className:"flex flex-col divide-y divide-border",children:e.map(e=>{let n=a.get(e.id)??0;return(0,t.jsxs)("li",{"data-testid":"health-machine",className:"flex flex-wrap items-center gap-x-4 gap-y-2 py-3 first:pt-0 last:pb-0 max-sm:gap-x-2",children:[(0,t.jsxs)("span",{className:"inline-flex min-w-40 items-center gap-2 font-medium text-foreground",children:[(0,t.jsx)(q.f,{"aria-hidden":!0,className:"size-(--size-icon) text-muted-foreground"}),e.name]}),(0,t.jsx)("span",{className:"min-w-0 flex-1",children:s(e)}),(0,t.jsxs)("span",{className:"text-meta text-muted-foreground",children:[e.ships," ",1===e.ships?"ship":"ships",n>0&&(0,t.jsxs)(t.Fragment,{children:[" · ",(0,t.jsxs)("span",{className:"font-semibold text-foreground",children:[n," ",1===n?"delivery":"deliveries"," stuck on its ships"]})]})]}),n>0&&(0,t.jsx)(j.f,{variant:"secondary",size:"sm",nativeButton:!1,render:(0,t.jsx)(b.default,{href:`/trierarchs/${e.id}`}),className:"max-sm:h-(--size-control-touch) max-sm:w-full",children:"Open machine"}),e.notOffered?.map(({harness:e,reason:a})=>(0,t.jsx)("div",{className:"basis-full",children:(0,t.jsx)(D.f,{harness:e,reason:a})},e))]},e.id)})})]})}function R({label:e,className:a}){return(0,t.jsxs)("div",{role:"status","data-testid":"health-part-loading",children:[(0,t.jsx)("span",{className:"sr-only",children:e}),(0,t.jsx)(f.f,{className:(0,p.f)("w-full rounded-lg",a)})]})}function K({summary:e,places:a,stuckPerHour:s,acknowledged:n,notes:i,machines:r,renderLiveness:l,children:d,now:o}){let c=void 0===e.data?void 0:(0,h.Q)(e.data),u=Object.values(a).flatMap(e=>e.places??[]);return(0,t.jsxs)("div",{"data-testid":"health-board",className:"flex flex-col gap-5 max-sm:gap-3.5",children:[e.isError||s.isError?(0,t.jsx)(x.f,{title:"Couldn’t load where deliveries are stuck",description:"Nothing changed in the fleet. The page tries again by itself.",onRetry:()=>{for(let t of[e,s])t.isError&&t.onRetry()}}):void 0===e.data||void 0===s.data?(0,t.jsx)(R,{label:"Loading the verdict",className:"h-44"}):(0,t.jsx)($,{summary:e.data,stuckPerHour:s.data,places:u}),n.isError?(0,t.jsx)(x.f,{title:"Couldn’t load the deliveries acknowledged",description:"Nothing changed in the fleet. The page tries again by itself.",onRetry:n.onRetry}):void 0===n.data?(0,t.jsx)(R,{label:"Loading the deliveries acknowledged",className:"h-16"}):(0,t.jsx)(z,{acknowledged:n.data}),void 0===c?e.isError?null:(0,t.jsx)(R,{label:"Loading where deliveries are stuck",className:"h-40"}):c.length>0&&(0,t.jsx)("div",{className:"grid gap-5 lg:grid-cols-2 max-sm:gap-3.5",children:c.map(e=>(0,t.jsx)(C,{total:e,read:a[e.cause],notes:i,now:o},e.cause))}),void 0!==e.data&&void 0!==r&&r.length>0&&(0,t.jsx)(F,{machines:r,stuckByMachine:(0,h.g)(e.data),renderLiveness:l}),d]})}function A({renderLiveness:e,children:a}){var p;let f,x,g,b=(0,l.f)(),y=(0,i.A)(),j=e=>y.data?.byCause.some(t=>t.cause===e)??!1,v={noShipCanTake:T((0,i.W)("noShipCanTake",j("noShipCanTake"))),waitingForCrew:T((0,i.W)("waitingForCrew",j("waitingForCrew"))),stalledInFlight:T((0,i.W)("stalledInFlight",j("stalledInFlight"))),undeliverable:T((0,i.W)("undeliverable",j("undeliverable")))},w=(0,i.j)(),N=(0,i.K)(),k=(0,n.f)().data?.retention.keptFrom??null,C=(0,c.t)(),S=Object.values(v).flatMap(e=>e.places??[]),M=(0,r.K)(S.flatMap(({place:e})=>"ship"===e.kind?[e.ship.id]:[])),z=(p=(C.data??[]).map(e=>e.shipId),f=(0,m.I)(),x=(0,u.f)({queries:p.map(e=>f.fleet.shipCounts.queryOptions({filter:{assignedTo:[e]}}))}),g=new Map,p.forEach((e,t)=>{let a=x[t]?.data;void 0!==a&&g.set(e,a.reduce((e,t)=>e+t.active,0))}),g),I=new Map;for(let e of S){let t="ship"===e.place.kind?M?.get(e.place.ship.id):void 0,a=(0,h.l)(e,{facts:t&&{lastSeenAt:t.lastSeenAt},since:e=>(0,d.W)(e,b)});null!==a&&I.set(e,a)}let $=new Map((C.data??[]).map(e=>[e.shipId,e])),q=(0,o.O)(C.data??[]),D=C.data?.map(e=>({id:e.shipId,name:e.name,ships:z.get(e.shipId)??0,notOffered:q.filter(t=>t.machineId===e.shipId)}));return(0,t.jsxs)(K,{summary:L(y),places:v,stuckPerHour:L(w),acknowledged:L(N),notes:I,machines:D,renderLiveness:t=>{let a=$.get(t.id);return void 0===a?null:e(a)},now:b,children:[a,(0,t.jsx)(s.f,{keptFrom:k,area:"health"})]})}function L(e){return{data:e.data,isError:e.isError,onRetry:()=>{e.refetch()}}}function T(e){return{places:e.items,isFailed:e.isFailed,onRetry:e.retry,hasMore:e.hasMore,isLoadingMore:e.isLoadingMore,isLoadMoreFailed:e.isLoadMoreFailed,onLoadMore:e.loadMore}}var O=e.i(784294),H=e.i(219249),Q=e.i(781830),W=e.i(1935);function B({members:e,ships:a,now:s,viewerFleetId:n,renderAction:i}){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:r})=>{let{lastSeenAt:l}=r.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._,{health:"silent"}),(0,t.jsx)("span",{className:"font-medium",children:r.name})]}),(0,t.jsx)(W.f,{squadronId:e,role:r.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,d.m)(new Date(l),s)}`}),(0,t.jsxs)("span",{className:"text-muted-foreground",children:["checks in ",(0,O.P)(r.checkInMinutes)]})]}),(0,t.jsx)("span",{className:"grow",children:(0,t.jsx)(Q.f,{report:a.get(r.shipId)?.report??null,now:s,variant:"row",viewerFleetId:n,testId:"silent-member-report"})}),i?.({squadronId:e,member:r}),(0,t.jsxs)(b.default,{href:`/squadrons/${e}`,className:"inline-flex items-center gap-1 text-meta font-medium hover:underline",children:["Open",(0,t.jsx)(g.f,{"aria-hidden":!0,className:"size-(--size-icon-sm)"})]})]},r.shipId)})})}var E=e.i(566297),_=e.i(36556),P=e.i(490262),U=e.i(787964),G=e.i(718423),V=e.i(743006),Y=e.i(678485),J=e.i(853573),Z=e.i(448695);e.s(["default",0,function(){let e=(0,l.f)(),s=(0,V.f)(),n=(0,U.y)(),d=(0,G.f)(),o=(0,i.A)(),c=(0,P.Q)(),u=(0,Z.p)(),m=(0,O.C)(u.data??[]),h=(0,J.J)(m.map(({member:e})=>e.shipId)),p=(0,r.K)(m.map(({member:e})=>e.shipId))??new Map;return(0,Y.n)([o.error,d.error]),(0,t.jsx)(a.f,{...n,title:"Health",description:"Where deliveries wait, since when, and what lets them move.",live:d.live,children:(0,t.jsx)(A,{renderLiveness:a=>(0,t.jsx)(_.W,{machine:a,now:e}),children:m.length>0?(0,t.jsxs)("section",{"aria-labelledby":"health-silent",className:"flex flex-col gap-2",children:[(0,t.jsxs)("h2",{id:"health-silent",className:"text-section font-semibold text-foreground",children:["Silent members (",m.length,")"]}),(0,t.jsx)(B,{members:m,ships:p,now:e,viewerFleetId:s,renderAction:c.canManage?({squadronId:e,member:a})=>(0,t.jsx)(E.a,{squadronId:e,member:a,ship:h.get(a.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."})]}):null})})}],846980)},219321,e=>{var t=e.i(843476),a=e.i(812437);e.s(["f",0,function({className:e,...s}){return(0,t.jsx)("div",{"data-slot":"skeleton","aria-hidden":!0,className:(0,a.f)("animate-pulse rounded-sm bg-secondary [animation-duration:var(--duration-pulse)] motion-reduce:animate-none",e),...s})}])},219249,e=>{var t=e.i(843476),a=e.i(812437);let s={"on-time":{label:"On time",dot:"bg-tone-ok-fg",text:"text-tone-ok-fg"},late:{label:"Late",dot:"bg-tone-waiting-fg",text:"text-tone-waiting-fg"},silent:{label:"Silent",dot:"bg-tone-attention-fg",text:"text-tone-attention-fg"},"standing-down":{label:"Standing down",dot:"bg-tone-active-fg",text:"text-tone-active-fg"},"not-on-station":{label:"Not on station",dot:"border border-dashed border-muted-foreground",text:"text-foreground"}};function n({health:e}){return(0,t.jsx)("span",{"aria-hidden":!0,className:(0,a.f)("size-2 shrink-0 rounded-full",s[e].dot)})}e.s(["_",0,function({health:e,detail:i,className:r}){return(0,t.jsxs)("span",{"data-slot":"health-indicator","data-health":e,className:(0,a.f)("inline-flex items-center gap-1.5 text-meta",r),children:[(0,t.jsx)(n,{health:e}),(0,t.jsx)("span",{className:(0,a.f)("font-medium",s[e].text),children:s[e].label}),void 0!==i&&(0,t.jsx)("span",{className:"text-muted-foreground",children:i})]})},"T",0,function({counts:e,className:i}){return(0,t.jsx)("span",{"data-slot":"health-summary",className:(0,a.f)("inline-flex flex-wrap items-center gap-x-3 gap-y-1 text-meta",i),children:e.map(({health:e,count:a})=>(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,t.jsx)(n,{health:e}),(0,t.jsxs)("span",{children:[a," ",s[e].label.toLowerCase()]})]},e))})}])},668269,e=>{var t=e.i(843476),a=e.i(456420);let s={name:"rotate-ccw-clock",size:24,node:[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],aliases:["history"]};s.node;let n=(0,a.f)(s);var i=e.i(516752);e.s(["f",0,function({keptFrom:e,area:a}){return null===e?null:(0,t.jsxs)("p",{"data-testid":`${a}-kept-from`,className:"flex items-start gap-2 text-meta text-muted-foreground",children:[(0,t.jsx)(n,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon-sm) shrink-0"}),(0,t.jsx)("span",{children:(0,i.z)(e)})]})}],668269)},817981,e=>{var t=e.i(843476),a=e.i(422768),s=e.i(456420);let n={name:"cloud-off",size:24,node:[["path",{d:"M10.94 5.274A7 7 0 0 1 15.71 10h1.79a4.5 4.5 0 0 1 4.222 6.057",key:"1uxyv8"}],["path",{d:"M18.796 18.81A4.5 4.5 0 0 1 17.5 19H9A7 7 0 0 1 5.79 5.78",key:"99tcn7"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]};n.node;let i=(0,s.f)(n);var r=e.i(825398),l=e.i(681924),d=e.i(812437);e.s(["f",0,function({title:e,description:s,detail:n,onRetry:o,isRetrying:c=!1,variant:u="section",id:m,className:h}){return"field"===u?(0,t.jsxs)("p",{id:m,"data-slot":"inline-error","data-variant":u,className:(0,d.f)("flex items-center gap-1.5 text-meta text-destructive-text [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0",h),children:[(0,t.jsx)(a.f,{"aria-hidden":!0}),e]}):"section"===u?(0,t.jsxs)("div",{role:"alert","data-slot":"inline-error","data-variant":u,className:(0,d.f)("flex gap-2 rounded-lg border border-tone-attention-border bg-tone-attention-bg p-3 text-tone-attention-fg",h),children:[(0,t.jsx)(a.f,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon) shrink-0"}),(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("p",{className:"text-body font-medium",children:e}),s?(0,t.jsx)("p",{className:"text-meta text-foreground",children:s}):null,o?(0,t.jsx)(l.f,{size:"xs",icon:(0,t.jsx)(r.f,{"aria-hidden":!0}),isLoading:c,onClick:o,className:"self-start",children:c?"Trying again…":"Try again"}):null]})]}):(0,t.jsxs)("div",{role:"alert","data-slot":"inline-error","data-variant":u,className:(0,d.f)("flex flex-col items-center gap-3 rounded-lg border border-border bg-card px-6 py-10 text-center",h),children:[(0,t.jsx)("span",{"aria-hidden":!0,className:"flex size-10 items-center justify-center rounded-lg border border-tone-attention-border bg-tone-attention-bg text-tone-attention-fg [&_svg]:size-(--size-icon-xl)",children:(0,t.jsx)(i,{})}),(0,t.jsx)("h2",{className:"text-heading font-semibold text-foreground max-sm:text-heading-touch",children:e}),s?(0,t.jsx)("p",{className:"max-w-96 text-meta text-muted-foreground max-sm:text-body-touch",children:s}):null,n?(0,t.jsx)("code",{className:"rounded-sm border border-border bg-muted px-2 py-0.5 font-mono text-id text-muted-foreground",children:n}):null,o?(0,t.jsx)("div",{className:"flex items-center gap-2 max-sm:w-full max-sm:flex-col",children:(0,t.jsx)(l.f,{size:"sm",icon:(0,t.jsx)(r.f,{"aria-hidden":!0}),onClick:o,className:"max-sm:w-full",children:"Try again"})}):null]})}],817981)},298421,568290,e=>{var t=e.i(843476),a=e.i(456420);let s={name:"chevrons-down",size:24,node:[["path",{d:"m7 6 5 5 5-5",key:"1lc07p"}],["path",{d:"m7 13 5 5 5-5",key:"1d48rs"}]]};s.node;let n=(0,a.f)(s);e.s(["f",0,n],568290);var i=e.i(681924),r=e.i(817981);e.s(["f",0,function({what:e,isLoading:a,isFailed:s,onLoad:l,area:d}){return s?(0,t.jsx)(r.f,{title:`Couldn’t load ${e}`,description:"What is shown stays as it is. Try again in a moment.",onRetry:l,className:"m-3"}):(0,t.jsx)("div",{className:"flex justify-center border-t border-border px-3.5 py-2.5",children:(0,t.jsx)(i.f,{size:"sm",variant:"ghost",icon:(0,t.jsx)(n,{"aria-hidden":!0}),isLoading:a,onClick:l,"data-testid":`${d}-load-more`,children:a?`Loading ${e}...`:`Load ${e}`})})}],298421)},1935,e=>{var t=e.i(843476),a=e.i(660011),s=e.i(522016),n=e.i(812437);e.s(["f",0,function({squadronId:e,role:i,size:r="md",className:l}){return(0,t.jsxs)(s.default,{href:`/squadrons/${e}`,"data-slot":"squadron-tag",className:(0,n.f)("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",l),children:[(0,t.jsx)(a.f,{"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]})]})}])},577880,485538,e=>{var t=e.i(843476),a=e.i(566595),s=e.i(371951),n=e.i(681924),i=e.i(462372),r=e.i(505792),l=e.i(812437);function d({switcher:e,switcherLayout:o="full",account:c,onSearch:u,searchLabel:m="Search or jump to",search:h="trigger",children:p,actions:f,className:x}){let g=u?"field"===h?(0,t.jsx)(n.f,{variant:"secondary",size:"md",icon:(0,t.jsx)(a.f,{"aria-hidden":!0}),"data-testid":"header-search",onClick:u,className:"w-50 justify-start font-normal text-muted-foreground outline-none focus-visible:outline-2 focus-visible:outline-ring",children:(0,t.jsx)("span",{className:"truncate",children:m})}):(0,t.jsxs)(n.f,{size:"sm",icon:(0,t.jsx)(a.f,{"aria-hidden":!0}),"data-testid":"header-search",className:"w-60 justify-start font-normal text-muted-foreground max-lg:w-auto",onClick:u,children:[(0,t.jsx)("span",{className:"grow text-left max-lg:sr-only",children:m}),(0,t.jsx)(i.f,{children:"⌘K"})]}):null;return(0,t.jsxs)("header",{"data-slot":"app-header",className:(0,l.f)("sticky top-0 z-30 flex h-(--size-header) shrink-0 items-center justify-between gap-4 border-b border-border bg-background px-6",x),children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[void 0===e?(0,t.jsx)("span",{"data-testid":"app-switcher-loading","aria-hidden":!0,className:"h-4 w-36 shrink-0 animate-pulse rounded bg-muted motion-reduce:animate-none"}):(0,t.jsx)(s.AppSwitcher,{switcher:e,layout:o,className:"shrink-0"}),p]}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center gap-3",children:["field"===h?g:null,f,"trigger"===h?g:null,void 0===c?null:(0,t.jsx)(r.AvatarMenu,{...c})]})]})}var o=e.i(77071),c=e.i(522016);let u={live:{label:"Live",dot:"bg-tone-ok-fg"},reconnecting:{label:"Reconnecting",dot:"bg-tone-waiting-fg"},offline:{label:"Offline",dot:"bg-tone-attention-fg"}};function m({state:e,className:a}){let{label:s,dot:n}=u[e];return(0,t.jsxs)("span",{"data-slot":"live-status","data-state":e,"aria-live":"polite",className:(0,l.f)("inline-flex items-center gap-1.5 text-meta text-muted-foreground",a),children:[(0,t.jsx)("span",{"aria-hidden":!0,className:(0,l.f)("size-2 shrink-0 rounded-full",n)}),s]})}e.s(["f",0,function({breadcrumb:e,parents:a=[],live:s,switcher:i,onCompose:r,onSearch:l}){return(0,t.jsxs)(d,{switcher:i,switcherLayout:"fleet",onSearch:l,search:"field",searchLabel:"Search",className:"hidden sm:flex",actions:r?(0,t.jsx)(n.f,{size:"sm",icon:(0,t.jsx)(o.f,{"aria-hidden":!0}),"data-testid":"header-compose",onClick:r,children:"Compose"}):null,children:[(0,t.jsx)("nav",{"aria-label":"Breadcrumb","data-testid":"header-breadcrumb",className:"-ml-2 flex min-w-0 items-center gap-3 text-body",children:(0,t.jsxs)("ol",{className:"flex min-w-0 items-center gap-1",children:[(0,t.jsx)("li",{"aria-hidden":!0,className:"text-muted-foreground",children:"/"}),a.map(e=>(0,t.jsxs)("li",{className:"flex shrink-0 items-center gap-1",children:[(0,t.jsx)(c.default,{href:e.href,className:"text-muted-foreground hover:text-foreground hover:underline",children:e.label}),(0,t.jsx)("span",{"aria-hidden":!0,className:"text-muted-foreground",children:"/"})]},e.href)),(0,t.jsx)("li",{"aria-current":"page",className:"truncate font-medium text-foreground",children:e})]})}),(0,t.jsx)(m,{state:s})]})}],577880);var h=e.i(24071);e.s(["f",0,function({title:e,live:i,actions:l,back:d,switcher:o,isTitled:u=!1,account:p,onSearch:f}){let x=f&&!d?f:void 0;return(0,t.jsxs)("header",{"data-slot":"top-bar","data-mode":d?"detail":"root",className:"sticky top-0 z-30 flex h-(--size-header) items-center gap-2.5 border-b border-border bg-background px-4 sm:hidden",children:[d?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(c.default,{href:d.href,className:"-ml-1.5 inline-flex h-(--size-control-touch) shrink-0 items-center gap-0.5 rounded-md pr-2 text-body-touch text-foreground focus-visible:outline-2 focus-visible:outline-ring [&_svg]:size-(--size-icon)",children:[(0,t.jsx)(h.f,{"aria-hidden":!0}),d.label]}),(0,t.jsx)("p",{className:"min-w-0 flex-1 truncate text-center text-body-touch font-semibold text-foreground",children:e})]}):o?(0,t.jsx)(s.AppSwitcher,{switcher:o,layout:"compact",...u?{title:e}:{},className:"min-w-0"}):(0,t.jsx)("p",{className:"truncate px-1.5 text-title-touch font-semibold text-foreground",children:u?e:"Console"}),(0,t.jsx)(m,{state:i,className:u&&!d?"ml-auto":void 0}),l||x||p&&!d?(0,t.jsxs)("div",{className:"ml-auto flex items-center gap-1",children:[x?(0,t.jsx)(n.f,{variant:"ghost",size:"touch",isIconOnly:!0,"aria-label":"Search ships or jump to","data-testid":"top-bar-search",onClick:x,children:(0,t.jsx)(a.f,{"aria-hidden":!0})}):null,l,p&&!d?(0,t.jsx)(r.AvatarMenuSheet,{...p}):null]}):null]})}],485538)},509892,e=>{var t=e.i(843476),a=e.i(819759),s=e.i(681924),n=e.i(812437),i=e.i(577880),r=e.i(485538);e.s(["f",0,function({title:e,description:l,titleMeta:d,primaryAction:o,isActionInTitleRow:c=!1,toolbar:u,live:m,onCompose:h,onSearch:p,switcher:f,account:x,banner:g,phoneTitle:b,phoneTopBar:y,children:j}){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.f,{breadcrumb:e,live:m,switcher:f,onCompose:h,onSearch:p}),g,y??(0,t.jsx)(r.f,{title:b??e,isTitled:void 0!==b,live:m,switcher:f,account:x,...void 0===b?{onSearch:p}:{},actions:h&&void 0===b?(0,t.jsx)(s.f,{variant:"ghost",size:"touch",isIconOnly:!0,"aria-label":"Compose","data-testid":"top-bar-compose",onClick:h,children:(0,t.jsx)(a.f,{"aria-hidden":!0})}):void 0}),(0,t.jsxs)("main",{className:"flex grow flex-col gap-4 px-6 py-5 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:(0,n.f)("flex flex-wrap items-start justify-between gap-4 max-sm:gap-3",c&&"max-sm:flex-nowrap",void 0!==b&&"max-sm:sr-only"),children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-1",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-x-2.5 gap-y-1",children:[(0,t.jsx)("h1",{className:"text-title font-semibold tracking-tight text-foreground max-sm:text-title-touch",children:e}),d]}),l?(0,t.jsx)("p",{className:"text-meta text-muted-foreground max-sm:text-body-touch",children:l}):null]}),o?(0,t.jsx)("div",{className:(0,n.f)("shrink-0",!c&&"max-sm:w-full max-sm:[&>*]:w-full",void 0!==b&&"max-sm:hidden"),children:o}):null]}),u,j]})]})}])},516634,38614,e=>{let t=["noShipCanTake","waitingForCrew","stalledInFlight","undeliverable"];function a(e){return`/fleet-health/${e}`}function s(e){return"ship"===e.kind?e.ship.name:e.type}let n={noShipCanTake:"no ship can take",waitingForCrew:"waiting for crew",stalledInFlight:"stalled in flight",undeliverable:"undeliverable"},i=[{minutes:1,label:"1 min"},{minutes:10,label:"10 min"},{minutes:60,label:"1 h"},{minutes:1440,label:"1 d"},{minutes:10080,label:"7 d"}],r=Math.log(1),l=Math.log(10080);function d(e){return Math.min(Math.max((Math.log(Math.max(e,1))-r)/(l-r),0),1)}let o={pending:"pending",received:"received",handed:"handed (pulled)",undeliverable:"undeliverable"};e.s(["A",0,{noShipCanTake:"Sent to a type with no active ship. Waits until you commission one.",waitingForCrew:"Sent to a ship no session crews. Waits until it is crewed.",stalledInFlight:"Taken by a session that went quiet. Waits until it acknowledges or the ship is released.",undeliverable:"Taken five times, never acknowledged. Waits for you to resend or dismiss."},"R",0,i,"M",0,a,"Q",0,function(e){return t.flatMap(t=>e.byCause.filter(e=>e.cause===t))},"f",0,function(e){let[t]=e.stuckPerHour;return void 0===t?[]:e.places.filter(e=>e.oldestSince>t.at).toSorted((e,t)=>e.oldestSince.localeCompare(t.oldestSince)).map((t,a)=>({number:a+1,hour:e.stuckPerHour.findIndex(e=>e.at>=t.oldestSince),label:`${s(t.place)}: ${n[t.cause]}`}))},"n",0,function(e,t){let a=Math.round(e/1e3);return a<60?`${String(a)} s`:t(new Date(0),new Date(e))},"p",0,function(e,t){return`/ships/${e}?tab=messages&message=${t}`},"F",0,function(e){let t=e.place;switch(e.cause){case"noShipCanTake":return{label:`Commission a ${s(t)}`,href:"/?commission=new"};case"waitingForCrew":return"ship"===t.kind?{label:"Get starting prompt",href:`/ships/${t.ship.id}`}:{label:"Open ships of type",href:`/?type=${encodeURIComponent(t.type)}`};case"stalledInFlight":if("ship"===t.kind&&null!==t.machine)return{label:"Open machine",href:`/trierarchs/${t.machine.id}`};return"ship"===t.kind?{label:"Open ship",href:`/ships/${t.ship.id}`}:{label:"Open ships of type",href:`/?type=${encodeURIComponent(t.type)}`};case"undeliverable":return{label:"Resend or dismiss",href:a("undeliverable")}}},"U",0,s,"l",0,function(e,t){let a=e.place;if("stalledInFlight"!==e.cause||"ship"!==a.kind)return null;let s=[...new Set(e.deliveries.map(e=>o[e.state]))].join(", ");if(null!==a.machine){let e=null===a.machine.lastSeenAt?"never seen":`last seen ${t.since(new Date(a.machine.lastSeenAt))}`;return`${s}, machine ${a.machine.name} ${e}`}let n=t.facts?.lastSeenAt??null;return null===n?s:`${s}, session last seen ${t.since(new Date(n))}`},"N",0,function(e){return e.split("\n",1)[0]?.trim()??""},"g",0,function(e){return new Map(e.byMachine.map(({machine:e,count:t})=>[e.id,t]))},"S",0,function(e){return e.count>e.dayAgo?`Up from ${String(e.dayAgo)} a day ago.`:e.count<e.dayAgo?`Down from ${String(e.dayAgo)} a day ago.`:"As many as a day ago."},"i",0,function(e){let{count:t,places:a,oldestSince:s}=e.summary;return null===s?{kind:"delivering"}:{kind:"stuck",count:t,places:a,since:s,dayAgo:e.stuckPerHour.at(-25)?.count??0}},"Y",0,function(e,t){return Math.max(0,(t.getTime()-Date.parse(e))/6e4)},"a",0,d],516634);var c=e.i(843476),u=e.i(812437);function m(e){return`${100*d(e)}%`}e.s(["q",0,function({className:e}){return(0,c.jsx)("div",{"aria-hidden":!0,className:(0,u.f)("relative h-4 w-full text-micro text-muted-foreground",e),children:i.map((e,t)=>(0,c.jsx)("span",{className:(0,u.f)("absolute whitespace-nowrap",0===t?"":t===i.length-1?"-translate-x-full":"-translate-x-1/2"),style:{left:m(e.minutes)},children:e.label},e.minutes))})},"B",0,function({waits:e,label:t,className:a}){let s=Math.max(0,...e);return(0,c.jsxs)("div",{role:"img","aria-label":t,"data-testid":"health-wait-strip",className:(0,u.f)("relative h-4 w-full",a),children:[(0,c.jsx)("span",{"aria-hidden":!0,className:"absolute inset-y-0 rounded-xs bg-muted",style:{left:m(10),right:`calc(100% - ${m(60)})`}}),(0,c.jsx)("span",{"aria-hidden":!0,className:"absolute inset-x-0 top-1/2 h-px bg-border"}),i.map(e=>(0,c.jsx)("span",{"aria-hidden":!0,className:"absolute top-1/4 h-1/2 w-px bg-border",style:{left:m(e.minutes)}},e.minutes)),(0,c.jsx)("span",{"aria-hidden":!0,className:"absolute top-1/2 h-0.5 -translate-y-1/2 rounded-full bg-foreground opacity-35",style:{left:0,width:m(s)}}),e.map((e,t)=>(0,c.jsx)("span",{"aria-hidden":!0,className:"absolute top-1/2 size-2.5 -translate-1/2 rounded-full border-2 border-card bg-foreground",style:{left:m(e)}},`${e}-${String(t)}`))]})}],38614)},718423,e=>{var t=e.i(137529),a=e.i(912598),s=e.i(905861),n=e.i(271645),i=e.i(586413),r=e.i(123938),l=e.i(427702);let d=new Set(["FleetInitialised","ShipCommissioned","ShipClaimed","LeaseRevoked","CredentialRevoked","StartingPromptIssued","ShipRetired","DeliveryAcknowledged","DeliveryUndeliverable","ShipReported","CrewRequested","CrewRequestRemoved","CrewAssigned","CrewStatusChanged","CrewRequestExplained","CrewRequestGivenBack","LabelAssigned","LabelUnassigned","LabelRetired","AlertRaised","AlertCleared"]);function o(e){let t=new Set,a=new Set,s=async s=>{t.add(s);try{do a.delete(s),e.writeRow(await e.readRow(s));while(a.has(s))}catch{}finally{t.delete(s),a.delete(s)}};return e=>{t.has(e)?a.add(e):s(e)}}function c(e,t){return e.pages.some(e=>e.items.some(e=>e.id===t))}function u(e){return"object"==typeof e&&null!==e}function m(e){return Array.isArray(e)?e:[]}function h(e){return"string"==typeof e&&e.startsWith("lbv_")}let p=new Set(["LabelDefined","LabelValuesChanged","LabelRetired","LabelAssigned","LabelUnassigned","LabelDeleted"]),f=new Set(["FleetSealingTurnedOn","FleetPayloadsSealed","FleetDataKeyCreated","FleetCompanyKeyChanged","FleetRecoveryKeyChanged","FleetKeysRecovered","FleetKeyUnavailable","FleetKeyAvailable"]),x=new Set(["FeatureFlagTurnedOn","FeatureFlagTurnedOff"]),g=new Set(["DeliveryUndeliverable","DeliveryNotHandled","DeliveryDismissed"]),b=new Set(["NetworkRulesSet","NetworkRulesDraftSaved","NetworkRulesDraftDiscarded","NetworkRulesDeclared","BuiltInRuleChanged"]);e.s(["f",0,function(){let e=(0,l.I)(),y=(0,a.d)(),[j,v]=(0,n.useState)(new Set),w=(0,r.h)(),[N]=(0,n.useState)(()=>{let a,s,n,r;return function(e){var a;let s,n,r,{trpc:l,queryClient:y,reload:j}=e,v=[...l.fleet.list.infiniteQueryKey()],w=()=>y.getQueriesData({queryKey:v}).flatMap(([,e])=>void 0===e?[]:[e]),N=o({readRow:e=>y.query({...l.fleet.listedShip.queryOptions({shipId:e}),staleTime:0}),writeRow:t=>{let a=w().some(e=>!c(e,t.id));y.setQueriesData({queryKey:v},e=>e&&function(e,t){if(c(e,t.id))return{...e,pages:e.pages.map(e=>{var a;return{...e,items:(a=e.items,a.map(e=>e.id===t.id?t:e))}})};let[a,...s]=e.pages;return void 0===a?e:{...e,pages:[{...a,items:[t,...a.items]},...s]}}(e,t)),a&&e.onPlacedFirst(t.id)}}),k=[...l.fleet.harbour.infiniteQueryKey()],C=()=>y.getQueriesData({queryKey:k}).flatMap(([e,t])=>void 0===t?[]:[e]),S=o({readRow:async e=>{let a=await Promise.all(C().map(async a=>{let s=function(e){let[,a]=e,s=u(a)?a.input:void 0,n=u(s)?s.filter:void 0;if(u(n))return{..."string"==typeof n.nameQuery?{nameQuery:n.nameQuery}:{},...void 0===n.state?{}:{state:m(n.state).flatMap(e=>t.E.find(t=>t===e)??[])},...void 0===n.type?{}:{type:m(n.type).filter(e=>"string"==typeof e)},...void 0===n.valueIds?{}:{valueIds:m(n.valueIds).filter(h)}}}(a);return{queryKey:a,tile:(await y.query({...l.fleet.harbour.queryOptions(void 0===s?{shipIds:[e]}:{shipIds:[e],filter:s}),staleTime:0})).items[0]}}));return{shipId:e,reads:a}},writeRow:({shipId:e,reads:t})=>{for(let{queryKey:a,tile:s}of t)y.setQueryData(a,t=>t&&function(e,t){let{shipId:a,tile:s}=t;if(void 0===s)return{...e,pages:e.pages.map(e=>({...e,items:e.items.filter(e=>e.id!==a)}))};if(e.pages.some(e=>e.items.some(e=>e.id===a)))return{...e,pages:e.pages.map(e=>({...e,items:e.items.map(e=>e.id===a?s:e)}))};let[n,...i]=e.pages;return void 0===n?e:{...e,pages:[{...n,items:[s,...n.items]},...i]}}(t,{shipId:e,tile:s}))}}),M=(a=async()=>{let{counts:e}=await y.query({...l.fleet.harbour.queryOptions({limit:1}),staleTime:0});y.setQueriesData({queryKey:k},t=>t&&function(e,t){let[a,...s]=e.pages;return void 0===a?e:{...e,pages:[{...a,counts:t},...s]}}(t,e))},s=new Set,n=new Set,r=async()=>{s.add("read");try{do n.delete("read"),await a();while(n.has("read"))}catch{}finally{s.delete("read"),n.delete("read")}},()=>{s.has("read")?n.add("read"):r()}),z=()=>{j(l.fleet.stuckCount.queryKey()),j(l.fleet.stuckSummary.queryKey()),j(l.fleet.stuck.pathKey())};return e=>{var t,a,s,n,r,o,c;if("resync"===e.kind){j(l.fleet.pathKey()),j(i.C);return}let{event:u}=e;for(let e of new Set([u.shipId,u.actorShipId]))null!==e&&(j(l.fleet.ship.queryKey({shipId:e})),j(l.fleet.shipTimeline.infiniteQueryKey({shipId:e})),j(l.fleet.shipWay.queryKey({shipId:e})));if(null!==u.messageId&&(j(l.fleet.shipMessages.pathKey()),j(l.fleet.shipWay.pathKey()),j(l.fleet.message.queryKey({messageId:u.messageId})),j(l.fleet.messageDeliveries.infiniteQueryKey({messageId:u.messageId})),j(l.fleet.inbox.pathKey()),j(l.fleet.inboxCount.queryKey()),j(i.C),z()),"DeliveryAcknowledged"===u.type&&j(l.fleet.acknowledged.queryKey()),t=u.type,g.has(t)&&j(l.fleet.needsAttention.pathKey()),a=u.type,p.has(a)&&j(l.fleet.labels.queryKey()),s=u.type,f.has(s)&&j(l.fleet.sealing.queryKey()),n=u.type,x.has(n)&&j(l.console.session.queryKey()),"NetworkRulesDeclared"===u.type&&j(l.fleet.declaredNetworkRules.queryKey()),("BuiltInRuleChanged"===(r=u.type)||"NetworkRulesSet"===r)&&j(l.fleet.builtInRules.queryKey()),o=u.type,b.has(o)&&(j(l.fleet.networkRules.queryKey()),j(l.fleet.networkRulesDraftChanges.queryKey()),j(l.fleet.explainReach.pathKey())),c=u.type,d.has(c)){if(w().length>0)for(let e of new Set([u.shipId,u.actorShipId]))null!==e&&N(e);if(C().length>0)for(let e of new Set([u.shipId,u.actorShipId]))null!==e&&S(e);(C().length>0||void 0!==y.getQueryData(l.fleet.harbour.queryKey({limit:1})))&&M(),j(l.fleet.shipCounts.pathKey()),z()}}}({trpc:e,queryClient:y,reload:(a=new Set,s=new Set,n=e=>y.invalidateQueries({queryKey:e,exact:!0},{cancelRefetch:!1}),r=async e=>{a.add(e.queryHash);let t=e.isBehind;try{for(await n(e.queryKey);t||s.delete(e.queryHash);)t=!1,await n(e.queryKey)}finally{a.delete(e.queryHash)}},e=>{for(let t of y.getQueryCache().findAll({queryKey:e}))a.has(t.queryHash)?s.add(t.queryHash):r({queryHash:t.queryHash,queryKey:t.queryKey,isBehind:"fetching"===t.state.fetchStatus})}),onPlacedFirst:e=>{v(t=>new Set([...t,e]))}})}),k=(0,s.B)(e.fleet.events.subscriptionOptions({lastEventId:null},{onData:({data:e})=>{N(e)}}));return{live:"connecting"===k.status&&w?"live":function(e){switch(e){case"pending":return"live";case"connecting":return"reconnecting";case"idle":case"error":return"offline"}}(k.status),placedFirstShipIds:j,error:k.error}}])},371951,e=>{var t=e.i(843476),a=e.i(689664),s=e.i(716327),n=e.i(611568),i=e.i(271645),r=e.i(681924),l=e.i(646013),d=e.i(620388),o=e.i(812437);let c="inline-flex min-w-0 items-center gap-1 rounded-md px-1.5 py-1 text-body font-semibold text-foreground outline-none transition-colors duration-(--duration-fast) hover:bg-accent focus-visible:outline-2 focus-visible:outline-ring aria-expanded:bg-accent disabled:opacity-60";function u({isCurrent:e,isOpening:s}){return s?(0,t.jsx)(n.f,{"aria-hidden":!0,className:"ml-auto animate-spin motion-reduce:animate-none"}):e?(0,t.jsx)(a.f,{"aria-hidden":!0,className:"ml-auto"}):null}function m({url:e,name:a,isCurrent:s,opening:n,onOpen:i,testId:r}){let d=n?.url===e&&n.name===a;return(0,t.jsxs)(l.DropdownMenuItem,{"data-testid":r,"data-current":s||void 0,disabled:void 0!==n&&!d,closeOnClick:!1,render:n=>(0,t.jsx)("a",{...n,href:e,"aria-current":s?"page":void 0,onClick:t=>{n.onClick?.(t),i({url:e,name:a})},children:n.children}),children:[(0,t.jsx)("span",{className:"min-w-0 truncate",children:d?`Opening ${a}`:a}),(0,t.jsx)(u,{isCurrent:s,isOpening:d})]})}function h({url:e,name:a,isCurrent:s,opening:n,onOpen:i,testId:r}){let l=n?.url===e&&n.name===a;return(0,t.jsxs)("a",{href:e,"data-testid":r,"aria-current":s?"page":void 0,"aria-disabled":void 0!==n&&!l||void 0,onClick:t=>{void 0!==n?t.preventDefault():i({url:e,name:a})},className:"flex h-(--size-control-touch) items-center gap-2.5 rounded-md px-2 text-body-touch text-foreground outline-none focus-visible:outline-2 focus-visible:outline-ring aria-disabled:opacity-60 [&_svg]:size-(--size-icon) [&_svg]:text-muted-foreground",children:[(0,t.jsx)("span",{className:"min-w-0 truncate",children:l?`Opening ${a}`:a}),(0,t.jsx)(u,{isCurrent:s,isOpening:l})]})}function p({label:e,children:a}){return(0,t.jsxs)("div",{role:"group","aria-label":e,className:"flex flex-col gap-0.5",children:[(0,t.jsx)("p",{className:"px-2 text-caption font-medium text-muted-foreground",children:e}),a]})}e.s(["AppSwitcher",0,function({switcher:e,layout:a,title:u,className:f}){let[x,g]=(0,i.useState)(void 0),{fleet:b,appLabel:y,fleets:j,apps:v,canSwitch:w}=e;return w?"compact"===a?(0,t.jsxs)(d.Sheet,{children:[(0,t.jsxs)(d.SheetTrigger,{"data-testid":"app-switcher","aria-label":`Switch fleet or app: ${b.name}, ${y}`,className:(0,o.f)(c,"text-title-touch",f),children:[(0,t.jsx)("span",{className:"truncate",children:u??y}),void 0===x?(0,t.jsx)(s.f,{"aria-hidden":!0,className:"size-(--size-icon) shrink-0 text-muted-foreground"}):(0,t.jsx)(n.f,{"aria-hidden":!0,className:"size-(--size-icon) shrink-0 animate-spin motion-reduce:animate-none"})]}),(0,t.jsxs)(d.SheetContent,{side:"bottom","data-testid":"app-switcher-sheet",className:"gap-3",children:[(0,t.jsx)(d.SheetTitle,{className:"sr-only",children:"Switch fleet or app"}),(0,t.jsx)(p,{label:"Fleets",children:j.map(e=>(0,t.jsx)(h,{url:e.url,name:e.name,isCurrent:e.isCurrent,opening:x,onOpen:g,testId:"app-switcher-fleet"},e.id))}),(0,t.jsx)(p,{label:"Apps",children:v.map(e=>(0,t.jsx)(h,{url:e.url,name:e.label,isCurrent:e.isCurrent,opening:x,onOpen:g,testId:"app-switcher-app"},e.app))}),(0,t.jsx)(d.SheetClose,{render:(0,t.jsx)(r.f,{size:"touch",className:"w-full"}),children:"Cancel"})]})]}):"fleet"===a?(0,t.jsx)("nav",{"aria-label":"Fleet and app","data-testid":"app-switcher",className:(0,o.f)("flex min-w-0 items-center",f),children:(0,t.jsxs)(l.DropdownMenu,{children:[(0,t.jsxs)(l.DropdownMenuTrigger,{"data-testid":"app-switcher-fleets","aria-label":`Fleet: ${b.name}, ${y}. Switch fleet or app`,className:(0,o.f)(c,"-mx-1.5 font-normal text-muted-foreground hover:text-foreground"),children:[(0,t.jsx)("span",{className:"truncate",children:b.name}),void 0===x?null:(0,t.jsx)(n.f,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0 animate-spin motion-reduce:animate-none"})]}),(0,t.jsxs)(l.DropdownMenuContent,{align:"start",className:"w-56",children:[(0,t.jsxs)(l.DropdownMenuGroup,{children:[(0,t.jsx)(l.DropdownMenuLabel,{children:"Fleets"}),j.map(e=>(0,t.jsx)(m,{url:e.url,name:e.name,isCurrent:e.isCurrent,opening:x,onOpen:g,testId:"app-switcher-fleet"},e.id))]}),(0,t.jsx)(l.DropdownMenuSeparator,{}),(0,t.jsxs)(l.DropdownMenuGroup,{children:[(0,t.jsx)(l.DropdownMenuLabel,{children:"Apps"}),v.map(e=>(0,t.jsx)(m,{url:e.url,name:e.label,isCurrent:e.isCurrent,opening:x,onOpen:g,testId:"app-switcher-app"},e.app))]})]})]})}):(0,t.jsxs)("nav",{"aria-label":"Fleet and app","data-testid":"app-switcher",className:(0,o.f)("flex min-w-0 items-center gap-0.5",f),children:[(0,t.jsxs)(l.DropdownMenu,{children:[(0,t.jsx)(l.DropdownMenuTrigger,{"data-testid":"app-switcher-fleets","aria-label":`Fleet: ${b.name}. Switch fleet`,className:c,children:(0,t.jsx)("span",{className:"truncate",children:b.name})}),(0,t.jsx)(l.DropdownMenuContent,{align:"start",className:"w-56",children:(0,t.jsxs)(l.DropdownMenuGroup,{children:[(0,t.jsx)(l.DropdownMenuLabel,{children:"Fleets"}),j.map(e=>(0,t.jsx)(m,{url:e.url,name:e.name,isCurrent:e.isCurrent,opening:x,onOpen:g,testId:"app-switcher-fleet"},e.id))]})})]}),(0,t.jsx)("span",{"aria-hidden":!0,className:"text-muted-foreground",children:"/"}),(0,t.jsxs)(l.DropdownMenu,{children:[(0,t.jsxs)(l.DropdownMenuTrigger,{"data-testid":"app-switcher-apps","aria-label":`App: ${y}. Switch app`,className:c,children:[(0,t.jsx)("span",{className:"truncate",children:y}),void 0===x?(0,t.jsx)(s.f,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0 text-muted-foreground"}):(0,t.jsx)(n.f,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0 animate-spin motion-reduce:animate-none"})]}),(0,t.jsx)(l.DropdownMenuContent,{align:"start",className:"w-56",children:(0,t.jsxs)(l.DropdownMenuGroup,{children:[(0,t.jsx)(l.DropdownMenuLabel,{children:"Apps"}),v.map(e=>(0,t.jsx)(m,{url:e.url,name:e.label,isCurrent:e.isCurrent,opening:x,onOpen:g,testId:"app-switcher-app"},e.app))]})})]})]}):(0,t.jsxs)("p",{"data-testid":"app-switcher",className:(0,o.f)("flex min-w-0 items-center gap-1 px-1.5 text-body font-semibold text-foreground","fleet"===a&&"px-0 font-normal text-muted-foreground","compact"===a&&void 0!==u&&"text-title-touch",f),children:["compact"===a?null:(0,t.jsx)("span",{className:"truncate",children:b.name}),"full"===a?(0,t.jsx)("span",{"aria-hidden":!0,className:"text-muted-foreground",children:"/"}):null,"fleet"===a?null:(0,t.jsx)("span",{className:"truncate",children:u??y})]})}])}])})();
1
+ (()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,716327,e=>{var t=e.i(456420);let a={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};a.node;let s=(0,t.f)(a);e.s(["f",0,s],716327)},24071,e=>{var t=e.i(456420);let a={name:"chevron-left",size:24,node:[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]};a.node;let s=(0,t.f)(a);e.s(["f",0,s],24071)},867927,e=>{var t=e.i(456420);let a={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};a.node;let s=(0,t.f)(a);e.s(["f",0,s],867927)},77071,e=>{var t=e.i(456420);let a={name:"plus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]};a.node;let s=(0,t.f)(a);e.s(["f",0,s],77071)},825398,e=>{var t=e.i(456420);let a={name:"rotate-cw",size:24,node:[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]};a.node;let s=(0,t.f)(a);e.s(["f",0,s],825398)},566595,e=>{var t=e.i(456420);let a={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};a.node;let s=(0,t.f)(a);e.s(["f",0,s],566595)},819759,e=>{var t=e.i(456420);let a={name:"square-pen",size:24,node:[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],aliases:["pen-box","edit","pen-square"]};a.node;let s=(0,t.f)(a);e.s(["f",0,s],819759)},137529,e=>{e.s(["E",0,["alert","awaitingCrew","blocked","working","idle"],"V",0,function(e){return e.hasOpenAlert?"alert":"awaitingCrew"===e.status?"awaitingCrew":"blocked"===e.reportState?"blocked":"working"===e.reportState?"working":"idle"}])},846980,e=>{var t=e.i(843476),a=e.i(509892),s=e.i(668269),n=e.i(749092),i=e.i(190437),r=e.i(442111),l=e.i(296676),d=e.i(849635),o=e.i(714695),c=e.i(500265),u=e.i(586448),m=e.i(427702),h=e.i(516634),p=e.i(812437),f=e.i(219321),x=e.i(817981),g=e.i(867927),b=e.i(522016),y=e.i(766390),j=e.i(681924),v=e.i(298421),w=e.i(78865),N=e.i(38614);function k({place:e}){return"ship"===e.kind?(0,t.jsx)("span",{className:"font-medium text-foreground",children:e.ship.name}):(0,t.jsx)(y.f,{variant:"type",children:e.type})}function S({total:e,read:a,notes:s,now:n}){let{cause:i,count:r}=e;return(0,t.jsxs)("section",{"aria-label":(0,w.g)(i),"data-testid":"health-cause","data-cause":i,className:"flex flex-col gap-3 rounded-lg border border-border bg-card p-3",children:[(0,t.jsxs)("header",{className:"flex items-start justify-between gap-3",children:[(0,t.jsxs)(b.default,{href:(0,h.M)(i),className:"group inline-flex items-center gap-1.5 rounded-md","data-testid":"health-cause-open",children:[(0,t.jsx)(w.T,{status:i}),(0,t.jsx)(g.f,{"aria-hidden":!0,className:"size-(--size-icon-sm) text-muted-foreground group-hover:text-foreground"}),(0,t.jsxs)("span",{className:"sr-only",children:["Open the deliveries ",(0,w.g)(i).toLowerCase()]})]}),(0,t.jsx)("span",{className:"text-metric font-semibold tabular-nums text-foreground max-sm:text-title-touch",children:r})]}),(0,t.jsx)("p",{className:"text-body text-muted-foreground max-sm:text-body-touch",children:h.A[i]}),a.isFailed?(0,t.jsx)(x.f,{title:"Couldn’t load where they wait",description:"Nothing changed in the fleet. The page tries again by itself.",onRetry:a.onRetry}):void 0===a.places?(0,t.jsxs)("div",{role:"status","data-testid":"health-places-loading",children:[(0,t.jsx)("span",{className:"sr-only",children:"Loading where they wait"}),(0,t.jsx)(f.f,{className:"h-16 w-full rounded-lg"})]}):(0,t.jsx)(C,{places:a.places,notes:s,now:n}),void 0!==a.places&&a.hasMore&&(0,t.jsx)(v.f,{what:"more places",isLoading:a.isLoadingMore,isFailed:a.isLoadMoreFailed,onLoad:a.onLoadMore,area:"health-places"})]})}function C({places:e,notes:a,now:s}){return(0,t.jsxs)("div",{className:"grid grid-cols-[minmax(0,1fr)_minmax(0,1.2fr)_auto] gap-x-4 max-sm:grid-cols-1",children:[(0,t.jsxs)("div",{className:"col-span-3 grid grid-cols-subgrid items-center text-caption font-medium text-muted-foreground max-sm:col-span-1",children:[(0,t.jsx)("span",{className:"max-sm:hidden",children:"Where, how long"}),(0,t.jsx)(N.q,{}),(0,t.jsx)("span",{className:"text-right max-sm:hidden",children:"Next step"})]}),(0,t.jsx)("ul",{className:"col-span-3 grid grid-cols-subgrid divide-y divide-border max-sm:col-span-1",children:e.map(e=>{let n=(0,h.F)(e),i=a.get(e),r=(0,d.m)(new Date(e.oldestSince),s);return(0,t.jsxs)("li",{"data-testid":"health-place",className:"col-span-3 grid grid-cols-subgrid items-center gap-y-2 py-3 last:pb-0 max-sm:col-span-1",children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-0.5",children:[(0,t.jsx)(k,{place:e.place}),(0,t.jsxs)("span",{className:"text-meta tabular-nums text-muted-foreground",children:[e.count," · oldest ",r]})]}),(0,t.jsx)(N.B,{waits:e.deliveries.map(e=>(0,h.Y)(e.since,s)),label:`${String(e.count)} waiting, the oldest ${r}`}),(0,t.jsx)(j.f,{variant:"secondary",size:"sm",nativeButton:!1,render:(0,t.jsx)(b.default,{href:n.href}),className:"max-sm:h-(--size-control-touch) max-sm:w-full max-sm:text-body-touch","data-testid":"health-next-step",children:n.label}),void 0!==i&&(0,t.jsx)("p",{className:"col-span-3 text-meta text-muted-foreground max-sm:col-span-1",children:i})]},`${e.cause}-${"ship"===e.place.kind?e.place.ship.id:e.place.type}`)})})]})}function M({perHour:e}){let a=Math.max(1,...e.map(e=>e.count));return(0,t.jsx)("div",{role:"img","aria-label":`Acknowledged per hour over the last 24 hours, at most ${Math.max(0,...e.map(e=>e.count))} in an hour`,"data-testid":"health-acknowledged-bars",className:"flex h-8 w-full items-end gap-0.5 sm:w-48",children:e.map(e=>(0,t.jsx)("span",{className:"min-h-0.5 flex-1 rounded-xs bg-tone-ok-fg opacity-75",style:{height:`${e.count/a*100}%`}},e.at))})}function z({acknowledged:e}){return(0,t.jsxs)("section",{"aria-label":"Delivering","data-testid":"health-delivering",className:"flex items-center gap-4 rounded-lg border border-border bg-card p-3 max-sm:flex-col max-sm:items-start max-sm:gap-3",children:[(0,t.jsx)(w.T,{status:"delivering"}),(0,t.jsx)("p",{className:"flex-1 text-body text-foreground max-sm:text-body-touch",children:null===e.medianMs?"Nothing acknowledged in the last 24 h.":(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"font-semibold tabular-nums",children:e.count})," acknowledged in the last 24 h, median"," ",(0,t.jsx)("span",{className:"font-semibold tabular-nums",children:(0,h.n)(e.medianMs,d.m)})," from send to acknowledgement."]})}),(0,t.jsx)(M,{perHour:e.perHour})]})}function I({perHour:e,marks:a}){let s=Math.max(5,5*Math.ceil(Math.max(0,...e.map(e=>e.count))/5)),n=Math.max(e.length-1,1),i=e=>100-e/s*100,[r]=e,l=e.slice(1).map((e,t)=>`H${(t+1)/n*1e3} V${i(e.count)}`),o=[`M0 ${i(r?.count??0)}`,...l].join(" "),c=`${o} H1000 V100 H0 Z`,u=e.at(-1)?.count??0,m=e.flatMap((e,t)=>t%24==12?[{index:t,label:(0,d.L)(new Date(e.at))}]:[]);return(0,t.jsxs)("figure",{"data-testid":"health-trend",className:"flex min-w-0 flex-col gap-2",children:[(0,t.jsx)("figcaption",{className:"text-meta font-medium text-foreground",children:"Stuck deliveries, last 7 days, per hour"}),(0,t.jsxs)("div",{className:"grid grid-cols-[auto_1fr] gap-x-2",children:[(0,t.jsx)("div",{"aria-hidden":!0,className:"relative h-36 w-5 text-caption tabular-nums text-muted-foreground",children:[s,s/2,0].map(e=>(0,t.jsx)("span",{className:"absolute right-0 -translate-y-1/2",style:{top:`${100-e/s*100}%`},children:e},e))}),(0,t.jsxs)("div",{className:"relative h-36",children:[(0,t.jsxs)("svg",{role:"img","aria-label":`Stuck deliveries per hour over the last 7 days: ${u} now, at most ${Math.max(0,...e.map(e=>e.count))}`,viewBox:"0 0 1000 100",preserveAspectRatio:"none",className:"size-full overflow-visible",children:[[0,s/2,s].map(e=>(0,t.jsx)("line",{x1:0,x2:1e3,y1:i(e),y2:i(e),className:"stroke-border",vectorEffect:"non-scaling-stroke"},e)),(0,t.jsx)("path",{d:c,className:"fill-tone-waiting-bg"}),(0,t.jsx)("path",{d:o,className:"fill-none stroke-tone-waiting-fg",strokeWidth:2,strokeLinejoin:"round",vectorEffect:"non-scaling-stroke"})]}),a.map(a=>(0,t.jsx)("span",{"aria-hidden":!0,"data-testid":"health-trend-mark",className:"absolute flex size-4 -translate-x-1/2 -translate-y-1/2 items-center justify-center rounded-full border-2 border-foreground bg-card text-micro font-semibold text-foreground max-sm:hidden",style:{left:`${a.hour/n*100}%`,top:`${i(e[a.hour]?.count??0)/100*100}%`},children:a.number},a.number)),(0,t.jsx)("span",{"aria-hidden":!0,className:"absolute size-2 -translate-1/2 rounded-full bg-tone-waiting-fg",style:{left:"100%",top:`${i(u)/100*100}%`}})]}),(0,t.jsx)("div",{"aria-hidden":!0,className:"relative col-start-2 h-4 text-caption text-muted-foreground",children:m.map(e=>(0,t.jsx)("span",{className:"absolute -translate-x-1/2 whitespace-nowrap max-sm:[&:nth-child(even)]:hidden",style:{left:`${e.index/n*100}%`},children:e.label},e.index))})]}),a.length>0&&(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:a.map((e,a)=>(0,t.jsxs)("span",{children:[a>0&&" · ",(0,t.jsx)("span",{className:"font-semibold text-foreground",children:e.number})," ",e.label]},e.number))})]})}function q({summary:e,stuckPerHour:a,places:s}){let n=(0,h.i)({summary:e,stuckPerHour:a});return(0,t.jsxs)("section",{"aria-label":"Verdict","data-testid":"health-verdict","data-verdict":n.kind,className:"grid gap-6 rounded-lg border border-border bg-card p-3 lg:grid-cols-[minmax(0,2fr)_minmax(0,3fr)] max-sm:gap-4",children:[(0,t.jsxs)("div",{className:"flex flex-col items-start gap-3",children:[(0,t.jsx)(w.T,{status:n.kind}),"stuck"===n.kind?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("p",{className:"text-section font-semibold text-foreground",children:[(0,t.jsx)("span",{className:"text-metric tabular-nums max-sm:text-title-touch","data-testid":"health-stuck-count",children:n.count})," ",1===n.count?"delivery":"deliveries"," stuck in ",n.places," ",1===n.places?"place":"places"]}),(0,t.jsxs)("p",{className:"text-body text-muted-foreground max-sm:text-body-touch",children:["Stuck since ",(0,d.B)(new Date(n.since)),". ",(0,h.S)(n)]}),(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:"Nothing is lost: each one is stored and moves on as soon as its cause is gone."})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"text-section font-semibold text-foreground",children:"Delivering. Nothing is stuck."}),(0,t.jsx)("p",{className:"text-body text-muted-foreground max-sm:text-body-touch",children:"Every delivery waits only on its ship to take it."})]})]}),(0,t.jsx)(I,{perHour:a,marks:(0,h.f)({places:s,stuckPerHour:a})})]})}var $=e.i(841220),D=e.i(721039);function F({machines:e,stuckByMachine:a,renderLiveness:s}){return(0,t.jsxs)("section",{"aria-labelledby":"health-machines","data-testid":"health-machines",className:"flex flex-col gap-3 rounded-lg border border-border bg-card p-3",children:[(0,t.jsxs)("header",{className:"flex flex-wrap items-baseline justify-between gap-2",children:[(0,t.jsx)("h2",{id:"health-machines",className:"text-section font-semibold text-foreground",children:"Machines"}),(0,t.jsx)("p",{className:"text-meta text-muted-foreground",children:"Each machine runs a trierarch that crews ships."})]}),(0,t.jsx)("ul",{className:"flex flex-col divide-y divide-border",children:e.map(e=>{let n=a.get(e.id)??0;return(0,t.jsxs)("li",{"data-testid":"health-machine",className:"flex flex-wrap items-center gap-x-4 gap-y-2 py-3 first:pt-0 last:pb-0 max-sm:gap-x-2",children:[(0,t.jsxs)("span",{className:"inline-flex min-w-40 items-center gap-2 font-medium text-foreground",children:[(0,t.jsx)($.f,{"aria-hidden":!0,className:"size-(--size-icon) text-muted-foreground"}),e.name]}),(0,t.jsx)("span",{className:"min-w-0 flex-1",children:s(e)}),(0,t.jsxs)("span",{className:"text-meta text-muted-foreground",children:[e.ships," ",1===e.ships?"ship":"ships",n>0&&(0,t.jsxs)(t.Fragment,{children:[" · ",(0,t.jsxs)("span",{className:"font-semibold text-foreground",children:[n," ",1===n?"delivery":"deliveries"," stuck on its ships"]})]})]}),n>0&&(0,t.jsx)(j.f,{variant:"secondary",size:"sm",nativeButton:!1,render:(0,t.jsx)(b.default,{href:`/trierarchs/${e.id}`}),className:"max-sm:h-(--size-control-touch) max-sm:w-full",children:"Open machine"}),e.notOffered?.map(({harness:e,reason:a})=>(0,t.jsx)("div",{className:"basis-full",children:(0,t.jsx)(D.f,{harness:e,reason:a})},e))]},e.id)})})]})}function R({label:e,className:a}){return(0,t.jsxs)("div",{role:"status","data-testid":"health-part-loading",children:[(0,t.jsx)("span",{className:"sr-only",children:e}),(0,t.jsx)(f.f,{className:(0,p.f)("w-full rounded-lg",a)})]})}function K({summary:e,places:a,stuckPerHour:s,acknowledged:n,notes:i,machines:r,renderLiveness:l,children:d,now:o}){let c=void 0===e.data?void 0:(0,h.Q)(e.data),u=Object.values(a).flatMap(e=>e.places??[]);return(0,t.jsxs)("div",{"data-testid":"health-board",className:"flex flex-col gap-5 max-sm:gap-3.5",children:[e.isError||s.isError?(0,t.jsx)(x.f,{title:"Couldn’t load where deliveries are stuck",description:"Nothing changed in the fleet. The page tries again by itself.",onRetry:()=>{for(let t of[e,s])t.isError&&t.onRetry()}}):void 0===e.data||void 0===s.data?(0,t.jsx)(R,{label:"Loading the verdict",className:"h-44"}):(0,t.jsx)(q,{summary:e.data,stuckPerHour:s.data,places:u}),n.isError?(0,t.jsx)(x.f,{title:"Couldn’t load the deliveries acknowledged",description:"Nothing changed in the fleet. The page tries again by itself.",onRetry:n.onRetry}):void 0===n.data?(0,t.jsx)(R,{label:"Loading the deliveries acknowledged",className:"h-16"}):(0,t.jsx)(z,{acknowledged:n.data}),void 0===c?e.isError?null:(0,t.jsx)(R,{label:"Loading where deliveries are stuck",className:"h-40"}):c.length>0&&(0,t.jsx)("div",{className:"grid gap-5 lg:grid-cols-2 max-sm:gap-3.5",children:c.map(e=>(0,t.jsx)(S,{total:e,read:a[e.cause],notes:i,now:o},e.cause))}),void 0!==e.data&&void 0!==r&&r.length>0&&(0,t.jsx)(F,{machines:r,stuckByMachine:(0,h.g)(e.data),renderLiveness:l}),d]})}function A({renderLiveness:e,children:a}){var p;let f,x,g,b=(0,l.f)(),y=(0,i.A)(),j=e=>y.data?.byCause.some(t=>t.cause===e)??!1,v={noShipCanTake:T((0,i.W)("noShipCanTake",j("noShipCanTake"))),waitingForCrew:T((0,i.W)("waitingForCrew",j("waitingForCrew"))),stalledInFlight:T((0,i.W)("stalledInFlight",j("stalledInFlight"))),undeliverable:T((0,i.W)("undeliverable",j("undeliverable")))},w=(0,i.j)(),N=(0,i.K)(),k=(0,n.f)().data?.retention.keptFrom??null,S=(0,c.t)(),C=Object.values(v).flatMap(e=>e.places??[]),M=(0,r.K)(C.flatMap(({place:e})=>"ship"===e.kind?[e.ship.id]:[])),z=(p=(S.data??[]).map(e=>e.shipId),f=(0,m.I)(),x=(0,u.f)({queries:p.map(e=>f.fleet.shipCounts.queryOptions({filter:{assignedTo:[e]}}))}),g=new Map,p.forEach((e,t)=>{let a=x[t]?.data;void 0!==a&&g.set(e,a.reduce((e,t)=>e+t.active,0))}),g),I=new Map;for(let e of C){let t="ship"===e.place.kind?M?.get(e.place.ship.id):void 0,a=(0,h.l)(e,{facts:t&&{lastSeenAt:t.lastSeenAt},since:e=>(0,d.W)(e,b)});null!==a&&I.set(e,a)}let q=new Map((S.data??[]).map(e=>[e.shipId,e])),$=(0,o.O)(S.data??[]),D=S.data?.map(e=>({id:e.shipId,name:e.name,ships:z.get(e.shipId)??0,notOffered:$.filter(t=>t.machineId===e.shipId)}));return(0,t.jsxs)(K,{summary:L(y),places:v,stuckPerHour:L(w),acknowledged:L(N),notes:I,machines:D,renderLiveness:t=>{let a=q.get(t.id);return void 0===a?null:e(a)},now:b,children:[a,(0,t.jsx)(s.f,{keptFrom:k,area:"health"})]})}function L(e){return{data:e.data,isError:e.isError,onRetry:()=>{e.refetch()}}}function T(e){return{places:e.items,isFailed:e.isFailed,onRetry:e.retry,hasMore:e.hasMore,isLoadingMore:e.isLoadingMore,isLoadMoreFailed:e.isLoadMoreFailed,onLoadMore:e.loadMore}}var O=e.i(784294),H=e.i(219249),Q=e.i(781830),W=e.i(1935);function B({members:e,ships:a,now:s,viewerFleetId:n,renderAction:i}){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:r})=>{let{lastSeenAt:l}=r.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._,{health:"silent"}),(0,t.jsx)("span",{className:"font-medium",children:r.name})]}),(0,t.jsx)(W.f,{squadronId:e,role:r.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,d.m)(new Date(l),s)}`}),(0,t.jsxs)("span",{className:"text-muted-foreground",children:["checks in ",(0,O.P)(r.checkInMinutes)]})]}),(0,t.jsx)("span",{className:"grow",children:(0,t.jsx)(Q.f,{report:a.get(r.shipId)?.report??null,now:s,variant:"row",viewerFleetId:n,testId:"silent-member-report"})}),i?.({squadronId:e,member:r}),(0,t.jsxs)(b.default,{href:`/squadrons/${e}`,className:"inline-flex items-center gap-1 text-meta font-medium hover:underline",children:["Open",(0,t.jsx)(g.f,{"aria-hidden":!0,className:"size-(--size-icon-sm)"})]})]},r.shipId)})})}var E=e.i(566297),P=e.i(36556),_=e.i(490262),U=e.i(787964),G=e.i(718423),V=e.i(743006),Y=e.i(678485),J=e.i(853573),Z=e.i(448695);e.s(["default",0,function(){let e=(0,l.f)(),s=(0,V.f)(),n=(0,U.y)(),d=(0,G.f)(),o=(0,i.A)(),c=(0,_.Q)(),u=(0,Z.p)(),m=(0,O.C)(u.data??[]),h=(0,J.J)(m.map(({member:e})=>e.shipId)),p=(0,r.K)(m.map(({member:e})=>e.shipId))??new Map;return(0,Y.n)([o.error,d.error]),(0,t.jsx)(a.f,{...n,title:"Health",description:"Where deliveries wait, since when, and what lets them move.",live:d.live,children:(0,t.jsx)(A,{renderLiveness:a=>(0,t.jsx)(P.W,{machine:a,now:e}),children:m.length>0?(0,t.jsxs)("section",{"aria-labelledby":"health-silent",className:"flex flex-col gap-2",children:[(0,t.jsxs)("h2",{id:"health-silent",className:"text-section font-semibold text-foreground",children:["Silent members (",m.length,")"]}),(0,t.jsx)(B,{members:m,ships:p,now:e,viewerFleetId:s,renderAction:c.canManage?({squadronId:e,member:a})=>(0,t.jsx)(E.a,{squadronId:e,member:a,ship:h.get(a.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."})]}):null})})}],846980)},219321,e=>{var t=e.i(843476),a=e.i(812437);e.s(["f",0,function({className:e,...s}){return(0,t.jsx)("div",{"data-slot":"skeleton","aria-hidden":!0,className:(0,a.f)("animate-pulse rounded-sm bg-secondary [animation-duration:var(--duration-pulse)] motion-reduce:animate-none",e),...s})}])},219249,e=>{var t=e.i(843476),a=e.i(812437);let s={"on-time":{label:"On time",dot:"bg-tone-ok-fg",text:"text-tone-ok-fg"},late:{label:"Late",dot:"bg-tone-waiting-fg",text:"text-tone-waiting-fg"},silent:{label:"Silent",dot:"bg-tone-attention-fg",text:"text-tone-attention-fg"},"standing-down":{label:"Standing down",dot:"bg-tone-active-fg",text:"text-tone-active-fg"},"not-on-station":{label:"Not on station",dot:"border border-dashed border-muted-foreground",text:"text-foreground"}};function n({health:e}){return(0,t.jsx)("span",{"aria-hidden":!0,className:(0,a.f)("size-2 shrink-0 rounded-full",s[e].dot)})}e.s(["_",0,function({health:e,detail:i,className:r}){return(0,t.jsxs)("span",{"data-slot":"health-indicator","data-health":e,className:(0,a.f)("inline-flex items-center gap-1.5 text-meta",r),children:[(0,t.jsx)(n,{health:e}),(0,t.jsx)("span",{className:(0,a.f)("font-medium",s[e].text),children:s[e].label}),void 0!==i&&(0,t.jsx)("span",{className:"text-muted-foreground",children:i})]})},"T",0,function({counts:e,className:i}){return(0,t.jsx)("span",{"data-slot":"health-summary",className:(0,a.f)("inline-flex flex-wrap items-center gap-x-3 gap-y-1 text-meta",i),children:e.map(({health:e,count:a})=>(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,t.jsx)(n,{health:e}),(0,t.jsxs)("span",{children:[a," ",s[e].label.toLowerCase()]})]},e))})}])},668269,e=>{var t=e.i(843476),a=e.i(456420);let s={name:"rotate-ccw-clock",size:24,node:[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],aliases:["history"]};s.node;let n=(0,a.f)(s);var i=e.i(516752);e.s(["f",0,function({keptFrom:e,area:a}){return null===e?null:(0,t.jsxs)("p",{"data-testid":`${a}-kept-from`,className:"flex items-start gap-2 text-meta text-muted-foreground",children:[(0,t.jsx)(n,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon-sm) shrink-0"}),(0,t.jsx)("span",{children:(0,i.z)(e)})]})}],668269)},817981,e=>{var t=e.i(843476),a=e.i(422768),s=e.i(456420);let n={name:"cloud-off",size:24,node:[["path",{d:"M10.94 5.274A7 7 0 0 1 15.71 10h1.79a4.5 4.5 0 0 1 4.222 6.057",key:"1uxyv8"}],["path",{d:"M18.796 18.81A4.5 4.5 0 0 1 17.5 19H9A7 7 0 0 1 5.79 5.78",key:"99tcn7"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]};n.node;let i=(0,s.f)(n);var r=e.i(825398),l=e.i(681924),d=e.i(812437);e.s(["f",0,function({title:e,description:s,detail:n,onRetry:o,isRetrying:c=!1,variant:u="section",id:m,className:h}){return"field"===u?(0,t.jsxs)("p",{id:m,"data-slot":"inline-error","data-variant":u,className:(0,d.f)("flex items-center gap-1.5 text-meta text-destructive-text [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0",h),children:[(0,t.jsx)(a.f,{"aria-hidden":!0}),e]}):"section"===u?(0,t.jsxs)("div",{role:"alert","data-slot":"inline-error","data-variant":u,className:(0,d.f)("flex gap-2 rounded-lg border border-tone-attention-border bg-tone-attention-bg p-3 text-tone-attention-fg",h),children:[(0,t.jsx)(a.f,{"aria-hidden":!0,className:"mt-0.5 size-(--size-icon) shrink-0"}),(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("p",{className:"text-body font-medium",children:e}),s?(0,t.jsx)("p",{className:"text-meta text-foreground",children:s}):null,o?(0,t.jsx)(l.f,{size:"xs",icon:(0,t.jsx)(r.f,{"aria-hidden":!0}),isLoading:c,onClick:o,className:"self-start",children:c?"Trying again…":"Try again"}):null]})]}):(0,t.jsxs)("div",{role:"alert","data-slot":"inline-error","data-variant":u,className:(0,d.f)("flex flex-col items-center gap-3 rounded-lg border border-border bg-card px-6 py-10 text-center",h),children:[(0,t.jsx)("span",{"aria-hidden":!0,className:"flex size-10 items-center justify-center rounded-lg border border-tone-attention-border bg-tone-attention-bg text-tone-attention-fg [&_svg]:size-(--size-icon-xl)",children:(0,t.jsx)(i,{})}),(0,t.jsx)("h2",{className:"text-heading font-semibold text-foreground max-sm:text-heading-touch",children:e}),s?(0,t.jsx)("p",{className:"max-w-96 text-meta text-muted-foreground max-sm:text-body-touch",children:s}):null,n?(0,t.jsx)("code",{className:"rounded-sm border border-border bg-muted px-2 py-0.5 font-mono text-id text-muted-foreground",children:n}):null,o?(0,t.jsx)("div",{className:"flex items-center gap-2 max-sm:w-full max-sm:flex-col",children:(0,t.jsx)(l.f,{size:"sm",icon:(0,t.jsx)(r.f,{"aria-hidden":!0}),onClick:o,className:"max-sm:w-full",children:"Try again"})}):null]})}],817981)},298421,568290,e=>{var t=e.i(843476),a=e.i(456420);let s={name:"chevrons-down",size:24,node:[["path",{d:"m7 6 5 5 5-5",key:"1lc07p"}],["path",{d:"m7 13 5 5 5-5",key:"1d48rs"}]]};s.node;let n=(0,a.f)(s);e.s(["f",0,n],568290);var i=e.i(681924),r=e.i(817981);e.s(["f",0,function({what:e,isLoading:a,isFailed:s,onLoad:l,area:d}){return s?(0,t.jsx)(r.f,{title:`Couldn’t load ${e}`,description:"What is shown stays as it is. Try again in a moment.",onRetry:l,className:"m-3"}):(0,t.jsx)("div",{className:"flex justify-center border-t border-border px-3.5 py-2.5",children:(0,t.jsx)(i.f,{size:"sm",variant:"ghost",icon:(0,t.jsx)(n,{"aria-hidden":!0}),isLoading:a,onClick:l,"data-testid":`${d}-load-more`,children:a?`Loading ${e}...`:`Load ${e}`})})}],298421)},1935,e=>{var t=e.i(843476),a=e.i(660011),s=e.i(522016),n=e.i(812437);e.s(["f",0,function({squadronId:e,role:i,size:r="md",className:l}){return(0,t.jsxs)(s.default,{href:`/squadrons/${e}`,"data-slot":"squadron-tag",className:(0,n.f)("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",l),children:[(0,t.jsx)(a.f,{"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]})]})}])},577880,485538,e=>{var t=e.i(843476),a=e.i(566595),s=e.i(371951),n=e.i(681924),i=e.i(462372),r=e.i(505792),l=e.i(812437);function d({switcher:e,switcherLayout:o="full",account:c,onSearch:u,searchLabel:m="Search or jump to",search:h="trigger",children:p,actions:f,className:x}){let g=u?"field"===h?(0,t.jsx)(n.f,{variant:"secondary",size:"md",icon:(0,t.jsx)(a.f,{"aria-hidden":!0}),"data-testid":"header-search",onClick:u,className:"w-50 justify-start font-normal text-muted-foreground outline-none focus-visible:outline-2 focus-visible:outline-ring",children:(0,t.jsx)("span",{className:"truncate",children:m})}):(0,t.jsxs)(n.f,{size:"sm",icon:(0,t.jsx)(a.f,{"aria-hidden":!0}),"data-testid":"header-search",className:"w-60 justify-start font-normal text-muted-foreground max-lg:w-auto",onClick:u,children:[(0,t.jsx)("span",{className:"grow text-left max-lg:sr-only",children:m}),(0,t.jsx)(i.f,{children:"⌘K"})]}):null;return(0,t.jsxs)("header",{"data-slot":"app-header",className:(0,l.f)("sticky top-0 z-30 flex h-(--size-header) shrink-0 items-center justify-between gap-4 border-b border-border bg-background px-6",x),children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[void 0===e?(0,t.jsx)("span",{"data-testid":"app-switcher-loading","aria-hidden":!0,className:"h-4 w-36 shrink-0 animate-pulse rounded bg-muted motion-reduce:animate-none"}):(0,t.jsx)(s.AppSwitcher,{switcher:e,layout:o,className:"shrink-0"}),p]}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center gap-3",children:["field"===h?g:null,f,"trigger"===h?g:null,void 0===c?null:(0,t.jsx)(r.AvatarMenu,{...c})]})]})}var o=e.i(77071),c=e.i(522016);let u={live:{label:"Live",dot:"bg-tone-ok-fg"},reconnecting:{label:"Reconnecting",dot:"bg-tone-waiting-fg"},offline:{label:"Offline",dot:"bg-tone-attention-fg"}};function m({state:e,className:a}){let{label:s,dot:n}=u[e];return(0,t.jsxs)("span",{"data-slot":"live-status","data-state":e,"aria-live":"polite",className:(0,l.f)("inline-flex items-center gap-1.5 text-meta text-muted-foreground",a),children:[(0,t.jsx)("span",{"aria-hidden":!0,className:(0,l.f)("size-2 shrink-0 rounded-full",n)}),s]})}e.s(["f",0,function({breadcrumb:e,parents:a=[],live:s,switcher:i,onCompose:r,onSearch:l}){return(0,t.jsxs)(d,{switcher:i,switcherLayout:"fleet",onSearch:l,search:"field",searchLabel:"Search",className:"hidden sm:flex",actions:r?(0,t.jsx)(n.f,{size:"sm",icon:(0,t.jsx)(o.f,{"aria-hidden":!0}),"data-testid":"header-compose",onClick:r,children:"Compose"}):null,children:[(0,t.jsx)("nav",{"aria-label":"Breadcrumb","data-testid":"header-breadcrumb",className:"-ml-2 flex min-w-0 items-center gap-3 text-body",children:(0,t.jsxs)("ol",{className:"flex min-w-0 items-center gap-1",children:[(0,t.jsx)("li",{"aria-hidden":!0,className:"text-muted-foreground",children:"/"}),a.map(e=>(0,t.jsxs)("li",{className:"flex shrink-0 items-center gap-1",children:[(0,t.jsx)(c.default,{href:e.href,className:"text-muted-foreground hover:text-foreground hover:underline",children:e.label}),(0,t.jsx)("span",{"aria-hidden":!0,className:"text-muted-foreground",children:"/"})]},e.href)),(0,t.jsx)("li",{"aria-current":"page",className:"truncate font-medium text-foreground",children:e})]})}),(0,t.jsx)(m,{state:s})]})}],577880);var h=e.i(24071);e.s(["f",0,function({title:e,live:i,actions:l,back:d,switcher:o,isTitled:u=!1,account:p,onSearch:f}){let x=f&&!d?f:void 0;return(0,t.jsxs)("header",{"data-slot":"top-bar","data-mode":d?"detail":"root",className:"sticky top-0 z-30 flex h-(--size-header) items-center gap-2.5 border-b border-border bg-background px-4 sm:hidden",children:[d?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(c.default,{href:d.href,className:"-ml-1.5 inline-flex h-(--size-control-touch) shrink-0 items-center gap-0.5 rounded-md pr-2 text-body-touch text-foreground focus-visible:outline-2 focus-visible:outline-ring [&_svg]:size-(--size-icon)",children:[(0,t.jsx)(h.f,{"aria-hidden":!0}),d.label]}),(0,t.jsx)("p",{className:"min-w-0 flex-1 truncate text-center text-body-touch font-semibold text-foreground",children:e})]}):o?(0,t.jsx)(s.AppSwitcher,{switcher:o,layout:"compact",...u?{title:e}:{},className:"min-w-0"}):(0,t.jsx)("p",{className:"truncate px-1.5 text-title-touch font-semibold text-foreground",children:u?e:"Console"}),(0,t.jsx)(m,{state:i,className:u&&!d?"ml-auto":void 0}),l||x||p&&!d?(0,t.jsxs)("div",{className:"ml-auto flex items-center gap-1",children:[x?(0,t.jsx)(n.f,{variant:"ghost",size:"touch",isIconOnly:!0,"aria-label":"Search ships or jump to","data-testid":"top-bar-search",onClick:x,children:(0,t.jsx)(a.f,{"aria-hidden":!0})}):null,l,p&&!d?(0,t.jsx)(r.AvatarMenuSheet,{...p}):null]}):null]})}],485538)},509892,e=>{var t=e.i(843476),a=e.i(819759),s=e.i(681924),n=e.i(812437),i=e.i(577880),r=e.i(485538);e.s(["f",0,function({title:e,description:l,titleMeta:d,primaryAction:o,isActionInTitleRow:c=!1,toolbar:u,live:m,onCompose:h,onSearch:p,switcher:f,account:x,banner:g,phoneTitle:b,phoneTopBar:y,children:j}){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.f,{breadcrumb:e,live:m,switcher:f,onCompose:h,onSearch:p}),g,y??(0,t.jsx)(r.f,{title:b??e,isTitled:void 0!==b,live:m,switcher:f,account:x,...void 0===b?{onSearch:p}:{},actions:h&&void 0===b?(0,t.jsx)(s.f,{variant:"ghost",size:"touch",isIconOnly:!0,"aria-label":"Compose","data-testid":"top-bar-compose",onClick:h,children:(0,t.jsx)(a.f,{"aria-hidden":!0})}):void 0}),(0,t.jsxs)("main",{className:"flex grow flex-col gap-4 px-6 py-5 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:(0,n.f)("flex flex-wrap items-start justify-between gap-4 max-sm:gap-3",c&&"max-sm:flex-nowrap",void 0!==b&&"max-sm:sr-only"),children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-1",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-x-2.5 gap-y-1",children:[(0,t.jsx)("h1",{className:"text-title font-semibold tracking-tight text-foreground max-sm:text-title-touch",children:e}),d]}),l?(0,t.jsx)("p",{className:"text-meta text-muted-foreground max-sm:text-body-touch",children:l}):null]}),o?(0,t.jsx)("div",{className:(0,n.f)("shrink-0",!c&&"max-sm:w-full max-sm:[&>*]:w-full",void 0!==b&&"max-sm:hidden"),children:o}):null]}),u,j]})]})}])},516634,38614,e=>{let t=["noShipCanTake","waitingForCrew","stalledInFlight","undeliverable"];function a(e){return`/fleet-health/${e}`}function s(e){return"ship"===e.kind?e.ship.name:e.type}let n={noShipCanTake:"no ship can take",waitingForCrew:"waiting for crew",stalledInFlight:"stalled in flight",undeliverable:"undeliverable"},i=[{minutes:1,label:"1 min"},{minutes:10,label:"10 min"},{minutes:60,label:"1 h"},{minutes:1440,label:"1 d"},{minutes:10080,label:"7 d"}],r=Math.log(1),l=Math.log(10080);function d(e){return Math.min(Math.max((Math.log(Math.max(e,1))-r)/(l-r),0),1)}let o={pending:"pending",received:"received",handed:"handed (pulled)",undeliverable:"undeliverable"};e.s(["A",0,{noShipCanTake:"Sent to a type with no active ship. Waits until you commission one.",waitingForCrew:"Sent to a ship no session crews. Waits until it is crewed.",stalledInFlight:"Taken by a session that went quiet. Waits until it acknowledges or the ship is released.",undeliverable:"Taken five times, never acknowledged. Waits for you to resend or dismiss."},"R",0,i,"M",0,a,"Q",0,function(e){return t.flatMap(t=>e.byCause.filter(e=>e.cause===t))},"f",0,function(e){let[t]=e.stuckPerHour;return void 0===t?[]:e.places.filter(e=>e.oldestSince>t.at).toSorted((e,t)=>e.oldestSince.localeCompare(t.oldestSince)).map((t,a)=>({number:a+1,hour:e.stuckPerHour.findIndex(e=>e.at>=t.oldestSince),label:`${s(t.place)}: ${n[t.cause]}`}))},"n",0,function(e,t){let a=Math.round(e/1e3);return a<60?`${String(a)} s`:t(new Date(0),new Date(e))},"p",0,function(e,t){return`/ships/${e}?tab=messages&message=${t}`},"F",0,function(e){let t=e.place;switch(e.cause){case"noShipCanTake":return{label:`Commission a ${s(t)}`,href:"/?commission=new"};case"waitingForCrew":return"ship"===t.kind?{label:"Get starting prompt",href:`/ships/${t.ship.id}`}:{label:"Open ships of type",href:`/?type=${encodeURIComponent(t.type)}`};case"stalledInFlight":if("ship"===t.kind&&null!==t.machine)return{label:"Open machine",href:`/trierarchs/${t.machine.id}`};return"ship"===t.kind?{label:"Open ship",href:`/ships/${t.ship.id}`}:{label:"Open ships of type",href:`/?type=${encodeURIComponent(t.type)}`};case"undeliverable":return{label:"Resend or dismiss",href:a("undeliverable")}}},"U",0,s,"l",0,function(e,t){let a=e.place;if("stalledInFlight"!==e.cause||"ship"!==a.kind)return null;let s=[...new Set(e.deliveries.map(e=>o[e.state]))].join(", ");if(null!==a.machine){let e=null===a.machine.lastSeenAt?"never seen":`last seen ${t.since(new Date(a.machine.lastSeenAt))}`;return`${s}, machine ${a.machine.name} ${e}`}let n=t.facts?.lastSeenAt??null;return null===n?s:`${s}, session last seen ${t.since(new Date(n))}`},"N",0,function(e){return e.split("\n",1)[0]?.trim()??""},"g",0,function(e){return new Map(e.byMachine.map(({machine:e,count:t})=>[e.id,t]))},"S",0,function(e){return e.count>e.dayAgo?`Up from ${String(e.dayAgo)} a day ago.`:e.count<e.dayAgo?`Down from ${String(e.dayAgo)} a day ago.`:"As many as a day ago."},"i",0,function(e){let{count:t,places:a,oldestSince:s}=e.summary;return null===s?{kind:"delivering"}:{kind:"stuck",count:t,places:a,since:s,dayAgo:e.stuckPerHour.at(-25)?.count??0}},"Y",0,function(e,t){return Math.max(0,(t.getTime()-Date.parse(e))/6e4)},"a",0,d],516634);var c=e.i(843476),u=e.i(812437);function m(e){return`${100*d(e)}%`}e.s(["q",0,function({className:e}){return(0,c.jsx)("div",{"aria-hidden":!0,className:(0,u.f)("relative h-4 w-full text-micro text-muted-foreground",e),children:i.map((e,t)=>(0,c.jsx)("span",{className:(0,u.f)("absolute whitespace-nowrap",0===t?"":t===i.length-1?"-translate-x-full":"-translate-x-1/2"),style:{left:m(e.minutes)},children:e.label},e.minutes))})},"B",0,function({waits:e,label:t,className:a}){let s=Math.max(0,...e);return(0,c.jsxs)("div",{role:"img","aria-label":t,"data-testid":"health-wait-strip",className:(0,u.f)("relative h-4 w-full",a),children:[(0,c.jsx)("span",{"aria-hidden":!0,className:"absolute inset-y-0 rounded-xs bg-muted",style:{left:m(10),right:`calc(100% - ${m(60)})`}}),(0,c.jsx)("span",{"aria-hidden":!0,className:"absolute inset-x-0 top-1/2 h-px bg-border"}),i.map(e=>(0,c.jsx)("span",{"aria-hidden":!0,className:"absolute top-1/4 h-1/2 w-px bg-border",style:{left:m(e.minutes)}},e.minutes)),(0,c.jsx)("span",{"aria-hidden":!0,className:"absolute top-1/2 h-0.5 -translate-y-1/2 rounded-full bg-foreground opacity-35",style:{left:0,width:m(s)}}),e.map((e,t)=>(0,c.jsx)("span",{"aria-hidden":!0,className:"absolute top-1/2 size-2.5 -translate-1/2 rounded-full border-2 border-card bg-foreground",style:{left:m(e)}},`${e}-${String(t)}`))]})}],38614)},718423,e=>{var t=e.i(137529),a=e.i(540143),s=e.i(317751),n=e.i(912598),i=e.i(905861),r=e.i(271645),l=e.i(586413),d=e.i(123938),o=e.i(427702);let c=new Set(["FleetInitialised","ShipCommissioned","ShipClaimed","LeaseRevoked","CredentialRevoked","StartingPromptIssued","ShipRetired","DeliveryAcknowledged","DeliveryUndeliverable","ShipReported","CrewRequested","CrewRequestRemoved","CrewAssigned","CrewStatusChanged","CrewRequestExplained","CrewRequestGivenBack","LabelAssigned","LabelUnassigned","LabelRetired","AlertRaised","AlertCleared"]);function u(e,t){return e.pages.some(e=>e.items.some(e=>e.id===t))}function m(e){return"object"==typeof e&&null!==e}function h(e){return Array.isArray(e)?e:[]}function p(e){return"string"==typeof e&&e.startsWith("lbv_")}let f=new Set(["LabelDefined","LabelValuesChanged","LabelRetired","LabelAssigned","LabelUnassigned","LabelDeleted"]),x=new Set(["FleetSealingTurnedOn","FleetPayloadsSealed","FleetDataKeyCreated","FleetCompanyKeyChanged","FleetRecoveryKeyChanged","FleetKeysRecovered","FleetKeyUnavailable","FleetKeyAvailable"]),g=new Set(["FeatureFlagTurnedOn","FeatureFlagTurnedOff"]),b=new Set(["DeliveryUndeliverable","DeliveryNotHandled","DeliveryDismissed"]),y=new Set(["NetworkRulesSet","NetworkRulesDraftSaved","NetworkRulesDraftDiscarded","NetworkRulesDeclared","BuiltInRuleChanged"]);e.s(["f",0,function(){let e=(0,o.I)(),j=(0,n.d)(),[v,w]=(0,r.useState)(new Set),N=(0,d.h)(),[k]=(0,r.useState)(()=>{let n,i,r,d;return function(e){var n,i;let r,d,o,j,v,w,{trpc:N,queryClient:k,reload:S}=e,C=[...N.fleet.list.infiniteQueryKey()],M=()=>k.getQueriesData({queryKey:C}).flatMap(([,e])=>void 0===e?[]:[e]),z=(n={readRow:e=>k.query({...N.fleet.listedShip.queryOptions({shipId:e}),staleTime:0}),writeRow:t=>{let a=M().some(e=>!u(e,t.id));k.setQueriesData({queryKey:C},e=>e&&function(e,t){if(u(e,t.id))return{...e,pages:e.pages.map(e=>{var a;return{...e,items:(a=e.items,a.map(e=>e.id===t.id?t:e))}})};let[a,...s]=e.pages;return void 0===a?e:{...e,pages:[{...a,items:[t,...a.items]},...s]}}(e,t)),a&&e.onPlacedFirst(t.id)}},r=new Set,d=new Set,o=async e=>{r.add(e);try{do d.delete(e),n.writeRow(await n.readRow(e));while(d.has(e))}catch{}finally{r.delete(e),d.delete(e)}},e=>{r.has(e)?d.add(e):o(e)}),I=[...N.fleet.harbour.infiniteQueryKey()],q=()=>k.getQueriesData({queryKey:I}).flatMap(([e,t])=>void 0===t?[]:[e]),$=()=>q().length>0,D=new Set,F=(i=async()=>{let e=[...D];D.clear();let n=q(),i=new s.f;try{let[s,r]=await Promise.all([i.query({...N.fleet.harbour.queryOptions({limit:1}),staleTime:0}).then(e=>e.counts),Promise.all(e.map(async e=>({shipId:e,reads:await Promise.all(n.map(async a=>{let s=function(e){let[,a]=e,s=m(a)?a.input:void 0,n=m(s)?s.filter:void 0;if(m(n))return{..."string"==typeof n.nameQuery?{nameQuery:n.nameQuery}:{},...void 0===n.state?{}:{state:h(n.state).flatMap(e=>t.E.find(t=>t===e)??[])},...void 0===n.type?{}:{type:h(n.type).filter(e=>"string"==typeof e)},...void 0===n.valueIds?{}:{valueIds:h(n.valueIds).filter(p)}}}(a);return{queryKey:a,tile:(await i.query({...N.fleet.harbour.queryOptions(void 0===s?{shipIds:[e]}:{shipIds:[e],filter:s}),staleTime:0})).items[0]}}))})))]);a.f.batch(()=>{for(let{shipId:e,reads:t}of r)for(let{queryKey:a,tile:s}of t)k.setQueryData(a,t=>t&&function(e,t){let{shipId:a,tile:s}=t;if(void 0===s)return{...e,pages:e.pages.map(e=>({...e,items:e.items.filter(e=>e.id!==a)}))};if(e.pages.some(e=>e.items.some(e=>e.id===a)))return{...e,pages:e.pages.map(e=>({...e,items:e.items.map(e=>e.id===a?s:e)}))};let[n,...i]=e.pages;return void 0===n?e:{...e,pages:[{...n,items:[s,...n.items]},...i]}}(t,{shipId:e,tile:s}));null!==s&&(k.setQueryData(N.fleet.harbour.queryKey({limit:1}),e=>e&&{...e,counts:s}),k.setQueriesData({queryKey:I},e=>e&&function(e,t){let[a,...s]=e.pages;return void 0===a?e:{...e,pages:[{...a,counts:t},...s]}}(e,s)))})}catch(t){for(let t of e)D.add(t);throw t}finally{i.clear()}},j=new Set,v=new Set,w=async()=>{j.add("read");try{do v.delete("read"),await i();while(v.has("read"))}catch{}finally{j.delete("read"),v.delete("read")}},()=>{j.has("read")?v.add("read"):w()}),R=()=>{S(N.fleet.stuckCount.queryKey()),S(N.fleet.stuckSummary.queryKey()),S(N.fleet.stuck.pathKey())};return e=>{var t,a,s,n,i,r,d;if("resync"===e.kind){S(N.fleet.pathKey()),S(l.C);return}let{event:o}=e;for(let e of new Set([o.shipId,o.actorShipId]))null!==e&&(S(N.fleet.ship.queryKey({shipId:e})),S(N.fleet.shipTimeline.infiniteQueryKey({shipId:e})),S(N.fleet.shipWay.queryKey({shipId:e})));if(null!==o.messageId&&(S(N.fleet.shipMessages.pathKey()),S(N.fleet.shipWay.pathKey()),S(N.fleet.message.queryKey({messageId:o.messageId})),S(N.fleet.messageDeliveries.infiniteQueryKey({messageId:o.messageId})),S(N.fleet.inbox.pathKey()),S(N.fleet.inboxCount.queryKey()),S(l.C),R()),"DeliveryAcknowledged"===o.type&&S(N.fleet.acknowledged.queryKey()),t=o.type,b.has(t)&&S(N.fleet.needsAttention.pathKey()),a=o.type,f.has(a)&&S(N.fleet.labels.queryKey()),s=o.type,x.has(s)&&S(N.fleet.sealing.queryKey()),n=o.type,g.has(n)&&S(N.console.session.queryKey()),"NetworkRulesDeclared"===o.type&&S(N.fleet.declaredNetworkRules.queryKey()),("BuiltInRuleChanged"===(i=o.type)||"NetworkRulesSet"===i)&&S(N.fleet.builtInRules.queryKey()),r=o.type,y.has(r)&&(S(N.fleet.networkRules.queryKey()),S(N.fleet.networkRulesDraftChanges.queryKey()),S(N.fleet.explainReach.pathKey())),d=o.type,c.has(d)){if(M().length>0)for(let e of new Set([o.shipId,o.actorShipId]))null!==e&&z(e);if($()||void 0!==k.getQueryData(N.fleet.harbour.queryKey({limit:1}))){for(let e of new Set([o.shipId,o.actorShipId]))null!==e&&$()&&D.add(e);F()}S(N.fleet.shipCounts.pathKey()),R()}}}({trpc:e,queryClient:j,reload:(n=new Set,i=new Set,r=e=>j.invalidateQueries({queryKey:e,exact:!0},{cancelRefetch:!1}),d=async e=>{n.add(e.queryHash);let t=e.isBehind;try{for(await r(e.queryKey);t||i.delete(e.queryHash);)t=!1,await r(e.queryKey)}finally{n.delete(e.queryHash)}},e=>{for(let t of j.getQueryCache().findAll({queryKey:e}))n.has(t.queryHash)?i.add(t.queryHash):d({queryHash:t.queryHash,queryKey:t.queryKey,isBehind:"fetching"===t.state.fetchStatus})}),onPlacedFirst:e=>{w(t=>new Set([...t,e]))}})}),S=(0,i.B)(e.fleet.events.subscriptionOptions({lastEventId:null},{onData:({data:e})=>{k(e)}}));return{live:"connecting"===S.status&&N?"live":function(e){switch(e){case"pending":return"live";case"connecting":return"reconnecting";case"idle":case"error":return"offline"}}(S.status),placedFirstShipIds:v,error:S.error}}])},371951,e=>{var t=e.i(843476),a=e.i(689664),s=e.i(716327),n=e.i(611568),i=e.i(271645),r=e.i(681924),l=e.i(646013),d=e.i(620388),o=e.i(812437);let c="inline-flex min-w-0 items-center gap-1 rounded-md px-1.5 py-1 text-body font-semibold text-foreground outline-none transition-colors duration-(--duration-fast) hover:bg-accent focus-visible:outline-2 focus-visible:outline-ring aria-expanded:bg-accent disabled:opacity-60";function u({isCurrent:e,isOpening:s}){return s?(0,t.jsx)(n.f,{"aria-hidden":!0,className:"ml-auto animate-spin motion-reduce:animate-none"}):e?(0,t.jsx)(a.f,{"aria-hidden":!0,className:"ml-auto"}):null}function m({url:e,name:a,isCurrent:s,opening:n,onOpen:i,testId:r}){let d=n?.url===e&&n.name===a;return(0,t.jsxs)(l.DropdownMenuItem,{"data-testid":r,"data-current":s||void 0,disabled:void 0!==n&&!d,closeOnClick:!1,render:n=>(0,t.jsx)("a",{...n,href:e,"aria-current":s?"page":void 0,onClick:t=>{n.onClick?.(t),i({url:e,name:a})},children:n.children}),children:[(0,t.jsx)("span",{className:"min-w-0 truncate",children:d?`Opening ${a}`:a}),(0,t.jsx)(u,{isCurrent:s,isOpening:d})]})}function h({url:e,name:a,isCurrent:s,opening:n,onOpen:i,testId:r}){let l=n?.url===e&&n.name===a;return(0,t.jsxs)("a",{href:e,"data-testid":r,"aria-current":s?"page":void 0,"aria-disabled":void 0!==n&&!l||void 0,onClick:t=>{void 0!==n?t.preventDefault():i({url:e,name:a})},className:"flex h-(--size-control-touch) items-center gap-2.5 rounded-md px-2 text-body-touch text-foreground outline-none focus-visible:outline-2 focus-visible:outline-ring aria-disabled:opacity-60 [&_svg]:size-(--size-icon) [&_svg]:text-muted-foreground",children:[(0,t.jsx)("span",{className:"min-w-0 truncate",children:l?`Opening ${a}`:a}),(0,t.jsx)(u,{isCurrent:s,isOpening:l})]})}function p({label:e,children:a}){return(0,t.jsxs)("div",{role:"group","aria-label":e,className:"flex flex-col gap-0.5",children:[(0,t.jsx)("p",{className:"px-2 text-caption font-medium text-muted-foreground",children:e}),a]})}e.s(["AppSwitcher",0,function({switcher:e,layout:a,title:u,className:f}){let[x,g]=(0,i.useState)(void 0),{fleet:b,appLabel:y,fleets:j,apps:v,canSwitch:w}=e;return w?"compact"===a?(0,t.jsxs)(d.Sheet,{children:[(0,t.jsxs)(d.SheetTrigger,{"data-testid":"app-switcher","aria-label":`Switch fleet or app: ${b.name}, ${y}`,className:(0,o.f)(c,"text-title-touch",f),children:[(0,t.jsx)("span",{className:"truncate",children:u??y}),void 0===x?(0,t.jsx)(s.f,{"aria-hidden":!0,className:"size-(--size-icon) shrink-0 text-muted-foreground"}):(0,t.jsx)(n.f,{"aria-hidden":!0,className:"size-(--size-icon) shrink-0 animate-spin motion-reduce:animate-none"})]}),(0,t.jsxs)(d.SheetContent,{side:"bottom","data-testid":"app-switcher-sheet",className:"gap-3",children:[(0,t.jsx)(d.SheetTitle,{className:"sr-only",children:"Switch fleet or app"}),(0,t.jsx)(p,{label:"Fleets",children:j.map(e=>(0,t.jsx)(h,{url:e.url,name:e.name,isCurrent:e.isCurrent,opening:x,onOpen:g,testId:"app-switcher-fleet"},e.id))}),(0,t.jsx)(p,{label:"Apps",children:v.map(e=>(0,t.jsx)(h,{url:e.url,name:e.label,isCurrent:e.isCurrent,opening:x,onOpen:g,testId:"app-switcher-app"},e.app))}),(0,t.jsx)(d.SheetClose,{render:(0,t.jsx)(r.f,{size:"touch",className:"w-full"}),children:"Cancel"})]})]}):"fleet"===a?(0,t.jsx)("nav",{"aria-label":"Fleet and app","data-testid":"app-switcher",className:(0,o.f)("flex min-w-0 items-center",f),children:(0,t.jsxs)(l.DropdownMenu,{children:[(0,t.jsxs)(l.DropdownMenuTrigger,{"data-testid":"app-switcher-fleets","aria-label":`Fleet: ${b.name}, ${y}. Switch fleet or app`,className:(0,o.f)(c,"-mx-1.5 font-normal text-muted-foreground hover:text-foreground"),children:[(0,t.jsx)("span",{className:"truncate",children:b.name}),void 0===x?null:(0,t.jsx)(n.f,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0 animate-spin motion-reduce:animate-none"})]}),(0,t.jsxs)(l.DropdownMenuContent,{align:"start",className:"w-56",children:[(0,t.jsxs)(l.DropdownMenuGroup,{children:[(0,t.jsx)(l.DropdownMenuLabel,{children:"Fleets"}),j.map(e=>(0,t.jsx)(m,{url:e.url,name:e.name,isCurrent:e.isCurrent,opening:x,onOpen:g,testId:"app-switcher-fleet"},e.id))]}),(0,t.jsx)(l.DropdownMenuSeparator,{}),(0,t.jsxs)(l.DropdownMenuGroup,{children:[(0,t.jsx)(l.DropdownMenuLabel,{children:"Apps"}),v.map(e=>(0,t.jsx)(m,{url:e.url,name:e.label,isCurrent:e.isCurrent,opening:x,onOpen:g,testId:"app-switcher-app"},e.app))]})]})]})}):(0,t.jsxs)("nav",{"aria-label":"Fleet and app","data-testid":"app-switcher",className:(0,o.f)("flex min-w-0 items-center gap-0.5",f),children:[(0,t.jsxs)(l.DropdownMenu,{children:[(0,t.jsx)(l.DropdownMenuTrigger,{"data-testid":"app-switcher-fleets","aria-label":`Fleet: ${b.name}. Switch fleet`,className:c,children:(0,t.jsx)("span",{className:"truncate",children:b.name})}),(0,t.jsx)(l.DropdownMenuContent,{align:"start",className:"w-56",children:(0,t.jsxs)(l.DropdownMenuGroup,{children:[(0,t.jsx)(l.DropdownMenuLabel,{children:"Fleets"}),j.map(e=>(0,t.jsx)(m,{url:e.url,name:e.name,isCurrent:e.isCurrent,opening:x,onOpen:g,testId:"app-switcher-fleet"},e.id))]})})]}),(0,t.jsx)("span",{"aria-hidden":!0,className:"text-muted-foreground",children:"/"}),(0,t.jsxs)(l.DropdownMenu,{children:[(0,t.jsxs)(l.DropdownMenuTrigger,{"data-testid":"app-switcher-apps","aria-label":`App: ${y}. Switch app`,className:c,children:[(0,t.jsx)("span",{className:"truncate",children:y}),void 0===x?(0,t.jsx)(s.f,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0 text-muted-foreground"}):(0,t.jsx)(n.f,{"aria-hidden":!0,className:"size-(--size-icon-sm) shrink-0 animate-spin motion-reduce:animate-none"})]}),(0,t.jsx)(l.DropdownMenuContent,{align:"start",className:"w-56",children:(0,t.jsxs)(l.DropdownMenuGroup,{children:[(0,t.jsx)(l.DropdownMenuLabel,{children:"Apps"}),v.map(e=>(0,t.jsx)(m,{url:e.url,name:e.label,isCurrent:e.isCurrent,opening:x,onOpen:g,testId:"app-switcher-app"},e.app))]})})]})]}):(0,t.jsxs)("p",{"data-testid":"app-switcher",className:(0,o.f)("flex min-w-0 items-center gap-1 px-1.5 text-body font-semibold text-foreground","fleet"===a&&"px-0 font-normal text-muted-foreground","compact"===a&&void 0!==u&&"text-title-touch",f),children:["compact"===a?null:(0,t.jsx)("span",{className:"truncate",children:b.name}),"full"===a?(0,t.jsx)("span",{"aria-hidden":!0,className:"text-muted-foreground",children:"/"}):null,"fleet"===a?null:(0,t.jsx)("span",{className:"truncate",children:u??y})]})}])}])})();
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,288882,t=>{t.v(i=>Promise.all(["static/chunks/15uffeh7yixaf.js","static/chunks/4222-r2viidh2.js"].map(i=>t.l(i))).then(()=>i(628136)))}]);