@riverbankcms/sdk 0.168.0 → 0.169.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/dist/_dts/{BlocksIslandsHydrator-CiD_VVGM.d.ts → BlocksIslandsHydrator-DpROiz12.d.ts} +1 -1
- package/dist/_dts/{Page-Bj6VJRS5.d.ts → Page-DHBBDRC_.d.ts} +7 -7
- package/dist/_dts/{SdkPreviewMode-ChpsnwDX.d.ts → SdkPreviewMode-CG7Qib7u.d.ts} +2 -2
- package/dist/_dts/{client-C8mfUxrJ.d.ts → client-MURxFla9.d.ts} +39 -397
- package/dist/_dts/{content-types-_vXZyR4H.d.ts → content-types-ClBGjxBV.d.ts} +2 -2
- package/dist/_dts/{contracts-CJFfrVKU.d.ts → contracts-CHNvzh0y.d.ts} +4 -3
- package/dist/_dts/{footerPageOutline-CMegb23G.d.ts → footerPageOutline-DQM934Fm.d.ts} +6 -6
- package/dist/_dts/{generatePageMetadata-D9YdAIMh.d.ts → generatePageMetadata-ConZaEqB.d.ts} +2 -2
- package/dist/_dts/{index-BQXaZ7aY.d.ts → index-BaDqRekr.d.ts} +4 -4
- package/dist/_dts/{index-vR3p9Bu-.d.ts → index-CVB5wgbz.d.ts} +2 -2
- package/dist/_dts/{index-Cx2BQlHL.d.ts → index-CiR_oPYT.d.ts} +1 -1
- package/dist/_dts/{index-Bpr-wT5k.d.ts → index-CovKPftP.d.ts} +2 -2
- package/dist/_dts/{index-Dgz6yhsy.d.ts → index-DCw8LO4M.d.ts} +1 -1
- package/dist/_dts/{index-Vh8B9FSa.d.ts → index-DDaX-K2D.d.ts} +1 -1
- package/dist/_dts/{index-C7_Rz8EY.d.ts → index-rfAssXq0.d.ts} +3 -3
- package/dist/_dts/{loadContent-dhWSgLeS.d.ts → loadContent-CRLKVVDP.d.ts} +7 -7
- package/dist/_dts/{request-BrYhNV9Z.d.ts → request-DeVetKBr.d.ts} +1840 -599
- package/dist/_dts/{resolveBlockData-BfSHm8Ms.d.ts → resolveBlockData-C5KYFeig.d.ts} +5 -5
- package/dist/_dts/{resolvePageContent-gZJ4i1wN.d.ts → resolvePageContent-D8MZWyNO.d.ts} +2 -2
- package/dist/_dts/sdk/src/bookings/index.d.ts +2 -2
- package/dist/_dts/sdk/src/client/types.d.ts +2 -2
- 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 +2 -2
- 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 +2 -2
- package/dist/_dts/sdk/src/next/index.d.ts +7 -7
- 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 +1 -1
- 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 +6 -6
- package/dist/_dts/sdk/src/rendering/islands/client.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/server.d.ts +2 -2
- package/dist/_dts/sdk/src/rendering/themeAdmission.d.ts +1 -1
- package/dist/_dts/sdk/src/routing/index.d.ts +5 -5
- 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/{types-FOsJ-KYb.d.ts → types-B4MBlP_B.d.ts} +2 -2
- package/dist/_dts/{types-BVFXYtRg.d.ts → types-Fj31kIi2.d.ts} +7 -7
- package/dist/_dts/{types-BB33-Spd.d.ts → types-OwqfS8Gn.d.ts} +3 -3
- package/dist/_dts/{validation-DckTc6TQ.d.ts → validation-B1Fa8o_b.d.ts} +4 -4
- package/dist/client/{BlocksIslandsHydrator-DcwEaliO.mjs → BlocksIslandsHydrator-qq4Vhs7k.mjs} +16 -16
- package/dist/client/{BookingMailingListNote-Dsugoe-n.mjs → BookingMailingListNote-y3qWjnOo.mjs} +17 -6
- package/dist/client/{BookingQuestionFields-Bhh0cvsl.mjs → BookingQuestionFields-DjLjd0vc.mjs} +3 -3
- package/dist/client/{CalendarNavigationChevron-CNe3ZjdC.mjs → CalendarNavigationChevron-VM7C2fdh.mjs} +7 -7
- package/dist/client/{DemoBookingPortalAccess-BeiZxEUJ.mjs → DemoBookingPortalAccess-C2QCj_Ta.mjs} +65 -9
- package/dist/client/{EventCalendar.client-BL943-tl.mjs → EventCalendar.client-DDjz7tuX.mjs} +9 -9
- package/dist/client/{EventCombined.client-BFVxECTp.mjs → EventCombined.client-CeYbNsch.mjs} +7 -7
- package/dist/client/{EventItem-BIc4gjiD.mjs → EventItem-B5J0IeF4.mjs} +3 -3
- package/dist/client/{EventListWeekNavigation-a0QEIEf0.mjs → EventListWeekNavigation-eH04D8-V.mjs} +1 -1
- package/dist/client/{EventListing.client-CEFTC3jH.mjs → EventListing.client-slpvrTrM.mjs} +3 -3
- package/dist/client/{EventListing.view-Bt2sBBms.mjs → EventListing.view-BYBaElec.mjs} +5 -5
- package/dist/client/{EventRegistrationPayment-D9YBNb_E.mjs → EventRegistrationPayment-Do7Q0wRG.mjs} +121 -59
- package/dist/client/{LocationMapActions-gqzt5gkW.mjs → LocationMapActions-BFp2uQQQ.mjs} +1 -1
- package/dist/client/{MapDrawingSvg-13JQI7_z.mjs → MapDrawingSvg-DDWfmgpA.mjs} +1 -1
- package/dist/client/{Page-D_M2Vxz3.mjs → Page-Dv9eIOGr.mjs} +20 -15
- package/dist/client/{StepIndicator-CaN8snZ8.mjs → StepIndicator-BZNUd0-v.mjs} +2 -2
- package/dist/client/{accordion-DE7OG--d.mjs → accordion-BCtVxnDZ.mjs} +1 -1
- package/dist/client/{booking-form.client-CS1PPjw7.mjs → booking-form.client-Cr5G-HHO.mjs} +504 -216
- package/dist/client/{bookingForm-DE2CwIU9.mjs → bookingForm-B1Fc62Sl.mjs} +8 -5
- package/dist/client/{bookingRoute-Bqlyu5Vb.mjs → bookingRoute-D6DlxYx6.mjs} +6 -2
- package/dist/client/bookings.mjs +16 -13
- package/dist/client/{carousel-DZyUdnFh.mjs → carousel-DW-HgjvT.mjs} +1 -1
- package/dist/client/{cart-D7HkkNwe.mjs → cart-D1zWe4R7.mjs} +3 -3
- package/dist/client/{cart.client-H4sv2TpD.mjs → cart.client-CIfbTLHS.mjs} +1 -1
- package/dist/client/{checkout-2qVyG-Sh.mjs → checkout-fDCNZ3IT.mjs} +3 -3
- package/dist/client/{checkout.client-DAjrBZ74.mjs → checkout.client-C4l2KjtV.mjs} +1 -1
- package/dist/client/{checkoutUrls-CYj06rX1.mjs → checkoutUrls-cWL6I-Vz.mjs} +3 -2
- package/dist/client/client.mjs +50 -3
- package/dist/client/{context-DXmIbXCK.mjs → context-DQnTyApV.mjs} +24 -2
- package/dist/client/{bookingQuestionValues-BjcyCru5.mjs → creditProducts-CMOmhWm2.mjs} +71 -11
- package/dist/client/{cta-DP_IBnq3.mjs → cta-Bj5WHgcv.mjs} +2 -2
- package/dist/client/{dateFormatting-CwrkFZTr.mjs → dateFormatting-Bv6kjUW3.mjs} +1 -1
- package/dist/client/{demoPortalMagicLink-DQXK-Fh6.mjs → demoPortalMagicLink-3uVu3WgG.mjs} +1 -1
- package/dist/client/{wizardSteps-CFulHWnT.mjs → display-CT8KMSpH.mjs} +893 -68
- package/dist/client/{enhanceHeaderSection-DheQj7rg.mjs → enhanceHeaderSection-B27KFGDv.mjs} +3 -2
- package/dist/client/{event-details.client-C5UufcRp.mjs → event-details.client-CL4Lqz2c.mjs} +1 -1
- package/dist/client/{event-registration.client-CMGg63IU.mjs → event-registration.client-Dj3Kyp5X.mjs} +56 -16
- package/dist/client/{eventCalendar-DlD0GCEy.mjs → eventCalendar-DGsdSF8J.mjs} +4 -4
- package/dist/client/{eventCombined-DoSi8p_l.mjs → eventCombined-DFSVDJ3D.mjs} +4 -4
- package/dist/client/{eventDetails-DzuQYgmO.mjs → eventDetails-DzMskXYA.mjs} +2 -2
- package/dist/client/{eventListing-CkiMjl0g.mjs → eventListing-CpFFcAUr.mjs} +4 -4
- package/dist/client/{eventRegistration-CjS3Zpjp.mjs → eventRegistration-BipMUOCw.mjs} +8 -5
- package/dist/client/{form-DgQqm7T2.mjs → form-57k2JQnm.mjs} +3 -3
- package/dist/client/{form.client-BI9Dcsq5.mjs → form.client-CCl6CpRJ.mjs} +4 -4
- package/dist/client/{form.parts-DevF0L_A.mjs → form.parts-BOJ1yDDf.mjs} +1 -1
- package/dist/client/{formatDate-DDyURjoe.mjs → formatDate-BGlhrmhF.mjs} +1 -1
- package/dist/client/gifting/client.mjs +2 -2
- package/dist/client/{headerSection-DYIG6Pwb.mjs → headerSection-q_bEzfhW.mjs} +2 -2
- package/dist/client/{newsletter-form.client-BWp7Y1e1.mjs → newsletter-form.client-CiqKAmPs.mjs} +5 -5
- package/dist/client/{newsletter-form.parts-Dg8s9NwJ.mjs → newsletter-form.parts-x1RzAMNO.mjs} +1 -1
- package/dist/client/{newsletterForm-DnPraMzx.mjs → newsletterForm-Cn7h4zFe.mjs} +3 -3
- package/dist/client/{noop-ByFRHYQ2.mjs → noop-B_f7RqLD.mjs} +111 -2
- package/dist/client/portal/client.mjs +20 -12
- package/dist/client/{product-detail.client-BFAgHrdg.mjs → product-detail.client-rWUvpVvZ.mjs} +1 -1
- package/dist/client/{product-list.client-DVrs_DyY.mjs → product-list.client-J0wDOmKv.mjs} +1 -1
- package/dist/client/{productDetail-D4rvl6Xg.mjs → productDetail-LtCkMrJ0.mjs} +3 -3
- package/dist/client/{productList-B8o5AOMX.mjs → productList-C0MLeh-v.mjs} +3 -3
- package/dist/client/{propsDecoder-hhotPP6P.mjs → propsDecoder-CAmEkJ6Y.mjs} +3 -3
- package/dist/client/{registry.server-Ch3EpupA.mjs → registry.server-Bf2YX_4v.mjs} +22 -19
- package/dist/client/rendering/client.mjs +25 -25
- package/dist/client/rendering/islands.mjs +1 -1
- package/dist/client/rendering.mjs +4 -4
- package/dist/client/{richText-coerce-C3LabQ1O.mjs → richText-coerce-BTurYEao.mjs} +1 -1
- package/dist/client/{routeIslandApiConfig-CQGlxId8.mjs → routeIslandApiConfig-UdAlnZGQ.mjs} +1 -1
- package/dist/client/{shop-rRXplPGZ.mjs → shop-Dkn6EasY.mjs} +3 -3
- package/dist/client/{shop-commerce-VDbVaKY-.mjs → shop-commerce-bo0Z6kwf.mjs} +11 -11
- package/dist/client/{shop-commerce-store-DqdgJ8Zw.mjs → shop-commerce-store-Ckxa4_jI.mjs} +1 -1
- package/dist/client/{shop.client-DdwvMvaK.mjs → shop.client-B_GqU6_U.mjs} +109 -30
- package/dist/client/{shop.interactive-C8OvFY06.mjs → shop.interactive-C6L_Ig5F.mjs} +7 -523
- package/dist/client/{shopShared-BeuJiGPU.mjs → shopShared-CO1Y8lFd.mjs} +2 -2
- package/dist/client/src-BozhJ43Z.mjs +3 -0
- package/dist/client/{src-1PJxc8KO.mjs → src-xrjaKaCj.mjs} +6 -8
- package/dist/client/{timetableModel-Cko9LRKy.mjs → timetableModel-D62jfOxZ.mjs} +10 -10
- package/dist/client/{useAvailableSlots-M6QIEiWf.mjs → useAvailableSlots-CStfVmyY.mjs} +3 -3
- package/dist/client/{useDiscountApply-BJSnyO0f.mjs → useDiscountApply-Ca2pHUDu.mjs} +5 -3
- package/dist/client/{useDiscountCodeUi-D3XnOSCi.mjs → useDiscountCodeUi-AEifktGO.mjs} +1 -1
- package/dist/client/{useEventPagination-PhTIoFVX.mjs → useEventPagination-uxnUWI2v.mjs} +6 -6
- package/dist/client/{view-448wvvEY.mjs → view-B6KSxQMO.mjs} +7 -7
- package/dist/client/{view-L_mkgtnk.mjs → view-SVnWic7i.mjs} +2 -3
- package/dist/preview-next/client/{ArrangementLookControls-BpvnOGlN.mjs → ArrangementLookControls-kbdqYkWM.mjs} +3 -3
- package/dist/preview-next/client/{PreviewEditorSidebar-C0OtdWu_.mjs → PreviewEditorSidebar-DI_LhsMQ.mjs} +89 -39
- package/dist/preview-next/client/{PreviewEditorUI-Csc5vH5k.mjs → PreviewEditorUI-yyD-ZREP.mjs} +5 -5
- package/dist/preview-next/client/{PreviewShell-BOLH_pm-.mjs → PreviewShell-YauP65Gi.mjs} +5 -5
- package/dist/preview-next/client/{SdkPreviewModeRuntime-CKodLReY.mjs → SdkPreviewModeRuntime-Bl7jQMI1.mjs} +8 -7
- package/dist/preview-next/client/{SiteChromeCustomizeButton-BeEZpeKn.mjs → SiteChromeCustomizeButton-CQFRP9aM.mjs} +1057 -316
- package/dist/preview-next/client/{previewAssistantSlot-BBdN5kfY.mjs → previewAssistantSlot-DSR0IdAw.mjs} +417 -56
- package/dist/preview-next/client/{previewChromeSurface-VZtGwPuH.mjs → previewChromeSurface-uSnVzeNs.mjs} +1 -1
- package/dist/preview-next/client/runtime.mjs +3 -3
- package/dist/preview-next/client/{sdk-runtime-kiZkMcuR.mjs → sdk-runtime-6Q0RVJTQ.mjs} +2 -2
- package/dist/preview-next/client/{src-DY8JCJdE.mjs → src-DzXUmsyK.mjs} +6 -8
- package/dist/preview-next/client/src-LUhVXBEQ.mjs +3 -0
- package/dist/preview-next/client/{useAutosaveStatus-BiIHEeE0.mjs → useAutosaveStatus-Cdx3kAGm.mjs} +1 -1
- package/dist/preview-next/client/{useBlockCustomizeControls-BuFLIpmX.mjs → useBlockCustomizeControls-ZrWdhcB6.mjs} +1 -1
- package/dist/preview-next/client/{useOpenBlockForSetup-DlxYgmh_.mjs → useOpenBlockForSetup-CK-GWb9k.mjs} +1 -1
- package/dist/preview-next/keepAlive.mjs +1 -1
- package/dist/preview-next/middleware.mjs +1 -1
- package/dist/preview-next/{route-contract-C0sCvCYL.mjs → route-contract-BU1m9SV3.mjs} +47 -0
- package/dist/server/{Block.shared-Dnhc0Wu5.mjs → Block.shared-4vx7wzxj.mjs} +4 -4
- package/dist/server/{ThemeScopeCore-NAQ_zsFu.mjs → ThemeScopeCore-C3HLgqBF.mjs} +6 -3
- package/dist/server/{bindings-DLoZYUxG.mjs → bindings-TAQbo2P5.mjs} +1 -1
- package/dist/server/{booking-form.reserved-fields-BWRF7509.mjs → booking-form.reserved-fields-Cqp13TKc.mjs} +1 -0
- package/dist/server/{client-Bc8jI8zN.mjs → client-DzCxEl3L.mjs} +48 -1
- package/dist/server/config-validation.mjs +1 -1
- package/dist/server/config.mjs +1 -1
- package/dist/server/data/resolveBlockData.mjs +1 -1
- package/dist/server/{headerVariant-BwR9NV4b.mjs → headerVariant-8O5MvxIU.mjs} +2 -1
- package/dist/server/index.mjs +2 -2
- package/dist/server/{loadContent-D61gpqHB.mjs → loadContent-BO1M9Hdf.mjs} +4 -4
- package/dist/server/{loadPage-B4ZYpIcd.mjs → loadPage-BvWzmZcD.mjs} +2 -2
- package/dist/server/next.mjs +6 -6
- package/dist/server/{overrideResolution-CDReKy2P.mjs → overrideResolution-fxuB1zZg.mjs} +1 -1
- package/dist/server/page-converter.mjs +1 -1
- package/dist/server/{pageRenderPlan-ByVTA7-4.mjs → pageRenderPlan-DzduDSqY.mjs} +2 -2
- package/dist/server/{pageRuntimeSupport-Dzz_Dze6.mjs → pageRuntimeSupport-BU8pwTNx.mjs} +2 -2
- package/dist/server/{pageShared-Dk5Ku6hs.mjs → pageShared-CSOJ8p8E.mjs} +24 -16
- package/dist/server/{parseThemeForPersistence-pJPGfMrf.mjs → parseThemeForPersistence-BebSeE17.mjs} +1 -1
- package/dist/server/{prebuild-CW4M0WEZ.mjs → prebuild-C5ZYo7wA.mjs} +1 -1
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/{prefetchBlockData-Bvx0SiIM.mjs → prefetchBlockData-BvbxqeKn.mjs} +2 -2
- package/dist/server/{registry-Bh0Y25zH.mjs → registry-Fv-7D8o2.mjs} +264 -48
- 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 +3 -3
- package/dist/server/rendering.mjs +7 -7
- package/dist/server/{resolveBlockData-CnHHst9r.mjs → resolveBlockData-xPgkvoWS.mjs} +1 -1
- package/dist/server/server.mjs +3 -3
- package/dist/server/theme-bridge.mjs +1 -1
- package/dist/server/theme.mjs +1 -1
- package/dist/server/{validation-D2bHWSxJ.mjs → validation-DddhgNdb.mjs} +4 -4
- package/dist/server/{version-DkM1eAxG.mjs → version-D_W2mt8w.mjs} +1 -1
- package/dist/styles/index.css +6 -3
- package/package.json +1 -1
- package/dist/client/creditProducts-BOWi1QLp.mjs +0 -62
- package/dist/client/src-CdRISvQp.mjs +0 -3
- package/dist/preview-next/client/src-BP8771hw.mjs +0 -3
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { c as unsafeAsMediaAssetId, d as parseUuidBrand, f as err, i as resolveManagedMediaReference, l as unsafeAsStorageBucketName, o as parseCanonicalMediaIdentifier, p as ok$1, u as unsafeAsStoragePath } from "./renderableMediaAssetAdmission-BlfqYLJW.mjs";
|
|
3
|
-
import { $
|
|
4
|
-
import { C as omitZeroAmountFutureRows, E as
|
|
5
|
-
import { l as buildCalendarViewport$1, n as calendarLinks, r as groupItemsByDate } from "./src-
|
|
3
|
+
import { $t as toBookingTimeZone, B as blockBookingPaymentTermsSchema, Bt as resolveBookingDisplayContext, Ft as formatDateTimeRange, G as beforeBookingQuestionsPresentationSchema, Gt as compareLocalScheduleDates, Ht as toScheduledBookingDateTime, It as formatTime$2, Jt as getLocalScheduleDate, K as bookingQuestionsAnswerValueSchema, Lt as formatTimeRange, Mt as formatDate$2, N as isArrangementMode, Nt as formatDateRange, O as arrangementModes, Pt as formatDateTime, Qt as resolveBookingTimeZoneId, V as blockBookingConsentSchema, W as toBookingRequirementConsentField, X as externalMediaSchema, Xt as parseLocalScheduleTime, Y as assetMediaSchema, Z as imageMediaSchema, Zt as resolveBookingBusinessTimeZone, an as toNonNegativeCents, at as normalizeCurrencyCode, en as parseUtcIsoDateTimeString, et as runtimeMediaSchema, lt as eventCalendarListLayoutValues, n as blockSiteTermsSchema, nn as validateBookingPaymentOptionKinds, on as formatCurrencyAmount, ot as eventCalendarDefaultViewValues, qt as getBookingLocalDateKey, st as eventCalendarDisplayModeValues, tn as toUtcIsoDateTimeString, tt as videoMediaSchema, zt as inferSiteDateLocale } from "./noop-B_f7RqLD.mjs";
|
|
4
|
+
import { A as resolveFlexibleBalanceInitialPaymentCents, C as clampConfiguredAmount, D as omitZeroAmountFutureRows, E as getBookingInstalmentPlanIntervalCount, M as assertNever$2, O as splitAmountWithRemainderInFirst, S as addIntervalPreservingMonthAnchor, T as getBookingInstalmentDepositRefundability, d as initialBookingQuestionsAnswerMode, f as initialBookingQuestionsValues, h as assertNever$3, k as resolveFlexibleBalanceDueAt, n as getCreditProductCreditUnit, p as resolveBookingQuestionsAnswerMode, s as buildBookingQuestionsSubmission, t as deriveCreditProductLabels } from "./creditProducts-CMOmhWm2.mjs";
|
|
5
|
+
import { l as buildCalendarViewport$1, n as calendarLinks, r as groupItemsByDate } from "./src-xrjaKaCj.mjs";
|
|
6
6
|
import { A as defineButtonStyleRecipe, B as mergeStyles, E as ELEVATION_OFFSET, G as resolveSurfaceForeground, L as backgroundColorStyle, M as mapButtonVisualAppearances, St as preparePaletteColourIndex, U as textColorStyle, V as rgbColorValue, _t as resolveOpaqueSurfaceHex, a as resolveSurface, at as SURFACE_FOREGROUND_CSS_VARS, bt as requirePaletteColorsFromEntries, d as scrimTone, ft as surfaceInkDeclarations, gt as resolveConcreteColorHex, h as BUTTON_CONTRAST_POLICY, ht as ownedThemeSnapshot, i as requireResolvedSurface, j as mapButtonRoleAppearances, k as PUBLIC_BUTTON_ROLES, mt as freezeOwnedThemeValue, ot as SURFACE_INK_CSS_VARS, p as contextualButtonSurfaceResetStyles, s as surfaceButtonRequest, st as surfaceForegroundDeclarations, t as parseResolvedSurface, tt as expandPalette, u as gradientScrimSamples, ut as surfaceForegroundValue, vt as paletteValueKey, wt as featuresFromHex, yt as paletteValueKeySchema } from "./accessibleSurfaces-chpD4C2c.mjs";
|
|
7
7
|
import { D as parseThemeColorToken, E as parseColorTokenParts, O as themeColorTokenSchema, T as paletteModeSchema, c as buttonEffectApplicationSchema, f as buttonVisualStatesSchema, g as VARIANT_ROLES, l as buttonPressOffsetSchema, s as unsafeAsOpaqueButtonColourToken, w as paletteColorsSchema, y as hexColorSchema } from "./types-5fOsPIpL.mjs";
|
|
8
8
|
import { S as clsx } from "./ThemedButton-BdnEwA38.mjs";
|
|
@@ -1390,7 +1390,8 @@ const bookingPageLookIdValues = [
|
|
|
1390
1390
|
"site-style:lantern",
|
|
1391
1391
|
"site-style:poster",
|
|
1392
1392
|
"site-style:loom",
|
|
1393
|
-
"site-style:brook"
|
|
1393
|
+
"site-style:brook",
|
|
1394
|
+
"site-style:poise"
|
|
1394
1395
|
];
|
|
1395
1396
|
function asFooterLookId(value) {
|
|
1396
1397
|
return value;
|
|
@@ -7126,6 +7127,10 @@ const bookingLookGroundLimits = {
|
|
|
7126
7127
|
"site-style:brook": {
|
|
7127
7128
|
lightness: [.88, 1],
|
|
7128
7129
|
maxChroma: .04
|
|
7130
|
+
},
|
|
7131
|
+
"site-style:poise": {
|
|
7132
|
+
lightness: [.88, 1],
|
|
7133
|
+
maxChroma: .04
|
|
7129
7134
|
}
|
|
7130
7135
|
};
|
|
7131
7136
|
const contrast = (against, ratio = 3) => ({
|
|
@@ -7789,6 +7794,115 @@ const brookButtons = {
|
|
|
7789
7794
|
roles: ["primary"],
|
|
7790
7795
|
name: "the buttons"
|
|
7791
7796
|
};
|
|
7797
|
+
const brook = {
|
|
7798
|
+
buttonSlot: brookButtons,
|
|
7799
|
+
roles: {
|
|
7800
|
+
...lightGrounds(brookLimits, {
|
|
7801
|
+
page: .014,
|
|
7802
|
+
band: .03,
|
|
7803
|
+
bandL: [.9, .945]
|
|
7804
|
+
}),
|
|
7805
|
+
surfaceAlt: {
|
|
7806
|
+
l: [.9, .945],
|
|
7807
|
+
c: [0, .03],
|
|
7808
|
+
chromaShare: .3,
|
|
7809
|
+
target: .92,
|
|
7810
|
+
name: "the band",
|
|
7811
|
+
needs: [distinct("background", .03)]
|
|
7812
|
+
},
|
|
7813
|
+
muted: {
|
|
7814
|
+
l: [.93, .965],
|
|
7815
|
+
c: [0, .03],
|
|
7816
|
+
chromaShare: .25,
|
|
7817
|
+
target: .948,
|
|
7818
|
+
name: "the quieter panels",
|
|
7819
|
+
needs: [distinct("background", .015)]
|
|
7820
|
+
},
|
|
7821
|
+
primary: {
|
|
7822
|
+
l: [.3, .62],
|
|
7823
|
+
c: [.03, .15],
|
|
7824
|
+
target: .5,
|
|
7825
|
+
name: "the buttons",
|
|
7826
|
+
mention: true,
|
|
7827
|
+
needs: buttonSeparation(lightReading)
|
|
7828
|
+
},
|
|
7829
|
+
secondary: {
|
|
7830
|
+
l: [.3, .55],
|
|
7831
|
+
c: [.02, .09],
|
|
7832
|
+
target: .45,
|
|
7833
|
+
name: "the deep band",
|
|
7834
|
+
needs: [label, distinct("primary", .08)]
|
|
7835
|
+
},
|
|
7836
|
+
accent: {
|
|
7837
|
+
l: [.38, .66],
|
|
7838
|
+
c: [.05, .15],
|
|
7839
|
+
target: .54,
|
|
7840
|
+
name: "the squiggles",
|
|
7841
|
+
mention: true,
|
|
7842
|
+
analogous: true,
|
|
7843
|
+
needs: [
|
|
7844
|
+
contrast("background"),
|
|
7845
|
+
contrast("surface"),
|
|
7846
|
+
contrast("surfaceAlt")
|
|
7847
|
+
]
|
|
7848
|
+
}
|
|
7849
|
+
},
|
|
7850
|
+
slots: [
|
|
7851
|
+
{
|
|
7852
|
+
roles: ["surfaceAlt"],
|
|
7853
|
+
name: "the band"
|
|
7854
|
+
},
|
|
7855
|
+
brookButtons,
|
|
7856
|
+
{
|
|
7857
|
+
roles: ["accent"],
|
|
7858
|
+
name: "the squiggles"
|
|
7859
|
+
}
|
|
7860
|
+
],
|
|
7861
|
+
order: [
|
|
7862
|
+
"background",
|
|
7863
|
+
"surface",
|
|
7864
|
+
"surfaceAlt",
|
|
7865
|
+
"muted",
|
|
7866
|
+
"border",
|
|
7867
|
+
"primary",
|
|
7868
|
+
"accent",
|
|
7869
|
+
"secondary"
|
|
7870
|
+
],
|
|
7871
|
+
neutrals: {
|
|
7872
|
+
dark: [.26, .02],
|
|
7873
|
+
light: [.985, .01]
|
|
7874
|
+
},
|
|
7875
|
+
reading: lightReading,
|
|
7876
|
+
groundLimit: brookLimits.maxChroma,
|
|
7877
|
+
contrast: [{
|
|
7878
|
+
label: "the complement on the squiggles",
|
|
7879
|
+
hue: "complement",
|
|
7880
|
+
second: "accent",
|
|
7881
|
+
lead: "primary",
|
|
7882
|
+
l: .54,
|
|
7883
|
+
c: [.08, .13]
|
|
7884
|
+
}, {
|
|
7885
|
+
label: "a warm colour on the buttons",
|
|
7886
|
+
hue: "split-warm",
|
|
7887
|
+
second: "primary",
|
|
7888
|
+
lead: "accent",
|
|
7889
|
+
l: .5,
|
|
7890
|
+
c: [.08, .13]
|
|
7891
|
+
}]
|
|
7892
|
+
};
|
|
7893
|
+
/**
|
|
7894
|
+
* Poise: the brand colour is the one loud area, filling the opening and the
|
|
7895
|
+
* team section, and it fills the buttons everywhere else (on the brand field
|
|
7896
|
+
* they turn ink). The rest is a quiet page, white cards and a band on
|
|
7897
|
+
* surfaceAlt. The only other colour it draws is the small marks, in the
|
|
7898
|
+
* accent wherever that reaches 3:1, so a dark owner colour or a second colour
|
|
7899
|
+
* goes there. Secondary is never drawn.
|
|
7900
|
+
*/
|
|
7901
|
+
const poiseLimits = bookingLookGroundLimits["site-style:poise"];
|
|
7902
|
+
const poiseBrand = {
|
|
7903
|
+
roles: ["primary"],
|
|
7904
|
+
name: "the colour panels and buttons"
|
|
7905
|
+
};
|
|
7792
7906
|
/** Keyed by the offered looks, so a booking look without a colour spec doesn't compile. */
|
|
7793
7907
|
const bookingLookColourSpecs = {
|
|
7794
7908
|
"site-style:fulcrum": fulcrum,
|
|
@@ -7797,11 +7911,12 @@ const bookingLookColourSpecs = {
|
|
|
7797
7911
|
"site-style:lantern": lantern,
|
|
7798
7912
|
"site-style:poster": poster,
|
|
7799
7913
|
"site-style:loom": loom,
|
|
7800
|
-
"site-style:brook":
|
|
7801
|
-
|
|
7914
|
+
"site-style:brook": brook,
|
|
7915
|
+
"site-style:poise": {
|
|
7916
|
+
buttonSlot: poiseBrand,
|
|
7802
7917
|
roles: {
|
|
7803
|
-
...lightGrounds(
|
|
7804
|
-
page: .
|
|
7918
|
+
...lightGrounds(poiseLimits, {
|
|
7919
|
+
page: .01,
|
|
7805
7920
|
band: .03,
|
|
7806
7921
|
bandL: [.9, .945]
|
|
7807
7922
|
}),
|
|
@@ -7809,7 +7924,7 @@ const bookingLookColourSpecs = {
|
|
|
7809
7924
|
l: [.9, .945],
|
|
7810
7925
|
c: [0, .03],
|
|
7811
7926
|
chromaShare: .3,
|
|
7812
|
-
target: .
|
|
7927
|
+
target: .925,
|
|
7813
7928
|
name: "the band",
|
|
7814
7929
|
needs: [distinct("background", .03)]
|
|
7815
7930
|
},
|
|
@@ -7822,45 +7937,38 @@ const bookingLookColourSpecs = {
|
|
|
7822
7937
|
needs: [distinct("background", .015)]
|
|
7823
7938
|
},
|
|
7824
7939
|
primary: {
|
|
7825
|
-
l: [.
|
|
7826
|
-
c: [.03, .
|
|
7827
|
-
target: .
|
|
7828
|
-
name: "the buttons",
|
|
7940
|
+
l: [.66, .93],
|
|
7941
|
+
c: [.03, .2],
|
|
7942
|
+
target: .8,
|
|
7943
|
+
name: "the colour panels and buttons",
|
|
7829
7944
|
mention: true,
|
|
7830
7945
|
needs: buttonSeparation(lightReading)
|
|
7831
7946
|
},
|
|
7832
7947
|
secondary: {
|
|
7833
|
-
l: [.
|
|
7834
|
-
c: [.
|
|
7835
|
-
target: .
|
|
7836
|
-
name: "the
|
|
7837
|
-
needs: [label, distinct("primary", .08)]
|
|
7948
|
+
l: [.18, .4],
|
|
7949
|
+
c: [.01, .08],
|
|
7950
|
+
target: .28,
|
|
7951
|
+
name: "the quiet details"
|
|
7838
7952
|
},
|
|
7839
7953
|
accent: {
|
|
7840
|
-
l: [.
|
|
7841
|
-
c: [.05, .
|
|
7842
|
-
target: .
|
|
7843
|
-
name: "the
|
|
7954
|
+
l: [.2, .66],
|
|
7955
|
+
c: [.05, .17],
|
|
7956
|
+
target: .42,
|
|
7957
|
+
name: "the small marks",
|
|
7844
7958
|
mention: true,
|
|
7845
7959
|
analogous: true,
|
|
7846
7960
|
needs: [
|
|
7847
7961
|
contrast("background"),
|
|
7848
7962
|
contrast("surface"),
|
|
7849
|
-
contrast("surfaceAlt")
|
|
7963
|
+
contrast("surfaceAlt"),
|
|
7964
|
+
contrast("primary")
|
|
7850
7965
|
]
|
|
7851
7966
|
}
|
|
7852
7967
|
},
|
|
7853
|
-
slots: [
|
|
7854
|
-
|
|
7855
|
-
|
|
7856
|
-
|
|
7857
|
-
},
|
|
7858
|
-
brookButtons,
|
|
7859
|
-
{
|
|
7860
|
-
roles: ["accent"],
|
|
7861
|
-
name: "the squiggles"
|
|
7862
|
-
}
|
|
7863
|
-
],
|
|
7968
|
+
slots: [poiseBrand, {
|
|
7969
|
+
roles: ["accent"],
|
|
7970
|
+
name: "the small marks"
|
|
7971
|
+
}],
|
|
7864
7972
|
order: [
|
|
7865
7973
|
"background",
|
|
7866
7974
|
"surface",
|
|
@@ -7868,29 +7976,29 @@ const bookingLookColourSpecs = {
|
|
|
7868
7976
|
"muted",
|
|
7869
7977
|
"border",
|
|
7870
7978
|
"primary",
|
|
7871
|
-
"
|
|
7872
|
-
"
|
|
7979
|
+
"secondary",
|
|
7980
|
+
"accent"
|
|
7873
7981
|
],
|
|
7874
7982
|
neutrals: {
|
|
7875
|
-
dark: [.
|
|
7876
|
-
light: [.
|
|
7983
|
+
dark: [.22, .015],
|
|
7984
|
+
light: [.99, .006]
|
|
7877
7985
|
},
|
|
7878
7986
|
reading: lightReading,
|
|
7879
|
-
groundLimit:
|
|
7987
|
+
groundLimit: poiseLimits.maxChroma,
|
|
7880
7988
|
contrast: [{
|
|
7881
|
-
label: "the complement on the
|
|
7989
|
+
label: "the complement on the small marks",
|
|
7882
7990
|
hue: "complement",
|
|
7883
7991
|
second: "accent",
|
|
7884
7992
|
lead: "primary",
|
|
7885
|
-
l: .
|
|
7886
|
-
c: [.08, .
|
|
7993
|
+
l: .42,
|
|
7994
|
+
c: [.08, .14]
|
|
7887
7995
|
}, {
|
|
7888
|
-
label: "a warm colour on the
|
|
7996
|
+
label: "a warm colour on the small marks",
|
|
7889
7997
|
hue: "split-warm",
|
|
7890
|
-
second: "
|
|
7891
|
-
lead: "
|
|
7892
|
-
l: .
|
|
7893
|
-
c: [.08, .
|
|
7998
|
+
second: "accent",
|
|
7999
|
+
lead: "primary",
|
|
8000
|
+
l: .42,
|
|
8001
|
+
c: [.08, .14]
|
|
7894
8002
|
}]
|
|
7895
8003
|
}
|
|
7896
8004
|
};
|
|
@@ -15325,6 +15433,71 @@ const poiseNight = defineCuratedPalette({
|
|
|
15325
15433
|
}
|
|
15326
15434
|
]
|
|
15327
15435
|
});
|
|
15436
|
+
const poiseMono = defineCuratedPalette({
|
|
15437
|
+
authoringKey: "poise-mono",
|
|
15438
|
+
name: "Poise — Mono",
|
|
15439
|
+
description: "Black, white and light grey, with black buttons and a dark band for the footer.",
|
|
15440
|
+
tags: {
|
|
15441
|
+
tone: "bold",
|
|
15442
|
+
energy: "calm",
|
|
15443
|
+
era: "modern"
|
|
15444
|
+
},
|
|
15445
|
+
mode: "light",
|
|
15446
|
+
colors: [
|
|
15447
|
+
{
|
|
15448
|
+
name: "primary",
|
|
15449
|
+
hex: "#111111"
|
|
15450
|
+
},
|
|
15451
|
+
{
|
|
15452
|
+
name: "secondary",
|
|
15453
|
+
hex: "#3a3a3a"
|
|
15454
|
+
},
|
|
15455
|
+
{
|
|
15456
|
+
name: "accent",
|
|
15457
|
+
hex: "#5c5c5c"
|
|
15458
|
+
},
|
|
15459
|
+
{
|
|
15460
|
+
name: "success",
|
|
15461
|
+
hex: "#1e7a4c"
|
|
15462
|
+
},
|
|
15463
|
+
{
|
|
15464
|
+
name: "warning",
|
|
15465
|
+
hex: "#b06f10"
|
|
15466
|
+
},
|
|
15467
|
+
{
|
|
15468
|
+
name: "destructive",
|
|
15469
|
+
hex: "#c8352a"
|
|
15470
|
+
},
|
|
15471
|
+
{
|
|
15472
|
+
name: "background",
|
|
15473
|
+
hex: "#ffffff"
|
|
15474
|
+
},
|
|
15475
|
+
{
|
|
15476
|
+
name: "surface",
|
|
15477
|
+
hex: "#ffffff"
|
|
15478
|
+
},
|
|
15479
|
+
{
|
|
15480
|
+
name: "surfaceAlt",
|
|
15481
|
+
hex: "#f0f0f0"
|
|
15482
|
+
},
|
|
15483
|
+
{
|
|
15484
|
+
name: "muted",
|
|
15485
|
+
hex: "#575757"
|
|
15486
|
+
},
|
|
15487
|
+
{
|
|
15488
|
+
name: "text",
|
|
15489
|
+
hex: "#111111"
|
|
15490
|
+
},
|
|
15491
|
+
{
|
|
15492
|
+
name: "primaryForeground",
|
|
15493
|
+
hex: "#ffffff"
|
|
15494
|
+
},
|
|
15495
|
+
{
|
|
15496
|
+
name: "border",
|
|
15497
|
+
hex: "#d9d9d9"
|
|
15498
|
+
}
|
|
15499
|
+
]
|
|
15500
|
+
});
|
|
15328
15501
|
const havenBlush = defineCuratedPalette({
|
|
15329
15502
|
authoringKey: "haven-blush",
|
|
15330
15503
|
name: "Haven — Blush",
|
|
@@ -15769,6 +15942,10 @@ const styleSuggestedPalettes = [
|
|
|
15769
15942
|
...admitCuratedPaletteDefinition(poiseNight),
|
|
15770
15943
|
ownerStyleId: "site-style:poise"
|
|
15771
15944
|
},
|
|
15945
|
+
{
|
|
15946
|
+
...admitCuratedPaletteDefinition(poiseMono),
|
|
15947
|
+
ownerStyleId: "site-style:poise"
|
|
15948
|
+
},
|
|
15772
15949
|
{
|
|
15773
15950
|
...admitCuratedPaletteDefinition(havenBlush),
|
|
15774
15951
|
ownerStyleId: "site-style:haven"
|
|
@@ -17056,6 +17233,21 @@ const brookFontPairings = [
|
|
|
17056
17233
|
}
|
|
17057
17234
|
}
|
|
17058
17235
|
];
|
|
17236
|
+
const poiseFontPairings = [{
|
|
17237
|
+
id: "poise-schibsted",
|
|
17238
|
+
heading: poiseTypography.headings.default.family,
|
|
17239
|
+
body: poiseTypography.body.family
|
|
17240
|
+
}, {
|
|
17241
|
+
id: "poise-anton",
|
|
17242
|
+
heading: "Anton, \"Arial Narrow\", sans-serif",
|
|
17243
|
+
body: "Inter, system-ui, sans-serif",
|
|
17244
|
+
headingTreatment: {
|
|
17245
|
+
weight: "regular",
|
|
17246
|
+
letterSpacing: "normal",
|
|
17247
|
+
lineHeight: "tight",
|
|
17248
|
+
case: "uppercase"
|
|
17249
|
+
}
|
|
17250
|
+
}];
|
|
17059
17251
|
const fulcrumFontPairings = [{
|
|
17060
17252
|
id: "fulcrum-source",
|
|
17061
17253
|
heading: "\"Source Serif 4\", Georgia, serif",
|
|
@@ -17253,7 +17445,8 @@ const bookingPageNoPhotoHeroLookIds = {
|
|
|
17253
17445
|
"site-style:lantern": "hero-framed-title",
|
|
17254
17446
|
"site-style:poster": "hero-page-head",
|
|
17255
17447
|
"site-style:loom": "hero-page-head",
|
|
17256
|
-
"site-style:brook": "hero-page-head"
|
|
17448
|
+
"site-style:brook": "hero-page-head",
|
|
17449
|
+
"site-style:poise": "hero-page-head"
|
|
17257
17450
|
};
|
|
17258
17451
|
function bookingPageOfferingFor(siteStyleId) {
|
|
17259
17452
|
const lookId = bookingPageLookIdValues.find((id) => id === siteStyleId);
|
|
@@ -22252,6 +22445,7 @@ const curatedSiteStyles = [
|
|
|
22252
22445
|
},
|
|
22253
22446
|
compositionBudget: balancedBudget,
|
|
22254
22447
|
typography: poiseTypography,
|
|
22448
|
+
fontPairings: poiseFontPairings,
|
|
22255
22449
|
looks: poiseLooks,
|
|
22256
22450
|
contentTemplateDefaults: { event: "event-header" },
|
|
22257
22451
|
themeOverrides: {
|
|
@@ -22323,7 +22517,8 @@ const curatedSiteStyles = [
|
|
|
22323
22517
|
paletteRecommendations: [
|
|
22324
22518
|
paletteRecommendation("poise-butter"),
|
|
22325
22519
|
paletteRecommendation("poise-ember"),
|
|
22326
|
-
paletteRecommendation("poise-night")
|
|
22520
|
+
paletteRecommendation("poise-night"),
|
|
22521
|
+
paletteRecommendation("poise-mono")
|
|
22327
22522
|
]
|
|
22328
22523
|
}),
|
|
22329
22524
|
defineCuratedSiteStyle({
|
|
@@ -23269,6 +23464,37 @@ function createInteractiveIslandCodec(options) {
|
|
|
23269
23464
|
};
|
|
23270
23465
|
}
|
|
23271
23466
|
//#endregion
|
|
23467
|
+
//#region ../blocks/src/system/runtime/shared/navigation/pageNavigation.ts
|
|
23468
|
+
const pageNavigationSchema = z.discriminatedUnion("kind", [z.object({ kind: z.literal("page") }), z.object({
|
|
23469
|
+
kind: z.literal("embed"),
|
|
23470
|
+
canonicalOrigin: z.string().url()
|
|
23471
|
+
})]);
|
|
23472
|
+
const PAGE_NAVIGATION = { kind: "page" };
|
|
23473
|
+
/** Page mode preserves the caller's URL; embeds leave through the public surface. */
|
|
23474
|
+
function canonicalUrl(path, navigation = PAGE_NAVIGATION) {
|
|
23475
|
+
if (navigation.kind === "page") return path;
|
|
23476
|
+
const url = new URL(path, navigation.canonicalOrigin);
|
|
23477
|
+
url.pathname = url.pathname.replace(/^\/embed(?=\/|$)/, "") || "/";
|
|
23478
|
+
return url.toString();
|
|
23479
|
+
}
|
|
23480
|
+
/** The callback retains each page caller's exact navigation effect. */
|
|
23481
|
+
function leavePage(target, navigation = PAGE_NAVIGATION, navigate = (target) => window.location.assign(target)) {
|
|
23482
|
+
if (navigation.kind === "embed") return {
|
|
23483
|
+
kind: "handOff",
|
|
23484
|
+
url: canonicalUrl(target, navigation)
|
|
23485
|
+
};
|
|
23486
|
+
navigate(target);
|
|
23487
|
+
return { kind: "navigated" };
|
|
23488
|
+
}
|
|
23489
|
+
function requestSignIn(returnPath, openModal, navigation = PAGE_NAVIGATION) {
|
|
23490
|
+
if (navigation.kind === "embed") return {
|
|
23491
|
+
kind: "handOff",
|
|
23492
|
+
url: canonicalUrl(returnPath, navigation)
|
|
23493
|
+
};
|
|
23494
|
+
openModal();
|
|
23495
|
+
return { kind: "navigated" };
|
|
23496
|
+
}
|
|
23497
|
+
//#endregion
|
|
23272
23498
|
//#region ../blocks/src/system/runtime/api/readAuthority.ts
|
|
23273
23499
|
const browserReadAuthoritySchema = z.discriminatedUnion("kind", [z.object({ kind: z.literal("published") }).strict(), z.object({
|
|
23274
23500
|
kind: z.literal("preview"),
|
|
@@ -23362,6 +23588,141 @@ const calendarTabViewsSchema = z.enum([
|
|
|
23362
23588
|
"week"
|
|
23363
23589
|
]);
|
|
23364
23590
|
//#endregion
|
|
23591
|
+
//#region ../blocks/src/system/runtime/nodes/booking-form.service-pricing.ts
|
|
23592
|
+
function getBookingServiceSlidingScale(service) {
|
|
23593
|
+
const pricing = service?.pricing;
|
|
23594
|
+
if (!pricing || pricing.pricingStrategy !== "sliding_scale" || pricing.slidingMinAmount === null || pricing.slidingMinAmount === void 0 || pricing.slidingMaxAmount === null || pricing.slidingMaxAmount === void 0) return null;
|
|
23595
|
+
return {
|
|
23596
|
+
minAmount: pricing.slidingMinAmount,
|
|
23597
|
+
maxAmount: pricing.slidingMaxAmount,
|
|
23598
|
+
suggestedAmount: pricing.slidingSuggestedAmount ?? null,
|
|
23599
|
+
currency: pricing.currency
|
|
23600
|
+
};
|
|
23601
|
+
}
|
|
23602
|
+
//#endregion
|
|
23603
|
+
//#region ../blocks/src/system/runtime/nodes/booking-form.package-purchase.ts
|
|
23604
|
+
function bookingRequiresResourceSelection(service, configured = false) {
|
|
23605
|
+
return configured || service?.onlinePaymentChoices?.anyAvailable === false;
|
|
23606
|
+
}
|
|
23607
|
+
function toBookingPurchasablePackages(products) {
|
|
23608
|
+
return products.filter((product) => product.productUseCase === "appointment_package" && product.purchaseAvailability === "purchasable").map(({ id, name, price, currency, creditsTotal, validDays, heldWithTeamMember }) => ({
|
|
23609
|
+
id,
|
|
23610
|
+
name,
|
|
23611
|
+
price,
|
|
23612
|
+
currency,
|
|
23613
|
+
creditsTotal,
|
|
23614
|
+
validDays,
|
|
23615
|
+
heldWithTeamMember: heldWithTeamMember ?? null
|
|
23616
|
+
}));
|
|
23617
|
+
}
|
|
23618
|
+
function resolveBookingPurchasablePackages(enabled, state) {
|
|
23619
|
+
if (!enabled) return { kind: "disabled" };
|
|
23620
|
+
switch (state.tag) {
|
|
23621
|
+
case "idle":
|
|
23622
|
+
case "loading": return { kind: "loading" };
|
|
23623
|
+
case "error": return {
|
|
23624
|
+
kind: "error",
|
|
23625
|
+
message: state.message
|
|
23626
|
+
};
|
|
23627
|
+
case "loaded": return {
|
|
23628
|
+
kind: "ready",
|
|
23629
|
+
items: state.value
|
|
23630
|
+
};
|
|
23631
|
+
}
|
|
23632
|
+
}
|
|
23633
|
+
function resolveBookingPaymentAvailability(perSession, held, purchase) {
|
|
23634
|
+
if (perSession || held.items.length > 0 || purchase.kind === "ready" && purchase.items.length > 0) return { kind: "available" };
|
|
23635
|
+
if (held.kind === "loading" || held.kind === "idle" || purchase.kind === "loading") return { kind: "loading" };
|
|
23636
|
+
if (held.kind === "error" || purchase.kind === "error") return { kind: "load_error" };
|
|
23637
|
+
return { kind: "no_choices" };
|
|
23638
|
+
}
|
|
23639
|
+
/** Disclose the package's purchase price; server settlement may require a review for discounts or credit. */
|
|
23640
|
+
function bookingPackagePurchaseTerms(product, promisedDiscountId) {
|
|
23641
|
+
return {
|
|
23642
|
+
currency: product.currency,
|
|
23643
|
+
totalCents: product.price,
|
|
23644
|
+
dueNowCents: product.price,
|
|
23645
|
+
laterPaymentAmountsCents: [],
|
|
23646
|
+
paymentOption: { kind: product.price > 0 ? "upfront" : "not_required" },
|
|
23647
|
+
promisedDiscountId
|
|
23648
|
+
};
|
|
23649
|
+
}
|
|
23650
|
+
function reconcileBookingPackagePurchase(selection, packages) {
|
|
23651
|
+
if (selection.kind === "none") return selection;
|
|
23652
|
+
const product = packages.find((product) => product.id === selection.package.id);
|
|
23653
|
+
if (!product) return { kind: "none" };
|
|
23654
|
+
return JSON.stringify(product) === JSON.stringify(selection.package) ? selection : {
|
|
23655
|
+
kind: "selected",
|
|
23656
|
+
package: product
|
|
23657
|
+
};
|
|
23658
|
+
}
|
|
23659
|
+
function resolveBookingPaymentChoice(purchase, heldId, option) {
|
|
23660
|
+
if (purchase.kind === "selected") return {
|
|
23661
|
+
kind: "buy_package",
|
|
23662
|
+
package: purchase.package
|
|
23663
|
+
};
|
|
23664
|
+
if (heldId) return {
|
|
23665
|
+
kind: "held_package",
|
|
23666
|
+
customerPassId: heldId
|
|
23667
|
+
};
|
|
23668
|
+
return option ? {
|
|
23669
|
+
kind: "per_session",
|
|
23670
|
+
option
|
|
23671
|
+
} : { kind: "unselected" };
|
|
23672
|
+
}
|
|
23673
|
+
function bookingHasPackagePaymentChoices(service) {
|
|
23674
|
+
return service?.onlinePaymentChoices?.buyPackage === true || service?.onlinePaymentChoices?.heldPackage !== false && service?.onlinePaymentChoices?.perSession === false;
|
|
23675
|
+
}
|
|
23676
|
+
function resolveBookingPackageSources(service, enabled, bearerAuth) {
|
|
23677
|
+
const packageOnly = service?.onlinePaymentChoices?.perSession === false;
|
|
23678
|
+
return {
|
|
23679
|
+
packageOnly,
|
|
23680
|
+
held: resolveHeldPackageSource(service, service?.onlinePaymentChoices?.heldPackage !== false && (enabled || packageOnly), bearerAuth),
|
|
23681
|
+
canBuy: service?.onlinePaymentChoices?.buyPackage === true
|
|
23682
|
+
};
|
|
23683
|
+
}
|
|
23684
|
+
function resolveHeldPackageSource(service, enabled, bearerAuth) {
|
|
23685
|
+
if (!enabled) return "disabled";
|
|
23686
|
+
if (!heldPackageServiceEligible(service)) return "missing-priced-service";
|
|
23687
|
+
return bearerAuth ? "enabled" : "missing-portal-auth";
|
|
23688
|
+
}
|
|
23689
|
+
function heldPackageServiceEligible(service) {
|
|
23690
|
+
if (!service) return false;
|
|
23691
|
+
return service.onlinePaymentChoices?.perSession === false || !getBookingServiceSlidingScale(service) && (service.priceAmount ?? 0) > 0;
|
|
23692
|
+
}
|
|
23693
|
+
function resolveBookingPackagePaymentSelection(data, service) {
|
|
23694
|
+
if (data.selectedAppointmentPackageId || data.packagePurchase?.kind === "selected") return "selected";
|
|
23695
|
+
return service?.onlinePaymentChoices?.perSession === false ? "required" : "per_session";
|
|
23696
|
+
}
|
|
23697
|
+
function bookingPackageRequestKey(enabled, serviceId, resourceId) {
|
|
23698
|
+
return enabled && serviceId ? `${serviceId}:${resourceId ?? "any"}` : null;
|
|
23699
|
+
}
|
|
23700
|
+
/** Resolve form admission and existing holdings before any payment/resource consumer sees service offers. */
|
|
23701
|
+
function applyBookingPaymentAdmission(services, requiresApproval, unrestrictedHeldServiceId) {
|
|
23702
|
+
return services.map((service) => {
|
|
23703
|
+
const choices = service.onlinePaymentChoices;
|
|
23704
|
+
if (requiresApproval) return {
|
|
23705
|
+
...service,
|
|
23706
|
+
onlinePaymentChoices: {
|
|
23707
|
+
perSession: choices?.perSession ?? true,
|
|
23708
|
+
heldPackage: false,
|
|
23709
|
+
buyPackage: false,
|
|
23710
|
+
anyAvailable: true
|
|
23711
|
+
}
|
|
23712
|
+
};
|
|
23713
|
+
return choices && service.id === unrestrictedHeldServiceId ? {
|
|
23714
|
+
...service,
|
|
23715
|
+
onlinePaymentChoices: {
|
|
23716
|
+
...choices,
|
|
23717
|
+
anyAvailable: true
|
|
23718
|
+
}
|
|
23719
|
+
} : service;
|
|
23720
|
+
});
|
|
23721
|
+
}
|
|
23722
|
+
function resolveBookingPaymentMode(service, payment) {
|
|
23723
|
+
return bookingHasPackagePaymentChoices(service) || payment.kind === "unavailable" ? "choice_required" : payment.mode;
|
|
23724
|
+
}
|
|
23725
|
+
//#endregion
|
|
23365
23726
|
//#region ../blocks/src/system/runtime/nodes/booking-form.reserved-fields.ts
|
|
23366
23727
|
const BOOKING_FORM_DATA_RESERVED_KEY_VALUES = [
|
|
23367
23728
|
"serviceId",
|
|
@@ -23372,6 +23733,7 @@ const BOOKING_FORM_DATA_RESERVED_KEY_VALUES = [
|
|
|
23372
23733
|
"selectedSlidingAmountInput",
|
|
23373
23734
|
"selectedCollectionOptionKind",
|
|
23374
23735
|
"selectedAppointmentPackageId",
|
|
23736
|
+
"packagePurchase",
|
|
23375
23737
|
"mailingListOptIn"
|
|
23376
23738
|
];
|
|
23377
23739
|
const BOOKING_FORM_DATA_RESERVED_KEYS = new Set(BOOKING_FORM_DATA_RESERVED_KEY_VALUES);
|
|
@@ -23878,16 +24240,6 @@ function readOptionalString(value) {
|
|
|
23878
24240
|
function readOptionalNumber(value) {
|
|
23879
24241
|
return typeof value === "number" && Number.isFinite(value) ? value : void 0;
|
|
23880
24242
|
}
|
|
23881
|
-
function getBookingServiceSlidingScale(service) {
|
|
23882
|
-
const pricing = service?.pricing;
|
|
23883
|
-
if (!pricing || pricing.pricingStrategy !== "sliding_scale" || pricing.slidingMinAmount === null || pricing.slidingMinAmount === void 0 || pricing.slidingMaxAmount === null || pricing.slidingMaxAmount === void 0) return null;
|
|
23884
|
-
return {
|
|
23885
|
-
minAmount: pricing.slidingMinAmount,
|
|
23886
|
-
maxAmount: pricing.slidingMaxAmount,
|
|
23887
|
-
suggestedAmount: pricing.slidingSuggestedAmount ?? null,
|
|
23888
|
-
currency: pricing.currency
|
|
23889
|
-
};
|
|
23890
|
-
}
|
|
23891
24243
|
function parseBookingCurrencyInputToCents(value) {
|
|
23892
24244
|
const trimmed = value?.trim() ?? "";
|
|
23893
24245
|
if (!trimmed) return null;
|
|
@@ -23926,15 +24278,11 @@ function resolveBookingSelectedService(input) {
|
|
|
23926
24278
|
/** One resolved choice set drives step visibility, selection and submission. */
|
|
23927
24279
|
function resolveBookingPaymentStep(input) {
|
|
23928
24280
|
const service = resolveBookingSelectedService(input);
|
|
23929
|
-
if (!service) return
|
|
23930
|
-
|
|
23931
|
-
|
|
23932
|
-
service: null,
|
|
23933
|
-
errorMessage: "Payment options are unavailable for the selected service right now."
|
|
23934
|
-
} : {
|
|
23935
|
-
kind: "unselected",
|
|
24281
|
+
if (!service) return resolveMissingBookingPaymentStep(input);
|
|
24282
|
+
if (service.onlinePaymentChoices?.perSession === false) return {
|
|
24283
|
+
kind: "not_required",
|
|
23936
24284
|
mode: "hidden",
|
|
23937
|
-
service
|
|
24285
|
+
service
|
|
23938
24286
|
};
|
|
23939
24287
|
const totalCents = resolveBookingServiceTotalCents(service, input.data);
|
|
23940
24288
|
if (totalCents <= 0) return {
|
|
@@ -23997,6 +24345,16 @@ function prepareBookingSubmission(input) {
|
|
|
23997
24345
|
customerPassId
|
|
23998
24346
|
}
|
|
23999
24347
|
};
|
|
24348
|
+
if (input.data.packagePurchase?.kind === "selected") return {
|
|
24349
|
+
ok: true,
|
|
24350
|
+
value: {
|
|
24351
|
+
...common,
|
|
24352
|
+
kind: "package_purchase",
|
|
24353
|
+
purchasePassId: input.data.packagePurchase.package.id,
|
|
24354
|
+
discountCode: toTrimmedString(input.data.discountCode),
|
|
24355
|
+
shownTerms: input.shownTerms ?? bookingPackagePurchaseTerms(input.data.packagePurchase.package, input.promisedDiscountId)
|
|
24356
|
+
}
|
|
24357
|
+
};
|
|
24000
24358
|
const payment = prepareStandardBookingPayment(input, service);
|
|
24001
24359
|
return payment.ok ? {
|
|
24002
24360
|
ok: true,
|
|
@@ -24052,6 +24410,14 @@ function buildBookingSubmissionCommon(input, service, startAt) {
|
|
|
24052
24410
|
};
|
|
24053
24411
|
}
|
|
24054
24412
|
function prepareStandardBookingPayment(input, service) {
|
|
24413
|
+
if (service.onlinePaymentChoices?.perSession === false) return {
|
|
24414
|
+
ok: false,
|
|
24415
|
+
error: {
|
|
24416
|
+
tag: "payment-option-required",
|
|
24417
|
+
serviceId: service.id,
|
|
24418
|
+
serviceTitle: service.title
|
|
24419
|
+
}
|
|
24420
|
+
};
|
|
24055
24421
|
const amount = validateBookingSlidingSelection(service, input.data);
|
|
24056
24422
|
if (!amount.ok) return amount;
|
|
24057
24423
|
const payment = resolveBookingPaymentStep(input);
|
|
@@ -24201,6 +24567,18 @@ function snapshotBookingShownTerms(payment, promisedDiscountId) {
|
|
|
24201
24567
|
promisedDiscountId
|
|
24202
24568
|
};
|
|
24203
24569
|
}
|
|
24570
|
+
function resolveMissingBookingPaymentStep(input) {
|
|
24571
|
+
return input.services.length === 0 || resolveRequestedBookingServiceId(input) ? {
|
|
24572
|
+
kind: "unavailable",
|
|
24573
|
+
mode: "unsupported",
|
|
24574
|
+
service: null,
|
|
24575
|
+
errorMessage: "Payment options are unavailable for the selected service right now."
|
|
24576
|
+
} : {
|
|
24577
|
+
kind: "unselected",
|
|
24578
|
+
mode: "hidden",
|
|
24579
|
+
service: null
|
|
24580
|
+
};
|
|
24581
|
+
}
|
|
24204
24582
|
//#endregion
|
|
24205
24583
|
//#region ../blocks/src/system/runtime/nodes/booking-form.service-categories.ts
|
|
24206
24584
|
function isRecord$1(value) {
|
|
@@ -24360,6 +24738,7 @@ const bookingSourceSchema = z.object({
|
|
|
24360
24738
|
demoEmailSuppressed: z.boolean().optional(),
|
|
24361
24739
|
mailingList: bookingMailingListContextSchema.optional(),
|
|
24362
24740
|
siteTerms: blockSiteTermsSchema.optional(),
|
|
24741
|
+
pageNavigation: pageNavigationSchema.optional(),
|
|
24363
24742
|
siteName: z.string().optional(),
|
|
24364
24743
|
siteId: z.string().optional(),
|
|
24365
24744
|
apiBaseUrl: z.string().optional(),
|
|
@@ -24394,6 +24773,7 @@ const bookingHydrationSchema = z.object({
|
|
|
24394
24773
|
demoEmailSuppressed: z.boolean().optional(),
|
|
24395
24774
|
mailingList: bookingMailingListContextSchema.optional(),
|
|
24396
24775
|
siteTerms: blockSiteTermsSchema.optional(),
|
|
24776
|
+
pageNavigation: pageNavigationSchema.optional(),
|
|
24397
24777
|
siteName: z.string().optional(),
|
|
24398
24778
|
formId: z.string().nullable(),
|
|
24399
24779
|
serviceId: z.string().nullable(),
|
|
@@ -24446,6 +24826,7 @@ const bookingFormBlockRuntime = defineClientOwnedBlockRuntime({
|
|
|
24446
24826
|
demoEmailSuppressed: source.demoEmailSuppressed,
|
|
24447
24827
|
mailingList: source.mailingList,
|
|
24448
24828
|
siteTerms: source.siteTerms,
|
|
24829
|
+
pageNavigation: source.pageNavigation,
|
|
24449
24830
|
siteName: source.siteName,
|
|
24450
24831
|
formId: form?.id ?? source.formId ?? null,
|
|
24451
24832
|
serviceId: source.serviceId ?? form?.settings?.serviceId ?? null,
|
|
@@ -27355,6 +27736,28 @@ function getTicketSelectionRemainingPlaces(input) {
|
|
|
27355
27736
|
if (availability && "remainingPlaces" in availability) return availability.remainingPlaces ?? null;
|
|
27356
27737
|
return input.event ? getEventAvailability(selectEventCapacitySource(input.event, input.attendanceMode)).available : null;
|
|
27357
27738
|
}
|
|
27739
|
+
/** Keep the card and ticket step on the same fresh capacity as admission. */
|
|
27740
|
+
function withRegistrationAvailability(event, eligibility, attendanceMode) {
|
|
27741
|
+
const availability = eligibility?.availability;
|
|
27742
|
+
if (!event || !availability || !("remainingPlaces" in availability)) return event;
|
|
27743
|
+
const mode = attendanceMode ?? (event.deliveryMode === "hybrid" ? null : event.deliveryMode ?? "in_person");
|
|
27744
|
+
if (!mode) return event;
|
|
27745
|
+
const source = selectEventCapacitySource(event, mode);
|
|
27746
|
+
const remaining = availability.remainingPlaces ?? null;
|
|
27747
|
+
const refreshed = {
|
|
27748
|
+
capacity: remaining === null ? null : source.capacity ?? remaining,
|
|
27749
|
+
availableSpots: remaining,
|
|
27750
|
+
waitlistEnabled: availability.waitlistEnabled
|
|
27751
|
+
};
|
|
27752
|
+
return {
|
|
27753
|
+
...event,
|
|
27754
|
+
...event.deliveryMode === "hybrid" ? {} : refreshed,
|
|
27755
|
+
attendanceModes: event.attendanceModes?.map((row) => row.mode === mode ? {
|
|
27756
|
+
...row,
|
|
27757
|
+
...refreshed
|
|
27758
|
+
} : row)
|
|
27759
|
+
};
|
|
27760
|
+
}
|
|
27358
27761
|
function resolveHeldTicketPlaces(current, invitation, paymentHold) {
|
|
27359
27762
|
return getHeldPlacesBySelection(current, invitation.kind === "ready" ? {
|
|
27360
27763
|
selectionId: invitation.restoration.event?.selectionId ?? current.selectionId,
|
|
@@ -29143,4 +29546,426 @@ function registrationStepLabel(step, context) {
|
|
|
29143
29546
|
}
|
|
29144
29547
|
}
|
|
29145
29548
|
//#endregion
|
|
29146
|
-
export { getEligibilityFlowFlags as $, parseSiteId as $a, featureCardCompositionTreatmentValues as $i, getShopSuccessCopy as $n, resolveEventRegistrationScopedEvents as $r, registrationDisplaySchema as $t, isEventRegistrationAvailable as A, isRecord$4 as Aa, generateEffectsCSS as Ai, resolveRuntimeEventDestination as An, calendarTabViewsSchema as Ar, getTicketLineQuantity as At, paymentChoiceDetails as B, parseBrevoListId as Ba, transitionCatalogueEntries as Bi, selectEventCapacitySource as Bn, BLOCK_BUTTON_ROLE_OPTIONS as Br, EVENT_SIGN_IN_FORM_ID as Bt, resolveGuestNextStepCheck as C, siteChromeBackgroundOverrideOwner as Ca, resolveCardRole as Ci, formatEventDateParts as Cn, needsBookingQuestionsRefresh as Cr, getVisibleTicketTypes as Ct, settledRemainingPlaces as D, makeBoundaryId as Da, getNavLinkPreset as Di, formatTime$1 as Dn, BOOKING_FORM_DATA_RESERVED_KEYS as Dr, formatPrice as Dt, resolveRegistrationTicketContinuation as E, asSiteStyleId as Ea, footerForegroundCandidates as Ei, formatEventTimeRange as En, toBookingQuestionsPaymentSnapshot as Er, withOccurrenceTitle as Et, toHeadlessPaymentSelection as F, resolveWholeSeriesRunLifecycle as Fa, sectionShapeForGround as Fi, formatTotalCapacity as Fn, eventLayoutSchema as Fr, setTicketLineQuantity as Ft, resolveRegistrationTarget as G, formatEventPricing as Ga, sectionForegroundBackground as Gi, readOverrideServiceCategories as Gn, browserReadAuthoritySchema as Gr, clearSignInReturnDrafts as Gt, findPreSelectedEvent as H, parseMailchimpInterestId as Ha, deriveSectionGround as Hi, groupPublicEventsByRun as Hn, isBlockButtonRole as Hr, eventSignInEnds as Ht, toInternalPaymentSelection as I, parseMailingListRuntimeContext as Ia, sectionShapeFromContent as Ii, getEventAvailability as In, filterAutoShowSchema as Ir, getRegistrationStartAt as It, beginWaitlistInvitation as J, publicEventPricingDisplay as Ja, themeV2CompilerOwnedFieldNames as Ji, formatBookingSubmissionPreparationError as Jn, buildInteractiveIslandProps as Jr, nextSignInReturnExpiry as Jt, resolveRouteRequiresPayment as K, isPublicEventPricingOptionDisplayable as Ka, sectionSurfaceBase as Ki, deriveBookingFormViewState as Kn, createHostedBlockApiConfig as Kr, createSignInReturnDraftStore as Kt, calculateEventRegistrationPreviewTotal as L, resolveBookingSignupOffer as La, sectionShapeHook as Li, getEventAvailabilityStatus as Ln, previewStageSchema as Lr, toRegistrationEvents as Lt, resolveEventRegistrationSubmitPlan as M, nextLiveRunSessionStartMs as Ma, navLinkHoverColorCandidate as Mi, canJoinEventWaitlistOnAnyMode as Mn, eventButtonVariantSchema as Mr, getTicketTypeLineMax as Mt, resolveHeadlessEventRegistrationStatus as N, orderedLiveRunSessions as Na, navLinkOwnsHoverForeground as Ni, formatEventRemainingPlaces as Nn, eventCalendarDefaultViewSchema as Nr, hasValidPricingOptionSelection as Nt, visitorHoldsOwnPlace as O, sanitizeHref as Oa, buildTextContrastShadow as Oi, groupEventsByDate as On, BOOKING_FORM_DATA_RESERVED_KEY_VALUES as Or, canRequestTicketOption as Ot, resolveHeadlessEventRegistrationView as P, resolveWholeSeriesBookingPhase as Pa, navLinkOwnsUnderline as Pi, formatRemainingPlaces as Pn, eventCalendarDisplayModeSchema as Pr, normalizeTicketSelectionLines as Pt, getCurrentTicketSelection as Q, resolvePricingOptionsPriceDisplay as Qa, defineFrameCapability as Qi, getRegistrationSuccessCopy as Qn, normalizeEventRegistrationPageSurfaceSubject as Qr, placesLeftLabel as Qt, buildBookingPaymentSelectionViewModel as R, DEFAULT_MAILING_LIST_PRIVACY_NOTE as Ra, boundaryRuntimeMetricsForDecorativeTransition as Ri, getRemainingPlaces as Rn, registrationButtonVariantSchema as Rr, toWholeSeriesRegistrationEvent as Rt, planRegistrationDetailsContinuation as S, surfaceCardRoleValues as Sa, compiledRuntimeStyleFieldNames as Si, formatEventCompactDateRail as Sn, deriveBookingQuestions as Sr, getTicketTypeAvailabilityLabel as St, resolveRegistrationAvailabilityBlocker as T, asLayoutVariantKey as Ta, generateFooterCss as Ti, formatEventNextDateFact as Tn, toBookingQuestionsAnswerDraft as Tr, transformRegistrationOptionsResponse as Tt, resolveDiscountContext as U, parseNewsletterListId as Ua, parseCanonicalRuntimeBackground as Ui, bookingFormInteractiveIslandPropsCodec as Un, readRuntimeNow as Ur, eventSignInRestoration as Ut, paymentChoicePrice as V, parseMailchimpAudienceId as Va, applyLookPhotoTreatment as Vi, selectMostOpenCapacitySource as Vn, blockButtonRoleSchema as Vr, eventSignInDraftStore as Vt, resolveEventRequiresPayment as W, formatBookingPriceDisplay as Wa, resolveSectionBackground as Wi, buildBookingFormInteractiveIslandProps as Wn, resolveDateRuntimeContext as Wr, toEventSignInDraft as Wt, invitationSubmission as X, publicEventPricingType as Xa, assertNever as Xi, getBookingServiceSlidingScale as Xn, defineInteractiveIslandMetaKeys as Xr, signInReturnPath as Xt, createRegistrationDraftData as Y, publicEventPricingStrategy as Ya, resolveEffectiveKnobs as Yi, getBookingRedirectStateFromLocation as Yn, createInteractiveIslandCodec as Yr, readSignInReturn as Yt, formatCentsAsCurrencyInput as Z, resolveExactOrFreePriceDisplay as Za, defineBlockDesignCapability as Zi, getBookingSuccessCopy as Zn, eventRegistrationPageSurfaceSubjectSchema as Zr, sweepExpiredSignInReturnDrafts as Zt, shouldPromptForLogin as _, cardRoleSchema as _a, resolveEffectiveArrangement as _i, eventDateOptions as _n, isAppointmentBookingQuestionsEvent as _r, formatPassCreditUsageLabel as _t, registrationPresentation as a, cardListKnobBlocks as aa, listLookControl as ai, computeMediaTransformStyle as an, resolveAppointmentCheckoutVerificationState as ar, resolveHeldTicketPlaces as at, placeCountCeiling as b, itemRoleValues as ba, deriveSiteStyleBlockPolicy as bi, formatDate$1 as bn, bookingQuestionsPaymentSnapshotSchema as br, getImplicitSingleTicketType as bt, registrationStepLabelContext as c, selectLogoVariant as ca, resolvedItemSurfaceProps as ci, renderVideo as cn, resolveDefaultBookingServiceId as cr, validateFormData as ct, decideEventChoice as d, TokenResolver as da, resolveLookSurfacePresentation as di, resolveImageUrlWithContext as dn, projectSelectedAppointmentConsentIntoForm as dr, ENTITLEMENT_SINGLE_TICKET_TOOLTIP as dt, introCompositionTreatmentValues as ea, createZodCodec as ei, resolveRegistrationDisplay as en, unsafeAsSiteId as eo, isBookingServiceSlidingAmountInRange as er, getRegistrationOccurrenceId as et, getDeclinedPass as f, boxBackgroundOverlaySchema as fa, selectItemSurfacePresentation as fi, resolveMediaNodeResponsiveImage as fn, resolveSelectedAppointmentConsent as fr, areEntitlementsDisabledForTicketCount as ft, decideEventRegistrationPayment as g, boxlessCardVariantValue as ga, readStoredMode as gi, eventDateLocale as gn, deriveAppointmentBookingQuestions as gr, formatEventDateTime as gt, buildEventRegistrationPaymentOptionsViewModel as h, tokenOrCssColorValueSchema as ha, arrangementManifestFromVariants as hi, eventCalendarWeekStart as hn, appointmentQuestionsRefusal as hr, formatDate as ht, registrationPaymentRoute as i, cardListFamilyBlocks as ia, listItemPresentation as ii, MediaPlaceholder as in, prepareBookingSubmission as ir, parseCurrencyInputToCents as it, normalizeEventRegistrationMaxTickets as j, CANCELLED_SESSION_STATUS as ja, generateInteractiveChildInheritanceCSS as ji, canJoinEventWaitlist as jn, columnOptionSchema as jr, getTicketSelectionTotal as jt, deriveEventRegistrationSteps as k, parseAspectRatioValue as ka, generateNavLinkCSS as ki, resolveEventTimeZone as kn, bookingNowSchema as kr, getSingleSelectedPricingOptionId as kt, areEventRegistrationPaymentSelectionsEqual as l, surfaceToneFromForegroundToken as la, itemRole as li, resolveImageSourceSetWithContext as ln, selectedBookingCollectionOptionKind as lr, confirmationPaymentRows as lt, registrationFlowReducer as m, runtimeBoxBackgroundSchema as ma, arrangementLookHooks as mi, buildCalendarViewport as mn, applyAppointmentBookingQuestionsEvent as mr, formatBookingWhen as mt, getEventSelectionMode as n, testimonialsCompositionTreatmentValues as na, defineProgressiveBlockRuntime as ni, RichText as nn, normalizeBookingServices as nr, getSlidingScaleSelectionMessage as nt, registrationRoute as o, opaqueSurfaceContextFromTheme as oa, listLookSlot as oi, mediaImageHostProps as on, resolveBookingPaymentStep as or, shouldLoadRegistrationOptions as ot, isRegistrationLocked as p, boxBackgroundSchema as pa, arrangementAppearancePresets as pi, resolvePublicMediaUrl as pn, EMPTY_APPOINTMENT_BOOKING_QUESTIONS as pr, findSelectedTicketType as pt, toRegistrationRequestSubject as q, publicEventPricingCurrency as qa, stripStaleTransitionStyleGroup as qi, formatBookingCentsAsCurrencyInput as qn, getBlockApiReadStage as qr, decideSignInReturn as qt, panelShouldOpen as r, toNonEmptyReadonlyArray as ra, isDecodeSuccess as ri, ImagePresets as rn, parseBookingCurrencyInputToCents as rr, getTicketSelectionRemainingPlaces as rt, registrationStepLabel as s, opaqueSurfaceDeclarations as sa, lookListPresentationSchemaShape as si, renderAudio as sn, resolveBookingSiteId as sr, registrationQuestionsMessage as st, REGISTRATION_STEP_LABELS as t, offeringsPreviewCompositionTreatmentValues as ta, defineClientOwnedBlockRuntime as ti, shownVenue as tn, parseEventSeriesId as to, normalizeBookingFormConfig as tr, getSlidingScaleForEvent as tt, createInitialRegistrationFlowState as u, arrangementSlotNames as ua, lookPresentationOnPalette as ui, resolveImageUrl as un, toSelectedCollectionOptionKind as ur, resolveFinishedPresentation as ut, fullyBookedLabel as v, cardSystemSchema as va, resolveModeArrangement as vi, eventLocalDateKey as vn, needsAppointmentQuestionsRefresh as vr, formatRegistrationSchedule as vt, resolveRegistrationAdmission as w, asDesignBlockId as wa, generateDefaultCardSystem as wi, formatEventHourLabel as wn, restoreBookingQuestionsAnswers as wr, occurrenceTitleOverride as wt, planRegistrationDetailsCheck as x, openCardRoleValue as xa, requireCuratedSiteStyle as xi, formatEventClockLabel as xn, decideBookingQuestionsRestoration as xr, getPortalSubjectEmail as xt, getTicketSelectionPurpose as y, cardVariantRoleValues as ya, resolvePublishedLook as yi, formatCalendarTitle as yn, bookingQuestionsAnswerDraftSchema as yr, formatTime as yt, buildReviewedBookingPaymentViewModel as z, DEFAULT_MAILING_LIST_SUCCESS_MESSAGE as za, anglePolygonCss as zi, isEventFull as zn, weekStartSchema as zr, toWholeSeriesRegistrationEvents as zt };
|
|
29549
|
+
//#region ../blocks/src/system/runtime/nodes/shop-commerce.shared.ts
|
|
29550
|
+
const EMPTY_COMMERCE_CART_STATE = { items: [] };
|
|
29551
|
+
const storedProductCartItemSchema = z.object({
|
|
29552
|
+
kind: z.literal("product"),
|
|
29553
|
+
productId: z.string().min(1),
|
|
29554
|
+
productCategoryId: z.string().min(1).optional().nullable(),
|
|
29555
|
+
variantId: z.string().min(1).optional().nullable(),
|
|
29556
|
+
title: z.string().min(1),
|
|
29557
|
+
variantTitle: z.string().optional().nullable(),
|
|
29558
|
+
quantity: z.number().finite(),
|
|
29559
|
+
unitPriceCents: z.number().finite(),
|
|
29560
|
+
currency: z.string().min(1),
|
|
29561
|
+
imageUrl: z.string().optional().nullable(),
|
|
29562
|
+
soldOut: z.boolean().optional()
|
|
29563
|
+
});
|
|
29564
|
+
const storedPassCartItemSchema = z.object({
|
|
29565
|
+
kind: z.literal("pass"),
|
|
29566
|
+
passId: z.string().min(1),
|
|
29567
|
+
title: z.string().min(1),
|
|
29568
|
+
teamMember: z.object({
|
|
29569
|
+
id: z.string().min(1),
|
|
29570
|
+
name: z.string().min(1)
|
|
29571
|
+
}).optional(),
|
|
29572
|
+
quantity: z.number().finite().optional(),
|
|
29573
|
+
unitPriceCents: z.number().finite(),
|
|
29574
|
+
currency: z.string().min(1)
|
|
29575
|
+
});
|
|
29576
|
+
function toPositiveInteger(value) {
|
|
29577
|
+
return Math.max(1, Math.floor(value));
|
|
29578
|
+
}
|
|
29579
|
+
function productItemKey(productId, variantId) {
|
|
29580
|
+
return `product:${productId}:${variantId ?? "base"}`;
|
|
29581
|
+
}
|
|
29582
|
+
function passItemKey(passId, teamMemberId) {
|
|
29583
|
+
return teamMemberId ? `pass:${passId}:${teamMemberId}` : `pass:${passId}`;
|
|
29584
|
+
}
|
|
29585
|
+
function parseStoredCartItem(value) {
|
|
29586
|
+
const productResult = storedProductCartItemSchema.safeParse(value);
|
|
29587
|
+
if (productResult.success) {
|
|
29588
|
+
const item = productResult.data;
|
|
29589
|
+
return {
|
|
29590
|
+
key: productItemKey(item.productId, item.variantId),
|
|
29591
|
+
kind: "product",
|
|
29592
|
+
productId: item.productId,
|
|
29593
|
+
productCategoryId: item.productCategoryId ?? null,
|
|
29594
|
+
...item.variantId ? { variantId: item.variantId } : {},
|
|
29595
|
+
title: item.title,
|
|
29596
|
+
variantTitle: item.variantTitle ?? null,
|
|
29597
|
+
quantity: toPositiveInteger(item.quantity),
|
|
29598
|
+
unitPriceCents: Math.max(0, Math.round(item.unitPriceCents)),
|
|
29599
|
+
currency: item.currency,
|
|
29600
|
+
imageUrl: item.imageUrl ?? null,
|
|
29601
|
+
soldOut: item.soldOut ?? false
|
|
29602
|
+
};
|
|
29603
|
+
}
|
|
29604
|
+
const passResult = storedPassCartItemSchema.safeParse(value);
|
|
29605
|
+
if (passResult.success) {
|
|
29606
|
+
const item = passResult.data;
|
|
29607
|
+
return {
|
|
29608
|
+
key: passItemKey(item.passId, item.teamMember?.id),
|
|
29609
|
+
kind: "pass",
|
|
29610
|
+
passId: item.passId,
|
|
29611
|
+
title: item.title,
|
|
29612
|
+
...item.teamMember ? { teamMember: item.teamMember } : {},
|
|
29613
|
+
quantity: 1,
|
|
29614
|
+
unitPriceCents: Math.max(0, Math.round(item.unitPriceCents)),
|
|
29615
|
+
currency: item.currency
|
|
29616
|
+
};
|
|
29617
|
+
}
|
|
29618
|
+
return null;
|
|
29619
|
+
}
|
|
29620
|
+
function parseStoredCommerceCartState(raw) {
|
|
29621
|
+
if (!raw) return EMPTY_COMMERCE_CART_STATE;
|
|
29622
|
+
try {
|
|
29623
|
+
const parsed = JSON.parse(raw);
|
|
29624
|
+
if (!Array.isArray(parsed.items)) return EMPTY_COMMERCE_CART_STATE;
|
|
29625
|
+
return { items: parsed.items.map((item) => parseStoredCartItem(item)).filter((item) => item !== null) };
|
|
29626
|
+
} catch {
|
|
29627
|
+
return EMPTY_COMMERCE_CART_STATE;
|
|
29628
|
+
}
|
|
29629
|
+
}
|
|
29630
|
+
function buildProductCartItem(input) {
|
|
29631
|
+
const variant = input.variantId ? input.product.variants.find((candidate) => candidate.id === input.variantId) ?? null : null;
|
|
29632
|
+
return {
|
|
29633
|
+
key: productItemKey(input.product.id, variant?.id ?? null),
|
|
29634
|
+
kind: "product",
|
|
29635
|
+
productId: input.product.id,
|
|
29636
|
+
productCategoryId: input.product.category?.id ?? null,
|
|
29637
|
+
...variant?.id ? { variantId: variant.id } : {},
|
|
29638
|
+
title: input.product.title,
|
|
29639
|
+
variantTitle: variant?.title ?? null,
|
|
29640
|
+
quantity: toPositiveInteger(input.quantity ?? 1),
|
|
29641
|
+
unitPriceCents: variant?.priceCents ?? input.product.priceCents,
|
|
29642
|
+
currency: input.product.currency,
|
|
29643
|
+
imageUrl: input.product.gallery[0]?.url ?? null,
|
|
29644
|
+
soldOut: variant?.soldOut ?? input.product.soldOut
|
|
29645
|
+
};
|
|
29646
|
+
}
|
|
29647
|
+
function buildPassCartItem(input) {
|
|
29648
|
+
return {
|
|
29649
|
+
key: passItemKey(input.passId, input.teamMember?.id),
|
|
29650
|
+
kind: "pass",
|
|
29651
|
+
passId: input.passId,
|
|
29652
|
+
title: input.title,
|
|
29653
|
+
...input.teamMember ? { teamMember: input.teamMember } : {},
|
|
29654
|
+
quantity: 1,
|
|
29655
|
+
unitPriceCents: Math.max(0, Math.round(input.unitPriceCents)),
|
|
29656
|
+
currency: input.currency
|
|
29657
|
+
};
|
|
29658
|
+
}
|
|
29659
|
+
function reduceCommerceCart(state, action) {
|
|
29660
|
+
switch (action.type) {
|
|
29661
|
+
case "add_product": {
|
|
29662
|
+
const existing = state.items.find((item) => item.key === action.item.key);
|
|
29663
|
+
if (!existing || existing.kind !== "product") return { items: [...state.items, action.item] };
|
|
29664
|
+
return { items: state.items.map((item) => item.key === action.item.key && item.kind === "product" ? {
|
|
29665
|
+
...item,
|
|
29666
|
+
quantity: item.quantity + action.item.quantity,
|
|
29667
|
+
soldOut: action.item.soldOut ?? item.soldOut
|
|
29668
|
+
} : item) };
|
|
29669
|
+
}
|
|
29670
|
+
case "add_pass":
|
|
29671
|
+
if (state.items.some((item) => item.key === action.item.key)) return state;
|
|
29672
|
+
return { items: [...state.items, action.item] };
|
|
29673
|
+
case "update_quantity": return { items: state.items.map((item) => item.key === action.itemKey && item.kind === "product" ? {
|
|
29674
|
+
...item,
|
|
29675
|
+
quantity: toPositiveInteger(action.quantity)
|
|
29676
|
+
} : item) };
|
|
29677
|
+
case "remove_item": return { items: state.items.filter((item) => item.key !== action.itemKey) };
|
|
29678
|
+
case "clear": return EMPTY_COMMERCE_CART_STATE;
|
|
29679
|
+
}
|
|
29680
|
+
}
|
|
29681
|
+
function deriveCommerceCheckoutState(state) {
|
|
29682
|
+
if (state.items.length === 0) return { kind: "empty" };
|
|
29683
|
+
const currencies = Array.from(new Set(state.items.map((item) => item.currency.toUpperCase())));
|
|
29684
|
+
if (currencies.length > 1) return {
|
|
29685
|
+
kind: "blocked",
|
|
29686
|
+
reason: "mixed_currency"
|
|
29687
|
+
};
|
|
29688
|
+
return {
|
|
29689
|
+
kind: "ready",
|
|
29690
|
+
currency: currencies[0] ?? "USD",
|
|
29691
|
+
subtotalCents: state.items.reduce((sum, item) => sum + item.unitPriceCents * item.quantity, 0),
|
|
29692
|
+
items: state.items
|
|
29693
|
+
};
|
|
29694
|
+
}
|
|
29695
|
+
function resolveSelectedProduct(products, selection) {
|
|
29696
|
+
const contentEntry = selection.template.kind === "product" ? selection.contentEntry : null;
|
|
29697
|
+
const explicitSlug = selection.productSlug?.trim() || null;
|
|
29698
|
+
if (contentEntry?.id) {
|
|
29699
|
+
const byEntryId = products.find((product) => product.contentEntryId === contentEntry.id);
|
|
29700
|
+
if (byEntryId) return byEntryId;
|
|
29701
|
+
}
|
|
29702
|
+
if (explicitSlug) {
|
|
29703
|
+
const byExplicitSlug = products.find((product) => product.slug === explicitSlug);
|
|
29704
|
+
if (byExplicitSlug) return byExplicitSlug;
|
|
29705
|
+
}
|
|
29706
|
+
if (contentEntry?.slug) {
|
|
29707
|
+
const byEntrySlug = products.find((product) => product.slug === contentEntry.slug);
|
|
29708
|
+
if (byEntrySlug) return byEntrySlug;
|
|
29709
|
+
}
|
|
29710
|
+
return null;
|
|
29711
|
+
}
|
|
29712
|
+
//#endregion
|
|
29713
|
+
//#region ../blocks/src/system/runtime/nodes/commerce/shared/display.ts
|
|
29714
|
+
function formatCommercePrice(cents, currency) {
|
|
29715
|
+
return formatCurrencyAmount(cents, currency);
|
|
29716
|
+
}
|
|
29717
|
+
function getPassesHeading(passes, explicitHeading) {
|
|
29718
|
+
if (explicitHeading) return explicitHeading;
|
|
29719
|
+
return deriveCreditProductLabels(passes, { style: "class" }).heading;
|
|
29720
|
+
}
|
|
29721
|
+
function resolveSelectedVariant(product, selectedVariantId) {
|
|
29722
|
+
if (!selectedVariantId) return product.variants[0] ?? null;
|
|
29723
|
+
return product.variants.find((candidate) => candidate.id === selectedVariantId) ?? product.variants[0] ?? null;
|
|
29724
|
+
}
|
|
29725
|
+
function buildProductCardDisplay(product, options, selectedVariantId) {
|
|
29726
|
+
const selectedVariant = resolveSelectedVariant(product, selectedVariantId);
|
|
29727
|
+
const soldOut = selectedVariant?.soldOut ?? product.soldOut;
|
|
29728
|
+
const priceLabel = options.showPrices ? formatCommercePrice(selectedVariant?.priceCents ?? product.priceCents, product.currency) : null;
|
|
29729
|
+
const selectionLabel = selectedVariant ? `${product.title} – ${selectedVariant.title}` : product.title;
|
|
29730
|
+
return {
|
|
29731
|
+
productId: product.id,
|
|
29732
|
+
title: product.title,
|
|
29733
|
+
path: product.path ?? null,
|
|
29734
|
+
summary: options.showSummary ? product.summary : null,
|
|
29735
|
+
priceLabel,
|
|
29736
|
+
image: product.gallery[0] ? {
|
|
29737
|
+
url: product.gallery[0].url,
|
|
29738
|
+
alt: product.gallery[0].alt ?? null
|
|
29739
|
+
} : null,
|
|
29740
|
+
variantOptions: product.variants.map((variant) => ({
|
|
29741
|
+
id: variant.id,
|
|
29742
|
+
label: variant.title,
|
|
29743
|
+
soldOut: variant.soldOut
|
|
29744
|
+
})),
|
|
29745
|
+
selectedVariantId: selectedVariant?.id ?? null,
|
|
29746
|
+
selectionLabel,
|
|
29747
|
+
actionLabel: options.addButtonText,
|
|
29748
|
+
soldOut
|
|
29749
|
+
};
|
|
29750
|
+
}
|
|
29751
|
+
function buildProductListDisplay(products, options) {
|
|
29752
|
+
const cards = products.map((product) => buildProductCardDisplay(product, options));
|
|
29753
|
+
return {
|
|
29754
|
+
kind: "product-list",
|
|
29755
|
+
state: cards.length === 0 ? "empty" : "ready",
|
|
29756
|
+
heading: options.heading ?? null,
|
|
29757
|
+
className: options.className ?? null,
|
|
29758
|
+
layout: options.layout ?? "grid",
|
|
29759
|
+
columns: options.columns ?? "3",
|
|
29760
|
+
emptyMessage: options.emptyMessage ?? "No products available right now.",
|
|
29761
|
+
cards
|
|
29762
|
+
};
|
|
29763
|
+
}
|
|
29764
|
+
function buildProductDetailDisplay(product, options, selectedVariantId) {
|
|
29765
|
+
if (!product) return {
|
|
29766
|
+
kind: "product-detail",
|
|
29767
|
+
state: "empty",
|
|
29768
|
+
heading: options.heading ?? null,
|
|
29769
|
+
className: options.className ?? null,
|
|
29770
|
+
emptyMessage: options.emptyMessage ?? "Product unavailable."
|
|
29771
|
+
};
|
|
29772
|
+
const selectedVariant = resolveSelectedVariant(product, selectedVariantId);
|
|
29773
|
+
const soldOut = selectedVariant?.soldOut ?? product.soldOut;
|
|
29774
|
+
return {
|
|
29775
|
+
kind: "product-detail",
|
|
29776
|
+
state: "ready",
|
|
29777
|
+
heading: options.heading ?? null,
|
|
29778
|
+
className: options.className ?? null,
|
|
29779
|
+
title: product.title,
|
|
29780
|
+
priceLabel: formatCommercePrice(selectedVariant?.priceCents ?? product.priceCents, product.currency),
|
|
29781
|
+
summary: options.showSummary ? product.summary : null,
|
|
29782
|
+
categoryLabel: product.category?.name ?? null,
|
|
29783
|
+
gallery: product.gallery.map((image) => ({
|
|
29784
|
+
url: image.url,
|
|
29785
|
+
alt: image.alt ?? null
|
|
29786
|
+
})),
|
|
29787
|
+
variantOptions: product.variants.map((variant) => ({
|
|
29788
|
+
id: variant.id,
|
|
29789
|
+
label: variant.title,
|
|
29790
|
+
soldOut: variant.soldOut
|
|
29791
|
+
})),
|
|
29792
|
+
selectedVariantId: selectedVariant?.id ?? null,
|
|
29793
|
+
selectionLabel: selectedVariant ? `${product.title} – ${selectedVariant.title}` : product.title,
|
|
29794
|
+
actionLabel: options.addButtonText,
|
|
29795
|
+
soldOut,
|
|
29796
|
+
body: product.body
|
|
29797
|
+
};
|
|
29798
|
+
}
|
|
29799
|
+
function passCardDisplay(pass, options) {
|
|
29800
|
+
const creditUnit = getCreditProductCreditUnit(pass.productUseCase);
|
|
29801
|
+
return {
|
|
29802
|
+
id: pass.id,
|
|
29803
|
+
title: pass.name,
|
|
29804
|
+
description: options.showDescriptions ? pass.description : null,
|
|
29805
|
+
priceLabel: formatCommercePrice(pass.price, pass.currency),
|
|
29806
|
+
...options.cardList ? {
|
|
29807
|
+
priceAmountLabel: formatCurrencyAmount(pass.price, pass.currency, { decimals: "auto" }),
|
|
29808
|
+
perCreditAmountLabel: options.showPricePerCredit ? `${formatCurrencyAmount(pass.pricePerCredit, pass.currency, { decimals: "auto" })} a ${creditUnit.perCreditSuffix}` : null
|
|
29809
|
+
} : {},
|
|
29810
|
+
creditsLabel: `${pass.creditsTotal} ${pass.creditsTotal === 1 ? creditUnit.singular : creditUnit.plural}`,
|
|
29811
|
+
perCreditLabel: options.showPricePerCredit ? `${formatCommercePrice(pass.pricePerCredit, pass.currency)}/${creditUnit.perCreditSuffix}` : null,
|
|
29812
|
+
validityLabel: options.showValidityPeriod && pass.validDays ? formatValidity(pass.validDays) : null,
|
|
29813
|
+
action: pass.purchaseAvailability === "purchasable" ? {
|
|
29814
|
+
kind: "purchase",
|
|
29815
|
+
label: options.passActionLabel,
|
|
29816
|
+
product: pass
|
|
29817
|
+
} : {
|
|
29818
|
+
kind: "unavailable",
|
|
29819
|
+
label: "Online purchasing is unavailable."
|
|
29820
|
+
}
|
|
29821
|
+
};
|
|
29822
|
+
}
|
|
29823
|
+
function membershipCardDisplay(membership, options) {
|
|
29824
|
+
return {
|
|
29825
|
+
id: membership.id,
|
|
29826
|
+
title: membership.name,
|
|
29827
|
+
description: options.showDescriptions ? membership.description : null,
|
|
29828
|
+
priceLabel: formatCommercePrice(membership.price, membership.currency),
|
|
29829
|
+
...options.cardList ? {
|
|
29830
|
+
priceAmountLabel: formatCurrencyAmount(membership.price, membership.currency, { decimals: "auto" }),
|
|
29831
|
+
priceUnitLabel: `a ${membership.billingInterval}`
|
|
29832
|
+
} : {},
|
|
29833
|
+
intervalLabel: formatInterval(membership.billingInterval),
|
|
29834
|
+
action: membership.purchaseAvailability === "purchasable" ? {
|
|
29835
|
+
kind: "purchase",
|
|
29836
|
+
label: options.membershipActionLabel,
|
|
29837
|
+
product: membership
|
|
29838
|
+
} : {
|
|
29839
|
+
kind: "unavailable",
|
|
29840
|
+
label: "Online purchasing is unavailable."
|
|
29841
|
+
}
|
|
29842
|
+
};
|
|
29843
|
+
}
|
|
29844
|
+
function buildPassesMembershipsDisplay(options) {
|
|
29845
|
+
const passes = options.passes.map((pass) => passCardDisplay(pass, options));
|
|
29846
|
+
const memberships = options.memberships.map((membership) => membershipCardDisplay(membership, options));
|
|
29847
|
+
return {
|
|
29848
|
+
kind: "passes-memberships",
|
|
29849
|
+
state: passes.length === 0 && memberships.length === 0 ? "empty" : "ready",
|
|
29850
|
+
className: options.className ?? null,
|
|
29851
|
+
layout: options.layout ?? "grid",
|
|
29852
|
+
columns: options.columns ?? "2",
|
|
29853
|
+
emptyMessage: options.emptyMessage ?? "No products available at this time.",
|
|
29854
|
+
passesHeading: getPassesHeading(options.passes, options.passesHeading),
|
|
29855
|
+
membershipsHeading: options.membershipsHeading ?? "Memberships",
|
|
29856
|
+
passes,
|
|
29857
|
+
memberships
|
|
29858
|
+
};
|
|
29859
|
+
}
|
|
29860
|
+
function cartLineTitle(item) {
|
|
29861
|
+
if (item.kind === "product") return item.variantTitle ? `${item.title} – ${item.variantTitle}` : item.title;
|
|
29862
|
+
return item.teamMember ? `${item.title} with ${item.teamMember.name}` : item.title;
|
|
29863
|
+
}
|
|
29864
|
+
function buildCartDisplay(items, options) {
|
|
29865
|
+
if (items.length === 0) return {
|
|
29866
|
+
kind: "cart",
|
|
29867
|
+
state: "empty",
|
|
29868
|
+
heading: options.heading ?? null,
|
|
29869
|
+
className: options.className ?? null,
|
|
29870
|
+
emptyMessage: options.emptyMessage ?? "Your cart is empty.",
|
|
29871
|
+
supportText: options.supportText ?? null,
|
|
29872
|
+
items: [],
|
|
29873
|
+
subtotalLabel: null,
|
|
29874
|
+
checkoutButtonText: options.checkoutButtonText ?? "Go to checkout",
|
|
29875
|
+
clearButtonText: options.clearButtonText ?? "Clear cart"
|
|
29876
|
+
};
|
|
29877
|
+
const itemsDisplay = items.map((item) => ({
|
|
29878
|
+
key: item.key,
|
|
29879
|
+
title: cartLineTitle(item),
|
|
29880
|
+
priceLabel: `${formatCommercePrice(item.unitPriceCents, item.currency)} each`,
|
|
29881
|
+
quantity: item.quantity,
|
|
29882
|
+
quantityEditable: item.kind === "product"
|
|
29883
|
+
}));
|
|
29884
|
+
const checkoutState = deriveCommerceCheckoutState({ items: [...items] });
|
|
29885
|
+
return {
|
|
29886
|
+
kind: "cart",
|
|
29887
|
+
state: "ready",
|
|
29888
|
+
heading: options.heading ?? null,
|
|
29889
|
+
className: options.className ?? null,
|
|
29890
|
+
emptyMessage: options.emptyMessage ?? "Your cart is empty.",
|
|
29891
|
+
supportText: null,
|
|
29892
|
+
items: itemsDisplay,
|
|
29893
|
+
subtotalLabel: checkoutState.kind === "ready" ? formatCommercePrice(checkoutState.subtotalCents, checkoutState.currency) : null,
|
|
29894
|
+
checkoutButtonText: options.checkoutButtonText ?? "Go to checkout",
|
|
29895
|
+
clearButtonText: options.clearButtonText ?? "Clear cart"
|
|
29896
|
+
};
|
|
29897
|
+
}
|
|
29898
|
+
function buildCheckoutDisplay(checkoutState, options) {
|
|
29899
|
+
if (checkoutState.kind === "empty") return {
|
|
29900
|
+
kind: "checkout",
|
|
29901
|
+
state: "empty",
|
|
29902
|
+
heading: options.heading ?? null,
|
|
29903
|
+
className: options.className ?? null,
|
|
29904
|
+
message: options.emptyMessage ?? "Add something to your cart to continue.",
|
|
29905
|
+
submitButtonText: options.submitButtonText ?? "Checkout"
|
|
29906
|
+
};
|
|
29907
|
+
if (checkoutState.kind === "blocked") return {
|
|
29908
|
+
kind: "checkout",
|
|
29909
|
+
state: "blocked",
|
|
29910
|
+
heading: options.heading ?? null,
|
|
29911
|
+
className: options.className ?? null,
|
|
29912
|
+
message: checkoutState.reason === "mixed_currency" ? "Mixed-currency carts are not supported." : "Checkout is unavailable for this cart.",
|
|
29913
|
+
submitButtonText: options.submitButtonText ?? "Checkout"
|
|
29914
|
+
};
|
|
29915
|
+
return {
|
|
29916
|
+
kind: "checkout",
|
|
29917
|
+
state: "ready",
|
|
29918
|
+
heading: options.heading ?? null,
|
|
29919
|
+
className: options.className ?? null,
|
|
29920
|
+
message: null,
|
|
29921
|
+
submitButtonText: options.submitButtonText ?? "Checkout"
|
|
29922
|
+
};
|
|
29923
|
+
}
|
|
29924
|
+
function formatInterval(interval) {
|
|
29925
|
+
return interval === "month" ? "/month" : "/year";
|
|
29926
|
+
}
|
|
29927
|
+
function formatValidity(days) {
|
|
29928
|
+
if (days === 1) return "Valid for 1 day";
|
|
29929
|
+
if (days < 30) return `Valid for ${days} days`;
|
|
29930
|
+
if (days === 30) return "Valid for 1 month";
|
|
29931
|
+
if (days === 365) return "Valid for 1 year";
|
|
29932
|
+
return `Valid for ${Math.round(days / 30)} months`;
|
|
29933
|
+
}
|
|
29934
|
+
const membershipClassesLabel = "Unlimited classes";
|
|
29935
|
+
function passCardListContent(display) {
|
|
29936
|
+
return {
|
|
29937
|
+
id: display.id,
|
|
29938
|
+
title: display.title,
|
|
29939
|
+
text: display.description,
|
|
29940
|
+
price: {
|
|
29941
|
+
amount: display.priceAmountLabel ?? display.priceLabel,
|
|
29942
|
+
unit: display.creditsLabel
|
|
29943
|
+
},
|
|
29944
|
+
facts: [...display.validityLabel ? [{
|
|
29945
|
+
label: "Validity",
|
|
29946
|
+
value: display.validityLabel
|
|
29947
|
+
}] : [], ...display.perCreditLabel ? [{
|
|
29948
|
+
label: "Price per credit",
|
|
29949
|
+
value: display.perCreditAmountLabel ?? display.perCreditLabel
|
|
29950
|
+
}] : []],
|
|
29951
|
+
action: { label: display.action.label }
|
|
29952
|
+
};
|
|
29953
|
+
}
|
|
29954
|
+
function membershipCardListContent(display) {
|
|
29955
|
+
return {
|
|
29956
|
+
id: display.id,
|
|
29957
|
+
title: display.title,
|
|
29958
|
+
text: display.description,
|
|
29959
|
+
price: {
|
|
29960
|
+
amount: display.priceAmountLabel ?? display.priceLabel,
|
|
29961
|
+
unit: display.priceUnitLabel ?? display.intervalLabel
|
|
29962
|
+
},
|
|
29963
|
+
facts: [{
|
|
29964
|
+
label: "Classes",
|
|
29965
|
+
value: membershipClassesLabel
|
|
29966
|
+
}],
|
|
29967
|
+
action: { label: display.action.label }
|
|
29968
|
+
};
|
|
29969
|
+
}
|
|
29970
|
+
//#endregion
|
|
29971
|
+
export { resolveHeadlessEventRegistrationStatus as $, runtimeBoxBackgroundSchema as $a, arrangementLookHooks as $i, canJoinEventWaitlistOnAnyMode as $n, bookingRequiresResourceSelection as $r, getTicketTypeLineMax as $t, createInitialRegistrationFlowState as A, sectionForegroundBackground as Aa, leavePage as Ai, resolveImageSourceSetWithContext as An, formatEventPricing as Ao, selectedBookingCollectionOptionKind as Ar, confirmationPaymentRows as At, placeCountCeiling as B, offeringsPreviewCompositionTreatmentValues as Ba, defineClientOwnedBlockRuntime as Bi, formatCalendarTitle as Bn, parseEventSeriesId as Bo, bookingQuestionsAnswerDraftSchema as Br, formatTime as Bt, panelShouldOpen as C, boundaryRuntimeMetricsForDecorativeTransition as Ca, readRuntimeNow as Ci, RichText as Cn, DEFAULT_MAILING_LIST_PRIVACY_NOTE as Co, parseBookingCurrencyInputToCents as Cr, getTicketSelectionRemainingPlaces as Ct, registrationStepLabel as D, deriveSectionGround as Da, getBlockApiReadStage as Di, mediaImageHostProps as Dn, parseMailchimpInterestId as Do, resolveBookingSelectedService as Dr, withRegistrationAvailability as Dt, registrationRoute as E, applyLookPhotoTreatment as Ea, createHostedBlockApiConfig as Ei, computeMediaTransformStyle as En, parseMailchimpAudienceId as Eo, resolveBookingPaymentStep as Er, shouldLoadRegistrationOptions as Et, buildEventRegistrationPaymentOptionsViewModel as F, assertNever as Fa, defineInteractiveIslandMetaKeys as Fi, buildCalendarViewport as Fn, publicEventPricingType as Fo, applyAppointmentBookingQuestionsEvent as Fr, formatBookingWhen as Ft, resolveRegistrationAvailabilityBlocker as G, opaqueSurfaceContextFromTheme as Ga, listLookSlot as Gi, formatEventHourLabel as Gn, restoreBookingQuestionsAnswers as Gr, occurrenceTitleOverride as Gt, planRegistrationDetailsContinuation as H, toNonEmptyReadonlyArray as Ha, isDecodeSuccess as Hi, formatEventClockLabel as Hn, decideBookingQuestionsRestoration as Hr, getPortalSubjectEmail as Ht, decideEventRegistrationPayment as I, defineBlockDesignCapability as Ia, eventRegistrationPageSurfaceSubjectSchema as Ii, eventCalendarWeekStart as In, resolveExactOrFreePriceDisplay as Io, appointmentQuestionsRefusal as Ir, formatDate as It, visitorHoldsOwnPlace as J, surfaceToneFromForegroundToken as Ja, itemRole as Ji, formatTime$1 as Jn, BOOKING_FORM_DATA_RESERVED_KEYS as Jr, formatPrice as Jt, resolveRegistrationTicketContinuation as K, opaqueSurfaceDeclarations as Ka, lookListPresentationSchemaShape as Ki, formatEventNextDateFact as Kn, toBookingQuestionsAnswerDraft as Kr, transformRegistrationOptionsResponse as Kt, shouldPromptForLogin as L, defineFrameCapability as La, normalizeEventRegistrationPageSurfaceSubject as Li, eventDateLocale as Ln, resolvePricingOptionsPriceDisplay as Lo, deriveAppointmentBookingQuestions as Lr, formatEventDateTime as Lt, getDeclinedPass as M, stripStaleTransitionStyleGroup as Ma, requestSignIn as Mi, resolveImageUrlWithContext as Mn, publicEventPricingCurrency as Mo, projectSelectedAppointmentConsentIntoForm as Mr, ENTITLEMENT_SINGLE_TICKET_TOOLTIP as Mt, isRegistrationLocked as N, themeV2CompilerOwnedFieldNames as Na, buildInteractiveIslandProps as Ni, resolveMediaNodeResponsiveImage as Nn, publicEventPricingDisplay as No, resolveSelectedAppointmentConsent as Nr, areEntitlementsDisabledForTicketCount as Nt, registrationStepLabelContext as O, parseCanonicalRuntimeBackground as Oa, PAGE_NAVIGATION as Oi, renderAudio as On, parseNewsletterListId as Oo, resolveBookingSiteId as Or, registrationQuestionsMessage as Ot, registrationFlowReducer as P, resolveEffectiveKnobs as Pa, createInteractiveIslandCodec as Pi, resolvePublicMediaUrl as Pn, publicEventPricingStrategy as Po, EMPTY_APPOINTMENT_BOOKING_QUESTIONS as Pr, findSelectedTicketType as Pt, resolveEventRegistrationSubmitPlan as Q, boxBackgroundSchema as Qa, arrangementAppearancePresets as Qi, canJoinEventWaitlist as Qn, bookingPackageRequestKey as Qr, getTicketSelectionTotal as Qt, fullyBookedLabel as R, featureCardCompositionTreatmentValues as Ra, resolveEventRegistrationScopedEvents as Ri, eventDateOptions as Rn, parseSiteId as Ro, isAppointmentBookingQuestionsEvent as Rr, formatPassCreditUsageLabel as Rt, getEventSelectionMode as S, sectionShapeHook as Sa, isBlockButtonRole as Si, shownVenue as Sn, resolveBookingSignupOffer as So, normalizeBookingServices as Sr, getSlidingScaleSelectionMessage as St, registrationPresentation as T, transitionCatalogueEntries as Ta, browserReadAuthoritySchema as Ti, MediaPlaceholder as Tn, parseBrevoListId as To, resolveAppointmentCheckoutVerificationState as Tr, resolveHeldTicketPlaces as Tt, resolveGuestNextStepCheck as U, cardListFamilyBlocks as Ua, listItemPresentation as Ui, formatEventCompactDateRail as Un, deriveBookingQuestions as Ur, getTicketTypeAvailabilityLabel as Ut, planRegistrationDetailsCheck as V, testimonialsCompositionTreatmentValues as Va, defineProgressiveBlockRuntime as Vi, formatDate$1 as Vn, bookingQuestionsPaymentSnapshotSchema as Vr, getImplicitSingleTicketType as Vt, resolveRegistrationAdmission as W, cardListKnobBlocks as Wa, listLookControl as Wi, formatEventDateParts as Wn, needsBookingQuestionsRefresh as Wr, getVisibleTicketTypes as Wt, isEventRegistrationAvailable as X, TokenResolver as Xa, resolveLookSurfacePresentation as Xi, resolveEventTimeZone as Xn, applyBookingPaymentAdmission as Xr, getSingleSelectedPricingOptionId as Xt, deriveEventRegistrationSteps as Y, arrangementSlotNames as Ya, lookPresentationOnPalette as Yi, groupEventsByDate as Yn, BOOKING_FORM_DATA_RESERVED_KEY_VALUES as Yr, canRequestTicketOption as Yt, normalizeEventRegistrationMaxTickets as Z, boxBackgroundOverlaySchema as Za, selectItemSurfacePresentation as Zi, resolveRuntimeEventDestination as Zn, bookingHasPackagePaymentChoices as Zr, getTicketLineQuantity as Zt, parseStoredCommerceCartState as _, navLinkHoverColorCandidate as _a, previewStageSchema as _i, signInReturnPath as _n, nextLiveRunSessionStartMs as _o, getBookingSuccessCopy as _r, formatCentsAsCurrencyInput as _t, buildProductDetailDisplay as a, deriveSiteStyleBlockPolicy as aa, resolveBookingPaymentMode as ai, toWholeSeriesRegistrationEvent as an, itemRoleValues as ao, getRemainingPlaces as ar, buildReviewedBookingPaymentViewModel as at, resolveSelectedProduct as b, sectionShapeForGround as ba, BLOCK_BUTTON_ROLE_OPTIONS as bi, registrationDisplaySchema as bn, resolveWholeSeriesRunLifecycle as bo, isBookingServiceSlidingAmountInRange as br, getRegistrationOccurrenceId as bt, formatInterval as c, resolveCardRole as ca, getBookingServiceSlidingScale as ci, eventSignInDraftStore as cn, siteChromeBackgroundOverrideOwner as co, selectMostOpenCapacitySource as cr, findPreSelectedEvent as ct, membershipClassesLabel as d, footerForegroundCandidates as da, columnOptionSchema as di, toEventSignInDraft as dn, asSiteStyleId as do, buildBookingFormInteractiveIslandProps as dr, resolveRegistrationTarget as dt, arrangementManifestFromVariants as ea, reconcileBookingPackagePurchase as ei, hasValidPricingOptionSelection as en, tokenOrCssColorValueSchema as eo, formatEventRemainingPlaces as er, resolveHeadlessEventRegistrationView as et, passCardListContent as f, getNavLinkPreset as fa, eventButtonVariantSchema as fi, clearSignInReturnDrafts as fn, makeBoundaryId as fo, readOverrideServiceCategories as fr, resolveRouteRequiresPayment as ft, deriveCommerceCheckoutState as g, generateInteractiveChildInheritanceCSS as ga, filterAutoShowSchema as gi, readSignInReturn as gn, CANCELLED_SESSION_STATUS as go, getBookingRedirectStateFromLocation as gr, invitationSubmission as gt, buildProductCartItem as h, generateEffectsCSS as ha, eventLayoutSchema as hi, nextSignInReturnExpiry as hn, isRecord$4 as ho, formatBookingSubmissionPreparationError as hr, createRegistrationDraftData as ht, buildProductCardDisplay as i, resolvePublishedLook as ia, resolveBookingPaymentChoice as ii, toRegistrationEvents as in, cardVariantRoleValues as io, getEventAvailabilityStatus as ir, buildBookingPaymentSelectionViewModel as it, decideEventChoice as j, sectionSurfaceBase as ja, pageNavigationSchema as ji, resolveImageUrl as jn, isPublicEventPricingOptionDisplayable as jo, toSelectedCollectionOptionKind as jr, resolveFinishedPresentation as jt, areEventRegistrationPaymentSelectionsEqual as k, resolveSectionBackground as ka, canonicalUrl as ki, renderVideo as kn, formatBookingPriceDisplay as ko, resolveDefaultBookingServiceId as kr, validateFormData as kt, formatValidity as l, generateDefaultCardSystem as la, bookingNowSchema as li, eventSignInEnds as ln, asDesignBlockId as lo, groupPublicEventsByRun as lr, resolveDiscountContext as lt, buildPassCartItem as m, generateNavLinkCSS as ma, eventCalendarDisplayModeSchema as mi, decideSignInReturn as mn, parseAspectRatioValue as mo, formatBookingCentsAsCurrencyInput as mr, beginWaitlistInvitation as mt, buildCheckoutDisplay as n, resolveEffectiveArrangement as na, resolveBookingPackageSources as ni, setTicketLineQuantity as nn, cardRoleSchema as no, formatTotalCapacity as nr, toInternalPaymentSelection as nt, buildProductListDisplay as o, requireCuratedSiteStyle as oa, resolveBookingPurchasablePackages as oi, toWholeSeriesRegistrationEvents as on, openCardRoleValue as oo, isEventFull as or, paymentChoiceDetails as ot, EMPTY_COMMERCE_CART_STATE as p, buildTextContrastShadow as pa, eventCalendarDefaultViewSchema as pi, createSignInReturnDraftStore as pn, sanitizeHref as po, deriveBookingFormViewState as pr, toRegistrationRequestSubject as pt, settledRemainingPlaces as q, selectLogoVariant as qa, resolvedItemSurfaceProps as qi, formatEventTimeRange as qn, toBookingQuestionsPaymentSnapshot as qr, withOccurrenceTitle as qt, buildPassesMembershipsDisplay as r, resolveModeArrangement as ra, resolveBookingPaymentAvailability as ri, getRegistrationStartAt as rn, cardSystemSchema as ro, getEventAvailability as rr, calculateEventRegistrationPreviewTotal as rt, formatCommercePrice as s, compiledRuntimeStyleFieldNames as sa, toBookingPurchasablePackages as si, EVENT_SIGN_IN_FORM_ID as sn, surfaceCardRoleValues as so, selectEventCapacitySource as sr, paymentChoicePrice as st, buildCartDisplay as t, readStoredMode as ta, resolveBookingPackagePaymentSelection as ti, normalizeTicketSelectionLines as tn, boxlessCardVariantValue as to, formatRemainingPlaces as tr, toHeadlessPaymentSelection as tt, membershipCardListContent as u, generateFooterCss as ua, calendarTabViewsSchema as ui, eventSignInRestoration as un, asLayoutVariantKey as uo, bookingFormInteractiveIslandPropsCodec as ur, resolveEventRequiresPayment as ut, productItemKey as v, navLinkOwnsHoverForeground as va, registrationButtonVariantSchema as vi, sweepExpiredSignInReturnDrafts as vn, orderedLiveRunSessions as vo, getRegistrationSuccessCopy as vr, getCurrentTicketSelection as vt, registrationPaymentRoute as w, anglePolygonCss as wa, resolveDateRuntimeContext as wi, ImagePresets as wn, DEFAULT_MAILING_LIST_SUCCESS_MESSAGE as wo, prepareBookingSubmission as wr, parseCurrencyInputToCents as wt, REGISTRATION_STEP_LABELS as x, sectionShapeFromContent as xa, blockButtonRoleSchema as xi, resolveRegistrationDisplay as xn, parseMailingListRuntimeContext as xo, normalizeBookingFormConfig as xr, getSlidingScaleForEvent as xt, reduceCommerceCart as y, navLinkOwnsUnderline as ya, weekStartSchema as yi, placesLeftLabel as yn, resolveWholeSeriesBookingPhase as yo, getShopSuccessCopy as yr, getEligibilityFlowFlags as yt, getTicketSelectionPurpose as z, introCompositionTreatmentValues as za, createZodCodec as zi, eventLocalDateKey as zn, unsafeAsSiteId as zo, needsAppointmentQuestionsRefresh as zr, formatRegistrationSchedule as zt };
|