@riverbankcms/sdk 0.141.0 → 0.143.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 (123) hide show
  1. package/dist/{PreviewEditorSidebar-Q-fy9GYw.mjs → PreviewEditorSidebar-DROGfMKi.mjs} +24 -15
  2. package/dist/{PreviewEditorUI-LYGzgk85.mjs → PreviewEditorUI-BaRjhFu-.mjs} +3 -3
  3. package/dist/{PreviewQueryProvider-CN0ewic5.mjs → PreviewQueryProvider-BCYICImX.mjs} +1 -1
  4. package/dist/{SdkPreviewModeRuntime-CoPYI5Jq.mjs → SdkPreviewModeRuntime-OIABYLES.mjs} +16 -11
  5. package/dist/{SiteChromeCustomizeContext-D8LePX8x.mjs → SiteChromeCustomizeContext-ohjTvZbc.mjs} +607 -545
  6. package/dist/_dts/api/src/billing.d.ts +6 -1
  7. package/dist/_dts/api/src/bookingConfig.d.ts +1 -1
  8. package/dist/_dts/api/src/commercePortalEndpoints.d.ts +2 -2
  9. package/dist/_dts/api/src/endpoints.d.ts +7 -27
  10. package/dist/_dts/api/src/index.d.ts +1 -1
  11. package/dist/_dts/api/src/publicBookingService.d.ts +1 -0
  12. package/dist/_dts/api/src/publicEventEndpointDefinitions.d.ts +7 -0
  13. package/dist/_dts/api/src/publicExperience/eventEndpoints.d.ts +48 -41
  14. package/dist/_dts/api/src/sdkConfig/layout.d.ts +13 -0
  15. package/dist/_dts/api/src/sdkContracts.d.ts +3 -8
  16. package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +1 -31
  17. package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +6 -1
  18. package/dist/_dts/billing/src/site-arrangements.d.ts +9 -5
  19. package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +56 -0
  20. package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +8 -0
  21. package/dist/_dts/blocks/src/system/runtime/api/client.d.ts +2 -1
  22. package/dist/_dts/blocks/src/system/runtime/api/endpoints.d.ts +8 -0
  23. package/dist/_dts/blocks/src/system/runtime/api/types/events.d.ts +95 -35
  24. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/PaymentStatusStep.d.ts +10 -0
  25. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/TicketSelectionStep.d.ts +0 -2
  26. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.contract.d.ts +12 -1
  27. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.planning.d.ts +2 -2
  28. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationCompletion.d.ts +1 -4
  29. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationDerivations.d.ts +12 -0
  30. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationErrorRecovery.d.ts +1 -1
  31. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/sessionStorage.d.ts +1 -0
  32. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/ticketSelectionLines.d.ts +4 -5
  33. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +9 -11
  34. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationSubmit.d.ts +56 -2
  35. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +10 -4
  36. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/usePaymentStatusRecovery.d.ts +23 -0
  37. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/utils.d.ts +1 -1
  38. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCollectionContract.d.ts +56 -0
  39. package/dist/_dts/commerce/src/purchase/event-registration-errors.d.ts +4 -4
  40. package/dist/_dts/commerce/src/purchase/eventCheckoutRecoveryWindow.d.ts +8 -0
  41. package/dist/_dts/commerce/src/purchase/index.d.ts +2 -1
  42. package/dist/_dts/commerce/src/purchase/stateTransitions.d.ts +1 -13
  43. package/dist/_dts/commerce/src/purchase/stripeCommissionMetadata.d.ts +1 -2
  44. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +58 -45
  45. package/dist/_dts/editor-blocks/src/block-editor/ColourFieldOptionsProvider.d.ts +7 -0
  46. package/dist/_dts/editor-blocks/src/block-editor/colourFieldVisibility.d.ts +7 -0
  47. package/dist/_dts/editor-blocks/src/block-editor/preparedManifest.d.ts +2 -0
  48. package/dist/_dts/editor-blocks/src/index.d.ts +1 -0
  49. package/dist/_dts/preview-next/src/client/preview/PreviewEditorSidebar.d.ts +2 -2
  50. package/dist/_dts/preview-next/src/client/preview/PreviewFooterEditorPanel.d.ts +3 -6
  51. package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +2 -2
  52. package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +2 -2
  53. package/dist/_dts/preview-next/src/client/preview/footerInspection.d.ts +16 -0
  54. package/dist/_dts/preview-next/src/client/preview/sdkConfig.d.ts +6 -0
  55. package/dist/_dts/sdk/src/config/types.d.ts +2 -18
  56. package/dist/_dts/sdk/src/config/validation.d.ts +6 -0
  57. package/dist/_dts/sdk/src/public-api/contracts.d.ts +3 -0
  58. package/dist/_dts/sdk/src/version.d.ts +1 -1
  59. package/dist/_dts/theme-core/src/footer/mode.d.ts +10 -1
  60. package/dist/_dts/theme-core/src/schema.d.ts +1 -7
  61. package/dist/_dts/theme-core/src/site-styles/effectivePageDesign.d.ts +32 -0
  62. package/dist/_dts/theme-core/src/site-styles/index.d.ts +1 -0
  63. package/dist/client/{BookingConsentAgreement-xJeYNdnb.mjs → BookingConsentAgreement-BoCtvzzu.mjs} +2 -2
  64. package/dist/client/{DiscountCodeDisclosure-DdT6uzl9.mjs → DiscountCodeDisclosure-B5S30nZk.mjs} +1 -1
  65. package/dist/client/{EventCombined.client-Cp28uYuM.mjs → EventCombined.client-CeZ2-zSt.mjs} +5 -5
  66. package/dist/client/{EventListing.client-CD6AJsMr.mjs → EventListing.client-DJN3j8B3.mjs} +2 -2
  67. package/dist/client/{LeafletStaticMap-DBsAi9-e.mjs → LeafletStaticMap-RjtGzDQT.mjs} +1 -1
  68. package/dist/client/{accordion-6dwbOKYR.mjs → accordion-DOmnDoyg.mjs} +1 -1
  69. package/dist/client/{bookingForm-CZE9_qPQ.mjs → bookingForm-C0vk7pgS.mjs} +5 -5
  70. package/dist/client/bookings.mjs +468 -534
  71. package/dist/client/{carousel-7VHGQARz.mjs → carousel-BZJ7pno3.mjs} +1 -1
  72. package/dist/client/{cart-Qg_mvQhh.mjs → cart-CaeVAHJl.mjs} +3 -3
  73. package/dist/client/{checkout-D84rpgdr.mjs → checkout-7wmoNDtG.mjs} +3 -3
  74. package/dist/client/client.mjs +559 -593
  75. package/dist/client/{context-Ctp3T0Wr.mjs → context-BOimxE3U.mjs} +12 -1
  76. package/dist/client/{dates-DJKFcI_N.mjs → dates-BnzVksi4.mjs} +2 -2
  77. package/dist/client/{eventCalendar-CK31z3vs.mjs → eventCalendar-l-fpaslC.mjs} +7 -7
  78. package/dist/client/{eventCombined-DiXd-ewn.mjs → eventCombined-DGGvssK6.mjs} +3 -3
  79. package/dist/client/{eventDetails-CTRgt2DK.mjs → eventDetails-DRiCm_hL.mjs} +4 -4
  80. package/dist/client/{eventListing-Dy9vi_j_.mjs → eventListing-dph8loYX.mjs} +3 -3
  81. package/dist/client/{eventRegistration-CnalYMr2.mjs → eventRegistration-ClBohmbY.mjs} +472 -531
  82. package/dist/client/{form-eUiMveTT.mjs → form-BLVVAnd3.mjs} +2 -2
  83. package/dist/client/{headerSection-Dy9kQpB1.mjs → headerSection-DHy4C8Ix.mjs} +2 -2
  84. package/dist/client/hooks.mjs +39 -13
  85. package/dist/client/{locationMap-DalCmWU0.mjs → locationMap-6HuS28ck.mjs} +2 -2
  86. package/dist/client/{newsletterForm-SDDPvhS0.mjs → newsletterForm-xOdcOhZP.mjs} +2 -2
  87. package/dist/client/{pricing-OcMz4SnX.mjs → pricing-ChinRYFt.mjs} +1 -1
  88. package/dist/client/{productDetail-BQrgHElM.mjs → productDetail-0chA5gbK.mjs} +3 -3
  89. package/dist/client/{productList-OnPn_UJj.mjs → productList-OoINA0h1.mjs} +3 -3
  90. package/dist/client/{propsDecoder-zBdsnS-N.mjs → propsDecoder-CIZ-hbIG.mjs} +33 -9
  91. package/dist/client/rendering/client.mjs +536 -550
  92. package/dist/client/rendering/islands.mjs +17 -17
  93. package/dist/client/rendering.mjs +602 -596
  94. package/dist/client/{scrollToBlock-BNM4Ob2Y.mjs → scrollToBlock-BPZl0gPZ.mjs} +1 -1
  95. package/dist/client/{shop-Bv1fPTwQ.mjs → shop-CLJFqNIq.mjs} +6 -6
  96. package/dist/client/{shop-commerce-D4KNGaW8.mjs → shop-commerce-PpANg5wB.mjs} +5 -5
  97. package/dist/client/{shop-commerce-store-2N5EV0Rc.mjs → shop-commerce-store-TA_Kz2ku.mjs} +1 -1
  98. package/dist/client/{shopShared-DvJGdHTV.mjs → shopShared-DzcFcA5g.mjs} +3 -3
  99. package/dist/client/{useEventFilters-BBBvGDHQ.mjs → useEventFilters-CFU21QZo.mjs} +5 -5
  100. package/dist/preview-next/before-render.mjs +11 -37
  101. package/dist/preview-next/client/runtime.mjs +4 -4
  102. package/dist/preview-next/keepAlive.mjs +11 -37
  103. package/dist/preview-next/middleware.mjs +11 -37
  104. package/dist/{previewAuthStore-Gjb6r6vz.mjs → previewAuthStore-JA6-I_sL.mjs} +11 -37
  105. package/dist/{sdk-runtime-Defnbfzw.mjs → sdk-runtime-CDKl0Fr7.mjs} +2 -2
  106. package/dist/{separator-CZXO3Sb0.mjs → separator-BTp96X32.mjs} +1 -1
  107. package/dist/server/components.mjs +80 -51
  108. package/dist/server/config-validation.mjs +43 -14
  109. package/dist/server/config.mjs +43 -14
  110. package/dist/server/data.mjs +39 -13
  111. package/dist/server/index.mjs +12 -38
  112. package/dist/server/next.mjs +40 -53
  113. package/dist/server/page-converter.mjs +20 -8
  114. package/dist/server/prebuild.mjs +1 -1
  115. package/dist/server/rendering/server.mjs +80 -51
  116. package/dist/server/rendering.mjs +80 -51
  117. package/dist/server/routing.mjs +52 -17
  118. package/dist/server/server.mjs +40 -51
  119. package/dist/server/theme-bridge.mjs +10 -8
  120. package/dist/server/theme.mjs +10 -8
  121. package/package.json +1 -1
  122. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/checkoutRecovery.d.ts +0 -14
  123. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useCheckoutRecovery.d.ts +0 -8
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { d as unwrapResponse, l as ApiEnvelopeError, s as ApiRequestError, u as extractApiEnvelopeErrorDetails } from "./previewAuthStore-Gjb6r6vz.mjs";
2
+ import { d as unwrapResponse, l as ApiEnvelopeError, s as ApiRequestError, u as extractApiEnvelopeErrorDetails } from "./previewAuthStore-JA6-I_sL.mjs";
3
3
  import * as React$1 from "react";
4
4
  import React, { Component, Fragment, cloneElement, createContext, createElement, createRef, forwardRef, isValidElement, memo, startTransition, useCallback, useContext, useDebugValue, useEffect, useId, useImperativeHandle, useLayoutEffect, useMemo, useReducer, useRef, useState, useSyncExternalStore } from "react";
5
5
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
@@ -79172,6 +79172,19 @@ function mediaIdentifierOrFallback(current, fallback) {
79172
79172
  return fallback ?? (typeof current === "string" ? current : void 0);
79173
79173
  }
79174
79174
  //#endregion
79175
+ //#region ../theme-core/src/footer/mode.ts
79176
+ const footerModeSchema = z.enum([
79177
+ "default",
79178
+ "blocks",
79179
+ "default+blocks",
79180
+ "none"
79181
+ ]);
79182
+ /** Reads only SDK footer intent; unrelated config and theme fields are not authorities. */
79183
+ function resolveSdkFooterMode(config) {
79184
+ const parsed = z.object({ layout: z.object({ footerMode: footerModeSchema.optional() }).optional() }).safeParse(config);
79185
+ return parsed.success ? parsed.data.layout?.footerMode ?? "default" : "default";
79186
+ }
79187
+ //#endregion
79175
79188
  //#region ../theme-core/src/lib/media.ts
79176
79189
  const hotspotSchema = z.object({
79177
79190
  x: z.number().min(0).max(1),
@@ -88726,12 +88739,6 @@ const footerVariant = z.enum([
88726
88739
  "split"
88727
88740
  ]);
88728
88741
  const footerMaxWidth = z.enum(["container", "full"]);
88729
- const footerMode = z.enum([
88730
- "default",
88731
- "blocks",
88732
- "default+blocks",
88733
- "none"
88734
- ]);
88735
88742
  const footerNavLayoutMode = z.enum([
88736
88743
  "stack",
88737
88744
  "inline",
@@ -88820,9 +88827,9 @@ const footerSchema = z.object({
88820
88827
  /**
88821
88828
  * SDK-only footer rendering mode.
88822
88829
  *
88823
- * Backwards compatible: missing/undefined behaves as 'default'.
88830
+ * Historical persisted field; SDK rendering mode now lives in layout.footerMode.
88824
88831
  */
88825
- mode: footerMode.optional(),
88832
+ mode: footerModeSchema.optional(),
88826
88833
  variant: footerVariant,
88827
88834
  maxWidth: footerMaxWidth,
88828
88835
  showLogoText: z.boolean().optional(),
@@ -89480,6 +89487,15 @@ const publicEventBaseSchema = z.object({
89480
89487
  timeZone: z.string(),
89481
89488
  pricing: publicEventPricingSchema,
89482
89489
  paymentTerms: blockBookingPaymentTermsSchema,
89490
+ cancellationPolicy: z.object({ refunds: z.object({
89491
+ mode: z.enum([
89492
+ "never",
89493
+ "always",
89494
+ "cutoff"
89495
+ ]),
89496
+ cutoffHours: z.number(),
89497
+ method: z.enum(["original_payment_method", "site_credit"])
89498
+ }) }),
89483
89499
  consent: blockBookingConsentSchema.nullable(),
89484
89500
  accessRestriction: accessRestrictionSchema,
89485
89501
  allowedCategoryIds: z.array(z.string()),
@@ -89868,6 +89884,10 @@ const EVENTS = {
89868
89884
  method: "POST",
89869
89885
  authScope: "portal"
89870
89886
  },
89887
+ registrationNextStep: {
89888
+ path: "/public/sites/{siteId}/events/registration-next-step",
89889
+ method: "POST"
89890
+ },
89871
89891
  registrationStatus: {
89872
89892
  path: "/public/sites/{siteId}/events/registration-status",
89873
89893
  method: "GET"
@@ -90472,6 +90492,13 @@ function createBlockApi(config) {
90472
90492
  body: data
90473
90493
  });
90474
90494
  },
90495
+ async checkRegistrationNextStep(data) {
90496
+ const path = buildPath(EVENTS.registrationNextStep.path, { siteId: requireSiteId() });
90497
+ return request(EVENTS.registrationNextStep, {
90498
+ path,
90499
+ body: data
90500
+ });
90501
+ },
90475
90502
  async getEventRegistrationStatus(params) {
90476
90503
  const sid = requireSiteId();
90477
90504
  const path = buildPath(EVENTS.registrationStatus.path, { siteId: sid });
@@ -118901,6 +118928,18 @@ function getStepNumber(step, wizardSteps) {
118901
118928
  }
118902
118929
  //#endregion
118903
118930
  //#region ../blocks/src/system/runtime/nodes/event-registration/registrationDerivations.ts
118931
+ /** Public requests share subject identity without copying the run's display sessions. */
118932
+ function toRegistrationRequestSubject(subject, attendanceMode) {
118933
+ return subject.kind === "occurrence" ? {
118934
+ kind: "occurrence",
118935
+ occurrenceId: subject.occurrenceId,
118936
+ attendanceMode: attendanceMode ?? void 0
118937
+ } : {
118938
+ kind: "wholeSeries",
118939
+ eventSeriesId: subject.eventSeriesId,
118940
+ attendanceMode: attendanceMode ?? void 0
118941
+ };
118942
+ }
118904
118943
  function eventMatchesOccurrenceId(event, occurrenceId) {
118905
118944
  return event.registrationSubject.kind === "occurrence" && (event.registrationSubject.occurrenceId === occurrenceId || event.selectionId === occurrenceId);
118906
118945
  }
@@ -119196,6 +119235,7 @@ function shellLabelForRegistrationStep(step, events) {
119196
119235
  case "redirecting":
119197
119236
  case "verifying-payment":
119198
119237
  case "verifying-timeout":
119238
+ case "payment-status":
119199
119239
  case "payment-failed": return "Details";
119200
119240
  }
119201
119241
  }
@@ -129168,7 +129208,7 @@ function resolveEventRegistrationDirectPaymentSelection(input) {
129168
129208
  //#endregion
129169
129209
  //#region ../blocks/src/system/runtime/nodes/event-registration/registrationStateMachine.ts
129170
129210
  function hasBlockingExistingRegistration(input) {
129171
- return !input.hasWaitlistClaim && input.isAuthenticated && input.registration.kind !== "none";
129211
+ return !input.hasWaitlistClaim && input.isAuthenticated && input.registration.kind === "waitlisted";
129172
129212
  }
129173
129213
  function createInitialRegistrationFlowState(hasPreSelectedContext) {
129174
129214
  return {
@@ -129220,7 +129260,7 @@ function computeAutoSelection(input) {
129220
129260
  return { method: null };
129221
129261
  }
129222
129262
  function computeDirectPaymentSelection(eligibility) {
129223
- if (!eligibility?.canPayDirectly) return { method: null };
129263
+ if (!eligibility?.requiresPayment) return { method: null };
129224
129264
  const approvedKinds = getApprovedDirectPaymentCollectionOptionKinds(eligibility.paymentOptions);
129225
129265
  const collectionOptionKind = approvedKinds.includes("upfront") ? "upfront" : approvedKinds[0];
129226
129266
  return collectionOptionKind ? {
@@ -129234,7 +129274,7 @@ function isSelectionValid(input) {
129234
129274
  if (!eligibility) return selection.method === "stripe" || selection.method === "pass_bundle" || selection.method === "membership_bundle";
129235
129275
  switch (selection.method) {
129236
129276
  case "free": return eligibility.isFree;
129237
- case "stripe": return Boolean(eligibility.canPayDirectly && eligibility.price);
129277
+ case "stripe": return Boolean(eligibility.requiresPayment && eligibility.price);
129238
129278
  case "pass": return isAuthenticated && ticketsCount === 1 && !!selection.passId && eligibility.eligiblePasses.some((pass) => pass.id === selection.passId);
129239
129279
  case "membership": return isAuthenticated && ticketsCount === 1 && !!selection.membershipId && eligibility.eligibleMemberships.some((membership) => membership.id === selection.membershipId);
129240
129280
  case "pass_bundle": return ticketsCount === 1 && !!selection.bundlePassId && eligibility.availablePasses.some((pass) => pass.id === selection.bundlePassId);
@@ -129253,7 +129293,7 @@ function normalizeRegistrationFlowState(state) {
129253
129293
  ticketsCount: state.ticketsCount,
129254
129294
  passOptOut: nextPassOptOut
129255
129295
  });
129256
- const canKeepManualSelection = state.step === "select-payment" && state.selectionSource === "manual" && isSelectionValid({
129296
+ const canKeepManualSelection = state.step !== "select-tickets" && state.selectionSource === "manual" && isSelectionValid({
129257
129297
  selection: state.paymentSelection,
129258
129298
  isAuthenticated: state.isAuthenticated,
129259
129299
  eligibility: state.eligibility,
@@ -129336,7 +129376,7 @@ function resolveEventRegistrationSubmitPlan(input) {
129336
129376
  const selection = input.paymentSelection.method ? input.paymentSelection : void 0;
129337
129377
  if (input.canJoinWaitlist) return {
129338
129378
  ok: true,
129339
- args: withOptionalSelection({ method: "free" }, selection)
129379
+ args: { method: "free" }
129340
129380
  };
129341
129381
  switch (input.paymentSelection.method) {
129342
129382
  case "pass": return input.paymentSelection.passId ? {
@@ -129395,88 +129435,53 @@ function missingPaymentSelection() {
129395
129435
  };
129396
129436
  }
129397
129437
  //#endregion
129398
- //#region ../blocks/src/system/runtime/nodes/event-registration/checkoutRecovery.ts
129399
- /** Recovery may select held places; checkout still owns admission and payment validation. */
129400
- function checkoutRecoveryOptionAvailability(availability) {
129401
- if (availability.kind === "available" || availability.reason === "sold_out" || availability.reason === "overallCapacityUnavailable") return {
129402
- kind: "available",
129403
- remainingPlaces: null
129404
- };
129405
- return availability;
129438
+ //#region ../blocks/src/system/runtime/nodes/event-registration/ticketSelectionLines.ts
129439
+ /** Ticket selection requests a quote; only the server admits a booking. */
129440
+ function canRequestTicketOption(availability) {
129441
+ return availability.kind === "available" || availability.reason === "sold_out" || availability.reason === "overallCapacityUnavailable";
129406
129442
  }
129407
- /**
129408
- * A form-only projection for the explicit existing-checkout path. It permits
129409
- * collecting the original selection without claiming a new place is available.
129410
- * The public checkout service identifies the customer and remains the admission
129411
- * authority; no reservation/customer data is exposed through this projection.
129412
- */
129413
- function getCheckoutRecoveryFormEligibility(eligibility) {
129414
- if (!eligibility || eligibility.registration.kind !== "none" && eligibility.registration.kind !== "pending_payment" || eligibility.availability.kind === "unavailable" && eligibility.availability.reason !== "full" && eligibility.availability.reason !== "selectionRequired") return eligibility;
129415
- const amountCents = eligibility.price ?? 0;
129416
- if (amountCents <= 0 || !eligibility.currency || eligibility.availability.kind === "unavailable" && eligibility.availability.reason === "selectionRequired") return eligibility.registration.kind === "pending_payment" ? {
129417
- ...eligibility,
129418
- registration: { kind: "none" },
129419
- ticketTypes: eligibility.ticketTypes.map((option) => ({
129420
- ...option,
129421
- availability: checkoutRecoveryOptionAvailability(option.availability)
129422
- }))
129423
- } : eligibility;
129424
- const currency = eligibility.currency;
129425
- const paymentOptions = eligibility.paymentTerms.allowedOptions.map((option) => {
129426
- switch (option.kind) {
129427
- case "upfront": return {
129428
- kind: "payInFull",
129429
- amountCents,
129430
- currency
129431
- };
129432
- case "deferred_manual": return {
129433
- kind: "deferredManual",
129434
- amountCents,
129435
- currency
129436
- };
129437
- case "instalment_plan": return {
129438
- kind: "instalmentPlan",
129439
- amountCents,
129440
- currency
129441
- };
129442
- case "flexible_balance": return {
129443
- kind: "flexibleBalance",
129444
- amountCents,
129445
- currency
129446
- };
129447
- }
129448
- });
129449
- return {
129450
- ...eligibility,
129451
- registration: { kind: "none" },
129452
- availability: {
129453
- kind: "available",
129454
- remainingPlaces: null,
129455
- waitlistEnabled: eligibility.waitlistEnabled
129456
- },
129457
- eligible: paymentOptions.length > 0,
129458
- isFull: false,
129459
- canJoinWaitlist: false,
129460
- isFree: false,
129461
- requiresPayment: true,
129462
- canPayDirectly: paymentOptions.length > 0,
129463
- paymentOptions,
129464
- eligiblePasses: [],
129465
- eligibleMemberships: [],
129466
- ticketTypes: eligibility.ticketTypes.map((option) => ({
129467
- ...option,
129468
- availability: checkoutRecoveryOptionAvailability(option.availability)
129469
- }))
129470
- };
129443
+ function normalizeTicketSelectionLines(lines) {
129444
+ const quantitiesByTicketType = /* @__PURE__ */ new Map();
129445
+ for (const line of lines) {
129446
+ const quantity = Math.floor(line.quantity);
129447
+ if (quantity <= 0) continue;
129448
+ const key = line.pricingOptionId ?? null;
129449
+ quantitiesByTicketType.set(key, (quantitiesByTicketType.get(key) ?? 0) + quantity);
129450
+ }
129451
+ return [...quantitiesByTicketType.entries()].map(([pricingOptionId, quantity]) => ({
129452
+ pricingOptionId,
129453
+ quantity
129454
+ }));
129471
129455
  }
129472
- function isSoldOutEventSelectable(event, waitlistAvailable) {
129473
- return waitlistAvailable || canRecoverEventCheckout(event);
129456
+ function getTicketSelectionTotal(lines) {
129457
+ return normalizeTicketSelectionLines(lines).reduce((total, line) => total + line.quantity, 0);
129474
129458
  }
129475
- function canJoinWaitlistOutsideRecovery(event, attendanceMode, checkoutRecovery) {
129476
- return !checkoutRecovery && event !== null && canJoinEventWaitlist(event, { attendanceMode });
129459
+ function getTicketLineQuantity(lines, pricingOptionId) {
129460
+ return normalizeTicketSelectionLines(lines).find((line) => line.pricingOptionId === pricingOptionId)?.quantity ?? 0;
129477
129461
  }
129478
- function canRecoverEventCheckout(event) {
129479
- return event !== null && (event.registrationSubject.kind === "wholeSeries" || event.pricing.kind !== "free" && event.pricing.kind !== "external");
129462
+ function getSingleSelectedPricingOptionId(lines) {
129463
+ const normalized = normalizeTicketSelectionLines(lines);
129464
+ return normalized.length === 1 ? normalized[0]?.pricingOptionId ?? null : null;
129465
+ }
129466
+ function hasValidPricingOptionSelection(input) {
129467
+ if (!input.selectionRequired) return true;
129468
+ if (input.lines.length === 0) return false;
129469
+ const availableOptionIds = new Set(input.visibleOptions.filter((option) => canRequestTicketOption(option.availability)).map((option) => option.pricingOptionId));
129470
+ return input.lines.every((line) => line.pricingOptionId !== null && availableOptionIds.has(line.pricingOptionId));
129471
+ }
129472
+ function setTicketLineQuantity(input) {
129473
+ const nextQuantity = Math.max(0, Math.floor(input.quantity));
129474
+ const normalized = normalizeTicketSelectionLines(input.lines).filter((line) => line.pricingOptionId !== input.pricingOptionId);
129475
+ if (nextQuantity <= 0) return normalized;
129476
+ return [...normalized, {
129477
+ pricingOptionId: input.pricingOptionId,
129478
+ quantity: nextQuantity
129479
+ }];
129480
+ }
129481
+ function getTicketTypeLineMax(input) {
129482
+ const otherSelectedQuantity = input.totalSelectedQuantity - input.currentQuantity;
129483
+ const maxByBlock = input.maxTickets - otherSelectedQuantity;
129484
+ return Math.max(0, maxByBlock);
129480
129485
  }
129481
129486
  //#endregion
129482
129487
  //#region ../blocks/src/system/runtime/nodes/event-registration/utils.ts
@@ -129543,8 +129548,6 @@ function formatPassCreditUsageLabel(creditsRemaining) {
129543
129548
  return `Uses 1 of ${creditsRemaining} credits`;
129544
129549
  }
129545
129550
  function transformRegistrationOptionsResponse(response) {
129546
- const canJoinWaitlist = response.availability.kind === "waitlist";
129547
- const isFull = response.availability.remainingPlaces === 0 || response.availability.kind === "unavailable" && response.availability.reason === "full";
129548
129551
  const eligiblePasses = response.entitlements.passes.map((pass) => ({
129549
129552
  id: pass.customerPassId,
129550
129553
  passName: pass.passName,
@@ -129557,7 +129560,6 @@ function transformRegistrationOptionsResponse(response) {
129557
129560
  const eventAcceptsPasses = response.entitlements.requiresLoginForPasses || eligiblePasses.length > 0 || response.entitlements.availableForPurchase.passes.length > 0;
129558
129561
  const eventAcceptsMemberships = response.entitlements.requiresLoginForMemberships || eligibleMemberships.length > 0 || response.entitlements.availableForPurchase.memberships.length > 0;
129559
129562
  const monetaryPaymentAvailable = hasMonetaryPaymentOption(response);
129560
- const registrationAvailable = response.availability.kind === "available" || response.availability.kind === "waitlist";
129561
129563
  return {
129562
129564
  availability: response.availability,
129563
129565
  registration: response.registration,
@@ -129572,7 +129574,6 @@ function transformRegistrationOptionsResponse(response) {
129572
129574
  },
129573
129575
  transactions: []
129574
129576
  } : null,
129575
- eligible: response.registration.kind === "none" && registrationAvailable,
129576
129577
  requiresPayment: monetaryPaymentAvailable,
129577
129578
  pricingStrategy: response.pricing.strategy,
129578
129579
  paymentTerms: response.pricing.paymentTerms,
@@ -129587,16 +129588,12 @@ function transformRegistrationOptionsResponse(response) {
129587
129588
  currency: response.pricing.currency
129588
129589
  })),
129589
129590
  ticketTypes: response.pricing.options,
129590
- isFull,
129591
- waitlistEnabled: response.availability.waitlistEnabled,
129592
- canJoinWaitlist,
129593
129591
  price: response.pricing.subtotalCents,
129594
129592
  currency: response.pricing.currency,
129595
129593
  requiresAuthForPasses: response.entitlements.requiresLoginForPasses,
129596
129594
  requiresAuthForMemberships: response.entitlements.requiresLoginForMemberships,
129597
129595
  eligiblePasses,
129598
129596
  eligibleMemberships,
129599
- canPayDirectly: monetaryPaymentAvailable,
129600
129597
  eventAcceptsPasses,
129601
129598
  eventAcceptsMemberships,
129602
129599
  availablePasses: [...response.entitlements.availableForPurchase.passes],
@@ -129626,8 +129623,8 @@ function getVisibleTicketTypes(input) {
129626
129623
  })) : [];
129627
129624
  return (input.eligibility?.ticketTypes ?? eventTicketTypes).filter((ticketType) => ticketType.isActive && (!input.selectedAttendanceMode || (ticketType.attendanceScope ?? "both") === "both" || (ticketType.attendanceScope ?? "both") === input.selectedAttendanceMode));
129628
129625
  }
129629
- function getImplicitSingleAvailableTicketType(ticketTypes) {
129630
- return ticketTypes.length === 1 && ticketTypes[0]?.availability.kind === "available" ? ticketTypes[0] : null;
129626
+ function getImplicitSingleTicketType(ticketTypes) {
129627
+ return ticketTypes.length === 1 && ticketTypes[0] && canRequestTicketOption(ticketTypes[0].availability) ? ticketTypes[0] : null;
129631
129628
  }
129632
129629
  function findSelectedTicketType(input) {
129633
129630
  if (!input.selectedPricingOptionId) return null;
@@ -129664,25 +129661,19 @@ const EventSelectionStep = ({ events, selectedEvent, onSelect, showVenue, showCa
129664
129661
  const remaining = getRemainingPlaces(selectMostOpenCapacitySource(event));
129665
129662
  const isSoldOut = isEventFull(event);
129666
129663
  const canJoinWaitlist = canJoinEventWaitlistOnAnyMode(event);
129667
- const isUnavailable = isSoldOut && !isSoldOutEventSelectable(event, canJoinWaitlist);
129668
129664
  const isLowCapacity = remaining.kind === "low";
129669
129665
  const capacityLabel = formatEventRemainingPlaces(event, { full: "Sold out" });
129670
129666
  const timeZone = event.timeZone ?? null;
129671
- const cardClasses = [
129672
- "er-event-card",
129673
- isSelected && "er-event-card--selected",
129674
- isUnavailable && "er-event-card--disabled"
129675
- ].filter(Boolean).join(" ");
129667
+ const cardClasses = ["er-event-card", isSelected && "er-event-card--selected"].filter(Boolean).join(" ");
129676
129668
  const badgeClasses = [
129677
129669
  "er-capacity-badge",
129678
- isUnavailable && "er-capacity-badge--soldout",
129670
+ isSoldOut && "er-capacity-badge--soldout",
129679
129671
  isLowCapacity && "er-capacity-badge--low",
129680
- (canJoinWaitlist || !isUnavailable && !isLowCapacity) && "er-capacity-badge--available"
129672
+ (canJoinWaitlist || !isSoldOut && !isLowCapacity) && "er-capacity-badge--available"
129681
129673
  ].filter(Boolean).join(" ");
129682
129674
  return /* @__PURE__ */ jsx("button", {
129683
129675
  type: "button",
129684
- onClick: () => !isUnavailable && onSelect(event),
129685
- disabled: isUnavailable,
129676
+ onClick: () => onSelect(event),
129686
129677
  className: cardClasses,
129687
129678
  children: /* @__PURE__ */ jsxs("div", {
129688
129679
  className: "er-event-option",
@@ -129709,41 +129700,15 @@ const EventSelectionStep = ({ events, selectedEvent, onSelect, showVenue, showCa
129709
129700
  });
129710
129701
  };
129711
129702
  //#endregion
129712
- //#region ../blocks/src/system/runtime/nodes/event-registration/useCheckoutRecovery.ts
129713
- /** Recovery belongs to the selected booking subject; changing events resets its scope. */
129714
- function useCheckoutRecovery(event, setStep) {
129715
- const [recoveryEventId, setRecoveryEventId] = useState(null);
129716
- return {
129717
- checkoutRecovery: event !== null && recoveryEventId === event.selectionId,
129718
- startCheckoutRecovery: useCallback(() => {
129719
- if (!event) return;
129720
- setRecoveryEventId(event.selectionId);
129721
- setStep("select-tickets");
129722
- }, [event, setStep])
129723
- };
129724
- }
129725
- /** Authenticated pending bookings enter the same form-only recovery path as guests. */
129726
- function useCheckoutRecoveryEligibility(eligibility, step, checkoutRecovery, startCheckoutRecovery) {
129727
- const registrationKind = eligibility?.registration.kind;
129728
- useEffect(() => {
129729
- if ((step === "select-event" || step === "select-tickets" || step === "enter-details" || step === "select-payment") && registrationKind === "pending_payment" && !checkoutRecovery) startCheckoutRecovery();
129730
- }, [
129731
- registrationKind,
129732
- step,
129733
- checkoutRecovery,
129734
- startCheckoutRecovery
129735
- ]);
129736
- return useMemo(() => checkoutRecovery ? getCheckoutRecoveryFormEligibility(eligibility) : eligibility, [checkoutRecovery, eligibility]);
129737
- }
129738
- //#endregion
129739
129703
  //#region ../blocks/src/system/runtime/nodes/event-registration/registrationErrorRecovery.ts
129740
129704
  function resolveRegistrationRecoveryAction(step, action) {
129741
129705
  if (step === "payment-failed") return "payment-options";
129742
- if (step === "verifying-payment" || step === "verifying-timeout" || step === "redirecting") return "payment-status";
129706
+ if (step === "payment-status") return "none";
129707
+ if (step === "verifying-payment" || step === "verifying-timeout" || step === "redirecting") return "none";
129743
129708
  return action;
129744
129709
  }
129745
129710
  function canRecoverToWaitlist(eligibility) {
129746
- return Boolean(eligibility?.isFull && eligibility.canJoinWaitlist);
129711
+ return eligibility?.availability.kind === "waitlist" && eligibility.registration.kind !== "pending_payment";
129747
129712
  }
129748
129713
  function shouldRefreshAfterRegistrationError(step, action, enabled) {
129749
129714
  return enabled || step === "error" && action === "places";
@@ -129760,19 +129725,19 @@ function resetRegistrationAfterExpiry(input) {
129760
129725
  input.setErrorMessage("");
129761
129726
  input.setPendingRegistrationReference(null);
129762
129727
  }
129763
- /** Recovery never starts another payment. Unknown payment outcomes go to the portal. */
129728
+ /** Retry the retained submission in place; explicit payment uncertainty stays status-only. */
129764
129729
  function recoverRegistrationError(action, handlers) {
129765
129730
  switch (action) {
129766
129731
  case "none": return;
129767
129732
  case "portal":
129768
- case "payment-status":
129769
129733
  window.location.assign("/portal");
129770
129734
  return;
129771
129735
  case "event":
129772
129736
  window.location.assign(window.location.pathname);
129773
129737
  return;
129774
129738
  case "retry":
129775
- window.location.reload();
129739
+ handlers.clearError();
129740
+ handlers.setStep("select-payment");
129776
129741
  return;
129777
129742
  case "details":
129778
129743
  handlers.clearError();
@@ -129810,53 +129775,6 @@ function validateFormData(formData, requiresConsent = false) {
129810
129775
  return errors;
129811
129776
  }
129812
129777
  //#endregion
129813
- //#region ../blocks/src/system/runtime/nodes/event-registration/ticketSelectionLines.ts
129814
- function normalizeTicketSelectionLines(lines) {
129815
- const quantitiesByTicketType = /* @__PURE__ */ new Map();
129816
- for (const line of lines) {
129817
- const quantity = Math.floor(line.quantity);
129818
- if (quantity <= 0) continue;
129819
- const key = line.pricingOptionId ?? null;
129820
- quantitiesByTicketType.set(key, (quantitiesByTicketType.get(key) ?? 0) + quantity);
129821
- }
129822
- return [...quantitiesByTicketType.entries()].map(([pricingOptionId, quantity]) => ({
129823
- pricingOptionId,
129824
- quantity
129825
- }));
129826
- }
129827
- function getTicketSelectionTotal(lines) {
129828
- return normalizeTicketSelectionLines(lines).reduce((total, line) => total + line.quantity, 0);
129829
- }
129830
- function getTicketLineQuantity(lines, pricingOptionId) {
129831
- return normalizeTicketSelectionLines(lines).find((line) => line.pricingOptionId === pricingOptionId)?.quantity ?? 0;
129832
- }
129833
- function getSingleSelectedPricingOptionId(lines) {
129834
- const normalized = normalizeTicketSelectionLines(lines);
129835
- return normalized.length === 1 ? normalized[0]?.pricingOptionId ?? null : null;
129836
- }
129837
- function hasValidPricingOptionSelection(input) {
129838
- if (!input.selectionRequired) return true;
129839
- if (input.lines.length === 0) return false;
129840
- const availableOptionIds = new Set(input.visibleOptions.filter((option) => option.availability.kind === "available").map((option) => option.pricingOptionId));
129841
- return input.lines.every((line) => line.pricingOptionId !== null && availableOptionIds.has(line.pricingOptionId));
129842
- }
129843
- function setTicketLineQuantity(input) {
129844
- const nextQuantity = Math.max(0, Math.floor(input.quantity));
129845
- const normalized = normalizeTicketSelectionLines(input.lines).filter((line) => line.pricingOptionId !== input.pricingOptionId);
129846
- if (nextQuantity <= 0) return normalized;
129847
- return [...normalized, {
129848
- pricingOptionId: input.pricingOptionId,
129849
- quantity: nextQuantity
129850
- }];
129851
- }
129852
- function getTicketTypeLineMax(input) {
129853
- const otherSelectedQuantity = input.totalSelectedQuantity - input.currentQuantity;
129854
- const maxByBlock = input.maxTickets - otherSelectedQuantity;
129855
- const maxByEvent = input.availableSpots == null ? input.maxTickets : input.availableSpots - otherSelectedQuantity;
129856
- const maxByTicketType = input.ticketTypeRemainingCapacity ?? input.maxTickets;
129857
- return Math.max(0, Math.min(maxByBlock, maxByEvent, maxByTicketType));
129858
- }
129859
- //#endregion
129860
129778
  //#region ../blocks/src/system/runtime/nodes/event-registration/hooks.state.ts
129861
129779
  const initialEligibilityLookupState = {
129862
129780
  tag: "idle",
@@ -129974,17 +129892,6 @@ function usePortalAuthWithDeps(deps) {
129974
129892
  logout
129975
129893
  };
129976
129894
  }
129977
- function toRegistrationOptionsSubject(subject, attendanceMode) {
129978
- return subject.kind === "occurrence" ? {
129979
- kind: "occurrence",
129980
- occurrenceId: subject.occurrenceId,
129981
- attendanceMode: attendanceMode ?? void 0
129982
- } : {
129983
- kind: "wholeSeries",
129984
- eventSeriesId: subject.eventSeriesId,
129985
- attendanceMode: attendanceMode ?? void 0
129986
- };
129987
- }
129988
129895
  function useEligibility(params) {
129989
129896
  return useEligibilityWithDeps(params, eventRegistrationHooksDeps);
129990
129897
  }
@@ -130025,7 +129932,7 @@ function useEligibilityWithDeps(params, deps) {
130025
129932
  requestIdRef.current = requestId;
130026
129933
  dispatch({ type: "loading-started" });
130027
129934
  try {
130028
- const subject = toRegistrationOptionsSubject(params.subject, params.attendanceMode);
129935
+ const subject = toRegistrationRequestSubject(params.subject, params.attendanceMode);
130029
129936
  const result = await api.getRegistrationOptions({
130030
129937
  subject,
130031
129938
  selections: ticketSelections.map((selection) => ({
@@ -130315,7 +130222,6 @@ const STRIPE_COMMISSION_FREE_REASONS = [
130315
130222
  "no_commission_plan",
130316
130223
  "billing_evidence_invalid",
130317
130224
  "fee_rounds_to_zero",
130318
- "non_commissionable_scope",
130319
130225
  "payment_not_stripe"
130320
130226
  ];
130321
130227
  const historicalContext = {
@@ -130393,9 +130299,9 @@ const eventRegistrationErrors = {
130393
130299
  message: "Booking is currently closed for this event. Please contact the organiser if you’d like to find out more.",
130394
130300
  action: "none"
130395
130301
  },
130396
- paymentUncertain: {
130397
- message: "We’re checking your booking and payment. Please don’t try to book again yet. If you’ve already paid, you don’t need to pay again.",
130398
- action: "payment-status"
130302
+ paymentInvestigationRequired: {
130303
+ message: "We still can’t confirm your payment. Please don’t make another payment. Contact the organiser so they can check your booking.",
130304
+ action: "none"
130399
130305
  },
130400
130306
  paymentProviderUnavailable: {
130401
130307
  message: "We couldn’t reach the payment provider. Please try again in a minute.",
@@ -130889,7 +130795,30 @@ function checkoutReturnCommand(params) {
130889
130795
  };
130890
130796
  return null;
130891
130797
  }
130892
- async function handleCheckoutReturn(options, deps, checkoutAttemptIdRef) {
130798
+ function handleCheckoutReturnOutcome(options, deps, context, outcome) {
130799
+ const { pending, params } = context;
130800
+ if (outcome.kind === "resolved") {
130801
+ deps.clearReturnParams();
130802
+ options.setPendingRegistrationReference(outcome.reference);
130803
+ options.setStep("verifying-payment");
130804
+ return "settled";
130805
+ }
130806
+ if (outcome.kind === "abandoned") {
130807
+ deps.clearReturnParams();
130808
+ options.setErrorMessage("Your payment was cancelled. You can choose a payment option and try again.");
130809
+ options.setStep("select-payment");
130810
+ return "settled";
130811
+ }
130812
+ if (outcome.kind === "notFound" && params.registration === "cancelled" && (options.registrationSubject?.kind === "occurrence" || pending?.reference.scope === "occurrence")) {
130813
+ deps.clearReturnParams();
130814
+ options.setErrorMessage("Your payment was cancelled. You can choose a payment option and try again.");
130815
+ options.setStep("select-payment");
130816
+ return "settled";
130817
+ }
130818
+ showReturnReconciliation(options, "We’re checking your booking and payment. Please don’t try to book again yet. If you’ve already paid, you don’t need to pay again.");
130819
+ return outcome.kind === "notFound" ? "settled" : "retryable";
130820
+ }
130821
+ async function handleCheckoutReturn(options, deps, returnContextRef) {
130893
130822
  deps.cleanupStaleRegistrations();
130894
130823
  const params = deps.readReturnParams();
130895
130824
  if (params.registration !== "cancelled" && params.registration !== "success") return "settled";
@@ -130903,34 +130832,15 @@ async function handleCheckoutReturn(options, deps, checkoutAttemptIdRef) {
130903
130832
  }
130904
130833
  const { checkoutAttemptId } = command;
130905
130834
  const pending = deps.getPendingRegistration(siteId, checkoutAttemptId);
130906
- checkoutAttemptIdRef.current = checkoutAttemptId;
130835
+ returnContextRef.current = { checkoutAttemptId };
130907
130836
  if (pending) restorePendingPresentation(options, pending);
130908
130837
  options.setStep("verifying-payment");
130909
130838
  try {
130910
130839
  const outcome = await options.api.resolveEventCheckoutReturn(command);
130911
- switch (outcome.kind) {
130912
- case "resolved":
130913
- deps.clearReturnParams();
130914
- options.setPendingRegistrationReference(outcome.reference);
130915
- options.setStep("verifying-payment");
130916
- return "settled";
130917
- case "abandoned":
130918
- deps.clearReturnParams();
130919
- options.setErrorMessage("Your payment was cancelled. You can choose a payment option and try again.");
130920
- options.setStep("select-payment");
130921
- return "settled";
130922
- case "notFound":
130923
- if (params.registration === "cancelled" && (options.registrationSubject?.kind === "occurrence" || pending?.reference.scope === "occurrence")) {
130924
- deps.clearReturnParams();
130925
- options.setErrorMessage("Your payment was cancelled. You can choose a payment option and try again.");
130926
- options.setStep("select-payment");
130927
- return "settled";
130928
- }
130929
- showReturnReconciliation(options, "We’re checking your booking and payment. Please don’t try to book again yet. If you’ve already paid, you don’t need to pay again.");
130930
- return "settled";
130931
- case "reconciliationRequired": break;
130932
- }
130933
- showReturnReconciliation(options, "We’re checking your booking and payment. Please don’t try to book again yet. If you’ve already paid, you don’t need to pay again.");
130840
+ return handleCheckoutReturnOutcome(options, deps, {
130841
+ pending,
130842
+ params
130843
+ }, outcome);
130934
130844
  } catch {
130935
130845
  showReturnReconciliation(options, "We couldn’t check your payment just now. Please check again in a moment. Don’t make another booking while we’re checking.");
130936
130846
  }
@@ -130939,9 +130849,16 @@ async function handleCheckoutReturn(options, deps, checkoutAttemptIdRef) {
130939
130849
  function useEventRegistrationStripeReturn(options) {
130940
130850
  return useEventRegistrationStripeReturnWithDeps(options, eventRegistrationStripeReturnDeps);
130941
130851
  }
130852
+ function completeVerifiedRegistration(options, deps, returnContext) {
130853
+ const siteId = options.api.config.siteId;
130854
+ const checkoutAttemptId = returnContext?.checkoutAttemptId;
130855
+ if (siteId && checkoutAttemptId) deps.clearPendingRegistration(siteId, checkoutAttemptId);
130856
+ options.setRegistrationResult({ status: "confirmed" });
130857
+ options.setStep("success");
130858
+ }
130942
130859
  function useEventRegistrationStripeReturnWithDeps(options, deps) {
130943
130860
  const { api, pendingRegistrationReference, setErrorMessage, setRegistrationResult, setStep, step } = options;
130944
- const checkoutAttemptIdRef = useRef(null);
130861
+ const returnContextRef = useRef(null);
130945
130862
  const lookupInFlightRef = useRef(false);
130946
130863
  const [lookupState, setLookupState] = useState("settled");
130947
130864
  const resolveReturn = useCallback(async () => {
@@ -130949,7 +130866,7 @@ function useEventRegistrationStripeReturnWithDeps(options, deps) {
130949
130866
  lookupInFlightRef.current = true;
130950
130867
  setLookupState("loading");
130951
130868
  try {
130952
- setLookupState(await handleCheckoutReturn(options, deps, checkoutAttemptIdRef));
130869
+ setLookupState(await handleCheckoutReturn(options, deps, returnContextRef));
130953
130870
  } finally {
130954
130871
  lookupInFlightRef.current = false;
130955
130872
  }
@@ -130972,13 +130889,8 @@ function useEventRegistrationStripeReturnWithDeps(options, deps) {
130972
130889
  resolveReturn();
130973
130890
  }, []);
130974
130891
  useEffect(() => {
130975
- if (verification.status === "completed") {
130976
- const siteId = api.config.siteId;
130977
- const checkoutAttemptId = checkoutAttemptIdRef.current;
130978
- if (siteId && checkoutAttemptId) deps.clearPendingRegistration(siteId, checkoutAttemptId);
130979
- setRegistrationResult({ status: "confirmed" });
130980
- setStep("success");
130981
- } else if (verification.status === "failed") {
130892
+ if (verification.status === "completed") completeVerifiedRegistration(options, deps, returnContextRef.current);
130893
+ else if (verification.status === "failed") {
130982
130894
  setErrorMessage("Please try again or choose another payment option. If this keeps happening, contact the organiser for help.");
130983
130895
  setStep("payment-failed");
130984
130896
  } else if (verification.status === "timeout") setStep("verifying-timeout");
@@ -131007,7 +130919,10 @@ function registrationErrorPresentation(error) {
131007
130919
  const reason = error instanceof BlockApiError ? parseEventRegistrationErrorReason(error.tag) : null;
131008
130920
  if (reason) return eventRegistrationErrors[reason];
131009
130921
  if (error instanceof BlockApiError && error.status < 500) return eventRegistrationErrors.invalidCommitInput;
131010
- return eventRegistrationErrors.paymentUncertain;
130922
+ return {
130923
+ message: "Something went wrong. Please try again.",
130924
+ action: "retry"
130925
+ };
131011
130926
  }
131012
130927
  //#endregion
131013
130928
  //#region ../blocks/src/system/runtime/nodes/event-registration/useEventRegistrationSubmit.ts
@@ -131036,26 +130951,6 @@ function useEventRegistrationSubmit(options) {
131036
130951
  * and the balance left, which the block's copy cannot. Every other method keeps
131037
130952
  * whatever success message the site configured.
131038
130953
  */
131039
- function toRegistrationResult(result) {
131040
- if (result.alreadyRegistered) {
131041
- const waitlisted = result.status === "waitlist";
131042
- return {
131043
- status: result.status,
131044
- variant: "info",
131045
- title: waitlisted ? "Already waitlisted" : "Already registered",
131046
- message: result.message ?? (waitlisted ? "You are already on the waitlist for this event." : "You are already registered for this event.")
131047
- };
131048
- }
131049
- if (result.status === "waitlist") return {
131050
- status: "waitlist",
131051
- title: "Added to waitlist",
131052
- message: result.message ?? (typeof result.waitlistPosition === "number" ? `You've been added to the waitlist (position ${result.waitlistPosition}).` : "You've been added to the waitlist.")
131053
- };
131054
- return {
131055
- status: result.status,
131056
- message: result.paymentMethod === "pass" ? result.message : void 0
131057
- };
131058
- }
131059
130954
  function useEventRegistrationSubmitWithDeps(options, deps) {
131060
130955
  /**
131061
130956
  * The command identity for the submission currently in progress.
@@ -131069,7 +130964,7 @@ function useEventRegistrationSubmitWithDeps(options, deps) {
131069
130964
  * Identical retries retain the command after a lost response. Changed form
131070
130965
  * details get a new command so the server applies the new booking intent.
131071
130966
  */
131072
- const commandRef = useRef(null);
130967
+ const { commandRef } = options;
131073
130968
  const inFlightRef = useRef(null);
131074
130969
  const submit = async (method, passId, membershipId, selection, submitOptions) => {
131075
130970
  const target = options.registrationTarget;
@@ -131082,19 +130977,15 @@ function useEventRegistrationSubmitWithDeps(options, deps) {
131082
130977
  const registrationCommandId = commandRef.current?.id ?? deps.createClientCommandId();
131083
130978
  try {
131084
130979
  let prepared = prepareSubmitContext(options, registrationCommandId, target, method, passId, membershipId, selection);
131085
- if (prepared.subject.kind === "wholeSeries" && method === "stripe") {
131086
- commandRef.current = null;
131087
- return await submitWholeSeriesCheckout(options, deps, {
130980
+ let request = buildRegistrationRequest(options, prepared, method, passId, membershipId);
130981
+ const intentKey = registrationRequestIntentKey(request);
130982
+ if (commandRef.current !== null && commandRef.current.intentKey !== intentKey) {
130983
+ prepared = {
131088
130984
  ...prepared,
131089
- subject: prepared.subject
131090
- }, submitOptions);
130985
+ registrationCommandId: deps.createClientCommandId()
130986
+ };
130987
+ request = buildRegistrationRequest(options, prepared, method, passId, membershipId);
131091
130988
  }
131092
- const request = buildOccurrenceRegistrationRequest(options, prepared, method, passId, membershipId);
131093
- const intentKey = registrationRequestIntentKey(request);
131094
- if (commandRef.current !== null && commandRef.current.intentKey !== intentKey) prepared = {
131095
- ...prepared,
131096
- registrationCommandId: deps.createClientCommandId()
131097
- };
131098
130989
  commandRef.current = {
131099
130990
  id: prepared.registrationCommandId,
131100
130991
  intentKey
@@ -131103,8 +130994,7 @@ function useEventRegistrationSubmitWithDeps(options, deps) {
131103
130994
  ...request,
131104
130995
  registrationCommandId: prepared.registrationCommandId
131105
130996
  });
131106
- commandRef.current = null;
131107
- return await completeRegistrationSubmission(options, deps, prepared, result, method, submitOptions);
130997
+ return await completeRegistrationSubmission(options, deps, prepared, result, submitOptions);
131108
130998
  } catch (error) {
131109
130999
  if (error instanceof BlockApiError && error.tag === "registrationPreparationChanged") commandRef.current = null;
131110
131000
  const { message, action } = registrationErrorPresentation(error);
@@ -131128,9 +131018,40 @@ function useEventRegistrationSubmitWithDeps(options, deps) {
131128
131018
  return pending;
131129
131019
  };
131130
131020
  }
131131
- async function completeRegistrationSubmission(options, deps, prepared, result, method, submitOptions) {
131132
- if (needsOccurrenceCheckout(result, method)) return await submitOccurrenceCheckout(options, deps, prepared, result, method, submitOptions);
131133
- options.setRegistrationResult(toRegistrationResult(result));
131021
+ async function completeRegistrationSubmission(options, deps, prepared, result, submitOptions) {
131022
+ switch (result.kind) {
131023
+ case "paymentStatusRequired":
131024
+ options.setPaymentStatusRecovery({
131025
+ kind: "ready",
131026
+ subject: result.subject
131027
+ });
131028
+ options.setStep("payment-status");
131029
+ return {
131030
+ ok: true,
131031
+ outcome: { kind: "payment_status" }
131032
+ };
131033
+ case "checkoutRequired":
131034
+ options.setPendingRegistrationReference(result.reference);
131035
+ savePendingCheckout(options, deps, prepared, result.submissionId, result.reference);
131036
+ options.setStep("redirecting");
131037
+ return redirectToCheckout(result.checkoutUrl, submitOptions);
131038
+ case "waitlisted":
131039
+ options.setRegistrationResult({
131040
+ status: "waitlist",
131041
+ title: "Added to waitlist",
131042
+ message: result.waitlist.message
131043
+ });
131044
+ break;
131045
+ case "bookingComplete":
131046
+ case "paymentDeferred":
131047
+ options.setPendingRegistrationReference(result.reference);
131048
+ options.setRegistrationResult({
131049
+ status: "confirmed",
131050
+ message: result.summary.paymentMethod === "pass" ? result.summary.message : void 0
131051
+ });
131052
+ break;
131053
+ }
131054
+ options.commandRef.current = null;
131134
131055
  options.setStep("success");
131135
131056
  return {
131136
131057
  ok: true,
@@ -131161,15 +131082,7 @@ function prepareSubmitContext(options, registrationCommandId, target, method, pa
131161
131082
  email: guest.email?.trim().toLowerCase() || void 0,
131162
131083
  phone: guest.phone?.trim() || void 0
131163
131084
  })) : void 0,
131164
- subject: target.subject.kind === "occurrence" ? {
131165
- kind: "occurrence",
131166
- occurrenceId: target.subject.occurrenceId,
131167
- attendanceMode: options.selectedAttendanceMode ?? void 0
131168
- } : {
131169
- kind: "wholeSeries",
131170
- eventSeriesId: target.subject.eventSeriesId,
131171
- attendanceMode: options.selectedAttendanceMode ?? void 0
131172
- }
131085
+ subject: toRegistrationRequestSubject(target.subject, options.selectedAttendanceMode)
131173
131086
  };
131174
131087
  }
131175
131088
  function resolveSelectionSnapshot(method, passId, membershipId, bundleProductId, selection) {
@@ -131193,85 +131106,6 @@ function resolveSelectionSnapshot(method, passId, membershipId, bundleProductId,
131193
131106
  if (method === "free") return { method };
131194
131107
  throw new Error("Choose an available payment option.");
131195
131108
  }
131196
- async function submitWholeSeriesCheckout(options, deps, prepared, submitOptions) {
131197
- options.setStep("redirecting");
131198
- if (prepared.selectionSnapshot.method !== "stripe") throw new Error("Choose an available payment option.");
131199
- const checkoutAttemptId = deps.createClientCommandId();
131200
- const urls = buildCheckoutReturnUrls("registration", EVENT_REGISTRATION_ANCHOR_ID, { [EVENT_REGISTRATION_CHECKOUT_ATTEMPT_PARAM]: checkoutAttemptId });
131201
- const result = await options.api.createEventCheckout({
131202
- subject: prepared.subject,
131203
- ticketSelections: toTicketSelectionRequests(prepared.ticketSelections),
131204
- selectedSlidingAmount: options.selectedSlidingAmount ?? void 0,
131205
- email: options.formData.email.trim().toLowerCase(),
131206
- name: options.formData.name.trim(),
131207
- phone: options.formData.phone.trim() || void 0,
131208
- formData: options.formData,
131209
- consentAccepted: options.formData.consentAccepted,
131210
- altchaSolution: options.altchaSolution,
131211
- guests: prepared.guestsPayload,
131212
- claimToken: options.claimToken ?? void 0,
131213
- waitlistEntryId: options.waitlistEntryId ?? void 0,
131214
- discountCode: options.discountCode.trim() || void 0,
131215
- collectionOptionKind: prepared.selectionSnapshot.collectionOptionKind,
131216
- checkoutAttemptId,
131217
- ...urls
131218
- });
131219
- if (result.scope !== "wholeSeries") throw new Error("Unexpected registration scope for event checkout.");
131220
- if ("waitlistEntryId" in result) {
131221
- options.setRegistrationResult({
131222
- status: "waitlist",
131223
- variant: result.alreadyRegistered ? "info" : void 0,
131224
- title: result.alreadyRegistered ? "Already waitlisted" : "Added to waitlist",
131225
- message: result.alreadyRegistered ? "You are already on the waitlist for this event." : "You've been added to the waitlist."
131226
- });
131227
- options.setStep("success");
131228
- return {
131229
- ok: true,
131230
- outcome: { kind: "completed" }
131231
- };
131232
- }
131233
- if (result.bypassed) return completeBypassedCheckout(options);
131234
- if (!result.checkoutUrl) throw new Error("Checkout URL missing");
131235
- savePendingCheckout(options, deps, prepared, result.checkoutAttemptId, {
131236
- scope: "wholeSeries",
131237
- registrationId: result.registrationId
131238
- });
131239
- return redirectToCheckout(result.checkoutUrl, submitOptions);
131240
- }
131241
- function needsOccurrenceCheckout(result, method) {
131242
- return result.scope === "occurrence" && result.status === "confirmed" && result.pendingPayment && [
131243
- "stripe",
131244
- "pass_bundle",
131245
- "membership_bundle"
131246
- ].includes(method);
131247
- }
131248
- async function submitOccurrenceCheckout(options, deps, prepared, registration, method, submitOptions) {
131249
- const reference = {
131250
- scope: "occurrence",
131251
- attendeeId: registration.attendeeId
131252
- };
131253
- options.setPendingRegistrationReference(reference);
131254
- options.setStep("redirecting");
131255
- const checkoutAttemptId = deps.createClientCommandId();
131256
- const urls = buildCheckoutReturnUrls("registration", EVENT_REGISTRATION_ANCHOR_ID, { [EVENT_REGISTRATION_CHECKOUT_ATTEMPT_PARAM]: checkoutAttemptId });
131257
- const result = await options.api.createEventCheckout({
131258
- subject: {
131259
- kind: "occurrence",
131260
- attendeeId: registration.attendeeId
131261
- },
131262
- registrationCommandId: prepared.registrationCommandId,
131263
- checkoutType: method === "pass_bundle" ? "pass_bundle" : method === "membership_bundle" ? "membership_bundle" : "event",
131264
- productId: prepared.bundleProductId,
131265
- discountCode: options.discountCode.trim() || void 0,
131266
- collectionOptionKind: prepared.selectionSnapshot.method === "stripe" ? prepared.selectionSnapshot.collectionOptionKind : void 0,
131267
- ...urls
131268
- });
131269
- if (result.scope !== "occurrence") throw new Error("Unexpected registration scope for event checkout.");
131270
- if (result.bypassed) return completeBypassedCheckout(options);
131271
- if (!result.checkoutUrl) throw new Error("Checkout URL missing");
131272
- if (prepared.subject.kind === "occurrence") savePendingCheckout(options, deps, prepared, checkoutAttemptId, reference);
131273
- return redirectToCheckout(result.checkoutUrl, submitOptions);
131274
- }
131275
131109
  function savePendingCheckout(options, deps, prepared, checkoutAttemptId, reference) {
131276
131110
  const siteId = options.api.config.siteId;
131277
131111
  if (!siteId) return;
@@ -131284,14 +131118,6 @@ function savePendingCheckout(options, deps, prepared, checkoutAttemptId, referen
131284
131118
  paymentSelection: prepared.selectionSnapshot
131285
131119
  });
131286
131120
  }
131287
- function completeBypassedCheckout(options) {
131288
- options.setRegistrationResult({ status: "confirmed" });
131289
- options.setStep("success");
131290
- return {
131291
- ok: true,
131292
- outcome: { kind: "completed" }
131293
- };
131294
- }
131295
131121
  function redirectToCheckout(checkoutUrl, submitOptions) {
131296
131122
  if (submitOptions?.redirect !== "manual") window.location.href = checkoutUrl;
131297
131123
  return {
@@ -131303,12 +131129,23 @@ function redirectToCheckout(checkoutUrl, submitOptions) {
131303
131129
  };
131304
131130
  }
131305
131131
  function registrationRequestIntentKey(request) {
131306
- const { registrationCommandId: _command, altchaSolution: _proof, ...intent } = request;
131307
- return JSON.stringify(intent);
131132
+ const { registrationCommandId: _command, altchaSolution: _proof, checkout, ...intent } = request;
131133
+ return JSON.stringify({
131134
+ ...intent,
131135
+ checkout: checkout ? {
131136
+ discountCode: checkout.discountCode,
131137
+ collectionOptionKind: checkout.collectionOptionKind
131138
+ } : void 0
131139
+ });
131308
131140
  }
131309
- function buildOccurrenceRegistrationRequest(options, prepared, method, passId, membershipId) {
131141
+ function buildRegistrationRequest(options, prepared, method, passId, membershipId) {
131310
131142
  return {
131311
131143
  registrationCommandId: prepared.registrationCommandId,
131144
+ checkout: {
131145
+ ...buildCheckoutReturnUrls("registration", EVENT_REGISTRATION_ANCHOR_ID, { [EVENT_REGISTRATION_CHECKOUT_ATTEMPT_PARAM]: prepared.registrationCommandId }),
131146
+ discountCode: options.discountCode.trim() || void 0,
131147
+ collectionOptionKind: prepared.selectionSnapshot.method === "stripe" ? prepared.selectionSnapshot.collectionOptionKind : void 0
131148
+ },
131312
131149
  subject: prepared.subject,
131313
131150
  ticketSelections: toTicketSelectionRequests(prepared.ticketSelections),
131314
131151
  selectedSlidingAmount: options.selectedSlidingAmount ?? void 0,
@@ -131526,20 +131363,124 @@ function useWaitlistClaimRestoration(input) {
131526
131363
  }
131527
131364
  //#endregion
131528
131365
  //#region ../blocks/src/system/runtime/nodes/event-registration/registrationCompletion.ts
131366
+ function isSelectionSoldOut(availability) {
131367
+ return availability?.kind === "unavailable" && availability.reason === "full";
131368
+ }
131529
131369
  function resolveRegistrationAvailabilityBlocker(input) {
131530
131370
  if (input.hasWaitlistClaim) return null;
131531
131371
  if (input.eligibilityError) return input.eligibilityError;
131532
131372
  if (!input.eligibility) return "Registration is not available for this event.";
131373
+ if (input.eligibility.registration.kind === "pending_payment") return null;
131374
+ if (isSelectionSoldOut(input.eligibility.availability)) return null;
131533
131375
  if (input.eligibility.availability.kind === "unavailable" && input.eligibility.availability.reason === "paymentUnavailable") return "Payment options are not available for this event.";
131534
- if (input.eligibility.availability.kind === "unavailable" || !input.eligibility.eligible) return "Registration is not available for this event.";
131376
+ if (input.eligibility.availability.kind === "unavailable" || input.eligibility.registration.kind === "waitlisted") return "Registration is not available for this event.";
131535
131377
  return null;
131536
131378
  }
131537
131379
  function resolvePricingSelectionBlocker(input) {
131538
131380
  if (input.selectionRequired && !input.hasValidSelection) return "Choose at least one available ticket to continue.";
131539
131381
  return input.slidingScaleSelectionMessage;
131540
131382
  }
131541
- function isSoldOutWithoutWaitlist(input) {
131542
- return Boolean(!input.hasWaitlistClaim && input.eligibility?.isFull && !input.eligibility.canJoinWaitlist);
131383
+ //#endregion
131384
+ //#region ../blocks/src/system/runtime/nodes/event-registration/usePaymentStatusRecovery.ts
131385
+ function isCheckableRecovery(state) {
131386
+ return state.kind === "ready" || state.kind === "processing" || state.kind === "temporarilyUnavailable";
131387
+ }
131388
+ function assistanceRequired(recovery) {
131389
+ return {
131390
+ kind: "assistanceRequired",
131391
+ subject: recovery.subject
131392
+ };
131393
+ }
131394
+ function applyStatusOutcome(outcome, recovery, setters, setRecovery) {
131395
+ if (outcome.kind === "resolved") {
131396
+ setters.setPendingRegistrationReference(outcome.reference);
131397
+ setters.setRegistrationResult({ status: "confirmed" });
131398
+ setRecovery(null);
131399
+ setters.setStep("success");
131400
+ return;
131401
+ }
131402
+ switch (outcome.kind) {
131403
+ case "paymentProcessing":
131404
+ setRecovery({
131405
+ ...recovery,
131406
+ kind: "processing"
131407
+ });
131408
+ return;
131409
+ case "paymentAvailable":
131410
+ setRecovery({
131411
+ ...recovery,
131412
+ kind: "paymentAvailable",
131413
+ checkoutUrl: outcome.checkoutUrl
131414
+ });
131415
+ return;
131416
+ case "paymentCheckUnavailable":
131417
+ setRecovery({
131418
+ ...recovery,
131419
+ kind: "temporarilyUnavailable"
131420
+ });
131421
+ return;
131422
+ case "paymentRetryAvailable":
131423
+ setRecovery({
131424
+ ...recovery,
131425
+ kind: "retryAvailable"
131426
+ });
131427
+ return;
131428
+ case "abandoned":
131429
+ case "notFound":
131430
+ case "reconciliationRequired":
131431
+ case "paymentAssistanceRequired":
131432
+ setRecovery(assistanceRequired(recovery));
131433
+ return;
131434
+ }
131435
+ }
131436
+ function usePaymentStatusRecovery(options) {
131437
+ const [recovery, setRecovery] = useState(null);
131438
+ const checkRef = useRef(null);
131439
+ return {
131440
+ recovery,
131441
+ showRecovery: useCallback((next) => setRecovery(next), []),
131442
+ check: useCallback(() => {
131443
+ if (!recovery || !isCheckableRecovery(recovery) || checkRef.current) return;
131444
+ const pending = (async () => {
131445
+ setRecovery({
131446
+ ...recovery,
131447
+ kind: "checking"
131448
+ });
131449
+ try {
131450
+ applyStatusOutcome(await options.api.resolveEventCheckoutReturn({
131451
+ kind: "checkStatus",
131452
+ subject: recovery.subject
131453
+ }), recovery, options, setRecovery);
131454
+ } catch {
131455
+ setRecovery({
131456
+ ...recovery,
131457
+ kind: "temporarilyUnavailable"
131458
+ });
131459
+ }
131460
+ })();
131461
+ checkRef.current = pending;
131462
+ pending.finally(() => {
131463
+ if (checkRef.current === pending) checkRef.current = null;
131464
+ });
131465
+ }, [options, recovery]),
131466
+ continuePayment: useCallback(() => {
131467
+ if (recovery?.kind === "paymentAvailable") window.location.assign(recovery.checkoutUrl);
131468
+ }, [recovery]),
131469
+ returnToPayment: useCallback(() => {
131470
+ if (recovery?.kind !== "retryAvailable") return;
131471
+ options.beginNewSubmission();
131472
+ setRecovery(null);
131473
+ options.setOptionsRefreshKey((value) => value + 1);
131474
+ options.setStep("select-payment");
131475
+ }, [options, recovery]),
131476
+ returnToBooking: useCallback(() => {
131477
+ if (recovery?.kind !== "assistanceRequired") return;
131478
+ options.beginNewSubmission();
131479
+ setRecovery(null);
131480
+ options.setOptionsRefreshKey((value) => value + 1);
131481
+ options.setStep("select-tickets");
131482
+ }, [options, recovery])
131483
+ };
131543
131484
  }
131544
131485
  //#endregion
131545
131486
  //#region ../blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.ts
@@ -131597,6 +131538,7 @@ function useEventRegistrationWizardWithDeps(options, deps) {
131597
131538
  const [errorAction, setErrorAction] = useState("retry");
131598
131539
  const [optionsRefreshKey, setOptionsRefreshKey] = useState(0);
131599
131540
  const [altchaSolution, setAltchaSolution] = useState(null);
131541
+ const [checkingNextStep, setCheckingNextStep] = useState(false);
131600
131542
  const { authState: portalAuthState, profile: portalProfile } = deps.usePortalAuth();
131601
131543
  const waitlistClaim = deps.useWaitlistClaim();
131602
131544
  const [showMagicLinkModal, setShowMagicLinkModal] = useState(false);
@@ -131623,28 +131565,29 @@ function useEventRegistrationWizardWithDeps(options, deps) {
131623
131565
  }), [options.occurrenceContext, selectedEvent]);
131624
131566
  const registrationOccurrenceId = getRegistrationOccurrenceId(registrationTarget);
131625
131567
  const currentEvent = selectedEvent ?? preSelectedEvent;
131568
+ const commandRef = useRef(null);
131626
131569
  const setStep = useCallback((nextStep) => {
131627
131570
  dispatchFlow({
131628
131571
  type: "set-step",
131629
131572
  step: nextStep
131630
131573
  });
131631
131574
  }, []);
131632
- const { checkoutRecovery, startCheckoutRecovery } = useCheckoutRecovery(currentEvent, setStep);
131633
- const currentEventUsesTicketTypes = usesTieredPricing(currentEvent);
131634
- const currentCanJoinWaitlist = canJoinWaitlistOutsideRecovery(currentEvent, selectedAttendanceMode, checkoutRecovery);
131635
- const usesTicketTypeSelections = currentEventUsesTicketTypes && !currentCanJoinWaitlist;
131575
+ const { recovery: paymentStatusRecovery, showRecovery: setPaymentStatusRecovery, check: handleCheckPaymentStatus, continuePayment: handleContinueExistingPayment, returnToPayment: handleReturnToPayment, returnToBooking: handleReturnToBooking } = usePaymentStatusRecovery({
131576
+ api,
131577
+ beginNewSubmission: () => {
131578
+ commandRef.current = null;
131579
+ },
131580
+ setPendingRegistrationReference,
131581
+ setRegistrationResult,
131582
+ setOptionsRefreshKey,
131583
+ setStep
131584
+ });
131585
+ const usesTicketTypeSelections = usesTieredPricing(currentEvent);
131636
131586
  const eventTicketTypesForSelection = useMemo(() => getVisibleTicketTypes({
131637
131587
  event: currentEvent,
131638
131588
  eligibility: null,
131639
131589
  selectedAttendanceMode
131640
- }).map((option) => checkoutRecovery ? {
131641
- ...option,
131642
- availability: checkoutRecoveryOptionAvailability(option.availability)
131643
- } : option), [
131644
- currentEvent,
131645
- selectedAttendanceMode,
131646
- checkoutRecovery
131647
- ]);
131590
+ }), [currentEvent, selectedAttendanceMode]);
131648
131591
  const normalizedSelectedTicketLines = useMemo(() => normalizeTicketSelectionLines(selectedTicketLines), [selectedTicketLines]);
131649
131592
  const ticketTypeSelectionTotal = useMemo(() => getTicketSelectionTotal(normalizedSelectedTicketLines), [normalizedSelectedTicketLines]);
131650
131593
  const ticketsCount = usesTicketTypeSelections ? ticketTypeSelectionTotal : flowState.ticketsCount;
@@ -131682,7 +131625,7 @@ function useEventRegistrationWizardWithDeps(options, deps) {
131682
131625
  isAuthenticated: portalAuthState === "authenticated",
131683
131626
  occurrenceId: registrationOccurrenceId
131684
131627
  });
131685
- const eligibility = useCheckoutRecoveryEligibility(eligibilityResult.eligibility, step, checkoutRecovery, startCheckoutRecovery);
131628
+ const eligibility = eligibilityResult.eligibility;
131686
131629
  const eligibilityLoading = eligibilityResult.isLoading;
131687
131630
  const eligibilityError = eligibilityResult.error;
131688
131631
  const portalCreditState = eligibilityResult.creditState;
@@ -131794,14 +131737,10 @@ function useEventRegistrationWizardWithDeps(options, deps) {
131794
131737
  event: currentEvent,
131795
131738
  eligibility,
131796
131739
  selectedAttendanceMode
131797
- }).map((option) => checkoutRecovery ? {
131798
- ...option,
131799
- availability: checkoutRecoveryOptionAvailability(option.availability)
131800
- } : option), [
131740
+ }), [
131801
131741
  currentEvent,
131802
131742
  selectedAttendanceMode,
131803
- eligibility,
131804
- checkoutRecovery
131743
+ eligibility
131805
131744
  ]);
131806
131745
  const singleSelectedPricingOptionId = getSingleSelectedPricingOptionId(normalizedSelectedTicketLines);
131807
131746
  const selectedTicketType = useMemo(() => findSelectedTicketType({
@@ -131825,12 +131764,8 @@ function useEventRegistrationWizardWithDeps(options, deps) {
131825
131764
  const event = currentEvent;
131826
131765
  if (!usesTieredPricing(event)) return false;
131827
131766
  if ((event.deliveryMode ?? "in_person") === "hybrid" && !selectedAttendanceMode) return false;
131828
- return checkoutRecovery || !canJoinEventWaitlist(event, { attendanceMode: selectedAttendanceMode });
131829
- }, [
131830
- currentEvent,
131831
- selectedAttendanceMode,
131832
- checkoutRecovery
131833
- ]);
131767
+ return true;
131768
+ }, [currentEvent, selectedAttendanceMode]);
131834
131769
  const hasValidTicketSelection = hasValidPricingOptionSelection({
131835
131770
  selectionRequired: ticketTypeSelectionRequired,
131836
131771
  lines: normalizedSelectedTicketLines,
@@ -131841,8 +131776,8 @@ function useEventRegistrationWizardWithDeps(options, deps) {
131841
131776
  if (selectedTicketLines.length > 0) setSelectedTicketLines([]);
131842
131777
  return;
131843
131778
  }
131844
- const availableTicketTypes = eventTicketTypesForSelection.filter((ticketType) => ticketType.availability.kind === "available");
131845
- const implicitTicketType = getImplicitSingleAvailableTicketType(eventTicketTypesForSelection);
131779
+ const availableTicketTypes = eventTicketTypesForSelection.filter((ticketType) => canRequestTicketOption(ticketType.availability));
131780
+ const implicitTicketType = getImplicitSingleTicketType(eventTicketTypesForSelection);
131846
131781
  if (implicitTicketType && normalizedSelectedTicketLines.length === 0) {
131847
131782
  setSelectedTicketLines([{
131848
131783
  pricingOptionId: implicitTicketType.pricingOptionId,
@@ -131909,6 +131844,26 @@ function useEventRegistrationWizardWithDeps(options, deps) {
131909
131844
  selectedEventSlidingScale,
131910
131845
  selectedSlidingAmount
131911
131846
  ]);
131847
+ const checkDetailsNextStep = async () => {
131848
+ if (portalAuthState === "authenticated" || waitlistClaim.claim || eligibility?.availability.kind === "available" || !registrationTarget) return { kind: canRecoverToWaitlist(eligibility) ? "waitlist" : "continue" };
131849
+ setCheckingNextStep(true);
131850
+ try {
131851
+ return await api.checkRegistrationNextStep({
131852
+ subject: toRegistrationRequestSubject(registrationTarget.subject, selectedAttendanceMode),
131853
+ selections: ticketSelections,
131854
+ selectedSlidingAmount: selectedSlidingAmount ?? void 0,
131855
+ email: formData.email,
131856
+ altchaSolution
131857
+ });
131858
+ } catch {
131859
+ return {
131860
+ kind: "unavailable",
131861
+ message: "We could not check availability. Please try again."
131862
+ };
131863
+ } finally {
131864
+ setCheckingNextStep(false);
131865
+ }
131866
+ };
131912
131867
  const handleDetailsComplete = async () => {
131913
131868
  const blockDetailsCompletion = (message) => {
131914
131869
  setErrorAction("places");
@@ -131940,11 +131895,10 @@ function useEventRegistrationWizardWithDeps(options, deps) {
131940
131895
  message: "Check the highlighted fields and try again."
131941
131896
  };
131942
131897
  }
131943
- if (isSoldOutWithoutWaitlist({
131944
- hasWaitlistClaim: waitlistClaim.claim !== null,
131945
- eligibility
131946
- })) return blockDetailsCompletion("Sorry, there aren’t enough places left for your selection. Please check the available places and choose again.");
131947
- if (!eligibility?.canJoinWaitlist && requiresPaymentStep({
131898
+ const next = await checkDetailsNextStep();
131899
+ if (next.kind === "unavailable") return blockDetailsCompletion(next.message);
131900
+ const canJoinWaitlist = next.kind === "waitlist";
131901
+ if (!canJoinWaitlist && requiresPaymentStep({
131948
131902
  eventRequiresPayment,
131949
131903
  paymentSelection
131950
131904
  })) {
@@ -131957,7 +131911,7 @@ function useEventRegistrationWizardWithDeps(options, deps) {
131957
131911
  const submitPlan = resolveEventRegistrationSubmitPlan({
131958
131912
  paymentSelection,
131959
131913
  eventRequiresPayment,
131960
- canJoinWaitlist: eligibility?.canJoinWaitlist
131914
+ canJoinWaitlist
131961
131915
  });
131962
131916
  if (!submitPlan.ok) return blockDetailsCompletion(submitPlan.message);
131963
131917
  const submitResult = await handleSubmit(submitPlan.args.method, submitPlan.args.passId, submitPlan.args.membershipId, submitPlan.args.selection);
@@ -131975,7 +131929,7 @@ function useEventRegistrationWizardWithDeps(options, deps) {
131975
131929
  const submitPlan = resolveEventRegistrationSubmitPlan({
131976
131930
  paymentSelection,
131977
131931
  eventRequiresPayment,
131978
- canJoinWaitlist: eligibility?.canJoinWaitlist
131932
+ canJoinWaitlist: false
131979
131933
  });
131980
131934
  if (!submitPlan.ok) {
131981
131935
  setErrorMessage(submitPlan.message);
@@ -132007,6 +131961,7 @@ function useEventRegistrationWizardWithDeps(options, deps) {
132007
131961
  const selectionMethod = paymentSelection.method;
132008
131962
  const shouldShowDiscountToggle = discountContext !== null && discountUi.manualCodeEntryAllowed && (selectionMethod === "stripe" || selectionMethod === "pass_bundle" || selectionMethod === "membership_bundle");
132009
131963
  const handleSubmit = deps.useEventRegistrationSubmit({
131964
+ commandRef,
132010
131965
  setErrorAction,
132011
131966
  api,
132012
131967
  registrationTarget,
@@ -132023,7 +131978,8 @@ function useEventRegistrationWizardWithDeps(options, deps) {
132023
131978
  setPendingRegistrationReference,
132024
131979
  setStep,
132025
131980
  setRegistrationResult: (result) => setRegistrationResult(result),
132026
- setErrorMessage
131981
+ setErrorMessage,
131982
+ setPaymentStatusRecovery
132027
131983
  });
132028
131984
  const handleEventSelect = (event) => {
132029
131985
  setSelectedEvent(event);
@@ -132082,8 +132038,6 @@ function useEventRegistrationWizardWithDeps(options, deps) {
132082
132038
  scopedEvents,
132083
132039
  preSelectedEvent,
132084
132040
  hasPreSelectedContext,
132085
- checkoutRecovery,
132086
- startCheckoutRecovery,
132087
132041
  step,
132088
132042
  setStep,
132089
132043
  selectedEvent,
@@ -132137,7 +132091,7 @@ function useEventRegistrationWizardWithDeps(options, deps) {
132137
132091
  waitlistClaim,
132138
132092
  eligibility,
132139
132093
  registrationOptionsState: eligibilityResult.state,
132140
- eligibilityLoading,
132094
+ eligibilityLoading: eligibilityLoading || checkingNextStep,
132141
132095
  eligibilityError,
132142
132096
  existingRegistration: existingRegistrationResult.registration,
132143
132097
  existingRegistrationLoading: existingRegistrationResult.isLoading || portalAuthState === "authenticated" && eligibilityLoading,
@@ -132157,6 +132111,11 @@ function useEventRegistrationWizardWithDeps(options, deps) {
132157
132111
  discountContext,
132158
132112
  shouldShowDiscountToggle,
132159
132113
  verification,
132114
+ paymentStatusRecovery,
132115
+ handleCheckPaymentStatus,
132116
+ handleContinueExistingPayment,
132117
+ handleReturnToPayment,
132118
+ handleReturnToBooking,
132160
132119
  handleDetailsComplete,
132161
132120
  handlePaymentSelect,
132162
132121
  handleUseCardInsteadOfPass,
@@ -132328,7 +132287,6 @@ const labels = {
132328
132287
  start: "Start again",
132329
132288
  details: "Check my details",
132330
132289
  "payment-options": "View payment options",
132331
- "payment-status": "Check payment status",
132332
132290
  portal: "View my bookings",
132333
132291
  event: "View event"
132334
132292
  };
@@ -132347,7 +132305,7 @@ const ErrorStep = ({ message, onRetry, action = "retry", canJoinWaitlist = false
132347
132305
  className: "er-text--muted er-message",
132348
132306
  children: offerWaitlist ? "Sorry, this event is now full. You can join the waiting list, and we’ll email you if a place becomes available." : message
132349
132307
  }),
132350
- actions: action === "none" ? void 0 : action === "portal" || action === "payment-status" ? /* @__PURE__ */ jsx("a", {
132308
+ actions: action === "none" ? void 0 : action === "portal" ? /* @__PURE__ */ jsx("a", {
132351
132309
  href: "/portal",
132352
132310
  className: "er-retry-btn",
132353
132311
  children: labels[action]
@@ -132601,8 +132559,11 @@ function EventRegistrationSummaryBar(props) {
132601
132559
  */
132602
132560
  function resolveDetailsButtonText(input) {
132603
132561
  const { wizard } = input;
132604
- if (wizard.eligibility?.canJoinWaitlist) return "Join waitlist";
132605
- if (!input.hasWaitlistClaim && wizard.eligibility?.isFull) return "Sold out";
132562
+ const availability = wizard.eligibility?.availability;
132563
+ const full = availability?.kind === "waitlist" || isSelectionSoldOut(availability);
132564
+ if (wizard.portalAuthState !== "authenticated" && full) return "Continue";
132565
+ if (canRecoverToWaitlist(wizard.eligibility)) return "Join waitlist";
132566
+ if (!input.hasWaitlistClaim && full && wizard.eligibility?.registration.kind !== "pending_payment") return "Sold out";
132606
132567
  if (wizard.paymentSelection.method === "pass") return "Book using class pass";
132607
132568
  if (wizard.paymentSelection.method === "membership") return input.fallbackText;
132608
132569
  return wizard.eventRequiresPayment ? "Continue to payment" : input.fallbackText;
@@ -132617,44 +132578,28 @@ function isExistingRegistrationBlocking$1(wizard) {
132617
132578
  hasWaitlistClaim: wizard.waitlistClaim.claim !== null
132618
132579
  });
132619
132580
  }
132620
- /**
132621
- * Full for the visitor's selected attendance mode (or the whole event when no
132622
- * mode is chosen) with no waitlist to fall back on. Reads the same capacity
132623
- * source as the steps above the action bar so the button never disagrees
132624
- * with them on a hybrid event.
132625
- */
132626
- function isFullWithNoWaitlist(event, attendanceMode) {
132627
- if (!event) return false;
132628
- const source = selectEventCapacitySource(event, attendanceMode);
132629
- return getEventAvailability(source).isFull && !source.waitlistEnabled;
132630
- }
132631
132581
  function resolveTicketSelectionContinueLabel(input) {
132632
132582
  if (input.isCheckingExistingRegistration) return "Checking registration...";
132633
132583
  if (input.registrationOptionsPending) return "Checking availability...";
132634
132584
  if (input.registrationOptionsFailed) return "Availability unavailable";
132635
132585
  if (input.hasExistingRegistration) return resolveExistingRegistrationLabel(input.wizard);
132636
- if (input.isSoldOutWithoutWaitlist) return "Sold out";
132637
132586
  if (input.ticketTypeSelectionBlocked) return "Choose a ticket";
132638
132587
  return "Continue";
132639
132588
  }
132640
132589
  function SelectTicketsActions(props) {
132641
132590
  const { wizard } = props;
132642
- const hasWaitlistClaim = wizard.waitlistClaim.claim !== null;
132643
- const currentEvent = wizard.selectedEvent ?? wizard.preSelectedEvent;
132644
132591
  const registrationOptionsPending = wizard.registrationOptionsState.tag === "idle" || wizard.registrationOptionsState.tag === "loading";
132645
132592
  const registrationOptionsFailed = wizard.registrationOptionsState.tag === "failed";
132646
- const isSoldOutWithoutWaitlist = !wizard.checkoutRecovery && !hasWaitlistClaim && isFullWithNoWaitlist(currentEvent, wizard.selectedAttendanceMode);
132647
132593
  const isCheckingExistingRegistration = wizard.portalAuthState === "authenticated" && wizard.existingRegistrationLoading;
132648
132594
  const hasExistingRegistration = isExistingRegistrationBlocking$1(wizard);
132649
132595
  const ticketTypeSelectionBlocked = wizard.ticketTypeSelectionRequired && !wizard.hasValidTicketSelection;
132650
- const isContinueDisabled = registrationOptionsPending || registrationOptionsFailed || isCheckingExistingRegistration || hasExistingRegistration || isSoldOutWithoutWaitlist || ticketTypeSelectionBlocked;
132596
+ const isContinueDisabled = registrationOptionsPending || registrationOptionsFailed || isCheckingExistingRegistration || hasExistingRegistration || ticketTypeSelectionBlocked;
132651
132597
  const continueLabel = resolveTicketSelectionContinueLabel({
132652
132598
  wizard,
132653
132599
  registrationOptionsPending,
132654
132600
  registrationOptionsFailed,
132655
132601
  isCheckingExistingRegistration,
132656
132602
  hasExistingRegistration,
132657
- isSoldOutWithoutWaitlist,
132658
132603
  ticketTypeSelectionBlocked
132659
132604
  });
132660
132605
  return /* @__PURE__ */ jsxs("div", {
@@ -132685,8 +132630,12 @@ function EnterDetailsActions(props) {
132685
132630
  const { wizard } = props;
132686
132631
  const hasWaitlistClaim = wizard.waitlistClaim.claim !== null;
132687
132632
  const isCheckingEligibility = wizard.eligibilityLoading;
132688
- const eligibilityUnavailable = !hasWaitlistClaim && (Boolean(wizard.eligibilityError) || !wizard.eligibility || wizard.eligibility.availability.kind === "unavailable" || !wizard.eligibility.eligible);
132689
- const isSoldOut = !hasWaitlistClaim && wizard.eligibility?.isFull === true && wizard.eligibility.canJoinWaitlist !== true;
132633
+ const eligibilityUnavailable = Boolean(resolveRegistrationAvailabilityBlocker({
132634
+ hasWaitlistClaim,
132635
+ eligibility: wizard.eligibility,
132636
+ eligibilityError: wizard.eligibilityError
132637
+ }));
132638
+ const isSoldOut = !hasWaitlistClaim && wizard.portalAuthState === "authenticated" && wizard.eligibility?.registration.kind !== "pending_payment" && isSelectionSoldOut(wizard.eligibility?.availability);
132690
132639
  const isContinueDisabled = isCheckingEligibility || eligibilityUnavailable || isSoldOut;
132691
132640
  const continueLabel = isCheckingEligibility ? "Checking availability..." : wizard.eligibilityError ? "Availability unavailable" : eligibilityUnavailable ? "Registration unavailable" : resolveDetailsButtonText({
132692
132641
  wizard,
@@ -132737,6 +132686,7 @@ function EventRegistrationWizardActions(props) {
132737
132686
  case "redirecting":
132738
132687
  case "verifying-payment":
132739
132688
  case "verifying-timeout":
132689
+ case "payment-status":
132740
132690
  case "payment-failed": return null;
132741
132691
  case "select-event": return null;
132742
132692
  case "select-tickets": return /* @__PURE__ */ jsx(SelectTicketsActions, { ...props });
@@ -132821,7 +132771,7 @@ function buildSelectedSiteCreditPreview(input) {
132821
132771
  function resolvePaymentStepStatus(input) {
132822
132772
  if (input.loading) return "loading";
132823
132773
  if (input.error || !input.eligibility) return "error";
132824
- if (input.eligibility.registration.kind !== "none" || !input.eligibility.eligible && !input.eligibility.isFree) return "not-eligible";
132774
+ if (input.eligibility.registration.kind === "waitlisted" || input.eligibility.paymentOptions.length === 0) return "not-eligible";
132825
132775
  return "ready";
132826
132776
  }
132827
132777
  function shouldPromptForLogin(status, isAuthenticated, eligibility) {
@@ -132856,7 +132806,7 @@ function UnavailableEntitlementMessage(props) {
132856
132806
  ] });
132857
132807
  }
132858
132808
  function IneligiblePaymentPanel(props) {
132859
- if (props.eligibility.isFull && !props.eligibility.canJoinWaitlist) return /* @__PURE__ */ jsxs("div", {
132809
+ if (isSelectionSoldOut(props.eligibility.availability)) return /* @__PURE__ */ jsxs("div", {
132860
132810
  className: "rb-reg-stack er-stack",
132861
132811
  children: [/* @__PURE__ */ jsx("h3", {
132862
132812
  className: "er-title",
@@ -132925,26 +132875,23 @@ function PaymentBlockingPanel(props) {
132925
132875
  })
132926
132876
  });
132927
132877
  if (!props.eligibility) return /* @__PURE__ */ jsx(MissingEligibilityPanel, {});
132928
- if (props.eligibility.registration.kind !== "none") {
132929
- const isBooked = props.eligibility.registration.kind === "booked";
132930
- return /* @__PURE__ */ jsxs("div", {
132931
- className: "rb-reg-stack er-stack",
132932
- children: [/* @__PURE__ */ jsx("h3", {
132933
- className: "er-title",
132934
- children: isBooked ? "Already booked" : "Already on the waitlist"
132935
- }), /* @__PURE__ */ jsxs("div", {
132936
- className: "er-center",
132937
- children: [/* @__PURE__ */ jsx("p", {
132938
- className: "er-text er-text--muted",
132939
- children: isBooked ? "You already have a booking for this event. Please check your bookings to see its status. If you need help, contact the organiser." : "You're already on the waitlist for this event."
132940
- }), /* @__PURE__ */ jsx("a", {
132941
- href: "/portal",
132942
- className: "er-retry-btn",
132943
- children: "View my bookings"
132944
- })]
132878
+ if (props.eligibility.registration.kind === "waitlisted") return /* @__PURE__ */ jsxs("div", {
132879
+ className: "rb-reg-stack er-stack",
132880
+ children: [/* @__PURE__ */ jsx("h3", {
132881
+ className: "er-title",
132882
+ children: "Already on the waitlist"
132883
+ }), /* @__PURE__ */ jsxs("div", {
132884
+ className: "er-center",
132885
+ children: [/* @__PURE__ */ jsx("p", {
132886
+ className: "er-text er-text--muted",
132887
+ children: "You're already on the waitlist for this event."
132888
+ }), /* @__PURE__ */ jsx("a", {
132889
+ href: "/portal",
132890
+ className: "er-retry-btn",
132891
+ children: "View my bookings"
132945
132892
  })]
132946
- });
132947
- }
132893
+ })]
132894
+ });
132948
132895
  if (props.eligibility.isFree) return /* @__PURE__ */ jsxs("div", {
132949
132896
  className: "rb-reg-stack er-stack",
132950
132897
  children: [/* @__PURE__ */ jsx("h3", {
@@ -132965,7 +132912,7 @@ function PaymentBlockingPanel(props) {
132965
132912
  })]
132966
132913
  })]
132967
132914
  });
132968
- return props.eligibility.eligible ? null : /* @__PURE__ */ jsx(IneligiblePaymentPanel, {
132915
+ return props.eligibility.paymentOptions.length > 0 ? null : /* @__PURE__ */ jsx(IneligiblePaymentPanel, {
132969
132916
  eligibility: props.eligibility,
132970
132917
  email: props.email,
132971
132918
  isAuthenticated: props.isAuthenticated,
@@ -133097,7 +133044,7 @@ function SlidingScaleAmountField(props) {
133097
133044
  }
133098
133045
  function TicketTypeQuantityRows(props) {
133099
133046
  const totalSelectedQuantity = getTicketSelectionTotal(props.ticketSelections);
133100
- const effectiveMaxTickets = props.availableSpots == null ? props.maxTickets : Math.min(props.maxTickets, props.availableSpots);
133047
+ const effectiveMaxTickets = props.maxTickets;
133101
133048
  return /* @__PURE__ */ jsxs("div", {
133102
133049
  className: "er-ticket-lines",
133103
133050
  children: [
@@ -133107,16 +133054,14 @@ function TicketTypeQuantityRows(props) {
133107
133054
  "aria-label": props.bookingUnit === "place" ? "Places" : "Tickets",
133108
133055
  children: props.ticketTypes.map((ticketType) => {
133109
133056
  const quantity = getTicketLineQuantity(props.ticketSelections, ticketType.pricingOptionId);
133110
- const disabled = ticketType.availability.kind === "unavailable";
133057
+ const disabled = !canRequestTicketOption(ticketType.availability);
133111
133058
  const availabilityLabel = getTicketTypeAvailabilityLabel(ticketType);
133112
133059
  const ticketTypeRemainingLabel = formatTicketTypeRemaining(ticketType.availability.remainingPlaces);
133113
133060
  const priceLabel = ticketType.priceAmount > 0 ? formatPrice(ticketType.priceAmount, props.currency) : "Free";
133114
133061
  const maxAllowed = disabled ? 0 : getTicketTypeLineMax({
133115
133062
  currentQuantity: quantity,
133116
133063
  totalSelectedQuantity,
133117
- maxTickets: props.maxTickets,
133118
- availableSpots: props.availableSpots,
133119
- ticketTypeRemainingCapacity: ticketType.availability.remainingPlaces
133064
+ maxTickets: props.maxTickets
133120
133065
  });
133121
133066
  return /* @__PURE__ */ jsxs("div", {
133122
133067
  className: `er-ticket-line${disabled ? " er-ticket-line--disabled" : ""}`,
@@ -133221,33 +133166,13 @@ function AttendanceModeTiles(props) {
133221
133166
  })
133222
133167
  });
133223
133168
  }
133224
- function getMaxAllowedTicketCount(input) {
133225
- if (input.canJoinWaitlist) return input.maxTickets;
133226
- if (!input.usesTicketTypes) return Math.min(input.maxTickets, input.availableSpots ?? input.maxTickets);
133227
- if (!input.hasSelectedTicketType) return 1;
133228
- return Math.max(1, Math.min(input.maxTickets, input.selectedTicketTypeRemainingCapacity ?? input.maxTickets, input.availableSpots ?? input.maxTickets));
133229
- }
133230
133169
  function resolveTicketSelectionPricing(event) {
133231
133170
  return {
133232
133171
  mode: event ? publicEventPricingStrategy(event.pricing) : void 0,
133233
133172
  currency: event ? publicEventPricingCurrency(event.pricing) : null
133234
133173
  };
133235
133174
  }
133236
- function CheckoutRecoveryEntry(props) {
133237
- return props.onContinue ? /* @__PURE__ */ jsx("button", {
133238
- type: "button",
133239
- className: "er-back-btn",
133240
- onClick: props.onContinue,
133241
- children: "Continue an existing booking"
133242
- }) : null;
133243
- }
133244
- function getTicketSelectionCapacity(event, attendanceMode, checkoutRecovery) {
133245
- if (checkoutRecovery) return {
133246
- availableSpots: null,
133247
- isSoldOut: false,
133248
- canJoinWaitlist: false,
133249
- eventAvailabilityLabel: null
133250
- };
133175
+ function getTicketSelectionCapacity(event, attendanceMode) {
133251
133176
  const source = event ? selectEventCapacitySource(event, attendanceMode) : null;
133252
133177
  const availability = source ? getEventAvailability(source) : null;
133253
133178
  const canJoinWaitlist = source ? canJoinEventWaitlist(source) : false;
@@ -133266,29 +133191,21 @@ function getTicketSelectionCapacity(event, attendanceMode, checkoutRecovery) {
133266
133191
  *
133267
133192
  * Can use either a full PublicEvent or just occurrence context (when on event page).
133268
133193
  */
133269
- const TicketSelectionStep = ({ event, occurrenceContext: _occurrenceContext, selectedAttendanceMode = null, onAttendanceModeChange, ticketsCount, maxTickets, visibleTicketTypes: visibleTicketTypesOverride, ticketSelections = [], onTicketSelectionsChange, slidingScale = null, selectedSlidingAmountInput = "", slidingScaleSelectionMessage = null, onSlidingAmountChange, onTicketsChange, bookingUnit = { kind: "ticket" }, checkoutRecovery = false, onCheckoutRecovery }) => {
133194
+ const TicketSelectionStep = ({ event, occurrenceContext: _occurrenceContext, selectedAttendanceMode = null, onAttendanceModeChange, ticketsCount, maxTickets, visibleTicketTypes: visibleTicketTypesOverride, ticketSelections = [], onTicketSelectionsChange, slidingScale = null, selectedSlidingAmountInput = "", slidingScaleSelectionMessage = null, onSlidingAmountChange, onTicketsChange, bookingUnit = { kind: "ticket" } }) => {
133270
133195
  const unit = bookingUnit.kind;
133271
133196
  const deliveryMode = event?.deliveryMode ?? "in_person";
133272
133197
  const attendanceModes = event?.attendanceModes ?? [];
133273
- const { availableSpots, isSoldOut, canJoinWaitlist, eventAvailabilityLabel } = getTicketSelectionCapacity(event, selectedAttendanceMode, checkoutRecovery);
133198
+ const { availableSpots, isSoldOut, canJoinWaitlist, eventAvailabilityLabel } = getTicketSelectionCapacity(event, selectedAttendanceMode);
133274
133199
  const { mode: eventPricingMode, currency: eventPricingCurrency } = resolveTicketSelectionPricing(event);
133275
- const usesTicketTypes = eventPricingMode === "tiered" && !canJoinWaitlist;
133200
+ const usesTicketTypes = eventPricingMode === "tiered";
133276
133201
  const visibleTicketTypes = usesTicketTypes ? visibleTicketTypesOverride ?? getVisibleTicketTypes({
133277
133202
  event,
133278
133203
  eligibility: null,
133279
133204
  selectedAttendanceMode
133280
133205
  }) : [];
133281
- const implicitTicketType = usesTicketTypes ? getImplicitSingleAvailableTicketType(visibleTicketTypes) : null;
133282
133206
  const noVisibleTicketTypes = usesTicketTypes && visibleTicketTypes.length === 0;
133283
- const hasAvailableTicketTypes = usesTicketTypes && visibleTicketTypes.some((ticketType) => ticketType.availability.kind === "available");
133284
- const maxAllowed = getMaxAllowedTicketCount({
133285
- canJoinWaitlist,
133286
- usesTicketTypes,
133287
- maxTickets,
133288
- availableSpots,
133289
- selectedTicketTypeRemainingCapacity: implicitTicketType?.availability.remainingPlaces ?? null,
133290
- hasSelectedTicketType: implicitTicketType !== null
133291
- });
133207
+ const hasAvailableTicketTypes = usesTicketTypes && visibleTicketTypes.some((ticketType) => canRequestTicketOption(ticketType.availability));
133208
+ const maxAllowed = maxTickets;
133292
133209
  if (deliveryMode === "hybrid" && !selectedAttendanceMode) return /* @__PURE__ */ jsxs("div", {
133293
133210
  className: "rb-reg-stack er-stack",
133294
133211
  children: [
@@ -133307,20 +133224,6 @@ const TicketSelectionStep = ({ event, occurrenceContext: _occurrenceContext, sel
133307
133224
  })
133308
133225
  ]
133309
133226
  });
133310
- if (isSoldOut && !canJoinWaitlist) return /* @__PURE__ */ jsxs("div", {
133311
- className: "rb-reg-stack er-stack",
133312
- children: [
133313
- /* @__PURE__ */ jsx("h3", {
133314
- className: "er-title",
133315
- children: "Sold out"
133316
- }),
133317
- /* @__PURE__ */ jsx("p", {
133318
- className: "er-text er-text--muted",
133319
- children: "Sorry you missed out! This event is fully booked."
133320
- }),
133321
- /* @__PURE__ */ jsx(CheckoutRecoveryEntry, { onContinue: onCheckoutRecovery })
133322
- ]
133323
- });
133324
133227
  if (!eventPricingCurrency) return /* @__PURE__ */ jsx("div", {
133325
133228
  className: "rb-reg-stack er-stack",
133326
133229
  children: /* @__PURE__ */ jsx("p", {
@@ -133387,14 +133290,14 @@ const TicketSelectionStep = ({ event, occurrenceContext: _occurrenceContext, sel
133387
133290
  })]
133388
133291
  })
133389
133292
  ] }),
133390
- canJoinWaitlist && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("p", {
133293
+ isSoldOut && !canJoinWaitlist && /* @__PURE__ */ jsx("p", {
133391
133294
  className: "er-text er-text--muted",
133392
- children: "This event is currently full. Continue to join the waitlist if a place opens up."
133393
- }), /* @__PURE__ */ jsx(CheckoutRecoveryEntry, { onContinue: onCheckoutRecovery })] }),
133394
- checkoutRecovery && /* @__PURE__ */ jsx("p", {
133295
+ children: "This event is fully booked."
133296
+ }),
133297
+ canJoinWaitlist && /* @__PURE__ */ jsx(Fragment$1, { children: /* @__PURE__ */ jsx("p", {
133395
133298
  className: "er-text er-text--muted",
133396
- children: "Enter the details from your earlier booking. We’ll check your checkout before continuing to payment."
133397
- })
133299
+ children: "This event is currently full. Continue to join the waitlist if a place opens up."
133300
+ }) })
133398
133301
  ]
133399
133302
  });
133400
133303
  };
@@ -133989,7 +133892,7 @@ const PaymentSelectionStep = ({ event, occurrenceContext, ticketsCount, email, i
133989
133892
  const occurrenceId = occurrenceContext?.id ?? (event?.registrationSubject.kind === "occurrence" ? event.registrationSubject.occurrenceId : "");
133990
133893
  const selectedMethod = selectedSelection.method;
133991
133894
  const totalPrice = directPaymentTotalCents;
133992
- const canShowDirectPaymentOptions = Boolean(eligibility?.eligible && eligibility.canPayDirectly && eligibility.price);
133895
+ const canShowDirectPaymentOptions = Boolean(eligibility?.requiresPayment && eligibility.price);
133993
133896
  const directPaymentOptions = eligibility && canShowDirectPaymentOptions ? buildEventRegistrationPaymentOptionsViewModel({
133994
133897
  eventTitle: event?.title ?? "Event",
133995
133898
  approvedPaymentOptions: eligibility.paymentOptions,
@@ -134052,7 +133955,7 @@ const PaymentSelectionStep = ({ event, occurrenceContext, ticketsCount, email, i
134052
133955
  onRequestLogin
134053
133956
  });
134054
133957
  if (eligibilityLoading || eligibilityError || !eligibility) return blockingPanel;
134055
- if (eligibility.isFree || !eligibility.eligible) return blockingPanel;
133958
+ if (eligibility.isFree || paymentStepStatus !== "ready") return blockingPanel;
134056
133959
  const isMultiTicket = areEntitlementsDisabledForTicketCount(ticketsCount);
134057
133960
  return /* @__PURE__ */ jsxs("div", {
134058
133961
  className: "rb-reg-stack er-stack",
@@ -134286,6 +134189,7 @@ function EventRegistrationWizardContent(props) {
134286
134189
  case "redirecting":
134287
134190
  case "verifying-payment":
134288
134191
  case "verifying-timeout":
134192
+ case "payment-status":
134289
134193
  case "payment-failed": return null;
134290
134194
  case "select-event": return /* @__PURE__ */ jsx(EventSelectionStep, {
134291
134195
  events: wizard.scopedEvents,
@@ -134301,8 +134205,6 @@ function EventRegistrationWizardContent(props) {
134301
134205
  onBookForSomeoneElse: wizard.handleBookForSomeoneElse
134302
134206
  }), /* @__PURE__ */ jsx(TicketSelectionStep, {
134303
134207
  event: wizard.selectedEvent,
134304
- checkoutRecovery: wizard.checkoutRecovery,
134305
- onCheckoutRecovery: canRecoverEventCheckout(wizard.selectedEvent) ? wizard.startCheckoutRecovery : void 0,
134306
134208
  occurrenceContext: wizard.occurrenceContext,
134307
134209
  selectedAttendanceMode: wizard.selectedAttendanceMode,
134308
134210
  onAttendanceModeChange: wizard.setSelectedAttendanceMode,
@@ -134357,6 +134259,81 @@ const PaymentFailedStep = ({ onRetry }) => {
134357
134259
  });
134358
134260
  };
134359
134261
  //#endregion
134262
+ //#region ../blocks/src/system/runtime/nodes/event-registration/PaymentStatusStep.tsx
134263
+ function presentation(state) {
134264
+ switch (state.kind) {
134265
+ case "ready": return {
134266
+ title: "We haven’t confirmed your payment yet",
134267
+ message: "We’ve saved your booking details, but we haven’t been able to confirm that your payment was successful. Please don’t make another payment. Select Check payment status to get the latest update.",
134268
+ action: { label: "Check payment status" }
134269
+ };
134270
+ case "checking": return {
134271
+ title: "We haven’t confirmed your payment yet",
134272
+ message: "We’ve saved your booking details, but we haven’t been able to confirm that your payment was successful. Please don’t make another payment.",
134273
+ action: {
134274
+ label: "Checking payment…",
134275
+ disabled: true
134276
+ }
134277
+ };
134278
+ case "processing": return {
134279
+ title: "Your payment is still being processed",
134280
+ message: "Please don’t make another payment. You can check its status again in a moment.",
134281
+ action: { label: "Check payment status" }
134282
+ };
134283
+ case "paymentAvailable": return {
134284
+ title: "Your payment hasn’t been completed",
134285
+ message: "Your booking details are still saved. Continue to payment to finish your booking.",
134286
+ action: { label: "Continue to payment" }
134287
+ };
134288
+ case "retryAvailable": return {
134289
+ title: "Continue your booking",
134290
+ message: "You can return to payment. We’ll check your booking, any existing payment and availability before starting another checkout.",
134291
+ action: { label: "Return to payment" }
134292
+ };
134293
+ case "temporarilyUnavailable": return {
134294
+ title: "We couldn’t check your payment",
134295
+ message: "Please don’t make another payment yet. Try checking again in a moment.",
134296
+ action: { label: "Check payment status" }
134297
+ };
134298
+ case "assistanceRequired": return {
134299
+ title: "We still can’t confirm your payment",
134300
+ message: "Please don’t make another payment. Contact the organiser so they can check your booking.",
134301
+ action: { label: "Return to booking" }
134302
+ };
134303
+ }
134304
+ }
134305
+ function PaymentStatusStep(props) {
134306
+ const view = presentation(props.state);
134307
+ const onClick = props.state.kind === "paymentAvailable" ? props.onContinuePayment : props.state.kind === "retryAvailable" ? props.onReturnToPayment : props.state.kind === "assistanceRequired" ? props.onReturnToBooking : props.onCheck;
134308
+ return /* @__PURE__ */ jsx(TerminalPanel, {
134309
+ tone: "warning",
134310
+ className: "er-center",
134311
+ titleClassName: "er-title--lg er-message",
134312
+ icon: /* @__PURE__ */ jsx(StateIcon, {
134313
+ variant: "warning",
134314
+ children: /* @__PURE__ */ jsx(ClockIcon, {})
134315
+ }),
134316
+ title: view.title,
134317
+ body: /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("p", {
134318
+ className: "er-text--muted er-message",
134319
+ children: view.message
134320
+ }), /* @__PURE__ */ jsx("span", {
134321
+ className: "rb-sr-only",
134322
+ "aria-live": "polite",
134323
+ "aria-atomic": "true",
134324
+ children: props.state.kind === "checking" ? "Checking payment…" : view.title
134325
+ })] }),
134326
+ actionsClassName: "er-button-group",
134327
+ actions: view.action ? /* @__PURE__ */ jsx("button", {
134328
+ type: "button",
134329
+ onClick,
134330
+ disabled: view.action.disabled,
134331
+ className: "er-btn er-btn--primary",
134332
+ children: /* @__PURE__ */ jsx("span", { children: view.action.label })
134333
+ }) : void 0
134334
+ });
134335
+ }
134336
+ //#endregion
134360
134337
  //#region ../blocks/src/system/runtime/nodes/event-registration/StepIndicator.tsx
134361
134338
  /**
134362
134339
  * Step indicator component for the event registration wizard.
@@ -134474,7 +134451,7 @@ const VerifyingTimeoutStep = ({ onCheckAgain, supportEmail, title = "We’re che
134474
134451
  title,
134475
134452
  body: /* @__PURE__ */ jsx("p", {
134476
134453
  className: "er-text--muted er-message",
134477
- children: message
134454
+ children: onCheckAgain ? message : "We still can’t confirm your payment. Please don’t make another payment. Contact the organiser so they can check your booking."
134478
134455
  }),
134479
134456
  actionsClassName: "er-button-group",
134480
134457
  actions: onCheckAgain ? /* @__PURE__ */ jsx("button", {
@@ -134482,11 +134459,7 @@ const VerifyingTimeoutStep = ({ onCheckAgain, supportEmail, title = "We’re che
134482
134459
  onClick: onCheckAgain,
134483
134460
  className: "er-btn er-btn--primary",
134484
134461
  children: "Check payment status"
134485
- }) : /* @__PURE__ */ jsx("a", {
134486
- href: "/portal",
134487
- className: "er-btn er-btn--primary",
134488
- children: "Check payment status"
134489
- }),
134462
+ }) : void 0,
134490
134463
  secondaryBody: supportEmail ? /* @__PURE__ */ jsxs("p", {
134491
134464
  className: "er-text--sm er-text--muted er-message",
134492
134465
  children: [
@@ -134587,6 +134560,13 @@ function EventRegistrationTerminalState(props) {
134587
134560
  message: wizard.verification.status === "timeout" ? void 0 : wizard.errorMessage,
134588
134561
  supportEmail: props.supportEmail
134589
134562
  });
134563
+ case "payment-status": return wizard.paymentStatusRecovery ? /* @__PURE__ */ jsx(PaymentStatusStep, {
134564
+ state: wizard.paymentStatusRecovery,
134565
+ onCheck: wizard.handleCheckPaymentStatus,
134566
+ onContinuePayment: wizard.handleContinueExistingPayment,
134567
+ onReturnToPayment: wizard.handleReturnToPayment,
134568
+ onReturnToBooking: wizard.handleReturnToBooking
134569
+ }) : null;
134590
134570
  case "success": return wizard.registrationResult ? /* @__PURE__ */ jsx(SuccessStep, {
134591
134571
  title: wizard.registrationResult.title,
134592
134572
  variant: wizard.registrationResult.variant,
@@ -134595,7 +134575,7 @@ function EventRegistrationTerminalState(props) {
134595
134575
  case "error": return /* @__PURE__ */ jsx(ErrorStep, {
134596
134576
  message: wizard.errorMessage,
134597
134577
  action: wizard.errorAction,
134598
- canJoinWaitlist: wizard.eligibility?.isFull && wizard.eligibility.canJoinWaitlist,
134578
+ canJoinWaitlist: wizard.eligibility?.availability.kind === "waitlist" && wizard.eligibility.registration.kind !== "pending_payment",
134599
134579
  onRetry: wizard.handleRetry
134600
134580
  });
134601
134581
  case "select-event":
@@ -134890,6 +134870,7 @@ function getWizardStepLabel(input) {
134890
134870
  case "redirecting":
134891
134871
  case "verifying-payment":
134892
134872
  case "verifying-timeout":
134873
+ case "payment-status":
134893
134874
  case "payment-failed": return "";
134894
134875
  }
134895
134876
  }
@@ -186471,11 +186452,14 @@ const sdkSiteStyleConfigSchema = z.object({
186471
186452
  sectionOptions: sdkSectionOptionsConfigSchema.optional(),
186472
186453
  containerOptions: sdkContainerOptionsConfigSchema.optional()
186473
186454
  });
186474
- const sdkSiteLayoutConfigSchema = z.object({ footerBlocks: z.array(z.object({
186475
- id: z.string().min(1).optional(),
186476
- kind: z.string().min(1),
186477
- content: z.record(z.string(), z.unknown()).optional()
186478
- })).optional() });
186455
+ const sdkSiteLayoutConfigSchema = z.object({
186456
+ footerMode: footerModeSchema.optional(),
186457
+ footerBlocks: z.array(z.object({
186458
+ id: z.string().min(1).optional(),
186459
+ kind: z.string().min(1),
186460
+ content: z.record(z.string(), z.unknown()).optional()
186461
+ })).optional()
186462
+ });
186479
186463
  const sdkFieldSelectOptionSchema = z.object({
186480
186464
  value: z.string(),
186481
186465
  label: z.string()
@@ -198489,6 +198473,71 @@ function useBlockReorder({ allowReordering, apiClient, siteId, owner, blockList,
198489
198473
  };
198490
198474
  }
198491
198475
  //#endregion
198476
+ //#region ../editor-blocks/src/block-editor/colourFieldVisibility.ts
198477
+ /** Only changes form presentation; the validation manifest and saved data stay intact. */
198478
+ function hideUnavailableColourFields(manifest, options) {
198479
+ if (options.colour && options.gradient) return manifest;
198480
+ const hiddenPaths = [];
198481
+ const visit = (fields, parent) => fields.flatMap((field) => {
198482
+ const path = parent ? `${parent}.${field.id}` : field.id;
198483
+ const widget = field.ui?.widget;
198484
+ if (widget === "backgroundColor" && !options.colour || widget === "backgroundGradient" && !options.gradient) {
198485
+ hiddenPaths.push(path);
198486
+ return [];
198487
+ }
198488
+ if (field.type === "group" || field.type === "modal") {
198489
+ const children = visit(field.schema.fields, path);
198490
+ if (!children.length) {
198491
+ hiddenPaths.push(path);
198492
+ return [];
198493
+ }
198494
+ return [{
198495
+ ...field,
198496
+ schema: {
198497
+ ...field.schema,
198498
+ fields: children
198499
+ }
198500
+ }];
198501
+ }
198502
+ if (field.type === "repeater") return [{
198503
+ ...field,
198504
+ ...field.schema ? { schema: {
198505
+ ...field.schema,
198506
+ fields: visit(field.schema.fields, path)
198507
+ } } : {},
198508
+ ...field.itemTypes ? { itemTypes: Object.fromEntries(Object.entries(field.itemTypes).map(([id, item]) => [id, {
198509
+ ...item,
198510
+ fields: visit(item.fields, path)
198511
+ }])) } : {}
198512
+ }];
198513
+ if (field.type === "tabGroup") {
198514
+ const tabs = field.tabs.flatMap((tab) => {
198515
+ const children = visit(tab.fields, path);
198516
+ const unavailableTab = tab.sdkSectionOption === "backgroundColor" && !options.colour || tab.sdkSectionOption === "backgroundGradient" && !options.gradient;
198517
+ return children.length && !unavailableTab ? [{
198518
+ ...tab,
198519
+ fields: children
198520
+ }] : [];
198521
+ });
198522
+ if (!tabs.length) {
198523
+ hiddenPaths.push(path);
198524
+ return [];
198525
+ }
198526
+ return [{
198527
+ ...field,
198528
+ tabs
198529
+ }];
198530
+ }
198531
+ return [field];
198532
+ });
198533
+ const fields = visit(manifest.fields, "");
198534
+ return {
198535
+ ...manifest,
198536
+ fields,
198537
+ promotedFields: manifest.promotedFields?.filter((path) => !hiddenPaths.some((hidden) => path === hidden || path.startsWith(`${hidden}.`)))
198538
+ };
198539
+ }
198540
+ //#endregion
198492
198541
  //#region ../editor-blocks/src/block-editor/settingsIntent.ts
198493
198542
  function isSectionStylesField(field) {
198494
198543
  return field.type === "modal" && field.id === "_sectionStyles";
@@ -198580,13 +198629,14 @@ function prepareBlockEditorManifest(input) {
198580
198629
  const mergedManifest = mergeManifestWithSdkOptions(input.manifest, input.blockKind, input.blockFieldOptions, input.blockFieldExtensions);
198581
198630
  const validationManifest = augmentManifestWithStyleGroups(mergedManifest, input.styleGroups, input.blockKind);
198582
198631
  const renderManifestBase = input.visibilityPolicy.kind === "hide-theme-v2-raw-style-fields" ? mergedManifest : validationManifest;
198632
+ const renderManifest = input.visibilityPolicy.kind === "hide-theme-v2-raw-style-fields" ? {
198633
+ ...renderManifestBase,
198634
+ fields: renderManifestBase.fields ? hideThemeV2NormalEditorRawStyleFieldsInRenderFields(renderManifestBase.fields) : renderManifestBase.fields,
198635
+ promotedFields: filterThemeV2NormalEditorRawPromotedFields(renderManifestBase.promotedFields, input.allowedPromotedFieldPaths)
198636
+ } : validationManifest;
198583
198637
  return {
198584
198638
  validationManifest,
198585
- renderManifest: hideEditorOwnedFields(input.visibilityPolicy.kind === "hide-theme-v2-raw-style-fields" ? {
198586
- ...renderManifestBase,
198587
- fields: renderManifestBase.fields ? hideThemeV2NormalEditorRawStyleFieldsInRenderFields(renderManifestBase.fields) : renderManifestBase.fields,
198588
- promotedFields: filterThemeV2NormalEditorRawPromotedFields(renderManifestBase.promotedFields, input.allowedPromotedFieldPaths)
198589
- } : validationManifest, input.blockKind)
198639
+ renderManifest: hideEditorOwnedFields(input.colourFieldOptions ? hideUnavailableColourFields(renderManifest, input.colourFieldOptions) : renderManifest, input.blockKind)
198590
198640
  };
198591
198641
  }
198592
198642
  //#endregion
@@ -198633,6 +198683,12 @@ function shouldShowMoveButtons(mode) {
198633
198683
  return mode === "full";
198634
198684
  }
198635
198685
  //#endregion
198686
+ //#region ../editor-blocks/src/block-editor/ColourFieldOptionsProvider.tsx
198687
+ const ColourFieldOptionsContext = createContext(void 0);
198688
+ function useColourFieldOptions() {
198689
+ return useContext(ColourFieldOptionsContext);
198690
+ }
198691
+ //#endregion
198636
198692
  //#region ../editor-blocks/src/BlockForm.tsx
198637
198693
  function focusPathForSignal(signal) {
198638
198694
  return signal && signal.kind !== "block" ? normalizeFocusPath(signal.fieldPath) : null;
@@ -198657,10 +198713,12 @@ function BlockForm({ siteId: _siteId, block, manifest, uiStore, hasRecoveryConfl
198657
198713
  manifest.promotedFields,
198658
198714
  pageDesignBlock
198659
198715
  ]);
198716
+ const colourFieldOptions = useColourFieldOptions();
198660
198717
  const preparedManifest = useMemo(() => prepareBlockEditorManifest({
198661
198718
  manifest,
198662
198719
  blockKind: block.kind,
198663
198720
  styleGroups: theme?.styleGroups,
198721
+ colourFieldOptions,
198664
198722
  blockFieldOptions,
198665
198723
  blockFieldExtensions,
198666
198724
  visibilityPolicy: hideThemeV2RawStyleFields$2 ? hideThemeV2RawStyleFields : showRawStyleFields,
@@ -198670,6 +198728,7 @@ function BlockForm({ siteId: _siteId, block, manifest, uiStore, hasRecoveryConfl
198670
198728
  manifest,
198671
198729
  block.kind,
198672
198730
  theme?.styleGroups,
198731
+ colourFieldOptions,
198673
198732
  blockFieldOptions,
198674
198733
  blockFieldExtensions,
198675
198734
  hideThemeV2RawStyleFields$2
@@ -199777,10 +199836,12 @@ function BlockSettingsModal({ block, manifest, uiStore, widgetOverrides, theme,
199777
199836
  const focusPath = settingsFocusPath(focusSignal, blockId);
199778
199837
  const hasDraftSnapshot = useStoreSelector(uiStore, (state) => blockId ? state.drafts.getBlockSnapshot(blockId) !== null : false);
199779
199838
  const { blockFieldOptions, blockFieldExtensions } = useSdkConfig();
199839
+ const colourFieldOptions = useColourFieldOptions();
199780
199840
  const preparedManifest = useMemo(() => prepareBlockEditorManifest({
199781
199841
  manifest,
199782
199842
  blockKind: block.kind,
199783
199843
  styleGroups: theme?.styleGroups,
199844
+ colourFieldOptions,
199784
199845
  blockFieldOptions,
199785
199846
  blockFieldExtensions,
199786
199847
  visibilityPolicy: hideThemeV2RawStyleFields$1 ? hideThemeV2RawStyleFields : showRawStyleFields
@@ -199788,6 +199849,7 @@ function BlockSettingsModal({ block, manifest, uiStore, widgetOverrides, theme,
199788
199849
  manifest,
199789
199850
  block.kind,
199790
199851
  theme?.styleGroups,
199852
+ colourFieldOptions,
199791
199853
  blockFieldOptions,
199792
199854
  blockFieldExtensions,
199793
199855
  hideThemeV2RawStyleFields$1
@@ -231792,4 +231854,4 @@ function useSiteChromeCustomizeOptional() {
231792
231854
  return useContext(SiteChromeCustomizeContext);
231793
231855
  }
231794
231856
  //#endregion
231795
- export { FooterComposerPanel as $, PenLine as $a, mapOptionValueForSelect as $i, coerceLinkedContentEntriesPayload as $n, runTransforms as $r, useMultiAutosave as $t, markApplySaving as A, CollapsibleTrigger as Aa, buttonStyleHoverPreferenceValue as Ai, containerResponsiveThemeCss as An, compileTransitionRuntime as Ar, RichTextField as At, setPaletteColors as B, cva as Ba, parseThemeForPersistence as Bi, compileManifestContentContract as Bn, curatedPalettes as Br, getBlockManifestFromSdkConfig as Bt, cancelPreview as C, DialogContent as Ca, isRecord$17 as Ci, deriveLaunchReadiness as Cn, retargetCompiledRuntimeFieldsForContentAdjacency as Cr, ButtonVariantField as Ct, isPreviewingChange as D, DialogTitle as Da, asDesignBlockId as Di, useApiMediaUploader as Dn, curatedSiteStyles as Dr, ReferenceField as Dt, dismissWarnings as E, DialogHeader as Ea, pageDesignEditorBackgroundOverrideOwner as Ei, useMediaEditorOptional as En, componentRuntimeRulesForTheme as Er, MediaField as Et, previewFooterLook as F, DropdownMenuLabel as Fa, updateButtonStyleSelectionChoice as Fi, SITE_CHROME_VISIBLE_HEADER_SELECTOR as Fn, gradientToCss as Fr, LinkWidgetProvider as Ft, confirmAutosaveBatch as G, TriangleAlert as Ga, paletteModeSchema as Gi, escapeStyleContent as Gn, backgroundAppearanceColorTokenNames as Gr, canRedoHistory as Gt, syncStyleConfiguratorState as H, X as Ha, VARIANT_ROLES as Hi, buildThemeRuntime as Hn, sectionTransitionFamilies as Hr, useEditorUiStore as Ht, previewHeaderLayout as I, DropdownMenuSeparator as Ia, buttonStyleSelectionKey as Ii, SITE_OVERLAY_HEADER_CLEARANCE_CSS_VAR as In, GRADIENT_PRESETS as Ir, BlockEditor as It, idleEditorTransactionQueueState as J, Smartphone as Ja, isHeaderField as Ji, defaultTransforms as Jn, ctaButton as Jr, pushHistoryEntry as Jt, deriveTransactionCapabilities as K, Tablet as Ka, attachRenderableMediaAssetFields as Ki, readBlockComposition as Kn, backgroundAppearanceQuickColorTokenNames as Kr, canUndoHistory as Kt, previewHeaderStyle as L, DropdownMenuTrigger as La, textColorStyle as Li, planSiteOverlayHeaderClearance as Ln, GRADIENT_PRESET_IDS as Lr, hideThemeV2RawStyleFields as Lt, palettePreviewProjection as M, DropdownMenu as Ma, findButtonStyleRecipe as Mi, makeDefaultBlockComponent as Mn, findFooterLook as Mr, EditorProvider as Mt, previewButtonStyle as N, DropdownMenuContent as Na, resolveButtonStyleSelection as Ni, getBlockDefinition as Nn, getHeaderLayout as Nr, useEditor$1 as Nt, markApplyFailed as O, Collapsible as Oa, assertNever$7 as Oi, isSupportedLoaderEndpoint as On, designRuntimeRulesForTheme as Or, ReferenceWidgetProvider as Ot, previewCuratedPalette as P, DropdownMenuItem as Pa, updateButtonStyleHoverPreference as Pi, projectRecurringSchedule as Pn, getHeaderStyle as Pr, LinkField as Pt, resolvePreviewSidebarTab as Q, Pencil as Qa, mapCurrentValueForSelect as Qi, LINKED_CONTENT_ENTRY_META_KEY as Qn, parseBackgroundContent as Qr, recordsEqual as Qt, previewSiteStyle as R, Primitive as Ra, defaultThemeTokens as Ri, visibleHeaderClearancePx as Rn, getGradientPreset as Rr, prepareBlockEditorManifest as Rt, applyTypographyDraftPatch as S, Dialog as Sa, isObjectRecord$1 as Si, DEFAULT_LAUNCH_READINESS_INPUT as Sn, retargetCompiledBoundaryRuntimeForContentAdjacency as Sr, EntryPickerWidgetProvider as St, deriveStyleConfiguratorCapabilities as T, DialogFooter as Ta, isThemeV2NormalEditorRawStyleFieldName as Ti, MediaEditorContextProvider as Tn, planPageDesignLayoutLookCompatibility as Tr, FileField as Tt, toggleRow as U, Upload as Ua, paletteColorEntries as Ui, DEFAULT_THEME_RESPONSIVE_MODE as Un, sectionTransitionFamilyForBoundaryOptionId as Ur, useEditorUiStoreInstance as Ut, styleConfiguratorHistoryEntryForPersistedSelection as V, cn$2 as Va, ORDINARY_TEXT_MIN_CONTRAST_RATIO as Vi, validateManifestDraft as Vn, defaultSectionTransitionVariantForFamily as Vr, classifyHistoryShortcut as Vt, beginAutosaveBatch as W, Undo2 as Wa, paletteColorsSchema as Wi, getResponsiveScopeSpec as Wn, sectionTransitionVariantForBoundaryOptionId as Wr, useOptionalEditorUiStoreInstance as Wt, resolveStyleConfiguratorInitialSnapshot as X, RotateCcw as Xa, useSdkConfig as Xi, resolvePageRouteTarget as Xn, EDITABLE_SURFACE_FORWARDING_PROP as Xr, undoHistory as Xt, rejectAutosaveBatch as Y, SlidersHorizontal as Ya, SdkConfigProvider as Yi, resolveEntryRouteTarget as Yn, bindingSchema as Yr, redoHistory as Yt, createOptimisticActionRunner as Z, Redo2 as Za, hasEmptyOption as Zi, resolveRouteTarget as Zn, planSiteChromePlacement as Zr, unsafeAsLinkedContentEntryId as Zt, reportPreviewDesignError as _, Input as _a, BlockApiProvider as _i, MediaEditor as _n, parseMediaAssetId as _o, heroCopyFragment as _r, loadMailingListAuthoringContext as _t, previewDesignHistoryDomainForCommand as a, TooltipTrigger as aa, coerceInlineTextWithFallback as ai, parseReferenceKind as an, GripVertical as ao, cardFragment as ar, useUISelector as at, planSiteChromeSelection as b, TabsList as ba, eventCalendarListLayoutOptions as bi, listEntryPageContentSlots as bn, applyCompiledRuntimeFieldsToContent as br, IconPickerField as bt, selectionSnapshotFromApplySiteStyleSelectionResponse as c, SelectItem as ca, Text$2 as ci, resolveContentTitle as cn, ChevronRight as co, blogFeaturedPostFragment as cr, useEntryController as ct, PreviewDesignCoordinatorProvider as d, Callout as da, getCurrentResolveImageUrlContext as di, ManifestForm as dn, Check as do, formCopyFragment as dr, createSiteOptionWidgetAdapters as dt, unmapValueFromSelect as ea, parseBlockIconValue as ei, useDebouncedLatestSave as en, Palette as eo, getLinkedContentEntryMeta as er, renderSiteChromeBlock as et, usePreviewDesignCoordinator as f, CalloutDescription as fa, resolveImageUrlWithContext as fi, createManifestFormAdapter as fn, parseFooterModuleId as fo, testimonialsCarouselFragment as fr, SiteOptionPickerField as ft, PREVIEW_DESIGN_SAVE_ERROR_MESSAGE as g, PopoverTrigger as ga, siblingPath$1 as gi, createStoreBackend as gn, expectParsedBrandedId as go, ctaRowFragment as gr, MailingListTargetingField as gt, PREVIEW_DESIGN_LOAD_ERROR_MESSAGE as h, PopoverContent as ha, getAtPath as hi, evaluateVisibility as hn, assertNever$10 as ho, heroCtaRowFragment as hr, OfferingsPreviewWidgetProvider as ht, usePreviewDesignHistoryOrder as i, TooltipContent as ia, logger$1 as ii, isAdapterReferenceKind as in, Image as io, headingFragment as ir, ContentFieldsForm as it, openRow as j, Surface as ja, buttonStyleSelectionParameterValue as ji, createCustomBlockRegistry as jn, surfaceResolutionContextFromTheme as jr, RichTextWidgetProvider as jt, markApplySaved as k, CollapsibleContent as ka, makeBoundaryId as ki, ThemeScope as kn, getCuratedSiteStyle as kr, useRichTextImagePicker as kt, deriveSiteStylePreviewUpdate as l, SelectTrigger as la, RichText as li, PaletteProvider as ln, ChevronLeft as lo, singleButtonFragment as lr, useEntryEditorController as lt, usePreviewThemeOverlay as m, Popover as ma, SECTION_BACKGROUND_MIN_SOURCE_WIDTH as mi, FormRenderer as mn, unsafeAsEditorBlockValues as mo, ctaCopyFragment as mr, OfferingsPreviewGroupOrderField as mt, useSiteChromeCustomizeOptional as n, useField as na, parseGeneratedIconSetId as ni, createSnapshotFromPageRecord as nn, Maximize2 as no, ImageResolveContextProvider as nr, PreviewInlineTextEditor as nt, selectPreviewDesignHistoryDomain as o, Select$1 as oa, inlineTextToPlainText as oi, deriveRouteMetadataPresentation as on, Eye as oo, faqAccordionFragment as or, EditableBlockProvider as ot, PreviewThemeOverlayProvider as p, SearchInput as pa, setContextResolveImageUrlContext as pi, createManifestValidation as pn, unsafeAsEditorBlockId as po, testimonialsHeadingFragment as pr, SiteOptionWidgetProvider as pt, enqueueTransaction as q, Sparkles as qa, getFieldIntent as qi, getDefaultComponentRegistry as qn, parseBackgroundAppearanceColorToken as qr, createHistoryState as qt, PreviewDesignHistoryOrderProvider as r, Tooltip as ra, renderInlineText as ri, BUILT_IN_REFERENCE_KINDS as rn, LoaderCircle as ro, richTextFragment as rr, PreviewTextEditor as rt, buildApplySiteStyleSelectionBody as s, SelectContent as sa, isInlineTextEmpty as si, resolvePageRouteSlug as sn, EllipsisVertical as so, faqHeadingFragment as sr, EntryControllerProvider as st, SiteChromeCustomizeProvider as t, FieldFrame as ta, parseGeneratedIconAssetId as ti, createRoutingHelpers as tn, Monitor as to, clientComponentRegistry as tr, PreviewRichTextEditor as tt, planConfiguratorPreview as u, SelectValue as ua, buildResolveImageUrlContext as ui, usePalette as un, ChevronDown as uo, formEmbedFragment as ur, createSiteOptionApiLoader as ut, buildSiteChromeSelectionModels as v, Tabs as va, calendarWindowQuerySchema as vi, applyPageDesignEditorAction as vn, parseSiteId as vo, bodyCopyFragment as vr, MailingListTargetingProvider as vt, createStyleConfiguratorState as w, DialogDescription as wa, corners as wi, AMBIENT_BACKGROUND_ROLES as wn, formatSiteChromeBackgroundTokenLabel as wr, ButtonWidgetProvider as wt, applyResolvedSelections as x, TabsTrigger as xa, bookingConsentCarrierSchema as xi, decodePublicProductCategorySelectorQuery as xn, compileEditorModelRuntime as xr, EntryPickerField as xt, cycleSiteChromeSelectionId as y, TabsContent as ya, eventCalendarListLayoutCompatibleDisplayModeValues as yi, getPageDesignEditorState as yn, __exportAll as yo, defineFragment as yr, InlineTextField as yt, resetTypographyToSaved as z, Button$1 as za, themeButtonClassName as zi, resolveVariantKey as zn, parseGradientPresetId as zr, stripTopLevelRoutingUi as zt };
231857
+ export { FooterComposerPanel as $, Pencil as $a, mapCurrentValueForSelect as $i, coerceLinkedContentEntriesPayload as $n, runTransforms as $r, useMultiAutosave as $t, markApplySaving as A, CollapsibleContent as Aa, buttonStyleHoverPreferenceValue as Ai, containerResponsiveThemeCss as An, compileTransitionRuntime as Ar, RichTextField as At, setPaletteColors as B, Button$1 as Ba, parseThemeForPersistence as Bi, compileManifestContentContract as Bn, curatedPalettes as Br, getBlockManifestFromSdkConfig as Bt, cancelPreview as C, Dialog as Ca, isRecord$17 as Ci, deriveLaunchReadiness as Cn, retargetCompiledRuntimeFieldsForContentAdjacency as Cr, ButtonVariantField as Ct, isPreviewingChange as D, DialogHeader as Da, asDesignBlockId as Di, useApiMediaUploader as Dn, curatedSiteStyles as Dr, ReferenceField as Dt, dismissWarnings as E, DialogFooter as Ea, pageDesignEditorBackgroundOverrideOwner as Ei, useMediaEditorOptional as En, componentRuntimeRulesForTheme as Er, MediaField as Et, previewFooterLook as F, DropdownMenuItem as Fa, updateButtonStyleSelectionChoice as Fi, SITE_CHROME_VISIBLE_HEADER_SELECTOR as Fn, gradientToCss as Fr, LinkWidgetProvider as Ft, confirmAutosaveBatch as G, Undo2 as Ga, paletteModeSchema as Gi, escapeStyleContent as Gn, backgroundAppearanceColorTokenNames as Gr, canRedoHistory as Gt, syncStyleConfiguratorState as H, cn$2 as Ha, VARIANT_ROLES as Hi, buildThemeRuntime as Hn, sectionTransitionFamilies as Hr, useEditorUiStore as Ht, previewHeaderLayout as I, DropdownMenuLabel as Ia, buttonStyleSelectionKey as Ii, SITE_OVERLAY_HEADER_CLEARANCE_CSS_VAR as In, GRADIENT_PRESETS as Ir, BlockEditor as It, idleEditorTransactionQueueState as J, Sparkles as Ja, getFieldIntent as Ji, defaultTransforms as Jn, ctaButton as Jr, pushHistoryEntry as Jt, deriveTransactionCapabilities as K, TriangleAlert as Ka, resolveSdkFooterMode as Ki, readBlockComposition as Kn, backgroundAppearanceQuickColorTokenNames as Kr, canUndoHistory as Kt, previewHeaderStyle as L, DropdownMenuSeparator as La, textColorStyle as Li, planSiteOverlayHeaderClearance as Ln, GRADIENT_PRESET_IDS as Lr, hideThemeV2RawStyleFields as Lt, palettePreviewProjection as M, Surface as Ma, findButtonStyleRecipe as Mi, makeDefaultBlockComponent as Mn, findFooterLook as Mr, EditorProvider as Mt, previewButtonStyle as N, DropdownMenu as Na, resolveButtonStyleSelection as Ni, getBlockDefinition as Nn, getHeaderLayout as Nr, useEditor$1 as Nt, markApplyFailed as O, DialogTitle as Oa, assertNever$7 as Oi, isSupportedLoaderEndpoint as On, designRuntimeRulesForTheme as Or, ReferenceWidgetProvider as Ot, previewCuratedPalette as P, DropdownMenuContent as Pa, updateButtonStyleHoverPreference as Pi, projectRecurringSchedule as Pn, getHeaderStyle as Pr, LinkField as Pt, resolvePreviewSidebarTab as Q, Redo2 as Qa, hasEmptyOption as Qi, LINKED_CONTENT_ENTRY_META_KEY as Qn, parseBackgroundContent as Qr, recordsEqual as Qt, previewSiteStyle as R, DropdownMenuTrigger as Ra, defaultThemeTokens as Ri, visibleHeaderClearancePx as Rn, getGradientPreset as Rr, prepareBlockEditorManifest as Rt, applyTypographyDraftPatch as S, TabsTrigger as Sa, isObjectRecord$1 as Si, DEFAULT_LAUNCH_READINESS_INPUT as Sn, retargetCompiledBoundaryRuntimeForContentAdjacency as Sr, EntryPickerWidgetProvider as St, deriveStyleConfiguratorCapabilities as T, DialogDescription as Ta, isThemeV2NormalEditorRawStyleFieldName as Ti, MediaEditorContextProvider as Tn, planPageDesignLayoutLookCompatibility as Tr, FileField as Tt, toggleRow as U, X as Ua, paletteColorEntries as Ui, DEFAULT_THEME_RESPONSIVE_MODE as Un, sectionTransitionFamilyForBoundaryOptionId as Ur, useEditorUiStoreInstance as Ut, styleConfiguratorHistoryEntryForPersistedSelection as V, cva as Va, ORDINARY_TEXT_MIN_CONTRAST_RATIO as Vi, validateManifestDraft as Vn, defaultSectionTransitionVariantForFamily as Vr, classifyHistoryShortcut as Vt, beginAutosaveBatch as W, Upload as Wa, paletteColorsSchema as Wi, getResponsiveScopeSpec as Wn, sectionTransitionVariantForBoundaryOptionId as Wr, useOptionalEditorUiStoreInstance as Wt, resolveStyleConfiguratorInitialSnapshot as X, SlidersHorizontal as Xa, SdkConfigProvider as Xi, resolvePageRouteTarget as Xn, EDITABLE_SURFACE_FORWARDING_PROP as Xr, undoHistory as Xt, rejectAutosaveBatch as Y, Smartphone as Ya, isHeaderField as Yi, resolveEntryRouteTarget as Yn, bindingSchema as Yr, redoHistory as Yt, createOptimisticActionRunner as Z, RotateCcw as Za, useSdkConfig as Zi, resolveRouteTarget as Zn, planSiteChromePlacement as Zr, unsafeAsLinkedContentEntryId as Zt, reportPreviewDesignError as _, PopoverTrigger as _a, BlockApiProvider as _i, MediaEditor as _n, expectParsedBrandedId as _o, heroCopyFragment as _r, loadMailingListAuthoringContext as _t, previewDesignHistoryDomainForCommand as a, TooltipContent as aa, coerceInlineTextWithFallback as ai, parseReferenceKind as an, Image as ao, cardFragment as ar, useUISelector as at, planSiteChromeSelection as b, TabsContent as ba, eventCalendarListLayoutOptions as bi, listEntryPageContentSlots as bn, __exportAll as bo, applyCompiledRuntimeFieldsToContent as br, IconPickerField as bt, selectionSnapshotFromApplySiteStyleSelectionResponse as c, SelectContent as ca, Text$2 as ci, resolveContentTitle as cn, EllipsisVertical as co, blogFeaturedPostFragment as cr, useEntryController as ct, PreviewDesignCoordinatorProvider as d, SelectValue as da, getCurrentResolveImageUrlContext as di, ManifestForm as dn, ChevronDown as do, formCopyFragment as dr, createSiteOptionWidgetAdapters as dt, mapOptionValueForSelect as ea, parseBlockIconValue as ei, useDebouncedLatestSave as en, PenLine as eo, getLinkedContentEntryMeta as er, renderSiteChromeBlock as et, usePreviewDesignCoordinator as f, Callout as fa, resolveImageUrlWithContext as fi, createManifestFormAdapter as fn, Check as fo, testimonialsCarouselFragment as fr, SiteOptionPickerField as ft, PREVIEW_DESIGN_SAVE_ERROR_MESSAGE as g, PopoverContent as ga, siblingPath$1 as gi, createStoreBackend as gn, assertNever$10 as go, ctaRowFragment as gr, MailingListTargetingField as gt, PREVIEW_DESIGN_LOAD_ERROR_MESSAGE as h, Popover as ha, getAtPath as hi, evaluateVisibility as hn, unsafeAsEditorBlockValues as ho, heroCtaRowFragment as hr, OfferingsPreviewWidgetProvider as ht, usePreviewDesignHistoryOrder as i, Tooltip as ia, logger$1 as ii, isAdapterReferenceKind as in, LoaderCircle as io, headingFragment as ir, ContentFieldsForm as it, openRow as j, CollapsibleTrigger as ja, buttonStyleSelectionParameterValue as ji, createCustomBlockRegistry as jn, surfaceResolutionContextFromTheme as jr, RichTextWidgetProvider as jt, markApplySaved as k, Collapsible as ka, makeBoundaryId as ki, ThemeScope as kn, getCuratedSiteStyle as kr, useRichTextImagePicker as kt, deriveSiteStylePreviewUpdate as l, SelectItem as la, RichText as li, PaletteProvider as ln, ChevronRight as lo, singleButtonFragment as lr, useEntryEditorController as lt, usePreviewThemeOverlay as m, SearchInput as ma, SECTION_BACKGROUND_MIN_SOURCE_WIDTH as mi, FormRenderer as mn, unsafeAsEditorBlockId as mo, ctaCopyFragment as mr, OfferingsPreviewGroupOrderField as mt, useSiteChromeCustomizeOptional as n, FieldFrame as na, parseGeneratedIconSetId as ni, createSnapshotFromPageRecord as nn, Monitor as no, ImageResolveContextProvider as nr, PreviewInlineTextEditor as nt, selectPreviewDesignHistoryDomain as o, TooltipTrigger as oa, inlineTextToPlainText as oi, deriveRouteMetadataPresentation as on, GripVertical as oo, faqAccordionFragment as or, EditableBlockProvider as ot, PreviewThemeOverlayProvider as p, CalloutDescription as pa, setContextResolveImageUrlContext as pi, createManifestValidation as pn, parseFooterModuleId as po, testimonialsHeadingFragment as pr, SiteOptionWidgetProvider as pt, enqueueTransaction as q, Tablet as qa, attachRenderableMediaAssetFields as qi, getDefaultComponentRegistry as qn, parseBackgroundAppearanceColorToken as qr, createHistoryState as qt, PreviewDesignHistoryOrderProvider as r, useField as ra, renderInlineText as ri, BUILT_IN_REFERENCE_KINDS as rn, Maximize2 as ro, richTextFragment as rr, PreviewTextEditor as rt, buildApplySiteStyleSelectionBody as s, Select$1 as sa, isInlineTextEmpty as si, resolvePageRouteSlug as sn, Eye as so, faqHeadingFragment as sr, EntryControllerProvider as st, SiteChromeCustomizeProvider as t, unmapValueFromSelect as ta, parseGeneratedIconAssetId as ti, createRoutingHelpers as tn, Palette as to, clientComponentRegistry as tr, PreviewRichTextEditor as tt, planConfiguratorPreview as u, SelectTrigger as ua, buildResolveImageUrlContext as ui, usePalette as un, ChevronLeft as uo, formEmbedFragment as ur, createSiteOptionApiLoader as ut, buildSiteChromeSelectionModels as v, Input as va, calendarWindowQuerySchema as vi, applyPageDesignEditorAction as vn, parseMediaAssetId as vo, bodyCopyFragment as vr, MailingListTargetingProvider as vt, createStyleConfiguratorState as w, DialogContent as wa, corners as wi, AMBIENT_BACKGROUND_ROLES as wn, formatSiteChromeBackgroundTokenLabel as wr, ButtonWidgetProvider as wt, applyResolvedSelections as x, TabsList as xa, bookingConsentCarrierSchema as xi, decodePublicProductCategorySelectorQuery as xn, compileEditorModelRuntime as xr, EntryPickerField as xt, cycleSiteChromeSelectionId as y, Tabs as ya, eventCalendarListLayoutCompatibleDisplayModeValues as yi, getPageDesignEditorState as yn, parseSiteId as yo, defineFragment as yr, InlineTextField as yt, resetTypographyToSaved as z, Primitive as za, themeButtonClassName as zi, resolveVariantKey as zn, parseGradientPresetId as zr, stripTopLevelRoutingUi as zt };