@templatical/editor 0.57.0 → 0.57.1

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 (127) hide show
  1. package/dist/{AiAltTextPopover-BjClNscQ.js → AiAltTextPopover-BiZHthAB.js} +1 -1
  2. package/dist/{AiAltTextReview-DeMdVbtT.js → AiAltTextReview-BwhROHiF.js} +1 -1
  3. package/dist/{AiRewriteMenu-BSzj1dKC.js → AiRewriteMenu-6b8GNj64.js} +4 -4
  4. package/dist/{BlockPreviewCanvas-D-If_vd_.js → BlockPreviewCanvas-BAYIy-QJ.js} +4 -4
  5. package/dist/{CloudPanels-DPeK_siQ.js → CloudPanels-Cb54vtYC.js} +1 -1
  6. package/dist/{CountdownToolbar-DBu2ZqC6.js → CountdownToolbar-CTbJPh8B.js} +4 -4
  7. package/dist/{IssuesPanel-BnUut-p-.js → IssuesPanel-BUKc8lld.js} +1 -1
  8. package/dist/{LanguageMenu-DfTxrbvp.js → LanguageMenu-DruJAMET.js} +3 -3
  9. package/dist/{LogicTagInsertButton-CJ1Jk6jv.js → LogicTagInsertButton-Ci7V0Exe.js} +3 -3
  10. package/dist/{MergeTagInput-CV-z85s9.js → MergeTagInput-BA89v7KJ.js} +1 -1
  11. package/dist/{MergeTagModeToggle-CixgX5C_.js → MergeTagModeToggle-De_FNmcG.js} +1 -1
  12. package/dist/{MergeTagTextarea-B1zOC_Nr.js → MergeTagTextarea-BRMB24Dg.js} +2 -2
  13. package/dist/{ParagraphEditor-C9UhWvRB.js → ParagraphEditor-DYqh0kEa.js} +8 -8
  14. package/dist/{RestoreVersionDialog-Do7fZWpT.js → RestoreVersionDialog-CRkyFafq.js} +1 -1
  15. package/dist/{RichTextEditorContent-wW_SMun2.js → RichTextEditorContent-WeCqqCy3.js} +2 -2
  16. package/dist/{SaveBlockDialog-CCHIUfR-.js → SaveBlockDialog-D992yyO4.js} +4 -4
  17. package/dist/{SavedBlocksBrowserModal-DtPHhfw9.js → SavedBlocksBrowserModal-tH74h2Tz.js} +4 -4
  18. package/dist/{SavedBlocksPanels-CYIby5pR.js → SavedBlocksPanels-BuzEwYfp.js} +1 -1
  19. package/dist/{SavedBlocksPickBar-CCwBugqN.js → SavedBlocksPickBar-DbULBPsI.js} +1 -1
  20. package/dist/{TemplateSettings-B8IVy5q9.js → TemplateSettings-eMBAy_wd.js} +4 -4
  21. package/dist/{TestEmailModal-CS5JoKRH.js → TestEmailModal-hb9iopaZ.js} +5 -5
  22. package/dist/{TestEmailPanel-sOIZfKzc.js → TestEmailPanel-DbeZjj0u.js} +1 -1
  23. package/dist/{TitleEditor-ZlBcq9_P.js → TitleEditor-CisDioGi.js} +4 -4
  24. package/dist/{Toolbar-c4_rLLJT.js → Toolbar-BUVRjylH.js} +9 -9
  25. package/dist/{TplModal-DnFFEulp.js → TplModal-BPPP-uM6.js} +1 -1
  26. package/dist/{VersionHistoryPanels-TdGaMaa_.js → VersionHistoryPanels-BNONrE-8.js} +1 -1
  27. package/dist/{WrapperBlock-BiW4ye3w.js → WrapperBlock-B3UAv5kv.js} +3 -3
  28. package/dist/{blockTypeIcons-D1aYMC1M.js → blockTypeIcons-BPPpqFc2.js} +1 -1
  29. package/dist/bundle-stats.json +5 -5
  30. package/dist/cdn/chunks/{AiAltTextPopover-CfGJNBOb.js → AiAltTextPopover-CafZSF50.js} +2 -2
  31. package/dist/cdn/chunks/{AiAltTextPopover-CfGJNBOb.js.map → AiAltTextPopover-CafZSF50.js.map} +1 -1
  32. package/dist/cdn/chunks/{AiAltTextReview-PKe31R_g.js → AiAltTextReview-BJcaqyp5.js} +2 -2
  33. package/dist/cdn/chunks/{AiAltTextReview-PKe31R_g.js.map → AiAltTextReview-BJcaqyp5.js.map} +1 -1
  34. package/dist/cdn/chunks/{AiRewriteMenu-ZDBwReuU.js → AiRewriteMenu-DFUZWA7e.js} +5 -5
  35. package/dist/cdn/chunks/{AiRewriteMenu-ZDBwReuU.js.map → AiRewriteMenu-DFUZWA7e.js.map} +1 -1
  36. package/dist/cdn/chunks/{BlockPreviewCanvas-D7U6nQ7t.js → BlockPreviewCanvas-D0VhkzY8.js} +5 -5
  37. package/dist/cdn/chunks/{BlockPreviewCanvas-D7U6nQ7t.js.map → BlockPreviewCanvas-D0VhkzY8.js.map} +1 -1
  38. package/dist/cdn/chunks/{CloudPanels-EXXNMLbs.js → CloudPanels-BiU1MD-4.js} +2 -2
  39. package/dist/cdn/chunks/{CloudPanels-EXXNMLbs.js.map → CloudPanels-BiU1MD-4.js.map} +1 -1
  40. package/dist/cdn/chunks/{CountdownToolbar-BN2_zvRj.js → CountdownToolbar-CH8UK01N.js} +5 -5
  41. package/dist/cdn/chunks/{CountdownToolbar-BN2_zvRj.js.map → CountdownToolbar-CH8UK01N.js.map} +1 -1
  42. package/dist/cdn/chunks/{IssuesPanel-BDwegn0s.js → IssuesPanel-3NPqHXJx.js} +3 -3
  43. package/dist/cdn/chunks/{IssuesPanel-BDwegn0s.js.map → IssuesPanel-3NPqHXJx.js.map} +1 -1
  44. package/dist/cdn/chunks/{LanguageMenu-DXq9cXUd.js → LanguageMenu-75uu4P2d.js} +4 -4
  45. package/dist/cdn/chunks/{LanguageMenu-DXq9cXUd.js.map → LanguageMenu-75uu4P2d.js.map} +1 -1
  46. package/dist/cdn/chunks/{LogicTagInsertButton-BEArlbra.js → LogicTagInsertButton-C5L73hYh.js} +4 -4
  47. package/dist/cdn/chunks/{LogicTagInsertButton-BEArlbra.js.map → LogicTagInsertButton-C5L73hYh.js.map} +1 -1
  48. package/dist/cdn/chunks/{MergeTagInput-B3SLXXzL.js → MergeTagInput-D8cbnnZu.js} +2 -2
  49. package/dist/cdn/chunks/{MergeTagInput-B3SLXXzL.js.map → MergeTagInput-D8cbnnZu.js.map} +1 -1
  50. package/dist/cdn/chunks/{MergeTagModeToggle-Dywp9ntA.js → MergeTagModeToggle-D-RhwBsO.js} +2 -2
  51. package/dist/cdn/chunks/{MergeTagModeToggle-Dywp9ntA.js.map → MergeTagModeToggle-D-RhwBsO.js.map} +1 -1
  52. package/dist/cdn/chunks/{MergeTagTextarea-B9TM7FgM.js → MergeTagTextarea-CAJIi2FE.js} +3 -3
  53. package/dist/cdn/chunks/{MergeTagTextarea-B9TM7FgM.js.map → MergeTagTextarea-CAJIi2FE.js.map} +1 -1
  54. package/dist/cdn/chunks/{ParagraphEditor-CVGtTYta.js → ParagraphEditor-sRPXZDzp.js} +9 -9
  55. package/dist/cdn/chunks/{ParagraphEditor-CVGtTYta.js.map → ParagraphEditor-sRPXZDzp.js.map} +1 -1
  56. package/dist/cdn/chunks/{RestoreVersionDialog-Dt_0qOOW.js → RestoreVersionDialog-CJK-14PX.js} +2 -2
  57. package/dist/cdn/chunks/{RestoreVersionDialog-Dt_0qOOW.js.map → RestoreVersionDialog-CJK-14PX.js.map} +1 -1
  58. package/dist/cdn/chunks/{RichTextEditorContent-BjN4mnzL.js → RichTextEditorContent-DU0wtA_j.js} +3 -3
  59. package/dist/cdn/chunks/{RichTextEditorContent-BjN4mnzL.js.map → RichTextEditorContent-DU0wtA_j.js.map} +1 -1
  60. package/dist/cdn/chunks/{SaveBlockDialog-D9eBjE99.js → SaveBlockDialog-C8hY9xA-.js} +5 -5
  61. package/dist/cdn/chunks/{SaveBlockDialog-D9eBjE99.js.map → SaveBlockDialog-C8hY9xA-.js.map} +1 -1
  62. package/dist/cdn/chunks/{SavedBlocksBrowserModal-ClsTpkdk.js → SavedBlocksBrowserModal-B3nFAgAa.js} +4 -4
  63. package/dist/cdn/chunks/{SavedBlocksBrowserModal-ClsTpkdk.js.map → SavedBlocksBrowserModal-B3nFAgAa.js.map} +1 -1
  64. package/dist/cdn/chunks/{SavedBlocksPanels-CxlNHhUs.js → SavedBlocksPanels-CQenugHO.js} +2 -2
  65. package/dist/cdn/chunks/{SavedBlocksPanels-CxlNHhUs.js.map → SavedBlocksPanels-CQenugHO.js.map} +1 -1
  66. package/dist/cdn/chunks/{SavedBlocksPickBar-C7_Z8phX.js → SavedBlocksPickBar-DzUP4IYv.js} +2 -2
  67. package/dist/cdn/chunks/{SavedBlocksPickBar-C7_Z8phX.js.map → SavedBlocksPickBar-DzUP4IYv.js.map} +1 -1
  68. package/dist/cdn/chunks/{TemplateSettings-B6zDtjSs.js → TemplateSettings-DnOwyN_1.js} +5 -5
  69. package/dist/cdn/chunks/{TemplateSettings-B6zDtjSs.js.map → TemplateSettings-DnOwyN_1.js.map} +1 -1
  70. package/dist/cdn/chunks/{TestEmailModal-CJ_QYFua.js → TestEmailModal-BFqmfOZ1.js} +6 -6
  71. package/dist/cdn/chunks/{TestEmailModal-CJ_QYFua.js.map → TestEmailModal-BFqmfOZ1.js.map} +1 -1
  72. package/dist/cdn/chunks/{TestEmailPanel-CsFrTq_a.js → TestEmailPanel-DFOhhaa9.js} +2 -2
  73. package/dist/cdn/chunks/{TestEmailPanel-CsFrTq_a.js.map → TestEmailPanel-DFOhhaa9.js.map} +1 -1
  74. package/dist/cdn/chunks/{TitleEditor-CuKJptyw.js → TitleEditor-ChPXTB9T.js} +4 -4
  75. package/dist/cdn/chunks/{TitleEditor-CuKJptyw.js.map → TitleEditor-ChPXTB9T.js.map} +1 -1
  76. package/dist/cdn/chunks/{Toolbar-TS2WwlPW.js → Toolbar-bbO5WoKo.js} +9 -9
  77. package/dist/cdn/chunks/{Toolbar-TS2WwlPW.js.map → Toolbar-bbO5WoKo.js.map} +1 -1
  78. package/dist/cdn/chunks/{TplModal-CsadClrH.js → TplModal-Bg97XHIJ.js} +2 -2
  79. package/dist/cdn/chunks/{TplModal-CsadClrH.js.map → TplModal-Bg97XHIJ.js.map} +1 -1
  80. package/dist/cdn/chunks/{VersionHistoryPanels-CieY91f0.js → VersionHistoryPanels-CyyRXWPU.js} +2 -2
  81. package/dist/cdn/chunks/{VersionHistoryPanels-CieY91f0.js.map → VersionHistoryPanels-CyyRXWPU.js.map} +1 -1
  82. package/dist/cdn/chunks/{WrapperBlock-DtnRuKWE.js → WrapperBlock-ZBCf7Y8u.js} +4 -4
  83. package/dist/cdn/chunks/{WrapperBlock-DtnRuKWE.js.map → WrapperBlock-ZBCf7Y8u.js.map} +1 -1
  84. package/dist/cdn/chunks/{composables-CUIiW9OD.js → composables-CMBZad02.js} +10 -10
  85. package/dist/cdn/chunks/{composables-CUIiW9OD.js.map → composables-CMBZad02.js.map} +1 -1
  86. package/dist/cdn/chunks/{createCloudRuntime-B7D04wKf.js → createCloudRuntime-BHGFjpek.js} +3 -3
  87. package/dist/cdn/chunks/{createCloudRuntime-B7D04wKf.js.map → createCloudRuntime-BHGFjpek.js.map} +1 -1
  88. package/dist/cdn/chunks/{extensions-Cbvk9i08.js → extensions-Beg0g2wm.js} +4 -4
  89. package/dist/cdn/chunks/{extensions-Cbvk9i08.js.map → extensions-Beg0g2wm.js.map} +1 -1
  90. package/dist/cdn/chunks/{normalizeMergeTagMarkup-BJ-MnCqF.js → normalizeMergeTagMarkup-B8yU4usU.js} +2 -2
  91. package/dist/cdn/chunks/{normalizeMergeTagMarkup-BJ-MnCqF.js.map → normalizeMergeTagMarkup-B8yU4usU.js.map} +1 -1
  92. package/dist/cdn/chunks/{preRenderCustomBlocks-D2wISRHq.js → preRenderCustomBlocks-CPHm2GOQ.js} +2 -2
  93. package/dist/cdn/chunks/{preRenderCustomBlocks-D2wISRHq.js.map → preRenderCustomBlocks-CPHm2GOQ.js.map} +1 -1
  94. package/dist/cdn/chunks/{sanitizeHtml-CB7fjHFs.js → sanitizeHtml-B7LC0gKK.js} +2 -2
  95. package/dist/cdn/chunks/{sanitizeHtml-CB7fjHFs.js.map → sanitizeHtml-B7LC0gKK.js.map} +1 -1
  96. package/dist/cdn/chunks/{socialIcons-C_yggK1_.js → socialIcons-D9D02_y5.js} +2 -2
  97. package/dist/cdn/chunks/{socialIcons-C_yggK1_.js.map → socialIcons-D9D02_y5.js.map} +1 -1
  98. package/dist/cdn/chunks/{src-Bp7bZcuD.js → src-BCrSqaj8.js} +2 -2
  99. package/dist/cdn/chunks/{src-Bp7bZcuD.js.map → src-BCrSqaj8.js.map} +1 -1
  100. package/dist/cdn/chunks/{src-D-URHI0Z.js → src-BO4aXl_Y.js} +3 -3
  101. package/dist/cdn/chunks/{src-D-URHI0Z.js.map → src-BO4aXl_Y.js.map} +1 -1
  102. package/dist/cdn/chunks/{src-CdVAke9t.js → src-DeywvttP.js} +547 -540
  103. package/dist/cdn/chunks/src-DeywvttP.js.map +1 -0
  104. package/dist/cdn/chunks/{useLocalizedDisplay-slFOCPrh.js → useLocalizedDisplay-oykFcYrW.js} +2 -2
  105. package/dist/cdn/chunks/{useLocalizedDisplay-slFOCPrh.js.map → useLocalizedDisplay-oykFcYrW.js.map} +1 -1
  106. package/dist/cdn/chunks/{useLogicTag-lPjCGeGC.js → useLogicTag-D_qg9qqO.js} +2 -2
  107. package/dist/cdn/chunks/{useLogicTag-lPjCGeGC.js.map → useLogicTag-D_qg9qqO.js.map} +1 -1
  108. package/dist/cdn/chunks/{useMergeTag-BKNBwIry.js → useMergeTag-VLnVHtxV.js} +2 -2
  109. package/dist/cdn/chunks/{useMergeTag-BKNBwIry.js.map → useMergeTag-VLnVHtxV.js.map} +1 -1
  110. package/dist/cdn/chunks/{withCurrentFont-CzTFFaJA.js → withCurrentFont-m6TtR0dC.js} +2 -2
  111. package/dist/cdn/chunks/{withCurrentFont-CzTFFaJA.js.map → withCurrentFont-m6TtR0dC.js.map} +1 -1
  112. package/dist/cdn/editor.js +17 -17
  113. package/dist/{composables-DbjgUQlV.js → composables-Cq7rsxRc.js} +8 -8
  114. package/dist/{createCloudRuntime-Cnh2M6iT.js → createCloudRuntime-CHsFF8DI.js} +2 -2
  115. package/dist/{dist-CAvsz9cW.js → dist-C0hVefGI.js} +343 -336
  116. package/dist/{extensions-7fb-XtNJ.js → extensions-BSXjPQEc.js} +3 -3
  117. package/dist/{normalizeMergeTagMarkup-GrXJfXsQ.js → normalizeMergeTagMarkup-CBLCQe02.js} +1 -1
  118. package/dist/{preRenderCustomBlocks-DuXtzD-F.js → preRenderCustomBlocks-e2OlY4aU.js} +1 -1
  119. package/dist/{sanitizeHtml-eV4_BpI6.js → sanitizeHtml-Dfn-fH17.js} +1 -1
  120. package/dist/{socialIcons-brRkK9Om.js → socialIcons-BZRLo0eT.js} +1 -1
  121. package/dist/templatical-editor.js +17 -17
  122. package/dist/{useLocalizedDisplay-DoaT7nWk.js → useLocalizedDisplay-B7tlQF4g.js} +1 -1
  123. package/dist/{useLogicTag-cTC2KbWd.js → useLogicTag-k_y-4o4W.js} +1 -1
  124. package/dist/{useMergeTag-D2YDZ8vR.js → useMergeTag-BiZ6XOdL.js} +1 -1
  125. package/dist/{withCurrentFont-DAmED4fN.js → withCurrentFont-CPhRujet.js} +1 -1
  126. package/package.json +7 -7
  127. package/dist/cdn/chunks/src-CdVAke9t.js.map +0 -1
@@ -343,23 +343,23 @@ function xe(e) {
343
343
  }
344
344
  return t.l10n && !Object.keys(t.l10n).length && delete t.l10n, h(t, e) ? e : t;
345
345
  }
346
- function Se(e) {
346
+ function b(e) {
347
347
  let t = xe(e);
348
348
  if (t.type === "wrapper") {
349
- let e = t.children.map(Se);
349
+ let e = t.children.map(b);
350
350
  return e.some((e, n) => e !== t.children[n]) ? {
351
351
  ...t,
352
352
  children: e
353
353
  } : t;
354
354
  }
355
355
  if (t.type !== "section") return t;
356
- let n = t.children.map((e) => e.map(Se));
356
+ let n = t.children.map((e) => e.map(b));
357
357
  return n.some((e, n) => e.some((e, r) => e !== t.children[n][r])) ? {
358
358
  ...t,
359
359
  children: n
360
360
  } : t;
361
361
  }
362
- function Ce(e, t, n) {
362
+ function Se(e, t, n) {
363
363
  if (e.type === "custom") return !1;
364
364
  if (e.type === "section") return t === "columns";
365
365
  let r = e.type === "menu" ? "items" : e.type === "social" ? "icons" : e.type === "table" ? "rows" : null;
@@ -380,10 +380,10 @@ function Ce(e, t, n) {
380
380
  }
381
381
  return !1;
382
382
  }
383
- function we(e) {
383
+ function Ce(e) {
384
384
  return xe(e);
385
385
  }
386
- function b(e, t, n) {
386
+ function x(e, t, n) {
387
387
  if (!v(t)) return !1;
388
388
  let r = t.split("."), i = r.pop(), a = r.reduce(be, e);
389
389
  if (Array.isArray(a)) {
@@ -392,21 +392,21 @@ function b(e, t, n) {
392
392
  }
393
393
  return _(a) ? (n === null ? delete a[i] : a[i] = m(n), !0) : !1;
394
394
  }
395
- function Te(e, t) {
395
+ function we(e, t) {
396
396
  let [n, ...r] = t.split(".");
397
397
  if (n === void 0) return [""];
398
398
  let i = [];
399
399
  if (n === "*") {
400
400
  let t = Array.isArray(e) ? e : [];
401
- for (let e of t) if (_(e) && typeof e.id == "string") for (let t of r.length ? Te(e, r.join(".")) : [""]) i.push(t ? `${e.id}.${t}` : e.id);
401
+ for (let e of t) if (_(e) && typeof e.id == "string") for (let t of r.length ? we(e, r.join(".")) : [""]) i.push(t ? `${e.id}.${t}` : e.id);
402
402
  return i;
403
403
  }
404
404
  let a = _(e) ? e[n] : void 0;
405
405
  if (r.length === 0) return a === void 0 ? [] : [n];
406
- for (let e of Te(a, r.join("."))) i.push(`${n}.${e}`);
406
+ for (let e of we(a, r.join("."))) i.push(`${n}.${e}`);
407
407
  return i;
408
408
  }
409
- function x(e, t = []) {
409
+ function S(e, t = []) {
410
410
  if (e.type === "custom") {
411
411
  let n = t.find((t) => t.type === e.customType), r = new Set((n?.fields ?? []).filter((e) => e.type === "text" || e.type === "textarea").map((e) => e.key)), i = e.fieldValues;
412
412
  return _(i) ? Object.keys(i).filter((e) => r.has(e)).map((e) => `fieldValues.${e}`) : [];
@@ -421,42 +421,42 @@ function x(e, t = []) {
421
421
  cells: e.cells.filter(n)
422
422
  }))
423
423
  } : e;
424
- return (_e[e.type] ?? []).flatMap((e) => Te(r, e));
424
+ return (_e[e.type] ?? []).flatMap((e) => we(r, e));
425
425
  }
426
- function Ee(e, t) {
426
+ function Te(e, t) {
427
427
  return (_e[e] ?? []).some((e) => {
428
428
  let n = e.split("."), r = t.split(".");
429
429
  return n.length === r.length && n.every((e, t) => e === "*" || e === r[t]);
430
430
  });
431
431
  }
432
- function S(e) {
432
+ function C(e) {
433
433
  let t = 2166136261;
434
434
  for (let n of new TextEncoder().encode(e)) t ^= n, t = Math.imul(t, 16777619) >>> 0;
435
435
  return t.toString(16).padStart(8, "0");
436
436
  }
437
- function De(e) {
437
+ function Ee(e) {
438
438
  let { l10n: t, ...n } = e;
439
439
  return n;
440
440
  }
441
- function C(e = {}) {
441
+ function De(e = {}) {
442
442
  return Object.entries(e).sort(([e], [t]) => e.split(".").length - t.split(".").length);
443
443
  }
444
444
  function Oe(e, t, n) {
445
- return ke(e, m(De(e)), t, n);
445
+ return ke(e, m(Ee(e)), t, n);
446
446
  }
447
447
  function ke(e, t, n, r) {
448
448
  let i = e;
449
449
  if (n === r) return t;
450
450
  let a = i.l10n?.[n];
451
451
  if (!a) return t;
452
- for (let [e, n] of C(a.set)) b(t, e, n);
453
- for (let [n, r] of Object.entries(a.text ?? {})) y(e, n) !== void 0 && b(t, n, r.value);
452
+ for (let [e, n] of De(a.set)) x(t, e, n);
453
+ for (let [n, r] of Object.entries(a.text ?? {})) y(e, n) !== void 0 && x(t, n, r.value);
454
454
  return e.type === "custom" && (Object.keys(a.text ?? {}).length > 0 || Object.keys(a.set ?? {}).length > 0) && delete t.renderedHtml, t;
455
455
  }
456
456
  function Ae(e, t, n) {
457
457
  let r = e;
458
458
  if (r.type !== "section" && r.type !== "wrapper" || !Array.isArray(r.children)) return Oe(e, t, n);
459
- let { children: i, ...a } = De(r), o = m(a);
459
+ let { children: i, ...a } = Ee(r), o = m(a);
460
460
  return o.children = i, ke(e, o, t, n);
461
461
  }
462
462
  function je(e, t) {
@@ -481,8 +481,8 @@ function Ne(e, t, n) {
481
481
  return a.type === "section" && Array.isArray(a.children) ? a.children = a.children.map((e) => i(e)) : a.type === "wrapper" && Array.isArray(a.children) && (a.children = i(a.children)), [a];
482
482
  }), a = m(Me(e.settings)), o = e.settings?.l10n?.[t];
483
483
  if (t !== r && o) {
484
- for (let [e, t] of C(o.set)) b(a, e, t);
485
- for (let [t, n] of Object.entries(o.text ?? {})) y(e.settings, t) !== void 0 && b(a, t, n.value);
484
+ for (let [e, t] of De(o.set)) x(a, e, t);
485
+ for (let [t, n] of Object.entries(o.text ?? {})) y(e.settings, t) !== void 0 && x(a, t, n.value);
486
486
  }
487
487
  return a.locale = t, {
488
488
  blocks: i(e.blocks),
@@ -499,13 +499,13 @@ function Pe(e, t, n = []) {
499
499
  let n = y(t, a);
500
500
  if (typeof n != "string") continue;
501
501
  let o = i?.[a];
502
- (o || n !== "") && (o ? o.sourceHash === S(n) ? r.translated.push(`${e}/${a}`) : r.stale.push(`${e}/${a}`) : r.missing.push(`${e}/${a}`));
502
+ (o || n !== "") && (o ? o.sourceHash === C(n) ? r.translated.push(`${e}/${a}`) : r.stale.push(`${e}/${a}`) : r.missing.push(`${e}/${a}`));
503
503
  }
504
504
  }, a = (e) => {
505
505
  for (let r of e) {
506
506
  if (je(r, t)) continue;
507
507
  let e = r.l10n?.[t];
508
- i(r.id, r, x(r, n), e?.text);
508
+ i(r.id, r, S(r, n), e?.text);
509
509
  let o = r.children;
510
510
  if (r.type === "section" && Array.isArray(o)) for (let e of o) a(e);
511
511
  else r.type === "wrapper" && Array.isArray(o) && a(o);
@@ -525,7 +525,7 @@ function Ie(e, t, n = []) {
525
525
  let r = [], i = (e, n, i) => {
526
526
  r.push(...Le(n, t, i).map((t) => `${e}/${t}`));
527
527
  }, a = (e) => {
528
- for (let t of e) i(t.id, t, x(t, n)), t.type === "section" ? t.children.forEach(a) : t.type === "wrapper" && a(t.children);
528
+ for (let t of e) i(t.id, t, S(t, n)), t.type === "section" ? t.children.forEach(a) : t.type === "wrapper" && a(t.children);
529
529
  };
530
530
  return a(e.blocks), i("settings", e.settings, g), r;
531
531
  }
@@ -540,8 +540,8 @@ function Re(e, t, n = {}) {
540
540
  let r = w(e), i = (e, n, i) => {
541
541
  let a = Le(e, t, i), o = m(e.l10n ?? {}), s = o[t] ?? {}, c = m(e);
542
542
  delete c.l10n;
543
- for (let [e, t] of C(s.set)) b(c, e, t);
544
- for (let [t, n] of Object.entries(s.text ?? {})) y(e, t) !== void 0 && b(c, t, n.value);
543
+ for (let [e, t] of De(s.set)) x(c, e, t);
544
+ for (let [t, n] of Object.entries(s.text ?? {})) y(e, t) !== void 0 && x(c, t, n.value);
545
545
  delete o[t];
546
546
  let l = {}, u = /* @__PURE__ */ new Set([
547
547
  ...Object.keys(s.set ?? {}),
@@ -552,10 +552,10 @@ function Re(e, t, n = {}) {
552
552
  let r = y(e, t), i = y(c, t);
553
553
  h(r, i) ? (s.text?.[t] || a.includes(t)) && n(t) && typeof r == "string" && r !== "" && ((l.text ??= {})[t] = {
554
554
  value: r,
555
- sourceHash: S(r)
555
+ sourceHash: C(r)
556
556
  }) : n(t) && typeof r == "string" && typeof i == "string" ? (l.text ??= {})[t] = {
557
557
  value: r,
558
- sourceHash: S(i)
558
+ sourceHash: C(i)
559
559
  } : (l.set ??= {})[t] = r === void 0 ? null : m(r);
560
560
  }
561
561
  let d = (e, t) => {
@@ -579,21 +579,21 @@ function Re(e, t, n = {}) {
579
579
  };
580
580
  for (let t of Object.values(o)) {
581
581
  let n = m(e);
582
- for (let [e, r] of C(t.set)) b(n, e, r);
583
- for (let [r, i] of Object.entries(t.text ?? {})) y(e, r) !== void 0 && b(n, r, i.value);
582
+ for (let [e, r] of De(t.set)) x(n, e, r);
583
+ for (let [r, i] of Object.entries(t.text ?? {})) y(e, r) !== void 0 && x(n, r, i.value);
584
584
  for (let [n, r] of Object.entries(t.text ?? {})) {
585
585
  let i = y(c, n);
586
586
  if (typeof i != "string") (t.set ??= {})[n] = r.value, delete t.text[n];
587
587
  else {
588
588
  let t = y(e, n);
589
- typeof t == "string" && r.sourceHash === S(t) && (r.sourceHash = S(i));
589
+ typeof t == "string" && r.sourceHash === C(t) && (r.sourceHash = C(i));
590
590
  }
591
591
  }
592
592
  d(t, n);
593
593
  }
594
594
  return Object.keys(l).length && (d(l, e), o[r] = l), Object.keys(o).length && (c.l10n = o), c;
595
595
  }, a = (e) => e.map((e) => {
596
- let t = e.type === "custom" ? [.../* @__PURE__ */ new Set([...Object.hasOwn(n, e.id) ? n[e.id] : [], ...Object.values(e.l10n ?? {}).flatMap((e) => Object.keys(e.text ?? {}))])] : x(e), r = i(e, (n) => e.type === "custom" ? t.includes(n) : Ee(e.type, n), t);
596
+ let t = e.type === "custom" ? [.../* @__PURE__ */ new Set([...Object.hasOwn(n, e.id) ? n[e.id] : [], ...Object.values(e.l10n ?? {}).flatMap((e) => Object.keys(e.text ?? {}))])] : S(e), r = i(e, (n) => e.type === "custom" ? t.includes(n) : Te(e.type, n), t);
597
597
  return e.type === "custom" && r.type === "custom" && !h(e.fieldValues, r.fieldValues) && delete r.renderedHtml, r.type === "section" ? r.children = r.children.map(a) : r.type === "wrapper" && (r.children = a(r.children)), r;
598
598
  }), o = i(e.settings, (e) => g.includes(e), g);
599
599
  return o.locale = t, o.locales = e.settings.locales.map((e) => e === t ? r : e), {
@@ -604,9 +604,9 @@ function Re(e, t, n = {}) {
604
604
  // ../types/src/operations.ts
605
605
  var ze = "Sections with a wrapper cannot be placed inside wrappers.";
606
606
  function Be(e, t, n = []) {
607
- let r = Object.fromEntries(F(e.blocks).flatMap((e) => {
607
+ let r = Object.fromEntries(I(e.blocks).flatMap((e) => {
608
608
  if (e.type !== "custom") return [];
609
- let t = x(e, n).filter((t) => typeof y(e, t) == "string");
609
+ let t = S(e, n).filter((t) => typeof y(e, t) == "string");
610
610
  return t.length && Ke.has(e.id) && D("invalid_operation", 0, qe), t.length ? [[e.id, t]] : [];
611
611
  }));
612
612
  return {
@@ -635,7 +635,7 @@ function E(e, t, n = {}) {
635
635
  locks: n.locks ?? [],
636
636
  session: n.session ?? null
637
637
  };
638
- t.forEach((t, n) => dt(e, t, n, r));
638
+ t.forEach((t, n) => ut(e, t, n, r));
639
639
  }
640
640
  var Ue = /* @__PURE__ */ new Set([
641
641
  "id",
@@ -660,14 +660,14 @@ function O(e) {
660
660
  function k(e) {
661
661
  return e.type === "section";
662
662
  }
663
- function Je(e) {
663
+ function A(e) {
664
664
  return Array.isArray(e.blocks) ? e.blocks : [];
665
665
  }
666
- function Ye(e) {
666
+ function Je(e) {
667
667
  let t = e.children;
668
668
  return Array.isArray(t) ? t.map((e) => Array.isArray(e) ? e : []) : [];
669
669
  }
670
- function* Xe(e, t) {
670
+ function* Ye(e, t) {
671
671
  for (let n = 0; n < e.length; n++) {
672
672
  let r = e[n];
673
673
  if (O(r) && (yield {
@@ -676,47 +676,47 @@ function* Xe(e, t) {
676
676
  index: n,
677
677
  parent: t
678
678
  }, typeof r.id == "string")) {
679
- if (k(r)) for (let [e, t] of Ye(r).entries()) yield* Xe(t, {
679
+ if (k(r)) for (let [e, t] of Je(r).entries()) yield* Ye(t, {
680
680
  sectionId: r.id,
681
681
  column: e
682
682
  });
683
- else r.type === "wrapper" && Array.isArray(r.children) && (yield* Xe(r.children, { wrapperId: r.id }));
683
+ else r.type === "wrapper" && Array.isArray(r.children) && (yield* Ye(r.children, { wrapperId: r.id }));
684
684
  }
685
685
  }
686
686
  }
687
- function A(e, t) {
688
- for (let n of Xe(Je(e), null)) if (n.block.id === t) return n;
687
+ function j(e, t) {
688
+ for (let n of Ye(A(e), null)) if (n.block.id === t) return n;
689
689
  return null;
690
690
  }
691
- function j(e) {
691
+ function M(e) {
692
692
  if (!O(e)) return [];
693
693
  let t = typeof e.id == "string" ? [e.id] : [];
694
- if (k(e)) for (let n of Ye(e)) for (let e of Ze(n)) t.push(e);
695
- else if (e.type === "wrapper" && Array.isArray(e.children)) for (let n of Ze(e.children)) t.push(n);
694
+ if (k(e)) for (let n of Je(e)) for (let e of Xe(n)) t.push(e);
695
+ else if (e.type === "wrapper" && Array.isArray(e.children)) for (let n of Xe(e.children)) t.push(n);
696
696
  return t;
697
697
  }
698
- function Ze(e) {
699
- return e.flatMap(j);
698
+ function Xe(e) {
699
+ return e.flatMap(M);
700
700
  }
701
- function M(e, t) {
701
+ function N(e, t) {
702
702
  return typeof e.blockId != "string" || e.blockId === "" ? D("invalid_operation", t, "blockId must be a block id.") : e.blockId;
703
703
  }
704
- function Qe(e, t) {
704
+ function Ze(e, t) {
705
705
  let n = e.parent;
706
706
  return n === null ? null : O(n) && typeof n.sectionId == "string" && typeof n.column == "number" && Number.isInteger(n.column) ? {
707
707
  sectionId: n.sectionId,
708
708
  column: n.column
709
709
  } : O(n) && typeof n.wrapperId == "string" && n.wrapperId !== "" && !Object.hasOwn(n, "sectionId") && !Object.hasOwn(n, "column") ? { wrapperId: n.wrapperId } : D("invalid_operation", t, "parent must be null, { \"sectionId\", \"column\" }, or { \"wrapperId\" }.");
710
710
  }
711
- function $e(e, t) {
711
+ function Qe(e, t) {
712
712
  let n = e.after;
713
713
  return n === null ? null : typeof n == "string" && n !== "" ? n : D("invalid_operation", t, "after must be null or a block id.");
714
714
  }
715
- function N(e, t) {
715
+ function P(e, t) {
716
716
  let n = e.expect;
717
717
  return n == null ? null : O(n) ? n : D("invalid_operation", t, "expect must be an object.");
718
718
  }
719
- function et(e, t, n) {
719
+ function $e(e, t, n) {
720
720
  let r = e.set ?? null, i = e.unset ?? [];
721
721
  (r === null || O(r)) && Array.isArray(i) && i.every((e) => typeof e == "string") || D("invalid_operation", t, "set must be an object and unset a list of keys.");
722
722
  let a = r === null ? {} : r, o = Object.keys(a).filter((e) => a[e] !== void 0);
@@ -728,49 +728,49 @@ function et(e, t, n) {
728
728
  unset: i
729
729
  };
730
730
  }
731
- function tt(e, t, n) {
731
+ function et(e, t, n) {
732
732
  if (O(e) && typeof e.id == "string" && e.id !== "" && typeof e.type == "string" || D("invalid_operation", t, "A block needs a non-empty string id and a string type."), e.type === "wrapper") {
733
733
  n !== "root" && D("invalid_operation", t, n === "column" ? "Wrappers can only be placed at the top level." : "Wrappers cannot be placed inside wrappers."), Array.isArray(e.children) || D("invalid_operation", t, "A wrapper needs children: a list of blocks.");
734
- for (let n of e.children) tt(n, t, "wrapper");
734
+ for (let n of e.children) et(n, t, "wrapper");
735
735
  return;
736
736
  }
737
737
  if (!k(e)) return;
738
738
  n === "column" && D("invalid_operation", t, "Sections can only be placed at the top level."), n === "wrapper" && e.wrapper && D("invalid_operation", t, ze);
739
739
  let r = e.children;
740
740
  Array.isArray(r) && r.every((e) => Array.isArray(e)) || D("invalid_operation", t, "A section needs children: a list of columns, each a list of blocks.");
741
- for (let e of r) for (let n of e) tt(n, t, "column");
741
+ for (let e of r) for (let n of e) et(n, t, "column");
742
742
  }
743
- function P(e, t) {
743
+ function F(e, t) {
744
744
  return e.session === null || t.sessionId !== e.session;
745
745
  }
746
- function nt(e, t, n) {
747
- let r = e.locks.find((n) => t.includes(n.blockId) && P(e, n));
746
+ function tt(e, t, n) {
747
+ let r = e.locks.find((n) => t.includes(n.blockId) && F(e, n));
748
748
  r && D("lock_held", n, `Block "${r.blockId}" is being edited in another session.`, r.blockId);
749
749
  }
750
- function rt(e, t, n, r) {
751
- e.locks.find((r) => P(e, r) && r.blockId === t && ((r.locale ?? null) === null || r.locale === n)) && D("lock_held", r, `Block "${t}" is being edited in another session.`, t);
750
+ function nt(e, t, n, r) {
751
+ e.locks.find((r) => F(e, r) && r.blockId === t && ((r.locale ?? null) === null || r.locale === n)) && D("lock_held", r, `Block "${t}" is being edited in another session.`, t);
752
752
  }
753
- function it(e, t, n, r) {
753
+ function rt(e, t, n, r) {
754
754
  for (let [i, a] of Object.entries(t)) a !== void 0 && (h(Object.hasOwn(e, i) && e[i] !== void 0 ? e[i] : null, a) || D("precondition_failed", n, r === void 0 ? `Setting "${i}" has changed since.` : `"${i}" of block "${r}" has changed since.`, r));
755
755
  }
756
- function at(e, t, n) {
756
+ function it(e, t, n) {
757
757
  if (t === null) return Array.isArray(e.blocks) || (e.blocks = []), e.blocks;
758
758
  if ("wrapperId" in t) {
759
- let r = A(e, t.wrapperId);
759
+ let r = j(e, t.wrapperId);
760
760
  return r ? r.block.type === "wrapper" ? Array.isArray(r.block.children) ? r.block.children : D("invalid_operation", n, `Wrapper "${t.wrapperId}" has no children list.`) : D("invalid_operation", n, `Block "${t.wrapperId}" isn't a wrapper.`) : D("block_missing", n, `No wrapper with id "${t.wrapperId}".`, t.wrapperId);
761
761
  }
762
- let r = A(e, t.sectionId);
762
+ let r = j(e, t.sectionId);
763
763
  if (!r) return D("block_missing", n, `No section with id "${t.sectionId}".`, t.sectionId);
764
764
  if (!k(r.block)) return D("invalid_operation", n, `Block "${t.sectionId}" isn't a section.`);
765
765
  let i = r.block.children;
766
766
  return !Array.isArray(i) || t.column < 0 || t.column >= i.length ? D("invalid_operation", n, `Section "${t.sectionId}" has no column ${t.column}.`) : (Array.isArray(i[t.column]) || (i[t.column] = []), i[t.column]);
767
767
  }
768
- function ot(e, t, n) {
768
+ function at(e, t, n) {
769
769
  if (t === null) return 0;
770
770
  let r = e.findIndex((e) => O(e) && e.id === t);
771
771
  return r === -1 ? D("anchor_missing", n, `No block "${t}" in the target container.`, t) : r + 1;
772
772
  }
773
- function st(e, t, n, r) {
773
+ function ot(e, t, n, r) {
774
774
  let i = Ve(t), a = Array.isArray(e.children) ? e.children : [];
775
775
  for (let e = i; e < a.length; e++) {
776
776
  let t = a[e];
@@ -780,7 +780,7 @@ function st(e, t, n, r) {
780
780
  for (; o.length < i;) o.push([]);
781
781
  e.children = o;
782
782
  }
783
- function ct(e, t, n) {
783
+ function st(e, t, n) {
784
784
  for (let [n, r] of Object.entries(t)) n === "__proto__" ? Object.defineProperty(e, n, {
785
785
  value: m(r),
786
786
  writable: !0,
@@ -789,7 +789,7 @@ function ct(e, t, n) {
789
789
  }) : e[n] = m(r);
790
790
  for (let t of n) delete e[t];
791
791
  }
792
- function lt(e) {
792
+ function ct(e) {
793
793
  return me(e).map((t) => {
794
794
  let n = t.path.replace(/\.(items|icons|rows)\[.*$/, "").replace(/\[(\d+)\]/g, ".$1").split(".").reduce((e, t) => e[t], e);
795
795
  return {
@@ -798,113 +798,113 @@ function lt(e) {
798
798
  };
799
799
  });
800
800
  }
801
- function ut(e, t, n) {
802
- let r = ({ id: e, blockId: t }) => JSON.stringify([t ?? null, e]), i = new Set(n ? lt(n).map(r) : []), a = lt(e).find((e) => !i.has(r(e)));
801
+ function lt(e, t, n) {
802
+ let r = ({ id: e, blockId: t }) => JSON.stringify([t ?? null, e]), i = new Set(n ? ct(n).map(r) : []), a = ct(e).find((e) => !i.has(r(e)));
803
803
  a && D("invalid_operation", t, `Element id "${a.id}" must not contain "." or "/".`, a.blockId);
804
804
  }
805
- function dt(e, t, n, r) {
805
+ function ut(e, t, n, r) {
806
806
  let i = t;
807
807
  switch (O(i) && typeof i.op == "string" || D("invalid_operation", n, "Each operation must be an object with an \"op\"."), i.op) {
808
- case "addBlock": return ft(e, i, n);
809
- case "moveBlock": return pt(e, i, n, r);
810
- case "deleteBlock": return mt(e, i, n, r);
811
- case "updateBlock": return ht(e, i, n, r);
812
- case "updateSettings": return gt(e, i, n);
813
- case "setContent": return jt(e, i, n, r);
814
- case "setDefaultLocale": return Mt(e, i, n, r);
815
- case "addLocale": return yt(e, i, n);
816
- case "removeLocale": return xt(e, i, n);
817
- case "updateBlockLocale": return kt(e, i, n, r);
818
- case "updateSettingsLocale": return At(e, i, n);
808
+ case "addBlock": return dt(e, i, n);
809
+ case "moveBlock": return ft(e, i, n, r);
810
+ case "deleteBlock": return pt(e, i, n, r);
811
+ case "updateBlock": return mt(e, i, n, r);
812
+ case "updateSettings": return ht(e, i, n);
813
+ case "setContent": return At(e, i, n, r);
814
+ case "setDefaultLocale": return jt(e, i, n, r);
815
+ case "addLocale": return vt(e, i, n);
816
+ case "removeLocale": return bt(e, i, n);
817
+ case "updateBlockLocale": return Ot(e, i, n, r);
818
+ case "updateSettingsLocale": return kt(e, i, n);
819
819
  default: D("invalid_operation", n, `Unknown operation "${i.op}".`);
820
820
  }
821
821
  }
822
- function ft(e, t, n) {
823
- let r = Qe(t, n), i = $e(t, n), a = t.block;
824
- tt(a, n, r === null ? "root" : "wrapperId" in r ? "wrapper" : "column"), ut({
822
+ function dt(e, t, n) {
823
+ let r = Ze(t, n), i = Qe(t, n), a = t.block;
824
+ et(a, n, r === null ? "root" : "wrapperId" in r ? "wrapper" : "column"), lt({
825
825
  blocks: [a],
826
826
  settings: e.settings
827
827
  }, n);
828
- let o = new Set(Ze(Je(e))), s = /* @__PURE__ */ new Set();
829
- for (let e of j(a)) (o.has(e) || s.has(e)) && D("block_exists", n, `A block with id "${e}" already exists.`, e), s.add(e);
830
- let c = at(e, r, n), l = ot(c, i, n);
831
- Ot(e, a, r, n, !0), c.splice(l, 0, m(a));
828
+ let o = new Set(Xe(A(e))), s = /* @__PURE__ */ new Set();
829
+ for (let e of M(a)) (o.has(e) || s.has(e)) && D("block_exists", n, `A block with id "${e}" already exists.`, e), s.add(e);
830
+ let c = it(e, r, n), l = at(c, i, n);
831
+ Dt(e, a, r, n, !0), c.splice(l, 0, m(a));
832
832
  }
833
- function pt(e, t, n, r) {
834
- let i = M(t, n), a = Qe(t, n), o = $e(t, n), s = N(t, n), c = s && s.parent !== void 0 ? Qe({ parent: s.parent }, n) : null, l = A(e, i);
833
+ function ft(e, t, n, r) {
834
+ let i = N(t, n), a = Ze(t, n), o = Qe(t, n), s = P(t, n), c = s && s.parent !== void 0 ? Ze({ parent: s.parent }, n) : null, l = j(e, i);
835
835
  if (!l) return D("block_missing", n, `No block with id "${i}".`, i);
836
- if (nt(r, j(l.block), n), s) {
836
+ if (tt(r, M(l.block), n), s) {
837
837
  let e = l.index > 0 ? l.list[l.index - 1] : null, t = O(e) ? e.id ?? null : null;
838
838
  h(l.parent, c) && h(t, s.after ?? null) || D("precondition_failed", n, `Block "${i}" has moved since.`, i);
839
839
  }
840
- a !== null && ("wrapperId" in a ? a.wrapperId : a.sectionId) === i && D("invalid_operation", n, "A block cannot be moved into itself or its descendants."), a !== null && j(l.block).includes("wrapperId" in a ? a.wrapperId : a.sectionId) && D("invalid_operation", n, "A block cannot be moved into itself or its descendants."), k(l.block) && a !== null && "sectionId" in a && D("invalid_operation", n, "Sections can only be placed at the top level."), k(l.block) && l.block.wrapper && a !== null && "wrapperId" in a && D("invalid_operation", n, ze), l.block.type === "wrapper" && a !== null && D("invalid_operation", n, "wrapperId" in a ? "Wrappers cannot be placed inside wrappers." : "Wrappers can only be placed at the top level."), o === i && D("invalid_operation", n, "A block can't be placed after itself.");
841
- let u = at(e, a, n);
842
- ot(u.filter((e) => e !== l.block), o, n), Ot(e, l.block, a, n, !1), l.list.splice(l.index, 1), u.splice(ot(u, o, n), 0, l.block);
840
+ a !== null && ("wrapperId" in a ? a.wrapperId : a.sectionId) === i && D("invalid_operation", n, "A block cannot be moved into itself or its descendants."), a !== null && M(l.block).includes("wrapperId" in a ? a.wrapperId : a.sectionId) && D("invalid_operation", n, "A block cannot be moved into itself or its descendants."), k(l.block) && a !== null && "sectionId" in a && D("invalid_operation", n, "Sections can only be placed at the top level."), k(l.block) && l.block.wrapper && a !== null && "wrapperId" in a && D("invalid_operation", n, ze), l.block.type === "wrapper" && a !== null && D("invalid_operation", n, "wrapperId" in a ? "Wrappers cannot be placed inside wrappers." : "Wrappers can only be placed at the top level."), o === i && D("invalid_operation", n, "A block can't be placed after itself.");
841
+ let u = it(e, a, n);
842
+ at(u.filter((e) => e !== l.block), o, n), Dt(e, l.block, a, n, !1), l.list.splice(l.index, 1), u.splice(at(u, o, n), 0, l.block);
843
843
  }
844
- function mt(e, t, n, r) {
845
- let i = M(t, n), a = N(t, n), o = A(e, i);
844
+ function pt(e, t, n, r) {
845
+ let i = N(t, n), a = P(t, n), o = j(e, i);
846
846
  if (!o) return D("block_missing", n, `No block with id "${i}".`, i);
847
- nt(r, j(o.block), n), a && !h(o.block, a.block ?? null) && D("precondition_failed", n, `Block "${i}" has changed since.`, i), o.list.splice(o.index, 1);
847
+ tt(r, M(o.block), n), a && !h(o.block, a.block ?? null) && D("precondition_failed", n, `Block "${i}" has changed since.`, i), o.list.splice(o.index, 1);
848
848
  }
849
- function ht(e, t, n, r) {
850
- let i = M(t, n), { set: a, unset: o } = et(t, n, Ue), s = N(t, n), c = A(e, i);
849
+ function mt(e, t, n, r) {
850
+ let i = N(t, n), { set: a, unset: o } = $e(t, n, Ue), s = P(t, n), c = j(e, i);
851
851
  if (!c) return D("block_missing", n, `No block with id "${i}".`, i);
852
852
  let l = c.block, u = k(l);
853
- u && o.includes("columns") && D("invalid_operation", n, "A section's columns can't be unset; set another layout instead."), nt(r, [i], n), s && it(l, s, n, i), u && c.parent !== null && "wrapperId" in c.parent && a.wrapper && D("invalid_operation", n, ze);
853
+ u && o.includes("columns") && D("invalid_operation", n, "A section's columns can't be unset; set another layout instead."), tt(r, [i], n), s && rt(l, s, n, i), u && c.parent !== null && "wrapperId" in c.parent && a.wrapper && D("invalid_operation", n, ze);
854
854
  let d = { ...l };
855
- ct(d, a, o), ut({
855
+ st(d, a, o), lt({
856
856
  blocks: [d],
857
857
  settings: e.settings
858
858
  }, n, {
859
859
  blocks: [l],
860
860
  settings: e.settings
861
- }), u && Object.hasOwn(a, "columns") && st(l, a.columns, n, i), ct(l, a, o);
862
- let f = Se(l);
861
+ }), u && Object.hasOwn(a, "columns") && ot(l, a.columns, n, i), st(l, a, o);
862
+ let f = b(l);
863
863
  h(l.l10n, f.l10n) || (f.l10n ? l.l10n = f.l10n : delete l.l10n), (u || l.type === "wrapper") && !h(l.children, f.children) && (l.children = f.children);
864
864
  }
865
- function gt(e, t, n) {
866
- let { set: r, unset: i } = et(t, n, We), a = N(t, n);
865
+ function ht(e, t, n) {
866
+ let { set: r, unset: i } = $e(t, n, We), a = P(t, n);
867
867
  e.settings?.locales?.length && (Object.hasOwn(r, "locale") || i.includes("locale")) && D("invalid_operation", n, "The default locale can't change while language versions exist."), O(e.settings) || (e.settings = {});
868
868
  let o = e.settings;
869
- a && it(o, a, n), ct(o, r, i);
870
- let s = we(e.settings);
869
+ a && rt(o, a, n), st(o, r, i);
870
+ let s = Ce(e.settings);
871
871
  h(o.l10n, s.l10n) || (s.l10n ? o.l10n = s.l10n : delete o.l10n);
872
872
  }
873
- function _t(e, t) {
873
+ function gt(e, t) {
874
874
  let n = e.locale;
875
875
  return ve(n) && n !== "__proto__" && n !== "constructor" && n !== "prototype" || D("invalid_operation", t, "locale must be a language tag."), n;
876
876
  }
877
- function vt(e, t, n) {
878
- let r = _t(t, n);
877
+ function _t(e, t, n) {
878
+ let r = gt(t, n);
879
879
  return e.settings.locales?.includes(r) || D("invalid_operation", n, `Locale "${r}" isn't in settings.locales.`), r;
880
880
  }
881
- function yt(e, t, n) {
882
- let r = _t(t, n), i = e.settings.locales ?? [], a = r.toLowerCase(), o = t.position === void 0 ? i.length : t.position;
881
+ function vt(e, t, n) {
882
+ let r = gt(t, n), i = e.settings.locales ?? [], a = r.toLowerCase(), o = t.position === void 0 ? i.length : t.position;
883
883
  (w(e).toLowerCase() === a || i.some((e) => e.toLowerCase() === a) || typeof o != "number" || !Number.isInteger(o) || o < 0 || o > i.length) && D("invalid_operation", n, "The locale already exists or its insertion position is invalid."), e.settings.locales || (e.settings.locales = []), e.settings.locales.splice(o, 0, r);
884
884
  }
885
- function F(e) {
886
- return e.flatMap((e) => O(e) ? [e, ...k(e) ? Ye(e).flatMap(F) : e.type === "wrapper" && Array.isArray(e.children) ? F(e.children) : []] : []);
885
+ function I(e) {
886
+ return e.flatMap((e) => O(e) ? [e, ...k(e) ? Je(e).flatMap(I) : e.type === "wrapper" && Array.isArray(e.children) ? I(e.children) : []] : []);
887
887
  }
888
- function bt(e, t) {
888
+ function yt(e, t) {
889
889
  let n = e.l10n;
890
890
  return O(n) && O(n[t]) ? n[t] : {};
891
891
  }
892
- function xt(e, t, n) {
893
- let r = vt(e, t, n), i = N(t, n);
892
+ function bt(e, t, n) {
893
+ let r = _t(e, t, n), i = P(t, n);
894
894
  i && (!O(i.blocks) || i.settings !== void 0 && !O(i.settings)) && D("invalid_operation", n, "expect needs a blocks object and an optional settings layer.");
895
- let a = e.settings, o = F(Je(e)), s = Object.fromEntries(o.flatMap((e) => O(e.l10n) && Object.hasOwn(e.l10n, r) ? [[String(e.id), e.l10n[r]]] : []));
895
+ let a = e.settings, o = I(A(e)), s = Object.fromEntries(o.flatMap((e) => O(e.l10n) && Object.hasOwn(e.l10n, r) ? [[String(e.id), e.l10n[r]]] : []));
896
896
  !i || h(s, i.blocks) && h(O(a.l10n) ? a.l10n[r] : void 0, i.settings) || D("precondition_failed", n, `Locale "${r}" has changed since.`);
897
897
  for (let e of [...o, a]) O(e.l10n) && (delete e.l10n[r], Object.keys(e.l10n).length === 0 && delete e.l10n);
898
898
  e.settings.locales.splice(e.settings.locales.indexOf(r), 1), e.settings.locales.length === 0 && delete e.settings.locales;
899
899
  }
900
- function St(e, t, n) {
900
+ function xt(e, t, n) {
901
901
  (e.text === void 0 || ((e) => O(e) && Object.values(e).every((e) => O(e) && typeof e.value == "string" && typeof e.sourceHash == "string"))(e.text)) && (e.set === void 0 || O(e.set) && !Object.values(e.set).some((e) => e === void 0)) && (e.unset === void 0 || Array.isArray(e.unset) && e.unset.every((e) => typeof e == "string" && e !== "" && v(e))) && (e.hidden === void 0 || !n && typeof e.hidden == "boolean") && [
902
902
  "text",
903
903
  "set",
904
904
  "unset",
905
905
  ...n ? [] : ["hidden"]
906
906
  ].some((t) => e[t] !== void 0) || D("invalid_operation", t, "A locale update needs text, set, unset or a block's boolean hidden.");
907
- let r = N(e, t);
907
+ let r = P(e, t);
908
908
  return r && (r.text !== void 0 && !O(r.text) || r.set !== void 0 && !O(r.set) || r.hidden !== void 0 && (n || typeof r.hidden != "boolean")) && D("invalid_operation", t, "The locale layer expect is malformed."), {
909
909
  text: e.text ?? {},
910
910
  set: e.set ?? {},
@@ -913,20 +913,20 @@ function St(e, t, n) {
913
913
  expect: r
914
914
  };
915
915
  }
916
- function Ct(e, t, n, r) {
917
- for (let i of Object.keys(t.text)) v(i) && (r ? g.includes(i) : Ee(String(e.type), i)) && y(e, i) !== void 0 || D("invalid_operation", n, `Text path "${i}" isn't translatable or doesn't resolve.`);
916
+ function St(e, t, n, r) {
917
+ for (let i of Object.keys(t.text)) v(i) && (r ? g.includes(i) : Te(String(e.type), i)) && y(e, i) !== void 0 || D("invalid_operation", n, `Text path "${i}" isn't translatable or doesn't resolve.`);
918
918
  for (let i of Object.keys(t.set)) {
919
919
  let a = i.split("."), o = r ? Ge : Ue, s = a.length === 1 ? e : y(e, a.slice(0, -1).join("."));
920
- (!v(i) || o.has(a[0]) || !r && Ce(e, i, t.set[i]) || y(e, i) === void 0 && !O(s)) && D("invalid_operation", n, `Override path "${i}" is immutable or doesn't resolve.`);
920
+ (!v(i) || o.has(a[0]) || !r && Se(e, i, t.set[i]) || y(e, i) === void 0 && !O(s)) && D("invalid_operation", n, `Override path "${i}" is immutable or doesn't resolve.`);
921
921
  }
922
922
  }
923
- function wt(e, t, n, r) {
923
+ function Ct(e, t, n, r) {
924
924
  if (t) {
925
925
  for (let i of ["text", "set"]) for (let [a, o] of Object.entries(t[i] ?? {})) h(e[i]?.[a] ?? null, o) || D("precondition_failed", n, `Locale path "${a}" has changed since.`, r);
926
926
  t.hidden !== void 0 && !h(e.hidden === !0, t.hidden) && D("precondition_failed", n, "The locale's hidden state has changed since.", r);
927
927
  }
928
928
  }
929
- function Tt(e, t, n) {
929
+ function wt(e, t, n) {
930
930
  O(e.l10n) || (e.l10n = {});
931
931
  let r = e.l10n;
932
932
  O(r[t]) || (r[t] = {});
@@ -936,65 +936,65 @@ function Tt(e, t, n) {
936
936
  for (let [e, t] of Object.entries(n.set)) i.set ||= {}, i.set[e] = m(t), i.text && delete i.text[e];
937
937
  n.hidden === !0 ? i.hidden = !0 : n.hidden === !1 && delete i.hidden, i.text && Object.keys(i.text).length === 0 && delete i.text, i.set && Object.keys(i.set).length === 0 && delete i.set, Object.keys(i).length === 0 && delete r[t], Object.keys(r).length === 0 && delete e.l10n;
938
938
  }
939
- function I(e) {
940
- return O(e) ? e.type === "slot" || Array.isArray(e.children) && e.children.some((e) => Array.isArray(e) ? e.some(I) : I(e)) : !1;
939
+ function L(e) {
940
+ return O(e) ? e.type === "slot" || Array.isArray(e.children) && e.children.some((e) => Array.isArray(e) ? e.some(L) : L(e)) : !1;
941
941
  }
942
- function Et(e) {
942
+ function Tt(e) {
943
943
  return O(e) && O(e.l10n) && Object.values(e.l10n).some((e) => O(e) && e.hidden === !0);
944
944
  }
945
- function Dt(e) {
946
- return !O(e) || !I(e) ? !1 : Et(e) ? !0 : Array.isArray(e.children) && e.children.some((e) => Array.isArray(e) ? e.some(Dt) : Dt(e));
945
+ function Et(e) {
946
+ return !O(e) || !L(e) ? !1 : Tt(e) ? !0 : Array.isArray(e.children) && e.children.some((e) => Array.isArray(e) ? e.some(Et) : Et(e));
947
947
  }
948
- function Ot(e, t, n, r, i) {
949
- if (!I(t)) return;
948
+ function Dt(e, t, n, r, i) {
949
+ if (!L(t)) return;
950
950
  let a = n, o = !1;
951
951
  for (; a !== null;) {
952
- let t = A(e, "wrapperId" in a ? a.wrapperId : a.sectionId);
952
+ let t = j(e, "wrapperId" in a ? a.wrapperId : a.sectionId);
953
953
  if (!t) break;
954
- Et(t.block) && (o = !0), a = t.parent;
954
+ Tt(t.block) && (o = !0), a = t.parent;
955
955
  }
956
- (o || i && Dt(t)) && D("invalid_operation", r, "A layout's slot block can't be placed inside a block that a language hides.", O(t) && typeof t.id == "string" ? t.id : void 0);
956
+ (o || i && Et(t)) && D("invalid_operation", r, "A layout's slot block can't be placed inside a block that a language hides.", O(t) && typeof t.id == "string" ? t.id : void 0);
957
957
  }
958
- function kt(e, t, n, r) {
959
- let i = vt(e, t, n), a = M(t, n), o = St(t, n, !1), s = F(Je(e)).find((e) => e.id === a);
960
- s || D("block_missing", n, `No block with id "${a}".`, a), Ct(s, o, n, !1), rt(r, a, i, n), wt(bt(s, i), o.expect, n, a), o.hidden === !0 && I(s) && D("invalid_operation", n, "A layout's slot block, and any block that contains it, can't be hidden.", a), Tt(s, i, o);
958
+ function Ot(e, t, n, r) {
959
+ let i = _t(e, t, n), a = N(t, n), o = xt(t, n, !1), s = I(A(e)).find((e) => e.id === a);
960
+ s || D("block_missing", n, `No block with id "${a}".`, a), St(s, o, n, !1), nt(r, a, i, n), Ct(yt(s, i), o.expect, n, a), o.hidden === !0 && L(s) && D("invalid_operation", n, "A layout's slot block, and any block that contains it, can't be hidden.", a), wt(s, i, o);
961
961
  }
962
- function At(e, t, n) {
963
- let r = vt(e, t, n), i = St(t, n, !0), a = e.settings;
964
- Ct(a, i, n, !0), wt(bt(a, r), i.expect, n), Tt(a, r, i);
962
+ function kt(e, t, n) {
963
+ let r = _t(e, t, n), i = xt(t, n, !0), a = e.settings;
964
+ St(a, i, n, !0), Ct(yt(a, r), i.expect, n), wt(a, r, i);
965
965
  }
966
- function jt(e, t, n, r) {
966
+ function At(e, t, n, r) {
967
967
  let i = t.content;
968
968
  if (!O(i) || !Array.isArray(i.blocks) || !O(i.settings)) return D("invalid_operation", n, "setContent needs content with a blocks array and a settings object.");
969
- ut(i, n, e);
970
- let a = r.locks.find((e) => P(r, e));
969
+ lt(i, n, e);
970
+ let a = r.locks.find((e) => F(r, e));
971
971
  a && D("locked_by_others", n, "Other sessions hold locks on this template.", a.blockId), e.blocks = m(i.blocks), e.settings = m(i.settings);
972
972
  }
973
- function Mt(e, t, n, r) {
974
- let i = _t(t, n);
973
+ function jt(e, t, n, r) {
974
+ let i = gt(t, n);
975
975
  e.settings.locales?.includes(i) || D("invalid_operation", n, `"${i}" is not a language version of this template.`);
976
976
  let a = Fe(e, i);
977
977
  a.length && D("invalid_operation", n, a.length === 1 ? `1 block is hidden in "${i}". Show it before making it the default.` : `${a.length} blocks are hidden in "${i}". Show them before making it the default.`, a[0]);
978
- let o = r.locks.find((e) => P(r, e));
978
+ let o = r.locks.find((e) => F(r, e));
979
979
  o && D("locked_by_others", n, "Other sessions hold locks on this template.", o.blockId);
980
980
  let s = t.customTextFields;
981
981
  if (s !== void 0) {
982
- let t = F(e.blocks);
982
+ let t = I(e.blocks);
983
983
  (!O(s) || Object.getOwnPropertyNames(s).some((e) => {
984
984
  if (Ke.has(e)) return !0;
985
985
  let n = s[e], r = t.find((t) => t.id === e);
986
- return r?.type !== "custom" || !Array.isArray(n) || n.some((e) => typeof e != "string" || !v(e) || !Ee("custom", e) || typeof y(r, e) != "string");
986
+ return r?.type !== "custom" || !Array.isArray(n) || n.some((e) => typeof e != "string" || !v(e) || !Te("custom", e) || typeof y(r, e) != "string");
987
987
  })) && D("invalid_operation", n, qe);
988
988
  }
989
989
  let c = Re(e, i, t.customTextFields);
990
990
  e.blocks = c.blocks, e.settings = c.settings;
991
991
  }
992
992
  // ../types/src/invert-operations.ts
993
- function Nt(e) {
993
+ function Mt(e) {
994
994
  let t = e.children;
995
995
  return e.type === "section" && Array.isArray(t) ? t : [];
996
996
  }
997
- function Pt(e, t, n = null) {
997
+ function Nt(e, t, n = null) {
998
998
  for (let r = 0; r < e.length; r++) {
999
999
  let i = e[r];
1000
1000
  if (i.id === t) return {
@@ -1002,28 +1002,28 @@ function Pt(e, t, n = null) {
1002
1002
  parent: n,
1003
1003
  after: r > 0 ? e[r - 1].id : null
1004
1004
  };
1005
- let a = Nt(i);
1005
+ let a = Mt(i);
1006
1006
  for (let e = 0; e < a.length; e++) {
1007
1007
  if (!Array.isArray(a[e])) continue;
1008
- let n = Pt(a[e], t, {
1008
+ let n = Nt(a[e], t, {
1009
1009
  sectionId: i.id,
1010
1010
  column: e
1011
1011
  });
1012
1012
  if (n) return n;
1013
1013
  }
1014
1014
  if (i.type === "wrapper" && Array.isArray(i.children)) {
1015
- let e = Pt(i.children, t, { wrapperId: i.id });
1015
+ let e = Nt(i.children, t, { wrapperId: i.id });
1016
1016
  if (e) return e;
1017
1017
  }
1018
1018
  }
1019
1019
  return null;
1020
1020
  }
1021
- function Ft(e, t, n) {
1022
- let r = Pt(e.blocks, t);
1021
+ function Pt(e, t, n) {
1022
+ let r = Nt(e.blocks, t);
1023
1023
  if (!r) throw new T("block_missing", n, `No block with id "${t}".`, t);
1024
1024
  return r;
1025
1025
  }
1026
- function It(e, t, n) {
1026
+ function Ft(e, t, n) {
1027
1027
  let r = {}, i = [], a = {}, o = [.../* @__PURE__ */ new Set([...Object.keys(t ?? {}), ...n ?? []])];
1028
1028
  for (let n of o) {
1029
1029
  let o = e[n];
@@ -1037,10 +1037,10 @@ function It(e, t, n) {
1037
1037
  expect: a
1038
1038
  };
1039
1039
  }
1040
- function L(e, t) {
1040
+ function R(e, t) {
1041
1041
  return e.l10n?.[t] ?? {};
1042
1042
  }
1043
- function R(e, t, n, r) {
1043
+ function z(e, t, n, r) {
1044
1044
  let i = {}, a = {}, o = {};
1045
1045
  n.length && (o.text = {}, o.set = {});
1046
1046
  for (let r of n) e.text?.[r] !== void 0 && (i[r] = m(e.text[r])), e.set && Object.hasOwn(e.set, r) && (a[r] = m(e.set[r])), o.text[r] = m(t.text?.[r] ?? null), o.set[r] = m(t.set?.[r] ?? null);
@@ -1052,21 +1052,21 @@ function R(e, t, n, r) {
1052
1052
  expect: o
1053
1053
  };
1054
1054
  }
1055
- function Lt(e) {
1056
- let { unset: t, ...n } = R(e, {}, [.../* @__PURE__ */ new Set([...Object.keys(e.text ?? {}), ...Object.keys(e.set ?? {})])], e.hidden === !0);
1055
+ function It(e) {
1056
+ let { unset: t, ...n } = z(e, {}, [.../* @__PURE__ */ new Set([...Object.keys(e.text ?? {}), ...Object.keys(e.set ?? {})])], e.hidden === !0);
1057
1057
  return n;
1058
1058
  }
1059
- function z(e) {
1060
- return e.flatMap((e) => [e, ...e.type === "wrapper" ? z(e.children) : Nt(e).flatMap(z)]);
1059
+ function B(e) {
1060
+ return e.flatMap((e) => [e, ...e.type === "wrapper" ? B(e.children) : Mt(e).flatMap(B)]);
1061
1061
  }
1062
- function Rt(e, t) {
1062
+ function Lt(e, t) {
1063
1063
  let n = m(e);
1064
1064
  E(n, [t]);
1065
1065
  let r = [], i = (e, t, n) => {
1066
1066
  for (let [i, a] of Object.entries(e.l10n ?? {})) {
1067
1067
  let e = t.l10n?.[i] ?? {}, o = [.../* @__PURE__ */ new Set([...Object.keys(a.text ?? {}).filter((t) => !Object.hasOwn(e.text ?? {}, t)), ...Object.keys(a.set ?? {}).filter((t) => !Object.hasOwn(e.set ?? {}, t))])];
1068
1068
  if (!o.length) continue;
1069
- let s = R(a, e, o, !1);
1069
+ let s = z(a, e, o, !1);
1070
1070
  r.push(n === void 0 ? {
1071
1071
  op: "updateSettingsLocale",
1072
1072
  locale: i,
@@ -1081,15 +1081,15 @@ function Rt(e, t) {
1081
1081
  };
1082
1082
  if (t.op === "updateSettings") i(e.settings, n.settings);
1083
1083
  else {
1084
- let t = new Map(z(n.blocks).map((e) => [e.id, e]));
1085
- for (let n of z(e.blocks)) {
1084
+ let t = new Map(B(n.blocks).map((e) => [e.id, e]));
1085
+ for (let n of B(e.blocks)) {
1086
1086
  let e = t.get(n.id);
1087
1087
  e && i(n, e, n.id);
1088
1088
  }
1089
1089
  }
1090
1090
  return r;
1091
1091
  }
1092
- function zt(e, t, n) {
1092
+ function Rt(e, t, n) {
1093
1093
  switch (t.op) {
1094
1094
  case "addBlock": return {
1095
1095
  op: "deleteBlock",
@@ -1097,7 +1097,7 @@ function zt(e, t, n) {
1097
1097
  expect: { block: m(t.block) }
1098
1098
  };
1099
1099
  case "deleteBlock": {
1100
- let r = Ft(e, t.blockId, n);
1100
+ let r = Pt(e, t.blockId, n);
1101
1101
  return {
1102
1102
  op: "addBlock",
1103
1103
  block: m(r.block),
@@ -1106,7 +1106,7 @@ function zt(e, t, n) {
1106
1106
  };
1107
1107
  }
1108
1108
  case "moveBlock": {
1109
- let r = Ft(e, t.blockId, n);
1109
+ let r = Pt(e, t.blockId, n);
1110
1110
  return {
1111
1111
  op: "moveBlock",
1112
1112
  blockId: t.blockId,
@@ -1119,23 +1119,23 @@ function zt(e, t, n) {
1119
1119
  };
1120
1120
  }
1121
1121
  case "updateBlock": {
1122
- let r = Ft(e, t.blockId, n).block, { set: i, unset: a, expect: o } = It(r, t.set, t.unset);
1122
+ let r = Pt(e, t.blockId, n).block, { set: i, unset: a, expect: o } = Ft(r, t.set, t.unset);
1123
1123
  return [{
1124
1124
  op: "updateBlock",
1125
1125
  blockId: t.blockId,
1126
1126
  ...Object.keys(i).length > 0 ? { set: i } : {},
1127
1127
  ...a.length > 0 ? { unset: a } : {},
1128
1128
  expect: o
1129
- }, ...Rt(e, t)];
1129
+ }, ...Lt(e, t)];
1130
1130
  }
1131
1131
  case "updateSettings": {
1132
- let { set: n, unset: r, expect: i } = It(e.settings, t.set, t.unset);
1132
+ let { set: n, unset: r, expect: i } = Ft(e.settings, t.set, t.unset);
1133
1133
  return [{
1134
1134
  op: "updateSettings",
1135
1135
  ...Object.keys(n).length > 0 ? { set: n } : {},
1136
1136
  ...r.length > 0 ? { unset: r } : {},
1137
1137
  expect: i
1138
- }, ...Rt(e, t)];
1138
+ }, ...Lt(e, t)];
1139
1139
  }
1140
1140
  case "addLocale": return {
1141
1141
  op: "removeLocale",
@@ -1148,18 +1148,18 @@ function zt(e, t, n) {
1148
1148
  locale: t.locale,
1149
1149
  position: e.settings.locales?.indexOf(t.locale)
1150
1150
  }];
1151
- for (let r of z(e.blocks)) {
1151
+ for (let r of B(e.blocks)) {
1152
1152
  let e = r.l10n?.[t.locale];
1153
1153
  e && n.push({
1154
1154
  op: "updateBlockLocale",
1155
1155
  blockId: r.id,
1156
1156
  locale: t.locale,
1157
- ...Lt(e)
1157
+ ...It(e)
1158
1158
  });
1159
1159
  }
1160
1160
  let r = e.settings.l10n?.[t.locale];
1161
1161
  if (r) {
1162
- let { hidden: e, ...i } = Lt(r);
1162
+ let { hidden: e, ...i } = It(r);
1163
1163
  n.push({
1164
1164
  op: "updateSettingsLocale",
1165
1165
  locale: t.locale,
@@ -1178,15 +1178,15 @@ function zt(e, t, n) {
1178
1178
  ...t.unset ?? []
1179
1179
  ])];
1180
1180
  if (t.op === "updateBlockLocale") {
1181
- let i = z(e.blocks).find((e) => e.id === t.blockId), a = z(n.blocks).find((e) => e.id === t.blockId);
1181
+ let i = B(e.blocks).find((e) => e.id === t.blockId), a = B(n.blocks).find((e) => e.id === t.blockId);
1182
1182
  return {
1183
1183
  op: "updateBlockLocale",
1184
1184
  blockId: t.blockId,
1185
1185
  locale: t.locale,
1186
- ...R(L(i, t.locale), L(a, t.locale), r, t.hidden !== void 0)
1186
+ ...z(R(i, t.locale), R(a, t.locale), r, t.hidden !== void 0)
1187
1187
  };
1188
1188
  }
1189
- let { hidden: i, ...a } = R(L(e.settings, t.locale), L(n.settings, t.locale), r, !1);
1189
+ let { hidden: i, ...a } = z(R(e.settings, t.locale), R(n.settings, t.locale), r, !1);
1190
1190
  return {
1191
1191
  op: "updateSettingsLocale",
1192
1192
  locale: t.locale,
@@ -1203,11 +1203,11 @@ function zt(e, t, n) {
1203
1203
  };
1204
1204
  }
1205
1205
  }
1206
- function Bt(e, t) {
1206
+ function zt(e, t) {
1207
1207
  let n = m(e), r = [];
1208
1208
  return t.forEach((e, t) => {
1209
1209
  try {
1210
- let i = zt(n, e, t);
1210
+ let i = Rt(n, e, t);
1211
1211
  r.push(...Array.isArray(i) ? [...i].reverse() : [i]), E(n, [e]);
1212
1212
  } catch (e) {
1213
1213
  throw e instanceof T ? new T(e.code, t, e.message, e.blockId) : e;
@@ -1215,77 +1215,77 @@ function Bt(e, t) {
1215
1215
  }), r.reverse();
1216
1216
  }
1217
1217
  // ../types/src/collaboration.ts
1218
- function Vt(e) {
1218
+ function Bt(e) {
1219
1219
  return e === "invalid_operation" ? 422 : e === "content_too_large" ? 413 : 409;
1220
1220
  }
1221
- var Ht = class extends ge {
1221
+ var Vt = class extends ge {
1222
1222
  opIndex;
1223
1223
  holder;
1224
1224
  holders;
1225
1225
  constructor(e, t) {
1226
- super(e, t.status ?? Vt(t.code), t.code), this.name = "CollaborationConflict", t.opIndex !== void 0 && (this.opIndex = t.opIndex), t.holder !== void 0 && (this.holder = t.holder), t.holders !== void 0 && (this.holders = t.holders);
1226
+ super(e, t.status ?? Bt(t.code), t.code), this.name = "CollaborationConflict", t.opIndex !== void 0 && (this.opIndex = t.opIndex), t.holder !== void 0 && (this.holder = t.holder), t.holders !== void 0 && (this.holders = t.holders);
1227
1227
  }
1228
1228
  };
1229
1229
  // ../types/src/guards.ts
1230
- function Ut(e) {
1230
+ function Ht(e) {
1231
1231
  return e.type === "section";
1232
1232
  }
1233
- function Wt(e) {
1233
+ function Ut(e) {
1234
1234
  return e.type === "title";
1235
1235
  }
1236
- function Gt(e) {
1236
+ function Wt(e) {
1237
1237
  return e.type === "paragraph";
1238
1238
  }
1239
- function Kt(e) {
1239
+ function Gt(e) {
1240
1240
  return e.type === "image";
1241
1241
  }
1242
- function qt(e) {
1242
+ function Kt(e) {
1243
1243
  return e.type === "button";
1244
1244
  }
1245
- function Jt(e) {
1245
+ function qt(e) {
1246
1246
  return e.type === "divider";
1247
1247
  }
1248
- function Yt(e) {
1248
+ function Jt(e) {
1249
1249
  return e.type === "video";
1250
1250
  }
1251
- function Xt(e) {
1251
+ function Yt(e) {
1252
1252
  return e.type === "social";
1253
1253
  }
1254
- function Zt(e) {
1254
+ function Xt(e) {
1255
1255
  return e.type === "spacer";
1256
1256
  }
1257
- function Qt(e) {
1257
+ function Zt(e) {
1258
1258
  return e.type === "html";
1259
1259
  }
1260
- function $t(e) {
1260
+ function Qt(e) {
1261
1261
  return e.type === "menu";
1262
1262
  }
1263
- function en(e) {
1263
+ function $t(e) {
1264
1264
  return e.type === "table";
1265
1265
  }
1266
- function tn(e) {
1266
+ function en(e) {
1267
1267
  return e.type === "countdown";
1268
1268
  }
1269
- function nn(e) {
1269
+ function tn(e) {
1270
1270
  return e.type === "custom";
1271
1271
  }
1272
- function B(e) {
1272
+ function V(e) {
1273
1273
  return e.type === "slot";
1274
1274
  }
1275
- function V(e) {
1275
+ function H(e) {
1276
1276
  return e.type === "wrapper";
1277
1277
  }
1278
1278
  // ../types/src/defaults.ts
1279
- var rn = {
1279
+ var nn = {
1280
1280
  content: "<p>Enter your title</p>",
1281
1281
  level: 2,
1282
1282
  textAlign: "left"
1283
- }, an = { content: "<p>Enter your text here</p>" }, on = {
1283
+ }, rn = { content: "<p>Enter your text here</p>" }, an = {
1284
1284
  src: "",
1285
1285
  alt: "",
1286
1286
  width: "full",
1287
1287
  align: "center"
1288
- }, sn = {
1288
+ }, on = {
1289
1289
  text: "Click Here",
1290
1290
  url: "",
1291
1291
  backgroundColor: "#333333",
@@ -1299,36 +1299,36 @@ var rn = {
1299
1299
  left: 24
1300
1300
  },
1301
1301
  align: "center"
1302
- }, cn = {
1302
+ }, sn = {
1303
1303
  lineStyle: "solid",
1304
1304
  color: "#e0e0e0",
1305
1305
  thickness: 1,
1306
1306
  width: "full"
1307
- }, ln = { columns: "1" }, un = {
1307
+ }, cn = { columns: "1" }, ln = {
1308
1308
  url: "",
1309
1309
  thumbnailUrl: "",
1310
1310
  alt: "Video",
1311
1311
  width: "full",
1312
1312
  align: "center"
1313
- }, dn = {
1313
+ }, un = {
1314
1314
  iconStyle: "solid",
1315
1315
  iconSize: "medium",
1316
1316
  spacing: 10,
1317
1317
  align: "center"
1318
- }, fn = { height: 24 }, pn = { content: "" }, mn = {
1318
+ }, dn = { height: 24 }, fn = { content: "" }, pn = {
1319
1319
  fontSize: 15,
1320
1320
  textAlign: "center",
1321
1321
  separator: "|",
1322
1322
  separatorColor: "#e0e0e0",
1323
1323
  spacing: 10
1324
- }, hn = {
1324
+ }, mn = {
1325
1325
  hasHeaderRow: !0,
1326
1326
  borderColor: "#e0e0e0",
1327
1327
  borderWidth: 1,
1328
1328
  cellPadding: 8,
1329
1329
  fontSize: 15,
1330
1330
  textAlign: "left"
1331
- }, gn = {
1331
+ }, hn = {
1332
1332
  targetDate: "",
1333
1333
  timezone: "UTC",
1334
1334
  showDays: !0,
@@ -1348,21 +1348,21 @@ var rn = {
1348
1348
  expiredMessage: "This offer has expired",
1349
1349
  expiredImageUrl: "",
1350
1350
  hideOnExpiry: !1
1351
+ }, gn = {
1352
+ title: nn,
1353
+ paragraph: rn,
1354
+ image: an,
1355
+ button: on,
1356
+ divider: sn,
1357
+ section: cn,
1358
+ video: ln,
1359
+ social: un,
1360
+ spacer: dn,
1361
+ html: fn,
1362
+ menu: pn,
1363
+ table: mn,
1364
+ countdown: hn
1351
1365
  }, _n = {
1352
- title: rn,
1353
- paragraph: an,
1354
- image: on,
1355
- button: sn,
1356
- divider: cn,
1357
- section: ln,
1358
- video: un,
1359
- social: dn,
1360
- spacer: fn,
1361
- html: pn,
1362
- menu: mn,
1363
- table: hn,
1364
- countdown: gn
1365
- }, vn = {
1366
1366
  width: 600,
1367
1367
  backgroundColor: "#ffffff",
1368
1368
  textColor: "#1a1a1a",
@@ -1370,30 +1370,30 @@ var rn = {
1370
1370
  fontFamily: "Arial",
1371
1371
  locale: "en"
1372
1372
  };
1373
- function yn(e) {
1373
+ function vn(e) {
1374
1374
  return typeof e == "object" && !!e && !Array.isArray(e) && Object.getPrototypeOf(e) === Object.prototype;
1375
1375
  }
1376
- function bn(e, t) {
1376
+ function yn(e, t) {
1377
1377
  let n = { ...e };
1378
1378
  for (let r of Object.keys(t)) {
1379
1379
  let i = e[r], a = t[r];
1380
- a !== void 0 && (n[r] = yn(i) && yn(a) ? bn(i, a) : a);
1380
+ a !== void 0 && (n[r] = vn(i) && vn(a) ? yn(i, a) : a);
1381
1381
  }
1382
1382
  return n;
1383
1383
  }
1384
1384
  // ../types/src/template.ts
1385
- function xn(e = "Arial", t) {
1385
+ function bn(e = "Arial", t) {
1386
1386
  return {
1387
1387
  blocks: [],
1388
1388
  settings: {
1389
- ...vn,
1389
+ ..._n,
1390
1390
  fontFamily: e,
1391
1391
  ...t
1392
1392
  }
1393
1393
  };
1394
1394
  }
1395
1395
  // ../types/src/direction.ts
1396
- var Sn = [
1396
+ var xn = [
1397
1397
  "ar",
1398
1398
  "he",
1399
1399
  "iw",
@@ -1407,24 +1407,24 @@ var Sn = [
1407
1407
  "ckb",
1408
1408
  "ks"
1409
1409
  ];
1410
- function Cn(e) {
1410
+ function Sn(e) {
1411
1411
  let t = e?.trim().replace(/_/g, "-").split("-")[0]?.toLowerCase();
1412
- return !!t && Sn.includes(t);
1412
+ return !!t && xn.includes(t);
1413
1413
  }
1414
- function wn(e) {
1415
- return e.direction === "ltr" || e.direction === "rtl" ? e.direction : Cn(e.locale) ? "rtl" : "ltr";
1414
+ function Cn(e) {
1415
+ return e.direction === "ltr" || e.direction === "rtl" ? e.direction : Sn(e.locale) ? "rtl" : "ltr";
1416
1416
  }
1417
1417
  // ../types/src/translation.ts
1418
- var Tn = 2e4, En = /* @__PURE__ */ new Set(["\"", "'"]);
1419
- function Dn(e, t) {
1418
+ var wn = 2e4, Tn = /* @__PURE__ */ new Set(["\"", "'"]);
1419
+ function En(e, t) {
1420
1420
  let n = null, r = "tag";
1421
1421
  for (let i = t; i < e.length; i++) {
1422
1422
  let t = e[i];
1423
1423
  if (n !== null) t === n && (n = null);
1424
1424
  else {
1425
1425
  if (r === "beforeValue") {
1426
- if (H(t)) continue;
1427
- if (En.has(t)) {
1426
+ if (U(t)) continue;
1427
+ if (Tn.has(t)) {
1428
1428
  n = t, r = "tag";
1429
1429
  continue;
1430
1430
  }
@@ -1432,19 +1432,19 @@ function Dn(e, t) {
1432
1432
  }
1433
1433
  if (r === "unquotedValue") {
1434
1434
  if (t === ">") return i;
1435
- H(t) && (r = "tag");
1435
+ U(t) && (r = "tag");
1436
1436
  } else if (t === "=") r = "beforeValue";
1437
1437
  else if (t === ">") return i;
1438
1438
  }
1439
1439
  }
1440
1440
  return -1;
1441
1441
  }
1442
- function On(e, t) {
1442
+ function Dn(e, t) {
1443
1443
  let n = null;
1444
1444
  for (let r = t; r < e.length; r++) {
1445
1445
  let t = e[r];
1446
1446
  if (n !== null) t === n && (n = null);
1447
- else if (En.has(t)) n = t;
1447
+ else if (Tn.has(t)) n = t;
1448
1448
  else if (t === ">") return {
1449
1449
  end: r,
1450
1450
  nextSpan: -1
@@ -1459,13 +1459,13 @@ function On(e, t) {
1459
1459
  nextSpan: -1
1460
1460
  };
1461
1461
  }
1462
- function kn(e) {
1462
+ function On(e) {
1463
1463
  return e !== " " && e !== " " && e !== "\n" && e !== "\r" && e !== "\f" && e !== "=" && e !== ">" && e !== "/";
1464
1464
  }
1465
- function H(e) {
1465
+ function U(e) {
1466
1466
  return e === " " || e === " " || e === "\n" || e === "\r" || e === "\f";
1467
1467
  }
1468
- var An = {
1468
+ var kn = {
1469
1469
  AMP: "&",
1470
1470
  COPY: "©",
1471
1471
  GT: ">",
@@ -1726,54 +1726,54 @@ var An = {
1726
1726
  zwj: "‍",
1727
1727
  zwnj: "‌"
1728
1728
  };
1729
- function U(e) {
1729
+ function W(e) {
1730
1730
  return e.includes("&") ? e.replace(/&(#[0-9]+|#[xX][0-9a-fA-F]+|[a-zA-Z][a-zA-Z0-9]*);/g, (e, t) => {
1731
1731
  if (t[0] === "#") {
1732
1732
  let n = t[1] === "x" || t[1] === "X" ? Number.parseInt(t.slice(2), 16) : Number.parseInt(t.slice(1), 10);
1733
1733
  return !Number.isFinite(n) || n < 1 || n > 1114111 || n >= 55296 && n <= 57343 ? e : String.fromCodePoint(n);
1734
1734
  }
1735
- return Object.hasOwn(An, t) ? An[t] : e;
1735
+ return Object.hasOwn(kn, t) ? kn[t] : e;
1736
1736
  }) : e;
1737
1737
  }
1738
- function jn(e, t) {
1738
+ function An(e, t) {
1739
1739
  let n = t.toLowerCase(), r = 0;
1740
1740
  for (; r < e.length;) {
1741
- for (; r < e.length && (H(e[r]) || e[r] === "/");) r++;
1741
+ for (; r < e.length && (U(e[r]) || e[r] === "/");) r++;
1742
1742
  if (r >= e.length) break;
1743
1743
  let t = r;
1744
- for (; r < e.length && kn(e[r]);) r++;
1744
+ for (; r < e.length && On(e[r]);) r++;
1745
1745
  let i = e.substring(t, r).toLowerCase();
1746
1746
  if (i === "") {
1747
1747
  r++;
1748
1748
  continue;
1749
1749
  }
1750
- for (; r < e.length && H(e[r]);) r++;
1750
+ for (; r < e.length && U(e[r]);) r++;
1751
1751
  if (e[r] !== "=") continue;
1752
- for (r++; r < e.length && H(e[r]);) r++;
1752
+ for (r++; r < e.length && U(e[r]);) r++;
1753
1753
  let a = e[r];
1754
- if (En.has(a)) {
1754
+ if (Tn.has(a)) {
1755
1755
  let t = r + 1, o = e.indexOf(a, t);
1756
1756
  if (o === -1) return null;
1757
- if (i === n) return U(e.substring(t, o));
1757
+ if (i === n) return W(e.substring(t, o));
1758
1758
  r = o + 1;
1759
1759
  continue;
1760
1760
  }
1761
1761
  let o = r;
1762
- for (; r < e.length && !H(e[r]) && e[r] !== ">";) r++;
1763
- if (i === n) return U(e.substring(o, r));
1762
+ for (; r < e.length && !U(e[r]) && e[r] !== ">";) r++;
1763
+ if (i === n) return W(e.substring(o, r));
1764
1764
  }
1765
1765
  return null;
1766
1766
  }
1767
1767
  // ../types/src/merge-tag-html.ts
1768
- function Mn(e) {
1769
- return Fn(e, (e) => e, !1);
1768
+ function jn(e) {
1769
+ return Pn(e, (e) => e, !1);
1770
1770
  }
1771
- function Nn(e, t) {
1772
- return Fn(e, t, !0);
1771
+ function Mn(e, t) {
1772
+ return Pn(e, t, !0);
1773
1773
  }
1774
- function Pn(e) {
1774
+ function Nn(e) {
1775
1775
  let t = [];
1776
- return Fn(e, (n, r, i) => {
1776
+ return Pn(e, (n, r, i) => {
1777
1777
  let a = e.slice(r, i);
1778
1778
  return t.push({
1779
1779
  start: r,
@@ -1782,7 +1782,7 @@ function Pn(e) {
1782
1782
  }), a;
1783
1783
  }, !0), t;
1784
1784
  }
1785
- function Fn(e, t, n) {
1785
+ function Pn(e, t, n) {
1786
1786
  let r = "", i = 0;
1787
1787
  for (; i < e.length;) {
1788
1788
  let a = e.indexOf("<span", i);
@@ -1795,7 +1795,7 @@ function Fn(e, t, n) {
1795
1795
  r += e.substring(i, a + 5), i = a + 5;
1796
1796
  continue;
1797
1797
  }
1798
- let { end: s, nextSpan: c } = On(e, a + 5);
1798
+ let { end: s, nextSpan: c } = Dn(e, a + 5);
1799
1799
  if (c !== -1) {
1800
1800
  r += e.substring(i, c), i = c;
1801
1801
  continue;
@@ -1804,12 +1804,12 @@ function Fn(e, t, n) {
1804
1804
  r += e.substring(i);
1805
1805
  break;
1806
1806
  }
1807
- let l = e.substring(a + 5, s), u = Ln(l, "data-merge-tag") ?? Ln(l, "data-logic-merge-tag");
1807
+ let l = e.substring(a + 5, s), u = In(l, "data-merge-tag") ?? In(l, "data-logic-merge-tag");
1808
1808
  if (u === null) {
1809
1809
  r += e.substring(i, s + 1), i = s + 1;
1810
1810
  continue;
1811
1811
  }
1812
- let d = In(e, s + 1, n);
1812
+ let d = Fn(e, s + 1, n);
1813
1813
  if (d === -1) {
1814
1814
  r += e.substring(i);
1815
1815
  break;
@@ -1818,7 +1818,7 @@ function Fn(e, t, n) {
1818
1818
  }
1819
1819
  return r;
1820
1820
  }
1821
- function In(e, t, n) {
1821
+ function Fn(e, t, n) {
1822
1822
  if (!n) {
1823
1823
  let n = e.indexOf("</span>", t);
1824
1824
  return n === -1 ? -1 : n + 7;
@@ -1827,7 +1827,7 @@ function In(e, t, n) {
1827
1827
  for (; i < e.length;) {
1828
1828
  let t = e.indexOf("<", i);
1829
1829
  if (t === -1) return -1;
1830
- let n = Dn(e, t + 1);
1830
+ let n = En(e, t + 1);
1831
1831
  if (n === -1) return -1;
1832
1832
  let a = e.startsWith("</span", t), o = e.startsWith("<span", t), s = e[t + (a ? 6 : 5)];
1833
1833
  if ((o || a) && (s === ">" || s === "/" || /\s/.test(s)) && (r += a ? -1 : 1, r === 0)) return n + 1;
@@ -1835,11 +1835,11 @@ function In(e, t, n) {
1835
1835
  }
1836
1836
  return -1;
1837
1837
  }
1838
- function Ln(e, t) {
1839
- return jn(e, t);
1838
+ function In(e, t) {
1839
+ return An(e, t);
1840
1840
  }
1841
1841
  // ../types/src/merge-tags.ts
1842
- var W = {
1842
+ var G = {
1843
1843
  liquid: {
1844
1844
  value: /\{\{.+?\}\}/g,
1845
1845
  logic: /\{%-?\s*(\w+).*?-?%\}/g,
@@ -1865,13 +1865,13 @@ var W = {
1865
1865
  closer: "=%%"
1866
1866
  }
1867
1867
  };
1868
- function G(e) {
1869
- return Object.keys(W).find((t) => {
1870
- let n = W[t];
1868
+ function K(e) {
1869
+ return Object.keys(G).find((t) => {
1870
+ let n = G[t];
1871
1871
  return (e.value === n.value || e.value.source === n.value.source && e.value.flags.replace(/[gy]/g, "") === n.value.flags.replace(/[gy]/g, "")) && (e.logic === n.logic || e.logic.source === n.logic.source && e.logic.flags.replace(/[gy]/g, "") === n.logic.flags.replace(/[gy]/g, ""));
1872
1872
  });
1873
1873
  }
1874
- function Rn(e, t, n) {
1874
+ function Ln(e, t, n) {
1875
1875
  for (let r = n; r < e.length; r++) {
1876
1876
  let n = e.charCodeAt(r);
1877
1877
  if (n === 10 || n === 13 || n === 8232 || n === 8233) return {
@@ -1888,8 +1888,8 @@ function Rn(e, t, n) {
1888
1888
  lineBreak: -1
1889
1889
  };
1890
1890
  }
1891
- function K(e, t, n, r = 0, i = Infinity) {
1892
- let a = G(t);
1891
+ function q(e, t, n, r = 0, i = Infinity) {
1892
+ let a = K(t);
1893
1893
  if (!a) {
1894
1894
  let a = t[n], o = new RegExp(a.source, a.flags.replace(/[gy]/g, "") + "g");
1895
1895
  return o.lastIndex = r, [...e.matchAll(o)].slice(0, i).map((e) => ({
@@ -1913,7 +1913,7 @@ function K(e, t, n, r = 0, i = Infinity) {
1913
1913
  let r = u?.lastIndex ?? t + s.length, i = a === "mailchimp" && n === "value" ? {
1914
1914
  close: e.startsWith(c, r) ? r : -1,
1915
1915
  lineBreak: -1
1916
- } : Rn(e, c, Math.max(r, t + s.length + +(n === "value")));
1916
+ } : Ln(e, c, Math.max(r, t + s.length + +(n === "value")));
1917
1917
  if (i.lineBreak >= 0) {
1918
1918
  let r = i.lineBreak, o = n === "logic" && (a === "liquid" || a === "ampscript") ? e.lastIndexOf(s, r) : -1;
1919
1919
  p = o > t ? o : r + 1;
@@ -1935,8 +1935,8 @@ function K(e, t, n, r = 0, i = Infinity) {
1935
1935
  }
1936
1936
  return f;
1937
1937
  }
1938
- function zn(e, t) {
1939
- let n = G(t);
1938
+ function Rn(e, t) {
1939
+ let n = K(t);
1940
1940
  if (!n) {
1941
1941
  let n = RegExp(`(${t.value.source}|${t.logic.source})`, "g");
1942
1942
  return [...e.matchAll(n)].map((e) => ({
@@ -1944,7 +1944,7 @@ function zn(e, t) {
1944
1944
  value: e[0]
1945
1945
  }));
1946
1946
  }
1947
- if (n === "handlebars") return K(e, t, "value");
1947
+ if (n === "handlebars") return q(e, t, "value");
1948
1948
  if (n === "mailchimp") {
1949
1949
  let n = [], r = new RegExp(t.value.source, "y"), i = new RegExp(t.logic.source, "y"), a = /\*\|\w+[:|]/y, o = 0;
1950
1950
  for (; o < e.length;) {
@@ -1963,7 +1963,7 @@ function zn(e, t) {
1963
1963
  o = t + 2;
1964
1964
  continue;
1965
1965
  }
1966
- let c = Rn(e, "|*", a.lastIndex);
1966
+ let c = Ln(e, "|*", a.lastIndex);
1967
1967
  if (c.lineBreak >= 0) {
1968
1968
  o = c.lineBreak + 1;
1969
1969
  continue;
@@ -1978,78 +1978,78 @@ function zn(e, t) {
1978
1978
  }
1979
1979
  return n;
1980
1980
  }
1981
- let r = [], i = 0, a = K(e, t, "value", i, 1)[0], o = K(e, t, "logic", i, 1)[0];
1981
+ let r = [], i = 0, a = q(e, t, "value", i, 1)[0], o = q(e, t, "logic", i, 1)[0];
1982
1982
  for (; a || o;) {
1983
1983
  let n = !o || a && a.index <= o.index ? a : o;
1984
- r.push(n), i = n.index + n.value.length, (n === a || a && a.index < i) && (a = K(e, t, "value", i, 1)[0]), (n === o || o && o.index < i) && (o = K(e, t, "logic", i, 1)[0]);
1984
+ r.push(n), i = n.index + n.value.length, (n === a || a && a.index < i) && (a = q(e, t, "value", i, 1)[0]), (n === o || o && o.index < i) && (o = q(e, t, "logic", i, 1)[0]);
1985
1985
  }
1986
1986
  return r;
1987
1987
  }
1988
- function Bn(e) {
1988
+ function zn(e) {
1989
1989
  return typeof e == "string" && e.trim() !== "" ? e : null;
1990
1990
  }
1991
+ function Bn(e) {
1992
+ return Object.values(G).find((t) => t.value.source === e.value.source) ?? null;
1993
+ }
1991
1994
  function Vn(e) {
1992
- return Object.values(W).find((t) => t.value.source === e.value.source) ?? null;
1995
+ return zn(e.opener) ?? Bn(e)?.opener ?? null;
1993
1996
  }
1994
1997
  function Hn(e) {
1995
- return Bn(e.opener) ?? Vn(e)?.opener ?? null;
1998
+ return zn(e.closer) ?? Bn(e)?.closer ?? null;
1996
1999
  }
1997
2000
  function Un(e) {
1998
- return Bn(e.closer) ?? Vn(e)?.closer ?? null;
2001
+ return e ? typeof e == "string" ? G[e] ?? G.liquid : e : G.liquid;
1999
2002
  }
2000
2003
  function Wn(e) {
2001
- return e ? typeof e == "string" ? W[e] ?? W.liquid : e : W.liquid;
2002
- }
2003
- function Gn(e) {
2004
2004
  let t = e.source, n = e.flags.replace("g", "");
2005
2005
  return RegExp(`^${t}$`, n);
2006
2006
  }
2007
- function Kn(e, t) {
2007
+ function Gn(e, t) {
2008
2008
  let n = e?.trim() || "";
2009
- return !Gn(t.logic).test(n) && Gn(t.value).test(n);
2009
+ return !Wn(t.logic).test(n) && Wn(t.value).test(n);
2010
2010
  }
2011
- function qn(e, t) {
2011
+ function Kn(e, t) {
2012
2012
  let n = t.find((t) => t.value === e);
2013
2013
  return n ? n.label : e;
2014
2014
  }
2015
- function Jn(e, t) {
2016
- return ir(e, "data-merge-tag", (e) => qn(e, t));
2015
+ function qn(e, t) {
2016
+ return rr(e, "data-merge-tag", (e) => Kn(e, t));
2017
2017
  }
2018
- function Yn(e, t) {
2018
+ function Jn(e, t) {
2019
2019
  return t.find((t) => t.value === e)?.sample;
2020
2020
  }
2021
- function Xn(e, t) {
2022
- return ir(e, "data-merge-tag", (e) => $n(Yn(e, t) ?? qn(e, t)), { unwrap: (e) => Yn(e, t) !== void 0 });
2021
+ function Yn(e, t) {
2022
+ return rr(e, "data-merge-tag", (e) => Qn(Jn(e, t) ?? Kn(e, t)), { unwrap: (e) => Jn(e, t) !== void 0 });
2023
2023
  }
2024
- function Zn(e) {
2024
+ function Xn(e) {
2025
2025
  return e.some((e) => e.sample !== void 0);
2026
2026
  }
2027
- function Qn(e, t) {
2027
+ function Zn(e, t) {
2028
2028
  if (!e) return e;
2029
2029
  let n = e;
2030
2030
  for (let e of t) e.sample !== void 0 && (n = n.split(e.value).join(e.sample));
2031
2031
  return n;
2032
2032
  }
2033
- function $n(e) {
2033
+ function Qn(e) {
2034
2034
  return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
2035
2035
  }
2036
- function er(e, t) {
2036
+ function $n(e, t) {
2037
2037
  if (!e) return !1;
2038
- if (G(t)) return K(e, t, "value", 0, 1).length > 0 || K(e, t, "logic", 0, 1).length > 0;
2038
+ if (K(t)) return q(e, t, "value", 0, 1).length > 0 || q(e, t, "logic", 0, 1).length > 0;
2039
2039
  let n = new RegExp(t.value.source, t.value.flags), r = new RegExp(t.logic.source, t.logic.flags);
2040
2040
  return n.test(e) || r.test(e);
2041
2041
  }
2042
- function tr(e, t) {
2043
- return Gn(t.logic).test(e?.trim() || "");
2042
+ function er(e, t) {
2043
+ return Wn(t.logic).test(e?.trim() || "");
2044
2044
  }
2045
- function nr(e, t) {
2045
+ function tr(e, t) {
2046
2046
  let n = new RegExp(t.logic.source, t.logic.flags.replace("g", "")), r = e.match(n);
2047
2047
  return r && r[1] ? r[1].toUpperCase() : e;
2048
2048
  }
2049
- function rr(e, t) {
2050
- return ir(e, "data-logic-merge-tag", (e) => nr(e, t));
2049
+ function nr(e, t) {
2050
+ return rr(e, "data-logic-merge-tag", (e) => tr(e, t));
2051
2051
  }
2052
- function ir(e, t, n, r) {
2052
+ function rr(e, t, n, r) {
2053
2053
  let i = "", a = 0;
2054
2054
  for (; a < e.length;) {
2055
2055
  let o = e.indexOf("<span", a);
@@ -2062,7 +2062,7 @@ function ir(e, t, n, r) {
2062
2062
  i += e.substring(a, o + 5), a = o + 5;
2063
2063
  continue;
2064
2064
  }
2065
- let { end: c, nextSpan: l } = On(e, o + 5);
2065
+ let { end: c, nextSpan: l } = Dn(e, o + 5);
2066
2066
  if (l !== -1) {
2067
2067
  i += e.substring(a, l), a = l;
2068
2068
  continue;
@@ -2071,7 +2071,7 @@ function ir(e, t, n, r) {
2071
2071
  i += e.substring(a);
2072
2072
  break;
2073
2073
  }
2074
- let u = jn(e.substring(o + 5, c), t);
2074
+ let u = An(e.substring(o + 5, c), t);
2075
2075
  if (u === null) {
2076
2076
  i += e.substring(a, c + 1), a = c + 1;
2077
2077
  continue;
@@ -2087,14 +2087,14 @@ function ir(e, t, n, r) {
2087
2087
  return i;
2088
2088
  }
2089
2089
  // ../types/src/locale-strings.ts
2090
- var ar = {
2090
+ var ir = {
2091
2091
  title: ["content"],
2092
2092
  paragraph: ["content"]
2093
2093
  };
2094
- function or(e) {
2094
+ function ar(e) {
2095
2095
  let t = [], n = /<[a-z][\w:-]*\b/gi;
2096
2096
  for (; n.exec(e);) {
2097
- let r = Dn(e, n.lastIndex);
2097
+ let r = En(e, n.lastIndex);
2098
2098
  if (r < 0) break;
2099
2099
  let i = n.lastIndex, a = e.slice(i, r), o = /[^\s"'<>/=]+\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'=<>`]+))/g;
2100
2100
  for (let e; e = o.exec(a);) {
@@ -2108,12 +2108,12 @@ function or(e) {
2108
2108
  }
2109
2109
  return t;
2110
2110
  }
2111
- function sr(e, t, n) {
2112
- let r = n === "html" ? Pn(e) : [], i = n === "html" ? or(e) : [], a = r.map((e) => ({
2111
+ function or(e, t, n) {
2112
+ let r = n === "html" ? Nn(e) : [], i = n === "html" ? ar(e) : [], a = r.map((e) => ({
2113
2113
  ...e,
2114
2114
  attribute: !1
2115
- })), o = 0, s = G(t) !== void 0, c = (n, r) => {
2116
- let c = e.slice(n, r), l = ["logic", "value"], u = s ? l.map((e) => K(c, t, e, 0, 1)[0]) : [void 0, void 0], d = s ? null : [t.logic, t.value].map((e) => new RegExp(e.source, e.flags.replace(/[gy]/g, "") + "g")), f = 0;
2115
+ })), o = 0, s = K(t) !== void 0, c = (n, r) => {
2116
+ let c = e.slice(n, r), l = ["logic", "value"], u = s ? l.map((e) => q(c, t, e, 0, 1)[0]) : [void 0, void 0], d = s ? null : [t.logic, t.value].map((e) => new RegExp(e.source, e.flags.replace(/[gy]/g, "") + "g")), f = 0;
2117
2117
  for (; f < c.length;) {
2118
2118
  let e = s ? u.flatMap((e) => e ? [e] : []) : d.flatMap((e, t) => {
2119
2119
  let n = u[t];
@@ -2138,20 +2138,20 @@ function sr(e, t, n) {
2138
2138
  end: ee,
2139
2139
  markup: r.value,
2140
2140
  attribute: i[o] !== void 0 && p >= i[o].start && ee <= i[o].end
2141
- }), f = r.index + r.value.length, s) for (let e = 0; e < l.length; e++) u[e] && u[e].index < f && (u[e] = K(c, t, l[e], f, 1)[0]);
2141
+ }), f = r.index + r.value.length, s) for (let e = 0; e < l.length; e++) u[e] && u[e].index < f && (u[e] = q(c, t, l[e], f, 1)[0]);
2142
2142
  }
2143
2143
  }, l = 0;
2144
2144
  for (let e of r) c(l, e.start), l = e.end;
2145
2145
  return c(l, e.length), a.sort((e, t) => e.start - t.start);
2146
2146
  }
2147
- function cr(e) {
2147
+ function sr(e) {
2148
2148
  if (!e.includes("&")) return { text: e };
2149
2149
  let t = "", n = [0], r = 0, i = (i) => {
2150
2150
  for (t += e.slice(r, i); r < i;) n.push(++r);
2151
2151
  };
2152
2152
  for (let a of e.matchAll(/&(?:#[0-9]+|#[xX][0-9a-fA-F]+|[a-zA-Z][a-zA-Z0-9]*);/g)) {
2153
2153
  i(a.index);
2154
- let e = U(a[0]);
2154
+ let e = W(a[0]);
2155
2155
  t += e;
2156
2156
  for (let t = 1; t < e.length; t++) n.push(-1);
2157
2157
  r = a.index + a[0].length, n.push(r);
@@ -2161,17 +2161,17 @@ function cr(e) {
2161
2161
  offsets: n
2162
2162
  };
2163
2163
  }
2164
- var q = /* @__PURE__ */ new Map(), lr = 32;
2165
- function ur(e) {
2166
- let t = JSON.stringify(e), n = q.get(t);
2164
+ var J = /* @__PURE__ */ new Map(), cr = 32;
2165
+ function lr(e) {
2166
+ let t = JSON.stringify(e), n = J.get(t);
2167
2167
  if (n === void 0) {
2168
2168
  let r = e.map((e) => e.trim()).filter(Boolean).sort((e, t) => t.length - e.length).map((e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"));
2169
- n = r.length ? RegExp(`(?<![\\p{L}\\p{N}_])(?:${r.join("|")})(?![\\p{L}\\p{N}_])`, "gu") : null, q.size >= lr && q.delete(q.keys().next().value), q.set(t, n);
2169
+ n = r.length ? RegExp(`(?<![\\p{L}\\p{N}_])(?:${r.join("|")})(?![\\p{L}\\p{N}_])`, "gu") : null, J.size >= cr && J.delete(J.keys().next().value), J.set(t, n);
2170
2170
  }
2171
2171
  return n;
2172
2172
  }
2173
- function dr(e, t, n) {
2174
- let r = n.length ? ur(n) : null;
2173
+ function ur(e, t, n) {
2174
+ let r = n.length ? lr(n) : null;
2175
2175
  if (!r) return [];
2176
2176
  let i = [];
2177
2177
  if (t === "text") i.push({
@@ -2180,7 +2180,7 @@ function dr(e, t, n) {
2180
2180
  attribute: !1
2181
2181
  });
2182
2182
  else {
2183
- i.push(...or(e).map((e) => ({
2183
+ i.push(...ar(e).map((e) => ({
2184
2184
  ...e,
2185
2185
  attribute: !0
2186
2186
  })));
@@ -2191,7 +2191,7 @@ function dr(e, t, n) {
2191
2191
  end: r.index,
2192
2192
  attribute: !1
2193
2193
  });
2194
- let a = r[0] === "<!--" ? e.indexOf("-->", t.lastIndex) : Dn(e, t.lastIndex);
2194
+ let a = r[0] === "<!--" ? e.indexOf("-->", t.lastIndex) : En(e, t.lastIndex);
2195
2195
  if (a < 0) return [];
2196
2196
  n = a + (r[0] === "<!--" ? 3 : 1), t.lastIndex = n;
2197
2197
  }
@@ -2204,7 +2204,7 @@ function dr(e, t, n) {
2204
2204
  let a = [];
2205
2205
  for (let n of i) {
2206
2206
  r.lastIndex = 0;
2207
- let i = e.slice(n.start, n.end), o = t === "html" ? cr(i) : {
2207
+ let i = e.slice(n.start, n.end), o = t === "html" ? sr(i) : {
2208
2208
  text: i,
2209
2209
  offsets: void 0
2210
2210
  };
@@ -2223,40 +2223,40 @@ function dr(e, t, n) {
2223
2223
  }
2224
2224
  return a;
2225
2225
  }
2226
- function fr(e, t, n, r) {
2227
- let i = sr(e, t, n), a = dr(e, n, r?.doNotTranslate ?? []).filter((e) => !i.some((t) => e.start < t.end && e.end > t.start));
2226
+ function dr(e, t, n, r) {
2227
+ let i = or(e, t, n), a = ur(e, n, r?.doNotTranslate ?? []).filter((e) => !i.some((t) => e.start < t.end && e.end > t.start));
2228
2228
  return [...i, ...a].sort((e, t) => e.start - t.start);
2229
2229
  }
2230
- function pr(e, t, n) {
2230
+ function fr(e, t, n) {
2231
2231
  let r = "", i = 0;
2232
2232
  return t.forEach((t, a) => {
2233
2233
  r += e.slice(i, t.start), r += t.attribute ? `__x${n[a]}__` : `<x id="${n[a]}"/>`, i = t.end;
2234
2234
  }), r + e.slice(i);
2235
2235
  }
2236
- function mr(e, t, n, r) {
2237
- let i = fr(e, t, n, r);
2236
+ function pr(e, t, n, r) {
2237
+ let i = dr(e, t, n, r);
2238
2238
  return {
2239
- text: pr(e, i, i.map((e, t) => t + 1)),
2239
+ text: fr(e, i, i.map((e, t) => t + 1)),
2240
2240
  tokens: i.map((e) => e.markup)
2241
2241
  };
2242
2242
  }
2243
- function hr(e, t) {
2243
+ function mr(e, t) {
2244
2244
  let n = /* @__PURE__ */ new Set(), r = !0, i = e.replace(/<x id="(\d+)"\s*\/>|<x id="(\d+)"><\/x>|__x(\d+)__/g, (e, i, a, o) => {
2245
2245
  let s = Number(i ?? a ?? o);
2246
2246
  return (s < 1 || s > t.length || n.has(s)) && (r = !1), n.add(s), t[s - 1] ?? "";
2247
2247
  });
2248
2248
  return r && n.size === t.length ? i : null;
2249
2249
  }
2250
- function gr(e, t, n, r, i) {
2251
- let a = fr(e, n, r, i), o = /* @__PURE__ */ new Set(), s = (e) => {
2250
+ function hr(e, t, n, r, i) {
2251
+ let a = dr(e, n, r, i), o = /* @__PURE__ */ new Set(), s = (e) => {
2252
2252
  let n = t.findIndex((t, n) => !o.has(n) && e(t));
2253
2253
  return n >= 0 && o.add(n), n;
2254
2254
  }, c = a.map((e) => s((t) => t === e.markup));
2255
2255
  return a.forEach((e, t) => {
2256
- c[t] < 0 && e.term !== void 0 && r === "html" && (c[t] = s((t) => U(t) === e.term));
2257
- }), o.size !== t.length || a.some((e, t) => c[t] < 0 && e.term === void 0) ? null : pr(e, a.filter((e, t) => c[t] >= 0), c.filter((e) => e >= 0).map((e) => e + 1));
2256
+ c[t] < 0 && e.term !== void 0 && r === "html" && (c[t] = s((t) => W(t) === e.term));
2257
+ }), o.size !== t.length || a.some((e, t) => c[t] < 0 && e.term === void 0) ? null : fr(e, a.filter((e, t) => c[t] >= 0), c.filter((e) => e >= 0).map((e) => e + 1));
2258
2258
  }
2259
- function _r(e, t, n = []) {
2259
+ function gr(e, t, n = []) {
2260
2260
  let r = /* @__PURE__ */ new Map();
2261
2261
  if (t === w(e) || !e.settings.locales?.includes(t)) return r;
2262
2262
  let i = (e, n, i, a) => {
@@ -2267,7 +2267,7 @@ function _r(e, t, n = []) {
2267
2267
  target: e,
2268
2268
  path: t,
2269
2269
  source: i,
2270
- format: a && ar[a]?.includes(t) ? "html" : "text",
2270
+ format: a && ir[a]?.includes(t) ? "html" : "text",
2271
2271
  text: o?.text?.[t]
2272
2272
  });
2273
2273
  }
@@ -2276,22 +2276,22 @@ function _r(e, t, n = []) {
2276
2276
  if (r.type !== "html" && i({
2277
2277
  kind: "block",
2278
2278
  blockId: r.id
2279
- }, r, x(r, n), r.type), r.type === "section") for (let e of r.children) a(e);
2279
+ }, r, S(r, n), r.type), r.type === "section") for (let e of r.children) a(e);
2280
2280
  else r.type === "wrapper" && a(r.children);
2281
2281
  }
2282
2282
  };
2283
2283
  return a(e.blocks), i({ kind: "settings" }, e.settings, g), r;
2284
2284
  }
2285
- function vr(e, t, n) {
2285
+ function _r(e, t, n) {
2286
2286
  let r = n.only === "all" ? null : Pe(e, t, n.definitions), i = r && /* @__PURE__ */ new Set([...r.missing, ...r.stale]), a = [], o = {};
2287
- for (let [r, s] of _r(e, t, n.definitions)) {
2287
+ for (let [r, s] of gr(e, t, n.definitions)) {
2288
2288
  if (i && !i.has(r) || n.blockId !== void 0 && (s.target.kind !== "block" || s.target.blockId !== n.blockId)) continue;
2289
- let e = mr(s.source, n.syntax, s.format, n), t = s.text ? gr(s.text.value, e.tokens, n.syntax, s.format, n) : void 0;
2289
+ let e = pr(s.source, n.syntax, s.format, n), t = s.text ? hr(s.text.value, e.tokens, n.syntax, s.format, n) : void 0;
2290
2290
  a.push({
2291
2291
  id: r,
2292
2292
  format: s.format,
2293
2293
  source: e.text,
2294
- sourceHash: S(s.source),
2294
+ sourceHash: C(s.source),
2295
2295
  ...t == null ? {} : { text: t }
2296
2296
  }), o[r] = e.tokens;
2297
2297
  }
@@ -2300,8 +2300,8 @@ function vr(e, t, n) {
2300
2300
  tokens: o
2301
2301
  };
2302
2302
  }
2303
- function yr(e, t, n, r) {
2304
- let i = _r(e, t, r.definitions), a = /* @__PURE__ */ new Map(), o = (e) => {
2303
+ function vr(e, t, n, r) {
2304
+ let i = gr(e, t, r.definitions), a = /* @__PURE__ */ new Map(), o = (e) => {
2305
2305
  for (let t of e) if (a.set(t.id, t), t.type === "section") for (let e of t.children) o(e);
2306
2306
  else t.type === "wrapper" && o(t.children);
2307
2307
  };
@@ -2317,8 +2317,8 @@ function yr(e, t, n, r) {
2317
2317
  });
2318
2318
  continue;
2319
2319
  }
2320
- let o = Object.hasOwn(r.tokens, t.id) ? r.tokens[t.id] : void 0, u = o ? hr(t.text, o) : null;
2321
- if (!o || u === null || gr(u, o, r.syntax, n.format, r) === null) {
2320
+ let o = Object.hasOwn(r.tokens, t.id) ? r.tokens[t.id] : void 0, u = o ? mr(t.text, o) : null;
2321
+ if (!o || u === null || hr(u, o, r.syntax, n.format, r) === null) {
2322
2322
  l.push({
2323
2323
  id: t.id,
2324
2324
  reason: "tags_changed"
@@ -2348,26 +2348,29 @@ function yr(e, t, n, r) {
2348
2348
  };
2349
2349
  }
2350
2350
  // ../types/src/custom-block-liquid.ts
2351
- function br(e) {
2351
+ var yr = 1e7, br = 2e3;
2352
+ function xr(e) {
2352
2353
  return new e.Liquid({
2353
2354
  strictVariables: !1,
2354
2355
  strictFilters: !1,
2355
2356
  outputEscape: "escape",
2357
+ memoryLimit: yr,
2358
+ renderLimit: br,
2356
2359
  templates: {}
2357
2360
  });
2358
2361
  }
2359
2362
  // ../types/src/factory.ts
2360
- function J(e, t) {
2363
+ function Y(e, t) {
2361
2364
  let n = m(e);
2362
- return !t || Object.keys(t).length === 0 ? n : bn(n, t);
2365
+ return !t || Object.keys(t).length === 0 ? n : yn(n, t);
2363
2366
  }
2364
- function Y(e) {
2367
+ function X(e) {
2365
2368
  return e === void 0 ? void 0 : m(e);
2366
2369
  }
2367
- function X() {
2370
+ function Z() {
2368
2371
  return crypto.randomUUID();
2369
2372
  }
2370
- function xr(e = 0) {
2373
+ function Sr(e = 0) {
2371
2374
  return {
2372
2375
  top: e,
2373
2376
  right: e,
@@ -2375,135 +2378,135 @@ function xr(e = 0) {
2375
2378
  left: e
2376
2379
  };
2377
2380
  }
2378
- function Z(e = 10) {
2379
- return { padding: xr(e) };
2381
+ function Q(e = 10) {
2382
+ return { padding: Sr(e) };
2380
2383
  }
2381
- function Sr(e = {}) {
2382
- return J({
2383
- id: X(),
2384
+ function Cr(e = {}) {
2385
+ return Y({
2386
+ id: Z(),
2384
2387
  type: "title",
2385
- ...rn,
2386
- styles: Z()
2388
+ ...nn,
2389
+ styles: Q()
2387
2390
  }, e);
2388
2391
  }
2389
- function Cr(e = {}) {
2390
- return J({
2391
- id: X(),
2392
+ function wr(e = {}) {
2393
+ return Y({
2394
+ id: Z(),
2392
2395
  type: "paragraph",
2393
- ...an,
2394
- styles: Z()
2396
+ ...rn,
2397
+ styles: Q()
2395
2398
  }, e);
2396
2399
  }
2397
- function wr(e = {}) {
2398
- return J({
2399
- id: X(),
2400
+ function Tr(e = {}) {
2401
+ return Y({
2402
+ id: Z(),
2400
2403
  type: "image",
2401
- ...on,
2402
- styles: Z()
2404
+ ...an,
2405
+ styles: Q()
2403
2406
  }, e);
2404
2407
  }
2405
- function Tr(e = {}) {
2406
- return J({
2407
- id: X(),
2408
+ function Er(e = {}) {
2409
+ return Y({
2410
+ id: Z(),
2408
2411
  type: "button",
2409
- ...sn,
2410
- styles: Z()
2412
+ ...on,
2413
+ styles: Q()
2411
2414
  }, e);
2412
2415
  }
2413
- function Er(e = {}) {
2414
- return J({
2415
- id: X(),
2416
+ function Dr(e = {}) {
2417
+ return Y({
2418
+ id: Z(),
2416
2419
  type: "divider",
2417
- ...cn,
2418
- styles: Z(20)
2420
+ ...sn,
2421
+ styles: Q(20)
2419
2422
  }, e);
2420
2423
  }
2421
- function Dr(e = {}) {
2422
- return J({
2423
- id: X(),
2424
+ function Or(e = {}) {
2425
+ return Y({
2426
+ id: Z(),
2424
2427
  type: "section",
2425
- ...ln,
2428
+ ...cn,
2426
2429
  children: [[]],
2427
- styles: Z(20)
2430
+ styles: Q(20)
2428
2431
  }, e);
2429
2432
  }
2430
- function Or(e = {}) {
2431
- return J({
2432
- id: X(),
2433
+ function kr(e = {}) {
2434
+ return Y({
2435
+ id: Z(),
2433
2436
  type: "video",
2434
- ...un,
2435
- styles: Z()
2437
+ ...ln,
2438
+ styles: Q()
2436
2439
  }, e);
2437
2440
  }
2438
- function kr(e = {}) {
2439
- return J({
2440
- id: X(),
2441
+ function Ar(e = {}) {
2442
+ return Y({
2443
+ id: Z(),
2441
2444
  type: "social",
2442
2445
  icons: [],
2443
- ...dn,
2444
- styles: Z()
2446
+ ...un,
2447
+ styles: Q()
2445
2448
  }, e);
2446
2449
  }
2447
- function Ar(e = {}) {
2448
- return J({
2449
- id: X(),
2450
+ function jr(e = {}) {
2451
+ return Y({
2452
+ id: Z(),
2450
2453
  type: "spacer",
2451
- ...fn,
2452
- styles: Z(0)
2454
+ ...dn,
2455
+ styles: Q(0)
2453
2456
  }, e);
2454
2457
  }
2455
- function jr(e = {}) {
2456
- return J({
2457
- id: X(),
2458
+ function Mr(e = {}) {
2459
+ return Y({
2460
+ id: Z(),
2458
2461
  type: "html",
2459
- ...pn,
2460
- styles: Z()
2462
+ ...fn,
2463
+ styles: Q()
2461
2464
  }, e);
2462
2465
  }
2463
- function Mr(e = {}) {
2464
- return J({
2465
- id: X(),
2466
+ function Nr(e = {}) {
2467
+ return Y({
2468
+ id: Z(),
2466
2469
  type: "menu",
2467
2470
  items: [],
2468
- ...mn,
2469
- styles: Z()
2471
+ ...pn,
2472
+ styles: Q()
2470
2473
  }, e);
2471
2474
  }
2472
- function Nr(e, t) {
2475
+ function Pr(e, t) {
2473
2476
  return Array.from({ length: t }, () => ({
2474
- id: X(),
2477
+ id: Z(),
2475
2478
  cells: Array.from({ length: e }, () => ({
2476
- id: X(),
2479
+ id: Z(),
2477
2480
  content: ""
2478
2481
  }))
2479
2482
  }));
2480
2483
  }
2481
- function Pr(e = {}) {
2482
- return J({
2483
- id: X(),
2484
+ function Fr(e = {}) {
2485
+ return Y({
2486
+ id: Z(),
2484
2487
  type: "table",
2485
- rows: Nr(3, 3),
2486
- ...hn,
2487
- styles: Z()
2488
+ rows: Pr(3, 3),
2489
+ ...mn,
2490
+ styles: Q()
2488
2491
  }, e);
2489
2492
  }
2490
- function Fr(e = {}) {
2491
- return J({
2492
- id: X(),
2493
+ function Ir(e = {}) {
2494
+ return Y({
2495
+ id: Z(),
2493
2496
  type: "countdown",
2494
- ...gn,
2495
- styles: Z()
2497
+ ...hn,
2498
+ styles: Q()
2496
2499
  }, e);
2497
2500
  }
2498
- function Ir(e) {
2501
+ function Lr(e) {
2499
2502
  return e.type === "repeatable" ? e.default ?? [] : e.type === "boolean" ? e.default ?? !1 : e.type === "number" ? e.default ?? 0 : e.default ?? "";
2500
2503
  }
2501
- function Lr(e) {
2504
+ function Rr(e) {
2502
2505
  let t = {};
2503
- for (let n of e.fields) t[n.key] = Y(Ir(n));
2504
- let n = J(Z(), Y(e.defaultStyles));
2506
+ for (let n of e.fields) t[n.key] = X(Lr(n));
2507
+ let n = Y(Q(), X(e.defaultStyles));
2505
2508
  return {
2506
- id: X(),
2509
+ id: Z(),
2507
2510
  type: "custom",
2508
2511
  customType: e.type,
2509
2512
  fieldValues: t,
@@ -2511,42 +2514,42 @@ function Lr(e) {
2511
2514
  ...e.dataSource ? { dataSourceFetched: !1 } : {}
2512
2515
  };
2513
2516
  }
2514
- function Rr() {
2517
+ function zr() {
2515
2518
  return {
2516
- id: X(),
2519
+ id: Z(),
2517
2520
  type: "slot",
2518
- styles: Z(0)
2521
+ styles: Q(0)
2519
2522
  };
2520
2523
  }
2521
- function zr(e = {}) {
2522
- return J({
2523
- id: X(),
2524
+ function Br(e = {}) {
2525
+ return Y({
2526
+ id: Z(),
2524
2527
  type: "wrapper",
2525
2528
  children: [],
2526
- styles: Z(0)
2529
+ styles: Q(0)
2527
2530
  }, e);
2528
2531
  }
2529
- function Br(e, t) {
2532
+ function Vr(e, t) {
2530
2533
  switch (e) {
2531
- case "section": return Dr(Y(t?.section));
2532
- case "title": return Sr(Y(t?.title));
2533
- case "paragraph": return Cr(Y(t?.paragraph));
2534
- case "image": return wr(Y(t?.image));
2535
- case "button": return Tr(Y(t?.button));
2536
- case "divider": return Er(Y(t?.divider));
2537
- case "video": return Or(Y(t?.video));
2538
- case "social": return kr(Y(t?.social));
2539
- case "spacer": return Ar(Y(t?.spacer));
2540
- case "html": return jr(Y(t?.html));
2541
- case "menu": return Mr(Y(t?.menu));
2542
- case "table": return Pr(Y(t?.table));
2543
- case "countdown": return Fr(Y(t?.countdown));
2534
+ case "section": return Or(X(t?.section));
2535
+ case "title": return Cr(X(t?.title));
2536
+ case "paragraph": return wr(X(t?.paragraph));
2537
+ case "image": return Tr(X(t?.image));
2538
+ case "button": return Er(X(t?.button));
2539
+ case "divider": return Dr(X(t?.divider));
2540
+ case "video": return kr(X(t?.video));
2541
+ case "social": return Ar(X(t?.social));
2542
+ case "spacer": return jr(X(t?.spacer));
2543
+ case "html": return Mr(X(t?.html));
2544
+ case "menu": return Nr(X(t?.menu));
2545
+ case "table": return Fr(X(t?.table));
2546
+ case "countdown": return Ir(X(t?.countdown));
2544
2547
  case "slot": throw Error("[Templatical] slot cannot be inserted into content. Use createSlotBlock() to build a layout.");
2545
2548
  case "wrapper": throw Error("[Templatical] wrapper cannot be inserted into content. Use createWrapperBlock() to build a layout.");
2546
2549
  default: throw Error(`Unknown block type: ${e}`);
2547
2550
  }
2548
2551
  }
2549
- function Vr(e, t) {
2552
+ function Hr(e, t) {
2550
2553
  let n = e.l10n;
2551
2554
  if (!n || t.size === 0) return;
2552
2555
  let r = (n) => {
@@ -2561,92 +2564,96 @@ function Vr(e, t) {
2561
2564
  n && (e[t] = Object.fromEntries(Object.entries(n).map(([e, t]) => [r(e), t])));
2562
2565
  }
2563
2566
  }
2564
- function Q(e) {
2565
- let t = JSON.parse(JSON.stringify(e));
2566
- t.id = X();
2567
- let n = /* @__PURE__ */ new Map(), r = (e, t) => {
2568
- let r = e.id;
2569
- e.id = X();
2570
- let i = n.get(t);
2571
- return i || (i = /* @__PURE__ */ new Map(), n.set(t, i)), i.set(r, e.id), r;
2567
+ function Ur(e) {
2568
+ let t = JSON.parse(JSON.stringify(e)), n = (e) => {
2569
+ e.id = Z();
2570
+ let t = /* @__PURE__ */ new Map(), r = (e, n) => {
2571
+ let r = e.id;
2572
+ e.id = Z();
2573
+ let i = t.get(n);
2574
+ return i || (i = /* @__PURE__ */ new Map(), t.set(n, i)), i.set(r, e.id), r;
2575
+ };
2576
+ if (e.type === "table") for (let t of e.rows) {
2577
+ let e = r(t, "rows");
2578
+ for (let n of t.cells) r(n, `rows.${e}.cells`);
2579
+ }
2580
+ if (e.type === "menu") for (let t of e.items) r(t, "items");
2581
+ if (e.type === "social") for (let t of e.icons) r(t, "icons");
2582
+ if (e.type === "section") for (let t of e.children) for (let e of t) n(e);
2583
+ if (e.type === "wrapper") for (let t of e.children) n(t);
2584
+ Hr(e, t);
2572
2585
  };
2573
- if (t.type === "table") for (let e of t.rows) {
2574
- let t = r(e, "rows");
2575
- for (let n of e.cells) r(n, `rows.${t}.cells`);
2576
- }
2577
- if (t.type === "menu") for (let e of t.items) r(e, "items");
2578
- if (t.type === "social") for (let e of t.icons) r(e, "icons");
2579
- return t.type === "section" && (t.children = t.children.map((e) => e.map((e) => Q(e)))), t.type === "wrapper" && (t.children = t.children.map((e) => Q(e))), Vr(t, n), t;
2586
+ return n(t), t;
2580
2587
  }
2581
2588
  // ../types/src/layout.ts
2582
- var Hr = "[Templatical] layout: must contain exactly one slot block", Ur = "[Templatical] layout: slot must be a top-level or wrapper child, not nested in a section", Wr = "[Templatical] layout: a wrapper cannot contain a wrapper", Gr = "[Templatical] layout: a wrapper around the slot cannot contain blocks that emit mj-wrapper (section.wrapper)", Kr = "[Templatical] slot is not a valid content block", qr = "[Templatical] layout: a wrapper cannot contain a section with its own wrapper (section.wrapper)", Jr = "[Templatical] wrapper is not a valid content block";
2589
+ var Wr = "[Templatical] layout: must contain exactly one slot block", Gr = "[Templatical] layout: slot must be a top-level or wrapper child, not nested in a section", Kr = "[Templatical] layout: a wrapper cannot contain a wrapper", qr = "[Templatical] layout: a wrapper around the slot cannot contain blocks that emit mj-wrapper (section.wrapper)", Jr = "[Templatical] slot is not a valid content block", Yr = "[Templatical] layout: a wrapper cannot contain a section with its own wrapper (section.wrapper)", Xr = "[Templatical] wrapper is not a valid content block";
2583
2590
  function $(e, t, n = null, r = !1, i = !1) {
2584
- for (let a of e) if (t(a, n, r, i), Ut(a)) for (let e of a.children) $(e, t, a, !0, i);
2585
- else V(a) && $(a.children, t, a, r, !0);
2591
+ for (let a of e) if (t(a, n, r, i), Ht(a)) for (let e of a.children) $(e, t, a, !0, i);
2592
+ else H(a) && $(a.children, t, a, r, !0);
2586
2593
  }
2587
- function Yr(e) {
2594
+ function Zr(e) {
2588
2595
  let t = 0;
2589
2596
  if ($(e.blocks, (e, n, r, i) => {
2590
- if (i && Ut(e) && e.wrapper) throw Error(qr);
2591
- if (B(e) && (t += 1, r)) throw Error(Ur);
2592
- if (V(e)) {
2593
- if (r) throw Error(Ur);
2594
- if (e.children.some(V)) throw Error(Wr);
2597
+ if (i && Ht(e) && e.wrapper) throw Error(Yr);
2598
+ if (V(e) && (t += 1, r)) throw Error(Gr);
2599
+ if (H(e)) {
2600
+ if (r) throw Error(Gr);
2601
+ if (e.children.some(H)) throw Error(Kr);
2595
2602
  }
2596
- }), t !== 1) throw Error(Hr);
2603
+ }), t !== 1) throw Error(Wr);
2597
2604
  }
2598
- function Xr(e) {
2605
+ function Qr(e) {
2599
2606
  $(e.blocks, (e) => {
2600
- if (B(e)) throw Error(Kr);
2607
+ if (V(e)) throw Error(Jr);
2601
2608
  });
2602
2609
  }
2603
- function Zr(e) {
2610
+ function $r(e) {
2604
2611
  $(e.blocks, (e) => {
2605
- if (V(e)) throw Error(Jr);
2612
+ if (H(e)) throw Error(Xr);
2606
2613
  });
2607
2614
  }
2608
- function Qr(e) {
2615
+ function ei(e) {
2609
2616
  let t = !1;
2610
2617
  return $(e.blocks, (e, n) => {
2611
- B(e) && n !== null && V(n) && (t = !0);
2618
+ V(e) && n !== null && H(n) && (t = !0);
2612
2619
  }), t;
2613
2620
  }
2614
- function $r(e) {
2615
- if (B(e)) return e;
2616
- if (V(e)) {
2617
- let t = Q({
2621
+ function ti(e) {
2622
+ if (V(e)) return e;
2623
+ if (H(e)) {
2624
+ let t = Ur({
2618
2625
  ...e,
2619
2626
  children: []
2620
2627
  });
2621
- return t.children = e.children.map($r), t;
2628
+ return t.children = e.children.map(ti), t;
2622
2629
  }
2623
- return Q(e);
2630
+ return Ur(e);
2624
2631
  }
2625
- function ei(e) {
2632
+ function ni(e) {
2626
2633
  for (let t = 0; t < e.length; t++) {
2627
2634
  let n = e[t];
2628
- if (B(n)) return {
2635
+ if (V(n)) return {
2629
2636
  parent: e,
2630
2637
  index: t
2631
2638
  };
2632
- if (V(n)) {
2633
- let e = ei(n.children);
2639
+ if (H(n)) {
2640
+ let e = ni(n.children);
2634
2641
  if (e) return e;
2635
2642
  }
2636
2643
  }
2637
2644
  return null;
2638
2645
  }
2639
- function ti(e) {
2640
- for (let t of e) if (Ut(t)) {
2646
+ function ri(e) {
2647
+ for (let t of e) if (Ht(t)) {
2641
2648
  if (t.wrapper) return !0;
2642
- for (let e of t.children) if (ti(e)) return !0;
2649
+ for (let e of t.children) if (ri(e)) return !0;
2643
2650
  }
2644
2651
  return !1;
2645
2652
  }
2646
- function ni(e, t) {
2647
- if (Yr(e), Xr(t), Zr(t), Qr(e) && ti(t.blocks)) throw Error(Gr);
2648
- let n = e.blocks.map($r), r = ei(n);
2649
- if (!r) throw Error(Hr);
2653
+ function ii(e, t) {
2654
+ if (Zr(e), Qr(t), $r(t), ei(e) && ri(t.blocks)) throw Error(qr);
2655
+ let n = e.blocks.map(ti), r = ni(n);
2656
+ if (!r) throw Error(Wr);
2650
2657
  return r.parent.splice(r.index, 1, ...m(t.blocks)), {
2651
2658
  blocks: n,
2652
2659
  settings: {
@@ -2656,7 +2663,7 @@ function ni(e, t) {
2656
2663
  };
2657
2664
  }
2658
2665
  // ../types/src/url-policy.ts
2659
- var ri = Object.freeze([
2666
+ var ai = Object.freeze([
2660
2667
  "http",
2661
2668
  "https",
2662
2669
  "mailto",
@@ -2666,44 +2673,44 @@ var ri = Object.freeze([
2666
2673
  "sms",
2667
2674
  "xmpp",
2668
2675
  "cid"
2669
- ]), ii = Object.freeze([
2676
+ ]), oi = Object.freeze([
2670
2677
  "javascript",
2671
2678
  "data",
2672
2679
  "vbscript"
2673
2680
  ]);
2674
- function ai(e) {
2681
+ function si(e) {
2675
2682
  return e.replace(/[\t\n\r]/g, "").replace(/^[\u0000-\u0020]+/, "").trimEnd();
2676
2683
  }
2677
- function oi(e) {
2678
- let t = /^([a-z][a-z0-9+.-]*):/i.exec(ai(e));
2684
+ function ci(e) {
2685
+ let t = /^([a-z][a-z0-9+.-]*):/i.exec(si(e));
2679
2686
  return t ? t[1].toLowerCase() : null;
2680
2687
  }
2681
- var si = /^data:image\/(png|jpe?g|gif|webp|svg\+xml);/i, ci = Object.freeze([
2688
+ var li = /^data:image\/(png|jpe?g|gif|webp|svg\+xml);/i, ui = Object.freeze([
2682
2689
  "href",
2683
2690
  "xlink:href",
2684
2691
  "background",
2685
2692
  "poster",
2686
2693
  "src"
2687
- ]), li = Object.freeze([
2694
+ ]), di = Object.freeze([
2688
2695
  "srcdoc",
2689
2696
  "ping",
2690
2697
  "formaction",
2691
2698
  "action"
2692
2699
  ]);
2693
- function ui(e, t) {
2694
- let n = ai(e), r = oi(n);
2695
- return r === null || ri.some((e) => e === r) ? !0 : t.toLowerCase() === "src" && si.test(n);
2700
+ function fi(e, t) {
2701
+ let n = si(e), r = ci(n);
2702
+ return r === null || ai.some((e) => e === r) ? !0 : t.toLowerCase() === "src" && li.test(n);
2696
2703
  }
2697
2704
  // ../types/src/rich-text.ts
2698
- var di = /<\/?p\b[^<>]*>/gi, fi = /<p\b([^<>]*)>\s*<\/p>/gi;
2699
- function pi(e) {
2700
- return e.replace(di, "").trim() === "";
2705
+ var pi = /<\/?p\b[^<>]*>/gi, mi = /<p\b([^<>]*)>\s*<\/p>/gi;
2706
+ function hi(e) {
2707
+ return e.replace(pi, "").trim() === "";
2701
2708
  }
2702
- function mi(e) {
2703
- return pi(e) ? e : e.replace(fi, "<p$1>&nbsp;</p>");
2709
+ function gi(e) {
2710
+ return hi(e) ? e : e.replace(mi, "<p$1>&nbsp;</p>");
2704
2711
  }
2705
2712
  // ../types/src/fonts.ts
2706
- var hi = {
2713
+ var _i = {
2707
2714
  arial: "Arial, sans-serif",
2708
2715
  helvetica: "Helvetica, sans-serif",
2709
2716
  georgia: "Georgia, serif",
@@ -2712,13 +2719,13 @@ var hi = {
2712
2719
  "trebuchet ms": "'Trebuchet MS', sans-serif",
2713
2720
  "courier new": "'Courier New', monospace",
2714
2721
  tahoma: "Tahoma, sans-serif"
2715
- }, gi = /* @__PURE__ */ new Set([
2722
+ }, vi = /* @__PURE__ */ new Set([
2716
2723
  "inherit",
2717
2724
  "initial",
2718
2725
  "unset",
2719
2726
  "revert",
2720
2727
  "revert-layer"
2721
- ]), _i = /* @__PURE__ */ new Set([
2728
+ ]), yi = /* @__PURE__ */ new Set([
2722
2729
  "serif",
2723
2730
  "sans-serif",
2724
2731
  "monospace",
@@ -2733,14 +2740,14 @@ var hi = {
2733
2740
  "math",
2734
2741
  "fangsong"
2735
2742
  ]);
2736
- function vi(e) {
2743
+ function bi(e) {
2737
2744
  return e === " " || e === " " || e === "\n" || e === "\r" || e === "\f";
2738
2745
  }
2739
- function yi(e) {
2746
+ function xi(e) {
2740
2747
  if (typeof e != "string") return [];
2741
2748
  let t = e.replace(/!\s*important\s*$/i, ""), n = [], r = 0;
2742
2749
  for (;;) {
2743
- for (; r < t.length && vi(t[r]);) r++;
2750
+ for (; r < t.length && bi(t[r]);) r++;
2744
2751
  if (r >= t.length) return [];
2745
2752
  let e = t[r];
2746
2753
  if (e === "\"" || e === "'") {
@@ -2757,7 +2764,7 @@ function yi(e) {
2757
2764
  }
2758
2765
  }
2759
2766
  if (!o) return [];
2760
- for (; a < t.length && vi(t[a]);) a++;
2767
+ for (; a < t.length && bi(t[a]);) a++;
2761
2768
  if (a < t.length && t[a] !== ",") return [];
2762
2769
  n.push({
2763
2770
  name: i,
@@ -2765,7 +2772,7 @@ function yi(e) {
2765
2772
  }), r = a;
2766
2773
  } else {
2767
2774
  let e = t.indexOf(",", r), i = e === -1 ? t.length : e, a = t.slice(r, i).trim().split(/\s+/).join(" ");
2768
- if (a === "" || a.includes("\"") || a.includes("'") || gi.has(a.toLowerCase())) return [];
2775
+ if (a === "" || a.includes("\"") || a.includes("'") || vi.has(a.toLowerCase())) return [];
2769
2776
  n.push({
2770
2777
  name: a,
2771
2778
  quoted: !1
@@ -2775,27 +2782,27 @@ function yi(e) {
2775
2782
  r++;
2776
2783
  }
2777
2784
  }
2778
- function bi(e) {
2785
+ function Si(e) {
2779
2786
  return `'${e.replace(/\\/g, "\\\\").replace(/'/g, "\\'")}'`;
2780
2787
  }
2781
- function xi(e) {
2782
- return !e.quoted && _i.has(e.name.toLowerCase());
2788
+ function Ci(e) {
2789
+ return !e.quoted && yi.has(e.name.toLowerCase());
2783
2790
  }
2784
- function Si(e) {
2785
- return yi(e)[0]?.name ?? "";
2791
+ function wi(e) {
2792
+ return xi(e)[0]?.name ?? "";
2786
2793
  }
2787
- function Ci(e, t) {
2788
- let n = (e) => `${bi(e.name)}, ${e.fallback ?? t.defaultFallback}`, r = typeof e == "string" ? e.trim().toLowerCase() : "", i = t.customFonts.find((e) => e.name.toLowerCase() === r);
2794
+ function Ti(e, t) {
2795
+ let n = (e) => `${Si(e.name)}, ${e.fallback ?? t.defaultFallback}`, r = typeof e == "string" ? e.trim().toLowerCase() : "", i = t.customFonts.find((e) => e.name.toLowerCase() === r);
2789
2796
  if (i) return n(i);
2790
- let a = yi(e);
2797
+ let a = xi(e);
2791
2798
  if (a.length !== 1) return e;
2792
2799
  let [o] = a, s = o.name.toLowerCase(), c = t.customFonts.find((e) => e.name.toLowerCase() === s);
2793
- return c ? n(c) : hi[s] || (xi(o) ? e : `${bi(o.name)}, ${t.defaultFallback}`);
2800
+ return c ? n(c) : _i[s] || (Ci(o) ? e : `${Si(o.name)}, ${t.defaultFallback}`);
2794
2801
  }
2795
2802
  // ../types/src/preview-resolution.ts
2796
- function wi(e) {
2803
+ function Ei(e) {
2797
2804
  return typeof e != "object" || !e ? !1 : Array.isArray(e.blocks);
2798
2805
  }
2799
- export { rr as $, Ne as $t, kr as A, Yt as At, vr as B, g as Bt, Er as C, n as Cn, Gt as Ct, Cr as D, Zt as Dt, Mr as E, t as En, Xt as Et, zr as F, He as Ft, nr as G, Ce as Gt, W as H, w as Ht, X as I, E as It, Un as J, Fe as Jt, qn as K, Ee as Kt, br as L, j as Lt, Pr as M, Ht as Mt, Sr as N, Bt as Nt, Dr as O, en as Ot, Or as P, T as Pt, Kn as Q, y as Qt, ar as R, Be as Rt, Lr as S, c as Sn, $t as St, wr as T, o as Tn, B as Tt, G as U, ve as Ut, hr as V, Ie as Vt, er as W, v as Wt, Zn as X, Se as Xt, Hn as Y, Oe as Yt, tr as Z, we as Zt, Yr as _, i as _n, tn as _t, mi as a, se as an, Qn as at, Tr as b, s as bn, Qt as bt, li as c, pe as cn, U as ct, oi as d, ie as dn, wn as dt, S as en, Jn as et, ui as f, f as fn, xn as ft, Qr as g, ne as gn, qt as gt, Zr as h, te as hn, bn as ht, Ci as i, m as in, Xn as it, Ar as j, V as jt, Rr as k, Wt as kt, ci as l, fe as ln, Dn as lt, Xr as m, ee as mn, vn as mt, Si as n, ge as nn, zn as nt, pi as o, de as on, Mn as ot, ni as p, p as pn, _n as pt, Yn as q, Pe as qt, yi as r, h as rn, K as rt, ii as s, ue as sn, Nn as st, wi as t, x as tn, Wn as tt, ri as u, oe as un, Tn as ut, Q as v, e as vn, nn as vt, jr as w, r as wn, Ut as wt, Fr as x, u as xn, Kt as xt, Br as y, l as yn, Jt as yt, yr as z, Ve as zt };
2806
+ export { nr as $, Ne as $t, Ar as A, Jt as At, _r as B, g as Bt, Dr as C, n as Cn, Wt as Ct, wr as D, Xt as Dt, Nr as E, t as En, Yt as Et, Br as F, He as Ft, tr as G, Se as Gt, G as H, w as Ht, Z as I, E as It, Hn as J, Fe as Jt, Kn as K, Te as Kt, xr as L, M as Lt, Fr as M, Vt as Mt, Cr as N, zt as Nt, Or as O, $t as Ot, kr as P, T as Pt, Gn as Q, y as Qt, ir as R, Be as Rt, Rr as S, c as Sn, Qt as St, Tr as T, o as Tn, V as Tt, K as U, ve as Ut, mr as V, Ie as Vt, $n as W, v as Wt, Xn as X, b as Xt, Vn as Y, Oe as Yt, er as Z, Ce as Zt, Zr as _, i as _n, en as _t, gi as a, se as an, Zn as at, Er as b, s as bn, Zt as bt, di as c, pe as cn, W as ct, ci as d, ie as dn, Cn as dt, C as en, qn as et, fi as f, f as fn, bn as ft, ei as g, ne as gn, Kt as gt, $r as h, te as hn, yn as ht, Ti as i, m as in, Yn as it, jr as j, H as jt, zr as k, Ut as kt, ui as l, fe as ln, En as lt, Qr as m, ee as mn, _n as mt, wi as n, ge as nn, Rn as nt, hi as o, de as on, jn as ot, ii as p, p as pn, gn as pt, Jn as q, Pe as qt, xi as r, h as rn, q as rt, oi as s, ue as sn, Mn as st, Ei as t, S as tn, Un as tt, ai as u, oe as un, wn as ut, Ur as v, e as vn, tn as vt, Mr as w, r as wn, Ht as wt, Ir as x, u as xn, Gt as xt, Vr as y, l as yn, qt as yt, vr as z, Ve as zt };
2800
2807
 
2801
- //# sourceMappingURL=src-CdVAke9t.js.map
2808
+ //# sourceMappingURL=src-DeywvttP.js.map