@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
@@ -3139,6 +3139,8 @@ function publicEventPricingType(pricing) {
3139
3139
  case "ticket_types":
3140
3140
  case "course":
3141
3141
  return isFreePublicEventPriceDisplay(pricing.display) ? "free" : "paid";
3142
+ case "external":
3143
+ return "external";
3142
3144
  }
3143
3145
  }
3144
3146
  function publicEventPricingCurrency(pricing) {
@@ -3150,6 +3152,8 @@ function publicEventPricingCurrency(pricing) {
3150
3152
  return pricing.currency;
3151
3153
  case "course":
3152
3154
  return pricing.display.display.currency;
3155
+ case "external":
3156
+ return null;
3153
3157
  }
3154
3158
  }
3155
3159
  function publicEventScalarPrice(pricing) {
@@ -3164,6 +3168,7 @@ function publicEventPricingMode(pricing) {
3164
3168
  return "ticket_types";
3165
3169
  case "drop_in":
3166
3170
  case "course":
3171
+ case "external":
3167
3172
  return void 0;
3168
3173
  }
3169
3174
  }
@@ -3181,6 +3186,7 @@ function isFreePublicEventPriceDisplay(display) {
3181
3186
  case "range":
3182
3187
  case "mixed":
3183
3188
  case "unavailable":
3189
+ case "external":
3184
3190
  return false;
3185
3191
  }
3186
3192
  }
@@ -3211,6 +3217,8 @@ function formatBookingPriceDisplay(display, options = {}) {
3211
3217
  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)}`;
3212
3218
  case "unavailable":
3213
3219
  return "Pricing unavailable";
3220
+ case "external":
3221
+ return display.label;
3214
3222
  case "course":
3215
3223
  return formatCoursePriceDisplayLabel(display.display, options);
3216
3224
  default:
@@ -3334,10 +3342,11 @@ function omitZeroAmountFutureRows(rows) {
3334
3342
  if (rows.length <= 1) {
3335
3343
  return rows;
3336
3344
  }
3337
- const [firstRow, ...futureRows] = rows;
3338
- if (!firstRow) {
3345
+ const firstRow = rows[0];
3346
+ if (firstRow === void 0) {
3339
3347
  return [];
3340
3348
  }
3349
+ const futureRows = rows.slice(1);
3341
3350
  return [
3342
3351
  firstRow,
3343
3352
  ...futureRows.filter((row) => row.amountCents > 0)
@@ -3382,11 +3391,11 @@ function isValidTimeZone(timeZone) {
3382
3391
  }
3383
3392
  function getSafeTimeZone(timeZone) {
3384
3393
  const normalized = typeof timeZone === "string" ? timeZone.trim() : "";
3385
- return normalized && isValidTimeZone(normalized) ? normalized : FALLBACK_TIMEZONE;
3394
+ return normalized.length > 0 && isValidTimeZone(normalized) ? normalized : FALLBACK_TIMEZONE;
3386
3395
  }
3387
3396
  function parseStrictBookingTimeZone(timeZone) {
3388
3397
  const normalized = timeZone.trim();
3389
- if (!normalized || !isValidTimeZone(normalized)) {
3398
+ if (normalized.length === 0 || !isValidTimeZone(normalized)) {
3390
3399
  return null;
3391
3400
  }
3392
3401
  return normalized;
@@ -3472,7 +3481,7 @@ function parseScheduledBookingDateTime(input) {
3472
3481
  try {
3473
3482
  const startsAt = toUtcIsoDateTimeString(input.startsAt);
3474
3483
  const timeZone = parseStrictBookingTimeZone(input.timeZone);
3475
- if (!timeZone) {
3484
+ if (timeZone === null) {
3476
3485
  return {
3477
3486
  ok: false,
3478
3487
  field: "timeZone",
@@ -3611,7 +3620,7 @@ function getBookingLocalDateKey(input) {
3611
3620
  }
3612
3621
  function parseBookingLocalDate(value) {
3613
3622
  const match = LOCAL_DATE_PATTERN.exec(value.trim());
3614
- if (!match?.groups) {
3623
+ if (match === null || match.groups === void 0) {
3615
3624
  throw new Error(`Invalid booking date format: "${value}" (expected YYYY-MM-DD)`);
3616
3625
  }
3617
3626
  const year = Number(match.groups.year);
@@ -3670,10 +3679,10 @@ function normalizeLocationAddressText(value) {
3670
3679
  return null;
3671
3680
  }
3672
3681
  const trimmed = value.trim();
3673
- return trimmed ? trimmed : null;
3682
+ return trimmed.length > 0 ? trimmed : null;
3674
3683
  }
3675
3684
  function hasLocationCoordinates(value) {
3676
- return typeof value?.lat === "number" && typeof value?.lng === "number";
3685
+ return value != null && typeof value.lat === "number" && typeof value.lng === "number";
3677
3686
  }
3678
3687
  function toLocationCoordinates(value) {
3679
3688
  if (!hasLocationCoordinates(value)) {
@@ -3690,6 +3699,13 @@ var init_location = __esm({
3690
3699
  }
3691
3700
  });
3692
3701
 
3702
+ // ../core/src/string.ts
3703
+ var init_string = __esm({
3704
+ "../core/src/string.ts"() {
3705
+ "use strict";
3706
+ }
3707
+ });
3708
+
3693
3709
  // ../core/src/business-address.ts
3694
3710
  var init_business_address = __esm({
3695
3711
  "../core/src/business-address.ts"() {
@@ -3830,13 +3846,6 @@ var init_slug = __esm({
3830
3846
  }
3831
3847
  });
3832
3848
 
3833
- // ../core/src/string.ts
3834
- var init_string = __esm({
3835
- "../core/src/string.ts"() {
3836
- "use strict";
3837
- }
3838
- });
3839
-
3840
3849
  // ../core/src/uuid.ts
3841
3850
  var init_uuid = __esm({
3842
3851
  "../core/src/uuid.ts"() {
@@ -8268,11 +8277,45 @@ var init_shared = __esm({
8268
8277
  }
8269
8278
  });
8270
8279
 
8280
+ // ../blocks/src/system/runtime/nodes/events/shared/destination.ts
8281
+ function isRecord6(value) {
8282
+ return typeof value === "object" && value !== null && !Array.isArray(value);
8283
+ }
8284
+ function isRuntimeEventDestination(value) {
8285
+ if (!isRecord6(value) || typeof value.kind !== "string") return false;
8286
+ if (value.kind === "native") {
8287
+ return (value.mode === "cms-managed" || value.mode === "system-managed") && typeof value.path === "string";
8288
+ }
8289
+ return value.kind === "external" && typeof value.url === "string" && typeof value.label === "string";
8290
+ }
8291
+ function resolveRuntimeEventDestination(event) {
8292
+ if (isRuntimeEventDestination(event.destination)) {
8293
+ return event.destination;
8294
+ }
8295
+ return {
8296
+ kind: "native",
8297
+ mode: event.eventDestinationMode === "system-managed" ? "system-managed" : "cms-managed",
8298
+ path: typeof event.path === "string" ? event.path : ""
8299
+ };
8300
+ }
8301
+ var init_destination = __esm({
8302
+ "../blocks/src/system/runtime/nodes/events/shared/destination.ts"() {
8303
+ "use strict";
8304
+ }
8305
+ });
8306
+
8271
8307
  // ../blocks/src/system/runtime/nodes/events/shared/pricing.ts
8272
8308
  function resolveRuntimeEventPricing(event) {
8273
8309
  if (isPublicEventPricing(event.pricing)) {
8274
8310
  return event.pricing;
8275
8311
  }
8312
+ const destination = resolveRuntimeEventDestination(event);
8313
+ if (destination.kind === "external") {
8314
+ return {
8315
+ kind: "external",
8316
+ display: { kind: "external", label: "External registration" }
8317
+ };
8318
+ }
8276
8319
  const legacy = event;
8277
8320
  const currency = readCurrency(legacy.currency);
8278
8321
  if (event.requiresRegistration === false) {
@@ -8309,22 +8352,22 @@ function resolveRuntimeEventPricing(event) {
8309
8352
  function readCurrency(value) {
8310
8353
  return typeof value === "string" && value.trim().length > 0 ? value : DEFAULT_EVENT_CURRENCY;
8311
8354
  }
8312
- function isRecord6(value) {
8355
+ function isRecord7(value) {
8313
8356
  return typeof value === "object" && value !== null && !Array.isArray(value);
8314
8357
  }
8315
8358
  function isPublicEventPricing(value) {
8316
- if (!isRecord6(value) || typeof value.kind !== "string") return false;
8317
- return value.kind === "drop_in" || value.kind === "free_registration" || value.kind === "single_paid" || value.kind === "ticket_types" || value.kind === "course";
8359
+ if (!isRecord7(value) || typeof value.kind !== "string") return false;
8360
+ return value.kind === "drop_in" || value.kind === "free_registration" || value.kind === "single_paid" || value.kind === "ticket_types" || value.kind === "course" || value.kind === "external";
8318
8361
  }
8319
8362
  function isPublicEventTicketType(value) {
8320
- return isRecord6(value) && typeof value.id === "string";
8363
+ return isRecord7(value) && typeof value.id === "string";
8321
8364
  }
8322
8365
  function readTicketTypePriceDisplay(value, currency) {
8323
8366
  const display = readLegacyPriceDisplay(value, currency);
8324
- return display.kind === "course" ? { kind: "unavailable", currency } : display;
8367
+ return display.kind === "course" || display.kind === "external" ? { kind: "unavailable", currency } : display;
8325
8368
  }
8326
8369
  function readLegacyPriceDisplay(value, currency) {
8327
- if (!isRecord6(value) || typeof value.kind !== "string") {
8370
+ if (!isRecord7(value) || typeof value.kind !== "string") {
8328
8371
  return { kind: "unavailable", currency };
8329
8372
  }
8330
8373
  const displayCurrency = readCurrency(value.currency);
@@ -8363,7 +8406,7 @@ function readLegacyPriceDisplay(value, currency) {
8363
8406
  case "unavailable":
8364
8407
  return { kind: "unavailable", currency: displayCurrency };
8365
8408
  case "course":
8366
- return isRecord6(value.display) ? {
8409
+ return isRecord7(value.display) ? {
8367
8410
  kind: "course",
8368
8411
  display: readCoursePriceDisplay(value.display, displayCurrency)
8369
8412
  } : {
@@ -8401,6 +8444,7 @@ var DEFAULT_EVENT_CURRENCY;
8401
8444
  var init_pricing2 = __esm({
8402
8445
  "../blocks/src/system/runtime/nodes/events/shared/pricing.ts"() {
8403
8446
  "use strict";
8447
+ init_destination();
8404
8448
  DEFAULT_EVENT_CURRENCY = "USD";
8405
8449
  }
8406
8450
  });
@@ -8506,7 +8550,7 @@ function formatCalendarTitle(viewDate, view, days, monthNames = MONTH_NAMES) {
8506
8550
  if (view === "week") {
8507
8551
  const weekStart = days[0];
8508
8552
  const weekEnd = days[6];
8509
- if (!weekStart || !weekEnd) {
8553
+ if (weekStart === void 0 || weekEnd === void 0) {
8510
8554
  return `${monthNames[viewDate.getMonth()] ?? ""} ${viewDate.getFullYear()}`;
8511
8555
  }
8512
8556
  const startMonth = monthNames[weekStart.getMonth()] ?? "";
@@ -8638,7 +8682,9 @@ function getLocalDateKey(isoTimestamp, timeZone) {
8638
8682
  const year = parts.find((part) => part.type === "year")?.value;
8639
8683
  const month = parts.find((part) => part.type === "month")?.value;
8640
8684
  const day = parts.find((part) => part.type === "day")?.value;
8641
- if (!year || !month || !day) return null;
8685
+ if (year === void 0 || year.length === 0) return null;
8686
+ if (month === void 0 || month.length === 0) return null;
8687
+ if (day === void 0 || day.length === 0) return null;
8642
8688
  return `${year}-${month}-${day}`;
8643
8689
  }
8644
8690
  function isValidTimeZone2(timeZone) {
@@ -8895,7 +8941,7 @@ function enumerateDateKeys(startDateKey, endDateKey) {
8895
8941
  }
8896
8942
  function parseDateKey(dateKey) {
8897
8943
  const match = /^(\d{4})-(\d{2})-(\d{2})$/.exec(dateKey);
8898
- if (!match) {
8944
+ if (match === null) {
8899
8945
  throw new Error(`Invalid timetable date key: ${dateKey}`);
8900
8946
  }
8901
8947
  const [, year, month, day] = match;
@@ -8931,7 +8977,7 @@ function groupItemsByDate(items, accessors) {
8931
8977
  const dateKey = getLocalDateKey(startsAt, timeZone);
8932
8978
  if (dateKey == null) continue;
8933
8979
  const existing = grouped.get(dateKey);
8934
- if (existing) {
8980
+ if (existing !== void 0) {
8935
8981
  existing.push(item);
8936
8982
  } else {
8937
8983
  grouped.set(dateKey, [item]);
@@ -9091,16 +9137,28 @@ function formatEventPrice(event) {
9091
9137
  function formatEventPriceDisplay(pricing) {
9092
9138
  return formatEventPricing(pricing, { decimals: "auto" });
9093
9139
  }
9140
+ function resolveEventHref(event) {
9141
+ const destination = resolveRuntimeEventDestination(event);
9142
+ return destination.kind === "external" ? destination.url : destination.path;
9143
+ }
9144
+ function resolveEventLinkProps(event) {
9145
+ const href = resolveEventHref(event);
9146
+ const destination = resolveRuntimeEventDestination(event);
9147
+ return destination.kind === "external" ? { href, target: "_blank", rel: "noopener noreferrer" } : { href };
9148
+ }
9094
9149
  function resolveEventCta(event, buttonText) {
9095
9150
  const { isFull: isSoldOut } = getEventAvailability(event);
9096
- const defaultButtonText = event.kind === "course_session" ? "Book course" : "Book";
9151
+ const destination = resolveRuntimeEventDestination(event);
9152
+ const isExternal = destination.kind === "external";
9153
+ const defaultButtonText = isExternal ? destination.label : event.kind === "course_session" ? "Book course" : "Book";
9097
9154
  const effectiveButtonText = buttonText ?? defaultButtonText;
9098
- if (isSoldOut) {
9099
- return { label: "Sold out", href: event.path, hidden: true };
9155
+ const href = resolveEventHref(event);
9156
+ if (!isExternal && isSoldOut) {
9157
+ return { label: "Sold out", href, external: false, hidden: true };
9100
9158
  }
9101
9159
  const enrollmentOpen = event.kind === "course_session" ? event.course?.enrollmentOpen !== false : true;
9102
9160
  const label = !enrollmentOpen ? "Registration closed" : effectiveButtonText;
9103
- return { label, href: event.path, hidden: false };
9161
+ return { label, href, external: isExternal, hidden: false };
9104
9162
  }
9105
9163
  var COLUMN_CLASSES;
9106
9164
  var init_utils = __esm({
@@ -9109,6 +9167,7 @@ var init_utils = __esm({
9109
9167
  init_src();
9110
9168
  init_src3();
9111
9169
  init_eventCapacity();
9170
+ init_destination();
9112
9171
  init_pricing2();
9113
9172
  init_src3();
9114
9173
  init_src3();
@@ -9313,7 +9372,7 @@ function EventDetailsView({
9313
9372
  "a",
9314
9373
  {
9315
9374
  className: "rb-tile rb-tile--interactive",
9316
- href: e.path,
9375
+ ...resolveEventLinkProps(e),
9317
9376
  children: /* @__PURE__ */ jsx25(
9318
9377
  DateTimeTile,
9319
9378
  {
@@ -10074,6 +10133,8 @@ var init_EventCard = __esm({
10074
10133
  "a",
10075
10134
  {
10076
10135
  href: cta.href,
10136
+ target: cta.external ? "_blank" : void 0,
10137
+ rel: cta.external ? "noopener noreferrer" : void 0,
10077
10138
  className: `${buttonClass} event-card-cta`,
10078
10139
  children: cta.label
10079
10140
  }
@@ -10131,10 +10192,19 @@ var init_EventCompactRow = __esm({
10131
10192
  formattedTime,
10132
10193
  /* @__PURE__ */ jsx33("span", { className: "event-compact-row-action-price", children: price })
10133
10194
  ] }),
10134
- cta.hidden ? /* @__PURE__ */ jsx33("span", { className: "event-compact-row-status", children: cta.label }) : /* @__PURE__ */ jsxs19("a", { href: cta.href, className: `${buttonClass} event-compact-row-cta`, children: [
10135
- /* @__PURE__ */ jsx33("span", { children: cta.label }),
10136
- /* @__PURE__ */ jsx33(ArrowRightIcon, { "aria-hidden": "true" })
10137
- ] })
10195
+ cta.hidden ? /* @__PURE__ */ jsx33("span", { className: "event-compact-row-status", children: cta.label }) : /* @__PURE__ */ jsxs19(
10196
+ "a",
10197
+ {
10198
+ href: cta.href,
10199
+ target: cta.external ? "_blank" : void 0,
10200
+ rel: cta.external ? "noopener noreferrer" : void 0,
10201
+ className: `${buttonClass} event-compact-row-cta`,
10202
+ children: [
10203
+ /* @__PURE__ */ jsx33("span", { children: cta.label }),
10204
+ /* @__PURE__ */ jsx33(ArrowRightIcon, { "aria-hidden": "true" })
10205
+ ]
10206
+ }
10207
+ )
10138
10208
  ] })
10139
10209
  ] })
10140
10210
  ] });
@@ -10184,7 +10254,7 @@ var init_shared2 = __esm({
10184
10254
 
10185
10255
  // ../blocks/src/system/blocks/events/shared/schemas.ts
10186
10256
  import { z as z14 } from "zod";
10187
- var eventPresetSchema, eventScheduleScopeSchema, eventDestinationModeSchema, eventVenueSchema, eventCategorySchema, pricingTypeSchema, accessRestrictionSchema, eventPricingModeSchema, publicCoursePriceDisplaySchema, publicEventPriceDisplaySchema, publicEventTicketTypePriceDisplaySchema, publicEventAttendanceModeSchema, publicEventAttendanceModeAvailabilitySchema, publicEventTicketTypeAvailabilitySchema, publicEventTicketTypeSchema, publicEventPricingSchema, publicTeamMemberSummarySchema, publicEventSchema, publicEventsArraySchema;
10257
+ var eventPresetSchema, eventScheduleScopeSchema, eventDestinationModeSchema, publicEventDestinationSchema, eventVenueSchema, eventCategorySchema, pricingTypeSchema, accessRestrictionSchema, eventPricingModeSchema, publicCoursePriceDisplaySchema, publicEventPriceDisplaySchema, publicEventTicketTypePriceDisplaySchema, publicEventAttendanceModeSchema, publicEventAttendanceModeAvailabilitySchema, publicEventTicketTypeAvailabilitySchema, publicEventTicketTypeSchema, publicEventPricingSchema, publicTeamMemberSummarySchema, publicEventSchema, publicEventsArraySchema;
10188
10258
  var init_schemas2 = __esm({
10189
10259
  "../blocks/src/system/blocks/events/shared/schemas.ts"() {
10190
10260
  "use strict";
@@ -10195,6 +10265,18 @@ var init_schemas2 = __esm({
10195
10265
  eventPresetSchema = z14.enum(["event", "class", "workshop", "retreat", "performance"]);
10196
10266
  eventScheduleScopeSchema = z14.enum(["recurring", "oneOff"]);
10197
10267
  eventDestinationModeSchema = z14.enum(["cms-managed", "system-managed"]);
10268
+ publicEventDestinationSchema = z14.discriminatedUnion("kind", [
10269
+ z14.object({
10270
+ kind: z14.literal("native"),
10271
+ mode: eventDestinationModeSchema,
10272
+ path: z14.string()
10273
+ }),
10274
+ z14.object({
10275
+ kind: z14.literal("external"),
10276
+ url: z14.string(),
10277
+ label: z14.string()
10278
+ })
10279
+ ]);
10198
10280
  eventVenueSchema = z14.object({
10199
10281
  id: z14.string(),
10200
10282
  name: z14.string(),
@@ -10209,7 +10291,7 @@ var init_schemas2 = __esm({
10209
10291
  name: z14.string(),
10210
10292
  color: z14.string().nullable()
10211
10293
  });
10212
- pricingTypeSchema = z14.enum(["free", "paid"]);
10294
+ pricingTypeSchema = z14.enum(["free", "paid", "external"]);
10213
10295
  accessRestrictionSchema = z14.enum(["none", "category"]);
10214
10296
  eventPricingModeSchema = z14.enum(["single", "ticket_types"]);
10215
10297
  publicCoursePriceDisplaySchema = z14.discriminatedUnion("kind", [
@@ -10230,6 +10312,7 @@ var init_schemas2 = __esm({
10230
10312
  currency: z14.string()
10231
10313
  }),
10232
10314
  z14.object({ kind: z14.literal("unavailable"), currency: z14.string() }),
10315
+ z14.object({ kind: z14.literal("external"), label: z14.string() }),
10233
10316
  z14.object({ kind: z14.literal("course"), display: publicCoursePriceDisplaySchema })
10234
10317
  ]);
10235
10318
  publicEventTicketTypePriceDisplaySchema = z14.union([
@@ -10308,6 +10391,10 @@ var init_schemas2 = __esm({
10308
10391
  z14.object({
10309
10392
  kind: z14.literal("course"),
10310
10393
  display: z14.object({ kind: z14.literal("course"), display: publicCoursePriceDisplaySchema })
10394
+ }),
10395
+ z14.object({
10396
+ kind: z14.literal("external"),
10397
+ display: z14.object({ kind: z14.literal("external"), label: z14.string() })
10311
10398
  })
10312
10399
  ]);
10313
10400
  publicTeamMemberSummarySchema = z14.object({
@@ -10336,7 +10423,8 @@ var init_schemas2 = __esm({
10336
10423
  image: mediaSchema.nullable().optional()
10337
10424
  }).optional(),
10338
10425
  slug: z14.string(),
10339
- path: z14.string(),
10426
+ path: z14.string().nullable(),
10427
+ destination: publicEventDestinationSchema,
10340
10428
  requiresRegistration: z14.boolean(),
10341
10429
  deliveryMode: z14.enum(["in_person", "online", "hybrid"]),
10342
10430
  attendanceModes: z14.array(publicEventAttendanceModeAvailabilitySchema),
@@ -23184,7 +23272,7 @@ function resolveEventRequiresPayment(input) {
23184
23272
  if (!input.event) {
23185
23273
  return false;
23186
23274
  }
23187
- return publicEventPricingType(resolveRuntimeEventPricing(input.event)) !== "free";
23275
+ return publicEventPricingType(resolveRuntimeEventPricing(input.event)) === "paid";
23188
23276
  }
23189
23277
  function resolveDiscountContext(input) {
23190
23278
  const selection = input.paymentSelection.method ? input.paymentSelection : null;
@@ -23316,15 +23404,16 @@ function buildEventRegistrationShellBodyText(stepLabels) {
23316
23404
  return "Preparing dates, tickets, and booking details.";
23317
23405
  }
23318
23406
  function normalizeEventRegistrationEventInput(value) {
23319
- if (!isRecord7(value)) {
23407
+ if (!isRecord8(value)) {
23320
23408
  return value;
23321
23409
  }
23322
23410
  return {
23323
23411
  ...value,
23412
+ destination: resolveRuntimeEventDestination(value),
23324
23413
  pricing: resolveRuntimeEventPricing(value)
23325
23414
  };
23326
23415
  }
23327
- function isRecord7(value) {
23416
+ function isRecord8(value) {
23328
23417
  return typeof value === "object" && value !== null && !Array.isArray(value);
23329
23418
  }
23330
23419
  function buildEventRegistrationInteractiveIslandProps(props2) {
@@ -23350,6 +23439,7 @@ var init_event_registration_interactive = __esm({
23350
23439
  init_event_registration_shared();
23351
23440
  init_events();
23352
23441
  init_pricing2();
23442
+ init_destination();
23353
23443
  init_islands();
23354
23444
  init_runtime();
23355
23445
  init_contract_schemas();
@@ -24562,7 +24652,7 @@ var init_AgendaEventCard = __esm({
24562
24652
  showCapacity,
24563
24653
  onClick
24564
24654
  }) => {
24565
- const eventUrl = event.path;
24655
+ const eventLinkProps = resolveEventLinkProps(event);
24566
24656
  const categoryColor = event.eventCategory?.color || "rgb(var(--tb-accent))";
24567
24657
  const price = formatEventPrice(event);
24568
24658
  const { available, isFull } = getEventAvailability(event);
@@ -24623,7 +24713,7 @@ var init_AgendaEventCard = __esm({
24623
24713
  }
24624
24714
  );
24625
24715
  }
24626
- return /* @__PURE__ */ jsx46("a", { href: eventUrl, className: "event-agenda-card", children: cardContent });
24716
+ return /* @__PURE__ */ jsx46("a", { ...eventLinkProps, className: "event-agenda-card", children: cardContent });
24627
24717
  };
24628
24718
  }
24629
24719
  });
@@ -27574,22 +27664,22 @@ function AltchaWidget({
27574
27664
  if (typeof window === "undefined") return;
27575
27665
  let widget = null;
27576
27666
  Promise.resolve().then(() => (init_altcha(), altcha_exports)).then(() => {
27577
- if (!containerRef.current) return;
27667
+ if (containerRef.current === null) return;
27578
27668
  widget = document.createElement("altcha-widget");
27579
27669
  widget.setAttribute("challengeurl", challengeUrl);
27580
- if (auto) {
27670
+ if (auto === true) {
27581
27671
  widget.setAttribute("auto", "onload");
27582
27672
  }
27583
- if (hidelogo) {
27673
+ if (hidelogo === true) {
27584
27674
  widget.setAttribute("hidelogo", "true");
27585
27675
  }
27586
27676
  widget.setAttribute("hidefooter", "true");
27587
- if (className) {
27677
+ if (className !== void 0 && className.length > 0) {
27588
27678
  widget.className = className;
27589
27679
  }
27590
27680
  widget.addEventListener("statechange", ((event) => {
27591
27681
  const { state, payload } = event.detail;
27592
- if (state === "verified" && payload) {
27682
+ if (state === "verified" && payload !== void 0 && payload.length > 0) {
27593
27683
  onSolutionChange?.(payload);
27594
27684
  } else if (state === "error" || state === "expired") {
27595
27685
  onSolutionChange?.(null);
@@ -27600,7 +27690,7 @@ function AltchaWidget({
27600
27690
  console.error("Failed to load ALTCHA widget:", err3);
27601
27691
  });
27602
27692
  return () => {
27603
- if (widget && containerRef.current) {
27693
+ if (widget !== null && containerRef.current !== null) {
27604
27694
  containerRef.current.removeChild(widget);
27605
27695
  }
27606
27696
  };
@@ -27678,15 +27768,15 @@ var init_dist2 = __esm({
27678
27768
  // ../altcha/src/index.ts
27679
27769
  function getCmsApiUrl() {
27680
27770
  const env = process.env.RIVERBANK_ENV;
27681
- if (env) {
27771
+ if (env !== void 0 && env.length > 0) {
27682
27772
  const envKey = `RIVERBANK_${env.toUpperCase()}_DASHBOARD_URL`;
27683
27773
  const dashboardUrl2 = process.env[envKey];
27684
- if (dashboardUrl2) {
27774
+ if (dashboardUrl2 !== void 0 && dashboardUrl2.length > 0) {
27685
27775
  return `${dashboardUrl2.replace(/\/$/, "")}/api`;
27686
27776
  }
27687
27777
  }
27688
27778
  const dashboardUrl = process.env.NEXT_PUBLIC_DASHBOARD_URL;
27689
- if (dashboardUrl) {
27779
+ if (dashboardUrl !== void 0 && dashboardUrl.length > 0) {
27690
27780
  return `${dashboardUrl.replace(/\/$/, "")}/api`;
27691
27781
  }
27692
27782
  throw new Error("Dashboard URL not configured. Set NEXT_PUBLIC_DASHBOARD_URL");
@@ -28613,8 +28703,10 @@ function buildBookingPaymentOptionViewModel(input) {
28613
28703
  totalAmountCents: input.totalCents,
28614
28704
  config: input.option.config
28615
28705
  });
28706
+ const remainingBalance = Math.max(0, input.totalCents - dueToday);
28616
28707
  const formattedTotal = formatPrice(input.totalCents, input.currency, input.locale);
28617
28708
  const formattedDueToday = formatPrice(dueToday, input.currency, input.locale);
28709
+ const formattedRemainingBalance = formatPrice(remainingBalance, input.currency, input.locale);
28618
28710
  const dueAt = resolveFlexibleBalanceDueAt({
28619
28711
  bookingStartAt: input.bookingStartAt ?? (/* @__PURE__ */ new Date()).toISOString(),
28620
28712
  dueDateRule: input.option.config.dueDateRule
@@ -28631,6 +28723,7 @@ function buildBookingPaymentOptionViewModel(input) {
28631
28723
  summaryRows: [
28632
28724
  { label: "Total", value: formattedTotal },
28633
28725
  { label: "Due today", value: formattedDueToday },
28726
+ { label: "Remaining balance", value: formattedRemainingBalance },
28634
28727
  { label: "Balance due by", value: formatScheduleDate(dueAt, input.locale) },
28635
28728
  {
28636
28729
  label: "Deposit policy",
@@ -34132,6 +34225,33 @@ function toEventDirectPaymentOption(option, mode) {
34132
34225
  );
34133
34226
  }
34134
34227
  }
34228
+ function resolveEventRegistrationDirectPaymentSelection(input) {
34229
+ if (input.selection.method !== "stripe") {
34230
+ return { kind: "not-stripe" };
34231
+ }
34232
+ const fallbackOption = input.options[0];
34233
+ if (!fallbackOption) {
34234
+ return { kind: "unavailable" };
34235
+ }
34236
+ const requestedKind = input.selection.collectionOptionKind;
34237
+ const selectedOption = requestedKind == null ? input.options.find((option) => option.kind === "upfront") : input.options.find((option) => option.kind === requestedKind);
34238
+ if (selectedOption) {
34239
+ return {
34240
+ kind: "valid",
34241
+ selection: {
34242
+ method: "stripe",
34243
+ collectionOptionKind: selectedOption.kind
34244
+ }
34245
+ };
34246
+ }
34247
+ return {
34248
+ kind: "invalid",
34249
+ fallbackSelection: {
34250
+ method: "stripe",
34251
+ collectionOptionKind: fallbackOption.kind
34252
+ }
34253
+ };
34254
+ }
34135
34255
  var DEFAULT_EVENT_DIRECT_PAYMENT_OPTION;
34136
34256
  var init_eventPaymentOptions = __esm({
34137
34257
  "../blocks/src/system/runtime/nodes/event-registration/eventPaymentOptions.ts"() {
@@ -34191,6 +34311,9 @@ function formatDirectPaymentOptionDetail(option) {
34191
34311
  balanceDueBy ? `Balance due by: ${balanceDueBy.value}` : null
34192
34312
  ].filter((part) => Boolean(part)).join(" \xB7 ");
34193
34313
  }
34314
+ function isDirectPaymentOptionSelected(option, selectionState) {
34315
+ return selectionState.kind === "valid" && selectionState.selection.collectionOptionKind === option.kind;
34316
+ }
34194
34317
  var PaymentSelectionStep;
34195
34318
  var init_PaymentSelectionStep = __esm({
34196
34319
  "../blocks/src/system/runtime/nodes/event-registration/PaymentSelectionStep.tsx"() {
@@ -34219,8 +34342,28 @@ var init_PaymentSelectionStep = __esm({
34219
34342
  }) => {
34220
34343
  const occurrenceId = occurrenceContext?.id ?? event?.registrationOccurrenceId;
34221
34344
  const selectedMethod = selectedSelection.method;
34345
+ const totalPrice = eligibility?.price ? eligibility.price * ticketsCount : 0;
34346
+ const canShowDirectPaymentOptions = Boolean(
34347
+ eligibility?.eligible && eligibility.canPayDirectly && eligibility.price
34348
+ );
34349
+ const directPaymentOptions = eligibility && canShowDirectPaymentOptions ? buildEventRegistrationPaymentOptionsViewModel({
34350
+ eventTitle: event?.title ?? "Event",
34351
+ paymentTerms: event?.paymentTerms,
34352
+ totalPriceCents: totalPrice,
34353
+ currency: eligibility.currency,
34354
+ startsAt: occurrenceContext?.startsAt ?? event?.startsAt
34355
+ }).options : [];
34356
+ const directPaymentSelectionState = resolveEventRegistrationDirectPaymentSelection({
34357
+ options: directPaymentOptions,
34358
+ selection: selectedSelection
34359
+ });
34360
+ const directPaymentFallbackSelection = directPaymentSelectionState.kind === "invalid" ? directPaymentSelectionState.fallbackSelection : null;
34361
+ const directPaymentFallbackKind = directPaymentFallbackSelection?.collectionOptionKind;
34222
34362
  const canContinue = (() => {
34223
34363
  if (!selectedMethod) return false;
34364
+ if (selectedMethod === "stripe") {
34365
+ return directPaymentSelectionState.kind === "valid";
34366
+ }
34224
34367
  if (selectedMethod === "pass") return Boolean(selectedSelection.passId);
34225
34368
  if (selectedMethod === "membership")
34226
34369
  return Boolean(selectedSelection.membershipId);
@@ -34230,6 +34373,13 @@ var init_PaymentSelectionStep = __esm({
34230
34373
  return Boolean(selectedSelection.bundleMembershipId);
34231
34374
  return true;
34232
34375
  })();
34376
+ useEffect11(() => {
34377
+ if (!directPaymentFallbackKind) return;
34378
+ onSelectionChange({
34379
+ method: "stripe",
34380
+ collectionOptionKind: directPaymentFallbackKind
34381
+ });
34382
+ }, [directPaymentFallbackKind, onSelectionChange]);
34233
34383
  const getButtonText = useCallback6(() => {
34234
34384
  if (selectedMethod === "stripe") return "Continue to Payment";
34235
34385
  if (selectedMethod === "pass_bundle" || selectedMethod === "membership_bundle") {
@@ -34329,25 +34479,20 @@ var init_PaymentSelectionStep = __esm({
34329
34479
  ] }) })
34330
34480
  ] });
34331
34481
  }
34332
- const totalPrice = eligibility.price ? eligibility.price * ticketsCount : 0;
34333
- const directPaymentOptions = buildEventRegistrationPaymentOptionsViewModel({
34334
- eventTitle: event?.title ?? "Event",
34335
- paymentTerms: event?.paymentTerms,
34336
- totalPriceCents: totalPrice,
34337
- currency: eligibility.currency,
34338
- startsAt: occurrenceContext?.startsAt ?? event?.startsAt
34339
- }).options;
34340
34482
  const isMultiTicket = areEntitlementsDisabledForTicketCount(ticketsCount);
34341
34483
  return /* @__PURE__ */ jsxs59("div", { className: "er-stack", children: [
34342
34484
  /* @__PURE__ */ jsx82("h3", { className: "er-title", children: "Payment Options" }),
34343
34485
  /* @__PURE__ */ jsxs59("div", { className: "er-payment-tiles", children: [
34344
- eligibility.canPayDirectly && eligibility.price && /* @__PURE__ */ jsx82(Fragment13, { children: directPaymentOptions.map((option) => /* @__PURE__ */ jsx82(
34486
+ canShowDirectPaymentOptions && /* @__PURE__ */ jsx82(Fragment13, { children: directPaymentOptions.map((option) => /* @__PURE__ */ jsx82(
34345
34487
  PaymentTile,
34346
34488
  {
34347
34489
  icon: /* @__PURE__ */ jsx82(CreditCard, { size: 24, "aria-hidden": "true" }),
34348
34490
  label: option.label,
34349
34491
  detail: formatDirectPaymentOptionDetail(option),
34350
- selected: selectedMethod === "stripe" && (selectedSelection.collectionOptionKind ?? "upfront") === option.kind,
34492
+ selected: isDirectPaymentOptionSelected(
34493
+ option,
34494
+ directPaymentSelectionState
34495
+ ),
34351
34496
  onClick: () => onSelectionChange({
34352
34497
  method: "stripe",
34353
34498
  collectionOptionKind: option.kind
@@ -34872,6 +35017,24 @@ import { Fragment as Fragment16, jsx as jsx90, jsxs as jsxs65 } from "react/jsx-
34872
35017
  function isProductMethod(method) {
34873
35018
  return method !== null && ["pass", "membership", "pass_bundle", "membership_bundle"].includes(method);
34874
35019
  }
35020
+ function getSummaryRow(option, label) {
35021
+ return option.summaryRows.find((row) => row.label === label)?.value ?? null;
35022
+ }
35023
+ function getSelectedDirectPaymentOption(input) {
35024
+ const summaryEvent = input.wizard.selectedEvent ?? input.wizard.preSelectedEvent;
35025
+ if (!summaryEvent || input.wizard.paymentSelection.method !== "stripe") {
35026
+ return null;
35027
+ }
35028
+ const options = buildEventRegistrationPaymentOptionsViewModel({
35029
+ eventTitle: summaryEvent.title,
35030
+ paymentTerms: summaryEvent.paymentTerms,
35031
+ totalPriceCents: input.totalCents,
35032
+ currency: input.currency,
35033
+ startsAt: input.wizard.occurrenceContext?.startsAt ?? summaryEvent.startsAt
35034
+ }).options;
35035
+ const requestedKind = input.wizard.paymentSelection.collectionOptionKind ?? "upfront";
35036
+ return options.find((option) => option.kind === requestedKind) ?? options.find((option) => option.kind === "upfront") ?? options[0] ?? null;
35037
+ }
34875
35038
  function EventRegistrationSummaryBar(props2) {
34876
35039
  const { wizard } = props2;
34877
35040
  const summaryEvent = wizard.selectedEvent ?? wizard.preSelectedEvent;
@@ -34886,6 +35049,18 @@ function EventRegistrationSummaryBar(props2) {
34886
35049
  const autoAppliedDiscount = wizard.discountCode.trim().length > 0 ? null : wizard.autoAppliedDiscount;
34887
35050
  const autoAppliedDiscountCents = Math.max(0, autoAppliedDiscount?.computedAmountCents ?? 0);
34888
35051
  const discountedTotalCents = Math.max(0, subtotalCents - autoAppliedDiscountCents);
35052
+ const selectedDirectPaymentOption = getSelectedDirectPaymentOption({
35053
+ wizard,
35054
+ totalCents: discountedTotalCents,
35055
+ currency: summaryCurrency
35056
+ });
35057
+ const flexibleBalanceSummary = selectedDirectPaymentOption?.kind === "flexible_balance" ? {
35058
+ total: getSummaryRow(selectedDirectPaymentOption, "Total"),
35059
+ dueToday: getSummaryRow(selectedDirectPaymentOption, "Due today"),
35060
+ remainingBalance: getSummaryRow(selectedDirectPaymentOption, "Remaining balance"),
35061
+ balanceDueBy: getSummaryRow(selectedDirectPaymentOption, "Balance due by"),
35062
+ depositPolicy: getSummaryRow(selectedDirectPaymentOption, "Deposit policy")
35063
+ } : null;
34889
35064
  if (!summaryTitle) return null;
34890
35065
  const productMethod = isProductMethod(wizard.paymentSelection.method);
34891
35066
  return /* @__PURE__ */ jsxs65(Fragment16, { children: [
@@ -34929,6 +35104,22 @@ function EventRegistrationSummaryBar(props2) {
34929
35104
  summaryPrice > 0 && /* @__PURE__ */ jsx90("div", { className: "er-summary-bar-pricing", children: productMethod ? /* @__PURE__ */ jsxs65(Fragment16, { children: [
34930
35105
  /* @__PURE__ */ jsx90("span", { className: "er-summary-bar-price er-summary-bar-price--struck", children: formatPrice(summaryPrice * wizard.ticketsCount, summaryCurrency) }),
34931
35106
  /* @__PURE__ */ jsx90("div", { className: "er-summary-bar-included", children: wizard.paymentSelection.method === "pass" || wizard.paymentSelection.method === "pass_bundle" ? "1 pass credit" : "Included in membership" })
35107
+ ] }) : flexibleBalanceSummary ? /* @__PURE__ */ jsxs65(Fragment16, { children: [
35108
+ flexibleBalanceSummary.total ? /* @__PURE__ */ jsxs65("div", { className: "er-summary-bar-product-detail", children: [
35109
+ "Total: ",
35110
+ flexibleBalanceSummary.total
35111
+ ] }) : null,
35112
+ /* @__PURE__ */ jsx90("div", { className: "er-summary-bar-price", children: flexibleBalanceSummary.dueToday ?? formatPrice(discountedTotalCents, summaryCurrency) }),
35113
+ /* @__PURE__ */ jsx90("div", { className: "er-summary-bar-included", children: "Payable now" }),
35114
+ flexibleBalanceSummary.remainingBalance ? /* @__PURE__ */ jsxs65("div", { className: "er-summary-bar-product-detail", children: [
35115
+ "Remaining balance: ",
35116
+ flexibleBalanceSummary.remainingBalance,
35117
+ flexibleBalanceSummary.balanceDueBy ? ` due by ${flexibleBalanceSummary.balanceDueBy}` : ""
35118
+ ] }) : null,
35119
+ flexibleBalanceSummary.depositPolicy ? /* @__PURE__ */ jsxs65("div", { className: "er-summary-bar-product-detail", children: [
35120
+ "Deposit: ",
35121
+ flexibleBalanceSummary.depositPolicy
35122
+ ] }) : null
34932
35123
  ] }) : autoAppliedDiscount && autoAppliedDiscountCents > 0 ? /* @__PURE__ */ jsxs65(Fragment16, { children: [
34933
35124
  /* @__PURE__ */ jsx90("span", { className: "er-summary-bar-price er-summary-bar-price--struck", children: formatPrice(subtotalCents, summaryCurrency) }),
34934
35125
  /* @__PURE__ */ jsx90("div", { className: "er-summary-bar-price", children: formatPrice(discountedTotalCents, summaryCurrency) }),
@@ -34947,6 +35138,7 @@ var init_EventRegistrationSummaryBar = __esm({
34947
35138
  "use client";
34948
35139
  init_src();
34949
35140
  init_utils3();
35141
+ init_eventPaymentOptions();
34950
35142
  }
34951
35143
  });
34952
35144
 
@@ -39911,7 +40103,7 @@ var init_embla_carousel_autoplay_esm = __esm({
39911
40103
  function isObject(subject) {
39912
40104
  return Object.prototype.toString.call(subject) === "[object Object]";
39913
40105
  }
39914
- function isRecord8(subject) {
40106
+ function isRecord9(subject) {
39915
40107
  return isObject(subject) || Array.isArray(subject);
39916
40108
  }
39917
40109
  function canUseDOM() {
@@ -39928,7 +40120,7 @@ function areOptionsEqual(optionsA, optionsB) {
39928
40120
  const valueA = optionsA[key];
39929
40121
  const valueB = optionsB[key];
39930
40122
  if (typeof valueA === "function") return `${valueA}` === `${valueB}`;
39931
- if (!isRecord8(valueA) || !isRecord8(valueB)) return valueA === valueB;
40123
+ if (!isRecord9(valueA) || !isRecord9(valueB)) return valueA === valueB;
39932
40124
  return areOptionsEqual(valueA, valueB);
39933
40125
  });
39934
40126
  }
@@ -53705,7 +53897,7 @@ function renderCalendarSsr(display) {
53705
53897
  dayEvents.slice(0, MAX_EVENTS_PER_DAY).map((event) => /* @__PURE__ */ jsxs33(
53706
53898
  "a",
53707
53899
  {
53708
- href: event.path,
53900
+ ...resolveEventLinkProps(event),
53709
53901
  className: "event-calendar-event",
53710
53902
  title: `${event.title} at ${formatTime(event.startsAt, { timeZone: getEventTimeZone(event) })}`,
53711
53903
  children: [
@@ -53833,7 +54025,7 @@ function renderTimetableSsr(display) {
53833
54025
  day.events.length === 0 ? /* @__PURE__ */ jsx48("p", { className: "event-timetable-day-empty", children: "No classes" }) : day.events.map((cell) => /* @__PURE__ */ jsxs33(
53834
54026
  "a",
53835
54027
  {
53836
- href: cell.event.path,
54028
+ ...resolveEventLinkProps(cell.event),
53837
54029
  className: "event-timetable-event",
53838
54030
  title: `${cell.event.title}, ${cell.timeLabel}`,
53839
54031
  style: {
@@ -56315,7 +56507,7 @@ var MediaNode = ({
56315
56507
 
56316
56508
  // ../blocks/src/system/runtime/components/registry.client.tsx
56317
56509
  init_newsletter_form_client();
56318
- function isRecord9(value) {
56510
+ function isRecord10(value) {
56319
56511
  return typeof value === "object" && value !== null;
56320
56512
  }
56321
56513
  function buildRenderFromLooseProps(runtime, mode, props2) {
@@ -56335,14 +56527,14 @@ function withRuntimeBackedEnvelope(source, runtime, render) {
56335
56527
  function normalizeLegacyInteractiveRenderProps(runtime, mode, props2) {
56336
56528
  const source = props2;
56337
56529
  const render = props2["render"];
56338
- if (!isRecord9(render)) {
56530
+ if (!isRecord10(render)) {
56339
56531
  return withRuntimeBackedEnvelope(
56340
56532
  source,
56341
56533
  runtime,
56342
56534
  buildRenderFromLooseProps(runtime, mode, props2)
56343
56535
  );
56344
56536
  }
56345
- if (isRecord9(render["hydration"])) {
56537
+ if (isRecord10(render["hydration"])) {
56346
56538
  return withRuntimeBackedEnvelope(
56347
56539
  source,
56348
56540
  runtime,
@@ -56352,7 +56544,7 @@ function normalizeLegacyInteractiveRenderProps(runtime, mode, props2) {
56352
56544
  }
56353
56545
  );
56354
56546
  }
56355
- if (!isRecord9(render["display"])) {
56547
+ if (!isRecord10(render["display"])) {
56356
56548
  return withRuntimeBackedEnvelope(
56357
56549
  source,
56358
56550
  runtime,