@riverbankcms/sdk 0.155.0 → 0.156.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 (216) hide show
  1. package/dist/{PreviewEditorSidebar-CbSbqmz3.mjs → PreviewEditorSidebar-B4ESNPzL.mjs} +3 -3
  2. package/dist/{PreviewEditorUI-CKKnAw11.mjs → PreviewEditorUI-BdUVaGOh.mjs} +3 -3
  3. package/dist/{SdkPreviewModeRuntime-wLkXrWy9.mjs → SdkPreviewModeRuntime-C4V3BvxK.mjs} +1122 -1079
  4. package/dist/{SiteChromeCustomizeContext-BQ8vvKb-.mjs → SiteChromeCustomizeContext-3gmd26Mn.mjs} +1019 -517
  5. package/dist/_dts/ai/src/contracts/proposals.d.ts +624 -624
  6. package/dist/_dts/ai/src/contracts/siteStyleProposalSchemas.d.ts +856 -856
  7. package/dist/_dts/api/src/accountApi.d.ts +5 -5
  8. package/dist/_dts/api/src/aiPlayground.d.ts +2 -2
  9. package/dist/_dts/api/src/bookingRecords.d.ts +2 -22
  10. package/dist/_dts/api/src/commercePortalEndpoints.d.ts +1 -1
  11. package/dist/_dts/api/src/contentRuntime.d.ts +5 -2
  12. package/dist/_dts/api/src/footerCompositionContracts.d.ts +1 -1
  13. package/dist/_dts/api/src/navigation/linkValue.d.ts +1 -1
  14. package/dist/_dts/api/src/navigation/types.d.ts +1 -1
  15. package/dist/_dts/api/src/public/types.d.ts +2 -1
  16. package/dist/_dts/api/src/publicExperience/commerceEndpoints.d.ts +1 -1
  17. package/dist/_dts/api/src/publicExperience/eventEndpoints.d.ts +3 -3
  18. package/dist/_dts/api/src/publicExperience/siteEndpoints.d.ts +1 -1
  19. package/dist/_dts/api/src/sdkBlockContentAdmission.d.ts +1 -1
  20. package/dist/_dts/api/src/sdkConfig/contracts.d.ts +2 -1
  21. package/dist/_dts/api/src/sdkContracts.d.ts +2 -1
  22. package/dist/_dts/api/src/sdkPageDesign.d.ts +9 -9
  23. package/dist/_dts/api/src/sdkThemeWire.d.ts +182 -182
  24. package/dist/_dts/api/src/siteOnboarding.d.ts +1 -1
  25. package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +3 -1
  26. package/dist/_dts/api/src/siteSettings.d.ts +2 -2
  27. package/dist/_dts/api/src/teamMembers.d.ts +1 -1
  28. package/dist/_dts/block-form/src/widgets/RepeaterField/hooks/useLayoutGridMoveAnimation.d.ts +13 -0
  29. package/dist/_dts/blocks/src/client/portal.d.ts +5 -0
  30. package/dist/_dts/blocks/src/contracts/event-registration.d.ts +141 -0
  31. package/dist/_dts/blocks/src/contracts/events.d.ts +21 -0
  32. package/dist/_dts/blocks/src/contracts/footer.d.ts +130 -0
  33. package/dist/_dts/blocks/src/contracts/non-block-islands.d.ts +1 -1
  34. package/dist/_dts/blocks/src/contracts/site-chrome.d.ts +10 -0
  35. package/dist/_dts/blocks/src/customer-portal/client.d.ts +62 -0
  36. package/dist/_dts/blocks/src/customer-portal/components/PortalLoginForm.d.ts +16 -0
  37. package/dist/_dts/blocks/src/customer-portal/components/badge.d.ts +6 -0
  38. package/dist/_dts/blocks/src/customer-portal/components/bookings/AppointmentBeforeYouComeTask.d.ts +29 -0
  39. package/dist/_dts/blocks/src/customer-portal/components/bookings/BookingsSection.d.ts +22 -0
  40. package/dist/_dts/blocks/src/customer-portal/components/bookings/BookingsTable.d.ts +9 -0
  41. package/dist/_dts/blocks/src/customer-portal/components/bookings/EventRow.d.ts +9 -0
  42. package/dist/_dts/blocks/src/customer-portal/components/bookings/EventSeriesRegistrationRow.d.ts +8 -0
  43. package/dist/_dts/blocks/src/customer-portal/components/bookings/EventSeriesRegistrationTableRow.d.ts +22 -0
  44. package/dist/_dts/blocks/src/customer-portal/components/bookings/PortalAppointmentRescheduleFlow.d.ts +7 -0
  45. package/dist/_dts/blocks/src/customer-portal/components/bookings/ScalarQuestionInput.d.ts +11 -0
  46. package/dist/_dts/blocks/src/customer-portal/components/bookings/WaitlistCard.d.ts +8 -0
  47. package/dist/_dts/blocks/src/customer-portal/components/bookings/WaitlistsSection.d.ts +19 -0
  48. package/dist/_dts/blocks/src/customer-portal/components/bookings/bookingsTypes.d.ts +11 -0
  49. package/dist/_dts/blocks/src/customer-portal/components/bookings/eventGuestDrafts.d.ts +6 -0
  50. package/dist/_dts/blocks/src/customer-portal/components/bookings/eventSeriesRegistrationPresentation.d.ts +8 -0
  51. package/dist/_dts/blocks/src/customer-portal/components/bookings/usePortalCancelFlow.d.ts +36 -0
  52. package/dist/_dts/blocks/src/customer-portal/components/bookings/usePortalCancelFlow.state.d.ts +43 -0
  53. package/dist/_dts/blocks/src/customer-portal/components/orders/OrdersSection.d.ts +8 -0
  54. package/dist/_dts/blocks/src/customer-portal/components/orders/orderInteraction.d.ts +63 -0
  55. package/dist/_dts/blocks/src/customer-portal/components/portal-modal.d.ts +8 -0
  56. package/dist/_dts/blocks/src/customer-portal/components/portalDeepLink.d.ts +19 -0
  57. package/dist/_dts/blocks/src/customer-portal/components/useMembershipCancelFlow.d.ts +13 -0
  58. package/dist/_dts/blocks/src/customer-portal/components/useMembershipCancelFlow.state.d.ts +32 -0
  59. package/dist/_dts/blocks/src/customer-portal/pages/AccessState.d.ts +11 -0
  60. package/dist/_dts/blocks/src/customer-portal/pages/DigitalProductView.d.ts +4 -0
  61. package/dist/_dts/blocks/src/customer-portal/pages/PageChrome.d.ts +9 -0
  62. package/dist/_dts/blocks/src/customer-portal/pages/PrintButton.d.ts +1 -0
  63. package/dist/_dts/blocks/src/customer-portal/pages/TicketCode.d.ts +3 -0
  64. package/dist/_dts/blocks/src/customer-portal/pages/TicketView.d.ts +4 -0
  65. package/dist/_dts/blocks/src/customer-portal/route-client.d.ts +9 -0
  66. package/dist/_dts/blocks/src/customer-portal/shared/bookingRoute.d.ts +9 -0
  67. package/dist/_dts/blocks/src/customer-portal/shared/checkoutUrls.d.ts +4 -0
  68. package/dist/_dts/blocks/src/customer-portal/shared/signedUrlUpload.d.ts +1 -0
  69. package/dist/_dts/blocks/src/customer-portal/shared/urlParams.d.ts +30 -0
  70. package/dist/_dts/blocks/src/customer-portal/state.d.ts +196 -0
  71. package/dist/_dts/blocks/src/customer-portal/tabs.d.ts +17 -0
  72. package/dist/_dts/blocks/src/portal/dateFormatting.d.ts +13 -0
  73. package/dist/_dts/blocks/src/portal/types.d.ts +7 -14
  74. package/dist/_dts/blocks/src/system/blocks/event-details.d.ts +1 -25
  75. package/dist/_dts/blocks/src/system/blocks/event-registration.d.ts +1 -141
  76. package/dist/_dts/blocks/src/system/blocks/events/eventSelectionFields.d.ts +3 -3
  77. package/dist/_dts/blocks/src/system/blocks/location-map.d.ts +3 -3
  78. package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +135 -135
  79. package/dist/_dts/blocks/src/system/blocks/site-footer-runtime.d.ts +3 -129
  80. package/dist/_dts/blocks/src/system/blocks/site-footer.d.ts +2 -5
  81. package/dist/_dts/blocks/src/system/blocks/site-header.d.ts +2 -5
  82. package/dist/_dts/blocks/src/system/constants/events.d.ts +1 -1
  83. package/dist/_dts/blocks/src/system/customize/facets.d.ts +2 -2
  84. package/dist/_dts/blocks/src/system/manifest/schema.d.ts +82 -82
  85. package/dist/_dts/blocks/src/system/node/fragments/lookSlot.d.ts +2 -2
  86. package/dist/_dts/blocks/src/system/node/schema.d.ts +1 -1
  87. package/dist/_dts/blocks/src/system/runtime/api/client.d.ts +21 -2
  88. package/dist/_dts/blocks/src/system/runtime/api/endpoints.d.ts +87 -3
  89. package/dist/_dts/blocks/src/system/runtime/api/index.d.ts +1 -1
  90. package/dist/_dts/blocks/src/system/runtime/api/schemas/events.d.ts +1 -1
  91. package/dist/_dts/blocks/src/system/runtime/api/types/events.d.ts +1 -1
  92. package/dist/_dts/blocks/src/system/runtime/api/types/portal.d.ts +16 -27
  93. package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +6 -6
  94. package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +4 -4
  95. package/dist/_dts/blocks/src/system/runtime/hooks/useAvailableDates.d.ts +2 -5
  96. package/dist/_dts/blocks/src/system/runtime/hooks/useAvailableSlots.d.ts +2 -5
  97. package/dist/_dts/blocks/src/system/runtime/lookSurfaces.d.ts +9 -9
  98. package/dist/_dts/blocks/src/system/runtime/nodes/event-details/lookPresentation.d.ts +9 -9
  99. package/dist/_dts/blocks/src/system/runtime/nodes/event-details/presentation.d.ts +2 -2
  100. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +2 -2
  101. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCollectionContract.d.ts +18 -18
  102. package/dist/_dts/blocks/src/system/runtime/nodes/form.interactive.d.ts +2 -10
  103. package/dist/_dts/blocks/src/system/runtime/nodes/form.types.d.ts +10 -0
  104. package/dist/_dts/blocks/src/system/runtime/nodes/shared/contract-schemas.d.ts +1 -1
  105. package/dist/_dts/blocks/src/system/runtime/shared/AppointmentRescheduleSlotOptions.d.ts +11 -0
  106. package/dist/_dts/blocks/src/system/runtime/shared/useAppointmentRescheduleFlow.d.ts +73 -0
  107. package/dist/_dts/blocks/src/system/runtime/shared/useAppointmentRescheduleFlow.state.d.ts +62 -0
  108. package/dist/_dts/blocks/src/system/runtime/shared/utils/demoPortalMagicLink.d.ts +1 -4
  109. package/dist/_dts/commerce/src/moneyDateUtils.d.ts +7 -0
  110. package/dist/_dts/core/src/booking-date-time.d.ts +5 -1
  111. package/dist/_dts/core/src/date-display.d.ts +4 -0
  112. package/dist/_dts/core/src/navigation-portal-labels.d.ts +1 -1
  113. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +13 -0
  114. package/dist/_dts/db/src/schemas/forms.d.ts +4 -4
  115. package/dist/_dts/preview-next/src/client/preview/PreviewEditingModeProvider.d.ts +7 -0
  116. package/dist/_dts/sdk/src/bookings/types.d.ts +0 -1
  117. package/dist/_dts/sdk/src/next/index.d.ts +1 -0
  118. package/dist/_dts/sdk/src/next/portal.d.ts +41 -0
  119. package/dist/_dts/sdk/src/next/resolveTheme.d.ts +4 -9
  120. package/dist/_dts/sdk/src/next/types.d.ts +8 -3
  121. package/dist/_dts/sdk/src/portal/client.d.ts +1 -0
  122. package/dist/_dts/sdk/src/portal/index.d.ts +4 -36
  123. package/dist/_dts/sdk/src/portal/token.d.ts +4 -20
  124. package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +4 -1
  125. package/dist/_dts/sdk/src/rendering/islands/types.d.ts +1 -28
  126. package/dist/_dts/sdk/src/version.d.ts +1 -1
  127. package/dist/_dts/theme-core/src/accordions/types.d.ts +4 -4
  128. package/dist/_dts/theme-core/src/buttons/types.d.ts +41 -41
  129. package/dist/_dts/theme-core/src/buttons/typography.d.ts +2 -2
  130. package/dist/_dts/theme-core/src/cards/types.d.ts +34 -34
  131. package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
  132. package/dist/_dts/theme-core/src/header/containerSchema.d.ts +2 -2
  133. package/dist/_dts/theme-core/src/hosted-booking-appearance.d.ts +1 -1
  134. package/dist/_dts/theme-core/src/inputs/types.d.ts +4 -4
  135. package/dist/_dts/theme-core/src/mock-themes/all.d.ts +255 -255
  136. package/dist/_dts/theme-core/src/navigation/types.d.ts +6 -6
  137. package/dist/_dts/theme-core/src/palette/colors.d.ts +1 -1
  138. package/dist/_dts/theme-core/src/palette/curated/types.d.ts +2 -2
  139. package/dist/_dts/theme-core/src/schema.d.ts +294 -294
  140. package/dist/_dts/theme-core/src/shared/componentStyles.d.ts +1 -1
  141. package/dist/_dts/theme-core/src/site-styles/backgroundAppearance.d.ts +2 -2
  142. package/dist/_dts/theme-core/src/site-styles/compileFooterAgainstRow.d.ts +7 -7
  143. package/dist/_dts/theme-core/src/site-styles/headerPreferencesPersistence.d.ts +1 -1
  144. package/dist/_dts/theme-core/src/site-styles/pageDesignIntent.d.ts +12 -12
  145. package/dist/_dts/theme-core/src/tokens/themeColorTokens.d.ts +2 -2
  146. package/dist/_dts/theme-core/src/typography/schema.d.ts +27 -27
  147. package/dist/_dts/ui/src/button.d.ts +1 -1
  148. package/dist/_dts/ui/src/surface.d.ts +2 -2
  149. package/dist/_dts/ui/src/toggle.d.ts +2 -2
  150. package/dist/client/{BookingMailingListNote-CiW1dsz7.mjs → BookingMailingListNote-B9mP3Io9.mjs} +2 -2
  151. package/dist/client/{CardListItem-DVYTlYpS.mjs → CardListItem-D5rL2wPv.mjs} +3 -3
  152. package/dist/client/{CheckboxChoice-CUnPrBlC.mjs → CheckboxChoice-Bz6wLaBl.mjs} +1 -1
  153. package/dist/client/{DemoBookingPortalAccess-DEsn5F2C.mjs → DemoBookingPortalAccess-7BPVzfLU.mjs} +6 -10
  154. package/dist/client/{EventCombined.client-BdctbwnV.mjs → EventCombined.client-DZH5qHJl.mjs} +5 -5
  155. package/dist/client/{EventEmbeddedCheckoutStep-DAhQs6Jb.mjs → EventEmbeddedCheckoutStep-CV31Qvn2.mjs} +2 -2
  156. package/dist/client/{EventListing.client-BviZXfAE.mjs → EventListing.client-C19sjRGF.mjs} +2 -2
  157. package/dist/client/{LeafletStaticMap-BLTECfjU.mjs → LeafletStaticMap-DjUjYdzQ.mjs} +1 -1
  158. package/dist/client/{RichText-D3oE1_pw.mjs → RichText-DkKcVZwr.mjs} +2 -2
  159. package/dist/client/{ThemedButton-Ckj0Rfr_.mjs → ThemedButton-CTgpAXfL.mjs} +1 -1
  160. package/dist/client/{accordion-yBx6d4O2.mjs → accordion-R2-q5wo-.mjs} +1 -1
  161. package/dist/client/{bookingForm-CPDEsQci.mjs → bookingForm-VSU8nIdO.mjs} +12 -16
  162. package/dist/client/bookings.mjs +352 -64
  163. package/dist/client/{carousel-DCqjwd2s.mjs → carousel-BjPlY4ee.mjs} +2 -2
  164. package/dist/client/{carousel.client-Bx7XMF8-.mjs → carousel.client-Tnwvm0l1.mjs} +1 -1
  165. package/dist/client/{cart-DWJXrQxs.mjs → cart-DAPYTOP7.mjs} +3 -3
  166. package/dist/client/{checkout-CH4ypSLS.mjs → checkout-DGJTx4vB.mjs} +3 -3
  167. package/dist/client/client.mjs +61275 -61217
  168. package/dist/client/{context-BOs0m_iw.mjs → context-ByZBoKdq.mjs} +92 -209
  169. package/dist/client/{eventCalendar-CRylMllc.mjs → eventCalendar-CP5Z7iME.mjs} +8 -8
  170. package/dist/client/{eventCombined-DohTS3kp.mjs → eventCombined-D8nbUyxu.mjs} +4 -4
  171. package/dist/client/{eventDetails-qf-u9zcF.mjs → eventDetails-Bknq8k7E.mjs} +46 -44
  172. package/dist/client/{eventListing-Cg__X2vy.mjs → eventListing-BwMnPteX.mjs} +4 -4
  173. package/dist/client/{eventRegistration-CybWxswy.mjs → eventRegistration-COFk1mjw.mjs} +11 -11
  174. package/dist/client/{form-C-SGk6nq.mjs → form-BiWLd_me.mjs} +5 -5
  175. package/dist/client/{headerSection-BdzPaHqo.mjs → headerSection-BptDP4xF.mjs} +3 -3
  176. package/dist/client/hooks.mjs +22850 -22861
  177. package/dist/client/{locationMap-CEwIKmMb.mjs → locationMap-B-kPoqcK.mjs} +3 -3
  178. package/dist/client/{media-V_ShXXru.mjs → media-FjqQK4qS.mjs} +68 -1
  179. package/dist/client/{newsletterForm-CmwTltoS.mjs → newsletterForm-s_B8fCtT.mjs} +4 -4
  180. package/dist/client/portal/client.mjs +17419 -0
  181. package/dist/client/{productDetail-DjIzUwg3.mjs → productDetail-CS3GZMPi.mjs} +3 -3
  182. package/dist/client/{productList-D6JGFnMF.mjs → productList-Csc3WJDs.mjs} +3 -3
  183. package/dist/client/{propsDecoder-BRKz13eg.mjs → propsDecoder-Dn68GoQZ.mjs} +502 -2705
  184. package/dist/client/rendering/client.mjs +3303 -3612
  185. package/dist/client/rendering/islands.mjs +17 -17
  186. package/dist/client/rendering.mjs +46273 -46220
  187. package/dist/client/{routeIslandApiConfig-slAAILQ5.mjs → routeIslandApiConfig-DeBuevOO.mjs} +1 -1
  188. package/dist/client/{shop-C45K96_0.mjs → shop-B5EQbeUX.mjs} +7 -7
  189. package/dist/client/{shop-commerce-oGBiKT5d.mjs → shop-commerce-DYs7PdNL.mjs} +8 -8
  190. package/dist/client/{shop-commerce-store-H_HFPFZ8.mjs → shop-commerce-store-B2-DIPbg.mjs} +1 -1
  191. package/dist/client/{shopShared-D54T_LAV.mjs → shopShared-CE302Pfy.mjs} +4 -4
  192. package/dist/client/{useDiscountCodeUi-Dm2EUa03.mjs → useDiscountCodeUi-BZ02FBrV.mjs} +1 -1
  193. package/dist/client/{useEventPagination-0l_A8CxG.mjs → useEventPagination-VudQWKtG.mjs} +116 -6
  194. package/dist/preview-next/client/runtime.mjs +3 -3
  195. package/dist/{sdk-runtime-CjTM32Ah.mjs → sdk-runtime-C8Qh6r51.mjs} +1 -1
  196. package/dist/server/components.mjs +927 -262
  197. package/dist/server/config-template-validation.mjs +5 -3
  198. package/dist/server/config-validation.mjs +35200 -35211
  199. package/dist/server/config.mjs +35200 -35211
  200. package/dist/server/data.mjs +32783 -32794
  201. package/dist/server/date-time.mjs +14 -7
  202. package/dist/server/index.mjs +1 -1
  203. package/dist/server/navigation.mjs +1 -1
  204. package/dist/server/next.mjs +71470 -70677
  205. package/dist/server/page-converter.mjs +202 -213
  206. package/dist/server/portal.mjs +5 -51
  207. package/dist/server/prebuild.mjs +1 -1
  208. package/dist/server/rendering/server.mjs +1180 -722
  209. package/dist/server/rendering.mjs +922 -262
  210. package/dist/server/routing.mjs +39382 -41704
  211. package/dist/server/server.mjs +203 -214
  212. package/dist/server/theme-bridge.mjs +262 -2
  213. package/dist/{spinner-KVVZh8jd.mjs → spinner-Bi68Z_0o.mjs} +1 -1
  214. package/dist/styles/index.css +258 -2
  215. package/package.json +9 -1
  216. package/dist/_dts/sdk/src/portal/config.d.ts +0 -67
@@ -704,6 +704,13 @@ function getDateTimeFormatter(locale, timeZone, format) {
704
704
  dateTimeFormatterCache.set(key, formatter);
705
705
  return formatter;
706
706
  }
707
+ function formatIntlRange(formatter, start, end) {
708
+ const nativeFormatRange = Reflect.get(formatter, "formatRange");
709
+ if (typeof nativeFormatRange !== "function") throw new Error("Intl.DateTimeFormat.formatRange is required");
710
+ const output = Reflect.apply(nativeFormatRange, formatter, [start, end]);
711
+ if (typeof output !== "string") throw new Error("Intl.DateTimeFormat.formatRange returned a non-string value");
712
+ return output;
713
+ }
707
714
  var FORMATTER_CACHE_LIMIT$1, dateTimeFormatterCache;
708
715
  var init_date_time_formatter = __esmMin((() => {
709
716
  FORMATTER_CACHE_LIMIT$1 = 100;
@@ -793,6 +800,9 @@ function resolveBookingTimeZoneId(...candidates) {
793
800
  }
794
801
  return FALLBACK_TIMEZONE;
795
802
  }
803
+ function resolveBookingBusinessTimeZone(value) {
804
+ return resolveBookingTimeZoneId(value, DEFAULT_BOOKING_BUSINESS_TIME_ZONE);
805
+ }
796
806
  function parseUtcIsoDateTimeString(value) {
797
807
  const normalized = value.trim();
798
808
  const hasUtcSuffix = normalized.endsWith("Z");
@@ -900,6 +910,34 @@ function formatBookingTime(input, format = {
900
910
  format
901
911
  });
902
912
  }
913
+ /**
914
+ * Formats the compact English event-time presentation used by public surfaces.
915
+ *
916
+ * This intentionally owns the lowercase day-period token and zero-minute
917
+ * omission instead of depending on locale-specific spacing or punctuation.
918
+ * Callers must only use it for an English presentation contract.
919
+ */
920
+ function formatBookingCompactEnglishTime(input, options = {}) {
921
+ const date = new Date(input.startsAt);
922
+ if (Number.isNaN(date.getTime())) return input.startsAt;
923
+ return compactEnglishClock(formatToPartsLookup(date, input.locale ?? "en-GB", input.timeZone, {
924
+ hour: "numeric",
925
+ minute: "2-digit",
926
+ hourCycle: "h12",
927
+ ...options.seconds === "include" ? { second: "2-digit" } : {}
928
+ }), options.seconds) ?? input.startsAt;
929
+ }
930
+ /** Precision and zero-minute omission are one decision for all compact clocks. */
931
+ function compactEnglishClock(parts, seconds) {
932
+ const hour = parts.get("hour");
933
+ const minute = parts.get("minute");
934
+ const dayPeriod = parts.get("dayPeriod");
935
+ const second = parts.get("second");
936
+ if (hour === void 0 || minute === void 0 || dayPeriod === void 0) return null;
937
+ const token = dayPeriod.toLowerCase();
938
+ if (seconds === "include") return second === void 0 ? null : `${hour}:${minute}:${second}${token}`;
939
+ return `${minute === "00" ? hour : `${hour}:${minute}`}${token}`;
940
+ }
903
941
  function formatBookingDateParts(input, options) {
904
942
  return {
905
943
  date: formatBookingDate(input, options?.dateFormat ?? {
@@ -1017,7 +1055,7 @@ function localScheduleDateTimeToUtcDate(localDate, localTime, timeZone) {
1017
1055
  }
1018
1056
  return new Date(guess);
1019
1057
  }
1020
- var DEFAULT_LOCALE$1, FALLBACK_TIMEZONE, START_OF_DAY, LOCAL_DATE_PATTERN;
1058
+ var DEFAULT_LOCALE$1, FALLBACK_TIMEZONE, START_OF_DAY, LOCAL_DATE_PATTERN, DEFAULT_BOOKING_BUSINESS_TIME_ZONE;
1021
1059
  var init_booking_date_time = __esmMin((() => {
1022
1060
  init_date_time_formatter();
1023
1061
  init_result$1();
@@ -1030,6 +1068,7 @@ var init_booking_date_time = __esmMin((() => {
1030
1068
  second: 0
1031
1069
  };
1032
1070
  LOCAL_DATE_PATTERN = /^(?<year>\d{4})-(?<month>\d{2})-(?<day>\d{2})$/u;
1071
+ DEFAULT_BOOKING_BUSINESS_TIME_ZONE = "Europe/London";
1033
1072
  }));
1034
1073
  //#endregion
1035
1074
  //#region ../core/src/date-display.ts
@@ -1042,6 +1081,173 @@ function inferSiteDateLocale(siteTimeZone) {
1042
1081
  if (siteTimeZone === "Pacific/Auckland" || siteTimeZone === "Pacific/Chatham") return "en-NZ";
1043
1082
  return "en-US";
1044
1083
  }
1084
+ function formatDate$4(value, context, options = {}) {
1085
+ return presentDate(value, context, displayProfile(options, "omit"));
1086
+ }
1087
+ function formatDateRange(start, endInclusive, context, options = {}) {
1088
+ const first = {
1089
+ kind: "civil",
1090
+ value: projectDate(start, context)
1091
+ };
1092
+ const last = {
1093
+ kind: "civil",
1094
+ value: projectDate(endInclusive, context)
1095
+ };
1096
+ const preserveOrder = options.order === "session" && compareLocalScheduleDates(first.value, last.value) > 0;
1097
+ const profile = displayProfile(preserveOrder ? {
1098
+ ...options,
1099
+ year: "numeric"
1100
+ } : options, "omit");
1101
+ return preserveOrder ? `${presentDate(first, context, profile)} – ${presentDate(last, context, profile)}` : presentDateRange(first, last, context, profile);
1102
+ }
1103
+ function formatDateTimeRange(span, context, options) {
1104
+ return presentDateTimeRange(span, context, displayProfile(options, options.zone, options.seconds));
1105
+ }
1106
+ /** Sole date projection/typography owner, used by display and scheduled adapters. */
1107
+ function presentDate(value, context, profile) {
1108
+ const date = dateCarrier(value);
1109
+ const zone = value.kind === "civil" ? "UTC" : context.timeZone;
1110
+ const output = getDateTimeFormatter(context.locale, zone, profile.dateFormat).format(date);
1111
+ if (profile.kind === "sdk") return output;
1112
+ const normalized = normalizeDisplay(output);
1113
+ return profile.dateFormat.weekday && new Intl.Locale(context.locale).language === "en" ? normalized.replace(/^([^,]+), /u, "$1 ") : normalized;
1114
+ }
1115
+ function presentDateRange(start, end, context, profile) {
1116
+ if (dateCarrier(end).getTime() < dateCarrier(start).getTime()) throw new RangeError("Date range end must be on or after its start");
1117
+ if (profile.kind === "display" && compareLocalScheduleDates(projectDate(start, context), projectDate(end, context)) === 0) return presentDate(start, context, profile);
1118
+ const output = formatIntlRange(getDateTimeFormatter(context.locale, start.kind === "civil" ? "UTC" : context.timeZone, profile.dateFormat), dateCarrier(start), dateCarrier(end));
1119
+ if (profile.kind === "sdk") return output;
1120
+ const startDate = projectDate(start, context);
1121
+ const endDate = projectDate(end, context);
1122
+ const separator = startDate.month === endDate.month && startDate.year === endDate.year ? "–" : " – ";
1123
+ return normalizeDisplay(output).replace(/\s*–\s*/gu, separator);
1124
+ }
1125
+ function presentTime(value, context, profile) {
1126
+ const clock = presentClock(value, context, profile.clock);
1127
+ return profile.zone === "always" ? `${clock} ${zoneLabel(value, context)}` : clock;
1128
+ }
1129
+ function presentTimeRange(span, context, profile) {
1130
+ assertOrdered(span.start, span.end);
1131
+ if (profile.clock.kind === "intl") return presentNativeRange(span, context, profile.clock.format);
1132
+ const startClock = presentClock(span.start, context, profile.clock);
1133
+ const endClock = presentClock(span.end, context, profile.clock);
1134
+ const clocks = (profile.kind === "sdk" ? startClock === endClock : span.start === span.end) ? startClock : `${startClock}–${endClock}`;
1135
+ const labels = decideRangeLabels(span, context, profile);
1136
+ switch (labels.kind) {
1137
+ case "omit": return clocks;
1138
+ case "shared": return `${clocks} ${labels.label}`;
1139
+ case "endpoints": return `${startClock} ${labels.start} – ${endClock} ${labels.end}`;
1140
+ }
1141
+ }
1142
+ function presentDateTimeRange(span, context, profile) {
1143
+ assertOrdered(span.start, span.end);
1144
+ if (profile.clock.kind === "intl") return presentNativeRange(span, context, combinedFormat(profile.dateFormat, profile.clock));
1145
+ const startDate = getLocalScheduleDate(new Date(span.start), context.timeZone);
1146
+ const endDate = getLocalScheduleDate(new Date(span.end), context.timeZone);
1147
+ if (compareLocalScheduleDates(startDate, endDate) === 0) return `${presentDate({
1148
+ kind: "instant",
1149
+ value: span.start
1150
+ }, context, profile)}, ${presentTimeRange(span, context, profile)}`;
1151
+ const labels = decideRangeLabels(span, context, profile);
1152
+ const startProfile = profile.kind === "display" && startDate.year === endDate.year ? {
1153
+ ...profile,
1154
+ dateFormat: {
1155
+ ...profile.dateFormat,
1156
+ year: void 0
1157
+ }
1158
+ } : profile;
1159
+ const start = presentRangeEndpoint(span.start, context, startProfile, labels.kind === "endpoints" ? labels.start : void 0);
1160
+ const end = presentRangeEndpoint(span.end, context, profile, labels.kind === "endpoints" ? labels.end : void 0);
1161
+ const separator = profile.kind === "sdk" ? "–" : " – ";
1162
+ return profile.kind === "sdk" && start === end ? start : `${start}${separator}${end}`;
1163
+ }
1164
+ /** Offset changes override ordinary venue omission for the approved display profile. */
1165
+ function decideRangeLabels(span, context, profile) {
1166
+ if (profile.kind === "sdk") return { kind: "omit" };
1167
+ const offsetsDiffer = offsetToken(span.start, context) !== offsetToken(span.end, context);
1168
+ if (!offsetsDiffer && profile.zone === "omit") return { kind: "omit" };
1169
+ const start = zoneLabel(span.start, context);
1170
+ const end = zoneLabel(span.end, context);
1171
+ return offsetsDiffer || start !== end ? {
1172
+ kind: "endpoints",
1173
+ start,
1174
+ end
1175
+ } : {
1176
+ kind: "shared",
1177
+ label: start
1178
+ };
1179
+ }
1180
+ function presentRangeEndpoint(value, context, profile, label) {
1181
+ return `${presentDate({
1182
+ kind: "instant",
1183
+ value
1184
+ }, context, profile)}, ${label === void 0 ? presentTime(value, context, profile) : `${presentClock(value, context, profile.clock)} ${label}`}`;
1185
+ }
1186
+ function presentNativeRange(span, context, format) {
1187
+ return formatIntlRange(getDateTimeFormatter(context.locale, context.timeZone, format), new Date(span.start), new Date(span.end));
1188
+ }
1189
+ function combinedFormat(date, clock) {
1190
+ return {
1191
+ ...date,
1192
+ ...clock.format
1193
+ };
1194
+ }
1195
+ function displayProfile(options, zone, seconds) {
1196
+ return {
1197
+ kind: "display",
1198
+ dateFormat: dateFormat(options),
1199
+ clock: {
1200
+ kind: "compact",
1201
+ localeSource: "product",
1202
+ seconds
1203
+ },
1204
+ zone
1205
+ };
1206
+ }
1207
+ function dateCarrier(value) {
1208
+ return value.kind === "civil" ? civilCarrier(value.value) : new Date(value.value);
1209
+ }
1210
+ function presentClock(value, context, clock) {
1211
+ return clock.kind === "compact" ? formatBookingCompactEnglishTime({
1212
+ startsAt: value,
1213
+ timeZone: context.timeZone,
1214
+ locale: clock.localeSource === "product" ? "en-GB" : context.locale
1215
+ }, { seconds: clock.seconds }) : getDateTimeFormatter(context.locale, context.timeZone, clock.format).format(new Date(value));
1216
+ }
1217
+ function offsetToken(value, context) {
1218
+ return getDateTimeFormatter("en-GB", context.timeZone, { timeZoneName: "longOffset" }).formatToParts(new Date(value)).find((part) => part.type === "timeZoneName")?.value ?? "";
1219
+ }
1220
+ function dateFormat(options) {
1221
+ const style = options.date ?? "long";
1222
+ return {
1223
+ day: style === "omit" || options.day === "omit" ? void 0 : style === "numeric" ? "2-digit" : "numeric",
1224
+ month: style === "omit" ? void 0 : style === "numeric" ? "2-digit" : style,
1225
+ ...options.year === "omit" ? {} : { year: "numeric" },
1226
+ ...options.weekday ? { weekday: options.weekday } : {}
1227
+ };
1228
+ }
1229
+ function civilCarrier(value) {
1230
+ return new Date(Date.UTC(value.year, value.month - 1, value.day, 12));
1231
+ }
1232
+ function projectDate(value, context) {
1233
+ return value.kind === "civil" ? value.value : getLocalScheduleDate(new Date(value.value), context.timeZone);
1234
+ }
1235
+ function normalizeDisplay(value) {
1236
+ return value.replace(/[\u00a0\u202f]/gu, " ");
1237
+ }
1238
+ function zoneToken(value, context, locale) {
1239
+ return getDateTimeFormatter(locale, context.timeZone, { timeZoneName: "short" }).formatToParts(new Date(value)).find((part) => part.type === "timeZoneName")?.value ?? "";
1240
+ }
1241
+ function zoneLabel(value, context) {
1242
+ return [zoneToken(value, context, "en-GB"), zoneToken(value, context, "en-US")].find((token) => /^[A-Z]{2,6}$/u.test(token)) ?? formatTimeZoneCityLabel(context.timeZone);
1243
+ }
1244
+ function assertOrdered(start, end) {
1245
+ if (new Date(end).getTime() < new Date(start).getTime()) throw new RangeError("Date/time range end must be on or after its start");
1246
+ }
1247
+ /** Same city vocabulary as clock-label fallback, for explanatory timezone copy. */
1248
+ function formatTimeZoneCityLabel(timeZone) {
1249
+ return timeZone.startsWith("Etc/") ? "local time" : `${timeZone.split("/").slice(-1)[0]?.replace(/_/gu, " ") ?? timeZone} time`;
1250
+ }
1045
1251
  var init_date_display = __esmMin((() => {
1046
1252
  init_booking_date_time();
1047
1253
  init_date_time_formatter();
@@ -7456,6 +7662,48 @@ const NEWSLETTER = { subscribe: {
7456
7662
  method: "POST"
7457
7663
  } };
7458
7664
  const PORTAL = {
7665
+ createAppointmentBookingQuestionsUploadUrl: {
7666
+ path: "/portal/appointments/{appointmentId}/booking-questions/upload-url",
7667
+ method: "POST",
7668
+ authScope: "portal",
7669
+ skipPreviewStage: true
7670
+ },
7671
+ finalizeAppointmentBookingQuestionsUpload: {
7672
+ path: "/portal/appointments/{appointmentId}/booking-questions/upload",
7673
+ method: "POST",
7674
+ authScope: "portal",
7675
+ skipPreviewStage: true
7676
+ },
7677
+ createEventBookingQuestionsUploadUrl: {
7678
+ path: "/portal/events/{registrationId}/booking-questions/upload-url",
7679
+ method: "POST",
7680
+ authScope: "portal",
7681
+ skipPreviewStage: true
7682
+ },
7683
+ finalizeEventBookingQuestionsUpload: {
7684
+ path: "/portal/events/{registrationId}/booking-questions/upload",
7685
+ method: "POST",
7686
+ authScope: "portal",
7687
+ skipPreviewStage: true
7688
+ },
7689
+ createWholeSeriesBookingQuestionsUploadUrl: {
7690
+ path: "/portal/dated-offerings/whole-series/{registrationId}/booking-questions/upload-url",
7691
+ method: "POST",
7692
+ authScope: "portal",
7693
+ skipPreviewStage: true
7694
+ },
7695
+ finalizeWholeSeriesBookingQuestionsUpload: {
7696
+ path: "/portal/dated-offerings/whole-series/{registrationId}/booking-questions/upload",
7697
+ method: "POST",
7698
+ authScope: "portal",
7699
+ skipPreviewStage: true
7700
+ },
7701
+ cancelWaitlist: {
7702
+ path: "/portal/waitlists/{entryId}/cancel",
7703
+ method: "POST",
7704
+ authScope: "portal",
7705
+ skipPreviewStage: true
7706
+ },
7459
7707
  getProfile: {
7460
7708
  path: "/portal/me",
7461
7709
  method: "GET",
@@ -7633,7 +7881,7 @@ const PORTAL = {
7633
7881
  sendMagicLink: {
7634
7882
  path: "/portal/auth/send-magic-link",
7635
7883
  method: "POST",
7636
- authScope: "portal",
7884
+ authScope: "public",
7637
7885
  skipPreviewStage: true
7638
7886
  },
7639
7887
  logout: {
@@ -7844,6 +8092,7 @@ function createBlockApi(config) {
7844
8092
  return endpoint.skipPreviewStage === true;
7845
8093
  }
7846
8094
  function selectAuth(endpoint) {
8095
+ if (endpoint.authScope === "public") return { type: "none" };
7847
8096
  if (endpoint.authScope === "portal" && authOverrides?.portal) return authOverrides.portal;
7848
8097
  if (readAuthority && !endpoint.previewRead) return { type: "none" };
7849
8098
  return auth;
@@ -8207,8 +8456,53 @@ function createBlockApi(config) {
8207
8456
  async getPortalMemberships() {
8208
8457
  return (await request(PORTAL.getMemberships)).memberships;
8209
8458
  },
8210
- async getPortalEvents(params) {
8211
- return (await request(PORTAL.getEvents, { query: params?.occurrenceId ? { occurrenceId: params.occurrenceId } : void 0 })).registrations;
8459
+ getPortalEvents(params) {
8460
+ return request(PORTAL.getEvents, { query: params });
8461
+ },
8462
+ async cancelPortalWaitlist(entryId) {
8463
+ try {
8464
+ return await request(PORTAL.cancelWaitlist, { path: buildPath(PORTAL.cancelWaitlist.path, { entryId }) });
8465
+ } catch (error) {
8466
+ if (error instanceof BlockApiError && error.status === 409) return { outcome: "alreadyClosed" };
8467
+ if (error instanceof BlockApiError && error.status === 404) return { outcome: "notFound" };
8468
+ throw error;
8469
+ }
8470
+ },
8471
+ createPortalAppointmentBookingQuestionsUploadUrl(appointmentId, data) {
8472
+ return request(PORTAL.createAppointmentBookingQuestionsUploadUrl, {
8473
+ path: buildPath(PORTAL.createAppointmentBookingQuestionsUploadUrl.path, { appointmentId }),
8474
+ body: data
8475
+ });
8476
+ },
8477
+ async finalizePortalAppointmentBookingQuestionsUpload(appointmentId, data) {
8478
+ return (await request(PORTAL.finalizeAppointmentBookingQuestionsUpload, {
8479
+ path: buildPath(PORTAL.finalizeAppointmentBookingQuestionsUpload.path, { appointmentId }),
8480
+ body: data
8481
+ })).answer;
8482
+ },
8483
+ createPortalEventBookingQuestionsUploadUrl(registrationId, data) {
8484
+ return request(PORTAL.createEventBookingQuestionsUploadUrl, {
8485
+ path: buildPath(PORTAL.createEventBookingQuestionsUploadUrl.path, { registrationId }),
8486
+ body: data
8487
+ });
8488
+ },
8489
+ async finalizePortalEventBookingQuestionsUpload(registrationId, data) {
8490
+ return (await request(PORTAL.finalizeEventBookingQuestionsUpload, {
8491
+ path: buildPath(PORTAL.finalizeEventBookingQuestionsUpload.path, { registrationId }),
8492
+ body: data
8493
+ })).answer;
8494
+ },
8495
+ createPortalWholeSeriesBookingQuestionsUploadUrl(registrationId, data) {
8496
+ return request(PORTAL.createWholeSeriesBookingQuestionsUploadUrl, {
8497
+ path: buildPath(PORTAL.createWholeSeriesBookingQuestionsUploadUrl.path, { registrationId }),
8498
+ body: data
8499
+ });
8500
+ },
8501
+ async finalizePortalWholeSeriesBookingQuestionsUpload(registrationId, data) {
8502
+ return (await request(PORTAL.finalizeWholeSeriesBookingQuestionsUpload, {
8503
+ path: buildPath(PORTAL.finalizeWholeSeriesBookingQuestionsUpload.path, { registrationId }),
8504
+ body: data
8505
+ })).answer;
8212
8506
  },
8213
8507
  async getPortalEventTicket(registrationId) {
8214
8508
  const path = buildPath(PORTAL.getEventTicket.path, { registrationId });
@@ -36490,9 +36784,13 @@ function cardProjectionBase(event, buttonText, offering) {
36490
36784
  function offeringLeadDate(event, startMs) {
36491
36785
  if (startMs === null || !Number.isFinite(startMs)) return null;
36492
36786
  const startsAt = new Date(startMs).toISOString();
36787
+ const timeZone = resolveBookingBusinessTimeZone(event.bookingScope === "whole_series" ? orderedLiveRunSessions(event.run.sessions).find((session) => Date.parse(session.startsAt) === startMs)?.timeZone ?? event.timeZone : event.timeZone);
36493
36788
  return {
36494
36789
  startsAt,
36495
- ...formatEventCompactDateRail(startsAt, eventDateOptions(event), "as-written")
36790
+ ...formatEventCompactDateRail(startsAt, {
36791
+ ...eventDateOptions(event),
36792
+ timeZone
36793
+ }, "as-written")
36496
36794
  };
36497
36795
  }
36498
36796
  function offeringSchedule(event, now) {
@@ -36512,49 +36810,47 @@ function offeringSchedule(event, now) {
36512
36810
  }
36513
36811
  function scheduleLine(summary, event, now) {
36514
36812
  const options = eventDateOptions(event);
36515
- const timeZone = options.timeZone ?? "UTC";
36516
- const year = (value) => new Intl.DateTimeFormat(options.locale, {
36517
- timeZone,
36518
- year: "numeric"
36519
- }).format(value);
36520
- const date = (value, weekday = false) => new Intl.DateTimeFormat(options.locale, {
36521
- timeZone,
36522
- day: "numeric",
36523
- month: "short",
36524
- ...weekday ? { weekday: "short" } : {},
36525
- ...now && year(new Date(value)) !== year(now) ? { year: "numeric" } : {}
36526
- }).format(new Date(value)).replace(",", "");
36813
+ const first = "occurrence" in summary ? summary.occurrence : summary.first;
36814
+ const last = "occurrence" in summary ? summary.occurrence : summary.last;
36815
+ const context = {
36816
+ locale: options.locale,
36817
+ timeZone: resolveBookingBusinessTimeZone(first.timeZone)
36818
+ };
36819
+ const zone = event.deliveryMode === "online" || context.timeZone !== resolveBookingBusinessTimeZone(event.siteTimeZone ?? event.timeZone) ? "always" : "omit";
36820
+ const endpoint = (value) => ({
36821
+ kind: "instant",
36822
+ value: toUtcIsoDateTimeString(value)
36823
+ });
36824
+ const year = (value, timeZone = context.timeZone) => now && getLocalScheduleDate(new Date(value), timeZone).year === getLocalScheduleDate(now, timeZone).year ? "omit" : "numeric";
36825
+ const date = (value) => formatDate$4(endpoint(value), context, {
36826
+ date: "short",
36827
+ year: now ? year(value) : "omit"
36828
+ });
36829
+ const dates = (startsAt, endsAt) => formatDateRange({
36830
+ kind: "civil",
36831
+ value: getLocalScheduleDate(new Date(startsAt), context.timeZone)
36832
+ }, {
36833
+ kind: "civil",
36834
+ value: getLocalScheduleDate(new Date(endsAt), resolveBookingBusinessTimeZone(last.timeZone))
36835
+ }, context, {
36836
+ date: "short",
36837
+ year: now && year(startsAt) === "omit" && year(endsAt, resolveBookingBusinessTimeZone(last.timeZone)) === "omit" ? "omit" : now ? "numeric" : "omit"
36838
+ });
36527
36839
  switch (summary.kind) {
36528
- case "single-occurrence": return now ? `${date(summary.occurrence.startsAt, true)} · ${compactTimeRange(summary.occurrence.startsAt, summary.occurrence.endsAt, timeZone)}` : date(summary.occurrence.startsAt);
36529
- case "multi-day-span": return now ? compactDateSpan(summary.occurrence.startsAt, summary.occurrence.endsAt, options.locale, timeZone, now) : `${date(summary.occurrence.startsAt)} – ${date(summary.occurrence.endsAt)}`;
36530
- case "fixed-recurring-run": return `${date(summary.first.startsAt)} – ${date(summary.last.startsAt)} · ${summary.recurrenceLabel}`;
36531
- case "irregular-multi-session-run": return `${date(summary.first.startsAt)} – ${date(summary.last.startsAt)} · ${summary.sessionCount} dates`;
36840
+ case "single-occurrence": return now ? formatDateTimeRange({
36841
+ start: endpoint(summary.occurrence.startsAt).value,
36842
+ end: endpoint(summary.occurrence.endsAt).value
36843
+ }, context, {
36844
+ date: "short",
36845
+ weekday: "short",
36846
+ year: year(summary.occurrence.startsAt),
36847
+ zone
36848
+ }) : date(summary.occurrence.startsAt);
36849
+ case "multi-day-span": return dates(summary.occurrence.startsAt, summary.occurrence.endsAt);
36850
+ case "fixed-recurring-run": return `${dates(summary.first.startsAt, summary.last.startsAt)} · ${summary.recurrenceLabel}`;
36851
+ case "irregular-multi-session-run": return `${dates(summary.first.startsAt, summary.last.startsAt)} · ${summary.sessionCount} dates`;
36532
36852
  }
36533
36853
  }
36534
- function compactTimeRange(startsAt, endsAt, timeZone) {
36535
- const time = (value) => formatTime$2(value, {
36536
- timeZone,
36537
- locale: "en-US"
36538
- }).replace(/:00/, "").replace(/\s/g, "").toLowerCase();
36539
- const start = time(startsAt);
36540
- const end = time(endsAt);
36541
- return `${start.endsWith("am") === end.endsWith("am") ? start.replace(/(am|pm)$/, "") : start}–${end}`;
36542
- }
36543
- function compactDateSpan(startsAt, endsAt, locale, timeZone, now) {
36544
- const start = new Date(startsAt);
36545
- const end = new Date(endsAt);
36546
- const parts = (value) => new Intl.DateTimeFormat(locale, {
36547
- timeZone,
36548
- day: "numeric",
36549
- month: "short",
36550
- year: "numeric"
36551
- }).formatToParts(value);
36552
- const part = (value, type) => parts(value).find((entry) => entry.type === type)?.value.replace(/^Sept$/, "Sep") ?? "";
36553
- const sameMonth = part(start, "month") === part(end, "month") && part(start, "year") === part(end, "year");
36554
- const year = (value) => part(value, "year") === part(now, "year") ? "" : ` ${part(value, "year")}`;
36555
- const date = (value) => `${part(value, "day")} ${part(value, "month")}${year(value)}`;
36556
- return sameMonth ? `${part(start, "day")}–${date(end)}` : `${date(start)} – ${date(end)}`;
36557
- }
36558
36854
  function offeringAvailability(event) {
36559
36855
  const label = formatEventRemainingPlaces(event, { full: "Sold out" });
36560
36856
  const availability = getEventAvailabilityStatus(event);
@@ -56413,7 +56709,7 @@ const FormNodeSSR = ({ blockId, lookSlots, value, submitLabel, successMessage, c
56413
56709
  /* @__PURE__ */ jsx("input", {
56414
56710
  type: "text",
56415
56711
  name: "company",
56416
- className: "hidden",
56712
+ className: "rb-hidden",
56417
56713
  tabIndex: -1,
56418
56714
  autoComplete: "off"
56419
56715
  }),
@@ -56636,7 +56932,7 @@ function NewsletterFormSSR(props) {
56636
56932
  /* @__PURE__ */ jsx("input", {
56637
56933
  type: "text",
56638
56934
  name: "website",
56639
- className: "hidden",
56935
+ className: "rb-hidden",
56640
56936
  tabIndex: -1,
56641
56937
  autoComplete: "off",
56642
56938
  "aria-hidden": "true"
@@ -59830,9 +60126,8 @@ const AVAILABILITY_REFRESH_JITTER_MS$1 = 5e3;
59830
60126
  *
59831
60127
  * @example
59832
60128
  * ```tsx
59833
- * function DatePicker({ siteId, serviceId }) {
60129
+ * function DatePicker({ serviceId }) {
59834
60130
  * const { availableDates, hasMore, loadMore, isLoading } = useAvailableDates({
59835
- * siteId,
59836
60131
  * serviceId,
59837
60132
  * timezone: 'America/New_York',
59838
60133
  * initialDays: 30,
@@ -59843,7 +60138,7 @@ const AVAILABILITY_REFRESH_JITTER_MS$1 = 5e3;
59843
60138
  * }
59844
60139
  * ```
59845
60140
  */
59846
- function useAvailableDates({ siteId: _siteId, serviceId, resourceId, timezone, initialDays = 30 }) {
60141
+ function useAvailableDates({ serviceId, resourceId, timezone, initialDays = 30 }) {
59847
60142
  const api = useBlockApi();
59848
60143
  const [state, dispatch] = useReducer(availableDatesReducer, createInitialAvailableDatesState());
59849
60144
  const requestIdRef = useRef(0);
@@ -60008,9 +60303,8 @@ const AVAILABILITY_REFRESH_JITTER_MS = 5e3;
60008
60303
  *
60009
60304
  * @example
60010
60305
  * ```tsx
60011
- * function SlotSelector({ siteId, serviceId }) {
60306
+ * function SlotSelector({ serviceId }) {
60012
60307
  * const { slots, isLoading, error } = useAvailableSlots({
60013
- * siteId,
60014
60308
  * serviceId,
60015
60309
  * resourceId: selectedResource,
60016
60310
  * selectedDate: '2024-01-15',
@@ -60019,7 +60313,7 @@ const AVAILABILITY_REFRESH_JITTER_MS = 5e3;
60019
60313
  * }
60020
60314
  * ```
60021
60315
  */
60022
- function useAvailableSlots({ siteId: _siteId, serviceId, resourceId, selectedDate, timezone }) {
60316
+ function useAvailableSlots({ serviceId, resourceId, selectedDate, timezone }) {
60023
60317
  const api = useBlockApi();
60024
60318
  const [state, dispatch] = useReducer(availableSlotsReducer, initialAvailableSlotsState);
60025
60319
  const requestIdRef = useRef(0);
@@ -61884,14 +62178,12 @@ function useHeadlessBookingFlow(options) {
61884
62178
  state.currentStepId
61885
62179
  ]);
61886
62180
  const { availableDates, isLoading: isLoadingDates, error: datesError, hasMore, loadMore, loadedRange: availableDatesLoadedRange } = useAvailableDates({
61887
- siteId: options.siteId,
61888
62181
  serviceId: availabilityDatesQuery.ok ? availabilityDatesQuery.serviceId : void 0,
61889
62182
  resourceId: availabilityDatesQuery.ok ? availabilityDatesQuery.resourceId : void 0,
61890
62183
  timezone: viewerTimeZone,
61891
62184
  initialDays: 14
61892
62185
  });
61893
62186
  const { slots, isLoading: isLoadingSlots, hasLoaded: hasLoadedSlots, error: slotsError } = useAvailableSlots({
61894
- siteId: options.siteId,
61895
62187
  serviceId: availabilitySlotsQuery.ok ? availabilitySlotsQuery.serviceId : void 0,
61896
62188
  resourceId: availabilitySlotsQuery.ok ? availabilitySlotsQuery.resourceId : void 0,
61897
62189
  selectedDate: availabilitySlotsQuery.ok ? availabilitySlotsQuery.selectedDate ?? "" : "",
@@ -63565,8 +63857,8 @@ function DefaultBookingErrorSummary({ errors, id }) {
63565
63857
  //#endregion
63566
63858
  //#region ../blocks/src/system/runtime/shared/utils/demoPortalMagicLink.ts
63567
63859
  const CUSTOMER_PORTAL_PATH = "/portal";
63568
- function buildPortalCallbackUrl(origin, redirectTo) {
63569
- const url = new URL("/api/portal/callback", origin);
63860
+ function buildPortalCallbackUrl(origin, redirectTo, callbackPath = "/api/portal/callback") {
63861
+ const url = new URL(callbackPath, origin);
63570
63862
  url.searchParams.set("redirect_to", redirectTo);
63571
63863
  return url.toString();
63572
63864
  }
@@ -63580,10 +63872,6 @@ async function requestDemoPortalMagicLink(input) {
63580
63872
  };
63581
63873
  try {
63582
63874
  const response = await input.send(request);
63583
- if ("kind" in response) return {
63584
- kind: "refused",
63585
- message: response.message
63586
- };
63587
63875
  return "demoSignInUrl" in response ? {
63588
63876
  kind: "demo_sign_in",
63589
63877
  url: response.demoSignInUrl
@@ -64542,7 +64830,7 @@ function useExistingEventRegistrationWithDeps({ isAuthenticated, occurrenceId },
64542
64830
  requestIdRef.current = requestId;
64543
64831
  dispatch({ type: "loading-started" });
64544
64832
  try {
64545
- const events = await api.getPortalEvents({ occurrenceId });
64833
+ const { registrations: events } = await api.getPortalEvents({ occurrenceId });
64546
64834
  if (cancelled || requestIdRef.current !== requestId) return;
64547
64835
  dispatch({
64548
64836
  type: "resolved",
@@ -122846,7 +123134,7 @@ const FormNodeClient = ({ render }) => {
122846
123134
  /* @__PURE__ */ jsx("input", {
122847
123135
  type: "text",
122848
123136
  name: "company",
122849
- className: "hidden",
123137
+ className: "rb-hidden",
122850
123138
  tabIndex: -1,
122851
123139
  autoComplete: "off"
122852
123140
  }),
@@ -123225,7 +123513,7 @@ function NewsletterFormClient({ render }) {
123225
123513
  /* @__PURE__ */ jsx("input", {
123226
123514
  type: "text",
123227
123515
  name: "website",
123228
- className: "hidden",
123516
+ className: "rb-hidden",
123229
123517
  tabIndex: -1,
123230
123518
  autoComplete: "off",
123231
123519
  "aria-hidden": "true"
@@ -1,6 +1,6 @@
1
- import { t as defineIslandPropsDecoder } from "./propsDecoder-BRKz13eg.mjs";
1
+ import { t as defineIslandPropsDecoder } from "./propsDecoder-Dn68GoQZ.mjs";
2
2
  import { t as mountReactIsland } from "./reactMount-SY8AVRof.mjs";
3
- import { n as carouselRegionAttributes, t as CarouselNodeClient } from "./carousel.client-Bx7XMF8-.mjs";
3
+ import { n as carouselRegionAttributes, t as CarouselNodeClient } from "./carousel.client-Tnwvm0l1.mjs";
4
4
  import "react";
5
5
  import { jsx } from "react/jsx-runtime";
6
6
  //#region src/rendering/islands/enhancers/carousel.tsx
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { ii as clsx } from "./propsDecoder-BRKz13eg.mjs";
2
+ import { ri as clsx } from "./propsDecoder-Dn68GoQZ.mjs";
3
3
  import { t as createLucideIcon } from "./createLucideIcon-PaLVMov4.mjs";
4
4
  import React, { useCallback, useEffect, useRef, useState } from "react";
5
5
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
@@ -1,6 +1,6 @@
1
- import { t as defineIslandPropsDecoder } from "./propsDecoder-BRKz13eg.mjs";
2
- import { t as mountShopBlockIsland } from "./shopShared-D54T_LAV.mjs";
3
- import { t as CartController } from "./shop-commerce-oGBiKT5d.mjs";
1
+ import { t as defineIslandPropsDecoder } from "./propsDecoder-Dn68GoQZ.mjs";
2
+ import { t as mountShopBlockIsland } from "./shopShared-CE302Pfy.mjs";
3
+ import { t as CartController } from "./shop-commerce-DYs7PdNL.mjs";
4
4
  import "react";
5
5
  import { jsx } from "react/jsx-runtime";
6
6
  //#region ../blocks/src/system/runtime/nodes/cart.client.tsx
@@ -1,6 +1,6 @@
1
- import { t as defineIslandPropsDecoder } from "./propsDecoder-BRKz13eg.mjs";
2
- import { t as mountShopBlockIsland } from "./shopShared-D54T_LAV.mjs";
3
- import { n as CheckoutController } from "./shop-commerce-oGBiKT5d.mjs";
1
+ import { t as defineIslandPropsDecoder } from "./propsDecoder-Dn68GoQZ.mjs";
2
+ import { t as mountShopBlockIsland } from "./shopShared-CE302Pfy.mjs";
3
+ import { n as CheckoutController } from "./shop-commerce-DYs7PdNL.mjs";
4
4
  import "react";
5
5
  import { jsx } from "react/jsx-runtime";
6
6
  //#region ../blocks/src/system/runtime/nodes/checkout.client.tsx