@riverbankcms/sdk 0.159.0 → 0.161.0

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 (218) hide show
  1. package/README.md +4 -4
  2. package/dist/_dts/{BlocksIslandsHydrator-Cj1i1Yhh.d.ts → BlocksIslandsHydrator-Bx4kLiTA.d.ts} +1 -1
  3. package/dist/_dts/{Page-Cgzbv22M.d.ts → Page-Dm7_P13o.d.ts} +217 -8
  4. package/dist/_dts/{SdkPreviewMode-BC_FGc6b.d.ts → SdkPreviewMode-D7HdWWwF.d.ts} +55 -127
  5. package/dist/_dts/{auth-contract-FPg0-2MC.d.ts → auth-contract-CgJ5nMaH.d.ts} +2 -0
  6. package/dist/_dts/{client-BOK-YHVJ.d.ts → client-Ep0jI9eE.d.ts} +1 -1
  7. package/dist/_dts/{content-types-CsrYWxq_.d.ts → content-types-BgAzCrBc.d.ts} +18 -18
  8. package/dist/_dts/{contracts-ClgMD-9g.d.ts → contracts-DUiOnj9e.d.ts} +10 -6
  9. package/dist/_dts/{footerPageOutline-C_IDuELl.d.ts → footerPageOutline-B-uXamTG.d.ts} +6 -6
  10. package/dist/_dts/{generatePageMetadata-B7bhYSWx.d.ts → generatePageMetadata-BDkZYEcS.d.ts} +2 -2
  11. package/dist/_dts/index-BQDBQvdu.d.ts +13 -0
  12. package/dist/_dts/index-BVkP8f70.d.ts +66 -0
  13. package/dist/_dts/{index-Dt3XSGzY.d.ts → index-CF6Cjs7b.d.ts} +2 -2
  14. package/dist/_dts/{index-Ci1PEk82.d.ts → index-CSsfq6KG.d.ts} +3 -17
  15. package/dist/_dts/{index-BZ4fb2zz.d.ts → index-D_8uz4OP.d.ts} +3 -3
  16. package/dist/_dts/{index-CcaG6O13.d.ts → index-DvKQA6AZ.d.ts} +4 -4
  17. package/dist/_dts/{index-DMOfW1A7.d.ts → index-KPrWM0KF.d.ts} +2 -2
  18. package/dist/_dts/{index-DzUdUaJ-.d.ts → index-ylivB7Jj.d.ts} +2 -2
  19. package/dist/_dts/{loadContent-C1JI2pG0.d.ts → loadContent-DTjKOO-T.d.ts} +19 -10
  20. package/dist/_dts/{resolvePageContent-BtRUtrJa.d.ts → resolvePageContent-C1vA5c5w.d.ts} +2 -2
  21. package/dist/_dts/{constants-DkcKHMX-.d.ts → runtime-BY8DQBbT.d.ts} +10 -16
  22. package/dist/_dts/{hosted-booking-appearance-ChGCQYdQ.d.ts → schema-BHu0PYWl.d.ts} +25911 -23567
  23. package/dist/_dts/sdk/src/bookings/index.d.ts +2 -2
  24. package/dist/_dts/sdk/src/client/types.d.ts +2 -2
  25. package/dist/_dts/sdk/src/client.d.ts +13 -7
  26. package/dist/_dts/sdk/src/config/index.d.ts +6 -6
  27. package/dist/_dts/sdk/src/config/template-validation.d.ts +1 -1
  28. package/dist/_dts/sdk/src/config/validation.d.ts +1 -1
  29. package/dist/_dts/sdk/src/index.d.ts +8 -8
  30. package/dist/_dts/sdk/src/manifest/index.d.ts +6 -6
  31. package/dist/_dts/sdk/src/metadata/index.d.ts +1 -1
  32. package/dist/_dts/sdk/src/navigation/index.d.ts +2 -2
  33. package/dist/_dts/sdk/src/next/index.d.ts +7 -7
  34. package/dist/_dts/sdk/src/next/middleware.d.ts +2 -2
  35. package/dist/_dts/sdk/src/page-converter/index.d.ts +10 -28
  36. package/dist/_dts/sdk/src/portal/client.d.ts +1 -1
  37. package/dist/_dts/sdk/src/prebuild/index.d.ts +1 -1
  38. package/dist/_dts/sdk/src/preview-next/before-render.d.ts +2 -2
  39. package/dist/_dts/sdk/src/preview-next/client/index.d.ts +2 -2
  40. package/dist/_dts/sdk/src/preview-next/client/runtime.d.ts +1 -1
  41. package/dist/_dts/sdk/src/preview-next/keep-alive.d.ts +1 -1
  42. package/dist/_dts/sdk/src/preview-next/session.d.ts +2 -2
  43. package/dist/_dts/sdk/src/rendering/client.d.ts +2 -2
  44. package/dist/_dts/sdk/src/rendering/index.d.ts +6 -6
  45. package/dist/_dts/sdk/src/rendering/islands/client.d.ts +1 -1
  46. package/dist/_dts/sdk/src/rendering/server.d.ts +2 -2
  47. package/dist/_dts/sdk/src/routing/index.d.ts +5 -5
  48. package/dist/_dts/sdk/src/server.d.ts +5 -5
  49. package/dist/_dts/sdk/src/theme/index.d.ts +1 -1
  50. package/dist/_dts/{session-Ba2CsnK5.d.ts → session-C_gtSFyZ.d.ts} +2 -1
  51. package/dist/_dts/{navigation-BnV_hOZy.d.ts → types-BR1Yboa9.d.ts} +15530 -16017
  52. package/dist/_dts/{types-CMFIZGUI.d.ts → types-CJXTCF_F.d.ts} +10 -13
  53. package/dist/_dts/{types-CI9dYWJ8.d.ts → types-D02ngcUH.d.ts} +4 -2
  54. package/dist/_dts/{types--oWXIfyz.d.ts → types-ZGUiHpDE.d.ts} +7 -7
  55. package/dist/_dts/{validation-Ct-GL0eA.d.ts → validation-BaV565gb.d.ts} +4 -4
  56. package/dist/client/{BlocksIslandsHydrator-DKS8Ba30.mjs → BlocksIslandsHydrator-DTExCJsb.mjs} +22 -21
  57. package/dist/client/{BookingMailingListNote-Cg9v6d7Y.mjs → BookingMailingListNote-BDpxmn1p.mjs} +2 -2
  58. package/dist/client/{CalendarNavigationChevron-BoVCTUXy.mjs → CalendarNavigationChevron-PeCiL82X.mjs} +6 -6
  59. package/dist/client/{CheckboxChoice-BF9eCNno.mjs → CheckboxChoice-DWexRLf6.mjs} +1 -1
  60. package/dist/client/{DemoBookingPortalAccess-BxRVCJG3.mjs → DemoBookingPortalAccess-3zmIqakW.mjs} +6 -6
  61. package/dist/client/{DemoPortalSignInLink-DHxYgkT6.mjs → DemoPortalSignInLink-GHi-8BW5.mjs} +1 -1
  62. package/dist/client/{EventCalendar.client-BI-kvwXf.mjs → EventCalendar.client-BxQLY5cX.mjs} +10 -9
  63. package/dist/client/{EventCombined.client-DIvnoN5l.mjs → EventCombined.client-B5bmQ03b.mjs} +8 -8
  64. package/dist/client/{EventEmbeddedCheckoutStep-B3XUyNY9.mjs → EventEmbeddedCheckoutStep-CgMZ9TeU.mjs} +1 -1
  65. package/dist/client/{EventItem-BRMtEaa6.mjs → EventItem-BEx-qiDE.mjs} +11 -6
  66. package/dist/client/{EventListWeekNavigation-B8DzAUDa.mjs → EventListWeekNavigation-CyH5tA6Y.mjs} +1 -1
  67. package/dist/client/{EventListing.client-Bo4qzQi0.mjs → EventListing.client-D3uySdGP.mjs} +3 -3
  68. package/dist/client/{EventListing.view-D2vemnCx.mjs → EventListing.view-9RFrBejr.mjs} +31 -15
  69. package/dist/client/{EventRegistrationPayment-e5XWtygG.mjs → EventRegistrationPayment-CG2tQx8K.mjs} +92 -99
  70. package/dist/client/LocationMapActions-Wsr83Q7q.mjs +268 -0
  71. package/dist/client/{Page-Dqpv9Ggi.mjs → Page-Bf2nPACI.mjs} +2673 -2290
  72. package/dist/client/{StepIndicator-BrvKa_8H.mjs → StepIndicator-CZweb1vs.mjs} +3 -3
  73. package/dist/client/{TabBarFragment-DvzIV75f.mjs → TabBarFragment-Bkgz67gt.mjs} +1 -1
  74. package/dist/client/ThemedButton-CnyL3s1A.mjs +2243 -0
  75. package/dist/client/{accordion-ByLpb4Dz.mjs → accordion-TcimLLRQ.mjs} +1 -1
  76. package/dist/client/{booking-form.client-BLndwxpx.mjs → booking-form.client-q-RpJ4aF.mjs} +13 -13
  77. package/dist/client/{bookingForm-CTxTEgHX.mjs → bookingForm-DjGfk3Wj.mjs} +4 -4
  78. package/dist/client/bookings.mjs +6 -6
  79. package/dist/client/{carousel-C8ef0vnT.mjs → carousel-CGAk6j0m.mjs} +2 -2
  80. package/dist/client/{carousel.client-BJGoJVtg.mjs → carousel.client-ArlGmYWV.mjs} +1 -1
  81. package/dist/client/{cart-BpH6jkUO.mjs → cart-D_h3rAZ2.mjs} +3 -3
  82. package/dist/client/{cart.client-DV78Td13.mjs → cart.client-DHOxZbJ7.mjs} +1 -1
  83. package/dist/client/{checkout-BJVb2RpL.mjs → checkout-tC-3CzuM.mjs} +3 -3
  84. package/dist/client/{checkout.client-CqGPXPSm.mjs → checkout.client-DsBb2Pkm.mjs} +1 -1
  85. package/dist/client/client.mjs +28 -15
  86. package/dist/client/{context-BRgBWthI.mjs → context-9ZfMb6GA.mjs} +1 -1
  87. package/dist/client/{cta-D8ucLsvX.mjs → cta-D-ZqL7-e.mjs} +2 -1
  88. package/dist/client/{dateFormatting-LeKNQ-iX.mjs → dateFormatting-BCwLqYpW.mjs} +1 -1
  89. package/dist/client/{demoPortalMagicLink-CjstiFPh.mjs → demoPortalMagicLink-BxkSS9fx.mjs} +1 -1
  90. package/dist/client/{enhanceHeaderSection-BaQJyI9x.mjs → enhanceHeaderSection-xg6to91E.mjs} +3 -3
  91. package/dist/client/{event-details.client-CYNQYOsP.mjs → event-details.client-C670TgRd.mjs} +2 -17
  92. package/dist/client/{event-registration.client-DDqSpN36.mjs → event-registration.client-C6GApWTB.mjs} +17 -17
  93. package/dist/client/{eventCalendar-3vQtuC9X.mjs → eventCalendar-CWc0dg9i.mjs} +4 -4
  94. package/dist/client/{eventCombined-CEJFMjqV.mjs → eventCombined-D4DbOrvQ.mjs} +4 -4
  95. package/dist/client/{eventDetails-nGh47jef.mjs → eventDetails-C2DfmbC0.mjs} +2 -2
  96. package/dist/client/{eventListing-BL3Ptb83.mjs → eventListing-C_yXmHyz.mjs} +4 -4
  97. package/dist/client/{eventRegistration-DDSO6KB2.mjs → eventRegistration-DJuaCB-O.mjs} +4 -4
  98. package/dist/client/{form-DjNLfy2Z.mjs → form-QZhtdFHA.mjs} +3 -3
  99. package/dist/client/{form.client-Cj0By6ot.mjs → form.client-CgvPACwG.mjs} +5 -5
  100. package/dist/client/{form.parts-DyA9C5Hy.mjs → form.parts-2uI0-5N-.mjs} +3 -3
  101. package/dist/client/{formatDate-CZo0MPTA.mjs → formatDate-Danr0Nk4.mjs} +1 -1
  102. package/dist/client/gifting/client.mjs +3 -3
  103. package/dist/client/{headerSection-JjSq6Mzp.mjs → headerSection-DJdlLdvZ.mjs} +2 -2
  104. package/dist/client/{mediaAssets-BOj-Co0B.mjs → mediaAssets-BvjcAZpS.mjs} +1 -1
  105. package/dist/client/mediaContext-jPeJ2PmJ.mjs +10801 -0
  106. package/dist/client/{newsletter-form.client-C2EgEBP1.mjs → newsletter-form.client-Cbepz2KU.mjs} +8 -8
  107. package/dist/client/{newsletter-form.parts-CaldoFmi.mjs → newsletter-form.parts-DN8oMCQ0.mjs} +2 -2
  108. package/dist/client/{newsletterForm-hm7L17LM.mjs → newsletterForm-wjLtW-wq.mjs} +3 -3
  109. package/dist/client/{noop-M8FTSgm2.mjs → noop-B7H6gCbj.mjs} +306 -5
  110. package/dist/client/portal/client.mjs +4560 -115
  111. package/dist/client/{product-detail.client-y86uwzEI.mjs → product-detail.client-CYTR165c.mjs} +1 -1
  112. package/dist/client/{product-list.client-_JBndYZT.mjs → product-list.client-B4vTvag8.mjs} +1 -1
  113. package/dist/client/{productDetail-D-9fb2cW.mjs → productDetail-k8LEMSWn.mjs} +3 -3
  114. package/dist/client/{productList-BSRlnwBW.mjs → productList-DEo8Bqoe.mjs} +3 -3
  115. package/dist/client/{propsDecoder-DhbGL302.mjs → propsDecoder-G0j0HXBO.mjs} +3 -28
  116. package/dist/client/{registry.server-BaX0hxf5.mjs → registry.server-BTmSXE3D.mjs} +1154 -997
  117. package/dist/client/rendering/client.mjs +28 -28
  118. package/dist/client/rendering/islands.mjs +1 -1
  119. package/dist/client/rendering.mjs +57 -32
  120. package/dist/client/{richText-coerce-Cny2Ukb6.mjs → richText-coerce-B19taoH6.mjs} +1 -1
  121. package/dist/client/{routeIslandApiConfig-96er7pIx.mjs → routeIslandApiConfig-Chu5BHra.mjs} +1 -1
  122. package/dist/client/{ThemedButton-DVBC_pS9.mjs → schema-C-m8XHuW.mjs} +1123 -2362
  123. package/dist/client/{shop-CnIJfdZA.mjs → shop-RGWa43H7.mjs} +3 -3
  124. package/dist/client/{shop-commerce-CsLwzq5O.mjs → shop-commerce-TJYCBO_H.mjs} +12 -12
  125. package/dist/client/{shop-commerce-store--O8GRBwr.mjs → shop-commerce-store-CjCcUB_o.mjs} +1 -1
  126. package/dist/client/{shop.client-BcaJ-acA.mjs → shop.client-tsKfZw1W.mjs} +15 -15
  127. package/dist/client/{shop.interactive-BxL_bshW.mjs → shop.interactive-CVqLAU53.mjs} +370 -189
  128. package/dist/client/{shopShared-VZjPOfCX.mjs → shopShared-C3lHMz_R.mjs} +2 -2
  129. package/dist/client/{src-7cXhT0G_.mjs → src-VIsPY-kw.mjs} +6 -1
  130. package/dist/client/timetableModel-V2ifvGGy.mjs +1100 -0
  131. package/dist/client/{useAvailableSlots-pTXuY3jV.mjs → useAvailableSlots-D1X69-pN.mjs} +4 -4
  132. package/dist/client/{useBookingNowIso-D14J-EhJ.mjs → useBookingNowIso-Ch30jino.mjs} +1 -1
  133. package/dist/client/{useDiscountApply-o5sIVZ2u.mjs → useDiscountApply-Bwzr1RjV.mjs} +3 -3
  134. package/dist/client/{useDiscountCodeUi-DJhFP_rg.mjs → useDiscountCodeUi-BimJbFC7.mjs} +1 -1
  135. package/dist/client/{useEventPagination-DMmNf2FP.mjs → useEventPagination-CLAS0upd.mjs} +12 -24
  136. package/dist/client/uuid-BETKW8rS.mjs +12 -0
  137. package/dist/client/{view-BgPql2yH2.mjs → view-BUh4LnLS.mjs} +4 -4
  138. package/dist/client/{view-D1R3Lk05.mjs → view-Dj_FZHmg.mjs} +19 -15
  139. package/dist/client/wizardSteps-BkZc-hKH.mjs +6598 -0
  140. package/dist/preview-next/before-render.mjs +5 -4
  141. package/dist/preview-next/chrome.css +2 -0
  142. package/dist/preview-next/client/{EventEmbeddedCheckoutStep-BFlBqSu4.mjs → EventEmbeddedCheckoutStep-CwerMfzn.mjs} +2 -1
  143. package/dist/preview-next/client/LocationPickerEnvironment-QtSG2Bl-.mjs +138 -0
  144. package/dist/preview-next/client/MapLibreEditMap-B-rohNcG.mjs +488 -0
  145. package/dist/preview-next/client/{PreviewEditorSidebar-DADCj_ET.mjs → PreviewEditorSidebar-Dvq-RW9-.mjs} +1328 -171
  146. package/dist/preview-next/client/{PreviewEditorUI-La40Dmmh.mjs → PreviewEditorUI-BdFjS39R.mjs} +53 -79
  147. package/dist/preview-next/client/{SdkPreviewModeRuntime-406Hw9zY.mjs → SdkPreviewModeRuntime-BEfHln1E.mjs} +1249 -2551
  148. package/dist/preview-next/client/{SdkPreviewModeRuntime-CWN44I_B.mjs → SdkPreviewModeRuntime-CjkGh1IG.mjs} +1 -1
  149. package/dist/preview-next/client/{SiteChromeCustomizeContext-BdwEZoo9.mjs → SiteChromeCustomizeContext-CDbxk_qZ.mjs} +117481 -162497
  150. package/dist/preview-next/client/{ThemedButton-BEOPss9H.mjs → ThemedButton-b14Bv03E.mjs} +1253 -403
  151. package/dist/preview-next/client/lucide-react-CA9cpo0P.mjs +51984 -0
  152. package/dist/preview-next/client/maplibre-gl-DykfOYYn.mjs +34208 -0
  153. package/dist/preview-next/client/{previewChromeSurface-BVUKIYG0.mjs → previewChromeSurface-Dd1_mNIg.mjs} +3 -8
  154. package/dist/preview-next/client/result-BjJUoxUF.mjs +16 -0
  155. package/dist/preview-next/client/rolldown-runtime-CE6sIgz8.mjs +34 -0
  156. package/dist/preview-next/client/runtime.mjs +3 -3
  157. package/dist/preview-next/client/{sdk-runtime-Cy9AKPy5.mjs → sdk-runtime-B-CXyGVb.mjs} +1 -1
  158. package/dist/preview-next/client/siteStyleAccess-Kqk0j0dE.mjs +5812 -0
  159. package/dist/preview-next/client/{spinner-Bhpzz2vO.mjs → spinner-CGxS8Ns-.mjs} +2 -1
  160. package/dist/preview-next/{constants-D8Ya7bO4.mjs → constants-Bf-vqdKH.mjs} +2 -1
  161. package/dist/preview-next/editor-base.css +64 -2
  162. package/dist/preview-next/editor-chrome.css +85 -0
  163. package/dist/preview-next/keepAlive.mjs +2 -2
  164. package/dist/preview-next/middleware.mjs +7 -3
  165. package/dist/preview-next/{route-contract-DM22uOXM.mjs → route-contract-hLg-yjQN.mjs} +190 -116
  166. package/dist/preview-next/{session-BgkrPqu0.mjs → session-P1R_ajT7.mjs} +12 -2
  167. package/dist/preview-next/session.mjs +1 -1
  168. package/dist/server/{Block.shared-DB6fb1pR.mjs → Block.shared-CeTd2saO.mjs} +6 -6
  169. package/dist/server/{bindings-z2daXp-2.mjs → bindings-C5YpKuKt.mjs} +3 -2
  170. package/dist/server/{client-Cv-osXoU.mjs → client-Cv26lZQ4.mjs} +14 -10
  171. package/dist/server/config-template-validation.mjs +50 -10
  172. package/dist/server/config-validation.mjs +1 -1
  173. package/dist/server/config.mjs +2 -2
  174. package/dist/server/{siteChromeOverlayClearance-BangtD8A.mjs → effectiveNavLinkStyle-CGvGr3yD.mjs} +572 -1078
  175. package/dist/server/index.mjs +3 -3
  176. package/dist/server/{loadContent-BNMDYCm8.mjs → loadContent-C8a0b-cC.mjs} +40 -21
  177. package/dist/server/loadPage--DXBwI8V.mjs +2 -0
  178. package/dist/server/{loadPage-CjA_F_AF.mjs → loadPage-BW7dklu3.mjs} +9 -5
  179. package/dist/server/manifest.mjs +1 -1
  180. package/dist/server/next.mjs +9 -9
  181. package/dist/server/{overrideResolution-CGodrtqi.mjs → overrideResolution-tIuqmJB3.mjs} +1 -1
  182. package/dist/server/{overrides-DxRC724a.mjs → overrides-D1fiPOKF.mjs} +1158 -754
  183. package/dist/server/page-converter.mjs +8 -10
  184. package/dist/server/{prebuild-C6bhjRKT.mjs → prebuild--fO0E2tr.mjs} +1 -1
  185. package/dist/server/prebuild.mjs +1 -1
  186. package/dist/server/{prefetchBlockData-DZ5Fq_-r.mjs → prefetchBlockData-CqJnokWJ.mjs} +968 -968
  187. package/dist/server/{publicProducts-C3meXS2o.mjs → publicProducts-CvvZ4JIe.mjs} +207 -132
  188. package/dist/server/{blocks-BaG8Qpaa.mjs → registry-BVfCqaCq.mjs} +2853 -2799
  189. package/dist/server/rendering/server.mjs +4 -4
  190. package/dist/server/rendering.mjs +8 -8
  191. package/dist/server/{resolveBlockData-CbGDakvp.mjs → resolveBlockData-DPNvhXEz.mjs} +6 -3
  192. package/dist/server/routing.mjs +1 -1
  193. package/dist/server/{schema-Bs735S27.mjs → schema-CD4peO7m.mjs} +2441 -1401
  194. package/dist/server/server.mjs +3 -3
  195. package/dist/server/site-styles-H-EvTJiW.mjs +787 -0
  196. package/dist/server/siteChromeOverlayClearance-DNC2k1U0.mjs +750 -0
  197. package/dist/server/{src-B935_bzN.mjs → src-ILxc6pid.mjs} +427 -190
  198. package/dist/server/theme-bridge.mjs +1 -1
  199. package/dist/server/theme.mjs +1 -1
  200. package/dist/server/{themeAdmission-DK2YBNqy.mjs → themeAdmission-BNHIXiUj.mjs} +117 -26
  201. package/dist/server/{three-pass-converter-CmmchOFC.mjs → three-pass-converter-Chnb1XD-.mjs} +2 -58
  202. package/dist/server/{validation-BtHE2S_D.mjs → validation-B1ieVemg.mjs} +22 -63
  203. package/dist/server/{version-CNCdL6id.mjs → version-BQK44wFg.mjs} +1 -1
  204. package/dist/styles/index.css +235 -0
  205. package/package.json +8 -3
  206. package/dist/_dts/index-CXsnaCGe.d.ts +0 -10
  207. package/dist/_dts/index-cnymEAZY.d.ts +0 -1
  208. package/dist/client/LeafletStaticMap-dlapZ6mi.mjs +0 -135
  209. package/dist/client/location-map.client-DRN1JePj.mjs +0 -28
  210. package/dist/client/location-map.view-CuCvQdvp.mjs +0 -282
  211. package/dist/client/locationMap-B9srHHzZ.mjs +0 -15
  212. package/dist/client/mediaContext-DThoeEBU.mjs +0 -136
  213. package/dist/client/renderableMediaAssetAdmission-DGjBr_e-.mjs +0 -152
  214. package/dist/client/timetableModel-D09jPdue.mjs +0 -480
  215. package/dist/client/wizardSteps-C0TsNqJc.mjs +0 -17049
  216. package/dist/preview-next/client/siteStyleAccess-CFMmoMZb.mjs +0 -1326
  217. package/dist/server/loadPage-jade28Xh.mjs +0 -2
  218. package/dist/server/media-CcHwZkdJ.mjs +0 -243
@@ -1,28 +1,19 @@
1
1
  "use client";
2
- import { T as parseEventRegistrationErrorReason, w as eventRegistrationErrors } from "./ThemedButton-DVBC_pS9.mjs";
3
- import { $ as getEligibilityFlowFlags, At as getTicketSelectionTotal, C as resolveGuestNextStepCheck, Dr as resolveEventRegistrationScopedEvents, E as resolveRegistrationTicketContinuation, Ft as getRegistrationStartAt, G as resolveRegistrationTarget, H as findPreSelectedEvent, It as toRegistrationEvents, J as beginWaitlistInvitation, K as resolveRouteRequiresPayment, Ki as publicEventPricingStrategy, L as calculateEventRegistrationPreviewTotal, M as resolveEventRegistrationSubmitPlan, Mt as hasValidPricingOptionSelection, Nt as normalizeTicketSelectionLines, O as visitorHoldsOwnPlace, Ot as getSingleSelectedPricingOptionId, Pi as resolveBookingSignupOffer, Q as getCurrentTicketSelection, Rt as toWholeSeriesRegistrationEvents, S as planRegistrationDetailsContinuation, St as getVisibleTicketTypes, U as resolveDiscountContext, W as resolveEventRequiresPayment, X as invitationSubmission, Y as createRegistrationDraftData, Z as formatCentsAsCurrencyInput, a as registrationPresentation, at as resolveHeldTicketPlaces, bt as getPortalSubjectEmail, d as decideEventChoice, et as getRegistrationOccurrenceId, f as getDeclinedPass, ft as findSelectedTicketType, g as decideEventRegistrationPayment, h as buildEventRegistrationPaymentOptionsViewModel, i as registrationPaymentRoute, it as parseCurrencyInputToCents, m as registrationFlowReducer, nt as getSlidingScaleSelectionMessage, o as registrationRoute, ot as shouldLoadRegistrationOptions, p as isRegistrationLocked, q as toRegistrationRequestSubject, rt as getTicketSelectionRemainingPlaces, st as validateFormData, tt as getSlidingScaleForEvent, u as createInitialRegistrationFlowState, w as resolveRegistrationAdmission, wt as transformRegistrationOptionsResponse, x as planRegistrationDetailsCheck, y as getTicketSelectionPurpose, yt as getImplicitSingleTicketType } from "./wizardSteps-C0TsNqJc.mjs";
4
- import { st as inferSiteDateLocale, yt as resolveBookingBusinessTimeZone } from "./noop-M8FTSgm2.mjs";
5
- import { a as siteTermsFailureKind, o as useSiteTermsAgreement, s as eventSiteTermsSurface } from "./DemoBookingPortalAccess-BxRVCJG3.mjs";
6
- import { t as assertNever } from "./src-7cXhT0G_.mjs";
7
- import { t as useDiscountCodeUi } from "./useDiscountCodeUi-DJhFP_rg.mjs";
8
- import { r as usePolling } from "./BookingMailingListNote-Cg9v6d7Y.mjs";
2
+ import { D as parseEventRegistrationErrorReason, E as eventRegistrationErrors, T as eventRegistrationErrorEndsCommand } from "./ThemedButton-CnyL3s1A.mjs";
3
+ import { t as assertNever } from "./src-VIsPY-kw.mjs";
4
+ import { $ as getEligibilityFlowFlags, At as getTicketSelectionTotal, C as resolveGuestNextStepCheck, Dr as resolveEventRegistrationScopedEvents, E as resolveRegistrationTicketContinuation, Ft as getRegistrationStartAt, G as resolveRegistrationTarget, H as findPreSelectedEvent, It as toRegistrationEvents, J as beginWaitlistInvitation, K as resolveRouteRequiresPayment, Kr as resolveBookingSignupOffer, L as calculateEventRegistrationPreviewTotal, M as resolveEventRegistrationSubmitPlan, Mt as hasValidPricingOptionSelection, Nt as normalizeTicketSelectionLines, O as visitorHoldsOwnPlace, Ot as getSingleSelectedPricingOptionId, Q as getCurrentTicketSelection, Rt as toWholeSeriesRegistrationEvents, S as planRegistrationDetailsContinuation, St as getVisibleTicketTypes, U as resolveDiscountContext, W as resolveEventRequiresPayment, X as invitationSubmission, Y as createRegistrationDraftData, Z as formatCentsAsCurrencyInput, a as registrationPresentation, at as resolveHeldTicketPlaces, bt as getPortalSubjectEmail, d as decideEventChoice, et as getRegistrationOccurrenceId, f as getDeclinedPass, ft as findSelectedTicketType, g as decideEventRegistrationPayment, h as buildEventRegistrationPaymentOptionsViewModel, i as registrationPaymentRoute, ii as publicEventPricingStrategy, it as parseCurrencyInputToCents, m as registrationFlowReducer, nt as getSlidingScaleSelectionMessage, o as registrationRoute, ot as shouldLoadRegistrationOptions, p as isRegistrationLocked, q as toRegistrationRequestSubject, rt as getTicketSelectionRemainingPlaces, st as validateFormData, tt as getSlidingScaleForEvent, u as createInitialRegistrationFlowState, w as resolveRegistrationAdmission, wt as transformRegistrationOptionsResponse, x as planRegistrationDetailsCheck, y as getTicketSelectionPurpose, yt as getImplicitSingleTicketType } from "./wizardSteps-BkZc-hKH.mjs";
5
+ import { Dt as resolveBookingBusinessTimeZone, ht as inferSiteDateLocale } from "./noop-B7H6gCbj.mjs";
6
+ import { a as siteTermsFailureKind, o as useSiteTermsAgreement, s as eventSiteTermsSurface } from "./DemoBookingPortalAccess-3zmIqakW.mjs";
7
+ import { t as generateUuidV4 } from "./uuid-BETKW8rS.mjs";
8
+ import { t as useDiscountCodeUi } from "./useDiscountCodeUi-BimJbFC7.mjs";
9
+ import { r as usePolling } from "./BookingMailingListNote-BDpxmn1p.mjs";
9
10
  import { n as EVENT_REGISTRATION_CHECKOUT_ATTEMPT_PARAM, t as EVENT_REGISTRATION_ANCHOR_ID } from "./constants-4o4_hl34.mjs";
10
- import { n as useBlockApi, r as BlockApiError } from "./context-BRgBWthI.mjs";
11
- import { t as useBookingNowIso } from "./useBookingNowIso-D14J-EhJ.mjs";
12
- import { o as storeDemoBookingPass, t as CUSTOMER_PORTAL_PATH } from "./demoPortalMagicLink-CjstiFPh.mjs";
11
+ import { n as useBlockApi, r as BlockApiError } from "./context-9ZfMb6GA.mjs";
12
+ import { t as useBookingNowIso } from "./useBookingNowIso-Ch30jino.mjs";
13
+ import { o as storeDemoBookingPass, t as CUSTOMER_PORTAL_PATH } from "./demoPortalMagicLink-BxkSS9fx.mjs";
13
14
  import { Suspense, lazy, useCallback, useEffect, useMemo, useReducer, useRef, useState, useSyncExternalStore } from "react";
14
15
  import { z } from "zod";
15
16
  import { jsx } from "react/jsx-runtime";
16
- //#region ../core/src/uuid.ts
17
- function generateUuidV4(cryptoSource = globalThis.crypto) {
18
- if (typeof cryptoSource.randomUUID === "function") return cryptoSource.randomUUID();
19
- const bytes = cryptoSource.getRandomValues(/* @__PURE__ */ new Uint8Array(16));
20
- bytes[6] = (bytes[6] ?? 0) & 15 | 64;
21
- bytes[8] = (bytes[8] ?? 0) & 63 | 128;
22
- const hex = Array.from(bytes, (byte) => byte.toString(16).padStart(2, "0"));
23
- return `${hex.slice(0, 4).join("")}-${hex.slice(4, 6).join("")}-${hex.slice(6, 8).join("")}-${hex.slice(8, 10).join("")}-${hex.slice(10).join("")}`;
24
- }
25
- //#endregion
26
17
  //#region ../blocks/src/system/runtime/shared/utils/portalLogout.ts
27
18
  /**
28
19
  * Portal Logout Utility
@@ -164,7 +155,8 @@ function eligibilityLookupReducer(state, action) {
164
155
  case "reset": return initialEligibilityLookupState;
165
156
  case "loading-started": return {
166
157
  tag: "loading",
167
- eligibility: state.eligibility,
158
+ eligibility: null,
159
+ previousEligibility: state.tag === "loading" ? state.previousEligibility : state.eligibility,
168
160
  settledRequestKey: state.settledRequestKey,
169
161
  error: null
170
162
  };
@@ -177,7 +169,7 @@ function eligibilityLookupReducer(state, action) {
177
169
  case "failed": return {
178
170
  tag: "failed",
179
171
  eligibility: null,
180
- settledRequestKey: null,
172
+ settledRequestKey: action.requestKey,
181
173
  error: action.message
182
174
  };
183
175
  default: return assertNever(action);
@@ -272,90 +264,79 @@ function usePortalAuthWithDeps(deps) {
272
264
  function useEligibility(params) {
273
265
  return useEligibilityWithDeps(params, eventRegistrationHooksDeps);
274
266
  }
275
- function eligibilityRequestKey(params) {
276
- return JSON.stringify({
277
- enabled: params.enabled,
278
- refreshKey: params.refreshKey ?? 0,
279
- subject: params.subject,
280
- attendanceMode: params.attendanceMode ?? null,
281
- ticketSelections: params.ticketSelectionsKey,
282
- selectedSlidingAmount: params.selectedSlidingAmount ?? null
283
- });
267
+ /** One request for the current selection; disabled/incomplete selections do not fetch. */
268
+ function eligibilityRequest(params) {
269
+ const selections = normalizeTicketSelectionLines(params.ticketSelections);
270
+ if (!params.enabled || !params.subject || selections.length === 0) return null;
271
+ return {
272
+ subject: toRegistrationRequestSubject(params.subject, params.attendanceMode),
273
+ selections: selections.map(({ pricingOptionId, quantity }) => ({
274
+ pricingOptionId,
275
+ quantity
276
+ })),
277
+ selectedSlidingAmount: params.selectedSlidingAmount ?? void 0
278
+ };
279
+ }
280
+ /** One effective union owns readiness, including the pre-fetch debounce window. */
281
+ function effectiveEligibilityState(state, requestKey, active) {
282
+ if (!active) return initialEligibilityLookupState;
283
+ if (state.tag === "loading" || state.settledRequestKey === requestKey) return state;
284
+ return eligibilityLookupReducer(state, { type: "loading-started" });
285
+ }
286
+ /** Fetches a quote; a disposed request can never settle the next selection. */
287
+ async function loadEligibility(input) {
288
+ input.dispatch({ type: "loading-started" });
289
+ try {
290
+ const result = await input.api.getRegistrationOptions(input.request);
291
+ if (!input.isCurrent()) return;
292
+ input.dispatch({
293
+ type: "resolved",
294
+ eligibility: transformRegistrationOptionsResponse(result),
295
+ requestKey: input.requestKey
296
+ });
297
+ } catch {
298
+ if (!input.isCurrent()) return;
299
+ input.dispatch({
300
+ type: "failed",
301
+ requestKey: input.requestKey,
302
+ message: "We couldn’t load the booking options for this event. Please refresh this page and try again. If this keeps happening, contact the organiser for help."
303
+ });
304
+ }
284
305
  }
285
306
  function useEligibilityWithDeps(params, deps) {
286
307
  const api = deps.useBlockApi();
287
- const ticketSelectionsKey = JSON.stringify(normalizeTicketSelectionLines(params.ticketSelections));
288
- const requestKey = eligibilityRequestKey({
289
- ...params,
290
- ticketSelectionsKey
308
+ const request = eligibilityRequest(params);
309
+ const requestKey = JSON.stringify({
310
+ refreshKey: params.refreshKey ?? 0,
311
+ request
291
312
  });
292
313
  const [state, dispatch] = useReducer(eligibilityLookupReducer, initialEligibilityLookupState);
293
- const requestIdRef = useRef(0);
294
314
  useEffect(() => {
295
- let cancelled = false;
296
- async function fetchEligibility() {
297
- if (!params.enabled) {
298
- requestIdRef.current += 1;
299
- dispatch({ type: "reset" });
300
- return;
301
- }
302
- const ticketSelections = JSON.parse(ticketSelectionsKey);
303
- if (!params.subject || ticketSelections.length === 0) {
304
- requestIdRef.current += 1;
305
- dispatch({ type: "reset" });
306
- return;
307
- }
308
- const requestId = requestIdRef.current + 1;
309
- requestIdRef.current = requestId;
310
- dispatch({ type: "loading-started" });
311
- try {
312
- const subject = toRegistrationRequestSubject(params.subject, params.attendanceMode);
313
- const result = await api.getRegistrationOptions({
314
- subject,
315
- selections: ticketSelections.map((selection) => ({
316
- pricingOptionId: selection.pricingOptionId,
317
- quantity: selection.quantity
318
- })),
319
- selectedSlidingAmount: params.selectedSlidingAmount ?? void 0
320
- });
321
- if (cancelled || requestIdRef.current !== requestId) return;
322
- dispatch({
323
- type: "resolved",
324
- eligibility: transformRegistrationOptionsResponse(result),
325
- requestKey
326
- });
327
- } catch {
328
- if (cancelled || requestIdRef.current !== requestId) return;
329
- dispatch({
330
- type: "failed",
331
- message: "We couldn’t load the booking options for this event. Please refresh this page and try again. If this keeps happening, contact the organiser for help."
332
- });
333
- }
334
- }
335
- const timeoutId = window.setTimeout(() => void fetchEligibility(), REGISTRATION_OPTIONS_DEBOUNCE_MS);
315
+ const lifetime = { current: true };
316
+ const timeoutId = window.setTimeout(() => {
317
+ if (!request) return dispatch({ type: "reset" });
318
+ loadEligibility({
319
+ api,
320
+ request,
321
+ requestKey,
322
+ dispatch,
323
+ isCurrent: () => lifetime.current
324
+ });
325
+ }, REGISTRATION_OPTIONS_DEBOUNCE_MS);
336
326
  return () => {
337
- cancelled = true;
327
+ lifetime.current = false;
338
328
  window.clearTimeout(timeoutId);
339
329
  };
340
- }, [
341
- api,
342
- params.enabled,
343
- params.refreshKey,
344
- params.subject?.kind,
345
- params.subject?.kind === "occurrence" ? params.subject.occurrenceId : params.subject?.eventSeriesId,
346
- params.attendanceMode,
347
- ticketSelectionsKey,
348
- params.selectedSlidingAmount
349
- ]);
350
- const creditState = registrationOptionsCreditState(state, params.subjectEmail);
330
+ }, [api, requestKey]);
331
+ const effectiveState = effectiveEligibilityState(state, requestKey, request !== null);
351
332
  return {
352
- state,
353
- eligibility: state.eligibility,
354
- settledRequestKey: state.settledRequestKey,
333
+ state: effectiveState,
334
+ eligibility: effectiveState.tag === "loading" ? effectiveState.previousEligibility : effectiveState.eligibility,
335
+ settledRequestKey: effectiveState.settledRequestKey,
355
336
  requestKey,
356
- isLoading: state.tag === "loading",
357
- error: state.error,
358
- creditState
337
+ isLoading: effectiveState.tag === "loading",
338
+ error: effectiveState.error,
339
+ creditState: registrationOptionsCreditState(effectiveState, params.subjectEmail)
359
340
  };
360
341
  }
361
342
  function registrationOptionsCreditState(state, subjectEmail) {
@@ -718,8 +699,20 @@ function clearEventPayment(siteId) {
718
699
  //#region ../blocks/src/system/runtime/nodes/event-registration/registrationErrorPresentation.ts
719
700
  function registrationErrorPresentation(error) {
720
701
  const reason = error instanceof BlockApiError ? parseEventRegistrationErrorReason(error.tag) : null;
721
- if (reason) return eventRegistrationErrors[reason];
722
- if (error instanceof BlockApiError && error.status < 500 && error.code !== "invalid_booking_response") return eventRegistrationErrors.invalidCommitInput;
702
+ if (reason) {
703
+ const { message, action } = eventRegistrationErrors[reason];
704
+ return {
705
+ message,
706
+ action
707
+ };
708
+ }
709
+ if (error instanceof BlockApiError && error.status < 500 && error.code !== "invalid_booking_response") {
710
+ const { message, action } = eventRegistrationErrors.invalidCommitInput;
711
+ return {
712
+ message,
713
+ action
714
+ };
715
+ }
723
716
  return {
724
717
  message: "Something went wrong. Please try again.",
725
718
  action: "retry"
@@ -798,7 +791,7 @@ function useEventRegistrationSubmitWithDeps(options, deps) {
798
791
  registrationCommandId: prepared.registrationCommandId
799
792
  }));
800
793
  } catch (error) {
801
- if (error instanceof BlockApiError && error.tag === "registrationPreparationChanged") commandRef.current = null;
794
+ if (error instanceof BlockApiError && eventRegistrationErrorEndsCommand(error.tag)) commandRef.current = null;
802
795
  const { message, action } = registrationErrorPresentation(error);
803
796
  options.setErrorAction?.(action);
804
797
  options.setErrorMessage(message);
@@ -2436,7 +2429,7 @@ function resolveWizardPaymentView(input) {
2436
2429
  }
2437
2430
  //#endregion
2438
2431
  //#region ../blocks/src/system/runtime/nodes/event-registration/EventRegistrationPayment.tsx
2439
- const Payment = lazy(() => import("./EventEmbeddedCheckoutStep-B3XUyNY9.mjs"));
2432
+ const Payment = lazy(() => import("./EventEmbeddedCheckoutStep-CgMZ9TeU.mjs"));
2440
2433
  /** The one Stripe mount, shared by the standard wizard and headless arrangements. */
2441
2434
  function EventPaymentMount({ state, onComplete, onRetry, onBack, buttonVariant }) {
2442
2435
  if (state.kind === "abandoning") return /* @__PURE__ */ jsx("p", {
@@ -0,0 +1,268 @@
1
+ "use client";
2
+ import { i as ThemedButtonLink } from "./ThemedButton-CnyL3s1A.mjs";
3
+ import { ct as mapDrawingSchema, rt as normalizeLocationAddressText } from "./noop-B7H6gCbj.mjs";
4
+ import "react";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+ //#region ../core/src/locationLinks.ts
7
+ /** Both outbound actions use the arrival pin, never match evidence. */
8
+ function locationMapLinks(input) {
9
+ const target = input.location != null ? `${input.location.lat},${input.location.lng}` : normalizeLocationAddressText(input.addressText);
10
+ if (target === null) return {
11
+ directions: null,
12
+ googleMaps: null
13
+ };
14
+ const directions = new URL("https://www.google.com/maps/dir/");
15
+ directions.searchParams.set("api", "1");
16
+ directions.searchParams.set("destination", target);
17
+ const search = new URL("https://www.google.com/maps/search/");
18
+ search.searchParams.set("api", "1");
19
+ search.searchParams.set("query", target);
20
+ return {
21
+ directions: directions.toString(),
22
+ googleMaps: search.toString()
23
+ };
24
+ }
25
+ //#endregion
26
+ //#region ../blocks/src/system/runtime/nodes/svg.tsx
27
+ /**
28
+ * Strict SVG-`transform` validator.
29
+ *
30
+ * Accepts only a whitespace/comma-separated list of the geometric transform
31
+ * functions (`translate`/`rotate`/`scale`/`skewX`/`skewY`/`matrix`) whose
32
+ * arguments are plain numbers. This deliberately rejects anything else —
33
+ * `url(...)`, CSS functions, `javascript:`, angle/length units, stray letters —
34
+ * so a persisted custom-block tree can't smuggle an executable or exfiltrating
35
+ * value into the attribute.
36
+ */
37
+ const TRANSFORM_NUMBER = String.raw`-?(?:\d+\.?\d*|\.\d+)(?:e-?\d+)?`;
38
+ const TRANSFORM_ARGS = String.raw`${TRANSFORM_NUMBER}(?:[\s,]+${TRANSFORM_NUMBER})*`;
39
+ const TRANSFORM_FN = String.raw`(?:translate|rotate|scale|skewX|skewY|matrix)\(\s*${TRANSFORM_ARGS}\s*\)`;
40
+ const SAFE_TRANSFORM_RE = new RegExp(String.raw`^\s*${TRANSFORM_FN}(?:[\s,]*${TRANSFORM_FN})*\s*$`);
41
+ function safeTransform(value) {
42
+ if (typeof value !== "string") return void 0;
43
+ const trimmed = value.trim();
44
+ if (trimmed.length === 0) return void 0;
45
+ return SAFE_TRANSFORM_RE.test(trimmed) ? trimmed : void 0;
46
+ }
47
+ /**
48
+ * Turn paint props into a CSS style object. Colour values pass through as-is so
49
+ * they may reference theme tokens via `var()`, which only resolves in a CSS
50
+ * property context (not in a bare presentation attribute).
51
+ */
52
+ function paintStyle(shape) {
53
+ const style = {};
54
+ if (shape.fill !== void 0) style.fill = shape.fill;
55
+ if (shape.stroke !== void 0) style.stroke = shape.stroke;
56
+ if (shape.strokeWidth !== void 0) style.strokeWidth = shape.strokeWidth;
57
+ if (shape.fillOpacity !== void 0) style.fillOpacity = shape.fillOpacity;
58
+ if (shape.strokeOpacity !== void 0) style.strokeOpacity = shape.strokeOpacity;
59
+ if (shape.strokeLinecap !== void 0) style.strokeLinecap = shape.strokeLinecap;
60
+ if (shape.strokeLinejoin !== void 0) style.strokeLinejoin = shape.strokeLinejoin;
61
+ if (shape.strokeDasharray !== void 0) style.strokeDasharray = shape.strokeDasharray;
62
+ return style;
63
+ }
64
+ function renderShape(shape, key) {
65
+ const style = paintStyle(shape);
66
+ const transform = safeTransform(shape.transform);
67
+ switch (shape.kind) {
68
+ case "text": return /* @__PURE__ */ jsx("text", {
69
+ className: shape.className,
70
+ x: shape.x,
71
+ y: shape.y,
72
+ transform,
73
+ children: shape.text
74
+ }, key);
75
+ case "path": return /* @__PURE__ */ jsx("path", {
76
+ d: shape.d,
77
+ className: shape.className,
78
+ fillRule: shape.fillRule,
79
+ style,
80
+ transform
81
+ }, key);
82
+ case "ellipse": return /* @__PURE__ */ jsx("ellipse", {
83
+ cx: shape.cx,
84
+ cy: shape.cy,
85
+ rx: shape.rx,
86
+ ry: shape.ry,
87
+ style,
88
+ transform
89
+ }, key);
90
+ case "circle": return /* @__PURE__ */ jsx("circle", {
91
+ cx: shape.cx,
92
+ cy: shape.cy,
93
+ r: shape.r,
94
+ style,
95
+ transform
96
+ }, key);
97
+ case "rect": return /* @__PURE__ */ jsx("rect", {
98
+ x: shape.x,
99
+ y: shape.y,
100
+ className: shape.className,
101
+ width: shape.width,
102
+ height: shape.height,
103
+ rx: shape.rx,
104
+ ry: shape.ry,
105
+ style,
106
+ transform
107
+ }, key);
108
+ case "line": return /* @__PURE__ */ jsx("line", {
109
+ x1: shape.x1,
110
+ y1: shape.y1,
111
+ x2: shape.x2,
112
+ y2: shape.y2,
113
+ style,
114
+ transform
115
+ }, key);
116
+ default: return null;
117
+ }
118
+ }
119
+ const SvgNode = ({ blockId: _blockId, blockKind: _blockKind, blockContent: _blockContent, fragmentRegistry: _fragmentRegistry, pathBase: _pathBase, viewBox, width, height, className, style, ariaHidden = true, ariaLabel, shapes }) => {
120
+ return /* @__PURE__ */ jsx("svg", {
121
+ viewBox,
122
+ width,
123
+ height,
124
+ className,
125
+ style,
126
+ "aria-hidden": ariaHidden || void 0,
127
+ role: ariaLabel ? "img" : void 0,
128
+ "aria-label": ariaLabel,
129
+ xmlns: "http://www.w3.org/2000/svg",
130
+ fill: "none",
131
+ children: (Array.isArray(shapes) ? shapes : []).map((shape, index) => renderShape(shape, index))
132
+ });
133
+ };
134
+ //#endregion
135
+ //#region ../blocks/src/system/runtime/nodes/shared/MapDrawingSvg.tsx
136
+ const PIN_PATH = "M0 0C-3.5-9-13-15-13-25A13 13 0 1 1 13-25C13-15 3.5-9 0 0ZM0-20.5A4.5 4.5 0 1 0 0-29.5A4.5 4.5 0 1 0 0-20.5Z";
137
+ const commands = (points) => points.map(([x, y], index) => `${index ? "L" : "M"}${x} ${y}`).join(" ");
138
+ function pathShape(path) {
139
+ return path.kind === "polygon" ? {
140
+ kind: "path",
141
+ className: path.className,
142
+ fillRule: path.fillRule,
143
+ d: path.rings.map((ring) => `${commands(ring)} Z`).join(" ")
144
+ } : {
145
+ kind: "path",
146
+ className: path.className,
147
+ d: commands(path.points)
148
+ };
149
+ }
150
+ function labelShapes(label) {
151
+ const [x, y] = label.point, transform = `rotate(${label.angle} ${x} ${y})`;
152
+ return [label.haloClassName, label.className].map((className) => ({
153
+ kind: "text",
154
+ className,
155
+ x,
156
+ y,
157
+ transform,
158
+ text: label.text
159
+ }));
160
+ }
161
+ /** The drawing the renderer below would show, or null when there's nothing it can draw. */
162
+ function readableMapDrawing(drawing) {
163
+ const parsed = mapDrawingSchema.safeParse(drawing);
164
+ return parsed.success ? parsed.data : null;
165
+ }
166
+ /** Untrusted standalone callers retain boundary admission. */
167
+ function MapDrawingSvg(props) {
168
+ const drawing = readableMapDrawing(props.drawing);
169
+ return drawing ? /* @__PURE__ */ jsx(AdmittedMapDrawingSvg, {
170
+ ...props,
171
+ drawing
172
+ }) : null;
173
+ }
174
+ /** Render an already admitted value without allocating another validation copy. */
175
+ function AdmittedMapDrawingSvg(props) {
176
+ const drawing = props.drawing;
177
+ const name = props.wider ? "wider" : "neighbourhood", frame = drawing.frames[name];
178
+ const shapes = [
179
+ {
180
+ kind: "rect",
181
+ className: frame.backgroundClass,
182
+ x: 0,
183
+ y: 0,
184
+ width: 800,
185
+ height: 800
186
+ },
187
+ ...frame.paths.map(pathShape),
188
+ ...frame.labels.flatMap(labelShapes),
189
+ {
190
+ kind: "path",
191
+ className: frame.pin.className,
192
+ fillRule: "evenodd",
193
+ d: PIN_PATH,
194
+ transform: `translate(${frame.pin.point.join(" ")})`
195
+ }
196
+ ];
197
+ return /* @__PURE__ */ jsxs("figure", {
198
+ className: `rb-map-drawing ${props.className ?? ""}`.trim(),
199
+ children: [/* @__PURE__ */ jsx("div", {
200
+ className: "rb-map-drawing-crop",
201
+ style: cropHeightStyle(Math.max(255, props.height ?? 320), props.heightAs ?? "fixed"),
202
+ children: /* @__PURE__ */ jsx(SvgNode, {
203
+ className: `map-${name}`,
204
+ viewBox: frame.viewBox.join(" "),
205
+ shapes,
206
+ ariaHidden: false,
207
+ ariaLabel: props.label ? `Map showing ${props.label}` : "Map showing the arrival pin"
208
+ })
209
+ }), /* @__PURE__ */ jsxs("figcaption", { children: ["© ", /* @__PURE__ */ jsx("a", {
210
+ href: "https://www.openstreetmap.org/copyright",
211
+ target: "_blank",
212
+ rel: "noreferrer",
213
+ children: "OpenStreetMap contributors"
214
+ })] })]
215
+ });
216
+ }
217
+ function cropHeightStyle(height, heightAs) {
218
+ return heightAs === "minimum" ? { minHeight: height } : { height };
219
+ }
220
+ //#endregion
221
+ //#region ../blocks/src/system/runtime/nodes/shared/LocationMapActions.tsx
222
+ /**
223
+ * `compact` (event details, cards and modals) keeps two small ghost buttons;
224
+ * `block` (the map block) leads with a secondary directions button and keeps
225
+ * Google Maps as a plain text link beside it.
226
+ */
227
+ function LocationMapActions(props) {
228
+ const links = locationMapLinks(props);
229
+ const directionsLabel = props.directionsLabel ?? "Get directions";
230
+ const googleMapsLabel = props.googleMapsLabel ?? "Open in Google Maps";
231
+ if (props.layout === "block") return /* @__PURE__ */ jsxs("div", {
232
+ className: "rb-location-map-actions",
233
+ children: [links.directions ? /* @__PURE__ */ jsx(ThemedButtonLink, {
234
+ href: links.directions,
235
+ target: "_blank",
236
+ rel: "noreferrer",
237
+ variant: "secondary",
238
+ size: "sm",
239
+ label: directionsLabel
240
+ }) : null, links.googleMaps ? /* @__PURE__ */ jsx("a", {
241
+ className: "rb-location-map-link",
242
+ href: links.googleMaps,
243
+ target: "_blank",
244
+ rel: "noreferrer",
245
+ children: googleMapsLabel
246
+ }) : null]
247
+ });
248
+ return /* @__PURE__ */ jsxs("div", {
249
+ className: "rb-flex rb-flex-wrap rb-gap-2",
250
+ children: [links.directions ? /* @__PURE__ */ jsx(ThemedButtonLink, {
251
+ href: links.directions,
252
+ target: "_blank",
253
+ rel: "noreferrer",
254
+ variant: "ghost",
255
+ size: "sm",
256
+ label: directionsLabel
257
+ }) : null, links.googleMaps ? /* @__PURE__ */ jsx(ThemedButtonLink, {
258
+ href: links.googleMaps,
259
+ target: "_blank",
260
+ rel: "noreferrer",
261
+ variant: "ghost",
262
+ size: "sm",
263
+ label: googleMapsLabel
264
+ }) : null]
265
+ });
266
+ }
267
+ //#endregion
268
+ export { SvgNode as a, readableMapDrawing as i, AdmittedMapDrawingSvg as n, MapDrawingSvg as r, LocationMapActions as t };