@riverbankcms/sdk 0.90.1 → 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 (70) hide show
  1. package/dist/{PreviewEditorSidebar-FNFRVSIM.mjs → PreviewEditorSidebar-3TT47WCF.mjs} +3 -3
  2. package/dist/{PreviewEditorUI-3WXJFQXG.mjs → PreviewEditorUI-ORCLLUNZ.mjs} +3 -3
  3. package/dist/SdkPreviewModeRuntime-GMCDQPZZ.mjs +8 -0
  4. package/dist/_dts/blocks/src/system/manifest/fieldValidation/index.d.ts +17 -0
  5. package/dist/_dts/core/src/string.d.ts +12 -0
  6. package/dist/_dts/sdk/src/cli/sync/validation.d.ts +2 -2
  7. package/dist/_dts/sdk/src/version.d.ts +1 -1
  8. package/dist/{chunk-SYYJZPKU.mjs → chunk-AFPMCLS7.mjs} +2 -2
  9. package/dist/{chunk-H6TT5ZXI.mjs → chunk-GDT2QGIL.mjs} +1 -1
  10. package/dist/{chunk-CR2VX432.mjs → chunk-RQUZYSES.mjs} +48 -36
  11. package/dist/{chunk-FA6LVZ7C.mjs → chunk-S3YHJWEU.mjs} +7 -7
  12. package/dist/{chunk-UG7I7S7W.mjs → chunk-U5YM4AWE.mjs} +1 -1
  13. package/dist/{chunk-BOQXMCSP.mjs → chunk-ZA2S7H34.mjs} +3 -3
  14. package/dist/cli/index.mjs +204 -335
  15. package/dist/cli/init-docs/content/workflow-add-block.md +48 -0
  16. package/dist/cli/init-docs/content/workflow-custom-block.md +10 -0
  17. package/dist/client/{accordion-4K7VGZ3I.mjs → accordion-AFX37652.mjs} +2 -2
  18. package/dist/client/{bookingForm-3QXA3CIS.mjs → bookingForm-32V5QCOW.mjs} +6 -6
  19. package/dist/client/bookings.mjs +16 -15
  20. package/dist/client/{carousel-BEJKNGQ7.mjs → carousel-TJGQJ7ER.mjs} +3 -3
  21. package/dist/client/{cart-44BBM6XG.mjs → cart-JUU2JEW4.mjs} +6 -6
  22. package/dist/client/{checkout-THMHEYKF.mjs → checkout-RD6BTFX4.mjs} +6 -6
  23. package/dist/client/{chunk-JV7ZNAOU.mjs → chunk-6QZIBNGV.mjs} +8 -8
  24. package/dist/client/{chunk-DQIRKNZE.mjs → chunk-6RN62XBV.mjs} +1 -1
  25. package/dist/client/{chunk-ZIAF2DA4.mjs → chunk-C4LP6BPG.mjs} +1 -1
  26. package/dist/client/{chunk-SLY6UDAS.mjs → chunk-CKXEUWWA.mjs} +2 -2
  27. package/dist/client/{chunk-5AJIMWKS.mjs → chunk-E6VIWZUG.mjs} +3 -3
  28. package/dist/client/{chunk-PEDNDLPB.mjs → chunk-FMZZHAIR.mjs} +2 -2
  29. package/dist/client/{chunk-KNTLBQ3N.mjs → chunk-ISAUXU5R.mjs} +1 -1
  30. package/dist/client/{chunk-HIHOQGIP.mjs → chunk-LJCX6V7Q.mjs} +9 -9
  31. package/dist/client/{chunk-B4H6QMPY.mjs → chunk-MLBNVN4H.mjs} +7 -5
  32. package/dist/client/{chunk-EJBHK74Y.mjs → chunk-PMNAV6LO.mjs} +1 -1
  33. package/dist/client/{chunk-4COPESPO.mjs → chunk-RMOFBBNA.mjs} +5 -5
  34. package/dist/client/{chunk-3H5CLFKT.mjs → chunk-RWYFG625.mjs} +9 -8
  35. package/dist/client/client.mjs +34 -31
  36. package/dist/client/{courseRegistration-URX7RCCK.mjs → courseRegistration-X63QAIVV.mjs} +6 -6
  37. package/dist/client/{eventCalendar-GTENOQCE.mjs → eventCalendar-5T24GCZL.mjs} +9 -9
  38. package/dist/client/{eventCombined-EZVB72MF.mjs → eventCombined-AZVTF22X.mjs} +9 -9
  39. package/dist/client/{eventDetails-CH4BJR5Z.mjs → eventDetails-7GPFNLGF.mjs} +9 -9
  40. package/dist/client/{eventListing-4BVOI5HS.mjs → eventListing-QEUMTMUM.mjs} +9 -9
  41. package/dist/client/{eventRegistration-37LPIKIE.mjs → eventRegistration-P2EDKCQZ.mjs} +9 -9
  42. package/dist/client/{form-FX3Y54YK.mjs → form-NUJ7H4IN.mjs} +3 -3
  43. package/dist/client/{headerSection-UOZZGVYL.mjs → headerSection-JB7LECPL.mjs} +3 -3
  44. package/dist/client/hooks.mjs +7 -7
  45. package/dist/client/{locationMap-VSIPKV35.mjs → locationMap-UEYWUCSW.mjs} +3 -3
  46. package/dist/client/{newsletterForm-6FRJKNAF.mjs → newsletterForm-S2YZQ2X7.mjs} +3 -3
  47. package/dist/client/{productDetail-6AHMLXCO.mjs → productDetail-H5MADGG7.mjs} +6 -6
  48. package/dist/client/{productList-M2CYIZVH.mjs → productList-DK7YON7H.mjs} +6 -6
  49. package/dist/client/rendering/client.mjs +31 -28
  50. package/dist/client/rendering/islands.mjs +19 -19
  51. package/dist/client/rendering.mjs +33 -30
  52. package/dist/client/{shop-AUOT6GEX.mjs → shop-6PA7RDRJ.mjs} +6 -6
  53. package/dist/client/spam-protection.mjs +10 -10
  54. package/dist/preview-next/client/runtime.mjs +5 -5
  55. package/dist/{sdk-runtime-6GPJNLU6.mjs → sdk-runtime-JP5347OB.mjs} +6 -6
  56. package/dist/server/components.mjs +13 -11
  57. package/dist/server/config-validation.mjs +7 -7
  58. package/dist/server/config.mjs +7 -7
  59. package/dist/server/data.mjs +7 -7
  60. package/dist/server/index.mjs +1 -1
  61. package/dist/server/navigation.mjs +2 -2
  62. package/dist/server/next.mjs +14 -12
  63. package/dist/server/page-converter.mjs +5 -5
  64. package/dist/server/prebuild.mjs +1 -1
  65. package/dist/server/rendering/server.mjs +13 -11
  66. package/dist/server/rendering.mjs +13 -11
  67. package/dist/server/routing.mjs +14 -14
  68. package/dist/server/server.mjs +8 -8
  69. package/package.json +1 -1
  70. package/dist/SdkPreviewModeRuntime-2UCIMKUB.mjs +0 -8
@@ -3342,10 +3342,11 @@ function omitZeroAmountFutureRows(rows) {
3342
3342
  if (rows.length <= 1) {
3343
3343
  return rows;
3344
3344
  }
3345
- const [firstRow, ...futureRows] = rows;
3346
- if (!firstRow) {
3345
+ const firstRow = rows[0];
3346
+ if (firstRow === void 0) {
3347
3347
  return [];
3348
3348
  }
3349
+ const futureRows = rows.slice(1);
3349
3350
  return [
3350
3351
  firstRow,
3351
3352
  ...futureRows.filter((row) => row.amountCents > 0)
@@ -3390,11 +3391,11 @@ function isValidTimeZone(timeZone) {
3390
3391
  }
3391
3392
  function getSafeTimeZone(timeZone) {
3392
3393
  const normalized = typeof timeZone === "string" ? timeZone.trim() : "";
3393
- return normalized && isValidTimeZone(normalized) ? normalized : FALLBACK_TIMEZONE;
3394
+ return normalized.length > 0 && isValidTimeZone(normalized) ? normalized : FALLBACK_TIMEZONE;
3394
3395
  }
3395
3396
  function parseStrictBookingTimeZone(timeZone) {
3396
3397
  const normalized = timeZone.trim();
3397
- if (!normalized || !isValidTimeZone(normalized)) {
3398
+ if (normalized.length === 0 || !isValidTimeZone(normalized)) {
3398
3399
  return null;
3399
3400
  }
3400
3401
  return normalized;
@@ -3480,7 +3481,7 @@ function parseScheduledBookingDateTime(input) {
3480
3481
  try {
3481
3482
  const startsAt = toUtcIsoDateTimeString(input.startsAt);
3482
3483
  const timeZone = parseStrictBookingTimeZone(input.timeZone);
3483
- if (!timeZone) {
3484
+ if (timeZone === null) {
3484
3485
  return {
3485
3486
  ok: false,
3486
3487
  field: "timeZone",
@@ -3619,7 +3620,7 @@ function getBookingLocalDateKey(input) {
3619
3620
  }
3620
3621
  function parseBookingLocalDate(value) {
3621
3622
  const match = LOCAL_DATE_PATTERN.exec(value.trim());
3622
- if (!match?.groups) {
3623
+ if (match === null || match.groups === void 0) {
3623
3624
  throw new Error(`Invalid booking date format: "${value}" (expected YYYY-MM-DD)`);
3624
3625
  }
3625
3626
  const year = Number(match.groups.year);
@@ -3678,10 +3679,10 @@ function normalizeLocationAddressText(value) {
3678
3679
  return null;
3679
3680
  }
3680
3681
  const trimmed = value.trim();
3681
- return trimmed ? trimmed : null;
3682
+ return trimmed.length > 0 ? trimmed : null;
3682
3683
  }
3683
3684
  function hasLocationCoordinates(value) {
3684
- return typeof value?.lat === "number" && typeof value?.lng === "number";
3685
+ return value != null && typeof value.lat === "number" && typeof value.lng === "number";
3685
3686
  }
3686
3687
  function toLocationCoordinates(value) {
3687
3688
  if (!hasLocationCoordinates(value)) {
@@ -3698,6 +3699,13 @@ var init_location = __esm({
3698
3699
  }
3699
3700
  });
3700
3701
 
3702
+ // ../core/src/string.ts
3703
+ var init_string = __esm({
3704
+ "../core/src/string.ts"() {
3705
+ "use strict";
3706
+ }
3707
+ });
3708
+
3701
3709
  // ../core/src/business-address.ts
3702
3710
  var init_business_address = __esm({
3703
3711
  "../core/src/business-address.ts"() {
@@ -3838,13 +3846,6 @@ var init_slug = __esm({
3838
3846
  }
3839
3847
  });
3840
3848
 
3841
- // ../core/src/string.ts
3842
- var init_string = __esm({
3843
- "../core/src/string.ts"() {
3844
- "use strict";
3845
- }
3846
- });
3847
-
3848
3849
  // ../core/src/uuid.ts
3849
3850
  var init_uuid = __esm({
3850
3851
  "../core/src/uuid.ts"() {
@@ -8549,7 +8550,7 @@ function formatCalendarTitle(viewDate, view, days, monthNames = MONTH_NAMES) {
8549
8550
  if (view === "week") {
8550
8551
  const weekStart = days[0];
8551
8552
  const weekEnd = days[6];
8552
- if (!weekStart || !weekEnd) {
8553
+ if (weekStart === void 0 || weekEnd === void 0) {
8553
8554
  return `${monthNames[viewDate.getMonth()] ?? ""} ${viewDate.getFullYear()}`;
8554
8555
  }
8555
8556
  const startMonth = monthNames[weekStart.getMonth()] ?? "";
@@ -8681,7 +8682,9 @@ function getLocalDateKey(isoTimestamp, timeZone) {
8681
8682
  const year = parts.find((part) => part.type === "year")?.value;
8682
8683
  const month = parts.find((part) => part.type === "month")?.value;
8683
8684
  const day = parts.find((part) => part.type === "day")?.value;
8684
- 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;
8685
8688
  return `${year}-${month}-${day}`;
8686
8689
  }
8687
8690
  function isValidTimeZone2(timeZone) {
@@ -8938,7 +8941,7 @@ function enumerateDateKeys(startDateKey, endDateKey) {
8938
8941
  }
8939
8942
  function parseDateKey(dateKey) {
8940
8943
  const match = /^(\d{4})-(\d{2})-(\d{2})$/.exec(dateKey);
8941
- if (!match) {
8944
+ if (match === null) {
8942
8945
  throw new Error(`Invalid timetable date key: ${dateKey}`);
8943
8946
  }
8944
8947
  const [, year, month, day] = match;
@@ -8974,7 +8977,7 @@ function groupItemsByDate(items, accessors) {
8974
8977
  const dateKey = getLocalDateKey(startsAt, timeZone);
8975
8978
  if (dateKey == null) continue;
8976
8979
  const existing = grouped.get(dateKey);
8977
- if (existing) {
8980
+ if (existing !== void 0) {
8978
8981
  existing.push(item);
8979
8982
  } else {
8980
8983
  grouped.set(dateKey, [item]);
@@ -27661,22 +27664,22 @@ function AltchaWidget({
27661
27664
  if (typeof window === "undefined") return;
27662
27665
  let widget = null;
27663
27666
  Promise.resolve().then(() => (init_altcha(), altcha_exports)).then(() => {
27664
- if (!containerRef.current) return;
27667
+ if (containerRef.current === null) return;
27665
27668
  widget = document.createElement("altcha-widget");
27666
27669
  widget.setAttribute("challengeurl", challengeUrl);
27667
- if (auto) {
27670
+ if (auto === true) {
27668
27671
  widget.setAttribute("auto", "onload");
27669
27672
  }
27670
- if (hidelogo) {
27673
+ if (hidelogo === true) {
27671
27674
  widget.setAttribute("hidelogo", "true");
27672
27675
  }
27673
27676
  widget.setAttribute("hidefooter", "true");
27674
- if (className) {
27677
+ if (className !== void 0 && className.length > 0) {
27675
27678
  widget.className = className;
27676
27679
  }
27677
27680
  widget.addEventListener("statechange", ((event) => {
27678
27681
  const { state, payload } = event.detail;
27679
- if (state === "verified" && payload) {
27682
+ if (state === "verified" && payload !== void 0 && payload.length > 0) {
27680
27683
  onSolutionChange?.(payload);
27681
27684
  } else if (state === "error" || state === "expired") {
27682
27685
  onSolutionChange?.(null);
@@ -27687,7 +27690,7 @@ function AltchaWidget({
27687
27690
  console.error("Failed to load ALTCHA widget:", err3);
27688
27691
  });
27689
27692
  return () => {
27690
- if (widget && containerRef.current) {
27693
+ if (widget !== null && containerRef.current !== null) {
27691
27694
  containerRef.current.removeChild(widget);
27692
27695
  }
27693
27696
  };
@@ -27765,15 +27768,15 @@ var init_dist2 = __esm({
27765
27768
  // ../altcha/src/index.ts
27766
27769
  function getCmsApiUrl() {
27767
27770
  const env = process.env.RIVERBANK_ENV;
27768
- if (env) {
27771
+ if (env !== void 0 && env.length > 0) {
27769
27772
  const envKey = `RIVERBANK_${env.toUpperCase()}_DASHBOARD_URL`;
27770
27773
  const dashboardUrl2 = process.env[envKey];
27771
- if (dashboardUrl2) {
27774
+ if (dashboardUrl2 !== void 0 && dashboardUrl2.length > 0) {
27772
27775
  return `${dashboardUrl2.replace(/\/$/, "")}/api`;
27773
27776
  }
27774
27777
  }
27775
27778
  const dashboardUrl = process.env.NEXT_PUBLIC_DASHBOARD_URL;
27776
- if (dashboardUrl) {
27779
+ if (dashboardUrl !== void 0 && dashboardUrl.length > 0) {
27777
27780
  return `${dashboardUrl.replace(/\/$/, "")}/api`;
27778
27781
  }
27779
27782
  throw new Error("Dashboard URL not configured. Set NEXT_PUBLIC_DASHBOARD_URL");
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { buildResolveImageUrlContext, setContextResolveImageUrlContext, unsafeAsMediaAssetId } from '../chunk-3H5CLFKT.mjs';
2
+ import { buildResolveImageUrlContext, setContextResolveImageUrlContext, unsafeAsMediaAssetId } from '../chunk-RWYFG625.mjs';
3
3
  import { useEffect } from 'react';
4
4
 
5
5
  // src/rendering/islands/deferredVideoEmbeds.ts
@@ -80,24 +80,24 @@ function isSafeHttpsUrl(value) {
80
80
 
81
81
  // src/rendering/islands/hydrateBlocksIslands.ts
82
82
  var defaultEnhancerLoaders = {
83
- accordion: () => import('../accordion-4K7VGZ3I.mjs'),
84
- headerSection: () => import('../headerSection-UOZZGVYL.mjs'),
85
- carousel: () => import('../carousel-BEJKNGQ7.mjs'),
86
- form: () => import('../form-FX3Y54YK.mjs'),
87
- "booking-form": () => import('../bookingForm-3QXA3CIS.mjs'),
88
- "event-registration": () => import('../eventRegistration-37LPIKIE.mjs'),
89
- "event-details": () => import('../eventDetails-CH4BJR5Z.mjs'),
90
- "location-map": () => import('../locationMap-VSIPKV35.mjs'),
91
- "course-registration": () => import('../courseRegistration-URX7RCCK.mjs'),
92
- "event-listing": () => import('../eventListing-4BVOI5HS.mjs'),
93
- "event-calendar": () => import('../eventCalendar-GTENOQCE.mjs'),
94
- "event-combined": () => import('../eventCombined-EZVB72MF.mjs'),
95
- "product-list": () => import('../productList-M2CYIZVH.mjs'),
96
- "product-detail": () => import('../productDetail-6AHMLXCO.mjs'),
97
- "cart": () => import('../cart-44BBM6XG.mjs'),
98
- "checkout": () => import('../checkout-THMHEYKF.mjs'),
99
- shop: () => import('../shop-AUOT6GEX.mjs'),
100
- "newsletter-form": () => import('../newsletterForm-6FRJKNAF.mjs')
83
+ accordion: () => import('../accordion-AFX37652.mjs'),
84
+ headerSection: () => import('../headerSection-JB7LECPL.mjs'),
85
+ carousel: () => import('../carousel-TJGQJ7ER.mjs'),
86
+ form: () => import('../form-NUJ7H4IN.mjs'),
87
+ "booking-form": () => import('../bookingForm-32V5QCOW.mjs'),
88
+ "event-registration": () => import('../eventRegistration-P2EDKCQZ.mjs'),
89
+ "event-details": () => import('../eventDetails-7GPFNLGF.mjs'),
90
+ "location-map": () => import('../locationMap-UEYWUCSW.mjs'),
91
+ "course-registration": () => import('../courseRegistration-X63QAIVV.mjs'),
92
+ "event-listing": () => import('../eventListing-QEUMTMUM.mjs'),
93
+ "event-calendar": () => import('../eventCalendar-5T24GCZL.mjs'),
94
+ "event-combined": () => import('../eventCombined-AZVTF22X.mjs'),
95
+ "product-list": () => import('../productList-DK7YON7H.mjs'),
96
+ "product-detail": () => import('../productDetail-H5MADGG7.mjs'),
97
+ "cart": () => import('../cart-JUU2JEW4.mjs'),
98
+ "checkout": () => import('../checkout-RD6BTFX4.mjs'),
99
+ shop: () => import('../shop-6PA7RDRJ.mjs'),
100
+ "newsletter-form": () => import('../newsletterForm-S2YZQ2X7.mjs')
101
101
  };
102
102
  var DEFAULT_MAX_RETRIES = 2;
103
103
  var RETRY_DELAYS_MS = [250, 1e3];
@@ -473,10 +473,11 @@ function omitZeroAmountFutureRows(rows) {
473
473
  if (rows.length <= 1) {
474
474
  return rows;
475
475
  }
476
- const [firstRow, ...futureRows] = rows;
477
- if (!firstRow) {
476
+ const firstRow = rows[0];
477
+ if (firstRow === void 0) {
478
478
  return [];
479
479
  }
480
+ const futureRows = rows.slice(1);
480
481
  return [
481
482
  firstRow,
482
483
  ...futureRows.filter((row) => row.amountCents > 0)
@@ -521,11 +522,11 @@ function isValidTimeZone(timeZone) {
521
522
  }
522
523
  function getSafeTimeZone(timeZone) {
523
524
  const normalized = typeof timeZone === "string" ? timeZone.trim() : "";
524
- return normalized && isValidTimeZone(normalized) ? normalized : FALLBACK_TIMEZONE;
525
+ return normalized.length > 0 && isValidTimeZone(normalized) ? normalized : FALLBACK_TIMEZONE;
525
526
  }
526
527
  function parseStrictBookingTimeZone(timeZone) {
527
528
  const normalized = timeZone.trim();
528
- if (!normalized || !isValidTimeZone(normalized)) {
529
+ if (normalized.length === 0 || !isValidTimeZone(normalized)) {
529
530
  return null;
530
531
  }
531
532
  return normalized;
@@ -611,7 +612,7 @@ function parseScheduledBookingDateTime(input) {
611
612
  try {
612
613
  const startsAt = toUtcIsoDateTimeString(input.startsAt);
613
614
  const timeZone = parseStrictBookingTimeZone(input.timeZone);
614
- if (!timeZone) {
615
+ if (timeZone === null) {
615
616
  return {
616
617
  ok: false,
617
618
  field: "timeZone",
@@ -750,7 +751,7 @@ function getBookingLocalDateKey(input) {
750
751
  }
751
752
  function parseBookingLocalDate(value) {
752
753
  const match = LOCAL_DATE_PATTERN.exec(value.trim());
753
- if (!match?.groups) {
754
+ if (match === null || match.groups === void 0) {
754
755
  throw new Error(`Invalid booking date format: "${value}" (expected YYYY-MM-DD)`);
755
756
  }
756
757
  const year = Number(match.groups.year);
@@ -809,10 +810,10 @@ function normalizeLocationAddressText(value) {
809
810
  return null;
810
811
  }
811
812
  const trimmed = value.trim();
812
- return trimmed ? trimmed : null;
813
+ return trimmed.length > 0 ? trimmed : null;
813
814
  }
814
815
  function hasLocationCoordinates(value) {
815
- return typeof value?.lat === "number" && typeof value?.lng === "number";
816
+ return value != null && typeof value.lat === "number" && typeof value.lng === "number";
816
817
  }
817
818
  function toLocationCoordinates(value) {
818
819
  if (!hasLocationCoordinates(value)) {
@@ -829,6 +830,13 @@ var init_location = __esm({
829
830
  }
830
831
  });
831
832
 
833
+ // ../core/src/string.ts
834
+ var init_string = __esm({
835
+ "../core/src/string.ts"() {
836
+ "use strict";
837
+ }
838
+ });
839
+
832
840
  // ../core/src/business-address.ts
833
841
  var init_business_address = __esm({
834
842
  "../core/src/business-address.ts"() {
@@ -969,13 +977,6 @@ var init_slug = __esm({
969
977
  }
970
978
  });
971
979
 
972
- // ../core/src/string.ts
973
- var init_string = __esm({
974
- "../core/src/string.ts"() {
975
- "use strict";
976
- }
977
- });
978
-
979
980
  // ../core/src/uuid.ts
980
981
  var init_uuid = __esm({
981
982
  "../core/src/uuid.ts"() {
@@ -24439,7 +24440,7 @@ function formatCalendarTitle(viewDate, view, days, monthNames = MONTH_NAMES) {
24439
24440
  if (view === "week") {
24440
24441
  const weekStart = days[0];
24441
24442
  const weekEnd = days[6];
24442
- if (!weekStart || !weekEnd) {
24443
+ if (weekStart === void 0 || weekEnd === void 0) {
24443
24444
  return `${monthNames[viewDate.getMonth()] ?? ""} ${viewDate.getFullYear()}`;
24444
24445
  }
24445
24446
  const startMonth = monthNames[weekStart.getMonth()] ?? "";
@@ -24571,7 +24572,9 @@ function getLocalDateKey(isoTimestamp, timeZone) {
24571
24572
  const year = parts.find((part) => part.type === "year")?.value;
24572
24573
  const month = parts.find((part) => part.type === "month")?.value;
24573
24574
  const day = parts.find((part) => part.type === "day")?.value;
24574
- if (!year || !month || !day) return null;
24575
+ if (year === void 0 || year.length === 0) return null;
24576
+ if (month === void 0 || month.length === 0) return null;
24577
+ if (day === void 0 || day.length === 0) return null;
24575
24578
  return `${year}-${month}-${day}`;
24576
24579
  }
24577
24580
  function isValidTimeZone2(timeZone) {
@@ -24828,7 +24831,7 @@ function enumerateDateKeys(startDateKey, endDateKey) {
24828
24831
  }
24829
24832
  function parseDateKey(dateKey) {
24830
24833
  const match = /^(\d{4})-(\d{2})-(\d{2})$/.exec(dateKey);
24831
- if (!match) {
24834
+ if (match === null) {
24832
24835
  throw new Error(`Invalid timetable date key: ${dateKey}`);
24833
24836
  }
24834
24837
  const [, year, month, day] = match;
@@ -24864,7 +24867,7 @@ function groupItemsByDate(items, accessors) {
24864
24867
  const dateKey = getLocalDateKey(startsAt, timeZone);
24865
24868
  if (dateKey == null) continue;
24866
24869
  const existing = grouped.get(dateKey);
24867
- if (existing) {
24870
+ if (existing !== void 0) {
24868
24871
  existing.push(item);
24869
24872
  } else {
24870
24873
  grouped.set(dateKey, [item]);
@@ -37887,22 +37890,22 @@ function AltchaWidget({
37887
37890
  if (typeof window === "undefined") return;
37888
37891
  let widget = null;
37889
37892
  Promise.resolve().then(() => (init_altcha(), altcha_exports)).then(() => {
37890
- if (!containerRef.current) return;
37893
+ if (containerRef.current === null) return;
37891
37894
  widget = document.createElement("altcha-widget");
37892
37895
  widget.setAttribute("challengeurl", challengeUrl);
37893
- if (auto) {
37896
+ if (auto === true) {
37894
37897
  widget.setAttribute("auto", "onload");
37895
37898
  }
37896
- if (hidelogo) {
37899
+ if (hidelogo === true) {
37897
37900
  widget.setAttribute("hidelogo", "true");
37898
37901
  }
37899
37902
  widget.setAttribute("hidefooter", "true");
37900
- if (className) {
37903
+ if (className !== void 0 && className.length > 0) {
37901
37904
  widget.className = className;
37902
37905
  }
37903
37906
  widget.addEventListener("statechange", ((event) => {
37904
37907
  const { state, payload } = event.detail;
37905
- if (state === "verified" && payload) {
37908
+ if (state === "verified" && payload !== void 0 && payload.length > 0) {
37906
37909
  onSolutionChange?.(payload);
37907
37910
  } else if (state === "error" || state === "expired") {
37908
37911
  onSolutionChange?.(null);
@@ -37913,7 +37916,7 @@ function AltchaWidget({
37913
37916
  console.error("Failed to load ALTCHA widget:", err4);
37914
37917
  });
37915
37918
  return () => {
37916
- if (widget && containerRef.current) {
37919
+ if (widget !== null && containerRef.current !== null) {
37917
37920
  containerRef.current.removeChild(widget);
37918
37921
  }
37919
37922
  };
@@ -37959,15 +37962,15 @@ var init_dist2 = __esm({
37959
37962
  // ../altcha/src/index.ts
37960
37963
  function getCmsApiUrl() {
37961
37964
  const env = process.env.RIVERBANK_ENV;
37962
- if (env) {
37965
+ if (env !== void 0 && env.length > 0) {
37963
37966
  const envKey = `RIVERBANK_${env.toUpperCase()}_DASHBOARD_URL`;
37964
37967
  const dashboardUrl2 = process.env[envKey];
37965
- if (dashboardUrl2) {
37968
+ if (dashboardUrl2 !== void 0 && dashboardUrl2.length > 0) {
37966
37969
  return `${dashboardUrl2.replace(/\/$/, "")}/api`;
37967
37970
  }
37968
37971
  }
37969
37972
  const dashboardUrl = process.env.NEXT_PUBLIC_DASHBOARD_URL;
37970
- if (dashboardUrl) {
37973
+ if (dashboardUrl !== void 0 && dashboardUrl.length > 0) {
37971
37974
  return `${dashboardUrl.replace(/\/$/, "")}/api`;
37972
37975
  }
37973
37976
  throw new Error("Dashboard URL not configured. Set NEXT_PUBLIC_DASHBOARD_URL");
@@ -69057,11 +69060,11 @@ function extractRouteUpdatedAt(candidate) {
69057
69060
  }
69058
69061
  function resolveRouteTargetForStage(routeIdValue, routes, stageInput) {
69059
69062
  const routeId = typeof routeIdValue === "string" ? routeIdValue : null;
69060
- if (!routeId || !routes) return null;
69063
+ if (routeId === null || routeId.length === 0 || routes === void 0) return null;
69061
69064
  const routeEntry = routes[routeId];
69062
69065
  if (!isRouteVisibleInStage(routeEntry, stageInput)) return null;
69063
69066
  const href = extractRouteHref(routeEntry, stageInput);
69064
- if (!href) return null;
69067
+ if (href === null) return null;
69065
69068
  return {
69066
69069
  routeId,
69067
69070
  href,
@@ -1,15 +1,15 @@
1
- import { mountShopBlockIsland, ShopClient } from './chunk-4COPESPO.mjs';
2
- import './chunk-DQIRKNZE.mjs';
3
- import './chunk-EJBHK74Y.mjs';
1
+ import { mountShopBlockIsland, ShopClient } from './chunk-RMOFBBNA.mjs';
2
+ import './chunk-6RN62XBV.mjs';
3
+ import './chunk-PMNAV6LO.mjs';
4
4
  import './chunk-6N7YRNYU.mjs';
5
5
  import './chunk-L4J5Y62O.mjs';
6
- import './chunk-SLY6UDAS.mjs';
6
+ import './chunk-CKXEUWWA.mjs';
7
7
  import './chunk-3DCJ45Z2.mjs';
8
8
  import './chunk-WBQG7VJA.mjs';
9
9
  import './chunk-WHZQDPBZ.mjs';
10
10
  import './chunk-N7PBWBWQ.mjs';
11
- import { defineIslandPropsDecoder } from './chunk-B4H6QMPY.mjs';
12
- import './chunk-3H5CLFKT.mjs';
11
+ import { defineIslandPropsDecoder } from './chunk-MLBNVN4H.mjs';
12
+ import './chunk-RWYFG625.mjs';
13
13
 
14
14
  // src/rendering/islands/enhancers/shop.tsx
15
15
  var decode = defineIslandPropsDecoder("shop");
@@ -2781,22 +2781,22 @@ function AltchaWidget({
2781
2781
  if (typeof window === "undefined") return;
2782
2782
  let widget = null;
2783
2783
  Promise.resolve().then(() => (init_altcha(), altcha_exports)).then(() => {
2784
- if (!containerRef.current) return;
2784
+ if (containerRef.current === null) return;
2785
2785
  widget = document.createElement("altcha-widget");
2786
2786
  widget.setAttribute("challengeurl", challengeUrl);
2787
- if (auto) {
2787
+ if (auto === true) {
2788
2788
  widget.setAttribute("auto", "onload");
2789
2789
  }
2790
- if (hidelogo) {
2790
+ if (hidelogo === true) {
2791
2791
  widget.setAttribute("hidelogo", "true");
2792
2792
  }
2793
2793
  widget.setAttribute("hidefooter", "true");
2794
- if (className) {
2794
+ if (className !== void 0 && className.length > 0) {
2795
2795
  widget.className = className;
2796
2796
  }
2797
2797
  widget.addEventListener("statechange", ((event) => {
2798
2798
  const { state, payload } = event.detail;
2799
- if (state === "verified" && payload) {
2799
+ if (state === "verified" && payload !== void 0 && payload.length > 0) {
2800
2800
  onSolutionChange?.(payload);
2801
2801
  } else if (state === "error" || state === "expired") {
2802
2802
  onSolutionChange?.(null);
@@ -2807,7 +2807,7 @@ function AltchaWidget({
2807
2807
  console.error("Failed to load ALTCHA widget:", err);
2808
2808
  });
2809
2809
  return () => {
2810
- if (widget && containerRef.current) {
2810
+ if (widget !== null && containerRef.current !== null) {
2811
2811
  containerRef.current.removeChild(widget);
2812
2812
  }
2813
2813
  };
@@ -2821,22 +2821,22 @@ var encoder = new TextEncoder();
2821
2821
  // ../altcha/src/index.ts
2822
2822
  function getHmacKey() {
2823
2823
  const key = process.env.ALTCHA_HMAC_KEY;
2824
- return key && key.trim().length > 0 ? key : null;
2824
+ return key !== void 0 && key.trim().length > 0 ? key : null;
2825
2825
  }
2826
2826
  function hasSpamProtection() {
2827
2827
  return getHmacKey() !== null;
2828
2828
  }
2829
2829
  function getCmsApiUrl() {
2830
2830
  const env = process.env.RIVERBANK_ENV;
2831
- if (env) {
2831
+ if (env !== void 0 && env.length > 0) {
2832
2832
  const envKey = `RIVERBANK_${env.toUpperCase()}_DASHBOARD_URL`;
2833
2833
  const dashboardUrl2 = process.env[envKey];
2834
- if (dashboardUrl2) {
2834
+ if (dashboardUrl2 !== void 0 && dashboardUrl2.length > 0) {
2835
2835
  return `${dashboardUrl2.replace(/\/$/, "")}/api`;
2836
2836
  }
2837
2837
  }
2838
2838
  const dashboardUrl = process.env.NEXT_PUBLIC_DASHBOARD_URL;
2839
- if (dashboardUrl) {
2839
+ if (dashboardUrl !== void 0 && dashboardUrl.length > 0) {
2840
2840
  return `${dashboardUrl.replace(/\/$/, "")}/api`;
2841
2841
  }
2842
2842
  throw new Error("Dashboard URL not configured. Set NEXT_PUBLIC_DASHBOARD_URL");
@@ -1,24 +1,24 @@
1
1
  "use client";
2
- export { PreviewLayoutProvider, PreviewQueryProvider, createPreviewQueryClient, useOptionalPreviewLayout, usePreviewLayout } from '../../chunk-UG7I7S7W.mjs';
3
- import '../../chunk-BOQXMCSP.mjs';
2
+ export { PreviewLayoutProvider, PreviewQueryProvider, createPreviewQueryClient, useOptionalPreviewLayout, usePreviewLayout } from '../../chunk-U5YM4AWE.mjs';
3
+ import '../../chunk-ZA2S7H34.mjs';
4
4
  import '../../chunk-R7POPVJR.mjs';
5
5
  import React from 'react';
6
6
  import { jsx } from 'react/jsx-runtime';
7
7
 
8
8
  var LazySdkPreviewMode = React.lazy(async () => {
9
- const mod = await import('../../SdkPreviewModeRuntime-2UCIMKUB.mjs');
9
+ const mod = await import('../../SdkPreviewModeRuntime-GMCDQPZZ.mjs');
10
10
  return {
11
11
  default: mod.SdkPreviewModeRuntime
12
12
  };
13
13
  });
14
14
  var LazyPreviewShell = React.lazy(async () => {
15
- const mod = await import('../../sdk-runtime-6GPJNLU6.mjs');
15
+ const mod = await import('../../sdk-runtime-JP5347OB.mjs');
16
16
  return {
17
17
  default: mod.PreviewShell
18
18
  };
19
19
  });
20
20
  var LazyPreviewShellLayout = React.lazy(async () => {
21
- const mod = await import('../../sdk-runtime-6GPJNLU6.mjs');
21
+ const mod = await import('../../sdk-runtime-JP5347OB.mjs');
22
22
  return {
23
23
  default: mod.PreviewShellLayout
24
24
  };
@@ -1,8 +1,8 @@
1
1
  "use client";
2
- export { PreviewShell, PreviewShellLayout, SdkPreviewModeRuntime as SdkPreviewMode } from './chunk-FA6LVZ7C.mjs';
3
- export { PreviewLayoutProvider, PreviewQueryProvider, createPreviewQueryClient, useOptionalPreviewLayout, usePreviewLayout } from './chunk-UG7I7S7W.mjs';
4
- import './chunk-H6TT5ZXI.mjs';
5
- import './chunk-SYYJZPKU.mjs';
6
- import './chunk-CR2VX432.mjs';
7
- import './chunk-BOQXMCSP.mjs';
2
+ export { PreviewShell, PreviewShellLayout, SdkPreviewModeRuntime as SdkPreviewMode } from './chunk-S3YHJWEU.mjs';
3
+ export { PreviewLayoutProvider, PreviewQueryProvider, createPreviewQueryClient, useOptionalPreviewLayout, usePreviewLayout } from './chunk-U5YM4AWE.mjs';
4
+ import './chunk-GDT2QGIL.mjs';
5
+ import './chunk-AFPMCLS7.mjs';
6
+ import './chunk-RQUZYSES.mjs';
7
+ import './chunk-ZA2S7H34.mjs';
8
8
  import './chunk-R7POPVJR.mjs';
@@ -266,11 +266,11 @@ function isValidTimeZone(timeZone) {
266
266
  }
267
267
  function getSafeTimeZone(timeZone) {
268
268
  const normalized = typeof timeZone === "string" ? timeZone.trim() : "";
269
- return normalized && isValidTimeZone(normalized) ? normalized : FALLBACK_TIMEZONE;
269
+ return normalized.length > 0 && isValidTimeZone(normalized) ? normalized : FALLBACK_TIMEZONE;
270
270
  }
271
271
  function parseStrictBookingTimeZone(timeZone) {
272
272
  const normalized = timeZone.trim();
273
- if (!normalized || !isValidTimeZone(normalized)) {
273
+ if (normalized.length === 0 || !isValidTimeZone(normalized)) {
274
274
  return null;
275
275
  }
276
276
  return normalized;
@@ -347,7 +347,7 @@ function parseScheduledBookingDateTime(input) {
347
347
  try {
348
348
  const startsAt = toUtcIsoDateTimeString(input.startsAt);
349
349
  const timeZone = parseStrictBookingTimeZone(input.timeZone);
350
- if (!timeZone) {
350
+ if (timeZone === null) {
351
351
  return {
352
352
  ok: false,
353
353
  field: "timeZone",
@@ -482,10 +482,10 @@ function normalizeLocationAddressText(value) {
482
482
  return null;
483
483
  }
484
484
  const trimmed = value.trim();
485
- return trimmed ? trimmed : null;
485
+ return trimmed.length > 0 ? trimmed : null;
486
486
  }
487
487
  function hasLocationCoordinates(value) {
488
- return typeof value?.lat === "number" && typeof value?.lng === "number";
488
+ return value != null && typeof value.lat === "number" && typeof value.lng === "number";
489
489
  }
490
490
  function toLocationCoordinates(value) {
491
491
  if (!hasLocationCoordinates(value)) {
@@ -28510,7 +28510,7 @@ function formatCalendarTitle(viewDate, view, days, monthNames = MONTH_NAMES) {
28510
28510
  if (view === "week") {
28511
28511
  const weekStart = days[0];
28512
28512
  const weekEnd = days[6];
28513
- if (!weekStart || !weekEnd) {
28513
+ if (weekStart === void 0 || weekEnd === void 0) {
28514
28514
  return `${monthNames[viewDate.getMonth()] ?? ""} ${viewDate.getFullYear()}`;
28515
28515
  }
28516
28516
  const startMonth = monthNames[weekStart.getMonth()] ?? "";
@@ -28616,7 +28616,9 @@ function getLocalDateKey(isoTimestamp, timeZone) {
28616
28616
  const year = parts.find((part) => part.type === "year")?.value;
28617
28617
  const month = parts.find((part) => part.type === "month")?.value;
28618
28618
  const day = parts.find((part) => part.type === "day")?.value;
28619
- if (!year || !month || !day) return null;
28619
+ if (year === void 0 || year.length === 0) return null;
28620
+ if (month === void 0 || month.length === 0) return null;
28621
+ if (day === void 0 || day.length === 0) return null;
28620
28622
  return `${year}-${month}-${day}`;
28621
28623
  }
28622
28624
  var validTimeZoneCache = /* @__PURE__ */ new Map();
@@ -28873,7 +28875,7 @@ function enumerateDateKeys(startDateKey, endDateKey) {
28873
28875
  }
28874
28876
  function parseDateKey(dateKey) {
28875
28877
  const match = /^(\d{4})-(\d{2})-(\d{2})$/.exec(dateKey);
28876
- if (!match) {
28878
+ if (match === null) {
28877
28879
  throw new Error(`Invalid timetable date key: ${dateKey}`);
28878
28880
  }
28879
28881
  const [, year, month, day] = match;
@@ -28893,7 +28895,7 @@ function groupItemsByDate(items, accessors) {
28893
28895
  const dateKey = getLocalDateKey(startsAt, timeZone);
28894
28896
  if (dateKey == null) continue;
28895
28897
  const existing = grouped.get(dateKey);
28896
- if (existing) {
28898
+ if (existing !== void 0) {
28897
28899
  existing.push(item);
28898
28900
  } else {
28899
28901
  grouped.set(dateKey, [item]);
@@ -37964,11 +37966,11 @@ function extractRouteUpdatedAt(candidate) {
37964
37966
  }
37965
37967
  function resolveRouteTargetForStage(routeIdValue, routes, stageInput) {
37966
37968
  const routeId = typeof routeIdValue === "string" ? routeIdValue : null;
37967
- if (!routeId || !routes) return null;
37969
+ if (routeId === null || routeId.length === 0 || routes === void 0) return null;
37968
37970
  const routeEntry = routes[routeId];
37969
37971
  if (!isRouteVisibleInStage(routeEntry, stageInput)) return null;
37970
37972
  const href = extractRouteHref(routeEntry, stageInput);
37971
- if (!href) return null;
37973
+ if (href === null) return null;
37972
37974
  return {
37973
37975
  routeId,
37974
37976
  href,