@riverbankcms/sdk 0.178.0 → 0.180.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.
- package/README.md +15 -8
- package/dist/_dts/{BlocksIslandsHydrator-CrKsXtpD.d.ts → BlocksIslandsHydrator-DC_AvZwy.d.ts} +1 -1
- package/dist/_dts/{Page-C9i27wZA.d.ts → Page-DQOxVtp3.d.ts} +7 -7
- package/dist/_dts/{SdkPreviewMode-DzGSR3jh.d.ts → SdkPreviewMode-DrLgY9_f.d.ts} +3 -2
- package/dist/_dts/{client-BnYN6XsH.d.ts → client-BP7VBRvs.d.ts} +281 -72
- package/dist/_dts/{content-types-CXj6lp3d.d.ts → content-types-1-K2qi__.d.ts} +2 -2
- package/dist/_dts/{contracts-BZLwkTwL.d.ts → contracts-Dfqz0Tcu.d.ts} +6 -116
- package/dist/_dts/{generatePageMetadata-ByEWwe9j.d.ts → generatePageMetadata-CSfAqmry.d.ts} +2 -2
- package/dist/_dts/{index-BE9dWIsr.d.ts → index-B0_2-65A.d.ts} +3 -3
- package/dist/_dts/{index-0HFgCnGz.d.ts → index-BeM5Ylwf.d.ts} +5 -3
- package/dist/_dts/{index-D9-N1d9v.d.ts → index-Blrw2oVk.d.ts} +1 -1
- package/dist/_dts/{index-cTpvQg_Q.d.ts → index-CB5Csefo.d.ts} +2 -2
- package/dist/_dts/{index-nnEdgc3Z.d.ts → index-DCcxLa8p.d.ts} +4 -2
- package/dist/_dts/{index-DCa-8TEY.d.ts → index-DQBGwBPx.d.ts} +1 -1
- package/dist/_dts/{index-CKDRr54L.d.ts → index-DQr358-m.d.ts} +4 -4
- package/dist/_dts/{loadContent-DYkVV6w4.d.ts → loadContent-BG2tLGXj.d.ts} +15 -13
- package/dist/_dts/{request-B20VRWHH.d.ts → request-P08l6mkr.d.ts} +3641 -994
- package/dist/_dts/{resolveBlockData-C_aK5GIS.d.ts → resolveBlockData-BDHc8lFs.d.ts} +8 -5
- package/dist/_dts/resolvePageContent-Y3IZBbtL.d.ts +61 -0
- package/dist/_dts/sdk/src/bookings/index.d.ts +2 -2
- package/dist/_dts/sdk/src/client/types.d.ts +3 -3
- package/dist/_dts/sdk/src/client.d.ts +7 -7
- package/dist/_dts/sdk/src/config/index.d.ts +6 -6
- package/dist/_dts/sdk/src/config/template-validation.d.ts +1 -1
- package/dist/_dts/sdk/src/config/validation.d.ts +1 -1
- package/dist/_dts/sdk/src/data/dataLoaderContext.d.ts +2 -2
- package/dist/_dts/sdk/src/data/resolveBlockData.d.ts +1 -1
- package/dist/_dts/sdk/src/data/types.d.ts +7 -2
- package/dist/_dts/sdk/src/gifting/client.d.ts +1 -1
- package/dist/_dts/sdk/src/index.d.ts +8 -8
- package/dist/_dts/sdk/src/manifest/index.d.ts +3 -3
- package/dist/_dts/sdk/src/metadata/index.d.ts +1 -1
- package/dist/_dts/sdk/src/navigation/index.d.ts +3 -3
- package/dist/_dts/sdk/src/next/index.d.ts +16 -8
- package/dist/_dts/sdk/src/next/middleware.d.ts +2 -2
- package/dist/_dts/sdk/src/page-converter/index.d.ts +3 -3
- package/dist/_dts/sdk/src/portal/client.d.ts +3 -3
- package/dist/_dts/sdk/src/prebuild/index.d.ts +1 -1
- package/dist/_dts/sdk/src/preview-next/before-render.d.ts +2 -2
- package/dist/_dts/sdk/src/preview-next/client/index.d.ts +2 -2
- package/dist/_dts/sdk/src/preview-next/client/runtime.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/client.d.ts +2 -2
- package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +4 -4
- package/dist/_dts/sdk/src/rendering/index.d.ts +7 -7
- package/dist/_dts/sdk/src/rendering/islands/client.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/server.d.ts +3 -3
- package/dist/_dts/sdk/src/rendering/themeAdmission.d.ts +1 -1
- package/dist/_dts/sdk/src/routing/index.d.ts +19 -6
- package/dist/_dts/sdk/src/server.d.ts +5 -5
- package/dist/_dts/sdk/src/spam-protection/index.d.ts +2 -2
- package/dist/_dts/sdk/src/theme/index.d.ts +1 -1
- package/dist/_dts/serviceBookingOutline-BvtNagjw.d.ts +583 -0
- package/dist/_dts/{types-CYcd15BQ.d.ts → types-BrK6SS5c.d.ts} +9 -7
- package/dist/_dts/{types-CMZ5mkpv.d.ts → types-DpEAnP4F.d.ts} +10 -39
- package/dist/_dts/{types-rm2M4LGx.d.ts → types-HAy1-Jjo.d.ts} +3 -3
- package/dist/_dts/{validation-BSxnRhyy.d.ts → validation-D6q3tOBA.d.ts} +4 -4
- package/dist/client/{BlocksIslandsHydrator-D1n09bu-.mjs → BlocksIslandsHydrator-DJSmdNUJ.mjs} +17 -18
- package/dist/client/{BookingMailingListNote-DSD4gS96.mjs → BookingMailingListNote-CGxg37zx.mjs} +92 -60
- package/dist/client/{BookingQuestionFields-B57oGPcj.mjs → BookingQuestionFields-DXegGSnS.mjs} +26 -5
- package/dist/client/{CalendarNavigationChevron-qXvsFYOg.mjs → CalendarNavigationChevron-VfP50sYm.mjs} +42 -9
- package/dist/client/{CheckboxChoice-b-PJLEXe.mjs → CheckboxChoice-BZPLCgTU.mjs} +1 -1
- package/dist/client/{DemoBookingPortalAccess-Olvrwi3Z.mjs → DemoBookingPortalAccess-0Ua44F1j.mjs} +13 -8
- package/dist/client/{EventCalendar.client-DwFNFb-0.mjs → EventCalendar.client-CrpiyDSP.mjs} +10 -10
- package/dist/client/{EventCombined.client-Ffu-aVOb.mjs → EventCombined.client-D0me9wnz.mjs} +10 -10
- package/dist/client/{EventEmbeddedCheckoutStep-B18VbNS_.mjs → EventEmbeddedCheckoutStep-BDnicDM6.mjs} +1 -1
- package/dist/client/{EventItem-b8tVkNHA.mjs → EventItem-CJITrGkF.mjs} +249 -8
- package/dist/client/{EventListWeekNavigation-BxnJW_Gf.mjs → EventListWeekNavigation-BlEm_xjq.mjs} +1 -1
- package/dist/client/{EventListing.client-ViCnrNg4.mjs → EventListing.client-BNM_HuS0.mjs} +3 -3
- package/dist/client/{EventListing.view-CdjiepMf.mjs → EventListing.view-CXfb7RRy.mjs} +7 -16
- package/dist/client/{EventRegistrationPayment-BVd70XkH.mjs → EventRegistrationPayment-DiD9uYs6.mjs} +1439 -293
- package/dist/client/{Page-DqETUt-U.mjs → Page-bX7iy_MK.mjs} +24299 -20103
- package/dist/client/{ProtectedSubmitButton-C-ql101B.mjs → ProtectedSubmitButton-De6AzhE6.mjs} +1 -1
- package/dist/client/{SiteTermsAgreementField-DkFnbzf_.mjs → SiteTermsAgreementField-BAdW5DvE.mjs} +23 -16
- package/dist/client/{BookingPanelArrangement--EkA1ZQd.mjs → StepIndicator-DCfdcb7s.mjs} +12 -12
- package/dist/client/{StepIndicator-JO2PS03n.mjs → StepIndicator-DCqorVne.mjs} +7 -7
- package/dist/client/{TabBarFragment-BqfRLojo.mjs → TabBarFragment-DlKQRhP4.mjs} +1 -1
- package/dist/client/{ThemedButton-DuaYtnvG.mjs → ThemedButton-CnSa7o-I.mjs} +66 -66
- package/dist/client/{accessibleSurfaces-DN8it_Cx.mjs → accessibleSurfaces-Wl8-_OVJ.mjs} +1 -1
- package/dist/client/{accordion-XgNxl0Wg.mjs → accordion-wofJY8xY.mjs} +1 -1
- package/dist/client/{booking-form.client-ljJoDwuI.mjs → booking-form.client-CYl9NrqS.mjs} +412 -79
- package/dist/client/{bookingForm-DtEHwY4W.mjs → bookingForm-kgVWtuMe.mjs} +4 -4
- package/dist/client/bookings.mjs +40 -10
- package/dist/client/{boxStyleClassNames-BHoMAcun.mjs → boxStyleClassNames-CQHWz5gJ.mjs} +19 -19
- package/dist/client/{carousel-B3UhbFu7.mjs → carousel-BE1dEFsD.mjs} +2 -2
- package/dist/client/{carousel.client-h65clfUO.mjs → carousel.client-DMtGYTTM.mjs} +1 -1
- package/dist/client/{cart-DzOJfYOR.mjs → cart-BsjsdGZE.mjs} +3 -3
- package/dist/client/{cart.client-DBG77v-5.mjs → cart.client-DylGUWXY.mjs} +1 -1
- package/dist/client/{checkout-LmePoEgM.mjs → checkout-B5KxEUDr.mjs} +3 -3
- package/dist/client/{checkout.client-DmgZuLBT.mjs → checkout.client-C98fhch3.mjs} +1 -1
- package/dist/client/{checkoutUrls-CMZI8o_V.mjs → checkoutUrls-BMLYTf38.mjs} +1 -1
- package/dist/client/client.mjs +502 -341
- package/dist/client/constants-PfYJsEZF.mjs +101 -0
- package/dist/client/{context-CJIz4FdL.mjs → context-DtKdUdkO.mjs} +200 -27
- package/dist/client/{dateFormatting-UoXqBh10.mjs → dateFormatting-BaGPvQS3.mjs} +1 -1
- package/dist/client/{demoPortalMagicLink-6CgFZNvu.mjs → demoPortalMagicLink-B8eDjhuG.mjs} +1 -1
- package/dist/client/{enhanceHeaderSection-DaMo6len.mjs → enhanceHeaderSection-DvhD-8eE.mjs} +4 -4
- package/dist/client/{event-registration.client-b6APrFQe.mjs → event-registration.client-Du9a_xAN.mjs} +1982 -1519
- package/dist/client/{eventCalendar-DJYz7yZf.mjs → eventCalendar-Di9wDfzl.mjs} +4 -4
- package/dist/client/{eventCombined-j9VCVgMW.mjs → eventCombined-CNW6nBsB.mjs} +4 -4
- package/dist/client/{eventListing-DWgpGuFM.mjs → eventListing-CQMxQ8By.mjs} +4 -4
- package/dist/client/{eventRegistration-DCinRot3.mjs → eventRegistration-CprS9k1D.mjs} +4 -4
- package/dist/client/events-9LPvwbWp.mjs +28 -0
- package/dist/client/{form-BBBtRwvy.mjs → form-Zl1_8RJ6.mjs} +3 -3
- package/dist/client/{form.client-CZeRQLGF.mjs → form.client-TaMUys6I.mjs} +5 -5
- package/dist/client/{form.parts-DhGGv4_L.mjs → form.parts-CpNPbPPM.mjs} +3 -3
- package/dist/client/{formatDate-DVFVDcDW.mjs → formatDate-hhI1-tzt.mjs} +1 -1
- package/dist/client/gifting/client.mjs +6 -6
- package/dist/client/{gifting-Di9-SpwW.mjs → gifting-DNVa7-Wj.mjs} +4 -4
- package/dist/client/{gifting.client-CjT5PrAZ.mjs → gifting.client-CFUq3GVx.mjs} +5 -5
- package/dist/client/{gifting.parts-ffP6mjMd.mjs → gifting.parts-CDQvxA4A.mjs} +2 -2
- package/dist/client/{headerSection-jjAvtSZk.mjs → headerSection-Cg6083rn.mjs} +2 -2
- package/dist/client/{lookSurfaces-C2VzJfyG.mjs → lookSurfaces-gJ3OqPf9.mjs} +258 -86
- package/dist/client/{newsletter-form.client-D45frHoa.mjs → newsletter-form.client-VuL9I96G.mjs} +6 -6
- package/dist/client/{shop.interactive-D7wky1GL.mjs → newsletter-form.interactive-7Of3eYn0.mjs} +4023 -4029
- package/dist/client/{newsletter-form.parts-CHdg82ct.mjs → newsletter-form.parts-OBqsfT24.mjs} +2 -2
- package/dist/client/{newsletterForm-tS465_vl.mjs → newsletterForm-BkJe_RTv.mjs} +3 -3
- package/dist/client/portal/client.mjs +301 -117
- package/dist/client/{product-detail.client-DIWSeW7P.mjs → product-detail.client-B2hdxqJN.mjs} +1 -1
- package/dist/client/{product-list.client-BRf14h_e.mjs → product-list.client-CCEgu9rx.mjs} +1 -1
- package/dist/client/{productDetail-gxF5whea.mjs → productDetail-CRX_ZRfS.mjs} +3 -3
- package/dist/client/{productList-B9t0XJrN.mjs → productList-BAdJ6z5S.mjs} +3 -3
- package/dist/client/{propsDecoder-Db8wAmgr.mjs → propsDecoder-BLKAmX0S.mjs} +2 -48
- package/dist/client/{registry.server-Bn0gE0uP.mjs → registry.server-Bj9cmHHF.mjs} +10464 -9113
- package/dist/client/rendering/client.mjs +41 -27
- package/dist/client/rendering/islands.mjs +1 -1
- package/dist/client/rendering.mjs +23 -2836
- package/dist/client/{richText-coerce-COnKrLO7.mjs → richText-coerce-Z45OLLEX.mjs} +1 -1
- package/dist/client/{routeIslandApiConfig-Bok1Oy50.mjs → routeIslandApiConfig-DHpTTK77.mjs} +1 -1
- package/dist/client/runtimeResponse-D2j2-mOk.mjs +3 -0
- package/dist/client/{runtimeResponse-9v8q2NBc.mjs → runtimeResponse-DtWSfWSZ.mjs} +1 -1
- package/dist/client/{shop-D1oTPDxm.mjs → shop-BKsgxm_-.mjs} +3 -3
- package/dist/client/{shop-commerce-DyMZLC0a.mjs → shop-commerce-Cbtk_kUW.mjs} +14 -14
- package/dist/client/{shop-commerce-store-FODNS63D.mjs → shop-commerce-store-B-rv2p5h.mjs} +1 -1
- package/dist/client/{shop-discount-apply.state-C4xcmFzZ.mjs → shop-discount-apply.state-CiCDLNh7.mjs} +2 -2
- package/dist/client/{shop.client-CRgRulfI.mjs → shop.client-Rnqa74Tk.mjs} +14 -14
- package/dist/client/{shopShared-Bd_hy9ZO.mjs → shopShared-BaBfhjCq.mjs} +2 -2
- package/dist/client/spam-protection.mjs +1 -1
- package/dist/client/{noop-D11X-B6n.mjs → src-o7WEvbK1.mjs} +398 -308
- package/dist/client/{timetableModel-UlWfP1gh.mjs → timetableModel-BOff1Kk5.mjs} +259 -11
- package/dist/client/{types-DjWUR_O6.mjs → types-BEaKfam_.mjs} +65 -65
- package/dist/client/{useAvailableSlots-D-qoooLy.mjs → useAvailableSlots-DQJNh10g.mjs} +3 -23
- package/dist/client/useDiscountCodeUi-BcFQRI_7.mjs +196 -0
- package/dist/client/{useEventPagination-CQH2e9sQ.mjs → useEventPagination-BvdcexDC.mjs} +8 -8
- package/dist/client/{view-bGU1ws-m.mjs → view-CTBwSpKv.mjs} +4 -4
- package/dist/client/{display-D1oVR5Eh.mjs → wizardSteps-CWIQyRIw.mjs} +10263 -9078
- package/dist/preview-next/before-render.mjs +5 -3
- package/dist/preview-next/client/{LocationPickerEnvironment-BHAT81Wx.mjs → LocationPickerEnvironment-BW3dRFIv.mjs} +1 -1
- package/dist/preview-next/client/{MapLibreEditMap-B52hkdIZ.mjs → MapLibreEditMap-Db9BHyXh.mjs} +2 -2
- package/dist/preview-next/client/{PageSectionToolbar-D-Le7O3o.mjs → PageSectionToolbar-CG6KwITA.mjs} +4 -4
- package/dist/preview-next/client/{PreviewEditorSidebar-DNy5j_ce.mjs → PreviewEditorSidebar-BGBqrC9m.mjs} +8 -7
- package/dist/preview-next/client/{PreviewEditorUI-CzJvgbqt.mjs → PreviewEditorUI-Bwkyx28x.mjs} +5 -5
- package/dist/preview-next/client/{PreviewShell-xhJ6ca1i.mjs → PreviewShell-DB1l6JNU.mjs} +7 -7
- package/dist/preview-next/client/{SdkPreviewModeRuntime-BmYO1TdT.mjs → SdkPreviewModeRuntime-Bs6Cwzr3.mjs} +15 -7
- package/dist/preview-next/client/{lucide-react-McYZeSMb.mjs → lucide-react-00FF_oar.mjs} +13 -1
- package/dist/preview-next/client/{previewAssistantSlot-BN93X9o1.mjs → previewAssistantSlot-T-oDD_Dd.mjs} +6252 -2461
- package/dist/preview-next/client/{previewChromeRoot-C51RQseo.mjs → previewChromeRoot-BeukcDRy.mjs} +1 -1
- package/dist/preview-next/client/runtime.mjs +3 -3
- package/dist/preview-next/client/{sdk-runtime-oeGquJM-.mjs → sdk-runtime-ceDW_9q2.mjs} +2 -2
- package/dist/preview-next/client/{siteStyleAccess-BGTAcPud.mjs → siteStyleAccess-CCB9bScO.mjs} +35 -23
- package/dist/preview-next/client/{useAutosaveStatus-BMGXjGZq.mjs → useAutosaveStatus-D4o0CKq7.mjs} +1 -1
- package/dist/preview-next/client/{useOpenBlockForSetup-CTDoR_gQ.mjs → useOpenBlockForSetup-Seccrvwu.mjs} +2 -2
- package/dist/preview-next/container-responsive.css +103 -10
- package/dist/preview-next/keepAlive.mjs +1 -1
- package/dist/preview-next/middleware.mjs +1 -1
- package/dist/preview-next/{route-contract-BtdzkSUg.mjs → route-contract-FwFj8zGL.mjs} +71 -10
- package/dist/server/{Block.shared-Bp3OlOjj.mjs → Block.shared-D6WrRCxX.mjs} +4 -4
- package/dist/server/{ThemeScopeCore-DFEM1a85.mjs → ThemeScopeCore-BQzjDQ2q.mjs} +8 -1
- package/dist/server/{bindings-DrbJuftt.mjs → bindings-CS6ih1Yc.mjs} +37 -6
- package/dist/server/{client-Bf06n9oj.mjs → client-m0ylCj_f.mjs} +436 -526
- package/dist/server/config-validation.mjs +1 -1
- package/dist/server/config.mjs +2 -2
- package/dist/server/contentTypeResolver-B9vy8BrF.mjs +19 -0
- package/dist/server/data/dataLoaderContext.mjs +1 -1
- package/dist/server/data/resolveBlockData.mjs +1 -1
- package/dist/server/{dataLoaderContext-B3fXA54R.mjs → dataLoaderContext-lMRTfG5Z.mjs} +1 -0
- package/dist/server/error-f4g44bKx.mjs +387 -0
- package/dist/server/index.mjs +3 -2
- package/dist/server/loadContent-vgWMz1uD.mjs +694 -0
- package/dist/server/{loadPage-5iZefzDd.mjs → loadPage-CIOL3-9t.mjs} +22 -4
- package/dist/server/{lookMediaFrame-CaH018pK.mjs → lookMediaFrame-m-91jGGn.mjs} +36 -0
- package/dist/server/next.mjs +67 -94
- package/dist/server/{overrideResolution-CUHtm7tW.mjs → overrideResolution-BiHmsvTZ.mjs} +1 -1
- package/dist/server/page-converter.mjs +1 -1
- package/dist/server/{pageRenderPlan-GmPXForc.mjs → pageRenderPlan-DJo_obpi.mjs} +15 -8
- package/dist/server/{pageRuntimeSupport-Dd8LFzfa.mjs → pageRuntimeSupport-BnSuoHON.mjs} +54 -2
- package/dist/server/{pageShared-tz-GVWft.mjs → pageShared-BJuOzxzn.mjs} +554 -304
- package/dist/server/{prebuild-JmsuYCIH.mjs → prebuild-Cr8p8T7V.mjs} +5 -4
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/{prefetchBlockData-Ce9DDwON.mjs → prefetchBlockData-BZh57-ua.mjs} +5 -3
- package/dist/server/{registry-D12XF_h1.mjs → registry-CvhFwbXJ.mjs} +358 -95
- package/dist/server/rendering/components/pageShared.mjs +1 -1
- package/dist/server/rendering/helpers/loadPage.mjs +1 -1
- package/dist/server/rendering/helpers/pageRuntimeSupport.mjs +1 -1
- package/dist/server/rendering/server.mjs +5 -4
- package/dist/server/rendering.mjs +9 -8
- package/dist/server/{resolveBlockData-D9yZIN3V.mjs → resolveBlockData-Cv_W1LVB.mjs} +61 -34
- package/dist/server/resolvePageContent-BWKUZUIn.mjs +89 -0
- package/dist/server/{responseMedia-F-ElH2Rd.mjs → responseMedia-KRKguBC5.mjs} +56 -1
- package/dist/server/routing.mjs +271 -57
- package/dist/server/server.mjs +3 -3
- package/dist/server/{loadContent-eaTY7RPg.mjs → servicePageContent-CRKbTm_7.mjs} +719 -459
- package/dist/server/theme-bridge.mjs +1 -1
- package/dist/server/{validation-CLq5cw6M.mjs → validation-DCl-FCk_.mjs} +4 -4
- package/dist/server/{version-oPbhAx8E.mjs → version-DT_R5JAR.mjs} +1 -1
- package/dist/styles/index.css +504 -27
- package/package.json +1 -1
- package/dist/_dts/footerPageOutline-D_XbQW_o.d.ts +0 -256
- package/dist/_dts/resolvePageContent-YT6ndha1.d.ts +0 -162
- package/dist/client/LocationMapActions-CiMtl1Ha.mjs +0 -62
- package/dist/client/MapDrawingSvg-BCZa3dpf.mjs +0 -200
- package/dist/client/constants-4o4_hl34.mjs +0 -6
- package/dist/client/course-DBEU9IA9.mjs +0 -244
- package/dist/client/duration-Q6_QNgiv.mjs +0 -37
- package/dist/client/event-details.client-BwASwKIq.mjs +0 -53
- package/dist/client/eventDetails-BzGOVDI-.mjs +0 -13
- package/dist/client/runtimeResponse-CVkM0dHy.mjs +0 -3
- package/dist/client/useDiscountCodeUi-B9DODAkj.mjs +0 -237
- package/dist/client/view-DNX59QwM.mjs +0 -1372
- package/dist/server/resolvePageContent-CAELMBEJ.mjs +0 -438
|
@@ -1,23 +1,22 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { a as
|
|
7
|
-
import { n as useBlockApi } from "./context-
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
2
|
+
import { A as bookingPanelHeading, D as bookingCardEntry, E as bookingBarPlacement, M as cancelledDateCopy, N as hasCancelledRegistrationDate, O as bookingEntry, Sn as formatEventPriceDisplay, T as DEFAULT_BOOKING_BUTTON_TEXT, b as displayButtonText, j as courseTitleOf, k as bookingEntryProgress, v as buildEventRegistrationDisplayFromScopedEvents, w as offeringNounForEvent, y as buildEventRegistrationInteractiveIslandProps } from "./newsletter-form.interactive-7Of3eYn0.mjs";
|
|
3
|
+
import { $n as getTicketSelectionTotal, $t as runNeedsPricingChoice, An as formatEventDateTime, Ba as canJoinEventWaitlistOnAnyMode, C as registrationStopsHere, E as resolveRegistrationAvailabilityBlocker, Fn as getTicketTypeAvailabilityLabel, Hi as formatPrice, Ht as SELECTION_LIMIT_NOTE, In as getVisibleTicketTypes, Ja as selectEventCapacitySource, Ka as getRemainingPlaces, Ln as occurrenceTitleOverride, M as isEventRegistrationAvailable, Mn as formatTime, Ms as publicEventPricingType, N as normalizeEventRegistrationMaxTickets, O as settledRemainingPlaces, On as formatBookingWhen, Qn as getTicketLineQuantity, Qo as INCOMPATIBLE_ATTENDANCE_MESSAGE, Qt as runChoiceUsable, St as resolveFinishedPresentation, U as paymentChoiceDetails, Ur as resolveEventRegistrationScopedEvents, Ut as SEVERAL_BOOKINGS_ACCOUNT_NOTE, Vi as formatCentsAsCurrencyInput, W as paymentChoicePrice, Wa as getEventAvailability, Wt as canToggleSelectionItem, Xn as canRequestTicketOption, Ya as selectMostOpenCapacitySource, _ as closedAdmissionLabel, an as selectionEntitlementNote, b as placeCountCeiling, bn as combinationOffersOf, c as registrationStepLabelContext, cn as selectionItemsLabel, dn as selectionRowAvailability, en as runPricingChoice, er as getTicketTypeLineMax, es as setRoomChoicePeople, fr as placesLeftLabel, g as shouldPromptForLogin, hr as shownVenue, in as selectionConsentLabel, ja as bookingPresentation, jn as formatRegistrationSchedule, js as publicEventPricingStrategy, kn as formatDate, ks as publicEventPricingCurrency, l as areEventRegistrationPaymentSelectionsEqual, li as getRegistrationSuccessCopy, ln as selectionPlacesLabel, lt as ADD_A_PLACE, n as getEventSelectionMode, nn as selectionAtLimit, on as selectionIncludes, pn as severalConfirmationSentence, qa as isEventFull, r as panelShouldOpen, rn as selectionConfirmationHint, rr as setTicketLineQuantity, s as registrationStepLabel, tn as runUnitPriceCents, un as selectionPlacesNote, v as fullyBookedLabel, wn as selectionItemName, xt as confirmationPaymentRows, yn as combinationOfferLine, za as canJoinEventWaitlist, zn as withOccurrenceTitle } from "./wizardSteps-CWIQyRIw.mjs";
|
|
4
|
+
import { Tn as formatCurrencyAmount, t as assertNever } from "./src-o7WEvbK1.mjs";
|
|
5
|
+
import { n as SiteTermsChangedNotice, t as SiteTermsAgreementField } from "./SiteTermsAgreementField-BAdW5DvE.mjs";
|
|
6
|
+
import { a as ONE_DATE_FUNDING_LOAD_FAILED, c as planEventRegistrationSurface, i as summaryExplainsMoreThanTheOption, l as registrationAdmissionSurface, o as SELECTION_FUNDING_LOAD_FAILED, r as useEventRegistrationWizard, s as useEventRegistrationRecoveryRequest, t as EventPaymentMount, u as resolveEventRegistrationClientSurface } from "./EventRegistrationPayment-DiD9uYs6.mjs";
|
|
7
|
+
import { n as useBlockApi } from "./context-DtKdUdkO.mjs";
|
|
8
|
+
import { r as ThemedButton, x as SpinnerNode } from "./ThemedButton-CnSa7o-I.mjs";
|
|
9
|
+
import { t as EVENT_REGISTRATION_ANCHOR_ID } from "./constants-PfYJsEZF.mjs";
|
|
10
|
+
import { m as DiscountCodeDisclosure, p as NavigationHandOffPanel, t as BookingConfirmation } from "./DemoBookingPortalAccess-0Ua44F1j.mjs";
|
|
11
11
|
import { t as createBodyThemePortalRoot } from "./themePortalRoot-DeP49PT8.mjs";
|
|
12
|
-
import { t as CheckboxChoice } from "./CheckboxChoice-
|
|
12
|
+
import { t as CheckboxChoice } from "./CheckboxChoice-BZPLCgTU.mjs";
|
|
13
13
|
import { t as CrossIcon } from "./CrossIcon-CpG9VRyW.mjs";
|
|
14
14
|
import { n as getFieldValidationControlProps, t as FieldValidationMessage } from "./FieldValidationMessage-CsqxShw4.mjs";
|
|
15
15
|
import { t as FeedbackMessage } from "./FeedbackMessage-CSJrAuXH.mjs";
|
|
16
|
-
import { n as TerminalPanel, r as StateIcon } from "./useDiscountCodeUi-
|
|
16
|
+
import { n as TerminalPanel, r as StateIcon } from "./useDiscountCodeUi-BcFQRI_7.mjs";
|
|
17
17
|
import { t as ModalShell } from "./ModalShell-B_fHWK71.mjs";
|
|
18
|
-
import {
|
|
19
|
-
import { t as
|
|
20
|
-
import { a as planEventBookingPanel, c as EventBookingPanelView, i as RegistrationClosedState, n as BookingEntryBar, o as registrationSourceForPanel, r as BookingEntryCard, s as resolveBookingPanelSelection, t as StepIndicator } from "./StepIndicator-JO2PS03n.mjs";
|
|
18
|
+
import { a as MagicLinkForm, d as PaymentChoiceRows, n as OrganiserContactLine, o as BookingConsentAgreement, r as BookingQuestionSections, t as BookingMailingListNote } from "./BookingMailingListNote-CGxg37zx.mjs";
|
|
19
|
+
import { a as planEventBookingPanel, c as EventBookingPanelView, i as RegistrationClosedState, n as BookingEntryBar, o as registrationSourceForPanel, r as BookingEntryCard, s as resolveBookingPanelSelection, t as StepIndicator } from "./StepIndicator-DCqorVne.mjs";
|
|
21
20
|
import { t as createLucideIcon } from "./createLucideIcon-BrXgHVKN.mjs";
|
|
22
21
|
import React, { useCallback, useEffect, useId, useLayoutEffect, useRef, useState } from "react";
|
|
23
22
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -393,1387 +392,1609 @@ function EventRegistrationBookingLayer(props) {
|
|
|
393
392
|
] });
|
|
394
393
|
}
|
|
395
394
|
//#endregion
|
|
396
|
-
//#region ../blocks/src/system/runtime/nodes/event-registration/
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
*
|
|
400
|
-
* Displays an error message with a retry button when registration fails.
|
|
401
|
-
*/
|
|
402
|
-
const labels = {
|
|
403
|
-
none: "",
|
|
404
|
-
retry: "Try again",
|
|
405
|
-
places: "Choose places",
|
|
406
|
-
start: "Start again",
|
|
407
|
-
details: "Check my details",
|
|
408
|
-
"payment-options": "View payment options",
|
|
409
|
-
portal: "View my bookings",
|
|
410
|
-
event: "View event"
|
|
411
|
-
};
|
|
412
|
-
const ErrorStep = ({ message, onRetry, action = "retry", canJoinWaitlist = false }) => {
|
|
413
|
-
const offerWaitlist = action === "places" && canJoinWaitlist;
|
|
414
|
-
return /* @__PURE__ */ jsx(TerminalPanel, {
|
|
415
|
-
tone: "error",
|
|
416
|
-
className: "er-center",
|
|
417
|
-
titleClassName: "er-title--lg er-message",
|
|
418
|
-
icon: /* @__PURE__ */ jsx(StateIcon, {
|
|
419
|
-
variant: "error",
|
|
420
|
-
children: /* @__PURE__ */ jsx(CrossIcon, {})
|
|
421
|
-
}),
|
|
422
|
-
title: "We couldn’t complete your booking",
|
|
423
|
-
body: /* @__PURE__ */ jsx("p", {
|
|
424
|
-
className: "er-text--muted er-message",
|
|
425
|
-
children: offerWaitlist ? "Sorry, this event is now full. You can join the waiting list, and we’ll email you if a place becomes available." : message
|
|
426
|
-
}),
|
|
427
|
-
actions: action === "none" ? void 0 : action === "portal" ? /* @__PURE__ */ jsx("a", {
|
|
428
|
-
href: "/portal",
|
|
429
|
-
className: "er-retry-btn",
|
|
430
|
-
children: labels[action]
|
|
431
|
-
}) : /* @__PURE__ */ jsx("button", {
|
|
432
|
-
type: "button",
|
|
433
|
-
onClick: onRetry,
|
|
434
|
-
className: "er-retry-btn",
|
|
435
|
-
children: offerWaitlist ? "Join the waiting list" : labels[action]
|
|
436
|
-
})
|
|
437
|
-
});
|
|
438
|
-
};
|
|
439
|
-
//#endregion
|
|
440
|
-
//#region ../blocks/src/system/runtime/nodes/event-registration/CopyParts.tsx
|
|
441
|
-
/** Copy with its bold parts in <strong>: offer lines and hints (issue 1725). */
|
|
442
|
-
function CopyParts(props) {
|
|
443
|
-
return /* @__PURE__ */ jsx(Fragment, { children: props.parts.map((part, index) => part.strong ? /* @__PURE__ */ jsx("strong", { children: part.text }, index) : /* @__PURE__ */ jsx(React.Fragment, { children: part.text }, index)) });
|
|
395
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/TicketSelectionStep.tsx
|
|
396
|
+
function pluralizeBookingUnit(kind, quantity) {
|
|
397
|
+
return `${kind}${quantity === 1 ? "" : "s"}`;
|
|
444
398
|
}
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
className: "er-summary-bar-pricing",
|
|
451
|
-
children: [/* @__PURE__ */ jsx("span", {
|
|
452
|
-
className: "er-summary-bar-price er-summary-bar-price--struck",
|
|
453
|
-
children: formatPrice(props.listCents, props.currency)
|
|
454
|
-
}), /* @__PURE__ */ jsx("span", {
|
|
455
|
-
className: "er-summary-bar-price",
|
|
456
|
-
children: formatPrice(props.totalCents, props.currency)
|
|
457
|
-
})]
|
|
458
|
-
});
|
|
399
|
+
function getEventAttendanceModeLabel(mode) {
|
|
400
|
+
switch (mode) {
|
|
401
|
+
case "in_person": return "In person";
|
|
402
|
+
case "online": return "Online";
|
|
403
|
+
}
|
|
459
404
|
}
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
return /* @__PURE__ */ jsxs("
|
|
464
|
-
className: "er-
|
|
405
|
+
function TicketCounter(props) {
|
|
406
|
+
const { ticketsCount, maxAllowed, label, onTicketsChange } = props;
|
|
407
|
+
const minAllowed = props.minAllowed ?? 1;
|
|
408
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
409
|
+
className: "rb-reg-row er-row er-counter",
|
|
465
410
|
children: [
|
|
466
|
-
|
|
467
|
-
|
|
411
|
+
/* @__PURE__ */ jsx("button", {
|
|
412
|
+
type: "button",
|
|
413
|
+
"aria-label": `Decrease ${label}`,
|
|
414
|
+
onClick: () => onTicketsChange(stepNumber(ticketsCount, -1, { min: minAllowed })),
|
|
415
|
+
disabled: ticketsCount <= minAllowed,
|
|
416
|
+
className: "er-counter-btn",
|
|
417
|
+
children: "−"
|
|
418
|
+
}),
|
|
468
419
|
/* @__PURE__ */ jsx("span", {
|
|
469
|
-
className: "er-
|
|
470
|
-
children:
|
|
420
|
+
className: "er-counter-value",
|
|
421
|
+
children: ticketsCount
|
|
422
|
+
}),
|
|
423
|
+
/* @__PURE__ */ jsx("button", {
|
|
424
|
+
type: "button",
|
|
425
|
+
"aria-label": `Increase ${label}`,
|
|
426
|
+
onClick: () => onTicketsChange(stepNumber(ticketsCount, 1, { max: maxAllowed })),
|
|
427
|
+
disabled: ticketsCount >= maxAllowed,
|
|
428
|
+
className: "er-counter-btn",
|
|
429
|
+
children: "+"
|
|
471
430
|
})
|
|
472
431
|
]
|
|
473
432
|
});
|
|
474
433
|
}
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
434
|
+
function TicketCounterLimit(props) {
|
|
435
|
+
const showBookingLimit = !props.availabilityLabel || props.maxAllowed < (props.availableSpots ?? Infinity);
|
|
436
|
+
return /* @__PURE__ */ jsxs("p", {
|
|
437
|
+
className: "er-ticket-counter-limit",
|
|
438
|
+
children: [props.availabilityLabel ? /* @__PURE__ */ jsx("span", { children: props.availabilityLabel }) : null, showBookingLimit ? /* @__PURE__ */ jsxs(Fragment, { children: [props.availabilityLabel ? /* @__PURE__ */ jsx("br", {}) : null, /* @__PURE__ */ jsxs("span", { children: [
|
|
439
|
+
"Up to ",
|
|
440
|
+
props.maxAllowed,
|
|
441
|
+
" ",
|
|
442
|
+
props.quantityLabel,
|
|
443
|
+
" per booking."
|
|
444
|
+
] })] }) : null]
|
|
482
445
|
});
|
|
483
446
|
}
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
return isProductMethod(wizard.paymentSelection.method);
|
|
495
|
-
}
|
|
496
|
-
function isProductMethod(method) {
|
|
497
|
-
return method !== null && [
|
|
498
|
-
"pass",
|
|
499
|
-
"membership",
|
|
500
|
-
"pass_bundle",
|
|
501
|
-
"membership_bundle"
|
|
502
|
-
].includes(method);
|
|
503
|
-
}
|
|
504
|
-
function getPaymentSelectionProductName(selection) {
|
|
505
|
-
return "productName" in selection ? selection.productName : void 0;
|
|
506
|
-
}
|
|
507
|
-
/** Credits held on the pass the customer is about to redeem, before this booking. */
|
|
508
|
-
function getSelectedPassCreditsRemaining(wizard) {
|
|
509
|
-
const selection = wizard.paymentSelection;
|
|
510
|
-
if (selection.method !== "pass") return null;
|
|
511
|
-
const passId = selection.passId;
|
|
512
|
-
return (wizard.eligibility?.eligiblePasses ?? []).find((candidate) => candidate.id === passId)?.creditsRemaining ?? null;
|
|
513
|
-
}
|
|
514
|
-
/**
|
|
515
|
-
* Copy describing how a pass or membership covers the booking.
|
|
516
|
-
*
|
|
517
|
-
* Pass redemptions spend something, so they say so and name the balance;
|
|
518
|
-
* memberships already include the class, so "Included" stays accurate.
|
|
519
|
-
*/
|
|
520
|
-
function resolveEntitlementSummaryCopy(method, passCreditsRemaining) {
|
|
521
|
-
switch (method) {
|
|
522
|
-
case "pass": return {
|
|
523
|
-
productPrice: formatCreditProductUnits("event_pass", 1),
|
|
524
|
-
pricingNote: formatPassCreditUsageLabel(passCreditsRemaining)
|
|
525
|
-
};
|
|
526
|
-
case "pass_bundle": return {
|
|
527
|
-
productPrice: null,
|
|
528
|
-
pricingNote: formatPassCreditUsageLabel(null)
|
|
529
|
-
};
|
|
530
|
-
case "membership": return {
|
|
531
|
-
productPrice: "Included",
|
|
532
|
-
pricingNote: "Included in membership"
|
|
533
|
-
};
|
|
534
|
-
case "membership_bundle":
|
|
535
|
-
case "free":
|
|
536
|
-
case "stripe":
|
|
537
|
-
case null: return {
|
|
538
|
-
productPrice: null,
|
|
539
|
-
pricingNote: "Included in membership"
|
|
540
|
-
};
|
|
541
|
-
}
|
|
447
|
+
function BookingUnitSessionHint(props) {
|
|
448
|
+
const count = props.bookingUnit.includedSessionCount;
|
|
449
|
+
return props.bookingUnit.kind === "place" && count && count > 1 ? /* @__PURE__ */ jsxs("p", {
|
|
450
|
+
className: "er-text er-text--muted",
|
|
451
|
+
children: [
|
|
452
|
+
"Every place includes all ",
|
|
453
|
+
count,
|
|
454
|
+
" sessions."
|
|
455
|
+
]
|
|
456
|
+
}) : null;
|
|
542
457
|
}
|
|
543
|
-
function
|
|
544
|
-
return
|
|
545
|
-
|
|
546
|
-
dueToday: option.amounts.formattedDueToday,
|
|
547
|
-
...option.flexibleBalance
|
|
548
|
-
} : null;
|
|
458
|
+
function bookingQuantityLabel(unit, waitlist) {
|
|
459
|
+
if (!waitlist) return pluralizeBookingUnit(unit, 2);
|
|
460
|
+
return "waitlist places";
|
|
549
461
|
}
|
|
550
|
-
function
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
462
|
+
function BookingQuantityPrompt(props) {
|
|
463
|
+
return /* @__PURE__ */ jsxs("h3", {
|
|
464
|
+
tabIndex: -1,
|
|
465
|
+
className: "er-title",
|
|
466
|
+
children: [
|
|
467
|
+
"How many ",
|
|
468
|
+
bookingQuantityLabel(props.unit, props.waitlist),
|
|
469
|
+
"?"
|
|
470
|
+
]
|
|
471
|
+
});
|
|
554
472
|
}
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
const
|
|
558
|
-
|
|
559
|
-
const
|
|
560
|
-
const productInterval = "productInterval" in paymentSelection ? paymentSelection.productInterval : void 0;
|
|
561
|
-
const productPrice = "productPrice" in paymentSelection ? paymentSelection.productPrice : void 0;
|
|
562
|
-
const productCurrency = "productCurrency" in paymentSelection ? paymentSelection.productCurrency : void 0;
|
|
473
|
+
function SlidingScaleAmountField(props) {
|
|
474
|
+
const id = props.id ?? "er-sliding-amount";
|
|
475
|
+
const minLabel = formatPrice(props.slidingScale.minAmount, props.currency);
|
|
476
|
+
const maxLabel = formatPrice(props.slidingScale.maxAmount, props.currency);
|
|
477
|
+
const suggestedLabel = props.slidingScale.suggestedAmount !== null ? formatPrice(props.slidingScale.suggestedAmount, props.currency) : null;
|
|
563
478
|
return /* @__PURE__ */ jsxs("div", {
|
|
564
|
-
className: "er-
|
|
565
|
-
children: [
|
|
566
|
-
/* @__PURE__ */ jsx("
|
|
567
|
-
|
|
568
|
-
|
|
479
|
+
className: "er-field",
|
|
480
|
+
children: [
|
|
481
|
+
/* @__PURE__ */ jsx("label", {
|
|
482
|
+
htmlFor: id,
|
|
483
|
+
className: "form-label",
|
|
484
|
+
children: "Amount"
|
|
569
485
|
}),
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
486
|
+
/* @__PURE__ */ jsx("input", {
|
|
487
|
+
id,
|
|
488
|
+
type: "number",
|
|
489
|
+
min: formatCentsAsCurrencyInput(props.slidingScale.minAmount),
|
|
490
|
+
max: formatCentsAsCurrencyInput(props.slidingScale.maxAmount),
|
|
491
|
+
step: "0.01",
|
|
492
|
+
inputMode: "decimal",
|
|
493
|
+
className: "form-input",
|
|
494
|
+
value: props.value,
|
|
495
|
+
onChange: (event) => props.onChange?.(event.target.value)
|
|
575
496
|
}),
|
|
576
|
-
|
|
577
|
-
className: "er-
|
|
578
|
-
children:
|
|
497
|
+
/* @__PURE__ */ jsxs("p", {
|
|
498
|
+
className: "er-text er-text--muted",
|
|
499
|
+
children: [
|
|
500
|
+
"Choose between ",
|
|
501
|
+
minLabel,
|
|
502
|
+
" and ",
|
|
503
|
+
maxLabel,
|
|
504
|
+
suggestedLabel ? `; suggested ${suggestedLabel}` : "",
|
|
505
|
+
"."
|
|
506
|
+
]
|
|
579
507
|
}),
|
|
580
|
-
/* @__PURE__ */ jsx(
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
currency: productCurrency,
|
|
584
|
-
interval: productInterval
|
|
585
|
-
})
|
|
586
|
-
] }), /* @__PURE__ */ jsx("div", {
|
|
587
|
-
className: "er-summary-bar-product-price",
|
|
588
|
-
children: props.copy.productPrice ? /* @__PURE__ */ jsx("span", {
|
|
589
|
-
className: "er-summary-bar-included",
|
|
590
|
-
children: props.copy.productPrice
|
|
591
|
-
}) : productPrice && productCurrency ? /* @__PURE__ */ jsx(ProductPrice, {
|
|
592
|
-
cents: productPrice,
|
|
593
|
-
afterCodeCents: props.wizard.passPriceAfterCodeCents,
|
|
594
|
-
currency: productCurrency
|
|
508
|
+
props.message ? /* @__PURE__ */ jsx("p", {
|
|
509
|
+
className: "er-text er-text--muted",
|
|
510
|
+
children: props.message
|
|
595
511
|
}) : null
|
|
596
|
-
|
|
512
|
+
]
|
|
597
513
|
});
|
|
598
514
|
}
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
515
|
+
function ticketTypePriceText(ticketType, currency) {
|
|
516
|
+
return ticketType.priceAmount > 0 ? formatPrice(ticketType.priceAmount, currency) : "Free";
|
|
517
|
+
}
|
|
518
|
+
function TicketTypeLineText(props) {
|
|
519
|
+
const { ticketType } = props;
|
|
520
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
521
|
+
className: "er-ticket-line-main",
|
|
522
|
+
children: [
|
|
523
|
+
/* @__PURE__ */ jsxs("div", {
|
|
524
|
+
className: "er-ticket-line-heading",
|
|
525
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
526
|
+
className: "er-ticket-line-name",
|
|
527
|
+
children: ticketType.name
|
|
528
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
529
|
+
className: "er-ticket-line-price",
|
|
530
|
+
children: ticketTypePriceText(ticketType, props.currency)
|
|
531
|
+
})]
|
|
532
|
+
}),
|
|
533
|
+
ticketType.description ? /* @__PURE__ */ jsx("p", {
|
|
534
|
+
className: "er-ticket-line-detail",
|
|
535
|
+
children: ticketType.description
|
|
536
|
+
}) : null,
|
|
537
|
+
props.detail ? /* @__PURE__ */ jsx("p", {
|
|
538
|
+
className: "er-ticket-line-detail",
|
|
539
|
+
children: props.detail
|
|
540
|
+
}) : null
|
|
541
|
+
]
|
|
613
542
|
});
|
|
614
543
|
}
|
|
615
|
-
/**
|
|
616
|
-
function
|
|
617
|
-
const {
|
|
618
|
-
|
|
619
|
-
return
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
544
|
+
/** What one ticket type's row says and allows, whichever row draws it. Places without a room draw it in the rooms' own row. */
|
|
545
|
+
function ticketTypeQuantity(props) {
|
|
546
|
+
const { ticketType } = props;
|
|
547
|
+
const quantity = getTicketLineQuantity(props.ticketSelections, ticketType.pricingOptionId);
|
|
548
|
+
return {
|
|
549
|
+
quantity,
|
|
550
|
+
maxAllowed: getTicketTypeLineMax({
|
|
551
|
+
currentQuantity: quantity,
|
|
552
|
+
totalSelectedQuantity: getTicketSelectionTotal(props.ticketSelections),
|
|
553
|
+
maxTickets: props.maxTickets,
|
|
554
|
+
purpose: props.purpose,
|
|
555
|
+
pricingOptionId: ticketType.pricingOptionId,
|
|
556
|
+
availability: ticketType.availability,
|
|
557
|
+
heldPlacesBySelection: props.heldPlacesBySelection,
|
|
558
|
+
overallRemainingPlaces: props.availableSpots ?? null
|
|
623
559
|
}),
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
type: "button",
|
|
637
|
-
className: "er-summary-bar-pass-escape",
|
|
638
|
-
onClick: props.onUsePass,
|
|
639
|
-
children: [
|
|
640
|
-
"Use ",
|
|
641
|
-
formatCreditProductUnits("event_pass", 1),
|
|
642
|
-
" from your pass instead"
|
|
643
|
-
]
|
|
644
|
-
})] })
|
|
645
|
-
});
|
|
560
|
+
disabled: !canRequestTicketOption(ticketType.availability, props.purpose),
|
|
561
|
+
detail: getTicketTypeAvailabilityLabel(ticketType) ?? placesLeftLabel({
|
|
562
|
+
kind: "ticketType",
|
|
563
|
+
remaining: ticketType.availability.remainingPlaces,
|
|
564
|
+
dateRemaining: props.availableSpots ?? null
|
|
565
|
+
}, props.display),
|
|
566
|
+
setQuantity: (next) => props.onTicketSelectionsChange?.(setTicketLineQuantity({
|
|
567
|
+
lines: props.ticketSelections,
|
|
568
|
+
pricingOptionId: ticketType.pricingOptionId,
|
|
569
|
+
quantity: next
|
|
570
|
+
}))
|
|
571
|
+
};
|
|
646
572
|
}
|
|
647
|
-
/**
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
*/
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
573
|
+
/** One ticket type with its price, what's left and a counter. */
|
|
574
|
+
function TicketTypeQuantityRow(props) {
|
|
575
|
+
const { ticketType } = props;
|
|
576
|
+
const { quantity, maxAllowed, disabled, detail, setQuantity } = ticketTypeQuantity(props);
|
|
577
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
578
|
+
className: `er-ticket-line${disabled ? " er-ticket-line--disabled" : ""}`,
|
|
579
|
+
role: "listitem",
|
|
580
|
+
children: [/* @__PURE__ */ jsx(TicketTypeLineText, {
|
|
581
|
+
ticketType,
|
|
582
|
+
currency: props.currency,
|
|
583
|
+
detail
|
|
584
|
+
}), /* @__PURE__ */ jsx(TicketCounter, {
|
|
585
|
+
ticketsCount: quantity,
|
|
586
|
+
minAllowed: 0,
|
|
587
|
+
maxAllowed,
|
|
588
|
+
label: ticketType.name,
|
|
589
|
+
onTicketsChange: setQuantity
|
|
590
|
+
})]
|
|
665
591
|
});
|
|
666
592
|
}
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
if (tiered) {
|
|
673
|
-
const byType = ticketTypeCountLabel(wizard.selectedTicketLines, wizard.visibleTicketTypes);
|
|
674
|
-
if (byType) return byType;
|
|
675
|
-
}
|
|
676
|
-
const unit = tiered ? "ticket" : "place";
|
|
677
|
-
return `${wizard.ticketsCount} ${unit}${wizard.ticketsCount === 1 ? "" : "s"}`;
|
|
678
|
-
}
|
|
679
|
-
/** "1 Standard, 1 Concession" when tickets of more than one type are chosen; otherwise null. */
|
|
680
|
-
function ticketTypeCountLabel(lines, ticketTypes) {
|
|
681
|
-
const chosen = lines.filter((line) => line.quantity > 0);
|
|
682
|
-
if (chosen.length < 2) return null;
|
|
683
|
-
const parts = chosen.map((line) => {
|
|
684
|
-
const name = ticketTypes.find((type) => type.pricingOptionId === line.pricingOptionId)?.name;
|
|
685
|
-
return name ? `${line.quantity} ${name}` : null;
|
|
686
|
-
});
|
|
687
|
-
return parts.every((part) => part !== null) ? parts.join(", ") : null;
|
|
688
|
-
}
|
|
689
|
-
/**
|
|
690
|
-
* The footer's one line (issue 1581): how many, the discount's name, then
|
|
691
|
-
* when. Ticket types are tickets; a single price, or a course, is places.
|
|
692
|
-
*/
|
|
693
|
-
function summaryMetaFacts(input) {
|
|
694
|
-
const { wizard, summaryEvent } = input;
|
|
695
|
-
const several = wizard.severalItems;
|
|
696
|
-
return {
|
|
697
|
-
countLabel: summaryCountLabel(wizard, summaryEvent),
|
|
698
|
-
discount: input.discount && !productMethodFor(wizard) ? {
|
|
699
|
-
label: input.discount.publicLabel,
|
|
700
|
-
description: input.discount.description ?? null
|
|
701
|
-
} : null,
|
|
702
|
-
schedule: summaryEvent && several === null ? formatRegistrationSchedule(summaryEvent, wizard.occurrenceContext) : null
|
|
703
|
-
};
|
|
704
|
-
}
|
|
705
|
-
/** The panel's header already says when, so the panel hides the schedule. */
|
|
706
|
-
function SummaryMeta({ facts }) {
|
|
707
|
-
return /* @__PURE__ */ jsxs("span", {
|
|
708
|
-
className: "er-summary-bar-meta",
|
|
593
|
+
function TicketTypeQuantityRows(props) {
|
|
594
|
+
const totalSelectedQuantity = getTicketSelectionTotal(props.ticketSelections);
|
|
595
|
+
const effectiveMaxTickets = props.maxTickets;
|
|
596
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
597
|
+
className: "er-ticket-lines",
|
|
709
598
|
children: [
|
|
710
|
-
|
|
711
|
-
className: "er-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
599
|
+
/* @__PURE__ */ jsx("div", {
|
|
600
|
+
className: "er-ticket-line-list",
|
|
601
|
+
role: "list",
|
|
602
|
+
"aria-label": props.bookingUnit === "place" ? "Places" : "Tickets",
|
|
603
|
+
children: props.ticketTypes.map((ticketType) => /* @__PURE__ */ jsx(TicketTypeQuantityRow, {
|
|
604
|
+
display: props.display,
|
|
605
|
+
purpose: props.purpose,
|
|
606
|
+
ticketType,
|
|
607
|
+
ticketSelections: props.ticketSelections,
|
|
608
|
+
maxTickets: props.maxTickets,
|
|
609
|
+
heldPlacesBySelection: props.heldPlacesBySelection,
|
|
610
|
+
availableSpots: props.availableSpots,
|
|
611
|
+
currency: props.currency,
|
|
612
|
+
onTicketSelectionsChange: props.onTicketSelectionsChange
|
|
613
|
+
}, ticketType.pricingOptionId))
|
|
614
|
+
}),
|
|
615
|
+
/* @__PURE__ */ jsx(TicketCounterLimit, {
|
|
616
|
+
maxAllowed: effectiveMaxTickets,
|
|
617
|
+
quantityLabel: pluralizeBookingUnit(props.bookingUnit, effectiveMaxTickets),
|
|
618
|
+
availableSpots: props.availableSpots,
|
|
619
|
+
availabilityLabel: props.availabilityLabel
|
|
620
|
+
}),
|
|
621
|
+
totalSelectedQuantity === 0 && props.hasAvailableTicketTypes ? /* @__PURE__ */ jsxs("p", {
|
|
622
|
+
className: "er-text er-text--muted",
|
|
623
|
+
children: [
|
|
624
|
+
"Choose at least one ",
|
|
625
|
+
props.bookingUnit,
|
|
626
|
+
" to continue."
|
|
627
|
+
]
|
|
628
|
+
}) : totalSelectedQuantity === 0 ? /* @__PURE__ */ jsxs("p", {
|
|
629
|
+
className: "er-text er-text--muted",
|
|
630
|
+
children: [
|
|
631
|
+
"No ",
|
|
632
|
+
props.bookingUnit === "place" ? "places" : "ticket types",
|
|
633
|
+
" are currently available."
|
|
634
|
+
]
|
|
722
635
|
}) : null
|
|
723
636
|
]
|
|
724
637
|
});
|
|
725
638
|
}
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
const price = formatEventPriceDisplay(event.pricing).trim();
|
|
733
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
734
|
-
className: "er-summary-bar",
|
|
735
|
-
"data-step": "select-event",
|
|
736
|
-
children: [/* @__PURE__ */ jsx("div", {
|
|
737
|
-
className: "er-summary-bar-info",
|
|
738
|
-
children: /* @__PURE__ */ jsx("span", {
|
|
739
|
-
className: "er-summary-bar-meta",
|
|
740
|
-
children: /* @__PURE__ */ jsx("span", {
|
|
741
|
-
className: "er-summary-bar-schedule",
|
|
742
|
-
children: formatRegistrationSchedule(event)
|
|
743
|
-
})
|
|
744
|
-
})
|
|
745
|
-
}), price ? /* @__PURE__ */ jsx("div", {
|
|
746
|
-
className: "er-summary-bar-pricing",
|
|
747
|
-
children: /* @__PURE__ */ jsx("span", {
|
|
748
|
-
className: "er-summary-bar-price",
|
|
749
|
-
children: price
|
|
750
|
-
})
|
|
751
|
-
}) : null]
|
|
639
|
+
function getAttendanceModeDetail(attendanceMode, display) {
|
|
640
|
+
return placesLeftLabel(attendanceMode, display, {
|
|
641
|
+
unlimited: "Unlimited places",
|
|
642
|
+
open: "Places available",
|
|
643
|
+
full: "Currently full",
|
|
644
|
+
waitlist: "Currently full, waitlist available"
|
|
752
645
|
});
|
|
753
646
|
}
|
|
754
|
-
/**
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
currency
|
|
784
|
-
}) : /* @__PURE__ */ jsx("div", {
|
|
785
|
-
className: "er-summary-bar-pricing",
|
|
786
|
-
children: /* @__PURE__ */ jsx("span", {
|
|
787
|
-
className: "er-summary-bar-price",
|
|
788
|
-
children: formatPrice(total, currency)
|
|
647
|
+
/** One event's ways of attending, each with its places left. */
|
|
648
|
+
function eventAttendanceModeTiles(attendanceModes, display) {
|
|
649
|
+
return attendanceModes.map((attendanceMode) => ({
|
|
650
|
+
mode: attendanceMode.mode,
|
|
651
|
+
detail: getAttendanceModeDetail(attendanceMode, display)
|
|
652
|
+
}));
|
|
653
|
+
}
|
|
654
|
+
/** The "How will you attend?" choice; several runs share it, so one choice covers them all. */
|
|
655
|
+
function AttendanceModeTiles(props) {
|
|
656
|
+
return /* @__PURE__ */ jsx("div", {
|
|
657
|
+
className: "er-payment-tiles",
|
|
658
|
+
role: "list",
|
|
659
|
+
"aria-label": "Attendance mode",
|
|
660
|
+
children: props.tiles.map((tile) => {
|
|
661
|
+
const isSelected = props.selectedAttendanceMode === tile.mode;
|
|
662
|
+
return /* @__PURE__ */ jsx("div", {
|
|
663
|
+
role: "listitem",
|
|
664
|
+
children: /* @__PURE__ */ jsxs("button", {
|
|
665
|
+
type: "button",
|
|
666
|
+
"aria-pressed": isSelected,
|
|
667
|
+
className: `er-payment-tile${isSelected ? " er-payment-tile--selected" : ""}`,
|
|
668
|
+
onClick: () => props.onAttendanceModeChange?.(tile.mode),
|
|
669
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
670
|
+
className: "er-payment-tile-label",
|
|
671
|
+
children: getEventAttendanceModeLabel(tile.mode)
|
|
672
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
673
|
+
className: "er-payment-tile-detail",
|
|
674
|
+
children: tile.detail
|
|
675
|
+
})]
|
|
789
676
|
})
|
|
790
|
-
})
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
}), /* @__PURE__ */ jsx(CombinationHint, { parts: hint })] });
|
|
677
|
+
}, tile.mode);
|
|
678
|
+
})
|
|
679
|
+
});
|
|
794
680
|
}
|
|
795
|
-
|
|
796
|
-
* The later steps' price for several items with combination prices: the
|
|
797
|
-
* usual total struck through, then what's due. The working shows while the
|
|
798
|
-
* planner's total stands; once the server prices a code, its total alone.
|
|
799
|
-
*/
|
|
800
|
-
function combinationSummary(wizard, subtotalCents) {
|
|
801
|
-
if (wizard.severalItems === null) return null;
|
|
802
|
-
const list = wizard.selectionPrice.listTotalCents;
|
|
803
|
-
const working = wizard.selectionCombination.working;
|
|
804
|
-
if (list === null || list <= subtotalCents || working === null && wizard.combinationCodeField === null) return null;
|
|
681
|
+
function resolveTicketSelectionPricing(event) {
|
|
805
682
|
return {
|
|
806
|
-
|
|
807
|
-
|
|
683
|
+
mode: event ? publicEventPricingStrategy(event.pricing) : void 0,
|
|
684
|
+
currency: event ? publicEventPricingCurrency(event.pricing) : null
|
|
808
685
|
};
|
|
809
686
|
}
|
|
810
|
-
/**
|
|
811
|
-
function
|
|
812
|
-
|
|
813
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
814
|
-
summary.total ? /* @__PURE__ */ jsxs("div", {
|
|
815
|
-
className: "er-summary-bar-product-detail",
|
|
816
|
-
children: ["Total: ", summary.total]
|
|
817
|
-
}) : null,
|
|
818
|
-
/* @__PURE__ */ jsx("div", {
|
|
819
|
-
className: "er-summary-bar-price",
|
|
820
|
-
children: summary.dueToday ?? props.fallbackDueToday
|
|
821
|
-
}),
|
|
822
|
-
/* @__PURE__ */ jsx("div", {
|
|
823
|
-
className: "er-summary-bar-included",
|
|
824
|
-
children: "Payable now"
|
|
825
|
-
}),
|
|
826
|
-
summary.remainingBalance ? /* @__PURE__ */ jsxs("div", {
|
|
827
|
-
className: "er-summary-bar-product-detail",
|
|
828
|
-
children: [
|
|
829
|
-
"Remaining balance: ",
|
|
830
|
-
summary.remainingBalance,
|
|
831
|
-
summary.balanceDueBy ? ` due by ${summary.balanceDueBy}` : ""
|
|
832
|
-
]
|
|
833
|
-
}) : null,
|
|
834
|
-
summary.depositPolicy ? /* @__PURE__ */ jsxs("div", {
|
|
835
|
-
className: "er-summary-bar-product-detail",
|
|
836
|
-
children: ["Deposit: ", summary.depositPolicy]
|
|
837
|
-
}) : null
|
|
838
|
-
] });
|
|
687
|
+
/** Someone with an invitation is claiming a place, not joining the list. */
|
|
688
|
+
function waitlistIsOpenTo(source, invitation) {
|
|
689
|
+
return source && !invitation ? canJoinEventWaitlist(source) : false;
|
|
839
690
|
}
|
|
840
|
-
function
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
});
|
|
851
|
-
const summaryCurrency = summaryEvent ? publicEventPricingCurrency(summaryEvent.pricing) : null;
|
|
852
|
-
const teamMemberNames = (summaryEvent?.teamMembers ?? []).map((teamMember) => teamMember.name).filter(Boolean);
|
|
853
|
-
const subtotalCents = wizard.ticketSelectionSubtotalCents;
|
|
854
|
-
if (!summaryTitle || !summaryCurrency || subtotalCents === null) return null;
|
|
855
|
-
const autoAppliedDiscount = wizard.autoAppliedDiscount;
|
|
856
|
-
const autoAppliedDiscountCents = Math.max(0, autoAppliedDiscount?.computedAmountCents ?? 0);
|
|
857
|
-
const discountedTotalCents = Math.max(0, subtotalCents - autoAppliedDiscountCents);
|
|
858
|
-
const flexibleBalanceSummary = getFlexibleBalanceSummary(getSelectedDirectPaymentOption(wizard));
|
|
859
|
-
const meta = summaryMetaFacts({
|
|
860
|
-
wizard,
|
|
861
|
-
summaryEvent,
|
|
862
|
-
discount: autoAppliedDiscountCents > 0 ? autoAppliedDiscount : null
|
|
863
|
-
});
|
|
864
|
-
const productMethod = isProductMethod(wizard.paymentSelection.method);
|
|
865
|
-
const entitlementCopy = resolveEntitlementSummaryCopy(wizard.paymentSelection.method, getSelectedPassCreditsRemaining(wizard));
|
|
866
|
-
const combination = combinationSummary(wizard, subtotalCents);
|
|
867
|
-
const working = combination?.working ?? null;
|
|
868
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(PaymentProductRow, {
|
|
869
|
-
wizard,
|
|
870
|
-
copy: entitlementCopy
|
|
871
|
-
}), /* @__PURE__ */ jsxs("div", {
|
|
872
|
-
className: summaryBarClassName(working),
|
|
873
|
-
"data-step": wizard.step,
|
|
874
|
-
children: [
|
|
875
|
-
/* @__PURE__ */ jsxs("div", {
|
|
876
|
-
className: "er-summary-bar-info",
|
|
877
|
-
children: [
|
|
878
|
-
/* @__PURE__ */ jsx("h4", {
|
|
879
|
-
className: "er-summary-bar-event",
|
|
880
|
-
children: summaryTitle
|
|
881
|
-
}),
|
|
882
|
-
/* @__PURE__ */ jsx(SummaryMeta, { facts: meta }),
|
|
883
|
-
teamMemberNames.length > 0 && /* @__PURE__ */ jsxs("div", {
|
|
884
|
-
className: "er-summary-bar-meta",
|
|
885
|
-
children: ["With ", teamMemberNames.join(", ")]
|
|
886
|
-
})
|
|
887
|
-
]
|
|
888
|
-
}),
|
|
889
|
-
combination && subtotalCents > 0 ? /* @__PURE__ */ jsx(CombinationPricing, {
|
|
890
|
-
listCents: combination.list,
|
|
891
|
-
totalCents: subtotalCents,
|
|
892
|
-
currency: summaryCurrency
|
|
893
|
-
}) : subtotalCents > 0 && /* @__PURE__ */ jsx("div", {
|
|
894
|
-
className: "er-summary-bar-pricing",
|
|
895
|
-
children: productMethod ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
|
|
896
|
-
className: "er-summary-bar-price er-summary-bar-price--struck",
|
|
897
|
-
children: formatPrice(subtotalCents, summaryCurrency)
|
|
898
|
-
}), /* @__PURE__ */ jsx("div", {
|
|
899
|
-
className: "er-summary-bar-included",
|
|
900
|
-
children: entitlementCopy.pricingNote
|
|
901
|
-
})] }) : flexibleBalanceSummary ? /* @__PURE__ */ jsx(FlexibleBalancePricing, {
|
|
902
|
-
summary: flexibleBalanceSummary,
|
|
903
|
-
fallbackDueToday: formatPrice(discountedTotalCents, summaryCurrency)
|
|
904
|
-
}) : autoAppliedDiscount && autoAppliedDiscountCents > 0 ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
905
|
-
/* @__PURE__ */ jsx("span", {
|
|
906
|
-
className: "er-summary-bar-price er-summary-bar-price--struck",
|
|
907
|
-
children: formatPrice(subtotalCents, summaryCurrency)
|
|
908
|
-
}),
|
|
909
|
-
/* @__PURE__ */ jsx("span", {
|
|
910
|
-
className: "er-summary-bar-price",
|
|
911
|
-
children: formatPrice(discountedTotalCents, summaryCurrency)
|
|
912
|
-
}),
|
|
913
|
-
autoAppliedDiscount.description ? /* @__PURE__ */ jsx("div", {
|
|
914
|
-
className: "er-summary-bar-product-detail er-summary-bar-discount-detail",
|
|
915
|
-
children: autoAppliedDiscount.description
|
|
916
|
-
}) : null
|
|
917
|
-
] }) : /* @__PURE__ */ jsx("span", {
|
|
918
|
-
className: "er-summary-bar-price",
|
|
919
|
-
children: formatPrice(subtotalCents, summaryCurrency)
|
|
920
|
-
})
|
|
921
|
-
}),
|
|
922
|
-
/* @__PURE__ */ jsx(CombinationDetail, { working })
|
|
923
|
-
]
|
|
924
|
-
})] });
|
|
925
|
-
}
|
|
926
|
-
//#endregion
|
|
927
|
-
//#region ../blocks/src/system/runtime/nodes/event-registration/EventRegistrationWizardActions.tsx
|
|
928
|
-
/**
|
|
929
|
-
* Label for the button that submits the details step.
|
|
930
|
-
*
|
|
931
|
-
* When a pass covers the booking there is no payment step to follow, so this
|
|
932
|
-
* button is the last thing read before a credit is spent — it names the pass
|
|
933
|
-
* rather than leaving that to the summary above it.
|
|
934
|
-
*/
|
|
935
|
-
function resolveDetailsButtonText(input) {
|
|
936
|
-
const { wizard } = input;
|
|
937
|
-
const admission = wizard.admission;
|
|
938
|
-
switch (admission.kind) {
|
|
939
|
-
case "checking": return "Checking availability…";
|
|
940
|
-
case "closed": return closedLabel(admission.reason);
|
|
941
|
-
case "fullyBooked": return fullyBookedLabel(admission);
|
|
942
|
-
case "waitlist": return "Join waitlist";
|
|
943
|
-
case "open":
|
|
944
|
-
case "resume": break;
|
|
945
|
-
}
|
|
946
|
-
if (wizard.paymentSelection.method === "pass") return "Book using class pass";
|
|
947
|
-
if (wizard.paymentSelection.method === "membership") return input.fallbackText;
|
|
948
|
-
return wizard.eventRequiresPayment ? "Continue to payment" : input.fallbackText;
|
|
691
|
+
function getTicketSelectionCapacity(event, attendanceMode, display, invitation = null) {
|
|
692
|
+
const source = event ? selectEventCapacitySource(event, attendanceMode) : null;
|
|
693
|
+
const availability = source ? getEventAvailability(source) : null;
|
|
694
|
+
const canJoinWaitlist = waitlistIsOpenTo(source, invitation);
|
|
695
|
+
return {
|
|
696
|
+
availableSpots: availability?.available,
|
|
697
|
+
isSoldOut: availability?.isFull ?? false,
|
|
698
|
+
canJoinWaitlist,
|
|
699
|
+
eventAvailabilityLabel: !canJoinWaitlist && source ? placesLeftLabel(source, display) : null
|
|
700
|
+
};
|
|
949
701
|
}
|
|
950
702
|
/**
|
|
951
|
-
*
|
|
952
|
-
*
|
|
703
|
+
* One price: the visitor is choosing places, not ticket types (issue 1581).
|
|
704
|
+
* The ceiling comes from settled availability (`placeCountCeiling`); the
|
|
705
|
+
* page's cached count is only shown, never enforced.
|
|
953
706
|
*/
|
|
954
|
-
function
|
|
955
|
-
const
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
className: "
|
|
961
|
-
children: /* @__PURE__ */ jsx(
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
});
|
|
972
|
-
}
|
|
973
|
-
function SelectTicketsActions(props) {
|
|
974
|
-
const { wizard } = props;
|
|
975
|
-
const { label: continueLabel, pending: registrationOptionsPending } = wizard.ticketContinuation;
|
|
976
|
-
const isContinueDisabled = wizard.ticketContinuation.kind === "blocked";
|
|
977
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
978
|
-
className: "rb-wizard-actions er-actions",
|
|
979
|
-
children: [!wizard.hasPreSelectedContext && /* @__PURE__ */ jsx("button", {
|
|
980
|
-
type: "button",
|
|
981
|
-
onClick: () => wizard.setStep("select-event"),
|
|
982
|
-
className: "er-back-btn",
|
|
983
|
-
children: "← Back"
|
|
984
|
-
}), /* @__PURE__ */ jsx(ThemedButton, {
|
|
985
|
-
type: "button",
|
|
986
|
-
onClick: wizard.handleTicketsComplete,
|
|
987
|
-
disabled: isContinueDisabled,
|
|
988
|
-
variant: props.buttonVariant,
|
|
989
|
-
size: "md",
|
|
990
|
-
label: continueLabel,
|
|
991
|
-
pending: registrationOptionsPending ? {
|
|
992
|
-
label: continueLabel,
|
|
993
|
-
spinnerSize: "xs",
|
|
994
|
-
spinnerClassName: "er-button-spinner",
|
|
995
|
-
contentClassName: "er-button-with-spinner"
|
|
996
|
-
} : void 0
|
|
997
|
-
})]
|
|
998
|
-
});
|
|
999
|
-
}
|
|
1000
|
-
function EnterDetailsActions(props) {
|
|
1001
|
-
const { wizard } = props;
|
|
1002
|
-
const isContinueDisabled = resolveRegistrationAvailabilityBlocker(wizard.admission) !== null;
|
|
1003
|
-
const continueLabel = resolveDetailsButtonText({
|
|
1004
|
-
wizard,
|
|
1005
|
-
fallbackText: props.buttonText
|
|
1006
|
-
});
|
|
1007
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
1008
|
-
className: "rb-wizard-actions er-actions",
|
|
1009
|
-
children: [/* @__PURE__ */ jsx("button", {
|
|
1010
|
-
type: "button",
|
|
1011
|
-
onClick: () => wizard.setStep("select-tickets"),
|
|
1012
|
-
className: "er-back-btn",
|
|
1013
|
-
children: "← Back"
|
|
1014
|
-
}), /* @__PURE__ */ jsx(ThemedButton, {
|
|
1015
|
-
type: "button",
|
|
1016
|
-
onClick: wizard.handleDetailsComplete,
|
|
1017
|
-
disabled: isContinueDisabled,
|
|
1018
|
-
variant: props.buttonVariant,
|
|
1019
|
-
size: "md",
|
|
1020
|
-
label: continueLabel
|
|
1021
|
-
})]
|
|
1022
|
-
});
|
|
1023
|
-
}
|
|
1024
|
-
function SelectPaymentActions(props) {
|
|
1025
|
-
const { wizard } = props;
|
|
1026
|
-
const { status, canContinue, buttonText } = wizard.paymentStepState;
|
|
1027
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [status === "ready" && wizard.paymentHeldForCode ? /* @__PURE__ */ jsx("p", {
|
|
1028
|
-
className: "er-discount__hint",
|
|
1029
|
-
children: "Press Apply to use your discount code, or remove it to carry on without it."
|
|
1030
|
-
}) : null, /* @__PURE__ */ jsxs("div", {
|
|
1031
|
-
className: "rb-wizard-actions er-actions",
|
|
1032
|
-
children: [/* @__PURE__ */ jsx("button", {
|
|
1033
|
-
type: "button",
|
|
1034
|
-
onClick: () => wizard.setStep("enter-details"),
|
|
1035
|
-
className: "er-back-btn",
|
|
1036
|
-
children: "← Back"
|
|
1037
|
-
}), status === "ready" && /* @__PURE__ */ jsx(ThemedButton, {
|
|
1038
|
-
type: "button",
|
|
1039
|
-
onClick: () => void wizard.handlePaymentSelect(),
|
|
1040
|
-
disabled: !canContinue,
|
|
1041
|
-
variant: props.buttonVariant,
|
|
1042
|
-
size: "md",
|
|
1043
|
-
label: buttonText
|
|
707
|
+
function PlaceCounter(props) {
|
|
708
|
+
const spots = props.waitlist ? null : props.availableSpots;
|
|
709
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(BookingQuantityPrompt, {
|
|
710
|
+
unit: "place",
|
|
711
|
+
waitlist: props.waitlist
|
|
712
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
713
|
+
className: "er-ticket-counter-group",
|
|
714
|
+
children: [/* @__PURE__ */ jsx(TicketCounter, {
|
|
715
|
+
ticketsCount: props.ticketsCount,
|
|
716
|
+
maxAllowed: props.ceiling,
|
|
717
|
+
label: bookingQuantityLabel("place", props.waitlist),
|
|
718
|
+
onTicketsChange: props.onTicketsChange
|
|
719
|
+
}), /* @__PURE__ */ jsx(TicketCounterLimit, {
|
|
720
|
+
maxAllowed: props.ceiling,
|
|
721
|
+
quantityLabel: props.waitlist ? bookingQuantityLabel("place", true) : pluralizeBookingUnit("place", props.ceiling),
|
|
722
|
+
availableSpots: spots,
|
|
723
|
+
availabilityLabel: props.availabilityLabel
|
|
1044
724
|
})]
|
|
1045
725
|
})] });
|
|
1046
726
|
}
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
type: "button",
|
|
1053
|
-
onClick: props.wizard.paymentController.check,
|
|
1054
|
-
className: "er-back-btn",
|
|
1055
|
-
children: "← Back"
|
|
1056
|
-
})
|
|
1057
|
-
});
|
|
1058
|
-
}
|
|
1059
|
-
function closedLabel(reason) {
|
|
1060
|
-
switch (reason) {
|
|
1061
|
-
case "alreadyWaitlisted": return "Already on waitlist";
|
|
1062
|
-
case "optionsUnavailable": return "Availability unavailable";
|
|
1063
|
-
case "unavailable": return "Registration unavailable";
|
|
1064
|
-
}
|
|
1065
|
-
}
|
|
1066
|
-
function EventRegistrationWizardActions(props) {
|
|
1067
|
-
const { wizard } = props;
|
|
1068
|
-
switch (wizard.step) {
|
|
1069
|
-
case "error":
|
|
1070
|
-
case "success":
|
|
1071
|
-
case "submitting":
|
|
1072
|
-
case "verifying-payment":
|
|
1073
|
-
case "verifying-timeout":
|
|
1074
|
-
case "payment-status":
|
|
1075
|
-
case "payment-failed": return null;
|
|
1076
|
-
case "select-event": return /* @__PURE__ */ jsx(SelectDateActions, { ...props });
|
|
1077
|
-
case "select-tickets": return /* @__PURE__ */ jsx(SelectTicketsActions, { ...props });
|
|
1078
|
-
case "enter-details": return /* @__PURE__ */ jsx(EnterDetailsActions, { ...props });
|
|
1079
|
-
case "select-payment": return /* @__PURE__ */ jsx(SelectPaymentActions, { ...props });
|
|
1080
|
-
case "payment": return /* @__PURE__ */ jsx(PaymentActions, { ...props });
|
|
1081
|
-
default: return null;
|
|
1082
|
-
}
|
|
727
|
+
function SelectionNote({ text }) {
|
|
728
|
+
return text ? /* @__PURE__ */ jsx("p", {
|
|
729
|
+
className: "er-text er-text--muted",
|
|
730
|
+
children: text
|
|
731
|
+
}) : null;
|
|
1083
732
|
}
|
|
1084
|
-
//#endregion
|
|
1085
|
-
//#region ../blocks/src/system/runtime/nodes/event-registration/SingleTicketEntitlementNote.tsx
|
|
1086
733
|
/**
|
|
1087
|
-
*
|
|
1088
|
-
*
|
|
734
|
+
* Ticket Selection Step
|
|
735
|
+
*
|
|
736
|
+
* Allows users to select how many tickets they want for the selected event.
|
|
737
|
+
* Respects both max tickets per registration and available spots.
|
|
738
|
+
*
|
|
739
|
+
* Can use either a full PublicEvent or just occurrence context (when on event page).
|
|
1089
740
|
*/
|
|
1090
|
-
|
|
1091
|
-
const
|
|
1092
|
-
|
|
1093
|
-
const
|
|
1094
|
-
const
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
741
|
+
const TicketSelectionStep = ({ purpose, event, display, occurrenceContext: _occurrenceContext, selectedAttendanceMode = null, onAttendanceModeChange, ticketsCount, maxTickets, placesCeiling, visibleTicketTypes: visibleTicketTypesOverride, overallRemainingPlaces, heldPlacesBySelection, ticketSelections = [], onTicketSelectionsChange, slidingScale = null, selectedSlidingAmountInput = "", slidingScaleSelectionMessage = null, onSlidingAmountChange, onTicketsChange, bookingUnit = { kind: "ticket" }, selectionNote, invitation = null }) => {
|
|
742
|
+
const unit = bookingUnit.kind;
|
|
743
|
+
const deliveryMode = event?.deliveryMode ?? "in_person";
|
|
744
|
+
const attendanceModes = event?.attendanceModes ?? [];
|
|
745
|
+
const { availableSpots, isSoldOut, canJoinWaitlist, eventAvailabilityLabel } = getTicketSelectionCapacity(event, selectedAttendanceMode, display, invitation);
|
|
746
|
+
const { mode: eventPricingMode, currency: eventPricingCurrency } = resolveTicketSelectionPricing(event);
|
|
747
|
+
const usesTicketTypes = eventPricingMode === "tiered";
|
|
748
|
+
const visibleTicketTypes = usesTicketTypes ? visibleTicketTypesOverride ?? getVisibleTicketTypes({
|
|
749
|
+
event,
|
|
750
|
+
eligibility: null,
|
|
751
|
+
selectedAttendanceMode,
|
|
752
|
+
ticketSelections
|
|
753
|
+
}) : [];
|
|
754
|
+
const noVisibleTicketTypes = usesTicketTypes && visibleTicketTypes.length === 0;
|
|
755
|
+
const hasAvailableTicketTypes = usesTicketTypes && visibleTicketTypes.some((ticketType) => canRequestTicketOption(ticketType.availability, purpose));
|
|
756
|
+
const maxAllowed = maxTickets;
|
|
757
|
+
if (deliveryMode === "hybrid" && !selectedAttendanceMode) return /* @__PURE__ */ jsxs("div", {
|
|
758
|
+
className: "rb-reg-stack er-stack",
|
|
1098
759
|
children: [
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
type: "button",
|
|
1104
|
-
className: "er-entitlement-note__action",
|
|
1105
|
-
onClick: props.onBookOnePlace,
|
|
1106
|
-
children: "Book 1 place"
|
|
760
|
+
/* @__PURE__ */ jsx("h3", {
|
|
761
|
+
tabIndex: -1,
|
|
762
|
+
className: "er-title",
|
|
763
|
+
children: "How will you attend?"
|
|
1107
764
|
}),
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
765
|
+
/* @__PURE__ */ jsx(AttendanceModeTiles, {
|
|
766
|
+
tiles: eventAttendanceModeTiles(attendanceModes, display),
|
|
767
|
+
selectedAttendanceMode: null,
|
|
768
|
+
onAttendanceModeChange
|
|
769
|
+
}),
|
|
770
|
+
/* @__PURE__ */ jsx("p", {
|
|
771
|
+
className: "er-text er-text--muted",
|
|
772
|
+
children: "Choose whether you want to attend in person or online."
|
|
773
|
+
})
|
|
1112
774
|
]
|
|
1113
775
|
});
|
|
1114
|
-
|
|
1115
|
-
//#endregion
|
|
1116
|
-
//#region ../blocks/src/system/runtime/nodes/event-registration/PaymentBlockingPanel.tsx
|
|
1117
|
-
function MissingEligibilityPanel() {
|
|
1118
|
-
return /* @__PURE__ */ jsx("div", {
|
|
776
|
+
if (!eventPricingCurrency) return /* @__PURE__ */ jsx("div", {
|
|
1119
777
|
className: "rb-reg-stack er-stack",
|
|
1120
|
-
children: /* @__PURE__ */ jsx("
|
|
1121
|
-
className: "er-center",
|
|
1122
|
-
children: /* @__PURE__ */ jsx("p", {
|
|
1123
|
-
className: "er-text er-error",
|
|
1124
|
-
children: "We couldn’t load the booking options for this event. Please refresh this page and try again. If this keeps happening, contact the organiser for help."
|
|
1125
|
-
})
|
|
1126
|
-
})
|
|
1127
|
-
});
|
|
1128
|
-
}
|
|
1129
|
-
function UnavailableEntitlementMessage(props) {
|
|
1130
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1131
|
-
/* @__PURE__ */ jsx("p", {
|
|
1132
|
-
className: "er-text er-error",
|
|
1133
|
-
children: "This event requires a valid pass or membership to register."
|
|
1134
|
-
}),
|
|
1135
|
-
props.eligibility.eventAcceptsPasses && !props.eligibility.eventAcceptsMemberships && /* @__PURE__ */ jsx("p", {
|
|
1136
|
-
className: "er-text er-text--muted",
|
|
1137
|
-
children: "You need a pass with credits for this event category."
|
|
1138
|
-
}),
|
|
1139
|
-
props.eligibility.eventAcceptsMemberships && !props.eligibility.eventAcceptsPasses && /* @__PURE__ */ jsx("p", {
|
|
778
|
+
children: /* @__PURE__ */ jsx("p", {
|
|
1140
779
|
className: "er-text er-text--muted",
|
|
1141
|
-
children: "
|
|
780
|
+
children: "Pricing is unavailable for this event right now."
|
|
1142
781
|
})
|
|
1143
|
-
|
|
1144
|
-
}
|
|
1145
|
-
/** Places remain, just fewer than this booking asks for (issue 1581). */
|
|
1146
|
-
function FewerPlacesPaymentPanel(props) {
|
|
782
|
+
});
|
|
1147
783
|
return /* @__PURE__ */ jsxs("div", {
|
|
1148
784
|
className: "rb-reg-stack er-stack",
|
|
1149
|
-
children: [
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
785
|
+
children: [
|
|
786
|
+
deliveryMode === "hybrid" ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("h3", {
|
|
787
|
+
tabIndex: -1,
|
|
788
|
+
className: "er-title",
|
|
789
|
+
children: "How will you attend?"
|
|
790
|
+
}), /* @__PURE__ */ jsx(AttendanceModeTiles, {
|
|
791
|
+
tiles: eventAttendanceModeTiles(attendanceModes, display),
|
|
792
|
+
selectedAttendanceMode,
|
|
793
|
+
onAttendanceModeChange
|
|
794
|
+
})] }) : null,
|
|
795
|
+
usesTicketTypes ? /* @__PURE__ */ jsx(Fragment, { children: noVisibleTicketTypes ? /* @__PURE__ */ jsx("p", {
|
|
1155
796
|
className: "er-text er-text--muted",
|
|
1156
|
-
children:
|
|
797
|
+
children: "No ticket types are currently available."
|
|
798
|
+
}) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
799
|
+
/* @__PURE__ */ jsxs("h3", {
|
|
800
|
+
tabIndex: -1,
|
|
801
|
+
className: "er-title",
|
|
802
|
+
children: ["Choose ", unit === "place" ? "your places" : "tickets"]
|
|
803
|
+
}),
|
|
804
|
+
/* @__PURE__ */ jsx(BookingUnitSessionHint, { bookingUnit }),
|
|
805
|
+
/* @__PURE__ */ jsx(TicketTypeQuantityRows, {
|
|
806
|
+
purpose,
|
|
807
|
+
display,
|
|
808
|
+
ticketTypes: visibleTicketTypes,
|
|
809
|
+
ticketSelections,
|
|
810
|
+
maxTickets,
|
|
811
|
+
heldPlacesBySelection,
|
|
812
|
+
availableSpots: resolveRemainingPlacesOverride(overallRemainingPlaces, availableSpots),
|
|
813
|
+
availabilityLabel: eventAvailabilityLabel,
|
|
814
|
+
currency: eventPricingCurrency,
|
|
815
|
+
hasAvailableTicketTypes,
|
|
816
|
+
onTicketSelectionsChange,
|
|
817
|
+
bookingUnit: unit
|
|
818
|
+
})
|
|
819
|
+
] }) }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
820
|
+
slidingScale ? /* @__PURE__ */ jsx(SlidingScaleAmountField, {
|
|
821
|
+
slidingScale,
|
|
822
|
+
currency: eventPricingCurrency,
|
|
823
|
+
value: selectedSlidingAmountInput,
|
|
824
|
+
message: slidingScaleSelectionMessage,
|
|
825
|
+
onChange: onSlidingAmountChange
|
|
826
|
+
}) : null,
|
|
827
|
+
/* @__PURE__ */ jsx(BookingUnitSessionHint, { bookingUnit }),
|
|
828
|
+
/* @__PURE__ */ jsx(PlaceCounter, {
|
|
829
|
+
ticketsCount,
|
|
830
|
+
ceiling: placesCeiling ?? maxAllowed,
|
|
831
|
+
availableSpots,
|
|
832
|
+
availabilityLabel: eventAvailabilityLabel,
|
|
833
|
+
waitlist: canJoinWaitlist,
|
|
834
|
+
onTicketsChange
|
|
835
|
+
})
|
|
836
|
+
] }),
|
|
837
|
+
/* @__PURE__ */ jsx(SelectionNote, { text: selectionNote }),
|
|
838
|
+
/* @__PURE__ */ jsx(PlacesNote, {
|
|
839
|
+
invitation,
|
|
840
|
+
isSoldOut,
|
|
841
|
+
canJoinWaitlist,
|
|
842
|
+
event,
|
|
843
|
+
someTicketsFull: someTicketsAtOwnLimit(visibleTicketTypes, purpose)
|
|
1157
844
|
})
|
|
1158
|
-
|
|
845
|
+
]
|
|
1159
846
|
});
|
|
847
|
+
};
|
|
848
|
+
/** Some ticket types are full by their own limit while another can still be chosen. */
|
|
849
|
+
function someTicketsAtOwnLimit(ticketTypes, purpose) {
|
|
850
|
+
return ticketTypes.some((ticketType) => canRequestTicketOption(ticketType.availability, purpose)) && ticketTypes.some((ticketType) => ticketType.availability.kind === "unavailable" && ticketType.availability.reason === "sold_out");
|
|
1160
851
|
}
|
|
1161
|
-
function
|
|
1162
|
-
return /* @__PURE__ */ jsxs("
|
|
1163
|
-
className: "
|
|
1164
|
-
children:
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
})]
|
|
852
|
+
function PlacesNote({ invitation, isSoldOut, canJoinWaitlist, event, someTicketsFull }) {
|
|
853
|
+
if (invitation?.kind === "held") return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("p", {
|
|
854
|
+
className: "er-text",
|
|
855
|
+
children: heldPlaceText(invitation.places, invitation.expiresAt, event)
|
|
856
|
+
}), invitation.ticketChoice && someTicketsFull ? /* @__PURE__ */ jsx("p", {
|
|
857
|
+
className: "er-text er-text--muted",
|
|
858
|
+
children: "If the ticket you were waiting for is sold out, you can choose another one for your place."
|
|
859
|
+
}) : null] });
|
|
860
|
+
if (invitation) return null;
|
|
861
|
+
if (canJoinWaitlist) return /* @__PURE__ */ jsx("p", {
|
|
862
|
+
className: "er-text er-text--muted",
|
|
863
|
+
children: "This event is currently full. Continue to join the waitlist if a place opens up."
|
|
1174
864
|
});
|
|
865
|
+
return isSoldOut ? /* @__PURE__ */ jsx("p", {
|
|
866
|
+
className: "er-text er-text--muted",
|
|
867
|
+
children: "This event is fully booked."
|
|
868
|
+
}) : null;
|
|
1175
869
|
}
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
870
|
+
/** How long the invitation holds their place, in the event's own time zone. */
|
|
871
|
+
function heldPlaceText(places, expiresAt, event) {
|
|
872
|
+
const held = places === 1 ? "We’re holding a place for you" : `We’re holding ${places} places for you`;
|
|
873
|
+
return event ? `${held} until ${formatTime(expiresAt, event)} on ${formatDate(expiresAt, event)}. Continue to book before then.` : `${held}. Continue to book.`;
|
|
874
|
+
}
|
|
875
|
+
function resolveRemainingPlacesOverride(override, cached) {
|
|
876
|
+
return override === void 0 ? cached : override;
|
|
877
|
+
}
|
|
878
|
+
//#endregion
|
|
879
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/RoomChooser.tsx
|
|
880
|
+
function currencyOf(wizard) {
|
|
881
|
+
return wizard.eligibility?.currency ?? (wizard.selectedEvent && publicEventPricingCurrency(wizard.selectedEvent.pricing)) ?? "GBP";
|
|
882
|
+
}
|
|
883
|
+
function RoomPhotos(props) {
|
|
884
|
+
const { kind } = props;
|
|
885
|
+
const titleId = useId();
|
|
886
|
+
const [index, setIndex] = useState(0);
|
|
887
|
+
const photo = kind.photos[index];
|
|
888
|
+
const several = kind.photos.length > 1;
|
|
889
|
+
return /* @__PURE__ */ jsxs(ModalShell, {
|
|
890
|
+
title: kind.name,
|
|
891
|
+
titleId,
|
|
892
|
+
onClose: props.onClose,
|
|
893
|
+
overlayClassName: "er-room-photos-overlay",
|
|
894
|
+
modalClassName: "er-room-photos",
|
|
895
|
+
headerClassName: "er-room-photos-head",
|
|
896
|
+
titleClassName: "er-title",
|
|
897
|
+
closeButtonClassName: "er-room-photos-close",
|
|
898
|
+
children: [photo ? /* @__PURE__ */ jsx("img", {
|
|
899
|
+
src: photo.src,
|
|
900
|
+
alt: photo.alt,
|
|
901
|
+
className: "er-room-photos-image"
|
|
902
|
+
}) : null, several ? /* @__PURE__ */ jsxs("div", {
|
|
903
|
+
className: "er-room-photos-nav",
|
|
904
|
+
children: [
|
|
905
|
+
/* @__PURE__ */ jsx("button", {
|
|
1191
906
|
type: "button",
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
onClick: props.onRequestLogin
|
|
907
|
+
className: "er-back-btn",
|
|
908
|
+
disabled: index === 0,
|
|
909
|
+
onClick: () => setIndex(index - 1),
|
|
910
|
+
children: "Previous photo"
|
|
1197
911
|
}),
|
|
1198
|
-
|
|
912
|
+
/* @__PURE__ */ jsxs("span", {
|
|
1199
913
|
className: "er-text er-text--muted",
|
|
1200
|
-
children:
|
|
914
|
+
children: [
|
|
915
|
+
index + 1,
|
|
916
|
+
" of ",
|
|
917
|
+
kind.photos.length
|
|
918
|
+
]
|
|
919
|
+
}),
|
|
920
|
+
/* @__PURE__ */ jsx("button", {
|
|
921
|
+
type: "button",
|
|
922
|
+
className: "er-back-btn",
|
|
923
|
+
disabled: index === kind.photos.length - 1,
|
|
924
|
+
onClick: () => setIndex(index + 1),
|
|
925
|
+
children: "Next photo"
|
|
1201
926
|
})
|
|
1202
|
-
]
|
|
1203
|
-
})]
|
|
927
|
+
]
|
|
928
|
+
}) : null]
|
|
1204
929
|
});
|
|
1205
930
|
}
|
|
1206
|
-
function
|
|
1207
|
-
|
|
1208
|
-
if (blocker?.kind !== "unavailable") return null;
|
|
1209
|
-
switch (blocker.reason) {
|
|
1210
|
-
case "alreadyWaitlisted": return /* @__PURE__ */ jsx(AlreadyWaitlistedPaymentPanel, {});
|
|
1211
|
-
case "soldOut": return /* @__PURE__ */ jsx(SoldOutPaymentPanel, {});
|
|
1212
|
-
case "fewerPlacesLeft": return /* @__PURE__ */ jsx(FewerPlacesPaymentPanel, {
|
|
1213
|
-
heading: blocker.heading,
|
|
1214
|
-
message: blocker.message
|
|
1215
|
-
});
|
|
1216
|
-
case "closed": return /* @__PURE__ */ jsx(ClosedPaymentPanel, { message: blocker.message });
|
|
1217
|
-
}
|
|
931
|
+
function photoLabel(kind) {
|
|
932
|
+
return `${kind.name}, ${kind.photos.length} ${kind.photos.length === 1 ? "photo" : "photos"}. Tap to see them.`;
|
|
1218
933
|
}
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
934
|
+
/** The one row every place on this step uses: what it is, its price, then how many. */
|
|
935
|
+
function RoomRow(props) {
|
|
936
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
937
|
+
className: [
|
|
938
|
+
"er-room-option",
|
|
939
|
+
props.disabled ? "er-ticket-line--disabled" : null,
|
|
940
|
+
props.gone ? "er-room-option--gone" : null
|
|
941
|
+
].filter(Boolean).join(" "),
|
|
942
|
+
"data-chosen": props.chosen ? "" : void 0,
|
|
943
|
+
role: "listitem",
|
|
944
|
+
children: [
|
|
945
|
+
/* @__PURE__ */ jsxs("div", {
|
|
946
|
+
className: "er-room-option-text",
|
|
947
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
948
|
+
className: "er-ticket-line-name",
|
|
949
|
+
children: props.title
|
|
950
|
+
}), props.details.map((detail) => detail ? /* @__PURE__ */ jsx("p", {
|
|
951
|
+
className: "er-ticket-line-detail",
|
|
952
|
+
children: detail
|
|
953
|
+
}, detail) : null)]
|
|
954
|
+
}),
|
|
955
|
+
/* @__PURE__ */ jsx("span", {
|
|
956
|
+
className: "er-ticket-line-price er-room-option-price",
|
|
957
|
+
children: props.price
|
|
958
|
+
}),
|
|
959
|
+
props.control
|
|
960
|
+
]
|
|
961
|
+
});
|
|
962
|
+
}
|
|
963
|
+
function RoomOptionRow(props) {
|
|
964
|
+
const { option } = props;
|
|
965
|
+
const price = `${formatPrice(option.priceCents, props.currency)}${option.each ? " each" : ""}`;
|
|
966
|
+
if (option.gone) return /* @__PURE__ */ jsx(RoomRow, {
|
|
967
|
+
gone: true,
|
|
968
|
+
chosen: false,
|
|
969
|
+
title: option.title,
|
|
970
|
+
details: ["Someone else has just booked this."],
|
|
971
|
+
price,
|
|
972
|
+
control: /* @__PURE__ */ jsx("button", {
|
|
973
|
+
type: "button",
|
|
974
|
+
className: "er-back-btn er-room-take-off",
|
|
975
|
+
"aria-label": `Take off ${props.kindName}, ${option.title}`,
|
|
976
|
+
onClick: () => props.onChange(0),
|
|
977
|
+
children: "Take off"
|
|
1231
978
|
})
|
|
1232
979
|
});
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
980
|
+
return /* @__PURE__ */ jsx(RoomRow, {
|
|
981
|
+
chosen: option.people > 0,
|
|
982
|
+
title: option.title,
|
|
983
|
+
details: [option.detail, props.display.placesLeft === "shown" ? option.placesLeft : null],
|
|
984
|
+
price,
|
|
985
|
+
control: /* @__PURE__ */ jsx(TicketCounter, {
|
|
986
|
+
ticketsCount: option.people,
|
|
987
|
+
minAllowed: 0,
|
|
988
|
+
maxAllowed: option.maxPeople,
|
|
989
|
+
label: `${props.kindName}, ${option.title}`,
|
|
990
|
+
onTicketsChange: props.onChange
|
|
1241
991
|
})
|
|
1242
992
|
});
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
993
|
+
}
|
|
994
|
+
function RoomKindGroup(props) {
|
|
995
|
+
const { kind, chooser } = props;
|
|
996
|
+
const [viewing, setViewing] = useState(false);
|
|
997
|
+
const firstPhoto = kind.photos[0];
|
|
998
|
+
return /* @__PURE__ */ jsxs("section", {
|
|
999
|
+
className: "er-room-kind",
|
|
1000
|
+
"aria-label": kind.name,
|
|
1001
|
+
"data-fully-booked": kind.fullyBooked ? "" : void 0,
|
|
1002
|
+
children: [
|
|
1003
|
+
/* @__PURE__ */ jsxs("div", {
|
|
1004
|
+
className: "er-room-kind-head",
|
|
1005
|
+
children: [firstPhoto ? /* @__PURE__ */ jsx("button", {
|
|
1006
|
+
type: "button",
|
|
1007
|
+
className: "er-room-photo",
|
|
1008
|
+
onClick: () => setViewing(true),
|
|
1009
|
+
children: /* @__PURE__ */ jsx("img", {
|
|
1010
|
+
src: firstPhoto.src,
|
|
1011
|
+
alt: photoLabel(kind)
|
|
1012
|
+
})
|
|
1013
|
+
}) : null, /* @__PURE__ */ jsxs("div", {
|
|
1014
|
+
className: "er-room-kind-text",
|
|
1015
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
1016
|
+
className: "er-room-kind-title",
|
|
1017
|
+
children: [/* @__PURE__ */ jsx("h4", {
|
|
1018
|
+
className: "er-room-kind-name",
|
|
1019
|
+
children: kind.name
|
|
1020
|
+
}), kind.fullyBooked ? /* @__PURE__ */ jsx("span", {
|
|
1021
|
+
className: "er-room-kind-full",
|
|
1022
|
+
children: "Fully booked"
|
|
1023
|
+
}) : null]
|
|
1024
|
+
}), kind.description ? /* @__PURE__ */ jsx("p", {
|
|
1025
|
+
className: "er-text er-text--muted",
|
|
1026
|
+
children: kind.description
|
|
1027
|
+
}) : null]
|
|
1028
|
+
})]
|
|
1029
|
+
}),
|
|
1030
|
+
kind.options.length > 0 ? /* @__PURE__ */ jsx("div", {
|
|
1031
|
+
role: "list",
|
|
1032
|
+
children: kind.options.map((option) => /* @__PURE__ */ jsx(RoomOptionRow, {
|
|
1033
|
+
kindName: kind.name,
|
|
1034
|
+
option,
|
|
1035
|
+
currency: props.currency,
|
|
1036
|
+
display: props.display,
|
|
1037
|
+
onChange: (people) => chooser.setRoomChoices(setRoomChoicePeople(chooser.choices, option.choice, people))
|
|
1038
|
+
}, option.key))
|
|
1039
|
+
}) : null,
|
|
1040
|
+
viewing ? /* @__PURE__ */ jsx(RoomPhotos, {
|
|
1041
|
+
kind,
|
|
1042
|
+
onClose: () => setViewing(false)
|
|
1043
|
+
}) : null
|
|
1044
|
+
]
|
|
1252
1045
|
});
|
|
1253
1046
|
}
|
|
1254
|
-
function
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1047
|
+
function DayPlaceRow(props) {
|
|
1048
|
+
const { ticketType, wizard } = props;
|
|
1049
|
+
const { quantity, maxAllowed, disabled, detail, setQuantity } = ticketTypeQuantity({
|
|
1050
|
+
display: props.display,
|
|
1051
|
+
purpose: wizard.ticketSelectionPurpose,
|
|
1052
|
+
ticketType,
|
|
1053
|
+
ticketSelections: wizard.selectedTicketLines,
|
|
1054
|
+
maxTickets: wizard.maxTicketsNum,
|
|
1055
|
+
availableSpots: null,
|
|
1056
|
+
currency: props.currency,
|
|
1057
|
+
onTicketSelectionsChange: props.chooser.setDayLines
|
|
1058
|
+
});
|
|
1059
|
+
return /* @__PURE__ */ jsx(RoomRow, {
|
|
1060
|
+
chosen: quantity > 0,
|
|
1061
|
+
disabled,
|
|
1062
|
+
title: ticketType.name,
|
|
1063
|
+
details: [ticketType.description ?? null, detail],
|
|
1064
|
+
price: ticketTypePriceText(ticketType, props.currency),
|
|
1065
|
+
control: /* @__PURE__ */ jsx(TicketCounter, {
|
|
1066
|
+
ticketsCount: quantity,
|
|
1067
|
+
minAllowed: 0,
|
|
1068
|
+
maxAllowed,
|
|
1069
|
+
label: ticketType.name,
|
|
1070
|
+
onTicketsChange: setQuantity
|
|
1071
|
+
})
|
|
1271
1072
|
});
|
|
1272
1073
|
}
|
|
1273
|
-
function
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
className: "er-
|
|
1281
|
-
children:
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1074
|
+
function PlacesWithoutARoom(props) {
|
|
1075
|
+
const { chooser } = props;
|
|
1076
|
+
if (chooser.dayOptions.length === 0) return null;
|
|
1077
|
+
return /* @__PURE__ */ jsxs("section", {
|
|
1078
|
+
className: "er-room-kind",
|
|
1079
|
+
"aria-label": "Places without a room",
|
|
1080
|
+
children: [/* @__PURE__ */ jsx("h4", {
|
|
1081
|
+
className: "er-room-kind-name",
|
|
1082
|
+
children: "Places without a room"
|
|
1083
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
1084
|
+
role: "list",
|
|
1085
|
+
children: chooser.dayOptions.map((ticketType) => /* @__PURE__ */ jsx(DayPlaceRow, {
|
|
1086
|
+
ticketType,
|
|
1087
|
+
wizard: props.wizard,
|
|
1088
|
+
chooser,
|
|
1089
|
+
display: props.display,
|
|
1090
|
+
currency: props.currency
|
|
1091
|
+
}, ticketType.pricingOptionId))
|
|
1092
|
+
})]
|
|
1093
|
+
});
|
|
1094
|
+
}
|
|
1095
|
+
/** Everywhere to sleep, the places that don't need a room, and how that adds up. */
|
|
1096
|
+
function RoomChooser(props) {
|
|
1097
|
+
const { wizard, chooser, display } = props;
|
|
1098
|
+
const { view } = chooser;
|
|
1099
|
+
const currency = currencyOf(wizard);
|
|
1100
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
1101
|
+
className: "er-room-chooser",
|
|
1102
|
+
children: [
|
|
1103
|
+
/* @__PURE__ */ jsxs("div", {
|
|
1104
|
+
className: "er-room-chooser-intro",
|
|
1105
|
+
children: [/* @__PURE__ */ jsx("h3", {
|
|
1106
|
+
tabIndex: -1,
|
|
1107
|
+
className: "er-title",
|
|
1108
|
+
children: "Where would you like to sleep?"
|
|
1109
|
+
}), /* @__PURE__ */ jsx("p", {
|
|
1110
|
+
className: "er-text er-text--muted",
|
|
1111
|
+
children: view.intro
|
|
1112
|
+
})]
|
|
1113
|
+
}),
|
|
1114
|
+
view.kinds.map((kind) => /* @__PURE__ */ jsx(RoomKindGroup, {
|
|
1115
|
+
kind,
|
|
1116
|
+
currency,
|
|
1117
|
+
display,
|
|
1118
|
+
chooser
|
|
1119
|
+
}, kind.kindId)),
|
|
1120
|
+
/* @__PURE__ */ jsx(PlacesWithoutARoom, {
|
|
1121
|
+
wizard,
|
|
1122
|
+
chooser,
|
|
1123
|
+
display,
|
|
1124
|
+
currency
|
|
1125
|
+
}),
|
|
1126
|
+
/* @__PURE__ */ jsxs("div", {
|
|
1127
|
+
className: "er-room-chooser-stay",
|
|
1128
|
+
"aria-live": "polite",
|
|
1286
1129
|
children: [
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1130
|
+
view.stayLines.length > 0 ? /* @__PURE__ */ jsxs("div", {
|
|
1131
|
+
className: "er-ticket-line-summary",
|
|
1132
|
+
children: [/* @__PURE__ */ jsx("p", {
|
|
1133
|
+
className: "er-ticket-line-summary-title",
|
|
1134
|
+
children: "How you'll stay"
|
|
1135
|
+
}), /* @__PURE__ */ jsx("ul", {
|
|
1136
|
+
className: "er-ticket-line-summary-list",
|
|
1137
|
+
children: view.stayLines.map((line) => /* @__PURE__ */ jsxs("li", { children: [line, "."] }, line))
|
|
1138
|
+
})]
|
|
1139
|
+
}) : null,
|
|
1140
|
+
view.priceNote ? /* @__PURE__ */ jsx("p", {
|
|
1141
|
+
className: "er-text er-text--muted er-room-price-note-beside-stay",
|
|
1142
|
+
children: view.priceNote
|
|
1143
|
+
}) : null,
|
|
1144
|
+
view.note ? /* @__PURE__ */ jsx("div", {
|
|
1145
|
+
className: "er-notice er-notice--info",
|
|
1146
|
+
role: "status",
|
|
1147
|
+
children: /* @__PURE__ */ jsx("p", { children: view.note })
|
|
1148
|
+
}) : null
|
|
1290
1149
|
]
|
|
1291
|
-
})
|
|
1150
|
+
})
|
|
1151
|
+
]
|
|
1152
|
+
});
|
|
1153
|
+
}
|
|
1154
|
+
/**
|
|
1155
|
+
* The footer's summary: anything stopping the booking sits directly above the
|
|
1156
|
+
* total, where it stays in view in the sticky bar on a phone.
|
|
1157
|
+
*/
|
|
1158
|
+
function RoomChooserSummary(props) {
|
|
1159
|
+
const { view } = props;
|
|
1160
|
+
const { takeOff } = view;
|
|
1161
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [view.notice ? /* @__PURE__ */ jsxs("div", {
|
|
1162
|
+
className: "er-notice er-notice--info er-room-notice",
|
|
1163
|
+
role: "alert",
|
|
1164
|
+
children: [
|
|
1165
|
+
/* @__PURE__ */ jsx("p", { children: view.notice }),
|
|
1166
|
+
view.noticeStay.length > 0 ? /* @__PURE__ */ jsx("ul", {
|
|
1167
|
+
className: "er-room-notice-stay",
|
|
1168
|
+
children: view.noticeStay.map((line) => /* @__PURE__ */ jsxs("li", { children: [line, "."] }, line))
|
|
1169
|
+
}) : null,
|
|
1170
|
+
takeOff ? /* @__PURE__ */ jsx("button", {
|
|
1171
|
+
type: "button",
|
|
1172
|
+
className: "er-back-btn er-room-take-off",
|
|
1173
|
+
onClick: () => props.wizard.roomChooser?.setRoomChoices(takeOff.choices),
|
|
1174
|
+
children: takeOff.label
|
|
1175
|
+
}) : null
|
|
1176
|
+
]
|
|
1177
|
+
}) : null, /* @__PURE__ */ jsxs("div", {
|
|
1178
|
+
className: "er-summary-bar er-room-summary",
|
|
1179
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
1180
|
+
className: "er-summary-bar-info",
|
|
1181
|
+
children: view.people === 0 ? /* @__PURE__ */ jsx("span", {
|
|
1182
|
+
className: "er-summary-bar-meta",
|
|
1183
|
+
children: ADD_A_PLACE
|
|
1184
|
+
}) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1185
|
+
/* @__PURE__ */ jsxs("span", {
|
|
1186
|
+
className: "er-summary-bar-meta",
|
|
1187
|
+
children: [
|
|
1188
|
+
view.people,
|
|
1189
|
+
" ",
|
|
1190
|
+
view.people === 1 ? "person" : "people"
|
|
1191
|
+
]
|
|
1192
|
+
}),
|
|
1193
|
+
view.splitWarning ? /* @__PURE__ */ jsx("span", {
|
|
1194
|
+
className: "er-room-split-warning",
|
|
1195
|
+
children: view.splitWarning
|
|
1196
|
+
}) : null,
|
|
1197
|
+
view.totalNote ? /* @__PURE__ */ jsx("span", {
|
|
1198
|
+
className: "er-text er-text--muted",
|
|
1199
|
+
children: view.totalNote
|
|
1200
|
+
}) : null,
|
|
1201
|
+
view.priceNote ? /* @__PURE__ */ jsx("span", {
|
|
1202
|
+
className: "er-text er-text--muted er-room-price-note-in-bar",
|
|
1203
|
+
children: view.priceNote
|
|
1204
|
+
}) : null
|
|
1205
|
+
] })
|
|
1206
|
+
}), view.totalCents === null ? null : /* @__PURE__ */ jsx("span", {
|
|
1207
|
+
className: "er-summary-bar-price",
|
|
1208
|
+
children: formatPrice(view.totalCents, currencyOf(props.wizard))
|
|
1209
|
+
})]
|
|
1210
|
+
})] });
|
|
1211
|
+
}
|
|
1212
|
+
//#endregion
|
|
1213
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/ErrorStep.tsx
|
|
1214
|
+
/**
|
|
1215
|
+
* Error Step
|
|
1216
|
+
*
|
|
1217
|
+
* Displays an error message with a retry button when registration fails.
|
|
1218
|
+
*/
|
|
1219
|
+
const labels = {
|
|
1220
|
+
none: "",
|
|
1221
|
+
retry: "Try again",
|
|
1222
|
+
places: "Choose places",
|
|
1223
|
+
start: "Start again",
|
|
1224
|
+
details: "Check my details",
|
|
1225
|
+
"payment-options": "View payment options",
|
|
1226
|
+
portal: "View my bookings",
|
|
1227
|
+
event: "View event"
|
|
1228
|
+
};
|
|
1229
|
+
const ErrorStep = ({ message, onRetry, action = "retry", canJoinWaitlist = false }) => {
|
|
1230
|
+
const offerWaitlist = action === "places" && canJoinWaitlist;
|
|
1231
|
+
return /* @__PURE__ */ jsx(TerminalPanel, {
|
|
1232
|
+
tone: "error",
|
|
1233
|
+
className: "er-center",
|
|
1234
|
+
titleClassName: "er-title--lg er-message",
|
|
1235
|
+
icon: /* @__PURE__ */ jsx(StateIcon, {
|
|
1236
|
+
variant: "error",
|
|
1237
|
+
children: /* @__PURE__ */ jsx(CrossIcon, {})
|
|
1238
|
+
}),
|
|
1239
|
+
title: "We couldn’t complete your booking",
|
|
1240
|
+
body: /* @__PURE__ */ jsx("p", {
|
|
1241
|
+
className: "er-text--muted er-message",
|
|
1242
|
+
children: offerWaitlist ? "Sorry, this event is now full. You can join the waiting list, and we’ll email you if a place becomes available." : message
|
|
1243
|
+
}),
|
|
1244
|
+
actions: action === "none" ? void 0 : action === "portal" ? /* @__PURE__ */ jsx("a", {
|
|
1245
|
+
href: "/portal",
|
|
1246
|
+
className: "er-retry-btn",
|
|
1247
|
+
children: labels[action]
|
|
1248
|
+
}) : /* @__PURE__ */ jsx("button", {
|
|
1249
|
+
type: "button",
|
|
1250
|
+
onClick: onRetry,
|
|
1251
|
+
className: "er-retry-btn",
|
|
1252
|
+
children: offerWaitlist ? "Join the waiting list" : labels[action]
|
|
1253
|
+
})
|
|
1254
|
+
});
|
|
1255
|
+
};
|
|
1256
|
+
//#endregion
|
|
1257
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/CopyParts.tsx
|
|
1258
|
+
/** Copy with its bold parts in <strong>: offer lines and hints (issue 1725). */
|
|
1259
|
+
function CopyParts(props) {
|
|
1260
|
+
return /* @__PURE__ */ jsx(Fragment, { children: props.parts.map((part, index) => part.strong ? /* @__PURE__ */ jsx("strong", { children: part.text }, index) : /* @__PURE__ */ jsx(React.Fragment, { children: part.text }, index)) });
|
|
1261
|
+
}
|
|
1262
|
+
//#endregion
|
|
1263
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/CombinationSummary.tsx
|
|
1264
|
+
/** The usual total struck through, then what combination prices bring it to (issue 1725). */
|
|
1265
|
+
function CombinationPricing(props) {
|
|
1266
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
1267
|
+
className: "er-summary-bar-pricing",
|
|
1268
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
1269
|
+
className: "er-summary-bar-price er-summary-bar-price--struck",
|
|
1270
|
+
children: formatPrice(props.listCents, props.currency)
|
|
1271
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
1272
|
+
className: "er-summary-bar-price",
|
|
1273
|
+
children: formatPrice(props.totalCents, props.currency)
|
|
1292
1274
|
})]
|
|
1293
1275
|
});
|
|
1294
1276
|
}
|
|
1295
|
-
|
|
1277
|
+
/** "4 dates for £40, plus 1 at £12 · You save £8" under the summary row. */
|
|
1278
|
+
function CombinationDetail(props) {
|
|
1279
|
+
if (!props.working) return null;
|
|
1280
|
+
return /* @__PURE__ */ jsxs("p", {
|
|
1281
|
+
className: "er-combination-detail",
|
|
1282
|
+
children: [
|
|
1283
|
+
props.working.working,
|
|
1284
|
+
" · ",
|
|
1285
|
+
/* @__PURE__ */ jsx("span", {
|
|
1286
|
+
className: "er-combination-saving",
|
|
1287
|
+
children: props.working.saving
|
|
1288
|
+
})
|
|
1289
|
+
]
|
|
1290
|
+
});
|
|
1291
|
+
}
|
|
1292
|
+
/** "Add 1 more date to get 4 dates for £40." under the summary bar. */
|
|
1293
|
+
function CombinationHint(props) {
|
|
1294
|
+
if (!props.parts) return null;
|
|
1295
|
+
return /* @__PURE__ */ jsx("p", {
|
|
1296
|
+
className: "er-combination-hint",
|
|
1297
|
+
role: "status",
|
|
1298
|
+
children: /* @__PURE__ */ jsx(CopyParts, { parts: props.parts })
|
|
1299
|
+
});
|
|
1300
|
+
}
|
|
1301
|
+
//#endregion
|
|
1302
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/registrationSummary.state.ts
|
|
1303
|
+
/** Several course runs are one purchase; individual run names belong in the breakdown. */
|
|
1304
|
+
function registrationSummaryTitle(input) {
|
|
1305
|
+
if (input.severalItems === "runs") return (input.subject?.kind === "eventOffering" ? input.subject.title?.trim() : null) || "Your booking";
|
|
1306
|
+
return occurrenceTitleOverride(input.occurrenceContext) ?? input.eventTitle ?? "";
|
|
1307
|
+
}
|
|
1308
|
+
//#endregion
|
|
1309
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/EventRegistrationSummaryBar.tsx
|
|
1310
|
+
/** A run booked with the visitor's membership, which the bar names in place of a price. */
|
|
1311
|
+
function membershipFor(wizard) {
|
|
1312
|
+
const selection = wizard.paymentSelection;
|
|
1313
|
+
return selection.method === "membership" ? selection.productName?.trim() || "Membership" : null;
|
|
1314
|
+
}
|
|
1315
|
+
/** The membership covering a run, above the bar; nothing without one. */
|
|
1316
|
+
function MembershipRow(props) {
|
|
1317
|
+
if (props.name === null) return null;
|
|
1318
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
1319
|
+
className: "er-summary-bar-product",
|
|
1320
|
+
children: [/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx("div", {
|
|
1321
|
+
className: "er-summary-bar-product-name",
|
|
1322
|
+
children: props.name
|
|
1323
|
+
}) }), /* @__PURE__ */ jsx("div", {
|
|
1324
|
+
className: "er-summary-bar-product-price",
|
|
1325
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
1326
|
+
className: "er-summary-bar-included",
|
|
1327
|
+
children: "Included"
|
|
1328
|
+
})
|
|
1329
|
+
})]
|
|
1330
|
+
});
|
|
1331
|
+
}
|
|
1332
|
+
function getFlexibleBalanceSummary(option) {
|
|
1333
|
+
return option?.flexibleBalance ? {
|
|
1334
|
+
total: option.amounts.formattedTotal,
|
|
1335
|
+
dueToday: option.amounts.formattedDueToday,
|
|
1336
|
+
...option.flexibleBalance
|
|
1337
|
+
} : null;
|
|
1338
|
+
}
|
|
1339
|
+
function getSelectedDirectPaymentOption(wizard) {
|
|
1340
|
+
if (wizard.paymentSelection.method !== "stripe") return null;
|
|
1341
|
+
const kind = wizard.paymentSelection.collectionOptionKind;
|
|
1342
|
+
return wizard.directPaymentOptions.find((option) => option.kind === kind) ?? null;
|
|
1343
|
+
}
|
|
1344
|
+
/** "2 tickets" or "1 place"; booking several, "5 dates × 2 places" or the runs by name. */
|
|
1345
|
+
function summaryCountLabel(wizard, summaryEvent) {
|
|
1346
|
+
if (wizard.severalItems !== null) return selectionPlacesLabel(wizard.severalItems, wizard.selection, wizard.ticketsCount);
|
|
1347
|
+
if (wizard.ticketsCount <= 0) return null;
|
|
1348
|
+
const tiered = summaryEvent !== null && summaryEvent !== void 0 && publicEventPricingStrategy(summaryEvent.pricing) === "tiered";
|
|
1349
|
+
if (tiered) {
|
|
1350
|
+
const byType = ticketTypeCountLabel(wizard.selectedTicketLines, wizard.visibleTicketTypes);
|
|
1351
|
+
if (byType) return byType;
|
|
1352
|
+
}
|
|
1353
|
+
const unit = tiered ? "ticket" : "place";
|
|
1354
|
+
return `${wizard.ticketsCount} ${unit}${wizard.ticketsCount === 1 ? "" : "s"}`;
|
|
1355
|
+
}
|
|
1356
|
+
/** "1 Standard, 1 Concession" when tickets of more than one type are chosen; otherwise null. */
|
|
1357
|
+
function ticketTypeCountLabel(lines, ticketTypes) {
|
|
1358
|
+
const chosen = lines.filter((line) => line.quantity > 0);
|
|
1359
|
+
if (chosen.length < 2) return null;
|
|
1360
|
+
const parts = chosen.map((line) => {
|
|
1361
|
+
const name = ticketTypes.find((type) => type.pricingOptionId === line.pricingOptionId)?.name;
|
|
1362
|
+
return name ? `${line.quantity} ${name}` : null;
|
|
1363
|
+
});
|
|
1364
|
+
return parts.every((part) => part !== null) ? parts.join(", ") : null;
|
|
1365
|
+
}
|
|
1366
|
+
/**
|
|
1367
|
+
* The footer's one line (issue 1581): how many, the discount's name, then
|
|
1368
|
+
* when. Ticket types are tickets; a single price, or a course, is places.
|
|
1369
|
+
*/
|
|
1370
|
+
function summaryMetaFacts(input) {
|
|
1371
|
+
const { wizard, summaryEvent } = input;
|
|
1372
|
+
const several = wizard.severalItems;
|
|
1373
|
+
return {
|
|
1374
|
+
countLabel: summaryCountLabel(wizard, summaryEvent),
|
|
1375
|
+
discount: input.discount && membershipFor(wizard) === null ? {
|
|
1376
|
+
label: input.discount.publicLabel,
|
|
1377
|
+
description: input.discount.description ?? null
|
|
1378
|
+
} : null,
|
|
1379
|
+
schedule: summaryEvent && several === null ? formatRegistrationSchedule(summaryEvent, wizard.occurrenceContext) : null
|
|
1380
|
+
};
|
|
1381
|
+
}
|
|
1382
|
+
/** The panel's header already says when, so the panel hides the schedule. */
|
|
1383
|
+
function SummaryMeta({ facts }) {
|
|
1384
|
+
return /* @__PURE__ */ jsxs("span", {
|
|
1385
|
+
className: "er-summary-bar-meta",
|
|
1386
|
+
children: [
|
|
1387
|
+
facts.countLabel ? /* @__PURE__ */ jsx("span", {
|
|
1388
|
+
className: "er-summary-bar-count",
|
|
1389
|
+
children: facts.countLabel
|
|
1390
|
+
}) : null,
|
|
1391
|
+
facts.discount ? /* @__PURE__ */ jsx("span", {
|
|
1392
|
+
className: "er-summary-bar-discount",
|
|
1393
|
+
title: facts.discount.description ?? void 0,
|
|
1394
|
+
children: facts.discount.label
|
|
1395
|
+
}) : null,
|
|
1396
|
+
facts.schedule ? /* @__PURE__ */ jsx("span", {
|
|
1397
|
+
className: "er-summary-bar-schedule",
|
|
1398
|
+
children: facts.schedule
|
|
1399
|
+
}) : null
|
|
1400
|
+
]
|
|
1401
|
+
});
|
|
1402
|
+
}
|
|
1403
|
+
/**
|
|
1404
|
+
* The date step's footer line (issue 1581): the chosen date and its price,
|
|
1405
|
+
* before any places are counted. Nothing until a date is chosen.
|
|
1406
|
+
*/
|
|
1407
|
+
function DateStepSummary({ event }) {
|
|
1408
|
+
if (!event) return null;
|
|
1409
|
+
const price = formatEventPriceDisplay(event.pricing).trim();
|
|
1410
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
1411
|
+
className: "er-summary-bar",
|
|
1412
|
+
"data-step": "select-event",
|
|
1413
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
1414
|
+
className: "er-summary-bar-info",
|
|
1415
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
1416
|
+
className: "er-summary-bar-meta",
|
|
1417
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
1418
|
+
className: "er-summary-bar-schedule",
|
|
1419
|
+
children: formatRegistrationSchedule(event)
|
|
1420
|
+
})
|
|
1421
|
+
})
|
|
1422
|
+
}), price ? /* @__PURE__ */ jsx("div", {
|
|
1423
|
+
className: "er-summary-bar-pricing",
|
|
1424
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
1425
|
+
className: "er-summary-bar-price",
|
|
1426
|
+
children: price
|
|
1427
|
+
})
|
|
1428
|
+
}) : null]
|
|
1429
|
+
});
|
|
1430
|
+
}
|
|
1431
|
+
/**
|
|
1432
|
+
* Booking several (issue 1725): how many are ticked and their total. With
|
|
1433
|
+
* combination prices the usual total is struck through above the planned
|
|
1434
|
+
* one, with the working underneath and the next saving under the bar.
|
|
1435
|
+
*/
|
|
1436
|
+
function SeveralStepSummary({ wizard }) {
|
|
1437
|
+
const several = wizard.severalItems;
|
|
1438
|
+
const first = wizard.selectedEvent;
|
|
1439
|
+
const { working, hint } = wizard.selectionCombination;
|
|
1440
|
+
if (several === null || !first) return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(DateStepSummary, { event: first }), /* @__PURE__ */ jsx(CombinationHint, { parts: hint })] });
|
|
1441
|
+
const currency = publicEventPricingCurrency(first.pricing);
|
|
1442
|
+
const { totalCents: total, listTotalCents: list } = wizard.selectionPrice;
|
|
1443
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs("div", {
|
|
1444
|
+
className: summaryBarClassName(working),
|
|
1445
|
+
"data-step": "select-event",
|
|
1446
|
+
children: [
|
|
1447
|
+
/* @__PURE__ */ jsx("div", {
|
|
1448
|
+
className: "er-summary-bar-info",
|
|
1449
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
1450
|
+
className: "er-summary-bar-meta",
|
|
1451
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
1452
|
+
className: "er-summary-bar-count",
|
|
1453
|
+
children: selectionItemsLabel(several, wizard.selection)
|
|
1454
|
+
})
|
|
1455
|
+
})
|
|
1456
|
+
}),
|
|
1457
|
+
currency && total !== null && total > 0 ? working && list !== null ? /* @__PURE__ */ jsx(CombinationPricing, {
|
|
1458
|
+
listCents: list,
|
|
1459
|
+
totalCents: total,
|
|
1460
|
+
currency
|
|
1461
|
+
}) : /* @__PURE__ */ jsx("div", {
|
|
1462
|
+
className: "er-summary-bar-pricing",
|
|
1463
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
1464
|
+
className: "er-summary-bar-price",
|
|
1465
|
+
children: formatPrice(total, currency)
|
|
1466
|
+
})
|
|
1467
|
+
}) : null,
|
|
1468
|
+
/* @__PURE__ */ jsx(CombinationDetail, { working })
|
|
1469
|
+
]
|
|
1470
|
+
}), /* @__PURE__ */ jsx(CombinationHint, { parts: hint })] });
|
|
1471
|
+
}
|
|
1472
|
+
/**
|
|
1473
|
+
* Dates with a pass or membership: the bar shows what the card is charged,
|
|
1474
|
+
* not the dates' price.
|
|
1475
|
+
*/
|
|
1476
|
+
function barPrice(wizard) {
|
|
1477
|
+
const fundedCardCents = wizard.selectionFunding?.view?.cardCents ?? null;
|
|
1478
|
+
return fundedCardCents === null ? {
|
|
1479
|
+
subtotalCents: wizard.ticketSelectionSubtotalCents,
|
|
1480
|
+
funded: false
|
|
1481
|
+
} : {
|
|
1482
|
+
subtotalCents: fundedCardCents,
|
|
1483
|
+
funded: true
|
|
1484
|
+
};
|
|
1485
|
+
}
|
|
1486
|
+
/**
|
|
1487
|
+
* The later steps' price for several items with combination prices: the
|
|
1488
|
+
* usual total struck through, then what's due. The working shows while the
|
|
1489
|
+
* planner's total stands; once the server prices a code, its total alone.
|
|
1490
|
+
*/
|
|
1491
|
+
function combinationSummary(wizard, price) {
|
|
1492
|
+
if (wizard.severalItems === null || price.funded) return null;
|
|
1493
|
+
const subtotalCents = price.subtotalCents;
|
|
1494
|
+
const list = wizard.selectionPrice.listTotalCents;
|
|
1495
|
+
const working = wizard.selectionCombination.working;
|
|
1496
|
+
if (list === null || list <= subtotalCents || working === null && wizard.combinationCodeField === null) return null;
|
|
1497
|
+
return {
|
|
1498
|
+
list,
|
|
1499
|
+
working: subtotalCents === wizard.selectionPrice.totalCents ? working : null
|
|
1500
|
+
};
|
|
1501
|
+
}
|
|
1502
|
+
/** A deposit or instalment plan: the total, what's payable now, and what's left. */
|
|
1503
|
+
function FlexibleBalancePricing(props) {
|
|
1504
|
+
const { summary } = props;
|
|
1505
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1506
|
+
summary.total ? /* @__PURE__ */ jsxs("div", {
|
|
1507
|
+
className: "er-summary-bar-product-detail",
|
|
1508
|
+
children: ["Total: ", summary.total]
|
|
1509
|
+
}) : null,
|
|
1510
|
+
/* @__PURE__ */ jsx("div", {
|
|
1511
|
+
className: "er-summary-bar-price",
|
|
1512
|
+
children: summary.dueToday ?? props.fallbackDueToday
|
|
1513
|
+
}),
|
|
1514
|
+
/* @__PURE__ */ jsx("div", {
|
|
1515
|
+
className: "er-summary-bar-included",
|
|
1516
|
+
children: "Payable now"
|
|
1517
|
+
}),
|
|
1518
|
+
summary.remainingBalance ? /* @__PURE__ */ jsxs("div", {
|
|
1519
|
+
className: "er-summary-bar-product-detail",
|
|
1520
|
+
children: [
|
|
1521
|
+
"Remaining balance: ",
|
|
1522
|
+
summary.remainingBalance,
|
|
1523
|
+
summary.balanceDueBy ? ` due by ${summary.balanceDueBy}` : ""
|
|
1524
|
+
]
|
|
1525
|
+
}) : null,
|
|
1526
|
+
summary.depositPolicy ? /* @__PURE__ */ jsxs("div", {
|
|
1527
|
+
className: "er-summary-bar-product-detail",
|
|
1528
|
+
children: ["Deposit: ", summary.depositPolicy]
|
|
1529
|
+
}) : null
|
|
1530
|
+
] });
|
|
1531
|
+
}
|
|
1532
|
+
function summaryBarClassName(working) {
|
|
1533
|
+
return working ? "er-summary-bar er-summary-bar--combination" : "er-summary-bar";
|
|
1534
|
+
}
|
|
1535
|
+
function EventRegistrationSummaryBar(props) {
|
|
1536
|
+
const { wizard } = props;
|
|
1537
|
+
if (wizard.step === "select-event") return /* @__PURE__ */ jsx(SeveralStepSummary, { wizard });
|
|
1538
|
+
const summaryEvent = wizard.selectedEvent ?? wizard.preSelectedEvent;
|
|
1539
|
+
const summaryTitle = registrationSummaryTitle({
|
|
1540
|
+
...wizard,
|
|
1541
|
+
eventTitle: summaryEvent?.title
|
|
1542
|
+
});
|
|
1543
|
+
const summaryCurrency = summaryEvent ? publicEventPricingCurrency(summaryEvent.pricing) : null;
|
|
1544
|
+
const teamMemberNames = (summaryEvent?.teamMembers ?? []).map((teamMember) => teamMember.name).filter(Boolean);
|
|
1545
|
+
const price = barPrice(wizard);
|
|
1546
|
+
const subtotalCents = price.subtotalCents;
|
|
1547
|
+
if (!summaryTitle || !summaryCurrency || subtotalCents === null) return null;
|
|
1548
|
+
const autoAppliedDiscount = wizard.autoAppliedDiscount;
|
|
1549
|
+
const autoAppliedDiscountCents = Math.max(0, autoAppliedDiscount?.computedAmountCents ?? 0);
|
|
1550
|
+
const discountedTotalCents = Math.max(0, subtotalCents - autoAppliedDiscountCents);
|
|
1551
|
+
const flexibleBalanceSummary = getFlexibleBalanceSummary(getSelectedDirectPaymentOption(wizard));
|
|
1552
|
+
const meta = summaryMetaFacts({
|
|
1553
|
+
wizard,
|
|
1554
|
+
summaryEvent,
|
|
1555
|
+
discount: autoAppliedDiscountCents > 0 ? autoAppliedDiscount : null
|
|
1556
|
+
});
|
|
1557
|
+
const membership = membershipFor(wizard);
|
|
1558
|
+
const combination = combinationSummary(wizard, {
|
|
1559
|
+
subtotalCents,
|
|
1560
|
+
funded: price.funded
|
|
1561
|
+
});
|
|
1562
|
+
const working = combination?.working ?? null;
|
|
1563
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(MembershipRow, { name: membership }), /* @__PURE__ */ jsxs("div", {
|
|
1564
|
+
className: summaryBarClassName(working),
|
|
1565
|
+
"data-step": wizard.step,
|
|
1566
|
+
children: [
|
|
1567
|
+
/* @__PURE__ */ jsxs("div", {
|
|
1568
|
+
className: "er-summary-bar-info",
|
|
1569
|
+
children: [
|
|
1570
|
+
/* @__PURE__ */ jsx("h4", {
|
|
1571
|
+
className: "er-summary-bar-event",
|
|
1572
|
+
children: summaryTitle
|
|
1573
|
+
}),
|
|
1574
|
+
/* @__PURE__ */ jsx(SummaryMeta, { facts: meta }),
|
|
1575
|
+
teamMemberNames.length > 0 && /* @__PURE__ */ jsxs("div", {
|
|
1576
|
+
className: "er-summary-bar-meta",
|
|
1577
|
+
children: ["With ", teamMemberNames.join(", ")]
|
|
1578
|
+
})
|
|
1579
|
+
]
|
|
1580
|
+
}),
|
|
1581
|
+
combination && subtotalCents > 0 ? /* @__PURE__ */ jsx(CombinationPricing, {
|
|
1582
|
+
listCents: combination.list,
|
|
1583
|
+
totalCents: subtotalCents,
|
|
1584
|
+
currency: summaryCurrency
|
|
1585
|
+
}) : subtotalCents > 0 && /* @__PURE__ */ jsx("div", {
|
|
1586
|
+
className: "er-summary-bar-pricing",
|
|
1587
|
+
children: membership ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
|
|
1588
|
+
className: "er-summary-bar-price er-summary-bar-price--struck",
|
|
1589
|
+
children: formatPrice(subtotalCents, summaryCurrency)
|
|
1590
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
1591
|
+
className: "er-summary-bar-included",
|
|
1592
|
+
children: "Included in membership"
|
|
1593
|
+
})] }) : flexibleBalanceSummary ? /* @__PURE__ */ jsx(FlexibleBalancePricing, {
|
|
1594
|
+
summary: flexibleBalanceSummary,
|
|
1595
|
+
fallbackDueToday: formatPrice(discountedTotalCents, summaryCurrency)
|
|
1596
|
+
}) : autoAppliedDiscount && autoAppliedDiscountCents > 0 ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1597
|
+
/* @__PURE__ */ jsx("span", {
|
|
1598
|
+
className: "er-summary-bar-price er-summary-bar-price--struck",
|
|
1599
|
+
children: formatPrice(subtotalCents, summaryCurrency)
|
|
1600
|
+
}),
|
|
1601
|
+
/* @__PURE__ */ jsx("span", {
|
|
1602
|
+
className: "er-summary-bar-price",
|
|
1603
|
+
children: formatPrice(discountedTotalCents, summaryCurrency)
|
|
1604
|
+
}),
|
|
1605
|
+
autoAppliedDiscount.description ? /* @__PURE__ */ jsx("div", {
|
|
1606
|
+
className: "er-summary-bar-product-detail er-summary-bar-discount-detail",
|
|
1607
|
+
children: autoAppliedDiscount.description
|
|
1608
|
+
}) : null
|
|
1609
|
+
] }) : /* @__PURE__ */ jsx("span", {
|
|
1610
|
+
className: "er-summary-bar-price",
|
|
1611
|
+
children: formatPrice(subtotalCents, summaryCurrency)
|
|
1612
|
+
})
|
|
1613
|
+
}),
|
|
1614
|
+
/* @__PURE__ */ jsx(CombinationDetail, { working })
|
|
1615
|
+
]
|
|
1616
|
+
})] });
|
|
1617
|
+
}
|
|
1618
|
+
//#endregion
|
|
1619
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/EventRegistrationWizardActions.tsx
|
|
1620
|
+
/**
|
|
1621
|
+
* Label for the button that submits the details step.
|
|
1622
|
+
*
|
|
1623
|
+
* When a pass covers the booking there is no payment step to follow, so this
|
|
1624
|
+
* button is the last thing read before a credit is spent — it names the pass
|
|
1625
|
+
* rather than leaving that to the summary above it.
|
|
1626
|
+
*/
|
|
1627
|
+
function resolveDetailsButtonText(input) {
|
|
1628
|
+
const { wizard } = input;
|
|
1629
|
+
const admission = wizard.admission;
|
|
1630
|
+
switch (admission.kind) {
|
|
1631
|
+
case "checking": return "Checking availability…";
|
|
1632
|
+
case "closed": return closedAdmissionLabel(admission.reason);
|
|
1633
|
+
case "fullyBooked": return fullyBookedLabel(admission);
|
|
1634
|
+
case "waitlist": return "Join waitlist";
|
|
1635
|
+
case "open":
|
|
1636
|
+
case "resume": break;
|
|
1637
|
+
}
|
|
1638
|
+
if (wizard.paymentSelection.method === "membership") return input.fallbackText;
|
|
1639
|
+
return wizard.eventRequiresPayment ? "Continue to payment" : input.fallbackText;
|
|
1640
|
+
}
|
|
1641
|
+
/** When the booking options failed to load, the visitor can ask for them again. */
|
|
1642
|
+
function ReloadOptionsButton(props) {
|
|
1643
|
+
const { admission } = props.wizard;
|
|
1644
|
+
if (admission.kind !== "closed" || admission.reason !== "optionsUnavailable") return null;
|
|
1645
|
+
return /* @__PURE__ */ jsx("button", {
|
|
1646
|
+
type: "button",
|
|
1647
|
+
onClick: props.wizard.reloadOptions,
|
|
1648
|
+
className: "er-back-btn",
|
|
1649
|
+
children: "Try again"
|
|
1650
|
+
});
|
|
1651
|
+
}
|
|
1652
|
+
/**
|
|
1653
|
+
* The date step's footer (issue 1581): Continue moves on once a date is
|
|
1654
|
+
* chosen. Unrelated events still move on when picked, so there's nothing here.
|
|
1655
|
+
*/
|
|
1656
|
+
function SelectDateActions(props) {
|
|
1657
|
+
const { wizard } = props;
|
|
1658
|
+
const several = wizard.selectionMode.kind === "several";
|
|
1659
|
+
if (!several && getEventSelectionMode(wizard.scopedEvents) !== "date") return null;
|
|
1660
|
+
const chosen = wizard.selectedEvent;
|
|
1296
1661
|
return /* @__PURE__ */ jsx("div", {
|
|
1297
|
-
className: "rb-
|
|
1298
|
-
children: /* @__PURE__ */ jsx(
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1662
|
+
className: "rb-wizard-actions er-actions",
|
|
1663
|
+
children: /* @__PURE__ */ jsx(ThemedButton, {
|
|
1664
|
+
type: "button",
|
|
1665
|
+
onClick: several ? wizard.handleSelectionContinue : () => {
|
|
1666
|
+
if (chosen) wizard.handleEventSelect(chosen);
|
|
1667
|
+
},
|
|
1668
|
+
disabled: several ? wizard.selection.length === 0 : !chosen,
|
|
1669
|
+
variant: props.buttonVariant,
|
|
1670
|
+
size: "md",
|
|
1671
|
+
label: "Continue"
|
|
1304
1672
|
})
|
|
1305
1673
|
});
|
|
1306
1674
|
}
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
}
|
|
1312
|
-
/** Waitlist entries have their own notice, so only confirmed bookings count here. */
|
|
1313
|
-
function summariseExistingBookings(registrations) {
|
|
1314
|
-
const confirmed = registrations.filter((registration) => registration.status === "confirmed");
|
|
1315
|
-
const [only] = confirmed;
|
|
1316
|
-
if (!only) return { kind: "none" };
|
|
1317
|
-
if (confirmed.length === 1) return {
|
|
1318
|
-
kind: "booked",
|
|
1319
|
-
detail: only.ticketBreakdown ?? places(only.ticketsCount)
|
|
1320
|
-
};
|
|
1321
|
-
const placeCount = confirmed.reduce((total, registration) => total + registration.ticketsCount, 0);
|
|
1322
|
-
return {
|
|
1323
|
-
kind: "booked",
|
|
1324
|
-
detail: `${confirmed.length} bookings · ${places(placeCount)}`
|
|
1325
|
-
};
|
|
1326
|
-
}
|
|
1327
|
-
//#endregion
|
|
1328
|
-
//#region ../blocks/src/system/runtime/nodes/event-registration/TicketSelectionStep.tsx
|
|
1329
|
-
function pluralizeBookingUnit(kind, quantity) {
|
|
1330
|
-
return `${kind}${quantity === 1 ? "" : "s"}`;
|
|
1331
|
-
}
|
|
1332
|
-
function getEventAttendanceModeLabel(mode) {
|
|
1333
|
-
switch (mode) {
|
|
1334
|
-
case "in_person": return "In person";
|
|
1335
|
-
case "online": return "Online";
|
|
1336
|
-
}
|
|
1337
|
-
}
|
|
1338
|
-
function TicketCounter(props) {
|
|
1339
|
-
const { ticketsCount, maxAllowed, label, onTicketsChange } = props;
|
|
1340
|
-
const minAllowed = props.minAllowed ?? 1;
|
|
1675
|
+
function SelectTicketsActions(props) {
|
|
1676
|
+
const { wizard } = props;
|
|
1677
|
+
const { label: continueLabel, pending: registrationOptionsPending } = wizard.ticketContinuation;
|
|
1678
|
+
const isContinueDisabled = wizard.ticketContinuation.kind === "blocked";
|
|
1341
1679
|
return /* @__PURE__ */ jsxs("div", {
|
|
1342
|
-
className: "rb-
|
|
1680
|
+
className: "rb-wizard-actions er-actions",
|
|
1343
1681
|
children: [
|
|
1344
|
-
/* @__PURE__ */ jsx("button", {
|
|
1682
|
+
!wizard.hasPreSelectedContext && /* @__PURE__ */ jsx("button", {
|
|
1345
1683
|
type: "button",
|
|
1346
|
-
"
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
className: "er-counter-btn",
|
|
1350
|
-
children: "−"
|
|
1351
|
-
}),
|
|
1352
|
-
/* @__PURE__ */ jsx("span", {
|
|
1353
|
-
className: "er-counter-value",
|
|
1354
|
-
children: ticketsCount
|
|
1684
|
+
onClick: () => wizard.setStep("select-event"),
|
|
1685
|
+
className: "er-back-btn",
|
|
1686
|
+
children: "← Back"
|
|
1355
1687
|
}),
|
|
1356
|
-
/* @__PURE__ */ jsx(
|
|
1688
|
+
registrationStopsHere(wizard.admission) ? null : /* @__PURE__ */ jsx(ThemedButton, {
|
|
1357
1689
|
type: "button",
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1690
|
+
onClick: wizard.handleTicketsComplete,
|
|
1691
|
+
disabled: isContinueDisabled,
|
|
1692
|
+
variant: props.buttonVariant,
|
|
1693
|
+
size: "md",
|
|
1694
|
+
label: continueLabel,
|
|
1695
|
+
pending: registrationOptionsPending ? {
|
|
1696
|
+
label: continueLabel,
|
|
1697
|
+
spinnerSize: "xs",
|
|
1698
|
+
spinnerClassName: "er-button-spinner",
|
|
1699
|
+
contentClassName: "er-button-with-spinner"
|
|
1700
|
+
} : void 0
|
|
1701
|
+
}),
|
|
1702
|
+
/* @__PURE__ */ jsx(ReloadOptionsButton, { wizard })
|
|
1364
1703
|
]
|
|
1365
1704
|
});
|
|
1366
1705
|
}
|
|
1367
|
-
function
|
|
1368
|
-
const
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
props.maxAllowed,
|
|
1374
|
-
" ",
|
|
1375
|
-
props.quantityLabel,
|
|
1376
|
-
" per booking."
|
|
1377
|
-
] })] }) : null]
|
|
1378
|
-
});
|
|
1379
|
-
}
|
|
1380
|
-
function BookingUnitSessionHint(props) {
|
|
1381
|
-
const count = props.bookingUnit.includedSessionCount;
|
|
1382
|
-
return props.bookingUnit.kind === "place" && count && count > 1 ? /* @__PURE__ */ jsxs("p", {
|
|
1383
|
-
className: "er-text er-text--muted",
|
|
1384
|
-
children: [
|
|
1385
|
-
"Every place includes all ",
|
|
1386
|
-
count,
|
|
1387
|
-
" sessions."
|
|
1388
|
-
]
|
|
1389
|
-
}) : null;
|
|
1390
|
-
}
|
|
1391
|
-
function bookingQuantityLabel(unit, waitlist) {
|
|
1392
|
-
if (!waitlist) return pluralizeBookingUnit(unit, 2);
|
|
1393
|
-
return "waitlist places";
|
|
1394
|
-
}
|
|
1395
|
-
function BookingQuantityPrompt(props) {
|
|
1396
|
-
return /* @__PURE__ */ jsxs("h3", {
|
|
1397
|
-
tabIndex: -1,
|
|
1398
|
-
className: "er-title",
|
|
1399
|
-
children: [
|
|
1400
|
-
"How many ",
|
|
1401
|
-
bookingQuantityLabel(props.unit, props.waitlist),
|
|
1402
|
-
"?"
|
|
1403
|
-
]
|
|
1706
|
+
function EnterDetailsActions(props) {
|
|
1707
|
+
const { wizard } = props;
|
|
1708
|
+
const isContinueDisabled = resolveRegistrationAvailabilityBlocker(wizard.admission) !== null;
|
|
1709
|
+
const continueLabel = resolveDetailsButtonText({
|
|
1710
|
+
wizard,
|
|
1711
|
+
fallbackText: props.buttonText
|
|
1404
1712
|
});
|
|
1405
|
-
}
|
|
1406
|
-
function SlidingScaleAmountField(props) {
|
|
1407
|
-
const id = props.id ?? "er-sliding-amount";
|
|
1408
|
-
const minLabel = formatPrice(props.slidingScale.minAmount, props.currency);
|
|
1409
|
-
const maxLabel = formatPrice(props.slidingScale.maxAmount, props.currency);
|
|
1410
|
-
const suggestedLabel = props.slidingScale.suggestedAmount !== null ? formatPrice(props.slidingScale.suggestedAmount, props.currency) : null;
|
|
1411
1713
|
return /* @__PURE__ */ jsxs("div", {
|
|
1412
|
-
className: "er-
|
|
1714
|
+
className: "rb-wizard-actions er-actions",
|
|
1413
1715
|
children: [
|
|
1414
|
-
/* @__PURE__ */ jsx("
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
/* @__PURE__ */ jsx("input", {
|
|
1420
|
-
id,
|
|
1421
|
-
type: "number",
|
|
1422
|
-
min: formatCentsAsCurrencyInput(props.slidingScale.minAmount),
|
|
1423
|
-
max: formatCentsAsCurrencyInput(props.slidingScale.maxAmount),
|
|
1424
|
-
step: "0.01",
|
|
1425
|
-
inputMode: "decimal",
|
|
1426
|
-
className: "form-input",
|
|
1427
|
-
value: props.value,
|
|
1428
|
-
onChange: (event) => props.onChange?.(event.target.value)
|
|
1716
|
+
/* @__PURE__ */ jsx("button", {
|
|
1717
|
+
type: "button",
|
|
1718
|
+
onClick: () => wizard.setStep("select-tickets"),
|
|
1719
|
+
className: "er-back-btn",
|
|
1720
|
+
children: "← Back"
|
|
1429
1721
|
}),
|
|
1430
|
-
/* @__PURE__ */
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
suggestedLabel ? `; suggested ${suggestedLabel}` : "",
|
|
1438
|
-
"."
|
|
1439
|
-
]
|
|
1722
|
+
registrationStopsHere(wizard.admission) ? null : /* @__PURE__ */ jsx(ThemedButton, {
|
|
1723
|
+
type: "button",
|
|
1724
|
+
onClick: wizard.handleDetailsComplete,
|
|
1725
|
+
disabled: isContinueDisabled,
|
|
1726
|
+
variant: props.buttonVariant,
|
|
1727
|
+
size: "md",
|
|
1728
|
+
label: continueLabel
|
|
1440
1729
|
}),
|
|
1441
|
-
|
|
1442
|
-
className: "er-text er-text--muted",
|
|
1443
|
-
children: props.message
|
|
1444
|
-
}) : null
|
|
1730
|
+
/* @__PURE__ */ jsx(ReloadOptionsButton, { wizard })
|
|
1445
1731
|
]
|
|
1446
1732
|
});
|
|
1447
1733
|
}
|
|
1448
|
-
function
|
|
1449
|
-
const
|
|
1450
|
-
const
|
|
1451
|
-
return /* @__PURE__ */ jsxs("
|
|
1452
|
-
className: "er-
|
|
1453
|
-
children:
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
totalSelectedQuantity,
|
|
1471
|
-
maxTickets: props.maxTickets,
|
|
1472
|
-
purpose: props.purpose,
|
|
1473
|
-
pricingOptionId: ticketType.pricingOptionId,
|
|
1474
|
-
availability: ticketType.availability,
|
|
1475
|
-
heldPlacesBySelection: props.heldPlacesBySelection,
|
|
1476
|
-
overallRemainingPlaces: props.availableSpots ?? null
|
|
1477
|
-
});
|
|
1478
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
1479
|
-
className: `er-ticket-line${disabled ? " er-ticket-line--disabled" : ""}`,
|
|
1480
|
-
role: "listitem",
|
|
1481
|
-
children: [/* @__PURE__ */ jsxs("div", {
|
|
1482
|
-
className: "er-ticket-line-main",
|
|
1483
|
-
children: [
|
|
1484
|
-
/* @__PURE__ */ jsxs("div", {
|
|
1485
|
-
className: "er-ticket-line-heading",
|
|
1486
|
-
children: [/* @__PURE__ */ jsx("span", {
|
|
1487
|
-
className: "er-ticket-line-name",
|
|
1488
|
-
children: ticketType.name
|
|
1489
|
-
}), /* @__PURE__ */ jsx("span", {
|
|
1490
|
-
className: "er-ticket-line-price",
|
|
1491
|
-
children: priceLabel
|
|
1492
|
-
})]
|
|
1493
|
-
}),
|
|
1494
|
-
ticketType.description ? /* @__PURE__ */ jsx("p", {
|
|
1495
|
-
className: "er-ticket-line-detail",
|
|
1496
|
-
children: ticketType.description
|
|
1497
|
-
}) : null,
|
|
1498
|
-
availabilityLabel ? /* @__PURE__ */ jsx("p", {
|
|
1499
|
-
className: "er-ticket-line-detail",
|
|
1500
|
-
children: availabilityLabel
|
|
1501
|
-
}) : ticketTypeRemainingLabel ? /* @__PURE__ */ jsx("p", {
|
|
1502
|
-
className: "er-ticket-line-detail",
|
|
1503
|
-
children: ticketTypeRemainingLabel
|
|
1504
|
-
}) : null
|
|
1505
|
-
]
|
|
1506
|
-
}), /* @__PURE__ */ jsx(TicketCounter, {
|
|
1507
|
-
ticketsCount: quantity,
|
|
1508
|
-
minAllowed: 0,
|
|
1509
|
-
maxAllowed,
|
|
1510
|
-
label: ticketType.name,
|
|
1511
|
-
onTicketsChange: (nextQuantity) => {
|
|
1512
|
-
props.onTicketSelectionsChange?.(setTicketLineQuantity({
|
|
1513
|
-
lines: props.ticketSelections,
|
|
1514
|
-
pricingOptionId: ticketType.pricingOptionId,
|
|
1515
|
-
quantity: nextQuantity
|
|
1516
|
-
}));
|
|
1517
|
-
}
|
|
1518
|
-
})]
|
|
1519
|
-
}, ticketType.pricingOptionId);
|
|
1520
|
-
})
|
|
1521
|
-
}),
|
|
1522
|
-
/* @__PURE__ */ jsx(TicketCounterLimit, {
|
|
1523
|
-
maxAllowed: effectiveMaxTickets,
|
|
1524
|
-
quantityLabel: pluralizeBookingUnit(props.bookingUnit, effectiveMaxTickets),
|
|
1525
|
-
availableSpots: props.availableSpots,
|
|
1526
|
-
availabilityLabel: props.availabilityLabel
|
|
1527
|
-
}),
|
|
1528
|
-
totalSelectedQuantity === 0 && props.hasAvailableTicketTypes ? /* @__PURE__ */ jsxs("p", {
|
|
1529
|
-
className: "er-text er-text--muted",
|
|
1530
|
-
children: [
|
|
1531
|
-
"Choose at least one ",
|
|
1532
|
-
props.bookingUnit,
|
|
1533
|
-
" to continue."
|
|
1534
|
-
]
|
|
1535
|
-
}) : totalSelectedQuantity === 0 ? /* @__PURE__ */ jsxs("p", {
|
|
1536
|
-
className: "er-text er-text--muted",
|
|
1537
|
-
children: [
|
|
1538
|
-
"No ",
|
|
1539
|
-
props.bookingUnit === "place" ? "places" : "ticket types",
|
|
1540
|
-
" are currently available."
|
|
1541
|
-
]
|
|
1542
|
-
}) : null
|
|
1543
|
-
]
|
|
1544
|
-
});
|
|
1734
|
+
function SelectPaymentActions(props) {
|
|
1735
|
+
const { wizard } = props;
|
|
1736
|
+
const { status, canContinue, buttonText } = wizard.paymentStepState;
|
|
1737
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [status === "ready" && wizard.paymentHeldForCode ? /* @__PURE__ */ jsx("p", {
|
|
1738
|
+
className: "er-discount__hint",
|
|
1739
|
+
children: "Press Apply to use your discount code, or remove it to carry on without it."
|
|
1740
|
+
}) : null, /* @__PURE__ */ jsxs("div", {
|
|
1741
|
+
className: "rb-wizard-actions er-actions",
|
|
1742
|
+
children: [/* @__PURE__ */ jsx("button", {
|
|
1743
|
+
type: "button",
|
|
1744
|
+
onClick: () => wizard.setStep("enter-details"),
|
|
1745
|
+
className: "er-back-btn",
|
|
1746
|
+
children: "← Back"
|
|
1747
|
+
}), status === "ready" && /* @__PURE__ */ jsx(ThemedButton, {
|
|
1748
|
+
type: "button",
|
|
1749
|
+
onClick: () => void wizard.handlePaymentSelect(),
|
|
1750
|
+
disabled: !canContinue,
|
|
1751
|
+
variant: props.buttonVariant,
|
|
1752
|
+
size: "md",
|
|
1753
|
+
label: buttonText
|
|
1754
|
+
})]
|
|
1755
|
+
})] });
|
|
1545
1756
|
}
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1757
|
+
/** Stripe owns the Pay button, so the payment footer offers only the way back. */
|
|
1758
|
+
function PaymentActions(props) {
|
|
1759
|
+
return /* @__PURE__ */ jsx("div", {
|
|
1760
|
+
className: "rb-wizard-actions rb-wizard-actions--back-only er-actions",
|
|
1761
|
+
children: /* @__PURE__ */ jsx("button", {
|
|
1762
|
+
type: "button",
|
|
1763
|
+
onClick: props.wizard.paymentController.check,
|
|
1764
|
+
className: "er-back-btn",
|
|
1765
|
+
children: "← Back"
|
|
1766
|
+
})
|
|
1552
1767
|
});
|
|
1553
1768
|
}
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1769
|
+
function EventRegistrationWizardActions(props) {
|
|
1770
|
+
const { wizard } = props;
|
|
1771
|
+
switch (wizard.step) {
|
|
1772
|
+
case "error":
|
|
1773
|
+
case "success":
|
|
1774
|
+
case "submitting":
|
|
1775
|
+
case "verifying-payment":
|
|
1776
|
+
case "verifying-timeout":
|
|
1777
|
+
case "payment-status":
|
|
1778
|
+
case "payment-failed": return null;
|
|
1779
|
+
case "select-event": return /* @__PURE__ */ jsx(SelectDateActions, { ...props });
|
|
1780
|
+
case "select-tickets": return /* @__PURE__ */ jsx(SelectTicketsActions, { ...props });
|
|
1781
|
+
case "enter-details": return /* @__PURE__ */ jsx(EnterDetailsActions, { ...props });
|
|
1782
|
+
case "select-payment": return /* @__PURE__ */ jsx(SelectPaymentActions, { ...props });
|
|
1783
|
+
case "payment": return /* @__PURE__ */ jsx(PaymentActions, { ...props });
|
|
1784
|
+
default: return null;
|
|
1785
|
+
}
|
|
1560
1786
|
}
|
|
1561
|
-
|
|
1562
|
-
|
|
1787
|
+
//#endregion
|
|
1788
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/PaymentBlockingPanel.tsx
|
|
1789
|
+
function MissingEligibilityPanel() {
|
|
1563
1790
|
return /* @__PURE__ */ jsx("div", {
|
|
1564
|
-
className: "er-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
children: /* @__PURE__ */ jsxs("button", {
|
|
1572
|
-
type: "button",
|
|
1573
|
-
"aria-pressed": isSelected,
|
|
1574
|
-
className: `er-payment-tile${isSelected ? " er-payment-tile--selected" : ""}`,
|
|
1575
|
-
onClick: () => props.onAttendanceModeChange?.(tile.mode),
|
|
1576
|
-
children: [/* @__PURE__ */ jsx("div", {
|
|
1577
|
-
className: "er-payment-tile-label",
|
|
1578
|
-
children: getEventAttendanceModeLabel(tile.mode)
|
|
1579
|
-
}), /* @__PURE__ */ jsx("div", {
|
|
1580
|
-
className: "er-payment-tile-detail",
|
|
1581
|
-
children: tile.detail
|
|
1582
|
-
})]
|
|
1583
|
-
})
|
|
1584
|
-
}, tile.mode);
|
|
1791
|
+
className: "rb-reg-stack er-stack",
|
|
1792
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
1793
|
+
className: "er-center",
|
|
1794
|
+
children: /* @__PURE__ */ jsx("p", {
|
|
1795
|
+
className: "er-text er-error",
|
|
1796
|
+
children: "We couldn’t load the booking options for this event. Please refresh this page and try again. If this keeps happening, contact the organiser for help."
|
|
1797
|
+
})
|
|
1585
1798
|
})
|
|
1586
1799
|
});
|
|
1587
1800
|
}
|
|
1588
|
-
function
|
|
1589
|
-
return {
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1801
|
+
function UnavailableEntitlementMessage(props) {
|
|
1802
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1803
|
+
/* @__PURE__ */ jsx("p", {
|
|
1804
|
+
className: "er-text er-error",
|
|
1805
|
+
children: "This event requires a valid pass or membership to register."
|
|
1806
|
+
}),
|
|
1807
|
+
props.eligibility.eventAcceptsPasses && !props.eligibility.eventAcceptsMemberships && /* @__PURE__ */ jsx("p", {
|
|
1808
|
+
className: "er-text er-text--muted",
|
|
1809
|
+
children: "You need a pass with credits for this event category."
|
|
1810
|
+
}),
|
|
1811
|
+
props.eligibility.eventAcceptsMemberships && !props.eligibility.eventAcceptsPasses && /* @__PURE__ */ jsx("p", {
|
|
1812
|
+
className: "er-text er-text--muted",
|
|
1813
|
+
children: "You need an active membership for this event category."
|
|
1814
|
+
})
|
|
1815
|
+
] });
|
|
1593
1816
|
}
|
|
1594
|
-
/**
|
|
1595
|
-
function
|
|
1596
|
-
return
|
|
1817
|
+
/** Places remain, just fewer than this booking asks for (issue 1581). */
|
|
1818
|
+
function FewerPlacesPaymentPanel(props) {
|
|
1819
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
1820
|
+
className: "rb-reg-stack er-stack",
|
|
1821
|
+
children: [/* @__PURE__ */ jsx("h3", {
|
|
1822
|
+
className: "er-title",
|
|
1823
|
+
children: props.heading
|
|
1824
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
1825
|
+
className: "er-center",
|
|
1826
|
+
children: /* @__PURE__ */ jsx("p", {
|
|
1827
|
+
className: "er-text er-text--muted",
|
|
1828
|
+
children: props.message
|
|
1829
|
+
})
|
|
1830
|
+
})]
|
|
1831
|
+
});
|
|
1597
1832
|
}
|
|
1598
|
-
function
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1833
|
+
function SoldOutPaymentPanel() {
|
|
1834
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
1835
|
+
className: "rb-reg-stack er-stack",
|
|
1836
|
+
children: [/* @__PURE__ */ jsx("h3", {
|
|
1837
|
+
className: "er-title",
|
|
1838
|
+
children: "Sold out"
|
|
1839
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
1840
|
+
className: "er-center",
|
|
1841
|
+
children: /* @__PURE__ */ jsx("p", {
|
|
1842
|
+
className: "er-text er-text--muted",
|
|
1843
|
+
children: "This event is fully booked and there is no waitlist available for this booking."
|
|
1844
|
+
})
|
|
1845
|
+
})]
|
|
1846
|
+
});
|
|
1608
1847
|
}
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
*/
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1848
|
+
function IneligiblePaymentPanel(props) {
|
|
1849
|
+
const promptLogin = shouldPromptForLogin("not-eligible", props.isAuthenticated, props.eligibility);
|
|
1850
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
1851
|
+
className: "rb-reg-stack er-stack",
|
|
1852
|
+
children: [/* @__PURE__ */ jsx("h3", {
|
|
1853
|
+
className: "er-title",
|
|
1854
|
+
children: promptLogin ? "Log in required" : "Payment required"
|
|
1855
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
1856
|
+
className: "er-center",
|
|
1857
|
+
children: promptLogin ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1858
|
+
/* @__PURE__ */ jsx("p", {
|
|
1859
|
+
className: "er-text er-text--muted",
|
|
1860
|
+
children: "Have a pass or membership? Log in to use it."
|
|
1861
|
+
}),
|
|
1862
|
+
/* @__PURE__ */ jsx(ThemedButton, {
|
|
1863
|
+
type: "button",
|
|
1864
|
+
variant: "primary",
|
|
1865
|
+
size: "md",
|
|
1866
|
+
label: "Email me a login link",
|
|
1867
|
+
disabled: !props.email.trim(),
|
|
1868
|
+
onClick: props.onRequestLogin
|
|
1869
|
+
}),
|
|
1870
|
+
!props.email.trim() && /* @__PURE__ */ jsx("p", {
|
|
1871
|
+
className: "er-text er-text--muted",
|
|
1872
|
+
children: "Enter your email to request a login link."
|
|
1873
|
+
})
|
|
1874
|
+
] }) : /* @__PURE__ */ jsx(UnavailableEntitlementMessage, { eligibility: props.eligibility })
|
|
1631
1875
|
})]
|
|
1632
|
-
})
|
|
1876
|
+
});
|
|
1633
1877
|
}
|
|
1634
|
-
function
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1878
|
+
function renderRegistrationAvailabilityBlocker(admission) {
|
|
1879
|
+
const blocker = resolveRegistrationAvailabilityBlocker(admission);
|
|
1880
|
+
if (blocker?.kind !== "unavailable") return null;
|
|
1881
|
+
switch (blocker.reason) {
|
|
1882
|
+
case "alreadyWaitlisted": return /* @__PURE__ */ jsx(AlreadyWaitlistedPaymentPanel, {});
|
|
1883
|
+
case "soldOut": return /* @__PURE__ */ jsx(SoldOutPaymentPanel, {});
|
|
1884
|
+
case "fewerPlacesLeft": return /* @__PURE__ */ jsx(FewerPlacesPaymentPanel, {
|
|
1885
|
+
heading: blocker.heading,
|
|
1886
|
+
message: blocker.message
|
|
1887
|
+
});
|
|
1888
|
+
case "closed": return /* @__PURE__ */ jsx(ClosedPaymentPanel, { message: blocker.message });
|
|
1889
|
+
}
|
|
1639
1890
|
}
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
*
|
|
1643
|
-
* Allows users to select how many tickets they want for the selected event.
|
|
1644
|
-
* Respects both max tickets per registration and available spots.
|
|
1645
|
-
*
|
|
1646
|
-
* Can use either a full PublicEvent or just occurrence context (when on event page).
|
|
1647
|
-
*/
|
|
1648
|
-
const TicketSelectionStep = ({ purpose, event, display, occurrenceContext: _occurrenceContext, selectedAttendanceMode = null, onAttendanceModeChange, ticketsCount, maxTickets, placesCeiling, visibleTicketTypes: visibleTicketTypesOverride, overallRemainingPlaces, heldPlacesBySelection, ticketSelections = [], onTicketSelectionsChange, slidingScale = null, selectedSlidingAmountInput = "", slidingScaleSelectionMessage = null, onSlidingAmountChange, onTicketsChange, bookingUnit = { kind: "ticket" }, selectionNote, invitation = null }) => {
|
|
1649
|
-
const unit = bookingUnit.kind;
|
|
1650
|
-
const deliveryMode = event?.deliveryMode ?? "in_person";
|
|
1651
|
-
const attendanceModes = event?.attendanceModes ?? [];
|
|
1652
|
-
const { availableSpots, isSoldOut, canJoinWaitlist, eventAvailabilityLabel } = getTicketSelectionCapacity(event, selectedAttendanceMode, display, invitation);
|
|
1653
|
-
const { mode: eventPricingMode, currency: eventPricingCurrency } = resolveTicketSelectionPricing(event);
|
|
1654
|
-
const usesTicketTypes = eventPricingMode === "tiered";
|
|
1655
|
-
const visibleTicketTypes = usesTicketTypes ? visibleTicketTypesOverride ?? getVisibleTicketTypes({
|
|
1656
|
-
event,
|
|
1657
|
-
eligibility: null,
|
|
1658
|
-
selectedAttendanceMode,
|
|
1659
|
-
ticketSelections
|
|
1660
|
-
}) : [];
|
|
1661
|
-
const noVisibleTicketTypes = usesTicketTypes && visibleTicketTypes.length === 0;
|
|
1662
|
-
const hasAvailableTicketTypes = usesTicketTypes && visibleTicketTypes.some((ticketType) => canRequestTicketOption(ticketType.availability, purpose));
|
|
1663
|
-
const maxAllowed = maxTickets;
|
|
1664
|
-
if (deliveryMode === "hybrid" && !selectedAttendanceMode) return /* @__PURE__ */ jsxs("div", {
|
|
1891
|
+
function PaymentBlockingPanel(props) {
|
|
1892
|
+
if (props.eligibilityLoading) return /* @__PURE__ */ jsx("div", {
|
|
1665
1893
|
className: "rb-reg-stack er-stack",
|
|
1666
|
-
children:
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
}),
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1894
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
1895
|
+
className: "er-center",
|
|
1896
|
+
children: [/* @__PURE__ */ jsx(SpinnerNode, {
|
|
1897
|
+
size: "lg",
|
|
1898
|
+
srLabel: "Checking payment options"
|
|
1899
|
+
}), /* @__PURE__ */ jsx("p", {
|
|
1900
|
+
className: "er-text--muted",
|
|
1901
|
+
children: "Checking payment options…"
|
|
1902
|
+
})]
|
|
1903
|
+
})
|
|
1904
|
+
});
|
|
1905
|
+
if (props.eligibilityError) return /* @__PURE__ */ jsx("div", {
|
|
1906
|
+
className: "rb-reg-stack er-stack",
|
|
1907
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
1908
|
+
className: "er-center",
|
|
1909
|
+
children: /* @__PURE__ */ jsx("p", {
|
|
1910
|
+
className: "er-text er-error",
|
|
1911
|
+
children: props.eligibilityError
|
|
1680
1912
|
})
|
|
1681
|
-
|
|
1913
|
+
})
|
|
1914
|
+
});
|
|
1915
|
+
if (!props.eligibility) return /* @__PURE__ */ jsx(MissingEligibilityPanel, {});
|
|
1916
|
+
const availabilityPanel = renderRegistrationAvailabilityBlocker(props.admission);
|
|
1917
|
+
if (availabilityPanel) return availabilityPanel;
|
|
1918
|
+
if (props.paysNothing) return /* @__PURE__ */ jsx(FreePaymentSummary, { ticketsCount: props.ticketsCount });
|
|
1919
|
+
return props.eligibility.paymentOptions.length > 0 ? null : /* @__PURE__ */ jsx(IneligiblePaymentPanel, {
|
|
1920
|
+
eligibility: props.eligibility,
|
|
1921
|
+
email: props.email,
|
|
1922
|
+
isAuthenticated: props.isAuthenticated,
|
|
1923
|
+
onRequestLogin: props.onRequestLogin
|
|
1682
1924
|
});
|
|
1683
|
-
|
|
1925
|
+
}
|
|
1926
|
+
function AlreadyWaitlistedPaymentPanel() {
|
|
1927
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
1684
1928
|
className: "rb-reg-stack er-stack",
|
|
1685
|
-
children: /* @__PURE__ */ jsx("
|
|
1686
|
-
className: "er-
|
|
1687
|
-
children: "
|
|
1688
|
-
})
|
|
1929
|
+
children: [/* @__PURE__ */ jsx("h3", {
|
|
1930
|
+
className: "er-title",
|
|
1931
|
+
children: "Already on the waitlist"
|
|
1932
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
1933
|
+
className: "er-center",
|
|
1934
|
+
children: [/* @__PURE__ */ jsx("p", {
|
|
1935
|
+
className: "er-text er-text--muted",
|
|
1936
|
+
children: "You're already on the waitlist for this event."
|
|
1937
|
+
}), /* @__PURE__ */ jsx("a", {
|
|
1938
|
+
href: "/portal",
|
|
1939
|
+
className: "er-retry-btn",
|
|
1940
|
+
children: "View my bookings"
|
|
1941
|
+
})]
|
|
1942
|
+
})]
|
|
1689
1943
|
});
|
|
1944
|
+
}
|
|
1945
|
+
function FreePaymentSummary({ ticketsCount }) {
|
|
1690
1946
|
return /* @__PURE__ */ jsxs("div", {
|
|
1691
1947
|
className: "rb-reg-stack er-stack",
|
|
1692
|
-
children: [
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
})] }) : null,
|
|
1702
|
-
usesTicketTypes ? /* @__PURE__ */ jsx(Fragment, { children: noVisibleTicketTypes ? /* @__PURE__ */ jsx("p", {
|
|
1948
|
+
children: [/* @__PURE__ */ jsx("h3", {
|
|
1949
|
+
className: "er-title",
|
|
1950
|
+
children: "Payment"
|
|
1951
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
1952
|
+
className: "er-payment-summary",
|
|
1953
|
+
children: [/* @__PURE__ */ jsx("p", {
|
|
1954
|
+
className: "er-text",
|
|
1955
|
+
children: "This event is free!"
|
|
1956
|
+
}), /* @__PURE__ */ jsxs("p", {
|
|
1703
1957
|
className: "er-text er-text--muted",
|
|
1704
|
-
children:
|
|
1705
|
-
}) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1706
|
-
/* @__PURE__ */ jsxs("h3", {
|
|
1707
|
-
tabIndex: -1,
|
|
1708
|
-
className: "er-title",
|
|
1709
|
-
children: ["Choose ", unit === "place" ? "your places" : "tickets"]
|
|
1710
|
-
}),
|
|
1711
|
-
/* @__PURE__ */ jsx(BookingUnitSessionHint, { bookingUnit }),
|
|
1712
|
-
/* @__PURE__ */ jsx(TicketTypeQuantityRows, {
|
|
1713
|
-
purpose,
|
|
1714
|
-
display,
|
|
1715
|
-
ticketTypes: visibleTicketTypes,
|
|
1716
|
-
ticketSelections,
|
|
1717
|
-
maxTickets,
|
|
1718
|
-
heldPlacesBySelection,
|
|
1719
|
-
availableSpots: resolveRemainingPlacesOverride(overallRemainingPlaces, availableSpots),
|
|
1720
|
-
availabilityLabel: eventAvailabilityLabel,
|
|
1721
|
-
currency: eventPricingCurrency,
|
|
1722
|
-
hasAvailableTicketTypes,
|
|
1723
|
-
onTicketSelectionsChange,
|
|
1724
|
-
bookingUnit: unit
|
|
1725
|
-
})
|
|
1726
|
-
] }) }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1727
|
-
slidingScale ? /* @__PURE__ */ jsx(SlidingScaleAmountField, {
|
|
1728
|
-
slidingScale,
|
|
1729
|
-
currency: eventPricingCurrency,
|
|
1730
|
-
value: selectedSlidingAmountInput,
|
|
1731
|
-
message: slidingScaleSelectionMessage,
|
|
1732
|
-
onChange: onSlidingAmountChange
|
|
1733
|
-
}) : null,
|
|
1734
|
-
/* @__PURE__ */ jsx(BookingUnitSessionHint, { bookingUnit }),
|
|
1735
|
-
/* @__PURE__ */ jsx(PlaceCounter, {
|
|
1958
|
+
children: [
|
|
1736
1959
|
ticketsCount,
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
})
|
|
1743
|
-
] }),
|
|
1744
|
-
/* @__PURE__ */ jsx(SelectionNote, { text: selectionNote }),
|
|
1745
|
-
/* @__PURE__ */ jsx(PlacesNote, {
|
|
1746
|
-
invitation,
|
|
1747
|
-
isSoldOut,
|
|
1748
|
-
canJoinWaitlist,
|
|
1749
|
-
ticketsCount,
|
|
1750
|
-
event
|
|
1751
|
-
})
|
|
1752
|
-
]
|
|
1753
|
-
});
|
|
1754
|
-
};
|
|
1755
|
-
function PlacesNote({ invitation, isSoldOut, canJoinWaitlist, ticketsCount, event }) {
|
|
1756
|
-
if (invitation?.kind === "held") return /* @__PURE__ */ jsx("p", {
|
|
1757
|
-
className: "er-text",
|
|
1758
|
-
children: heldPlaceText(ticketsCount, invitation.expiresAt, event)
|
|
1960
|
+
" ticket",
|
|
1961
|
+
ticketsCount > 1 ? "s" : ""
|
|
1962
|
+
]
|
|
1963
|
+
})]
|
|
1964
|
+
})]
|
|
1759
1965
|
});
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1966
|
+
}
|
|
1967
|
+
function ClosedPaymentPanel({ message }) {
|
|
1968
|
+
return /* @__PURE__ */ jsx("div", {
|
|
1969
|
+
className: "rb-reg-stack er-stack",
|
|
1970
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
1971
|
+
className: "er-center",
|
|
1972
|
+
children: /* @__PURE__ */ jsx("p", {
|
|
1973
|
+
className: "er-text er-error",
|
|
1974
|
+
children: message
|
|
1975
|
+
})
|
|
1976
|
+
})
|
|
1764
1977
|
});
|
|
1765
|
-
return isSoldOut ? /* @__PURE__ */ jsx("p", {
|
|
1766
|
-
className: "er-text er-text--muted",
|
|
1767
|
-
children: "This event is fully booked."
|
|
1768
|
-
}) : null;
|
|
1769
1978
|
}
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
return
|
|
1979
|
+
//#endregion
|
|
1980
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/existingBookingsSummary.ts
|
|
1981
|
+
function places(count) {
|
|
1982
|
+
return count === 1 ? "1 place" : `${count} places`;
|
|
1774
1983
|
}
|
|
1775
|
-
|
|
1776
|
-
|
|
1984
|
+
/** Waitlist entries have their own notice, so only confirmed bookings count here. */
|
|
1985
|
+
function summariseExistingBookings(registrations) {
|
|
1986
|
+
const confirmed = registrations.filter((registration) => registration.status === "confirmed");
|
|
1987
|
+
const [only] = confirmed;
|
|
1988
|
+
if (!only) return { kind: "none" };
|
|
1989
|
+
if (confirmed.length === 1) return {
|
|
1990
|
+
kind: "booked",
|
|
1991
|
+
detail: only.ticketBreakdown ?? places(only.ticketsCount)
|
|
1992
|
+
};
|
|
1993
|
+
const placeCount = confirmed.reduce((total, registration) => total + registration.ticketsCount, 0);
|
|
1994
|
+
return {
|
|
1995
|
+
kind: "booked",
|
|
1996
|
+
detail: `${confirmed.length} bookings · ${places(placeCount)}`
|
|
1997
|
+
};
|
|
1777
1998
|
}
|
|
1778
1999
|
//#endregion
|
|
1779
2000
|
//#region ../blocks/src/system/runtime/nodes/event-registration/SeveralRunsTicketStep.tsx
|
|
@@ -1969,13 +2190,6 @@ function Totals(props) {
|
|
|
1969
2190
|
})]
|
|
1970
2191
|
});
|
|
1971
2192
|
}
|
|
1972
|
-
/**
|
|
1973
|
-
* What several items cost, above the payment choice (issue 1725): the items
|
|
1974
|
-
* and places as a caption, each item at what all its places cost, then the
|
|
1975
|
-
* total (after a subtotal and any code when something comes off). With
|
|
1976
|
-
* combination prices the items are grouped by combination, with the note
|
|
1977
|
-
* and saving under the list.
|
|
1978
|
-
*/
|
|
1979
2193
|
function SelectionPaymentSummary(props) {
|
|
1980
2194
|
const { summary, currency } = props;
|
|
1981
2195
|
const money = (cents) => formatCurrencyAmount(cents, currency);
|
|
@@ -1987,46 +2201,332 @@ function SelectionPaymentSummary(props) {
|
|
|
1987
2201
|
return /* @__PURE__ */ jsxs("div", {
|
|
1988
2202
|
className: "rb-reg-stack er-stack er-selection-payment-summary",
|
|
1989
2203
|
children: [
|
|
1990
|
-
/* @__PURE__ */ jsx(
|
|
1991
|
-
|
|
2204
|
+
/* @__PURE__ */ jsx(SummaryHeading, { changeDates: props.changeDates }),
|
|
2205
|
+
/* @__PURE__ */ jsxs("div", {
|
|
2206
|
+
className: "er-confirmation-summary er-selection-payment",
|
|
2207
|
+
children: [
|
|
2208
|
+
/* @__PURE__ */ jsx("p", {
|
|
2209
|
+
className: "er-selection-payment__caption",
|
|
2210
|
+
children: summary.caption
|
|
2211
|
+
}),
|
|
2212
|
+
groups.map((group) => /* @__PURE__ */ jsxs(React.Fragment, { children: [group.heading ? /* @__PURE__ */ jsx("p", {
|
|
2213
|
+
className: "er-selection-payment__group",
|
|
2214
|
+
children: group.heading
|
|
2215
|
+
}) : null, /* @__PURE__ */ jsx(Lines, {
|
|
2216
|
+
lines: group.lines,
|
|
2217
|
+
money
|
|
2218
|
+
})] }, group.key)),
|
|
2219
|
+
/* @__PURE__ */ jsx(Totals, {
|
|
2220
|
+
subtotalCents: summary.subtotalCents,
|
|
2221
|
+
reductions: summary.reductions,
|
|
2222
|
+
totalCents: summary.totalCents,
|
|
2223
|
+
money
|
|
2224
|
+
})
|
|
2225
|
+
]
|
|
2226
|
+
}),
|
|
2227
|
+
summary.kind === "combined" && summary.note ? /* @__PURE__ */ jsx("p", {
|
|
2228
|
+
className: "er-combination-note",
|
|
2229
|
+
role: "status",
|
|
2230
|
+
children: summary.note
|
|
2231
|
+
}) : null,
|
|
2232
|
+
summary.kind === "combined" && summary.savingCents !== null ? /* @__PURE__ */ jsxs("p", {
|
|
2233
|
+
className: "er-combination-saving",
|
|
2234
|
+
children: ["You save ", money(summary.savingCents)]
|
|
2235
|
+
}) : null
|
|
2236
|
+
]
|
|
2237
|
+
});
|
|
2238
|
+
}
|
|
2239
|
+
/** "Your booking", with "Change dates" beside it when the dates can be changed from here. */
|
|
2240
|
+
function SummaryHeading(props) {
|
|
2241
|
+
return /* @__PURE__ */ jsx(StepHeading, {
|
|
2242
|
+
title: "Your booking",
|
|
2243
|
+
changeDates: props.changeDates
|
|
2244
|
+
});
|
|
2245
|
+
}
|
|
2246
|
+
/** A payment step heading, with "Change date(s)" beside it when the dates can be changed from here. */
|
|
2247
|
+
function StepHeading(props) {
|
|
2248
|
+
const heading = /* @__PURE__ */ jsx("h3", {
|
|
2249
|
+
tabIndex: -1,
|
|
2250
|
+
className: "er-title",
|
|
2251
|
+
children: props.title
|
|
2252
|
+
});
|
|
2253
|
+
if (!props.changeDates) return heading;
|
|
2254
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
2255
|
+
className: "er-confirmation-summary__row",
|
|
2256
|
+
children: [heading, /* @__PURE__ */ jsx("button", {
|
|
2257
|
+
type: "button",
|
|
2258
|
+
className: "er-portal-auth-link",
|
|
2259
|
+
onClick: props.changeDates.onChange,
|
|
2260
|
+
children: props.changeDates.label
|
|
2261
|
+
})]
|
|
2262
|
+
});
|
|
2263
|
+
}
|
|
2264
|
+
/**
|
|
2265
|
+
* Dates paid with a pass or membership (issue 1767, sets 6 and 7): each date with
|
|
2266
|
+
* "1 credit", "Included" or its price, a bought pass on its own line, then
|
|
2267
|
+
* what comes from the pass and what's left to pay.
|
|
2268
|
+
*/
|
|
2269
|
+
function FundedPaymentSummary(props) {
|
|
2270
|
+
const { summary } = props;
|
|
2271
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
2272
|
+
className: "rb-reg-stack er-stack er-selection-payment-summary",
|
|
2273
|
+
children: [/* @__PURE__ */ jsx(SummaryHeading, { changeDates: props.changeDates }), /* @__PURE__ */ jsxs("div", {
|
|
2274
|
+
className: "er-confirmation-summary er-selection-payment",
|
|
2275
|
+
children: [
|
|
2276
|
+
/* @__PURE__ */ jsx("p", {
|
|
2277
|
+
className: "er-selection-payment__caption",
|
|
2278
|
+
children: summary.caption
|
|
2279
|
+
}),
|
|
2280
|
+
/* @__PURE__ */ jsx("dl", {
|
|
2281
|
+
className: "er-selection-payment__lines",
|
|
2282
|
+
children: summary.lines.map((line) => /* @__PURE__ */ jsxs("div", {
|
|
2283
|
+
className: "er-confirmation-summary__row",
|
|
2284
|
+
children: [/* @__PURE__ */ jsxs("dt", { children: [line.label, line.note ? /* @__PURE__ */ jsx("span", {
|
|
2285
|
+
className: "er-selection-payment__multiplier",
|
|
2286
|
+
children: line.note
|
|
2287
|
+
}) : null] }), /* @__PURE__ */ jsx("dd", { children: line.value })]
|
|
2288
|
+
}, line.key))
|
|
2289
|
+
}),
|
|
2290
|
+
summary.totals.length > 0 ? /* @__PURE__ */ jsx("dl", {
|
|
2291
|
+
className: "er-selection-payment__lines er-selection-payment__totals",
|
|
2292
|
+
children: summary.totals.map((row) => /* @__PURE__ */ jsxs("div", {
|
|
2293
|
+
className: row.total ? "er-confirmation-summary__row er-selection-payment__total" : "er-confirmation-summary__row",
|
|
2294
|
+
children: [/* @__PURE__ */ jsx("dt", { children: row.label }), /* @__PURE__ */ jsx("dd", { children: row.value })]
|
|
2295
|
+
}, row.key))
|
|
2296
|
+
}) : null
|
|
2297
|
+
]
|
|
2298
|
+
})]
|
|
2299
|
+
});
|
|
2300
|
+
}
|
|
2301
|
+
//#endregion
|
|
2302
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/SiteCreditPreviewPanel.tsx
|
|
2303
|
+
function SiteCreditPreviewPanel(props) {
|
|
2304
|
+
const { preview } = props;
|
|
2305
|
+
if (preview.kind === "not_authenticated" || preview.kind === "not_applicable" || preview.kind === "no_credit") return null;
|
|
2306
|
+
if (preview.kind === "loading") return /* @__PURE__ */ jsx("div", {
|
|
2307
|
+
className: "er-payment-summary",
|
|
2308
|
+
"aria-live": "polite",
|
|
2309
|
+
children: /* @__PURE__ */ jsx("p", {
|
|
2310
|
+
className: "er-text er-text--muted",
|
|
2311
|
+
children: "Checking your site credit…"
|
|
2312
|
+
})
|
|
2313
|
+
});
|
|
2314
|
+
if (preview.kind === "unavailable") return /* @__PURE__ */ jsx("div", {
|
|
2315
|
+
className: "er-payment-summary",
|
|
2316
|
+
role: "status",
|
|
2317
|
+
children: /* @__PURE__ */ jsx("p", {
|
|
2318
|
+
className: "er-text er-text--muted",
|
|
2319
|
+
children: "We couldn't check your site credit just now. We'll check again before payment."
|
|
2320
|
+
})
|
|
2321
|
+
});
|
|
2322
|
+
if (preview.kind === "currency_mismatch") return /* @__PURE__ */ jsxs("div", {
|
|
2323
|
+
className: "er-payment-summary",
|
|
2324
|
+
role: "status",
|
|
2325
|
+
children: [/* @__PURE__ */ jsx("h4", {
|
|
2326
|
+
className: "er-title",
|
|
2327
|
+
children: "Your site credit"
|
|
2328
|
+
}), /* @__PURE__ */ jsxs("p", {
|
|
2329
|
+
className: "er-text er-text--muted",
|
|
2330
|
+
children: [
|
|
2331
|
+
"You have",
|
|
2332
|
+
" ",
|
|
2333
|
+
formatPrice(preview.availableCreditCents, preview.creditCurrency),
|
|
2334
|
+
" ",
|
|
2335
|
+
"in site credit, but it can't be used for this",
|
|
2336
|
+
" ",
|
|
2337
|
+
props.currency.toUpperCase(),
|
|
2338
|
+
" booking."
|
|
2339
|
+
]
|
|
2340
|
+
})]
|
|
2341
|
+
});
|
|
2342
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
2343
|
+
className: "er-payment-summary",
|
|
2344
|
+
"aria-live": "polite",
|
|
2345
|
+
children: [
|
|
2346
|
+
/* @__PURE__ */ jsx("h4", {
|
|
1992
2347
|
className: "er-title",
|
|
1993
|
-
children: "Your
|
|
2348
|
+
children: "Your site credit"
|
|
2349
|
+
}),
|
|
2350
|
+
/* @__PURE__ */ jsxs("p", {
|
|
2351
|
+
className: "er-text",
|
|
2352
|
+
children: ["Available: ", formatPrice(preview.availableCreditCents, props.currency)]
|
|
1994
2353
|
}),
|
|
1995
|
-
/* @__PURE__ */
|
|
1996
|
-
className: "er-
|
|
2354
|
+
/* @__PURE__ */ jsx("p", {
|
|
2355
|
+
className: "er-text",
|
|
2356
|
+
children: preview.outcome === "credit_only" ? `Your credit covers this registration. ${formatPrice(preview.appliedCreditCents, props.currency)} will be used and no card payment is needed.` : preview.cardDueNowCents === 0 ? `${formatPrice(preview.appliedCreditCents, props.currency)} will be applied automatically. No card payment is needed today.` : `${formatPrice(preview.appliedCreditCents, props.currency)} will be applied automatically. ${formatPrice(preview.cardDueNowCents, props.currency)} is due by card today.`
|
|
2357
|
+
}),
|
|
2358
|
+
preview.laterBalanceCents > 0 && /* @__PURE__ */ jsxs("p", {
|
|
2359
|
+
className: "er-text er-text--muted",
|
|
1997
2360
|
children: [
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
}),
|
|
2002
|
-
groups.map((group) => /* @__PURE__ */ jsxs(React.Fragment, { children: [group.heading ? /* @__PURE__ */ jsx("p", {
|
|
2003
|
-
className: "er-selection-payment__group",
|
|
2004
|
-
children: group.heading
|
|
2005
|
-
}) : null, /* @__PURE__ */ jsx(Lines, {
|
|
2006
|
-
lines: group.lines,
|
|
2007
|
-
money
|
|
2008
|
-
})] }, group.key)),
|
|
2009
|
-
/* @__PURE__ */ jsx(Totals, {
|
|
2010
|
-
subtotalCents: summary.subtotalCents,
|
|
2011
|
-
reductions: summary.reductions,
|
|
2012
|
-
totalCents: summary.totalCents,
|
|
2013
|
-
money
|
|
2014
|
-
})
|
|
2361
|
+
"Remaining balance after today:",
|
|
2362
|
+
" ",
|
|
2363
|
+
formatPrice(preview.laterBalanceCents, props.currency)
|
|
2015
2364
|
]
|
|
2016
2365
|
}),
|
|
2017
|
-
|
|
2018
|
-
className: "er-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2366
|
+
preview.remainingCreditCents > 0 && /* @__PURE__ */ jsxs("p", {
|
|
2367
|
+
className: "er-text er-text--muted",
|
|
2368
|
+
children: [
|
|
2369
|
+
"Credit left afterwards:",
|
|
2370
|
+
" ",
|
|
2371
|
+
formatPrice(preview.remainingCreditCents, props.currency)
|
|
2372
|
+
]
|
|
2373
|
+
}),
|
|
2374
|
+
preview.manualDiscountPending && /* @__PURE__ */ jsx("p", {
|
|
2375
|
+
className: "er-text er-text--muted",
|
|
2376
|
+
children: "We'll recalculate these amounts after your discount code is checked."
|
|
2377
|
+
})
|
|
2026
2378
|
]
|
|
2027
2379
|
});
|
|
2028
2380
|
}
|
|
2029
2381
|
//#endregion
|
|
2382
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/SelectionFundingStep.tsx
|
|
2383
|
+
const PAY_HEADING = "How would you like to pay?";
|
|
2384
|
+
/**
|
|
2385
|
+
* The payment step for dates, one or several (issue 1767, sets 6 and 7): the
|
|
2386
|
+
* server's ways to pay in its order, then "Your booking", which breaks the choice
|
|
2387
|
+
* down. The breakdown follows the choice because it's the choice's result. One
|
|
2388
|
+
* date drops it when the chosen option and the button already say it all.
|
|
2389
|
+
*/
|
|
2390
|
+
function SelectionFundingStep(props) {
|
|
2391
|
+
const { model } = props;
|
|
2392
|
+
const oneDate = model.dateCount === 1;
|
|
2393
|
+
if (model.status === "failed") return /* @__PURE__ */ jsx(FundingLoadFailed, {
|
|
2394
|
+
oneDate,
|
|
2395
|
+
retry: model.retry
|
|
2396
|
+
});
|
|
2397
|
+
const view = model.view;
|
|
2398
|
+
if (model.status === "loading" || !view) return /* @__PURE__ */ jsx(FundingLoading, {});
|
|
2399
|
+
const changeDates = props.onChangeDates ? {
|
|
2400
|
+
label: oneDate ? "Change date" : "Change dates",
|
|
2401
|
+
onChange: props.onChangeDates
|
|
2402
|
+
} : void 0;
|
|
2403
|
+
return /* @__PURE__ */ jsx(LoadedFundingStep, {
|
|
2404
|
+
...props,
|
|
2405
|
+
view,
|
|
2406
|
+
oneDate,
|
|
2407
|
+
changeDates
|
|
2408
|
+
});
|
|
2409
|
+
}
|
|
2410
|
+
function LoadedFundingStep(props) {
|
|
2411
|
+
const { model, view, changeDates } = props;
|
|
2412
|
+
const layout = fundingStepLayout(view, props.oneDate, props.cardSummary !== null);
|
|
2413
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2414
|
+
model.notice ? /* @__PURE__ */ jsx("p", {
|
|
2415
|
+
role: "alert",
|
|
2416
|
+
className: "er-error er-funding-notice",
|
|
2417
|
+
children: model.notice
|
|
2418
|
+
}) : null,
|
|
2419
|
+
props.signInPrompt,
|
|
2420
|
+
layout.options ? /* @__PURE__ */ jsxs("div", {
|
|
2421
|
+
className: "rb-reg-stack er-stack er-funding-options",
|
|
2422
|
+
children: [/* @__PURE__ */ jsx(StepHeading, {
|
|
2423
|
+
title: PAY_HEADING,
|
|
2424
|
+
changeDates: layout.changeDatesOn === "options" ? changeDates : void 0
|
|
2425
|
+
}), /* @__PURE__ */ jsx(PaymentChoiceRows, {
|
|
2426
|
+
label: PAY_HEADING,
|
|
2427
|
+
rows: view.rows.map((row) => ({
|
|
2428
|
+
id: row.key,
|
|
2429
|
+
label: row.label,
|
|
2430
|
+
details: row.details,
|
|
2431
|
+
price: row.price,
|
|
2432
|
+
selected: row.selected,
|
|
2433
|
+
onSelect: () => model.choose(row)
|
|
2434
|
+
}))
|
|
2435
|
+
})]
|
|
2436
|
+
}) : null,
|
|
2437
|
+
view.option.kind === "money" ? /* @__PURE__ */ jsx(SiteCreditPreviewPanel, {
|
|
2438
|
+
preview: props.creditPreview,
|
|
2439
|
+
currency: props.currency
|
|
2440
|
+
}) : null,
|
|
2441
|
+
view.note ? /* @__PURE__ */ jsx("p", {
|
|
2442
|
+
className: "er-entitlement-note",
|
|
2443
|
+
children: view.note
|
|
2444
|
+
}) : null,
|
|
2445
|
+
props.afterOptions,
|
|
2446
|
+
layout.breakdown ? /* @__PURE__ */ jsx("div", {
|
|
2447
|
+
className: "er-funding-breakdown",
|
|
2448
|
+
children: /* @__PURE__ */ jsx(FundingSummary, {
|
|
2449
|
+
summary: view.summary,
|
|
2450
|
+
cardSummary: props.cardSummary,
|
|
2451
|
+
currency: props.currency,
|
|
2452
|
+
changeDates: layout.changeDatesOn === "breakdown" ? changeDates : void 0
|
|
2453
|
+
})
|
|
2454
|
+
}) : null,
|
|
2455
|
+
layout.changeDatesOn === "alone" && changeDates ? /* @__PURE__ */ jsx("p", {
|
|
2456
|
+
className: "er-text er-funding-change-dates",
|
|
2457
|
+
children: /* @__PURE__ */ jsx("button", {
|
|
2458
|
+
type: "button",
|
|
2459
|
+
className: "er-portal-auth-link",
|
|
2460
|
+
onClick: changeDates.onChange,
|
|
2461
|
+
children: changeDates.label
|
|
2462
|
+
})
|
|
2463
|
+
}) : null
|
|
2464
|
+
] });
|
|
2465
|
+
}
|
|
2466
|
+
/**
|
|
2467
|
+
* Which parts the step shows. The breakdown always shows for several dates, and
|
|
2468
|
+
* when nothing else describes the payment. One date with ways to pay shows it
|
|
2469
|
+
* only when it explains a reduction the option's row doesn't.
|
|
2470
|
+
*/
|
|
2471
|
+
function fundingStepLayout(view, oneDate, hasCardSummary) {
|
|
2472
|
+
const options = showsPaymentOptions(view);
|
|
2473
|
+
const explains = view.summary !== null && summaryExplainsMoreThanTheOption(view.summary);
|
|
2474
|
+
const breakdown = (!oneDate || !options || explains) && (view.summary !== null || hasCardSummary);
|
|
2475
|
+
return {
|
|
2476
|
+
options,
|
|
2477
|
+
breakdown,
|
|
2478
|
+
changeDatesOn: options ? "options" : breakdown ? "breakdown" : "alone"
|
|
2479
|
+
};
|
|
2480
|
+
}
|
|
2481
|
+
function showsPaymentOptions(view) {
|
|
2482
|
+
return view.rows.length > 1 || view.option.kind === "money" && view.takesPayment;
|
|
2483
|
+
}
|
|
2484
|
+
function FundingLoadFailed(props) {
|
|
2485
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
2486
|
+
className: "rb-reg-stack er-stack",
|
|
2487
|
+
role: "alert",
|
|
2488
|
+
children: [/* @__PURE__ */ jsx("p", {
|
|
2489
|
+
className: "er-text er-error",
|
|
2490
|
+
children: props.oneDate ? ONE_DATE_FUNDING_LOAD_FAILED : SELECTION_FUNDING_LOAD_FAILED
|
|
2491
|
+
}), /* @__PURE__ */ jsx("p", {
|
|
2492
|
+
className: "er-text",
|
|
2493
|
+
children: /* @__PURE__ */ jsx("button", {
|
|
2494
|
+
type: "button",
|
|
2495
|
+
className: "er-portal-auth-link",
|
|
2496
|
+
onClick: props.retry,
|
|
2497
|
+
children: "Try again"
|
|
2498
|
+
})
|
|
2499
|
+
})]
|
|
2500
|
+
});
|
|
2501
|
+
}
|
|
2502
|
+
function FundingLoading() {
|
|
2503
|
+
return /* @__PURE__ */ jsx("div", {
|
|
2504
|
+
className: "rb-reg-stack er-stack",
|
|
2505
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
2506
|
+
className: "er-center",
|
|
2507
|
+
children: [/* @__PURE__ */ jsx(SpinnerNode, {
|
|
2508
|
+
size: "lg",
|
|
2509
|
+
srLabel: "Checking payment options"
|
|
2510
|
+
}), /* @__PURE__ */ jsx("p", {
|
|
2511
|
+
className: "er-text--muted",
|
|
2512
|
+
children: "Checking payment options…"
|
|
2513
|
+
})]
|
|
2514
|
+
})
|
|
2515
|
+
});
|
|
2516
|
+
}
|
|
2517
|
+
/** A pass or membership's own summary, or the card step's for the money option. */
|
|
2518
|
+
function FundingSummary(props) {
|
|
2519
|
+
if (props.summary) return /* @__PURE__ */ jsx(FundedPaymentSummary, {
|
|
2520
|
+
summary: props.summary,
|
|
2521
|
+
changeDates: props.changeDates
|
|
2522
|
+
});
|
|
2523
|
+
return props.cardSummary ? /* @__PURE__ */ jsx(SelectionPaymentSummary, {
|
|
2524
|
+
summary: props.cardSummary,
|
|
2525
|
+
currency: props.currency,
|
|
2526
|
+
changeDates: props.changeDates
|
|
2527
|
+
}) : null;
|
|
2528
|
+
}
|
|
2529
|
+
//#endregion
|
|
2030
2530
|
//#region ../blocks/src/system/runtime/nodes/event-registration/EventSelectionStep.tsx
|
|
2031
2531
|
/** Dates in order, grouped by the month and year they fall in, both in the date's own zone. */
|
|
2032
2532
|
function groupByMonth(events) {
|
|
@@ -2901,86 +3401,6 @@ const MembershipHero = ({ membershipName }) => {
|
|
|
2901
3401
|
});
|
|
2902
3402
|
};
|
|
2903
3403
|
//#endregion
|
|
2904
|
-
//#region ../blocks/src/system/runtime/nodes/event-registration/SiteCreditPreviewPanel.tsx
|
|
2905
|
-
function SiteCreditPreviewPanel(props) {
|
|
2906
|
-
const { preview } = props;
|
|
2907
|
-
if (preview.kind === "not_authenticated" || preview.kind === "not_applicable" || preview.kind === "no_credit") return null;
|
|
2908
|
-
if (preview.kind === "loading") return /* @__PURE__ */ jsx("div", {
|
|
2909
|
-
className: "er-payment-summary",
|
|
2910
|
-
"aria-live": "polite",
|
|
2911
|
-
children: /* @__PURE__ */ jsx("p", {
|
|
2912
|
-
className: "er-text er-text--muted",
|
|
2913
|
-
children: "Checking your site credit…"
|
|
2914
|
-
})
|
|
2915
|
-
});
|
|
2916
|
-
if (preview.kind === "unavailable") return /* @__PURE__ */ jsx("div", {
|
|
2917
|
-
className: "er-payment-summary",
|
|
2918
|
-
role: "status",
|
|
2919
|
-
children: /* @__PURE__ */ jsx("p", {
|
|
2920
|
-
className: "er-text er-text--muted",
|
|
2921
|
-
children: "We couldn't check your site credit just now. We'll check again before payment."
|
|
2922
|
-
})
|
|
2923
|
-
});
|
|
2924
|
-
if (preview.kind === "currency_mismatch") return /* @__PURE__ */ jsxs("div", {
|
|
2925
|
-
className: "er-payment-summary",
|
|
2926
|
-
role: "status",
|
|
2927
|
-
children: [/* @__PURE__ */ jsx("h4", {
|
|
2928
|
-
className: "er-title",
|
|
2929
|
-
children: "Your site credit"
|
|
2930
|
-
}), /* @__PURE__ */ jsxs("p", {
|
|
2931
|
-
className: "er-text er-text--muted",
|
|
2932
|
-
children: [
|
|
2933
|
-
"You have",
|
|
2934
|
-
" ",
|
|
2935
|
-
formatPrice(preview.availableCreditCents, preview.creditCurrency),
|
|
2936
|
-
" ",
|
|
2937
|
-
"in site credit, but it can't be used for this",
|
|
2938
|
-
" ",
|
|
2939
|
-
props.currency.toUpperCase(),
|
|
2940
|
-
" booking."
|
|
2941
|
-
]
|
|
2942
|
-
})]
|
|
2943
|
-
});
|
|
2944
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
2945
|
-
className: "er-payment-summary",
|
|
2946
|
-
"aria-live": "polite",
|
|
2947
|
-
children: [
|
|
2948
|
-
/* @__PURE__ */ jsx("h4", {
|
|
2949
|
-
className: "er-title",
|
|
2950
|
-
children: "Your site credit"
|
|
2951
|
-
}),
|
|
2952
|
-
/* @__PURE__ */ jsxs("p", {
|
|
2953
|
-
className: "er-text",
|
|
2954
|
-
children: ["Available: ", formatPrice(preview.availableCreditCents, props.currency)]
|
|
2955
|
-
}),
|
|
2956
|
-
/* @__PURE__ */ jsx("p", {
|
|
2957
|
-
className: "er-text",
|
|
2958
|
-
children: preview.outcome === "credit_only" ? `Your credit covers this registration. ${formatPrice(preview.appliedCreditCents, props.currency)} will be used and no card payment is needed.` : preview.cardDueNowCents === 0 ? `${formatPrice(preview.appliedCreditCents, props.currency)} will be applied automatically. No card payment is needed today.` : `${formatPrice(preview.appliedCreditCents, props.currency)} will be applied automatically. ${formatPrice(preview.cardDueNowCents, props.currency)} is due by card today.`
|
|
2959
|
-
}),
|
|
2960
|
-
preview.laterBalanceCents > 0 && /* @__PURE__ */ jsxs("p", {
|
|
2961
|
-
className: "er-text er-text--muted",
|
|
2962
|
-
children: [
|
|
2963
|
-
"Remaining balance after today:",
|
|
2964
|
-
" ",
|
|
2965
|
-
formatPrice(preview.laterBalanceCents, props.currency)
|
|
2966
|
-
]
|
|
2967
|
-
}),
|
|
2968
|
-
preview.remainingCreditCents > 0 && /* @__PURE__ */ jsxs("p", {
|
|
2969
|
-
className: "er-text er-text--muted",
|
|
2970
|
-
children: [
|
|
2971
|
-
"Credit left afterwards:",
|
|
2972
|
-
" ",
|
|
2973
|
-
formatPrice(preview.remainingCreditCents, props.currency)
|
|
2974
|
-
]
|
|
2975
|
-
}),
|
|
2976
|
-
preview.manualDiscountPending && /* @__PURE__ */ jsx("p", {
|
|
2977
|
-
className: "er-text er-text--muted",
|
|
2978
|
-
children: "We'll recalculate these amounts after your discount code is checked."
|
|
2979
|
-
})
|
|
2980
|
-
]
|
|
2981
|
-
});
|
|
2982
|
-
}
|
|
2983
|
-
//#endregion
|
|
2984
3404
|
//#region ../blocks/src/system/runtime/nodes/event-registration/PaymentSelectionStep.tsx
|
|
2985
3405
|
function isDirectPaymentOptionSelected(option, selectionState) {
|
|
2986
3406
|
return selectionState.kind === "valid" && selectionState.selection.collectionOptionKind === option.kind;
|
|
@@ -3027,8 +3447,9 @@ const PaymentSelectionStep = (props) => {
|
|
|
3027
3447
|
selectionState: view.directPaymentSelectionState,
|
|
3028
3448
|
preview: view.preview,
|
|
3029
3449
|
onSelectionChange: props.onSelectionChange
|
|
3030
|
-
}) : [], ...
|
|
3450
|
+
}) : [], ...runMembershipRows({
|
|
3031
3451
|
offered: view.offersEntitlements,
|
|
3452
|
+
event: props.event,
|
|
3032
3453
|
eligibility,
|
|
3033
3454
|
isAuthenticated: props.isAuthenticated ?? false,
|
|
3034
3455
|
ticketsCount: props.ticketsCount,
|
|
@@ -3036,6 +3457,7 @@ const PaymentSelectionStep = (props) => {
|
|
|
3036
3457
|
onSelectionChange: props.onSelectionChange
|
|
3037
3458
|
})]
|
|
3038
3459
|
}),
|
|
3460
|
+
/* @__PURE__ */ jsx(UnavailableEntitlementNotes, { eligibility }),
|
|
3039
3461
|
/* @__PURE__ */ jsx(SiteCreditPreviewPanel, {
|
|
3040
3462
|
preview: view.preview,
|
|
3041
3463
|
currency: eligibility.currency
|
|
@@ -3043,81 +3465,30 @@ const PaymentSelectionStep = (props) => {
|
|
|
3043
3465
|
]
|
|
3044
3466
|
});
|
|
3045
3467
|
};
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
passId: pass.id,
|
|
3052
|
-
productName: pass.passName
|
|
3053
|
-
},
|
|
3054
|
-
label: pass.passName,
|
|
3055
|
-
details: [`${formatCreditProductUnits("event_pass", pass.creditsRemaining)} left`],
|
|
3056
|
-
price: formatCreditProductUnits("event_pass", 1)
|
|
3057
|
-
}));
|
|
3058
|
-
}
|
|
3059
|
-
function ownedMembershipChoices(eligibility) {
|
|
3060
|
-
return eligibility.eligibleMemberships.map((membership) => ({
|
|
3061
|
-
id: `owned-membership-${membership.id}`,
|
|
3062
|
-
selection: {
|
|
3468
|
+
/** A run's own membership; dates offer theirs through the server's funding options (issue 1767). */
|
|
3469
|
+
function runMembershipRows(props) {
|
|
3470
|
+
if (!props.offered || !props.isAuthenticated || props.ticketsCount !== 1 || props.event?.registrationSubject.kind !== "wholeSeries") return [];
|
|
3471
|
+
return props.eligibility.eligibleMemberships.map((membership) => {
|
|
3472
|
+
const selection = {
|
|
3063
3473
|
method: "membership",
|
|
3064
3474
|
membershipId: membership.id,
|
|
3065
3475
|
productName: membership.membershipName
|
|
3066
|
-
}
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
method: "pass_bundle",
|
|
3077
|
-
bundlePassId: pass.id,
|
|
3078
|
-
productName: pass.name,
|
|
3079
|
-
productPrice: pass.price,
|
|
3080
|
-
productCurrency: pass.currency
|
|
3081
|
-
},
|
|
3082
|
-
label: pass.name,
|
|
3083
|
-
details: [formatCreditProductUnits("event_pass", pass.creditsTotal), ...pass.description ? [pass.description] : []],
|
|
3084
|
-
price: formatPrice(pass.price, pass.currency)
|
|
3085
|
-
}));
|
|
3086
|
-
}
|
|
3087
|
-
function purchasableMembershipChoices(eligibility) {
|
|
3088
|
-
return eligibility.availableMemberships.map((membership) => ({
|
|
3089
|
-
id: `buy-membership-${membership.id}`,
|
|
3090
|
-
selection: {
|
|
3091
|
-
method: "membership_bundle",
|
|
3092
|
-
bundleMembershipId: membership.id,
|
|
3093
|
-
productName: membership.name,
|
|
3094
|
-
productPrice: membership.price,
|
|
3095
|
-
productCurrency: membership.currency,
|
|
3096
|
-
productInterval: membership.interval
|
|
3097
|
-
},
|
|
3098
|
-
label: membership.name,
|
|
3099
|
-
details: membership.description ? [membership.description] : [],
|
|
3100
|
-
price: `${formatPrice(membership.price, membership.currency)}/${membership.interval}`
|
|
3101
|
-
}));
|
|
3476
|
+
};
|
|
3477
|
+
return {
|
|
3478
|
+
id: `owned-membership-${membership.id}`,
|
|
3479
|
+
label: membership.membershipName,
|
|
3480
|
+
details: ["Active"],
|
|
3481
|
+
price: "Included",
|
|
3482
|
+
selected: areEventRegistrationPaymentSelectionsEqual(props.selection, selection),
|
|
3483
|
+
onSelect: () => props.onSelectionChange(selection)
|
|
3484
|
+
};
|
|
3485
|
+
});
|
|
3102
3486
|
}
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
...props.isAuthenticated ? [...ownedPassChoices(props.eligibility), ...ownedMembershipChoices(props.eligibility)] : [],
|
|
3109
|
-
...purchasablePassChoices(props.eligibility),
|
|
3110
|
-
...purchasableMembershipChoices(props.eligibility)
|
|
3111
|
-
].map((choice) => ({
|
|
3112
|
-
id: choice.id,
|
|
3113
|
-
label: choice.label,
|
|
3114
|
-
details: choice.details,
|
|
3115
|
-
price: choice.price,
|
|
3116
|
-
disabled,
|
|
3117
|
-
disabledReason: disabled ? ENTITLEMENT_SINGLE_TICKET_TOOLTIP : void 0,
|
|
3118
|
-
selected: areEventRegistrationPaymentSelectionsEqual(props.selection, choice.selection),
|
|
3119
|
-
onSelect: () => props.onSelectionChange(choice.selection)
|
|
3120
|
-
}));
|
|
3487
|
+
function UnavailableEntitlementNotes({ eligibility }) {
|
|
3488
|
+
return /* @__PURE__ */ jsx(Fragment, { children: eligibility.unavailableEntitlements?.map((note) => /* @__PURE__ */ jsx("p", {
|
|
3489
|
+
className: "er-entitlement-note",
|
|
3490
|
+
children: note
|
|
3491
|
+
}, note)) });
|
|
3121
3492
|
}
|
|
3122
3493
|
//#endregion
|
|
3123
3494
|
//#region ../blocks/src/system/runtime/nodes/event-registration/CalendarAction.tsx
|
|
@@ -3468,9 +3839,12 @@ function ExistingRegistrationNotice(props) {
|
|
|
3468
3839
|
})
|
|
3469
3840
|
});
|
|
3470
3841
|
}
|
|
3471
|
-
/**
|
|
3842
|
+
/**
|
|
3843
|
+
* A membership covers one place on one run, so the hero shows only then. Dates
|
|
3844
|
+
* show a membership with their other ways to pay (issue 1767).
|
|
3845
|
+
*/
|
|
3472
3846
|
function heroMembership(wizard) {
|
|
3473
|
-
return wizard.portalAuthState === "authenticated" && wizard.ticketsCount === 1 && wizard.severalItems === null ? wizard.eligibility?.eligibleMemberships[0] : void 0;
|
|
3847
|
+
return wizard.portalAuthState === "authenticated" && wizard.ticketsCount === 1 && wizard.severalItems === null && wizard.selectedEvent?.registrationSubject.kind === "wholeSeries" ? wizard.eligibility?.eligibleMemberships[0] : void 0;
|
|
3474
3848
|
}
|
|
3475
3849
|
/** The event's consent, with its checkbox worded for every item being booked. */
|
|
3476
3850
|
function selectionConsent(wizard) {
|
|
@@ -3539,7 +3913,8 @@ function AttendeeDetailsContent(props) {
|
|
|
3539
3913
|
}
|
|
3540
3914
|
function EventDiscountCodeDisclosure(props) {
|
|
3541
3915
|
const { wizard } = props;
|
|
3542
|
-
const
|
|
3916
|
+
const coverSelected = wizard.discountCardOnly;
|
|
3917
|
+
const preview = coverSelected ? null : wizard.combinationCodeField;
|
|
3543
3918
|
if (preview?.failed) return /* @__PURE__ */ jsxs("div", {
|
|
3544
3919
|
role: "alert",
|
|
3545
3920
|
children: [/* @__PURE__ */ jsx("p", { children: "We couldn’t check your price. Try again." }), /* @__PURE__ */ jsx("button", {
|
|
@@ -3548,10 +3923,17 @@ function EventDiscountCodeDisclosure(props) {
|
|
|
3548
3923
|
children: "Try again"
|
|
3549
3924
|
})]
|
|
3550
3925
|
});
|
|
3551
|
-
if (wizard.discountsAvailableLoading || !wizard.shouldShowDiscountToggle) return null;
|
|
3926
|
+
if (!coverSelected && (wizard.discountsAvailableLoading || !wizard.shouldShowDiscountToggle)) return null;
|
|
3927
|
+
return /* @__PURE__ */ jsx(EventDiscountField, {
|
|
3928
|
+
wizard,
|
|
3929
|
+
coverSelected,
|
|
3930
|
+
preview
|
|
3931
|
+
});
|
|
3932
|
+
}
|
|
3933
|
+
function EventDiscountField({ wizard, coverSelected, preview }) {
|
|
3552
3934
|
return /* @__PURE__ */ jsx(DiscountCodeDisclosure, {
|
|
3553
3935
|
surface: "event-registration",
|
|
3554
|
-
isOpen: wizard.discountUiOpen,
|
|
3936
|
+
isOpen: coverSelected || wizard.discountUiOpen,
|
|
3555
3937
|
code: wizard.discountCode,
|
|
3556
3938
|
onOpen: () => wizard.setDiscountUiOpen(true),
|
|
3557
3939
|
onChange: wizard.setDiscountCode,
|
|
@@ -3561,6 +3943,8 @@ function EventDiscountCodeDisclosure(props) {
|
|
|
3561
3943
|
},
|
|
3562
3944
|
applied: preview?.feedback?.tone === "success",
|
|
3563
3945
|
id: "er-discount-code",
|
|
3946
|
+
disabled: coverSelected,
|
|
3947
|
+
hint: coverSelected ? "Codes apply to card payments. Choose Pay by card to use one." : void 0,
|
|
3564
3948
|
...preview ? {
|
|
3565
3949
|
onApply: () => void preview.apply(),
|
|
3566
3950
|
isApplying: preview.applying,
|
|
@@ -3569,14 +3953,16 @@ function EventDiscountCodeDisclosure(props) {
|
|
|
3569
3953
|
} : {}
|
|
3570
3954
|
});
|
|
3571
3955
|
}
|
|
3572
|
-
function bookOnePlace(wizard) {
|
|
3573
|
-
if (!wizard.ticketTypeSelectionRequired) wizard.setTicketsCount(1);
|
|
3574
|
-
wizard.setStep("select-tickets");
|
|
3575
|
-
}
|
|
3576
3956
|
function PaymentSelectionContent(props) {
|
|
3577
3957
|
const { wizard } = props;
|
|
3578
3958
|
const subtotalCents = wizard.ticketSelectionSubtotalCents;
|
|
3579
3959
|
if (!wizard.api.config.siteId) return null;
|
|
3960
|
+
const funding = selectionFundingShown(wizard);
|
|
3961
|
+
if (funding) return /* @__PURE__ */ jsx(SelectionFundingPayment, {
|
|
3962
|
+
wizard,
|
|
3963
|
+
model: funding,
|
|
3964
|
+
signInPrompt: props.signInPrompt
|
|
3965
|
+
});
|
|
3580
3966
|
if (subtotalCents === null && wizard.combinationAwaitingVisitor) return /* @__PURE__ */ jsx(EventDiscountCodeDisclosure, { wizard });
|
|
3581
3967
|
if (subtotalCents === null) return /* @__PURE__ */ jsx(PaymentBlockingPanel, {
|
|
3582
3968
|
eligibility: wizard.eligibility,
|
|
@@ -3590,7 +3976,7 @@ function PaymentSelectionContent(props) {
|
|
|
3590
3976
|
onRequestLogin: () => wizard.setShowMagicLinkModal(true)
|
|
3591
3977
|
});
|
|
3592
3978
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3593
|
-
|
|
3979
|
+
wizard.paymentTermsSurface === "commerce" ? /* @__PURE__ */ jsx(SiteTermsChangedNotice, { message: wizard.siteTerms.notice }) : null,
|
|
3594
3980
|
/* @__PURE__ */ jsx(SeveralItemsPaymentSummary, { wizard }),
|
|
3595
3981
|
/* @__PURE__ */ jsx(PaymentSelectionStep, {
|
|
3596
3982
|
event: wizard.selectedEvent,
|
|
@@ -3605,23 +3991,22 @@ function PaymentSelectionContent(props) {
|
|
|
3605
3991
|
onRequestLogin: () => wizard.setShowMagicLinkModal(true),
|
|
3606
3992
|
decision: wizard.paymentDecision
|
|
3607
3993
|
}),
|
|
3608
|
-
/* @__PURE__ */ jsx(
|
|
3994
|
+
/* @__PURE__ */ jsx(PaymentStepNote, { wizard }),
|
|
3609
3995
|
/* @__PURE__ */ jsx(EventDiscountCodeDisclosure, { wizard }),
|
|
3610
3996
|
/* @__PURE__ */ jsx(BundleSiteTerms, { wizard })
|
|
3611
3997
|
] });
|
|
3612
3998
|
}
|
|
3613
|
-
/**
|
|
3614
|
-
|
|
3615
|
-
|
|
3999
|
+
/**
|
|
4000
|
+
* The note under the ways to pay, in both payment layouts. Several items: what
|
|
4001
|
+
* the places booked entitle the visitor to (a date's pass and membership notes
|
|
4002
|
+
* come with its ways to pay). One booking: why it's paid in full.
|
|
4003
|
+
*/
|
|
4004
|
+
function PaymentStepNote({ wizard }) {
|
|
4005
|
+
const note = wizard.severalItems === null ? wizard.paymentInFullNote : selectionEntitlementNote(wizard.severalItems, wizard.paymentDecision.paysInFullBecauseSeveral);
|
|
4006
|
+
return note ? /* @__PURE__ */ jsx("p", {
|
|
3616
4007
|
className: "er-entitlement-note",
|
|
3617
|
-
children:
|
|
3618
|
-
});
|
|
3619
|
-
if (wizard.paymentStepState.status !== "ready") return null;
|
|
3620
|
-
return /* @__PURE__ */ jsx(SingleTicketEntitlementNote, {
|
|
3621
|
-
ticketsCount: wizard.ticketsCount,
|
|
3622
|
-
eligibility: wizard.eligibility,
|
|
3623
|
-
onBookOnePlace: () => bookOnePlace(wizard)
|
|
3624
|
-
});
|
|
4008
|
+
children: note
|
|
4009
|
+
}) : null;
|
|
3625
4010
|
}
|
|
3626
4011
|
function SeveralItemsPaymentSummary({ wizard }) {
|
|
3627
4012
|
return wizard.selectionPaymentSummary && wizard.eligibility ? /* @__PURE__ */ jsx(SelectionPaymentSummary, {
|
|
@@ -3631,17 +4016,24 @@ function SeveralItemsPaymentSummary({ wizard }) {
|
|
|
3631
4016
|
}
|
|
3632
4017
|
function ClosedAdmissionNotice({ wizard }) {
|
|
3633
4018
|
const admission = wizard.admission;
|
|
3634
|
-
|
|
4019
|
+
if (admission.kind !== "closed" || admission.reason === "alreadyWaitlisted" || wizard.eligibilityLoading) return null;
|
|
4020
|
+
return registrationStopsHere(admission) ? /* @__PURE__ */ jsxs("div", {
|
|
4021
|
+
role: "status",
|
|
4022
|
+
className: "er-notice er-notice--info",
|
|
4023
|
+
children: [/* @__PURE__ */ jsx("p", { children: admission.message }), admission.contact ? /* @__PURE__ */ jsx(OrganiserContactLine, { contact: admission.contact }) : null]
|
|
4024
|
+
}) : /* @__PURE__ */ jsxs("div", {
|
|
3635
4025
|
role: "alert",
|
|
3636
4026
|
className: "er-error",
|
|
3637
|
-
children: admission.message
|
|
3638
|
-
})
|
|
4027
|
+
children: [/* @__PURE__ */ jsx("p", { children: admission.message }), admission.contact ? /* @__PURE__ */ jsx(OrganiserContactLine, { contact: admission.contact }) : null]
|
|
4028
|
+
});
|
|
3639
4029
|
}
|
|
3640
4030
|
function ticketStepInvitation(claim) {
|
|
3641
4031
|
if (claim.kind === "none") return null;
|
|
3642
4032
|
return claim.kind === "ready" ? {
|
|
3643
4033
|
kind: "held",
|
|
3644
|
-
expiresAt: claim.claim.expiresAt
|
|
4034
|
+
expiresAt: claim.claim.expiresAt,
|
|
4035
|
+
places: claim.restoration.claimed.places,
|
|
4036
|
+
ticketChoice: claim.restoration.claimed.kind === "anyTicket"
|
|
3645
4037
|
} : { kind: "pending" };
|
|
3646
4038
|
}
|
|
3647
4039
|
/** With a date to pick, the choosing step has already said it. */
|
|
@@ -3664,39 +4056,64 @@ function TicketSelectionContent({ wizard, display }) {
|
|
|
3664
4056
|
}),
|
|
3665
4057
|
/* @__PURE__ */ jsx(ClosedAdmissionNotice, { wizard }),
|
|
3666
4058
|
/* @__PURE__ */ jsx(TicketStepBookingCloseLine, { wizard }),
|
|
3667
|
-
|
|
4059
|
+
/* @__PURE__ */ jsx(TicketChooser, {
|
|
3668
4060
|
wizard,
|
|
3669
4061
|
display
|
|
3670
|
-
}) : /* @__PURE__ */ jsx(TicketSelectionStep, {
|
|
3671
|
-
purpose: wizard.ticketSelectionPurpose,
|
|
3672
|
-
display,
|
|
3673
|
-
invitation: ticketStepInvitation(wizard.waitlistClaim),
|
|
3674
|
-
event: wizard.selectedEvent,
|
|
3675
|
-
occurrenceContext: wizard.occurrenceContext,
|
|
3676
|
-
selectedAttendanceMode: wizard.selectedAttendanceMode,
|
|
3677
|
-
onAttendanceModeChange: wizard.setSelectedAttendanceMode,
|
|
3678
|
-
ticketsCount: wizard.ticketsCount,
|
|
3679
|
-
maxTickets: wizard.maxTicketsNum,
|
|
3680
|
-
placesCeiling: placeCountCeiling({
|
|
3681
|
-
maxAllowed: wizard.maxTicketsNum,
|
|
3682
|
-
admission: wizard.admission,
|
|
3683
|
-
settledRemaining: settledRemainingPlaces(wizard.eligibility)
|
|
3684
|
-
}),
|
|
3685
|
-
visibleTicketTypes: wizard.visibleTicketTypes,
|
|
3686
|
-
overallRemainingPlaces: wizard.overallRemainingPlaces,
|
|
3687
|
-
heldPlacesBySelection: wizard.heldPlacesBySelection,
|
|
3688
|
-
ticketSelections: wizard.selectedTicketLines,
|
|
3689
|
-
onTicketSelectionsChange: wizard.setSelectedTicketLines,
|
|
3690
|
-
slidingScale: wizard.selectedEventSlidingScale,
|
|
3691
|
-
selectedSlidingAmountInput: wizard.selectedSlidingAmountInput,
|
|
3692
|
-
slidingScaleSelectionMessage: wizard.slidingScaleSelectionMessage,
|
|
3693
|
-
onSlidingAmountChange: wizard.setSelectedSlidingAmountInput,
|
|
3694
|
-
onTicketsChange: wizard.setTicketsCount,
|
|
3695
|
-
bookingUnit: resolveBookingUnit(wizard.selectedEvent),
|
|
3696
|
-
selectionNote: wizard.severalItems === "dates" ? selectionPlacesNote("dates", wizard.selection.length) : null
|
|
3697
4062
|
})
|
|
3698
4063
|
] });
|
|
3699
4064
|
}
|
|
4065
|
+
/**
|
|
4066
|
+
* Whether choosing differently could reopen a refusal: the site can't take
|
|
4067
|
+
* this selection's payment, but a free ticket, the free end of a sliding scale,
|
|
4068
|
+
* or another room or run might not need one.
|
|
4069
|
+
*/
|
|
4070
|
+
function selectionCouldChangePrice(wizard) {
|
|
4071
|
+
return wizard.selectedEventSlidingScale != null || wizard.visibleTicketTypes.length > 1 || wizard.roomChooser != null || wizard.severalItems === "runs";
|
|
4072
|
+
}
|
|
4073
|
+
/**
|
|
4074
|
+
* How the client chooses their places. Where registration stops at the notice
|
|
4075
|
+
* above and no other choice could change that, there's nothing to choose.
|
|
4076
|
+
*/
|
|
4077
|
+
function TicketChooser({ wizard, display }) {
|
|
4078
|
+
if (registrationStopsHere(wizard.admission) && !selectionCouldChangePrice(wizard)) return null;
|
|
4079
|
+
if (wizard.roomChooser) return /* @__PURE__ */ jsx(RoomChooser, {
|
|
4080
|
+
wizard,
|
|
4081
|
+
chooser: wizard.roomChooser,
|
|
4082
|
+
display
|
|
4083
|
+
});
|
|
4084
|
+
if (wizard.severalItems === "runs") return /* @__PURE__ */ jsx(SeveralRunsTicketStep, {
|
|
4085
|
+
wizard,
|
|
4086
|
+
display
|
|
4087
|
+
});
|
|
4088
|
+
return /* @__PURE__ */ jsx(TicketSelectionStep, {
|
|
4089
|
+
purpose: wizard.ticketSelectionPurpose,
|
|
4090
|
+
display,
|
|
4091
|
+
invitation: ticketStepInvitation(wizard.waitlistClaim),
|
|
4092
|
+
event: wizard.selectedEvent,
|
|
4093
|
+
occurrenceContext: wizard.occurrenceContext,
|
|
4094
|
+
selectedAttendanceMode: wizard.selectedAttendanceMode,
|
|
4095
|
+
onAttendanceModeChange: wizard.setSelectedAttendanceMode,
|
|
4096
|
+
ticketsCount: wizard.ticketsCount,
|
|
4097
|
+
maxTickets: wizard.maxTicketsNum,
|
|
4098
|
+
placesCeiling: placeCountCeiling({
|
|
4099
|
+
maxAllowed: wizard.maxTicketsNum,
|
|
4100
|
+
admission: wizard.admission,
|
|
4101
|
+
settledRemaining: settledRemainingPlaces(wizard.eligibility)
|
|
4102
|
+
}),
|
|
4103
|
+
visibleTicketTypes: wizard.visibleTicketTypes,
|
|
4104
|
+
overallRemainingPlaces: wizard.overallRemainingPlaces,
|
|
4105
|
+
heldPlacesBySelection: wizard.heldPlacesBySelection,
|
|
4106
|
+
ticketSelections: wizard.selectedTicketLines,
|
|
4107
|
+
onTicketSelectionsChange: wizard.setSelectedTicketLines,
|
|
4108
|
+
slidingScale: wizard.selectedEventSlidingScale,
|
|
4109
|
+
selectedSlidingAmountInput: wizard.selectedSlidingAmountInput,
|
|
4110
|
+
slidingScaleSelectionMessage: wizard.slidingScaleSelectionMessage,
|
|
4111
|
+
onSlidingAmountChange: wizard.setSelectedSlidingAmountInput,
|
|
4112
|
+
onTicketsChange: wizard.setTicketsCount,
|
|
4113
|
+
bookingUnit: resolveBookingUnit(wizard.selectedEvent),
|
|
4114
|
+
selectionNote: wizard.severalItems === "dates" ? selectionPlacesNote("dates", wizard.selection.length) : null
|
|
4115
|
+
});
|
|
4116
|
+
}
|
|
3700
4117
|
function EventRegistrationWizardContent(props) {
|
|
3701
4118
|
const { wizard } = props;
|
|
3702
4119
|
switch (wizard.step) {
|
|
@@ -3731,12 +4148,15 @@ function EventRegistrationWizardContent(props) {
|
|
|
3731
4148
|
display: props.display
|
|
3732
4149
|
});
|
|
3733
4150
|
case "enter-details": return /* @__PURE__ */ jsx(AttendeeDetailsContent, { wizard });
|
|
3734
|
-
case "select-payment": return /* @__PURE__ */ jsx(PaymentSelectionContent, {
|
|
4151
|
+
case "select-payment": return /* @__PURE__ */ jsx(PaymentSelectionContent, {
|
|
4152
|
+
wizard,
|
|
4153
|
+
signInPrompt: props.paymentSignInPrompt
|
|
4154
|
+
});
|
|
3735
4155
|
default: return null;
|
|
3736
4156
|
}
|
|
3737
4157
|
}
|
|
3738
4158
|
function BundleSiteTerms({ wizard }) {
|
|
3739
|
-
if (
|
|
4159
|
+
if (wizard.paymentTermsSurface !== "commerce") return null;
|
|
3740
4160
|
return /* @__PURE__ */ jsx(SiteTermsAgreementField, {
|
|
3741
4161
|
agreement: wizard.siteTerms.commerceView,
|
|
3742
4162
|
onChange: wizard.siteTerms.onChange,
|
|
@@ -3745,6 +4165,34 @@ function BundleSiteTerms({ wizard }) {
|
|
|
3745
4165
|
requiredMark: "none"
|
|
3746
4166
|
});
|
|
3747
4167
|
}
|
|
4168
|
+
/**
|
|
4169
|
+
* Dates keep their ways to pay on screen while a pass's money dates are
|
|
4170
|
+
* priced (Pay waits for the price). A closed or failed booking shows its
|
|
4171
|
+
* own panel instead.
|
|
4172
|
+
*/
|
|
4173
|
+
function selectionFundingShown(wizard) {
|
|
4174
|
+
const model = wizard.selectionFunding;
|
|
4175
|
+
if (!model) return null;
|
|
4176
|
+
const status = wizard.paymentDecision.stepState.status;
|
|
4177
|
+
return status === "error" || status === "not-eligible" ? null : model;
|
|
4178
|
+
}
|
|
4179
|
+
function SelectionFundingPayment(props) {
|
|
4180
|
+
const { wizard } = props;
|
|
4181
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
4182
|
+
wizard.paymentTermsSurface === "commerce" ? /* @__PURE__ */ jsx(SiteTermsChangedNotice, { message: wizard.siteTerms.notice }) : null,
|
|
4183
|
+
/* @__PURE__ */ jsx(SelectionFundingStep, {
|
|
4184
|
+
model: props.model,
|
|
4185
|
+
currency: wizard.eligibility?.currency ?? "",
|
|
4186
|
+
cardSummary: wizard.selectionPaymentSummary,
|
|
4187
|
+
creditPreview: wizard.paymentDecision.preview,
|
|
4188
|
+
signInPrompt: props.signInPrompt,
|
|
4189
|
+
afterOptions: /* @__PURE__ */ jsx(EventDiscountCodeDisclosure, { wizard }),
|
|
4190
|
+
onChangeDates: wizard.hasPreSelectedContext ? void 0 : wizard.handleChangeDates
|
|
4191
|
+
}),
|
|
4192
|
+
/* @__PURE__ */ jsx(PaymentStepNote, { wizard }),
|
|
4193
|
+
/* @__PURE__ */ jsx(BundleSiteTerms, { wizard })
|
|
4194
|
+
] });
|
|
4195
|
+
}
|
|
3748
4196
|
//#endregion
|
|
3749
4197
|
//#region ../blocks/src/system/runtime/nodes/event-registration/PaymentStatusStep.tsx
|
|
3750
4198
|
function presentation(state) {
|
|
@@ -3783,8 +4231,8 @@ function presentation(state) {
|
|
|
3783
4231
|
action: { label: "Check payment status" }
|
|
3784
4232
|
};
|
|
3785
4233
|
case "assistanceRequired": return {
|
|
3786
|
-
title: "We
|
|
3787
|
-
message: "Please don’t
|
|
4234
|
+
title: "We couldn’t confirm your booking",
|
|
4235
|
+
message: "Please don’t pay again. Contact the organiser to check your booking.",
|
|
3788
4236
|
action: {
|
|
3789
4237
|
label: "Return to booking",
|
|
3790
4238
|
disabled: true
|
|
@@ -3907,7 +4355,10 @@ function EventRegistrationMagicLinkModal(props) {
|
|
|
3907
4355
|
function EventRegistrationWholeScreen(props) {
|
|
3908
4356
|
const { wizard } = props;
|
|
3909
4357
|
switch (props.presentation.screen) {
|
|
3910
|
-
case "processing": return /* @__PURE__ */ jsx(RegistrationProcessing, {
|
|
4358
|
+
case "processing": return /* @__PURE__ */ jsx(RegistrationProcessing, {
|
|
4359
|
+
selection: wizard.paymentSelection,
|
|
4360
|
+
takesPayment: wizard.selectionFunding?.view?.takesPayment ?? null
|
|
4361
|
+
});
|
|
3911
4362
|
case "verifying": return /* @__PURE__ */ jsx(VerifyingPaymentStep, {});
|
|
3912
4363
|
case "verifyingTimeout": return /* @__PURE__ */ jsx(RegistrationVerificationTimeout, {
|
|
3913
4364
|
wizard,
|
|
@@ -3936,7 +4387,7 @@ function EventRegistrationSuccess(props) {
|
|
|
3936
4387
|
const { wizard } = props;
|
|
3937
4388
|
const { result, finished } = props.presentation;
|
|
3938
4389
|
const copy = finished.several ? {
|
|
3939
|
-
message: "",
|
|
4390
|
+
message: finished.creditsLeftSentence ?? "",
|
|
3940
4391
|
defaultEmailSentence: severalConfirmationSentence(finished.several, wizard.formData.email)
|
|
3941
4392
|
} : getRegistrationSuccessCopy(result, props.fallbackMessage);
|
|
3942
4393
|
return /* @__PURE__ */ jsx(SuccessStep, {
|
|
@@ -3964,13 +4415,22 @@ function EventRegistrationProgress(props) {
|
|
|
3964
4415
|
function EventRegistrationStepFooter(props) {
|
|
3965
4416
|
return /* @__PURE__ */ jsxs("div", {
|
|
3966
4417
|
className: "er-payment-layout-footer",
|
|
3967
|
-
|
|
4418
|
+
"data-room-chooser": props.wizard.roomChooser ? "" : void 0,
|
|
4419
|
+
children: [props.wizard.roomChooser ? /* @__PURE__ */ jsx(RoomChooserSummary, {
|
|
4420
|
+
wizard: props.wizard,
|
|
4421
|
+
view: props.wizard.roomChooser.view
|
|
4422
|
+
}) : /* @__PURE__ */ jsx(EventRegistrationSummaryBar, { wizard: props.wizard }), /* @__PURE__ */ jsx(EventRegistrationWizardActions, {
|
|
3968
4423
|
wizard: props.wizard,
|
|
3969
4424
|
buttonText: props.buttonText,
|
|
3970
4425
|
buttonVariant: props.buttonVariant
|
|
3971
4426
|
})]
|
|
3972
4427
|
});
|
|
3973
4428
|
}
|
|
4429
|
+
/** Offer the same sign-in help before asking an anonymous visitor to buy cover. */
|
|
4430
|
+
function paymentOffersSignIn(wizard) {
|
|
4431
|
+
if (wizard.step !== "select-payment" || wizard.portalAuthState === "authenticated" || wizard.portalAuthState === "checking") return false;
|
|
4432
|
+
return wizard.selectionFunding?.view?.rows.some((row) => row.pick.kind === "entitlement" && (row.pick.source.kind === "buyPass" || row.pick.source.kind === "buyMembership")) ?? false;
|
|
4433
|
+
}
|
|
3974
4434
|
function EventRegistrationStepLayout(props) {
|
|
3975
4435
|
const { wizard, progress } = props;
|
|
3976
4436
|
const prompt = /* @__PURE__ */ jsx(EventPortalAuthPrompt, {
|
|
@@ -3979,6 +4439,7 @@ function EventRegistrationStepLayout(props) {
|
|
|
3979
4439
|
});
|
|
3980
4440
|
return /* @__PURE__ */ jsxs("div", {
|
|
3981
4441
|
className: "er-payment-layout er-payment-layout--no-sidebar",
|
|
4442
|
+
"data-room-chooser": wizard.roomChooser ? "" : void 0,
|
|
3982
4443
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
3983
4444
|
className: "er-payment-layout-main",
|
|
3984
4445
|
children: [
|
|
@@ -3990,7 +4451,8 @@ function EventRegistrationStepLayout(props) {
|
|
|
3990
4451
|
/* @__PURE__ */ jsx(EventRegistrationWizardContent, {
|
|
3991
4452
|
wizard,
|
|
3992
4453
|
display: props.display,
|
|
3993
|
-
buttonVariant: props.buttonVariant
|
|
4454
|
+
buttonVariant: props.buttonVariant,
|
|
4455
|
+
paymentSignInPrompt: paymentOffersSignIn(wizard) ? prompt : null
|
|
3994
4456
|
}),
|
|
3995
4457
|
props.showPortalAuthPrompt && props.portalAuthCopy.placement === "after" ? prompt : null
|
|
3996
4458
|
]
|
|
@@ -4085,8 +4547,9 @@ function EventRegistrationSurface(props) {
|
|
|
4085
4547
|
})]
|
|
4086
4548
|
});
|
|
4087
4549
|
}
|
|
4088
|
-
|
|
4089
|
-
|
|
4550
|
+
/** `takesPayment`: dates say from their way to pay; null leaves it to the card choice. */
|
|
4551
|
+
function RegistrationProcessing({ selection, takesPayment }) {
|
|
4552
|
+
const label = takesPayment ?? (selection.method === "stripe" && selection.collectionOptionKind !== "deferred_manual") ? "Preparing your payment" : "Confirming your booking";
|
|
4090
4553
|
return /* @__PURE__ */ jsxs("div", {
|
|
4091
4554
|
className: "er-center",
|
|
4092
4555
|
role: "status",
|