@charisol/plexo-sdk 1.1.12 → 1.1.14

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 (50) hide show
  1. package/dist/{compiler-Bxo7wIKY.js → compiler-1K7XytEa.js} +129 -151
  2. package/dist/compiler.js +1 -1
  3. package/dist/compilerClient.js +94 -72
  4. package/dist/{iconSvgStatic-D5PrYZfC.js → iconSvgStatic-CUYMC8Am.js} +247 -145
  5. package/dist/index.js +19 -4
  6. package/dist/social-icons/applemusic.png +0 -0
  7. package/dist/social-icons/applepodcasts.png +0 -0
  8. package/dist/social-icons/behance.png +0 -0
  9. package/dist/social-icons/bluesky.png +0 -0
  10. package/dist/social-icons/buymeacoffee.png +0 -0
  11. package/dist/social-icons/clubhouse.png +0 -0
  12. package/dist/social-icons/discord.png +0 -0
  13. package/dist/social-icons/dribbble.png +0 -0
  14. package/dist/social-icons/facebook.png +0 -0
  15. package/dist/social-icons/fallback.png +0 -0
  16. package/dist/social-icons/goodreads.png +0 -0
  17. package/dist/social-icons/instagram.png +0 -0
  18. package/dist/social-icons/kakaotalk.png +0 -0
  19. package/dist/social-icons/kofi.png +0 -0
  20. package/dist/social-icons/line.png +0 -0
  21. package/dist/social-icons/linkedin.png +0 -0
  22. package/dist/social-icons/mastodon.png +0 -0
  23. package/dist/social-icons/messenger.png +0 -0
  24. package/dist/social-icons/patreon.png +0 -0
  25. package/dist/social-icons/pinterest.png +0 -0
  26. package/dist/social-icons/producthunt.png +0 -0
  27. package/dist/social-icons/quora.png +0 -0
  28. package/dist/social-icons/reddit.png +0 -0
  29. package/dist/social-icons/signal.png +0 -0
  30. package/dist/social-icons/snapchat.png +0 -0
  31. package/dist/social-icons/soundcloud.png +0 -0
  32. package/dist/social-icons/spotify.png +0 -0
  33. package/dist/social-icons/substack.png +0 -0
  34. package/dist/social-icons/telegram.png +0 -0
  35. package/dist/social-icons/threads.png +0 -0
  36. package/dist/social-icons/tiktok.png +0 -0
  37. package/dist/social-icons/tripadvisor.png +0 -0
  38. package/dist/social-icons/tumblr.png +0 -0
  39. package/dist/social-icons/twitch.png +0 -0
  40. package/dist/social-icons/viber.png +0 -0
  41. package/dist/social-icons/vimeo.png +0 -0
  42. package/dist/social-icons/vk.png +0 -0
  43. package/dist/social-icons/wechat.png +0 -0
  44. package/dist/social-icons/whatsapp.png +0 -0
  45. package/dist/social-icons/x.png +0 -0
  46. package/dist/social-icons/yelp.png +0 -0
  47. package/dist/social-icons/youtube.png +0 -0
  48. package/dist/utilities/playground.constants.d.ts +1 -0
  49. package/dist/utilities/socialBrandIcons.d.ts +9 -6
  50. package/package.json +6 -3
@@ -1,6 +1,6 @@
1
- import { a as e, b as t, c as n, d as r, f as i, h as a, i as o, l as s, m as c, n as l, o as u, p as d, r as f, s as p, t as m } from "./iconSvgStatic-D5PrYZfC.js";
1
+ import { a as e, b as t, c as n, d as r, f as i, h as a, i as o, l as s, m as c, n as l, o as u, p as d, r as f, s as p, t as m, v as h } from "./iconSvgStatic-CUYMC8Am.js";
2
2
  //#region src/utilities/playground.constants.ts
3
- var h = (e) => `https://picsum.photos/seed/${encodeURIComponent(e)}/1200/800`, g = [
3
+ var g = (e) => `https://picsum.photos/seed/${encodeURIComponent(e)}/1200/800`, _ = [
4
4
  {
5
5
  id: "all",
6
6
  label: "All sources"
@@ -17,7 +17,7 @@ var h = (e) => `https://picsum.photos/seed/${encodeURIComponent(e)}/1200/800`, g
17
17
  id: "pixabay",
18
18
  label: "Pixabay"
19
19
  }
20
- ], _ = [
20
+ ], v = [
21
21
  {
22
22
  id: "surface-book",
23
23
  label: "Surface Book",
@@ -84,40 +84,10 @@ var h = (e) => `https://picsum.photos/seed/${encodeURIComponent(e)}/1200/800`, g
84
84
  width: 375,
85
85
  category: "mobile"
86
86
  }
87
- ], v = 1280, y = [
88
- {
89
- id: "facebook",
90
- label: "Facebook"
91
- },
92
- {
93
- id: "instagram",
94
- label: "Instagram"
95
- },
96
- {
97
- id: "linkedin",
98
- label: "LinkedIn"
99
- },
100
- {
101
- id: "x",
102
- label: "X"
103
- },
104
- {
105
- id: "youtube",
106
- label: "YouTube"
107
- },
108
- {
109
- id: "pinterest",
110
- label: "Pinterest"
111
- },
112
- {
113
- id: "whatsapp",
114
- label: "WhatsApp"
115
- },
116
- {
117
- id: "tiktok",
118
- label: "TikTok"
119
- }
120
- ], b = [
87
+ ], y = 1280, b = Object.entries(h).map(([e, t]) => ({
88
+ id: e,
89
+ label: t.label
90
+ })), x = [
121
91
  {
122
92
  label: "Text",
123
93
  value: "text"
@@ -150,7 +120,7 @@ var h = (e) => `https://picsum.photos/seed/${encodeURIComponent(e)}/1200/800`, g
150
120
  label: "Checkbox",
151
121
  value: "checkbox"
152
122
  }
153
- ], x = [
123
+ ], S = [
154
124
  {
155
125
  label: "1 Column",
156
126
  widths: ["100%"],
@@ -199,7 +169,7 @@ var h = (e) => `https://picsum.photos/seed/${encodeURIComponent(e)}/1200/800`, g
199
169
  "25%"
200
170
  ]
201
171
  }
202
- ], S = [
172
+ ], C = [
203
173
  {
204
174
  label: "Roboto",
205
175
  value: "'Roboto', sans-serif",
@@ -600,8 +570,8 @@ var h = (e) => `https://picsum.photos/seed/${encodeURIComponent(e)}/1200/800`, g
600
570
  value: "'Great Vibes', cursive",
601
571
  style: "handwriting"
602
572
  }
603
- ], C = new Map(S.map((e) => [e.value, e.label]));
604
- function w(e, t = []) {
573
+ ], w = new Map(C.map((e) => [e.value, e.label]));
574
+ function T(e, t = []) {
605
575
  let n = /* @__PURE__ */ new Set(), r = (e) => {
606
576
  if (!e) return;
607
577
  let t = Array.isArray(e.columns) ? e.columns : [];
@@ -619,17 +589,17 @@ function w(e, t = []) {
619
589
  for (let e of t) typeof e == "string" && e.trim() && n.add(e.trim());
620
590
  return n;
621
591
  }
622
- function T(e) {
592
+ function E(e) {
623
593
  let t = /* @__PURE__ */ new Set();
624
594
  for (let n of e) {
625
- let e = C.get(n);
595
+ let e = w.get(n);
626
596
  e && t.add(e);
627
597
  }
628
598
  return t.size === 0 ? null : `https://fonts.googleapis.com/css?family=${Array.from(t).map((e) => `${encodeURIComponent(e).replace(/%20/g, "+")}:400,700`).join("|")}&display=swap`;
629
599
  }
630
600
  //#endregion
631
601
  //#region src/utilities/responsiveDefaults.ts
632
- var ee = {
602
+ var D = {
633
603
  tablet: {
634
604
  thresholdPx: 24,
635
605
  scale: .85,
@@ -640,7 +610,7 @@ var ee = {
640
610
  scale: .7,
641
611
  floorPx: 14
642
612
  }
643
- }, E = {
613
+ }, ee = {
644
614
  tablet: {
645
615
  thresholdPx: 320,
646
616
  scale: .8,
@@ -651,7 +621,7 @@ var ee = {
651
621
  scale: .55,
652
622
  floorPx: 140
653
623
  }
654
- }, D = {
624
+ }, O = {
655
625
  tablet: {
656
626
  thresholdPx: 48,
657
627
  scale: .75,
@@ -662,7 +632,7 @@ var ee = {
662
632
  scale: .55,
663
633
  floorPx: 16
664
634
  }
665
- }, O = {
635
+ }, k = {
666
636
  tablet: {
667
637
  thresholdPx: 500,
668
638
  scale: 1,
@@ -673,11 +643,11 @@ var ee = {
673
643
  scale: 1,
674
644
  floorPx: 0
675
645
  }
676
- }, k = ["fontSize"], A = [
646
+ }, A = ["fontSize"], j = [
677
647
  "height",
678
648
  "minHeight",
679
649
  "maxHeight"
680
- ], j = [
650
+ ], M = [
681
651
  "padding",
682
652
  "paddingTop",
683
653
  "paddingBottom",
@@ -686,8 +656,8 @@ var ee = {
686
656
  "margin",
687
657
  "marginTop",
688
658
  "marginBottom"
689
- ], M = ["width", "maxWidth"];
690
- function N(e) {
659
+ ], N = ["width", "maxWidth"];
660
+ function P(e) {
691
661
  if (typeof e == "number" && Number.isFinite(e)) return e;
692
662
  if (typeof e != "string") return null;
693
663
  let t = e.trim().match(/^(-?\d+(?:\.\d+)?)px$/);
@@ -695,48 +665,48 @@ function N(e) {
695
665
  let n = parseFloat(t[1]);
696
666
  return Number.isFinite(n) ? n : null;
697
667
  }
698
- function P(e, t) {
668
+ function F(e, t) {
699
669
  return e < t.thresholdPx ? null : Math.max(Math.round(e * t.scale), t.floorPx);
700
670
  }
701
- function F(e, t) {
671
+ function I(e, t) {
702
672
  if (!e || typeof e != "object") return {};
703
673
  let n = {};
704
- for (let r of k) {
705
- let i = N(e[r]);
706
- if (i === null) continue;
707
- let a = P(i, ee[t]);
708
- a !== null && (n[r] = `${a}px`);
709
- }
710
674
  for (let r of A) {
711
- let i = N(e[r]);
675
+ let i = P(e[r]);
712
676
  if (i === null) continue;
713
- let a = P(i, E[t]);
677
+ let a = F(i, D[t]);
714
678
  a !== null && (n[r] = `${a}px`);
715
679
  }
716
680
  for (let r of j) {
717
- let i = N(e[r]);
681
+ let i = P(e[r]);
718
682
  if (i === null) continue;
719
- let a = P(i, D[t]);
683
+ let a = F(i, ee[t]);
720
684
  a !== null && (n[r] = `${a}px`);
721
685
  }
722
686
  for (let r of M) {
723
- let i = N(e[r]);
724
- i !== null && i >= O[t].thresholdPx && (n[r] = "100%");
687
+ let i = P(e[r]);
688
+ if (i === null) continue;
689
+ let a = F(i, O[t]);
690
+ a !== null && (n[r] = `${a}px`);
691
+ }
692
+ for (let r of N) {
693
+ let i = P(e[r]);
694
+ i !== null && i >= k[t].thresholdPx && (n[r] = "100%");
725
695
  }
726
696
  return n;
727
697
  }
728
- function I(e, t, n) {
698
+ function L(e, t, n) {
729
699
  let r = e || {};
730
700
  return n ? {
731
701
  ...r,
732
- ...F(r, n),
702
+ ...I(r, n),
733
703
  ...t || {}
734
704
  } : r;
735
705
  }
736
706
  //#endregion
737
707
  //#region src/utilities/compiler.ts
738
- var L = "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif";
739
- function R(e) {
708
+ var R = "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif";
709
+ function z(e) {
740
710
  if (!e || typeof e != "object") return null;
741
711
  if (Array.isArray(e.columns) && e.columns.length > 0) return e;
742
712
  let t = (e.type || "").toLowerCase(), n = e.props || e.content || e.attributes || e.data || e.payload || e, r = e.style || {};
@@ -990,7 +960,7 @@ function R(e) {
990
960
  }
991
961
  }
992
962
  }
993
- var z = (e = {}) => !e || typeof e != "object" ? "" : Object.entries(e).filter(([e, t]) => t != null && t !== "").map(([e, t]) => {
963
+ var B = (e = {}) => !e || typeof e != "object" ? "" : Object.entries(e).filter(([e, t]) => t != null && t !== "").map(([e, t]) => {
994
964
  let n = e.replace(/([A-Z])/g, "-$1").toLowerCase(), r = t;
995
965
  return typeof t == "number" && [
996
966
  "padding",
@@ -1001,25 +971,33 @@ var z = (e = {}) => !e || typeof e != "object" ? "" : Object.entries(e).filter((
1001
971
  "width",
1002
972
  "height"
1003
973
  ].some((t) => e.toLowerCase().includes(t)) && (r = `${t}px`), `${n}: ${r};`;
1004
- }).join(" "), B = (e = {}) => z(e).replace(/;(\s|$)/g, " !important;$1");
1005
- function V(e) {
974
+ }).join(" "), V = (e = {}) => B(e).replace(/;(\s|$)/g, " !important;$1");
975
+ function H(e) {
1006
976
  if (typeof e != "string") return !1;
1007
977
  let t = e.toLowerCase();
1008
978
  return t.includes("javascript:") || t.includes("vbscript:") || t.includes("expression") || t.includes("url(") || t.includes("@import") || t.includes("-moz-binding") || t.includes("behavior") || t.includes("</style") || /\\/.test(e);
1009
979
  }
1010
- function H(e, t, n, r, i) {
980
+ function U(e, t, n, r, i) {
1011
981
  let a = {
1012
- ...F(n, r),
982
+ ...I(n, r),
1013
983
  ...i || {}
1014
984
  };
1015
- for (let e of Object.keys(a)) V(a[e]) && delete a[e];
985
+ for (let e of Object.keys(a)) H(a[e]) && delete a[e];
1016
986
  if (Object.keys(a).length === 0) return;
1017
- let o = B(a);
987
+ let o = V(a);
1018
988
  if (!o) return;
1019
989
  let s = String(t).replace(/["\\]/g, "");
1020
990
  e[r].push(`[data-plexo-id="${s}"] { ${o} }`);
1021
991
  }
1022
- var U = () => ({
992
+ function W(e, t) {
993
+ if (e.type !== "menu" || !t || t.textAlign === void 0) return t;
994
+ let n = t.textAlign === "center" ? "center" : t.textAlign === "right" ? "flex-end" : "flex-start";
995
+ return {
996
+ ...t,
997
+ justifyContent: n
998
+ };
999
+ }
1000
+ var G = () => ({
1023
1001
  backgroundColor: "#ffffff",
1024
1002
  borderRadius: "20px",
1025
1003
  width: "100%",
@@ -1042,11 +1020,11 @@ var U = () => ({
1042
1020
  buttonPaddingRight: "14px",
1043
1021
  buttonFontSize: "13px",
1044
1022
  buttonFontWeight: "700"
1045
- }), W = (e) => (e || "").replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), G = (e, t) => {
1023
+ }), K = (e) => (e || "").replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), q = (e, t) => {
1046
1024
  if (typeof t != "string") return "";
1047
1025
  let n = t.trim();
1048
- return n ? ` ${e}="${W(n)}"` : "";
1049
- }, K = [
1026
+ return n ? ` ${e}="${K(n)}"` : "";
1027
+ }, J = [
1050
1028
  "fieldSpacing",
1051
1029
  "buttonBackgroundColor",
1052
1030
  "buttonTextColor",
@@ -1066,9 +1044,9 @@ var U = () => ({
1066
1044
  "buttonWidth",
1067
1045
  "buttonHeight",
1068
1046
  "buttonAlign"
1069
- ], q = (e) => {
1047
+ ], Y = (e) => {
1070
1048
  if (!e || typeof e != "object") return "";
1071
- let t = e.kind || "text", n = W(e.name || e.label || "field"), r = e.required ? " required" : "", i = z({
1049
+ let t = e.kind || "text", n = K(e.name || e.label || "field"), r = e.required ? " required" : "", i = B({
1072
1050
  fontSize: e.fontSize || "13px",
1073
1051
  borderRadius: e.borderRadius || "12px",
1074
1052
  borderWidth: e.borderWidth || "1px",
@@ -1076,19 +1054,19 @@ var U = () => ({
1076
1054
  borderStyle: "solid",
1077
1055
  color: e.inputTextColor
1078
1056
  }), a = e.showLabel === !1 ? "" : `<label style="display: block; margin-bottom: 4px; font-size: ${e.fontSize || "12px"}; font-weight: ${e.labelFontWeight || "700"}; color: ${e.labelColor || "inherit"};">${e.label || ""}${e.required ? " <span style=\"color:#e11d48;\">*</span>" : ""}</label>`;
1079
- return t === "textarea" ? `${a}<textarea name="${n}" placeholder="${W(e.placeholder || "")}" style="width: 100%; box-sizing: border-box; padding: 10px 12px; ${i}"${r}></textarea>` : t === "select" ? `${a}<select name="${n}" style="width: 100%; box-sizing: border-box; padding: 10px 12px; ${i}"${r}>${(Array.isArray(e.options) ? e.options : []).map((e) => `<option value="${W(e?.value ?? "")}">${e?.label ?? e?.value ?? ""}</option>`).join("")}</select>` : t === "radio" || t === "checkbox" ? `${a}<div style="display: flex; flex-wrap: wrap; gap: 8px;">${(Array.isArray(e.options) && e.options.length > 0 ? e.options : [{
1057
+ return t === "textarea" ? `${a}<textarea name="${n}" placeholder="${K(e.placeholder || "")}" style="width: 100%; box-sizing: border-box; padding: 10px 12px; ${i}"${r}></textarea>` : t === "select" ? `${a}<select name="${n}" style="width: 100%; box-sizing: border-box; padding: 10px 12px; ${i}"${r}>${(Array.isArray(e.options) ? e.options : []).map((e) => `<option value="${K(e?.value ?? "")}">${e?.label ?? e?.value ?? ""}</option>`).join("")}</select>` : t === "radio" || t === "checkbox" ? `${a}<div style="display: flex; flex-wrap: wrap; gap: 8px;">${(Array.isArray(e.options) && e.options.length > 0 ? e.options : [{
1080
1058
  label: e.label || "Option",
1081
1059
  value: e.name || "option"
1082
- }]).map((r) => `<label style="display: inline-flex; align-items: center; gap: 6px; font-size: ${e.fontSize || "12px"};"><input type="${t}" name="${n}" value="${W(r?.value ?? "")}" />${r?.label ?? r?.value ?? ""}</label>`).join("")}</div>` : `${a}<input type="${W(t)}" name="${n}" placeholder="${W(e.placeholder || "")}" style="width: 100%; box-sizing: border-box; padding: 10px 12px; ${i}"${r} />`;
1060
+ }]).map((r) => `<label style="display: inline-flex; align-items: center; gap: 6px; font-size: ${e.fontSize || "12px"};"><input type="${t}" name="${n}" value="${K(r?.value ?? "")}" />${r?.label ?? r?.value ?? ""}</label>`).join("")}</div>` : `${a}<input type="${K(t)}" name="${n}" placeholder="${K(e.placeholder || "")}" style="width: 100%; box-sizing: border-box; padding: 10px 12px; ${i}"${r} />`;
1083
1061
  };
1084
- function J(e, t, n) {
1062
+ function X(e, t, n) {
1085
1063
  if (e === "none") return "";
1086
- let r = W(t);
1064
+ let r = K(t);
1087
1065
  return e === "plus" ? `<span data-acc-icon style="font-size: 14px; line-height: 1; font-weight: 700; color: ${r};">${n ? "−" : "+"}</span>` : e === "arrow" ? `<span data-acc-icon style="font-size: 14px; line-height: 1; display: inline-block; color: ${r}; transform: ${n ? "rotate(90deg)" : "none"}; transition: transform 0.2s ease;">›</span>` : `<svg data-acc-icon width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="${r}" stroke-width="2.5" style="flex-shrink: 0; transform: ${n ? "rotate(180deg)" : "none"}; transition: transform 0.2s ease;"><path stroke-linecap="round" stroke-linejoin="round" d="M19.5 8.25l-7.5 7.5-7.5-7.5"/></svg>`;
1088
1066
  }
1089
- function Y(e, t, n) {
1067
+ function Z(e, t, n) {
1090
1068
  return e.map((r, i) => {
1091
- let a = i === e.length - 1, o = z({ borderBottom: n.showDividers && !a ? `1px solid ${t.dividerColor || "#e2e8f0"}` : void 0 }), s = z({
1069
+ let a = i === e.length - 1, o = B({ borderBottom: n.showDividers && !a ? `1px solid ${t.dividerColor || "#e2e8f0"}` : void 0 }), s = B({
1092
1070
  display: "flex",
1093
1071
  alignItems: "center",
1094
1072
  gap: "8px",
@@ -1105,35 +1083,35 @@ function Y(e, t, n) {
1105
1083
  border: "none",
1106
1084
  font: "inherit",
1107
1085
  background: void 0
1108
- }), c = z({
1086
+ }), c = B({
1109
1087
  display: "grid",
1110
1088
  gridTemplateRows: r.defaultOpen ? "1fr" : "0fr",
1111
1089
  transition: n.animated ? "grid-template-rows 0.25s ease" : void 0,
1112
1090
  backgroundColor: t.contentBackgroundColor || "#ffffff"
1113
- }), l = z({
1091
+ }), l = B({
1114
1092
  padding: t.contentPadding || "14px",
1115
1093
  color: t.contentTextColor || "#475569",
1116
1094
  fontSize: t.contentFontSize || "13px",
1117
1095
  whiteSpace: "pre-wrap"
1118
- }), u = J(n.iconStyle, t.iconColor || "#64748b", !!r.defaultOpen), d = W(r.title), f = W(r.content), p = r.children.length ? `<div class="plexo-acc-group" style="margin-top: 10px;">${Y(r.children, t, n)}</div>` : "";
1096
+ }), u = X(n.iconStyle, t.iconColor || "#64748b", !!r.defaultOpen), d = K(r.title), f = K(r.content), p = r.children.length ? `<div class="plexo-acc-group" style="margin-top: 10px;">${Z(r.children, t, n)}</div>` : "";
1119
1097
  return `<div class="plexo-acc-item" style="${o}"><button type="button" data-acc-header data-acc-open="${r.defaultOpen ? "1" : "0"}" style="${s}"><span style="flex: 1;">${d}</span>${u}</button><div data-acc-panel style="${c}"><div style="overflow: hidden;"><div style="${l}">${f}${p}</div></div></div></div>`;
1120
1098
  }).join("");
1121
1099
  }
1122
- function X(e) {
1100
+ function te(e) {
1123
1101
  return `<!-- Unsupported block ${String(e)} -->`;
1124
1102
  }
1125
- var Z = (t) => {
1103
+ var ne = (t) => {
1126
1104
  if (!t || typeof t != "object") return "";
1127
- let h = t.style || {}, g = z(t.type === "form_container" ? {
1128
- ...U(),
1105
+ let h = t.style || {}, g = B(t.type === "form_container" ? {
1106
+ ...G(),
1129
1107
  ...h
1130
- } : h), _ = t.attributes || {}, v = ` data-plexo-id="${W(t.id)}"`;
1108
+ } : h), _ = t.attributes || {}, v = ` data-plexo-id="${K(t.id)}"`;
1131
1109
  switch (t.type) {
1132
1110
  case "heading": return `<h2${v} style="margin-top: 0; margin-bottom: 8px; ${g}">${_.text || "Heading"}</h2>`;
1133
1111
  case "paragraph": return `<p${v} style="margin-top: 0; margin-bottom: 12px; ${g}">${_.text || "Paragraph text content."}</p>`;
1134
1112
  case "text": return `<div${v} style="${g}">${_.text || ""}</div>`;
1135
1113
  case "button": {
1136
- let n = e(t), r = z({
1114
+ let n = e(t), r = B({
1137
1115
  ...h,
1138
1116
  width: n.width,
1139
1117
  height: n.height
@@ -1141,7 +1119,7 @@ var Z = (t) => {
1141
1119
  return `<div style="text-align: ${h.textAlign || "center"};"><a${v} href="${_.href || "#"}" target="${_.openInNewTab ? "_blank" : "_self"}" style="display: inline-block; text-decoration: none; ${r}">${_.text || "Button"}</a></div>`;
1142
1120
  }
1143
1121
  case "image": {
1144
- let e = s(t), n = h.textAlign === "center" ? "margin: 0 auto; display: block;" : h.textAlign === "right" ? "margin-left: auto; display: block;" : "display: inline-block;", r = z({
1122
+ let e = s(t), n = h.textAlign === "center" ? "margin: 0 auto; display: block;" : h.textAlign === "right" ? "margin-left: auto; display: block;" : "display: inline-block;", r = B({
1145
1123
  ...h,
1146
1124
  width: e.width,
1147
1125
  height: e.height
@@ -1156,12 +1134,12 @@ var Z = (t) => {
1156
1134
  </div>`;
1157
1135
  case "form_container": {
1158
1136
  let e = {
1159
- ...U(),
1137
+ ...G(),
1160
1138
  ...h
1161
1139
  }, n = {};
1162
- for (let t of Object.keys(e)) K.includes(t) || (n[t] = e[t]);
1140
+ for (let t of Object.keys(e)) J.includes(t) || (n[t] = e[t]);
1163
1141
  n.height = u(t);
1164
- let r = z(n), i = p(Array.isArray(_.fields) ? _.fields : []), a = e.fieldSpacing || "12px", s = i.map((e) => `<div style="margin-bottom: ${a};">${q(e)}</div>`).join(""), c = _.buttonAutoWidth === !1 ? e.buttonWidth || "100%" : "auto", l = e.buttonAlign === "left" ? "flex-start" : e.buttonAlign === "right" ? "flex-end" : "center", d = _.buttonAutoHeight === !1 && e.buttonHeight || "auto", f = z({
1142
+ let r = B(n), i = p(Array.isArray(_.fields) ? _.fields : []), a = e.fieldSpacing || "12px", s = i.map((e) => `<div style="margin-bottom: ${a};">${Y(e)}</div>`).join(""), c = _.buttonAutoWidth === !1 ? e.buttonWidth || "100%" : "auto", l = e.buttonAlign === "left" ? "flex-start" : e.buttonAlign === "right" ? "flex-end" : "center", d = _.buttonAutoHeight === !1 && e.buttonHeight || "auto", f = B({
1165
1143
  backgroundColor: e.buttonBackgroundColor,
1166
1144
  color: e.buttonTextColor,
1167
1145
  borderRadius: e.buttonBorderRadius,
@@ -1178,15 +1156,15 @@ var Z = (t) => {
1178
1156
  width: c,
1179
1157
  height: d
1180
1158
  });
1181
- return `<form${v} action="${W(_.actionUrl || _.action || "#")}" method="${W(_.method || "POST")}" style="${r}">${s}<div style="display: flex; width: 100%; justify-content: ${l};"><button type="submit" style="border: 0; cursor: pointer; ${f}">${_.submitLabel || "Submit"}</button></div></form>`;
1159
+ return `<form${v} action="${K(_.actionUrl || _.action || "#")}" method="${K(_.method || "POST")}" style="${r}">${s}<div style="display: flex; width: 100%; justify-content: ${l};"><button type="submit" style="border: 0; cursor: pointer; ${f}">${_.submitLabel || "Submit"}</button></div></form>`;
1182
1160
  }
1183
1161
  case "input": {
1184
- let e = _.inputType || _.type || "text", t = W(_.name || _.fieldName || "field"), n = W(_.placeholder || ""), r = _.required ? " required" : "";
1185
- return `<input${v} type="${W(e)}" name="${t}" placeholder="${n}" style="width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid #334155; ${g}"${r} />`;
1162
+ let e = _.inputType || _.type || "text", t = K(_.name || _.fieldName || "field"), n = K(_.placeholder || ""), r = _.required ? " required" : "";
1163
+ return `<input${v} type="${K(e)}" name="${t}" placeholder="${n}" style="width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid #334155; ${g}"${r} />`;
1186
1164
  }
1187
- case "textarea": return `<textarea${v} name="${W(_.name || _.fieldName || "field")}" placeholder="${W(_.placeholder || "")}" style="width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid #334155; ${g}"${_.required ? " required" : ""}></textarea>`;
1188
- case "select": return `<select${v} name="${W(_.name || _.fieldName || "field")}" style="width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid #334155; ${g}"${_.required ? " required" : ""}>${(Array.isArray(_.options) ? _.options : []).map((e) => `<option value="${W(e?.value ?? "")}">${e?.label ?? e?.value ?? ""}</option>`).join("")}</select>`;
1189
- case "html": return `<div${v} style="${z({
1165
+ case "textarea": return `<textarea${v} name="${K(_.name || _.fieldName || "field")}" placeholder="${K(_.placeholder || "")}" style="width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid #334155; ${g}"${_.required ? " required" : ""}></textarea>`;
1166
+ case "select": return `<select${v} name="${K(_.name || _.fieldName || "field")}" style="width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid #334155; ${g}"${_.required ? " required" : ""}>${(Array.isArray(_.options) ? _.options : []).map((e) => `<option value="${K(e?.value ?? "")}">${e?.label ?? e?.value ?? ""}</option>`).join("")}</select>`;
1167
+ case "html": return `<div${v} style="${B({
1190
1168
  ...h,
1191
1169
  height: n(t, "auto")
1192
1170
  })}">${_.htmlContent || _.text || ""}</div>`;
@@ -1198,12 +1176,12 @@ var Z = (t) => {
1198
1176
  case "blog_categories":
1199
1177
  case "blog_comments":
1200
1178
  case "blog_post_list": {
1201
- let e = t.type.replace(/^blog_/, "").replace(/_([a-z])/g, (e, t) => t.toUpperCase()), n = z(h);
1202
- return `<div${v} data-plexo-blog-${e}="true"${G("data-plexo-blog-prefix", _.prefix)} style="${n}"></div>`;
1179
+ let e = t.type.replace(/^blog_/, "").replace(/_([a-z])/g, (e, t) => t.toUpperCase()), n = B(h);
1180
+ return `<div${v} data-plexo-blog-${e}="true"${q("data-plexo-blog-prefix", _.prefix)} style="${n}"></div>`;
1203
1181
  }
1204
1182
  case "social": {
1205
1183
  let e = i(t), n = h.textAlign === "center" ? "center" : h.textAlign === "right" ? "flex-end" : "flex-start";
1206
- return `<div${v} style="${z({
1184
+ return `<div${v} style="${B({
1207
1185
  padding: h.padding,
1208
1186
  margin: h.margin,
1209
1187
  display: "flex",
@@ -1211,7 +1189,7 @@ var Z = (t) => {
1211
1189
  gap: h.iconSpacing || "8px",
1212
1190
  justifyContent: n
1213
1191
  })}">${e.map((e) => {
1214
- let t = z({
1192
+ let t = B({
1215
1193
  width: e.size,
1216
1194
  height: e.size,
1217
1195
  padding: "8px",
@@ -1223,33 +1201,33 @@ var Z = (t) => {
1223
1201
  justifyContent: "center",
1224
1202
  overflow: "hidden"
1225
1203
  });
1226
- return `<a href="${W(e.url)}" style="${t} text-decoration: none;">${l(e.provider, e.color)}</a>`;
1204
+ return `<a href="${K(e.url)}" style="${t} text-decoration: none;">${l(e.provider, e.color)}</a>`;
1227
1205
  }).join("")}</div>`;
1228
1206
  }
1229
1207
  case "menu": {
1230
1208
  let e = r(t), n = h.textAlign === "center" ? "center" : h.textAlign === "right" ? "flex-end" : "flex-start";
1231
- return `<div${v} style="${z({
1209
+ return `<div${v} style="${B({
1232
1210
  ...h,
1233
1211
  display: "flex",
1234
1212
  flexWrap: "wrap",
1235
1213
  gap: "16px",
1236
1214
  justifyContent: n
1237
- })}">${e.map((e) => `<a href="${W(e.href)}" style="text-decoration: none; color: inherit; font-weight: ${h.fontWeight || 600};">${W(e.label)}</a>`).join("")}</div>`;
1215
+ })}">${e.map((e) => `<a href="${K(e.href)}" style="text-decoration: none; color: inherit; font-weight: ${h.fontWeight || 600};">${K(e.label)}</a>`).join("")}</div>`;
1238
1216
  }
1239
1217
  case "icon": {
1240
- let e = h.fontSize || `${_.iconSize || 48}px`, t = h.color || "#1e293b", n = parseInt(String(e), 10) || 48, r = m(_.iconName, n, t), i = h.textAlign === "right" ? "flex-end" : h.textAlign === "left" ? "flex-start" : "center", a = z({
1218
+ let e = h.fontSize || `${_.iconSize || 48}px`, t = h.color || "#1e293b", n = parseInt(String(e), 10) || 48, r = m(_.iconName, n, t), i = h.textAlign === "right" ? "flex-end" : h.textAlign === "left" ? "flex-start" : "center", a = B({
1241
1219
  padding: h.padding,
1242
1220
  margin: h.margin,
1243
1221
  display: "flex",
1244
1222
  justifyContent: i
1245
1223
  }), o = typeof _.href == "string" ? _.href.trim() : "", s = `<span style="display: inline-flex; align-items: center; justify-content: center; color: ${t};">${r}</span>`;
1246
- return `<div style="${a}">${o ? `<a${v} href="${W(o)}" target="${_.openInNewTab ? "_blank" : "_self"}" style="text-decoration: none;">${s}</a>` : `<span${v}>${s}</span>`}</div>`;
1224
+ return `<div style="${a}">${o ? `<a${v} href="${K(o)}" target="${_.openInNewTab ? "_blank" : "_self"}" style="text-decoration: none;">${s}</a>` : `<span${v}>${s}</span>`}</div>`;
1247
1225
  }
1248
1226
  case "table": {
1249
1227
  let e = d(t), n = `${h.borderWidth || "1px"} ${h.borderStyle || "solid"} ${h.borderColor || "#cbd5e1"}`, r = (t, r, i) => {
1250
1228
  let a = i ? "th" : "td", o = i ? h.headerBgColor || "#f8fafc" : e.striped && r % 2 == 1 ? "#f8fafc" : h.contentBgColor || "#ffffff", s = i ? h.headerTextColor || "#1e293b" : h.contentTextColor || "#475569", c = i ? h.headerTextAlign || "left" : h.contentTextAlign || "left";
1251
1229
  return `<tr>${t.map((e) => {
1252
- let t = z({
1230
+ let t = B({
1253
1231
  padding: h.cellPadding || "8px",
1254
1232
  border: n,
1255
1233
  backgroundColor: o,
@@ -1261,11 +1239,11 @@ var Z = (t) => {
1261
1239
  });
1262
1240
  return `<${a} style="${t}">${e || "&nbsp;"}</${a}>`;
1263
1241
  }).join("")}</tr>`;
1264
- }, i = e.enableHeader && e.cells.length > 0 ? `<thead>${r(e.cells[0], 0, !0)}</thead>` : "", a = +!!e.enableHeader, o = e.enableFooter ? e.cells.length - 1 : e.cells.length, s = e.cells.slice(a, Math.max(a, o)).map((e, t) => r(e, t, !1)).join(""), c = e.enableFooter && e.cells.length > a ? `<tfoot>${r(e.cells[e.cells.length - 1], e.cells.length - 1, !1)}</tfoot>` : "", l = z({
1242
+ }, i = e.enableHeader && e.cells.length > 0 ? `<thead>${r(e.cells[0], 0, !0)}</thead>` : "", a = +!!e.enableHeader, o = e.enableFooter ? e.cells.length - 1 : e.cells.length, s = e.cells.slice(a, Math.max(a, o)).map((e, t) => r(e, t, !1)).join(""), c = e.enableFooter && e.cells.length > a ? `<tfoot>${r(e.cells[e.cells.length - 1], e.cells.length - 1, !1)}</tfoot>` : "", l = B({
1265
1243
  borderCollapse: "collapse",
1266
1244
  width: "100%"
1267
1245
  });
1268
- return `<div${v} style="${z({
1246
+ return `<div${v} style="${B({
1269
1247
  padding: h.padding,
1270
1248
  margin: h.margin,
1271
1249
  overflowX: "auto"
@@ -1273,33 +1251,33 @@ var Z = (t) => {
1273
1251
  }
1274
1252
  case "video": {
1275
1253
  let e = a(_.videoUrl), t = _.linkType === "email" ? `mailto:${_.href || ""}` : _.href || _.videoUrl || "#", n = _.target || "_blank";
1276
- return `<div${v} style="${z({
1254
+ return `<div${v} style="${B({
1277
1255
  padding: h.padding,
1278
1256
  margin: h.margin,
1279
1257
  borderRadius: h.borderRadius,
1280
1258
  overflow: "hidden"
1281
- })}"><a href="${W(t)}" target="${W(n)}" style="position: relative; display: block; text-decoration: none;"><img src="${W(e.thumbnailUrl)}" alt="${W(_.alt || "Video preview")}" style="width: 100%; display: block;" /><span style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 56px; height: 56px; border-radius: 9999px; background: rgba(15, 23, 42, 0.75); display: flex; align-items: center; justify-content: center;"><span style="width: 0; height: 0; border-top: 10px solid transparent; border-bottom: 10px solid transparent; border-left: 16px solid #ffffff; margin-left: 4px;"></span></span></a></div>`;
1259
+ })}"><a href="${K(t)}" target="${K(n)}" style="position: relative; display: block; text-decoration: none;"><img src="${K(e.thumbnailUrl)}" alt="${K(_.alt || "Video preview")}" style="width: 100%; display: block;" /><span style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 56px; height: 56px; border-radius: 9999px; background: rgba(15, 23, 42, 0.75); display: flex; align-items: center; justify-content: center;"><span style="width: 0; height: 0; border-top: 10px solid transparent; border-bottom: 10px solid transparent; border-left: 16px solid #ffffff; margin-left: 4px;"></span></span></a></div>`;
1282
1260
  }
1283
1261
  case "timer": {
1284
- let e = _.showLabels !== !1, n = z({
1262
+ let e = _.showLabels !== !1, n = B({
1285
1263
  fontFamily: h.digitsFontFamily,
1286
1264
  fontSize: h.digitsFontSize || "40px",
1287
1265
  color: h.digitsColor || "#1e293b",
1288
1266
  fontWeight: "800"
1289
- }), r = z({
1267
+ }), r = B({
1290
1268
  fontFamily: h.labelsFontFamily,
1291
1269
  fontSize: h.labelsFontSize || "16px",
1292
1270
  color: h.labelsColor || "#64748b"
1293
- }), i = z({
1271
+ }), i = B({
1294
1272
  backgroundColor: h.backgroundColor || "#f8fafc",
1295
1273
  borderRadius: h.borderRadius || "8px",
1296
1274
  padding: h.padding || "16px",
1297
1275
  textAlign: "center"
1298
- }), a = (t, i, a) => `<div style="display: inline-flex; flex-direction: column; align-items: center; padding: 0 10px;"><span data-unit="${t}" style="${n}">${a}</span>${e ? `<span style="${r}">${i}</span>` : ""}</div>`, o = c(_.targetDate), s = W(_.targetDate || "2026-12-31T23:59:59"), l = `<script>(function(){var wrap=document.querySelector(${JSON.stringify(`[data-plexo-id="${t.id}"]`)});if(!wrap)return;var target=new Date(wrap.getAttribute('data-plexo-target')).getTime();function pad(n){return String(n).padStart(2,'0');}function tick(){var diff=target-Date.now();var d=wrap.querySelector('[data-unit="days"]'),h=wrap.querySelector('[data-unit="hours"]'),m=wrap.querySelector('[data-unit="minutes"]'),s=wrap.querySelector('[data-unit="seconds"]');if(diff<=0){[d,h,m,s].forEach(function(n){if(n)n.textContent='00';});clearInterval(iv);return;}var total=Math.floor(diff/1000);if(d)d.textContent=pad(Math.floor(total/86400));if(h)h.textContent=pad(Math.floor(total%86400/3600));if(m)m.textContent=pad(Math.floor(total%3600/60));if(s)s.textContent=pad(total%60);}tick();var iv=setInterval(tick,1000);})();<\/script>`;
1276
+ }), a = (t, i, a) => `<div style="display: inline-flex; flex-direction: column; align-items: center; padding: 0 10px;"><span data-unit="${t}" style="${n}">${a}</span>${e ? `<span style="${r}">${i}</span>` : ""}</div>`, o = c(_.targetDate), s = K(_.targetDate || "2026-12-31T23:59:59"), l = `<script>(function(){var wrap=document.querySelector(${JSON.stringify(`[data-plexo-id="${t.id}"]`)});if(!wrap)return;var target=new Date(wrap.getAttribute('data-plexo-target')).getTime();function pad(n){return String(n).padStart(2,'0');}function tick(){var diff=target-Date.now();var d=wrap.querySelector('[data-unit="days"]'),h=wrap.querySelector('[data-unit="hours"]'),m=wrap.querySelector('[data-unit="minutes"]'),s=wrap.querySelector('[data-unit="seconds"]');if(diff<=0){[d,h,m,s].forEach(function(n){if(n)n.textContent='00';});clearInterval(iv);return;}var total=Math.floor(diff/1000);if(d)d.textContent=pad(Math.floor(total/86400));if(h)h.textContent=pad(Math.floor(total%86400/3600));if(m)m.textContent=pad(Math.floor(total%3600/60));if(s)s.textContent=pad(total%60);}tick();var iv=setInterval(tick,1000);})();<\/script>`;
1299
1277
  return `<div${v} data-plexo-target="${s}" style="${i}"><div>${a("days", "Days", o.days)}${a("hours", "Hours", o.hours)}${a("minutes", "Mins", o.minutes)}${a("seconds", "Secs", o.seconds)}</div>${l}</div>`;
1300
1278
  }
1301
1279
  case "carousel": {
1302
- let e = Array.isArray(_.images) ? _.images : [], n = z({
1280
+ let e = Array.isArray(_.images) ? _.images : [], n = B({
1303
1281
  padding: h.padding || "10px",
1304
1282
  margin: h.margin,
1305
1283
  backgroundColor: h.backgroundColor,
@@ -1308,51 +1286,51 @@ var Z = (t) => {
1308
1286
  borderRadius: "12px"
1309
1287
  });
1310
1288
  if (e.length === 0) return `<div${v} style="${n}"><div style="padding: 40px; text-align: center; color: #94a3b8;">No images in carousel</div></div>`;
1311
- let r = Math.min(e.length - 1, Math.max(0, parseInt(String(_.activeIdx), 10) || 0)), i = e.map((e, t) => `<div data-slide-idx="${t}" style="display: ${t === r ? "block" : "none"};"><img src="${W(e.src)}" alt="${W(e.alt || e.caption || "")}" style="width: 100%; display: block;" />${e.caption ? `<div style="padding: 8px; text-align: center; background: rgba(15, 23, 42, 0.8); color: #fff; font-size: 12px; font-weight: 600;">${W(e.caption)}</div>` : ""}</div>`).join(""), a = e.length > 1 ? `<div style="display: flex; gap: 6px; justify-content: center; padding: 8px 0;">${e.map((e, t) => `<button type="button" data-dot-idx="${t}" style="width: 8px; height: 8px; border-radius: 9999px; border: none; background: ${t === r ? "#4f46e5" : "#cbd5e1"}; cursor: pointer;"></button>`).join("")}</div>` : "";
1289
+ let r = Math.min(e.length - 1, Math.max(0, parseInt(String(_.activeIdx), 10) || 0)), i = e.map((e, t) => `<div data-slide-idx="${t}" style="display: ${t === r ? "block" : "none"};"><img src="${K(e.src)}" alt="${K(e.alt || e.caption || "")}" style="width: 100%; display: block;" />${e.caption ? `<div style="padding: 8px; text-align: center; background: rgba(15, 23, 42, 0.8); color: #fff; font-size: 12px; font-weight: 600;">${K(e.caption)}</div>` : ""}</div>`).join(""), a = e.length > 1 ? `<div style="display: flex; gap: 6px; justify-content: center; padding: 8px 0;">${e.map((e, t) => `<button type="button" data-dot-idx="${t}" style="width: 8px; height: 8px; border-radius: 9999px; border: none; background: ${t === r ? "#4f46e5" : "#cbd5e1"}; cursor: pointer;"></button>`).join("")}</div>` : "";
1312
1290
  return `<div${v} data-active-idx="${r}" style="${n}">${e.length > 1 ? "<button type=\"button\" data-nav=\"prev\" style=\"position: absolute; left: 8px; top: 40%; transform: translateY(-50%); border: none; background: rgba(15, 23, 42, 0.6); color: #fff; width: 28px; height: 28px; border-radius: 9999px; cursor: pointer;\">‹</button><button type=\"button\" data-nav=\"next\" style=\"position: absolute; right: 8px; top: 40%; transform: translateY(-50%); border: none; background: rgba(15, 23, 42, 0.6); color: #fff; width: 28px; height: 28px; border-radius: 9999px; cursor: pointer;\">›</button>" : ""}${i}${a}${`<script>(function(){var wrap=document.querySelector(${JSON.stringify(`[data-plexo-id="${t.id}"]`)});if(!wrap)return;var slides=wrap.querySelectorAll('[data-slide-idx]');var dots=wrap.querySelectorAll('[data-dot-idx]');function show(n){var idx=(n+slides.length)%slides.length;slides.forEach(function(s,i){s.style.display=i===idx?'block':'none';});dots.forEach(function(d,i){d.style.background=i===idx?'#4f46e5':'#cbd5e1';});wrap.setAttribute('data-active-idx',String(idx));}var prev=wrap.querySelector('[data-nav="prev"]');var next=wrap.querySelector('[data-nav="next"]');if(prev)prev.addEventListener('click',function(){show(parseInt(wrap.getAttribute('data-active-idx')||'0',10)-1);});if(next)next.addEventListener('click',function(){show(parseInt(wrap.getAttribute('data-active-idx')||'0',10)+1);});dots.forEach(function(d,i){d.addEventListener('click',function(){show(i);});});})();<\/script>`}</div>`;
1313
1291
  }
1314
1292
  case "accordion": {
1315
- let e = f(t), n = _.mode === "multi" ? "multi" : "single", r = _.iconStyle || "chevron", i = _.iconPosition === "left", a = _.showDividers !== !1, o = _.animation !== "none", s = z({
1293
+ let e = f(t), n = _.mode === "multi" ? "multi" : "single", r = _.iconStyle || "chevron", i = _.iconPosition === "left", a = _.showDividers !== !1, o = _.animation !== "none", s = B({
1316
1294
  border: `${h.borderWidth || "1px"} ${h.borderStyle || "solid"} ${h.borderColor || "#e2e8f0"}`,
1317
1295
  borderRadius: h.borderRadius || "10px",
1318
1296
  overflow: "hidden",
1319
1297
  margin: h.margin
1320
1298
  });
1321
- return e.length === 0 ? `<div${v} style="${s}"></div>` : `<div${v} data-acc-mode="${n}" data-acc-icon-style="${r}" style="${s}"><div class="plexo-acc-group">${Y(e, h, {
1299
+ return e.length === 0 ? `<div${v} style="${s}"></div>` : `<div${v} data-acc-mode="${n}" data-acc-icon-style="${r}" style="${s}"><div class="plexo-acc-group">${Z(e, h, {
1322
1300
  iconStyle: r,
1323
1301
  iconOnLeft: i,
1324
1302
  showDividers: a,
1325
1303
  animated: o
1326
1304
  })}</div>${`<script>(function(){var root=document.querySelector(${JSON.stringify(`[data-plexo-id="${t.id}"]`)});if(!root)return;var mode=root.getAttribute('data-acc-mode')||'single';var iconStyle=root.getAttribute('data-acc-icon-style')||'chevron';function setIconState(icon,open){if(!icon)return;if(iconStyle==='plus'){icon.textContent=open?'−':'+';}else if(iconStyle==='arrow'){icon.style.transform=open?'rotate(90deg)':'';}else if(iconStyle==='chevron'){icon.style.transform=open?'rotate(180deg)':'';}}var headers=root.querySelectorAll('[data-acc-header]');headers.forEach(function(header){header.addEventListener('click',function(){var item=header.parentElement;var group=item.parentElement;var panel=item.children[1];var isOpen=header.getAttribute('data-acc-open')==='1';if(mode!=='multi'&&group){Array.prototype.forEach.call(group.children,function(sib){if(sib===item)return;var sh=sib.children[0];var sp=sib.children[1];if(sh){sh.setAttribute('data-acc-open','0');setIconState(sh.querySelector('[data-acc-icon]'),false);}if(sp)sp.style.gridTemplateRows='0fr';});}var next=!isOpen;header.setAttribute('data-acc-open',next?'1':'0');panel.style.gridTemplateRows=next?'1fr':'0fr';setIconState(header.querySelector('[data-acc-icon]'),next);});});})();<\/script>`}</div>`;
1327
1305
  }
1328
- default: return X(t.type);
1306
+ default: return te(t.type);
1329
1307
  }
1330
1308
  }, Q = (e, n) => {
1331
1309
  if (!e || typeof e != "object") return "";
1332
- let r = R(e);
1310
+ let r = z(e);
1333
1311
  if (!r) return `\n <!-- ROW SKIPPED (type="${typeof e.type == "string" ? e.type : "unknown"}"${e.id ? `, id="${e.id}"` : ""}): this row has no 'columns' array and its shorthand content (e.g. a list of items/links) can't be auto-converted without losing data. Provide a fully hydrated row with 'columns' and 'elements' instead. -->`;
1334
- let i = z(r.style || {}), a = G("id", r.htmlId), o = G("class", r.htmlClass), s = r.id || `row-${Math.random().toString(36).substring(2, 9)}`;
1335
- H(n, s, r.style, "tablet", r.styleTablet), H(n, s, r.style, "mobile", r.styleMobile);
1312
+ let i = B(r.style || {}), a = q("id", r.htmlId), o = q("class", r.htmlClass), s = r.id || `row-${Math.random().toString(36).substring(2, 9)}`;
1313
+ U(n, s, r.style, "tablet", r.styleTablet), U(n, s, r.style, "mobile", r.styleMobile);
1336
1314
  let c = `\n <!-- ROW START: ${r.id || "row"} -->`;
1337
1315
  c += `\n <div data-plexo-id="${s}"${a}${o} class="plexo-row" style="display: flex; flex-wrap: wrap; margin-left: -8px; margin-right: -8px; ${i}">`;
1338
1316
  let l = Array.isArray(r.columns) ? r.columns : [];
1339
1317
  for (let e of l) {
1340
1318
  if (!e) continue;
1341
- let r = e.styles || e.style || {}, i = z(r), a = G("id", e.attrs?.htmlId), o = e.attrs?.htmlClass ? ` ${e.attrs.htmlClass}` : "", s = e.id || `col-${Math.random().toString(36).substring(2, 9)}`;
1342
- H(n, s, r, "tablet", e.stylesTablet), H(n, s, r, "mobile", e.stylesMobile), c += `\n <!-- COLUMN START: ${e.id || "col"} -->`, c += `\n <div data-plexo-id="${s}"${a} class="plexo-col${o}" style="box-sizing: border-box; padding-left: 8px; padding-right: 8px; width: ${e.width || "100%"}; ${i}">`;
1343
- let l = Array.isArray(e.elements) ? e.elements : [], u = Array.isArray(e.nestedRows) ? e.nestedRows : [], d = new Map(l.map((e) => [e.id, e])), f = new Map(u.map((e) => [e.id, e]));
1319
+ let r = e.styles || e.style || {}, i = B(r), a = r.gap || "16px", o = q("id", e.attrs?.htmlId), s = e.attrs?.htmlClass ? ` ${e.attrs.htmlClass}` : "", l = e.id || `col-${Math.random().toString(36).substring(2, 9)}`;
1320
+ U(n, l, r, "tablet", e.stylesTablet), U(n, l, r, "mobile", e.stylesMobile), c += `\n <!-- COLUMN START: ${e.id || "col"} -->`, c += `\n <div data-plexo-id="${l}"${o} class="plexo-col${s}" style="box-sizing: border-box; padding-left: 8px; padding-right: 8px; width: ${e.width || "100%"}; --plexo-col-gap: ${a}; ${i}">`;
1321
+ let u = Array.isArray(e.elements) ? e.elements : [], d = Array.isArray(e.nestedRows) ? e.nestedRows : [], f = new Map(u.map((e) => [e.id, e])), p = new Map(d.map((e) => [e.id, e]));
1344
1322
  for (let r of t({
1345
1323
  ...e,
1346
- elements: l,
1347
- nestedRows: u
1324
+ elements: u,
1325
+ nestedRows: d
1348
1326
  })) {
1349
- let e = d.get(r);
1327
+ let e = f.get(r);
1350
1328
  if (e) {
1351
- let t = e.attributes || {}, r = typeof t.htmlClassNames == "string" ? t.htmlClassNames : typeof t.htmlClass == "string" ? t.htmlClass : typeof t.className == "string" ? t.className : "", i = G("id", t.htmlId), a = G("class", r), o = e.style?.display, s = o === "inline-block" || o === "inline" || o === "inline-flex" ? `margin-bottom: 16px; display: ${o}; vertical-align: top;` : "margin-bottom: 16px;";
1352
- H(n, e.id, e.style, "tablet", e.styleTablet), H(n, e.id, e.style, "mobile", e.styleMobile), c += `\n <div${i}${a} style="${s}">`, c += `\n ${Z(e)}`, c += "\n </div>";
1329
+ let t = e.attributes || {}, r = typeof t.htmlClassNames == "string" ? t.htmlClassNames : typeof t.htmlClass == "string" ? t.htmlClass : typeof t.className == "string" ? t.className : "", i = q("id", t.htmlId), o = q("class", r), s = e.style?.display, l = s === "inline-block" || s === "inline" || s === "inline-flex" ? `margin-bottom: ${a}; display: ${s}; vertical-align: top;` : `margin-bottom: ${a};`;
1330
+ U(n, e.id, e.style, "tablet", W(e, e.styleTablet)), U(n, e.id, e.style, "mobile", W(e, e.styleMobile)), c += `\n <div${i}${o} style="${l}">`, c += `\n ${ne(e)}`, c += "\n </div>";
1353
1331
  continue;
1354
1332
  }
1355
- let t = f.get(r);
1333
+ let t = p.get(r);
1356
1334
  t && (c += Q(t, n));
1357
1335
  }
1358
1336
  c += "\n </div>";
@@ -1386,7 +1364,7 @@ var Z = (t) => {
1386
1364
  "favicon"
1387
1365
  ], a = {};
1388
1366
  for (let e of Object.keys(r)) i.includes(e) || (a[e] = r[e]);
1389
- let o = z(a), s = typeof r.htmlTitle == "string" && r.htmlTitle.trim() ? r.htmlTitle.trim() : typeof e?.name == "string" && e.name.trim() ? e.name.trim() : "Plexo Rendered Page", c = G("id", r.htmlId), l = G("class", r.htmlClass), u = typeof r.customCss == "string" && r.customCss.trim() ? r.customCss.trim() : "", d = typeof r.customJs == "string" && r.customJs.trim() ? r.customJs.trim() : "", f = typeof r.favicon == "string" && r.favicon.trim() ? r.favicon.trim() : "", p = Array.isArray(n.rows) ? n.rows : Array.isArray(t.rows) ? t.rows : Array.isArray(e.rows) ? e.rows : [], m = T(w(p, [r.fontFamily])), h = {
1367
+ let o = B(a), s = typeof r.htmlTitle == "string" && r.htmlTitle.trim() ? r.htmlTitle.trim() : typeof e?.name == "string" && e.name.trim() ? e.name.trim() : "Plexo Rendered Page", c = q("id", r.htmlId), l = q("class", r.htmlClass), u = typeof r.customCss == "string" && r.customCss.trim() ? r.customCss.trim() : "", d = typeof r.customJs == "string" && r.customJs.trim() ? r.customJs.trim() : "", f = typeof r.favicon == "string" && r.favicon.trim() ? r.favicon.trim() : "", p = Array.isArray(n.rows) ? n.rows : Array.isArray(t.rows) ? t.rows : Array.isArray(e.rows) ? e.rows : [], m = E(T(p, [r.fontFamily])), h = {
1390
1368
  tablet: [],
1391
1369
  mobile: []
1392
1370
  }, g = "";
@@ -1395,12 +1373,12 @@ var Z = (t) => {
1395
1373
  <html>
1396
1374
  <head>
1397
1375
  <meta charset="utf-8">
1398
- <title>${W(s)}</title>
1399
- ${f ? `<link rel="icon" href="${W(f)}">` : ""}
1376
+ <title>${K(s)}</title>
1377
+ ${f ? `<link rel="icon" href="${K(f)}">` : ""}
1400
1378
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
1401
1379
  ${m ? `<link rel="stylesheet" href="${m}">` : ""}
1402
1380
  <style>
1403
- body { margin: 0; font-family: ${L}; }
1381
+ body { margin: 0; font-family: ${R}; }
1404
1382
  .plexo-row {
1405
1383
  display: flex;
1406
1384
  flex-wrap: wrap;
@@ -1417,7 +1395,7 @@ var Z = (t) => {
1417
1395
  .plexo-col {
1418
1396
  width: 100% !important;
1419
1397
  max-width: 100% !important;
1420
- margin-bottom: 16px;
1398
+ margin-bottom: var(--plexo-col-gap, 16px);
1421
1399
  }${v}
1422
1400
  }
1423
1401
  </style>
@@ -1430,14 +1408,14 @@ ${d ? ` <script>\n${d}\n <\/script>` : ""}
1430
1408
  </body>
1431
1409
  </html>`, y = y.replace(/<span[^>]*data-merge-val="([^"]*)"[^>]*>[\s\S]*?<\/span>/gi, "$1"), y;
1432
1410
  };
1433
- function te(e) {
1411
+ function re(e) {
1434
1412
  return $(e).replace(/<[^>]*>/g, " ").replace(/\s+/g, " ").trim();
1435
1413
  }
1436
- function ne(e) {
1414
+ function ie(e) {
1437
1415
  return $(e);
1438
1416
  }
1439
- function re(e) {
1417
+ function ae(e) {
1440
1418
  return e;
1441
1419
  }
1442
1420
  //#endregion
1443
- export { S as _, ne as a, g as b, U as c, I as d, T as f, b as g, _ as h, $ as i, B as l, x as m, K as n, te as o, w as p, H as r, R as s, L as t, re as u, v, h as x, y };
1421
+ export { C as _, ie as a, _ as b, G as c, L as d, E as f, x as g, v as h, $ as i, V as l, S as m, J as n, re as o, T as p, U as r, z as s, R as t, ae as u, y as v, g as x, b as y };