@charisol/plexo-sdk 1.1.15 → 1.1.16

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.
package/dist/compiler.js CHANGED
@@ -1,2 +1,2 @@
1
- import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c, u as l } from "./compiler-TjBEKCfw.js";
1
+ import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c, u as l } from "./compiler-Dr4lNAM3.js";
2
2
  export { c as DEFAULT_BODY_FONT_FAMILY, i as FORM_NON_CSS_STYLE_KEYS, o as collectResponsiveRule, n as compileToHTML, e as compileToHTMLWithStrataAuto, a as compileToPlainText, s as convertSectionRowToPlexoRow, t as getFormDefaultStyle, r as getInlineStylesImportant, l as injectStrataBundle };
@@ -1,4 +1,4 @@
1
- import { a as e, b as t, d as n, f as r, h as i, l as a, m as o, p as s, t as c, v as l } from "./iconSvgStatic-CA1z-vnh.js";
1
+ import { f as e, g as t, h as n, m as r, o as i, p as a, t as o, u as s, x as c, y as l } from "./iconSvgStatic-D04qA352.js";
2
2
  //#region src/utilities/compilerClient.ts
3
3
  var u = "https://cdn.jsdelivr.net/npm/@charisol/plexo-sdk@latest/dist/social-icons", d = /* @__PURE__ */ new Set([
4
4
  "selectable",
@@ -47,86 +47,86 @@ var u = "https://cdn.jsdelivr.net/npm/@charisol/plexo-sdk@latest/dist/social-ico
47
47
  "borderBottomLeftRadius"
48
48
  ]);
49
49
  return n && t.push(`border-radius="${f(n)}"`), t.join(" ");
50
- }, S = (t, d) => {
51
- let y = h(t, d), S = p(t.style || {}), C = y.htmlId ? ` id="${f(y.htmlId)}"` : "", w = m(y.htmlClassNames, y.htmlClass, d === "landing_page" && y.hideOnMobile ? "hidden md:block" : ""), T = w ? ` class="${f(w)}"` : "", E = typeof y.customCss == "string" && y.customCss.trim() ? y.customCss.trim() : "", D = E && d === "landing_page" ? `<style>${E}</style>` : "";
52
- if (t.type === "form_container") return `${D}${_(t, d)}`;
53
- if (t.type === "input" || t.type === "select" || t.type === "textarea") return `${D}${g(t, d)}`;
50
+ }, S = (c, d) => {
51
+ let y = h(c, d), S = p(c.style || {}), C = y.htmlId ? ` id="${f(y.htmlId)}"` : "", w = m(y.htmlClassNames, y.htmlClass, d === "landing_page" && y.hideOnMobile ? "hidden md:block" : ""), T = w ? ` class="${f(w)}"` : "", E = typeof y.customCss == "string" && y.customCss.trim() ? y.customCss.trim() : "", D = E && d === "landing_page" ? `<style>${E}</style>` : "";
52
+ if (c.type === "form_container") return `${D}${_(c, d)}`;
53
+ if (c.type === "input" || c.type === "select" || c.type === "textarea") return `${D}${g(c, d)}`;
54
54
  if (d === "email") {
55
- if (t.type === "button") {
56
- let n = f(y.href || "#"), r = f(y.text || "Button"), i = e(t).width, a = i === "auto" ? "" : ` width="${f(i)}"`, o = t.style || {}, s = x(o), c = b(o, "padding", [
55
+ if (c.type === "button") {
56
+ let e = f(y.href || "#"), t = f(y.text || "Button"), n = i(c).width, r = n === "auto" ? "" : ` width="${f(n)}"`, a = c.style || {}, o = x(a), s = b(a, "padding", [
57
57
  "paddingTop",
58
58
  "paddingRight",
59
59
  "paddingBottom",
60
60
  "paddingLeft"
61
61
  ]) || "10px 16px";
62
- return `<mj-button href="${n}" css-class="${y.hideOnDesktop ? "desktop-hide" : ""}" padding="0" inner-padding="${f(c)}"${a}${s ? ` ${s}` : ""}>${r}</mj-button>`;
62
+ return `<mj-button href="${e}" css-class="${y.hideOnDesktop ? "desktop-hide" : ""}" padding="0" inner-padding="${f(s)}"${r}${o ? ` ${o}` : ""}>${t}</mj-button>`;
63
63
  }
64
- if (t.type === "image") {
65
- let e = a(t), n = e.width && e.width !== "100%" ? ` width="${f(e.width)}"` : "", r = e.height && e.height !== "auto" ? ` height="${f(e.height)}"` : "";
66
- return `<mj-image src="${f(y.src || "")}" alt="${f(y.alt || "")}"${n}${r} />`;
64
+ if (c.type === "image") {
65
+ let e = s(c), t = e.width && e.width !== "100%" ? ` width="${f(e.width)}"` : "", n = e.height && e.height !== "auto" ? ` height="${f(e.height)}"` : "";
66
+ return `<mj-image src="${f(y.src || "")}" alt="${f(y.alt || "")}"${t}${n} />`;
67
67
  }
68
- if (t.type === "social") {
69
- let e = r(t);
68
+ if (c.type === "social") {
69
+ let e = a(c);
70
70
  if (!e.length) return "";
71
- let n = t.style || {}, i = n.textAlign === "center" ? "center" : n.textAlign === "right" ? "flex-end" : "flex-start", a = n.iconSpacing || "8px", o = b(n, "padding", [
71
+ let t = c.style || {}, n = t.textAlign === "center" ? "center" : t.textAlign === "right" ? "flex-end" : "flex-start", r = t.iconSpacing || "8px", i = b(t, "padding", [
72
72
  "paddingTop",
73
73
  "paddingRight",
74
74
  "paddingBottom",
75
75
  "paddingLeft"
76
- ]) || "8px", s = b(n, "margin", [
76
+ ]) || "8px", o = b(t, "margin", [
77
77
  "marginTop",
78
78
  "marginRight",
79
79
  "marginBottom",
80
80
  "marginLeft"
81
- ]), c = (e) => e === "square" ? "14px" : "9999px", d = e.map((e) => {
81
+ ]), s = (e) => e === "square" ? "14px" : "9999px", d = e.map((e) => {
82
82
  let t = `<img src="${`${u}/${l[e.provider] ? e.provider : "fallback"}.png`}" alt="" width="${parseInt(e.size, 10) || 36}" style="display:block;width:60%;height:60%;border:0;" />`;
83
- return `<a href="${f(e.url)}" style="display:inline-flex;align-items:center;justify-content:center;width:${f(e.size)};height:${f(e.size)};background-color:${f(e.backgroundColor)};border-radius:${c(e.iconType)};text-decoration:none;">${t}</a>`;
83
+ return `<a href="${f(e.url)}" style="display:inline-flex;align-items:center;justify-content:center;width:${f(e.size)};height:${f(e.size)};background-color:${f(e.backgroundColor)};border-radius:${s(e.iconType)};text-decoration:none;">${t}</a>`;
84
84
  }).join("");
85
- return `<mj-raw><div style="${`display:flex;flex-wrap:wrap;justify-content:${i};gap:${f(String(a))};padding:${f(o)};${s ? `margin:${f(s)};` : ""}`}">${d}</div></mj-raw>`;
85
+ return `<mj-raw><div style="${`display:flex;flex-wrap:wrap;justify-content:${n};gap:${f(String(r))};padding:${f(i)};${o ? `margin:${f(o)};` : ""}`}">${d}</div></mj-raw>`;
86
86
  }
87
- if (t.type === "menu") return `<mj-navbar hamburger="hamburger">${n(t).map((e) => `<mj-navbar-link href="${f(e.href)}">${f(e.label)}</mj-navbar-link>`).join("")}</mj-navbar>`;
88
- if (t.type === "table") {
89
- let e = s(t), n = t.style || {}, r = `${n.borderWidth || "1px"} ${n.borderStyle || "solid"} ${n.borderColor || "#cbd5e1"}`, i = (t, i, a) => {
90
- let o = a ? "th" : "td", s = a ? n.headerBgColor || "#f8fafc" : e.striped && i % 2 == 1 ? "#f8fafc" : n.contentBgColor || "#ffffff", c = a ? n.headerTextColor || "#1e293b" : n.contentTextColor || "#475569";
91
- return `<tr>${t.map((e) => `<${o} style="padding: ${n.cellPadding || "8px"}; border: ${r}; background-color: ${s}; color: ${c};">${f(e) || "&nbsp;"}</${o}>`).join("")}</tr>`;
87
+ if (c.type === "menu") return `<mj-navbar hamburger="hamburger">${e(c).map((e) => `<mj-navbar-link href="${f(e.href)}">${f(e.label)}</mj-navbar-link>`).join("")}</mj-navbar>`;
88
+ if (c.type === "table") {
89
+ let e = r(c), t = c.style || {}, n = `${t.borderWidth || "1px"} ${t.borderStyle || "solid"} ${t.borderColor || "#cbd5e1"}`, i = (r, i, a) => {
90
+ let o = a ? "th" : "td", s = a ? t.headerBgColor || "#f8fafc" : e.striped && i % 2 == 1 ? "#f8fafc" : t.contentBgColor || "#ffffff", c = a ? t.headerTextColor || "#1e293b" : t.contentTextColor || "#475569";
91
+ return `<tr>${r.map((e) => `<${o} style="padding: ${t.cellPadding || "8px"}; border: ${n}; background-color: ${s}; color: ${c};">${f(e) || "&nbsp;"}</${o}>`).join("")}</tr>`;
92
92
  }, a = +!!e.enableHeader, o = e.enableFooter ? e.cells.length - 1 : e.cells.length;
93
93
  return `<mj-table><table role="presentation" style="border-collapse: collapse; width: 100%;">${e.enableHeader && e.cells.length > 0 ? `<thead>${i(e.cells[0], 0, !0)}</thead>` : ""}<tbody>${e.cells.slice(a, Math.max(a, o)).map((e, t) => i(e, t, !1)).join("")}</tbody>${e.enableFooter && e.cells.length > a ? `<tfoot>${i(e.cells[e.cells.length - 1], e.cells.length - 1, !1)}</tfoot>` : ""}</table></mj-table>`;
94
94
  }
95
- if (t.type === "video") {
96
- let e = i(y.videoUrl), t = y.linkType === "email" ? `mailto:${y.href || ""}` : y.href || y.videoUrl || "#";
97
- return `<mj-image src="${f(e.thumbnailUrl)}" href="${f(t)}" alt="${f(y.alt || "Video preview")}" />`;
95
+ if (c.type === "video") {
96
+ let e = t(y.videoUrl), n = y.linkType === "email" ? `mailto:${y.href || ""}` : y.href || y.videoUrl || "#";
97
+ return `<mj-image src="${f(e.thumbnailUrl)}" href="${f(n)}" alt="${f(y.alt || "Video preview")}" />`;
98
98
  }
99
- if (t.type === "timer") {
100
- let e = o(y.targetDate), t = y.showLabels !== !1;
99
+ if (c.type === "timer") {
100
+ let e = n(y.targetDate), t = y.showLabels !== !1;
101
101
  return `<mj-text align="center"><div style="font-size: 28px; font-weight: 800;">${e.days}d ${e.hours}h ${e.minutes}m ${e.seconds}s</div>${t ? `<div style="font-size: 12px; color: #64748b;">Countdown to ${f(y.targetDate || "")}</div>` : ""}</mj-text>`;
102
102
  }
103
- if (t.type === "carousel") {
103
+ if (c.type === "carousel") {
104
104
  let e = Array.isArray(y.images) ? y.images : [];
105
105
  return e.length === 0 ? "<mj-text align=\"center\">No images in carousel</mj-text>" : `<mj-carousel>${e.map((e) => `<mj-carousel-image src="${f(e.src)}" alt="${f(e.alt || "")}" />`).join("")}</mj-carousel>`;
106
106
  }
107
- if (t.type === "icon") {
108
- let e = parseInt(String(y.iconSize || 48), 10) || 48, n = t.style?.color || "#1e293b";
109
- return `<mj-text align="center">${c(y.iconName, e, n)}</mj-text>`;
107
+ if (c.type === "icon") {
108
+ let e = parseInt(String(y.iconSize || 48), 10) || 48, t = c.style?.color || "#1e293b";
109
+ return `<mj-text align="center">${o(y.iconName, e, t)}</mj-text>`;
110
110
  }
111
111
  let d = y.hideOnDesktop ? "desktop-hide" : "";
112
- if (t.type === "heading" || t.type === "paragraph" || t.type === "text") {
113
- let e = t.type === "heading" ? {
112
+ if (c.type === "heading" || c.type === "paragraph" || c.type === "text") {
113
+ let e = c.type === "heading" ? {
114
114
  fontSize: "24px",
115
115
  fontWeight: "700"
116
- } : { fontSize: "14px" }, n = v(t.style || {}, e);
117
- return `<mj-text${n ? ` ${n}` : ""} css-class="${d}">${y.text || ""}</mj-text>`;
116
+ } : { fontSize: "14px" }, t = v(c.style || {}, e);
117
+ return `<mj-text${t ? ` ${t}` : ""} css-class="${d}">${y.text || ""}</mj-text>`;
118
118
  }
119
- if (t.type === "spacer") {
120
- let e = t.style?.height || "24px";
119
+ if (c.type === "spacer") {
120
+ let e = c.style?.height || "24px";
121
121
  return `<mj-spacer height="${f(String(e))}" />`;
122
122
  }
123
- if (t.type === "divider") {
124
- let e = t.style || {};
123
+ if (c.type === "divider") {
124
+ let e = c.style || {};
125
125
  return `<mj-divider border-width="${f(String(e.borderWidth || "1px"))}" border-style="${f(String(e.borderStyle || "solid"))}" border-color="${f(String(e.borderColor || "#334155"))}" />`;
126
126
  }
127
- return t.type === "card" ? `<mj-text css-class="${d}"><strong style="display:block;margin-bottom:8px;">${f(y.title || "Card Title")}</strong><span style="font-size:14px;color:#64748b;">${f(y.description || "Card description.")}</span></mj-text>` : t.type === "html" ? `<mj-text css-class="${d}">${y.htmlContent || y.text || ""}</mj-text>` : `<mj-text${C}${T} css-class="${d}">${f(y.text || y.htmlContent || "")}</mj-text>`;
127
+ return c.type === "card" ? `<mj-text css-class="${d}"><strong style="display:block;margin-bottom:8px;">${f(y.title || "Card Title")}</strong><span style="font-size:14px;color:#64748b;">${f(y.description || "Card description.")}</span></mj-text>` : c.type === "html" ? `<mj-text css-class="${d}">${y.htmlContent || y.text || ""}</mj-text>` : `<mj-text${C}${T} css-class="${d}">${f(y.text || y.htmlContent || "")}</mj-text>`;
128
128
  }
129
- switch (t.type) {
129
+ switch (c.type) {
130
130
  case "heading": return `${D}<h2${C}${T} style="${S}">${f(y.text || "Heading")}</h2>`;
131
131
  case "paragraph":
132
132
  case "text": return `${D}<p${C}${T} style="${S}">${f(y.text || "")}</p>`;
@@ -140,26 +140,26 @@ var u = "https://cdn.jsdelivr.net/npm/@charisol/plexo-sdk@latest/dist/social-ico
140
140
  case "blog_author":
141
141
  case "blog_categories":
142
142
  case "blog_comments":
143
- case "blog_post_list": return `${D}<div${C}${T} data-plexo-blog-${t.type.replace(/^blog_/, "").replace(/_([a-z])/g, (e, t) => t.toUpperCase())}="true"${y.prefix ? ` data-plexo-blog-prefix="${f(y.prefix)}"` : ""} style="${S}"></div>`;
143
+ case "blog_post_list": return `${D}<div${C}${T} data-plexo-blog-${c.type.replace(/^blog_/, "").replace(/_([a-z])/g, (e, t) => t.toUpperCase())}="true"${y.prefix ? ` data-plexo-blog-prefix="${f(y.prefix)}"` : ""} style="${S}"></div>`;
144
144
  default: return `${D}<div${C}${T} style="${S}">${f(y.text || "")}</div>`;
145
145
  }
146
- }, C = (e, n) => {
147
- if (n === "email") {
148
- let r = new Map(e.elements.map((e) => [e.id, e])), i = new Map((Array.isArray(e.nestedRows) ? e.nestedRows : []).map((e) => [e.id, e])), a = t(e).map((e) => {
149
- let t = r.get(e);
150
- if (t) return S(t, n);
151
- let a = i.get(e);
146
+ }, C = (e, t) => {
147
+ if (t === "email") {
148
+ let n = new Map(e.elements.map((e) => [e.id, e])), r = new Map((Array.isArray(e.nestedRows) ? e.nestedRows : []).map((e) => [e.id, e])), i = c(e).map((e) => {
149
+ let i = n.get(e);
150
+ if (i) return S(i, t);
151
+ let a = r.get(e);
152
152
  return a ? `<mj-raw>${w(a, "landing_page")}</mj-raw>` : "";
153
- }).join(""), o = y(e.styles || {});
154
- return `<mj-column width="${f(e.width || "100%")}"${o}>${a}</mj-column>`;
153
+ }).join(""), a = y(e.styles || {});
154
+ return `<mj-column width="${f(e.width || "100%")}"${a}>${i}</mj-column>`;
155
155
  }
156
- let r = p(e.styles || {}), i = new Map(e.elements.map((e) => [e.id, e])), a = new Map((Array.isArray(e.nestedRows) ? e.nestedRows : []).map((e) => [e.id, e])), o = t(e).map((e) => {
157
- let t = i.get(e);
158
- if (t) return S(t, n);
159
- let r = a.get(e);
160
- return r ? w(r, n) : "";
156
+ let n = p(e.styles || {}), r = new Map(e.elements.map((e) => [e.id, e])), i = new Map((Array.isArray(e.nestedRows) ? e.nestedRows : []).map((e) => [e.id, e])), a = c(e).map((e) => {
157
+ let n = r.get(e);
158
+ if (n) return S(n, t);
159
+ let a = i.get(e);
160
+ return a ? w(a, t) : "";
161
161
  }).join("");
162
- return `<div style="width:${f(e.width || "100%")};${r}">${o}</div>`;
162
+ return `<div style="width:${f(e.width || "100%")};${n}">${a}</div>`;
163
163
  }, w = (e, t) => t === "email" ? `<mj-section css-class="${e.style?.hideOnDesktop ? "desktop-hide" : ""}"${y(e.style || {})}>${e.columns.map((e) => C(e, t)).join("")}</mj-section>` : `<section style="display:flex;flex-wrap:wrap;${p(e.style || {})}">${e.columns.map((e) => C(e, t)).join("")}</section>`, T = (e, t) => {
164
164
  let n = (e.body?.rows || []).map((e) => w(e, t)).join(""), r = p(e.body?.style || {});
165
165
  return t === "email" ? `<mjml><mj-head><mj-style>.desktop-hide { display:none !important; max-height:0; overflow:hidden; }</mj-style></mj-head><mj-body><mj-section><mj-column><mj-text css-class="preheader" padding="0" font-size="1px" color="#ffffff">&nbsp;</mj-text></mj-column></mj-section>${n}</mj-body></mjml>`.replace(/<span[^>]*data-merge-val="([^"]*)"[^>]*>[\s\S]*?<\/span>/gi, "$1") : `<!doctype html><html><head><meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" /></head><body style="${r}"><main>${n}</main></body></html>`;
@@ -298,8 +298,26 @@ function h(e) {
298
298
  return t = n, n;
299
299
  });
300
300
  }
301
- var g = (e) => String(Math.max(0, e)).padStart(2, "0");
302
- function _(e, t, n = Date.now()) {
301
+ function g(e) {
302
+ let t = {};
303
+ for (let n of e) {
304
+ let e = n.name || n.id || "field";
305
+ t[e] = (t[e] || 0) + 1;
306
+ }
307
+ let n = {};
308
+ return e.map((e) => {
309
+ let r = e.name || e.id || "field";
310
+ if (t[r] <= 1) return e;
311
+ n[r] = (n[r] || 0) + 1;
312
+ let i = n[r] === 1 ? r : `${r}-${n[r]}`;
313
+ return {
314
+ ...e,
315
+ name: i
316
+ };
317
+ });
318
+ }
319
+ var _ = (e) => String(Math.max(0, e)).padStart(2, "0");
320
+ function v(e, t, n = Date.now()) {
303
321
  let r = e ? Date.parse(e) : NaN, i = Number.isNaN(r) ? n : r, a = i - n;
304
322
  if (a <= 0) return {
305
323
  days: "00",
@@ -311,31 +329,31 @@ function _(e, t, n = Date.now()) {
311
329
  };
312
330
  let o = Math.floor(a / 1e3), s = Math.floor(o / 86400), c = Math.floor(o % 86400 / 3600), l = Math.floor(o % 3600 / 60), u = o % 60;
313
331
  return {
314
- days: g(s),
315
- hours: g(c),
316
- minutes: g(l),
317
- seconds: g(u),
332
+ days: _(s),
333
+ hours: _(c),
334
+ minutes: _(l),
335
+ seconds: _(u),
318
336
  isExpired: !1,
319
337
  targetTimestamp: i
320
338
  };
321
339
  }
322
- var v = [
340
+ var y = [
323
341
  "youtube.com",
324
342
  "www.youtube.com",
325
343
  "youtu.be",
326
344
  "m.youtube.com"
327
345
  ];
328
- function y(e) {
346
+ function b(e) {
329
347
  return e.hostname === "youtu.be" ? e.pathname.slice(1).split("/")[0] || null : e.pathname.startsWith("/embed/") ? e.pathname.slice(7).split("/")[0] || null : e.pathname.startsWith("/shorts/") ? e.pathname.slice(8).split("/")[0] || null : e.searchParams.get("v");
330
348
  }
331
- function b(e) {
349
+ function x(e) {
332
350
  let t = e.pathname.match(/(\d+)/);
333
351
  return t ? t[1] : null;
334
352
  }
335
- var x = "data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22640%22%20height%3D%22360%22%20viewBox%3D%220%200%20640%20360%22%3E%3Crect%20width%3D%22640%22%20height%3D%22360%22%20fill%3D%22%230f172a%22%2F%3E%3Ccircle%20cx%3D%22320%22%20cy%3D%22180%22%20r%3D%2248%22%20fill%3D%22%23ffffff%22%20opacity%3D%220.9%22%2F%3E%3Cpath%20d%3D%22M304%20156%20L356%20180%20L304%20204%20Z%22%20fill%3D%22%230f172a%22%2F%3E%3C%2Fsvg%3E";
336
- function S(e) {
353
+ var S = "data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22640%22%20height%3D%22360%22%20viewBox%3D%220%200%20640%20360%22%3E%3Crect%20width%3D%22640%22%20height%3D%22360%22%20fill%3D%22%230f172a%22%2F%3E%3Ccircle%20cx%3D%22320%22%20cy%3D%22180%22%20r%3D%2248%22%20fill%3D%22%23ffffff%22%20opacity%3D%220.9%22%2F%3E%3Cpath%20d%3D%22M304%20156%20L356%20180%20L304%20204%20Z%22%20fill%3D%22%230f172a%22%2F%3E%3C%2Fsvg%3E";
354
+ function C(e) {
337
355
  if (!e || typeof e != "string") return {
338
- thumbnailUrl: x,
356
+ thumbnailUrl: S,
339
357
  provider: "unknown"
340
358
  };
341
359
  let t;
@@ -343,34 +361,34 @@ function S(e) {
343
361
  t = new URL(e);
344
362
  } catch {
345
363
  return {
346
- thumbnailUrl: x,
364
+ thumbnailUrl: S,
347
365
  provider: "unknown"
348
366
  };
349
367
  }
350
- if (v.includes(t.hostname)) {
351
- let e = y(t);
368
+ if (y.includes(t.hostname)) {
369
+ let e = b(t);
352
370
  if (e) return {
353
371
  thumbnailUrl: `https://img.youtube.com/vi/${e}/hqdefault.jpg`,
354
372
  provider: "youtube"
355
373
  };
356
374
  }
357
375
  if (t.hostname === "vimeo.com" || t.hostname === "www.vimeo.com" || t.hostname === "player.vimeo.com") {
358
- let e = b(t);
376
+ let e = x(t);
359
377
  if (e) return {
360
378
  thumbnailUrl: `https://vumbnail.com/${e}.jpg`,
361
379
  provider: "vimeo"
362
380
  };
363
381
  }
364
382
  return {
365
- thumbnailUrl: x,
383
+ thumbnailUrl: S,
366
384
  provider: "unknown"
367
385
  };
368
386
  }
369
- function C(e, t) {
387
+ function w(e, t) {
370
388
  let n = e || "Star", r = n.replace(/[-_]([a-z0-9])/gi, (e, t) => t.toUpperCase()).replace(/^\w/, (e) => e.toUpperCase()), i = n.toLowerCase().replace(/[-_]/g, "");
371
389
  return t.includes(n) ? n : t.includes(r) ? r : t.includes(`${r}Icon`) ? `${r}Icon` : t.find((e) => e.toLowerCase().replace(/[-_]/g, "") === i) || "HelpCircle";
372
390
  }
373
- function w(e) {
391
+ function T(e) {
374
392
  let t = e.attributes || {}, n = Math.max(1, Number(t.rowCount) || 2), r = Math.max(1, Number(t.colCount) || 2), i = Array.isArray(t.cells) ? t.cells : [], a = [];
375
393
  for (let e = 0; e < n; e++) {
376
394
  let t = Array.isArray(i[e]) ? i[e] : [], n = [];
@@ -386,29 +404,29 @@ function w(e) {
386
404
  striped: !!t.striped
387
405
  };
388
406
  }
389
- var T = 8;
390
- function E(e, t, n) {
391
- let r = n < T && Array.isArray(e?.children) ? e.children : [];
407
+ var E = 8;
408
+ function D(e, t, n) {
409
+ let r = n < E && Array.isArray(e?.children) ? e.children : [];
392
410
  return {
393
411
  id: typeof e?.id == "string" && e.id ? e.id : `item-${t}`,
394
412
  title: typeof e?.title == "string" && e.title.trim() ? e.title : `Item ${t + 1}`,
395
413
  content: typeof e?.content == "string" ? e.content : "",
396
414
  defaultOpen: !!e?.defaultOpen,
397
- children: r.map((e, t) => E(e, t, n + 1))
415
+ children: r.map((e, t) => D(e, t, n + 1))
398
416
  };
399
417
  }
400
- function D(e, t) {
418
+ function O(e, t) {
401
419
  if (t !== "multi") {
402
420
  let t = !1;
403
421
  for (let n of e) n.defaultOpen && (t ? n.defaultOpen = !1 : t = !0);
404
422
  }
405
- for (let n of e) D(n.children, t);
423
+ for (let n of e) O(n.children, t);
406
424
  }
407
- function O(e) {
408
- let t = e.attributes || {}, n = t.mode === "multi" ? "multi" : "single", r = (Array.isArray(t.items) ? t.items : []).map((e, t) => E(e, t, 0));
409
- return D(r, n), r;
425
+ function k(e) {
426
+ let t = e.attributes || {}, n = t.mode === "multi" ? "multi" : "single", r = (Array.isArray(t.items) ? t.items : []).map((e, t) => D(e, t, 0));
427
+ return O(r, n), r;
410
428
  }
411
- function k(e, t, n) {
429
+ function A(e, t, n) {
412
430
  let r = JSON.parse(JSON.stringify(Array.isArray(e) ? e : [])), i = (e, t) => {
413
431
  let [r, ...a] = t;
414
432
  if (e[r]) {
@@ -426,7 +444,7 @@ function k(e, t, n) {
426
444
  }
427
445
  //#endregion
428
446
  //#region src/utilities/iconSvgStatic.ts
429
- var A = {
447
+ var j = {
430
448
  "a-arrow-down": [
431
449
  ["path", { d: "m14 12 4 4 4-4" }],
432
450
  ["path", { d: "M18 16V7" }],
@@ -15246,18 +15264,18 @@ var A = {
15246
15264
  y2: "11"
15247
15265
  }]
15248
15266
  ]
15249
- }, j = "circle-help";
15250
- function M(e) {
15267
+ }, M = "circle-help";
15268
+ function N(e) {
15251
15269
  return e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1-$2").toLowerCase();
15252
15270
  }
15253
- function N(e) {
15254
- let t = e || "HelpCircle", n = M(t.replace(/^\w/, (e) => e.toUpperCase()));
15255
- if (A[n]) return n;
15271
+ function P(e) {
15272
+ let t = e || "HelpCircle", n = N(t.replace(/^\w/, (e) => e.toUpperCase()));
15273
+ if (j[n]) return n;
15256
15274
  let r = t.toLowerCase().replace(/[-_\s]/g, "");
15257
- return Object.keys(A).find((e) => e.replace(/-/g, "") === r) || j;
15275
+ return Object.keys(j).find((e) => e.replace(/-/g, "") === r) || M;
15258
15276
  }
15259
- function P(e, t, n) {
15260
- return `<svg xmlns="http://www.w3.org/2000/svg" width="${t}" height="${t}" viewBox="0 0 24 24" fill="none" stroke="${n}" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">${(A[N(e)] || A[j] || []).map(([e, t]) => `<${e} ${Object.entries(t).map(([e, t]) => `${e}="${String(t)}"`).join(" ")}></${e}>`).join("")}</svg>`;
15277
+ function F(e, t, n) {
15278
+ return `<svg xmlns="http://www.w3.org/2000/svg" width="${t}" height="${t}" viewBox="0 0 24 24" fill="none" stroke="${n}" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">${(j[P(e)] || j[M] || []).map(([e, t]) => `<${e} ${Object.entries(t).map(([e, t]) => `${e}="${String(t)}"`).join(" ")}></${e}>`).join("")}</svg>`;
15261
15279
  }
15262
15280
  //#endregion
15263
- export { r as _, d as a, e as b, p as c, c as d, s as f, k as g, S as h, u as i, l, _ as m, o as n, f as o, w as p, O as r, h as s, P as t, C as u, n as v, t as x, i as y };
15281
+ export { t as S, A as _, u as a, i as b, h as c, w as d, c as f, C as g, v as h, k as i, p as l, T as m, g as n, d as o, s as p, o as r, f as s, F as t, l as u, r as v, e as x, n as y };