@aswin.dev/editor 0.8.2 → 0.8.4

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 (85) hide show
  1. package/dist/{AiChatSidebar-DM2ri7KX.js → AiChatSidebar-DAJOuHPG.js} +1 -1
  2. package/dist/{AiFeatureMenu-BrZBJ0R5.js → AiFeatureMenu-CKnEDzme.js} +1 -1
  3. package/dist/{CloudEditor-BRpzzfQn.js → CloudEditor-DzdiTmvD.js} +9 -9
  4. package/dist/{CollaboratorBar-DsRXj3Kn.js → CollaboratorBar-C6TfqpyV.js} +1 -1
  5. package/dist/{DesignReferenceSidebar-B1iw3Bb7.js → DesignReferenceSidebar-C6yDJlD8.js} +1 -1
  6. package/dist/{ModuleBrowserModal-DVnd1dqR.js → ModuleBrowserModal-DUKuDjS-.js} +4 -4
  7. package/dist/{ModulePreviewCanvas-D9jBAoBQ.js → ModulePreviewCanvas-C9HTjfkN.js} +1 -1
  8. package/dist/{ParagraphEditor-CO3V0H_V.js → ParagraphEditor-CFuaZKGk.js} +2 -2
  9. package/dist/{SaveModuleDialog-CboNFwIA.js → SaveModuleDialog-QjgPFEDg.js} +2 -2
  10. package/dist/{SnapshotHistory-C26pvPre.js → SnapshotHistory-Dblt21_W.js} +1 -1
  11. package/dist/{TestEmailModal-B4OoUWb_.js → TestEmailModal-D_y3ZksG.js} +2 -2
  12. package/dist/{TitleEditor-DU_QWG_m.js → TitleEditor-CHmL3FFR.js} +2 -2
  13. package/dist/{TplModal-Dr6Do8oU.js → TplModal-DinL7DhQ.js} +1 -1
  14. package/dist/{blockTypeIcons-cRDr36gk.js → blockTypeIcons-JjmIZ_Vx.js} +1 -1
  15. package/dist/bundle-stats.json +6 -6
  16. package/dist/cdn/chunks/{AccessibilityPanel-Csd47zqI.js → AccessibilityPanel-BTADkTp2.js} +3 -3
  17. package/dist/cdn/chunks/{AccessibilityPanel-Csd47zqI.js.map → AccessibilityPanel-BTADkTp2.js.map} +1 -1
  18. package/dist/cdn/chunks/{AiFeatureMenu-BlnZF5pf.js → AiFeatureMenu-D99Pw32q.js} +2 -2
  19. package/dist/cdn/chunks/{AiFeatureMenu-BlnZF5pf.js.map → AiFeatureMenu-D99Pw32q.js.map} +1 -1
  20. package/dist/cdn/chunks/{BlockA11yBadge-VY8NqI9n.js → BlockA11yBadge-dtyeSSvY.js} +2 -2
  21. package/dist/cdn/chunks/{BlockA11yBadge-VY8NqI9n.js.map → BlockA11yBadge-dtyeSSvY.js.map} +1 -1
  22. package/dist/cdn/chunks/{CloudEditor-D0TrKlva.js → CloudEditor-nQ7qsrkA.js} +175 -175
  23. package/dist/cdn/chunks/{CloudEditor-D0TrKlva.js.map → CloudEditor-nQ7qsrkA.js.map} +1 -1
  24. package/dist/cdn/chunks/{CollaboratorBar-BhMNTI_h.js → CollaboratorBar-Cuy1BusU.js} +3 -3
  25. package/dist/cdn/chunks/{CollaboratorBar-BhMNTI_h.js.map → CollaboratorBar-Cuy1BusU.js.map} +1 -1
  26. package/dist/cdn/chunks/{CountdownToolbar-DsP6O1fl.js → CountdownToolbar-CqFM85Xv.js} +3 -3
  27. package/dist/cdn/chunks/{CountdownToolbar-DsP6O1fl.js.map → CountdownToolbar-CqFM85Xv.js.map} +1 -1
  28. package/dist/cdn/chunks/{ModuleBrowserModal-CpYPeiKv.js → ModuleBrowserModal-Dcxtq_dC.js} +5 -5
  29. package/dist/cdn/chunks/{ModuleBrowserModal-CpYPeiKv.js.map → ModuleBrowserModal-Dcxtq_dC.js.map} +1 -1
  30. package/dist/cdn/chunks/{ModulePreviewCanvas-BIYYnqUq.js → ModulePreviewCanvas-Didb4ZCU.js} +2 -2
  31. package/dist/cdn/chunks/{ModulePreviewCanvas-BIYYnqUq.js.map → ModulePreviewCanvas-Didb4ZCU.js.map} +1 -1
  32. package/dist/cdn/chunks/{ParagraphEditor-ZV5SYYw8.js → ParagraphEditor-BX2L35YF.js} +21 -21
  33. package/dist/cdn/chunks/{ParagraphEditor-ZV5SYYw8.js.map → ParagraphEditor-BX2L35YF.js.map} +1 -1
  34. package/dist/cdn/chunks/{RichTextEditorContent-Dx05ETtt.js → RichTextEditorContent-ywrdsvHY.js} +2 -2
  35. package/dist/cdn/chunks/{RichTextEditorContent-Dx05ETtt.js.map → RichTextEditorContent-ywrdsvHY.js.map} +1 -1
  36. package/dist/cdn/chunks/{SaveModuleDialog-DJEEK7Wb.js → SaveModuleDialog-Ddp-HCFB.js} +2 -2
  37. package/dist/cdn/chunks/{SaveModuleDialog-DJEEK7Wb.js.map → SaveModuleDialog-Ddp-HCFB.js.map} +1 -1
  38. package/dist/cdn/chunks/{SlidingPillSelect-BhPCkqVu.js → SlidingPillSelect-CS6N3vGq.js} +2 -2
  39. package/dist/cdn/chunks/{SlidingPillSelect-BhPCkqVu.js.map → SlidingPillSelect-CS6N3vGq.js.map} +1 -1
  40. package/dist/cdn/chunks/{TitleEditor-fu1A87Ld.js → TitleEditor-BTtgZzci.js} +8 -8
  41. package/dist/cdn/chunks/{TitleEditor-fu1A87Ld.js.map → TitleEditor-BTtgZzci.js.map} +1 -1
  42. package/dist/cdn/chunks/{blockTypeIcons-CJirTS-q.js → blockTypeIcons-B2x3gJsz.js} +3 -3
  43. package/dist/cdn/chunks/{blockTypeIcons-CJirTS-q.js.map → blockTypeIcons-B2x3gJsz.js.map} +1 -1
  44. package/dist/{de-CR1qAkAm.js → cdn/chunks/de-Dum1oCPV.js} +27 -3
  45. package/dist/cdn/chunks/de-Dum1oCPV.js.map +1 -0
  46. package/dist/{en-jbnp1n6M.js → cdn/chunks/en-ClDdvkbR.js} +27 -3
  47. package/dist/cdn/chunks/en-ClDdvkbR.js.map +1 -0
  48. package/dist/cdn/chunks/{extensions-BbFKsjyT.js → extensions-CdYSoz4B.js} +3 -3
  49. package/dist/cdn/chunks/{extensions-BbFKsjyT.js.map → extensions-CdYSoz4B.js.map} +1 -1
  50. package/dist/cdn/chunks/{features-uApxwJMz.js → features-BZeMkHMs.js} +1701 -1651
  51. package/dist/cdn/chunks/features-BZeMkHMs.js.map +1 -0
  52. package/dist/cdn/chunks/{icons-DZb4EX9m.js → icons-nP0Wj6Eq.js} +81 -66
  53. package/dist/cdn/chunks/icons-nP0Wj6Eq.js.map +1 -0
  54. package/dist/cdn/chunks/{media-library-B3g52j8R.js → media-library-54Ezt5wL.js} +3 -3
  55. package/dist/cdn/chunks/{media-library-B3g52j8R.js.map → media-library-54Ezt5wL.js.map} +1 -1
  56. package/dist/cdn/chunks/{quality-Ug5lFGHP.js → quality-Di1pUcCW.js} +59 -59
  57. package/dist/cdn/chunks/{quality-Ug5lFGHP.js.map → quality-Di1pUcCW.js.map} +1 -1
  58. package/dist/cdn/chunks/{renderer-jXCdXjV-.js → renderer-C4OuJhDG.js} +16 -16
  59. package/dist/cdn/chunks/{renderer-jXCdXjV-.js.map → renderer-C4OuJhDG.js.map} +1 -1
  60. package/dist/cdn/chunks/{src-FMtH5ZvJ.js → src-DF5NNH7S.js} +4 -4
  61. package/dist/cdn/chunks/{src-FMtH5ZvJ.js.map → src-DF5NNH7S.js.map} +1 -1
  62. package/dist/cdn/chunks/{styles-Co9vw4ag.js → styles-BZJ3yQ0G.js} +1633 -1361
  63. package/dist/cdn/chunks/styles-BZJ3yQ0G.js.map +1 -0
  64. package/dist/cdn/chunks/{tiptap-qXOh0vzV.js → tiptap-CZ52Pj8k.js} +2 -2
  65. package/dist/cdn/chunks/{tiptap-qXOh0vzV.js.map → tiptap-CZ52Pj8k.js.map} +1 -1
  66. package/dist/cdn/editor.css +1 -1
  67. package/dist/cdn/editor.js +12 -12
  68. package/dist/cdn/editor.js.map +1 -1
  69. package/dist/{cloud-COUuu_KE.js → cloud-9i5Nj7rp.js} +9 -9
  70. package/dist/{cdn/chunks/de-BsYijc0r.js → de-DP4gn3tf.js} +25 -5
  71. package/dist/{dist-DP82Y0rs.js → dist-Bcqepqv3.js} +222 -169
  72. package/dist/{cdn/chunks/en-DMu9hPIC.js → en-CyZxmGTU.js} +25 -5
  73. package/dist/{extensions-Bg22D6c8.js → extensions-CNPdJw_8.js} +2 -2
  74. package/dist/index.d.ts +8 -8
  75. package/dist/style.css +1 -1
  76. package/dist/{styles-DgL0UYj0.js → styles-Czir-MYq.js} +1561 -1274
  77. package/dist/templatical-editor.js +9 -9
  78. package/dist/{useEditorCore-CSlYQZWx.js → useEditorCore-BHSyoxSK.js} +16 -16
  79. package/dist/{useMergeTag-BVL3A4OO.js → useMergeTag-BfVcyNSv.js} +1 -1
  80. package/package.json +7 -7
  81. package/dist/cdn/chunks/de-BsYijc0r.js.map +0 -1
  82. package/dist/cdn/chunks/en-DMu9hPIC.js.map +0 -1
  83. package/dist/cdn/chunks/features-uApxwJMz.js.map +0 -1
  84. package/dist/cdn/chunks/icons-DZb4EX9m.js.map +0 -1
  85. package/dist/cdn/chunks/styles-Co9vw4ag.js.map +0 -1
@@ -6,9 +6,12 @@ var e = {
6
6
  4: 18
7
7
  };
8
8
  function t(e) {
9
- return e.type === "custom";
9
+ return e.type === "section";
10
10
  }
11
11
  function n(e) {
12
+ return e.type === "custom";
13
+ }
14
+ function r(e) {
12
15
  if (!e.canvasPages?.length) return e;
13
16
  let t = e.activeCanvasPageId ?? e.canvasPages[0].id, n = e.canvasPages.find((e) => e.id === t) ?? e.canvasPages[0];
14
17
  return {
@@ -17,7 +20,7 @@ function n(e) {
17
20
  blocks: n.blocks
18
21
  };
19
22
  }
20
- function r(e = "Arial", t) {
23
+ function i(e = "Arial", t) {
21
24
  return {
22
25
  blocks: [{
23
26
  id: "dcf862dc-2ff6-45e1-8f43-07ebc2d5a88f",
@@ -331,6 +334,20 @@ function r(e = "Arial", t) {
331
334
  operator: "and"
332
335
  }
333
336
  }
337
+ },
338
+ frequency: {
339
+ showAgain: {
340
+ mode: "session",
341
+ intervalValue: 7,
342
+ intervalUnit: "days"
343
+ },
344
+ stopShowing: {
345
+ afterSignupOrClick: !0,
346
+ afterSeenEnabled: !0,
347
+ afterSeenCount: 5,
348
+ afterClosedEnabled: !0,
349
+ afterClosedBehavior: "never_display_again"
350
+ }
334
351
  }
335
352
  },
336
353
  width: 700,
@@ -557,7 +574,42 @@ function r(e = "Arial", t) {
557
574
  activeCanvasPageId: "f5902bc8-e71e-4b56-a590-349782c7b309"
558
575
  };
559
576
  }
560
- var i = [
577
+ function a() {
578
+ return {
579
+ showAgain: {
580
+ mode: "session",
581
+ intervalValue: 7,
582
+ intervalUnit: "days"
583
+ },
584
+ stopShowing: {
585
+ afterSignupOrClick: !0,
586
+ afterSeenEnabled: !0,
587
+ afterSeenCount: 5,
588
+ afterClosedEnabled: !0,
589
+ afterClosedBehavior: "never_display_again"
590
+ }
591
+ };
592
+ }
593
+ function o(e) {
594
+ let t = a();
595
+ if (!e) return t;
596
+ let n = e.showAgain?.mode, r = n === "page_load" || n === "session" || n === "interval" ? n : t.showAgain.mode, i = typeof e.showAgain?.intervalValue == "number" && Number.isFinite(e.showAgain.intervalValue) ? Math.max(1, Math.floor(e.showAgain.intervalValue)) : t.showAgain.intervalValue, o = e.showAgain?.intervalUnit, s = o === "minutes" || o === "hours" || o === "days" ? o : t.showAgain.intervalUnit, c = e.stopShowing?.afterClosedBehavior, l = c === "respect_show_again" || c === "never_display_again" ? c : t.stopShowing.afterClosedBehavior, u = typeof e.stopShowing?.afterSeenCount == "number" && Number.isFinite(e.stopShowing.afterSeenCount) ? Math.max(1, Math.floor(e.stopShowing.afterSeenCount)) : t.stopShowing.afterSeenCount;
597
+ return {
598
+ showAgain: {
599
+ mode: r,
600
+ intervalValue: i,
601
+ intervalUnit: s
602
+ },
603
+ stopShowing: {
604
+ afterSignupOrClick: e.stopShowing?.afterSignupOrClick ?? t.stopShowing.afterSignupOrClick,
605
+ afterSeenEnabled: e.stopShowing?.afterSeenEnabled ?? t.stopShowing.afterSeenEnabled,
606
+ afterSeenCount: u,
607
+ afterClosedEnabled: e.stopShowing?.afterClosedEnabled ?? t.stopShowing.afterClosedEnabled,
608
+ afterClosedBehavior: l
609
+ }
610
+ };
611
+ }
612
+ var s = [
561
613
  {
562
614
  id: "UTC",
563
615
  label: "GMT+0000 (Coordinated Universal Time)"
@@ -615,7 +667,7 @@ var i = [
615
667
  label: "GMT+1200 / GMT+1300 (New Zealand)"
616
668
  }
617
669
  ];
618
- function a() {
670
+ function c() {
619
671
  return {
620
672
  enabled: !1,
621
673
  delaySeconds: 0,
@@ -623,37 +675,37 @@ function a() {
623
675
  operator: "and"
624
676
  };
625
677
  }
626
- function o(e) {
678
+ function l(e) {
627
679
  return e === !0 ? {
628
680
  enabled: !0,
629
681
  delaySeconds: 0,
630
682
  pageViews: 0,
631
683
  operator: "and"
632
- } : e === !1 || e == null ? a() : {
684
+ } : e === !1 || e == null ? c() : {
633
685
  enabled: !!e.enabled,
634
686
  delaySeconds: typeof e.delaySeconds == "number" && Number.isFinite(e.delaySeconds) ? Math.max(0, e.delaySeconds) : 0,
635
687
  pageViews: typeof e.pageViews == "number" && Number.isFinite(e.pageViews) ? Math.max(0, e.pageViews) : 0,
636
688
  operator: e.operator === "or" ? "or" : "and"
637
689
  };
638
690
  }
639
- function s(e, t) {
691
+ function u(e, t) {
640
692
  if (t === void 0) return {
641
693
  ...e,
642
- triggerConditions: o(e.triggerConditions)
694
+ triggerConditions: l(e.triggerConditions)
643
695
  };
644
696
  let n = {
645
697
  ...e,
646
698
  ...t
647
699
  };
648
- return n.triggerConditions = o(Object.prototype.hasOwnProperty.call(t, "triggerConditions") ? t.triggerConditions : e.triggerConditions), n;
700
+ return n.triggerConditions = l(Object.prototype.hasOwnProperty.call(t, "triggerConditions") ? t.triggerConditions : e.triggerConditions), n;
649
701
  }
650
- function c(e, t) {
702
+ function ee(e, t) {
651
703
  let n = Object.keys(e), r = { ...e };
652
- for (let i of n) r[i] = s(e[i], t?.[i]);
704
+ for (let i of n) r[i] = u(e[i], t?.[i]);
653
705
  return r;
654
706
  }
655
- function ee(e) {
656
- let t = (e) => o(e.triggerConditions), n = e.onClick.clickAnchor ?? "", r = n.startsWith("#") ? n.slice(1) : n;
707
+ function d(e) {
708
+ let t = (e) => l(e.triggerConditions), n = e.onClick.clickAnchor ?? "", r = n.startsWith("#") ? n.slice(1) : n;
657
709
  return {
658
710
  landing: {
659
711
  enabled: e.onLanding.enabled,
@@ -687,7 +739,7 @@ function ee(e) {
687
739
  }
688
740
  };
689
741
  }
690
- var l = {
742
+ var f = {
691
743
  small: 380,
692
744
  medium: 480,
693
745
  large: 600,
@@ -708,8 +760,8 @@ function te() {
708
760
  endTime: "23:59"
709
761
  }];
710
762
  }
711
- function ne() {
712
- let e = a();
763
+ function p() {
764
+ let e = c();
713
765
  return {
714
766
  triggers: {
715
767
  onLanding: {
@@ -774,20 +826,21 @@ function ne() {
774
826
  endDate: "",
775
827
  detailedScheduleEnabled: !0,
776
828
  slots: te()
777
- }
829
+ },
830
+ frequency: a()
778
831
  };
779
832
  }
780
- var re = {
833
+ var ne = {
781
834
  content: "<p>Enter your title</p>",
782
835
  level: 2,
783
836
  color: "#1a1a1a",
784
837
  textAlign: "left"
785
- }, ie = { content: "<p>Enter your text here</p>" }, u = {
838
+ }, re = { content: "<p>Enter your text here</p>" }, m = {
786
839
  src: "",
787
840
  alt: "",
788
841
  width: "full",
789
842
  align: "center"
790
- }, d = {
843
+ }, h = {
791
844
  text: "Click Here",
792
845
  url: "",
793
846
  backgroundColor: "#333333",
@@ -803,7 +856,7 @@ var re = {
803
856
  borderWidth: 0,
804
857
  borderColor: "#000000",
805
858
  borderSides: "all"
806
- }, f = {
859
+ }, g = {
807
860
  inputType: "text",
808
861
  name: "field",
809
862
  label: "Label",
@@ -847,30 +900,30 @@ var re = {
847
900
  inputBorderColor: "#d1d5db",
848
901
  inputBorderSides: "all",
849
902
  inputWidth: "full"
850
- }, ae = {
903
+ }, _ = {
851
904
  lineStyle: "solid",
852
905
  color: "#e0e0e0",
853
906
  thickness: 1,
854
907
  width: "full"
855
- }, oe = { columns: "1" }, p = {
908
+ }, ie = { columns: "1" }, ae = {
856
909
  url: "",
857
910
  thumbnailUrl: "",
858
911
  alt: "Video",
859
912
  width: "full",
860
913
  align: "center"
861
- }, m = {
914
+ }, oe = {
862
915
  iconStyle: "solid",
863
916
  iconSize: "medium",
864
917
  spacing: 10,
865
918
  align: "center"
866
- }, h = { height: 24 }, g = { content: "" }, _ = {
919
+ }, v = { height: 24 }, y = { content: "" }, b = {
867
920
  fontSize: 15,
868
921
  color: "#1a1a1a",
869
922
  textAlign: "center",
870
923
  separator: "|",
871
924
  separatorColor: "#e0e0e0",
872
925
  spacing: 10
873
- }, v = {
926
+ }, x = {
874
927
  hasHeaderRow: !0,
875
928
  borderColor: "#e0e0e0",
876
929
  borderWidth: 1,
@@ -878,7 +931,7 @@ var re = {
878
931
  fontSize: 15,
879
932
  color: "#1a1a1a",
880
933
  textAlign: "left"
881
- }, y = {
934
+ }, S = {
882
935
  syncIntegrationId: null,
883
936
  submitButtonText: "Sign up",
884
937
  buttonAction: "next_step",
@@ -906,7 +959,7 @@ var re = {
906
959
  buttonTextColor: "#ffffff",
907
960
  buttonBorderRadius: 8,
908
961
  buttonFontSize: 14
909
- }, b = {
962
+ }, C = {
910
963
  discountMode: "auto_code",
911
964
  valueType: "fixed_amount",
912
965
  valueAmount: 10,
@@ -921,7 +974,7 @@ var re = {
921
974
  copyConfirmationText: "Copied to clipboard",
922
975
  afterCopyAction: "none",
923
976
  afterCopyUrl: ""
924
- }, x = {
977
+ }, w = {
925
978
  targetDate: "",
926
979
  timezone: "UTC",
927
980
  showDays: !0,
@@ -950,24 +1003,24 @@ var re = {
950
1003
  enableParticles: !0,
951
1004
  enableHoverFx: !0
952
1005
  };
953
- function S(e) {
1006
+ function T(e) {
954
1007
  return typeof e == "object" && !!e && !Array.isArray(e) && Object.getPrototypeOf(e) === Object.prototype;
955
1008
  }
956
- function C(e, t) {
1009
+ function E(e, t) {
957
1010
  let n = { ...e };
958
1011
  for (let r of Object.keys(t)) {
959
1012
  let i = e[r], a = t[r];
960
- a !== void 0 && (S(i) && S(a) ? n[r] = C(i, a) : n[r] = a);
1013
+ a !== void 0 && (T(i) && T(a) ? n[r] = E(i, a) : n[r] = a);
961
1014
  }
962
1015
  return n;
963
1016
  }
964
- function w(e, t) {
965
- return !t || Object.keys(t).length === 0 ? e : C(e, t);
1017
+ function D(e, t) {
1018
+ return !t || Object.keys(t).length === 0 ? e : E(e, t);
966
1019
  }
967
- function T() {
1020
+ function O() {
968
1021
  return crypto.randomUUID();
969
1022
  }
970
- function E(e = 0) {
1023
+ function k(e = 0) {
971
1024
  return {
972
1025
  top: e,
973
1026
  right: e,
@@ -975,138 +1028,138 @@ function E(e = 0) {
975
1028
  left: e
976
1029
  };
977
1030
  }
978
- function D(e = 10) {
1031
+ function A(e = 10) {
979
1032
  return {
980
- padding: E(e),
981
- margin: E(0)
1033
+ padding: k(e),
1034
+ margin: k(0)
982
1035
  };
983
1036
  }
984
- function O(e = {}) {
985
- return w({
986
- id: T(),
1037
+ function j(e = {}) {
1038
+ return D({
1039
+ id: O(),
987
1040
  type: "title",
988
- ...re,
989
- styles: D()
1041
+ ...ne,
1042
+ styles: A()
990
1043
  }, e);
991
1044
  }
992
- function k(e = {}) {
993
- return w({
994
- id: T(),
1045
+ function M(e = {}) {
1046
+ return D({
1047
+ id: O(),
995
1048
  type: "paragraph",
996
- ...ie,
997
- styles: D()
1049
+ ...re,
1050
+ styles: A()
998
1051
  }, e);
999
1052
  }
1000
- function A(e = {}) {
1001
- return w({
1002
- id: T(),
1053
+ function N(e = {}) {
1054
+ return D({
1055
+ id: O(),
1003
1056
  type: "image",
1004
- ...u,
1005
- styles: D()
1057
+ ...m,
1058
+ styles: A()
1006
1059
  }, e);
1007
1060
  }
1008
- function j(e = {}) {
1009
- return w({
1010
- id: T(),
1061
+ function P(e = {}) {
1062
+ return D({
1063
+ id: O(),
1011
1064
  type: "button",
1012
- ...d,
1013
- styles: D()
1065
+ ...h,
1066
+ styles: A()
1014
1067
  }, e);
1015
1068
  }
1016
- function M(e = {}) {
1017
- return w({
1018
- id: T(),
1069
+ function F(e = {}) {
1070
+ return D({
1071
+ id: O(),
1019
1072
  type: "input",
1020
- ...f,
1021
- styles: D()
1073
+ ...g,
1074
+ styles: A()
1022
1075
  }, e);
1023
1076
  }
1024
- function N(e = {}) {
1025
- return w({
1026
- id: T(),
1077
+ function I(e = {}) {
1078
+ return D({
1079
+ id: O(),
1027
1080
  type: "divider",
1028
- ...ae,
1029
- styles: D(20)
1081
+ ..._,
1082
+ styles: A(20)
1030
1083
  }, e);
1031
1084
  }
1032
- function P(e = {}) {
1033
- return w({
1034
- id: T(),
1085
+ function L(e = {}) {
1086
+ return D({
1087
+ id: O(),
1035
1088
  type: "section",
1036
- ...oe,
1089
+ ...ie,
1037
1090
  children: [[]],
1038
- styles: D(20)
1091
+ styles: A(20)
1039
1092
  }, e);
1040
1093
  }
1041
- function F(e = {}) {
1042
- return w({
1043
- id: T(),
1094
+ function R(e = {}) {
1095
+ return D({
1096
+ id: O(),
1044
1097
  type: "video",
1045
- ...p,
1046
- styles: D()
1098
+ ...ae,
1099
+ styles: A()
1047
1100
  }, e);
1048
1101
  }
1049
- function I(e = {}) {
1050
- return w({
1051
- id: T(),
1102
+ function z(e = {}) {
1103
+ return D({
1104
+ id: O(),
1052
1105
  type: "social",
1053
1106
  icons: [],
1054
- ...m,
1055
- styles: D()
1107
+ ...oe,
1108
+ styles: A()
1056
1109
  }, e);
1057
1110
  }
1058
- function L(e = {}) {
1059
- return w({
1060
- id: T(),
1111
+ function B(e = {}) {
1112
+ return D({
1113
+ id: O(),
1061
1114
  type: "spacer",
1062
- ...h,
1063
- styles: D(0)
1115
+ ...v,
1116
+ styles: A(0)
1064
1117
  }, e);
1065
1118
  }
1066
- function R(e = {}) {
1067
- return w({
1068
- id: T(),
1119
+ function V(e = {}) {
1120
+ return D({
1121
+ id: O(),
1069
1122
  type: "html",
1070
- ...g,
1071
- styles: D()
1123
+ ...y,
1124
+ styles: A()
1072
1125
  }, e);
1073
1126
  }
1074
- function z(e = {}) {
1075
- return w({
1076
- id: T(),
1127
+ function H(e = {}) {
1128
+ return D({
1129
+ id: O(),
1077
1130
  type: "menu",
1078
1131
  items: [],
1079
- ..._,
1080
- styles: D()
1132
+ ...b,
1133
+ styles: A()
1081
1134
  }, e);
1082
1135
  }
1083
- function B(e, t) {
1136
+ function U(e, t) {
1084
1137
  return Array.from({ length: t }, () => ({
1085
- id: T(),
1138
+ id: O(),
1086
1139
  cells: Array.from({ length: e }, () => ({
1087
- id: T(),
1140
+ id: O(),
1088
1141
  content: ""
1089
1142
  }))
1090
1143
  }));
1091
1144
  }
1092
- function V(e = {}) {
1093
- return w({
1094
- id: T(),
1145
+ function W(e = {}) {
1146
+ return D({
1147
+ id: O(),
1095
1148
  type: "table",
1096
- rows: B(3, 3),
1097
- ...v,
1098
- styles: D()
1149
+ rows: U(3, 3),
1150
+ ...x,
1151
+ styles: A()
1099
1152
  }, e);
1100
1153
  }
1101
- function H(e = {}) {
1102
- return w({
1103
- id: T(),
1154
+ function G(e = {}) {
1155
+ return D({
1156
+ id: O(),
1104
1157
  type: "countdown",
1105
- ...x,
1106
- styles: D()
1158
+ ...w,
1159
+ styles: A()
1107
1160
  }, e);
1108
1161
  }
1109
- var U = {
1162
+ var K = {
1110
1163
  firstName: {
1111
1164
  name: "first_name",
1112
1165
  label: "First name",
@@ -1128,10 +1181,10 @@ var U = {
1128
1181
  placeholder: "+1 555 123 4567"
1129
1182
  }
1130
1183
  };
1131
- function W(e, t = {}) {
1132
- let n = U[e];
1184
+ function q(e, t = {}) {
1185
+ let n = K[e];
1133
1186
  return {
1134
- id: T(),
1187
+ id: O(),
1135
1188
  type: e,
1136
1189
  name: n.name,
1137
1190
  label: n.label,
@@ -1145,68 +1198,68 @@ function W(e, t = {}) {
1145
1198
  ...t
1146
1199
  };
1147
1200
  }
1148
- function G(e = {}) {
1149
- return w({
1150
- id: T(),
1201
+ function J(e = {}) {
1202
+ return D({
1203
+ id: O(),
1151
1204
  type: "discountCoupon",
1152
- ...b,
1153
- styles: D()
1205
+ ...C,
1206
+ styles: A()
1154
1207
  }, e);
1155
1208
  }
1156
- function K(e = {}) {
1157
- let t = w({
1158
- id: T(),
1209
+ function se(e = {}) {
1210
+ let t = D({
1211
+ id: O(),
1159
1212
  type: "form",
1160
- ...y,
1161
- fields: [W("email")],
1162
- styles: D()
1213
+ ...S,
1214
+ fields: [q("email")],
1215
+ styles: A()
1163
1216
  }, e);
1164
1217
  return t.fields?.length ? t : {
1165
1218
  ...t,
1166
- fields: [W("email")]
1219
+ fields: [q("email")]
1167
1220
  };
1168
1221
  }
1169
- function q(e) {
1222
+ function ce(e) {
1170
1223
  return e.type === "repeatable" ? e.default ?? [] : e.type === "boolean" ? e.default ?? !1 : e.type === "number" ? e.default ?? 0 : e.default ?? "";
1171
1224
  }
1172
- function se(e) {
1225
+ function le(e) {
1173
1226
  let t = {};
1174
- for (let n of e.fields) t[n.key] = q(n);
1227
+ for (let n of e.fields) t[n.key] = ce(n);
1175
1228
  return {
1176
- id: T(),
1229
+ id: O(),
1177
1230
  type: "custom",
1178
1231
  customType: e.type,
1179
1232
  fieldValues: t,
1180
- styles: D(),
1233
+ styles: A(),
1181
1234
  ...e.dataSource ? { dataSourceFetched: !1 } : {}
1182
1235
  };
1183
1236
  }
1184
- function ce(e, t) {
1237
+ function ue(e, t) {
1185
1238
  switch (e) {
1186
- case "section": return P(t?.section);
1187
- case "title": return O(t?.title);
1188
- case "paragraph": return k(t?.paragraph);
1189
- case "image": return A(t?.image);
1190
- case "button": return j(t?.button);
1191
- case "input": return M(t?.input);
1192
- case "divider": return N(t?.divider);
1193
- case "video": return F(t?.video);
1194
- case "social": return I(t?.social);
1195
- case "spacer": return L(t?.spacer);
1196
- case "html": return R(t?.html);
1197
- case "menu": return z(t?.menu);
1198
- case "table": return V(t?.table);
1199
- case "countdown": return H(t?.countdown);
1200
- case "form": return K(t?.form);
1201
- case "discountCoupon": return G(t?.discountCoupon);
1239
+ case "section": return L(t?.section);
1240
+ case "title": return j(t?.title);
1241
+ case "paragraph": return M(t?.paragraph);
1242
+ case "image": return N(t?.image);
1243
+ case "button": return P(t?.button);
1244
+ case "input": return F(t?.input);
1245
+ case "divider": return I(t?.divider);
1246
+ case "video": return R(t?.video);
1247
+ case "social": return z(t?.social);
1248
+ case "spacer": return B(t?.spacer);
1249
+ case "html": return V(t?.html);
1250
+ case "menu": return H(t?.menu);
1251
+ case "table": return W(t?.table);
1252
+ case "countdown": return G(t?.countdown);
1253
+ case "form": return se(t?.form);
1254
+ case "discountCoupon": return J(t?.discountCoupon);
1202
1255
  default: throw Error(`Unknown block type: ${e}`);
1203
1256
  }
1204
1257
  }
1205
- function J(e) {
1258
+ function Y(e) {
1206
1259
  let t = JSON.parse(JSON.stringify(e));
1207
- return t.id = T(), t.type === "section" && (t.children = t.children.map((e) => e.map((e) => J(e)))), t;
1260
+ return t.id = O(), t.type === "section" && (t.children = t.children.map((e) => e.map((e) => Y(e)))), t;
1208
1261
  }
1209
- var Y = {
1262
+ var X = {
1210
1263
  liquid: {
1211
1264
  value: /\{\{.+?\}\}/g,
1212
1265
  logic: /\{%-?\s*(\w+).*?-?%\}/g
@@ -1223,50 +1276,50 @@ var Y = {
1223
1276
  value: /%%=.+?=%%/g,
1224
1277
  logic: /%%\[\s*(\w+).*?\]%%/g
1225
1278
  }
1226
- }, le = {
1279
+ }, de = {
1227
1280
  liquid: "{{",
1228
1281
  handlebars: "{{",
1229
1282
  mailchimp: "*|",
1230
1283
  ampscript: "%%="
1231
1284
  };
1232
- function ue(e) {
1233
- for (let t of Object.keys(Y)) if (Y[t].value.source === e.value.source) return le[t];
1285
+ function fe(e) {
1286
+ for (let t of Object.keys(X)) if (X[t].value.source === e.value.source) return de[t];
1234
1287
  return null;
1235
1288
  }
1236
- function de(e) {
1237
- return e ? typeof e == "string" ? Y[e] ?? Y.liquid : e : Y.liquid;
1289
+ function pe(e) {
1290
+ return e ? typeof e == "string" ? X[e] ?? X.liquid : e : X.liquid;
1238
1291
  }
1239
- function X(e) {
1292
+ function Z(e) {
1240
1293
  let t = e.source, n = e.flags.replace("g", "");
1241
1294
  return RegExp(`^${t}$`, n);
1242
1295
  }
1243
- function Z(e, t) {
1296
+ function me(e, t) {
1244
1297
  let n = e?.trim() || "";
1245
- return X(t.logic).test(n) ? !1 : X(t.value).test(n);
1298
+ return Z(t.logic).test(n) ? !1 : Z(t.value).test(n);
1246
1299
  }
1247
1300
  function Q(e, t) {
1248
1301
  let n = t.find((t) => t.value === e);
1249
1302
  return n ? n.label : e;
1250
1303
  }
1251
- function fe(e, t) {
1304
+ function he(e, t) {
1252
1305
  return e.replace(/(<span[^>]*\sdata-merge-tag="([^"]*)"[^>]*>)(.*?)(<\/span>)/g, (e, n, r, i, a) => `${n}${Q(r, t)}${a}`);
1253
1306
  }
1254
- function pe(e, t) {
1307
+ function ge(e, t) {
1255
1308
  if (!e) return !1;
1256
1309
  let n = new RegExp(t.value.source, t.value.flags), r = new RegExp(t.logic.source, t.logic.flags);
1257
1310
  return n.test(e) || r.test(e);
1258
1311
  }
1259
- function me(e, t) {
1260
- return X(t.logic).test(e?.trim() || "");
1312
+ function _e(e, t) {
1313
+ return Z(t.logic).test(e?.trim() || "");
1261
1314
  }
1262
1315
  function $(e, t) {
1263
1316
  let n = new RegExp(t.logic.source, t.logic.flags.replace("g", "")), r = e.match(n);
1264
1317
  return r && r[1] ? r[1].toUpperCase() : e;
1265
1318
  }
1266
- function he(e, t) {
1319
+ function ve(e, t) {
1267
1320
  return e.replace(/(<span[^>]*\sdata-logic-merge-tag="([^"]*)"[^>]*>)(.*?)(<\/span>)/g, (e, n, r, i, a) => `${n}${$(r, t)}${a}`);
1268
1321
  }
1269
- var ge = class extends Error {
1322
+ var ye = class extends Error {
1270
1323
  constructor(e, t) {
1271
1324
  super(e), this.statusCode = t, this.name = "SdkError";
1272
1325
  }
@@ -1282,4 +1335,4 @@ var ge = class extends Error {
1282
1335
  }
1283
1336
  };
1284
1337
  //#endregion
1285
- export { $ as A, fe as B, P as C, O as D, V as E, Z as F, ee as H, c as I, n as L, ue as M, t as N, F as O, me as P, o as R, k as S, L as T, de as V, W as _, ge as a, M as b, ce as c, se as d, ne as f, N as g, G as h, Y as i, Q as j, T as k, j as l, a as m, i as n, J as o, r as p, l as r, pe as s, e as t, H as u, R as v, I as w, z as x, A as y, he as z };
1338
+ export { $ as A, l as B, L as C, j as D, W as E, me as F, he as H, t as I, o as L, fe as M, n as N, R as O, _e as P, ee as R, M as S, B as T, pe as U, ve as V, d as W, q as _, ye as a, F as b, ue as c, le as d, p as f, I as g, J as h, X as i, Q as j, O as k, P as l, c as m, s as n, Y as o, i as p, f as r, ge as s, e as t, G as u, V as v, z as w, H as x, N as y, r as z };