@riverbankcms/sdk 0.90.0 → 0.91.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 (90) hide show
  1. package/dist/{PreviewEditorSidebar-KVXNF3VW.mjs → PreviewEditorSidebar-3TT47WCF.mjs} +3 -3
  2. package/dist/{PreviewEditorUI-J3JN5Z7T.mjs → PreviewEditorUI-ORCLLUNZ.mjs} +3 -3
  3. package/dist/SdkPreviewModeRuntime-GMCDQPZZ.mjs +8 -0
  4. package/dist/_dts/api/src/bookingConfig.d.ts +3 -0
  5. package/dist/_dts/api/src/event-listing-destination.d.ts +59 -0
  6. package/dist/_dts/api/src/index.d.ts +4 -0
  7. package/dist/_dts/api/src/navigation/dashboardSettingsNav.d.ts +0 -1
  8. package/dist/_dts/api/src/navigation.d.ts +2 -0
  9. package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +3 -1
  10. package/dist/_dts/api/src/settings/permissions.d.ts +273 -0
  11. package/dist/_dts/api/src/types.d.ts +1 -0
  12. package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +60 -2
  13. package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +12 -1
  14. package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +9 -9
  15. package/dist/_dts/blocks/src/system/blocks/team-members.d.ts +1 -1
  16. package/dist/_dts/blocks/src/system/manifest/fieldValidation/index.d.ts +17 -0
  17. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.contract.d.ts +5 -0
  18. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/eventPaymentOptions.d.ts +24 -0
  19. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/destination.d.ts +8 -0
  20. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/pricing.d.ts +3 -0
  21. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/utils.d.ts +7 -0
  22. package/dist/_dts/core/src/event-pricing.d.ts +12 -2
  23. package/dist/_dts/core/src/string.d.ts +12 -0
  24. package/dist/_dts/sdk/src/cli/sync/validation.d.ts +2 -2
  25. package/dist/_dts/sdk/src/public-api/contracts.d.ts +11 -1
  26. package/dist/_dts/sdk/src/rendering/islands/types.d.ts +11 -1
  27. package/dist/_dts/sdk/src/version.d.ts +1 -1
  28. package/dist/{chunk-GSPFFUVB.mjs → chunk-AFPMCLS7.mjs} +2 -2
  29. package/dist/{chunk-RQ3XZ4SJ.mjs → chunk-GDT2QGIL.mjs} +1 -1
  30. package/dist/{chunk-PMBB6MQ7.mjs → chunk-RQUZYSES.mjs} +345 -153
  31. package/dist/{chunk-AEOYWPE4.mjs → chunk-S3YHJWEU.mjs} +7 -7
  32. package/dist/{chunk-UG7I7S7W.mjs → chunk-U5YM4AWE.mjs} +1 -1
  33. package/dist/{chunk-BOQXMCSP.mjs → chunk-ZA2S7H34.mjs} +3 -3
  34. package/dist/cli/index.mjs +363 -437
  35. package/dist/cli/init-docs/content/workflow-add-block.md +48 -0
  36. package/dist/cli/init-docs/content/workflow-custom-block.md +10 -0
  37. package/dist/client/{accordion-GXQNWQ6O.mjs → accordion-AFX37652.mjs} +2 -2
  38. package/dist/client/{bookingForm-STLUJ36H.mjs → bookingForm-32V5QCOW.mjs} +6 -6
  39. package/dist/client/bookings.mjs +1170 -571
  40. package/dist/client/{carousel-CVRN6EPP.mjs → carousel-TJGQJ7ER.mjs} +3 -3
  41. package/dist/client/{cart-IYIBA5CL.mjs → cart-JUU2JEW4.mjs} +6 -6
  42. package/dist/client/{checkout-O3BGM4GS.mjs → checkout-RD6BTFX4.mjs} +6 -6
  43. package/dist/client/{chunk-DAS5CIER.mjs → chunk-6QZIBNGV.mjs} +119 -21
  44. package/dist/client/{chunk-VFHZLZAC.mjs → chunk-6RN62XBV.mjs} +1 -1
  45. package/dist/client/{chunk-D3ETC2SU.mjs → chunk-C4LP6BPG.mjs} +1 -1
  46. package/dist/client/{chunk-NBFRJ5NB.mjs → chunk-CKXEUWWA.mjs} +2 -2
  47. package/dist/client/{chunk-4RTFGHZN.mjs → chunk-E6VIWZUG.mjs} +6 -3
  48. package/dist/client/{chunk-Z62JYS5O.mjs → chunk-FMZZHAIR.mjs} +2 -2
  49. package/dist/client/{chunk-FHU6PFPM.mjs → chunk-ISAUXU5R.mjs} +1 -1
  50. package/dist/client/{chunk-HIHOQGIP.mjs → chunk-LJCX6V7Q.mjs} +9 -9
  51. package/dist/client/{chunk-6DPXDOIL.mjs → chunk-MLBNVN4H.mjs} +99 -26
  52. package/dist/client/{chunk-7DH35FGA.mjs → chunk-PMNAV6LO.mjs} +1 -1
  53. package/dist/client/{chunk-MFPKS6QS.mjs → chunk-RMOFBBNA.mjs} +5 -5
  54. package/dist/client/{chunk-25W2EQUN.mjs → chunk-RWYFG625.mjs} +17 -8
  55. package/dist/client/client.mjs +305 -113
  56. package/dist/client/{courseRegistration-2D3ACMJR.mjs → courseRegistration-X63QAIVV.mjs} +6 -6
  57. package/dist/client/{eventCalendar-QY4UZUFF.mjs → eventCalendar-5T24GCZL.mjs} +9 -9
  58. package/dist/client/{eventCombined-RRCDKJC2.mjs → eventCombined-AZVTF22X.mjs} +9 -9
  59. package/dist/client/{eventDetails-YO335BUT.mjs → eventDetails-7GPFNLGF.mjs} +9 -9
  60. package/dist/client/{eventListing-PXA6GFQ3.mjs → eventListing-QEUMTMUM.mjs} +9 -9
  61. package/dist/client/{eventRegistration-2ZHEDDXO.mjs → eventRegistration-P2EDKCQZ.mjs} +9 -9
  62. package/dist/client/{form-ZS6KX4U2.mjs → form-NUJ7H4IN.mjs} +3 -3
  63. package/dist/client/{headerSection-QK5SLIIB.mjs → headerSection-JB7LECPL.mjs} +3 -3
  64. package/dist/client/hooks.mjs +93 -42
  65. package/dist/client/{locationMap-GFNIUD2X.mjs → locationMap-UEYWUCSW.mjs} +3 -3
  66. package/dist/client/{newsletterForm-PGLTTCUG.mjs → newsletterForm-S2YZQ2X7.mjs} +3 -3
  67. package/dist/client/{productDetail-OPBE5ZPI.mjs → productDetail-H5MADGG7.mjs} +6 -6
  68. package/dist/client/{productList-NI72Q62Z.mjs → productList-DK7YON7H.mjs} +6 -6
  69. package/dist/client/rendering/client.mjs +262 -70
  70. package/dist/client/rendering/islands.mjs +19 -19
  71. package/dist/client/rendering.mjs +306 -114
  72. package/dist/client/{shop-3ZQPEWYI.mjs → shop-6PA7RDRJ.mjs} +6 -6
  73. package/dist/client/spam-protection.mjs +10 -10
  74. package/dist/preview-next/client/runtime.mjs +5 -5
  75. package/dist/{sdk-runtime-FSHXCWDS.mjs → sdk-runtime-JP5347OB.mjs} +6 -6
  76. package/dist/server/components.mjs +149 -69
  77. package/dist/server/config-validation.mjs +85 -34
  78. package/dist/server/config.mjs +85 -34
  79. package/dist/server/data.mjs +93 -42
  80. package/dist/server/index.mjs +1 -1
  81. package/dist/server/navigation.mjs +2 -2
  82. package/dist/server/next.mjs +170 -90
  83. package/dist/server/page-converter.mjs +77 -26
  84. package/dist/server/prebuild.mjs +1 -1
  85. package/dist/server/rendering/server.mjs +161 -81
  86. package/dist/server/rendering.mjs +165 -85
  87. package/dist/server/routing.mjs +135 -58
  88. package/dist/server/server.mjs +102 -51
  89. package/package.json +2 -2
  90. package/dist/SdkPreviewModeRuntime-UBL6MSNP.mjs +0 -8
@@ -1,4 +1,4 @@
1
- import { parseAspectRatioValue, parseColorTokenParts, toBookingTimeZone, formatBookingDate, toScheduledBookingDateTime, formatBookingTime, toScheduledBookingDateRange, formatBookingDateParts, formatEventPricing, ImagePresets, getBookingLocalDateKey, publicEventPricingType, formatCurrencyAmount, getCurrentResolveImageUrlContext, renderVideo, renderAudio, resolveMediaNodeResponsiveImage, MediaPlaceholder, computeMediaTransformStyle, rgbColorValue } from './chunk-25W2EQUN.mjs';
1
+ import { parseAspectRatioValue, parseColorTokenParts, toBookingTimeZone, formatBookingDate, toScheduledBookingDateTime, formatBookingTime, toScheduledBookingDateRange, formatBookingDateParts, formatEventPricing, ImagePresets, getBookingLocalDateKey, publicEventPricingType, formatCurrencyAmount, getCurrentResolveImageUrlContext, renderVideo, renderAudio, resolveMediaNodeResponsiveImage, MediaPlaceholder, computeMediaTransformStyle, rgbColorValue } from './chunk-RWYFG625.mjs';
2
2
  import z2, { z } from 'zod';
3
3
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
4
4
 
@@ -356,6 +356,18 @@ z.array(publicCourseSchema);
356
356
  var eventPresetSchema = z.enum(["event", "class", "workshop", "retreat", "performance"]);
357
357
  var eventScheduleScopeSchema = z.enum(["recurring", "oneOff"]);
358
358
  var eventDestinationModeSchema = z.enum(["cms-managed", "system-managed"]);
359
+ var publicEventDestinationSchema = z.discriminatedUnion("kind", [
360
+ z.object({
361
+ kind: z.literal("native"),
362
+ mode: eventDestinationModeSchema,
363
+ path: z.string()
364
+ }),
365
+ z.object({
366
+ kind: z.literal("external"),
367
+ url: z.string(),
368
+ label: z.string()
369
+ })
370
+ ]);
359
371
  var eventVenueSchema = z.object({
360
372
  id: z.string(),
361
373
  name: z.string(),
@@ -370,7 +382,7 @@ var eventCategorySchema = z.object({
370
382
  name: z.string(),
371
383
  color: z.string().nullable()
372
384
  });
373
- z.enum(["free", "paid"]);
385
+ z.enum(["free", "paid", "external"]);
374
386
  var accessRestrictionSchema = z.enum(["none", "category"]);
375
387
  z.enum(["single", "ticket_types"]);
376
388
  var publicCoursePriceDisplaySchema = z.discriminatedUnion("kind", [
@@ -391,6 +403,7 @@ z.discriminatedUnion("kind", [
391
403
  currency: z.string()
392
404
  }),
393
405
  z.object({ kind: z.literal("unavailable"), currency: z.string() }),
406
+ z.object({ kind: z.literal("external"), label: z.string() }),
394
407
  z.object({ kind: z.literal("course"), display: publicCoursePriceDisplaySchema })
395
408
  ]);
396
409
  var publicEventTicketTypePriceDisplaySchema = z.union([
@@ -469,6 +482,10 @@ var publicEventPricingSchema = z.discriminatedUnion("kind", [
469
482
  z.object({
470
483
  kind: z.literal("course"),
471
484
  display: z.object({ kind: z.literal("course"), display: publicCoursePriceDisplaySchema })
485
+ }),
486
+ z.object({
487
+ kind: z.literal("external"),
488
+ display: z.object({ kind: z.literal("external"), label: z.string() })
472
489
  })
473
490
  ]);
474
491
  var publicTeamMemberSummarySchema = z.object({
@@ -497,7 +514,8 @@ var publicEventSchema = z.object({
497
514
  image: mediaSchema.nullable().optional()
498
515
  }).optional(),
499
516
  slug: z.string(),
500
- path: z.string(),
517
+ path: z.string().nullable(),
518
+ destination: publicEventDestinationSchema,
501
519
  requiresRegistration: z.boolean(),
502
520
  deliveryMode: z.enum(["in_person", "online", "hybrid"]),
503
521
  attendanceModes: z.array(publicEventAttendanceModeAvailabilitySchema),
@@ -5291,7 +5309,7 @@ function formatCalendarTitle(viewDate, view, days, monthNames = MONTH_NAMES) {
5291
5309
  if (view === "week") {
5292
5310
  const weekStart = days[0];
5293
5311
  const weekEnd = days[6];
5294
- if (!weekStart || !weekEnd) {
5312
+ if (weekStart === void 0 || weekEnd === void 0) {
5295
5313
  return `${monthNames[viewDate.getMonth()] ?? ""} ${viewDate.getFullYear()}`;
5296
5314
  }
5297
5315
  const startMonth = monthNames[weekStart.getMonth()] ?? "";
@@ -5397,7 +5415,9 @@ function getLocalDateKey(isoTimestamp, timeZone) {
5397
5415
  const year = parts.find((part) => part.type === "year")?.value;
5398
5416
  const month = parts.find((part) => part.type === "month")?.value;
5399
5417
  const day = parts.find((part) => part.type === "day")?.value;
5400
- if (!year || !month || !day) return null;
5418
+ if (year === void 0 || year.length === 0) return null;
5419
+ if (month === void 0 || month.length === 0) return null;
5420
+ if (day === void 0 || day.length === 0) return null;
5401
5421
  return `${year}-${month}-${day}`;
5402
5422
  }
5403
5423
  var validTimeZoneCache = /* @__PURE__ */ new Map();
@@ -5654,7 +5674,7 @@ function enumerateDateKeys(startDateKey, endDateKey) {
5654
5674
  }
5655
5675
  function parseDateKey(dateKey) {
5656
5676
  const match = /^(\d{4})-(\d{2})-(\d{2})$/.exec(dateKey);
5657
- if (!match) {
5677
+ if (match === null) {
5658
5678
  throw new Error(`Invalid timetable date key: ${dateKey}`);
5659
5679
  }
5660
5680
  const [, year, month, day] = match;
@@ -5674,7 +5694,7 @@ function groupItemsByDate(items, accessors) {
5674
5694
  const dateKey = getLocalDateKey(startsAt, timeZone);
5675
5695
  if (dateKey == null) continue;
5676
5696
  const existing = grouped.get(dateKey);
5677
- if (existing) {
5697
+ if (existing !== void 0) {
5678
5698
  existing.push(item);
5679
5699
  } else {
5680
5700
  grouped.set(dateKey, [item]);
@@ -5695,12 +5715,41 @@ function getEventAvailability(event) {
5695
5715
  return { available, isFull: false };
5696
5716
  }
5697
5717
 
5718
+ // ../blocks/src/system/runtime/nodes/events/shared/destination.ts
5719
+ function isRecord3(value) {
5720
+ return typeof value === "object" && value !== null && !Array.isArray(value);
5721
+ }
5722
+ function isRuntimeEventDestination(value) {
5723
+ if (!isRecord3(value) || typeof value.kind !== "string") return false;
5724
+ if (value.kind === "native") {
5725
+ return (value.mode === "cms-managed" || value.mode === "system-managed") && typeof value.path === "string";
5726
+ }
5727
+ return value.kind === "external" && typeof value.url === "string" && typeof value.label === "string";
5728
+ }
5729
+ function resolveRuntimeEventDestination(event) {
5730
+ if (isRuntimeEventDestination(event.destination)) {
5731
+ return event.destination;
5732
+ }
5733
+ return {
5734
+ kind: "native",
5735
+ mode: event.eventDestinationMode === "system-managed" ? "system-managed" : "cms-managed",
5736
+ path: typeof event.path === "string" ? event.path : ""
5737
+ };
5738
+ }
5739
+
5698
5740
  // ../blocks/src/system/runtime/nodes/events/shared/pricing.ts
5699
5741
  var DEFAULT_EVENT_CURRENCY = "USD";
5700
5742
  function resolveRuntimeEventPricing(event) {
5701
5743
  if (isPublicEventPricing(event.pricing)) {
5702
5744
  return event.pricing;
5703
5745
  }
5746
+ const destination = resolveRuntimeEventDestination(event);
5747
+ if (destination.kind === "external") {
5748
+ return {
5749
+ kind: "external",
5750
+ display: { kind: "external", label: "External registration" }
5751
+ };
5752
+ }
5704
5753
  const legacy = event;
5705
5754
  const currency = readCurrency(legacy.currency);
5706
5755
  if (event.requiresRegistration === false) {
@@ -5737,22 +5786,22 @@ function resolveRuntimeEventPricing(event) {
5737
5786
  function readCurrency(value) {
5738
5787
  return typeof value === "string" && value.trim().length > 0 ? value : DEFAULT_EVENT_CURRENCY;
5739
5788
  }
5740
- function isRecord3(value) {
5789
+ function isRecord4(value) {
5741
5790
  return typeof value === "object" && value !== null && !Array.isArray(value);
5742
5791
  }
5743
5792
  function isPublicEventPricing(value) {
5744
- if (!isRecord3(value) || typeof value.kind !== "string") return false;
5745
- return value.kind === "drop_in" || value.kind === "free_registration" || value.kind === "single_paid" || value.kind === "ticket_types" || value.kind === "course";
5793
+ if (!isRecord4(value) || typeof value.kind !== "string") return false;
5794
+ return value.kind === "drop_in" || value.kind === "free_registration" || value.kind === "single_paid" || value.kind === "ticket_types" || value.kind === "course" || value.kind === "external";
5746
5795
  }
5747
5796
  function isPublicEventTicketType(value) {
5748
- return isRecord3(value) && typeof value.id === "string";
5797
+ return isRecord4(value) && typeof value.id === "string";
5749
5798
  }
5750
5799
  function readTicketTypePriceDisplay(value, currency) {
5751
5800
  const display = readLegacyPriceDisplay(value, currency);
5752
- return display.kind === "course" ? { kind: "unavailable", currency } : display;
5801
+ return display.kind === "course" || display.kind === "external" ? { kind: "unavailable", currency } : display;
5753
5802
  }
5754
5803
  function readLegacyPriceDisplay(value, currency) {
5755
- if (!isRecord3(value) || typeof value.kind !== "string") {
5804
+ if (!isRecord4(value) || typeof value.kind !== "string") {
5756
5805
  return { kind: "unavailable", currency };
5757
5806
  }
5758
5807
  const displayCurrency = readCurrency(value.currency);
@@ -5791,7 +5840,7 @@ function readLegacyPriceDisplay(value, currency) {
5791
5840
  case "unavailable":
5792
5841
  return { kind: "unavailable", currency: displayCurrency };
5793
5842
  case "course":
5794
- return isRecord3(value.display) ? {
5843
+ return isRecord4(value.display) ? {
5795
5844
  kind: "course",
5796
5845
  display: readCoursePriceDisplay(value.display, displayCurrency)
5797
5846
  } : {
@@ -5949,16 +5998,28 @@ function formatEventPrice(event) {
5949
5998
  function formatEventPriceDisplay(pricing) {
5950
5999
  return formatEventPricing(pricing, { decimals: "auto" });
5951
6000
  }
6001
+ function resolveEventHref(event) {
6002
+ const destination = resolveRuntimeEventDestination(event);
6003
+ return destination.kind === "external" ? destination.url : destination.path;
6004
+ }
6005
+ function resolveEventLinkProps(event) {
6006
+ const href = resolveEventHref(event);
6007
+ const destination = resolveRuntimeEventDestination(event);
6008
+ return destination.kind === "external" ? { href, target: "_blank", rel: "noopener noreferrer" } : { href };
6009
+ }
5952
6010
  function resolveEventCta(event, buttonText) {
5953
6011
  const { isFull: isSoldOut } = getEventAvailability(event);
5954
- const defaultButtonText = event.kind === "course_session" ? "Book course" : "Book";
6012
+ const destination = resolveRuntimeEventDestination(event);
6013
+ const isExternal = destination.kind === "external";
6014
+ const defaultButtonText = isExternal ? destination.label : event.kind === "course_session" ? "Book course" : "Book";
5955
6015
  const effectiveButtonText = buttonText ?? defaultButtonText;
5956
- if (isSoldOut) {
5957
- return { label: "Sold out", href: event.path, hidden: true };
6016
+ const href = resolveEventHref(event);
6017
+ if (!isExternal && isSoldOut) {
6018
+ return { label: "Sold out", href, external: false, hidden: true };
5958
6019
  }
5959
6020
  const enrollmentOpen = event.kind === "course_session" ? event.course?.enrollmentOpen !== false : true;
5960
6021
  const label = !enrollmentOpen ? "Registration closed" : effectiveButtonText;
5961
- return { label, href: event.path, hidden: false };
6022
+ return { label, href, external: isExternal, hidden: false };
5962
6023
  }
5963
6024
  var MediaNodeServer = ({
5964
6025
  value,
@@ -6149,6 +6210,8 @@ var EventCard = ({
6149
6210
  "a",
6150
6211
  {
6151
6212
  href: cta.href,
6213
+ target: cta.external ? "_blank" : void 0,
6214
+ rel: cta.external ? "noopener noreferrer" : void 0,
6152
6215
  className: `${buttonClass} event-card-cta`,
6153
6216
  children: cta.label
6154
6217
  }
@@ -6504,10 +6567,19 @@ var EventCompactRow = ({
6504
6567
  formattedTime,
6505
6568
  /* @__PURE__ */ jsx("span", { className: "event-compact-row-action-price", children: price })
6506
6569
  ] }),
6507
- cta.hidden ? /* @__PURE__ */ jsx("span", { className: "event-compact-row-status", children: cta.label }) : /* @__PURE__ */ jsxs("a", { href: cta.href, className: `${buttonClass} event-compact-row-cta`, children: [
6508
- /* @__PURE__ */ jsx("span", { children: cta.label }),
6509
- /* @__PURE__ */ jsx(ArrowRightIcon, { "aria-hidden": "true" })
6510
- ] })
6570
+ cta.hidden ? /* @__PURE__ */ jsx("span", { className: "event-compact-row-status", children: cta.label }) : /* @__PURE__ */ jsxs(
6571
+ "a",
6572
+ {
6573
+ href: cta.href,
6574
+ target: cta.external ? "_blank" : void 0,
6575
+ rel: cta.external ? "noopener noreferrer" : void 0,
6576
+ className: `${buttonClass} event-compact-row-cta`,
6577
+ children: [
6578
+ /* @__PURE__ */ jsx("span", { children: cta.label }),
6579
+ /* @__PURE__ */ jsx(ArrowRightIcon, { "aria-hidden": "true" })
6580
+ ]
6581
+ }
6582
+ )
6511
6583
  ] })
6512
6584
  ] })
6513
6585
  ] });
@@ -7253,7 +7325,7 @@ function resolveEventRequiresPayment(input) {
7253
7325
  if (!input.event) {
7254
7326
  return false;
7255
7327
  }
7256
- return publicEventPricingType(resolveRuntimeEventPricing(input.event)) !== "free";
7328
+ return publicEventPricingType(resolveRuntimeEventPricing(input.event)) === "paid";
7257
7329
  }
7258
7330
  function resolveDiscountContext(input) {
7259
7331
  const selection = input.paymentSelection.method ? input.paymentSelection : null;
@@ -7474,15 +7546,16 @@ var eventRegistrationBlockRuntime = defineClientOwnedBlockRuntime({
7474
7546
  })
7475
7547
  });
7476
7548
  function normalizeEventRegistrationEventInput(value) {
7477
- if (!isRecord4(value)) {
7549
+ if (!isRecord5(value)) {
7478
7550
  return value;
7479
7551
  }
7480
7552
  return {
7481
7553
  ...value,
7554
+ destination: resolveRuntimeEventDestination(value),
7482
7555
  pricing: resolveRuntimeEventPricing(value)
7483
7556
  };
7484
7557
  }
7485
- function isRecord4(value) {
7558
+ function isRecord5(value) {
7486
7559
  return typeof value === "object" && value !== null && !Array.isArray(value);
7487
7560
  }
7488
7561
  var eventRegistrationInteractiveIslandPropsCodec = createInteractiveIslandCodec({
@@ -8900,4 +8973,4 @@ function defineIslandPropsDecoder(kind) {
8900
8973
  };
8901
8974
  }
8902
8975
 
8903
- export { BOOKING_FORM_DATA_RESERVED_KEYS, DateTimeTile, EMPTY_COMMERCE_CART_STATE, EmptyState, EventCard, EventCompactRow, MAX_EVENTS_PER_DAY, MONTH_NAMES, WIZARD_STEPS, addMonths, assertNever, buildCalendarViewport, buildCartDisplay, buildEventCalendarListingRender, buildEventRuntimeFilters, buildPassCartItem, buildProductCardDisplay, buildProductCartItem, buildProductDetailDisplay, buildTimetableModel, clearWorkflowFeedback, createRichTextDocFromMarkdown, defineIslandPropsDecoder, deriveBookingFormViewState, deriveCommerceCheckoutState, err, findEventByOccurrenceId, findPreSelectedEvent, formatBookingSubmissionPreparationError, formatCommercePrice, formatDate, formatDateKey, formatEventDateParts, formatEventPrice, formatEventPriceDisplay, formatEventTeacherLine, formatInterval, formatTime, getBookingRedirectStateFromLocation, getBookingSuccessMessage, getCardOrientation, getContainerClass, getEventAvailability, getEventRuntimeFiltersKey, getOrderedDayNames, getShopDisplayForItems, getStepNumber, getThreeMonthRange, getWizardStepsForContext, groupEventsByDate, isEventContentType, isRecord, isToday, logger, normalizeCsvIds, normalizeCsvString, normalizeEventBlockKind, normalizeOptionalId, ok, okWith, parseStoredCommerceCartState, prepareBookingSubmission, productItemKey, reduceCommerceCart, reportWorkflowError, reportWorkflowSuccess, resolveAppointmentCheckoutVerificationState, resolveBookingPaymentStep, resolveBookingSiteId, resolveDefaultBookingServiceId, resolveDiscountContext, resolveEventRequiresPayment, resolveRegistrationTarget, resolveRuntimeEventPricing, shiftCalendarAnchorDate, themeButtonClassName, toRegistrationEvents, toSelectedCollectionOptionKind, unwrapRichTextRoot };
8976
+ export { BOOKING_FORM_DATA_RESERVED_KEYS, DateTimeTile, EMPTY_COMMERCE_CART_STATE, EmptyState, EventCard, EventCompactRow, MAX_EVENTS_PER_DAY, MONTH_NAMES, WIZARD_STEPS, addMonths, assertNever, buildCalendarViewport, buildCartDisplay, buildEventCalendarListingRender, buildEventRuntimeFilters, buildPassCartItem, buildProductCardDisplay, buildProductCartItem, buildProductDetailDisplay, buildTimetableModel, clearWorkflowFeedback, createRichTextDocFromMarkdown, defineIslandPropsDecoder, deriveBookingFormViewState, deriveCommerceCheckoutState, err, findEventByOccurrenceId, findPreSelectedEvent, formatBookingSubmissionPreparationError, formatCommercePrice, formatDate, formatDateKey, formatEventDateParts, formatEventPrice, formatEventPriceDisplay, formatEventTeacherLine, formatInterval, formatTime, getBookingRedirectStateFromLocation, getBookingSuccessMessage, getCardOrientation, getContainerClass, getEventAvailability, getEventRuntimeFiltersKey, getOrderedDayNames, getShopDisplayForItems, getStepNumber, getThreeMonthRange, getWizardStepsForContext, groupEventsByDate, isEventContentType, isRecord, isToday, logger, normalizeCsvIds, normalizeCsvString, normalizeEventBlockKind, normalizeOptionalId, ok, okWith, parseStoredCommerceCartState, prepareBookingSubmission, productItemKey, reduceCommerceCart, reportWorkflowError, reportWorkflowSuccess, resolveAppointmentCheckoutVerificationState, resolveBookingPaymentStep, resolveBookingSiteId, resolveDefaultBookingServiceId, resolveDiscountContext, resolveEventLinkProps, resolveEventRequiresPayment, resolveRegistrationTarget, resolveRuntimeEventPricing, shiftCalendarAnchorDate, themeButtonClassName, toRegistrationEvents, toSelectedCollectionOptionKind, unwrapRichTextRoot };
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { ChevronLeft, ChevronRight } from './chunk-6N7YRNYU.mjs';
3
- import { clsx_default } from './chunk-25W2EQUN.mjs';
3
+ import { clsx_default } from './chunk-RWYFG625.mjs';
4
4
  import React, { useRef, useState, useCallback, useEffect } from 'react';
5
5
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
6
6
 
@@ -1,13 +1,13 @@
1
1
  "use client";
2
- import { addPassToCommerceCart, useCommerceCart } from './chunk-VFHZLZAC.mjs';
3
- import { CarouselNodeClient } from './chunk-7DH35FGA.mjs';
2
+ import { addPassToCommerceCart, useCommerceCart } from './chunk-6RN62XBV.mjs';
3
+ import { CarouselNodeClient } from './chunk-PMNAV6LO.mjs';
4
4
  import { buildRouteIslandApiConfig } from './chunk-L4J5Y62O.mjs';
5
- import { useDiscountCodeUi, createBodyThemePortalRoot, consumeSearchParams, scrollToBlock, TerminalPanel, StateIcon, CheckIcon, CrossIcon, ActionRow, DiscountCodeDisclosure, consumeSearchParam, buildCheckoutReturnUrls } from './chunk-NBFRJ5NB.mjs';
5
+ import { useDiscountCodeUi, createBodyThemePortalRoot, consumeSearchParams, scrollToBlock, TerminalPanel, StateIcon, CheckIcon, CrossIcon, ActionRow, DiscountCodeDisclosure, consumeSearchParam, buildCheckoutReturnUrls } from './chunk-CKXEUWWA.mjs';
6
6
  import { ModalShell, resolveDedicatedCheckoutPath } from './chunk-WBQG7VJA.mjs';
7
7
  import { useBlockApi, FeedbackMessage, BlockApiProvider, discountAvailabilityHasDiscounts, discountAvailabilityAllowsManualEntry, getAutoAppliedDiscountPreview } from './chunk-WHZQDPBZ.mjs';
8
8
  import { mountReactIsland } from './chunk-N7PBWBWQ.mjs';
9
- import { themeButtonClassName, formatCommercePrice, formatInterval, getShopDisplayForItems, deriveCommerceCheckoutState, buildProductDetailDisplay, productItemKey, buildProductCartItem, buildProductCardDisplay, assertNever as assertNever$1, reportWorkflowError, clearWorkflowFeedback, unwrapRichTextRoot, createRichTextDocFromMarkdown, isRecord } from './chunk-6DPXDOIL.mjs';
10
- import { assertNever, ok, err, getCurrentResolveImageUrlContext, resolveImageUrlWithContext, ImagePresets } from './chunk-25W2EQUN.mjs';
9
+ import { themeButtonClassName, formatCommercePrice, formatInterval, getShopDisplayForItems, deriveCommerceCheckoutState, buildProductDetailDisplay, productItemKey, buildProductCartItem, buildProductCardDisplay, assertNever as assertNever$1, reportWorkflowError, clearWorkflowFeedback, unwrapRichTextRoot, createRichTextDocFromMarkdown, isRecord } from './chunk-MLBNVN4H.mjs';
10
+ import { assertNever, ok, err, getCurrentResolveImageUrlContext, resolveImageUrlWithContext, ImagePresets } from './chunk-RWYFG625.mjs';
11
11
  import * as React3 from 'react';
12
12
  import React3__default, { useState, useRef, useCallback, useEffect } from 'react';
13
13
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
@@ -88,6 +88,8 @@ function publicEventPricingType(pricing) {
88
88
  case "ticket_types":
89
89
  case "course":
90
90
  return isFreePublicEventPriceDisplay(pricing.display) ? "free" : "paid";
91
+ case "external":
92
+ return "external";
91
93
  }
92
94
  }
93
95
  function publicEventPricingCurrency(pricing) {
@@ -99,6 +101,8 @@ function publicEventPricingCurrency(pricing) {
99
101
  return pricing.currency;
100
102
  case "course":
101
103
  return pricing.display.display.currency;
104
+ case "external":
105
+ return null;
102
106
  }
103
107
  }
104
108
  function publicEventScalarPrice(pricing) {
@@ -113,6 +117,7 @@ function publicEventPricingMode(pricing) {
113
117
  return "ticket_types";
114
118
  case "drop_in":
115
119
  case "course":
120
+ case "external":
116
121
  return void 0;
117
122
  }
118
123
  }
@@ -130,6 +135,7 @@ function isFreePublicEventPriceDisplay(display) {
130
135
  case "range":
131
136
  case "mixed":
132
137
  case "unavailable":
138
+ case "external":
133
139
  return false;
134
140
  }
135
141
  }
@@ -160,6 +166,8 @@ function formatBookingPriceDisplay(display, options = {}) {
160
166
  return display.paidToAmount > display.paidFromAmount ? `Free / ${formatCurrencyAmount(display.paidFromAmount, display.currency, options)} - ${formatCurrencyAmount(display.paidToAmount, display.currency, options)}` : `Free / ${formatCurrencyAmount(display.paidFromAmount, display.currency, options)}`;
161
167
  case "unavailable":
162
168
  return "Pricing unavailable";
169
+ case "external":
170
+ return display.label;
163
171
  case "course":
164
172
  return formatCoursePriceDisplayLabel(display.display, options);
165
173
  default:
@@ -256,10 +264,11 @@ function omitZeroAmountFutureRows(rows) {
256
264
  if (rows.length <= 1) {
257
265
  return rows;
258
266
  }
259
- const [firstRow, ...futureRows] = rows;
260
- if (!firstRow) {
267
+ const firstRow = rows[0];
268
+ if (firstRow === void 0) {
261
269
  return [];
262
270
  }
271
+ const futureRows = rows.slice(1);
263
272
  return [
264
273
  firstRow,
265
274
  ...futureRows.filter((row) => row.amountCents > 0)
@@ -302,11 +311,11 @@ function isValidTimeZone(timeZone) {
302
311
  }
303
312
  function getSafeTimeZone(timeZone) {
304
313
  const normalized = typeof timeZone === "string" ? timeZone.trim() : "";
305
- return normalized && isValidTimeZone(normalized) ? normalized : FALLBACK_TIMEZONE;
314
+ return normalized.length > 0 && isValidTimeZone(normalized) ? normalized : FALLBACK_TIMEZONE;
306
315
  }
307
316
  function parseStrictBookingTimeZone(timeZone) {
308
317
  const normalized = timeZone.trim();
309
- if (!normalized || !isValidTimeZone(normalized)) {
318
+ if (normalized.length === 0 || !isValidTimeZone(normalized)) {
310
319
  return null;
311
320
  }
312
321
  return normalized;
@@ -393,7 +402,7 @@ function parseScheduledBookingDateTime(input) {
393
402
  try {
394
403
  const startsAt = toUtcIsoDateTimeString(input.startsAt);
395
404
  const timeZone = parseStrictBookingTimeZone(input.timeZone);
396
- if (!timeZone) {
405
+ if (timeZone === null) {
397
406
  return {
398
407
  ok: false,
399
408
  field: "timeZone",
@@ -532,7 +541,7 @@ function getBookingLocalDateKey(input) {
532
541
  }
533
542
  function parseBookingLocalDate(value) {
534
543
  const match = LOCAL_DATE_PATTERN.exec(value.trim());
535
- if (!match?.groups) {
544
+ if (match === null || match.groups === void 0) {
536
545
  throw new Error(`Invalid booking date format: "${value}" (expected YYYY-MM-DD)`);
537
546
  }
538
547
  const year = Number(match.groups.year);
@@ -566,10 +575,10 @@ function normalizeLocationAddressText(value) {
566
575
  return null;
567
576
  }
568
577
  const trimmed = value.trim();
569
- return trimmed ? trimmed : null;
578
+ return trimmed.length > 0 ? trimmed : null;
570
579
  }
571
580
  function hasLocationCoordinates(value) {
572
- return typeof value?.lat === "number" && typeof value?.lng === "number";
581
+ return value != null && typeof value.lat === "number" && typeof value.lng === "number";
573
582
  }
574
583
  function toLocationCoordinates(value) {
575
584
  if (!hasLocationCoordinates(value)) {