@riverbankcms/sdk 0.124.0 → 0.125.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 (69) hide show
  1. package/dist/{PreviewEditorSidebar-DBmAJJkQ.mjs → PreviewEditorSidebar-BezDOtQ7.mjs} +3 -3
  2. package/dist/{PreviewEditorUI-CfGaz9cY.mjs → PreviewEditorUI-CgSqmfo2.mjs} +2 -2
  3. package/dist/{SdkPreviewModeRuntime-BW9Z8j8T.mjs → SdkPreviewModeRuntime-Co3AHfj0.mjs} +14 -6
  4. package/dist/{SiteChromeCustomizeContext-2z8moxYf.mjs → SiteChromeCustomizeContext-BHF-KANn.mjs} +82 -78
  5. package/dist/_dts/api/src/accessAdmin.d.ts +2 -14
  6. package/dist/_dts/api/src/siteAccessAdmin.d.ts +23 -0
  7. package/dist/_dts/billing/src/plans/types.d.ts +24 -5
  8. package/dist/_dts/blocks/src/contracts/non-block-islands.d.ts +4 -0
  9. package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +2 -0
  10. package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +1 -0
  11. package/dist/_dts/blocks/src/system/runtime/nodes/event-details/logic.d.ts +2 -0
  12. package/dist/_dts/blocks/src/system/runtime/nodes/event-details.client.d.ts +3 -1
  13. package/dist/_dts/blocks/src/system/runtime/nodes/event-details.server.d.ts +2 -1
  14. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +149 -0
  15. package/dist/_dts/sdk/src/version.d.ts +1 -1
  16. package/dist/cli/index.mjs +20 -4
  17. package/dist/client/{DiscountCodeDisclosure-DxvjKvck.mjs → DiscountCodeDisclosure-CyPpekBp.mjs} +1 -1
  18. package/dist/client/{EventCombined.client-BydMGc4c.mjs → EventCombined.client-zywit-60.mjs} +2 -2
  19. package/dist/client/{EventListing.client-vpzhhysN.mjs → EventListing.client-J2nLhkKT.mjs} +2 -2
  20. package/dist/client/{LeafletStaticMap-CB07rpf8.mjs → LeafletStaticMap-CSubXWt6.mjs} +1 -1
  21. package/dist/client/{MagicLinkForm-BzyRJ8VF.mjs → MagicLinkForm-DDLIfiq9.mjs} +1 -1
  22. package/dist/client/{StepIndicator-CTcGf8Be.mjs → StepIndicator-DE8EvHIp.mjs} +2 -2
  23. package/dist/client/{accordion-B-DUDLRD.mjs → accordion-Ct5T5NiA.mjs} +1 -1
  24. package/dist/client/{bookingForm-DSbClLcZ.mjs → bookingForm-DMxtLPxw.mjs} +5 -5
  25. package/dist/client/{carousel-B6Ccdx8M.mjs → carousel--FMqgvob.mjs} +1 -1
  26. package/dist/client/{cart-BZh8G8wM.mjs → cart-BKX1bWiU.mjs} +3 -3
  27. package/dist/client/{checkout-o6zaC-kM.mjs → checkout-B_jxi4WW.mjs} +3 -3
  28. package/dist/client/client.mjs +20 -4
  29. package/dist/client/{courseRegistration-Cf11pNDs.mjs → courseRegistration-DH4MlkRD.mjs} +6 -6
  30. package/dist/client/{eventCalendar-BeXrdsSE.mjs → eventCalendar-BQILwAcL.mjs} +4 -4
  31. package/dist/client/{eventCombined-DA76PZgG.mjs → eventCombined-DFFW_Vmo.mjs} +2 -2
  32. package/dist/client/{eventDetails-BLxg0rok.mjs → eventDetails-B045CTSJ.mjs} +10 -5
  33. package/dist/client/{eventListing-tO9LheBX.mjs → eventListing-BDMYNVzS.mjs} +2 -2
  34. package/dist/client/{eventRegistration-Cnene9D9.mjs → eventRegistration-CQ2-BSnB.mjs} +6 -6
  35. package/dist/client/{form-DZf72CHB.mjs → form-DJKuyZgN.mjs} +1 -1
  36. package/dist/client/{headerSection-Hioja5Cr.mjs → headerSection-DeTjfiDo.mjs} +2 -2
  37. package/dist/client/hooks.mjs +4 -0
  38. package/dist/client/{locationMap-DwhUXEix.mjs → locationMap-i2wDA8gB.mjs} +2 -2
  39. package/dist/client/{newsletterForm-C350bEQf.mjs → newsletterForm-DKiueauk.mjs} +1 -1
  40. package/dist/client/{pricing-BYWN_ATa.mjs → pricing-C01J3Epx.mjs} +1 -1
  41. package/dist/client/{productDetail-CCqCyXgU.mjs → productDetail-Dfc1sZaX.mjs} +3 -3
  42. package/dist/client/{productList-BAiNJrOU.mjs → productList-BXbvXWTF.mjs} +3 -3
  43. package/dist/client/{propsDecoder-DeunRj6m.mjs → propsDecoder-CIR5DQ1l.mjs} +5 -0
  44. package/dist/client/rendering/client.mjs +103 -87
  45. package/dist/client/rendering/islands.mjs +18 -18
  46. package/dist/client/rendering.mjs +103 -87
  47. package/dist/client/{shop-DUmCdBtw.mjs → shop-BbNwPKM-.mjs} +5 -5
  48. package/dist/client/{shop-commerce-CY27mEUr.mjs → shop-commerce-XO-XMFEt.mjs} +4 -4
  49. package/dist/client/{shop-commerce-store-ChXPbWfa.mjs → shop-commerce-store-Byh6OUGK.mjs} +1 -1
  50. package/dist/client/{shopShared-q0kin1cv.mjs → shopShared-Bbq39mwr.mjs} +2 -2
  51. package/dist/client/{useDiscountCodeUi-I-92-x2V.mjs → useDiscountCodeUi-Bcyh4508.mjs} +1 -1
  52. package/dist/client/{useEventFilters-DlcVluZh.mjs → useEventFilters-C8OOJ3el.mjs} +2 -2
  53. package/dist/client/{usePolling-Bz7GFV_a.mjs → usePolling-CyJVo9kF.mjs} +2 -2
  54. package/dist/preview-next/client/runtime.mjs +3 -3
  55. package/dist/{sdk-runtime-OnPM8Z69.mjs → sdk-runtime-BGhyuE-E.mjs} +1 -1
  56. package/dist/{separator-CPtfzHqA.mjs → separator-BFs-Kmv5.mjs} +1 -1
  57. package/dist/server/components.mjs +12 -2
  58. package/dist/server/config-validation.mjs +4 -0
  59. package/dist/server/config.mjs +4 -0
  60. package/dist/server/data.mjs +4 -0
  61. package/dist/server/index.mjs +1 -1
  62. package/dist/server/next.mjs +13 -3
  63. package/dist/server/page-converter.mjs +4 -0
  64. package/dist/server/prebuild.mjs +1 -1
  65. package/dist/server/rendering/server.mjs +12 -2
  66. package/dist/server/rendering.mjs +12 -2
  67. package/dist/server/routing.mjs +4 -0
  68. package/dist/server/server.mjs +5 -1
  69. package/package.json +1 -1
@@ -1,8 +1,8 @@
1
- import { t as defineIslandPropsDecoder } from "./propsDecoder-DeunRj6m.mjs";
1
+ import { t as defineIslandPropsDecoder } from "./propsDecoder-CIR5DQ1l.mjs";
2
2
  import { t as BlockApiProvider } from "./context-CJz1Vlsz.mjs";
3
3
  import { t as mountReactIsland } from "./reactMount-SY8AVRof.mjs";
4
4
  import { t as buildRouteIslandApiConfig } from "./routeIslandApiConfig-UNsfPcYq.mjs";
5
- import { t as EventListingClient } from "./EventListing.client-vpzhhysN.mjs";
5
+ import { t as EventListingClient } from "./EventListing.client-J2nLhkKT.mjs";
6
6
  import "react";
7
7
  import { jsx } from "react/jsx-runtime";
8
8
  //#region src/rendering/islands/enhancers/eventListing.tsx
@@ -1,16 +1,16 @@
1
1
  "use client";
2
- import { n as buildBookingPaymentSelectionViewModel, t as usePolling } from "./usePolling-Bz7GFV_a.mjs";
3
- import { At as formatBookingTime, Bt as publicEventPricingMode, C as getWizardStepsForContext, Dt as formatBookingDate, Ft as toBookingTimeZone, H as resolveRuntimeEventPricing, Ht as publicEventScalarPrice, It as toScheduledBookingDateTime, Ot as formatBookingDateTime, P as formatEventPriceDisplay, S as getStepNumber, Ut as publicEventTicketTypes, Vt as publicEventPricingType, Wt as formatCurrencyAmount, X as themeButtonClassName, Y as resolveEventRegistrationScopedEvents, _ as findPreSelectedEvent, b as resolveRegistrationTarget, g as findEventByOccurrenceId, h as toRegistrationEvents, t as defineIslandPropsDecoder, v as resolveDiscountContext, x as WIZARD_STEPS, y as resolveEventRequiresPayment, yt as assertNever, zt as publicEventPricingCurrency } from "./propsDecoder-DeunRj6m.mjs";
2
+ import { n as buildBookingPaymentSelectionViewModel, t as usePolling } from "./usePolling-CyJVo9kF.mjs";
3
+ import { At as formatBookingTime, Bt as publicEventPricingMode, C as getWizardStepsForContext, Dt as formatBookingDate, Ft as toBookingTimeZone, H as resolveRuntimeEventPricing, Ht as publicEventScalarPrice, It as toScheduledBookingDateTime, Ot as formatBookingDateTime, P as formatEventPriceDisplay, S as getStepNumber, Ut as publicEventTicketTypes, Vt as publicEventPricingType, Wt as formatCurrencyAmount, X as themeButtonClassName, Y as resolveEventRegistrationScopedEvents, _ as findPreSelectedEvent, b as resolveRegistrationTarget, g as findEventByOccurrenceId, h as toRegistrationEvents, t as defineIslandPropsDecoder, v as resolveDiscountContext, x as WIZARD_STEPS, y as resolveEventRequiresPayment, yt as assertNever, zt as publicEventPricingCurrency } from "./propsDecoder-CIR5DQ1l.mjs";
4
4
  import { n as useBlockApi, t as BlockApiProvider } from "./context-CJz1Vlsz.mjs";
5
5
  import { n as isSpamProtectionEnabled, r as AltchaWidget, t as getChallengeUrl } from "./src-B833rYRr.mjs";
6
- import { i as CheckIcon, n as TerminalPanel, r as StateIcon, t as useDiscountCodeUi } from "./useDiscountCodeUi-I-92-x2V.mjs";
7
- import { t as DiscountCodeDisclosure } from "./DiscountCodeDisclosure-DxvjKvck.mjs";
8
- import { n as SpinnerNode, r as formatPrice, t as StepIndicator$1 } from "./StepIndicator-CTcGf8Be.mjs";
6
+ import { i as CheckIcon, n as TerminalPanel, r as StateIcon, t as useDiscountCodeUi } from "./useDiscountCodeUi-Bcyh4508.mjs";
7
+ import { t as DiscountCodeDisclosure } from "./DiscountCodeDisclosure-CyPpekBp.mjs";
8
+ import { n as SpinnerNode, r as formatPrice, t as StepIndicator$1 } from "./StepIndicator-DE8EvHIp.mjs";
9
9
  import { t as FeedbackMessage } from "./FeedbackMessage-ByMrs3cr.mjs";
10
10
  import { n as getFieldValidationControlProps, t as FieldValidationMessage } from "./FieldValidationMessage-AYanWFb-.mjs";
11
11
  import { t as createBodyThemePortalRoot } from "./themePortalRoot-AGs4cE7t.mjs";
12
12
  import { t as consumeSearchParam } from "./urlParams-D71VXFGx.mjs";
13
- import { a as ClockIcon, i as LoggedInAsUser, n as logoutPortal, r as useWaitlistClaim, t as MagicLinkForm } from "./MagicLinkForm-BzyRJ8VF.mjs";
13
+ import { a as ClockIcon, i as LoggedInAsUser, n as logoutPortal, r as useWaitlistClaim, t as MagicLinkForm } from "./MagicLinkForm-DDLIfiq9.mjs";
14
14
  import { t as CrossIcon } from "./CrossIcon-Dn1KRKW5.mjs";
15
15
  import { t as mountReactIsland } from "./reactMount-SY8AVRof.mjs";
16
16
  import { t as buildRouteIslandApiConfig } from "./routeIslandApiConfig-UNsfPcYq.mjs";
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { t as clsx } from "./clsx-DgIEfj3H.mjs";
3
- import { St as ok, X as themeButtonClassName, t as defineIslandPropsDecoder, xt as err, yt as assertNever } from "./propsDecoder-DeunRj6m.mjs";
3
+ import { St as ok, X as themeButtonClassName, t as defineIslandPropsDecoder, xt as err, yt as assertNever } from "./propsDecoder-CIR5DQ1l.mjs";
4
4
  import { n as useBlockApi, t as BlockApiProvider } from "./context-CJz1Vlsz.mjs";
5
5
  import { n as isSpamProtectionEnabled, r as AltchaWidget, t as getChallengeUrl } from "./src-B833rYRr.mjs";
6
6
  import { t as FeedbackMessage } from "./FeedbackMessage-ByMrs3cr.mjs";
@@ -1,7 +1,7 @@
1
1
  "use client";
2
- import { X as themeButtonClassName, r as buildCartDisplay, t as defineIslandPropsDecoder } from "./propsDecoder-DeunRj6m.mjs";
2
+ import { X as themeButtonClassName, r as buildCartDisplay, t as defineIslandPropsDecoder } from "./propsDecoder-CIR5DQ1l.mjs";
3
3
  import { t as resolveDedicatedCheckoutPath } from "./checkoutRoute-ClwHwYVA.mjs";
4
- import { n as useCommerceCart } from "./shop-commerce-store-ChXPbWfa.mjs";
4
+ import { n as useCommerceCart } from "./shop-commerce-store-Byh6OUGK.mjs";
5
5
  import { t as ModalShell } from "./ModalShell-CqkBvBIC.mjs";
6
6
  import * as React$1 from "react";
7
7
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
@@ -27429,6 +27429,10 @@ const eventDetailsManifest = createBlockManifest({
27429
27429
  from: "$root.occurrenceContext",
27430
27430
  fallback: null
27431
27431
  } },
27432
+ subject: { $bind: {
27433
+ from: "$root.subject",
27434
+ fallback: null
27435
+ } },
27432
27436
  events: { $bind: { from: "data.eventDetailsData.events" } },
27433
27437
  showVenue: { $bind: { from: "content.showVenue" } },
27434
27438
  showMap: { $bind: { from: "content.showMap" } },
@@ -1,7 +1,7 @@
1
1
  import { i as textColorStyle } from "./colorStyles-BWpj_h4C.mjs";
2
- import { X as themeButtonClassName, t as defineIslandPropsDecoder } from "./propsDecoder-DeunRj6m.mjs";
2
+ import { X as themeButtonClassName, t as defineIslandPropsDecoder } from "./propsDecoder-CIR5DQ1l.mjs";
3
3
  import { t as mountReactIsland } from "./reactMount-SY8AVRof.mjs";
4
- import { t as LeafletStaticMap } from "./LeafletStaticMap-CB07rpf8.mjs";
4
+ import { t as LeafletStaticMap } from "./LeafletStaticMap-CSubXWt6.mjs";
5
5
  import "react";
6
6
  import { jsx, jsxs } from "react/jsx-runtime";
7
7
  //#region ../core/src/location.ts
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { t as clsx } from "./clsx-DgIEfj3H.mjs";
3
- import { X as themeButtonClassName, t as defineIslandPropsDecoder, yt as assertNever } from "./propsDecoder-DeunRj6m.mjs";
3
+ import { X as themeButtonClassName, t as defineIslandPropsDecoder, yt as assertNever } from "./propsDecoder-CIR5DQ1l.mjs";
4
4
  import { n as useBlockApi, t as BlockApiProvider } from "./context-CJz1Vlsz.mjs";
5
5
  import { n as isSpamProtectionEnabled, r as AltchaWidget, t as getChallengeUrl } from "./src-B833rYRr.mjs";
6
6
  import { t as FeedbackMessage } from "./FeedbackMessage-ByMrs3cr.mjs";
@@ -1,4 +1,4 @@
1
- import { Rt as formatBookingPriceDisplay } from "./propsDecoder-DeunRj6m.mjs";
1
+ import { Rt as formatBookingPriceDisplay } from "./propsDecoder-CIR5DQ1l.mjs";
2
2
  //#region ../core/src/planner.ts
3
3
  /** Default clock for production callers that do not inject time explicitly. */
4
4
  const systemPlanningClock = { now: () => Date.now() };
@@ -1,6 +1,6 @@
1
- import { t as defineIslandPropsDecoder } from "./propsDecoder-DeunRj6m.mjs";
2
- import { r as ProductDetailController } from "./shop-commerce-CY27mEUr.mjs";
3
- import { t as mountShopBlockIsland } from "./shopShared-q0kin1cv.mjs";
1
+ import { t as defineIslandPropsDecoder } from "./propsDecoder-CIR5DQ1l.mjs";
2
+ import { r as ProductDetailController } from "./shop-commerce-XO-XMFEt.mjs";
3
+ import { t as mountShopBlockIsland } from "./shopShared-Bbq39mwr.mjs";
4
4
  import "react";
5
5
  import { jsx } from "react/jsx-runtime";
6
6
  //#region ../blocks/src/system/runtime/nodes/product-detail.client.tsx
@@ -1,6 +1,6 @@
1
- import { t as defineIslandPropsDecoder } from "./propsDecoder-DeunRj6m.mjs";
2
- import { i as ProductListController } from "./shop-commerce-CY27mEUr.mjs";
3
- import { t as mountShopBlockIsland } from "./shopShared-q0kin1cv.mjs";
1
+ import { t as defineIslandPropsDecoder } from "./propsDecoder-CIR5DQ1l.mjs";
2
+ import { i as ProductListController } from "./shop-commerce-XO-XMFEt.mjs";
3
+ import { t as mountShopBlockIsland } from "./shopShared-Bbq39mwr.mjs";
4
4
  import "react";
5
5
  import { jsx } from "react/jsx-runtime";
6
6
  //#region ../blocks/src/system/runtime/nodes/product-list.client.tsx
@@ -9584,6 +9584,10 @@ createBlockManifest({
9584
9584
  from: "$root.occurrenceContext",
9585
9585
  fallback: null
9586
9586
  } },
9587
+ subject: { $bind: {
9588
+ from: "$root.subject",
9589
+ fallback: null
9590
+ } },
9587
9591
  events: { $bind: { from: "data.eventDetailsData.events" } },
9588
9592
  showVenue: { $bind: { from: "content.showVenue" } },
9589
9593
  showMap: { $bind: { from: "content.showMap" } },
@@ -9686,6 +9690,7 @@ const eventDetailsOccurrenceContextSchema = z$1.object({
9686
9690
  });
9687
9691
  const eventDetailsIslandSchema = z$1.object({
9688
9692
  occurrenceContext: eventDetailsOccurrenceContextSchema.nullable().optional(),
9693
+ subject: eventRegistrationPageSurfaceSubjectSchema.nullable().optional(),
9689
9694
  events: z$1.array(publicEventSchema).nullable().optional(),
9690
9695
  showVenue: z$1.boolean().optional(),
9691
9696
  showMap: z$1.boolean().optional(),
@@ -12811,6 +12811,90 @@ function BookingFormSSR({ blockId, siteId, apiBaseUrl, portalToken, formId, serv
12811
12811
  });
12812
12812
  }
12813
12813
  //#endregion
12814
+ //#region ../blocks/src/system/runtime/nodes/event-registration/eventScope.ts
12815
+ function parseEventRegistrationPageSurfaceSubject(value) {
12816
+ return parseEventPageSurfaceSubject(value);
12817
+ }
12818
+ function normalizeEventRegistrationPageSurfaceSubject(value) {
12819
+ const parsed = parseEventRegistrationPageSurfaceSubject(value);
12820
+ if (parsed.ok) return parsed.value;
12821
+ switch (parsed.error.kind) {
12822
+ case "notObject": return null;
12823
+ case "unsupportedSubject": return {
12824
+ kind: "unsupported",
12825
+ reason: "unsupportedSubject"
12826
+ };
12827
+ case "invalidEventSeriesId": return {
12828
+ kind: "unsupported",
12829
+ reason: "invalidEventSeriesId"
12830
+ };
12831
+ case "invalidEventOfferingId": return {
12832
+ kind: "unsupported",
12833
+ reason: "invalidEventOfferingId"
12834
+ };
12835
+ }
12836
+ }
12837
+ function resolveEventRegistrationScope(context) {
12838
+ const occurrenceSeriesId = context.occurrenceContext?.seriesId;
12839
+ if (occurrenceSeriesId) return {
12840
+ kind: "occurrenceSeries",
12841
+ seriesId: occurrenceSeriesId
12842
+ };
12843
+ if (context.subject?.kind === "eventSeries") return {
12844
+ kind: "pageSurfaceSeries",
12845
+ seriesId: context.subject.eventSeriesId
12846
+ };
12847
+ if (context.subject?.kind === "eventOffering") return {
12848
+ kind: "pageSurfaceOffering",
12849
+ offeringId: context.subject.eventOfferingId,
12850
+ seriesIds: context.subject.availableEventSeriesIds
12851
+ };
12852
+ if (context.subject?.kind === "unsupported") return {
12853
+ kind: "unsupportedPageSurfaceSubject",
12854
+ reason: context.subject.reason
12855
+ };
12856
+ return { kind: "unscoped" };
12857
+ }
12858
+ function applyEventRegistrationScope(events, scope) {
12859
+ switch (scope.kind) {
12860
+ case "occurrenceSeries":
12861
+ case "pageSurfaceSeries": return events.filter((event) => event.seriesId === scope.seriesId);
12862
+ case "pageSurfaceOffering": {
12863
+ const seriesIds = new Set(scope.seriesIds);
12864
+ return events.filter((event) => seriesIds.has(event.seriesId));
12865
+ }
12866
+ case "unsupportedPageSurfaceSubject": return [];
12867
+ case "unscoped": return [...events];
12868
+ }
12869
+ }
12870
+ function resolveEventRegistrationScopedEvents(events, context) {
12871
+ return applyEventRegistrationScope(events, resolveEventRegistrationScope(context));
12872
+ }
12873
+ var unsupportedEventRegistrationPageSurfaceSubjectReasons, unsupportedEventRegistrationPageSurfaceSubjectSchema, eventRegistrationPageSurfaceSubjectSchema;
12874
+ var init_eventScope = __esmMin((() => {
12875
+ init_src$3();
12876
+ unsupportedEventRegistrationPageSurfaceSubjectReasons = [
12877
+ "unsupportedSubject",
12878
+ "invalidEventSeriesId",
12879
+ "invalidEventOfferingId"
12880
+ ];
12881
+ unsupportedEventRegistrationPageSurfaceSubjectSchema = z$1.object({
12882
+ kind: z$1.literal("unsupported"),
12883
+ reason: z$1.enum(unsupportedEventRegistrationPageSurfaceSubjectReasons)
12884
+ });
12885
+ eventRegistrationPageSurfaceSubjectSchema = z$1.unknown().transform((value, ctx) => {
12886
+ const unsupported = unsupportedEventRegistrationPageSurfaceSubjectSchema.safeParse(value);
12887
+ if (unsupported.success) return unsupported.data;
12888
+ const parsed = parseEventPageSurfaceSubject(value);
12889
+ if (parsed.ok) return parsed.value;
12890
+ ctx.addIssue({
12891
+ code: z$1.ZodIssueCode.custom,
12892
+ message: `Invalid event page-surface subject (${parsed.error.kind})`
12893
+ });
12894
+ return z$1.NEVER;
12895
+ });
12896
+ }));
12897
+ //#endregion
12814
12898
  //#region ../blocks/src/system/runtime/nodes/events/shared/eventProductEligibility.ts
12815
12899
  function isCategoryEligible(eligibleCategoryIds, eventCategoryId) {
12816
12900
  const categories = eligibleCategoryIds ?? [];
@@ -12884,7 +12968,10 @@ function uniqByOccurrenceId(events) {
12884
12968
  return out;
12885
12969
  }
12886
12970
  function selectEventDetails(args) {
12887
- const all = uniqByOccurrenceId((args.events ?? []).filter(Boolean));
12971
+ const all = uniqByOccurrenceId(resolveEventRegistrationScopedEvents((args.events ?? []).filter(Boolean), {
12972
+ occurrenceContext: args.occurrenceContext,
12973
+ subject: args.subject
12974
+ }));
12888
12975
  const occurrenceContext = args.occurrenceContext ?? null;
12889
12976
  const otherLimit = parseLimit$1(args.otherDatesLimit, 5);
12890
12977
  const selectedFromContext = (() => {
@@ -12923,6 +13010,7 @@ function selectEventDetails(args) {
12923
13010
  }
12924
13011
  var init_logic = __esmMin((() => {
12925
13012
  init_src$3();
13013
+ init_eventScope();
12926
13014
  init_eventProductEligibility();
12927
13015
  }));
12928
13016
  //#endregion
@@ -14460,11 +14548,14 @@ var init_view$2 = __esmMin((() => {
14460
14548
  //#region ../blocks/src/system/runtime/nodes/event-details.server.tsx
14461
14549
  init_logic();
14462
14550
  init_view$2();
14463
- function EventDetailsSSR({ blockId, occurrenceContext, events, showVenue = true, showMap = true, showOtherDates = true, otherDatesLimit, showCost = true, showAcceptedPasses = true, showAcceptedMemberships = true, sitePasses, siteMemberships, autoApplyDiscount, className, children }) {
14551
+ init_eventScope();
14552
+ function EventDetailsSSR({ blockId, occurrenceContext, subject, events, showVenue = true, showMap = true, showOtherDates = true, otherDatesLimit, showCost = true, showAcceptedPasses = true, showAcceptedMemberships = true, sitePasses, siteMemberships, autoApplyDiscount, className, children }) {
14464
14553
  const nowIso = (/* @__PURE__ */ new Date()).toISOString();
14554
+ const normalizedSubject = normalizeEventRegistrationPageSurfaceSubject(subject);
14465
14555
  const selection = selectEventDetails({
14466
14556
  events: events ?? null,
14467
14557
  occurrenceContext: occurrenceContext ?? null,
14558
+ subject: normalizedSubject,
14468
14559
  nowIso,
14469
14560
  otherDatesLimit
14470
14561
  });
@@ -14479,6 +14570,7 @@ function EventDetailsSSR({ blockId, occurrenceContext, events, showVenue = true,
14479
14570
  children: [
14480
14571
  /* @__PURE__ */ jsx(IslandPropsScript, { value: {
14481
14572
  occurrenceContext,
14573
+ subject: normalizedSubject,
14482
14574
  events,
14483
14575
  showVenue,
14484
14576
  showMap,
@@ -32500,90 +32592,6 @@ const checkoutBlockDefinition = {
32500
32592
  runtime: checkoutBlockRuntime
32501
32593
  };
32502
32594
  //#endregion
32503
- //#region ../blocks/src/system/runtime/nodes/event-registration/eventScope.ts
32504
- function parseEventRegistrationPageSurfaceSubject(value) {
32505
- return parseEventPageSurfaceSubject(value);
32506
- }
32507
- function normalizeEventRegistrationPageSurfaceSubject(value) {
32508
- const parsed = parseEventRegistrationPageSurfaceSubject(value);
32509
- if (parsed.ok) return parsed.value;
32510
- switch (parsed.error.kind) {
32511
- case "notObject": return null;
32512
- case "unsupportedSubject": return {
32513
- kind: "unsupported",
32514
- reason: "unsupportedSubject"
32515
- };
32516
- case "invalidEventSeriesId": return {
32517
- kind: "unsupported",
32518
- reason: "invalidEventSeriesId"
32519
- };
32520
- case "invalidEventOfferingId": return {
32521
- kind: "unsupported",
32522
- reason: "invalidEventOfferingId"
32523
- };
32524
- }
32525
- }
32526
- function resolveEventRegistrationScope(context) {
32527
- const occurrenceSeriesId = context.occurrenceContext?.seriesId;
32528
- if (occurrenceSeriesId) return {
32529
- kind: "occurrenceSeries",
32530
- seriesId: occurrenceSeriesId
32531
- };
32532
- if (context.subject?.kind === "eventSeries") return {
32533
- kind: "pageSurfaceSeries",
32534
- seriesId: context.subject.eventSeriesId
32535
- };
32536
- if (context.subject?.kind === "eventOffering") return {
32537
- kind: "pageSurfaceOffering",
32538
- offeringId: context.subject.eventOfferingId,
32539
- seriesIds: context.subject.availableEventSeriesIds
32540
- };
32541
- if (context.subject?.kind === "unsupported") return {
32542
- kind: "unsupportedPageSurfaceSubject",
32543
- reason: context.subject.reason
32544
- };
32545
- return { kind: "unscoped" };
32546
- }
32547
- function applyEventRegistrationScope(events, scope) {
32548
- switch (scope.kind) {
32549
- case "occurrenceSeries":
32550
- case "pageSurfaceSeries": return events.filter((event) => event.seriesId === scope.seriesId);
32551
- case "pageSurfaceOffering": {
32552
- const seriesIds = new Set(scope.seriesIds);
32553
- return events.filter((event) => seriesIds.has(event.seriesId));
32554
- }
32555
- case "unsupportedPageSurfaceSubject": return [];
32556
- case "unscoped": return [...events];
32557
- }
32558
- }
32559
- function resolveEventRegistrationScopedEvents(events, context) {
32560
- return applyEventRegistrationScope(events, resolveEventRegistrationScope(context));
32561
- }
32562
- var unsupportedEventRegistrationPageSurfaceSubjectReasons, unsupportedEventRegistrationPageSurfaceSubjectSchema, eventRegistrationPageSurfaceSubjectSchema;
32563
- var init_eventScope = __esmMin((() => {
32564
- init_src$3();
32565
- unsupportedEventRegistrationPageSurfaceSubjectReasons = [
32566
- "unsupportedSubject",
32567
- "invalidEventSeriesId",
32568
- "invalidEventOfferingId"
32569
- ];
32570
- unsupportedEventRegistrationPageSurfaceSubjectSchema = z$1.object({
32571
- kind: z$1.literal("unsupported"),
32572
- reason: z$1.enum(unsupportedEventRegistrationPageSurfaceSubjectReasons)
32573
- });
32574
- eventRegistrationPageSurfaceSubjectSchema = z$1.unknown().transform((value, ctx) => {
32575
- const unsupported = unsupportedEventRegistrationPageSurfaceSubjectSchema.safeParse(value);
32576
- if (unsupported.success) return unsupported.data;
32577
- const parsed = parseEventPageSurfaceSubject(value);
32578
- if (parsed.ok) return parsed.value;
32579
- ctx.addIssue({
32580
- code: z$1.ZodIssueCode.custom,
32581
- message: `Invalid event page-surface subject (${parsed.error.kind})`
32582
- });
32583
- return z$1.NEVER;
32584
- });
32585
- }));
32586
- //#endregion
32587
32595
  //#region ../blocks/src/system/runtime/nodes/course-registration.interactive.ts
32588
32596
  function buildCourseRegistrationDisplay(source) {
32589
32597
  return {
@@ -106429,6 +106437,7 @@ var init_LeafletStaticMap = __esmMin((() => {
106429
106437
  function toEventDetailsClientProps(props) {
106430
106438
  return {
106431
106439
  occurrenceContext: props.occurrenceContext,
106440
+ subject: props.subject,
106432
106441
  events: props.events ? [...props.events] : props.events,
106433
106442
  showVenue: props.showVenue,
106434
106443
  showMap: props.showMap,
@@ -106444,10 +106453,11 @@ function toEventDetailsClientProps(props) {
106444
106453
  nowIso: props.nowIso
106445
106454
  };
106446
106455
  }
106447
- function EventDetailsClient({ occurrenceContext, events, showVenue = true, showMap = true, showOtherDates = true, otherDatesLimit, showCost = true, showAcceptedPasses = true, showAcceptedMemberships = true, sitePasses, siteMemberships, autoApplyDiscount, className, nowIso, children }) {
106456
+ function EventDetailsClient({ occurrenceContext, subject, events, showVenue = true, showMap = true, showOtherDates = true, otherDatesLimit, showCost = true, showAcceptedPasses = true, showAcceptedMemberships = true, sitePasses, siteMemberships, autoApplyDiscount, className, nowIso, children }) {
106448
106457
  const selection = selectEventDetails({
106449
106458
  events: events ?? null,
106450
106459
  occurrenceContext: occurrenceContext ?? null,
106460
+ subject,
106451
106461
  nowIso: nowIso ?? (/* @__PURE__ */ new Date()).toISOString(),
106452
106462
  otherDatesLimit
106453
106463
  });
@@ -116128,6 +116138,10 @@ var init_event_details = __esmMin((() => {
116128
116138
  from: "$root.occurrenceContext",
116129
116139
  fallback: null
116130
116140
  } },
116141
+ subject: { $bind: {
116142
+ from: "$root.subject",
116143
+ fallback: null
116144
+ } },
116131
116145
  events: { $bind: { from: "data.eventDetailsData.events" } },
116132
116146
  showVenue: { $bind: { from: "content.showVenue" } },
116133
116147
  showMap: { $bind: { from: "content.showMap" } },
@@ -116196,6 +116210,7 @@ var init_non_block_islands = __esmMin((() => {
116196
116210
  init_shop_shared();
116197
116211
  init_schemas();
116198
116212
  init_event_details();
116213
+ init_eventScope();
116199
116214
  accordionIslandSchema = z$1.object({
116200
116215
  type: z$1.enum(["single", "multiple"]).optional(),
116201
116216
  defaultValue: z$1.union([z$1.string(), z$1.array(z$1.string())]).optional(),
@@ -116237,6 +116252,7 @@ var init_non_block_islands = __esmMin((() => {
116237
116252
  });
116238
116253
  eventDetailsIslandSchema = z$1.object({
116239
116254
  occurrenceContext: eventDetailsOccurrenceContextSchema.nullable().optional(),
116255
+ subject: eventRegistrationPageSurfaceSubjectSchema.nullable().optional(),
116240
116256
  events: z$1.array(publicEventSchema).nullable().optional(),
116241
116257
  showVenue: z$1.boolean().optional(),
116242
116258
  showMap: z$1.boolean().optional(),
@@ -75,24 +75,24 @@ function isSafeHttpsUrl(value) {
75
75
  //#endregion
76
76
  //#region src/rendering/islands/hydrateBlocksIslands.ts
77
77
  const defaultEnhancerLoaders = {
78
- accordion: () => import("../accordion-B-DUDLRD.mjs"),
79
- headerSection: () => import("../headerSection-Hioja5Cr.mjs"),
80
- carousel: () => import("../carousel-B6Ccdx8M.mjs"),
81
- form: () => import("../form-DZf72CHB.mjs"),
82
- "booking-form": () => import("../bookingForm-DSbClLcZ.mjs"),
83
- "event-registration": () => import("../eventRegistration-Cnene9D9.mjs"),
84
- "event-details": () => import("../eventDetails-BLxg0rok.mjs"),
85
- "location-map": () => import("../locationMap-DwhUXEix.mjs"),
86
- "course-registration": () => import("../courseRegistration-Cf11pNDs.mjs"),
87
- "event-listing": () => import("../eventListing-tO9LheBX.mjs"),
88
- "event-calendar": () => import("../eventCalendar-BeXrdsSE.mjs"),
89
- "event-combined": () => import("../eventCombined-DA76PZgG.mjs"),
90
- "product-list": () => import("../productList-BAiNJrOU.mjs"),
91
- "product-detail": () => import("../productDetail-CCqCyXgU.mjs"),
92
- "cart": () => import("../cart-BZh8G8wM.mjs"),
93
- "checkout": () => import("../checkout-o6zaC-kM.mjs"),
94
- shop: () => import("../shop-DUmCdBtw.mjs"),
95
- "newsletter-form": () => import("../newsletterForm-C350bEQf.mjs")
78
+ accordion: () => import("../accordion-Ct5T5NiA.mjs"),
79
+ headerSection: () => import("../headerSection-DeTjfiDo.mjs"),
80
+ carousel: () => import("../carousel--FMqgvob.mjs"),
81
+ form: () => import("../form-DJKuyZgN.mjs"),
82
+ "booking-form": () => import("../bookingForm-DMxtLPxw.mjs"),
83
+ "event-registration": () => import("../eventRegistration-CQ2-BSnB.mjs"),
84
+ "event-details": () => import("../eventDetails-B045CTSJ.mjs"),
85
+ "location-map": () => import("../locationMap-i2wDA8gB.mjs"),
86
+ "course-registration": () => import("../courseRegistration-DH4MlkRD.mjs"),
87
+ "event-listing": () => import("../eventListing-BDMYNVzS.mjs"),
88
+ "event-calendar": () => import("../eventCalendar-BQILwAcL.mjs"),
89
+ "event-combined": () => import("../eventCombined-DFFW_Vmo.mjs"),
90
+ "product-list": () => import("../productList-BXbvXWTF.mjs"),
91
+ "product-detail": () => import("../productDetail-Dfc1sZaX.mjs"),
92
+ "cart": () => import("../cart-BKX1bWiU.mjs"),
93
+ "checkout": () => import("../checkout-B_jxi4WW.mjs"),
94
+ shop: () => import("../shop-BbNwPKM-.mjs"),
95
+ "newsletter-form": () => import("../newsletterForm-DKiueauk.mjs")
96
96
  };
97
97
  const DEFAULT_MAX_RETRIES = 2;
98
98
  const RETRY_DELAYS_MS = [250, 1e3];