@riverbankcms/sdk 0.148.0 → 0.149.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 (154) hide show
  1. package/README.md +1 -1
  2. package/dist/{PreviewEditorSidebar-DvEPG3Z2.mjs → PreviewEditorSidebar-DBKln68M.mjs} +103 -66
  3. package/dist/{PreviewEditorUI-D6eb6fkx.mjs → PreviewEditorUI-DpRX4Mum.mjs} +3 -6
  4. package/dist/{PreviewQueryProvider-5znTyJuz.mjs → PreviewQueryProvider-C0mndwHB.mjs} +3 -3
  5. package/dist/{SdkPreviewModeRuntime-DJ6utQ_R.mjs → SdkPreviewModeRuntime-DJPmPY-r.mjs} +95 -67
  6. package/dist/{SiteChromeCustomizeContext-CFJYh6vo.mjs → SiteChromeCustomizeContext-JYA0cJ_Z.mjs} +982 -734
  7. package/dist/_dts/api/src/bookingConfig.d.ts +33 -48
  8. package/dist/_dts/api/src/bookingManagementEndpoints.d.ts +2 -6
  9. package/dist/_dts/api/src/bookingOperations.d.ts +5 -7
  10. package/dist/_dts/api/src/bookingRecords.d.ts +15 -11
  11. package/dist/_dts/api/src/bookingRefundOutcomes.d.ts +5 -5
  12. package/dist/_dts/api/src/clientErrorReporting.d.ts +11 -0
  13. package/dist/_dts/api/src/commercePortalEndpoints.d.ts +0 -2
  14. package/dist/_dts/api/src/common/cancellation.d.ts +23 -0
  15. package/dist/_dts/api/src/customerMembershipOutcomes.d.ts +1 -1
  16. package/dist/_dts/api/src/endpoints.d.ts +2 -10
  17. package/dist/_dts/api/src/eventManagementContracts.d.ts +4 -7
  18. package/dist/_dts/api/src/index.d.ts +3 -3
  19. package/dist/_dts/api/src/publicAppointmentBookingContracts.d.ts +2 -2
  20. package/dist/_dts/api/src/publicExperience/commerceEndpoints.d.ts +2 -29
  21. package/dist/_dts/api/src/request.d.ts +1 -1
  22. package/dist/_dts/api/src/sdk-event-upsert.d.ts +1 -1
  23. package/dist/_dts/api/src/sdkPullEventContracts.d.ts +1 -1
  24. package/dist/_dts/api/src/siteOperations.d.ts +6 -2
  25. package/dist/_dts/blocks/src/contracts/index.d.ts +1 -1
  26. package/dist/_dts/blocks/src/contracts/non-block-islands.d.ts +2 -2
  27. package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +38 -10
  28. package/dist/_dts/blocks/src/portal/types.d.ts +9 -6
  29. package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +24 -24
  30. package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +1 -1
  31. package/dist/_dts/blocks/src/system/blocks/shared/bookingPaymentTerms.d.ts +84 -160
  32. package/dist/_dts/blocks/src/system/blocks/shop.d.ts +2 -2
  33. package/dist/_dts/blocks/src/system/blocks/shop.shared.d.ts +31 -4
  34. package/dist/_dts/blocks/src/system/runtime/api/types/appointments.d.ts +2 -2
  35. package/dist/_dts/blocks/src/system/runtime/api/types/core.d.ts +3 -1
  36. package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +48 -6
  37. package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +24 -3
  38. package/dist/_dts/blocks/src/system/runtime/hooks/useBookingNowIso.d.ts +8 -0
  39. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.state.d.ts +2 -1
  40. package/dist/_dts/blocks/src/system/runtime/nodes/commerce/shared/display.d.ts +9 -2
  41. package/dist/_dts/blocks/src/system/runtime/nodes/event-details/presentation.d.ts +14 -2
  42. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/PaymentSelectionStep.d.ts +2 -0
  43. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/eventPaymentOptions.d.ts +3 -3
  44. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +4 -0
  45. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCollectionContract.d.ts +24 -24
  46. package/dist/_dts/blocks/src/system/runtime/nodes/shop.interactive.d.ts +41 -6
  47. package/dist/_dts/blocks/src/system/runtime/shared/bookingPaymentOptions.d.ts +7 -2
  48. package/dist/_dts/commerce/src/purchase/bookingPaymentSelection.d.ts +54 -0
  49. package/dist/_dts/commerce/src/purchase/checkoutCommitPlan.d.ts +58 -13
  50. package/dist/_dts/commerce/src/purchase/checkoutErrorCodes.d.ts +1 -1
  51. package/dist/_dts/commerce/src/purchase/checkoutPaymentPlanPlanning.d.ts +16 -21
  52. package/dist/_dts/commerce/src/purchase/checkoutPaymentTerms.d.ts +23 -40
  53. package/dist/_dts/commerce/src/purchase/checkoutSessionMetadata.d.ts +2 -2
  54. package/dist/_dts/commerce/src/purchase/checkoutStripeSessionPlanning.d.ts +5 -4
  55. package/dist/_dts/commerce/src/purchase/index.d.ts +1 -3
  56. package/dist/_dts/commerce/src/purchase/membershipOrderItemMetadata.d.ts +4 -0
  57. package/dist/_dts/commerce/src/purchase/oneTimeCheckoutPlanning.d.ts +9 -4
  58. package/dist/_dts/commerce/src/purchase/orderInstalmentClosure.d.ts +13 -1
  59. package/dist/_dts/commerce/src/purchase/orderInstalmentLifecycle.d.ts +5 -0
  60. package/dist/_dts/commerce/src/purchase/orderItemMetadata.d.ts +3 -1
  61. package/dist/_dts/commerce/src/purchase/orderTypes.d.ts +7 -1
  62. package/dist/_dts/commerce/src/purchase/refundRailSplit.d.ts +1 -1
  63. package/dist/_dts/commerce/src/purchase/stateTransitions.d.ts +2 -2
  64. package/dist/_dts/commerce/src/purchase/stripeMinimumCharge.d.ts +6 -0
  65. package/dist/_dts/commerce/src/purchase/types.d.ts +2 -1
  66. package/dist/_dts/content-editor/src/controller/editLeaseHandover.d.ts +30 -0
  67. package/dist/_dts/content-editor/src/lib/browserStorage.d.ts +5 -0
  68. package/dist/_dts/core/src/booking-flexible-balance.d.ts +2 -2
  69. package/dist/_dts/core/src/booking-instalment-deposit.d.ts +20 -0
  70. package/dist/_dts/core/src/booking-live-payment-terms.d.ts +72 -0
  71. package/dist/_dts/core/src/booking-payment-options.d.ts +24 -0
  72. package/dist/_dts/core/src/booking-payment-schemas.d.ts +522 -0
  73. package/dist/_dts/core/src/branded.d.ts +3 -0
  74. package/dist/_dts/core/src/edit-lease.d.ts +5 -0
  75. package/dist/_dts/core/src/index.d.ts +3 -0
  76. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +297 -36
  77. package/dist/_dts/media-editor/src/MediaPickerDialog.d.ts +3 -1
  78. package/dist/_dts/media-editor/src/MediaPickerMiniDialog.d.ts +10 -0
  79. package/dist/_dts/media-editor/src/index.d.ts +2 -0
  80. package/dist/_dts/preview-next/src/client/preview/PreviewEntryControllerProvider.d.ts +0 -1
  81. package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +1 -1
  82. package/dist/_dts/preview-next/src/client/previewAuthStore.d.ts +7 -0
  83. package/dist/_dts/preview-next/src/constants.d.ts +4 -0
  84. package/dist/_dts/preview-next/src/keepAlive.d.ts +1 -0
  85. package/dist/_dts/sdk/src/rendering/islands/types.d.ts +2 -12
  86. package/dist/_dts/sdk/src/version.d.ts +1 -1
  87. package/dist/_dts/theme-core/src/site-styles/pageDesignIntent.d.ts +0 -5
  88. package/dist/_dts/ui/src/color-picker.d.ts +1 -1
  89. package/dist/_dts/ui/src/palette/useHexDraft.d.ts +7 -0
  90. package/dist/client/{BookingMailingListNote-CzRt2dF_.mjs → BookingMailingListNote-Cr3EeTP5.mjs} +408 -69
  91. package/dist/client/{DemoBookingPortalAccess-mxqwap3f.mjs → DemoBookingPortalAccess-BFGB1Fay.mjs} +2 -2
  92. package/dist/client/{EventCombined.client-CDb11igO.mjs → EventCombined.client-DKYV0_ft.mjs} +6 -6
  93. package/dist/client/{EventListing.client-EgYhzKPa.mjs → EventListing.client-B9UIcEYc.mjs} +2 -2
  94. package/dist/client/{LeafletStaticMap-gtmtaA2b.mjs → LeafletStaticMap-CFLPkP0K.mjs} +1 -1
  95. package/dist/client/{TerminalPanel-DvNUP5ot.mjs → TerminalPanel-JjmgxEsR.mjs} +1 -1
  96. package/dist/client/{ThemedButton-C7CeUJjW.mjs → ThemedButton-CKV1Jh2m.mjs} +1 -1
  97. package/dist/client/{accordion-kjvt49rA.mjs → accordion-DXWIfT3T.mjs} +1 -1
  98. package/dist/client/{bookingForm-pbRZordh.mjs → bookingForm-CjZgHNvv.mjs} +11 -8
  99. package/dist/client/bookings.mjs +424 -320
  100. package/dist/client/{carousel-f4Zbmicv.mjs → carousel-DSLikmvZ.mjs} +1 -1
  101. package/dist/client/{cart-DO20An50.mjs → cart-HDjWReFt.mjs} +3 -3
  102. package/dist/client/{checkout-Du5amDR_.mjs → checkout-CUvRZA3W.mjs} +3 -3
  103. package/dist/client/client.mjs +963 -866
  104. package/dist/client/{context-eW97E945.mjs → context-DFmaZa-Q.mjs} +1 -1
  105. package/dist/client/{dates-jPCirRea.mjs → dates-BBep1JnF.mjs} +2 -2
  106. package/dist/client/{eventCalendar-C2M-iE4j.mjs → eventCalendar-zEobhxo4.mjs} +9 -9
  107. package/dist/client/{eventCombined-W6ns3LHg.mjs → eventCombined-Dp7bz5k-.mjs} +4 -4
  108. package/dist/client/{eventDetails-CR-GT0f0.mjs → eventDetails-FE-zqTt7.mjs} +4 -4
  109. package/dist/client/{eventListing-BK8AfYZz.mjs → eventListing-BMt5snal.mjs} +4 -4
  110. package/dist/client/{eventRegistration-BJSd4KUu.mjs → eventRegistration-O6ZxHfOb.mjs} +67 -342
  111. package/dist/client/{form-BvpfbQaT.mjs → form-DFa1D8vt.mjs} +3 -3
  112. package/dist/client/{headerSection-I5sUQ8x-.mjs → headerSection-CmjHLR-N.mjs} +3 -3
  113. package/dist/client/hooks.mjs +160 -129
  114. package/dist/client/{locationMap-BLvwf9_f.mjs → locationMap-BXKP_lGh.mjs} +3 -3
  115. package/dist/client/{newsletterForm-DrQ2weE8.mjs → newsletterForm-CU-HmxGx.mjs} +3 -3
  116. package/dist/client/{pricing-BES87mrR.mjs → pricing-KEAEsibq.mjs} +1 -1
  117. package/dist/client/{productDetail-Url9jcc5.mjs → productDetail-Ckp7MGnt.mjs} +3 -3
  118. package/dist/client/{productList-DE7ngEZJ.mjs → productList-D91V0sYa.mjs} +3 -3
  119. package/dist/client/{propsDecoder-D1OtGXDV.mjs → propsDecoder-DZd6RJeA.mjs} +155 -77
  120. package/dist/client/rendering/client.mjs +3356 -3192
  121. package/dist/client/rendering/islands.mjs +17 -17
  122. package/dist/client/rendering.mjs +956 -841
  123. package/dist/client/{routeIslandApiConfig-BG9Y-SHg.mjs → routeIslandApiConfig-E1EkhhYY.mjs} +1 -1
  124. package/dist/client/{shop-CJkuySJ3.mjs → shop-4F2jLQPI.mjs} +12 -13
  125. package/dist/client/{shop-commerce-4rKj5n9h.mjs → shop-commerce-BbfCJjB3.mjs} +6 -6
  126. package/dist/client/{shop-commerce-store-Bxm75Pg6.mjs → shop-commerce-store-vicweP2K.mjs} +1 -1
  127. package/dist/client/{shopShared-DpoQDWfz.mjs → shopShared-DlONJt0T.mjs} +4 -4
  128. package/dist/client/{useEventFilters-D8HliSqR.mjs → useEventFilters-COYyL3m7.mjs} +6 -6
  129. package/dist/preview-next/before-render.mjs +15 -22
  130. package/dist/preview-next/client/runtime.mjs +4 -4
  131. package/dist/preview-next/constants.mjs +5 -1
  132. package/dist/preview-next/index.mjs +5 -1
  133. package/dist/preview-next/keepAlive.mjs +149 -82
  134. package/dist/preview-next/middleware.mjs +15 -22
  135. package/dist/{previewAuthStore-BXXF3hhW.mjs → previewAuthStore-BBmV7UsW.mjs} +49 -29
  136. package/dist/{sdk-runtime-C2a05WjL.mjs → sdk-runtime-CwvFFjB-.mjs} +2 -2
  137. package/dist/{separator-CuNhBAhS.mjs → separator-ByL72zUT.mjs} +1 -1
  138. package/dist/server/components.mjs +167 -131
  139. package/dist/server/config-validation.mjs +160 -129
  140. package/dist/server/config.mjs +160 -129
  141. package/dist/server/data.mjs +160 -129
  142. package/dist/server/index.mjs +20 -27
  143. package/dist/server/next.mjs +174 -156
  144. package/dist/server/page-converter.mjs +145 -65
  145. package/dist/server/prebuild.mjs +1 -1
  146. package/dist/server/rendering/server.mjs +169 -131
  147. package/dist/server/rendering.mjs +167 -131
  148. package/dist/server/routing.mjs +165 -118
  149. package/dist/server/server.mjs +167 -154
  150. package/package.json +1 -1
  151. package/dist/_dts/api/src/bookingPaymentTermSchemas.d.ts +0 -123
  152. package/dist/_dts/commerce/src/purchase/checkoutPaymentTermPlanning.d.ts +0 -10
  153. package/dist/_dts/commerce/src/purchase/checkoutValidatedItemPlanning.d.ts +0 -55
  154. package/dist/_dts/commerce/src/purchase/orderInstalmentPayoff.d.ts +0 -24
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { H as calendarWindowPageSchema } from "./propsDecoder-D1OtGXDV.mjs";
2
+ import { H as calendarWindowPageSchema } from "./propsDecoder-DZd6RJeA.mjs";
3
3
  import { createContext, useContext, useMemo } from "react";
4
4
  import { jsx } from "react/jsx-runtime";
5
5
  //#region ../blocks/src/system/runtime/api/deduplication.ts
@@ -1,5 +1,5 @@
1
- import { Tn as assertNever, dt as resolveRuntimeEventDestination, fn as toBookingTimeZone, mn as toScheduledBookingDateTime, nn as formatBookingDate, on as formatBookingTime, pn as toScheduledBookingDateRange, rn as formatBookingDateParts } from "./propsDecoder-D1OtGXDV.mjs";
2
- import { a as canJoinEventWaitlistOnAnyMode, p as isEventFull } from "./pricing-BES87mrR.mjs";
1
+ import { Tn as assertNever, dt as resolveRuntimeEventDestination, fn as toBookingTimeZone, mn as toScheduledBookingDateTime, nn as formatBookingDate, on as formatBookingTime, pn as toScheduledBookingDateRange, rn as formatBookingDateParts } from "./propsDecoder-DZd6RJeA.mjs";
2
+ import { a as canJoinEventWaitlistOnAnyMode, p as isEventFull } from "./pricing-KEAEsibq.mjs";
3
3
  //#region ../blocks/src/system/runtime/nodes/events/domain/cta.ts
4
4
  /**
5
5
  * Booking call-to-action resolution for events: where an event links to and
@@ -1,15 +1,15 @@
1
1
  "use client";
2
2
  import { O as clsx } from "./colorStyles-j5U9v5JA.mjs";
3
- import { A as buildEventCalendarListingRender, W as resolveCalendarReadProfile, at as getDayOfWeek, ct as isSameCalendarDay, et as MONTH_NAMES, it as formatDateKey, lt as isToday, ot as getOrderedDayNames, q as buildEventRuntimeFilters, st as getWeekCalendarDays, t as defineIslandPropsDecoder, tt as addDays } from "./propsDecoder-D1OtGXDV.mjs";
4
- import { o as EventFilters, s as formatEventTeacherLine, t as useEventFilters } from "./useEventFilters-D8HliSqR.mjs";
5
- import { d as getEventAvailabilityStatus, o as formatEventRemainingPlaces, p as isEventFull } from "./pricing-BES87mrR.mjs";
6
- import { c as groupEventsByDate, d as getLocalMinuteOfDay, l as resolveEventTimeZone, p as resolveEventLinkProps, s as formatTime, u as getLocalDateKey } from "./dates-jPCirRea.mjs";
7
- import { a as WeekAgendaView, c as CalendarDayCell, d as useCalendarEvents, i as useHydrationReady, l as EventModalProvider, o as CalendarNavigationChevron, r as EventModals, s as CalendarDayHeaders, t as EventCombinedClient, u as useEventModal } from "./EventCombined.client-CDb11igO.mjs";
8
- import { t as BlockApiProvider } from "./context-eW97E945.mjs";
9
- import { n as ThemedButtonLink, t as ThemedButton } from "./ThemedButton-C7CeUJjW.mjs";
3
+ import { A as buildEventCalendarListingRender, W as resolveCalendarReadProfile, at as getDayOfWeek, ct as isSameCalendarDay, et as MONTH_NAMES, it as formatDateKey, lt as isToday, ot as getOrderedDayNames, q as buildEventRuntimeFilters, st as getWeekCalendarDays, t as defineIslandPropsDecoder, tt as addDays } from "./propsDecoder-DZd6RJeA.mjs";
4
+ import { o as EventFilters, s as formatEventTeacherLine, t as useEventFilters } from "./useEventFilters-COYyL3m7.mjs";
5
+ import { d as getEventAvailabilityStatus, o as formatEventRemainingPlaces, p as isEventFull } from "./pricing-KEAEsibq.mjs";
6
+ import { c as groupEventsByDate, d as getLocalMinuteOfDay, l as resolveEventTimeZone, p as resolveEventLinkProps, s as formatTime, u as getLocalDateKey } from "./dates-BBep1JnF.mjs";
7
+ import { a as WeekAgendaView, c as CalendarDayCell, d as useCalendarEvents, i as useHydrationReady, l as EventModalProvider, o as CalendarNavigationChevron, r as EventModals, s as CalendarDayHeaders, t as EventCombinedClient, u as useEventModal } from "./EventCombined.client-DKYV0_ft.mjs";
8
+ import { t as BlockApiProvider } from "./context-DFmaZa-Q.mjs";
9
+ import { n as ThemedButtonLink, t as ThemedButton } from "./ThemedButton-CKV1Jh2m.mjs";
10
10
  import { t as mountReactIsland } from "./reactMount-SY8AVRof.mjs";
11
- import { t as buildRouteIslandApiConfig } from "./routeIslandApiConfig-BG9Y-SHg.mjs";
12
- import { n as EventListingController } from "./EventListing.client-EgYhzKPa.mjs";
11
+ import { t as buildRouteIslandApiConfig } from "./routeIslandApiConfig-E1EkhhYY.mjs";
12
+ import { n as EventListingController } from "./EventListing.client-B9UIcEYc.mjs";
13
13
  import { useEffect, useId, useMemo, useState } from "react";
14
14
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
15
15
  //#region ../calendar/src/lane-packing.ts
@@ -1,8 +1,8 @@
1
- import { t as defineIslandPropsDecoder } from "./propsDecoder-D1OtGXDV.mjs";
2
- import { n as EventCombinedIslandClient } from "./EventCombined.client-CDb11igO.mjs";
3
- import { t as BlockApiProvider } from "./context-eW97E945.mjs";
1
+ import { t as defineIslandPropsDecoder } from "./propsDecoder-DZd6RJeA.mjs";
2
+ import { n as EventCombinedIslandClient } from "./EventCombined.client-DKYV0_ft.mjs";
3
+ import { t as BlockApiProvider } from "./context-DFmaZa-Q.mjs";
4
4
  import { t as mountReactIsland } from "./reactMount-SY8AVRof.mjs";
5
- import { t as buildRouteIslandApiConfig } from "./routeIslandApiConfig-BG9Y-SHg.mjs";
5
+ import { t as buildRouteIslandApiConfig } from "./routeIslandApiConfig-E1EkhhYY.mjs";
6
6
  import "react";
7
7
  import { jsx } from "react/jsx-runtime";
8
8
  //#region src/rendering/islands/enhancers/eventCombined.tsx
@@ -1,8 +1,8 @@
1
- import { Cn as formatCurrencyAmount, M as resolveEventRegistrationScopedEvents, Qt as resolveWholeSeriesBookingPhase, Sn as publicEventPricingType, Zt as CANCELLED_SESSION_STATUS, _n as isPublicEventPricingOptionDisplayable, cn as getBookingLocalDateKey, fn as toBookingTimeZone, hn as formatBookingPriceDisplay, mn as toScheduledBookingDateTime, t as defineIslandPropsDecoder, vn as publicEventPricingCurrency, yn as publicEventPricingDisplay } from "./propsDecoder-D1OtGXDV.mjs";
2
- import { l as formatTotalCapacity, n as formatEventPriceAmount, t as formatEventPrice } from "./pricing-BES87mrR.mjs";
3
- import { i as formatEventDateParts, p as resolveEventLinkProps } from "./dates-jPCirRea.mjs";
1
+ import { Cn as formatCurrencyAmount, M as resolveEventRegistrationScopedEvents, Qt as resolveWholeSeriesBookingPhase, Sn as publicEventPricingType, Zt as CANCELLED_SESSION_STATUS, _n as isPublicEventPricingOptionDisplayable, cn as getBookingLocalDateKey, fn as toBookingTimeZone, hn as formatBookingPriceDisplay, mn as toScheduledBookingDateTime, t as defineIslandPropsDecoder, vn as publicEventPricingCurrency, yn as publicEventPricingDisplay } from "./propsDecoder-DZd6RJeA.mjs";
2
+ import { l as formatTotalCapacity, n as formatEventPriceAmount, t as formatEventPrice } from "./pricing-KEAEsibq.mjs";
3
+ import { i as formatEventDateParts, p as resolveEventLinkProps } from "./dates-BBep1JnF.mjs";
4
4
  import { t as mountReactIsland } from "./reactMount-SY8AVRof.mjs";
5
- import { t as LeafletStaticMap } from "./LeafletStaticMap-gtmtaA2b.mjs";
5
+ import { t as LeafletStaticMap } from "./LeafletStaticMap-CFLPkP0K.mjs";
6
6
  import "react";
7
7
  import { jsx, jsxs } from "react/jsx-runtime";
8
8
  //#region ../blocks/src/system/runtime/nodes/events/shared/eventProductEligibility.ts
@@ -1,8 +1,8 @@
1
- import { t as defineIslandPropsDecoder } from "./propsDecoder-D1OtGXDV.mjs";
2
- import { t as BlockApiProvider } from "./context-eW97E945.mjs";
1
+ import { t as defineIslandPropsDecoder } from "./propsDecoder-DZd6RJeA.mjs";
2
+ import { t as BlockApiProvider } from "./context-DFmaZa-Q.mjs";
3
3
  import { t as mountReactIsland } from "./reactMount-SY8AVRof.mjs";
4
- import { t as buildRouteIslandApiConfig } from "./routeIslandApiConfig-BG9Y-SHg.mjs";
5
- import { t as EventListingClient } from "./EventListing.client-EgYhzKPa.mjs";
4
+ import { t as buildRouteIslandApiConfig } from "./routeIslandApiConfig-E1EkhhYY.mjs";
5
+ import { t as EventListingClient } from "./EventListing.client-B9UIcEYc.mjs";
6
6
  import "react";
7
7
  import { jsx } from "react/jsx-runtime";
8
8
  //#region src/rendering/islands/enhancers/eventListing.tsx
@@ -1,12 +1,12 @@
1
1
  "use client";
2
- import { a as buildBookingPaymentSelectionViewModel, i as usePolling, n as BookingConsentAgreement, o as resolveBookingPaymentDueNowCents, r as StepIndicator$1, s as formatPrice, t as BookingMailingListNote } from "./BookingMailingListNote-CzRt2dF_.mjs";
3
- import { C as resolveDiscountContext, Cn as formatCurrencyAmount, D as WIZARD_STEPS, E as toRegistrationRequestSubject, M as resolveEventRegistrationScopedEvents, O as getStepNumber, Ot as getRegistrationSuccessCopy, S as findPreSelectedEvent, Sn as publicEventPricingType, T as resolveRegistrationTarget, Wt as assertNever, _ as buildEventRegistrationDisplayFromScopedEvents, b as toWholeSeriesRegistrationEvents, bn as publicEventPricingOptions, en as resolveBookingSignupOffer, fn as toBookingTimeZone, ft as groupPublicEventsByRun, in as formatBookingDateTime, k as getWizardStepsForContext, mn as toScheduledBookingDateTime, nn as formatBookingDate, on as formatBookingTime, t as defineIslandPropsDecoder, v as getRegistrationStartAt, vn as publicEventPricingCurrency, w as resolveEventRequiresPayment, wn as parseCurrencyCode, x as findEventByOccurrenceId, xn as publicEventPricingStrategy, y as toRegistrationEvents } from "./propsDecoder-D1OtGXDV.mjs";
4
- import { a as canJoinEventWaitlistOnAnyMode, c as formatTicketTypeRemaining, f as getRemainingPlaces, h as selectMostOpenCapacitySource, i as canJoinEventWaitlist, m as selectEventCapacitySource, o as formatEventRemainingPlaces, p as isEventFull, r as formatEventPriceDisplay, s as formatRemainingPlaces, u as getEventAvailability } from "./pricing-BES87mrR.mjs";
5
- import { n as useBlockApi, r as BlockApiError, t as BlockApiProvider } from "./context-eW97E945.mjs";
2
+ import { a as buildBookingPaymentSelectionViewModel, c as eventRegistrationErrors, d as planCheckoutPaymentFlow, f as planFlexibleBalanceCreditFirst, i as usePolling, l as parseEventRegistrationErrorReason, n as BookingConsentAgreement, o as resolveBookingPaymentDueNowCents, p as useBookingNowIso, r as StepIndicator$1, s as formatPrice, t as BookingMailingListNote, u as getStripeMinimumChargeRequirement } from "./BookingMailingListNote-Cr3EeTP5.mjs";
3
+ import { C as resolveDiscountContext, Cn as formatCurrencyAmount, D as WIZARD_STEPS, E as toRegistrationRequestSubject, M as resolveEventRegistrationScopedEvents, O as getStepNumber, Ot as getRegistrationSuccessCopy, S as findPreSelectedEvent, Sn as publicEventPricingType, T as resolveRegistrationTarget, Wt as assertNever, _ as buildEventRegistrationDisplayFromScopedEvents, b as toWholeSeriesRegistrationEvents, bn as publicEventPricingOptions, en as resolveBookingSignupOffer, fn as toBookingTimeZone, ft as groupPublicEventsByRun, in as formatBookingDateTime, k as getWizardStepsForContext, mn as toScheduledBookingDateTime, nn as formatBookingDate, on as formatBookingTime, t as defineIslandPropsDecoder, v as getRegistrationStartAt, vn as publicEventPricingCurrency, w as resolveEventRequiresPayment, x as findEventByOccurrenceId, xn as publicEventPricingStrategy, y as toRegistrationEvents } from "./propsDecoder-DZd6RJeA.mjs";
4
+ import { a as canJoinEventWaitlistOnAnyMode, c as formatTicketTypeRemaining, f as getRemainingPlaces, h as selectMostOpenCapacitySource, i as canJoinEventWaitlist, m as selectEventCapacitySource, o as formatEventRemainingPlaces, p as isEventFull, r as formatEventPriceDisplay, s as formatRemainingPlaces, u as getEventAvailability } from "./pricing-KEAEsibq.mjs";
5
+ import { n as useBlockApi, r as BlockApiError, t as BlockApiProvider } from "./context-DFmaZa-Q.mjs";
6
6
  import { n as isSpamProtectionEnabled, r as AltchaWidget, t as getChallengeUrl } from "./src-B833rYRr.mjs";
7
- import { a as requestDemoPortalMagicLink, f as storeDemoBookingPass, i as buildPortalCallbackUrl, o as DiscountCodeDisclosure, r as CUSTOMER_PORTAL_PATH, t as BookingConfirmation } from "./DemoBookingPortalAccess-mxqwap3f.mjs";
8
- import { a as useDiscountCodeUi, i as CheckIcon, n as StateIcon, r as scrollToBlock, t as TerminalPanel } from "./TerminalPanel-DvNUP5ot.mjs";
9
- import { i as SpinnerNode, n as ThemedButtonLink, t as ThemedButton } from "./ThemedButton-C7CeUJjW.mjs";
7
+ import { a as requestDemoPortalMagicLink, f as storeDemoBookingPass, i as buildPortalCallbackUrl, o as DiscountCodeDisclosure, r as CUSTOMER_PORTAL_PATH, t as BookingConfirmation } from "./DemoBookingPortalAccess-BFGB1Fay.mjs";
8
+ import { a as useDiscountCodeUi, i as CheckIcon, n as StateIcon, r as scrollToBlock, t as TerminalPanel } from "./TerminalPanel-JjmgxEsR.mjs";
9
+ import { i as SpinnerNode, n as ThemedButtonLink, t as ThemedButton } from "./ThemedButton-CKV1Jh2m.mjs";
10
10
  import { t as FeedbackMessage } from "./FeedbackMessage-CtLvvS_d.mjs";
11
11
  import { i as getFieldValidationControlProps, r as FieldValidationMessage } from "./mailingListSignupCopy-DZSHZrm6.mjs";
12
12
  import { t as buildCheckoutReturnUrls } from "./checkoutUrls-CXhko2Rv.mjs";
@@ -15,25 +15,12 @@ import { t as createBodyThemePortalRoot } from "./themePortalRoot-AGs4cE7t.mjs";
15
15
  import { n as consumeSearchParams } from "./urlParams-D71VXFGx.mjs";
16
16
  import { t as CrossIcon } from "./CrossIcon-Dn1KRKW5.mjs";
17
17
  import { t as mountReactIsland } from "./reactMount-SY8AVRof.mjs";
18
- import { t as buildRouteIslandApiConfig } from "./routeIslandApiConfig-BG9Y-SHg.mjs";
18
+ import { t as buildRouteIslandApiConfig } from "./routeIslandApiConfig-E1EkhhYY.mjs";
19
19
  import { t as createLucideIcon } from "./createLucideIcon-PaLVMov4.mjs";
20
20
  import { t as ModalShell } from "./ModalShell-CqkBvBIC.mjs";
21
21
  import React, { useCallback, useEffect, useId, useLayoutEffect, useMemo, useReducer, useRef, useState, useSyncExternalStore } from "react";
22
- import { z } from "zod";
23
22
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
24
23
  import { createPortal } from "react-dom";
25
- //#region ../core/src/money-input.ts
26
- function unsafeAsNonNegativeCents(value) {
27
- return value;
28
- }
29
- /**
30
- * Normalizes a derived amount to non-negative whole cents. This intentionally
31
- * clamps negatives to zero; use parseNonNegativeCents for validation.
32
- */
33
- function toNonNegativeCents(value) {
34
- return unsafeAsNonNegativeCents(Math.max(0, Math.trunc(value)));
35
- }
36
- //#endregion
37
24
  //#region ../core/src/uuid.ts
38
25
  function generateUuidV4(cryptoSource = globalThis.crypto) {
39
26
  if (typeof cryptoSource.randomUUID === "function") return cryptoSource.randomUUID();
@@ -212,6 +199,7 @@ function buildEventRegistrationPaymentOptionsViewModel(input) {
212
199
  priceAmount: input.totalPriceCents,
213
200
  priceCurrency: input.currency,
214
201
  bookingStartAt: input.startsAt,
202
+ nowIso: input.nowIso,
215
203
  locale: input.locale
216
204
  });
217
205
  return {
@@ -219,7 +207,7 @@ function buildEventRegistrationPaymentOptionsViewModel(input) {
219
207
  sectionTitle: selection.sectionTitle,
220
208
  options: selection.options.flatMap((option, index) => {
221
209
  const sourceOption = approvedOptions[index];
222
- return sourceOption ? [toEventDirectPaymentOption(option, sourceOption, selection.mode, input.totalPriceCents, input.startsAt)] : [];
210
+ return sourceOption ? [toEventDirectPaymentOption(option, sourceOption, selection.mode, input.totalPriceCents)] : [];
223
211
  })
224
212
  };
225
213
  }
@@ -227,11 +215,10 @@ function selectApprovedEventDirectPaymentOptions(approvedPaymentOptions, payment
227
215
  const approvedKinds = new Set(getApprovedDirectPaymentCollectionOptionKinds(approvedPaymentOptions));
228
216
  return paymentTerms.allowedOptions.filter((option) => approvedKinds.has(option.kind));
229
217
  }
230
- function toEventDirectPaymentOption(option, sourceOption, mode, totalCents, startsAt) {
218
+ function toEventDirectPaymentOption(option, sourceOption, mode, totalCents) {
231
219
  const configuredPaymentDueNowCents = resolveBookingPaymentDueNowCents({
232
220
  option: sourceOption,
233
- totalCents,
234
- bookingStartAt: startsAt
221
+ totalCents
235
222
  });
236
223
  switch (option.kind) {
237
224
  case "upfront": return {
@@ -1156,291 +1143,6 @@ function logoutPortal(anchorId) {
1156
1143
  form.submit();
1157
1144
  }
1158
1145
  //#endregion
1159
- //#region ../commerce/src/purchase/checkoutPaymentFlow.ts
1160
- function planCheckoutPaymentFlow(options) {
1161
- const amountDueCents = toNonNegativeCents(options.amountDueCents);
1162
- const discountCents = toNonNegativeCents(options.discountCents);
1163
- const availableCreditCents = toNonNegativeCents(options.availableCreditCents);
1164
- const minimumStripeChargeCents = toNonNegativeCents(options.minimumStripeChargeCents ?? 0);
1165
- if (amountDueCents <= 0) return {
1166
- kind: "bypass",
1167
- bypassReason: discountCents > 0 ? "discount_free" : "free",
1168
- reserveCreditCents: 0
1169
- };
1170
- if (!options.creditCurrencyMatches || availableCreditCents <= 0) return {
1171
- kind: "stripe",
1172
- reserveCreditCents: toNonNegativeCents(0)
1173
- };
1174
- if (availableCreditCents >= amountDueCents) return {
1175
- kind: "store_credit_only",
1176
- reserveCreditCents: amountDueCents
1177
- };
1178
- return {
1179
- kind: "stripe",
1180
- reserveCreditCents: planMixedPaymentCreditReservation({
1181
- amountDueCents,
1182
- availableCreditCents,
1183
- minimumStripeChargeCents
1184
- })
1185
- };
1186
- }
1187
- function planMixedPaymentCreditReservation(input) {
1188
- const chargeAfterFullCredit = input.amountDueCents - input.availableCreditCents;
1189
- if (input.minimumStripeChargeCents <= 0 || chargeAfterFullCredit <= 0 || chargeAfterFullCredit >= input.minimumStripeChargeCents) return input.availableCreditCents;
1190
- if (input.amountDueCents < input.minimumStripeChargeCents) return toNonNegativeCents(0);
1191
- return toNonNegativeCents(input.amountDueCents - input.minimumStripeChargeCents);
1192
- }
1193
- /**
1194
- * Apply site credit to a flexible-balance booking before card payment.
1195
- *
1196
- * Credit first reduces the configured payment due now. Once that payment is
1197
- * covered, any remaining credit reduces the later balance. If a partial credit
1198
- * application would leave a positive card charge below Stripe's minimum, less
1199
- * credit is used so the configured payment can still be collected.
1200
- */
1201
- function planFlexibleBalanceCreditFirst(input) {
1202
- const totalCents = toNonNegativeCents(input.totalAfterDiscountCents);
1203
- const configuredDueNowCents = toNonNegativeCents(Math.min(input.configuredPaymentDueNowCents, totalCents));
1204
- const availableCreditCents = toNonNegativeCents(input.creditCurrencyMatches ? input.availableCreditCents : 0);
1205
- const minimumStripeChargeCents = toNonNegativeCents(input.minimumStripeChargeCents ?? 0);
1206
- if (availableCreditCents >= totalCents && totalCents > 0) return {
1207
- kind: "credit_only",
1208
- reserveCreditCents: totalCents,
1209
- cardDueNowCents: toNonNegativeCents(0),
1210
- laterBalanceCents: toNonNegativeCents(0)
1211
- };
1212
- let reserveCreditCents = toNonNegativeCents(Math.min(availableCreditCents, totalCents));
1213
- if (reserveCreditCents >= configuredDueNowCents) return {
1214
- kind: "flexible_balance",
1215
- reserveCreditCents,
1216
- cardDueNowCents: toNonNegativeCents(0),
1217
- laterBalanceCents: toNonNegativeCents(totalCents - reserveCreditCents)
1218
- };
1219
- const plannedCardDueNowCents = toNonNegativeCents(configuredDueNowCents - reserveCreditCents);
1220
- if (plannedCardDueNowCents > 0 && plannedCardDueNowCents < minimumStripeChargeCents) {
1221
- if (configuredDueNowCents < minimumStripeChargeCents) return {
1222
- kind: "card_below_minimum",
1223
- reserveCreditCents: toNonNegativeCents(0),
1224
- cardDueNowCents: configuredDueNowCents,
1225
- laterBalanceCents: toNonNegativeCents(totalCents - configuredDueNowCents)
1226
- };
1227
- reserveCreditCents = toNonNegativeCents(configuredDueNowCents - minimumStripeChargeCents);
1228
- }
1229
- const cardDueNowCents = toNonNegativeCents(configuredDueNowCents - reserveCreditCents);
1230
- return {
1231
- kind: "flexible_balance",
1232
- reserveCreditCents,
1233
- cardDueNowCents,
1234
- laterBalanceCents: toNonNegativeCents(totalCents - reserveCreditCents - cardDueNowCents)
1235
- };
1236
- }
1237
- //#endregion
1238
- //#region ../commerce/src/purchase/settlement.ts
1239
- function normalizeCurrencyCode(raw) {
1240
- const normalized = raw.trim().toUpperCase();
1241
- if (!/^[A-Z]{3}$/.test(normalized)) throw new Error(`Invalid currency code: ${raw}`);
1242
- return normalized;
1243
- }
1244
- //#endregion
1245
- //#region ../commerce/src/purchase/checkoutSessionMetadata.ts
1246
- const datedOfferingSharedEngineMetadataShape = {
1247
- datedOfferingEngineContractVersion: z.literal("shared_v1"),
1248
- datedOfferingEngineRouteKind: z.literal("shared_whole_series_registration"),
1249
- datedOfferingCapacityHoldId: z.string().uuid(),
1250
- datedOfferingCapacityHoldAuditRef: z.string().uuid(),
1251
- customerId: z.string().uuid(),
1252
- eventSeriesId: z.string().uuid()
1253
- };
1254
- z.object(datedOfferingSharedEngineMetadataShape);
1255
- const orderCheckoutSessionMetadataBaseShape = {
1256
- type: z.literal("order"),
1257
- site_id: z.string().uuid(),
1258
- order_id: z.string().uuid().optional(),
1259
- customer_email: z.string().email(),
1260
- customer_name: z.string().optional(),
1261
- product_id: z.string().uuid().optional(),
1262
- attendee_id: z.string().uuid().optional(),
1263
- occurrence_id: z.string().uuid().optional(),
1264
- tickets_count: z.string().optional(),
1265
- notes: z.string().optional(),
1266
- discount_redemption_id: z.string().uuid().optional(),
1267
- discount_code_id: z.string().uuid().optional(),
1268
- discount_code: z.string().optional(),
1269
- discount_public_label: z.string().optional(),
1270
- credit_reservation_id: z.string().uuid().optional(),
1271
- credit_reserved_cents: z.string().optional(),
1272
- discount_code_amount_cents: z.string().optional(),
1273
- order_payment_reason: z.enum([
1274
- "instalment_payoff",
1275
- "flexible_balance_initial",
1276
- "flexible_balance_paydown"
1277
- ]).optional(),
1278
- order_payment_plan_id: z.string().uuid().optional(),
1279
- order_flexible_balance_contract_id: z.string().uuid().optional()
1280
- };
1281
- const absentDatedOfferingSharedEngineMetadataShape = {
1282
- datedOfferingEngineContractVersion: z.never().optional(),
1283
- datedOfferingEngineRouteKind: z.never().optional(),
1284
- datedOfferingCapacityHoldId: z.never().optional(),
1285
- datedOfferingCapacityHoldAuditRef: z.never().optional(),
1286
- customerId: z.never().optional(),
1287
- eventSeriesId: z.never().optional()
1288
- };
1289
- const LegacyOrderCheckoutSessionMetadataSchema = z.object({
1290
- ...orderCheckoutSessionMetadataBaseShape,
1291
- ...absentDatedOfferingSharedEngineMetadataShape
1292
- });
1293
- const SharedDatedOfferingOrderCheckoutSessionMetadataSchema = z.object({
1294
- ...orderCheckoutSessionMetadataBaseShape,
1295
- ...datedOfferingSharedEngineMetadataShape
1296
- });
1297
- z.union([SharedDatedOfferingOrderCheckoutSessionMetadataSchema, LegacyOrderCheckoutSessionMetadataSchema]);
1298
- //#endregion
1299
- //#region ../commerce/src/purchase/stripeCommissionMetadata.ts
1300
- /** Reasons are payment evidence, not an independent pricing policy. */
1301
- const STRIPE_COMMISSION_FREE_REASONS = [
1302
- "managed_billing",
1303
- "no_commission_plan",
1304
- "billing_evidence_invalid",
1305
- "fee_rounds_to_zero",
1306
- "payment_not_stripe"
1307
- ];
1308
- const historicalContext = {
1309
- currency: z.string().refine((value) => parseCurrencyCode(value) !== null).optional(),
1310
- sourcePlanId: z.string().trim().min(1).optional()
1311
- };
1312
- const percentSchema = z.number().finite().min(0).max(100);
1313
- z.discriminatedUnion("kind", [
1314
- z.object({
1315
- kind: z.literal("commission_free"),
1316
- reason: z.enum(STRIPE_COMMISSION_FREE_REASONS),
1317
- ...historicalContext
1318
- }),
1319
- z.object({
1320
- kind: z.literal("application_fee_amount"),
1321
- amountCents: z.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER),
1322
- percent: percentSchema,
1323
- ...historicalContext
1324
- }),
1325
- z.object({
1326
- kind: z.literal("application_fee_percent"),
1327
- percent: percentSchema,
1328
- ...historicalContext
1329
- })
1330
- ]);
1331
- toNonNegativeCents(0);
1332
- //#endregion
1333
- //#region ../commerce/src/purchase/stripeMinimumCharge.ts
1334
- const STRIPE_MINIMUM_CHARGE_CENTS_BY_CURRENCY = {
1335
- GBP: 30,
1336
- USD: 50,
1337
- EUR: 50,
1338
- AED: 200,
1339
- AUD: 50,
1340
- BGN: 100,
1341
- BRL: 50,
1342
- CAD: 50,
1343
- CHF: 50,
1344
- CZK: 1500,
1345
- DKK: 250,
1346
- HKD: 400,
1347
- HUF: 17500,
1348
- JPY: 50,
1349
- MXN: 1e3,
1350
- MYR: 200,
1351
- NOK: 300,
1352
- NZD: 50,
1353
- PLN: 200,
1354
- RON: 200,
1355
- SEK: 300,
1356
- SGD: 50,
1357
- THB: 1e3
1358
- };
1359
- function isStripeMinimumChargeCurrency(currency) {
1360
- return currency in STRIPE_MINIMUM_CHARGE_CENTS_BY_CURRENCY;
1361
- }
1362
- function getStripeMinimumChargeRequirement(rawCurrency) {
1363
- let currency;
1364
- try {
1365
- currency = normalizeCurrencyCode(rawCurrency);
1366
- } catch {
1367
- return null;
1368
- }
1369
- const currencyKey = currency;
1370
- if (!isStripeMinimumChargeCurrency(currencyKey)) return null;
1371
- return {
1372
- currency,
1373
- minimumAmountCents: STRIPE_MINIMUM_CHARGE_CENTS_BY_CURRENCY[currencyKey]
1374
- };
1375
- }
1376
- //#endregion
1377
- //#region ../commerce/src/purchase/event-registration-errors.ts
1378
- const eventRegistrationErrors = {
1379
- registrationClosed: {
1380
- message: "Booking is currently closed for this event. Please contact the organiser if you’d like to find out more.",
1381
- action: "none"
1382
- },
1383
- paymentInvestigationRequired: {
1384
- message: "We still can’t confirm your payment. Please don’t make another payment. Contact the organiser so they can check your booking.",
1385
- action: "none"
1386
- },
1387
- paymentProviderUnavailable: {
1388
- message: "We couldn’t reach the payment provider. Please try again in a minute.",
1389
- action: "retry"
1390
- },
1391
- paymentPageUnavailable: {
1392
- message: "We couldn’t open the payment page. Please refresh this page and try again. If this keeps happening, contact the organiser for help.",
1393
- action: "retry"
1394
- },
1395
- paymentUnavailable: {
1396
- message: "Online payment is not available for this event right now. Please contact the organiser for help with booking.",
1397
- action: "none"
1398
- },
1399
- capacityChanged: {
1400
- message: "Sorry, there aren’t enough places left for your selection. Please check the available places and choose again.",
1401
- action: "places"
1402
- },
1403
- selectionChanged: {
1404
- message: "The booking options for this event have changed. Please check the latest options and choose your places again.",
1405
- action: "places"
1406
- },
1407
- registrationPreparationChanged: {
1408
- message: "The booking options for this event have changed. Please check the latest options and choose your places again.",
1409
- action: "places"
1410
- },
1411
- registrationAlreadyExists: {
1412
- message: "You already have a booking for this event. Please check your bookings to see its status. If you need help, contact the organiser.",
1413
- action: "portal"
1414
- },
1415
- holdExpired: {
1416
- message: "Your reservation has timed out. Please check availability and choose your places again.",
1417
- action: "start"
1418
- },
1419
- waitlistUnavailable: {
1420
- message: "Sorry, the waiting list place offered in this invitation is no longer available. Please check the event for available places or contact the organiser for help.",
1421
- action: "event"
1422
- },
1423
- paymentContextMismatch: {
1424
- message: "The payment options for this event have changed. Please check the latest options before continuing.",
1425
- action: "payment-options"
1426
- },
1427
- verificationFailed: {
1428
- message: "We couldn’t confirm this request came from a person. Please refresh the page and try again.",
1429
- action: "none"
1430
- },
1431
- idempotencyConflict: {
1432
- message: "You’ve already started booking this event. Please finish in the other tab if it’s still open, or check your booking status before starting again.",
1433
- action: "portal"
1434
- },
1435
- invalidCommitInput: {
1436
- message: "We couldn’t accept your booking details. Please check the information you entered and try again. If this keeps happening, contact the organiser for help.",
1437
- action: "details"
1438
- }
1439
- };
1440
- function parseEventRegistrationErrorReason(value) {
1441
- return typeof value === "string" && Object.prototype.hasOwnProperty.call(eventRegistrationErrors, value) ? value : null;
1442
- }
1443
- //#endregion
1444
1146
  //#region ../blocks/src/system/runtime/shared/useWaitlistClaim.state.ts
1445
1147
  const DEFAULT_WAITLIST_CLAIM_ERROR = "Online booking is unavailable right now. Please contact the organiser for help with booking.";
1446
1148
  function createInitialWaitlistClaimState(hasToken) {
@@ -2608,13 +2310,15 @@ const eventRegistrationWizardDeps = {
2608
2310
  useWaitlistClaim,
2609
2311
  useEventRegistrationStripeReturn,
2610
2312
  useEventRegistrationSubmit,
2611
- useDiscountCodeUi
2313
+ useDiscountCodeUi,
2314
+ useBookingNowIso
2612
2315
  };
2613
2316
  function useEventRegistrationWizard(options) {
2614
2317
  return useEventRegistrationWizardWithDeps(options, eventRegistrationWizardDeps);
2615
2318
  }
2616
2319
  function useEventRegistrationWizardWithDeps(options, deps) {
2617
2320
  const api = useBlockApi();
2321
+ const nowIso = deps.useBookingNowIso();
2618
2322
  const registrationEvents = useMemo(() => [...toRegistrationEvents(options.events ?? []), ...toWholeSeriesRegistrationEvents(options.events ?? [])], [options.events]);
2619
2323
  const scopedEvents = useMemo(() => {
2620
2324
  return resolveEventRegistrationScopedEvents(registrationEvents, {
@@ -3145,6 +2849,7 @@ function useEventRegistrationWizardWithDeps(options, deps) {
3145
2849
  });
3146
2850
  return {
3147
2851
  api,
2852
+ nowIso,
3148
2853
  anchorId: options.anchorId,
3149
2854
  occurrenceContext: options.occurrenceContext,
3150
2855
  registrationTarget,
@@ -3693,6 +3398,16 @@ function resolveEntitlementSummaryCopy(method, passCreditsRemaining) {
3693
3398
  function getSummaryRow(option, label) {
3694
3399
  return option.summaryRows.find((row) => row.label === label)?.value ?? null;
3695
3400
  }
3401
+ function getFlexibleBalanceSummary(option) {
3402
+ if (option?.kind !== "flexible_balance") return null;
3403
+ return {
3404
+ total: getSummaryRow(option, "Total"),
3405
+ dueToday: getSummaryRow(option, "Due today"),
3406
+ remainingBalance: getSummaryRow(option, "Remaining balance"),
3407
+ balanceDueBy: getSummaryRow(option, "Balance due by"),
3408
+ depositPolicy: getSummaryRow(option, "Deposit policy")
3409
+ };
3410
+ }
3696
3411
  function getSelectedDirectPaymentOption(input) {
3697
3412
  const summaryEvent = input.wizard.selectedEvent ?? input.wizard.preSelectedEvent;
3698
3413
  const eligibility = input.wizard.eligibility;
@@ -3703,7 +3418,8 @@ function getSelectedDirectPaymentOption(input) {
3703
3418
  paymentTerms: eligibility.paymentTerms,
3704
3419
  totalPriceCents: input.totalCents,
3705
3420
  currency: input.currency,
3706
- startsAt: getRegistrationStartAt(summaryEvent, input.wizard.occurrenceContext)
3421
+ startsAt: getRegistrationStartAt(summaryEvent, input.wizard.occurrenceContext),
3422
+ nowIso: input.wizard.nowIso
3707
3423
  }).options;
3708
3424
  const requestedKind = input.wizard.paymentSelection.collectionOptionKind;
3709
3425
  return options.find((option) => option.kind === requestedKind) ?? options.find((option) => option.kind === "upfront") ?? options[0] ?? null;
@@ -3753,18 +3469,11 @@ function EventRegistrationSummaryBar(props) {
3753
3469
  const autoAppliedDiscount = wizard.discountCode.trim().length > 0 ? null : wizard.autoAppliedDiscount;
3754
3470
  const autoAppliedDiscountCents = Math.max(0, autoAppliedDiscount?.computedAmountCents ?? 0);
3755
3471
  const discountedTotalCents = Math.max(0, subtotalCents - autoAppliedDiscountCents);
3756
- const selectedDirectPaymentOption = getSelectedDirectPaymentOption({
3472
+ const flexibleBalanceSummary = getFlexibleBalanceSummary(getSelectedDirectPaymentOption({
3757
3473
  wizard,
3758
3474
  totalCents: discountedTotalCents,
3759
3475
  currency: summaryCurrency
3760
- });
3761
- const flexibleBalanceSummary = selectedDirectPaymentOption?.kind === "flexible_balance" ? {
3762
- total: getSummaryRow(selectedDirectPaymentOption, "Total"),
3763
- dueToday: getSummaryRow(selectedDirectPaymentOption, "Due today"),
3764
- remainingBalance: getSummaryRow(selectedDirectPaymentOption, "Remaining balance"),
3765
- balanceDueBy: getSummaryRow(selectedDirectPaymentOption, "Balance due by"),
3766
- depositPolicy: getSummaryRow(selectedDirectPaymentOption, "Deposit policy")
3767
- } : null;
3476
+ }));
3768
3477
  const scheduleSummary = summaryEvent ? getScheduleSummary(wizard, summaryEvent) : null;
3769
3478
  const bookingUnit = summaryEvent?.registrationSubject.kind === "wholeSeries" ? "place" : "ticket";
3770
3479
  const productMethod = isProductMethod(wizard.paymentSelection.method);
@@ -5210,6 +4919,17 @@ function canContinueWithPaymentSelection(selection, directPaymentSelection) {
5210
4919
  case null: return false;
5211
4920
  }
5212
4921
  }
4922
+ function buildEventDirectPaymentOptions(input) {
4923
+ return buildEventRegistrationPaymentOptionsViewModel({
4924
+ eventTitle: input.event?.title ?? "Event",
4925
+ approvedPaymentOptions: input.eligibility.paymentOptions,
4926
+ paymentTerms: input.eligibility.paymentTerms,
4927
+ totalPriceCents: input.totalPriceCents,
4928
+ currency: input.eligibility.currency,
4929
+ startsAt: getRegistrationStartAt(input.event, input.occurrenceContext),
4930
+ nowIso: input.nowIso
4931
+ }).options;
4932
+ }
5213
4933
  /**
5214
4934
  * Payment Selection Step
5215
4935
  *
@@ -5217,19 +4937,18 @@ function canContinueWithPaymentSelection(selection, directPaymentSelection) {
5217
4937
  * Fetches eligible passes/memberships using the user's email.
5218
4938
  * Also shows available passes/memberships for purchase (upsell).
5219
4939
  */
5220
- const PaymentSelectionStep = ({ event, occurrenceContext, ticketsCount, email, isAuthenticated = false, creditState = { kind: "not_authenticated" }, directPaymentTotalCents, manualDiscountPending = false, selectedSelection, onSelectionChange, eligibility, eligibilityLoading, eligibilityError = null, onRequestLogin, onStateChange }) => {
4940
+ const PaymentSelectionStep = ({ event, occurrenceContext, ticketsCount, email, isAuthenticated = false, creditState = { kind: "not_authenticated" }, directPaymentTotalCents, manualDiscountPending = false, selectedSelection, onSelectionChange, eligibility, eligibilityLoading, eligibilityError = null, onRequestLogin, onStateChange, nowIso }) => {
5221
4941
  const occurrenceId = occurrenceContext?.id ?? (event?.registrationSubject.kind === "occurrence" ? event.registrationSubject.occurrenceId : "");
5222
4942
  const selectedMethod = selectedSelection.method;
5223
4943
  const totalPrice = directPaymentTotalCents;
5224
4944
  const canShowDirectPaymentOptions = Boolean(eligibility?.requiresPayment && eligibility.price);
5225
- const directPaymentOptions = eligibility && canShowDirectPaymentOptions ? buildEventRegistrationPaymentOptionsViewModel({
5226
- eventTitle: event?.title ?? "Event",
5227
- approvedPaymentOptions: eligibility.paymentOptions,
5228
- paymentTerms: eligibility.paymentTerms,
4945
+ const directPaymentOptions = eligibility && canShowDirectPaymentOptions ? buildEventDirectPaymentOptions({
4946
+ event,
4947
+ occurrenceContext,
4948
+ eligibility,
5229
4949
  totalPriceCents: totalPrice,
5230
- currency: eligibility.currency,
5231
- startsAt: getRegistrationStartAt(event, occurrenceContext)
5232
- }).options : [];
4950
+ nowIso
4951
+ }) : [];
5233
4952
  const directPaymentSelectionState = resolveEventRegistrationDirectPaymentSelection({
5234
4953
  options: directPaymentOptions,
5235
4954
  selection: selectedSelection
@@ -5462,6 +5181,22 @@ function AttendeeDetailsContent(props) {
5462
5181
  })
5463
5182
  ] });
5464
5183
  }
5184
+ function EventDiscountCodeDisclosure(props) {
5185
+ const { wizard } = props;
5186
+ if (wizard.discountsAvailableLoading || !wizard.shouldShowDiscountToggle) return null;
5187
+ return /* @__PURE__ */ jsx(DiscountCodeDisclosure, {
5188
+ surface: "event-registration",
5189
+ isOpen: wizard.discountUiOpen,
5190
+ code: wizard.discountCode,
5191
+ onOpen: () => wizard.setDiscountUiOpen(true),
5192
+ onChange: wizard.setDiscountCode,
5193
+ onRemove: () => {
5194
+ wizard.setDiscountCode("");
5195
+ wizard.setDiscountUiOpen(false);
5196
+ },
5197
+ id: "er-discount-code"
5198
+ });
5199
+ }
5465
5200
  function PaymentSelectionContent(props) {
5466
5201
  const { wizard } = props;
5467
5202
  const subtotalCents = wizard.ticketSelectionSubtotalCents;
@@ -5495,19 +5230,9 @@ function PaymentSelectionContent(props) {
5495
5230
  eligibilityLoading: wizard.eligibilityLoading,
5496
5231
  eligibilityError: wizard.eligibilityError,
5497
5232
  onRequestLogin: () => wizard.setShowMagicLinkModal(true),
5498
- onStateChange: wizard.handlePaymentStepStateChange
5499
- }), wizard.discountsAvailableLoading ? null : wizard.shouldShowDiscountToggle ? /* @__PURE__ */ jsx(DiscountCodeDisclosure, {
5500
- surface: "event-registration",
5501
- isOpen: wizard.discountUiOpen,
5502
- code: wizard.discountCode,
5503
- onOpen: () => wizard.setDiscountUiOpen(true),
5504
- onChange: wizard.setDiscountCode,
5505
- onRemove: () => {
5506
- wizard.setDiscountCode("");
5507
- wizard.setDiscountUiOpen(false);
5508
- },
5509
- id: "er-discount-code"
5510
- }) : null] });
5233
+ onStateChange: wizard.handlePaymentStepStateChange,
5234
+ nowIso: wizard.nowIso
5235
+ }), /* @__PURE__ */ jsx(EventDiscountCodeDisclosure, { wizard })] });
5511
5236
  }
5512
5237
  function EventRegistrationWizardContent(props) {
5513
5238
  const { wizard } = props;
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import { O as clsx } from "./colorStyles-j5U9v5JA.mjs";
3
- import { Kt as err, Wt as assertNever, qt as ok, t as defineIslandPropsDecoder } from "./propsDecoder-D1OtGXDV.mjs";
4
- import { n as useBlockApi, t as BlockApiProvider } from "./context-eW97E945.mjs";
3
+ import { Kt as err, Wt as assertNever, qt as ok, t as defineIslandPropsDecoder } from "./propsDecoder-DZd6RJeA.mjs";
4
+ import { n as useBlockApi, t as BlockApiProvider } from "./context-DFmaZa-Q.mjs";
5
5
  import { n as isSpamProtectionEnabled, r as AltchaWidget, t as getChallengeUrl } from "./src-B833rYRr.mjs";
6
- import { t as ThemedButton } from "./ThemedButton-C7CeUJjW.mjs";
6
+ import { t as ThemedButton } from "./ThemedButton-CKV1Jh2m.mjs";
7
7
  import { t as FeedbackMessage } from "./FeedbackMessage-CtLvvS_d.mjs";
8
8
  import { t as CheckboxChoice } from "./CheckboxChoice-B33MqoUo.mjs";
9
9
  import { t as mountReactIsland } from "./reactMount-SY8AVRof.mjs";
@@ -1,8 +1,8 @@
1
1
  "use client";
2
- import { j as staticHeaderChromeRuntime, r as buildCartDisplay, t as defineIslandPropsDecoder } from "./propsDecoder-D1OtGXDV.mjs";
3
- import { n as ThemedButtonLink, t as ThemedButton } from "./ThemedButton-C7CeUJjW.mjs";
2
+ import { j as staticHeaderChromeRuntime, r as buildCartDisplay, t as defineIslandPropsDecoder } from "./propsDecoder-DZd6RJeA.mjs";
3
+ import { n as ThemedButtonLink, t as ThemedButton } from "./ThemedButton-CKV1Jh2m.mjs";
4
4
  import { t as resolveDedicatedCheckoutPath } from "./checkoutRoute-ClwHwYVA.mjs";
5
- import { n as useCommerceCart } from "./shop-commerce-store-Bxm75Pg6.mjs";
5
+ import { n as useCommerceCart } from "./shop-commerce-store-vicweP2K.mjs";
6
6
  import { t as ModalShell } from "./ModalShell-CqkBvBIC.mjs";
7
7
  import * as React$1 from "react";
8
8
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";