@riverbankcms/sdk 0.161.0 → 0.163.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/CHANGELOG.md +9 -0
- package/dist/_dts/{BlocksIslandsHydrator-Bx4kLiTA.d.ts → BlocksIslandsHydrator-DYPGA_qh.d.ts} +1 -1
- package/dist/_dts/{Page-Dm7_P13o.d.ts → Page-zwnvFBPu.d.ts} +8 -8
- package/dist/_dts/{SdkPreviewMode-D7HdWWwF.d.ts → SdkPreviewMode-DukuJzGr.d.ts} +58 -91
- package/dist/_dts/{client-Ep0jI9eE.d.ts → client-Chh3bnXC.d.ts} +11 -3
- package/dist/_dts/{content-types-BgAzCrBc.d.ts → content-types-Bbzqw9J2.d.ts} +2 -2
- package/dist/_dts/{contracts-DUiOnj9e.d.ts → contracts-GJ1kGBsi.d.ts} +13 -4
- package/dist/_dts/{footerPageOutline-B-uXamTG.d.ts → footerPageOutline-BNMKhyvo.d.ts} +6 -6
- package/dist/_dts/{generatePageMetadata-BDkZYEcS.d.ts → generatePageMetadata-Ce0m1P3B.d.ts} +2 -2
- package/dist/_dts/{index-DvKQA6AZ.d.ts → index-C3mJvn27.d.ts} +4 -4
- package/dist/_dts/{schema-BHu0PYWl.d.ts → index-CaL0nKkl.d.ts} +4166 -3355
- package/dist/_dts/{index-KPrWM0KF.d.ts → index-CdSNXLOx.d.ts} +1 -1
- package/dist/_dts/{types-BR1Yboa9.d.ts → index-CyQhZuhM.d.ts} +3347 -1692
- package/dist/_dts/{index-BVkP8f70.d.ts → index-D2y4Iy-d.d.ts} +13 -2
- package/dist/_dts/{index-CSsfq6KG.d.ts → index-DRxgeK8L.d.ts} +11 -6
- package/dist/_dts/{index-CF6Cjs7b.d.ts → index-FstkyqQB.d.ts} +2 -2
- package/dist/_dts/{index-D_8uz4OP.d.ts → index-G2p-HOrK.d.ts} +3 -3
- package/dist/_dts/{index-ylivB7Jj.d.ts → index-rhMSu0oY.d.ts} +2 -2
- package/dist/_dts/{loadContent-DTjKOO-T.d.ts → loadContent-DiLZoInK.d.ts} +10 -7
- package/dist/_dts/{resolvePageContent-C1vA5c5w.d.ts → resolvePageContent-CWUnipv8.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 +6 -6
- 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/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/index.d.ts +13 -7
- 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/routing/index.d.ts +5 -5
- package/dist/_dts/sdk/src/server.d.ts +5 -5
- package/dist/_dts/sdk/src/theme/index.d.ts +1 -1
- package/dist/_dts/{types-D02ngcUH.d.ts → types-BmtrA45p.d.ts} +2 -2
- package/dist/_dts/{types-ZGUiHpDE.d.ts → types-CalL7aKP.d.ts} +7 -7
- package/dist/_dts/{types-CJXTCF_F.d.ts → types-DFOqkClJ.d.ts} +3 -3
- package/dist/_dts/{validation-BaV565gb.d.ts → validation-G8MRoIhq.d.ts} +4 -4
- package/dist/client/{BlocksIslandsHydrator-DTExCJsb.mjs → BlocksIslandsHydrator-DLCXwe30.mjs} +20 -19
- package/dist/client/{BookingMailingListNote-BDpxmn1p.mjs → BookingMailingListNote-BV5-50F0.mjs} +1 -1
- package/dist/client/{CalendarNavigationChevron-PeCiL82X.mjs → CalendarNavigationChevron-CVLAHdZG.mjs} +6 -6
- package/dist/client/{CheckboxChoice-DWexRLf6.mjs → CheckboxChoice-Dtgp3OU8.mjs} +1 -1
- package/dist/client/{DemoBookingPortalAccess-3zmIqakW.mjs → DemoBookingPortalAccess-B3caCnTT.mjs} +26 -10
- package/dist/client/{DemoPortalSignInLink-GHi-8BW5.mjs → DemoPortalSignInLink-Ct8JMKW0.mjs} +1 -1
- package/dist/client/{EventCalendar.client-BxQLY5cX.mjs → EventCalendar.client-ffa6920T.mjs} +16 -17
- package/dist/client/{EventCombined.client-B5bmQ03b.mjs → EventCombined.client-zm0W2G79.mjs} +8 -8
- package/dist/client/{EventEmbeddedCheckoutStep-CgMZ9TeU.mjs → EventEmbeddedCheckoutStep-CPPE2rWS.mjs} +1 -1
- package/dist/client/{EventItem-BEx-qiDE.mjs → EventItem-CND3mfra.mjs} +91 -15
- package/dist/client/{EventListWeekNavigation-CyH5tA6Y.mjs → EventListWeekNavigation-D8QdxL_f.mjs} +1 -1
- package/dist/client/{EventListing.client-D3uySdGP.mjs → EventListing.client-CaoRZUI9.mjs} +3 -3
- package/dist/client/{EventListing.view-9RFrBejr.mjs → EventListing.view-BfnOmxYD.mjs} +14 -70
- package/dist/client/{EventRegistrationPayment-CG2tQx8K.mjs → EventRegistrationPayment-Dfu3RSL2.mjs} +10 -10
- package/dist/client/LocationMapActions-wlyxASdT.mjs +62 -0
- package/dist/client/{LocationMapActions-Wsr83Q7q.mjs → MapDrawingSvg-B9oKSitp.mjs} +2 -70
- package/dist/client/{Page-Bf2nPACI.mjs → Page-BEF9HrAy.mjs} +2333 -492
- package/dist/client/{StepIndicator-CZweb1vs.mjs → StepIndicator-Bjx4faaw.mjs} +2 -2
- package/dist/client/{TabBarFragment-Bkgz67gt.mjs → TabBarFragment-Cu7k_VSl.mjs} +1 -1
- package/dist/client/{ThemedButton-CnyL3s1A.mjs → ThemedButton-DclwabI7.mjs} +1 -1
- package/dist/client/{accordion-TcimLLRQ.mjs → accordion-lzM2nSZB.mjs} +1 -1
- package/dist/client/{booking-form.client-q-RpJ4aF.mjs → booking-form.client-Bll4QwBi.mjs} +137 -60
- package/dist/client/{bookingForm-DjGfk3Wj.mjs → bookingForm-Cq5fQ-vo.mjs} +4 -4
- package/dist/client/bookings.mjs +5 -5
- package/dist/client/{carousel-CGAk6j0m.mjs → carousel-CxerQwIx.mjs} +2 -2
- package/dist/client/{carousel.client-ArlGmYWV.mjs → carousel.client-CVUXq8Mb.mjs} +1 -1
- package/dist/client/{cart-D_h3rAZ2.mjs → cart-X-m0isoI.mjs} +3 -3
- package/dist/client/{cart.client-DHOxZbJ7.mjs → cart.client-CJbzWIl0.mjs} +1 -1
- package/dist/client/{checkout-tC-3CzuM.mjs → checkout-Gd0O_fGH.mjs} +3 -3
- package/dist/client/{checkout.client-DsBb2Pkm.mjs → checkout.client-Baee6Jsm.mjs} +1 -1
- package/dist/client/client.mjs +34 -69
- package/dist/client/{context-9ZfMb6GA.mjs → context-Bg0SFWcM.mjs} +28 -1
- package/dist/client/{cta-D-ZqL7-e.mjs → cta-HffyM4MA.mjs} +1 -1
- package/dist/client/{dateFormatting-BCwLqYpW.mjs → dateFormatting-CV45BH5M.mjs} +39 -2
- package/dist/client/{demoPortalMagicLink-BxkSS9fx.mjs → demoPortalMagicLink-CDWheSjI.mjs} +1 -1
- package/dist/client/{enhanceHeaderSection-xg6to91E.mjs → enhanceHeaderSection-BqVDXL0D.mjs} +3 -3
- package/dist/client/{event-details.client-C670TgRd.mjs → event-details.client-SFtS9OkF.mjs} +2 -1
- package/dist/client/{event-registration.client-C6GApWTB.mjs → event-registration.client-CguNVIFY.mjs} +13 -13
- package/dist/client/{eventCalendar-CWc0dg9i.mjs → eventCalendar-DSGG35jd.mjs} +4 -4
- package/dist/client/{eventCombined-D4DbOrvQ.mjs → eventCombined-Oe-PiChx.mjs} +4 -4
- package/dist/client/{eventDetails-C2DfmbC0.mjs → eventDetails-BhcTT6P3.mjs} +2 -2
- package/dist/client/{eventListing-C_yXmHyz.mjs → eventListing-BS0kBEgI.mjs} +4 -4
- package/dist/client/{eventRegistration-DJuaCB-O.mjs → eventRegistration-B82SHv7j.mjs} +4 -4
- package/dist/client/{form-QZhtdFHA.mjs → form-DAIUrVXb.mjs} +3 -3
- package/dist/client/{form.client-CgvPACwG.mjs → form.client-BoAkhoh_.mjs} +4 -4
- package/dist/client/{form.parts-2uI0-5N-.mjs → form.parts-1VnasOK8.mjs} +3 -3
- package/dist/client/{formatDate-Danr0Nk4.mjs → formatDate-BKil_Psb.mjs} +1 -1
- package/dist/client/gifting/client.mjs +3 -3
- package/dist/client/{headerSection-DJdlLdvZ.mjs → headerSection-CyuHk8Ei.mjs} +2 -2
- package/dist/client/mediaAssets-CGJE1Omu.mjs +43 -0
- package/dist/client/mediaContext-DIkX2S-X.mjs +136 -0
- package/dist/client/{newsletter-form.client-Cbepz2KU.mjs → newsletter-form.client-CCdyHx0B.mjs} +5 -5
- package/dist/client/{newsletter-form.parts-DN8oMCQ0.mjs → newsletter-form.parts-Dl8AjsXW.mjs} +2 -2
- package/dist/client/{newsletterForm-wjLtW-wq.mjs → newsletterForm-qFWLZJui.mjs} +3 -3
- package/dist/client/{noop-B7H6gCbj.mjs → noop-4XFGzJpT.mjs} +19 -3
- package/dist/client/portal/client.mjs +1116 -85
- package/dist/client/{product-detail.client-CYTR165c.mjs → product-detail.client-Tq4S99ce.mjs} +1 -1
- package/dist/client/{product-list.client-B4vTvag8.mjs → product-list.client-CuL5jB1w.mjs} +1 -1
- package/dist/client/{productDetail-k8LEMSWn.mjs → productDetail-BRqgcotZ.mjs} +3 -3
- package/dist/client/{productList-DEo8Bqoe.mjs → productList-EK9Um-oh.mjs} +3 -3
- package/dist/client/{propsDecoder-G0j0HXBO.mjs → propsDecoder-VD4arFq1.mjs} +4 -3
- package/dist/client/{registry.server-BTmSXE3D.mjs → registry.server-qYbsatxH.mjs} +272 -68
- package/dist/client/rendering/client.mjs +26 -26
- package/dist/client/rendering/islands.mjs +1 -1
- package/dist/client/rendering.mjs +22 -19
- package/dist/client/{richText-coerce-B19taoH6.mjs → richText-coerce-CW8CFk8v.mjs} +1 -1
- package/dist/client/{routeIslandApiConfig-Chu5BHra.mjs → routeIslandApiConfig-CnZ_1ol2.mjs} +1 -1
- package/dist/client/{schema-C-m8XHuW.mjs → schema-BFwQDvJL.mjs} +4561 -3948
- package/dist/client/{shop-RGWa43H7.mjs → shop-CTUaT57E.mjs} +3 -3
- package/dist/client/{shop-commerce-TJYCBO_H.mjs → shop-commerce-BWwbsm_-.mjs} +11 -11
- package/dist/client/{shop-commerce-store-CjCcUB_o.mjs → shop-commerce-store-15UII0y3.mjs} +1 -1
- package/dist/client/{shop.client-tsKfZw1W.mjs → shop.client-UWgdmJBm.mjs} +12 -12
- package/dist/client/{shop.interactive-CVqLAU53.mjs → shop.interactive-Cf_kASpd.mjs} +76 -51
- package/dist/client/{shopShared-C3lHMz_R.mjs → shopShared-Bi8d584P.mjs} +2 -2
- package/dist/{server/effectiveNavLinkStyle-CGvGr3yD.mjs → client/site-styles-dy54AUdz.mjs} +2781 -331
- package/dist/client/{timetableModel-V2ifvGGy.mjs → timetableModel-Bi8ruFgB.mjs} +10 -9
- package/dist/client/{useAvailableSlots-D1X69-pN.mjs → useAvailableSlots-DiLbDqM3.mjs} +8 -11
- package/dist/client/{useBookingNowIso-Ch30jino.mjs → useBookingNowIso-CWIiqPd0.mjs} +1 -1
- package/dist/client/{useDiscountApply-Bwzr1RjV.mjs → useDiscountApply-ChtszhF9.mjs} +2 -2
- package/dist/client/{useDiscountCodeUi-BimJbFC7.mjs → useDiscountCodeUi-B0Z7n2tZ.mjs} +1 -1
- package/dist/client/{useEventPagination-CLAS0upd.mjs → useEventPagination-DRrATQHQ.mjs} +6 -6
- package/dist/client/{view-Dj_FZHmg.mjs → view-OvsxzgxP.mjs} +64 -55
- package/dist/client/{view-BUh4LnLS.mjs → view-yUIfWX3S.mjs} +4 -4
- package/dist/client/{wizardSteps-BkZc-hKH.mjs → wizardSteps-kbONzKUv.mjs} +59 -53
- package/dist/preview-next/before-render.mjs +3 -3
- package/dist/preview-next/chrome.css +1 -1
- package/dist/preview-next/client/{EventEmbeddedCheckoutStep-CwerMfzn.mjs → EventEmbeddedCheckoutStep-DzoFjIqB.mjs} +1 -1
- package/dist/preview-next/client/{PreviewEditorSidebar-Dvq-RW9-.mjs → PreviewEditorSidebar-BhgPyyUW.mjs} +170 -1046
- package/dist/preview-next/client/{PreviewEditorUI-BdFjS39R.mjs → PreviewEditorUI-lndKKBtB.mjs} +157 -313
- package/dist/preview-next/client/{SdkPreviewModeRuntime-BEfHln1E.mjs → SdkPreviewModeRuntime-Bk7On_EM.mjs} +351 -1386
- package/dist/preview-next/client/{SdkPreviewModeRuntime-CjkGh1IG.mjs → SdkPreviewModeRuntime-DCDDXDlt.mjs} +1 -1
- package/dist/preview-next/client/{ThemedButton-b14Bv03E.mjs → ThemedButton-nUnE3iMv.mjs} +1010 -398
- package/dist/preview-next/client/{SiteChromeCustomizeContext-CDbxk_qZ.mjs → previewAuthStore-DHtSQIBE.mjs} +159416 -162308
- package/dist/preview-next/client/{previewChromeSurface-Dd1_mNIg.mjs → previewChromeSurface-CxQ6dZ8D.mjs} +1 -1
- package/dist/preview-next/client/runtime.mjs +3 -3
- package/dist/preview-next/client/{sdk-runtime-B-CXyGVb.mjs → sdk-runtime-DSZv7Vfm.mjs} +1 -1
- package/dist/preview-next/client/siteStyleAccess-Chq5KKKh.mjs +14162 -0
- package/dist/preview-next/client/{spinner-CGxS8Ns-.mjs → spinner-CjxE3uws.mjs} +1 -1
- package/dist/preview-next/edit-map.css +37 -0
- package/dist/preview-next/keepAlive.mjs +2 -2
- package/dist/preview-next/maplibre-gl.css +1 -0
- package/dist/preview-next/middleware.mjs +1 -1
- package/dist/preview-next/{refresh-contract-CvmNqZ1Q.mjs → refresh-contract-uQ6BXgLJ.mjs} +5 -0
- package/dist/preview-next/{route-contract-hLg-yjQN.mjs → route-contract-CxCstfkP.mjs} +403 -200
- package/dist/preview-next/upload-structure.css +18 -0
- package/dist/server/{Block.shared-CeTd2saO.mjs → Block.shared-Dz9k8vCX.mjs} +16 -16
- package/dist/server/{bindings-C5YpKuKt.mjs → bindings-S-gCHhj5.mjs} +2 -2
- package/dist/server/{client-Cv26lZQ4.mjs → client-C2Q56xqV.mjs} +34 -69
- package/dist/server/config-validation.mjs +1 -1
- package/dist/server/config.mjs +2 -2
- package/dist/{client/mediaContext-jPeJ2PmJ.mjs → server/effectiveNavLinkStyle-DLzJPcDL.mjs} +1977 -1210
- package/dist/server/index.mjs +3 -3
- package/dist/server/{loadContent-C8a0b-cC.mjs → loadContent-D7ItMsEl.mjs} +7 -4
- package/dist/server/loadPage-D2qvYV5g.mjs +2 -0
- package/dist/server/{loadPage-BW7dklu3.mjs → loadPage-DaPiPYUL.mjs} +2 -2
- package/dist/server/next.mjs +9 -9
- package/dist/server/{overrideResolution-tIuqmJB3.mjs → overrideResolution-anoB3Kbn.mjs} +1 -1
- package/dist/server/{overrides-D1fiPOKF.mjs → overrides-W1Cc6srh.mjs} +434 -241
- package/dist/server/page-converter.mjs +1 -1
- package/dist/server/{prebuild--fO0E2tr.mjs → prebuild-BF9yNfCS.mjs} +1 -1
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/{prefetchBlockData-CqJnokWJ.mjs → prefetchBlockData-Cn9k3DW6.mjs} +36 -11
- package/dist/server/{publicProducts-CvvZ4JIe.mjs → publicProducts-BVcJ6TG7.mjs} +656 -166
- package/dist/server/{registry-BVfCqaCq.mjs → registry-4ZF3bUuJ.mjs} +401 -74
- package/dist/server/rendering/server.mjs +4 -4
- package/dist/server/rendering.mjs +8 -8
- package/dist/server/{resolveBlockData-DPNvhXEz.mjs → resolveBlockData-BKQ1Fc0M.mjs} +1 -1
- package/dist/server/routing.mjs +1 -1
- package/dist/server/{schema-CD4peO7m.mjs → schema-DgrigZq9.mjs} +7748 -7135
- package/dist/server/server.mjs +3 -3
- package/dist/server/{site-styles-H-EvTJiW.mjs → site-styles-CxE9F3hj.mjs} +99 -117
- package/dist/server/{siteChromeOverlayClearance-DNC2k1U0.mjs → siteChromeOverlayClearance-OhS6f830.mjs} +161 -105
- package/dist/server/{src-ILxc6pid.mjs → src-C44_fMy5.mjs} +1190 -147
- package/dist/server/theme-bridge.mjs +1 -1
- package/dist/server/theme.mjs +1 -1
- package/dist/server/{themeAdmission-BNHIXiUj.mjs → themeAdmission-CVc04B9m.mjs} +36 -29
- package/dist/server/{validation-B1ieVemg.mjs → validation-BrbY0nxR.mjs} +2 -2
- package/dist/server/{version-BQK44wFg.mjs → version-BBSk8uM6.mjs} +1 -1
- package/dist/styles/index.css +1034 -113
- package/package.json +1 -1
- package/dist/_dts/index-BQDBQvdu.d.ts +0 -13
- package/dist/client/mediaAssets-BvjcAZpS.mjs +0 -16
- package/dist/preview-next/client/siteStyleAccess-Kqk0j0dE.mjs +0 -5812
- package/dist/server/loadPage--DXBwI8V.mjs +0 -2
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $n as getTextColorForBackground, $t as introCompositionTreatmentValues, An as serializeSurfaceTree, Cn as ok, Cr as surfaceInkStyle, Dr as mergeStyles, E as ICON_CONFIG, Et as renderableMediaAssetSchema, In as isCssColorLiteral, Ln as resolveOnColorForThemeToken, N as generateDefaultButtonSystem, On as parseSurfaceTree, Or as rgbColorValue, P as parseThemeButtonVariantId, R as parseThemeForPersistence, Sn as err, Xt as featureCardCompositionTreatmentValues, dr as defaultThemeTokens, jr as parseThemeColorToken, kr as textColorStyle, rn as offeringsPreviewCompositionTreatmentValues, sn as testimonialsCompositionTreatmentValues, wr as backgroundColorStyle, wt as runtimeMediaSchema, zn as resolveTokenOrCssColorValue } from "./schema-DgrigZq9.mjs";
|
|
2
2
|
import { t as assertNever$1 } from "./assert-never-ku-PUn9U.mjs";
|
|
3
|
-
import { $ as
|
|
4
|
-
import { _ as validateManifestDraft, g as compileManifestContentContract, u as readSdkPreviewPublishedPlacement } from "./themeAdmission-
|
|
5
|
-
import { C as resolvePageRouteTarget, D as parseStoredVariant, E as toPresentationPage, S as resolveEntryRouteTarget, T as toEditorPresentationPage, _ as buildLinkedContentEditTarget, b as defaultTransforms, f as buildPageRenderPlan, g as retargetJoinsAcrossOmissions, h as renderedJoinLayout, m as joinSlotKey, p as composePageJoins, v as resolveLinkedEntryInlineFieldEligibility, w as resolveRouteTarget } from "./prefetchBlockData-
|
|
6
|
-
import { _ as resolveEffectiveArrangement, d as arrangementLookHooks, h as arrangementManifestFromVariants } from "./effectiveNavLinkStyle-
|
|
7
|
-
import "./site-styles-
|
|
3
|
+
import { $ as RichText, $i as CANCELLED_SESSION_STATUS, $n as formBlockDefinition, $t as formatEventHourLabel, A as buildOfferingsCatalogueListing, Aa as publicEventPricingCurrency, An as FEATURE_CARD_ICON_TREATMENTS, Ar as isBlockButtonRole, At as offeringsListingFor, B as buildEventCollectionListingDisplay, Bn as teamMemberBiography, Bt as buildEventListWeek, C as buildShopInteractiveIslandProps, Ca as parseLocalScheduleTime, Cn as isEventFull, Cr as formEmbedFragment, Ct as resolveEventRegistrationScopedEvents, D as passCardListContent, Da as toUtcIsoDateTimeString, Dn as blockBookingConsentSchema, Dr as ctaCopyFragment, Dt as OFFERINGS_PREVIEW_EVENT_PRESET_DEFINITIONS, E as membershipClassesLabel, Ea as toScheduledBookingDateTime, En as publicEventsArraySchema, Er as testimonialsHeadingFragment, Fa as formatCurrencyAmount, Fn as composeHeaderSectionWrapperClassName, Fr as boxStyleClassNames, Ft as ThemedButton, Gr as el, H as eventCollectionHydrationSchema, Hn as readRuntimeNow, Ht as formatEventPriceAmount, I as eventListingBlockDefinition, Ia as parseCurrencyCode, In as markEditableSurfaceForwarding, Ir as normalizeBoxStylesBorder, It as ThemedButtonLink, J as CardListContentPart, Ji as chosenString, Jn as staticHeaderChromeRuntime, Jt as formatCalendarTitle, K as catalogueEventCardProps, Kr as when, Kt as eventDateOptions, L as buildEventListingInteractiveIslandProps, Li as PUBLIC_DOWNLOAD_MEDIA_TYPES, Ln as splitPositioningClasses, Lr as resolveCardRoleForBoxStyles, Lt as ThemedDownloadLink, M as eventCalendarBlockDefinition, Ma as publicEventPricingType, Mn as shouldReserveFeatureCardIconZone, Mr as bodyCopyFragment, Mt as resolveOfferingsPreviewGroups, N as buildEventCalendarInteractiveIslandProps, Na as resolveExactOrFreePriceDisplay, Nr as defineFragment, Nt as resolveOfferingsRenderInput, O as offeringsPreviewBlockDefinition, Oa as formatBookingPriceDisplay, On as bookingConsentCarrierSchema, Or as heroCtaRowFragment, Ot as buildOfferingsPreviewListing, P as buildEventCalendarListingDisplay, Pa as resolvePricingOptionsPriceDisplay, Pi as bindingSchema, Pt as ThemedAuthoredButton, Q as MediaNodeServer, Qi as unavailableReadinessFact, Qt as formatEventDateParts, R as buildEventCollectionDisplay, Rt as getIconComponent, S as buildProductListInteractiveIslandProps, Sa as parseBookingLocalDate, Sn as getEventAvailabilityStatus, Sr as singleButtonFragment, St as normalizeEventRegistrationPageSurfaceSubject, T as membershipCardListContent, Ta as toBookingTimeZone, Tn as groupPublicEventsByRun, Tr as testimonialsCarouselFragment, U as eventCollectionSourceSchemaShape, Un as resolveDateRuntimeContext, Ur as resolveBackgroundColorValue, Ut as formatEventPriceDisplay, V as eventCollectionDisplaySchemaShape, Vn as teamMemberCardBiography, Vt as formatEventPrice, Wr as ctaButton, Wt as buildCalendarViewport, X as resolveCardListSchedule, Xi as loadedReadinessFact, Xt as formatEventClockLabel, Y as CardListLeadDate, Yi as admitReadinessFacts, Yt as formatDate, Z as selectCardListPresentation, Zi as pageTemplateFromEntry, Zt as formatEventCompactDateRail, _ as productListBlockDefinition, _i as inlineTextToPlainText, _n as browserReadAuthoritySchema, _r as headingFragment, _t as previewStageSchema, a as normalizeLocationMapSource, ai as resolveBlockIconRenderValue, an as getLocalDateKey, ar as defineClientOwnedBlockRuntime, b as buildCheckoutInteractiveIslandProps, ba as getBookingLocalDateKey, bn as formatTotalCapacity, br as faqHeadingFragment, ca as decideLocationSourcePermission, ci as CircleMinusIcon, cn as formatDateKey, cr as listLookControl, ct as getCurrentResolveImageUrlContext, d as newsletterBlockSubmissionMessage, di as FileArchiveIcon, dn as getWeekCalendarDayTuple, dr as resolvedItemSurfaceProps, dt as getCardOrientation, ea as nextLiveRunSessionStartMs, en as formatEventNextDateFact, er as buildFormInteractiveIslandProps, et as ImagePresets, f as giftingBlockDefinition, fi as FileAudioIcon, fn as getWeekCalendarDays, fr as itemRole, ft as getContainerClass, g as productDetailBlockDefinition, ga as formatDateTimeRange, gi as PlusIcon, gn as formatBookingSchedulePresentation, gr as richTextFragment, gt as bookingNowSchema, h as cartBlockDefinition, ha as formatDateRange, hi as MinusIcon, hn as resolveRuntimeEventDestination, hr as clsx, ht as buildEventRegistrationInteractiveIslandProps, i as normalizeLocationMapProps, ia as parseMailingListRuntimeContext, ii as parseBlockIconValue, in as resolveEventTimeZone, ir as createZodCodec, j as offeringsCatalogueShape, ja as publicEventPricingDisplay, jn as resolveFeatureCardGeneratedIconSizePx, jr as heroCopyFragment, jt as resolveOfferingsPreviewGroupCta, k as publicRouteCandidatesSchema, ka as isPublicEventPricingOptionDisplayable, ki as parseFieldDefinitions, kn as blockBookingPaymentTermsSchema, kr as ctaRowFragment, kt as normalizeOfferingsPreviewItemLimit, l as NEWSLETTER_SIGNUPS_PAUSED_MESSAGE, li as CirclePlusIcon, ln as getDayOfWeek, lr as listLookSlot, lt as setContextResolveImageUrlContext, m as checkoutBlockDefinition, ma as formatDate$1, mi as FileTextIcon, mn as isToday, mr as Grid, mt as eventRegistrationBlockDefinition, na as resolveWholeSeriesBookingPhase, ni as runTransforms, nn as formatTime, nr as createInteractiveIslandCodec, o as resolveLocationMapLocation, oa as parseMailingListPlacementTargeting, oi as ArrowDownIcon, on as getLocalMinuteOfDay, or as defineProgressiveBlockRuntime, ot as resolvePublicMediaUrl, p as buildGiftingInteractiveIslandProps, pa as mapDrawingSchema, pi as FileSpreadsheetIcon, pn as isSameCalendarDay, q as listingEventCardProps, qt as eventLocalDateKey, r as normalizeBlockContent, ra as buildMailingListSignupBlockSourceRef, ri as buildGeneratedBlockIconRenderAssetLookupFromUnknown, rn as groupEventsByDate, rr as defineInteractiveIslandMetaKeys, s as newsletterSignupBlockDefinition, sa as sameMailingListPlacementTargeting, si as ChevronDownIcon, sn as addDays, sr as listItemPresentation, st as buildResolveImageUrlContext, t as getBlockDefinition, ta as orderedLiveRunSessions, tn as formatEventTimeRange, tr as buildInteractiveIslandProps, tt as MediaPlaceholder, u as buildNewsletterFormInteractiveIslandProps, ua as normalizeLocationAddressText, ui as ClockIcon, un as getOrderedDayNames, ur as lookListPresentationSchemaShape, ut as sanitizeHref, v as shopBlockDefinition, va as compareLocalScheduleDates, vi as isInlineTextEmpty, vn as canJoinEventWaitlistOnAnyMode, vr as cardFragment, w as shopProductPresentation, wa as resolveBookingBusinessTimeZone, wn as blockSiteTermsSchema, wr as formCopyFragment, x as buildProductDetailInteractiveIslandProps, xa as getLocalScheduleDate, xn as getEventAvailability, xr as blogFeaturedPostFragment, y as buildCartInteractiveIslandProps, ya as formatBookingCompactEnglishTime, yi as parseInlineTextFromUnknown, yn as formatEventRemainingPlaces, yr as faqAccordionFragment, z as buildEventCollectionHydration, zn as parseTeamMemberSpecialties, zt as SpinnerNode } from "./registry-4ZF3bUuJ.mjs";
|
|
4
|
+
import { _ as validateManifestDraft, g as compileManifestContentContract, u as readSdkPreviewPublishedPlacement } from "./themeAdmission-CVc04B9m.mjs";
|
|
5
|
+
import { C as resolvePageRouteTarget, D as parseStoredVariant, E as toPresentationPage, S as resolveEntryRouteTarget, T as toEditorPresentationPage, _ as buildLinkedContentEditTarget, b as defaultTransforms, f as buildPageRenderPlan, g as retargetJoinsAcrossOmissions, h as renderedJoinLayout, m as joinSlotKey, p as composePageJoins, v as resolveLinkedEntryInlineFieldEligibility, w as resolveRouteTarget } from "./prefetchBlockData-Cn9k3DW6.mjs";
|
|
6
|
+
import { _ as resolveEffectiveArrangement, d as arrangementLookHooks, h as arrangementManifestFromVariants } from "./effectiveNavLinkStyle-DLzJPcDL.mjs";
|
|
7
|
+
import "./site-styles-CxE9F3hj.mjs";
|
|
8
8
|
import { a as isRecord$4, i as isObjectRecord, t as RichTextDocSchema } from "./richTextSchema-YYc85FX4.mjs";
|
|
9
|
-
import { a as buildThemeRuntime$1, n as ResponsiveScope, o as mergeContentWithBlockStyleOverrides, r as ThemeScope$1, s as generateDefaultAccordionSystem } from "./src-
|
|
9
|
+
import { a as buildThemeRuntime$1, n as ResponsiveScope, o as mergeContentWithBlockStyleOverrides, r as ThemeScope$1, s as generateDefaultAccordionSystem } from "./src-C44_fMy5.mjs";
|
|
10
10
|
import { t as getAtPath } from "./src-Cxucn-1P.mjs";
|
|
11
11
|
import { z } from "zod";
|
|
12
12
|
import * as React$1 from "react";
|
|
@@ -318,6 +318,50 @@ function getFragmentRegistry() {
|
|
|
318
318
|
return fragmentRegistry;
|
|
319
319
|
}
|
|
320
320
|
//#endregion
|
|
321
|
+
//#region ../blocks/src/system/blocks/events/shared/detailsSelection.ts
|
|
322
|
+
function isFutureOrNow(iso, nowIso) {
|
|
323
|
+
const ts = Date.parse(iso);
|
|
324
|
+
const now = Date.parse(nowIso);
|
|
325
|
+
if (!Number.isFinite(ts) || !Number.isFinite(now)) return false;
|
|
326
|
+
return ts >= now;
|
|
327
|
+
}
|
|
328
|
+
const localDateKey = (startsAt, timeZone) => getBookingLocalDateKey(toScheduledBookingDateTime({
|
|
329
|
+
startsAt,
|
|
330
|
+
timeZone
|
|
331
|
+
}));
|
|
332
|
+
function selectRequested(events, requested) {
|
|
333
|
+
if (!requested) return null;
|
|
334
|
+
const byId = events.find((event) => event.occurrenceId === requested.id || event.id === requested.id);
|
|
335
|
+
if (byId) return byId;
|
|
336
|
+
if (!requested.startsAt || !requested.timeZone) return null;
|
|
337
|
+
const requestedDate = localDateKey(requested.startsAt, requested.timeZone);
|
|
338
|
+
return events.find((event) => localDateKey(event.startsAt, event.timeZone) === requestedDate) ?? null;
|
|
339
|
+
}
|
|
340
|
+
function selectNextUpcoming(events, nowIso) {
|
|
341
|
+
return [...events].filter((event) => isFutureOrNow(event.startsAt, nowIso)).sort((left, right) => Date.parse(left.startsAt) - Date.parse(right.startsAt))[0] ?? null;
|
|
342
|
+
}
|
|
343
|
+
function selectCompletedWholeSeries(events) {
|
|
344
|
+
if (events.length === 0 || !events.every((event) => event.bookingScope === "whole_series")) return null;
|
|
345
|
+
return [...events].sort((left, right) => Date.parse(right.startsAt) - Date.parse(left.startsAt))[0] ?? null;
|
|
346
|
+
}
|
|
347
|
+
function selectEventDetailsCandidate(events, requested, nowIso) {
|
|
348
|
+
const selected = selectRequested(events, requested);
|
|
349
|
+
if (selected) return {
|
|
350
|
+
event: selected,
|
|
351
|
+
mode: "selected"
|
|
352
|
+
};
|
|
353
|
+
const upcoming = selectNextUpcoming(events, nowIso);
|
|
354
|
+
if (upcoming) return {
|
|
355
|
+
event: upcoming,
|
|
356
|
+
mode: "next"
|
|
357
|
+
};
|
|
358
|
+
const completed = selectCompletedWholeSeries(events);
|
|
359
|
+
return completed ? {
|
|
360
|
+
event: completed,
|
|
361
|
+
mode: "completed"
|
|
362
|
+
} : null;
|
|
363
|
+
}
|
|
364
|
+
//#endregion
|
|
321
365
|
//#region ../blocks/src/system/runtime/nodes/events/domain/bookability.ts
|
|
322
366
|
/**
|
|
323
367
|
* Whether a public event has a registration path a visitor can take.
|
|
@@ -1170,6 +1214,55 @@ z.discriminatedUnion("kind", [
|
|
|
1170
1214
|
})
|
|
1171
1215
|
]);
|
|
1172
1216
|
//#endregion
|
|
1217
|
+
//#region ../blocks/src/system/runtime/nodes/events/shared/EventCardIcons.tsx
|
|
1218
|
+
function MapPinIcon({ className, size = 16, strokeWidth = 2 }) {
|
|
1219
|
+
return /* @__PURE__ */ jsxs("svg", {
|
|
1220
|
+
className,
|
|
1221
|
+
width: size,
|
|
1222
|
+
height: size,
|
|
1223
|
+
viewBox: "0 0 24 24",
|
|
1224
|
+
fill: "none",
|
|
1225
|
+
stroke: "currentColor",
|
|
1226
|
+
strokeWidth,
|
|
1227
|
+
strokeLinecap: "round",
|
|
1228
|
+
strokeLinejoin: "round",
|
|
1229
|
+
"aria-hidden": "true",
|
|
1230
|
+
focusable: "false",
|
|
1231
|
+
children: [/* @__PURE__ */ jsx("path", { d: "M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z" }), /* @__PURE__ */ jsx("circle", {
|
|
1232
|
+
cx: "12",
|
|
1233
|
+
cy: "10",
|
|
1234
|
+
r: "3"
|
|
1235
|
+
})]
|
|
1236
|
+
});
|
|
1237
|
+
}
|
|
1238
|
+
function CalendarIcon({ className, size = 16, strokeWidth = 2 }) {
|
|
1239
|
+
return /* @__PURE__ */ jsxs("svg", {
|
|
1240
|
+
className,
|
|
1241
|
+
width: size,
|
|
1242
|
+
height: size,
|
|
1243
|
+
viewBox: "0 0 24 24",
|
|
1244
|
+
fill: "none",
|
|
1245
|
+
stroke: "currentColor",
|
|
1246
|
+
strokeWidth,
|
|
1247
|
+
strokeLinecap: "round",
|
|
1248
|
+
strokeLinejoin: "round",
|
|
1249
|
+
"aria-hidden": "true",
|
|
1250
|
+
focusable: "false",
|
|
1251
|
+
children: [
|
|
1252
|
+
/* @__PURE__ */ jsx("rect", {
|
|
1253
|
+
x: "3",
|
|
1254
|
+
y: "4",
|
|
1255
|
+
width: "18",
|
|
1256
|
+
height: "18",
|
|
1257
|
+
rx: "2"
|
|
1258
|
+
}),
|
|
1259
|
+
/* @__PURE__ */ jsx("path", { d: "M16 2v4" }),
|
|
1260
|
+
/* @__PURE__ */ jsx("path", { d: "M8 2v4" }),
|
|
1261
|
+
/* @__PURE__ */ jsx("path", { d: "M3 10h18" })
|
|
1262
|
+
]
|
|
1263
|
+
});
|
|
1264
|
+
}
|
|
1265
|
+
//#endregion
|
|
1173
1266
|
//#region ../blocks/src/system/runtime/nodes/events/shared/EventItem.tsx
|
|
1174
1267
|
/** Arrangement content choices are data, ready for other live offering lists to reuse. */
|
|
1175
1268
|
const eventItemParts = {
|
|
@@ -1202,6 +1295,8 @@ const eventItemParts = {
|
|
|
1202
1295
|
"date",
|
|
1203
1296
|
"title",
|
|
1204
1297
|
"meta",
|
|
1298
|
+
"time",
|
|
1299
|
+
"places",
|
|
1205
1300
|
"action"
|
|
1206
1301
|
],
|
|
1207
1302
|
"month-day": [
|
|
@@ -1218,16 +1313,31 @@ function eventItemFacts(props) {
|
|
|
1218
1313
|
date: formatEventCompactDateRail(props.event.startsAt, options, "as-written"),
|
|
1219
1314
|
time: formatEventTimeRange(props.event, options),
|
|
1220
1315
|
price: formatEventPrice(props.event),
|
|
1221
|
-
meta:
|
|
1222
|
-
|
|
1223
|
-
formatEventTeacherLine(props.event),
|
|
1224
|
-
props.showVenue !== false ? props.event.venue?.name : null
|
|
1225
|
-
].filter(Boolean).join(" · "),
|
|
1316
|
+
meta: eventItemMeta(props),
|
|
1317
|
+
venueIcon: props.arrangement === "compact" && props.showVenue !== false && Boolean(props.event.venue),
|
|
1226
1318
|
places: props.showCapacity ? formatEventRemainingPlaces(props.event, { full: "Sold out" }) : null,
|
|
1227
1319
|
availability: availability.isFull ? "full" : availability.status === "filling" ? "low" : "available",
|
|
1228
1320
|
description: props.event.presentation?.summary ?? props.event.description
|
|
1229
1321
|
};
|
|
1230
1322
|
}
|
|
1323
|
+
/** Compact rows keep pricing in the details rail and time in the action rail. */
|
|
1324
|
+
function eventItemMeta(props) {
|
|
1325
|
+
const parts = props.parts ?? eventItemParts[props.arrangement];
|
|
1326
|
+
const venue = props.showVenue !== false ? props.event.venue?.name : null;
|
|
1327
|
+
const teacher = formatEventTeacherLine(props.event);
|
|
1328
|
+
const time = parts.includes("time") ? null : formatEventTimeRange(props.event, eventDateOptions(props.event));
|
|
1329
|
+
const price = props.arrangement === "compact" && !parts.includes("price") ? formatEventPrice(props.event) : null;
|
|
1330
|
+
return (props.arrangement === "compact" ? [
|
|
1331
|
+
venue,
|
|
1332
|
+
teacher,
|
|
1333
|
+
price,
|
|
1334
|
+
time
|
|
1335
|
+
] : [
|
|
1336
|
+
time,
|
|
1337
|
+
teacher,
|
|
1338
|
+
venue
|
|
1339
|
+
]).filter(Boolean).join(" · ");
|
|
1340
|
+
}
|
|
1231
1341
|
/**
|
|
1232
1342
|
* Keep one RSC component boundary per item. Re-forwarding shared presentation
|
|
1233
1343
|
* props through layout/part components multiplies React's development debug
|
|
@@ -1261,15 +1371,22 @@ function renderCalendarItem(props) {
|
|
|
1261
1371
|
...listLookSlot(props, props.arrangement === "grid" ? "item-body" : "what"),
|
|
1262
1372
|
children: parts.filter(body).map(renderPart)
|
|
1263
1373
|
}),
|
|
1264
|
-
parts.filter((part) => [
|
|
1374
|
+
renderCalendarTrailingParts(props, parts.filter((part) => [
|
|
1265
1375
|
"time",
|
|
1266
1376
|
"places",
|
|
1267
1377
|
"price",
|
|
1268
1378
|
"action"
|
|
1269
|
-
].includes(part) && !body(part))
|
|
1379
|
+
].includes(part) && !body(part)), renderPart)
|
|
1270
1380
|
]
|
|
1271
1381
|
});
|
|
1272
1382
|
}
|
|
1383
|
+
function renderCalendarTrailingParts(props, parts, renderPart) {
|
|
1384
|
+
const content = parts.map(renderPart);
|
|
1385
|
+
return props.arrangement === "compact" && parts.length > 0 ? /* @__PURE__ */ jsx("div", {
|
|
1386
|
+
...listLookSlot(props, "item-actions"),
|
|
1387
|
+
children: content
|
|
1388
|
+
}) : content;
|
|
1389
|
+
}
|
|
1273
1390
|
function eventItemTag(arrangement) {
|
|
1274
1391
|
return arrangement === "ledger" || arrangement === "day-groups" ? "li" : "article";
|
|
1275
1392
|
}
|
|
@@ -1302,9 +1419,9 @@ function renderEventItemContentPart({ part, props, facts }) {
|
|
|
1302
1419
|
children: props.event.title
|
|
1303
1420
|
})
|
|
1304
1421
|
});
|
|
1305
|
-
case "time": return /* @__PURE__ */
|
|
1422
|
+
case "time": return /* @__PURE__ */ jsxs("p", {
|
|
1306
1423
|
...listLookSlot(props, "time"),
|
|
1307
|
-
children: facts.time
|
|
1424
|
+
children: [props.arrangement === "compact" ? /* @__PURE__ */ jsx(ClockIcon, { "aria-hidden": "true" }) : null, facts.time]
|
|
1308
1425
|
});
|
|
1309
1426
|
case "places": return facts.places ? /* @__PURE__ */ jsx("p", {
|
|
1310
1427
|
...listLookSlot(props, "places"),
|
|
@@ -1339,6 +1456,7 @@ function renderEventItemMeta({ props, facts }) {
|
|
|
1339
1456
|
return facts.meta || places ? /* @__PURE__ */ jsxs("p", {
|
|
1340
1457
|
...listLookSlot(props, "item-meta"),
|
|
1341
1458
|
children: [
|
|
1459
|
+
facts.venueIcon ? /* @__PURE__ */ jsx(MapPinIcon, {}) : null,
|
|
1342
1460
|
facts.meta,
|
|
1343
1461
|
facts.meta && places ? " · " : null,
|
|
1344
1462
|
places ? /* @__PURE__ */ jsx("span", {
|
|
@@ -1349,13 +1467,15 @@ function renderEventItemMeta({ props, facts }) {
|
|
|
1349
1467
|
}) : null;
|
|
1350
1468
|
}
|
|
1351
1469
|
function renderEventItemImage(props) {
|
|
1470
|
+
const link = resolveEventLinkProps(props.event);
|
|
1352
1471
|
return /* @__PURE__ */ jsx(CardListContentPart, {
|
|
1353
1472
|
part: "media",
|
|
1354
1473
|
item: {
|
|
1355
1474
|
id: props.event.id,
|
|
1356
1475
|
title: props.event.title,
|
|
1357
1476
|
media: props.event.presentation?.image,
|
|
1358
|
-
|
|
1477
|
+
titleLink: link,
|
|
1478
|
+
newTabHint: link.target === "_blank"
|
|
1359
1479
|
},
|
|
1360
1480
|
presentation: props
|
|
1361
1481
|
});
|
|
@@ -1736,102 +1856,6 @@ function cropHeightStyle(height, heightAs) {
|
|
|
1736
1856
|
return heightAs === "minimum" ? { minHeight: height } : { height };
|
|
1737
1857
|
}
|
|
1738
1858
|
//#endregion
|
|
1739
|
-
//#region ../blocks/src/system/runtime/nodes/shared/LocationMapActions.tsx
|
|
1740
|
-
/**
|
|
1741
|
-
* `compact` (event details, cards and modals) keeps two small ghost buttons;
|
|
1742
|
-
* `block` (the map block) leads with a secondary directions button and keeps
|
|
1743
|
-
* Google Maps as a plain text link beside it.
|
|
1744
|
-
*/
|
|
1745
|
-
function LocationMapActions(props) {
|
|
1746
|
-
const links = locationMapLinks(props);
|
|
1747
|
-
const directionsLabel = props.directionsLabel ?? "Get directions";
|
|
1748
|
-
const googleMapsLabel = props.googleMapsLabel ?? "Open in Google Maps";
|
|
1749
|
-
if (props.layout === "block") return /* @__PURE__ */ jsxs("div", {
|
|
1750
|
-
className: "rb-location-map-actions",
|
|
1751
|
-
children: [links.directions ? /* @__PURE__ */ jsx(ThemedButtonLink, {
|
|
1752
|
-
href: links.directions,
|
|
1753
|
-
target: "_blank",
|
|
1754
|
-
rel: "noreferrer",
|
|
1755
|
-
variant: "secondary",
|
|
1756
|
-
size: "sm",
|
|
1757
|
-
label: directionsLabel
|
|
1758
|
-
}) : null, links.googleMaps ? /* @__PURE__ */ jsx("a", {
|
|
1759
|
-
className: "rb-location-map-link",
|
|
1760
|
-
href: links.googleMaps,
|
|
1761
|
-
target: "_blank",
|
|
1762
|
-
rel: "noreferrer",
|
|
1763
|
-
children: googleMapsLabel
|
|
1764
|
-
}) : null]
|
|
1765
|
-
});
|
|
1766
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
1767
|
-
className: "rb-flex rb-flex-wrap rb-gap-2",
|
|
1768
|
-
children: [links.directions ? /* @__PURE__ */ jsx(ThemedButtonLink, {
|
|
1769
|
-
href: links.directions,
|
|
1770
|
-
target: "_blank",
|
|
1771
|
-
rel: "noreferrer",
|
|
1772
|
-
variant: "ghost",
|
|
1773
|
-
size: "sm",
|
|
1774
|
-
label: directionsLabel
|
|
1775
|
-
}) : null, links.googleMaps ? /* @__PURE__ */ jsx(ThemedButtonLink, {
|
|
1776
|
-
href: links.googleMaps,
|
|
1777
|
-
target: "_blank",
|
|
1778
|
-
rel: "noreferrer",
|
|
1779
|
-
variant: "ghost",
|
|
1780
|
-
size: "sm",
|
|
1781
|
-
label: googleMapsLabel
|
|
1782
|
-
}) : null]
|
|
1783
|
-
});
|
|
1784
|
-
}
|
|
1785
|
-
//#endregion
|
|
1786
|
-
//#region ../blocks/src/system/runtime/nodes/events/shared/EventCardIcons.tsx
|
|
1787
|
-
function MapPinIcon({ className, size = 16, strokeWidth = 2 }) {
|
|
1788
|
-
return /* @__PURE__ */ jsxs("svg", {
|
|
1789
|
-
className,
|
|
1790
|
-
width: size,
|
|
1791
|
-
height: size,
|
|
1792
|
-
viewBox: "0 0 24 24",
|
|
1793
|
-
fill: "none",
|
|
1794
|
-
stroke: "currentColor",
|
|
1795
|
-
strokeWidth,
|
|
1796
|
-
strokeLinecap: "round",
|
|
1797
|
-
strokeLinejoin: "round",
|
|
1798
|
-
"aria-hidden": "true",
|
|
1799
|
-
focusable: "false",
|
|
1800
|
-
children: [/* @__PURE__ */ jsx("path", { d: "M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z" }), /* @__PURE__ */ jsx("circle", {
|
|
1801
|
-
cx: "12",
|
|
1802
|
-
cy: "10",
|
|
1803
|
-
r: "3"
|
|
1804
|
-
})]
|
|
1805
|
-
});
|
|
1806
|
-
}
|
|
1807
|
-
function CalendarIcon({ className, size = 16, strokeWidth = 2 }) {
|
|
1808
|
-
return /* @__PURE__ */ jsxs("svg", {
|
|
1809
|
-
className,
|
|
1810
|
-
width: size,
|
|
1811
|
-
height: size,
|
|
1812
|
-
viewBox: "0 0 24 24",
|
|
1813
|
-
fill: "none",
|
|
1814
|
-
stroke: "currentColor",
|
|
1815
|
-
strokeWidth,
|
|
1816
|
-
strokeLinecap: "round",
|
|
1817
|
-
strokeLinejoin: "round",
|
|
1818
|
-
"aria-hidden": "true",
|
|
1819
|
-
focusable: "false",
|
|
1820
|
-
children: [
|
|
1821
|
-
/* @__PURE__ */ jsx("rect", {
|
|
1822
|
-
x: "3",
|
|
1823
|
-
y: "4",
|
|
1824
|
-
width: "18",
|
|
1825
|
-
height: "18",
|
|
1826
|
-
rx: "2"
|
|
1827
|
-
}),
|
|
1828
|
-
/* @__PURE__ */ jsx("path", { d: "M16 2v4" }),
|
|
1829
|
-
/* @__PURE__ */ jsx("path", { d: "M8 2v4" }),
|
|
1830
|
-
/* @__PURE__ */ jsx("path", { d: "M3 10h18" })
|
|
1831
|
-
]
|
|
1832
|
-
});
|
|
1833
|
-
}
|
|
1834
|
-
//#endregion
|
|
1835
1859
|
//#region ../blocks/src/system/runtime/nodes/events/shared/EventCard.tsx
|
|
1836
1860
|
/** The category's badge, when the event has a category. */
|
|
1837
1861
|
function eventCardCategoryBadge(category) {
|
|
@@ -2015,20 +2039,13 @@ function EventCardVenue(props) {
|
|
|
2015
2039
|
if (!venue) return null;
|
|
2016
2040
|
return /* @__PURE__ */ jsxs("div", {
|
|
2017
2041
|
className: "rb-mb-3",
|
|
2018
|
-
children: [
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
props.
|
|
2024
|
-
|
|
2025
|
-
addressText: venue.address
|
|
2026
|
-
}) : null,
|
|
2027
|
-
props.showMap && props.allowMap && venue.location && props.mapSlot && /* @__PURE__ */ jsx("div", {
|
|
2028
|
-
className: "rb-mt-2",
|
|
2029
|
-
children: props.mapSlot
|
|
2030
|
-
})
|
|
2031
|
-
]
|
|
2042
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
2043
|
+
className: "rb-flex rb-items-center rb-gap-2 rb-caption",
|
|
2044
|
+
children: [/* @__PURE__ */ jsx(MapPinIcon, { className: "rb-shrink-0" }), /* @__PURE__ */ jsxs("span", { children: [/* @__PURE__ */ jsx("strong", { children: venue.name }), venue.address ? ` · ${venue.address}` : null] })]
|
|
2045
|
+
}), props.showMap && props.allowMap && venue.location && props.mapSlot && /* @__PURE__ */ jsx("div", {
|
|
2046
|
+
className: "rb-mt-2",
|
|
2047
|
+
children: props.mapSlot
|
|
2048
|
+
})]
|
|
2032
2049
|
});
|
|
2033
2050
|
}
|
|
2034
2051
|
function EventCardFooter(props) {
|
|
@@ -2301,23 +2318,31 @@ function EventQuickDates({ events, pathname, buttonVariant = "primary", dateStyl
|
|
|
2301
2318
|
})]
|
|
2302
2319
|
});
|
|
2303
2320
|
}
|
|
2321
|
+
/**
|
|
2322
|
+
* The complete link that books one date, shared by the strip and by date rows.
|
|
2323
|
+
* Null when the date has no registration path (closed, paused, not open yet,
|
|
2324
|
+
* no registration, or full with no waitlist), so no caller repeats that gate.
|
|
2325
|
+
*/
|
|
2326
|
+
function eventDateBookingLink(event, pathname, dateLabel) {
|
|
2327
|
+
if (!isBookableEvent(event)) return null;
|
|
2328
|
+
const cta = resolveEventCta(event);
|
|
2329
|
+
return {
|
|
2330
|
+
href: resolveRuntimeEventDestination(event).kind === "external" ? cta.href : resolveDedicatedBookingHref(pathname, {
|
|
2331
|
+
kind: "event_occurrence",
|
|
2332
|
+
occurrenceId: event.occurrenceId
|
|
2333
|
+
}),
|
|
2334
|
+
target: cta.external ? "_blank" : void 0,
|
|
2335
|
+
rel: cta.external ? "noopener noreferrer" : void 0,
|
|
2336
|
+
"aria-label": `${cta.label} ${event.title}, ${dateLabel}`,
|
|
2337
|
+
label: cta.label
|
|
2338
|
+
};
|
|
2339
|
+
}
|
|
2304
2340
|
/** Decide the formatted date and complete booking link before rendering. */
|
|
2305
2341
|
function quickDateCardPresentation(props) {
|
|
2306
|
-
const
|
|
2307
|
-
const date = formatEventQuickDate(event, props.dateStyle);
|
|
2308
|
-
const cta = resolveEventCta(event);
|
|
2342
|
+
const date = formatEventQuickDate(props.event, props.dateStyle);
|
|
2309
2343
|
return {
|
|
2310
2344
|
date,
|
|
2311
|
-
bookingLink:
|
|
2312
|
-
href: resolveRuntimeEventDestination(event).kind === "external" ? cta.href : resolveDedicatedBookingHref(props.pathname, {
|
|
2313
|
-
kind: "event_occurrence",
|
|
2314
|
-
occurrenceId: event.occurrenceId
|
|
2315
|
-
}),
|
|
2316
|
-
target: cta.external ? "_blank" : void 0,
|
|
2317
|
-
rel: cta.external ? "noopener noreferrer" : void 0,
|
|
2318
|
-
"aria-label": `${cta.label} ${event.title}, ${date.label}`,
|
|
2319
|
-
label: cta.label
|
|
2320
|
-
}
|
|
2345
|
+
bookingLink: eventDateBookingLink(props.event, props.pathname, date.label)
|
|
2321
2346
|
};
|
|
2322
2347
|
}
|
|
2323
2348
|
function EventQuickDateCard(props) {
|
|
@@ -2353,12 +2378,12 @@ function EventQuickDateCard(props) {
|
|
|
2353
2378
|
children: [/* @__PURE__ */ jsx("span", {
|
|
2354
2379
|
className: "event-quick-date-price",
|
|
2355
2380
|
children: formatEventPrice(event)
|
|
2356
|
-
}), /* @__PURE__ */ jsx(ThemedButtonLink, {
|
|
2381
|
+
}), bookingLink ? /* @__PURE__ */ jsx(ThemedButtonLink, {
|
|
2357
2382
|
variant: props.buttonVariant,
|
|
2358
2383
|
size: "sm",
|
|
2359
2384
|
extraClassName: "event-quick-date-cta",
|
|
2360
2385
|
...bookingLink
|
|
2361
|
-
})]
|
|
2386
|
+
}) : null]
|
|
2362
2387
|
})
|
|
2363
2388
|
]
|
|
2364
2389
|
});
|
|
@@ -2723,10 +2748,23 @@ const PRIVATE_LOG_KEYS = /* @__PURE__ */ new Set([
|
|
|
2723
2748
|
"requestbodyvalues",
|
|
2724
2749
|
"provideroptions",
|
|
2725
2750
|
"byok",
|
|
2726
|
-
"apikey"
|
|
2751
|
+
"apikey",
|
|
2752
|
+
"drafttoken"
|
|
2727
2753
|
]);
|
|
2754
|
+
/**
|
|
2755
|
+
* Query values never logged, wherever a URL turns up (both Next apps use this
|
|
2756
|
+
* logger, and URLs also occur inside nested errors): the draft credential, and
|
|
2757
|
+
* an unsaved Appearance body. That body travels as `changes` on the preview
|
|
2758
|
+
* page and, encoded, inside `targetPath` on the dashboard's `/preview/start`,
|
|
2759
|
+
* so the whole `targetPath` value goes too: no encoding of `changes` can hide
|
|
2760
|
+
* inside it.
|
|
2761
|
+
*/
|
|
2762
|
+
function redactPrivateQueryValues(value) {
|
|
2763
|
+
return value.replace(/([?&](?:draftToken|targetPath|changes)=)[^&#\s"']*/gi, "$1[redacted]");
|
|
2764
|
+
}
|
|
2728
2765
|
function logJsonValue(key, value, seen) {
|
|
2729
2766
|
if (PRIVATE_LOG_KEYS.has(key.toLowerCase())) return void 0;
|
|
2767
|
+
if (typeof value === "string") return redactPrivateQueryValues(value);
|
|
2730
2768
|
if (typeof value === "bigint") return String(value);
|
|
2731
2769
|
if (value === null || typeof value !== "object") return value;
|
|
2732
2770
|
if (seen.has(value)) return "[circular]";
|
|
@@ -2749,11 +2787,11 @@ function safeStringify(value, maxLength) {
|
|
|
2749
2787
|
}
|
|
2750
2788
|
function toScalar(value, maxLength) {
|
|
2751
2789
|
if (value == null) return null;
|
|
2752
|
-
if (typeof value === "string") return truncate(value, maxLength);
|
|
2790
|
+
if (typeof value === "string") return truncate(redactPrivateQueryValues(value), maxLength);
|
|
2753
2791
|
if (typeof value === "number") return Number.isFinite(value) ? value : null;
|
|
2754
2792
|
if (typeof value === "boolean") return value;
|
|
2755
2793
|
if (value instanceof Date) return value.toISOString();
|
|
2756
|
-
if (value instanceof Error) return truncate(`${value.name}: ${value.message}
|
|
2794
|
+
if (value instanceof Error) return truncate(redactPrivateQueryValues(`${value.name}: ${value.message}`), maxLength);
|
|
2757
2795
|
return safeStringify(value, maxLength);
|
|
2758
2796
|
}
|
|
2759
2797
|
function sanitizeV2(fields, maxStringLength) {
|
|
@@ -2858,6 +2896,42 @@ function renderMark(mark, key, child) {
|
|
|
2858
2896
|
}
|
|
2859
2897
|
}
|
|
2860
2898
|
//#endregion
|
|
2899
|
+
//#region ../blocks/src/system/runtime/nodes/shared/LocationMapActions.tsx
|
|
2900
|
+
/**
|
|
2901
|
+
* `compact` (event details) is one plain Google Maps text link under the venue;
|
|
2902
|
+
* `block` (the map block) leads with a secondary directions button and keeps
|
|
2903
|
+
* the same Google Maps text link beside it.
|
|
2904
|
+
*/
|
|
2905
|
+
function LocationMapActions(props) {
|
|
2906
|
+
const links = locationMapLinks(props);
|
|
2907
|
+
const directionsLabel = props.directionsLabel ?? "Get directions";
|
|
2908
|
+
const googleMapsLabel = props.googleMapsLabel ?? "Open in Google Maps";
|
|
2909
|
+
if (props.layout === "block") return /* @__PURE__ */ jsxs("div", {
|
|
2910
|
+
className: "rb-location-map-actions",
|
|
2911
|
+
children: [links.directions ? /* @__PURE__ */ jsx(ThemedButtonLink, {
|
|
2912
|
+
href: links.directions,
|
|
2913
|
+
target: "_blank",
|
|
2914
|
+
rel: "noreferrer",
|
|
2915
|
+
variant: "secondary",
|
|
2916
|
+
size: "sm",
|
|
2917
|
+
label: directionsLabel
|
|
2918
|
+
}) : null, links.googleMaps ? /* @__PURE__ */ jsx("a", {
|
|
2919
|
+
className: "rb-location-map-link",
|
|
2920
|
+
href: links.googleMaps,
|
|
2921
|
+
target: "_blank",
|
|
2922
|
+
rel: "noreferrer",
|
|
2923
|
+
children: googleMapsLabel
|
|
2924
|
+
}) : null]
|
|
2925
|
+
});
|
|
2926
|
+
return links.googleMaps ? /* @__PURE__ */ jsx("p", { children: /* @__PURE__ */ jsx("a", {
|
|
2927
|
+
className: "rb-location-map-link",
|
|
2928
|
+
href: links.googleMaps,
|
|
2929
|
+
target: "_blank",
|
|
2930
|
+
rel: "noreferrer",
|
|
2931
|
+
children: googleMapsLabel
|
|
2932
|
+
}) }) : null;
|
|
2933
|
+
}
|
|
2934
|
+
//#endregion
|
|
2861
2935
|
//#region ../blocks/src/system/runtime/nodes/location-map.view.tsx
|
|
2862
2936
|
function OpeningHoursTable({ hours, lookLayout }) {
|
|
2863
2937
|
if (!hours) return null;
|
|
@@ -4208,15 +4282,6 @@ function appointmentServicesListing(view, arrangement) {
|
|
|
4208
4282
|
} : view;
|
|
4209
4283
|
}
|
|
4210
4284
|
//#endregion
|
|
4211
|
-
//#region ../blocks/src/system/blocks/shared/teamMembers.ts
|
|
4212
|
-
const teamMemberSpecialtiesInputSchema = z.union([z.string(), z.array(z.string())]).nullish();
|
|
4213
|
-
function parseTeamMemberSpecialties(value) {
|
|
4214
|
-
const parsed = teamMemberSpecialtiesInputSchema.safeParse(value);
|
|
4215
|
-
if (!parsed.success) return [];
|
|
4216
|
-
const parts = typeof parsed.data === "string" ? parsed.data.split(/\r?\n|,/) : parsed.data ?? [];
|
|
4217
|
-
return [...new Set(parts.map((part) => part.trim()).filter(Boolean))];
|
|
4218
|
-
}
|
|
4219
|
-
//#endregion
|
|
4220
4285
|
//#region ../blocks/src/system/runtime/nodes/team-members.tsx
|
|
4221
4286
|
const teamMemberCardSchema = z.object({
|
|
4222
4287
|
id: z.string().optional(),
|
|
@@ -4225,12 +4290,13 @@ const teamMemberCardSchema = z.object({
|
|
|
4225
4290
|
bio: z.union([z.string(), RichTextDocSchema]).nullish(),
|
|
4226
4291
|
profileBio: RichTextDocSchema.nullish(),
|
|
4227
4292
|
photo: runtimeMediaSchema.refine((value) => value.type === "image").nullish(),
|
|
4293
|
+
summary: z.string().nullish(),
|
|
4228
4294
|
profilePath: z.string().nullish(),
|
|
4229
4295
|
specialties: z.unknown().transform(parseTeamMemberSpecialties)
|
|
4230
4296
|
});
|
|
4231
4297
|
/** Staff and manual members meet at one boundary; Look data chooses biography length. */
|
|
4232
|
-
function teamMemberCardContent(member, index, biographySource) {
|
|
4233
|
-
const biography = biographySource === "profile" && member.profileBio ? member.profileBio : member.bio;
|
|
4298
|
+
function teamMemberCardContent(member, index, biographySource, cardBiography) {
|
|
4299
|
+
const biography = cardBiography === "any" ? cardText(teamMemberCardBiography(member)) : biographySource === "profile" && member.profileBio ? member.profileBio : member.bio;
|
|
4234
4300
|
const href = sanitizeHref(member.profilePath);
|
|
4235
4301
|
return {
|
|
4236
4302
|
id: member.id ?? `member-${index}`,
|
|
@@ -4248,12 +4314,83 @@ function teamMemberCardContent(member, index, biographySource) {
|
|
|
4248
4314
|
} } : {}
|
|
4249
4315
|
};
|
|
4250
4316
|
}
|
|
4317
|
+
function cardText(biography) {
|
|
4318
|
+
if (!biography) return null;
|
|
4319
|
+
return biography.kind === "document" ? biography.document : biography.paragraphs.join("\n\n");
|
|
4320
|
+
}
|
|
4321
|
+
/**
|
|
4322
|
+
* The quiet line under an "About" heading: the person's name and role. The
|
|
4323
|
+
* name is left out when the heading already says it, so it isn't read twice.
|
|
4324
|
+
*/
|
|
4325
|
+
function teamMemberAboutLine(input) {
|
|
4326
|
+
const name = input.name.trim();
|
|
4327
|
+
const parts = [name.length > 0 && (input.heading ?? "").toLocaleLowerCase().includes(name.toLocaleLowerCase()) ? "" : name, input.role?.trim() ?? ""].filter(Boolean);
|
|
4328
|
+
return parts.length > 0 ? parts.join(", ") : null;
|
|
4329
|
+
}
|
|
4330
|
+
/** The one person a section can be about: the list's only member, with a bio to read. */
|
|
4331
|
+
function personToWriteAbout(members) {
|
|
4332
|
+
const [member, ...others] = members;
|
|
4333
|
+
const biography = member && others.length === 0 ? teamMemberBiography(member) : null;
|
|
4334
|
+
return member && biography ? {
|
|
4335
|
+
member,
|
|
4336
|
+
biography
|
|
4337
|
+
} : null;
|
|
4338
|
+
}
|
|
4339
|
+
/**
|
|
4340
|
+
* One person given the section: their photo in the look's frame, a name and
|
|
4341
|
+
* role line, and their bio in full. The section's heading stays where the
|
|
4342
|
+
* block puts it; the stylesheet sets it beside the photo.
|
|
4343
|
+
*/
|
|
4344
|
+
function TeamMemberAbout({ member, biography, props }) {
|
|
4345
|
+
const line = teamMemberAboutLine({
|
|
4346
|
+
heading: props.sectionHeading,
|
|
4347
|
+
name: member.name,
|
|
4348
|
+
role: member.role
|
|
4349
|
+
});
|
|
4350
|
+
const photo = props.showPhotos === false ? null : member.photo;
|
|
4351
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
4352
|
+
className: "rb-team-about",
|
|
4353
|
+
"data-team-about": true,
|
|
4354
|
+
"data-has-photo": String(Boolean(photo)),
|
|
4355
|
+
children: [
|
|
4356
|
+
photo ? /* @__PURE__ */ jsx("div", {
|
|
4357
|
+
className: "rb-team-about-photo",
|
|
4358
|
+
...listLookSlot(props, "item-media"),
|
|
4359
|
+
children: /* @__PURE__ */ jsx(MediaNodeServer, {
|
|
4360
|
+
value: photo,
|
|
4361
|
+
size: ImagePresets.hero,
|
|
4362
|
+
...listLookSlot(props, "photo")
|
|
4363
|
+
})
|
|
4364
|
+
}) : null,
|
|
4365
|
+
line ? /* @__PURE__ */ jsx("p", {
|
|
4366
|
+
className: "rb-team-about-line",
|
|
4367
|
+
...listLookSlot(props, "item-meta"),
|
|
4368
|
+
children: line
|
|
4369
|
+
}) : null,
|
|
4370
|
+
biography.kind === "document" ? /* @__PURE__ */ jsx(RichText, {
|
|
4371
|
+
doc: biography.document,
|
|
4372
|
+
className: "rb-team-about-bio",
|
|
4373
|
+
...listLookSlot(props, "item-text"),
|
|
4374
|
+
lookSlots: props.lookSlots
|
|
4375
|
+
}) : /* @__PURE__ */ jsx("div", {
|
|
4376
|
+
className: "rb-team-about-bio",
|
|
4377
|
+
...listLookSlot(props, "item-text"),
|
|
4378
|
+
children: biography.paragraphs.map((paragraph, index) => /* @__PURE__ */ jsx("p", { children: paragraph }, index))
|
|
4379
|
+
})
|
|
4380
|
+
]
|
|
4381
|
+
});
|
|
4382
|
+
}
|
|
4251
4383
|
function TeamMembersNode(props) {
|
|
4252
4384
|
const parsed = z.array(teamMemberCardSchema).safeParse(props.source === "site_staff" ? props.siteMembers : props.members);
|
|
4253
4385
|
if (!parsed.success) return null;
|
|
4386
|
+
const about = props.onePerson === "about" ? personToWriteAbout(parsed.data) : null;
|
|
4387
|
+
if (about) return /* @__PURE__ */ jsx(TeamMemberAbout, {
|
|
4388
|
+
...about,
|
|
4389
|
+
props
|
|
4390
|
+
});
|
|
4254
4391
|
return /* @__PURE__ */ jsx(CardListItems, {
|
|
4255
4392
|
Carousel: props.Carousel,
|
|
4256
|
-
items: parsed.data.map((member, index) => teamMemberCardContent(member, index, props.biographySource)),
|
|
4393
|
+
items: parsed.data.map((member, index) => teamMemberCardContent(member, index, props.biographySource, props.cardBiography)),
|
|
4257
4394
|
presentation: {
|
|
4258
4395
|
...props,
|
|
4259
4396
|
bodyParts: [
|
|
@@ -4816,12 +4953,6 @@ function parseLimit(value, fallback) {
|
|
|
4816
4953
|
const n = typeof value === "string" ? parseInt(value, 10) : typeof value === "number" ? value : NaN;
|
|
4817
4954
|
return Number.isFinite(n) && n > 0 ? n : fallback;
|
|
4818
4955
|
}
|
|
4819
|
-
function isFutureOrNow(iso, nowIso) {
|
|
4820
|
-
const ts = Date.parse(iso);
|
|
4821
|
-
const now = Date.parse(nowIso);
|
|
4822
|
-
if (!Number.isFinite(ts) || !Number.isFinite(now)) return false;
|
|
4823
|
-
return ts >= now;
|
|
4824
|
-
}
|
|
4825
4956
|
function uniqByOccurrenceId(events) {
|
|
4826
4957
|
const seen = /* @__PURE__ */ new Set();
|
|
4827
4958
|
const out = [];
|
|
@@ -4833,43 +4964,6 @@ function uniqByOccurrenceId(events) {
|
|
|
4833
4964
|
}
|
|
4834
4965
|
return out;
|
|
4835
4966
|
}
|
|
4836
|
-
function selectFromOccurrenceContext(events, occurrenceContext) {
|
|
4837
|
-
if (!occurrenceContext) return null;
|
|
4838
|
-
const byId = events.find((event) => event.occurrenceId === occurrenceContext.id || event.id === occurrenceContext.id);
|
|
4839
|
-
if (byId) return byId;
|
|
4840
|
-
const contextDate = getBookingLocalDateKey(toScheduledBookingDateTime({
|
|
4841
|
-
startsAt: occurrenceContext.startsAt,
|
|
4842
|
-
timeZone: occurrenceContext.timeZone
|
|
4843
|
-
}));
|
|
4844
|
-
return events.find((event) => getBookingLocalDateKey(toScheduledBookingDateTime({
|
|
4845
|
-
startsAt: event.startsAt,
|
|
4846
|
-
timeZone: event.timeZone
|
|
4847
|
-
})) === contextDate) ?? null;
|
|
4848
|
-
}
|
|
4849
|
-
function selectNextUpcoming(events, nowIso) {
|
|
4850
|
-
return [...events].filter((event) => isFutureOrNow(event.startsAt, nowIso)).sort((left, right) => Date.parse(left.startsAt) - Date.parse(right.startsAt))[0] ?? null;
|
|
4851
|
-
}
|
|
4852
|
-
function selectCompletedWholeSeries(events) {
|
|
4853
|
-
if (events.length === 0 || !events.every((event) => event.bookingScope === "whole_series")) return null;
|
|
4854
|
-
return [...events].sort((left, right) => Date.parse(right.startsAt) - Date.parse(left.startsAt))[0] ?? null;
|
|
4855
|
-
}
|
|
4856
|
-
function selectEventCandidate(events, occurrenceContext, nowIso) {
|
|
4857
|
-
const selected = selectFromOccurrenceContext(events, occurrenceContext);
|
|
4858
|
-
if (selected) return {
|
|
4859
|
-
event: selected,
|
|
4860
|
-
mode: "selected"
|
|
4861
|
-
};
|
|
4862
|
-
const upcoming = selectNextUpcoming(events, nowIso);
|
|
4863
|
-
if (upcoming) return {
|
|
4864
|
-
event: upcoming,
|
|
4865
|
-
mode: "next"
|
|
4866
|
-
};
|
|
4867
|
-
const completed = selectCompletedWholeSeries(events);
|
|
4868
|
-
return completed ? {
|
|
4869
|
-
event: completed,
|
|
4870
|
-
mode: "completed"
|
|
4871
|
-
} : null;
|
|
4872
|
-
}
|
|
4873
4967
|
function isWholeSeriesEvent(event) {
|
|
4874
4968
|
return event.bookingScope === "whole_series";
|
|
4875
4969
|
}
|
|
@@ -4903,7 +4997,7 @@ function selectEventDetails(args) {
|
|
|
4903
4997
|
}));
|
|
4904
4998
|
const occurrenceContext = args.occurrenceContext ?? null;
|
|
4905
4999
|
const otherLimit = parseLimit(args.otherDatesLimit, 5);
|
|
4906
|
-
const candidate =
|
|
5000
|
+
const candidate = selectEventDetailsCandidate(all, occurrenceContext, args.nowIso);
|
|
4907
5001
|
const timeZone = toBookingTimeZone(candidate?.event.timeZone ?? all[0]?.timeZone ?? null);
|
|
4908
5002
|
if (!candidate) return emptySelection(timeZone);
|
|
4909
5003
|
const { event: selected, mode } = candidate;
|
|
@@ -4967,6 +5061,10 @@ function resolveEligibility(input, selected) {
|
|
|
4967
5061
|
applicableMemberships: filterMembershipsForEvent(input.siteMemberships?.memberships ?? null, selected)
|
|
4968
5062
|
};
|
|
4969
5063
|
}
|
|
5064
|
+
/** The response's one drawing belongs to the selected event only when it is for that event's venue. */
|
|
5065
|
+
function resolveSelectedVenueDrawing(venueDrawing, selected) {
|
|
5066
|
+
return venueDrawing && selected?.venue?.id === venueDrawing.venueId ? venueDrawing.drawing : null;
|
|
5067
|
+
}
|
|
4970
5068
|
function resolveEventDetailsPresentation(input) {
|
|
4971
5069
|
const selection = resolveSelection(input);
|
|
4972
5070
|
const selected = selection.kind === "empty" ? null : selection.selected;
|
|
@@ -4980,7 +5078,8 @@ function resolveEventDetailsPresentation(input) {
|
|
|
4980
5078
|
panelHeading: input.panelHeading,
|
|
4981
5079
|
...resolveDisplaySettings(input),
|
|
4982
5080
|
...resolveEligibility(input, selected),
|
|
4983
|
-
autoApplyDiscount: input.autoApplyDiscount ?? null
|
|
5081
|
+
autoApplyDiscount: input.autoApplyDiscount ?? null,
|
|
5082
|
+
selectedVenueDrawing: resolveSelectedVenueDrawing(input.venueDrawing, selected)
|
|
4984
5083
|
};
|
|
4985
5084
|
}
|
|
4986
5085
|
//#endregion
|
|
@@ -5550,10 +5649,10 @@ function acceptedProductNames(props) {
|
|
|
5550
5649
|
const memberships = props.showAcceptedMemberships !== false ? (props.applicableMemberships ?? []).map(({ name }) => name) : [];
|
|
5551
5650
|
return [...passes, ...memberships];
|
|
5552
5651
|
}
|
|
5553
|
-
function EventVenueMap({ venue, showMap, mapHeight, mapClassName }) {
|
|
5554
|
-
if (!showMap || !venue
|
|
5652
|
+
function EventVenueMap({ venue, drawing, showMap, mapHeight, mapClassName }) {
|
|
5653
|
+
if (!showMap || !venue || !drawing) return null;
|
|
5555
5654
|
return /* @__PURE__ */ jsx(MapDrawingSvg, {
|
|
5556
|
-
drawing
|
|
5655
|
+
drawing,
|
|
5557
5656
|
label: venue.name,
|
|
5558
5657
|
className: mapClassName,
|
|
5559
5658
|
height: mapHeight
|
|
@@ -5604,7 +5703,8 @@ function SelectedEventDetailsView(props) {
|
|
|
5604
5703
|
venue,
|
|
5605
5704
|
showMap,
|
|
5606
5705
|
mapHeight,
|
|
5607
|
-
mapClassName
|
|
5706
|
+
mapClassName,
|
|
5707
|
+
drawing: props.selectedVenueDrawing
|
|
5608
5708
|
})]
|
|
5609
5709
|
}),
|
|
5610
5710
|
showOtherDates ? /* @__PURE__ */ jsx(OtherEventDates, { selection }) : null
|
|
@@ -5627,6 +5727,7 @@ function LegacyEventDetailsView(props) {
|
|
|
5627
5727
|
showDescription: props.showDescription ?? false,
|
|
5628
5728
|
showCapacity: props.showCapacity ?? false,
|
|
5629
5729
|
autoApplyDiscount: props.autoApplyDiscount ?? null,
|
|
5730
|
+
selectedVenueDrawing: props.selectedVenueDrawing,
|
|
5630
5731
|
mapHeight: props.mapHeight ?? 200,
|
|
5631
5732
|
mapClassName: props.mapClassName ?? "event-details-map",
|
|
5632
5733
|
acceptedItems: acceptedProductNames(props)
|
|
@@ -5681,6 +5782,7 @@ function EventDetailsHydration({ props, presentation, scopedEvents, subject, now
|
|
|
5681
5782
|
occurrenceContext: props.occurrenceContext ?? null,
|
|
5682
5783
|
subject,
|
|
5683
5784
|
events: scopedEvents,
|
|
5785
|
+
venueDrawing: props.venueDrawing ?? null,
|
|
5684
5786
|
showVenue: presentation.showVenue,
|
|
5685
5787
|
showMap: presentation.showMap,
|
|
5686
5788
|
showOtherDates: presentation.showOtherDates,
|
|
@@ -5953,9 +6055,8 @@ const EventCombinedSSR = ({ blockId, ...source }) => {
|
|
|
5953
6055
|
//#endregion
|
|
5954
6056
|
//#region ../blocks/src/system/blocks/offerings-preview/itemData.ts
|
|
5955
6057
|
function buildItemDataMap(props) {
|
|
5956
|
-
const routeCandidates = props.routeCandidates?.routes ?? [];
|
|
5957
6058
|
const entries = OFFERINGS_PREVIEW_EVENT_PRESET_DEFINITIONS.map((definition) => [definition.sourceKey, eventDataFromMaybeArray(props[definition.dataKey])]);
|
|
5958
|
-
return new Map([...entries, ["course", runDataFromMaybeArray(props.wholeSeriesRunEvents
|
|
6059
|
+
return new Map([...entries, ["course", runDataFromMaybeArray(props.wholeSeriesRunEvents)]]);
|
|
5959
6060
|
}
|
|
5960
6061
|
function eventDataFromMaybeArray(events) {
|
|
5961
6062
|
return events ? {
|
|
@@ -5969,7 +6070,7 @@ function eventDataFromMaybeArray(events) {
|
|
|
5969
6070
|
reason: "not_loaded"
|
|
5970
6071
|
};
|
|
5971
6072
|
}
|
|
5972
|
-
function runDataFromMaybeArray(events
|
|
6073
|
+
function runDataFromMaybeArray(events) {
|
|
5973
6074
|
if (!events) return {
|
|
5974
6075
|
kind: "failed",
|
|
5975
6076
|
reason: "not_loaded"
|
|
@@ -5979,7 +6080,7 @@ function runDataFromMaybeArray(events, routes) {
|
|
|
5979
6080
|
items: [...groupPublicEventsByRun(events)].map((run) => ({
|
|
5980
6081
|
kind: "run",
|
|
5981
6082
|
run,
|
|
5982
|
-
path:
|
|
6083
|
+
path: run.representative.destination.kind === "native" ? run.representative.destination.path : null
|
|
5983
6084
|
}))
|
|
5984
6085
|
};
|
|
5985
6086
|
}
|
|
@@ -6006,9 +6107,9 @@ function buildLoadedOfferingsPreviewListing(input) {
|
|
|
6006
6107
|
//#endregion
|
|
6007
6108
|
//#region ../blocks/src/system/runtime/nodes/events/shared/offeringNextDates.ts
|
|
6008
6109
|
/** One occurrence batch supplies every occurrence-targeted card in the block. */
|
|
6009
|
-
function offeringDatesBySeries(events, now) {
|
|
6110
|
+
function offeringDatesBySeries(events, now, booking) {
|
|
6010
6111
|
const groups = events.reduce((result, event) => new Map([...result, [event.seriesId, [...result.get(event.seriesId) ?? [], event]]]), /* @__PURE__ */ new Map());
|
|
6011
|
-
return new Map([...groups].map(([seriesId, occurrences]) => [seriesId, orderedUniqueEventOccurrences(occurrences.filter((event) => event.bookingScope !== "whole_series" && Date.parse(event.startsAt) >= now.getTime())).slice(0, 3).map((event) => offeringDateRow(event, event))]));
|
|
6112
|
+
return new Map([...groups].map(([seriesId, occurrences]) => [seriesId, orderedUniqueEventOccurrences(occurrences.filter((event) => event.bookingScope !== "whole_series" && Date.parse(event.startsAt) >= now.getTime())).slice(0, 3).map((event) => offeringDateRow(event, event, booking))]));
|
|
6012
6113
|
}
|
|
6013
6114
|
/** Whole-series sessions share the run-level booking capacity, by contract. */
|
|
6014
6115
|
function offeringRunDates(event, now) {
|
|
@@ -6016,7 +6117,7 @@ function offeringRunDates(event, now) {
|
|
|
6016
6117
|
const nextStart = nextLiveRunSessionStartMs(event.run.sessions, now);
|
|
6017
6118
|
return nextStart === null ? [] : orderedLiveRunSessions(event.run.sessions).filter((session) => Date.parse(session.startsAt) >= nextStart).slice(0, 3).map((session) => offeringDateRow(session, event));
|
|
6018
6119
|
}
|
|
6019
|
-
function offeringDateRow(session, event) {
|
|
6120
|
+
function offeringDateRow(session, event, booking) {
|
|
6020
6121
|
const options = eventDateOptions({
|
|
6021
6122
|
...event,
|
|
6022
6123
|
timeZone: session.timeZone
|
|
@@ -6024,9 +6125,12 @@ function offeringDateRow(session, event) {
|
|
|
6024
6125
|
const date = formatEventCompactDateRail(session.startsAt, options, "as-written");
|
|
6025
6126
|
const capacity = getEventAvailability(event);
|
|
6026
6127
|
const status = getEventAvailabilityStatus(event);
|
|
6128
|
+
const label = `${date.weekday} ${date.day} ${date.month}, ${formatTime(session.startsAt, options)}`;
|
|
6129
|
+
const bookingLink = booking?.(event, label) ?? null;
|
|
6027
6130
|
return {
|
|
6028
6131
|
startsAt: session.startsAt,
|
|
6029
|
-
label
|
|
6132
|
+
label,
|
|
6133
|
+
...bookingLink ? { booking: bookingLink } : {},
|
|
6030
6134
|
places: capacity.available === null ? null : {
|
|
6031
6135
|
label: capacity.isFull ? "Sold out" : `${capacity.available} place${capacity.available === 1 ? "" : "s"} left`,
|
|
6032
6136
|
status: capacity.isFull ? "full" : status.status === "filling" ? "low" : "available"
|
|
@@ -6044,6 +6148,10 @@ function OfferingsCatalogue(props) {
|
|
|
6044
6148
|
presets: props.bookingOfferingPresets,
|
|
6045
6149
|
events: props.catalogueEvents
|
|
6046
6150
|
});
|
|
6151
|
+
const shape = offeringsCatalogueShape(state, {
|
|
6152
|
+
listDates: props.lookSlots !== void 0 && props.datesMode === "next-dates",
|
|
6153
|
+
oneOfferingRequested: props.oneOffering === true
|
|
6154
|
+
});
|
|
6047
6155
|
switch (state.kind) {
|
|
6048
6156
|
case "no-groups": return renderCatalogueEmpty({
|
|
6049
6157
|
props,
|
|
@@ -6056,7 +6164,8 @@ function OfferingsCatalogue(props) {
|
|
|
6056
6164
|
case "by-date": return renderCatalogueMergedList({
|
|
6057
6165
|
props,
|
|
6058
6166
|
listing: state,
|
|
6059
|
-
now
|
|
6167
|
+
now,
|
|
6168
|
+
shape
|
|
6060
6169
|
});
|
|
6061
6170
|
case "by-type": return props.lookSlots ? /* @__PURE__ */ jsxs("div", {
|
|
6062
6171
|
...listLookSlot(props, "layout"),
|
|
@@ -6069,26 +6178,37 @@ function OfferingsCatalogue(props) {
|
|
|
6069
6178
|
now,
|
|
6070
6179
|
children: void 0
|
|
6071
6180
|
},
|
|
6072
|
-
groups: state.groups
|
|
6181
|
+
groups: state.groups,
|
|
6182
|
+
shape
|
|
6073
6183
|
}) })]
|
|
6074
6184
|
}) : renderOfferingsCatalogueGroups({
|
|
6075
6185
|
props: {
|
|
6076
6186
|
...props,
|
|
6077
6187
|
now
|
|
6078
6188
|
},
|
|
6079
|
-
groups: state.groups
|
|
6189
|
+
groups: state.groups,
|
|
6190
|
+
shape
|
|
6080
6191
|
});
|
|
6081
6192
|
default: return assertNever$1(state);
|
|
6082
6193
|
}
|
|
6083
6194
|
}
|
|
6084
|
-
|
|
6195
|
+
/** The hook the single-offering layout hangs from; absent for several. */
|
|
6196
|
+
function catalogueShapeHook(shape) {
|
|
6197
|
+
return shape === "single" ? { "data-has-one-offering": "true" } : {};
|
|
6198
|
+
}
|
|
6199
|
+
/** One offering has room for a Book link on each date; several keep plain rows. */
|
|
6200
|
+
function catalogueDateBooking(shape, pathname) {
|
|
6201
|
+
return shape === "single" ? (event, dateLabel) => eventDateBookingLink(event, pathname ?? "/", dateLabel) : void 0;
|
|
6202
|
+
}
|
|
6203
|
+
function renderOfferingsCatalogueGroups({ props, groups, shape }) {
|
|
6085
6204
|
const enabledSeriesIds = new Set(groups.flatMap((load) => load.kind === "items" ? load.items.map((item) => item.kind === "event" ? item.event.seriesId : item.run.eventSeriesId) : []));
|
|
6086
|
-
const quickDateEvents = selectQuickDateEvents((props.quickDateEvents ?? []).filter((event) => enabledSeriesIds.has(event.seriesId)));
|
|
6205
|
+
const quickDateEvents = shape === "single" ? [] : selectQuickDateEvents((props.quickDateEvents ?? []).filter((event) => enabledSeriesIds.has(event.seriesId)));
|
|
6087
6206
|
const populated = groups.flatMap(catalogueGroupItems);
|
|
6088
6207
|
return /* @__PURE__ */ jsxs("div", {
|
|
6089
6208
|
className: "offerings-preview rb-flex rb-flex-col rb-gap-6",
|
|
6090
6209
|
"data-block": "offerings-preview",
|
|
6091
6210
|
"data-offerings-mode": "catalogue",
|
|
6211
|
+
...catalogueShapeHook(shape),
|
|
6092
6212
|
children: [
|
|
6093
6213
|
quickDateEvents.length > 0 ? /* @__PURE__ */ jsx("div", {
|
|
6094
6214
|
className: "offerings-preview-quick-dates rb-flex rb-flex-col rb-gap-4",
|
|
@@ -6105,28 +6225,30 @@ function renderOfferingsCatalogueGroups({ props, groups }) {
|
|
|
6105
6225
|
children: populated.map(({ group, items }) => /* @__PURE__ */ jsxs("section", {
|
|
6106
6226
|
className: "rb-flex rb-flex-col rb-gap-5",
|
|
6107
6227
|
"data-offering-source": group.sourceKey,
|
|
6108
|
-
children: [/* @__PURE__ */ jsx("h3", {
|
|
6228
|
+
children: [shape === "single" ? null : /* @__PURE__ */ jsx("h3", {
|
|
6109
6229
|
...listLookSlot(props, "heading"),
|
|
6110
6230
|
children: group.title
|
|
6111
6231
|
}), renderCatalogueItems({
|
|
6112
6232
|
props,
|
|
6113
|
-
items
|
|
6233
|
+
items,
|
|
6234
|
+
shape,
|
|
6235
|
+
groupTitle: group.title
|
|
6114
6236
|
})]
|
|
6115
6237
|
}, group.sourceKey))
|
|
6116
6238
|
})
|
|
6117
6239
|
]
|
|
6118
6240
|
});
|
|
6119
6241
|
}
|
|
6120
|
-
function renderCatalogueItems({ props, items }) {
|
|
6242
|
+
function renderCatalogueItems({ props, items, shape, groupTitle }) {
|
|
6121
6243
|
const events = items.map((item) => item.kind === "event" ? item.event : item.run.representative);
|
|
6122
6244
|
if (props.lookSlots) {
|
|
6123
6245
|
const now = props.now;
|
|
6124
|
-
const dates = offeringDatesBySeries(props.quickDateEvents ?? [], now);
|
|
6246
|
+
const dates = offeringDatesBySeries(props.quickDateEvents ?? [], now, catalogueDateBooking(shape, props.pathname));
|
|
6125
6247
|
return CardListItems({
|
|
6126
6248
|
Carousel: props.Carousel,
|
|
6127
|
-
Title: "h4",
|
|
6249
|
+
Title: shape === "single" ? "h3" : "h4",
|
|
6128
6250
|
presentation: props,
|
|
6129
|
-
items: items.map((item) => catalogueCardContent(item, now, dates))
|
|
6251
|
+
items: items.map((item) => catalogueCardContent(item, now, dates, shape === "single" ? groupTitle : void 0))
|
|
6130
6252
|
});
|
|
6131
6253
|
}
|
|
6132
6254
|
return /* @__PURE__ */ jsx("div", {
|
|
@@ -6161,11 +6283,12 @@ function renderCatalogueEmpty({ props, failed }) {
|
|
|
6161
6283
|
})]
|
|
6162
6284
|
});
|
|
6163
6285
|
}
|
|
6164
|
-
function renderCatalogueMergedList({ props, listing, now }) {
|
|
6165
|
-
const dates = offeringDatesBySeries(props.quickDateEvents ?? [], now);
|
|
6286
|
+
function renderCatalogueMergedList({ props, listing, now, shape }) {
|
|
6287
|
+
const dates = offeringDatesBySeries(props.quickDateEvents ?? [], now, catalogueDateBooking(shape, props.pathname));
|
|
6166
6288
|
const items = listing.items.map(({ item, group }) => catalogueCardContent(item, now, dates, group.singularLabel));
|
|
6167
6289
|
return /* @__PURE__ */ jsxs("div", {
|
|
6168
6290
|
...listLookSlot(props, "layout"),
|
|
6291
|
+
...catalogueShapeHook(shape),
|
|
6169
6292
|
children: [/* @__PURE__ */ jsx("header", {
|
|
6170
6293
|
...listLookSlot(props, "head"),
|
|
6171
6294
|
children: props.children
|
|
@@ -11945,7 +12068,7 @@ function preparedBlockProps(entry, content, data, input) {
|
|
|
11945
12068
|
function buildBlockOverrideProps(input) {
|
|
11946
12069
|
const { block, dataContext } = input;
|
|
11947
12070
|
return {
|
|
11948
|
-
content: input.content,
|
|
12071
|
+
content: bindArrangementInkPolicy(input.content, input.themeResources),
|
|
11949
12072
|
dateContext: pageDateRuntimeContext(dataContext),
|
|
11950
12073
|
now: dataContext?.now,
|
|
11951
12074
|
...overrideThemeProps(input.themeResources),
|
|
@@ -12090,6 +12213,11 @@ function preparedPlanEntry(entry, prepared) {
|
|
|
12090
12213
|
prepared
|
|
12091
12214
|
};
|
|
12092
12215
|
}
|
|
12216
|
+
/** Compiled Looks share the render's authority, including transported item contexts. */
|
|
12217
|
+
function bindArrangementInkPolicy(content, theme) {
|
|
12218
|
+
const policy = theme.kind === "available" ? theme.tokens.solvedInks ?? "withhold" : "withhold";
|
|
12219
|
+
return Object.fromEntries(Object.entries(content).map(([key, value]) => [key, key === "_effectiveLook" || key === "_arrangementLooks" ? parseSurfaceTree(value, policy) : value]));
|
|
12220
|
+
}
|
|
12093
12221
|
//#endregion
|
|
12094
12222
|
//#region ../blocks/src/BlockErrorBoundary.tsx
|
|
12095
12223
|
/**
|
|
@@ -12167,7 +12295,7 @@ function EditorPageRenderer$1(props) {
|
|
|
12167
12295
|
}) });
|
|
12168
12296
|
}
|
|
12169
12297
|
function PageRendererCore(props) {
|
|
12170
|
-
const { page, audience, dataContext, routeMap
|
|
12298
|
+
const { page, audience, dataContext, routeMap } = props;
|
|
12171
12299
|
const imageResolveContext = React$1.useMemo(() => resolvePageRendererImageResolveContext(dataContext), [
|
|
12172
12300
|
dataContext?.imageResolveContext,
|
|
12173
12301
|
dataContext?.mediaAssets,
|
|
@@ -12195,16 +12323,20 @@ function PageRendererCore(props) {
|
|
|
12195
12323
|
themeResources,
|
|
12196
12324
|
imageResolveContext
|
|
12197
12325
|
]);
|
|
12198
|
-
const joinSlots = React$1.useMemo(() => joinSlotsByPair(preparation.joins), [preparation.joins]);
|
|
12199
12326
|
reportAndReplayOmissions({
|
|
12200
12327
|
plan,
|
|
12201
12328
|
preparation,
|
|
12202
12329
|
dataContext,
|
|
12203
12330
|
themeResources
|
|
12204
12331
|
});
|
|
12205
|
-
if (!page || preparation.entries.length === 0) return presentEmptyPage(audience);
|
|
12206
|
-
const resolvedRegistry = registry ?? getDefaultComponentRegistry();
|
|
12332
|
+
if (!page || preparation.entries.length === 0) return props.wrapPage ? props.wrapPage(plan, presentEmptyPage(audience)) : presentEmptyPage(audience);
|
|
12207
12333
|
setContextResolveImageUrlContext(imageResolveContext);
|
|
12334
|
+
const rendered = renderPreparedPage(props, preparation, themeResources, imageResolveContext);
|
|
12335
|
+
return props.wrapPage ? props.wrapPage(plan, rendered) : rendered;
|
|
12336
|
+
}
|
|
12337
|
+
function renderPreparedPage(props, preparation, themeResources, imageResolveContext) {
|
|
12338
|
+
const resolvedRegistry = props.registry ?? getDefaultComponentRegistry();
|
|
12339
|
+
const joinSlots = joinSlotsByPair(preparation.joins);
|
|
12208
12340
|
return /* @__PURE__ */ jsx("div", { children: preparation.entries.map((entry, index) => renderGuardedPlanEntry({
|
|
12209
12341
|
entry,
|
|
12210
12342
|
index,
|
|
@@ -12622,8 +12754,17 @@ function parseBlocksTheme(theme) {
|
|
|
12622
12754
|
if (!parsed.ok) throw new Error(`Theme does not satisfy the canonical runtime contract: ${parsed.error.kind}`);
|
|
12623
12755
|
return parsed.value;
|
|
12624
12756
|
}
|
|
12625
|
-
|
|
12626
|
-
|
|
12757
|
+
/**
|
|
12758
|
+
* Block tokens for a stored theme. The SDK decides the ink policy itself: only
|
|
12759
|
+
* a render whose own scope emits the stored theme's CSS (`cms-theme`) may
|
|
12760
|
+
* publish solved inks. Anything else withholds, because a bridge or a
|
|
12761
|
+
* consumer's own CSS may give the tokens different values.
|
|
12762
|
+
*/
|
|
12763
|
+
function buildThemeRuntime(theme, solvedInks = "withhold") {
|
|
12764
|
+
return { tokens: {
|
|
12765
|
+
...buildThemeRuntime$1(parseBlocksTheme(theme)).tokens,
|
|
12766
|
+
solvedInks
|
|
12767
|
+
} };
|
|
12627
12768
|
}
|
|
12628
12769
|
//#endregion
|
|
12629
12770
|
//#region src/rendering/mediaAssets.ts
|
|
@@ -12638,6 +12779,33 @@ function toBlocksImageResolveContextInput(context) {
|
|
|
12638
12779
|
mediaAssets: toBlocksMediaAssets(context.mediaAssets)
|
|
12639
12780
|
};
|
|
12640
12781
|
}
|
|
12782
|
+
/** Admit loader sidecars once before sharing them with page and image rendering. */
|
|
12783
|
+
function collectLoaderMediaAssets(resolvedData) {
|
|
12784
|
+
return Object.values(resolvedData ?? {}).flatMap((block) => Object.values(block).flatMap((loader) => {
|
|
12785
|
+
if (!loader || typeof loader !== "object" || !("mediaAssets" in loader) || !Array.isArray(loader.mediaAssets)) return [];
|
|
12786
|
+
return renderableMediaAssetSchema.array().parse(loader.mediaAssets);
|
|
12787
|
+
}));
|
|
12788
|
+
}
|
|
12789
|
+
function mergeMediaAssets(preferred, fallback) {
|
|
12790
|
+
if (!fallback?.length) return preferred;
|
|
12791
|
+
return [...new Map([...fallback, ...preferred ?? []].map((asset) => [asset.id, asset])).values()];
|
|
12792
|
+
}
|
|
12793
|
+
/** Page and image rendering share the same admitted loader assets and precedence. */
|
|
12794
|
+
function resolveBlocksPageMediaContext(dataContext) {
|
|
12795
|
+
const loaderAssets = collectLoaderMediaAssets(dataContext.resolvedData);
|
|
12796
|
+
const mediaAssets = mergeMediaAssets(toBlocksMediaAssets(dataContext.mediaAssets), loaderAssets);
|
|
12797
|
+
const explicitImageContext = toBlocksImageResolveContextInput(dataContext.imageResolveContext);
|
|
12798
|
+
const imageAssets = mergeMediaAssets(explicitImageContext?.mediaAssets, mediaAssets);
|
|
12799
|
+
return {
|
|
12800
|
+
mediaAssets,
|
|
12801
|
+
imageResolveContext: explicitImageContext || dataContext.siteId || dataContext.supabaseUrl || imageAssets?.length ? {
|
|
12802
|
+
siteId: dataContext.siteId,
|
|
12803
|
+
supabaseUrl: dataContext.supabaseUrl,
|
|
12804
|
+
...explicitImageContext,
|
|
12805
|
+
mediaAssets: imageAssets
|
|
12806
|
+
} : void 0
|
|
12807
|
+
};
|
|
12808
|
+
}
|
|
12641
12809
|
//#endregion
|
|
12642
12810
|
//#region src/rendering/blocks-page-renderer.ts
|
|
12643
12811
|
const MissingBlockOverrideError = MissingBlockOverrideError$1;
|
|
@@ -12676,8 +12844,7 @@ function toBlocksPageRendererDataContext(dataContext) {
|
|
|
12676
12844
|
...resolveDateRuntimeContext(dataContext.dateContext?.timeZone ?? dataContext.bookingTimeZone),
|
|
12677
12845
|
...dataContext.dateContext?.locale ? { locale: dataContext.dateContext.locale } : {}
|
|
12678
12846
|
},
|
|
12679
|
-
|
|
12680
|
-
imageResolveContext: toBlocksImageResolveContextInput(dataContext.imageResolveContext)
|
|
12847
|
+
...resolveBlocksPageMediaContext(dataContext)
|
|
12681
12848
|
};
|
|
12682
12849
|
}
|
|
12683
12850
|
function toBlocksCommonProps(props) {
|
|
@@ -12753,6 +12920,20 @@ function planLayoutThemeRuntime(input) {
|
|
|
12753
12920
|
}
|
|
12754
12921
|
return requested;
|
|
12755
12922
|
}
|
|
12923
|
+
/**
|
|
12924
|
+
* The one SDK rule for solved surface inks: only the runtime that emits the
|
|
12925
|
+
* stored theme's own CSS publishes them. A page whose layout emits that CSS
|
|
12926
|
+
* but whose own runtime is `none` withholds, so its sections reset the inks
|
|
12927
|
+
* rather than disagree with the scope around them.
|
|
12928
|
+
*/
|
|
12929
|
+
function solvedInksForThemeRuntime(themeRuntime) {
|
|
12930
|
+
switch (themeRuntime.kind) {
|
|
12931
|
+
case "cms-theme": return "publish";
|
|
12932
|
+
case "responsive-only":
|
|
12933
|
+
case "none": return "withhold";
|
|
12934
|
+
default: return assertNever$1(themeRuntime);
|
|
12935
|
+
}
|
|
12936
|
+
}
|
|
12756
12937
|
function renderWithSdkThemeRuntime({ themeRuntime, theme, children }) {
|
|
12757
12938
|
switch (themeRuntime.kind) {
|
|
12758
12939
|
case "cms-theme": return /* @__PURE__ */ jsx(ThemeScope, {
|
|
@@ -12784,7 +12965,11 @@ function isOverrideOnlyPage(props) {
|
|
|
12784
12965
|
return props.rendering?.kind === "overrides-only";
|
|
12785
12966
|
}
|
|
12786
12967
|
function resolvePageThemeTokens(props) {
|
|
12787
|
-
const
|
|
12968
|
+
const solvedInks = solvedInksForThemeRuntime(props.themeRuntime ?? defaultPageThemeRuntime);
|
|
12969
|
+
const baseTokens = {
|
|
12970
|
+
...props.themeTokens ?? buildThemeRuntime(props.theme).tokens,
|
|
12971
|
+
solvedInks
|
|
12972
|
+
};
|
|
12788
12973
|
return props.sdkConfig?.theme?.palette ? {
|
|
12789
12974
|
...baseTokens,
|
|
12790
12975
|
palette: {
|
|
@@ -12834,6 +13019,7 @@ function buildPageIdentityRenderContext(dataContext) {
|
|
|
12834
13019
|
}
|
|
12835
13020
|
function PageContent(props) {
|
|
12836
13021
|
const rendererCommonProps = buildPageRendererProps(props);
|
|
13022
|
+
const themeTokens = isOverrideOnlyPage(props) ? void 0 : resolvePageThemeTokens(props);
|
|
12837
13023
|
const content = isOverrideOnlyPage(props) ? /* @__PURE__ */ jsx(PageRenderer, {
|
|
12838
13024
|
...rendererCommonProps,
|
|
12839
13025
|
rendering: { kind: "overrides-only" },
|
|
@@ -12841,16 +13027,23 @@ function PageContent(props) {
|
|
|
12841
13027
|
}) : /* @__PURE__ */ jsx(PageRenderer, {
|
|
12842
13028
|
...rendererCommonProps,
|
|
12843
13029
|
theme: props.theme,
|
|
12844
|
-
themeTokens
|
|
13030
|
+
themeTokens,
|
|
12845
13031
|
blockOverrides: props.blockOverrides
|
|
12846
13032
|
});
|
|
13033
|
+
const children = themeTokens?.solvedInks === "publish" ? content : /* @__PURE__ */ jsx("div", {
|
|
13034
|
+
style: {
|
|
13035
|
+
display: "contents",
|
|
13036
|
+
...surfaceInkStyle({ kind: "reset" })
|
|
13037
|
+
},
|
|
13038
|
+
children: content
|
|
13039
|
+
});
|
|
12847
13040
|
return isOverrideOnlyPage(props) ? renderWithOverrideOnlyRuntime({
|
|
12848
13041
|
runtime: props.rendering.runtime,
|
|
12849
|
-
children
|
|
13042
|
+
children
|
|
12850
13043
|
}) : renderWithSdkThemeRuntime({
|
|
12851
13044
|
themeRuntime: props.themeRuntime ?? defaultPageThemeRuntime,
|
|
12852
13045
|
theme: props.theme,
|
|
12853
|
-
children
|
|
13046
|
+
children
|
|
12854
13047
|
});
|
|
12855
13048
|
}
|
|
12856
13049
|
/** The page shell owns the complete block context for both rendering modes. */
|
|
@@ -13070,4 +13263,4 @@ function defineBlockOverrideRegistrations(registrations) {
|
|
|
13070
13263
|
return registrations;
|
|
13071
13264
|
}
|
|
13072
13265
|
//#endregion
|
|
13073
|
-
export {
|
|
13266
|
+
export { toBlocksImageResolveContextInput as C, makeDefaultBlockComponent as D, parseBlocksTheme as E, renderBlock as O, toBlocksPageRendererDataContext as S, buildThemeRuntime as T, solvedInksForThemeRuntime as _, defaultOverrideOnlyRuntime as a, MissingBlockOverrideError as b, getRiverbankEnv as c, toPageHydrationBootstrapConfig as d, defaultCatchAllThemeRuntime as f, renderWithSdkThemeRuntime as g, renderWithOverrideOnlyRuntime as h, lazyBlockOverrideSymbol as i, getDefaultComponentRegistry as k, isPreviewMode as l, planLayoutThemeRuntime as m, defineBlockOverrides as n, normalizeSdkRenderingMode as o, defaultLayoutThemeRuntime as p, defineLazyBlockOverride as r, themeRuntimeForRendering as s, defineBlockOverrideRegistrations as t, PageContent as u, ThemeScope as v, toBlocksMediaAssets as w, PageRenderer as x, EditorPageRenderer as y };
|