@riverbankcms/sdk 0.78.0 → 0.78.2

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 (152) hide show
  1. package/README.md +45 -43
  2. package/dist/{PreviewEditorSidebar-RIKFQ72L.mjs → PreviewEditorSidebar-4DXLYX2V.mjs} +29 -21
  3. package/dist/{PreviewEditorUI-XO7TUWKK.mjs → PreviewEditorUI-CS5P4N3P.mjs} +4 -4
  4. package/dist/SdkPreviewModeRuntime-IJDHTW4W.mjs +8 -0
  5. package/dist/_dts/ai/src/contracts/proposals.d.ts +36 -0
  6. package/dist/_dts/api/src/contentRuntime.d.ts +1 -0
  7. package/dist/_dts/api/src/endpoints.d.ts +9 -0
  8. package/dist/_dts/api/src/index.d.ts +3 -3
  9. package/dist/_dts/api/src/public/types.d.ts +1 -1
  10. package/dist/_dts/api/src/request.d.ts +3 -11
  11. package/dist/_dts/api/src/sdkConfig/contracts.d.ts +1 -0
  12. package/dist/_dts/api/src/sdkContracts.d.ts +7 -1
  13. package/dist/_dts/api/src/siteManagementEndpoints.d.ts +10 -0
  14. package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +1 -0
  15. package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +15 -19
  16. package/dist/_dts/api/src/types.d.ts +11 -26
  17. package/dist/_dts/block-form/src/fields/types.d.ts +6 -0
  18. package/dist/_dts/block-form/src/widgets/RepeaterField/components/RepeaterList.d.ts +3 -2
  19. package/dist/_dts/block-form/src/widgets/RepeaterField/components/RepeaterRow.d.ts +6 -3
  20. package/dist/_dts/block-form/src/widgets/RepeaterField/components/RepeaterRowActions.d.ts +8 -3
  21. package/dist/_dts/block-form/src/widgets/RepeaterField/hooks/index.d.ts +1 -1
  22. package/dist/_dts/block-form/src/widgets/RepeaterField/hooks/useLinearRepeaterDnd.d.ts +1 -0
  23. package/dist/_dts/block-form/src/widgets/RepeaterField/hooks/useRepeaterPointerDragCapability.d.ts +1 -0
  24. package/dist/_dts/block-form/src/widgets/RepeaterField/hooks/useResolvedItemLabel.d.ts +7 -0
  25. package/dist/_dts/block-form/src/widgets/RepeaterField/utils/buildSummary.d.ts +1 -0
  26. package/dist/_dts/block-form/src/widgets/RepeaterField/utils/index.d.ts +3 -1
  27. package/dist/_dts/block-form/src/widgets/RepeaterField/utils/repeaterDndDomain.d.ts +1 -1
  28. package/dist/_dts/block-form/src/widgets/RepeaterField/utils/repeaterLabelSource.d.ts +15 -0
  29. package/dist/_dts/block-form/src/widgets/RepeaterField/utils/repeaterRowActionsDomain.d.ts +50 -0
  30. package/dist/_dts/blocks/src/system/blocks/appointment-booking.d.ts +591 -0
  31. package/dist/_dts/blocks/src/system/blocks/blog-listing.d.ts +591 -0
  32. package/dist/_dts/blocks/src/system/blocks/cart.d.ts +591 -0
  33. package/dist/_dts/blocks/src/system/blocks/checkout.d.ts +591 -0
  34. package/dist/_dts/blocks/src/system/blocks/collection.d.ts +591 -0
  35. package/dist/_dts/blocks/src/system/blocks/faq.d.ts +591 -0
  36. package/dist/_dts/blocks/src/system/blocks/gifting.d.ts +591 -0
  37. package/dist/_dts/blocks/src/system/blocks/location-map.d.ts +2 -0
  38. package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +47 -0
  39. package/dist/_dts/blocks/src/system/blocks/product-detail.d.ts +591 -0
  40. package/dist/_dts/blocks/src/system/blocks/product-list.d.ts +591 -0
  41. package/dist/_dts/blocks/src/system/blocks/shop.d.ts +591 -0
  42. package/dist/_dts/blocks/src/system/blocks/team-members.d.ts +3 -0
  43. package/dist/_dts/blocks/src/system/manifest/schema.d.ts +164 -0
  44. package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessBookingFlow.state.d.ts +1 -1
  45. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.headless.state.d.ts +1 -1
  46. package/dist/_dts/content-editor/src/index.d.ts +1 -1
  47. package/dist/_dts/content-editor/src/ui/editorSnapshot.d.ts +2 -2
  48. package/dist/_dts/content-model/src/content-types/schema.d.ts +14 -0
  49. package/dist/_dts/content-model/src/templates/bindingTypeCompatibility.d.ts +3 -1
  50. package/dist/_dts/content-model/src/templates/bindingValidation.d.ts +10 -4
  51. package/dist/_dts/content-model/src/templates/fieldPaths.d.ts +20 -0
  52. package/dist/_dts/content-model/src/templates/manifestAdapter.d.ts +5 -2
  53. package/dist/_dts/core/src/branded.d.ts +108 -85
  54. package/dist/_dts/core/src/csv-types.d.ts +2 -2
  55. package/dist/_dts/core/src/editor-state.d.ts +7 -7
  56. package/dist/_dts/core/src/participants.d.ts +2 -2
  57. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +11 -0
  58. package/dist/_dts/editor-blocks/src/blockPayload.d.ts +1 -1
  59. package/dist/_dts/media-editor/src/MediaEditor.d.ts +3 -1
  60. package/dist/_dts/media-editor/src/MediaPreview.d.ts +3 -1
  61. package/dist/_dts/media-editor/src/fieldUi.d.ts +5 -0
  62. package/dist/_dts/media-editor/src/index.d.ts +1 -1
  63. package/dist/_dts/sdk/src/cli/commands/push/consts.d.ts +1 -1
  64. package/dist/_dts/sdk/src/cli/commands/push/metadata.d.ts +2 -0
  65. package/dist/_dts/sdk/src/cli/commands/push/stale.d.ts +3 -3
  66. package/dist/_dts/sdk/src/cli/commands/push-execute.d.ts +7 -0
  67. package/dist/_dts/sdk/src/cli/commands/push.d.ts +2 -0
  68. package/dist/_dts/sdk/src/cli/content/reader.d.ts +13 -0
  69. package/dist/_dts/sdk/src/cli/content/writer.d.ts +2 -1
  70. package/dist/_dts/sdk/src/cli/helpers.d.ts +2 -0
  71. package/dist/_dts/sdk/src/cli/site-commands/commandKeys.d.ts +6 -6
  72. package/dist/_dts/sdk/src/cli/site-commands/commandRuntime.d.ts +5 -0
  73. package/dist/_dts/sdk/src/cli/site-commands/commandSurfaceDispatch.d.ts +4 -0
  74. package/dist/_dts/sdk/src/cli/site-commands/pageCommands.d.ts +5 -2
  75. package/dist/_dts/sdk/src/cli/site-commands/pushExecution.d.ts +10 -1
  76. package/dist/_dts/sdk/src/cli/site-commands/pushExecutionTypes.d.ts +1 -1
  77. package/dist/_dts/sdk/src/client/management/types.d.ts +6 -0
  78. package/dist/_dts/sdk/src/client/types.d.ts +2 -2
  79. package/dist/_dts/sdk/src/config/content-types.d.ts +7 -0
  80. package/dist/_dts/sdk/src/config/field-definitions.d.ts +2 -0
  81. package/dist/_dts/sdk/src/version.d.ts +1 -1
  82. package/dist/_dts/site-commands/src/commands.d.ts +3 -0
  83. package/dist/{altcha-B5XGSXP5.mjs → altcha-EKUEQ4RP.mjs} +1 -1
  84. package/dist/{chunk-NIDXI46P.mjs → chunk-4QEGTLK6.mjs} +1 -1
  85. package/dist/{chunk-TXDES5P2.mjs → chunk-6HYXHRAI.mjs} +5 -5
  86. package/dist/{chunk-SVMMM2NA.mjs → chunk-CR5HKAGU.mjs} +24 -5
  87. package/dist/{chunk-OECWLDHN.mjs → chunk-MCRQMPET.mjs} +1030 -588
  88. package/dist/{chunk-SXOLGNMX.mjs → chunk-OKMBEAXY.mjs} +1 -1
  89. package/dist/{chunk-XGB3TDIC.mjs → chunk-R7POPVJR.mjs} +2 -8
  90. package/dist/{chunk-F7RTCZYN.mjs → chunk-RGTOD4AJ.mjs} +20 -14
  91. package/dist/cli/index.mjs +681 -225
  92. package/dist/cli/init-docs/content/cli-reference.md +3 -2
  93. package/dist/cli/init-docs/content/content-management.md +2 -2
  94. package/dist/cli/init-docs/content/workflow-preview-mode.md +68 -2
  95. package/dist/client/{accordion-EVDEOUPR.mjs → accordion-PLYNJIIM.mjs} +2 -2
  96. package/dist/client/analytics.mjs +1 -1
  97. package/dist/client/{bookingForm-DIHBLC64.mjs → bookingForm-BXAP6AO7.mjs} +55 -48
  98. package/dist/client/bookings.mjs +62 -55
  99. package/dist/client/{carousel-FEBQHIWI.mjs → carousel-TRBXDHGF.mjs} +3 -3
  100. package/dist/client/{cart-7CKSXAE4.mjs → cart-Z7H3HJRS.mjs} +7 -7
  101. package/dist/client/{checkout-WKYCANLV.mjs → checkout-WAFCUBIX.mjs} +7 -7
  102. package/dist/client/{chunk-OFMSCGNY.mjs → chunk-75OUS5MT.mjs} +2 -2
  103. package/dist/client/{chunk-IVNCUVAV.mjs → chunk-AUJ5DBZJ.mjs} +18 -18
  104. package/dist/client/{chunk-36WJCERQ.mjs → chunk-CE7IBGVW.mjs} +3 -1
  105. package/dist/client/{chunk-RZDWX7QW.mjs → chunk-CWGTG37I.mjs} +1 -1
  106. package/dist/client/{chunk-YDSEG6GZ.mjs → chunk-DNRGY432.mjs} +2 -2
  107. package/dist/client/{chunk-RV6FX7UH.mjs → chunk-FUXW6VW2.mjs} +9 -9
  108. package/dist/client/{chunk-65F47D7Y.mjs → chunk-JGXPTEI2.mjs} +43 -36
  109. package/dist/client/{chunk-GUK2FPXQ.mjs → chunk-JRDUHZCT.mjs} +37 -15
  110. package/dist/client/{chunk-VPPMNXCF.mjs → chunk-UVQEJJTN.mjs} +2 -2
  111. package/dist/client/{chunk-F7LHOKEH.mjs → chunk-XSV6KW4D.mjs} +1 -1
  112. package/dist/client/{chunk-PD6NBCEY.mjs → chunk-ZFHRN6W2.mjs} +1 -1
  113. package/dist/client/{chunk-2SAVKN2M.mjs → chunk-ZI3LLBPZ.mjs} +2 -2
  114. package/dist/client/client.mjs +249 -160
  115. package/dist/client/{courseRegistration-5QF2PHKM.mjs → courseRegistration-AHFQHWIJ.mjs} +10 -10
  116. package/dist/client/{eventCalendar-4ZOSETDU.mjs → eventCalendar-LDXTV5R7.mjs} +9 -9
  117. package/dist/client/{eventCombined-WQGU7JUX.mjs → eventCombined-A4JGTNJO.mjs} +9 -9
  118. package/dist/client/{eventDetails-AYWVUJ5Y.mjs → eventDetails-4YXTZ7EG.mjs} +9 -9
  119. package/dist/client/{eventListing-NT7C6UT5.mjs → eventListing-P72TPFFM.mjs} +9 -9
  120. package/dist/client/{eventRegistration-OH24F4ZJ.mjs → eventRegistration-LSYJHGMT.mjs} +9 -9
  121. package/dist/client/{form-7L42SRBB.mjs → form-AOPYOKOW.mjs} +6 -3
  122. package/dist/client/{headerSection-OZRZNZ52.mjs → headerSection-5TFYDFVQ.mjs} +3 -3
  123. package/dist/client/hooks.mjs +78 -48
  124. package/dist/client/{locationMap-ZBXRPQ7C.mjs → locationMap-QSZ3ZVAZ.mjs} +3 -3
  125. package/dist/client/{newsletterForm-SNAGFF2I.mjs → newsletterForm-KTRHZY52.mjs} +2 -2
  126. package/dist/client/{productDetail-I46BOFGV.mjs → productDetail-N4E775RG.mjs} +7 -7
  127. package/dist/client/{productList-BOYHTYI6.mjs → productList-UGUQ2S45.mjs} +7 -7
  128. package/dist/client/rendering/client.mjs +173 -131
  129. package/dist/client/rendering/islands.mjs +19 -19
  130. package/dist/client/rendering.mjs +230 -150
  131. package/dist/client/{shop-XTXPZTKR.mjs → shop-VHSZEEQ2.mjs} +7 -7
  132. package/dist/preview-next/before-render.mjs +10 -1
  133. package/dist/preview-next/client/runtime.mjs +6 -6
  134. package/dist/preview-next/middleware.mjs +10 -1
  135. package/dist/preview-next/tailwind-sources.css +1 -0
  136. package/dist/sdk-runtime-WHPJEF5G.mjs +8 -0
  137. package/dist/server/components.mjs +101 -54
  138. package/dist/server/config-template-validation.mjs +221 -15
  139. package/dist/server/config-validation.mjs +76 -42
  140. package/dist/server/config.mjs +76 -42
  141. package/dist/server/data.mjs +77 -47
  142. package/dist/server/index.mjs +31 -10
  143. package/dist/server/next.mjs +133 -71
  144. package/dist/server/page-converter.mjs +60 -40
  145. package/dist/server/prebuild.mjs +1 -1
  146. package/dist/server/rendering/server.mjs +107 -60
  147. package/dist/server/rendering.mjs +111 -61
  148. package/dist/server/routing.mjs +93 -63
  149. package/dist/server/server.mjs +102 -57
  150. package/package.json +1 -1
  151. package/dist/SdkPreviewModeRuntime-LAGYMPNF.mjs +0 -8
  152. package/dist/sdk-runtime-ZJLKC6DR.mjs +0 -8
@@ -1,6 +1,6 @@
1
1
  "use client";
2
- import { ApiRequestError } from './chunk-SVMMM2NA.mjs';
3
- import { __commonJS, __export, __toESM, __require } from './chunk-XGB3TDIC.mjs';
2
+ import { ApiRequestError } from './chunk-CR5HKAGU.mjs';
3
+ import { __commonJS, __export, __toESM } from './chunk-R7POPVJR.mjs';
4
4
  import * as React63 from 'react';
5
5
  import React63__default, { forwardRef, createElement, createContext, useRef, useMemo, useEffect, useState, useCallback, useImperativeHandle, useLayoutEffect, useContext, memo, createRef, Component as Component$1, useDebugValue, useId as useId$1, useSyncExternalStore, isValidElement, cloneElement, useReducer, startTransition } from 'react';
6
6
  import z39, { z } from 'zod';
@@ -71,12 +71,12 @@ var require_classnames = __commonJS({
71
71
  });
72
72
 
73
73
  // ../core/src/editor-state.ts
74
- var asEditorSiteId = (value) => value;
75
- var asEditorPageId = (value) => value;
76
- var asEditorBlockId = (value) => value;
77
- var asEditorMetadataValues = (value) => value;
78
- var asEditorContentValues = (value) => value;
79
- var asEditorBlockValues = (value) => value;
74
+ var unsafeAsEditorSiteId = (value) => value;
75
+ var unsafeAsEditorPageId = (value) => value;
76
+ var unsafeAsEditorBlockId = (value) => value;
77
+ var unsafeAsEditorMetadataValues = (value) => value;
78
+ var unsafeAsEditorContentValues = (value) => value;
79
+ var unsafeAsEditorBlockValues = (value) => value;
80
80
  function createEditorInsertBlockCommand(block, draft, index2) {
81
81
  return {
82
82
  type: "insert-block",
@@ -98,14 +98,43 @@ function createEditorReorderBlocksCommand(blockIds) {
98
98
  };
99
99
  }
100
100
 
101
+ // ../core/src/result.ts
102
+ function ok(value) {
103
+ return { ok: true, value };
104
+ }
105
+ function err(error) {
106
+ return { ok: false, error };
107
+ }
108
+
101
109
  // ../core/src/branded.ts
102
- var asSiteId = (id) => id;
103
- var asMediaAssetId = (id) => id;
104
- var asFormId = (id) => id;
105
- var asPassId = (id) => id;
106
- var asCustomerPassId = (id) => id;
107
- var asAppointmentServiceId = (id) => id;
108
- var asAppointmentResourceId = (id) => id;
110
+ var UUID_PATTERN = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
111
+ function parseUuidBrand(value, unsafeConstructor) {
112
+ if (typeof value !== "string") {
113
+ return err({ kind: "not_string" });
114
+ }
115
+ const normalized = value.trim().toLowerCase();
116
+ if (normalized.length === 0) {
117
+ return err({ kind: "empty_string" });
118
+ }
119
+ if (!UUID_PATTERN.test(normalized)) {
120
+ return err({ kind: "invalid_uuid" });
121
+ }
122
+ return ok(unsafeConstructor(normalized));
123
+ }
124
+ function expectParsedBrandedId(result) {
125
+ if (!result.ok) {
126
+ throw new Error(`Expected a validated branded UUID (${result.error.kind}).`);
127
+ }
128
+ return result.value;
129
+ }
130
+ var unsafeAsSiteId = (id) => id;
131
+ var unsafeAsMediaAssetId = (id) => id;
132
+ var unsafeAsFormId = (id) => id;
133
+ var unsafeAsPassId = (id) => id;
134
+ var unsafeAsCustomerPassId = (id) => id;
135
+ var unsafeAsAppointmentServiceId = (id) => id;
136
+ var unsafeAsAppointmentResourceId = (id) => id;
137
+ var parseSiteId = (value) => parseUuidBrand(value, unsafeAsSiteId);
109
138
 
110
139
  // ../core/src/date-math.ts
111
140
  function addDaysToDate(date, dayCount) {
@@ -242,14 +271,6 @@ function assertNever2(value) {
242
271
  throw new Error(`Unexpected value: ${String(value)}`);
243
272
  }
244
273
 
245
- // ../core/src/result.ts
246
- function ok(value) {
247
- return { ok: true, value };
248
- }
249
- function err(error) {
250
- return { ok: false, error };
251
- }
252
-
253
274
  // ../core/src/booking-date-time.ts
254
275
  var DEFAULT_LOCALE = "en-US";
255
276
  var FALLBACK_TIMEZONE = "UTC";
@@ -28082,13 +28103,13 @@ function useDebouncedLatestSave(config) {
28082
28103
  const debouncedSave = c(performSave, delay, { maxWait });
28083
28104
  debouncedSaveRef.current = debouncedSave;
28084
28105
  const trigger = useCallback(() => {
28085
- debouncedSave();
28106
+ void debouncedSave();
28086
28107
  }, [debouncedSave]);
28087
28108
  const cancel = useCallback(() => {
28088
28109
  debouncedSave.cancel();
28089
28110
  }, [debouncedSave]);
28090
28111
  const flush = useCallback(() => {
28091
- debouncedSave.flush();
28112
+ void debouncedSave.flush();
28092
28113
  }, [debouncedSave]);
28093
28114
  const isPending = useCallback(() => {
28094
28115
  return debouncedSave.isPending();
@@ -29363,14 +29384,14 @@ function rotateNormalizedPoint(point, rotation) {
29363
29384
  const x2 = point.x;
29364
29385
  const y2 = point.y;
29365
29386
  switch (rotation) {
29387
+ case 0:
29388
+ return { x: x2, y: y2 };
29366
29389
  case 90:
29367
29390
  return { x: 1 - y2, y: x2 };
29368
29391
  case 180:
29369
29392
  return { x: 1 - x2, y: 1 - y2 };
29370
29393
  case 270:
29371
29394
  return { x: y2, y: 1 - x2 };
29372
- default:
29373
- return { x: x2, y: y2 };
29374
29395
  }
29375
29396
  }
29376
29397
  var transformStepSchema = z.object({
@@ -29814,6 +29835,8 @@ var uiSchema = z.object({
29814
29835
  mediaPickerAutoOpen: z.boolean().optional(),
29815
29836
  showMediaPreview: z.boolean().optional(),
29816
29837
  showMediaOverlayActions: z.boolean().optional(),
29838
+ mediaPreviewMaxWidth: z.enum(["xs", "sm", "md", "none"]).optional(),
29839
+ preventMediaPreviewUpscale: z.boolean().optional(),
29817
29840
  mediaDelivery: mediaDeliverySchema.optional(),
29818
29841
  mediaDeliveryByVariant: z.record(z.string(), mediaDeliverySchema).optional(),
29819
29842
  // Optional input hints for validators/widgets
@@ -30063,6 +30086,9 @@ var repeaterFieldSchema = baseFieldSchema.extend({
30063
30086
  type: z.literal("repeater"),
30064
30087
  itemLabel: z.string().default("Item"),
30065
30088
  itemLabelSource: z.string().optional(),
30089
+ showSummary: z.boolean().optional(),
30090
+ summaryFields: z.string().array().optional(),
30091
+ summaryMaxChars: z.number().int().positive().optional(),
30066
30092
  minItems: z.number().int().min(0).default(0),
30067
30093
  maxItems: z.number().int().positive().optional(),
30068
30094
  // Monomorphic mode
@@ -30716,7 +30742,7 @@ function normalizeStoredObjectChildren(children, value, ctx) {
30716
30742
  return normalized;
30717
30743
  }
30718
30744
  function normalizeStoredRepeaterItems(plan, value, ctx) {
30719
- if (!Array.isArray(value)) {
30745
+ if (!isUnknownArray(value)) {
30720
30746
  return value;
30721
30747
  }
30722
30748
  return value.map((item) => {
@@ -30763,7 +30789,7 @@ function normalizeObjectChildren(children, value, ctx) {
30763
30789
  return normalized;
30764
30790
  }
30765
30791
  function normalizeRepeaterItems(plan, value, ctx) {
30766
- if (!Array.isArray(value)) return value;
30792
+ if (!isUnknownArray(value)) return value;
30767
30793
  return value.map((item) => {
30768
30794
  if (!item || typeof item !== "object" || Array.isArray(item)) return item;
30769
30795
  const itemRecord = item;
@@ -31207,6 +31233,9 @@ function isEmptyValue(value) {
31207
31233
  function isPlainObject(value) {
31208
31234
  return Boolean(value && typeof value === "object" && !Array.isArray(value));
31209
31235
  }
31236
+ function isUnknownArray(value) {
31237
+ return Array.isArray(value);
31238
+ }
31210
31239
  function isValidRichTextDoc(value) {
31211
31240
  const doc3 = richTextDoc(value);
31212
31241
  return Boolean(isPlainObject(doc3) && doc3.type === "doc");
@@ -35176,13 +35205,13 @@ function generateShadowValue(elevation, softness, position = "bottom") {
35176
35205
  const xOffset = position === "bottom-right" ? config.offset : 0;
35177
35206
  const yOffset = config.offset;
35178
35207
  switch (softness) {
35208
+ case null:
35209
+ case "soft":
35210
+ return `${xOffset}px ${yOffset}px ${config.blur}px ${config.spread}px rgb(0 0 0 / 0.3)`;
35179
35211
  case "hard":
35180
35212
  return `${xOffset}px ${yOffset}px 0 0 rgb(0 0 0 / 1)`;
35181
35213
  case "crisp":
35182
35214
  return `${xOffset}px ${yOffset}px ${config.offset}px ${config.spread}px rgb(0 0 0 / 0.4)`;
35183
- case "soft":
35184
- default:
35185
- return `${xOffset}px ${yOffset}px ${config.blur}px ${config.spread}px rgb(0 0 0 / 0.3)`;
35186
35215
  }
35187
35216
  }
35188
35217
  var BORDER_WIDTH_MAP = {
@@ -45054,47 +45083,48 @@ function validateFieldDefinitions(fields3, fragmentId) {
45054
45083
  function prefixFieldId(field, scope) {
45055
45084
  const cloned = cloneFieldDefinition2(field);
45056
45085
  cloned.id = `${scope}.${field.id}`;
45057
- cloned.defaultValue = cloneUnknown(cloned.defaultValue);
45086
+ const defaultValue2 = cloned.defaultValue;
45087
+ cloned.defaultValue = cloneUnknown(defaultValue2);
45058
45088
  cloned.visibleRoles = cloned.visibleRoles ? [...cloned.visibleRoles] : void 0;
45059
45089
  cloned.ui = cloneUnknown(cloned.ui);
45060
45090
  return cloned;
45061
45091
  }
45062
45092
  function cloneFieldDefinition2(field) {
45063
- switch (field.type) {
45064
- case "repeater":
45065
- if (field.polymorphic && field.itemTypes) {
45066
- return {
45067
- ...field,
45068
- polymorphic: true,
45069
- itemTypes: Object.fromEntries(
45070
- Object.entries(field.itemTypes).map(([key, itemType]) => [
45071
- key,
45072
- {
45073
- ...itemType,
45074
- fields: itemType.fields.map(cloneFieldDefinition2)
45075
- }
45076
- ])
45077
- )
45078
- };
45079
- } else if (field.schema) {
45080
- return {
45081
- ...field,
45082
- schema: {
45083
- fields: field.schema.fields.map(cloneFieldDefinition2)
45084
- }
45085
- };
45086
- }
45087
- return { ...field };
45088
- case "group":
45093
+ if (field.type === "repeater") {
45094
+ if (field.polymorphic && field.itemTypes) {
45095
+ return {
45096
+ ...field,
45097
+ polymorphic: true,
45098
+ itemTypes: Object.fromEntries(
45099
+ Object.entries(field.itemTypes).map(([key, itemType]) => [
45100
+ key,
45101
+ {
45102
+ ...itemType,
45103
+ fields: itemType.fields.map(cloneFieldDefinition2)
45104
+ }
45105
+ ])
45106
+ )
45107
+ };
45108
+ }
45109
+ if (field.schema) {
45089
45110
  return {
45090
45111
  ...field,
45091
45112
  schema: {
45092
45113
  fields: field.schema.fields.map(cloneFieldDefinition2)
45093
45114
  }
45094
45115
  };
45095
- default:
45096
- return { ...field };
45116
+ }
45117
+ return { ...field };
45118
+ }
45119
+ if (field.type === "group") {
45120
+ return {
45121
+ ...field,
45122
+ schema: {
45123
+ fields: field.schema.fields.map(cloneFieldDefinition2)
45124
+ }
45125
+ };
45097
45126
  }
45127
+ return { ...field };
45098
45128
  }
45099
45129
  function cloneUnknown(value) {
45100
45130
  if (value == null || typeof value !== "object") {
@@ -47528,7 +47558,8 @@ function createBlockManifestWithContentShape(config, _contentShape) {
47528
47558
  return createBlockManifest(config);
47529
47559
  }
47530
47560
  function normalizeBlockLayout(layout) {
47531
- return Array.isArray(layout) ? [...layout] : layout;
47561
+ const rawLayout = layout;
47562
+ return Array.isArray(rawLayout) ? rawLayout : rawLayout;
47532
47563
  }
47533
47564
  function deriveComponentName(id) {
47534
47565
  const base2 = id.replace(/^block\./, "");
@@ -48979,16 +49010,20 @@ var marqueeLoopTransform = {
48979
49010
  summary: "Repeat an array to a minimum length, then duplicate it for seamless marquee looping",
48980
49011
  schema: marqueeLoopOptionsSchema,
48981
49012
  run: (value, options) => {
48982
- if (!Array.isArray(value) || value.length === 0) return [];
49013
+ const items = toUnknownArray(value);
49014
+ if (items.length === 0) return [];
48983
49015
  const minItems = options?.minItems ?? 10;
48984
49016
  const base2 = [];
48985
49017
  while (base2.length < minItems) {
48986
- base2.push(...value);
49018
+ base2.push(...items);
48987
49019
  if (base2.length > 1e3) break;
48988
49020
  }
48989
49021
  return [...base2, ...base2];
48990
49022
  }
48991
49023
  };
49024
+ function toUnknownArray(value) {
49025
+ return Array.isArray(value) ? value : [];
49026
+ }
48992
49027
  var formattingTransforms = [
48993
49028
  uppercaseTransform,
48994
49029
  fallbackTransform,
@@ -52682,8 +52717,8 @@ var eventSurfaceScopeValues = [
52682
52717
  "custom"
52683
52718
  ];
52684
52719
  var eventScheduleScopeValues = ["any", "recurring", "oneOff"];
52685
- var asEventCategoryId = (value) => value;
52686
- var asVenueId = (value) => value;
52720
+ var unsafeAsEventCategoryId = (value) => value;
52721
+ var unsafeAsVenueId = (value) => value;
52687
52722
  function normalizeEventBlockKind(value) {
52688
52723
  return value === "courses" || value === "events" ? value : "all";
52689
52724
  }
@@ -52709,10 +52744,10 @@ function normalizeEventCategoryIds(value) {
52709
52744
  if (Array.isArray(value)) {
52710
52745
  return normalizeIdList(
52711
52746
  value.filter((entry) => typeof entry === "string")
52712
- ).map(asEventCategoryId);
52747
+ ).map(unsafeAsEventCategoryId);
52713
52748
  }
52714
52749
  if (typeof value === "string") {
52715
- return normalizeIdList(value.split(",")).map(asEventCategoryId);
52750
+ return normalizeIdList(value.split(",")).map(unsafeAsEventCategoryId);
52716
52751
  }
52717
52752
  return [];
52718
52753
  }
@@ -52725,7 +52760,7 @@ function normalizeEventVenueId(value) {
52725
52760
  return null;
52726
52761
  }
52727
52762
  const trimmed = value.trim();
52728
- return trimmed ? asVenueId(trimmed) : null;
52763
+ return trimmed ? unsafeAsVenueId(trimmed) : null;
52729
52764
  }
52730
52765
  function normalizeEventStaffMemberId(value) {
52731
52766
  if (typeof value !== "string") {
@@ -55265,7 +55300,7 @@ function getProxyImageUrl(value, options, transformAspectRatio, resolved) {
55265
55300
  if (!shouldUseExplicitRectProxy(value, options, resolvedTransform, sourceWidth, sourceHeight)) return void 0;
55266
55301
  const params = buildProxyTransformParams(options, resolvedTransform);
55267
55302
  const proxyBasePath = getImageProxyBasePath();
55268
- const proxyUrl = getImageUrl({ id: asMediaAssetId(value.assetId) }, params, proxyBasePath);
55303
+ const proxyUrl = getImageUrl({ id: unsafeAsMediaAssetId(value.assetId) }, params, proxyBasePath);
55269
55304
  debugMediaNodeLog("resolve:proxy-img", { assetId: value.assetId, params, proxyBasePath, proxyUrl });
55270
55305
  return proxyUrl;
55271
55306
  }
@@ -63898,6 +63933,8 @@ var HeaderSectionNode = ({
63898
63933
  var header_section_server_default = markEditableSurfaceForwarding(HeaderSectionNode);
63899
63934
  function resolveColorStyle(color) {
63900
63935
  switch (color) {
63936
+ case void 0:
63937
+ return void 0;
63901
63938
  case "inherit":
63902
63939
  return { color: "inherit" };
63903
63940
  case "foreground":
@@ -67710,14 +67747,23 @@ function injectMediaSlotPath(props2, node, parsedBinding, context) {
67710
67747
  }
67711
67748
  function resolveChildren(nodes, context) {
67712
67749
  if (!nodes?.length) return [];
67713
- return nodes.flatMap((child, index2) => {
67750
+ const children = [];
67751
+ nodes.forEach((child, index2) => {
67714
67752
  const childContext = { ...context, scopes: [...context.scopes] };
67715
67753
  const resolved = resolveNode2(child, childContext, index2);
67716
67754
  if (Array.isArray(resolved)) {
67717
- return resolved.filter((item) => item !== null && item !== void 0);
67755
+ for (const item of resolved) {
67756
+ const childNode = item;
67757
+ if (isReactNode(childNode)) children.push(childNode);
67758
+ }
67759
+ return;
67718
67760
  }
67719
- return resolved !== null && resolved !== void 0 ? [resolved] : [];
67761
+ if (isReactNode(resolved)) children.push(resolved);
67720
67762
  });
67763
+ return children;
67764
+ }
67765
+ function isReactNode(value) {
67766
+ return value !== null && value !== void 0;
67721
67767
  }
67722
67768
  function resolveNode2(node, context, indexFallback) {
67723
67769
  if (!shouldRenderNode(node, context)) {
@@ -67926,8 +67972,11 @@ var BLOCK_PREFIX = "block.";
67926
67972
  function isPlainObject4(value) {
67927
67973
  return typeof value === "object" && value !== null && !Array.isArray(value);
67928
67974
  }
67975
+ function isUnknownArray2(value) {
67976
+ return Array.isArray(value);
67977
+ }
67929
67978
  function cloneValue(value) {
67930
- if (Array.isArray(value)) {
67979
+ if (isUnknownArray2(value)) {
67931
67980
  return value.map((item) => cloneValue(item));
67932
67981
  }
67933
67982
  if (isPlainObject4(value)) {
@@ -83886,7 +83935,7 @@ function normalizeComparable(value) {
83886
83935
  if (value === void 0 || value === "" || value === null) {
83887
83936
  return null;
83888
83937
  }
83889
- if (Array.isArray(value)) {
83938
+ if (isUnknownArray3(value)) {
83890
83939
  return value.map((entry) => normalizeComparable(entry));
83891
83940
  }
83892
83941
  if (typeof value === "object") {
@@ -83905,6 +83954,9 @@ function normalizeComparable(value) {
83905
83954
  }
83906
83955
  return value;
83907
83956
  }
83957
+ function isUnknownArray3(value) {
83958
+ return Array.isArray(value);
83959
+ }
83908
83960
 
83909
83961
  // ../content-editor/src/ui/editorSnapshot.ts
83910
83962
  var BASELINE_SYNC_STATE = { kind: "baseline" };
@@ -83920,13 +83972,13 @@ function cloneBrandedValues(value, cast) {
83920
83972
  return cloned ? cast(cloned) : null;
83921
83973
  }
83922
83974
  function cloneMetadataValues(value) {
83923
- return cloneBrandedValues(value, asEditorMetadataValues);
83975
+ return cloneBrandedValues(value, unsafeAsEditorMetadataValues);
83924
83976
  }
83925
83977
  function cloneContentValues(value) {
83926
- return cloneBrandedValues(value, asEditorContentValues);
83978
+ return cloneBrandedValues(value, unsafeAsEditorContentValues);
83927
83979
  }
83928
83980
  function cloneBlockValues(value) {
83929
- return cloneBrandedValues(value, asEditorBlockValues);
83981
+ return cloneBrandedValues(value, unsafeAsEditorBlockValues);
83930
83982
  }
83931
83983
  function createSyncState(baseline, current, failedMessage) {
83932
83984
  return recordsEqual(baseline, current) ? BASELINE_SYNC_STATE : PENDING_SYNC_STATE;
@@ -84061,7 +84113,7 @@ function normalizeEditorBlockId(value) {
84061
84113
  if (typeof value !== "string" || value.length === 0) {
84062
84114
  return null;
84063
84115
  }
84064
- return asEditorBlockId(value);
84116
+ return unsafeAsEditorBlockId(value);
84065
84117
  }
84066
84118
  function normalizeEditorBlock(block) {
84067
84119
  return {
@@ -84130,7 +84182,7 @@ function draftsRecordEqual(left, right) {
84130
84182
  if (leftKeys.length !== rightKeys.length) return false;
84131
84183
  for (const key of leftKeys) {
84132
84184
  if (!(key in right)) return false;
84133
- const draftId = asEditorBlockId(key);
84185
+ const draftId = unsafeAsEditorBlockId(key);
84134
84186
  const leftDraft = left[draftId];
84135
84187
  const rightDraft = right[draftId];
84136
84188
  if (!leftDraft || !rightDraft) return false;
@@ -84146,7 +84198,7 @@ function draftsRecordEqualIgnoringOrder(left, right) {
84146
84198
  if (leftKeys.length !== rightKeys.length) return false;
84147
84199
  for (const key of leftKeys) {
84148
84200
  if (!(key in right)) return false;
84149
- const draftId = asEditorBlockId(key);
84201
+ const draftId = unsafeAsEditorBlockId(key);
84150
84202
  const leftDraft = left[draftId];
84151
84203
  const rightDraft = right[draftId];
84152
84204
  if (!leftDraft || !rightDraft) return false;
@@ -84371,7 +84423,7 @@ function applyEditorCommand(snapshot, command2) {
84371
84423
  const source = snapshot.metadata.current ?? snapshot.metadata.baseline ?? {};
84372
84424
  const next = cloneRecord(source) ?? {};
84373
84425
  setAtPath(next, command2.path, command2.value);
84374
- const nextCurrent = asEditorMetadataValues(next);
84426
+ const nextCurrent = unsafeAsEditorMetadataValues(next);
84375
84427
  const nextMetadata = updateValueSnapshot(snapshot.metadata, cloneMetadataValues, {
84376
84428
  current: nextCurrent,
84377
84429
  syncState: createSyncState(snapshot.metadata.baseline, nextCurrent)
@@ -84398,7 +84450,7 @@ function applyEditorCommand(snapshot, command2) {
84398
84450
  const source = snapshot.content.current ?? snapshot.content.baseline ?? {};
84399
84451
  const next = cloneRecord(source) ?? {};
84400
84452
  setAtPath(next, command2.path, command2.value);
84401
- const nextCurrent = asEditorContentValues(next);
84453
+ const nextCurrent = unsafeAsEditorContentValues(next);
84402
84454
  const nextContent = updateValueSnapshot(snapshot.content, cloneContentValues, {
84403
84455
  current: nextCurrent,
84404
84456
  syncState: createSyncState(snapshot.content.baseline, nextCurrent)
@@ -84426,7 +84478,7 @@ function applyEditorCommand(snapshot, command2) {
84426
84478
  const source = draft.current ?? draft.baseline ?? {};
84427
84479
  const next = cloneRecord(source) ?? {};
84428
84480
  setAtPath(next, command2.path, command2.value);
84429
- const nextCurrent = asEditorBlockValues(next);
84481
+ const nextCurrent = unsafeAsEditorBlockValues(next);
84430
84482
  return updateDraftSnapshot(draft, {
84431
84483
  current: nextCurrent,
84432
84484
  syncState: createSyncState(draft.baseline, nextCurrent)
@@ -84883,7 +84935,7 @@ function replaceEditorBlockList(snapshot, blockList) {
84883
84935
  };
84884
84936
  }
84885
84937
  function getDraftSnapshot(snapshot, blockId) {
84886
- return snapshot.drafts[asEditorBlockId(blockId)] ?? null;
84938
+ return snapshot.drafts[unsafeAsEditorBlockId(blockId)] ?? null;
84887
84939
  }
84888
84940
  function inspectDrafts(snapshot) {
84889
84941
  const orderedIds = snapshot.blockList.map((block) => block.id).filter((blockId) => blockId !== null);
@@ -85170,7 +85222,7 @@ function hasUnpublishedChanges(snapshot) {
85170
85222
  }
85171
85223
  function normalizeDraftBlockBaselineInput(value) {
85172
85224
  const extracted = extractBlockData(value);
85173
- return extracted ? asEditorBlockValues(extracted) : null;
85225
+ return extracted ? unsafeAsEditorBlockValues(extracted) : null;
85174
85226
  }
85175
85227
  function getUserCommandCoalescingKey(command2) {
85176
85228
  switch (command2.type) {
@@ -85180,7 +85232,13 @@ function getUserCommandCoalescingKey(command2) {
85180
85232
  return typeof command2.value === "string" ? `content:${command2.path}` : null;
85181
85233
  case "set-block-value":
85182
85234
  return typeof command2.value === "string" ? `block:${command2.blockId}:${command2.path}` : null;
85183
- default:
85235
+ case "replace-metadata":
85236
+ case "replace-content":
85237
+ case "replace-block":
85238
+ case "insert-block":
85239
+ case "remove-block":
85240
+ case "reorder-blocks":
85241
+ case "batch":
85184
85242
  return null;
85185
85243
  }
85186
85244
  }
@@ -85333,22 +85391,22 @@ function createEditorUiStore(options = {}) {
85333
85391
  hydrate: (baseline, current, published) => {
85334
85392
  applySystemEditorOperation({
85335
85393
  type: "hydrate-metadata",
85336
- baseline: baseline ? asEditorMetadataValues(baseline) : null,
85337
- current: current ? asEditorMetadataValues(current) : void 0,
85338
- published: published ? asEditorMetadataValues(published) : void 0
85394
+ baseline: baseline ? unsafeAsEditorMetadataValues(baseline) : null,
85395
+ current: current ? unsafeAsEditorMetadataValues(current) : void 0,
85396
+ published: published ? unsafeAsEditorMetadataValues(published) : void 0
85339
85397
  });
85340
85398
  },
85341
85399
  setPublishedBaseline: (published) => {
85342
85400
  applySystemEditorOperation({
85343
85401
  type: "set-metadata-published-baseline",
85344
- published: published ? asEditorMetadataValues(published) : null
85402
+ published: published ? unsafeAsEditorMetadataValues(published) : null
85345
85403
  });
85346
85404
  },
85347
85405
  hasUnpublishedChanges: () => hasUnpublishedChanges(editorSnapshot.metadata),
85348
85406
  setBaseline: (baseline) => {
85349
85407
  applySystemEditorOperation({
85350
85408
  type: "hydrate-metadata",
85351
- baseline: baseline ? asEditorMetadataValues(baseline) : null,
85409
+ baseline: baseline ? unsafeAsEditorMetadataValues(baseline) : null,
85352
85410
  current: editorSnapshot.metadata.current,
85353
85411
  published: editorSnapshot.metadata.publishedBaseline
85354
85412
  });
@@ -85357,7 +85415,7 @@ function createEditorUiStore(options = {}) {
85357
85415
  applyUserEditorOperation({
85358
85416
  command: {
85359
85417
  type: "replace-metadata",
85360
- value: values ? asEditorMetadataValues(values) : null
85418
+ value: values ? unsafeAsEditorMetadataValues(values) : null
85361
85419
  }
85362
85420
  });
85363
85421
  },
@@ -85378,7 +85436,7 @@ function createEditorUiStore(options = {}) {
85378
85436
  autosaveSucceeded: (savedValues, acknowledgement) => {
85379
85437
  applySystemEditorOperation({
85380
85438
  type: "autosave-metadata-succeeded",
85381
- savedValues: savedValues ? asEditorMetadataValues(savedValues) : null,
85439
+ savedValues: savedValues ? unsafeAsEditorMetadataValues(savedValues) : null,
85382
85440
  acknowledgedVersion: acknowledgement?.acknowledgedVersion ?? editorSnapshot.metadata.version
85383
85441
  });
85384
85442
  },
@@ -85395,22 +85453,22 @@ function createEditorUiStore(options = {}) {
85395
85453
  hydrate: (baseline, current, published) => {
85396
85454
  applySystemEditorOperation({
85397
85455
  type: "hydrate-content",
85398
- baseline: baseline ? asEditorContentValues(baseline) : null,
85399
- current: current ? asEditorContentValues(current) : void 0,
85400
- published: published ? asEditorContentValues(published) : void 0
85456
+ baseline: baseline ? unsafeAsEditorContentValues(baseline) : null,
85457
+ current: current ? unsafeAsEditorContentValues(current) : void 0,
85458
+ published: published ? unsafeAsEditorContentValues(published) : void 0
85401
85459
  });
85402
85460
  },
85403
85461
  setPublishedBaseline: (published) => {
85404
85462
  applySystemEditorOperation({
85405
85463
  type: "set-content-published-baseline",
85406
- published: published ? asEditorContentValues(published) : null
85464
+ published: published ? unsafeAsEditorContentValues(published) : null
85407
85465
  });
85408
85466
  },
85409
85467
  hasUnpublishedChanges: () => hasUnpublishedChanges(editorSnapshot.content),
85410
85468
  setBaseline: (baseline) => {
85411
85469
  applySystemEditorOperation({
85412
85470
  type: "hydrate-content",
85413
- baseline: baseline ? asEditorContentValues(baseline) : null,
85471
+ baseline: baseline ? unsafeAsEditorContentValues(baseline) : null,
85414
85472
  current: editorSnapshot.content.current,
85415
85473
  published: editorSnapshot.content.publishedBaseline
85416
85474
  });
@@ -85419,7 +85477,7 @@ function createEditorUiStore(options = {}) {
85419
85477
  applyUserEditorOperation({
85420
85478
  command: {
85421
85479
  type: "replace-content",
85422
- value: values ? asEditorContentValues(values) : null
85480
+ value: values ? unsafeAsEditorContentValues(values) : null
85423
85481
  }
85424
85482
  });
85425
85483
  },
@@ -85440,7 +85498,7 @@ function createEditorUiStore(options = {}) {
85440
85498
  autosaveSucceeded: (savedValues, acknowledgement) => {
85441
85499
  applySystemEditorOperation({
85442
85500
  type: "autosave-content-succeeded",
85443
- savedValues: savedValues ? asEditorContentValues(savedValues) : null,
85501
+ savedValues: savedValues ? unsafeAsEditorContentValues(savedValues) : null,
85444
85502
  acknowledgedVersion: acknowledgement?.acknowledgedVersion ?? editorSnapshot.content.version
85445
85503
  });
85446
85504
  },
@@ -85510,7 +85568,7 @@ function createEditorUiStore(options = {}) {
85510
85568
  command: {
85511
85569
  type: "replace-block",
85512
85570
  blockId,
85513
- value: content ? asEditorBlockValues(content) : null
85571
+ value: content ? unsafeAsEditorBlockValues(content) : null
85514
85572
  }
85515
85573
  });
85516
85574
  if (changed) {
@@ -85569,7 +85627,7 @@ function createEditorUiStore(options = {}) {
85569
85627
  const changed = applySystemEditorOperation({
85570
85628
  type: "autosave-draft-succeeded",
85571
85629
  blockId,
85572
- savedValues: content ? asEditorBlockValues(content) : null,
85630
+ savedValues: content ? unsafeAsEditorBlockValues(content) : null,
85573
85631
  acknowledgedVersion: acknowledgement?.acknowledgedVersion ?? currentSnapshot?.version ?? 0
85574
85632
  });
85575
85633
  if (changed) {
@@ -86704,9 +86762,9 @@ function toBlockPublishedBaselines(publishedBlocks) {
86704
86762
  return null;
86705
86763
  }
86706
86764
  return publishedBlocks.map((block) => ({
86707
- id: asEditorBlockId(block.id),
86765
+ id: unsafeAsEditorBlockId(block.id),
86708
86766
  kind: block.kind,
86709
- publishedContent: block.publishedContent ? asEditorBlockValues(block.publishedContent) : null
86767
+ publishedContent: block.publishedContent ? unsafeAsEditorBlockValues(block.publishedContent) : null
86710
86768
  }));
86711
86769
  }
86712
86770
  function buildPublishSuccessTransition(input) {
@@ -87296,9 +87354,9 @@ function buildBlockPublishedBaselines(blocks) {
87296
87354
  const id = typeof block.id === "string" ? block.id : null;
87297
87355
  if (!id) continue;
87298
87356
  result.push({
87299
- id: asEditorBlockId(id),
87357
+ id: unsafeAsEditorBlockId(id),
87300
87358
  kind: block.kind,
87301
- publishedContent: block.publishedContent ? asEditorBlockValues(block.publishedContent) : null
87359
+ publishedContent: block.publishedContent ? unsafeAsEditorBlockValues(block.publishedContent) : null
87302
87360
  });
87303
87361
  }
87304
87362
  return result;
@@ -87635,7 +87693,7 @@ function toBlockValueRecord(value) {
87635
87693
  if (!value || typeof value !== "object" || Array.isArray(value)) {
87636
87694
  return null;
87637
87695
  }
87638
- return asEditorBlockValues(value);
87696
+ return unsafeAsEditorBlockValues(value);
87639
87697
  }
87640
87698
  function buildBlockCommand(blockId, path, value) {
87641
87699
  if (path) {
@@ -87674,7 +87732,7 @@ function useDraftsActions({ uiStore }) {
87674
87732
  (next) => {
87675
87733
  uiStore.getState().history.applyCommand({
87676
87734
  type: "replace-content",
87677
- value: next ? asEditorContentValues(next) : null
87735
+ value: next ? unsafeAsEditorContentValues(next) : null
87678
87736
  });
87679
87737
  },
87680
87738
  [uiStore]
@@ -87697,7 +87755,7 @@ function useDraftsActions({ uiStore }) {
87697
87755
  ...Object.prototype.hasOwnProperty.call(patch, "content") ? [
87698
87756
  {
87699
87757
  type: "replace-content",
87700
- value: patch.content ? asEditorContentValues(patch.content) : null
87758
+ value: patch.content ? unsafeAsEditorContentValues(patch.content) : null
87701
87759
  }
87702
87760
  ] : [],
87703
87761
  ...(patch.blocks ?? []).map(
@@ -87843,7 +87901,7 @@ function seedDraftBaselinesFromBlocks(uiStore, blocks) {
87843
87901
  const id = typeof block.id === "string" ? block.id : null;
87844
87902
  if (!id) continue;
87845
87903
  const baseline = block.content ?? block.draftContent ?? block.publishedContent ?? null;
87846
- const blockId = asEditorBlockId(id);
87904
+ const blockId = unsafeAsEditorBlockId(id);
87847
87905
  const meta = {
87848
87906
  kind: block.kind,
87849
87907
  orderIndex: block.orderIndex ?? null
@@ -87944,7 +88002,7 @@ async function restoreInsertedBlock(effect, context) {
87944
88002
  data: coerceDraftContentForApi(draftContent)
87945
88003
  });
87946
88004
  }
87947
- context.uiStore.getState().history.remapBlockId(effect.block.id, asEditorBlockId(nextBlockId));
88005
+ context.uiStore.getState().history.remapBlockId(effect.block.id, unsafeAsEditorBlockId(nextBlockId));
87948
88006
  } catch (error) {
87949
88007
  if (createdBlockId) {
87950
88008
  try {
@@ -88605,8 +88663,8 @@ function useInternalValue(props2) {
88605
88663
  previous,
88606
88664
  effects,
88607
88665
  apiClient,
88608
- siteId: asEditorSiteId(siteId),
88609
- pageId: asEditorPageId(entryId),
88666
+ siteId: unsafeAsEditorSiteId(siteId),
88667
+ pageId: unsafeAsEditorPageId(entryId),
88610
88668
  uiStore,
88611
88669
  setErrorMessage
88612
88670
  });
@@ -110093,6 +110151,12 @@ function isObjectRecord3(value) {
110093
110151
  function isSnapshotDirty(snapshot) {
110094
110152
  return snapshot?.syncState.kind === "pending";
110095
110153
  }
110154
+ function isUnknownArray4(value) {
110155
+ return Array.isArray(value);
110156
+ }
110157
+ function toUnknownArray2(value) {
110158
+ return isUnknownArray4(value) ? [...value] : [];
110159
+ }
110096
110160
  function generateId2() {
110097
110161
  if (typeof crypto !== "undefined" && crypto.randomUUID) {
110098
110162
  return crypto.randomUUID();
@@ -110257,7 +110321,7 @@ function createStoreBackend(options) {
110257
110321
  arrayField: {
110258
110322
  append: (path, value) => {
110259
110323
  const raw = scope === "blocks" ? getBlocksSlice().getAtPath(getBlockId(), path) : getRootSlice().getAtPath(path);
110260
- const currentArray = Array.isArray(raw) ? raw : [];
110324
+ const currentArray = toUnknownArray2(raw);
110261
110325
  const newArray = [...currentArray, value];
110262
110326
  if (scope === "blocks") {
110263
110327
  getBlocksSlice().setAtPath(getBlockId(), path, newArray);
@@ -110269,7 +110333,7 @@ function createStoreBackend(options) {
110269
110333
  },
110270
110334
  remove: (path, index2) => {
110271
110335
  const raw = scope === "blocks" ? getBlocksSlice().getAtPath(getBlockId(), path) : getRootSlice().getAtPath(path);
110272
- const currentArray = Array.isArray(raw) ? raw : [];
110336
+ const currentArray = toUnknownArray2(raw);
110273
110337
  const newArray = currentArray.filter((_2, i2) => i2 !== index2);
110274
110338
  if (scope === "blocks") {
110275
110339
  getBlocksSlice().setAtPath(getBlockId(), path, newArray);
@@ -110281,7 +110345,7 @@ function createStoreBackend(options) {
110281
110345
  },
110282
110346
  move: (path, from2, to) => {
110283
110347
  const raw = scope === "blocks" ? getBlocksSlice().getAtPath(getBlockId(), path) : getRootSlice().getAtPath(path);
110284
- const currentArray = Array.isArray(raw) ? raw : [];
110348
+ const currentArray = toUnknownArray2(raw);
110285
110349
  const newArray = [...currentArray];
110286
110350
  const [removed] = newArray.splice(from2, 1);
110287
110351
  if (removed !== void 0) newArray.splice(to, 0, removed);
@@ -110295,7 +110359,7 @@ function createStoreBackend(options) {
110295
110359
  },
110296
110360
  insert: (path, index2, value) => {
110297
110361
  const raw = scope === "blocks" ? getBlocksSlice().getAtPath(getBlockId(), path) : getRootSlice().getAtPath(path);
110298
- const currentArray = Array.isArray(raw) ? raw : [];
110362
+ const currentArray = toUnknownArray2(raw);
110299
110363
  const newArray = [...currentArray];
110300
110364
  newArray.splice(index2, 0, value);
110301
110365
  if (scope === "blocks") {
@@ -110647,9 +110711,14 @@ function buildRepeaterFieldSchema(field, ctx) {
110647
110711
  }
110648
110712
 
110649
110713
  // ../block-form/src/widgets/RepeaterField/repeaterFieldDefaults.ts
110714
+ function isRecordArray(value) {
110715
+ return Array.isArray(value) && value.every((item) => {
110716
+ return typeof item === "object" && item !== null && !Array.isArray(item);
110717
+ });
110718
+ }
110650
110719
  function getRepeaterFieldDefault(field, ctx) {
110651
110720
  if (field.defaultValue !== void 0) {
110652
- return Array.isArray(field.defaultValue) ? field.defaultValue : [];
110721
+ return isRecordArray(field.defaultValue) ? field.defaultValue : [];
110653
110722
  }
110654
110723
  const minItems = field.minItems ?? 0;
110655
110724
  if (minItems > 0) {
@@ -110914,7 +110983,7 @@ function buildFieldSchema(field, ctx) {
110914
110983
  const builder = SCHEMA_BUILDERS[field.type];
110915
110984
  if (!builder) {
110916
110985
  console.warn(`No schema builder registered for field type: ${field.type}`);
110917
- return __require("zod").z.any();
110986
+ return z.any();
110918
110987
  }
110919
110988
  return builder(field, ctx);
110920
110989
  }
@@ -112173,6 +112242,9 @@ function useRepeaterVisibility(field, backend, path) {
112173
112242
  }, [visibleWhen, watchedValue]);
112174
112243
  return !isHidden2 && satisfiesCondition;
112175
112244
  }
112245
+ function toUnknownArray3(value) {
112246
+ return Array.isArray(value) ? value : [];
112247
+ }
112176
112248
  function useRepeaterRowErrors(field, index2, backend, basePath) {
112177
112249
  return useMemo(() => {
112178
112250
  const errorsRoot = backend.formState.errors;
@@ -112210,8 +112282,8 @@ function useRepeaterRowErrors(field, index2, backend, basePath) {
112210
112282
  const childRepeater = child;
112211
112283
  const itemsValue = getChildValue(valueNode, child.id);
112212
112284
  const itemsError = getChildValue(errorNode, child.id);
112213
- const valueArray = Array.isArray(itemsValue) ? itemsValue : [];
112214
- const errorArray = Array.isArray(itemsError) ? itemsError : [];
112285
+ const valueArray = toUnknownArray3(itemsValue);
112286
+ const errorArray = toUnknownArray3(itemsError);
112215
112287
  const nextBasePath = [...relativePath, child.id];
112216
112288
  const maxLength = Math.max(valueArray.length, errorArray.length);
112217
112289
  for (let itemIndex = 0; itemIndex < maxLength; itemIndex += 1) {
@@ -113454,7 +113526,7 @@ function AltchaWidget({
113454
113526
  useEffect(() => {
113455
113527
  if (typeof window === "undefined") return;
113456
113528
  let widget = null;
113457
- import('./altcha-B5XGSXP5.mjs').then(() => {
113529
+ import('./altcha-EKUEQ4RP.mjs').then(() => {
113458
113530
  if (!containerRef.current) return;
113459
113531
  widget = document.createElement("altcha-widget");
113460
113532
  widget.setAttribute("challengeurl", challengeUrl);
@@ -113731,7 +113803,7 @@ function useAvailableDates({
113731
113803
  const endDate = formatLocalScheduleDate(
113732
113804
  addLocalScheduleDays(parseBookingLocalDate(today), initialDays)
113733
113805
  );
113734
- fetchDates(today, endDate, false);
113806
+ void fetchDates(today, endDate, false);
113735
113807
  }, [serviceId, fetchDates, initialDays]);
113736
113808
  useVisibleTabPolling({
113737
113809
  enabled: Boolean(serviceId && loadedRange),
@@ -113751,7 +113823,7 @@ function useAvailableDates({
113751
113823
  BOOKING_FETCH_CHUNK_DAYS
113752
113824
  )
113753
113825
  );
113754
- fetchDates(start, end, true);
113826
+ void fetchDates(start, end, true);
113755
113827
  }, [fetchDates, isLoading]);
113756
113828
  return {
113757
113829
  availableDates,
@@ -113811,7 +113883,7 @@ function useAvailableSlots({
113811
113883
  setSlots(
113812
113884
  result.slots.map((slot) => ({
113813
113885
  ...slot,
113814
- resourceId: asAppointmentResourceId(slot.resourceId)
113886
+ resourceId: unsafeAsAppointmentResourceId(slot.resourceId)
113815
113887
  }))
113816
113888
  );
113817
113889
  setHasLoaded(true);
@@ -113978,7 +114050,7 @@ function useDiscountCodeUi(options) {
113978
114050
  if (!cancelled) setDiscountsAvailableLoading(false);
113979
114051
  }
113980
114052
  }
113981
- checkDiscountAvailability();
114053
+ void checkDiscountAvailability();
113982
114054
  return () => {
113983
114055
  cancelled = true;
113984
114056
  };
@@ -114254,7 +114326,7 @@ function formatScheduleDate(isoString, locale) {
114254
114326
  }
114255
114327
 
114256
114328
  // ../blocks/src/system/runtime/nodes/booking-form.headless.state.ts
114257
- var asBookingFieldId = (id) => id;
114329
+ var unsafeAsBookingFieldId = (id) => id;
114258
114330
  function createEmptyBookingValidationErrors() {
114259
114331
  return { formError: null, fieldErrors: {} };
114260
114332
  }
@@ -114324,13 +114396,13 @@ function toOptionalBrandedId(value, brand) {
114324
114396
  return trimmed ? brand(trimmed) : void 0;
114325
114397
  }
114326
114398
  function toOptionalAppointmentServiceId(value) {
114327
- return toOptionalBrandedId(value, asAppointmentServiceId);
114399
+ return toOptionalBrandedId(value, unsafeAsAppointmentServiceId);
114328
114400
  }
114329
114401
  function toOptionalAppointmentResourceId(value) {
114330
- return toOptionalBrandedId(value, asAppointmentResourceId);
114402
+ return toOptionalBrandedId(value, unsafeAsAppointmentResourceId);
114331
114403
  }
114332
114404
  function toOptionalCustomerPassId(value) {
114333
- return toOptionalBrandedId(value, asCustomerPassId);
114405
+ return toOptionalBrandedId(value, unsafeAsCustomerPassId);
114334
114406
  }
114335
114407
  function isBookingFieldValue(value) {
114336
114408
  return value === null || typeof value === "string" || typeof value === "number" || typeof value === "boolean" || Array.isArray(value) && value.every((item) => typeof item === "string");
@@ -114484,7 +114556,7 @@ function toBookingSlotView(slot) {
114484
114556
  key: `${slot.startAt}|${slot.endAt}|${slot.resourceId}`,
114485
114557
  startAt: slot.startAt,
114486
114558
  endAt: slot.endAt,
114487
- resourceId: asAppointmentResourceId(slot.resourceId),
114559
+ resourceId: unsafeAsAppointmentResourceId(slot.resourceId),
114488
114560
  ...slot.resourceName ? { resourceName: slot.resourceName } : {},
114489
114561
  ...slot.label ? { label: slot.label } : {}
114490
114562
  };
@@ -114606,29 +114678,30 @@ function validateBookingField(field, value) {
114606
114678
  }
114607
114679
  if (isBlankFieldValue(value)) return null;
114608
114680
  const strValue = typeof value === "string" ? value : String(value);
114609
- switch (field.type) {
114610
- case "email":
114611
- return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(strValue) ? null : "Please enter a valid email address";
114612
- case "url":
114613
- try {
114614
- new URL(strValue);
114615
- return null;
114616
- } catch {
114617
- return "Please enter a valid URL";
114618
- }
114619
- case "tel":
114620
- return /^[+\d\s\-()]+$/.test(strValue) ? null : "Please enter a valid phone number";
114621
- case "number": {
114622
- const num = Number(value);
114623
- if (Number.isNaN(num)) return "Please enter a valid number";
114624
- if (field.min !== void 0 && num < field.min) {
114625
- return `Value must be at least ${field.min}`;
114626
- }
114627
- if (field.max !== void 0 && num > field.max) {
114628
- return `Value must be at most ${field.max}`;
114629
- }
114681
+ if (field.type === "email") {
114682
+ return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(strValue) ? null : "Please enter a valid email address";
114683
+ }
114684
+ if (field.type === "url") {
114685
+ try {
114686
+ new URL(strValue);
114630
114687
  return null;
114688
+ } catch {
114689
+ return "Please enter a valid URL";
114690
+ }
114691
+ }
114692
+ if (field.type === "tel") {
114693
+ return /^[+\d\s\-()]+$/.test(strValue) ? null : "Please enter a valid phone number";
114694
+ }
114695
+ if (field.type === "number") {
114696
+ const num = Number(value);
114697
+ if (Number.isNaN(num)) return "Please enter a valid number";
114698
+ if (field.min !== void 0 && num < field.min) {
114699
+ return `Value must be at least ${field.min}`;
114700
+ }
114701
+ if (field.max !== void 0 && num > field.max) {
114702
+ return `Value must be at most ${field.max}`;
114631
114703
  }
114704
+ return null;
114632
114705
  }
114633
114706
  if (typeof value === "string") {
114634
114707
  if (field.minLength && value.length < field.minLength) {
@@ -114727,7 +114800,7 @@ function buildBookingAvailabilityQuery(input) {
114727
114800
  }
114728
114801
  function deriveBookingFieldViews(input) {
114729
114802
  return (input.form?.schema?.fields ?? []).map((field) => {
114730
- const fieldId = asBookingFieldId(field.id);
114803
+ const fieldId = unsafeAsBookingFieldId(field.id);
114731
114804
  const inputId = `${input.idPrefix}-${fieldId}`;
114732
114805
  const helpTextId = field.helpText ? `${inputId}-help` : null;
114733
114806
  const fieldValue = input.values[field.id] ?? null;
@@ -114884,8 +114957,8 @@ function resolveAppointmentPackagesModel(input) {
114884
114957
  function toHeadlessEligibleAppointmentPackage(appointmentPackage) {
114885
114958
  return {
114886
114959
  ...appointmentPackage,
114887
- customerPassId: asCustomerPassId(appointmentPackage.customerPassId),
114888
- passId: asPassId(appointmentPackage.passId)
114960
+ customerPassId: unsafeAsCustomerPassId(appointmentPackage.customerPassId),
114961
+ passId: unsafeAsPassId(appointmentPackage.passId)
114889
114962
  };
114890
114963
  }
114891
114964
  function resolveHeadlessBookingStatus(input) {
@@ -114945,7 +115018,7 @@ function omitRecordKey2(record, key) {
114945
115018
  // ../blocks/src/system/runtime/hooks/useHeadlessBookingFlow.ts
114946
115019
  function useHeadlessBookingFlow(options) {
114947
115020
  const viewerTimeZone = options.viewerTimeZone ?? getRuntimeTimeZone();
114948
- const formKey = asFormId(options.formId);
115021
+ const formKey = unsafeAsFormId(options.formId);
114949
115022
  const defaultServiceId = toOptionalAppointmentServiceId(
114950
115023
  options.initialServiceId ?? resolveDefaultBookingServiceId(options.form, options.services) ?? void 0
114951
115024
  );
@@ -115111,7 +115184,7 @@ function useHeadlessBookingFlow(options) {
115111
115184
  setResourcesState({
115112
115185
  tag: "loaded",
115113
115186
  value: (result.options ?? []).map((option) => ({
115114
- id: asAppointmentResourceId(option.id),
115187
+ id: unsafeAsAppointmentResourceId(option.id),
115115
115188
  label: option.label
115116
115189
  }))
115117
115190
  });
@@ -115327,11 +115400,11 @@ function useHeadlessBookingFlow(options) {
115327
115400
  () => ({
115328
115401
  selectService: (serviceId) => dispatch({
115329
115402
  type: "service-selected",
115330
- serviceId: asAppointmentServiceId(serviceId)
115403
+ serviceId: unsafeAsAppointmentServiceId(serviceId)
115331
115404
  }),
115332
115405
  selectResource: (resourceId) => dispatch({
115333
115406
  type: "resource-selected",
115334
- resourceId: resourceId ? asAppointmentResourceId(resourceId) : null
115407
+ resourceId: resourceId ? unsafeAsAppointmentResourceId(resourceId) : null
115335
115408
  }),
115336
115409
  selectDate: (date) => dispatch({ type: "date-selected", date }),
115337
115410
  selectSlot: (slot) => dispatch({
@@ -115340,14 +115413,14 @@ function useHeadlessBookingFlow(options) {
115340
115413
  }),
115341
115414
  updateField: (fieldId, value) => dispatch({
115342
115415
  type: "field-updated",
115343
- fieldId: asBookingFieldId(fieldId),
115416
+ fieldId: unsafeAsBookingFieldId(fieldId),
115344
115417
  value
115345
115418
  }),
115346
- markFieldTouched: (fieldId) => dispatch({ type: "field-touched", fieldId: asBookingFieldId(fieldId) }),
115419
+ markFieldTouched: (fieldId) => dispatch({ type: "field-touched", fieldId: unsafeAsBookingFieldId(fieldId) }),
115347
115420
  selectPaymentOption: (kind) => dispatch({ type: "payment-option-selected", kind }),
115348
115421
  selectAppointmentPackage: (packageId) => dispatch({
115349
115422
  type: "appointment-package-selected",
115350
- packageId: packageId ? asCustomerPassId(packageId) : null
115423
+ packageId: packageId ? unsafeAsCustomerPassId(packageId) : null
115351
115424
  }),
115352
115425
  setDiscountCode: (code) => {
115353
115426
  dispatch({ type: "discount-code-changed", code });
@@ -115684,7 +115757,7 @@ function usePolling(config) {
115684
115757
  timeoutRef.current = setTimeout(doPoll, pollInterval);
115685
115758
  }
115686
115759
  };
115687
- doPoll();
115760
+ void doPoll();
115688
115761
  }, [poll]);
115689
115762
  useEffect(() => {
115690
115763
  if (!config) {
@@ -116517,7 +116590,7 @@ function DefaultFieldInput({
116517
116590
  ] }, option.value)) });
116518
116591
  case "checkbox":
116519
116592
  if (field.field.options && field.field.options.length > 1) {
116520
- const checkedValues = Array.isArray(value) ? value : [];
116593
+ const checkedValues = toStringArray(value);
116521
116594
  return /* @__PURE__ */ jsx("div", { className: "rb-space-y-2", children: field.field.options.map((option) => /* @__PURE__ */ jsxs("label", { className: "rb-flex rb-items-center rb-gap-2 rb-cursor-pointer", children: [
116522
116595
  /* @__PURE__ */ jsx(
116523
116596
  "input",
@@ -116612,7 +116685,10 @@ function DefaultFieldInput({
116612
116685
  className: "form-input"
116613
116686
  }
116614
116687
  );
116615
- default:
116688
+ case "text":
116689
+ case "email":
116690
+ case "tel":
116691
+ case "url":
116616
116692
  return /* @__PURE__ */ jsx(
116617
116693
  "input",
116618
116694
  {
@@ -116629,6 +116705,9 @@ function DefaultFieldInput({
116629
116705
  );
116630
116706
  }
116631
116707
  }
116708
+ function toStringArray(value) {
116709
+ return Array.isArray(value) ? value.filter((item) => typeof item === "string") : [];
116710
+ }
116632
116711
  function DefaultBookingDiscount({
116633
116712
  booking
116634
116713
  }) {
@@ -116720,7 +116799,7 @@ function collapseHeadlessSlotsForDisplay(input) {
116720
116799
  visibleSlots.push({
116721
116800
  startAt: slot.startAt,
116722
116801
  endAt: slot.endAt,
116723
- resourceId: asAppointmentResourceId(slot.resourceId)
116802
+ resourceId: unsafeAsAppointmentResourceId(slot.resourceId)
116724
116803
  });
116725
116804
  }
116726
116805
  return visibleSlots;
@@ -117771,7 +117850,7 @@ function usePortalAuth() {
117771
117850
  setProfile(null);
117772
117851
  }
117773
117852
  }
117774
- checkPortalAuth();
117853
+ void checkPortalAuth();
117775
117854
  return () => {
117776
117855
  cancelled = true;
117777
117856
  };
@@ -117835,7 +117914,7 @@ function useEligibility(params) {
117835
117914
  });
117836
117915
  }
117837
117916
  }
117838
- fetchEligibility();
117917
+ void fetchEligibility();
117839
117918
  return () => {
117840
117919
  cancelled = true;
117841
117920
  };
@@ -117880,7 +117959,7 @@ function useExistingEventRegistration({
117880
117959
  dispatch({ type: "resolved", registration: null });
117881
117960
  }
117882
117961
  }
117883
- fetchExistingRegistration();
117962
+ void fetchExistingRegistration();
117884
117963
  return () => {
117885
117964
  cancelled = true;
117886
117965
  };
@@ -118940,6 +119019,14 @@ function EventRegistrationWizardContent(props2) {
118940
119019
  const { wizard } = props2;
118941
119020
  const showSpamProtection = props2.showSpamProtection ?? isSpamProtectionEnabled();
118942
119021
  switch (wizard.step) {
119022
+ case "error":
119023
+ case "success":
119024
+ case "submitting":
119025
+ case "redirecting":
119026
+ case "verifying-payment":
119027
+ case "verifying-timeout":
119028
+ case "payment-failed":
119029
+ return null;
118943
119030
  case "select-event":
118944
119031
  return /* @__PURE__ */ jsx(
118945
119032
  EventSelectionStep,
@@ -119076,6 +119163,14 @@ function EventRegistrationWizardActions(props2) {
119076
119163
  return wizard.eventRequiresPayment ? "Continue to Payment" : props2.buttonText;
119077
119164
  };
119078
119165
  switch (wizard.step) {
119166
+ case "error":
119167
+ case "success":
119168
+ case "submitting":
119169
+ case "redirecting":
119170
+ case "verifying-payment":
119171
+ case "verifying-timeout":
119172
+ case "payment-failed":
119173
+ return null;
119079
119174
  case "select-event":
119080
119175
  return null;
119081
119176
  case "select-tickets": {
@@ -119127,10 +119222,10 @@ function EventRegistrationWizardActions(props2) {
119127
119222
  const handlePaymentContinue = () => {
119128
119223
  if (!selection.method) return;
119129
119224
  if (selection.method === "free") {
119130
- wizard.handlePaymentSelect("free");
119225
+ void wizard.handlePaymentSelect("free");
119131
119226
  return;
119132
119227
  }
119133
- wizard.handlePaymentSelect(
119228
+ void wizard.handlePaymentSelect(
119134
119229
  selection.method,
119135
119230
  selection.passId ?? selection.bundlePassId,
119136
119231
  selection.membershipId ?? selection.bundleMembershipId
@@ -119339,7 +119434,7 @@ function useWaitlistClaim() {
119339
119434
  }
119340
119435
  }
119341
119436
  }
119342
- resolveClaim();
119437
+ void resolveClaim();
119343
119438
  return () => {
119344
119439
  cancelled = true;
119345
119440
  };
@@ -120293,7 +120388,13 @@ function EventRegistrationWizard(props2) {
120293
120388
  return "Details";
120294
120389
  case "select-payment":
120295
120390
  return "Payment";
120296
- default:
120391
+ case "error":
120392
+ case "success":
120393
+ case "submitting":
120394
+ case "redirecting":
120395
+ case "verifying-payment":
120396
+ case "verifying-timeout":
120397
+ case "payment-failed":
120297
120398
  return "";
120298
120399
  }
120299
120400
  });
@@ -121174,7 +121275,7 @@ function useCourseRegistrationWizard(props2) {
121174
121275
  setPortalAuthState("unauthenticated");
121175
121276
  }
121176
121277
  }
121177
- checkPortalAuth();
121278
+ void checkPortalAuth();
121178
121279
  return () => {
121179
121280
  cancelled = true;
121180
121281
  };
@@ -121259,7 +121360,7 @@ function useCourseRegistrationWizard(props2) {
121259
121360
  if (!cancelled) setEligibilityLoading(false);
121260
121361
  }
121261
121362
  }
121262
- fetchEligibility();
121363
+ void fetchEligibility();
121263
121364
  return () => {
121264
121365
  cancelled = true;
121265
121366
  };
@@ -121318,7 +121419,7 @@ function useCourseRegistrationWizard(props2) {
121318
121419
  await new Promise((r4) => setTimeout(r4, 1500));
121319
121420
  }
121320
121421
  }
121321
- verifyAfterCheckout();
121422
+ void verifyAfterCheckout();
121322
121423
  return () => {
121323
121424
  cancelled = true;
121324
121425
  };
@@ -121587,7 +121688,7 @@ function useCourseRegistrationWizard(props2) {
121587
121688
  if (!cancelled) setDiscountsAvailableLoading(false);
121588
121689
  }
121589
121690
  }
121590
- checkDiscountAvailability();
121691
+ void checkDiscountAvailability();
121591
121692
  return () => {
121592
121693
  cancelled = true;
121593
121694
  };
@@ -121829,7 +121930,7 @@ function CourseRegistrationWizard(props2) {
121829
121930
  className: "cr-form",
121830
121931
  onSubmit: (e3) => {
121831
121932
  e3.preventDefault();
121832
- handleSubmit();
121933
+ void handleSubmit();
121833
121934
  },
121834
121935
  children: [
121835
121936
  /* @__PURE__ */ jsx(
@@ -122235,7 +122336,7 @@ var LeafletStaticMap = ({
122235
122336
  }
122236
122337
  }
122237
122338
  }
122238
- initMap();
122339
+ void initMap();
122239
122340
  return () => {
122240
122341
  mounted = false;
122241
122342
  if (mapRef.current) {
@@ -123099,10 +123200,10 @@ function PassesMembershipsController({ render }) {
123099
123200
  });
123100
123201
  const handleFormSubmit = useCallback((event) => {
123101
123202
  event.preventDefault();
123102
- submitCheckout(false);
123203
+ void submitCheckout(false);
123103
123204
  }, [submitCheckout]);
123104
123205
  const handleConfirmDuplicate = useCallback(() => {
123105
- submitCheckout(true);
123206
+ void submitCheckout(true);
123106
123207
  }, [submitCheckout]);
123107
123208
  return /* @__PURE__ */ jsxs(Fragment, { children: [
123108
123209
  /* @__PURE__ */ jsx("div", { ref: shopRootRef, children: /* @__PURE__ */ jsx(
@@ -123885,7 +123986,7 @@ function useCartDiscountUiState(api, plan) {
123885
123986
  }
123886
123987
  }
123887
123988
  }
123888
- loadCartDiscountAvailability();
123989
+ void loadCartDiscountAvailability();
123889
123990
  return () => {
123890
123991
  cancelled = true;
123891
123992
  };
@@ -124349,6 +124450,8 @@ function resolveGiftingPurchaseNotice(search, defaultSuccessMessage) {
124349
124450
  const params = new URLSearchParams(search);
124350
124451
  const gifting2 = params.get("gifting");
124351
124452
  switch (gifting2) {
124453
+ case null:
124454
+ return null;
124352
124455
  case "success":
124353
124456
  return { kind: "success", message: defaultSuccessMessage };
124354
124457
  case "cancelled":
@@ -126561,7 +126664,7 @@ function useCalendarEvents({
126561
126664
  );
126562
126665
  if (unloadedMonths.length > 0) {
126563
126666
  const range = getThreeMonthRange(date);
126564
- fetchEventsForRange(range.from, range.to, unloadedMonths);
126667
+ void fetchEventsForRange(range.from, range.to, unloadedMonths);
126565
126668
  }
126566
126669
  }, [preloadMonths, fetchEventsForRange]);
126567
126670
  useEffect(() => {
@@ -128040,7 +128143,7 @@ var FormNodeClient = ({
128040
128143
  if (key === "company" || key === "altcha-solution") continue;
128041
128144
  if (key in data) {
128042
128145
  const existing = data[key];
128043
- data[key] = Array.isArray(existing) ? [...existing, fieldValue] : [existing, fieldValue];
128146
+ data[key] = isUnknownArray5(existing) ? [...existing, fieldValue] : [existing, fieldValue];
128044
128147
  } else {
128045
128148
  data[key] = fieldValue;
128046
128149
  }
@@ -128094,6 +128197,9 @@ var FormNodeClient = ({
128094
128197
  ) }) })
128095
128198
  ] });
128096
128199
  };
128200
+ function isUnknownArray5(value) {
128201
+ return Array.isArray(value);
128202
+ }
128097
128203
  var ImageResolveContext = createContext(null);
128098
128204
  function ImageResolveContextProvider({
128099
128205
  value,
@@ -128338,11 +128444,12 @@ function buildRenderFromLooseProps(runtime, mode, props2) {
128338
128444
  };
128339
128445
  }
128340
128446
  function withRuntimeBackedEnvelope(source, runtime, render) {
128341
- return {
128447
+ const envelope = {
128342
128448
  ...source,
128343
128449
  renderKind: runtime.kind,
128344
128450
  render
128345
128451
  };
128452
+ return envelope;
128346
128453
  }
128347
128454
  function normalizeLegacyInteractiveRenderProps(runtime, mode, props2) {
128348
128455
  const source = props2;
@@ -128611,7 +128718,60 @@ function buildItemLabel(field, index2, backend, basePath) {
128611
128718
  return `${itemLabel} ${index2 + 1}`;
128612
128719
  }
128613
128720
 
128721
+ // ../block-form/src/widgets/RepeaterField/utils/getRepeaterItemFields.ts
128722
+ function getRepeaterItemFields(config, backend, basePath, index2) {
128723
+ if (config.polymorphic && config.itemTypes) {
128724
+ const itemValue = backend.getValue(`${basePath}.${index2}`);
128725
+ const itemType = typeof itemValue?._type === "string" ? itemValue._type : Object.keys(config.itemTypes)[0] ?? "";
128726
+ const typeSchema = itemType ? config.itemTypes[itemType] : void 0;
128727
+ return typeSchema?.fields ?? [];
128728
+ }
128729
+ return config.fields ?? [];
128730
+ }
128731
+
128732
+ // ../block-form/src/widgets/RepeaterField/utils/repeaterLabelSource.ts
128733
+ var AUTO_RESOLVER_SOURCE_TYPES = [
128734
+ "entryPicker",
128735
+ "text",
128736
+ "slug",
128737
+ "url",
128738
+ "select",
128739
+ "contentTypeSelect"
128740
+ ];
128741
+ function getNonEmptyString(value) {
128742
+ return typeof value === "string" && value.trim().length > 0 ? value.trim() : null;
128743
+ }
128744
+ function resolveRepeaterLabelSource(input) {
128745
+ const { config, fields: fields3, itemValue } = input;
128746
+ if (config.itemLabelSource) {
128747
+ return {
128748
+ kind: "field",
128749
+ fieldId: config.itemLabelSource,
128750
+ source: "explicit"
128751
+ };
128752
+ }
128753
+ if (!itemValue) {
128754
+ return { kind: "none" };
128755
+ }
128756
+ for (const type of AUTO_RESOLVER_SOURCE_TYPES) {
128757
+ for (const field of fields3) {
128758
+ if (field.type !== type || field.ui?.hidden) {
128759
+ continue;
128760
+ }
128761
+ if (getNonEmptyString(itemValue[field.id])) {
128762
+ return {
128763
+ kind: "field",
128764
+ fieldId: field.id,
128765
+ source: "auto"
128766
+ };
128767
+ }
128768
+ }
128769
+ }
128770
+ return { kind: "none" };
128771
+ }
128772
+
128614
128773
  // ../block-form/src/widgets/RepeaterField/utils/buildSummary.ts
128774
+ var DEFAULT_REPEATER_SUMMARY_MAX_CHARS = 96;
128615
128775
  function readSummaryPart(value) {
128616
128776
  if (typeof value === "string") {
128617
128777
  const trimmed = value.trim();
@@ -128619,28 +128779,48 @@ function readSummaryPart(value) {
128619
128779
  }
128620
128780
  return null;
128621
128781
  }
128782
+ function clampSummaryMaxChars(value) {
128783
+ return value ?? DEFAULT_REPEATER_SUMMARY_MAX_CHARS;
128784
+ }
128785
+ function truncateSummary(value, maxChars) {
128786
+ const chars = Array.from(value);
128787
+ if (chars.length <= maxChars) {
128788
+ return value;
128789
+ }
128790
+ if (maxChars <= 3) {
128791
+ return ".".repeat(maxChars);
128792
+ }
128793
+ return `${chars.slice(0, maxChars - 3).join("").trimEnd()}...`;
128794
+ }
128622
128795
  function buildSummary(field, index2, backend, basePath) {
128623
128796
  const values = backend.getValue(`${basePath}.${index2}`);
128624
128797
  if (!values) return "";
128798
+ return buildSummaryFromItemValue({
128799
+ field,
128800
+ itemFields: getRepeaterItemFields(field, backend, basePath, index2),
128801
+ values
128802
+ });
128803
+ }
128804
+ function buildSummaryFromItemValue(input) {
128805
+ const { field, itemFields, values } = input;
128806
+ if (field.showSummary === false) {
128807
+ return "";
128808
+ }
128625
128809
  const parts = [];
128626
128810
  const seen = /* @__PURE__ */ new Set();
128627
- const labelSource = field.itemLabelSource;
128628
128811
  const layoutGridFieldIds = resolveLayoutGridFieldIds(field);
128629
- let fieldsToCheck = [];
128630
- if (field.polymorphic && field.itemTypes) {
128631
- const itemType = typeof values._type === "string" ? values._type : Object.keys(field.itemTypes)[0] ?? "";
128632
- const typeSchema = itemType ? field.itemTypes[itemType] : void 0;
128633
- if (typeSchema) {
128634
- fieldsToCheck = typeSchema.fields;
128635
- }
128636
- } else if (!field.polymorphic && field.fields) {
128637
- fieldsToCheck = field.fields;
128638
- }
128812
+ const labelSource = resolveRepeaterLabelSource({
128813
+ config: field,
128814
+ fields: itemFields,
128815
+ itemValue: values
128816
+ });
128817
+ const labelSourceFieldId = labelSource.kind === "field" ? labelSource.fieldId : void 0;
128818
+ const fieldsToCheck = resolveSummaryFields(field, itemFields);
128639
128819
  for (const child of fieldsToCheck) {
128640
128820
  if (child.ui?.hidden) {
128641
128821
  continue;
128642
128822
  }
128643
- if (labelSource && child.id === labelSource) {
128823
+ if (labelSourceFieldId && child.id === labelSourceFieldId) {
128644
128824
  continue;
128645
128825
  }
128646
128826
  if (layoutGridFieldIds.has(child.id)) {
@@ -128654,7 +128834,7 @@ function buildSummary(field, index2, backend, basePath) {
128654
128834
  seen.add(part);
128655
128835
  if (parts.length === 2) break;
128656
128836
  }
128657
- return parts.join(" \xB7 ");
128837
+ return truncateSummary(parts.join(" \xB7 "), clampSummaryMaxChars(field.summaryMaxChars));
128658
128838
  }
128659
128839
  function resolveLayoutGridFieldIds(field) {
128660
128840
  const ui = field.ui ?? {};
@@ -128672,16 +128852,12 @@ function resolveLayoutGridFieldIds(field) {
128672
128852
  });
128673
128853
  return /* @__PURE__ */ new Set([spanFieldId, rowFieldId, columnFieldId]);
128674
128854
  }
128675
-
128676
- // ../block-form/src/widgets/RepeaterField/utils/getRepeaterItemFields.ts
128677
- function getRepeaterItemFields(config, backend, basePath, index2) {
128678
- if (config.polymorphic && config.itemTypes) {
128679
- const itemValue = backend.getValue(`${basePath}.${index2}`);
128680
- const itemType = typeof itemValue?._type === "string" ? itemValue._type : Object.keys(config.itemTypes)[0] ?? "";
128681
- const typeSchema = itemType ? config.itemTypes[itemType] : void 0;
128682
- return typeSchema?.fields ?? [];
128855
+ function resolveSummaryFields(field, itemFields) {
128856
+ if (!field.summaryFields) {
128857
+ return [...itemFields];
128683
128858
  }
128684
- return config.fields ?? [];
128859
+ const fieldsById = new Map(itemFields.map((itemField) => [itemField.id, itemField]));
128860
+ return field.summaryFields.map((fieldId) => fieldsById.get(fieldId)).filter((itemField) => itemField != null);
128685
128861
  }
128686
128862
 
128687
128863
  // ../block-form/src/widgets/RepeaterField/utils/getRepeaterItemFieldGroups.ts
@@ -128731,6 +128907,81 @@ function getRepeaterItemFieldGroups(config, backend, basePath, index2) {
128731
128907
  };
128732
128908
  }
128733
128909
 
128910
+ // ../block-form/src/widgets/RepeaterField/utils/repeaterRowActionsDomain.ts
128911
+ var REPEATER_ROW_COMPACT_ACTIONS_WIDTH = 640;
128912
+ function resolveMoveEarlierAvailability(index2) {
128913
+ return index2 <= 0 ? { kind: "disabled", reason: "first-item" } : { kind: "enabled" };
128914
+ }
128915
+ function resolveMoveLaterAvailability(index2, itemsLength) {
128916
+ return index2 >= itemsLength - 1 ? { kind: "disabled", reason: "last-item" } : { kind: "enabled" };
128917
+ }
128918
+ function resolveDeleteAvailability(itemsLength, minItems) {
128919
+ return itemsLength <= minItems ? { kind: "disabled", reason: "minimum-items" } : { kind: "enabled" };
128920
+ }
128921
+ function visibleWhenAnyActionIsEnabled(actions) {
128922
+ return actions.some((action) => action.availability.kind === "enabled") ? { kind: "visible", actions } : { kind: "hidden" };
128923
+ }
128924
+ function overrideMoveAvailability(availability, disabled) {
128925
+ if (disabled === true) {
128926
+ return { kind: "disabled", reason: "unavailable" };
128927
+ }
128928
+ if (disabled === false) {
128929
+ return { kind: "enabled" };
128930
+ }
128931
+ return availability;
128932
+ }
128933
+ function resolveRepeaterRowActionPresentation(input) {
128934
+ const moveEarlier = resolveMoveEarlierAvailability(input.index);
128935
+ const moveLater = resolveMoveLaterAvailability(input.index, input.itemsLength);
128936
+ const deleteAction = resolveDeleteAvailability(input.itemsLength, input.minItems);
128937
+ const compact2 = input.actionPresentation === "compact" || input.actionPresentation !== "wide" && Number.isFinite(input.containerWidth) && Number(input.containerWidth) < REPEATER_ROW_COMPACT_ACTIONS_WIDTH;
128938
+ if (compact2) {
128939
+ return {
128940
+ kind: "compact",
128941
+ moveEarlier,
128942
+ moveLater,
128943
+ menu: visibleWhenAnyActionIsEnabled([
128944
+ { id: "moveEarlier", availability: moveEarlier },
128945
+ { id: "moveLater", availability: moveLater },
128946
+ { id: "delete", availability: deleteAction }
128947
+ ])
128948
+ };
128949
+ }
128950
+ return {
128951
+ kind: "wide",
128952
+ moveEarlier,
128953
+ moveLater,
128954
+ menu: visibleWhenAnyActionIsEnabled([
128955
+ { id: "delete", availability: deleteAction }
128956
+ ])
128957
+ };
128958
+ }
128959
+ function isRepeaterRowActionDisabled(availability) {
128960
+ return availability.kind === "disabled";
128961
+ }
128962
+ function resolveRepeaterRowActionRenderPlan(input) {
128963
+ const presentation = resolveRepeaterRowActionPresentation(input);
128964
+ const showReorderActions = input.showReorderActions ?? true;
128965
+ const moveEarlier = overrideMoveAvailability(presentation.moveEarlier, input.disableMoveUp);
128966
+ const moveLater = overrideMoveAvailability(presentation.moveLater, input.disableMoveDown);
128967
+ const menuActions = presentation.menu.kind === "visible" ? presentation.menu.actions.filter((action) => showReorderActions || action.id === "delete").map((action) => {
128968
+ if (action.id === "moveEarlier") {
128969
+ return { ...action, availability: moveEarlier };
128970
+ }
128971
+ if (action.id === "moveLater") {
128972
+ return { ...action, availability: moveLater };
128973
+ }
128974
+ return action;
128975
+ }) : [];
128976
+ return {
128977
+ kind: presentation.kind,
128978
+ showDirectMoveActions: presentation.kind === "wide" && showReorderActions,
128979
+ moveEarlier,
128980
+ moveLater,
128981
+ menu: visibleWhenAnyActionIsEnabled(menuActions)
128982
+ };
128983
+ }
128984
+
128734
128985
  // ../block-form/src/widgets/RepeaterField/utils/layoutGridCapacityContext.ts
128735
128986
  function areLayoutGridCapacityContextsEqual(current, next) {
128736
128987
  if (!current) {
@@ -128756,17 +129007,11 @@ function areLayoutGridCapacityContextsEqual(current, next) {
128756
129007
  }
128757
129008
 
128758
129009
  // ../block-form/src/widgets/RepeaterField/utils/repeaterDndDomain.ts
128759
- function isSmallRepeaterBreakpoint(breakpoint) {
128760
- return breakpoint === "base" || breakpoint === "sm";
128761
- }
128762
129010
  function resolveRepeaterPointerDragCapability(input) {
128763
129011
  const { breakpoint, coarsePointer, itemCount } = input;
128764
129012
  if (itemCount < 2) {
128765
129013
  return { kind: "disabled", breakpoint, reason: "insufficient-items" };
128766
129014
  }
128767
- if (isSmallRepeaterBreakpoint(breakpoint)) {
128768
- return { kind: "disabled", breakpoint, reason: "small-breakpoint" };
128769
- }
128770
129015
  if (coarsePointer) {
128771
129016
  return { kind: "disabled", breakpoint, reason: "coarse-pointer" };
128772
129017
  }
@@ -129033,48 +129278,33 @@ function resolveRepeaterThumbnail(value, options) {
129033
129278
  }
129034
129279
 
129035
129280
  // ../block-form/src/widgets/RepeaterField/hooks/useResolvedItemLabel.ts
129036
- var AUTO_RESOLVER_SOURCE_TYPES = [
129037
- "entryPicker",
129038
- "text",
129039
- "slug",
129040
- "url",
129041
- "select",
129042
- "contentTypeSelect"
129043
- ];
129044
- function getNonEmptyString(value) {
129045
- return typeof value === "string" && value.trim().length > 0 ? value.trim() : null;
129046
- }
129047
- function findAutoSourceFieldId(config, backend, basePath, index2) {
129048
- const itemPath = `${basePath}.${index2}`;
129049
- const itemValue = backend.getValue(itemPath);
129050
- const normalizedItemValue = itemValue && typeof itemValue === "object" && !Array.isArray(itemValue) ? itemValue : null;
129051
- const fields3 = getRepeaterItemFields(config, backend, basePath, index2);
129052
- for (const type of AUTO_RESOLVER_SOURCE_TYPES) {
129053
- for (const field of fields3) {
129054
- if (field.type !== type || field.ui?.hidden) {
129055
- continue;
129056
- }
129057
- const value = normalizedItemValue?.[field.id] ?? backend.getValue(`${itemPath}.${field.id}`);
129058
- if (getNonEmptyString(value)) {
129059
- return field.id;
129060
- }
129061
- }
129062
- }
129063
- return void 0;
129064
- }
129065
129281
  function useResolvedItemLabel(config, index2, backend, basePath) {
129282
+ return useResolvedRepeaterItemLabel(config, index2, backend, basePath).label;
129283
+ }
129284
+ function useResolvedRepeaterItemLabel(config, index2, backend, basePath) {
129066
129285
  const resolvers = useDisplayLabelResolvers();
129067
129286
  const syncLabel = buildItemLabel(config, index2, backend, basePath);
129068
- const sourceFieldId = useMemo(() => {
129069
- return config.itemLabelSource ?? findAutoSourceFieldId(config, backend, basePath, index2);
129070
- }, [config, backend, basePath, index2]);
129287
+ const itemPath = `${basePath}.${index2}`;
129288
+ const rawItemValue = backend.getValue(itemPath);
129289
+ const itemValue = rawItemValue && typeof rawItemValue === "object" && !Array.isArray(rawItemValue) ? rawItemValue : null;
129290
+ const itemFields = useMemo(
129291
+ () => getRepeaterItemFields(config, backend, basePath, index2),
129292
+ [config, backend, basePath, index2]
129293
+ );
129294
+ const labelSource = useMemo(() => {
129295
+ return resolveRepeaterLabelSource({
129296
+ config,
129297
+ fields: itemFields,
129298
+ itemValue
129299
+ });
129300
+ }, [config, itemFields, itemValue]);
129301
+ const sourceFieldId = labelSource.kind === "field" ? labelSource.fieldId : void 0;
129071
129302
  const sourceFieldConfig = useMemo(
129072
- () => findSourceFieldConfig(config, backend, basePath, index2, sourceFieldId),
129073
- [config, backend, basePath, index2, sourceFieldId]
129303
+ () => findSourceFieldConfig(itemFields, sourceFieldId),
129304
+ [itemFields, sourceFieldId]
129074
129305
  );
129075
129306
  const resolver = sourceFieldConfig ? resolvers[sourceFieldConfig.type] : void 0;
129076
129307
  const rawValue = sourceFieldId ? backend.getValue(`${basePath}.${index2}.${sourceFieldId}`) : void 0;
129077
- const itemPath = `${basePath}.${index2}`;
129078
129308
  const getSiblingValue = useCallback(
129079
129309
  (fieldId) => backend.getValue(`${itemPath}.${fieldId}`),
129080
129310
  [backend, itemPath]
@@ -129100,11 +129330,14 @@ function useResolvedItemLabel(config, index2, backend, basePath) {
129100
129330
  cancelled = true;
129101
129331
  };
129102
129332
  }, [sourceFieldId, resolver, sourceFieldConfig, rawValue, getSiblingValue]);
129103
- return resolvedLabel ?? syncLabel;
129333
+ return {
129334
+ label: resolvedLabel ?? syncLabel,
129335
+ sourceFieldId,
129336
+ labelSource
129337
+ };
129104
129338
  }
129105
- function findSourceFieldConfig(config, backend, basePath, index2, sourceFieldId) {
129339
+ function findSourceFieldConfig(fields3, sourceFieldId) {
129106
129340
  if (!sourceFieldId) return void 0;
129107
- const fields3 = getRepeaterItemFields(config, backend, basePath, index2);
129108
129341
  return fields3.find((f2) => f2.id === sourceFieldId);
129109
129342
  }
129110
129343
 
@@ -133125,6 +133358,7 @@ function useRepeaterPointerDragCapability(itemCount) {
133125
133358
  }, [breakpoint, coarsePointer, itemCount]);
133126
133359
  return {
133127
133360
  containerRef,
133361
+ containerWidth,
133128
133362
  breakpoint,
133129
133363
  pointerDragCapability,
133130
133364
  canUsePointerDrag: pointerDragCapability.kind === "enabled"
@@ -133137,7 +133371,7 @@ function resolveSortingStrategy(strategy) {
133137
133371
  }
133138
133372
  function useLinearRepeaterDnd(input) {
133139
133373
  const { itemIds, sortingStrategy, activationDistance = 6, onMove } = input;
133140
- const { containerRef, breakpoint, pointerDragCapability, canUsePointerDrag } = useRepeaterPointerDragCapability(
133374
+ const { containerRef, containerWidth, breakpoint, pointerDragCapability, canUsePointerDrag } = useRepeaterPointerDragCapability(
133141
133375
  itemIds.length
133142
133376
  );
133143
133377
  const sensors = useSensors(
@@ -133159,6 +133393,7 @@ function useLinearRepeaterDnd(input) {
133159
133393
  const sortableItemIds = useMemo(() => [...itemIds], [itemIds]);
133160
133394
  return {
133161
133395
  containerRef,
133396
+ containerWidth,
133162
133397
  breakpoint,
133163
133398
  pointerDragCapability,
133164
133399
  canUsePointerDrag,
@@ -133218,231 +133453,130 @@ var RepeaterDragHandle = forwardRef(
133218
133453
  );
133219
133454
  }
133220
133455
  );
133456
+ function resolveMenuActionLabel(actionId) {
133457
+ if (actionId === "moveEarlier") return "Move item earlier";
133458
+ if (actionId === "moveLater") return "Move item later";
133459
+ return "Remove item";
133460
+ }
133461
+ function resolveMenuActionIcon(actionId) {
133462
+ if (actionId === "moveEarlier") return /* @__PURE__ */ jsx(ArrowUp, { className: "h-4 w-4" });
133463
+ if (actionId === "moveLater") return /* @__PURE__ */ jsx(ArrowDown, { className: "h-4 w-4" });
133464
+ return /* @__PURE__ */ jsx(Trash2, { className: "h-4 w-4" });
133465
+ }
133466
+ function resolveStableMenuLabel(itemLabel, index2) {
133467
+ const trimmed = itemLabel.trim();
133468
+ return trimmed.length > 0 ? `More actions for ${trimmed}, item ${index2 + 1}` : `More actions for item ${index2 + 1}`;
133469
+ }
133221
133470
  function RepeaterRowActions({
133222
133471
  index: index2,
133223
133472
  itemsLength,
133224
133473
  minItems,
133474
+ containerWidth,
133475
+ actionPresentation = "auto",
133476
+ itemLabel,
133225
133477
  onMoveUp,
133226
133478
  onMoveDown,
133227
133479
  onRemove,
133480
+ actionControlRefs,
133228
133481
  showReorderActions = true,
133229
133482
  disableMoveUp,
133230
133483
  disableMoveDown
133231
133484
  }) {
133485
+ const renderPlan = resolveRepeaterRowActionRenderPlan({
133486
+ containerWidth,
133487
+ index: index2,
133488
+ itemsLength,
133489
+ minItems,
133490
+ actionPresentation,
133491
+ showReorderActions,
133492
+ disableMoveUp,
133493
+ disableMoveDown
133494
+ });
133495
+ const handleAction = (actionId) => {
133496
+ if (actionId === "moveEarlier") {
133497
+ onMoveUp();
133498
+ return;
133499
+ }
133500
+ if (actionId === "moveLater") {
133501
+ onMoveDown();
133502
+ return;
133503
+ }
133504
+ onRemove();
133505
+ };
133506
+ const renderMenuItem = (action) => /* @__PURE__ */ jsxs(
133507
+ DropdownMenuItem2,
133508
+ {
133509
+ disabled: isRepeaterRowActionDisabled(action.availability),
133510
+ tone: action.id === "delete" ? "destructive" : "default",
133511
+ onSelect: () => handleAction(action.id),
133512
+ children: [
133513
+ resolveMenuActionIcon(action.id),
133514
+ resolveMenuActionLabel(action.id)
133515
+ ]
133516
+ },
133517
+ action.id
133518
+ );
133519
+ const directMoveEarlierRef = renderPlan.menu.kind === "hidden" && renderPlan.moveEarlier.kind === "enabled" ? actionControlRefs?.moveEarlier : void 0;
133520
+ const directMoveLaterRef = renderPlan.menu.kind === "hidden" && renderPlan.moveEarlier.kind === "disabled" && renderPlan.moveLater.kind === "enabled" ? actionControlRefs?.moveLater : void 0;
133232
133521
  return /* @__PURE__ */ jsxs(
133233
133522
  "div",
133234
133523
  {
133235
133524
  className: "flex items-center gap-1 opacity-0 transition-opacity hover:opacity-100 group-focus-within:opacity-100 group-hover:opacity-100",
133236
133525
  onClick: (e3) => e3.stopPropagation(),
133237
133526
  children: [
133238
- showReorderActions ? /* @__PURE__ */ jsx(
133239
- Button,
133240
- {
133241
- type: "button",
133242
- variant: "ghost",
133243
- size: "icon",
133244
- onClick: onMoveUp,
133245
- disabled: disableMoveUp ?? index2 === 0,
133246
- "aria-label": "Move item earlier",
133247
- title: "Move item earlier",
133248
- children: /* @__PURE__ */ jsx(ArrowUp, { className: "h-4 w-4" })
133249
- }
133250
- ) : null,
133251
- showReorderActions ? /* @__PURE__ */ jsx(
133252
- Button,
133253
- {
133254
- type: "button",
133255
- variant: "ghost",
133256
- size: "icon",
133257
- onClick: onMoveDown,
133258
- disabled: disableMoveDown ?? index2 === itemsLength - 1,
133259
- "aria-label": "Move item later",
133260
- title: "Move item later",
133261
- children: /* @__PURE__ */ jsx(ArrowDown, { className: "h-4 w-4" })
133262
- }
133263
- ) : null,
133264
- /* @__PURE__ */ jsx(
133265
- Button,
133266
- {
133267
- type: "button",
133268
- variant: "ghost",
133269
- size: "icon",
133270
- onClick: onRemove,
133271
- disabled: itemsLength <= minItems,
133272
- "aria-label": "Remove item",
133273
- title: "Remove item",
133274
- children: /* @__PURE__ */ jsx(Trash2, { className: "h-4 w-4" })
133275
- }
133276
- )
133527
+ renderPlan.showDirectMoveActions ? /* @__PURE__ */ jsxs(Fragment, { children: [
133528
+ /* @__PURE__ */ jsx(
133529
+ Button,
133530
+ {
133531
+ ref: directMoveEarlierRef ?? actionControlRefs?.moveEarlier,
133532
+ type: "button",
133533
+ variant: "ghost",
133534
+ size: "icon",
133535
+ onClick: () => {
133536
+ onMoveUp();
133537
+ },
133538
+ disabled: isRepeaterRowActionDisabled(renderPlan.moveEarlier),
133539
+ "aria-label": "Move item earlier",
133540
+ title: "Move item earlier",
133541
+ children: /* @__PURE__ */ jsx(ArrowUp, { className: "h-4 w-4" })
133542
+ }
133543
+ ),
133544
+ /* @__PURE__ */ jsx(
133545
+ Button,
133546
+ {
133547
+ ref: directMoveLaterRef ?? actionControlRefs?.moveLater,
133548
+ type: "button",
133549
+ variant: "ghost",
133550
+ size: "icon",
133551
+ onClick: () => {
133552
+ onMoveDown();
133553
+ },
133554
+ disabled: isRepeaterRowActionDisabled(renderPlan.moveLater),
133555
+ "aria-label": "Move item later",
133556
+ title: "Move item later",
133557
+ children: /* @__PURE__ */ jsx(ArrowDown, { className: "h-4 w-4" })
133558
+ }
133559
+ )
133560
+ ] }) : null,
133561
+ renderPlan.menu.kind === "visible" ? /* @__PURE__ */ jsxs(DropdownMenu2, { children: [
133562
+ /* @__PURE__ */ jsx(DropdownMenuTrigger2, { asChild: true, children: /* @__PURE__ */ jsx(
133563
+ Button,
133564
+ {
133565
+ ref: actionControlRefs?.menu,
133566
+ type: "button",
133567
+ variant: "ghost",
133568
+ size: "icon",
133569
+ "aria-label": resolveStableMenuLabel(itemLabel, index2),
133570
+ title: "More actions",
133571
+ children: /* @__PURE__ */ jsx(Ellipsis, { className: "h-4 w-4" })
133572
+ }
133573
+ ) }),
133574
+ /* @__PURE__ */ jsx(DropdownMenuContent2, { align: "end", className: "w-44", children: renderPlan.menu.actions.map(renderMenuItem) })
133575
+ ] }) : null
133277
133576
  ]
133278
133577
  }
133279
133578
  );
133280
133579
  }
133281
- function RepeaterRowContent({
133282
- config,
133283
- index: index2,
133284
- basePath,
133285
- backend,
133286
- renderChild,
133287
- excludeFieldIds,
133288
- className
133289
- }) {
133290
- const itemFields = useMemo(() => {
133291
- let fields3 = getRepeaterItemFields(config, backend, basePath, index2);
133292
- if (excludeFieldIds && excludeFieldIds.size > 0) {
133293
- fields3 = fields3.filter((f2) => !excludeFieldIds.has(f2.id));
133294
- }
133295
- return fields3;
133296
- }, [config, backend, basePath, index2, excludeFieldIds]);
133297
- return /* @__PURE__ */ jsx("div", { className: className ?? "space-y-4 px-3 pb-3 pt-2", children: itemFields.map((child) => renderChild(child, `${basePath}.${index2}.${child.id}`)) });
133298
- }
133299
- function RepeaterRow({
133300
- id,
133301
- index: index2,
133302
- config,
133303
- backend,
133304
- basePath,
133305
- itemsLength,
133306
- minItems,
133307
- onMove,
133308
- onRemove,
133309
- renderChild,
133310
- canDrag
133311
- }) {
133312
- const sortable = useSortable({ id, disabled: !canDrag });
133313
- const style2 = {
133314
- transform: CSS2.Transform.toString(sortable.transform),
133315
- transition: sortable.transition,
133316
- opacity: sortable.isDragging ? 0.6 : 1
133317
- };
133318
- const itemLabel = useResolvedItemLabel(config, index2, backend, basePath);
133319
- const summary = buildSummary(config, index2, backend, basePath);
133320
- const rowErrors = useRepeaterRowErrors(config, index2, backend, basePath);
133321
- const hasErrors = rowErrors.length > 0;
133322
- const { settingsFields, settingsFieldIds } = useMemo(
133323
- () => getRepeaterItemFieldGroups(config, backend, basePath, index2),
133324
- [config, backend, basePath, index2]
133325
- );
133326
- const [open, setOpen] = useState(hasErrors || index2 === itemsLength - 1);
133327
- useEffect(() => {
133328
- if (hasErrors) setOpen(true);
133329
- }, [hasErrors]);
133330
- return /* @__PURE__ */ jsx(Collapsible2, { open, onOpenChange: setOpen, children: /* @__PURE__ */ jsxs(
133331
- Card,
133332
- {
133333
- ref: sortable.setNodeRef,
133334
- style: style2,
133335
- size: "none",
133336
- "data-error": hasErrors ? "true" : void 0,
133337
- className: `${hasErrors ? "ring-2 ring-destructive" : ""} group mb-6 p-0`,
133338
- children: [
133339
- /* @__PURE__ */ jsx(CollapsibleTrigger2, { asChild: true, children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-3 py-2 hover:bg-accent/30 cursor-pointer rounded-md", children: [
133340
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
133341
- canDrag ? /* @__PURE__ */ jsx(
133342
- RepeaterDragHandle,
133343
- {
133344
- placement: "inline",
133345
- ref: sortable.setActivatorNodeRef,
133346
- ...sortable.attributes,
133347
- ...sortable.listeners,
133348
- onMouseDown: (event) => event.stopPropagation(),
133349
- onTouchStart: (event) => event.stopPropagation(),
133350
- onClick: (event) => event.stopPropagation()
133351
- }
133352
- ) : null,
133353
- /* @__PURE__ */ jsx(ChevronRight, { className: `h-4 w-4 transition ${open ? "rotate-90" : ""}` }),
133354
- /* @__PURE__ */ jsx("span", { className: "text-sm font-medium", children: itemLabel }),
133355
- summary ? /* @__PURE__ */ jsxs("span", { className: "truncate text-xs text-muted-foreground", children: [
133356
- "\u2014 ",
133357
- summary
133358
- ] }) : null,
133359
- hasErrors ? /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-1 text-[11px] text-destructive", children: [
133360
- /* @__PURE__ */ jsx(CircleAlert, { className: "h-3 w-3" }),
133361
- " Needs attention"
133362
- ] }) : null
133363
- ] }),
133364
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
133365
- settingsFields.length > 0 && /* @__PURE__ */ jsx(
133366
- FieldSettingsModal,
133367
- {
133368
- fields: settingsFields,
133369
- basePath: `${basePath}.${index2}`,
133370
- backend,
133371
- renderChild,
133372
- title: `${config.itemLabel ?? "Item"} settings`,
133373
- tooltip: `${config.itemLabel ?? "Item"} settings`
133374
- }
133375
- ),
133376
- /* @__PURE__ */ jsx(
133377
- RepeaterRowActions,
133378
- {
133379
- index: index2,
133380
- itemsLength,
133381
- minItems,
133382
- onMoveUp: () => onMove(index2, index2 - 1),
133383
- onMoveDown: () => onMove(index2, index2 + 1),
133384
- onRemove: () => onRemove(index2)
133385
- }
133386
- )
133387
- ] })
133388
- ] }) }),
133389
- /* @__PURE__ */ jsx(CollapsibleContent2, { children: /* @__PURE__ */ jsx(
133390
- RepeaterRowContent,
133391
- {
133392
- config,
133393
- index: index2,
133394
- basePath,
133395
- backend,
133396
- renderChild,
133397
- excludeFieldIds: settingsFieldIds
133398
- }
133399
- ) })
133400
- ]
133401
- }
133402
- ) });
133403
- }
133404
- function RepeaterList({
133405
- config,
133406
- backend,
133407
- basePath,
133408
- items,
133409
- minItems,
133410
- onMove,
133411
- onRemove,
133412
- renderChild
133413
- }) {
133414
- const linearDnd = useLinearRepeaterDnd({
133415
- itemIds: items.map((item) => item.id),
133416
- sortingStrategy: "verticalList",
133417
- activationDistance: 5,
133418
- onMove
133419
- });
133420
- return /* @__PURE__ */ jsx("div", { ref: linearDnd.containerRef, children: /* @__PURE__ */ jsx(
133421
- DndContext,
133422
- {
133423
- sensors: linearDnd.sensors,
133424
- collisionDetection: linearDnd.collisionDetection,
133425
- onDragEnd: linearDnd.handleDragEnd,
133426
- children: /* @__PURE__ */ jsx(SortableContext, { items: linearDnd.sortableItemIds, strategy: linearDnd.sortingStrategy, children: items.map((item, index2) => /* @__PURE__ */ jsx(
133427
- RepeaterRow,
133428
- {
133429
- id: item.id,
133430
- index: index2,
133431
- config,
133432
- backend,
133433
- basePath,
133434
- itemsLength: items.length,
133435
- minItems,
133436
- onMove,
133437
- onRemove,
133438
- renderChild,
133439
- canDrag: linearDnd.canUsePointerDrag
133440
- },
133441
- item.id
133442
- )) })
133443
- }
133444
- ) });
133445
- }
133446
133580
  z.object({
133447
133581
  formulaVersion: z.literal("managed-domain-overage-v1"),
133448
133582
  conversionRule: z.literal("usd-to-gbp-1-to-1-v1"),
@@ -133557,10 +133691,16 @@ var dashboardConfigSchema = z.object({
133557
133691
  }).strip();
133558
133692
  var fieldDefinitionInputSchema = unsafeRetypeZodSchema(fieldSchema);
133559
133693
  var sdkLoaderEndpointSchema = z.enum(SUPPORTED_LOADER_ENDPOINTS);
133694
+ var loaderFallbackScalarSchema = z.union([
133695
+ z.string(),
133696
+ z.number(),
133697
+ z.boolean(),
133698
+ z.null()
133699
+ ]);
133560
133700
  var loaderParamBindingSchema = z.object({
133561
133701
  $bind: z.object({
133562
133702
  from: z.string().min(1, "Binding path is required"),
133563
- fallback: z.string().optional()
133703
+ fallback: loaderFallbackScalarSchema.optional()
133564
133704
  })
133565
133705
  });
133566
133706
  var loaderParamValueSchema = z.union([
@@ -133706,9 +133846,13 @@ var sdkBlockFieldOptionsMapSchema = z.record(
133706
133846
  var sdkContentTypeTemplateConfigSchema = z.object({
133707
133847
  blocks: z.array(z.unknown())
133708
133848
  }).passthrough();
133849
+ var sdkContentTypeOrderingConfigSchema = z.object({
133850
+ mode: z.enum(["default", "manual"]).optional()
133851
+ }).optional();
133709
133852
  var sdkContentTypeConfigSchema = z.object({
133710
133853
  key: z.string().min(1),
133711
133854
  fields: z.array(z.unknown()),
133855
+ ordering: sdkContentTypeOrderingConfigSchema,
133712
133856
  template: sdkContentTypeTemplateConfigSchema.nullable().optional()
133713
133857
  }).passthrough();
133714
133858
  var sdkContentConfigSchema = z.object({
@@ -135024,17 +135168,17 @@ var useUploads = ({ uploader, maxParallel = 3, onComplete }) => {
135024
135168
  [items, enqueue, retry, remove, reset2]
135025
135169
  );
135026
135170
  };
135027
- var asSiteId2 = (id) => id;
135028
- var asBookingSessionId = (id) => id;
135029
- var asEntitlementId = (id) => id;
135030
- var asSiteFontId = (id) => id;
135031
- var asBookingRequirementId = (id) => id;
135032
135171
  function ok3(value) {
135033
135172
  return { ok: true, value };
135034
135173
  }
135035
135174
  function err3(error) {
135036
135175
  return { ok: false, error };
135037
135176
  }
135177
+ var unsafeAsSiteId2 = (id) => id;
135178
+ var unsafeAsBookingSessionId = (id) => id;
135179
+ var unsafeAsEntitlementId = (id) => id;
135180
+ var unsafeAsSiteFontId = (id) => id;
135181
+ var unsafeAsBookingRequirementId = (id) => id;
135038
135182
  function fromArray(items) {
135039
135183
  const [first2, ...rest] = items;
135040
135184
  if (first2 === void 0) {
@@ -135154,7 +135298,7 @@ function parseFileUseJson(value) {
135154
135298
  case "booking-evidence": {
135155
135299
  const requirementId = requireNonEmptyString(record.requirementId);
135156
135300
  if (!requirementId.ok) return requirementId;
135157
- return ok3({ tag: "booking-evidence", requirementId: asBookingRequirementId(requirementId.value) });
135301
+ return ok3({ tag: "booking-evidence", requirementId: unsafeAsBookingRequirementId(requirementId.value) });
135158
135302
  }
135159
135303
  case "site-brand-asset": {
135160
135304
  const brandUse = parseOneOf(record.brandUse, SITE_BRAND_ASSET_USES);
@@ -135164,7 +135308,7 @@ function parseFileUseJson(value) {
135164
135308
  case "site-font-file": {
135165
135309
  const fontId = requireNonEmptyString(record.fontId);
135166
135310
  if (!fontId.ok) return fontId;
135167
- return ok3({ tag: "site-font-file", fontId: asSiteFontId(fontId.value) });
135311
+ return ok3({ tag: "site-font-file", fontId: unsafeAsSiteFontId(fontId.value) });
135168
135312
  }
135169
135313
  case "temporary-ingestion": {
135170
135314
  const ingestionKind = parseOneOf(record.ingestionKind, TEMPORARY_INGESTION_KINDS);
@@ -135193,7 +135337,7 @@ function parseAccessPolicyJson(value) {
135193
135337
  case "site-editor-read": {
135194
135338
  const siteId = requireNonEmptyString(record.siteId);
135195
135339
  if (!siteId.ok) return siteId;
135196
- return ok3({ tag: "site-editor-read", siteId: asSiteId2(siteId.value) });
135340
+ return ok3({ tag: "site-editor-read", siteId: unsafeAsSiteId2(siteId.value) });
135197
135341
  }
135198
135342
  case "signed-public-render": {
135199
135343
  const expiresInSeconds = parsePositiveSeconds(record.expiresInSeconds);
@@ -135218,7 +135362,7 @@ function parseAccessPolicyJson(value) {
135218
135362
  if (!expiresInSeconds.ok) return expiresInSeconds;
135219
135363
  return ok3({
135220
135364
  tag: "booking-session-read",
135221
- sessionId: asBookingSessionId(sessionId.value),
135365
+ sessionId: unsafeAsBookingSessionId(sessionId.value),
135222
135366
  ...expiresInSeconds.value !== void 0 ? { expiresInSeconds: expiresInSeconds.value } : {}
135223
135367
  });
135224
135368
  }
@@ -135240,7 +135384,7 @@ function parseEntitledCustomerAccessScopeJson(value) {
135240
135384
  if (!entitlementId.ok) return entitlementId;
135241
135385
  return ok3({
135242
135386
  tag: "specific-entitlement",
135243
- entitlementId: asEntitlementId(entitlementId.value)
135387
+ entitlementId: unsafeAsEntitlementId(entitlementId.value)
135244
135388
  });
135245
135389
  }
135246
135390
  }
@@ -135508,6 +135652,14 @@ var searchMatchRowSchema = z.object({
135508
135652
  score: z.number()
135509
135653
  });
135510
135654
  z.array(searchMatchRowSchema);
135655
+ var mediaLabelRowSchema = z.object({
135656
+ id: z.number(),
135657
+ slug: z.string(),
135658
+ name: z.string(),
135659
+ created_at: z.string(),
135660
+ updated_at: z.string()
135661
+ });
135662
+ z.array(mediaLabelRowSchema);
135511
135663
 
135512
135664
  // ../media-react/src/hooks/internal/classification.ts
135513
135665
  var logToConsole = (level, message2, base2, extra) => {
@@ -140613,14 +140765,14 @@ function rotateRectForOutput(rect, rotation, image) {
140613
140765
  const W2 = image.width;
140614
140766
  const H = image.height;
140615
140767
  switch (rotation) {
140768
+ case 0:
140769
+ return rect;
140616
140770
  case 90:
140617
140771
  return [H - (top + height), left, height, width];
140618
140772
  case 180:
140619
140773
  return [W2 - (left + width), H - (top + height), width, height];
140620
140774
  case 270:
140621
140775
  return [top, W2 - (left + width), height, width];
140622
- default:
140623
- return rect;
140624
140776
  }
140625
140777
  }
140626
140778
  function unrotateRectFromOutput(rect, rotation, image) {
@@ -140628,14 +140780,14 @@ function unrotateRectFromOutput(rect, rotation, image) {
140628
140780
  const W2 = image.width;
140629
140781
  const H = image.height;
140630
140782
  switch (rotation) {
140783
+ case 0:
140784
+ return rect;
140631
140785
  case 90:
140632
140786
  return [top, H - (left + width), height, width];
140633
140787
  case 180:
140634
140788
  return [W2 - (left + width), H - (top + height), width, height];
140635
140789
  case 270:
140636
140790
  return [W2 - (top + height), left, height, width];
140637
- default:
140638
- return rect;
140639
140791
  }
140640
140792
  }
140641
140793
  function buildDefaultRectForAspect(image, aspect) {
@@ -140829,6 +140981,8 @@ function resolveCropConstraint(input) {
140829
140981
  }
140830
140982
  function getCropConstraintMessage(constraint) {
140831
140983
  switch (constraint.kind) {
140984
+ case "none":
140985
+ return void 0;
140832
140986
  case "aspect-too-small-no-crop":
140833
140987
  return "This image is too small to crop at this aspect ratio.";
140834
140988
  case "aspect-too-small-no-resize":
@@ -140839,8 +140993,6 @@ function getCropConstraintMessage(constraint) {
140839
140993
  return "This image is too small to crop horizontally; you can only adjust the height.";
140840
140994
  case "free-too-small-vertical":
140841
140995
  return "This image is too small to crop vertically; you can only adjust the width.";
140842
- default:
140843
- return void 0;
140844
140996
  }
140845
140997
  }
140846
140998
 
@@ -141820,7 +141972,7 @@ function resolveCropEditorSource(value) {
141820
141972
  }
141821
141973
  return {
141822
141974
  kind: "ready",
141823
- imageUrl: getImageUrl({ id: asMediaAssetId(assetId) }, CROP_EDITOR_PROXY_PARAMS),
141975
+ imageUrl: getImageUrl({ id: unsafeAsMediaAssetId(assetId) }, CROP_EDITOR_PROXY_PARAMS),
141824
141976
  orientationMode: CROP_EDITOR_ORIENTATION_MODE
141825
141977
  };
141826
141978
  }
@@ -142377,6 +142529,12 @@ var MediaPickerDialog = ({
142377
142529
  }
142378
142530
  ) });
142379
142531
  };
142532
+ var previewMaxWidthClassName = {
142533
+ xs: "max-w-xs",
142534
+ sm: "max-w-sm",
142535
+ md: "max-w-md",
142536
+ none: "max-w-none"
142537
+ };
142380
142538
  var MediaPreview = ({
142381
142539
  value,
142382
142540
  previewAspectRatio,
@@ -142387,7 +142545,9 @@ var MediaPreview = ({
142387
142545
  fullWidth = false,
142388
142546
  variant = "default",
142389
142547
  showRemoveAction = true,
142390
- showActionOverlay = true
142548
+ showActionOverlay = true,
142549
+ previewMaxWidth = "md",
142550
+ preventUpscale = false
142391
142551
  }) => {
142392
142552
  const { imageResolveContext } = useMediaEditor();
142393
142553
  const image = isImageValue(value);
@@ -142401,7 +142561,8 @@ var MediaPreview = ({
142401
142561
  },
142402
142562
  imageResolveContext
142403
142563
  ) ?? null : null;
142404
- const imageSrc = image ? previewUrl ?? value?.src ?? null : null;
142564
+ const originalImageSrc = image && value ? resolveMediaStorageUrl(value, imageResolveContext) ?? value.src ?? null : null;
142565
+ const imageSrc = image ? (preventUpscale ? originalImageSrc : previewUrl) ?? value?.src ?? null : null;
142405
142566
  const transformStyle = value ? computeMediaTransformStyle(value, void 0, previewAspectRatio) : void 0;
142406
142567
  const hasValue = hasMediaValue(value);
142407
142568
  const video = isVideoValue(value);
@@ -142414,11 +142575,14 @@ var MediaPreview = ({
142414
142575
  const fileLabel = value?.filename ?? value?.alt ?? "File";
142415
142576
  const aspectStyle = previewAspectRatio ? { aspectRatio: previewAspectRatio } : void 0;
142416
142577
  const isThumbnailVariant = variant === "thumbnail";
142578
+ const previewWidthClassName = fullWidth ? "max-w-none" : previewMaxWidthClassName[previewMaxWidth];
142579
+ const imageClassName = preventUpscale ? "max-h-full max-w-full object-contain" : "h-full w-full object-cover";
142417
142580
  return /* @__PURE__ */ jsx("div", { className: cn("group relative", isThumbnailVariant && "h-full w-full"), children: /* @__PURE__ */ jsx(
142418
142581
  "div",
142419
142582
  {
142420
142583
  className: cn(
142421
- `relative w-full ${fullWidth ? "max-w-none" : "max-w-md"} overflow-hidden bg-muted`,
142584
+ "relative w-full overflow-hidden bg-muted",
142585
+ previewWidthClassName,
142422
142586
  isThumbnailVariant ? "h-full w-full rounded-none border-0" : "rounded-lg border border-dashed border-muted-foreground/50",
142423
142587
  !isThumbnailVariant && !previewAspectRatio && "min-h-[10rem]"
142424
142588
  ),
@@ -142438,7 +142602,7 @@ var MediaPreview = ({
142438
142602
  "img",
142439
142603
  {
142440
142604
  alt: value?.alt ?? "",
142441
- className: "h-full w-full object-cover",
142605
+ className: imageClassName,
142442
142606
  src: imageSrc,
142443
142607
  style: transformStyle
142444
142608
  }
@@ -142685,6 +142849,8 @@ var MediaEditor = ({
142685
142849
  fullWidth = false,
142686
142850
  previewVariant = "default",
142687
142851
  showRemoveAction = true,
142852
+ previewMaxWidth = "md",
142853
+ preventPreviewUpscale = false,
142688
142854
  uploadIntent,
142689
142855
  videoPrepIntent,
142690
142856
  videoSelectionIntent
@@ -142873,7 +143039,13 @@ var MediaEditor = ({
142873
143039
  onChange(void 0);
142874
143040
  };
142875
143041
  const isThumbnailVariant = previewVariant === "thumbnail";
142876
- const containerClassName = isThumbnailVariant ? `h-full w-full ${fullWidth ? "max-w-none" : "max-w-md"}` : `space-y-4 w-full ${fullWidth ? "max-w-none" : "max-w-md"}`;
143042
+ const mediaEditorMaxWidthClassName = {
143043
+ xs: "max-w-xs",
143044
+ sm: "max-w-sm",
143045
+ md: "max-w-md",
143046
+ none: "max-w-none"
143047
+ }[previewMaxWidth];
143048
+ const containerClassName = isThumbnailVariant ? `h-full w-full ${fullWidth ? "max-w-none" : mediaEditorMaxWidthClassName}` : `space-y-4 w-full ${fullWidth ? "max-w-none" : mediaEditorMaxWidthClassName}`;
142877
143049
  return /* @__PURE__ */ jsxs("div", { className: containerClassName, children: [
142878
143050
  showPreview ? /* @__PURE__ */ jsx(
142879
143051
  MediaPreview,
@@ -142887,7 +143059,9 @@ var MediaEditor = ({
142887
143059
  fullWidth,
142888
143060
  variant: previewVariant,
142889
143061
  showRemoveAction,
142890
- showActionOverlay
143062
+ showActionOverlay,
143063
+ previewMaxWidth,
143064
+ preventUpscale: preventPreviewUpscale
142891
143065
  }
142892
143066
  ) : null,
142893
143067
  showAltInput && isImageValue(value) ? /* @__PURE__ */ jsx(Input, { value: altText, placeholder: "Alt text", onChange: (event) => setAltText(event.target.value) }) : null,
@@ -142979,7 +143153,7 @@ async function resolveVideoPosterReference(picked, context) {
142979
143153
  return {
142980
143154
  tag: "failed",
142981
143155
  assetId: picked.id,
142982
- thumbnailAssetId: asMediaAssetId(thumbnailAssetId),
143156
+ thumbnailAssetId: unsafeAsMediaAssetId(thumbnailAssetId),
142983
143157
  error
142984
143158
  };
142985
143159
  }
@@ -143086,11 +143260,11 @@ var createApiMediaRepo = ({ client }) => ({
143086
143260
  client,
143087
143261
  {
143088
143262
  endpoint: "mediaList",
143089
- body: {
143263
+ params: {
143090
143264
  siteId: options.siteId,
143091
143265
  q: options.search,
143092
- limit: options.limit,
143093
- offset: options.offset,
143266
+ limit: options.limit === void 0 ? void 0 : String(options.limit),
143267
+ offset: options.offset === void 0 ? void 0 : String(options.offset),
143094
143268
  labels: normalizeLabels(options.labels),
143095
143269
  fileFilter: options.fileFilter
143096
143270
  }
@@ -143466,6 +143640,254 @@ function withRepeaterThumbnailMediaFieldUi(field, options) {
143466
143640
  }
143467
143641
  };
143468
143642
  }
143643
+ function withRepeaterStackMediaFieldUi(field) {
143644
+ return {
143645
+ ...field,
143646
+ ui: {
143647
+ ...field.ui ?? {},
143648
+ mediaPreviewMaxWidth: "xs",
143649
+ preventMediaPreviewUpscale: true
143650
+ }
143651
+ };
143652
+ }
143653
+ function RepeaterRowContent({
143654
+ config,
143655
+ index: index2,
143656
+ basePath,
143657
+ backend,
143658
+ renderChild,
143659
+ excludeFieldIds,
143660
+ className
143661
+ }) {
143662
+ const itemFields = useMemo(() => {
143663
+ let fields3 = getRepeaterItemFields(config, backend, basePath, index2);
143664
+ if (excludeFieldIds && excludeFieldIds.size > 0) {
143665
+ fields3 = fields3.filter((f2) => !excludeFieldIds.has(f2.id));
143666
+ }
143667
+ return fields3;
143668
+ }, [config, backend, basePath, index2, excludeFieldIds]);
143669
+ return /* @__PURE__ */ jsx("div", { className: className ?? "space-y-4 px-3 pb-3 pt-2", children: itemFields.map((child) => {
143670
+ const field = child.type === "media" ? withRepeaterStackMediaFieldUi(child) : child;
143671
+ return renderChild(field, `${basePath}.${index2}.${child.id}`);
143672
+ }) });
143673
+ }
143674
+ function RepeaterRow({
143675
+ id,
143676
+ index: index2,
143677
+ config,
143678
+ backend,
143679
+ basePath,
143680
+ itemsLength,
143681
+ minItems,
143682
+ containerWidth,
143683
+ onMove,
143684
+ onRemove,
143685
+ renderChild,
143686
+ canDrag,
143687
+ actionControlRefs
143688
+ }) {
143689
+ const sortable = useSortable({ id, disabled: !canDrag });
143690
+ const style2 = {
143691
+ transform: CSS2.Transform.toString(sortable.transform),
143692
+ transition: sortable.transition,
143693
+ opacity: sortable.isDragging ? 0.6 : 1
143694
+ };
143695
+ const itemLabel = useResolvedRepeaterItemLabel(config, index2, backend, basePath);
143696
+ const summary = buildSummary(config, index2, backend, basePath);
143697
+ const rowErrors = useRepeaterRowErrors(config, index2, backend, basePath);
143698
+ const hasErrors = rowErrors.length > 0;
143699
+ const { settingsFields, settingsFieldIds } = useMemo(
143700
+ () => getRepeaterItemFieldGroups(config, backend, basePath, index2),
143701
+ [config, backend, basePath, index2]
143702
+ );
143703
+ const [open, setOpen] = useState(hasErrors || index2 === itemsLength - 1);
143704
+ useEffect(() => {
143705
+ if (hasErrors) setOpen(true);
143706
+ }, [hasErrors]);
143707
+ return /* @__PURE__ */ jsx(Collapsible2, { open, onOpenChange: setOpen, children: /* @__PURE__ */ jsxs(
143708
+ Card,
143709
+ {
143710
+ ref: sortable.setNodeRef,
143711
+ style: style2,
143712
+ size: "none",
143713
+ "data-error": hasErrors ? "true" : void 0,
143714
+ className: `${hasErrors ? "ring-2 ring-destructive" : ""} group mb-6 p-0`,
143715
+ children: [
143716
+ /* @__PURE__ */ jsx(CollapsibleTrigger2, { asChild: true, children: /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-center justify-between gap-2 px-3 py-2 hover:bg-accent/30 cursor-pointer rounded-md", children: [
143717
+ /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: [
143718
+ canDrag ? /* @__PURE__ */ jsx(
143719
+ RepeaterDragHandle,
143720
+ {
143721
+ placement: "inline",
143722
+ ref: sortable.setActivatorNodeRef,
143723
+ ...sortable.attributes,
143724
+ ...sortable.listeners,
143725
+ onMouseDown: (event) => event.stopPropagation(),
143726
+ onTouchStart: (event) => event.stopPropagation(),
143727
+ onClick: (event) => event.stopPropagation()
143728
+ }
143729
+ ) : null,
143730
+ /* @__PURE__ */ jsx(ChevronRight, { className: `h-4 w-4 shrink-0 transition ${open ? "rotate-90" : ""}` }),
143731
+ /* @__PURE__ */ jsx("span", { className: "min-w-0 shrink truncate text-sm font-medium", children: itemLabel.label }),
143732
+ summary ? /* @__PURE__ */ jsxs("span", { className: "min-w-0 flex-1 truncate text-xs text-muted-foreground", children: [
143733
+ "\u2014 ",
143734
+ summary
143735
+ ] }) : null,
143736
+ hasErrors ? /* @__PURE__ */ jsxs("span", { className: "inline-flex shrink-0 items-center gap-1 text-[11px] text-destructive", children: [
143737
+ /* @__PURE__ */ jsx(CircleAlert, { className: "h-3 w-3 shrink-0" }),
143738
+ " Needs attention"
143739
+ ] }) : null
143740
+ ] }),
143741
+ /* @__PURE__ */ jsxs("div", { className: "flex shrink-0 items-center gap-1", children: [
143742
+ settingsFields.length > 0 && /* @__PURE__ */ jsx(
143743
+ FieldSettingsModal,
143744
+ {
143745
+ fields: settingsFields,
143746
+ basePath: `${basePath}.${index2}`,
143747
+ backend,
143748
+ renderChild,
143749
+ title: `${config.itemLabel ?? "Item"} settings`,
143750
+ tooltip: `${config.itemLabel ?? "Item"} settings`
143751
+ }
143752
+ ),
143753
+ /* @__PURE__ */ jsx(
143754
+ RepeaterRowActions,
143755
+ {
143756
+ index: index2,
143757
+ itemsLength,
143758
+ minItems,
143759
+ containerWidth,
143760
+ itemLabel: itemLabel.label,
143761
+ onMoveUp: () => onMove(index2, index2 - 1, "moveEarlier"),
143762
+ onMoveDown: () => onMove(index2, index2 + 1, "moveLater"),
143763
+ onRemove: () => onRemove(index2),
143764
+ actionControlRefs
143765
+ }
143766
+ )
143767
+ ] })
143768
+ ] }) }),
143769
+ /* @__PURE__ */ jsx(CollapsibleContent2, { children: /* @__PURE__ */ jsx(
143770
+ RepeaterRowContent,
143771
+ {
143772
+ config,
143773
+ index: index2,
143774
+ basePath,
143775
+ backend,
143776
+ renderChild,
143777
+ excludeFieldIds: settingsFieldIds
143778
+ }
143779
+ ) })
143780
+ ]
143781
+ }
143782
+ ) });
143783
+ }
143784
+ function RepeaterList({
143785
+ config,
143786
+ backend,
143787
+ basePath,
143788
+ items,
143789
+ minItems,
143790
+ onMove,
143791
+ onRemove,
143792
+ renderChild,
143793
+ focusFallbackRef
143794
+ }) {
143795
+ const actionControlRefs = useRef(/* @__PURE__ */ new Map());
143796
+ const pendingFocusRef = useRef(null);
143797
+ const linearDnd = useLinearRepeaterDnd({
143798
+ itemIds: items.map((item) => item.id),
143799
+ sortingStrategy: "verticalList",
143800
+ activationDistance: 5,
143801
+ onMove
143802
+ });
143803
+ const focusActionControl = useCallback((pendingFocus) => {
143804
+ if (pendingFocus.kind === "fallback") {
143805
+ focusFallbackRef?.current?.focus();
143806
+ return;
143807
+ }
143808
+ const controls = actionControlRefs.current.get(pendingFocus.itemId);
143809
+ const preferred = controls?.[pendingFocus.target];
143810
+ const fallback2 = controls?.menu ?? controls?.moveLater ?? controls?.moveEarlier;
143811
+ const focused = preferred ?? fallback2;
143812
+ if (focused) {
143813
+ focused.focus();
143814
+ return;
143815
+ }
143816
+ focusFallbackRef?.current?.focus();
143817
+ }, [focusFallbackRef]);
143818
+ useEffect(() => {
143819
+ if (!pendingFocusRef.current) {
143820
+ return;
143821
+ }
143822
+ const pendingFocus = pendingFocusRef.current;
143823
+ pendingFocusRef.current = null;
143824
+ window.requestAnimationFrame(() => focusActionControl(pendingFocus));
143825
+ }, [focusActionControl, items]);
143826
+ const setActionControlRef = useCallback((itemId, target) => (element) => {
143827
+ const existing = actionControlRefs.current.get(itemId) ?? {};
143828
+ if (!element) {
143829
+ delete existing[target];
143830
+ if (Object.keys(existing).length === 0) {
143831
+ actionControlRefs.current.delete(itemId);
143832
+ } else {
143833
+ actionControlRefs.current.set(itemId, existing);
143834
+ }
143835
+ return;
143836
+ }
143837
+ actionControlRefs.current.set(itemId, {
143838
+ ...existing,
143839
+ [target]: element
143840
+ });
143841
+ }, []);
143842
+ const handleMoveWithFocus = useCallback((itemId, focusTarget, from2, to) => {
143843
+ pendingFocusRef.current = {
143844
+ kind: "row-action",
143845
+ itemId,
143846
+ target: focusTarget
143847
+ };
143848
+ onMove(from2, to);
143849
+ }, [onMove]);
143850
+ const handleRemoveWithFocus = useCallback((index2) => {
143851
+ const nextFocusItem = items[index2 + 1] ?? items[index2 - 1] ?? null;
143852
+ pendingFocusRef.current = nextFocusItem ? {
143853
+ kind: "row-action",
143854
+ itemId: nextFocusItem.id,
143855
+ target: "menu"
143856
+ } : { kind: "fallback" };
143857
+ onRemove(index2);
143858
+ }, [items, onRemove]);
143859
+ return /* @__PURE__ */ jsx("div", { ref: linearDnd.containerRef, children: /* @__PURE__ */ jsx(
143860
+ DndContext,
143861
+ {
143862
+ sensors: linearDnd.sensors,
143863
+ collisionDetection: linearDnd.collisionDetection,
143864
+ onDragEnd: linearDnd.handleDragEnd,
143865
+ children: /* @__PURE__ */ jsx(SortableContext, { items: linearDnd.sortableItemIds, strategy: linearDnd.sortingStrategy, children: items.map((item, index2) => /* @__PURE__ */ jsx(
143866
+ RepeaterRow,
143867
+ {
143868
+ id: item.id,
143869
+ index: index2,
143870
+ config,
143871
+ backend,
143872
+ basePath,
143873
+ itemsLength: items.length,
143874
+ minItems,
143875
+ containerWidth: linearDnd.containerWidth,
143876
+ onMove: (from2, to, focusTarget) => handleMoveWithFocus(item.id, focusTarget, from2, to),
143877
+ onRemove: handleRemoveWithFocus,
143878
+ renderChild,
143879
+ canDrag: linearDnd.canUsePointerDrag,
143880
+ actionControlRefs: {
143881
+ moveEarlier: setActionControlRef(item.id, "moveEarlier"),
143882
+ moveLater: setActionControlRef(item.id, "moveLater"),
143883
+ menu: setActionControlRef(item.id, "menu")
143884
+ }
143885
+ },
143886
+ item.id
143887
+ )) })
143888
+ }
143889
+ ) });
143890
+ }
143469
143891
  function handleDoneButtonKeyDown(event, onDone) {
143470
143892
  if (event.key !== "Enter" && event.key !== " ") {
143471
143893
  return;
@@ -144006,6 +144428,8 @@ function RepeaterThumbnailCard({
144006
144428
  index: index2,
144007
144429
  itemsLength,
144008
144430
  minItems,
144431
+ actionPresentation: "wide",
144432
+ itemLabel,
144009
144433
  onMoveUp: onMoveUp ?? (() => onMove(index2, index2 - 1)),
144010
144434
  onMoveDown: onMoveDown ?? (() => onMove(index2, index2 + 1)),
144011
144435
  onRemove: () => onRemove(index2),
@@ -144634,6 +145058,7 @@ function RepeaterField({ path, backend, config, renderChild }) {
144634
145058
  const presentation = resolveRepeaterPresentation(config);
144635
145059
  const polymorphicWarnOnceRef = useRef(false);
144636
145060
  const labelFieldWarnOnceRef = useRef(false);
145061
+ const addButtonRef = useRef(null);
144637
145062
  const minItems = config.minItems ?? 0;
144638
145063
  const maxItems = config.maxItems;
144639
145064
  const isPolymorphic = Boolean(config.polymorphic && config.itemTypes);
@@ -144737,11 +145162,12 @@ function RepeaterField({ path, backend, config, renderChild }) {
144737
145162
  minItems,
144738
145163
  onMove: handleMove,
144739
145164
  onRemove: handleRemove,
144740
- renderChild
145165
+ renderChild,
145166
+ focusFallbackRef: addButtonRef
144741
145167
  }
144742
145168
  ),
144743
145169
  /* @__PURE__ */ jsx("div", { className: "mt-3", children: isPolymorphic ? /* @__PURE__ */ jsxs(DropdownMenu2, { children: [
144744
- /* @__PURE__ */ jsx(DropdownMenuTrigger2, { asChild: true, children: /* @__PURE__ */ jsxs(Button, { type: "button", variant: "secondary", disabled: addDisabled, children: [
145170
+ /* @__PURE__ */ jsx(DropdownMenuTrigger2, { asChild: true, children: /* @__PURE__ */ jsxs(Button, { ref: addButtonRef, type: "button", variant: "secondary", disabled: addDisabled, children: [
144745
145171
  /* @__PURE__ */ jsx(Plus, { className: "mr-2 h-4 w-4" }),
144746
145172
  "Add ",
144747
145173
  config.itemLabel ?? "Item",
@@ -144756,11 +145182,21 @@ function RepeaterField({ path, backend, config, renderChild }) {
144756
145182
  },
144757
145183
  typeKey
144758
145184
  )) })
144759
- ] }) : /* @__PURE__ */ jsxs(Button, { type: "button", variant: "secondary", onClick: () => handleAdd(), disabled: addDisabled, children: [
144760
- /* @__PURE__ */ jsx(Plus, { className: "mr-2 h-4 w-4" }),
144761
- "Add ",
144762
- config.itemLabel ?? "Item"
144763
- ] }) }),
145185
+ ] }) : /* @__PURE__ */ jsxs(
145186
+ Button,
145187
+ {
145188
+ ref: addButtonRef,
145189
+ type: "button",
145190
+ variant: "secondary",
145191
+ onClick: () => handleAdd(),
145192
+ disabled: addDisabled,
145193
+ children: [
145194
+ /* @__PURE__ */ jsx(Plus, { className: "mr-2 h-4 w-4" }),
145195
+ "Add ",
145196
+ config.itemLabel ?? "Item"
145197
+ ]
145198
+ }
145199
+ ) }),
144764
145200
  /* @__PURE__ */ jsx(RepeaterError, { error: fieldState.error, fieldPath: path })
144765
145201
  ] });
144766
145202
  }
@@ -145237,9 +145673,15 @@ function sanitizeSlugInput(value, maxLength) {
145237
145673
  }
145238
145674
 
145239
145675
  // ../block-form/src/widgets/SlugField/utils/slugUtils.ts
145676
+ function isRecord13(value) {
145677
+ return typeof value === "object" && value !== null && !Array.isArray(value);
145678
+ }
145679
+ function isUnknownArray6(value) {
145680
+ return Array.isArray(value);
145681
+ }
145240
145682
  function ensureUniqueSlug(candidate, backend, collectionPath, currentIndex, fieldId, maxLength) {
145241
145683
  const items = backend.getValue(collectionPath);
145242
- if (!Array.isArray(items)) {
145684
+ if (!isUnknownArray6(items)) {
145243
145685
  return limitSlugLength(candidate, maxLength);
145244
145686
  }
145245
145687
  const normalize2 = (value) => limitSlugLength(value, maxLength);
@@ -145247,7 +145689,7 @@ function ensureUniqueSlug(candidate, backend, collectionPath, currentIndex, fiel
145247
145689
  for (let i2 = 0; i2 < items.length; i2 += 1) {
145248
145690
  if (i2 === currentIndex) continue;
145249
145691
  const item = items[i2];
145250
- if (typeof item === "object" && item !== null) {
145692
+ if (isRecord13(item)) {
145251
145693
  const value = item[fieldId];
145252
145694
  if (typeof value === "string") {
145253
145695
  const normalized = normalize2(value.trim());
@@ -146450,7 +146892,7 @@ function findDiffEnd(a2, b2, posA, posB) {
146450
146892
  posB -= size4;
146451
146893
  }
146452
146894
  }
146453
- var Fragment46 = class _Fragment {
146895
+ var Fragment47 = class _Fragment {
146454
146896
  /**
146455
146897
  @internal
146456
146898
  */
@@ -146742,7 +147184,7 @@ var Fragment46 = class _Fragment {
146742
147184
  throw new RangeError("Can not convert " + nodes + " to a Fragment" + (nodes.nodesBetween ? " (looks like multiple versions of prosemirror-model were loaded)" : ""));
146743
147185
  }
146744
147186
  };
146745
- Fragment46.empty = new Fragment46([], 0);
147187
+ Fragment47.empty = new Fragment47([], 0);
146746
147188
  var found = { index: 0, offset: 0 };
146747
147189
  function retIndex(index2, offset4) {
146748
147190
  found.index = index2;
@@ -146967,7 +147409,7 @@ var Slice2 = class _Slice {
146967
147409
  let openStart = json.openStart || 0, openEnd = json.openEnd || 0;
146968
147410
  if (typeof openStart != "number" || typeof openEnd != "number")
146969
147411
  throw new RangeError("Invalid input for Slice.fromJSON");
146970
- return new _Slice(Fragment46.fromJSON(schema, json.content), openStart, openEnd);
147412
+ return new _Slice(Fragment47.fromJSON(schema, json.content), openStart, openEnd);
146971
147413
  }
146972
147414
  /**
146973
147415
  Create a slice from a fragment by taking the maximum possible
@@ -146982,7 +147424,7 @@ var Slice2 = class _Slice {
146982
147424
  return new _Slice(fragment, openStart, openEnd);
146983
147425
  }
146984
147426
  };
146985
- Slice2.empty = new Slice2(Fragment46.empty, 0, 0);
147427
+ Slice2.empty = new Slice2(Fragment47.empty, 0, 0);
146986
147428
  function removeRange(content, from2, to) {
146987
147429
  let { index: index2, offset: offset4 } = content.findIndex(from2), child = content.maybeChild(index2);
146988
147430
  let { index: indexTo, offset: offsetTo } = content.findIndex(to);
@@ -147080,7 +147522,7 @@ function replaceThreeWay($from, $start, $end, $to, depth) {
147080
147522
  addNode(close(openEnd, replaceTwoWay($end, $to, depth + 1)), content);
147081
147523
  }
147082
147524
  addRange($to, null, depth, content);
147083
- return new Fragment46(content);
147525
+ return new Fragment47(content);
147084
147526
  }
147085
147527
  function replaceTwoWay($from, $to, depth) {
147086
147528
  let content = [];
@@ -147090,13 +147532,13 @@ function replaceTwoWay($from, $to, depth) {
147090
147532
  addNode(close(type, replaceTwoWay($from, $to, depth + 1)), content);
147091
147533
  }
147092
147534
  addRange($to, null, depth, content);
147093
- return new Fragment46(content);
147535
+ return new Fragment47(content);
147094
147536
  }
147095
147537
  function prepareSliceForReplace(slice2, $along) {
147096
147538
  let extra = $along.depth - slice2.openStart, parent = $along.node(extra);
147097
147539
  let node = parent.copy(slice2.content);
147098
147540
  for (let i2 = extra - 1; i2 >= 0; i2--)
147099
- node = $along.node(i2).copy(Fragment46.from(node));
147541
+ node = $along.node(i2).copy(Fragment47.from(node));
147100
147542
  return {
147101
147543
  start: node.resolveNoCache(slice2.openStart + extra),
147102
147544
  end: node.resolveNoCache(node.content.size - slice2.openEnd - extra)
@@ -147435,7 +147877,7 @@ var Node2 = class _Node {
147435
147877
  this.type = type;
147436
147878
  this.attrs = attrs;
147437
147879
  this.marks = marks;
147438
- this.content = content || Fragment46.empty;
147880
+ this.content = content || Fragment47.empty;
147439
147881
  }
147440
147882
  /**
147441
147883
  The array of this node's child nodes.
@@ -147740,7 +148182,7 @@ var Node2 = class _Node {
147740
148182
  can optionally pass `start` and `end` indices into the
147741
148183
  replacement fragment.
147742
148184
  */
147743
- canReplace(from2, to, replacement = Fragment46.empty, start = 0, end = replacement.childCount) {
148185
+ canReplace(from2, to, replacement = Fragment47.empty, start = 0, end = replacement.childCount) {
147744
148186
  let one = this.contentMatchAt(from2).matchFragment(replacement, start, end);
147745
148187
  let two = one && one.matchFragment(this.content, to);
147746
148188
  if (!two || !two.validEnd)
@@ -147822,7 +148264,7 @@ var Node2 = class _Node {
147822
148264
  throw new RangeError("Invalid text node in JSON");
147823
148265
  return schema.text(json.text, marks);
147824
148266
  }
147825
- let content = Fragment46.fromJSON(schema, json.content);
148267
+ let content = Fragment47.fromJSON(schema, json.content);
147826
148268
  let node = schema.nodeType(json.type).create(json.attrs, content, marks);
147827
148269
  node.type.checkAttrs(node.attrs);
147828
148270
  return node;
@@ -147964,7 +148406,7 @@ var ContentMatch = class _ContentMatch {
147964
148406
  function search(match2, types) {
147965
148407
  let finished = match2.matchFragment(after, startIndex);
147966
148408
  if (finished && (!toEnd || finished.validEnd))
147967
- return Fragment46.from(types.map((tp) => tp.createAndFill()));
148409
+ return Fragment47.from(types.map((tp) => tp.createAndFill()));
147968
148410
  for (let i2 = 0; i2 < match2.next.length; i2++) {
147969
148411
  let { type, next } = match2.next[i2];
147970
148412
  if (!(type.isText || type.hasRequiredAttrs()) && seen.indexOf(next) == -1) {
@@ -148416,7 +148858,7 @@ var NodeType = class _NodeType {
148416
148858
  create(attrs = null, content, marks) {
148417
148859
  if (this.isText)
148418
148860
  throw new Error("NodeType.create can't construct text nodes");
148419
- return new Node2(this, this.computeAttrs(attrs), Fragment46.from(content), Mark.setFrom(marks));
148861
+ return new Node2(this, this.computeAttrs(attrs), Fragment47.from(content), Mark.setFrom(marks));
148420
148862
  }
148421
148863
  /**
148422
148864
  Like [`create`](https://prosemirror.net/docs/ref/#model.NodeType.create), but check the given content
@@ -148424,7 +148866,7 @@ var NodeType = class _NodeType {
148424
148866
  if it doesn't match.
148425
148867
  */
148426
148868
  createChecked(attrs = null, content, marks) {
148427
- content = Fragment46.from(content);
148869
+ content = Fragment47.from(content);
148428
148870
  this.checkContent(content);
148429
148871
  return new Node2(this, this.computeAttrs(attrs), content, Mark.setFrom(marks));
148430
148872
  }
@@ -148438,7 +148880,7 @@ var NodeType = class _NodeType {
148438
148880
  */
148439
148881
  createAndFill(attrs = null, content, marks) {
148440
148882
  attrs = this.computeAttrs(attrs);
148441
- content = Fragment46.from(content);
148883
+ content = Fragment47.from(content);
148442
148884
  if (content.size) {
148443
148885
  let before = this.contentMatch.fillBefore(content);
148444
148886
  if (!before)
@@ -148446,7 +148888,7 @@ var NodeType = class _NodeType {
148446
148888
  content = before.append(content);
148447
148889
  }
148448
148890
  let matched = this.contentMatch.matchFragment(content);
148449
- let after = matched && matched.fillBefore(Fragment46.empty, true);
148891
+ let after = matched && matched.fillBefore(Fragment47.empty, true);
148450
148892
  if (!after)
148451
148893
  return null;
148452
148894
  return new Node2(this, attrs, content.append(after), Mark.setFrom(marks));
@@ -148910,7 +149352,7 @@ var NodeContext = class {
148910
149352
  if (!this.match) {
148911
149353
  if (!this.type)
148912
149354
  return [];
148913
- let fill = this.type.contentMatch.fillBefore(Fragment46.from(node));
149355
+ let fill = this.type.contentMatch.fillBefore(Fragment47.from(node));
148914
149356
  if (fill) {
148915
149357
  this.match = this.type.contentMatch.matchFragment(fill);
148916
149358
  } else {
@@ -148936,9 +149378,9 @@ var NodeContext = class {
148936
149378
  this.content[this.content.length - 1] = text2.withText(text2.text.slice(0, text2.text.length - m2[0].length));
148937
149379
  }
148938
149380
  }
148939
- let content = Fragment46.from(this.content);
149381
+ let content = Fragment47.from(this.content);
148940
149382
  if (!openEnd && this.match)
148941
- content = content.append(this.match.fillBefore(Fragment46.empty, true));
149383
+ content = content.append(this.match.fillBefore(Fragment47.empty, true));
148942
149384
  return this.type ? this.type.create(this.attrs, content, this.marks) : content;
148943
149385
  }
148944
149386
  inlineContext(node) {
@@ -149954,7 +150396,7 @@ function mapFragment(fragment, f2, parent) {
149954
150396
  child = f2(child, parent, i2);
149955
150397
  mapped.push(child);
149956
150398
  }
149957
- return Fragment46.fromArray(mapped);
150399
+ return Fragment47.fromArray(mapped);
149958
150400
  }
149959
150401
  var AddMarkStep = class _AddMarkStep extends Step {
149960
150402
  /**
@@ -150071,7 +150513,7 @@ var AddNodeMarkStep = class _AddNodeMarkStep extends Step {
150071
150513
  if (!node)
150072
150514
  return StepResult.fail("No node at mark step's position");
150073
150515
  let updated = node.type.create(node.attrs, null, this.mark.addToSet(node.marks));
150074
- return StepResult.fromReplace(doc3, this.pos, this.pos + 1, new Slice2(Fragment46.from(updated), 0, node.isLeaf ? 0 : 1));
150516
+ return StepResult.fromReplace(doc3, this.pos, this.pos + 1, new Slice2(Fragment47.from(updated), 0, node.isLeaf ? 0 : 1));
150075
150517
  }
150076
150518
  invert(doc3) {
150077
150519
  let node = doc3.nodeAt(this.pos);
@@ -150117,7 +150559,7 @@ var RemoveNodeMarkStep = class _RemoveNodeMarkStep extends Step {
150117
150559
  if (!node)
150118
150560
  return StepResult.fail("No node at mark step's position");
150119
150561
  let updated = node.type.create(node.attrs, null, this.mark.removeFromSet(node.marks));
150120
- return StepResult.fromReplace(doc3, this.pos, this.pos + 1, new Slice2(Fragment46.from(updated), 0, node.isLeaf ? 0 : 1));
150562
+ return StepResult.fromReplace(doc3, this.pos, this.pos + 1, new Slice2(Fragment47.from(updated), 0, node.isLeaf ? 0 : 1));
150121
150563
  }
150122
150564
  invert(doc3) {
150123
150565
  let node = doc3.nodeAt(this.pos);
@@ -150382,7 +150824,7 @@ function clearIncompatible(tr2, pos, parentType, match2 = parentType.contentMatc
150382
150824
  let m2, newline = /\r?\n|\r/g, slice2;
150383
150825
  while (m2 = newline.exec(child.text)) {
150384
150826
  if (!slice2)
150385
- slice2 = new Slice2(Fragment46.from(parentType.schema.text(" ", parentType.allowedMarks(child.marks))), 0, 0);
150827
+ slice2 = new Slice2(Fragment47.from(parentType.schema.text(" ", parentType.allowedMarks(child.marks))), 0, 0);
150386
150828
  replSteps.push(new ReplaceStep(cur + m2.index, cur + m2.index + m2[0].length, slice2));
150387
150829
  }
150388
150830
  }
@@ -150390,7 +150832,7 @@ function clearIncompatible(tr2, pos, parentType, match2 = parentType.contentMatc
150390
150832
  cur = end;
150391
150833
  }
150392
150834
  if (!match2.validEnd) {
150393
- let fill = match2.fillBefore(Fragment46.empty, true);
150835
+ let fill = match2.fillBefore(Fragment47.empty, true);
150394
150836
  tr2.replace(cur, cur, new Slice2(fill, 0, 0));
150395
150837
  }
150396
150838
  for (let i2 = replSteps.length - 1; i2 >= 0; i2--)
@@ -150416,20 +150858,20 @@ function lift(tr2, range, target) {
150416
150858
  let { $from, $to, depth } = range;
150417
150859
  let gapStart = $from.before(depth + 1), gapEnd = $to.after(depth + 1);
150418
150860
  let start = gapStart, end = gapEnd;
150419
- let before = Fragment46.empty, openStart = 0;
150861
+ let before = Fragment47.empty, openStart = 0;
150420
150862
  for (let d2 = depth, splitting = false; d2 > target; d2--)
150421
150863
  if (splitting || $from.index(d2) > 0) {
150422
150864
  splitting = true;
150423
- before = Fragment46.from($from.node(d2).copy(before));
150865
+ before = Fragment47.from($from.node(d2).copy(before));
150424
150866
  openStart++;
150425
150867
  } else {
150426
150868
  start--;
150427
150869
  }
150428
- let after = Fragment46.empty, openEnd = 0;
150870
+ let after = Fragment47.empty, openEnd = 0;
150429
150871
  for (let d2 = depth, splitting = false; d2 > target; d2--)
150430
150872
  if (splitting || $to.after(d2 + 1) < $to.end(d2)) {
150431
150873
  splitting = true;
150432
- after = Fragment46.from($to.node(d2).copy(after));
150874
+ after = Fragment47.from($to.node(d2).copy(after));
150433
150875
  openEnd++;
150434
150876
  } else {
150435
150877
  end++;
@@ -150469,14 +150911,14 @@ function findWrappingInside(range, type) {
150469
150911
  return inside;
150470
150912
  }
150471
150913
  function wrap(tr2, range, wrappers) {
150472
- let content = Fragment46.empty;
150914
+ let content = Fragment47.empty;
150473
150915
  for (let i2 = wrappers.length - 1; i2 >= 0; i2--) {
150474
150916
  if (content.size) {
150475
150917
  let match2 = wrappers[i2].type.contentMatch.matchFragment(content);
150476
150918
  if (!match2 || !match2.validEnd)
150477
150919
  throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper");
150478
150920
  }
150479
- content = Fragment46.from(wrappers[i2].type.create(wrappers[i2].attrs, content));
150921
+ content = Fragment47.from(wrappers[i2].type.create(wrappers[i2].attrs, content));
150480
150922
  }
150481
150923
  let start = range.start, end = range.end;
150482
150924
  tr2.step(new ReplaceAroundStep(start, end, start, end, new Slice2(content, 0, 0), wrappers.length, true));
@@ -150501,7 +150943,7 @@ function setBlockType(tr2, from2, to, type, attrs) {
150501
150943
  clearIncompatible(tr2, tr2.mapping.slice(mapFrom).map(pos, 1), type, void 0, convertNewlines === null);
150502
150944
  let mapping = tr2.mapping.slice(mapFrom);
150503
150945
  let startM = mapping.map(pos, 1), endM = mapping.map(pos + node.nodeSize, 1);
150504
- tr2.step(new ReplaceAroundStep(startM, endM, startM + 1, endM - 1, new Slice2(Fragment46.from(type.create(attrsHere, null, node.marks)), 0, 0), 1, true));
150946
+ tr2.step(new ReplaceAroundStep(startM, endM, startM + 1, endM - 1, new Slice2(Fragment47.from(type.create(attrsHere, null, node.marks)), 0, 0), 1, true));
150505
150947
  if (convertNewlines === true)
150506
150948
  replaceNewlines(tr2, node, pos, mapFrom);
150507
150949
  return false;
@@ -150542,7 +150984,7 @@ function setNodeMarkup(tr2, pos, type, attrs, marks) {
150542
150984
  return tr2.replaceWith(pos, pos + node.nodeSize, newNode);
150543
150985
  if (!type.validContent(node.content))
150544
150986
  throw new RangeError("Invalid content for node type " + type.name);
150545
- tr2.step(new ReplaceAroundStep(pos, pos + node.nodeSize, pos + 1, pos + node.nodeSize - 1, new Slice2(Fragment46.from(newNode), 0, 0), 1, true));
150987
+ tr2.step(new ReplaceAroundStep(pos, pos + node.nodeSize, pos + 1, pos + node.nodeSize - 1, new Slice2(Fragment47.from(newNode), 0, 0), 1, true));
150546
150988
  }
150547
150989
  function canSplit(doc3, pos, depth = 1, typesAfter) {
150548
150990
  let $pos = doc3.resolve(pos), base2 = $pos.depth - depth;
@@ -150566,11 +151008,11 @@ function canSplit(doc3, pos, depth = 1, typesAfter) {
150566
151008
  return $pos.node(base2).canReplaceWith(index2, index2, baseType ? baseType.type : $pos.node(base2 + 1).type);
150567
151009
  }
150568
151010
  function split(tr2, pos, depth = 1, typesAfter) {
150569
- let $pos = tr2.doc.resolve(pos), before = Fragment46.empty, after = Fragment46.empty;
151011
+ let $pos = tr2.doc.resolve(pos), before = Fragment47.empty, after = Fragment47.empty;
150570
151012
  for (let d2 = $pos.depth, e3 = $pos.depth - depth, i2 = depth - 1; d2 > e3; d2--, i2--) {
150571
- before = Fragment46.from($pos.node(d2).copy(before));
151013
+ before = Fragment47.from($pos.node(d2).copy(before));
150572
151014
  let typeAfter = typesAfter && typesAfter[i2];
150573
- after = Fragment46.from(typeAfter ? typeAfter.type.create(typeAfter.attrs, after) : $pos.node(d2).copy(after));
151015
+ after = Fragment47.from(typeAfter ? typeAfter.type.create(typeAfter.attrs, after) : $pos.node(d2).copy(after));
150574
151016
  }
150575
151017
  tr2.step(new ReplaceStep(pos, pos, new Slice2(before.append(after), depth, depth), true));
150576
151018
  }
@@ -150709,7 +151151,7 @@ var Fitter = class {
150709
151151
  this.$to = $to;
150710
151152
  this.unplaced = unplaced;
150711
151153
  this.frontier = [];
150712
- this.placed = Fragment46.empty;
151154
+ this.placed = Fragment47.empty;
150713
151155
  for (let i2 = 0; i2 <= $from.depth; i2++) {
150714
151156
  let node = $from.node(i2);
150715
151157
  this.frontier.push({
@@ -150718,7 +151160,7 @@ var Fitter = class {
150718
151160
  });
150719
151161
  }
150720
151162
  for (let i2 = $from.depth; i2 > 0; i2--)
150721
- this.placed = Fragment46.from($from.node(i2).copy(this.placed));
151163
+ this.placed = Fragment47.from($from.node(i2).copy(this.placed));
150722
151164
  }
150723
151165
  get depth() {
150724
151166
  return this.frontier.length - 1;
@@ -150775,7 +151217,7 @@ var Fitter = class {
150775
151217
  let first2 = fragment.firstChild;
150776
151218
  for (let frontierDepth = this.depth; frontierDepth >= 0; frontierDepth--) {
150777
151219
  let { type, match: match2 } = this.frontier[frontierDepth], wrap2, inject = null;
150778
- if (pass == 1 && (first2 ? match2.matchType(first2.type) || (inject = match2.fillBefore(Fragment46.from(first2), false)) : parent && type.compatibleContent(parent.type)))
151220
+ if (pass == 1 && (first2 ? match2.matchType(first2.type) || (inject = match2.fillBefore(Fragment47.from(first2), false)) : parent && type.compatibleContent(parent.type)))
150779
151221
  return { sliceDepth, frontierDepth, parent, inject };
150780
151222
  else if (pass == 2 && first2 && (wrap2 = match2.findWrapping(first2.type)))
150781
151223
  return { sliceDepth, frontierDepth, parent, wrap: wrap2 };
@@ -150835,7 +151277,7 @@ var Fitter = class {
150835
151277
  let toEnd = taken == fragment.childCount;
150836
151278
  if (!toEnd)
150837
151279
  openEndCount = -1;
150838
- this.placed = addToFragment(this.placed, frontierDepth, Fragment46.from(add2));
151280
+ this.placed = addToFragment(this.placed, frontierDepth, Fragment47.from(add2));
150839
151281
  this.frontier[frontierDepth].match = match2;
150840
151282
  if (toEnd && openEndCount < 0 && parent && parent.type == this.frontier[this.depth].type && this.frontier.length > 1)
150841
151283
  this.closeFrontierNode();
@@ -150891,12 +151333,12 @@ var Fitter = class {
150891
151333
  openFrontierNode(type, attrs = null, content) {
150892
151334
  let top = this.frontier[this.depth];
150893
151335
  top.match = top.match.matchType(type);
150894
- this.placed = addToFragment(this.placed, this.depth, Fragment46.from(type.create(attrs, content)));
151336
+ this.placed = addToFragment(this.placed, this.depth, Fragment47.from(type.create(attrs, content)));
150895
151337
  this.frontier.push({ type, match: type.contentMatch });
150896
151338
  }
150897
151339
  closeFrontierNode() {
150898
151340
  let open = this.frontier.pop();
150899
- let add2 = open.match.fillBefore(Fragment46.empty, true);
151341
+ let add2 = open.match.fillBefore(Fragment47.empty, true);
150900
151342
  if (add2.childCount)
150901
151343
  this.placed = addToFragment(this.placed, this.frontier.length, add2);
150902
151344
  }
@@ -150925,7 +151367,7 @@ function closeNodeStart(node, openStart, openEnd) {
150925
151367
  if (openStart > 0) {
150926
151368
  frag = node.type.contentMatch.fillBefore(frag).append(frag);
150927
151369
  if (openEnd <= 0)
150928
- frag = frag.append(node.type.contentMatch.matchFragment(frag).fillBefore(Fragment46.empty, true));
151370
+ frag = frag.append(node.type.contentMatch.matchFragment(frag).fillBefore(Fragment47.empty, true));
150929
151371
  }
150930
151372
  return node.copy(frag);
150931
151373
  }
@@ -151017,7 +151459,7 @@ function closeFragment(fragment, depth, oldOpen, newOpen, parent) {
151017
151459
  if (depth > newOpen) {
151018
151460
  let match2 = parent.contentMatchAt(0);
151019
151461
  let start = match2.fillBefore(fragment).append(fragment);
151020
- fragment = start.append(match2.matchFragment(start).fillBefore(Fragment46.empty, true));
151462
+ fragment = start.append(match2.matchFragment(start).fillBefore(Fragment47.empty, true));
151021
151463
  }
151022
151464
  return fragment;
151023
151465
  }
@@ -151027,7 +151469,7 @@ function replaceRangeWith(tr2, from2, to, node) {
151027
151469
  if (point != null)
151028
151470
  from2 = to = point;
151029
151471
  }
151030
- tr2.replaceRange(from2, to, new Slice2(Fragment46.from(node), 0, 0));
151472
+ tr2.replaceRange(from2, to, new Slice2(Fragment47.from(node), 0, 0));
151031
151473
  }
151032
151474
  function deleteRange(tr2, from2, to) {
151033
151475
  let $from = tr2.doc.resolve(from2), $to = tr2.doc.resolve(to);
@@ -151075,7 +151517,7 @@ var AttrStep = class _AttrStep extends Step {
151075
151517
  attrs[name] = node.attrs[name];
151076
151518
  attrs[this.attr] = this.value;
151077
151519
  let updated = node.type.create(attrs, null, node.marks);
151078
- return StepResult.fromReplace(doc3, this.pos, this.pos + 1, new Slice2(Fragment46.from(updated), 0, node.isLeaf ? 0 : 1));
151520
+ return StepResult.fromReplace(doc3, this.pos, this.pos + 1, new Slice2(Fragment47.from(updated), 0, node.isLeaf ? 0 : 1));
151079
151521
  }
151080
151522
  getMap() {
151081
151523
  return StepMap.empty;
@@ -151210,7 +151652,7 @@ var Transform = class {
151210
151652
  fragment, node, or array of nodes.
151211
151653
  */
151212
151654
  replaceWith(from2, to, content) {
151213
- return this.replace(from2, to, new Slice2(Fragment46.from(content), 0, 0));
151655
+ return this.replace(from2, to, new Slice2(Fragment47.from(content), 0, 0));
151214
151656
  }
151215
151657
  /**
151216
151658
  Delete the content between the given positions.
@@ -151712,7 +152154,7 @@ var NodeSelection = class _NodeSelection extends Selection {
151712
152154
  return new _NodeSelection($pos);
151713
152155
  }
151714
152156
  content() {
151715
- return new Slice2(Fragment46.from(this.node), 0, 0);
152157
+ return new Slice2(Fragment47.from(this.node), 0, 0);
151716
152158
  }
151717
152159
  eq(other) {
151718
152160
  return other instanceof _NodeSelection && other.anchor == this.anchor;
@@ -153534,7 +153976,7 @@ var NodeViewDesc = class _NodeViewDesc extends ViewDesc {
153534
153976
  }
153535
153977
  }
153536
153978
  if (!rule2.contentElement)
153537
- rule2.getContent = () => Fragment46.empty;
153979
+ rule2.getContent = () => Fragment47.empty;
153538
153980
  }
153539
153981
  return rule2;
153540
153982
  }
@@ -154846,7 +155288,7 @@ function parseFromClipboard(view, text2, html, plainText, $context) {
154846
155288
  text2 = f2(text2, inCode || plainText, view);
154847
155289
  });
154848
155290
  if (inCode) {
154849
- slice2 = new Slice2(Fragment46.from(view.state.schema.text(text2.replace(/\r\n?/g, "\n"))), 0, 0);
155291
+ slice2 = new Slice2(Fragment47.from(view.state.schema.text(text2.replace(/\r\n?/g, "\n"))), 0, 0);
154850
155292
  view.someProp("transformPasted", (f2) => {
154851
155293
  slice2 = f2(slice2, view, true);
154852
155294
  });
@@ -154940,13 +155382,13 @@ function normalizeSiblings(fragment, $context) {
154940
155382
  }
154941
155383
  });
154942
155384
  if (result)
154943
- return Fragment46.from(result);
155385
+ return Fragment47.from(result);
154944
155386
  }
154945
155387
  return fragment;
154946
155388
  }
154947
155389
  function withWrappers(node, wrap2, from2 = 0) {
154948
155390
  for (let i2 = wrap2.length - 1; i2 >= from2; i2--)
154949
- node = wrap2[i2].create(null, Fragment46.from(node));
155391
+ node = wrap2[i2].create(null, Fragment47.from(node));
154950
155392
  return node;
154951
155393
  }
154952
155394
  function addToSibling(wrap2, lastWrap, node, sibling, depth) {
@@ -154956,14 +155398,14 @@ function addToSibling(wrap2, lastWrap, node, sibling, depth) {
154956
155398
  return sibling.copy(sibling.content.replaceChild(sibling.childCount - 1, inner));
154957
155399
  let match2 = sibling.contentMatchAt(sibling.childCount);
154958
155400
  if (match2.matchType(depth == wrap2.length - 1 ? node.type : wrap2[depth + 1]))
154959
- return sibling.copy(sibling.content.append(Fragment46.from(withWrappers(node, wrap2, depth + 1))));
155401
+ return sibling.copy(sibling.content.append(Fragment47.from(withWrappers(node, wrap2, depth + 1))));
154960
155402
  }
154961
155403
  }
154962
155404
  function closeRight(node, depth) {
154963
155405
  if (depth == 0)
154964
155406
  return node;
154965
155407
  let fragment = node.content.replaceChild(node.childCount - 1, closeRight(node.lastChild, depth - 1));
154966
- let fill = node.contentMatchAt(node.childCount).fillBefore(Fragment46.empty, true);
155408
+ let fill = node.contentMatchAt(node.childCount).fillBefore(Fragment47.empty, true);
154967
155409
  return node.copy(fragment.append(fill));
154968
155410
  }
154969
155411
  function closeRange(fragment, side, from2, to, depth, openEnd) {
@@ -154973,7 +155415,7 @@ function closeRange(fragment, side, from2, to, depth, openEnd) {
154973
155415
  if (depth < to - 1)
154974
155416
  inner = closeRange(inner, side, from2, to, depth + 1, openEnd);
154975
155417
  if (depth >= from2)
154976
- inner = side < 0 ? node.contentMatchAt(0).fillBefore(inner, openEnd <= depth).append(inner) : inner.append(node.contentMatchAt(node.childCount).fillBefore(Fragment46.empty, true));
155418
+ inner = side < 0 ? node.contentMatchAt(0).fillBefore(inner, openEnd <= depth).append(inner) : inner.append(node.contentMatchAt(node.childCount).fillBefore(Fragment47.empty, true));
154977
155419
  return fragment.replaceChild(side < 0 ? 0 : fragment.childCount - 1, node.copy(inner));
154978
155420
  }
154979
155421
  function closeSlice(slice2, openStart, openEnd) {
@@ -155043,7 +155485,7 @@ function addContext(slice2, context) {
155043
155485
  let type = schema.nodes[array[i2]];
155044
155486
  if (!type || type.hasRequiredAttrs())
155045
155487
  break;
155046
- content = Fragment46.from(type.create(array[i2 + 1], content));
155488
+ content = Fragment47.from(type.create(array[i2 + 1], content));
155047
155489
  openStart++;
155048
155490
  openEnd++;
155049
155491
  }
@@ -156902,7 +157344,7 @@ function isMarkChange(cur, prev) {
156902
157344
  let updated = [];
156903
157345
  for (let i2 = 0; i2 < prev.childCount; i2++)
156904
157346
  updated.push(update(prev.child(i2)));
156905
- if (Fragment46.from(updated).eq(cur))
157347
+ if (Fragment47.from(updated).eq(cur))
156906
157348
  return { mark, type };
156907
157349
  }
156908
157350
  function looksLikeBackspace(old, start, end, $newStart, $newEnd) {
@@ -158052,10 +158494,10 @@ function deleteBarrier(state, $cut, dispatch, dir) {
158052
158494
  let canDelAfter = !isolated && $cut.parent.canReplace($cut.index(), $cut.index() + 1);
158053
158495
  if (canDelAfter && (conn = (match2 = before.contentMatchAt(before.childCount)).findWrapping(after.type)) && match2.matchType(conn[0] || after.type).validEnd) {
158054
158496
  if (dispatch) {
158055
- let end = $cut.pos + after.nodeSize, wrap2 = Fragment46.empty;
158497
+ let end = $cut.pos + after.nodeSize, wrap2 = Fragment47.empty;
158056
158498
  for (let i2 = conn.length - 1; i2 >= 0; i2--)
158057
- wrap2 = Fragment46.from(conn[i2].create(null, wrap2));
158058
- wrap2 = Fragment46.from(before.copy(wrap2));
158499
+ wrap2 = Fragment47.from(conn[i2].create(null, wrap2));
158500
+ wrap2 = Fragment47.from(before.copy(wrap2));
158059
158501
  let tr2 = state.tr.step(new ReplaceAroundStep($cut.pos - 1, end, $cut.pos, end, new Slice2(wrap2, 1, 0), conn.length, true));
158060
158502
  let $joinAt = tr2.doc.resolve(end + 2 * conn.length);
158061
158503
  if ($joinAt.nodeAfter && $joinAt.nodeAfter.type == before.type && canJoin(tr2.doc, $joinAt.pos))
@@ -158084,9 +158526,9 @@ function deleteBarrier(state, $cut, dispatch, dir) {
158084
158526
  afterDepth++;
158085
158527
  if (at.canReplace(at.childCount, at.childCount, afterText.content)) {
158086
158528
  if (dispatch) {
158087
- let end = Fragment46.empty;
158529
+ let end = Fragment47.empty;
158088
158530
  for (let i2 = wrap2.length - 1; i2 >= 0; i2--)
158089
- end = Fragment46.from(wrap2[i2].copy(end));
158531
+ end = Fragment47.from(wrap2[i2].copy(end));
158090
158532
  let tr2 = state.tr.step(new ReplaceAroundStep($cut.pos - wrap2.length, $cut.pos + after.nodeSize, $cut.pos + afterDepth, $cut.pos + after.nodeSize - afterDepth, new Slice2(end, wrap2.length, 0), 0, true));
158091
158533
  dispatch(tr2.scrollIntoView());
158092
158534
  }
@@ -158203,9 +158645,9 @@ function wrapRangeInList(tr2, range, listType, attrs = null) {
158203
158645
  return true;
158204
158646
  }
158205
158647
  function doWrapInList(tr2, range, wrappers, joinBefore, listType) {
158206
- let content = Fragment46.empty;
158648
+ let content = Fragment47.empty;
158207
158649
  for (let i2 = wrappers.length - 1; i2 >= 0; i2--)
158208
- content = Fragment46.from(wrappers[i2].type.create(wrappers[i2].attrs, content));
158650
+ content = Fragment47.from(wrappers[i2].type.create(wrappers[i2].attrs, content));
158209
158651
  tr2.step(new ReplaceAroundStep(range.start - (joinBefore ? 2 : 0), range.end, range.start, range.end, new Slice2(content, 0, 0), wrappers.length, true));
158210
158652
  let found2 = 0;
158211
158653
  for (let i2 = 0; i2 < wrappers.length; i2++)
@@ -158239,7 +158681,7 @@ function liftListItem(itemType) {
158239
158681
  function liftToOuterList(state, dispatch, itemType, range) {
158240
158682
  let tr2 = state.tr, end = range.end, endOfList = range.$to.end(range.depth);
158241
158683
  if (end < endOfList) {
158242
- tr2.step(new ReplaceAroundStep(end - 1, endOfList, end, endOfList, new Slice2(Fragment46.from(itemType.create(null, range.parent.copy())), 1, 0), 1, true));
158684
+ tr2.step(new ReplaceAroundStep(end - 1, endOfList, end, endOfList, new Slice2(Fragment47.from(itemType.create(null, range.parent.copy())), 1, 0), 1, true));
158243
158685
  range = new NodeRange(tr2.doc.resolve(range.$from.pos), tr2.doc.resolve(endOfList), range.depth);
158244
158686
  }
158245
158687
  const target = liftTarget(range);
@@ -158263,10 +158705,10 @@ function liftOutOfList(state, dispatch, range) {
158263
158705
  return false;
158264
158706
  let atStart = range.startIndex == 0, atEnd = range.endIndex == list.childCount;
158265
158707
  let parent = $start.node(-1), indexBefore = $start.index(-1);
158266
- if (!parent.canReplace(indexBefore + (atStart ? 0 : 1), indexBefore + 1, item.content.append(atEnd ? Fragment46.empty : Fragment46.from(list))))
158708
+ if (!parent.canReplace(indexBefore + (atStart ? 0 : 1), indexBefore + 1, item.content.append(atEnd ? Fragment47.empty : Fragment47.from(list))))
158267
158709
  return false;
158268
158710
  let start = $start.pos, end = start + item.nodeSize;
158269
- tr2.step(new ReplaceAroundStep(start - (atStart ? 1 : 0), end + (atEnd ? 1 : 0), start + 1, end - 1, new Slice2((atStart ? Fragment46.empty : Fragment46.from(list.copy(Fragment46.empty))).append(atEnd ? Fragment46.empty : Fragment46.from(list.copy(Fragment46.empty))), atStart ? 0 : 1, atEnd ? 0 : 1), atStart ? 0 : 1));
158711
+ tr2.step(new ReplaceAroundStep(start - (atStart ? 1 : 0), end + (atEnd ? 1 : 0), start + 1, end - 1, new Slice2((atStart ? Fragment47.empty : Fragment47.from(list.copy(Fragment47.empty))).append(atEnd ? Fragment47.empty : Fragment47.from(list.copy(Fragment47.empty))), atStart ? 0 : 1, atEnd ? 0 : 1), atStart ? 0 : 1));
158270
158712
  dispatch(tr2.scrollIntoView());
158271
158713
  return true;
158272
158714
  }
@@ -158284,8 +158726,8 @@ function sinkListItem(itemType) {
158284
158726
  return false;
158285
158727
  if (dispatch) {
158286
158728
  let nestedBefore = nodeBefore.lastChild && nodeBefore.lastChild.type == parent.type;
158287
- let inner = Fragment46.from(nestedBefore ? itemType.create() : null);
158288
- let slice2 = new Slice2(Fragment46.from(itemType.create(null, Fragment46.from(parent.type.create(null, inner)))), nestedBefore ? 3 : 1, 0);
158729
+ let inner = Fragment47.from(nestedBefore ? itemType.create() : null);
158730
+ let slice2 = new Slice2(Fragment47.from(itemType.create(null, Fragment47.from(parent.type.create(null, inner)))), nestedBefore ? 3 : 1, 0);
158289
158731
  let before = range.start, after = range.end;
158290
158732
  dispatch(state.tr.step(new ReplaceAroundStep(before - (nestedBefore ? 3 : 1), after, before, after, slice2, 1, true)).scrollIntoView());
158291
158733
  }
@@ -158916,7 +159358,7 @@ function inputRulesPlugin(props2) {
158916
159358
  if (typeof text2 === "string") {
158917
159359
  text2 = text2;
158918
159360
  } else {
158919
- text2 = getHTMLFromFragment(Fragment46.from(text2), state.schema);
159361
+ text2 = getHTMLFromFragment(Fragment47.from(text2), state.schema);
158920
159362
  }
158921
159363
  const { from: from2 } = simulatedInputMeta;
158922
159364
  const to = from2 + text2.length;
@@ -159275,7 +159717,7 @@ function pasteRulesPlugin(props2) {
159275
159717
  if (typeof text2 === "string") {
159276
159718
  text2 = text2;
159277
159719
  } else {
159278
- text2 = getHTMLFromFragment(Fragment46.from(text2), state.schema);
159720
+ text2 = getHTMLFromFragment(Fragment47.from(text2), state.schema);
159279
159721
  }
159280
159722
  const { from: from3 } = simulatedPasteMeta;
159281
159723
  const to2 = from3 + text2.length;
@@ -159976,7 +160418,7 @@ function elementFromString(value) {
159976
160418
  return removeWhitespaces(html);
159977
160419
  }
159978
160420
  function createNodeFromContent(content, schema, options) {
159979
- if (content instanceof Node2 || content instanceof Fragment46) {
160421
+ if (content instanceof Node2 || content instanceof Fragment47) {
159980
160422
  return content;
159981
160423
  }
159982
160424
  options = {
@@ -159990,7 +160432,7 @@ function createNodeFromContent(content, schema, options) {
159990
160432
  try {
159991
160433
  const isArrayContent = Array.isArray(content) && content.length > 0;
159992
160434
  if (isArrayContent) {
159993
- return Fragment46.fromArray(content.map((item) => schema.nodeFromJSON(item)));
160435
+ return Fragment47.fromArray(content.map((item) => schema.nodeFromJSON(item)));
159994
160436
  }
159995
160437
  const node = schema.nodeFromJSON(content);
159996
160438
  if (options.errorOnInvalidContent) {
@@ -160135,7 +160577,7 @@ var insertContentAt = (position, value, options) => ({ tr: tr2, dispatch, editor
160135
160577
  if (isOnlyTextContent) {
160136
160578
  if (Array.isArray(value)) {
160137
160579
  newContent = value.map((v2) => v2.text || "").join("");
160138
- } else if (value instanceof Fragment46) {
160580
+ } else if (value instanceof Fragment47) {
160139
160581
  let text2 = "";
160140
160582
  value.forEach((node) => {
160141
160583
  if (node.text) {
@@ -160934,10 +161376,10 @@ var splitListItem = (typeOrName, overrideAttrs = {}) => ({ tr: tr2, state, dispa
160934
161376
  return false;
160935
161377
  }
160936
161378
  if (dispatch) {
160937
- let wrap2 = Fragment46.empty;
161379
+ let wrap2 = Fragment47.empty;
160938
161380
  const depthBefore = $from.index(-1) ? 1 : $from.index(-2) ? 2 : 3;
160939
161381
  for (let d2 = $from.depth - depthBefore; d2 >= $from.depth - 3; d2 -= 1) {
160940
- wrap2 = Fragment46.from($from.node(d2).copy(wrap2));
161382
+ wrap2 = Fragment47.from($from.node(d2).copy(wrap2));
160941
161383
  }
160942
161384
  const depthAfter = $from.indexAfter(-1) < $from.node(-2).childCount ? 1 : $from.indexAfter(-2) < $from.node(-3).childCount ? 2 : 3;
160943
161385
  const newNextTypeAttributes2 = {
@@ -160945,7 +161387,7 @@ var splitListItem = (typeOrName, overrideAttrs = {}) => ({ tr: tr2, state, dispa
160945
161387
  ...overrideAttrs
160946
161388
  };
160947
161389
  const nextType2 = ((_a = type.contentMatch.defaultType) === null || _a === void 0 ? void 0 : _a.createAndFill(newNextTypeAttributes2)) || void 0;
160948
- wrap2 = wrap2.append(Fragment46.from(type.createAndFill(null, nextType2) || void 0));
161390
+ wrap2 = wrap2.append(Fragment47.from(type.createAndFill(null, nextType2) || void 0));
160949
161391
  const start = $from.before($from.depth - (depthBefore - 1));
160950
161392
  tr2.replace(start, $from.after(-depthAfter), new Slice2(wrap2, 4 - depthBefore, 0));
160951
161393
  let sel = -1;
@@ -163246,9 +163688,9 @@ function beforeinput(view, event) {
163246
163688
  let insert2 = $from.parent.contentMatchAt($from.index()).findWrapping(view.state.schema.nodes.text);
163247
163689
  if (!insert2)
163248
163690
  return false;
163249
- let frag = Fragment46.empty;
163691
+ let frag = Fragment47.empty;
163250
163692
  for (let i2 = insert2.length - 1; i2 >= 0; i2--)
163251
- frag = Fragment46.from(insert2[i2].createAndFill(null, frag));
163693
+ frag = Fragment47.from(insert2[i2].createAndFill(null, frag));
163252
163694
  let tr2 = view.state.tr.replace($from.pos, $from.pos, new Slice2(frag, 0, 0));
163253
163695
  tr2.setSelection(TextSelection.near(tr2.doc.resolve($from.pos + 1)));
163254
163696
  view.dispatch(tr2);
@@ -166015,7 +166457,7 @@ function requireUseSyncExternalStoreShim_development() {
166015
166457
  return x2 === y2 && (x2 !== 0 || 1 / x2 === 1 / y2) || x2 !== x2 && y2 !== y2;
166016
166458
  }
166017
166459
  var objectIs = typeof Object.is === "function" ? Object.is : is;
166018
- var useState90 = React$1.useState, useEffect92 = React$1.useEffect, useLayoutEffect11 = React$1.useLayoutEffect, useDebugValue2 = React$1.useDebugValue;
166460
+ var useState90 = React$1.useState, useEffect93 = React$1.useEffect, useLayoutEffect11 = React$1.useLayoutEffect, useDebugValue2 = React$1.useDebugValue;
166019
166461
  var didWarnOld18Alpha = false;
166020
166462
  var didWarnUncachedGetSnapshot = false;
166021
166463
  function useSyncExternalStore7(subscribe, getSnapshot, getServerSnapshot) {
@@ -166052,7 +166494,7 @@ function requireUseSyncExternalStoreShim_development() {
166052
166494
  });
166053
166495
  }
166054
166496
  }, [subscribe, value, getSnapshot]);
166055
- useEffect92(function() {
166497
+ useEffect93(function() {
166056
166498
  if (checkIfSnapshotChanged(inst)) {
166057
166499
  forceUpdate({
166058
166500
  inst
@@ -166317,9 +166759,9 @@ function requireWithSelector_development() {
166317
166759
  }
166318
166760
  var objectIs = typeof Object.is === "function" ? Object.is : is;
166319
166761
  var useSyncExternalStore7 = shim2.useSyncExternalStore;
166320
- var useRef76 = React$1.useRef, useEffect92 = React$1.useEffect, useMemo82 = React$1.useMemo, useDebugValue2 = React$1.useDebugValue;
166762
+ var useRef77 = React$1.useRef, useEffect93 = React$1.useEffect, useMemo82 = React$1.useMemo, useDebugValue2 = React$1.useDebugValue;
166321
166763
  function useSyncExternalStoreWithSelector(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
166322
- var instRef = useRef76(null);
166764
+ var instRef = useRef77(null);
166323
166765
  var inst;
166324
166766
  if (instRef.current === null) {
166325
166767
  inst = {
@@ -166374,7 +166816,7 @@ function requireWithSelector_development() {
166374
166816
  return [getSnapshotWithSelector, getServerSnapshotWithSelector];
166375
166817
  }, [getSnapshot, getServerSnapshot, selector, isEqual]), getSelection2 = _useMemo[0], getServerSelection = _useMemo[1];
166376
166818
  var value = useSyncExternalStore7(subscribe, getSelection2, getServerSelection);
166377
- useEffect92(function() {
166819
+ useEffect93(function() {
166378
166820
  inst.hasValue = true;
166379
166821
  inst.value = value;
166380
166822
  }, [value]);
@@ -168069,7 +168511,7 @@ function normaliseDoc(doc3) {
168069
168511
  }
168070
168512
  return EMPTY_DOC;
168071
168513
  }
168072
- function isRecord13(value) {
168514
+ function isRecord14(value) {
168073
168515
  return typeof value === "object" && value !== null;
168074
168516
  }
168075
168517
  function getFromMapLike(mapLike, name) {
@@ -168094,7 +168536,7 @@ function parentInlineContent(parentType) {
168094
168536
  return Boolean(p2?.inlineContent);
168095
168537
  }
168096
168538
  function extractText(nodeJson) {
168097
- if (!isRecord13(nodeJson)) return "";
168539
+ if (!isRecord14(nodeJson)) return "";
168098
168540
  if (nodeJson.type === "text" && typeof nodeJson.text === "string") {
168099
168541
  return nodeJson.text;
168100
168542
  }
@@ -168105,13 +168547,13 @@ function sanitizeMarksJson(schema, marks, unsupported) {
168105
168547
  if (!Array.isArray(marks)) return void 0;
168106
168548
  const out = [];
168107
168549
  for (const markJson of marks) {
168108
- if (!isRecord13(markJson) || typeof markJson.type !== "string") continue;
168550
+ if (!isRecord14(markJson) || typeof markJson.type !== "string") continue;
168109
168551
  if (!schemaHasMark(schema, markJson.type)) {
168110
168552
  unsupported.marks.add(markJson.type);
168111
168553
  continue;
168112
168554
  }
168113
168555
  const next = { type: markJson.type };
168114
- if (isRecord13(markJson.attrs)) next.attrs = markJson.attrs;
168556
+ if (isRecord14(markJson.attrs)) next.attrs = markJson.attrs;
168115
168557
  out.push(next);
168116
168558
  }
168117
168559
  return out.length > 0 ? out : void 0;
@@ -168120,7 +168562,7 @@ function coerceChildrenForParentJson(schema, parentType, children) {
168120
168562
  if (parentInlineContent(parentType)) {
168121
168563
  const inlines = [];
168122
168564
  for (const child of children) {
168123
- if (isRecord13(child) && typeof child.type === "string" && nodeTypeIsInline(schema, child.type)) {
168565
+ if (isRecord14(child) && typeof child.type === "string" && nodeTypeIsInline(schema, child.type)) {
168124
168566
  inlines.push(child);
168125
168567
  continue;
168126
168568
  }
@@ -168143,7 +168585,7 @@ function coerceChildrenForParentJson(schema, parentType, children) {
168143
168585
  inlineBuffer = [];
168144
168586
  };
168145
168587
  for (const child of children) {
168146
- if (isRecord13(child) && typeof child.type === "string" && nodeTypeIsInline(schema, child.type)) {
168588
+ if (isRecord14(child) && typeof child.type === "string" && nodeTypeIsInline(schema, child.type)) {
168147
168589
  inlineBuffer.push(child);
168148
168590
  continue;
168149
168591
  }
@@ -168154,7 +168596,7 @@ function coerceChildrenForParentJson(schema, parentType, children) {
168154
168596
  return blocks;
168155
168597
  }
168156
168598
  function sanitizeNodeJson(schema, nodeJson, parentType, unsupported) {
168157
- if (!isRecord13(nodeJson) || typeof nodeJson.type !== "string") return [];
168599
+ if (!isRecord14(nodeJson) || typeof nodeJson.type !== "string") return [];
168158
168600
  const type = nodeJson.type;
168159
168601
  if (type === "text") {
168160
168602
  const text2 = typeof nodeJson.text === "string" ? nodeJson.text : "";
@@ -168175,7 +168617,7 @@ function sanitizeNodeJson(schema, nodeJson, parentType, unsupported) {
168175
168617
  const coercedChildren = coerceChildrenForParentJson(schema, nodeType, sanitizedChildren);
168176
168618
  const marks = sanitizeMarksJson(schema, nodeJson.marks, unsupported);
168177
168619
  const next = { type };
168178
- if (isRecord13(nodeJson.attrs)) next.attrs = nodeJson.attrs;
168620
+ if (isRecord14(nodeJson.attrs)) next.attrs = nodeJson.attrs;
168179
168621
  if (marks) next.marks = marks;
168180
168622
  if (hasRawChildren || coercedChildren.length > 0) next.content = coercedChildren;
168181
168623
  return [next];
@@ -168195,7 +168637,7 @@ function sanitizeRichTextContentForSchema(schema, content) {
168195
168637
  const coerced = coerceChildrenForParentJson(schema, topType, children);
168196
168638
  const out = { type: "doc", content: coerced };
168197
168639
  const maybeAttrs = docJson.attrs;
168198
- if (isRecord13(maybeAttrs)) {
168640
+ if (isRecord14(maybeAttrs)) {
168199
168641
  out.attrs = maybeAttrs;
168200
168642
  }
168201
168643
  return {
@@ -168281,7 +168723,7 @@ function EditableBlockProvider({
168281
168723
  blockId,
168282
168724
  children
168283
168725
  }) {
168284
- const editorBlockId = asEditorBlockId(blockId);
168726
+ const editorBlockId = unsafeAsEditorBlockId(blockId);
168285
168727
  const blockData = useEditorUiStore((state) => state.drafts.getCurrentValues(editorBlockId));
168286
168728
  return /* @__PURE__ */ jsx(BlockDataContext.Provider, { value: { blockId, blockData }, children });
168287
168729
  }
@@ -168333,7 +168775,7 @@ function parseEditorPath(path) {
168333
168775
  if (blocksMatch?.[1] && blocksMatch[2]) {
168334
168776
  return {
168335
168777
  store: "blocks",
168336
- blockId: asEditorBlockId(blocksMatch[1]),
168778
+ blockId: unsafeAsEditorBlockId(blocksMatch[1]),
168337
168779
  field: blocksMatch[2]
168338
168780
  };
168339
168781
  }
@@ -170394,4 +170836,4 @@ lucide-react/dist/esm/lucide-react.js:
170394
170836
  *)
170395
170837
  */
170396
170838
 
170397
- export { ArrowDown, ArrowUp, BackgroundColorField, BackgroundGradientField, Badge2 as Badge, BlockApiProvider, Box, Button, CSS2 as CSS, CTA_ICON_OPTIONS, Callout, CalloutDescription, CalloutTitle, Card, CardContent, CardHeader, CardTitle, Check, ChevronDown, ChevronLeft, ChevronRight, Collapsible2 as Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, ColorPicker, Combobox, Content, ContentFieldsForm, Copy, DEFAULT_LAUNCH_READINESS_INPUT, Dialog2 as Dialog, DialogClose2 as DialogClose, DialogContent2 as DialogContent, DialogDescription2 as DialogDescription, DialogFooter, DialogHeader, DialogTitle2 as DialogTitle, DndContext, DropdownMenu2 as DropdownMenu, DropdownMenuContent2 as DropdownMenuContent, DropdownMenuItem2 as DropdownMenuItem, DropdownMenuLabel2 as DropdownMenuLabel, DropdownMenuSeparator2 as DropdownMenuSeparator, DropdownMenuTrigger2 as DropdownMenuTrigger, EDITABLE_SURFACE_FORWARDING_PROP, EMPTY_DOC, EditableBlockProvider, EditorChrome, EditorProvider, EllipsisVertical, EmptyState2 as EmptyState, EntryControllerProvider, FieldFrame, FixedBottomSurface, FormRenderer, GripVertical, Input, KeyboardCode, Label4 as Label, List2 as List, LoaderCircle, ManifestForm, Maximize2, MediaEditor, MediaEditorProvider, MediaPickerDialog, MediaPickerMini, Monitor, PAGE_DESIGN_EDITOR_STATE_FETCH_ERROR_MESSAGE, PUBLIC_FILE_FIELD_KINDS, PageRenderer, Palette, PaletteProvider, Pencil, Plus, PointerSensor, PreviewRichTextEditor, PreviewTextEditor, ResizableSplitPane, RichText2 as RichText, RichTextEditorSurface, Root2, RotateCcw, SITE_CHROME_CLASS_NAMES, SITE_CHROME_VISIBLE_HEADER_SELECTOR, SUBROUTE_KINDS, ScrollableDialogContent, Search, Select2 as Select, SelectContent2 as SelectContent, SelectItem2 as SelectItem, SelectTrigger2 as SelectTrigger, SelectValue2 as SelectValue, Separator2 as Separator, Settings, SiteDocumentLayout, Smartphone, Sparkles, Surface, Tablet, Tabs2 as Tabs, TabsContent2 as TabsContent, TabsList2 as TabsList, TabsTrigger2 as TabsTrigger, Text2 as Text, ThemeScope, Trash2, TriangleAlert, Trigger, X, applyCompiledRuntimeFieldsToContent, applyPageDesignEditorAction, asDesignBlockId, asEditorBlockId, asEditorBlockValues, asRecord, asSiteId, assertNever3 as assertNever, assertNever5 as assertNever2, augmentManifestWithStyleGroups, buildEditorModelRuntimeFieldsByBlockId, buildThemeRuntime, buttonPersonalities, canRedoHistory, canUndoHistory, classifyHistoryShortcut, classifyKnownMimeType, clientComponentRegistry, closestCenter, cn, compileSiteThemeFromSelections, createBlock, createCustomBlockRegistry, createEditorInsertBlockCommand, createEditorRemoveBlockCommand, createEditorReorderBlocksCommand, createHistoryState, createManifestFormAdapter, createManifestValidation, createRoutingHelpers, createSnapshotFromPageRecord, createStoreBackend, curatedSiteStyles, deleteBlock, deriveLaunchReadiness, deriveNearestCompatibleHeaderStyle, emitMediaCropDebug, evaluateTypographyFontSlot, findButtonPersonality, findFooterLook, findLegacyHeaderLookIdForSelection, findPaletteVariant, findTypographyPreset, foldSubroute, footerLookCatalog, footerLookRejectionReasonLabel, getBlockDefinition, getClientRect, getCtaIconComponent, getCuratedSiteStyle, getDirectImageUrlForMediaAsset, getFieldIntent, getHeaderLayout, getHeaderStyle, getModalConfig, getOrderedHeaderLayoutIdsForCuration, getOrderedHeaderStyleIdsForLayout, getPageDesignEditorState, getRichTextImagePositionFromTarget, getRouteMetadataManifestForType, insertOrReplaceRichTextImage, isCtaIconName, isHeaderField, isInternalResolvedLinkValue, isKeyboardEvent, isNonEmptyValue, isObjectRecord2 as isObjectRecord, isSvgMimeType, isThemeV2NormalEditorRawStyleFieldName, isThemeV2NormalEditorRawStylePath, listBlockDescriptors, listContentTypes, lucide_react_exports, mergeBlockDescriptorsWithRegistry, mergeManifestWithSdkOptions, mutateBlockContent, normalEditorCuratedPromotedFieldPaths, normalizePickerSearchThreshold, omitRouteTitleFieldFromManifest, paletteOverridesSchema, paletteVariants, parseAspectRatioValue, planPageDesignLayoutLookCompatibility, planSiteDocument, previewAssistantEnabled, pushHistoryEntry, recoveryConflictCopy, redoHistory, renderBlock, reorderBlocks, requireEntriesForCuratedChoices, resolveBlockTitle, resolveImageUrlWithContext, resolveMediaSlotContract, resolvePickerSelectionLabel, resolvePreviewSidebarTab, resolveVideoSelectionIntentForMediaField, resolveVisiblePromotedFieldPathsForEditorBlock, shouldShowPickerSearch, siteFooterManifest, siteHeaderManifest, siteStyleIdFromTheme, surfaceResolutionContextFromTheme, systemCustomizeFacetAppliesToLayoutVariant, systemCustomizeFacetApplyContentPatch, systemCustomizeFacetCurrentValue, systemCustomizeFacetDefinitionForBlock, systemCustomizeFacetDefinitionsForBlock, systemCustomizeFacetLabelForValue, systemCustomizeFacetNextValue, systemCustomizeFacetRollbackContentPatch, toRoutableLinkPayload, typographyPresets, undoHistory, unfinishedBlockCopy, unwrapResponse, useAsyncPickerOptions, useBackendWatch, useBlockContext, useCombinedRefs, useDebouncedLatestSave, useDndContext, useDraggable, useDroppable, useEditor2 as useEditor, useEditorUiStore, useEditorUiStoreInstance, useEntryController, useEntryEditorController, useField, useIsomorphicLayoutEffect3 as useIsomorphicLayoutEffect, useMediaEditor, useMediaEditorOptional, useMultiAutosave, useOptionalEditorUiStoreInstance, useRichTextEditor, useSdkConfig, useSensor, useSensors, useUISelector, useUniqueId, validateBlockManifestIssues, visibleHeaderClearancePx, writePlanForLookCustomizationCommand };
170839
+ export { ArrowDown, ArrowUp, BackgroundColorField, BackgroundGradientField, Badge2 as Badge, BlockApiProvider, Box, Button, CSS2 as CSS, CTA_ICON_OPTIONS, Callout, CalloutDescription, CalloutTitle, Card, CardContent, CardHeader, CardTitle, Check, ChevronDown, ChevronLeft, ChevronRight, Collapsible2 as Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, ColorPicker, Combobox, Content, ContentFieldsForm, Copy, DEFAULT_LAUNCH_READINESS_INPUT, Dialog2 as Dialog, DialogClose2 as DialogClose, DialogContent2 as DialogContent, DialogDescription2 as DialogDescription, DialogFooter, DialogHeader, DialogTitle2 as DialogTitle, DndContext, DropdownMenu2 as DropdownMenu, DropdownMenuContent2 as DropdownMenuContent, DropdownMenuItem2 as DropdownMenuItem, DropdownMenuLabel2 as DropdownMenuLabel, DropdownMenuSeparator2 as DropdownMenuSeparator, DropdownMenuTrigger2 as DropdownMenuTrigger, EDITABLE_SURFACE_FORWARDING_PROP, EMPTY_DOC, EditableBlockProvider, EditorChrome, EditorProvider, EllipsisVertical, EmptyState2 as EmptyState, EntryControllerProvider, FieldFrame, FixedBottomSurface, FormRenderer, GripVertical, Input, KeyboardCode, Label4 as Label, List2 as List, LoaderCircle, ManifestForm, Maximize2, MediaEditor, MediaEditorProvider, MediaPickerDialog, MediaPickerMini, Monitor, PAGE_DESIGN_EDITOR_STATE_FETCH_ERROR_MESSAGE, PUBLIC_FILE_FIELD_KINDS, PageRenderer, Palette, PaletteProvider, Pencil, Plus, PointerSensor, PreviewRichTextEditor, PreviewTextEditor, ResizableSplitPane, RichText2 as RichText, RichTextEditorSurface, Root2, RotateCcw, SITE_CHROME_CLASS_NAMES, SITE_CHROME_VISIBLE_HEADER_SELECTOR, SUBROUTE_KINDS, ScrollableDialogContent, Search, Select2 as Select, SelectContent2 as SelectContent, SelectItem2 as SelectItem, SelectTrigger2 as SelectTrigger, SelectValue2 as SelectValue, Separator2 as Separator, Settings, SiteDocumentLayout, Smartphone, Sparkles, Surface, Tablet, Tabs2 as Tabs, TabsContent2 as TabsContent, TabsList2 as TabsList, TabsTrigger2 as TabsTrigger, Text2 as Text, ThemeScope, Trash2, TriangleAlert, Trigger, X, applyCompiledRuntimeFieldsToContent, applyPageDesignEditorAction, asDesignBlockId, asRecord, assertNever3 as assertNever, assertNever5 as assertNever2, augmentManifestWithStyleGroups, buildEditorModelRuntimeFieldsByBlockId, buildThemeRuntime, buttonPersonalities, canRedoHistory, canUndoHistory, classifyHistoryShortcut, classifyKnownMimeType, clientComponentRegistry, closestCenter, cn, compileSiteThemeFromSelections, createBlock, createCustomBlockRegistry, createEditorInsertBlockCommand, createEditorRemoveBlockCommand, createEditorReorderBlocksCommand, createHistoryState, createManifestFormAdapter, createManifestValidation, createRoutingHelpers, createSnapshotFromPageRecord, createStoreBackend, curatedSiteStyles, deleteBlock, deriveLaunchReadiness, deriveNearestCompatibleHeaderStyle, emitMediaCropDebug, evaluateTypographyFontSlot, expectParsedBrandedId, findButtonPersonality, findFooterLook, findLegacyHeaderLookIdForSelection, findPaletteVariant, findTypographyPreset, foldSubroute, footerLookCatalog, footerLookRejectionReasonLabel, getBlockDefinition, getClientRect, getCtaIconComponent, getCuratedSiteStyle, getDirectImageUrlForMediaAsset, getFieldIntent, getHeaderLayout, getHeaderStyle, getModalConfig, getOrderedHeaderLayoutIdsForCuration, getOrderedHeaderStyleIdsForLayout, getPageDesignEditorState, getRichTextImagePositionFromTarget, getRouteMetadataManifestForType, insertOrReplaceRichTextImage, isCtaIconName, isHeaderField, isInternalResolvedLinkValue, isKeyboardEvent, isNonEmptyValue, isObjectRecord2 as isObjectRecord, isSvgMimeType, isThemeV2NormalEditorRawStyleFieldName, isThemeV2NormalEditorRawStylePath, listBlockDescriptors, listContentTypes, lucide_react_exports, mergeBlockDescriptorsWithRegistry, mergeManifestWithSdkOptions, mutateBlockContent, normalEditorCuratedPromotedFieldPaths, normalizePickerSearchThreshold, omitRouteTitleFieldFromManifest, paletteOverridesSchema, paletteVariants, parseAspectRatioValue, parseSiteId, planPageDesignLayoutLookCompatibility, planSiteDocument, previewAssistantEnabled, pushHistoryEntry, recoveryConflictCopy, redoHistory, renderBlock, reorderBlocks, requireEntriesForCuratedChoices, resolveBlockTitle, resolveImageUrlWithContext, resolveMediaSlotContract, resolvePickerSelectionLabel, resolvePreviewSidebarTab, resolveVideoSelectionIntentForMediaField, resolveVisiblePromotedFieldPathsForEditorBlock, shouldShowPickerSearch, siteFooterManifest, siteHeaderManifest, siteStyleIdFromTheme, surfaceResolutionContextFromTheme, systemCustomizeFacetAppliesToLayoutVariant, systemCustomizeFacetApplyContentPatch, systemCustomizeFacetCurrentValue, systemCustomizeFacetDefinitionForBlock, systemCustomizeFacetDefinitionsForBlock, systemCustomizeFacetLabelForValue, systemCustomizeFacetNextValue, systemCustomizeFacetRollbackContentPatch, toRoutableLinkPayload, typographyPresets, undoHistory, unfinishedBlockCopy, unsafeAsEditorBlockId, unsafeAsEditorBlockValues, unwrapResponse, useAsyncPickerOptions, useBackendWatch, useBlockContext, useCombinedRefs, useDebouncedLatestSave, useDndContext, useDraggable, useDroppable, useEditor2 as useEditor, useEditorUiStore, useEditorUiStoreInstance, useEntryController, useEntryEditorController, useField, useIsomorphicLayoutEffect3 as useIsomorphicLayoutEffect, useMediaEditor, useMediaEditorOptional, useMultiAutosave, useOptionalEditorUiStoreInstance, useRichTextEditor, useSdkConfig, useSensor, useSensors, useUISelector, useUniqueId, validateBlockManifestIssues, visibleHeaderClearancePx, writePlanForLookCustomizationCommand };