@riverbankcms/sdk 0.180.0 → 0.182.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 (232) hide show
  1. package/dist/_dts/{BlocksIslandsHydrator-DC_AvZwy.d.ts → BlocksIslandsHydrator-Bvw2bUif.d.ts} +1 -1
  2. package/dist/_dts/{Page-DQOxVtp3.d.ts → Page-B2EAT-bE.d.ts} +7 -7
  3. package/dist/_dts/{SdkPreviewMode-DrLgY9_f.d.ts → SdkPreviewMode-D0vww6rh.d.ts} +2 -2
  4. package/dist/_dts/{client-BP7VBRvs.d.ts → client-D6T430bk.d.ts} +56 -70
  5. package/dist/_dts/{content-types-1-K2qi__.d.ts → content-types-wZVWccC6.d.ts} +2 -2
  6. package/dist/_dts/{contracts-Dfqz0Tcu.d.ts → contracts-B-vtOcr8.d.ts} +3 -3
  7. package/dist/_dts/{generatePageMetadata-CSfAqmry.d.ts → generatePageMetadata-CxfwHE6z.d.ts} +2 -2
  8. package/dist/_dts/{index-BeM5Ylwf.d.ts → index-CEyYMhLJ.d.ts} +1 -2
  9. package/dist/_dts/{index-DQr358-m.d.ts → index-CQrb3Ccc.d.ts} +8 -8
  10. package/dist/_dts/{index-DCcxLa8p.d.ts → index-CciRW_w1.d.ts} +2 -2
  11. package/dist/_dts/{index-Blrw2oVk.d.ts → index-Cqxis-nv.d.ts} +1 -1
  12. package/dist/_dts/{index-CB5Csefo.d.ts → index-DIU-wL1M.d.ts} +2 -2
  13. package/dist/_dts/{index-DQBGwBPx.d.ts → index-DqPKdeTk.d.ts} +1 -1
  14. package/dist/_dts/{loadContent-BG2tLGXj.d.ts → loadContent-D0wrxiSp.d.ts} +7 -7
  15. package/dist/_dts/{request-P08l6mkr.d.ts → request-DEwxUSw8.d.ts} +2375 -883
  16. package/dist/_dts/{resolveBlockData-BDHc8lFs.d.ts → resolveBlockData-VaG_MYbN.d.ts} +5 -5
  17. package/dist/_dts/{resolvePageContent-Y3IZBbtL.d.ts → resolvePageContent-DTwklC_v.d.ts} +1 -1
  18. package/dist/_dts/sdk/src/bookings/index.d.ts +2 -2
  19. package/dist/_dts/sdk/src/client/types.d.ts +2 -2
  20. package/dist/_dts/sdk/src/client.d.ts +7 -7
  21. package/dist/_dts/sdk/src/config/index.d.ts +6 -6
  22. package/dist/_dts/sdk/src/config/template-validation.d.ts +1 -1
  23. package/dist/_dts/sdk/src/config/validation.d.ts +1 -1
  24. package/dist/_dts/sdk/src/data/dataLoaderContext.d.ts +2 -2
  25. package/dist/_dts/sdk/src/data/resolveBlockData.d.ts +1 -1
  26. package/dist/_dts/sdk/src/data/types.d.ts +2 -2
  27. package/dist/_dts/sdk/src/gifting/client.d.ts +1 -2
  28. package/dist/_dts/sdk/src/index.d.ts +104 -8
  29. package/dist/_dts/sdk/src/manifest/index.d.ts +3 -3
  30. package/dist/_dts/sdk/src/metadata/index.d.ts +1 -1
  31. package/dist/_dts/sdk/src/navigation/index.d.ts +3 -3
  32. package/dist/_dts/sdk/src/next/index.d.ts +83 -52
  33. package/dist/_dts/sdk/src/next/middleware.d.ts +2 -2
  34. package/dist/_dts/sdk/src/page-converter/index.d.ts +3 -3
  35. package/dist/_dts/sdk/src/portal/client.d.ts +43 -56
  36. package/dist/_dts/sdk/src/portal/index.d.ts +3 -18
  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/rendering/client.d.ts +2 -2
  42. package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +1 -1
  43. package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +1 -1
  44. package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +4 -4
  45. package/dist/_dts/sdk/src/rendering/index.d.ts +6 -6
  46. package/dist/_dts/sdk/src/rendering/islands/client.d.ts +1 -1
  47. package/dist/_dts/sdk/src/rendering/server.d.ts +2 -2
  48. package/dist/_dts/sdk/src/rendering/themeAdmission.d.ts +1 -1
  49. package/dist/_dts/sdk/src/routing/index.d.ts +6 -6
  50. package/dist/_dts/sdk/src/server.d.ts +5 -5
  51. package/dist/_dts/sdk/src/spam-protection/index.d.ts +2 -2
  52. package/dist/_dts/sdk/src/theme/index.d.ts +1 -1
  53. package/dist/_dts/{serviceBookingOutline-BvtNagjw.d.ts → serviceBookingOutline-DtQuFlID.d.ts} +6 -6
  54. package/dist/_dts/{types-DpEAnP4F.d.ts → types-B3RjeBLV.d.ts} +2 -2
  55. package/dist/_dts/{types-HAy1-Jjo.d.ts → types-BvUSGQrw.d.ts} +3 -3
  56. package/dist/_dts/{types-BrK6SS5c.d.ts → types-CkRFtBqd.d.ts} +7 -7
  57. package/dist/_dts/{validation-D6q3tOBA.d.ts → validation-BZA3DhcV.d.ts} +4 -4
  58. package/dist/client/{BlocksIslandsHydrator-DJSmdNUJ.mjs → BlocksIslandsHydrator-CQMf0HdN.mjs} +19 -19
  59. package/dist/client/{BookingMailingListNote-CGxg37zx.mjs → BookingMailingListNote-7kdvuPow.mjs} +93 -18
  60. package/dist/client/{BookingQuestionFields-DXegGSnS.mjs → BookingQuestionFields-BJI7mZuV.mjs} +7 -87
  61. package/dist/client/CalendarAction-D_Glwvz2.mjs +105 -0
  62. package/dist/client/{CalendarNavigationChevron-VfP50sYm.mjs → CalendarNavigationChevron-DPUD6wjy.mjs} +8 -8
  63. package/dist/client/{CheckboxChoice-BZPLCgTU.mjs → CheckboxChoice-C8i4NraK.mjs} +1 -1
  64. package/dist/client/{DemoBookingPortalAccess-0Ua44F1j.mjs → DemoBookingPortalAccess-8kwNF9HN.mjs} +9 -6
  65. package/dist/client/{EventCalendar.client-CrpiyDSP.mjs → EventCalendar.client-Dhb14bcC.mjs} +10 -10
  66. package/dist/client/{EventCombined.client-D0me9wnz.mjs → EventCombined.client-C1jEZBN9.mjs} +60 -10
  67. package/dist/client/{EventEmbeddedCheckoutStep-BDnicDM6.mjs → EventEmbeddedCheckoutStep-BGkbUhuw.mjs} +1 -1
  68. package/dist/client/{EventItem-CJITrGkF.mjs → EventItem-Bb0ppG2N.mjs} +9 -177
  69. package/dist/client/{EventListWeekNavigation-BlEm_xjq.mjs → EventListWeekNavigation-DMryCaNV.mjs} +1 -1
  70. package/dist/client/{EventListing.client-BNM_HuS0.mjs → EventListing.client-BuH5kKA3.mjs} +3 -3
  71. package/dist/client/{EventListing.view-CXfb7RRy.mjs → EventListing.view-DsqvuulZ.mjs} +8 -8
  72. package/dist/client/{EventRegistrationPayment-DiD9uYs6.mjs → EventRegistrationPayment-D4FvQSFF.mjs} +555 -502
  73. package/dist/client/{Page-bX7iy_MK.mjs → Page-sV6BJkXX.mjs} +550 -339
  74. package/dist/client/{ProtectedSubmitButton-De6AzhE6.mjs → ProtectedSubmitButton-BNnKuir8.mjs} +1 -1
  75. package/dist/client/{SiteTermsAgreementField-BAdW5DvE.mjs → SiteTermsAgreementField-VfSd6JU-.mjs} +7 -11
  76. package/dist/client/{StepIndicator-DCfdcb7s.mjs → StepIndicator-B6o5B7g3.mjs} +1 -1
  77. package/dist/client/{StepIndicator-DCqorVne.mjs → StepIndicator-BTqO7cJl.mjs} +235 -26
  78. package/dist/client/{ThemedButton-CnSa7o-I.mjs → ThemedButton-PFOhXktM.mjs} +1 -33
  79. package/dist/client/{accessibleSurfaces-Wl8-_OVJ.mjs → accessibleSurfaces-BogaGutk.mjs} +983 -634
  80. package/dist/client/{accordion-wofJY8xY.mjs → accordion-6cuswD_s.mjs} +1 -1
  81. package/dist/client/{booking-form.client-CYl9NrqS.mjs → booking-form.client-BOMe_SKi.mjs} +52 -29
  82. package/dist/client/bookingCalendar--aWnqFDn.mjs +180 -0
  83. package/dist/client/{bookingForm-kgVWtuMe.mjs → bookingForm-DSCH-VHo.mjs} +4 -4
  84. package/dist/client/bookings.mjs +17 -11
  85. package/dist/client/{boxStyleClassNames-CQHWz5gJ.mjs → boxStyleClassNames-BFuqZCfz.mjs} +2 -2
  86. package/dist/client/{carousel-BE1dEFsD.mjs → carousel-CGyQVV1M.mjs} +2 -2
  87. package/dist/client/{carousel.client-DMtGYTTM.mjs → carousel.client-BtLwHefX.mjs} +1 -1
  88. package/dist/client/{cart-BsjsdGZE.mjs → cart-BYOe7MCh.mjs} +3 -3
  89. package/dist/client/{cart.client-DylGUWXY.mjs → cart.client-BKFkaXdV.mjs} +1 -1
  90. package/dist/client/{checkout-B5KxEUDr.mjs → checkout-Dwd7Di77.mjs} +3 -3
  91. package/dist/client/{checkout.client-C98fhch3.mjs → checkout.client-C25hpi-z.mjs} +1 -1
  92. package/dist/client/{checkoutUrls-BMLYTf38.mjs → checkoutUrls-tG788sw0.mjs} +1 -1
  93. package/dist/client/client.mjs +106 -43
  94. package/dist/client/{constants-PfYJsEZF.mjs → constants-DdxFG3Ic.mjs} +1 -2
  95. package/dist/client/{context-DtKdUdkO.mjs → context-Hi1RuYEM.mjs} +753 -373
  96. package/dist/client/{dateFormatting-BaGPvQS3.mjs → dateFormatting-C8vBCHuo.mjs} +15 -25
  97. package/dist/client/{demoPortalMagicLink-B8eDjhuG.mjs → demoPortalMagicLink-BAL5UIDG.mjs} +2 -3
  98. package/dist/client/{enhanceHeaderSection-DvhD-8eE.mjs → enhanceHeaderSection-Dv1Lr9kJ.mjs} +4 -5
  99. package/dist/client/{event-registration.client-Du9a_xAN.mjs → event-registration.client-dB_Z7bb-.mjs} +191 -210
  100. package/dist/client/{eventCalendar-Di9wDfzl.mjs → eventCalendar-CQnRA4Ww.mjs} +4 -4
  101. package/dist/client/{eventCombined-CNW6nBsB.mjs → eventCombined-BDOG1hVp.mjs} +4 -4
  102. package/dist/client/{eventListing-CQMxQ8By.mjs → eventListing-DSVmhy9n.mjs} +4 -4
  103. package/dist/client/{eventRegistration-CprS9k1D.mjs → eventRegistration-CD5mRtEH.mjs} +4 -4
  104. package/dist/client/{form-Zl1_8RJ6.mjs → form-DWnlEVSK.mjs} +3 -3
  105. package/dist/client/{form.client-TaMUys6I.mjs → form.client-D7zmeqNI.mjs} +5 -5
  106. package/dist/client/{form.parts-CpNPbPPM.mjs → form.parts-C-G6N_MK.mjs} +3 -3
  107. package/dist/client/gifting/client.mjs +32 -29
  108. package/dist/client/{gifting-DNVa7-Wj.mjs → gifting-Cn0jidP5.mjs} +4 -4
  109. package/dist/client/{gifting.client-CFUq3GVx.mjs → gifting.client-DVo1YFLs.mjs} +5 -5
  110. package/dist/client/{gifting.parts-CDQvxA4A.mjs → gifting.parts-Bak93gD2.mjs} +2 -2
  111. package/dist/client/{headerSection-Cg6083rn.mjs → headerSection-DjQuj_6v.mjs} +2 -2
  112. package/dist/client/{mediaAssets-B99AP7ai.mjs → mediaAssets-COfQolI3.mjs} +1 -1
  113. package/dist/client/{mediaContext-Fusweriw.mjs → mediaContext-DzvnjYXm.mjs} +1 -1
  114. package/dist/client/{newsletter-form.client-VuL9I96G.mjs → newsletter-form.client-rIYPziZC.mjs} +7 -7
  115. package/dist/client/{newsletter-form.interactive-7Of3eYn0.mjs → newsletter-form.interactive-DVt3enLr.mjs} +181 -155
  116. package/dist/client/{newsletter-form.parts-OBqsfT24.mjs → newsletter-form.parts-CH6dGfdn.mjs} +2 -2
  117. package/dist/client/{newsletterForm-BkJe_RTv.mjs → newsletterForm-Cg8cBDHd.mjs} +3 -3
  118. package/dist/client/{lookSurfaces-gJ3OqPf9.mjs → noop-jesvJXEE.mjs} +403 -275
  119. package/dist/client/portal/client.mjs +12202 -7166
  120. package/dist/client/portalOrders-oEoTvzkW.mjs +596 -0
  121. package/dist/client/portalRoutes-ByyVZfVq.mjs +873 -0
  122. package/dist/client/{product-detail.client-B2hdxqJN.mjs → product-detail.client-5aHq-vuu.mjs} +1 -1
  123. package/dist/client/{product-list.client-CCEgu9rx.mjs → product-list.client-CyAk5rnC.mjs} +1 -1
  124. package/dist/client/{productDetail-CRX_ZRfS.mjs → productDetail-B8aZ2mqY.mjs} +3 -3
  125. package/dist/client/{productList-BAdJ6z5S.mjs → productList-BuLemmod.mjs} +3 -3
  126. package/dist/client/{propsDecoder-BLKAmX0S.mjs → propsDecoder-0Unsqn3R.mjs} +2 -2
  127. package/dist/client/{registry.server-Bj9cmHHF.mjs → registry.server-DzvtVVD0.mjs} +664 -434
  128. package/dist/client/{renderableMediaAssetAdmission-BlfqYLJW.mjs → renderableMediaAssetAdmission-BsOWd9lf.mjs} +1 -1
  129. package/dist/client/rendering/client.mjs +26 -26
  130. package/dist/client/rendering/islands.mjs +1 -1
  131. package/dist/client/rendering.mjs +16 -8
  132. package/dist/client/{richText-coerce-Z45OLLEX.mjs → richText-coerce-Bnng7JFA.mjs} +2 -1
  133. package/dist/client/{routeIslandApiConfig-DHpTTK77.mjs → routeIslandApiConfig-BGfcc9sk.mjs} +1 -1
  134. package/dist/client/{runtimeResponse-DtWSfWSZ.mjs → runtimeResponse-DAPVRToN.mjs} +1 -1
  135. package/dist/client/{runtimeResponse-D2j2-mOk.mjs → runtimeResponse-nXT8VAMl.mjs} +1 -1
  136. package/dist/client/{shop-BKsgxm_-.mjs → shop-GuMqnDL-.mjs} +3 -3
  137. package/dist/client/{shop-commerce-Cbtk_kUW.mjs → shop-commerce-D5bDY1o1.mjs} +53 -16
  138. package/dist/client/{shop-commerce-store-B-rv2p5h.mjs → shop-commerce-store-B7sHnLwI.mjs} +22 -5
  139. package/dist/client/{shop-discount-apply.state-CiCDLNh7.mjs → shop-discount-apply.state-Dos2zdC2.mjs} +2 -2
  140. package/dist/client/{shop.client-Rnqa74Tk.mjs → shop.client-uvj5GDZb.mjs} +17 -39
  141. package/dist/client/{shopShared-BaBfhjCq.mjs → shopShared-3giNWE3H.mjs} +2 -2
  142. package/dist/client/spam-protection.mjs +1 -1
  143. package/dist/client/src-Al4ooTl_.mjs +164 -0
  144. package/dist/client/{src-o7WEvbK1.mjs → src-CmXh3JWs.mjs} +233 -91
  145. package/dist/client/{timetableModel-BOff1Kk5.mjs → timetableModel-GA-hn1qM.mjs} +11 -87
  146. package/dist/client/{shop-add-feedback-DvC2kP1K.mjs → urlParams-C2QHo1Pa.mjs} +1 -42
  147. package/dist/client/{useAvailableSlots-DQJNh10g.mjs → useAvailableSlots-CBneCxbG.mjs} +2 -3
  148. package/dist/client/{useDiscountCodeUi-BcFQRI_7.mjs → useDiscountCodeUi-D0kGF0C7.mjs} +1 -1
  149. package/dist/client/{useEventPagination-BvdcexDC.mjs → useEventPagination-xX8n_Tuu.mjs} +8 -8
  150. package/dist/client/{view-CTBwSpKv.mjs → view-DOyZc-DF.mjs} +4 -4
  151. package/dist/client/{wizardSteps-CWIQyRIw.mjs → wizardSteps-B952ify5.mjs} +1241 -295
  152. package/dist/preview-next/client/{PageSectionToolbar-CG6KwITA.mjs → PageSectionToolbar-BI3UCdpu.mjs} +3 -3
  153. package/dist/preview-next/client/{PreviewEditorSidebar-BGBqrC9m.mjs → PreviewEditorSidebar-jkfLVOgY.mjs} +12 -9
  154. package/dist/preview-next/client/{PreviewEditorUI-Bwkyx28x.mjs → PreviewEditorUI-DwJQs4hM.mjs} +4 -4
  155. package/dist/preview-next/client/{PreviewShell-DB1l6JNU.mjs → PreviewShell-BAxAkuz8.mjs} +5 -5
  156. package/dist/preview-next/client/{SdkPreviewModeRuntime-Bs6Cwzr3.mjs → SdkPreviewModeRuntime-0UVB-39f.mjs} +68 -17
  157. package/dist/preview-next/client/{previewAssistantSlot-T-oDD_Dd.mjs → previewAssistantSlot-BgiYk3PB.mjs} +7347 -3516
  158. package/dist/preview-next/client/{previewChromeRoot-BeukcDRy.mjs → previewChromeRoot-tieNdF3E.mjs} +1 -1
  159. package/dist/preview-next/client/runtime.mjs +3 -3
  160. package/dist/preview-next/client/{sdk-runtime-ceDW_9q2.mjs → sdk-runtime-DXb_Evl0.mjs} +2 -2
  161. package/dist/preview-next/client/{siteStyleAccess-CCB9bScO.mjs → siteStyleAccess-BlN0jt2c.mjs} +3 -3
  162. package/dist/preview-next/client/{useAutosaveStatus-D4o0CKq7.mjs → useAutosaveStatus-BUEPA4oL.mjs} +1 -1
  163. package/dist/preview-next/client/{useOpenBlockForSetup-Seccrvwu.mjs → useOpenBlockForSetup-BVfr5P--.mjs} +1 -1
  164. package/dist/preview-next/container-responsive.css +203 -174
  165. package/dist/preview-next/keepAlive.mjs +1 -1
  166. package/dist/preview-next/middleware.mjs +1 -1
  167. package/dist/preview-next/{route-contract-FwFj8zGL.mjs → route-contract-BHTBA48n.mjs} +90 -37
  168. package/dist/server/{Block.shared-D6WrRCxX.mjs → Block.shared-hGoyEdjJ.mjs} +5 -5
  169. package/dist/server/{ThemeScopeCore-BQzjDQ2q.mjs → ThemeScopeCore-BfUCTOwj.mjs} +160 -142
  170. package/dist/server/{accessibleSurfaces-CM3QANtw.mjs → accessibleSurfaces-Dskni4Xj.mjs} +94 -330
  171. package/dist/server/accordions-By_0Ykks.mjs +111 -0
  172. package/dist/server/{bindings-CS6ih1Yc.mjs → bindings-DMJH4bvo.mjs} +7 -7
  173. package/dist/server/{client-m0ylCj_f.mjs → client-DrwlRNAH.mjs} +105 -42
  174. package/dist/server/config-validation.mjs +1 -1
  175. package/dist/server/config.mjs +2 -2
  176. package/dist/server/constants-CeMywaiD.mjs +1485 -0
  177. package/dist/server/{customCss-BZ8YSrQg.mjs → customCss-C9kgPHvr.mjs} +41 -5
  178. package/dist/server/data/resolveBlockData.mjs +1 -1
  179. package/dist/server/{resolveButtonColourStates--6yJp9Tq.mjs → expandPalette-ehuW8r2g.mjs} +745 -1229
  180. package/dist/server/index.mjs +3 -3
  181. package/dist/server/{loadContent-vgWMz1uD.mjs → loadContent-D0prFflT.mjs} +5 -4
  182. package/dist/server/{loadPage-CIOL3-9t.mjs → loadPage-CBLke9pJ.mjs} +3 -3
  183. package/dist/server/{lookMediaFrame-m-91jGGn.mjs → lookMediaFrame-H0fi4bJk.mjs} +38 -18
  184. package/dist/server/manifest.mjs +36 -25
  185. package/dist/server/{mapLocation-BM5WX7FY.mjs → mapLocation-MDDSubTp.mjs} +1 -1
  186. package/dist/server/media-BRmYrnzb.mjs +31 -0
  187. package/dist/server/{media-luf7RF22.mjs → media-gvfIw3z8.mjs} +2 -31
  188. package/dist/server/{navigation-BcNfYYuu.mjs → navigation-wrcuWmgp.mjs} +2 -2
  189. package/dist/server/navigation.mjs +1 -1
  190. package/dist/server/next.mjs +134 -81
  191. package/dist/server/{overrideResolution-BiHmsvTZ.mjs → overrideResolution-DUgCEH8z.mjs} +1 -1
  192. package/dist/server/page-converter.mjs +3 -3
  193. package/dist/server/{pageRenderPlan-DJo_obpi.mjs → pageRenderPlan-BHrmogsW.mjs} +165 -247
  194. package/dist/server/{pageRuntimeSupport-BnSuoHON.mjs → pageRuntimeSupport-D2-YMRei.mjs} +5 -5
  195. package/dist/server/{pageShared-BJuOzxzn.mjs → pageShared-CG8O31Eo.mjs} +3402 -3249
  196. package/dist/server/{parseThemeForPersistence-DOsfofCy.mjs → parseThemeForPersistence-CrPlbJEN.mjs} +3 -2
  197. package/dist/server/{portal-B4JVkdjc.mjs → portal-pG_uhsI2.mjs} +62 -46
  198. package/dist/server/portal.mjs +3 -3
  199. package/dist/server/portalQuestions-oUyohgL9.mjs +225 -0
  200. package/dist/server/{prebuild-Cr8p8T7V.mjs → prebuild-C8Amvzce.mjs} +1 -1
  201. package/dist/server/prebuild.mjs +1 -1
  202. package/dist/server/{prefetchBlockData-BZh57-ua.mjs → prefetchBlockData-BxUETRIZ.mjs} +4 -3
  203. package/dist/server/{registry-CvhFwbXJ.mjs → registry-Cc88-23f.mjs} +1514 -1190
  204. package/dist/server/rendering/components/pageShared.mjs +1 -1
  205. package/dist/server/rendering/helpers/loadPage.mjs +1 -1
  206. package/dist/server/rendering/helpers/pageRuntimeSupport.mjs +1 -1
  207. package/dist/server/rendering/server.mjs +4 -4
  208. package/dist/server/rendering.mjs +10 -9
  209. package/dist/server/{resolveBlockData-Cv_W1LVB.mjs → resolveBlockData-OG3KOkig.mjs} +2 -2
  210. package/dist/server/{responseMedia-KRKguBC5.mjs → responseMedia-IfH65QAH.mjs} +1 -1
  211. package/dist/server/{schema-BpsqaSSU.mjs → schema-CwfxQjc4.mjs} +10 -113
  212. package/dist/server/server.mjs +3 -3
  213. package/dist/server/{servicePageContent-CRKbTm_7.mjs → servicePageContent-BcFuhhD7.mjs} +22 -21
  214. package/dist/server/theme-bridge.mjs +34 -8
  215. package/dist/server/theme.mjs +2 -2
  216. package/dist/server/{three-pass-converter-39SXCCnh.mjs → three-pass-converter-DPaUPTfl.mjs} +34 -16
  217. package/dist/server/titleSourceSchema-NhK6azFS.mjs +2018 -0
  218. package/dist/server/typeGuards-CTW_9AXq.mjs +413 -0
  219. package/dist/server/types-BKaBZFjD.mjs +1085 -0
  220. package/dist/server/{validation-DCl-FCk_.mjs → validation-BovmbS8N.mjs} +70 -17
  221. package/dist/server/{version-DT_R5JAR.mjs → version-hws4hgyX.mjs} +1 -1
  222. package/dist/server/video-Cdr3wh-q.mjs +272 -0
  223. package/dist/styles/index.css +1098 -1885
  224. package/package.json +2 -1
  225. package/dist/_dts/index-B0_2-65A.d.ts +0 -101
  226. package/dist/client/TabBarFragment-DlKQRhP4.mjs +0 -56
  227. package/dist/client/checkoutRoute-DKlZRNZD.mjs +0 -22
  228. package/dist/client/creditProducts-BQ1t1erI.mjs +0 -266
  229. package/dist/client/formatDate-hhI1-tzt.mjs +0 -26
  230. package/dist/server/constants-Cj7hfbrA.mjs +0 -41
  231. package/dist/server/richTextSchema-QLaQrbII.mjs +0 -212
  232. package/dist/server/titleSourceSchema-Cu-3PRvv.mjs +0 -122
@@ -1,24 +1,17 @@
1
1
  "use client";
2
- import { c as unsafeAsMediaAssetId, d as parseUuidBrand, f as err, i as resolveManagedMediaReference, l as unsafeAsStorageBucketName, o as parseCanonicalMediaIdentifier, p as ok$1, u as unsafeAsStoragePath } from "./renderableMediaAssetAdmission-BlfqYLJW.mjs";
3
- import { $t as formatDateTime, A as toBookingRequirementConsentField, Ct as eventCalendarListLayoutCompatibleDisplayModeValues, D as blockBookingConsentSchema, E as blockBookingPaymentTermsSchema, M as bookingQuestionsAnswerValueSchema, P as eventCalendarListLayoutOptions, Qt as formatDateRange, St as eventCalendarDisplayModeValues, Tn as formatCurrencyAmount, Xt as validateBookingPaymentOptionKinds, Z as runtimeMediaSchema, Zt as formatDate$2, _n as parseUtcIsoDateTimeString, _t as roomChoicesSchema, bn as resolveBookingTimeZoneId, bt as normalizeCurrencyCode, c as blockSiteTermsSchema, ct as eyebrowTreatmentValues, dn as compareLocalScheduleDates, en as formatDateTimeRange, fn as formatLocalScheduleDate, gn as parseLocalScheduleTime, gt as reviewedRoomsSchema, hn as parseBookingLocalDate, ht as placesFor, in as formatTimeRange, j as beforeBookingQuestionsPresentationSchema, ln as toScheduledBookingDateTime, lt as headingDecorationColorTokenValues, mn as getLocalScheduleDate, mt as ROOM_PLACES, nn as formatSiteInstantTime, on as inferSiteDateLocale, pn as getBookingLocalDateKey, pt as visibleHeadingDecorationFamilyValues, rn as formatTime$2, sn as resolveBookingDisplayContext, t as assertNever$1, tn as formatSiteInstantDate, un as addLocalScheduleDays, vn as toUtcIsoDateTimeString, vt as unsafeAsPositiveCheckoutQuantity, wn as toNonNegativeCents, wt as eventCalendarListLayoutValues, xn as toBookingTimeZone, xt as eventCalendarDefaultViewValues, yn as resolveBookingBusinessTimeZone, yt as allocateReductionCents } from "./src-o7WEvbK1.mjs";
4
- import { C as omitZeroAmountFutureRows, E as parseAppointmentServiceId, T as assertNever$2, _ as addIntervalPreservingMonthAnchor, a as buildBookingQuestionsSubmission, b as getBookingInstalmentDepositRefundability, d as resolveBookingQuestionsAnswerMode, g as formatCreditProductUnits, h as formatCreditProductPayment, l as initialBookingQuestionsAnswerMode, o as checkBookingQuestionsAnswered, p as creditProductUnitNoun, t as deriveCreditProductLabels, u as initialBookingQuestionsValues, v as clampConfiguredAmount, w as splitAmountWithRemainderInFirst, x as getBookingInstalmentPlanIntervalCount } from "./creditProducts-BQ1t1erI.mjs";
2
+ import { d as unsafeAsStoragePath, f as parseUuidBrand, i as resolveManagedMediaReference, l as unsafeAsMediaAssetId, m as ok$1, o as parseCanonicalMediaIdentifier, p as err, u as unsafeAsStorageBucketName } from "./renderableMediaAssetAdmission-BsOWd9lf.mjs";
3
+ import { An as formatCurrencyAmount, Bn as parseEventSeriesId, Cn as toUtcIsoDateTimeString, Ct as unsafeAsPositiveCheckoutQuantity, Dn as parsePositiveCents, Dt as eventCalendarDisplayModeValues, En as toBookingTimeZone, Et as eventCalendarDefaultViewValues, J as runtimeMediaSchema, Nn as parseAppointmentServiceId, O as toBookingRequirementConsentField, Ot as eventCalendarListLayoutCompatibleDisplayModeValues, Sn as parseUtcIsoDateTimeString, St as roomChoicesSchema, T as blockBookingConsentSchema, Tn as resolveBookingTimeZoneId, Tt as normalizeCurrencyCode, _n as formatLocalScheduleDate, an as formatDateTimeRange, at as eyebrowTreatmentValues, bn as parseBookingLocalDate, bt as placesFor, c as blockSiteTermsSchema, cn as formatTime$2, dn as inferSiteDateLocale, dt as bookingQuestionsAnswerValueSchema, fn as resolveBookingDisplayContext, gn as compareLocalScheduleDates, hn as addLocalScheduleDays, in as formatDateTime, j as eventCalendarListLayoutOptions, k as beforeBookingQuestionsPresentationSchema, kn as toNonNegativeCents, kt as eventCalendarListLayoutValues, ln as formatTimeRange, mn as toScheduledBookingDateTime, nn as formatDate$2, on as formatSiteInstantDate, ot as headingDecorationColorTokenValues, rn as formatDateRange, sn as formatSiteInstantTime, t as assertNever$2, tn as validateBookingPaymentOptionKinds, ut as visibleHeadingDecorationFamilyValues, vn as getBookingLocalDateKey, w as blockBookingPaymentTermsSchema, wn as resolveBookingBusinessTimeZone, wt as allocateReductionCents, xn as parseLocalScheduleTime, xt as reviewedRoomsSchema, yn as getLocalScheduleDate, yt as ROOM_PLACES, zn as parseEventOfferingId } from "./src-CmXh3JWs.mjs";
4
+ import { c as checkBookingQuestionsAnswered, d as initialBookingQuestionsAnswerMode, f as initialBookingQuestionsValues, h as assertNever$3, p as resolveBookingQuestionsAnswerMode, r as bookingCalendar, s as buildBookingQuestionsSubmission } from "./bookingCalendar--aWnqFDn.mjs";
5
5
  import { t as stableJsonStringify } from "./stable-json-D0XAEIXc.mjs";
6
- import { $t as cardListFamilyBlocks, Mt as resolveEffectiveKnobs, en as cardListKnobBlocks, jt as blockAppearancePresets, n as listLookControl, r as listLookSlot } from "./lookSurfaces-gJ3OqPf9.mjs";
6
+ import { Mt as blockAppearancePresets, Nt as resolveEffectiveKnobs, en as cardListFamilyBlocks, i as listLookSlot, r as listLookControl, tn as cardListKnobBlocks } from "./noop-jesvJXEE.mjs";
7
7
  import { g as blockColorTokenNames, w as parseColorTokenParts } from "./types-BEaKfam_.mjs";
8
- import { G as mergeStyles, H as backgroundColorStyle, K as rgbColorValue, P as PUBLIC_BUTTON_ROLES, q as textColorStyle } from "./accessibleSurfaces-Wl8-_OVJ.mjs";
9
- import { S as clsx } from "./ThemedButton-CnSa7o-I.mjs";
10
- import { a as getSupabaseUrl, i as getSiteId, n as getCurrentResolveImageUrlContext, r as getMediaAssetIndex } from "./mediaContext-Fusweriw.mjs";
11
- import { l as buildCalendarViewport$1, n as calendarLinks, r as groupItemsByDate } from "./src-uwCpbHXG.mjs";
8
+ import { A as PUBLIC_BUTTON_ROLES, H as rgbColorValue, R as backgroundColorStyle, U as textColorStyle, V as mergeStyles } from "./accessibleSurfaces-BogaGutk.mjs";
9
+ import { x as clsx } from "./ThemedButton-PFOhXktM.mjs";
10
+ import { a as getSupabaseUrl, i as getSiteId, n as getCurrentResolveImageUrlContext, r as getMediaAssetIndex } from "./mediaContext-DzvnjYXm.mjs";
11
+ import { l as buildCalendarViewport$1, r as groupItemsByDate } from "./src-uwCpbHXG.mjs";
12
12
  import React from "react";
13
13
  import { Fragment, jsx } from "react/jsx-runtime";
14
14
  import { z } from "zod";
15
- //#region ../core/src/branded/events.ts
16
- const unsafeAsEventOfferingId = (id) => id;
17
- const unsafeAsEventSeriesId = (id) => id;
18
- const unsafeAsEventCategoryId = (id) => id;
19
- const parseEventOfferingId = (value) => parseUuidBrand(value, unsafeAsEventOfferingId);
20
- const parseEventSeriesId = (value) => parseUuidBrand(value, unsafeAsEventSeriesId);
21
- //#endregion
22
15
  //#region ../core/src/branded/identity.ts
23
16
  const unsafeAsSiteId = (id) => id;
24
17
  const parseSiteId = (value) => parseUuidBrand(value, unsafeAsSiteId);
@@ -45,7 +38,7 @@ function isPublicEventPricingOptionDisplayable(option) {
45
38
  case "not_on_sale_yet":
46
39
  case "sale_ended":
47
40
  case "attendance_mode_unavailable": return false;
48
- default: return assertNever$2(reason);
41
+ default: return assertNever$3(reason);
49
42
  }
50
43
  }
51
44
  function publicEventPricingDisplay(pricing) {
@@ -186,7 +179,7 @@ function canonicalEventPricingDisplay(pricing) {
186
179
  currency: pricing.currency,
187
180
  purpose: "configured"
188
181
  });
189
- default: return assertNever$2(pricing);
182
+ default: return assertNever$3(pricing);
190
183
  }
191
184
  }
192
185
  /**
@@ -205,7 +198,7 @@ function formatBookingPriceDisplay(display, options = {}) {
205
198
  case "mixed": return display.paidToAmount > display.paidFromAmount ? `Free or ${formatCurrencyAmount(display.paidFromAmount, display.currency, options)}–${formatCurrencyAmount(display.paidToAmount, display.currency, options)}` : `Free or ${formatCurrencyAmount(display.paidFromAmount, display.currency, options)}`;
206
199
  case "unavailable": return "Pricing unavailable";
207
200
  case "external": return display.label;
208
- default: return assertNever$2(display);
201
+ default: return assertNever$3(display);
209
202
  }
210
203
  }
211
204
  /** Render an event's price directly from its pricing value. */
@@ -456,6 +449,69 @@ function resolveFlexibleBalanceInitialPaymentCents(input) {
456
449
  return clampFlexibleBalanceConfiguredAmount(input.config.upfrontAmountCents, input.totalAmountCents);
457
450
  }
458
451
  //#endregion
452
+ //#region ../core/src/booking-instalments.ts
453
+ function isDepositBearingBookingInstalmentPlan(plan) {
454
+ switch (plan.kind) {
455
+ case "deposit_plus_one_remainder":
456
+ case "deposit_plus_scheduled_instalments": return true;
457
+ case "equal_scheduled_instalments": return false;
458
+ default: return assertNever$1(plan);
459
+ }
460
+ }
461
+ function getBookingInstalmentDepositRefundability(plan) {
462
+ return isDepositBearingBookingInstalmentPlan(plan) ? plan.depositRefundability : null;
463
+ }
464
+ function getBookingInstalmentProtectedDepositAmountCents(plan) {
465
+ return isDepositBearingBookingInstalmentPlan(plan) ? plan.depositAmountCents : null;
466
+ }
467
+ function clampConfiguredAmount(amountCents, totalAmountCents) {
468
+ return Math.max(0, Math.min(amountCents, totalAmountCents));
469
+ }
470
+ function splitAmountWithRemainderInFirst(totalAmountCents, partCount) {
471
+ if (partCount <= 0) return [];
472
+ const baseAmountCents = Math.floor(totalAmountCents / partCount);
473
+ const remainderCents = totalAmountCents - baseAmountCents * partCount;
474
+ return Array.from({ length: partCount }, (_, index) => index === 0 ? baseAmountCents + remainderCents : baseAmountCents);
475
+ }
476
+ function addIntervalPreservingMonthAnchor(isoString, intervalCount, intervalUnit) {
477
+ const date = new Date(isoString);
478
+ if (!Number.isFinite(date.getTime())) return isoString;
479
+ switch (intervalUnit) {
480
+ case "day":
481
+ date.setUTCDate(date.getUTCDate() + intervalCount);
482
+ return date.toISOString();
483
+ case "week":
484
+ date.setUTCDate(date.getUTCDate() + intervalCount * 7);
485
+ return date.toISOString();
486
+ case "month": return addMonthsPreservingAnchorDay(date, intervalCount).toISOString();
487
+ default: return assertNever$1(intervalUnit);
488
+ }
489
+ }
490
+ function getBookingInstalmentPlanIntervalCount(plan) {
491
+ switch (plan.kind) {
492
+ case "deposit_plus_one_remainder": return plan.remainderDueCount;
493
+ case "deposit_plus_scheduled_instalments":
494
+ case "equal_scheduled_instalments": return plan.intervalCount;
495
+ default: return assertNever$1(plan);
496
+ }
497
+ }
498
+ function omitZeroAmountFutureRows(rows) {
499
+ if (rows.length <= 1) return rows;
500
+ const firstRow = rows[0];
501
+ if (firstRow === void 0) return [];
502
+ return [firstRow, ...rows.slice(1).filter((row) => row.amountCents > 0)];
503
+ }
504
+ function addMonthsPreservingAnchorDay(date, intervalCount) {
505
+ const anchorDay = date.getUTCDate();
506
+ const nextMonth = new Date(Date.UTC(date.getUTCFullYear(), date.getUTCMonth() + intervalCount, 1, date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds(), date.getUTCMilliseconds()));
507
+ const lastDayOfTargetMonth = new Date(Date.UTC(nextMonth.getUTCFullYear(), nextMonth.getUTCMonth() + 1, 0)).getUTCDate();
508
+ nextMonth.setUTCDate(Math.min(anchorDay, lastDayOfTargetMonth));
509
+ return nextMonth;
510
+ }
511
+ function assertNever$1(value) {
512
+ throw new Error(`Unexpected value: ${String(value)}`);
513
+ }
514
+ //#endregion
459
515
  //#region ../core/src/venue-location.ts
460
516
  /** The owner's option and what visitors read are the same words, so the option says what you'll see. */
461
517
  const EVENT_ADDRESS_AFTER_BOOKING_LABEL = "Address shared after booking";
@@ -704,38 +760,6 @@ function invalidRuntimeContext() {
704
760
  return err({ tag: "invalid_mailing_list_runtime_context" });
705
761
  }
706
762
  //#endregion
707
- //#region ../core/src/slug.ts
708
- const REMOVED_CHARACTERS = /['\u2019]/g;
709
- const COMBINING_DIACRITICS = /[\u0300-\u036f]/g;
710
- const SEPARATOR_RUN = /[^a-z0-9]+/g;
711
- const TRAILING_SLUG_SEPARATORS = /[-/]+$/g;
712
- function slugifySegment(text) {
713
- return text.normalize("NFD").replace(COMBINING_DIACRITICS, "").toLowerCase().replace(REMOVED_CHARACTERS, "").replace(SEPARATOR_RUN, "-").replace(/^-+|-+$/g, "");
714
- }
715
- /**
716
- * Convert a string to a URL-safe slug.
717
- *
718
- * Every non-alphanumeric character (underscores included) is a separator and
719
- * collapses to a single hyphen, which keeps output inside the `site_routes`
720
- * slug constraint `^[a-z0-9]+([a-z0-9\-/]*[a-z0-9])?$`.
721
- *
722
- * This is the single slug implementation for the monorepo: block-form and the
723
- * shop admin catalog delegate here rather than keeping their own variants.
724
- *
725
- * @example
726
- * slugify("Initial Consultation") // "initial-consultation"
727
- * slugify("Reiki & Energy Healing") // "reiki-energy-healing"
728
- * slugify("Don't Stop") // "dont-stop"
729
- * slugify("draft_post") // "draft-post"
730
- * slugify("Blog / My Post", { preserveSegments: true }) // "blog/my-post"
731
- */
732
- function slugify(text, options = {}) {
733
- const source = text.toString().trim();
734
- const slug = options.preserveSegments === true ? source.split("/").map(slugifySegment).filter((segment) => segment.length > 0).join("/") : slugifySegment(source);
735
- if (options.maxLength === void 0) return slug;
736
- return slug.slice(0, options.maxLength).replace(TRAILING_SLUG_SEPARATORS, "");
737
- }
738
- //#endregion
739
763
  //#region ../core/src/whole-series-run-schedule.ts
740
764
  /**
741
765
  * A session that is not happening.
@@ -850,6 +874,58 @@ function resolveWholeSeriesPaymentDates(input) {
850
874
  };
851
875
  }
852
876
  //#endregion
877
+ //#region ../core/src/credit-product-nouns.ts
878
+ const CREDIT_PRODUCT_NOUNS = {
879
+ event_pass: {
880
+ product: {
881
+ singular: "pass",
882
+ plural: "passes"
883
+ },
884
+ productTitle: {
885
+ singular: "Pass",
886
+ plural: "Passes"
887
+ },
888
+ unit: {
889
+ singular: "class",
890
+ plural: "classes"
891
+ }
892
+ },
893
+ appointment_package: {
894
+ product: {
895
+ singular: "package",
896
+ plural: "packages"
897
+ },
898
+ productTitle: {
899
+ singular: "Package",
900
+ plural: "Packages"
901
+ },
902
+ unit: {
903
+ singular: "session",
904
+ plural: "sessions"
905
+ }
906
+ }
907
+ };
908
+ function countedNoun(noun, count) {
909
+ return count === 1 ? noun.singular : noun.plural;
910
+ }
911
+ /** "class" or "classes", to follow a number the caller formats. */
912
+ function creditProductUnitNoun(useCase, count) {
913
+ return countedNoun(CREDIT_PRODUCT_NOUNS[useCase].unit, count);
914
+ }
915
+ /** "1 class", "4 sessions". */
916
+ function formatCreditProductUnits(useCase, count) {
917
+ return `${count} ${creditProductUnitNoun(useCase, count)}`;
918
+ }
919
+ /** "4 of 10 sessions left". */
920
+ function formatCreditProductBalance(useCase, balance) {
921
+ return `${balance.remaining} of ${balance.total} ${creditProductUnitNoun(useCase, balance.total)} left`;
922
+ }
923
+ /** Confirmation copy shared by booking screens and editable email wording. */
924
+ function formatCreditProductPayment(input) {
925
+ const used = input.creditsUsed;
926
+ return (used !== void 0 && used !== 0 && !Number.isNaN(used) ? `${used} credit${used === 1 ? "" : "s"} from your ${input.name}` : `Paid with your ${input.name}`) + (input.creditsRemaining === void 0 ? "" : ` (${input.creditsRemaining} left)`);
927
+ }
928
+ //#endregion
853
929
  //#region ../commerce/src/utils/assertNever.ts
854
930
  function assertNever(value, message) {
855
931
  if (message) throw new Error(message);
@@ -1090,30 +1166,38 @@ function repriceBookingCollectionOptions(input) {
1090
1166
  }
1091
1167
  /** The same admission is used for the offer and the submitted selection. */
1092
1168
  function canOfferBookingCollectionOption(option, currency, deadline = option.bookingStartAt) {
1169
+ return collectionDatesOpen(option, deadline) && laterCollectionsChargeable(option, currency);
1170
+ }
1171
+ /** The one date rule: whether an option's due dates still fall between now and the booking (or the owner's deadline). */
1172
+ function collectionDatesOpen(option, deadline) {
1093
1173
  if (option.kind === "upfront" || option.kind === "deferred_manual") return true;
1094
1174
  const window = bookingCollectionWindow(option);
1095
1175
  if (!window) return false;
1096
- const { now, start } = window;
1097
- if (option.kind === "flexible_balance") return flexibleBalanceCanBeCollected(option, currency, now, start);
1176
+ if (option.kind === "flexible_balance") {
1177
+ const localDay = (at) => formatLocalScheduleDate(getLocalScheduleDate(new Date(at), option.timeZone));
1178
+ return option.balanceDueDay >= localDay(window.now) && option.balanceDueDay < localDay(window.start);
1179
+ }
1098
1180
  return deadline !== null && canInstalmentPlanCompleteBefore({
1099
1181
  now: option.anchorAt,
1100
1182
  deadline,
1101
1183
  schedule: option.schedule
1102
- }) && laterInstalmentsCanBeCollected(option, currency, now);
1184
+ }) && option.schedule.every((row) => row.stateAtBooking !== "scheduled" || Date.parse(row.dueAt) > window.now);
1103
1185
  }
1104
- function laterInstalmentsCanBeCollected(option, currency, now) {
1105
- return option.schedule.filter((row) => row.stateAtBooking === "scheduled").every((row) => Date.parse(row.dueAt) > now && !isStripeChargeBelowMinimum({
1106
- amountCents: row.amountCents,
1107
- currency
1108
- }));
1109
- }
1110
- function flexibleBalanceCanBeCollected(option, currency, now, start) {
1111
- const today = formatLocalScheduleDate(getLocalScheduleDate(new Date(now), option.timeZone));
1112
- const startDay = formatLocalScheduleDate(getLocalScheduleDate(new Date(start), option.timeZone));
1113
- return option.balanceDueDay >= today && option.balanceDueDay < startDay && !isStripeChargeBelowMinimum({
1114
- amountCents: option.remainingBalanceCents,
1115
- currency
1116
- });
1186
+ /** The amount rule: every later collection is big enough to charge to a card. */
1187
+ function laterCollectionsChargeable(option, currency) {
1188
+ switch (option.kind) {
1189
+ case "upfront":
1190
+ case "deferred_manual": return true;
1191
+ case "flexible_balance": return !isStripeChargeBelowMinimum({
1192
+ amountCents: option.remainingBalanceCents,
1193
+ currency
1194
+ });
1195
+ case "instalment_plan": return option.schedule.every((row) => row.stateAtBooking !== "scheduled" || !isStripeChargeBelowMinimum({
1196
+ amountCents: row.amountCents,
1197
+ currency
1198
+ }));
1199
+ default: return assertNever(option);
1200
+ }
1117
1201
  }
1118
1202
  function bookingCollectionWindow(option) {
1119
1203
  const now = Date.parse(option.anchorAt);
@@ -1134,33 +1218,17 @@ const SCHEDULE_DATES_TOTAL_CENTS = 1e9;
1134
1218
  */
1135
1219
  function bookingCollectionDatesOpen(option, dates) {
1136
1220
  if (option.kind === "upfront" || option.kind === "deferred_manual") return true;
1137
- const window = bookingCollectionWindow({
1221
+ if (!bookingCollectionWindow({
1138
1222
  anchorAt: dates.nowIso,
1139
1223
  bookingStartAt: dates.bookingStartAt
1140
- });
1141
- if (!window || dates.bookingStartAt === null) return false;
1142
- switch (option.kind) {
1143
- case "flexible_balance": {
1144
- const due = flexibleBalanceDueDay(option.config, dates.bookingStartAt, dates.timeZone);
1145
- const localDay = (at) => formatLocalScheduleDate(getLocalScheduleDate(new Date(at), dates.timeZone));
1146
- return due >= localDay(window.now) && due < localDay(window.start);
1147
- }
1148
- case "instalment_plan": {
1149
- const deadline = dates.instalmentCollectionDeadlineAt === void 0 ? dates.bookingStartAt : dates.instalmentCollectionDeadlineAt;
1150
- if (deadline === null) return false;
1151
- const schedule = buildBookingInstalmentSchedule({
1152
- anchorAt: dates.nowIso,
1153
- totalAmountCents: SCHEDULE_DATES_TOTAL_CENTS,
1154
- plan: option.plan
1155
- });
1156
- return canInstalmentPlanCompleteBefore({
1157
- now: dates.nowIso,
1158
- deadline,
1159
- schedule
1160
- }) && schedule.every((row) => row.stateAtBooking !== "scheduled" || Date.parse(row.dueAt) > window.now);
1161
- }
1162
- default: return assertNever(option);
1163
- }
1224
+ })) return false;
1225
+ return collectionDatesOpen(resolveBookingCollectionOptionFacts({
1226
+ option,
1227
+ totalCents: SCHEDULE_DATES_TOTAL_CENTS,
1228
+ anchorAt: dates.nowIso,
1229
+ bookingStartAt: dates.bookingStartAt,
1230
+ timeZone: dates.timeZone
1231
+ }), dates.instalmentCollectionDeadlineAt === void 0 ? dates.bookingStartAt : dates.instalmentCollectionDeadlineAt);
1164
1232
  }
1165
1233
  /** Mirrors private.flexible_balance_due_day: fixed civil date, or local start minus calendar days. */
1166
1234
  function flexibleBalanceDueDay(config, bookingStartAt, timeZone) {
@@ -1313,6 +1381,15 @@ const ROOM_REFUSAL_REASON_MESSAGES = {
1313
1381
  };
1314
1382
  //#endregion
1315
1383
  //#region ../commerce/src/purchase/event-registration-errors.ts
1384
+ /**
1385
+ * Said to a booker whose earlier booking this one can't replace, because its payment has started (or
1386
+ * can't be checked yet). An unpaid one would just be replaced (#1832). It doesn't hand back the earlier
1387
+ * booking, so it tells them where the answer will come from: the confirmation email, or the organiser.
1388
+ */
1389
+ function earlierBookingUnpaid(subject, otherwise = "") {
1390
+ return `${subject === null ? "You’ve already started paying for an earlier booking, so we can’t take another one." : `You’ve already started paying for ${subject}, so we can’t take another booking for it.`} ${otherwise}If that payment goes through, you’ll get a confirmation email. If you don’t get one, please contact the organiser.`;
1391
+ }
1392
+ earlierBookingUnpaid("this run");
1316
1393
  const eventRegistrationErrors = {
1317
1394
  invalidAnswers: {
1318
1395
  endsCommand: false,
@@ -1440,12 +1517,50 @@ const eventRegistrationErrors = {
1440
1517
  message: "You’ve already started booking this event. Please finish in the other tab if it’s still open, or check your booking status before starting again.",
1441
1518
  action: "portal"
1442
1519
  },
1520
+ /**
1521
+ * The server's own message says which date or run. This one is only shown if that's missing. The
1522
+ * earlier booking still stands, so the command isn't ended.
1523
+ */
1524
+ earlierBookingUnpaid: {
1525
+ endsCommand: false,
1526
+ message: earlierBookingUnpaid(null),
1527
+ action: "retry"
1528
+ },
1529
+ /**
1530
+ * Several dates or runs were chosen where only one can be booked at a time: the event's setting
1531
+ * changed after the form loaded, or the booking uses a waitlist invitation. The server's own message
1532
+ * says which, so this one is only shown if that's missing.
1533
+ */
1534
+ bookOneAtATime: {
1535
+ endsCommand: false,
1536
+ message: "These can’t be booked together. Untick all but one, then book the others separately.",
1537
+ action: "places"
1538
+ },
1443
1539
  invalidCommitInput: {
1444
1540
  endsCommand: false,
1445
1541
  message: "We couldn’t accept your booking details. Please check the information you entered and try again. If this keeps happening, contact the organiser for help.",
1446
1542
  action: "details"
1447
1543
  }
1448
1544
  };
1545
+ /**
1546
+ * The refusals said in the server's own words, because only the server knows what to name. The public
1547
+ * route sends a refusal's reason and never its service tag, so the reason is all a form has to go on.
1548
+ *
1549
+ * - An earlier unpaid booking: the words name the date or run, and say whether there's a date to untick.
1550
+ * - Several chosen where one is allowed: the words say whether it's dates or runs.
1551
+ * - A date or run that filled up while several were being booked: the words name it, so the booker
1552
+ * knows which to untick. One booking has nothing to name, so it keeps the reason's own message.
1553
+ */
1554
+ const serverWordedRefusals = {
1555
+ earlierBookingUnpaid: "always",
1556
+ bookOneAtATime: "always",
1557
+ capacityChanged: "several_bookings"
1558
+ };
1559
+ /** What a refusal says: the server's words where they say more, and the reason's own otherwise or when none came. */
1560
+ function eventRegistrationRefusalMessage(reason, serverMessage, bookings) {
1561
+ const worded = serverWordedRefusals[reason];
1562
+ return (worded === "always" || worded === "several_bookings" && bookings === "several") && serverMessage.trim().length > 0 ? serverMessage : eventRegistrationErrors[reason].message;
1563
+ }
1449
1564
  function parseEventRegistrationErrorReason(value) {
1450
1565
  return typeof value === "string" && Object.prototype.hasOwnProperty.call(eventRegistrationErrors, value) ? value : null;
1451
1566
  }
@@ -2898,7 +3013,7 @@ const headingClassFromAlignment = {
2898
3013
  summary: "Append text alignment class to a base heading class",
2899
3014
  run: (value, options) => {
2900
3015
  const alignClass = (typeof value === "string" && value === "center" ? "center" : "left") === "center" ? "rb-text-center" : "rb-text-left";
2901
- return `${options.base} ${alignClass}`.trim();
3016
+ return `${options.base ?? ""} ${alignClass}`.trim();
2902
3017
  }
2903
3018
  };
2904
3019
  const bodyClassFromAlignment = {
@@ -2907,7 +3022,7 @@ const bodyClassFromAlignment = {
2907
3022
  summary: "Append body alignment helper classes to a base class",
2908
3023
  run: (value, options) => {
2909
3024
  const extra = (typeof value === "string" && value === "center" ? "center" : "left") === "center" ? "rb-mx-auto rb-text-center" : "";
2910
- return `${options.base} ${extra}`.trim();
3025
+ return `${options.base ?? ""} ${extra}`.trim();
2911
3026
  }
2912
3027
  };
2913
3028
  const stackAlignFromAlignment = {
@@ -5562,18 +5677,55 @@ function isBookableEvent(event, now) {
5562
5677
  function hasEventBookingClosedEarly(event, now) {
5563
5678
  return event.bookingClosesAt !== void 0 && hasBookingClosed(event.bookingClosesAt, now);
5564
5679
  }
5680
+ /**
5681
+ * Past its cut-off but not yet started: the window an early cut-off adds. Once
5682
+ * a date has started, the page says that instead.
5683
+ */
5684
+ function isInBookingCutOffWindow(event, now) {
5685
+ return hasEventBookingClosedEarly(event, now) && Date.parse(event.startsAt) > now.getTime();
5686
+ }
5565
5687
  //#endregion
5566
5688
  //#region ../blocks/src/system/runtime/nodes/events/domain/destination.ts
5567
5689
  function isRecord$2(value) {
5568
5690
  return typeof value === "object" && value !== null && !Array.isArray(value);
5569
5691
  }
5570
- function isRuntimeEventDestination(value) {
5571
- if (!isRecord$2(value) || typeof value.kind !== "string") return false;
5572
- if (value.kind === "native") return (value.mode === "cms-managed" || value.mode === "system-managed") && typeof value.path === "string";
5573
- return value.kind === "external" && typeof value.url === "string" && typeof value.label === "string";
5692
+ function isEventDestinationMode(value) {
5693
+ return value === "cms-managed" || value === "system-managed";
5694
+ }
5695
+ function readEventPage(value) {
5696
+ return isRecord$2(value) && isEventDestinationMode(value.mode) && typeof value.path === "string" && value.path.trim().length > 0 ? {
5697
+ mode: value.mode,
5698
+ path: value.path
5699
+ } : null;
5700
+ }
5701
+ /**
5702
+ * A destination from the payload, or null when it isn't one. An external
5703
+ * destination with a malformed `page` keeps linking out, as one without a page
5704
+ * does, rather than being read as booked here.
5705
+ */
5706
+ function readRuntimeEventDestination(value) {
5707
+ if (!isRecord$2(value)) return null;
5708
+ if (value.kind === "native") return isEventDestinationMode(value.mode) && typeof value.path === "string" ? {
5709
+ kind: "native",
5710
+ mode: value.mode,
5711
+ path: value.path
5712
+ } : null;
5713
+ if (value.kind !== "external" || typeof value.url !== "string" || typeof value.label !== "string") return null;
5714
+ const page = readEventPage(value.page);
5715
+ return page ? {
5716
+ kind: "external",
5717
+ url: value.url,
5718
+ label: value.label,
5719
+ page
5720
+ } : {
5721
+ kind: "external",
5722
+ url: value.url,
5723
+ label: value.label
5724
+ };
5574
5725
  }
5575
5726
  function resolveRuntimeEventDestination(event) {
5576
- if (isRuntimeEventDestination(event.destination)) return event.destination;
5727
+ const destination = readRuntimeEventDestination(event.destination);
5728
+ if (destination) return destination;
5577
5729
  return {
5578
5730
  kind: "native",
5579
5731
  mode: event.eventDestinationMode === "system-managed" ? "system-managed" : "cms-managed",
@@ -5581,6 +5733,193 @@ function resolveRuntimeEventDestination(event) {
5581
5733
  };
5582
5734
  }
5583
5735
  //#endregion
5736
+ //#region ../blocks/src/system/runtime/nodes/events/domain/cta.ts
5737
+ /**
5738
+ * Booking call-to-action resolution for events: where an event links to and
5739
+ * what the button says. Sold-out and waitlist decisions come from capacity.ts
5740
+ * so cards, rows and the wizard never disagree.
5741
+ */
5742
+ function closedEventBookingLabel(reason) {
5743
+ switch (reason) {
5744
+ case "occurrence_cancelled":
5745
+ case "series_cancelled": return "Cancelled";
5746
+ case "occurrence_completed":
5747
+ case "series_completed": return "Completed";
5748
+ case "series_draft":
5749
+ case "series_archived":
5750
+ case "parent_archived":
5751
+ case "parent_inconsistent":
5752
+ case "already_started":
5753
+ case "enrollment_closed": return "Registration closed";
5754
+ default: return assertNever$3(reason);
5755
+ }
5756
+ }
5757
+ function outwardLink(url) {
5758
+ return {
5759
+ href: url,
5760
+ target: "_blank",
5761
+ rel: "noopener noreferrer"
5762
+ };
5763
+ }
5764
+ /** The event's own page path, when it has a page (booked here, or booked elsewhere with its own page). */
5765
+ function eventDestinationPagePath(destination) {
5766
+ return destination.kind === "native" ? destination.path : destination.page?.path ?? null;
5767
+ }
5768
+ /**
5769
+ * Where an event's details are: its page when it has one (booked here, or
5770
+ * booked elsewhere with its own page), otherwise the outside link in a new tab.
5771
+ */
5772
+ function eventDestinationPageLink(destination) {
5773
+ switch (destination.kind) {
5774
+ case "native": return { href: destination.path };
5775
+ case "external": return destination.page ? { href: destination.page.path } : outwardLink(destination.url);
5776
+ }
5777
+ }
5778
+ /** Where an event is booked: the outside link (new tab) for any event booked elsewhere, otherwise its page. */
5779
+ function eventDestinationBookingLink(destination) {
5780
+ return destination.kind === "external" ? outwardLink(destination.url) : { href: destination.path };
5781
+ }
5782
+ /** For the title, image, date tiles and calendar cells. */
5783
+ function resolveEventPageLink(event) {
5784
+ return eventDestinationPageLink(resolveRuntimeEventDestination(event));
5785
+ }
5786
+ /** For the Book button. */
5787
+ function resolveEventBookingLink(event) {
5788
+ return eventDestinationBookingLink(resolveRuntimeEventDestination(event));
5789
+ }
5790
+ /**
5791
+ * Resolve the CTA state for an event.
5792
+ * Shared by EventCard and EventCompactRow to keep sold-out, registration-closed,
5793
+ * and course-specific defaults consistent.
5794
+ */
5795
+ function resolveEventCta(event, buttonText) {
5796
+ const isSoldOut = isEventFull(event);
5797
+ const isExternal = resolveRuntimeEventDestination(event).kind === "external";
5798
+ const { href } = resolveEventBookingLink(event);
5799
+ if (event.bookingAvailability.kind === "closed") {
5800
+ const linksToClosedWholeSeriesDetails = event.bookingAvailability.reason === "enrollment_closed" && !isExternal;
5801
+ return {
5802
+ label: closedEventBookingLabel(event.bookingAvailability.reason),
5803
+ href,
5804
+ external: isExternal,
5805
+ hidden: !linksToClosedWholeSeriesDetails
5806
+ };
5807
+ }
5808
+ if (!isExternal && isSoldOut) {
5809
+ if (canJoinEventWaitlistOnAnyMode(event)) return {
5810
+ label: "Join waitlist",
5811
+ href,
5812
+ external: false,
5813
+ hidden: false
5814
+ };
5815
+ return {
5816
+ label: "Sold out",
5817
+ href,
5818
+ external: false,
5819
+ hidden: true
5820
+ };
5821
+ }
5822
+ return destinationCta(event, buttonText);
5823
+ }
5824
+ function destinationCta(event, buttonText) {
5825
+ const destination = resolveRuntimeEventDestination(event);
5826
+ return {
5827
+ label: buttonText ?? (destination.kind === "external" ? destination.label : "Book"),
5828
+ href: resolveEventBookingLink(event).href,
5829
+ external: destination.kind === "external",
5830
+ hidden: false
5831
+ };
5832
+ }
5833
+ /**
5834
+ * A bounded date strip cannot prove a series sold out. Its destination owns date selection,
5835
+ * so the card offers that destination and leaves capacity with the individual date rows.
5836
+ * Whole-series bookings still have one shared capacity, as do ordinary occurrence cards.
5837
+ */
5838
+ function resolveEventCardBooking(event, scope, buttonText, options) {
5839
+ const closedCta = event.bookingAvailability.kind === "closed" ? resolveEventCta(event, buttonText) : renderClockClosedCta(event, options.now);
5840
+ if (scope === "series" && event.bookingScope === "single_occurrence") {
5841
+ const closed = seriesBookingClosed(event);
5842
+ return {
5843
+ cta: closed ? resolveEventCta(event, buttonText) : withoutPage(destinationCta(event, buttonText)),
5844
+ availability: null,
5845
+ closed
5846
+ };
5847
+ }
5848
+ return closedCta ? {
5849
+ cta: closedCta,
5850
+ availability: null,
5851
+ closed: true
5852
+ } : {
5853
+ cta: withoutPage(resolveEventCta(event, buttonText)),
5854
+ availability: occurrenceCardAvailability(event, options.count),
5855
+ closed: false
5856
+ };
5857
+ }
5858
+ /** A native card with no page yet can't invite booking: there is nowhere to send the visitor. */
5859
+ function withoutPage(cta) {
5860
+ return !cta.external && !cta.hidden && cta.href === "" ? {
5861
+ ...cta,
5862
+ label: "Details coming soon",
5863
+ hidden: true
5864
+ } : cta;
5865
+ }
5866
+ /** Only a series-wide closure closes its card; a cancelled or started date says nothing about later dates. */
5867
+ function seriesBookingClosed(event) {
5868
+ if (event.bookingAvailability.kind !== "closed") return false;
5869
+ switch (event.bookingAvailability.reason) {
5870
+ case "occurrence_cancelled":
5871
+ case "occurrence_completed":
5872
+ case "already_started": return false;
5873
+ case "series_cancelled":
5874
+ case "series_completed":
5875
+ case "series_draft":
5876
+ case "series_archived":
5877
+ case "parent_archived":
5878
+ case "parent_inconsistent":
5879
+ case "enrollment_closed": return true;
5880
+ default: return assertNever$3(event.bookingAvailability.reason);
5881
+ }
5882
+ }
5883
+ function occurrenceCardAvailability(event, count) {
5884
+ const label = formatEventRemainingPlaces(event, {
5885
+ full: "Sold out",
5886
+ count
5887
+ });
5888
+ const availability = getEventAvailabilityStatus(event);
5889
+ return label ? {
5890
+ label,
5891
+ status: availability.isFull ? "full" : availability.status === "filling" ? "low" : "available"
5892
+ } : null;
5893
+ }
5894
+ /** Preserve projected closure reasons; only an open native booking needs its clock rechecked. */
5895
+ function renderClockClosedCta(event, now) {
5896
+ if (!now || event.destination.kind !== "native") return null;
5897
+ if (event.bookingScope !== "whole_series") return hasEventBookingClosedEarly(event, now) ? {
5898
+ label: "Registration closed",
5899
+ href: resolveEventBookingLink(event).href,
5900
+ external: false,
5901
+ hidden: true
5902
+ } : null;
5903
+ const phase = resolveWholeSeriesBookingPhase(event.run, now);
5904
+ if (phase.kind === "open") return null;
5905
+ return {
5906
+ label: (() => {
5907
+ switch (phase.reason) {
5908
+ case "cancelled": return "Cancelled";
5909
+ case "completed": return "Completed";
5910
+ case "in-progress":
5911
+ case "bookings-closed":
5912
+ case "enrolment-closed":
5913
+ case "no-sessions": return "Registration closed";
5914
+ default: return assertNever$3(phase.reason);
5915
+ }
5916
+ })(),
5917
+ href: resolveEventBookingLink(event).href,
5918
+ external: false,
5919
+ hidden: phase.reason !== "enrolment-closed" && phase.reason !== "bookings-closed"
5920
+ };
5921
+ }
5922
+ //#endregion
5584
5923
  //#region ../blocks/src/system/runtime/nodes/events/domain/location.ts
5585
5924
  /** The name in a venue's place: its own, or the owner's word that the address follows the booking. */
5586
5925
  function eventPlaceName(event) {
@@ -6552,7 +6891,7 @@ function deriveBookingFormViewState(input) {
6552
6891
  kind: "success",
6553
6892
  resourceName: input.verificationState.resourceName
6554
6893
  };
6555
- default: return assertNever$1(input.verificationState);
6894
+ default: return assertNever$2(input.verificationState);
6556
6895
  }
6557
6896
  }
6558
6897
  function resolveBookingSiteId(siteId, form) {
@@ -6938,7 +7277,7 @@ function formatBookingSubmissionPreparationError(error) {
6938
7277
  case "sliding-amount-out-of-range": return `Please choose an amount within the sliding scale for "${error.serviceTitle}".`;
6939
7278
  case "payment-option-unsupported": return `Service "${error.serviceTitle}" has a payment option that is not supported yet.`;
6940
7279
  case "service-missing-duration": return `Service "${error.serviceTitle}" is missing duration. Please update the service in the dashboard to include a duration (e.g., 30 minutes).`;
6941
- default: return assertNever$1(error);
7280
+ default: return assertNever$2(error);
6942
7281
  }
6943
7282
  }
6944
7283
  const DEFAULT_BOOKING_SUCCESS_COPY = {
@@ -7413,6 +7752,14 @@ function isOrdinaryPublicEvent(event) {
7413
7752
  return event.bookingScope === "single_occurrence";
7414
7753
  }
7415
7754
  /**
7755
+ * A date people come to without booking. An event booked on another website is
7756
+ * also saved with no booking here, but its visitors do book, just elsewhere, so
7757
+ * it is never a drop-in.
7758
+ */
7759
+ function isDropInPublicEvent(event) {
7760
+ return event.bookingScope === "single_occurrence" && !event.requiresRegistration && event.destination.kind !== "external";
7761
+ }
7762
+ /**
7416
7763
  * What a series' own page shows when its URL names no date.
7417
7764
  *
7418
7765
  * Two or more dates a visitor can book make a choice: the page lists every
@@ -7595,7 +7942,7 @@ function planDropInPanel(selection) {
7595
7942
  }
7596
7943
  function getPublicEventCanonicalPath(event) {
7597
7944
  if (event.path) return event.path;
7598
- return event.destination.kind === "native" ? event.destination.path : null;
7945
+ return eventDestinationPagePath(event.destination);
7599
7946
  }
7600
7947
  function eventOccurrenceContext(event) {
7601
7948
  return {
@@ -7611,7 +7958,7 @@ function eventOccurrenceContext(event) {
7611
7958
  function registrationDataForEventSelection(selection) {
7612
7959
  switch (selection.kind) {
7613
7960
  case "occurrence": return {
7614
- events: [selection.event],
7961
+ events: [selection.event, ...selection.additionalDates ?? []],
7615
7962
  occurrenceContext: eventOccurrenceContext(selection.event),
7616
7963
  subject: null
7617
7964
  };
@@ -7758,7 +8105,11 @@ function resolveEventRegistrationChoices(events, context, now) {
7758
8105
  const runs = groupPublicEventsByRun(scoped);
7759
8106
  if (context.occurrenceContext || context.subject?.kind === "eventSeries" && context.subject.bookingScope === "whole_series" || runs.length === 1 && scoped.every((event) => event.bookingScope === "whole_series")) return scoped;
7760
8107
  const eligibleRunIds = new Set(runs.filter((group) => resolveWholeSeriesChooserEligibility(group, now).kind === "eligible").map((group) => group.eventSeriesId));
7761
- return scoped.filter((event) => event.bookingScope === "whole_series" ? eligibleRunIds.has(event.seriesId) : Date.parse(event.startsAt) > now.getTime() && !hasEventBookingClosedEarly(event, now));
8108
+ return scoped.filter((event) => event.bookingScope === "whole_series" ? eligibleRunIds.has(event.seriesId) : isUpcomingDateChoice(event, now));
8109
+ }
8110
+ /** A date a new booking can still choose: it hasn't started and its bookings haven't closed. */
8111
+ function isUpcomingDateChoice(event, now) {
8112
+ return Date.parse(event.startsAt) > now.getTime() && !hasEventBookingClosedEarly(event, now);
7762
8113
  }
7763
8114
  //#endregion
7764
8115
  //#region ../blocks/src/system/runtime/nodes/event-registration/closedEarlyCopy.ts
@@ -7787,7 +8138,10 @@ function openRunBookingLine(run) {
7787
8138
  /** One date between its cut-off and its start, or null. */
7788
8139
  function closedDateCopy(event, now) {
7789
8140
  const closesAt = event.bookingClosesAt;
7790
- if (!closesAt || !hasBookingClosed(closesAt, now) || Date.parse(event.startsAt) <= now.getTime()) return null;
8141
+ return closesAt && isInBookingCutOffWindow(event, now) ? cutOffDateCopy(event, closesAt) : null;
8142
+ }
8143
+ /** What a date past its cut-off says: when bookings closed, and how long before the start. */
8144
+ function cutOffDateCopy(event, closesAt) {
7791
8145
  const zone = eventTimeZone(event);
7792
8146
  const closed = formatBookingClosedTime(closesAt, event.startsAt, zone);
7793
8147
  const start = formatBookingClosedTime(event.startsAt, event.startsAt, zone);
@@ -7799,6 +8153,34 @@ function closedDateCopy(event, now) {
7799
8153
  otherDatesHref: weekly ? eventOwnPagePath(event) : null
7800
8154
  };
7801
8155
  }
8156
+ /**
8157
+ * What a date booked on another website says once it has closed, as decided by
8158
+ * `bookedElsewhereDateClosure`. There's no booking form here to say so, and the
8159
+ * outward button mustn't stand in for it.
8160
+ */
8161
+ function bookElsewhereDateCopy(event, closure) {
8162
+ const weekly = isWeekly(event);
8163
+ const otherDatesHref = weekly ? eventOwnPagePath(event) : null;
8164
+ const closedTitle = weekly ? "Bookings for this date have closed" : "Bookings for this event have closed";
8165
+ switch (closure.kind) {
8166
+ case "cutOff": return cutOffDateCopy(event, closure.closesAt);
8167
+ case "finished": return {
8168
+ titleText: weekly ? "This date has finished" : "This event has finished",
8169
+ bodyText: "The details are kept here for reference.",
8170
+ otherDatesHref
8171
+ };
8172
+ case "started": return {
8173
+ titleText: closedTitle,
8174
+ bodyText: "Bookings closed when it started. The organiser may still be able to help if you’d like to come.",
8175
+ otherDatesHref
8176
+ };
8177
+ case "notTaking": return {
8178
+ titleText: closedTitle,
8179
+ bodyText: "Bookings aren’t being taken at the moment.",
8180
+ otherDatesHref
8181
+ };
8182
+ }
8183
+ }
7802
8184
  /** The body of a course past its cut-off, or null if the run doesn't say when. */
7803
8185
  function closedRunBody(run) {
7804
8186
  const first = orderedLiveRunSessions(run.sessions)[0];
@@ -7849,13 +8231,44 @@ function closedRunCopy(reason, run) {
7849
8231
  function closedDatesCopy(dates, now) {
7850
8232
  if (dates.some((date) => Date.parse(date.startsAt) > now.getTime() && !(date.bookingClosesAt && hasBookingClosed(date.bookingClosesAt, now)))) return null;
7851
8233
  const [firstClosed] = dates.flatMap((date) => closedDateCopy(date, now) ?? []);
7852
- if (!firstClosed) return null;
8234
+ return firstClosed ? closedDateListCopy(dates.length, firstClosed) : null;
8235
+ }
8236
+ /** A closed list of dates: one date says its own cut-off; several share the run's line. */
8237
+ function closedDateListCopy(dateCount, firstCutOff) {
7853
8238
  return {
7854
- ...dates.length > 1 ? copy["bookings-closed"] : firstClosed,
8239
+ ...dateCount > 1 ? copy["bookings-closed"] : firstCutOff,
7855
8240
  otherDatesHref: null
7856
8241
  };
7857
8242
  }
7858
8243
  //#endregion
8244
+ //#region ../blocks/src/system/runtime/api/creditProducts.ts
8245
+ function useCasesFromModules(modules) {
8246
+ if (!modules) return [];
8247
+ return [...modules.events ? ["event_pass"] : [], ...modules.appointments ? ["appointment_package"] : []];
8248
+ }
8249
+ function deriveUseCases(products, modules) {
8250
+ if (products.length > 0) return products.map((product) => product.productUseCase);
8251
+ return useCasesFromModules(modules);
8252
+ }
8253
+ function deriveCreditProductLabels(products, options = {}) {
8254
+ const style = options.style ?? "generic";
8255
+ const useCases = deriveUseCases(products, options.modules);
8256
+ const hasEventPass = useCases.includes("event_pass");
8257
+ const hasAppointmentPackage = useCases.includes("appointment_package");
8258
+ if (hasEventPass && hasAppointmentPackage) return {
8259
+ heading: "Passes & Packages",
8260
+ emptyMessage: "You don't have any passes or packages yet."
8261
+ };
8262
+ if (hasAppointmentPackage) return {
8263
+ heading: style === "class" ? "Appointment Packages" : "Packages",
8264
+ emptyMessage: "You don't have any packages yet."
8265
+ };
8266
+ return {
8267
+ heading: style === "class" ? "Class Passes" : "Passes",
8268
+ emptyMessage: "You don't have any passes yet."
8269
+ };
8270
+ }
8271
+ //#endregion
7859
8272
  //#region ../blocks/src/system/runtime/nodes/shop-commerce.shared.ts
7860
8273
  const EMPTY_COMMERCE_CART_STATE = { items: [] };
7861
8274
  const storedProductCartItemSchema = z.object({
@@ -8315,7 +8728,7 @@ function capacityPlacesLabel(source, display, wording) {
8315
8728
  case "low": return formatRemainingPlaces(source, wording);
8316
8729
  case "unlimited": return wording.unlimited ?? null;
8317
8730
  case "open": return wording.open ?? null;
8318
- default: return assertNever$2(remaining);
8731
+ default: return assertNever$3(remaining);
8319
8732
  }
8320
8733
  }
8321
8734
  function hybridPlacesLabel(event, display, wording) {
@@ -8798,6 +9211,26 @@ function courseSchedule(sessions, siteTimeZone, deliveryMode) {
8798
9211
  return `${sessions.length} sessions · ${firstLabel} – ${lastLabel}`;
8799
9212
  }
8800
9213
  /**
9214
+ * A course run's schedule as a row in the list of runs shows it, one line
9215
+ * each: how many sessions, then the span with its times ("Wed 6 Jan – Wed 27
9216
+ * Jan, 6:30pm–8pm"). The times are the first session's; a run's sessions
9217
+ * usually share them.
9218
+ */
9219
+ function formatRunScheduleLines(event) {
9220
+ if (event.registrationSubject.kind !== "wholeSeries") return [];
9221
+ const { sessions } = event.registrationSubject;
9222
+ const first = sessions[0];
9223
+ if (!first) return [];
9224
+ const last = sessions[sessions.length - 1] ?? first;
9225
+ const at = (session) => ({
9226
+ ...session,
9227
+ siteTimeZone: event.siteTimeZone,
9228
+ deliveryMode: event.deliveryMode
9229
+ });
9230
+ const days = sessions.length === 1 ? formatBookingWhen(at(first), "day") : `${formatBookingWhen(at(first), "day")} – ${formatBookingWhen(at(last), "day")}`;
9231
+ return [sessions.length === 1 ? "1 session" : `${sessions.length} sessions`, `${days}, ${formatBookingWhen(at(first), "timeRange")}`];
9232
+ }
9233
+ /**
8801
9234
  * When a booking happens, in one line: the occurrence's date and time, or a
8802
9235
  * course's session count and first and last dates. The default retains the
8803
9236
  * stored end time; an explicitly requested `short` variant shows the start.
@@ -9382,7 +9815,7 @@ function sameOffering(events) {
9382
9815
  }
9383
9816
  function registrationSelectionMode(input) {
9384
9817
  const { events } = input;
9385
- if (input.hasPreSelectedContext || events.length < 2) return SINGLE;
9818
+ if (events.length < 2) return SINGLE;
9386
9819
  if (events.some((event) => event.rooms)) return SINGLE;
9387
9820
  if (!events.every((event) => event.allowsMultipleBooking)) return SINGLE;
9388
9821
  const firstSeriesId = events[0]?.seriesId;
@@ -9523,15 +9956,15 @@ function severalConfirmationSentence(kind, email) {
9523
9956
  }
9524
9957
  const SEVERAL_BOOKINGS_ACCOUNT_NOTE = "You can see and manage your bookings in your account.";
9525
9958
  /**
9526
- * What several items can't use. Runs can't use passes, memberships, or the
9527
- * first run's deposit or instalments. Dates can use a pass or membership
9528
- * (issue 1767, set 6), which the payment step's own options explain, so only a
9529
- * deposit or instalments need saying; otherwise there's no note.
9959
+ * What several items can't use. Runs can't use passes or memberships. Dates
9960
+ * can (issue 1767, set 6), and the payment step's own options explain them, so
9961
+ * there's no note. A deposit or instalments never get this far: an event that
9962
+ * offers one doesn't book several (decision 6).
9530
9963
  */
9531
- function selectionEntitlementNote(kind, hadDepositOrInstalments) {
9964
+ function selectionEntitlementNote(kind) {
9532
9965
  switch (kind) {
9533
- case "dates": return hadDepositOrInstalments ? "Deposits and instalments can be used when you book one date at a time." : null;
9534
- case "runs": return `${hadDepositOrInstalments ? "Deposits, instalments, class passes and memberships" : "Class passes and memberships"} can be used when you book one run at a time.`;
9966
+ case "dates": return null;
9967
+ case "runs": return "Class passes and memberships can be used when you book one run at a time.";
9535
9968
  }
9536
9969
  }
9537
9970
  const NO_RUN_PRICING_CHOICES = {};
@@ -9616,13 +10049,21 @@ function incompleteRunChoiceMessage(input) {
9616
10049
  * item offers, and an item that only runs one way decides it. Items with no
9617
10050
  * way in common can't be booked together.
9618
10051
  */
10052
+ const ATTENDANCE_CHOICE_MESSAGE = "Choose whether you want to attend in person or online.";
10053
+ /**
10054
+ * The visitor still has to say how they'll attend. Places and prices depend
10055
+ * on it, so nothing is quoted until they have.
10056
+ */
10057
+ function attendanceChoicePending(attendance, selected) {
10058
+ return attendance.kind === "choose" && resolveSelectionAttendanceMode(attendance, selected) === null;
10059
+ }
9619
10060
  /**
9620
10061
  * What several runs still need before the tickets step can go on: one way
9621
10062
  * of attending for them all, then a usable ticket or amount for each run.
9622
10063
  */
9623
10064
  function severalRunsChoiceMessage(input) {
9624
10065
  if (input.attendance.kind === "incompatible") return INCOMPATIBLE_ATTENDANCE_MESSAGE;
9625
- if (input.attendance.kind === "choose" && input.facts.attendanceMode === null) return "Choose whether you want to attend in person or online.";
10066
+ if (attendanceChoicePending(input.attendance, input.facts.attendanceMode)) return ATTENDANCE_CHOICE_MESSAGE;
9626
10067
  return incompleteRunChoiceMessage(input);
9627
10068
  }
9628
10069
  function selectionTicketInputs(input) {
@@ -9766,24 +10207,6 @@ function itemPriceCents(input, event) {
9766
10207
  function selectionItemPrice(input) {
9767
10208
  return (event) => itemPriceCents(input, event);
9768
10209
  }
9769
- function decideSelectionPayment(input) {
9770
- const several = severalItemsOf(input.selection);
9771
- if (several === null) return { kind: "one-item" };
9772
- return {
9773
- kind: "several",
9774
- due: selectionCostsNothing(several, input) ? "nothing" : "card"
9775
- };
9776
- }
9777
- function selectionCostsNothing(several, input) {
9778
- switch (several) {
9779
- case "runs": return input.selection.every((run) => runUnitPriceCents(run, runPricingChoice(input.runChoices, run)) === 0);
9780
- case "dates": {
9781
- const first = input.selection[0];
9782
- if (input.eligibility) return input.eligibility.isFree;
9783
- return first !== void 0 && publicEventPricingType(first.pricing) === "free";
9784
- }
9785
- }
9786
- }
9787
10210
  //#endregion
9788
10211
  //#region ../blocks/src/system/runtime/nodes/event-registration/registrationPaymentReturn.ts
9789
10212
  /** On an event with rooms, what was asked for: the room lines come from placement, not from here. */
@@ -10289,48 +10712,6 @@ function buildBookingInstalmentCadenceLabel(plan) {
10289
10712
  return interval === 1 ? unit : `every ${interval} ${unit}`;
10290
10713
  }
10291
10714
  //#endregion
10292
- //#region ../blocks/src/system/runtime/nodes/event-registration/bookingCalendar.ts
10293
- /** Public schedule plus the authorised outcome's arrival text; online access stays in email. */
10294
- function bookingCalendar(event, outcome) {
10295
- if (!event) return null;
10296
- const { identity } = outcome;
10297
- const sessions = event.registrationSubject.kind === "wholeSeries" ? event.registrationSubject.sessions : [{
10298
- occurrenceId: event.registrationSubject.occurrenceId,
10299
- startsAt: event.startsAt,
10300
- endsAt: event.endsAt
10301
- }];
10302
- const bookingId = identity.scope === "occurrence" ? identity.attendeeId : identity.registrationId;
10303
- const entries = sessions.map((session) => ({
10304
- uid: `booking-${bookingId}-${session.occurrenceId}@riverbankcms.com`,
10305
- sequence: 0,
10306
- title: event.title,
10307
- startsAt: new Date(session.startsAt),
10308
- endsAt: new Date(session.endsAt),
10309
- timezone: "UTC",
10310
- status: "confirmed",
10311
- location: identity.attendanceMode === "online" ? "Online" : outcome.arrivalVenues?.[session.occurrenceId] ?? event.venue?.name,
10312
- description: identity.attendanceMode === "online" ? "See your confirmation email for joining instructions." : void 0
10313
- }));
10314
- const first = entries[0];
10315
- if (!first) return null;
10316
- const common = {
10317
- fileName: `${slugify(event.title) || "event"}.ics`,
10318
- feed: {
10319
- timezone: "UTC",
10320
- entries
10321
- }
10322
- };
10323
- return entries.length === 1 ? {
10324
- ...common,
10325
- kind: "single",
10326
- ...calendarLinks(first)
10327
- } : {
10328
- ...common,
10329
- kind: "sessions",
10330
- sessionCount: entries.length
10331
- };
10332
- }
10333
- //#endregion
10334
10715
  //#region ../blocks/src/system/runtime/nodes/event-registration/registrationEventAdapter.ts
10335
10716
  function toRegistrationEvent(event) {
10336
10717
  return {
@@ -10404,7 +10785,7 @@ function confirmationPaymentRows(payment) {
10404
10785
  case "none": return [];
10405
10786
  case "settled": return payment.rows;
10406
10787
  case "due": return [...payment.paidRows, payment.amountDueRow];
10407
- default: return assertNever$2(payment);
10788
+ default: return assertNever$3(payment);
10408
10789
  }
10409
10790
  }
10410
10791
  function row(label, value) {
@@ -10416,20 +10797,21 @@ function row(label, value) {
10416
10797
  function placesLabel(count) {
10417
10798
  return count === 1 ? "1 place" : `${count} places`;
10418
10799
  }
10419
- function duePayment(balance, currency, paidRows, instructions) {
10800
+ function duePayment(balance, currency, paidRows, instructions, dueDay) {
10801
+ const amount = formatPrice(balance.amountCents, currency);
10420
10802
  return {
10421
10803
  kind: "due",
10422
10804
  paidRows,
10423
10805
  amountDueRow: {
10424
10806
  label: "Still to pay",
10425
- value: formatPrice(balance.amountCents, currency)
10807
+ value: balance.dueAt !== null && dueDay ? `${amount} by ${dueDay(balance.dueAt)}` : amount
10426
10808
  },
10427
10809
  instructions
10428
10810
  };
10429
10811
  }
10430
10812
  /** Every evidenced debt carries its required amount row, independently of success prose. */
10431
- function presentConfirmationPayment(payment) {
10432
- const presentation = presentPayment(payment);
10813
+ function presentConfirmationPayment(payment, dueDay = null) {
10814
+ const presentation = presentPayment(payment, dueDay);
10433
10815
  if (!payment.discount) return presentation;
10434
10816
  const discountRow = {
10435
10817
  label: `Discount code ${payment.discount.code}`,
@@ -10450,32 +10832,62 @@ function presentConfirmationPayment(payment) {
10450
10832
  };
10451
10833
  }
10452
10834
  }
10453
- function presentPayment(payment) {
10835
+ function presentPayment(payment, dueDay) {
10454
10836
  switch (payment.kind) {
10455
- case "free":
10837
+ case "free": return {
10838
+ kind: "settled",
10839
+ rows: row("Payment", "Free")
10840
+ };
10456
10841
  case "waived": return {
10457
10842
  kind: "settled",
10458
- rows: []
10843
+ rows: row("Payment", "Nothing to pay")
10459
10844
  };
10460
10845
  case "pass": return presentPassPayment(payment);
10461
10846
  case "membership": return {
10462
10847
  kind: "settled",
10463
10848
  rows: row("Paid with", payment.membershipName?.trim() || "Membership")
10464
10849
  };
10465
- case "manual_due": return duePayment(payment.balance, payment.currency, [], OFFLINE_BOOKING_PAYMENT_INSTRUCTIONS);
10850
+ case "manual_due": return duePayment(payment.balance, payment.currency, [], paymentInstructions(payment), dueDay);
10466
10851
  case "monetary":
10467
10852
  case "managed_balance_due": {
10468
10853
  const paidRows = row("Paid", payment.amountPaidCents > 0 ? formatPrice(payment.amountPaidCents, payment.currency) : null);
10469
10854
  return payment.balance.kind === "settled" ? {
10470
10855
  kind: "settled",
10471
10856
  rows: paidRows
10472
- } : duePayment(payment.balance, payment.currency, paidRows, payment.kind === "monetary" && payment.paymentMethod === "manual" ? OFFLINE_BOOKING_PAYMENT_INSTRUCTIONS : null);
10857
+ } : duePayment(payment.balance, payment.currency, paidRows, paymentInstructions(payment), dueDay);
10473
10858
  }
10474
- default: return assertNever$2(payment);
10859
+ default: return assertNever$3(payment);
10475
10860
  }
10476
10861
  }
10862
+ /** How to pay what's still owed: only money paid to the organiser directly has instructions. */
10863
+ function paymentInstructions(payment) {
10864
+ return payment.kind === "manual_due" || payment.kind === "monetary" && payment.paymentMethod === "manual" ? OFFLINE_BOOKING_PAYMENT_INSTRUCTIONS : null;
10865
+ }
10866
+ function isOwed(payment) {
10867
+ return payment.balance.kind === "due" && "currency" in payment;
10868
+ }
10869
+ /**
10870
+ * What several bookings still owe in all, worded as one booking's debt is:
10871
+ * the dates paid by card, pass or membership owe nothing, so only the rest
10872
+ * count. Nothing's said when a date's details didn't load, so the total is
10873
+ * never short, and a due date is given only when every debt shares it.
10874
+ */
10875
+ function severalOwed(outcomes, dueDay) {
10876
+ const owed = (detailedPayments(outcomes) ?? []).filter(isOwed);
10877
+ const [first] = owed;
10878
+ if (!first || owed.some((payment) => payment.currency !== first.currency)) return { kind: "none" };
10879
+ const amountCents = parsePositiveCents(owed.reduce((sum, payment) => sum + payment.balance.amountCents, 0));
10880
+ if (!amountCents.ok) return { kind: "none" };
10881
+ const dueAt = owed.every((payment) => payment.balance.dueAt === first.balance.dueAt) ? first.balance.dueAt : null;
10882
+ const instructions = owed.map(paymentInstructions).find((text) => text !== null) ?? null;
10883
+ return duePayment({
10884
+ kind: "due",
10885
+ amountCents: amountCents.value,
10886
+ dueAt
10887
+ }, first.currency, [], instructions, dueDay);
10888
+ }
10477
10889
  /** Places and payment, only when the outcome carries the booking's details. */
10478
- function outcomeFacts(outcome) {
10890
+ function outcomeFacts(outcome, dueDay) {
10479
10891
  switch (outcome.kind) {
10480
10892
  case "detailsUnavailable": return {
10481
10893
  places: null,
@@ -10487,10 +10899,10 @@ function outcomeFacts(outcome) {
10487
10899
  return {
10488
10900
  places,
10489
10901
  rows: row("Places", places === null ? null : String(places)),
10490
- payment: presentConfirmationPayment(outcome.payment)
10902
+ payment: presentConfirmationPayment(outcome.payment, dueDay)
10491
10903
  };
10492
10904
  }
10493
- default: return assertNever$2(outcome);
10905
+ default: return assertNever$3(outcome);
10494
10906
  }
10495
10907
  }
10496
10908
  function scheduleRows(event, when, where, display) {
@@ -10537,7 +10949,7 @@ function oneBooking(result, context) {
10537
10949
  const { identity } = result.outcome;
10538
10950
  const event = findBookedEvent(context.events, identity);
10539
10951
  const dates = entryFacts(event);
10540
- const facts = outcomeFacts(result.outcome);
10952
+ const facts = outcomeFacts(result.outcome, eventDueDay(event));
10541
10953
  const totalPlaces = completedBookingPlaces(context.completedOutcomes, identity);
10542
10954
  const where = identity.attendanceMode === "online" ? "none" : "venue";
10543
10955
  const arrival = identity.attendanceMode === "in_person" && context.display.venue === "shown" ? [...new Set(Object.values(result.outcome.arrivalVenues ?? {}))].join("\n\n") : "";
@@ -10576,17 +10988,28 @@ function severalBookings(result, outcomes, context) {
10576
10988
  ...placesOnEachRow(several, outcomes),
10577
10989
  ...severalFundingRow(outcomes)
10578
10990
  ],
10579
- payment: withSubmissionPayment({ kind: "none" }, result.submissionPayment),
10991
+ payment: withSubmissionPayment(severalOwed(outcomes, eventDueDay(firstEvent(outcomes, context))), result.submissionPayment),
10580
10992
  calendar: null,
10581
10993
  several,
10582
10994
  creditsLeftSentence: creditsLeftSentence(outcomes, result.passCreditsRemaining)
10583
10995
  };
10584
10996
  }
10997
+ /** A balance's due day in the booked event's own dates. */
10998
+ function eventDueDay(event) {
10999
+ return event ? (dueAt) => formatBookingWhen({
11000
+ ...event,
11001
+ startsAt: dueAt,
11002
+ endsAt: null
11003
+ }, "day") : null;
11004
+ }
11005
+ function firstEvent(outcomes, context) {
11006
+ return outcomes[0] ? findBookedEvent(context.events, outcomes[0].identity) : null;
11007
+ }
10585
11008
  /** "3 dates from Mon 9 Nov" on the card and bar, with the first booking's places. */
10586
11009
  function severalEntry(several, outcomes, first, context) {
10587
- const firstEvent = outcomes[0] ? findBookedEvent(context.events, outcomes[0].identity) : null;
11010
+ const event = firstEvent(outcomes, context);
10588
11011
  const count = `${outcomes.length} ${several === "runs" ? "runs" : "dates"}`;
10589
- const when = firstEvent ? `${count} from ${formatBookingWhen(firstEvent, "day")}` : count;
11012
+ const when = event ? `${count} from ${formatBookingWhen(event, "day")}` : count;
10590
11013
  return {
10591
11014
  ...first,
10592
11015
  when,
@@ -10642,13 +11065,13 @@ function fundingGroup(payment) {
10642
11065
  case "store_credit": return "paid with account credit";
10643
11066
  case "mixed": return "paid by card and account credit";
10644
11067
  case "manual": return null;
10645
- default: return assertNever$2(payment.paymentMethod);
11068
+ default: return assertNever$3(payment.paymentMethod);
10646
11069
  }
10647
11070
  case "free":
10648
11071
  case "waived": return "free of charge";
10649
11072
  case "manual_due":
10650
11073
  case "managed_balance_due": return null;
10651
- default: return assertNever$2(payment);
11074
+ default: return assertNever$3(payment);
10652
11075
  }
10653
11076
  }
10654
11077
  function detailedPayments(outcomes) {
@@ -10725,7 +11148,7 @@ function resolveFinishedPresentation(presentation, context) {
10725
11148
  case "paymentStatus":
10726
11149
  case "paymentFailed":
10727
11150
  case "error": return presentation;
10728
- default: return assertNever$2(presentation);
11151
+ default: return assertNever$3(presentation);
10729
11152
  }
10730
11153
  }
10731
11154
  /** Entitlement confirmations name what was spent and the balance, when supplied. */
@@ -11062,7 +11485,7 @@ function findPreSelectedEvent(input) {
11062
11485
  startsAt: occurrenceContext.startsAt,
11063
11486
  timeZone: occurrenceContext.timeZone
11064
11487
  }));
11065
- return input.scopedEvents.find((event) => eventMatchesOccurrenceId(event, occurrenceContext.id) || getBookingLocalDateKey(toScheduledBookingDateTime({
11488
+ return input.scopedEvents.find((event) => eventMatchesOccurrenceId(event, occurrenceContext.id)) ?? input.scopedEvents.find((event) => getBookingLocalDateKey(toScheduledBookingDateTime({
11066
11489
  startsAt: event.startsAt,
11067
11490
  timeZone: event.timeZone
11068
11491
  })) === contextDate) ?? null;
@@ -11143,7 +11566,7 @@ function findClaimEvent(subject, events) {
11143
11566
  switch (subject.kind) {
11144
11567
  case "event_occurrence": return findEventByOccurrenceId(events, subject.occurrenceId);
11145
11568
  case "whole_series": return events.find((event) => event.registrationSubject.kind === "wholeSeries" && event.registrationSubject.eventSeriesId === subject.eventSeriesId) ?? null;
11146
- default: return assertNever$1(subject);
11569
+ default: return assertNever$2(subject);
11147
11570
  }
11148
11571
  }
11149
11572
  /** Reserved quantities and amounts have one interpretation across restoration and submission. */
@@ -11159,7 +11582,7 @@ function claimedPlaces(subject) {
11159
11582
  ticketSelections: subject.ticketSelections,
11160
11583
  slidingAmountInput: subject.selectedSlidingAmount === null ? null : formatCentsAsCurrencyInput(subject.selectedSlidingAmount)
11161
11584
  };
11162
- default: return assertNever$1(subject);
11585
+ default: return assertNever$2(subject);
11163
11586
  }
11164
11587
  }
11165
11588
  /** The tickets they're booking: the reserved ones, or what they've chosen for the places held. */
@@ -11275,7 +11698,7 @@ function editRegistrationDraft(draft, edit) {
11275
11698
  ...draft,
11276
11699
  selectedSlidingAmountInput: updated(draft.selectedSlidingAmountInput, edit.value)
11277
11700
  };
11278
- default: return assertNever$1(edit);
11701
+ default: return assertNever$2(edit);
11279
11702
  }
11280
11703
  }
11281
11704
  /** Ready invitations own their reserved selection; identity fields remain editable. */
@@ -11337,10 +11760,96 @@ function invitationSubmission(invitation) {
11337
11760
  kind: "blocked",
11338
11761
  message: invitation.message
11339
11762
  };
11340
- default: return assertNever$1(invitation);
11763
+ default: return assertNever$2(invitation);
11341
11764
  }
11342
11765
  }
11343
11766
  //#endregion
11767
+ //#region ../blocks/src/system/runtime/nodes/event-registration/registrationEntry.ts
11768
+ function decideRegistrationEntry(input) {
11769
+ const event = findPreSelectedEvent({
11770
+ scopedEvents: input.events,
11771
+ occurrenceContext: input.occurrenceContext
11772
+ });
11773
+ if (!input.occurrenceContext && !event) return {
11774
+ kind: "chooseEvent",
11775
+ choices: input.events
11776
+ };
11777
+ if (input.offer === "eventsAsGiven") return {
11778
+ kind: "pageDate",
11779
+ event,
11780
+ choices: input.events
11781
+ };
11782
+ if (!event) return {
11783
+ kind: "pageDate",
11784
+ event,
11785
+ choices: input.events
11786
+ };
11787
+ const moreDates = input.occurrenceContext ? addableDates(event, input) : [];
11788
+ const [first, ...rest] = moreDates;
11789
+ return first ? {
11790
+ kind: "pageDateAndMore",
11791
+ event,
11792
+ moreDates: [first, ...rest],
11793
+ choices: [event, ...moreDates]
11794
+ } : {
11795
+ kind: "pageDate",
11796
+ event,
11797
+ choices: [event]
11798
+ };
11799
+ }
11800
+ /**
11801
+ * The class's other dates a visitor could add to the page's date, as the
11802
+ * class's own page lists them, or none when the page's date books on its own:
11803
+ * a return to finish a booking, a date that can't be ticked, a class that
11804
+ * doesn't book several dates or has rooms, or no other date open to book.
11805
+ */
11806
+ function addableDates(pageDate, input) {
11807
+ if (input.arrival !== "none") return [];
11808
+ if (pageDate.registrationSubject.kind !== "occurrence") return [];
11809
+ if (selectionRowAvailability(pageDate) !== "open" || !isUpcomingDateChoice(pageDate, input.now)) return [];
11810
+ const others = input.events.filter((event) => event.selectionId !== pageDate.selectionId && event.seriesId === pageDate.seriesId && isUpcomingDateChoice(event, input.now));
11811
+ const mode = registrationSelectionMode({ events: [pageDate, ...others] });
11812
+ if (mode.kind !== "several" || mode.items !== "dates") return [];
11813
+ return others.some((event) => selectionRowAvailability(event) === "open") ? others : [];
11814
+ }
11815
+ /** Whether the route starts by choosing (and so Back and "Change dates" lead there). */
11816
+ function entryChoosesEvent(entry) {
11817
+ return entry.kind !== "pageDate";
11818
+ }
11819
+ /** The date this page is about, if it names one the events include. */
11820
+ function entryPageEvent(entry) {
11821
+ return entry.kind === "chooseEvent" ? null : entry.event;
11822
+ }
11823
+ /** A booking that starts by choosing, with nothing ticked. */
11824
+ const CHOOSING_START = {
11825
+ step: "select-event",
11826
+ event: null
11827
+ };
11828
+ /** A booking that starts on Tickets, before the page's date is known. */
11829
+ const TICKETS_START = {
11830
+ step: "select-tickets",
11831
+ event: null
11832
+ };
11833
+ function entryStart(entry) {
11834
+ return {
11835
+ ...entryChoosesEvent(entry) ? CHOOSING_START : TICKETS_START,
11836
+ event: entryPageEvent(entry)
11837
+ };
11838
+ }
11839
+ function entrySelectionMode(entry) {
11840
+ return entry.kind === "pageDate" ? { kind: "single" } : registrationSelectionMode({ events: entry.choices });
11841
+ }
11842
+ /**
11843
+ * The page's occurrence names the booking only while the booking is for the
11844
+ * page's date: a date page that lets the visitor tick others books those as
11845
+ * themselves.
11846
+ */
11847
+ function bookingOccurrenceContext(occurrenceContext, pageEvent, selection) {
11848
+ const primary = selection[0];
11849
+ if (!occurrenceContext) return null;
11850
+ return !primary || primary.selectionId === pageEvent?.selectionId ? occurrenceContext : null;
11851
+ }
11852
+ //#endregion
11344
11853
  //#region ../blocks/src/system/runtime/nodes/event-registration/registrationBrowserDraft.ts
11345
11854
  const browserDraftSteps = [
11346
11855
  "select-event",
@@ -11353,12 +11862,13 @@ const BROWSER_DRAFT_LIFETIME_MS = 10800 * 1e3;
11353
11862
  /**
11354
11863
  * An allowlist of what the booker typed or chose, kept in this tab only, for
11355
11864
  * `BROWSER_DRAFT_LIFETIME_MS`: the selection and tickets, their contact
11356
- * details, the guests' names and contact details, and their answers to the
11865
+ * details, the rooms they asked for and, for a signed-in customer only, their
11866
+ * note ("Anything we should know?"), the guests' names and contact details, and their answers to the
11357
11867
  * questions, by question ID (`BookingQuestionsTabDraft`: plain answers only,
11358
11868
  * never file uploads, and dropped on restore if the question has gone or
11359
11869
  * changed kind), once for the selection or per run when runs ask their own.
11360
11870
  * `owner` is whoever was signed in (or nobody) when it was saved: contact,
11361
- * guests and answers come back only to that same visitor. Notes, the terms agreement, payment choices and anything
11871
+ * the note, guests and answers come back only to that same visitor. The terms agreement, payment choices and anything
11362
11872
  * else payment-related never go to storage. The discount code is its text
11363
11873
  * only, never a price or amount, and the server checks it again on restore.
11364
11874
  */
@@ -11377,11 +11887,14 @@ const registrationBrowserDraftSchema = z.object({
11377
11887
  pricingOptionId: z.string().nullable(),
11378
11888
  slidingAmountInput: z.string()
11379
11889
  })),
11890
+ roomChoices: roomChoicesSchema.default([]),
11891
+ reviewedRooms: reviewedRoomsSchema.default([]),
11380
11892
  contact: z.object({
11381
11893
  name: z.string(),
11382
11894
  email: z.string(),
11383
11895
  phone: z.string()
11384
11896
  }),
11897
+ notes: z.string().default(""),
11385
11898
  discountCode: z.string().default(""),
11386
11899
  guests: z.array(z.object({
11387
11900
  name: z.string(),
@@ -11395,11 +11908,24 @@ const registrationBrowserDraftSchema = z.object({
11395
11908
  function isBrowserDraftStep(step) {
11396
11909
  return browserDraftSteps.some((candidate) => candidate === step);
11397
11910
  }
11911
+ /**
11912
+ * The note ("Anything we should know?") often holds health details, so it's
11913
+ * kept only for a signed-in customer. A signed-out draft could be opened by the
11914
+ * next person on a shared device, such as a studio's front-desk tablet.
11915
+ */
11916
+ function keepsNote(owner) {
11917
+ return owner.kind === "session";
11918
+ }
11919
+ /** The saved note to put back, or nothing for a signed-out draft (including one saved before this rule). */
11920
+ function restoredNote(saved) {
11921
+ return keepsNote(saved.owner) ? { notes: saved.notes } : {};
11922
+ }
11398
11923
  function registrationBrowserDraft(flow, discountCode, identity) {
11399
11924
  if (!isBrowserDraftStep(flow.step)) return null;
11400
11925
  const { draft } = flow;
11926
+ const owner = bookingQuestionsOwnerOf(identity);
11401
11927
  return {
11402
- owner: bookingQuestionsOwnerOf(identity),
11928
+ owner,
11403
11929
  step: flow.step,
11404
11930
  selectedEventIds: draft.selection.map((event) => event.selectionId),
11405
11931
  placeCount: flow.placeCount,
@@ -11407,11 +11933,14 @@ function registrationBrowserDraft(flow, discountCode, identity) {
11407
11933
  selectedSlidingAmountInput: draft.selectedSlidingAmountInput,
11408
11934
  selectedAttendanceMode: draft.selectedAttendanceMode,
11409
11935
  runChoices: draft.runChoices,
11936
+ roomChoices: [...draft.roomChoices],
11937
+ reviewedRooms: [...draft.reviewedRooms],
11410
11938
  contact: {
11411
11939
  name: draft.formData.name,
11412
11940
  email: draft.formData.email,
11413
11941
  phone: draft.formData.phone
11414
11942
  },
11943
+ notes: keepsNote(owner) ? draft.formData.notes : "",
11415
11944
  discountCode,
11416
11945
  guests: draft.guests.map(({ name, email, phone }) => ({
11417
11946
  name,
@@ -11462,7 +11991,8 @@ function restoreRegistrationBrowserDraft(state, saved, events, identity) {
11462
11991
  const theirs = isBookingQuestionsOwner(saved.owner, identity);
11463
11992
  const contact = theirs ? {
11464
11993
  ...state.draft.formData,
11465
- ...saved.contact
11994
+ ...saved.contact,
11995
+ ...restoredNote(saved)
11466
11996
  } : state.draft.formData;
11467
11997
  if (selection.length !== saved.selectedEventIds.length) return {
11468
11998
  ...state,
@@ -11486,7 +12016,9 @@ function restoreRegistrationBrowserDraft(state, saved, events, identity) {
11486
12016
  selectedTicketLines: saved.selectedTicketLines,
11487
12017
  selectedSlidingAmountInput: saved.selectedSlidingAmountInput,
11488
12018
  selectedAttendanceMode: resolveSelectionAttendanceMode(decideSelectionAttendance(selection.length ? selection : state.draft.selection), saved.selectedAttendanceMode),
11489
- runChoices: saved.runChoices
12019
+ runChoices: saved.runChoices,
12020
+ roomChoices: saved.roomChoices,
12021
+ reviewedRooms: saved.reviewedRooms
11490
12022
  }
11491
12023
  };
11492
12024
  }
@@ -11556,7 +12088,7 @@ function buildBookingPaymentOptionViewModel(input) {
11556
12088
  ...input,
11557
12089
  option: input.option
11558
12090
  });
11559
- default: return assertNever$1(input.option);
12091
+ default: return assertNever$2(input.option);
11560
12092
  }
11561
12093
  }
11562
12094
  function depositPolicy(refundability) {
@@ -11750,7 +12282,7 @@ function projectReviewedBookingCollectionMoney(facts, terms) {
11750
12282
  };
11751
12283
  case "upfront":
11752
12284
  case "deferred_manual": return money;
11753
- default: return assertNever$1(facts);
12285
+ default: return assertNever$2(facts);
11754
12286
  }
11755
12287
  }
11756
12288
  function requireReviewedLaterPaymentAmount(terms, index) {
@@ -11936,7 +12468,7 @@ function resolveHeadlessEventRegistrationStatus(wizard) {
11936
12468
  case "select-tickets":
11937
12469
  case "enter-details":
11938
12470
  case "select-payment": return { tag: "ready" };
11939
- default: return assertNever$1(wizard.flow);
12471
+ default: return assertNever$2(wizard.flow);
11940
12472
  }
11941
12473
  }
11942
12474
  const BOOKING_CLOSED_MESSAGE = "Booking is currently closed for this event. Please contact the organiser if you’d like to find out more.";
@@ -11991,7 +12523,7 @@ function resolveHeadlessEventRegistrationView(wizard) {
11991
12523
  case "select-payment":
11992
12524
  case "submitting":
11993
12525
  case "payment": return { kind: "form" };
11994
- default: return assertNever$1(wizard.flow);
12526
+ default: return assertNever$2(wizard.flow);
11995
12527
  }
11996
12528
  }
11997
12529
  function deriveEventRegistrationSteps(input) {
@@ -12051,14 +12583,8 @@ function getTicketSelectionPurpose(input) {
12051
12583
  return input.admission.kind === "checking" && input.event && canJoinEventWaitlist(input.event, { attendanceMode: input.attendanceMode }) ? "waitlist" : "book";
12052
12584
  }
12053
12585
  function resolveRegistrationAdmission(input) {
12054
- if (input.holdsOwnPlace) return { kind: "resume" };
12055
- if (input.eligibilityLoading) return { kind: "checking" };
12056
- if (input.eligibilityError) return {
12057
- kind: "closed",
12058
- reason: "optionsUnavailable",
12059
- message: input.eligibilityError
12060
- };
12061
- if (!input.eligibility) return { kind: "checking" };
12586
+ const early = admissionBeforeOptions(input);
12587
+ if (early || !input.eligibility) return early ?? { kind: "checking" };
12062
12588
  const { registration, availability } = input.eligibility;
12063
12589
  if (registration.kind === "pending_payment") return { kind: "resume" };
12064
12590
  if (registration.kind === "waitlisted") return {
@@ -12067,15 +12593,37 @@ function resolveRegistrationAdmission(input) {
12067
12593
  message: "You're already on the waitlist for this event."
12068
12594
  };
12069
12595
  const admission = admissionFromAvailability(availability, input.isAuthenticated, input.businessName);
12070
- return admission.kind === "open" && input.severalRunsNeedCard ? admissionWithCardDue(input.eligibility.onlinePayments, input.businessName) : admission;
12596
+ return admission.kind === "open" && input.selectionPayment ? admissionForSelectionPayment(input.selectionPayment, input.businessName) : admission;
12071
12597
  }
12072
- /** Several runs whose total has to go to card payment (issue 1725), priced from every run. */
12073
- function severalRunsNeedCard(several, payment) {
12074
- return several === "runs" && payment.kind === "several" && payment.due === "card";
12598
+ /**
12599
+ * Admission that doesn't need the options' answer. Every way in waits for the
12600
+ * options, even a held place: until they arrive, whether anything is due can't
12601
+ * be known, and a paid event would look free.
12602
+ */
12603
+ function admissionBeforeOptions(input) {
12604
+ if (input.eligibilityLoading) return { kind: "checking" };
12605
+ if (input.holdsOwnPlace && (input.eligibility || input.eligibilityError)) return { kind: "resume" };
12606
+ if (input.eligibilityError) return {
12607
+ kind: "closed",
12608
+ reason: input.bookingsClosed ? "bookingsClosed" : "optionsUnavailable",
12609
+ message: input.eligibilityError
12610
+ };
12611
+ return null;
12075
12612
  }
12076
- /** An open selection that has to go to card payment, which the site may not be able to take. */
12077
- function admissionWithCardDue(onlinePayments, businessName) {
12078
- return onlinePayments?.kind === "unavailable" ? cannotBookOnline(businessName, onlinePayments.organiserContact) : { kind: "open" };
12613
+ /** The checkout refusal's words, for a selection the page shouldn't have offered together. */
12614
+ const BOOK_SEPARATELY_MESSAGE = "These can’t be booked together. Book them one at a time.";
12615
+ /** An open selection the server says can't be paid: the site can't take the money, or the items' ways to pay don't combine. */
12616
+ function admissionForSelectionPayment(payment, businessName) {
12617
+ switch (payment.kind) {
12618
+ case "bookable": return { kind: "open" };
12619
+ case "cannotBookOnline": return cannotBookOnline(businessName, payment.organiserContact ?? void 0);
12620
+ case "bookSeparately": return {
12621
+ kind: "closed",
12622
+ reason: "unavailable",
12623
+ message: BOOK_SEPARATELY_MESSAGE
12624
+ };
12625
+ case "noPaymentOption": return cannotBookOnline(businessName, void 0);
12626
+ }
12079
12627
  }
12080
12628
  /** The site can't take this payment now, so the client books with the business instead. */
12081
12629
  function cannotBookOnline(businessName, contact) {
@@ -12142,6 +12690,7 @@ function settledRemainingPlaces(eligibility) {
12142
12690
  function closedAdmissionLabel(reason) {
12143
12691
  switch (reason) {
12144
12692
  case "alreadyWaitlisted": return "Already on waitlist";
12693
+ case "bookingsClosed": return "Bookings closed";
12145
12694
  case "optionsUnavailable": return "Couldn’t load times";
12146
12695
  case "unavailable": return "Can’t book online";
12147
12696
  }
@@ -12152,7 +12701,7 @@ function closedAdmissionLabel(reason) {
12152
12701
  * form shows no places to choose and no button to press.
12153
12702
  */
12154
12703
  function registrationStopsHere(admission) {
12155
- return admission.kind === "closed" && admission.reason === "unavailable";
12704
+ return admission.kind === "closed" && (admission.reason === "unavailable" || admission.reason === "bookingsClosed");
12156
12705
  }
12157
12706
  function resolveRegistrationAvailabilityBlocker(admission) {
12158
12707
  switch (admission.kind) {
@@ -12420,6 +12969,63 @@ function toEventDirectPaymentOption(option, mode, totalCents) {
12420
12969
  };
12421
12970
  }
12422
12971
  }
12972
+ /**
12973
+ * Several items' ways to pay, as the server's answer collects their money:
12974
+ * in full by card, or directly with the business, each booking owing its own
12975
+ * amount. Nothing here resolves terms; the answer already did.
12976
+ */
12977
+ function buildSelectionCollectionOptions(input) {
12978
+ const choice = input.collections.length > 1;
12979
+ return input.collections.flatMap((collection) => {
12980
+ const totalCents = input.orderTotalCents ?? collection.amountCents;
12981
+ switch (collection.kind) {
12982
+ case "upfront": return [payInFullOption(collection.currency, totalCents, choice)];
12983
+ case "deferred_manual": return [payDirectlyOption(collection, totalCents, input.itemLabel)];
12984
+ case "instalment_plan":
12985
+ case "flexible_balance": return [];
12986
+ }
12987
+ });
12988
+ }
12989
+ function payInFullOption(currency, totalCents, choice) {
12990
+ const { title: _title, ...copy } = buildUpfrontBookingPaymentOptionCopy(formatPrice(totalCents, currency));
12991
+ return {
12992
+ ...copy,
12993
+ ...summaryFor({
12994
+ totalCents,
12995
+ dueTodayCents: totalCents,
12996
+ currency
12997
+ }),
12998
+ kind: "upfront",
12999
+ presentationKind: "upfront",
13000
+ flexibleBalance: null,
13001
+ label: choice ? "Pay in full now" : "Pay by card",
13002
+ totalCents,
13003
+ configuredPaymentDueNowCents: totalCents
13004
+ };
13005
+ }
13006
+ /** One pay-directly choice, listing what each booking owes when their prices add up to the total. */
13007
+ function payDirectlyOption(collection, totalCents, itemLabel) {
13008
+ const { title, ...copy } = buildDeferredManualBookingPaymentOptionCopy();
13009
+ const termRows = (totalCents === collection.amountCents ? collection.bookings ?? [] : []).map((booking) => ({
13010
+ label: itemLabel(booking.itemId),
13011
+ value: formatPrice(booking.amountCents, collection.currency)
13012
+ }));
13013
+ return {
13014
+ ...copy,
13015
+ ...summaryFor({
13016
+ totalCents,
13017
+ dueTodayCents: 0,
13018
+ currency: collection.currency,
13019
+ termRows
13020
+ }),
13021
+ kind: "deferred_manual",
13022
+ presentationKind: "deferred_manual",
13023
+ flexibleBalance: null,
13024
+ label: title,
13025
+ totalCents,
13026
+ configuredPaymentDueNowCents: 0
13027
+ };
13028
+ }
12423
13029
  function resolveEventRegistrationDirectPaymentSelection(input) {
12424
13030
  if (input.selection.method !== null && input.selection.method !== "stripe") return { kind: "not-stripe" };
12425
13031
  const [onlyOption, ...otherOptions] = input.options;
@@ -12463,24 +13069,10 @@ function decideEventRegistrationPayment(input) {
12463
13069
  },
12464
13070
  directPaymentOptions: input.directPaymentOptions,
12465
13071
  canShowDirectPaymentOptions: input.directPaymentOptions.length > 0,
12466
- ...selectionPaymentPresentation(input.selectionPayment, input.eligibility)
13072
+ paysNothing: input.paysNothing,
13073
+ offersEntitlements: input.offersEntitlements
12467
13074
  };
12468
13075
  }
12469
- /** Whether nothing is due, and whether passes and memberships are offered, for the whole selection. */
12470
- function selectionPaymentPresentation(payment, eligibility) {
12471
- switch (payment.kind) {
12472
- case "one-item": return {
12473
- paysNothing: eligibility?.isFree ?? false,
12474
- offersEntitlements: true,
12475
- paysInFullBecauseSeveral: false
12476
- };
12477
- case "several": return {
12478
- paysNothing: payment.due === "nothing",
12479
- offersEntitlements: false,
12480
- paysInFullBecauseSeveral: payment.due === "card" && (eligibility?.paymentOptions ?? []).some((option) => option.kind === "flexibleBalance" || option.kind === "instalmentPlan")
12481
- };
12482
- }
12483
- }
12484
13076
  /**
12485
13077
  * Label for the button that acts on the chosen payment method.
12486
13078
  *
@@ -12518,6 +13110,356 @@ function shouldPromptForLogin(status, isAuthenticated, eligibility) {
12518
13110
  return Boolean(status === "not-eligible" && !isAuthenticated && eligibility && (eligibility.requiresAuthForPasses || eligibility.requiresAuthForMemberships));
12519
13111
  }
12520
13112
  //#endregion
13113
+ //#region ../blocks/src/system/runtime/nodes/event-registration/useSelectionFunding.state.ts
13114
+ /**
13115
+ * How the dates are paid, one date or several (issue 1767, sets 6 and 7). The server
13116
+ * plans every option, its order and the one to select; the block keeps which one
13117
+ * the visitor picked and sends that option back with the split it showed.
13118
+ */
13119
+ /** The pass or membership an entitlement option uses, as the server names it on submit. */
13120
+ function entitlementSource(entitlement) {
13121
+ switch (entitlement.kind) {
13122
+ case "ownedPass": return {
13123
+ kind: "ownedPass",
13124
+ passId: entitlement.passId
13125
+ };
13126
+ case "ownedMembership": return {
13127
+ kind: "ownedMembership",
13128
+ membershipId: entitlement.membershipId
13129
+ };
13130
+ case "buyPass": return {
13131
+ kind: "buyPass",
13132
+ productId: entitlement.productId
13133
+ };
13134
+ case "buyMembership": return {
13135
+ kind: "buyMembership",
13136
+ productId: entitlement.productId
13137
+ };
13138
+ default: return assertNever$2(entitlement);
13139
+ }
13140
+ }
13141
+ function sourceKey(source) {
13142
+ switch (source.kind) {
13143
+ case "ownedPass": return `ownedPass:${source.passId}`;
13144
+ case "ownedMembership": return `ownedMembership:${source.membershipId}`;
13145
+ case "buyPass": return `buyPass:${source.productId}`;
13146
+ case "buyMembership": return `buyMembership:${source.productId}`;
13147
+ default: return assertNever$2(source);
13148
+ }
13149
+ }
13150
+ /** One key per option, so a pick survives a refetch that still offers it. */
13151
+ function fundingPickKey(pick) {
13152
+ switch (pick.kind) {
13153
+ case "money": return "money";
13154
+ case "entitlement": return sourceKey(pick.source);
13155
+ default: return assertNever$2(pick);
13156
+ }
13157
+ }
13158
+ function fundingOptionPick(option) {
13159
+ switch (option.kind) {
13160
+ case "money": return { kind: "money" };
13161
+ case "entitlement": return {
13162
+ kind: "entitlement",
13163
+ source: entitlementSource(option.entitlement)
13164
+ };
13165
+ default: return assertNever$2(option);
13166
+ }
13167
+ }
13168
+ function fundingOptionKey(option) {
13169
+ return fundingPickKey(fundingOptionPick(option));
13170
+ }
13171
+ function findOption(funding, pick) {
13172
+ const key = fundingPickKey(pick);
13173
+ return funding.options.find((option) => fundingOptionKey(option) === key);
13174
+ }
13175
+ /** The picked option, or the server's own selection when the pick isn't offered. */
13176
+ function chosenFundingOption(funding, pick) {
13177
+ return findOption(funding, pick) ?? findOption(funding, funding.selected) ?? funding.options[0];
13178
+ }
13179
+ /** The dates the option charges money for, earliest first. */
13180
+ function fundingMoneyDates(option) {
13181
+ switch (option.kind) {
13182
+ case "money": return option.moneyDates;
13183
+ case "entitlement": return option.uncovered.map((date) => date.occurrenceId);
13184
+ default: return assertNever$2(option);
13185
+ }
13186
+ }
13187
+ /** What submit sends: the option's source and the split the visitor saw. */
13188
+ function fundingChoice(option) {
13189
+ switch (option.kind) {
13190
+ case "money": return { kind: "money" };
13191
+ case "entitlement": return {
13192
+ kind: "entitlement",
13193
+ source: entitlementSource(option.entitlement),
13194
+ expected: {
13195
+ covered: [...option.covered],
13196
+ moneyDates: [...fundingMoneyDates(option)]
13197
+ }
13198
+ };
13199
+ default: return assertNever$2(option);
13200
+ }
13201
+ }
13202
+ /**
13203
+ * The options request for the dates of one event, one date or several; null
13204
+ * for anything else, which keeps its own payment step. A waitlist claim asks the
13205
+ * same way: the claim admits the held place, and the funding pays for it.
13206
+ */
13207
+ function selectionFundingRequest(input) {
13208
+ const selection = input.target?.selection;
13209
+ if (selection?.kind !== "dates") return null;
13210
+ const eventSeriesId = datesSeries(selection, input.eventSeriesId);
13211
+ const lines = normalizeTicketSelectionLines(input.ticketSelections);
13212
+ if (!eventSeriesId || lines.length === 0) return null;
13213
+ return {
13214
+ subject: {
13215
+ kind: "dates",
13216
+ eventSeriesId,
13217
+ occurrenceIds: selection.occurrenceIds,
13218
+ ...input.attendanceMode ? { attendanceMode: input.attendanceMode } : {}
13219
+ },
13220
+ selections: lines.map(({ pricingOptionId, quantity }) => ({
13221
+ pricingOptionId,
13222
+ quantity
13223
+ })),
13224
+ ...input.selectedSlidingAmount !== null ? { selectedSlidingAmount: input.selectedSlidingAmount } : {}
13225
+ };
13226
+ }
13227
+ /** Several dates name their series; one date's comes from the event being booked. */
13228
+ function datesSeries(selection, eventSeriesId) {
13229
+ return selection.eventSeriesId ?? (selection.occurrenceIds.length === 1 ? eventSeriesId : null);
13230
+ }
13231
+ /**
13232
+ * What the quote prices for the dates: nothing while the ways to pay are on their way or when the
13233
+ * visitor's own pass or membership covers every date, and otherwise the chosen option's whole order,
13234
+ * which the server funds and prices itself. Null for anything that isn't dates. One date paid with
13235
+ * money keeps its own booking's quote, so its card options, deposits and automatic discount stay
13236
+ * as they are, and it waits for nothing.
13237
+ */
13238
+ function selectionDatesQuote(lookup, request) {
13239
+ if (request === null) return null;
13240
+ const oneDate = request.subject.occurrenceIds.length === 1;
13241
+ switch (lookup.tag) {
13242
+ case "idle": return null;
13243
+ case "loading":
13244
+ case "failed": return oneDate ? null : { kind: "waiting" };
13245
+ case "loaded": {
13246
+ const option = chosenFundingOption(lookup.funding, lookup.pick);
13247
+ if (oneDate && option.kind === "money") return null;
13248
+ return ownCoverPaysEveryDate(option) ? { kind: "nothingToPay" } : {
13249
+ kind: "order",
13250
+ selection: {
13251
+ ...request,
13252
+ funding: fundingChoice(option)
13253
+ }
13254
+ };
13255
+ }
13256
+ default: return assertNever$2(lookup);
13257
+ }
13258
+ }
13259
+ /** A pass or membership the visitor already has, covering every date: submit books them with no order. */
13260
+ function ownCoverPaysEveryDate(option) {
13261
+ if (option.kind === "money" || option.uncovered.length > 0) return false;
13262
+ switch (option.entitlement.kind) {
13263
+ case "ownedPass":
13264
+ case "ownedMembership": return true;
13265
+ case "buyPass":
13266
+ case "buyMembership": return false;
13267
+ default: return assertNever$2(option.entitlement);
13268
+ }
13269
+ }
13270
+ /**
13271
+ * One date with nothing but money to offer, no note and no change to explain keeps
13272
+ * the card step it always had; anything else shows the ways to pay.
13273
+ */
13274
+ function cardStepServesDates(lookup, dateCount) {
13275
+ if (dateCount !== 1 || lookup.tag !== "loaded" || lookup.notice !== null || lookup.reload !== null) return false;
13276
+ const { options, entitlementNote } = lookup.funding;
13277
+ return options.length === 1 && options[0].kind === "money" && entitlementNote === "none";
13278
+ }
13279
+ /** The option the visitor has chosen, once the options are in. */
13280
+ function lookupChosenOption(lookup) {
13281
+ return lookup.tag === "loaded" ? chosenFundingOption(lookup.funding, lookup.pick) : null;
13282
+ }
13283
+ /** What the visitor is looking at now, for a quote or submit to say which options it was about. */
13284
+ function selectionFundingBasis(lookup) {
13285
+ return lookup.tag === "loaded" ? {
13286
+ requestKey: lookup.requestKey,
13287
+ pickKey: fundingPickKey(lookup.pick)
13288
+ } : null;
13289
+ }
13290
+ const initialSelectionFundingLookup = { tag: "idle" };
13291
+ function settles(state, requestKey) {
13292
+ if (state.tag === "idle" || state.requestKey !== requestKey) return false;
13293
+ return state.tag === "loading" || state.tag === "loaded" && state.reload !== null && state.reload.sent;
13294
+ }
13295
+ function stillCurrent(state, basis) {
13296
+ const now = selectionFundingBasis(state);
13297
+ return now !== null && basis !== null && now.requestKey === basis.requestKey && now.pickKey === basis.pickKey;
13298
+ }
13299
+ /**
13300
+ * The options as the visitor may choose them: with a payment answer, only those it can take payment
13301
+ * for. An option it doesn't answer for isn't offered, rather than free. Null when the answer leaves
13302
+ * nothing, or not the server's own selection, which the server never sends.
13303
+ */
13304
+ function offeredSelectionFunding(funding, payment) {
13305
+ if (payment === null || payment.kind !== "bookable") return funding;
13306
+ const offered = new Set(payment.options.map((option) => fundingPickKey(option.funding)));
13307
+ const [first, ...rest] = funding.options.filter((option) => offered.has(fundingOptionKey(option)));
13308
+ if (first === void 0 || !offered.has(fundingPickKey(funding.selected))) return null;
13309
+ return {
13310
+ ...funding,
13311
+ options: [first, ...rest]
13312
+ };
13313
+ }
13314
+ function settle(state, action) {
13315
+ const funding = offeredSelectionFunding(action.funding, action.payment);
13316
+ if (funding === null) return {
13317
+ tag: "failed",
13318
+ requestKey: action.requestKey
13319
+ };
13320
+ const revised = state.tag === "loaded" ? state.reload : null;
13321
+ const pick = revised && findOption(funding, revised.pick) ? revised.pick : funding.selected;
13322
+ return {
13323
+ tag: "loaded",
13324
+ requestKey: action.requestKey,
13325
+ funding,
13326
+ payment: action.payment,
13327
+ pick,
13328
+ notice: state.tag === "loaded" && revised ? state.notice : null,
13329
+ reload: null
13330
+ };
13331
+ }
13332
+ /** A reload after a refusal keeps the options on screen; anything else starts afresh. */
13333
+ function startLoading(state, requestKey) {
13334
+ return state.tag === "loaded" && state.requestKey === requestKey && state.reload !== null ? {
13335
+ ...state,
13336
+ reload: {
13337
+ ...state.reload,
13338
+ sent: true
13339
+ }
13340
+ } : {
13341
+ tag: "loading",
13342
+ requestKey
13343
+ };
13344
+ }
13345
+ function selectionFundingReducer(state, action) {
13346
+ switch (action.type) {
13347
+ case "loading": return startLoading(state, action.requestKey);
13348
+ case "loaded": return settles(state, action.requestKey) ? settle(state, action) : state;
13349
+ case "failed": return settles(state, action.requestKey) ? {
13350
+ tag: "failed",
13351
+ requestKey: action.requestKey
13352
+ } : state;
13353
+ case "picked": return state.tag === "loaded" && state.reload === null && findOption(state.funding, action.pick) ? {
13354
+ ...state,
13355
+ pick: action.pick,
13356
+ notice: null
13357
+ } : state;
13358
+ case "changed": return stillCurrent(state, action.basis) ? {
13359
+ ...state,
13360
+ notice: action.message,
13361
+ reload: {
13362
+ pick: action.funding.selected,
13363
+ sent: false
13364
+ }
13365
+ } : state;
13366
+ case "reset": return initialSelectionFundingLookup;
13367
+ default: return assertNever$2(action);
13368
+ }
13369
+ }
13370
+ /** The lookup for this request: another request's answer, or none yet, is still loading. */
13371
+ function currentSelectionFundingLookup(state, requestKey) {
13372
+ if (requestKey === null) return initialSelectionFundingLookup;
13373
+ if (state.tag !== "idle" && state.requestKey === requestKey) return state;
13374
+ return {
13375
+ tag: "loading",
13376
+ requestKey
13377
+ };
13378
+ }
13379
+ /** Whether the hook should ask the server now. */
13380
+ function selectionFundingFetchWanted(state, requestKey, enabled) {
13381
+ if (!enabled || requestKey === null) return false;
13382
+ if (state.tag === "idle" || state.requestKey !== requestKey) return true;
13383
+ return state.tag === "loaded" && state.reload !== null && !state.reload.sent;
13384
+ }
13385
+ //#endregion
13386
+ //#region ../blocks/src/system/runtime/nodes/event-registration/selectionPaymentAnswer.state.ts
13387
+ /**
13388
+ * How several dates or runs can be paid, as the server's selection payment
13389
+ * owner answered (P3). The block formats this answer and decides nothing about
13390
+ * it: which ways to pay exist, what each collects and whether the site can take
13391
+ * the money are all the server's.
13392
+ */
13393
+ /** The answer's option for a funding pick (money, or a pass or membership). */
13394
+ function paymentOptionFor(payment, pick) {
13395
+ if (payment.kind !== "bookable") return null;
13396
+ const key = fundingPickKey(pick);
13397
+ return payment.options.find((option) => fundingPickKey(option.funding) === key) ?? null;
13398
+ }
13399
+ const MONEY = { kind: "money" };
13400
+ /** How the selection's money is collected, one way per collection. Empty when nothing is due. */
13401
+ function collectionsOf(option) {
13402
+ if (!option) return [];
13403
+ switch (option.collect.kind) {
13404
+ case "nothing": return [];
13405
+ case "money": return option.collect.collections;
13406
+ default: return assertNever$2(option.collect);
13407
+ }
13408
+ }
13409
+ /** How a funding pick's money is collected. Empty with no answer yet, or when nothing is due. */
13410
+ function pickCollections(payment, pick) {
13411
+ return payment ? collectionsOf(paymentOptionFor(payment, pick)) : [];
13412
+ }
13413
+ /** The money option's ways to pay: what the visitor pays with no pass or membership. */
13414
+ function moneyCollections(payment) {
13415
+ return pickCollections(payment, MONEY);
13416
+ }
13417
+ /** Nothing to pay with money: the selection books free. False with no answer yet. */
13418
+ function selectionPaysNothing(payment) {
13419
+ return payment !== null && paymentOptionFor(payment, MONEY)?.collect.kind === "nothing";
13420
+ }
13421
+ /** Every way any option collects money, which a choice on the payment step must be one of. */
13422
+ function selectionCollectionKinds(payment) {
13423
+ if (payment.kind !== "bookable") return [];
13424
+ return [...new Set(payment.options.flatMap((option) => collectionsOf(option).map((collection) => collection.kind)))];
13425
+ }
13426
+ /** Each chosen item's name, keyed by the ID the server's per-booking amounts use. */
13427
+ function selectionItemLabels(selection) {
13428
+ const names = new Map(selection.map((event) => {
13429
+ const subject = event.registrationSubject;
13430
+ return [subject.kind === "occurrence" ? subject.occurrenceId : subject.eventSeriesId, selectionItemName(event, selection)];
13431
+ }));
13432
+ return (itemId) => names.get(itemId) ?? "";
13433
+ }
13434
+ /**
13435
+ * What the runs read is asked: each run with its own ticket or amount, at the
13436
+ * places chosen for them all. Null for anything but several runs, and while a
13437
+ * run's choice is unfinished.
13438
+ */
13439
+ function runsSelectionPaymentRequest(input) {
13440
+ if (input.selection.length < 2) return null;
13441
+ const runs = input.selection.flatMap((run) => {
13442
+ if (run.registrationSubject.kind !== "wholeSeries") return [];
13443
+ const choice = runPricingChoice(input.runChoices, run);
13444
+ const sliding = run.pricing.kind === "sliding_scale" ? parseCurrencyInputToCents(choice.slidingAmountInput) : null;
13445
+ return [{
13446
+ eventSeriesId: run.registrationSubject.eventSeriesId,
13447
+ selections: [{
13448
+ pricingOptionId: choice.pricingOptionId,
13449
+ quantity: input.places
13450
+ }],
13451
+ ...sliding !== null ? { selectedSlidingAmount: sliding } : {}
13452
+ }];
13453
+ });
13454
+ const [first, ...rest] = runs;
13455
+ if (!first || runs.length !== input.selection.length) return null;
13456
+ return { subject: {
13457
+ kind: "runs",
13458
+ runs: [first, ...rest],
13459
+ ...input.attendanceMode ? { attendanceMode: input.attendanceMode } : {}
13460
+ } };
13461
+ }
13462
+ //#endregion
12521
13463
  //#region ../blocks/src/system/runtime/nodes/event-registration/registrationStateMachine.ts
12522
13464
  /** Identity, not clicking a row, decides whether this is a new booking. */
12523
13465
  function decideEventChoice(state, event) {
@@ -12530,10 +13472,14 @@ function decideEventChoice(state, event) {
12530
13472
  }
12531
13473
  /** A replacement owns all new-event defaults and detaches invitation authority atomically. */
12532
13474
  function replaceRegistrationEvent(state, action) {
13475
+ const fresh = resetRegistrationDraft(state, {
13476
+ step: action.navigation === "advance" ? "select-tickets" : "select-event",
13477
+ event: action.event
13478
+ });
12533
13479
  return {
12534
- ...resetRegistrationDraft(state, action.navigation === "advance"),
13480
+ ...fresh,
12535
13481
  draft: {
12536
- ...createRegistrationDraftData(action.event),
13482
+ ...fresh.draft,
12537
13483
  formData: {
12538
13484
  ...state.draft.formData,
12539
13485
  consentAccepted: false
@@ -12541,21 +13487,24 @@ function replaceRegistrationEvent(state, action) {
12541
13487
  }
12542
13488
  };
12543
13489
  }
12544
- function createInitialRegistrationFlowState(hasPreSelectedContext) {
13490
+ function createInitialRegistrationFlowState(start) {
12545
13491
  return resetRegistrationDraft({
12546
13492
  isAuthenticated: false,
12547
13493
  completedOutcomes: [],
12548
13494
  spentClaim: null,
12549
13495
  draft: createRegistrationDraftData(null)
12550
- }, hasPreSelectedContext);
13496
+ }, start);
12551
13497
  }
12552
- /** Reset booking choices; live session facts are required and carried through. */
12553
- function resetRegistrationDraft(session, hasPreSelectedContext) {
13498
+ /**
13499
+ * Reset booking choices to the start's, with that item's own defaults; the
13500
+ * details typed so far and live session facts are carried through.
13501
+ */
13502
+ function resetRegistrationDraft(session, start) {
12554
13503
  return {
12555
13504
  questionFieldErrors: {},
12556
- step: hasPreSelectedContext ? "select-tickets" : "select-event",
13505
+ step: start.step,
12557
13506
  draft: {
12558
- ...createRegistrationDraftData(null),
13507
+ ...createRegistrationDraftData(start.event),
12559
13508
  formData: session.draft.formData
12560
13509
  },
12561
13510
  invitation: { kind: "none" },
@@ -12564,6 +13513,7 @@ function resetRegistrationDraft(session, hasPreSelectedContext) {
12564
13513
  completedOutcomes: session.completedOutcomes,
12565
13514
  spentClaim: session.spentClaim,
12566
13515
  eligibility: null,
13516
+ selectionPayment: null,
12567
13517
  roomFacts: null,
12568
13518
  paymentSelection: { method: null },
12569
13519
  selectionSource: "auto"
@@ -12602,26 +13552,14 @@ function flowTicketsCount(state) {
12602
13552
  });
12603
13553
  return Math.max(1, ticketsCount);
12604
13554
  }
12605
- /** How the whole selection is paid; the wizard reads the same decision. */
12606
- function flowSelectionPayment(state) {
12607
- return decideSelectionPayment({
12608
- selection: state.draft.selection,
12609
- runChoices: state.draft.runChoices,
12610
- eligibility: state.eligibility
12611
- });
12612
- }
12613
- /**
12614
- * A membership covers one run for one person, so it's chosen for the visitor
12615
- * then. Dates are paid with the server's funding options instead (issue 1767).
12616
- */
13555
+ /** A membership covers one place on one run, so it's chosen for the visitor then. Dates are paid with the server's funding options instead (issue 1767). */
12617
13556
  function membershipAllowed(state) {
12618
- return flowTicketsCount(state) === 1 && severalItemsOf(state.draft.selection) === null && state.draft.selection[0]?.registrationSubject.kind === "wholeSeries";
13557
+ return flowTicketsCount(state) === 1 && state.draft.selection[0]?.registrationSubject.kind === "wholeSeries";
12619
13558
  }
12620
13559
  function computeAutoSelection(state) {
12621
13560
  const { isAuthenticated, eligibility } = state;
12622
13561
  if (!eligibility) return { method: null };
12623
- const payment = flowSelectionPayment(state);
12624
- if (payment.kind === "several") return payment.due === "nothing" ? { method: "free" } : { method: null };
13562
+ if (severalItemsOf(state.draft.selection) !== null) return selectionPaysNothing(state.selectionPayment) ? { method: "free" } : { method: null };
12625
13563
  if (eligibility.isFree) return { method: "free" };
12626
13564
  const membership = isAuthenticated && membershipAllowed(state) ? eligibility.eligibleMemberships[0] : void 0;
12627
13565
  return membership ? {
@@ -12630,27 +13568,32 @@ function computeAutoSelection(state) {
12630
13568
  productName: membership.membershipName
12631
13569
  } : { method: null };
12632
13570
  }
12633
- function isSelectionValid(input) {
12634
- const { selection, isAuthenticated, eligibility } = input;
13571
+ function isSelectionValid(state, selection) {
13572
+ const { isAuthenticated, eligibility } = state;
12635
13573
  if (!selection.method) return false;
12636
- if (input.payment.kind === "several") return isSeveralItemsSelectionValid(selection, input.payment.due);
13574
+ if (severalItemsOf(state.draft.selection) !== null) return isSeveralItemsSelectionValid(selection, state.selectionPayment);
12637
13575
  if (!eligibility) return selection.method === "stripe";
12638
13576
  switch (selection.method) {
12639
13577
  case "free": return eligibility.isFree;
12640
13578
  case "stripe": return isCardSelectionValid(selection, eligibility);
12641
- case "membership": return input.membershipAllowed && isAuthenticated && eligibility.eligibleMemberships.some((membership) => membership.id === selection.membershipId);
13579
+ case "membership": return membershipAllowed(state) && isAuthenticated && eligibility.eligibleMemberships.some((membership) => membership.id === selection.membershipId);
12642
13580
  default: return false;
12643
13581
  }
12644
13582
  }
12645
13583
  /**
12646
- * Several items are free when nothing is due, otherwise paid up front by card
12647
- * (issue 1725). The first item's own options don't apply: a free first run
12648
- * doesn't make a paid second one free.
13584
+ * Several items are free when the server says nothing is due, otherwise paid
13585
+ * one of the ways its answer collects money. The first item's own options
13586
+ * don't apply. While the answer is being asked again, a chosen way to pay
13587
+ * stands until it arrives.
12649
13588
  */
12650
- function isSeveralItemsSelectionValid(selection, due) {
12651
- switch (due) {
12652
- case "nothing": return selection.method === "free";
12653
- case "card": return selection.method === "stripe" && selection.collectionOptionKind === "upfront";
13589
+ function isSeveralItemsSelectionValid(selection, payment) {
13590
+ if (payment === null) return selection.method === "stripe";
13591
+ switch (selection.method) {
13592
+ case "free": return selectionPaysNothing(payment);
13593
+ case "stripe": return selectionCollectionKinds(payment).includes(selection.collectionOptionKind);
13594
+ case "membership":
13595
+ case null: return false;
13596
+ default: return assertNever$2(selection);
12654
13597
  }
12655
13598
  }
12656
13599
  function isCardSelectionValid(selection, eligibility) {
@@ -12659,13 +13602,7 @@ function isCardSelectionValid(selection, eligibility) {
12659
13602
  }
12660
13603
  function normalizeRegistrationFlowState(state) {
12661
13604
  const autoSelection = computeAutoSelection(state);
12662
- const canKeepManualSelection = state.step !== "select-tickets" && state.selectionSource === "manual" && isSelectionValid({
12663
- selection: state.paymentSelection,
12664
- isAuthenticated: state.isAuthenticated,
12665
- eligibility: state.eligibility,
12666
- membershipAllowed: membershipAllowed(state),
12667
- payment: flowSelectionPayment(state)
12668
- });
13605
+ const canKeepManualSelection = state.step !== "select-tickets" && state.selectionSource === "manual" && isSelectionValid(state, state.paymentSelection);
12669
13606
  const nextSelection = canKeepManualSelection ? state.paymentSelection : autoSelection;
12670
13607
  const nextSource = canKeepManualSelection ? "manual" : "auto";
12671
13608
  const normalizedSelection = normalizePaymentSelection(nextSelection);
@@ -12697,7 +13634,7 @@ function reduceUnlockedAction(state, action) {
12697
13634
  questionFieldErrors: action.failure.questionFieldErrors
12698
13635
  };
12699
13636
  case "payment-return-restored": return restorePaymentReturn(state, action.restoration);
12700
- default: return assertNever$1(action);
13637
+ default: return assertNever$2(action);
12701
13638
  }
12702
13639
  }
12703
13640
  /**
@@ -12786,17 +13723,25 @@ function reduceActiveRegistration(state, action) {
12786
13723
  ...state,
12787
13724
  step: action.step
12788
13725
  });
12789
- case "reset": return resetRegistrationDraft(state, action.hasPreSelectedContext);
13726
+ case "reset": return resetRegistrationDraft(state, action.start);
12790
13727
  case "set-tickets-count":
12791
13728
  case "eligibility-updated": return normalizeRegistrationFlowState(backToRoomsWhenTheyveGone(updateRegistrationDraft(state, action)));
13729
+ case "selection-payment-updated": return withSelectionPayment(state, action.payment);
12792
13730
  case "event-continued": return action.navigation === "advance" ? {
12793
13731
  ...state,
12794
13732
  step: "select-tickets"
12795
13733
  } : state;
12796
13734
  case "event-replaced": return replaceRegistrationEvent(state, action);
12797
- default: return assertNever$1(action);
13735
+ default: return assertNever$2(action);
12798
13736
  }
12799
13737
  }
13738
+ /** A new answer from the server can change which ways to pay are still valid. */
13739
+ function withSelectionPayment(state, payment) {
13740
+ return state.selectionPayment === payment ? state : normalizeRegistrationFlowState({
13741
+ ...state,
13742
+ selectionPayment: payment
13743
+ });
13744
+ }
12800
13745
  /** Answering a question clears the complaint about that question, and only that one. */
12801
13746
  function applyRegistrationQuestionsEvent(state, event) {
12802
13747
  const draft = {
@@ -12915,7 +13860,7 @@ function updateRegistrationDraft(state, action) {
12915
13860
  eligibility: action.eligibility,
12916
13861
  roomFacts: action.eligibility?.rooms ?? state.roomFacts
12917
13862
  };
12918
- default: return assertNever$1(action);
13863
+ default: return assertNever$2(action);
12919
13864
  }
12920
13865
  }
12921
13866
  /** A run's membership books without a payment step. */
@@ -12937,9 +13882,9 @@ function reduceRegistrationPaymentChoice(state, action) {
12937
13882
  function reduceCompletedRegistration(state, action) {
12938
13883
  const { result: _result, ...draft } = state;
12939
13884
  switch (action.type) {
12940
- case "reset": return resetRegistrationDraft(state, action.hasPreSelectedContext);
13885
+ case "reset": return resetRegistrationDraft(state, action.start);
12941
13886
  case "set-step": return {
12942
- ...resetRegistrationDraft(state, action.step !== "select-event"),
13887
+ ...resetRegistrationDraft(state, CHOOSING_START),
12943
13888
  step: action.step
12944
13889
  };
12945
13890
  case "event-replaced": return registrationFlowReducer({
@@ -12962,8 +13907,9 @@ function reduceCompletedRegistration(state, action) {
12962
13907
  case "tickets-completed":
12963
13908
  case "set-tickets-count":
12964
13909
  case "eligibility-updated":
13910
+ case "selection-payment-updated":
12965
13911
  case "set-manual-payment-selection": return state;
12966
- default: return assertNever$1(action);
13912
+ default: return assertNever$2(action);
12967
13913
  }
12968
13914
  }
12969
13915
  /** A lookup can restore only the active request, never a completed or replaced draft. */
@@ -13019,10 +13965,10 @@ function applyWaitlistClaimLookup(state, action) {
13019
13965
  action: "none"
13020
13966
  }
13021
13967
  };
13022
- default: return assertNever$1(restoration);
13968
+ default: return assertNever$2(restoration);
13023
13969
  }
13024
13970
  }
13025
- default: return assertNever$1(lookup);
13971
+ default: return assertNever$2(lookup);
13026
13972
  }
13027
13973
  }
13028
13974
  /** Completion remembers places; resetting the draft leaves this visit's outcomes intact. */
@@ -13118,7 +14064,7 @@ function registrationPresentation(state, route) {
13118
14064
  layout: "whole",
13119
14065
  screen: "paymentFailed"
13120
14066
  };
13121
- default: return assertNever$1(step);
14067
+ default: return assertNever$2(step);
13122
14068
  }
13123
14069
  }
13124
14070
  /**
@@ -13191,4 +14137,4 @@ function registrationStepLabel(step, context) {
13191
14137
  }
13192
14138
  }
13193
14139
  //#endregion
13194
- export { withOfferedEvent as $, RichText as $a, resolveBookingPaymentChoice as $i, getTicketSelectionTotal as $n, decideSelectionAttendance as $o, resolveSelectionBookingClosedDetail as $r, runNeedsPricingChoice as $t, visitorHoldsOwnPlace as A, bookingPageKindSchema as Aa, appointmentQuestionsRefusal as Ai, formatEventDateTime as An, systemCustomizeFacetDefinitionsForBlock as Ao, buildPassCartItem as Ar, publicEventPricingDisplay as As, eventSignInRestoration as At, calculateEventRegistrationPreviewTotal as B, canJoinEventWaitlistOnAnyMode as Ba, toBookingQuestionsPaymentSnapshot as Bi, isEmailAddress as Bn, inlineTextToPlainText as Bo, eventRegistrationPageSurfaceSubjectSchema as Br, withoutKeptAnswers as Bt, registrationStopsHere as C, createHostedBlockApiConfig as Ca, selectedBookingCollectionOptionKind as Ci, selectionCombinationHint as Cn, renderVideo as Co, formatCommercePrice as Cr, EVENT_ADDRESS_AFTER_BOOKING_LABEL as Cs, getRegistrationStartAt as Ct, resolveRegistrationTicketContinuation as D, leavePage as Da, resolveSelectedAppointmentConsent as Di, findSelectedTicketType as Dn, resolveMediaNodeResponsiveImage as Do, membershipClassesLabel as Dr, formatEventPricing as Ds, EVENT_SIGN_IN_FORM_ID as Dt, resolveRegistrationAvailabilityBlocker as E, canonicalUrl as Ea, projectSelectedAppointmentConsentIntoForm as Ei, serverPricedTotalCents as En, resolveImageUrlWithContext as Eo, membershipCardListContent as Er, formatBookingPriceDisplay as Es, toWholeSeriesRegistrationEvents as Et, resolveHeadlessEventRegistrationStatus as F, formatEventLocation as Fa, decideBookingQuestionsRestoration as Fi, getTicketTypeAvailabilityLabel as Fn, SECTION_STATE_KINDS as Fo, reduceCommerceCart as Fr, parseSiteId as Fs, deriveRunRequirements as Ft, BROWSER_DRAFT_LIFETIME_MS as G, getEventAvailabilityStatus as Ga, applyBookingPaymentAdmission as Gi, getTicketSelectionRemainingPlaces as Gn, resolveLookMediaFrame as Go, getPublicEventCanonicalPath as Gr, decideSelectionPayment as Gt, buildReviewedBookingPaymentViewModel as H, formatRemainingPlaces as Ha, formatPrice as Hi, getRegistrationOccurrenceId as Hn, parseInlineTextFromUnknown as Ho, resolveEventRegistrationChoices as Hr, SELECTION_LIMIT_NOTE as Ht, resolveHeadlessEventRegistrationView as I, resolveRuntimeEventDestination as Ia, deriveBookingQuestions as Ii, getVisibleTicketTypes as In, sectionStateToneFromKind as Io, resolveSelectedProduct as Ir, unsafeAsSiteId as Is, nextRunToRead as It, restorableBrowserDraftCode as J, selectEventCapacitySource as Ja, bookingRequiresResourceSelection as Ji, shouldLoadRegistrationOptions as Jn, resolveDateRuntimeContext as Jo, planOrdinarySeriesSelection as Jr, planSelectionPrice as Jt, registrationBrowserDraft as K, getRemainingPlaces as Ka, bookingHasPackagePaymentChoices as Ki, parseCurrencyInputToCents as Kn, parseBlockColorToken as Ko, isOrdinaryPublicEvent as Kr, effectiveSelection as Kt, toHeadlessPaymentSelection as L, hasEventBookingClosedEarly as La, needsBookingQuestionsRefresh as Li, occurrenceTitleOverride as Ln, asPartialObject as Lo, closedDatesCopy as Lr, parseEventSeriesId as Ls, runFieldErrors as Lt, isEventRegistrationAvailable as M, eventOnlinePlace as Ma, isAppointmentBookingQuestionsEvent as Mi, formatTime as Mn, heroTitleSizeOptions as Mo, deriveCommerceCheckoutState as Mr, publicEventPricingType as Ms, buildSelectionRequirementsSubmission as Mt, normalizeEventRegistrationMaxTickets as N, eventPlaceName as Na, needsAppointmentQuestionsRefresh as Ni, getImplicitSingleTicketType as Nn, createAspectRatioField as No, parseStoredCommerceCartState as Nr, resolveExactOrFreePriceDisplay as Ns, checkRunRequirements as Nt, settledRemainingPlaces as O, pageNavigationSchema as Oa, EMPTY_APPOINTMENT_BOOKING_QUESTIONS as Oi, formatBookingWhen as On, resolvePublicMediaUrl as Oo, passCardListContent as Or, isPublicEventPricingOptionDisplayable as Os, eventSignInDraftStore as Ot, resolveEventRegistrationSubmitPlan as P, eventVenuePlace as Pa, bookingQuestionsAnswerDraftSchema as Pi, getPortalSubjectEmail as Pn, uiTransforms as Po, productItemKey as Pr, resolvePricingOptionsPriceDisplay as Ps, decideSelectionRequirementsLayout as Pt, invitationBooking as Q, isBlockButtonRole as Qa, resolveBookingPaymentAvailability as Qi, getTicketLineQuantity as Qn, INCOMPATIBLE_ATTENDANCE_MESSAGE as Qo, registrationDataForEventSelection as Qr, runChoiceUsable as Qt, toInternalPaymentSelection as R, isBookableEvent as Ra, restoreBookingQuestionsAnswers as Ri, transformRegistrationOptionsResponse as Rn, createTransformRegistry as Ro, closedRunCopy as Rr, unsafeAsEventCategoryId as Rs, runsKeepingAnswers as Rt, planRegistrationDetailsContinuation as S, browserReadAuthoritySchema as Sa, resolveLowestBookingPaymentStep as Si, paymentCaption as Sn, renderAudio as So, buildProductListDisplay as Sr, parseNewsletterListId as Ss, resolveFinishedPresentation as St, resolveRegistrationAdmission as T, PAGE_NAVIGATION as Ta, toSelectedCollectionOptionKind as Ti, selectionPreviewLines as Tn, resolveImageUrl as To, formatValidity as Tr, EVENT_PRESET_VOCABULARY as Ts, toWholeSeriesRegistrationEvent as Tt, paymentChoiceDetails as U, formatTotalCapacity as Ua, BOOKING_FORM_DATA_RESERVED_KEYS as Ui, getSlidingScaleForEvent as Un, plainTextToInlineText as Uo, resolveEventRegistrationScopedEvents as Ur, SEVERAL_BOOKINGS_ACCOUNT_NOTE as Ut, buildBookingPaymentSelectionViewModel as V, formatEventRemainingPlaces as Va, formatCentsAsCurrencyInput as Vi, getCurrentTicketSelection as Vn, isInlineTextEmpty as Vo, normalizeEventRegistrationPageSurfaceSubject as Vr, paymentReturnRestoration as Vt, paymentChoicePrice as W, getEventAvailability as Wa, BOOKING_FORM_DATA_RESERVED_KEY_VALUES as Wi, getSlidingScaleSelectionMessage as Wn, generateLookMediaFrameCss as Wo, eventOccurrenceContext as Wr, canToggleSelectionItem as Wt, createRegistrationDraftData as X, BLOCK_BUTTON_ROLE_OPTIONS as Xa, resolveBookingPackagePaymentSelection as Xi, canRequestTicketOption as Xn, parseAspectRatioValue as Xo, planWholeSeriesParentSelection as Xr, quoteReductions as Xt, beginWaitlistInvitation as Y, selectMostOpenCapacitySource as Ya, reconcileBookingPackagePurchase as Yi, withRegistrationAvailability as Yn, sanitizeHref as Yo, planWholeSeriesParentBooking as Yr, primarySelectionItem as Yt, invitationSubmission as Z, blockButtonRoleSchema as Za, resolveBookingPackageSources as Zi, getSingleSelectedPricingOptionId as Zn, isRecord$3 as Zo, planWholeSeriesRunSelection as Zr, registrationSelectionMode as Zt, closedAdmissionLabel as _, eventLayoutSchema as _a, resolveAppointmentCheckoutVerificationState as _i, toggleSelectionItem as _n, resolveEventTimeZone as _o, buildCartDisplay as _r, DEFAULT_MAILING_LIST_PRIVACY_NOTE as _s, roomSubmission as _t, registrationPresentation as a, createInteractiveIslandCodec as aa, deriveBookingFormViewState as ai, selectionEntitlementNote as an, formatCalendarTitle as ao, clearSignInReturnDrafts as ar, bookingCollectionDatesOpen as as, resolveRouteRequiresPayment as at, placeCountCeiling as b, registrationButtonVariantSchema as ba, resolveBookingSiteId as bi, combinationOffersOf as bn, computeMediaTransformStyle as bo, buildProductCardDisplay as br, parseMailchimpAudienceId as bs, toWaitlistClaimResolveFailure as bt, registrationStepLabelContext as c, defineClientOwnedBlockRuntime as ca, getBookingSuccessCopy as ci, selectionItemsLabel as cn, formatEventCompactDateRail as co, nextSignInReturnExpiry as cr, getStripeMinimumChargeRequirement as cs, validateFormData as ct, decideEventChoice as d, bookingNowSchema as da, isBookingServiceSlidingAmountInRange as di, selectionRowAvailability as dn, formatEventNextDateFact as do, sweepExpiredSignInReturnDrafts as dr, orderedLiveRunSessions as ds, dayOptionsOf as dt, resolveBookingPaymentMode as ea, selectionRepresentativeEvent as ei, runPricingChoice as en, buildCalendarViewport as eo, getTicketTypeLineMax as er, setRoomChoicePeople as es, buildRegistrationSelectionRequest as et, isRegistrationLocked as f, calendarTabViewsSchema as fa, isSameOpenCheckout as fi, selectionTicketInputs as fn, formatEventRunDates as fo, placesLeftLabel as fr, resolveWholeSeriesBookingPhase as fs, decideRoomStay as ft, shouldPromptForLogin as g, eventCalendarDisplayModeSchema as ga, prepareBookingSubmission as gi, summariseSelectionPayment as gn, groupEventsByDate as go, appliedDiscountHint as gr, resolveBookingSignupOffer as gs, roomChoiceMessage as gt, decideEventRegistrationPayment as h, eventCalendarDefaultViewSchema as ha, parseBookingCurrencyInputToCents as hi, severalRunsChoiceMessage as hn, formatTime$1 as ho, shownVenue as hr, parseMailingListRuntimeContext as hs, presentRoomChooser as ht, registrationPaymentRoute as i, buildInteractiveIslandProps as ia, readOverrideServiceCategories as ii, selectionConsentLabel as in, eventLocalDateKey as io, BOOKING_SIGN_IN_RETURN_PARAM as ir, planCheckoutPaymentFlow as is, resolveRegistrationTarget as it, deriveEventRegistrationSteps as j, bookingPresentation as ja, deriveAppointmentBookingQuestions as ji, formatRegistrationSchedule as jn, createImageShapeField as jo, buildProductCartItem as jr, publicEventPricingStrategy as js, toEventSignInDraft as jt, severalRunsNeedCard as k, requestSignIn as ka, applyAppointmentBookingQuestionsEvent as ki, formatDate as kn, resolveArrangementKnobs as ko, EMPTY_COMMERCE_CART_STATE as kr, publicEventPricingCurrency as ks, eventSignInEnds as kt, areEventRegistrationPaymentSelectionsEqual as l, defineProgressiveBlockRuntime as la, getRegistrationSuccessCopy as li, selectionPlacesLabel as ln, formatEventDateParts as lo, readSignInReturn as lr, CANCELLED_SESSION_STATUS as ls, ADD_A_PLACE as lt, buildEventRegistrationPaymentOptionsViewModel as m, eventButtonVariantSchema as ma, normalizeBookingServices as mi, severalItemsOf as mn, formatEventWeekdayTime as mo, resolveRegistrationDisplay as mr, resolveWholeSeriesRunLifecycle as ms, isRoomChoiceRefusal as mt, getEventSelectionMode as n, toBookingPurchasablePackages as na, bookingFormInteractiveIslandPropsCodec as ni, selectionAtLimit as nn, eventDateLocale as no, normalizeTicketSelectionLines as nr, eventRegistrationErrors as ns, resolveDiscountContext as nt, registrationRoute as o, defineInteractiveIslandMetaKeys as oa, formatBookingSubmissionPreparationError as oi, selectionIncludes as on, formatDate$1 as oo, createSignInReturnDraftStore as or, flexibleBalanceDueDay as os, toRegistrationRequestSubject as ot, registrationFlowReducer as p, columnOptionSchema as pa, normalizeBookingFormConfig as pi, severalConfirmationSentence as pn, formatEventTimeRange as po, registrationDisplaySchema as pr, resolveWholeSeriesPaymentDates as ps, defaultTicketOptions as pt, registrationBrowserDraftSchema as q, isEventFull as qa, bookingPackageRequestKey as qi, resolveHeldTicketPlaces as qn, readRuntimeNow as qo, planDropInPanel as qr, incompleteRunChoiceMessage as qt, panelShouldOpen as r, getBookingServiceSlidingScale as ra, buildBookingFormInteractiveIslandProps as ri, selectionConfirmationHint as rn, eventDateOptions as ro, setTicketLineQuantity as rr, parseEventRegistrationErrorReason as rs, resolveEventRequiresPayment as rt, registrationStepLabel as s, createZodCodec as sa, getBookingRedirectStateFromLocation as si, selectionItemPrice as sn, formatEventClockLabel as so, decideSignInReturn as sr, repriceBookingCollectionOptions as ss, registrationQuestionsMessage as st, REGISTRATION_STEP_LABELS as t, resolveBookingPurchasablePackages as ta, groupPublicEventsByRun as ti, runUnitPriceCents as tn, eventCalendarWeekStart as to, hasValidPricingOptionSelection as tr, eventRegistrationErrorEndsCommand as ts, findPreSelectedEvent as tt, createInitialRegistrationFlowState as u, isDecodeSuccess as ua, getShopSuccessCopy as ui, selectionPlacesNote as un, formatEventHourLabel as uo, signInReturnPath as ur, nextLiveRunSessionStartMs as us, bookingLines as ut, fullyBookedLabel as v, filterAutoShowSchema as va, resolveBookingPaymentStep as vi, combinationHintCopy as vn, ImagePresets as vo, buildCheckoutDisplay as vr, DEFAULT_MAILING_LIST_SUCCESS_MESSAGE as vs, selectRoomOffer as vt, resolveGuestNextStepCheck as w, getBlockApiReadStage as wa, snapshotBookingShownTerms as wi, selectionItemName as wn, resolveImageSourceSetWithContext as wo, formatInterval as wr, offeringLabelForPageSurfaceSubject as ws, toRegistrationEvents as wt, planRegistrationDetailsCheck as x, weekStartSchema as xa, resolveDefaultBookingServiceId as xi, combinationWorking as xn, mediaImageHostProps as xo, buildProductDetailDisplay as xr, parseMailchimpInterestId as xs, confirmationPaymentRows as xt, getTicketSelectionPurpose as y, previewStageSchema as ya, resolveBookingSelectedService as yi, combinationOfferLine as yn, MediaPlaceholder as yo, buildPassesMembershipsDisplay as yr, parseBrevoListId as ys, isSameWaitlistClaim as yt, onlineBookingUnavailableMessage as z, canJoinEventWaitlist as za, toBookingQuestionsAnswerDraft as zi, withOccurrenceTitle as zn, runTransforms as zo, closedDateCopy as zr, toRunRequirementsSnapshots as zt };
14140
+ export { deriveEventRegistrationSteps as $, weekStartSchema as $a, resolveDefaultBookingServiceId as $i, serverPricedTotalCents as $n, groupEventsByDate as $o, formatValidity as $r, resolveWholeSeriesBookingPhase as $s, toWholeSeriesRegistrationEvents as $t, ownCoverPaysEveryDate as A, resolveBookingPaymentAvailability as Aa, registrationDataForEventSelection as Ai, selectionConfirmationHint as An, isEventFull as Ao, normalizeTicketSelectionLines as Ar, readRuntimeNow as As, resolveEventRequiresPayment as At, closedAdmissionLabel as B, defineClientOwnedBlockRuntime as Ba, getBookingSuccessCopy as Bi, severalConfirmationSentence as Bn, eventDateOptions as Bo, placesLeftLabel as Br, eventRegistrationRefusalMessage as Bs, defaultTicketOptions as Bt, currentSelectionFundingLookup as C, applyBookingPaymentAdmission as Ca, parseSiteId as Cc, isDropInPublicEvent as Ci, primarySelectionItem as Cn, canJoinEventWaitlistOnAnyMode as Co, withRegistrationAvailability as Cr, inlineTextToPlainText as Cs, beginWaitlistInvitation as Ct, fundingOptionPick as D, reconcileBookingPackagePurchase as Da, planWholeSeriesParentBooking as Di, runPricingChoice as Dn, getEventAvailability as Do, getTicketSelectionTotal as Dr, generateLookMediaFrameCss as Ds, buildRegistrationSelectionRequest as Dt, fundingOptionKey as E, bookingRequiresResourceSelection as Ea, planOrdinarySeriesSelection as Ei, runNeedsPricingChoice as En, formatTotalCapacity as Eo, getTicketLineQuantity as Er, plainTextToInlineText as Es, withOfferedEvent as Et, selectionFundingRequest as F, getBookingServiceSlidingScale as Fa, buildBookingFormInteractiveIslandProps as Fi, selectionItemsLabel as Fn, isBlockButtonRole as Fo, decideSignInReturn as Fr, INCOMPATIBLE_ATTENDANCE_MESSAGE as Fs, validateFormData as Ft, planRegistrationDetailsContinuation as G, columnOptionSchema as Ga, normalizeBookingFormConfig as Gi, combinationHintCopy as Gn, formatEventCompactDateRail as Go, buildCartDisplay as Gr, repriceBookingCollectionOptions as Gs, selectRoomOffer as Gt, getTicketSelectionPurpose as H, isDecodeSuccess as Ha, getShopSuccessCopy as Hi, severalRunsChoiceMessage as Hn, formatCalendarTitle as Ho, resolveRegistrationDisplay as Hr, planCheckoutPaymentFlow as Hs, presentRoomChooser as Ht, buildEventRegistrationPaymentOptionsViewModel as I, buildInteractiveIslandProps as Ia, readOverrideServiceCategories as Ii, selectionPlacesLabel as In, RichText as Io, nextSignInReturnExpiry as Ir, decideSelectionAttendance as Is, ADD_A_PLACE as It, resolveRegistrationAdmission as J, eventCalendarDisplayModeSchema as Ja, prepareBookingSubmission as Ji, combinationWorking as Jn, formatEventNextDateFact as Jo, buildProductCardDisplay as Jr, formatCreditProductPayment as Js, confirmationPaymentRows as Jt, registrationStopsHere as K, eventButtonVariantSchema as Ka, normalizeBookingServices as Ki, combinationOfferLine as Kn, formatEventDateParts as Ko, buildCheckoutDisplay as Kr, getStripeMinimumChargeRequirement as Ks, isSameWaitlistClaim as Kt, buildSelectionCollectionOptions as L, createInteractiveIslandCodec as La, deriveBookingFormViewState as Li, selectionPlacesNote as Ln, buildCalendarViewport as Lo, readSignInReturn as Lr, setRoomChoicePeople as Ls, bookingLines as Lt, selectionFundingBasis as M, resolveBookingPaymentMode as Ma, selectionRepresentativeEvent as Mi, selectionEntitlementNote as Mn, selectMostOpenCapacitySource as Mo, BOOKING_SIGN_IN_RETURN_PARAM as Mr, sanitizeHref as Ms, resolveRouteRequiresPayment as Mt, selectionFundingFetchWanted as N, resolveBookingPurchasablePackages as Na, groupPublicEventsByRun as Ni, selectionIncludes as Nn, BLOCK_BUTTON_ROLE_OPTIONS as No, clearSignInReturnDrafts as Nr, parseAspectRatioValue as Ns, toRegistrationRequestSubject as Nt, initialSelectionFundingLookup as O, resolveBookingPackagePaymentSelection as Oa, planWholeSeriesParentSelection as Oi, runUnitPriceCents as On, getEventAvailabilityStatus as Oo, getTicketTypeLineMax as Or, resolveLookMediaFrame as Os, findPreSelectedEvent as Ot, selectionFundingReducer as P, toBookingPurchasablePackages as Pa, bookingFormInteractiveIslandPropsCodec as Pi, selectionItemPrice as Pn, blockButtonRoleSchema as Po, createSignInReturnDraftStore as Pr, isRecord$3 as Ps, registrationQuestionsMessage as Pt, visitorHoldsOwnPlace as Q, registrationButtonVariantSchema as Qa, resolveBookingSiteId as Qi, selectionPreviewLines as Qn, formatTime$1 as Qo, formatInterval as Qr, orderedLiveRunSessions as Qs, toWholeSeriesRegistrationEvent as Qt, decideEventRegistrationPayment as R, defineInteractiveIslandMetaKeys as Ra, formatBookingSubmissionPreparationError as Ri, selectionRowAvailability as Rn, eventCalendarWeekStart as Ro, signInReturnPath as Rr, eventRegistrationErrorEndsCommand as Rs, dayOptionsOf as Rt, chosenFundingOption as S, BOOKING_FORM_DATA_RESERVED_KEY_VALUES as Sa, resolvePricingOptionsPriceDisplay as Sc, getPublicEventCanonicalPath as Si, planSelectionPrice as Sn, canJoinEventWaitlist as So, shouldLoadRegistrationOptions as Sr, runTransforms as Ss, entryStart as St, fundingMoneyDates as T, bookingPackageRequestKey as Ta, planDropInPanel as Ti, runChoiceUsable as Tn, formatRemainingPlaces as To, getSingleSelectedPricingOptionId as Tr, parseInlineTextFromUnknown as Ts, invitationBooking as Tt, placeCountCeiling as U, bookingNowSchema as Ua, isBookingServiceSlidingAmountInRange as Ui, summariseSelectionPayment as Un, formatDate$1 as Uo, shownVenue as Ur, bookingCollectionDatesOpen as Us, roomChoiceMessage as Ut, fullyBookedLabel as V, defineProgressiveBlockRuntime as Va, getRegistrationSuccessCopy as Vi, severalItemsOf as Vn, eventLocalDateKey as Vo, registrationDisplaySchema as Vr, parseEventRegistrationErrorReason as Vs, isRoomChoiceRefusal as Vt, planRegistrationDetailsCheck as W, calendarTabViewsSchema as Wa, isSameOpenCheckout as Wi, toggleSelectionItem as Wn, formatEventClockLabel as Wo, appliedDiscountHint as Wr, flexibleBalanceDueDay as Ws, roomSubmission as Wt, resolveRegistrationTicketContinuation as X, filterAutoShowSchema as Xa, resolveBookingPaymentStep as Xi, selectionCombinationHint as Xn, formatEventTimeRange as Xo, buildProductListDisplay as Xr, CANCELLED_SESSION_STATUS as Xs, getRegistrationStartAt as Xt, resolveRegistrationAvailabilityBlocker as Y, eventLayoutSchema as Ya, resolveAppointmentCheckoutVerificationState as Yi, paymentCaption as Yn, formatEventRunDates as Yo, buildProductDetailDisplay as Yr, formatCreditProductUnits as Ys, resolveFinishedPresentation as Yt, settledRemainingPlaces as Z, previewStageSchema as Za, resolveBookingSelectedService as Zi, selectionItemName as Zn, formatEventWeekdayTime as Zo, formatCommercePrice as Zr, nextLiveRunSessionStartMs as Zs, toRegistrationEvents as Zt, pickCollections as _, toBookingQuestionsAnswerDraft as _a, publicEventPricingCurrency as _c, eventRegistrationPageSurfaceSubjectSchema as _i, SEVERAL_BOOKINGS_ACCOUNT_NOTE as _n, resolveEventCta as _o, getSlidingScaleForEvent as _r, uiTransforms as _s, bookingOccurrenceContext as _t, registrationPresentation as a, resolveSelectedAppointmentConsent as aa, DEFAULT_MAILING_LIST_SUCCESS_MESSAGE as ac, buildProductCartItem as ai, buildSelectionRequirementsSubmission as an, leavePage as ao, formatRunScheduleLines as ar, renderAudio as as, toHeadlessPaymentSelection as at, selectionPaysNothing as b, formatPrice as ba, publicEventPricingType as bc, resolveEventRegistrationScopedEvents as bi, effectiveSelection as bn, isBookableEvent as bo, parseCurrencyInputToCents as br, asPartialObject as bs, entryPageEvent as bt, registrationStepLabelContext as c, appointmentQuestionsRefusal as ca, parseMailchimpInterestId as cc, productItemKey as ci, deriveRunRequirements as cn, bookingPageKindSchema as co, getPortalSubjectEmail as cr, resolveImageUrl as cs, calculateEventRegistrationPreviewTotal as ct, decideEventChoice as d, needsAppointmentQuestionsRefresh as da, getBookingInstalmentProtectedDepositAmountCents as dc, closedDateListCopy as di, runsKeepingAnswers as dn, eventPlaceName as do, occurrenceTitleOverride as dr, resolvePublicMediaUrl as ds, paymentChoiceDetails as dt, resolveLowestBookingPaymentStep as ea, resolveWholeSeriesPaymentDates as ec, membershipCardListContent as ei, EVENT_SIGN_IN_FORM_ID as en, browserReadAuthoritySchema as eo, findSelectedTicketType as er, resolveEventTimeZone as es, isEventRegistrationAvailable as et, isRegistrationLocked as f, bookingQuestionsAnswerDraftSchema as fa, offeringLabelForPageSurfaceSubject as fc, closedDatesCopy as fi, toRunRequirementsSnapshots as fn, eventVenuePlace as fo, transformRegistrationOptionsResponse as fr, resolveArrangementKnobs as fs, paymentChoicePrice as ft, paymentOptionFor as g, restoreBookingQuestionsAnswers as ga, isPublicEventPricingOptionDisplayable as gc, cutOffDateCopy as gi, SELECTION_LIMIT_NOTE as gn, resolveEventCardBooking as go, getRegistrationOccurrenceId as gr, createAspectRatioField as gs, restorableBrowserDraftCode as gt, moneyCollections as h, needsBookingQuestionsRefresh as ha, formatEventPricing as hc, closedDateCopy as hi, ATTENDANCE_CHOICE_MESSAGE as hn, eventDestinationPagePath as ho, getCurrentTicketSelection as hr, heroTitleSizeOptions as hs, registrationBrowserDraftSchema as ht, registrationPaymentRoute as i, projectSelectedAppointmentConsentIntoForm as ia, DEFAULT_MAILING_LIST_PRIVACY_NOTE as ic, buildPassCartItem as ii, toEventSignInDraft as in, canonicalUrl as io, formatRegistrationSchedule as ir, mediaImageHostProps as is, resolveHeadlessEventRegistrationView as it, selectionDatesQuote as j, resolveBookingPaymentChoice as ja, resolveSelectionBookingClosedDetail as ji, selectionConsentLabel as jn, selectEventCapacitySource as jo, setTicketLineQuantity as jr, resolveDateRuntimeContext as js, resolveRegistrationTarget as jt, lookupChosenOption as k, resolveBookingPackageSources as ka, planWholeSeriesRunSelection as ki, selectionAtLimit as kn, getRemainingPlaces as ko, hasValidPricingOptionSelection as kr, parseBlockColorToken as ks, resolveDiscountContext as kt, areEventRegistrationPaymentSelectionsEqual as l, deriveAppointmentBookingQuestions as la, parseNewsletterListId as lc, reduceCommerceCart as li, nextRunToRead as ln, bookingPresentation as lo, getTicketTypeAvailabilityLabel as lr, resolveImageUrlWithContext as ls, buildBookingPaymentSelectionViewModel as lt, collectionsOf as m, deriveBookingQuestions as ma, formatBookingPriceDisplay as mc, bookElsewhereDateCopy as mi, paymentReturnRestoration as mn, eventDestinationBookingLink as mo, isEmailAddress as mr, createImageShapeField as ms, registrationBrowserDraft as mt, getEventSelectionMode as n, snapshotBookingShownTerms as na, parseMailingListRuntimeContext as nc, passCardListContent as ni, eventSignInEnds as nn, getBlockApiReadStage as no, formatDate as nr, MediaPlaceholder as ns, resolveEventRegistrationSubmitPlan as nt, registrationRoute as o, EMPTY_APPOINTMENT_BOOKING_QUESTIONS as oa, parseBrevoListId as oc, deriveCommerceCheckoutState as oi, checkRunRequirements as on, pageNavigationSchema as oo, formatTime as or, renderVideo as os, toInternalPaymentSelection as ot, registrationFlowReducer as p, decideBookingQuestionsRestoration as pa, EVENT_PRESET_VOCABULARY as pc, closedRunCopy as pi, withoutKeptAnswers as pn, formatEventLocation as po, withOccurrenceTitle as pr, systemCustomizeFacetDefinitionsForBlock as ps, BROWSER_DRAFT_LIFETIME_MS as pt, resolveGuestNextStepCheck as q, eventCalendarDefaultViewSchema as qa, parseBookingCurrencyInputToCents as qi, combinationOffersOf as qn, formatEventHourLabel as qo, buildPassesMembershipsDisplay as qr, formatCreditProductBalance as qs, toWaitlistClaimResolveFailure as qt, panelShouldOpen as r, toSelectedCollectionOptionKind as ra, resolveBookingSignupOffer as rc, EMPTY_COMMERCE_CART_STATE as ri, eventSignInRestoration as rn, PAGE_NAVIGATION as ro, formatEventDateTime as rr, computeMediaTransformStyle as rs, resolveHeadlessEventRegistrationStatus as rt, registrationStepLabel as s, applyAppointmentBookingQuestionsEvent as sa, parseMailchimpAudienceId as sc, parseStoredCommerceCartState as si, decideSelectionRequirementsLayout as sn, requestSignIn as so, getImplicitSingleTicketType as sr, resolveImageSourceSetWithContext as ss, onlineBookingUnavailableMessage as st, REGISTRATION_STEP_LABELS as t, selectedBookingCollectionOptionKind as ta, resolveWholeSeriesRunLifecycle as tc, membershipClassesLabel as ti, eventSignInDraftStore as tn, createHostedBlockApiConfig as to, formatBookingWhen as tr, ImagePresets as ts, normalizeEventRegistrationMaxTickets as tt, createInitialRegistrationFlowState as u, isAppointmentBookingQuestionsEvent as ua, EVENT_ADDRESS_AFTER_BOOKING_LABEL as uc, resolveSelectedProduct as ui, runFieldErrors as un, eventOnlinePlace as uo, getVisibleTicketTypes as ur, resolveMediaNodeResponsiveImage as us, buildReviewedBookingPaymentViewModel as ut, runsSelectionPaymentRequest as v, toBookingQuestionsPaymentSnapshot as va, publicEventPricingDisplay as vc, normalizeEventRegistrationPageSurfaceSubject as vi, attendanceChoicePending as vn, resolveEventPageLink as vo, getSlidingScaleSelectionMessage as vr, SECTION_STATE_KINDS as vs, decideRegistrationEntry as vt, fundingChoice as w, bookingHasPackagePaymentChoices as wa, unsafeAsSiteId as wc, isOrdinaryPublicEvent as wi, quoteReductions as wn, formatEventRemainingPlaces as wo, canRequestTicketOption as wr, isInlineTextEmpty as ws, invitationSubmission as wt, cardStepServesDates as x, BOOKING_FORM_DATA_RESERVED_KEYS as xa, resolveExactOrFreePriceDisplay as xc, eventOccurrenceContext as xi, incompleteRunChoiceMessage as xn, isInBookingCutOffWindow as xo, resolveHeldTicketPlaces as xr, createTransformRegistry as xs, entrySelectionMode as xt, selectionItemLabels as y, formatCentsAsCurrencyInput as ya, publicEventPricingStrategy as yc, resolveEventRegistrationChoices as yi, canToggleSelectionItem as yn, resolveRuntimeEventDestination as yo, getTicketSelectionRemainingPlaces as yr, sectionStateToneFromKind as ys, entryChoosesEvent as yt, shouldPromptForLogin as z, createZodCodec as za, getBookingRedirectStateFromLocation as zi, selectionTicketInputs as zn, eventDateLocale as zo, sweepExpiredSignInReturnDrafts as zr, eventRegistrationErrors as zs, decideRoomStay as zt };