@aeolus-fleet/gateway 0.36.0 → 0.36.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/person-waiters.js +3 -1
- package/dist/person-waiters.js.map +1 -1
- package/package.json +1 -1
- package/web/.next/BUILD_ID +1 -1
- package/web/.next/build-manifest.json +3 -3
- package/web/.next/diagnostics/route-bundle-stats.json +40 -40
- package/web/.next/fallback-build-manifest.json +3 -3
- package/web/.next/prerender-manifest.json +3 -3
- package/web/.next/server/app/(console)/bridge/basket/page/server-reference-manifest.json +7 -7
- package/web/.next/server/app/(console)/bridge/basket/page.js.nft.json +1 -1
- package/web/.next/server/app/(console)/bridge/basket/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(console)/bridge/done/page/server-reference-manifest.json +7 -7
- package/web/.next/server/app/(console)/bridge/done/page.js.nft.json +1 -1
- package/web/.next/server/app/(console)/bridge/done/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(console)/bridge/page/server-reference-manifest.json +6 -6
- package/web/.next/server/app/(console)/bridge/page.js.nft.json +1 -1
- package/web/.next/server/app/(console)/bridge/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(console)/bridge/settings/page/server-reference-manifest.json +1 -1
- package/web/.next/server/app/(console)/bridge/settings/page.js.nft.json +1 -1
- package/web/.next/server/app/(console)/bridge/settings/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(console)/bridge/settings/requests/[requestId]/page/server-reference-manifest.json +2 -2
- package/web/.next/server/app/(console)/bridge/settings/requests/[requestId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(console)/bridge/settings/requests/[requestId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(console)/bridge/settings/routing/page/server-reference-manifest.json +5 -5
- package/web/.next/server/app/(console)/bridge/settings/routing/page.js.nft.json +1 -1
- package/web/.next/server/app/(console)/bridge/settings/routing/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(console)/gateway-off/page/server-reference-manifest.json +1 -1
- package/web/.next/server/app/(console)/gateway-off/page.js.nft.json +1 -1
- package/web/.next/server/app/(console)/gateway-off/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(console)/meetings/[meetingId]/page/server-reference-manifest.json +3 -3
- package/web/.next/server/app/(console)/meetings/[meetingId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(console)/meetings/[meetingId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(console)/outside-parties/[name]/change/page/server-reference-manifest.json +17 -17
- package/web/.next/server/app/(console)/outside-parties/[name]/change/page.js.nft.json +1 -1
- package/web/.next/server/app/(console)/outside-parties/[name]/change/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(console)/outside-parties/[name]/page/server-reference-manifest.json +8 -8
- package/web/.next/server/app/(console)/outside-parties/[name]/page.js.nft.json +1 -1
- package/web/.next/server/app/(console)/outside-parties/[name]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(console)/outside-parties/[name]/retire/page/server-reference-manifest.json +17 -17
- package/web/.next/server/app/(console)/outside-parties/[name]/retire/page.js.nft.json +1 -1
- package/web/.next/server/app/(console)/outside-parties/[name]/retire/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(console)/outside-parties/add/page/server-reference-manifest.json +10 -10
- package/web/.next/server/app/(console)/outside-parties/add/page.js.nft.json +1 -1
- package/web/.next/server/app/(console)/outside-parties/add/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(console)/outside-parties/add-a2a-agent/page/server-reference-manifest.json +2 -2
- package/web/.next/server/app/(console)/outside-parties/add-a2a-agent/page.js.nft.json +1 -1
- package/web/.next/server/app/(console)/outside-parties/add-a2a-agent/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(console)/outside-parties/add-a2a-client/page/server-reference-manifest.json +2 -2
- package/web/.next/server/app/(console)/outside-parties/add-a2a-client/page.js.nft.json +1 -1
- package/web/.next/server/app/(console)/outside-parties/add-a2a-client/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(console)/outside-parties/page/server-reference-manifest.json +2 -2
- package/web/.next/server/app/(console)/outside-parties/page.js.nft.json +1 -1
- package/web/.next/server/app/(console)/outside-parties/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(console)/parties/page/server-reference-manifest.json +9 -9
- package/web/.next/server/app/(console)/parties/page.js.nft.json +1 -1
- package/web/.next/server/app/(console)/parties/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(console)/sign-in/failed/page/server-reference-manifest.json +1 -1
- package/web/.next/server/app/(console)/sign-in/failed/page.js.nft.json +1 -1
- package/web/.next/server/app/(console)/sign-in/failed/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(console)/slack/disconnect/page/server-reference-manifest.json +11 -11
- package/web/.next/server/app/(console)/slack/disconnect/page.js.nft.json +1 -1
- package/web/.next/server/app/(console)/slack/disconnect/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(console)/slack/expose/page/server-reference-manifest.json +11 -11
- package/web/.next/server/app/(console)/slack/expose/page.js.nft.json +1 -1
- package/web/.next/server/app/(console)/slack/expose/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(console)/slack/page/server-reference-manifest.json +11 -11
- package/web/.next/server/app/(console)/slack/page.js.nft.json +1 -1
- package/web/.next/server/app/(console)/slack/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(console)/slack/remove/page/server-reference-manifest.json +11 -11
- package/web/.next/server/app/(console)/slack/remove/page.js.nft.json +1 -1
- package/web/.next/server/app/(console)/slack/remove/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/_global-error.html +1 -1
- package/web/.next/server/app/_global-error.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/web/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
- package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/authorize/failed/page/server-reference-manifest.json +1 -1
- package/web/.next/server/app/authorize/failed/page.js.nft.json +1 -1
- package/web/.next/server/app/authorize/failed/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/authorize/pick/page/server-reference-manifest.json +1 -1
- package/web/.next/server/app/authorize/pick/page.js.nft.json +1 -1
- package/web/.next/server/app/authorize/pick/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/authorize/waiting/approval/page/server-reference-manifest.json +1 -1
- package/web/.next/server/app/authorize/waiting/approval/page.js.nft.json +1 -1
- package/web/.next/server/app/authorize/waiting/approval/page_client-reference-manifest.js +1 -1
- package/web/.next/server/chunks/ssr/01fr_app_(console)_bridge_settings_requests_[requestId]_page_actions_1au-p5lgnv5e-.js +1 -1
- package/web/.next/server/chunks/ssr/01fr_app_(console)_bridge_settings_requests_[requestId]_page_actions_1au-p5lgnv5e-.js.map +1 -1
- package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_bridge_settings_routing_page_actions_136lm_jip4d_x.js +1 -1
- package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_bridge_settings_routing_page_actions_136lm_jip4d_x.js.map +1 -1
- package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_outside-parties_[name]_change_page_actions_04td11fxohsfm.js +1 -1
- package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_outside-parties_[name]_change_page_actions_04td11fxohsfm.js.map +1 -1
- package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_outside-parties_[name]_page_actions_0u-45itza1ls7.js +1 -1
- package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_outside-parties_[name]_page_actions_0u-45itza1ls7.js.map +1 -1
- package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_outside-parties_[name]_retire_page_actions_0s7ps6i0ts7v5.js +1 -1
- package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_outside-parties_[name]_retire_page_actions_0s7ps6i0ts7v5.js.map +1 -1
- package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_outside-parties_add-a2a-client_page_actions_0d_wgiu94c32e.js +1 -1
- package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_outside-parties_add-a2a-client_page_actions_0d_wgiu94c32e.js.map +1 -1
- package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_outside-parties_add_page_actions_0yfz_dfn-8uo7.js +1 -1
- package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_outside-parties_add_page_actions_0yfz_dfn-8uo7.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__001xx3sm5ur-e._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__001xx3sm5ur-e._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0a6a1yc_ac-qt._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0a8db18tyk__5._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0a8db18tyk__5._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0k3g0p3t9t0c-._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0k3g0p3t9t0c-._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__10s9e8g5x-ws8._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__10s9e8g5x-ws8._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__13yoncr_nx3jc._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__13yoncr_nx3jc._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__18-8taiduk1jn._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__18-8taiduk1jn._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__18v7b5ga58a9n._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__1qpow96uit9t8._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__1qpow96uit9t8._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_00hfzlqn1og18._.js +1 -1
- package/web/.next/server/chunks/ssr/_00hfzlqn1og18._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_0a_nsm-ye2r6v._.js +1 -1
- package/web/.next/server/chunks/ssr/_0a_nsm-ye2r6v._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_0ka_9elusb800._.js +1 -1
- package/web/.next/server/chunks/ssr/_0ka_9elusb800._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_0pyd1_y7w8ngp._.js +1 -1
- package/web/.next/server/chunks/ssr/_0pyd1_y7w8ngp._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_0xickgbbju_9-._.js +1 -1
- package/web/.next/server/chunks/ssr/_0xickgbbju_9-._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_10-gn6g9yc63s._.js +3 -0
- package/web/.next/server/chunks/ssr/{_0swrejvekuzfx._.js.map → _10-gn6g9yc63s._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_177fdczus39s7._.js +3 -0
- package/web/.next/server/chunks/ssr/{_1qdpkpsskm5wj._.js.map → _177fdczus39s7._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_1_wav28san6dm._.js +1 -1
- package/web/.next/server/chunks/ssr/_1e2o809f0ekry._.js +1 -1
- package/web/.next/server/chunks/ssr/_1pjtire7rqla0._.js +1 -1
- package/web/.next/server/chunks/ssr/_1pjtire7rqla0._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_1qbsmlji34yph._.js +1 -1
- package/web/.next/server/chunks/ssr/_1qbsmlji34yph._.js.map +1 -1
- package/web/.next/server/chunks/ssr/web_0wys4l6za8umr._.js +1 -1
- package/web/.next/server/chunks/ssr/web_0wys4l6za8umr._.js.map +1 -1
- package/web/.next/server/chunks/ssr/web__next-internal_server_app_(console)_bridge_basket_page_actions_102xk3g8eko_q.js +1 -1
- package/web/.next/server/chunks/ssr/web__next-internal_server_app_(console)_bridge_basket_page_actions_102xk3g8eko_q.js.map +1 -1
- package/web/.next/server/chunks/ssr/web__next-internal_server_app_(console)_bridge_done_page_actions_0mm90xd2feta2.js +1 -1
- package/web/.next/server/chunks/ssr/web__next-internal_server_app_(console)_bridge_done_page_actions_0mm90xd2feta2.js.map +1 -1
- package/web/.next/server/chunks/ssr/web__next-internal_server_app_(console)_bridge_page_actions_082880qz6xa5k.js +1 -1
- package/web/.next/server/chunks/ssr/web__next-internal_server_app_(console)_bridge_page_actions_082880qz6xa5k.js.map +1 -1
- package/web/.next/server/chunks/ssr/web_features_16cy3vmcijydk._.js +3 -0
- package/web/.next/server/chunks/ssr/{web_features_1je122n6carea._.js.map → web_features_16cy3vmcijydk._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/web_features_1iiqi6dhrst33._.js +3 -0
- package/web/.next/server/chunks/ssr/{web_features_1nrnskep6p8ci._.js.map → web_features_1iiqi6dhrst33._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/web_features_add-a2a-agent_ui_a2a-agent-form_tsx_0z8t1aalwzyl7._.js +1 -1
- package/web/.next/server/chunks/ssr/web_features_add-a2a-agent_ui_a2a-agent-form_tsx_0z8t1aalwzyl7._.js.map +1 -1
- package/web/.next/server/chunks/ssr/web_features_add-a2a-client_ui_a2a-client-form_tsx_1anv88g385nwe._.js +1 -1
- package/web/.next/server/chunks/ssr/web_features_add-a2a-client_ui_a2a-client-form_tsx_1anv88g385nwe._.js.map +1 -1
- package/web/.next/server/chunks/ssr/web_features_add-server_ui_add-server_tsx_1jnmar5xju49k._.js +1 -1
- package/web/.next/server/chunks/ssr/web_features_add-server_ui_add-server_tsx_1jnmar5xju49k._.js.map +1 -1
- package/web/.next/server/chunks/ssr/web_features_bridge_hooks_bridge-actions_ts_0h-_xm2rcb-ij._.js +1 -1
- package/web/.next/server/chunks/ssr/web_features_bridge_state_0354e3wb0dzx1._.js +1 -1
- package/web/.next/server/chunks/ssr/web_features_bridge_state_0354e3wb0dzx1._.js.map +1 -1
- package/web/.next/server/chunks/ssr/web_features_bridge_state_basket-panel_tsx_1qi_kzld0rfgs._.js +1 -1
- package/web/.next/server/chunks/ssr/web_features_bridge_state_basket-panel_tsx_1qi_kzld0rfgs._.js.map +1 -1
- package/web/.next/server/chunks/ssr/web_features_bridge_state_decision-panel_tsx_1mzsixgc8zuxc._.js +1 -1
- package/web/.next/server/chunks/ssr/web_features_bridge_state_decision-panel_tsx_1mzsixgc8zuxc._.js.map +1 -1
- package/web/.next/server/chunks/ssr/web_features_bridge_state_done-panel_tsx_1m844-qb1z9p_._.js +1 -1
- package/web/.next/server/chunks/ssr/web_features_bridge_state_done-panel_tsx_1m844-qb1z9p_._.js.map +1 -1
- package/web/.next/server/chunks/ssr/web_features_frame_ui_gateway-header_tsx_0e9tekx4jf7ng._.js +1 -1
- package/web/.next/server/chunks/ssr/web_features_frame_ui_gateway-header_tsx_0e9tekx4jf7ng._.js.map +1 -1
- package/web/.next/server/chunks/ssr/web_features_meeting_state_meeting-controls_tsx_12g4kzk2mbvvz._.js +1 -1
- package/web/.next/server/chunks/ssr/web_features_meeting_state_meeting-controls_tsx_12g4kzk2mbvvz._.js.map +1 -1
- package/web/.next/server/chunks/ssr/web_features_outside-parties_ui_switch-card_tsx_1_xnu9bm4tc-_._.js +1 -1
- package/web/.next/server/chunks/ssr/web_features_outside-parties_ui_switch-card_tsx_1_xnu9bm4tc-_._.js.map +1 -1
- package/web/.next/server/chunks/ssr/web_features_outside-party_actions_ts_102ar5pdowf8s._.js +1 -1
- package/web/.next/server/chunks/ssr/web_features_parties_actions_ts_0r-tbfsig2ty-._.js +1 -1
- package/web/.next/server/chunks/ssr/web_features_slack_actions_ts_1l3yg9vl20_vu._.js +1 -1
- package/web/.next/server/middleware-build-manifest.js +3 -3
- package/web/.next/server/pages/500.html +1 -1
- package/web/.next/server/preview-props.json +3 -3
- package/web/.next/server/server-reference-manifest.js +1 -1
- package/web/.next/server/server-reference-manifest.json +50 -50
- package/web/.next/static/chunks/0az9upwm-8_q9.js +1 -0
- package/web/.next/static/chunks/0gbozvd_yh421.js +1 -0
- package/web/.next/static/chunks/{1lyv8ukt_q3ph.js → 0l9_oie6xi0kd.js} +1 -1
- package/web/.next/static/chunks/{3rt603msircrl.js → 0m512dxdcrv-b.js} +1 -1
- package/web/.next/static/chunks/{2799kv0y5g2va.js → 1485slb5zus5p.js} +1 -1
- package/web/.next/static/chunks/{36fnm0ezsx1eh.js → 24olc0btcvn7q.js} +1 -1
- package/web/.next/static/chunks/{1ymfhxs-xqiy6.js → 296w-74ry5lzk.js} +1 -1
- package/web/.next/static/chunks/{40j58bya72xh1.js → 2z2auwx1s2mgl.js} +1 -1
- package/web/.next/static/chunks/{0fu7je2vzzzh7.js → 397zvdr6xr5pq.js} +1 -1
- package/web/.next/static/chunks/{3hvw5n04pbwg8.js → 3db90zxmny2y-.js} +1 -1
- package/web/.next/static/chunks/{322fzslly9wpf.js → 3x0p-z3zdrk_b.js} +1 -1
- package/web/.next/static/chunks/{1ehmzxr697ifa.js → 3yq9jt4p_0uid.js} +1 -1
- package/web/.next/trace +1 -1
- package/web/.next/trace-build +1 -1
- package/web/.next/server/chunks/ssr/_0swrejvekuzfx._.js +0 -3
- package/web/.next/server/chunks/ssr/_1qdpkpsskm5wj._.js +0 -3
- package/web/.next/server/chunks/ssr/web_features_1je122n6carea._.js +0 -3
- package/web/.next/server/chunks/ssr/web_features_1nrnskep6p8ci._.js +0 -3
- package/web/.next/static/chunks/2jr8r6g9kk42a.js +0 -1
- package/web/.next/static/chunks/3f2trjz7_wrzh.js +0 -1
- /package/web/.next/static/{IMWKx2sJwt7EwwpStr8tb → CMppMkysNciqc8k4TWwia}/_buildManifest.js +0 -0
- /package/web/.next/static/{IMWKx2sJwt7EwwpStr8tb → CMppMkysNciqc8k4TWwia}/_clientMiddlewareManifest.js +0 -0
- /package/web/.next/static/{IMWKx2sJwt7EwwpStr8tb → CMppMkysNciqc8k4TWwia}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,57228,e=>{e.s(["H",0,"/bridge/basket","T",0,"/bridge/settings"])},95893,e=>{var r=e.i(43476),n=e.i(18566),s=e.i(71645),i=e.i(95187);let a=(0,i.createServerReference)("
|
|
1
|
+
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,57228,e=>{e.s(["H",0,"/bridge/basket","T",0,"/bridge/settings"])},95893,e=>{var r=e.i(43476),n=e.i(18566),s=e.i(71645),i=e.i(95187);let a=(0,i.createServerReference)("4013cfcec33d2651e37d34a8c0cd6f4b7e2f79d5b8",i.callServer,void 0,i.findSourceMapURL,"decideRequest");var t=e.i(57228),d=e.i(88374),l=e.i(65818);let c=["messages:send","messages:receive"],o={"messages:send":"Send","messages:receive":"Receive","fleet:read":"Read the fleet"};var u=e.i(55070),p=e.i(63132);let m="rounded-md border border-input bg-background px-2 py-1.5";function b({scope:e,isLocked:n}){return(0,r.jsxs)("label",{className:"flex items-center gap-2",children:[n?(0,r.jsx)("input",{type:"checkbox",checked:!0,disabled:!0,"aria-label":o[e]??e}):(0,r.jsx)("input",{type:"checkbox",name:"scope",value:e,"aria-label":o[e]??e}),(0,r.jsx)("span",{children:o[e]??e}),(0,r.jsx)("span",{className:"font-mono text-caption text-muted-foreground",children:e}),n?(0,r.jsx)("span",{className:"text-caption text-muted-foreground",children:"(always)"}):null]})}function g(e,r){let n=e.get(r);return"string"==typeof n?n:""}function h({request:e,heldScopes:n,owners:i,working:a,failure:t,onDecide:o}){let[x,f]=(0,s.useState)("bearer"),v=function(e){switch(e.subject.kind){case"client":return e.subject.clientName;case"server":return URL.canParse(e.subject.url)?new URL(e.subject.url).host:e.subject.url}}(e),j="server"===e.subject.kind;return(0,r.jsxs)("section",{className:"grid gap-3 rounded-lg border border-border bg-card p-6 text-card-foreground shadow-sm",children:[(0,r.jsxs)("h2",{className:"text-heading font-semibold",children:["Approve ",v]}),(0,r.jsxs)("form",{onSubmit:e=>{e.preventDefault();let r=new FormData(e.currentTarget),n=r.getAll("scope").filter(e=>"string"==typeof e);o({kind:"approve",name:g(r,"name"),ownerShipId:g(r,"ownerShipId"),scopes:n,server:j?{credentialKind:(0,d.C)(g(r,"credentialKind")),token:g(r,"token"),clientId:g(r,"clientId"),clientSecret:g(r,"clientSecret"),issuer:g(r,"issuer"),scope:g(r,"scope-requested"),concurrencyLimit:Number(g(r,"concurrencyLimit"))}:void 0})},className:"grid gap-3",children:[(0,r.jsxs)("label",{className:"grid gap-1",children:[(0,r.jsx)("span",{children:"Proxy ship's name"}),(0,r.jsx)("input",{name:"name",defaultValue:v.toLowerCase().replaceAll(/[^a-z0-9]+/g,"-").replaceAll(/^-+|-+$/g,""),required:!0,className:m})]}),(0,r.jsx)(l.f,{choices:i.isOk?i.value:[],current:null,help:"A person ship or argo. It answers for this party.",refusal:i.isOk?void 0:i.refusal}),(0,r.jsxs)("fieldset",{className:"grid gap-1",children:[(0,r.jsx)("legend",{children:"Scopes"}),c.map(e=>(0,r.jsx)(b,{scope:e,isLocked:!0},e)),n.filter(e=>!c.includes(e)).map(e=>(0,r.jsx)(b,{scope:e,isLocked:!1},e))]}),j?(0,r.jsxs)("fieldset",{className:"grid gap-2",children:[(0,r.jsx)("legend",{children:"The server's credential"}),(0,r.jsxs)("label",{className:"grid gap-1",children:[(0,r.jsx)("span",{children:"Credential"}),(0,r.jsx)("select",{name:"credentialKind",value:x,onChange:e=>{f((0,d.C)(e.target.value))},className:m,children:d.x.map(({kind:e,label:n})=>(0,r.jsx)("option",{value:e,children:n},e))})]}),"none"===x?null:"bearer"===x?(0,r.jsxs)("label",{className:"grid gap-1",children:[(0,r.jsx)("span",{children:"Bearer token"}),(0,r.jsx)("input",{type:"password",name:"token",className:m})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("label",{className:"grid gap-1",children:[(0,r.jsx)("span",{children:"Client id"}),(0,r.jsx)("input",{name:"clientId",className:m})]}),(0,r.jsxs)("label",{className:"grid gap-1",children:[(0,r.jsx)("span",{children:"Client secret"}),(0,r.jsx)("input",{type:"password",name:"clientSecret",className:m})]}),(0,r.jsxs)("label",{className:"grid gap-1",children:[(0,r.jsx)("span",{children:"Issuer"}),(0,r.jsx)("input",{type:"url",name:"issuer",className:m})]}),(0,r.jsxs)("label",{className:"grid gap-1",children:[(0,r.jsx)("span",{children:"Scope"}),(0,r.jsx)("input",{name:"scope-requested",className:m})]})]}),(0,r.jsxs)("label",{className:"grid gap-1",children:[(0,r.jsx)("span",{children:"Calls at once"}),(0,r.jsx)("input",{type:"number",name:"concurrencyLimit",min:1,max:10,defaultValue:4,className:m})]})]}):null,void 0===t?null:(0,r.jsx)(p.f,{message:t,isFailure:!0}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(u.f,{type:"submit",variant:"primary","data-testid":"bridge-approve",isPending:"approve"===a,pendingLabel:"Approving...",disabled:void 0!==a,children:"Approve"}),(0,r.jsx)(u.f,{type:"button","data-testid":"bridge-deny",isPending:"deny"===a,pendingLabel:"Denying...",disabled:void 0!==a,onClick:()=>{o({kind:"deny"})},children:"Deny"})]})]})]})}e.s(["DecisionPanel",0,function({fleetId:e,request:i,heldScopes:d,owners:l}){let c=(0,n.useRouter)(),[o,u]=(0,s.useState)(),[p,m]=(0,s.useState)(),[,b]=(0,s.useTransition)();return(0,r.jsx)(h,{request:i,heldScopes:d,owners:l,working:o,failure:p,onDecide:r=>{u(r.kind),m(void 0),b(async()=>{let n=await a({fleet:e,requestId:i.requestId,input:r});n.isOk?c.push(`${t.T}?${new URLSearchParams({fleet:e,decided:r.kind}).toString()}`):(u(void 0),m(n.message))})}})}],95893)},10629,e=>{var r=e.i(71645),n=e.i(18566);e.s(["LiveRefresh",0,function({fleetId:e}){let s;return s=(0,n.useRouter)(),(0,r.useEffect)(()=>{let r=new EventSource(`/bridge/changes?fleet=${encodeURIComponent(e)}`);return r.onmessage=()=>{s.refresh()},()=>{r.close()}},[e,s]),(0,r.useEffect)(()=>{let r,n=()=>{let n="visible"===document.visibilityState&&document.hasFocus();n&&void 0===r?r=new EventSource(`/bridge/focus?fleet=${encodeURIComponent(e)}`):n||void 0===r||(r.close(),r=void 0)};return n(),window.addEventListener("focus",n),window.addEventListener("blur",n),document.addEventListener("visibilitychange",n),()=>{window.removeEventListener("focus",n),window.removeEventListener("blur",n),document.removeEventListener("visibilitychange",n),r?.close()}},[e]),null}],10629)},55070,e=>{var r=e.i(43476);let n={primary:"bg-primary text-primary-foreground hover:bg-primary-hover",secondary:"border border-border bg-card text-card-foreground hover:bg-accent"};e.s(["f",0,function({isPending:e,pendingLabel:s,variant:i="secondary",children:a,className:t="",disabled:d,...l}){return(0,r.jsx)("button",{...l,disabled:!0===d||e,"aria-busy":e,className:`inline-flex h-9 items-center gap-2 rounded-md px-4 disabled:cursor-not-allowed disabled:opacity-70 ${n[i]} ${t}`,children:e?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{"aria-hidden":"true",className:"size-3.5 animate-spin rounded-full border-2 border-current border-t-transparent"}),s]}):a})}])},63132,e=>{var r=e.i(43476);e.s(["f",0,function({message:e,isFailure:n}){return n?(0,r.jsx)("p",{role:"alert","data-testid":"bridge-failure",className:"rounded-md border border-tone-attention-border bg-tone-attention-bg px-3 py-2 text-tone-attention-fg",children:e}):(0,r.jsx)("p",{role:"status","data-testid":"bridge-success",className:"rounded-md border border-tone-ok-border bg-tone-ok-bg px-3 py-2 text-tone-ok-fg",children:e})}])},88374,e=>{let r=[{kind:"none",label:"No credential"},{kind:"bearer",label:"Bearer token"},{kind:"clientCredentials",label:"OAuth client credentials"}],n={kind:"personSignIn",label:"Each person signs in"},s=[...r,n];e.s(["a",0,s,"x",0,r,"m",0,n,"G",0,function(e){return s.find(({kind:r})=>r===e)?.kind??"bearer"},"C",0,function(e){return r.find(({kind:r})=>r===e)?.kind??"bearer"}])},30402,e=>{let r="inline-flex h-9 items-center justify-center gap-2 rounded-md px-4 font-medium disabled:opacity-60",n={primary:`${r} bg-primary text-primary-foreground hover:bg-primary-hover`,secondary:`${r} border border-border bg-card hover:bg-accent`,destructive:`${r} bg-destructive text-destructive-foreground`};e.s(["x",0,n,"r",0,"rounded-lg border border-border bg-card p-6 text-card-foreground shadow-sm","w",0,"h-9 w-full rounded-md border border-input bg-background px-3 font-mono text-code","z",0,"grid gap-1"])},65818,e=>{var r=e.i(43476),n=e.i(30402);e.s(["f",0,function({choices:e,current:s,help:i,refusal:a}){let t=null===s||e.some(e=>e.shipId===s.shipId)?e:[s,...e];return(0,r.jsxs)("label",{className:n.z,children:[(0,r.jsx)("span",{children:"Owner"}),(0,r.jsxs)("select",{className:n.w,name:"ownerShipId",defaultValue:s?.shipId??"",required:!0,"data-testid":"owner-field",children:[null===s?(0,r.jsx)("option",{value:"",disabled:!0,children:"Pick its owner"}):null,t.map(e=>(0,r.jsx)("option",{value:e.shipId,children:e.name},e.shipId))]}),(0,r.jsx)("span",{className:"text-muted-foreground",children:a??i})]})}])}])})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,26217,e=>{var n=e.i(95187);let t=(0,n.createServerReference)("60573c940559fe36ec3489b04906d9407ddf5822ef",n.callServer,void 0,n.findSourceMapURL,"removeFromBasket");e.s(["f",0,t])},57228,e=>{e.s(["H",0,"/bridge/basket","T",0,"/bridge/settings"])},85989,e=>{var n=e.i(43476),t=e.i(55070),i=e.i(19015),r=e.i(3523);function s({item:e,opening:i}){let r=e.stale?.replacementId??null;return null===r?null:(0,n.jsx)(t.f,{"data-testid":"bridge-replacement",isPending:i.openingId===r,pendingLabel:"Opening...",disabled:void 0!==i.openingId,onClick:()=>{i.open({deliveryId:r,job:"decide"})},children:"Open the new question"})}function d({item:e,opening:i}){return(0,n.jsx)(t.f,{"data-testid":"bridge-open",isPending:i.openingId===e.deliveryId,pendingLabel:"Opening...",disabled:void 0!==i.openingId,onClick:()=>{i.open(e)},children:"Open"})}e.s(["HomePanel",0,function({fleetId:e,home:t}){let{waiting:a,stayAware:o}=t;return(0,n.jsx)(r.f,{fleetId:e,children:e=>{let t,r,l;return(0,n.jsxs)("div",{className:"grid gap-8",children:[(0,n.jsxs)("section",{className:"grid gap-3","aria-labelledby":"bridge-waiting-heading",children:[(0,n.jsxs)("div",{children:[(0,n.jsxs)("h1",{id:"bridge-waiting-heading",className:"text-heading font-semibold",children:["Waiting on you ",(0,n.jsx)("span",{"data-testid":"bridge-count",className:"text-tone-waiting-fg",children:a.count})]}),(0,n.jsx)("p",{className:"text-muted-foreground",children:0===a.count?"Nothing waits on you.":(r=(t=a.items.filter(({stale:e})=>null===e)).filter(({job:e})=>"decide"===e).length,l=t.filter(({job:e})=>"do"===e).length,`${String(r)} to decide, ${String(l)} to do. Newest on top; nothing else is in this count.`)})]}),0===a.items.length?(0,n.jsxs)("div",{"data-testid":"bridge-nothing-waits",className:"grid justify-items-center gap-1 rounded-lg border border-border bg-card p-6 text-center",children:[(0,n.jsx)("span",{className:"font-semibold",children:"Nothing waits on you"}),(0,n.jsx)("span",{className:"text-muted-foreground",children:"Your ships have what they need from you. A question or a step shows here the moment one arrives."})]}):(0,n.jsx)("ul",{className:"grid gap-2",children:a.items.map(t=>(0,n.jsxs)(i.f,{item:t,isNew:"new"===t.state,isStale:null!==t.stale,outcome:function(e,n){let{stale:t,inBasket:i}=e;if(null===t&&null!==i)return`In the basket: option ${String(i.option)}`;if(null===t)return"seen"===e.state?"Seen, not done yet":void 0;if("withdrawn"===t.kind)return`Withdrawn by ${e.from}: open it to clear it`;let r=n.find(({deliveryId:e})=>e===t.replacementId);return void 0===r?`Replaced by ${e.from}`:`Replaced by ${e.from} with “${r.title}”`}(t,a.items),failure:e.failure?.deliveryId===t.deliveryId?e.failure.message:void 0,children:[(0,n.jsx)(s,{item:t,opening:e}),(0,n.jsx)(d,{item:t,opening:e})]},t.deliveryId))})]}),(0,n.jsxs)("section",{className:"grid gap-3","aria-labelledby":"bridge-stay-aware-heading",children:[(0,n.jsxs)("div",{className:"flex items-baseline justify-between gap-3",children:[(0,n.jsx)("h2",{id:"bridge-stay-aware-heading",className:"text-section font-semibold",children:"Stay aware"}),(0,n.jsxs)("span",{className:"text-caption text-muted-foreground",children:[o.length," unseen, outside the count"]})]}),0===o.length?(0,n.jsx)("p",{"data-testid":"bridge-nothing-new",className:"rounded-md border border-border bg-card p-3 text-muted-foreground",children:"Nothing new. What you saw is in Done."}):(0,n.jsx)("ul",{className:"grid gap-2",children:o.map(t=>(0,n.jsx)(i.f,{item:t,isNew:!0,outcome:void 0,failure:e.failure?.deliveryId===t.deliveryId?e.failure.message:void 0,children:(0,n.jsx)(d,{item:t,opening:e})},t.deliveryId))})]})]})}})}])},3523,e=>{var n=e.i(43476),t=e.i(71645),i=e.i(73459),r=e.i(65894),s=e.i(35004),d=e.i(75222),a=e.i(73383),o=e.i(2708),l=e.i(26217),c=e.i(57228),u=e.i(55070),g=e.i(63132);function m({inBasket:e,basketHref:t,isRemoving:i,isWorking:r,onRemove:s}){return(0,n.jsxs)("div",{"data-testid":"bridge-in-basket",className:"grid gap-2 rounded-md border border-border bg-muted p-3",children:[(0,n.jsxs)("span",{className:"font-medium",children:["In the basket: option ",e.option,", not sent"]}),null===e.note?null:(0,n.jsxs)("span",{className:"text-caption",children:["“",e.note,"”"]}),(0,n.jsx)("span",{className:"text-caption text-muted-foreground",children:"Pick another option to change it."}),(0,n.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,n.jsx)("a",{"data-testid":"bridge-basket-open",href:t,className:"inline-flex h-9 items-center rounded-md border border-border px-4 hover:bg-accent",children:"Open the basket"}),(0,n.jsx)(u.f,{"data-testid":"bridge-basket-remove",isPending:i,pendingLabel:"Removing...",disabled:r,onClick:s,children:"Remove"})]})]})}function p({question:e,chosen:t,isStale:i,onChoose:r}){return(0,n.jsxs)("fieldset",{className:`grid gap-2 ${i?"opacity-60":""}`,disabled:i,children:[(0,n.jsx)("legend",{className:"sr-only",children:"Options"}),e.options.map(s=>(0,n.jsxs)("label",{className:`flex items-start gap-3 rounded-md border p-3 ${s.key===t&&!i?"border-ring bg-accent":"border-border"}`,children:[(0,n.jsx)("input",{type:"radio",name:"option",value:s.key,checked:s.key===t&&!i,onChange:()=>{r(s.key)},className:"mt-1"}),(0,n.jsxs)("span",{className:"grid flex-1 gap-0.5",children:[(0,n.jsxs)("span",{className:"font-medium",children:[s.key,". ",s.label]}),""===s.detail?null:(0,n.jsx)("span",{className:"text-caption text-muted-foreground",children:s.detail})]}),s.key===e.pick.option?(0,n.jsx)("span",{className:"rounded-sm border border-border px-1.5 text-caption",children:"Their pick"}):null]},s.key))]})}function b({stale:e,from:t,onOpen:i}){let{replacementId:r}=e;return(0,n.jsxs)("div",{"data-testid":"bridge-stale",className:"grid gap-2 rounded-md border border-border bg-muted p-3",children:[(0,n.jsx)("span",{children:"withdrawn"===e.kind?`Withdrawn by ${t}. Nothing to answer: it is done.`:`Replaced by ${t}. Answer the new question.`}),null===r?null:(0,n.jsx)(u.f,{"data-testid":"bridge-replacement",className:"justify-self-start",isPending:!1,pendingLabel:"Opening...",onClick:()=>{i(r)},children:"Open the new question"})]})}function f({step:e}){return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("p",{className:"whitespace-pre-wrap",children:e.why}),void 0===e.link?null:(0,n.jsxs)("a",{"data-testid":"bridge-step-link",href:e.link.href,target:"_blank",rel:"noopener noreferrer",className:"inline-flex h-9 items-center justify-self-start rounded-md border border-border px-4 hover:bg-accent",children:["Open on ",e.link.host]})]})}function h({from:e,note:t,working:i,failure:r,onNoteChange:s,onFinish:d}){let a=void 0!==i;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("label",{className:"grid gap-1",children:[(0,n.jsx)("span",{children:"Note"}),(0,n.jsx)("textarea",{"data-testid":"bridge-note",rows:2,value:t,onChange:e=>{s(e.target.value)},placeholder:"Optional, goes with Done or Cannot",className:"rounded-md border border-input bg-background p-2"})]}),void 0===r?null:(0,n.jsx)(g.f,{message:r,isFailure:!0}),(0,n.jsxs)("div",{className:"grid gap-1",children:[(0,n.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,n.jsx)(u.f,{"data-testid":"bridge-step-done",variant:"primary",isPending:i?.kind==="done",pendingLabel:"Sending...",disabled:a,onClick:()=>{d("done")},children:"Done"}),(0,n.jsx)(u.f,{"data-testid":"bridge-step-cannot",isPending:i?.kind==="cannot",pendingLabel:"Sending...",disabled:a,onClick:()=>{d("cannot")},children:"Cannot"})]}),(0,n.jsxs)("span",{className:"text-caption text-muted-foreground",children:[e," is told at once, with your note."]})]})]})}function x({delivery:e,isDoneOnSeeing:i,meetingHref:r,basketHref:s,inBasket:d,note:a,working:o,failure:l,onNoteChange:c,onAnswer:v,onPut:j,onRemove:y,onDone:w,onFinishStep:N,onOpen:k,onBack:S}){let{question:I,step:$,stale:R}=e,[C,L]=(0,t.useState)(d?.option??I?.pick.option),O=void 0!==o;return(0,n.jsxs)("section",{"data-testid":"bridge-delivery",className:"grid gap-3 rounded-lg border border-border bg-card p-6 text-card-foreground shadow-sm",children:[(0,n.jsxs)("span",{className:"text-caption text-muted-foreground",children:[e.from," · ",new Date(e.sentAt).toUTCString()]}),(0,n.jsx)("h2",{className:"text-heading font-semibold",children:I?.title??e.title}),void 0===r?null:(0,n.jsx)("a",{"data-testid":"bridge-meeting",href:r,className:"inline-flex h-9 items-center justify-self-start rounded-md bg-primary px-4 text-primary-foreground hover:bg-primary-hover",children:"Go to the meeting"}),void 0!==$?(0,n.jsx)(f,{step:$}):void 0===I?(0,n.jsx)("pre",{className:"whitespace-pre-wrap rounded-md bg-muted p-3 font-mono text-caption",children:e.body}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("p",{className:"whitespace-pre-wrap",children:I.context}),(0,n.jsx)(p,{question:I,chosen:C,isStale:null!==R,onChoose:L}),(0,n.jsxs)("p",{className:"text-caption text-muted-foreground",children:[e.from," picks ",I.pick.option,": ",I.pick.why]})]}),null===R?null:(0,n.jsx)(b,{stale:R,from:e.from,onOpen:k}),null===d||null!==R?null:(0,n.jsx)(m,{inBasket:d,basketHref:s,isRemoving:o?.kind==="remove",isWorking:O,onRemove:y}),i?(0,n.jsx)("p",{"data-testid":"bridge-seen-done",className:"text-muted-foreground",children:"Seen now, so done: it asks nothing more."}):null!==R?null:void 0!==$?(0,n.jsx)(h,{from:e.from,note:a,working:o,failure:l,onNoteChange:c,onFinish:N}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("label",{className:"grid gap-1",children:[(0,n.jsx)("span",{children:void 0===I?"Your answer":"Note"}),(0,n.jsx)("textarea",{"data-testid":"bridge-note",rows:2,value:a,onChange:e=>{c(e.target.value)},placeholder:void 0===I?"":"Optional, goes with the answer",className:"rounded-md border border-input bg-background p-2"})]}),void 0===l?null:(0,n.jsx)(g.f,{message:l,isFailure:!0}),void 0===I?(0,n.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,n.jsx)(u.f,{"data-testid":"bridge-answer",variant:"primary",isPending:o?.kind==="note",pendingLabel:"Sending...",disabled:O,onClick:()=>{v(void 0)},children:"Answer"}),(0,n.jsx)(u.f,{"data-testid":"bridge-done",isPending:o?.kind==="done",pendingLabel:"Marking done...",disabled:O,onClick:w,children:"Done"})]}):void 0===C?null:(0,n.jsxs)("div",{className:"grid gap-1",children:[(0,n.jsxs)(u.f,{"data-testid":"bridge-put-in-basket",variant:"primary",className:"justify-self-start",isPending:o?.kind==="option",pendingLabel:"Putting in the basket...",disabled:O,onClick:()=>{j(C)},children:["Put option ",C," in the basket"]}),(0,n.jsxs)("span",{className:"text-caption text-muted-foreground",children:["Nothing is sent yet. ",e.from," receives this answer when you send the basket."]})]})]}),(0,n.jsx)("div",{className:"flex flex-wrap gap-2",children:(0,n.jsx)("button",{type:"button",onClick:S,disabled:O,className:"inline-flex h-9 items-center rounded-md px-4 text-muted-foreground hover:bg-accent disabled:opacity-70",children:"Back"})})]})}e.s(["f",0,function({fleetId:e,children:u}){let[m,p]=(0,t.useState)(),[b,f]=(0,t.useState)(""),[h,v]=(0,t.useState)(),[j,y]=(0,t.useState)(),[w,N]=(0,t.useState)(),[k,S]=(0,t.useState)(),[I,$]=(0,t.useState)(),[,R]=(0,t.useTransition)(),C=n=>{v(n.deliveryId),N(void 0),$(void 0),R(async()=>{let t=await (0,a.f)(e,n.deliveryId);if(v(void 0),t.isOk){let e=n.inBasket??null;p({delivery:t.value,isDoneOnSeeing:"stay-aware"===n.job,inBasket:e}),f(e?.note??""),S(void 0)}else N({deliveryId:n.deliveryId,message:t.message})})},L=({control:e,action:n,said:t})=>{y(e),S(void 0),R(async()=>{let e=await n();y(void 0),e.isOk?(p(void 0),$(t)):S(e.message)})};if(void 0!==m){let{delivery:t,inBasket:a}=m,u=t.question?.id;return(0,n.jsx)(x,{delivery:t,isDoneOnSeeing:m.isDoneOnSeeing,meetingHref:void 0===t.meetingId?void 0:(0,i.f)({fleetId:e,meetingId:t.meetingId}),basketHref:(0,r.f)(c.H,e),inBasket:a,note:b,working:j,failure:k,onNoteChange:f,onAnswer:n=>{L({control:void 0===n?{kind:"note"}:{kind:"option",option:n},action:()=>(0,s.f)({fleet:e,deliveryId:t.deliveryId,input:{questionId:t.question?.id,option:n,note:b}}),said:`Your answer went to ${t.from}.`})},onPut:n=>{L({control:{kind:"option",option:n},action:()=>(0,o.f)({fleet:e,deliveryId:t.deliveryId,option:n,note:b}),said:`Option ${String(n)} is in the basket, not sent: ${t.from} receives it when you send the basket.`})},onRemove:()=>{void 0!==u&&L({control:{kind:"remove"},action:()=>(0,l.f)(e,u),said:`Your answer to “${t.title}” is out of the basket; the question still waits on you.`})},onDone:()=>{L({control:{kind:"done"},action:()=>(0,d.f)({fleet:e,deliveryId:t.deliveryId}),said:`Done with “${t.title}”.`})},onFinishStep:n=>{L({control:{kind:n},action:()=>(0,d.f)({fleet:e,deliveryId:t.deliveryId,step:{outcome:n,note:b}}),said:"done"===n?`Done: ${t.from} is told “${t.title}” is done.`:`Cannot: ${t.from} is told you cannot do “${t.title}”.`})},onOpen:e=>{C({deliveryId:e,job:"decide"})},onBack:()=>{p(void 0)}},t.deliveryId)}return(0,n.jsxs)("div",{className:"grid gap-4",children:[void 0===I?null:(0,n.jsx)(g.f,{message:I,isFailure:!1}),u({open:C,openingId:h,failure:w})]})}],3523)},10629,e=>{var n=e.i(71645),t=e.i(18566);e.s(["LiveRefresh",0,function({fleetId:e}){let i;return i=(0,t.useRouter)(),(0,n.useEffect)(()=>{let n=new EventSource(`/bridge/changes?fleet=${encodeURIComponent(e)}`);return n.onmessage=()=>{i.refresh()},()=>{n.close()}},[e,i]),(0,n.useEffect)(()=>{let n,t=()=>{let t="visible"===document.visibilityState&&document.hasFocus();t&&void 0===n?n=new EventSource(`/bridge/focus?fleet=${encodeURIComponent(e)}`):t||void 0===n||(n.close(),n=void 0)};return t(),window.addEventListener("focus",t),window.addEventListener("blur",t),document.addEventListener("visibilitychange",t),()=>{window.removeEventListener("focus",t),window.removeEventListener("blur",t),document.removeEventListener("visibilitychange",t),n?.close()}},[e]),null}],10629)},84238,e=>{var n=e.i(43476),t=e.i(18566),i=e.i(71645);e.s(["RecordUnreadable",0,function({message:e}){let r=(0,t.useRouter)();return(0,i.useEffect)(()=>{let e=setInterval(()=>{r.refresh()},1e4);return()=>{clearInterval(e)}},[r]),(0,n.jsxs)("section",{role:"alert","data-testid":"bridge-unreadable",className:"flex flex-wrap items-center gap-3 rounded-md border border-tone-attention-border bg-tone-attention-bg px-3 py-2 text-tone-attention-fg",children:[(0,n.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col",children:[(0,n.jsx)("span",{className:"font-semibold",children:"The record cannot be read now"}),(0,n.jsxs)("span",{className:"text-caption",children:[e," Nothing was opened or answered, so nothing is lost: Bridge tries again in 10 s."]})]}),(0,n.jsx)("button",{type:"button","data-testid":"bridge-try-now",onClick:()=>{r.refresh()},className:"inline-flex h-9 items-center rounded-md border border-border bg-card px-4 text-card-foreground hover:bg-accent",children:"Try now"})]})}])},55070,e=>{var n=e.i(43476);let t={primary:"bg-primary text-primary-foreground hover:bg-primary-hover",secondary:"border border-border bg-card text-card-foreground hover:bg-accent"};e.s(["f",0,function({isPending:e,pendingLabel:i,variant:r="secondary",children:s,className:d="",disabled:a,...o}){return(0,n.jsx)("button",{...o,disabled:!0===a||e,"aria-busy":e,className:`inline-flex h-9 items-center gap-2 rounded-md px-4 disabled:cursor-not-allowed disabled:opacity-70 ${t[r]} ${d}`,children:e?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{"aria-hidden":"true",className:"size-3.5 animate-spin rounded-full border-2 border-current border-t-transparent"}),i]}):s})}])},19015,12497,e=>{var n=e.i(43476);let t={decide:"Decide",do:"Do","stay-aware":"Stay aware","everything-else":"Message"},i={bridge:"in Bridge",chat:"in a chat",slack:"in Slack",gateway:"by the gateway"},r={seen:"Seen",answered:"Answered",done:"Done",cannot:"Marked cannot",withdrawn:"Withdrawn by its asker, seen",replaced:"Replaced by its asker, seen",notSent:"Not sent, removed"};function s(e){return t[e]}e.s(["y",0,s,"s",0,function(e){switch(e.state){case"new":return"New";case"seen":return"Seen, not done yet";case"done":{let{outcome:n}=e;if(null===n)return"Done";let t=`${r[n.kind]} ${i[n.place]}`;return null===n.option?t:`${t}: option ${String(n.option)}`}}}],12497);var d=e.i(63132);e.s(["f",0,function({item:e,isNew:t,isStale:i=!1,outcome:r,failure:a,children:o}){var l;return(0,n.jsxs)("li",{"data-testid":"bridge-item","data-stale":i,className:`grid min-w-0 gap-2 rounded-md border border-border bg-card p-3 ${i?"opacity-60":""}`,children:[(0,n.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,n.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col text-left",children:[(0,n.jsxs)("span",{className:"flex min-w-0 items-center gap-2",children:[t?(0,n.jsx)("span",{"aria-label":"New",className:"size-2 shrink-0 rounded-full bg-primary"}):null,(0,n.jsx)("span",{className:"truncate font-medium",children:e.title})]}),(0,n.jsxs)("span",{className:"text-caption text-muted-foreground",children:[s(e.job)," · ",e.from," · ",(0,n.jsx)("time",{dateTime:e.sentAt,children:(l=e.sentAt,`${new Date(l).toISOString().slice(0,16).replace("T"," ")} UTC`)})]}),void 0===r?null:(0,n.jsx)("span",{"data-testid":"bridge-outcome",className:"text-caption",children:r})]}),o]}),void 0===a?null:(0,n.jsx)(d.f,{message:a,isFailure:!0})]})}],19015)},63132,e=>{var n=e.i(43476);e.s(["f",0,function({message:e,isFailure:t}){return t?(0,n.jsx)("p",{role:"alert","data-testid":"bridge-failure",className:"rounded-md border border-tone-attention-border bg-tone-attention-bg px-3 py-2 text-tone-attention-fg",children:e}):(0,n.jsx)("p",{role:"status","data-testid":"bridge-success",className:"rounded-md border border-tone-ok-border bg-tone-ok-bg px-3 py-2 text-tone-ok-fg",children:e})}])},73459,35004,75222,73383,2708,e=>{e.s(["f",0,function(e){let n=new URLSearchParams({fleet:e.fleetId,...void 0===e.cursor?{}:{cursor:e.cursor}});return`/meetings/${encodeURIComponent(e.meetingId)}?${n.toString()}`}],73459);var n=e.i(95187);let t=(0,n.createServerReference)("40edad5bc6caa482ec57bdf504a9545c453e286344",n.callServer,void 0,n.findSourceMapURL,"answerDelivery");e.s(["f",0,t],35004);let i=(0,n.createServerReference)("409343274cfb1997696f97d13e70128feeaadc81b0",n.callServer,void 0,n.findSourceMapURL,"doneDelivery");e.s(["f",0,i],75222);let r=(0,n.createServerReference)("6013ebd954e4b9b9c2c4a85c94c4fc1f4786952324",n.callServer,void 0,n.findSourceMapURL,"openDelivery");e.s(["f",0,r],73383);let s=(0,n.createServerReference)("408a5fadf58977f6b55557119e3557d884605ebbcf",n.callServer,void 0,n.findSourceMapURL,"putInBasket");e.s(["f",0,s],2708)}])})();
|
|
1
|
+
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,40389,e=>{var n=e.i(95187);let t=(0,n.createServerReference)("60cb932106ab7fdcbd18e33041be499ed83080592f",n.callServer,void 0,n.findSourceMapURL,"removeFromBasket");e.s(["f",0,t])},57228,e=>{e.s(["H",0,"/bridge/basket","T",0,"/bridge/settings"])},85989,e=>{var n=e.i(43476),t=e.i(55070),i=e.i(19015),r=e.i(3523);function s({item:e,opening:i}){let r=e.stale?.replacementId??null;return null===r?null:(0,n.jsx)(t.f,{"data-testid":"bridge-replacement",isPending:i.openingId===r,pendingLabel:"Opening...",disabled:void 0!==i.openingId,onClick:()=>{i.open({deliveryId:r,job:"decide"})},children:"Open the new question"})}function d({item:e,opening:i}){return(0,n.jsx)(t.f,{"data-testid":"bridge-open",isPending:i.openingId===e.deliveryId,pendingLabel:"Opening...",disabled:void 0!==i.openingId,onClick:()=>{i.open(e)},children:"Open"})}e.s(["HomePanel",0,function({fleetId:e,home:t}){let{waiting:a,stayAware:o}=t;return(0,n.jsx)(r.f,{fleetId:e,children:e=>{let t,r,l;return(0,n.jsxs)("div",{className:"grid gap-8",children:[(0,n.jsxs)("section",{className:"grid gap-3","aria-labelledby":"bridge-waiting-heading",children:[(0,n.jsxs)("div",{children:[(0,n.jsxs)("h1",{id:"bridge-waiting-heading",className:"text-heading font-semibold",children:["Waiting on you ",(0,n.jsx)("span",{"data-testid":"bridge-count",className:"text-tone-waiting-fg",children:a.count})]}),(0,n.jsx)("p",{className:"text-muted-foreground",children:0===a.count?"Nothing waits on you.":(r=(t=a.items.filter(({stale:e})=>null===e)).filter(({job:e})=>"decide"===e).length,l=t.filter(({job:e})=>"do"===e).length,`${String(r)} to decide, ${String(l)} to do. Newest on top; nothing else is in this count.`)})]}),0===a.items.length?(0,n.jsxs)("div",{"data-testid":"bridge-nothing-waits",className:"grid justify-items-center gap-1 rounded-lg border border-border bg-card p-6 text-center",children:[(0,n.jsx)("span",{className:"font-semibold",children:"Nothing waits on you"}),(0,n.jsx)("span",{className:"text-muted-foreground",children:"Your ships have what they need from you. A question or a step shows here the moment one arrives."})]}):(0,n.jsx)("ul",{className:"grid gap-2",children:a.items.map(t=>(0,n.jsxs)(i.f,{item:t,isNew:"new"===t.state,isStale:null!==t.stale,outcome:function(e,n){let{stale:t,inBasket:i}=e;if(null===t&&null!==i)return`In the basket: option ${String(i.option)}`;if(null===t)return"seen"===e.state?"Seen, not done yet":void 0;if("withdrawn"===t.kind)return`Withdrawn by ${e.from}: open it to clear it`;let r=n.find(({deliveryId:e})=>e===t.replacementId);return void 0===r?`Replaced by ${e.from}`:`Replaced by ${e.from} with “${r.title}”`}(t,a.items),failure:e.failure?.deliveryId===t.deliveryId?e.failure.message:void 0,children:[(0,n.jsx)(s,{item:t,opening:e}),(0,n.jsx)(d,{item:t,opening:e})]},t.deliveryId))})]}),(0,n.jsxs)("section",{className:"grid gap-3","aria-labelledby":"bridge-stay-aware-heading",children:[(0,n.jsxs)("div",{className:"flex items-baseline justify-between gap-3",children:[(0,n.jsx)("h2",{id:"bridge-stay-aware-heading",className:"text-section font-semibold",children:"Stay aware"}),(0,n.jsxs)("span",{className:"text-caption text-muted-foreground",children:[o.length," unseen, outside the count"]})]}),0===o.length?(0,n.jsx)("p",{"data-testid":"bridge-nothing-new",className:"rounded-md border border-border bg-card p-3 text-muted-foreground",children:"Nothing new. What you saw is in Done."}):(0,n.jsx)("ul",{className:"grid gap-2",children:o.map(t=>(0,n.jsx)(i.f,{item:t,isNew:!0,outcome:void 0,failure:e.failure?.deliveryId===t.deliveryId?e.failure.message:void 0,children:(0,n.jsx)(d,{item:t,opening:e})},t.deliveryId))})]})]})}})}])},3523,e=>{var n=e.i(43476),t=e.i(71645),i=e.i(73459),r=e.i(65894),s=e.i(49962),d=e.i(12280),a=e.i(22327),o=e.i(4592),l=e.i(40389),c=e.i(57228),u=e.i(55070),g=e.i(63132);function m({inBasket:e,basketHref:t,isRemoving:i,isWorking:r,onRemove:s}){return(0,n.jsxs)("div",{"data-testid":"bridge-in-basket",className:"grid gap-2 rounded-md border border-border bg-muted p-3",children:[(0,n.jsxs)("span",{className:"font-medium",children:["In the basket: option ",e.option,", not sent"]}),null===e.note?null:(0,n.jsxs)("span",{className:"text-caption",children:["“",e.note,"”"]}),(0,n.jsx)("span",{className:"text-caption text-muted-foreground",children:"Pick another option to change it."}),(0,n.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,n.jsx)("a",{"data-testid":"bridge-basket-open",href:t,className:"inline-flex h-9 items-center rounded-md border border-border px-4 hover:bg-accent",children:"Open the basket"}),(0,n.jsx)(u.f,{"data-testid":"bridge-basket-remove",isPending:i,pendingLabel:"Removing...",disabled:r,onClick:s,children:"Remove"})]})]})}function p({question:e,chosen:t,isStale:i,onChoose:r}){return(0,n.jsxs)("fieldset",{className:`grid gap-2 ${i?"opacity-60":""}`,disabled:i,children:[(0,n.jsx)("legend",{className:"sr-only",children:"Options"}),e.options.map(s=>(0,n.jsxs)("label",{className:`flex items-start gap-3 rounded-md border p-3 ${s.key===t&&!i?"border-ring bg-accent":"border-border"}`,children:[(0,n.jsx)("input",{type:"radio",name:"option",value:s.key,checked:s.key===t&&!i,onChange:()=>{r(s.key)},className:"mt-1"}),(0,n.jsxs)("span",{className:"grid flex-1 gap-0.5",children:[(0,n.jsxs)("span",{className:"font-medium",children:[s.key,". ",s.label]}),""===s.detail?null:(0,n.jsx)("span",{className:"text-caption text-muted-foreground",children:s.detail})]}),s.key===e.pick.option?(0,n.jsx)("span",{className:"rounded-sm border border-border px-1.5 text-caption",children:"Their pick"}):null]},s.key))]})}function b({stale:e,from:t,onOpen:i}){let{replacementId:r}=e;return(0,n.jsxs)("div",{"data-testid":"bridge-stale",className:"grid gap-2 rounded-md border border-border bg-muted p-3",children:[(0,n.jsx)("span",{children:"withdrawn"===e.kind?`Withdrawn by ${t}. Nothing to answer: it is done.`:`Replaced by ${t}. Answer the new question.`}),null===r?null:(0,n.jsx)(u.f,{"data-testid":"bridge-replacement",className:"justify-self-start",isPending:!1,pendingLabel:"Opening...",onClick:()=>{i(r)},children:"Open the new question"})]})}function f({step:e}){return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("p",{className:"whitespace-pre-wrap",children:e.why}),void 0===e.link?null:(0,n.jsxs)("a",{"data-testid":"bridge-step-link",href:e.link.href,target:"_blank",rel:"noopener noreferrer",className:"inline-flex h-9 items-center justify-self-start rounded-md border border-border px-4 hover:bg-accent",children:["Open on ",e.link.host]})]})}function h({from:e,note:t,working:i,failure:r,onNoteChange:s,onFinish:d}){let a=void 0!==i;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("label",{className:"grid gap-1",children:[(0,n.jsx)("span",{children:"Note"}),(0,n.jsx)("textarea",{"data-testid":"bridge-note",rows:2,value:t,onChange:e=>{s(e.target.value)},placeholder:"Optional, goes with Done or Cannot",className:"rounded-md border border-input bg-background p-2"})]}),void 0===r?null:(0,n.jsx)(g.f,{message:r,isFailure:!0}),(0,n.jsxs)("div",{className:"grid gap-1",children:[(0,n.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,n.jsx)(u.f,{"data-testid":"bridge-step-done",variant:"primary",isPending:i?.kind==="done",pendingLabel:"Sending...",disabled:a,onClick:()=>{d("done")},children:"Done"}),(0,n.jsx)(u.f,{"data-testid":"bridge-step-cannot",isPending:i?.kind==="cannot",pendingLabel:"Sending...",disabled:a,onClick:()=>{d("cannot")},children:"Cannot"})]}),(0,n.jsxs)("span",{className:"text-caption text-muted-foreground",children:[e," is told at once, with your note."]})]})]})}function x({delivery:e,isDoneOnSeeing:i,meetingHref:r,basketHref:s,inBasket:d,note:a,working:o,failure:l,onNoteChange:c,onAnswer:v,onPut:j,onRemove:y,onDone:w,onFinishStep:N,onOpen:k,onBack:S}){let{question:I,step:$,stale:R}=e,[C,L]=(0,t.useState)(d?.option??I?.pick.option),O=void 0!==o;return(0,n.jsxs)("section",{"data-testid":"bridge-delivery",className:"grid gap-3 rounded-lg border border-border bg-card p-6 text-card-foreground shadow-sm",children:[(0,n.jsxs)("span",{className:"text-caption text-muted-foreground",children:[e.from," · ",new Date(e.sentAt).toUTCString()]}),(0,n.jsx)("h2",{className:"text-heading font-semibold",children:I?.title??e.title}),void 0===r?null:(0,n.jsx)("a",{"data-testid":"bridge-meeting",href:r,className:"inline-flex h-9 items-center justify-self-start rounded-md bg-primary px-4 text-primary-foreground hover:bg-primary-hover",children:"Go to the meeting"}),void 0!==$?(0,n.jsx)(f,{step:$}):void 0===I?(0,n.jsx)("pre",{className:"whitespace-pre-wrap rounded-md bg-muted p-3 font-mono text-caption",children:e.body}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("p",{className:"whitespace-pre-wrap",children:I.context}),(0,n.jsx)(p,{question:I,chosen:C,isStale:null!==R,onChoose:L}),(0,n.jsxs)("p",{className:"text-caption text-muted-foreground",children:[e.from," picks ",I.pick.option,": ",I.pick.why]})]}),null===R?null:(0,n.jsx)(b,{stale:R,from:e.from,onOpen:k}),null===d||null!==R?null:(0,n.jsx)(m,{inBasket:d,basketHref:s,isRemoving:o?.kind==="remove",isWorking:O,onRemove:y}),i?(0,n.jsx)("p",{"data-testid":"bridge-seen-done",className:"text-muted-foreground",children:"Seen now, so done: it asks nothing more."}):null!==R?null:void 0!==$?(0,n.jsx)(h,{from:e.from,note:a,working:o,failure:l,onNoteChange:c,onFinish:N}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("label",{className:"grid gap-1",children:[(0,n.jsx)("span",{children:void 0===I?"Your answer":"Note"}),(0,n.jsx)("textarea",{"data-testid":"bridge-note",rows:2,value:a,onChange:e=>{c(e.target.value)},placeholder:void 0===I?"":"Optional, goes with the answer",className:"rounded-md border border-input bg-background p-2"})]}),void 0===l?null:(0,n.jsx)(g.f,{message:l,isFailure:!0}),void 0===I?(0,n.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,n.jsx)(u.f,{"data-testid":"bridge-answer",variant:"primary",isPending:o?.kind==="note",pendingLabel:"Sending...",disabled:O,onClick:()=>{v(void 0)},children:"Answer"}),(0,n.jsx)(u.f,{"data-testid":"bridge-done",isPending:o?.kind==="done",pendingLabel:"Marking done...",disabled:O,onClick:w,children:"Done"})]}):void 0===C?null:(0,n.jsxs)("div",{className:"grid gap-1",children:[(0,n.jsxs)(u.f,{"data-testid":"bridge-put-in-basket",variant:"primary",className:"justify-self-start",isPending:o?.kind==="option",pendingLabel:"Putting in the basket...",disabled:O,onClick:()=>{j(C)},children:["Put option ",C," in the basket"]}),(0,n.jsxs)("span",{className:"text-caption text-muted-foreground",children:["Nothing is sent yet. ",e.from," receives this answer when you send the basket."]})]})]}),(0,n.jsx)("div",{className:"flex flex-wrap gap-2",children:(0,n.jsx)("button",{type:"button",onClick:S,disabled:O,className:"inline-flex h-9 items-center rounded-md px-4 text-muted-foreground hover:bg-accent disabled:opacity-70",children:"Back"})})]})}e.s(["f",0,function({fleetId:e,children:u}){let[m,p]=(0,t.useState)(),[b,f]=(0,t.useState)(""),[h,v]=(0,t.useState)(),[j,y]=(0,t.useState)(),[w,N]=(0,t.useState)(),[k,S]=(0,t.useState)(),[I,$]=(0,t.useState)(),[,R]=(0,t.useTransition)(),C=n=>{v(n.deliveryId),N(void 0),$(void 0),R(async()=>{let t=await (0,a.f)(e,n.deliveryId);if(v(void 0),t.isOk){let e=n.inBasket??null;p({delivery:t.value,isDoneOnSeeing:"stay-aware"===n.job,inBasket:e}),f(e?.note??""),S(void 0)}else N({deliveryId:n.deliveryId,message:t.message})})},L=({control:e,action:n,said:t})=>{y(e),S(void 0),R(async()=>{let e=await n();y(void 0),e.isOk?(p(void 0),$(t)):S(e.message)})};if(void 0!==m){let{delivery:t,inBasket:a}=m,u=t.question?.id;return(0,n.jsx)(x,{delivery:t,isDoneOnSeeing:m.isDoneOnSeeing,meetingHref:void 0===t.meetingId?void 0:(0,i.f)({fleetId:e,meetingId:t.meetingId}),basketHref:(0,r.f)(c.H,e),inBasket:a,note:b,working:j,failure:k,onNoteChange:f,onAnswer:n=>{L({control:void 0===n?{kind:"note"}:{kind:"option",option:n},action:()=>(0,s.f)({fleet:e,deliveryId:t.deliveryId,input:{questionId:t.question?.id,option:n,note:b}}),said:`Your answer went to ${t.from}.`})},onPut:n=>{L({control:{kind:"option",option:n},action:()=>(0,o.f)({fleet:e,deliveryId:t.deliveryId,option:n,note:b}),said:`Option ${String(n)} is in the basket, not sent: ${t.from} receives it when you send the basket.`})},onRemove:()=>{void 0!==u&&L({control:{kind:"remove"},action:()=>(0,l.f)(e,u),said:`Your answer to “${t.title}” is out of the basket; the question still waits on you.`})},onDone:()=>{L({control:{kind:"done"},action:()=>(0,d.f)({fleet:e,deliveryId:t.deliveryId}),said:`Done with “${t.title}”.`})},onFinishStep:n=>{L({control:{kind:n},action:()=>(0,d.f)({fleet:e,deliveryId:t.deliveryId,step:{outcome:n,note:b}}),said:"done"===n?`Done: ${t.from} is told “${t.title}” is done.`:`Cannot: ${t.from} is told you cannot do “${t.title}”.`})},onOpen:e=>{C({deliveryId:e,job:"decide"})},onBack:()=>{p(void 0)}},t.deliveryId)}return(0,n.jsxs)("div",{className:"grid gap-4",children:[void 0===I?null:(0,n.jsx)(g.f,{message:I,isFailure:!1}),u({open:C,openingId:h,failure:w})]})}],3523)},10629,e=>{var n=e.i(71645),t=e.i(18566);e.s(["LiveRefresh",0,function({fleetId:e}){let i;return i=(0,t.useRouter)(),(0,n.useEffect)(()=>{let n=new EventSource(`/bridge/changes?fleet=${encodeURIComponent(e)}`);return n.onmessage=()=>{i.refresh()},()=>{n.close()}},[e,i]),(0,n.useEffect)(()=>{let n,t=()=>{let t="visible"===document.visibilityState&&document.hasFocus();t&&void 0===n?n=new EventSource(`/bridge/focus?fleet=${encodeURIComponent(e)}`):t||void 0===n||(n.close(),n=void 0)};return t(),window.addEventListener("focus",t),window.addEventListener("blur",t),document.addEventListener("visibilitychange",t),()=>{window.removeEventListener("focus",t),window.removeEventListener("blur",t),document.removeEventListener("visibilitychange",t),n?.close()}},[e]),null}],10629)},84238,e=>{var n=e.i(43476),t=e.i(18566),i=e.i(71645);e.s(["RecordUnreadable",0,function({message:e}){let r=(0,t.useRouter)();return(0,i.useEffect)(()=>{let e=setInterval(()=>{r.refresh()},1e4);return()=>{clearInterval(e)}},[r]),(0,n.jsxs)("section",{role:"alert","data-testid":"bridge-unreadable",className:"flex flex-wrap items-center gap-3 rounded-md border border-tone-attention-border bg-tone-attention-bg px-3 py-2 text-tone-attention-fg",children:[(0,n.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col",children:[(0,n.jsx)("span",{className:"font-semibold",children:"The record cannot be read now"}),(0,n.jsxs)("span",{className:"text-caption",children:[e," Nothing was opened or answered, so nothing is lost: Bridge tries again in 10 s."]})]}),(0,n.jsx)("button",{type:"button","data-testid":"bridge-try-now",onClick:()=>{r.refresh()},className:"inline-flex h-9 items-center rounded-md border border-border bg-card px-4 text-card-foreground hover:bg-accent",children:"Try now"})]})}])},55070,e=>{var n=e.i(43476);let t={primary:"bg-primary text-primary-foreground hover:bg-primary-hover",secondary:"border border-border bg-card text-card-foreground hover:bg-accent"};e.s(["f",0,function({isPending:e,pendingLabel:i,variant:r="secondary",children:s,className:d="",disabled:a,...o}){return(0,n.jsx)("button",{...o,disabled:!0===a||e,"aria-busy":e,className:`inline-flex h-9 items-center gap-2 rounded-md px-4 disabled:cursor-not-allowed disabled:opacity-70 ${t[r]} ${d}`,children:e?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{"aria-hidden":"true",className:"size-3.5 animate-spin rounded-full border-2 border-current border-t-transparent"}),i]}):s})}])},19015,12497,e=>{var n=e.i(43476);let t={decide:"Decide",do:"Do","stay-aware":"Stay aware","everything-else":"Message"},i={bridge:"in Bridge",chat:"in a chat",slack:"in Slack",gateway:"by the gateway"},r={seen:"Seen",answered:"Answered",done:"Done",cannot:"Marked cannot",withdrawn:"Withdrawn by its asker, seen",replaced:"Replaced by its asker, seen",notSent:"Not sent, removed"};function s(e){return t[e]}e.s(["y",0,s,"s",0,function(e){switch(e.state){case"new":return"New";case"seen":return"Seen, not done yet";case"done":{let{outcome:n}=e;if(null===n)return"Done";let t=`${r[n.kind]} ${i[n.place]}`;return null===n.option?t:`${t}: option ${String(n.option)}`}}}],12497);var d=e.i(63132);e.s(["f",0,function({item:e,isNew:t,isStale:i=!1,outcome:r,failure:a,children:o}){var l;return(0,n.jsxs)("li",{"data-testid":"bridge-item","data-stale":i,className:`grid min-w-0 gap-2 rounded-md border border-border bg-card p-3 ${i?"opacity-60":""}`,children:[(0,n.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,n.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col text-left",children:[(0,n.jsxs)("span",{className:"flex min-w-0 items-center gap-2",children:[t?(0,n.jsx)("span",{"aria-label":"New",className:"size-2 shrink-0 rounded-full bg-primary"}):null,(0,n.jsx)("span",{className:"truncate font-medium",children:e.title})]}),(0,n.jsxs)("span",{className:"text-caption text-muted-foreground",children:[s(e.job)," · ",e.from," · ",(0,n.jsx)("time",{dateTime:e.sentAt,children:(l=e.sentAt,`${new Date(l).toISOString().slice(0,16).replace("T"," ")} UTC`)})]}),void 0===r?null:(0,n.jsx)("span",{"data-testid":"bridge-outcome",className:"text-caption",children:r})]}),o]}),void 0===a?null:(0,n.jsx)(d.f,{message:a,isFailure:!0})]})}],19015)},63132,e=>{var n=e.i(43476);e.s(["f",0,function({message:e,isFailure:t}){return t?(0,n.jsx)("p",{role:"alert","data-testid":"bridge-failure",className:"rounded-md border border-tone-attention-border bg-tone-attention-bg px-3 py-2 text-tone-attention-fg",children:e}):(0,n.jsx)("p",{role:"status","data-testid":"bridge-success",className:"rounded-md border border-tone-ok-border bg-tone-ok-bg px-3 py-2 text-tone-ok-fg",children:e})}])},73459,49962,12280,22327,4592,e=>{e.s(["f",0,function(e){let n=new URLSearchParams({fleet:e.fleetId,...void 0===e.cursor?{}:{cursor:e.cursor}});return`/meetings/${encodeURIComponent(e.meetingId)}?${n.toString()}`}],73459);var n=e.i(95187);let t=(0,n.createServerReference)("40312d708ed123f3bff12a0e5d5ab7bdd456131901",n.callServer,void 0,n.findSourceMapURL,"answerDelivery");e.s(["f",0,t],49962);let i=(0,n.createServerReference)("407cf7e8bf1a43e93e600808ccd1631dfd13c9b490",n.callServer,void 0,n.findSourceMapURL,"doneDelivery");e.s(["f",0,i],12280);let r=(0,n.createServerReference)("60c205c99f267754b5cb7b09118fdaf91f419555a5",n.callServer,void 0,n.findSourceMapURL,"openDelivery");e.s(["f",0,r],22327);let s=(0,n.createServerReference)("40c05f98915a7c9661aa8f801d392296ba8350eeba",n.callServer,void 0,n.findSourceMapURL,"putInBasket");e.s(["f",0,s],4592)}])})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,55070,e=>{var r=e.i(43476);let t={primary:"bg-primary text-primary-foreground hover:bg-primary-hover",secondary:"border border-border bg-card text-card-foreground hover:bg-accent"};e.s(["f",0,function({isPending:e,pendingLabel:a,variant:n="secondary",children:i,className:d="",disabled:s,...o}){return(0,r.jsx)("button",{...o,disabled:!0===s||e,"aria-busy":e,className:`inline-flex h-9 items-center gap-2 rounded-md px-4 disabled:cursor-not-allowed disabled:opacity-70 ${t[n]} ${d}`,children:e?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{"aria-hidden":"true",className:"size-3.5 animate-spin rounded-full border-2 border-current border-t-transparent"}),a]}):i})}])},63132,e=>{var r=e.i(43476);e.s(["f",0,function({message:e,isFailure:t}){return t?(0,r.jsx)("p",{role:"alert","data-testid":"bridge-failure",className:"rounded-md border border-tone-attention-border bg-tone-attention-bg px-3 py-2 text-tone-attention-fg",children:e}):(0,r.jsx)("p",{role:"status","data-testid":"bridge-success",className:"rounded-md border border-tone-ok-border bg-tone-ok-bg px-3 py-2 text-tone-ok-fg",children:e})}])},17433,e=>{var r=e.i(43476),t=e.i(18566),a=e.i(71645),n=e.i(55070),i=e.i(63132),d=e.i(95187);let s=(0,d.createServerReference)("
|
|
1
|
+
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,55070,e=>{var r=e.i(43476);let t={primary:"bg-primary text-primary-foreground hover:bg-primary-hover",secondary:"border border-border bg-card text-card-foreground hover:bg-accent"};e.s(["f",0,function({isPending:e,pendingLabel:a,variant:n="secondary",children:i,className:d="",disabled:s,...o}){return(0,r.jsx)("button",{...o,disabled:!0===s||e,"aria-busy":e,className:`inline-flex h-9 items-center gap-2 rounded-md px-4 disabled:cursor-not-allowed disabled:opacity-70 ${t[n]} ${d}`,children:e?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{"aria-hidden":"true",className:"size-3.5 animate-spin rounded-full border-2 border-current border-t-transparent"}),a]}):i})}])},63132,e=>{var r=e.i(43476);e.s(["f",0,function({message:e,isFailure:t}){return t?(0,r.jsx)("p",{role:"alert","data-testid":"bridge-failure",className:"rounded-md border border-tone-attention-border bg-tone-attention-bg px-3 py-2 text-tone-attention-fg",children:e}):(0,r.jsx)("p",{role:"status","data-testid":"bridge-success",className:"rounded-md border border-tone-ok-border bg-tone-ok-bg px-3 py-2 text-tone-ok-fg",children:e})}])},17433,e=>{var r=e.i(43476),t=e.i(18566),a=e.i(71645),n=e.i(55070),i=e.i(63132),d=e.i(95187);let s=(0,d.createServerReference)("40d207940fac2536d1d4937f4a73190dd453e119a1",d.callServer,void 0,d.findSourceMapURL,"changeMic"),o=(0,d.createServerReference)("4016e6b19796a8f51b1d10ae3b8c514dced879f18b",d.callServer,void 0,d.findSourceMapURL,"contribute"),l={request:{label:"Request the mic",pending:"Requesting..."},withdraw:{label:"Withdraw my request",pending:"Withdrawing..."},release:{label:"Release the mic",pending:"Releasing..."}};e.s(["MeetingControls",0,function({fleetId:e,meetingId:d,controls:c}){let u=(0,t.useRouter)(),[b,g]=(0,a.useState)(""),[p,m]=(0,a.useState)(()=>crypto.randomUUID()),[f,h]=(0,a.useState)(),[x,v]=(0,a.useState)(),[,y]=(0,a.useTransition)(),j=({control:e,action:r,onDone:t})=>{h(e),v(void 0),y(async()=>{let e=await r();h(void 0),e.isOk?(t?.(),u.refresh()):v(e.message)})},S=void 0!==f,R=c.filter(e=>"contribute"!==e);return(0,r.jsxs)("div",{className:"grid gap-3",children:[c.includes("contribute")?(0,r.jsxs)("div",{className:"grid gap-2",children:[(0,r.jsxs)("label",{className:"grid gap-1",children:[(0,r.jsx)("span",{children:"Your contribution"}),(0,r.jsx)("textarea",{"data-testid":"meeting-text",rows:4,value:b,onChange:e=>{g(e.target.value)},className:"rounded-md border border-input bg-background p-2"})]}),(0,r.jsx)(n.f,{"data-testid":"meeting-contribute",variant:"primary",className:"justify-self-start",isPending:"contribute"===f,pendingLabel:"Sending...",disabled:S,onClick:()=>{j({control:"contribute",action:()=>o({fleet:e,meetingId:d,text:b,idempotencyKey:p}),onDone:()=>{g(""),m(crypto.randomUUID())}})},children:"Contribute"})]}):null,0===R.length?null:(0,r.jsx)("div",{className:"flex flex-wrap gap-2",children:R.map(t=>(0,r.jsx)(n.f,{"data-testid":`meeting-${t}`,variant:"request"===t?"primary":"secondary",isPending:f===t,pendingLabel:l[t].pending,disabled:S,onClick:()=>{j({control:t,action:()=>s({fleet:e,meetingId:d,change:t})})},children:l[t].label},t))}),void 0===x?null:(0,r.jsx)(i.f,{message:x,isFailure:!0})]})}],17433)}])})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,[26323,8821,56736,25834,35890,64938,80829,6640,10199,64951,66250,77173,13488,28376,9977,41708,93480,9169,52744,e=>{var t=e.i(71645),n=e.i(33332);let r=t.createContext(void 0);function o(e){let o=t.useContext(r);if(!e&&void 0===o)throw Error((0,n.f)(27));return o}e.s(["R",0,r,"x",0,o],8821);var i=e.i(52245),a=e.i(79938);let s=t.forwardRef(function(e,t){let{render:n,className:r,style:s,forceRender:l=!1,...d}=e,u=o(),p=u.useState("open"),c=u.useState("nested"),f=u.useState("mounted"),g=u.useState("transitionStatus");return(0,i.a)("div",e,{state:{open:p,transitionStatus:g},ref:[u.context.backdropRef,t],stateAttributesMapping:a.M,props:[{role:"presentation",hidden:!f,style:{userSelect:"none",WebkitUserSelect:"none"}},d],enabled:l||!c})});var l=e.i(40886),d=e.i(75606),u=e.i(57749);let p=t.forwardRef(function(e,t){let{render:n,className:r,style:a,disabled:s=!1,nativeButton:p=!0,...c}=e,f=o(),g=f.useState("open"),{getButtonProps:m,buttonRef:h}=(0,l.f)({disabled:s,native:p});return(0,i.a)("button",e,{state:{disabled:s},ref:[t,h],props:[{onClick:function(e){g&&f.setOpen(!1,(0,d.j)(u.f.closePress,e.nativeEvent))}},c,m]})});e.s(["f",0,p],56736);var c=e.i(88015);let f=t.forwardRef(function(e,t){let{render:n,className:r,style:a,id:s,...l}=e,d=o(),u=(0,c.f)(s);return d.useSyncedValueWithCleanup("descriptionElementId",u),(0,i.a)("p",e,{ref:t,props:[{id:u},l]})});var g=e.i(61487);let m=t.createContext(void 0);function h(){let e=t.useContext(m);if(void 0===e)throw Error((0,n.f)(26));return e}e.s(["_",0,m,"Z",0,h],25834);var v=e.i(37584),x=e.i(73327),S=e.i(64111),b=e.i(74354),C=e.i(38380);e.s(["f",0,C],35890);var C=C,w=C;e.s(["f",0,w],64938);var w=C,y=C;e.s(["f",0,y],80829);var y=C,P=C;e.s(["f",0,P],6640);var P=C;C.open,w.closed,y.startingStyle,P.endingStyle;let R={...a.E,...b.f,nestedDialogOpen:e=>e?{"data-nested-dialog-open":""}:null};e.s(["f",0,R],10199);var O=e.i(43476);let j=t.forwardRef(function(e,t){let{render:n,className:r,style:a,finalFocus:s,initialFocus:l,...d}=e,u=o(),p=u.useState("descriptionElementId"),c=u.useState("disablePointerDismissal"),f=u.useState("floatingRootContext"),m=u.useState("popupProps"),b=u.useState("modal"),C=u.useState("mounted"),w=u.useState("nested"),y=u.useState("nestedOpenDialogCount"),P=u.useState("open"),j=u.useState("openMethod"),k=u.useState("titleElementId"),E=u.useState("transitionStatus"),T=u.useState("role"),I=f.useState("floatingId");h(),(0,v.f)({open:P,ref:u.context.popupRef,onComplete(){P&&u.context.onOpenChangeComplete?.(!0)}});let D=void 0===l?(0,S.H)(u.context.popupRef):l,N=u.useStateSetter("popupElement"),A=(0,i.a)("div",e,{state:{open:P,nested:w,transitionStatus:E,nestedDialogOpen:y>0},props:[m,{id:I,"aria-labelledby":k,"aria-describedby":p,role:T,...S.X,hidden:!C,onKeyDown(e){x.f.has(e.key)&&e.stopPropagation()},style:{"--nested-dialogs":y}},d],ref:[t,u.context.popupRef,N],stateAttributesMapping:R});return(0,O.jsx)(g.f,{context:f,openInteractionType:j,disabled:!C,closeOnFocusOut:!c,initialFocus:D,returnFocus:s,modal:!1!==b,restoreFocus:"popup",children:A})});var k=e.i(44394),E=e.i(26674),T=e.i(426);let I=t.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,i=o(),a=i.useState("mounted"),s=i.useState("modal"),l=i.useState("open");return a||n?(0,O.jsx)(m.Provider,{value:n,children:(0,O.jsxs)(E.r,{ref:t,...r,children:[a&&!0===s&&(0,O.jsx)(T.f,{ref:i.context.internalBackdropRef,inert:(0,k.f)(!l)}),e.children]})}):null});e.s(["f",0,I],64951);var D=e.i(96499),N=e.i(46376),A=e.i(45484),M=e.i(17989),U=e.i(84446);function B({store:e,parentContext:n,isDrawer:r}){let o=e.useState("open"),i=e.useState("mounted"),a=e.useState("disablePointerDismissal"),s=e.useState("modal"),l=e.useState("popupElement"),d=e.useState("floatingRootContext"),[u,p]=t.useState(0),[c,f]=t.useState(0),g=0===u,m=(0,M.f)(d,{outsidePressEvent:()=>e.context.internalBackdropRef.current||e.context.backdropRef.current?"intentional":{mouse:"trap-focus"===s?"sloppy":"intentional",touch:"sloppy"},outsidePress(t){if(!e.context.outsidePressEnabledRef.current||"button"in t&&0!==t.button)return!1;if("touches"in t){if("touchend"===t.type){if(1!==t.changedTouches.length||0!==t.touches.length)return!1}else if(1!==t.touches.length)return!1}let n=(0,U.Z)(t);if(g&&!a){if(s){let t=e.context.internalBackdropRef.current,r=e.context.backdropRef.current;return!t&&!r||t===n||r===n||(0,U.I)(n,l)&&!n?.hasAttribute("data-base-ui-portal")}return!0}return!1},escapeKey:g});return(0,A.f)(o&&!0===s,l),e.useContextCallback("onNestedDialogOpen",(t,n)=>{(e.select("open")||e.select("mounted"))&&(p(t),f(n))}),(0,N.f)(()=>{o||i||(p(0),f(0))},[o,i]),(0,N.f)(()=>(n?.onNestedDialogOpen&&o&&n.onNestedDialogOpen(u+1,c+ +!!r),()=>{n?.onNestedDialogOpen&&o&&n.onNestedDialogOpen(0,0)}),[r,o,u,c,n]),(0,S.y)(e,{activeTriggerProps:m.reference,inactiveTriggerProps:m.trigger,popupProps:m.floating,nestedOpenDialogCount:u,nestedOpenDrawerCount:c}),null}var L=e.i(1252),z=e.i(16786),F=e.i(90627);let W={...z.j,modal:e=>e.modal,nested:e=>e.nested,nestedOpenDialogCount:e=>e.nestedOpenDialogCount,nestedOpenDrawerCount:e=>e.nestedOpenDrawerCount,disablePointerDismissal:e=>e.disablePointerDismissal,openMethod:e=>e.openMethod,descriptionElementId:e=>e.descriptionElementId,titleElementId:e=>e.titleElementId,viewportElement:e=>e.viewportElement,role:e=>e.role};class $ extends L.f{constructor(e,n,r){var o;let i=new F.f;super(function(e,t,n,r=!1){return{...(0,z.i)(t,n,r),modal:!0,disablePointerDismissal:!1,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:"dialog",...e}}(e,i,n,r),(o=i,{popupRef:t.createRef(),backdropRef:t.createRef(),internalBackdropRef:t.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:o,onOpenChange:void 0,onOpenChangeComplete:void 0}),W)}setOpen=(e,t)=>{t.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},e||null!=t.trigger||null==this.state.activeTriggerId||(t.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,t),t.isCanceled||(this.state.floatingRootContext.dispatchOpenChange(e,t),this.update((0,S.z)(this.state,e,t.trigger)))}}var H=e.i(68765);function K(e,n){let{children:i,open:a,defaultOpen:s=!1,onOpenChange:l,onOpenChangeComplete:u,disablePointerDismissal:p=!1,modal:c=!0,actionsRef:f,handle:g,triggerId:m,defaultTriggerId:h=null}=n,v="alert-dialog"===e,x=o(!0),b={modal:!!v||c,disablePointerDismissal:v||p,nested:null!=x,role:v?"alertdialog":"dialog"},C=(0,S.$)((e,t)=>new $({open:s,openProp:a,activeTriggerId:h,triggerIdProp:m,...b},e,t),!0);C.useControlledProp("openProp",a),C.useControlledProp("triggerIdProp",m),C.useSyncedValues(b),C.useContextCallback("onOpenChange",l),C.useContextCallback("onOpenChangeComplete",u);let w=C.useState("open"),y=C.useState("mounted"),P=C.useState("payload");(0,S.e)(C,w),(0,S._)(C);let{forceUnmount:R}=(0,S.L)(w,C);t.useImperativeHandle(f,()=>({unmount:R,close:()=>C.setOpen(!1,(0,d.j)(H.f.imperativeAction))}),[R,C]);let j=w||y||null!=g;return(0,O.jsxs)(r.Provider,{value:C,children:[g&&(0,O.jsx)(S.d,{handle:g,store:C}),j&&(0,O.jsx)(B,{store:C,parentContext:x?.context,isDrawer:"drawer"===e}),"function"==typeof i?i({payload:P}):i]})}e.s(["f",0,K],66250);let _=(0,D.U)(function(e){return K("dialog",e)}),V=t.forwardRef(function(e,t){let{render:n,className:r,style:a,id:s,...l}=e,d=o(),u=(0,c.f)(s);return d.useSyncedValueWithCleanup("titleElementId",u),(0,i.a)("h2",e,{ref:t,props:[{id:u},l]})});e.s(["f",0,V],77173);var G=e.i(38396),Z=e.i(59636),q=e.i(85689),J=e.i(32199);let X=(0,D.u)(function(e,r){let{render:s,className:d,style:u,disabled:p=!1,nativeButton:f=!0,id:g,payload:m,handle:h,...v}=e,x=o(!0),b=(0,Z.f)(h)??x;if(!b)throw Error((0,n.f)(79));let C=(0,c.f)(g),w=b.useState("floatingRootContext"),y=b.useState("isOpenedByTrigger",C),P=b.useState("triggerPopupId",C),R=t.useRef(null),{registerTrigger:O,isMountedByThisTrigger:j}=(0,S.F)(C,R,b,{payload:m}),{getButtonProps:k,buttonRef:E}=(0,l.f)({disabled:p,native:f}),T=(0,q.f)(w),I=(0,J.p)(()=>b.select("open"),e=>{b.set("openMethod",e)}),D=b.useState("triggerProps",j);return(0,i.a)("button",e,{state:{disabled:p,open:y},ref:[E,r,O,R],props:[T.reference,D,I,{[G.j]:"",id:C,"aria-haspopup":"dialog","aria-expanded":y,"aria-controls":P},v,k],stateAttributesMapping:a.J})});e.s(["f",0,X],13488),e.s(["Backdrop",0,s,"Close",0,p,"Description",0,f,"Popup",0,j,"Portal",0,I,"Root",0,_,"Title",0,V,"Trigger",0,X],28376);var Q=e.i(28376);e.s(["f",0,Q],26323),e.s(["f",0,Q],9977),e.s(["f",0,Q],41708),e.s(["f",0,Q],93480),e.s(["f",0,Q],9169),e.s(["f",0,Q],52744)},73327,e=>{let t=new Set(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Home","End"]);e.s(["f",0,t])},16786,59636,e=>{var t=e.i(56789),n=e.i(56341);let r=e=>e.triggerIdProp??e.activeTriggerId,o=e=>e.openProp??e.open,i=e=>(e.popupElement?.id??e.floatingId)||void 0;function a(e,t){return void 0!==t&&o(e)&&r(e)===t}e.s(["i",0,function(e,r,o=!1){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new n.f({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:r,syncOnly:!0,nested:o,onOpenChange:void 0}),floatingId:r,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,openedWithoutTrigger:!1,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:t.w,inactiveTriggerProps:t.w,popupProps:t.w}},"j",0,{open:o,mounted:e=>e.mounted,transitionStatus:e=>o(e)&&!e.mounted?"starting":e.transitionStatus,floatingRootContext:e=>e.floatingRootContext,triggerCount:e=>e.triggerCount,preventUnmountingOnClose:e=>e.preventUnmountingOnClose,payload:e=>e.payload,activeTriggerId:r,activeTriggerElement:e=>e.mounted?e.activeTriggerElement:null,popupId:i,isTriggerActive:(e,t)=>void 0!==t&&r(e)===t,isOpenedByTrigger:(e,t)=>a(e,t),isMountedByTrigger:(e,t)=>void 0!==t&&r(e)===t&&e.mounted,triggerProps:(e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps,triggerPopupId:(e,t)=>a(e,t)||void 0!==t&&o(e)&&null==r(e)&&!e.openedWithoutTrigger&&1===e.triggerCount?i(e):void 0,popupProps:e=>e.popupProps,popupElement:e=>e.popupElement,positionerElement:e=>e.positionerElement}],16786);var s=e.i(71645),l=e.i(2239);e.s(["f",0,function(e){let n=s.useCallback(n=>void 0===e?t.x:e.subscribeStore(n),[e]),r=s.useCallback(()=>void 0===e?void 0:e.store,[e]);return(0,l.useSyncExternalStore)(n,r,()=>e?.serverStore)}],59636)},95187,(e,t,n)=>{Object.defineProperty(n,"__esModule",{value:!0});var r={callServer:function(){return i.callServer},createServerReference:function(){return s.createServerReference},findSourceMapURL:function(){return a.findSourceMapURL}};for(var o in r)Object.defineProperty(n,o,{enumerable:!0,get:r[o]});let i=e.r(32120),a=e.r(92245),s=e.r(35326)},84821,e=>{var t=e.i(43476),n=e.i(56420);let r={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};r.node;let o=(0,n.f)(r);var i=e.i(60382),a=e.i(30186),s=e.i(72474),l=e.i(68423),d=e.i(71773);function u({switcher:e,account:n,onSearch:r,searchLabel:p="Search or jump to",children:c,actions:f,className:g}){return(0,t.jsxs)("header",{"data-slot":"app-header",className:(0,d.f)("sticky top-0 z-30 flex h-(--size-header) shrink-0 items-center justify-between gap-4 border-b border-border bg-background px-6",g),children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[void 0===e?(0,t.jsx)("span",{"data-testid":"app-switcher-loading","aria-hidden":!0,className:"h-4 w-36 shrink-0 animate-pulse rounded bg-muted motion-reduce:animate-none"}):(0,t.jsx)(i.AppSwitcher,{switcher:e,layout:"full",className:"shrink-0"}),c]}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center gap-3",children:[f,r?(0,t.jsxs)(a.f,{size:"sm",icon:(0,t.jsx)(o,{"aria-hidden":!0}),"data-testid":"header-search",className:"w-60 justify-start font-normal text-muted-foreground max-lg:w-auto",onClick:r,children:[(0,t.jsx)("span",{className:"grow text-left max-lg:sr-only",children:p}),(0,t.jsx)(s.f,{children:"⌘K"})]}):null,(0,t.jsx)(l.AvatarMenu,{...n})]})]})}var p=e.i(18566),c=e.i(71645),f=e.i(95187);let g=(0,f.createServerReference)("400c56f98daea692f14f4050874c69aaecc487ee9a",f.callServer,void 0,f.findSourceMapURL,"setTheme"),m=["light","dark","system"];var h=e.i(65894);let v=[{key:"bridge",label:"Bridge",path:"/bridge"},{key:"outside-parties",label:"Outside parties",path:"/outside-parties"},{key:"parties",label:"Parties",path:"/parties"},{key:"slack",label:"Slack",path:"/slack"}];function x({fleetId:e}){let n=(0,p.usePathname)();return(0,t.jsx)("nav",{"aria-label":"Gateway",className:"flex min-w-0 items-center gap-1 overflow-x-auto",children:v.map(({key:r,label:o,path:i})=>{let a=n===i||n.startsWith(`${i}/`);return(0,t.jsx)("a",{href:(0,h.f)(i,e),"data-testid":`frame-tab-${r}`,"aria-current":a?"page":void 0,className:`whitespace-nowrap rounded-md px-2 py-1 text-sm ${a?"bg-accent font-semibold":"text-muted-foreground hover:bg-accent"}`,children:o},r)})})}e.s(["GatewayHeader",0,function({switchers:e,email:n,accountUrl:r,theme:o}){let a=(0,p.useSearchParams)().get("fleet"),s=e.find(({fleet:e})=>e.id===a)??e[0],[d,f]=(0,c.useState)(o),[h,v]=(0,c.useState)(!1),S=(0,c.useRef)(null),b={name:n,signedInAs:"account",accountUrl:r,theme:d,themes:m,hasTheme:!0,onThemeChange:e=>{let t;f(e),document.documentElement.dataset.theme=e,t="dark"===e||"system"===e&&window.matchMedia("(prefers-color-scheme: dark)").matches,document.documentElement.classList.toggle("dark",t),g(e)},shortcuts:[],helpUrl:"https://github.com/ThomasHendrickx/aeolus-fleet",onSignOut:()=>{v(!0),S.current?.requestSubmit()},isSigningOut:h};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("form",{ref:S,method:"post",action:"/sign-in/end",hidden:!0}),(0,t.jsx)(u,{switcher:s,account:b,className:"max-sm:hidden",children:void 0===s?null:(0,t.jsx)(x,{fleetId:s.fleet.id})}),(0,t.jsxs)("header",{className:"sticky top-0 z-30 flex h-14 shrink-0 items-center gap-3 border-b border-border bg-background px-4 sm:hidden",children:[void 0===s?null:(0,t.jsx)(i.AppSwitcher,{switcher:s,layout:"compact",className:"min-w-0"}),void 0===s?null:(0,t.jsx)(x,{fleetId:s.fleet.id}),(0,t.jsx)("span",{className:"grow"}),(0,t.jsx)(l.AvatarMenuSheet,{...b})]})]})}],84821)},65894,e=>{e.s(["f",0,function(e,t){let[n="",r=""]=e.split("?"),o=new URLSearchParams(r);return o.set("fleet",t),`${n}?${o.toString()}`}])}],18566,(e,t,n)=>{t.exports=e.r(76562)}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,[26323,8821,56736,25834,35890,64938,80829,6640,10199,64951,66250,77173,13488,28376,9977,41708,93480,9169,52744,e=>{var t=e.i(71645),n=e.i(33332);let r=t.createContext(void 0);function o(e){let o=t.useContext(r);if(!e&&void 0===o)throw Error((0,n.f)(27));return o}e.s(["R",0,r,"x",0,o],8821);var i=e.i(52245),a=e.i(79938);let s=t.forwardRef(function(e,t){let{render:n,className:r,style:s,forceRender:l=!1,...d}=e,u=o(),p=u.useState("open"),c=u.useState("nested"),f=u.useState("mounted"),g=u.useState("transitionStatus");return(0,i.a)("div",e,{state:{open:p,transitionStatus:g},ref:[u.context.backdropRef,t],stateAttributesMapping:a.M,props:[{role:"presentation",hidden:!f,style:{userSelect:"none",WebkitUserSelect:"none"}},d],enabled:l||!c})});var l=e.i(40886),d=e.i(75606),u=e.i(57749);let p=t.forwardRef(function(e,t){let{render:n,className:r,style:a,disabled:s=!1,nativeButton:p=!0,...c}=e,f=o(),g=f.useState("open"),{getButtonProps:m,buttonRef:h}=(0,l.f)({disabled:s,native:p});return(0,i.a)("button",e,{state:{disabled:s},ref:[t,h],props:[{onClick:function(e){g&&f.setOpen(!1,(0,d.j)(u.f.closePress,e.nativeEvent))}},c,m]})});e.s(["f",0,p],56736);var c=e.i(88015);let f=t.forwardRef(function(e,t){let{render:n,className:r,style:a,id:s,...l}=e,d=o(),u=(0,c.f)(s);return d.useSyncedValueWithCleanup("descriptionElementId",u),(0,i.a)("p",e,{ref:t,props:[{id:u},l]})});var g=e.i(61487);let m=t.createContext(void 0);function h(){let e=t.useContext(m);if(void 0===e)throw Error((0,n.f)(26));return e}e.s(["_",0,m,"Z",0,h],25834);var v=e.i(37584),x=e.i(73327),S=e.i(64111),b=e.i(74354),C=e.i(38380);e.s(["f",0,C],35890);var C=C,w=C;e.s(["f",0,w],64938);var w=C,y=C;e.s(["f",0,y],80829);var y=C,P=C;e.s(["f",0,P],6640);var P=C;C.open,w.closed,y.startingStyle,P.endingStyle;let R={...a.E,...b.f,nestedDialogOpen:e=>e?{"data-nested-dialog-open":""}:null};e.s(["f",0,R],10199);var O=e.i(43476);let j=t.forwardRef(function(e,t){let{render:n,className:r,style:a,finalFocus:s,initialFocus:l,...d}=e,u=o(),p=u.useState("descriptionElementId"),c=u.useState("disablePointerDismissal"),f=u.useState("floatingRootContext"),m=u.useState("popupProps"),b=u.useState("modal"),C=u.useState("mounted"),w=u.useState("nested"),y=u.useState("nestedOpenDialogCount"),P=u.useState("open"),j=u.useState("openMethod"),k=u.useState("titleElementId"),E=u.useState("transitionStatus"),T=u.useState("role"),I=f.useState("floatingId");h(),(0,v.f)({open:P,ref:u.context.popupRef,onComplete(){P&&u.context.onOpenChangeComplete?.(!0)}});let D=void 0===l?(0,S.H)(u.context.popupRef):l,N=u.useStateSetter("popupElement"),A=(0,i.a)("div",e,{state:{open:P,nested:w,transitionStatus:E,nestedDialogOpen:y>0},props:[m,{id:I,"aria-labelledby":k,"aria-describedby":p,role:T,...S.X,hidden:!C,onKeyDown(e){x.f.has(e.key)&&e.stopPropagation()},style:{"--nested-dialogs":y}},d],ref:[t,u.context.popupRef,N],stateAttributesMapping:R});return(0,O.jsx)(g.f,{context:f,openInteractionType:j,disabled:!C,closeOnFocusOut:!c,initialFocus:D,returnFocus:s,modal:!1!==b,restoreFocus:"popup",children:A})});var k=e.i(44394),E=e.i(26674),T=e.i(426);let I=t.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,i=o(),a=i.useState("mounted"),s=i.useState("modal"),l=i.useState("open");return a||n?(0,O.jsx)(m.Provider,{value:n,children:(0,O.jsxs)(E.r,{ref:t,...r,children:[a&&!0===s&&(0,O.jsx)(T.f,{ref:i.context.internalBackdropRef,inert:(0,k.f)(!l)}),e.children]})}):null});e.s(["f",0,I],64951);var D=e.i(96499),N=e.i(46376),A=e.i(45484),M=e.i(17989),U=e.i(84446);function B({store:e,parentContext:n,isDrawer:r}){let o=e.useState("open"),i=e.useState("mounted"),a=e.useState("disablePointerDismissal"),s=e.useState("modal"),l=e.useState("popupElement"),d=e.useState("floatingRootContext"),[u,p]=t.useState(0),[c,f]=t.useState(0),g=0===u,m=(0,M.f)(d,{outsidePressEvent:()=>e.context.internalBackdropRef.current||e.context.backdropRef.current?"intentional":{mouse:"trap-focus"===s?"sloppy":"intentional",touch:"sloppy"},outsidePress(t){if(!e.context.outsidePressEnabledRef.current||"button"in t&&0!==t.button)return!1;if("touches"in t){if("touchend"===t.type){if(1!==t.changedTouches.length||0!==t.touches.length)return!1}else if(1!==t.touches.length)return!1}let n=(0,U.Z)(t);if(g&&!a){if(s){let t=e.context.internalBackdropRef.current,r=e.context.backdropRef.current;return!t&&!r||t===n||r===n||(0,U.I)(n,l)&&!n?.hasAttribute("data-base-ui-portal")}return!0}return!1},escapeKey:g});return(0,A.f)(o&&!0===s,l),e.useContextCallback("onNestedDialogOpen",(t,n)=>{(e.select("open")||e.select("mounted"))&&(p(t),f(n))}),(0,N.f)(()=>{o||i||(p(0),f(0))},[o,i]),(0,N.f)(()=>(n?.onNestedDialogOpen&&o&&n.onNestedDialogOpen(u+1,c+ +!!r),()=>{n?.onNestedDialogOpen&&o&&n.onNestedDialogOpen(0,0)}),[r,o,u,c,n]),(0,S.y)(e,{activeTriggerProps:m.reference,inactiveTriggerProps:m.trigger,popupProps:m.floating,nestedOpenDialogCount:u,nestedOpenDrawerCount:c}),null}var L=e.i(1252),z=e.i(16786),F=e.i(90627);let W={...z.j,modal:e=>e.modal,nested:e=>e.nested,nestedOpenDialogCount:e=>e.nestedOpenDialogCount,nestedOpenDrawerCount:e=>e.nestedOpenDrawerCount,disablePointerDismissal:e=>e.disablePointerDismissal,openMethod:e=>e.openMethod,descriptionElementId:e=>e.descriptionElementId,titleElementId:e=>e.titleElementId,viewportElement:e=>e.viewportElement,role:e=>e.role};class $ extends L.f{constructor(e,n,r){var o;let i=new F.f;super(function(e,t,n,r=!1){return{...(0,z.i)(t,n,r),modal:!0,disablePointerDismissal:!1,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:"dialog",...e}}(e,i,n,r),(o=i,{popupRef:t.createRef(),backdropRef:t.createRef(),internalBackdropRef:t.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:o,onOpenChange:void 0,onOpenChangeComplete:void 0}),W)}setOpen=(e,t)=>{t.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},e||null!=t.trigger||null==this.state.activeTriggerId||(t.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,t),t.isCanceled||(this.state.floatingRootContext.dispatchOpenChange(e,t),this.update((0,S.z)(this.state,e,t.trigger)))}}var H=e.i(68765);function K(e,n){let{children:i,open:a,defaultOpen:s=!1,onOpenChange:l,onOpenChangeComplete:u,disablePointerDismissal:p=!1,modal:c=!0,actionsRef:f,handle:g,triggerId:m,defaultTriggerId:h=null}=n,v="alert-dialog"===e,x=o(!0),b={modal:!!v||c,disablePointerDismissal:v||p,nested:null!=x,role:v?"alertdialog":"dialog"},C=(0,S.$)((e,t)=>new $({open:s,openProp:a,activeTriggerId:h,triggerIdProp:m,...b},e,t),!0);C.useControlledProp("openProp",a),C.useControlledProp("triggerIdProp",m),C.useSyncedValues(b),C.useContextCallback("onOpenChange",l),C.useContextCallback("onOpenChangeComplete",u);let w=C.useState("open"),y=C.useState("mounted"),P=C.useState("payload");(0,S.e)(C,w),(0,S._)(C);let{forceUnmount:R}=(0,S.L)(w,C);t.useImperativeHandle(f,()=>({unmount:R,close:()=>C.setOpen(!1,(0,d.j)(H.f.imperativeAction))}),[R,C]);let j=w||y||null!=g;return(0,O.jsxs)(r.Provider,{value:C,children:[g&&(0,O.jsx)(S.d,{handle:g,store:C}),j&&(0,O.jsx)(B,{store:C,parentContext:x?.context,isDrawer:"drawer"===e}),"function"==typeof i?i({payload:P}):i]})}e.s(["f",0,K],66250);let _=(0,D.U)(function(e){return K("dialog",e)}),V=t.forwardRef(function(e,t){let{render:n,className:r,style:a,id:s,...l}=e,d=o(),u=(0,c.f)(s);return d.useSyncedValueWithCleanup("titleElementId",u),(0,i.a)("h2",e,{ref:t,props:[{id:u},l]})});e.s(["f",0,V],77173);var G=e.i(38396),Z=e.i(59636),q=e.i(85689),J=e.i(32199);let X=(0,D.u)(function(e,r){let{render:s,className:d,style:u,disabled:p=!1,nativeButton:f=!0,id:g,payload:m,handle:h,...v}=e,x=o(!0),b=(0,Z.f)(h)??x;if(!b)throw Error((0,n.f)(79));let C=(0,c.f)(g),w=b.useState("floatingRootContext"),y=b.useState("isOpenedByTrigger",C),P=b.useState("triggerPopupId",C),R=t.useRef(null),{registerTrigger:O,isMountedByThisTrigger:j}=(0,S.F)(C,R,b,{payload:m}),{getButtonProps:k,buttonRef:E}=(0,l.f)({disabled:p,native:f}),T=(0,q.f)(w),I=(0,J.p)(()=>b.select("open"),e=>{b.set("openMethod",e)}),D=b.useState("triggerProps",j);return(0,i.a)("button",e,{state:{disabled:p,open:y},ref:[E,r,O,R],props:[T.reference,D,I,{[G.j]:"",id:C,"aria-haspopup":"dialog","aria-expanded":y,"aria-controls":P},v,k],stateAttributesMapping:a.J})});e.s(["f",0,X],13488),e.s(["Backdrop",0,s,"Close",0,p,"Description",0,f,"Popup",0,j,"Portal",0,I,"Root",0,_,"Title",0,V,"Trigger",0,X],28376);var Q=e.i(28376);e.s(["f",0,Q],26323),e.s(["f",0,Q],9977),e.s(["f",0,Q],41708),e.s(["f",0,Q],93480),e.s(["f",0,Q],9169),e.s(["f",0,Q],52744)},73327,e=>{let t=new Set(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Home","End"]);e.s(["f",0,t])},16786,59636,e=>{var t=e.i(56789),n=e.i(56341);let r=e=>e.triggerIdProp??e.activeTriggerId,o=e=>e.openProp??e.open,i=e=>(e.popupElement?.id??e.floatingId)||void 0;function a(e,t){return void 0!==t&&o(e)&&r(e)===t}e.s(["i",0,function(e,r,o=!1){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new n.f({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:r,syncOnly:!0,nested:o,onOpenChange:void 0}),floatingId:r,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,openedWithoutTrigger:!1,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:t.w,inactiveTriggerProps:t.w,popupProps:t.w}},"j",0,{open:o,mounted:e=>e.mounted,transitionStatus:e=>o(e)&&!e.mounted?"starting":e.transitionStatus,floatingRootContext:e=>e.floatingRootContext,triggerCount:e=>e.triggerCount,preventUnmountingOnClose:e=>e.preventUnmountingOnClose,payload:e=>e.payload,activeTriggerId:r,activeTriggerElement:e=>e.mounted?e.activeTriggerElement:null,popupId:i,isTriggerActive:(e,t)=>void 0!==t&&r(e)===t,isOpenedByTrigger:(e,t)=>a(e,t),isMountedByTrigger:(e,t)=>void 0!==t&&r(e)===t&&e.mounted,triggerProps:(e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps,triggerPopupId:(e,t)=>a(e,t)||void 0!==t&&o(e)&&null==r(e)&&!e.openedWithoutTrigger&&1===e.triggerCount?i(e):void 0,popupProps:e=>e.popupProps,popupElement:e=>e.popupElement,positionerElement:e=>e.positionerElement}],16786);var s=e.i(71645),l=e.i(2239);e.s(["f",0,function(e){let n=s.useCallback(n=>void 0===e?t.x:e.subscribeStore(n),[e]),r=s.useCallback(()=>void 0===e?void 0:e.store,[e]);return(0,l.useSyncExternalStore)(n,r,()=>e?.serverStore)}],59636)},95187,(e,t,n)=>{Object.defineProperty(n,"__esModule",{value:!0});var r={callServer:function(){return i.callServer},createServerReference:function(){return s.createServerReference},findSourceMapURL:function(){return a.findSourceMapURL}};for(var o in r)Object.defineProperty(n,o,{enumerable:!0,get:r[o]});let i=e.r(32120),a=e.r(92245),s=e.r(35326)},84821,e=>{var t=e.i(43476),n=e.i(56420);let r={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};r.node;let o=(0,n.f)(r);var i=e.i(60382),a=e.i(30186),s=e.i(72474),l=e.i(68423),d=e.i(71773);function u({switcher:e,account:n,onSearch:r,searchLabel:p="Search or jump to",children:c,actions:f,className:g}){return(0,t.jsxs)("header",{"data-slot":"app-header",className:(0,d.f)("sticky top-0 z-30 flex h-(--size-header) shrink-0 items-center justify-between gap-4 border-b border-border bg-background px-6",g),children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[void 0===e?(0,t.jsx)("span",{"data-testid":"app-switcher-loading","aria-hidden":!0,className:"h-4 w-36 shrink-0 animate-pulse rounded bg-muted motion-reduce:animate-none"}):(0,t.jsx)(i.AppSwitcher,{switcher:e,layout:"full",className:"shrink-0"}),c]}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center gap-3",children:[f,r?(0,t.jsxs)(a.f,{size:"sm",icon:(0,t.jsx)(o,{"aria-hidden":!0}),"data-testid":"header-search",className:"w-60 justify-start font-normal text-muted-foreground max-lg:w-auto",onClick:r,children:[(0,t.jsx)("span",{className:"grow text-left max-lg:sr-only",children:p}),(0,t.jsx)(s.f,{children:"⌘K"})]}):null,(0,t.jsx)(l.AvatarMenu,{...n})]})]})}var p=e.i(18566),c=e.i(71645),f=e.i(95187);let g=(0,f.createServerReference)("4050b261d17e2b265fd019f61804f3eae3b8901966",f.callServer,void 0,f.findSourceMapURL,"setTheme"),m=["light","dark","system"];var h=e.i(65894);let v=[{key:"bridge",label:"Bridge",path:"/bridge"},{key:"outside-parties",label:"Outside parties",path:"/outside-parties"},{key:"parties",label:"Parties",path:"/parties"},{key:"slack",label:"Slack",path:"/slack"}];function x({fleetId:e}){let n=(0,p.usePathname)();return(0,t.jsx)("nav",{"aria-label":"Gateway",className:"flex min-w-0 items-center gap-1 overflow-x-auto",children:v.map(({key:r,label:o,path:i})=>{let a=n===i||n.startsWith(`${i}/`);return(0,t.jsx)("a",{href:(0,h.f)(i,e),"data-testid":`frame-tab-${r}`,"aria-current":a?"page":void 0,className:`whitespace-nowrap rounded-md px-2 py-1 text-sm ${a?"bg-accent font-semibold":"text-muted-foreground hover:bg-accent"}`,children:o},r)})})}e.s(["GatewayHeader",0,function({switchers:e,email:n,accountUrl:r,theme:o}){let a=(0,p.useSearchParams)().get("fleet"),s=e.find(({fleet:e})=>e.id===a)??e[0],[d,f]=(0,c.useState)(o),[h,v]=(0,c.useState)(!1),S=(0,c.useRef)(null),b={name:n,signedInAs:"account",accountUrl:r,theme:d,themes:m,hasTheme:!0,onThemeChange:e=>{let t;f(e),document.documentElement.dataset.theme=e,t="dark"===e||"system"===e&&window.matchMedia("(prefers-color-scheme: dark)").matches,document.documentElement.classList.toggle("dark",t),g(e)},shortcuts:[],helpUrl:"https://github.com/ThomasHendrickx/aeolus-fleet",onSignOut:()=>{v(!0),S.current?.requestSubmit()},isSigningOut:h};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("form",{ref:S,method:"post",action:"/sign-in/end",hidden:!0}),(0,t.jsx)(u,{switcher:s,account:b,className:"max-sm:hidden",children:void 0===s?null:(0,t.jsx)(x,{fleetId:s.fleet.id})}),(0,t.jsxs)("header",{className:"sticky top-0 z-30 flex h-14 shrink-0 items-center gap-3 border-b border-border bg-background px-4 sm:hidden",children:[void 0===s?null:(0,t.jsx)(i.AppSwitcher,{switcher:s,layout:"compact",className:"min-w-0"}),void 0===s?null:(0,t.jsx)(x,{fleetId:s.fleet.id}),(0,t.jsx)("span",{className:"grow"}),(0,t.jsx)(l.AvatarMenuSheet,{...b})]})]})}],84821)},65894,e=>{e.s(["f",0,function(e,t){let[n="",r=""]=e.split("?"),o=new URLSearchParams(r);return o.set("fleet",t),`${n}?${o.toString()}`}])}],18566,(e,t,n)=>{t.exports=e.r(76562)}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,10629,e=>{var r=e.i(71645),i=e.i(18566);e.s(["LiveRefresh",0,function({fleetId:e}){let a;return a=(0,i.useRouter)(),(0,r.useEffect)(()=>{let r=new EventSource(`/bridge/changes?fleet=${encodeURIComponent(e)}`);return r.onmessage=()=>{a.refresh()},()=>{r.close()}},[e,a]),(0,r.useEffect)(()=>{let r,i=()=>{let i="visible"===document.visibilityState&&document.hasFocus();i&&void 0===r?r=new EventSource(`/bridge/focus?fleet=${encodeURIComponent(e)}`):i||void 0===r||(r.close(),r=void 0)};return i(),window.addEventListener("focus",i),window.addEventListener("blur",i),document.addEventListener("visibilitychange",i),()=>{window.removeEventListener("focus",i),window.removeEventListener("blur",i),document.removeEventListener("visibilitychange",i),r?.close()}},[e]),null}],10629)},85678,e=>{var r=e.i(43476),i=e.i(71645),a=e.i(95187);let t=(0,a.createServerReference)("40720a2e7f7a70673a75e3a4c0d8b553caf05d2f9f",a.callServer,void 0,a.findSourceMapURL,"turnRoute"),s=["slack","chat","web-push","email"],n={decide:{name:"Decide",holds:"Questions from your ships",item:"question",items:"questions"},do:{name:"Do what only you can",holds:"Steps: sign in, create, approve",item:"step",items:"steps"},"stay-aware":{name:"Stay aware",holds:"Alerts and notices",item:"alert or notice",items:"alerts and notices"},"everything-else":{name:"Everything else",holds:"Replies and other messages",item:"message",items:"messages"}},o={slack:"Slack",chat:"A chat","web-push":"Web push",email:"Email"},d="Bridge keeps every item.";var l=e.i(63132);e.s(["RoutingPanel",0,function({fleetId:e,routing:a,isSlackLinked:c}){let[u,b]=(0,i.useTransition)(),[m,h]=(0,i.useState)(),[g,f]=(0,i.useState)();return(0,r.jsxs)("section",{className:"grid gap-2","aria-labelledby":"bridge-routing-heading",children:[(0,r.jsx)("h2",{id:"bridge-routing-heading",className:"text-section font-semibold",children:"Per job"}),(0,r.jsx)("div",{className:"overflow-x-auto rounded-md border border-border bg-card",children:(0,r.jsxs)("table",{className:"w-full text-left",children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{className:"border-b border-border text-caption text-muted-foreground",children:[(0,r.jsx)("th",{scope:"col",className:"p-3 font-medium",children:"Job"}),(0,r.jsx)("th",{scope:"col",className:"p-3 font-medium",children:"Bridge"}),s.map(e=>(0,r.jsx)("th",{scope:"col",className:"p-3 font-medium",children:o[e]},e))]})}),(0,r.jsx)("tbody",{children:a.jobs.map(({job:i,places:l})=>(0,r.jsxs)("tr",{"data-testid":"bridge-routing-job",className:"border-b border-border last:border-b-0",children:[(0,r.jsx)("th",{scope:"row",className:"p-3 font-normal",children:(0,r.jsxs)("span",{className:"flex flex-col",children:[(0,r.jsx)("span",{children:n[i].name}),(0,r.jsx)("span",{className:"text-caption text-muted-foreground",children:n[i].holds})]})}),(0,r.jsx)("td",{className:"p-3 text-caption text-muted-foreground",children:"Always"}),s.map(s=>{let g=l[s],p=`${i}-${s}`;return(0,r.jsx)("td",{className:"p-3",children:(0,r.jsx)("button",{type:"button","data-testid":`bridge-routing-${p}`,"aria-pressed":g,"aria-label":`${o[s]} for ${n[i].name}`,"aria-busy":u&&m===p,disabled:u||!g&&(!a.offered[s]||"slack"===s&&!c),onClick:()=>{var r;r={job:i,place:s,isOn:!g},f(void 0),h(`${r.job}-${r.place}`),b(async()=>{let i=await t({fleet:e,...r});f(i.isOk?{message:function({job:e,place:r,isOn:i}){let{name:a,item:t,items:s}=n[e],l=`${o[r]} is ${i?"on":"off"} for ${a}`;return i?"chat"===r?`${l}: it lists every ${t} not done when you ask it.`:`${l}: it shows ${s} that arrive from now on. Those already waiting stay in Bridge.`:"everything-else"===e&&"slack"===r?`${l}: only a bot ship's messages and replies to Slack show there. ${d}`:`${l}. ${d}`}(r),isFailure:!1}:{message:i.message,isFailure:!0})})},className:`inline-flex h-7 min-w-12 items-center justify-center rounded-full px-3 text-caption disabled:cursor-not-allowed disabled:opacity-50 ${g?"bg-primary text-primary-foreground":"border border-border bg-card text-muted-foreground hover:bg-accent"}`,children:g?"On":"Off"})},s)})]},i))})]})}),void 0===g?null:(0,r.jsx)(l.f,{message:g.message,isFailure:g.isFailure}),(0,r.jsx)("p",{className:"text-caption text-muted-foreground",children:"While a Bridge page is open in focus, web push and email do not wake you. Slack still posts: you turned it on, and Bridge keeps every item."})]})}],85678)},61641,e=>{var r=e.i(43476),i=e.i(71645),a=e.i(95187);let t=(0,a.createServerReference)("40bc48a9fabe75ea0125a8969f993153e9f0a9f644",a.callServer,void 0,a.findSourceMapURL,"unlinkSlack");var s=e.i(55070),n=e.i(63132);e.s(["SlackLinkPanel",0,function({fleetId:e,slackLink:a}){let[o,d]=(0,i.useTransition)(),[l,c]=(0,i.useState)(),{workspaceName:u,link:b}=a;return(0,r.jsxs)("section",{className:"grid gap-2","aria-labelledby":"bridge-slack-heading",children:[(0,r.jsx)("h2",{id:"bridge-slack-heading",className:"text-section font-semibold",children:"Slack"}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-3 rounded-md border border-border bg-card p-3",children:[(0,r.jsx)("span",{"data-testid":"bridge-slack-state",className:"min-w-0 flex-1",children:null===b?`Not linked in ${u}`:`Slack linked as @${b.slackName} in ${u}`}),null===b?(0,r.jsx)("a",{href:`/slack/link?${new URLSearchParams({fleet:e}).toString()}`,"data-testid":"bridge-slack-link",className:"inline-flex h-9 items-center rounded-md bg-primary px-4 text-primary-foreground hover:bg-primary-hover",children:"Link Slack"}):(0,r.jsx)(s.f,{"data-testid":"bridge-slack-unlink",isPending:o,pendingLabel:"Unlinking...",onClick:()=>{c(void 0),d(async()=>{let r=await t(e);r.isOk||c(r.message)})},children:"Unlink"})]}),void 0===l?null:(0,r.jsx)(n.f,{message:l,isFailure:!0})]})}],61641)},32036,e=>{var r=e.i(43476),i=e.i(71645),a=e.i(95187);let t=(0,a.createServerReference)("60eaa9c806d6593a0208abff2bc4d470472e235af0",a.callServer,void 0,a.findSourceMapURL,"turnOffWebPush"),s=(0,a.createServerReference)("60c97fa100defe2ce2abac96196c23f10c622fd02d",a.callServer,void 0,a.findSourceMapURL,"turnOnWebPush"),n=[[/Edg\//,"Edge"],[/Firefox\//,"Firefox"],[/Chrome\//,"Chrome"],[/Safari\//,"Safari"]],o=[[/iPhone|iPad/,"iOS"],[/Android/,"Android"],[/Mac OS X/,"macOS"],[/Windows/,"Windows"],[/Linux/,"Linux"]],d=(e,r)=>r.find(([r])=>r.test(e))?.[1];var l=e.i(55070),c=e.i(63132);let u="/wake-worker.js";async function b(){let e=await navigator.serviceWorker.getRegistration(u);return await e?.pushManager.getSubscription()??null}async function m(e){let r;if(await Notification.requestPermission()!=="granted")return{isOk:!1,message:"Your browser did not allow notifications from this site: allow them, then turn web push on again"};let i=await navigator.serviceWorker.register(u);return await navigator.serviceWorker.ready,{isOk:!0,value:await i.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:(r=atob(e.replaceAll("-","+").replaceAll("_","/")),Uint8Array.from(r,e=>e.charCodeAt(0)))})}}e.s(["WebPushPanel",0,function({fleetId:e,webPushKey:a,browsers:u}){let[h,g]=(0,i.useState)(!0),[f,p]=(0,i.useState)(),[v,x]=(0,i.useState)(),[w,y]=(0,i.useState)(),[,k]=(0,i.useTransition)();(0,i.useEffect)(()=>{"serviceWorker"in navigator&&"PushManager"in window&&"Notification"in window?b().then(e=>{p(e?.endpoint)}):g(!1)},[]);let j=void 0!==f&&u.some(({endpoint:e,isGone:r})=>e===f&&!r);return(0,r.jsxs)("div",{className:"grid gap-2","data-testid":"bridge-wake-web-push",children:[u.map(({endpoint:i,browser:a,addedAt:s,isGone:n})=>(0,r.jsxs)("div",{className:"flex items-center gap-3 rounded-md border border-border bg-card p-3",children:[(0,r.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col",children:[(0,r.jsxs)("span",{className:"truncate",children:["Web push in ",a,i===f?" · this browser":""]}),(0,r.jsx)("span",{className:"text-caption text-muted-foreground",children:n?"No longer takes wakes: its push service ended them. Turn web push on again in that browser, or remove it.":`On since ${new Date(s).toLocaleDateString()}: it tells you when something waits in this fleet, with a link here. Never what waits.`})]}),(0,r.jsx)(l.f,{"data-testid":"bridge-web-push-remove",isPending:v===i,pendingLabel:"Removing...",disabled:void 0!==v,onClick:()=>{x(i),y(void 0),k(async()=>{i===f&&(await (await b())?.unsubscribe(),p(void 0));let r=await t(e,i);x(void 0),r.isOk||y(r.message)})},children:"Remove"})]},i)),h?j?null:(0,r.jsx)("div",{children:(0,r.jsx)(l.f,{"data-testid":"bridge-web-push-on",variant:"primary",isPending:"on"===v,pendingLabel:"Turning on...",disabled:void 0!==v,onClick:()=>{x("on"),y(void 0),k(async()=>{try{var r;let i,t,l=await m(a);if(!l.isOk)return void y(l.message);let c=function(e,r){let{endpoint:i,keys:a}=e,t=a?.p256dh,s=a?.auth;return void 0===i||void 0===t||void 0===s?void 0:{endpoint:i,keys:{p256dh:t,auth:s},browser:r}}(l.value.toJSON(),(r=navigator.userAgent,i=d(r,n),t=d(r,o),void 0===i?"A browser":void 0===t?i:`${i} on ${t}`));if(void 0===c)return void y("Your browser gave no push subscription: try again");let u=await s(e,c);u.isOk?p(c.endpoint):y(u.message)}catch{y("Your browser could not turn web push on: try again")}finally{x(void 0)}})},children:"Turn on web push in this browser"})}):(0,r.jsx)("p",{className:"text-caption text-muted-foreground",children:"This browser takes no web push."}),void 0===w?null:(0,r.jsx)(c.f,{message:w,isFailure:!0})]})}],32036)},55070,e=>{var r=e.i(43476);let i={primary:"bg-primary text-primary-foreground hover:bg-primary-hover",secondary:"border border-border bg-card text-card-foreground hover:bg-accent"};e.s(["f",0,function({isPending:e,pendingLabel:a,variant:t="secondary",children:s,className:n="",disabled:o,...d}){return(0,r.jsx)("button",{...d,disabled:!0===o||e,"aria-busy":e,className:`inline-flex h-9 items-center gap-2 rounded-md px-4 disabled:cursor-not-allowed disabled:opacity-70 ${i[t]} ${n}`,children:e?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{"aria-hidden":"true",className:"size-3.5 animate-spin rounded-full border-2 border-current border-t-transparent"}),a]}):s})}])},63132,e=>{var r=e.i(43476);e.s(["f",0,function({message:e,isFailure:i}){return i?(0,r.jsx)("p",{role:"alert","data-testid":"bridge-failure",className:"rounded-md border border-tone-attention-border bg-tone-attention-bg px-3 py-2 text-tone-attention-fg",children:e}):(0,r.jsx)("p",{role:"status","data-testid":"bridge-success",className:"rounded-md border border-tone-ok-border bg-tone-ok-bg px-3 py-2 text-tone-ok-fg",children:e})}])}])})();
|
|
1
|
+
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,10629,e=>{var r=e.i(71645),i=e.i(18566);e.s(["LiveRefresh",0,function({fleetId:e}){let a;return a=(0,i.useRouter)(),(0,r.useEffect)(()=>{let r=new EventSource(`/bridge/changes?fleet=${encodeURIComponent(e)}`);return r.onmessage=()=>{a.refresh()},()=>{r.close()}},[e,a]),(0,r.useEffect)(()=>{let r,i=()=>{let i="visible"===document.visibilityState&&document.hasFocus();i&&void 0===r?r=new EventSource(`/bridge/focus?fleet=${encodeURIComponent(e)}`):i||void 0===r||(r.close(),r=void 0)};return i(),window.addEventListener("focus",i),window.addEventListener("blur",i),document.addEventListener("visibilitychange",i),()=>{window.removeEventListener("focus",i),window.removeEventListener("blur",i),document.removeEventListener("visibilitychange",i),r?.close()}},[e]),null}],10629)},85678,e=>{var r=e.i(43476),i=e.i(71645),a=e.i(95187);let t=(0,a.createServerReference)("40d55047d0fa263dfb22afcf17c36e422f88773b7f",a.callServer,void 0,a.findSourceMapURL,"turnRoute"),s=["slack","chat","web-push","email"],n={decide:{name:"Decide",holds:"Questions from your ships",item:"question",items:"questions"},do:{name:"Do what only you can",holds:"Steps: sign in, create, approve",item:"step",items:"steps"},"stay-aware":{name:"Stay aware",holds:"Alerts and notices",item:"alert or notice",items:"alerts and notices"},"everything-else":{name:"Everything else",holds:"Replies and other messages",item:"message",items:"messages"}},o={slack:"Slack",chat:"A chat","web-push":"Web push",email:"Email"},d="Bridge keeps every item.";var l=e.i(63132);e.s(["RoutingPanel",0,function({fleetId:e,routing:a,isSlackLinked:c}){let[u,m]=(0,i.useTransition)(),[b,h]=(0,i.useState)(),[g,f]=(0,i.useState)();return(0,r.jsxs)("section",{className:"grid gap-2","aria-labelledby":"bridge-routing-heading",children:[(0,r.jsx)("h2",{id:"bridge-routing-heading",className:"text-section font-semibold",children:"Per job"}),(0,r.jsx)("div",{className:"overflow-x-auto rounded-md border border-border bg-card",children:(0,r.jsxs)("table",{className:"w-full text-left",children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{className:"border-b border-border text-caption text-muted-foreground",children:[(0,r.jsx)("th",{scope:"col",className:"p-3 font-medium",children:"Job"}),(0,r.jsx)("th",{scope:"col",className:"p-3 font-medium",children:"Bridge"}),s.map(e=>(0,r.jsx)("th",{scope:"col",className:"p-3 font-medium",children:o[e]},e))]})}),(0,r.jsx)("tbody",{children:a.jobs.map(({job:i,places:l})=>(0,r.jsxs)("tr",{"data-testid":"bridge-routing-job",className:"border-b border-border last:border-b-0",children:[(0,r.jsx)("th",{scope:"row",className:"p-3 font-normal",children:(0,r.jsxs)("span",{className:"flex flex-col",children:[(0,r.jsx)("span",{children:n[i].name}),(0,r.jsx)("span",{className:"text-caption text-muted-foreground",children:n[i].holds})]})}),(0,r.jsx)("td",{className:"p-3 text-caption text-muted-foreground",children:"Always"}),s.map(s=>{let g=l[s],p=`${i}-${s}`;return(0,r.jsx)("td",{className:"p-3",children:(0,r.jsx)("button",{type:"button","data-testid":`bridge-routing-${p}`,"aria-pressed":g,"aria-label":`${o[s]} for ${n[i].name}`,"aria-busy":u&&b===p,disabled:u||!g&&(!a.offered[s]||"slack"===s&&!c),onClick:()=>{var r;r={job:i,place:s,isOn:!g},f(void 0),h(`${r.job}-${r.place}`),m(async()=>{let i=await t({fleet:e,...r});f(i.isOk?{message:function({job:e,place:r,isOn:i}){let{name:a,item:t,items:s}=n[e],l=`${o[r]} is ${i?"on":"off"} for ${a}`;return i?"chat"===r?`${l}: it lists every ${t} not done when you ask it.`:`${l}: it shows ${s} that arrive from now on. Those already waiting stay in Bridge.`:"everything-else"===e&&"slack"===r?`${l}: only a bot ship's messages and replies to Slack show there. ${d}`:`${l}. ${d}`}(r),isFailure:!1}:{message:i.message,isFailure:!0})})},className:`inline-flex h-7 min-w-12 items-center justify-center rounded-full px-3 text-caption disabled:cursor-not-allowed disabled:opacity-50 ${g?"bg-primary text-primary-foreground":"border border-border bg-card text-muted-foreground hover:bg-accent"}`,children:g?"On":"Off"})},s)})]},i))})]})}),void 0===g?null:(0,r.jsx)(l.f,{message:g.message,isFailure:g.isFailure}),(0,r.jsx)("p",{className:"text-caption text-muted-foreground",children:"While a Bridge page is open in focus, web push and email do not wake you. Slack still posts: you turned it on, and Bridge keeps every item."})]})}],85678)},61641,e=>{var r=e.i(43476),i=e.i(71645),a=e.i(95187);let t=(0,a.createServerReference)("4068e0a012962959eed53cdc1898b8acfd21d81a71",a.callServer,void 0,a.findSourceMapURL,"unlinkSlack");var s=e.i(55070),n=e.i(63132);e.s(["SlackLinkPanel",0,function({fleetId:e,slackLink:a}){let[o,d]=(0,i.useTransition)(),[l,c]=(0,i.useState)(),{workspaceName:u,link:m}=a;return(0,r.jsxs)("section",{className:"grid gap-2","aria-labelledby":"bridge-slack-heading",children:[(0,r.jsx)("h2",{id:"bridge-slack-heading",className:"text-section font-semibold",children:"Slack"}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-3 rounded-md border border-border bg-card p-3",children:[(0,r.jsx)("span",{"data-testid":"bridge-slack-state",className:"min-w-0 flex-1",children:null===m?`Not linked in ${u}`:`Slack linked as @${m.slackName} in ${u}`}),null===m?(0,r.jsx)("a",{href:`/slack/link?${new URLSearchParams({fleet:e}).toString()}`,"data-testid":"bridge-slack-link",className:"inline-flex h-9 items-center rounded-md bg-primary px-4 text-primary-foreground hover:bg-primary-hover",children:"Link Slack"}):(0,r.jsx)(s.f,{"data-testid":"bridge-slack-unlink",isPending:o,pendingLabel:"Unlinking...",onClick:()=>{c(void 0),d(async()=>{let r=await t(e);r.isOk||c(r.message)})},children:"Unlink"})]}),void 0===l?null:(0,r.jsx)(n.f,{message:l,isFailure:!0})]})}],61641)},32036,e=>{var r=e.i(43476),i=e.i(71645),a=e.i(95187);let t=(0,a.createServerReference)("601545266cbcd00188699907a363d2d01cacdd7590",a.callServer,void 0,a.findSourceMapURL,"turnOffWebPush"),s=(0,a.createServerReference)("606869fb42c6cf9c02d918ac32cc0df0df992ce8e8",a.callServer,void 0,a.findSourceMapURL,"turnOnWebPush"),n=[[/Edg\//,"Edge"],[/Firefox\//,"Firefox"],[/Chrome\//,"Chrome"],[/Safari\//,"Safari"]],o=[[/iPhone|iPad/,"iOS"],[/Android/,"Android"],[/Mac OS X/,"macOS"],[/Windows/,"Windows"],[/Linux/,"Linux"]],d=(e,r)=>r.find(([r])=>r.test(e))?.[1];var l=e.i(55070),c=e.i(63132);let u="/wake-worker.js";async function m(){let e=await navigator.serviceWorker.getRegistration(u);return await e?.pushManager.getSubscription()??null}async function b(e){let r;if(await Notification.requestPermission()!=="granted")return{isOk:!1,message:"Your browser did not allow notifications from this site: allow them, then turn web push on again"};let i=await navigator.serviceWorker.register(u);return await navigator.serviceWorker.ready,{isOk:!0,value:await i.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:(r=atob(e.replaceAll("-","+").replaceAll("_","/")),Uint8Array.from(r,e=>e.charCodeAt(0)))})}}e.s(["WebPushPanel",0,function({fleetId:e,webPushKey:a,browsers:u}){let[h,g]=(0,i.useState)(!0),[f,p]=(0,i.useState)(),[v,x]=(0,i.useState)(),[w,y]=(0,i.useState)(),[,k]=(0,i.useTransition)();(0,i.useEffect)(()=>{"serviceWorker"in navigator&&"PushManager"in window&&"Notification"in window?m().then(e=>{p(e?.endpoint)}):g(!1)},[]);let j=void 0!==f&&u.some(({endpoint:e,isGone:r})=>e===f&&!r);return(0,r.jsxs)("div",{className:"grid gap-2","data-testid":"bridge-wake-web-push",children:[u.map(({endpoint:i,browser:a,addedAt:s,isGone:n})=>(0,r.jsxs)("div",{className:"flex items-center gap-3 rounded-md border border-border bg-card p-3",children:[(0,r.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col",children:[(0,r.jsxs)("span",{className:"truncate",children:["Web push in ",a,i===f?" · this browser":""]}),(0,r.jsx)("span",{className:"text-caption text-muted-foreground",children:n?"No longer takes wakes: its push service ended them. Turn web push on again in that browser, or remove it.":`On since ${new Date(s).toLocaleDateString()}: it tells you when something waits in this fleet, with a link here. Never what waits.`})]}),(0,r.jsx)(l.f,{"data-testid":"bridge-web-push-remove",isPending:v===i,pendingLabel:"Removing...",disabled:void 0!==v,onClick:()=>{x(i),y(void 0),k(async()=>{i===f&&(await (await m())?.unsubscribe(),p(void 0));let r=await t(e,i);x(void 0),r.isOk||y(r.message)})},children:"Remove"})]},i)),h?j?null:(0,r.jsx)("div",{children:(0,r.jsx)(l.f,{"data-testid":"bridge-web-push-on",variant:"primary",isPending:"on"===v,pendingLabel:"Turning on...",disabled:void 0!==v,onClick:()=>{x("on"),y(void 0),k(async()=>{try{var r;let i,t,l=await b(a);if(!l.isOk)return void y(l.message);let c=function(e,r){let{endpoint:i,keys:a}=e,t=a?.p256dh,s=a?.auth;return void 0===i||void 0===t||void 0===s?void 0:{endpoint:i,keys:{p256dh:t,auth:s},browser:r}}(l.value.toJSON(),(r=navigator.userAgent,i=d(r,n),t=d(r,o),void 0===i?"A browser":void 0===t?i:`${i} on ${t}`));if(void 0===c)return void y("Your browser gave no push subscription: try again");let u=await s(e,c);u.isOk?p(c.endpoint):y(u.message)}catch{y("Your browser could not turn web push on: try again")}finally{x(void 0)}})},children:"Turn on web push in this browser"})}):(0,r.jsx)("p",{className:"text-caption text-muted-foreground",children:"This browser takes no web push."}),void 0===w?null:(0,r.jsx)(c.f,{message:w,isFailure:!0})]})}],32036)},55070,e=>{var r=e.i(43476);let i={primary:"bg-primary text-primary-foreground hover:bg-primary-hover",secondary:"border border-border bg-card text-card-foreground hover:bg-accent"};e.s(["f",0,function({isPending:e,pendingLabel:a,variant:t="secondary",children:s,className:n="",disabled:o,...d}){return(0,r.jsx)("button",{...d,disabled:!0===o||e,"aria-busy":e,className:`inline-flex h-9 items-center gap-2 rounded-md px-4 disabled:cursor-not-allowed disabled:opacity-70 ${i[t]} ${n}`,children:e?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{"aria-hidden":"true",className:"size-3.5 animate-spin rounded-full border-2 border-current border-t-transparent"}),a]}):s})}])},63132,e=>{var r=e.i(43476);e.s(["f",0,function({message:e,isFailure:i}){return i?(0,r.jsx)("p",{role:"alert","data-testid":"bridge-failure",className:"rounded-md border border-tone-attention-border bg-tone-attention-bg px-3 py-2 text-tone-attention-fg",children:e}):(0,r.jsx)("p",{role:"status","data-testid":"bridge-success",className:"rounded-md border border-tone-ok-border bg-tone-ok-bg px-3 py-2 text-tone-ok-fg",children:e})}])}])})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,28008,e=>{e.s(["H",0,"fleet","Q",0,{kind:"idle"}])},30402,e=>{let t="inline-flex h-9 items-center justify-center gap-2 rounded-md px-4 font-medium disabled:opacity-60",n={primary:`${t} bg-primary text-primary-foreground hover:bg-primary-hover`,secondary:`${t} border border-border bg-card hover:bg-accent`,destructive:`${t} bg-destructive text-destructive-foreground`};e.s(["x",0,n,"r",0,"rounded-lg border border-border bg-card p-6 text-card-foreground shadow-sm","w",0,"h-9 w-full rounded-md border border-input bg-background px-3 font-mono text-code","z",0,"grid gap-1"])},94984,e=>{var t=e.i(43476);e.s(["f",0,function({state:e,testId:n}){switch(e.kind){case"idle":return null;case"done":return(0,t.jsx)("p",{role:"status","data-testid":n,className:"rounded-md border border-tone-ok-border bg-tone-ok-bg px-3 py-2 text-tone-ok-fg",children:e.message});case"refused":case"openNetwork":return(0,t.jsx)("p",{role:"alert","data-testid":n,className:"rounded-md border border-tone-attention-border bg-tone-attention-bg px-3 py-2 text-tone-attention-fg",children:e.message})}}])},58107,e=>{var t=e.i(43476),n=e.i(74080),r=e.i(30402);e.s(["f",0,function({children:e,pending:o,kind:d="primary",testId:i}){let s=(0,n.useFormStatus)();return(0,t.jsx)("button",{type:"submit",className:r.x[d],disabled:s.pending,"aria-busy":s.pending,"data-testid":i,children:s.pending?o:e})}])},97e3,e=>{var t=e.i(43476);let n={waiting:"border-tone-waiting-border bg-tone-waiting-bg text-tone-waiting-fg",active:"border-tone-active-border bg-tone-active-bg text-tone-active-fg",ok:"border-tone-ok-border bg-tone-ok-bg text-tone-ok-fg",attention:"border-tone-attention-border bg-tone-attention-bg text-tone-attention-fg",ended:"border-tone-ended-border bg-tone-ended-bg text-tone-ended-fg"};e.s(["T",0,function({tone:e,label:r}){return(0,t.jsx)("span",{className:`inline-flex items-center rounded-full border px-2 text-caption ${n[e]}`,children:r})},"E",0,function({children:e,isMono:n=!1}){return(0,t.jsx)("span",{className:`inline-flex items-center rounded-md border border-border px-2 text-caption ${n?"font-mono":""}`,children:e})}])},17018,e=>{var t=e.i(43476),n=e.i(71645),r=e.i(28008),o=e.i(30402),d=e.i(94984),i=e.i(58107),s=e.i(95187);let a=(0,s.createServerReference)("
|
|
1
|
+
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,28008,e=>{e.s(["H",0,"fleet","Q",0,{kind:"idle"}])},30402,e=>{let t="inline-flex h-9 items-center justify-center gap-2 rounded-md px-4 font-medium disabled:opacity-60",n={primary:`${t} bg-primary text-primary-foreground hover:bg-primary-hover`,secondary:`${t} border border-border bg-card hover:bg-accent`,destructive:`${t} bg-destructive text-destructive-foreground`};e.s(["x",0,n,"r",0,"rounded-lg border border-border bg-card p-6 text-card-foreground shadow-sm","w",0,"h-9 w-full rounded-md border border-input bg-background px-3 font-mono text-code","z",0,"grid gap-1"])},94984,e=>{var t=e.i(43476);e.s(["f",0,function({state:e,testId:n}){switch(e.kind){case"idle":return null;case"done":return(0,t.jsx)("p",{role:"status","data-testid":n,className:"rounded-md border border-tone-ok-border bg-tone-ok-bg px-3 py-2 text-tone-ok-fg",children:e.message});case"refused":case"openNetwork":return(0,t.jsx)("p",{role:"alert","data-testid":n,className:"rounded-md border border-tone-attention-border bg-tone-attention-bg px-3 py-2 text-tone-attention-fg",children:e.message})}}])},58107,e=>{var t=e.i(43476),n=e.i(74080),r=e.i(30402);e.s(["f",0,function({children:e,pending:o,kind:d="primary",testId:i}){let s=(0,n.useFormStatus)();return(0,t.jsx)("button",{type:"submit",className:r.x[d],disabled:s.pending,"aria-busy":s.pending,"data-testid":i,children:s.pending?o:e})}])},97e3,e=>{var t=e.i(43476);let n={waiting:"border-tone-waiting-border bg-tone-waiting-bg text-tone-waiting-fg",active:"border-tone-active-border bg-tone-active-bg text-tone-active-fg",ok:"border-tone-ok-border bg-tone-ok-bg text-tone-ok-fg",attention:"border-tone-attention-border bg-tone-attention-bg text-tone-attention-fg",ended:"border-tone-ended-border bg-tone-ended-bg text-tone-ended-fg"};e.s(["T",0,function({tone:e,label:r}){return(0,t.jsx)("span",{className:`inline-flex items-center rounded-full border px-2 text-caption ${n[e]}`,children:r})},"E",0,function({children:e,isMono:n=!1}){return(0,t.jsx)("span",{className:`inline-flex items-center rounded-md border border-border px-2 text-caption ${n?"font-mono":""}`,children:e})}])},17018,e=>{var t=e.i(43476),n=e.i(71645),r=e.i(28008),o=e.i(30402),d=e.i(94984),i=e.i(58107),s=e.i(95187);let a=(0,s.createServerReference)("605b5ae847ecc19f7567e3a0c2331e73b6ddc0bb02",s.callServer,void 0,s.findSourceMapURL,"switchOutsideParties");var c=e.i(97e3);e.s(["SwitchCard",0,function({isOn:e,canSwitch:s,fleetId:l}){let[u,b]=(0,n.useActionState)(a,r.Q);return(0,t.jsxs)("section",{className:`${o.r} grid gap-3`,"data-testid":"outside-parties-switch",children:[(0,t.jsxs)("h2",{className:"flex items-center gap-2 text-section font-semibold",children:["Outside parties are ",e?"on":"off"," ",e?(0,t.jsx)(c.T,{tone:"ok",label:"On"}):(0,t.jsx)(c.T,{tone:"ended",label:"Off"})]}),(0,t.jsx)("p",{className:"text-muted-foreground",children:e?"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"===u.kind?(0,t.jsxs)("form",{action:b,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,t.jsx)("h3",{className:"font-semibold",children:"Open network"}),(0,t.jsx)("p",{children:u.message}),(0,t.jsx)("input",{type:"hidden",name:r.H,value:l}),(0,t.jsx)("input",{type:"hidden",name:"isOn",value:"true"}),(0,t.jsx)("input",{type:"hidden",name:"isOpenNetworkConfirmed",value:"true"}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(i.f,{kind:"destructive",pending:"Turning on…",testId:"outside-parties-turn-on-anyway",children:"Turn on anyway"}),(0,t.jsx)("a",{className:o.x.secondary,href:"",children:"Keep off"})]})]}):s?(0,t.jsxs)("form",{action:b,children:[(0,t.jsx)("input",{type:"hidden",name:r.H,value:l}),(0,t.jsx)("input",{type:"hidden",name:"isOn",value:String(!e)}),(0,t.jsx)(i.f,{kind:e?"secondary":"primary",pending:e?"Turning off…":"Turning on…",testId:"outside-parties-turn",children:e?"Turn off":"Turn on"})]}):(0,t.jsxs)("p",{className:"text-muted-foreground",children:["Turning them on or off needs ","fleet:network","."]}),"openNetwork"===u.kind?null:(0,t.jsx)(d.f,{state:u})]})}],17018)}])})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,26217,e=>{var n=e.i(95187);let i=(0,n.createServerReference)("60573c940559fe36ec3489b04906d9407ddf5822ef",n.callServer,void 0,n.findSourceMapURL,"removeFromBasket");e.s(["f",0,i])},57228,e=>{e.s(["H",0,"/bridge/basket","T",0,"/bridge/settings"])},22141,e=>{var n=e.i(43476),i=e.i(71645),t=e.i(26217),s=e.i(95187);let r=(0,s.createServerReference)("40b44086e3707ca8b788d4ad4b3ef6615138ffe27a",s.callServer,void 0,s.findSourceMapURL,"sendBasket"),d={bridge:"in Bridge",chat:"in a chat",slack:"in Slack",gateway:"by the gateway"},a={withdrawn:"withdrawn",replaced:"replaced",dealtElsewhere:"answered elsewhere"};function o(e){return 1===e?"1 answer":`${String(e)} answers`}var l=e.i(55070),c=e.i(63132),g=e.i(3523);function u({entry:e,opening:i,working:t,onRemove:s}){var r;let{standing:a}=e,o=function(e){let{standing:n}=e;switch(n.kind){case"waiting":return;case"sending":return"Sending... The gateway keeps sending what is stored as sending, with the same key, until it is stored; you can close Bridge.";case"refused":return`Not sent: ${n.reason}. The others were sent.`;case"withdrawn":return`Withdrawn by ${e.from}. Not sent; Send skips it.`;case"replaced":return`Replaced by ${e.from}. Not sent: its options may differ, so answer the new question.`;case"dealtElsewhere":return null===n.option?`Done ${d[n.place]}. Nothing is sent from it.`:`Answered ${d[n.place]}: option ${String(n.option)}. Nothing is sent from it.`}}(e),g=void 0!==t||void 0!==i.openingId,p="replaced"===a.kind?a.replacementId:null;return(0,n.jsxs)("li",{"data-testid":"bridge-basket-entry","data-standing":a.kind,className:`grid min-w-0 gap-2 rounded-md border border-border bg-card p-3 ${"withdrawn"===a.kind||"replaced"===a.kind||"dealtElsewhere"===a.kind?"opacity-60":""}`,children:[(0,n.jsx)("span",{className:"font-medium",children:e.title}),(0,n.jsxs)("span",{className:"text-caption text-muted-foreground",children:["to ",e.from," · asked at ",(0,n.jsx)("time",{dateTime:e.sentAt,children:(r=e.sentAt,`${new Date(r).toISOString().slice(0,16).replace("T"," ")} UTC`)})]}),(0,n.jsxs)("span",{children:["Option ",e.option]}),null===e.note?null:(0,n.jsxs)("span",{className:"text-caption",children:["“",e.note,"”"]}),void 0===o?null:(0,n.jsx)("span",{"data-testid":"bridge-basket-standing",className:"text-caption",children:o}),i.failure?.deliveryId===e.deliveryId?(0,n.jsx)(c.f,{message:i.failure.message,isFailure:!0}):null,(0,n.jsxs)("div",{className:"flex flex-wrap gap-2",children:["waiting"===a.kind?(0,n.jsx)(l.f,{"data-testid":"bridge-basket-change",isPending:i.openingId===e.deliveryId,pendingLabel:"Opening...",disabled:g,onClick:()=>{i.open({deliveryId:e.deliveryId,job:"decide",inBasket:{option:e.option,note:e.note}})},children:"Change"}):null,null===p?null:(0,n.jsx)(l.f,{"data-testid":"bridge-replacement",isPending:i.openingId===p,pendingLabel:"Opening...",disabled:g,onClick:()=>{i.open({deliveryId:p,job:"decide"})},children:"Answer the new question"}),"sending"===a.kind?null:(0,n.jsx)(l.f,{"data-testid":"bridge-basket-remove",isPending:t?.kind==="remove"&&t.questionId===e.questionId,pendingLabel:"Removing...",disabled:g,onClick:()=>{s(e.questionId)},children:"refused"===a.kind?"Remove and mark done":"Remove"})]})]})}e.s(["BasketPanel",0,function({fleetId:e,basket:s}){let[d,p]=(0,i.useState)(),[m,b]=(0,i.useState)(),[,h]=(0,i.useTransition)(),{entries:f,toSend:x}=s,v=n=>{p({kind:"remove",questionId:n}),b(void 0),h(async()=>{let i=await (0,t.f)(e,n);p(void 0),b(i.isOk?void 0:{message:i.message,isFailure:!0})})},k=()=>{p({kind:"send"}),b(void 0),h(async()=>{var n;let i,t=await r(e);p(void 0),b(t.isOk?{message:(i=0===(n=t.value).sending?"Nothing to send.":1===n.sending?"1 answer is being sent.":`${o(n.sending)} are being sent, each on its own, in the order you added them.`,0===n.skipped.length?i:`${i} Not sent: ${n.skipped.map(({title:e,kind:n})=>`“${e}”, ${a[n]}`).join("; ")}.`),isFailure:!1}:{message:t.message,isFailure:!0})})};return(0,n.jsx)(g.f,{fleetId:e,children:e=>(0,n.jsxs)("section",{className:"grid gap-3","aria-labelledby":"bridge-basket-heading",children:[(0,n.jsxs)("div",{children:[(0,n.jsxs)("h1",{id:"bridge-basket-heading",className:"text-heading font-semibold",children:["Basket ",(0,n.jsx)("span",{"data-testid":"bridge-basket-count",children:f.length})]}),(0,n.jsx)("p",{className:"text-muted-foreground",children:"Answers you picked in Bridge, not sent yet. Nothing goes until you press Send."})]}),void 0===m?null:(0,n.jsx)(c.f,{message:m.message,isFailure:m.isFailure}),0===f.length?(0,n.jsxs)("div",{"data-testid":"bridge-basket-empty",className:"grid justify-items-center gap-1 rounded-lg border border-border bg-card p-6 text-center",children:[(0,n.jsx)("span",{className:"font-semibold",children:"The basket is empty"}),(0,n.jsx)("span",{className:"text-muted-foreground",children:"Open a question in Waiting on you and put your answer in the basket."})]}):(0,n.jsx)("ul",{className:"grid gap-2",children:f.map(i=>(0,n.jsx)(u,{entry:i,opening:e,working:d,onRemove:v},i.questionId))}),0===x?null:(0,n.jsxs)("div",{className:"grid gap-1",children:[(0,n.jsx)("p",{className:"text-caption text-muted-foreground",children:"Each asker receives its own answer, as you, as if sent one by one."}),(0,n.jsx)(l.f,{"data-testid":"bridge-basket-send",variant:"primary",className:"justify-self-start",isPending:d?.kind==="send",pendingLabel:"Sending...",disabled:void 0!==d||void 0!==e.openingId,onClick:k,children:`Send ${o(x)}`})]})]})})}],22141)},3523,e=>{var n=e.i(43476),i=e.i(71645),t=e.i(73459),s=e.i(65894),r=e.i(35004),d=e.i(75222),a=e.i(73383),o=e.i(2708),l=e.i(26217),c=e.i(57228),g=e.i(55070),u=e.i(63132);function p({inBasket:e,basketHref:i,isRemoving:t,isWorking:s,onRemove:r}){return(0,n.jsxs)("div",{"data-testid":"bridge-in-basket",className:"grid gap-2 rounded-md border border-border bg-muted p-3",children:[(0,n.jsxs)("span",{className:"font-medium",children:["In the basket: option ",e.option,", not sent"]}),null===e.note?null:(0,n.jsxs)("span",{className:"text-caption",children:["“",e.note,"”"]}),(0,n.jsx)("span",{className:"text-caption text-muted-foreground",children:"Pick another option to change it."}),(0,n.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,n.jsx)("a",{"data-testid":"bridge-basket-open",href:i,className:"inline-flex h-9 items-center rounded-md border border-border px-4 hover:bg-accent",children:"Open the basket"}),(0,n.jsx)(g.f,{"data-testid":"bridge-basket-remove",isPending:t,pendingLabel:"Removing...",disabled:s,onClick:r,children:"Remove"})]})]})}function m({question:e,chosen:i,isStale:t,onChoose:s}){return(0,n.jsxs)("fieldset",{className:`grid gap-2 ${t?"opacity-60":""}`,disabled:t,children:[(0,n.jsx)("legend",{className:"sr-only",children:"Options"}),e.options.map(r=>(0,n.jsxs)("label",{className:`flex items-start gap-3 rounded-md border p-3 ${r.key===i&&!t?"border-ring bg-accent":"border-border"}`,children:[(0,n.jsx)("input",{type:"radio",name:"option",value:r.key,checked:r.key===i&&!t,onChange:()=>{s(r.key)},className:"mt-1"}),(0,n.jsxs)("span",{className:"grid flex-1 gap-0.5",children:[(0,n.jsxs)("span",{className:"font-medium",children:[r.key,". ",r.label]}),""===r.detail?null:(0,n.jsx)("span",{className:"text-caption text-muted-foreground",children:r.detail})]}),r.key===e.pick.option?(0,n.jsx)("span",{className:"rounded-sm border border-border px-1.5 text-caption",children:"Their pick"}):null]},r.key))]})}function b({stale:e,from:i,onOpen:t}){let{replacementId:s}=e;return(0,n.jsxs)("div",{"data-testid":"bridge-stale",className:"grid gap-2 rounded-md border border-border bg-muted p-3",children:[(0,n.jsx)("span",{children:"withdrawn"===e.kind?`Withdrawn by ${i}. Nothing to answer: it is done.`:`Replaced by ${i}. Answer the new question.`}),null===s?null:(0,n.jsx)(g.f,{"data-testid":"bridge-replacement",className:"justify-self-start",isPending:!1,pendingLabel:"Opening...",onClick:()=>{t(s)},children:"Open the new question"})]})}function h({step:e}){return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("p",{className:"whitespace-pre-wrap",children:e.why}),void 0===e.link?null:(0,n.jsxs)("a",{"data-testid":"bridge-step-link",href:e.link.href,target:"_blank",rel:"noopener noreferrer",className:"inline-flex h-9 items-center justify-self-start rounded-md border border-border px-4 hover:bg-accent",children:["Open on ",e.link.host]})]})}function f({from:e,note:i,working:t,failure:s,onNoteChange:r,onFinish:d}){let a=void 0!==t;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("label",{className:"grid gap-1",children:[(0,n.jsx)("span",{children:"Note"}),(0,n.jsx)("textarea",{"data-testid":"bridge-note",rows:2,value:i,onChange:e=>{r(e.target.value)},placeholder:"Optional, goes with Done or Cannot",className:"rounded-md border border-input bg-background p-2"})]}),void 0===s?null:(0,n.jsx)(u.f,{message:s,isFailure:!0}),(0,n.jsxs)("div",{className:"grid gap-1",children:[(0,n.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,n.jsx)(g.f,{"data-testid":"bridge-step-done",variant:"primary",isPending:t?.kind==="done",pendingLabel:"Sending...",disabled:a,onClick:()=>{d("done")},children:"Done"}),(0,n.jsx)(g.f,{"data-testid":"bridge-step-cannot",isPending:t?.kind==="cannot",pendingLabel:"Sending...",disabled:a,onClick:()=>{d("cannot")},children:"Cannot"})]}),(0,n.jsxs)("span",{className:"text-caption text-muted-foreground",children:[e," is told at once, with your note."]})]})]})}function x({delivery:e,isDoneOnSeeing:t,meetingHref:s,basketHref:r,inBasket:d,note:a,working:o,failure:l,onNoteChange:c,onAnswer:v,onPut:k,onRemove:j,onDone:w,onFinishStep:y,onOpen:N,onBack:S}){let{question:I,step:$,stale:R}=e,[C,L]=(0,i.useState)(d?.option??I?.pick.option),O=void 0!==o;return(0,n.jsxs)("section",{"data-testid":"bridge-delivery",className:"grid gap-3 rounded-lg border border-border bg-card p-6 text-card-foreground shadow-sm",children:[(0,n.jsxs)("span",{className:"text-caption text-muted-foreground",children:[e.from," · ",new Date(e.sentAt).toUTCString()]}),(0,n.jsx)("h2",{className:"text-heading font-semibold",children:I?.title??e.title}),void 0===s?null:(0,n.jsx)("a",{"data-testid":"bridge-meeting",href:s,className:"inline-flex h-9 items-center justify-self-start rounded-md bg-primary px-4 text-primary-foreground hover:bg-primary-hover",children:"Go to the meeting"}),void 0!==$?(0,n.jsx)(h,{step:$}):void 0===I?(0,n.jsx)("pre",{className:"whitespace-pre-wrap rounded-md bg-muted p-3 font-mono text-caption",children:e.body}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("p",{className:"whitespace-pre-wrap",children:I.context}),(0,n.jsx)(m,{question:I,chosen:C,isStale:null!==R,onChoose:L}),(0,n.jsxs)("p",{className:"text-caption text-muted-foreground",children:[e.from," picks ",I.pick.option,": ",I.pick.why]})]}),null===R?null:(0,n.jsx)(b,{stale:R,from:e.from,onOpen:N}),null===d||null!==R?null:(0,n.jsx)(p,{inBasket:d,basketHref:r,isRemoving:o?.kind==="remove",isWorking:O,onRemove:j}),t?(0,n.jsx)("p",{"data-testid":"bridge-seen-done",className:"text-muted-foreground",children:"Seen now, so done: it asks nothing more."}):null!==R?null:void 0!==$?(0,n.jsx)(f,{from:e.from,note:a,working:o,failure:l,onNoteChange:c,onFinish:y}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("label",{className:"grid gap-1",children:[(0,n.jsx)("span",{children:void 0===I?"Your answer":"Note"}),(0,n.jsx)("textarea",{"data-testid":"bridge-note",rows:2,value:a,onChange:e=>{c(e.target.value)},placeholder:void 0===I?"":"Optional, goes with the answer",className:"rounded-md border border-input bg-background p-2"})]}),void 0===l?null:(0,n.jsx)(u.f,{message:l,isFailure:!0}),void 0===I?(0,n.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,n.jsx)(g.f,{"data-testid":"bridge-answer",variant:"primary",isPending:o?.kind==="note",pendingLabel:"Sending...",disabled:O,onClick:()=>{v(void 0)},children:"Answer"}),(0,n.jsx)(g.f,{"data-testid":"bridge-done",isPending:o?.kind==="done",pendingLabel:"Marking done...",disabled:O,onClick:w,children:"Done"})]}):void 0===C?null:(0,n.jsxs)("div",{className:"grid gap-1",children:[(0,n.jsxs)(g.f,{"data-testid":"bridge-put-in-basket",variant:"primary",className:"justify-self-start",isPending:o?.kind==="option",pendingLabel:"Putting in the basket...",disabled:O,onClick:()=>{k(C)},children:["Put option ",C," in the basket"]}),(0,n.jsxs)("span",{className:"text-caption text-muted-foreground",children:["Nothing is sent yet. ",e.from," receives this answer when you send the basket."]})]})]}),(0,n.jsx)("div",{className:"flex flex-wrap gap-2",children:(0,n.jsx)("button",{type:"button",onClick:S,disabled:O,className:"inline-flex h-9 items-center rounded-md px-4 text-muted-foreground hover:bg-accent disabled:opacity-70",children:"Back"})})]})}e.s(["f",0,function({fleetId:e,children:g}){let[p,m]=(0,i.useState)(),[b,h]=(0,i.useState)(""),[f,v]=(0,i.useState)(),[k,j]=(0,i.useState)(),[w,y]=(0,i.useState)(),[N,S]=(0,i.useState)(),[I,$]=(0,i.useState)(),[,R]=(0,i.useTransition)(),C=n=>{v(n.deliveryId),y(void 0),$(void 0),R(async()=>{let i=await (0,a.f)(e,n.deliveryId);if(v(void 0),i.isOk){let e=n.inBasket??null;m({delivery:i.value,isDoneOnSeeing:"stay-aware"===n.job,inBasket:e}),h(e?.note??""),S(void 0)}else y({deliveryId:n.deliveryId,message:i.message})})},L=({control:e,action:n,said:i})=>{j(e),S(void 0),R(async()=>{let e=await n();j(void 0),e.isOk?(m(void 0),$(i)):S(e.message)})};if(void 0!==p){let{delivery:i,inBasket:a}=p,g=i.question?.id;return(0,n.jsx)(x,{delivery:i,isDoneOnSeeing:p.isDoneOnSeeing,meetingHref:void 0===i.meetingId?void 0:(0,t.f)({fleetId:e,meetingId:i.meetingId}),basketHref:(0,s.f)(c.H,e),inBasket:a,note:b,working:k,failure:N,onNoteChange:h,onAnswer:n=>{L({control:void 0===n?{kind:"note"}:{kind:"option",option:n},action:()=>(0,r.f)({fleet:e,deliveryId:i.deliveryId,input:{questionId:i.question?.id,option:n,note:b}}),said:`Your answer went to ${i.from}.`})},onPut:n=>{L({control:{kind:"option",option:n},action:()=>(0,o.f)({fleet:e,deliveryId:i.deliveryId,option:n,note:b}),said:`Option ${String(n)} is in the basket, not sent: ${i.from} receives it when you send the basket.`})},onRemove:()=>{void 0!==g&&L({control:{kind:"remove"},action:()=>(0,l.f)(e,g),said:`Your answer to “${i.title}” is out of the basket; the question still waits on you.`})},onDone:()=>{L({control:{kind:"done"},action:()=>(0,d.f)({fleet:e,deliveryId:i.deliveryId}),said:`Done with “${i.title}”.`})},onFinishStep:n=>{L({control:{kind:n},action:()=>(0,d.f)({fleet:e,deliveryId:i.deliveryId,step:{outcome:n,note:b}}),said:"done"===n?`Done: ${i.from} is told “${i.title}” is done.`:`Cannot: ${i.from} is told you cannot do “${i.title}”.`})},onOpen:e=>{C({deliveryId:e,job:"decide"})},onBack:()=>{m(void 0)}},i.deliveryId)}return(0,n.jsxs)("div",{className:"grid gap-4",children:[void 0===I?null:(0,n.jsx)(u.f,{message:I,isFailure:!1}),g({open:C,openingId:f,failure:w})]})}],3523)},10629,e=>{var n=e.i(71645),i=e.i(18566);e.s(["LiveRefresh",0,function({fleetId:e}){let t;return t=(0,i.useRouter)(),(0,n.useEffect)(()=>{let n=new EventSource(`/bridge/changes?fleet=${encodeURIComponent(e)}`);return n.onmessage=()=>{t.refresh()},()=>{n.close()}},[e,t]),(0,n.useEffect)(()=>{let n,i=()=>{let i="visible"===document.visibilityState&&document.hasFocus();i&&void 0===n?n=new EventSource(`/bridge/focus?fleet=${encodeURIComponent(e)}`):i||void 0===n||(n.close(),n=void 0)};return i(),window.addEventListener("focus",i),window.addEventListener("blur",i),document.addEventListener("visibilitychange",i),()=>{window.removeEventListener("focus",i),window.removeEventListener("blur",i),document.removeEventListener("visibilitychange",i),n?.close()}},[e]),null}],10629)},84238,e=>{var n=e.i(43476),i=e.i(18566),t=e.i(71645);e.s(["RecordUnreadable",0,function({message:e}){let s=(0,i.useRouter)();return(0,t.useEffect)(()=>{let e=setInterval(()=>{s.refresh()},1e4);return()=>{clearInterval(e)}},[s]),(0,n.jsxs)("section",{role:"alert","data-testid":"bridge-unreadable",className:"flex flex-wrap items-center gap-3 rounded-md border border-tone-attention-border bg-tone-attention-bg px-3 py-2 text-tone-attention-fg",children:[(0,n.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col",children:[(0,n.jsx)("span",{className:"font-semibold",children:"The record cannot be read now"}),(0,n.jsxs)("span",{className:"text-caption",children:[e," Nothing was opened or answered, so nothing is lost: Bridge tries again in 10 s."]})]}),(0,n.jsx)("button",{type:"button","data-testid":"bridge-try-now",onClick:()=>{s.refresh()},className:"inline-flex h-9 items-center rounded-md border border-border bg-card px-4 text-card-foreground hover:bg-accent",children:"Try now"})]})}])},55070,e=>{var n=e.i(43476);let i={primary:"bg-primary text-primary-foreground hover:bg-primary-hover",secondary:"border border-border bg-card text-card-foreground hover:bg-accent"};e.s(["f",0,function({isPending:e,pendingLabel:t,variant:s="secondary",children:r,className:d="",disabled:a,...o}){return(0,n.jsx)("button",{...o,disabled:!0===a||e,"aria-busy":e,className:`inline-flex h-9 items-center gap-2 rounded-md px-4 disabled:cursor-not-allowed disabled:opacity-70 ${i[s]} ${d}`,children:e?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{"aria-hidden":"true",className:"size-3.5 animate-spin rounded-full border-2 border-current border-t-transparent"}),t]}):r})}])},63132,e=>{var n=e.i(43476);e.s(["f",0,function({message:e,isFailure:i}){return i?(0,n.jsx)("p",{role:"alert","data-testid":"bridge-failure",className:"rounded-md border border-tone-attention-border bg-tone-attention-bg px-3 py-2 text-tone-attention-fg",children:e}):(0,n.jsx)("p",{role:"status","data-testid":"bridge-success",className:"rounded-md border border-tone-ok-border bg-tone-ok-bg px-3 py-2 text-tone-ok-fg",children:e})}])},73459,35004,75222,73383,2708,e=>{e.s(["f",0,function(e){let n=new URLSearchParams({fleet:e.fleetId,...void 0===e.cursor?{}:{cursor:e.cursor}});return`/meetings/${encodeURIComponent(e.meetingId)}?${n.toString()}`}],73459);var n=e.i(95187);let i=(0,n.createServerReference)("40edad5bc6caa482ec57bdf504a9545c453e286344",n.callServer,void 0,n.findSourceMapURL,"answerDelivery");e.s(["f",0,i],35004);let t=(0,n.createServerReference)("409343274cfb1997696f97d13e70128feeaadc81b0",n.callServer,void 0,n.findSourceMapURL,"doneDelivery");e.s(["f",0,t],75222);let s=(0,n.createServerReference)("6013ebd954e4b9b9c2c4a85c94c4fc1f4786952324",n.callServer,void 0,n.findSourceMapURL,"openDelivery");e.s(["f",0,s],73383);let r=(0,n.createServerReference)("408a5fadf58977f6b55557119e3557d884605ebbcf",n.callServer,void 0,n.findSourceMapURL,"putInBasket");e.s(["f",0,r],2708)}])})();
|
|
1
|
+
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,40389,e=>{var n=e.i(95187);let i=(0,n.createServerReference)("60cb932106ab7fdcbd18e33041be499ed83080592f",n.callServer,void 0,n.findSourceMapURL,"removeFromBasket");e.s(["f",0,i])},57228,e=>{e.s(["H",0,"/bridge/basket","T",0,"/bridge/settings"])},22141,e=>{var n=e.i(43476),i=e.i(71645),t=e.i(40389),s=e.i(95187);let r=(0,s.createServerReference)("407bae59090ef46e76fb8d952969288e5bb4583e21",s.callServer,void 0,s.findSourceMapURL,"sendBasket"),d={bridge:"in Bridge",chat:"in a chat",slack:"in Slack",gateway:"by the gateway"},a={withdrawn:"withdrawn",replaced:"replaced",dealtElsewhere:"answered elsewhere"};function o(e){return 1===e?"1 answer":`${String(e)} answers`}var l=e.i(55070),c=e.i(63132),g=e.i(3523);function u({entry:e,opening:i,working:t,onRemove:s}){var r;let{standing:a}=e,o=function(e){let{standing:n}=e;switch(n.kind){case"waiting":return;case"sending":return"Sending... The gateway keeps sending what is stored as sending, with the same key, until it is stored; you can close Bridge.";case"refused":return`Not sent: ${n.reason}. The others were sent.`;case"withdrawn":return`Withdrawn by ${e.from}. Not sent; Send skips it.`;case"replaced":return`Replaced by ${e.from}. Not sent: its options may differ, so answer the new question.`;case"dealtElsewhere":return null===n.option?`Done ${d[n.place]}. Nothing is sent from it.`:`Answered ${d[n.place]}: option ${String(n.option)}. Nothing is sent from it.`}}(e),g=void 0!==t||void 0!==i.openingId,p="replaced"===a.kind?a.replacementId:null;return(0,n.jsxs)("li",{"data-testid":"bridge-basket-entry","data-standing":a.kind,className:`grid min-w-0 gap-2 rounded-md border border-border bg-card p-3 ${"withdrawn"===a.kind||"replaced"===a.kind||"dealtElsewhere"===a.kind?"opacity-60":""}`,children:[(0,n.jsx)("span",{className:"font-medium",children:e.title}),(0,n.jsxs)("span",{className:"text-caption text-muted-foreground",children:["to ",e.from," · asked at ",(0,n.jsx)("time",{dateTime:e.sentAt,children:(r=e.sentAt,`${new Date(r).toISOString().slice(0,16).replace("T"," ")} UTC`)})]}),(0,n.jsxs)("span",{children:["Option ",e.option]}),null===e.note?null:(0,n.jsxs)("span",{className:"text-caption",children:["“",e.note,"”"]}),void 0===o?null:(0,n.jsx)("span",{"data-testid":"bridge-basket-standing",className:"text-caption",children:o}),i.failure?.deliveryId===e.deliveryId?(0,n.jsx)(c.f,{message:i.failure.message,isFailure:!0}):null,(0,n.jsxs)("div",{className:"flex flex-wrap gap-2",children:["waiting"===a.kind?(0,n.jsx)(l.f,{"data-testid":"bridge-basket-change",isPending:i.openingId===e.deliveryId,pendingLabel:"Opening...",disabled:g,onClick:()=>{i.open({deliveryId:e.deliveryId,job:"decide",inBasket:{option:e.option,note:e.note}})},children:"Change"}):null,null===p?null:(0,n.jsx)(l.f,{"data-testid":"bridge-replacement",isPending:i.openingId===p,pendingLabel:"Opening...",disabled:g,onClick:()=>{i.open({deliveryId:p,job:"decide"})},children:"Answer the new question"}),"sending"===a.kind?null:(0,n.jsx)(l.f,{"data-testid":"bridge-basket-remove",isPending:t?.kind==="remove"&&t.questionId===e.questionId,pendingLabel:"Removing...",disabled:g,onClick:()=>{s(e.questionId)},children:"refused"===a.kind?"Remove and mark done":"Remove"})]})]})}e.s(["BasketPanel",0,function({fleetId:e,basket:s}){let[d,p]=(0,i.useState)(),[b,m]=(0,i.useState)(),[,h]=(0,i.useTransition)(),{entries:f,toSend:x}=s,v=n=>{p({kind:"remove",questionId:n}),m(void 0),h(async()=>{let i=await (0,t.f)(e,n);p(void 0),m(i.isOk?void 0:{message:i.message,isFailure:!0})})},k=()=>{p({kind:"send"}),m(void 0),h(async()=>{var n;let i,t=await r(e);p(void 0),m(t.isOk?{message:(i=0===(n=t.value).sending?"Nothing to send.":1===n.sending?"1 answer is being sent.":`${o(n.sending)} are being sent, each on its own, in the order you added them.`,0===n.skipped.length?i:`${i} Not sent: ${n.skipped.map(({title:e,kind:n})=>`“${e}”, ${a[n]}`).join("; ")}.`),isFailure:!1}:{message:t.message,isFailure:!0})})};return(0,n.jsx)(g.f,{fleetId:e,children:e=>(0,n.jsxs)("section",{className:"grid gap-3","aria-labelledby":"bridge-basket-heading",children:[(0,n.jsxs)("div",{children:[(0,n.jsxs)("h1",{id:"bridge-basket-heading",className:"text-heading font-semibold",children:["Basket ",(0,n.jsx)("span",{"data-testid":"bridge-basket-count",children:f.length})]}),(0,n.jsx)("p",{className:"text-muted-foreground",children:"Answers you picked in Bridge, not sent yet. Nothing goes until you press Send."})]}),void 0===b?null:(0,n.jsx)(c.f,{message:b.message,isFailure:b.isFailure}),0===f.length?(0,n.jsxs)("div",{"data-testid":"bridge-basket-empty",className:"grid justify-items-center gap-1 rounded-lg border border-border bg-card p-6 text-center",children:[(0,n.jsx)("span",{className:"font-semibold",children:"The basket is empty"}),(0,n.jsx)("span",{className:"text-muted-foreground",children:"Open a question in Waiting on you and put your answer in the basket."})]}):(0,n.jsx)("ul",{className:"grid gap-2",children:f.map(i=>(0,n.jsx)(u,{entry:i,opening:e,working:d,onRemove:v},i.questionId))}),0===x?null:(0,n.jsxs)("div",{className:"grid gap-1",children:[(0,n.jsx)("p",{className:"text-caption text-muted-foreground",children:"Each asker receives its own answer, as you, as if sent one by one."}),(0,n.jsx)(l.f,{"data-testid":"bridge-basket-send",variant:"primary",className:"justify-self-start",isPending:d?.kind==="send",pendingLabel:"Sending...",disabled:void 0!==d||void 0!==e.openingId,onClick:k,children:`Send ${o(x)}`})]})]})})}],22141)},3523,e=>{var n=e.i(43476),i=e.i(71645),t=e.i(73459),s=e.i(65894),r=e.i(49962),d=e.i(12280),a=e.i(22327),o=e.i(4592),l=e.i(40389),c=e.i(57228),g=e.i(55070),u=e.i(63132);function p({inBasket:e,basketHref:i,isRemoving:t,isWorking:s,onRemove:r}){return(0,n.jsxs)("div",{"data-testid":"bridge-in-basket",className:"grid gap-2 rounded-md border border-border bg-muted p-3",children:[(0,n.jsxs)("span",{className:"font-medium",children:["In the basket: option ",e.option,", not sent"]}),null===e.note?null:(0,n.jsxs)("span",{className:"text-caption",children:["“",e.note,"”"]}),(0,n.jsx)("span",{className:"text-caption text-muted-foreground",children:"Pick another option to change it."}),(0,n.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,n.jsx)("a",{"data-testid":"bridge-basket-open",href:i,className:"inline-flex h-9 items-center rounded-md border border-border px-4 hover:bg-accent",children:"Open the basket"}),(0,n.jsx)(g.f,{"data-testid":"bridge-basket-remove",isPending:t,pendingLabel:"Removing...",disabled:s,onClick:r,children:"Remove"})]})]})}function b({question:e,chosen:i,isStale:t,onChoose:s}){return(0,n.jsxs)("fieldset",{className:`grid gap-2 ${t?"opacity-60":""}`,disabled:t,children:[(0,n.jsx)("legend",{className:"sr-only",children:"Options"}),e.options.map(r=>(0,n.jsxs)("label",{className:`flex items-start gap-3 rounded-md border p-3 ${r.key===i&&!t?"border-ring bg-accent":"border-border"}`,children:[(0,n.jsx)("input",{type:"radio",name:"option",value:r.key,checked:r.key===i&&!t,onChange:()=>{s(r.key)},className:"mt-1"}),(0,n.jsxs)("span",{className:"grid flex-1 gap-0.5",children:[(0,n.jsxs)("span",{className:"font-medium",children:[r.key,". ",r.label]}),""===r.detail?null:(0,n.jsx)("span",{className:"text-caption text-muted-foreground",children:r.detail})]}),r.key===e.pick.option?(0,n.jsx)("span",{className:"rounded-sm border border-border px-1.5 text-caption",children:"Their pick"}):null]},r.key))]})}function m({stale:e,from:i,onOpen:t}){let{replacementId:s}=e;return(0,n.jsxs)("div",{"data-testid":"bridge-stale",className:"grid gap-2 rounded-md border border-border bg-muted p-3",children:[(0,n.jsx)("span",{children:"withdrawn"===e.kind?`Withdrawn by ${i}. Nothing to answer: it is done.`:`Replaced by ${i}. Answer the new question.`}),null===s?null:(0,n.jsx)(g.f,{"data-testid":"bridge-replacement",className:"justify-self-start",isPending:!1,pendingLabel:"Opening...",onClick:()=>{t(s)},children:"Open the new question"})]})}function h({step:e}){return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("p",{className:"whitespace-pre-wrap",children:e.why}),void 0===e.link?null:(0,n.jsxs)("a",{"data-testid":"bridge-step-link",href:e.link.href,target:"_blank",rel:"noopener noreferrer",className:"inline-flex h-9 items-center justify-self-start rounded-md border border-border px-4 hover:bg-accent",children:["Open on ",e.link.host]})]})}function f({from:e,note:i,working:t,failure:s,onNoteChange:r,onFinish:d}){let a=void 0!==t;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("label",{className:"grid gap-1",children:[(0,n.jsx)("span",{children:"Note"}),(0,n.jsx)("textarea",{"data-testid":"bridge-note",rows:2,value:i,onChange:e=>{r(e.target.value)},placeholder:"Optional, goes with Done or Cannot",className:"rounded-md border border-input bg-background p-2"})]}),void 0===s?null:(0,n.jsx)(u.f,{message:s,isFailure:!0}),(0,n.jsxs)("div",{className:"grid gap-1",children:[(0,n.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,n.jsx)(g.f,{"data-testid":"bridge-step-done",variant:"primary",isPending:t?.kind==="done",pendingLabel:"Sending...",disabled:a,onClick:()=>{d("done")},children:"Done"}),(0,n.jsx)(g.f,{"data-testid":"bridge-step-cannot",isPending:t?.kind==="cannot",pendingLabel:"Sending...",disabled:a,onClick:()=>{d("cannot")},children:"Cannot"})]}),(0,n.jsxs)("span",{className:"text-caption text-muted-foreground",children:[e," is told at once, with your note."]})]})]})}function x({delivery:e,isDoneOnSeeing:t,meetingHref:s,basketHref:r,inBasket:d,note:a,working:o,failure:l,onNoteChange:c,onAnswer:v,onPut:k,onRemove:j,onDone:w,onFinishStep:y,onOpen:N,onBack:S}){let{question:I,step:$,stale:R}=e,[C,L]=(0,i.useState)(d?.option??I?.pick.option),O=void 0!==o;return(0,n.jsxs)("section",{"data-testid":"bridge-delivery",className:"grid gap-3 rounded-lg border border-border bg-card p-6 text-card-foreground shadow-sm",children:[(0,n.jsxs)("span",{className:"text-caption text-muted-foreground",children:[e.from," · ",new Date(e.sentAt).toUTCString()]}),(0,n.jsx)("h2",{className:"text-heading font-semibold",children:I?.title??e.title}),void 0===s?null:(0,n.jsx)("a",{"data-testid":"bridge-meeting",href:s,className:"inline-flex h-9 items-center justify-self-start rounded-md bg-primary px-4 text-primary-foreground hover:bg-primary-hover",children:"Go to the meeting"}),void 0!==$?(0,n.jsx)(h,{step:$}):void 0===I?(0,n.jsx)("pre",{className:"whitespace-pre-wrap rounded-md bg-muted p-3 font-mono text-caption",children:e.body}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("p",{className:"whitespace-pre-wrap",children:I.context}),(0,n.jsx)(b,{question:I,chosen:C,isStale:null!==R,onChoose:L}),(0,n.jsxs)("p",{className:"text-caption text-muted-foreground",children:[e.from," picks ",I.pick.option,": ",I.pick.why]})]}),null===R?null:(0,n.jsx)(m,{stale:R,from:e.from,onOpen:N}),null===d||null!==R?null:(0,n.jsx)(p,{inBasket:d,basketHref:r,isRemoving:o?.kind==="remove",isWorking:O,onRemove:j}),t?(0,n.jsx)("p",{"data-testid":"bridge-seen-done",className:"text-muted-foreground",children:"Seen now, so done: it asks nothing more."}):null!==R?null:void 0!==$?(0,n.jsx)(f,{from:e.from,note:a,working:o,failure:l,onNoteChange:c,onFinish:y}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("label",{className:"grid gap-1",children:[(0,n.jsx)("span",{children:void 0===I?"Your answer":"Note"}),(0,n.jsx)("textarea",{"data-testid":"bridge-note",rows:2,value:a,onChange:e=>{c(e.target.value)},placeholder:void 0===I?"":"Optional, goes with the answer",className:"rounded-md border border-input bg-background p-2"})]}),void 0===l?null:(0,n.jsx)(u.f,{message:l,isFailure:!0}),void 0===I?(0,n.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,n.jsx)(g.f,{"data-testid":"bridge-answer",variant:"primary",isPending:o?.kind==="note",pendingLabel:"Sending...",disabled:O,onClick:()=>{v(void 0)},children:"Answer"}),(0,n.jsx)(g.f,{"data-testid":"bridge-done",isPending:o?.kind==="done",pendingLabel:"Marking done...",disabled:O,onClick:w,children:"Done"})]}):void 0===C?null:(0,n.jsxs)("div",{className:"grid gap-1",children:[(0,n.jsxs)(g.f,{"data-testid":"bridge-put-in-basket",variant:"primary",className:"justify-self-start",isPending:o?.kind==="option",pendingLabel:"Putting in the basket...",disabled:O,onClick:()=>{k(C)},children:["Put option ",C," in the basket"]}),(0,n.jsxs)("span",{className:"text-caption text-muted-foreground",children:["Nothing is sent yet. ",e.from," receives this answer when you send the basket."]})]})]}),(0,n.jsx)("div",{className:"flex flex-wrap gap-2",children:(0,n.jsx)("button",{type:"button",onClick:S,disabled:O,className:"inline-flex h-9 items-center rounded-md px-4 text-muted-foreground hover:bg-accent disabled:opacity-70",children:"Back"})})]})}e.s(["f",0,function({fleetId:e,children:g}){let[p,b]=(0,i.useState)(),[m,h]=(0,i.useState)(""),[f,v]=(0,i.useState)(),[k,j]=(0,i.useState)(),[w,y]=(0,i.useState)(),[N,S]=(0,i.useState)(),[I,$]=(0,i.useState)(),[,R]=(0,i.useTransition)(),C=n=>{v(n.deliveryId),y(void 0),$(void 0),R(async()=>{let i=await (0,a.f)(e,n.deliveryId);if(v(void 0),i.isOk){let e=n.inBasket??null;b({delivery:i.value,isDoneOnSeeing:"stay-aware"===n.job,inBasket:e}),h(e?.note??""),S(void 0)}else y({deliveryId:n.deliveryId,message:i.message})})},L=({control:e,action:n,said:i})=>{j(e),S(void 0),R(async()=>{let e=await n();j(void 0),e.isOk?(b(void 0),$(i)):S(e.message)})};if(void 0!==p){let{delivery:i,inBasket:a}=p,g=i.question?.id;return(0,n.jsx)(x,{delivery:i,isDoneOnSeeing:p.isDoneOnSeeing,meetingHref:void 0===i.meetingId?void 0:(0,t.f)({fleetId:e,meetingId:i.meetingId}),basketHref:(0,s.f)(c.H,e),inBasket:a,note:m,working:k,failure:N,onNoteChange:h,onAnswer:n=>{L({control:void 0===n?{kind:"note"}:{kind:"option",option:n},action:()=>(0,r.f)({fleet:e,deliveryId:i.deliveryId,input:{questionId:i.question?.id,option:n,note:m}}),said:`Your answer went to ${i.from}.`})},onPut:n=>{L({control:{kind:"option",option:n},action:()=>(0,o.f)({fleet:e,deliveryId:i.deliveryId,option:n,note:m}),said:`Option ${String(n)} is in the basket, not sent: ${i.from} receives it when you send the basket.`})},onRemove:()=>{void 0!==g&&L({control:{kind:"remove"},action:()=>(0,l.f)(e,g),said:`Your answer to “${i.title}” is out of the basket; the question still waits on you.`})},onDone:()=>{L({control:{kind:"done"},action:()=>(0,d.f)({fleet:e,deliveryId:i.deliveryId}),said:`Done with “${i.title}”.`})},onFinishStep:n=>{L({control:{kind:n},action:()=>(0,d.f)({fleet:e,deliveryId:i.deliveryId,step:{outcome:n,note:m}}),said:"done"===n?`Done: ${i.from} is told “${i.title}” is done.`:`Cannot: ${i.from} is told you cannot do “${i.title}”.`})},onOpen:e=>{C({deliveryId:e,job:"decide"})},onBack:()=>{b(void 0)}},i.deliveryId)}return(0,n.jsxs)("div",{className:"grid gap-4",children:[void 0===I?null:(0,n.jsx)(u.f,{message:I,isFailure:!1}),g({open:C,openingId:f,failure:w})]})}],3523)},10629,e=>{var n=e.i(71645),i=e.i(18566);e.s(["LiveRefresh",0,function({fleetId:e}){let t;return t=(0,i.useRouter)(),(0,n.useEffect)(()=>{let n=new EventSource(`/bridge/changes?fleet=${encodeURIComponent(e)}`);return n.onmessage=()=>{t.refresh()},()=>{n.close()}},[e,t]),(0,n.useEffect)(()=>{let n,i=()=>{let i="visible"===document.visibilityState&&document.hasFocus();i&&void 0===n?n=new EventSource(`/bridge/focus?fleet=${encodeURIComponent(e)}`):i||void 0===n||(n.close(),n=void 0)};return i(),window.addEventListener("focus",i),window.addEventListener("blur",i),document.addEventListener("visibilitychange",i),()=>{window.removeEventListener("focus",i),window.removeEventListener("blur",i),document.removeEventListener("visibilitychange",i),n?.close()}},[e]),null}],10629)},84238,e=>{var n=e.i(43476),i=e.i(18566),t=e.i(71645);e.s(["RecordUnreadable",0,function({message:e}){let s=(0,i.useRouter)();return(0,t.useEffect)(()=>{let e=setInterval(()=>{s.refresh()},1e4);return()=>{clearInterval(e)}},[s]),(0,n.jsxs)("section",{role:"alert","data-testid":"bridge-unreadable",className:"flex flex-wrap items-center gap-3 rounded-md border border-tone-attention-border bg-tone-attention-bg px-3 py-2 text-tone-attention-fg",children:[(0,n.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col",children:[(0,n.jsx)("span",{className:"font-semibold",children:"The record cannot be read now"}),(0,n.jsxs)("span",{className:"text-caption",children:[e," Nothing was opened or answered, so nothing is lost: Bridge tries again in 10 s."]})]}),(0,n.jsx)("button",{type:"button","data-testid":"bridge-try-now",onClick:()=>{s.refresh()},className:"inline-flex h-9 items-center rounded-md border border-border bg-card px-4 text-card-foreground hover:bg-accent",children:"Try now"})]})}])},55070,e=>{var n=e.i(43476);let i={primary:"bg-primary text-primary-foreground hover:bg-primary-hover",secondary:"border border-border bg-card text-card-foreground hover:bg-accent"};e.s(["f",0,function({isPending:e,pendingLabel:t,variant:s="secondary",children:r,className:d="",disabled:a,...o}){return(0,n.jsx)("button",{...o,disabled:!0===a||e,"aria-busy":e,className:`inline-flex h-9 items-center gap-2 rounded-md px-4 disabled:cursor-not-allowed disabled:opacity-70 ${i[s]} ${d}`,children:e?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{"aria-hidden":"true",className:"size-3.5 animate-spin rounded-full border-2 border-current border-t-transparent"}),t]}):r})}])},63132,e=>{var n=e.i(43476);e.s(["f",0,function({message:e,isFailure:i}){return i?(0,n.jsx)("p",{role:"alert","data-testid":"bridge-failure",className:"rounded-md border border-tone-attention-border bg-tone-attention-bg px-3 py-2 text-tone-attention-fg",children:e}):(0,n.jsx)("p",{role:"status","data-testid":"bridge-success",className:"rounded-md border border-tone-ok-border bg-tone-ok-bg px-3 py-2 text-tone-ok-fg",children:e})}])},73459,49962,12280,22327,4592,e=>{e.s(["f",0,function(e){let n=new URLSearchParams({fleet:e.fleetId,...void 0===e.cursor?{}:{cursor:e.cursor}});return`/meetings/${encodeURIComponent(e.meetingId)}?${n.toString()}`}],73459);var n=e.i(95187);let i=(0,n.createServerReference)("40312d708ed123f3bff12a0e5d5ab7bdd456131901",n.callServer,void 0,n.findSourceMapURL,"answerDelivery");e.s(["f",0,i],49962);let t=(0,n.createServerReference)("407cf7e8bf1a43e93e600808ccd1631dfd13c9b490",n.callServer,void 0,n.findSourceMapURL,"doneDelivery");e.s(["f",0,t],12280);let s=(0,n.createServerReference)("60c205c99f267754b5cb7b09118fdaf91f419555a5",n.callServer,void 0,n.findSourceMapURL,"openDelivery");e.s(["f",0,s],22327);let r=(0,n.createServerReference)("40c05f98915a7c9661aa8f801d392296ba8350eeba",n.callServer,void 0,n.findSourceMapURL,"putInBasket");e.s(["f",0,r],4592)}])})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,87722,e=>{var s=e.i(43476),n=e.i(71645),a=e.i(28008),r=e.i(62052),t=e.i(30402),d=e.i(94984),i=e.i(65818),l=e.i(58107),c=e.i(90526),o=e.i(95187);let u=(0,o.createServerReference)("
|
|
1
|
+
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,87722,e=>{var s=e.i(43476),n=e.i(71645),a=e.i(28008),r=e.i(62052),t=e.i(30402),d=e.i(94984),i=e.i(65818),l=e.i(58107),c=e.i(90526),o=e.i(95187);let u=(0,o.createServerReference)("608ddc2429cd652b9135768f59e77d96531624d7b3",o.callServer,void 0,o.findSourceMapURL,"addA2aAgent"),m={kind:"idle"};e.s(["A2aAgentForm",0,function({fleetId:e,requestId:o,owners:p,scopes:h}){let[x,f]=(0,n.useActionState)(u,m),g="refused"===x.kind?x.fields:{};return(0,s.jsxs)("form",{action:f,className:`${t.r} grid gap-3`,"data-testid":"add-a2a-agent-form",children:[(0,s.jsx)("input",{type:"hidden",name:a.H,value:e}),(0,s.jsx)("input",{type:"hidden",name:"requestId",value:o}),(0,s.jsx)("h1",{className:"text-title font-semibold",children:"Add an A2A agent"}),(0,s.jsx)(d.f,{state:"refused"===x.kind?x:{kind:"idle"}}),(0,s.jsxs)("label",{className:t.z,children:[(0,s.jsx)("span",{children:"Name, the proxy ship's"}),(0,s.jsx)("input",{className:t.w,name:"name",defaultValue:g.name??"",required:!0})]}),(0,s.jsxs)("label",{className:t.z,children:[(0,s.jsx)("span",{children:"Card address"}),(0,s.jsx)("input",{className:t.w,type:"url",name:"cardUrl",defaultValue:g.cardUrl??"",placeholder:"https://agent.example.com/.well-known/agent-card.json",required:!0}),(0,s.jsx)("span",{className:"text-caption text-muted-foreground",children:"The gateway reads the card first: an agent whose card it cannot state is not added."})]}),(0,s.jsx)(r.f,{legend:"The agent's credential",fields:g,noneHelp:"The gateway sends no credential: for an agent that asks for none."}),(0,s.jsxs)("label",{className:t.z,children:[(0,s.jsx)("span",{children:"Messages in flight at once"}),(0,s.jsx)("input",{className:t.w,type:"number",name:"concurrencyLimit",min:1,max:10,defaultValue:g.concurrencyLimit??"4"})]}),(0,s.jsx)(i.f,{choices:p.isOk?p.value:[],current:null,help:"A person ship or argo. It answers for this agent.",refusal:p.isOk?void 0:p.refusal}),0===h.length?null:(0,s.jsxs)("fieldset",{className:"grid gap-2",children:[(0,s.jsx)("legend",{className:"font-medium",children:"Scopes, beside sending and receiving"}),h.map(e=>(0,s.jsxs)("label",{className:"flex items-center gap-2",children:[(0,s.jsx)("input",{type:"checkbox",name:`${c.f}${e}`,defaultChecked:void 0!==g[`${c.f}${e}`]}),(0,s.jsx)("span",{className:"font-mono text-code",children:e})]},e))]}),(0,s.jsx)("div",{children:(0,s.jsx)(l.f,{pending:"Reading the card…",children:"Add"})})]})}],87722)},28008,e=>{e.s(["H",0,"fleet","Q",0,{kind:"idle"}])},88374,e=>{let s=[{kind:"none",label:"No credential"},{kind:"bearer",label:"Bearer token"},{kind:"clientCredentials",label:"OAuth client credentials"}],n={kind:"personSignIn",label:"Each person signs in"},a=[...s,n];e.s(["a",0,a,"x",0,s,"m",0,n,"G",0,function(e){return a.find(({kind:s})=>s===e)?.kind??"bearer"},"C",0,function(e){return s.find(({kind:s})=>s===e)?.kind??"bearer"}])},62052,e=>{var s=e.i(43476),n=e.i(71645),a=e.i(88374),r=e.i(30402);e.s(["f",0,function({legend:e,fields:t,noneHelp:d,canEachPersonSignIn:i=!1,onKindChange:l}){let c=i?a.G:a.C,[o,u]=(0,n.useState)(c(t.credentialKind??""));return(0,s.jsxs)("fieldset",{className:"grid gap-3",children:[(0,s.jsx)("legend",{className:"font-medium",children:e}),(0,s.jsxs)("label",{className:r.z,children:[(0,s.jsx)("span",{children:"Credential"}),(0,s.jsx)("select",{className:r.w,name:"credentialKind",value:o,onChange:e=>{let s=c(e.target.value);u(s),l?.(s)},children:(i?a.a:a.x).map(({kind:e,label:n})=>(0,s.jsx)("option",{value:e,children:n},e))})]}),"clientCredentials"===o?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("label",{className:r.z,children:[(0,s.jsx)("span",{children:"Client id"}),(0,s.jsx)("input",{className:r.w,type:"text",name:"clientId",defaultValue:t.clientId??""})]}),(0,s.jsxs)("label",{className:r.z,children:[(0,s.jsx)("span",{children:"Client secret"}),(0,s.jsx)("input",{className:r.w,type:"password",name:"clientSecret"})]}),(0,s.jsxs)("label",{className:r.z,children:[(0,s.jsx)("span",{children:"Issuer"}),(0,s.jsx)("input",{className:r.w,type:"url",name:"issuer",defaultValue:t.issuer??""})]}),(0,s.jsxs)("label",{className:r.z,children:[(0,s.jsx)("span",{children:"Scope"}),(0,s.jsx)("input",{className:r.w,type:"text",name:"scope",defaultValue:t.scope??""})]})]}):"bearer"===o?(0,s.jsxs)("label",{className:r.z,children:[(0,s.jsx)("span",{children:"Bearer token"}),(0,s.jsx)("input",{className:r.w,type:"password",name:"token"})]}):o===a.m.kind?(0,s.jsx)("p",{className:"text-muted-foreground",children:"Each person signs in for themselves. A ship calls under its owner's sign-in."}):(0,s.jsx)("p",{className:"text-muted-foreground",children:d})]})}])},30402,e=>{let s="inline-flex h-9 items-center justify-center gap-2 rounded-md px-4 font-medium disabled:opacity-60",n={primary:`${s} bg-primary text-primary-foreground hover:bg-primary-hover`,secondary:`${s} border border-border bg-card hover:bg-accent`,destructive:`${s} bg-destructive text-destructive-foreground`};e.s(["x",0,n,"r",0,"rounded-lg border border-border bg-card p-6 text-card-foreground shadow-sm","w",0,"h-9 w-full rounded-md border border-input bg-background px-3 font-mono text-code","z",0,"grid gap-1"])},94984,e=>{var s=e.i(43476);e.s(["f",0,function({state:e,testId:n}){switch(e.kind){case"idle":return null;case"done":return(0,s.jsx)("p",{role:"status","data-testid":n,className:"rounded-md border border-tone-ok-border bg-tone-ok-bg px-3 py-2 text-tone-ok-fg",children:e.message});case"refused":case"openNetwork":return(0,s.jsx)("p",{role:"alert","data-testid":n,className:"rounded-md border border-tone-attention-border bg-tone-attention-bg px-3 py-2 text-tone-attention-fg",children:e.message})}}])},65818,e=>{var s=e.i(43476),n=e.i(30402);e.s(["f",0,function({choices:e,current:a,help:r,refusal:t}){let d=null===a||e.some(e=>e.shipId===a.shipId)?e:[a,...e];return(0,s.jsxs)("label",{className:n.z,children:[(0,s.jsx)("span",{children:"Owner"}),(0,s.jsxs)("select",{className:n.w,name:"ownerShipId",defaultValue:a?.shipId??"",required:!0,"data-testid":"owner-field",children:[null===a?(0,s.jsx)("option",{value:"",disabled:!0,children:"Pick its owner"}):null,d.map(e=>(0,s.jsx)("option",{value:e.shipId,children:e.name},e.shipId))]}),(0,s.jsx)("span",{className:"text-muted-foreground",children:t??r})]})}])},58107,e=>{var s=e.i(43476),n=e.i(74080),a=e.i(30402);e.s(["f",0,function({children:e,pending:r,kind:t="primary",testId:d}){let i=(0,n.useFormStatus)();return(0,s.jsx)("button",{type:"submit",className:a.x[t],disabled:i.pending,"aria-busy":i.pending,"data-testid":d,children:i.pending?r:e})}])},90526,e=>{e.s(["f",0,"scope:"])}])})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,21611,e=>{var d=e.i(43476),r=e.i(71645),n=e.i(65894),s=e.i(28008),t=e.i(30402),
|
|
1
|
+
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,21611,e=>{var d=e.i(43476),r=e.i(71645),n=e.i(65894),s=e.i(28008),t=e.i(30402),i=e.i(94984),a=e.i(65818),o=e.i(58107),l=e.i(31831),c=e.i(90526),u=e.i(95187);let p=(0,u.createServerReference)("600996d1c8be3b57419d4f4c5c7afb4f599f261823",u.callServer,void 0,u.findSourceMapURL,"addA2aClient"),m={kind:"idle"};function h({name:e,bearer:r,fleetId:s}){return(0,d.jsxs)("section",{className:`${t.r} grid gap-3`,"data-testid":"add-a2a-client-added",children:[(0,d.jsxs)("h2",{className:"text-section font-semibold",children:[e," is added"]}),(0,d.jsx)("p",{children:"Hand its client this bearer now. It is shown only once: the gateway keeps no copy it can show again."}),(0,d.jsx)("code",{className:"break-all rounded-md border border-border bg-background px-3 py-2 font-mono text-code","data-testid":"add-a2a-client-bearer",children:r}),(0,d.jsx)("p",{children:(0,d.jsx)("a",{href:(0,n.f)((0,l.f)(e),s),className:"text-primary hover:underline",children:"Its card addresses"})})]})}e.s(["A2aClientForm",0,function({fleetId:e,requestId:n,owners:l,scopes:u}){let[b,x]=(0,r.useActionState)(p,m);return"added"===b.kind?(0,d.jsx)(h,{name:b.name,bearer:b.bearer,fleetId:e}):(0,d.jsxs)("form",{action:x,className:`${t.r} grid gap-3`,"data-testid":"add-a2a-client-form",children:[(0,d.jsx)("input",{type:"hidden",name:s.H,value:e}),(0,d.jsx)("input",{type:"hidden",name:"requestId",value:n}),(0,d.jsx)("h1",{className:"text-title font-semibold",children:"Add an A2A client"}),(0,d.jsxs)("label",{className:t.z,children:[(0,d.jsx)("span",{children:"Name, the proxy ship's"}),(0,d.jsx)("input",{className:t.w,name:"name",required:!0})]}),(0,d.jsx)(a.f,{choices:l.isOk?l.value:[],current:null,help:"A person ship or argo. It answers for this client.",refusal:l.isOk?void 0:l.refusal}),0===u.length?null:(0,d.jsxs)("fieldset",{className:"grid gap-2",children:[(0,d.jsx)("legend",{className:"font-medium",children:"Scopes, beside sending and receiving"}),u.map(e=>(0,d.jsxs)("label",{className:"flex items-center gap-2",children:[(0,d.jsx)("input",{type:"checkbox",name:`${c.f}${e}`}),(0,d.jsx)("span",{className:"font-mono text-code",children:e})]},e))]}),(0,d.jsx)("div",{children:(0,d.jsx)(o.f,{pending:"Adding…",children:"Add"})}),(0,d.jsx)(i.f,{state:"refused"===b.kind?b:{kind:"idle"}})]})}],21611)},28008,e=>{e.s(["H",0,"fleet","Q",0,{kind:"idle"}])},30402,e=>{let d="inline-flex h-9 items-center justify-center gap-2 rounded-md px-4 font-medium disabled:opacity-60",r={primary:`${d} bg-primary text-primary-foreground hover:bg-primary-hover`,secondary:`${d} border border-border bg-card hover:bg-accent`,destructive:`${d} bg-destructive text-destructive-foreground`};e.s(["x",0,r,"r",0,"rounded-lg border border-border bg-card p-6 text-card-foreground shadow-sm","w",0,"h-9 w-full rounded-md border border-input bg-background px-3 font-mono text-code","z",0,"grid gap-1"])},94984,e=>{var d=e.i(43476);e.s(["f",0,function({state:e,testId:r}){switch(e.kind){case"idle":return null;case"done":return(0,d.jsx)("p",{role:"status","data-testid":r,className:"rounded-md border border-tone-ok-border bg-tone-ok-bg px-3 py-2 text-tone-ok-fg",children:e.message});case"refused":case"openNetwork":return(0,d.jsx)("p",{role:"alert","data-testid":r,className:"rounded-md border border-tone-attention-border bg-tone-attention-bg px-3 py-2 text-tone-attention-fg",children:e.message})}}])},65818,e=>{var d=e.i(43476),r=e.i(30402);e.s(["f",0,function({choices:e,current:n,help:s,refusal:t}){let i=null===n||e.some(e=>e.shipId===n.shipId)?e:[n,...e];return(0,d.jsxs)("label",{className:r.z,children:[(0,d.jsx)("span",{children:"Owner"}),(0,d.jsxs)("select",{className:r.w,name:"ownerShipId",defaultValue:n?.shipId??"",required:!0,"data-testid":"owner-field",children:[null===n?(0,d.jsx)("option",{value:"",disabled:!0,children:"Pick its owner"}):null,i.map(e=>(0,d.jsx)("option",{value:e.shipId,children:e.name},e.shipId))]}),(0,d.jsx)("span",{className:"text-muted-foreground",children:t??s})]})}])},58107,e=>{var d=e.i(43476),r=e.i(74080),n=e.i(30402);e.s(["f",0,function({children:e,pending:s,kind:t="primary",testId:i}){let a=(0,r.useFormStatus)();return(0,d.jsx)("button",{type:"submit",className:n.x[t],disabled:a.pending,"aria-busy":a.pending,"data-testid":i,children:a.pending?s:e})}])},31831,e=>{e.s(["f",0,function(e,d){return`/outside-parties/${encodeURIComponent(e)}${void 0===d?"":`/${d}`}`}])},90526,e=>{e.s(["f",0,"scope:"])}])})();
|