@riverbankcms/sdk 0.146.0 → 0.147.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 (195) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/{PreviewEditorSidebar-kg2r2Fyi.mjs → PreviewEditorSidebar-DtpB3_sS.mjs} +51 -33
  3. package/dist/{PreviewEditorUI-sWMLp5dT.mjs → PreviewEditorUI-DxTLgaHo.mjs} +3 -3
  4. package/dist/{PreviewQueryProvider-Cg51xq1w.mjs → PreviewQueryProvider-Dd4dxOiU.mjs} +1 -1
  5. package/dist/{SdkPreviewModeRuntime-h2ti3Hch.mjs → SdkPreviewModeRuntime-DMMNCngt.mjs} +39 -12
  6. package/dist/{SiteChromeCustomizeContext-DEACFH9m.mjs → SiteChromeCustomizeContext-DQXZXiqS.mjs} +2499 -1682
  7. package/dist/_dts/ai/src/contracts/proposals.d.ts +198 -0
  8. package/dist/_dts/ai/src/contracts/siteStyleProposalSchemas.d.ts +18 -0
  9. package/dist/_dts/api/src/accountApi.d.ts +5 -5
  10. package/dist/_dts/api/src/bookingConfig.d.ts +16 -0
  11. package/dist/_dts/api/src/bookingManagementEndpoints.d.ts +4 -13
  12. package/dist/_dts/api/src/bookingOperations.d.ts +2 -44
  13. package/dist/_dts/api/src/bookingPeople.d.ts +92 -0
  14. package/dist/_dts/api/src/bookingPeopleEndpointDefinitions.d.ts +38 -0
  15. package/dist/_dts/api/src/bookingRecords.d.ts +11 -49
  16. package/dist/_dts/api/src/bookingSettingsSections.d.ts +1 -1
  17. package/dist/_dts/api/src/bookings.d.ts +1 -0
  18. package/dist/_dts/api/src/endpoints.d.ts +587 -561
  19. package/dist/_dts/api/src/eventManagementContracts.d.ts +23 -8
  20. package/dist/_dts/api/src/eventManagementEndpointDefinitions.d.ts +1 -1
  21. package/dist/_dts/api/src/index.d.ts +3 -2
  22. package/dist/_dts/api/src/indexCoreTypes.d.ts +1 -1
  23. package/dist/_dts/api/src/launchReadiness.d.ts +1 -6
  24. package/dist/_dts/api/src/mailingListIntegration.d.ts +6 -0
  25. package/dist/_dts/api/src/navigation/dashboardBookingsNav.d.ts +1 -1
  26. package/dist/_dts/api/src/newsletterEndpointDefinitions.d.ts +15 -0
  27. package/dist/_dts/api/src/occurrenceScheduling.d.ts +19 -0
  28. package/dist/_dts/api/src/publicAppointmentBookingContracts.d.ts +48 -0
  29. package/dist/_dts/api/src/publicExperience/eventEndpoints.d.ts +7 -0
  30. package/dist/_dts/api/src/sdk-event-upsert.d.ts +15 -0
  31. package/dist/_dts/api/src/sdkCourseBooking.d.ts +4 -4
  32. package/dist/_dts/api/src/siteLifecycleEndpoints.d.ts +61 -0
  33. package/dist/_dts/api/src/siteManagementEndpoints.d.ts +5 -18
  34. package/dist/_dts/api/src/siteOnboarding.d.ts +2 -14
  35. package/dist/_dts/blocks/src/PageRenderer.d.ts +3 -4
  36. package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +8 -0
  37. package/dist/_dts/blocks/src/index.d.ts +1 -1
  38. package/dist/_dts/blocks/src/pageRenderAdmission.d.ts +22 -4
  39. package/dist/_dts/blocks/src/pageRendererContracts.d.ts +2 -0
  40. package/dist/_dts/blocks/src/system/blocks/newsletter-signup.d.ts +4 -1
  41. package/dist/_dts/blocks/src/system/runtime/api/types/appointments.d.ts +4 -0
  42. package/dist/_dts/blocks/src/system/runtime/api/types/events.d.ts +12 -0
  43. package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +12 -0
  44. package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +6 -0
  45. package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessBookingFlow.d.ts +8 -0
  46. package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessEventRegistrationFlow.d.ts +2 -0
  47. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.completion.d.ts +9 -0
  48. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.headless.state.d.ts +9 -0
  49. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.interactive.d.ts +19 -0
  50. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.mailing-list-choice.d.ts +5 -0
  51. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.mailing-list-note.d.ts +3 -0
  52. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.mailing-list-state.d.ts +9 -0
  53. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.reserved-fields.d.ts +1 -1
  54. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.server.d.ts +1 -1
  55. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.state.d.ts +2 -0
  56. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.submit-handler.d.ts +8 -0
  57. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.submit-success.d.ts +9 -0
  58. package/dist/_dts/blocks/src/system/runtime/nodes/booking-runtime-sources.d.ts +3 -0
  59. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/AttendeeDetailsStep.d.ts +3 -0
  60. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/SuccessStep.d.ts +3 -0
  61. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.contract.d.ts +3 -0
  62. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/sessionStorage.d.ts +2 -0
  63. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +6 -0
  64. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationSubmit.d.ts +3 -0
  65. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +8 -0
  66. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.interactive.d.ts +9 -0
  67. package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.block-submission.d.ts +2 -4
  68. package/dist/_dts/blocks/src/system/runtime/resolver.d.ts +2 -0
  69. package/dist/_dts/blocks/src/system/runtime/shared/components/BookingMailingListNote.d.ts +6 -0
  70. package/dist/_dts/blocks/src/system/runtime/shared/mailingListSignupCopy.d.ts +6 -0
  71. package/dist/_dts/blocks/src/system/runtime/shared/types.d.ts +1 -0
  72. package/dist/_dts/blocks/src/system/transforms/registry/_utils/surfaceForegroundStyles.d.ts +3 -2
  73. package/dist/_dts/blocks/src/system/transforms/registry/core.d.ts +2 -0
  74. package/dist/_dts/blocks/src/system/transforms/registry/layout.d.ts +1 -3
  75. package/dist/_dts/core/src/index.d.ts +1 -1
  76. package/dist/_dts/core/src/mailing-list-runtime.d.ts +15 -0
  77. package/dist/_dts/core/src/mailing-list-setup.d.ts +2 -0
  78. package/dist/_dts/core/src/mailing-list-submission.d.ts +6 -0
  79. package/dist/_dts/core/src/navigation-portal-labels.d.ts +9 -0
  80. package/dist/_dts/core/src/participants.d.ts +0 -38
  81. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +102 -22
  82. package/dist/_dts/editor-blocks/src/block-editor/actionPresentation.d.ts +1 -0
  83. package/dist/_dts/preview-next/src/client/blocks/EditablePageRenderer.d.ts +7 -1
  84. package/dist/_dts/preview-next/src/client/blocks/composer/types.d.ts +4 -3
  85. package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +1 -0
  86. package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +1 -0
  87. package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +1 -1
  88. package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +2 -2
  89. package/dist/_dts/sdk/src/version.d.ts +1 -1
  90. package/dist/_dts/theme-core/src/buttons/effects/types.d.ts +1 -1
  91. package/dist/_dts/theme-core/src/footer/effectiveNavLinkStyle.d.ts +13 -0
  92. package/dist/_dts/theme-core/src/footer/index.d.ts +1 -0
  93. package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
  94. package/dist/_dts/theme-core/src/header/effectiveNavLinkStyle.d.ts +17 -0
  95. package/dist/_dts/theme-core/src/header/generateHeaderLogoStyles.d.ts +15 -0
  96. package/dist/_dts/theme-core/src/header/generateHeaderNavLinkStyles.d.ts +4 -0
  97. package/dist/_dts/theme-core/src/header/index.d.ts +3 -0
  98. package/dist/_dts/theme-core/src/header/legacyNavLinkStyle.d.ts +1 -1
  99. package/dist/_dts/theme-core/src/header/openingForegroundProjection.d.ts +7 -0
  100. package/dist/_dts/theme-core/src/header/rootPaint.d.ts +4 -0
  101. package/dist/_dts/theme-core/src/navigation/effectPolicy.d.ts +38 -0
  102. package/dist/_dts/theme-core/src/navigation/generateNavLinkCSS.d.ts +4 -0
  103. package/dist/_dts/theme-core/src/navigation/types.d.ts +4 -0
  104. package/dist/_dts/theme-core/src/site-styles/accessibleSurfaces.d.ts +1 -1
  105. package/dist/_dts/theme-core/src/surfaces/foregroundContract.d.ts +7 -0
  106. package/dist/_dts/theme-core/src/surfaces/foregroundInteraction.d.ts +29 -22
  107. package/dist/_dts/theme-core/src/surfaces/foregroundRoles.d.ts +10 -2
  108. package/dist/_dts/theme-core/src/surfaces/resolveSurfaceForeground.d.ts +9 -0
  109. package/dist/_dts/theme-core/src/utils/cssDeclarations.d.ts +2 -0
  110. package/dist/_dts/ui/src/badge.d.ts +2 -1
  111. package/dist/_dts/ui/src/button.d.ts +1 -1
  112. package/dist/_dts/ui/src/combobox-keys.d.ts +23 -0
  113. package/dist/_dts/ui/src/combobox-rows.d.ts +34 -0
  114. package/dist/_dts/ui/src/combobox.d.ts +26 -1
  115. package/dist/_dts/ui/src/date-picker.d.ts +5 -8
  116. package/dist/_dts/ui/src/editor-item-card.d.ts +1 -0
  117. package/dist/_dts/ui/src/field-trigger.d.ts +39 -0
  118. package/dist/_dts/ui/src/fieldControl.d.ts +27 -0
  119. package/dist/_dts/ui/src/index.d.ts +4 -1
  120. package/dist/_dts/ui/src/native-select.d.ts +8 -0
  121. package/dist/_dts/ui/src/popover.d.ts +7 -1
  122. package/dist/_dts/ui/src/segmented-control.d.ts +4 -0
  123. package/dist/_dts/ui/src/surface.d.ts +1 -1
  124. package/dist/client/{BookingConsentAgreement-BQKL045f.mjs → BookingMailingListNote-1n4Ch_u_.mjs} +15 -4
  125. package/dist/client/{CheckboxChoice--W2n6yKs.mjs → CheckboxChoice-B33MqoUo.mjs} +1 -1
  126. package/dist/client/{DiscountCodeDisclosure-CsOtjFY7.mjs → DiscountCodeDisclosure-CKJtz0mY.mjs} +1 -1
  127. package/dist/client/{EventCombined.client-BdRjVbhH.mjs → EventCombined.client-C0pgma9y.mjs} +7 -7
  128. package/dist/client/{EventListing.client-DBxC6xOU.mjs → EventListing.client-4fhLOvHP.mjs} +2 -2
  129. package/dist/client/{LeafletStaticMap-mHEJKrTs.mjs → LeafletStaticMap-DScC4F3w.mjs} +1 -1
  130. package/dist/client/{scrollToBlock-BNgaEUpo.mjs → TerminalPanel-B5ZUsYhe.mjs} +77 -77
  131. package/dist/client/{ThemedButton-CE5KYT6z.mjs → ThemedButton-DoVIV1Ao.mjs} +2 -2
  132. package/dist/client/{accordion-BEQNSptH.mjs → accordion-CoT5g7zo.mjs} +1 -1
  133. package/dist/client/{bookingForm-AMr-s5vw.mjs → bookingForm-BWxB46xD.mjs} +226 -106
  134. package/dist/client/bookings.mjs +367 -188
  135. package/dist/client/{carousel-Bbt_QgJy.mjs → carousel-DtNYWFd3.mjs} +2 -2
  136. package/dist/client/{carousel.client-jahpU9Vz.mjs → carousel.client-A2lG-9od.mjs} +1 -1
  137. package/dist/client/{cart-CnWi30zJ.mjs → cart-z4qZih1Y.mjs} +3 -3
  138. package/dist/client/{checkout-f3nkWgd4.mjs → checkout-DpL7euFH.mjs} +3 -3
  139. package/dist/client/{checkoutUrls-CW3-78uu.mjs → checkoutUrls-BEfR7kVu.mjs} +1 -1
  140. package/dist/client/client.mjs +2125 -1420
  141. package/dist/client/{colorStyles-CuJBiS-1.mjs → colorStyles-j5U9v5JA.mjs} +5 -1
  142. package/dist/client/{context-Bc8T6pCe.mjs → context-C8TinPJc.mjs} +1 -1
  143. package/dist/client/{dates-DUsCEzLb.mjs → dates-vwwxTeB0.mjs} +2 -2
  144. package/dist/client/{eventCalendar-CKwgXui5.mjs → eventCalendar-DIbHfJXO.mjs} +10 -10
  145. package/dist/client/{eventCombined-CBAOSTGR.mjs → eventCombined-DoGMJ6cg.mjs} +4 -4
  146. package/dist/client/{eventDetails-Dh-_WiBD.mjs → eventDetails-BjN9v6a1.mjs} +4 -4
  147. package/dist/client/{eventListing-CA3frIH5.mjs → eventListing-DajjWgOv.mjs} +4 -4
  148. package/dist/client/{eventRegistration-BHtsgdcg.mjs → eventRegistration-DMq9gMA-.mjs} +109 -41
  149. package/dist/client/{form-C2h3YAcg.mjs → form-Qf6qTbos.mjs} +5 -5
  150. package/dist/client/{headerSection-lwMuMTH9.mjs → headerSection-D7qJrqFX.mjs} +3 -3
  151. package/dist/client/hooks.mjs +661 -116
  152. package/dist/client/{locationMap-DJ2bLODV.mjs → locationMap-CCF9-t_0.mjs} +4 -4
  153. package/dist/client/{FieldValidationMessage-AYanWFb-.mjs → mailingListSignupCopy-DZSHZrm6.mjs} +14 -1
  154. package/dist/client/{media-BtJ37tzS.mjs → media-CwBGetqC.mjs} +1 -1
  155. package/dist/client/{newsletterForm-8Pu5K32g.mjs → newsletterForm-DzCLSP4S.mjs} +6 -6
  156. package/dist/client/{pricing-HHx3IgBz.mjs → pricing-Cgxv2KLC.mjs} +1 -1
  157. package/dist/client/{productDetail-C_1odnAf.mjs → productDetail-ru9w5GHx.mjs} +3 -3
  158. package/dist/client/{productList-CtCv-Nmx.mjs → productList-zaapKSl-.mjs} +3 -3
  159. package/dist/client/{propsDecoder-Dcgsncxb.mjs → propsDecoder-CwvvNOHx.mjs} +52 -6
  160. package/dist/client/rendering/client.mjs +951 -369
  161. package/dist/client/rendering/islands.mjs +19 -19
  162. package/dist/client/rendering.mjs +2153 -1393
  163. package/dist/client/{routeIslandApiConfig-CWLP7wu3.mjs → routeIslandApiConfig-BwVFo0Y4.mjs} +1 -1
  164. package/dist/client/{shop-commerce-B88zmWWo.mjs → shop-commerce-De7gEnkA.mjs} +8 -8
  165. package/dist/client/{shop-commerce-store-DtSfkKuX.mjs → shop-commerce-store-B3MCxIBW.mjs} +1 -1
  166. package/dist/client/{shop-DQXrQ8kJ.mjs → shop-mktkXvbV.mjs} +7 -7
  167. package/dist/client/{shopShared-cuaONpkJ.mjs → shopShared-TqExh235.mjs} +5 -5
  168. package/dist/client/{useEventFilters-Bukew6Gb.mjs → useEventFilters-n_OjkIjX.mjs} +8 -8
  169. package/dist/preview-next/before-render.mjs +122 -50
  170. package/dist/preview-next/client/runtime.mjs +4 -4
  171. package/dist/preview-next/editor-base.css +53 -2
  172. package/dist/preview-next/editor-chrome.css +7 -4
  173. package/dist/preview-next/keepAlive.mjs +122 -50
  174. package/dist/preview-next/middleware.mjs +122 -50
  175. package/dist/{previewAuthStore-h5IgbSp4.mjs → previewAuthStore-C_EHQ5XA.mjs} +122 -50
  176. package/dist/{sdk-runtime-DTc1uIXn.mjs → sdk-runtime-BIkJg5y1.mjs} +2 -2
  177. package/dist/{separator-BpHS1KZK.mjs → separator-C9qDP95Z.mjs} +1 -1
  178. package/dist/server/components.mjs +25345 -24942
  179. package/dist/server/config-validation.mjs +711 -163
  180. package/dist/server/config.mjs +711 -163
  181. package/dist/server/data.mjs +709 -162
  182. package/dist/server/index.mjs +123 -51
  183. package/dist/server/navigation.mjs +13 -2
  184. package/dist/server/next.mjs +4538 -4169
  185. package/dist/server/page-converter.mjs +107 -64
  186. package/dist/server/prebuild.mjs +1 -1
  187. package/dist/server/rendering/server.mjs +2509 -2104
  188. package/dist/server/rendering.mjs +25526 -25104
  189. package/dist/server/routing.mjs +750 -289
  190. package/dist/server/server.mjs +671 -148
  191. package/dist/server/theme-bridge.mjs +66 -17
  192. package/dist/server/theme.mjs +5 -1
  193. package/dist/styles/index.css +32 -4
  194. package/package.json +1 -1
  195. package/dist/_dts/core/src/participant-identity.d.ts +0 -135
@@ -1638,9 +1638,6 @@ var init_participants = __esmMin((() => {
1638
1638
  init_result$1();
1639
1639
  init_string();
1640
1640
  }));
1641
- var init_participant_identity = __esmMin((() => {
1642
- init_assertNever$1();
1643
- }));
1644
1641
  var init_public_url_validation = __esmMin((() => {}));
1645
1642
  var init_public_profile = __esmMin((() => {
1646
1643
  init_public_url_validation();
@@ -2027,17 +2024,39 @@ function parseMailingListRuntimeContext(value) {
2027
2024
  if (!isRecord$22(value)) return invalidRuntimeContext();
2028
2025
  if (value.tag === "not_configured") return ok$2({ tag: "not_configured" });
2029
2026
  if (value.tag !== "configured") return invalidRuntimeContext();
2027
+ return parseConfiguredRuntimeContext(value);
2028
+ }
2029
+ function parseConfiguredRuntimeContext(value) {
2030
2030
  const revision = parseMailingListSetupRevision(value.revision);
2031
2031
  const form = parseMailingListGlobalForm(value.form);
2032
2032
  const provider = parseRuntimeProvider(value.provider);
2033
- if (revision === null || !form.ok || provider === null) return invalidRuntimeContext();
2033
+ const bookingSignup = parseBookingSignupOffer(value.bookingSignup);
2034
+ if (revision === null || !form.ok || provider === null || bookingSignup === null) return invalidRuntimeContext();
2034
2035
  return ok$2({
2035
2036
  tag: "configured",
2036
2037
  revision,
2038
+ bookingSignup,
2037
2039
  form: form.value,
2038
2040
  provider
2039
2041
  });
2040
2042
  }
2043
+ function resolveBookingSignupOffer(context, siteName) {
2044
+ const name = siteName?.trim() ?? "";
2045
+ return context?.tag === "configured" && context.bookingSignup.tag === "offered" ? { siteName: name.length > 0 ? name : "this site" } : null;
2046
+ }
2047
+ function parseBookingSignupOffer(value) {
2048
+ if (value === void 0) return {
2049
+ tag: "unavailable",
2050
+ reason: "disabled"
2051
+ };
2052
+ if (!isRecord$22(value)) return null;
2053
+ if (value.tag === "offered") return { tag: "offered" };
2054
+ if (value.tag === "unavailable" && (value.reason === "disabled" || value.reason === "fields" || value.reason === "destination")) return {
2055
+ tag: "unavailable",
2056
+ reason: value.reason
2057
+ };
2058
+ return null;
2059
+ }
2041
2060
  function parseRuntimeProvider(value) {
2042
2061
  if (!isRecord$22(value)) return null;
2043
2062
  switch (value.provider) {
@@ -2135,6 +2154,7 @@ var init_mailing_list_runtime = __esmMin((() => {
2135
2154
  init_mailing_list_identifiers();
2136
2155
  init_mailing_list_setup_parser();
2137
2156
  init_result$1();
2157
+ init_mailing_list_setup();
2138
2158
  }));
2139
2159
  //#endregion
2140
2160
  //#region ../core/src/mailing-list-submission.ts
@@ -2528,6 +2548,7 @@ var init_booking_verticals = __esmMin((() => {
2528
2548
  var init_navigation_locations = __esmMin((() => {
2529
2549
  init_result$1();
2530
2550
  }));
2551
+ var init_navigation_portal_labels = __esmMin((() => {}));
2531
2552
  var init_event_preset_vocabulary = __esmMin((() => {}));
2532
2553
  var init_event_catalogue = __esmMin((() => {
2533
2554
  init_booking_verticals();
@@ -2573,7 +2594,6 @@ var init_src$2 = __esmMin((() => {
2573
2594
  init_sensitive_collection();
2574
2595
  init_assertNever$1();
2575
2596
  init_participants();
2576
- init_participant_identity();
2577
2597
  init_public_url_validation();
2578
2598
  init_public_profile();
2579
2599
  init_public_experience();
@@ -2614,6 +2634,7 @@ var init_src$2 = __esmMin((() => {
2614
2634
  init_booking_verticals();
2615
2635
  init_event_series_behaviour();
2616
2636
  init_navigation_locations();
2637
+ init_navigation_portal_labels();
2617
2638
  init_event_preset_vocabulary();
2618
2639
  init_event_catalogue();
2619
2640
  }));
@@ -4478,7 +4499,6 @@ var init_expandPalette = __esmMin((() => {
4478
4499
  init_textColor();
4479
4500
  init_onColor();
4480
4501
  }));
4481
- var init_foregroundRoles = __esmMin((() => {}));
4482
4502
  //#endregion
4483
4503
  //#region ../theme-core/src/surfaces/foregroundContract.ts
4484
4504
  function requireSurfaceColorValue(role, value) {
@@ -4490,6 +4510,7 @@ function surfaceForegroundValue(role, outsideProviderFallback = DEFAULT_ROLE_FAL
4490
4510
  const roleVariable = SURFACE_FOREGROUND_CSS_VARS[role];
4491
4511
  const fallback = requireSurfaceColorValue("fallback", outsideProviderFallback);
4492
4512
  if (role === "text") return `var(${roleVariable}, ${fallback})`;
4513
+ if (role === "linkHover") return `var(${roleVariable}, ${surfaceForegroundValue("link", fallback)})`;
4493
4514
  return `var(${roleVariable}, var(${SURFACE_FOREGROUND_CSS_VARS.text}, ${fallback}))`;
4494
4515
  }
4495
4516
  function surfaceForegroundValueWithOpacity(role, opacityPercent) {
@@ -4497,11 +4518,11 @@ function surfaceForegroundValueWithOpacity(role, opacityPercent) {
4497
4518
  return `color-mix(in srgb, ${surfaceForegroundValue(role)} ${opacityPercent}%, transparent)`;
4498
4519
  }
4499
4520
  var SURFACE_FOREGROUND_CSS_VARS, DEFAULT_SURFACE_TEXT_COLOR, DEFAULT_SURFACE_LINK_COLOR, DEFAULT_SURFACE_SUPPORTING_COLOR, DEFAULT_ROLE_FALLBACKS, init_foregroundContract = __esmMin((() => {
4500
- init_foregroundRoles();
4501
4521
  SURFACE_FOREGROUND_CSS_VARS = {
4502
4522
  text: "--rb-surface-text-color",
4503
4523
  heading: "--rb-surface-heading-color",
4504
4524
  link: "--rb-surface-link-color",
4525
+ linkHover: "--rb-surface-link-hover-color",
4505
4526
  supporting: "--rb-surface-supporting-color"
4506
4527
  };
4507
4528
  DEFAULT_SURFACE_TEXT_COLOR = "rgb(var(--tb-text, 17 24 39))";
@@ -4511,6 +4532,7 @@ var SURFACE_FOREGROUND_CSS_VARS, DEFAULT_SURFACE_TEXT_COLOR, DEFAULT_SURFACE_LIN
4511
4532
  text: DEFAULT_SURFACE_TEXT_COLOR,
4512
4533
  heading: DEFAULT_SURFACE_TEXT_COLOR,
4513
4534
  link: DEFAULT_SURFACE_LINK_COLOR,
4535
+ linkHover: DEFAULT_SURFACE_LINK_COLOR,
4514
4536
  supporting: DEFAULT_SURFACE_SUPPORTING_COLOR
4515
4537
  };
4516
4538
  }));
@@ -4605,12 +4627,6 @@ var init_tokens = __esmMin((() => {
4605
4627
  init_colorTokenParts();
4606
4628
  init_resolver$1();
4607
4629
  }));
4608
- var init_foregroundInteraction = __esmMin((() => {
4609
- init_contrast$1();
4610
- init_colorConversion();
4611
- init_colorTokenParts();
4612
- init_tokens();
4613
- }));
4614
4630
  //#endregion
4615
4631
  //#region ../theme-core/src/palette/utils/opaqueSurfaceColor.ts
4616
4632
  /** Resolve an opaque colour, compositing alpha against an explicit underlay. */
@@ -4623,10 +4639,10 @@ function resolveOpaqueSurfaceHex(reference, palette, underlayReference) {
4623
4639
  const parts = parseColorTokenParts(reference);
4624
4640
  if (parts.kind === "token" && parts.opacityPercent !== null) {
4625
4641
  const foregroundHex = normalizePaletteHex(palette[parts.token] ?? "");
4626
- return foregroundHex ? compositeHex(foregroundHex, underlayHex, parts.opacityPercent / 100) : null;
4642
+ return foregroundHex ? compositeHex$1(foregroundHex, underlayHex, parts.opacityPercent / 100) : null;
4627
4643
  }
4628
4644
  const rgba = parseRgba(parts.kind === "raw" ? parts.value : reference);
4629
- return rgba ? compositeHex(rgbToHex(rgba.r, rgba.g, rgba.b), underlayHex, rgba.alpha) : null;
4645
+ return rgba ? compositeHex$1(rgbToHex(rgba.r, rgba.g, rgba.b), underlayHex, rgba.alpha) : null;
4630
4646
  }
4631
4647
  /** Resolve a colour reference only when it is already fully opaque. */
4632
4648
  function resolveConcreteColorHex(reference, palette) {
@@ -4642,7 +4658,7 @@ function resolveConcreteColorHex(reference, palette) {
4642
4658
  if (literal.toLowerCase() === "white") return "#ffffff";
4643
4659
  return normalizePaletteHex(literal);
4644
4660
  }
4645
- function compositeHex(foregroundHex, underlayHex, alpha) {
4661
+ function compositeHex$1(foregroundHex, underlayHex, alpha) {
4646
4662
  const foreground = hexToRgb(foregroundHex);
4647
4663
  const underlay = hexToRgb(underlayHex);
4648
4664
  const channel = (foregroundValue, underlayValue) => Math.round(foregroundValue * alpha + underlayValue * (1 - alpha));
@@ -4678,19 +4694,112 @@ var init_opaqueSurfaceColor = __esmMin((() => {
4678
4694
  init_colorTokenParts();
4679
4695
  init_colorConversion();
4680
4696
  }));
4697
+ //#endregion
4698
+ //#region ../theme-core/src/surfaces/foregroundInteraction.ts
4699
+ /**
4700
+ * Derive the hover foreground that belongs with a resolved resting foreground.
4701
+ *
4702
+ * A resting foreground is chosen to be legible against a known surface. A hover
4703
+ * state derived from it stays within a bounded distance of that colour, so it
4704
+ * inherits most of the resting colour's contrast margin instead of asserting
4705
+ * an unrelated brand colour that no one checked against the surface.
4706
+ *
4707
+ * That bounded-distance property is what lets this be used on a transparent
4708
+ * overlay header, where the backdrop is only partly knowable: the scrolled
4709
+ * state composites a 60% glass tint over arbitrary page content, so no
4710
+ * compile-time contrast proof is available there. Staying near a colour that
4711
+ * is already trusted in both states is a weaker claim than a contrast proof,
4712
+ * and it is one this function can actually keep.
4713
+ *
4714
+ * Returns `null` when the resting token is not a plain palette token — an
4715
+ * already-faded or raw value has no well-defined softening, and the caller
4716
+ * should leave hover alone rather than guess.
4717
+ */
4718
+ function deriveForegroundHoverToken(restingToken) {
4719
+ const parts = parseColorTokenParts(restingToken);
4720
+ if (parts.kind !== "token") return null;
4721
+ if (parts.opacityPercent !== null) return null;
4722
+ return parseThemeColorToken(`${parts.token}/85`);
4723
+ }
4724
+ /**
4725
+ * Prefer an authored hover that survives every measured backdrop, then a
4726
+ * checked softening of the resting colour. A null backdrop set represents a
4727
+ * trusted treatment: only an explicit authored hover may change the colour.
4728
+ * When neither option works, retain the resting colour and underline it.
4729
+ */
4730
+ function planForegroundHover(input) {
4731
+ const { restingToken, candidate, palette, backdrops } = input;
4732
+ if (candidate && candidate !== restingToken) {
4733
+ if (backdrops === null || survivesEveryBackdrop(candidate, palette, backdrops)) return {
4734
+ kind: "candidate",
4735
+ token: candidate,
4736
+ decoration: "initial"
4737
+ };
4738
+ }
4739
+ const softened = deriveForegroundHoverToken(restingToken);
4740
+ if (softened && backdrops && survivesEveryBackdrop(softened, palette, backdrops)) return {
4741
+ kind: "softened",
4742
+ token: softened,
4743
+ decoration: "initial"
4744
+ };
4745
+ return {
4746
+ kind: "resting",
4747
+ token: restingToken,
4748
+ decoration: "underline"
4749
+ };
4750
+ }
4751
+ function survivesEveryBackdrop(token, palette, backdrops) {
4752
+ return backdrops.length > 0 && backdrops.every((backdrop) => {
4753
+ const foreground = resolveOpaqueSurfaceHex(token, palette, backdrop);
4754
+ return foreground !== null && contrastRatio(foreground, backdrop) >= 4.5;
4755
+ });
4756
+ }
4757
+ var init_foregroundInteraction = __esmMin((() => {
4758
+ init_contrast$1();
4759
+ init_colorConversion();
4760
+ init_colorTokenParts();
4761
+ init_tokens();
4762
+ init_opaqueSurfaceColor();
4763
+ }));
4764
+ var init_foregroundRoles = __esmMin((() => {}));
4765
+ function candidateOrBackground(candidate, backgroundValue) {
4766
+ return candidate ?? backgroundValue ?? null;
4767
+ }
4681
4768
  function resolveTrustedTreatmentForeground(candidates, palette) {
4682
4769
  const text = canonicalToken(candidates.text, palette);
4683
4770
  if (!text) return { kind: "unknown" };
4771
+ return knownForeground({
4772
+ text,
4773
+ heading: canonicalToken(candidates.heading, palette) ?? text,
4774
+ link: canonicalToken(candidates.link, palette) ?? text,
4775
+ supporting: canonicalToken(candidates.supporting, palette) ?? text
4776
+ }, { kind: "trusted-treatment" }, candidates.linkHover, palette);
4777
+ }
4778
+ function knownForeground(roles, provenance, hoverCandidate, palette) {
4779
+ const hover = planForegroundHover({
4780
+ restingToken: roles.link,
4781
+ candidate: canonicalHoverToken(hoverCandidate, palette),
4782
+ palette,
4783
+ backdrops: provenance.kind === "measured" ? [provenance.backdropHex] : null
4784
+ });
4684
4785
  return {
4685
4786
  kind: "known",
4787
+ provenance,
4686
4788
  roles: {
4687
- text,
4688
- heading: canonicalToken(candidates.heading, palette) ?? text,
4689
- link: canonicalToken(candidates.link, palette) ?? text,
4690
- supporting: canonicalToken(candidates.supporting, palette) ?? text
4691
- }
4789
+ ...roles,
4790
+ linkHover: hover.token
4791
+ },
4792
+ hoverDecoration: hover.decoration
4692
4793
  };
4693
4794
  }
4795
+ function canonicalHoverToken(reference, palette) {
4796
+ const token = parseThemeColorToken(reference);
4797
+ if (token) {
4798
+ const parts = parseColorTokenParts(token);
4799
+ if (parts.kind === "token" && resolveConcreteColorHex(parts.token, palette)) return token;
4800
+ }
4801
+ return canonicalToken(reference, palette);
4802
+ }
4694
4803
  function safeTokenOr(candidate, fallback, backgroundHex, palette) {
4695
4804
  return firstSafeToken([candidate], backgroundHex, palette) ?? fallback;
4696
4805
  }
@@ -4738,6 +4847,7 @@ var init_resolveSurfaceForeground = __esmMin((() => {
4738
4847
  init_opaqueSurfaceColor();
4739
4848
  init_colorTokenParts();
4740
4849
  init_themeColorTokens();
4850
+ init_foregroundInteraction();
4741
4851
  FALLBACK_TEXT_TOKENS = [
4742
4852
  "text",
4743
4853
  "primaryForeground",
@@ -6856,7 +6966,7 @@ function presetCategory(recipe) {
6856
6966
  case void 0: return "modern";
6857
6967
  }
6858
6968
  }
6859
- var init_presets$2 = __esmMin((() => {
6969
+ var init_presets$3 = __esmMin((() => {
6860
6970
  init_styles();
6861
6971
  buttonStyleRecipes.map((recipe) => {
6862
6972
  const resolved = resolveButtonStyleSelection(defaultButtonStyleSelectionFor(recipe.id));
@@ -6887,7 +6997,7 @@ var init_buttons = __esmMin((() => {
6887
6997
  init_affordanceIcons();
6888
6998
  init_generateDefaultButtonSystem();
6889
6999
  init_constants$2();
6890
- init_presets$2();
7000
+ init_presets$3();
6891
7001
  init_styles();
6892
7002
  init_styles();
6893
7003
  }));
@@ -7152,7 +7262,7 @@ var init_generateDefaultCardSystem = __esmMin((() => {
7152
7262
  })), init_roles = __esmMin((() => {
7153
7263
  init_types$13();
7154
7264
  init_generateDefaultCardSystem();
7155
- })), init_generateCardCss = __esmMin((() => {
7265
+ })), init_cssDeclarations = __esmMin((() => {})), init_generateCardCss = __esmMin((() => {
7156
7266
  init_resolver$1();
7157
7267
  init_constants$1();
7158
7268
  init_generateDefaultCardSystem();
@@ -7160,10 +7270,13 @@ var init_generateDefaultCardSystem = __esmMin((() => {
7160
7270
  init_roles();
7161
7271
  init_types$13();
7162
7272
  init_surfaces();
7273
+ init_expandPalette();
7274
+ init_cssDeclarations();
7163
7275
  }));
7164
7276
  var init_core$2 = __esmMin((() => {
7165
7277
  init_surfaces();
7166
7278
  init_decorations();
7279
+ init_cssDeclarations();
7167
7280
  }));
7168
7281
  //#endregion
7169
7282
  //#region ../theme-core/src/cards/index.ts
@@ -7434,8 +7547,7 @@ var init_types$10 = __esmMin((() => {
7434
7547
  *
7435
7548
  * These Zod schemas are shared by buttons and nav links for DRY architecture.
7436
7549
  */
7437
- var interactiveTypographySchema, effectApplicationSchema, effectCompositionSchema;
7438
- var init_baseSchema = __esmMin((() => {
7550
+ var interactiveTypographySchema, effectApplicationSchema, effectCompositionSchema, init_baseSchema = __esmMin((() => {
7439
7551
  interactiveTypographySchema = z.object({
7440
7552
  /** Font family source */
7441
7553
  typography: z.enum(["body", "heading"]).default("body"),
@@ -7471,10 +7583,12 @@ var init_baseSchema = __esmMin((() => {
7471
7583
  /** Effects applied on focus */
7472
7584
  focus: z.array(effectApplicationSchema).optional()
7473
7585
  });
7474
- })), navLinkPaddingSchema, navLinkPaddingXSchema, navLinkBorderRadiusSchema, navLinkTextSizeSchema, navLinkLetterSpacingSchema, navLinkContrastTreatmentSchema, navLinkStyleSchema;
7586
+ }));
7587
+ var init_effectPolicy = __esmMin((() => {})), navLinkPaddingSchema, navLinkPaddingXSchema, navLinkBorderRadiusSchema, navLinkTextSizeSchema, navLinkLetterSpacingSchema, navLinkContrastTreatmentSchema, navLinkStyleSchema;
7475
7588
  var init_types$9 = __esmMin((() => {
7476
7589
  init_baseSchema();
7477
7590
  init_themeColorTokens();
7591
+ init_effectPolicy();
7478
7592
  navLinkPaddingSchema = z.enum([
7479
7593
  "none",
7480
7594
  "compact",
@@ -13709,7 +13823,7 @@ var init_semantic = __esmMin((() => {
13709
13823
  }));
13710
13824
  }));
13711
13825
  var ICON_PICKER_PRESETS;
13712
- var init_presets$1 = __esmMin((() => {
13826
+ var init_presets$2 = __esmMin((() => {
13713
13827
  ICON_PICKER_PRESETS = ["cta", "feature"];
13714
13828
  }));
13715
13829
  //#endregion
@@ -13798,7 +13912,7 @@ function getIconComponent(name) {
13798
13912
  var init_registry$1 = __esmMin((() => {
13799
13913
  init_cta$1();
13800
13914
  init_semantic();
13801
- init_presets$1();
13915
+ init_presets$2();
13802
13916
  init_social();
13803
13917
  CTA_ICON_OPTIONS.map((option) => ({
13804
13918
  id: option.id,
@@ -14259,7 +14373,7 @@ function shouldReserveFeatureCardIconZone(cards) {
14259
14373
  //#endregion
14260
14374
  //#region ../blocks/src/system/icons/index.ts
14261
14375
  init_cta$1();
14262
- init_presets$1();
14376
+ init_presets$2();
14263
14377
  init_semantic();
14264
14378
  init_registry$1();
14265
14379
  init_svg();
@@ -16024,7 +16138,8 @@ var init_booking_form_reserved_fields = __esmMin((() => {
16024
16138
  "discountCode",
16025
16139
  "selectedSlidingAmountInput",
16026
16140
  "selectedCollectionOptionKind",
16027
- "selectedAppointmentPackageId"
16141
+ "selectedAppointmentPackageId",
16142
+ "mailingListOptIn"
16028
16143
  ];
16029
16144
  BOOKING_FORM_DATA_RESERVED_KEYS = new Set(BOOKING_FORM_DATA_RESERVED_KEY_VALUES);
16030
16145
  }));
@@ -16448,6 +16563,7 @@ function prepareBookingSubmission(input) {
16448
16563
  startAt: selectedSlot,
16449
16564
  endAt: endDate.toISOString(),
16450
16565
  customFields: collectBookingCustomFields(input.data),
16566
+ ...selectedMailingListOptIn(input.data),
16451
16567
  timezone: toBookingTimeZone(input.viewerTimeZone ?? null)
16452
16568
  };
16453
16569
  if (customerPassId) return {
@@ -16498,6 +16614,9 @@ function prepareBookingSubmission(input) {
16498
16614
  }
16499
16615
  };
16500
16616
  }
16617
+ function selectedMailingListOptIn(data) {
16618
+ return data.mailingListOptIn === true ? { mailingListOptIn: true } : {};
16619
+ }
16501
16620
  function formatBookingSubmissionPreparationError(error) {
16502
16621
  switch (error.tag) {
16503
16622
  case "missing-required-booking-information": return "Missing required booking information";
@@ -16630,8 +16749,9 @@ function buildBookingFormInteractiveIslandProps(props) {
16630
16749
  source: props
16631
16750
  });
16632
16751
  }
16633
- var blockBookingPaymentTermsAvailabilitySchema, bookingServiceSchema, bookingServiceCategorySchema, bookingServicesSourceSchema, bookingConfigSchema, bookingSourceSchema, bookingDisplaySchema, bookingHydrationSchema, bookingRenderSchema, bookingFormIslandMetaCodec, bookingFormIslandMetaKeys, bookingFormBlockRuntime, bookingFormInteractiveIslandPropsCodec;
16752
+ var blockBookingPaymentTermsAvailabilitySchema, bookingServiceSchema, bookingServiceCategorySchema, bookingServicesSourceSchema, bookingConfigSchema, bookingMailingListContextSchema, bookingSourceSchema, bookingDisplaySchema, bookingHydrationSchema, bookingRenderSchema, bookingFormIslandMetaCodec, bookingFormIslandMetaKeys, bookingFormBlockRuntime, bookingFormInteractiveIslandPropsCodec;
16634
16753
  var init_booking_form_interactive = __esmMin((() => {
16754
+ init_src$2();
16635
16755
  init_islands();
16636
16756
  init_runtime();
16637
16757
  init_booking_form_state();
@@ -16684,7 +16804,14 @@ var init_booking_form_interactive = __esmMin((() => {
16684
16804
  fields: z.array(bookingFieldSchema)
16685
16805
  }).optional()
16686
16806
  });
16807
+ bookingMailingListContextSchema = z.unknown().transform((value) => {
16808
+ if (value === void 0) return void 0;
16809
+ const parsed = parseMailingListRuntimeContext(value);
16810
+ return parsed.ok ? parsed.value : void 0;
16811
+ });
16687
16812
  bookingSourceSchema = z.object({
16813
+ mailingList: bookingMailingListContextSchema.optional(),
16814
+ siteName: z.string().optional(),
16688
16815
  siteId: z.string().optional(),
16689
16816
  apiBaseUrl: z.string().optional(),
16690
16817
  portalToken: z.string().nullable().optional(),
@@ -16713,6 +16840,8 @@ var init_booking_form_interactive = __esmMin((() => {
16713
16840
  message: z.string().nullable()
16714
16841
  });
16715
16842
  bookingHydrationSchema = z.object({
16843
+ mailingList: bookingMailingListContextSchema.optional(),
16844
+ siteName: z.string().optional(),
16716
16845
  formId: z.string().nullable(),
16717
16846
  serviceId: z.string().nullable(),
16718
16847
  resourceId: z.string().nullable(),
@@ -16749,6 +16878,8 @@ var init_booking_form_interactive = __esmMin((() => {
16749
16878
  return {
16750
16879
  display: buildBookingFormDisplay(source, form),
16751
16880
  hydration: {
16881
+ mailingList: source.mailingList,
16882
+ siteName: source.siteName,
16752
16883
  formId: form?.id ?? source.formId ?? null,
16753
16884
  serviceId: source.serviceId ?? form?.settings?.serviceId ?? null,
16754
16885
  resourceId: source.resourceId ?? form?.settings?.resourceId ?? null,
@@ -16794,34 +16925,15 @@ init_booking_form_interactive();
16794
16925
  * own `.rb-reg-surface`, and leaves no stale loading state on the mounted form.
16795
16926
  * `event-registration.server.tsx` follows the same shape.
16796
16927
  */
16797
- function BookingFormSSR({ blockId, siteId, apiBaseUrl, portalToken, formId, serviceId, resourceId, initialData, noticeMessage, requiresServiceSelection, requiresResourceSelection, shouldAutoSelectSingleResource, rebookContext, submitLabel, successMessage, form, services, spamProtectionEnabled, className, children }) {
16798
- const islandProps = buildBookingFormInteractiveIslandProps({
16799
- siteId,
16800
- apiBaseUrl,
16801
- portalToken,
16802
- formId,
16803
- serviceId,
16804
- resourceId,
16805
- initialData,
16806
- noticeMessage,
16807
- requiresServiceSelection,
16808
- requiresResourceSelection,
16809
- shouldAutoSelectSingleResource,
16810
- rebookContext,
16811
- submitLabel,
16812
- successMessage,
16813
- form,
16814
- services,
16815
- spamProtectionEnabled,
16816
- className
16817
- });
16928
+ function BookingFormSSR({ blockId, children, ...sourceProps }) {
16929
+ const islandProps = buildBookingFormInteractiveIslandProps(sourceProps);
16818
16930
  const display = islandProps.render.display;
16819
16931
  return /* @__PURE__ */ jsxs("div", {
16820
16932
  ...getIslandRootProps("booking-form", blockId),
16821
16933
  children: [
16822
16934
  /* @__PURE__ */ jsx(IslandPropsScript, { value: islandProps }),
16823
16935
  display.state === "missing" ? /* @__PURE__ */ jsx("div", {
16824
- className: `rb-reg-surface booking-form-ssr ${className ?? ""}`.trim(),
16936
+ className: `rb-reg-surface booking-form-ssr ${sourceProps.className ?? ""}`.trim(),
16825
16937
  children: /* @__PURE__ */ jsx("div", {
16826
16938
  className: "alert alert-error",
16827
16939
  role: "alert",
@@ -16831,7 +16943,7 @@ function BookingFormSSR({ blockId, siteId, apiBaseUrl, portalToken, formId, serv
16831
16943
  })
16832
16944
  })
16833
16945
  }) : /* @__PURE__ */ jsxs("div", {
16834
- className: `rb-reg-surface booking-form-ssr ab-shell ${className ?? ""}`.trim(),
16946
+ className: `rb-reg-surface booking-form-ssr ab-shell ${sourceProps.className ?? ""}`.trim(),
16835
16947
  "aria-busy": true,
16836
16948
  "aria-label": "Loading booking form",
16837
16949
  role: "status",
@@ -25558,7 +25670,7 @@ function parseGradientPresetId(value) {
25558
25670
  return normalized;
25559
25671
  }
25560
25672
  var rawGradientPresets, GRADIENT_PRESETS, GRADIENT_PRESET_IDS, gradientPresetIdSet;
25561
- var init_presets = __esmMin((() => {
25673
+ var init_presets$1 = __esmMin((() => {
25562
25674
  rawGradientPresets = [
25563
25675
  {
25564
25676
  id: "primary-secondary",
@@ -25764,7 +25876,7 @@ var init_utils$2 = __esmMin((() => {}));
25764
25876
  //#region ../theme-core/src/gradients/index.ts
25765
25877
  var init_gradients = __esmMin((() => {
25766
25878
  init_types$10();
25767
- init_presets();
25879
+ init_presets$1();
25768
25880
  init_utils$2();
25769
25881
  }));
25770
25882
  //#endregion
@@ -28624,6 +28736,7 @@ var init_resolver = __esmMin((() => {
28624
28736
  };
28625
28737
  blockDesignFallback.sectionSurface, blockDesignFallback.contentFrame, blockDesignFallback.sectionHeight, blockDesignFallback.heroLegibility, blockDesignFallback.imageSurfaceTreatment, blockDesignFallback.imageSurfaceMotion, blockDesignFallback.tileTreatment, blockDesignFallback.eventListTreatment, blockDesignFallback.eyebrowTreatment, blockDesignFallback.accordionIconTreatment, blockDesignFallback.composition;
28626
28738
  }));
28739
+ var init_rootPaint = __esmMin((() => {}));
28627
28740
  function parseSiteChromeBackgroundColorToken(value) {
28628
28741
  const token = parseBackgroundAppearanceColorToken(value);
28629
28742
  return token ? token : null;
@@ -28640,6 +28753,7 @@ var init_siteChromeBackgrounds = __esmMin((() => {
28640
28753
  init_surfaces();
28641
28754
  init_backgroundAppearance();
28642
28755
  init_rawStyleFields();
28756
+ init_rootPaint();
28643
28757
  siteChromeBackgroundColorTokens = toSiteChromeBackgroundColorTokens(backgroundAppearanceColorTokenNames);
28644
28758
  quickSiteChromeBackgroundColorTokens = toSiteChromeBackgroundColorTokens(backgroundAppearanceQuickColorTokenNames);
28645
28759
  siteChromeBackgroundColorTokens.filter((token) => !quickSiteChromeBackgroundColorTokens.includes(token));
@@ -28935,13 +29049,180 @@ function diffJsonPaths(left, right, path = "") {
28935
29049
  }];
28936
29050
  }
28937
29051
  var init_headerBytesComparison = __esmMin((() => {}));
29052
+ var NAV_LINK_PRESETS;
29053
+ var init_presets = __esmMin((() => {
29054
+ NAV_LINK_PRESETS = {
29055
+ /**
29056
+ * Minimal - subtle color change on hover
29057
+ */
29058
+ minimal: {
29059
+ name: "Minimal",
29060
+ typography: "body",
29061
+ fontWeight: "medium",
29062
+ textTransform: "none",
29063
+ italic: false,
29064
+ colorToken: "text",
29065
+ hoverColorToken: "primary",
29066
+ padding: "none",
29067
+ borderRadius: "none",
29068
+ effects: { hover: [{
29069
+ effectId: "text-color-change",
29070
+ options: { hoverColorToken: "primary" }
29071
+ }] }
29072
+ },
29073
+ /**
29074
+ * Underline - static underline appears on hover
29075
+ */
29076
+ underline: {
29077
+ name: "Underline",
29078
+ typography: "body",
29079
+ fontWeight: "medium",
29080
+ textTransform: "none",
29081
+ italic: false,
29082
+ colorToken: "text",
29083
+ padding: "none",
29084
+ borderRadius: "none",
29085
+ effects: { hover: [{
29086
+ effectId: "nav-underline",
29087
+ options: { style: "static" }
29088
+ }] }
29089
+ },
29090
+ /**
29091
+ * Underline Grow - animated underline grows from center on hover
29092
+ */
29093
+ "underline-grow": {
29094
+ name: "Underline Grow",
29095
+ typography: "body",
29096
+ fontWeight: "medium",
29097
+ textTransform: "none",
29098
+ italic: false,
29099
+ colorToken: "text",
29100
+ padding: "none",
29101
+ borderRadius: "none",
29102
+ effects: { hover: [{
29103
+ effectId: "nav-underline",
29104
+ options: { style: "grow" }
29105
+ }] }
29106
+ },
29107
+ /**
29108
+ * Capsule - pill-shaped background on hover
29109
+ */
29110
+ capsule: {
29111
+ name: "Capsule",
29112
+ typography: "body",
29113
+ fontWeight: "medium",
29114
+ textTransform: "none",
29115
+ italic: false,
29116
+ colorToken: "text",
29117
+ padding: "compact",
29118
+ borderRadius: "full",
29119
+ effects: {
29120
+ hover: [{
29121
+ effectId: "background-on-hover-alpha",
29122
+ options: {
29123
+ colorToken: "primary",
29124
+ opacity: 10
29125
+ }
29126
+ }],
29127
+ active: [{
29128
+ effectId: "background-on-hover-alpha",
29129
+ options: {
29130
+ colorToken: "primary",
29131
+ opacity: 15
29132
+ }
29133
+ }]
29134
+ }
29135
+ },
29136
+ /**
29137
+ * Solid - solid background color on hover
29138
+ */
29139
+ solid: {
29140
+ name: "Solid",
29141
+ typography: "body",
29142
+ fontWeight: "medium",
29143
+ textTransform: "none",
29144
+ italic: false,
29145
+ colorToken: "text",
29146
+ padding: "compact",
29147
+ borderRadius: "none",
29148
+ effects: {
29149
+ hover: [{
29150
+ effectId: "background-on-hover",
29151
+ options: {
29152
+ colorToken: "primary",
29153
+ textColorToken: "primaryForeground"
29154
+ }
29155
+ }],
29156
+ active: [{
29157
+ effectId: "background-on-hover",
29158
+ options: {
29159
+ colorToken: "primary",
29160
+ textColorToken: "primaryForeground"
29161
+ }
29162
+ }]
29163
+ }
29164
+ },
29165
+ /**
29166
+ * Scale - gentle scale-up on hover
29167
+ */
29168
+ scale: {
29169
+ name: "Scale",
29170
+ typography: "body",
29171
+ fontWeight: "medium",
29172
+ textTransform: "none",
29173
+ italic: false,
29174
+ colorToken: "text",
29175
+ padding: "none",
29176
+ borderRadius: "none",
29177
+ effects: { hover: [{
29178
+ effectId: "scale-up",
29179
+ options: { scale: 1.05 }
29180
+ }] }
29181
+ },
29182
+ /**
29183
+ * Frosted - semi-transparent glass-like background
29184
+ */
29185
+ frosted: {
29186
+ name: "Frosted",
29187
+ typography: "body",
29188
+ fontWeight: "medium",
29189
+ textTransform: "none",
29190
+ italic: false,
29191
+ colorToken: "text",
29192
+ padding: "compact",
29193
+ borderRadius: "md",
29194
+ effects: {
29195
+ base: [{ effectId: "nav-frosted-base" }],
29196
+ hover: [{ effectId: "nav-frosted-hover" }],
29197
+ active: [{ effectId: "nav-frosted-active" }]
29198
+ }
29199
+ }
29200
+ };
29201
+ Object.keys(NAV_LINK_PRESETS);
29202
+ }));
29203
+ var init_legacyNavLinkStyle = __esmMin((() => {
29204
+ init_presets();
29205
+ }));
29206
+ var init_openingForegroundProjection = __esmMin((() => {}));
29207
+ var init_effectiveNavLinkStyle$1 = __esmMin((() => {
29208
+ init_types$9();
29209
+ init_legacyNavLinkStyle();
29210
+ init_openingForegroundProjection();
29211
+ init_surfaces();
29212
+ init_foregroundInteraction();
29213
+ init_tokens();
29214
+ init_colorStyles();
29215
+ }));
28938
29216
  var init_headerOpeningForeground = __esmMin((() => {
28939
29217
  init_foregroundInteraction();
28940
29218
  init_expandPalette();
28941
29219
  init_colorConversion();
28942
29220
  init_tokens();
28943
- init_logoVariant();
28944
29221
  init_colorTokenParts();
29222
+ init_types$9();
29223
+ init_effectPolicy();
29224
+ init_effectiveNavLinkStyle$1();
29225
+ init_openingForegroundProjection();
28945
29226
  init_types$8();
28946
29227
  }));
28947
29228
  var init_effectivePageDesign = __esmMin((() => {
@@ -29253,8 +29534,79 @@ var init_site_styles = __esmMin((() => {
29253
29534
  init_siteStyleTypography();
29254
29535
  init_themeParity();
29255
29536
  init_types$8();
29537
+ }));
29538
+ var init_generateNavLinkCSS = __esmMin((() => {
29539
+ init_types$9();
29540
+ init_expandPalette();
29541
+ init_colorConversion();
29542
+ init_generateBaseCSS();
29543
+ init_generateEffectsCSS();
29544
+ init_foregroundContract();
29545
+ init_effectPolicy();
29546
+ })), NAV_DROPDOWN_SHIFT_PROPERTY, NAV_DROPDOWN_MAX_WIDTH_CSS;
29547
+ var init_navDropdownSizing = __esmMin((() => {
29548
+ NAV_DROPDOWN_SHIFT_PROPERTY = "--nav-dropdown-shift-x";
29549
+ NAV_DROPDOWN_MAX_WIDTH_CSS = `min(22rem, calc(100vw - 2rem))`;
29550
+ `${NAV_DROPDOWN_MAX_WIDTH_CSS}`, `${NAV_DROPDOWN_SHIFT_PROPERTY}`;
29551
+ }));
29552
+ var init_surfaceRules = __esmMin((() => {
29553
+ init_shared$4();
29554
+ init_colorStyles();
29555
+ }));
29556
+ var init_generateHeaderNavLinkStyles = __esmMin((() => {
29557
+ init_generateNavLinkCSS();
29558
+ init_siteChromeNavPreferences();
29559
+ init_effectiveNavLinkStyle$1();
29560
+ init_rawStyleFields();
29561
+ }));
29562
+ var init_generateHeaderLogoStyles = __esmMin((() => {
29563
+ init_generateNavLinkCSS();
29564
+ init_surfaces();
29565
+ }));
29566
+ var init_generateHeaderCss = __esmMin((() => {
29567
+ init_resolver$1();
29568
+ init_generateNavLinkCSS();
29569
+ init_shared$4();
29570
+ init_breakpoints();
29571
+ init_navDropdownSizing();
29572
+ init_scrollTreatment();
29573
+ init_paintTargets();
29574
+ init_surfaceRules();
29575
+ init_generateHeaderNavLinkStyles();
29576
+ init_rootPaint();
29577
+ init_rawStyleFields();
29578
+ init_generateHeaderLogoStyles();
29579
+ init_surfaces();
29580
+ init_expandPalette();
29581
+ init_cssDeclarations();
29582
+ }));
29583
+ //#endregion
29584
+ //#region ../theme-core/src/header/index.ts
29585
+ var init_header$1 = __esmMin((() => {
29586
+ init_generateHeaderCss();
29587
+ init_rootPaint();
29588
+ init_effectiveNavLinkStyle$1();
29589
+ init_openingForegroundProjection();
29590
+ }));
29591
+ var init_effectiveNavLinkStyle = __esmMin((() => {
29592
+ init_presets();
29593
+ init_types$9();
29594
+ }));
29595
+ var init_generateFooterCss = __esmMin((() => {
29596
+ init_resolver$1();
29597
+ init_generateNavLinkCSS();
29598
+ init_effectiveNavLinkStyle();
29599
+ init_rawStyleFields();
29600
+ }));
29601
+ //#endregion
29602
+ //#region ../theme-core/src/footer/index.ts
29603
+ var init_footer = __esmMin((() => {
29604
+ init_generateFooterCss();
29605
+ init_effectiveNavLinkStyle();
29256
29606
  })), init_surfaceForegroundStyles = __esmMin((() => {
29257
29607
  init_surfaces();
29608
+ init_header$1();
29609
+ init_footer();
29258
29610
  init_buttons();
29259
29611
  init_backgroundContent();
29260
29612
  init_themeColorResolution();
@@ -29701,7 +30053,7 @@ var init_schema = __esmMin((() => {
29701
30053
  init_src$1();
29702
30054
  init_node();
29703
30055
  init_repeaterGrid();
29704
- init_presets$1();
30056
+ init_presets$2();
29705
30057
  visibilityLevels = [
29706
30058
  "admin",
29707
30059
  "designer",
@@ -34661,6 +35013,7 @@ function buildEventRegistrationInteractiveIslandProps(props) {
34661
35013
  }
34662
35014
  var EVENT_REGISTRATION_GENERIC_SHELL_STEP_LABELS, EVENT_REGISTRATION_SHELL_STEP_LABELS, eventRegistrationPublicEventSchema, eventRegistrationHydrationSchemaShape, eventRegistrationEventSourceSchema, eventRegistrationSourceSchema, eventRegistrationDisplaySchema, eventRegistrationHydrationSchema, eventRegistrationRenderSchema, eventRegistrationIslandMetaCodec, eventRegistrationIslandMetaKeys, eventRegistrationBlockRuntime, eventRegistrationInteractiveIslandPropsCodec;
34663
35015
  var init_event_registration_interactive = __esmMin((() => {
35016
+ init_src$2();
34664
35017
  init_readAuthority();
34665
35018
  init_schemas();
34666
35019
  init_runGrouping();
@@ -34700,7 +35053,13 @@ var init_event_registration_interactive = __esmMin((() => {
34700
35053
  spamProtectionEnabled: z.boolean().optional(),
34701
35054
  supportEmail: z.string().optional(),
34702
35055
  sitePasses: publicPassProductCollectionSchema.nullable().optional(),
34703
- siteMemberships: publicMembershipProductCollectionSchema.nullable().optional()
35056
+ siteMemberships: publicMembershipProductCollectionSchema.nullable().optional(),
35057
+ mailingList: z.unknown().transform((value) => {
35058
+ if (value === void 0) return void 0;
35059
+ const parsed = parseMailingListRuntimeContext(value);
35060
+ return parsed.ok ? parsed.value : void 0;
35061
+ }),
35062
+ siteName: z.string().optional()
34704
35063
  };
34705
35064
  eventRegistrationEventSourceSchema = z.discriminatedUnion("kind", [z.object({
34706
35065
  kind: z.literal("loaded"),
@@ -34787,7 +35146,9 @@ var init_event_registration_interactive = __esmMin((() => {
34787
35146
  spamProtectionEnabled: source.spamProtectionEnabled,
34788
35147
  supportEmail: source.supportEmail,
34789
35148
  sitePasses: source.sitePasses ?? null,
34790
- siteMemberships: source.siteMemberships ?? null
35149
+ siteMemberships: source.siteMemberships ?? null,
35150
+ mailingList: source.mailingList,
35151
+ siteName: source.siteName
34791
35152
  }
34792
35153
  };
34793
35154
  }
@@ -34972,6 +35333,8 @@ const eventRegistrationBlockDefinition = {
34972
35333
  events: { $bind: { from: "data.events" } },
34973
35334
  wholeSeriesRunEvents: { $bind: { from: "data.wholeSeriesRunEvents" } },
34974
35335
  loaderFailures: { $bind: { from: "$root.loaderFailures" } },
35336
+ mailingList: { $bind: { from: "$root.mailingList" } },
35337
+ siteName: { $bind: { from: "$root.siteName" } },
34975
35338
  sitePasses: { $bind: { from: "data.sitePasses" } },
34976
35339
  siteMemberships: { $bind: { from: "data.siteMemberships" } },
34977
35340
  stage: { $bind: {
@@ -37535,65 +37898,67 @@ const editorialSplitLayout = styledSection({
37535
37898
  spacing: "comfortable",
37536
37899
  background: "surface"
37537
37900
  });
37538
- const newsletterSignupBlockDefinition = {
37539
- manifest: createBlockManifest({
37540
- id: "block.newsletter-signup",
37541
- title: "Newsletter Signup",
37542
- titleSource: "title",
37543
- description: "Newsletter subscription form with configurable field presets.",
37544
- category: "interactive",
37545
- contentSource: { kind: "inline" },
37546
- fragments: [{
37547
- fragment: newsletterCopyFragment,
37548
- fieldPriority: 0
37549
- }, {
37550
- fragment: newsletterFormFragment,
37551
- fieldPriority: 1
37552
- }],
37553
- layout: stackedLayout,
37554
- variants: {
37555
- stacked: stackedLayout,
37556
- inline: inlineLayout,
37557
- "editorial-split": editorialSplitLayout
37558
- },
37559
- defaultVariant: "stacked",
37560
- variantOptions: {
37561
- stacked: {
37562
- label: "Stacked",
37563
- description: "Vertical layout with fields stacked"
37564
- },
37565
- inline: {
37566
- label: "Inline",
37567
- description: "Horizontal layout (email + button side by side)"
37568
- },
37569
- "editorial-split": {
37570
- label: "Editorial split",
37571
- description: "Copy and form in balanced side-by-side columns, stacked on mobile."
37572
- }
37573
- },
37574
- styleTokens: {
37575
- background: "surface",
37576
- typography: "body",
37577
- spacing: "md"
37901
+ const newsletterSignupManifest = createBlockManifest({
37902
+ id: "block.newsletter-signup",
37903
+ title: "Newsletter Signup",
37904
+ titleSource: "title",
37905
+ description: "Newsletter subscription form with configurable field presets.",
37906
+ category: "interactive",
37907
+ contentSource: { kind: "inline" },
37908
+ fragments: [{
37909
+ fragment: newsletterCopyFragment,
37910
+ fieldPriority: 0
37911
+ }, {
37912
+ fragment: newsletterFormFragment,
37913
+ fieldPriority: 1
37914
+ }],
37915
+ layout: stackedLayout,
37916
+ variants: {
37917
+ stacked: stackedLayout,
37918
+ inline: inlineLayout,
37919
+ "editorial-split": editorialSplitLayout
37920
+ },
37921
+ defaultVariant: "stacked",
37922
+ variantOptions: {
37923
+ stacked: {
37924
+ label: "Stacked",
37925
+ description: "Vertical layout with fields stacked"
37578
37926
  },
37579
- behaviours: {
37580
- supportsThemeSwitching: true,
37581
- inlineEditing: false,
37582
- animation: false,
37583
- paletteHidden: false
37927
+ inline: {
37928
+ label: "Inline",
37929
+ description: "Horizontal layout (email + button side by side)"
37584
37930
  },
37585
- tags: [
37586
- "newsletter",
37587
- "signup",
37588
- "email",
37589
- "subscribe",
37590
- "subscription",
37591
- "mailchimp",
37592
- "marketing",
37593
- "lead-capture"
37594
- ],
37595
- icon: "Mail"
37596
- }),
37931
+ "editorial-split": {
37932
+ label: "Editorial split",
37933
+ description: "Copy and form in balanced side-by-side columns, stacked on mobile."
37934
+ }
37935
+ },
37936
+ styleTokens: {
37937
+ background: "surface",
37938
+ typography: "body",
37939
+ spacing: "md"
37940
+ },
37941
+ behaviours: {
37942
+ supportsThemeSwitching: true,
37943
+ inlineEditing: false,
37944
+ animation: false,
37945
+ paletteHidden: false
37946
+ },
37947
+ tags: [
37948
+ "newsletter",
37949
+ "signup",
37950
+ "email",
37951
+ "subscribe",
37952
+ "subscription",
37953
+ "mailchimp",
37954
+ "marketing",
37955
+ "lead-capture"
37956
+ ],
37957
+ icon: "Mail"
37958
+ });
37959
+ [...(newsletterSignupManifest.fields ?? []).map((field) => field.id)];
37960
+ const newsletterSignupBlockDefinition = {
37961
+ manifest: newsletterSignupManifest,
37597
37962
  runtime: newsletterFormBlockRuntime
37598
37963
  };
37599
37964
  //#endregion
@@ -42951,121 +43316,6 @@ function isSpamProtectionEnabled() {
42951
43316
  var init_client = __esmMin((() => {
42952
43317
  init_AltchaWidget();
42953
43318
  }));
42954
- //#endregion
42955
- //#region ../blocks/src/system/runtime/shared/components/CheckIcon.tsx
42956
- function CheckIcon({ className, strokeWidth = 2 }) {
42957
- return /* @__PURE__ */ jsx("svg", {
42958
- fill: "none",
42959
- strokeLinecap: "round",
42960
- strokeLinejoin: "round",
42961
- strokeWidth,
42962
- viewBox: "0 0 24 24",
42963
- stroke: "currentColor",
42964
- className,
42965
- width: "1em",
42966
- height: "1em",
42967
- "aria-hidden": "true",
42968
- children: /* @__PURE__ */ jsx("path", { d: "M5 13l4 4L19 7" })
42969
- });
42970
- }
42971
- var init_CheckIcon$1 = __esmMin((() => {}));
42972
- //#endregion
42973
- //#region ../blocks/src/system/runtime/shared/components/StateIcon.tsx
42974
- /**
42975
- * Circular icon wrapper for terminal state screens (success, error, waitlist, etc.).
42976
- *
42977
- * Layout is provided by shared `rb-state-icon` CSS; color variants are
42978
- * block-scoped by the owning registration surface.
42979
- */
42980
- function StateIcon({ variant, children }) {
42981
- return /* @__PURE__ */ jsx("div", {
42982
- className: `rb-state-icon rb-state-icon--${variant}`,
42983
- "aria-hidden": "true",
42984
- children
42985
- });
42986
- }
42987
- var init_StateIcon = __esmMin((() => {}));
42988
- //#endregion
42989
- //#region ../blocks/src/system/runtime/shared/components/TerminalPanel.tsx
42990
- function joinClasses$1(...parts) {
42991
- return parts.filter((part) => typeof part === "string" && part.length > 0).join(" ");
42992
- }
42993
- function TerminalPanel({ tone, title, titleAs: Title = "h3", body, secondaryBody, icon, actions, className, titleClassName, bodyClassName, secondaryBodyClassName, iconClassName, actionsClassName, role, live }) {
42994
- const resolvedRole = role ?? (tone === "error" ? "alert" : "status");
42995
- const resolvedLive = live ?? (resolvedRole === "alert" ? "assertive" : "polite");
42996
- return /* @__PURE__ */ jsxs("div", {
42997
- className,
42998
- "data-terminal-panel": true,
42999
- "data-terminal-tone": tone,
43000
- role: resolvedRole,
43001
- "aria-live": resolvedLive === "off" ? void 0 : resolvedLive,
43002
- children: [
43003
- icon ? /* @__PURE__ */ jsx("div", {
43004
- className: joinClasses$1(iconClassName),
43005
- "data-terminal-icon": true,
43006
- children: icon
43007
- }) : null,
43008
- /* @__PURE__ */ jsx(Title, {
43009
- className: joinClasses$1(titleClassName),
43010
- "data-terminal-title": true,
43011
- children: title
43012
- }),
43013
- body ? /* @__PURE__ */ jsx("div", {
43014
- className: joinClasses$1(bodyClassName),
43015
- "data-terminal-body": true,
43016
- children: body
43017
- }) : null,
43018
- actions ? /* @__PURE__ */ jsx("div", {
43019
- className: joinClasses$1(actionsClassName),
43020
- "data-terminal-actions": true,
43021
- children: actions
43022
- }) : null,
43023
- secondaryBody ? /* @__PURE__ */ jsx("div", {
43024
- className: joinClasses$1(secondaryBodyClassName),
43025
- "data-terminal-secondary-body": true,
43026
- children: secondaryBody
43027
- }) : null
43028
- ]
43029
- });
43030
- }
43031
- var init_TerminalPanel = __esmMin((() => {}));
43032
- //#endregion
43033
- //#region ../blocks/src/system/runtime/components/booking/SuccessMessage.tsx
43034
- /**
43035
- * SuccessMessage Component
43036
- *
43037
- * Terminal success state after a completed appointment booking.
43038
- * Rendered on the shared registration-surface (see booking-form.client),
43039
- * using the shared TerminalPanel + StateIcon primitives.
43040
- */
43041
- var SuccessMessage;
43042
- var init_SuccessMessage = __esmMin((() => {
43043
- init_CheckIcon$1();
43044
- init_StateIcon();
43045
- init_TerminalPanel();
43046
- SuccessMessage = ({ message, resourceName, className }) => {
43047
- return /* @__PURE__ */ jsx(TerminalPanel, {
43048
- tone: "success",
43049
- title: "Booking confirmed",
43050
- icon: /* @__PURE__ */ jsx(StateIcon, {
43051
- variant: "success",
43052
- children: /* @__PURE__ */ jsx(CheckIcon, { strokeWidth: 3 })
43053
- }),
43054
- body: /* @__PURE__ */ jsx("p", {
43055
- className: "ab-text",
43056
- children: message
43057
- }),
43058
- secondaryBody: resourceName ? /* @__PURE__ */ jsxs("p", {
43059
- className: "ab-text rb-on-surface--muted",
43060
- children: ["Practitioner: ", resourceName]
43061
- }) : null,
43062
- className: ["ab-center", className ?? ""].join(" ").trim(),
43063
- titleClassName: "ab-terminal-title",
43064
- role: "alert",
43065
- live: "polite"
43066
- });
43067
- };
43068
- }));
43069
43319
  var init_helpers = __esmMin((() => {
43070
43320
  new TextEncoder();
43071
43321
  }));
@@ -43678,6 +43928,7 @@ function useBookingSubmission(_siteId) {
43678
43928
  startAt: data.startAt,
43679
43929
  endAt: data.endAt,
43680
43930
  customFields: data.customFields,
43931
+ mailingListOptIn: data.mailingListOptIn,
43681
43932
  timezone: data.timezone,
43682
43933
  customerPassId: data.customerPassId
43683
43934
  }) : await api.submitBooking({
@@ -43687,6 +43938,7 @@ function useBookingSubmission(_siteId) {
43687
43938
  startAt: data.startAt,
43688
43939
  endAt: data.endAt,
43689
43940
  customFields: data.customFields,
43941
+ mailingListOptIn: data.mailingListOptIn,
43690
43942
  timezone: data.timezone,
43691
43943
  discountCode: data.discountCode,
43692
43944
  selectedSlidingAmount: data.selectedSlidingAmount,
@@ -43727,6 +43979,43 @@ var init_useBookingSubmission = __esmMin((() => {
43727
43979
  init_useBookingSubmission_state();
43728
43980
  }));
43729
43981
  //#endregion
43982
+ //#region ../blocks/src/system/runtime/nodes/booking-form.submit-success.ts
43983
+ function completeBookingSubmission(input) {
43984
+ const { data } = input;
43985
+ if (data.type === "checkout_redirect") {
43986
+ if (input.redirect === "auto" && typeof window !== "undefined") input.navigateToCheckout(data.checkoutUrl);
43987
+ return {
43988
+ ok: true,
43989
+ outcome: {
43990
+ kind: "checkout_redirect",
43991
+ checkoutUrl: data.checkoutUrl,
43992
+ sessionId: data.sessionId,
43993
+ ...data.mailingListSignupNote ? { mailingListSignupNote: data.mailingListSignupNote } : {}
43994
+ }
43995
+ };
43996
+ }
43997
+ input.dispatch({
43998
+ type: "feedback-set",
43999
+ feedback: {
44000
+ kind: "success",
44001
+ message: getBookingSuccessMessage(input.successMessage),
44002
+ resourceName: data.appointment.resourceName
44003
+ }
44004
+ });
44005
+ return {
44006
+ ok: true,
44007
+ outcome: {
44008
+ kind: "booked",
44009
+ appointmentId: data.appointment.id,
44010
+ resourceName: data.appointment.resourceName,
44011
+ ...data.mailingListSignupNote ? { mailingListSignupNote: data.mailingListSignupNote } : {}
44012
+ }
44013
+ };
44014
+ }
44015
+ var init_booking_form_submit_success = __esmMin((() => {
44016
+ init_booking_form_state();
44017
+ }));
44018
+ //#endregion
43730
44019
  //#region ../blocks/src/system/runtime/nodes/event-registration/useDiscountCodeUi.state.ts
43731
44020
  function getDiscountContextKey(context) {
43732
44021
  if (!context) return "disabled";
@@ -44224,6 +44513,43 @@ function clearBookingFieldError(errors, fieldId) {
44224
44513
  }
44225
44514
  var init_booking_form_validationErrors = __esmMin((() => {}));
44226
44515
  //#endregion
44516
+ //#region ../blocks/src/system/runtime/nodes/booking-form.mailing-list-state.ts
44517
+ function bookingFormDataWithEligibleOptIn(data, eligible) {
44518
+ return {
44519
+ ...data,
44520
+ mailingListOptIn: eligible && data.mailingListOptIn === true
44521
+ };
44522
+ }
44523
+ function isBookingContactEvent(event) {
44524
+ return event.type === "field-updated" || event.type === "field-touched" || event.type === "mailing-list-opt-in-set";
44525
+ }
44526
+ function applyBookingContactEvent(state, event) {
44527
+ switch (event.type) {
44528
+ case "field-updated": return {
44529
+ ...state,
44530
+ fieldValues: {
44531
+ ...state.fieldValues,
44532
+ [event.fieldId]: event.value
44533
+ },
44534
+ validationErrors: clearBookingFieldError(clearBookingFormError(state.validationErrors), event.fieldId)
44535
+ };
44536
+ case "field-touched": return {
44537
+ ...state,
44538
+ touchedFields: {
44539
+ ...state.touchedFields,
44540
+ [event.fieldId]: true
44541
+ }
44542
+ };
44543
+ case "mailing-list-opt-in-set": return {
44544
+ ...state,
44545
+ mailingListOptIn: event.checked
44546
+ };
44547
+ }
44548
+ }
44549
+ var init_booking_form_mailing_list_state = __esmMin((() => {
44550
+ init_booking_form_validationErrors();
44551
+ }));
44552
+ //#endregion
44227
44553
  //#region ../blocks/src/system/runtime/nodes/booking-form.field-values.ts
44228
44554
  function collectInitialBookingFieldValues(initialData) {
44229
44555
  const values = {};
@@ -44252,6 +44578,7 @@ function createInitialBookingFlowReducerState(input) {
44252
44578
  selectedDate: toOptionalString(initialData.selectedDate),
44253
44579
  selectedSlot: null,
44254
44580
  fieldValues: collectInitialBookingFieldValues(initialData),
44581
+ mailingListOptIn: initialData.mailingListOptIn === true,
44255
44582
  touchedFields: {},
44256
44583
  attemptedStepIds: {},
44257
44584
  discountCode: toOptionalString(initialData.discountCode) ?? "",
@@ -44301,6 +44628,7 @@ function applyAvailabilitySelectionInvalidation(state, invalidation) {
44301
44628
  };
44302
44629
  }
44303
44630
  function bookingFlowReducer(state, event) {
44631
+ if (isBookingContactEvent(event)) return applyBookingContactEvent(state, event);
44304
44632
  switch (event.type) {
44305
44633
  case "service-selected": return applyBookingServiceSelection(state, event.serviceId);
44306
44634
  case "resource-selected": return {
@@ -44323,21 +44651,6 @@ function bookingFlowReducer(state, event) {
44323
44651
  feedback: clearAvailabilityFeedback(state.feedback),
44324
44652
  validationErrors: clearBookingFormError(state.validationErrors)
44325
44653
  };
44326
- case "field-updated": return {
44327
- ...state,
44328
- fieldValues: {
44329
- ...state.fieldValues,
44330
- [event.fieldId]: event.value
44331
- },
44332
- validationErrors: clearBookingFieldError(clearBookingFormError(state.validationErrors), event.fieldId)
44333
- };
44334
- case "field-touched": return {
44335
- ...state,
44336
- touchedFields: {
44337
- ...state.touchedFields,
44338
- [event.fieldId]: true
44339
- }
44340
- };
44341
44654
  case "step-advance-attempted": return state.attemptedStepIds[event.stepId] ? state : {
44342
44655
  ...state,
44343
44656
  attemptedStepIds: {
@@ -44475,6 +44788,7 @@ function deriveBookingSlotDisplayOptions(input) {
44475
44788
  function toBookingFormData(state) {
44476
44789
  return {
44477
44790
  ...state.fieldValues,
44791
+ mailingListOptIn: state.mailingListOptIn,
44478
44792
  serviceId: state.selectedServiceId,
44479
44793
  resourceId: state.selectedResourceId ?? state.selectedSlot?.resourceId,
44480
44794
  selectedDate: state.selectedDate,
@@ -44737,10 +45051,7 @@ function buildBookingSubmitPlan(input) {
44737
45051
  };
44738
45052
  const prepared = prepareBookingSubmission({
44739
45053
  formId: input.formId,
44740
- data: toBookingFormData({
44741
- ...input.state,
44742
- altchaSolution: input.altchaSolution ?? input.state.altchaSolution
44743
- }),
45054
+ data: bookingFormDataWithEligibleOptIn(toBookingFormData(input.state), Boolean(input.mailingListEligible)),
44744
45055
  services: input.services,
44745
45056
  defaultServiceId: input.defaultServiceId,
44746
45057
  defaultResourceId: input.defaultResourceId,
@@ -44888,6 +45199,7 @@ var init_booking_form_headless_state = __esmMin((() => {
44888
45199
  init_dist$1();
44889
45200
  init_booking_form_state();
44890
45201
  init_booking_form_service_categories();
45202
+ init_booking_form_mailing_list_state();
44891
45203
  init_booking_form_validationErrors();
44892
45204
  init_booking_form_field_values();
44893
45205
  unsafeAsBookingFieldId = (id) => id;
@@ -44941,6 +45253,8 @@ function useHeadlessBookingFlow(options) {
44941
45253
  const canLoadAppointmentPackages = Boolean(options.enableAppointmentPackages && hasPortalBearerAuth && selectedService && !selectedServiceSlidingScale && (selectedService.priceAmount ?? 0) > 0);
44942
45254
  const appointmentPackagesUnavailableReason = !options.enableAppointmentPackages ? "disabled" : !selectedService || selectedServiceSlidingScale || (selectedService.priceAmount ?? 0) <= 0 ? "missing-priced-service" : !hasPortalBearerAuth ? "missing-portal-auth" : null;
44943
45255
  const data = useMemo(() => toBookingFormData(state), [state]);
45256
+ const mailingList = resolveBookingSignupOffer(options.mailingList, options.siteName);
45257
+ const mailingListEligible = mailingList !== null;
44944
45258
  const availabilityDatesQuery = useMemo(() => buildBookingAvailabilityQuery({
44945
45259
  serviceId: selectedServiceId,
44946
45260
  resourceId: selectedResourceId,
@@ -45201,7 +45515,8 @@ function useHeadlessBookingFlow(options) {
45201
45515
  viewerTimeZone: latest.viewerTimeZone,
45202
45516
  redirect: submitOptions?.redirect ?? "manual",
45203
45517
  successUrl: submitOptions?.successUrl,
45204
- cancelUrl: submitOptions?.cancelUrl
45518
+ cancelUrl: submitOptions?.cancelUrl,
45519
+ mailingListEligible
45205
45520
  });
45206
45521
  if (!plan.ok) {
45207
45522
  dispatch({
@@ -45234,37 +45549,18 @@ function useHeadlessBookingFlow(options) {
45234
45549
  message: result.error
45235
45550
  };
45236
45551
  }
45237
- if (result.data.type === "checkout_redirect") {
45238
- if (plan.redirect === "auto" && typeof window !== "undefined") latest.navigateToCheckout(result.data.checkoutUrl);
45239
- return {
45240
- ok: true,
45241
- outcome: {
45242
- kind: "checkout_redirect",
45243
- checkoutUrl: result.data.checkoutUrl
45244
- }
45245
- };
45246
- }
45247
- dispatch({
45248
- type: "feedback-set",
45249
- feedback: {
45250
- kind: "success",
45251
- message: getBookingSuccessMessage(latest.successMessage),
45252
- resourceName: result.data.appointment.resourceName
45253
- }
45552
+ return completeBookingSubmission({
45553
+ data: result.data,
45554
+ redirect: plan.redirect,
45555
+ successMessage: latest.successMessage,
45556
+ navigateToCheckout: latest.navigateToCheckout,
45557
+ dispatch
45254
45558
  });
45255
- return {
45256
- ok: true,
45257
- outcome: {
45258
- kind: "booked",
45259
- appointmentId: result.data.appointment.id,
45260
- resourceName: result.data.appointment.resourceName
45261
- }
45262
- };
45263
45559
  } finally {
45264
45560
  submittingRef.current = false;
45265
45561
  dispatch({ type: "submission-finished" });
45266
45562
  }
45267
- }, [latestRef]);
45563
+ }, [latestRef, mailingListEligible]);
45268
45564
  const actions = useMemo(() => ({
45269
45565
  selectService: (serviceId) => dispatch({
45270
45566
  type: "service-selected",
@@ -45287,6 +45583,10 @@ function useHeadlessBookingFlow(options) {
45287
45583
  fieldId: unsafeAsBookingFieldId(fieldId),
45288
45584
  value
45289
45585
  }),
45586
+ setMailingListOptIn: (checked) => dispatch({
45587
+ type: "mailing-list-opt-in-set",
45588
+ checked
45589
+ }),
45290
45590
  markFieldTouched: (fieldId) => dispatch({
45291
45591
  type: "field-touched",
45292
45592
  fieldId: unsafeAsBookingFieldId(fieldId)
@@ -45445,6 +45745,8 @@ function useHeadlessBookingFlow(options) {
45445
45745
  appointmentPackages: appointmentPackagesModel
45446
45746
  };
45447
45747
  return {
45748
+ mailingList,
45749
+ mailingListOptIn: state.mailingListOptIn,
45448
45750
  status,
45449
45751
  view,
45450
45752
  steps: stepState.steps,
@@ -45544,6 +45846,7 @@ var init_useHeadlessBookingFlow = __esmMin((() => {
45544
45846
  init_useAvailableDates();
45545
45847
  init_useAvailableSlots();
45546
45848
  init_useBookingSubmission();
45849
+ init_booking_form_submit_success();
45547
45850
  init_useDiscountCodeUi();
45548
45851
  init_date_formatting();
45549
45852
  init_bookingPaymentOptions();
@@ -46015,6 +46318,24 @@ var init_TimeSlotSelector = __esmMin((() => {
46015
46318
  };
46016
46319
  }));
46017
46320
  //#endregion
46321
+ //#region ../blocks/src/system/runtime/shared/components/CheckIcon.tsx
46322
+ function CheckIcon({ className, strokeWidth = 2 }) {
46323
+ return /* @__PURE__ */ jsx("svg", {
46324
+ fill: "none",
46325
+ strokeLinecap: "round",
46326
+ strokeLinejoin: "round",
46327
+ strokeWidth,
46328
+ viewBox: "0 0 24 24",
46329
+ stroke: "currentColor",
46330
+ className,
46331
+ width: "1em",
46332
+ height: "1em",
46333
+ "aria-hidden": "true",
46334
+ children: /* @__PURE__ */ jsx("path", { d: "M5 13l4 4L19 7" })
46335
+ });
46336
+ }
46337
+ var init_CheckIcon$1 = __esmMin((() => {}));
46338
+ //#endregion
46018
46339
  //#region ../blocks/src/system/runtime/shared/components/StepIndicator.tsx
46019
46340
  function buildClassChannels(slot, classPrefix, emitSharedClasses) {
46020
46341
  const classes = [];
@@ -46212,6 +46533,28 @@ var init_BookingConsentAgreement = __esmMin((() => {
46212
46533
  init_RichText();
46213
46534
  }));
46214
46535
  //#endregion
46536
+ //#region ../blocks/src/system/runtime/nodes/booking-form.mailing-list-choice.tsx
46537
+ function BookingMailingListChoice({ booking }) {
46538
+ const id = React.useId();
46539
+ if (!booking.mailingList) return null;
46540
+ return /* @__PURE__ */ jsxs("div", {
46541
+ className: "rb-space-y-2",
46542
+ children: [/* @__PURE__ */ jsx(CheckboxChoice, {
46543
+ id,
46544
+ name: "mailingListOptIn",
46545
+ checked: booking.mailingListOptIn,
46546
+ onChange: (event) => booking.actions.setMailingListOptIn(event.target.checked),
46547
+ label: `Email me news and updates from ${booking.mailingList.siteName}.`
46548
+ }), /* @__PURE__ */ jsx("p", {
46549
+ className: "rb-caption status-muted",
46550
+ children: "Optional. You can unsubscribe at any time."
46551
+ })]
46552
+ });
46553
+ }
46554
+ var init_booking_form_mailing_list_choice = __esmMin((() => {
46555
+ init_CheckboxChoice();
46556
+ }));
46557
+ //#endregion
46215
46558
  //#region ../blocks/src/system/runtime/nodes/booking-form.service-choices.tsx
46216
46559
  function optionCardClassName(isSelected) {
46217
46560
  return `rb-option-card${isSelected ? " rb-option-card--selected" : ""}`;
@@ -46696,12 +47039,17 @@ function PaymentOptionContent({ description, helperText, id, summaryRows, title
46696
47039
  });
46697
47040
  }
46698
47041
  function DefaultDynamicFields({ booking, fields }) {
47042
+ const lastContactIndex = fields.reduce((last, field, index) => [
47043
+ "name",
47044
+ "email",
47045
+ "phone"
47046
+ ].includes(field.id) ? index : last, -1);
46699
47047
  return /* @__PURE__ */ jsx("div", {
46700
47048
  className: "rb-space-y-6",
46701
- children: fields.map((field) => /* @__PURE__ */ jsx(DefaultDynamicField, {
47049
+ children: fields.map((field, index) => /* @__PURE__ */ jsxs(React.Fragment, { children: [/* @__PURE__ */ jsx(DefaultDynamicField, {
46702
47050
  booking,
46703
47051
  field
46704
- }, field.id))
47052
+ }), index === lastContactIndex && booking.mailingList ? /* @__PURE__ */ jsx(BookingMailingListChoice, { booking }) : null] }, field.id))
46705
47053
  });
46706
47054
  }
46707
47055
  function DefaultDynamicField({ booking, field }) {
@@ -46985,6 +47333,7 @@ var init_booking_form_default_ui = __esmMin((() => {
46985
47333
  init_DiscountCodeDisclosure();
46986
47334
  init_FieldValidationMessage();
46987
47335
  init_BookingConsentAgreement();
47336
+ init_booking_form_mailing_list_choice();
46988
47337
  init_CheckboxChoice();
46989
47338
  init_booking_form_service_choices();
46990
47339
  }));
@@ -47211,12 +47560,12 @@ function CrossIcon({ className, strokeWidth = 2 }) {
47211
47560
  var init_CrossIcon = __esmMin((() => {}));
47212
47561
  //#endregion
47213
47562
  //#region ../blocks/src/system/runtime/shared/components/ActionRow.tsx
47214
- function joinClasses(...parts) {
47563
+ function joinClasses$1(...parts) {
47215
47564
  return parts.filter((part) => typeof part === "string" && part.length > 0).join(" ");
47216
47565
  }
47217
47566
  function ActionRow({ children, className, align = "start" }) {
47218
47567
  return /* @__PURE__ */ jsx("div", {
47219
- className: joinClasses("rb-flex rb-flex-wrap rb-items-center rb-gap-2", alignmentClasses[align], className),
47568
+ className: joinClasses$1("rb-flex rb-flex-wrap rb-items-center rb-gap-2", alignmentClasses[align], className),
47220
47569
  "data-action-row": true,
47221
47570
  children
47222
47571
  });
@@ -47253,6 +47602,22 @@ function LoggedInAsUser({ email, onLogout, classPrefix }) {
47253
47602
  });
47254
47603
  }
47255
47604
  var init_LoggedInAsUser = __esmMin((() => {}));
47605
+ //#endregion
47606
+ //#region ../blocks/src/system/runtime/shared/components/StateIcon.tsx
47607
+ /**
47608
+ * Circular icon wrapper for terminal state screens (success, error, waitlist, etc.).
47609
+ *
47610
+ * Layout is provided by shared `rb-state-icon` CSS; color variants are
47611
+ * block-scoped by the owning registration surface.
47612
+ */
47613
+ function StateIcon({ variant, children }) {
47614
+ return /* @__PURE__ */ jsx("div", {
47615
+ className: `rb-state-icon rb-state-icon--${variant}`,
47616
+ "aria-hidden": "true",
47617
+ children
47618
+ });
47619
+ }
47620
+ var init_StateIcon = __esmMin((() => {}));
47256
47621
  var init_MembershipHero$1 = __esmMin((() => {
47257
47622
  init_FeedbackMessage();
47258
47623
  }));
@@ -47415,6 +47780,50 @@ var init_TabBarFragment = __esmMin((() => {
47415
47780
  init_clsx();
47416
47781
  }));
47417
47782
  //#endregion
47783
+ //#region ../blocks/src/system/runtime/shared/components/TerminalPanel.tsx
47784
+ function joinClasses(...parts) {
47785
+ return parts.filter((part) => typeof part === "string" && part.length > 0).join(" ");
47786
+ }
47787
+ function TerminalPanel({ tone, title, titleAs: Title = "h3", body, secondaryBody, icon, actions, className, titleClassName, bodyClassName, secondaryBodyClassName, iconClassName, actionsClassName, role, live }) {
47788
+ const resolvedRole = role ?? (tone === "error" ? "alert" : "status");
47789
+ const resolvedLive = live ?? (resolvedRole === "alert" ? "assertive" : "polite");
47790
+ return /* @__PURE__ */ jsxs("div", {
47791
+ className,
47792
+ "data-terminal-panel": true,
47793
+ "data-terminal-tone": tone,
47794
+ role: resolvedRole,
47795
+ "aria-live": resolvedLive === "off" ? void 0 : resolvedLive,
47796
+ children: [
47797
+ icon ? /* @__PURE__ */ jsx("div", {
47798
+ className: joinClasses(iconClassName),
47799
+ "data-terminal-icon": true,
47800
+ children: icon
47801
+ }) : null,
47802
+ /* @__PURE__ */ jsx(Title, {
47803
+ className: joinClasses(titleClassName),
47804
+ "data-terminal-title": true,
47805
+ children: title
47806
+ }),
47807
+ body ? /* @__PURE__ */ jsx("div", {
47808
+ className: joinClasses(bodyClassName),
47809
+ "data-terminal-body": true,
47810
+ children: body
47811
+ }) : null,
47812
+ actions ? /* @__PURE__ */ jsx("div", {
47813
+ className: joinClasses(actionsClassName),
47814
+ "data-terminal-actions": true,
47815
+ children: actions
47816
+ }) : null,
47817
+ secondaryBody ? /* @__PURE__ */ jsx("div", {
47818
+ className: joinClasses(secondaryBodyClassName),
47819
+ "data-terminal-secondary-body": true,
47820
+ children: secondaryBody
47821
+ }) : null
47822
+ ]
47823
+ });
47824
+ }
47825
+ var init_TerminalPanel = __esmMin((() => {}));
47826
+ //#endregion
47418
47827
  //#region ../blocks/src/system/runtime/shared/components/SelectableOptionCard.tsx
47419
47828
  function SelectableOptionCard(props) {
47420
47829
  const { baseClassName, selectedClassName, disabledClassName, iconClassName, labelClassName, detailClassName, icon, label, detail, selected, disabled, tooltip, extraClassNames = [], onClick, renderCheck, renderDisabledTooltip } = props;
@@ -47478,6 +47887,140 @@ var init_shared = __esmMin((() => {
47478
47887
  init_components();
47479
47888
  }));
47480
47889
  //#endregion
47890
+ //#region ../blocks/src/system/runtime/components/booking/SuccessMessage.tsx
47891
+ /**
47892
+ * SuccessMessage Component
47893
+ *
47894
+ * Terminal success state after a completed appointment booking.
47895
+ * Rendered on the shared registration-surface (see booking-form.client),
47896
+ * using the shared TerminalPanel + StateIcon primitives.
47897
+ */
47898
+ var SuccessMessage;
47899
+ var init_SuccessMessage = __esmMin((() => {
47900
+ init_CheckIcon$1();
47901
+ init_StateIcon();
47902
+ init_TerminalPanel();
47903
+ SuccessMessage = ({ message, resourceName, className }) => {
47904
+ return /* @__PURE__ */ jsx(TerminalPanel, {
47905
+ tone: "success",
47906
+ title: "Booking confirmed",
47907
+ icon: /* @__PURE__ */ jsx(StateIcon, {
47908
+ variant: "success",
47909
+ children: /* @__PURE__ */ jsx(CheckIcon, { strokeWidth: 3 })
47910
+ }),
47911
+ body: /* @__PURE__ */ jsx("p", {
47912
+ className: "ab-text",
47913
+ children: message
47914
+ }),
47915
+ secondaryBody: resourceName ? /* @__PURE__ */ jsxs("p", {
47916
+ className: "ab-text rb-on-surface--muted",
47917
+ children: ["Practitioner: ", resourceName]
47918
+ }) : null,
47919
+ className: ["ab-center", className ?? ""].join(" ").trim(),
47920
+ titleClassName: "ab-terminal-title",
47921
+ role: "alert",
47922
+ live: "polite"
47923
+ });
47924
+ };
47925
+ }));
47926
+ //#endregion
47927
+ //#region ../blocks/src/system/runtime/shared/mailingListSignupCopy.ts
47928
+ function getBookingMailingListNoteCopy(note, context) {
47929
+ if (note === "confirmation_required") return {
47930
+ title: MAILING_LIST_CONFIRMATION_MESSAGE,
47931
+ detail: context === "booking" ? "This is separate from your booking confirmation." : null
47932
+ };
47933
+ return {
47934
+ title: "We couldn’t confirm your mailing-list signup.",
47935
+ detail: context === "booking" ? "This does not affect your booking." : null
47936
+ };
47937
+ }
47938
+ var MAILING_LIST_CONFIRMATION_MESSAGE;
47939
+ var init_mailingListSignupCopy = __esmMin((() => {
47940
+ MAILING_LIST_CONFIRMATION_MESSAGE = "Please check your inbox to confirm your signup.";
47941
+ }));
47942
+ //#endregion
47943
+ //#region ../blocks/src/system/runtime/shared/components/BookingMailingListNote.tsx
47944
+ function BookingMailingListNote(props) {
47945
+ const copy = getBookingMailingListNoteCopy(props.note, props.context);
47946
+ return /* @__PURE__ */ jsxs("div", {
47947
+ role: "status",
47948
+ className: props.className,
47949
+ children: [/* @__PURE__ */ jsx("p", { children: copy.title }), copy.detail ? /* @__PURE__ */ jsx("p", { children: copy.detail }) : null]
47950
+ });
47951
+ }
47952
+ var init_BookingMailingListNote = __esmMin((() => {
47953
+ init_mailingListSignupCopy();
47954
+ }));
47955
+ //#endregion
47956
+ //#region ../blocks/src/system/runtime/nodes/booking-form.mailing-list-note.ts
47957
+ function storageKey$1(sessionId) {
47958
+ return `riverbank:booking:mailing-list:${sessionId}`;
47959
+ }
47960
+ function saveAppointmentMailingListNote(sessionId, note) {
47961
+ if (!note) return;
47962
+ try {
47963
+ window.sessionStorage.setItem(storageKey$1(sessionId), note);
47964
+ } catch {}
47965
+ }
47966
+ function readAppointmentMailingListNote(sessionId) {
47967
+ try {
47968
+ const stored = window.sessionStorage.getItem(storageKey$1(sessionId));
47969
+ return stored === "confirmation_required" || stored === "not_confirmed" ? stored : null;
47970
+ } catch {
47971
+ return null;
47972
+ }
47973
+ }
47974
+ var init_booking_form_mailing_list_note = __esmMin((() => {}));
47975
+ //#endregion
47976
+ //#region ../blocks/src/system/runtime/nodes/booking-form.completion.tsx
47977
+ function BookingFormCompletion({ resourceName, successMessage, redirectState, localNote }) {
47978
+ const note = redirectState.kind === "success" ? readAppointmentMailingListNote(redirectState.sessionId) : localNote;
47979
+ return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SuccessMessage, {
47980
+ message: getBookingSuccessMessage(successMessage),
47981
+ resourceName
47982
+ }), note ? /* @__PURE__ */ jsx(BookingMailingListNote, {
47983
+ note,
47984
+ context: "booking",
47985
+ className: "rb-mt-4"
47986
+ }) : null] });
47987
+ }
47988
+ var init_booking_form_completion = __esmMin((() => {
47989
+ init_SuccessMessage();
47990
+ init_BookingMailingListNote();
47991
+ init_booking_form_state();
47992
+ init_booking_form_mailing_list_note();
47993
+ }));
47994
+ //#endregion
47995
+ //#region ../blocks/src/system/runtime/nodes/booking-form.submit-handler.ts
47996
+ function appendRebookFlag(url, enabled) {
47997
+ if (!enabled) return url;
47998
+ const nextUrl = new URL(url);
47999
+ nextUrl.searchParams.set("rebook", "1");
48000
+ return nextUrl.toString();
48001
+ }
48002
+ function createBookingFormSubmitHandler(input) {
48003
+ return async () => {
48004
+ const { successUrl, cancelUrl } = buildCheckoutReturnUrls("booking", input.bookingAnchorId);
48005
+ const result = await input.booking.actions.submit({
48006
+ redirect: "manual",
48007
+ successUrl: appendRebookFlag(successUrl, input.isPortalRebook),
48008
+ cancelUrl: appendRebookFlag(cancelUrl, input.isPortalRebook)
48009
+ });
48010
+ if (!result.ok) return;
48011
+ if (result.outcome.kind === "checkout_redirect") {
48012
+ saveAppointmentMailingListNote(result.outcome.sessionId, result.outcome.mailingListSignupNote);
48013
+ window.location.href = result.outcome.checkoutUrl;
48014
+ return;
48015
+ }
48016
+ input.setLocalMailingListNote(result.outcome.mailingListSignupNote ?? null);
48017
+ };
48018
+ }
48019
+ var init_booking_form_submit_handler = __esmMin((() => {
48020
+ init_shared();
48021
+ init_booking_form_mailing_list_note();
48022
+ }));
48023
+ //#endregion
47481
48024
  //#region ../blocks/src/system/runtime/nodes/booking-form.client.tsx
47482
48025
  function getBookingRedirectLocationSnapshot() {
47483
48026
  if (typeof window === "undefined") return {
@@ -47489,12 +48032,6 @@ function getBookingRedirectLocationSnapshot() {
47489
48032
  hash: window.location.hash
47490
48033
  };
47491
48034
  }
47492
- function appendRebookFlag(url, enabled) {
47493
- if (!enabled) return url;
47494
- const nextUrl = new URL(url);
47495
- nextUrl.searchParams.set(PORTAL_REBOOK_QUERY_PARAM, PORTAL_REBOOK_QUERY_VALUE);
47496
- return nextUrl.toString();
47497
- }
47498
48035
  /**
47499
48036
  * Themed surface container for every booking view state (wizard, success,
47500
48037
  * verifying). Styled by the shared registration-surface layer.
@@ -47509,12 +48046,11 @@ function BookingSurface({ id, className, children }) {
47509
48046
  function buildBookingFormNodeClientProps(props) {
47510
48047
  return buildBookingFormInteractiveIslandProps(props);
47511
48048
  }
47512
- var PORTAL_REBOOK_QUERY_PARAM, PORTAL_REBOOK_QUERY_VALUE, REBOOK_COMPLETION_MODE_VERIFIED_CHECKOUT, REBOOK_COMPLETION_MODE_BYPASSED, BookingFormClient, BookingFormNodeClient;
48049
+ var REBOOK_COMPLETION_MODE_VERIFIED_CHECKOUT, REBOOK_COMPLETION_MODE_BYPASSED, BookingFormClient, BookingFormNodeClient;
47513
48050
  var init_booking_form_client = __esmMin((() => {
47514
48051
  init_noop();
47515
48052
  init_client();
47516
48053
  init_api$1();
47517
- init_SuccessMessage();
47518
48054
  init_useHeadlessBookingFlow();
47519
48055
  init_useAppointmentCheckoutVerification();
47520
48056
  init_booking_form_state();
@@ -47522,9 +48058,9 @@ var init_booking_form_client = __esmMin((() => {
47522
48058
  init_booking_form_interactive();
47523
48059
  init_shared();
47524
48060
  init_FeedbackMessage();
48061
+ init_booking_form_completion();
48062
+ init_booking_form_submit_handler();
47525
48063
  init_date_formatting();
47526
- PORTAL_REBOOK_QUERY_PARAM = "rebook";
47527
- PORTAL_REBOOK_QUERY_VALUE = "1";
47528
48064
  REBOOK_COMPLETION_MODE_VERIFIED_CHECKOUT = "verified_checkout";
47529
48065
  REBOOK_COMPLETION_MODE_BYPASSED = "bypassed";
47530
48066
  BookingFormClient = ({ siteId: siteIdProp, render }) => {
@@ -47538,12 +48074,16 @@ var init_booking_form_client = __esmMin((() => {
47538
48074
  const isPortalRebook = render.hydration.rebookContext?.kind === "portal_rebook";
47539
48075
  const hasLoggedRebookCompletionRef = useRef(false);
47540
48076
  const [redirectState] = useState(() => getBookingRedirectStateFromLocation(getBookingRedirectLocationSnapshot()));
48077
+ const [localMailingListNote, setLocalMailingListNote] = useState(null);
47541
48078
  const showSpamProtection = render.hydration.spamProtectionEnabled ?? isSpamProtectionEnabled();
47542
48079
  const api = useBlockApi();
47543
48080
  const hasPortalAuth = api.config.auth.type === "bearer" || api.config.authOverrides?.portal?.type === "bearer";
48081
+ const formId = render.hydration.formId ?? form?.id ?? "booking-form";
47544
48082
  const booking = useHeadlessBookingFlow({
48083
+ mailingList: render.hydration.mailingList,
48084
+ siteName: render.hydration.siteName,
47545
48085
  siteId,
47546
- formId: render.hydration.formId ?? form?.id ?? "booking-form",
48086
+ formId,
47547
48087
  form,
47548
48088
  services,
47549
48089
  serviceCategories: render.hydration.serviceCategories,
@@ -47613,22 +48153,20 @@ var init_booking_form_client = __esmMin((() => {
47613
48153
  children: render.display.message ?? "Booking form not found. Please check your configuration."
47614
48154
  })
47615
48155
  });
47616
- const handleComplete = async () => {
47617
- const { successUrl, cancelUrl } = buildCheckoutReturnUrls("booking", bookingAnchorId);
47618
- const result = await booking.actions.submit({
47619
- redirect: "manual",
47620
- successUrl: appendRebookFlag(successUrl, isPortalRebook),
47621
- cancelUrl: appendRebookFlag(cancelUrl, isPortalRebook)
47622
- });
47623
- if (!result.ok) return;
47624
- if (result.outcome.kind === "checkout_redirect") window.location.href = result.outcome.checkoutUrl;
47625
- };
48156
+ const handleComplete = createBookingFormSubmitHandler({
48157
+ booking,
48158
+ bookingAnchorId,
48159
+ isPortalRebook,
48160
+ setLocalMailingListNote
48161
+ });
47626
48162
  if (viewState.kind === "success") return /* @__PURE__ */ jsx(BookingSurface, {
47627
48163
  id: bookingAnchorId,
47628
48164
  className: render.display.className,
47629
- children: /* @__PURE__ */ jsx(SuccessMessage, {
47630
- message: getBookingSuccessMessage(render.display.successMessage),
47631
- resourceName: viewState.resourceName
48165
+ children: /* @__PURE__ */ jsx(BookingFormCompletion, {
48166
+ successMessage: render.display.successMessage,
48167
+ resourceName: viewState.resourceName,
48168
+ redirectState,
48169
+ localNote: localMailingListNote
47632
48170
  })
47633
48171
  });
47634
48172
  if (viewState.kind === "verifying") return /* @__PURE__ */ jsx(BookingSurface, {
@@ -48360,7 +48898,8 @@ function createInitialRegistrationFormData() {
48360
48898
  email: "",
48361
48899
  phone: "",
48362
48900
  notes: "",
48363
- consentAccepted: false
48901
+ consentAccepted: false,
48902
+ mailingListOptIn: false
48364
48903
  };
48365
48904
  }
48366
48905
  function validateFormData(formData, requiresConsent = false) {
@@ -49718,7 +50257,10 @@ async function handleCheckoutReturn(options, deps, returnContextRef) {
49718
50257
  }
49719
50258
  const { checkoutAttemptId } = command;
49720
50259
  const pending = deps.getPendingRegistration(siteId, checkoutAttemptId);
49721
- returnContextRef.current = { checkoutAttemptId };
50260
+ returnContextRef.current = {
50261
+ checkoutAttemptId,
50262
+ mailingListSignupNote: pending?.mailingListSignupNote
50263
+ };
49722
50264
  if (pending) restorePendingPresentation(options, pending);
49723
50265
  options.setStep("verifying-payment");
49724
50266
  try {
@@ -49739,7 +50281,10 @@ function completeVerifiedRegistration(options, deps, returnContext) {
49739
50281
  const siteId = options.api.config.siteId;
49740
50282
  const checkoutAttemptId = returnContext?.checkoutAttemptId;
49741
50283
  if (siteId && checkoutAttemptId) deps.clearPendingRegistration(siteId, checkoutAttemptId);
49742
- options.setRegistrationResult({ status: "confirmed" });
50284
+ options.setRegistrationResult({
50285
+ status: "confirmed",
50286
+ mailingListSignupNote: returnContext?.mailingListSignupNote
50287
+ });
49743
50288
  options.setStep("success");
49744
50289
  }
49745
50290
  function useEventRegistrationStripeReturnWithDeps(options, deps) {
@@ -49846,6 +50391,9 @@ var init_registrationErrorPresentation = __esmMin((() => {
49846
50391
  }));
49847
50392
  //#endregion
49848
50393
  //#region ../blocks/src/system/runtime/nodes/event-registration/useEventRegistrationSubmit.ts
50394
+ function wantsMailingListSignup(options) {
50395
+ return options.mailingListSignup !== null && options.formData.mailingListOptIn === true;
50396
+ }
49849
50397
  function createClientCommandId(cryptoSource = {
49850
50398
  randomUUID: globalThis.crypto.randomUUID?.bind(globalThis.crypto),
49851
50399
  getRandomValues: (bytes) => globalThis.crypto.getRandomValues(bytes)
@@ -49939,7 +50487,8 @@ async function completeRegistrationSubmission(options, deps, prepared, result, s
49939
50487
  case "paymentStatusRequired":
49940
50488
  options.setPaymentStatusRecovery({
49941
50489
  kind: "ready",
49942
- subject: result.subject
50490
+ subject: result.subject,
50491
+ mailingListSignupNote: result.mailingListSignupNote
49943
50492
  });
49944
50493
  options.setStep("payment-status");
49945
50494
  return {
@@ -49948,14 +50497,15 @@ async function completeRegistrationSubmission(options, deps, prepared, result, s
49948
50497
  };
49949
50498
  case "checkoutRequired":
49950
50499
  options.setPendingRegistrationReference(result.reference);
49951
- savePendingCheckout(options, deps, prepared, result.submissionId, result.reference);
50500
+ savePendingCheckout(options, deps, prepared, result.submissionId, result.reference, result.mailingListSignupNote);
49952
50501
  options.setStep("redirecting");
49953
50502
  return redirectToCheckout(result.checkoutUrl, submitOptions);
49954
50503
  case "waitlisted":
49955
50504
  options.setRegistrationResult({
49956
50505
  status: "waitlist",
49957
50506
  title: "Added to waitlist",
49958
- message: result.waitlist.message
50507
+ message: result.waitlist.message,
50508
+ mailingListSignupNote: result.mailingListSignupNote
49959
50509
  });
49960
50510
  break;
49961
50511
  case "bookingComplete":
@@ -49963,7 +50513,8 @@ async function completeRegistrationSubmission(options, deps, prepared, result, s
49963
50513
  options.setPendingRegistrationReference(result.reference);
49964
50514
  options.setRegistrationResult({
49965
50515
  status: "confirmed",
49966
- message: result.summary.paymentMethod === "pass" ? result.summary.message : void 0
50516
+ message: result.summary.paymentMethod === "pass" ? result.summary.message : void 0,
50517
+ mailingListSignupNote: result.mailingListSignupNote
49967
50518
  });
49968
50519
  break;
49969
50520
  }
@@ -50022,7 +50573,7 @@ function resolveSelectionSnapshot(method, passId, membershipId, bundleProductId,
50022
50573
  if (method === "free") return { method };
50023
50574
  throw new Error("Choose an available payment option.");
50024
50575
  }
50025
- function savePendingCheckout(options, deps, prepared, checkoutAttemptId, reference) {
50576
+ function savePendingCheckout(options, deps, prepared, checkoutAttemptId, reference, mailingListSignupNote) {
50026
50577
  const siteId = options.api.config.siteId;
50027
50578
  if (!siteId) return;
50028
50579
  deps.savePendingRegistration(siteId, checkoutAttemptId, {
@@ -50031,7 +50582,8 @@ function savePendingCheckout(options, deps, prepared, checkoutAttemptId, referen
50031
50582
  ticketSelections: prepared.ticketSelections,
50032
50583
  selectedEventId: options.registrationTarget?.selectedEventId ?? null,
50033
50584
  selectedAttendanceMode: options.selectedAttendanceMode,
50034
- paymentSelection: prepared.selectionSnapshot
50585
+ paymentSelection: prepared.selectionSnapshot,
50586
+ mailingListSignupNote
50035
50587
  });
50036
50588
  }
50037
50589
  function redirectToCheckout(checkoutUrl, submitOptions) {
@@ -50045,7 +50597,7 @@ function redirectToCheckout(checkoutUrl, submitOptions) {
50045
50597
  };
50046
50598
  }
50047
50599
  function registrationRequestIntentKey(request) {
50048
- const { registrationCommandId: _command, altchaSolution: _proof, checkout, ...intent } = request;
50600
+ const { registrationCommandId: _command, altchaSolution: _proof, mailingListOptIn: _marketingConsent, checkout, ...intent } = request;
50049
50601
  return JSON.stringify({
50050
50602
  ...intent,
50051
50603
  checkout: checkout ? {
@@ -50070,6 +50622,7 @@ function buildRegistrationRequest(options, prepared, method, passId, membershipI
50070
50622
  phone: options.formData.phone.trim() || void 0,
50071
50623
  notes: options.formData.notes.trim() || void 0,
50072
50624
  consentAccepted: options.formData.consentAccepted,
50625
+ mailingListOptIn: wantsMailingListSignup(options),
50073
50626
  altchaSolution: options.altchaSolution,
50074
50627
  paymentMethod: method,
50075
50628
  customerPassId: method === "pass" ? passId : void 0,
@@ -50330,13 +50883,17 @@ function isCheckableRecovery(state) {
50330
50883
  function assistanceRequired(recovery) {
50331
50884
  return {
50332
50885
  kind: "assistanceRequired",
50333
- subject: recovery.subject
50886
+ subject: recovery.subject,
50887
+ mailingListSignupNote: recovery.mailingListSignupNote
50334
50888
  };
50335
50889
  }
50336
50890
  function applyStatusOutcome(outcome, recovery, setters, setRecovery) {
50337
50891
  if (outcome.kind === "resolved") {
50338
50892
  setters.setPendingRegistrationReference(outcome.reference);
50339
- setters.setRegistrationResult({ status: "confirmed" });
50893
+ setters.setRegistrationResult({
50894
+ status: "confirmed",
50895
+ mailingListSignupNote: recovery.mailingListSignupNote
50896
+ });
50340
50897
  setRecovery(null);
50341
50898
  setters.setStep("success");
50342
50899
  return;
@@ -50457,6 +51014,7 @@ function useEventRegistrationWizardWithDeps(options, deps) {
50457
51014
  const paymentSelection = flowState.paymentSelection;
50458
51015
  const [selectedEvent, setSelectedEvent] = useState(preSelectedEvent ?? null);
50459
51016
  const [formData, setFormData] = useState(createInitialRegistrationFormData);
51017
+ const mailingListSignup = resolveBookingSignupOffer(options.mailingList, options.siteName);
50460
51018
  const [errors, setErrors] = useState({});
50461
51019
  const [guests, setGuests] = useState([]);
50462
51020
  const [guestErrors, setGuestErrors] = useState({});
@@ -50903,6 +51461,7 @@ function useEventRegistrationWizardWithDeps(options, deps) {
50903
51461
  ticketSelections,
50904
51462
  selectedSlidingAmount,
50905
51463
  formData,
51464
+ mailingListSignup,
50906
51465
  altchaSolution,
50907
51466
  requireGuestDetails,
50908
51467
  guests,
@@ -50999,6 +51558,7 @@ function useEventRegistrationWizardWithDeps(options, deps) {
50999
51558
  hasValidTicketSelection,
51000
51559
  eventRequiresPayment,
51001
51560
  formData,
51561
+ mailingListSignup,
51002
51562
  setFormData,
51003
51563
  errors,
51004
51564
  guests,
@@ -52502,6 +53062,24 @@ function NotesField({ id, onChange, value }) {
52502
53062
  })]
52503
53063
  });
52504
53064
  }
53065
+ function MailingListOptInField({ signup, formData, onChange }) {
53066
+ if (!signup) return null;
53067
+ return /* @__PURE__ */ jsxs("div", {
53068
+ className: "er-field",
53069
+ children: [/* @__PURE__ */ jsx(CheckboxChoice, {
53070
+ checked: formData.mailingListOptIn === true,
53071
+ onChange: (event) => onChange({
53072
+ ...formData,
53073
+ mailingListOptIn: event.target.checked
53074
+ }),
53075
+ label: `Email me news and updates from ${signup.siteName}.`,
53076
+ presentation: "row"
53077
+ }), /* @__PURE__ */ jsx("p", {
53078
+ className: "er-text er-text--muted",
53079
+ children: "Optional. You can unsubscribe at any time."
53080
+ })]
53081
+ });
53082
+ }
52505
53083
  var AttendeeDetailsStep;
52506
53084
  var init_AttendeeDetailsStep = __esmMin((() => {
52507
53085
  init_GuestDetailsSection();
@@ -52509,7 +53087,7 @@ var init_AttendeeDetailsStep = __esmMin((() => {
52509
53087
  init_FieldValidationMessage();
52510
53088
  init_BookingConsentAgreement();
52511
53089
  init_CheckboxChoice();
52512
- AttendeeDetailsStep = ({ formData, onChange, errors, emailLocked = false, onLogout, ticketsCount = 1, requireGuestDetails = false, guests = [], onGuestsChange, guestErrors = {}, guestSectionShake = false, onGuestShakeEnd, consent }) => {
53090
+ AttendeeDetailsStep = ({ formData, onChange, errors, emailLocked = false, onLogout, ticketsCount = 1, requireGuestDetails = false, guests = [], onGuestsChange, guestErrors = {}, guestSectionShake = false, onGuestShakeEnd, consent, mailingListSignup }) => {
52513
53091
  const idBase = useId();
52514
53092
  const nameId = `${idBase}-name`;
52515
53093
  const emailId = `${idBase}-email`;
@@ -52618,6 +53196,11 @@ var init_AttendeeDetailsStep = __esmMin((() => {
52618
53196
  placeholder: "(optional)"
52619
53197
  })]
52620
53198
  }),
53199
+ /* @__PURE__ */ jsx(MailingListOptInField, {
53200
+ signup: mailingListSignup,
53201
+ formData,
53202
+ onChange
53203
+ }),
52621
53204
  /* @__PURE__ */ jsx(NotesField, {
52622
53205
  id: notesId,
52623
53206
  value: formData.notes,
@@ -107423,7 +108006,8 @@ var init_PaymentSelectionStep = __esmMin((() => {
107423
108006
  var SuccessStep;
107424
108007
  var init_SuccessStep = __esmMin((() => {
107425
108008
  init_shared();
107426
- SuccessStep = ({ title, message, variant = "success" }) => {
108009
+ init_BookingMailingListNote();
108010
+ SuccessStep = ({ title, message, variant = "success", mailingListSignupNote, context = "booking" }) => {
107427
108011
  return /* @__PURE__ */ jsx(TerminalPanel, {
107428
108012
  tone: variant === "info" ? "info" : "success",
107429
108013
  className: "er-center",
@@ -107464,7 +108048,11 @@ var init_SuccessStep = __esmMin((() => {
107464
108048
  })
107465
108049
  }),
107466
108050
  title: title ?? (variant === "info" ? "Already Registered" : "Registration Confirmed!"),
107467
- body: message
108051
+ body: message,
108052
+ secondaryBody: mailingListSignupNote ? /* @__PURE__ */ jsx(BookingMailingListNote, {
108053
+ note: mailingListSignupNote,
108054
+ context
108055
+ }) : void 0
107468
108056
  });
107469
108057
  };
107470
108058
  }));
@@ -107668,7 +108256,8 @@ function AttendeeDetailsContent(props) {
107668
108256
  guestErrors: wizard.guestErrors,
107669
108257
  guestSectionShake: wizard.guestSectionShake,
107670
108258
  onGuestShakeEnd: wizard.handleGuestShakeEnd,
107671
- consent: (wizard.selectedEvent ?? wizard.preSelectedEvent)?.consent ?? null
108259
+ consent: (wizard.selectedEvent ?? wizard.preSelectedEvent)?.consent ?? null,
108260
+ mailingListSignup: wizard.mailingListSignup
107672
108261
  }),
107673
108262
  props.showSpamProtection && /* @__PURE__ */ jsx("div", {
107674
108263
  className: "er-altcha",
@@ -107849,6 +108438,10 @@ function PaymentStatusStep(props) {
107849
108438
  "aria-atomic": "true",
107850
108439
  children: props.state.kind === "checking" ? "Checking payment…" : view.title
107851
108440
  })] }),
108441
+ secondaryBody: props.state.mailingListSignupNote ? /* @__PURE__ */ jsx(BookingMailingListNote, {
108442
+ note: props.state.mailingListSignupNote,
108443
+ context: "booking"
108444
+ }) : void 0,
107852
108445
  actionsClassName: "er-button-group",
107853
108446
  actions: view.action ? /* @__PURE__ */ jsx("button", {
107854
108447
  type: "button",
@@ -107861,6 +108454,7 @@ function PaymentStatusStep(props) {
107861
108454
  }
107862
108455
  var init_PaymentStatusStep = __esmMin((() => {
107863
108456
  init_shared();
108457
+ init_BookingMailingListNote();
107864
108458
  }));
107865
108459
  //#endregion
107866
108460
  //#region ../blocks/src/system/runtime/nodes/event-registration/EventRegistrationSurface.tsx
@@ -107954,11 +108548,10 @@ function EventRegistrationTerminalState(props) {
107954
108548
  onReturnToPayment: wizard.handleReturnToPayment,
107955
108549
  onReturnToBooking: wizard.handleReturnToBooking
107956
108550
  }) : null;
107957
- case "success": return wizard.registrationResult ? /* @__PURE__ */ jsx(SuccessStep, {
107958
- title: wizard.registrationResult.title,
107959
- variant: wizard.registrationResult.variant,
107960
- message: wizard.registrationResult.message ?? props.successMessage
107961
- }) : null;
108551
+ case "success": return /* @__PURE__ */ jsx(EventRegistrationSuccess, {
108552
+ wizard,
108553
+ fallbackMessage: props.successMessage
108554
+ });
107962
108555
  case "error": return /* @__PURE__ */ jsx(ErrorStep, {
107963
108556
  message: wizard.errorMessage,
107964
108557
  action: wizard.errorAction,
@@ -107971,6 +108564,17 @@ function EventRegistrationTerminalState(props) {
107971
108564
  case "select-payment": return null;
107972
108565
  }
107973
108566
  }
108567
+ function EventRegistrationSuccess(props) {
108568
+ const result = props.wizard.registrationResult;
108569
+ if (!result) return null;
108570
+ return /* @__PURE__ */ jsx(SuccessStep, {
108571
+ title: result.title,
108572
+ variant: result.variant,
108573
+ message: result.message ?? props.fallbackMessage,
108574
+ mailingListSignupNote: result.mailingListSignupNote,
108575
+ context: result.status === "waitlist" ? "waitlist" : "booking"
108576
+ });
108577
+ }
107974
108578
  function EventRegistrationSurface(props) {
107975
108579
  const { wizard } = props;
107976
108580
  const mainRef = useRef(null);
@@ -108173,19 +108777,23 @@ function getWizardStepLabel(input) {
108173
108777
  case "payment-failed": return "";
108174
108778
  }
108175
108779
  }
108780
+ function useConfiguredEventRegistrationWizard(props) {
108781
+ return useEventRegistrationWizard({
108782
+ anchorId: EVENT_REGISTRATION_ANCHOR_ID,
108783
+ occurrenceContext: props.occurrenceContext ?? null,
108784
+ subject: props.subject ?? null,
108785
+ events: props.events ?? [],
108786
+ maxTicketsNum: normalizeEventRegistrationMaxTickets(props.maxTickets ?? "5"),
108787
+ mailingList: props.mailingList,
108788
+ siteName: props.siteName
108789
+ });
108790
+ }
108176
108791
  function EventRegistrationWizard(props) {
108177
- const { occurrenceContext, subject, events, maxTickets = "5", showVenue = true, showCapacity = true, successMessage = "Thank you for registering! Check your email for confirmation details.", buttonText = "Complete Registration", buttonVariant = "primary", className, spamProtectionEnabled, supportEmail } = props;
108178
- const maxTicketsNum = normalizeEventRegistrationMaxTickets(maxTickets);
108792
+ const { occurrenceContext, subject, events, showVenue = true, showCapacity = true, successMessage = "Thank you for registering! Check your email for confirmation details.", buttonText = "Complete Registration", buttonVariant = "primary", className, spamProtectionEnabled, supportEmail } = props;
108179
108793
  const showSpamProtection = spamProtectionEnabled ?? isSpamProtectionEnabled();
108180
108794
  const registrationRootClassName = `event-registration ${className || ""}`;
108181
108795
  const registrationRootRef = React.useRef(null);
108182
- const wizard = useEventRegistrationWizard({
108183
- anchorId: EVENT_REGISTRATION_ANCHOR_ID,
108184
- occurrenceContext: occurrenceContext ?? null,
108185
- subject: subject ?? null,
108186
- events: events ?? [],
108187
- maxTicketsNum
108188
- });
108796
+ const wizard = useConfiguredEventRegistrationWizard(props);
108189
108797
  useEventCheckoutHandoffRestore(wizard.step === "redirecting");
108190
108798
  const [bookingOverlayOpen, setBookingOverlayOpen] = useState(false);
108191
108799
  const [floatingPortalRoot, setFloatingPortalRoot] = useState(null);
@@ -113621,14 +114229,6 @@ const AccordionItemNode = ({ className, value, trigger, content, question, answe
113621
114229
  });
113622
114230
  };
113623
114231
  //#endregion
113624
- //#region ../theme-core/src/header/navDropdownSizing.ts
113625
- var NAV_DROPDOWN_SHIFT_PROPERTY, NAV_DROPDOWN_MAX_WIDTH_CSS;
113626
- var init_navDropdownSizing = __esmMin((() => {
113627
- NAV_DROPDOWN_SHIFT_PROPERTY = "--nav-dropdown-shift-x";
113628
- NAV_DROPDOWN_MAX_WIDTH_CSS = `min(22rem, calc(100vw - 2rem))`;
113629
- `${NAV_DROPDOWN_MAX_WIDTH_CSS}`, `${NAV_DROPDOWN_SHIFT_PROPERTY}`;
113630
- }));
113631
- //#endregion
113632
114232
  //#region ../blocks/src/system/runtime/header/HeaderCartDrawer.tsx
113633
114233
  function normalizeQuantityInput(value) {
113634
114234
  const parsed = Number(value);
@@ -117339,7 +117939,7 @@ function NewsletterFormClient({ render }) {
117339
117939
  tone: "success",
117340
117940
  className: "fb-success",
117341
117941
  role: "status",
117342
- children: getNewsletterSuccessOutcome(submissionState) === "confirmation_required" ? "Please check your inbox to confirm your signup." : render.display.successMessage
117942
+ children: getNewsletterSuccessOutcome(submissionState) === "confirmation_required" ? MAILING_LIST_CONFIRMATION_MESSAGE : render.display.successMessage
117343
117943
  })
117344
117944
  });
117345
117945
  if (render.display.availability === "unavailable") return /* @__PURE__ */ jsx(UnavailableNewsletterForm, { className: render.display.className });
@@ -117495,6 +118095,7 @@ var init_newsletter_form_client = __esmMin((() => {
117495
118095
  init_api$1();
117496
118096
  init_src$2();
117497
118097
  init_FeedbackMessage();
118098
+ init_mailingListSignupCopy();
117498
118099
  init_newsletter_form_parts();
117499
118100
  init_newsletter_form_client_state();
117500
118101
  init_newsletter_form_submission();
@@ -117722,6 +118323,8 @@ init_types$12();
117722
118323
  init_constants$1();
117723
118324
  init_colorStyles();
117724
118325
  init_surfaces();
118326
+ init_expandPalette();
118327
+ init_cssDeclarations();
117725
118328
  //#endregion
117726
118329
  //#region ../theme-core/src/accordions/defaults.ts
117727
118330
  init_curatedSiteStyles();
@@ -117735,29 +118338,6 @@ init_types$11();
117735
118338
  init_constants$2();
117736
118339
  init_colorStyles();
117737
118340
  //#endregion
117738
- //#region ../theme-core/src/navigation/generateNavLinkCSS.ts
117739
- init_types$9();
117740
- init_expandPalette();
117741
- init_colorConversion();
117742
- init_generateBaseCSS();
117743
- init_generateEffectsCSS();
117744
- //#endregion
117745
- //#region ../theme-core/src/header/surfaceRules.ts
117746
- init_shared$4();
117747
- init_colorStyles();
117748
- //#endregion
117749
- //#region ../theme-core/src/header/generateHeaderCss.ts
117750
- init_resolver$1();
117751
- init_siteChromeNavPreferences();
117752
- init_shared$4();
117753
- init_breakpoints();
117754
- init_navDropdownSizing();
117755
- init_scrollTreatment();
117756
- init_paintTargets();
117757
- //#endregion
117758
- //#region ../theme-core/src/footer/generateFooterCss.ts
117759
- init_resolver$1();
117760
- //#endregion
117761
118341
  //#region ../theme-core/src/layout/boundaryCss.ts
117762
118342
  init_sectionTransitions();
117763
118343
  init_transitionCatalogue();
@@ -118362,6 +118942,8 @@ init_atRuleValidation();
118362
118942
  init_expandPalette();
118363
118943
  init_generateButtonCss();
118364
118944
  init_generateCardCss();
118945
+ init_header$1();
118946
+ init_footer();
118365
118947
  init_tokens();
118366
118948
  init_colorStyles();
118367
118949
  //#endregion