@riverbankcms/sdk 0.170.0 → 0.171.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 (219) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/dist/_dts/{BlocksIslandsHydrator-B2i5CY_X.d.ts → BlocksIslandsHydrator-xuFmD41p.d.ts} +1 -1
  3. package/dist/_dts/{Page-BSZjbeRK.d.ts → Page-4fzXy8H9.d.ts} +13 -11
  4. package/dist/_dts/{SdkPreviewMode-BZpPBMcu.d.ts → SdkPreviewMode-BlHgMsc8.d.ts} +4 -3
  5. package/dist/_dts/{client-x82SZgwK.d.ts → client-BPoU758C.d.ts} +32 -1
  6. package/dist/_dts/{content-types-CODkxsZy.d.ts → content-types-TnkhoSls.d.ts} +3 -3
  7. package/dist/_dts/{contracts-Lyfhmbjf.d.ts → contracts-7wrMA79U.d.ts} +5 -3
  8. package/dist/_dts/{footerPageOutline-BShG2GAV.d.ts → footerPageOutline-DaOsPQ_Q.d.ts} +6 -6
  9. package/dist/_dts/{generatePageMetadata-DLhUW3xK.d.ts → generatePageMetadata-D9aDEzKK.d.ts} +2 -2
  10. package/dist/_dts/{index-BisbMZTW.d.ts → index-585vn6qb.d.ts} +72 -36
  11. package/dist/_dts/{index-B7Mq5M6P.d.ts → index-CZKSUcDs.d.ts} +4 -4
  12. package/dist/_dts/{index-B82pqQAC.d.ts → index-Cbw0IiY7.d.ts} +2 -2
  13. package/dist/_dts/{index-DXc_ewhR.d.ts → index-ChNbrcgD.d.ts} +1 -1
  14. package/dist/_dts/{index-C3rMEJ5a.d.ts → index-DDKJfaLY.d.ts} +2 -2
  15. package/dist/_dts/{index-CCugONHM.d.ts → index-DNCDENic.d.ts} +1 -1
  16. package/dist/_dts/{index-CstY6ZMa.d.ts → index-W9R3Bnf2.d.ts} +3 -3
  17. package/dist/_dts/{loadContent-BoqtbbhP.d.ts → loadContent-DPyNAJym.d.ts} +7 -7
  18. package/dist/_dts/{request-CJ_ClHLv.d.ts → request-jXTRN1Y4.d.ts} +3554 -1370
  19. package/dist/_dts/{resolveBlockData-DFExYkJ4.d.ts → resolveBlockData-BbvE-gsZ.d.ts} +5 -5
  20. package/dist/_dts/{resolvePageContent-D-WvpC_d.d.ts → resolvePageContent-BBgih00D.d.ts} +2 -2
  21. package/dist/_dts/{runtime-BY8DQBbT.d.ts → runtime-BEoNgYbd.d.ts} +2 -2
  22. package/dist/_dts/sdk/src/bookings/index.d.ts +2 -2
  23. package/dist/_dts/sdk/src/client/types.d.ts +2 -2
  24. package/dist/_dts/sdk/src/client.d.ts +7 -7
  25. package/dist/_dts/sdk/src/config/index.d.ts +6 -6
  26. package/dist/_dts/sdk/src/config/template-validation.d.ts +1 -1
  27. package/dist/_dts/sdk/src/config/validation.d.ts +1 -1
  28. package/dist/_dts/sdk/src/data/dataLoaderContext.d.ts +2 -2
  29. package/dist/_dts/sdk/src/data/resolveBlockData.d.ts +1 -1
  30. package/dist/_dts/sdk/src/data/types.d.ts +2 -2
  31. package/dist/_dts/sdk/src/index.d.ts +8 -8
  32. package/dist/_dts/sdk/src/manifest/index.d.ts +7 -7
  33. package/dist/_dts/sdk/src/metadata/index.d.ts +1 -1
  34. package/dist/_dts/sdk/src/navigation/index.d.ts +2 -2
  35. package/dist/_dts/sdk/src/next/index.d.ts +7 -7
  36. package/dist/_dts/sdk/src/next/middleware.d.ts +2 -2
  37. package/dist/_dts/sdk/src/page-converter/index.d.ts +4 -4
  38. package/dist/_dts/sdk/src/portal/client.d.ts +1 -1
  39. package/dist/_dts/sdk/src/prebuild/index.d.ts +1 -1
  40. package/dist/_dts/sdk/src/preview-next/before-render.d.ts +2 -2
  41. package/dist/_dts/sdk/src/preview-next/client/index.d.ts +2 -2
  42. package/dist/_dts/sdk/src/preview-next/client/runtime.d.ts +1 -1
  43. package/dist/_dts/sdk/src/rendering/client.d.ts +2 -2
  44. package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +1 -1
  45. package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +1 -1
  46. package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +4 -4
  47. package/dist/_dts/sdk/src/rendering/index.d.ts +6 -6
  48. package/dist/_dts/sdk/src/rendering/islands/client.d.ts +1 -1
  49. package/dist/_dts/sdk/src/rendering/server.d.ts +3 -2
  50. package/dist/_dts/sdk/src/rendering/themeAdmission.d.ts +1 -1
  51. package/dist/_dts/sdk/src/routing/index.d.ts +5 -5
  52. package/dist/_dts/sdk/src/server.d.ts +5 -5
  53. package/dist/_dts/sdk/src/spam-protection/index.d.ts +2 -2
  54. package/dist/_dts/sdk/src/theme/index.d.ts +4740 -3
  55. package/dist/_dts/{types-CbjK5ZLy.d.ts → types-BXuVxDYo.d.ts} +2 -2
  56. package/dist/_dts/{types-CpuxuS40.d.ts → types-DEAKoDNi.d.ts} +3 -3
  57. package/dist/_dts/{types-990t4t99.d.ts → types-kWvBwYK6.d.ts} +7 -7
  58. package/dist/_dts/{validation-BN95LiS0.d.ts → validation-BAO0_ntM.d.ts} +17 -17
  59. package/dist/client/{BlocksIslandsHydrator-B1Tkg-ZW.mjs → BlocksIslandsHydrator-DfMsMIej.mjs} +17 -17
  60. package/dist/client/{BookingMailingListNote-Br1VyHkP.mjs → BookingMailingListNote-aaSicywS.mjs} +7 -7
  61. package/dist/client/{StepIndicator-BK0GEDoP.mjs → BookingPanelArrangement-OgftZ9QC.mjs} +16 -4
  62. package/dist/client/{BookingQuestionFields-LLGCWjvU.mjs → BookingQuestionFields-BlaCItmH.mjs} +5 -5
  63. package/dist/client/{CalendarNavigationChevron-CH7z2m47.mjs → CalendarNavigationChevron-iMWrY6Hz.mjs} +7 -7
  64. package/dist/client/{CheckboxChoice-W_uiRgDK.mjs → CheckboxChoice-B65wFjqx.mjs} +1 -1
  65. package/dist/client/{DemoBookingPortalAccess-Cilv5zdS.mjs → DemoBookingPortalAccess-BCumOTLY.mjs} +7 -7
  66. package/dist/client/{EventCalendar.client-LXUHJEi7.mjs → EventCalendar.client-kh7mkYnW.mjs} +9 -9
  67. package/dist/client/{EventCombined.client-DpugEJLB.mjs → EventCombined.client-DXD5i0Ar.mjs} +8 -8
  68. package/dist/client/{EventEmbeddedCheckoutStep-Cf-HRHtb.mjs → EventEmbeddedCheckoutStep-DKKRCuta.mjs} +1 -1
  69. package/dist/client/{EventItem-gFuZn-dE.mjs → EventItem-BnwcoFQN.mjs} +10 -7
  70. package/dist/client/{EventListWeekNavigation-D-kLg1jQ.mjs → EventListWeekNavigation-DuG6z02f.mjs} +1 -1
  71. package/dist/client/{EventListing.client-BNACUaxV.mjs → EventListing.client-18yfHrcr.mjs} +3 -3
  72. package/dist/client/{EventListing.view-CtVfe3VG.mjs → EventListing.view-BM7rTVSL.mjs} +42 -396
  73. package/dist/client/{EventRegistrationPayment-CqH3hE-k.mjs → EventRegistrationPayment-D5J3DR0x.mjs} +13 -13
  74. package/dist/client/{LocationMapActions-BFp2uQQQ.mjs → LocationMapActions-QahdLtdE.mjs} +2 -2
  75. package/dist/client/{MapDrawingSvg-DDWfmgpA.mjs → MapDrawingSvg-Dy6UMuIw.mjs} +1 -1
  76. package/dist/client/{Page-PW4Ojv9r.mjs → Page-DH2sm4Cf.mjs} +2696 -2426
  77. package/dist/client/{ProtectedSubmitButton-C3H26pN9.mjs → ProtectedSubmitButton-AOUzjDK9.mjs} +1 -1
  78. package/dist/client/StepIndicator-CsRlU46Y.mjs +894 -0
  79. package/dist/client/{TabBarFragment-DkVKtK5a.mjs → TabBarFragment-CsAufYwT.mjs} +1 -1
  80. package/dist/client/{ThemedButton-BdnEwA38.mjs → ThemedButton-BMDHwnM6.mjs} +1 -1
  81. package/dist/client/{accessibleSurfaces-_7jkuinl.mjs → accessibleSurfaces-Bbn1-jJ8.mjs} +52 -2
  82. package/dist/client/{accordion-DMItWylU.mjs → accordion-DT4MD3Np.mjs} +1 -1
  83. package/dist/client/{booking-form.client-wd71DG19.mjs → booking-form.client-DdqNQNCa.mjs} +79 -42
  84. package/dist/client/{bookingForm-Cyr2qeS1.mjs → bookingForm-CLN396HU.mjs} +4 -4
  85. package/dist/client/bookings.mjs +6 -6
  86. package/dist/client/boxStyleClassNames-iLF_3KX9.mjs +369 -0
  87. package/dist/client/{carousel-B5-Hzzif.mjs → carousel-DFLomCGm.mjs} +2 -2
  88. package/dist/client/{carousel.client-eSSr1oYA.mjs → carousel.client-YF4mUK5t.mjs} +1 -1
  89. package/dist/client/{cart-wlRXnOjO.mjs → cart-BozMM5NK.mjs} +3 -3
  90. package/dist/client/{cart.client-CfpnxTUZ.mjs → cart.client-CqOOxPbW.mjs} +1 -1
  91. package/dist/client/{checkout-Dnu9W8IA.mjs → checkout-CTWF5nbB.mjs} +3 -3
  92. package/dist/client/{checkout.client-ovtyXyn0.mjs → checkout.client-CpqxN8e0.mjs} +1 -1
  93. package/dist/client/{checkoutUrls-CY8qywXl.mjs → checkoutUrls-Ccg6yfjq.mjs} +1 -1
  94. package/dist/client/client.mjs +640 -218
  95. package/dist/client/{context-Xhf81Q-c.mjs → context-Dzjv2CpA.mjs} +10 -1
  96. package/dist/client/{creditProducts-CMOmhWm2.mjs → creditProducts-BTRX4edc.mjs} +54 -23
  97. package/dist/client/{cta-CfuyGqXL.mjs → cta-pzQkBLgS.mjs} +2 -2
  98. package/dist/client/{dateFormatting-Bv6kjUW3.mjs → dateFormatting-BfurxGwg.mjs} +1 -1
  99. package/dist/client/{demoPortalMagicLink-DQtwf_s2.mjs → demoPortalMagicLink-D0dcPsRE.mjs} +1 -1
  100. package/dist/client/{display-DDNmyb0z.mjs → display-Cl6mgSJa.mjs} +3186 -81
  101. package/dist/client/{enhanceHeaderSection-D7gRy-pL.mjs → enhanceHeaderSection-CJCl0HJC.mjs} +4 -4
  102. package/dist/client/{event-details.client-DZZaoCUc.mjs → event-details.client-Pn9Kxh3I.mjs} +3 -2
  103. package/dist/client/{event-registration.client-CLBdHUfd.mjs → event-registration.client-BAmBdWXE.mjs} +48 -34
  104. package/dist/client/{eventCalendar-B4VbblGN.mjs → eventCalendar-C5Bh2L8L.mjs} +4 -4
  105. package/dist/client/{eventCombined-e2AvbA0u.mjs → eventCombined-dELKxxIe.mjs} +4 -4
  106. package/dist/client/{eventDetails-DIJYMzVg.mjs → eventDetails-Do9D_fJ_.mjs} +2 -2
  107. package/dist/client/{eventListing-C0bpAR1t.mjs → eventListing-B2HTUWLq.mjs} +4 -4
  108. package/dist/client/{eventRegistration-DyseP_sY.mjs → eventRegistration-ByOJnqGc.mjs} +4 -4
  109. package/dist/client/{form-Cfl8d6qc.mjs → form-DX70QG-J.mjs} +3 -3
  110. package/dist/client/{form.client-D3_RF29v.mjs → form.client-CJoqBrS6.mjs} +5 -5
  111. package/dist/client/{form.parts-DWLf_3PF.mjs → form.parts-DTof9pL3.mjs} +3 -3
  112. package/dist/client/{formatDate-BGlhrmhF.mjs → formatDate-Cjouxh4Y.mjs} +1 -1
  113. package/dist/client/gifting/client.mjs +3 -3
  114. package/dist/client/{headerSection-CyNGt23J.mjs → headerSection-CJuPX_1K.mjs} +2 -2
  115. package/dist/client/{newsletter-form.client-IfLup4o0.mjs → newsletter-form.client-CqzNjOft.mjs} +6 -6
  116. package/dist/client/{newsletter-form.parts-DDD-LRyW.mjs → newsletter-form.parts-DjJsFms2.mjs} +2 -2
  117. package/dist/client/{newsletterForm-Bn7HVbuq.mjs → newsletterForm-D1MHoPbh.mjs} +3 -3
  118. package/dist/client/{noop-B_f7RqLD.mjs → noop-poI1m2yW.mjs} +69 -2
  119. package/dist/client/portal/client.mjs +294 -48
  120. package/dist/client/{product-detail.client-BXeLqkCE.mjs → product-detail.client-DOQ7El1d.mjs} +1 -1
  121. package/dist/client/{product-list.client-C627X8DQ.mjs → product-list.client-CmxOZbzL.mjs} +1 -1
  122. package/dist/client/{productDetail-B-K_hd7Y.mjs → productDetail-BN3zv5sa.mjs} +3 -3
  123. package/dist/client/{productList-BNZAsfaP.mjs → productList-GN_Id4bF.mjs} +3 -3
  124. package/dist/client/{propsDecoder-Dc8j5i79.mjs → propsDecoder-BdmzM3D5.mjs} +8 -4
  125. package/dist/client/{registry.server-CBg2M6Uj.mjs → registry.server-BOyra8CA.mjs} +1015 -926
  126. package/dist/client/rendering/client.mjs +57 -32
  127. package/dist/client/rendering/islands.mjs +1 -1
  128. package/dist/client/rendering.mjs +1956 -191
  129. package/dist/client/{richText-coerce-BTurYEao.mjs → richText-coerce-CtoGLZ_e.mjs} +1 -1
  130. package/dist/client/{routeIslandApiConfig-DFjRKvzM.mjs → routeIslandApiConfig-DnaJ8PQc.mjs} +1 -1
  131. package/dist/client/{runtimeResponse-D2LT--Gj.mjs → runtimeResponse-B1-cyLXt.mjs} +1 -1
  132. package/dist/client/{runtimeResponse-BGU8sMZY.mjs → runtimeResponse-BN8PoIVp.mjs} +1 -1
  133. package/dist/client/{shop-PgmiVKSV.mjs → shop-LjBLDBqF.mjs} +3 -3
  134. package/dist/client/{shop-commerce-DkgvZAQS.mjs → shop-commerce-B8aZTdRJ.mjs} +13 -13
  135. package/dist/client/{shop-commerce-store-D9CHihQv.mjs → shop-commerce-store-C1FtHYl7.mjs} +1 -1
  136. package/dist/client/{shop.client-DDFRt6OU.mjs → shop.client-D0qZ3KZp.mjs} +13 -13
  137. package/dist/client/{shop.interactive-BH0xDlMF.mjs → shop.interactive-DAKyWK1B.mjs} +89 -19
  138. package/dist/client/{shopShared-BEfD0e4m.mjs → shopShared-CztcSe9i.mjs} +2 -2
  139. package/dist/client/spam-protection.mjs +1 -1
  140. package/dist/client/{timetableModel-GsDrJxxw.mjs → timetableModel-D1jDTbms.mjs} +11 -11
  141. package/dist/client/{types-5fOsPIpL.mjs → types-B0hJldSt.mjs} +2 -0
  142. package/dist/client/{useAvailableSlots-GP8tnAVW.mjs → useAvailableSlots-ByHedoBi.mjs} +4 -8
  143. package/dist/client/{useDiscountApply-Cq07nTyG.mjs → useDiscountApply-CHGYDxdM.mjs} +2 -2
  144. package/dist/client/{useDiscountCodeUi-CD82QX5i.mjs → useDiscountCodeUi-Dew9UAEy.mjs} +1 -1
  145. package/dist/client/{useEventPagination-DGl4Jeuz.mjs → useEventPagination-BpC7-ksE.mjs} +7 -7
  146. package/dist/client/{view-oToSpu1N.mjs → view-BxeiAL3c.mjs} +121 -28
  147. package/dist/client/{view-CgComegl.mjs → view-ShYH3WXh.mjs} +3 -3
  148. package/dist/preview-next/before-render.mjs +33 -13
  149. package/dist/preview-next/client/{EventEmbeddedCheckoutStep-8-qtHjpb.mjs → EventEmbeddedCheckoutStep-CKe4cjZ4.mjs} +1 -1
  150. package/dist/preview-next/client/{LocationPickerEnvironment-CwxRbAs2.mjs → LocationPickerEnvironment-lW2aLGWd.mjs} +1 -1
  151. package/dist/preview-next/client/{MapLibreEditMap-CKjYUp_E.mjs → MapLibreEditMap-C9InQJpd.mjs} +2 -2
  152. package/dist/preview-next/client/{ArrangementLookControls-DJQrgD5f.mjs → PageSectionToolbar-DsSqwrMS.mjs} +392 -11
  153. package/dist/preview-next/client/{PreviewEditorSidebar-DWU6X6Y-.mjs → PreviewEditorSidebar-BEEWzXnU.mjs} +3264 -3199
  154. package/dist/preview-next/client/{PreviewEditorUI-C-X0ptC3.mjs → PreviewEditorUI-C86Out4V.mjs} +5 -6
  155. package/dist/preview-next/client/{PreviewShell-C1WUNsj9.mjs → PreviewShell-CBWYjBvQ.mjs} +20 -10
  156. package/dist/preview-next/client/{SdkPreviewModeRuntime-Cs2QFT7k.mjs → SdkPreviewModeRuntime-o-mVqWLx.mjs} +88 -394
  157. package/dist/preview-next/client/{SiteChromeCustomizeButton-CcZ_ERvZ.mjs → SiteChromeCustomizeButton-H_ciMNHA.mjs} +1155 -330
  158. package/dist/preview-next/client/{ThemedButton-BQU45t-E.mjs → ThemedButton-CKYjeU_M.mjs} +2 -0
  159. package/dist/preview-next/client/{lucide-react-DbC1o6_9.mjs → lucide-react-DygTyy7K.mjs} +1 -1
  160. package/dist/preview-next/client/{previewAssistantSlot-CSs9S8wr.mjs → previewAssistantSlot-CuOcsG_N.mjs} +3558 -2230
  161. package/dist/preview-next/client/{previewChromeRoot-B2OTurZH.mjs → previewChromeRoot-DPeV7KaP.mjs} +1 -1
  162. package/dist/preview-next/client/runtime.mjs +3 -3
  163. package/dist/preview-next/client/{sdk-runtime-CBIwYDyi.mjs → sdk-runtime-zTTFZ4MM.mjs} +2 -2
  164. package/dist/preview-next/client/{useAutosaveStatus-DoWvGNPA.mjs → useAutosaveStatus-DNA1Q4L1.mjs} +2 -2
  165. package/dist/preview-next/client/{useBlockCustomizeControls-WOs8Atje.mjs → useOpenBlockForSetup-BdnMlHC6.mjs} +28 -3
  166. package/dist/preview-next/container-responsive.css +43 -0
  167. package/dist/preview-next/keepAlive.mjs +1 -1
  168. package/dist/preview-next/middleware.mjs +1 -1
  169. package/dist/preview-next/{route-contract-BLYaenrK.mjs → route-contract-CtSgU8UZ.mjs} +547 -188
  170. package/dist/server/{Block.shared-Dx4j9CJT.mjs → Block.shared-ifgaBglp.mjs} +4 -4
  171. package/dist/server/{ThemeScopeCore-B0IfeNNZ.mjs → ThemeScopeCore-DGDOH6OU.mjs} +3 -3
  172. package/dist/server/{accessibleSurfaces-D0q5tLSW.mjs → accessibleSurfaces-BuPNCWAK.mjs} +52 -2
  173. package/dist/server/bindings-CiYpie1M.mjs +1802 -0
  174. package/dist/server/{block-kinds-CdI7NvAW.mjs → block-kinds-DkzOr19P.mjs} +2 -0
  175. package/dist/server/{client-Djjv-NuA.mjs → client-ngWuFsmN.mjs} +638 -216
  176. package/dist/server/config-template-validation.mjs +30 -4
  177. package/dist/server/config-validation.mjs +1 -1
  178. package/dist/server/config.mjs +3 -34
  179. package/dist/server/data/resolveBlockData.mjs +1 -1
  180. package/dist/server/index.mjs +3 -3
  181. package/dist/server/loadContent-DeLQeJAZ.mjs +2310 -0
  182. package/dist/server/{loadPage-QXSdPSYY.mjs → loadPage-D4J747FQ.mjs} +2 -2
  183. package/dist/server/manifest.mjs +1 -1
  184. package/dist/server/next.mjs +8 -6
  185. package/dist/server/{opaqueSurface-Yltv_u7r.mjs → opaqueSurface-ukEz1BaM.mjs} +2 -2
  186. package/dist/server/{overrideResolution-CMNx5tQg.mjs → overrideResolution-DSuVkpqm.mjs} +3 -2
  187. package/dist/server/page-converter.mjs +3 -3
  188. package/dist/server/pageRegions-BaeEF2MU.mjs +30 -0
  189. package/dist/server/{pageRenderPlan-Bv6NbFeM.mjs → pageRenderPlan-DFv3h4Ib.mjs} +306 -287
  190. package/dist/server/{pageRuntimeSupport-B2laBtff.mjs → pageRuntimeSupport-yHaRNWMj.mjs} +48 -35
  191. package/dist/server/{pageShared-CE9EBNSH.mjs → pageShared-CAZD0LcY.mjs} +848 -315
  192. package/dist/server/parseThemeForPersistence-Dl7LIBJq.mjs +52 -0
  193. package/dist/server/{prebuild-FBA6Y1K7.mjs → prebuild-BKOCND3b.mjs} +1 -1
  194. package/dist/server/prebuild.mjs +1 -1
  195. package/dist/server/{prefetchBlockData-yL2hB2l_.mjs → prefetchBlockData-GIoExi8A.mjs} +4 -3
  196. package/dist/server/{registry-Djrj9gWy.mjs → registry-BogXzcOD.mjs} +4000 -1989
  197. package/dist/server/rendering/components/pageShared.mjs +1 -1
  198. package/dist/server/rendering/helpers/loadPage.mjs +1 -1
  199. package/dist/server/rendering/helpers/pageRuntimeSupport.mjs +1 -1
  200. package/dist/server/rendering/server.mjs +3 -3
  201. package/dist/server/rendering.mjs +7 -7
  202. package/dist/server/{resolveBlockData-CyeIjmqx.mjs → resolveBlockData-CT4YSBve.mjs} +4 -3
  203. package/dist/server/{resolveButtonColourStates-Cn6j8Ee0.mjs → resolveButtonColourStates-DVISOQD9.mjs} +2 -0
  204. package/dist/server/rich-text-CRcONdyM.mjs +33 -0
  205. package/dist/server/{richTextSchema-DQ2NBP0n.mjs → richTextSchema-QLaQrbII.mjs} +31 -2
  206. package/dist/server/{parseThemeForPersistence-BebSeE17.mjs → schema-C92Q8y0-.mjs} +463 -53
  207. package/dist/server/server.mjs +3 -3
  208. package/dist/server/theme-bridge.mjs +2 -2
  209. package/dist/server/theme.mjs +2 -1
  210. package/dist/server/{three-pass-converter-CQWdnfjV.mjs → three-pass-converter-Bsfdy_ZV.mjs} +11 -8
  211. package/dist/server/{validation-Dh8htd6l.mjs → validation-vSBCWU3w.mjs} +9 -9
  212. package/dist/server/{version-LMwnoksN.mjs → version-Cw5vFmUY.mjs} +1 -1
  213. package/dist/styles/index.css +408 -10
  214. package/package.json +1 -1
  215. package/dist/client/StepIndicator-CR7_0yu4.mjs +0 -432
  216. package/dist/preview-next/client/useOpenBlockForSetup-CipKCK2O.mjs +0 -28
  217. package/dist/server/bindings-C1-MNwwS.mjs +0 -257
  218. package/dist/server/headerVariant-8O5MvxIU.mjs +0 -464
  219. package/dist/server/loadContent-DhraQ_Fi.mjs +0 -578
@@ -0,0 +1,894 @@
1
+ "use client";
2
+ import { I as resolveEventRegistrationEventSource, ot as closedRunCopy } from "./shop.interactive-DAKyWK1B.mjs";
3
+ import { Bi as resolveEventRegistrationScopedEvents, Ln as eventDateOptions, _n as bookingPresentation, as as orderedLiveRunSessions, lr as groupPublicEventsByRun, os as resolveWholeSeriesBookingPhase, rs as firstLiveRunSessionStartMs, zi as normalizeEventRegistrationPageSurfaceSubject } from "./display-Cl6mgSJa.mjs";
4
+ import { Ft as formatDate, in as toUtcIsoDateTimeString } from "./noop-poI1m2yW.mjs";
5
+ import { N as assertNever } from "./creditProducts-BTRX4edc.mjs";
6
+ import { r as boxStyleClassNames } from "./boxStyleClassNames-iLF_3KX9.mjs";
7
+ import { i as ThemedButtonLink, r as ThemedButton } from "./ThemedButton-BMDHwnM6.mjs";
8
+ import { n as StepIndicator$1, t as BookingPanelArrangement } from "./BookingPanelArrangement-OgftZ9QC.mjs";
9
+ import { t as EVENT_REGISTRATION_ANCHOR_ID } from "./constants-4o4_hl34.mjs";
10
+ import React from "react";
11
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
12
+ //#region ../blocks/src/system/blocks/events/shared/pageSelection.ts
13
+ /**
14
+ * What a system-managed Event URL actually selected.
15
+ *
16
+ * The resolver used to assume that one returned `PublicEvent` meant one
17
+ * occurrence. A whole-series Event breaks that assumption in two directions: a
18
+ * parent Event path selects nothing concrete until a run is chosen, and a run
19
+ * path selects a run whose identity spans every one of its sessions. This
20
+ * module parses those cases once, so the renderer switches over a closed set of
21
+ * page states instead of probing booking scopes at render time.
22
+ *
23
+ * Everything here is pure. Loading events and resolving run slugs is the
24
+ * resolver's job; deciding what the page is and which runs the chooser
25
+ * advertises happens here. When a run is open to join, and where it sits in its
26
+ * own life, come from `@riverbankcms/core`: the same authority the
27
+ * public read projection and the write-side run-facts loader use, so a run
28
+ * cannot report itself open on the storefront and closed at the point of
29
+ * booking.
30
+ */
31
+ function planWholeSeriesParentBooking(eligibleRuns) {
32
+ const [first, ...rest] = eligibleRuns;
33
+ return rest.length === 0 ? {
34
+ kind: "single",
35
+ run: first
36
+ } : {
37
+ kind: "choice",
38
+ runs: eligibleRuns
39
+ };
40
+ }
41
+ function isOrdinaryPublicEvent(event) {
42
+ return event.bookingScope === "single_occurrence";
43
+ }
44
+ /**
45
+ * Whether a parent Event page advertises this run.
46
+ *
47
+ * Visibility admission belongs to the scoped public read. Active, still-open
48
+ * admitted runs are advertised, and a run that has started,
49
+ * finished or been cancelled is informational wherever it appears.
50
+ *
51
+ * Capacity is deliberately not consulted (decision A24/A30): a full date is
52
+ * still one of the dates on offer, and its own page shows the full or waitlist
53
+ * state that the registration engine decides. Hiding it here would leave a
54
+ * visitor unable to see that the date exists at all.
55
+ */
56
+ function resolveWholeSeriesChooserEligibility(group, now) {
57
+ const status = group.representative.status;
58
+ if (status !== void 0 && status !== "active") return {
59
+ kind: "excluded",
60
+ reason: "series-not-active"
61
+ };
62
+ const phase = resolveWholeSeriesBookingPhase(group.run, now);
63
+ return phase.kind === "open" ? { kind: "eligible" } : {
64
+ kind: "excluded",
65
+ reason: phase.reason
66
+ };
67
+ }
68
+ /**
69
+ * Runs in the order a visitor reads them: soonest first session first.
70
+ *
71
+ * A run with no session left to attend has no place in the sequence, so it
72
+ * sorts last rather than being given an arbitrary date.
73
+ */
74
+ function orderRunsBySchedule(groups) {
75
+ return [...groups].sort((left, right) => {
76
+ const leftStart = firstLiveRunSessionStartMs(left.run.sessions);
77
+ const rightStart = firstLiveRunSessionStartMs(right.run.sessions);
78
+ if (leftStart === null) return rightStart === null ? 0 : 1;
79
+ if (rightStart === null) return -1;
80
+ return leftStart - rightStart;
81
+ });
82
+ }
83
+ function asNonEmpty(groups) {
84
+ const [first, ...rest] = groups;
85
+ return first ? [first, ...rest] : null;
86
+ }
87
+ /**
88
+ * What a parent Event path selects.
89
+ *
90
+ * The scoped read admits public and unlisted runs for the offering's own page.
91
+ * The chooser lists the ones still open; when none is, the most recent
92
+ * admitted run supplies the page's name and copy. Runs from another offering
93
+ * cannot speak for this page.
94
+ */
95
+ function planWholeSeriesParentSelection(input) {
96
+ const offeringRuns = orderRunsBySchedule(groupPublicEventsByRun(input.events).filter((group) => group.run.eventOfferingId === input.offeringId));
97
+ const eligibleRuns = asNonEmpty(offeringRuns.filter((group) => resolveWholeSeriesChooserEligibility(group, input.now).kind === "eligible"));
98
+ if (eligibleRuns) return {
99
+ kind: "wholeSeriesParent",
100
+ admittedRuns: offeringRuns,
101
+ offeringId: input.offeringId,
102
+ eligibleRuns
103
+ };
104
+ const informationalRun = offeringRuns.at(-1);
105
+ return informationalRun ? {
106
+ kind: "wholeSeriesParentUnavailable",
107
+ admittedRuns: offeringRuns,
108
+ offeringId: input.offeringId,
109
+ informationalRun,
110
+ bookingClosedDetail: resolveParentBookingClosedDetail(offeringRuns, input.now)
111
+ } : null;
112
+ }
113
+ /**
114
+ * What a course page says when none of its runs is bookable.
115
+ *
116
+ * A run whose page is up without bookings carries its own reason, so the course
117
+ * speaks for the runs it has: if any of them was live and has been taken
118
+ * offline the course is closed for now, and otherwise it is waiting to open. A
119
+ * course whose runs are simply cancelled, under way or finished carries no
120
+ * reason at all, and the page keeps the words it already has for that.
121
+ *
122
+ * Only a run with a session still to come counts. A run that was paused a year
123
+ * ago and whose dates have all passed says nothing about the course now, and
124
+ * letting it speak would tell a visitor that a newly announced run is closed.
125
+ */
126
+ function resolveParentBookingClosedDetail(runs, now) {
127
+ const details = runs.flatMap((group) => {
128
+ const detail = group.representative.bookingClosedDetail;
129
+ return detail && hasSessionAhead(group, now) ? [detail] : [];
130
+ });
131
+ if (details.length === 0) return null;
132
+ return details.some((detail) => detail.kind === "paused") ? { kind: "paused" } : { kind: "opensSoon" };
133
+ }
134
+ /** Whether the run still has a session a visitor could attend. */
135
+ function hasSessionAhead(group, now) {
136
+ return orderedLiveRunSessions(group.run.sessions).some((session) => Date.parse(session.startsAt) > now.getTime());
137
+ }
138
+ /** What a targeted run path selects, when the named run projected any data. */
139
+ function planWholeSeriesRunSelection(input) {
140
+ const group = groupPublicEventsByRun(input.events).find((candidate) => candidate.eventSeriesId === input.eventSeriesId);
141
+ if (!group) return null;
142
+ return {
143
+ kind: "wholeSeriesRun",
144
+ offeringId: group.run.eventOfferingId,
145
+ run: group
146
+ };
147
+ }
148
+ /**
149
+ * The Event record that speaks for a selection.
150
+ *
151
+ * Page metadata, the destination mode and the shared presentation all need one
152
+ * record; every variant has one, so callers never re-derive it.
153
+ */
154
+ function selectionRepresentativeEvent(selection) {
155
+ switch (selection.kind) {
156
+ case "occurrence": return selection.event;
157
+ case "wholeSeriesParent": return selection.eligibleRuns[0].representative;
158
+ case "wholeSeriesParentUnavailable": return selection.informationalRun.representative;
159
+ case "wholeSeriesRun": return selection.run.representative;
160
+ }
161
+ }
162
+ /**
163
+ * Why this page is not taking bookings, when its own state says so.
164
+ *
165
+ * A parent course page answers for its runs; everything else answers for the
166
+ * record the page is about. `null` leaves the booking column exactly as it was.
167
+ */
168
+ function resolveSelectionBookingClosedDetail(selection) {
169
+ switch (selection.kind) {
170
+ case "occurrence": return selection.event.bookingClosedDetail ?? null;
171
+ case "wholeSeriesRun": return selection.run.representative.bookingClosedDetail ?? null;
172
+ case "wholeSeriesParent": return null;
173
+ case "wholeSeriesParentUnavailable": return selection.bookingClosedDetail;
174
+ }
175
+ }
176
+ function planDropInPanel(selection) {
177
+ const detail = resolveSelectionBookingClosedDetail(selection);
178
+ if (detail === null) return { kind: "comeAlong" };
179
+ switch (detail.kind) {
180
+ case "opensSoon":
181
+ case "paused": return { kind: "notRunning" };
182
+ }
183
+ }
184
+ function getPublicEventCanonicalPath(event) {
185
+ if (event.path) return event.path;
186
+ return event.destination.kind === "native" ? event.destination.path : null;
187
+ }
188
+ function eventOccurrenceContext(event) {
189
+ return {
190
+ id: event.occurrenceId,
191
+ seriesId: event.seriesId,
192
+ startsAt: event.startsAt,
193
+ endsAt: event.endsAt,
194
+ timeZone: event.timeZone
195
+ };
196
+ }
197
+ //#endregion
198
+ //#region ../blocks/src/system/runtime/nodes/event-registration/BookingPanel.tsx
199
+ function EventBookingPanelView({ panel, pageKind, children }) {
200
+ const body = /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(EventBookingPanelBody, { panel }), children] });
201
+ return bookingPresentation(pageKind).wrapInCard ? /* @__PURE__ */ jsx(BookingPanelArrangement, {
202
+ pageKind,
203
+ children: /* @__PURE__ */ jsx("div", {
204
+ ...bookingPresentation(pageKind).panelAttributes,
205
+ className: boxStyleClassNames({}, {
206
+ cardRoleFallback: "default",
207
+ includeSpacing: false
208
+ }),
209
+ children: /* @__PURE__ */ jsx("div", {
210
+ className: "card-content",
211
+ children: body
212
+ })
213
+ })
214
+ }) : body;
215
+ }
216
+ function EventBookingPanelBody({ panel }) {
217
+ switch (panel.kind) {
218
+ case "registration": return null;
219
+ case "dropIn": return /* @__PURE__ */ jsx(DropInPanel, { panel: panel.panel });
220
+ case "bookingClosed": return /* @__PURE__ */ jsx(BookingClosedPanel, { detail: panel.detail });
221
+ case "closedRun": return /* @__PURE__ */ jsx(ClosedRunPanel, { reason: panel.reason });
222
+ case "single": return /* @__PURE__ */ jsx(SingleDateBooking, { run: panel.run });
223
+ case "choice": return /* @__PURE__ */ jsx(RunChooser, { runs: panel.runs });
224
+ case "unavailable": return /* @__PURE__ */ jsxs("div", {
225
+ className: "event-booking-panel__unavailable",
226
+ children: [/* @__PURE__ */ jsx("h2", {
227
+ className: "card-title rb-mb-3",
228
+ children: "No dates open right now"
229
+ }), /* @__PURE__ */ jsx("p", {
230
+ className: "status-muted rb-text-base rb-leading-relaxed",
231
+ children: "There is nothing to book at the moment. Please check back later for the next set of dates."
232
+ })]
233
+ });
234
+ }
235
+ }
236
+ function SingleDateBooking({ run }) {
237
+ const href = getPublicEventCanonicalPath(run.representative);
238
+ return /* @__PURE__ */ jsxs("div", {
239
+ className: "event-booking-panel__single-date",
240
+ children: [
241
+ /* @__PURE__ */ jsx("h2", {
242
+ className: "card-title rb-mb-3",
243
+ children: "Book your place"
244
+ }),
245
+ /* @__PURE__ */ jsx("p", {
246
+ className: "event-booking-panel__run-dates status-muted rb-mb-4 rb-text-base rb-leading-relaxed",
247
+ children: describeRun(run)
248
+ }),
249
+ href ? /* @__PURE__ */ jsx(ThemedButtonLink, {
250
+ variant: "primary",
251
+ size: "md",
252
+ extraClassName: "event-booking-panel__book-link rb-block rb-w-full rb-text-center",
253
+ href,
254
+ label: "Book now"
255
+ }) : null
256
+ ]
257
+ });
258
+ }
259
+ /** What a drop-in event's column says: come along, or not right now. */
260
+ function DropInPanel({ panel }) {
261
+ switch (panel.kind) {
262
+ case "comeAlong": return /* @__PURE__ */ jsxs("div", {
263
+ className: "event-booking-panel__drop-in",
264
+ children: [/* @__PURE__ */ jsx("h2", {
265
+ className: "card-title rb-mb-3",
266
+ children: "No booking needed"
267
+ }), /* @__PURE__ */ jsx("p", {
268
+ className: "status-muted rb-text-base rb-leading-relaxed",
269
+ children: "You can come along without reserving a place."
270
+ })]
271
+ });
272
+ case "notRunning": return /* @__PURE__ */ jsx("div", {
273
+ className: "event-booking-panel__drop-in",
274
+ children: /* @__PURE__ */ jsx("p", {
275
+ className: "status-muted rb-text-base rb-leading-relaxed",
276
+ children: "This isn’t running at the moment."
277
+ })
278
+ });
279
+ }
280
+ }
281
+ /** The page is up, but bookings are not open. One line, and why. */
282
+ function BookingClosedPanel({ detail }) {
283
+ return /* @__PURE__ */ jsx("div", {
284
+ className: "event-booking-panel__booking-closed",
285
+ children: /* @__PURE__ */ jsx("h2", {
286
+ className: "card-title",
287
+ children: detail.kind === "opensSoon" ? "Bookings open soon." : "Bookings are closed for now."
288
+ })
289
+ });
290
+ }
291
+ /** Dates that cannot be booked keep their details and say why. */
292
+ function ClosedRunPanel({ reason }) {
293
+ const copy = closedRunCopy(reason);
294
+ return /* @__PURE__ */ jsxs("div", {
295
+ className: "event-booking-panel__closed-run",
296
+ children: [/* @__PURE__ */ jsx("h2", {
297
+ className: "card-title rb-mb-3",
298
+ children: copy.titleText
299
+ }), /* @__PURE__ */ jsx("p", {
300
+ className: "status-muted rb-text-base rb-leading-relaxed",
301
+ children: copy.bodyText
302
+ })]
303
+ });
304
+ }
305
+ /**
306
+ * Server-rendered run links.
307
+ *
308
+ * Choosing a run is a navigation, not client state: each entry is a plain link
309
+ * to that run's canonical page, so the chooser works before hydration and the
310
+ * chosen run gets a shareable URL.
311
+ */
312
+ function RunChooser({ runs }) {
313
+ return /* @__PURE__ */ jsxs("div", {
314
+ className: "event-booking-panel__run-chooser",
315
+ children: [/* @__PURE__ */ jsx("h2", {
316
+ className: "card-title rb-mb-4",
317
+ children: "Choose your dates"
318
+ }), /* @__PURE__ */ jsx("ul", {
319
+ className: "rb-flex rb-flex-col rb-gap-3",
320
+ children: runs.map((run) => {
321
+ const href = getPublicEventCanonicalPath(run.representative);
322
+ const label = describeRun(run);
323
+ return /* @__PURE__ */ jsx("li", { children: href ? /* @__PURE__ */ jsxs("a", {
324
+ className: "event-booking-panel__run-link rb-block rb-w-full",
325
+ href,
326
+ children: [/* @__PURE__ */ jsx("span", {
327
+ className: "event-booking-panel__run-name",
328
+ children: run.representative.title
329
+ }), /* @__PURE__ */ jsx("span", {
330
+ className: "event-booking-panel__run-dates status-muted rb-block rb-text-sm",
331
+ children: label
332
+ })]
333
+ }) : /* @__PURE__ */ jsx("span", {
334
+ className: "event-booking-panel__run-name",
335
+ children: run.representative.title
336
+ }) }, run.eventSeriesId);
337
+ })
338
+ })]
339
+ });
340
+ }
341
+ /** "12 sessions from 5 March" — enough to tell two runs apart in a list. */
342
+ function describeRun(run) {
343
+ const sessionCount = run.run.sessions.length;
344
+ const sessionLabel = sessionCount === 1 ? "1 session" : `${sessionCount} sessions`;
345
+ const first = orderedLiveRunSessions(run.run.sessions)[0];
346
+ if (!first) return sessionLabel;
347
+ return `${sessionLabel} from ${formatDate({
348
+ kind: "instant",
349
+ value: toUtcIsoDateTimeString(first.startsAt)
350
+ }, eventDateOptions({
351
+ ...run.representative,
352
+ timeZone: first.timeZone
353
+ }), {
354
+ date: "long",
355
+ weekday: "long"
356
+ })}`;
357
+ }
358
+ //#endregion
359
+ //#region ../blocks/src/system/runtime/nodes/event-registration/bookingPanelSelection.ts
360
+ /** Adapt a loaded page surface to the existing page planners. Catalogues keep their picker. */
361
+ function resolveBookingPanelSelection(source) {
362
+ const eventSource = resolveEventRegistrationEventSource({
363
+ events: source.events,
364
+ wholeSeriesRunEvents: source.wholeSeriesRunEvents,
365
+ failures: source.eventLoaderFailures
366
+ });
367
+ if (eventSource.kind !== "loaded") return null;
368
+ const subject = normalizeEventRegistrationPageSurfaceSubject(source.subject);
369
+ const events = resolveEventRegistrationScopedEvents(eventSource.events, {
370
+ occurrenceContext: source.occurrenceContext,
371
+ subject
372
+ });
373
+ const selection = selectPagePanel({
374
+ ...source,
375
+ subject
376
+ }, events);
377
+ return selection ? {
378
+ selection,
379
+ subject
380
+ } : null;
381
+ }
382
+ function selectPagePanel(source, events) {
383
+ if (source.subject?.kind === "eventOffering" && source.subject.bookingScope === "whole_series") {
384
+ if (source.pageKind !== "bookingPage") return null;
385
+ return planWholeSeriesParentSelection({
386
+ offeringId: source.subject.eventOfferingId,
387
+ events,
388
+ now: new Date(source.now)
389
+ });
390
+ }
391
+ if (source.subject?.kind === "eventSeries" && source.subject.bookingScope === "whole_series") return planWholeSeriesRunSelection({
392
+ eventSeriesId: source.subject.eventSeriesId,
393
+ events
394
+ });
395
+ return selectOccurrenceForPanel(events, source.occurrenceContext?.id);
396
+ }
397
+ /** The decided target is also retained for recovery when fresh booking is closed. */
398
+ function registrationSourceForPanel(source, panel) {
399
+ if (!panel.registration) return null;
400
+ return {
401
+ ...source,
402
+ ...panel.registration,
403
+ wholeSeriesRunEvents: null,
404
+ admission: panel.kind === "registration" ? "newBookings" : "recoveryOnly"
405
+ };
406
+ }
407
+ function selectOccurrenceForPanel(events, occurrenceId) {
408
+ const event = occurrenceId ? events.find((candidate) => candidate.occurrenceId === occurrenceId) : null;
409
+ return event && isOrdinaryPublicEvent(event) ? {
410
+ kind: "occurrence",
411
+ event
412
+ } : null;
413
+ }
414
+ function planEventBookingPanel({ selection, subject }, now) {
415
+ const nonBookingPanel = planNonBookingPanel(selection);
416
+ switch (selection.kind) {
417
+ case "occurrence":
418
+ case "wholeSeriesRun": {
419
+ const registration = selectionRegistrationTarget(selection, subject);
420
+ if (nonBookingPanel) return {
421
+ ...nonBookingPanel,
422
+ registration
423
+ };
424
+ const phase = selection.kind === "wholeSeriesRun" ? resolveWholeSeriesBookingPhase(selection.run.run, now) : null;
425
+ return phase?.kind === "closed" ? {
426
+ kind: "closedRun",
427
+ reason: phase.reason,
428
+ registration
429
+ } : {
430
+ kind: "registration",
431
+ registration
432
+ };
433
+ }
434
+ case "wholeSeriesParent": return {
435
+ ...nonBookingPanel ?? planWholeSeriesParentBooking(selection.eligibleRuns),
436
+ registration: null
437
+ };
438
+ case "wholeSeriesParentUnavailable": return {
439
+ ...nonBookingPanel ?? { kind: "unavailable" },
440
+ registration: null
441
+ };
442
+ }
443
+ }
444
+ /** Drop-in and page-level closure take precedence over fresh booking and run selection. */
445
+ function planNonBookingPanel(selection) {
446
+ if (!selectionRepresentativeEvent(selection).requiresRegistration) return {
447
+ kind: "dropIn",
448
+ panel: planDropInPanel(selection)
449
+ };
450
+ const detail = resolveSelectionBookingClosedDetail(selection);
451
+ return detail ? {
452
+ kind: "bookingClosed",
453
+ detail
454
+ } : null;
455
+ }
456
+ function selectionRegistrationTarget(selection, subject) {
457
+ switch (selection.kind) {
458
+ case "occurrence": return {
459
+ events: [selection.event],
460
+ occurrenceContext: eventOccurrenceContext(selection.event),
461
+ subject
462
+ };
463
+ case "wholeSeriesRun": return {
464
+ events: [selection.run.representative],
465
+ occurrenceContext: null,
466
+ subject
467
+ };
468
+ }
469
+ }
470
+ //#endregion
471
+ //#region ../blocks/src/system/runtime/nodes/event-registration/RegistrationClosedState.tsx
472
+ function RegistrationClosedState({ title, body }) {
473
+ return /* @__PURE__ */ jsx("div", {
474
+ id: EVENT_REGISTRATION_ANCHOR_ID,
475
+ className: "rb-reg-surface er-container er-registration-closed",
476
+ role: "status",
477
+ children: /* @__PURE__ */ jsx("div", {
478
+ className: "rb-reg-stack er-stack",
479
+ children: /* @__PURE__ */ jsxs("div", { children: [
480
+ /* @__PURE__ */ jsx("p", {
481
+ className: "er-registration-shell__eyebrow",
482
+ children: "Registration"
483
+ }),
484
+ /* @__PURE__ */ jsx("h3", {
485
+ className: "er-title er-registration-shell__title",
486
+ children: title
487
+ }),
488
+ /* @__PURE__ */ jsx("p", {
489
+ className: "er-text er-text--muted",
490
+ children: body
491
+ })
492
+ ] })
493
+ })
494
+ });
495
+ }
496
+ //#endregion
497
+ //#region ../blocks/src/system/runtime/nodes/event-registration/BookingEntryViews.tsx
498
+ /**
499
+ * The in-page booking card and the fixed booking bar (issue 1581).
500
+ *
501
+ * No hooks and no client-only imports: the server renders the card at its
502
+ * final size before hydration, and the client renders the same markup.
503
+ */
504
+ function joinFacts(facts) {
505
+ return facts.filter((fact) => Boolean(fact)).join(" · ");
506
+ }
507
+ function finishedTitle(entry) {
508
+ if (entry.kind === "waitlisted") return entry.when ? `You’re on the waitlist for ${entry.when}` : "You’re on the waitlist";
509
+ return entry.when ? `You’re booked: ${entry.when}` : "You’re booked";
510
+ }
511
+ function CheckBadge() {
512
+ return /* @__PURE__ */ jsx("span", {
513
+ className: "er-booking-card__badge",
514
+ "aria-hidden": "true",
515
+ children: /* @__PURE__ */ jsx("svg", {
516
+ width: "22",
517
+ height: "22",
518
+ viewBox: "0 0 22 22",
519
+ fill: "none",
520
+ stroke: "currentColor",
521
+ strokeWidth: "2.6",
522
+ strokeLinecap: "round",
523
+ strokeLinejoin: "round",
524
+ children: /* @__PURE__ */ jsx("path", { d: "M5 11.5l4 4L17 7" })
525
+ })
526
+ });
527
+ }
528
+ function CardCta(props) {
529
+ return /* @__PURE__ */ jsx(ThemedButton, {
530
+ type: "button",
531
+ variant: props.variant,
532
+ size: "md",
533
+ extraClassName: "er-booking-card__cta",
534
+ label: props.label,
535
+ onClick: props.onClick
536
+ });
537
+ }
538
+ function SingleCard({ entry, buttonVariant, onAction }) {
539
+ return /* @__PURE__ */ jsx("div", {
540
+ className: "er-booking-card",
541
+ "data-entry": "single",
542
+ children: /* @__PURE__ */ jsxs("div", {
543
+ className: "er-booking-card__row",
544
+ children: [
545
+ entry.tile ? /* @__PURE__ */ jsxs("span", {
546
+ className: "er-booking-card__tile",
547
+ "aria-hidden": "true",
548
+ children: [/* @__PURE__ */ jsx("span", {
549
+ className: "er-booking-card__tile-month",
550
+ children: entry.tile.month
551
+ }), /* @__PURE__ */ jsx("span", {
552
+ className: "er-booking-card__tile-day",
553
+ children: entry.tile.day
554
+ })]
555
+ }) : null,
556
+ /* @__PURE__ */ jsxs("div", {
557
+ className: "er-booking-card__body",
558
+ children: [
559
+ entry.when ? /* @__PURE__ */ jsx("p", {
560
+ className: "er-booking-card__when",
561
+ children: entry.when
562
+ }) : null,
563
+ entry.venue ? /* @__PURE__ */ jsx("p", {
564
+ className: "er-booking-card__venue",
565
+ children: entry.venue
566
+ }) : null,
567
+ /* @__PURE__ */ jsx("p", {
568
+ className: "er-booking-card__facts",
569
+ children: joinFacts([entry.price, entry.places])
570
+ })
571
+ ]
572
+ }),
573
+ /* @__PURE__ */ jsx(CardCta, {
574
+ label: entry.action,
575
+ variant: buttonVariant,
576
+ onClick: onAction
577
+ })
578
+ ]
579
+ })
580
+ });
581
+ }
582
+ function ChooseDateCard({ entry, buttonVariant, onAction, onChooseDate }) {
583
+ return /* @__PURE__ */ jsxs("div", {
584
+ className: "er-booking-card",
585
+ "data-entry": "choose-date",
586
+ children: [/* @__PURE__ */ jsxs("div", {
587
+ className: "er-booking-card__row",
588
+ children: [/* @__PURE__ */ jsxs("div", {
589
+ className: "er-booking-card__body",
590
+ children: [/* @__PURE__ */ jsx("p", {
591
+ className: "er-booking-card__when",
592
+ children: joinFacts([entry.schedule, entry.venue])
593
+ }), /* @__PURE__ */ jsx("p", {
594
+ className: "er-booking-card__facts",
595
+ children: joinFacts([entry.price])
596
+ })]
597
+ }), /* @__PURE__ */ jsx(CardCta, {
598
+ label: entry.action,
599
+ variant: buttonVariant,
600
+ onClick: onAction
601
+ })]
602
+ }), /* @__PURE__ */ jsxs("div", {
603
+ className: "er-booking-card__dates",
604
+ children: [
605
+ /* @__PURE__ */ jsx("span", {
606
+ className: "er-booking-card__dates-label",
607
+ children: "Next dates"
608
+ }),
609
+ entry.dates.map((date) => /* @__PURE__ */ jsx("button", {
610
+ type: "button",
611
+ className: "er-booking-card__date",
612
+ "data-full": date.full ? "true" : void 0,
613
+ onClick: onChooseDate ? () => onChooseDate(date.selectionId) : void 0,
614
+ children: joinFacts([date.label, date.places])
615
+ }, date.selectionId)),
616
+ entry.moreCount > 0 ? /* @__PURE__ */ jsxs("span", {
617
+ className: "er-booking-card__more",
618
+ children: [
619
+ "+ ",
620
+ entry.moreCount,
621
+ " more"
622
+ ]
623
+ }) : null
624
+ ]
625
+ })]
626
+ });
627
+ }
628
+ function ChooseEventCard({ entry, buttonVariant, onAction }) {
629
+ return /* @__PURE__ */ jsx("div", {
630
+ className: "er-booking-card",
631
+ "data-entry": "choose-event",
632
+ children: /* @__PURE__ */ jsxs("div", {
633
+ className: "er-booking-card__row",
634
+ children: [/* @__PURE__ */ jsx("div", {
635
+ className: "er-booking-card__body",
636
+ children: /* @__PURE__ */ jsx("p", {
637
+ className: "er-booking-card__when",
638
+ children: entry.countLabel
639
+ })
640
+ }), /* @__PURE__ */ jsx(CardCta, {
641
+ label: entry.action,
642
+ variant: buttonVariant,
643
+ onClick: onAction
644
+ })]
645
+ })
646
+ });
647
+ }
648
+ function FinishedCard({ entry, onAction }) {
649
+ return /* @__PURE__ */ jsx("div", {
650
+ className: "er-booking-card",
651
+ "data-entry": entry.kind,
652
+ children: /* @__PURE__ */ jsxs("div", {
653
+ className: "er-booking-card__row",
654
+ children: [
655
+ /* @__PURE__ */ jsx(CheckBadge, {}),
656
+ /* @__PURE__ */ jsxs("div", {
657
+ className: "er-booking-card__body",
658
+ children: [/* @__PURE__ */ jsx("p", {
659
+ className: "er-booking-card__when",
660
+ children: finishedTitle(entry)
661
+ }), entry.kind === "booked" && entry.places ? /* @__PURE__ */ jsx("p", {
662
+ className: "er-booking-card__facts",
663
+ children: entry.places
664
+ }) : null]
665
+ }),
666
+ /* @__PURE__ */ jsx(CardCta, {
667
+ label: entry.action,
668
+ variant: "outline",
669
+ onClick: onAction
670
+ })
671
+ ]
672
+ })
673
+ });
674
+ }
675
+ function BookingEntryCard(props) {
676
+ const { entry, ...rest } = props;
677
+ switch (entry.kind) {
678
+ case "single": return /* @__PURE__ */ jsx(SingleCard, {
679
+ entry,
680
+ ...rest
681
+ });
682
+ case "chooseDate": return /* @__PURE__ */ jsx(ChooseDateCard, {
683
+ entry,
684
+ ...rest
685
+ });
686
+ case "chooseEvent": return /* @__PURE__ */ jsx(ChooseEventCard, {
687
+ entry,
688
+ ...rest
689
+ });
690
+ case "inProgress": return null;
691
+ case "booked":
692
+ case "waitlisted": return /* @__PURE__ */ jsx(FinishedCard, {
693
+ entry,
694
+ ...rest
695
+ });
696
+ default: return assertNever(entry);
697
+ }
698
+ }
699
+ function BarProgress({ progress }) {
700
+ return /* @__PURE__ */ jsx("span", {
701
+ className: "er-booking-bar__progress",
702
+ "aria-hidden": "true",
703
+ children: /* @__PURE__ */ jsx("span", {
704
+ className: "er-booking-bar__progress-fill",
705
+ style: { width: `${Math.round(progress.current / Math.max(progress.total, 1) * 100)}%` }
706
+ })
707
+ });
708
+ }
709
+ function plain(text) {
710
+ return text ? {
711
+ text,
712
+ tone: "plain"
713
+ } : null;
714
+ }
715
+ function price(text) {
716
+ return text ? {
717
+ text,
718
+ tone: "price"
719
+ } : null;
720
+ }
721
+ function barCopy(title, facts) {
722
+ const present = facts.filter((fact) => fact !== null);
723
+ return {
724
+ title,
725
+ facts: present,
726
+ summary: present.map((fact) => fact.text).join(" · ")
727
+ };
728
+ }
729
+ /** What the bar says for every booking state: a title or status, then its facts. */
730
+ function bookingBarCopy(entry) {
731
+ switch (entry.kind) {
732
+ case "single": {
733
+ const copy = barCopy(entry.title, [
734
+ plain(entry.run),
735
+ plain(entry.shortWhen),
736
+ price(entry.price),
737
+ plain(entry.places)
738
+ ]);
739
+ return copy.facts.length > 0 ? copy : barCopy(entry.title, [plain(entry.action || "Book your place")]);
740
+ }
741
+ case "chooseDate": return barCopy(entry.title, [
742
+ price(entry.price),
743
+ plain(entry.nextDate ? `next: ${entry.nextDate}` : null),
744
+ plain(entry.schedule)
745
+ ]);
746
+ case "chooseEvent": return barCopy(entry.title, [plain(entry.countLabel)]);
747
+ case "inProgress": return barCopy(entry.title, [plain("Booking in progress"), plain(entry.progress ? `Step ${entry.progress.current} of ${entry.progress.total}` : null)]);
748
+ case "booked": return barCopy("Booked", [plain(entry.shortWhen), plain(entry.places)]);
749
+ case "waitlisted": return barCopy("On the waitlist", [plain(entry.shortWhen)]);
750
+ default: return assertNever(entry);
751
+ }
752
+ }
753
+ /**
754
+ * The facts with a thin divider between them. Assistive tech hears a comma
755
+ * in place of each divider, so the bar still reads as a sentence.
756
+ */
757
+ function BarFacts({ facts, className }) {
758
+ return /* @__PURE__ */ jsx("span", {
759
+ className,
760
+ children: facts.map((fact, index) => /* @__PURE__ */ jsxs(React.Fragment, { children: [index > 0 ? /* @__PURE__ */ jsx(BarDivider, {}) : null, /* @__PURE__ */ jsx("span", {
761
+ className: fact.tone === "price" ? "er-booking-bar__fact er-booking-bar__fact--price" : "er-booking-bar__fact",
762
+ children: fact.text
763
+ })] }, `${index}-${fact.text}`))
764
+ });
765
+ }
766
+ function BarDivider() {
767
+ return /* @__PURE__ */ jsx("span", {
768
+ className: "er-booking-bar__divider",
769
+ children: /* @__PURE__ */ jsx("span", {
770
+ className: "rb-sr-only",
771
+ children: ", "
772
+ })
773
+ });
774
+ }
775
+ /** Longer labels (a block's own button text) give way to a short one in the bar. */
776
+ const BAR_LABEL_MAX = 18;
777
+ /** The bar's button label: short enough for a phone's bar. */
778
+ function bookingBarAction(entry) {
779
+ switch (entry.kind) {
780
+ case "single": return entry.action.length <= BAR_LABEL_MAX ? entry.action : "Book now";
781
+ case "inProgress": return "Continue";
782
+ case "chooseDate":
783
+ case "chooseEvent":
784
+ case "booked":
785
+ case "waitlisted": return entry.action;
786
+ default: return assertNever(entry);
787
+ }
788
+ }
789
+ function FinishedBar(props) {
790
+ const { title, facts } = bookingBarCopy(props.entry);
791
+ return /* @__PURE__ */ jsxs("button", {
792
+ type: "button",
793
+ className: "er-booking-bar__status",
794
+ onClick: props.onAction,
795
+ children: [
796
+ /* @__PURE__ */ jsx("span", {
797
+ className: "er-booking-bar__check",
798
+ "aria-hidden": "true",
799
+ children: /* @__PURE__ */ jsx("svg", {
800
+ width: "12",
801
+ height: "12",
802
+ viewBox: "0 0 12 12",
803
+ fill: "none",
804
+ stroke: "currentColor",
805
+ strokeWidth: "2",
806
+ strokeLinecap: "round",
807
+ strokeLinejoin: "round",
808
+ children: /* @__PURE__ */ jsx("path", { d: "M2.5 6.25l2.25 2.25L9.5 3.75" })
809
+ })
810
+ }),
811
+ /* @__PURE__ */ jsxs("span", {
812
+ className: "er-booking-bar__status-text",
813
+ children: [/* @__PURE__ */ jsx("strong", {
814
+ className: "er-booking-bar__status-title",
815
+ children: title
816
+ }), facts.length > 0 ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(BarDivider, {}), /* @__PURE__ */ jsx(BarFacts, {
817
+ className: "er-booking-bar__meta",
818
+ facts
819
+ })] }) : null]
820
+ }),
821
+ /* @__PURE__ */ jsx("span", {
822
+ className: "rb-sr-only",
823
+ children: ", view your booking"
824
+ })
825
+ ]
826
+ });
827
+ }
828
+ function BookingEntryBar(props) {
829
+ const hidden = props.state === "hidden";
830
+ const finished = props.entry.kind === "booked" || props.entry.kind === "waitlisted";
831
+ return /* @__PURE__ */ jsx("div", {
832
+ ref: props.barRef,
833
+ className: "er-booking-bar",
834
+ "data-rb-site-overlay": "",
835
+ role: "region",
836
+ "aria-label": "Booking",
837
+ "data-state": props.state,
838
+ "data-entry": props.entry.kind,
839
+ "aria-hidden": hidden || void 0,
840
+ inert: hidden,
841
+ children: /* @__PURE__ */ jsx("div", {
842
+ className: "er-booking-bar__inner",
843
+ children: finished ? /* @__PURE__ */ jsx(FinishedBar, {
844
+ entry: props.entry,
845
+ onAction: props.onAction
846
+ }) : /* @__PURE__ */ jsx(IdleBarContent, {
847
+ entry: props.entry,
848
+ buttonVariant: props.buttonVariant,
849
+ onAction: props.onAction
850
+ })
851
+ })
852
+ });
853
+ }
854
+ function IdleBarContent(props) {
855
+ const { title, facts } = bookingBarCopy(props.entry);
856
+ return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs("div", {
857
+ className: "er-booking-bar__info",
858
+ children: [
859
+ /* @__PURE__ */ jsx("span", {
860
+ className: "er-booking-bar__title",
861
+ children: title
862
+ }),
863
+ /* @__PURE__ */ jsx(BarFacts, {
864
+ className: "er-booking-bar__meta",
865
+ facts
866
+ }),
867
+ props.entry.kind === "inProgress" && props.entry.progress ? /* @__PURE__ */ jsx(BarProgress, { progress: props.entry.progress }) : null
868
+ ]
869
+ }), /* @__PURE__ */ jsx(ThemedButton, {
870
+ type: "button",
871
+ variant: props.buttonVariant,
872
+ size: "sm",
873
+ extraClassName: "er-booking-bar__cta",
874
+ label: bookingBarAction(props.entry),
875
+ onClick: props.onAction
876
+ })] });
877
+ }
878
+ //#endregion
879
+ //#region ../blocks/src/system/runtime/nodes/event-registration/StepIndicator.tsx
880
+ /**
881
+ * Step indicator component for the event registration wizard.
882
+ * Thin wrapper around the shared StepIndicator: styled by the shared
883
+ * registration-surface classes, with 'er'-prefixed classes kept in the
884
+ * markup as the stable hook surface for per-site theme CSS.
885
+ */
886
+ function StepIndicator(props) {
887
+ return /* @__PURE__ */ jsx(StepIndicator$1, {
888
+ ...props,
889
+ classPrefix: "er",
890
+ emitSharedClasses: true
891
+ });
892
+ }
893
+ //#endregion
894
+ export { planEventBookingPanel as a, EventBookingPanelView as c, RegistrationClosedState as i, BookingEntryBar as n, registrationSourceForPanel as o, BookingEntryCard as r, resolveBookingPanelSelection as s, StepIndicator as t };