@aeolus-fleet/gateway 0.38.0 → 0.38.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (439) hide show
  1. package/package.json +7 -1
  2. package/web/.next/BUILD_ID +1 -1
  3. package/web/.next/build-manifest.json +3 -3
  4. package/web/.next/diagnostics/route-bundle-stats.json +73 -73
  5. package/web/.next/fallback-build-manifest.json +3 -3
  6. package/web/.next/prerender-manifest.json +3 -3
  7. package/web/.next/server/app/(bridge)/bridge/basket/page/server-reference-manifest.json +10 -10
  8. package/web/.next/server/app/(bridge)/bridge/basket/page.js +5 -4
  9. package/web/.next/server/app/(bridge)/bridge/basket/page.js.nft.json +1 -1
  10. package/web/.next/server/app/(bridge)/bridge/basket/page_client-reference-manifest.js +1 -1
  11. package/web/.next/server/app/(bridge)/bridge/done/page/server-reference-manifest.json +4 -4
  12. package/web/.next/server/app/(bridge)/bridge/done/page.js +6 -5
  13. package/web/.next/server/app/(bridge)/bridge/done/page.js.nft.json +1 -1
  14. package/web/.next/server/app/(bridge)/bridge/done/page_client-reference-manifest.js +1 -1
  15. package/web/.next/server/app/(bridge)/bridge/fleet/page/server-reference-manifest.json +3 -3
  16. package/web/.next/server/app/(bridge)/bridge/fleet/page.js +5 -4
  17. package/web/.next/server/app/(bridge)/bridge/fleet/page.js.nft.json +1 -1
  18. package/web/.next/server/app/(bridge)/bridge/fleet/page_client-reference-manifest.js +1 -1
  19. package/web/.next/server/app/(bridge)/bridge/messages/page/server-reference-manifest.json +11 -11
  20. package/web/.next/server/app/(bridge)/bridge/messages/page.js +5 -4
  21. package/web/.next/server/app/(bridge)/bridge/messages/page.js.nft.json +1 -1
  22. package/web/.next/server/app/(bridge)/bridge/messages/page_client-reference-manifest.js +1 -1
  23. package/web/.next/server/app/(bridge)/bridge/page/server-reference-manifest.json +10 -10
  24. package/web/.next/server/app/(bridge)/bridge/page.js +5 -4
  25. package/web/.next/server/app/(bridge)/bridge/page.js.nft.json +1 -1
  26. package/web/.next/server/app/(bridge)/bridge/page_client-reference-manifest.js +1 -1
  27. package/web/.next/server/app/(bridge)/bridge/settings/page/server-reference-manifest.json +3 -3
  28. package/web/.next/server/app/(bridge)/bridge/settings/page.js +5 -4
  29. package/web/.next/server/app/(bridge)/bridge/settings/page.js.nft.json +1 -1
  30. package/web/.next/server/app/(bridge)/bridge/settings/page_client-reference-manifest.js +1 -1
  31. package/web/.next/server/app/(bridge)/bridge/settings/requests/[requestId]/page/server-reference-manifest.json +4 -4
  32. package/web/.next/server/app/(bridge)/bridge/settings/requests/[requestId]/page.js +5 -4
  33. package/web/.next/server/app/(bridge)/bridge/settings/requests/[requestId]/page.js.nft.json +1 -1
  34. package/web/.next/server/app/(bridge)/bridge/settings/requests/[requestId]/page_client-reference-manifest.js +1 -1
  35. package/web/.next/server/app/(bridge)/bridge/settings/routing/page/server-reference-manifest.json +7 -7
  36. package/web/.next/server/app/(bridge)/bridge/settings/routing/page.js +5 -4
  37. package/web/.next/server/app/(bridge)/bridge/settings/routing/page.js.nft.json +1 -1
  38. package/web/.next/server/app/(bridge)/bridge/settings/routing/page_client-reference-manifest.js +1 -1
  39. package/web/.next/server/app/(bridge)/bridge/stay-aware/page/server-reference-manifest.json +10 -10
  40. package/web/.next/server/app/(bridge)/bridge/stay-aware/page.js +5 -4
  41. package/web/.next/server/app/(bridge)/bridge/stay-aware/page.js.nft.json +1 -1
  42. package/web/.next/server/app/(bridge)/bridge/stay-aware/page_client-reference-manifest.js +1 -1
  43. package/web/.next/server/app/(bridge)/outside-parties/[name]/change/page/server-reference-manifest.json +19 -19
  44. package/web/.next/server/app/(bridge)/outside-parties/[name]/change/page.js +5 -4
  45. package/web/.next/server/app/(bridge)/outside-parties/[name]/change/page.js.nft.json +1 -1
  46. package/web/.next/server/app/(bridge)/outside-parties/[name]/change/page_client-reference-manifest.js +1 -1
  47. package/web/.next/server/app/(bridge)/outside-parties/[name]/page/server-reference-manifest.json +10 -10
  48. package/web/.next/server/app/(bridge)/outside-parties/[name]/page.js +5 -4
  49. package/web/.next/server/app/(bridge)/outside-parties/[name]/page.js.nft.json +1 -1
  50. package/web/.next/server/app/(bridge)/outside-parties/[name]/page_client-reference-manifest.js +1 -1
  51. package/web/.next/server/app/(bridge)/outside-parties/[name]/retire/page/server-reference-manifest.json +19 -19
  52. package/web/.next/server/app/(bridge)/outside-parties/[name]/retire/page.js +5 -4
  53. package/web/.next/server/app/(bridge)/outside-parties/[name]/retire/page.js.nft.json +1 -1
  54. package/web/.next/server/app/(bridge)/outside-parties/[name]/retire/page_client-reference-manifest.js +1 -1
  55. package/web/.next/server/app/(bridge)/outside-parties/add/page/server-reference-manifest.json +12 -12
  56. package/web/.next/server/app/(bridge)/outside-parties/add/page.js +5 -4
  57. package/web/.next/server/app/(bridge)/outside-parties/add/page.js.nft.json +1 -1
  58. package/web/.next/server/app/(bridge)/outside-parties/add/page_client-reference-manifest.js +1 -1
  59. package/web/.next/server/app/(bridge)/outside-parties/add-a2a-agent/page/server-reference-manifest.json +4 -4
  60. package/web/.next/server/app/(bridge)/outside-parties/add-a2a-agent/page.js +5 -4
  61. package/web/.next/server/app/(bridge)/outside-parties/add-a2a-agent/page.js.nft.json +1 -1
  62. package/web/.next/server/app/(bridge)/outside-parties/add-a2a-agent/page_client-reference-manifest.js +1 -1
  63. package/web/.next/server/app/(bridge)/outside-parties/add-a2a-client/page/server-reference-manifest.json +4 -4
  64. package/web/.next/server/app/(bridge)/outside-parties/add-a2a-client/page.js +5 -4
  65. package/web/.next/server/app/(bridge)/outside-parties/add-a2a-client/page.js.nft.json +1 -1
  66. package/web/.next/server/app/(bridge)/outside-parties/add-a2a-client/page_client-reference-manifest.js +1 -1
  67. package/web/.next/server/app/(bridge)/outside-parties/page/server-reference-manifest.json +4 -4
  68. package/web/.next/server/app/(bridge)/outside-parties/page.js +5 -4
  69. package/web/.next/server/app/(bridge)/outside-parties/page.js.nft.json +1 -1
  70. package/web/.next/server/app/(bridge)/outside-parties/page_client-reference-manifest.js +1 -1
  71. package/web/.next/server/app/(console)/gateway-off/page/server-reference-manifest.json +1 -1
  72. package/web/.next/server/app/(console)/gateway-off/page.js +1 -1
  73. package/web/.next/server/app/(console)/gateway-off/page.js.nft.json +1 -1
  74. package/web/.next/server/app/(console)/gateway-off/page_client-reference-manifest.js +1 -1
  75. package/web/.next/server/app/(console)/meetings/[meetingId]/page/server-reference-manifest.json +3 -3
  76. package/web/.next/server/app/(console)/meetings/[meetingId]/page.js +1 -1
  77. package/web/.next/server/app/(console)/meetings/[meetingId]/page.js.nft.json +1 -1
  78. package/web/.next/server/app/(console)/meetings/[meetingId]/page_client-reference-manifest.js +1 -1
  79. package/web/.next/server/app/(console)/parties/page/server-reference-manifest.json +9 -9
  80. package/web/.next/server/app/(console)/parties/page.js +1 -1
  81. package/web/.next/server/app/(console)/parties/page.js.nft.json +1 -1
  82. package/web/.next/server/app/(console)/parties/page_client-reference-manifest.js +1 -1
  83. package/web/.next/server/app/(console)/sign-in/failed/page/server-reference-manifest.json +1 -1
  84. package/web/.next/server/app/(console)/sign-in/failed/page.js +1 -1
  85. package/web/.next/server/app/(console)/sign-in/failed/page.js.nft.json +1 -1
  86. package/web/.next/server/app/(console)/sign-in/failed/page_client-reference-manifest.js +1 -1
  87. package/web/.next/server/app/(console)/slack/disconnect/page/server-reference-manifest.json +10 -10
  88. package/web/.next/server/app/(console)/slack/disconnect/page.js +1 -1
  89. package/web/.next/server/app/(console)/slack/disconnect/page.js.nft.json +1 -1
  90. package/web/.next/server/app/(console)/slack/disconnect/page_client-reference-manifest.js +1 -1
  91. package/web/.next/server/app/(console)/slack/expose/page/server-reference-manifest.json +10 -10
  92. package/web/.next/server/app/(console)/slack/expose/page.js +3 -3
  93. package/web/.next/server/app/(console)/slack/expose/page.js.nft.json +1 -1
  94. package/web/.next/server/app/(console)/slack/expose/page_client-reference-manifest.js +1 -1
  95. package/web/.next/server/app/(console)/slack/page/server-reference-manifest.json +10 -10
  96. package/web/.next/server/app/(console)/slack/page.js +1 -1
  97. package/web/.next/server/app/(console)/slack/page.js.nft.json +1 -1
  98. package/web/.next/server/app/(console)/slack/page_client-reference-manifest.js +1 -1
  99. package/web/.next/server/app/(console)/slack/remove/page/server-reference-manifest.json +10 -10
  100. package/web/.next/server/app/(console)/slack/remove/page.js +1 -1
  101. package/web/.next/server/app/(console)/slack/remove/page.js.nft.json +1 -1
  102. package/web/.next/server/app/(console)/slack/remove/page_client-reference-manifest.js +1 -1
  103. package/web/.next/server/app/_global-error.html +1 -1
  104. package/web/.next/server/app/_global-error.rsc +1 -1
  105. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  106. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  107. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  108. package/web/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
  109. package/web/.next/server/app/_not-found/page.js +1 -1
  110. package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
  111. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  112. package/web/.next/server/app/apple-icon.png/route.js.nft.json +1 -1
  113. package/web/.next/server/app/apple-icon.png.body +0 -0
  114. package/web/.next/server/app/authorize/failed/page/server-reference-manifest.json +1 -1
  115. package/web/.next/server/app/authorize/failed/page.js +1 -1
  116. package/web/.next/server/app/authorize/failed/page.js.nft.json +1 -1
  117. package/web/.next/server/app/authorize/failed/page_client-reference-manifest.js +1 -1
  118. package/web/.next/server/app/authorize/pick/page/server-reference-manifest.json +1 -1
  119. package/web/.next/server/app/authorize/pick/page.js +1 -1
  120. package/web/.next/server/app/authorize/pick/page.js.nft.json +1 -1
  121. package/web/.next/server/app/authorize/pick/page_client-reference-manifest.js +1 -1
  122. package/web/.next/server/app/authorize/waiting/approval/page/server-reference-manifest.json +1 -1
  123. package/web/.next/server/app/authorize/waiting/approval/page.js +1 -1
  124. package/web/.next/server/app/authorize/waiting/approval/page.js.nft.json +1 -1
  125. package/web/.next/server/app/authorize/waiting/approval/page_client-reference-manifest.js +1 -1
  126. package/web/.next/server/app/icon.svg/route.js.nft.json +1 -1
  127. package/web/.next/server/app/icon.svg.body +1 -19
  128. package/web/.next/server/chunks/_0xw0b7avhvg75._.js +1 -1
  129. package/web/.next/server/chunks/_0xw0b7avhvg75._.js.map +1 -1
  130. package/web/.next/server/chunks/_1w2t6c0hpdsrn._.js +1 -1
  131. package/web/.next/server/chunks/_1w2t6c0hpdsrn._.js.map +1 -1
  132. package/web/.next/server/chunks/ssr/01fr_app_(bridge)_bridge_settings_requests_[requestId]_page_actions_0o8g7_xshtmem.js +1 -1
  133. package/web/.next/server/chunks/ssr/01fr_app_(bridge)_bridge_settings_requests_[requestId]_page_actions_0o8g7_xshtmem.js.map +1 -1
  134. package/web/.next/server/chunks/ssr/0b9d__next-internal_server_app_(bridge)_bridge_messages_page_actions_1tg2-lw0i6g9l.js +1 -1
  135. package/web/.next/server/chunks/ssr/0b9d__next-internal_server_app_(bridge)_bridge_messages_page_actions_1tg2-lw0i6g9l.js.map +1 -1
  136. package/web/.next/server/chunks/ssr/0b9d__next-internal_server_app_(bridge)_bridge_settings_page_actions_0_te6h-2xxp7l.js +1 -1
  137. package/web/.next/server/chunks/ssr/0b9d__next-internal_server_app_(bridge)_bridge_settings_page_actions_0_te6h-2xxp7l.js.map +1 -1
  138. package/web/.next/server/chunks/ssr/0b9d__next-internal_server_app_(bridge)_bridge_stay-aware_page_actions_1u0xo0v3y9c34.js +1 -1
  139. package/web/.next/server/chunks/ssr/0b9d__next-internal_server_app_(bridge)_bridge_stay-aware_page_actions_1u0xo0v3y9c34.js.map +1 -1
  140. package/web/.next/server/chunks/ssr/0vkm_server_app_(bridge)_bridge_settings_routing_page_actions_06_j7s24dy5ee.js +1 -1
  141. package/web/.next/server/chunks/ssr/0vkm_server_app_(bridge)_bridge_settings_routing_page_actions_06_j7s24dy5ee.js.map +1 -1
  142. package/web/.next/server/chunks/ssr/0vkm_server_app_(bridge)_outside-parties_[name]_change_page_actions_1is-kjq5bubl4.js +1 -1
  143. package/web/.next/server/chunks/ssr/0vkm_server_app_(bridge)_outside-parties_[name]_change_page_actions_1is-kjq5bubl4.js.map +1 -1
  144. package/web/.next/server/chunks/ssr/0vkm_server_app_(bridge)_outside-parties_[name]_page_actions_1mctxtlzsa7xi.js +1 -1
  145. package/web/.next/server/chunks/ssr/0vkm_server_app_(bridge)_outside-parties_[name]_page_actions_1mctxtlzsa7xi.js.map +1 -1
  146. package/web/.next/server/chunks/ssr/0vkm_server_app_(bridge)_outside-parties_[name]_retire_page_actions_0xh6ok1un7s9k.js +1 -1
  147. package/web/.next/server/chunks/ssr/0vkm_server_app_(bridge)_outside-parties_[name]_retire_page_actions_0xh6ok1un7s9k.js.map +1 -1
  148. package/web/.next/server/chunks/ssr/0vkm_server_app_(bridge)_outside-parties_add-a2a-agent_page_actions_1w1q5eavo_loo.js +1 -1
  149. package/web/.next/server/chunks/ssr/0vkm_server_app_(bridge)_outside-parties_add-a2a-agent_page_actions_1w1q5eavo_loo.js.map +1 -1
  150. package/web/.next/server/chunks/ssr/0vkm_server_app_(bridge)_outside-parties_add_page_actions_0urcbg_r0lo7j.js +1 -1
  151. package/web/.next/server/chunks/ssr/0vkm_server_app_(bridge)_outside-parties_add_page_actions_0urcbg_r0lo7j.js.map +1 -1
  152. package/web/.next/server/chunks/ssr/[root-of-the-server]__0-h3ug3wdr27n._.js +1 -1
  153. package/web/.next/server/chunks/ssr/[root-of-the-server]__0-h3ug3wdr27n._.js.map +1 -1
  154. package/web/.next/server/chunks/ssr/[root-of-the-server]__03xkymn2kbk1v._.js +1 -1
  155. package/web/.next/server/chunks/ssr/[root-of-the-server]__03xkymn2kbk1v._.js.map +1 -1
  156. package/web/.next/server/chunks/ssr/[root-of-the-server]__048-rfvdrnoze._.js +1 -1
  157. package/web/.next/server/chunks/ssr/[root-of-the-server]__048-rfvdrnoze._.js.map +1 -1
  158. package/web/.next/server/chunks/ssr/[root-of-the-server]__04g-10_lwy-l2._.js +1 -1
  159. package/web/.next/server/chunks/ssr/[root-of-the-server]__06nuuvz8l91mm._.js +10 -0
  160. package/web/.next/server/chunks/ssr/[root-of-the-server]__06nuuvz8l91mm._.js.map +1 -0
  161. package/web/.next/server/chunks/ssr/[root-of-the-server]__07ba2bfe20c_p._.js +1 -1
  162. package/web/.next/server/chunks/ssr/[root-of-the-server]__07ba2bfe20c_p._.js.map +1 -1
  163. package/web/.next/server/chunks/ssr/[root-of-the-server]__0f732g7ojc5-a._.js +1 -1
  164. package/web/.next/server/chunks/ssr/[root-of-the-server]__0f732g7ojc5-a._.js.map +1 -1
  165. package/web/.next/server/chunks/ssr/[root-of-the-server]__0fujyqtfujrz5._.js +1 -1
  166. package/web/.next/server/chunks/ssr/[root-of-the-server]__0fujyqtfujrz5._.js.map +1 -1
  167. package/web/.next/server/chunks/ssr/[root-of-the-server]__0geojgpilsx6e._.js +1 -1
  168. package/web/.next/server/chunks/ssr/[root-of-the-server]__0gy9anoap9qnn._.js +1 -1
  169. package/web/.next/server/chunks/ssr/[root-of-the-server]__0gy9anoap9qnn._.js.map +1 -1
  170. package/web/.next/server/chunks/ssr/[root-of-the-server]__0i_m5r9lyffk8._.js +1 -1
  171. package/web/.next/server/chunks/ssr/[root-of-the-server]__0i_m5r9lyffk8._.js.map +1 -1
  172. package/web/.next/server/chunks/ssr/[root-of-the-server]__0ibcjk97mwv4x._.js +1 -1
  173. package/web/.next/server/chunks/ssr/[root-of-the-server]__0ibcjk97mwv4x._.js.map +1 -1
  174. package/web/.next/server/chunks/ssr/[root-of-the-server]__0k-5_al3xk509._.js +1 -1
  175. package/web/.next/server/chunks/ssr/[root-of-the-server]__0k-5_al3xk509._.js.map +1 -1
  176. package/web/.next/server/chunks/ssr/[root-of-the-server]__0k6a9o0872_0x._.js +1 -1
  177. package/web/.next/server/chunks/ssr/[root-of-the-server]__0k6a9o0872_0x._.js.map +1 -1
  178. package/web/.next/server/chunks/ssr/[root-of-the-server]__0khxo9vhpo7sr._.js +1 -1
  179. package/web/.next/server/chunks/ssr/[root-of-the-server]__0khxo9vhpo7sr._.js.map +1 -1
  180. package/web/.next/server/chunks/ssr/[root-of-the-server]__0ktja-0332icp._.js +1 -1
  181. package/web/.next/server/chunks/ssr/[root-of-the-server]__0lz_zcfd17a39._.js +1 -1
  182. package/web/.next/server/chunks/ssr/[root-of-the-server]__0lz_zcfd17a39._.js.map +1 -1
  183. package/web/.next/server/chunks/ssr/[root-of-the-server]__0m_acooerfxfb._.js +1 -1
  184. package/web/.next/server/chunks/ssr/[root-of-the-server]__0n-egt7194u1g._.js +1 -1
  185. package/web/.next/server/chunks/ssr/[root-of-the-server]__0n-egt7194u1g._.js.map +1 -1
  186. package/web/.next/server/chunks/ssr/[root-of-the-server]__0ovcg5tg3nh49._.js +1 -1
  187. package/web/.next/server/chunks/ssr/[root-of-the-server]__0ovcg5tg3nh49._.js.map +1 -1
  188. package/web/.next/server/chunks/ssr/[root-of-the-server]__0ro-majrw7piv._.js +1 -1
  189. package/web/.next/server/chunks/ssr/[root-of-the-server]__0ro-majrw7piv._.js.map +1 -1
  190. package/web/.next/server/chunks/ssr/[root-of-the-server]__0zz6fx0keti4r._.js +1 -1
  191. package/web/.next/server/chunks/ssr/[root-of-the-server]__0zz6fx0keti4r._.js.map +1 -1
  192. package/web/.next/server/chunks/ssr/[root-of-the-server]__14hg5j_bmrdxt._.js +1 -1
  193. package/web/.next/server/chunks/ssr/[root-of-the-server]__18-8taiduk1jn._.js +1 -1
  194. package/web/.next/server/chunks/ssr/[root-of-the-server]__18-8taiduk1jn._.js.map +1 -1
  195. package/web/.next/server/chunks/ssr/[root-of-the-server]__19p4g16n2nh0b._.js +1 -1
  196. package/web/.next/server/chunks/ssr/[root-of-the-server]__19p4g16n2nh0b._.js.map +1 -1
  197. package/web/.next/server/chunks/ssr/[root-of-the-server]__1a-kyppd8dwmc._.js +1 -1
  198. package/web/.next/server/chunks/ssr/[root-of-the-server]__1a-kyppd8dwmc._.js.map +1 -1
  199. package/web/.next/server/chunks/ssr/[root-of-the-server]__1iqxg48po42ig._.js +1 -1
  200. package/web/.next/server/chunks/ssr/[root-of-the-server]__1iqxg48po42ig._.js.map +1 -1
  201. package/web/.next/server/chunks/ssr/[root-of-the-server]__1k8mb42yj44l0._.js +1 -1
  202. package/web/.next/server/chunks/ssr/[root-of-the-server]__1k8mb42yj44l0._.js.map +1 -1
  203. package/web/.next/server/chunks/ssr/[root-of-the-server]__1kynqd8xcwg2b._.js +1 -1
  204. package/web/.next/server/chunks/ssr/[root-of-the-server]__1kynqd8xcwg2b._.js.map +1 -1
  205. package/web/.next/server/chunks/ssr/[root-of-the-server]__1l_ua7k9ape55._.js +1 -1
  206. package/web/.next/server/chunks/ssr/[root-of-the-server]__1l_ua7k9ape55._.js.map +1 -1
  207. package/web/.next/server/chunks/ssr/[root-of-the-server]__1ncn4wx-1i09m._.js +1 -1
  208. package/web/.next/server/chunks/ssr/[root-of-the-server]__1ncn4wx-1i09m._.js.map +1 -1
  209. package/web/.next/server/chunks/ssr/[root-of-the-server]__1nxy_j9eswr3i._.js +1 -1
  210. package/web/.next/server/chunks/ssr/[root-of-the-server]__1nxy_j9eswr3i._.js.map +1 -1
  211. package/web/.next/server/chunks/ssr/[root-of-the-server]__1odtiyyqa5vlq._.js +1 -1
  212. package/web/.next/server/chunks/ssr/[root-of-the-server]__1r1t1q3fzoqey._.js +1 -1
  213. package/web/.next/server/chunks/ssr/[root-of-the-server]__1r1t1q3fzoqey._.js.map +1 -1
  214. package/web/.next/server/chunks/ssr/[root-of-the-server]__1vrtfw4dxnfxt._.js +1 -1
  215. package/web/.next/server/chunks/ssr/[root-of-the-server]__1xmvo3lr1_qyo._.js +1 -1
  216. package/web/.next/server/chunks/ssr/[root-of-the-server]__1xmvo3lr1_qyo._.js.map +1 -1
  217. package/web/.next/server/chunks/ssr/_00hfzlqn1og18._.js +1 -1
  218. package/web/.next/server/chunks/ssr/_00hfzlqn1og18._.js.map +1 -1
  219. package/web/.next/server/chunks/ssr/_0239h2ocqyibp._.js +3 -0
  220. package/web/.next/server/chunks/ssr/{_1h28qsfbdt-ph._.js.map → _0239h2ocqyibp._.js.map} +1 -1
  221. package/web/.next/server/chunks/ssr/_087cuueeby0hw._.js +3 -0
  222. package/web/.next/server/chunks/ssr/{_1o4xyxozurta7._.js.map → _087cuueeby0hw._.js.map} +1 -1
  223. package/web/.next/server/chunks/ssr/{_0no4kkaie8a0y._.js → _08jq3ga73wgy1._.js} +2 -2
  224. package/web/.next/server/chunks/ssr/{_0no4kkaie8a0y._.js.map → _08jq3ga73wgy1._.js.map} +1 -1
  225. package/web/.next/server/chunks/ssr/{_0u-5l6op7xjh0._.js → _090owdv-b-luu._.js} +2 -2
  226. package/web/.next/server/chunks/ssr/{_0u-5l6op7xjh0._.js.map → _090owdv-b-luu._.js.map} +1 -1
  227. package/web/.next/server/chunks/ssr/_0_nfv33ug5g31._.js +1 -1
  228. package/web/.next/server/chunks/ssr/_0_nfv33ug5g31._.js.map +1 -1
  229. package/web/.next/server/chunks/ssr/{_0dnp_nxhcy1tk._.js → _0cbvl92sxxpsf._.js} +2 -2
  230. package/web/.next/server/chunks/ssr/{_14unkhmeoxqym._.js.map → _0cbvl92sxxpsf._.js.map} +1 -1
  231. package/web/.next/server/chunks/ssr/_0fqd23gyia_8g._.js +1 -1
  232. package/web/.next/server/chunks/ssr/_0fqd23gyia_8g._.js.map +1 -1
  233. package/web/.next/server/chunks/ssr/_0ka_9elusb800._.js +1 -1
  234. package/web/.next/server/chunks/ssr/_0ka_9elusb800._.js.map +1 -1
  235. package/web/.next/server/chunks/ssr/_0pyd1_y7w8ngp._.js +1 -1
  236. package/web/.next/server/chunks/ssr/_0pyd1_y7w8ngp._.js.map +1 -1
  237. package/web/.next/server/chunks/ssr/{_14unkhmeoxqym._.js → _0t-yyzc3pbo8m._.js} +2 -2
  238. package/web/.next/server/chunks/ssr/{_0dnp_nxhcy1tk._.js.map → _0t-yyzc3pbo8m._.js.map} +1 -1
  239. package/web/.next/server/chunks/ssr/_0xickgbbju_9-._.js +1 -1
  240. package/web/.next/server/chunks/ssr/_0xickgbbju_9-._.js.map +1 -1
  241. package/web/.next/server/chunks/ssr/_1cs_0d0h7mhw0._.js +1 -1
  242. package/web/.next/server/chunks/ssr/_1cs_0d0h7mhw0._.js.map +1 -1
  243. package/web/.next/server/chunks/ssr/_1e7srghw1_x9p._.js +57 -0
  244. package/web/.next/server/chunks/ssr/_1e7srghw1_x9p._.js.map +1 -0
  245. package/web/.next/server/chunks/ssr/_1pjtire7rqla0._.js +1 -1
  246. package/web/.next/server/chunks/ssr/_1pjtire7rqla0._.js.map +1 -1
  247. package/web/.next/server/chunks/ssr/_1q0rhps0nvrq5._.js +57 -0
  248. package/web/.next/server/chunks/ssr/_1q0rhps0nvrq5._.js.map +1 -0
  249. package/web/.next/server/chunks/ssr/_1qbsmlji34yph._.js +1 -1
  250. package/web/.next/server/chunks/ssr/_1qbsmlji34yph._.js.map +1 -1
  251. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_01dhlues8c7ml.js +3 -0
  252. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_01dhlues8c7ml.js.map +1 -0
  253. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_07y8ae2h21f9p.js +3 -0
  254. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_07y8ae2h21f9p.js.map +1 -0
  255. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_08d89iicdayuk.js +3 -0
  256. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_08d89iicdayuk.js.map +1 -0
  257. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_08sinhjbj9agz.js +3 -0
  258. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_08sinhjbj9agz.js.map +1 -0
  259. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0b2haj8_y8lu_.js +3 -0
  260. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0b2haj8_y8lu_.js.map +1 -0
  261. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0me2jx2fwv_8c.js +3 -0
  262. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0me2jx2fwv_8c.js.map +1 -0
  263. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0xxc4eq32ewk5.js +3 -0
  264. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0xxc4eq32ewk5.js.map +1 -0
  265. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1klryi6-w9ur5.js +3 -0
  266. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1klryi6-w9ur5.js.map +1 -0
  267. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1lo_i86tv4z-6.js +3 -0
  268. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1lo_i86tv4z-6.js.map +1 -0
  269. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1qmlbi4q1-6b7.js +3 -0
  270. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1qmlbi4q1-6b7.js.map +1 -0
  271. package/web/.next/server/chunks/ssr/{node_modules_next_dist_esm_build_templates_app-page_0g15rgn4n-oiz.js → node_modules_next_dist_esm_build_templates_app-page_1rw6ik0j23aki.js} +2 -2
  272. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1rw6ik0j23aki.js.map +1 -0
  273. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1t0a0nkq0woc8.js +3 -0
  274. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1t0a0nkq0woc8.js.map +1 -0
  275. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1unw2j3tp34id.js +3 -0
  276. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1unw2j3tp34id.js.map +1 -0
  277. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1uzkkryl0w9c4.js +3 -0
  278. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1uzkkryl0w9c4.js.map +1 -0
  279. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1wl_71f8j6j_8.js +3 -0
  280. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1wl_71f8j6j_8.js.map +1 -0
  281. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1z7pcoxf6w70s.js +3 -0
  282. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1z7pcoxf6w70s.js.map +1 -0
  283. package/web/.next/server/chunks/ssr/web_00e7-_y92losl._.js +1 -1
  284. package/web/.next/server/chunks/ssr/web_00e7-_y92losl._.js.map +1 -1
  285. package/web/.next/server/chunks/ssr/web_00r-wf_2cxh1v._.js +1 -1
  286. package/web/.next/server/chunks/ssr/web_00r-wf_2cxh1v._.js.map +1 -1
  287. package/web/.next/server/chunks/ssr/web_03d5ej1xq-7uh._.js +3 -0
  288. package/web/.next/server/chunks/ssr/web_03d5ej1xq-7uh._.js.map +1 -0
  289. package/web/.next/server/chunks/ssr/web_09zipglxee7tv._.js +1 -1
  290. package/web/.next/server/chunks/ssr/web_09zipglxee7tv._.js.map +1 -1
  291. package/web/.next/server/chunks/ssr/web_0a9n7acgjrk5c._.js +1 -1
  292. package/web/.next/server/chunks/ssr/web_0a9n7acgjrk5c._.js.map +1 -1
  293. package/web/.next/server/chunks/ssr/web_0cxcy088wnfmw._.js +1 -1
  294. package/web/.next/server/chunks/ssr/web_0cxcy088wnfmw._.js.map +1 -1
  295. package/web/.next/server/chunks/ssr/web_0oz8bypfxh82g._.js +1 -1
  296. package/web/.next/server/chunks/ssr/web_0oz8bypfxh82g._.js.map +1 -1
  297. package/web/.next/server/chunks/ssr/web_0pk41f5m34jvi._.js +1 -1
  298. package/web/.next/server/chunks/ssr/web_0pk41f5m34jvi._.js.map +1 -1
  299. package/web/.next/server/chunks/ssr/web_0v-7sowo0hupw._.js +1 -1
  300. package/web/.next/server/chunks/ssr/web_0v-7sowo0hupw._.js.map +1 -1
  301. package/web/.next/server/chunks/ssr/web_0zxufwo8cd7v3._.js +1 -1
  302. package/web/.next/server/chunks/ssr/web_0zxufwo8cd7v3._.js.map +1 -1
  303. package/web/.next/server/chunks/ssr/web_1rmcjkj1pjylk._.js +1 -1
  304. package/web/.next/server/chunks/ssr/web_1rmcjkj1pjylk._.js.map +1 -1
  305. package/web/.next/server/chunks/ssr/web_1vvrekkq5mirt._.js +1 -1
  306. package/web/.next/server/chunks/ssr/web_1vvrekkq5mirt._.js.map +1 -1
  307. package/web/.next/server/chunks/ssr/web__next-internal_server_app_(bridge)_bridge_basket_page_actions_0g7q_rc5nma1e.js +1 -1
  308. package/web/.next/server/chunks/ssr/web__next-internal_server_app_(bridge)_bridge_basket_page_actions_0g7q_rc5nma1e.js.map +1 -1
  309. package/web/.next/server/chunks/ssr/web__next-internal_server_app_(bridge)_bridge_done_page_actions_0kjm34arntdzv.js +1 -1
  310. package/web/.next/server/chunks/ssr/web__next-internal_server_app_(bridge)_bridge_done_page_actions_0kjm34arntdzv.js.map +1 -1
  311. package/web/.next/server/chunks/ssr/web__next-internal_server_app_(bridge)_bridge_fleet_page_actions_19wmo6phgvqfk.js +1 -1
  312. package/web/.next/server/chunks/ssr/web__next-internal_server_app_(bridge)_bridge_fleet_page_actions_19wmo6phgvqfk.js.map +1 -1
  313. package/web/.next/server/chunks/ssr/web__next-internal_server_app_(bridge)_bridge_page_actions_1ok64rg3edm_u.js +1 -1
  314. package/web/.next/server/chunks/ssr/web__next-internal_server_app_(bridge)_bridge_page_actions_1ok64rg3edm_u.js.map +1 -1
  315. package/web/.next/server/chunks/ssr/web_app_(bridge)_bridge_settings_page_tsx_1z5yr8ss25q7n._.js +1 -1
  316. package/web/.next/server/chunks/ssr/web_app_(bridge)_bridge_settings_page_tsx_1z5yr8ss25q7n._.js.map +1 -1
  317. package/web/.next/server/chunks/ssr/web_app_(bridge)_layout_tsx_0io-giu9m2p0z._.js +3 -0
  318. package/web/.next/server/chunks/ssr/web_app_(bridge)_layout_tsx_0io-giu9m2p0z._.js.map +1 -0
  319. package/web/.next/server/chunks/ssr/web_app_(bridge)_outside-parties_[name]_change_page_tsx_15monuoxw-kse._.js +1 -1
  320. package/web/.next/server/chunks/ssr/web_app_(bridge)_outside-parties_[name]_change_page_tsx_15monuoxw-kse._.js.map +1 -1
  321. package/web/.next/server/chunks/ssr/web_app_(bridge)_outside-parties_[name]_retire_page_tsx_0pljqvw60fh7t._.js +1 -1
  322. package/web/.next/server/chunks/ssr/web_app_(bridge)_outside-parties_[name]_retire_page_tsx_0pljqvw60fh7t._.js.map +1 -1
  323. package/web/.next/server/chunks/ssr/web_app_(console)_parties_page_tsx_0pp63ghly3eyp._.js +1 -1
  324. package/web/.next/server/chunks/ssr/web_app_(console)_parties_page_tsx_0pp63ghly3eyp._.js.map +1 -1
  325. package/web/.next/server/chunks/ssr/web_app_(console)_slack_page_tsx_0ts7fo7pqicq6._.js +1 -1
  326. package/web/.next/server/chunks/ssr/web_app_(console)_slack_page_tsx_0ts7fo7pqicq6._.js.map +1 -1
  327. package/web/.next/server/chunks/ssr/web_app_(console)_slack_remove_page_tsx_15q4ril_on0ed._.js +1 -1
  328. package/web/.next/server/chunks/ssr/web_app_(console)_slack_remove_page_tsx_15q4ril_on0ed._.js.map +1 -1
  329. package/web/.next/server/chunks/ssr/{web_features_16hw9h4_xwpao._.js → web_features_0fji0qhw-fk8x._.js} +2 -2
  330. package/web/.next/server/chunks/ssr/{web_features_16hw9h4_xwpao._.js.map → web_features_0fji0qhw-fk8x._.js.map} +1 -1
  331. package/web/.next/server/chunks/ssr/{web_features_1hnchp2y9ily-._.js → web_features_1tbi4ma6mufmp._.js} +2 -2
  332. package/web/.next/server/chunks/ssr/{web_features_1hnchp2y9ily-._.js.map → web_features_1tbi4ma6mufmp._.js.map} +1 -1
  333. package/web/.next/server/chunks/ssr/web_features_add-a2a-agent_ui_a2a-agent-form_tsx_0z8t1aalwzyl7._.js +1 -1
  334. package/web/.next/server/chunks/ssr/web_features_add-a2a-agent_ui_a2a-agent-form_tsx_0z8t1aalwzyl7._.js.map +1 -1
  335. package/web/.next/server/chunks/ssr/web_features_add-a2a-client_ui_a2a-client-form_tsx_1anv88g385nwe._.js +1 -1
  336. package/web/.next/server/chunks/ssr/web_features_add-a2a-client_ui_a2a-client-form_tsx_1anv88g385nwe._.js.map +1 -1
  337. package/web/.next/server/chunks/ssr/web_features_add-server_ui_add-server_tsx_1jnmar5xju49k._.js +1 -1
  338. package/web/.next/server/chunks/ssr/web_features_add-server_ui_add-server_tsx_1jnmar5xju49k._.js.map +1 -1
  339. package/web/.next/server/chunks/ssr/{web_features_bridge_03kikxozygua1._.js → web_features_bridge_0zkl4uc3a1wa6._.js} +2 -2
  340. package/web/.next/server/chunks/ssr/{web_features_bridge_03kikxozygua1._.js.map → web_features_bridge_0zkl4uc3a1wa6._.js.map} +1 -1
  341. package/web/.next/server/chunks/ssr/web_features_bridge_hooks_bridge-actions_ts_0h-_xm2rcb-ij._.js +1 -1
  342. package/web/.next/server/chunks/ssr/web_features_bridge_state_basket-panel_tsx_1qi_kzld0rfgs._.js +1 -1
  343. package/web/.next/server/chunks/ssr/web_features_bridge_state_basket-panel_tsx_1qi_kzld0rfgs._.js.map +1 -1
  344. package/web/.next/server/chunks/ssr/web_features_bridge_state_decision-panel_tsx_1mzsixgc8zuxc._.js +1 -1
  345. package/web/.next/server/chunks/ssr/web_features_bridge_state_decision-panel_tsx_1mzsixgc8zuxc._.js.map +1 -1
  346. package/web/.next/server/chunks/ssr/web_features_bridge_state_done-panel_tsx_1m844-qb1z9p_._.js +1 -1
  347. package/web/.next/server/chunks/ssr/web_features_bridge_state_done-panel_tsx_1m844-qb1z9p_._.js.map +1 -1
  348. package/web/.next/server/chunks/ssr/web_features_bridge_state_message-rows_tsx_1ky4-xa4az_yu._.js +1 -1
  349. package/web/.next/server/chunks/ssr/web_features_bridge_state_message-rows_tsx_1ky4-xa4az_yu._.js.map +1 -1
  350. package/web/.next/server/chunks/ssr/web_features_bridge_state_messages-panel_tsx_1yvr_ww639d25._.js +1 -1
  351. package/web/.next/server/chunks/ssr/web_features_bridge_state_messages-panel_tsx_1yvr_ww639d25._.js.map +1 -1
  352. package/web/.next/server/chunks/ssr/web_features_meeting_state_meeting-controls_tsx_12g4kzk2mbvvz._.js +1 -1
  353. package/web/.next/server/chunks/ssr/web_features_meeting_state_meeting-controls_tsx_12g4kzk2mbvvz._.js.map +1 -1
  354. package/web/.next/server/chunks/ssr/web_features_outside-parties_ui_switch-card_tsx_1_xnu9bm4tc-_._.js +1 -1
  355. package/web/.next/server/chunks/ssr/web_features_outside-parties_ui_switch-card_tsx_1_xnu9bm4tc-_._.js.map +1 -1
  356. package/web/.next/server/chunks/ssr/web_features_outside-party_actions_ts_102ar5pdowf8s._.js +1 -1
  357. package/web/.next/server/chunks/ssr/web_features_parties_actions_ts_0r-tbfsig2ty-._.js +1 -1
  358. package/web/.next/server/chunks/ssr/web_features_slack_actions_ts_1l3yg9vl20_vu._.js +1 -1
  359. package/web/.next/server/middleware-build-manifest.js +3 -3
  360. package/web/.next/server/pages/500.html +1 -1
  361. package/web/.next/server/preview-props.json +3 -3
  362. package/web/.next/server/server-reference-manifest.js +1 -1
  363. package/web/.next/server/server-reference-manifest.json +52 -52
  364. package/web/.next/static/chunks/{3jczm4mvyshsf.js → 0-mbc7l-ce37z.js} +1 -1
  365. package/web/.next/static/chunks/06tpbp-er8dog.js +1 -0
  366. package/web/.next/static/chunks/{1n5114efmpzm8.js → 0pypj0_ydhccr.js} +1 -1
  367. package/web/.next/static/chunks/{0j8ndrgty645i.js → 0t63w7558fw1a.js} +1 -1
  368. package/web/.next/static/chunks/{3_5r6ivx93es-.js → 1js-1nyhxr0b3.js} +1 -1
  369. package/web/.next/static/chunks/1ovt2ef2naqgj.js +1 -0
  370. package/web/.next/static/chunks/{1x87y_kcnt2cq.js → 1zv4cn94bmk2x.js} +1 -1
  371. package/web/.next/static/chunks/24qt7-p52g31c.js +1 -0
  372. package/web/.next/static/chunks/{0l4t9n_wkfvga.js → 2h3yztsbjw8sd.js} +4 -4
  373. package/web/.next/static/chunks/2ukdl2v0q677n.js +1 -0
  374. package/web/.next/static/chunks/{0tfn6_lm7dz7s.js → 2vaqwkb5z2wz8.js} +1 -1
  375. package/web/.next/static/chunks/{1qm1btwpwf1ih.js → 2w5o8qcjwdoqm.js} +1 -1
  376. package/web/.next/static/chunks/33kxvt_kxg5yb.js +1 -0
  377. package/web/.next/static/chunks/{3azyb0n45b1y9.js → 36ccnz8nhzbm0.js} +1 -1
  378. package/web/.next/static/chunks/38m6y148vwux3.js +1 -0
  379. package/web/.next/static/chunks/{31bq1uh9ulaeu.js → 3a347eh56u6w0.js} +1 -1
  380. package/web/.next/static/chunks/{0qynje165r8pk.js → 3nifwjh6pf2oa.js} +1 -1
  381. package/web/.next/static/chunks/{0ft62462m_rg0.js → 3qmppgfbfoif6.js} +1 -1
  382. package/web/.next/static/chunks/{0n99u0tboun9p.js → 3tmji77wyx7q4.js} +1 -1
  383. package/web/.next/static/media/apple-icon.3r3-hvwfcl7n_.png +0 -0
  384. package/web/.next/static/media/icon.1btn_u3uez_sn.svg +1 -0
  385. package/web/.next/trace +1 -1
  386. package/web/.next/trace-build +1 -1
  387. package/web/.next/types/validator.ts +17 -0
  388. package/web/.next/server/chunks/ssr/[root-of-the-server]__0grpi5wnl9ppf._.js +0 -10
  389. package/web/.next/server/chunks/ssr/[root-of-the-server]__0grpi5wnl9ppf._.js.map +0 -1
  390. package/web/.next/server/chunks/ssr/_16v-4haxv-0-o._.js +0 -57
  391. package/web/.next/server/chunks/ssr/_16v-4haxv-0-o._.js.map +0 -1
  392. package/web/.next/server/chunks/ssr/_1h28qsfbdt-ph._.js +0 -3
  393. package/web/.next/server/chunks/ssr/_1o4xyxozurta7._.js +0 -3
  394. package/web/.next/server/chunks/ssr/_1yl6jrimy685b._.js +0 -57
  395. package/web/.next/server/chunks/ssr/_1yl6jrimy685b._.js.map +0 -1
  396. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_02s6inh4usc9k.js +0 -3
  397. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_02s6inh4usc9k.js.map +0 -1
  398. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0ad4b2lkk31jj.js +0 -3
  399. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0ad4b2lkk31jj.js.map +0 -1
  400. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0ergh-a6r7yu_.js +0 -3
  401. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0ergh-a6r7yu_.js.map +0 -1
  402. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0g15rgn4n-oiz.js.map +0 -1
  403. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0hzwtyh-646p2.js +0 -3
  404. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0hzwtyh-646p2.js.map +0 -1
  405. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0mm8dt8tws1fz.js +0 -3
  406. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0mm8dt8tws1fz.js.map +0 -1
  407. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0tcy7phl8a4gj.js +0 -3
  408. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0tcy7phl8a4gj.js.map +0 -1
  409. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0vfjfe4aq6spg.js +0 -3
  410. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0vfjfe4aq6spg.js.map +0 -1
  411. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0yv3l9ohiylc6.js +0 -3
  412. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0yv3l9ohiylc6.js.map +0 -1
  413. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1-wfs2n5p56lo.js +0 -3
  414. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1-wfs2n5p56lo.js.map +0 -1
  415. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_11x159_oszki3.js +0 -3
  416. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_11x159_oszki3.js.map +0 -1
  417. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1c7q9sxgla_vx.js +0 -3
  418. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1c7q9sxgla_vx.js.map +0 -1
  419. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1dcjexx9b9waj.js +0 -3
  420. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1dcjexx9b9waj.js.map +0 -1
  421. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1dltrn6ii5dd6.js +0 -3
  422. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1dltrn6ii5dd6.js.map +0 -1
  423. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1hm1iu016c1fy.js +0 -3
  424. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1hm1iu016c1fy.js.map +0 -1
  425. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1zaoeyy4_vir_.js +0 -3
  426. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1zaoeyy4_vir_.js.map +0 -1
  427. package/web/.next/server/chunks/ssr/web_09rcfto3dw4wd._.js +0 -3
  428. package/web/.next/server/chunks/ssr/web_09rcfto3dw4wd._.js.map +0 -1
  429. package/web/.next/static/chunks/09y_kqg5jr2to.js +0 -1
  430. package/web/.next/static/chunks/0_wc_d56c40gm.js +0 -1
  431. package/web/.next/static/chunks/0g07rkq-36dl0.js +0 -1
  432. package/web/.next/static/chunks/0scfm0b6ozb25.js +0 -1
  433. package/web/.next/static/chunks/1vuekfthkmjng.js +0 -1
  434. package/web/.next/static/chunks/1y32oubd_6md2.js +0 -1
  435. package/web/.next/static/media/apple-icon.3jccaq3p5-lh-.png +0 -0
  436. package/web/.next/static/media/icon.1o2ogor9e8-fc.svg +0 -19
  437. /package/web/.next/static/{6etIIH3qFw-_kdbaUFERx → 9KCcVgnuuZ1fElZoEqTjx}/_buildManifest.js +0 -0
  438. /package/web/.next/static/{6etIIH3qFw-_kdbaUFERx → 9KCcVgnuuZ1fElZoEqTjx}/_clientMiddlewareManifest.js +0 -0
  439. /package/web/.next/static/{6etIIH3qFw-_kdbaUFERx → 9KCcVgnuuZ1fElZoEqTjx}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../web/features/forms/ui/switch.tsx","../../../../../web/features/outside-party/data%3A73ee3c%20%3Ctext/javascript%3E","../../../../../web/features/outside-party/tools-table/table-messages.ts","../../../../../web/features/outside-party/tools-table/ui/needs-chips.tsx","../../../../../web/features/outside-party/tools-table/ui/scope-picker.tsx","../../../../../web/features/outside-party/tools-table/ui/table-dialog.tsx","../../../../../web/features/outside-party/tools-table/ui/table-toasts.tsx","../../../../../web/features/outside-party/data%3Adf6ed8%20%3Ctext/javascript%3E","../../../../../web/features/outside-party/tools-table/ui/agent-needs.tsx","../../../../../node_modules/%40base-ui/react/drawer/backdrop/DrawerBackdrop.mjs","../../../../../node_modules/%40base-ui/react/drawer/popup/DrawerPopupCssVars.mjs","../../../../../node_modules/%40base-ui/react/drawer/backdrop/DrawerBackdropCssVars.mjs","../../../../../node_modules/%40base-ui/react/drawer/close/DrawerClose.mjs","../../../../../node_modules/%40base-ui/react/drawer/content/drawerContentAttribute.mjs","../../../../../node_modules/%40base-ui/react/drawer/content/DrawerContent.mjs","../../../../../node_modules/%40base-ui/react/drawer/popup/DrawerPopup.mjs","../../../../../node_modules/%40base-ui/react/drawer/popup/DrawerPopupDataAttributes.mjs","../../../../../node_modules/%40base-ui/react/drawer/root/DrawerRootContext.mjs","../../../../../node_modules/%40base-ui/react/drawer/root/useDrawerSnapPoints.mjs","../../../../../node_modules/%40base-ui/react/drawer/viewport/DrawerViewportContext.mjs","../../../../../node_modules/%40base-ui/react/drawer/portal/DrawerPortal.mjs","../../../../../node_modules/%40base-ui/react/drawer/root/DrawerRoot.mjs","../../../../../node_modules/%40base-ui/react/drawer/provider/DrawerProviderContext.mjs","../../../../../node_modules/%40base-ui/react/drawer/title/DrawerTitle.mjs","../../../../../node_modules/%40base-ui/react/drawer/trigger/DrawerTrigger.mjs","../../../../../node_modules/%40base-ui/react/drawer/viewport/DrawerViewport.mjs","../../../../../node_modules/%40base-ui/react/dialog/viewport/DialogViewport.mjs","../../../../../node_modules/%40base-ui/react/dialog/viewport/DialogViewportDataAttributes.mjs","../../../../../node_modules/%40base-ui/react/drawer/virtual-keyboard-provider/DrawerVirtualKeyboardContext.mjs","../../../../../web/features/outside-party/tools-table/ui/tools-table.tsx","../../../../../web/features/outside-party/data%3Af304d8%20%3Ctext/javascript%3E","../../../../../web/features/outside-party/switched-message.ts","../../../../../web/features/outside-party/tools-table/hint-suggestions.ts","../../../../../web/features/outside-party/tools-table/scope-change.ts","../../../../../web/features/outside-party/tools-table/table-tools.ts","../../../../../web/features/outside-party/ui/everyones-sign-ins-card.tsx","../../../../../web/features/outside-party/data%3Aedce5e%20%3Ctext/javascript%3E","../../../../../web/features/outside-party/data%3A297b74%20%3Ctext/javascript%3E","../../../../../web/features/outside-party/everyones-sign-ins.ts","../../../../../web/features/outside-party/ui/everyones-sign-ins.tsx","../../../../../web/features/outside-party/own-sign-in.ts","../../../../../web/features/outside-party/ui/own-sign-in-forms.tsx","../../../../../web/features/outside-party/data%3Aecceeb%20%3Ctext/javascript%3E","../../../../../web/features/outside-party/ui/repeatable-switch.tsx","../../../../../web/features/outside-party/data%3A05a378%20%3Ctext/javascript%3E"],"sourcesContent":["/** A switch: on or off, said by its look and to a screen reader, busy while its change is on its way. */\nexport function Switch({ isOn, label, isPending = false, type = 'button', onClick, testId }: { isOn: boolean; label: string; isPending?: boolean; type?: 'button' | 'submit'; onClick?: () => void; testId?: string }) {\n return (\n <button\n type={type}\n role=\"switch\"\n aria-checked={isOn}\n aria-label={label}\n aria-busy={isPending}\n disabled={isPending}\n onClick={onClick}\n data-testid={testId}\n className={`inline-flex h-5 w-9 shrink-0 items-center rounded-full border p-0.5 transition-colors disabled:opacity-60 ${isOn ? 'border-primary bg-primary' : 'border-input bg-muted'}`}\n >\n <span className={`size-3.5 rounded-full bg-background shadow-sm transition-transform ${isOn ? 'translate-x-4' : 'translate-x-0'} ${isPending ? 'animate-pulse' : ''}`} />\n </button>\n );\n}\n","/* __next_internal_action_entry_do_not_use__ [{\"401027107f6827e10a559b7a2943a2dd817f3d6dd1\":{\"name\":\"setPartyScopes\"}},\"web/features/outside-party/actions.ts\",\"\"] */\"use turbopack: no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_1=/*#__PURE__*/createServerReference(\"401027107f6827e10a559b7a2943a2dd817f3d6dd1\",callServer,void 0,findSourceMapURL,\"setPartyScopes\");export{$$RSC_SERVER_ACTION_1 as setPartyScopes};","/** What the tools table says once a change is kept (gateway scopes 4.3), in a Toast. */\nimport type { ScopeChange } from './scope-change';\n\nfunction listOf(scopes: readonly string[]): string {\n return scopes.length <= 1 ? scopes.join('') : `${scopes.slice(0, -1).join(', ')} and ${scopes.at(-1) ?? ''}`;\n}\n\nfunction toolsOf(count: number): string {\n return `${String(count)} ${count === 1 ? 'tool' : 'tools'}`;\n}\n\n/** The change, and why the fleet sees it only at the proxy ship's next statement when it does. */\nexport function statedMessage(message: string, statementRefusal: string | null): string {\n return statementRefusal === null ? message : `${message}; the fleet sees it at the proxy ship's next statement: ${statementRefusal}`;\n}\n\nexport function scopesSetMessage({ scopes, how, count }: { scopes: readonly string[]; how: ScopeChange; count: number }): string {\n if (how === 'remove') {\n return `${listOf(scopes)} removed from ${toolsOf(count)}`;\n }\n if (scopes.length === 0) {\n return `${toolsOf(count)} need${count === 1 ? 's' : ''} nothing of ${count === 1 ? 'its' : 'their'} own`;\n }\n return `${listOf(scopes)} set on ${toolsOf(count)}`;\n}\n\nexport function partyScopesSetMessage({ party, scopes }: { party: string; scopes: readonly string[] }): string {\n return scopes.length === 0 ? `Every tool of ${party} needs nothing beyond reaching it` : `Every tool of ${party} needs ${listOf(scopes)}`;\n}\n\nexport function suggestionsSetMessage(groups: readonly { scopes: readonly string[]; count: number }[]): string {\n return groups.map(({ scopes, count }) => `${listOf(scopes)} set on ${toolsOf(count)}`).join('; ');\n}\n\nexport function toolsSwitchedMessage({ count, isOn, statementRefusal }: { count: number; isOn: boolean; statementRefusal: string | null }): string {\n return statedMessage(`${toolsOf(count)} switched ${isOn ? 'on' : 'off'}`, statementRefusal);\n}\n\nexport function agentScopesSetMessage({ party, scopes }: { party: string; scopes: readonly string[] }): string {\n return scopes.length === 0 ? `Every message to ${party} needs nothing beyond reaching it` : `Every message to ${party} needs ${listOf(scopes)}`;\n}\n","/** A scope the fleet lists, with its one-line description, as an approver picks it. */\nexport interface ListedScope {\n scope: string;\n description: string;\n}\n\nconst CHIP = 'inline-flex items-center rounded-md border px-2 font-mono text-caption';\n\n/**\n * What a call needs, as chips (gateway scopes 4.3): the party's set muted, a\n * tool's own plain. A scope the fleet no longer lists is marked so: no ship\n * holds it, so every call needing it is refused until it is changed.\n */\nexport function NeedsChips({ party = [], own, listed }: { party?: readonly string[]; own: readonly string[]; listed: ReadonlySet<string> | null }) {\n if (party.length === 0 && own.length === 0) {\n return <span className=\"text-muted-foreground\">Nothing</span>;\n }\n const chip = (scope: string, isParty: boolean) => {\n const isGone = listed !== null && !listed.has(scope);\n const look = isGone ? 'border-tone-attention-border bg-tone-attention-bg text-tone-attention-fg' : isParty ? 'border-transparent bg-muted text-muted-foreground' : 'border-border';\n return (\n <span key={`${isParty ? 'party' : 'own'}-${scope}`} className={`${CHIP} ${look}`} data-testid={isParty ? 'tools-table-party-scope' : 'tools-table-scope'} title={isGone ? 'No longer defined in the fleet' : isParty ? 'Every tool needs it' : undefined}>\n {scope}\n {isGone ? <span className=\"ml-1 font-sans\">(no longer defined)</span> : null}\n </span>\n );\n };\n return (\n <span className=\"flex flex-wrap gap-1\">\n {party.map((scope) => chip(scope, true))}\n {own.filter((scope) => !party.includes(scope)).map((scope) => chip(scope, false))}\n </span>\n );\n}\n","'use client';\n\nimport { Combobox } from '@base-ui/react/combobox';\n\nimport type { ListedScope } from './needs-chips';\n\ninterface ScopeItem {\n value: string;\n label: string;\n description: string;\n}\n\nconst itemOf = ({ scope, description }: ListedScope): ScopeItem => ({ value: scope, label: scope, description });\n\n/**\n * Picks several of the fleet's listed scopes (gateway scopes 4.3), searched\n * by name or description. A scope picked before that the fleet no longer\n * lists stays picked, so it can be seen and removed.\n */\nexport function ScopePicker({ label, listed, picked, onPick, isDisabled = false, testId }: { label: string; listed: readonly ListedScope[]; picked: readonly string[]; onPick: (scopes: string[]) => void; isDisabled?: boolean; testId?: string }) {\n const { contains } = Combobox.useFilter();\n const items = [...listed.map(itemOf), ...picked.filter((scope) => !listed.some((each) => each.scope === scope)).map((scope) => ({ value: scope, label: scope, description: 'No longer defined in the fleet' }))];\n const value = items.filter((item) => picked.includes(item.value));\n return (\n <Combobox.Root\n multiple\n items={items}\n value={value}\n disabled={isDisabled}\n isItemEqualToValue={(item, chosen) => item.value === chosen.value}\n onValueChange={(next: ScopeItem[], details) => {\n // Escape closes the list; it never takes back what was picked.\n if (details.reason === 'escape-key') {\n details.cancel();\n return;\n }\n onPick(next.map((item) => item.value));\n }}\n filter={(item: ScopeItem, query) => contains(item.label, query) || contains(item.description, query)}\n >\n <div className=\"grid gap-1\" data-testid={testId}>\n <Combobox.Label className=\"font-medium\">{label}</Combobox.Label>\n <Combobox.InputGroup className=\"flex min-h-9 flex-wrap items-center gap-1 rounded-md border border-input bg-background px-2 py-1\">\n <Combobox.Chips className=\"contents\">\n {value.map((item) => (\n <Combobox.Chip key={item.value} className=\"inline-flex items-center gap-1 rounded-md border border-border bg-muted px-2 font-mono text-caption\" aria-label={item.value}>\n {item.value}\n <Combobox.ChipRemove className=\"text-muted-foreground hover:text-foreground\" aria-label={`Remove ${item.value}`}>\n ×\n </Combobox.ChipRemove>\n </Combobox.Chip>\n ))}\n <Combobox.Input placeholder={value.length === 0 ? 'Search the fleet\\'s scopes' : ''} className=\"h-7 min-w-32 flex-1 bg-transparent outline-none\" />\n </Combobox.Chips>\n </Combobox.InputGroup>\n </div>\n <Combobox.Portal>\n <Combobox.Positioner sideOffset={4} className=\"z-50\">\n <Combobox.Popup className=\"max-h-72 w-(--anchor-width) overflow-auto rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-md\">\n <Combobox.Empty className=\"px-2 py-1 text-muted-foreground\">No scope listed matches.</Combobox.Empty>\n <Combobox.List>\n {(item: ScopeItem) => (\n <Combobox.Item key={item.value} value={item} className=\"grid cursor-default grid-cols-[1rem_1fr] gap-x-2 rounded px-2 py-1 data-highlighted:bg-accent\">\n <Combobox.ItemIndicator className=\"row-span-2\">✓</Combobox.ItemIndicator>\n <span className=\"col-start-2 font-mono text-code\">{item.value}</span>\n <span className=\"col-start-2 text-caption text-muted-foreground\">{item.description}</span>\n </Combobox.Item>\n )}\n </Combobox.List>\n </Combobox.Popup>\n </Combobox.Positioner>\n </Combobox.Portal>\n </Combobox.Root>\n );\n}\n","'use client';\n\nimport { Dialog } from '@base-ui/react/dialog';\nimport type { ReactNode } from 'react';\n\nimport { BUTTONS } from '../../../forms/ui/look';\nimport { ActionButton } from '../../../bridge/ui/action-button';\n\n/** Why the API refused a change in a dialog: said inline, CONFLICT with Reload, at the requirements' version the change was made on. */\nexport interface DialogRefusal {\n message: string;\n isConflict: boolean;\n version: number;\n}\n\n/** The refusal still to say: a CONFLICT is answered once the page read newer requirements. */\nexport function standingRefusal(refusal: DialogRefusal | null, version: number): DialogRefusal | null {\n return refusal?.isConflict === true && version > refusal.version ? null : refusal;\n}\n\n/**\n * A dialog of the tools table (gateway scopes 4.3): its fields, a footer\n * saying what it applies to, and its action. While the action is on its\n * way the action shows its spinner and the dialog takes no input and does\n * not close; a refusal stays inline, with Reload when the requirements\n * changed since the page was read, which shows its spinner until the page\n * read them again.\n */\nexport function TableDialog({\n isOpen,\n onClose,\n title,\n description,\n children,\n appliesTo,\n action,\n isSaving,\n refusal,\n onReload,\n isReloading,\n testId,\n}: {\n isOpen: boolean;\n onClose: () => void;\n title: string;\n description: string;\n children: ReactNode;\n appliesTo: string;\n action: { label: string; pending: string; isDisabled: boolean; onPress: () => void };\n isSaving: boolean;\n refusal: DialogRefusal | null;\n onReload: () => void;\n isReloading: boolean;\n testId: string;\n}) {\n return (\n <Dialog.Root\n open={isOpen}\n onOpenChange={(open) => {\n if (!open && !isSaving) {\n onClose();\n }\n }}\n >\n <Dialog.Portal>\n <Dialog.Backdrop className=\"fixed inset-0 z-40 bg-(--overlay)\" />\n <Dialog.Popup className=\"fixed top-1/2 left-1/2 z-50 grid max-h-[90vh] w-[min(36rem,calc(100vw-2rem))] -translate-1/2 gap-4 overflow-auto rounded-lg border border-border bg-popover p-6 text-popover-foreground shadow-lg\" data-testid={testId}>\n <div className=\"grid gap-1\">\n <Dialog.Title className=\"text-heading font-semibold\">{title}</Dialog.Title>\n <Dialog.Description className=\"text-muted-foreground\">{description}</Dialog.Description>\n </div>\n <fieldset disabled={isSaving} className=\"grid gap-4\">\n {children}\n </fieldset>\n {refusal === null ? null : (\n <div role=\"alert\" className=\"flex flex-wrap items-center justify-between gap-2 rounded-md border border-tone-attention-border bg-tone-attention-bg px-3 py-2 text-tone-attention-fg\" data-testid=\"tools-table-dialog-refusal\">\n <span>{refusal.message}</span>\n {refusal.isConflict ? (\n <ActionButton isPending={isReloading} pendingLabel=\"Reloading…\" onClick={onReload} data-testid=\"tools-table-reload\">\n Reload\n </ActionButton>\n ) : null}\n </div>\n )}\n <div className=\"flex flex-wrap items-center justify-between gap-2\">\n <span className=\"text-muted-foreground\" data-testid=\"tools-table-applies-to\">\n {appliesTo}\n </span>\n <div className=\"flex gap-2\">\n <button type=\"button\" className={BUTTONS.secondary} disabled={isSaving} onClick={onClose}>\n Cancel\n </button>\n <ActionButton variant=\"primary\" isPending={isSaving} pendingLabel={action.pending} disabled={action.isDisabled || isReloading} onClick={action.onPress} data-testid=\"tools-table-dialog-action\">\n {action.label}\n </ActionButton>\n </div>\n </div>\n </Dialog.Popup>\n </Dialog.Portal>\n </Dialog.Root>\n );\n}\n","'use client';\n\nimport { Toast } from '@base-ui/react/toast';\n\n/** The toasts a party's page raised, each saying what was kept (gateway scopes 4.3). */\nexport function TableToasts() {\n const { toasts } = Toast.useToastManager();\n return (\n <Toast.Portal>\n <Toast.Viewport className=\"fixed right-4 bottom-4 z-50 grid w-[min(24rem,calc(100vw-2rem))] gap-2\">\n {toasts.map((toast) => (\n <Toast.Root key={toast.id} toast={toast} className=\"rounded-md border border-tone-ok-border bg-tone-ok-bg px-4 py-3 text-tone-ok-fg shadow-md\" data-testid=\"tools-table-toast\">\n <Toast.Content className=\"flex items-start justify-between gap-3\">\n <Toast.Title />\n <Toast.Close aria-label=\"Dismiss\">×</Toast.Close>\n </Toast.Content>\n </Toast.Root>\n ))}\n </Toast.Viewport>\n </Toast.Portal>\n );\n}\n","/* __next_internal_action_entry_do_not_use__ [{\"6066895d7d712c4a81355e9dd27fda8f0efdd9f743\":{\"name\":\"signInToParty\"}},\"web/features/outside-party/actions.ts\",\"\"] */\"use turbopack: no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_4=/*#__PURE__*/createServerReference(\"6066895d7d712c4a81355e9dd27fda8f0efdd9f743\",callServer,void 0,findSourceMapURL,\"signInToParty\");export{$$RSC_SERVER_ACTION_4 as signInToParty};","'use client';\n\nimport { Toast } from '@base-ui/react/toast';\nimport { useRouter } from 'next/navigation';\nimport { useState, useTransition } from 'react';\n\nimport { setPartyScopes } from '../../actions';\nimport { agentScopesSetMessage, statedMessage } from '../table-messages';\nimport { NeedsChips, type ListedScope } from './needs-chips';\nimport { ScopePicker } from './scope-picker';\nimport { standingRefusal, TableDialog, type DialogRefusal } from './table-dialog';\nimport { TableToasts } from './table-toasts';\n\n/**\n * An outside A2A agent's one Needs line (gateway scopes 4.3): its messages\n * name no skill, so one set of scopes guards the agent as a whole, changed\n * in a dialog on the version the page read.\n */\nexport function AgentNeeds(props: { fleetId: string; party: string; version: number; scopes: readonly string[]; listed: readonly ListedScope[] | null; canChange: boolean }) {\n return (\n <Toast.Provider>\n <AgentNeedsLine {...props} />\n <TableToasts />\n </Toast.Provider>\n );\n}\n\nfunction AgentNeedsLine({ fleetId, party, version, scopes, listed, canChange }: { fleetId: string; party: string; version: number; scopes: readonly string[]; listed: readonly ListedScope[] | null; canChange: boolean }) {\n const router = useRouter();\n const toasts = Toast.useToastManager();\n const [, startTransition] = useTransition();\n const [isReloading, startReload] = useTransition();\n const [isOpen, setIsOpen] = useState(false);\n const [picked, setPicked] = useState<string[]>([]);\n const [isSaving, setIsSaving] = useState(false);\n const [refusal, setRefusal] = useState<DialogRefusal | null>(null);\n const [keptVersion, setKeptVersion] = useState<number | null>(null);\n const [round, setRound] = useState(0);\n const [kept, setKept] = useState<{ basis: readonly string[]; scopes: readonly string[] } | null>(null);\n // What was kept shows at once; once the page read itself again, its scopes are the truth.\n const shown = kept?.basis === scopes ? kept.scopes : scopes;\n\n const save = () => {\n setIsSaving(true);\n setRefusal(null);\n const madeOn = Math.max(version, keptVersion ?? 0);\n startTransition(async () => {\n const outcome = await setPartyScopes({ fleetId, name: party, version: madeOn, party: picked, tools: [] });\n setIsSaving(false);\n if (!outcome.isOk) {\n setRefusal({ message: outcome.message, isConflict: outcome.isConflict, version: madeOn });\n return;\n }\n setKeptVersion(outcome.version);\n setKept({ basis: scopes, scopes: picked });\n setIsOpen(false);\n setRound((previous) => previous + 1);\n toasts.add({ title: statedMessage(agentScopesSetMessage({ party, scopes: picked }), outcome.statementRefusal) });\n router.refresh();\n });\n };\n\n return (\n <div key={round} className={`flex flex-wrap items-center gap-2 rounded-md ${round > 0 ? 'animate-highlight' : ''}`} data-testid=\"agent-needs\">\n <NeedsChips own={shown} listed={listed === null ? null : new Set(listed.map(({ scope }) => scope))} />\n {canChange && listed !== null ? (\n <>\n <button\n type=\"button\"\n className=\"text-primary hover:underline\"\n onClick={() => {\n setPicked([...shown]);\n setRefusal(null);\n setIsOpen(true);\n }}\n data-testid=\"agent-needs-change\"\n >\n Change…\n </button>\n <TableDialog\n isOpen={isOpen}\n onClose={() => { setIsOpen(false); }}\n title=\"Every message needs\"\n description={`The scopes a calling ship must hold to message ${party}.`}\n appliesTo={`Applies to every message to ${party}`}\n action={{ label: 'Save', pending: 'Saving…', isDisabled: false, onPress: save }}\n isSaving={isSaving}\n refusal={standingRefusal(refusal, Math.max(version, keptVersion ?? 0))}\n isReloading={isReloading}\n onReload={() => {\n startReload(() => {\n router.refresh();\n });\n }}\n testId=\"agent-needs-dialog\"\n >\n <ScopePicker label=\"Scopes\" listed={listed} picked={picked} onPick={setPicked} isDisabled={isSaving} testId=\"agent-needs-picker\" />\n </TableDialog>\n </>\n ) : null}\n </div>\n );\n}\n","'use client';\n\nimport * as React from 'react';\nimport { useDialogRootContext } from \"../../dialog/root/DialogRootContext.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { popupTransitionStateMapping } from \"../../utils/popupStateMapping.mjs\";\nimport * as DrawerPopupCssVars from \"../popup/DrawerPopupCssVars.mjs\";\nimport * as DrawerBackdropCssVars from \"./DrawerBackdropCssVars.mjs\";\n\n/**\n * An overlay displayed beneath the popup.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Drawer](https://base-ui.com/react/components/drawer)\n */\nexport const DrawerBackdrop = /*#__PURE__*/React.forwardRef(function DrawerBackdrop(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n forceRender = false,\n ...elementProps\n } = componentProps;\n const store = useDialogRootContext();\n const open = store.useState('open');\n const nested = store.useState('nested');\n const mounted = store.useState('mounted');\n const transitionStatus = store.useState('transitionStatus');\n const state = {\n open,\n transitionStatus\n };\n return useRenderElement('div', componentProps, {\n state,\n ref: [store.context.backdropRef, forwardedRef],\n stateAttributesMapping: popupTransitionStateMapping,\n props: [{\n role: 'presentation',\n hidden: !mounted,\n style: {\n pointerEvents: !open ? 'none' : undefined,\n userSelect: 'none',\n WebkitUserSelect: 'none',\n [DrawerBackdropCssVars.swipeProgress]: '0',\n [DrawerPopupCssVars.swipeStrength]: '1'\n }\n }, elementProps],\n enabled: forceRender || !nested\n });\n});\nif (process.env.NODE_ENV !== \"production\") DrawerBackdrop.displayName = \"DrawerBackdrop\";","/**\n * The number of nested drawers that are currently open.\n * @type {number}\n */\nexport const nestedDrawers = '--nested-drawers';\n/**\n * The height of the drawer popup.\n * @type {CSS length}\n */\nexport const height = '--drawer-height';\n/**\n * The height of the frontmost open drawer in the current nested drawer stack.\n * @type {CSS length}\n */\nexport const frontmostHeight = '--drawer-frontmost-height';\n/**\n * The swipe movement on the X axis.\n * @type {CSS length}\n */\nexport const swipeMovementX = '--drawer-swipe-movement-x';\n/**\n * The swipe movement on the Y axis.\n * @type {CSS length}\n */\nexport const swipeMovementY = '--drawer-swipe-movement-y';\n/**\n * The snap point offset used for translating the drawer.\n * @type {CSS length}\n */\nexport const snapPointOffset = '--drawer-snap-point-offset';\n/**\n * A scalar (0.1-1) used to scale the swipe release transition duration in CSS.\n * @type {number}\n */\nexport const swipeStrength = '--drawer-swipe-strength';","/**\n * The swipe progress of the drawer gesture.\n * @type {number}\n */\nexport const swipeProgress = '--drawer-swipe-progress';","'use client';\n\nimport { DialogClose } from \"../../dialog/close/DialogClose.mjs\";\n/**\n * A button that closes the drawer.\n * Renders a `<button>` element.\n *\n * Documentation: [Base UI Drawer](https://base-ui.com/react/components/drawer)\n */\nexport const DrawerClose = DialogClose;","export const DRAWER_CONTENT_ATTRIBUTE = 'data-drawer-content';","'use client';\n\nimport * as React from 'react';\nimport { useDialogRootContext } from \"../../dialog/root/DialogRootContext.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { DRAWER_CONTENT_ATTRIBUTE } from \"./drawerContentAttribute.mjs\";\n\n/**\n * A container for the drawer contents.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Drawer](https://base-ui.com/react/components/drawer)\n */\nexport const DrawerContent = /*#__PURE__*/React.forwardRef(function DrawerContent(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n ...elementProps\n } = componentProps;\n useDialogRootContext();\n return useRenderElement('div', componentProps, {\n ref: forwardedRef,\n props: [{\n [DRAWER_CONTENT_ATTRIBUTE]: ''\n }, elementProps]\n });\n});\nif (process.env.NODE_ENV !== \"production\") DrawerContent.displayName = \"DrawerContent\";","'use client';\n\nimport * as React from 'react';\nimport { error } from '@base-ui/utils/error';\nimport { SafeReact } from '@base-ui/utils/safeReact';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { EMPTY_OBJECT } from '@base-ui/utils/empty';\nimport { FloatingFocusManager } from \"../../floating-ui-react/index.mjs\";\nimport { useDialogRootContext } from \"../../dialog/root/DialogRootContext.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { popupTransitionStateMapping } from \"../../utils/popupStateMapping.mjs\";\nimport * as DrawerBackdropCssVars from \"../backdrop/DrawerBackdropCssVars.mjs\";\nimport * as DrawerPopupCssVars from \"./DrawerPopupCssVars.mjs\";\nimport * as DrawerPopupDataAttributes from \"./DrawerPopupDataAttributes.mjs\";\nimport { useDialogPortalContext } from \"../../dialog/portal/DialogPortalContext.mjs\";\nimport { useOpenChangeComplete } from \"../../internals/useOpenChangeComplete.mjs\";\nimport { COMPOSITE_KEYS } from \"../../internals/composite/composite.mjs\";\nimport { useDrawerRootContext } from \"../root/DrawerRootContext.mjs\";\nimport { getSnapPointSwipeMovement, useDrawerSnapPoints } from \"../root/useDrawerSnapPoints.mjs\";\nimport { useDrawerViewportContext } from \"../viewport/DrawerViewportContext.mjs\";\nimport { FOCUSABLE_POPUP_PROPS } from \"../../utils/popups/index.mjs\";\n\n// Module-level flag to ensure we only register the CSS properties once,\n// regardless of how many Drawer components are mounted.\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nlet drawerSwipeVarsRegistered = false;\n\n/**\n * Removes inheritance of high-frequency drawer swipe CSS variables, which\n * reduces style recalculation cost in complex drawers with deep subtrees.\n * See https://motion.dev/blog/web-animation-performance-tier-list\n * under the \"Improving CSS variable performance\" section.\n */\nfunction removeCSSVariableInheritance() {\n if (drawerSwipeVarsRegistered) {\n return;\n }\n\n // Intentionally keep inheritance disabled on WebKit as well. Safari doesn't support\n // opting descendants back in via `--var: inherit` for custom properties registered\n // with `inherits: false`, but Drawer does not rely on descendant access to these vars\n // (unlike ScrollArea), so we keep the performance optimization enabled.\n if (typeof CSS !== 'undefined' && 'registerProperty' in CSS) {\n [DrawerPopupCssVars.swipeMovementX, DrawerPopupCssVars.swipeMovementY, DrawerPopupCssVars.snapPointOffset].forEach(name => {\n try {\n CSS.registerProperty({\n name,\n syntax: '<length>',\n inherits: false,\n initialValue: '0px'\n });\n } catch {\n /* ignore already-registered */\n }\n });\n [{\n name: DrawerBackdropCssVars.swipeProgress,\n initialValue: '0'\n }, {\n name: DrawerPopupCssVars.swipeStrength,\n initialValue: '1'\n }].forEach(({\n name,\n initialValue\n }) => {\n try {\n CSS.registerProperty({\n name,\n syntax: '<number>',\n inherits: false,\n initialValue\n });\n } catch {\n /* ignore already-registered */\n }\n });\n }\n drawerSwipeVarsRegistered = true;\n}\nconst stateAttributesMapping = {\n ...popupTransitionStateMapping,\n expanded(value) {\n return value ? {\n [DrawerPopupDataAttributes.expanded]: ''\n } : null;\n },\n nestedDrawerOpen(value) {\n return value ? {\n [DrawerPopupDataAttributes.nestedDrawerOpen]: ''\n } : null;\n },\n nestedDrawerSwiping(value) {\n return value ? {\n [DrawerPopupDataAttributes.nestedDrawerSwiping]: ''\n } : null;\n },\n swipeDirection(value) {\n return {\n [DrawerPopupDataAttributes.swipeDirection]: value\n };\n },\n swiping(value) {\n return value ? {\n [DrawerPopupDataAttributes.swiping]: ''\n } : null;\n }\n};\n\n/**\n * A container for the drawer contents.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Drawer](https://base-ui.com/react/components/drawer)\n */\nexport const DrawerPopup = /*#__PURE__*/React.forwardRef(function DrawerPopup(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n finalFocus,\n initialFocus,\n ...elementProps\n } = componentProps;\n const store = useDialogRootContext();\n const popupRef = store.context.popupRef;\n const {\n swipeDirection,\n frontmostHeight,\n hasNestedDrawer,\n nestedSwiping,\n nestedSwipeProgressStore,\n onPopupHeightChange,\n notifyParentFrontmostHeight,\n notifyParentHasNestedDrawer\n } = useDrawerRootContext();\n const descriptionElementId = store.useState('descriptionElementId');\n const disablePointerDismissal = store.useState('disablePointerDismissal');\n const floatingRootContext = store.useState('floatingRootContext');\n const rootPopupProps = store.useState('popupProps');\n const modal = store.useState('modal');\n const mounted = store.useState('mounted');\n const nested = store.useState('nested');\n const nestedOpenDrawerCount = store.useState('nestedOpenDrawerCount');\n const transitionStatus = store.useState('transitionStatus');\n const open = store.useState('open');\n const openMethod = store.useState('openMethod');\n const titleElementId = store.useState('titleElementId');\n const role = store.useState('role');\n const floatingId = floatingRootContext.useState('floatingId');\n const popupId = elementProps.id ?? floatingId;\n const swipe = useDrawerViewportContext();\n useDialogPortalContext();\n const {\n snapPoints,\n activeSnapPoint,\n activeSnapPointOffset\n } = useDrawerSnapPoints();\n const nestedDrawerOpen = nestedOpenDrawerCount > 0;\n const swiping = swipe?.swiping ?? false;\n const swipeStrength = swipe?.swipeStrength ?? null;\n const [popupHeight, setPopupHeight] = React.useState(0);\n const popupHeightRef = React.useRef(0);\n\n /* istanbul ignore else -- process.env.NODE_ENV is a build-time constant. */\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useEffect(() => {\n if (swipe) {\n return;\n }\n const ownerStackMessage = SafeReact.captureOwnerStack?.() || '';\n const message = '<Drawer.Popup> expected to be rendered within <Drawer.Viewport>. Omitting the ' + 'viewport disables drawer swipe handling and touch scroll locking. Wrap ' + '<Drawer.Popup> in <Drawer.Viewport>.';\n error(`${message}${ownerStackMessage}`);\n }, [swipe]);\n }\n const measureHeight = useStableCallback(() => {\n const popupElement = popupRef.current;\n if (!popupElement) {\n return;\n }\n const offsetHeight = popupElement.offsetHeight;\n\n // Only skip while the element is still actually stretched beyond its last measured height.\n if (popupHeightRef.current > 0 && frontmostHeight > popupHeightRef.current && offsetHeight > popupHeightRef.current) {\n return;\n }\n const keepHeightWhileNested = popupHeightRef.current > 0 && hasNestedDrawer;\n if (keepHeightWhileNested) {\n const oldHeight = popupHeightRef.current;\n setPopupHeight(oldHeight);\n onPopupHeightChange(oldHeight);\n return;\n }\n const nextHeight = offsetHeight;\n if (nextHeight === popupHeightRef.current) {\n return;\n }\n popupHeightRef.current = nextHeight;\n setPopupHeight(nextHeight);\n onPopupHeightChange(nextHeight);\n });\n useIsoLayoutEffect(() => {\n if (!mounted) {\n popupHeightRef.current = 0;\n setPopupHeight(0);\n onPopupHeightChange(0);\n return undefined;\n }\n const popupElement = popupRef.current;\n if (!popupElement) {\n return undefined;\n }\n removeCSSVariableInheritance();\n measureHeight();\n if (typeof ResizeObserver !== 'function') {\n return undefined;\n }\n const resizeObserver = new ResizeObserver(measureHeight);\n resizeObserver.observe(popupElement);\n return () => {\n resizeObserver.disconnect();\n };\n }, [measureHeight, mounted, nestedDrawerOpen, onPopupHeightChange, popupRef]);\n useIsoLayoutEffect(() => {\n const syncNestedSwipeProgress = () => {\n const popupElement = popupRef.current;\n if (!popupElement) {\n return;\n }\n const progress = nestedSwipeProgressStore.getSnapshot();\n if (progress > 0) {\n popupElement.style.setProperty(DrawerBackdropCssVars.swipeProgress, `${progress}`);\n } else {\n popupElement.style.setProperty(DrawerBackdropCssVars.swipeProgress, '0');\n }\n };\n syncNestedSwipeProgress();\n const unsubscribe = nestedSwipeProgressStore.subscribe(syncNestedSwipeProgress);\n const popupElement = popupRef.current;\n return () => {\n unsubscribe();\n if (popupElement) {\n popupElement.style.setProperty(DrawerBackdropCssVars.swipeProgress, '0');\n }\n };\n }, [nestedSwipeProgressStore, popupRef]);\n useIsoLayoutEffect(() => {\n if (!open) {\n return undefined;\n }\n notifyParentFrontmostHeight?.(frontmostHeight);\n return () => {\n notifyParentFrontmostHeight?.(0);\n };\n }, [frontmostHeight, open, notifyParentFrontmostHeight]);\n useIsoLayoutEffect(() => {\n if (!notifyParentHasNestedDrawer) {\n return undefined;\n }\n const present = open || transitionStatus === 'ending';\n notifyParentHasNestedDrawer(present);\n return () => {\n notifyParentHasNestedDrawer(false);\n };\n }, [notifyParentHasNestedDrawer, open, transitionStatus]);\n useOpenChangeComplete({\n open,\n ref: popupRef,\n onComplete() {\n if (open) {\n store.context.onOpenChangeComplete?.(true);\n }\n }\n });\n const resolvedInitialFocus = initialFocus === undefined ? popupRef : initialFocus;\n const setPopupElement = store.useStateSetter('popupElement');\n const state = {\n open,\n nested,\n transitionStatus,\n expanded: activeSnapPoint === 1,\n nestedDrawerOpen,\n nestedDrawerSwiping: nestedSwiping,\n swipeDirection,\n swiping\n };\n let popupHeightCssVarValue;\n const shouldUseAutoHeight = !hasNestedDrawer && transitionStatus !== 'ending';\n if (popupHeight && !shouldUseAutoHeight) {\n popupHeightCssVarValue = `${popupHeight}px`;\n }\n const shouldApplySnapPoints = snapPoints && snapPoints.length > 0 && (swipeDirection === 'down' || swipeDirection === 'up');\n let snapPointOffsetValue = null;\n if (shouldApplySnapPoints && activeSnapPointOffset !== null) {\n snapPointOffsetValue = swipeDirection === 'up' ? -activeSnapPointOffset : activeSnapPointOffset;\n }\n let dragStyles = swipe ? swipe.getDragStyles() : EMPTY_OBJECT;\n if (shouldApplySnapPoints && swipeDirection === 'down') {\n const baseOffset = activeSnapPointOffset ?? 0;\n const movementValue = Number.parseFloat(String(dragStyles[DrawerPopupCssVars.swipeMovementY]));\n if (swiping && Number.isFinite(movementValue)) {\n dragStyles = {\n ...dragStyles,\n transform: undefined,\n [DrawerPopupCssVars.swipeMovementY]: `${getSnapPointSwipeMovement(baseOffset, movementValue)}px`\n };\n } else {\n dragStyles = {\n ...dragStyles,\n transform: undefined\n };\n }\n }\n const element = useRenderElement('div', componentProps, {\n state,\n props: [rootPopupProps, {\n id: popupId,\n 'aria-labelledby': titleElementId,\n 'aria-describedby': descriptionElementId,\n role,\n ...FOCUSABLE_POPUP_PROPS,\n hidden: !mounted,\n onKeyDown(event) {\n if (COMPOSITE_KEYS.has(event.key)) {\n event.stopPropagation();\n }\n },\n style: {\n ...dragStyles,\n [DrawerBackdropCssVars.swipeProgress]: '0',\n [DrawerPopupCssVars.nestedDrawers]: nestedOpenDrawerCount,\n [DrawerPopupCssVars.height]: popupHeightCssVarValue,\n [DrawerPopupCssVars.snapPointOffset]: typeof snapPointOffsetValue === 'number' ? `${snapPointOffsetValue}px` : '0px',\n [DrawerPopupCssVars.frontmostHeight]: frontmostHeight ? `${frontmostHeight}px` : undefined,\n [DrawerPopupCssVars.swipeStrength]: typeof swipeStrength === 'number' && Number.isFinite(swipeStrength) && swipeStrength > 0 ? `${swipeStrength}` : '1'\n }\n }, elementProps],\n ref: [forwardedRef, popupRef, setPopupElement],\n stateAttributesMapping\n });\n return /*#__PURE__*/_jsx(FloatingFocusManager, {\n context: floatingRootContext,\n openInteractionType: openMethod,\n disabled: !mounted,\n closeOnFocusOut: !disablePointerDismissal,\n initialFocus: resolvedInitialFocus,\n returnFocus: finalFocus,\n modal: modal !== false,\n restoreFocus: \"popup\",\n children: element\n });\n});\nif (process.env.NODE_ENV !== \"production\") DrawerPopup.displayName = \"DrawerPopup\";","import { CommonPopupDataAttributes } from \"../../utils/popupStateMapping.mjs\";\n\n/**\n * Present when the drawer is open.\n */\nexport const open = CommonPopupDataAttributes.open;\n/**\n * Present when the drawer is closed.\n */\nexport const closed = CommonPopupDataAttributes.closed;\n/**\n * Present when the drawer begins animating in.\n */\nexport const startingStyle = CommonPopupDataAttributes.startingStyle;\n/**\n * Present when the drawer is animating out.\n */\nexport const endingStyle = CommonPopupDataAttributes.endingStyle;\n/**\n * Present when the drawer is at the expanded (full-height) snap point.\n */\nexport const expanded = 'data-expanded';\n/**\n * Present when a nested drawer is open.\n */\nexport const nestedDrawerOpen = 'data-nested-drawer-open';\n/**\n * Present when a nested drawer is being swiped.\n */\nexport const nestedDrawerSwiping = 'data-nested-drawer-swiping';\n/**\n * Present when the drawer is dismissed by swiping.\n */\nexport const swipeDismiss = 'data-swipe-dismiss';\n/**\n * Indicates the swipe direction.\n * @type {'up' | 'down' | 'left' | 'right'}\n */\nexport const swipeDirection = 'data-swipe-direction';\n/**\n * Present when the drawer is being swiped.\n */\nexport const swiping = 'data-swiping';","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const DrawerRootContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") DrawerRootContext.displayName = \"DrawerRootContext\";\nexport function useDrawerRootContext(optional) {\n const drawerRootContext = React.useContext(DrawerRootContext);\n if (optional !== true && drawerRootContext === undefined) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: DrawerRootContext is missing. Drawer parts must be placed within <Drawer.Root>.' : _formatErrorMessage(90));\n }\n return drawerRootContext;\n}","'use client';\n\nimport * as React from 'react';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { ownerDocument } from '@base-ui/utils/owner';\nimport { clamp } from '@base-ui/utils/clamp';\nimport { useDialogRootContext } from \"../../dialog/root/DialogRootContext.mjs\";\nimport { useDrawerRootContext } from \"./DrawerRootContext.mjs\";\n/**\n * Resolves the vertical swipe movement for a snap point, applying square-root damping once the drag\n * overshoots the fully-open edge (`nextOffset < 0`) so the popup resists travelling past it.\n */\nexport function getSnapPointSwipeMovement(baseOffset, movementValue) {\n const nextOffset = baseOffset + movementValue;\n if (nextOffset >= 0) {\n return movementValue;\n }\n return -Math.sqrt(-nextOffset) - baseOffset;\n}\nfunction resolveSnapPointValue(snapPoint, viewportHeight, rootFontSize) {\n if (!Number.isFinite(viewportHeight) || viewportHeight <= 0) {\n return null;\n }\n if (typeof snapPoint === 'number') {\n if (!Number.isFinite(snapPoint)) {\n return null;\n }\n if (snapPoint <= 1) {\n return clamp(snapPoint, 0, 1) * viewportHeight;\n }\n return snapPoint;\n }\n const trimmed = snapPoint.trim();\n if (trimmed.endsWith('px')) {\n const value = Number.parseFloat(trimmed);\n return Number.isFinite(value) ? value : null;\n }\n if (trimmed.endsWith('rem')) {\n const value = Number.parseFloat(trimmed);\n return Number.isFinite(value) ? value * rootFontSize : null;\n }\n return null;\n}\n\n/**\n * Returns the index of the value closest to `target`, or `-1` if `values` is empty.\n */\nexport function closestSnapPointIndex(values, target) {\n let closestIndex = -1;\n let closestDistance = Infinity;\n for (let index = 0; index < values.length; index += 1) {\n const distance = Math.abs(values[index] - target);\n if (distance < closestDistance) {\n closestDistance = distance;\n closestIndex = index;\n }\n }\n return closestIndex;\n}\nexport function useDrawerSnapPoints() {\n const store = useDialogRootContext();\n const {\n snapPoints,\n activeSnapPoint,\n setActiveSnapPoint,\n popupHeight\n } = useDrawerRootContext();\n const viewportElement = store.useState('viewportElement');\n const [viewportHeight, setViewportHeight] = React.useState(0);\n const [rootFontSize, setRootFontSize] = React.useState(16);\n const measureViewportHeight = useStableCallback(() => {\n const doc = ownerDocument(viewportElement);\n const html = doc.documentElement;\n setViewportHeight(viewportElement ? viewportElement.offsetHeight : html.clientHeight);\n const fontSize = parseFloat(getComputedStyle(html).fontSize);\n if (Number.isFinite(fontSize)) {\n setRootFontSize(fontSize);\n }\n });\n useIsoLayoutEffect(() => {\n measureViewportHeight();\n if (!viewportElement || typeof ResizeObserver !== 'function') {\n return undefined;\n }\n const resizeObserver = new ResizeObserver(measureViewportHeight);\n resizeObserver.observe(viewportElement);\n return () => {\n resizeObserver.disconnect();\n };\n }, [measureViewportHeight, viewportElement]);\n const resolvedSnapPoints = React.useMemo(() => {\n if (!snapPoints || snapPoints.length === 0 || viewportHeight <= 0 || popupHeight <= 0) {\n return [];\n }\n const maxHeight = Math.min(popupHeight, viewportHeight);\n const resolved = snapPoints.map(value => {\n const resolvedHeight = resolveSnapPointValue(value, viewportHeight, rootFontSize);\n if (resolvedHeight === null) {\n return null;\n }\n const clampedHeight = clamp(resolvedHeight, 0, maxHeight);\n return {\n value,\n height: clampedHeight,\n offset: Math.max(0, popupHeight - clampedHeight)\n };\n }).filter(point => Boolean(point));\n if (resolved.length <= 1) {\n return resolved;\n }\n const deduped = [];\n const seenHeights = [];\n for (let index = resolved.length - 1; index >= 0; index -= 1) {\n const point = resolved[index];\n const isDuplicate = seenHeights.some(height => Math.abs(height - point.height) <= 1);\n if (isDuplicate) {\n continue;\n }\n seenHeights.push(point.height);\n deduped.push(point);\n }\n deduped.reverse();\n return deduped;\n }, [popupHeight, rootFontSize, snapPoints, viewportHeight]);\n const resolvedActiveSnapPoint = React.useMemo(() => {\n if (activeSnapPoint === null) {\n return undefined;\n }\n const exactMatch = resolvedSnapPoints.find(point => Object.is(point.value, activeSnapPoint));\n if (exactMatch) {\n return exactMatch;\n }\n const maxHeight = Math.min(popupHeight, viewportHeight);\n const resolvedHeight = resolveSnapPointValue(activeSnapPoint, viewportHeight, rootFontSize);\n if (resolvedHeight === null) {\n return undefined;\n }\n const clampedHeight = clamp(resolvedHeight, 0, maxHeight);\n return resolvedSnapPoints[closestSnapPointIndex(resolvedSnapPoints.map(point => point.height), clampedHeight)];\n }, [activeSnapPoint, popupHeight, resolvedSnapPoints, rootFontSize, viewportHeight]);\n return {\n snapPoints,\n activeSnapPoint,\n setActiveSnapPoint,\n popupHeight,\n viewportHeight,\n resolvedSnapPoints,\n activeSnapPointOffset: resolvedActiveSnapPoint?.offset ?? null\n };\n}","'use client';\n\nimport * as React from 'react';\nexport const DrawerViewportContext = /*#__PURE__*/React.createContext(null);\nif (process.env.NODE_ENV !== \"production\") DrawerViewportContext.displayName = \"DrawerViewportContext\";\nexport function useDrawerViewportContext() {\n return React.useContext(DrawerViewportContext);\n}","'use client';\n\nimport { DialogPortal } from \"../../dialog/portal/DialogPortal.mjs\";\n/**\n * A portal element that moves the popup to a different part of the DOM.\n * By default, the portal element is appended to `<body>`.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Drawer](https://base-ui.com/react/components/drawer)\n */\nexport const DrawerPortal = DialogPortal;","'use client';\n\nvar _DrawerProviderReport, _DrawerProviderReport2;\nimport * as React from 'react';\nimport { addEventListener } from '@base-ui/utils/addEventListener';\nimport { NOOP } from '@base-ui/utils/empty';\nimport { useControlled } from '@base-ui/utils/useControlled';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { ownerWindow } from '@base-ui/utils/owner';\nimport { platform } from '@base-ui/utils/platform';\nimport { DrawerRootContext, useDrawerRootContext } from \"./DrawerRootContext.mjs\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { useDialogRootContext } from \"../../dialog/root/DialogRootContext.mjs\";\nimport { useRenderDialogRoot } from \"../../dialog/root/useRenderDialogRoot.mjs\";\nimport { useDrawerProviderContext } from \"../provider/DrawerProviderContext.mjs\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Groups all parts of the drawer.\n * Doesn't render its own HTML element.\n *\n * Documentation: [Base UI Drawer](https://base-ui.com/react/components/drawer)\n */\nexport function DrawerRoot(props) {\n const {\n children,\n open: openProp,\n defaultOpen = false,\n onOpenChange,\n onOpenChangeComplete,\n disablePointerDismissal = false,\n modal = true,\n actionsRef,\n handle,\n triggerId: triggerIdProp,\n defaultTriggerId: defaultTriggerIdProp = null,\n swipeDirection = 'down',\n snapToSequentialPoints = false,\n snapPoints,\n snapPoint: snapPointProp,\n defaultSnapPoint,\n onSnapPointChange\n } = props;\n const parentDrawerRootContext = useDrawerRootContext(true);\n const notifyParentSwipeProgressChange = parentDrawerRootContext?.onNestedSwipeProgressChange;\n const notifyParentFrontmostHeight = parentDrawerRootContext?.onNestedFrontmostHeightChange;\n const notifyParentSwipingChange = parentDrawerRootContext?.onNestedSwipingChange;\n const notifyParentHasNestedDrawer = parentDrawerRootContext?.onNestedDrawerPresenceChange;\n const [popupHeight, setPopupHeight] = React.useState(0);\n const [frontmostHeight, setFrontmostHeight] = React.useState(0);\n const [hasNestedDrawer, setHasNestedDrawer] = React.useState(false);\n const [nestedSwiping, setNestedSwiping] = React.useState(false);\n const [nestedSwipeProgressStore] = React.useState(createNestedSwipeProgressStore);\n const resolvedDefaultSnapPoint = defaultSnapPoint !== undefined ? defaultSnapPoint : snapPoints?.[0] ?? null;\n const isSnapPointControlled = snapPointProp !== undefined;\n const [activeSnapPoint, setActiveSnapPointUnwrapped] = useControlled({\n controlled: snapPointProp,\n default: resolvedDefaultSnapPoint,\n name: 'Drawer',\n state: 'snapPoint'\n });\n const isNestedDrawerOpenRef = React.useRef(false);\n const swipeAreaActiveRef = React.useRef(false);\n const setActiveSnapPoint = useStableCallback((nextSnapPoint, eventDetails) => {\n const resolvedEventDetails = eventDetails ?? createChangeEventDetails(REASONS.none);\n onSnapPointChange?.(nextSnapPoint, resolvedEventDetails);\n if (resolvedEventDetails.isCanceled) {\n return;\n }\n setActiveSnapPointUnwrapped(nextSnapPoint);\n });\n const resolvedActiveSnapPoint = React.useMemo(() => {\n if (isSnapPointControlled) {\n return activeSnapPoint;\n }\n if (!snapPoints || snapPoints.length === 0) {\n return activeSnapPoint;\n }\n if (activeSnapPoint === null || !snapPoints.some(snapPoint => Object.is(snapPoint, activeSnapPoint))) {\n return resolvedDefaultSnapPoint;\n }\n return activeSnapPoint;\n }, [activeSnapPoint, isSnapPointControlled, resolvedDefaultSnapPoint, snapPoints]);\n const onPopupHeightChange = useStableCallback(height => {\n setPopupHeight(height);\n if (!isNestedDrawerOpenRef.current && height > 0) {\n setFrontmostHeight(height);\n }\n });\n const onNestedFrontmostHeightChange = useStableCallback(height => {\n if (height > 0) {\n isNestedDrawerOpenRef.current = true;\n setFrontmostHeight(height);\n return;\n }\n isNestedDrawerOpenRef.current = false;\n if (popupHeight > 0) {\n setFrontmostHeight(popupHeight);\n }\n });\n const onNestedDrawerPresenceChange = useStableCallback(present => {\n setHasNestedDrawer(present);\n });\n const onNestedSwipeProgressChange = useStableCallback(progress => {\n nestedSwipeProgressStore.set(progress);\n notifyParentSwipeProgressChange?.(progress);\n });\n const onNestedSwipingChange = useStableCallback(swiping => {\n setNestedSwiping(swiping);\n notifyParentSwipingChange?.(swiping);\n });\n const handleOpenChange = useStableCallback((nextOpen, eventDetails) => {\n onOpenChange?.(nextOpen, eventDetails);\n if (eventDetails.isCanceled) {\n return;\n }\n if (!nextOpen && snapPoints && snapPoints.length > 0) {\n setActiveSnapPoint(resolvedDefaultSnapPoint, createChangeEventDetails(eventDetails.reason, eventDetails.event, eventDetails.trigger));\n }\n });\n const contextValue = React.useMemo(() => ({\n swipeDirection,\n swipeAreaActiveRef,\n snapToSequentialPoints,\n snapPoints,\n activeSnapPoint: resolvedActiveSnapPoint,\n setActiveSnapPoint,\n frontmostHeight,\n popupHeight,\n hasNestedDrawer,\n nestedSwiping,\n nestedSwipeProgressStore,\n onNestedDrawerPresenceChange,\n onPopupHeightChange,\n onNestedFrontmostHeightChange,\n onNestedSwipingChange,\n onNestedSwipeProgressChange,\n notifyParentFrontmostHeight,\n notifyParentSwipingChange,\n notifyParentSwipeProgressChange,\n notifyParentHasNestedDrawer\n }), [resolvedActiveSnapPoint, frontmostHeight, hasNestedDrawer, nestedSwiping, nestedSwipeProgressStore, notifyParentHasNestedDrawer, notifyParentSwipeProgressChange, notifyParentSwipingChange, notifyParentFrontmostHeight, onNestedDrawerPresenceChange, onNestedFrontmostHeightChange, onNestedSwipeProgressChange, onNestedSwipingChange, onPopupHeightChange, popupHeight, setActiveSnapPoint, snapPoints, snapToSequentialPoints, swipeAreaActiveRef, swipeDirection]);\n const resolvedChildren = typeof children === 'function' ? payload => /*#__PURE__*/_jsxs(React.Fragment, {\n children: [_DrawerProviderReport || (_DrawerProviderReport = /*#__PURE__*/_jsx(DrawerProviderReporter, {})), children(payload)]\n }) : /*#__PURE__*/_jsxs(React.Fragment, {\n children: [_DrawerProviderReport2 || (_DrawerProviderReport2 = /*#__PURE__*/_jsx(DrawerProviderReporter, {})), children]\n });\n const dialog = useRenderDialogRoot('drawer', {\n open: openProp,\n defaultOpen,\n onOpenChange: handleOpenChange,\n onOpenChangeComplete,\n disablePointerDismissal,\n modal,\n actionsRef,\n handle,\n triggerId: triggerIdProp,\n defaultTriggerId: defaultTriggerIdProp,\n children: resolvedChildren\n });\n return /*#__PURE__*/_jsx(DrawerRootContext.Provider, {\n value: contextValue,\n children: dialog\n });\n}\nfunction createNestedSwipeProgressStore() {\n let progress = 0;\n const listeners = new Set();\n return {\n getSnapshot: () => progress,\n set(nextProgress) {\n const resolved = Number.isFinite(nextProgress) ? nextProgress : 0;\n if (resolved === progress) {\n return;\n }\n progress = resolved;\n listeners.forEach(listener => {\n listener();\n });\n },\n subscribe(listener) {\n listeners.add(listener);\n return () => {\n listeners.delete(listener);\n };\n }\n };\n}\nfunction DrawerProviderReporter() {\n const providerContext = useDrawerProviderContext();\n const store = useDialogRootContext(false);\n const setDrawerOpen = providerContext?.setDrawerOpen;\n const removeDrawer = providerContext?.removeDrawer;\n const open = store.useState('open');\n const nestedOpenDialogCount = store.useState('nestedOpenDialogCount');\n const popupElement = store.useState('popupElement');\n const isTopmost = nestedOpenDialogCount === 0;\n useIsoLayoutEffect(() => {\n if (!removeDrawer) {\n return undefined;\n }\n return () => {\n removeDrawer(store);\n };\n }, [removeDrawer, store]);\n useIsoLayoutEffect(() => {\n setDrawerOpen?.(store, open);\n }, [open, setDrawerOpen, store]);\n React.useEffect(() => {\n // CloseWatcher enables the Android back gesture (Chromium-only).\n // Keep this Android-only for now to avoid interfering with Escape/nesting semantics on desktop due to `useDismiss`.\n if (!open || !isTopmost || !platform.os.android) {\n return undefined;\n }\n const win = ownerWindow(popupElement);\n const CloseWatcherCtor = win.CloseWatcher;\n if (!CloseWatcherCtor) {\n return undefined;\n }\n function handleCancel(event) {\n if (!store.select('open')) {\n return;\n }\n const eventDetails = createChangeEventDetails(REASONS.closeWatcher, event);\n if (!event.cancelable) {\n // The browser lets only one close request per user activation be prevented; any further\n // request closes the drawer regardless, like a native `<dialog>`.\n eventDetails.cancel = NOOP;\n }\n store.setOpen(false, eventDetails);\n if (eventDetails.isCanceled) {\n // Keeps this watcher active for the next close request.\n event.preventDefault();\n }\n }\n const closeWatcher = new CloseWatcherCtor();\n // The browser destroys the watcher before `close` fires, so the request is handled from\n // `cancel`, where it can still be prevented.\n const unsubscribe = addEventListener(closeWatcher, 'cancel', handleCancel);\n return () => {\n unsubscribe();\n closeWatcher.destroy();\n };\n }, [store, isTopmost, open, popupElement]);\n return null;\n}","'use client';\n\nimport * as React from 'react';\nexport const DrawerProviderContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") DrawerProviderContext.displayName = \"DrawerProviderContext\";\nexport function useDrawerProviderContext() {\n return React.useContext(DrawerProviderContext);\n}","'use client';\n\nimport { DialogTitle } from \"../../dialog/title/DialogTitle.mjs\";\n/**\n * A heading that labels the drawer.\n * Renders an `<h2>` element.\n *\n * Documentation: [Base UI Drawer](https://base-ui.com/react/components/drawer)\n */\nexport const DrawerTitle = DialogTitle;","'use client';\n\nimport { DialogTrigger } from \"../../dialog/trigger/DialogTrigger.mjs\";\n/**\n * A button that opens the drawer.\n * Renders a `<button>` element.\n *\n * Documentation: [Base UI Drawer](https://base-ui.com/react/components/drawer)\n */\nexport const DrawerTrigger = DialogTrigger;","'use client';\n\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { isElement } from '@floating-ui/utils/dom';\nimport { addEventListener } from '@base-ui/utils/addEventListener';\nimport { ownerDocument, ownerWindow } from '@base-ui/utils/owner';\nimport { useAnimationFrame } from '@base-ui/utils/useAnimationFrame';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { clamp } from '@base-ui/utils/clamp';\nimport { useDialogRootContext } from \"../../dialog/root/DialogRootContext.mjs\";\nimport { DialogViewport } from \"../../dialog/viewport/DialogViewport.mjs\";\nimport * as DialogViewportDataAttributes from \"../../dialog/viewport/DialogViewportDataAttributes.mjs\";\nimport { mergeProps } from \"../../merge-props/index.mjs\";\nimport { useDrawerRootContext } from \"../root/DrawerRootContext.mjs\";\nimport { closestSnapPointIndex, getSnapPointSwipeMovement, useDrawerSnapPoints } from \"../root/useDrawerSnapPoints.mjs\";\nimport { useDrawerProviderContext } from \"../provider/DrawerProviderContext.mjs\";\nimport { getDisplacement, useSwipeDismiss } from \"../../utils/useSwipeDismiss.mjs\";\nimport * as DrawerPopupCssVars from \"../popup/DrawerPopupCssVars.mjs\";\nimport * as DrawerPopupDataAttributes from \"../popup/DrawerPopupDataAttributes.mjs\";\nimport * as DrawerBackdropCssVars from \"../backdrop/DrawerBackdropCssVars.mjs\";\nimport { DRAWER_CONTENT_ATTRIBUTE } from \"../content/drawerContentAttribute.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { activeElement, closest, contains, getTarget } from \"../../floating-ui-react/utils.mjs\";\nimport { DrawerViewportContext } from \"./DrawerViewportContext.mjs\";\nimport { TransitionStatusDataAttributes } from \"../../internals/stateAttributesMapping.mjs\";\nimport { findScrollableTouchTarget } from \"../../utils/scrollable.mjs\";\nimport { BASE_UI_SWIPE_IGNORE_ATTRIBUTE, BASE_UI_SWIPE_IGNORE_SELECTOR } from \"../../internals/constants.mjs\";\nimport { getElementAtPoint } from \"../../utils/getElementAtPoint.mjs\";\nimport { useDrawerVirtualKeyboardContext } from \"../virtual-keyboard-provider/DrawerVirtualKeyboardContext.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst MIN_SWIPE_THRESHOLD = 10;\nconst FAST_SWIPE_VELOCITY = 0.5;\nconst SNAP_VELOCITY_THRESHOLD = 0.5;\nconst SNAP_VELOCITY_MULTIPLIER = 300;\nconst MAX_SNAP_VELOCITY = 4;\nconst MIN_SWIPE_RELEASE_VELOCITY = 0.2;\nconst MAX_SWIPE_RELEASE_VELOCITY = 4;\nconst MIN_SWIPE_RELEASE_DURATION_MS = 80;\nconst MAX_SWIPE_RELEASE_DURATION_MS = 360;\nconst MIN_SWIPE_RELEASE_SCALAR = 0.1;\nconst MAX_SWIPE_RELEASE_SCALAR = 1;\nconst AXIS_LOCK_SLOP = 6;\nconst AXIS_LOCK_BIAS = 2;\nconst DRAWER_CONTENT_SELECTOR = `[${DRAWER_CONTENT_ATTRIBUTE}]`;\nconst AXIS_SWIPE_IGNORE_SELECTORS = {\n horizontal: `[${BASE_UI_SWIPE_IGNORE_ATTRIBUTE}=\"x\"]`,\n vertical: `[${BASE_UI_SWIPE_IGNORE_ATTRIBUTE}=\"y\"]`\n};\n/**\n * A positioning container for the drawer popup that can be made scrollable.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Drawer](https://base-ui.com/react/components/drawer)\n */\nexport const DrawerViewport = /*#__PURE__*/React.forwardRef(function DrawerViewport(props, forwardedRef) {\n const {\n render,\n className,\n style,\n children,\n ...elementProps\n } = props;\n const store = useDialogRootContext();\n const popupRef = store.context.popupRef;\n const backdropRef = store.context.backdropRef;\n const {\n swipeDirection,\n notifyParentSwipingChange,\n notifyParentSwipeProgressChange,\n frontmostHeight,\n snapToSequentialPoints,\n swipeAreaActiveRef\n } = useDrawerRootContext();\n const providerContext = useDrawerProviderContext();\n const {\n snapPoints,\n resolvedSnapPoints,\n activeSnapPoint,\n activeSnapPointOffset,\n setActiveSnapPoint,\n popupHeight\n } = useDrawerSnapPoints();\n const open = store.useState('open');\n const mounted = store.useState('mounted');\n const nested = store.useState('nested');\n const nestedOpenDrawerCount = store.useState('nestedOpenDrawerCount');\n const viewportElement = store.useState('viewportElement');\n const popupElementState = store.useState('popupElement');\n const visualStateStore = providerContext?.visualStateStore;\n const nestedDrawerOpen = nestedOpenDrawerCount > 0;\n const scrollAxis = swipeDirection === 'left' || swipeDirection === 'right' ? 'horizontal' : 'vertical';\n const isVerticalScrollAxis = scrollAxis === 'vertical';\n const crossScrollAxis = isVerticalScrollAxis ? 'horizontal' : 'vertical';\n const [swipeRelease, setSwipeRelease] = React.useState(null);\n const pendingSwipeCloseSnapPointRef = React.useRef(undefined);\n const resetSwipeRef = React.useRef(null);\n const controlledDismissFrame = useAnimationFrame();\n const swipingRef = React.useRef(false);\n const nestedSwipeActiveRef = React.useRef(false);\n const lastPointerTypeRef = React.useRef('');\n const ignoreNextTouchStartFromPenRef = React.useRef(false);\n const ignoreTouchSwipeRef = React.useRef(false);\n const touchScrollStateRef = React.useRef(null);\n const virtualKeyboard = useDrawerVirtualKeyboardContext();\n const snapPointRange = React.useMemo(() => {\n if (!snapPoints || snapPoints.length < 2 || resolvedSnapPoints.length < 2 || swipeDirection !== 'down' && swipeDirection !== 'up') {\n return null;\n }\n const offsets = resolvedSnapPoints.map(point => point.offset).sort((a, b) => a - b);\n const minOffset = offsets[0];\n const nextOffset = offsets[1];\n const range = nextOffset - minOffset;\n return {\n minOffset,\n range\n };\n }, [resolvedSnapPoints, snapPoints, swipeDirection]);\n const snapPointProgress = React.useMemo(() => {\n if (!snapPointRange || activeSnapPointOffset === null) {\n return null;\n }\n return clamp((activeSnapPointOffset - snapPointRange.minOffset) / snapPointRange.range, 0, 1);\n }, [activeSnapPointOffset, snapPointRange]);\n const swipeDirections = React.useMemo(() => {\n if (snapPoints && snapPoints.length > 0 && (swipeDirection === 'down' || swipeDirection === 'up')) {\n return swipeDirection === 'down' ? ['down', 'up'] : ['up', 'down'];\n }\n return [swipeDirection];\n }, [snapPoints, swipeDirection]);\n const setSwipeDismissed = useStableCallback(dismissed => {\n popupRef.current?.toggleAttribute(DrawerPopupDataAttributes.swipeDismiss, dismissed);\n backdropRef.current?.toggleAttribute(DrawerPopupDataAttributes.swipeDismiss, dismissed);\n });\n const clearSwipeRelease = useStableCallback(() => {\n setSwipeDismissed(false);\n popupRef.current?.removeAttribute(TransitionStatusDataAttributes.endingStyle);\n setSwipeRelease(null);\n });\n const finishNestedSwipe = useStableCallback(() => {\n if (!nestedSwipeActiveRef.current) {\n return;\n }\n nestedSwipeActiveRef.current = false;\n notifyParentSwipingChange?.(false);\n });\n const applySwipeProgress = useStableCallback((resolvedProgress, shouldTrackProgress, notifyParent) => {\n const isActive = open && !nested && shouldTrackProgress;\n const swipeProgress = isActive ? resolvedProgress : 0;\n const nestedSwipeProgress = open && shouldTrackProgress ? resolvedProgress : 0;\n if (notifyParent && notifyParentSwipeProgressChange) {\n notifyParentSwipeProgressChange(nestedSwipeProgress);\n if (nestedSwipeProgress <= 0) {\n finishNestedSwipe();\n }\n }\n visualStateStore?.set({\n swipeProgress,\n frontmostHeight: swipeProgress > 0 ? frontmostHeight : 0\n });\n const backdropElement = backdropRef.current;\n if (!backdropElement) {\n return;\n }\n const showProgress = isActive && swipeProgress > 0;\n backdropElement.style.setProperty(DrawerBackdropCssVars.swipeProgress, showProgress ? `${swipeProgress}` : '0');\n if (showProgress && frontmostHeight > 0) {\n backdropElement.style.setProperty(DrawerPopupCssVars.height, `${frontmostHeight}px`);\n } else {\n backdropElement.style.removeProperty(DrawerPopupCssVars.height);\n }\n });\n function resolveSwipeRelease(popupElement, direction, deltaX, deltaY, velocityX, velocityY, releaseVelocityX, releaseVelocityY) {\n const size = getBaseSwipeSize(popupElement, direction);\n if (size <= 0) {\n return null;\n }\n\n // The snap point base offset shifts the popup along the dismiss direction for both\n // `down` (+offset) and `up` (-offset), so it always adds to the directional translation.\n const snapPointBaseOffset = (direction === 'down' || direction === 'up') && snapPoints && snapPoints.length > 0 ? activeSnapPointOffset ?? 0 : 0;\n const translationAlongDirection = snapPointBaseOffset + getDisplacement(direction, deltaX, deltaY);\n const remainingDistance = Math.max(0, size - translationAlongDirection);\n if (remainingDistance <= 0) {\n return null;\n }\n const releaseVelocity = getDisplacement(direction, releaseVelocityX, releaseVelocityY);\n const directionalVelocity = Math.abs(releaseVelocity) > 0 ? releaseVelocity : getDisplacement(direction, velocityX, velocityY);\n if (directionalVelocity <= MIN_SWIPE_RELEASE_VELOCITY) {\n return null;\n }\n const clampedVelocity = clamp(directionalVelocity, MIN_SWIPE_RELEASE_VELOCITY, MAX_SWIPE_RELEASE_VELOCITY);\n // The gesture hook supplies finite deltas and velocities. The guards above keep the remaining\n // distance and divisor positive, so the duration stays within [MIN, MAX] and the resulting\n // scalar within (0, 1].\n const durationMs = clamp(remainingDistance / clampedVelocity, MIN_SWIPE_RELEASE_DURATION_MS, MAX_SWIPE_RELEASE_DURATION_MS);\n const normalizedDuration = (durationMs - MIN_SWIPE_RELEASE_DURATION_MS) / (MAX_SWIPE_RELEASE_DURATION_MS - MIN_SWIPE_RELEASE_DURATION_MS);\n return MIN_SWIPE_RELEASE_SCALAR + normalizedDuration * (MAX_SWIPE_RELEASE_SCALAR - MIN_SWIPE_RELEASE_SCALAR);\n }\n function updateNestedSwipeActive(details) {\n if (nestedSwipeActiveRef.current || !details) {\n return;\n }\n const direction = details.direction ?? swipeDirection;\n const delta = getDisplacement(direction, details.deltaX, details.deltaY);\n if (Math.abs(delta) < MIN_SWIPE_THRESHOLD) {\n return;\n }\n nestedSwipeActiveRef.current = true;\n notifyParentSwipingChange?.(true);\n }\n const swipe = useSwipeDismiss({\n enabled: mounted && !nestedDrawerOpen,\n directions: swipeDirections,\n elementRef: store.context.popupRef,\n ignoreSelectorWhenTouch: false,\n ignoreScrollableAncestors: true,\n movementCssVars: {\n x: DrawerPopupCssVars.swipeMovementX,\n y: DrawerPopupCssVars.swipeMovementY\n },\n onSwipeStart(event) {\n if ('touches' in event || event.pointerType === 'touch') {\n return;\n }\n const popupElement = popupRef.current;\n const doc = ownerDocument(popupElement);\n const selection = doc.getSelection?.();\n if (!selection || selection.isCollapsed) {\n return;\n }\n const anchorElement = isElement(selection.anchorNode) ? selection.anchorNode : selection.anchorNode?.parentElement;\n const focusElement = isElement(selection.focusNode) ? selection.focusNode : selection.focusNode?.parentElement;\n if (!contains(popupElement, anchorElement) && !contains(popupElement, focusElement)) {\n return;\n }\n selection.removeAllRanges();\n },\n onSwipingChange(swiping) {\n swipingRef.current = swiping;\n setBackdropSwipingAttribute(store.context.backdropRef.current, swiping);\n if (!swiping && !notifyParentSwipeProgressChange) {\n finishNestedSwipe();\n }\n },\n swipeThreshold({\n element,\n direction\n }) {\n return getBaseSwipeThreshold(element, direction);\n },\n canStart(position, details) {\n const popupElement = store.context.popupRef.current;\n if (!popupElement) {\n return false;\n }\n const nativeEvent = details.nativeEvent;\n const touchLike = 'touches' in nativeEvent || nativeEvent.pointerType === 'touch';\n const touchState = touchLike ? touchScrollStateRef.current : null;\n const doc = popupElement.ownerDocument;\n const elementAtPoint = getElementAtPoint(popupElement.getRootNode(), position.x, position.y);\n // Activation can be deferred until after a touch that started inside has left the popup.\n if (!touchState?.startedInPopup && !contains(popupElement, elementAtPoint)) {\n return false;\n }\n if (touchLike && shouldIgnoreSwipeForTextSelection(doc, popupElement)) {\n return false;\n }\n\n // Over a cross-axis gesture target, stay pending until the drawer axis wins the gesture.\n // Starting on touchstart would leave the drawer swiping (and settling on release) while the\n // cross-axis target handles the drag.\n if (touchState?.hasCrossAxisGestureTarget && !touchState.drawerAxisAttributed && touchState.allowSwipe !== true) {\n return false;\n }\n return true;\n },\n onProgress(progress, details) {\n const swiping = swipingRef.current;\n if (swiping) {\n updateNestedSwipeActive(details);\n }\n const hasSnapPoints = Boolean(snapPoints && snapPoints.length > 0);\n if (swiping && swipeDirection === 'down' && hasSnapPoints && details) {\n const popupElement = store.context.popupRef.current;\n if (popupElement) {\n popupElement.style.removeProperty('transform');\n popupElement.style.setProperty(DrawerPopupCssVars.swipeMovementY, `${getSnapPointSwipeMovement(activeSnapPointOffset ?? 0, details.deltaY)}px`);\n }\n }\n let resolvedProgress = progress;\n if (snapPointRange && popupHeight > 0) {\n const baseOffset = activeSnapPointOffset ?? snapPointRange.minOffset;\n const offsetToProgress = nextOffset => clamp((nextOffset - snapPointRange.minOffset) / snapPointRange.range, 0, 1);\n\n // Outside a drag the hook still reports the last drag deltas, both after a release and\n // on a gesture that never started (e.g. a press inside `Drawer.Content`). Recomputing\n // from them would re-apply drag progress to a drawer that rests on its snap point.\n if (swiping && details && Number.isFinite(details.deltaY)) {\n resolvedProgress = offsetToProgress(clamp(baseOffset + details.deltaY, 0, popupHeight));\n } else if (snapPointProgress !== null) {\n resolvedProgress = snapPointProgress;\n }\n }\n\n // A parent drawer follows an active drag only, so drop it back to zero once the drag ends.\n if (!swiping) {\n notifyParentSwipeProgressChange?.(0);\n finishNestedSwipe();\n }\n applySwipeProgress(resolvedProgress, true, swiping);\n },\n onRelease({\n event,\n deltaX,\n deltaY,\n direction,\n velocityX,\n velocityY,\n releaseVelocityX,\n releaseVelocityY\n }) {\n const popupElement = store.context.popupRef.current;\n if (!popupElement) {\n clearSwipeRelease();\n return undefined;\n }\n const releasePopupElement = popupElement;\n function startSwipeRelease(resolvedDirection) {\n // Start ending transition styles earlier and synchronously to prevent a period where\n // the popup appears stuck on release before the actual closing animation starts.\n finishNestedSwipe();\n setSwipeDismissed(true);\n releasePopupElement.style.removeProperty('transition');\n releasePopupElement.setAttribute(TransitionStatusDataAttributes.endingStyle, '');\n ReactDOM.flushSync(() => {\n setSwipeRelease(resolveSwipeRelease(releasePopupElement, resolvedDirection, deltaX, deltaY, velocityX, velocityY, releaseVelocityX, releaseVelocityY));\n });\n }\n if (!snapPoints || snapPoints.length === 0) {\n if (!direction) {\n clearSwipeRelease();\n return undefined;\n }\n const directionalDelta = getDisplacement(direction, deltaX, deltaY);\n if (directionalDelta <= 0) {\n clearSwipeRelease();\n return false;\n }\n if (getDisplacement(direction, velocityX, velocityY) >= FAST_SWIPE_VELOCITY) {\n startSwipeRelease(direction);\n return true;\n }\n const shouldClose = directionalDelta > getBaseSwipeThreshold(releasePopupElement, direction);\n if (shouldClose) {\n startSwipeRelease(direction);\n } else {\n clearSwipeRelease();\n }\n return shouldClose;\n }\n if (swipeDirection !== 'down' && swipeDirection !== 'up') {\n clearSwipeRelease();\n return undefined;\n }\n if (!popupHeight) {\n clearSwipeRelease();\n return false;\n }\n if (resolvedSnapPoints.length === 0) {\n clearSwipeRelease();\n return undefined;\n }\n const dragDelta = swipeDirection === 'down' ? deltaY : -deltaY;\n const dragDirection = Math.sign(dragDelta);\n const releaseDirectionalVelocity = swipeDirection === 'down' ? releaseVelocityY : -releaseVelocityY;\n const fallbackDirectionalVelocity = swipeDirection === 'down' ? velocityY : -velocityY;\n let resolvedDirectionalVelocity = releaseDirectionalVelocity;\n if (dragDirection !== 0 && Math.abs(dragDelta) >= MIN_SWIPE_THRESHOLD) {\n const velocityDirection = Math.sign(resolvedDirectionalVelocity);\n if (velocityDirection !== 0 && velocityDirection !== dragDirection) {\n // Ignore touch reversals that would otherwise flip the snap decision.\n resolvedDirectionalVelocity = fallbackDirectionalVelocity;\n }\n }\n const currentOffset = activeSnapPointOffset ?? 0;\n const dragTargetOffset = clamp(currentOffset + dragDelta, 0, popupHeight);\n const velocityOffset = Math.abs(resolvedDirectionalVelocity) >= SNAP_VELOCITY_THRESHOLD ? clamp(resolvedDirectionalVelocity, -MAX_SNAP_VELOCITY, MAX_SNAP_VELOCITY) * SNAP_VELOCITY_MULTIPLIER : 0;\n const targetOffset = snapToSequentialPoints ? dragTargetOffset : clamp(dragTargetOffset + velocityOffset, 0, popupHeight);\n const snapPointEventDetails = createChangeEventDetails(REASONS.swipe, event);\n const settleInPlace = () => {\n // Reset nested swipe state now: the hook's trailing progress update is deduped\n // when the drag never produced dismissal progress, so it may not fire.\n applySwipeProgress(0, true, true);\n clearSwipeRelease();\n return false;\n };\n const settleOnSnapPoint = snapPoint => {\n setActiveSnapPoint(snapPoint.value, snapPointEventDetails);\n return settleInPlace();\n };\n const closeFromSnapPoints = fallbackSnapPoint => {\n // An unattributed gesture (e.g. a mostly horizontal flick) may settle on a snap\n // point but must not dismiss: `useSwipeDismiss` drops a directionless dismissal,\n // stranding the popup visually closed while `open` stays `true`.\n if (!direction) {\n return settleOnSnapPoint(fallbackSnapPoint);\n }\n setActiveSnapPoint(null, snapPointEventDetails);\n if (snapPointEventDetails.isCanceled) {\n // A canceled null snap point rejects dismissal before exit styles start.\n return settleInPlace();\n }\n pendingSwipeCloseSnapPointRef.current = activeSnapPoint;\n startSwipeRelease(swipeDirection);\n return true;\n };\n if (snapToSequentialPoints) {\n const orderedSnapPoints = [...resolvedSnapPoints].sort((first, second) => first.offset - second.offset);\n const orderedOffsets = orderedSnapPoints.map(point => point.offset);\n const currentIndex = closestSnapPointIndex(orderedOffsets, currentOffset);\n let targetSnapPoint = orderedSnapPoints[closestSnapPointIndex(orderedOffsets, targetOffset)];\n const velocityDirection = Math.sign(resolvedDirectionalVelocity);\n const shouldAdvance = dragDirection !== 0 && velocityDirection !== 0 && velocityDirection === dragDirection && Math.abs(resolvedDirectionalVelocity) >= SNAP_VELOCITY_THRESHOLD;\n let effectiveTargetOffset = targetOffset;\n if (shouldAdvance) {\n const adjacentIndex = clamp(currentIndex + dragDirection, 0, orderedSnapPoints.length - 1);\n if (adjacentIndex !== currentIndex) {\n const adjacentPoint = orderedSnapPoints[adjacentIndex];\n const shouldForceAdjacent = dragDirection > 0 ? targetOffset < adjacentPoint.offset : targetOffset > adjacentPoint.offset;\n if (shouldForceAdjacent) {\n targetSnapPoint = adjacentPoint;\n effectiveTargetOffset = adjacentPoint.offset;\n }\n } else if (dragDirection > 0) {\n return closeFromSnapPoints(targetSnapPoint);\n }\n }\n const closeDistance = Math.abs(effectiveTargetOffset - popupHeight);\n const snapDistance = Math.abs(effectiveTargetOffset - targetSnapPoint.offset);\n if (closeDistance < snapDistance) {\n return closeFromSnapPoints(targetSnapPoint);\n }\n return settleOnSnapPoint(targetSnapPoint);\n }\n const closestSnapPoint = resolvedSnapPoints[closestSnapPointIndex(resolvedSnapPoints.map(point => point.offset), targetOffset)];\n if (resolvedDirectionalVelocity >= FAST_SWIPE_VELOCITY && dragDelta > 0) {\n return closeFromSnapPoints(closestSnapPoint);\n }\n const closeDistance = Math.abs(targetOffset - popupHeight);\n if (closeDistance < Math.abs(targetOffset - closestSnapPoint.offset)) {\n return closeFromSnapPoints(closestSnapPoint);\n }\n return settleOnSnapPoint(closestSnapPoint);\n },\n onDismiss(event) {\n visualStateStore?.set({\n swipeProgress: 0,\n frontmostHeight: 0\n });\n const backdropElement = store.context.backdropRef.current;\n if (backdropElement) {\n backdropElement.style.setProperty(DrawerBackdropCssVars.swipeProgress, '0');\n backdropElement.style.removeProperty(DrawerPopupCssVars.height);\n }\n const dismissEventDetails = createChangeEventDetails(REASONS.swipe, event);\n store.setOpen(false, dismissEventDetails);\n if (dismissEventDetails.isCanceled) {\n const pendingSnapPoint = pendingSwipeCloseSnapPointRef.current;\n if (pendingSnapPoint !== undefined) {\n setActiveSnapPoint(pendingSnapPoint, createChangeEventDetails(REASONS.swipe, event));\n }\n pendingSwipeCloseSnapPointRef.current = undefined;\n resetSwipeRef.current?.();\n clearSwipeRelease();\n return;\n }\n\n // In controlled mode, the effective open state may not have changed yet\n // (openProp takes precedence over state.open). Proceed optimistically with the\n // dismiss animation — React's Scheduler flushes before the next rAF, so we can\n // reliably check whether the parent accepted or rejected the close.\n // Note: if onOpenChange is asynchronous (e.g., closes the drawer after a network\n // call), the rAF check will see open === true, revert the animation, and the\n // drawer will close without animation when the parent eventually sets open={false}.\n if (store.select('open')) {\n const savedEvent = event;\n controlledDismissFrame.request(() => {\n if (store.select('open')) {\n // Parent rejected: revert animation and restore snap point.\n const pendingSnapPoint = pendingSwipeCloseSnapPointRef.current;\n if (pendingSnapPoint !== undefined) {\n setActiveSnapPoint(pendingSnapPoint, createChangeEventDetails(REASONS.swipe, savedEvent));\n }\n pendingSwipeCloseSnapPointRef.current = undefined;\n clearSwipeRelease();\n resetSwipeRef.current?.();\n } else {\n // Parent accepted: clean up the ref.\n pendingSwipeCloseSnapPointRef.current = undefined;\n }\n });\n return;\n }\n pendingSwipeCloseSnapPointRef.current = undefined;\n setSwipeDismissed(true);\n }\n });\n const swipePointerProps = swipe.getPointerProps();\n const swipeTouchProps = swipe.getTouchProps();\n const {\n moveNative: moveSwipeNative,\n reset: resetSwipe\n } = swipe;\n resetSwipeRef.current = resetSwipe;\n React.useEffect(() => {\n const rootElement = viewportElement ?? popupElementState;\n // A non-passive document listener makes all touch scrolling wait on the main thread.\n if (!rootElement || !open || !mounted) {\n return undefined;\n }\n const resolvedRootElement = rootElement;\n const doc = ownerDocument(resolvedRootElement);\n function processTouchMove(event, touchState, touch) {\n const drawerAxisDelta = isVerticalScrollAxis ? touch.clientY - touchState.lastY : touch.clientX - touchState.lastX;\n\n // Avoid blocking pinch zoom or text selection adjustments on iOS Safari.\n if (event.touches.length === 2) {\n return;\n }\n const allowTouchMove = shouldIgnoreSwipeForTextSelection(doc, resolvedRootElement);\n if (allowTouchMove || nestedDrawerOpen) {\n return;\n }\n if (shouldYieldTouchMove(touchState, event, touch, isVerticalScrollAxis)) {\n return;\n }\n const scrollTarget = touchState.scrollTarget;\n if (!scrollTarget || scrollTarget === doc.documentElement || scrollTarget === doc.body) {\n if (event.cancelable) {\n event.preventDefault();\n }\n // Claim the gesture before React's delegated touch handlers see it; dispatching the\n // move through React re-rasterizes the popup content on every frame.\n event.stopPropagation();\n moveSwipeNative(event, resolvedRootElement);\n return;\n }\n if (!hasScrollableContentOnAxis(scrollTarget, scrollAxis)) {\n // If the scroll container doesn't overflow on the drawer axis, prevent the window from\n // scrolling instead.\n if (event.cancelable) {\n event.preventDefault();\n }\n event.stopPropagation();\n return;\n }\n if (drawerAxisDelta !== 0) {\n const canSwipeFromScrollEdge = canSwipeFromScrollEdgeOnMove(scrollTarget, scrollAxis, swipeDirection, drawerAxisDelta);\n if (!touchState.allowSwipe) {\n if (event.cancelable && canSwipeFromScrollEdge) {\n touchState.allowSwipe = true;\n event.preventDefault();\n } else {\n touchState.allowSwipe = false;\n }\n } else if (event.cancelable) {\n event.preventDefault();\n }\n }\n if (touchState.allowSwipe === true) {\n event.stopPropagation();\n moveSwipeNative(event, resolvedRootElement);\n }\n }\n function handleNativeTouchMove(event) {\n // The virtual keyboard provider observes the move to tell a tap apart from a drag.\n // It must run even when the swipe gesture below claims the event with\n // `stopPropagation()`, which would otherwise prevent React's delegated handlers\n // (and the provider) from ever seeing the move.\n virtualKeyboard?.onTouchMove(event);\n if (ignoreTouchSwipeRef.current) {\n return;\n }\n const touchState = touchScrollStateRef.current;\n const touch = event.touches[0];\n if (!touch || !touchState) {\n return;\n }\n processTouchMove(event, touchState, touch);\n updateTouchScrollPosition(touchState, touch);\n }\n return addEventListener(doc, 'touchmove', handleNativeTouchMove, {\n passive: false,\n capture: true\n });\n }, [mounted, nestedDrawerOpen, open, popupElementState, isVerticalScrollAxis, scrollAxis, swipeDirection, moveSwipeNative, viewportElement, virtualKeyboard]);\n useIsoLayoutEffect(() => {\n if (!snapPointRange || swipe.swiping) {\n return;\n }\n applySwipeProgress(!open || nested ? 0 : snapPointProgress ?? 0, true, false);\n }, [applySwipeProgress, frontmostHeight, nested, notifyParentSwipeProgressChange, open, snapPointProgress, snapPointRange, swipe.swiping, store, visualStateStore]);\n useIsoLayoutEffect(() => {\n if (!notifyParentSwipeProgressChange) {\n return undefined;\n }\n if (!open) {\n notifyParentSwipeProgressChange(0);\n }\n return () => {\n notifyParentSwipeProgressChange(0);\n };\n }, [notifyParentSwipeProgressChange, open]);\n useIsoLayoutEffect(() => {\n if (open) {\n // Skip `resetSwipe` while `Drawer.SwipeArea` is driving the open: it zeroes the popup's\n // `--swipe-movement-*` (via `syncDragStyles(false)`), flashing it fully open for a frame.\n // `clearSwipeRelease` doesn't touch those vars, so always run it to clear any leftover\n // release state from a prior dismiss (e.g. when the popup is kept mounted).\n if (!swipeAreaActiveRef.current) {\n resetSwipe();\n }\n clearSwipeRelease();\n }\n }, [clearSwipeRelease, open, resetSwipe, swipeAreaActiveRef]);\n useIsoLayoutEffect(() => {\n const backdropElement = backdropRef.current;\n return () => {\n visualStateStore?.set({\n swipeProgress: 0,\n frontmostHeight: 0\n });\n setBackdropSwipingAttribute(backdropElement, false);\n // `data-swiping` is set on whichever backdrop is current when a swipe starts, which can\n // differ from the captured element if the backdrop mounted late or changed identity.\n // Reading the live ref here is intentional so the current backdrop is cleared too.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const currentBackdrop = backdropRef.current;\n if (currentBackdrop !== backdropElement) {\n setBackdropSwipingAttribute(currentBackdrop, false);\n }\n finishNestedSwipe();\n };\n }, [backdropRef, finishNestedSwipe, visualStateStore]);\n const swipeProviderValue = React.useMemo(() => ({\n swiping: swipe.swiping,\n getDragStyles: swipe.getDragStyles,\n swipeStrength: swipeRelease ?? null,\n setSwipeDismissed\n }), [setSwipeDismissed, swipe.getDragStyles, swipe.swiping, swipeRelease]);\n function resetTouchSwipeState(ignoreSwipe) {\n ignoreTouchSwipeRef.current = ignoreSwipe;\n touchScrollStateRef.current = null;\n }\n function resetTouchTrackingState() {\n resetTouchSwipeState(false);\n lastPointerTypeRef.current = '';\n ignoreNextTouchStartFromPenRef.current = false;\n }\n function handlePointerEnd(event) {\n lastPointerTypeRef.current = '';\n return event.pointerType !== 'touch';\n }\n return /*#__PURE__*/_jsx(DialogViewport, {\n ref: forwardedRef,\n className: className,\n style: style,\n render: render,\n ...mergeProps(elementProps, {\n onPointerDown(event) {\n lastPointerTypeRef.current = event.pointerType;\n ignoreNextTouchStartFromPenRef.current = event.pointerType === 'pen';\n if (!open || !mounted || nestedDrawerOpen) {\n return;\n }\n const elementAtPoint = getElementAtPoint(event.currentTarget.getRootNode(), event.clientX, event.clientY);\n // Pointer drags capture the pointer on press, so they can't wait to see which axis the\n // gesture takes; any `data-base-ui-swipe-ignore` value ignores them.\n if (isSwipeIgnoredTarget(elementAtPoint) || isDrawerContentTarget(elementAtPoint)) {\n return;\n }\n if (event.pointerType === 'touch') {\n return;\n }\n swipePointerProps.onPointerDown?.(event);\n },\n onPointerMove(event) {\n if (event.pointerType === 'touch') {\n return;\n }\n swipePointerProps.onPointerMove?.(event);\n },\n onPointerUp(event) {\n if (handlePointerEnd(event)) {\n swipePointerProps.onPointerUp?.(event);\n }\n },\n onPointerCancel(event) {\n if (handlePointerEnd(event)) {\n swipePointerProps.onPointerCancel?.(event);\n }\n },\n onTouchStart(event) {\n const startedFromPenPointerDown = lastPointerTypeRef.current === 'pen' && ignoreNextTouchStartFromPenRef.current;\n if (startedFromPenPointerDown) {\n ignoreNextTouchStartFromPenRef.current = false;\n resetTouchSwipeState(false);\n return;\n }\n if (!open || !mounted || nestedDrawerOpen) {\n resetTouchSwipeState(false);\n return;\n }\n const touch = event.touches[0];\n if (!touch) {\n return;\n }\n if (isReactTouchEventOnRangeInput(event)) {\n resetTouchSwipeState(false);\n return;\n }\n const rootElement = event.currentTarget;\n const elementAtPoint = getElementAtPoint(rootElement.getRootNode(), touch.clientX, touch.clientY);\n const eventTarget = getTarget(event.nativeEvent);\n const target = isElement(eventTarget) ? eventTarget : rootElement;\n if (!contains(rootElement, target)) {\n resetTouchSwipeState(true);\n return;\n }\n virtualKeyboard?.onTouchStart(event);\n\n // `x`/`y` hand touch drags along that axis to the element. Any value other than the\n // cross-axis one ignores the swipe outright; a cross-axis element is arbitrated like a\n // native cross-axis scroller below.\n if (closest(elementAtPoint, `${BASE_UI_SWIPE_IGNORE_SELECTOR}:not(${AXIS_SWIPE_IGNORE_SELECTORS[crossScrollAxis]})`)) {\n resetTouchSwipeState(true);\n return;\n }\n ignoreTouchSwipeRef.current = false;\n const scrollTarget = findScrollableTouchTarget(target, rootElement, scrollAxis);\n const hasCrossAxisGestureTarget = findScrollableTouchTarget(target, rootElement, crossScrollAxis) != null || closest(elementAtPoint, AXIS_SWIPE_IGNORE_SELECTORS[crossScrollAxis]) != null;\n let allowSwipe = null;\n if (scrollTarget) {\n const canSwipeFromEdge = isAtSwipeStartEdge(scrollTarget, scrollAxis, swipeDirection);\n allowSwipe = canSwipeFromEdge ? null : false;\n }\n touchScrollStateRef.current = {\n startX: touch.clientX,\n startY: touch.clientY,\n lastX: touch.clientX,\n lastY: touch.clientY,\n startedInPopup: contains(popupRef.current, elementAtPoint),\n scrollTarget,\n hasCrossAxisGestureTarget,\n allowSwipe,\n preserveNativeCrossAxisScroll: false,\n drawerAxisAttributed: false\n };\n swipeTouchProps.onTouchStart?.(event);\n },\n onTouchEnd(event) {\n virtualKeyboard?.onTouchEnd(event);\n resetTouchTrackingState();\n swipeTouchProps.onTouchEnd?.(event);\n },\n onTouchCancel(event) {\n virtualKeyboard?.onTouchCancel();\n resetTouchTrackingState();\n swipeTouchProps.onTouchCancel?.(event);\n },\n // Drawer popups use drawer-specific nested state attributes.\n // Suppress DialogViewport's generic nested dialog attribute.\n [DialogViewportDataAttributes.nestedDialogOpen]: undefined\n }),\n children: /*#__PURE__*/_jsx(DrawerViewportContext.Provider, {\n value: swipeProviderValue,\n children: children\n })\n });\n});\nif (process.env.NODE_ENV !== \"production\") DrawerViewport.displayName = \"DrawerViewport\";\nfunction setBackdropSwipingAttribute(backdropElement, swiping) {\n backdropElement?.toggleAttribute(DrawerPopupDataAttributes.swiping, swiping);\n}\nfunction isSwipeIgnoredTarget(target) {\n return Boolean(closest(target, BASE_UI_SWIPE_IGNORE_SELECTOR));\n}\nfunction isDrawerContentTarget(target) {\n return Boolean(closest(target, DRAWER_CONTENT_SELECTOR));\n}\nfunction getBaseSwipeSize(element, direction) {\n return direction === 'left' || direction === 'right' ? element.offsetWidth : element.offsetHeight;\n}\nfunction getBaseSwipeThreshold(element, direction) {\n return Math.max(getBaseSwipeSize(element, direction) * 0.5, MIN_SWIPE_THRESHOLD);\n}\nfunction isRangeInput(target, win) {\n return target instanceof win.HTMLInputElement && target.type === 'range';\n}\nfunction isTextSelectionControl(target) {\n return target.tagName === 'INPUT' || target.tagName === 'TEXTAREA';\n}\nfunction hasExpandedSelectionWithinTarget(selection, target) {\n const anchorElement = isElement(selection.anchorNode) ? selection.anchorNode : selection.anchorNode?.parentElement;\n const focusElement = isElement(selection.focusNode) ? selection.focusNode : selection.focusNode?.parentElement;\n return selection.containsNode(target, true) || contains(target, anchorElement) || contains(target, focusElement);\n}\nfunction shouldIgnoreSwipeForTextSelection(doc, rootElement) {\n const activeEl = activeElement(doc);\n if (activeEl && contains(rootElement, activeEl) && isTextSelectionControl(activeEl)) {\n const {\n selectionStart,\n selectionEnd\n } = activeEl;\n if (selectionStart != null && selectionEnd != null && selectionStart < selectionEnd) {\n return true;\n }\n }\n const selection = doc.getSelection?.();\n if (!selection || selection.isCollapsed) {\n return false;\n }\n return hasExpandedSelectionWithinTarget(selection, rootElement);\n}\nfunction isEventOnRangeInput(event, win) {\n return event.composedPath().some(pathTarget => isRangeInput(pathTarget, win));\n}\nfunction isReactTouchEventOnRangeInput(event) {\n return isEventOnRangeInput(event.nativeEvent, ownerWindow(event.currentTarget));\n}\nfunction updateTouchScrollPosition(touchState, touch) {\n touchState.lastX = touch.clientX;\n touchState.lastY = touch.clientY;\n}\n\n/**\n * Arbitrates a touchmove between the drawer swipe and a cross-axis gesture: a native scroll, or an\n * element marked with the cross-axis `data-base-ui-swipe-ignore` value.\n * Returns `true` when the move must be left alone — either because the cross axis already won the\n * gesture, or because neither axis has passed the slop yet and the gesture cannot be attributed.\n */\nfunction shouldYieldTouchMove(touchState, event, touch, isVerticalScrollAxis) {\n if (touchState.preserveNativeCrossAxisScroll) {\n return true;\n }\n\n // Attribution happens once per gesture. Re-arbitrating after the drawer axis has won would let\n // the pre-attribution branches below fire mid-drag (the slop is measured from the touch origin,\n // which is never re-baselined), freezing the popup and dropping `preventDefault()`.\n if (touchState.drawerAxisAttributed || touchState.allowSwipe === true || !touchState.hasCrossAxisGestureTarget) {\n return false;\n }\n\n // A non-cancelable touchmove means the browser has already committed the gesture to a native\n // scroll; claiming it for the swipe would drag the popup alongside the scrolling content.\n if (!event.cancelable) {\n touchState.preserveNativeCrossAxisScroll = true;\n return true;\n }\n const drawerAxisGestureDelta = isVerticalScrollAxis ? touch.clientY - touchState.startY : touch.clientX - touchState.startX;\n const crossAxisGestureDelta = isVerticalScrollAxis ? touch.clientX - touchState.startX : touch.clientY - touchState.startY;\n const absDrawerAxisGestureDelta = Math.abs(drawerAxisGestureDelta);\n const absCrossAxisGestureDelta = Math.abs(crossAxisGestureDelta);\n if (absCrossAxisGestureDelta >= AXIS_LOCK_SLOP && absCrossAxisGestureDelta > absDrawerAxisGestureDelta + AXIS_LOCK_BIAS) {\n touchState.preserveNativeCrossAxisScroll = true;\n return true;\n }\n if (absDrawerAxisGestureDelta >= AXIS_LOCK_SLOP) {\n touchState.drawerAxisAttributed = true;\n return false;\n }\n\n // Neither axis has traveled past the slop yet, so the gesture cannot be attributed. Leave the\n // event alone: on iOS, `preventDefault()` on the first cancelable touchmove cancels native\n // scrolling for the entire gesture, which would lock a cross-axis scroll that only passes the\n // slop on a later move.\n return true;\n}\nfunction hasScrollableContentOnAxis(scrollTarget, axis) {\n return getScrollMetrics(scrollTarget, axis).max > 0;\n}\nfunction getScrollMetrics(scrollTarget, axis) {\n if (axis === 'vertical') {\n const max = Math.max(0, scrollTarget.scrollHeight - scrollTarget.clientHeight);\n return {\n offset: scrollTarget.scrollTop,\n max\n };\n }\n const max = Math.max(0, scrollTarget.scrollWidth - scrollTarget.clientWidth);\n return {\n offset: scrollTarget.scrollLeft,\n max\n };\n}\nfunction isAtSwipeStartEdge(scrollTarget, axis, direction) {\n const dismissFromStartEdge = shouldDismissFromStartEdge(direction, axis);\n const {\n offset,\n max\n } = getScrollMetrics(scrollTarget, axis);\n return dismissFromStartEdge ? offset <= 0 : offset >= max;\n}\nfunction canSwipeFromScrollEdgeOnMove(scrollTarget, axis, direction, delta) {\n const dismissFromStartEdge = shouldDismissFromStartEdge(direction, axis);\n const movingTowardDismiss = dismissFromStartEdge ? delta > 0 : delta < 0;\n if (!movingTowardDismiss) {\n return false;\n }\n return isAtSwipeStartEdge(scrollTarget, axis, direction);\n}\nfunction shouldDismissFromStartEdge(direction, axis) {\n return axis === 'vertical' ? direction === 'down' : direction === 'right';\n}","'use client';\n\nimport * as React from 'react';\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { useDialogRootContext } from \"../root/DialogRootContext.mjs\";\nimport { useDialogPortalContext } from \"../portal/DialogPortalContext.mjs\";\nimport { dialogStateAttributesMapping } from \"../utils/stateAttributesMapping.mjs\";\n\n/**\n * A positioning container for the dialog popup that can be made scrollable.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Dialog](https://base-ui.com/react/components/dialog)\n */\nexport const DialogViewport = /*#__PURE__*/React.forwardRef(function DialogViewport(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n children,\n ...elementProps\n } = componentProps;\n const keepMounted = useDialogPortalContext();\n const store = useDialogRootContext();\n const open = store.useState('open');\n const nested = store.useState('nested');\n const transitionStatus = store.useState('transitionStatus');\n const nestedOpenDialogCount = store.useState('nestedOpenDialogCount');\n const mounted = store.useState('mounted');\n const setViewportElement = store.useStateSetter('viewportElement');\n const nestedDialogOpen = nestedOpenDialogCount > 0;\n const state = {\n open,\n nested,\n transitionStatus,\n nestedDialogOpen\n };\n const shouldRender = keepMounted || mounted;\n return useRenderElement('div', componentProps, {\n enabled: shouldRender,\n state,\n ref: [forwardedRef, setViewportElement],\n stateAttributesMapping: dialogStateAttributesMapping,\n props: [{\n role: 'presentation',\n hidden: !mounted,\n style: {\n pointerEvents: !open ? 'none' : undefined\n },\n children\n }, elementProps]\n });\n});\nif (process.env.NODE_ENV !== \"production\") DialogViewport.displayName = \"DialogViewport\";","import { CommonPopupDataAttributes } from \"../../utils/popupStateMapping.mjs\";\n\n/**\n * Present when the dialog is open.\n */\nexport const open = CommonPopupDataAttributes.open;\n/**\n * Present when the dialog is closed.\n */\nexport const closed = CommonPopupDataAttributes.closed;\n/**\n * Present when the dialog begins animating in.\n */\nexport const startingStyle = CommonPopupDataAttributes.startingStyle;\n/**\n * Present when the dialog is animating out.\n */\nexport const endingStyle = CommonPopupDataAttributes.endingStyle;\n/**\n * Present when the dialog is nested within another dialog.\n */\nexport const nested = 'data-nested';\n/**\n * Present when the dialog has other open dialogs nested within it.\n */\nexport const nestedDialogOpen = 'data-nested-dialog-open';","'use client';\n\nimport * as React from 'react';\nexport const DrawerVirtualKeyboardContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") DrawerVirtualKeyboardContext.displayName = \"DrawerVirtualKeyboardContext\";\nexport function useDrawerVirtualKeyboardContext() {\n return React.useContext(DrawerVirtualKeyboardContext);\n}","'use client';\n\nimport { Drawer } from '@base-ui/react/drawer';\nimport { Toast } from '@base-ui/react/toast';\nimport { useRouter } from 'next/navigation';\nimport { useState, useTransition } from 'react';\n\nimport { BUTTONS, INPUT } from '../../../forms/ui/look';\nimport { Switch } from '../../../forms/ui/switch';\nimport { ActionButton } from '../../../bridge/ui/action-button';\nimport { StatusBadge, Tag } from '../../../outside-parties/ui/status-badge';\nimport { setPartyScopes, switchPartyTools, type TableOutcome } from '../../actions';\nimport { switchedMessageOf } from '../../switched-message';\nimport { hintSuggestionsOf, suggestedScopesOf } from '../hint-suggestions';\nimport { changedScopesOf, SCOPE_CHANGES, type ScopeChange } from '../scope-change';\nimport { partyScopesSetMessage, scopesSetMessage, statedMessage, suggestionsSetMessage, toolsSwitchedMessage } from '../table-messages';\nimport { keptToolsOf, shownTools, STATE_FILTERS, type KeptChanges, type StateFilter, type TableTool } from '../table-tools';\nimport { NeedsChips, type ListedScope } from './needs-chips';\nimport { ScopePicker } from './scope-picker';\nimport { standingRefusal, TableDialog, type DialogRefusal } from './table-dialog';\nimport { TableToasts } from './table-toasts';\n\n/** What the table shows of one outside MCP server, as its page read it. */\nexport interface ToolsTableProps {\n fleetId: string;\n party: string;\n tools: readonly TableTool[];\n /** The requirements' version the page read, which every change is made on. */\n version: number;\n partyScopes: readonly string[];\n /** The scopes the fleet lists, for an approver; none for anyone else. */\n listed: readonly ListedScope[] | null;\n /** Whether the actor approves the party: gateway:approve within manage reach. Others see the table read-only. */\n canChange: boolean;\n /** Why the server's tools could not be read: the table then shows the requirements kept per tool name. */\n serverRefusal: string | null;\n}\n\ntype OpenDialog = 'scopes' | 'party' | 'suggest' | null;\n\nconst ALL_SELECTED = 'Select all shown';\n\nfunction firstLineOf(description: string | undefined): string {\n return description?.split('\\n').find((line) => line.trim() !== '')?.trim() ?? '';\n}\n\n/**\n * An outside MCP server's tools as a table (gateway scopes 4.3, A6): filter\n * by name and state, select many, and set the scopes they need or switch them\n * in one change; set what every tool needs; or suggest scopes from the\n * server's hints. Each change is one transaction on the requirements' version\n * the page read: on success the dialog closes, the changed rows highlight and\n * a Toast says what was kept; a refusal stays inline. Only an approver within\n * manage reach sees the controls; anyone else, the same table read-only.\n */\nexport function ToolsTable(props: ToolsTableProps) {\n return (\n <Toast.Provider>\n <TableBody {...props} />\n <TableToasts />\n </Toast.Provider>\n );\n}\n\n/** What was kept since the page read the rows it was kept on; a fresh read replaces it. */\ninterface Kept extends KeptChanges {\n basis: readonly TableTool[];\n party: readonly string[] | null;\n}\n\nfunction TableBody({ fleetId, party, tools: readTools, version, partyScopes: readPartyScopes, listed, canChange, serverRefusal }: ToolsTableProps) {\n const router = useRouter();\n const toasts = Toast.useToastManager();\n const [, startTransition] = useTransition();\n const [isReloading, startReload] = useTransition();\n const [nameFilter, setNameFilter] = useState('');\n const [stateFilter, setStateFilter] = useState<StateFilter>('all');\n const [selected, setSelected] = useState<ReadonlySet<string>>(new Set());\n const [dialog, setDialog] = useState<OpenDialog>(null);\n const [picked, setPicked] = useState<string[]>([]);\n const [how, setHow] = useState<ScopeChange>('add');\n const [suggestPicks, setSuggestPicks] = useState<{ readOnly: string[]; other: string[] }>({ readOnly: [], other: [] });\n const [isSaving, setIsSaving] = useState(false);\n const [refusal, setRefusal] = useState<DialogRefusal | null>(null);\n const [switching, setSwitching] = useState<string | null>(null);\n const [switchRefusal, setSwitchRefusal] = useState<string | null>(null);\n const [highlighted, setHighlighted] = useState<{ names: ReadonlySet<string>; round: number }>({ names: new Set(), round: 0 });\n const [keptVersion, setKeptVersion] = useState<number | null>(null);\n const [isSheetOpen, setIsSheetOpen] = useState(false);\n const [keptChanges, setKeptChanges] = useState<Kept | null>(null);\n\n // A change kept here shows at once; once the page read itself again, its rows are the truth.\n const live = keptChanges?.basis === readTools ? keptChanges : null;\n const tools = live === null ? readTools : keptToolsOf(readTools, live);\n const partyScopes = live?.party ?? readPartyScopes;\n\n // A change kept here moves the version on before the page reads itself again.\n const currentVersion = Math.max(version, keptVersion ?? 0);\n const listedNames = listed === null ? null : new Set(listed.map(({ scope }) => scope));\n const shown = shownTools(tools, { name: nameFilter, state: stateFilter, partyScopes });\n const selectedTools = tools.filter(({ name }) => selected.has(name));\n const isServerAnswering = serverRefusal === null;\n const isEveryShownSelected = shown.length > 0 && shown.every(({ name }) => selected.has(name));\n const suggestions = hintSuggestionsOf(tools);\n const suggested = suggestedScopesOf(suggestions, suggestPicks);\n\n const kept = ({ outcome, changed, message, change }: { outcome: Extract<TableOutcome, { isOk: true }>; changed: readonly string[]; message: string; change: { party?: readonly string[]; scopes?: readonly { tool: string; scopes: readonly string[] }[]; switches?: ReadonlyMap<string, boolean> } }) => {\n setKeptChanges({\n basis: readTools,\n party: change.party ?? live?.party ?? null,\n scopes: new Map([...(live?.scopes ?? []), ...(change.scopes ?? []).map(({ tool, scopes }) => [tool, scopes] as const)]),\n switches: new Map([...(live?.switches ?? []), ...(change.switches ?? [])]),\n });\n if (outcome.version !== null) {\n setKeptVersion(outcome.version);\n }\n setHighlighted((previous) => ({ names: new Set(changed), round: previous.round + 1 }));\n toasts.add({ title: statedMessage(message, outcome.statementRefusal) });\n router.refresh();\n };\n\n const openDialog = (opened: Exclude<OpenDialog, null>) => {\n setRefusal(null);\n setIsSheetOpen(false);\n setPicked(opened === 'party' ? [...partyScopes] : []);\n setHow('add');\n setSuggestPicks({ readOnly: [], other: [] });\n setDialog(opened);\n };\n\n const closeDialog = () => {\n setDialog(null);\n setRefusal(null);\n };\n\n const save = ({ change, changed, message }: { change: { party?: string[]; tools: { tool: string; scopes: string[] }[] }; changed: readonly string[]; message: string }) => {\n setIsSaving(true);\n setRefusal(null);\n const madeOn = currentVersion;\n startTransition(async () => {\n const outcome = await setPartyScopes({ fleetId, name: party, version: madeOn, ...change });\n setIsSaving(false);\n if (!outcome.isOk) {\n setRefusal({ message: outcome.message, isConflict: outcome.isConflict, version: madeOn });\n return;\n }\n setDialog(null);\n setSelected(new Set());\n kept({ outcome, changed, message, change: { ...(change.party === undefined ? {} : { party: change.party }), scopes: change.tools } });\n });\n };\n\n const switchTools = ({ names, isOn, working }: { names: readonly string[]; isOn: boolean; working: string }) => {\n setSwitching(working);\n setSwitchRefusal(null);\n setIsSheetOpen(false);\n startTransition(async () => {\n const outcome = await switchPartyTools({ fleetId, name: party, tools: [...names], isOn });\n setSwitching(null);\n if (!outcome.isOk) {\n setSwitchRefusal(outcome.message);\n return;\n }\n const [only] = names;\n kept({ outcome, changed: names, change: { switches: new Map(names.map((name) => [name, isOn])) }, message: names.length === 1 && only !== undefined ? switchedMessageOf({ tool: only, isOn, statementRefusal: null }) : toolsSwitchedMessage({ count: names.length, isOn, statementRefusal: null }) });\n });\n };\n\n const reload = () => {\n startReload(() => {\n router.refresh();\n });\n };\n\n const toggle = (name: string) => {\n setSelected((previous) => {\n const next = new Set(previous);\n if (next.has(name)) {\n next.delete(name);\n } else {\n next.add(name);\n }\n return next;\n });\n };\n\n const toggleShown = () => {\n setSelected((previous) => {\n const next = new Set(previous);\n for (const { name } of shown) {\n if (isEveryShownSelected) {\n next.delete(name);\n } else {\n next.add(name);\n }\n }\n return next;\n });\n };\n\n const isBusy = switching !== null || isSaving;\n const toolbar = (\n <div className=\"grid gap-3 sm:flex sm:flex-wrap sm:items-center\" data-testid=\"tools-table-toolbar\">\n <label className=\"grid gap-1 sm:w-56\">\n <span className=\"sr-only\">Filter by name</span>\n <input className={INPUT} type=\"search\" placeholder=\"Filter by name\" value={nameFilter} onChange={(event) => { setNameFilter(event.target.value); }} data-testid=\"tools-table-name-filter\" />\n </label>\n <div role=\"group\" aria-label=\"Filter by state\" className=\"flex flex-wrap gap-1\">\n {STATE_FILTERS.map(({ state, label }) => (\n <button\n key={state}\n type=\"button\"\n aria-pressed={stateFilter === state}\n onClick={() => { setStateFilter(state); }}\n className={`h-8 rounded-md border px-3 ${stateFilter === state ? 'border-primary bg-primary text-primary-foreground' : 'border-border bg-card hover:bg-accent'}`}\n data-testid={`tools-table-state-${state}`}\n >\n {label}\n </button>\n ))}\n </div>\n {canChange ? (\n <>\n <label className=\"flex items-center gap-2\">\n <input type=\"checkbox\" checked={isEveryShownSelected} onChange={toggleShown} disabled={shown.length === 0} data-testid=\"tools-table-select-shown\" />\n {ALL_SELECTED}\n </label>\n <span className=\"text-muted-foreground\" data-testid=\"tools-table-selected\">\n {selected.size} selected\n </span>\n <div className=\"flex flex-wrap gap-2 sm:ml-auto\">\n <button type=\"button\" className={BUTTONS.secondary} disabled={selected.size === 0 || isBusy || listed === null} onClick={() => { openDialog('scopes'); }} data-testid=\"tools-table-set-scopes\">\n Set scopes…\n </button>\n <ActionButton isPending={switching === 'on'} pendingLabel=\"Switching on…\" disabled={selected.size === 0 || isBusy || !isServerAnswering} onClick={() => { switchTools({ names: [...selected], isOn: true, working: 'on' }); }} data-testid=\"tools-table-switch-on\">\n Switch on\n </ActionButton>\n <ActionButton isPending={switching === 'off'} pendingLabel=\"Switching off…\" disabled={selected.size === 0 || isBusy || !isServerAnswering} onClick={() => { switchTools({ names: [...selected], isOn: false, working: 'off' }); }} data-testid=\"tools-table-switch-off\">\n Switch off\n </ActionButton>\n <button type=\"button\" className={BUTTONS.secondary} disabled={isBusy || !isServerAnswering || listed === null} onClick={() => { openDialog('suggest'); }} data-testid=\"tools-table-suggest\">\n Suggest from hints…\n </button>\n </div>\n </>\n ) : null}\n </div>\n );\n\n return (\n <div className=\"grid gap-3\">\n <div className=\"flex flex-wrap items-center gap-2\" data-testid=\"tools-table-party-needs\">\n <span className=\"font-medium\">Every tool needs</span>\n <NeedsChips party={partyScopes} own={[]} listed={listedNames} />\n {canChange ? (\n <button type=\"button\" className=\"text-primary hover:underline disabled:opacity-60\" disabled={isBusy || listed === null} onClick={() => { openDialog('party'); }} data-testid=\"tools-table-party-change\">\n Change…\n </button>\n ) : null}\n </div>\n {serverRefusal === null ? null : (\n <p role=\"status\" className=\"rounded-md border border-tone-waiting-border bg-tone-waiting-bg px-3 py-2 text-tone-waiting-fg\" data-testid=\"tools-table-server-down\">\n The server did not answer, so this shows the scopes kept per tool name; they can still be changed. {serverRefusal}\n </p>\n )}\n <div className=\"hidden sm:block\">{toolbar}</div>\n <div className=\"sm:hidden\">\n <Drawer.Root open={isSheetOpen} onOpenChange={setIsSheetOpen}>\n <Drawer.Trigger className={BUTTONS.secondary} data-testid=\"tools-table-sheet-open\">\n Filters and actions{canChange ? ` (${String(selected.size)} selected)` : ''}\n </Drawer.Trigger>\n <Drawer.Portal>\n <Drawer.Backdrop className=\"fixed inset-0 z-40 bg-(--overlay)\" />\n <Drawer.Viewport className=\"fixed inset-0 z-50 flex items-end\">\n <Drawer.Popup className=\"w-full rounded-t-lg border border-border bg-popover p-4 text-popover-foreground shadow-lg\">\n <Drawer.Content className=\"grid gap-3\">\n <Drawer.Title className=\"text-heading font-semibold\">Filters and actions</Drawer.Title>\n {toolbar}\n <Drawer.Close className={BUTTONS.secondary}>Done</Drawer.Close>\n </Drawer.Content>\n </Drawer.Popup>\n </Drawer.Viewport>\n </Drawer.Portal>\n </Drawer.Root>\n </div>\n {switchRefusal === null ? null : (\n <p role=\"alert\" className=\"rounded-md border border-tone-attention-border bg-tone-attention-bg px-3 py-2 text-tone-attention-fg\" data-testid=\"tools-table-switch-refusal\">\n {switchRefusal}\n </p>\n )}\n <table className=\"w-full border-collapse max-sm:block\" data-testid=\"tools-table\">\n <thead className=\"max-sm:hidden\">\n <tr className=\"border-b border-border text-left text-muted-foreground\">\n {canChange ? <th className=\"w-8 py-2\"><span className=\"sr-only\">Selected</span></th> : null}\n <th className=\"py-2 font-medium\">Tool</th>\n <th className=\"py-2 font-medium\">Hints</th>\n <th className=\"py-2 font-medium\">On</th>\n <th className=\"py-2 font-medium\">Needs</th>\n </tr>\n </thead>\n <tbody className=\"max-sm:grid max-sm:gap-2\">\n {shown.map((tool) => {\n const isHighlighted = highlighted.names.has(tool.name);\n return (\n <tr\n key={isHighlighted ? `${tool.name}-${String(highlighted.round)}` : tool.name}\n className={`border-b border-border align-top last:border-b-0 max-sm:grid max-sm:grid-cols-[auto_1fr] max-sm:gap-x-2 max-sm:rounded-md max-sm:border max-sm:p-2 ${isHighlighted ? 'animate-highlight' : ''}`}\n data-testid=\"tools-table-row\"\n data-tool={tool.name}\n >\n {canChange ? (\n <td className=\"py-2 pr-2 max-sm:row-span-4\">\n <input type=\"checkbox\" aria-label={`Select ${tool.name}`} checked={selected.has(tool.name)} onChange={() => { toggle(tool.name); }} data-testid=\"tools-table-select\" />\n </td>\n ) : null}\n <td className=\"py-2 pr-3 max-sm:col-start-2\">\n <span className=\"flex flex-wrap items-center gap-2\">\n <span className=\"font-mono\">{tool.name}</span>\n {tool.isNew ? <StatusBadge tone=\"attention\" label=\"New\" /> : null}\n </span>\n {firstLineOf(tool.description) === '' ? null : <span className=\"block text-muted-foreground\">{firstLineOf(tool.description)}</span>}\n </td>\n <td className=\"py-2 pr-3 max-sm:col-start-2\">\n <span className=\"flex flex-wrap gap-1\">\n {tool.isReadOnly === true ? <Tag>Read only</Tag> : null}\n {tool.isDestructive === true ? <Tag>Destructive</Tag> : null}\n </span>\n </td>\n <td className=\"py-2 pr-3 max-sm:col-start-2\">\n {tool.isOn === null ? (\n <span className=\"text-muted-foreground\">Not known</span>\n ) : canChange ? (\n <Switch isOn={tool.isOn} label={tool.name} isPending={switching === tool.name} onClick={() => { switchTools({ names: [tool.name], isOn: tool.isOn !== true, working: tool.name }); }} testId=\"tools-table-switch\" />\n ) : (\n <Tag>{tool.isOn ? 'On' : 'Off'}</Tag>\n )}\n </td>\n <td className=\"py-2 max-sm:col-start-2\">\n <NeedsChips party={partyScopes} own={tool.scopes} listed={listedNames} />\n </td>\n </tr>\n );\n })}\n </tbody>\n </table>\n {shown.length === 0 ? (\n <p className=\"text-muted-foreground\" data-testid=\"tools-table-empty\">\n {tools.length === 0 ? (isServerAnswering ? `${party} lists no tools.` : 'No tool needs a scope of its own yet.') : 'No tool matches the filters.'}\n </p>\n ) : null}\n {listed === null ? null : (\n <>\n <TableDialog\n isOpen={dialog === 'scopes'}\n onClose={closeDialog}\n title=\"Set scopes\"\n description=\"The scopes a calling ship must hold for each selected tool, beside what every tool needs.\"\n appliesTo={`Applies to ${String(selectedTools.length)} ${selectedTools.length === 1 ? 'tool' : 'tools'}`}\n action={{\n label: 'Set scopes',\n pending: 'Setting…',\n isDisabled: picked.length === 0 && how !== 'replace',\n onPress: () => {\n save({ change: { tools: changedScopesOf(selectedTools, { scopes: picked, how }) }, changed: selectedTools.map(({ name }) => name), message: scopesSetMessage({ scopes: picked, how, count: selectedTools.length }) });\n },\n }}\n isSaving={isSaving}\n refusal={standingRefusal(refusal, currentVersion)}\n isReloading={isReloading}\n onReload={reload}\n testId=\"tools-table-scopes-dialog\"\n >\n <ScopePicker label=\"Scopes\" listed={listed} picked={picked} onPick={setPicked} isDisabled={isSaving} testId=\"tools-table-scopes-picker\" />\n <fieldset className=\"grid gap-1\">\n <legend className=\"font-medium\">On each selected tool</legend>\n {SCOPE_CHANGES.map((change) => (\n <label key={change.how} className=\"flex items-center gap-2\">\n <input type=\"radio\" name=\"how\" value={change.how} checked={how === change.how} onChange={() => { setHow(change.how); }} data-testid={`tools-table-how-${change.how}`} />\n {change.label}\n </label>\n ))}\n </fieldset>\n </TableDialog>\n <TableDialog\n isOpen={dialog === 'party'}\n onClose={closeDialog}\n title=\"Every tool needs\"\n description={`The scopes a calling ship must hold for every tool of ${party}, beside each tool's own.`}\n appliesTo={`Applies to every tool of ${party}`}\n action={{\n label: 'Save',\n pending: 'Saving…',\n isDisabled: false,\n onPress: () => {\n save({ change: { party: picked, tools: [] }, changed: tools.map(({ name }) => name), message: partyScopesSetMessage({ party, scopes: picked }) });\n },\n }}\n isSaving={isSaving}\n refusal={standingRefusal(refusal, currentVersion)}\n isReloading={isReloading}\n onReload={reload}\n testId=\"tools-table-party-dialog\"\n >\n <ScopePicker label=\"Scopes\" listed={listed} picked={picked} onPick={setPicked} isDisabled={isSaving} testId=\"tools-table-party-picker\" />\n </TableDialog>\n <TableDialog\n isOpen={dialog === 'suggest'}\n onClose={closeDialog}\n title=\"Suggest from hints\"\n description=\"Scopes for each tool with no scope of its own, by what the server says of it. Hints are the server's claim: nothing applies until you confirm.\"\n appliesTo={`Applies to ${String(suggested.length)} ${suggested.length === 1 ? 'tool' : 'tools'}`}\n action={{\n label: 'Apply',\n pending: 'Applying…',\n isDisabled: suggested.length === 0,\n onPress: () => {\n const groups = [\n { scopes: suggestPicks.readOnly, count: suggestPicks.readOnly.length === 0 ? 0 : suggestions.readOnly.length },\n { scopes: suggestPicks.other, count: suggestPicks.other.length === 0 ? 0 : suggestions.other.length },\n ].filter(({ count }) => count > 0);\n save({ change: { tools: suggested }, changed: suggested.map(({ tool }) => tool), message: suggestionsSetMessage(groups) });\n },\n }}\n isSaving={isSaving}\n refusal={standingRefusal(refusal, currentVersion)}\n isReloading={isReloading}\n onReload={reload}\n testId=\"tools-table-suggest-dialog\"\n >\n <ScopePicker label=\"Scopes for read-only tools\" listed={listed} picked={suggestPicks.readOnly} onPick={(readOnly) => { setSuggestPicks((previous) => ({ ...previous, readOnly })); }} isDisabled={isSaving} testId=\"tools-table-suggest-read-only\" />\n <ScopePicker label=\"Scopes for the other tools\" listed={listed} picked={suggestPicks.other} onPick={(other) => { setSuggestPicks((previous) => ({ ...previous, other })); }} isDisabled={isSaving} testId=\"tools-table-suggest-other\" />\n <SuggestedList title=\"Read-only tools\" names={suggestions.readOnly} testId=\"tools-table-suggest-read-only-tools\" />\n <SuggestedList title=\"Other tools\" names={suggestions.other} testId=\"tools-table-suggest-other-tools\" />\n <SuggestedList title=\"Without hints, left as they are\" names={suggestions.withoutHints} testId=\"tools-table-suggest-without-hints\" />\n </TableDialog>\n </>\n )}\n </div>\n );\n}\n\n/** One group of the tools a suggestion would change, by name. */\nfunction SuggestedList({ title, names, testId }: { title: string; names: readonly string[]; testId: string }) {\n return (\n <details className=\"rounded-md border border-border px-3 py-2\" data-testid={testId}>\n <summary className=\"cursor-pointer\">\n {title} ({names.length})\n </summary>\n {names.length === 0 ? <p className=\"text-muted-foreground\">None</p> : <p className=\"font-mono text-code break-words\">{names.join(', ')}</p>}\n </details>\n );\n}\n","/* __next_internal_action_entry_do_not_use__ [{\"404b7279706dd8abf5799bf5d9f3f1893dec57397d\":{\"name\":\"switchPartyTools\"}},\"web/features/outside-party/actions.ts\",\"\"] */\"use turbopack: no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_2=/*#__PURE__*/createServerReference(\"404b7279706dd8abf5799bf5d9f3f1893dec57397d\",callServer,void 0,findSourceMapURL,\"switchPartyTools\");export{$$RSC_SERVER_ACTION_2 as switchPartyTools};","/** What a tool's switch says once the API kept it: what the fleet sees now, or that the proxy ship shows it at its next statement, and why. */\nexport function switchedMessageOf({ tool, isOn, statementRefusal }: { tool: string; isOn: boolean; statementRefusal: string | null }): string {\n const state = `${tool} is ${isOn ? 'on' : 'off'}`;\n if (statementRefusal !== null) {\n return `${state}; the fleet sees it at the proxy ship's next statement: ${statementRefusal}`;\n }\n return isOn ? `${state}: the fleet may call it.` : `${state}: the fleet sees it no more, and a call to it is refused.`;\n}\n","/**\n * Suggest from hints (gateway scopes 4.3): the tools with no scope of their\n * own, split by what the server says of them. Hints are the server's claim,\n * never trusted on their own, so nothing applies until the approver confirms.\n */\n\ninterface HintedTool {\n name: string;\n isReadOnly?: boolean | undefined;\n isDestructive?: boolean | undefined;\n scopes: readonly string[];\n}\n\n/** The tools each picker would change, by name, and the ones without hints, left untouched. */\nexport interface HintSuggestions {\n readOnly: string[];\n other: string[];\n withoutHints: string[];\n}\n\nexport function hintSuggestionsOf(tools: readonly HintedTool[]): HintSuggestions {\n const suggestions: HintSuggestions = { readOnly: [], other: [], withoutHints: [] };\n for (const tool of tools.filter(({ scopes }) => scopes.length === 0)) {\n if (tool.isDestructive === true || tool.isReadOnly === false) {\n suggestions.other.push(tool.name);\n } else if (tool.isReadOnly === true) {\n suggestions.readOnly.push(tool.name);\n } else {\n suggestions.withoutHints.push(tool.name);\n }\n }\n return suggestions;\n}\n\n/** The change the suggestions make with the scopes picked: a group whose picker is empty changes nothing. */\nexport function suggestedScopesOf(suggestions: HintSuggestions, picked: { readOnly: readonly string[]; other: readonly string[] }): { tool: string; scopes: string[] }[] {\n const group = (tools: readonly string[], scopes: readonly string[]) => (scopes.length === 0 ? [] : tools.map((tool) => ({ tool, scopes: [...scopes] })));\n return [...group(suggestions.readOnly, picked.readOnly), ...group(suggestions.other, picked.other)];\n}\n","/** How a bulk change treats the picked scopes on each selected tool (gateway scopes 4.3). */\nexport const SCOPE_CHANGES = [\n { how: 'add', label: 'Add to each' },\n { how: 'remove', label: 'Remove from each' },\n { how: 'replace', label: 'Replace with these' },\n] as const;\n\nexport type ScopeChange = (typeof SCOPE_CHANGES)[number]['how'];\n\n/** What each selected tool needs of its own after the change, each scope once; none needs nothing beyond the party's. */\nexport function changedScopesOf(selected: readonly { name: string; scopes: readonly string[] }[], change: { scopes: readonly string[]; how: ScopeChange }): { tool: string; scopes: string[] }[] {\n return selected.map(({ name, scopes }) => {\n switch (change.how) {\n case 'add':\n return { tool: name, scopes: [...new Set([...scopes, ...change.scopes])] };\n case 'remove':\n return { tool: name, scopes: scopes.filter((scope) => !change.scopes.includes(scope)) };\n case 'replace':\n return { tool: name, scopes: [...new Set(change.scopes)] };\n }\n });\n}\n","/**\n * The rows of an outside MCP server's tools table (gateway scopes 4.3):\n * each tool the server lists now, with its switch, the hints it gives and\n * the scopes it needs of its own; and the filters an approver narrows them by.\n */\nimport type { Read } from '../../../lib/gateway-api/page-api';\n\n/** A tool as the server lists it now, with its switch, as the API answers it. */\nexport interface ListedTool {\n name: string;\n description?: string | undefined;\n isReadOnly?: boolean | undefined;\n isDestructive?: boolean | undefined;\n isOn: boolean;\n isNew: boolean;\n}\n\n/** A party's required scopes as the API answers them. */\nexport interface PartyRequirements {\n version: number;\n party: string[];\n tools: { tool: string; scopes: string[] }[];\n}\n\n/** One row: the tool, its switch (unknown while the server does not answer), and the scopes it needs of its own. */\nexport interface TableTool {\n name: string;\n description?: string | undefined;\n isReadOnly?: boolean | undefined;\n isDestructive?: boolean | undefined;\n isOn: boolean | null;\n isNew: boolean;\n scopes: readonly string[];\n}\n\n/**\n * The rows: every tool the server lists with what it needs; while the server\n * does not answer, the requirements kept per tool name, so they can still be\n * read and changed.\n */\nexport function tableToolsOf({ read, requirements }: { read: Read<{ tools: ListedTool[] }>; requirements: PartyRequirements }): TableTool[] {\n const own = new Map(requirements.tools.map(({ tool, scopes }) => [tool, scopes]));\n if (!read.isOk) {\n return requirements.tools.map(({ tool, scopes }) => ({ name: tool, isOn: null, isNew: false, scopes }));\n }\n return read.value.tools.map((tool) => ({ ...tool, scopes: own.get(tool.name) ?? [] }));\n}\n\n/** The table's state filter. */\nexport const STATE_FILTERS = [\n { state: 'all', label: 'All' },\n { state: 'on', label: 'On' },\n { state: 'off', label: 'Off' },\n { state: 'new', label: 'New' },\n { state: 'needsNothing', label: 'Needs nothing' },\n] as const;\n\nexport type StateFilter = (typeof STATE_FILTERS)[number]['state'];\n\nfunction isInState(tool: TableTool, { state, partyScopes }: { state: StateFilter; partyScopes: readonly string[] }): boolean {\n switch (state) {\n case 'all':\n return true;\n case 'on':\n return tool.isOn === true;\n case 'off':\n return tool.isOn === false;\n case 'new':\n return tool.isNew;\n case 'needsNothing':\n return partyScopes.length === 0 && tool.scopes.length === 0;\n }\n}\n\n/** The tools whose name holds the text, in any case, and that are in the state picked. */\nexport function shownTools(tools: readonly TableTool[], filter: { name: string; state: StateFilter; partyScopes: readonly string[] }): TableTool[] {\n const name = filter.name.trim().toLowerCase();\n return tools.filter((tool) => tool.name.toLowerCase().includes(name) && isInState(tool, filter));\n}\n\n/** What the page kept since it read the rows: each changed tool's own scopes, and each switched tool's switch. */\nexport interface KeptChanges {\n scopes: ReadonlyMap<string, readonly string[]>;\n switches: ReadonlyMap<string, boolean>;\n}\n\n/** The rows with what was kept since they were read, so a change shows at once rather than when the page reads the server again. */\nexport function keptToolsOf(tools: readonly TableTool[], kept: KeptChanges): TableTool[] {\n return tools.map((tool) => ({ ...tool, scopes: kept.scopes.get(tool.name) ?? tool.scopes, isOn: tool.isOn === null ? null : (kept.switches.get(tool.name) ?? tool.isOn) }));\n}\n","'use client';\n\nimport { useState, useTransition } from 'react';\n\nimport { IDLE, type FormState } from '../../forms/form-state';\nimport { readMoreSignIns, removePersonSignIn } from '../actions';\nimport { removedMessageOf, withNextPage } from '../everyones-sign-ins';\nimport { personOf, SignInsCard, type PersonSignIn } from './everyones-sign-ins';\n\n/**\n * Everyone's sign-ins as an approver works on them (decision 0067, M3):\n * Remove asks to confirm in place, a removal is said above the list, and\n * Show more reads the next page only when pressed. The page refreshes from\n * the server after a removal, so your own sign-in above stays true too.\n */\nexport function EveryonesSignInsCard({ fleetId, party, now, first }: { fleetId: string; party: string; now: string; first: { grants: PersonSignIn[]; next: string | null } }) {\n const [more, setMore] = useState<PersonSignIn[]>([]);\n const [next, setNext] = useState(first.next);\n const [removed, setRemoved] = useState<ReadonlySet<string>>(new Set());\n const [confirming, setConfirming] = useState<string | null>(null);\n const [removing, setRemoving] = useState<string | null>(null);\n const [outcome, setOutcome] = useState<FormState>(IDLE);\n const [isLoadingMore, startLoadingMore] = useTransition();\n const [, startRemoving] = useTransition();\n const rows = withNextPage(first.grants, more).filter(({ personShipId }) => !removed.has(personShipId));\n\n const remove = (signIn: PersonSignIn) => {\n setRemoving(signIn.personShipId);\n startRemoving(async () => {\n const done = await removePersonSignIn({ fleetId, name: party, personShipId: signIn.personShipId });\n setRemoving(null);\n setConfirming(null);\n if (done.isOk) {\n setRemoved((held) => new Set([...held, signIn.personShipId]));\n setOutcome({ kind: 'done', message: removedMessageOf({ person: personOf(signIn), party, isRevoked: done.isRevoked }) });\n } else {\n setOutcome({ kind: 'refused', message: done.message });\n }\n });\n };\n\n const showMore = () => {\n const after = next ?? rows.at(-1)?.personShipId;\n if (after === undefined) {\n return;\n }\n startLoadingMore(async () => {\n const page = await readMoreSignIns({ fleetId, name: party, after });\n if (page.isOk) {\n setMore((shown) => withNextPage(shown, page.grants));\n setNext(page.next);\n } else {\n setOutcome({ kind: 'refused', message: page.message });\n }\n });\n };\n\n return (\n <SignInsCard\n party={party}\n now={now}\n rows={rows}\n refusal={null}\n hasMore={next !== null}\n isLoadingMore={isLoadingMore}\n confirming={confirming}\n removing={removing}\n outcome={outcome}\n onRemove={(personShipId) => { setConfirming(personShipId); setOutcome(IDLE); }}\n onConfirm={remove}\n onKeep={() => { setConfirming(null); }}\n onMore={showMore}\n />\n );\n}\n","/* __next_internal_action_entry_do_not_use__ [{\"4095ca4530ba350034f3764358aa752e7cceb46c5d\":{\"name\":\"readMoreSignIns\"}},\"web/features/outside-party/actions.ts\",\"\"] */\"use turbopack: no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_7=/*#__PURE__*/createServerReference(\"4095ca4530ba350034f3764358aa752e7cceb46c5d\",callServer,void 0,findSourceMapURL,\"readMoreSignIns\");export{$$RSC_SERVER_ACTION_7 as readMoreSignIns};","/* __next_internal_action_entry_do_not_use__ [{\"402ad60edc05d5b5f02aa77d1ae5fa7b4f8c6abc40\":{\"name\":\"removePersonSignIn\"}},\"web/features/outside-party/actions.ts\",\"\"] */\"use turbopack: no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_6=/*#__PURE__*/createServerReference(\"402ad60edc05d5b5f02aa77d1ae5fa7b4f8c6abc40\",callServer,void 0,findSourceMapURL,\"removePersonSignIn\");export{$$RSC_SERVER_ACTION_6 as removePersonSignIn};","/**\n * Everyone's sign-ins on a server's page, for approvers (decision 0067, M3):\n * how a removal is said, and the rows Show more adds.\n */\n\n/** A removal said: revoked at the server where it revoked the tokens, removed alone where it offers no revocation or did not answer. */\nexport function removedMessageOf({ person, party, isRevoked }: { person: string; party: string; isRevoked: boolean }): string {\n return isRevoked ? `${person}'s sign-in is removed, and revoked at ${party}.` : `${person}'s sign-in is removed.`;\n}\n\n/** The rows shown with the next page after them, each person once: a removal moves the pages along, so the next page may start with a person already shown. */\nexport function withNextPage<Row extends { personShipId: string }>(shown: readonly Row[], page: readonly Row[]): Row[] {\n const isShown = new Set(shown.map(({ personShipId }) => personShipId));\n return [...shown, ...page.filter(({ personShipId }) => !isShown.has(personShipId))];\n}\n","import type { inferRouterOutputs } from '@trpc/server';\n\nimport type { GatewayRouter } from '../../../../src/adapters/trpc/router.js';\nimport type { FormState } from '../../forms/form-state';\nimport { BUTTONS, CARD } from '../../forms/ui/look';\nimport { Outcome } from '../../forms/ui/outcome';\nimport type { Tone } from '../../outside-parties/party-kinds';\nimport { StatusBadge } from '../../outside-parties/ui/status-badge';\nimport { whenWordsOf } from '../own-sign-in';\n\n/** A person's sign-in as the API answers it to an approver: never a token. */\nexport type PersonSignIn = inferRouterOutputs<GatewayRouter>['parties']['signIns']['grants'][number];\n\nconst BADGES: Record<PersonSignIn['state'], { tone: Tone; label: string }> = {\n signedIn: { tone: 'ok', label: 'Signed in' },\n lost: { tone: 'attention', label: 'Lost' },\n};\n\n/** How many rows the list shows while it is read. */\nconst SKELETON_ROWS = 3;\n\n/** The person a sign-in is of: their person ship's name, or its id where the fleet answered no name. */\nexport function personOf(signIn: PersonSignIn): string {\n return signIn.personName ?? signIn.personShipId;\n}\n\nfunction accountOf({ outsideAccount }: PersonSignIn) {\n return outsideAccount.name ?? outsideAccount.subject ?? <span className=\"text-muted-foreground\">Not known</span>;\n}\n\nfunction Heading({ count }: { count: number | null }) {\n return (\n <div className=\"flex flex-wrap items-center justify-between gap-2\">\n <h2 className=\"text-section font-semibold\">Everyone&apos;s sign-ins</h2>\n {count === null ? null : <span className=\"text-muted-foreground\">{count}</span>}\n </div>\n );\n}\n\nfunction Head() {\n return (\n <thead className=\"max-sm:hidden\">\n <tr className=\"border-b border-border text-left text-muted-foreground\">\n <th className=\"h-10 px-2 font-medium\">Person</th>\n <th className=\"h-10 px-2 font-medium\">Account</th>\n <th className=\"h-10 px-2 font-medium\">State</th>\n <th className=\"h-10 px-2 font-medium\">Last used</th>\n <th className=\"h-10 px-2\">\n <span className=\"sr-only\">Remove</span>\n </th>\n </tr>\n </thead>\n );\n}\n\n/** Everyone's sign-ins while they are read: the heading and the table's shape. */\nexport function EveryonesSignInsSkeleton({ party }: { party: string }) {\n return (\n <section className={`${CARD} grid gap-3`} aria-busy=\"true\" aria-label={`Reading everyone's sign-ins to ${party}`} data-testid=\"outside-party-sign-ins-skeleton\">\n <Heading count={null} />\n <table className=\"w-full border-collapse max-sm:block\">\n <Head />\n <tbody className=\"max-sm:grid\">\n {Array.from({ length: SKELETON_ROWS }, (_, row) => (\n <tr key={row} className=\"border-b border-border last:border-b-0 max-sm:grid max-sm:gap-1 max-sm:py-3\">\n <td className=\"h-12 px-2 max-sm:h-auto max-sm:px-0\">\n <span className=\"block h-3.5 w-20 animate-pulse rounded-md bg-muted max-sm:w-2/5\" />\n </td>\n <td className=\"h-12 px-2 max-sm:h-auto max-sm:px-0\">\n <span className=\"block h-3.5 w-36 animate-pulse rounded-md bg-muted max-sm:w-3/4\" />\n </td>\n <td className=\"h-12 px-2 max-sm:hidden\">\n <span className=\"block h-3.5 w-16 animate-pulse rounded-md bg-muted\" />\n </td>\n <td className=\"h-12 px-2 max-sm:hidden\">\n <span className=\"block h-3.5 w-20 animate-pulse rounded-md bg-muted\" />\n </td>\n <td className=\"max-sm:hidden\" />\n </tr>\n ))}\n </tbody>\n </table>\n </section>\n );\n}\n\n/** What the card shows now, and what each press asks of the part that holds it. */\nexport interface SignInsCardProps {\n party: string;\n /** When the page was read, so every row says its times from the same moment. */\n now: string;\n rows: readonly PersonSignIn[];\n /** Why the API refused the list, said in place of it. */\n refusal: string | null;\n hasMore: boolean;\n isLoadingMore: boolean;\n /** The person ship whose removal waits for a confirm. */\n confirming: string | null;\n /** The person ship whose removal is on its way. */\n removing: string | null;\n outcome: FormState;\n onRemove: (personShipId: string) => void;\n onConfirm: (signIn: PersonSignIn) => void;\n onKeep: () => void;\n onMore: () => void;\n}\n\nfunction Confirm({ signIn, party, isRemoving, onConfirm, onKeep }: { signIn: PersonSignIn; party: string; isRemoving: boolean; onConfirm: () => void; onKeep: () => void }) {\n const person = personOf(signIn);\n return (\n <div className=\"grid gap-2 rounded-md bg-muted p-3\" data-testid=\"outside-party-sign-ins-confirm\">\n <p>\n Remove {person}&apos;s sign-in? Their ships&apos; calls to {party} are refused until they sign in again.\n </p>\n <div className=\"flex flex-wrap gap-2\">\n <button type=\"button\" className={BUTTONS.destructive} disabled={isRemoving} aria-busy={isRemoving} onClick={onConfirm} data-testid=\"outside-party-sign-ins-remove-confirmed\">\n {isRemoving ? 'Removing…' : `Remove ${person}'s sign-in`}\n </button>\n <button type=\"button\" className={BUTTONS.secondary} onClick={onKeep}>\n Keep\n </button>\n </div>\n </div>\n );\n}\n\n/**\n * Everyone's sign-ins to a server where each person signs in (decision 0067,\n * M3), for an account holding gateway:approve: each person, their outside\n * account, state and when last used, with Remove confirmed in place. A table\n * on a wide screen, a list on a phone, 20 a page with Show more.\n */\nexport function SignInsCard(props: SignInsCardProps) {\n const { party, now, rows, refusal, hasMore, isLoadingMore, confirming, removing, outcome } = props;\n const lastUsedOf = (signIn: PersonSignIn) => (signIn.lastUsedAt === null ? 'Not yet' : whenWordsOf(signIn.lastUsedAt, new Date(now)));\n return (\n <section className={`${CARD} grid gap-3`} data-testid=\"outside-party-sign-ins\">\n <Heading count={refusal === null ? rows.length : null} />\n <Outcome state={outcome} />\n {refusal !== null ? (\n <Outcome state={{ kind: 'refused', message: refusal }} />\n ) : rows.length === 0 ? (\n <p className=\"text-muted-foreground\">Nobody has signed in yet.</p>\n ) : (\n <table className=\"w-full border-collapse max-sm:block\">\n <Head />\n <tbody className=\"max-sm:grid\">\n {rows.map((signIn) => {\n const badge = BADGES[signIn.state];\n const isConfirming = confirming === signIn.personShipId;\n const lastUsed = lastUsedOf(signIn);\n return [\n <tr key={signIn.personShipId} className={`border-b border-border max-sm:grid max-sm:grid-cols-[1fr_auto] max-sm:gap-1 max-sm:py-3 ${isConfirming ? 'border-b-0' : 'last:border-b-0'}`} data-testid=\"outside-party-sign-ins-row\">\n <td className=\"h-12 px-2 max-sm:col-start-1 max-sm:row-start-1 max-sm:h-auto max-sm:px-0 max-sm:font-medium\">\n {personOf(signIn)}\n {signIn.isYours ? <span className=\"font-normal text-muted-foreground\"> (you)</span> : null}\n </td>\n <td className=\"h-12 px-2 max-sm:col-span-2 max-sm:row-start-2 max-sm:h-auto max-sm:px-0 max-sm:text-muted-foreground\">\n {accountOf(signIn)}\n <span className=\"sm:hidden\"> · last used {signIn.lastUsedAt === null ? 'not yet' : lastUsed}</span>\n </td>\n <td className=\"h-12 px-2 max-sm:col-start-2 max-sm:row-start-1 max-sm:h-auto max-sm:px-0\">\n <StatusBadge tone={badge.tone} label={badge.label} />\n </td>\n <td className=\"h-12 px-2 text-muted-foreground max-sm:hidden\">{lastUsed}</td>\n <td className=\"h-12 px-2 text-right max-sm:col-span-2 max-sm:row-start-3 max-sm:h-auto max-sm:px-0 max-sm:text-left\">\n <button type=\"button\" className={`${BUTTONS.secondary} ${isConfirming ? 'max-sm:hidden' : ''}`} onClick={() => { props.onRemove(signIn.personShipId); }} data-testid=\"outside-party-sign-ins-remove\">\n Remove\n </button>\n </td>\n </tr>,\n isConfirming ? (\n <tr key={`${signIn.personShipId}-confirm`} className=\"border-b border-border last:border-b-0 max-sm:block max-sm:pb-3\">\n <td colSpan={5} className=\"pb-2 max-sm:block max-sm:pb-0\">\n <Confirm signIn={signIn} party={party} isRemoving={removing === signIn.personShipId} onConfirm={() => { props.onConfirm(signIn); }} onKeep={props.onKeep} />\n </td>\n </tr>\n ) : null,\n ];\n })}\n </tbody>\n </table>\n )}\n {refusal === null && hasMore ? (\n <div>\n <button type=\"button\" className={BUTTONS.secondary} disabled={isLoadingMore} aria-busy={isLoadingMore} onClick={props.onMore} data-testid=\"outside-party-sign-ins-more\">\n {isLoadingMore ? 'Showing more…' : 'Show more'}\n </button>\n </div>\n ) : null}\n </section>\n );\n}\n","/**\n * Your own sign-in on a server's page (decision 0067, M2): how a sign-in\n * went, as the address the gateway sends the browser back to says it\n * (src/adapters/http/party-sign-in-routes.ts), or as Remove says it; and\n * when it was made or last used, in words.\n */\nimport type { SearchParams } from '../../lib/gateway-api/page-api';\n\n/** What the address says once you removed your sign-in: the page's own outcome, never the gateway's. */\nexport const REMOVED = 'removed';\n\n/** What the address back says of a sign-in, and what the page calls it. */\nconst OUTCOMES = {\n 'signed-in': 'signedIn',\n [REMOVED]: 'removed',\n failed: 'failed',\n 'turned-away': 'turnedAway',\n 'not-signed-in': 'cancelled',\n unavailable: 'unavailable',\n} as const;\n\nexport type SignInOutcomeKind = (typeof OUTCOMES)[keyof typeof OUTCOMES];\n\n/** How a sign-in went, with the authorization server's error code where it answered one. */\nexport interface SignInOutcome {\n kind: SignInOutcomeKind;\n serverError: string | null;\n}\n\n/** The parameter the address names the outcome by, and the one it names the server's error code by. */\nexport const SIGN_IN_PARAMETER = 'sign-in';\nconst ERROR_PARAMETER = 'error';\n\nfunction isSaid(said: string): said is keyof typeof OUTCOMES {\n return Object.hasOwn(OUTCOMES, said);\n}\n\n/** How the sign-in went, or nothing when the address says no outcome it knows. */\nexport function signInOutcomeOf(searchParams: SearchParams): SignInOutcome | null {\n const said = searchParams[SIGN_IN_PARAMETER];\n if (typeof said !== 'string' || !isSaid(said)) {\n return null;\n }\n const serverError = searchParams[ERROR_PARAMETER];\n return { kind: OUTCOMES[said], serverError: typeof serverError === 'string' ? serverError : null };\n}\n\nconst MINUTE_MS = 60_000;\nconst HOUR_MS = 60 * MINUTE_MS;\n\n/** The months as the day and time name them. */\nconst MONTHS = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] as const;\n\nconst twoDigits = (value: number) => String(value).padStart(2, '0');\n\n/** The day and time, in UTC as the console's other times are: 28 Oct, 22:10. */\nexport function dayAndTimeOf(at: string): string {\n const time = new Date(at);\n return `${String(time.getUTCDate())} ${MONTHS[time.getUTCMonth()] ?? ''}, ${twoDigits(time.getUTCHours())}:${twoDigits(time.getUTCMinutes())}`;\n}\n\n/** When something happened, in words: Just now, minutes ago within the hour, else the day and time. */\nexport function whenWordsOf(at: string, now: Date): string {\n const ago = now.getTime() - new Date(at).getTime();\n if (ago < MINUTE_MS) {\n return 'Just now';\n }\n if (ago < HOUR_MS) {\n return `${String(Math.floor(ago / MINUTE_MS))} min ago`;\n }\n return dayAndTimeOf(at);\n}\n","'use client';\n\nimport { useActionState } from 'react';\n\nimport { FLEET_FIELD, IDLE } from '../../forms/form-state';\nimport type { ButtonKind } from '../../forms/ui/look';\nimport { Outcome } from '../../forms/ui/outcome';\nimport { SubmitButton } from '../../forms/ui/submit-button';\nimport { removeOwnSignIn, signInToParty } from '../actions';\n\nfunction PartyFields({ fleetId, party }: { fleetId: string; party: string }) {\n return (\n <>\n <input type=\"hidden\" name={FLEET_FIELD} value={fleetId} />\n <input type=\"hidden\" name=\"name\" value={party} />\n </>\n );\n}\n\n/** Sign in, or Sign in again: the browser goes to the server's authorization server. A refusal is said in place. */\nexport function SignInForm({ fleetId, party, label, kind }: { fleetId: string; party: string; label: string; kind: ButtonKind }) {\n const [refused, signIn] = useActionState(signInToParty, IDLE);\n return (\n <form action={signIn} className=\"grid gap-2\">\n <Outcome state={refused} />\n <PartyFields fleetId={fleetId} party={party} />\n <div>\n <SubmitButton kind={kind} pending={`Opening ${party}…`} testId=\"outside-party-sign-in-start\">\n {label}\n </SubmitButton>\n </div>\n </form>\n );\n}\n\n/** Remove: your sign-in is revoked where the server offers it, then dropped. A refusal is said in place. */\nexport function RemoveSignInForm({ fleetId, party }: { fleetId: string; party: string }) {\n const [refused, remove] = useActionState(removeOwnSignIn, IDLE);\n return (\n <form action={remove} className=\"grid gap-2\">\n <Outcome state={refused} />\n <PartyFields fleetId={fleetId} party={party} />\n <div>\n <SubmitButton kind=\"secondary\" pending=\"Removing…\" testId=\"outside-party-sign-in-remove\">\n Remove\n </SubmitButton>\n </div>\n </form>\n );\n}\n","/* __next_internal_action_entry_do_not_use__ [{\"603426f59db3161663bc005a88552062fc2782c5a3\":{\"name\":\"removeOwnSignIn\"}},\"web/features/outside-party/actions.ts\",\"\"] */\"use turbopack: no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_5=/*#__PURE__*/createServerReference(\"603426f59db3161663bc005a88552062fc2782c5a3\",callServer,void 0,findSourceMapURL,\"removeOwnSignIn\");export{$$RSC_SERVER_ACTION_5 as removeOwnSignIn};","'use client';\n\nimport { useActionState } from 'react';\nimport { useFormStatus } from 'react-dom';\n\nimport { FLEET_FIELD } from '../../forms/form-state';\nimport { Switch } from '../../forms/ui/switch';\nimport { markA2aAgent, type MarkState } from '../actions';\n\nconst IDLE: MarkState = { kind: 'idle' };\n\nfunction SubmitSwitch({ isRepeatable }: { isRepeatable: boolean }) {\n const status = useFormStatus();\n return <Switch type=\"submit\" isOn={isRepeatable} label=\"Repeatable\" isPending={status.pending} testId=\"outside-party-repeatable-switch\" />;\n}\n\n/**\n * An A2A agent's repeatable mark on its page, for an approver (A9): a press\n * sends the change at once, the switch says it is on its way, then the row\n * says what it means now, or why the API refused it.\n */\nexport function RepeatableSwitch({ fleetId, party, isRepeatable }: { fleetId: string; party: string; isRepeatable: boolean }) {\n const [state, action] = useActionState(markA2aAgent, IDLE);\n const shown = state.kind === 'marked' ? state.isRepeatable : isRepeatable;\n return (\n <>\n <form action={action} className=\"contents\">\n <input type=\"hidden\" name={FLEET_FIELD} value={fleetId} />\n <input type=\"hidden\" name=\"name\" value={party} />\n <input type=\"hidden\" name=\"isRepeatable\" value={String(!shown)} />\n <SubmitSwitch isRepeatable={shown} />\n </form>\n {state.kind === 'idle' ? null : (\n <span role={state.kind === 'refused' ? 'alert' : 'status'} className={`basis-full text-caption ${state.kind === 'refused' ? 'text-tone-attention-fg' : 'text-tone-ok-fg'}`} data-testid=\"outside-party-repeatable-outcome\">\n {state.message}\n </span>\n )}\n </>\n );\n}\n","/* __next_internal_action_entry_do_not_use__ [{\"602e86ad5ed7390f4bc04896ba4c36da3bcc5d00bf\":{\"name\":\"markA2aAgent\"}},\"web/features/outside-party/actions.ts\",\"\"] */\"use turbopack: no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_3=/*#__PURE__*/createServerReference(\"602e86ad5ed7390f4bc04896ba4c36da3bcc5d00bf\",callServer,void 0,findSourceMapURL,\"markA2aAgent\");export{$$RSC_SERVER_ACTION_3 as markA2aAgent};"],"names":["Switch","isOn","label","isPending","type","onClick","testId","role","disabled","className","$$RSC_SERVER_ACTION_1","$$RSC_SERVER_ACTION_4","AgentNeeds","props","Provider","AgentNeedsLine","fleetId","party","version","scopes","listed","canChange","router","toasts","useToastManager","startTransition","isReloading","startReload","isOpen","setIsOpen","picked","setPicked","isSaving","setIsSaving","refusal","setRefusal","keptVersion","setKeptVersion","round","setRound","kept","setKept","shown","basis","save","madeOn","Math","max","outcome","name","tools","isOk","message","isConflict","previous","add","title","statementRefusal","refresh","own","Set","map","scope","onClose","description","appliesTo","action","pending","isDisabled","onPress","onReload","onPick","nestedDrawers","height","frontmostHeight","swipeMovementX","swipeMovementY","snapPointOffset","swipeStrength","$$RSC_SERVER_ACTION_7","$$RSC_SERVER_ACTION_5","$$RSC_SERVER_ACTION_3"],"mappings":"6CAAuG,IAAA,EAAA,EAAA,CAAA,CAAA,kBAChG,SAAgB,AAAPA,MAASC,CAAI,OAAEC,CAAK,WAAEC,GAAY,CAAK,MAAEC,EAAO,QAAQ,SAAEC,CAAO,CAAEC,QAAM,CAA4H,EACnN,MACE,CAAA,EAAA,EAAA,GAAA,EAAC,SAAA,CACCF,KAAMA,EACNG,KAAK,SACL,eAAcN,EACd,aAAYC,EACZ,YAAWC,EACXK,SAAUL,EACVE,QAASA,EACT,cAAaC,EACbG,UAAW,CAAC,0GAA0G,EAAER,EAAO,4BAA8B,wBAAA,CAAyB,UAEtL,CAAA,EAAA,EAAA,GAAA,EAAC,OAAA,CAAKQ,UAAW,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AAK,KAAqB,YAAf,EAAM,IAAI,CAAiB,QAAU,SAAU,UAAW,CAAC,wBAAwB,EAAiB,YAAf,EAAM,IAAI,CAAiB,yBAA2B,kBAAA,CAAmB,CAAE,cAAY,4CACrL,EAAM,OAAO,KAKxB","ignoreList":[9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28]}
1
+ {"version":3,"sources":["../../../../../web/features/forms/ui/switch.tsx","../../../../../web/features/outside-party/data%3Ab3c785%20%3Ctext/javascript%3E","../../../../../web/features/outside-party/tools-table/table-messages.ts","../../../../../web/features/outside-party/tools-table/ui/needs-chips.tsx","../../../../../web/features/outside-party/tools-table/ui/scope-picker.tsx","../../../../../web/features/outside-party/tools-table/ui/table-dialog.tsx","../../../../../web/features/outside-party/tools-table/ui/table-toasts.tsx","../../../../../web/features/outside-party/data%3Ae792ee%20%3Ctext/javascript%3E","../../../../../web/features/outside-party/tools-table/ui/agent-needs.tsx","../../../../../node_modules/%40base-ui/react/drawer/backdrop/DrawerBackdrop.mjs","../../../../../node_modules/%40base-ui/react/drawer/popup/DrawerPopupCssVars.mjs","../../../../../node_modules/%40base-ui/react/drawer/backdrop/DrawerBackdropCssVars.mjs","../../../../../node_modules/%40base-ui/react/drawer/close/DrawerClose.mjs","../../../../../node_modules/%40base-ui/react/drawer/content/drawerContentAttribute.mjs","../../../../../node_modules/%40base-ui/react/drawer/content/DrawerContent.mjs","../../../../../node_modules/%40base-ui/react/drawer/popup/DrawerPopup.mjs","../../../../../node_modules/%40base-ui/react/drawer/popup/DrawerPopupDataAttributes.mjs","../../../../../node_modules/%40base-ui/react/drawer/root/DrawerRootContext.mjs","../../../../../node_modules/%40base-ui/react/drawer/root/useDrawerSnapPoints.mjs","../../../../../node_modules/%40base-ui/react/drawer/viewport/DrawerViewportContext.mjs","../../../../../node_modules/%40base-ui/react/drawer/portal/DrawerPortal.mjs","../../../../../node_modules/%40base-ui/react/drawer/root/DrawerRoot.mjs","../../../../../node_modules/%40base-ui/react/drawer/provider/DrawerProviderContext.mjs","../../../../../node_modules/%40base-ui/react/drawer/title/DrawerTitle.mjs","../../../../../node_modules/%40base-ui/react/drawer/trigger/DrawerTrigger.mjs","../../../../../node_modules/%40base-ui/react/drawer/viewport/DrawerViewport.mjs","../../../../../node_modules/%40base-ui/react/dialog/viewport/DialogViewport.mjs","../../../../../node_modules/%40base-ui/react/dialog/viewport/DialogViewportDataAttributes.mjs","../../../../../node_modules/%40base-ui/react/drawer/virtual-keyboard-provider/DrawerVirtualKeyboardContext.mjs","../../../../../web/features/outside-party/tools-table/ui/tools-table.tsx","../../../../../web/features/outside-party/data%3A3b1b27%20%3Ctext/javascript%3E","../../../../../web/features/outside-party/switched-message.ts","../../../../../web/features/outside-party/tools-table/hint-suggestions.ts","../../../../../web/features/outside-party/tools-table/scope-change.ts","../../../../../web/features/outside-party/tools-table/table-tools.ts","../../../../../web/features/outside-party/ui/everyones-sign-ins-card.tsx","../../../../../web/features/outside-party/data%3A80e6cc%20%3Ctext/javascript%3E","../../../../../web/features/outside-party/data%3Adde2ae%20%3Ctext/javascript%3E","../../../../../web/features/outside-party/everyones-sign-ins.ts","../../../../../web/features/outside-party/ui/everyones-sign-ins.tsx","../../../../../web/features/outside-party/own-sign-in.ts","../../../../../web/features/outside-party/ui/own-sign-in-forms.tsx","../../../../../web/features/outside-party/data%3A935a66%20%3Ctext/javascript%3E","../../../../../web/features/outside-party/ui/repeatable-switch.tsx","../../../../../web/features/outside-party/data%3A2533ac%20%3Ctext/javascript%3E"],"sourcesContent":["/** A switch: on or off, said by its look and to a screen reader, busy while its change is on its way. */\nexport function Switch({ isOn, label, isPending = false, type = 'button', onClick, testId }: { isOn: boolean; label: string; isPending?: boolean; type?: 'button' | 'submit'; onClick?: () => void; testId?: string }) {\n return (\n <button\n type={type}\n role=\"switch\"\n aria-checked={isOn}\n aria-label={label}\n aria-busy={isPending}\n disabled={isPending}\n onClick={onClick}\n data-testid={testId}\n className={`inline-flex h-5 w-9 shrink-0 items-center rounded-full border p-0.5 transition-colors disabled:opacity-60 ${isOn ? 'border-primary bg-primary' : 'border-input bg-muted'}`}\n >\n <span className={`size-3.5 rounded-full bg-background shadow-sm transition-transform ${isOn ? 'translate-x-4' : 'translate-x-0'} ${isPending ? 'animate-pulse' : ''}`} />\n </button>\n );\n}\n","/* __next_internal_action_entry_do_not_use__ [{\"40a657614147f046e413deb974a3d92e5788505446\":{\"name\":\"setPartyScopes\"}},\"web/features/outside-party/actions.ts\",\"\"] */\"use turbopack: no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_1=/*#__PURE__*/createServerReference(\"40a657614147f046e413deb974a3d92e5788505446\",callServer,void 0,findSourceMapURL,\"setPartyScopes\");export{$$RSC_SERVER_ACTION_1 as setPartyScopes};","/** What the tools table says once a change is kept (gateway scopes 4.3), in a Toast. */\nimport type { ScopeChange } from './scope-change';\n\nfunction listOf(scopes: readonly string[]): string {\n return scopes.length <= 1 ? scopes.join('') : `${scopes.slice(0, -1).join(', ')} and ${scopes.at(-1) ?? ''}`;\n}\n\nfunction toolsOf(count: number): string {\n return `${String(count)} ${count === 1 ? 'tool' : 'tools'}`;\n}\n\n/** The change, and why the fleet sees it only at the proxy ship's next statement when it does. */\nexport function statedMessage(message: string, statementRefusal: string | null): string {\n return statementRefusal === null ? message : `${message}; the fleet sees it at the proxy ship's next statement: ${statementRefusal}`;\n}\n\nexport function scopesSetMessage({ scopes, how, count }: { scopes: readonly string[]; how: ScopeChange; count: number }): string {\n if (how === 'remove') {\n return `${listOf(scopes)} removed from ${toolsOf(count)}`;\n }\n if (scopes.length === 0) {\n return `${toolsOf(count)} need${count === 1 ? 's' : ''} nothing of ${count === 1 ? 'its' : 'their'} own`;\n }\n return `${listOf(scopes)} set on ${toolsOf(count)}`;\n}\n\nexport function partyScopesSetMessage({ party, scopes }: { party: string; scopes: readonly string[] }): string {\n return scopes.length === 0 ? `Every tool of ${party} needs nothing beyond reaching it` : `Every tool of ${party} needs ${listOf(scopes)}`;\n}\n\nexport function suggestionsSetMessage(groups: readonly { scopes: readonly string[]; count: number }[]): string {\n return groups.map(({ scopes, count }) => `${listOf(scopes)} set on ${toolsOf(count)}`).join('; ');\n}\n\nexport function toolsSwitchedMessage({ count, isOn, statementRefusal }: { count: number; isOn: boolean; statementRefusal: string | null }): string {\n return statedMessage(`${toolsOf(count)} switched ${isOn ? 'on' : 'off'}`, statementRefusal);\n}\n\nexport function agentScopesSetMessage({ party, scopes }: { party: string; scopes: readonly string[] }): string {\n return scopes.length === 0 ? `Every message to ${party} needs nothing beyond reaching it` : `Every message to ${party} needs ${listOf(scopes)}`;\n}\n","/** A scope the fleet lists, with its one-line description, as an approver picks it. */\nexport interface ListedScope {\n scope: string;\n description: string;\n}\n\nconst CHIP = 'inline-flex items-center rounded-md border px-2 font-mono text-caption';\n\n/**\n * What a call needs, as chips (gateway scopes 4.3): the party's set muted, a\n * tool's own plain. A scope the fleet no longer lists is marked so: no ship\n * holds it, so every call needing it is refused until it is changed.\n */\nexport function NeedsChips({ party = [], own, listed }: { party?: readonly string[]; own: readonly string[]; listed: ReadonlySet<string> | null }) {\n if (party.length === 0 && own.length === 0) {\n return <span className=\"text-muted-foreground\">Nothing</span>;\n }\n const chip = (scope: string, isParty: boolean) => {\n const isGone = listed !== null && !listed.has(scope);\n const look = isGone ? 'border-tone-attention-border bg-tone-attention-bg text-tone-attention-fg' : isParty ? 'border-transparent bg-muted text-muted-foreground' : 'border-border';\n return (\n <span key={`${isParty ? 'party' : 'own'}-${scope}`} className={`${CHIP} ${look}`} data-testid={isParty ? 'tools-table-party-scope' : 'tools-table-scope'} title={isGone ? 'No longer defined in the fleet' : isParty ? 'Every tool needs it' : undefined}>\n {scope}\n {isGone ? <span className=\"ml-1 font-sans\">(no longer defined)</span> : null}\n </span>\n );\n };\n return (\n <span className=\"flex flex-wrap gap-1\">\n {party.map((scope) => chip(scope, true))}\n {own.filter((scope) => !party.includes(scope)).map((scope) => chip(scope, false))}\n </span>\n );\n}\n","'use client';\n\nimport { Combobox } from '@base-ui/react/combobox';\n\nimport type { ListedScope } from './needs-chips';\n\ninterface ScopeItem {\n value: string;\n label: string;\n description: string;\n}\n\nconst itemOf = ({ scope, description }: ListedScope): ScopeItem => ({ value: scope, label: scope, description });\n\n/**\n * Picks several of the fleet's listed scopes (gateway scopes 4.3), searched\n * by name or description. A scope picked before that the fleet no longer\n * lists stays picked, so it can be seen and removed.\n */\nexport function ScopePicker({ label, listed, picked, onPick, isDisabled = false, testId }: { label: string; listed: readonly ListedScope[]; picked: readonly string[]; onPick: (scopes: string[]) => void; isDisabled?: boolean; testId?: string }) {\n const { contains } = Combobox.useFilter();\n const items = [...listed.map(itemOf), ...picked.filter((scope) => !listed.some((each) => each.scope === scope)).map((scope) => ({ value: scope, label: scope, description: 'No longer defined in the fleet' }))];\n const value = items.filter((item) => picked.includes(item.value));\n return (\n <Combobox.Root\n multiple\n items={items}\n value={value}\n disabled={isDisabled}\n isItemEqualToValue={(item, chosen) => item.value === chosen.value}\n onValueChange={(next: ScopeItem[], details) => {\n // Escape closes the list; it never takes back what was picked.\n if (details.reason === 'escape-key') {\n details.cancel();\n return;\n }\n onPick(next.map((item) => item.value));\n }}\n filter={(item: ScopeItem, query) => contains(item.label, query) || contains(item.description, query)}\n >\n <div className=\"grid gap-1\" data-testid={testId}>\n <Combobox.Label className=\"font-medium\">{label}</Combobox.Label>\n <Combobox.InputGroup className=\"flex min-h-9 flex-wrap items-center gap-1 rounded-md border border-input bg-background px-2 py-1\">\n <Combobox.Chips className=\"contents\">\n {value.map((item) => (\n <Combobox.Chip key={item.value} className=\"inline-flex items-center gap-1 rounded-md border border-border bg-muted px-2 font-mono text-caption\" aria-label={item.value}>\n {item.value}\n <Combobox.ChipRemove className=\"text-muted-foreground hover:text-foreground\" aria-label={`Remove ${item.value}`}>\n ×\n </Combobox.ChipRemove>\n </Combobox.Chip>\n ))}\n <Combobox.Input placeholder={value.length === 0 ? 'Search the fleet\\'s scopes' : ''} className=\"h-7 min-w-32 flex-1 bg-transparent outline-none\" />\n </Combobox.Chips>\n </Combobox.InputGroup>\n </div>\n <Combobox.Portal>\n <Combobox.Positioner sideOffset={4} className=\"z-50\">\n <Combobox.Popup className=\"max-h-72 w-(--anchor-width) overflow-auto rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-md\">\n <Combobox.Empty className=\"px-2 py-1 text-muted-foreground\">No scope listed matches.</Combobox.Empty>\n <Combobox.List>\n {(item: ScopeItem) => (\n <Combobox.Item key={item.value} value={item} className=\"grid cursor-default grid-cols-[1rem_1fr] gap-x-2 rounded px-2 py-1 data-highlighted:bg-accent\">\n <Combobox.ItemIndicator className=\"row-span-2\">✓</Combobox.ItemIndicator>\n <span className=\"col-start-2 font-mono text-code\">{item.value}</span>\n <span className=\"col-start-2 text-caption text-muted-foreground\">{item.description}</span>\n </Combobox.Item>\n )}\n </Combobox.List>\n </Combobox.Popup>\n </Combobox.Positioner>\n </Combobox.Portal>\n </Combobox.Root>\n );\n}\n","'use client';\n\nimport { Dialog } from '@base-ui/react/dialog';\nimport type { ReactNode } from 'react';\n\nimport { BUTTONS } from '../../../forms/ui/look';\nimport { ActionButton } from '../../../bridge/ui/action-button';\n\n/** Why the API refused a change in a dialog: said inline, CONFLICT with Reload, at the requirements' version the change was made on. */\nexport interface DialogRefusal {\n message: string;\n isConflict: boolean;\n version: number;\n}\n\n/** The refusal still to say: a CONFLICT is answered once the page read newer requirements. */\nexport function standingRefusal(refusal: DialogRefusal | null, version: number): DialogRefusal | null {\n return refusal?.isConflict === true && version > refusal.version ? null : refusal;\n}\n\n/**\n * A dialog of the tools table (gateway scopes 4.3): its fields, a footer\n * saying what it applies to, and its action. While the action is on its\n * way the action shows its spinner and the dialog takes no input and does\n * not close; a refusal stays inline, with Reload when the requirements\n * changed since the page was read, which shows its spinner until the page\n * read them again.\n */\nexport function TableDialog({\n isOpen,\n onClose,\n title,\n description,\n children,\n appliesTo,\n action,\n isSaving,\n refusal,\n onReload,\n isReloading,\n testId,\n}: {\n isOpen: boolean;\n onClose: () => void;\n title: string;\n description: string;\n children: ReactNode;\n appliesTo: string;\n action: { label: string; pending: string; isDisabled: boolean; onPress: () => void };\n isSaving: boolean;\n refusal: DialogRefusal | null;\n onReload: () => void;\n isReloading: boolean;\n testId: string;\n}) {\n return (\n <Dialog.Root\n open={isOpen}\n onOpenChange={(open) => {\n if (!open && !isSaving) {\n onClose();\n }\n }}\n >\n <Dialog.Portal>\n <Dialog.Backdrop className=\"fixed inset-0 z-40 bg-(--overlay)\" />\n <Dialog.Popup className=\"fixed top-1/2 left-1/2 z-50 grid max-h-[90vh] w-[min(36rem,calc(100vw-2rem))] -translate-1/2 gap-4 overflow-auto rounded-lg border border-border bg-popover p-6 text-popover-foreground shadow-lg\" data-testid={testId}>\n <div className=\"grid gap-1\">\n <Dialog.Title className=\"text-heading font-semibold\">{title}</Dialog.Title>\n <Dialog.Description className=\"text-muted-foreground\">{description}</Dialog.Description>\n </div>\n <fieldset disabled={isSaving} className=\"grid gap-4\">\n {children}\n </fieldset>\n {refusal === null ? null : (\n <div role=\"alert\" className=\"flex flex-wrap items-center justify-between gap-2 rounded-md border border-tone-attention-border bg-tone-attention-bg px-3 py-2 text-tone-attention-fg\" data-testid=\"tools-table-dialog-refusal\">\n <span>{refusal.message}</span>\n {refusal.isConflict ? (\n <ActionButton isPending={isReloading} pendingLabel=\"Reloading…\" onClick={onReload} data-testid=\"tools-table-reload\">\n Reload\n </ActionButton>\n ) : null}\n </div>\n )}\n <div className=\"flex flex-wrap items-center justify-between gap-2\">\n <span className=\"text-muted-foreground\" data-testid=\"tools-table-applies-to\">\n {appliesTo}\n </span>\n <div className=\"flex gap-2\">\n <button type=\"button\" className={BUTTONS.secondary} disabled={isSaving} onClick={onClose}>\n Cancel\n </button>\n <ActionButton variant=\"primary\" isPending={isSaving} pendingLabel={action.pending} disabled={action.isDisabled || isReloading} onClick={action.onPress} data-testid=\"tools-table-dialog-action\">\n {action.label}\n </ActionButton>\n </div>\n </div>\n </Dialog.Popup>\n </Dialog.Portal>\n </Dialog.Root>\n );\n}\n","'use client';\n\nimport { Toast } from '@base-ui/react/toast';\n\n/** The toasts a party's page raised, each saying what was kept (gateway scopes 4.3). */\nexport function TableToasts() {\n const { toasts } = Toast.useToastManager();\n return (\n <Toast.Portal>\n <Toast.Viewport className=\"fixed right-4 bottom-4 z-50 grid w-[min(24rem,calc(100vw-2rem))] gap-2\">\n {toasts.map((toast) => (\n <Toast.Root key={toast.id} toast={toast} className=\"rounded-md border border-tone-ok-border bg-tone-ok-bg px-4 py-3 text-tone-ok-fg shadow-md\" data-testid=\"tools-table-toast\">\n <Toast.Content className=\"flex items-start justify-between gap-3\">\n <Toast.Title />\n <Toast.Close aria-label=\"Dismiss\">×</Toast.Close>\n </Toast.Content>\n </Toast.Root>\n ))}\n </Toast.Viewport>\n </Toast.Portal>\n );\n}\n","/* __next_internal_action_entry_do_not_use__ [{\"60655c9361674168d2c8e451d8cb06d1ece6649be8\":{\"name\":\"signInToParty\"}},\"web/features/outside-party/actions.ts\",\"\"] */\"use turbopack: no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_4=/*#__PURE__*/createServerReference(\"60655c9361674168d2c8e451d8cb06d1ece6649be8\",callServer,void 0,findSourceMapURL,\"signInToParty\");export{$$RSC_SERVER_ACTION_4 as signInToParty};","'use client';\n\nimport { Toast } from '@base-ui/react/toast';\nimport { useRouter } from 'next/navigation';\nimport { useState, useTransition } from 'react';\n\nimport { setPartyScopes } from '../../actions';\nimport { agentScopesSetMessage, statedMessage } from '../table-messages';\nimport { NeedsChips, type ListedScope } from './needs-chips';\nimport { ScopePicker } from './scope-picker';\nimport { standingRefusal, TableDialog, type DialogRefusal } from './table-dialog';\nimport { TableToasts } from './table-toasts';\n\n/**\n * An outside A2A agent's one Needs line (gateway scopes 4.3): its messages\n * name no skill, so one set of scopes guards the agent as a whole, changed\n * in a dialog on the version the page read.\n */\nexport function AgentNeeds(props: { fleetId: string; party: string; version: number; scopes: readonly string[]; listed: readonly ListedScope[] | null; canChange: boolean }) {\n return (\n <Toast.Provider>\n <AgentNeedsLine {...props} />\n <TableToasts />\n </Toast.Provider>\n );\n}\n\nfunction AgentNeedsLine({ fleetId, party, version, scopes, listed, canChange }: { fleetId: string; party: string; version: number; scopes: readonly string[]; listed: readonly ListedScope[] | null; canChange: boolean }) {\n const router = useRouter();\n const toasts = Toast.useToastManager();\n const [, startTransition] = useTransition();\n const [isReloading, startReload] = useTransition();\n const [isOpen, setIsOpen] = useState(false);\n const [picked, setPicked] = useState<string[]>([]);\n const [isSaving, setIsSaving] = useState(false);\n const [refusal, setRefusal] = useState<DialogRefusal | null>(null);\n const [keptVersion, setKeptVersion] = useState<number | null>(null);\n const [round, setRound] = useState(0);\n const [kept, setKept] = useState<{ basis: readonly string[]; scopes: readonly string[] } | null>(null);\n // What was kept shows at once; once the page read itself again, its scopes are the truth.\n const shown = kept?.basis === scopes ? kept.scopes : scopes;\n\n const save = () => {\n setIsSaving(true);\n setRefusal(null);\n const madeOn = Math.max(version, keptVersion ?? 0);\n startTransition(async () => {\n const outcome = await setPartyScopes({ fleetId, name: party, version: madeOn, party: picked, tools: [] });\n setIsSaving(false);\n if (!outcome.isOk) {\n setRefusal({ message: outcome.message, isConflict: outcome.isConflict, version: madeOn });\n return;\n }\n setKeptVersion(outcome.version);\n setKept({ basis: scopes, scopes: picked });\n setIsOpen(false);\n setRound((previous) => previous + 1);\n toasts.add({ title: statedMessage(agentScopesSetMessage({ party, scopes: picked }), outcome.statementRefusal) });\n router.refresh();\n });\n };\n\n return (\n <div key={round} className={`flex flex-wrap items-center gap-2 rounded-md ${round > 0 ? 'animate-highlight' : ''}`} data-testid=\"agent-needs\">\n <NeedsChips own={shown} listed={listed === null ? null : new Set(listed.map(({ scope }) => scope))} />\n {canChange && listed !== null ? (\n <>\n <button\n type=\"button\"\n className=\"text-primary hover:underline\"\n onClick={() => {\n setPicked([...shown]);\n setRefusal(null);\n setIsOpen(true);\n }}\n data-testid=\"agent-needs-change\"\n >\n Change…\n </button>\n <TableDialog\n isOpen={isOpen}\n onClose={() => { setIsOpen(false); }}\n title=\"Every message needs\"\n description={`The scopes a calling ship must hold to message ${party}.`}\n appliesTo={`Applies to every message to ${party}`}\n action={{ label: 'Save', pending: 'Saving…', isDisabled: false, onPress: save }}\n isSaving={isSaving}\n refusal={standingRefusal(refusal, Math.max(version, keptVersion ?? 0))}\n isReloading={isReloading}\n onReload={() => {\n startReload(() => {\n router.refresh();\n });\n }}\n testId=\"agent-needs-dialog\"\n >\n <ScopePicker label=\"Scopes\" listed={listed} picked={picked} onPick={setPicked} isDisabled={isSaving} testId=\"agent-needs-picker\" />\n </TableDialog>\n </>\n ) : null}\n </div>\n );\n}\n","'use client';\n\nimport * as React from 'react';\nimport { useDialogRootContext } from \"../../dialog/root/DialogRootContext.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { popupTransitionStateMapping } from \"../../utils/popupStateMapping.mjs\";\nimport * as DrawerPopupCssVars from \"../popup/DrawerPopupCssVars.mjs\";\nimport * as DrawerBackdropCssVars from \"./DrawerBackdropCssVars.mjs\";\n\n/**\n * An overlay displayed beneath the popup.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Drawer](https://base-ui.com/react/components/drawer)\n */\nexport const DrawerBackdrop = /*#__PURE__*/React.forwardRef(function DrawerBackdrop(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n forceRender = false,\n ...elementProps\n } = componentProps;\n const store = useDialogRootContext();\n const open = store.useState('open');\n const nested = store.useState('nested');\n const mounted = store.useState('mounted');\n const transitionStatus = store.useState('transitionStatus');\n const state = {\n open,\n transitionStatus\n };\n return useRenderElement('div', componentProps, {\n state,\n ref: [store.context.backdropRef, forwardedRef],\n stateAttributesMapping: popupTransitionStateMapping,\n props: [{\n role: 'presentation',\n hidden: !mounted,\n style: {\n pointerEvents: !open ? 'none' : undefined,\n userSelect: 'none',\n WebkitUserSelect: 'none',\n [DrawerBackdropCssVars.swipeProgress]: '0',\n [DrawerPopupCssVars.swipeStrength]: '1'\n }\n }, elementProps],\n enabled: forceRender || !nested\n });\n});\nif (process.env.NODE_ENV !== \"production\") DrawerBackdrop.displayName = \"DrawerBackdrop\";","/**\n * The number of nested drawers that are currently open.\n * @type {number}\n */\nexport const nestedDrawers = '--nested-drawers';\n/**\n * The height of the drawer popup.\n * @type {CSS length}\n */\nexport const height = '--drawer-height';\n/**\n * The height of the frontmost open drawer in the current nested drawer stack.\n * @type {CSS length}\n */\nexport const frontmostHeight = '--drawer-frontmost-height';\n/**\n * The swipe movement on the X axis.\n * @type {CSS length}\n */\nexport const swipeMovementX = '--drawer-swipe-movement-x';\n/**\n * The swipe movement on the Y axis.\n * @type {CSS length}\n */\nexport const swipeMovementY = '--drawer-swipe-movement-y';\n/**\n * The snap point offset used for translating the drawer.\n * @type {CSS length}\n */\nexport const snapPointOffset = '--drawer-snap-point-offset';\n/**\n * A scalar (0.1-1) used to scale the swipe release transition duration in CSS.\n * @type {number}\n */\nexport const swipeStrength = '--drawer-swipe-strength';","/**\n * The swipe progress of the drawer gesture.\n * @type {number}\n */\nexport const swipeProgress = '--drawer-swipe-progress';","'use client';\n\nimport { DialogClose } from \"../../dialog/close/DialogClose.mjs\";\n/**\n * A button that closes the drawer.\n * Renders a `<button>` element.\n *\n * Documentation: [Base UI Drawer](https://base-ui.com/react/components/drawer)\n */\nexport const DrawerClose = DialogClose;","export const DRAWER_CONTENT_ATTRIBUTE = 'data-drawer-content';","'use client';\n\nimport * as React from 'react';\nimport { useDialogRootContext } from \"../../dialog/root/DialogRootContext.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { DRAWER_CONTENT_ATTRIBUTE } from \"./drawerContentAttribute.mjs\";\n\n/**\n * A container for the drawer contents.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Drawer](https://base-ui.com/react/components/drawer)\n */\nexport const DrawerContent = /*#__PURE__*/React.forwardRef(function DrawerContent(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n ...elementProps\n } = componentProps;\n useDialogRootContext();\n return useRenderElement('div', componentProps, {\n ref: forwardedRef,\n props: [{\n [DRAWER_CONTENT_ATTRIBUTE]: ''\n }, elementProps]\n });\n});\nif (process.env.NODE_ENV !== \"production\") DrawerContent.displayName = \"DrawerContent\";","'use client';\n\nimport * as React from 'react';\nimport { error } from '@base-ui/utils/error';\nimport { SafeReact } from '@base-ui/utils/safeReact';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { EMPTY_OBJECT } from '@base-ui/utils/empty';\nimport { FloatingFocusManager } from \"../../floating-ui-react/index.mjs\";\nimport { useDialogRootContext } from \"../../dialog/root/DialogRootContext.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { popupTransitionStateMapping } from \"../../utils/popupStateMapping.mjs\";\nimport * as DrawerBackdropCssVars from \"../backdrop/DrawerBackdropCssVars.mjs\";\nimport * as DrawerPopupCssVars from \"./DrawerPopupCssVars.mjs\";\nimport * as DrawerPopupDataAttributes from \"./DrawerPopupDataAttributes.mjs\";\nimport { useDialogPortalContext } from \"../../dialog/portal/DialogPortalContext.mjs\";\nimport { useOpenChangeComplete } from \"../../internals/useOpenChangeComplete.mjs\";\nimport { COMPOSITE_KEYS } from \"../../internals/composite/composite.mjs\";\nimport { useDrawerRootContext } from \"../root/DrawerRootContext.mjs\";\nimport { getSnapPointSwipeMovement, useDrawerSnapPoints } from \"../root/useDrawerSnapPoints.mjs\";\nimport { useDrawerViewportContext } from \"../viewport/DrawerViewportContext.mjs\";\nimport { FOCUSABLE_POPUP_PROPS } from \"../../utils/popups/index.mjs\";\n\n// Module-level flag to ensure we only register the CSS properties once,\n// regardless of how many Drawer components are mounted.\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nlet drawerSwipeVarsRegistered = false;\n\n/**\n * Removes inheritance of high-frequency drawer swipe CSS variables, which\n * reduces style recalculation cost in complex drawers with deep subtrees.\n * See https://motion.dev/blog/web-animation-performance-tier-list\n * under the \"Improving CSS variable performance\" section.\n */\nfunction removeCSSVariableInheritance() {\n if (drawerSwipeVarsRegistered) {\n return;\n }\n\n // Intentionally keep inheritance disabled on WebKit as well. Safari doesn't support\n // opting descendants back in via `--var: inherit` for custom properties registered\n // with `inherits: false`, but Drawer does not rely on descendant access to these vars\n // (unlike ScrollArea), so we keep the performance optimization enabled.\n if (typeof CSS !== 'undefined' && 'registerProperty' in CSS) {\n [DrawerPopupCssVars.swipeMovementX, DrawerPopupCssVars.swipeMovementY, DrawerPopupCssVars.snapPointOffset].forEach(name => {\n try {\n CSS.registerProperty({\n name,\n syntax: '<length>',\n inherits: false,\n initialValue: '0px'\n });\n } catch {\n /* ignore already-registered */\n }\n });\n [{\n name: DrawerBackdropCssVars.swipeProgress,\n initialValue: '0'\n }, {\n name: DrawerPopupCssVars.swipeStrength,\n initialValue: '1'\n }].forEach(({\n name,\n initialValue\n }) => {\n try {\n CSS.registerProperty({\n name,\n syntax: '<number>',\n inherits: false,\n initialValue\n });\n } catch {\n /* ignore already-registered */\n }\n });\n }\n drawerSwipeVarsRegistered = true;\n}\nconst stateAttributesMapping = {\n ...popupTransitionStateMapping,\n expanded(value) {\n return value ? {\n [DrawerPopupDataAttributes.expanded]: ''\n } : null;\n },\n nestedDrawerOpen(value) {\n return value ? {\n [DrawerPopupDataAttributes.nestedDrawerOpen]: ''\n } : null;\n },\n nestedDrawerSwiping(value) {\n return value ? {\n [DrawerPopupDataAttributes.nestedDrawerSwiping]: ''\n } : null;\n },\n swipeDirection(value) {\n return {\n [DrawerPopupDataAttributes.swipeDirection]: value\n };\n },\n swiping(value) {\n return value ? {\n [DrawerPopupDataAttributes.swiping]: ''\n } : null;\n }\n};\n\n/**\n * A container for the drawer contents.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Drawer](https://base-ui.com/react/components/drawer)\n */\nexport const DrawerPopup = /*#__PURE__*/React.forwardRef(function DrawerPopup(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n finalFocus,\n initialFocus,\n ...elementProps\n } = componentProps;\n const store = useDialogRootContext();\n const popupRef = store.context.popupRef;\n const {\n swipeDirection,\n frontmostHeight,\n hasNestedDrawer,\n nestedSwiping,\n nestedSwipeProgressStore,\n onPopupHeightChange,\n notifyParentFrontmostHeight,\n notifyParentHasNestedDrawer\n } = useDrawerRootContext();\n const descriptionElementId = store.useState('descriptionElementId');\n const disablePointerDismissal = store.useState('disablePointerDismissal');\n const floatingRootContext = store.useState('floatingRootContext');\n const rootPopupProps = store.useState('popupProps');\n const modal = store.useState('modal');\n const mounted = store.useState('mounted');\n const nested = store.useState('nested');\n const nestedOpenDrawerCount = store.useState('nestedOpenDrawerCount');\n const transitionStatus = store.useState('transitionStatus');\n const open = store.useState('open');\n const openMethod = store.useState('openMethod');\n const titleElementId = store.useState('titleElementId');\n const role = store.useState('role');\n const floatingId = floatingRootContext.useState('floatingId');\n const popupId = elementProps.id ?? floatingId;\n const swipe = useDrawerViewportContext();\n useDialogPortalContext();\n const {\n snapPoints,\n activeSnapPoint,\n activeSnapPointOffset\n } = useDrawerSnapPoints();\n const nestedDrawerOpen = nestedOpenDrawerCount > 0;\n const swiping = swipe?.swiping ?? false;\n const swipeStrength = swipe?.swipeStrength ?? null;\n const [popupHeight, setPopupHeight] = React.useState(0);\n const popupHeightRef = React.useRef(0);\n\n /* istanbul ignore else -- process.env.NODE_ENV is a build-time constant. */\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useEffect(() => {\n if (swipe) {\n return;\n }\n const ownerStackMessage = SafeReact.captureOwnerStack?.() || '';\n const message = '<Drawer.Popup> expected to be rendered within <Drawer.Viewport>. Omitting the ' + 'viewport disables drawer swipe handling and touch scroll locking. Wrap ' + '<Drawer.Popup> in <Drawer.Viewport>.';\n error(`${message}${ownerStackMessage}`);\n }, [swipe]);\n }\n const measureHeight = useStableCallback(() => {\n const popupElement = popupRef.current;\n if (!popupElement) {\n return;\n }\n const offsetHeight = popupElement.offsetHeight;\n\n // Only skip while the element is still actually stretched beyond its last measured height.\n if (popupHeightRef.current > 0 && frontmostHeight > popupHeightRef.current && offsetHeight > popupHeightRef.current) {\n return;\n }\n const keepHeightWhileNested = popupHeightRef.current > 0 && hasNestedDrawer;\n if (keepHeightWhileNested) {\n const oldHeight = popupHeightRef.current;\n setPopupHeight(oldHeight);\n onPopupHeightChange(oldHeight);\n return;\n }\n const nextHeight = offsetHeight;\n if (nextHeight === popupHeightRef.current) {\n return;\n }\n popupHeightRef.current = nextHeight;\n setPopupHeight(nextHeight);\n onPopupHeightChange(nextHeight);\n });\n useIsoLayoutEffect(() => {\n if (!mounted) {\n popupHeightRef.current = 0;\n setPopupHeight(0);\n onPopupHeightChange(0);\n return undefined;\n }\n const popupElement = popupRef.current;\n if (!popupElement) {\n return undefined;\n }\n removeCSSVariableInheritance();\n measureHeight();\n if (typeof ResizeObserver !== 'function') {\n return undefined;\n }\n const resizeObserver = new ResizeObserver(measureHeight);\n resizeObserver.observe(popupElement);\n return () => {\n resizeObserver.disconnect();\n };\n }, [measureHeight, mounted, nestedDrawerOpen, onPopupHeightChange, popupRef]);\n useIsoLayoutEffect(() => {\n const syncNestedSwipeProgress = () => {\n const popupElement = popupRef.current;\n if (!popupElement) {\n return;\n }\n const progress = nestedSwipeProgressStore.getSnapshot();\n if (progress > 0) {\n popupElement.style.setProperty(DrawerBackdropCssVars.swipeProgress, `${progress}`);\n } else {\n popupElement.style.setProperty(DrawerBackdropCssVars.swipeProgress, '0');\n }\n };\n syncNestedSwipeProgress();\n const unsubscribe = nestedSwipeProgressStore.subscribe(syncNestedSwipeProgress);\n const popupElement = popupRef.current;\n return () => {\n unsubscribe();\n if (popupElement) {\n popupElement.style.setProperty(DrawerBackdropCssVars.swipeProgress, '0');\n }\n };\n }, [nestedSwipeProgressStore, popupRef]);\n useIsoLayoutEffect(() => {\n if (!open) {\n return undefined;\n }\n notifyParentFrontmostHeight?.(frontmostHeight);\n return () => {\n notifyParentFrontmostHeight?.(0);\n };\n }, [frontmostHeight, open, notifyParentFrontmostHeight]);\n useIsoLayoutEffect(() => {\n if (!notifyParentHasNestedDrawer) {\n return undefined;\n }\n const present = open || transitionStatus === 'ending';\n notifyParentHasNestedDrawer(present);\n return () => {\n notifyParentHasNestedDrawer(false);\n };\n }, [notifyParentHasNestedDrawer, open, transitionStatus]);\n useOpenChangeComplete({\n open,\n ref: popupRef,\n onComplete() {\n if (open) {\n store.context.onOpenChangeComplete?.(true);\n }\n }\n });\n const resolvedInitialFocus = initialFocus === undefined ? popupRef : initialFocus;\n const setPopupElement = store.useStateSetter('popupElement');\n const state = {\n open,\n nested,\n transitionStatus,\n expanded: activeSnapPoint === 1,\n nestedDrawerOpen,\n nestedDrawerSwiping: nestedSwiping,\n swipeDirection,\n swiping\n };\n let popupHeightCssVarValue;\n const shouldUseAutoHeight = !hasNestedDrawer && transitionStatus !== 'ending';\n if (popupHeight && !shouldUseAutoHeight) {\n popupHeightCssVarValue = `${popupHeight}px`;\n }\n const shouldApplySnapPoints = snapPoints && snapPoints.length > 0 && (swipeDirection === 'down' || swipeDirection === 'up');\n let snapPointOffsetValue = null;\n if (shouldApplySnapPoints && activeSnapPointOffset !== null) {\n snapPointOffsetValue = swipeDirection === 'up' ? -activeSnapPointOffset : activeSnapPointOffset;\n }\n let dragStyles = swipe ? swipe.getDragStyles() : EMPTY_OBJECT;\n if (shouldApplySnapPoints && swipeDirection === 'down') {\n const baseOffset = activeSnapPointOffset ?? 0;\n const movementValue = Number.parseFloat(String(dragStyles[DrawerPopupCssVars.swipeMovementY]));\n if (swiping && Number.isFinite(movementValue)) {\n dragStyles = {\n ...dragStyles,\n transform: undefined,\n [DrawerPopupCssVars.swipeMovementY]: `${getSnapPointSwipeMovement(baseOffset, movementValue)}px`\n };\n } else {\n dragStyles = {\n ...dragStyles,\n transform: undefined\n };\n }\n }\n const element = useRenderElement('div', componentProps, {\n state,\n props: [rootPopupProps, {\n id: popupId,\n 'aria-labelledby': titleElementId,\n 'aria-describedby': descriptionElementId,\n role,\n ...FOCUSABLE_POPUP_PROPS,\n hidden: !mounted,\n onKeyDown(event) {\n if (COMPOSITE_KEYS.has(event.key)) {\n event.stopPropagation();\n }\n },\n style: {\n ...dragStyles,\n [DrawerBackdropCssVars.swipeProgress]: '0',\n [DrawerPopupCssVars.nestedDrawers]: nestedOpenDrawerCount,\n [DrawerPopupCssVars.height]: popupHeightCssVarValue,\n [DrawerPopupCssVars.snapPointOffset]: typeof snapPointOffsetValue === 'number' ? `${snapPointOffsetValue}px` : '0px',\n [DrawerPopupCssVars.frontmostHeight]: frontmostHeight ? `${frontmostHeight}px` : undefined,\n [DrawerPopupCssVars.swipeStrength]: typeof swipeStrength === 'number' && Number.isFinite(swipeStrength) && swipeStrength > 0 ? `${swipeStrength}` : '1'\n }\n }, elementProps],\n ref: [forwardedRef, popupRef, setPopupElement],\n stateAttributesMapping\n });\n return /*#__PURE__*/_jsx(FloatingFocusManager, {\n context: floatingRootContext,\n openInteractionType: openMethod,\n disabled: !mounted,\n closeOnFocusOut: !disablePointerDismissal,\n initialFocus: resolvedInitialFocus,\n returnFocus: finalFocus,\n modal: modal !== false,\n restoreFocus: \"popup\",\n children: element\n });\n});\nif (process.env.NODE_ENV !== \"production\") DrawerPopup.displayName = \"DrawerPopup\";","import { CommonPopupDataAttributes } from \"../../utils/popupStateMapping.mjs\";\n\n/**\n * Present when the drawer is open.\n */\nexport const open = CommonPopupDataAttributes.open;\n/**\n * Present when the drawer is closed.\n */\nexport const closed = CommonPopupDataAttributes.closed;\n/**\n * Present when the drawer begins animating in.\n */\nexport const startingStyle = CommonPopupDataAttributes.startingStyle;\n/**\n * Present when the drawer is animating out.\n */\nexport const endingStyle = CommonPopupDataAttributes.endingStyle;\n/**\n * Present when the drawer is at the expanded (full-height) snap point.\n */\nexport const expanded = 'data-expanded';\n/**\n * Present when a nested drawer is open.\n */\nexport const nestedDrawerOpen = 'data-nested-drawer-open';\n/**\n * Present when a nested drawer is being swiped.\n */\nexport const nestedDrawerSwiping = 'data-nested-drawer-swiping';\n/**\n * Present when the drawer is dismissed by swiping.\n */\nexport const swipeDismiss = 'data-swipe-dismiss';\n/**\n * Indicates the swipe direction.\n * @type {'up' | 'down' | 'left' | 'right'}\n */\nexport const swipeDirection = 'data-swipe-direction';\n/**\n * Present when the drawer is being swiped.\n */\nexport const swiping = 'data-swiping';","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const DrawerRootContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") DrawerRootContext.displayName = \"DrawerRootContext\";\nexport function useDrawerRootContext(optional) {\n const drawerRootContext = React.useContext(DrawerRootContext);\n if (optional !== true && drawerRootContext === undefined) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: DrawerRootContext is missing. Drawer parts must be placed within <Drawer.Root>.' : _formatErrorMessage(90));\n }\n return drawerRootContext;\n}","'use client';\n\nimport * as React from 'react';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { ownerDocument } from '@base-ui/utils/owner';\nimport { clamp } from '@base-ui/utils/clamp';\nimport { useDialogRootContext } from \"../../dialog/root/DialogRootContext.mjs\";\nimport { useDrawerRootContext } from \"./DrawerRootContext.mjs\";\n/**\n * Resolves the vertical swipe movement for a snap point, applying square-root damping once the drag\n * overshoots the fully-open edge (`nextOffset < 0`) so the popup resists travelling past it.\n */\nexport function getSnapPointSwipeMovement(baseOffset, movementValue) {\n const nextOffset = baseOffset + movementValue;\n if (nextOffset >= 0) {\n return movementValue;\n }\n return -Math.sqrt(-nextOffset) - baseOffset;\n}\nfunction resolveSnapPointValue(snapPoint, viewportHeight, rootFontSize) {\n if (!Number.isFinite(viewportHeight) || viewportHeight <= 0) {\n return null;\n }\n if (typeof snapPoint === 'number') {\n if (!Number.isFinite(snapPoint)) {\n return null;\n }\n if (snapPoint <= 1) {\n return clamp(snapPoint, 0, 1) * viewportHeight;\n }\n return snapPoint;\n }\n const trimmed = snapPoint.trim();\n if (trimmed.endsWith('px')) {\n const value = Number.parseFloat(trimmed);\n return Number.isFinite(value) ? value : null;\n }\n if (trimmed.endsWith('rem')) {\n const value = Number.parseFloat(trimmed);\n return Number.isFinite(value) ? value * rootFontSize : null;\n }\n return null;\n}\n\n/**\n * Returns the index of the value closest to `target`, or `-1` if `values` is empty.\n */\nexport function closestSnapPointIndex(values, target) {\n let closestIndex = -1;\n let closestDistance = Infinity;\n for (let index = 0; index < values.length; index += 1) {\n const distance = Math.abs(values[index] - target);\n if (distance < closestDistance) {\n closestDistance = distance;\n closestIndex = index;\n }\n }\n return closestIndex;\n}\nexport function useDrawerSnapPoints() {\n const store = useDialogRootContext();\n const {\n snapPoints,\n activeSnapPoint,\n setActiveSnapPoint,\n popupHeight\n } = useDrawerRootContext();\n const viewportElement = store.useState('viewportElement');\n const [viewportHeight, setViewportHeight] = React.useState(0);\n const [rootFontSize, setRootFontSize] = React.useState(16);\n const measureViewportHeight = useStableCallback(() => {\n const doc = ownerDocument(viewportElement);\n const html = doc.documentElement;\n setViewportHeight(viewportElement ? viewportElement.offsetHeight : html.clientHeight);\n const fontSize = parseFloat(getComputedStyle(html).fontSize);\n if (Number.isFinite(fontSize)) {\n setRootFontSize(fontSize);\n }\n });\n useIsoLayoutEffect(() => {\n measureViewportHeight();\n if (!viewportElement || typeof ResizeObserver !== 'function') {\n return undefined;\n }\n const resizeObserver = new ResizeObserver(measureViewportHeight);\n resizeObserver.observe(viewportElement);\n return () => {\n resizeObserver.disconnect();\n };\n }, [measureViewportHeight, viewportElement]);\n const resolvedSnapPoints = React.useMemo(() => {\n if (!snapPoints || snapPoints.length === 0 || viewportHeight <= 0 || popupHeight <= 0) {\n return [];\n }\n const maxHeight = Math.min(popupHeight, viewportHeight);\n const resolved = snapPoints.map(value => {\n const resolvedHeight = resolveSnapPointValue(value, viewportHeight, rootFontSize);\n if (resolvedHeight === null) {\n return null;\n }\n const clampedHeight = clamp(resolvedHeight, 0, maxHeight);\n return {\n value,\n height: clampedHeight,\n offset: Math.max(0, popupHeight - clampedHeight)\n };\n }).filter(point => Boolean(point));\n if (resolved.length <= 1) {\n return resolved;\n }\n const deduped = [];\n const seenHeights = [];\n for (let index = resolved.length - 1; index >= 0; index -= 1) {\n const point = resolved[index];\n const isDuplicate = seenHeights.some(height => Math.abs(height - point.height) <= 1);\n if (isDuplicate) {\n continue;\n }\n seenHeights.push(point.height);\n deduped.push(point);\n }\n deduped.reverse();\n return deduped;\n }, [popupHeight, rootFontSize, snapPoints, viewportHeight]);\n const resolvedActiveSnapPoint = React.useMemo(() => {\n if (activeSnapPoint === null) {\n return undefined;\n }\n const exactMatch = resolvedSnapPoints.find(point => Object.is(point.value, activeSnapPoint));\n if (exactMatch) {\n return exactMatch;\n }\n const maxHeight = Math.min(popupHeight, viewportHeight);\n const resolvedHeight = resolveSnapPointValue(activeSnapPoint, viewportHeight, rootFontSize);\n if (resolvedHeight === null) {\n return undefined;\n }\n const clampedHeight = clamp(resolvedHeight, 0, maxHeight);\n return resolvedSnapPoints[closestSnapPointIndex(resolvedSnapPoints.map(point => point.height), clampedHeight)];\n }, [activeSnapPoint, popupHeight, resolvedSnapPoints, rootFontSize, viewportHeight]);\n return {\n snapPoints,\n activeSnapPoint,\n setActiveSnapPoint,\n popupHeight,\n viewportHeight,\n resolvedSnapPoints,\n activeSnapPointOffset: resolvedActiveSnapPoint?.offset ?? null\n };\n}","'use client';\n\nimport * as React from 'react';\nexport const DrawerViewportContext = /*#__PURE__*/React.createContext(null);\nif (process.env.NODE_ENV !== \"production\") DrawerViewportContext.displayName = \"DrawerViewportContext\";\nexport function useDrawerViewportContext() {\n return React.useContext(DrawerViewportContext);\n}","'use client';\n\nimport { DialogPortal } from \"../../dialog/portal/DialogPortal.mjs\";\n/**\n * A portal element that moves the popup to a different part of the DOM.\n * By default, the portal element is appended to `<body>`.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Drawer](https://base-ui.com/react/components/drawer)\n */\nexport const DrawerPortal = DialogPortal;","'use client';\n\nvar _DrawerProviderReport, _DrawerProviderReport2;\nimport * as React from 'react';\nimport { addEventListener } from '@base-ui/utils/addEventListener';\nimport { NOOP } from '@base-ui/utils/empty';\nimport { useControlled } from '@base-ui/utils/useControlled';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { ownerWindow } from '@base-ui/utils/owner';\nimport { platform } from '@base-ui/utils/platform';\nimport { DrawerRootContext, useDrawerRootContext } from \"./DrawerRootContext.mjs\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { useDialogRootContext } from \"../../dialog/root/DialogRootContext.mjs\";\nimport { useRenderDialogRoot } from \"../../dialog/root/useRenderDialogRoot.mjs\";\nimport { useDrawerProviderContext } from \"../provider/DrawerProviderContext.mjs\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Groups all parts of the drawer.\n * Doesn't render its own HTML element.\n *\n * Documentation: [Base UI Drawer](https://base-ui.com/react/components/drawer)\n */\nexport function DrawerRoot(props) {\n const {\n children,\n open: openProp,\n defaultOpen = false,\n onOpenChange,\n onOpenChangeComplete,\n disablePointerDismissal = false,\n modal = true,\n actionsRef,\n handle,\n triggerId: triggerIdProp,\n defaultTriggerId: defaultTriggerIdProp = null,\n swipeDirection = 'down',\n snapToSequentialPoints = false,\n snapPoints,\n snapPoint: snapPointProp,\n defaultSnapPoint,\n onSnapPointChange\n } = props;\n const parentDrawerRootContext = useDrawerRootContext(true);\n const notifyParentSwipeProgressChange = parentDrawerRootContext?.onNestedSwipeProgressChange;\n const notifyParentFrontmostHeight = parentDrawerRootContext?.onNestedFrontmostHeightChange;\n const notifyParentSwipingChange = parentDrawerRootContext?.onNestedSwipingChange;\n const notifyParentHasNestedDrawer = parentDrawerRootContext?.onNestedDrawerPresenceChange;\n const [popupHeight, setPopupHeight] = React.useState(0);\n const [frontmostHeight, setFrontmostHeight] = React.useState(0);\n const [hasNestedDrawer, setHasNestedDrawer] = React.useState(false);\n const [nestedSwiping, setNestedSwiping] = React.useState(false);\n const [nestedSwipeProgressStore] = React.useState(createNestedSwipeProgressStore);\n const resolvedDefaultSnapPoint = defaultSnapPoint !== undefined ? defaultSnapPoint : snapPoints?.[0] ?? null;\n const isSnapPointControlled = snapPointProp !== undefined;\n const [activeSnapPoint, setActiveSnapPointUnwrapped] = useControlled({\n controlled: snapPointProp,\n default: resolvedDefaultSnapPoint,\n name: 'Drawer',\n state: 'snapPoint'\n });\n const isNestedDrawerOpenRef = React.useRef(false);\n const swipeAreaActiveRef = React.useRef(false);\n const setActiveSnapPoint = useStableCallback((nextSnapPoint, eventDetails) => {\n const resolvedEventDetails = eventDetails ?? createChangeEventDetails(REASONS.none);\n onSnapPointChange?.(nextSnapPoint, resolvedEventDetails);\n if (resolvedEventDetails.isCanceled) {\n return;\n }\n setActiveSnapPointUnwrapped(nextSnapPoint);\n });\n const resolvedActiveSnapPoint = React.useMemo(() => {\n if (isSnapPointControlled) {\n return activeSnapPoint;\n }\n if (!snapPoints || snapPoints.length === 0) {\n return activeSnapPoint;\n }\n if (activeSnapPoint === null || !snapPoints.some(snapPoint => Object.is(snapPoint, activeSnapPoint))) {\n return resolvedDefaultSnapPoint;\n }\n return activeSnapPoint;\n }, [activeSnapPoint, isSnapPointControlled, resolvedDefaultSnapPoint, snapPoints]);\n const onPopupHeightChange = useStableCallback(height => {\n setPopupHeight(height);\n if (!isNestedDrawerOpenRef.current && height > 0) {\n setFrontmostHeight(height);\n }\n });\n const onNestedFrontmostHeightChange = useStableCallback(height => {\n if (height > 0) {\n isNestedDrawerOpenRef.current = true;\n setFrontmostHeight(height);\n return;\n }\n isNestedDrawerOpenRef.current = false;\n if (popupHeight > 0) {\n setFrontmostHeight(popupHeight);\n }\n });\n const onNestedDrawerPresenceChange = useStableCallback(present => {\n setHasNestedDrawer(present);\n });\n const onNestedSwipeProgressChange = useStableCallback(progress => {\n nestedSwipeProgressStore.set(progress);\n notifyParentSwipeProgressChange?.(progress);\n });\n const onNestedSwipingChange = useStableCallback(swiping => {\n setNestedSwiping(swiping);\n notifyParentSwipingChange?.(swiping);\n });\n const handleOpenChange = useStableCallback((nextOpen, eventDetails) => {\n onOpenChange?.(nextOpen, eventDetails);\n if (eventDetails.isCanceled) {\n return;\n }\n if (!nextOpen && snapPoints && snapPoints.length > 0) {\n setActiveSnapPoint(resolvedDefaultSnapPoint, createChangeEventDetails(eventDetails.reason, eventDetails.event, eventDetails.trigger));\n }\n });\n const contextValue = React.useMemo(() => ({\n swipeDirection,\n swipeAreaActiveRef,\n snapToSequentialPoints,\n snapPoints,\n activeSnapPoint: resolvedActiveSnapPoint,\n setActiveSnapPoint,\n frontmostHeight,\n popupHeight,\n hasNestedDrawer,\n nestedSwiping,\n nestedSwipeProgressStore,\n onNestedDrawerPresenceChange,\n onPopupHeightChange,\n onNestedFrontmostHeightChange,\n onNestedSwipingChange,\n onNestedSwipeProgressChange,\n notifyParentFrontmostHeight,\n notifyParentSwipingChange,\n notifyParentSwipeProgressChange,\n notifyParentHasNestedDrawer\n }), [resolvedActiveSnapPoint, frontmostHeight, hasNestedDrawer, nestedSwiping, nestedSwipeProgressStore, notifyParentHasNestedDrawer, notifyParentSwipeProgressChange, notifyParentSwipingChange, notifyParentFrontmostHeight, onNestedDrawerPresenceChange, onNestedFrontmostHeightChange, onNestedSwipeProgressChange, onNestedSwipingChange, onPopupHeightChange, popupHeight, setActiveSnapPoint, snapPoints, snapToSequentialPoints, swipeAreaActiveRef, swipeDirection]);\n const resolvedChildren = typeof children === 'function' ? payload => /*#__PURE__*/_jsxs(React.Fragment, {\n children: [_DrawerProviderReport || (_DrawerProviderReport = /*#__PURE__*/_jsx(DrawerProviderReporter, {})), children(payload)]\n }) : /*#__PURE__*/_jsxs(React.Fragment, {\n children: [_DrawerProviderReport2 || (_DrawerProviderReport2 = /*#__PURE__*/_jsx(DrawerProviderReporter, {})), children]\n });\n const dialog = useRenderDialogRoot('drawer', {\n open: openProp,\n defaultOpen,\n onOpenChange: handleOpenChange,\n onOpenChangeComplete,\n disablePointerDismissal,\n modal,\n actionsRef,\n handle,\n triggerId: triggerIdProp,\n defaultTriggerId: defaultTriggerIdProp,\n children: resolvedChildren\n });\n return /*#__PURE__*/_jsx(DrawerRootContext.Provider, {\n value: contextValue,\n children: dialog\n });\n}\nfunction createNestedSwipeProgressStore() {\n let progress = 0;\n const listeners = new Set();\n return {\n getSnapshot: () => progress,\n set(nextProgress) {\n const resolved = Number.isFinite(nextProgress) ? nextProgress : 0;\n if (resolved === progress) {\n return;\n }\n progress = resolved;\n listeners.forEach(listener => {\n listener();\n });\n },\n subscribe(listener) {\n listeners.add(listener);\n return () => {\n listeners.delete(listener);\n };\n }\n };\n}\nfunction DrawerProviderReporter() {\n const providerContext = useDrawerProviderContext();\n const store = useDialogRootContext(false);\n const setDrawerOpen = providerContext?.setDrawerOpen;\n const removeDrawer = providerContext?.removeDrawer;\n const open = store.useState('open');\n const nestedOpenDialogCount = store.useState('nestedOpenDialogCount');\n const popupElement = store.useState('popupElement');\n const isTopmost = nestedOpenDialogCount === 0;\n useIsoLayoutEffect(() => {\n if (!removeDrawer) {\n return undefined;\n }\n return () => {\n removeDrawer(store);\n };\n }, [removeDrawer, store]);\n useIsoLayoutEffect(() => {\n setDrawerOpen?.(store, open);\n }, [open, setDrawerOpen, store]);\n React.useEffect(() => {\n // CloseWatcher enables the Android back gesture (Chromium-only).\n // Keep this Android-only for now to avoid interfering with Escape/nesting semantics on desktop due to `useDismiss`.\n if (!open || !isTopmost || !platform.os.android) {\n return undefined;\n }\n const win = ownerWindow(popupElement);\n const CloseWatcherCtor = win.CloseWatcher;\n if (!CloseWatcherCtor) {\n return undefined;\n }\n function handleCancel(event) {\n if (!store.select('open')) {\n return;\n }\n const eventDetails = createChangeEventDetails(REASONS.closeWatcher, event);\n if (!event.cancelable) {\n // The browser lets only one close request per user activation be prevented; any further\n // request closes the drawer regardless, like a native `<dialog>`.\n eventDetails.cancel = NOOP;\n }\n store.setOpen(false, eventDetails);\n if (eventDetails.isCanceled) {\n // Keeps this watcher active for the next close request.\n event.preventDefault();\n }\n }\n const closeWatcher = new CloseWatcherCtor();\n // The browser destroys the watcher before `close` fires, so the request is handled from\n // `cancel`, where it can still be prevented.\n const unsubscribe = addEventListener(closeWatcher, 'cancel', handleCancel);\n return () => {\n unsubscribe();\n closeWatcher.destroy();\n };\n }, [store, isTopmost, open, popupElement]);\n return null;\n}","'use client';\n\nimport * as React from 'react';\nexport const DrawerProviderContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") DrawerProviderContext.displayName = \"DrawerProviderContext\";\nexport function useDrawerProviderContext() {\n return React.useContext(DrawerProviderContext);\n}","'use client';\n\nimport { DialogTitle } from \"../../dialog/title/DialogTitle.mjs\";\n/**\n * A heading that labels the drawer.\n * Renders an `<h2>` element.\n *\n * Documentation: [Base UI Drawer](https://base-ui.com/react/components/drawer)\n */\nexport const DrawerTitle = DialogTitle;","'use client';\n\nimport { DialogTrigger } from \"../../dialog/trigger/DialogTrigger.mjs\";\n/**\n * A button that opens the drawer.\n * Renders a `<button>` element.\n *\n * Documentation: [Base UI Drawer](https://base-ui.com/react/components/drawer)\n */\nexport const DrawerTrigger = DialogTrigger;","'use client';\n\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { isElement } from '@floating-ui/utils/dom';\nimport { addEventListener } from '@base-ui/utils/addEventListener';\nimport { ownerDocument, ownerWindow } from '@base-ui/utils/owner';\nimport { useAnimationFrame } from '@base-ui/utils/useAnimationFrame';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { clamp } from '@base-ui/utils/clamp';\nimport { useDialogRootContext } from \"../../dialog/root/DialogRootContext.mjs\";\nimport { DialogViewport } from \"../../dialog/viewport/DialogViewport.mjs\";\nimport * as DialogViewportDataAttributes from \"../../dialog/viewport/DialogViewportDataAttributes.mjs\";\nimport { mergeProps } from \"../../merge-props/index.mjs\";\nimport { useDrawerRootContext } from \"../root/DrawerRootContext.mjs\";\nimport { closestSnapPointIndex, getSnapPointSwipeMovement, useDrawerSnapPoints } from \"../root/useDrawerSnapPoints.mjs\";\nimport { useDrawerProviderContext } from \"../provider/DrawerProviderContext.mjs\";\nimport { getDisplacement, useSwipeDismiss } from \"../../utils/useSwipeDismiss.mjs\";\nimport * as DrawerPopupCssVars from \"../popup/DrawerPopupCssVars.mjs\";\nimport * as DrawerPopupDataAttributes from \"../popup/DrawerPopupDataAttributes.mjs\";\nimport * as DrawerBackdropCssVars from \"../backdrop/DrawerBackdropCssVars.mjs\";\nimport { DRAWER_CONTENT_ATTRIBUTE } from \"../content/drawerContentAttribute.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { activeElement, closest, contains, getTarget } from \"../../floating-ui-react/utils.mjs\";\nimport { DrawerViewportContext } from \"./DrawerViewportContext.mjs\";\nimport { TransitionStatusDataAttributes } from \"../../internals/stateAttributesMapping.mjs\";\nimport { findScrollableTouchTarget } from \"../../utils/scrollable.mjs\";\nimport { BASE_UI_SWIPE_IGNORE_ATTRIBUTE, BASE_UI_SWIPE_IGNORE_SELECTOR } from \"../../internals/constants.mjs\";\nimport { getElementAtPoint } from \"../../utils/getElementAtPoint.mjs\";\nimport { useDrawerVirtualKeyboardContext } from \"../virtual-keyboard-provider/DrawerVirtualKeyboardContext.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst MIN_SWIPE_THRESHOLD = 10;\nconst FAST_SWIPE_VELOCITY = 0.5;\nconst SNAP_VELOCITY_THRESHOLD = 0.5;\nconst SNAP_VELOCITY_MULTIPLIER = 300;\nconst MAX_SNAP_VELOCITY = 4;\nconst MIN_SWIPE_RELEASE_VELOCITY = 0.2;\nconst MAX_SWIPE_RELEASE_VELOCITY = 4;\nconst MIN_SWIPE_RELEASE_DURATION_MS = 80;\nconst MAX_SWIPE_RELEASE_DURATION_MS = 360;\nconst MIN_SWIPE_RELEASE_SCALAR = 0.1;\nconst MAX_SWIPE_RELEASE_SCALAR = 1;\nconst AXIS_LOCK_SLOP = 6;\nconst AXIS_LOCK_BIAS = 2;\nconst DRAWER_CONTENT_SELECTOR = `[${DRAWER_CONTENT_ATTRIBUTE}]`;\nconst AXIS_SWIPE_IGNORE_SELECTORS = {\n horizontal: `[${BASE_UI_SWIPE_IGNORE_ATTRIBUTE}=\"x\"]`,\n vertical: `[${BASE_UI_SWIPE_IGNORE_ATTRIBUTE}=\"y\"]`\n};\n/**\n * A positioning container for the drawer popup that can be made scrollable.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Drawer](https://base-ui.com/react/components/drawer)\n */\nexport const DrawerViewport = /*#__PURE__*/React.forwardRef(function DrawerViewport(props, forwardedRef) {\n const {\n render,\n className,\n style,\n children,\n ...elementProps\n } = props;\n const store = useDialogRootContext();\n const popupRef = store.context.popupRef;\n const backdropRef = store.context.backdropRef;\n const {\n swipeDirection,\n notifyParentSwipingChange,\n notifyParentSwipeProgressChange,\n frontmostHeight,\n snapToSequentialPoints,\n swipeAreaActiveRef\n } = useDrawerRootContext();\n const providerContext = useDrawerProviderContext();\n const {\n snapPoints,\n resolvedSnapPoints,\n activeSnapPoint,\n activeSnapPointOffset,\n setActiveSnapPoint,\n popupHeight\n } = useDrawerSnapPoints();\n const open = store.useState('open');\n const mounted = store.useState('mounted');\n const nested = store.useState('nested');\n const nestedOpenDrawerCount = store.useState('nestedOpenDrawerCount');\n const viewportElement = store.useState('viewportElement');\n const popupElementState = store.useState('popupElement');\n const visualStateStore = providerContext?.visualStateStore;\n const nestedDrawerOpen = nestedOpenDrawerCount > 0;\n const scrollAxis = swipeDirection === 'left' || swipeDirection === 'right' ? 'horizontal' : 'vertical';\n const isVerticalScrollAxis = scrollAxis === 'vertical';\n const crossScrollAxis = isVerticalScrollAxis ? 'horizontal' : 'vertical';\n const [swipeRelease, setSwipeRelease] = React.useState(null);\n const pendingSwipeCloseSnapPointRef = React.useRef(undefined);\n const resetSwipeRef = React.useRef(null);\n const controlledDismissFrame = useAnimationFrame();\n const swipingRef = React.useRef(false);\n const nestedSwipeActiveRef = React.useRef(false);\n const lastPointerTypeRef = React.useRef('');\n const ignoreNextTouchStartFromPenRef = React.useRef(false);\n const ignoreTouchSwipeRef = React.useRef(false);\n const touchScrollStateRef = React.useRef(null);\n const virtualKeyboard = useDrawerVirtualKeyboardContext();\n const snapPointRange = React.useMemo(() => {\n if (!snapPoints || snapPoints.length < 2 || resolvedSnapPoints.length < 2 || swipeDirection !== 'down' && swipeDirection !== 'up') {\n return null;\n }\n const offsets = resolvedSnapPoints.map(point => point.offset).sort((a, b) => a - b);\n const minOffset = offsets[0];\n const nextOffset = offsets[1];\n const range = nextOffset - minOffset;\n return {\n minOffset,\n range\n };\n }, [resolvedSnapPoints, snapPoints, swipeDirection]);\n const snapPointProgress = React.useMemo(() => {\n if (!snapPointRange || activeSnapPointOffset === null) {\n return null;\n }\n return clamp((activeSnapPointOffset - snapPointRange.minOffset) / snapPointRange.range, 0, 1);\n }, [activeSnapPointOffset, snapPointRange]);\n const swipeDirections = React.useMemo(() => {\n if (snapPoints && snapPoints.length > 0 && (swipeDirection === 'down' || swipeDirection === 'up')) {\n return swipeDirection === 'down' ? ['down', 'up'] : ['up', 'down'];\n }\n return [swipeDirection];\n }, [snapPoints, swipeDirection]);\n const setSwipeDismissed = useStableCallback(dismissed => {\n popupRef.current?.toggleAttribute(DrawerPopupDataAttributes.swipeDismiss, dismissed);\n backdropRef.current?.toggleAttribute(DrawerPopupDataAttributes.swipeDismiss, dismissed);\n });\n const clearSwipeRelease = useStableCallback(() => {\n setSwipeDismissed(false);\n popupRef.current?.removeAttribute(TransitionStatusDataAttributes.endingStyle);\n setSwipeRelease(null);\n });\n const finishNestedSwipe = useStableCallback(() => {\n if (!nestedSwipeActiveRef.current) {\n return;\n }\n nestedSwipeActiveRef.current = false;\n notifyParentSwipingChange?.(false);\n });\n const applySwipeProgress = useStableCallback((resolvedProgress, shouldTrackProgress, notifyParent) => {\n const isActive = open && !nested && shouldTrackProgress;\n const swipeProgress = isActive ? resolvedProgress : 0;\n const nestedSwipeProgress = open && shouldTrackProgress ? resolvedProgress : 0;\n if (notifyParent && notifyParentSwipeProgressChange) {\n notifyParentSwipeProgressChange(nestedSwipeProgress);\n if (nestedSwipeProgress <= 0) {\n finishNestedSwipe();\n }\n }\n visualStateStore?.set({\n swipeProgress,\n frontmostHeight: swipeProgress > 0 ? frontmostHeight : 0\n });\n const backdropElement = backdropRef.current;\n if (!backdropElement) {\n return;\n }\n const showProgress = isActive && swipeProgress > 0;\n backdropElement.style.setProperty(DrawerBackdropCssVars.swipeProgress, showProgress ? `${swipeProgress}` : '0');\n if (showProgress && frontmostHeight > 0) {\n backdropElement.style.setProperty(DrawerPopupCssVars.height, `${frontmostHeight}px`);\n } else {\n backdropElement.style.removeProperty(DrawerPopupCssVars.height);\n }\n });\n function resolveSwipeRelease(popupElement, direction, deltaX, deltaY, velocityX, velocityY, releaseVelocityX, releaseVelocityY) {\n const size = getBaseSwipeSize(popupElement, direction);\n if (size <= 0) {\n return null;\n }\n\n // The snap point base offset shifts the popup along the dismiss direction for both\n // `down` (+offset) and `up` (-offset), so it always adds to the directional translation.\n const snapPointBaseOffset = (direction === 'down' || direction === 'up') && snapPoints && snapPoints.length > 0 ? activeSnapPointOffset ?? 0 : 0;\n const translationAlongDirection = snapPointBaseOffset + getDisplacement(direction, deltaX, deltaY);\n const remainingDistance = Math.max(0, size - translationAlongDirection);\n if (remainingDistance <= 0) {\n return null;\n }\n const releaseVelocity = getDisplacement(direction, releaseVelocityX, releaseVelocityY);\n const directionalVelocity = Math.abs(releaseVelocity) > 0 ? releaseVelocity : getDisplacement(direction, velocityX, velocityY);\n if (directionalVelocity <= MIN_SWIPE_RELEASE_VELOCITY) {\n return null;\n }\n const clampedVelocity = clamp(directionalVelocity, MIN_SWIPE_RELEASE_VELOCITY, MAX_SWIPE_RELEASE_VELOCITY);\n // The gesture hook supplies finite deltas and velocities. The guards above keep the remaining\n // distance and divisor positive, so the duration stays within [MIN, MAX] and the resulting\n // scalar within (0, 1].\n const durationMs = clamp(remainingDistance / clampedVelocity, MIN_SWIPE_RELEASE_DURATION_MS, MAX_SWIPE_RELEASE_DURATION_MS);\n const normalizedDuration = (durationMs - MIN_SWIPE_RELEASE_DURATION_MS) / (MAX_SWIPE_RELEASE_DURATION_MS - MIN_SWIPE_RELEASE_DURATION_MS);\n return MIN_SWIPE_RELEASE_SCALAR + normalizedDuration * (MAX_SWIPE_RELEASE_SCALAR - MIN_SWIPE_RELEASE_SCALAR);\n }\n function updateNestedSwipeActive(details) {\n if (nestedSwipeActiveRef.current || !details) {\n return;\n }\n const direction = details.direction ?? swipeDirection;\n const delta = getDisplacement(direction, details.deltaX, details.deltaY);\n if (Math.abs(delta) < MIN_SWIPE_THRESHOLD) {\n return;\n }\n nestedSwipeActiveRef.current = true;\n notifyParentSwipingChange?.(true);\n }\n const swipe = useSwipeDismiss({\n enabled: mounted && !nestedDrawerOpen,\n directions: swipeDirections,\n elementRef: store.context.popupRef,\n ignoreSelectorWhenTouch: false,\n ignoreScrollableAncestors: true,\n movementCssVars: {\n x: DrawerPopupCssVars.swipeMovementX,\n y: DrawerPopupCssVars.swipeMovementY\n },\n onSwipeStart(event) {\n if ('touches' in event || event.pointerType === 'touch') {\n return;\n }\n const popupElement = popupRef.current;\n const doc = ownerDocument(popupElement);\n const selection = doc.getSelection?.();\n if (!selection || selection.isCollapsed) {\n return;\n }\n const anchorElement = isElement(selection.anchorNode) ? selection.anchorNode : selection.anchorNode?.parentElement;\n const focusElement = isElement(selection.focusNode) ? selection.focusNode : selection.focusNode?.parentElement;\n if (!contains(popupElement, anchorElement) && !contains(popupElement, focusElement)) {\n return;\n }\n selection.removeAllRanges();\n },\n onSwipingChange(swiping) {\n swipingRef.current = swiping;\n setBackdropSwipingAttribute(store.context.backdropRef.current, swiping);\n if (!swiping && !notifyParentSwipeProgressChange) {\n finishNestedSwipe();\n }\n },\n swipeThreshold({\n element,\n direction\n }) {\n return getBaseSwipeThreshold(element, direction);\n },\n canStart(position, details) {\n const popupElement = store.context.popupRef.current;\n if (!popupElement) {\n return false;\n }\n const nativeEvent = details.nativeEvent;\n const touchLike = 'touches' in nativeEvent || nativeEvent.pointerType === 'touch';\n const touchState = touchLike ? touchScrollStateRef.current : null;\n const doc = popupElement.ownerDocument;\n const elementAtPoint = getElementAtPoint(popupElement.getRootNode(), position.x, position.y);\n // Activation can be deferred until after a touch that started inside has left the popup.\n if (!touchState?.startedInPopup && !contains(popupElement, elementAtPoint)) {\n return false;\n }\n if (touchLike && shouldIgnoreSwipeForTextSelection(doc, popupElement)) {\n return false;\n }\n\n // Over a cross-axis gesture target, stay pending until the drawer axis wins the gesture.\n // Starting on touchstart would leave the drawer swiping (and settling on release) while the\n // cross-axis target handles the drag.\n if (touchState?.hasCrossAxisGestureTarget && !touchState.drawerAxisAttributed && touchState.allowSwipe !== true) {\n return false;\n }\n return true;\n },\n onProgress(progress, details) {\n const swiping = swipingRef.current;\n if (swiping) {\n updateNestedSwipeActive(details);\n }\n const hasSnapPoints = Boolean(snapPoints && snapPoints.length > 0);\n if (swiping && swipeDirection === 'down' && hasSnapPoints && details) {\n const popupElement = store.context.popupRef.current;\n if (popupElement) {\n popupElement.style.removeProperty('transform');\n popupElement.style.setProperty(DrawerPopupCssVars.swipeMovementY, `${getSnapPointSwipeMovement(activeSnapPointOffset ?? 0, details.deltaY)}px`);\n }\n }\n let resolvedProgress = progress;\n if (snapPointRange && popupHeight > 0) {\n const baseOffset = activeSnapPointOffset ?? snapPointRange.minOffset;\n const offsetToProgress = nextOffset => clamp((nextOffset - snapPointRange.minOffset) / snapPointRange.range, 0, 1);\n\n // Outside a drag the hook still reports the last drag deltas, both after a release and\n // on a gesture that never started (e.g. a press inside `Drawer.Content`). Recomputing\n // from them would re-apply drag progress to a drawer that rests on its snap point.\n if (swiping && details && Number.isFinite(details.deltaY)) {\n resolvedProgress = offsetToProgress(clamp(baseOffset + details.deltaY, 0, popupHeight));\n } else if (snapPointProgress !== null) {\n resolvedProgress = snapPointProgress;\n }\n }\n\n // A parent drawer follows an active drag only, so drop it back to zero once the drag ends.\n if (!swiping) {\n notifyParentSwipeProgressChange?.(0);\n finishNestedSwipe();\n }\n applySwipeProgress(resolvedProgress, true, swiping);\n },\n onRelease({\n event,\n deltaX,\n deltaY,\n direction,\n velocityX,\n velocityY,\n releaseVelocityX,\n releaseVelocityY\n }) {\n const popupElement = store.context.popupRef.current;\n if (!popupElement) {\n clearSwipeRelease();\n return undefined;\n }\n const releasePopupElement = popupElement;\n function startSwipeRelease(resolvedDirection) {\n // Start ending transition styles earlier and synchronously to prevent a period where\n // the popup appears stuck on release before the actual closing animation starts.\n finishNestedSwipe();\n setSwipeDismissed(true);\n releasePopupElement.style.removeProperty('transition');\n releasePopupElement.setAttribute(TransitionStatusDataAttributes.endingStyle, '');\n ReactDOM.flushSync(() => {\n setSwipeRelease(resolveSwipeRelease(releasePopupElement, resolvedDirection, deltaX, deltaY, velocityX, velocityY, releaseVelocityX, releaseVelocityY));\n });\n }\n if (!snapPoints || snapPoints.length === 0) {\n if (!direction) {\n clearSwipeRelease();\n return undefined;\n }\n const directionalDelta = getDisplacement(direction, deltaX, deltaY);\n if (directionalDelta <= 0) {\n clearSwipeRelease();\n return false;\n }\n if (getDisplacement(direction, velocityX, velocityY) >= FAST_SWIPE_VELOCITY) {\n startSwipeRelease(direction);\n return true;\n }\n const shouldClose = directionalDelta > getBaseSwipeThreshold(releasePopupElement, direction);\n if (shouldClose) {\n startSwipeRelease(direction);\n } else {\n clearSwipeRelease();\n }\n return shouldClose;\n }\n if (swipeDirection !== 'down' && swipeDirection !== 'up') {\n clearSwipeRelease();\n return undefined;\n }\n if (!popupHeight) {\n clearSwipeRelease();\n return false;\n }\n if (resolvedSnapPoints.length === 0) {\n clearSwipeRelease();\n return undefined;\n }\n const dragDelta = swipeDirection === 'down' ? deltaY : -deltaY;\n const dragDirection = Math.sign(dragDelta);\n const releaseDirectionalVelocity = swipeDirection === 'down' ? releaseVelocityY : -releaseVelocityY;\n const fallbackDirectionalVelocity = swipeDirection === 'down' ? velocityY : -velocityY;\n let resolvedDirectionalVelocity = releaseDirectionalVelocity;\n if (dragDirection !== 0 && Math.abs(dragDelta) >= MIN_SWIPE_THRESHOLD) {\n const velocityDirection = Math.sign(resolvedDirectionalVelocity);\n if (velocityDirection !== 0 && velocityDirection !== dragDirection) {\n // Ignore touch reversals that would otherwise flip the snap decision.\n resolvedDirectionalVelocity = fallbackDirectionalVelocity;\n }\n }\n const currentOffset = activeSnapPointOffset ?? 0;\n const dragTargetOffset = clamp(currentOffset + dragDelta, 0, popupHeight);\n const velocityOffset = Math.abs(resolvedDirectionalVelocity) >= SNAP_VELOCITY_THRESHOLD ? clamp(resolvedDirectionalVelocity, -MAX_SNAP_VELOCITY, MAX_SNAP_VELOCITY) * SNAP_VELOCITY_MULTIPLIER : 0;\n const targetOffset = snapToSequentialPoints ? dragTargetOffset : clamp(dragTargetOffset + velocityOffset, 0, popupHeight);\n const snapPointEventDetails = createChangeEventDetails(REASONS.swipe, event);\n const settleInPlace = () => {\n // Reset nested swipe state now: the hook's trailing progress update is deduped\n // when the drag never produced dismissal progress, so it may not fire.\n applySwipeProgress(0, true, true);\n clearSwipeRelease();\n return false;\n };\n const settleOnSnapPoint = snapPoint => {\n setActiveSnapPoint(snapPoint.value, snapPointEventDetails);\n return settleInPlace();\n };\n const closeFromSnapPoints = fallbackSnapPoint => {\n // An unattributed gesture (e.g. a mostly horizontal flick) may settle on a snap\n // point but must not dismiss: `useSwipeDismiss` drops a directionless dismissal,\n // stranding the popup visually closed while `open` stays `true`.\n if (!direction) {\n return settleOnSnapPoint(fallbackSnapPoint);\n }\n setActiveSnapPoint(null, snapPointEventDetails);\n if (snapPointEventDetails.isCanceled) {\n // A canceled null snap point rejects dismissal before exit styles start.\n return settleInPlace();\n }\n pendingSwipeCloseSnapPointRef.current = activeSnapPoint;\n startSwipeRelease(swipeDirection);\n return true;\n };\n if (snapToSequentialPoints) {\n const orderedSnapPoints = [...resolvedSnapPoints].sort((first, second) => first.offset - second.offset);\n const orderedOffsets = orderedSnapPoints.map(point => point.offset);\n const currentIndex = closestSnapPointIndex(orderedOffsets, currentOffset);\n let targetSnapPoint = orderedSnapPoints[closestSnapPointIndex(orderedOffsets, targetOffset)];\n const velocityDirection = Math.sign(resolvedDirectionalVelocity);\n const shouldAdvance = dragDirection !== 0 && velocityDirection !== 0 && velocityDirection === dragDirection && Math.abs(resolvedDirectionalVelocity) >= SNAP_VELOCITY_THRESHOLD;\n let effectiveTargetOffset = targetOffset;\n if (shouldAdvance) {\n const adjacentIndex = clamp(currentIndex + dragDirection, 0, orderedSnapPoints.length - 1);\n if (adjacentIndex !== currentIndex) {\n const adjacentPoint = orderedSnapPoints[adjacentIndex];\n const shouldForceAdjacent = dragDirection > 0 ? targetOffset < adjacentPoint.offset : targetOffset > adjacentPoint.offset;\n if (shouldForceAdjacent) {\n targetSnapPoint = adjacentPoint;\n effectiveTargetOffset = adjacentPoint.offset;\n }\n } else if (dragDirection > 0) {\n return closeFromSnapPoints(targetSnapPoint);\n }\n }\n const closeDistance = Math.abs(effectiveTargetOffset - popupHeight);\n const snapDistance = Math.abs(effectiveTargetOffset - targetSnapPoint.offset);\n if (closeDistance < snapDistance) {\n return closeFromSnapPoints(targetSnapPoint);\n }\n return settleOnSnapPoint(targetSnapPoint);\n }\n const closestSnapPoint = resolvedSnapPoints[closestSnapPointIndex(resolvedSnapPoints.map(point => point.offset), targetOffset)];\n if (resolvedDirectionalVelocity >= FAST_SWIPE_VELOCITY && dragDelta > 0) {\n return closeFromSnapPoints(closestSnapPoint);\n }\n const closeDistance = Math.abs(targetOffset - popupHeight);\n if (closeDistance < Math.abs(targetOffset - closestSnapPoint.offset)) {\n return closeFromSnapPoints(closestSnapPoint);\n }\n return settleOnSnapPoint(closestSnapPoint);\n },\n onDismiss(event) {\n visualStateStore?.set({\n swipeProgress: 0,\n frontmostHeight: 0\n });\n const backdropElement = store.context.backdropRef.current;\n if (backdropElement) {\n backdropElement.style.setProperty(DrawerBackdropCssVars.swipeProgress, '0');\n backdropElement.style.removeProperty(DrawerPopupCssVars.height);\n }\n const dismissEventDetails = createChangeEventDetails(REASONS.swipe, event);\n store.setOpen(false, dismissEventDetails);\n if (dismissEventDetails.isCanceled) {\n const pendingSnapPoint = pendingSwipeCloseSnapPointRef.current;\n if (pendingSnapPoint !== undefined) {\n setActiveSnapPoint(pendingSnapPoint, createChangeEventDetails(REASONS.swipe, event));\n }\n pendingSwipeCloseSnapPointRef.current = undefined;\n resetSwipeRef.current?.();\n clearSwipeRelease();\n return;\n }\n\n // In controlled mode, the effective open state may not have changed yet\n // (openProp takes precedence over state.open). Proceed optimistically with the\n // dismiss animation — React's Scheduler flushes before the next rAF, so we can\n // reliably check whether the parent accepted or rejected the close.\n // Note: if onOpenChange is asynchronous (e.g., closes the drawer after a network\n // call), the rAF check will see open === true, revert the animation, and the\n // drawer will close without animation when the parent eventually sets open={false}.\n if (store.select('open')) {\n const savedEvent = event;\n controlledDismissFrame.request(() => {\n if (store.select('open')) {\n // Parent rejected: revert animation and restore snap point.\n const pendingSnapPoint = pendingSwipeCloseSnapPointRef.current;\n if (pendingSnapPoint !== undefined) {\n setActiveSnapPoint(pendingSnapPoint, createChangeEventDetails(REASONS.swipe, savedEvent));\n }\n pendingSwipeCloseSnapPointRef.current = undefined;\n clearSwipeRelease();\n resetSwipeRef.current?.();\n } else {\n // Parent accepted: clean up the ref.\n pendingSwipeCloseSnapPointRef.current = undefined;\n }\n });\n return;\n }\n pendingSwipeCloseSnapPointRef.current = undefined;\n setSwipeDismissed(true);\n }\n });\n const swipePointerProps = swipe.getPointerProps();\n const swipeTouchProps = swipe.getTouchProps();\n const {\n moveNative: moveSwipeNative,\n reset: resetSwipe\n } = swipe;\n resetSwipeRef.current = resetSwipe;\n React.useEffect(() => {\n const rootElement = viewportElement ?? popupElementState;\n // A non-passive document listener makes all touch scrolling wait on the main thread.\n if (!rootElement || !open || !mounted) {\n return undefined;\n }\n const resolvedRootElement = rootElement;\n const doc = ownerDocument(resolvedRootElement);\n function processTouchMove(event, touchState, touch) {\n const drawerAxisDelta = isVerticalScrollAxis ? touch.clientY - touchState.lastY : touch.clientX - touchState.lastX;\n\n // Avoid blocking pinch zoom or text selection adjustments on iOS Safari.\n if (event.touches.length === 2) {\n return;\n }\n const allowTouchMove = shouldIgnoreSwipeForTextSelection(doc, resolvedRootElement);\n if (allowTouchMove || nestedDrawerOpen) {\n return;\n }\n if (shouldYieldTouchMove(touchState, event, touch, isVerticalScrollAxis)) {\n return;\n }\n const scrollTarget = touchState.scrollTarget;\n if (!scrollTarget || scrollTarget === doc.documentElement || scrollTarget === doc.body) {\n if (event.cancelable) {\n event.preventDefault();\n }\n // Claim the gesture before React's delegated touch handlers see it; dispatching the\n // move through React re-rasterizes the popup content on every frame.\n event.stopPropagation();\n moveSwipeNative(event, resolvedRootElement);\n return;\n }\n if (!hasScrollableContentOnAxis(scrollTarget, scrollAxis)) {\n // If the scroll container doesn't overflow on the drawer axis, prevent the window from\n // scrolling instead.\n if (event.cancelable) {\n event.preventDefault();\n }\n event.stopPropagation();\n return;\n }\n if (drawerAxisDelta !== 0) {\n const canSwipeFromScrollEdge = canSwipeFromScrollEdgeOnMove(scrollTarget, scrollAxis, swipeDirection, drawerAxisDelta);\n if (!touchState.allowSwipe) {\n if (event.cancelable && canSwipeFromScrollEdge) {\n touchState.allowSwipe = true;\n event.preventDefault();\n } else {\n touchState.allowSwipe = false;\n }\n } else if (event.cancelable) {\n event.preventDefault();\n }\n }\n if (touchState.allowSwipe === true) {\n event.stopPropagation();\n moveSwipeNative(event, resolvedRootElement);\n }\n }\n function handleNativeTouchMove(event) {\n // The virtual keyboard provider observes the move to tell a tap apart from a drag.\n // It must run even when the swipe gesture below claims the event with\n // `stopPropagation()`, which would otherwise prevent React's delegated handlers\n // (and the provider) from ever seeing the move.\n virtualKeyboard?.onTouchMove(event);\n if (ignoreTouchSwipeRef.current) {\n return;\n }\n const touchState = touchScrollStateRef.current;\n const touch = event.touches[0];\n if (!touch || !touchState) {\n return;\n }\n processTouchMove(event, touchState, touch);\n updateTouchScrollPosition(touchState, touch);\n }\n return addEventListener(doc, 'touchmove', handleNativeTouchMove, {\n passive: false,\n capture: true\n });\n }, [mounted, nestedDrawerOpen, open, popupElementState, isVerticalScrollAxis, scrollAxis, swipeDirection, moveSwipeNative, viewportElement, virtualKeyboard]);\n useIsoLayoutEffect(() => {\n if (!snapPointRange || swipe.swiping) {\n return;\n }\n applySwipeProgress(!open || nested ? 0 : snapPointProgress ?? 0, true, false);\n }, [applySwipeProgress, frontmostHeight, nested, notifyParentSwipeProgressChange, open, snapPointProgress, snapPointRange, swipe.swiping, store, visualStateStore]);\n useIsoLayoutEffect(() => {\n if (!notifyParentSwipeProgressChange) {\n return undefined;\n }\n if (!open) {\n notifyParentSwipeProgressChange(0);\n }\n return () => {\n notifyParentSwipeProgressChange(0);\n };\n }, [notifyParentSwipeProgressChange, open]);\n useIsoLayoutEffect(() => {\n if (open) {\n // Skip `resetSwipe` while `Drawer.SwipeArea` is driving the open: it zeroes the popup's\n // `--swipe-movement-*` (via `syncDragStyles(false)`), flashing it fully open for a frame.\n // `clearSwipeRelease` doesn't touch those vars, so always run it to clear any leftover\n // release state from a prior dismiss (e.g. when the popup is kept mounted).\n if (!swipeAreaActiveRef.current) {\n resetSwipe();\n }\n clearSwipeRelease();\n }\n }, [clearSwipeRelease, open, resetSwipe, swipeAreaActiveRef]);\n useIsoLayoutEffect(() => {\n const backdropElement = backdropRef.current;\n return () => {\n visualStateStore?.set({\n swipeProgress: 0,\n frontmostHeight: 0\n });\n setBackdropSwipingAttribute(backdropElement, false);\n // `data-swiping` is set on whichever backdrop is current when a swipe starts, which can\n // differ from the captured element if the backdrop mounted late or changed identity.\n // Reading the live ref here is intentional so the current backdrop is cleared too.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const currentBackdrop = backdropRef.current;\n if (currentBackdrop !== backdropElement) {\n setBackdropSwipingAttribute(currentBackdrop, false);\n }\n finishNestedSwipe();\n };\n }, [backdropRef, finishNestedSwipe, visualStateStore]);\n const swipeProviderValue = React.useMemo(() => ({\n swiping: swipe.swiping,\n getDragStyles: swipe.getDragStyles,\n swipeStrength: swipeRelease ?? null,\n setSwipeDismissed\n }), [setSwipeDismissed, swipe.getDragStyles, swipe.swiping, swipeRelease]);\n function resetTouchSwipeState(ignoreSwipe) {\n ignoreTouchSwipeRef.current = ignoreSwipe;\n touchScrollStateRef.current = null;\n }\n function resetTouchTrackingState() {\n resetTouchSwipeState(false);\n lastPointerTypeRef.current = '';\n ignoreNextTouchStartFromPenRef.current = false;\n }\n function handlePointerEnd(event) {\n lastPointerTypeRef.current = '';\n return event.pointerType !== 'touch';\n }\n return /*#__PURE__*/_jsx(DialogViewport, {\n ref: forwardedRef,\n className: className,\n style: style,\n render: render,\n ...mergeProps(elementProps, {\n onPointerDown(event) {\n lastPointerTypeRef.current = event.pointerType;\n ignoreNextTouchStartFromPenRef.current = event.pointerType === 'pen';\n if (!open || !mounted || nestedDrawerOpen) {\n return;\n }\n const elementAtPoint = getElementAtPoint(event.currentTarget.getRootNode(), event.clientX, event.clientY);\n // Pointer drags capture the pointer on press, so they can't wait to see which axis the\n // gesture takes; any `data-base-ui-swipe-ignore` value ignores them.\n if (isSwipeIgnoredTarget(elementAtPoint) || isDrawerContentTarget(elementAtPoint)) {\n return;\n }\n if (event.pointerType === 'touch') {\n return;\n }\n swipePointerProps.onPointerDown?.(event);\n },\n onPointerMove(event) {\n if (event.pointerType === 'touch') {\n return;\n }\n swipePointerProps.onPointerMove?.(event);\n },\n onPointerUp(event) {\n if (handlePointerEnd(event)) {\n swipePointerProps.onPointerUp?.(event);\n }\n },\n onPointerCancel(event) {\n if (handlePointerEnd(event)) {\n swipePointerProps.onPointerCancel?.(event);\n }\n },\n onTouchStart(event) {\n const startedFromPenPointerDown = lastPointerTypeRef.current === 'pen' && ignoreNextTouchStartFromPenRef.current;\n if (startedFromPenPointerDown) {\n ignoreNextTouchStartFromPenRef.current = false;\n resetTouchSwipeState(false);\n return;\n }\n if (!open || !mounted || nestedDrawerOpen) {\n resetTouchSwipeState(false);\n return;\n }\n const touch = event.touches[0];\n if (!touch) {\n return;\n }\n if (isReactTouchEventOnRangeInput(event)) {\n resetTouchSwipeState(false);\n return;\n }\n const rootElement = event.currentTarget;\n const elementAtPoint = getElementAtPoint(rootElement.getRootNode(), touch.clientX, touch.clientY);\n const eventTarget = getTarget(event.nativeEvent);\n const target = isElement(eventTarget) ? eventTarget : rootElement;\n if (!contains(rootElement, target)) {\n resetTouchSwipeState(true);\n return;\n }\n virtualKeyboard?.onTouchStart(event);\n\n // `x`/`y` hand touch drags along that axis to the element. Any value other than the\n // cross-axis one ignores the swipe outright; a cross-axis element is arbitrated like a\n // native cross-axis scroller below.\n if (closest(elementAtPoint, `${BASE_UI_SWIPE_IGNORE_SELECTOR}:not(${AXIS_SWIPE_IGNORE_SELECTORS[crossScrollAxis]})`)) {\n resetTouchSwipeState(true);\n return;\n }\n ignoreTouchSwipeRef.current = false;\n const scrollTarget = findScrollableTouchTarget(target, rootElement, scrollAxis);\n const hasCrossAxisGestureTarget = findScrollableTouchTarget(target, rootElement, crossScrollAxis) != null || closest(elementAtPoint, AXIS_SWIPE_IGNORE_SELECTORS[crossScrollAxis]) != null;\n let allowSwipe = null;\n if (scrollTarget) {\n const canSwipeFromEdge = isAtSwipeStartEdge(scrollTarget, scrollAxis, swipeDirection);\n allowSwipe = canSwipeFromEdge ? null : false;\n }\n touchScrollStateRef.current = {\n startX: touch.clientX,\n startY: touch.clientY,\n lastX: touch.clientX,\n lastY: touch.clientY,\n startedInPopup: contains(popupRef.current, elementAtPoint),\n scrollTarget,\n hasCrossAxisGestureTarget,\n allowSwipe,\n preserveNativeCrossAxisScroll: false,\n drawerAxisAttributed: false\n };\n swipeTouchProps.onTouchStart?.(event);\n },\n onTouchEnd(event) {\n virtualKeyboard?.onTouchEnd(event);\n resetTouchTrackingState();\n swipeTouchProps.onTouchEnd?.(event);\n },\n onTouchCancel(event) {\n virtualKeyboard?.onTouchCancel();\n resetTouchTrackingState();\n swipeTouchProps.onTouchCancel?.(event);\n },\n // Drawer popups use drawer-specific nested state attributes.\n // Suppress DialogViewport's generic nested dialog attribute.\n [DialogViewportDataAttributes.nestedDialogOpen]: undefined\n }),\n children: /*#__PURE__*/_jsx(DrawerViewportContext.Provider, {\n value: swipeProviderValue,\n children: children\n })\n });\n});\nif (process.env.NODE_ENV !== \"production\") DrawerViewport.displayName = \"DrawerViewport\";\nfunction setBackdropSwipingAttribute(backdropElement, swiping) {\n backdropElement?.toggleAttribute(DrawerPopupDataAttributes.swiping, swiping);\n}\nfunction isSwipeIgnoredTarget(target) {\n return Boolean(closest(target, BASE_UI_SWIPE_IGNORE_SELECTOR));\n}\nfunction isDrawerContentTarget(target) {\n return Boolean(closest(target, DRAWER_CONTENT_SELECTOR));\n}\nfunction getBaseSwipeSize(element, direction) {\n return direction === 'left' || direction === 'right' ? element.offsetWidth : element.offsetHeight;\n}\nfunction getBaseSwipeThreshold(element, direction) {\n return Math.max(getBaseSwipeSize(element, direction) * 0.5, MIN_SWIPE_THRESHOLD);\n}\nfunction isRangeInput(target, win) {\n return target instanceof win.HTMLInputElement && target.type === 'range';\n}\nfunction isTextSelectionControl(target) {\n return target.tagName === 'INPUT' || target.tagName === 'TEXTAREA';\n}\nfunction hasExpandedSelectionWithinTarget(selection, target) {\n const anchorElement = isElement(selection.anchorNode) ? selection.anchorNode : selection.anchorNode?.parentElement;\n const focusElement = isElement(selection.focusNode) ? selection.focusNode : selection.focusNode?.parentElement;\n return selection.containsNode(target, true) || contains(target, anchorElement) || contains(target, focusElement);\n}\nfunction shouldIgnoreSwipeForTextSelection(doc, rootElement) {\n const activeEl = activeElement(doc);\n if (activeEl && contains(rootElement, activeEl) && isTextSelectionControl(activeEl)) {\n const {\n selectionStart,\n selectionEnd\n } = activeEl;\n if (selectionStart != null && selectionEnd != null && selectionStart < selectionEnd) {\n return true;\n }\n }\n const selection = doc.getSelection?.();\n if (!selection || selection.isCollapsed) {\n return false;\n }\n return hasExpandedSelectionWithinTarget(selection, rootElement);\n}\nfunction isEventOnRangeInput(event, win) {\n return event.composedPath().some(pathTarget => isRangeInput(pathTarget, win));\n}\nfunction isReactTouchEventOnRangeInput(event) {\n return isEventOnRangeInput(event.nativeEvent, ownerWindow(event.currentTarget));\n}\nfunction updateTouchScrollPosition(touchState, touch) {\n touchState.lastX = touch.clientX;\n touchState.lastY = touch.clientY;\n}\n\n/**\n * Arbitrates a touchmove between the drawer swipe and a cross-axis gesture: a native scroll, or an\n * element marked with the cross-axis `data-base-ui-swipe-ignore` value.\n * Returns `true` when the move must be left alone — either because the cross axis already won the\n * gesture, or because neither axis has passed the slop yet and the gesture cannot be attributed.\n */\nfunction shouldYieldTouchMove(touchState, event, touch, isVerticalScrollAxis) {\n if (touchState.preserveNativeCrossAxisScroll) {\n return true;\n }\n\n // Attribution happens once per gesture. Re-arbitrating after the drawer axis has won would let\n // the pre-attribution branches below fire mid-drag (the slop is measured from the touch origin,\n // which is never re-baselined), freezing the popup and dropping `preventDefault()`.\n if (touchState.drawerAxisAttributed || touchState.allowSwipe === true || !touchState.hasCrossAxisGestureTarget) {\n return false;\n }\n\n // A non-cancelable touchmove means the browser has already committed the gesture to a native\n // scroll; claiming it for the swipe would drag the popup alongside the scrolling content.\n if (!event.cancelable) {\n touchState.preserveNativeCrossAxisScroll = true;\n return true;\n }\n const drawerAxisGestureDelta = isVerticalScrollAxis ? touch.clientY - touchState.startY : touch.clientX - touchState.startX;\n const crossAxisGestureDelta = isVerticalScrollAxis ? touch.clientX - touchState.startX : touch.clientY - touchState.startY;\n const absDrawerAxisGestureDelta = Math.abs(drawerAxisGestureDelta);\n const absCrossAxisGestureDelta = Math.abs(crossAxisGestureDelta);\n if (absCrossAxisGestureDelta >= AXIS_LOCK_SLOP && absCrossAxisGestureDelta > absDrawerAxisGestureDelta + AXIS_LOCK_BIAS) {\n touchState.preserveNativeCrossAxisScroll = true;\n return true;\n }\n if (absDrawerAxisGestureDelta >= AXIS_LOCK_SLOP) {\n touchState.drawerAxisAttributed = true;\n return false;\n }\n\n // Neither axis has traveled past the slop yet, so the gesture cannot be attributed. Leave the\n // event alone: on iOS, `preventDefault()` on the first cancelable touchmove cancels native\n // scrolling for the entire gesture, which would lock a cross-axis scroll that only passes the\n // slop on a later move.\n return true;\n}\nfunction hasScrollableContentOnAxis(scrollTarget, axis) {\n return getScrollMetrics(scrollTarget, axis).max > 0;\n}\nfunction getScrollMetrics(scrollTarget, axis) {\n if (axis === 'vertical') {\n const max = Math.max(0, scrollTarget.scrollHeight - scrollTarget.clientHeight);\n return {\n offset: scrollTarget.scrollTop,\n max\n };\n }\n const max = Math.max(0, scrollTarget.scrollWidth - scrollTarget.clientWidth);\n return {\n offset: scrollTarget.scrollLeft,\n max\n };\n}\nfunction isAtSwipeStartEdge(scrollTarget, axis, direction) {\n const dismissFromStartEdge = shouldDismissFromStartEdge(direction, axis);\n const {\n offset,\n max\n } = getScrollMetrics(scrollTarget, axis);\n return dismissFromStartEdge ? offset <= 0 : offset >= max;\n}\nfunction canSwipeFromScrollEdgeOnMove(scrollTarget, axis, direction, delta) {\n const dismissFromStartEdge = shouldDismissFromStartEdge(direction, axis);\n const movingTowardDismiss = dismissFromStartEdge ? delta > 0 : delta < 0;\n if (!movingTowardDismiss) {\n return false;\n }\n return isAtSwipeStartEdge(scrollTarget, axis, direction);\n}\nfunction shouldDismissFromStartEdge(direction, axis) {\n return axis === 'vertical' ? direction === 'down' : direction === 'right';\n}","'use client';\n\nimport * as React from 'react';\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { useDialogRootContext } from \"../root/DialogRootContext.mjs\";\nimport { useDialogPortalContext } from \"../portal/DialogPortalContext.mjs\";\nimport { dialogStateAttributesMapping } from \"../utils/stateAttributesMapping.mjs\";\n\n/**\n * A positioning container for the dialog popup that can be made scrollable.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Dialog](https://base-ui.com/react/components/dialog)\n */\nexport const DialogViewport = /*#__PURE__*/React.forwardRef(function DialogViewport(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n children,\n ...elementProps\n } = componentProps;\n const keepMounted = useDialogPortalContext();\n const store = useDialogRootContext();\n const open = store.useState('open');\n const nested = store.useState('nested');\n const transitionStatus = store.useState('transitionStatus');\n const nestedOpenDialogCount = store.useState('nestedOpenDialogCount');\n const mounted = store.useState('mounted');\n const setViewportElement = store.useStateSetter('viewportElement');\n const nestedDialogOpen = nestedOpenDialogCount > 0;\n const state = {\n open,\n nested,\n transitionStatus,\n nestedDialogOpen\n };\n const shouldRender = keepMounted || mounted;\n return useRenderElement('div', componentProps, {\n enabled: shouldRender,\n state,\n ref: [forwardedRef, setViewportElement],\n stateAttributesMapping: dialogStateAttributesMapping,\n props: [{\n role: 'presentation',\n hidden: !mounted,\n style: {\n pointerEvents: !open ? 'none' : undefined\n },\n children\n }, elementProps]\n });\n});\nif (process.env.NODE_ENV !== \"production\") DialogViewport.displayName = \"DialogViewport\";","import { CommonPopupDataAttributes } from \"../../utils/popupStateMapping.mjs\";\n\n/**\n * Present when the dialog is open.\n */\nexport const open = CommonPopupDataAttributes.open;\n/**\n * Present when the dialog is closed.\n */\nexport const closed = CommonPopupDataAttributes.closed;\n/**\n * Present when the dialog begins animating in.\n */\nexport const startingStyle = CommonPopupDataAttributes.startingStyle;\n/**\n * Present when the dialog is animating out.\n */\nexport const endingStyle = CommonPopupDataAttributes.endingStyle;\n/**\n * Present when the dialog is nested within another dialog.\n */\nexport const nested = 'data-nested';\n/**\n * Present when the dialog has other open dialogs nested within it.\n */\nexport const nestedDialogOpen = 'data-nested-dialog-open';","'use client';\n\nimport * as React from 'react';\nexport const DrawerVirtualKeyboardContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") DrawerVirtualKeyboardContext.displayName = \"DrawerVirtualKeyboardContext\";\nexport function useDrawerVirtualKeyboardContext() {\n return React.useContext(DrawerVirtualKeyboardContext);\n}","'use client';\n\nimport { Drawer } from '@base-ui/react/drawer';\nimport { Toast } from '@base-ui/react/toast';\nimport { useRouter } from 'next/navigation';\nimport { useState, useTransition } from 'react';\n\nimport { BUTTONS, INPUT } from '../../../forms/ui/look';\nimport { Switch } from '../../../forms/ui/switch';\nimport { ActionButton } from '../../../bridge/ui/action-button';\nimport { StatusBadge, Tag } from '../../../outside-parties/ui/status-badge';\nimport { setPartyScopes, switchPartyTools, type TableOutcome } from '../../actions';\nimport { switchedMessageOf } from '../../switched-message';\nimport { hintSuggestionsOf, suggestedScopesOf } from '../hint-suggestions';\nimport { changedScopesOf, SCOPE_CHANGES, type ScopeChange } from '../scope-change';\nimport { partyScopesSetMessage, scopesSetMessage, statedMessage, suggestionsSetMessage, toolsSwitchedMessage } from '../table-messages';\nimport { keptToolsOf, shownTools, STATE_FILTERS, type KeptChanges, type StateFilter, type TableTool } from '../table-tools';\nimport { NeedsChips, type ListedScope } from './needs-chips';\nimport { ScopePicker } from './scope-picker';\nimport { standingRefusal, TableDialog, type DialogRefusal } from './table-dialog';\nimport { TableToasts } from './table-toasts';\n\n/** What the table shows of one outside MCP server, as its page read it. */\nexport interface ToolsTableProps {\n fleetId: string;\n party: string;\n tools: readonly TableTool[];\n /** The requirements' version the page read, which every change is made on. */\n version: number;\n partyScopes: readonly string[];\n /** The scopes the fleet lists, for an approver; none for anyone else. */\n listed: readonly ListedScope[] | null;\n /** Whether the actor approves the party: gateway:approve within manage reach. Others see the table read-only. */\n canChange: boolean;\n /** Why the server's tools could not be read: the table then shows the requirements kept per tool name. */\n serverRefusal: string | null;\n}\n\ntype OpenDialog = 'scopes' | 'party' | 'suggest' | null;\n\nconst ALL_SELECTED = 'Select all shown';\n\nfunction firstLineOf(description: string | undefined): string {\n return description?.split('\\n').find((line) => line.trim() !== '')?.trim() ?? '';\n}\n\n/**\n * An outside MCP server's tools as a table (gateway scopes 4.3, A6): filter\n * by name and state, select many, and set the scopes they need or switch them\n * in one change; set what every tool needs; or suggest scopes from the\n * server's hints. Each change is one transaction on the requirements' version\n * the page read: on success the dialog closes, the changed rows highlight and\n * a Toast says what was kept; a refusal stays inline. Only an approver within\n * manage reach sees the controls; anyone else, the same table read-only.\n */\nexport function ToolsTable(props: ToolsTableProps) {\n return (\n <Toast.Provider>\n <TableBody {...props} />\n <TableToasts />\n </Toast.Provider>\n );\n}\n\n/** What was kept since the page read the rows it was kept on; a fresh read replaces it. */\ninterface Kept extends KeptChanges {\n basis: readonly TableTool[];\n party: readonly string[] | null;\n}\n\nfunction TableBody({ fleetId, party, tools: readTools, version, partyScopes: readPartyScopes, listed, canChange, serverRefusal }: ToolsTableProps) {\n const router = useRouter();\n const toasts = Toast.useToastManager();\n const [, startTransition] = useTransition();\n const [isReloading, startReload] = useTransition();\n const [nameFilter, setNameFilter] = useState('');\n const [stateFilter, setStateFilter] = useState<StateFilter>('all');\n const [selected, setSelected] = useState<ReadonlySet<string>>(new Set());\n const [dialog, setDialog] = useState<OpenDialog>(null);\n const [picked, setPicked] = useState<string[]>([]);\n const [how, setHow] = useState<ScopeChange>('add');\n const [suggestPicks, setSuggestPicks] = useState<{ readOnly: string[]; other: string[] }>({ readOnly: [], other: [] });\n const [isSaving, setIsSaving] = useState(false);\n const [refusal, setRefusal] = useState<DialogRefusal | null>(null);\n const [switching, setSwitching] = useState<string | null>(null);\n const [switchRefusal, setSwitchRefusal] = useState<string | null>(null);\n const [highlighted, setHighlighted] = useState<{ names: ReadonlySet<string>; round: number }>({ names: new Set(), round: 0 });\n const [keptVersion, setKeptVersion] = useState<number | null>(null);\n const [isSheetOpen, setIsSheetOpen] = useState(false);\n const [keptChanges, setKeptChanges] = useState<Kept | null>(null);\n\n // A change kept here shows at once; once the page read itself again, its rows are the truth.\n const live = keptChanges?.basis === readTools ? keptChanges : null;\n const tools = live === null ? readTools : keptToolsOf(readTools, live);\n const partyScopes = live?.party ?? readPartyScopes;\n\n // A change kept here moves the version on before the page reads itself again.\n const currentVersion = Math.max(version, keptVersion ?? 0);\n const listedNames = listed === null ? null : new Set(listed.map(({ scope }) => scope));\n const shown = shownTools(tools, { name: nameFilter, state: stateFilter, partyScopes });\n const selectedTools = tools.filter(({ name }) => selected.has(name));\n const isServerAnswering = serverRefusal === null;\n const isEveryShownSelected = shown.length > 0 && shown.every(({ name }) => selected.has(name));\n const suggestions = hintSuggestionsOf(tools);\n const suggested = suggestedScopesOf(suggestions, suggestPicks);\n\n const kept = ({ outcome, changed, message, change }: { outcome: Extract<TableOutcome, { isOk: true }>; changed: readonly string[]; message: string; change: { party?: readonly string[]; scopes?: readonly { tool: string; scopes: readonly string[] }[]; switches?: ReadonlyMap<string, boolean> } }) => {\n setKeptChanges({\n basis: readTools,\n party: change.party ?? live?.party ?? null,\n scopes: new Map([...(live?.scopes ?? []), ...(change.scopes ?? []).map(({ tool, scopes }) => [tool, scopes] as const)]),\n switches: new Map([...(live?.switches ?? []), ...(change.switches ?? [])]),\n });\n if (outcome.version !== null) {\n setKeptVersion(outcome.version);\n }\n setHighlighted((previous) => ({ names: new Set(changed), round: previous.round + 1 }));\n toasts.add({ title: statedMessage(message, outcome.statementRefusal) });\n router.refresh();\n };\n\n const openDialog = (opened: Exclude<OpenDialog, null>) => {\n setRefusal(null);\n setIsSheetOpen(false);\n setPicked(opened === 'party' ? [...partyScopes] : []);\n setHow('add');\n setSuggestPicks({ readOnly: [], other: [] });\n setDialog(opened);\n };\n\n const closeDialog = () => {\n setDialog(null);\n setRefusal(null);\n };\n\n const save = ({ change, changed, message }: { change: { party?: string[]; tools: { tool: string; scopes: string[] }[] }; changed: readonly string[]; message: string }) => {\n setIsSaving(true);\n setRefusal(null);\n const madeOn = currentVersion;\n startTransition(async () => {\n const outcome = await setPartyScopes({ fleetId, name: party, version: madeOn, ...change });\n setIsSaving(false);\n if (!outcome.isOk) {\n setRefusal({ message: outcome.message, isConflict: outcome.isConflict, version: madeOn });\n return;\n }\n setDialog(null);\n setSelected(new Set());\n kept({ outcome, changed, message, change: { ...(change.party === undefined ? {} : { party: change.party }), scopes: change.tools } });\n });\n };\n\n const switchTools = ({ names, isOn, working }: { names: readonly string[]; isOn: boolean; working: string }) => {\n setSwitching(working);\n setSwitchRefusal(null);\n setIsSheetOpen(false);\n startTransition(async () => {\n const outcome = await switchPartyTools({ fleetId, name: party, tools: [...names], isOn });\n setSwitching(null);\n if (!outcome.isOk) {\n setSwitchRefusal(outcome.message);\n return;\n }\n const [only] = names;\n kept({ outcome, changed: names, change: { switches: new Map(names.map((name) => [name, isOn])) }, message: names.length === 1 && only !== undefined ? switchedMessageOf({ tool: only, isOn, statementRefusal: null }) : toolsSwitchedMessage({ count: names.length, isOn, statementRefusal: null }) });\n });\n };\n\n const reload = () => {\n startReload(() => {\n router.refresh();\n });\n };\n\n const toggle = (name: string) => {\n setSelected((previous) => {\n const next = new Set(previous);\n if (next.has(name)) {\n next.delete(name);\n } else {\n next.add(name);\n }\n return next;\n });\n };\n\n const toggleShown = () => {\n setSelected((previous) => {\n const next = new Set(previous);\n for (const { name } of shown) {\n if (isEveryShownSelected) {\n next.delete(name);\n } else {\n next.add(name);\n }\n }\n return next;\n });\n };\n\n const isBusy = switching !== null || isSaving;\n const toolbar = (\n <div className=\"grid gap-3 sm:flex sm:flex-wrap sm:items-center\" data-testid=\"tools-table-toolbar\">\n <label className=\"grid gap-1 sm:w-56\">\n <span className=\"sr-only\">Filter by name</span>\n <input className={INPUT} type=\"search\" placeholder=\"Filter by name\" value={nameFilter} onChange={(event) => { setNameFilter(event.target.value); }} data-testid=\"tools-table-name-filter\" />\n </label>\n <div role=\"group\" aria-label=\"Filter by state\" className=\"flex flex-wrap gap-1\">\n {STATE_FILTERS.map(({ state, label }) => (\n <button\n key={state}\n type=\"button\"\n aria-pressed={stateFilter === state}\n onClick={() => { setStateFilter(state); }}\n className={`h-8 rounded-md border px-3 ${stateFilter === state ? 'border-primary bg-primary text-primary-foreground' : 'border-border bg-card hover:bg-accent'}`}\n data-testid={`tools-table-state-${state}`}\n >\n {label}\n </button>\n ))}\n </div>\n {canChange ? (\n <>\n <label className=\"flex items-center gap-2\">\n <input type=\"checkbox\" checked={isEveryShownSelected} onChange={toggleShown} disabled={shown.length === 0} data-testid=\"tools-table-select-shown\" />\n {ALL_SELECTED}\n </label>\n <span className=\"text-muted-foreground\" data-testid=\"tools-table-selected\">\n {selected.size} selected\n </span>\n <div className=\"flex flex-wrap gap-2 sm:ml-auto\">\n <button type=\"button\" className={BUTTONS.secondary} disabled={selected.size === 0 || isBusy || listed === null} onClick={() => { openDialog('scopes'); }} data-testid=\"tools-table-set-scopes\">\n Set scopes…\n </button>\n <ActionButton isPending={switching === 'on'} pendingLabel=\"Switching on…\" disabled={selected.size === 0 || isBusy || !isServerAnswering} onClick={() => { switchTools({ names: [...selected], isOn: true, working: 'on' }); }} data-testid=\"tools-table-switch-on\">\n Switch on\n </ActionButton>\n <ActionButton isPending={switching === 'off'} pendingLabel=\"Switching off…\" disabled={selected.size === 0 || isBusy || !isServerAnswering} onClick={() => { switchTools({ names: [...selected], isOn: false, working: 'off' }); }} data-testid=\"tools-table-switch-off\">\n Switch off\n </ActionButton>\n <button type=\"button\" className={BUTTONS.secondary} disabled={isBusy || !isServerAnswering || listed === null} onClick={() => { openDialog('suggest'); }} data-testid=\"tools-table-suggest\">\n Suggest from hints…\n </button>\n </div>\n </>\n ) : null}\n </div>\n );\n\n return (\n <div className=\"grid gap-3\">\n <div className=\"flex flex-wrap items-center gap-2\" data-testid=\"tools-table-party-needs\">\n <span className=\"font-medium\">Every tool needs</span>\n <NeedsChips party={partyScopes} own={[]} listed={listedNames} />\n {canChange ? (\n <button type=\"button\" className=\"text-primary hover:underline disabled:opacity-60\" disabled={isBusy || listed === null} onClick={() => { openDialog('party'); }} data-testid=\"tools-table-party-change\">\n Change…\n </button>\n ) : null}\n </div>\n {serverRefusal === null ? null : (\n <p role=\"status\" className=\"rounded-md border border-tone-waiting-border bg-tone-waiting-bg px-3 py-2 text-tone-waiting-fg\" data-testid=\"tools-table-server-down\">\n The server did not answer, so this shows the scopes kept per tool name; they can still be changed. {serverRefusal}\n </p>\n )}\n <div className=\"hidden sm:block\">{toolbar}</div>\n <div className=\"sm:hidden\">\n <Drawer.Root open={isSheetOpen} onOpenChange={setIsSheetOpen}>\n <Drawer.Trigger className={BUTTONS.secondary} data-testid=\"tools-table-sheet-open\">\n Filters and actions{canChange ? ` (${String(selected.size)} selected)` : ''}\n </Drawer.Trigger>\n <Drawer.Portal>\n <Drawer.Backdrop className=\"fixed inset-0 z-40 bg-(--overlay)\" />\n <Drawer.Viewport className=\"fixed inset-0 z-50 flex items-end\">\n <Drawer.Popup className=\"w-full rounded-t-lg border border-border bg-popover p-4 text-popover-foreground shadow-lg\">\n <Drawer.Content className=\"grid gap-3\">\n <Drawer.Title className=\"text-heading font-semibold\">Filters and actions</Drawer.Title>\n {toolbar}\n <Drawer.Close className={BUTTONS.secondary}>Done</Drawer.Close>\n </Drawer.Content>\n </Drawer.Popup>\n </Drawer.Viewport>\n </Drawer.Portal>\n </Drawer.Root>\n </div>\n {switchRefusal === null ? null : (\n <p role=\"alert\" className=\"rounded-md border border-tone-attention-border bg-tone-attention-bg px-3 py-2 text-tone-attention-fg\" data-testid=\"tools-table-switch-refusal\">\n {switchRefusal}\n </p>\n )}\n <table className=\"w-full border-collapse max-sm:block\" data-testid=\"tools-table\">\n <thead className=\"max-sm:hidden\">\n <tr className=\"border-b border-border text-left text-muted-foreground\">\n {canChange ? <th className=\"w-8 py-2\"><span className=\"sr-only\">Selected</span></th> : null}\n <th className=\"py-2 font-medium\">Tool</th>\n <th className=\"py-2 font-medium\">Hints</th>\n <th className=\"py-2 font-medium\">On</th>\n <th className=\"py-2 font-medium\">Needs</th>\n </tr>\n </thead>\n <tbody className=\"max-sm:grid max-sm:gap-2\">\n {shown.map((tool) => {\n const isHighlighted = highlighted.names.has(tool.name);\n return (\n <tr\n key={isHighlighted ? `${tool.name}-${String(highlighted.round)}` : tool.name}\n className={`border-b border-border align-top last:border-b-0 max-sm:grid max-sm:grid-cols-[auto_1fr] max-sm:gap-x-2 max-sm:rounded-md max-sm:border max-sm:p-2 ${isHighlighted ? 'animate-highlight' : ''}`}\n data-testid=\"tools-table-row\"\n data-tool={tool.name}\n >\n {canChange ? (\n <td className=\"py-2 pr-2 max-sm:row-span-4\">\n <input type=\"checkbox\" aria-label={`Select ${tool.name}`} checked={selected.has(tool.name)} onChange={() => { toggle(tool.name); }} data-testid=\"tools-table-select\" />\n </td>\n ) : null}\n <td className=\"py-2 pr-3 max-sm:col-start-2\">\n <span className=\"flex flex-wrap items-center gap-2\">\n <span className=\"font-mono\">{tool.name}</span>\n {tool.isNew ? <StatusBadge tone=\"attention\" label=\"New\" /> : null}\n </span>\n {firstLineOf(tool.description) === '' ? null : <span className=\"block text-muted-foreground\">{firstLineOf(tool.description)}</span>}\n </td>\n <td className=\"py-2 pr-3 max-sm:col-start-2\">\n <span className=\"flex flex-wrap gap-1\">\n {tool.isReadOnly === true ? <Tag>Read only</Tag> : null}\n {tool.isDestructive === true ? <Tag>Destructive</Tag> : null}\n </span>\n </td>\n <td className=\"py-2 pr-3 max-sm:col-start-2\">\n {tool.isOn === null ? (\n <span className=\"text-muted-foreground\">Not known</span>\n ) : canChange ? (\n <Switch isOn={tool.isOn} label={tool.name} isPending={switching === tool.name} onClick={() => { switchTools({ names: [tool.name], isOn: tool.isOn !== true, working: tool.name }); }} testId=\"tools-table-switch\" />\n ) : (\n <Tag>{tool.isOn ? 'On' : 'Off'}</Tag>\n )}\n </td>\n <td className=\"py-2 max-sm:col-start-2\">\n <NeedsChips party={partyScopes} own={tool.scopes} listed={listedNames} />\n </td>\n </tr>\n );\n })}\n </tbody>\n </table>\n {shown.length === 0 ? (\n <p className=\"text-muted-foreground\" data-testid=\"tools-table-empty\">\n {tools.length === 0 ? (isServerAnswering ? `${party} lists no tools.` : 'No tool needs a scope of its own yet.') : 'No tool matches the filters.'}\n </p>\n ) : null}\n {listed === null ? null : (\n <>\n <TableDialog\n isOpen={dialog === 'scopes'}\n onClose={closeDialog}\n title=\"Set scopes\"\n description=\"The scopes a calling ship must hold for each selected tool, beside what every tool needs.\"\n appliesTo={`Applies to ${String(selectedTools.length)} ${selectedTools.length === 1 ? 'tool' : 'tools'}`}\n action={{\n label: 'Set scopes',\n pending: 'Setting…',\n isDisabled: picked.length === 0 && how !== 'replace',\n onPress: () => {\n save({ change: { tools: changedScopesOf(selectedTools, { scopes: picked, how }) }, changed: selectedTools.map(({ name }) => name), message: scopesSetMessage({ scopes: picked, how, count: selectedTools.length }) });\n },\n }}\n isSaving={isSaving}\n refusal={standingRefusal(refusal, currentVersion)}\n isReloading={isReloading}\n onReload={reload}\n testId=\"tools-table-scopes-dialog\"\n >\n <ScopePicker label=\"Scopes\" listed={listed} picked={picked} onPick={setPicked} isDisabled={isSaving} testId=\"tools-table-scopes-picker\" />\n <fieldset className=\"grid gap-1\">\n <legend className=\"font-medium\">On each selected tool</legend>\n {SCOPE_CHANGES.map((change) => (\n <label key={change.how} className=\"flex items-center gap-2\">\n <input type=\"radio\" name=\"how\" value={change.how} checked={how === change.how} onChange={() => { setHow(change.how); }} data-testid={`tools-table-how-${change.how}`} />\n {change.label}\n </label>\n ))}\n </fieldset>\n </TableDialog>\n <TableDialog\n isOpen={dialog === 'party'}\n onClose={closeDialog}\n title=\"Every tool needs\"\n description={`The scopes a calling ship must hold for every tool of ${party}, beside each tool's own.`}\n appliesTo={`Applies to every tool of ${party}`}\n action={{\n label: 'Save',\n pending: 'Saving…',\n isDisabled: false,\n onPress: () => {\n save({ change: { party: picked, tools: [] }, changed: tools.map(({ name }) => name), message: partyScopesSetMessage({ party, scopes: picked }) });\n },\n }}\n isSaving={isSaving}\n refusal={standingRefusal(refusal, currentVersion)}\n isReloading={isReloading}\n onReload={reload}\n testId=\"tools-table-party-dialog\"\n >\n <ScopePicker label=\"Scopes\" listed={listed} picked={picked} onPick={setPicked} isDisabled={isSaving} testId=\"tools-table-party-picker\" />\n </TableDialog>\n <TableDialog\n isOpen={dialog === 'suggest'}\n onClose={closeDialog}\n title=\"Suggest from hints\"\n description=\"Scopes for each tool with no scope of its own, by what the server says of it. Hints are the server's claim: nothing applies until you confirm.\"\n appliesTo={`Applies to ${String(suggested.length)} ${suggested.length === 1 ? 'tool' : 'tools'}`}\n action={{\n label: 'Apply',\n pending: 'Applying…',\n isDisabled: suggested.length === 0,\n onPress: () => {\n const groups = [\n { scopes: suggestPicks.readOnly, count: suggestPicks.readOnly.length === 0 ? 0 : suggestions.readOnly.length },\n { scopes: suggestPicks.other, count: suggestPicks.other.length === 0 ? 0 : suggestions.other.length },\n ].filter(({ count }) => count > 0);\n save({ change: { tools: suggested }, changed: suggested.map(({ tool }) => tool), message: suggestionsSetMessage(groups) });\n },\n }}\n isSaving={isSaving}\n refusal={standingRefusal(refusal, currentVersion)}\n isReloading={isReloading}\n onReload={reload}\n testId=\"tools-table-suggest-dialog\"\n >\n <ScopePicker label=\"Scopes for read-only tools\" listed={listed} picked={suggestPicks.readOnly} onPick={(readOnly) => { setSuggestPicks((previous) => ({ ...previous, readOnly })); }} isDisabled={isSaving} testId=\"tools-table-suggest-read-only\" />\n <ScopePicker label=\"Scopes for the other tools\" listed={listed} picked={suggestPicks.other} onPick={(other) => { setSuggestPicks((previous) => ({ ...previous, other })); }} isDisabled={isSaving} testId=\"tools-table-suggest-other\" />\n <SuggestedList title=\"Read-only tools\" names={suggestions.readOnly} testId=\"tools-table-suggest-read-only-tools\" />\n <SuggestedList title=\"Other tools\" names={suggestions.other} testId=\"tools-table-suggest-other-tools\" />\n <SuggestedList title=\"Without hints, left as they are\" names={suggestions.withoutHints} testId=\"tools-table-suggest-without-hints\" />\n </TableDialog>\n </>\n )}\n </div>\n );\n}\n\n/** One group of the tools a suggestion would change, by name. */\nfunction SuggestedList({ title, names, testId }: { title: string; names: readonly string[]; testId: string }) {\n return (\n <details className=\"rounded-md border border-border px-3 py-2\" data-testid={testId}>\n <summary className=\"cursor-pointer\">\n {title} ({names.length})\n </summary>\n {names.length === 0 ? <p className=\"text-muted-foreground\">None</p> : <p className=\"font-mono text-code break-words\">{names.join(', ')}</p>}\n </details>\n );\n}\n","/* __next_internal_action_entry_do_not_use__ [{\"409d54d6f9f4c413c2f1447f907698cb0e0c1ebc65\":{\"name\":\"switchPartyTools\"}},\"web/features/outside-party/actions.ts\",\"\"] */\"use turbopack: no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_2=/*#__PURE__*/createServerReference(\"409d54d6f9f4c413c2f1447f907698cb0e0c1ebc65\",callServer,void 0,findSourceMapURL,\"switchPartyTools\");export{$$RSC_SERVER_ACTION_2 as switchPartyTools};","/** What a tool's switch says once the API kept it: what the fleet sees now, or that the proxy ship shows it at its next statement, and why. */\nexport function switchedMessageOf({ tool, isOn, statementRefusal }: { tool: string; isOn: boolean; statementRefusal: string | null }): string {\n const state = `${tool} is ${isOn ? 'on' : 'off'}`;\n if (statementRefusal !== null) {\n return `${state}; the fleet sees it at the proxy ship's next statement: ${statementRefusal}`;\n }\n return isOn ? `${state}: the fleet may call it.` : `${state}: the fleet sees it no more, and a call to it is refused.`;\n}\n","/**\n * Suggest from hints (gateway scopes 4.3): the tools with no scope of their\n * own, split by what the server says of them. Hints are the server's claim,\n * never trusted on their own, so nothing applies until the approver confirms.\n */\n\ninterface HintedTool {\n name: string;\n isReadOnly?: boolean | undefined;\n isDestructive?: boolean | undefined;\n scopes: readonly string[];\n}\n\n/** The tools each picker would change, by name, and the ones without hints, left untouched. */\nexport interface HintSuggestions {\n readOnly: string[];\n other: string[];\n withoutHints: string[];\n}\n\nexport function hintSuggestionsOf(tools: readonly HintedTool[]): HintSuggestions {\n const suggestions: HintSuggestions = { readOnly: [], other: [], withoutHints: [] };\n for (const tool of tools.filter(({ scopes }) => scopes.length === 0)) {\n if (tool.isDestructive === true || tool.isReadOnly === false) {\n suggestions.other.push(tool.name);\n } else if (tool.isReadOnly === true) {\n suggestions.readOnly.push(tool.name);\n } else {\n suggestions.withoutHints.push(tool.name);\n }\n }\n return suggestions;\n}\n\n/** The change the suggestions make with the scopes picked: a group whose picker is empty changes nothing. */\nexport function suggestedScopesOf(suggestions: HintSuggestions, picked: { readOnly: readonly string[]; other: readonly string[] }): { tool: string; scopes: string[] }[] {\n const group = (tools: readonly string[], scopes: readonly string[]) => (scopes.length === 0 ? [] : tools.map((tool) => ({ tool, scopes: [...scopes] })));\n return [...group(suggestions.readOnly, picked.readOnly), ...group(suggestions.other, picked.other)];\n}\n","/** How a bulk change treats the picked scopes on each selected tool (gateway scopes 4.3). */\nexport const SCOPE_CHANGES = [\n { how: 'add', label: 'Add to each' },\n { how: 'remove', label: 'Remove from each' },\n { how: 'replace', label: 'Replace with these' },\n] as const;\n\nexport type ScopeChange = (typeof SCOPE_CHANGES)[number]['how'];\n\n/** What each selected tool needs of its own after the change, each scope once; none needs nothing beyond the party's. */\nexport function changedScopesOf(selected: readonly { name: string; scopes: readonly string[] }[], change: { scopes: readonly string[]; how: ScopeChange }): { tool: string; scopes: string[] }[] {\n return selected.map(({ name, scopes }) => {\n switch (change.how) {\n case 'add':\n return { tool: name, scopes: [...new Set([...scopes, ...change.scopes])] };\n case 'remove':\n return { tool: name, scopes: scopes.filter((scope) => !change.scopes.includes(scope)) };\n case 'replace':\n return { tool: name, scopes: [...new Set(change.scopes)] };\n }\n });\n}\n","/**\n * The rows of an outside MCP server's tools table (gateway scopes 4.3):\n * each tool the server lists now, with its switch, the hints it gives and\n * the scopes it needs of its own; and the filters an approver narrows them by.\n */\nimport type { Read } from '../../../lib/gateway-api/page-api';\n\n/** A tool as the server lists it now, with its switch, as the API answers it. */\nexport interface ListedTool {\n name: string;\n description?: string | undefined;\n isReadOnly?: boolean | undefined;\n isDestructive?: boolean | undefined;\n isOn: boolean;\n isNew: boolean;\n}\n\n/** A party's required scopes as the API answers them. */\nexport interface PartyRequirements {\n version: number;\n party: string[];\n tools: { tool: string; scopes: string[] }[];\n}\n\n/** One row: the tool, its switch (unknown while the server does not answer), and the scopes it needs of its own. */\nexport interface TableTool {\n name: string;\n description?: string | undefined;\n isReadOnly?: boolean | undefined;\n isDestructive?: boolean | undefined;\n isOn: boolean | null;\n isNew: boolean;\n scopes: readonly string[];\n}\n\n/**\n * The rows: every tool the server lists with what it needs; while the server\n * does not answer, the requirements kept per tool name, so they can still be\n * read and changed.\n */\nexport function tableToolsOf({ read, requirements }: { read: Read<{ tools: ListedTool[] }>; requirements: PartyRequirements }): TableTool[] {\n const own = new Map(requirements.tools.map(({ tool, scopes }) => [tool, scopes]));\n if (!read.isOk) {\n return requirements.tools.map(({ tool, scopes }) => ({ name: tool, isOn: null, isNew: false, scopes }));\n }\n return read.value.tools.map((tool) => ({ ...tool, scopes: own.get(tool.name) ?? [] }));\n}\n\n/** The table's state filter. */\nexport const STATE_FILTERS = [\n { state: 'all', label: 'All' },\n { state: 'on', label: 'On' },\n { state: 'off', label: 'Off' },\n { state: 'new', label: 'New' },\n { state: 'needsNothing', label: 'Needs nothing' },\n] as const;\n\nexport type StateFilter = (typeof STATE_FILTERS)[number]['state'];\n\nfunction isInState(tool: TableTool, { state, partyScopes }: { state: StateFilter; partyScopes: readonly string[] }): boolean {\n switch (state) {\n case 'all':\n return true;\n case 'on':\n return tool.isOn === true;\n case 'off':\n return tool.isOn === false;\n case 'new':\n return tool.isNew;\n case 'needsNothing':\n return partyScopes.length === 0 && tool.scopes.length === 0;\n }\n}\n\n/** The tools whose name holds the text, in any case, and that are in the state picked. */\nexport function shownTools(tools: readonly TableTool[], filter: { name: string; state: StateFilter; partyScopes: readonly string[] }): TableTool[] {\n const name = filter.name.trim().toLowerCase();\n return tools.filter((tool) => tool.name.toLowerCase().includes(name) && isInState(tool, filter));\n}\n\n/** What the page kept since it read the rows: each changed tool's own scopes, and each switched tool's switch. */\nexport interface KeptChanges {\n scopes: ReadonlyMap<string, readonly string[]>;\n switches: ReadonlyMap<string, boolean>;\n}\n\n/** The rows with what was kept since they were read, so a change shows at once rather than when the page reads the server again. */\nexport function keptToolsOf(tools: readonly TableTool[], kept: KeptChanges): TableTool[] {\n return tools.map((tool) => ({ ...tool, scopes: kept.scopes.get(tool.name) ?? tool.scopes, isOn: tool.isOn === null ? null : (kept.switches.get(tool.name) ?? tool.isOn) }));\n}\n","'use client';\n\nimport { useState, useTransition } from 'react';\n\nimport { IDLE, type FormState } from '../../forms/form-state';\nimport { readMoreSignIns, removePersonSignIn } from '../actions';\nimport { removedMessageOf, withNextPage } from '../everyones-sign-ins';\nimport { personOf, SignInsCard, type PersonSignIn } from './everyones-sign-ins';\n\n/**\n * Everyone's sign-ins as an approver works on them (decision 0067, M3):\n * Remove asks to confirm in place, a removal is said above the list, and\n * Show more reads the next page only when pressed. The page refreshes from\n * the server after a removal, so your own sign-in above stays true too.\n */\nexport function EveryonesSignInsCard({ fleetId, party, now, first }: { fleetId: string; party: string; now: string; first: { grants: PersonSignIn[]; next: string | null } }) {\n const [more, setMore] = useState<PersonSignIn[]>([]);\n const [next, setNext] = useState(first.next);\n const [removed, setRemoved] = useState<ReadonlySet<string>>(new Set());\n const [confirming, setConfirming] = useState<string | null>(null);\n const [removing, setRemoving] = useState<string | null>(null);\n const [outcome, setOutcome] = useState<FormState>(IDLE);\n const [isLoadingMore, startLoadingMore] = useTransition();\n const [, startRemoving] = useTransition();\n const rows = withNextPage(first.grants, more).filter(({ personShipId }) => !removed.has(personShipId));\n\n const remove = (signIn: PersonSignIn) => {\n setRemoving(signIn.personShipId);\n startRemoving(async () => {\n const done = await removePersonSignIn({ fleetId, name: party, personShipId: signIn.personShipId });\n setRemoving(null);\n setConfirming(null);\n if (done.isOk) {\n setRemoved((held) => new Set([...held, signIn.personShipId]));\n setOutcome({ kind: 'done', message: removedMessageOf({ person: personOf(signIn), party, isRevoked: done.isRevoked }) });\n } else {\n setOutcome({ kind: 'refused', message: done.message });\n }\n });\n };\n\n const showMore = () => {\n const after = next ?? rows.at(-1)?.personShipId;\n if (after === undefined) {\n return;\n }\n startLoadingMore(async () => {\n const page = await readMoreSignIns({ fleetId, name: party, after });\n if (page.isOk) {\n setMore((shown) => withNextPage(shown, page.grants));\n setNext(page.next);\n } else {\n setOutcome({ kind: 'refused', message: page.message });\n }\n });\n };\n\n return (\n <SignInsCard\n party={party}\n now={now}\n rows={rows}\n refusal={null}\n hasMore={next !== null}\n isLoadingMore={isLoadingMore}\n confirming={confirming}\n removing={removing}\n outcome={outcome}\n onRemove={(personShipId) => { setConfirming(personShipId); setOutcome(IDLE); }}\n onConfirm={remove}\n onKeep={() => { setConfirming(null); }}\n onMore={showMore}\n />\n );\n}\n","/* __next_internal_action_entry_do_not_use__ [{\"40ff915cb4a3fa62ec0afa2d7966cb1f99230b68c8\":{\"name\":\"readMoreSignIns\"}},\"web/features/outside-party/actions.ts\",\"\"] */\"use turbopack: no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_7=/*#__PURE__*/createServerReference(\"40ff915cb4a3fa62ec0afa2d7966cb1f99230b68c8\",callServer,void 0,findSourceMapURL,\"readMoreSignIns\");export{$$RSC_SERVER_ACTION_7 as readMoreSignIns};","/* __next_internal_action_entry_do_not_use__ [{\"40950775a7f51b1c70b9dbbae1145deeab986abb75\":{\"name\":\"removePersonSignIn\"}},\"web/features/outside-party/actions.ts\",\"\"] */\"use turbopack: no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_6=/*#__PURE__*/createServerReference(\"40950775a7f51b1c70b9dbbae1145deeab986abb75\",callServer,void 0,findSourceMapURL,\"removePersonSignIn\");export{$$RSC_SERVER_ACTION_6 as removePersonSignIn};","/**\n * Everyone's sign-ins on a server's page, for approvers (decision 0067, M3):\n * how a removal is said, and the rows Show more adds.\n */\n\n/** A removal said: revoked at the server where it revoked the tokens, removed alone where it offers no revocation or did not answer. */\nexport function removedMessageOf({ person, party, isRevoked }: { person: string; party: string; isRevoked: boolean }): string {\n return isRevoked ? `${person}'s sign-in is removed, and revoked at ${party}.` : `${person}'s sign-in is removed.`;\n}\n\n/** The rows shown with the next page after them, each person once: a removal moves the pages along, so the next page may start with a person already shown. */\nexport function withNextPage<Row extends { personShipId: string }>(shown: readonly Row[], page: readonly Row[]): Row[] {\n const isShown = new Set(shown.map(({ personShipId }) => personShipId));\n return [...shown, ...page.filter(({ personShipId }) => !isShown.has(personShipId))];\n}\n","import type { inferRouterOutputs } from '@trpc/server';\n\nimport type { GatewayRouter } from '../../../../src/adapters/trpc/router.js';\nimport type { FormState } from '../../forms/form-state';\nimport { BUTTONS, CARD } from '../../forms/ui/look';\nimport { Outcome } from '../../forms/ui/outcome';\nimport type { Tone } from '../../outside-parties/party-kinds';\nimport { StatusBadge } from '../../outside-parties/ui/status-badge';\nimport { whenWordsOf } from '../own-sign-in';\n\n/** A person's sign-in as the API answers it to an approver: never a token. */\nexport type PersonSignIn = inferRouterOutputs<GatewayRouter>['parties']['signIns']['grants'][number];\n\nconst BADGES: Record<PersonSignIn['state'], { tone: Tone; label: string }> = {\n signedIn: { tone: 'ok', label: 'Signed in' },\n lost: { tone: 'attention', label: 'Lost' },\n};\n\n/** How many rows the list shows while it is read. */\nconst SKELETON_ROWS = 3;\n\n/** The person a sign-in is of: their person ship's name, or its id where the fleet answered no name. */\nexport function personOf(signIn: PersonSignIn): string {\n return signIn.personName ?? signIn.personShipId;\n}\n\nfunction accountOf({ outsideAccount }: PersonSignIn) {\n return outsideAccount.name ?? outsideAccount.subject ?? <span className=\"text-muted-foreground\">Not known</span>;\n}\n\nfunction Heading({ count }: { count: number | null }) {\n return (\n <div className=\"flex flex-wrap items-center justify-between gap-2\">\n <h2 className=\"text-section font-semibold\">Everyone&apos;s sign-ins</h2>\n {count === null ? null : <span className=\"text-muted-foreground\">{count}</span>}\n </div>\n );\n}\n\nfunction Head() {\n return (\n <thead className=\"max-sm:hidden\">\n <tr className=\"border-b border-border text-left text-muted-foreground\">\n <th className=\"h-10 px-2 font-medium\">Person</th>\n <th className=\"h-10 px-2 font-medium\">Account</th>\n <th className=\"h-10 px-2 font-medium\">State</th>\n <th className=\"h-10 px-2 font-medium\">Last used</th>\n <th className=\"h-10 px-2\">\n <span className=\"sr-only\">Remove</span>\n </th>\n </tr>\n </thead>\n );\n}\n\n/** Everyone's sign-ins while they are read: the heading and the table's shape. */\nexport function EveryonesSignInsSkeleton({ party }: { party: string }) {\n return (\n <section className={`${CARD} grid gap-3`} aria-busy=\"true\" aria-label={`Reading everyone's sign-ins to ${party}`} data-testid=\"outside-party-sign-ins-skeleton\">\n <Heading count={null} />\n <table className=\"w-full border-collapse max-sm:block\">\n <Head />\n <tbody className=\"max-sm:grid\">\n {Array.from({ length: SKELETON_ROWS }, (_, row) => (\n <tr key={row} className=\"border-b border-border last:border-b-0 max-sm:grid max-sm:gap-1 max-sm:py-3\">\n <td className=\"h-12 px-2 max-sm:h-auto max-sm:px-0\">\n <span className=\"block h-3.5 w-20 animate-pulse rounded-md bg-muted max-sm:w-2/5\" />\n </td>\n <td className=\"h-12 px-2 max-sm:h-auto max-sm:px-0\">\n <span className=\"block h-3.5 w-36 animate-pulse rounded-md bg-muted max-sm:w-3/4\" />\n </td>\n <td className=\"h-12 px-2 max-sm:hidden\">\n <span className=\"block h-3.5 w-16 animate-pulse rounded-md bg-muted\" />\n </td>\n <td className=\"h-12 px-2 max-sm:hidden\">\n <span className=\"block h-3.5 w-20 animate-pulse rounded-md bg-muted\" />\n </td>\n <td className=\"max-sm:hidden\" />\n </tr>\n ))}\n </tbody>\n </table>\n </section>\n );\n}\n\n/** What the card shows now, and what each press asks of the part that holds it. */\nexport interface SignInsCardProps {\n party: string;\n /** When the page was read, so every row says its times from the same moment. */\n now: string;\n rows: readonly PersonSignIn[];\n /** Why the API refused the list, said in place of it. */\n refusal: string | null;\n hasMore: boolean;\n isLoadingMore: boolean;\n /** The person ship whose removal waits for a confirm. */\n confirming: string | null;\n /** The person ship whose removal is on its way. */\n removing: string | null;\n outcome: FormState;\n onRemove: (personShipId: string) => void;\n onConfirm: (signIn: PersonSignIn) => void;\n onKeep: () => void;\n onMore: () => void;\n}\n\nfunction Confirm({ signIn, party, isRemoving, onConfirm, onKeep }: { signIn: PersonSignIn; party: string; isRemoving: boolean; onConfirm: () => void; onKeep: () => void }) {\n const person = personOf(signIn);\n return (\n <div className=\"grid gap-2 rounded-md bg-muted p-3\" data-testid=\"outside-party-sign-ins-confirm\">\n <p>\n Remove {person}&apos;s sign-in? Their ships&apos; calls to {party} are refused until they sign in again.\n </p>\n <div className=\"flex flex-wrap gap-2\">\n <button type=\"button\" className={BUTTONS.destructive} disabled={isRemoving} aria-busy={isRemoving} onClick={onConfirm} data-testid=\"outside-party-sign-ins-remove-confirmed\">\n {isRemoving ? 'Removing…' : `Remove ${person}'s sign-in`}\n </button>\n <button type=\"button\" className={BUTTONS.secondary} onClick={onKeep}>\n Keep\n </button>\n </div>\n </div>\n );\n}\n\n/**\n * Everyone's sign-ins to a server where each person signs in (decision 0067,\n * M3), for an account holding gateway:approve: each person, their outside\n * account, state and when last used, with Remove confirmed in place. A table\n * on a wide screen, a list on a phone, 20 a page with Show more.\n */\nexport function SignInsCard(props: SignInsCardProps) {\n const { party, now, rows, refusal, hasMore, isLoadingMore, confirming, removing, outcome } = props;\n const lastUsedOf = (signIn: PersonSignIn) => (signIn.lastUsedAt === null ? 'Not yet' : whenWordsOf(signIn.lastUsedAt, new Date(now)));\n return (\n <section className={`${CARD} grid gap-3`} data-testid=\"outside-party-sign-ins\">\n <Heading count={refusal === null ? rows.length : null} />\n <Outcome state={outcome} />\n {refusal !== null ? (\n <Outcome state={{ kind: 'refused', message: refusal }} />\n ) : rows.length === 0 ? (\n <p className=\"text-muted-foreground\">Nobody has signed in yet.</p>\n ) : (\n <table className=\"w-full border-collapse max-sm:block\">\n <Head />\n <tbody className=\"max-sm:grid\">\n {rows.map((signIn) => {\n const badge = BADGES[signIn.state];\n const isConfirming = confirming === signIn.personShipId;\n const lastUsed = lastUsedOf(signIn);\n return [\n <tr key={signIn.personShipId} className={`border-b border-border max-sm:grid max-sm:grid-cols-[1fr_auto] max-sm:gap-1 max-sm:py-3 ${isConfirming ? 'border-b-0' : 'last:border-b-0'}`} data-testid=\"outside-party-sign-ins-row\">\n <td className=\"h-12 px-2 max-sm:col-start-1 max-sm:row-start-1 max-sm:h-auto max-sm:px-0 max-sm:font-medium\">\n {personOf(signIn)}\n {signIn.isYours ? <span className=\"font-normal text-muted-foreground\"> (you)</span> : null}\n </td>\n <td className=\"h-12 px-2 max-sm:col-span-2 max-sm:row-start-2 max-sm:h-auto max-sm:px-0 max-sm:text-muted-foreground\">\n {accountOf(signIn)}\n <span className=\"sm:hidden\"> · last used {signIn.lastUsedAt === null ? 'not yet' : lastUsed}</span>\n </td>\n <td className=\"h-12 px-2 max-sm:col-start-2 max-sm:row-start-1 max-sm:h-auto max-sm:px-0\">\n <StatusBadge tone={badge.tone} label={badge.label} />\n </td>\n <td className=\"h-12 px-2 text-muted-foreground max-sm:hidden\">{lastUsed}</td>\n <td className=\"h-12 px-2 text-right max-sm:col-span-2 max-sm:row-start-3 max-sm:h-auto max-sm:px-0 max-sm:text-left\">\n <button type=\"button\" className={`${BUTTONS.secondary} ${isConfirming ? 'max-sm:hidden' : ''}`} onClick={() => { props.onRemove(signIn.personShipId); }} data-testid=\"outside-party-sign-ins-remove\">\n Remove\n </button>\n </td>\n </tr>,\n isConfirming ? (\n <tr key={`${signIn.personShipId}-confirm`} className=\"border-b border-border last:border-b-0 max-sm:block max-sm:pb-3\">\n <td colSpan={5} className=\"pb-2 max-sm:block max-sm:pb-0\">\n <Confirm signIn={signIn} party={party} isRemoving={removing === signIn.personShipId} onConfirm={() => { props.onConfirm(signIn); }} onKeep={props.onKeep} />\n </td>\n </tr>\n ) : null,\n ];\n })}\n </tbody>\n </table>\n )}\n {refusal === null && hasMore ? (\n <div>\n <button type=\"button\" className={BUTTONS.secondary} disabled={isLoadingMore} aria-busy={isLoadingMore} onClick={props.onMore} data-testid=\"outside-party-sign-ins-more\">\n {isLoadingMore ? 'Showing more…' : 'Show more'}\n </button>\n </div>\n ) : null}\n </section>\n );\n}\n","/**\n * Your own sign-in on a server's page (decision 0067, M2): how a sign-in\n * went, as the address the gateway sends the browser back to says it\n * (src/adapters/http/party-sign-in-routes.ts), or as Remove says it; and\n * when it was made or last used, in words.\n */\nimport type { SearchParams } from '../../lib/gateway-api/page-api';\n\n/** What the address says once you removed your sign-in: the page's own outcome, never the gateway's. */\nexport const REMOVED = 'removed';\n\n/** What the address back says of a sign-in, and what the page calls it. */\nconst OUTCOMES = {\n 'signed-in': 'signedIn',\n [REMOVED]: 'removed',\n failed: 'failed',\n 'turned-away': 'turnedAway',\n 'not-signed-in': 'cancelled',\n unavailable: 'unavailable',\n} as const;\n\nexport type SignInOutcomeKind = (typeof OUTCOMES)[keyof typeof OUTCOMES];\n\n/** How a sign-in went, with the authorization server's error code where it answered one. */\nexport interface SignInOutcome {\n kind: SignInOutcomeKind;\n serverError: string | null;\n}\n\n/** The parameter the address names the outcome by, and the one it names the server's error code by. */\nexport const SIGN_IN_PARAMETER = 'sign-in';\nconst ERROR_PARAMETER = 'error';\n\nfunction isSaid(said: string): said is keyof typeof OUTCOMES {\n return Object.hasOwn(OUTCOMES, said);\n}\n\n/** How the sign-in went, or nothing when the address says no outcome it knows. */\nexport function signInOutcomeOf(searchParams: SearchParams): SignInOutcome | null {\n const said = searchParams[SIGN_IN_PARAMETER];\n if (typeof said !== 'string' || !isSaid(said)) {\n return null;\n }\n const serverError = searchParams[ERROR_PARAMETER];\n return { kind: OUTCOMES[said], serverError: typeof serverError === 'string' ? serverError : null };\n}\n\nconst MINUTE_MS = 60_000;\nconst HOUR_MS = 60 * MINUTE_MS;\n\n/** The months as the day and time name them. */\nconst MONTHS = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] as const;\n\nconst twoDigits = (value: number) => String(value).padStart(2, '0');\n\n/** The day and time, in UTC as the console's other times are: 28 Oct, 22:10. */\nexport function dayAndTimeOf(at: string): string {\n const time = new Date(at);\n return `${String(time.getUTCDate())} ${MONTHS[time.getUTCMonth()] ?? ''}, ${twoDigits(time.getUTCHours())}:${twoDigits(time.getUTCMinutes())}`;\n}\n\n/** When something happened, in words: Just now, minutes ago within the hour, else the day and time. */\nexport function whenWordsOf(at: string, now: Date): string {\n const ago = now.getTime() - new Date(at).getTime();\n if (ago < MINUTE_MS) {\n return 'Just now';\n }\n if (ago < HOUR_MS) {\n return `${String(Math.floor(ago / MINUTE_MS))} min ago`;\n }\n return dayAndTimeOf(at);\n}\n","'use client';\n\nimport { useActionState } from 'react';\n\nimport { FLEET_FIELD, IDLE } from '../../forms/form-state';\nimport type { ButtonKind } from '../../forms/ui/look';\nimport { Outcome } from '../../forms/ui/outcome';\nimport { SubmitButton } from '../../forms/ui/submit-button';\nimport { removeOwnSignIn, signInToParty } from '../actions';\n\nfunction PartyFields({ fleetId, party }: { fleetId: string; party: string }) {\n return (\n <>\n <input type=\"hidden\" name={FLEET_FIELD} value={fleetId} />\n <input type=\"hidden\" name=\"name\" value={party} />\n </>\n );\n}\n\n/** Sign in, or Sign in again: the browser goes to the server's authorization server. A refusal is said in place. */\nexport function SignInForm({ fleetId, party, label, kind }: { fleetId: string; party: string; label: string; kind: ButtonKind }) {\n const [refused, signIn] = useActionState(signInToParty, IDLE);\n return (\n <form action={signIn} className=\"grid gap-2\">\n <Outcome state={refused} />\n <PartyFields fleetId={fleetId} party={party} />\n <div>\n <SubmitButton kind={kind} pending={`Opening ${party}…`} testId=\"outside-party-sign-in-start\">\n {label}\n </SubmitButton>\n </div>\n </form>\n );\n}\n\n/** Remove: your sign-in is revoked where the server offers it, then dropped. A refusal is said in place. */\nexport function RemoveSignInForm({ fleetId, party }: { fleetId: string; party: string }) {\n const [refused, remove] = useActionState(removeOwnSignIn, IDLE);\n return (\n <form action={remove} className=\"grid gap-2\">\n <Outcome state={refused} />\n <PartyFields fleetId={fleetId} party={party} />\n <div>\n <SubmitButton kind=\"secondary\" pending=\"Removing…\" testId=\"outside-party-sign-in-remove\">\n Remove\n </SubmitButton>\n </div>\n </form>\n );\n}\n","/* __next_internal_action_entry_do_not_use__ [{\"606d313829d9c2108131b763ec8a2b819b6eee19e6\":{\"name\":\"removeOwnSignIn\"}},\"web/features/outside-party/actions.ts\",\"\"] */\"use turbopack: no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_5=/*#__PURE__*/createServerReference(\"606d313829d9c2108131b763ec8a2b819b6eee19e6\",callServer,void 0,findSourceMapURL,\"removeOwnSignIn\");export{$$RSC_SERVER_ACTION_5 as removeOwnSignIn};","'use client';\n\nimport { useActionState } from 'react';\nimport { useFormStatus } from 'react-dom';\n\nimport { FLEET_FIELD } from '../../forms/form-state';\nimport { Switch } from '../../forms/ui/switch';\nimport { markA2aAgent, type MarkState } from '../actions';\n\nconst IDLE: MarkState = { kind: 'idle' };\n\nfunction SubmitSwitch({ isRepeatable }: { isRepeatable: boolean }) {\n const status = useFormStatus();\n return <Switch type=\"submit\" isOn={isRepeatable} label=\"Repeatable\" isPending={status.pending} testId=\"outside-party-repeatable-switch\" />;\n}\n\n/**\n * An A2A agent's repeatable mark on its page, for an approver (A9): a press\n * sends the change at once, the switch says it is on its way, then the row\n * says what it means now, or why the API refused it.\n */\nexport function RepeatableSwitch({ fleetId, party, isRepeatable }: { fleetId: string; party: string; isRepeatable: boolean }) {\n const [state, action] = useActionState(markA2aAgent, IDLE);\n const shown = state.kind === 'marked' ? state.isRepeatable : isRepeatable;\n return (\n <>\n <form action={action} className=\"contents\">\n <input type=\"hidden\" name={FLEET_FIELD} value={fleetId} />\n <input type=\"hidden\" name=\"name\" value={party} />\n <input type=\"hidden\" name=\"isRepeatable\" value={String(!shown)} />\n <SubmitSwitch isRepeatable={shown} />\n </form>\n {state.kind === 'idle' ? null : (\n <span role={state.kind === 'refused' ? 'alert' : 'status'} className={`basis-full text-caption ${state.kind === 'refused' ? 'text-tone-attention-fg' : 'text-tone-ok-fg'}`} data-testid=\"outside-party-repeatable-outcome\">\n {state.message}\n </span>\n )}\n </>\n );\n}\n","/* __next_internal_action_entry_do_not_use__ [{\"604c675edd999baab7c5ba915bf2295417206b928d\":{\"name\":\"markA2aAgent\"}},\"web/features/outside-party/actions.ts\",\"\"] */\"use turbopack: no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_3=/*#__PURE__*/createServerReference(\"604c675edd999baab7c5ba915bf2295417206b928d\",callServer,void 0,findSourceMapURL,\"markA2aAgent\");export{$$RSC_SERVER_ACTION_3 as markA2aAgent};"],"names":["Switch","isOn","label","isPending","type","onClick","testId","role","disabled","className","$$RSC_SERVER_ACTION_1","$$RSC_SERVER_ACTION_4","AgentNeeds","props","Provider","AgentNeedsLine","fleetId","party","version","scopes","listed","canChange","router","toasts","useToastManager","startTransition","isReloading","startReload","isOpen","setIsOpen","picked","setPicked","isSaving","setIsSaving","refusal","setRefusal","keptVersion","setKeptVersion","round","setRound","kept","setKept","shown","basis","save","madeOn","Math","max","outcome","name","tools","isOk","message","isConflict","previous","add","title","statementRefusal","refresh","own","Set","map","scope","onClose","description","appliesTo","action","pending","isDisabled","onPress","onReload","onPick","nestedDrawers","height","frontmostHeight","swipeMovementX","swipeMovementY","snapPointOffset","swipeStrength","$$RSC_SERVER_ACTION_7","$$RSC_SERVER_ACTION_5","$$RSC_SERVER_ACTION_3"],"mappings":"6CAAuG,IAAA,EAAA,EAAA,CAAA,CAAA,kBAChG,SAAgB,AAAPA,MAASC,CAAI,OAAEC,CAAK,WAAEC,GAAY,CAAK,MAAEC,EAAO,QAAQ,SAAEC,CAAO,CAAEC,QAAM,CAA4H,EACnN,MACE,CAAA,EAAA,EAAA,GAAA,EAAC,SAAA,CACCF,KAAMA,EACNG,KAAK,SACL,eAAcN,EACd,aAAYC,EACZ,YAAWC,EACXK,SAAUL,EACVE,QAASA,EACT,cAAaC,EACbG,UAAW,CAAC,0GAA0G,EAAER,EAAO,4BAA8B,wBAAA,CAAyB,UAEtL,CAAA,EAAA,EAAA,GAAA,EAAC,OAAA,CAAKQ,UAAW,CAAC,mEAAmE,EAAER,EAAO,gBAAkB,gBAAgB,CAAC,EAAEE,EAAY,gBAAkB,GAAA,CAAI,IAG3K,2CCjBsM,IAAA,EAAA,EAAA,CAAA,CAAA,MAAsG,IAAMO,EAAmC,CAAA,EAAA,EAAA,iBAAb,IAAa,AAAqB,EAAC,KAAxB,wCAAqE,EAAA,UAAU,CAAC,KAAK,EAAE,EAAA,gBAAgB,CAAC,kBCG3b,SAAS,EAAO,CAAyB,EACvC,OAAO,EAAO,MAAM,EAAI,EAAI,EAAO,IAAI,CAAC,IAAM,CAAA,EAAG,EAAO,KAAK,CAAC,EAAG,CAAC,GAAG,IAAI,CAAC,MAAM,KAAK,EAAE,EAAO,EAAE,CAAC,CAAC,IAAM,GAAA,CAAI,AAC9GA,CAEA,SAAS,EAAQ,CAAa,EAC5B,MAAO,CAAA,EAAG,OAAO,GAAO,CAAC,EAAY,IAAV,EAAc,OAAS,QAAA,CAAS,AAC7D,CAGO,SAAS,EAAc,CAAe,CAAE,CAA+B,EAC5E,OAA4B,OAArB,EAA4B,EA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