@riverbankcms/sdk 0.180.0 → 0.182.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (232) hide show
  1. package/dist/_dts/{BlocksIslandsHydrator-DC_AvZwy.d.ts → BlocksIslandsHydrator-Bvw2bUif.d.ts} +1 -1
  2. package/dist/_dts/{Page-DQOxVtp3.d.ts → Page-B2EAT-bE.d.ts} +7 -7
  3. package/dist/_dts/{SdkPreviewMode-DrLgY9_f.d.ts → SdkPreviewMode-D0vww6rh.d.ts} +2 -2
  4. package/dist/_dts/{client-BP7VBRvs.d.ts → client-D6T430bk.d.ts} +56 -70
  5. package/dist/_dts/{content-types-1-K2qi__.d.ts → content-types-wZVWccC6.d.ts} +2 -2
  6. package/dist/_dts/{contracts-Dfqz0Tcu.d.ts → contracts-B-vtOcr8.d.ts} +3 -3
  7. package/dist/_dts/{generatePageMetadata-CSfAqmry.d.ts → generatePageMetadata-CxfwHE6z.d.ts} +2 -2
  8. package/dist/_dts/{index-BeM5Ylwf.d.ts → index-CEyYMhLJ.d.ts} +1 -2
  9. package/dist/_dts/{index-DQr358-m.d.ts → index-CQrb3Ccc.d.ts} +8 -8
  10. package/dist/_dts/{index-DCcxLa8p.d.ts → index-CciRW_w1.d.ts} +2 -2
  11. package/dist/_dts/{index-Blrw2oVk.d.ts → index-Cqxis-nv.d.ts} +1 -1
  12. package/dist/_dts/{index-CB5Csefo.d.ts → index-DIU-wL1M.d.ts} +2 -2
  13. package/dist/_dts/{index-DQBGwBPx.d.ts → index-DqPKdeTk.d.ts} +1 -1
  14. package/dist/_dts/{loadContent-BG2tLGXj.d.ts → loadContent-D0wrxiSp.d.ts} +7 -7
  15. package/dist/_dts/{request-P08l6mkr.d.ts → request-DEwxUSw8.d.ts} +2375 -883
  16. package/dist/_dts/{resolveBlockData-BDHc8lFs.d.ts → resolveBlockData-VaG_MYbN.d.ts} +5 -5
  17. package/dist/_dts/{resolvePageContent-Y3IZBbtL.d.ts → resolvePageContent-DTwklC_v.d.ts} +1 -1
  18. package/dist/_dts/sdk/src/bookings/index.d.ts +2 -2
  19. package/dist/_dts/sdk/src/client/types.d.ts +2 -2
  20. package/dist/_dts/sdk/src/client.d.ts +7 -7
  21. package/dist/_dts/sdk/src/config/index.d.ts +6 -6
  22. package/dist/_dts/sdk/src/config/template-validation.d.ts +1 -1
  23. package/dist/_dts/sdk/src/config/validation.d.ts +1 -1
  24. package/dist/_dts/sdk/src/data/dataLoaderContext.d.ts +2 -2
  25. package/dist/_dts/sdk/src/data/resolveBlockData.d.ts +1 -1
  26. package/dist/_dts/sdk/src/data/types.d.ts +2 -2
  27. package/dist/_dts/sdk/src/gifting/client.d.ts +1 -2
  28. package/dist/_dts/sdk/src/index.d.ts +104 -8
  29. package/dist/_dts/sdk/src/manifest/index.d.ts +3 -3
  30. package/dist/_dts/sdk/src/metadata/index.d.ts +1 -1
  31. package/dist/_dts/sdk/src/navigation/index.d.ts +3 -3
  32. package/dist/_dts/sdk/src/next/index.d.ts +83 -52
  33. package/dist/_dts/sdk/src/next/middleware.d.ts +2 -2
  34. package/dist/_dts/sdk/src/page-converter/index.d.ts +3 -3
  35. package/dist/_dts/sdk/src/portal/client.d.ts +43 -56
  36. package/dist/_dts/sdk/src/portal/index.d.ts +3 -18
  37. package/dist/_dts/sdk/src/prebuild/index.d.ts +1 -1
  38. package/dist/_dts/sdk/src/preview-next/before-render.d.ts +2 -2
  39. package/dist/_dts/sdk/src/preview-next/client/index.d.ts +2 -2
  40. package/dist/_dts/sdk/src/preview-next/client/runtime.d.ts +1 -1
  41. package/dist/_dts/sdk/src/rendering/client.d.ts +2 -2
  42. package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +1 -1
  43. package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +1 -1
  44. package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +4 -4
  45. package/dist/_dts/sdk/src/rendering/index.d.ts +6 -6
  46. package/dist/_dts/sdk/src/rendering/islands/client.d.ts +1 -1
  47. package/dist/_dts/sdk/src/rendering/server.d.ts +2 -2
  48. package/dist/_dts/sdk/src/rendering/themeAdmission.d.ts +1 -1
  49. package/dist/_dts/sdk/src/routing/index.d.ts +6 -6
  50. package/dist/_dts/sdk/src/server.d.ts +5 -5
  51. package/dist/_dts/sdk/src/spam-protection/index.d.ts +2 -2
  52. package/dist/_dts/sdk/src/theme/index.d.ts +1 -1
  53. package/dist/_dts/{serviceBookingOutline-BvtNagjw.d.ts → serviceBookingOutline-DtQuFlID.d.ts} +6 -6
  54. package/dist/_dts/{types-DpEAnP4F.d.ts → types-B3RjeBLV.d.ts} +2 -2
  55. package/dist/_dts/{types-HAy1-Jjo.d.ts → types-BvUSGQrw.d.ts} +3 -3
  56. package/dist/_dts/{types-BrK6SS5c.d.ts → types-CkRFtBqd.d.ts} +7 -7
  57. package/dist/_dts/{validation-D6q3tOBA.d.ts → validation-BZA3DhcV.d.ts} +4 -4
  58. package/dist/client/{BlocksIslandsHydrator-DJSmdNUJ.mjs → BlocksIslandsHydrator-CQMf0HdN.mjs} +19 -19
  59. package/dist/client/{BookingMailingListNote-CGxg37zx.mjs → BookingMailingListNote-7kdvuPow.mjs} +93 -18
  60. package/dist/client/{BookingQuestionFields-DXegGSnS.mjs → BookingQuestionFields-BJI7mZuV.mjs} +7 -87
  61. package/dist/client/CalendarAction-D_Glwvz2.mjs +105 -0
  62. package/dist/client/{CalendarNavigationChevron-VfP50sYm.mjs → CalendarNavigationChevron-DPUD6wjy.mjs} +8 -8
  63. package/dist/client/{CheckboxChoice-BZPLCgTU.mjs → CheckboxChoice-C8i4NraK.mjs} +1 -1
  64. package/dist/client/{DemoBookingPortalAccess-0Ua44F1j.mjs → DemoBookingPortalAccess-8kwNF9HN.mjs} +9 -6
  65. package/dist/client/{EventCalendar.client-CrpiyDSP.mjs → EventCalendar.client-Dhb14bcC.mjs} +10 -10
  66. package/dist/client/{EventCombined.client-D0me9wnz.mjs → EventCombined.client-C1jEZBN9.mjs} +60 -10
  67. package/dist/client/{EventEmbeddedCheckoutStep-BDnicDM6.mjs → EventEmbeddedCheckoutStep-BGkbUhuw.mjs} +1 -1
  68. package/dist/client/{EventItem-CJITrGkF.mjs → EventItem-Bb0ppG2N.mjs} +9 -177
  69. package/dist/client/{EventListWeekNavigation-BlEm_xjq.mjs → EventListWeekNavigation-DMryCaNV.mjs} +1 -1
  70. package/dist/client/{EventListing.client-BNM_HuS0.mjs → EventListing.client-BuH5kKA3.mjs} +3 -3
  71. package/dist/client/{EventListing.view-CXfb7RRy.mjs → EventListing.view-DsqvuulZ.mjs} +8 -8
  72. package/dist/client/{EventRegistrationPayment-DiD9uYs6.mjs → EventRegistrationPayment-D4FvQSFF.mjs} +555 -502
  73. package/dist/client/{Page-bX7iy_MK.mjs → Page-sV6BJkXX.mjs} +550 -339
  74. package/dist/client/{ProtectedSubmitButton-De6AzhE6.mjs → ProtectedSubmitButton-BNnKuir8.mjs} +1 -1
  75. package/dist/client/{SiteTermsAgreementField-BAdW5DvE.mjs → SiteTermsAgreementField-VfSd6JU-.mjs} +7 -11
  76. package/dist/client/{StepIndicator-DCfdcb7s.mjs → StepIndicator-B6o5B7g3.mjs} +1 -1
  77. package/dist/client/{StepIndicator-DCqorVne.mjs → StepIndicator-BTqO7cJl.mjs} +235 -26
  78. package/dist/client/{ThemedButton-CnSa7o-I.mjs → ThemedButton-PFOhXktM.mjs} +1 -33
  79. package/dist/client/{accessibleSurfaces-Wl8-_OVJ.mjs → accessibleSurfaces-BogaGutk.mjs} +983 -634
  80. package/dist/client/{accordion-wofJY8xY.mjs → accordion-6cuswD_s.mjs} +1 -1
  81. package/dist/client/{booking-form.client-CYl9NrqS.mjs → booking-form.client-BOMe_SKi.mjs} +52 -29
  82. package/dist/client/bookingCalendar--aWnqFDn.mjs +180 -0
  83. package/dist/client/{bookingForm-kgVWtuMe.mjs → bookingForm-DSCH-VHo.mjs} +4 -4
  84. package/dist/client/bookings.mjs +17 -11
  85. package/dist/client/{boxStyleClassNames-CQHWz5gJ.mjs → boxStyleClassNames-BFuqZCfz.mjs} +2 -2
  86. package/dist/client/{carousel-BE1dEFsD.mjs → carousel-CGyQVV1M.mjs} +2 -2
  87. package/dist/client/{carousel.client-DMtGYTTM.mjs → carousel.client-BtLwHefX.mjs} +1 -1
  88. package/dist/client/{cart-BsjsdGZE.mjs → cart-BYOe7MCh.mjs} +3 -3
  89. package/dist/client/{cart.client-DylGUWXY.mjs → cart.client-BKFkaXdV.mjs} +1 -1
  90. package/dist/client/{checkout-B5KxEUDr.mjs → checkout-Dwd7Di77.mjs} +3 -3
  91. package/dist/client/{checkout.client-C98fhch3.mjs → checkout.client-C25hpi-z.mjs} +1 -1
  92. package/dist/client/{checkoutUrls-BMLYTf38.mjs → checkoutUrls-tG788sw0.mjs} +1 -1
  93. package/dist/client/client.mjs +106 -43
  94. package/dist/client/{constants-PfYJsEZF.mjs → constants-DdxFG3Ic.mjs} +1 -2
  95. package/dist/client/{context-DtKdUdkO.mjs → context-Hi1RuYEM.mjs} +753 -373
  96. package/dist/client/{dateFormatting-BaGPvQS3.mjs → dateFormatting-C8vBCHuo.mjs} +15 -25
  97. package/dist/client/{demoPortalMagicLink-B8eDjhuG.mjs → demoPortalMagicLink-BAL5UIDG.mjs} +2 -3
  98. package/dist/client/{enhanceHeaderSection-DvhD-8eE.mjs → enhanceHeaderSection-Dv1Lr9kJ.mjs} +4 -5
  99. package/dist/client/{event-registration.client-Du9a_xAN.mjs → event-registration.client-dB_Z7bb-.mjs} +191 -210
  100. package/dist/client/{eventCalendar-Di9wDfzl.mjs → eventCalendar-CQnRA4Ww.mjs} +4 -4
  101. package/dist/client/{eventCombined-CNW6nBsB.mjs → eventCombined-BDOG1hVp.mjs} +4 -4
  102. package/dist/client/{eventListing-CQMxQ8By.mjs → eventListing-DSVmhy9n.mjs} +4 -4
  103. package/dist/client/{eventRegistration-CprS9k1D.mjs → eventRegistration-CD5mRtEH.mjs} +4 -4
  104. package/dist/client/{form-Zl1_8RJ6.mjs → form-DWnlEVSK.mjs} +3 -3
  105. package/dist/client/{form.client-TaMUys6I.mjs → form.client-D7zmeqNI.mjs} +5 -5
  106. package/dist/client/{form.parts-CpNPbPPM.mjs → form.parts-C-G6N_MK.mjs} +3 -3
  107. package/dist/client/gifting/client.mjs +32 -29
  108. package/dist/client/{gifting-DNVa7-Wj.mjs → gifting-Cn0jidP5.mjs} +4 -4
  109. package/dist/client/{gifting.client-CFUq3GVx.mjs → gifting.client-DVo1YFLs.mjs} +5 -5
  110. package/dist/client/{gifting.parts-CDQvxA4A.mjs → gifting.parts-Bak93gD2.mjs} +2 -2
  111. package/dist/client/{headerSection-Cg6083rn.mjs → headerSection-DjQuj_6v.mjs} +2 -2
  112. package/dist/client/{mediaAssets-B99AP7ai.mjs → mediaAssets-COfQolI3.mjs} +1 -1
  113. package/dist/client/{mediaContext-Fusweriw.mjs → mediaContext-DzvnjYXm.mjs} +1 -1
  114. package/dist/client/{newsletter-form.client-VuL9I96G.mjs → newsletter-form.client-rIYPziZC.mjs} +7 -7
  115. package/dist/client/{newsletter-form.interactive-7Of3eYn0.mjs → newsletter-form.interactive-DVt3enLr.mjs} +181 -155
  116. package/dist/client/{newsletter-form.parts-OBqsfT24.mjs → newsletter-form.parts-CH6dGfdn.mjs} +2 -2
  117. package/dist/client/{newsletterForm-BkJe_RTv.mjs → newsletterForm-Cg8cBDHd.mjs} +3 -3
  118. package/dist/client/{lookSurfaces-gJ3OqPf9.mjs → noop-jesvJXEE.mjs} +403 -275
  119. package/dist/client/portal/client.mjs +12202 -7166
  120. package/dist/client/portalOrders-oEoTvzkW.mjs +596 -0
  121. package/dist/client/portalRoutes-ByyVZfVq.mjs +873 -0
  122. package/dist/client/{product-detail.client-B2hdxqJN.mjs → product-detail.client-5aHq-vuu.mjs} +1 -1
  123. package/dist/client/{product-list.client-CCEgu9rx.mjs → product-list.client-CyAk5rnC.mjs} +1 -1
  124. package/dist/client/{productDetail-CRX_ZRfS.mjs → productDetail-B8aZ2mqY.mjs} +3 -3
  125. package/dist/client/{productList-BAdJ6z5S.mjs → productList-BuLemmod.mjs} +3 -3
  126. package/dist/client/{propsDecoder-BLKAmX0S.mjs → propsDecoder-0Unsqn3R.mjs} +2 -2
  127. package/dist/client/{registry.server-Bj9cmHHF.mjs → registry.server-DzvtVVD0.mjs} +664 -434
  128. package/dist/client/{renderableMediaAssetAdmission-BlfqYLJW.mjs → renderableMediaAssetAdmission-BsOWd9lf.mjs} +1 -1
  129. package/dist/client/rendering/client.mjs +26 -26
  130. package/dist/client/rendering/islands.mjs +1 -1
  131. package/dist/client/rendering.mjs +16 -8
  132. package/dist/client/{richText-coerce-Z45OLLEX.mjs → richText-coerce-Bnng7JFA.mjs} +2 -1
  133. package/dist/client/{routeIslandApiConfig-DHpTTK77.mjs → routeIslandApiConfig-BGfcc9sk.mjs} +1 -1
  134. package/dist/client/{runtimeResponse-DtWSfWSZ.mjs → runtimeResponse-DAPVRToN.mjs} +1 -1
  135. package/dist/client/{runtimeResponse-D2j2-mOk.mjs → runtimeResponse-nXT8VAMl.mjs} +1 -1
  136. package/dist/client/{shop-BKsgxm_-.mjs → shop-GuMqnDL-.mjs} +3 -3
  137. package/dist/client/{shop-commerce-Cbtk_kUW.mjs → shop-commerce-D5bDY1o1.mjs} +53 -16
  138. package/dist/client/{shop-commerce-store-B-rv2p5h.mjs → shop-commerce-store-B7sHnLwI.mjs} +22 -5
  139. package/dist/client/{shop-discount-apply.state-CiCDLNh7.mjs → shop-discount-apply.state-Dos2zdC2.mjs} +2 -2
  140. package/dist/client/{shop.client-Rnqa74Tk.mjs → shop.client-uvj5GDZb.mjs} +17 -39
  141. package/dist/client/{shopShared-BaBfhjCq.mjs → shopShared-3giNWE3H.mjs} +2 -2
  142. package/dist/client/spam-protection.mjs +1 -1
  143. package/dist/client/src-Al4ooTl_.mjs +164 -0
  144. package/dist/client/{src-o7WEvbK1.mjs → src-CmXh3JWs.mjs} +233 -91
  145. package/dist/client/{timetableModel-BOff1Kk5.mjs → timetableModel-GA-hn1qM.mjs} +11 -87
  146. package/dist/client/{shop-add-feedback-DvC2kP1K.mjs → urlParams-C2QHo1Pa.mjs} +1 -42
  147. package/dist/client/{useAvailableSlots-DQJNh10g.mjs → useAvailableSlots-CBneCxbG.mjs} +2 -3
  148. package/dist/client/{useDiscountCodeUi-BcFQRI_7.mjs → useDiscountCodeUi-D0kGF0C7.mjs} +1 -1
  149. package/dist/client/{useEventPagination-BvdcexDC.mjs → useEventPagination-xX8n_Tuu.mjs} +8 -8
  150. package/dist/client/{view-CTBwSpKv.mjs → view-DOyZc-DF.mjs} +4 -4
  151. package/dist/client/{wizardSteps-CWIQyRIw.mjs → wizardSteps-B952ify5.mjs} +1241 -295
  152. package/dist/preview-next/client/{PageSectionToolbar-CG6KwITA.mjs → PageSectionToolbar-BI3UCdpu.mjs} +3 -3
  153. package/dist/preview-next/client/{PreviewEditorSidebar-BGBqrC9m.mjs → PreviewEditorSidebar-jkfLVOgY.mjs} +12 -9
  154. package/dist/preview-next/client/{PreviewEditorUI-Bwkyx28x.mjs → PreviewEditorUI-DwJQs4hM.mjs} +4 -4
  155. package/dist/preview-next/client/{PreviewShell-DB1l6JNU.mjs → PreviewShell-BAxAkuz8.mjs} +5 -5
  156. package/dist/preview-next/client/{SdkPreviewModeRuntime-Bs6Cwzr3.mjs → SdkPreviewModeRuntime-0UVB-39f.mjs} +68 -17
  157. package/dist/preview-next/client/{previewAssistantSlot-T-oDD_Dd.mjs → previewAssistantSlot-BgiYk3PB.mjs} +7347 -3516
  158. package/dist/preview-next/client/{previewChromeRoot-BeukcDRy.mjs → previewChromeRoot-tieNdF3E.mjs} +1 -1
  159. package/dist/preview-next/client/runtime.mjs +3 -3
  160. package/dist/preview-next/client/{sdk-runtime-ceDW_9q2.mjs → sdk-runtime-DXb_Evl0.mjs} +2 -2
  161. package/dist/preview-next/client/{siteStyleAccess-CCB9bScO.mjs → siteStyleAccess-BlN0jt2c.mjs} +3 -3
  162. package/dist/preview-next/client/{useAutosaveStatus-D4o0CKq7.mjs → useAutosaveStatus-BUEPA4oL.mjs} +1 -1
  163. package/dist/preview-next/client/{useOpenBlockForSetup-Seccrvwu.mjs → useOpenBlockForSetup-BVfr5P--.mjs} +1 -1
  164. package/dist/preview-next/container-responsive.css +203 -174
  165. package/dist/preview-next/keepAlive.mjs +1 -1
  166. package/dist/preview-next/middleware.mjs +1 -1
  167. package/dist/preview-next/{route-contract-FwFj8zGL.mjs → route-contract-BHTBA48n.mjs} +90 -37
  168. package/dist/server/{Block.shared-D6WrRCxX.mjs → Block.shared-hGoyEdjJ.mjs} +5 -5
  169. package/dist/server/{ThemeScopeCore-BQzjDQ2q.mjs → ThemeScopeCore-BfUCTOwj.mjs} +160 -142
  170. package/dist/server/{accessibleSurfaces-CM3QANtw.mjs → accessibleSurfaces-Dskni4Xj.mjs} +94 -330
  171. package/dist/server/accordions-By_0Ykks.mjs +111 -0
  172. package/dist/server/{bindings-CS6ih1Yc.mjs → bindings-DMJH4bvo.mjs} +7 -7
  173. package/dist/server/{client-m0ylCj_f.mjs → client-DrwlRNAH.mjs} +105 -42
  174. package/dist/server/config-validation.mjs +1 -1
  175. package/dist/server/config.mjs +2 -2
  176. package/dist/server/constants-CeMywaiD.mjs +1485 -0
  177. package/dist/server/{customCss-BZ8YSrQg.mjs → customCss-C9kgPHvr.mjs} +41 -5
  178. package/dist/server/data/resolveBlockData.mjs +1 -1
  179. package/dist/server/{resolveButtonColourStates--6yJp9Tq.mjs → expandPalette-ehuW8r2g.mjs} +745 -1229
  180. package/dist/server/index.mjs +3 -3
  181. package/dist/server/{loadContent-vgWMz1uD.mjs → loadContent-D0prFflT.mjs} +5 -4
  182. package/dist/server/{loadPage-CIOL3-9t.mjs → loadPage-CBLke9pJ.mjs} +3 -3
  183. package/dist/server/{lookMediaFrame-m-91jGGn.mjs → lookMediaFrame-H0fi4bJk.mjs} +38 -18
  184. package/dist/server/manifest.mjs +36 -25
  185. package/dist/server/{mapLocation-BM5WX7FY.mjs → mapLocation-MDDSubTp.mjs} +1 -1
  186. package/dist/server/media-BRmYrnzb.mjs +31 -0
  187. package/dist/server/{media-luf7RF22.mjs → media-gvfIw3z8.mjs} +2 -31
  188. package/dist/server/{navigation-BcNfYYuu.mjs → navigation-wrcuWmgp.mjs} +2 -2
  189. package/dist/server/navigation.mjs +1 -1
  190. package/dist/server/next.mjs +134 -81
  191. package/dist/server/{overrideResolution-BiHmsvTZ.mjs → overrideResolution-DUgCEH8z.mjs} +1 -1
  192. package/dist/server/page-converter.mjs +3 -3
  193. package/dist/server/{pageRenderPlan-DJo_obpi.mjs → pageRenderPlan-BHrmogsW.mjs} +165 -247
  194. package/dist/server/{pageRuntimeSupport-BnSuoHON.mjs → pageRuntimeSupport-D2-YMRei.mjs} +5 -5
  195. package/dist/server/{pageShared-BJuOzxzn.mjs → pageShared-CG8O31Eo.mjs} +3402 -3249
  196. package/dist/server/{parseThemeForPersistence-DOsfofCy.mjs → parseThemeForPersistence-CrPlbJEN.mjs} +3 -2
  197. package/dist/server/{portal-B4JVkdjc.mjs → portal-pG_uhsI2.mjs} +62 -46
  198. package/dist/server/portal.mjs +3 -3
  199. package/dist/server/portalQuestions-oUyohgL9.mjs +225 -0
  200. package/dist/server/{prebuild-Cr8p8T7V.mjs → prebuild-C8Amvzce.mjs} +1 -1
  201. package/dist/server/prebuild.mjs +1 -1
  202. package/dist/server/{prefetchBlockData-BZh57-ua.mjs → prefetchBlockData-BxUETRIZ.mjs} +4 -3
  203. package/dist/server/{registry-CvhFwbXJ.mjs → registry-Cc88-23f.mjs} +1514 -1190
  204. package/dist/server/rendering/components/pageShared.mjs +1 -1
  205. package/dist/server/rendering/helpers/loadPage.mjs +1 -1
  206. package/dist/server/rendering/helpers/pageRuntimeSupport.mjs +1 -1
  207. package/dist/server/rendering/server.mjs +4 -4
  208. package/dist/server/rendering.mjs +10 -9
  209. package/dist/server/{resolveBlockData-Cv_W1LVB.mjs → resolveBlockData-OG3KOkig.mjs} +2 -2
  210. package/dist/server/{responseMedia-KRKguBC5.mjs → responseMedia-IfH65QAH.mjs} +1 -1
  211. package/dist/server/{schema-BpsqaSSU.mjs → schema-CwfxQjc4.mjs} +10 -113
  212. package/dist/server/server.mjs +3 -3
  213. package/dist/server/{servicePageContent-CRKbTm_7.mjs → servicePageContent-BcFuhhD7.mjs} +22 -21
  214. package/dist/server/theme-bridge.mjs +34 -8
  215. package/dist/server/theme.mjs +2 -2
  216. package/dist/server/{three-pass-converter-39SXCCnh.mjs → three-pass-converter-DPaUPTfl.mjs} +34 -16
  217. package/dist/server/titleSourceSchema-NhK6azFS.mjs +2018 -0
  218. package/dist/server/typeGuards-CTW_9AXq.mjs +413 -0
  219. package/dist/server/types-BKaBZFjD.mjs +1085 -0
  220. package/dist/server/{validation-DCl-FCk_.mjs → validation-BovmbS8N.mjs} +70 -17
  221. package/dist/server/{version-DT_R5JAR.mjs → version-hws4hgyX.mjs} +1 -1
  222. package/dist/server/video-Cdr3wh-q.mjs +272 -0
  223. package/dist/styles/index.css +1098 -1885
  224. package/package.json +2 -1
  225. package/dist/_dts/index-B0_2-65A.d.ts +0 -101
  226. package/dist/client/TabBarFragment-DlKQRhP4.mjs +0 -56
  227. package/dist/client/checkoutRoute-DKlZRNZD.mjs +0 -22
  228. package/dist/client/creditProducts-BQ1t1erI.mjs +0 -266
  229. package/dist/client/formatDate-hhI1-tzt.mjs +0 -26
  230. package/dist/server/constants-Cj7hfbrA.mjs +0 -41
  231. package/dist/server/richTextSchema-QLaQrbII.mjs +0 -212
  232. package/dist/server/titleSourceSchema-Cu-3PRvv.mjs +0 -122
@@ -0,0 +1,873 @@
1
+ "use client";
2
+ import { c as parseMediaAssetId, f as parseUuidBrand } from "./renderableMediaAssetAdmission-BsOWd9lf.mjs";
3
+ import { Mn as parseAppointmentId, Pn as parseClientArrangementId, Rn as parseAttendeeId, Vn as parseEventSeriesRegistrationId, _t as unknownKind, gt as exactSchema, ht as evolvingSchema, mt as portalBeforeYouComeTaskSchema } from "./src-CmXh3JWs.mjs";
4
+ import { D as portalJoiningDetailsSchema, _ as portalPaymentToDoSchema, a as brandedId, c as courseRegistrationRefSchema, l as eventAttendeeRefSchema, o as cancellationMoneyOutcomeSchema, p as portalMoneySchema, r as appointmentRefSchema, t as customerOrderPaymentLabelsSchema, u as refundRecipientSchema, x as customerPassUseCaseSchema, y as customerMembershipStatusSchema } from "./portalOrders-oEoTvzkW.mjs";
5
+ import { z } from "zod";
6
+ //#region ../core/src/branded/orders.ts
7
+ const unsafeAsOrderId = (id) => id;
8
+ const unsafeAsOrderPaymentReceiptId = (id) => id;
9
+ const parseOrderId = (value) => parseUuidBrand(value, unsafeAsOrderId);
10
+ const parseOrderPaymentReceiptId = (value) => parseUuidBrand(value, unsafeAsOrderPaymentReceiptId);
11
+ //#endregion
12
+ //#region ../core/src/branded/bookings.ts
13
+ const unsafeAsWaitlistEntryId = (id) => id;
14
+ const parseWaitlistEntryId = (value) => parseUuidBrand(value, unsafeAsWaitlistEntryId);
15
+ //#endregion
16
+ //#region ../core/src/branded/entitlements.ts
17
+ const unsafeAsEntitlementId = (id) => id;
18
+ const unsafeAsPassId = (id) => id;
19
+ const unsafeAsCustomerPassId = (id) => id;
20
+ const parseEntitlementId = (value) => parseUuidBrand(value, unsafeAsEntitlementId);
21
+ //#endregion
22
+ //#region ../core/src/booking-context-ref.ts
23
+ /** The raw id a booking's reference carries. Callers never choose among nullable columns. */
24
+ function bookingContextId(ref) {
25
+ switch (ref.tag) {
26
+ case "appointment": return ref.appointmentId;
27
+ case "event_attendee": return ref.attendeeId;
28
+ case "event_series_registration": return ref.registrationId;
29
+ }
30
+ }
31
+ //#endregion
32
+ //#region ../site-contracts/src/siteData/portalWaitlists.ts
33
+ const customerPortalWaitlistSubjectSchema = exactSchema()(z.discriminatedUnion("kind", [z.object({
34
+ kind: z.literal("occurrence"),
35
+ occurrenceId: z.string(),
36
+ eventSeriesId: z.string(),
37
+ startsAt: z.string(),
38
+ endsAt: z.string(),
39
+ timeZone: z.string(),
40
+ deliveryMode: z.enum([
41
+ "in_person",
42
+ "online",
43
+ "hybrid"
44
+ ]),
45
+ isOnline: z.boolean()
46
+ }), z.object({
47
+ kind: z.literal("wholeSeries"),
48
+ timeZone: z.string(),
49
+ deliveryMode: z.enum([
50
+ "in_person",
51
+ "online",
52
+ "hybrid"
53
+ ]),
54
+ isOnline: z.boolean(),
55
+ eventSeriesId: z.string(),
56
+ scheduleSummary: z.string().nullable()
57
+ })]));
58
+ const OFFER_PRICE_KINDS = [
59
+ "total",
60
+ "free",
61
+ "chosen_at_booking",
62
+ "not_known"
63
+ ];
64
+ const knownOfferPriceSchema = z.discriminatedUnion("kind", [
65
+ z.object({
66
+ kind: z.literal("total"),
67
+ amount: z.object({
68
+ amountCents: z.number(),
69
+ currency: z.string()
70
+ })
71
+ }),
72
+ z.object({ kind: z.literal("free") }),
73
+ z.object({ kind: z.literal("chosen_at_booking") }),
74
+ z.object({ kind: z.literal("not_known") })
75
+ ]);
76
+ /** A kind this build doesn't know reads as not known, never as a failed list. */
77
+ const unknownOfferPriceSchema = z.object({ kind: z.string().refine((kind) => !OFFER_PRICE_KINDS.includes(kind), "a known price failed to decode") }).transform(() => ({ kind: "not_known" }));
78
+ const portalWaitlistOfferPriceSchema = evolvingSchema()(z.union([knownOfferPriceSchema, unknownOfferPriceSchema]));
79
+ const waitlistEntryBase = {
80
+ id: z.string(),
81
+ subject: customerPortalWaitlistSubjectSchema,
82
+ eventTitle: z.string(),
83
+ eventPath: z.string().nullable(),
84
+ venueName: z.string().nullable(),
85
+ requestedPlaces: z.number(),
86
+ joinedAt: z.string()
87
+ };
88
+ const customerPortalWaitlistEntrySchema = exactSchema()(z.discriminatedUnion("status", [
89
+ z.object({
90
+ ...waitlistEntryBase,
91
+ status: z.literal("waiting"),
92
+ queuePosition: z.number().nullable(),
93
+ canLeave: z.literal(true)
94
+ }),
95
+ z.object({
96
+ ...waitlistEntryBase,
97
+ status: z.literal("placeAvailable"),
98
+ claimExpiresAt: z.string(),
99
+ claimPath: z.string().nullable(),
100
+ offerPrice: portalWaitlistOfferPriceSchema,
101
+ canLeave: z.literal(true)
102
+ }),
103
+ z.object({
104
+ ...waitlistEntryBase,
105
+ status: z.literal("offerExpired"),
106
+ claimExpiredAt: z.string(),
107
+ canLeave: z.literal(false)
108
+ })
109
+ ]));
110
+ //#endregion
111
+ //#region ../site-contracts/src/siteData/portalRegularSessions.ts
112
+ const weekdaySchema = z.literal([
113
+ 0,
114
+ 1,
115
+ 2,
116
+ 3,
117
+ 4,
118
+ 5,
119
+ 6
120
+ ]);
121
+ const portalRegularSessionCadenceSchema = exactSchema()(z.discriminatedUnion("kind", [z.object({
122
+ kind: z.literal("weekly"),
123
+ everyWeeks: z.literal([1, 2]),
124
+ weekday: weekdaySchema
125
+ }), z.object({
126
+ kind: z.literal("monthly"),
127
+ weekday: weekdaySchema,
128
+ nth: z.literal([
129
+ 1,
130
+ 2,
131
+ 3,
132
+ 4,
133
+ "last"
134
+ ])
135
+ })]));
136
+ const dateSchema = exactSchema()(z.union([
137
+ z.object({
138
+ state: z.literal("booked"),
139
+ occurrence: z.string(),
140
+ appointmentId: brandedId(parseAppointmentId, "appointment id"),
141
+ startAt: z.string(),
142
+ endAt: z.string()
143
+ }),
144
+ z.object({
145
+ state: z.enum([
146
+ "held",
147
+ "open",
148
+ "trainer_away"
149
+ ]),
150
+ occurrence: z.string(),
151
+ startAt: z.string(),
152
+ endAt: z.string()
153
+ }),
154
+ z.object({
155
+ state: z.literal("away"),
156
+ occurrence: z.string()
157
+ })
158
+ ]));
159
+ const portalRegularSessionSchema = exactSchema()(z.object({
160
+ arrangementId: brandedId(parseClientArrangementId, "regular sessions id"),
161
+ timezone: z.string(),
162
+ schedule: z.object({
163
+ effectiveFrom: z.string(),
164
+ cadence: portalRegularSessionCadenceSchema,
165
+ localStart: z.string()
166
+ }),
167
+ trainerName: z.string().nullable(),
168
+ serviceName: z.string().nullable(),
169
+ holdsTime: z.boolean(),
170
+ payment: z.union([z.object({
171
+ kind: z.literal("package"),
172
+ name: z.string().nullable(),
173
+ sessionsLeft: z.number()
174
+ }), z.object({ kind: z.enum(["owed", "payment_link"]) })]),
175
+ dates: z.array(dateSchema).readonly()
176
+ }));
177
+ const portalRegularSessionsResponseSchema = exactSchema()(z.object({ arrangements: z.array(portalRegularSessionSchema).readonly() }));
178
+ //#endregion
179
+ //#region ../site-contracts/src/siteData/portalBookings.ts
180
+ /**
181
+ * One booking model for the customer portal, from GET /api/portal/bookings and
182
+ * GET /api/portal/bookings/{kind}/{id}. Every kind shares the fields a card and
183
+ * a booking page need, and its own extras ride in `detail`. The server decides
184
+ * every fact and action here, including whether the booking is over; the
185
+ * portal only words them.
186
+ *
187
+ * Wire evolution (pinned SDK clients): decoding is strict for the variants
188
+ * this build knows. Three points are extensible, and a value a newer server
189
+ * adds there decodes to a closed `unsupported` state instead of failing the
190
+ * page: the booking kind (the booking still shows, with nothing to act on), an
191
+ * action's state (the action is disabled), and the money a cancellation would
192
+ * return (cancel is disabled, so the portal never guesses a refund).
193
+ * Explanations of why an action isn't offered come from the server as text,
194
+ * so new reasons need no client change.
195
+ */
196
+ const PORTAL_BOOKING_KINDS = [
197
+ "event",
198
+ "course",
199
+ "appointment"
200
+ ];
201
+ /** The one map from a booking's reference to its URL words. */
202
+ function portalBookingPath(ref) {
203
+ return {
204
+ kind: portalBookingKind(ref),
205
+ bookingId: bookingContextId(ref)
206
+ };
207
+ }
208
+ function portalBookingKind(ref) {
209
+ switch (ref.tag) {
210
+ case "event_attendee": return "event";
211
+ case "event_series_registration": return "course";
212
+ case "appointment": return "appointment";
213
+ }
214
+ }
215
+ function brandedBookingId(parse) {
216
+ return z.string().transform((value, ctx) => {
217
+ const parsed = parse(value);
218
+ if (parsed.ok) return parsed.value;
219
+ ctx.addIssue({
220
+ code: "custom",
221
+ message: "Invalid booking ID"
222
+ });
223
+ return z.NEVER;
224
+ });
225
+ }
226
+ /**
227
+ * The URL words back to the booking's reference, refusing anything that isn't
228
+ * a real id of that kind. The route's params, the client router and
229
+ * `parsePortalBookingRef` all read bookings through this.
230
+ */
231
+ const portalBookingPathSchema = z.union([
232
+ z.object({
233
+ kind: z.literal("event"),
234
+ bookingId: brandedBookingId(parseAttendeeId)
235
+ }).transform(({ bookingId }) => ({
236
+ tag: "event_attendee",
237
+ attendeeId: bookingId
238
+ })),
239
+ z.object({
240
+ kind: z.literal("course"),
241
+ bookingId: brandedBookingId(parseEventSeriesRegistrationId)
242
+ }).transform(({ bookingId }) => ({
243
+ tag: "event_series_registration",
244
+ registrationId: bookingId
245
+ })),
246
+ z.object({
247
+ kind: z.literal("appointment"),
248
+ bookingId: brandedBookingId(parseAppointmentId)
249
+ }).transform(({ bookingId }) => ({
250
+ tag: "appointment",
251
+ appointmentId: bookingId
252
+ }))
253
+ ]);
254
+ /** The listed values must cover the union, so a new member here is a compile error, not a silent fallback. */
255
+ function allOf() {
256
+ return (values) => values;
257
+ }
258
+ const unsupported = (known) => unknownKind(known).transform(() => ({ kind: "unsupported" }));
259
+ const whenSchema = exactSchema()(z.object({
260
+ startsAt: z.string(),
261
+ endsAt: z.string().nullable(),
262
+ timeZone: z.string()
263
+ }));
264
+ const venueSchema = exactSchema()(z.object({
265
+ name: z.string().nullable(),
266
+ address: z.discriminatedUnion("kind", [
267
+ z.object({
268
+ kind: z.literal("shown"),
269
+ address: z.string().nullable(),
270
+ doorNote: z.string().nullable(),
271
+ directions: z.string().nullable()
272
+ }),
273
+ z.object({
274
+ kind: z.literal("after_booking"),
275
+ area: z.string().nullable()
276
+ }),
277
+ z.object({ kind: z.literal("not_given") })
278
+ ])
279
+ }));
280
+ const whereSchema = exactSchema()(z.discriminatedUnion("kind", [
281
+ z.object({
282
+ kind: z.literal("venue"),
283
+ venue: venueSchema
284
+ }),
285
+ z.object({
286
+ kind: z.literal("online"),
287
+ joining: portalJoiningDetailsSchema.nullable()
288
+ }),
289
+ z.object({
290
+ kind: z.literal("hybrid"),
291
+ venue: venueSchema,
292
+ joining: portalJoiningDetailsSchema.nullable()
293
+ }),
294
+ z.object({ kind: z.literal("not_given") })
295
+ ]));
296
+ const standingSchema = exactSchema()(z.discriminatedUnion("kind", [
297
+ z.object({ kind: z.literal("booked") }),
298
+ z.object({ kind: z.literal("awaiting_payment") }),
299
+ z.object({ kind: z.literal("requested") }),
300
+ z.object({
301
+ kind: z.literal("waitlisted"),
302
+ position: z.number().nullable()
303
+ }),
304
+ z.object({ kind: z.literal("cancelled") }),
305
+ z.object({
306
+ kind: z.literal("request_not_accepted"),
307
+ outcome: z.enum([
308
+ "declined",
309
+ "lapsed",
310
+ "withdrawn"
311
+ ])
312
+ }),
313
+ z.object({ kind: z.literal("missed") }),
314
+ z.object({ kind: z.literal("given_away") })
315
+ ]));
316
+ const peopleSchema = exactSchema()(z.object({
317
+ places: z.number(),
318
+ guests: z.array(z.object({
319
+ place: z.number(),
320
+ name: z.string().nullable(),
321
+ email: z.string().nullable(),
322
+ phone: z.string().nullable()
323
+ })).readonly(),
324
+ namesMissing: z.number()
325
+ }));
326
+ const ticketLineSchema = exactSchema()(z.object({
327
+ label: z.string(),
328
+ quantity: z.number(),
329
+ unitPrice: portalMoneySchema.nullable()
330
+ }));
331
+ const orderSchema = exactSchema()(z.object({
332
+ orderId: z.string(),
333
+ orderNumber: z.string(),
334
+ total: portalMoneySchema,
335
+ paidWithCredit: portalMoneySchema.nullable(),
336
+ paidSoFar: portalMoneySchema,
337
+ paymentLabels: customerOrderPaymentLabelsSchema,
338
+ toDo: portalPaymentToDoSchema,
339
+ bookingCount: z.number().int().positive()
340
+ }));
341
+ const paymentSchema = exactSchema()(z.discriminatedUnion("kind", [
342
+ z.object({ kind: z.literal("free") }),
343
+ z.object({ kind: z.literal("not_decided") }),
344
+ z.object({
345
+ kind: z.literal("pass"),
346
+ pass: z.object({
347
+ customerPassId: z.string(),
348
+ name: z.string(),
349
+ useCase: customerPassUseCaseSchema,
350
+ creditsRemaining: z.number(),
351
+ expiresAt: z.string().nullable()
352
+ }).nullable()
353
+ }),
354
+ z.object({
355
+ kind: z.literal("membership"),
356
+ membership: z.object({
357
+ customerMembershipId: z.string(),
358
+ name: z.string(),
359
+ status: customerMembershipStatusSchema
360
+ }).nullable()
361
+ }),
362
+ z.object({
363
+ kind: z.literal("order"),
364
+ order: orderSchema
365
+ }),
366
+ z.object({
367
+ kind: z.literal("owed"),
368
+ amount: portalMoneySchema.nullable()
369
+ }),
370
+ z.object({ kind: z.literal("unavailable") })
371
+ ]));
372
+ const ACTION_KINDS = allOf()([
373
+ "available",
374
+ "closed",
375
+ "not_offered"
376
+ ]);
377
+ const closedActionSchema = z.object({
378
+ kind: z.literal("closed"),
379
+ closedAt: z.string()
380
+ });
381
+ const notOfferedActionSchema = z.object({
382
+ kind: z.literal("not_offered"),
383
+ explanation: z.string().nullable()
384
+ });
385
+ const knownActionSchema = exactSchema()(z.discriminatedUnion("kind", [
386
+ z.object({
387
+ kind: z.literal("available"),
388
+ until: z.string().nullable()
389
+ }),
390
+ closedActionSchema,
391
+ notOfferedActionSchema
392
+ ]));
393
+ const portalBookingActionSchema = evolvingSchema()(z.union([knownActionSchema, unsupported(ACTION_KINDS)]));
394
+ const RESCHEDULE_KINDS = allOf()([
395
+ "available",
396
+ "closed",
397
+ "not_offered",
398
+ "single_run"
399
+ ]);
400
+ const knownRescheduleSchema = exactSchema()(z.discriminatedUnion("kind", [
401
+ z.object({
402
+ kind: z.literal("available"),
403
+ until: z.string().nullable()
404
+ }),
405
+ closedActionSchema,
406
+ notOfferedActionSchema,
407
+ z.object({ kind: z.literal("single_run") })
408
+ ]));
409
+ /** An event's reschedule: a reason this build doesn't know decodes to `unsupported`, as every action's does. */
410
+ const portalRescheduleActionSchema = evolvingSchema()(z.union([knownRescheduleSchema, unsupported(RESCHEDULE_KINDS)]));
411
+ const MONEY_KINDS = allOf()([
412
+ "nothing_to_return",
413
+ "refund",
414
+ "credit_back",
415
+ "keep_money",
416
+ "keep_credit",
417
+ "contact_business",
418
+ "not_known"
419
+ ]);
420
+ const cancelMoneySchema = exactSchema()(z.union([cancellationMoneyOutcomeSchema, z.object({ kind: z.literal("not_known") })]));
421
+ const knownCancelSchema = exactSchema()(z.discriminatedUnion("kind", [
422
+ z.object({
423
+ kind: z.literal("available"),
424
+ until: z.string().nullable(),
425
+ money: cancelMoneySchema,
426
+ recipient: refundRecipientSchema,
427
+ termsApply: z.boolean()
428
+ }),
429
+ closedActionSchema,
430
+ notOfferedActionSchema
431
+ ]));
432
+ /** Open, but with money this build can't read: cancel is withheld rather than offered without its outcome. */
433
+ const cancelWithUnknownMoney = z.object({
434
+ kind: z.literal("available"),
435
+ money: unknownKind(MONEY_KINDS)
436
+ }).transform(() => ({ kind: "unsupported" }));
437
+ const sharedActionsShape = {
438
+ cancel: evolvingSchema()(z.union([
439
+ knownCancelSchema,
440
+ cancelWithUnknownMoney,
441
+ unsupported(ACTION_KINDS)
442
+ ])),
443
+ rebook: portalBookingActionSchema,
444
+ editGuests: portalBookingActionSchema,
445
+ showTicket: portalBookingActionSchema
446
+ };
447
+ const eventActionsSchema = evolvingSchema()(z.object({
448
+ ...sharedActionsShape,
449
+ transfer: portalBookingActionSchema,
450
+ reschedule: portalRescheduleActionSchema
451
+ }));
452
+ const courseActionsSchema = evolvingSchema()(z.object(sharedActionsShape));
453
+ const appointmentActionsSchema = evolvingSchema()(z.object({
454
+ ...sharedActionsShape,
455
+ reschedule: portalBookingActionSchema
456
+ }));
457
+ const baseShape = {
458
+ title: z.string(),
459
+ timing: z.enum(["upcoming", "over"]),
460
+ where: whereSchema,
461
+ standing: standingSchema,
462
+ bookedAt: z.string().nullable(),
463
+ people: peopleSchema,
464
+ questions: portalBeforeYouComeTaskSchema.nullable(),
465
+ payment: paymentSchema
466
+ };
467
+ const eventDetailSchema = exactSchema()(z.object({
468
+ occurrenceId: z.string(),
469
+ seriesName: z.string().nullable(),
470
+ eventPath: z.string().nullable(),
471
+ occurrencePath: z.string().nullable(),
472
+ ticketLines: z.array(ticketLineSchema).readonly(),
473
+ transfer: z.discriminatedUnion("kind", [
474
+ z.object({ kind: z.literal("none") }),
475
+ z.object({
476
+ kind: z.literal("received"),
477
+ from: z.string().nullable(),
478
+ at: z.string().nullable()
479
+ }),
480
+ z.object({
481
+ kind: z.literal("given"),
482
+ to: z.string().nullable(),
483
+ at: z.string().nullable()
484
+ })
485
+ ]),
486
+ rooms: z.array(z.object({
487
+ name: z.string(),
488
+ sleeps: z.number(),
489
+ bookedAs: z.enum(["private", "shared"]),
490
+ people: z.array(z.string()).readonly()
491
+ })).readonly(),
492
+ guestNamesRequired: z.boolean()
493
+ }));
494
+ const courseDetailSchema = exactSchema()(z.object({
495
+ eventPath: z.string().nullable(),
496
+ sessions: z.array(whenSchema).readonly(),
497
+ nextSessionAt: z.string().nullable(),
498
+ ticketLines: z.array(ticketLineSchema).readonly()
499
+ }));
500
+ const appointmentDetailSchema = exactSchema()(z.object({
501
+ serviceName: z.string(),
502
+ serviceId: z.string(),
503
+ resourceId: z.string().nullable(),
504
+ withName: z.string().nullable(),
505
+ request: z.object({
506
+ requestedAt: z.string().nullable(),
507
+ decidedAt: z.string().nullable()
508
+ }).nullable(),
509
+ regularSession: z.object({
510
+ cadence: portalRegularSessionCadenceSchema,
511
+ localStart: z.string()
512
+ }).nullable()
513
+ }));
514
+ const knownBookingSchema = evolvingSchema()(z.discriminatedUnion("kind", [
515
+ z.object({
516
+ kind: z.literal("event"),
517
+ ref: eventAttendeeRefSchema,
518
+ ...baseShape,
519
+ when: whenSchema,
520
+ actions: eventActionsSchema,
521
+ detail: eventDetailSchema
522
+ }),
523
+ z.object({
524
+ kind: z.literal("course"),
525
+ ref: courseRegistrationRefSchema,
526
+ ...baseShape,
527
+ when: whenSchema.nullable(),
528
+ actions: courseActionsSchema,
529
+ detail: courseDetailSchema
530
+ }),
531
+ z.object({
532
+ kind: z.literal("appointment"),
533
+ ref: appointmentRefSchema,
534
+ ...baseShape,
535
+ when: whenSchema,
536
+ actions: appointmentActionsSchema,
537
+ detail: appointmentDetailSchema
538
+ })
539
+ ]));
540
+ /** A newer kind's reference, read only far enough to key the card on it. */
541
+ const unknownRefKey = z.record(z.string(), z.unknown()).catch({}).transform((ref) => Object.values(ref).filter((value) => typeof value === "string").join(":"));
542
+ const unsupportedBookingSchema = unknownKind(PORTAL_BOOKING_KINDS).extend({
543
+ title: z.string(),
544
+ when: whenSchema.nullable().catch(null),
545
+ ref: unknownRefKey
546
+ }).transform((booking) => ({
547
+ kind: "unsupported",
548
+ key: `${booking.kind}:${booking.ref}`,
549
+ title: booking.title,
550
+ when: booking.when
551
+ }));
552
+ const portalBookingViewSchema = evolvingSchema()(z.union([knownBookingSchema, unsupportedBookingSchema]));
553
+ const portalBookingsResponseSchema = evolvingSchema()(z.object({
554
+ waitlist: z.array(customerPortalWaitlistEntrySchema).readonly(),
555
+ comingUp: z.array(portalBookingViewSchema).readonly(),
556
+ cancelled: z.array(portalBookingViewSchema).readonly(),
557
+ past: z.array(portalBookingViewSchema).readonly(),
558
+ nextPastCursor: z.string().nullable()
559
+ }));
560
+ const portalBookingResponseSchema = evolvingSchema()(z.object({ booking: knownBookingSchema }));
561
+ //#endregion
562
+ //#region ../site-contracts/src/siteData/portalRoutes.ts
563
+ /**
564
+ * Pages the server renders on its own: Continue (before any session), tickets
565
+ * and downloads. Every other page is the client portal's. The hosts' renderer
566
+ * and the client's navigation both read this split, so neither can disagree
567
+ * about who draws a page.
568
+ */
569
+ const SERVER_PORTAL_PAGES = [
570
+ "continue",
571
+ "ticket",
572
+ "download",
573
+ "download_file"
574
+ ];
575
+ function isServerPortalTarget(target) {
576
+ return SERVER_PORTAL_PAGES.includes(target.page);
577
+ }
578
+ const CUSTOMER_PORTAL_PATH = "/portal";
579
+ const NOT_FOUND = { page: "not_found" };
580
+ const ARRIVAL_PARAMS = {
581
+ signed_in: ["portal_login", "success"],
582
+ order_paid: ["order", "success"],
583
+ order_checkout_left: ["order", "cancelled"]
584
+ };
585
+ const ENTRY_REASON_PARAMS = {
586
+ none: [],
587
+ opened: [["entry", "1"]],
588
+ stale: [["entry", "1"], ["stale", "1"]],
589
+ link_sent: [["link", "sent"]],
590
+ link_limited: [["link", "limited"]],
591
+ demo_refused: [["link", "demo"]]
592
+ };
593
+ /** The query a page's own data puts in its address. */
594
+ function targetParams(target) {
595
+ return target.page === "continue" ? ENTRY_REASON_PARAMS[target.reason] : [];
596
+ }
597
+ function withQuery(path, params) {
598
+ const query = new URLSearchParams(params.map(([name, value]) => [name, value])).toString();
599
+ return query ? `${path}?${query}` : path;
600
+ }
601
+ function bookingPath(ref) {
602
+ const { kind, bookingId } = portalBookingPath(ref);
603
+ return `${CUSTOMER_PORTAL_PATH}/bookings/${kind}/${bookingId}`;
604
+ }
605
+ function targetPath(target) {
606
+ const base = CUSTOMER_PORTAL_PATH;
607
+ switch (target.page) {
608
+ case "home": return base;
609
+ case "bookings": return `${base}/bookings`;
610
+ case "booking": return bookingPath(target.ref);
611
+ case "booking_questions": return `${bookingPath(target.ref)}/questions`;
612
+ case "booking_cancel": return `${bookingPath(target.ref)}/cancel`;
613
+ case "booking_transfer": return `${bookingPath(target.ref)}/transfer`;
614
+ case "booking_reschedule": return `${bookingPath(target.ref)}/reschedule`;
615
+ case "ticket": return `${bookingPath(target.ref)}/ticket`;
616
+ case "waitlist_offer": return `${base}/bookings/waitlist/${target.entryId}`;
617
+ case "passes": return `${base}/passes`;
618
+ case "payments": return `${base}/payments`;
619
+ case "order": return `${base}/payments/orders/${target.orderId}`;
620
+ case "receipt": return `${base}/payments/receipts/${target.receiptId}`;
621
+ case "downloads": return `${base}/downloads`;
622
+ case "download": return `${base}/downloads/${target.entitlementId}`;
623
+ case "download_file": return `${base}/downloads/${target.entitlementId}/files/${target.assetId}`;
624
+ case "details": return `${base}/details`;
625
+ case "sign_in": return `${base}/sign-in`;
626
+ case "continue": return `${base}/continue`;
627
+ }
628
+ }
629
+ /** The site-relative path of a portal page, optionally carrying an arrival outcome. */
630
+ function portalPath(target, options = {}) {
631
+ const arrival = options.arrival ? [ARRIVAL_PARAMS[options.arrival]] : [];
632
+ return withQuery(targetPath(target), [...targetParams(target), ...arrival]);
633
+ }
634
+ /**
635
+ * A destination marked with an arrival outcome (the callback marks where sign-in
636
+ * lands), keeping its own query: a checkout outcome already on it stays.
637
+ */
638
+ function withPortalArrival(destination, arrival) {
639
+ const marked = new URL(destination);
640
+ const [name, value] = ARRIVAL_PARAMS[arrival];
641
+ marked.searchParams.set(name, value);
642
+ return marked;
643
+ }
644
+ /** Query parameters the portal reads and removes: the old link shapes and the arrival outcomes. */
645
+ const CONSUMED_PARAMS = [
646
+ "portal_tab",
647
+ "portal_task",
648
+ "portal_order",
649
+ "portal_login",
650
+ "order"
651
+ ];
652
+ /** Continue's own query, which only Continue reads. */
653
+ const ENTRY_PARAMS = [
654
+ "entry",
655
+ "stale",
656
+ "link"
657
+ ];
658
+ function parsePortalLocation(url) {
659
+ const signedIn = cleanParam(url.searchParams, "portal_login") === "success";
660
+ const checkout = parseCheckoutArrival(url.searchParams);
661
+ const arrivals = [...signedIn ? ["signed_in"] : [], ...checkout ? [checkout] : []];
662
+ const segments = portalSegments(url.pathname);
663
+ if (segments === null) return {
664
+ route: NOT_FOUND,
665
+ arrivals,
666
+ rewrite: null
667
+ };
668
+ const route = (segments.length === 0 ? legacyQueryRoute(url.searchParams, checkout) : null) ?? routeFromSegments(segments, url.searchParams);
669
+ return {
670
+ route,
671
+ arrivals,
672
+ rewrite: rewriteFor(url, route)
673
+ };
674
+ }
675
+ function parseCheckoutArrival(params) {
676
+ const order = cleanParam(params, "order");
677
+ return order === "success" ? "order_paid" : order === "cancelled" ? "order_checkout_left" : null;
678
+ }
679
+ function parseEntryReason(params) {
680
+ const link = params.get("link");
681
+ if (link === "sent") return "link_sent";
682
+ if (link === "limited") return "link_limited";
683
+ if (link === "demo") return "demo_refused";
684
+ if (params.get("entry") !== "1") return "none";
685
+ return params.get("stale") === "1" ? "stale" : "opened";
686
+ }
687
+ /** Whether a path is under the portal at all, whatever page it names. */
688
+ function isPortalPathname(pathname) {
689
+ return pathname === "/portal" || pathname.startsWith(`/portal/`);
690
+ }
691
+ /** The path below `/portal`, decoded; null when the path isn't the portal's. */
692
+ function portalSegments(pathname) {
693
+ if (!isPortalPathname(pathname)) return null;
694
+ try {
695
+ return pathname.slice(7).split("/").filter((part) => part !== "").map(decodeURIComponent);
696
+ } catch {
697
+ return null;
698
+ }
699
+ }
700
+ function rewriteFor(url, route) {
701
+ if (route.page === "not_found") return null;
702
+ const kept = new URLSearchParams(url.searchParams);
703
+ [...CONSUMED_PARAMS, ...route.page === "continue" ? ENTRY_PARAMS : []].forEach((name) => kept.delete(name));
704
+ const canonical = withQuery(targetPath(route), [...targetParams(route), ...kept.entries()]);
705
+ const visited = url.searchParams.toString();
706
+ return canonical === `${url.pathname}${visited ? `?${visited}` : ""}` ? null : canonical;
707
+ }
708
+ function cleanParam(params, name) {
709
+ const value = params.get(name)?.trim();
710
+ return value ? value : null;
711
+ }
712
+ const only = (rest, route) => rest.length === 0 ? route : NOT_FOUND;
713
+ function routeFromSegments(segments, params) {
714
+ const [first, ...rest] = segments;
715
+ switch (first) {
716
+ case void 0: return { page: "home" };
717
+ case "bookings": return bookingsRoute(rest);
718
+ case "passes": return only(rest, { page: "passes" });
719
+ case "payments": return paymentsRoute(rest);
720
+ case "downloads":
721
+ case "digital-products": return downloadsRoute(rest);
722
+ case "tickets": return rest.length === 1 ? ticketRoute(parseBookingRef("event", rest[0])) : NOT_FOUND;
723
+ case "details": return only(rest, { page: "details" });
724
+ case "sign-in": return only(rest, { page: "sign_in" });
725
+ case "continue": return only(rest, {
726
+ page: "continue",
727
+ reason: parseEntryReason(params)
728
+ });
729
+ default: return NOT_FOUND;
730
+ }
731
+ }
732
+ function parseBookingRef(kind, bookingId) {
733
+ const parsed = portalBookingPathSchema.safeParse({
734
+ kind,
735
+ bookingId
736
+ });
737
+ return parsed.success ? parsed.data : null;
738
+ }
739
+ function ticketRoute(ref) {
740
+ return ref?.tag === "event_attendee" ? {
741
+ page: "ticket",
742
+ ref
743
+ } : NOT_FOUND;
744
+ }
745
+ function bookingsRoute(rest) {
746
+ const [kind, id, action, ...extra] = rest;
747
+ if (kind === void 0) return { page: "bookings" };
748
+ if (kind === "waitlist") {
749
+ const entryId = parseWaitlistEntryId(id);
750
+ return entryId.ok && action === void 0 ? {
751
+ page: "waitlist_offer",
752
+ entryId: entryId.value
753
+ } : NOT_FOUND;
754
+ }
755
+ const ref = parseBookingRef(kind, id);
756
+ if (!ref || extra.length > 0) return NOT_FOUND;
757
+ return bookingActionRoute(ref, action);
758
+ }
759
+ function bookingActionRoute(ref, action) {
760
+ switch (action) {
761
+ case void 0: return {
762
+ page: "booking",
763
+ ref
764
+ };
765
+ case "questions": return {
766
+ page: "booking_questions",
767
+ ref
768
+ };
769
+ case "cancel": return {
770
+ page: "booking_cancel",
771
+ ref
772
+ };
773
+ case "transfer": return ref.tag === "event_attendee" ? {
774
+ page: "booking_transfer",
775
+ ref
776
+ } : NOT_FOUND;
777
+ case "reschedule": return ref.tag === "event_series_registration" ? NOT_FOUND : {
778
+ page: "booking_reschedule",
779
+ ref
780
+ };
781
+ case "ticket": return ticketRoute(ref);
782
+ default: return NOT_FOUND;
783
+ }
784
+ }
785
+ function paymentsRoute(rest) {
786
+ const [what, id, ...extra] = rest;
787
+ if (what === void 0) return { page: "payments" };
788
+ if (extra.length > 0) return NOT_FOUND;
789
+ if (what === "orders") {
790
+ const orderId = parseOrderId(id);
791
+ return orderId.ok ? {
792
+ page: "order",
793
+ orderId: orderId.value
794
+ } : NOT_FOUND;
795
+ }
796
+ if (what === "receipts") {
797
+ const receiptId = parseOrderPaymentReceiptId(id);
798
+ return receiptId.ok ? {
799
+ page: "receipt",
800
+ receiptId: receiptId.value
801
+ } : NOT_FOUND;
802
+ }
803
+ return NOT_FOUND;
804
+ }
805
+ function downloadsRoute(rest) {
806
+ const [id, files, asset, ...extra] = rest;
807
+ if (id === void 0) return { page: "downloads" };
808
+ const entitlementId = parseEntitlementId(id);
809
+ if (!entitlementId.ok || extra.length > 0) return NOT_FOUND;
810
+ if (files === void 0) return {
811
+ page: "download",
812
+ entitlementId: entitlementId.value
813
+ };
814
+ const assetId = parseMediaAssetId(asset);
815
+ return files === "files" && assetId.ok ? {
816
+ page: "download_file",
817
+ entitlementId: entitlementId.value,
818
+ assetId: assetId.value
819
+ } : NOT_FOUND;
820
+ }
821
+ /**
822
+ * `/portal?…` as emails and pages wrote it before the portal had paths. A task
823
+ * link wins, then an order, then a tab; a part that doesn't parse is ignored,
824
+ * as the old portal ignored it. Coming back from paying lands on payments.
825
+ */
826
+ function legacyQueryRoute(params, checkout) {
827
+ return legacyTaskRoute(cleanParam(params, "portal_task")) ?? legacyOrderRoute(cleanParam(params, "portal_order")) ?? legacyTabRoute(cleanParam(params, "portal_tab")) ?? (checkout ? { page: "payments" } : null);
828
+ }
829
+ /** `portal_task` named the questions task of a booking, or a waitlist offer. */
830
+ const LEGACY_TASK_KINDS = /* @__PURE__ */ new Map([
831
+ ["appointment", "appointment"],
832
+ ["event", "event"],
833
+ ["event_series_registration", "course"]
834
+ ]);
835
+ function legacyTaskRoute(value) {
836
+ const [kind, id, ...rest] = value?.split(":") ?? [];
837
+ if (!kind || !id || rest.length > 0) return null;
838
+ if (kind === "waitlist") {
839
+ const entryId = parseWaitlistEntryId(id);
840
+ return entryId.ok ? {
841
+ page: "waitlist_offer",
842
+ entryId: entryId.value
843
+ } : null;
844
+ }
845
+ const bookingKind = LEGACY_TASK_KINDS.get(kind);
846
+ const ref = bookingKind ? parseBookingRef(bookingKind, id) : null;
847
+ return ref ? {
848
+ page: "booking_questions",
849
+ ref
850
+ } : null;
851
+ }
852
+ function legacyOrderRoute(value) {
853
+ if (value === null) return null;
854
+ const orderId = parseOrderId(value);
855
+ return orderId.ok ? {
856
+ page: "order",
857
+ orderId: orderId.value
858
+ } : { page: "payments" };
859
+ }
860
+ const LEGACY_TABS = /* @__PURE__ */ new Map([
861
+ ["events", { page: "bookings" }],
862
+ ["appointments", { page: "bookings" }],
863
+ ["orders", { page: "payments" }],
864
+ ["digital-products", { page: "downloads" }],
865
+ ["passes-memberships", { page: "passes" }],
866
+ ["credit", { page: "passes" }],
867
+ ["profile", { page: "details" }]
868
+ ]);
869
+ function legacyTabRoute(value) {
870
+ return value === null ? null : LEGACY_TABS.get(value) ?? null;
871
+ }
872
+ //#endregion
873
+ export { withPortalArrival as a, portalBookingViewSchema as c, portalWaitlistOfferPriceSchema as d, unsafeAsCustomerPassId as f, parseOrderPaymentReceiptId as h, portalPath as i, portalBookingsResponseSchema as l, parseOrderId as m, isServerPortalTarget as n, portalBookingPath as o, unsafeAsPassId as p, parsePortalLocation as r, portalBookingResponseSchema as s, CUSTOMER_PORTAL_PATH as t, portalRegularSessionsResponseSchema as u };