@aeolus-fleet/gateway 0.37.2 → 0.37.4

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 (231) hide show
  1. package/dist/adapters/fleet/active-ships.js +24 -1
  2. package/dist/adapters/fleet/active-ships.js.map +1 -1
  3. package/package.json +1 -1
  4. package/web/.next/BUILD_ID +1 -1
  5. package/web/.next/build-manifest.json +3 -3
  6. package/web/.next/diagnostics/route-bundle-stats.json +87 -87
  7. package/web/.next/fallback-build-manifest.json +3 -3
  8. package/web/.next/prerender-manifest.json +3 -3
  9. package/web/.next/server/app/(bridge)/bridge/basket/page/server-reference-manifest.json +10 -10
  10. package/web/.next/server/app/(bridge)/bridge/basket/page.js.nft.json +1 -1
  11. package/web/.next/server/app/(bridge)/bridge/basket/page_client-reference-manifest.js +1 -1
  12. package/web/.next/server/app/(bridge)/bridge/done/page/server-reference-manifest.json +4 -4
  13. package/web/.next/server/app/(bridge)/bridge/done/page.js.nft.json +1 -1
  14. package/web/.next/server/app/(bridge)/bridge/done/page_client-reference-manifest.js +1 -1
  15. package/web/.next/server/app/(bridge)/bridge/fleet/page/server-reference-manifest.json +3 -3
  16. package/web/.next/server/app/(bridge)/bridge/fleet/page.js.nft.json +1 -1
  17. package/web/.next/server/app/(bridge)/bridge/fleet/page_client-reference-manifest.js +1 -1
  18. package/web/.next/server/app/(bridge)/bridge/page/server-reference-manifest.json +9 -9
  19. package/web/.next/server/app/(bridge)/bridge/page.js.nft.json +1 -1
  20. package/web/.next/server/app/(bridge)/bridge/page_client-reference-manifest.js +1 -1
  21. package/web/.next/server/app/(bridge)/bridge/settings/page/server-reference-manifest.json +3 -3
  22. package/web/.next/server/app/(bridge)/bridge/settings/page.js.nft.json +1 -1
  23. package/web/.next/server/app/(bridge)/bridge/settings/page_client-reference-manifest.js +1 -1
  24. package/web/.next/server/app/(bridge)/bridge/settings/requests/[requestId]/page/server-reference-manifest.json +4 -4
  25. package/web/.next/server/app/(bridge)/bridge/settings/requests/[requestId]/page.js.nft.json +1 -1
  26. package/web/.next/server/app/(bridge)/bridge/settings/requests/[requestId]/page_client-reference-manifest.js +1 -1
  27. package/web/.next/server/app/(bridge)/bridge/settings/routing/page/server-reference-manifest.json +7 -7
  28. package/web/.next/server/app/(bridge)/bridge/settings/routing/page.js.nft.json +1 -1
  29. package/web/.next/server/app/(bridge)/bridge/settings/routing/page_client-reference-manifest.js +1 -1
  30. package/web/.next/server/app/(bridge)/bridge/stay-aware/page/server-reference-manifest.json +9 -9
  31. package/web/.next/server/app/(bridge)/bridge/stay-aware/page.js.nft.json +1 -1
  32. package/web/.next/server/app/(bridge)/bridge/stay-aware/page_client-reference-manifest.js +1 -1
  33. package/web/.next/server/app/(bridge)/outside-parties/[name]/change/page/server-reference-manifest.json +17 -17
  34. package/web/.next/server/app/(bridge)/outside-parties/[name]/change/page.js.nft.json +1 -1
  35. package/web/.next/server/app/(bridge)/outside-parties/[name]/change/page_client-reference-manifest.js +1 -1
  36. package/web/.next/server/app/(bridge)/outside-parties/[name]/page/server-reference-manifest.json +10 -10
  37. package/web/.next/server/app/(bridge)/outside-parties/[name]/page.js.nft.json +1 -1
  38. package/web/.next/server/app/(bridge)/outside-parties/[name]/page_client-reference-manifest.js +1 -1
  39. package/web/.next/server/app/(bridge)/outside-parties/[name]/retire/page/server-reference-manifest.json +17 -17
  40. package/web/.next/server/app/(bridge)/outside-parties/[name]/retire/page.js.nft.json +1 -1
  41. package/web/.next/server/app/(bridge)/outside-parties/[name]/retire/page_client-reference-manifest.js +1 -1
  42. package/web/.next/server/app/(bridge)/outside-parties/add/page/server-reference-manifest.json +12 -12
  43. package/web/.next/server/app/(bridge)/outside-parties/add/page.js.nft.json +1 -1
  44. package/web/.next/server/app/(bridge)/outside-parties/add/page_client-reference-manifest.js +1 -1
  45. package/web/.next/server/app/(bridge)/outside-parties/add-a2a-agent/page/server-reference-manifest.json +4 -4
  46. package/web/.next/server/app/(bridge)/outside-parties/add-a2a-agent/page.js.nft.json +1 -1
  47. package/web/.next/server/app/(bridge)/outside-parties/add-a2a-agent/page_client-reference-manifest.js +1 -1
  48. package/web/.next/server/app/(bridge)/outside-parties/add-a2a-client/page/server-reference-manifest.json +4 -4
  49. package/web/.next/server/app/(bridge)/outside-parties/add-a2a-client/page.js.nft.json +1 -1
  50. package/web/.next/server/app/(bridge)/outside-parties/add-a2a-client/page_client-reference-manifest.js +1 -1
  51. package/web/.next/server/app/(bridge)/outside-parties/page/server-reference-manifest.json +4 -4
  52. package/web/.next/server/app/(bridge)/outside-parties/page.js.nft.json +1 -1
  53. package/web/.next/server/app/(bridge)/outside-parties/page_client-reference-manifest.js +1 -1
  54. package/web/.next/server/app/(console)/gateway-off/page/server-reference-manifest.json +1 -1
  55. package/web/.next/server/app/(console)/gateway-off/page.js.nft.json +1 -1
  56. package/web/.next/server/app/(console)/gateway-off/page_client-reference-manifest.js +1 -1
  57. package/web/.next/server/app/(console)/meetings/[meetingId]/page/server-reference-manifest.json +3 -3
  58. package/web/.next/server/app/(console)/meetings/[meetingId]/page.js.nft.json +1 -1
  59. package/web/.next/server/app/(console)/meetings/[meetingId]/page_client-reference-manifest.js +1 -1
  60. package/web/.next/server/app/(console)/parties/page/server-reference-manifest.json +9 -9
  61. package/web/.next/server/app/(console)/parties/page.js.nft.json +1 -1
  62. package/web/.next/server/app/(console)/parties/page_client-reference-manifest.js +1 -1
  63. package/web/.next/server/app/(console)/sign-in/failed/page/server-reference-manifest.json +1 -1
  64. package/web/.next/server/app/(console)/sign-in/failed/page.js.nft.json +1 -1
  65. package/web/.next/server/app/(console)/sign-in/failed/page_client-reference-manifest.js +1 -1
  66. package/web/.next/server/app/(console)/slack/disconnect/page/server-reference-manifest.json +8 -8
  67. package/web/.next/server/app/(console)/slack/disconnect/page.js.nft.json +1 -1
  68. package/web/.next/server/app/(console)/slack/disconnect/page_client-reference-manifest.js +1 -1
  69. package/web/.next/server/app/(console)/slack/expose/page/server-reference-manifest.json +8 -8
  70. package/web/.next/server/app/(console)/slack/expose/page.js.nft.json +1 -1
  71. package/web/.next/server/app/(console)/slack/expose/page_client-reference-manifest.js +1 -1
  72. package/web/.next/server/app/(console)/slack/page/server-reference-manifest.json +8 -8
  73. package/web/.next/server/app/(console)/slack/page.js.nft.json +1 -1
  74. package/web/.next/server/app/(console)/slack/page_client-reference-manifest.js +1 -1
  75. package/web/.next/server/app/(console)/slack/remove/page/server-reference-manifest.json +8 -8
  76. package/web/.next/server/app/(console)/slack/remove/page.js.nft.json +1 -1
  77. package/web/.next/server/app/(console)/slack/remove/page_client-reference-manifest.js +1 -1
  78. package/web/.next/server/app/_global-error.html +1 -1
  79. package/web/.next/server/app/_global-error.rsc +1 -1
  80. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  81. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  82. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  83. package/web/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
  84. package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
  85. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  86. package/web/.next/server/app/authorize/failed/page/server-reference-manifest.json +1 -1
  87. package/web/.next/server/app/authorize/failed/page.js.nft.json +1 -1
  88. package/web/.next/server/app/authorize/failed/page_client-reference-manifest.js +1 -1
  89. package/web/.next/server/app/authorize/pick/page/server-reference-manifest.json +1 -1
  90. package/web/.next/server/app/authorize/pick/page.js.nft.json +1 -1
  91. package/web/.next/server/app/authorize/pick/page_client-reference-manifest.js +1 -1
  92. package/web/.next/server/app/authorize/waiting/approval/page/server-reference-manifest.json +1 -1
  93. package/web/.next/server/app/authorize/waiting/approval/page.js.nft.json +1 -1
  94. package/web/.next/server/app/authorize/waiting/approval/page_client-reference-manifest.js +1 -1
  95. package/web/.next/server/chunks/ssr/01fr_app_(bridge)_bridge_settings_requests_[requestId]_page_actions_0o8g7_xshtmem.js +1 -1
  96. package/web/.next/server/chunks/ssr/01fr_app_(bridge)_bridge_settings_requests_[requestId]_page_actions_0o8g7_xshtmem.js.map +1 -1
  97. package/web/.next/server/chunks/ssr/0b9d__next-internal_server_app_(bridge)_bridge_settings_page_actions_0_te6h-2xxp7l.js +1 -1
  98. package/web/.next/server/chunks/ssr/0b9d__next-internal_server_app_(bridge)_bridge_settings_page_actions_0_te6h-2xxp7l.js.map +1 -1
  99. package/web/.next/server/chunks/ssr/0b9d__next-internal_server_app_(bridge)_bridge_stay-aware_page_actions_1u0xo0v3y9c34.js +1 -1
  100. package/web/.next/server/chunks/ssr/0b9d__next-internal_server_app_(bridge)_bridge_stay-aware_page_actions_1u0xo0v3y9c34.js.map +1 -1
  101. package/web/.next/server/chunks/ssr/0vkm_server_app_(bridge)_bridge_settings_routing_page_actions_06_j7s24dy5ee.js +1 -1
  102. package/web/.next/server/chunks/ssr/0vkm_server_app_(bridge)_bridge_settings_routing_page_actions_06_j7s24dy5ee.js.map +1 -1
  103. package/web/.next/server/chunks/ssr/0vkm_server_app_(bridge)_outside-parties_[name]_change_page_actions_1is-kjq5bubl4.js +1 -1
  104. package/web/.next/server/chunks/ssr/0vkm_server_app_(bridge)_outside-parties_[name]_change_page_actions_1is-kjq5bubl4.js.map +1 -1
  105. package/web/.next/server/chunks/ssr/0vkm_server_app_(bridge)_outside-parties_[name]_page_actions_1mctxtlzsa7xi.js +1 -1
  106. package/web/.next/server/chunks/ssr/0vkm_server_app_(bridge)_outside-parties_[name]_page_actions_1mctxtlzsa7xi.js.map +1 -1
  107. package/web/.next/server/chunks/ssr/0vkm_server_app_(bridge)_outside-parties_[name]_retire_page_actions_0xh6ok1un7s9k.js +1 -1
  108. package/web/.next/server/chunks/ssr/0vkm_server_app_(bridge)_outside-parties_[name]_retire_page_actions_0xh6ok1un7s9k.js.map +1 -1
  109. package/web/.next/server/chunks/ssr/0vkm_server_app_(bridge)_outside-parties_add-a2a-agent_page_actions_1w1q5eavo_loo.js +1 -1
  110. package/web/.next/server/chunks/ssr/0vkm_server_app_(bridge)_outside-parties_add-a2a-agent_page_actions_1w1q5eavo_loo.js.map +1 -1
  111. package/web/.next/server/chunks/ssr/0vkm_server_app_(bridge)_outside-parties_add_page_actions_0urcbg_r0lo7j.js +1 -1
  112. package/web/.next/server/chunks/ssr/0vkm_server_app_(bridge)_outside-parties_add_page_actions_0urcbg_r0lo7j.js.map +1 -1
  113. package/web/.next/server/chunks/ssr/[root-of-the-server]__0ipo8r1s1ntds._.js +1 -1
  114. package/web/.next/server/chunks/ssr/[root-of-the-server]__0ovcg5tg3nh49._.js +1 -1
  115. package/web/.next/server/chunks/ssr/[root-of-the-server]__0ovcg5tg3nh49._.js.map +1 -1
  116. package/web/.next/server/chunks/ssr/[root-of-the-server]__0ro-majrw7piv._.js +1 -1
  117. package/web/.next/server/chunks/ssr/[root-of-the-server]__0ro-majrw7piv._.js.map +1 -1
  118. package/web/.next/server/chunks/ssr/[root-of-the-server]__0xurmpdv5uqfl._.js +1 -1
  119. package/web/.next/server/chunks/ssr/[root-of-the-server]__0zz6fx0keti4r._.js +1 -1
  120. package/web/.next/server/chunks/ssr/[root-of-the-server]__0zz6fx0keti4r._.js.map +1 -1
  121. package/web/.next/server/chunks/ssr/[root-of-the-server]__18-8taiduk1jn._.js +1 -1
  122. package/web/.next/server/chunks/ssr/[root-of-the-server]__18-8taiduk1jn._.js.map +1 -1
  123. package/web/.next/server/chunks/ssr/[root-of-the-server]__19p4g16n2nh0b._.js +1 -1
  124. package/web/.next/server/chunks/ssr/[root-of-the-server]__19p4g16n2nh0b._.js.map +1 -1
  125. package/web/.next/server/chunks/ssr/[root-of-the-server]__1ncn4wx-1i09m._.js +1 -1
  126. package/web/.next/server/chunks/ssr/[root-of-the-server]__1ncn4wx-1i09m._.js.map +1 -1
  127. package/web/.next/server/chunks/ssr/_00hfzlqn1og18._.js +1 -1
  128. package/web/.next/server/chunks/ssr/_00hfzlqn1og18._.js.map +1 -1
  129. package/web/.next/server/chunks/ssr/{_0-9rlwz3ujd0r._.js → _035yszhj3r1c4._.js} +2 -2
  130. package/web/.next/server/chunks/ssr/{_1ag569itedbet._.js.map → _035yszhj3r1c4._.js.map} +1 -1
  131. package/web/.next/server/chunks/ssr/{_1ag569itedbet._.js → _09lgufm3mfrax._.js} +2 -2
  132. package/web/.next/server/chunks/ssr/{_0-9rlwz3ujd0r._.js.map → _09lgufm3mfrax._.js.map} +1 -1
  133. package/web/.next/server/chunks/ssr/_0_nfv33ug5g31._.js +1 -1
  134. package/web/.next/server/chunks/ssr/_0_nfv33ug5g31._.js.map +1 -1
  135. package/web/.next/server/chunks/ssr/{_15yv_08kq3cgn._.js → _0da66q5vprjs4._.js} +2 -2
  136. package/web/.next/server/chunks/ssr/{_1m4bmxzmjr-8s._.js.map → _0da66q5vprjs4._.js.map} +1 -1
  137. package/web/.next/server/chunks/ssr/_0ka_9elusb800._.js +1 -1
  138. package/web/.next/server/chunks/ssr/_0ka_9elusb800._.js.map +1 -1
  139. package/web/.next/server/chunks/ssr/_0pyd1_y7w8ngp._.js +1 -1
  140. package/web/.next/server/chunks/ssr/_0pyd1_y7w8ngp._.js.map +1 -1
  141. package/web/.next/server/chunks/ssr/_0xickgbbju_9-._.js +1 -1
  142. package/web/.next/server/chunks/ssr/_0xickgbbju_9-._.js.map +1 -1
  143. package/web/.next/server/chunks/ssr/_1cs_0d0h7mhw0._.js +1 -1
  144. package/web/.next/server/chunks/ssr/_1cs_0d0h7mhw0._.js.map +1 -1
  145. package/web/.next/server/chunks/ssr/{_1m4bmxzmjr-8s._.js → _1csct1ek1q8gk._.js} +2 -2
  146. package/web/.next/server/chunks/ssr/{_15yv_08kq3cgn._.js.map → _1csct1ek1q8gk._.js.map} +1 -1
  147. package/web/.next/server/chunks/ssr/_1eybd2u08vpbe._.js +57 -0
  148. package/web/.next/server/chunks/ssr/_1eybd2u08vpbe._.js.map +1 -0
  149. package/web/.next/server/chunks/ssr/_1gvevplh5--ko._.js +57 -0
  150. package/web/.next/server/chunks/ssr/_1gvevplh5--ko._.js.map +1 -0
  151. package/web/.next/server/chunks/ssr/_1pjtire7rqla0._.js +1 -1
  152. package/web/.next/server/chunks/ssr/_1pjtire7rqla0._.js.map +1 -1
  153. package/web/.next/server/chunks/ssr/_1qbsmlji34yph._.js +1 -1
  154. package/web/.next/server/chunks/ssr/_1qbsmlji34yph._.js.map +1 -1
  155. package/web/.next/server/chunks/ssr/web_0a9n7acgjrk5c._.js +1 -1
  156. package/web/.next/server/chunks/ssr/web_0a9n7acgjrk5c._.js.map +1 -1
  157. package/web/.next/server/chunks/ssr/web_1vvrekkq5mirt._.js +1 -1
  158. package/web/.next/server/chunks/ssr/web_1vvrekkq5mirt._.js.map +1 -1
  159. package/web/.next/server/chunks/ssr/web__next-internal_server_app_(bridge)_bridge_basket_page_actions_0g7q_rc5nma1e.js +1 -1
  160. package/web/.next/server/chunks/ssr/web__next-internal_server_app_(bridge)_bridge_basket_page_actions_0g7q_rc5nma1e.js.map +1 -1
  161. package/web/.next/server/chunks/ssr/web__next-internal_server_app_(bridge)_bridge_done_page_actions_0kjm34arntdzv.js +1 -1
  162. package/web/.next/server/chunks/ssr/web__next-internal_server_app_(bridge)_bridge_done_page_actions_0kjm34arntdzv.js.map +1 -1
  163. package/web/.next/server/chunks/ssr/web__next-internal_server_app_(bridge)_bridge_fleet_page_actions_19wmo6phgvqfk.js +1 -1
  164. package/web/.next/server/chunks/ssr/web__next-internal_server_app_(bridge)_bridge_fleet_page_actions_19wmo6phgvqfk.js.map +1 -1
  165. package/web/.next/server/chunks/ssr/web__next-internal_server_app_(bridge)_bridge_page_actions_1ok64rg3edm_u.js +1 -1
  166. package/web/.next/server/chunks/ssr/web__next-internal_server_app_(bridge)_bridge_page_actions_1ok64rg3edm_u.js.map +1 -1
  167. package/web/.next/server/chunks/ssr/{web_features_16z82ve7t15n5._.js → web_features_0ids5df1ey0ok._.js} +2 -2
  168. package/web/.next/server/chunks/ssr/{web_features_16z82ve7t15n5._.js.map → web_features_0ids5df1ey0ok._.js.map} +1 -1
  169. package/web/.next/server/chunks/ssr/{web_features_1wo7gr7bxvsi-._.js → web_features_0mfj1eqsy4d_c._.js} +2 -2
  170. package/web/.next/server/chunks/ssr/{web_features_1wo7gr7bxvsi-._.js.map → web_features_0mfj1eqsy4d_c._.js.map} +1 -1
  171. package/web/.next/server/chunks/ssr/web_features_1_4v6uya90q44._.js +3 -0
  172. package/web/.next/server/chunks/ssr/{web_features_1e7_lwq7351pm._.js.map → web_features_1_4v6uya90q44._.js.map} +1 -1
  173. package/web/.next/server/chunks/ssr/web_features_1urhbp0mcpa_l._.js +3 -0
  174. package/web/.next/server/chunks/ssr/{web_features_1fzx-ctm4ru39._.js.map → web_features_1urhbp0mcpa_l._.js.map} +1 -1
  175. package/web/.next/server/chunks/ssr/web_features_add-a2a-agent_ui_a2a-agent-form_tsx_0z8t1aalwzyl7._.js +1 -1
  176. package/web/.next/server/chunks/ssr/web_features_add-a2a-agent_ui_a2a-agent-form_tsx_0z8t1aalwzyl7._.js.map +1 -1
  177. package/web/.next/server/chunks/ssr/web_features_add-a2a-client_ui_a2a-client-form_tsx_1anv88g385nwe._.js +1 -1
  178. package/web/.next/server/chunks/ssr/web_features_add-a2a-client_ui_a2a-client-form_tsx_1anv88g385nwe._.js.map +1 -1
  179. package/web/.next/server/chunks/ssr/web_features_add-server_ui_add-server_tsx_1jnmar5xju49k._.js +1 -1
  180. package/web/.next/server/chunks/ssr/web_features_add-server_ui_add-server_tsx_1jnmar5xju49k._.js.map +1 -1
  181. package/web/.next/server/chunks/ssr/web_features_bridge_0-0nf-k5yxn_-._.js +3 -0
  182. package/web/.next/server/chunks/ssr/{web_features_bridge_0qdb9pmm6338t._.js.map → web_features_bridge_0-0nf-k5yxn_-._.js.map} +1 -1
  183. package/web/.next/server/chunks/ssr/web_features_bridge_hooks_bridge-actions_ts_0h-_xm2rcb-ij._.js +1 -1
  184. package/web/.next/server/chunks/ssr/web_features_bridge_state_basket-panel_tsx_1qi_kzld0rfgs._.js +1 -1
  185. package/web/.next/server/chunks/ssr/web_features_bridge_state_basket-panel_tsx_1qi_kzld0rfgs._.js.map +1 -1
  186. package/web/.next/server/chunks/ssr/web_features_bridge_state_decision-panel_tsx_1mzsixgc8zuxc._.js +1 -1
  187. package/web/.next/server/chunks/ssr/web_features_bridge_state_decision-panel_tsx_1mzsixgc8zuxc._.js.map +1 -1
  188. package/web/.next/server/chunks/ssr/web_features_bridge_state_done-panel_tsx_1m844-qb1z9p_._.js +1 -1
  189. package/web/.next/server/chunks/ssr/web_features_bridge_state_done-panel_tsx_1m844-qb1z9p_._.js.map +1 -1
  190. package/web/.next/server/chunks/ssr/web_features_meeting_state_meeting-controls_tsx_12g4kzk2mbvvz._.js +1 -1
  191. package/web/.next/server/chunks/ssr/web_features_meeting_state_meeting-controls_tsx_12g4kzk2mbvvz._.js.map +1 -1
  192. package/web/.next/server/chunks/ssr/web_features_outside-parties_ui_switch-card_tsx_1_xnu9bm4tc-_._.js +1 -1
  193. package/web/.next/server/chunks/ssr/web_features_outside-parties_ui_switch-card_tsx_1_xnu9bm4tc-_._.js.map +1 -1
  194. package/web/.next/server/chunks/ssr/web_features_outside-party_actions_ts_102ar5pdowf8s._.js +1 -1
  195. package/web/.next/server/chunks/ssr/web_features_parties_actions_ts_0r-tbfsig2ty-._.js +1 -1
  196. package/web/.next/server/chunks/ssr/web_features_slack_actions_ts_1l3yg9vl20_vu._.js +1 -1
  197. package/web/.next/server/middleware-build-manifest.js +3 -3
  198. package/web/.next/server/pages/500.html +1 -1
  199. package/web/.next/server/preview-props.json +3 -3
  200. package/web/.next/server/server-reference-manifest.js +1 -1
  201. package/web/.next/server/server-reference-manifest.json +48 -48
  202. package/web/.next/static/chunks/08kys3m2d2npp.js +1 -0
  203. package/web/.next/static/chunks/{2490rbe6dmnwe.js → 0nyh_47-o2jm-.js} +1 -1
  204. package/web/.next/static/chunks/{2v4z6cjtqu95k.js → 18how8fkqnl0e.js} +1 -1
  205. package/web/.next/static/chunks/{1zqkns-nn-wz0.js → 1brlzq2plk5ap.js} +1 -1
  206. package/web/.next/static/chunks/{07km754q38z4c.js → 1orsal1h4e53h.js} +1 -1
  207. package/web/.next/static/chunks/{27tnlhw9cxgul.js → 21g7i42tax4p1.js} +1 -1
  208. package/web/.next/static/chunks/{2_ayfyj3csc8m.js → 24stbxkvxsyds.js} +1 -1
  209. package/web/.next/static/chunks/28mfymfvqbiap.js +1 -0
  210. package/web/.next/static/chunks/2a9t2r05lq6sx.js +1 -0
  211. package/web/.next/static/chunks/{0ev65_p1z_ll0.js → 2rs9v3lnu9szf.js} +1 -1
  212. package/web/.next/static/chunks/{3ban8s8z3ah0y.js → 2wlb27llhjqbn.js} +1 -1
  213. package/web/.next/static/chunks/{1edk_zyv9lbyy.js → 39oc4f33cg9c7.js} +1 -1
  214. package/web/.next/static/chunks/{3ik7w8wf5u23q.js → 3_3ru7h0-k2d3.js} +1 -1
  215. package/web/.next/static/chunks/{1_f6w3i1t1svg.js → 3r7im_t5_lx3c.js} +1 -1
  216. package/web/.next/static/chunks/{1lq70vpqz6u1c.js → 40hz9zl48_4m7.js} +1 -1
  217. package/web/.next/trace +1 -1
  218. package/web/.next/trace-build +1 -1
  219. package/web/.next/server/chunks/ssr/_1x3tv4gu7i2sy._.js +0 -57
  220. package/web/.next/server/chunks/ssr/_1x3tv4gu7i2sy._.js.map +0 -1
  221. package/web/.next/server/chunks/ssr/_1zcbk6s3j_jfy._.js +0 -57
  222. package/web/.next/server/chunks/ssr/_1zcbk6s3j_jfy._.js.map +0 -1
  223. package/web/.next/server/chunks/ssr/web_features_1e7_lwq7351pm._.js +0 -3
  224. package/web/.next/server/chunks/ssr/web_features_1fzx-ctm4ru39._.js +0 -3
  225. package/web/.next/server/chunks/ssr/web_features_bridge_0qdb9pmm6338t._.js +0 -3
  226. package/web/.next/static/chunks/17akrnci0j_nn.js +0 -1
  227. package/web/.next/static/chunks/1e5_kej4hnnf_.js +0 -1
  228. package/web/.next/static/chunks/2v-0k1odkn9cu.js +0 -1
  229. /package/web/.next/static/{yJHYTb3NO7GRc3o3RS0f0 → vVGWuotNHMnGhCAYWm1Z-}/_buildManifest.js +0 -0
  230. /package/web/.next/static/{yJHYTb3NO7GRc3o3RS0f0 → vVGWuotNHMnGhCAYWm1Z-}/_clientMiddlewareManifest.js +0 -0
  231. /package/web/.next/static/{yJHYTb3NO7GRc3o3RS0f0 → vVGWuotNHMnGhCAYWm1Z-}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../web/features/bridge/hooks/data%3Adee3c4%20%3Ctext/javascript%3E","../../../../../web/features/bridge/state/basket-panel.tsx","../../../../../web/features/bridge/services/clock-time.ts","../../../../../node_modules/lucide-react/src/icons/arrow-right.ts","../../../../../node_modules/lucide-react/src/icons/clock.ts","../../../../../node_modules/lucide-react/src/icons/pencil.ts","../../../../../web/features/bridge/services/basket.ts"],"sourcesContent":["/* __next_internal_action_entry_do_not_use__ [{\"4045e76c6fc9bf26ef2d0c9f49d73dad0d6d222502\":{\"name\":\"sendBasket\"}},\"web/features/bridge/hooks/bridge-actions.ts\",\"\"] */\"use turbopack: no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_6=/*#__PURE__*/createServerReference(\"4045e76c6fc9bf26ef2d0c9f49d73dad0d6d222502\",callServer,void 0,findSourceMapURL,\"sendBasket\");export{$$RSC_SERVER_ACTION_6 as sendBasket};","'use client';\n\nimport { ArrowRight, Ban, Check, CircleAlert, CircleCheck, CircleQuestionMark, Clock, LoaderCircle, Pencil, Replace, Send, ShoppingBasket, X } from 'lucide-react';\nimport { useState, useTransition } from 'react';\n\nimport { removeFromBasket, sendBasket } from '../hooks/bridge-actions';\nimport { answerTextOf, entryLinesOf, footOf, isStruckOut, sentSummaryOf, type BasketFoot, type BasketItem, type BasketView, type EntryLine, type Words } from '../services/basket';\nimport { clockTimeOf } from '../services/clock-time';\nimport { ActionButton } from '../ui/action-button';\nimport { Notice } from '../ui/notice';\nimport { ItemFocus, type ItemOpening } from './item-focus';\n\n/** What the person is doing in the basket: removing one entry, or sending it. */\ntype Working = { kind: 'remove'; questionId: string } | { kind: 'send' };\n\nconst LINE_ICONS = {\n sent: CircleCheck,\n sending: LoaderCircle,\n next: Clock,\n unanswered: LoaderCircle,\n refused: CircleAlert,\n withdrawn: Ban,\n replaced: Replace,\n elsewhere: Check,\n} as const;\n\nconst LINE_TONES = {\n ok: 'text-tone-ok-fg',\n waiting: 'text-tone-waiting-fg',\n attention: 'text-tone-attention-fg',\n off: 'text-muted-foreground',\n} as const;\n\n/** Words as the desktop says them, and shorter on a phone. */\nfunction Said({ words }: { words: Words }) {\n if (words.desktop === words.phone) {\n return <span>{words.desktop}</span>;\n }\n return (\n <>\n <span className=\"hidden sm:inline\">{words.desktop}</span>\n <span className=\"sm:hidden\">{words.phone}</span>\n </>\n );\n}\n\n/** The line under an entry, behind its icon in its tone. */\nfunction EntryLineSaid({ line }: { line: EntryLine }) {\n const Icon = LINE_ICONS[line.icon];\n return (\n <p data-testid=\"bridge-basket-standing\" className=\"col-span-2 col-start-2 flex items-start gap-1.5 text-meta\">\n <Icon aria-hidden className={`mt-0.5 size-3.5 shrink-0 ${LINE_TONES[line.tone]}`} />\n <span>\n <Said words={line.words} />\n </span>\n </p>\n );\n}\n\n/** One entry: the question, its asker and when it asked, its answer and note, the line saying how it stands, and what can be done with it. */\nfunction BasketEntryRow({ entry, line, opening, working, onRemove }: { entry: BasketItem; line: EntryLine | undefined; opening: ItemOpening; working: Working | undefined; onRemove: (questionId: string) => void }) {\n const { standing } = entry;\n const isStruck = isStruckOut(standing);\n const isWorking = working !== undefined || opening.openingId !== undefined;\n const isRemoving = working?.kind === 'remove' && working.questionId === entry.questionId;\n const replacementId = standing.kind === 'replaced' ? standing.replacementId : null;\n const struck = isStruck ? 'line-through decoration-muted-foreground' : '';\n return (\n <li data-testid=\"bridge-basket-entry\" data-standing={standing.kind} className={`grid grid-cols-[18px_1fr_auto] items-start gap-x-2.5 gap-y-1.5 border-t border-border p-3 first:border-t-0 sm:px-3.5 ${isStruck ? 'bg-muted' : ''}`}>\n <CircleQuestionMark aria-hidden className=\"mt-0.5 size-4 text-tone-active-fg\" />\n <div className=\"flex min-w-0 flex-col gap-0.5\">\n <span className={`font-medium ${struck}`}>{entry.title}</span>\n <span className=\"flex flex-wrap items-center gap-1.5 text-caption text-muted-foreground\">\n <span>\n to <b className=\"font-medium text-foreground\">{entry.from}</b>\n </span>\n <span aria-hidden className=\"hidden text-border sm:inline\">\n ·\n </span>\n <span className=\"hidden sm:inline\">\n asked at <time dateTime={entry.sentAt}>{clockTimeOf(entry.sentAt)}</time>\n </span>\n </span>\n <span className={`${isStruck ? 'hidden sm:flex' : 'flex'} items-center gap-1.5 text-meta ${struck}`}>\n <ArrowRight aria-hidden className=\"size-3.5 shrink-0 text-primary\" />\n {answerTextOf(entry)}\n </span>\n {entry.note === null ? null : <span className=\"text-caption italic text-muted-foreground\">&quot;{entry.note}&quot;</span>}\n </div>\n {standing.kind === 'waiting' ? (\n <div className=\"flex items-center gap-1.5\">\n <ActionButton data-testid=\"bridge-basket-change\" size=\"small\" aria-label=\"Change\" isPending={opening.openingId === entry.deliveryId} pendingLabel=\"Opening...\" disabled={isWorking} onClick={() => { opening.open({ deliveryId: entry.deliveryId, job: 'decide', inBasket: { option: entry.option, note: entry.note } }); }}>\n <Pencil aria-hidden className=\"size-3.5\" />\n <span className=\"hidden sm:inline\">Change</span>\n </ActionButton>\n <ActionButton data-testid=\"bridge-basket-remove\" size=\"small\" variant=\"ghost\" aria-label=\"Remove\" isPending={isRemoving} pendingLabel=\"Removing...\" disabled={isWorking} onClick={() => { onRemove(entry.questionId); }}>\n <X aria-hidden className=\"size-4 sm:hidden\" />\n <span className=\"hidden sm:inline\">Remove</span>\n </ActionButton>\n </div>\n ) : (\n <span />\n )}\n {line === undefined ? null : <EntryLineSaid line={line} />}\n {opening.failure?.deliveryId === entry.deliveryId ? (\n <div className=\"col-span-2 col-start-2\">\n <Notice message={opening.failure.message} isFailure />\n </div>\n ) : null}\n {standing.kind === 'withdrawn' || standing.kind === 'replaced' || standing.kind === 'dealtElsewhere' || standing.kind === 'refused' ? (\n <div className=\"col-span-2 col-start-2 flex flex-wrap items-center gap-1.5\">\n {replacementId === null ? null : (\n <ActionButton data-testid=\"bridge-replacement\" size=\"small\" isPending={opening.openingId === replacementId} pendingLabel=\"Opening...\" disabled={isWorking} onClick={() => { opening.open({ deliveryId: replacementId, job: 'decide' }); }}>\n <ArrowRight aria-hidden className=\"size-3.5\" />\n Answer the new question\n </ActionButton>\n )}\n <ActionButton data-testid=\"bridge-basket-remove\" size=\"small\" variant={standing.kind === 'replaced' ? 'ghost' : 'secondary'} isPending={isRemoving} pendingLabel=\"Removing...\" disabled={isWorking} onClick={() => { onRemove(entry.questionId); }}>\n {standing.kind === 'refused' ? 'Remove and mark done' : 'Remove'}\n </ActionButton>\n </div>\n ) : null}\n </li>\n );\n}\n\n/** The foot of the basket: Send naming the ships, the send going on, or what came of it. */\nfunction BasketFootBar({ foot, isSending, isWorking, onSend }: { foot: BasketFoot; isSending: boolean; isWorking: boolean; onSend: () => void }) {\n if (foot.kind === 'none') {\n return null;\n }\n return (\n <div data-testid=\"bridge-basket-foot\" className=\"flex flex-col items-stretch gap-2 border-t border-border bg-card p-3 sm:flex-row sm:items-center sm:gap-3 sm:px-3.5\">\n <p className=\"flex-1 text-caption text-muted-foreground\">\n <Said words={foot.words} />\n </p>\n {foot.kind === 'send' ? (\n <ActionButton data-testid=\"bridge-basket-send\" variant=\"primary\" className=\"justify-center\" isPending={isSending} pendingLabel=\"Sending...\" disabled={isWorking} onClick={onSend}>\n <Send aria-hidden className=\"size-4\" />\n {foot.label}\n </ActionButton>\n ) : null}\n {foot.kind === 'sending' ? (\n <button type=\"button\" data-testid=\"bridge-basket-sending\" disabled aria-busy=\"true\" className=\"inline-flex h-9 items-center justify-center gap-2 rounded-md border border-border bg-card px-4 font-medium text-card-foreground\">\n <LoaderCircle aria-hidden className=\"size-4 animate-spin\" />\n {foot.progress}\n </button>\n ) : null}\n </div>\n );\n}\n\n/** What was sent, over the empty basket, once every entry left was sent. */\nfunction SentSummary({ summary }: { summary: { title: string; description: string } }) {\n return (\n <div data-testid=\"bridge-basket-sent\" role=\"status\" className=\"flex max-w-[620px] items-start gap-3 rounded-lg border border-border bg-popover p-4 text-popover-foreground shadow-lg\">\n <CircleCheck aria-hidden className=\"mt-0.5 size-4 shrink-0 text-tone-ok-fg\" />\n <span className=\"grid gap-1\">\n <span className=\"font-medium\">{summary.title}</span>\n <span className=\"text-caption text-muted-foreground\">{summary.description}</span>\n </span>\n </div>\n );\n}\n\n/** The empty basket, with what goes into it. */\nfunction EmptyBasket() {\n return (\n <div data-testid=\"bridge-basket-empty\" className=\"grid max-w-[820px] justify-items-center gap-3 rounded-lg border border-dashed border-border bg-card px-6 py-10 text-center\">\n <span className=\"inline-flex size-11 items-center justify-center rounded-lg bg-secondary text-muted-foreground\">\n <ShoppingBasket aria-hidden className=\"size-5\" />\n </span>\n <span className=\"text-heading font-semibold\">The basket is empty</span>\n <span className=\"max-w-[360px] text-muted-foreground\">Pick an option on a question and put it in the basket; it waits here until you send it.</span>\n </div>\n );\n}\n\n/**\n * The basket open (docs/design/bridge, section 9; basket.html, basket-3 to\n * basket-7): its count of what is or will be sent, and the answers the\n * person picked in Bridge, in the order added, each with its answer by\n * number and label. Change opens the question with that option picked;\n * Remove takes the entry out, and the question still waits; one the fleet\n * refused is removed and its question marked done. A withdrawn, replaced or\n * answered-elsewhere entry is struck out and not sent. Send N answers stores\n * each as sending and the gateway sends them, each on its own: each entry\n * then says how it goes, and the foot Sending N of M, or what came of the\n * send once one was not answered or refused. Once every entry left was\n * sent, what was sent stands over the empty basket.\n */\nexport function BasketPanel({ fleetId, basket }: { fleetId: string; basket: BasketView }) {\n const [working, setWorking] = useState<Working | undefined>();\n const [failure, setFailure] = useState<string | undefined>();\n const [, startTransition] = useTransition();\n const lines = entryLinesOf(basket);\n const summary = sentSummaryOf(basket);\n\n const remove = (questionId: string) => {\n setWorking({ kind: 'remove', questionId });\n setFailure(undefined);\n startTransition(async () => {\n const outcome = await removeFromBasket(fleetId, questionId);\n setWorking(undefined);\n setFailure(outcome.isOk ? undefined : outcome.message);\n });\n };\n\n const send = () => {\n setWorking({ kind: 'send' });\n setFailure(undefined);\n startTransition(async () => {\n const outcome = await sendBasket(fleetId);\n setWorking(undefined);\n setFailure(outcome.isOk ? undefined : outcome.message);\n });\n };\n\n return (\n <ItemFocus fleetId={fleetId}>\n {(opening) => (\n <section className=\"grid gap-4\" aria-labelledby=\"bridge-basket-heading\">\n <div className=\"hidden sm:block\">\n <h1 id=\"bridge-basket-heading\" className=\"text-heading font-semibold\">\n Basket <span data-testid=\"bridge-basket-count\" className=\"text-primary\">{basket.count}</span>\n </h1>\n <p className=\"text-caption text-muted-foreground\">Answers you picked in Bridge, not sent yet. Nothing goes until you press Send.</p>\n </div>\n {failure === undefined ? null : <Notice message={failure} isFailure />}\n {summary === undefined ? null : <SentSummary summary={summary} />}\n {basket.entries.length === 0 || summary !== undefined ? (\n <EmptyBasket />\n ) : (\n <div className=\"max-w-[820px] overflow-hidden rounded-lg border border-border bg-card\">\n <ul>\n {basket.entries.map((entry, index) => (\n <BasketEntryRow key={entry.questionId} entry={entry} line={lines[index]} opening={opening} working={working} onRemove={remove} />\n ))}\n </ul>\n <BasketFootBar foot={footOf(basket)} isSending={working?.kind === 'send'} isWorking={working !== undefined || opening.openingId !== undefined} onSend={send} />\n </div>\n )}\n </section>\n )}\n </ItemFocus>\n );\n}\n","/** The time of day of an instant (ISO 8601), in UTC to the minute, as Bridge says when something happened: 20:16 UTC. */\nexport function clockTimeOf(at: string): string {\n return `${new Date(at).toISOString().slice(11, 16)} UTC`;\n}\n","import createLucideIcon from '../createLucideIcon';\nimport type { LucideIconNode, LucideIconData } from '../types';\n\nexport const __iconData: LucideIconData = {\n name: 'arrow-right',\n size: 24,\n node: [\n ['path', { d: 'M5 12h14', key: '1ays0h' }],\n ['path', { d: 'm12 5 7 7-7 7', key: 'xquz4c' }],\n ],\n};\n\n/**\n * @deprecated Access `__iconData` instead.\n */\nexport const __iconNode: LucideIconNode[] = __iconData.node;\n\n/**\n * @component @name ArrowRight\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNSAxMmgxNCIgLz4KICA8cGF0aCBkPSJtMTIgNSA3IDctNyA3IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/arrow-right\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst ArrowRight = createLucideIcon(__iconData);\n\nexport default ArrowRight;\n","import createLucideIcon from '../createLucideIcon';\nimport type { LucideIconNode, LucideIconData } from '../types';\n\nexport const __iconData: LucideIconData = {\n name: 'clock',\n size: 24,\n node: [\n ['circle', { cx: '12', cy: '12', r: '10', key: '1mglay' }],\n ['path', { d: 'M12 6v6l4 2', key: 'mmk7yg' }],\n ],\n};\n\n/**\n * @deprecated Access `__iconData` instead.\n */\nexport const __iconNode: LucideIconNode[] = __iconData.node;\n\n/**\n * @component @name Clock\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIxMCIgLz4KICA8cGF0aCBkPSJNMTIgNnY2bDQgMiIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/clock\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Clock = createLucideIcon(__iconData);\n\nexport default Clock;\n","import createLucideIcon from '../createLucideIcon';\nimport type { LucideIconNode, LucideIconData } from '../types';\n\nexport const __iconData: LucideIconData = {\n name: 'pencil',\n size: 24,\n node: [\n [\n 'path',\n {\n d: 'M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z',\n key: '1a8usu',\n },\n ],\n ['path', { d: 'm15 5 4 4', key: '1mk7zo' }],\n ],\n};\n\n/**\n * @deprecated Access `__iconData` instead.\n */\nexport const __iconNode: LucideIconNode[] = __iconData.node;\n\n/**\n * @component @name Pencil\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMjEuMTc0IDYuODEyYTEgMSAwIDAgMC0zLjk4Ni0zLjk4N0wzLjg0MiAxNi4xNzRhMiAyIDAgMCAwLS41LjgzbC0xLjMyMSA0LjM1MmEuNS41IDAgMCAwIC42MjMuNjIybDQuMzUzLTEuMzJhMiAyIDAgMCAwIC44My0uNDk3eiIgLz4KICA8cGF0aCBkPSJtMTUgNSA0IDQiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/pencil\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Pencil = createLucideIcon(__iconData);\n\nexport default Pencil;\n","/**\n * The basket as Bridge shows it (docs/design/bridge, section 9; basket.html,\n * basket-3 to basket-7): each entry's answer, the line under it as it\n * stands, the foot naming the ships or saying how the send goes, and what\n * was sent, in words, each with its desktop and its shorter phone words.\n * Pure view logic, no React and no API client.\n */\nimport type { inferRouterOutputs } from '@trpc/server';\n\nimport type { GatewayRouter } from '../../../../src/adapters/trpc/router.js';\nimport { clockTimeOf } from './clock-time';\n\ntype PeopleOutputs = inferRouterOutputs<GatewayRouter>['people'];\n\n/** The basket as the API answers it: its entries in the order added, its count, and how many answers Send sends. */\nexport type BasketView = PeopleOutputs['basket'];\n\n/** An entry of the basket, with what it stands as. */\nexport type BasketItem = BasketView['entries'][number];\n\ntype Standing = BasketItem['standing'];\n\n/** What Send did, as the API answers it. */\nexport type BasketSent = PeopleOutputs['sendBasket'];\n\n/** Words as a desktop says them, and as a phone says them, shorter. */\nexport interface Words {\n readonly desktop: string;\n readonly phone: string;\n}\n\n/** The line under an entry: its icon, the tone of the icon, and its words. */\nexport interface EntryLine {\n readonly icon: 'sent' | 'sending' | 'next' | 'unanswered' | 'refused' | 'withdrawn' | 'replaced' | 'elsewhere';\n readonly tone: 'ok' | 'waiting' | 'attention' | 'off';\n readonly words: Words;\n}\n\n/** The basket's foot: Send naming the ships, the send going on, what came of it, or none. */\nexport type BasketFoot = { readonly kind: 'send'; readonly words: Words; readonly label: string } | { readonly kind: 'sending'; readonly words: Words; readonly progress: string } | { readonly kind: 'summary'; readonly words: Words } | { readonly kind: 'none' };\n\nconst PLACES: Record<Extract<Standing, { kind: 'dealtElsewhere' }>['place'], string> = {\n bridge: 'in Bridge',\n chat: 'in a chat',\n slack: 'in Slack',\n gateway: 'by the gateway',\n};\n\nfunction same(words: string): Words {\n return { desktop: words, phone: words };\n}\n\nfunction answersOf(count: number): string {\n return count === 1 ? '1 answer' : `${String(count)} answers`;\n}\n\n/** Names in a sentence: a, b and c. */\nfunction listOf(names: readonly string[]): string {\n return names.length <= 1 ? names.join('') : `${names.slice(0, -1).join(', ')} and ${names.at(-1) ?? ''}`;\n}\n\n/** Each asker once, in the order added. */\nfunction askersOf(entries: readonly BasketItem[]): string[] {\n return [...new Set(entries.map(({ from }) => from))];\n}\n\n/** The Send button, naming how many answers it sends. */\nexport function sendLabelOf(toSend: number): string {\n return `Send ${answersOf(toSend)}`;\n}\n\n/** The answer an entry gives, by its number and label (2. Harbour first, on today's look); a note alone as such. */\nexport function answerTextOf(item: Pick<BasketItem, 'option' | 'optionLabel'>): string {\n if (item.option === null) {\n return 'Note alone';\n }\n return item.optionLabel === null ? `Option ${String(item.option)}` : `${String(item.option)}. ${item.optionLabel}`;\n}\n\n/** Whether an entry is not sent, as its asker withdrew or replaced it or it was answered elsewhere first: struck out. */\nexport function isStruckOut(standing: Standing): boolean {\n return standing.kind === 'withdrawn' || standing.kind === 'replaced' || standing.kind === 'dealtElsewhere';\n}\n\n/** The line under one entry, given whether another entry was sent and whether this is the one being sent now. */\nfunction lineOf(item: BasketItem, context: { isAnySent: boolean; isSendingNow: boolean }): EntryLine | undefined {\n const { standing, from } = item;\n switch (standing.kind) {\n case 'waiting':\n return undefined;\n case 'sent': {\n const at = clockTimeOf(standing.at);\n return { icon: 'sent', tone: 'ok', words: { desktop: `Sent at ${at} and stored. Done.`, phone: `Sent at ${at}. Done.` } };\n }\n case 'sending':\n if (standing.isUnanswered) {\n return { icon: 'unanswered', tone: 'waiting', words: { desktop: 'The fleet did not answer. Sending again with the same key until it is stored; it arrives once.', phone: 'No answer from the fleet. Sending again, same key.' } };\n }\n return context.isSendingNow ? { icon: 'sending', tone: 'waiting', words: same('Sending...') } : { icon: 'next', tone: 'waiting', words: { desktop: 'Next, in the order you added it', phone: 'Next' } };\n case 'refused': {\n const said = `Not sent: ${standing.reason}.`;\n // The phone says the reason without its consequence, as basket-7 draws it: Not sent: commercial was retired.\n const [cause = standing.reason] = standing.reason.split(', so ');\n return { icon: 'refused', tone: 'attention', words: { desktop: context.isAnySent ? `${said} The others were sent.` : said, phone: `Not sent: ${cause}.` } };\n }\n case 'withdrawn':\n return { icon: 'withdrawn', tone: 'off', words: { desktop: `Withdrawn by ${from} at ${clockTimeOf(standing.at)}. Not sent; Send skips it.`, phone: `Withdrawn by ${from}. Not sent.` } };\n case 'replaced': {\n const withTitle = standing.replacementTitle === null ? '.' : ` with \"${standing.replacementTitle}\"`;\n return { icon: 'replaced', tone: 'off', words: { desktop: `Replaced by ${from} at ${clockTimeOf(standing.at)}${withTitle} Not sent: its options differ, so answer the new one.`, phone: `Replaced by ${from}. Not sent.` } };\n }\n case 'dealtElsewhere':\n return { icon: 'elsewhere', tone: 'off', words: same(standing.option === null ? `Done ${PLACES[standing.place]}. Nothing is sent from it.` : `Answered ${PLACES[standing.place]}: option ${String(standing.option)}. Nothing is sent from it.`) };\n }\n}\n\n/** The line under each entry, in the order added: the first sending one the fleet has not left unanswered is the one being sent now, the others next. */\nexport function entryLinesOf(view: BasketView): (EntryLine | undefined)[] {\n const isAnySent = view.entries.some(({ standing }) => standing.kind === 'sent');\n const now = view.entries.find(({ standing }) => standing.kind === 'sending' && !standing.isUnanswered);\n return view.entries.map((item) => lineOf(item, { isAnySent, isSendingNow: item === now }));\n}\n\n/** The entries not sent, by kind, as the foot says them: The withdrawn and the replaced one are not sent. */\nfunction notSentOf(entries: readonly BasketItem[]): string | undefined {\n const counted = (kind: Standing['kind']) => entries.filter(({ standing }) => standing.kind === kind).length;\n const stale = (['withdrawn', 'replaced'] as const).map((kind) => ({ kind, count: counted(kind) })).filter(({ count }) => count > 0);\n const named = stale.map(({ kind, count }, index) => (count > 1 ? `the ${String(count)} ${kind}` : index === stale.length - 1 ? `the ${kind} one` : `the ${kind}`));\n const elsewhere = counted('dealtElsewhere');\n const all = elsewhere === 0 ? named : [...named, elsewhere === 1 ? 'the one answered elsewhere' : `the ${String(elsewhere)} answered elsewhere`];\n if (all.length === 0) {\n return undefined;\n }\n const sentence = listOf(all);\n const isOne = stale.reduce((sum, { count }) => sum + count, elsewhere) === 1;\n return `${sentence.charAt(0).toUpperCase()}${sentence.slice(1)} ${isOne ? 'is' : 'are'} not sent.`;\n}\n\n/** The foot while the basket waits for Send: the ships each receiving their own answer, or how many go and which are not sent. */\nfunction sendFootOf(view: BasketView): BasketFoot {\n const notSent = notSentOf(view.entries);\n const label = sendLabelOf(view.toSend);\n if (notSent !== undefined) {\n return { kind: 'send', words: { desktop: `${String(view.toSend)} to send. ${notSent}`, phone: notSent }, label };\n }\n const waiting = view.entries.filter(({ standing }) => standing.kind === 'waiting');\n const askers = askersOf(waiting);\n const receive = askers.length > 1 ? 'each receive their own answer' : waiting.length > 1 ? 'receives its own answer to each' : 'receives its own answer';\n return { kind: 'send', words: { desktop: `${listOf(askers)} ${receive}, as you, as if sent one by one.`, phone: 'Each asker receives its own answer.' }, label };\n}\n\n/** The basket's foot: Send while answers wait for it; Sending N of M while the send goes well; what came of it once one was not answered or refused. */\nexport function footOf(view: BasketView): BasketFoot {\n if (view.toSend > 0) {\n return sendFootOf(view);\n }\n const kinds = view.entries.map(({ standing }) => standing);\n const sent = kinds.filter(({ kind }) => kind === 'sent').length;\n const sending = kinds.filter(({ kind }) => kind === 'sending').length;\n const refused = kinds.filter(({ kind }) => kind === 'refused').length;\n const isAnyUnanswered = kinds.some((standing) => standing.kind === 'sending' && standing.isUnanswered);\n if (sending > 0 && refused === 0 && !isAnyUnanswered) {\n return { kind: 'sending', words: { desktop: 'You can close Bridge: the gateway keeps sending what is stored as sending.', phone: 'You can close Bridge; the gateway keeps sending.' }, progress: `Sending ${String(sent + 1)} of ${String(sent + sending)}` };\n }\n if (sending === 0 && refused === 0) {\n return { kind: 'none' };\n }\n const part = (count: number, words: string) => (count === 0 ? [] : [`${String(count)} ${words}`]);\n return {\n kind: 'summary',\n words: {\n desktop: `${[...part(sent, 'sent'), ...part(sending, 'still sending'), ...part(refused, 'not sent')].join(', ')}.`,\n phone: `${[...part(sent, 'sent'), ...part(sending, 'sending'), ...part(refused, 'not sent')].join(', ')}.`,\n },\n };\n}\n\n/** What was sent, once every entry left in the basket was sent: how many answers, to which ships. */\nexport function sentSummaryOf(view: BasketView): { title: string; description: string } | undefined {\n const { entries } = view;\n if (entries.length === 0 || entries.some(({ standing }) => standing.kind !== 'sent')) {\n return undefined;\n }\n const to = `To ${listOf(askersOf(entries))}, as you;`;\n return { title: `${answersOf(entries.length)} sent`, description: entries.length === 1 ? `${to} stored, and in Done.` : `${to} each stored, each in Done.` };\n}\n"],"names":["ArrowRight"],"mappings":"qEGGO,CAAA,AEAA,ADAA,CCAA,AFAA,ACAA,CDAA,AEAA,ADAA,CCAA,AFAA,ACAA,ACAA,CDAA,ACAA,AFAA,CEAA,6CFIW,CAAA,ACAD,CDAC,ACAD,SDAa,IAAA,UAAe,GCAC,CAAA,wBDCX,CCAF,ADAE,CCAF,ADAE,EAAK,CCAF,ADAE,CCAF,ADAE,CAAA,ACAF,CDAE,ACAF,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,EAAK,EAAM,WAAY,EAAK,EAAS,oBAAqB,EAAK,EAAS,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAClH,MAAO,CAAA,EAAG,IAAI,EAAK,EAAM,WAAY,EAAK,EAAS,cAAe,EAAK,EAAS,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,AAC5G,CACF,CACF,ELgE0C,GAAS,UAAW,GAAS,OAAS,OAAQ,eAAuB,IAAZ,QAA+C,IAAtB,EAAQ,SAAS,CAAgB,OAAQ,WAOrK","ignoreList":[3,4,5]}
1
+ {"version":3,"sources":["../../../../../web/features/bridge/hooks/data%3Af7ec38%20%3Ctext/javascript%3E","../../../../../web/features/bridge/state/basket-panel.tsx","../../../../../web/features/bridge/services/clock-time.ts","../../../../../node_modules/lucide-react/src/icons/arrow-right.ts","../../../../../node_modules/lucide-react/src/icons/clock.ts","../../../../../node_modules/lucide-react/src/icons/pencil.ts","../../../../../web/features/bridge/services/basket.ts"],"sourcesContent":["/* __next_internal_action_entry_do_not_use__ [{\"404fcb9ad0887ff9f433e609c4f9a76ab493a7ffee\":{\"name\":\"sendBasket\"}},\"web/features/bridge/hooks/bridge-actions.ts\",\"\"] */\"use turbopack: no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_6=/*#__PURE__*/createServerReference(\"404fcb9ad0887ff9f433e609c4f9a76ab493a7ffee\",callServer,void 0,findSourceMapURL,\"sendBasket\");export{$$RSC_SERVER_ACTION_6 as sendBasket};","'use client';\n\nimport { ArrowRight, Ban, Check, CircleAlert, CircleCheck, CircleQuestionMark, Clock, LoaderCircle, Pencil, Replace, Send, ShoppingBasket, X } from 'lucide-react';\nimport { useState, useTransition } from 'react';\n\nimport { removeFromBasket, sendBasket } from '../hooks/bridge-actions';\nimport { answerTextOf, entryLinesOf, footOf, isStruckOut, sentSummaryOf, type BasketFoot, type BasketItem, type BasketView, type EntryLine, type Words } from '../services/basket';\nimport { clockTimeOf } from '../services/clock-time';\nimport { ActionButton } from '../ui/action-button';\nimport { Notice } from '../ui/notice';\nimport { ItemFocus, type ItemOpening } from './item-focus';\n\n/** What the person is doing in the basket: removing one entry, or sending it. */\ntype Working = { kind: 'remove'; questionId: string } | { kind: 'send' };\n\nconst LINE_ICONS = {\n sent: CircleCheck,\n sending: LoaderCircle,\n next: Clock,\n unanswered: LoaderCircle,\n refused: CircleAlert,\n withdrawn: Ban,\n replaced: Replace,\n elsewhere: Check,\n} as const;\n\nconst LINE_TONES = {\n ok: 'text-tone-ok-fg',\n waiting: 'text-tone-waiting-fg',\n attention: 'text-tone-attention-fg',\n off: 'text-muted-foreground',\n} as const;\n\n/** Words as the desktop says them, and shorter on a phone. */\nfunction Said({ words }: { words: Words }) {\n if (words.desktop === words.phone) {\n return <span>{words.desktop}</span>;\n }\n return (\n <>\n <span className=\"hidden sm:inline\">{words.desktop}</span>\n <span className=\"sm:hidden\">{words.phone}</span>\n </>\n );\n}\n\n/** The line under an entry, behind its icon in its tone. */\nfunction EntryLineSaid({ line }: { line: EntryLine }) {\n const Icon = LINE_ICONS[line.icon];\n return (\n <p data-testid=\"bridge-basket-standing\" className=\"col-span-2 col-start-2 flex items-start gap-1.5 text-meta\">\n <Icon aria-hidden className={`mt-0.5 size-3.5 shrink-0 ${LINE_TONES[line.tone]}`} />\n <span>\n <Said words={line.words} />\n </span>\n </p>\n );\n}\n\n/** One entry: the question, its asker and when it asked, its answer and note, the line saying how it stands, and what can be done with it. */\nfunction BasketEntryRow({ entry, line, opening, working, onRemove }: { entry: BasketItem; line: EntryLine | undefined; opening: ItemOpening; working: Working | undefined; onRemove: (questionId: string) => void }) {\n const { standing } = entry;\n const isStruck = isStruckOut(standing);\n const isWorking = working !== undefined || opening.openingId !== undefined;\n const isRemoving = working?.kind === 'remove' && working.questionId === entry.questionId;\n const replacementId = standing.kind === 'replaced' ? standing.replacementId : null;\n const struck = isStruck ? 'line-through decoration-muted-foreground' : '';\n return (\n <li data-testid=\"bridge-basket-entry\" data-standing={standing.kind} className={`grid grid-cols-[18px_1fr_auto] items-start gap-x-2.5 gap-y-1.5 border-t border-border p-3 first:border-t-0 sm:px-3.5 ${isStruck ? 'bg-muted' : ''}`}>\n <CircleQuestionMark aria-hidden className=\"mt-0.5 size-4 text-tone-active-fg\" />\n <div className=\"flex min-w-0 flex-col gap-0.5\">\n <span className={`font-medium ${struck}`}>{entry.title}</span>\n <span className=\"flex flex-wrap items-center gap-1.5 text-caption text-muted-foreground\">\n <span>\n to <b className=\"font-medium text-foreground\">{entry.from}</b>\n </span>\n <span aria-hidden className=\"hidden text-border sm:inline\">\n ·\n </span>\n <span className=\"hidden sm:inline\">\n asked at <time dateTime={entry.sentAt}>{clockTimeOf(entry.sentAt)}</time>\n </span>\n </span>\n <span className={`${isStruck ? 'hidden sm:flex' : 'flex'} items-center gap-1.5 text-meta ${struck}`}>\n <ArrowRight aria-hidden className=\"size-3.5 shrink-0 text-primary\" />\n {answerTextOf(entry)}\n </span>\n {entry.note === null ? null : <span className=\"text-caption italic text-muted-foreground\">&quot;{entry.note}&quot;</span>}\n </div>\n {standing.kind === 'waiting' ? (\n <div className=\"flex items-center gap-1.5\">\n <ActionButton data-testid=\"bridge-basket-change\" size=\"small\" aria-label=\"Change\" isPending={opening.openingId === entry.deliveryId} pendingLabel=\"Opening...\" disabled={isWorking} onClick={() => { opening.open({ deliveryId: entry.deliveryId, job: 'decide', inBasket: { option: entry.option, note: entry.note } }); }}>\n <Pencil aria-hidden className=\"size-3.5\" />\n <span className=\"hidden sm:inline\">Change</span>\n </ActionButton>\n <ActionButton data-testid=\"bridge-basket-remove\" size=\"small\" variant=\"ghost\" aria-label=\"Remove\" isPending={isRemoving} pendingLabel=\"Removing...\" disabled={isWorking} onClick={() => { onRemove(entry.questionId); }}>\n <X aria-hidden className=\"size-4 sm:hidden\" />\n <span className=\"hidden sm:inline\">Remove</span>\n </ActionButton>\n </div>\n ) : (\n <span />\n )}\n {line === undefined ? null : <EntryLineSaid line={line} />}\n {opening.failure?.deliveryId === entry.deliveryId ? (\n <div className=\"col-span-2 col-start-2\">\n <Notice message={opening.failure.message} isFailure />\n </div>\n ) : null}\n {standing.kind === 'withdrawn' || standing.kind === 'replaced' || standing.kind === 'dealtElsewhere' || standing.kind === 'refused' ? (\n <div className=\"col-span-2 col-start-2 flex flex-wrap items-center gap-1.5\">\n {replacementId === null ? null : (\n <ActionButton data-testid=\"bridge-replacement\" size=\"small\" isPending={opening.openingId === replacementId} pendingLabel=\"Opening...\" disabled={isWorking} onClick={() => { opening.open({ deliveryId: replacementId, job: 'decide' }); }}>\n <ArrowRight aria-hidden className=\"size-3.5\" />\n Answer the new question\n </ActionButton>\n )}\n <ActionButton data-testid=\"bridge-basket-remove\" size=\"small\" variant={standing.kind === 'replaced' ? 'ghost' : 'secondary'} isPending={isRemoving} pendingLabel=\"Removing...\" disabled={isWorking} onClick={() => { onRemove(entry.questionId); }}>\n {standing.kind === 'refused' ? 'Remove and mark done' : 'Remove'}\n </ActionButton>\n </div>\n ) : null}\n </li>\n );\n}\n\n/** The foot of the basket: Send naming the ships, the send going on, or what came of it. */\nfunction BasketFootBar({ foot, isSending, isWorking, onSend }: { foot: BasketFoot; isSending: boolean; isWorking: boolean; onSend: () => void }) {\n if (foot.kind === 'none') {\n return null;\n }\n return (\n <div data-testid=\"bridge-basket-foot\" className=\"flex flex-col items-stretch gap-2 border-t border-border bg-card p-3 sm:flex-row sm:items-center sm:gap-3 sm:px-3.5\">\n <p className=\"flex-1 text-caption text-muted-foreground\">\n <Said words={foot.words} />\n </p>\n {foot.kind === 'send' ? (\n <ActionButton data-testid=\"bridge-basket-send\" variant=\"primary\" className=\"justify-center\" isPending={isSending} pendingLabel=\"Sending...\" disabled={isWorking} onClick={onSend}>\n <Send aria-hidden className=\"size-4\" />\n {foot.label}\n </ActionButton>\n ) : null}\n {foot.kind === 'sending' ? (\n <button type=\"button\" data-testid=\"bridge-basket-sending\" disabled aria-busy=\"true\" className=\"inline-flex h-9 items-center justify-center gap-2 rounded-md border border-border bg-card px-4 font-medium text-card-foreground\">\n <LoaderCircle aria-hidden className=\"size-4 animate-spin\" />\n {foot.progress}\n </button>\n ) : null}\n </div>\n );\n}\n\n/** What was sent, over the empty basket, once every entry left was sent. */\nfunction SentSummary({ summary }: { summary: { title: string; description: string } }) {\n return (\n <div data-testid=\"bridge-basket-sent\" role=\"status\" className=\"flex max-w-[620px] items-start gap-3 rounded-lg border border-border bg-popover p-4 text-popover-foreground shadow-lg\">\n <CircleCheck aria-hidden className=\"mt-0.5 size-4 shrink-0 text-tone-ok-fg\" />\n <span className=\"grid gap-1\">\n <span className=\"font-medium\">{summary.title}</span>\n <span className=\"text-caption text-muted-foreground\">{summary.description}</span>\n </span>\n </div>\n );\n}\n\n/** The empty basket, with what goes into it. */\nfunction EmptyBasket() {\n return (\n <div data-testid=\"bridge-basket-empty\" className=\"grid max-w-[820px] justify-items-center gap-3 rounded-lg border border-dashed border-border bg-card px-6 py-10 text-center\">\n <span className=\"inline-flex size-11 items-center justify-center rounded-lg bg-secondary text-muted-foreground\">\n <ShoppingBasket aria-hidden className=\"size-5\" />\n </span>\n <span className=\"text-heading font-semibold\">The basket is empty</span>\n <span className=\"max-w-[360px] text-muted-foreground\">Pick an option on a question and put it in the basket; it waits here until you send it.</span>\n </div>\n );\n}\n\n/**\n * The basket open (docs/design/bridge, section 9; basket.html, basket-3 to\n * basket-7): its count of what is or will be sent, and the answers the\n * person picked in Bridge, in the order added, each with its answer by\n * number and label. Change opens the question with that option picked;\n * Remove takes the entry out, and the question still waits; one the fleet\n * refused is removed and its question marked done. A withdrawn, replaced or\n * answered-elsewhere entry is struck out and not sent. Send N answers stores\n * each as sending and the gateway sends them, each on its own: each entry\n * then says how it goes, and the foot Sending N of M, or what came of the\n * send once one was not answered or refused. Once every entry left was\n * sent, what was sent stands over the empty basket.\n */\nexport function BasketPanel({ fleetId, basket }: { fleetId: string; basket: BasketView }) {\n const [working, setWorking] = useState<Working | undefined>();\n const [failure, setFailure] = useState<string | undefined>();\n const [, startTransition] = useTransition();\n const lines = entryLinesOf(basket);\n const summary = sentSummaryOf(basket);\n\n const remove = (questionId: string) => {\n setWorking({ kind: 'remove', questionId });\n setFailure(undefined);\n startTransition(async () => {\n const outcome = await removeFromBasket(fleetId, questionId);\n setWorking(undefined);\n setFailure(outcome.isOk ? undefined : outcome.message);\n });\n };\n\n const send = () => {\n setWorking({ kind: 'send' });\n setFailure(undefined);\n startTransition(async () => {\n const outcome = await sendBasket(fleetId);\n setWorking(undefined);\n setFailure(outcome.isOk ? undefined : outcome.message);\n });\n };\n\n return (\n <ItemFocus fleetId={fleetId}>\n {(opening) => (\n <section className=\"grid gap-4\" aria-labelledby=\"bridge-basket-heading\">\n <div className=\"hidden sm:block\">\n <h1 id=\"bridge-basket-heading\" className=\"text-heading font-semibold\">\n Basket <span data-testid=\"bridge-basket-count\" className=\"text-primary\">{basket.count}</span>\n </h1>\n <p className=\"text-caption text-muted-foreground\">Answers you picked in Bridge, not sent yet. Nothing goes until you press Send.</p>\n </div>\n {failure === undefined ? null : <Notice message={failure} isFailure />}\n {summary === undefined ? null : <SentSummary summary={summary} />}\n {basket.entries.length === 0 || summary !== undefined ? (\n <EmptyBasket />\n ) : (\n <div className=\"max-w-[820px] overflow-hidden rounded-lg border border-border bg-card\">\n <ul>\n {basket.entries.map((entry, index) => (\n <BasketEntryRow key={entry.questionId} entry={entry} line={lines[index]} opening={opening} working={working} onRemove={remove} />\n ))}\n </ul>\n <BasketFootBar foot={footOf(basket)} isSending={working?.kind === 'send'} isWorking={working !== undefined || opening.openingId !== undefined} onSend={send} />\n </div>\n )}\n </section>\n )}\n </ItemFocus>\n );\n}\n","/** The time of day of an instant (ISO 8601), in UTC to the minute, as Bridge says when something happened: 20:16 UTC. */\nexport function clockTimeOf(at: string): string {\n return `${new Date(at).toISOString().slice(11, 16)} UTC`;\n}\n","import createLucideIcon from '../createLucideIcon';\nimport type { LucideIconNode, LucideIconData } from '../types';\n\nexport const __iconData: LucideIconData = {\n name: 'arrow-right',\n size: 24,\n node: [\n ['path', { d: 'M5 12h14', key: '1ays0h' }],\n ['path', { d: 'm12 5 7 7-7 7', key: 'xquz4c' }],\n ],\n};\n\n/**\n * @deprecated Access `__iconData` instead.\n */\nexport const __iconNode: LucideIconNode[] = __iconData.node;\n\n/**\n * @component @name ArrowRight\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNSAxMmgxNCIgLz4KICA8cGF0aCBkPSJtMTIgNSA3IDctNyA3IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/arrow-right\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst ArrowRight = createLucideIcon(__iconData);\n\nexport default ArrowRight;\n","import createLucideIcon from '../createLucideIcon';\nimport type { LucideIconNode, LucideIconData } from '../types';\n\nexport const __iconData: LucideIconData = {\n name: 'clock',\n size: 24,\n node: [\n ['circle', { cx: '12', cy: '12', r: '10', key: '1mglay' }],\n ['path', { d: 'M12 6v6l4 2', key: 'mmk7yg' }],\n ],\n};\n\n/**\n * @deprecated Access `__iconData` instead.\n */\nexport const __iconNode: LucideIconNode[] = __iconData.node;\n\n/**\n * @component @name Clock\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIxMCIgLz4KICA8cGF0aCBkPSJNMTIgNnY2bDQgMiIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/clock\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Clock = createLucideIcon(__iconData);\n\nexport default Clock;\n","import createLucideIcon from '../createLucideIcon';\nimport type { LucideIconNode, LucideIconData } from '../types';\n\nexport const __iconData: LucideIconData = {\n name: 'pencil',\n size: 24,\n node: [\n [\n 'path',\n {\n d: 'M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z',\n key: '1a8usu',\n },\n ],\n ['path', { d: 'm15 5 4 4', key: '1mk7zo' }],\n ],\n};\n\n/**\n * @deprecated Access `__iconData` instead.\n */\nexport const __iconNode: LucideIconNode[] = __iconData.node;\n\n/**\n * @component @name Pencil\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMjEuMTc0IDYuODEyYTEgMSAwIDAgMC0zLjk4Ni0zLjk4N0wzLjg0MiAxNi4xNzRhMiAyIDAgMCAwLS41LjgzbC0xLjMyMSA0LjM1MmEuNS41IDAgMCAwIC42MjMuNjIybDQuMzUzLTEuMzJhMiAyIDAgMCAwIC44My0uNDk3eiIgLz4KICA8cGF0aCBkPSJtMTUgNSA0IDQiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/pencil\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Pencil = createLucideIcon(__iconData);\n\nexport default Pencil;\n","/**\n * The basket as Bridge shows it (docs/design/bridge, section 9; basket.html,\n * basket-3 to basket-7): each entry's answer, the line under it as it\n * stands, the foot naming the ships or saying how the send goes, and what\n * was sent, in words, each with its desktop and its shorter phone words.\n * Pure view logic, no React and no API client.\n */\nimport type { inferRouterOutputs } from '@trpc/server';\n\nimport type { GatewayRouter } from '../../../../src/adapters/trpc/router.js';\nimport { clockTimeOf } from './clock-time';\n\ntype PeopleOutputs = inferRouterOutputs<GatewayRouter>['people'];\n\n/** The basket as the API answers it: its entries in the order added, its count, and how many answers Send sends. */\nexport type BasketView = PeopleOutputs['basket'];\n\n/** An entry of the basket, with what it stands as. */\nexport type BasketItem = BasketView['entries'][number];\n\ntype Standing = BasketItem['standing'];\n\n/** What Send did, as the API answers it. */\nexport type BasketSent = PeopleOutputs['sendBasket'];\n\n/** Words as a desktop says them, and as a phone says them, shorter. */\nexport interface Words {\n readonly desktop: string;\n readonly phone: string;\n}\n\n/** The line under an entry: its icon, the tone of the icon, and its words. */\nexport interface EntryLine {\n readonly icon: 'sent' | 'sending' | 'next' | 'unanswered' | 'refused' | 'withdrawn' | 'replaced' | 'elsewhere';\n readonly tone: 'ok' | 'waiting' | 'attention' | 'off';\n readonly words: Words;\n}\n\n/** The basket's foot: Send naming the ships, the send going on, what came of it, or none. */\nexport type BasketFoot = { readonly kind: 'send'; readonly words: Words; readonly label: string } | { readonly kind: 'sending'; readonly words: Words; readonly progress: string } | { readonly kind: 'summary'; readonly words: Words } | { readonly kind: 'none' };\n\nconst PLACES: Record<Extract<Standing, { kind: 'dealtElsewhere' }>['place'], string> = {\n bridge: 'in Bridge',\n chat: 'in a chat',\n slack: 'in Slack',\n gateway: 'by the gateway',\n};\n\nfunction same(words: string): Words {\n return { desktop: words, phone: words };\n}\n\nfunction answersOf(count: number): string {\n return count === 1 ? '1 answer' : `${String(count)} answers`;\n}\n\n/** Names in a sentence: a, b and c. */\nfunction listOf(names: readonly string[]): string {\n return names.length <= 1 ? names.join('') : `${names.slice(0, -1).join(', ')} and ${names.at(-1) ?? ''}`;\n}\n\n/** Each asker once, in the order added. */\nfunction askersOf(entries: readonly BasketItem[]): string[] {\n return [...new Set(entries.map(({ from }) => from))];\n}\n\n/** The Send button, naming how many answers it sends. */\nexport function sendLabelOf(toSend: number): string {\n return `Send ${answersOf(toSend)}`;\n}\n\n/** The answer an entry gives, by its number and label (2. Harbour first, on today's look); a note alone as such. */\nexport function answerTextOf(item: Pick<BasketItem, 'option' | 'optionLabel'>): string {\n if (item.option === null) {\n return 'Note alone';\n }\n return item.optionLabel === null ? `Option ${String(item.option)}` : `${String(item.option)}. ${item.optionLabel}`;\n}\n\n/** Whether an entry is not sent, as its asker withdrew or replaced it or it was answered elsewhere first: struck out. */\nexport function isStruckOut(standing: Standing): boolean {\n return standing.kind === 'withdrawn' || standing.kind === 'replaced' || standing.kind === 'dealtElsewhere';\n}\n\n/** The line under one entry, given whether another entry was sent and whether this is the one being sent now. */\nfunction lineOf(item: BasketItem, context: { isAnySent: boolean; isSendingNow: boolean }): EntryLine | undefined {\n const { standing, from } = item;\n switch (standing.kind) {\n case 'waiting':\n return undefined;\n case 'sent': {\n const at = clockTimeOf(standing.at);\n return { icon: 'sent', tone: 'ok', words: { desktop: `Sent at ${at} and stored. Done.`, phone: `Sent at ${at}. Done.` } };\n }\n case 'sending':\n if (standing.isUnanswered) {\n return { icon: 'unanswered', tone: 'waiting', words: { desktop: 'The fleet did not answer. Sending again with the same key until it is stored; it arrives once.', phone: 'No answer from the fleet. Sending again, same key.' } };\n }\n return context.isSendingNow ? { icon: 'sending', tone: 'waiting', words: same('Sending...') } : { icon: 'next', tone: 'waiting', words: { desktop: 'Next, in the order you added it', phone: 'Next' } };\n case 'refused': {\n const said = `Not sent: ${standing.reason}.`;\n // The phone says the reason without its consequence, as basket-7 draws it: Not sent: commercial was retired.\n const [cause = standing.reason] = standing.reason.split(', so ');\n return { icon: 'refused', tone: 'attention', words: { desktop: context.isAnySent ? `${said} The others were sent.` : said, phone: `Not sent: ${cause}.` } };\n }\n case 'withdrawn':\n return { icon: 'withdrawn', tone: 'off', words: { desktop: `Withdrawn by ${from} at ${clockTimeOf(standing.at)}. Not sent; Send skips it.`, phone: `Withdrawn by ${from}. Not sent.` } };\n case 'replaced': {\n const withTitle = standing.replacementTitle === null ? '.' : ` with \"${standing.replacementTitle}\"`;\n return { icon: 'replaced', tone: 'off', words: { desktop: `Replaced by ${from} at ${clockTimeOf(standing.at)}${withTitle} Not sent: its options differ, so answer the new one.`, phone: `Replaced by ${from}. Not sent.` } };\n }\n case 'dealtElsewhere':\n return { icon: 'elsewhere', tone: 'off', words: same(standing.option === null ? `Done ${PLACES[standing.place]}. Nothing is sent from it.` : `Answered ${PLACES[standing.place]}: option ${String(standing.option)}. Nothing is sent from it.`) };\n }\n}\n\n/** The line under each entry, in the order added: the first sending one the fleet has not left unanswered is the one being sent now, the others next. */\nexport function entryLinesOf(view: BasketView): (EntryLine | undefined)[] {\n const isAnySent = view.entries.some(({ standing }) => standing.kind === 'sent');\n const now = view.entries.find(({ standing }) => standing.kind === 'sending' && !standing.isUnanswered);\n return view.entries.map((item) => lineOf(item, { isAnySent, isSendingNow: item === now }));\n}\n\n/** The entries not sent, by kind, as the foot says them: The withdrawn and the replaced one are not sent. */\nfunction notSentOf(entries: readonly BasketItem[]): string | undefined {\n const counted = (kind: Standing['kind']) => entries.filter(({ standing }) => standing.kind === kind).length;\n const stale = (['withdrawn', 'replaced'] as const).map((kind) => ({ kind, count: counted(kind) })).filter(({ count }) => count > 0);\n const named = stale.map(({ kind, count }, index) => (count > 1 ? `the ${String(count)} ${kind}` : index === stale.length - 1 ? `the ${kind} one` : `the ${kind}`));\n const elsewhere = counted('dealtElsewhere');\n const all = elsewhere === 0 ? named : [...named, elsewhere === 1 ? 'the one answered elsewhere' : `the ${String(elsewhere)} answered elsewhere`];\n if (all.length === 0) {\n return undefined;\n }\n const sentence = listOf(all);\n const isOne = stale.reduce((sum, { count }) => sum + count, elsewhere) === 1;\n return `${sentence.charAt(0).toUpperCase()}${sentence.slice(1)} ${isOne ? 'is' : 'are'} not sent.`;\n}\n\n/** The foot while the basket waits for Send: the ships each receiving their own answer, or how many go and which are not sent. */\nfunction sendFootOf(view: BasketView): BasketFoot {\n const notSent = notSentOf(view.entries);\n const label = sendLabelOf(view.toSend);\n if (notSent !== undefined) {\n return { kind: 'send', words: { desktop: `${String(view.toSend)} to send. ${notSent}`, phone: notSent }, label };\n }\n const waiting = view.entries.filter(({ standing }) => standing.kind === 'waiting');\n const askers = askersOf(waiting);\n const receive = askers.length > 1 ? 'each receive their own answer' : waiting.length > 1 ? 'receives its own answer to each' : 'receives its own answer';\n return { kind: 'send', words: { desktop: `${listOf(askers)} ${receive}, as you, as if sent one by one.`, phone: 'Each asker receives its own answer.' }, label };\n}\n\n/** The basket's foot: Send while answers wait for it; Sending N of M while the send goes well; what came of it once one was not answered or refused. */\nexport function footOf(view: BasketView): BasketFoot {\n if (view.toSend > 0) {\n return sendFootOf(view);\n }\n const kinds = view.entries.map(({ standing }) => standing);\n const sent = kinds.filter(({ kind }) => kind === 'sent').length;\n const sending = kinds.filter(({ kind }) => kind === 'sending').length;\n const refused = kinds.filter(({ kind }) => kind === 'refused').length;\n const isAnyUnanswered = kinds.some((standing) => standing.kind === 'sending' && standing.isUnanswered);\n if (sending > 0 && refused === 0 && !isAnyUnanswered) {\n return { kind: 'sending', words: { desktop: 'You can close Bridge: the gateway keeps sending what is stored as sending.', phone: 'You can close Bridge; the gateway keeps sending.' }, progress: `Sending ${String(sent + 1)} of ${String(sent + sending)}` };\n }\n if (sending === 0 && refused === 0) {\n return { kind: 'none' };\n }\n const part = (count: number, words: string) => (count === 0 ? [] : [`${String(count)} ${words}`]);\n return {\n kind: 'summary',\n words: {\n desktop: `${[...part(sent, 'sent'), ...part(sending, 'still sending'), ...part(refused, 'not sent')].join(', ')}.`,\n phone: `${[...part(sent, 'sent'), ...part(sending, 'sending'), ...part(refused, 'not sent')].join(', ')}.`,\n },\n };\n}\n\n/** What was sent, once every entry left in the basket was sent: how many answers, to which ships. */\nexport function sentSummaryOf(view: BasketView): { title: string; description: string } | undefined {\n const { entries } = view;\n if (entries.length === 0 || entries.some(({ standing }) => standing.kind !== 'sent')) {\n return undefined;\n }\n const to = `To ${listOf(askersOf(entries))}, as you;`;\n return { title: `${answersOf(entries.length)} sent`, description: entries.length === 1 ? `${to} stored, and in Done.` : `${to} each stored, each in Done.` };\n}\n"],"names":["ArrowRight"],"mappings":"qEGGO,CAAA,AEAA,ADAA,CCAA,AFAA,ACAA,CDAA,AEAA,ADAA,CCAA,AFAA,ACAA,ACAA,CDAA,ACAA,AFAA,CEAA,6CFIW,CAAA,ACAD,CDAC,ACAD,SDAa,IAAA,UAAe,GCAC,CAAA,wBDCX,CCAF,ADAE,CCAF,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ChG,MAAO,CACL,KAAM,UACN,MAAO,CACL,QAAS,CAAA,EAAG,IAAI,EAAK,EAAM,WAAY,EAAK,EAAS,oBAAqB,EAAK,EAAS,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAClH,MAAO,CAAA,EAAG,IAAI,EAAK,EAAM,WAAY,EAAK,EAAS,cAAe,EAAK,EAAS,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,AAC5G,CACF,CACF,ELgE0C,GAAS,UAAW,GAAS,OAAS,OAAQ,eAAuB,IAAZ,QAA+C,IAAtB,EAAQ,SAAS,CAAgB,OAAQ,WAOrK","ignoreList":[3,4,5]}
@@ -1,3 +1,3 @@
1
- module.exports=[20298,a=>{"use strict";var b=a.i(87924),c=a.i(50944),d=a.i(72131),e=a.i(5050);let f=(0,e.createServerReference)("40ae33f79052d467a1fba4f152653f3d44ea2f48ab",e.callServer,void 0,e.findSourceMapURL,"decideRequest");var g=a.i(16550),h=a.i(51636),i=a.i(35149);let j=["messages:send","messages:receive"],k={"messages:send":"Send","messages:receive":"Receive","fleet:read":"Read the fleet"};var l=a.i(32043),m=a.i(10039);let n="rounded-md border border-input bg-background px-2 py-1.5";function o({scope:a,isLocked:c}){return(0,b.jsxs)("label",{className:"flex items-center gap-2",children:[c?(0,b.jsx)("input",{type:"checkbox",checked:!0,disabled:!0,"aria-label":k[a]??a}):(0,b.jsx)("input",{type:"checkbox",name:"scope",value:a,"aria-label":k[a]??a}),(0,b.jsx)("span",{children:k[a]??a}),(0,b.jsx)("span",{className:"font-mono text-caption text-muted-foreground",children:a}),c?(0,b.jsx)("span",{className:"text-caption text-muted-foreground",children:"(always)"}):null]})}function p(a,b){let c=a.get(b);return"string"==typeof c?c:""}function q({request:a,heldScopes:c,owners:e,working:f,failure:g,onDecide:k}){let[r,s]=(0,d.useState)("bearer"),t=function(a){switch(a.subject.kind){case"client":return a.subject.clientName;case"server":return URL.canParse(a.subject.url)?new URL(a.subject.url).host:a.subject.url}}(a),u="server"===a.subject.kind;return(0,b.jsxs)("section",{className:"grid gap-3 rounded-lg border border-border bg-card p-6 text-card-foreground shadow-sm",children:[(0,b.jsxs)("h2",{className:"text-heading font-semibold",children:["Approve ",t]}),(0,b.jsxs)("form",{onSubmit:a=>{a.preventDefault();let b=new FormData(a.currentTarget),c=b.getAll("scope").filter(a=>"string"==typeof a);k({kind:"approve",name:p(b,"name"),ownerShipId:p(b,"ownerShipId"),scopes:c,server:u?{credentialKind:(0,h.C)(p(b,"credentialKind")),token:p(b,"token"),clientId:p(b,"clientId"),clientSecret:p(b,"clientSecret"),issuer:p(b,"issuer"),scope:p(b,"scope-requested"),concurrencyLimit:Number(p(b,"concurrencyLimit"))}:void 0})},className:"grid gap-3",children:[(0,b.jsxs)("label",{className:"grid gap-1",children:[(0,b.jsx)("span",{children:"Proxy ship's name"}),(0,b.jsx)("input",{name:"name",defaultValue:t.toLowerCase().replaceAll(/[^a-z0-9]+/g,"-").replaceAll(/^-+|-+$/g,""),required:!0,className:n})]}),(0,b.jsx)(i.f,{choices:e.isOk?e.value:[],current:null,help:"A person ship or argo. It answers for this party.",refusal:e.isOk?void 0:e.refusal}),(0,b.jsxs)("fieldset",{className:"grid gap-1",children:[(0,b.jsx)("legend",{children:"Scopes"}),j.map(a=>(0,b.jsx)(o,{scope:a,isLocked:!0},a)),c.filter(a=>!j.includes(a)).map(a=>(0,b.jsx)(o,{scope:a,isLocked:!1},a))]}),u?(0,b.jsxs)("fieldset",{className:"grid gap-2",children:[(0,b.jsx)("legend",{children:"The server's credential"}),(0,b.jsxs)("label",{className:"grid gap-1",children:[(0,b.jsx)("span",{children:"Credential"}),(0,b.jsx)("select",{name:"credentialKind",value:r,onChange:a=>{s((0,h.C)(a.target.value))},className:n,children:h.x.map(({kind:a,label:c})=>(0,b.jsx)("option",{value:a,children:c},a))})]}),"none"===r?null:"bearer"===r?(0,b.jsxs)("label",{className:"grid gap-1",children:[(0,b.jsx)("span",{children:"Bearer token"}),(0,b.jsx)("input",{type:"password",name:"token",className:n})]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("label",{className:"grid gap-1",children:[(0,b.jsx)("span",{children:"Client id"}),(0,b.jsx)("input",{name:"clientId",className:n})]}),(0,b.jsxs)("label",{className:"grid gap-1",children:[(0,b.jsx)("span",{children:"Client secret"}),(0,b.jsx)("input",{type:"password",name:"clientSecret",className:n})]}),(0,b.jsxs)("label",{className:"grid gap-1",children:[(0,b.jsx)("span",{children:"Issuer"}),(0,b.jsx)("input",{type:"url",name:"issuer",className:n})]}),(0,b.jsxs)("label",{className:"grid gap-1",children:[(0,b.jsx)("span",{children:"Scope"}),(0,b.jsx)("input",{name:"scope-requested",className:n})]})]}),(0,b.jsxs)("label",{className:"grid gap-1",children:[(0,b.jsx)("span",{children:"Calls at once"}),(0,b.jsx)("input",{type:"number",name:"concurrencyLimit",min:1,max:10,defaultValue:4,className:n})]})]}):null,void 0===g?null:(0,b.jsx)(m.f,{message:g,isFailure:!0}),(0,b.jsxs)("div",{className:"flex gap-2",children:[(0,b.jsx)(l.i,{type:"submit",variant:"primary","data-testid":"bridge-approve",isPending:"approve"===f,pendingLabel:"Approving...",disabled:void 0!==f,children:"Approve"}),(0,b.jsx)(l.i,{type:"button","data-testid":"bridge-deny",isPending:"deny"===f,pendingLabel:"Denying...",disabled:void 0!==f,onClick:()=>{k({kind:"deny"})},children:"Deny"})]})]})]})}a.s(["DecisionPanel",0,function({fleetId:a,request:e,heldScopes:h,owners:i}){let j=(0,c.useRouter)(),[k,l]=(0,d.useState)(),[m,n]=(0,d.useState)(),[,o]=(0,d.useTransition)();return(0,b.jsx)(q,{request:e,heldScopes:h,owners:i,working:k,failure:m,onDecide:b=>{l(b.kind),n(void 0),o(async()=>{let c=await f({fleet:a,requestId:e.requestId,input:b});c.isOk?j.push(`${g.T}?${new URLSearchParams({fleet:a,decided:b.kind}).toString()}`):(l(void 0),n(c.message))})}})}],20298)}];
1
+ module.exports=[20298,a=>{"use strict";var b=a.i(87924),c=a.i(50944),d=a.i(72131),e=a.i(5050);let f=(0,e.createServerReference)("4014092bc297e94f9971bb84bed1cfc89921b96a8a",e.callServer,void 0,e.findSourceMapURL,"decideRequest");var g=a.i(16550),h=a.i(51636),i=a.i(35149);let j=["messages:send","messages:receive"],k={"messages:send":"Send","messages:receive":"Receive","fleet:read":"Read the fleet"};var l=a.i(32043),m=a.i(10039);let n="rounded-md border border-input bg-background px-2 py-1.5";function o({scope:a,isLocked:c}){return(0,b.jsxs)("label",{className:"flex items-center gap-2",children:[c?(0,b.jsx)("input",{type:"checkbox",checked:!0,disabled:!0,"aria-label":k[a]??a}):(0,b.jsx)("input",{type:"checkbox",name:"scope",value:a,"aria-label":k[a]??a}),(0,b.jsx)("span",{children:k[a]??a}),(0,b.jsx)("span",{className:"font-mono text-caption text-muted-foreground",children:a}),c?(0,b.jsx)("span",{className:"text-caption text-muted-foreground",children:"(always)"}):null]})}function p(a,b){let c=a.get(b);return"string"==typeof c?c:""}function q({request:a,heldScopes:c,owners:e,working:f,failure:g,onDecide:k}){let[r,s]=(0,d.useState)("bearer"),t=function(a){switch(a.subject.kind){case"client":return a.subject.clientName;case"server":return URL.canParse(a.subject.url)?new URL(a.subject.url).host:a.subject.url}}(a),u="server"===a.subject.kind;return(0,b.jsxs)("section",{className:"grid gap-3 rounded-lg border border-border bg-card p-6 text-card-foreground shadow-sm",children:[(0,b.jsxs)("h2",{className:"text-heading font-semibold",children:["Approve ",t]}),(0,b.jsxs)("form",{onSubmit:a=>{a.preventDefault();let b=new FormData(a.currentTarget),c=b.getAll("scope").filter(a=>"string"==typeof a);k({kind:"approve",name:p(b,"name"),ownerShipId:p(b,"ownerShipId"),scopes:c,server:u?{credentialKind:(0,h.C)(p(b,"credentialKind")),token:p(b,"token"),clientId:p(b,"clientId"),clientSecret:p(b,"clientSecret"),issuer:p(b,"issuer"),scope:p(b,"scope-requested"),concurrencyLimit:Number(p(b,"concurrencyLimit"))}:void 0})},className:"grid gap-3",children:[(0,b.jsxs)("label",{className:"grid gap-1",children:[(0,b.jsx)("span",{children:"Proxy ship's name"}),(0,b.jsx)("input",{name:"name",defaultValue:t.toLowerCase().replaceAll(/[^a-z0-9]+/g,"-").replaceAll(/^-+|-+$/g,""),required:!0,className:n})]}),(0,b.jsx)(i.f,{choices:e.isOk?e.value:[],current:null,help:"A person ship or argo. It answers for this party.",refusal:e.isOk?void 0:e.refusal}),(0,b.jsxs)("fieldset",{className:"grid gap-1",children:[(0,b.jsx)("legend",{children:"Scopes"}),j.map(a=>(0,b.jsx)(o,{scope:a,isLocked:!0},a)),c.filter(a=>!j.includes(a)).map(a=>(0,b.jsx)(o,{scope:a,isLocked:!1},a))]}),u?(0,b.jsxs)("fieldset",{className:"grid gap-2",children:[(0,b.jsx)("legend",{children:"The server's credential"}),(0,b.jsxs)("label",{className:"grid gap-1",children:[(0,b.jsx)("span",{children:"Credential"}),(0,b.jsx)("select",{name:"credentialKind",value:r,onChange:a=>{s((0,h.C)(a.target.value))},className:n,children:h.x.map(({kind:a,label:c})=>(0,b.jsx)("option",{value:a,children:c},a))})]}),"none"===r?null:"bearer"===r?(0,b.jsxs)("label",{className:"grid gap-1",children:[(0,b.jsx)("span",{children:"Bearer token"}),(0,b.jsx)("input",{type:"password",name:"token",className:n})]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("label",{className:"grid gap-1",children:[(0,b.jsx)("span",{children:"Client id"}),(0,b.jsx)("input",{name:"clientId",className:n})]}),(0,b.jsxs)("label",{className:"grid gap-1",children:[(0,b.jsx)("span",{children:"Client secret"}),(0,b.jsx)("input",{type:"password",name:"clientSecret",className:n})]}),(0,b.jsxs)("label",{className:"grid gap-1",children:[(0,b.jsx)("span",{children:"Issuer"}),(0,b.jsx)("input",{type:"url",name:"issuer",className:n})]}),(0,b.jsxs)("label",{className:"grid gap-1",children:[(0,b.jsx)("span",{children:"Scope"}),(0,b.jsx)("input",{name:"scope-requested",className:n})]})]}),(0,b.jsxs)("label",{className:"grid gap-1",children:[(0,b.jsx)("span",{children:"Calls at once"}),(0,b.jsx)("input",{type:"number",name:"concurrencyLimit",min:1,max:10,defaultValue:4,className:n})]})]}):null,void 0===g?null:(0,b.jsx)(m.f,{message:g,isFailure:!0}),(0,b.jsxs)("div",{className:"flex gap-2",children:[(0,b.jsx)(l.i,{type:"submit",variant:"primary","data-testid":"bridge-approve",isPending:"approve"===f,pendingLabel:"Approving...",disabled:void 0!==f,children:"Approve"}),(0,b.jsx)(l.i,{type:"button","data-testid":"bridge-deny",isPending:"deny"===f,pendingLabel:"Denying...",disabled:void 0!==f,onClick:()=>{k({kind:"deny"})},children:"Deny"})]})]})]})}a.s(["DecisionPanel",0,function({fleetId:a,request:e,heldScopes:h,owners:i}){let j=(0,c.useRouter)(),[k,l]=(0,d.useState)(),[m,n]=(0,d.useState)(),[,o]=(0,d.useTransition)();return(0,b.jsx)(q,{request:e,heldScopes:h,owners:i,working:k,failure:m,onDecide:b=>{l(b.kind),n(void 0),o(async()=>{let c=await f({fleet:a,requestId:e.requestId,input:b});c.isOk?j.push(`${g.T}?${new URLSearchParams({fleet:a,decided:b.kind}).toString()}`):(l(void 0),n(c.message))})}})}],20298)}];
2
2
 
3
3
  //# sourceMappingURL=web_features_bridge_state_decision-panel_tsx_1mzsixgc8zuxc._.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../web/features/bridge/state/decision-panel.tsx","../../../../../web/features/bridge/hooks/data%3A8143fd%20%3Ctext/javascript%3E","../../../../../web/features/bridge/ui/decision-form.tsx","../../../../../web/features/bridge/services/requests.ts"],"sourcesContent":["'use client';\n\nimport { useRouter } from 'next/navigation';\nimport { useState, useTransition } from 'react';\n\nimport type { OwnerChoices } from '../../forms/ui/owner-field';\nimport { decideRequest } from '../hooks/bridge-actions';\nimport { BRIDGE_SETTINGS_PATH } from '../paths';\nimport type { DecisionInput, ShownRequest } from '../services/requests';\nimport { DecisionForm } from '../ui/decision-form';\n\n/** Decides one request as the signed-in approver, then goes back to Bridge's settings, which say nothing more waits here. */\nexport function DecisionPanel({ fleetId, request, heldScopes, owners }: { fleetId: string; request: ShownRequest; heldScopes: readonly string[]; owners: OwnerChoices }) {\n const router = useRouter();\n const [working, setWorking] = useState<DecisionInput['kind'] | undefined>();\n const [failure, setFailure] = useState<string | undefined>();\n const [, startTransition] = useTransition();\n const decide = (decision: DecisionInput) => {\n setWorking(decision.kind);\n setFailure(undefined);\n startTransition(async () => {\n const outcome = await decideRequest({ fleet: fleetId, requestId: request.requestId, input: decision });\n if (outcome.isOk) {\n router.push(`${BRIDGE_SETTINGS_PATH}?${new URLSearchParams({ fleet: fleetId, decided: decision.kind }).toString()}`);\n return;\n }\n setWorking(undefined);\n setFailure(outcome.message);\n });\n };\n return <DecisionForm request={request} heldScopes={heldScopes} owners={owners} working={working} failure={failure} onDecide={decide} />;\n}\n","/* __next_internal_action_entry_do_not_use__ [{\"40ae33f79052d467a1fba4f152653f3d44ea2f48ab\":{\"name\":\"decideRequest\"}},\"web/features/bridge/hooks/bridge-actions.ts\",\"\"] */\"use turbopack: no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_14=/*#__PURE__*/createServerReference(\"40ae33f79052d467a1fba4f152653f3d44ea2f48ab\",callServer,void 0,findSourceMapURL,\"decideRequest\");export{$$RSC_SERVER_ACTION_14 as decideRequest};","'use client';\n\nimport { useState, type SyntheticEvent } from 'react';\n\nimport { CREDENTIAL_KINDS, credentialKindOf } from '../../forms/server-credential';\nimport { OwnerField, type OwnerChoices } from '../../forms/ui/owner-field';\nimport { EVERY_APP_SHIP_SCOPES, scopeLabel, subjectName, suggestedName, type DecisionInput, type ServerCredentialInput, type ShownRequest } from '../services/requests';\nimport { ActionButton } from './action-button';\nimport { Notice } from './notice';\n\nconst CONCURRENCY_LIMIT_DEFAULT = 4;\n\nconst FIELD = 'rounded-md border border-input bg-background px-2 py-1.5';\n\nfunction ScopeRow({ scope, isLocked }: { scope: string; isLocked: boolean }) {\n return (\n <label className=\"flex items-center gap-2\">\n {isLocked ? <input type=\"checkbox\" checked disabled aria-label={scopeLabel(scope)} /> : <input type=\"checkbox\" name=\"scope\" value={scope} aria-label={scopeLabel(scope)} />}\n <span>{scopeLabel(scope)}</span>\n <span className=\"font-mono text-caption text-muted-foreground\">{scope}</span>\n {isLocked ? <span className=\"text-caption text-muted-foreground\">(always)</span> : null}\n </label>\n );\n}\n\nfunction text(form: FormData, name: string): string {\n const value = form.get(name);\n return typeof value === 'string' ? value : '';\n}\n\nfunction serverOf(form: FormData): ServerCredentialInput {\n return {\n credentialKind: credentialKindOf(text(form, 'credentialKind')),\n token: text(form, 'token'),\n clientId: text(form, 'clientId'),\n clientSecret: text(form, 'clientSecret'),\n issuer: text(form, 'issuer'),\n scope: text(form, 'scope-requested'),\n concurrencyLimit: Number(text(form, 'concurrencyLimit')),\n };\n}\n\n/**\n * The decision on a request: approving names the proxy ship and its owner,\n * and offers as scope rows only the scopes the approver holds, messages:send\n * and messages:receive locked on (0046, 0053); a server's credential too.\n * What was typed stays when the API refuses.\n */\nexport function DecisionForm({\n request,\n heldScopes,\n owners,\n working,\n failure,\n onDecide,\n}: {\n request: ShownRequest;\n heldScopes: readonly string[];\n owners: OwnerChoices;\n working: DecisionInput['kind'] | undefined;\n failure: string | undefined;\n onDecide: (decision: DecisionInput) => void;\n}) {\n const [credentialKind, setCredentialKind] = useState<ServerCredentialInput['credentialKind']>('bearer');\n const name = subjectName(request);\n const isServer = request.subject.kind === 'server';\n const approve = (event: SyntheticEvent<HTMLFormElement>) => {\n event.preventDefault();\n const form = new FormData(event.currentTarget);\n const scopes = form.getAll('scope').filter((scope) => typeof scope === 'string');\n onDecide({ kind: 'approve', name: text(form, 'name'), ownerShipId: text(form, 'ownerShipId'), scopes, server: isServer ? serverOf(form) : undefined });\n };\n return (\n <section className=\"grid gap-3 rounded-lg border border-border bg-card p-6 text-card-foreground shadow-sm\">\n <h2 className=\"text-heading font-semibold\">Approve {name}</h2>\n <form onSubmit={approve} className=\"grid gap-3\">\n <label className=\"grid gap-1\">\n <span>Proxy ship&apos;s name</span>\n <input name=\"name\" defaultValue={suggestedName(name)} required className={FIELD} />\n </label>\n <OwnerField choices={owners.isOk ? owners.value : []} current={null} help=\"A person ship or argo. It answers for this party.\" refusal={owners.isOk ? undefined : owners.refusal} />\n <fieldset className=\"grid gap-1\">\n <legend>Scopes</legend>\n {EVERY_APP_SHIP_SCOPES.map((scope) => (\n <ScopeRow key={scope} scope={scope} isLocked />\n ))}\n {heldScopes\n .filter((scope) => !EVERY_APP_SHIP_SCOPES.includes(scope))\n .map((scope) => (\n <ScopeRow key={scope} scope={scope} isLocked={false} />\n ))}\n </fieldset>\n {isServer ? (\n <fieldset className=\"grid gap-2\">\n <legend>The server&apos;s credential</legend>\n <label className=\"grid gap-1\">\n <span>Credential</span>\n <select name=\"credentialKind\" value={credentialKind} onChange={(event) => { setCredentialKind(credentialKindOf(event.target.value)); }} className={FIELD}>\n {CREDENTIAL_KINDS.map(({ kind, label }) => (\n <option key={kind} value={kind}>\n {label}\n </option>\n ))}\n </select>\n </label>\n {credentialKind === 'none' ? null : credentialKind === 'bearer' ? (\n <label className=\"grid gap-1\">\n <span>Bearer token</span>\n <input type=\"password\" name=\"token\" className={FIELD} />\n </label>\n ) : (\n <>\n <label className=\"grid gap-1\">\n <span>Client id</span>\n <input name=\"clientId\" className={FIELD} />\n </label>\n <label className=\"grid gap-1\">\n <span>Client secret</span>\n <input type=\"password\" name=\"clientSecret\" className={FIELD} />\n </label>\n <label className=\"grid gap-1\">\n <span>Issuer</span>\n <input type=\"url\" name=\"issuer\" className={FIELD} />\n </label>\n <label className=\"grid gap-1\">\n <span>Scope</span>\n <input name=\"scope-requested\" className={FIELD} />\n </label>\n </>\n )}\n <label className=\"grid gap-1\">\n <span>Calls at once</span>\n <input type=\"number\" name=\"concurrencyLimit\" min={1} max={10} defaultValue={CONCURRENCY_LIMIT_DEFAULT} className={FIELD} />\n </label>\n </fieldset>\n ) : null}\n {failure === undefined ? null : <Notice message={failure} isFailure />}\n <div className=\"flex gap-2\">\n <ActionButton type=\"submit\" variant=\"primary\" data-testid=\"bridge-approve\" isPending={working === 'approve'} pendingLabel=\"Approving...\" disabled={working !== undefined}>\n Approve\n </ActionButton>\n <ActionButton type=\"button\" data-testid=\"bridge-deny\" isPending={working === 'deny'} pendingLabel=\"Denying...\" disabled={working !== undefined} onClick={() => { onDecide({ kind: 'deny' }); }}>\n Deny\n </ActionButton>\n </div>\n </form>\n </section>\n );\n}\n","/**\n * How Bridge's settings name and states a request for an outside party (design\n * B, Signal): pure view logic, no React and no API client.\n */\nimport type { inferRouterOutputs } from '@trpc/server';\n\nimport type { GatewayRouter } from '../../../../src/adapters/trpc/router.js';\nimport type { CredentialKind } from '../../forms/server-credential';\n\n/** A request as the API shows it. */\nexport type ShownRequest = inferRouterOutputs<GatewayRouter>['requests']['toDecide'][number];\n\n/** The tones a status shows, from the design tokens; a status always has its words too. */\nexport type Tone = 'waiting' | 'active' | 'ok' | 'attention' | 'ended';\n\nexport interface Status {\n readonly tone: Tone;\n readonly label: string;\n}\n\nconst DAY_MS = 86_400_000;\n\n/** How an outside party is named before it has a proxy ship: a client by its name, a server by its host. */\nexport function subjectName(request: ShownRequest): string {\n switch (request.subject.kind) {\n case 'client':\n return request.subject.clientName;\n case 'server':\n return URL.canParse(request.subject.url) ? new URL(request.subject.url).host : request.subject.url;\n }\n}\n\nexport function subjectKind(request: ShownRequest): string {\n switch (request.subject.kind) {\n case 'client':\n return 'MCP client';\n case 'server':\n return 'MCP server';\n }\n}\n\n/** Days left of the 7 a request is kept, counted up, so its last day reads as such, in the attention tone. */\nexport function daysLeft(request: ShownRequest, now: Date): Status {\n const days = Math.ceil((Date.parse(request.expiresAt) - now.getTime()) / DAY_MS);\n return days <= 1 ? { tone: 'attention', label: 'Last day' } : { tone: 'waiting', label: `${String(days)} d left` };\n}\n\n/** A request's state as the console shows a status; one still pending shows its days left. */\nexport function requestStatus(request: ShownRequest, now: Date): Status {\n switch (request.state) {\n case 'pending':\n return daysLeft(request, now);\n case 'approving':\n return { tone: 'active', label: 'Approving' };\n case 'approved':\n return { tone: 'ok', label: 'Approved' };\n case 'denied':\n return { tone: 'ended', label: 'Denied' };\n case 'expired':\n return { tone: 'ended', label: 'Expired' };\n }\n}\n\n/** A proxy ship's name offered from the party's own: lower case letters, digits and dashes. */\nexport function suggestedName(name: string): string {\n return name\n .toLowerCase()\n .replaceAll(/[^a-z0-9]+/g, '-')\n .replaceAll(/^-+|-+$/g, '');\n}\n\n/** The scopes every app ship gets (0046): shown locked on, and always sent. */\nexport const EVERY_APP_SHIP_SCOPES: readonly string[] = ['messages:send', 'messages:receive'];\n\nconst SCOPE_LABELS: Record<string, string> = {\n 'messages:send': 'Send',\n 'messages:receive': 'Receive',\n 'fleet:read': 'Read the fleet',\n};\n\n/** A scope's plain label, shown beside the scope itself. */\nexport function scopeLabel(scope: string): string {\n return SCOPE_LABELS[scope] ?? scope;\n}\n\n/** The server's credential as the decision form takes it. */\nexport interface ServerCredentialInput {\n readonly credentialKind: CredentialKind;\n readonly token: string;\n readonly clientId: string;\n readonly clientSecret: string;\n readonly issuer: string;\n readonly scope: string;\n readonly concurrencyLimit: number;\n}\n\nexport type DecisionInput = { readonly kind: 'deny' } | { readonly kind: 'approve'; readonly name: string; readonly ownerShipId: string; readonly scopes: readonly string[]; readonly server: ServerCredentialInput | undefined };\n"],"names":["$$RSC_SERVER_ACTION_14"],"mappings":"wDAEA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OCH2M,EAAA,EAAA,CAAA,CAAA,MAAsG,IAAMA,EAAoC,CAAA,EAAA,EAAA,kBAAb,GAAa,AAAqB,EAAC,MAAxB,uCAAqE,EAAA,UAAU,CAAC,KAAK,EAAE,EAAA,gBAAgB,CAAC,iBDOjc,IAAA,EAAA,EAAA,CAAA,CAAA,OEHA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA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","../../../../../web/features/bridge/ui/decision-form.tsx","../../../../../web/features/bridge/services/requests.ts"],"sourcesContent":["'use client';\n\nimport { useRouter } from 'next/navigation';\nimport { useState, useTransition } from 'react';\n\nimport type { OwnerChoices } from '../../forms/ui/owner-field';\nimport { decideRequest } from '../hooks/bridge-actions';\nimport { BRIDGE_SETTINGS_PATH } from '../paths';\nimport type { DecisionInput, ShownRequest } from '../services/requests';\nimport { DecisionForm } from '../ui/decision-form';\n\n/** Decides one request as the signed-in approver, then goes back to Bridge's settings, which say nothing more waits here. */\nexport function DecisionPanel({ fleetId, request, heldScopes, owners }: { fleetId: string; request: ShownRequest; heldScopes: readonly string[]; owners: OwnerChoices }) {\n const router = useRouter();\n const [working, setWorking] = useState<DecisionInput['kind'] | undefined>();\n const [failure, setFailure] = useState<string | undefined>();\n const [, startTransition] = useTransition();\n const decide = (decision: DecisionInput) => {\n setWorking(decision.kind);\n setFailure(undefined);\n startTransition(async () => {\n const outcome = await decideRequest({ fleet: fleetId, requestId: request.requestId, input: decision });\n if (outcome.isOk) {\n router.push(`${BRIDGE_SETTINGS_PATH}?${new URLSearchParams({ fleet: fleetId, decided: decision.kind }).toString()}`);\n return;\n }\n setWorking(undefined);\n setFailure(outcome.message);\n });\n };\n return <DecisionForm request={request} heldScopes={heldScopes} owners={owners} working={working} failure={failure} onDecide={decide} />;\n}\n","/* __next_internal_action_entry_do_not_use__ [{\"4014092bc297e94f9971bb84bed1cfc89921b96a8a\":{\"name\":\"decideRequest\"}},\"web/features/bridge/hooks/bridge-actions.ts\",\"\"] */\"use turbopack: no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_14=/*#__PURE__*/createServerReference(\"4014092bc297e94f9971bb84bed1cfc89921b96a8a\",callServer,void 0,findSourceMapURL,\"decideRequest\");export{$$RSC_SERVER_ACTION_14 as decideRequest};","'use client';\n\nimport { useState, type SyntheticEvent } from 'react';\n\nimport { CREDENTIAL_KINDS, credentialKindOf } from '../../forms/server-credential';\nimport { OwnerField, type OwnerChoices } from '../../forms/ui/owner-field';\nimport { EVERY_APP_SHIP_SCOPES, scopeLabel, subjectName, suggestedName, type DecisionInput, type ServerCredentialInput, type ShownRequest } from '../services/requests';\nimport { ActionButton } from './action-button';\nimport { Notice } from './notice';\n\nconst CONCURRENCY_LIMIT_DEFAULT = 4;\n\nconst FIELD = 'rounded-md border border-input bg-background px-2 py-1.5';\n\nfunction ScopeRow({ scope, isLocked }: { scope: string; isLocked: boolean }) {\n return (\n <label className=\"flex items-center gap-2\">\n {isLocked ? <input type=\"checkbox\" checked disabled aria-label={scopeLabel(scope)} /> : <input type=\"checkbox\" name=\"scope\" value={scope} aria-label={scopeLabel(scope)} />}\n <span>{scopeLabel(scope)}</span>\n <span className=\"font-mono text-caption text-muted-foreground\">{scope}</span>\n {isLocked ? <span className=\"text-caption text-muted-foreground\">(always)</span> : null}\n </label>\n );\n}\n\nfunction text(form: FormData, name: string): string {\n const value = form.get(name);\n return typeof value === 'string' ? value : '';\n}\n\nfunction serverOf(form: FormData): ServerCredentialInput {\n return {\n credentialKind: credentialKindOf(text(form, 'credentialKind')),\n token: text(form, 'token'),\n clientId: text(form, 'clientId'),\n clientSecret: text(form, 'clientSecret'),\n issuer: text(form, 'issuer'),\n scope: text(form, 'scope-requested'),\n concurrencyLimit: Number(text(form, 'concurrencyLimit')),\n };\n}\n\n/**\n * The decision on a request: approving names the proxy ship and its owner,\n * and offers as scope rows only the scopes the approver holds, messages:send\n * and messages:receive locked on (0046, 0053); a server's credential too.\n * What was typed stays when the API refuses.\n */\nexport function DecisionForm({\n request,\n heldScopes,\n owners,\n working,\n failure,\n onDecide,\n}: {\n request: ShownRequest;\n heldScopes: readonly string[];\n owners: OwnerChoices;\n working: DecisionInput['kind'] | undefined;\n failure: string | undefined;\n onDecide: (decision: DecisionInput) => void;\n}) {\n const [credentialKind, setCredentialKind] = useState<ServerCredentialInput['credentialKind']>('bearer');\n const name = subjectName(request);\n const isServer = request.subject.kind === 'server';\n const approve = (event: SyntheticEvent<HTMLFormElement>) => {\n event.preventDefault();\n const form = new FormData(event.currentTarget);\n const scopes = form.getAll('scope').filter((scope) => typeof scope === 'string');\n onDecide({ kind: 'approve', name: text(form, 'name'), ownerShipId: text(form, 'ownerShipId'), scopes, server: isServer ? serverOf(form) : undefined });\n };\n return (\n <section className=\"grid gap-3 rounded-lg border border-border bg-card p-6 text-card-foreground shadow-sm\">\n <h2 className=\"text-heading font-semibold\">Approve {name}</h2>\n <form onSubmit={approve} className=\"grid gap-3\">\n <label className=\"grid gap-1\">\n <span>Proxy ship&apos;s name</span>\n <input name=\"name\" defaultValue={suggestedName(name)} required className={FIELD} />\n </label>\n <OwnerField choices={owners.isOk ? owners.value : []} current={null} help=\"A person ship or argo. It answers for this party.\" refusal={owners.isOk ? undefined : owners.refusal} />\n <fieldset className=\"grid gap-1\">\n <legend>Scopes</legend>\n {EVERY_APP_SHIP_SCOPES.map((scope) => (\n <ScopeRow key={scope} scope={scope} isLocked />\n ))}\n {heldScopes\n .filter((scope) => !EVERY_APP_SHIP_SCOPES.includes(scope))\n .map((scope) => (\n <ScopeRow key={scope} scope={scope} isLocked={false} />\n ))}\n </fieldset>\n {isServer ? (\n <fieldset className=\"grid gap-2\">\n <legend>The server&apos;s credential</legend>\n <label className=\"grid gap-1\">\n <span>Credential</span>\n <select name=\"credentialKind\" value={credentialKind} onChange={(event) => { setCredentialKind(credentialKindOf(event.target.value)); }} className={FIELD}>\n {CREDENTIAL_KINDS.map(({ kind, label }) => (\n <option key={kind} value={kind}>\n {label}\n </option>\n ))}\n </select>\n </label>\n {credentialKind === 'none' ? null : credentialKind === 'bearer' ? (\n <label className=\"grid gap-1\">\n <span>Bearer token</span>\n <input type=\"password\" name=\"token\" className={FIELD} />\n </label>\n ) : (\n <>\n <label className=\"grid gap-1\">\n <span>Client id</span>\n <input name=\"clientId\" className={FIELD} />\n </label>\n <label className=\"grid gap-1\">\n <span>Client secret</span>\n <input type=\"password\" name=\"clientSecret\" className={FIELD} />\n </label>\n <label className=\"grid gap-1\">\n <span>Issuer</span>\n <input type=\"url\" name=\"issuer\" className={FIELD} />\n </label>\n <label className=\"grid gap-1\">\n <span>Scope</span>\n <input name=\"scope-requested\" className={FIELD} />\n </label>\n </>\n )}\n <label className=\"grid gap-1\">\n <span>Calls at once</span>\n <input type=\"number\" name=\"concurrencyLimit\" min={1} max={10} defaultValue={CONCURRENCY_LIMIT_DEFAULT} className={FIELD} />\n </label>\n </fieldset>\n ) : null}\n {failure === undefined ? null : <Notice message={failure} isFailure />}\n <div className=\"flex gap-2\">\n <ActionButton type=\"submit\" variant=\"primary\" data-testid=\"bridge-approve\" isPending={working === 'approve'} pendingLabel=\"Approving...\" disabled={working !== undefined}>\n Approve\n </ActionButton>\n <ActionButton type=\"button\" data-testid=\"bridge-deny\" isPending={working === 'deny'} pendingLabel=\"Denying...\" disabled={working !== undefined} onClick={() => { onDecide({ kind: 'deny' }); }}>\n Deny\n </ActionButton>\n </div>\n </form>\n </section>\n );\n}\n","/**\n * How Bridge's settings name and states a request for an outside party (design\n * B, Signal): pure view logic, no React and no API client.\n */\nimport type { inferRouterOutputs } from '@trpc/server';\n\nimport type { GatewayRouter } from '../../../../src/adapters/trpc/router.js';\nimport type { CredentialKind } from '../../forms/server-credential';\n\n/** A request as the API shows it. */\nexport type ShownRequest = inferRouterOutputs<GatewayRouter>['requests']['toDecide'][number];\n\n/** The tones a status shows, from the design tokens; a status always has its words too. */\nexport type Tone = 'waiting' | 'active' | 'ok' | 'attention' | 'ended';\n\nexport interface Status {\n readonly tone: Tone;\n readonly label: string;\n}\n\nconst DAY_MS = 86_400_000;\n\n/** How an outside party is named before it has a proxy ship: a client by its name, a server by its host. */\nexport function subjectName(request: ShownRequest): string {\n switch (request.subject.kind) {\n case 'client':\n return request.subject.clientName;\n case 'server':\n return URL.canParse(request.subject.url) ? new URL(request.subject.url).host : request.subject.url;\n }\n}\n\nexport function subjectKind(request: ShownRequest): string {\n switch (request.subject.kind) {\n case 'client':\n return 'MCP client';\n case 'server':\n return 'MCP server';\n }\n}\n\n/** Days left of the 7 a request is kept, counted up, so its last day reads as such, in the attention tone. */\nexport function daysLeft(request: ShownRequest, now: Date): Status {\n const days = Math.ceil((Date.parse(request.expiresAt) - now.getTime()) / DAY_MS);\n return days <= 1 ? { tone: 'attention', label: 'Last day' } : { tone: 'waiting', label: `${String(days)} d left` };\n}\n\n/** A request's state as the console shows a status; one still pending shows its days left. */\nexport function requestStatus(request: ShownRequest, now: Date): Status {\n switch (request.state) {\n case 'pending':\n return daysLeft(request, now);\n case 'approving':\n return { tone: 'active', label: 'Approving' };\n case 'approved':\n return { tone: 'ok', label: 'Approved' };\n case 'denied':\n return { tone: 'ended', label: 'Denied' };\n case 'expired':\n return { tone: 'ended', label: 'Expired' };\n }\n}\n\n/** A proxy ship's name offered from the party's own: lower case letters, digits and dashes. */\nexport function suggestedName(name: string): string {\n return name\n .toLowerCase()\n .replaceAll(/[^a-z0-9]+/g, '-')\n .replaceAll(/^-+|-+$/g, '');\n}\n\n/** The scopes every app ship gets (0046): shown locked on, and always sent. */\nexport const EVERY_APP_SHIP_SCOPES: readonly string[] = ['messages:send', 'messages:receive'];\n\nconst SCOPE_LABELS: Record<string, string> = {\n 'messages:send': 'Send',\n 'messages:receive': 'Receive',\n 'fleet:read': 'Read the fleet',\n};\n\n/** A scope's plain label, shown beside the scope itself. */\nexport function scopeLabel(scope: string): string {\n return SCOPE_LABELS[scope] ?? scope;\n}\n\n/** The server's credential as the decision form takes it. */\nexport interface ServerCredentialInput {\n readonly credentialKind: CredentialKind;\n readonly token: string;\n readonly clientId: string;\n readonly clientSecret: string;\n readonly issuer: string;\n readonly scope: string;\n readonly concurrencyLimit: number;\n}\n\nexport type DecisionInput = { readonly kind: 'deny' } | { readonly kind: 'approve'; readonly name: string; readonly ownerShipId: string; readonly scopes: readonly string[]; readonly server: ServerCredentialInput | undefined };\n"],"names":["$$RSC_SERVER_ACTION_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AQ,IAAI,CACd,CADgB,CACT,IAAI,CAAC,CAAA,EAAG,EAAA,CAAoB,CAAC,CAAC,EAAE,IAAI,gBAAgB,CAAE,MAAO,EAAS,QAAS,EAAS,IAAI,AAAC,GAAG,QAAQ,GAAA,CAAI,GAGrH,EAAW,QACX,EAAW,EAAQ,OAAO,EAC5B,EACF,GAEF"}
@@ -1,3 +1,3 @@
1
- module.exports=[16563,a=>{"use strict";var b=a.i(87924),c=a.i(97024),d=a.i(73370),e=a.i(72131),f=a.i(5050);let g=(0,f.createServerReference)("606cb6a4b44b6d1f3ee3cb4926fd252ef8c38e6829",f.callServer,void 0,f.findSourceMapURL,"readMoreRecord");var h=a.i(12110),i=a.i(32043),j=a.i(99838),k=a.i(11725),l=a.i(42369);function m({question:a,answered:c}){return(0,b.jsx)("ul",{className:"grid gap-2","aria-label":"Options",children:a.options.map(d=>{let e=d.key===c;return(0,b.jsxs)("li",{"data-answered":e,className:`flex items-start gap-3 rounded-md border p-3 ${e?"border-ring ring-1 ring-ring":"border-border text-muted-foreground"}`,children:[(0,b.jsx)("span",{"data-testid":"bridge-done-radio","data-filled":e,"aria-hidden":"true",className:`mt-1 grid size-4 shrink-0 place-items-center rounded-full border ${e?"border-primary":"border-border"}`,children:e?(0,b.jsx)("span",{className:"size-2 rounded-full bg-primary"}):null}),(0,b.jsxs)("span",{className:"grid flex-1 gap-0.5",children:[(0,b.jsxs)("span",{className:"font-medium",children:[d.key,". ",d.label]}),""===d.detail?null:(0,b.jsx)("span",{className:"text-caption text-muted-foreground max-md:hidden",children:d.detail})]}),d.key===a.pick.option?(0,b.jsx)("span",{className:"rounded-sm border border-border px-1.5 text-caption",children:"Their pick"}):null]},d.key)})})}function n({ended:a}){let e=a.isOk?c.f:d.f;return(0,b.jsxs)("div",{"data-testid":"bridge-done-ended",role:"status",className:`flex items-start gap-3 rounded-md border p-3 ${a.isOk?"border-tone-ok-border bg-tone-ok-bg":"border-tone-ended-border bg-tone-ended-bg"}`,children:[(0,b.jsx)(e,{"aria-hidden":!0,className:`mt-0.5 size-4 shrink-0 ${a.isOk?"text-tone-ok-fg":"text-tone-ended-fg"}`}),(0,b.jsxs)("span",{className:"grid gap-0.5",children:[(0,b.jsx)("span",{className:"font-medium",children:a.text}),void 0===a.sent?null:(0,b.jsx)("span",{className:"text-caption text-muted-foreground",children:a.sent})]})]})}function o({item:a,timeZone:c}){return(0,b.jsx)("ol",{"data-testid":"bridge-done-history",className:"grid gap-1.5 text-caption max-md:hidden",children:(0,h.L)(a,c).map(a=>(0,b.jsxs)("li",{className:"grid grid-cols-[3rem_0.5rem_minmax(0,1fr)] items-center gap-2",children:[(0,b.jsx)("span",{className:"text-muted-foreground tabular-nums",children:a.at}),(0,b.jsx)("i",{"aria-hidden":"true",className:`size-1.5 rounded-full ${a.isEnd?"bg-tone-ok-fg":"bg-border"}`}),(0,b.jsxs)("span",{children:[a.text,void 0===a.detail?null:(0,b.jsxs)("span",{className:"text-muted-foreground",children:[" · ",a.detail]})]})]},`${a.at} ${a.text}`))})}function p({item:a,timeZone:c,bridgeHost:d,onBack:e}){let f=(0,j.N)(a),g=(0,j.R)(a,d),i=(0,h.d)(a,c),q={job:a.job,isAlert:a.isAlert,wasNew:!1};return(0,b.jsxs)("section",{"data-testid":"bridge-done-item",className:"grid min-w-0 content-start gap-3 text-card-foreground md:p-5",children:[(0,b.jsx)(k.g,{opened:q,title:(0,h.c)(a),isWorking:!1,onBack:e}),(0,b.jsx)(k.$,{delivery:a,opened:q,timeZone:c}),(0,b.jsx)("h2",{className:"text-heading font-semibold",children:f?.title??a.title}),void 0!==g?(0,b.jsx)(k.l,{step:g,isStale:!1,isFinished:!0}):void 0===f?(0,b.jsx)(l.f,{text:(0,j.Y)(a)}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{className:k.R,children:(0,b.jsx)(l.f,{text:f.context})}),(0,b.jsx)(m,{question:f,answered:a.outcome?.option??null})]}),void 0===i?null:(0,b.jsx)(n,{ended:i}),(0,b.jsx)(o,{item:a,timeZone:c})]})}var q=a.i(52560),r=a.i(74352),s=a.i(10039);function t(){return()=>void 0}function u(a){return a.outcome?.at??a.sentAt}function v({item:a}){let e=(0,h.o)(a),f=e.isOk?c.f:d.f;return(0,b.jsxs)("span",{"data-testid":"bridge-done-outcome",className:"flex items-start gap-1.5 text-caption",children:[(0,b.jsx)(f,{"aria-hidden":"true",className:`mt-0.5 size-3.5 shrink-0 ${e.isOk?"text-tone-ok-fg":"text-muted-foreground"}`}),e.text]})}a.s(["DonePanel",0,function({fleetId:a,first:c,now:d}){let f=new Date(d),j=(0,e.useSyncExternalStore)(t,()=>Intl.DateTimeFormat().resolvedOptions().timeZone,()=>"UTC"),[k,l]=(0,e.useState)(c.items),[m,n]=(0,e.useState)(c.nextCursor),[o,w]=(0,e.useState)(),[x,y]=(0,e.useState)(),[z,A]=(0,e.useTransition)(),B=k.find(({deliveryId:a})=>a===x);return(0,b.jsx)(r.f,{list:(0,b.jsxs)("section",{className:"grid gap-3","aria-labelledby":"bridge-done-heading",children:[(0,b.jsxs)("div",{className:void 0===B?"":"md:px-3 md:pt-3",children:[(0,b.jsx)("h1",{id:"bridge-done-heading",className:"text-heading font-semibold",children:"Done"}),(0,b.jsx)("p",{className:"text-muted-foreground",children:"Everything that reached you, with what came of it and where. Opening one reads it back whole."})]}),0===k.length?(0,b.jsx)("p",{"data-testid":"bridge-record-empty",className:"rounded-md border border-border bg-card p-3 text-muted-foreground",children:"Nothing is done yet."}):(function(a,b){let c=[];for(let d of a){let a=(0,h.Y)(u(d),b),e=c.at(-1);e?.day===a?e.items.push(d):c.push({day:a,items:[d]})}return c})(k,{now:f,timeZone:j}).map(({day:a,items:c})=>(0,b.jsxs)("div",{className:"grid gap-1.5",children:[(0,b.jsx)("h2",{className:`text-caption text-muted-foreground ${void 0===B?"":"md:px-3"}`,children:a}),(0,b.jsx)("ul",{className:"overflow-hidden rounded-lg border border-border bg-card",children:c.map(a=>(0,b.jsx)(q.f,{item:a,now:f,isNew:!1,isOpen:a.deliveryId===x,outcome:void 0,failure:void 0,time:{at:u(a),said:(0,h.Z)(u(a),j)},detail:(0,b.jsx)(v,{item:a}),onOpen:()=>{y(a.deliveryId)}},a.deliveryId))})]},a)),void 0===o?null:(0,b.jsx)(s.f,{message:o,isFailure:!0}),null===m?null:(0,b.jsx)(i.i,{"data-testid":"bridge-more",className:"justify-self-start",isPending:z,pendingLabel:"Reading...",onClick:()=>{w(void 0),A(async()=>{let b=await g(a,m);b.isOk?(l(a=>[...a,...b.value.items]),n(b.value.nextCursor)):w(b.message)})},children:"Show older"})]}),item:void 0===B?void 0:(0,b.jsx)(p,{item:B,timeZone:j,bridgeHost:window.location.host,onBack:()=>{y(void 0)}})})}],16563)}];
1
+ module.exports=[16563,a=>{"use strict";var b=a.i(87924),c=a.i(97024),d=a.i(73370),e=a.i(72131),f=a.i(5050);let g=(0,f.createServerReference)("60651bb6c3720357100bb22cf07a2affe2ae5ba9ff",f.callServer,void 0,f.findSourceMapURL,"readMoreRecord");var h=a.i(12110),i=a.i(32043),j=a.i(99838),k=a.i(11725),l=a.i(42369);function m({question:a,answered:c}){return(0,b.jsx)("ul",{className:"grid gap-2","aria-label":"Options",children:a.options.map(d=>{let e=d.key===c;return(0,b.jsxs)("li",{"data-answered":e,className:`flex items-start gap-3 rounded-md border p-3 ${e?"border-ring ring-1 ring-ring":"border-border text-muted-foreground"}`,children:[(0,b.jsx)("span",{"data-testid":"bridge-done-radio","data-filled":e,"aria-hidden":"true",className:`mt-1 grid size-4 shrink-0 place-items-center rounded-full border ${e?"border-primary":"border-border"}`,children:e?(0,b.jsx)("span",{className:"size-2 rounded-full bg-primary"}):null}),(0,b.jsxs)("span",{className:"grid flex-1 gap-0.5",children:[(0,b.jsxs)("span",{className:"font-medium",children:[d.key,". ",d.label]}),""===d.detail?null:(0,b.jsx)("span",{className:"text-caption text-muted-foreground max-md:hidden",children:d.detail})]}),d.key===a.pick.option?(0,b.jsx)("span",{className:"rounded-sm border border-border px-1.5 text-caption",children:"Their pick"}):null]},d.key)})})}function n({ended:a}){let e=a.isOk?c.f:d.f;return(0,b.jsxs)("div",{"data-testid":"bridge-done-ended",role:"status",className:`flex items-start gap-3 rounded-md border p-3 ${a.isOk?"border-tone-ok-border bg-tone-ok-bg":"border-tone-ended-border bg-tone-ended-bg"}`,children:[(0,b.jsx)(e,{"aria-hidden":!0,className:`mt-0.5 size-4 shrink-0 ${a.isOk?"text-tone-ok-fg":"text-tone-ended-fg"}`}),(0,b.jsxs)("span",{className:"grid gap-0.5",children:[(0,b.jsx)("span",{className:"font-medium",children:a.text}),void 0===a.sent?null:(0,b.jsx)("span",{className:"text-caption text-muted-foreground",children:a.sent})]})]})}function o({item:a,timeZone:c}){return(0,b.jsx)("ol",{"data-testid":"bridge-done-history",className:"grid gap-1.5 text-caption max-md:hidden",children:(0,h.L)(a,c).map(a=>(0,b.jsxs)("li",{className:"grid grid-cols-[3rem_0.5rem_minmax(0,1fr)] items-center gap-2",children:[(0,b.jsx)("span",{className:"text-muted-foreground tabular-nums",children:a.at}),(0,b.jsx)("i",{"aria-hidden":"true",className:`size-1.5 rounded-full ${a.isEnd?"bg-tone-ok-fg":"bg-border"}`}),(0,b.jsxs)("span",{children:[a.text,void 0===a.detail?null:(0,b.jsxs)("span",{className:"text-muted-foreground",children:[" · ",a.detail]})]})]},`${a.at} ${a.text}`))})}function p({item:a,timeZone:c,bridgeHost:d,onBack:e}){let f=(0,j.N)(a),g=(0,j.R)(a,d),i=(0,h.d)(a,c),q={job:a.job,isAlert:a.isAlert,wasNew:!1};return(0,b.jsxs)("section",{"data-testid":"bridge-done-item",className:"grid min-w-0 content-start gap-3 text-card-foreground md:p-5",children:[(0,b.jsx)(k.g,{opened:q,title:(0,h.c)(a),isWorking:!1,onBack:e}),(0,b.jsx)(k.$,{delivery:a,opened:q,timeZone:c}),(0,b.jsx)("h2",{className:"text-heading font-semibold",children:f?.title??a.title}),void 0!==g?(0,b.jsx)(k.l,{step:g,isStale:!1,isFinished:!0}):void 0===f?(0,b.jsx)(l.f,{text:(0,j.Y)(a)}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{className:k.R,children:(0,b.jsx)(l.f,{text:f.context})}),(0,b.jsx)(m,{question:f,answered:a.outcome?.option??null})]}),void 0===i?null:(0,b.jsx)(n,{ended:i}),(0,b.jsx)(o,{item:a,timeZone:c})]})}var q=a.i(52560),r=a.i(74352),s=a.i(10039);function t(){return()=>void 0}function u(a){return a.outcome?.at??a.sentAt}function v({item:a}){let e=(0,h.o)(a),f=e.isOk?c.f:d.f;return(0,b.jsxs)("span",{"data-testid":"bridge-done-outcome",className:"flex items-start gap-1.5 text-caption",children:[(0,b.jsx)(f,{"aria-hidden":"true",className:`mt-0.5 size-3.5 shrink-0 ${e.isOk?"text-tone-ok-fg":"text-muted-foreground"}`}),e.text]})}a.s(["DonePanel",0,function({fleetId:a,first:c,now:d}){let f=new Date(d),j=(0,e.useSyncExternalStore)(t,()=>Intl.DateTimeFormat().resolvedOptions().timeZone,()=>"UTC"),[k,l]=(0,e.useState)(c.items),[m,n]=(0,e.useState)(c.nextCursor),[o,w]=(0,e.useState)(),[x,y]=(0,e.useState)(),[z,A]=(0,e.useTransition)(),B=k.find(({deliveryId:a})=>a===x);return(0,b.jsx)(r.f,{list:(0,b.jsxs)("section",{className:"grid gap-3","aria-labelledby":"bridge-done-heading",children:[(0,b.jsxs)("div",{className:void 0===B?"":"md:px-3 md:pt-3",children:[(0,b.jsx)("h1",{id:"bridge-done-heading",className:"text-heading font-semibold",children:"Done"}),(0,b.jsx)("p",{className:"text-muted-foreground",children:"Everything that reached you, with what came of it and where. Opening one reads it back whole."})]}),0===k.length?(0,b.jsx)("p",{"data-testid":"bridge-record-empty",className:"rounded-md border border-border bg-card p-3 text-muted-foreground",children:"Nothing is done yet."}):(function(a,b){let c=[];for(let d of a){let a=(0,h.Y)(u(d),b),e=c.at(-1);e?.day===a?e.items.push(d):c.push({day:a,items:[d]})}return c})(k,{now:f,timeZone:j}).map(({day:a,items:c})=>(0,b.jsxs)("div",{className:"grid gap-1.5",children:[(0,b.jsx)("h2",{className:`text-caption text-muted-foreground ${void 0===B?"":"md:px-3"}`,children:a}),(0,b.jsx)("ul",{className:"overflow-hidden rounded-lg border border-border bg-card",children:c.map(a=>(0,b.jsx)(q.f,{item:a,now:f,isNew:!1,isOpen:a.deliveryId===x,outcome:void 0,failure:void 0,time:{at:u(a),said:(0,h.Z)(u(a),j)},detail:(0,b.jsx)(v,{item:a}),onOpen:()=>{y(a.deliveryId)}},a.deliveryId))})]},a)),void 0===o?null:(0,b.jsx)(s.f,{message:o,isFailure:!0}),null===m?null:(0,b.jsx)(i.i,{"data-testid":"bridge-more",className:"justify-self-start",isPending:z,pendingLabel:"Reading...",onClick:()=>{w(void 0),A(async()=>{let b=await g(a,m);b.isOk?(l(a=>[...a,...b.value.items]),n(b.value.nextCursor)):w(b.message)})},children:"Show older"})]}),item:void 0===B?void 0:(0,b.jsx)(p,{item:B,timeZone:j,bridgeHost:window.location.host,onBack:()=>{y(void 0)}})})}],16563)}];
2
2
 
3
3
  //# sourceMappingURL=web_features_bridge_state_done-panel_tsx_1m844-qb1z9p_._.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../web/features/bridge/state/done-panel.tsx","../../../../../web/features/bridge/hooks/data%3A1f43a7%20%3Ctext/javascript%3E","../../../../../web/features/bridge/ui/done-card.tsx"],"sourcesContent":["'use client';\n\nimport { CircleCheck, CircleX } from 'lucide-react';\nimport { useState, useSyncExternalStore, useTransition } from 'react';\n\nimport { readMoreRecord } from '../hooks/bridge-actions';\nimport { clockTimeOf, dayOf, doneOutcomeOf, type RecordItem, type RecordPage } from '../services/items';\nimport { ActionButton } from '../ui/action-button';\nimport { DoneCard } from '../ui/done-card';\nimport { ItemRow } from '../ui/item-row';\nimport { ItemSplit } from '../ui/item-split';\nimport { Notice } from '../ui/notice';\n\n/** The time zone a page is read in on the server, before the browser says its own. */\nconst SERVER_TIME_ZONE = 'UTC';\n\nfunction unchanging(): () => void {\n return () => undefined;\n}\n\n/** The person's own time zone, the browser's; the server's until the page runs there, so the first render matches it. */\nfunction useTimeZone(): string {\n return useSyncExternalStore(unchanging, () => Intl.DateTimeFormat().resolvedOptions().timeZone, () => SERVER_TIME_ZONE);\n}\n\n/** When an item was done: when what came of it was kept, or when it arrived for one the fleet ended with none kept. */\nfunction doneAtOf(item: RecordItem): string {\n return item.outcome?.at ?? item.sentAt;\n}\n\n/** The items in their order, a run per day they were done on. */\nfunction byDay(items: readonly RecordItem[], of: { now: Date; timeZone: string }): { day: string; items: RecordItem[] }[] {\n const days: { day: string; items: RecordItem[] }[] = [];\n for (const item of items) {\n const day = dayOf(doneAtOf(item), of);\n const last = days.at(-1);\n if (last?.day === day) {\n last.items.push(item);\n } else {\n days.push({ day, items: [item] });\n }\n }\n return days;\n}\n\n/** What came of an item on its row, on a line of its own, its icon saying whether it ended well (done.html). */\nfunction DoneOutcome({ item }: { item: RecordItem }) {\n const outcome = doneOutcomeOf(item);\n const Icon = outcome.isOk ? CircleCheck : CircleX;\n return (\n <span data-testid=\"bridge-done-outcome\" className=\"flex items-start gap-1.5 text-caption\">\n <Icon aria-hidden=\"true\" className={`mt-0.5 size-3.5 shrink-0 ${outcome.isOk ? 'text-tone-ok-fg' : 'text-muted-foreground'}`} />\n {outcome.text}\n </span>\n );\n}\n\n/**\n * Done (Bridge, CC4; done.html): everything done that reached the person,\n * newest first, under the day it was done, each with the time of day, the\n * places that showed it and what came of it and where. Its title opens it,\n * read back whole beside the list, with nothing acknowledged. The next page\n * is read only when they ask for it.\n */\nexport function DonePanel({ fleetId, first, now }: { fleetId: string; first: RecordPage; now: string }) {\n const readAt = new Date(now);\n const timeZone = useTimeZone();\n const [items, setItems] = useState(first.items);\n const [nextCursor, setNextCursor] = useState(first.nextCursor);\n const [failure, setFailure] = useState<string | undefined>();\n const [openId, setOpenId] = useState<string | undefined>();\n const [isReading, startTransition] = useTransition();\n\n const readMore = (cursor: string) => {\n setFailure(undefined);\n startTransition(async () => {\n const more = await readMoreRecord(fleetId, cursor);\n if (more.isOk) {\n setItems((shown) => [...shown, ...more.value.items]);\n setNextCursor(more.value.nextCursor);\n } else {\n setFailure(more.message);\n }\n });\n };\n\n const open = items.find(({ deliveryId }) => deliveryId === openId);\n return (\n <ItemSplit\n list={\n <section className=\"grid gap-3\" aria-labelledby=\"bridge-done-heading\">\n <div className={open === undefined ? '' : 'md:px-3 md:pt-3'}>\n <h1 id=\"bridge-done-heading\" className=\"text-heading font-semibold\">\n Done\n </h1>\n <p className=\"text-muted-foreground\">Everything that reached you, with what came of it and where. Opening one reads it back whole.</p>\n </div>\n {items.length === 0 ? (\n <p data-testid=\"bridge-record-empty\" className=\"rounded-md border border-border bg-card p-3 text-muted-foreground\">\n Nothing is done yet.\n </p>\n ) : (\n byDay(items, { now: readAt, timeZone }).map(({ day, items: ofDay }) => (\n <div key={day} className=\"grid gap-1.5\">\n <h2 className={`text-caption text-muted-foreground ${open === undefined ? '' : 'md:px-3'}`}>{day}</h2>\n <ul className=\"overflow-hidden rounded-lg border border-border bg-card\">\n {ofDay.map((item) => (\n <ItemRow\n key={item.deliveryId}\n item={item}\n now={readAt}\n isNew={false}\n isOpen={item.deliveryId === openId}\n outcome={undefined}\n failure={undefined}\n time={{ at: doneAtOf(item), said: clockTimeOf(doneAtOf(item), timeZone) }}\n detail={<DoneOutcome item={item} />}\n onOpen={() => { setOpenId(item.deliveryId); }}\n />\n ))}\n </ul>\n </div>\n ))\n )}\n {failure === undefined ? null : <Notice message={failure} isFailure />}\n {nextCursor === null ? null : (\n <ActionButton data-testid=\"bridge-more\" className=\"justify-self-start\" isPending={isReading} pendingLabel=\"Reading...\" onClick={() => { readMore(nextCursor); }}>\n Show older\n </ActionButton>\n )}\n </section>\n }\n item={open === undefined ? undefined : <DoneCard item={open} timeZone={timeZone} bridgeHost={window.location.host} onBack={() => { setOpenId(undefined); }} />}\n />\n );\n}\n","/* __next_internal_action_entry_do_not_use__ [{\"606cb6a4b44b6d1f3ee3cb4926fd252ef8c38e6829\":{\"name\":\"readMoreRecord\"}},\"web/features/bridge/hooks/bridge-actions.ts\",\"\"] */\"use turbopack: no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_0=/*#__PURE__*/createServerReference(\"606cb6a4b44b6d1f3ee3cb4926fd252ef8c38e6829\",callServer,void 0,findSourceMapURL,\"readMoreRecord\");export{$$RSC_SERVER_ACTION_0 as readMoreRecord};","import { CircleCheck, CircleX } from 'lucide-react';\n\nimport type { Question } from '@aeolus-fleet/common';\n\nimport { bodyOf, questionOf, stepOf } from '../services/deliveries';\nimport { endedOf, endedTitleOf, historyOf, type RecordItem } from '../services/items';\nimport { ItemHeading, PROSE, ScreenBar, StepAsked } from './delivery-card';\nimport { Markdown } from './markdown';\n\n/** A done question's options as they stood: each with its radio, filled on the one answered, framed by the ring; the asker's pick named; none to choose. */\nfunction AnsweredOptions({ question, answered }: { question: Question; answered: number | null }) {\n return (\n <ul className=\"grid gap-2\" aria-label=\"Options\">\n {question.options.map((option) => {\n const isAnswered = option.key === answered;\n return (\n <li key={option.key} data-answered={isAnswered} className={`flex items-start gap-3 rounded-md border p-3 ${isAnswered ? 'border-ring ring-1 ring-ring' : 'border-border text-muted-foreground'}`}>\n <span data-testid=\"bridge-done-radio\" data-filled={isAnswered} aria-hidden=\"true\" className={`mt-1 grid size-4 shrink-0 place-items-center rounded-full border ${isAnswered ? 'border-primary' : 'border-border'}`}>\n {isAnswered ? <span className=\"size-2 rounded-full bg-primary\" /> : null}\n </span>\n <span className=\"grid flex-1 gap-0.5\">\n <span className=\"font-medium\">\n {option.key}. {option.label}\n </span>\n {option.detail === '' ? null : <span className=\"text-caption text-muted-foreground max-md:hidden\">{option.detail}</span>}\n </span>\n {option.key === question.pick.option ? <span className=\"rounded-sm border border-border px-1.5 text-caption\">Their pick</span> : null}\n </li>\n );\n })}\n </ul>\n );\n}\n\n/** What came of it, where and when, in the ok tone when it ended well and the ended tone otherwise, and what was sent as the person (decide.html, do.html). */\nfunction EndedNotice({ ended }: { ended: NonNullable<ReturnType<typeof endedOf>> }) {\n const Icon = ended.isOk ? CircleCheck : CircleX;\n return (\n <div data-testid=\"bridge-done-ended\" role=\"status\" className={`flex items-start gap-3 rounded-md border p-3 ${ended.isOk ? 'border-tone-ok-border bg-tone-ok-bg' : 'border-tone-ended-border bg-tone-ended-bg'}`}>\n <Icon aria-hidden className={`mt-0.5 size-4 shrink-0 ${ended.isOk ? 'text-tone-ok-fg' : 'text-tone-ended-fg'}`} />\n <span className=\"grid gap-0.5\">\n <span className=\"font-medium\">{ended.text}</span>\n {ended.sent === undefined ? null : <span className=\"text-caption text-muted-foreground\">{ended.sent}</span>}\n </span>\n </div>\n );\n}\n\n/** Its history, a line per moment: when it arrived and where it showed, where it was seen, and what came of it (decide.html). */\nfunction History({ item, timeZone }: { item: RecordItem; timeZone: string | undefined }) {\n return (\n <ol data-testid=\"bridge-done-history\" className=\"grid gap-1.5 text-caption max-md:hidden\">\n {historyOf(item, timeZone).map((line) => (\n <li key={`${line.at} ${line.text}`} className=\"grid grid-cols-[3rem_0.5rem_minmax(0,1fr)] items-center gap-2\">\n <span className=\"text-muted-foreground tabular-nums\">{line.at}</span>\n <i aria-hidden=\"true\" className={`size-1.5 rounded-full ${line.isEnd ? 'bg-tone-ok-fg' : 'bg-border'}`} />\n <span>\n {line.text}\n {line.detail === undefined ? null : <span className=\"text-muted-foreground\"> · {line.detail}</span>}\n </span>\n </li>\n ))}\n </ol>\n );\n}\n\n/**\n * A done item opened from Done (decide.html, answered in Slack): read back\n * whole from the record, nothing acknowledged and nothing to send. A\n * question shows its options with the one answered marked, a step why and\n * where it was done, anything else what it says; then what came of it and\n * its history. A phone shows it on its own screen, titled by what came of\n * it, without its history, as drawn.\n */\nexport function DoneCard({ item, timeZone, bridgeHost, onBack }: { item: RecordItem; timeZone: string | undefined; bridgeHost: string; onBack: () => void }) {\n const question = questionOf(item);\n const step = stepOf(item, bridgeHost);\n const ended = endedOf(item, timeZone);\n const opened = { job: item.job, isAlert: item.isAlert, wasNew: false };\n return (\n <section data-testid=\"bridge-done-item\" className=\"grid min-w-0 content-start gap-3 text-card-foreground md:p-5\">\n <ScreenBar opened={opened} title={endedTitleOf(item)} isWorking={false} onBack={onBack} />\n <ItemHeading delivery={item} opened={opened} timeZone={timeZone} />\n <h2 className=\"text-heading font-semibold\">{question?.title ?? item.title}</h2>\n {step !== undefined ? (\n <StepAsked step={step} isStale={false} isFinished />\n ) : question === undefined ? (\n <Markdown text={bodyOf(item)} />\n ) : (\n <>\n <div className={PROSE}>\n <Markdown text={question.context} />\n </div>\n <AnsweredOptions question={question} answered={item.outcome?.option ?? null} />\n </>\n )}\n {ended === undefined ? null : <EndedNotice ended={ended} />}\n <History item={item} timeZone={timeZone} />\n </section>\n );\n}\n"],"names":["$$RSC_SERVER_ACTION_0"],"mappings":"wDAEA,EAAA,EAAA,CAAA,CAAA,OAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OCH4M,EAAA,EAAA,CAAA,CAAA,MAAsG,IAAMA,EAAmC,CAAA,EAAA,EAAA,iBAAb,IAAa,AAAqB,EAAC,KAAxB,wCAAqE,EAAA,UAAU,CAAC,KAAK,EAAE,EAAA,gBAAgB,CAAC,kBDMjc,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OEHA,EAAA,EAAA,CAAA,CAAA,OAEA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OAGA,SAAS,EAAgB,UAAE,CAAQ,UAAE,CAAQ,CAAmD,EAC9F,MACE,CAAA,EAAA,EAAA,GAAA,EAAC,KAAA,CAAG,UAAU,aAAa,aAAW,mBACnC,EAAS,OAAO,CAAC,GAAG,CAAC,AAAC,IACrB,IAAM,EAAa,EAAO,GAAG,GAAK,EAClC,MACE,CAAA,EAAA,EAAA,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AK,UAAU,CAAG,GATvC,EAAK,UAAU,OALlB,IAqBb,AAAY,WAAY,KAAO,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,CAAM,CAAA,CAAC,QAAS,EAAS,SAAS,CAAA,CAAA,IACnD,OAAf,EAAsB,KACrB,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,CAAY,CAAA,CAAC,cAAY,cAAc,UAAU,qBAAqB,UAAW,EAAW,aAAa,aAAa,QAAS,KApDxI,OAAW,GACX,EAAgB,UACd,IAAM,EAAO,MAAM,EAAe,EAkDqH,GAjDnJ,EAAK,EADkC,EAC9B,EAAE,AACb,EAAS,AAAC,GAAU,IAAI,KAAU,EAAK,KAAK,CAAC,KAAK,CAAC,EACnD,EAAc,EAAK,KAAK,CAAC,UAAU,GAEnC,EAAW,EAAK,OAAO,CAE3B,EA2CsK,WAAG,kBAMvK,UAAe,IAAT,EAAqB,OAAY,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,CAAS,KAAM,EAAM,SAAU,EAAU,WAAY,OAAO,QAAQ,CAAC,IAAI,CAAE,OAAQ,KAAQ,OAAU,EAAY,KAG/J"}
1
+ {"version":3,"sources":["../../../../../web/features/bridge/state/done-panel.tsx","../../../../../web/features/bridge/hooks/data%3A1f99c3%20%3Ctext/javascript%3E","../../../../../web/features/bridge/ui/done-card.tsx"],"sourcesContent":["'use client';\n\nimport { CircleCheck, CircleX } from 'lucide-react';\nimport { useState, useSyncExternalStore, useTransition } from 'react';\n\nimport { readMoreRecord } from '../hooks/bridge-actions';\nimport { clockTimeOf, dayOf, doneOutcomeOf, type RecordItem, type RecordPage } from '../services/items';\nimport { ActionButton } from '../ui/action-button';\nimport { DoneCard } from '../ui/done-card';\nimport { ItemRow } from '../ui/item-row';\nimport { ItemSplit } from '../ui/item-split';\nimport { Notice } from '../ui/notice';\n\n/** The time zone a page is read in on the server, before the browser says its own. */\nconst SERVER_TIME_ZONE = 'UTC';\n\nfunction unchanging(): () => void {\n return () => undefined;\n}\n\n/** The person's own time zone, the browser's; the server's until the page runs there, so the first render matches it. */\nfunction useTimeZone(): string {\n return useSyncExternalStore(unchanging, () => Intl.DateTimeFormat().resolvedOptions().timeZone, () => SERVER_TIME_ZONE);\n}\n\n/** When an item was done: when what came of it was kept, or when it arrived for one the fleet ended with none kept. */\nfunction doneAtOf(item: RecordItem): string {\n return item.outcome?.at ?? item.sentAt;\n}\n\n/** The items in their order, a run per day they were done on. */\nfunction byDay(items: readonly RecordItem[], of: { now: Date; timeZone: string }): { day: string; items: RecordItem[] }[] {\n const days: { day: string; items: RecordItem[] }[] = [];\n for (const item of items) {\n const day = dayOf(doneAtOf(item), of);\n const last = days.at(-1);\n if (last?.day === day) {\n last.items.push(item);\n } else {\n days.push({ day, items: [item] });\n }\n }\n return days;\n}\n\n/** What came of an item on its row, on a line of its own, its icon saying whether it ended well (done.html). */\nfunction DoneOutcome({ item }: { item: RecordItem }) {\n const outcome = doneOutcomeOf(item);\n const Icon = outcome.isOk ? CircleCheck : CircleX;\n return (\n <span data-testid=\"bridge-done-outcome\" className=\"flex items-start gap-1.5 text-caption\">\n <Icon aria-hidden=\"true\" className={`mt-0.5 size-3.5 shrink-0 ${outcome.isOk ? 'text-tone-ok-fg' : 'text-muted-foreground'}`} />\n {outcome.text}\n </span>\n );\n}\n\n/**\n * Done (Bridge, CC4; done.html): everything done that reached the person,\n * newest first, under the day it was done, each with the time of day, the\n * places that showed it and what came of it and where. Its title opens it,\n * read back whole beside the list, with nothing acknowledged. The next page\n * is read only when they ask for it.\n */\nexport function DonePanel({ fleetId, first, now }: { fleetId: string; first: RecordPage; now: string }) {\n const readAt = new Date(now);\n const timeZone = useTimeZone();\n const [items, setItems] = useState(first.items);\n const [nextCursor, setNextCursor] = useState(first.nextCursor);\n const [failure, setFailure] = useState<string | undefined>();\n const [openId, setOpenId] = useState<string | undefined>();\n const [isReading, startTransition] = useTransition();\n\n const readMore = (cursor: string) => {\n setFailure(undefined);\n startTransition(async () => {\n const more = await readMoreRecord(fleetId, cursor);\n if (more.isOk) {\n setItems((shown) => [...shown, ...more.value.items]);\n setNextCursor(more.value.nextCursor);\n } else {\n setFailure(more.message);\n }\n });\n };\n\n const open = items.find(({ deliveryId }) => deliveryId === openId);\n return (\n <ItemSplit\n list={\n <section className=\"grid gap-3\" aria-labelledby=\"bridge-done-heading\">\n <div className={open === undefined ? '' : 'md:px-3 md:pt-3'}>\n <h1 id=\"bridge-done-heading\" className=\"text-heading font-semibold\">\n Done\n </h1>\n <p className=\"text-muted-foreground\">Everything that reached you, with what came of it and where. Opening one reads it back whole.</p>\n </div>\n {items.length === 0 ? (\n <p data-testid=\"bridge-record-empty\" className=\"rounded-md border border-border bg-card p-3 text-muted-foreground\">\n Nothing is done yet.\n </p>\n ) : (\n byDay(items, { now: readAt, timeZone }).map(({ day, items: ofDay }) => (\n <div key={day} className=\"grid gap-1.5\">\n <h2 className={`text-caption text-muted-foreground ${open === undefined ? '' : 'md:px-3'}`}>{day}</h2>\n <ul className=\"overflow-hidden rounded-lg border border-border bg-card\">\n {ofDay.map((item) => (\n <ItemRow\n key={item.deliveryId}\n item={item}\n now={readAt}\n isNew={false}\n isOpen={item.deliveryId === openId}\n outcome={undefined}\n failure={undefined}\n time={{ at: doneAtOf(item), said: clockTimeOf(doneAtOf(item), timeZone) }}\n detail={<DoneOutcome item={item} />}\n onOpen={() => { setOpenId(item.deliveryId); }}\n />\n ))}\n </ul>\n </div>\n ))\n )}\n {failure === undefined ? null : <Notice message={failure} isFailure />}\n {nextCursor === null ? null : (\n <ActionButton data-testid=\"bridge-more\" className=\"justify-self-start\" isPending={isReading} pendingLabel=\"Reading...\" onClick={() => { readMore(nextCursor); }}>\n Show older\n </ActionButton>\n )}\n </section>\n }\n item={open === undefined ? undefined : <DoneCard item={open} timeZone={timeZone} bridgeHost={window.location.host} onBack={() => { setOpenId(undefined); }} />}\n />\n );\n}\n","/* __next_internal_action_entry_do_not_use__ [{\"60651bb6c3720357100bb22cf07a2affe2ae5ba9ff\":{\"name\":\"readMoreRecord\"}},\"web/features/bridge/hooks/bridge-actions.ts\",\"\"] */\"use turbopack: no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_0=/*#__PURE__*/createServerReference(\"60651bb6c3720357100bb22cf07a2affe2ae5ba9ff\",callServer,void 0,findSourceMapURL,\"readMoreRecord\");export{$$RSC_SERVER_ACTION_0 as readMoreRecord};","import { CircleCheck, CircleX } from 'lucide-react';\n\nimport type { Question } from '@aeolus-fleet/common';\n\nimport { bodyOf, questionOf, stepOf } from '../services/deliveries';\nimport { endedOf, endedTitleOf, historyOf, type RecordItem } from '../services/items';\nimport { ItemHeading, PROSE, ScreenBar, StepAsked } from './delivery-card';\nimport { Markdown } from './markdown';\n\n/** A done question's options as they stood: each with its radio, filled on the one answered, framed by the ring; the asker's pick named; none to choose. */\nfunction AnsweredOptions({ question, answered }: { question: Question; answered: number | null }) {\n return (\n <ul className=\"grid gap-2\" aria-label=\"Options\">\n {question.options.map((option) => {\n const isAnswered = option.key === answered;\n return (\n <li key={option.key} data-answered={isAnswered} className={`flex items-start gap-3 rounded-md border p-3 ${isAnswered ? 'border-ring ring-1 ring-ring' : 'border-border text-muted-foreground'}`}>\n <span data-testid=\"bridge-done-radio\" data-filled={isAnswered} aria-hidden=\"true\" className={`mt-1 grid size-4 shrink-0 place-items-center rounded-full border ${isAnswered ? 'border-primary' : 'border-border'}`}>\n {isAnswered ? <span className=\"size-2 rounded-full bg-primary\" /> : null}\n </span>\n <span className=\"grid flex-1 gap-0.5\">\n <span className=\"font-medium\">\n {option.key}. {option.label}\n </span>\n {option.detail === '' ? null : <span className=\"text-caption text-muted-foreground max-md:hidden\">{option.detail}</span>}\n </span>\n {option.key === question.pick.option ? <span className=\"rounded-sm border border-border px-1.5 text-caption\">Their pick</span> : null}\n </li>\n );\n })}\n </ul>\n );\n}\n\n/** What came of it, where and when, in the ok tone when it ended well and the ended tone otherwise, and what was sent as the person (decide.html, do.html). */\nfunction EndedNotice({ ended }: { ended: NonNullable<ReturnType<typeof endedOf>> }) {\n const Icon = ended.isOk ? CircleCheck : CircleX;\n return (\n <div data-testid=\"bridge-done-ended\" role=\"status\" className={`flex items-start gap-3 rounded-md border p-3 ${ended.isOk ? 'border-tone-ok-border bg-tone-ok-bg' : 'border-tone-ended-border bg-tone-ended-bg'}`}>\n <Icon aria-hidden className={`mt-0.5 size-4 shrink-0 ${ended.isOk ? 'text-tone-ok-fg' : 'text-tone-ended-fg'}`} />\n <span className=\"grid gap-0.5\">\n <span className=\"font-medium\">{ended.text}</span>\n {ended.sent === undefined ? null : <span className=\"text-caption text-muted-foreground\">{ended.sent}</span>}\n </span>\n </div>\n );\n}\n\n/** Its history, a line per moment: when it arrived and where it showed, where it was seen, and what came of it (decide.html). */\nfunction History({ item, timeZone }: { item: RecordItem; timeZone: string | undefined }) {\n return (\n <ol data-testid=\"bridge-done-history\" className=\"grid gap-1.5 text-caption max-md:hidden\">\n {historyOf(item, timeZone).map((line) => (\n <li key={`${line.at} ${line.text}`} className=\"grid grid-cols-[3rem_0.5rem_minmax(0,1fr)] items-center gap-2\">\n <span className=\"text-muted-foreground tabular-nums\">{line.at}</span>\n <i aria-hidden=\"true\" className={`size-1.5 rounded-full ${line.isEnd ? 'bg-tone-ok-fg' : 'bg-border'}`} />\n <span>\n {line.text}\n {line.detail === undefined ? null : <span className=\"text-muted-foreground\"> · {line.detail}</span>}\n </span>\n </li>\n ))}\n </ol>\n );\n}\n\n/**\n * A done item opened from Done (decide.html, answered in Slack): read back\n * whole from the record, nothing acknowledged and nothing to send. A\n * question shows its options with the one answered marked, a step why and\n * where it was done, anything else what it says; then what came of it and\n * its history. A phone shows it on its own screen, titled by what came of\n * it, without its history, as drawn.\n */\nexport function DoneCard({ item, timeZone, bridgeHost, onBack }: { item: RecordItem; timeZone: string | undefined; bridgeHost: string; onBack: () => void }) {\n const question = questionOf(item);\n const step = stepOf(item, bridgeHost);\n const ended = endedOf(item, timeZone);\n const opened = { job: item.job, isAlert: item.isAlert, wasNew: false };\n return (\n <section data-testid=\"bridge-done-item\" className=\"grid min-w-0 content-start gap-3 text-card-foreground md:p-5\">\n <ScreenBar opened={opened} title={endedTitleOf(item)} isWorking={false} onBack={onBack} />\n <ItemHeading delivery={item} opened={opened} timeZone={timeZone} />\n <h2 className=\"text-heading font-semibold\">{question?.title ?? item.title}</h2>\n {step !== undefined ? (\n <StepAsked step={step} isStale={false} isFinished />\n ) : question === undefined ? (\n <Markdown text={bodyOf(item)} />\n ) : (\n <>\n <div className={PROSE}>\n <Markdown text={question.context} />\n </div>\n <AnsweredOptions question={question} answered={item.outcome?.option ?? null} />\n </>\n )}\n {ended === undefined ? null : <EndedNotice ended={ended} />}\n <History item={item} timeZone={timeZone} />\n </section>\n );\n}\n"],"names":["$$RSC_SERVER_ACTION_0"],"mappings":"wDAEA,EAAA,EAAA,CAAA,CAAA,OAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OCH4M,EAAA,EAAA,CAAA,CAAA,MAAsG,IAAMA,EAAmC,CAAA,EAAA,EAAA,iBAAb,IAAa,AAAqB,EAAC,KAAxB,wCAAqE,EAAA,UAAU,CAAC,KAAK,EAAE,EAAA,gBAAgB,CAAC,kBDMjc,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OEHA,EAAA,EAAA,CAAA,CAAA,OAEA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OAGA,SAAS,EAAgB,UAAE,CAAQ,UAAE,CAAQ,CAAmD,EAC9F,MACE,CAAA,EAAA,EAAA,GAAA,EAAC,KAAA,CAAG,UAAU,aAAa,aAAW,mBACnC,EAAS,OAAO,CAAC,GAAG,CAAC,AAAC,IACrB,IAAM,EAAa,EAAO,GAAG,GAAK,EAClC,MACE,CAAA,EAAA,EAAA,IAAA,EAAC,KAAA,CAAoB,gBAAe,EAAY,UAAW,CAAC,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Y,WAAY,KAAO,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,CAAM,CAAA,CAAC,QAAS,EAAS,SAAS,CAAA,CAAA,IACnD,OAAf,EAAsB,KACrB,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,CAAY,CAAA,CAAC,cAAY,cAAc,UAAU,qBAAqB,UAAW,EAAW,aAAa,aAAa,QAAS,KApDxI,OAAW,GACX,EAAgB,UACd,IAAM,EAAO,MAAM,EAAe,EAkDqH,GAjDnJ,EAAK,EADkC,EAC9B,EAAE,AACb,EAAS,AAAC,GAAU,IAAI,KAAU,EAAK,KAAK,CAAC,KAAK,CAAC,EACnD,EAAc,EAAK,KAAK,CAAC,UAAU,GAEnC,EAAW,EAAK,OAAO,CAE3B,EA2CsK,WAAG,kBAMvK,UAAe,IAAT,EAAqB,OAAY,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,CAAS,KAAM,EAAM,SAAU,EAAU,WAAY,OAAO,QAAQ,CAAC,IAAI,CAAE,OAAQ,KAAQ,OAAU,EAAY,KAG/J"}
@@ -1,3 +1,3 @@
1
- module.exports=[3045,a=>{"use strict";var b=a.i(87924),c=a.i(50944),d=a.i(72131),e=a.i(32043),f=a.i(10039),g=a.i(5050);let h=(0,g.createServerReference)("4022e2173a0de3f2bde0a0d2a095ecf8e5f7c0e2ae",g.callServer,void 0,g.findSourceMapURL,"changeMic"),i=(0,g.createServerReference)("40eceea36d09c66186e2e22846958f0580ef0847ad",g.callServer,void 0,g.findSourceMapURL,"contribute"),j={request:{label:"Request the mic",pending:"Requesting..."},withdraw:{label:"Withdraw my request",pending:"Withdrawing..."},release:{label:"Release the mic",pending:"Releasing..."}};a.s(["MeetingControls",0,function({fleetId:a,meetingId:g,controls:k}){let l=(0,c.useRouter)(),[m,n]=(0,d.useState)(""),[o,p]=(0,d.useState)(()=>crypto.randomUUID()),[q,r]=(0,d.useState)(),[s,t]=(0,d.useState)(),[,u]=(0,d.useTransition)(),v=({control:a,action:b,onDone:c})=>{r(a),t(void 0),u(async()=>{let a=await b();r(void 0),a.isOk?(c?.(),l.refresh()):t(a.message)})},w=void 0!==q,x=k.filter(a=>"contribute"!==a);return(0,b.jsxs)("div",{className:"grid gap-3",children:[k.includes("contribute")?(0,b.jsxs)("div",{className:"grid gap-2",children:[(0,b.jsxs)("label",{className:"grid gap-1",children:[(0,b.jsx)("span",{children:"Your contribution"}),(0,b.jsx)("textarea",{"data-testid":"meeting-text",rows:4,value:m,onChange:a=>{n(a.target.value)},className:"rounded-md border border-input bg-background p-2"})]}),(0,b.jsx)(e.i,{"data-testid":"meeting-contribute",variant:"primary",className:"justify-self-start",isPending:"contribute"===q,pendingLabel:"Sending...",disabled:w,onClick:()=>{v({control:"contribute",action:()=>i({fleet:a,meetingId:g,text:m,idempotencyKey:o}),onDone:()=>{n(""),p(crypto.randomUUID())}})},children:"Contribute"})]}):null,0===x.length?null:(0,b.jsx)("div",{className:"flex flex-wrap gap-2",children:x.map(c=>(0,b.jsx)(e.i,{"data-testid":`meeting-${c}`,variant:"request"===c?"primary":"secondary",isPending:q===c,pendingLabel:j[c].pending,disabled:w,onClick:()=>{v({control:c,action:()=>h({fleet:a,meetingId:g,change:c})})},children:j[c].label},c))}),void 0===s?null:(0,b.jsx)(f.f,{message:s,isFailure:!0})]})}],3045)}];
1
+ module.exports=[3045,a=>{"use strict";var b=a.i(87924),c=a.i(50944),d=a.i(72131),e=a.i(32043),f=a.i(10039),g=a.i(5050);let h=(0,g.createServerReference)("405b99b33f3bd9c0e07e8fa8a7c900e837867a13a5",g.callServer,void 0,g.findSourceMapURL,"changeMic"),i=(0,g.createServerReference)("4099f3dd3225a78c2f89af8d9b49f34183019421d2",g.callServer,void 0,g.findSourceMapURL,"contribute"),j={request:{label:"Request the mic",pending:"Requesting..."},withdraw:{label:"Withdraw my request",pending:"Withdrawing..."},release:{label:"Release the mic",pending:"Releasing..."}};a.s(["MeetingControls",0,function({fleetId:a,meetingId:g,controls:k}){let l=(0,c.useRouter)(),[m,n]=(0,d.useState)(""),[o,p]=(0,d.useState)(()=>crypto.randomUUID()),[q,r]=(0,d.useState)(),[s,t]=(0,d.useState)(),[,u]=(0,d.useTransition)(),v=({control:a,action:b,onDone:c})=>{r(a),t(void 0),u(async()=>{let a=await b();r(void 0),a.isOk?(c?.(),l.refresh()):t(a.message)})},w=void 0!==q,x=k.filter(a=>"contribute"!==a);return(0,b.jsxs)("div",{className:"grid gap-3",children:[k.includes("contribute")?(0,b.jsxs)("div",{className:"grid gap-2",children:[(0,b.jsxs)("label",{className:"grid gap-1",children:[(0,b.jsx)("span",{children:"Your contribution"}),(0,b.jsx)("textarea",{"data-testid":"meeting-text",rows:4,value:m,onChange:a=>{n(a.target.value)},className:"rounded-md border border-input bg-background p-2"})]}),(0,b.jsx)(e.i,{"data-testid":"meeting-contribute",variant:"primary",className:"justify-self-start",isPending:"contribute"===q,pendingLabel:"Sending...",disabled:w,onClick:()=>{v({control:"contribute",action:()=>i({fleet:a,meetingId:g,text:m,idempotencyKey:o}),onDone:()=>{n(""),p(crypto.randomUUID())}})},children:"Contribute"})]}):null,0===x.length?null:(0,b.jsx)("div",{className:"flex flex-wrap gap-2",children:x.map(c=>(0,b.jsx)(e.i,{"data-testid":`meeting-${c}`,variant:"request"===c?"primary":"secondary",isPending:q===c,pendingLabel:j[c].pending,disabled:w,onClick:()=>{v({control:c,action:()=>h({fleet:a,meetingId:g,change:c})})},children:j[c].label},c))}),void 0===s?null:(0,b.jsx)(f.f,{message:s,isFailure:!0})]})}],3045)}];
2
2
 
3
3
  //# sourceMappingURL=web_features_meeting_state_meeting-controls_tsx_12g4kzk2mbvvz._.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../web/features/meeting/state/meeting-controls.tsx","../../../../../web/features/meeting/hooks/data%3A2ed83e%20%3Ctext/javascript%3E","../../../../../web/features/meeting/hooks/data%3Abfe054%20%3Ctext/javascript%3E"],"sourcesContent":["'use client';\n\nimport { useRouter } from 'next/navigation';\nimport { useState, useTransition } from 'react';\n\nimport { ActionButton } from '../../bridge/ui/action-button';\nimport { Notice } from '../../bridge/ui/notice';\nimport type { ActionOutcome } from '../../bridge/hooks/bridge-actions';\nimport { changeMic, contribute, type OwnMicChange } from '../hooks/meeting-actions';\nimport type { MeetingControl } from '../services/meeting';\n\n/** Each mic control's words, and what it says while it works. */\nconst MIC_CONTROLS: Record<OwnMicChange, { label: string; pending: string }> = {\n request: { label: 'Request the mic', pending: 'Requesting...' },\n withdraw: { label: 'Withdraw my request', pending: 'Withdrawing...' },\n release: { label: 'Release the mic', pending: 'Releasing...' },\n};\n\n/**\n * What the person may do in the meeting now: write a contribution while they\n * hold the mic or moderate, and their own mic calls. A draft keeps one key\n * until it is taken, so a contribution tried again goes once. The page reads\n * itself again after each call.\n */\nexport function MeetingControls({ fleetId, meetingId, controls }: { fleetId: string; meetingId: string; controls: readonly MeetingControl[] }) {\n const router = useRouter();\n const [text, setText] = useState('');\n const [draftKey, setDraftKey] = useState(() => crypto.randomUUID());\n const [working, setWorking] = useState<MeetingControl | undefined>();\n const [failure, setFailure] = useState<string | undefined>();\n const [, startTransition] = useTransition();\n\n const run = ({ control, action, onDone }: { control: MeetingControl; action: () => Promise<ActionOutcome<undefined>>; onDone?: () => void }) => {\n setWorking(control);\n setFailure(undefined);\n startTransition(async () => {\n const outcome = await action();\n setWorking(undefined);\n if (outcome.isOk) {\n onDone?.();\n router.refresh();\n } else {\n setFailure(outcome.message);\n }\n });\n };\n\n const isWorking = working !== undefined;\n const micControls = controls.filter((control): control is OwnMicChange => control !== 'contribute');\n return (\n <div className=\"grid gap-3\">\n {controls.includes('contribute') ? (\n <div className=\"grid gap-2\">\n <label className=\"grid gap-1\">\n <span>Your contribution</span>\n <textarea\n data-testid=\"meeting-text\"\n rows={4}\n value={text}\n onChange={(event) => { setText(event.target.value); }}\n className=\"rounded-md border border-input bg-background p-2\"\n />\n </label>\n <ActionButton\n data-testid=\"meeting-contribute\"\n variant=\"primary\"\n className=\"justify-self-start\"\n isPending={working === 'contribute'}\n pendingLabel=\"Sending...\"\n disabled={isWorking}\n onClick={() => {\n run({\n control: 'contribute',\n action: () => contribute({ fleet: fleetId, meetingId, text, idempotencyKey: draftKey }),\n onDone: () => {\n setText('');\n setDraftKey(crypto.randomUUID());\n },\n });\n }}\n >\n Contribute\n </ActionButton>\n </div>\n ) : null}\n {micControls.length === 0 ? null : (\n <div className=\"flex flex-wrap gap-2\">\n {micControls.map((change) => (\n <ActionButton\n key={change}\n data-testid={`meeting-${change}`}\n variant={change === 'request' ? 'primary' : 'secondary'}\n isPending={working === change}\n pendingLabel={MIC_CONTROLS[change].pending}\n disabled={isWorking}\n onClick={() => { run({ control: change, action: () => changeMic({ fleet: fleetId, meetingId, change }) }); }}\n >\n {MIC_CONTROLS[change].label}\n </ActionButton>\n ))}\n </div>\n )}\n {failure === undefined ? null : <Notice message={failure} isFailure />}\n </div>\n );\n}\n","/* __next_internal_action_entry_do_not_use__ [{\"4022e2173a0de3f2bde0a0d2a095ecf8e5f7c0e2ae\":{\"name\":\"changeMic\"}},\"web/features/meeting/hooks/meeting-actions.ts\",\"\"] */\"use turbopack: no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_1=/*#__PURE__*/createServerReference(\"4022e2173a0de3f2bde0a0d2a095ecf8e5f7c0e2ae\",callServer,void 0,findSourceMapURL,\"changeMic\");export{$$RSC_SERVER_ACTION_1 as changeMic};","/* __next_internal_action_entry_do_not_use__ [{\"40eceea36d09c66186e2e22846958f0580ef0847ad\":{\"name\":\"contribute\"}},\"web/features/meeting/hooks/meeting-actions.ts\",\"\"] */\"use turbopack: no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_0=/*#__PURE__*/createServerReference(\"40eceea36d09c66186e2e22846958f0580ef0847ad\",callServer,void 0,findSourceMapURL,\"contribute\");export{$$RSC_SERVER_ACTION_0 as contribute};"],"names":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WAE1G,CAAY,CAAC,EAAO,CAAC,KAAK,EARtB,WAaA,IAAZ,EAAwB,KAAO,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,CAAM,CAAA,CAAC,QAAS,EAAS,SAAS,CAAA,CAAA,MAGzE"}
1
+ {"version":3,"sources":["../../../../../web/features/meeting/state/meeting-controls.tsx","../../../../../web/features/meeting/hooks/data%3Af9861f%20%3Ctext/javascript%3E","../../../../../web/features/meeting/hooks/data%3Ab3018b%20%3Ctext/javascript%3E"],"sourcesContent":["'use client';\n\nimport { useRouter } from 'next/navigation';\nimport { useState, useTransition } from 'react';\n\nimport { ActionButton } from '../../bridge/ui/action-button';\nimport { Notice } from '../../bridge/ui/notice';\nimport type { ActionOutcome } from '../../bridge/hooks/bridge-actions';\nimport { changeMic, contribute, type OwnMicChange } from '../hooks/meeting-actions';\nimport type { MeetingControl } from '../services/meeting';\n\n/** Each mic control's words, and what it says while it works. */\nconst MIC_CONTROLS: Record<OwnMicChange, { label: string; pending: string }> = {\n request: { label: 'Request the mic', pending: 'Requesting...' },\n withdraw: { label: 'Withdraw my request', pending: 'Withdrawing...' },\n release: { label: 'Release the mic', pending: 'Releasing...' },\n};\n\n/**\n * What the person may do in the meeting now: write a contribution while they\n * hold the mic or moderate, and their own mic calls. A draft keeps one key\n * until it is taken, so a contribution tried again goes once. The page reads\n * itself again after each call.\n */\nexport function MeetingControls({ fleetId, meetingId, controls }: { fleetId: string; meetingId: string; controls: readonly MeetingControl[] }) {\n const router = useRouter();\n const [text, setText] = useState('');\n const [draftKey, setDraftKey] = useState(() => crypto.randomUUID());\n const [working, setWorking] = useState<MeetingControl | undefined>();\n const [failure, setFailure] = useState<string | undefined>();\n const [, startTransition] = useTransition();\n\n const run = ({ control, action, onDone }: { control: MeetingControl; action: () => Promise<ActionOutcome<undefined>>; onDone?: () => void }) => {\n setWorking(control);\n setFailure(undefined);\n startTransition(async () => {\n const outcome = await action();\n setWorking(undefined);\n if (outcome.isOk) {\n onDone?.();\n router.refresh();\n } else {\n setFailure(outcome.message);\n }\n });\n };\n\n const isWorking = working !== undefined;\n const micControls = controls.filter((control): control is OwnMicChange => control !== 'contribute');\n return (\n <div className=\"grid gap-3\">\n {controls.includes('contribute') ? (\n <div className=\"grid gap-2\">\n <label className=\"grid gap-1\">\n <span>Your contribution</span>\n <textarea\n data-testid=\"meeting-text\"\n rows={4}\n value={text}\n onChange={(event) => { setText(event.target.value); }}\n className=\"rounded-md border border-input bg-background p-2\"\n />\n </label>\n <ActionButton\n data-testid=\"meeting-contribute\"\n variant=\"primary\"\n className=\"justify-self-start\"\n isPending={working === 'contribute'}\n pendingLabel=\"Sending...\"\n disabled={isWorking}\n onClick={() => {\n run({\n control: 'contribute',\n action: () => contribute({ fleet: fleetId, meetingId, text, idempotencyKey: draftKey }),\n onDone: () => {\n setText('');\n setDraftKey(crypto.randomUUID());\n },\n });\n }}\n >\n Contribute\n </ActionButton>\n </div>\n ) : null}\n {micControls.length === 0 ? null : (\n <div className=\"flex flex-wrap gap-2\">\n {micControls.map((change) => (\n <ActionButton\n key={change}\n data-testid={`meeting-${change}`}\n variant={change === 'request' ? 'primary' : 'secondary'}\n isPending={working === change}\n pendingLabel={MIC_CONTROLS[change].pending}\n disabled={isWorking}\n onClick={() => { run({ control: change, action: () => changeMic({ fleet: fleetId, meetingId, change }) }); }}\n >\n {MIC_CONTROLS[change].label}\n </ActionButton>\n ))}\n </div>\n )}\n {failure === undefined ? null : <Notice message={failure} isFailure />}\n </div>\n );\n}\n","/* __next_internal_action_entry_do_not_use__ [{\"405b99b33f3bd9c0e07e8fa8a7c900e837867a13a5\":{\"name\":\"changeMic\"}},\"web/features/meeting/hooks/meeting-actions.ts\",\"\"] */\"use turbopack: no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_1=/*#__PURE__*/createServerReference(\"405b99b33f3bd9c0e07e8fa8a7c900e837867a13a5\",callServer,void 0,findSourceMapURL,\"changeMic\");export{$$RSC_SERVER_ACTION_1 as changeMic};","/* __next_internal_action_entry_do_not_use__ [{\"4099f3dd3225a78c2f89af8d9b49f34183019421d2\":{\"name\":\"contribute\"}},\"web/features/meeting/hooks/meeting-actions.ts\",\"\"] */\"use turbopack: no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_0=/*#__PURE__*/createServerReference(\"4099f3dd3225a78c2f89af8d9b49f34183019421d2\",callServer,void 0,findSourceMapURL,\"contribute\");export{$$RSC_SERVER_ACTION_0 as contribute};"],"names":["$$RSC_SERVER_ACTION_1"],"mappings":"uDAEA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OAEA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OCNyM,EAAA,EAAA,CAAA,CAAA,MAAsG,IAAMA,EAAmC,CAAA,EAAA,EAAA,iBAAb,IAAa,AAAqB,EAAC,KAAxB,wCAAqE,EAAA,UAAU,CAAC,KAAK,EAAE,EAAA,gBAAgB,CAAC,aCAxI,EAAmC,CAAA,EAAA,EAAA,iBAAb,IAAa,AAAqB,EAAC,KAAxB,wCAAqE,EAAA,UAAU,CAAC,KAAK,EAAE,EAAA,gBAAgB,CAAC,cFYzb,EAAyE,CAC7E,QAAS,CAAE,MAAO,kBAAmB,QAAS,eAAgB,EAC9D,SAAU,CAAE,MAAO,sBAAuB,QAAS,gBAAiB,EACpE,QAAS,CAAE,MAAO,kBAAmB,QAAS,cAAe,CAC/D,2BAQO,SAAS,AAAgB,CAAE,SAAO,CAAE,WAAS,UAAE,CAAQ,CAA+E,EAC3I,IAAM,EAAS,CAAA,EAAA,EAAA,SAAS,AAAT,IACT,CAAC,EAAM,EAAQ,CAAG,CAAA,EAAA,EAAA,QAAA,AAAQ,EAAC,IAC3B,CAAC,EAAU,EAAY,CAAG,CAAA,EAAA,EAAA,QAAA,AAAQ,EAAC,IAAM,OAAO,UAA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EAAC,MAAA,CAAI,UAAU,gCACZ,EAAY,GAAG,CAAC,AAAC,GAChB,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,CAAY,CAAA,CAEX,cAAa,CAAC,QAAQ,EAAE,EAAA,CAAQ,CAChC,QAAoB,YAAX,EAAuB,UAAY,YAC5C,UAAW,IAAY,EACvB,aAAc,CAAY,CAAC,EAAO,CAAC,OAAO,CAC1C,SAAU,EACV,QAAS,KAAQ,EAAI,CAAE,QAAS,EAAQ,OAAQ,IAAM,EAAU,CAAE,MAAO,YAAS,SAAW,CAAO,EAAG,EAAI,WAE1G,CAAY,CAAC,EAAO,CAAC,KAAK,EARtB,WAaA,IAAZ,EAAwB,KAAO,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,CAAM,CAAA,CAAC,QAAS,EAAS,SAAS,CAAA,CAAA,MAGzE"}
@@ -1,3 +1,3 @@
1
- module.exports=[18434,a=>{"use strict";var b=a.i(87924),c=a.i(97024),d=a.i(72131),e=a.i(30587),f=a.i(88412),g=a.i(36855),h=a.i(77237),i=a.i(5050);let j=(0,i.createServerReference)("60ae449a18b0b6dee162a9e39ce03ccba4f6d50d9a",i.callServer,void 0,i.findSourceMapURL,"switchOutsideParties");var k=a.i(47763);a.s(["SwitchCard",0,function({isOn:a,canSwitch:i,fleetId:l}){let[m,n]=(0,d.useActionState)(j,e.Q);return(0,b.jsxs)("section",{className:`${f.E} grid gap-1.5`,"data-testid":"outside-parties-switch",children:[(0,b.jsxs)("h2",{className:"flex items-center gap-2 font-semibold",children:["Outside parties are ",a?"on":"off"," ",a?(0,b.jsx)(k.T,{tone:"ok",label:"On",look:"flat",icon:(0,b.jsx)(c.f,{"aria-hidden":!0,className:"size-3.5"})}):(0,b.jsx)(k.T,{tone:"ended",label:"Off",look:"flat"})]}),(0,b.jsx)("p",{className:"text-meta text-muted-foreground",children:a?"Approved outside MCP servers and clients reach the fleet, as its network rules allow.":"No outside MCP server or client reaches the fleet, and no request for one can be approved."}),"openNetwork"===m.kind?(0,b.jsxs)("form",{action:n,role:"alert",className:"grid gap-3 rounded-md border border-tone-attention-border bg-tone-attention-bg p-4 text-tone-attention-fg",children:[(0,b.jsx)("h3",{className:"font-semibold",children:"Open network"}),(0,b.jsx)("p",{children:m.message}),(0,b.jsx)("input",{type:"hidden",name:e.H,value:l}),(0,b.jsx)("input",{type:"hidden",name:"isOn",value:"true"}),(0,b.jsx)("input",{type:"hidden",name:"isOpenNetworkConfirmed",value:"true"}),(0,b.jsxs)("div",{className:"flex gap-2",children:[(0,b.jsx)(h.f,{kind:"destructive",pending:"Turning on…",testId:"outside-parties-turn-on-anyway",children:"Turn on anyway"}),(0,b.jsx)("a",{className:f.x.secondary,href:"",children:"Keep off"})]})]}):i?(0,b.jsxs)("form",{action:n,children:[(0,b.jsx)("input",{type:"hidden",name:e.H,value:l}),(0,b.jsx)("input",{type:"hidden",name:"isOn",value:String(!a)}),(0,b.jsx)(h.f,{kind:a?"secondary":"primary",pending:a?"Turning off…":"Turning on…",testId:"outside-parties-turn",children:a?"Turn off":"Turn on"})]}):(0,b.jsxs)("p",{className:"text-meta text-muted-foreground",children:["Turning them on or off needs ","fleet:network","."]}),"openNetwork"===m.kind?null:(0,b.jsx)(g.f,{state:m})]})}],18434)}];
1
+ module.exports=[18434,a=>{"use strict";var b=a.i(87924),c=a.i(97024),d=a.i(72131),e=a.i(30587),f=a.i(88412),g=a.i(36855),h=a.i(77237),i=a.i(5050);let j=(0,i.createServerReference)("60d09a20ba0206bc7335d5ad5a4719505d297b30d8",i.callServer,void 0,i.findSourceMapURL,"switchOutsideParties");var k=a.i(47763);a.s(["SwitchCard",0,function({isOn:a,canSwitch:i,fleetId:l}){let[m,n]=(0,d.useActionState)(j,e.Q);return(0,b.jsxs)("section",{className:`${f.E} grid gap-1.5`,"data-testid":"outside-parties-switch",children:[(0,b.jsxs)("h2",{className:"flex items-center gap-2 font-semibold",children:["Outside parties are ",a?"on":"off"," ",a?(0,b.jsx)(k.T,{tone:"ok",label:"On",look:"flat",icon:(0,b.jsx)(c.f,{"aria-hidden":!0,className:"size-3.5"})}):(0,b.jsx)(k.T,{tone:"ended",label:"Off",look:"flat"})]}),(0,b.jsx)("p",{className:"text-meta text-muted-foreground",children:a?"Approved outside MCP servers and clients reach the fleet, as its network rules allow.":"No outside MCP server or client reaches the fleet, and no request for one can be approved."}),"openNetwork"===m.kind?(0,b.jsxs)("form",{action:n,role:"alert",className:"grid gap-3 rounded-md border border-tone-attention-border bg-tone-attention-bg p-4 text-tone-attention-fg",children:[(0,b.jsx)("h3",{className:"font-semibold",children:"Open network"}),(0,b.jsx)("p",{children:m.message}),(0,b.jsx)("input",{type:"hidden",name:e.H,value:l}),(0,b.jsx)("input",{type:"hidden",name:"isOn",value:"true"}),(0,b.jsx)("input",{type:"hidden",name:"isOpenNetworkConfirmed",value:"true"}),(0,b.jsxs)("div",{className:"flex gap-2",children:[(0,b.jsx)(h.f,{kind:"destructive",pending:"Turning on…",testId:"outside-parties-turn-on-anyway",children:"Turn on anyway"}),(0,b.jsx)("a",{className:f.x.secondary,href:"",children:"Keep off"})]})]}):i?(0,b.jsxs)("form",{action:n,children:[(0,b.jsx)("input",{type:"hidden",name:e.H,value:l}),(0,b.jsx)("input",{type:"hidden",name:"isOn",value:String(!a)}),(0,b.jsx)(h.f,{kind:a?"secondary":"primary",pending:a?"Turning off…":"Turning on…",testId:"outside-parties-turn",children:a?"Turn off":"Turn on"})]}):(0,b.jsxs)("p",{className:"text-meta text-muted-foreground",children:["Turning them on or off needs ","fleet:network","."]}),"openNetwork"===m.kind?null:(0,b.jsx)(g.f,{state:m})]})}],18434)}];
2
2
 
3
3
  //# sourceMappingURL=web_features_outside-parties_ui_switch-card_tsx_1_xnu9bm4tc-_._.js.map