@riverbankcms/sdk 0.159.0 → 0.161.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (218) hide show
  1. package/README.md +4 -4
  2. package/dist/_dts/{BlocksIslandsHydrator-Cj1i1Yhh.d.ts → BlocksIslandsHydrator-Bx4kLiTA.d.ts} +1 -1
  3. package/dist/_dts/{Page-Cgzbv22M.d.ts → Page-Dm7_P13o.d.ts} +217 -8
  4. package/dist/_dts/{SdkPreviewMode-BC_FGc6b.d.ts → SdkPreviewMode-D7HdWWwF.d.ts} +55 -127
  5. package/dist/_dts/{auth-contract-FPg0-2MC.d.ts → auth-contract-CgJ5nMaH.d.ts} +2 -0
  6. package/dist/_dts/{client-BOK-YHVJ.d.ts → client-Ep0jI9eE.d.ts} +1 -1
  7. package/dist/_dts/{content-types-CsrYWxq_.d.ts → content-types-BgAzCrBc.d.ts} +18 -18
  8. package/dist/_dts/{contracts-ClgMD-9g.d.ts → contracts-DUiOnj9e.d.ts} +10 -6
  9. package/dist/_dts/{footerPageOutline-C_IDuELl.d.ts → footerPageOutline-B-uXamTG.d.ts} +6 -6
  10. package/dist/_dts/{generatePageMetadata-B7bhYSWx.d.ts → generatePageMetadata-BDkZYEcS.d.ts} +2 -2
  11. package/dist/_dts/index-BQDBQvdu.d.ts +13 -0
  12. package/dist/_dts/index-BVkP8f70.d.ts +66 -0
  13. package/dist/_dts/{index-Dt3XSGzY.d.ts → index-CF6Cjs7b.d.ts} +2 -2
  14. package/dist/_dts/{index-Ci1PEk82.d.ts → index-CSsfq6KG.d.ts} +3 -17
  15. package/dist/_dts/{index-BZ4fb2zz.d.ts → index-D_8uz4OP.d.ts} +3 -3
  16. package/dist/_dts/{index-CcaG6O13.d.ts → index-DvKQA6AZ.d.ts} +4 -4
  17. package/dist/_dts/{index-DMOfW1A7.d.ts → index-KPrWM0KF.d.ts} +2 -2
  18. package/dist/_dts/{index-DzUdUaJ-.d.ts → index-ylivB7Jj.d.ts} +2 -2
  19. package/dist/_dts/{loadContent-C1JI2pG0.d.ts → loadContent-DTjKOO-T.d.ts} +19 -10
  20. package/dist/_dts/{resolvePageContent-BtRUtrJa.d.ts → resolvePageContent-C1vA5c5w.d.ts} +2 -2
  21. package/dist/_dts/{constants-DkcKHMX-.d.ts → runtime-BY8DQBbT.d.ts} +10 -16
  22. package/dist/_dts/{hosted-booking-appearance-ChGCQYdQ.d.ts → schema-BHu0PYWl.d.ts} +25911 -23567
  23. package/dist/_dts/sdk/src/bookings/index.d.ts +2 -2
  24. package/dist/_dts/sdk/src/client/types.d.ts +2 -2
  25. package/dist/_dts/sdk/src/client.d.ts +13 -7
  26. package/dist/_dts/sdk/src/config/index.d.ts +6 -6
  27. package/dist/_dts/sdk/src/config/template-validation.d.ts +1 -1
  28. package/dist/_dts/sdk/src/config/validation.d.ts +1 -1
  29. package/dist/_dts/sdk/src/index.d.ts +8 -8
  30. package/dist/_dts/sdk/src/manifest/index.d.ts +6 -6
  31. package/dist/_dts/sdk/src/metadata/index.d.ts +1 -1
  32. package/dist/_dts/sdk/src/navigation/index.d.ts +2 -2
  33. package/dist/_dts/sdk/src/next/index.d.ts +7 -7
  34. package/dist/_dts/sdk/src/next/middleware.d.ts +2 -2
  35. package/dist/_dts/sdk/src/page-converter/index.d.ts +10 -28
  36. package/dist/_dts/sdk/src/portal/client.d.ts +1 -1
  37. package/dist/_dts/sdk/src/prebuild/index.d.ts +1 -1
  38. package/dist/_dts/sdk/src/preview-next/before-render.d.ts +2 -2
  39. package/dist/_dts/sdk/src/preview-next/client/index.d.ts +2 -2
  40. package/dist/_dts/sdk/src/preview-next/client/runtime.d.ts +1 -1
  41. package/dist/_dts/sdk/src/preview-next/keep-alive.d.ts +1 -1
  42. package/dist/_dts/sdk/src/preview-next/session.d.ts +2 -2
  43. package/dist/_dts/sdk/src/rendering/client.d.ts +2 -2
  44. package/dist/_dts/sdk/src/rendering/index.d.ts +6 -6
  45. package/dist/_dts/sdk/src/rendering/islands/client.d.ts +1 -1
  46. package/dist/_dts/sdk/src/rendering/server.d.ts +2 -2
  47. package/dist/_dts/sdk/src/routing/index.d.ts +5 -5
  48. package/dist/_dts/sdk/src/server.d.ts +5 -5
  49. package/dist/_dts/sdk/src/theme/index.d.ts +1 -1
  50. package/dist/_dts/{session-Ba2CsnK5.d.ts → session-C_gtSFyZ.d.ts} +2 -1
  51. package/dist/_dts/{navigation-BnV_hOZy.d.ts → types-BR1Yboa9.d.ts} +15530 -16017
  52. package/dist/_dts/{types-CMFIZGUI.d.ts → types-CJXTCF_F.d.ts} +10 -13
  53. package/dist/_dts/{types-CI9dYWJ8.d.ts → types-D02ngcUH.d.ts} +4 -2
  54. package/dist/_dts/{types--oWXIfyz.d.ts → types-ZGUiHpDE.d.ts} +7 -7
  55. package/dist/_dts/{validation-Ct-GL0eA.d.ts → validation-BaV565gb.d.ts} +4 -4
  56. package/dist/client/{BlocksIslandsHydrator-DKS8Ba30.mjs → BlocksIslandsHydrator-DTExCJsb.mjs} +22 -21
  57. package/dist/client/{BookingMailingListNote-Cg9v6d7Y.mjs → BookingMailingListNote-BDpxmn1p.mjs} +2 -2
  58. package/dist/client/{CalendarNavigationChevron-BoVCTUXy.mjs → CalendarNavigationChevron-PeCiL82X.mjs} +6 -6
  59. package/dist/client/{CheckboxChoice-BF9eCNno.mjs → CheckboxChoice-DWexRLf6.mjs} +1 -1
  60. package/dist/client/{DemoBookingPortalAccess-BxRVCJG3.mjs → DemoBookingPortalAccess-3zmIqakW.mjs} +6 -6
  61. package/dist/client/{DemoPortalSignInLink-DHxYgkT6.mjs → DemoPortalSignInLink-GHi-8BW5.mjs} +1 -1
  62. package/dist/client/{EventCalendar.client-BI-kvwXf.mjs → EventCalendar.client-BxQLY5cX.mjs} +10 -9
  63. package/dist/client/{EventCombined.client-DIvnoN5l.mjs → EventCombined.client-B5bmQ03b.mjs} +8 -8
  64. package/dist/client/{EventEmbeddedCheckoutStep-B3XUyNY9.mjs → EventEmbeddedCheckoutStep-CgMZ9TeU.mjs} +1 -1
  65. package/dist/client/{EventItem-BRMtEaa6.mjs → EventItem-BEx-qiDE.mjs} +11 -6
  66. package/dist/client/{EventListWeekNavigation-B8DzAUDa.mjs → EventListWeekNavigation-CyH5tA6Y.mjs} +1 -1
  67. package/dist/client/{EventListing.client-Bo4qzQi0.mjs → EventListing.client-D3uySdGP.mjs} +3 -3
  68. package/dist/client/{EventListing.view-D2vemnCx.mjs → EventListing.view-9RFrBejr.mjs} +31 -15
  69. package/dist/client/{EventRegistrationPayment-e5XWtygG.mjs → EventRegistrationPayment-CG2tQx8K.mjs} +92 -99
  70. package/dist/client/LocationMapActions-Wsr83Q7q.mjs +268 -0
  71. package/dist/client/{Page-Dqpv9Ggi.mjs → Page-Bf2nPACI.mjs} +2673 -2290
  72. package/dist/client/{StepIndicator-BrvKa_8H.mjs → StepIndicator-CZweb1vs.mjs} +3 -3
  73. package/dist/client/{TabBarFragment-DvzIV75f.mjs → TabBarFragment-Bkgz67gt.mjs} +1 -1
  74. package/dist/client/ThemedButton-CnyL3s1A.mjs +2243 -0
  75. package/dist/client/{accordion-ByLpb4Dz.mjs → accordion-TcimLLRQ.mjs} +1 -1
  76. package/dist/client/{booking-form.client-BLndwxpx.mjs → booking-form.client-q-RpJ4aF.mjs} +13 -13
  77. package/dist/client/{bookingForm-CTxTEgHX.mjs → bookingForm-DjGfk3Wj.mjs} +4 -4
  78. package/dist/client/bookings.mjs +6 -6
  79. package/dist/client/{carousel-C8ef0vnT.mjs → carousel-CGAk6j0m.mjs} +2 -2
  80. package/dist/client/{carousel.client-BJGoJVtg.mjs → carousel.client-ArlGmYWV.mjs} +1 -1
  81. package/dist/client/{cart-BpH6jkUO.mjs → cart-D_h3rAZ2.mjs} +3 -3
  82. package/dist/client/{cart.client-DV78Td13.mjs → cart.client-DHOxZbJ7.mjs} +1 -1
  83. package/dist/client/{checkout-BJVb2RpL.mjs → checkout-tC-3CzuM.mjs} +3 -3
  84. package/dist/client/{checkout.client-CqGPXPSm.mjs → checkout.client-DsBb2Pkm.mjs} +1 -1
  85. package/dist/client/client.mjs +28 -15
  86. package/dist/client/{context-BRgBWthI.mjs → context-9ZfMb6GA.mjs} +1 -1
  87. package/dist/client/{cta-D8ucLsvX.mjs → cta-D-ZqL7-e.mjs} +2 -1
  88. package/dist/client/{dateFormatting-LeKNQ-iX.mjs → dateFormatting-BCwLqYpW.mjs} +1 -1
  89. package/dist/client/{demoPortalMagicLink-CjstiFPh.mjs → demoPortalMagicLink-BxkSS9fx.mjs} +1 -1
  90. package/dist/client/{enhanceHeaderSection-BaQJyI9x.mjs → enhanceHeaderSection-xg6to91E.mjs} +3 -3
  91. package/dist/client/{event-details.client-CYNQYOsP.mjs → event-details.client-C670TgRd.mjs} +2 -17
  92. package/dist/client/{event-registration.client-DDqSpN36.mjs → event-registration.client-C6GApWTB.mjs} +17 -17
  93. package/dist/client/{eventCalendar-3vQtuC9X.mjs → eventCalendar-CWc0dg9i.mjs} +4 -4
  94. package/dist/client/{eventCombined-CEJFMjqV.mjs → eventCombined-D4DbOrvQ.mjs} +4 -4
  95. package/dist/client/{eventDetails-nGh47jef.mjs → eventDetails-C2DfmbC0.mjs} +2 -2
  96. package/dist/client/{eventListing-BL3Ptb83.mjs → eventListing-C_yXmHyz.mjs} +4 -4
  97. package/dist/client/{eventRegistration-DDSO6KB2.mjs → eventRegistration-DJuaCB-O.mjs} +4 -4
  98. package/dist/client/{form-DjNLfy2Z.mjs → form-QZhtdFHA.mjs} +3 -3
  99. package/dist/client/{form.client-Cj0By6ot.mjs → form.client-CgvPACwG.mjs} +5 -5
  100. package/dist/client/{form.parts-DyA9C5Hy.mjs → form.parts-2uI0-5N-.mjs} +3 -3
  101. package/dist/client/{formatDate-CZo0MPTA.mjs → formatDate-Danr0Nk4.mjs} +1 -1
  102. package/dist/client/gifting/client.mjs +3 -3
  103. package/dist/client/{headerSection-JjSq6Mzp.mjs → headerSection-DJdlLdvZ.mjs} +2 -2
  104. package/dist/client/{mediaAssets-BOj-Co0B.mjs → mediaAssets-BvjcAZpS.mjs} +1 -1
  105. package/dist/client/mediaContext-jPeJ2PmJ.mjs +10801 -0
  106. package/dist/client/{newsletter-form.client-C2EgEBP1.mjs → newsletter-form.client-Cbepz2KU.mjs} +8 -8
  107. package/dist/client/{newsletter-form.parts-CaldoFmi.mjs → newsletter-form.parts-DN8oMCQ0.mjs} +2 -2
  108. package/dist/client/{newsletterForm-hm7L17LM.mjs → newsletterForm-wjLtW-wq.mjs} +3 -3
  109. package/dist/client/{noop-M8FTSgm2.mjs → noop-B7H6gCbj.mjs} +306 -5
  110. package/dist/client/portal/client.mjs +4560 -115
  111. package/dist/client/{product-detail.client-y86uwzEI.mjs → product-detail.client-CYTR165c.mjs} +1 -1
  112. package/dist/client/{product-list.client-_JBndYZT.mjs → product-list.client-B4vTvag8.mjs} +1 -1
  113. package/dist/client/{productDetail-D-9fb2cW.mjs → productDetail-k8LEMSWn.mjs} +3 -3
  114. package/dist/client/{productList-BSRlnwBW.mjs → productList-DEo8Bqoe.mjs} +3 -3
  115. package/dist/client/{propsDecoder-DhbGL302.mjs → propsDecoder-G0j0HXBO.mjs} +3 -28
  116. package/dist/client/{registry.server-BaX0hxf5.mjs → registry.server-BTmSXE3D.mjs} +1154 -997
  117. package/dist/client/rendering/client.mjs +28 -28
  118. package/dist/client/rendering/islands.mjs +1 -1
  119. package/dist/client/rendering.mjs +57 -32
  120. package/dist/client/{richText-coerce-Cny2Ukb6.mjs → richText-coerce-B19taoH6.mjs} +1 -1
  121. package/dist/client/{routeIslandApiConfig-96er7pIx.mjs → routeIslandApiConfig-Chu5BHra.mjs} +1 -1
  122. package/dist/client/{ThemedButton-DVBC_pS9.mjs → schema-C-m8XHuW.mjs} +1123 -2362
  123. package/dist/client/{shop-CnIJfdZA.mjs → shop-RGWa43H7.mjs} +3 -3
  124. package/dist/client/{shop-commerce-CsLwzq5O.mjs → shop-commerce-TJYCBO_H.mjs} +12 -12
  125. package/dist/client/{shop-commerce-store--O8GRBwr.mjs → shop-commerce-store-CjCcUB_o.mjs} +1 -1
  126. package/dist/client/{shop.client-BcaJ-acA.mjs → shop.client-tsKfZw1W.mjs} +15 -15
  127. package/dist/client/{shop.interactive-BxL_bshW.mjs → shop.interactive-CVqLAU53.mjs} +370 -189
  128. package/dist/client/{shopShared-VZjPOfCX.mjs → shopShared-C3lHMz_R.mjs} +2 -2
  129. package/dist/client/{src-7cXhT0G_.mjs → src-VIsPY-kw.mjs} +6 -1
  130. package/dist/client/timetableModel-V2ifvGGy.mjs +1100 -0
  131. package/dist/client/{useAvailableSlots-pTXuY3jV.mjs → useAvailableSlots-D1X69-pN.mjs} +4 -4
  132. package/dist/client/{useBookingNowIso-D14J-EhJ.mjs → useBookingNowIso-Ch30jino.mjs} +1 -1
  133. package/dist/client/{useDiscountApply-o5sIVZ2u.mjs → useDiscountApply-Bwzr1RjV.mjs} +3 -3
  134. package/dist/client/{useDiscountCodeUi-DJhFP_rg.mjs → useDiscountCodeUi-BimJbFC7.mjs} +1 -1
  135. package/dist/client/{useEventPagination-DMmNf2FP.mjs → useEventPagination-CLAS0upd.mjs} +12 -24
  136. package/dist/client/uuid-BETKW8rS.mjs +12 -0
  137. package/dist/client/{view-BgPql2yH2.mjs → view-BUh4LnLS.mjs} +4 -4
  138. package/dist/client/{view-D1R3Lk05.mjs → view-Dj_FZHmg.mjs} +19 -15
  139. package/dist/client/wizardSteps-BkZc-hKH.mjs +6598 -0
  140. package/dist/preview-next/before-render.mjs +5 -4
  141. package/dist/preview-next/chrome.css +2 -0
  142. package/dist/preview-next/client/{EventEmbeddedCheckoutStep-BFlBqSu4.mjs → EventEmbeddedCheckoutStep-CwerMfzn.mjs} +2 -1
  143. package/dist/preview-next/client/LocationPickerEnvironment-QtSG2Bl-.mjs +138 -0
  144. package/dist/preview-next/client/MapLibreEditMap-B-rohNcG.mjs +488 -0
  145. package/dist/preview-next/client/{PreviewEditorSidebar-DADCj_ET.mjs → PreviewEditorSidebar-Dvq-RW9-.mjs} +1328 -171
  146. package/dist/preview-next/client/{PreviewEditorUI-La40Dmmh.mjs → PreviewEditorUI-BdFjS39R.mjs} +53 -79
  147. package/dist/preview-next/client/{SdkPreviewModeRuntime-406Hw9zY.mjs → SdkPreviewModeRuntime-BEfHln1E.mjs} +1249 -2551
  148. package/dist/preview-next/client/{SdkPreviewModeRuntime-CWN44I_B.mjs → SdkPreviewModeRuntime-CjkGh1IG.mjs} +1 -1
  149. package/dist/preview-next/client/{SiteChromeCustomizeContext-BdwEZoo9.mjs → SiteChromeCustomizeContext-CDbxk_qZ.mjs} +117481 -162497
  150. package/dist/preview-next/client/{ThemedButton-BEOPss9H.mjs → ThemedButton-b14Bv03E.mjs} +1253 -403
  151. package/dist/preview-next/client/lucide-react-CA9cpo0P.mjs +51984 -0
  152. package/dist/preview-next/client/maplibre-gl-DykfOYYn.mjs +34208 -0
  153. package/dist/preview-next/client/{previewChromeSurface-BVUKIYG0.mjs → previewChromeSurface-Dd1_mNIg.mjs} +3 -8
  154. package/dist/preview-next/client/result-BjJUoxUF.mjs +16 -0
  155. package/dist/preview-next/client/rolldown-runtime-CE6sIgz8.mjs +34 -0
  156. package/dist/preview-next/client/runtime.mjs +3 -3
  157. package/dist/preview-next/client/{sdk-runtime-Cy9AKPy5.mjs → sdk-runtime-B-CXyGVb.mjs} +1 -1
  158. package/dist/preview-next/client/siteStyleAccess-Kqk0j0dE.mjs +5812 -0
  159. package/dist/preview-next/client/{spinner-Bhpzz2vO.mjs → spinner-CGxS8Ns-.mjs} +2 -1
  160. package/dist/preview-next/{constants-D8Ya7bO4.mjs → constants-Bf-vqdKH.mjs} +2 -1
  161. package/dist/preview-next/editor-base.css +64 -2
  162. package/dist/preview-next/editor-chrome.css +85 -0
  163. package/dist/preview-next/keepAlive.mjs +2 -2
  164. package/dist/preview-next/middleware.mjs +7 -3
  165. package/dist/preview-next/{route-contract-DM22uOXM.mjs → route-contract-hLg-yjQN.mjs} +190 -116
  166. package/dist/preview-next/{session-BgkrPqu0.mjs → session-P1R_ajT7.mjs} +12 -2
  167. package/dist/preview-next/session.mjs +1 -1
  168. package/dist/server/{Block.shared-DB6fb1pR.mjs → Block.shared-CeTd2saO.mjs} +6 -6
  169. package/dist/server/{bindings-z2daXp-2.mjs → bindings-C5YpKuKt.mjs} +3 -2
  170. package/dist/server/{client-Cv-osXoU.mjs → client-Cv26lZQ4.mjs} +14 -10
  171. package/dist/server/config-template-validation.mjs +50 -10
  172. package/dist/server/config-validation.mjs +1 -1
  173. package/dist/server/config.mjs +2 -2
  174. package/dist/server/{siteChromeOverlayClearance-BangtD8A.mjs → effectiveNavLinkStyle-CGvGr3yD.mjs} +572 -1078
  175. package/dist/server/index.mjs +3 -3
  176. package/dist/server/{loadContent-BNMDYCm8.mjs → loadContent-C8a0b-cC.mjs} +40 -21
  177. package/dist/server/loadPage--DXBwI8V.mjs +2 -0
  178. package/dist/server/{loadPage-CjA_F_AF.mjs → loadPage-BW7dklu3.mjs} +9 -5
  179. package/dist/server/manifest.mjs +1 -1
  180. package/dist/server/next.mjs +9 -9
  181. package/dist/server/{overrideResolution-CGodrtqi.mjs → overrideResolution-tIuqmJB3.mjs} +1 -1
  182. package/dist/server/{overrides-DxRC724a.mjs → overrides-D1fiPOKF.mjs} +1158 -754
  183. package/dist/server/page-converter.mjs +8 -10
  184. package/dist/server/{prebuild-C6bhjRKT.mjs → prebuild--fO0E2tr.mjs} +1 -1
  185. package/dist/server/prebuild.mjs +1 -1
  186. package/dist/server/{prefetchBlockData-DZ5Fq_-r.mjs → prefetchBlockData-CqJnokWJ.mjs} +968 -968
  187. package/dist/server/{publicProducts-C3meXS2o.mjs → publicProducts-CvvZ4JIe.mjs} +207 -132
  188. package/dist/server/{blocks-BaG8Qpaa.mjs → registry-BVfCqaCq.mjs} +2853 -2799
  189. package/dist/server/rendering/server.mjs +4 -4
  190. package/dist/server/rendering.mjs +8 -8
  191. package/dist/server/{resolveBlockData-CbGDakvp.mjs → resolveBlockData-DPNvhXEz.mjs} +6 -3
  192. package/dist/server/routing.mjs +1 -1
  193. package/dist/server/{schema-Bs735S27.mjs → schema-CD4peO7m.mjs} +2441 -1401
  194. package/dist/server/server.mjs +3 -3
  195. package/dist/server/site-styles-H-EvTJiW.mjs +787 -0
  196. package/dist/server/siteChromeOverlayClearance-DNC2k1U0.mjs +750 -0
  197. package/dist/server/{src-B935_bzN.mjs → src-ILxc6pid.mjs} +427 -190
  198. package/dist/server/theme-bridge.mjs +1 -1
  199. package/dist/server/theme.mjs +1 -1
  200. package/dist/server/{themeAdmission-DK2YBNqy.mjs → themeAdmission-BNHIXiUj.mjs} +117 -26
  201. package/dist/server/{three-pass-converter-CmmchOFC.mjs → three-pass-converter-Chnb1XD-.mjs} +2 -58
  202. package/dist/server/{validation-BtHE2S_D.mjs → validation-B1ieVemg.mjs} +22 -63
  203. package/dist/server/{version-CNCdL6id.mjs → version-BQK44wFg.mjs} +1 -1
  204. package/dist/styles/index.css +235 -0
  205. package/package.json +8 -3
  206. package/dist/_dts/index-CXsnaCGe.d.ts +0 -10
  207. package/dist/_dts/index-cnymEAZY.d.ts +0 -1
  208. package/dist/client/LeafletStaticMap-dlapZ6mi.mjs +0 -135
  209. package/dist/client/location-map.client-DRN1JePj.mjs +0 -28
  210. package/dist/client/location-map.view-CuCvQdvp.mjs +0 -282
  211. package/dist/client/locationMap-B9srHHzZ.mjs +0 -15
  212. package/dist/client/mediaContext-DThoeEBU.mjs +0 -136
  213. package/dist/client/renderableMediaAssetAdmission-DGjBr_e-.mjs +0 -152
  214. package/dist/client/timetableModel-D09jPdue.mjs +0 -480
  215. package/dist/client/wizardSteps-C0TsNqJc.mjs +0 -17049
  216. package/dist/preview-next/client/siteStyleAccess-CFMmoMZb.mjs +0 -1326
  217. package/dist/server/loadPage-jade28Xh.mjs +0 -2
  218. package/dist/server/media-CcHwZkdJ.mjs +0 -243
@@ -1,12 +1,12 @@
1
- import { D as ok, E as err, s as runtimeMediaSchema, u as renderableMediaAssetSchema } from "./media-CcHwZkdJ.mjs";
1
+ import { An as resolveOnColorForThemeToken, E as ICON_CONFIG, Jt as featureCardCompositionTreatmentValues, Mn as resolveTokenOrCssColorValue, N as generateDefaultButtonSystem, P as parseThemeButtonVariantId, R as parseThemeForPersistence, Rn as defaultThemeTokens, Sn as textColorStyle, Tr as ok, Yn as getTextColorForBackground, Zt as introCompositionTreatmentValues, _n as backgroundColorStyle, bn as mergeStyles, dn as serializeSurfaceTree, en as offeringsPreviewCompositionTreatmentValues, ht as renderableMediaAssetSchema, in as testimonialsCompositionTreatmentValues, kn as isCssColorLiteral, pt as runtimeMediaSchema, ur as parseThemeColorToken, wr as err, xn as rgbColorValue } from "./schema-CD4peO7m.mjs";
2
2
  import { t as assertNever$1 } from "./assert-never-ku-PUn9U.mjs";
3
- import { $i as orderedLiveRunSessions, $n as listLookControl, $r as ChevronDownIcon, $t as formatTime, A as buildEventCalendarInteractiveIslandProps, At as resolveOfferingsRenderInput, Bn as staticHeaderChromeRuntime, Bt as formatEventPriceDisplay, C as membershipClassesLabel, Ca as publicEventPricingDisplay, Cn as publicEventsArraySchema, Cr as defineFragment, Ct as OFFERINGS_PREVIEW_EVENT_PRESET_DEFINITIONS, D as buildOfferingsCatalogueListing, Da as formatCurrencyAmount, Dn as FEATURE_CARD_ICON_TREATMENTS, Dr as resolveCardRoleForBoxStyles, Dt as resolveOfferingsPreviewGroupCta, E as publicRouteCandidatesSchema, Ea as resolvePricingOptionsPriceDisplay, En as blockBookingPaymentTermsSchema, Er as normalizeBoxStylesBorder, Et as offeringsListingFor, F as buildEventCollectionHydration, Fi as arrangementManifestFromVariants, Fr as when, Ft as getIconComponent, G as CardListLeadDate, Gn as buildFormInteractiveIslandProps, Gr as runTransforms, Gt as formatCalendarTitle, H as catalogueEventCardProps, I as buildEventCollectionListingDisplay, It as SpinnerNode, J as MediaNodeServer, Jn as defineInteractiveIslandMetaKeys, Jr as normalizeBlockContent, Jt as formatEventCompactDateRail, K as resolveCardListSchedule, Kn as buildInteractiveIslandProps, Kt as formatDate, L as eventCollectionDisplaySchemaShape, Li as resolveEffectiveArrangement, Lt as buildEventListWeek, M as eventListingBlockDefinition, Mn as composeHeaderSectionWrapperClassName, Mr as resolveBackgroundColorValue, Mt as ThemedButton, N as buildEventListingInteractiveIslandProps, Nn as markEditableSurfaceForwarding, Nr as ctaButton, Nt as ThemedButtonLink, Oa as parseCurrencyCode, On as resolveFeatureCardGeneratedIconSizePx, Ot as resolveOfferingsPreviewGroups, P as buildEventCollectionDisplay, Pn as splitPositioningClasses, Pr as el, Pt as ThemedDownloadLink, Qi as nextLiveRunSessionStartMs, Qn as listItemPresentation, Qr as ArrowDownIcon, Qt as formatEventTimeRange, R as eventCollectionHydrationSchema, Rt as formatEventPrice, S as membershipCardListContent, Sa as publicEventPricingCurrency, Si as bindingSchema, Sn as groupPublicEventsByRun, Sr as bodyCopyFragment, T as offeringsPreviewBlockDefinition, Ta as resolveExactOrFreePriceDisplay, Ti as PUBLIC_DOWNLOAD_MEDIA_TYPES, Tn as bookingConsentCarrierSchema, Tr as boxStyleClassNames, Tt as normalizeOfferingsPreviewItemLimit, U as listingEventCardProps, Ut as eventDateOptions, Vt as buildCalendarViewport, W as CardListContentPart, Wn as formBlockDefinition, Wt as eventLocalDateKey, X as ImagePresets, Xi as resolveDateRuntimeContext, Xn as defineClientOwnedBlockRuntime, Xr as parseBlockIconValue, Xt as formatEventHourLabel, Y as RichText, Yi as readRuntimeNow, Yn as createZodCodec, Yr as buildGeneratedBlockIconRenderAssetLookupFromUnknown, Yt as formatEventDateParts, Z as MediaPlaceholder, Zi as CANCELLED_SESSION_STATUS, Zn as defineProgressiveBlockRuntime, Zr as resolveBlockIconRenderValue, Zt as formatEventNextDateFact, _ as buildCheckoutInteractiveIslandProps, _a as toBookingTimeZone, _n as formatTotalCapacity, _r as ctaCopyFragment, aa as sameMailingListPlacementTargeting, ai as FileSpreadsheetIcon, an as formatDateKey, ar as clsx, at as setContextResolveImageUrlContext, b as buildShopInteractiveIslandProps, ba as formatBookingPriceDisplay, bn as isEventFull, br as isBlockButtonRole, c as newsletterBlockSubmissionMessage, ca as formatDateTimeRange, ci as PlusIcon, cn as getWeekCalendarDayTuple, cr as cardFragment, ct as getContainerClass, d as checkoutBlockDefinition, da as formatBookingCompactEnglishTime, di as parseInlineTextFromUnknown, dn as isToday, dr as blogFeaturedPostFragment, dt as buildEventRegistrationInteractiveIslandProps, ea as resolveWholeSeriesBookingPhase, ei as CircleMinusIcon, en as groupEventsByDate, er as listLookSlot, f as cartBlockDefinition, fa as getBookingLocalDateKey, fn as resolveRuntimeEventDestination, fr as singleButtonFragment, ft as bookingNowSchema, g as buildCartInteractiveIslandProps, ga as resolveBookingBusinessTimeZone, gn as formatEventRemainingPlaces, gr as testimonialsHeadingFragment, h as shopBlockDefinition, ha as parseLocalScheduleTime, hn as canJoinEventWaitlistOnAnyMode, hr as testimonialsCarouselFragment, i as newsletterSignupBlockDefinition, ia as parseMailingListPlacementTargeting, ii as FileAudioIcon, in as addDays, ir as Grid, it as getCurrentResolveImageUrlContext, j as buildEventCalendarListingDisplay, jt as ThemedAuthoredButton, k as eventCalendarBlockDefinition, kn as shouldReserveFeatureCardIconZone, kt as resolveOfferingsPreviewRunPath, l as giftingBlockDefinition, li as inlineTextToPlainText, ln as getWeekCalendarDays, lr as faqAccordionFragment, m as productListBlockDefinition, ma as parseBookingLocalDate, mn as browserReadAuthoritySchema, mr as formCopyFragment, n as normalizeLocationMapProps, na as parseMailingListRuntimeContext, ni as ClockIcon, nn as getLocalDateKey, nr as itemRole, nt as resolvePublicMediaUrl, o as NEWSLETTER_SIGNUPS_PAUSED_MESSAGE, oa as formatDate$1, oi as FileTextIcon, on as getDayOfWeek, or as richTextFragment, ot as sanitizeHref, p as productDetailBlockDefinition, pa as getLocalScheduleDate, pn as formatBookingSchedulePresentation, pr as formEmbedFragment, pt as previewStageSchema, q as selectCardListPresentation, qn as createInteractiveIslandCodec, qt as formatEventClockLabel, r as toLocationMapHydrationProps, ri as FileArchiveIcon, rn as getLocalMinuteOfDay, rt as buildResolveImageUrlContext, s as buildNewsletterFormInteractiveIslandProps, sa as formatDateRange, si as MinusIcon, sn as getOrderedDayNames, sr as headingFragment, st as getCardOrientation, t as buildGoogleMapsDirectionsUrl, ta as buildMailingListSignupBlockSourceRef, ti as CirclePlusIcon, tn as resolveEventTimeZone, tr as resolvedItemSurfaceProps, u as buildGiftingInteractiveIslandProps, ua as compareLocalScheduleDates, ui as isInlineTextEmpty, un as isSameCalendarDay, ur as faqHeadingFragment, ut as eventRegistrationBlockDefinition, v as buildProductDetailInteractiveIslandProps, va as toScheduledBookingDateTime, vn as getEventAvailability, vr as heroCtaRowFragment, vt as normalizeEventRegistrationPageSurfaceSubject, w as passCardListContent, wa as publicEventPricingType, wn as blockBookingConsentSchema, wt as buildOfferingsPreviewListing, x as shopProductPresentation, xa as isPublicEventPricingOptionDisplayable, xn as blockSiteTermsSchema, xr as heroCopyFragment, y as buildProductListInteractiveIslandProps, ya as toUtcIsoDateTimeString, yi as parseFieldDefinitions, yn as getEventAvailabilityStatus, yr as ctaRowFragment, yt as resolveEventRegistrationScopedEvents, z as eventCollectionSourceSchemaShape, zt as formatEventPriceAmount } from "./blocks-BaG8Qpaa.mjs";
4
- import { g as validateManifestDraft, h as compileManifestContentContract, u as readSdkPreviewPublishedPlacement } from "./themeAdmission-DK2YBNqy.mjs";
5
- import { C as resolvePageRouteTarget, D as parseStoredVariant, E as resolveLinkedEntryInlineFieldEligibility, S as resolveEntryRouteTarget, T as buildLinkedContentEditTarget, _ as renderedJoinLayout, b as defaultTransforms, f as buildPageRenderPlan, g as joinSlotKey, h as composePageJoins, m as toPresentationPage, p as toEditorPresentationPage, v as retargetJoinsAcrossOmissions, w as resolveRouteTarget } from "./prefetchBlockData-DZ5Fq_-r.mjs";
6
- import { E as ICON_CONFIG, En as defaultThemeTokens, Jn as parseThemeColorToken, Jt as testimonialsCompositionTreatmentValues, Ln as getTextColorForBackground, N as generateDefaultButtonSystem, P as parseThemeButtonVariantId, R as parseThemeForPersistence, Rt as featureCardCompositionTreatmentValues, Vt as introCompositionTreatmentValues, Wt as offeringsPreviewCompositionTreatmentValues, cn as rgbColorValue, gn as resolveOnColorForThemeToken, hn as isCssColorLiteral, in as backgroundColorStyle, ln as textColorStyle, sn as mergeStyles, vn as resolveTokenOrCssColorValue } from "./schema-Bs735S27.mjs";
7
- import { A as arrangementLookHooks } from "./siteChromeOverlayClearance-BangtD8A.mjs";
3
+ import { $ as ImagePresets, $i as resolveWholeSeriesBookingPhase, $n as createInteractiveIslandCodec, $r as runTransforms, $t as formatEventHourLabel, A as buildOfferingsCatalogueListing, Aa as resolveExactOrFreePriceDisplay, An as FEATURE_CARD_ICON_TREATMENTS, Ar as defineFragment, At as resolveOfferingsPreviewGroupCta, B as eventCollectionDisplaySchemaShape, Bn as resolveDateRuntimeContext, Br as resolveBackgroundColorValue, Bt as buildEventListWeek, C as buildShopInteractiveIslandProps, Ca as toScheduledBookingDateTime, Cn as isEventFull, Cr as testimonialsHeadingFragment, D as passCardListContent, Da as publicEventPricingCurrency, Dn as blockBookingConsentSchema, Dr as isBlockButtonRole, Dt as buildOfferingsPreviewListing, E as membershipClassesLabel, Ea as isPublicEventPricingOptionDisplayable, Ei as parseFieldDefinitions, En as publicEventsArraySchema, Er as ctaRowFragment, Et as OFFERINGS_PREVIEW_EVENT_PRESET_DEFINITIONS, F as eventListingBlockDefinition, Fn as composeHeaderSectionWrapperClassName, Ft as ThemedButton, G as catalogueEventCardProps, Gi as chosenString, Gn as staticHeaderChromeRuntime, H as eventCollectionSourceSchemaShape, Hr as el, Ht as formatEventPriceAmount, I as buildEventListingInteractiveIslandProps, In as markEditableSurfaceForwarding, It as ThemedButtonLink, J as CardListLeadDate, Ji as pageTemplateFromEntry, Jt as formatCalendarTitle, K as listingEventCardProps, Ki as admitReadinessFacts, Kt as eventDateOptions, L as buildEventCollectionDisplay, Ln as splitPositioningClasses, Lt as ThemedDownloadLink, M as buildEventCalendarInteractiveIslandProps, Ma as formatCurrencyAmount, Mn as shouldReserveFeatureCardIconZone, Mr as boxStyleClassNames, Mt as resolveOfferingsPreviewRunPath, N as buildEventCalendarListingDisplay, Na as parseCurrencyCode, Nr as normalizeBoxStylesBorder, Nt as resolveOfferingsRenderInput, O as offeringsPreviewBlockDefinition, Oa as publicEventPricingDisplay, On as bookingConsentCarrierSchema, Or as heroCopyFragment, Ot as normalizeOfferingsPreviewItemLimit, Pi as PUBLIC_DOWNLOAD_MEDIA_TYPES, Pr as resolveCardRoleForBoxStyles, Pt as ThemedAuthoredButton, Q as RichText, Qi as orderedLiveRunSessions, Qn as buildInteractiveIslandProps, Qt as formatEventDateParts, R as buildEventCollectionHydration, Rt as getIconComponent, S as buildProductListInteractiveIslandProps, Sa as toBookingTimeZone, Sn as getEventAvailabilityStatus, Sr as testimonialsCarouselFragment, St as resolveEventRegistrationScopedEvents, T as membershipCardListContent, Ta as formatBookingPriceDisplay, Tn as groupPublicEventsByRun, Tr as heroCtaRowFragment, Ur as when, Ut as formatEventPriceDisplay, V as eventCollectionHydrationSchema, Vr as ctaButton, Vt as formatEventPrice, Wt as buildCalendarViewport, X as selectCardListPresentation, Xi as CANCELLED_SESSION_STATUS, Xn as formBlockDefinition, Xt as formatEventClockLabel, Y as resolveCardListSchedule, Yi as unavailableReadinessFact, Yt as formatDate, Z as MediaNodeServer, Zi as nextLiveRunSessionStartMs, Zn as buildFormInteractiveIslandProps, Zt as formatEventCompactDateRail, _ as productListBlockDefinition, _a as getBookingLocalDateKey, _n as browserReadAuthoritySchema, _r as faqHeadingFragment, a as normalizeLocationMapSource, aa as decideLocationSourcePermission, ai as CircleMinusIcon, an as getLocalDateKey, ar as listLookControl, at as resolvePublicMediaUrl, b as buildCheckoutInteractiveIslandProps, ba as parseLocalScheduleTime, bn as formatTotalCapacity, br as formEmbedFragment, ci as FileArchiveIcon, cn as formatDateKey, cr as resolvedItemSurfaceProps, ct as setContextResolveImageUrlContext, d as newsletterBlockSubmissionMessage, da as formatDate$1, di as FileTextIcon, dn as getWeekCalendarDayTuple, dr as Grid, dt as getContainerClass, ea as buildMailingListSignupBlockSourceRef, ei as buildGeneratedBlockIconRenderAssetLookupFromUnknown, en as formatEventNextDateFact, er as defineInteractiveIslandMetaKeys, et as MediaPlaceholder, f as giftingBlockDefinition, fa as formatDateRange, fi as MinusIcon, fn as getWeekCalendarDays, fr as clsx, g as productDetailBlockDefinition, ga as formatBookingCompactEnglishTime, gi as parseInlineTextFromUnknown, gn as formatBookingSchedulePresentation, gr as faqAccordionFragment, gt as previewStageSchema, h as cartBlockDefinition, ha as compareLocalScheduleDates, hi as isInlineTextEmpty, hn as resolveRuntimeEventDestination, hr as cardFragment, ht as bookingNowSchema, i as normalizeLocationMapProps, ia as sameMailingListPlacementTargeting, ii as ChevronDownIcon, in as resolveEventTimeZone, ir as listItemPresentation, j as eventCalendarBlockDefinition, ja as resolvePricingOptionsPriceDisplay, ji as bindingSchema, jn as resolveFeatureCardGeneratedIconSizePx, jt as resolveOfferingsPreviewGroups, k as publicRouteCandidatesSchema, ka as publicEventPricingType, kn as blockBookingPaymentTermsSchema, kr as bodyCopyFragment, kt as offeringsListingFor, l as NEWSLETTER_SIGNUPS_PAUSED_MESSAGE, li as FileAudioIcon, ln as getDayOfWeek, lr as itemRole, lt as sanitizeHref, m as checkoutBlockDefinition, mi as inlineTextToPlainText, mn as isToday, mr as headingFragment, mt as buildEventRegistrationInteractiveIslandProps, ni as resolveBlockIconRenderValue, nn as formatTime, nr as defineClientOwnedBlockRuntime, o as resolveLocationMapLocation, oi as CirclePlusIcon, on as getLocalMinuteOfDay, or as listLookSlot, ot as buildResolveImageUrlContext, p as buildGiftingInteractiveIslandProps, pa as formatDateTimeRange, pi as PlusIcon, pn as isSameCalendarDay, pr as richTextFragment, pt as eventRegistrationBlockDefinition, q as CardListContentPart, qi as loadedReadinessFact, qt as eventLocalDateKey, r as normalizeBlockContent, ra as parseMailingListPlacementTargeting, ri as ArrowDownIcon, rn as groupEventsByDate, rr as defineProgressiveBlockRuntime, s as newsletterSignupBlockDefinition, sa as normalizeLocationAddressText, si as ClockIcon, sn as addDays, sr as lookListPresentationSchemaShape, st as getCurrentResolveImageUrlContext, t as getBlockDefinition, ta as parseMailingListRuntimeContext, ti as parseBlockIconValue, tn as formatEventTimeRange, tr as createZodCodec, u as buildNewsletterFormInteractiveIslandProps, ua as mapDrawingSchema, ui as FileSpreadsheetIcon, un as getOrderedDayNames, ut as getCardOrientation, v as shopBlockDefinition, va as getLocalScheduleDate, vn as canJoinEventWaitlistOnAnyMode, vr as blogFeaturedPostFragment, w as shopProductPresentation, wa as toUtcIsoDateTimeString, wn as blockSiteTermsSchema, wr as ctaCopyFragment, x as buildProductDetailInteractiveIslandProps, xa as resolveBookingBusinessTimeZone, xn as getEventAvailability, xr as formCopyFragment, xt as normalizeEventRegistrationPageSurfaceSubject, y as buildCartInteractiveIslandProps, ya as parseBookingLocalDate, yn as formatEventRemainingPlaces, yr as singleButtonFragment, z as buildEventCollectionListingDisplay, zn as readRuntimeNow, zt as SpinnerNode } from "./registry-BVfCqaCq.mjs";
4
+ import { _ as validateManifestDraft, g as compileManifestContentContract, u as readSdkPreviewPublishedPlacement } from "./themeAdmission-BNHIXiUj.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-CqJnokWJ.mjs";
6
+ import { _ as resolveEffectiveArrangement, d as arrangementLookHooks, h as arrangementManifestFromVariants } from "./effectiveNavLinkStyle-CGvGr3yD.mjs";
7
+ import "./site-styles-H-EvTJiW.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-B935_bzN.mjs";
9
+ import { a as buildThemeRuntime$1, n as ResponsiveScope, o as mergeContentWithBlockStyleOverrides, r as ThemeScope$1, s as generateDefaultAccordionSystem } from "./src-ILxc6pid.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";
@@ -132,6 +132,26 @@ function selectCategoryView(categories, services, filterCategoryId) {
132
132
  };
133
133
  }
134
134
  //#endregion
135
+ //#region ../core/src/locationLinks.ts
136
+ /** Both outbound actions use the arrival pin, never match evidence. */
137
+ function locationMapLinks(input) {
138
+ const target = input.location != null ? `${input.location.lat},${input.location.lng}` : normalizeLocationAddressText(input.addressText);
139
+ if (target === null) return {
140
+ directions: null,
141
+ googleMaps: null
142
+ };
143
+ const directions = new URL("https://www.google.com/maps/dir/");
144
+ directions.searchParams.set("api", "1");
145
+ directions.searchParams.set("destination", target);
146
+ const search = new URL("https://www.google.com/maps/search/");
147
+ search.searchParams.set("api", "1");
148
+ search.searchParams.set("query", target);
149
+ return {
150
+ directions: directions.toString(),
151
+ googleMaps: search.toString()
152
+ };
153
+ }
154
+ //#endregion
135
155
  //#region ../core/src/opening-hours.ts
136
156
  const openingHoursWeekdayLabels = {
137
157
  monday: "Monday",
@@ -1171,6 +1191,7 @@ const eventItemParts = {
1171
1191
  "action"
1172
1192
  ],
1173
1193
  grid: [
1194
+ "image",
1174
1195
  "date",
1175
1196
  "title",
1176
1197
  "meta",
@@ -1197,7 +1218,11 @@ function eventItemFacts(props) {
1197
1218
  date: formatEventCompactDateRail(props.event.startsAt, options, "as-written"),
1198
1219
  time: formatEventTimeRange(props.event, options),
1199
1220
  price: formatEventPrice(props.event),
1200
- meta: (props.parts ?? eventItemParts[props.arrangement]).includes("time") ? formatEventTeacherLine(props.event) : [formatEventTimeRange(props.event, options), formatEventTeacherLine(props.event)].filter(Boolean).join(" · "),
1221
+ meta: [
1222
+ ...(props.parts ?? eventItemParts[props.arrangement]).includes("time") ? [] : [formatEventTimeRange(props.event, options)],
1223
+ formatEventTeacherLine(props.event),
1224
+ props.showVenue !== false ? props.event.venue?.name : null
1225
+ ].filter(Boolean).join(" · "),
1201
1226
  places: props.showCapacity ? formatEventRemainingPlaces(props.event, { full: "Sold out" }) : null,
1202
1227
  availability: availability.isFull ? "full" : availability.status === "filling" ? "low" : "available",
1203
1228
  description: props.event.presentation?.summary ?? props.event.description
@@ -1213,7 +1238,7 @@ function EventItem(props) {
1213
1238
  return "item" in props ? renderCardItem(props) : renderCalendarItem(props);
1214
1239
  }
1215
1240
  function renderCalendarItem(props) {
1216
- const parts = props.parts ?? eventItemParts[props.arrangement];
1241
+ const parts = (props.parts ?? eventItemParts[props.arrangement]).filter((part) => part !== "image" || props.showPhotos !== false);
1217
1242
  const facts = eventItemFacts(props);
1218
1243
  const Tag = props.as ?? eventItemTag(props.arrangement);
1219
1244
  const root = props.arrangement === "grid" ? "item" : props.continued ? "row-continued" : "row";
@@ -1516,6 +1541,248 @@ function leadItemPresentation(presentation, index, count) {
1516
1541
  };
1517
1542
  }
1518
1543
  //#endregion
1544
+ //#region ../blocks/src/system/runtime/nodes/svg.tsx
1545
+ /**
1546
+ * Strict SVG-`transform` validator.
1547
+ *
1548
+ * Accepts only a whitespace/comma-separated list of the geometric transform
1549
+ * functions (`translate`/`rotate`/`scale`/`skewX`/`skewY`/`matrix`) whose
1550
+ * arguments are plain numbers. This deliberately rejects anything else —
1551
+ * `url(...)`, CSS functions, `javascript:`, angle/length units, stray letters —
1552
+ * so a persisted custom-block tree can't smuggle an executable or exfiltrating
1553
+ * value into the attribute.
1554
+ */
1555
+ const TRANSFORM_NUMBER = String.raw`-?(?:\d+\.?\d*|\.\d+)(?:e-?\d+)?`;
1556
+ const TRANSFORM_ARGS = String.raw`${TRANSFORM_NUMBER}(?:[\s,]+${TRANSFORM_NUMBER})*`;
1557
+ const TRANSFORM_FN = String.raw`(?:translate|rotate|scale|skewX|skewY|matrix)\(\s*${TRANSFORM_ARGS}\s*\)`;
1558
+ const SAFE_TRANSFORM_RE = new RegExp(String.raw`^\s*${TRANSFORM_FN}(?:[\s,]*${TRANSFORM_FN})*\s*$`);
1559
+ function safeTransform(value) {
1560
+ if (typeof value !== "string") return void 0;
1561
+ const trimmed = value.trim();
1562
+ if (trimmed.length === 0) return void 0;
1563
+ return SAFE_TRANSFORM_RE.test(trimmed) ? trimmed : void 0;
1564
+ }
1565
+ /**
1566
+ * Turn paint props into a CSS style object. Colour values pass through as-is so
1567
+ * they may reference theme tokens via `var()`, which only resolves in a CSS
1568
+ * property context (not in a bare presentation attribute).
1569
+ */
1570
+ function paintStyle(shape) {
1571
+ const style = {};
1572
+ if (shape.fill !== void 0) style.fill = shape.fill;
1573
+ if (shape.stroke !== void 0) style.stroke = shape.stroke;
1574
+ if (shape.strokeWidth !== void 0) style.strokeWidth = shape.strokeWidth;
1575
+ if (shape.fillOpacity !== void 0) style.fillOpacity = shape.fillOpacity;
1576
+ if (shape.strokeOpacity !== void 0) style.strokeOpacity = shape.strokeOpacity;
1577
+ if (shape.strokeLinecap !== void 0) style.strokeLinecap = shape.strokeLinecap;
1578
+ if (shape.strokeLinejoin !== void 0) style.strokeLinejoin = shape.strokeLinejoin;
1579
+ if (shape.strokeDasharray !== void 0) style.strokeDasharray = shape.strokeDasharray;
1580
+ return style;
1581
+ }
1582
+ function renderShape(shape, key) {
1583
+ const style = paintStyle(shape);
1584
+ const transform = safeTransform(shape.transform);
1585
+ switch (shape.kind) {
1586
+ case "text": return /* @__PURE__ */ jsx("text", {
1587
+ className: shape.className,
1588
+ x: shape.x,
1589
+ y: shape.y,
1590
+ transform,
1591
+ children: shape.text
1592
+ }, key);
1593
+ case "path": return /* @__PURE__ */ jsx("path", {
1594
+ d: shape.d,
1595
+ className: shape.className,
1596
+ fillRule: shape.fillRule,
1597
+ style,
1598
+ transform
1599
+ }, key);
1600
+ case "ellipse": return /* @__PURE__ */ jsx("ellipse", {
1601
+ cx: shape.cx,
1602
+ cy: shape.cy,
1603
+ rx: shape.rx,
1604
+ ry: shape.ry,
1605
+ style,
1606
+ transform
1607
+ }, key);
1608
+ case "circle": return /* @__PURE__ */ jsx("circle", {
1609
+ cx: shape.cx,
1610
+ cy: shape.cy,
1611
+ r: shape.r,
1612
+ style,
1613
+ transform
1614
+ }, key);
1615
+ case "rect": return /* @__PURE__ */ jsx("rect", {
1616
+ x: shape.x,
1617
+ y: shape.y,
1618
+ className: shape.className,
1619
+ width: shape.width,
1620
+ height: shape.height,
1621
+ rx: shape.rx,
1622
+ ry: shape.ry,
1623
+ style,
1624
+ transform
1625
+ }, key);
1626
+ case "line": return /* @__PURE__ */ jsx("line", {
1627
+ x1: shape.x1,
1628
+ y1: shape.y1,
1629
+ x2: shape.x2,
1630
+ y2: shape.y2,
1631
+ style,
1632
+ transform
1633
+ }, key);
1634
+ default: return null;
1635
+ }
1636
+ }
1637
+ const SvgNode = ({ blockId: _blockId, blockKind: _blockKind, blockContent: _blockContent, fragmentRegistry: _fragmentRegistry, pathBase: _pathBase, viewBox, width, height, className, style, ariaHidden = true, ariaLabel, shapes }) => {
1638
+ return /* @__PURE__ */ jsx("svg", {
1639
+ viewBox,
1640
+ width,
1641
+ height,
1642
+ className,
1643
+ style,
1644
+ "aria-hidden": ariaHidden || void 0,
1645
+ role: ariaLabel ? "img" : void 0,
1646
+ "aria-label": ariaLabel,
1647
+ xmlns: "http://www.w3.org/2000/svg",
1648
+ fill: "none",
1649
+ children: (Array.isArray(shapes) ? shapes : []).map((shape, index) => renderShape(shape, index))
1650
+ });
1651
+ };
1652
+ //#endregion
1653
+ //#region ../blocks/src/system/runtime/nodes/shared/MapDrawingSvg.tsx
1654
+ const PIN_PATH = "M0 0C-3.5-9-13-15-13-25A13 13 0 1 1 13-25C13-15 3.5-9 0 0ZM0-20.5A4.5 4.5 0 1 0 0-29.5A4.5 4.5 0 1 0 0-20.5Z";
1655
+ const commands = (points) => points.map(([x, y], index) => `${index ? "L" : "M"}${x} ${y}`).join(" ");
1656
+ function pathShape(path) {
1657
+ return path.kind === "polygon" ? {
1658
+ kind: "path",
1659
+ className: path.className,
1660
+ fillRule: path.fillRule,
1661
+ d: path.rings.map((ring) => `${commands(ring)} Z`).join(" ")
1662
+ } : {
1663
+ kind: "path",
1664
+ className: path.className,
1665
+ d: commands(path.points)
1666
+ };
1667
+ }
1668
+ function labelShapes(label) {
1669
+ const [x, y] = label.point, transform = `rotate(${label.angle} ${x} ${y})`;
1670
+ return [label.haloClassName, label.className].map((className) => ({
1671
+ kind: "text",
1672
+ className,
1673
+ x,
1674
+ y,
1675
+ transform,
1676
+ text: label.text
1677
+ }));
1678
+ }
1679
+ /** The drawing the renderer below would show, or null when there's nothing it can draw. */
1680
+ function readableMapDrawing(drawing) {
1681
+ const parsed = mapDrawingSchema.safeParse(drawing);
1682
+ return parsed.success ? parsed.data : null;
1683
+ }
1684
+ /** Untrusted standalone callers retain boundary admission. */
1685
+ function MapDrawingSvg(props) {
1686
+ const drawing = readableMapDrawing(props.drawing);
1687
+ return drawing ? /* @__PURE__ */ jsx(AdmittedMapDrawingSvg, {
1688
+ ...props,
1689
+ drawing
1690
+ }) : null;
1691
+ }
1692
+ /** Render an already admitted value without allocating another validation copy. */
1693
+ function AdmittedMapDrawingSvg(props) {
1694
+ const drawing = props.drawing;
1695
+ const name = props.wider ? "wider" : "neighbourhood", frame = drawing.frames[name];
1696
+ const shapes = [
1697
+ {
1698
+ kind: "rect",
1699
+ className: frame.backgroundClass,
1700
+ x: 0,
1701
+ y: 0,
1702
+ width: 800,
1703
+ height: 800
1704
+ },
1705
+ ...frame.paths.map(pathShape),
1706
+ ...frame.labels.flatMap(labelShapes),
1707
+ {
1708
+ kind: "path",
1709
+ className: frame.pin.className,
1710
+ fillRule: "evenodd",
1711
+ d: PIN_PATH,
1712
+ transform: `translate(${frame.pin.point.join(" ")})`
1713
+ }
1714
+ ];
1715
+ return /* @__PURE__ */ jsxs("figure", {
1716
+ className: `rb-map-drawing ${props.className ?? ""}`.trim(),
1717
+ children: [/* @__PURE__ */ jsx("div", {
1718
+ className: "rb-map-drawing-crop",
1719
+ style: cropHeightStyle(Math.max(255, props.height ?? 320), props.heightAs ?? "fixed"),
1720
+ children: /* @__PURE__ */ jsx(SvgNode, {
1721
+ className: `map-${name}`,
1722
+ viewBox: frame.viewBox.join(" "),
1723
+ shapes,
1724
+ ariaHidden: false,
1725
+ ariaLabel: props.label ? `Map showing ${props.label}` : "Map showing the arrival pin"
1726
+ })
1727
+ }), /* @__PURE__ */ jsxs("figcaption", { children: ["© ", /* @__PURE__ */ jsx("a", {
1728
+ href: "https://www.openstreetmap.org/copyright",
1729
+ target: "_blank",
1730
+ rel: "noreferrer",
1731
+ children: "OpenStreetMap contributors"
1732
+ })] })]
1733
+ });
1734
+ }
1735
+ function cropHeightStyle(height, heightAs) {
1736
+ return heightAs === "minimum" ? { minHeight: height } : { height };
1737
+ }
1738
+ //#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
1519
1786
  //#region ../blocks/src/system/runtime/nodes/events/shared/EventCardIcons.tsx
1520
1787
  function MapPinIcon({ className, size = 16, strokeWidth = 2 }) {
1521
1788
  return /* @__PURE__ */ jsxs("svg", {
@@ -1626,7 +1893,7 @@ const EventCard = ({ event, cardRole = "default", buttonVariant = "primary", but
1626
1893
  formattedTime,
1627
1894
  hasImage,
1628
1895
  headingLevel: cardHeadingLevel,
1629
- mapSlot,
1896
+ mapSlot: resolveVenueMapSlot(event.venue, mapSlot),
1630
1897
  priceText,
1631
1898
  showMap,
1632
1899
  showSummary,
@@ -1637,6 +1904,13 @@ const EventCard = ({ event, cardRole = "default", buttonVariant = "primary", but
1637
1904
  })]
1638
1905
  });
1639
1906
  };
1907
+ function resolveVenueMapSlot(venue, override) {
1908
+ return override ?? (venue?.drawing ? /* @__PURE__ */ jsx(MapDrawingSvg, {
1909
+ drawing: venue.drawing,
1910
+ label: venue.name,
1911
+ height: 255
1912
+ }) : null);
1913
+ }
1640
1914
  function EventCardMedia(props) {
1641
1915
  if (props.lookPresentation.lookSlots !== void 0) return /* @__PURE__ */ jsx(EventLookDate, {
1642
1916
  event: props.event,
@@ -1741,13 +2015,20 @@ function EventCardVenue(props) {
1741
2015
  if (!venue) return null;
1742
2016
  return /* @__PURE__ */ jsxs("div", {
1743
2017
  className: "rb-mb-3",
1744
- children: [/* @__PURE__ */ jsxs("div", {
1745
- className: "rb-flex rb-items-center rb-gap-2 rb-caption",
1746
- children: [/* @__PURE__ */ jsx(MapPinIcon, { className: "rb-shrink-0" }), /* @__PURE__ */ jsxs("span", { children: [/* @__PURE__ */ jsx("strong", { children: venue.name }), venue.address ? ` · ${venue.address}` : null] })]
1747
- }), props.showMap && props.allowMap && venue.location && props.mapSlot && /* @__PURE__ */ jsx("div", {
1748
- className: "rb-mt-2",
1749
- children: props.mapSlot
1750
- })]
2018
+ children: [
2019
+ /* @__PURE__ */ jsxs("div", {
2020
+ className: "rb-flex rb-items-center rb-gap-2 rb-caption",
2021
+ children: [/* @__PURE__ */ jsx(MapPinIcon, { className: "rb-shrink-0" }), /* @__PURE__ */ jsxs("span", { children: [/* @__PURE__ */ jsx("strong", { children: venue.name }), venue.address ? ` · ${venue.address}` : null] })]
2022
+ }),
2023
+ props.allowMap ? /* @__PURE__ */ jsx(LocationMapActions, {
2024
+ location: venue.location,
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
+ ]
1751
2032
  });
1752
2033
  }
1753
2034
  function EventCardFooter(props) {
@@ -1907,7 +2188,7 @@ const EventCompactRow = (props) => props.lookSlots === void 0 ? /* @__PURE__ */
1907
2188
  buttonText: props.buttonText ?? "Book",
1908
2189
  as: "article"
1909
2190
  });
1910
- const LegacyEventCompactRow = ({ event, buttonVariant = "primary", buttonText }) => {
2191
+ const LegacyEventCompactRow = ({ event, buttonVariant = "primary", buttonText, showVenue = true }) => {
1911
2192
  event.timeZone;
1912
2193
  const dateRail = formatEventCompactDateRail(event.startsAt, eventDateOptions(event));
1913
2194
  const formattedTime = formatEventTimeRange(event, eventDateOptions(event));
@@ -1948,7 +2229,7 @@ const LegacyEventCompactRow = ({ event, buttonVariant = "primary", buttonText })
1948
2229
  }), /* @__PURE__ */ jsxs("div", {
1949
2230
  className: "event-compact-row-meta",
1950
2231
  children: [
1951
- event.venue && /* @__PURE__ */ jsxs("span", {
2232
+ showVenue && event.venue && /* @__PURE__ */ jsxs("span", {
1952
2233
  className: "event-compact-row-venue",
1953
2234
  children: [/* @__PURE__ */ jsx(MapPinIcon, { className: "rb-shrink-0" }), event.venue.name]
1954
2235
  }),
@@ -2151,43 +2432,64 @@ function OfferingTitle({ className, path, title }) {
2151
2432
  });
2152
2433
  }
2153
2434
  //#endregion
2154
- //#region ../blocks/src/system/runtime/blockComposition.ts
2155
- const compositionTreatments = {
2156
- intro: introCompositionTreatmentValues,
2157
- "feature-cards": featureCardCompositionTreatmentValues,
2158
- testimonials: testimonialsCompositionTreatmentValues,
2159
- "offerings-preview": offeringsPreviewCompositionTreatmentValues
2160
- };
2161
- function isCompositionKind(value) {
2162
- return Object.prototype.hasOwnProperty.call(compositionTreatments, value);
2163
- }
2164
- /**
2165
- * Narrow one kind's treatment. Written per-kind so the returned intent is a
2166
- * real union member rather than a cast: `kind` and `treatment` are only known
2167
- * to belong together inside a scope where `Kind` is a single kind.
2168
- */
2169
- function readTreatment(kind, value) {
2170
- const treatment = compositionTreatments[kind].find((candidate) => candidate === value);
2171
- return treatment === void 0 ? null : {
2172
- kind,
2173
- treatment
2174
- };
2435
+ //#region ../blocks/src/system/data/readinessFacts.ts
2436
+ const countSchema = z.array(z.unknown()).transform((entries) => entries.length);
2437
+ const formSchema = z.union([z.null(), z.object({
2438
+ id: z.string(),
2439
+ slug: z.string().optional()
2440
+ })]).transform((form) => form !== null);
2441
+ const productsSchema = z.object({ products: z.array(z.object({ slug: z.string() })) });
2442
+ /** Both producers pass raw facts through the same stage admission. */
2443
+ function readinessFactsFromLoaders(stage, input) {
2444
+ const facts = {
2445
+ mailingList: loaderFactProducers.mailingList(input),
2446
+ testimonials: loaderFactProducers.testimonials(input),
2447
+ team: loaderFactProducers.team(input),
2448
+ forms: loaderFactProducers.forms(input),
2449
+ products: loaderFactProducers.products(input),
2450
+ template: loaderFactProducers.template(input)
2451
+ };
2452
+ return admitReadinessFacts(stage, {
2453
+ stage: input.prefetched?.loaderSnapshot?.stage ?? (input.previewStage === "preview" ? "draft" : "published"),
2454
+ facts
2455
+ });
2175
2456
  }
2176
- function readBlockComposition(value) {
2177
- if (!isRecord$3(value) || typeof value.kind !== "string") return null;
2178
- if (!isCompositionKind(value.kind)) return null;
2179
- return readTreatment(value.kind, value.treatment);
2457
+ const loaderFactProducers = {
2458
+ mailingList: (input) => input.mailingList === void 0 ? unavailableReadinessFact : loadedReadinessFact(input.mailingList),
2459
+ testimonials: (input) => mapFact(firstLoaderFact(input, "testimonials", "entries", countSchema), (count) => ({
2460
+ count,
2461
+ total: "unknown"
2462
+ })),
2463
+ team: (input) => firstLoaderFact(input, "team", "members", countSchema),
2464
+ forms: (input) => new Map(projections(input, "forms").flatMap(({ id, block }) => {
2465
+ const selection = chosenString(block.requests.form?.params.formSlug ?? block.requests.form?.params.formId);
2466
+ return selection ? [[selection, loaderFact(input, id, "form", formSchema)]] : [];
2467
+ })),
2468
+ products: (input) => new Map(projections(input, "products").flatMap(({ id, block }) => {
2469
+ const selection = chosenString(block.content.productSlug);
2470
+ return selection ? [[selection, mapFact(loaderFact(input, id, "products", productsSchema), ({ products }) => products.some((product) => product.slug === selection))]] : [];
2471
+ })),
2472
+ template: (input) => loadedReadinessFact(input.template)
2473
+ };
2474
+ function projections(input, need) {
2475
+ return Object.entries(input.prefetched?.loaderSnapshot?.blocks ?? {}).flatMap(([id, block]) => getBlockDefinition(block.kind)?.readiness?.needs.includes(need) ? [{
2476
+ id,
2477
+ block
2478
+ }] : []);
2180
2479
  }
2181
- function isRecord$3(value) {
2182
- return typeof value === "object" && value !== null && !Array.isArray(value);
2480
+ function firstLoaderFact(input, need, key, schema) {
2481
+ const source = projections(input, need)[0];
2482
+ return source ? loaderFact(input, source.id, key, schema) : unavailableReadinessFact;
2183
2483
  }
2184
- function arrangementHooksFromContent(content) {
2185
- const value = content._lookHooks;
2186
- if (typeof value !== "object" || value === null || Array.isArray(value)) return {};
2187
- return Object.fromEntries(Object.entries(value).filter((entry) => typeof entry[1] === "string" && arrangementLookHooks.some((hook) => hook.endsWith("*") ? entry[0].startsWith(hook.slice(0, -1)) : entry[0] === hook)));
2484
+ function loaderFact(input, id, key, schema) {
2485
+ const prefetched = input.prefetched;
2486
+ if (!prefetched) return unavailableReadinessFact;
2487
+ if (!prefetched.loaderSnapshot.blocks[id]?.requests[key] || prefetched.loaderFailures[id]?.[key]) return unavailableReadinessFact;
2488
+ const parsed = schema.safeParse(prefetched.resolvedData[id]?.[key]);
2489
+ return parsed.success ? loadedReadinessFact(parsed.data) : unavailableReadinessFact;
2188
2490
  }
2189
- function blockLookFromContent(content) {
2190
- return typeof content.blockLook === "string" ? content.blockLook : void 0;
2491
+ function mapFact(fact, project) {
2492
+ return fact.kind === "Loaded" ? loadedReadinessFact(project(fact.value)) : fact;
2191
2493
  }
2192
2494
  //#endregion
2193
2495
  //#region ../blocks/src/system/runtime/nodes/carousel.shared.ts
@@ -2417,11 +2719,32 @@ function truncate(input, maxLength) {
2417
2719
  if (input.length <= maxLength) return input;
2418
2720
  return input.slice(0, maxLength) + "…";
2419
2721
  }
2722
+ const PRIVATE_LOG_KEYS = /* @__PURE__ */ new Set([
2723
+ "requestbodyvalues",
2724
+ "provideroptions",
2725
+ "byok",
2726
+ "apikey"
2727
+ ]);
2728
+ function logJsonValue(key, value, seen) {
2729
+ if (PRIVATE_LOG_KEYS.has(key.toLowerCase())) return void 0;
2730
+ if (typeof value === "bigint") return String(value);
2731
+ if (value === null || typeof value !== "object") return value;
2732
+ if (seen.has(value)) return "[circular]";
2733
+ seen.add(value);
2734
+ return value instanceof Error ? {
2735
+ ...value,
2736
+ name: value.name,
2737
+ message: value.message,
2738
+ stack: value.stack,
2739
+ cause: "cause" in value ? value.cause : void 0
2740
+ } : value;
2741
+ }
2420
2742
  function safeStringify(value, maxLength) {
2421
2743
  try {
2422
- return truncate(JSON.stringify(value), maxLength);
2744
+ const seen = /* @__PURE__ */ new WeakSet();
2745
+ return truncate(JSON.stringify(value, (key, nested) => logJsonValue(key, nested, seen)), maxLength);
2423
2746
  } catch {
2424
- return truncate(String(value), maxLength);
2747
+ return "[unserializable]";
2425
2748
  }
2426
2749
  }
2427
2750
  function toScalar(value, maxLength) {
@@ -2437,7 +2760,7 @@ function sanitizeV2(fields, maxStringLength) {
2437
2760
  const allowed = {};
2438
2761
  const extra = {};
2439
2762
  for (const [key, value] of Object.entries(fields)) {
2440
- if (value === void 0) continue;
2763
+ if (value === void 0 || PRIVATE_LOG_KEYS.has(key.toLowerCase())) continue;
2441
2764
  if (STRUCTURED_KEYS.has(key)) {
2442
2765
  allowed[key] = toScalar(value, maxStringLength);
2443
2766
  continue;
@@ -2535,6 +2858,102 @@ function renderMark(mark, key, child) {
2535
2858
  }
2536
2859
  }
2537
2860
  //#endregion
2861
+ //#region ../blocks/src/system/runtime/nodes/location-map.view.tsx
2862
+ function OpeningHoursTable({ hours, lookLayout }) {
2863
+ if (!hours) return null;
2864
+ return /* @__PURE__ */ jsxs("div", {
2865
+ className: "rb-location-map-hours",
2866
+ "data-slot": lookLayout ? "schedule" : void 0,
2867
+ children: [/* @__PURE__ */ jsxs("table", { children: [/* @__PURE__ */ jsx("caption", { children: "Opening hours" }), /* @__PURE__ */ jsx("tbody", { children: formatOpeningHoursRows(hours).map((row) => /* @__PURE__ */ jsxs("tr", {
2868
+ "data-slot": lookLayout ? "row" : void 0,
2869
+ "data-closed": row.kind === "closed" ? true : void 0,
2870
+ children: [/* @__PURE__ */ jsx("th", {
2871
+ scope: "row",
2872
+ "data-slot": lookLayout ? "fact-label" : void 0,
2873
+ children: row.label
2874
+ }), /* @__PURE__ */ jsx("td", {
2875
+ "data-slot": lookLayout ? "fact-value" : void 0,
2876
+ children: row.hours
2877
+ })]
2878
+ }, row.label)) })] }), hours.note ? /* @__PURE__ */ jsx("p", { children: hours.note }) : null]
2879
+ });
2880
+ }
2881
+ function LocationMapView(props) {
2882
+ const { addressText, location } = props;
2883
+ const hours = props.showOpeningHours === false ? null : props.openingHours ?? null;
2884
+ if (![
2885
+ location,
2886
+ addressText,
2887
+ hours
2888
+ ].some(Boolean)) return /* @__PURE__ */ jsx("p", {
2889
+ className: "rb-caption",
2890
+ style: textColorStyle("mutedText"),
2891
+ children: props.unresolvedMessage ?? "Location details coming soon."
2892
+ });
2893
+ return /* @__PURE__ */ jsx(LocationMapDetails, {
2894
+ ...props,
2895
+ openingHours: hours
2896
+ });
2897
+ }
2898
+ /** The entrance-photo Look leaves the drawing out; Look layouts treat the authored height as a minimum. */
2899
+ function LocationMapDrawing(props) {
2900
+ return /* @__PURE__ */ jsx(AdmittedMapDrawingSvg, {
2901
+ drawing: props.drawing,
2902
+ wider: props.wider,
2903
+ label: props.addressText ?? void 0,
2904
+ height: props.heightPx,
2905
+ heightAs: props.lookLayout ? "minimum" : "fixed"
2906
+ });
2907
+ }
2908
+ /**
2909
+ * `data-map="none"` marks details shown without a drawing (none yet, or the entrance photo
2910
+ * takes its place), so map Looks lay the details out on their own instead of beside an empty space.
2911
+ */
2912
+ function LocationMapDetails(props) {
2913
+ const drawing = props.showMap === false ? null : readableMapDrawing(props.drawing);
2914
+ return /* @__PURE__ */ jsxs("div", {
2915
+ className: "rb-location-map",
2916
+ "data-map": drawing ? "drawing" : "none",
2917
+ children: [drawing ? /* @__PURE__ */ jsx(LocationMapDrawing, {
2918
+ ...props,
2919
+ drawing
2920
+ }) : null, /* @__PURE__ */ jsxs("div", {
2921
+ className: "rb-location-map-details",
2922
+ ...props.detailsSlot,
2923
+ children: [/* @__PURE__ */ jsx(LocationMapPlace, { ...props }), /* @__PURE__ */ jsx(OpeningHoursTable, {
2924
+ lookLayout: props.lookLayout,
2925
+ hours: props.openingHours ?? null
2926
+ })]
2927
+ })]
2928
+ });
2929
+ }
2930
+ /** Address, door note and the directions actions. */
2931
+ function LocationMapPlace(props) {
2932
+ const address = props.showAddressText && props.addressText ? props.addressText : null;
2933
+ return /* @__PURE__ */ jsxs("div", {
2934
+ className: "rb-location-map-place",
2935
+ "data-slot": props.lookLayout ? "copy" : void 0,
2936
+ children: [
2937
+ address ? /* @__PURE__ */ jsx("p", {
2938
+ className: "rb-location-map-address",
2939
+ "data-slot": props.lookLayout ? "headline" : void 0,
2940
+ children: address
2941
+ }) : null,
2942
+ props.doorNote ? /* @__PURE__ */ jsx("p", {
2943
+ className: "rb-location-map-door",
2944
+ children: props.doorNote
2945
+ }) : null,
2946
+ props.showDirections ? /* @__PURE__ */ jsx(LocationMapActions, {
2947
+ layout: "block",
2948
+ location: props.location,
2949
+ addressText: props.addressText,
2950
+ directionsLabel: props.directionsLabel,
2951
+ googleMapsLabel: props.googleMapsLabel
2952
+ }) : null
2953
+ ]
2954
+ });
2955
+ }
2956
+ //#endregion
2538
2957
  //#region ../blocks/src/system/runtime/nodes/basic.tsx
2539
2958
  const TextNode = ({ value, children, blockContent, inlineTextFallbackPath, ...rest }) => {
2540
2959
  const inlineText = parseInlineTextFromUnknown(value);
@@ -3045,7 +3464,7 @@ function getIslandRootProps(kind, id) {
3045
3464
  return resolved;
3046
3465
  }
3047
3466
  function serializeIslandProps(value) {
3048
- return JSON.stringify(value).replace(/</g, "\\u003c");
3467
+ return JSON.stringify(serializeSurfaceTree(value)).replace(/</g, "\\u003c");
3049
3468
  }
3050
3469
  function IslandPropsScript({ value }) {
3051
3470
  return /* @__PURE__ */ jsx("script", {
@@ -3382,103 +3801,6 @@ function HeaderControlNode({ className, children, "aria-label": label, "aria-exp
3382
3801
  });
3383
3802
  }
3384
3803
  //#endregion
3385
- //#region ../blocks/src/system/runtime/nodes/svg.tsx
3386
- /**
3387
- * Strict SVG-`transform` validator.
3388
- *
3389
- * Accepts only a whitespace/comma-separated list of the geometric transform
3390
- * functions (`translate`/`rotate`/`scale`/`skewX`/`skewY`/`matrix`) whose
3391
- * arguments are plain numbers. This deliberately rejects anything else —
3392
- * `url(...)`, CSS functions, `javascript:`, angle/length units, stray letters —
3393
- * so a persisted custom-block tree can't smuggle an executable or exfiltrating
3394
- * value into the attribute.
3395
- */
3396
- const TRANSFORM_NUMBER = String.raw`-?(?:\d+\.?\d*|\.\d+)(?:e-?\d+)?`;
3397
- const TRANSFORM_ARGS = String.raw`${TRANSFORM_NUMBER}(?:[\s,]+${TRANSFORM_NUMBER})*`;
3398
- const TRANSFORM_FN = String.raw`(?:translate|rotate|scale|skewX|skewY|matrix)\(\s*${TRANSFORM_ARGS}\s*\)`;
3399
- const SAFE_TRANSFORM_RE = new RegExp(String.raw`^\s*${TRANSFORM_FN}(?:[\s,]*${TRANSFORM_FN})*\s*$`);
3400
- function safeTransform(value) {
3401
- if (typeof value !== "string") return void 0;
3402
- const trimmed = value.trim();
3403
- if (trimmed.length === 0) return void 0;
3404
- return SAFE_TRANSFORM_RE.test(trimmed) ? trimmed : void 0;
3405
- }
3406
- /**
3407
- * Turn paint props into a CSS style object. Colour values pass through as-is so
3408
- * they may reference theme tokens via `var()`, which only resolves in a CSS
3409
- * property context (not in a bare presentation attribute).
3410
- */
3411
- function paintStyle(shape) {
3412
- const style = {};
3413
- if (shape.fill !== void 0) style.fill = shape.fill;
3414
- if (shape.stroke !== void 0) style.stroke = shape.stroke;
3415
- if (shape.strokeWidth !== void 0) style.strokeWidth = shape.strokeWidth;
3416
- if (shape.fillOpacity !== void 0) style.fillOpacity = shape.fillOpacity;
3417
- if (shape.strokeOpacity !== void 0) style.strokeOpacity = shape.strokeOpacity;
3418
- if (shape.strokeLinecap !== void 0) style.strokeLinecap = shape.strokeLinecap;
3419
- if (shape.strokeLinejoin !== void 0) style.strokeLinejoin = shape.strokeLinejoin;
3420
- if (shape.strokeDasharray !== void 0) style.strokeDasharray = shape.strokeDasharray;
3421
- return style;
3422
- }
3423
- function renderShape(shape, key) {
3424
- const style = paintStyle(shape);
3425
- const transform = safeTransform(shape.transform);
3426
- switch (shape.kind) {
3427
- case "path": return /* @__PURE__ */ jsx("path", {
3428
- d: shape.d,
3429
- style,
3430
- transform
3431
- }, key);
3432
- case "ellipse": return /* @__PURE__ */ jsx("ellipse", {
3433
- cx: shape.cx,
3434
- cy: shape.cy,
3435
- rx: shape.rx,
3436
- ry: shape.ry,
3437
- style,
3438
- transform
3439
- }, key);
3440
- case "circle": return /* @__PURE__ */ jsx("circle", {
3441
- cx: shape.cx,
3442
- cy: shape.cy,
3443
- r: shape.r,
3444
- style,
3445
- transform
3446
- }, key);
3447
- case "rect": return /* @__PURE__ */ jsx("rect", {
3448
- x: shape.x,
3449
- y: shape.y,
3450
- width: shape.width,
3451
- height: shape.height,
3452
- rx: shape.rx,
3453
- ry: shape.ry,
3454
- style,
3455
- transform
3456
- }, key);
3457
- case "line": return /* @__PURE__ */ jsx("line", {
3458
- x1: shape.x1,
3459
- y1: shape.y1,
3460
- x2: shape.x2,
3461
- y2: shape.y2,
3462
- style,
3463
- transform
3464
- }, key);
3465
- default: return null;
3466
- }
3467
- }
3468
- const SvgNode = ({ blockId: _blockId, blockKind: _blockKind, blockContent: _blockContent, fragmentRegistry: _fragmentRegistry, pathBase: _pathBase, viewBox, width, height, className, style, ariaHidden = true, shapes }) => {
3469
- return /* @__PURE__ */ jsx("svg", {
3470
- viewBox,
3471
- width,
3472
- height,
3473
- className,
3474
- style,
3475
- "aria-hidden": ariaHidden,
3476
- xmlns: "http://www.w3.org/2000/svg",
3477
- fill: "none",
3478
- children: (Array.isArray(shapes) ? shapes : []).map((shape, index) => renderShape(shape, index))
3479
- });
3480
- };
3481
- //#endregion
3482
3804
  //#region ../blocks/src/system/runtime/nodes/appointment-services.tsx
3483
3805
  const publicVenueSchema = z.object({
3484
3806
  name: z.string(),
@@ -3928,7 +4250,7 @@ function teamMemberCardContent(member, index, biographySource) {
3928
4250
  }
3929
4251
  function TeamMembersNode(props) {
3930
4252
  const parsed = z.array(teamMemberCardSchema).safeParse(props.source === "site_staff" ? props.siteMembers : props.members);
3931
- if (!parsed.success || parsed.data.length === 0) return null;
4253
+ if (!parsed.success) return null;
3932
4254
  return /* @__PURE__ */ jsx(CardListItems, {
3933
4255
  Carousel: props.Carousel,
3934
4256
  items: parsed.data.map((member, index) => teamMemberCardContent(member, index, props.biographySource)),
@@ -3956,12 +4278,12 @@ function toTrimmedString(value) {
3956
4278
  return trimmed ? trimmed : void 0;
3957
4279
  }
3958
4280
  function normalizeBookingFormConfig(form) {
3959
- if (!isRecord$2(form)) return null;
4281
+ if (!isRecord$3(form)) return null;
3960
4282
  const id = readNonEmptyString(form.id);
3961
4283
  const name = readNonEmptyString(form.name);
3962
4284
  if (!id || !name) return null;
3963
- const schemaSource = isRecord$2(form.schema) ? form.schema : isRecord$2(form.schemaJson) ? form.schemaJson : null;
3964
- const settingsSource = isRecord$2(form.settings) ? form.settings : isRecord$2(form.settingsJson) ? form.settingsJson : null;
4285
+ const schemaSource = isRecord$3(form.schema) ? form.schema : isRecord$3(form.schemaJson) ? form.schemaJson : null;
4286
+ const settingsSource = isRecord$3(form.settings) ? form.settings : isRecord$3(form.settingsJson) ? form.settingsJson : null;
3965
4287
  return {
3966
4288
  id,
3967
4289
  name,
@@ -3981,8 +4303,8 @@ function normalizeBookingServices(services) {
3981
4303
  };
3982
4304
  if (!services) return [];
3983
4305
  if (Array.isArray(services)) return services.filter(isBookingFormService).map(normalizeService);
3984
- if (isRecord$2(services) && "services" in services) return Array.isArray(services.services) ? services.services.filter(isBookingFormService).map(normalizeService) : [];
3985
- return isRecord$2(services) ? Object.values(services).filter(isBookingFormService).map(normalizeService) : [];
4306
+ if (isRecord$3(services) && "services" in services) return Array.isArray(services.services) ? services.services.filter(isBookingFormService).map(normalizeService) : [];
4307
+ return isRecord$3(services) ? Object.values(services).filter(isBookingFormService).map(normalizeService) : [];
3986
4308
  }
3987
4309
  function normalizeBookingSchema(value) {
3988
4310
  if (!value) return void 0;
@@ -3993,7 +4315,7 @@ function normalizeBookingSchema(value) {
3993
4315
  };
3994
4316
  }
3995
4317
  function readBookingFormField(value) {
3996
- if (!isRecord$2(value)) return null;
4318
+ if (!isRecord$3(value)) return null;
3997
4319
  const id = readNonEmptyString(value.id);
3998
4320
  const label = readNonEmptyString(value.label);
3999
4321
  const type = readBookingFieldType(value.type);
@@ -4036,7 +4358,7 @@ function readBookingFieldOptions(value) {
4036
4358
  return options.length > 0 ? options : void 0;
4037
4359
  }
4038
4360
  function readBookingFieldOption(value) {
4039
- if (!isRecord$2(value)) return null;
4361
+ if (!isRecord$3(value)) return null;
4040
4362
  const optionValue = readNonEmptyString(value.value);
4041
4363
  const label = readNonEmptyString(value.label);
4042
4364
  return optionValue && label ? {
@@ -4056,7 +4378,7 @@ function normalizeBookingSettings(value) {
4056
4378
  };
4057
4379
  }
4058
4380
  function isBookingFormService(value) {
4059
- return isRecord$2(value) && typeof value.id === "string" && typeof value.siteId === "string" && typeof value.title === "string" && (value.asksSiteTerms === void 0 || typeof value.asksSiteTerms === "boolean") && (value.consent === void 0 || blockBookingConsentSchema.safeParse(value.consent).success);
4381
+ return isRecord$3(value) && typeof value.id === "string" && typeof value.siteId === "string" && typeof value.title === "string" && (value.asksSiteTerms === void 0 || typeof value.asksSiteTerms === "boolean") && (value.consent === void 0 || blockBookingConsentSchema.safeParse(value.consent).success);
4060
4382
  }
4061
4383
  function readNonEmptyString(value) {
4062
4384
  if (typeof value !== "string") return null;
@@ -4074,16 +4396,16 @@ function readStringArray(value) {
4074
4396
  const strings = value.filter((item) => typeof item === "string");
4075
4397
  return strings.length > 0 ? strings : void 0;
4076
4398
  }
4077
- function isRecord$2(value) {
4399
+ function isRecord$3(value) {
4078
4400
  return typeof value === "object" && value !== null;
4079
4401
  }
4080
4402
  //#endregion
4081
4403
  //#region ../blocks/src/system/runtime/nodes/booking-form.service-categories.ts
4082
- function isRecord$1(value) {
4404
+ function isRecord$2(value) {
4083
4405
  return typeof value === "object" && value !== null && !Array.isArray(value);
4084
4406
  }
4085
4407
  function readCategory(value) {
4086
- if (!isRecord$1(value)) return [];
4408
+ if (!isRecord$2(value)) return [];
4087
4409
  const { id, name, description } = value;
4088
4410
  if (typeof id !== "string" || id.trim() === "" || typeof name !== "string") return [];
4089
4411
  return [{
@@ -4099,7 +4421,7 @@ function readCategory(value) {
4099
4421
  * it.
4100
4422
  */
4101
4423
  function normalizeBookingServiceCategories(services) {
4102
- if (!isRecord$1(services) || !Array.isArray(services.categories)) return [];
4424
+ if (!isRecord$2(services) || !Array.isArray(services.categories)) return [];
4103
4425
  return services.categories.flatMap(readCategory);
4104
4426
  }
4105
4427
  //#endregion
@@ -5085,7 +5407,11 @@ function EventVenueFact({ venue }) {
5085
5407
  venue.address ? /* @__PURE__ */ jsx("p", {
5086
5408
  className: "rb-caption",
5087
5409
  children: venue.address
5088
- }) : null
5410
+ }) : null,
5411
+ /* @__PURE__ */ jsx(LocationMapActions, {
5412
+ location: venue.location,
5413
+ addressText: venue.address
5414
+ })
5089
5415
  ]
5090
5416
  }) : null;
5091
5417
  }
@@ -5224,11 +5550,11 @@ function acceptedProductNames(props) {
5224
5550
  const memberships = props.showAcceptedMemberships !== false ? (props.applicableMemberships ?? []).map(({ name }) => name) : [];
5225
5551
  return [...passes, ...memberships];
5226
5552
  }
5227
- function EventVenueMap({ venue, showMap, mapHeight, mapClassName, renderVenueMap }) {
5228
- if (!showMap || !renderVenueMap || !venue?.location) return null;
5229
- return renderVenueMap({
5230
- venueName: venue.name,
5231
- location: venue.location,
5553
+ function EventVenueMap({ venue, showMap, mapHeight, mapClassName }) {
5554
+ if (!showMap || !venue?.drawing) return null;
5555
+ return /* @__PURE__ */ jsx(MapDrawingSvg, {
5556
+ drawing: venue.drawing,
5557
+ label: venue.name,
5232
5558
  className: mapClassName,
5233
5559
  height: mapHeight
5234
5560
  });
@@ -5247,7 +5573,7 @@ function selectedEventPricing(event, showCost) {
5247
5573
  };
5248
5574
  }
5249
5575
  function SelectedEventDetailsView(props) {
5250
- const { selection, showVenue, showMap, showOtherDates, showTitle, showDescription, showCapacity, mapHeight, mapClassName, renderVenueMap, acceptedItems } = props;
5576
+ const { selection, showVenue, showMap, showOtherDates, showTitle, showDescription, showCapacity, mapHeight, mapClassName, acceptedItems } = props;
5251
5577
  const selected = selection.selected;
5252
5578
  const venue = showVenue ? selected.venue : void 0;
5253
5579
  const pricing = selectedEventPricing(selected, props.showCost);
@@ -5278,8 +5604,7 @@ function SelectedEventDetailsView(props) {
5278
5604
  venue,
5279
5605
  showMap,
5280
5606
  mapHeight,
5281
- mapClassName,
5282
- renderVenueMap
5607
+ mapClassName
5283
5608
  })]
5284
5609
  }),
5285
5610
  showOtherDates ? /* @__PURE__ */ jsx(OtherEventDates, { selection }) : null
@@ -5304,7 +5629,6 @@ function LegacyEventDetailsView(props) {
5304
5629
  autoApplyDiscount: props.autoApplyDiscount ?? null,
5305
5630
  mapHeight: props.mapHeight ?? 200,
5306
5631
  mapClassName: props.mapClassName ?? "event-details-map",
5307
- renderVenueMap: props.renderVenueMap,
5308
5632
  acceptedItems: acceptedProductNames(props)
5309
5633
  });
5310
5634
  }
@@ -5344,22 +5668,6 @@ function EventDetailsView(props) {
5344
5668
  }
5345
5669
  //#endregion
5346
5670
  //#region ../blocks/src/system/runtime/nodes/event-details.server.tsx
5347
- function ServerVenueMap({ venueName, className, height }) {
5348
- return /* @__PURE__ */ jsx("div", {
5349
- className: "event-details-map-wrap rb-w-full rb-ml-auto",
5350
- children: /* @__PURE__ */ jsx("div", {
5351
- className,
5352
- style: {
5353
- height: height ?? 200,
5354
- width: "100%",
5355
- borderRadius: "0.5rem",
5356
- overflow: "hidden",
5357
- backgroundColor: "rgb(var(--tb-surface))"
5358
- },
5359
- "aria-label": `Map showing ${venueName}`
5360
- })
5361
- });
5362
- }
5363
5671
  function EventDetailsHydration({ props, presentation, scopedEvents, subject, nowIso }) {
5364
5672
  return /* @__PURE__ */ jsx(IslandPropsScript, { value: {
5365
5673
  ...props.arrangement ? {
@@ -5419,105 +5727,41 @@ function EventDetailsSSR(props) {
5419
5727
  }),
5420
5728
  /* @__PURE__ */ jsx(EventDetailsView, {
5421
5729
  ...presentation,
5422
- mapClassName: "venue-map event-details-map",
5423
- renderVenueMap: ServerVenueMap
5730
+ mapClassName: "venue-map event-details-map"
5424
5731
  }),
5425
5732
  children
5426
5733
  ]
5427
5734
  });
5428
5735
  }
5429
5736
  //#endregion
5430
- //#region ../blocks/src/system/runtime/nodes/location-map.view.tsx
5431
- function OpeningHoursTable({ hours }) {
5432
- if (!hours) return null;
5433
- return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsxs("table", { children: [/* @__PURE__ */ jsx("caption", { children: "Opening hours" }), /* @__PURE__ */ jsx("tbody", { children: formatOpeningHoursRows(hours).map((row) => /* @__PURE__ */ jsxs("tr", {
5434
- "data-closed": row.kind === "closed" ? true : void 0,
5435
- children: [/* @__PURE__ */ jsx("th", {
5436
- scope: "row",
5437
- children: row.label
5438
- }), /* @__PURE__ */ jsx("td", { children: row.hours })]
5439
- }, row.label)) })] }), hours.note ? /* @__PURE__ */ jsx("p", { children: hours.note }) : null] });
5440
- }
5441
- function LocationMapDirections({ url, label }) {
5442
- return url ? /* @__PURE__ */ jsx(ThemedButtonLink, {
5443
- href: url,
5444
- target: "_blank",
5445
- rel: "noreferrer",
5446
- variant: "ghost",
5447
- size: "sm",
5448
- extraClassName: "rb-w-fit",
5449
- label
5450
- }) : null;
5451
- }
5452
- function LocationMapView(props) {
5453
- const { addressText, location, renderMap, zoom, heightPx, showAddressText, directionsLabel } = props;
5454
- const directionsUrl = props.showDirections ? buildGoogleMapsDirectionsUrl({
5455
- addressText,
5456
- location
5457
- }) : null;
5458
- const hours = props.showOpeningHours === false ? null : props.openingHours ?? null;
5459
- if (![
5460
- location,
5461
- addressText,
5462
- directionsUrl,
5463
- hours
5464
- ].some(Boolean)) return /* @__PURE__ */ jsx("p", {
5465
- className: "rb-caption",
5466
- style: textColorStyle("mutedText"),
5467
- children: props.unresolvedMessage ?? "Location details coming soon."
5468
- });
5469
- return /* @__PURE__ */ jsxs("div", {
5470
- className: "rb-flex rb-flex-col rb-gap-4 rb-text-left",
5471
- children: [
5472
- location && renderMap ? renderMap({
5473
- addressText,
5474
- location,
5475
- className: "rb-location-map-canvas",
5476
- height: heightPx,
5477
- zoom
5478
- }) : null,
5479
- showAddressText && addressText ? /* @__PURE__ */ jsx("p", {
5480
- className: "rb-caption",
5481
- style: textColorStyle("mutedText"),
5482
- children: addressText
5483
- }) : null,
5484
- /* @__PURE__ */ jsx(OpeningHoursTable, { hours }),
5485
- /* @__PURE__ */ jsx(LocationMapDirections, {
5486
- url: directionsUrl,
5487
- label: directionsLabel
5488
- })
5489
- ]
5490
- });
5491
- }
5492
- //#endregion
5493
5737
  //#region ../blocks/src/system/runtime/nodes/location-map.server.tsx
5738
+ const lookPresentationSchema = z.object({
5739
+ lookSlots: lookListPresentationSchemaShape.lookSlots,
5740
+ itemSurfaces: lookListPresentationSchemaShape.itemSurfaces
5741
+ });
5494
5742
  function LocationMapSSR(props) {
5495
5743
  const normalized = normalizeLocationMapProps(props);
5496
- const hydrationProps = toLocationMapHydrationProps(props);
5744
+ if (normalized.resolvedLocation.kind === "unresolved") return null;
5497
5745
  return /* @__PURE__ */ jsxs("div", {
5498
5746
  className: `location-map ${normalized.className ?? ""}`.trim(),
5499
5747
  "data-block": "location-map",
5500
- ...getIslandRootProps("location-map", props.blockId),
5501
- children: [
5502
- /* @__PURE__ */ jsx(IslandPropsScript, { value: hydrationProps }),
5503
- /* @__PURE__ */ jsx(LocationMapView, {
5504
- ...normalized,
5505
- renderMap: ({ addressText, className, height }) => /* @__PURE__ */ jsx("div", {
5506
- className,
5507
- style: {
5508
- height,
5509
- width: "100%",
5510
- borderRadius: "0.75rem",
5511
- overflow: "hidden",
5512
- backgroundColor: "rgb(var(--tb-surface))"
5513
- },
5514
- "aria-label": addressText ? `Map showing ${addressText}` : "Map showing business location"
5515
- })
5516
- }),
5517
- props.children
5518
- ]
5748
+ style: props.mapStyle ?? void 0,
5749
+ children: [/* @__PURE__ */ jsx(LocationMapView, {
5750
+ ...normalized,
5751
+ showMap: props.showMap !== false,
5752
+ lookLayout: props.lookSlots != null,
5753
+ detailsSlot: lookDetailsSlot(props)
5754
+ }), props.children]
5519
5755
  });
5520
5756
  }
5757
+ /** Legacy and automatic-Look markup carries no slot; Look-only layouts mark the details as the panel. */
5758
+ function lookDetailsSlot(props) {
5759
+ const presentation = lookPresentationSchema.safeParse({
5760
+ lookSlots: props.lookSlots ?? void 0,
5761
+ itemSurfaces: props.itemSurfaces ?? void 0
5762
+ });
5763
+ return presentation.success ? listLookSlot(presentation.data, "panel") : {};
5764
+ }
5521
5765
  //#endregion
5522
5766
  //#region ../blocks/src/system/runtime/nodes/events/EventSpotlight.tsx
5523
5767
  /**
@@ -5649,6 +5893,7 @@ function renderEventListItem(event, source) {
5649
5893
  lookSlots: display.lookSlots,
5650
5894
  itemSurfaces: display.itemSurfaces,
5651
5895
  showCapacity: display.showCapacity,
5896
+ showVenue: display.showVenue,
5652
5897
  buttonVariant: display.buttonVariant,
5653
5898
  buttonText: display.buttonText
5654
5899
  }, event.occurrenceId || event.id);
@@ -6694,7 +6939,8 @@ function RecurringSchedule({ dateContext = resolveDateRuntimeContext(void 0), sc
6694
6939
  function RecurringScheduleRow({ item, locale, buttonText, buttonVariant, showVenue }) {
6695
6940
  const startLabel = formatEventClockLabel(item.cadence.startTime, locale);
6696
6941
  const endLabel = formatEventClockLabel(item.cadence.endTime, locale);
6697
- const description = `${item.title}, ${item.cadence.weekday} at ${startLabel}`;
6942
+ const weekdays = item.cadence.weekdays?.join(", ") ?? item.cadence.weekday;
6943
+ const description = `${item.title}, ${weekdays} at ${startLabel}`;
6698
6944
  return /* @__PURE__ */ jsxs("article", {
6699
6945
  className: "recurring-schedule-row",
6700
6946
  role: "listitem",
@@ -6702,7 +6948,7 @@ function RecurringScheduleRow({ item, locale, buttonText, buttonVariant, showVen
6702
6948
  children: [
6703
6949
  /* @__PURE__ */ jsx("p", {
6704
6950
  className: "recurring-schedule-day",
6705
- children: item.cadence.weekday
6951
+ children: weekdays
6706
6952
  }),
6707
6953
  /* @__PURE__ */ jsxs("p", {
6708
6954
  className: "recurring-schedule-time",
@@ -7378,6 +7624,27 @@ function GiftingSSR({ blockId, ...rest }) {
7378
7624
  });
7379
7625
  }
7380
7626
  //#endregion
7627
+ //#region ../blocks/src/system/runtime/nodes/events/shared/CalendarRecurringWeek.tsx
7628
+ /** Week mode keeps the series projection and booking destinations from issue 1586. */
7629
+ function CalendarRecurringWeek({ display }) {
7630
+ return /* @__PURE__ */ jsxs("div", {
7631
+ className: "event-calendar event-calendar--recurring-week",
7632
+ children: [display.seeAllUrl ? /* @__PURE__ */ jsx(ThemedButtonLink, {
7633
+ href: display.seeAllUrl,
7634
+ variant: display.seeAllButtonVariant,
7635
+ size: "md",
7636
+ label: display.loadMoreText ?? "See all classes"
7637
+ }) : null, /* @__PURE__ */ jsx(RecurringSchedule, {
7638
+ schedule: display.schedule,
7639
+ dateContext: display.dateContext,
7640
+ buttonText: display.buttonText,
7641
+ buttonVariant: display.buttonVariant,
7642
+ showVenue: display.showVenue,
7643
+ emptyMessage: display.emptyMessage
7644
+ })]
7645
+ });
7646
+ }
7647
+ //#endregion
7381
7648
  //#region ../blocks/src/system/runtime/nodes/events/shared/EventListWeekNavigation.tsx
7382
7649
  function EventListWeekNavigation(props) {
7383
7650
  return /* @__PURE__ */ jsxs("nav", {
@@ -8580,32 +8847,22 @@ function hourToTickPercent(hour, hours) {
8580
8847
  const range = Math.max(1, endHour - startHour);
8581
8848
  return (hour - startHour) / range * 100;
8582
8849
  }
8583
- const EventCalendarSSR = (props) => {
8584
- const islandProps = buildEventCalendarInteractiveIslandProps(props);
8585
- const display = islandProps.render.display;
8586
- const hydration = islandProps.render.hydration;
8587
- let content;
8850
+ function renderEventCalendarMode(display, hydration) {
8588
8851
  switch (display.displayMode) {
8589
- case "combined":
8590
- content = renderCombinedSsr(display, hydration.prefetchedEvents);
8591
- break;
8592
- case "list":
8593
- content = renderListSsr(display, hydration);
8594
- break;
8595
- case "timetable":
8596
- content = renderTimetableSsr(display, hydration);
8597
- break;
8598
- case "week-board":
8599
- content = renderWeekBoardSsr(display, hydration);
8600
- break;
8601
- case "calendar":
8602
- content = renderCalendarSsr(display, hydration);
8603
- break;
8604
- default: content = assertNeverDisplayMode(display.displayMode);
8852
+ case "week": return /* @__PURE__ */ jsx(CalendarRecurringWeek, { display });
8853
+ case "combined": return renderCombinedSsr(display, hydration.prefetchedEvents);
8854
+ case "list": return renderListSsr(display, hydration);
8855
+ case "timetable": return renderTimetableSsr(display, hydration);
8856
+ case "week-board": return renderWeekBoardSsr(display, hydration);
8857
+ case "calendar": return renderCalendarSsr(display, hydration);
8858
+ default: return assertNeverDisplayMode(display.displayMode);
8605
8859
  }
8860
+ }
8861
+ const EventCalendarSSR = (props) => {
8862
+ const islandProps = buildEventCalendarInteractiveIslandProps(props);
8606
8863
  return /* @__PURE__ */ jsxs("div", {
8607
8864
  ...getIslandRootProps("event-calendar", props.blockId),
8608
- children: [/* @__PURE__ */ jsx(IslandPropsScript, { value: islandProps }), content]
8865
+ children: [/* @__PURE__ */ jsx(IslandPropsScript, { value: islandProps }), renderEventCalendarMode(islandProps.render.display, islandProps.render.hydration)]
8609
8866
  });
8610
8867
  };
8611
8868
  //#endregion
@@ -9698,14 +9955,14 @@ function isDecoratedHeadingBlockKind(blockKind) {
9698
9955
  return blockKind === "block.intro" || blockKind === "block.feature-cards" || blockKind === "block.testimonials" || blockKind === "block.faq";
9699
9956
  }
9700
9957
  function readVariant(blockContent) {
9701
- if (!isRecord(blockContent)) return void 0;
9958
+ if (!isRecord$1(blockContent)) return void 0;
9702
9959
  const variant = blockContent.variant;
9703
9960
  return typeof variant === "string" ? variant : void 0;
9704
9961
  }
9705
9962
  function isFaqDecoratedVariant(variant) {
9706
9963
  return variant === "default" || variant === "question-columns";
9707
9964
  }
9708
- function isRecord(value) {
9965
+ function isRecord$1(value) {
9709
9966
  return typeof value === "object" && value !== null && !Array.isArray(value);
9710
9967
  }
9711
9968
  function buildHeadingDecorationWrapperClassName(className) {
@@ -10708,318 +10965,68 @@ function getDefaultComponentRegistry() {
10708
10965
  return serverComponentRegistry;
10709
10966
  }
10710
10967
  //#endregion
10711
- //#region ../blocks/src/pageRenderingMode.ts
10712
- var MissingBlockOverrideError$1 = class extends Error {
10713
- constructor(blockKind) {
10714
- super(`Override-only rendering requires an override for block kind "${blockKind}".`);
10715
- this.blockKind = blockKind;
10716
- this.code = "missing_block_override";
10717
- this.name = "MissingBlockOverrideError";
10718
- }
10968
+ //#region ../blocks/src/system/runtime/blockComposition.ts
10969
+ const compositionTreatments = {
10970
+ intro: introCompositionTreatmentValues,
10971
+ "feature-cards": featureCardCompositionTreatmentValues,
10972
+ testimonials: testimonialsCompositionTreatmentValues,
10973
+ "offerings-preview": offeringsPreviewCompositionTreatmentValues
10719
10974
  };
10720
- function isOverrideOnlyResourceInput(props) {
10721
- return props.rendering?.kind === "overrides-only";
10722
- }
10723
- function isTokensOnlyResourceInput(props) {
10724
- return props.rendering?.kind === "tokens-only";
10975
+ function isCompositionKind(value) {
10976
+ return Object.prototype.hasOwnProperty.call(compositionTreatments, value);
10725
10977
  }
10726
- function resolvePageThemeResources(props) {
10727
- if (isOverrideOnlyResourceInput(props)) return { kind: "unavailable" };
10728
- if (isTokensOnlyResourceInput(props)) return {
10729
- kind: "available",
10730
- tokens: props.themeTokens
10731
- };
10732
- return {
10733
- kind: "available",
10734
- tokens: props.themeTokens ?? buildThemeRuntime$1(props.theme).tokens,
10735
- config: props.theme
10978
+ /**
10979
+ * Narrow one kind's treatment. Written per-kind so the returned intent is a
10980
+ * real union member rather than a cast: `kind` and `treatment` are only known
10981
+ * to belong together inside a scope where `Kind` is a single kind.
10982
+ */
10983
+ function readTreatment(kind, value) {
10984
+ const treatment = compositionTreatments[kind].find((candidate) => candidate === value);
10985
+ return treatment === void 0 ? null : {
10986
+ kind,
10987
+ treatment
10736
10988
  };
10737
10989
  }
10738
- function requireBlockOverride(resources, override, blockKind) {
10739
- if (resources.kind === "unavailable" && !override) throw new MissingBlockOverrideError$1(blockKind);
10740
- }
10741
- function overrideThemeProps(resources) {
10742
- return resources.kind === "available" ? {
10743
- theme: resources.tokens,
10744
- ...resources.config ? { themeConfig: resources.config } : {}
10745
- } : {};
10990
+ function readBlockComposition(value) {
10991
+ if (!isRecord(value) || typeof value.kind !== "string") return null;
10992
+ if (!isCompositionKind(value.kind)) return null;
10993
+ return readTreatment(value.kind, value.treatment);
10746
10994
  }
10747
- function requireThemeResources(resources, blockKind) {
10748
- if (resources.kind === "unavailable") throw new MissingBlockOverrideError$1(blockKind);
10749
- return resources;
10995
+ function isRecord(value) {
10996
+ return typeof value === "object" && value !== null && !Array.isArray(value);
10750
10997
  }
10751
- //#endregion
10752
- //#region ../blocks/src/pageRendererBoundaries.tsx
10753
- function joinSlotsByPair(slots) {
10754
- return new Map(slots.map((slot) => [joinSlotKey(slot.previousBlockId, slot.nextBlockId), slot]));
10998
+ function arrangementHooksFromContent(content) {
10999
+ const value = content._lookHooks;
11000
+ if (typeof value !== "object" || value === null || Array.isArray(value)) return {};
11001
+ return Object.fromEntries(Object.entries(value).filter((entry) => typeof entry[1] === "string" && arrangementLookHooks.some((hook) => hook.endsWith("*") ? entry[0].startsWith(hook.slice(0, -1)) : entry[0] === hook)));
10755
11002
  }
10756
- function joinSlotBetween(previousBlockId, nextBlockId, slots) {
10757
- if (!previousBlockId || !nextBlockId) return null;
10758
- return slots.get(joinSlotKey(previousBlockId, nextBlockId)) ?? null;
11003
+ function blockLookFromContent(content) {
11004
+ return typeof content.blockLook === "string" ? content.blockLook : void 0;
10759
11005
  }
11006
+ //#endregion
11007
+ //#region ../blocks/src/system/componentFactory.ts
10760
11008
  /**
10761
- * The markup at one join: the painted boundary element when the join draws,
10762
- * then whatever `renderJoin` adds. Null when there is nothing to render.
11009
+ * Resolves the layout definition for a block based on its manifest and content.
11010
+ *
11011
+ * Fallback chain:
11012
+ * 1. content.variant (if manifest.variants exists and contains the key)
11013
+ * 2. content.layout (legacy blog listing support)
11014
+ * 3. manifest.defaultVariant (if manifest.variants exists)
11015
+ * 4. First key in manifest.variants
11016
+ * 5. manifest.layout
11017
+ *
11018
+ * @param manifest - The block manifest
11019
+ * @param content - The block content object
11020
+ * @returns The resolved NodeDefinition layout or null if none found
10763
11021
  */
10764
- function renderJoinSlot(input) {
10765
- const { slot } = input;
10766
- if (!slot) return null;
10767
- const layout = renderedJoinLayout(slot.join);
10768
- const painted = slot.join && layout ? /* @__PURE__ */ jsx("div", {
10769
- "aria-hidden": "true",
10770
- "data-block-boundary": "",
10771
- "data-boundary-id": slot.join.boundaryId,
10772
- "data-boundary-previous-block-id": slot.previousBlockId,
10773
- "data-boundary-next-block-id": slot.nextBlockId,
10774
- "data-boundary-treatment": slot.join.treatment,
10775
- "data-boundary-placement": layout.placement,
10776
- style: boundaryPaintStyle(layout.paint)
10777
- }, `${input.blockKey}:boundary`) : null;
10778
- const extra = input.renderJoin?.({
10779
- previousBlockId: slot.previousBlockId,
10780
- nextBlockId: slot.nextBlockId,
10781
- join: slot.join
10782
- });
10783
- if (!painted && (extra === null || extra === void 0)) return null;
10784
- return /* @__PURE__ */ jsxs(React.Fragment, { children: [painted, extra] }, `${input.blockKey}:join`);
10785
- }
10786
- /**
10787
- * The one render-edge place a theme token becomes CSS.
10788
- */
10789
- function themeTokenCss(token) {
10790
- return `rgb(var(--tb-${token}))`;
10791
- }
10792
- function boundaryPaintStyle(paint) {
10793
- return {
10794
- "--boundary-shape-paint": themeTokenCss(paint.shape),
10795
- ...paint.band ? { "--boundary-band-paint": themeTokenCss(paint.band) } : {}
10796
- };
10797
- }
10798
- /**
10799
- * Reserve attributes and variables for a block wrapper, from the joins on
10800
- * either side. A join's `before` reserve sits inside its previous section, so
10801
- * it pads the bottom of the block above the join; its `after` reserve pads the
10802
- * top of the block below. Joins that do not draw reserve nothing.
10803
- */
10804
- function blockBoundaryReserves(input) {
10805
- const top = reserveOnSide(input.before, "after");
10806
- const bottom = reserveOnSide(input.after, "before");
10807
- const style = {
10808
- ...top ? { "--site-style-boundary-before-reserve": top.length } : {},
10809
- ...bottom ? { "--site-style-boundary-after-reserve": bottom.length } : {}
10810
- };
10811
- return {
10812
- topPlacement: top?.placement,
10813
- bottomPlacement: bottom?.placement,
10814
- style: top || bottom ? style : void 0
10815
- };
10816
- }
10817
- /** The reserve one join needs on one side of itself, if it draws at all. */
10818
- function reserveOnSide(slot, side) {
10819
- const layout = renderedJoinLayout(slot?.join ?? null);
10820
- const length = layout?.reserves[side] ?? null;
10821
- return layout && length ? {
10822
- length,
10823
- placement: layout.placement
10824
- } : null;
10825
- }
10826
- function pageBlockPosition(index, blockCount) {
10827
- if (blockCount <= 1) return "only";
10828
- if (index === 0) return "first";
10829
- if (index === blockCount - 1) return "last";
10830
- return "middle";
10831
- }
10832
- //#endregion
10833
- //#region ../blocks/src/pageRendererContracts.ts
10834
- function buildPageRendererRootRuntime(dataContext) {
10835
- const { siteId = null, siteName, pageId = null, pathname = null, bookingTimeZone, previewStage = "published", apiBaseUrl = null, portalToken = null, readAuthority, bookingOfferingPresets = [], appointmentServicePathPrefix = null, openingHours, siteTerms, mailingList = { tag: "not_configured" }, loaderFailures = {} } = dataContext ?? {};
10836
- return {
10837
- siteId,
10838
- demoEmailSuppressed: resolveDemoEmailSuppression(dataContext),
10839
- siteName,
10840
- pageId,
10841
- pathname,
10842
- bookingTimeZone,
10843
- ...pageDateRuntime(dataContext),
10844
- previewStage,
10845
- apiBaseUrl,
10846
- portalToken,
10847
- readAuthority,
10848
- bookingOfferingPresets,
10849
- appointmentServicePathPrefix,
10850
- openingHours,
10851
- siteTerms,
10852
- mailingList,
10853
- loaderFailures
10854
- };
10855
- }
10856
- function resolveDemoEmailSuppression(dataContext) {
10857
- return dataContext?.demoEmailSuppressed === true;
10858
- }
10859
- function pageDateRuntime(dataContext) {
10860
- return {
10861
- dateContext: pageDateRuntimeContext(dataContext),
10862
- now: dataContext?.now
10863
- };
10864
- }
10865
- function pageDateRuntimeContext(dataContext) {
10866
- return dataContext?.dateContext ?? resolveDateRuntimeContext(dataContext?.bookingTimeZone);
10867
- }
10868
- //#endregion
10869
- //#region ../blocks/src/pageRenderAudience.tsx
10870
- /**
10871
- * The single policy for what a non-renderable block looks like.
10872
- *
10873
- * Public visitors never see renderer diagnostics, so every reason omits.
10874
- * Authoring surfaces keep the wording they have always had — the strings below
10875
- * are moved verbatim from the five former `fallback()` call sites.
10876
- */
10877
- function presentNotRenderableBlock(reason, audience) {
10878
- if (audience === "public") return null;
10879
- return diagnostic(authoringMessage(reason));
10880
- }
10881
- function authoringMessage(reason) {
10882
- switch (reason.kind) {
10883
- case "invalid-admission": return `Invalid content for block kind "${reason.blockKind}".`;
10884
- case "missing-definition": return reason.isCustom ? `No renderer available for block kind "${reason.blockKind}". The custom block definition was not found (missing manifest).` : `No renderer available for block kind "${reason.blockKind}".`;
10885
- case "missing-layout": return reason.isCustom ? `No renderer available for block kind "${reason.blockKind}". This custom block has no layout/variants, so it must be rendered via blockOverrides["${reason.blockKind}"].` : `No renderer available for block kind "${reason.blockKind}".`;
10886
- case "editor-unpreviewable":
10887
- case "render-threw": return `Unable to render block kind "${reason.blockKind}".`;
10888
- }
10889
- }
10890
- /**
10891
- * The empty-page notice. Authoring-only for the same reason as the block
10892
- * diagnostics: "No blocks found." is a message for whoever is building the
10893
- * page, not for whoever is reading it.
10894
- */
10895
- function presentEmptyPage(audience) {
10896
- if (audience === "public") return null;
10897
- return diagnostic("No blocks found.");
10898
- }
10899
- function diagnostic(message) {
10900
- return /* @__PURE__ */ jsx("div", {
10901
- className: "rb-p-6 rb-caption",
10902
- style: textColorStyle("mutedText"),
10903
- children: message
10904
- });
10905
- }
10906
- //#endregion
10907
- //#region ../blocks/src/pageRenderDiagnostics.ts
10908
- /**
10909
- * Emits one structured record per omitted block, per server render pass.
10910
- *
10911
- * Server-only by decision D3: public pages are server-rendered, and this is the
10912
- * runtime whose logger transport reaches centralised collection. A browser-side
10913
- * record would not, and re-render/hydration would multiply it. The cost is that
10914
- * an omission only a client navigation can see goes unlogged.
10915
- *
10916
- * Deliberately *not* inside the plan's `useMemo` — React makes no promises about
10917
- * when a memo recomputes, so a log placed there is neither reliable nor bounded.
10918
- */
10919
- function logOmittedBlocks(plan, dataContext) {
10920
- if (typeof window !== "undefined") return;
10921
- if (plan.omitted.length === 0) return;
10922
- const page = {
10923
- siteId: dataContext?.siteId ?? null,
10924
- pageId: dataContext?.pageId ?? null
10925
- };
10926
- if (plan.entries.length === 0) {
10927
- logger.error("blocks.pageRenderer.pageFullyOmitted", {
10928
- ...page,
10929
- omittedCount: plan.omitted.length,
10930
- blocks: plan.omitted.map((omission) => ({
10931
- blockId: omission.blockId,
10932
- blockKind: omission.blockKind,
10933
- reason: omission.reason.kind
10934
- }))
10935
- });
10936
- debugOmittedCustomBlocks(plan);
10937
- return;
10938
- }
10939
- for (const omission of plan.omitted) logger.warn("blocks.pageRenderer.blockOmitted", {
10940
- ...page,
10941
- blockId: omission.blockId,
10942
- blockKind: omission.blockKind,
10943
- reason: omission.reason.kind,
10944
- admissionError: omission.reason.kind === "invalid-admission" ? omission.reason.error.kind : null
10945
- });
10946
- debugOmittedCustomBlocks(plan);
10947
- }
10948
- /**
10949
- * Unlike the plan-time omissions this one genuinely can fire per re-render —
10950
- * it is raised where the failure happens, and no once-ness is claimed for it.
10951
- */
10952
- function logRenderThrew(block, dataContext) {
10953
- if (typeof window !== "undefined") return;
10954
- logger.warn("blocks.pageRenderer.blockRenderThrew", {
10955
- siteId: dataContext?.siteId ?? null,
10956
- pageId: dataContext?.pageId ?? null,
10957
- blockId: block.id ?? null,
10958
- blockKind: block.kind
10959
- });
10960
- }
10961
- /**
10962
- * Opt-in developer affordance for tracking down custom-block resolution.
10963
- *
10964
- * Driven off the plan's omissions so it stays reachable on **public** renders —
10965
- * "my custom block doesn't show up on the live site" is the exact situation it
10966
- * exists for, and that is the render where the block is now silently absent.
10967
- */
10968
- function debugOmittedCustomBlocks(plan) {
10969
- if (!shouldDebugCustomBlocks()) return;
10970
- for (const omission of plan.omitted) {
10971
- if (!omission.blockKind.startsWith("custom.")) continue;
10972
- debugCustomBlockResolution(omission.reason.kind, omission.blockId, omission.blockKind, omission.debug);
10973
- }
10974
- }
10975
- /** The authoring-side equivalent, where the block stays in the entry list. */
10976
- function debugCustomBlockDiagnostic(reason, block, debug) {
10977
- if (!block.kind.startsWith("custom.") || !shouldDebugCustomBlocks()) return;
10978
- debugCustomBlockResolution(reason.kind, block.id ?? null, block.kind, debug);
10979
- }
10980
- function debugCustomBlockResolution(reasonKind, blockId, blockKind, debug) {
10981
- try {
10982
- console.warn(reasonKind === "missing-definition" ? "[blocks:PageRenderer] custom block definition missing" : "[blocks:PageRenderer] custom block has no layout/variants and no override", {
10983
- blockId,
10984
- blockKind,
10985
- hasOverride: debug.hasOverride,
10986
- sdkCustomBlocksCount: debug.sdkCustomBlocksCount,
10987
- dbCustomBlocksCount: debug.dbCustomBlocksCount,
10988
- manifestKeys: debug.manifestKeys
10989
- });
10990
- } catch {}
10991
- }
10992
- function shouldDebugCustomBlocks() {
10993
- try {
10994
- return globalThis.process?.env?.DEBUG_CUSTOM_BLOCKS === "1";
10995
- } catch {
10996
- return false;
10997
- }
10998
- }
10999
- //#endregion
11000
- //#region ../blocks/src/system/componentFactory.ts
11001
- /**
11002
- * Resolves the layout definition for a block based on its manifest and content.
11003
- *
11004
- * Fallback chain:
11005
- * 1. content.variant (if manifest.variants exists and contains the key)
11006
- * 2. content.layout (legacy blog listing support)
11007
- * 3. manifest.defaultVariant (if manifest.variants exists)
11008
- * 4. First key in manifest.variants
11009
- * 5. manifest.layout
11010
- *
11011
- * @param manifest - The block manifest
11012
- * @param content - The block content object
11013
- * @returns The resolved NodeDefinition layout or null if none found
11014
- */
11015
- function resolveBlockVariantKey(manifest, content) {
11016
- const runtimeLook = content._effectiveLook;
11017
- const look = isObjectRecord(runtimeLook) && isObjectRecord(runtimeLook.look) && isObjectRecord(runtimeLook.look.structure) && runtimeLook.look.structure.kind === "arrangement" ? runtimeLook.look : null;
11018
- return resolveEffectiveArrangement({
11019
- manifest: arrangementManifestFromVariants(manifest),
11020
- look,
11021
- storedVariant: parseStoredVariant(manifest, content)
11022
- }).key;
11022
+ function resolveBlockVariantKey(manifest, content) {
11023
+ const runtimeLook = content._effectiveLook;
11024
+ const look = isObjectRecord(runtimeLook) && isObjectRecord(runtimeLook.look) && isObjectRecord(runtimeLook.look.structure) && runtimeLook.look.structure.kind === "arrangement" ? runtimeLook.look : null;
11025
+ return resolveEffectiveArrangement({
11026
+ manifest: arrangementManifestFromVariants(manifest),
11027
+ look,
11028
+ storedVariant: parseStoredVariant(manifest, content)
11029
+ }).key;
11023
11030
  }
11024
11031
  function resolveBlockLayout(manifest, effectiveKey) {
11025
11032
  if (!manifest.variants) return manifest.layout ?? null;
@@ -11151,132 +11158,451 @@ function makeDefaultBlockComponent(args) {
11151
11158
  return result;
11152
11159
  };
11153
11160
  }
11154
- function prepareBlockRender(input) {
11155
- const mergedContent = mergeContentWithBlockStyleOverrides(input.content, input.themeConfig, input.blockKind);
11161
+ function prepareBlockRender(input) {
11162
+ const mergedContent = mergeContentWithBlockStyleOverrides(input.content, input.themeConfig, input.blockKind);
11163
+ return {
11164
+ mergedContent,
11165
+ viewModel: buildBlockViewModel({
11166
+ mergedContent,
11167
+ data: input.data,
11168
+ resolvedThemeConfig: resolveThemeConfigForBindings(input.themeConfig),
11169
+ viewModelOverrides: input.viewModelOverrides
11170
+ }),
11171
+ themeForTransforms: withThemeRuntimeFacts(input.theme, input.themeConfig),
11172
+ proseHoverCandidate: parseThemeColorToken(input.themeConfig?.typography.proseLinkStyle?.hoverColorToken) ?? void 0
11173
+ };
11174
+ }
11175
+ function buildBlockViewModel(input) {
11176
+ const themeBinding = input.resolvedThemeConfig ? { theme: input.resolvedThemeConfig } : {};
11177
+ const baseData = input.data ? { data: { ...input.data } } : {};
11178
+ const overrides = input.viewModelOverrides ?? {};
11179
+ const existingRoot = overrides.$root;
11180
+ return {
11181
+ content: input.mergedContent,
11182
+ ...themeBinding,
11183
+ ...baseData,
11184
+ ...overrides,
11185
+ $root: {
11186
+ ...existingRoot ?? {},
11187
+ ...themeBinding
11188
+ }
11189
+ };
11190
+ }
11191
+ /** The theme facts transforms decide from: button system, and the arrangement skin map tokens follow. */
11192
+ function withThemeRuntimeFacts(theme, themeConfig) {
11193
+ if (!themeConfig) return theme;
11194
+ return {
11195
+ ...theme,
11196
+ buttons: themeConfig.buttons ?? generateDefaultButtonSystem(themeConfig),
11197
+ ...themeConfig.skin === void 0 ? {} : { skin: themeConfig.skin }
11198
+ };
11199
+ }
11200
+ function beginBlockRenderMeasurement() {
11201
+ const perfEnv = globalThis.process?.env;
11202
+ if (perfEnv?.DEBUG_PERF !== "1" || typeof window !== "undefined") return null;
11203
+ const parsedThreshold = Number.parseInt(perfEnv.DEBUG_PERF_BLOCK_MS ?? "", 10);
11204
+ return {
11205
+ startedAt: Date.now(),
11206
+ thresholdMs: Number.isFinite(parsedThreshold) && parsedThreshold > 0 ? parsedThreshold : 25
11207
+ };
11208
+ }
11209
+ function reportSlowBlockRender(measurement, input) {
11210
+ if (!measurement) return;
11211
+ const durationMs = Date.now() - measurement.startedAt;
11212
+ if (durationMs < measurement.thresholdMs) return;
11213
+ const content = typeof input.content === "object" && input.content !== null ? input.content : null;
11214
+ const variant = typeof content?.variant === "string" ? content.variant : typeof content?.layout === "string" ? content.layout : null;
11215
+ console.log("perf.blocks.resolveTree", {
11216
+ blockId: input.blockId ?? null,
11217
+ blockKind: input.blockKind,
11218
+ manifest: input.manifestName,
11219
+ variant,
11220
+ durationMs
11221
+ });
11222
+ }
11223
+ function resolveThemeConfigForBindings(themeConfig) {
11224
+ if (!themeConfig || themeConfig.accordions) return themeConfig;
11225
+ assertThemeConfigCanGenerateAccordionSystem(themeConfig);
11226
+ return {
11227
+ ...themeConfig,
11228
+ accordions: generateDefaultAccordionSystem(themeConfig)
11229
+ };
11230
+ }
11231
+ function assertThemeConfigCanGenerateAccordionSystem(themeConfig) {
11232
+ const missingPaths = [
11233
+ ["axes.tone", themeConfig.axes?.tone],
11234
+ ["axes.density", themeConfig.axes?.density],
11235
+ ["axes.conversionBias", themeConfig.axes?.conversionBias],
11236
+ ["space", themeConfig.space],
11237
+ ["border.width", themeConfig.border?.width],
11238
+ ["shadow.elevation", themeConfig.shadow?.elevation],
11239
+ ["shadow.position", themeConfig.shadow?.position]
11240
+ ].flatMap(([path, value]) => value == null ? [path] : []);
11241
+ if (missingPaths.length > 0) throw new Error(`Cannot generate accordion defaults from incomplete themeConfig; missing ${missingPaths.join(", ")}`);
11242
+ }
11243
+ function renderBlock(manifest, content, options = {}) {
11244
+ const variantKey = resolveBlockVariantKey(manifest, content);
11245
+ if (!resolveBlockLayout(manifest, variantKey)) throw new Error(`Block manifest "${manifest.name}" requires a layout definition`);
11246
+ const Component = makeDefaultBlockComponent({ manifest });
11247
+ const resolvedRegistry = options.registry ?? getDefaultComponentRegistry();
11248
+ const resolvedTheme = options.theme ?? defaultThemeTokens;
11249
+ const cleanKind = manifest.name.replace(/^block\./, "");
11250
+ const componentElement = React.createElement(Component, {
11251
+ now: options.now,
11252
+ dateContext: options.dateContext,
11253
+ content,
11254
+ data: options.data,
11255
+ registry: resolvedRegistry,
11256
+ theme: resolvedTheme,
11257
+ themeConfig: options.themeConfig,
11258
+ transforms: options.transforms,
11259
+ viewModelOverrides: options.viewModelOverrides,
11260
+ pathBase: options.pathBase,
11261
+ blockId: null,
11262
+ blockKind: manifest.name
11263
+ });
11264
+ if (manifest.behaviours?.managesOwnWrapper) return componentElement;
11265
+ const styleGroup = typeof content.styleGroup === "string" ? content.styleGroup : void 0;
11266
+ const blockLook = typeof content.blockLook === "string" ? content.blockLook : void 0;
11267
+ const blockComposition = readBlockComposition(content.blockComposition);
11268
+ return React.createElement("div", {
11269
+ className: `block-${cleanKind}`,
11270
+ "data-block": cleanKind,
11271
+ "data-block-kind": manifest.name,
11272
+ ...variantKey ? {
11273
+ "data-block-variant": variantKey,
11274
+ "data-variant": variantKey
11275
+ } : {},
11276
+ ...blockLook ? { "data-block-look": blockLook } : {},
11277
+ ...arrangementHooksFromContent(content),
11278
+ ...blockComposition ? {
11279
+ "data-block-composition": blockComposition.treatment,
11280
+ "data-block-composition-kind": blockComposition.kind
11281
+ } : {},
11282
+ ...styleGroup ? { "data-style-group": styleGroup } : {}
11283
+ }, componentElement);
11284
+ }
11285
+ /** Standalone blocks are a wire boundary; page roots already hold admitted context. */
11286
+ function runtimeDateContext(viewModel) {
11287
+ const root = isObjectRecord(viewModel.$root) ? viewModel.$root : {};
11288
+ return resolveDateRuntimeContext(typeof root.bookingTimeZone === "string" ? root.bookingTimeZone : void 0);
11289
+ }
11290
+ //#endregion
11291
+ //#region ../blocks/src/pageRenderAudience.tsx
11292
+ /**
11293
+ * The single policy for what a non-renderable block looks like.
11294
+ *
11295
+ * Public visitors never see renderer diagnostics, so every reason omits.
11296
+ * Authoring surfaces keep the wording they have always had — the strings below
11297
+ * are moved verbatim from the five former `fallback()` call sites.
11298
+ */
11299
+ function presentNotRenderableBlock(reason, audience) {
11300
+ if (audience === "public") return null;
11301
+ if (reason.kind === "hidden-business-location" && reason.businessDetailsHref) return diagnostic(/* @__PURE__ */ jsxs(Fragment, { children: [
11302
+ authoringMessage(reason),
11303
+ " ",
11304
+ /* @__PURE__ */ jsx("a", {
11305
+ href: reason.businessDetailsHref,
11306
+ children: "Open Business details"
11307
+ })
11308
+ ] }));
11309
+ return diagnostic(authoringMessage(reason));
11310
+ }
11311
+ function authoringMessage(reason) {
11312
+ switch (reason.kind) {
11313
+ case "invalid-admission": return `Invalid content for block kind "${reason.blockKind}".`;
11314
+ case "missing-definition": return reason.isCustom ? `No renderer available for block kind "${reason.blockKind}". The custom block definition was not found (missing manifest).` : `No renderer available for block kind "${reason.blockKind}".`;
11315
+ case "missing-layout": return reason.isCustom ? `No renderer available for block kind "${reason.blockKind}". This custom block has no layout/variants, so it must be rendered via blockOverrides["${reason.blockKind}"].` : `No renderer available for block kind "${reason.blockKind}".`;
11316
+ case "hidden-business-location": return "This map is hidden because your business address is hidden.";
11317
+ case "unresolved-location":
11318
+ if (reason.source === "business_address") return "Business address details are not configured yet.";
11319
+ return reason.source === "venue" ? "This map is hidden on your site until the venue has a location." : "This map is hidden on your site until you choose a place.";
11320
+ case "editor-unpreviewable":
11321
+ case "render-threw": return `Unable to render block kind "${reason.blockKind}".`;
11322
+ }
11323
+ }
11324
+ /**
11325
+ * The empty-page notice. Authoring-only for the same reason as the block
11326
+ * diagnostics: "No blocks found." is a message for whoever is building the
11327
+ * page, not for whoever is reading it.
11328
+ */
11329
+ function presentEmptyPage(audience) {
11330
+ if (audience === "public") return null;
11331
+ return diagnostic("No blocks found.");
11332
+ }
11333
+ function diagnostic(message) {
11334
+ return /* @__PURE__ */ jsx("div", {
11335
+ className: "rb-p-6 rb-caption",
11336
+ style: textColorStyle("mutedText"),
11337
+ children: message
11338
+ });
11339
+ }
11340
+ //#endregion
11341
+ //#region ../blocks/src/pageRenderingMode.ts
11342
+ var MissingBlockOverrideError$1 = class extends Error {
11343
+ constructor(blockKind) {
11344
+ super(`Override-only rendering requires an override for block kind "${blockKind}".`);
11345
+ this.blockKind = blockKind;
11346
+ this.code = "missing_block_override";
11347
+ this.name = "MissingBlockOverrideError";
11348
+ }
11349
+ };
11350
+ function isOverrideOnlyResourceInput(props) {
11351
+ return props.rendering?.kind === "overrides-only";
11352
+ }
11353
+ function isTokensOnlyResourceInput(props) {
11354
+ return props.rendering?.kind === "tokens-only";
11355
+ }
11356
+ function resolvePageThemeResources(props) {
11357
+ if (isOverrideOnlyResourceInput(props)) return { kind: "unavailable" };
11358
+ if (isTokensOnlyResourceInput(props)) return {
11359
+ kind: "available",
11360
+ tokens: props.themeTokens
11361
+ };
11362
+ return {
11363
+ kind: "available",
11364
+ tokens: props.themeTokens ?? buildThemeRuntime$1(props.theme).tokens,
11365
+ config: props.theme
11366
+ };
11367
+ }
11368
+ function requireBlockOverride(resources, override, blockKind) {
11369
+ if (resources.kind === "unavailable" && !override) throw new MissingBlockOverrideError$1(blockKind);
11370
+ }
11371
+ function overrideThemeProps(resources) {
11372
+ return resources.kind === "available" ? {
11373
+ theme: resources.tokens,
11374
+ ...resources.config ? { themeConfig: resources.config } : {}
11375
+ } : {};
11376
+ }
11377
+ function requireThemeResources(resources, blockKind) {
11378
+ if (resources.kind === "unavailable") throw new MissingBlockOverrideError$1(blockKind);
11379
+ return resources;
11380
+ }
11381
+ //#endregion
11382
+ //#region ../blocks/src/pageRendererBoundaries.tsx
11383
+ function joinSlotsByPair(slots) {
11384
+ return new Map(slots.map((slot) => [joinSlotKey(slot.previousBlockId, slot.nextBlockId), slot]));
11385
+ }
11386
+ function joinSlotBetween(previousBlockId, nextBlockId, slots) {
11387
+ if (!previousBlockId || !nextBlockId) return null;
11388
+ return slots.get(joinSlotKey(previousBlockId, nextBlockId)) ?? null;
11389
+ }
11390
+ /**
11391
+ * The markup at one join: the painted boundary element when the join draws,
11392
+ * then whatever `renderJoin` adds. Null when there is nothing to render.
11393
+ */
11394
+ function renderJoinSlot(input) {
11395
+ const { slot } = input;
11396
+ if (!slot) return null;
11397
+ const layout = renderedJoinLayout(slot.join);
11398
+ const painted = slot.join && layout ? /* @__PURE__ */ jsx("div", {
11399
+ "aria-hidden": "true",
11400
+ "data-block-boundary": "",
11401
+ "data-boundary-id": slot.join.boundaryId,
11402
+ "data-boundary-previous-block-id": slot.previousBlockId,
11403
+ "data-boundary-next-block-id": slot.nextBlockId,
11404
+ "data-boundary-treatment": slot.join.treatment,
11405
+ "data-boundary-placement": layout.placement,
11406
+ style: boundaryPaintStyle(layout.paint)
11407
+ }, `${input.blockKey}:boundary`) : null;
11408
+ const extra = input.renderJoin?.({
11409
+ previousBlockId: slot.previousBlockId,
11410
+ nextBlockId: slot.nextBlockId,
11411
+ join: slot.join
11412
+ });
11413
+ if (!painted && (extra === null || extra === void 0)) return null;
11414
+ return /* @__PURE__ */ jsxs(React.Fragment, { children: [painted, extra] }, `${input.blockKey}:join`);
11415
+ }
11416
+ /**
11417
+ * The one render-edge place a theme token becomes CSS.
11418
+ */
11419
+ function themeTokenCss(token) {
11420
+ return `rgb(var(--tb-${token}))`;
11421
+ }
11422
+ function boundaryPaintStyle(paint) {
11423
+ return {
11424
+ "--boundary-shape-paint": themeTokenCss(paint.shape),
11425
+ ...paint.band ? { "--boundary-band-paint": themeTokenCss(paint.band) } : {}
11426
+ };
11427
+ }
11428
+ /**
11429
+ * Reserve attributes and variables for a block wrapper, from the joins on
11430
+ * either side. A join's `before` reserve sits inside its previous section, so
11431
+ * it pads the bottom of the block above the join; its `after` reserve pads the
11432
+ * top of the block below. Joins that do not draw reserve nothing.
11433
+ */
11434
+ function blockBoundaryReserves(input) {
11435
+ const top = reserveOnSide(input.before, "after");
11436
+ const bottom = reserveOnSide(input.after, "before");
11437
+ const style = {
11438
+ ...top ? { "--site-style-boundary-before-reserve": top.length } : {},
11439
+ ...bottom ? { "--site-style-boundary-after-reserve": bottom.length } : {}
11440
+ };
11441
+ return {
11442
+ topPlacement: top?.placement,
11443
+ bottomPlacement: bottom?.placement,
11444
+ style: top || bottom ? style : void 0
11445
+ };
11446
+ }
11447
+ /** The reserve one join needs on one side of itself, if it draws at all. */
11448
+ function reserveOnSide(slot, side) {
11449
+ const layout = renderedJoinLayout(slot?.join ?? null);
11450
+ const length = layout?.reserves[side] ?? null;
11451
+ return layout && length ? {
11452
+ length,
11453
+ placement: layout.placement
11454
+ } : null;
11455
+ }
11456
+ function pageBlockPosition(index, blockCount) {
11457
+ if (blockCount <= 1) return "only";
11458
+ if (index === 0) return "first";
11459
+ if (index === blockCount - 1) return "last";
11460
+ return "middle";
11461
+ }
11462
+ //#endregion
11463
+ //#region ../blocks/src/pageRendererContracts.ts
11464
+ function buildPageRendererRootRuntime(dataContext) {
11465
+ const { siteId = null, siteName, pageId = null, pathname = null, previewStage = "published", apiBaseUrl = null, portalToken = null, readAuthority, openingHours, siteTerms, mailingList = { tag: "not_configured" }, loaderFailures = {} } = dataContext ?? {};
11156
11466
  return {
11157
- mergedContent,
11158
- viewModel: buildBlockViewModel({
11159
- mergedContent,
11160
- data: input.data,
11161
- resolvedThemeConfig: resolveThemeConfigForBindings(input.themeConfig),
11162
- viewModelOverrides: input.viewModelOverrides
11163
- }),
11164
- themeForTransforms: withButtonSystem(input.theme, input.themeConfig),
11165
- proseHoverCandidate: parseThemeColorToken(input.themeConfig?.typography.proseLinkStyle?.hoverColorToken) ?? void 0
11467
+ siteId,
11468
+ demoEmailSuppressed: resolveDemoEmailSuppression(dataContext),
11469
+ siteName,
11470
+ site: publicLocationRuntime(dataContext),
11471
+ pageId,
11472
+ pathname,
11473
+ ...pageBookingRuntime(dataContext),
11474
+ ...pageRuntimeContext(dataContext),
11475
+ previewStage,
11476
+ apiBaseUrl,
11477
+ portalToken,
11478
+ readAuthority,
11479
+ openingHours,
11480
+ siteTerms,
11481
+ mailingList,
11482
+ loaderFailures
11166
11483
  };
11167
11484
  }
11168
- function buildBlockViewModel(input) {
11169
- const themeBinding = input.resolvedThemeConfig ? { theme: input.resolvedThemeConfig } : {};
11170
- const baseData = input.data ? { data: { ...input.data } } : {};
11171
- const overrides = input.viewModelOverrides ?? {};
11172
- const existingRoot = overrides.$root;
11485
+ function publicLocationRuntime(context) {
11173
11486
  return {
11174
- content: input.mergedContent,
11175
- ...themeBinding,
11176
- ...baseData,
11177
- ...overrides,
11178
- $root: {
11179
- ...existingRoot ?? {},
11180
- ...themeBinding
11181
- }
11487
+ businessAddress: context?.businessLocation ?? null,
11488
+ venuesById: context?.venuesById ?? {},
11489
+ siteCountry: context?.siteCountry ?? null
11182
11490
  };
11183
11491
  }
11184
- function withButtonSystem(theme, themeConfig) {
11185
- if (!themeConfig) return theme;
11186
- return {
11187
- ...theme,
11188
- buttons: themeConfig.buttons ?? generateDefaultButtonSystem(themeConfig)
11189
- };
11492
+ function resolveDemoEmailSuppression(dataContext) {
11493
+ return dataContext?.demoEmailSuppressed === true;
11190
11494
  }
11191
- function beginBlockRenderMeasurement() {
11192
- const perfEnv = globalThis.process?.env;
11193
- if (perfEnv?.DEBUG_PERF !== "1" || typeof window !== "undefined") return null;
11194
- const parsedThreshold = Number.parseInt(perfEnv.DEBUG_PERF_BLOCK_MS ?? "", 10);
11495
+ function pageRuntimeContext(dataContext) {
11195
11496
  return {
11196
- startedAt: Date.now(),
11197
- thresholdMs: Number.isFinite(parsedThreshold) && parsedThreshold > 0 ? parsedThreshold : 25
11497
+ dateContext: pageDateRuntimeContext(dataContext),
11498
+ now: dataContext?.now,
11499
+ template: dataContext?.template ?? { kind: "page" }
11198
11500
  };
11199
11501
  }
11200
- function reportSlowBlockRender(measurement, input) {
11201
- if (!measurement) return;
11202
- const durationMs = Date.now() - measurement.startedAt;
11203
- if (durationMs < measurement.thresholdMs) return;
11204
- const content = typeof input.content === "object" && input.content !== null ? input.content : null;
11205
- const variant = typeof content?.variant === "string" ? content.variant : typeof content?.layout === "string" ? content.layout : null;
11206
- console.log("perf.blocks.resolveTree", {
11207
- blockId: input.blockId ?? null,
11208
- blockKind: input.blockKind,
11209
- manifest: input.manifestName,
11210
- variant,
11211
- durationMs
11212
- });
11502
+ function pageDateRuntimeContext(dataContext) {
11503
+ return dataContext?.dateContext ?? resolveDateRuntimeContext(dataContext?.bookingTimeZone);
11213
11504
  }
11214
- function resolveThemeConfigForBindings(themeConfig) {
11215
- if (!themeConfig || themeConfig.accordions) return themeConfig;
11216
- assertThemeConfigCanGenerateAccordionSystem(themeConfig);
11505
+ /** Booking context keeps its defaults together across SSR and authoring. */
11506
+ function pageBookingRuntime(context) {
11507
+ const { bookingTimeZone, bookingOfferingPresets = [], appointmentServicePathPrefix = null } = context ?? {};
11217
11508
  return {
11218
- ...themeConfig,
11219
- accordions: generateDefaultAccordionSystem(themeConfig)
11509
+ bookingTimeZone,
11510
+ bookingOfferingPresets,
11511
+ appointmentServicePathPrefix
11220
11512
  };
11221
11513
  }
11222
- function assertThemeConfigCanGenerateAccordionSystem(themeConfig) {
11223
- const missingPaths = [
11224
- ["axes.tone", themeConfig.axes?.tone],
11225
- ["axes.density", themeConfig.axes?.density],
11226
- ["axes.conversionBias", themeConfig.axes?.conversionBias],
11227
- ["space", themeConfig.space],
11228
- ["border.width", themeConfig.border?.width],
11229
- ["shadow.elevation", themeConfig.shadow?.elevation],
11230
- ["shadow.position", themeConfig.shadow?.position]
11231
- ].flatMap(([path, value]) => value == null ? [path] : []);
11232
- if (missingPaths.length > 0) throw new Error(`Cannot generate accordion defaults from incomplete themeConfig; missing ${missingPaths.join(", ")}`);
11514
+ //#endregion
11515
+ //#region ../blocks/src/pageRenderDiagnostics.ts
11516
+ /**
11517
+ * Emits one structured record per omitted block, per server render pass.
11518
+ *
11519
+ * Server-only by decision D3: public pages are server-rendered, and this is the
11520
+ * runtime whose logger transport reaches centralised collection. A browser-side
11521
+ * record would not, and re-render/hydration would multiply it. The cost is that
11522
+ * an omission only a client navigation can see goes unlogged.
11523
+ *
11524
+ * Deliberately *not* inside the plan's `useMemo` — React makes no promises about
11525
+ * when a memo recomputes, so a log placed there is neither reliable nor bounded.
11526
+ */
11527
+ function logOmittedBlocks(plan, dataContext) {
11528
+ if (typeof window !== "undefined") return;
11529
+ if (plan.omitted.length === 0) return;
11530
+ const page = {
11531
+ siteId: dataContext?.siteId ?? null,
11532
+ pageId: dataContext?.pageId ?? null
11533
+ };
11534
+ if (plan.entries.length === 0) {
11535
+ logger.error("blocks.pageRenderer.pageFullyOmitted", {
11536
+ ...page,
11537
+ omittedCount: plan.omitted.length,
11538
+ blocks: plan.omitted.map((omission) => ({
11539
+ blockId: omission.blockId,
11540
+ blockKind: omission.blockKind,
11541
+ reason: omission.reason.kind
11542
+ }))
11543
+ });
11544
+ debugOmittedCustomBlocks(plan);
11545
+ return;
11546
+ }
11547
+ for (const omission of plan.omitted) logger.warn("blocks.pageRenderer.blockOmitted", {
11548
+ ...page,
11549
+ blockId: omission.blockId,
11550
+ blockKind: omission.blockKind,
11551
+ reason: omission.reason.kind,
11552
+ admissionError: omission.reason.kind === "invalid-admission" ? omission.reason.error.kind : null
11553
+ });
11554
+ debugOmittedCustomBlocks(plan);
11233
11555
  }
11234
- function renderBlock(manifest, content, options = {}) {
11235
- const variantKey = resolveBlockVariantKey(manifest, content);
11236
- if (!resolveBlockLayout(manifest, variantKey)) throw new Error(`Block manifest "${manifest.name}" requires a layout definition`);
11237
- const Component = makeDefaultBlockComponent({ manifest });
11238
- const resolvedRegistry = options.registry ?? getDefaultComponentRegistry();
11239
- const resolvedTheme = options.theme ?? defaultThemeTokens;
11240
- const cleanKind = manifest.name.replace(/^block\./, "");
11241
- const componentElement = React.createElement(Component, {
11242
- now: options.now,
11243
- dateContext: options.dateContext,
11244
- content,
11245
- data: options.data,
11246
- registry: resolvedRegistry,
11247
- theme: resolvedTheme,
11248
- themeConfig: options.themeConfig,
11249
- transforms: options.transforms,
11250
- viewModelOverrides: options.viewModelOverrides,
11251
- pathBase: options.pathBase,
11252
- blockId: null,
11253
- blockKind: manifest.name
11556
+ /**
11557
+ * Unlike the plan-time omissions this one genuinely can fire per re-render —
11558
+ * it is raised where the failure happens, and no once-ness is claimed for it.
11559
+ */
11560
+ function logRenderThrew(block, dataContext) {
11561
+ if (typeof window !== "undefined") return;
11562
+ logger.warn("blocks.pageRenderer.blockRenderThrew", {
11563
+ siteId: dataContext?.siteId ?? null,
11564
+ pageId: dataContext?.pageId ?? null,
11565
+ blockId: block.id ?? null,
11566
+ blockKind: block.kind
11254
11567
  });
11255
- if (manifest.behaviours?.managesOwnWrapper) return componentElement;
11256
- const styleGroup = typeof content.styleGroup === "string" ? content.styleGroup : void 0;
11257
- const blockLook = typeof content.blockLook === "string" ? content.blockLook : void 0;
11258
- const blockComposition = readBlockComposition(content.blockComposition);
11259
- return React.createElement("div", {
11260
- className: `block-${cleanKind}`,
11261
- "data-block": cleanKind,
11262
- "data-block-kind": manifest.name,
11263
- ...variantKey ? {
11264
- "data-block-variant": variantKey,
11265
- "data-variant": variantKey
11266
- } : {},
11267
- ...blockLook ? { "data-block-look": blockLook } : {},
11268
- ...arrangementHooksFromContent(content),
11269
- ...blockComposition ? {
11270
- "data-block-composition": blockComposition.treatment,
11271
- "data-block-composition-kind": blockComposition.kind
11272
- } : {},
11273
- ...styleGroup ? { "data-style-group": styleGroup } : {}
11274
- }, componentElement);
11275
11568
  }
11276
- /** Standalone blocks are a wire boundary; page roots already hold admitted context. */
11277
- function runtimeDateContext(viewModel) {
11278
- const root = isObjectRecord(viewModel.$root) ? viewModel.$root : {};
11279
- return resolveDateRuntimeContext(typeof root.bookingTimeZone === "string" ? root.bookingTimeZone : void 0);
11569
+ /**
11570
+ * Opt-in developer affordance for tracking down custom-block resolution.
11571
+ *
11572
+ * Driven off the plan's omissions so it stays reachable on **public** renders —
11573
+ * "my custom block doesn't show up on the live site" is the exact situation it
11574
+ * exists for, and that is the render where the block is now silently absent.
11575
+ */
11576
+ function debugOmittedCustomBlocks(plan) {
11577
+ if (!shouldDebugCustomBlocks()) return;
11578
+ for (const omission of plan.omitted) {
11579
+ if (!omission.blockKind.startsWith("custom.")) continue;
11580
+ debugCustomBlockResolution(omission.reason.kind, omission.blockId, omission.blockKind, omission.debug);
11581
+ }
11582
+ }
11583
+ /** The authoring-side equivalent, where the block stays in the entry list. */
11584
+ function debugCustomBlockDiagnostic(reason, block, debug) {
11585
+ if (!block.kind.startsWith("custom.") || !shouldDebugCustomBlocks()) return;
11586
+ debugCustomBlockResolution(reason.kind, block.id ?? null, block.kind, debug);
11587
+ }
11588
+ function debugCustomBlockResolution(reasonKind, blockId, blockKind, debug) {
11589
+ try {
11590
+ console.warn(reasonKind === "missing-definition" ? "[blocks:PageRenderer] custom block definition missing" : "[blocks:PageRenderer] custom block has no layout/variants and no override", {
11591
+ blockId,
11592
+ blockKind,
11593
+ hasOverride: debug.hasOverride,
11594
+ sdkCustomBlocksCount: debug.sdkCustomBlocksCount,
11595
+ dbCustomBlocksCount: debug.dbCustomBlocksCount,
11596
+ manifestKeys: debug.manifestKeys
11597
+ });
11598
+ } catch {}
11599
+ }
11600
+ function shouldDebugCustomBlocks() {
11601
+ try {
11602
+ return globalThis.process?.env?.DEBUG_CUSTOM_BLOCKS === "1";
11603
+ } catch {
11604
+ return false;
11605
+ }
11280
11606
  }
11281
11607
  //#endregion
11282
11608
  //#region ../blocks/src/system/blocks/offerings-preview/photoCount.ts
@@ -11485,26 +11811,59 @@ function planNewsletterPreviewSubmission(placement) {
11485
11811
  * stays at the edge (decision D3), matching `buildPageRenderPlan`.
11486
11812
  */
11487
11813
  function preparePageRender(input) {
11488
- const entries = [];
11489
- const constructionFailures = [];
11490
- for (const entry of input.plan.entries) {
11491
- const prepared = prepareEntry(entry, input);
11492
- if (prepared.kind === "render-threw") constructionFailures.push(entry);
11493
- entries.push(preparedPlanEntry(entry, prepared));
11494
- }
11495
- const survivors = input.audience === "authoring" ? entries : entries.filter((candidate) => candidate.prepared.kind !== "render-threw");
11814
+ const facts = readinessFactsFromLoaders("published", {
11815
+ prefetched: input.dataContext?.prefetchedBlockData,
11816
+ previewStage: input.dataContext?.previewStage,
11817
+ mailingList: input.dataContext?.mailingList,
11818
+ template: input.dataContext?.template ?? pageTemplateFromEntry(input.dataContext?.contentEntry)
11819
+ });
11820
+ const permission = input.dataContext?.businessLocationPermission ?? decideLocationSourcePermission("business_address", input.dataContext?.businessAddressVisibility);
11821
+ const entries = input.plan.entries.filter((entry) => input.audience === "authoring" || !entryNeedsSetup(entry, facts)).filter((entry) => isPublicSourcePermitted(entry, permission) || input.audience === "authoring" && permission.kind === "hidden").map((entry) => preparedPlanEntry(entry, prepareSourceEntry(entry, input, permission)));
11822
+ const constructionFailures = entries.filter((candidate) => candidate.prepared.kind === "render-threw").map((candidate) => candidate.entry);
11823
+ const survivors = input.audience === "authoring" ? entries : entries.filter((candidate) => candidate.prepared.kind !== "render-threw" && candidate.prepared.kind !== "unresolved-location");
11496
11824
  return {
11497
11825
  entries: survivors,
11498
11826
  constructionFailures,
11499
11827
  joins: composeSurvivorJoins(input.plan, survivors, input.themeResources)
11500
11828
  };
11501
11829
  }
11830
+ /** Source availability is decided before constructing the block or its hydration props. */
11831
+ function prepareSourceEntry(entry, input, permission) {
11832
+ if (!isPublicSourcePermitted(entry, permission)) return {
11833
+ kind: "hidden-business-location",
11834
+ businessDetailsHref: input.dataContext?.authoringBusinessDetailsHref ?? null
11835
+ };
11836
+ if (entry.block.kind === "block.location-map") {
11837
+ const content = entry.renderableContent;
11838
+ const resolved = resolveLocationMapLocation({
11839
+ location: content.location,
11840
+ locationSource: typeof content.locationSource === "string" ? content.locationSource : null,
11841
+ venueId: typeof content.venueId === "string" ? content.venueId : null,
11842
+ businessAddress: input.dataContext?.businessLocation,
11843
+ venuesById: input.dataContext?.venuesById
11844
+ });
11845
+ if (resolved.kind === "unresolved") return {
11846
+ kind: "unresolved-location",
11847
+ source: resolved.source
11848
+ };
11849
+ }
11850
+ return prepareEntry(entry, input);
11851
+ }
11852
+ /** No source data, override component or wrapper is touched for a hidden map. */
11853
+ function isPublicSourcePermitted(entry, permission) {
11854
+ if (entry.block.kind !== "block.location-map") return true;
11855
+ const rawSource = entry.renderableContent.locationSource;
11856
+ return normalizeLocationMapSource(typeof rawSource === "string" ? rawSource : null) !== "business_address" || permission.kind === "permitted";
11857
+ }
11502
11858
  /**
11503
11859
  * The only place joins are composed. Plan-time omissions were already
11504
11860
  * re-pointed by the plan; construction failures are re-pointed here by the
11505
11861
  * same primitive, so `[A, B, C]` losing B still gets an A→C join. Each
11506
11862
  * survivor is then classified from its final content.
11507
11863
  */
11864
+ function entryNeedsSetup(entry, facts) {
11865
+ return entry.kind === "renderable" && entry.definition.readiness?.assess(entry.renderableContent, facts).kind === "NeedsSetup";
11866
+ }
11508
11867
  function composeSurvivorJoins(plan, survivors, themeResources) {
11509
11868
  return composePageJoins({
11510
11869
  joins: retargetJoinsAcrossOmissions({
@@ -12084,6 +12443,64 @@ function renderSystemBlockElement(input) {
12084
12443
  previewAuthoring: input.previewAuthoring
12085
12444
  });
12086
12445
  }
12446
+ /** Pure diagnostic choice; the audience owner controls its presentation. */
12447
+ function preparationDiagnostic(prepared, blockKind) {
12448
+ switch (prepared.kind) {
12449
+ case "hidden-business-location": return {
12450
+ reason: {
12451
+ kind: prepared.kind,
12452
+ blockKind,
12453
+ businessDetailsHref: prepared.businessDetailsHref
12454
+ },
12455
+ outcome: "invalidPlaceholder"
12456
+ };
12457
+ case "unresolved-location": return {
12458
+ reason: {
12459
+ kind: prepared.kind,
12460
+ blockKind,
12461
+ source: prepared.source
12462
+ },
12463
+ outcome: "invalidPlaceholder"
12464
+ };
12465
+ case "editor-unpreviewable": return {
12466
+ reason: {
12467
+ kind: prepared.kind,
12468
+ blockKind
12469
+ },
12470
+ outcome: "invalidPlaceholder"
12471
+ };
12472
+ case "render-threw": return {
12473
+ reason: {
12474
+ kind: prepared.kind,
12475
+ blockKind
12476
+ },
12477
+ outcome: "exception"
12478
+ };
12479
+ case "content":
12480
+ case "plan-decided": return null;
12481
+ }
12482
+ }
12483
+ function blockRenderPerformanceMeta(meta) {
12484
+ return {
12485
+ outcome: meta?.outcome ?? "ok",
12486
+ override: meta?.override ?? false,
12487
+ hasResolvedData: meta?.hasResolvedData ?? false
12488
+ };
12489
+ }
12490
+ function finishBlockRender(node, block, perfStart, meta) {
12491
+ if (!perfStart) return node;
12492
+ const durationMs = Date.now() - perfStart;
12493
+ if (durationMs < getPerfSlowBlockRenderThresholdMs()) return node;
12494
+ try {
12495
+ console.debug("perf.blocks.blockRender", {
12496
+ blockId: block.id ?? null,
12497
+ blockKind: block.kind,
12498
+ durationMs,
12499
+ ...blockRenderPerformanceMeta(meta)
12500
+ });
12501
+ } catch {}
12502
+ return node;
12503
+ }
12087
12504
  /**
12088
12505
  * Memoized block section component.
12089
12506
  *
@@ -12096,22 +12513,7 @@ const MemoBlockSection = React$1.memo(function MemoBlockSection({ themeResources
12096
12513
  const block = entry.block;
12097
12514
  const perfStart = globalThis.process?.env?.DEBUG_PERF === "1" && typeof window === "undefined" ? Date.now() : 0;
12098
12515
  const resolvedImageResolveContext = imageResolveContext ?? getCurrentResolveImageUrlContext();
12099
- function finish(node, meta) {
12100
- if (!perfStart) return node;
12101
- const durationMs = Date.now() - perfStart;
12102
- if (durationMs < getPerfSlowBlockRenderThresholdMs()) return node;
12103
- try {
12104
- console.debug("perf.blocks.blockRender", {
12105
- blockId: block.id ?? null,
12106
- blockKind: block.kind,
12107
- durationMs,
12108
- outcome: meta?.outcome ?? "ok",
12109
- override: meta?.override ?? false,
12110
- hasResolvedData: meta?.hasResolvedData ?? false
12111
- });
12112
- } catch {}
12113
- return node;
12114
- }
12516
+ const finish = (node, meta) => finishBlockRender(node, block, perfStart, meta);
12115
12517
  function wrapped(node) {
12116
12518
  return wrapBlock && block.id ? /* @__PURE__ */ jsx(Fragment, { children: wrapBlock(block.id, node) }) : /* @__PURE__ */ jsx(Fragment, { children: node });
12117
12519
  }
@@ -12127,6 +12529,11 @@ const MemoBlockSection = React$1.memo(function MemoBlockSection({ themeResources
12127
12529
  override: false
12128
12530
  });
12129
12531
  }
12532
+ const diagnostic = preparationDiagnostic(prepared, block.kind);
12533
+ if (diagnostic) return finish(wrapped(presentNotRenderableBlock(diagnostic.reason, audience)), {
12534
+ outcome: diagnostic.outcome,
12535
+ override: false
12536
+ });
12130
12537
  if (entry.kind === "override-only") {
12131
12538
  const OverrideOnlyComponent = entry.override;
12132
12539
  return finish(wrapped(/* @__PURE__ */ jsx(OverrideOnlyComponent, { ...buildBlockOverrideProps({
@@ -12143,20 +12550,7 @@ const MemoBlockSection = React$1.memo(function MemoBlockSection({ themeResources
12143
12550
  hasResolvedData: false
12144
12551
  });
12145
12552
  }
12146
- if (prepared.kind === "editor-unpreviewable") return finish(wrapped(presentNotRenderableBlock({
12147
- kind: "editor-unpreviewable",
12148
- blockKind: block.kind
12149
- }, audience)), {
12150
- outcome: "invalidPlaceholder",
12151
- override: false
12152
- });
12153
- if (prepared.kind !== "content") return finish(wrapped(presentNotRenderableBlock({
12154
- kind: "render-threw",
12155
- blockKind: block.kind
12156
- }, audience)), {
12157
- outcome: "exception",
12158
- override: false
12159
- });
12553
+ if (prepared.kind !== "content") return null;
12160
12554
  let rendered;
12161
12555
  if (OverrideComponent) rendered = /* @__PURE__ */ jsx(OverrideComponent, { ...prepared.baseProps });
12162
12556
  else {
@@ -12213,7 +12607,8 @@ function usePageDateRuntime(props) {
12213
12607
  const dateContext = React$1.useMemo(() => supplied ?? resolveDateRuntimeContext(zone), [supplied, zone]);
12214
12608
  const dataContext = React$1.useMemo(() => props.dataContext ? {
12215
12609
  ...props.dataContext,
12216
- dateContext
12610
+ dateContext,
12611
+ template: props.dataContext.template ?? pageTemplateFromEntry(props.dataContext.contentEntry)
12217
12612
  } : void 0, [props.dataContext, dateContext]);
12218
12613
  return {
12219
12614
  ...props,
@@ -12417,7 +12812,11 @@ function buildPageRouteRenderContext(dataContext) {
12417
12812
  pageSurface: dataContext.pageSurface ?? null,
12418
12813
  subject: dataContext.subject ?? null,
12419
12814
  editableRouteMetadataFieldIds: dataContext.editableRouteMetadataFieldIds ?? null,
12420
- previewStage: dataContext.previewStage
12815
+ previewStage: dataContext.previewStage,
12816
+ prefetchedBlockData: dataContext.prefetchedBlockData,
12817
+ loaderSnapshot: dataContext.loaderSnapshot,
12818
+ loaderFailures: dataContext.loaderFailures,
12819
+ template: pageTemplateFromEntry(dataContext.contentEntry)
12421
12820
  };
12422
12821
  }
12423
12822
  function buildPageIdentityRenderContext(dataContext) {
@@ -12425,6 +12824,11 @@ function buildPageIdentityRenderContext(dataContext) {
12425
12824
  demoEmailSuppressed: dataContext.demoEmailSuppressed,
12426
12825
  now: dataContext.now,
12427
12826
  siteName: dataContext.siteName,
12827
+ businessLocationPermission: dataContext.businessLocationPermission,
12828
+ businessAddressVisibility: dataContext.businessAddressVisibility,
12829
+ businessLocation: dataContext.businessLocation,
12830
+ venuesById: dataContext.venuesById,
12831
+ siteCountry: dataContext.siteCountry,
12428
12832
  pathname: dataContext.pathname
12429
12833
  };
12430
12834
  }