webim-adapter 0.17.0 → 0.19.0
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/build/webim-adapter.js +375 -329
- package/build/webim-embed.js +2 -2
- package/build/webim-ssr.js +86 -40
- package/package.json +1 -1
package/build/webim-adapter.js
CHANGED
|
@@ -48,36 +48,36 @@ function h(e) {
|
|
|
48
48
|
color: j,
|
|
49
49
|
inset: M
|
|
50
50
|
})), N.length && (t.boxShadow = N.join(", "));
|
|
51
|
-
let P = (e) => e.type === "blur" ? `blur(${p(e.v ?? 0)})` : e.type === "hue-rotate" ? `hue-rotate(${h(e.v ?? 0)})` : `${e.type}(${e.v ?? 100}%)`, F = (e) => (Array.isArray(e) ? e : []).filter((e) => e && e.on !== !1 && e.type).map(P), { filters: I, backdropFilters: ee, filterBlur: L, filterGrayscale:
|
|
51
|
+
let P = (e) => e.type === "blur" ? `blur(${p(e.v ?? 0)})` : e.type === "hue-rotate" ? `hue-rotate(${h(e.v ?? 0)})` : `${e.type}(${e.v ?? 100}%)`, F = (e) => (Array.isArray(e) ? e : []).filter((e) => e && e.on !== !1 && e.type).map(P), { filters: I, backdropFilters: ee, filterBlur: L, filterGrayscale: R, filterBrightness: z, filterContrast: te, filterSaturate: ne } = t;
|
|
52
52
|
delete t.filters, delete t.backdropFilters, delete t.filterBlur, delete t.filterGrayscale, delete t.filterBrightness, delete t.filterContrast, delete t.filterSaturate;
|
|
53
53
|
let B = F(I);
|
|
54
|
-
L !== void 0 && B.push(`blur(${p(L)})`),
|
|
54
|
+
L !== void 0 && B.push(`blur(${p(L)})`), R !== void 0 && B.push(`grayscale(${R}%)`), z !== void 0 && B.push(`brightness(${z}%)`), te !== void 0 && B.push(`contrast(${te}%)`), ne !== void 0 && B.push(`saturate(${ne}%)`), B.length && (t.filter = B.join(" "));
|
|
55
55
|
let re = F(ee);
|
|
56
56
|
re.length && (t.backdropFilter = re.join(" "), t.WebkitBackdropFilter = t.backdropFilter);
|
|
57
57
|
let { textStrokeWidth: ie, textStrokeColor: ae } = t;
|
|
58
58
|
delete t.textStrokeWidth, delete t.textStrokeColor, (ie !== void 0 || ae !== void 0) && (t.WebkitTextStroke = `${p(ie ?? 1)} ${ae || "currentColor"}`);
|
|
59
59
|
let { clipText: oe } = t;
|
|
60
60
|
delete t.clipText, oe && (t.WebkitBackgroundClip = "text", t.backgroundClip = "text", t.WebkitTextFillColor = "transparent");
|
|
61
|
-
let { transitions: se, transitionDuration: V, transitionEasing: H, transitionProperty:
|
|
61
|
+
let { transitions: se, transitionDuration: V, transitionEasing: H, transitionProperty: ce } = t, U = (e) => typeof e == "number" || !Number.isNaN(Number(e)) ? `${Number(e)}ms` : e;
|
|
62
62
|
delete t.transitions, delete t.transitionDuration, delete t.transitionEasing, delete t.transitionProperty;
|
|
63
|
-
let
|
|
64
|
-
if (V !== void 0 &&
|
|
63
|
+
let le = (Array.isArray(se) ? se : []).filter((e) => e && e.on !== !1).map((e) => `${e.property || "all"} ${U(e.duration ?? 200)} ${e.easing || "ease"}`);
|
|
64
|
+
if (V !== void 0 && le.push(`${ce || "all"} ${U(V)} ${H || "ease"}`), le.length && (t.transition = le.join(", ")), t.textDecoration !== void 0 && (t.textDecorationLine = t.textDecoration, delete t.textDecoration), t.backgroundImage && !String(t.backgroundImage).includes("(") && (t.backgroundImage = `url("${t.backgroundImage}")`), n) {
|
|
65
65
|
let e = `${i || "rgba(0,0,0,0.5)"}, ${a || "transparent"}`, o = n === "radial" ? `radial-gradient(circle, ${e})` : `linear-gradient(${r ?? 180}deg, ${e})`;
|
|
66
66
|
t.backgroundImage = t.backgroundImage ? `${o}, ${t.backgroundImage}` : o;
|
|
67
67
|
}
|
|
68
68
|
delete t.backgroundVideo;
|
|
69
|
-
let { overlayColor:
|
|
70
|
-
if (delete t.overlayColor, delete t.overlayOpacity,
|
|
71
|
-
let e = `color-mix(in srgb, ${
|
|
69
|
+
let { overlayColor: W, overlayOpacity: ue } = t;
|
|
70
|
+
if (delete t.overlayColor, delete t.overlayOpacity, W) {
|
|
71
|
+
let e = `color-mix(in srgb, ${W} ${ue ?? 50}%, transparent)`, n = `linear-gradient(${e}, ${e})`;
|
|
72
72
|
t.backgroundImage = t.backgroundImage ? `${n}, ${t.backgroundImage}` : n;
|
|
73
73
|
}
|
|
74
74
|
t.backgroundImage && (t.backgroundSize ??= "cover", t.backgroundPosition ??= "center", t.backgroundRepeat ??= "no-repeat");
|
|
75
|
-
let { backgroundLayers:
|
|
75
|
+
let { backgroundLayers: G } = t;
|
|
76
76
|
delete t.backgroundLayers;
|
|
77
|
-
let
|
|
78
|
-
if (
|
|
77
|
+
let de = (Array.isArray(G) ? G : []).filter((e) => e && e.on !== !1);
|
|
78
|
+
if (de.length) {
|
|
79
79
|
let e = [], n = [], r = [], i = [], a = [];
|
|
80
|
-
for (let t of
|
|
80
|
+
for (let t of de) if (t.kind === "linear") e.push(`linear-gradient(${t.angle ?? 180}deg, ${t.from || "rgba(0,0,0,0.5)"}, ${t.to || "transparent"})`), n.push("auto"), r.push("0% 0%"), i.push("repeat"), a.push("scroll");
|
|
81
81
|
else if (t.kind === "radial") e.push(`radial-gradient(circle, ${t.from || "rgba(0,0,0,0.5)"}, ${t.to || "transparent"})`), n.push("auto"), r.push("0% 0%"), i.push("repeat"), a.push("scroll");
|
|
82
82
|
else {
|
|
83
83
|
if (!t.src) continue;
|
|
@@ -284,7 +284,7 @@ function L(e, t) {
|
|
|
284
284
|
}
|
|
285
285
|
//#endregion
|
|
286
286
|
//#region src/bundle.js
|
|
287
|
-
function
|
|
287
|
+
function R({ page: e, settings: t, tenant: n, apiUrl: r, locale: i }) {
|
|
288
288
|
let a = {
|
|
289
289
|
...t?.global ?? {},
|
|
290
290
|
...t?.tenant ?? {}
|
|
@@ -308,18 +308,18 @@ function te({ page: e, settings: t, tenant: n, apiUrl: r, locale: i }) {
|
|
|
308
308
|
}
|
|
309
309
|
//#endregion
|
|
310
310
|
//#region src/fetchPage.js
|
|
311
|
-
var
|
|
311
|
+
var z = async (e) => {
|
|
312
312
|
let t = await e.json().catch(() => null);
|
|
313
313
|
if (!e.ok || t?.success === !1) throw Error(t?.error?.message || `Request failed (${e.status})`);
|
|
314
314
|
return t?.payload ?? t;
|
|
315
315
|
};
|
|
316
|
-
async function
|
|
316
|
+
async function te({ apiUrl: e, tenant: t, slug: n, locale: r, preview: i, token: a, page: o, fetch: s }) {
|
|
317
317
|
if (!e) throw Error("fetchPage: apiUrl is required");
|
|
318
318
|
if (!n) throw Error("fetchPage: slug is required");
|
|
319
319
|
let c = s ?? fetch, l = e.replace(/\/$/, ""), u = {
|
|
320
320
|
...t ? { "x-tenant": t } : {},
|
|
321
321
|
...a ? { authorization: `Bearer ${a}` } : {}
|
|
322
|
-
}, [d, f] = await Promise.all([c(`${l}/render/${encodeURIComponent(n)}${i ? `?preview=${encodeURIComponent(i)}` : ""}`, { headers: u }).then(
|
|
322
|
+
}, [d, f] = await Promise.all([c(`${l}/render/${encodeURIComponent(n)}${i ? `?preview=${encodeURIComponent(i)}` : ""}`, { headers: u }).then(z), c(`${l}/settings/public`, { headers: u }).then(z)]), p = R({
|
|
323
323
|
page: d,
|
|
324
324
|
settings: f,
|
|
325
325
|
tenant: t,
|
|
@@ -327,7 +327,7 @@ async function z({ apiUrl: e, tenant: t, slug: n, locale: r, preview: i, token:
|
|
|
327
327
|
locale: r
|
|
328
328
|
}), m = [...new Set(Object.values(p.blocks ?? {}).map((e) => e?.type?.resolvedName === "CollectionList" ? e.props?.collection : e?.type?.resolvedName === "TableBlock" || e?.type?.resolvedName === "OrgChartBlock" ? e.props?.source : null).filter(Boolean))];
|
|
329
329
|
if (m.length) {
|
|
330
|
-
let e = (e) => e.startsWith("api:") ? `${l}/data/${encodeURIComponent(e.slice(4))}` : `${l}/dynamic/${encodeURIComponent(e)}?all=1${r ? `&locale=${encodeURIComponent(r)}` : ""}`, t = await Promise.all(m.map((t) => c(e(t), { headers: u }).then(
|
|
330
|
+
let e = (e) => e.startsWith("api:") ? `${l}/data/${encodeURIComponent(e.slice(4))}` : `${l}/dynamic/${encodeURIComponent(e)}?all=1${r ? `&locale=${encodeURIComponent(r)}` : ""}`, t = await Promise.all(m.map((t) => c(e(t), { headers: u }).then(z).then((e) => {
|
|
331
331
|
let n = Array.isArray(e) ? e : Array.isArray(e?.data) ? e.data : [], r = Number(e?.total?.filtered ?? e?.total?.all ?? n.length);
|
|
332
332
|
return [[t, n], [`${t}:total`, Number.isFinite(r) ? r : n.length]];
|
|
333
333
|
}).catch(() => [[t, []]])));
|
|
@@ -486,17 +486,17 @@ var ae = /* @__PURE__ */ new Set([
|
|
|
486
486
|
apiUrl: "/api",
|
|
487
487
|
locale: "",
|
|
488
488
|
settings: null
|
|
489
|
-
}), H = t(null),
|
|
489
|
+
}), H = t(null), ce = (e) => {
|
|
490
490
|
let t = Number(e?.__page);
|
|
491
491
|
if (Number.isFinite(t) && t >= 1) return Math.floor(t);
|
|
492
492
|
if (typeof window > "u") return 1;
|
|
493
493
|
let n = Number(new URLSearchParams(window.location.search).get("page"));
|
|
494
494
|
return Number.isFinite(n) && n >= 1 ? Math.floor(n) : 1;
|
|
495
|
-
},
|
|
496
|
-
function
|
|
495
|
+
}, U = t(null), le = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
496
|
+
function W(e, t) {
|
|
497
497
|
if (t) return t.includes(".") ? t.split(".").reduce((e, t) => e && typeof e == "object" ? e[t] : void 0, e) : e?.[t];
|
|
498
498
|
}
|
|
499
|
-
var
|
|
499
|
+
var ue = (e) => {
|
|
500
500
|
let t = [];
|
|
501
501
|
for (let [n, r] of Object.entries(e ?? {})) {
|
|
502
502
|
if (!/^[\w-]+$/.test(n)) continue;
|
|
@@ -506,36 +506,36 @@ var le = (e) => {
|
|
|
506
506
|
}
|
|
507
507
|
return t;
|
|
508
508
|
};
|
|
509
|
-
function
|
|
509
|
+
function G(e) {
|
|
510
510
|
return e == null ? "" : typeof e == "string" || typeof e == "number" || typeof e == "boolean" ? String(e) : typeof e == "object" && !Array.isArray(e) && ("label" in e || "name" in e || "slug" in e) ? String(e.label ?? e.name ?? e.slug ?? "") : Array.isArray(e) ? e.map((e) => typeof e == "string" ? e : Array.isArray(e?.parts) ? e.parts.map((e) => e?.text ?? "").join("") : Array.isArray(e?.items) ? e.items.map((e) => e?.text ?? "").join(" ") : e && (e.label != null || e.name != null || e.slug != null) ? String(e.label ?? e.name ?? e.slug) : "").filter(Boolean).join(" ") : "";
|
|
511
511
|
}
|
|
512
|
-
function
|
|
513
|
-
let n = t?.data ?? {}, r =
|
|
512
|
+
function de(e, t) {
|
|
513
|
+
let n = t?.data ?? {}, r = ue(n);
|
|
514
514
|
if (!r.length) return e;
|
|
515
|
-
let i = RegExp(`:(${r.map(
|
|
515
|
+
let i = RegExp(`:(${r.map(le).sort((e, t) => t.length - e.length).join("|")})`, "g"), a = (e) => typeof e == "string" ? e.replace(i, (e, t) => G(W(n, t))) : Array.isArray(e) ? e.map(a) : e && typeof e == "object" ? Object.fromEntries(Object.entries(e).map(([e, t]) => [e, a(t)])) : e;
|
|
516
516
|
return a(e);
|
|
517
517
|
}
|
|
518
|
-
var
|
|
518
|
+
var fe = {
|
|
519
519
|
margin: 0,
|
|
520
520
|
fontWeight: 700,
|
|
521
521
|
lineHeight: 1.2,
|
|
522
522
|
fontFamily: "var(--page-heading-font, inherit)"
|
|
523
|
-
},
|
|
523
|
+
}, pe = { margin: 0 }, K = {
|
|
524
524
|
display: "inline-block",
|
|
525
525
|
textDecoration: "none",
|
|
526
526
|
cursor: "pointer",
|
|
527
527
|
backgroundColor: "var(--page-accent, #111827)",
|
|
528
528
|
color: "var(--page-accent-text, #ffffff)"
|
|
529
|
-
},
|
|
529
|
+
}, me = {
|
|
530
530
|
flexGrow: 1,
|
|
531
531
|
display: "flex",
|
|
532
532
|
flexDirection: "column",
|
|
533
533
|
position: "relative"
|
|
534
|
-
},
|
|
534
|
+
}, he = {
|
|
535
535
|
display: "flex",
|
|
536
536
|
flexDirection: "column"
|
|
537
537
|
};
|
|
538
|
-
function
|
|
538
|
+
function ge({ style: e }) {
|
|
539
539
|
let t = e?.backgroundVideo;
|
|
540
540
|
if (!t) return null;
|
|
541
541
|
let n = {
|
|
@@ -561,7 +561,7 @@ function he({ style: e }) {
|
|
|
561
561
|
background: r
|
|
562
562
|
} })] });
|
|
563
563
|
}
|
|
564
|
-
var
|
|
564
|
+
var _e = (e, t) => e?.backgroundVideo ? {
|
|
565
565
|
position: "relative",
|
|
566
566
|
...t,
|
|
567
567
|
...h(e)
|
|
@@ -569,24 +569,24 @@ var ge = (e, t) => e?.backgroundVideo ? {
|
|
|
569
569
|
...t,
|
|
570
570
|
...h(e)
|
|
571
571
|
};
|
|
572
|
-
function
|
|
572
|
+
function ve({ style: e, nodeRef: t, children: n }) {
|
|
573
573
|
return /* @__PURE__ */ d("div", {
|
|
574
574
|
ref: t,
|
|
575
575
|
style: {
|
|
576
|
-
...
|
|
576
|
+
...me,
|
|
577
577
|
...h(e)
|
|
578
578
|
},
|
|
579
|
-
children: [/* @__PURE__ */ u(
|
|
579
|
+
children: [/* @__PURE__ */ u(ge, { style: e }), n]
|
|
580
580
|
});
|
|
581
581
|
}
|
|
582
|
-
function
|
|
582
|
+
function ye({ style: e, nodeRef: t, children: n }) {
|
|
583
583
|
return /* @__PURE__ */ d("section", {
|
|
584
584
|
ref: t,
|
|
585
|
-
style:
|
|
586
|
-
children: [/* @__PURE__ */ u(
|
|
585
|
+
style: _e(e, he),
|
|
586
|
+
children: [/* @__PURE__ */ u(ge, { style: e }), n]
|
|
587
587
|
});
|
|
588
588
|
}
|
|
589
|
-
function
|
|
589
|
+
function be({ style: e, freeLayout: t, nodeRef: n, children: r }) {
|
|
590
590
|
let i = t ? {
|
|
591
591
|
position: "relative",
|
|
592
592
|
minHeight: 240
|
|
@@ -595,32 +595,32 @@ function ye({ style: e, freeLayout: t, nodeRef: n, children: r }) {
|
|
|
595
595
|
ref: n,
|
|
596
596
|
style: i ? {
|
|
597
597
|
...i,
|
|
598
|
-
...
|
|
599
|
-
} :
|
|
600
|
-
children: [/* @__PURE__ */ u(
|
|
598
|
+
..._e(e)
|
|
599
|
+
} : _e(e),
|
|
600
|
+
children: [/* @__PURE__ */ u(ge, { style: e }), r]
|
|
601
601
|
});
|
|
602
602
|
}
|
|
603
|
-
function
|
|
603
|
+
function xe({ text: e, parts: t, tag: n = "h2", style: r, linked: i, nodeRef: a }) {
|
|
604
604
|
return /* @__PURE__ */ u(n, {
|
|
605
605
|
ref: a,
|
|
606
606
|
style: {
|
|
607
|
-
...
|
|
607
|
+
...fe,
|
|
608
608
|
...h(r)
|
|
609
609
|
},
|
|
610
|
-
children:
|
|
610
|
+
children: q(t, e, i)
|
|
611
611
|
});
|
|
612
612
|
}
|
|
613
|
-
var
|
|
613
|
+
var Se = {
|
|
614
614
|
fontFamily: j.mono.value,
|
|
615
615
|
background: "rgba(148, 163, 184, 0.18)",
|
|
616
616
|
padding: "1px 5px",
|
|
617
617
|
borderRadius: 4,
|
|
618
618
|
fontSize: "0.9em"
|
|
619
619
|
};
|
|
620
|
-
function
|
|
620
|
+
function Ce(e, t = [], n, r) {
|
|
621
621
|
let i = e;
|
|
622
622
|
return t.includes("sup") ? i = /* @__PURE__ */ u("sup", { children: i }) : t.includes("sub") && (i = /* @__PURE__ */ u("sub", { children: i })), t.includes("code") && (i = /* @__PURE__ */ u("code", {
|
|
623
|
-
style:
|
|
623
|
+
style: Se,
|
|
624
624
|
children: i
|
|
625
625
|
})), t.includes("strike") && (i = /* @__PURE__ */ u("s", { children: i })), t.includes("underline") && (i = /* @__PURE__ */ u("u", { children: i })), t.includes("italic") && (i = /* @__PURE__ */ u("em", { children: i })), t.includes("bold") && (i = /* @__PURE__ */ u("strong", { children: i })), n && (i = /* @__PURE__ */ u("a", {
|
|
626
626
|
href: n,
|
|
@@ -630,13 +630,13 @@ function Se(e, t = [], n, r) {
|
|
|
630
630
|
children: i
|
|
631
631
|
})), i;
|
|
632
632
|
}
|
|
633
|
-
function
|
|
633
|
+
function q(t, n, r) {
|
|
634
634
|
return t?.length ? t.map((t, n) => {
|
|
635
635
|
if (t.slot) return /* @__PURE__ */ u(e, { children: r?.[t.slot] ?? null }, n);
|
|
636
|
-
if (t.parts) return /* @__PURE__ */ u(e, { children:
|
|
636
|
+
if (t.parts) return /* @__PURE__ */ u(e, { children: q(t.parts, "", r) }, n);
|
|
637
637
|
let i = t.text;
|
|
638
638
|
return t.sup ? i = /* @__PURE__ */ u("sup", { children: i }) : t.sub && (i = /* @__PURE__ */ u("sub", { children: i })), t.code && (i = /* @__PURE__ */ u("code", {
|
|
639
|
-
style:
|
|
639
|
+
style: Se,
|
|
640
640
|
children: i
|
|
641
641
|
})), t.strike && (i = /* @__PURE__ */ u("s", { children: i })), t.underline && (i = /* @__PURE__ */ u("u", { children: i })), t.italic && (i = /* @__PURE__ */ u("em", { children: i })), t.bold && (i = /* @__PURE__ */ u("strong", { children: i })), (t.color || t.background) && (i = /* @__PURE__ */ u("span", {
|
|
642
642
|
style: {
|
|
@@ -653,13 +653,13 @@ function J(t, n, r) {
|
|
|
653
653
|
})), /* @__PURE__ */ u(e, { children: i }, n);
|
|
654
654
|
}) : n;
|
|
655
655
|
}
|
|
656
|
-
function
|
|
656
|
+
function we({ parts: e, text: t, marks: n, href: r, target: i, style: a }) {
|
|
657
657
|
return /* @__PURE__ */ u("span", {
|
|
658
658
|
style: h(a),
|
|
659
|
-
children: e?.length ?
|
|
659
|
+
children: e?.length ? q(e, t) : Ce(t, n, r, i)
|
|
660
660
|
});
|
|
661
661
|
}
|
|
662
|
-
var
|
|
662
|
+
var Te = {
|
|
663
663
|
h1: 40,
|
|
664
664
|
h2: 32,
|
|
665
665
|
h3: 26,
|
|
@@ -667,7 +667,7 @@ var we = {
|
|
|
667
667
|
h5: 19,
|
|
668
668
|
h6: 16
|
|
669
669
|
};
|
|
670
|
-
function
|
|
670
|
+
function Ee({ align: e = "center", width: t, wrap: n } = {}) {
|
|
671
671
|
let r = t ? `${t}%` : void 0;
|
|
672
672
|
if (e === "full") return { width: "100%" };
|
|
673
673
|
let i = e === "left" || e === "right";
|
|
@@ -701,8 +701,8 @@ function Te({ align: e = "center", width: t, wrap: n } = {}) {
|
|
|
701
701
|
marginRight: "auto"
|
|
702
702
|
};
|
|
703
703
|
}
|
|
704
|
-
function
|
|
705
|
-
let r = n ?? ((e, n) =>
|
|
704
|
+
function De(e = [], t, n) {
|
|
705
|
+
let r = n ?? ((e, n) => q(e, n, t));
|
|
706
706
|
return e.map((t, n) => {
|
|
707
707
|
let i = {
|
|
708
708
|
marginTop: 0,
|
|
@@ -724,7 +724,7 @@ function Ee(e = [], t, n) {
|
|
|
724
724
|
marginLeft: 0,
|
|
725
725
|
marginRight: 0,
|
|
726
726
|
...i,
|
|
727
|
-
...
|
|
727
|
+
...Ee(t)
|
|
728
728
|
},
|
|
729
729
|
children: [t.href ? /* @__PURE__ */ u("a", {
|
|
730
730
|
href: t.href,
|
|
@@ -743,16 +743,16 @@ function Ee(e = [], t, n) {
|
|
|
743
743
|
})]
|
|
744
744
|
}, n);
|
|
745
745
|
}
|
|
746
|
-
if (t.type === "video") return
|
|
746
|
+
if (t.type === "video") return Re(t.url) ? /* @__PURE__ */ u("div", {
|
|
747
747
|
style: {
|
|
748
748
|
...i,
|
|
749
|
-
...
|
|
749
|
+
...Ee({
|
|
750
750
|
align: t.align,
|
|
751
751
|
wrap: t.wrap,
|
|
752
752
|
width: t.width ?? 100
|
|
753
753
|
})
|
|
754
754
|
},
|
|
755
|
-
children: /* @__PURE__ */ u(
|
|
755
|
+
children: /* @__PURE__ */ u(ze, {
|
|
756
756
|
url: t.url,
|
|
757
757
|
autoplay: t.autoplay,
|
|
758
758
|
muted: t.muted,
|
|
@@ -766,6 +766,39 @@ function Ee(e = [], t, n) {
|
|
|
766
766
|
border: 0,
|
|
767
767
|
borderTop: "1px solid rgba(148, 163, 184, 0.4)"
|
|
768
768
|
} }, n);
|
|
769
|
+
if (t.type === "table") {
|
|
770
|
+
let e = Array.isArray(t.rows) ? t.rows.filter(Array.isArray) : [];
|
|
771
|
+
if (!e.length) return null;
|
|
772
|
+
let r = t.header !== !1, a = {
|
|
773
|
+
border: t.borders === !1 ? void 0 : "1px solid rgba(148, 163, 184, 0.4)",
|
|
774
|
+
padding: "6px 10px",
|
|
775
|
+
textAlign: "left",
|
|
776
|
+
verticalAlign: "top"
|
|
777
|
+
}, o = r ? e.slice(1) : e, s = Array.isArray(t.widths) ? t.widths : null;
|
|
778
|
+
return /* @__PURE__ */ d("table", {
|
|
779
|
+
style: {
|
|
780
|
+
...i,
|
|
781
|
+
borderCollapse: "collapse",
|
|
782
|
+
width: "100%",
|
|
783
|
+
fontSize: "inherit",
|
|
784
|
+
tableLayout: s ? "fixed" : void 0
|
|
785
|
+
},
|
|
786
|
+
children: [
|
|
787
|
+
s && /* @__PURE__ */ u("colgroup", { children: s.map((e, t) => /* @__PURE__ */ u("col", { style: { width: `${e}%` } }, t)) }),
|
|
788
|
+
r && /* @__PURE__ */ u("thead", { children: /* @__PURE__ */ u("tr", { children: e[0].map((e, t) => /* @__PURE__ */ u("th", {
|
|
789
|
+
style: {
|
|
790
|
+
...a,
|
|
791
|
+
fontWeight: 700
|
|
792
|
+
},
|
|
793
|
+
children: e
|
|
794
|
+
}, t)) }) }),
|
|
795
|
+
/* @__PURE__ */ u("tbody", { children: o.map((e, t) => /* @__PURE__ */ u("tr", { children: e.map((e, t) => /* @__PURE__ */ u("td", {
|
|
796
|
+
style: a,
|
|
797
|
+
children: e
|
|
798
|
+
}, t)) }, t)) })
|
|
799
|
+
]
|
|
800
|
+
}, n);
|
|
801
|
+
}
|
|
769
802
|
if (t.type === "ul" || t.type === "ol") {
|
|
770
803
|
let e = t.type;
|
|
771
804
|
return /* @__PURE__ */ u(e, {
|
|
@@ -781,17 +814,17 @@ function Ee(e = [], t, n) {
|
|
|
781
814
|
}
|
|
782
815
|
if (t.type === "quote") return /* @__PURE__ */ u("blockquote", {
|
|
783
816
|
style: {
|
|
784
|
-
...
|
|
817
|
+
...ke,
|
|
785
818
|
...i
|
|
786
819
|
},
|
|
787
820
|
children: r(t.parts, t.text)
|
|
788
821
|
}, n);
|
|
789
|
-
if (
|
|
822
|
+
if (Te[t.type]) {
|
|
790
823
|
let e = t.type;
|
|
791
824
|
return /* @__PURE__ */ u(e, {
|
|
792
825
|
style: {
|
|
793
|
-
...
|
|
794
|
-
fontSize:
|
|
826
|
+
...fe,
|
|
827
|
+
fontSize: Te[t.type],
|
|
795
828
|
...i
|
|
796
829
|
},
|
|
797
830
|
children: r(t.parts, t.text)
|
|
@@ -799,39 +832,39 @@ function Ee(e = [], t, n) {
|
|
|
799
832
|
}
|
|
800
833
|
return /* @__PURE__ */ u("p", {
|
|
801
834
|
style: {
|
|
802
|
-
...
|
|
835
|
+
...pe,
|
|
803
836
|
...i
|
|
804
837
|
},
|
|
805
838
|
children: r(t.parts, t.text)
|
|
806
839
|
}, n);
|
|
807
840
|
});
|
|
808
841
|
}
|
|
809
|
-
function
|
|
842
|
+
function Oe({ content: e, style: t, linked: n, nodeRef: r }) {
|
|
810
843
|
return /* @__PURE__ */ u("div", {
|
|
811
844
|
ref: r,
|
|
812
845
|
style: {
|
|
813
846
|
display: "flow-root",
|
|
814
847
|
...h(t)
|
|
815
848
|
},
|
|
816
|
-
children:
|
|
849
|
+
children: De(e, n)
|
|
817
850
|
});
|
|
818
851
|
}
|
|
819
|
-
var
|
|
852
|
+
var ke = {
|
|
820
853
|
margin: 0,
|
|
821
854
|
padding: "8px 0 8px 20px",
|
|
822
855
|
borderLeft: "4px solid var(--page-accent, rgba(148, 163, 184, 0.6))"
|
|
823
856
|
};
|
|
824
|
-
function
|
|
857
|
+
function Ae({ text: e, parts: t, style: n, linked: r, nodeRef: i }) {
|
|
825
858
|
return /* @__PURE__ */ u("blockquote", {
|
|
826
859
|
ref: i,
|
|
827
860
|
style: {
|
|
828
|
-
...
|
|
861
|
+
...ke,
|
|
829
862
|
...h(n)
|
|
830
863
|
},
|
|
831
|
-
children:
|
|
864
|
+
children: q(t, e, r)
|
|
832
865
|
});
|
|
833
866
|
}
|
|
834
|
-
function
|
|
867
|
+
function je({ ordered: e, items: t = [], style: n, nodeRef: r }) {
|
|
835
868
|
return /* @__PURE__ */ u(e ? "ol" : "ul", {
|
|
836
869
|
ref: r,
|
|
837
870
|
style: {
|
|
@@ -841,53 +874,53 @@ function Ae({ ordered: e, items: t = [], style: n, nodeRef: r }) {
|
|
|
841
874
|
},
|
|
842
875
|
children: t.map((e, t) => /* @__PURE__ */ u("li", {
|
|
843
876
|
style: { marginBottom: 4 },
|
|
844
|
-
children:
|
|
877
|
+
children: q(e.parts, e.text)
|
|
845
878
|
}, t))
|
|
846
879
|
});
|
|
847
880
|
}
|
|
848
|
-
function
|
|
881
|
+
function Me({ text: e, parts: t, style: n, linked: r, nodeRef: i }) {
|
|
849
882
|
return /* @__PURE__ */ u("p", {
|
|
850
883
|
ref: i,
|
|
851
884
|
style: {
|
|
852
|
-
...
|
|
885
|
+
...pe,
|
|
853
886
|
...h(n)
|
|
854
887
|
},
|
|
855
|
-
children:
|
|
888
|
+
children: q(t, e, r)
|
|
856
889
|
});
|
|
857
890
|
}
|
|
858
|
-
var
|
|
891
|
+
var Ne = {
|
|
859
892
|
color: "var(--page-accent, inherit)",
|
|
860
893
|
textDecoration: "underline",
|
|
861
894
|
textUnderlineOffset: 3,
|
|
862
895
|
cursor: "pointer"
|
|
863
896
|
};
|
|
864
|
-
function
|
|
897
|
+
function Pe({ text: e, parts: t, href: n, target: r, style: i, linked: a, nodeRef: o }) {
|
|
865
898
|
return /* @__PURE__ */ u("a", {
|
|
866
899
|
ref: o,
|
|
867
900
|
href: n || "#",
|
|
868
901
|
target: r || void 0,
|
|
869
902
|
rel: r === "_blank" ? "noopener noreferrer" : void 0,
|
|
870
903
|
style: {
|
|
871
|
-
...
|
|
904
|
+
...Ne,
|
|
872
905
|
...h(i)
|
|
873
906
|
},
|
|
874
|
-
children:
|
|
907
|
+
children: q(t, e, a)
|
|
875
908
|
});
|
|
876
909
|
}
|
|
877
|
-
function
|
|
910
|
+
function Fe({ text: e, parts: t, href: n, target: r, style: i, linked: a, nodeRef: o }) {
|
|
878
911
|
return /* @__PURE__ */ u("a", {
|
|
879
912
|
ref: o,
|
|
880
913
|
href: n || "#",
|
|
881
914
|
target: r || void 0,
|
|
882
915
|
rel: r === "_blank" ? "noopener noreferrer" : void 0,
|
|
883
916
|
style: {
|
|
884
|
-
...
|
|
917
|
+
...K,
|
|
885
918
|
...h(i)
|
|
886
919
|
},
|
|
887
|
-
children:
|
|
920
|
+
children: q(t, e, a)
|
|
888
921
|
});
|
|
889
922
|
}
|
|
890
|
-
function
|
|
923
|
+
function Ie({ src: e, alt: t, style: n, nodeRef: r }) {
|
|
891
924
|
return e ? /* @__PURE__ */ u("img", {
|
|
892
925
|
ref: r,
|
|
893
926
|
src: e,
|
|
@@ -899,7 +932,7 @@ function Fe({ src: e, alt: t, style: n, nodeRef: r }) {
|
|
|
899
932
|
}
|
|
900
933
|
}) : null;
|
|
901
934
|
}
|
|
902
|
-
function
|
|
935
|
+
function Le({ src: e, poster: t, controls: n = !0, autoplay: r = !1, loop: i = !1, muted: a = !1, style: o, nodeRef: s }) {
|
|
903
936
|
return e ? /* @__PURE__ */ u("video", {
|
|
904
937
|
ref: s,
|
|
905
938
|
src: e,
|
|
@@ -917,9 +950,9 @@ function Ie({ src: e, poster: t, controls: n = !0, autoplay: r = !1, loop: i = !
|
|
|
917
950
|
}
|
|
918
951
|
}) : null;
|
|
919
952
|
}
|
|
920
|
-
var
|
|
921
|
-
function
|
|
922
|
-
let c =
|
|
953
|
+
var Re = (e = "") => (e.match(/(?:youtu\.be\/|v=|embed\/|shorts\/|live\/)([\w-]{11})/) || e.match(/^([\w-]{11})$/))?.[1];
|
|
954
|
+
function ze({ url: e, autoplay: t = !1, muted: n = !1, loop: r = !1, controls: i = !0, start: a, style: o, nodeRef: s }) {
|
|
955
|
+
let c = Re(e);
|
|
923
956
|
if (!c) return null;
|
|
924
957
|
let l = new URLSearchParams({ rel: "0" });
|
|
925
958
|
return t && l.set("autoplay", "1"), (n || t) && l.set("mute", "1"), i || l.set("controls", "0"), r && (l.set("loop", "1"), l.set("playlist", c)), Number(a) > 0 && l.set("start", String(Math.floor(Number(a)))), /* @__PURE__ */ u("div", {
|
|
@@ -945,7 +978,7 @@ function Re({ url: e, autoplay: t = !1, muted: n = !1, loop: r = !1, controls: i
|
|
|
945
978
|
})
|
|
946
979
|
});
|
|
947
980
|
}
|
|
948
|
-
function
|
|
981
|
+
function Be({ src: e, title: t, allowFullscreen: n = !0, style: r, nodeRef: i }) {
|
|
949
982
|
return e ? /* @__PURE__ */ u("iframe", {
|
|
950
983
|
ref: i,
|
|
951
984
|
src: e,
|
|
@@ -961,7 +994,7 @@ function ze({ src: e, title: t, allowFullscreen: n = !0, style: r, nodeRef: i })
|
|
|
961
994
|
}
|
|
962
995
|
}) : null;
|
|
963
996
|
}
|
|
964
|
-
function
|
|
997
|
+
function Ve({ code: e, runScripts: t = !0, style: n, nodeRef: r }) {
|
|
965
998
|
let [a, o] = c(null);
|
|
966
999
|
return i(() => {
|
|
967
1000
|
a && (a.innerHTML = e || "", t && a.querySelectorAll("script").forEach((e) => {
|
|
@@ -980,7 +1013,7 @@ function Be({ code: e, runScripts: t = !0, style: n, nodeRef: r }) {
|
|
|
980
1013
|
style: h(n)
|
|
981
1014
|
});
|
|
982
1015
|
}
|
|
983
|
-
function
|
|
1016
|
+
function He({ height: e, nodeRef: t }) {
|
|
984
1017
|
return /* @__PURE__ */ u("div", {
|
|
985
1018
|
ref: t,
|
|
986
1019
|
style: {
|
|
@@ -990,7 +1023,7 @@ function Ve({ height: e, nodeRef: t }) {
|
|
|
990
1023
|
}
|
|
991
1024
|
});
|
|
992
1025
|
}
|
|
993
|
-
function
|
|
1026
|
+
function Ue({ style: e, nodeRef: t }) {
|
|
994
1027
|
return /* @__PURE__ */ u("div", {
|
|
995
1028
|
ref: t,
|
|
996
1029
|
style: {
|
|
@@ -1001,7 +1034,7 @@ function He({ style: e, nodeRef: t }) {
|
|
|
1001
1034
|
}
|
|
1002
1035
|
});
|
|
1003
1036
|
}
|
|
1004
|
-
var
|
|
1037
|
+
var We = {
|
|
1005
1038
|
position: "absolute",
|
|
1006
1039
|
top: "50%",
|
|
1007
1040
|
transform: "translateY(-50%)",
|
|
@@ -1018,7 +1051,7 @@ var Ue = {
|
|
|
1018
1051
|
alignItems: "center",
|
|
1019
1052
|
justifyContent: "center",
|
|
1020
1053
|
padding: 0
|
|
1021
|
-
},
|
|
1054
|
+
}, Ge = {
|
|
1022
1055
|
bottom: {
|
|
1023
1056
|
inset: "auto 0 0 0",
|
|
1024
1057
|
padding: "40px 24px 20px",
|
|
@@ -1037,8 +1070,8 @@ var Ue = {
|
|
|
1037
1070
|
padding: 24,
|
|
1038
1071
|
textShadow: "0 2px 12px rgba(0, 0, 0, 0.6)"
|
|
1039
1072
|
}
|
|
1040
|
-
},
|
|
1041
|
-
function
|
|
1073
|
+
}, Ke = 48;
|
|
1074
|
+
function qe({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, height: a = 320, swipe: o = !0, style: s, nodeRef: f }) {
|
|
1042
1075
|
let [p, m] = c(0), [g, _] = c(!1), [v, y] = c(null), b = e ? Math.min(p, e - 1) : 0;
|
|
1043
1076
|
if (i(() => {
|
|
1044
1077
|
if (!n || g || v || e < 2) return;
|
|
@@ -1054,7 +1087,7 @@ function Ke({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
|
|
|
1054
1087
|
let x = (t) => m((t + e) % e), S = () => {
|
|
1055
1088
|
if (!v) return;
|
|
1056
1089
|
let { dx: e } = v;
|
|
1057
|
-
y(null), e < -48 ? x(b + 1) : e >
|
|
1090
|
+
y(null), e < -48 ? x(b + 1) : e > Ke && x(b - 1);
|
|
1058
1091
|
};
|
|
1059
1092
|
return /* @__PURE__ */ d("div", {
|
|
1060
1093
|
ref: f,
|
|
@@ -1102,7 +1135,7 @@ function Ke({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
|
|
|
1102
1135
|
type: "button",
|
|
1103
1136
|
"aria-label": "Previous slide",
|
|
1104
1137
|
style: {
|
|
1105
|
-
...
|
|
1138
|
+
...We,
|
|
1106
1139
|
left: 12
|
|
1107
1140
|
},
|
|
1108
1141
|
onClick: () => x(b - 1),
|
|
@@ -1112,7 +1145,7 @@ function Ke({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
|
|
|
1112
1145
|
type: "button",
|
|
1113
1146
|
"aria-label": "Next slide",
|
|
1114
1147
|
style: {
|
|
1115
|
-
...
|
|
1148
|
+
...We,
|
|
1116
1149
|
right: 12
|
|
1117
1150
|
},
|
|
1118
1151
|
onClick: () => x(b + 1),
|
|
@@ -1146,7 +1179,7 @@ function Ke({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
|
|
|
1146
1179
|
] })]
|
|
1147
1180
|
});
|
|
1148
1181
|
}
|
|
1149
|
-
var
|
|
1182
|
+
var Je = (e, t) => ({
|
|
1150
1183
|
position: "absolute",
|
|
1151
1184
|
inset: 0,
|
|
1152
1185
|
backgroundImage: e ? `url(${e})` : "none",
|
|
@@ -1154,18 +1187,18 @@ var qe = (e, t) => ({
|
|
|
1154
1187
|
backgroundSize: "cover",
|
|
1155
1188
|
backgroundPosition: "center"
|
|
1156
1189
|
});
|
|
1157
|
-
function
|
|
1158
|
-
return e.length ? /* @__PURE__ */ u(
|
|
1190
|
+
function Ye({ slides: e = [], captionPosition: t = "bottom", captionAlign: n = "left", ...r }) {
|
|
1191
|
+
return e.length ? /* @__PURE__ */ u(qe, {
|
|
1159
1192
|
...r,
|
|
1160
1193
|
count: e.length,
|
|
1161
1194
|
renderSlide: (r) => {
|
|
1162
1195
|
let i = e[r];
|
|
1163
|
-
return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("div", { style:
|
|
1196
|
+
return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("div", { style: Je(i.image) }), (i.title || i.text) && /* @__PURE__ */ d("div", {
|
|
1164
1197
|
style: {
|
|
1165
1198
|
position: "absolute",
|
|
1166
1199
|
color: "#fff",
|
|
1167
1200
|
textAlign: n,
|
|
1168
|
-
...
|
|
1201
|
+
...Ge[t] ?? Ge.bottom
|
|
1169
1202
|
},
|
|
1170
1203
|
children: [i.title && /* @__PURE__ */ u("div", {
|
|
1171
1204
|
style: {
|
|
@@ -1185,13 +1218,13 @@ function Je({ slides: e = [], captionPosition: t = "bottom", captionAlign: n = "
|
|
|
1185
1218
|
}
|
|
1186
1219
|
}) : null;
|
|
1187
1220
|
}
|
|
1188
|
-
function
|
|
1189
|
-
return e.length ? /* @__PURE__ */ u(
|
|
1221
|
+
function Xe({ slides: e = [], linked: t, ...n }) {
|
|
1222
|
+
return e.length ? /* @__PURE__ */ u(qe, {
|
|
1190
1223
|
...n,
|
|
1191
1224
|
count: e.length,
|
|
1192
1225
|
renderSlide: (n) => {
|
|
1193
1226
|
let r = e[n];
|
|
1194
|
-
return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("div", { style:
|
|
1227
|
+
return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("div", { style: Je(r.image, r.color) }), /* @__PURE__ */ u("div", {
|
|
1195
1228
|
style: {
|
|
1196
1229
|
position: "absolute",
|
|
1197
1230
|
inset: 0,
|
|
@@ -1203,7 +1236,7 @@ function Ye({ slides: e = [], linked: t, ...n }) {
|
|
|
1203
1236
|
}
|
|
1204
1237
|
}) : null;
|
|
1205
1238
|
}
|
|
1206
|
-
function
|
|
1239
|
+
function Ze({ images: e = [], columns: t = 3, gap: n = 8, showNames: r = !1, lightbox: a = !0, style: o, nodeRef: s, inert: f }) {
|
|
1207
1240
|
let p = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && e.src) : [], m = Math.max(0, Number(n) || 0), g = f ? (e) => e.preventDefault() : void 0, [_, v] = c(null), y = a && !f && _ !== null && p[_];
|
|
1208
1241
|
i(() => {
|
|
1209
1242
|
if (!y) return;
|
|
@@ -1402,19 +1435,19 @@ function Xe({ images: e = [], columns: t = 3, gap: n = 8, showNames: r = !1, lig
|
|
|
1402
1435
|
]
|
|
1403
1436
|
});
|
|
1404
1437
|
}
|
|
1405
|
-
var
|
|
1438
|
+
var Qe = {
|
|
1406
1439
|
color: "inherit",
|
|
1407
1440
|
textDecoration: "none",
|
|
1408
1441
|
fontSize: 14,
|
|
1409
1442
|
opacity: .85
|
|
1410
|
-
},
|
|
1443
|
+
}, $e = {
|
|
1411
1444
|
background: "var(--page-bg, #ffffff)",
|
|
1412
1445
|
color: "var(--page-text, #111827)",
|
|
1413
1446
|
border: "1px solid rgba(148, 163, 184, 0.25)",
|
|
1414
1447
|
boxShadow: "0 16px 40px rgba(15, 23, 42, 0.16)",
|
|
1415
1448
|
zIndex: 60
|
|
1416
1449
|
};
|
|
1417
|
-
function
|
|
1450
|
+
function et({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], style: s, nodeRef: f, menu: p = "auto", breakpoint: m = 768 }) {
|
|
1418
1451
|
let [g, _] = c(null), [v, y] = c(!1), [b, x] = c(!1), [S, C] = c(null);
|
|
1419
1452
|
i(() => {
|
|
1420
1453
|
if (!g) return;
|
|
@@ -1424,7 +1457,7 @@ function Qe({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
|
|
|
1424
1457
|
let w = p === "hamburger" || p === "auto" && v, T = (e, t) => /* @__PURE__ */ d("a", {
|
|
1425
1458
|
href: e.href || "#",
|
|
1426
1459
|
style: {
|
|
1427
|
-
...
|
|
1460
|
+
...Qe,
|
|
1428
1461
|
display: "block",
|
|
1429
1462
|
...t
|
|
1430
1463
|
},
|
|
@@ -1512,7 +1545,7 @@ function Qe({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
|
|
|
1512
1545
|
let t = e.children ?? [];
|
|
1513
1546
|
if (!t.length) return /* @__PURE__ */ u("a", {
|
|
1514
1547
|
href: e.href || "#",
|
|
1515
|
-
style:
|
|
1548
|
+
style: Qe,
|
|
1516
1549
|
children: e.label
|
|
1517
1550
|
}, e.key);
|
|
1518
1551
|
let n = e.type === "mega";
|
|
@@ -1526,7 +1559,7 @@ function Qe({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
|
|
|
1526
1559
|
children: [/* @__PURE__ */ d("a", {
|
|
1527
1560
|
href: e.href || "#",
|
|
1528
1561
|
style: {
|
|
1529
|
-
...
|
|
1562
|
+
...Qe,
|
|
1530
1563
|
cursor: "pointer"
|
|
1531
1564
|
},
|
|
1532
1565
|
children: [
|
|
@@ -1542,7 +1575,7 @@ function Qe({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
|
|
|
1542
1575
|
]
|
|
1543
1576
|
}), S === e.key && (n ? /* @__PURE__ */ u("div", {
|
|
1544
1577
|
style: {
|
|
1545
|
-
|
|
1578
|
+
...$e,
|
|
1546
1579
|
position: "absolute",
|
|
1547
1580
|
left: 0,
|
|
1548
1581
|
right: 0,
|
|
@@ -1558,7 +1591,7 @@ function Qe({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
|
|
|
1558
1591
|
}))
|
|
1559
1592
|
}) : /* @__PURE__ */ u("div", {
|
|
1560
1593
|
style: {
|
|
1561
|
-
|
|
1594
|
+
...$e,
|
|
1562
1595
|
position: "absolute",
|
|
1563
1596
|
top: "100%",
|
|
1564
1597
|
left: 0,
|
|
@@ -1587,7 +1620,7 @@ function Qe({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
|
|
|
1587
1620
|
children: o.map((t) => /* @__PURE__ */ d(e, { children: [/* @__PURE__ */ u("a", {
|
|
1588
1621
|
href: t.href || "#",
|
|
1589
1622
|
style: {
|
|
1590
|
-
...
|
|
1623
|
+
...Qe,
|
|
1591
1624
|
padding: "10px 4px",
|
|
1592
1625
|
fontWeight: (t.children ?? []).length ? 600 : 400,
|
|
1593
1626
|
opacity: 1
|
|
@@ -1598,7 +1631,7 @@ function Qe({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
|
|
|
1598
1631
|
]
|
|
1599
1632
|
});
|
|
1600
1633
|
}
|
|
1601
|
-
function
|
|
1634
|
+
function tt({ tabs: e = [], linked: t, style: n, nodeRef: r }) {
|
|
1602
1635
|
let [i, a] = c(0), o = e.length ? Math.min(i, e.length - 1) : 0;
|
|
1603
1636
|
return e.length ? /* @__PURE__ */ d("div", {
|
|
1604
1637
|
ref: r,
|
|
@@ -1638,7 +1671,7 @@ function $e({ tabs: e = [], linked: t, style: n, nodeRef: r }) {
|
|
|
1638
1671
|
}, e.key))]
|
|
1639
1672
|
}) : null;
|
|
1640
1673
|
}
|
|
1641
|
-
function
|
|
1674
|
+
function nt({ items: e = [], linked: t, multiple: n = !1, style: r, nodeRef: i }) {
|
|
1642
1675
|
let [a, o] = c(() => new Set(e.length ? [e[0].key] : []));
|
|
1643
1676
|
if (!e.length) return null;
|
|
1644
1677
|
let s = (e) => o((t) => {
|
|
@@ -1695,15 +1728,15 @@ function et({ items: e = [], linked: t, multiple: n = !1, style: r, nodeRef: i }
|
|
|
1695
1728
|
})
|
|
1696
1729
|
});
|
|
1697
1730
|
}
|
|
1698
|
-
var
|
|
1731
|
+
var rt = {
|
|
1699
1732
|
display: "flex",
|
|
1700
1733
|
flexDirection: "column",
|
|
1701
1734
|
gap: "12px"
|
|
1702
|
-
},
|
|
1735
|
+
}, J = {
|
|
1703
1736
|
fontSize: "14px",
|
|
1704
1737
|
fontWeight: 500,
|
|
1705
1738
|
color: "var(--page-text, #111827)"
|
|
1706
|
-
},
|
|
1739
|
+
}, Y = {
|
|
1707
1740
|
padding: "10px 12px",
|
|
1708
1741
|
border: "1px solid #d1d5db",
|
|
1709
1742
|
borderRadius: "6px",
|
|
@@ -1713,18 +1746,18 @@ var tt = {
|
|
|
1713
1746
|
boxSizing: "border-box",
|
|
1714
1747
|
backgroundColor: "#ffffff",
|
|
1715
1748
|
color: "#111827"
|
|
1716
|
-
},
|
|
1749
|
+
}, it = {
|
|
1717
1750
|
display: "flex",
|
|
1718
1751
|
alignItems: "center",
|
|
1719
1752
|
gap: "8px",
|
|
1720
1753
|
fontSize: "14px",
|
|
1721
1754
|
color: "var(--page-text, #111827)"
|
|
1722
|
-
},
|
|
1755
|
+
}, X = (e) => e ? {
|
|
1723
1756
|
readOnly: !0,
|
|
1724
1757
|
tabIndex: -1,
|
|
1725
1758
|
onMouseDown: (e) => e.preventDefault()
|
|
1726
1759
|
} : {};
|
|
1727
|
-
function
|
|
1760
|
+
function at(e, t) {
|
|
1728
1761
|
if (!e) return !0;
|
|
1729
1762
|
let n = t[e.field], r = n == null || n === "" ? "" : String(n), i = e.value ?? "";
|
|
1730
1763
|
switch (e.op) {
|
|
@@ -1738,11 +1771,11 @@ function rt(e, t) {
|
|
|
1738
1771
|
default: return !1;
|
|
1739
1772
|
}
|
|
1740
1773
|
}
|
|
1741
|
-
var
|
|
1774
|
+
var ot = {
|
|
1742
1775
|
display: "flex",
|
|
1743
1776
|
flexDirection: "column",
|
|
1744
1777
|
gap: 6
|
|
1745
|
-
},
|
|
1778
|
+
}, st = {
|
|
1746
1779
|
font: "inherit",
|
|
1747
1780
|
fontSize: 15,
|
|
1748
1781
|
padding: "10px 12px",
|
|
@@ -1753,16 +1786,16 @@ var it = {
|
|
|
1753
1786
|
width: "100%",
|
|
1754
1787
|
boxSizing: "border-box"
|
|
1755
1788
|
};
|
|
1756
|
-
function
|
|
1789
|
+
function ct(e, t) {
|
|
1757
1790
|
let n = Array.isArray(e?.options) ? e.options : [];
|
|
1758
1791
|
if (!e?.parentField) return n;
|
|
1759
1792
|
let r = t?.[e.parentField];
|
|
1760
1793
|
return r ? n.filter((e) => typeof e == "string" ? !1 : !e.parent || e.parent === r) : [];
|
|
1761
1794
|
}
|
|
1762
|
-
function
|
|
1795
|
+
function lt({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
1763
1796
|
let a = /* @__PURE__ */ d("span", {
|
|
1764
1797
|
style: {
|
|
1765
|
-
...
|
|
1798
|
+
...J,
|
|
1766
1799
|
fontSize: 14
|
|
1767
1800
|
},
|
|
1768
1801
|
children: [e.label, e.required ? " *" : ""]
|
|
@@ -1771,7 +1804,7 @@ function st({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
|
1771
1804
|
required: e.required || void 0,
|
|
1772
1805
|
placeholder: e.placeholder || void 0,
|
|
1773
1806
|
disabled: r || void 0,
|
|
1774
|
-
style:
|
|
1807
|
+
style: st,
|
|
1775
1808
|
value: t ?? "",
|
|
1776
1809
|
onChange: (t) => n(e.name, t.target.value)
|
|
1777
1810
|
};
|
|
@@ -1800,7 +1833,7 @@ function st({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
|
1800
1833
|
borderRadius: 8,
|
|
1801
1834
|
display: "block"
|
|
1802
1835
|
}
|
|
1803
|
-
}) : null : e.type === "video" ? e.src ? /youtube\.com|youtu\.be|vimeo\.com/i.test(e.src) ? /* @__PURE__ */ u(
|
|
1836
|
+
}) : null : e.type === "video" ? e.src ? /youtube\.com|youtu\.be|vimeo\.com/i.test(e.src) ? /* @__PURE__ */ u(ze, {
|
|
1804
1837
|
url: e.src,
|
|
1805
1838
|
style: { width: "100%" }
|
|
1806
1839
|
}) : /* @__PURE__ */ u("video", {
|
|
@@ -1812,14 +1845,14 @@ function st({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
|
1812
1845
|
display: "block"
|
|
1813
1846
|
}
|
|
1814
1847
|
}) : null : /* @__PURE__ */ d("label", {
|
|
1815
|
-
style:
|
|
1848
|
+
style: ot,
|
|
1816
1849
|
children: [
|
|
1817
1850
|
a,
|
|
1818
1851
|
e.type === "textarea" || e.multiline ? /* @__PURE__ */ u("textarea", {
|
|
1819
1852
|
...o,
|
|
1820
1853
|
rows: 4,
|
|
1821
1854
|
style: {
|
|
1822
|
-
...
|
|
1855
|
+
...st,
|
|
1823
1856
|
resize: "vertical"
|
|
1824
1857
|
}
|
|
1825
1858
|
}) : e.type === "select" ? /* @__PURE__ */ d("select", {
|
|
@@ -1828,7 +1861,7 @@ function st({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
|
1828
1861
|
children: [/* @__PURE__ */ u("option", {
|
|
1829
1862
|
value: "",
|
|
1830
1863
|
children: e.placeholder || "—"
|
|
1831
|
-
}),
|
|
1864
|
+
}), ct(e, i).map((e, t) => /* @__PURE__ */ u("option", {
|
|
1832
1865
|
value: typeof e == "string" ? e : e.value,
|
|
1833
1866
|
children: typeof e == "string" ? e : e.label ?? e.value
|
|
1834
1867
|
}, t))]
|
|
@@ -1875,7 +1908,7 @@ function st({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
|
1875
1908
|
]
|
|
1876
1909
|
});
|
|
1877
1910
|
}
|
|
1878
|
-
function
|
|
1911
|
+
function ut({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s, auto: f, submitLabel: p, nodeRef: m, inert: g, children: _, linked: v, show: y }) {
|
|
1879
1912
|
let { tenant: b, apiUrl: x } = r(V), [S, C] = c("form"), [w, T] = c(null), [E, D] = c({}), [O, k] = c(0), A = g ? y || "form" : S;
|
|
1880
1913
|
i(() => {
|
|
1881
1914
|
if (!f || !s) return;
|
|
@@ -1897,13 +1930,13 @@ function ct({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
|
|
|
1897
1930
|
section: e,
|
|
1898
1931
|
fields: []
|
|
1899
1932
|
}) : j[j.length - 1].fields.push(e);
|
|
1900
|
-
let M = j.filter((e) => e.section || e.fields.length), N = M.filter((e) => !e.section ||
|
|
1933
|
+
let M = j.filter((e) => e.section || e.fields.length), N = M.filter((e) => !e.section || at(e.section.condition, E)).map((e) => ({
|
|
1901
1934
|
...e,
|
|
1902
|
-
fields: e.fields.filter((e) =>
|
|
1935
|
+
fields: e.fields.filter((e) => at(e.condition, E))
|
|
1903
1936
|
})), P = M.length > 1, F = Math.min(O, Math.max(0, N.length - 1)), I = P ? N[F]?.fields ?? [] : N.flatMap((e) => e.fields), ee = I.filter((e) => {
|
|
1904
1937
|
let t = E[e.name];
|
|
1905
1938
|
return e.required && (t == null || t === "" || t === !1);
|
|
1906
|
-
}), L = F >= N.length - 1,
|
|
1939
|
+
}), L = F >= N.length - 1, R = (e, t) => D((n) => {
|
|
1907
1940
|
let r = {
|
|
1908
1941
|
...n,
|
|
1909
1942
|
[e]: t
|
|
@@ -1957,11 +1990,11 @@ function ct({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
|
|
|
1957
1990
|
}
|
|
1958
1991
|
},
|
|
1959
1992
|
style: {
|
|
1960
|
-
...
|
|
1993
|
+
...rt,
|
|
1961
1994
|
display: A === "success" ? "none" : "flex"
|
|
1962
1995
|
},
|
|
1963
1996
|
children: f && s ? /* @__PURE__ */ d(l, { children: [
|
|
1964
|
-
P && /* @__PURE__ */ u(
|
|
1997
|
+
P && /* @__PURE__ */ u(Tt, {
|
|
1965
1998
|
steps: N.map((e) => ({ label: e.section?.label ?? "Start" })),
|
|
1966
1999
|
active: F + 1,
|
|
1967
2000
|
style: { marginBottom: 8 }
|
|
@@ -1974,11 +2007,11 @@ function ct({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
|
|
|
1974
2007
|
},
|
|
1975
2008
|
children: N[F].section.help
|
|
1976
2009
|
}),
|
|
1977
|
-
I.map((e) => /* @__PURE__ */ u(
|
|
2010
|
+
I.map((e) => /* @__PURE__ */ u(lt, {
|
|
1978
2011
|
field: e,
|
|
1979
2012
|
value: E[e.name],
|
|
1980
2013
|
values: E,
|
|
1981
|
-
onChange:
|
|
2014
|
+
onChange: R,
|
|
1982
2015
|
inert: g
|
|
1983
2016
|
}, e.name)),
|
|
1984
2017
|
/* @__PURE__ */ d("div", {
|
|
@@ -1993,7 +2026,7 @@ function ct({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
|
|
|
1993
2026
|
disabled: g || void 0,
|
|
1994
2027
|
onClick: () => k(F - 1),
|
|
1995
2028
|
style: {
|
|
1996
|
-
...
|
|
2029
|
+
...K,
|
|
1997
2030
|
background: "transparent",
|
|
1998
2031
|
color: "inherit",
|
|
1999
2032
|
border: 0,
|
|
@@ -2006,7 +2039,7 @@ function ct({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
|
|
|
2006
2039
|
disabled: g || ee.length > 0,
|
|
2007
2040
|
onClick: () => k(F + 1),
|
|
2008
2041
|
style: {
|
|
2009
|
-
...
|
|
2042
|
+
...K,
|
|
2010
2043
|
border: 0,
|
|
2011
2044
|
padding: "10px 22px",
|
|
2012
2045
|
borderRadius: 8,
|
|
@@ -2020,7 +2053,7 @@ function ct({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
|
|
|
2020
2053
|
type: "submit",
|
|
2021
2054
|
disabled: g || void 0,
|
|
2022
2055
|
style: {
|
|
2023
|
-
...
|
|
2056
|
+
...K,
|
|
2024
2057
|
border: 0,
|
|
2025
2058
|
padding: "10px 22px",
|
|
2026
2059
|
borderRadius: 8,
|
|
@@ -2047,24 +2080,36 @@ function ct({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
|
|
|
2047
2080
|
]
|
|
2048
2081
|
});
|
|
2049
2082
|
}
|
|
2050
|
-
var
|
|
2051
|
-
|
|
2052
|
-
if (
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
}
|
|
2057
|
-
|
|
2058
|
-
|
|
2083
|
+
var Z = null, dt = null, ft = (e) => {
|
|
2084
|
+
let t = typeof e == "string" && e.trim() ? e.trim() : "";
|
|
2085
|
+
if (Z && dt === t) return Z;
|
|
2086
|
+
if (Z && typeof window < "u") {
|
|
2087
|
+
for (let e of ["grecaptcha", "___grecaptcha_cfg"]) try {
|
|
2088
|
+
delete window[e];
|
|
2089
|
+
} catch {
|
|
2090
|
+
window[e] = void 0;
|
|
2091
|
+
}
|
|
2092
|
+
document.querySelectorAll("script[src*=\"recaptcha\"]").forEach((e) => e.remove());
|
|
2093
|
+
}
|
|
2094
|
+
return dt = t, Z = new Promise((e) => {
|
|
2095
|
+
if (typeof window > "u") return;
|
|
2096
|
+
if (window.grecaptcha?.render) return e(window.grecaptcha);
|
|
2097
|
+
window.__webimRecaptchaReady = () => e(window.grecaptcha);
|
|
2098
|
+
let n = document.createElement("script");
|
|
2099
|
+
n.src = `https://www.google.com/recaptcha/api.js?onload=__webimRecaptchaReady&render=explicit${t ? `&hl=${encodeURIComponent(t)}` : ""}`, n.async = !0, document.head.appendChild(n);
|
|
2100
|
+
}), Z;
|
|
2101
|
+
};
|
|
2102
|
+
function pt({ siteKey: e, theme: t, size: n, hl: a, style: o, nodeRef: c, inert: l }) {
|
|
2103
|
+
let f = r(V), p = f?.settings && typeof f.settings == "object" ? f.settings["google.recaptchaKey"] : "", m = typeof e == "string" && e.trim() || (typeof p == "string" ? p.trim() : ""), g = s(null);
|
|
2059
2104
|
if (i(() => {
|
|
2060
|
-
if (
|
|
2105
|
+
if (l || !m || !g.current) return;
|
|
2061
2106
|
let e = !0;
|
|
2062
|
-
return
|
|
2063
|
-
if (!(!e || g.current || !
|
|
2064
|
-
g.current =
|
|
2107
|
+
return ft(a).then((r) => {
|
|
2108
|
+
if (!(!e || !g.current || !r?.render)) {
|
|
2109
|
+
g.current.innerHTML = "";
|
|
2065
2110
|
try {
|
|
2066
|
-
r.render(
|
|
2067
|
-
sitekey:
|
|
2111
|
+
r.render(g.current, {
|
|
2112
|
+
sitekey: m,
|
|
2068
2113
|
theme: t === "dark" ? "dark" : "light",
|
|
2069
2114
|
size: n === "compact" ? "compact" : "normal"
|
|
2070
2115
|
});
|
|
@@ -2074,15 +2119,16 @@ function dt({ siteKey: e, theme: t, size: n, style: a, nodeRef: o, inert: c }) {
|
|
|
2074
2119
|
e = !1;
|
|
2075
2120
|
};
|
|
2076
2121
|
}, [
|
|
2077
|
-
|
|
2078
|
-
|
|
2122
|
+
l,
|
|
2123
|
+
m,
|
|
2079
2124
|
t,
|
|
2080
|
-
n
|
|
2081
|
-
|
|
2125
|
+
n,
|
|
2126
|
+
a
|
|
2127
|
+
]), l) {
|
|
2082
2128
|
let e = t === "dark";
|
|
2083
2129
|
return /* @__PURE__ */ d("div", {
|
|
2084
|
-
ref:
|
|
2085
|
-
style: h(
|
|
2130
|
+
ref: c,
|
|
2131
|
+
style: h(o),
|
|
2086
2132
|
children: [/* @__PURE__ */ d("div", {
|
|
2087
2133
|
style: {
|
|
2088
2134
|
width: n === "compact" ? 164 : 302,
|
|
@@ -2121,7 +2167,7 @@ function dt({ siteKey: e, theme: t, size: n, style: a, nodeRef: o, inert: c }) {
|
|
|
2121
2167
|
children: "reCAPTCHA"
|
|
2122
2168
|
})
|
|
2123
2169
|
]
|
|
2124
|
-
}), !
|
|
2170
|
+
}), !m && /* @__PURE__ */ u("div", {
|
|
2125
2171
|
style: {
|
|
2126
2172
|
marginTop: 6,
|
|
2127
2173
|
fontSize: 11,
|
|
@@ -2131,23 +2177,23 @@ function dt({ siteKey: e, theme: t, size: n, style: a, nodeRef: o, inert: c }) {
|
|
|
2131
2177
|
})]
|
|
2132
2178
|
});
|
|
2133
2179
|
}
|
|
2134
|
-
return
|
|
2135
|
-
ref:
|
|
2136
|
-
style: h(
|
|
2137
|
-
children: /* @__PURE__ */ u("div", { ref:
|
|
2180
|
+
return m ? /* @__PURE__ */ u("div", {
|
|
2181
|
+
ref: c,
|
|
2182
|
+
style: h(o),
|
|
2183
|
+
children: /* @__PURE__ */ u("div", { ref: g })
|
|
2138
2184
|
}) : null;
|
|
2139
2185
|
}
|
|
2140
|
-
function
|
|
2186
|
+
function mt({ text: e, parts: t, style: n, nodeRef: r, linked: i }) {
|
|
2141
2187
|
return /* @__PURE__ */ u("label", {
|
|
2142
2188
|
ref: r,
|
|
2143
2189
|
style: {
|
|
2144
|
-
...
|
|
2190
|
+
...J,
|
|
2145
2191
|
...h(n)
|
|
2146
2192
|
},
|
|
2147
|
-
children:
|
|
2193
|
+
children: q(t, e, i)
|
|
2148
2194
|
});
|
|
2149
2195
|
}
|
|
2150
|
-
function
|
|
2196
|
+
function ht({ type: e = "text", name: t, placeholder: n, required: r, style: i, nodeRef: a, inert: o }) {
|
|
2151
2197
|
return /* @__PURE__ */ u("input", {
|
|
2152
2198
|
ref: a,
|
|
2153
2199
|
type: e,
|
|
@@ -2155,13 +2201,13 @@ function pt({ type: e = "text", name: t, placeholder: n, required: r, style: i,
|
|
|
2155
2201
|
placeholder: n,
|
|
2156
2202
|
required: !o && !!r,
|
|
2157
2203
|
style: {
|
|
2158
|
-
...
|
|
2204
|
+
...Y,
|
|
2159
2205
|
...h(i)
|
|
2160
2206
|
},
|
|
2161
|
-
...
|
|
2207
|
+
...X(o)
|
|
2162
2208
|
});
|
|
2163
2209
|
}
|
|
2164
|
-
function
|
|
2210
|
+
function gt({ name: e, placeholder: t, rows: n = 4, required: r, style: i, nodeRef: a, inert: o }) {
|
|
2165
2211
|
return /* @__PURE__ */ u("textarea", {
|
|
2166
2212
|
ref: a,
|
|
2167
2213
|
name: e || void 0,
|
|
@@ -2169,18 +2215,18 @@ function mt({ name: e, placeholder: t, rows: n = 4, required: r, style: i, nodeR
|
|
|
2169
2215
|
rows: n,
|
|
2170
2216
|
required: !o && !!r,
|
|
2171
2217
|
style: {
|
|
2172
|
-
...
|
|
2218
|
+
...Y,
|
|
2173
2219
|
resize: "vertical",
|
|
2174
2220
|
...h(i)
|
|
2175
2221
|
},
|
|
2176
|
-
...
|
|
2222
|
+
...X(o)
|
|
2177
2223
|
});
|
|
2178
2224
|
}
|
|
2179
|
-
function
|
|
2225
|
+
function _t({ kind: e = "checkbox", label: t, name: n, value: r, required: i, style: a, nodeRef: o, inert: s }) {
|
|
2180
2226
|
return /* @__PURE__ */ d("label", {
|
|
2181
2227
|
ref: o,
|
|
2182
2228
|
style: {
|
|
2183
|
-
...
|
|
2229
|
+
...it,
|
|
2184
2230
|
...h(a)
|
|
2185
2231
|
},
|
|
2186
2232
|
children: [/* @__PURE__ */ u("input", {
|
|
@@ -2197,7 +2243,7 @@ function ht({ kind: e = "checkbox", label: t, name: n, value: r, required: i, st
|
|
|
2197
2243
|
}), t]
|
|
2198
2244
|
});
|
|
2199
2245
|
}
|
|
2200
|
-
function
|
|
2246
|
+
function vt({ name: e, placeholder: t, options: n = [], required: r, style: i, nodeRef: a, inert: o }) {
|
|
2201
2247
|
return /* @__PURE__ */ d("select", {
|
|
2202
2248
|
ref: a,
|
|
2203
2249
|
name: e || void 0,
|
|
@@ -2206,7 +2252,7 @@ function gt({ name: e, placeholder: t, options: n = [], required: r, style: i, n
|
|
|
2206
2252
|
onMouseDown: o ? (e) => e.preventDefault() : void 0,
|
|
2207
2253
|
tabIndex: o ? -1 : void 0,
|
|
2208
2254
|
style: {
|
|
2209
|
-
...
|
|
2255
|
+
...Y,
|
|
2210
2256
|
appearance: "auto",
|
|
2211
2257
|
...h(i)
|
|
2212
2258
|
},
|
|
@@ -2220,12 +2266,12 @@ function gt({ name: e, placeholder: t, options: n = [], required: r, style: i, n
|
|
|
2220
2266
|
}, t))]
|
|
2221
2267
|
});
|
|
2222
2268
|
}
|
|
2223
|
-
function
|
|
2269
|
+
function yt({ name: e, accept: t, required: n, text: r = "Choose a file…", style: i, nodeRef: a, inert: o }) {
|
|
2224
2270
|
let [s, l] = c(null);
|
|
2225
2271
|
return /* @__PURE__ */ d("label", {
|
|
2226
2272
|
ref: a,
|
|
2227
2273
|
style: {
|
|
2228
|
-
...
|
|
2274
|
+
...Y,
|
|
2229
2275
|
display: "flex",
|
|
2230
2276
|
alignItems: "center",
|
|
2231
2277
|
gap: "8px",
|
|
@@ -2252,12 +2298,12 @@ function _t({ name: e, accept: t, required: n, text: r = "Choose a file…", sty
|
|
|
2252
2298
|
]
|
|
2253
2299
|
});
|
|
2254
2300
|
}
|
|
2255
|
-
function
|
|
2301
|
+
function bt({ text: e = "Submit", style: t, nodeRef: n, inert: r }) {
|
|
2256
2302
|
return /* @__PURE__ */ u("button", {
|
|
2257
2303
|
ref: n,
|
|
2258
2304
|
type: r ? "button" : "submit",
|
|
2259
2305
|
style: {
|
|
2260
|
-
...
|
|
2306
|
+
...K,
|
|
2261
2307
|
border: 0,
|
|
2262
2308
|
cursor: "pointer",
|
|
2263
2309
|
alignSelf: "flex-start",
|
|
@@ -2272,7 +2318,7 @@ function vt({ text: e = "Submit", style: t, nodeRef: n, inert: r }) {
|
|
|
2272
2318
|
children: e
|
|
2273
2319
|
});
|
|
2274
2320
|
}
|
|
2275
|
-
function
|
|
2321
|
+
function xt({ cols: e = 2, rows: t = 1, style: n, nodeRef: r, linked: i }) {
|
|
2276
2322
|
let a = Math.max(1, (Number(e) || 1) * (Number(t) || 1));
|
|
2277
2323
|
return /* @__PURE__ */ u("div", {
|
|
2278
2324
|
ref: r,
|
|
@@ -2289,8 +2335,8 @@ function yt({ cols: e = 2, rows: t = 1, style: n, nodeRef: r, linked: i }) {
|
|
|
2289
2335
|
}, t))
|
|
2290
2336
|
});
|
|
2291
2337
|
}
|
|
2292
|
-
function
|
|
2293
|
-
let { tenant: v, apiUrl: y, locale: b } = r(V), x = r(
|
|
2338
|
+
function St({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, imageField: o, titleField: s = "name", textField: l, custom: f, templateId: p, paged: m, style: g, nodeRef: _ }) {
|
|
2339
|
+
let { tenant: v, apiUrl: y, locale: b } = r(V), x = r(U), S = r(H), C = S?.[e], w = m ? ce(S) : 1, [T, E] = c(null);
|
|
2294
2340
|
if (i(() => {
|
|
2295
2341
|
if (!e || C) return;
|
|
2296
2342
|
let n = !0, r = new URLSearchParams();
|
|
@@ -2333,7 +2379,7 @@ function bt({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, i
|
|
|
2333
2379
|
},
|
|
2334
2380
|
children: O.map((e) => /* @__PURE__ */ u("div", {
|
|
2335
2381
|
style: { minWidth: 0 },
|
|
2336
|
-
children: x.render(p, (t) =>
|
|
2382
|
+
children: x.render(p, (t) => de(t, e))
|
|
2337
2383
|
}, e.id ?? e?.data?.slug))
|
|
2338
2384
|
}) : /* @__PURE__ */ u("div", {
|
|
2339
2385
|
ref: _,
|
|
@@ -2343,7 +2389,7 @@ function bt({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, i
|
|
|
2343
2389
|
...h(g)
|
|
2344
2390
|
},
|
|
2345
2391
|
children: O.map((e) => {
|
|
2346
|
-
let t = o ?
|
|
2392
|
+
let t = o ? W(e?.data, o) : null, r = s ? G(W(e?.data, s)) : null, i = l ? W(e?.data, l) : null, a = Array.isArray(i) ? i : null, c = a || i == null ? null : G(i), f = n === "list";
|
|
2347
2393
|
return /* @__PURE__ */ d("div", {
|
|
2348
2394
|
style: {
|
|
2349
2395
|
display: "flex",
|
|
@@ -2390,7 +2436,7 @@ function bt({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, i
|
|
|
2390
2436
|
lineHeight: 1.55,
|
|
2391
2437
|
opacity: .85
|
|
2392
2438
|
},
|
|
2393
|
-
children:
|
|
2439
|
+
children: De(a)
|
|
2394
2440
|
})
|
|
2395
2441
|
]
|
|
2396
2442
|
})]
|
|
@@ -2398,7 +2444,7 @@ function bt({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, i
|
|
|
2398
2444
|
})
|
|
2399
2445
|
});
|
|
2400
2446
|
}
|
|
2401
|
-
function
|
|
2447
|
+
function Ct({ items: e = [], separator: t = "/", style: n, nodeRef: r }) {
|
|
2402
2448
|
return e.length ? /* @__PURE__ */ u("nav", {
|
|
2403
2449
|
ref: r,
|
|
2404
2450
|
"aria-label": "Breadcrumb",
|
|
@@ -2448,7 +2494,7 @@ function xt({ items: e = [], separator: t = "/", style: n, nodeRef: r }) {
|
|
|
2448
2494
|
})
|
|
2449
2495
|
}) : null;
|
|
2450
2496
|
}
|
|
2451
|
-
function
|
|
2497
|
+
function wt({ pages: e = 5, current: t = 1, prevNext: n = !0, href: a = "#", source: o, pageSize: s = 6, align: l, hideEmpty: f, inert: p, style: m, nodeRef: g }) {
|
|
2452
2498
|
let { tenant: _, apiUrl: v } = r(V), y = r(H), [b, x] = c(null), S = o ? Number(y?.[`${o}:total`]) : NaN;
|
|
2453
2499
|
i(() => {
|
|
2454
2500
|
if (!o || Number.isFinite(S)) return;
|
|
@@ -2468,7 +2514,7 @@ function St({ pages: e = 5, current: t = 1, prevNext: n = !0, href: a = "#", sou
|
|
|
2468
2514
|
]);
|
|
2469
2515
|
let C = Math.max(1, Number(s) || 6), w = Number.isFinite(S) ? S : b;
|
|
2470
2516
|
if (o && w === null || o && f && !(w > 0)) return null;
|
|
2471
|
-
let T = Math.min(Math.max(o ? Math.ceil(w / C) : Number(e) || 1, 1), 50), E = Math.min(Math.max(o ?
|
|
2517
|
+
let T = Math.min(Math.max(o ? Math.ceil(w / C) : Number(e) || 1, 1), 50), E = Math.min(Math.max(o ? ce(y) : Number(t) || 1, 1), T), D = (e) => {
|
|
2472
2518
|
if (o) {
|
|
2473
2519
|
if (typeof window < "u") {
|
|
2474
2520
|
let t = new URLSearchParams(window.location.search);
|
|
@@ -2533,7 +2579,7 @@ function St({ pages: e = 5, current: t = 1, prevNext: n = !0, href: a = "#", sou
|
|
|
2533
2579
|
]
|
|
2534
2580
|
});
|
|
2535
2581
|
}
|
|
2536
|
-
function
|
|
2582
|
+
function Tt({ steps: t = [], active: n = 1, vertical: r = !1, style: i, nodeRef: a }) {
|
|
2537
2583
|
if (!t.length) return null;
|
|
2538
2584
|
let o = Math.min(Math.max(Number(n) || 1, 1), t.length), s = (e) => ({
|
|
2539
2585
|
width: 32,
|
|
@@ -2611,7 +2657,7 @@ function Ct({ steps: t = [], active: n = 1, vertical: r = !1, style: i, nodeRef:
|
|
|
2611
2657
|
})
|
|
2612
2658
|
});
|
|
2613
2659
|
}
|
|
2614
|
-
var
|
|
2660
|
+
var Et = {
|
|
2615
2661
|
small: {
|
|
2616
2662
|
w: 132,
|
|
2617
2663
|
h: 46,
|
|
@@ -2633,10 +2679,10 @@ var wt = {
|
|
|
2633
2679
|
title: 12.5,
|
|
2634
2680
|
avatar: 46
|
|
2635
2681
|
}
|
|
2636
|
-
},
|
|
2637
|
-
|
|
2638
|
-
function
|
|
2639
|
-
let r =
|
|
2682
|
+
}, Dt = (e) => Et[e] ?? Et.medium;
|
|
2683
|
+
Et.medium.w, Et.medium.h;
|
|
2684
|
+
function Ot(e, { size: t = "medium", horizontal: n = !1 } = {}) {
|
|
2685
|
+
let r = Dt(t), i = n ? r.h : r.w, a = n ? 16 : 20, o = (n ? r.w : r.h) + (n ? 56 : 48), s = Array.isArray(e) ? e.filter((e) => e && e.id) : [], c = new Set(s.map((e) => e.id)), l = /* @__PURE__ */ new Map(), u = [];
|
|
2640
2686
|
for (let e of s) e.parent && c.has(e.parent) && e.parent !== e.id ? (l.has(e.parent) || l.set(e.parent, []), l.get(e.parent).push(e)) : u.push(e);
|
|
2641
2687
|
let d = /* @__PURE__ */ new Map(), f = (e, t) => {
|
|
2642
2688
|
if (t.has(e.id)) return 0;
|
|
@@ -2688,19 +2734,19 @@ function Et(e, { size: t = "medium", horizontal: n = !1 } = {}) {
|
|
|
2688
2734
|
horizontal: n
|
|
2689
2735
|
};
|
|
2690
2736
|
}
|
|
2691
|
-
var
|
|
2737
|
+
var Q = (e, t) => {
|
|
2692
2738
|
let n = String(e ?? "");
|
|
2693
2739
|
return n.length > t ? `${n.slice(0, t - 1)}…` : n;
|
|
2694
|
-
},
|
|
2740
|
+
}, kt = (e) => {
|
|
2695
2741
|
let t = /^#([0-9a-f]{6}|[0-9a-f]{3})$/i.exec(String(e ?? "").trim());
|
|
2696
2742
|
if (!t) return "#ffffff";
|
|
2697
2743
|
let n = t[1];
|
|
2698
2744
|
n.length === 3 && (n = [...n].map((e) => e + e).join(""));
|
|
2699
2745
|
let r = parseInt(n, 16);
|
|
2700
2746
|
return .299 * (r >> 16 & 255) + .587 * (r >> 8 & 255) + .114 * (r & 255) > 150 ? "#111827" : "#ffffff";
|
|
2701
|
-
},
|
|
2702
|
-
function
|
|
2703
|
-
let n = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && e.id) : [], r = (e) => Array.isArray(e) ? e[0] : e, i = (e) => e == null ? "" :
|
|
2747
|
+
}, At = (e) => !!(e?.cv?.trim?.() || e?.photo);
|
|
2748
|
+
function jt(e, t = {}) {
|
|
2749
|
+
let n = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && e.id) : [], r = (e) => Array.isArray(e) ? e[0] : e, i = (e) => e == null ? "" : G(e);
|
|
2704
2750
|
return n.map((e) => {
|
|
2705
2751
|
let n = e.data ?? {}, a = r(n[t.parentField]), o = a && typeof a == "object" ? a.id ?? null : a || null;
|
|
2706
2752
|
return {
|
|
@@ -2714,11 +2760,11 @@ function At(e, t = {}) {
|
|
|
2714
2760
|
};
|
|
2715
2761
|
});
|
|
2716
2762
|
}
|
|
2717
|
-
var
|
|
2763
|
+
var Mt = {
|
|
2718
2764
|
size: 36,
|
|
2719
2765
|
pad: 10
|
|
2720
2766
|
};
|
|
2721
|
-
function
|
|
2767
|
+
function Nt({ node: e, onClose: t }) {
|
|
2722
2768
|
return i(() => {
|
|
2723
2769
|
let e = (e) => e.key === "Escape" && t();
|
|
2724
2770
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
@@ -2836,7 +2882,7 @@ function Mt({ node: e, onClose: t }) {
|
|
|
2836
2882
|
})
|
|
2837
2883
|
});
|
|
2838
2884
|
}
|
|
2839
|
-
function
|
|
2885
|
+
function Pt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField: s, parentField: f, cvField: p, hrefField: m, size: g = "medium", horizontal: _ = !1, style: v, nodeRef: y, interactive: b = !0 }) {
|
|
2840
2886
|
let x = a(), [S, C] = c(null), { tenant: w, apiUrl: T } = r(V), E = r(H)?.[t], [D, O] = c(null);
|
|
2841
2887
|
i(() => {
|
|
2842
2888
|
if (!t || E) return;
|
|
@@ -2853,14 +2899,14 @@ function Nt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
|
|
|
2853
2899
|
T,
|
|
2854
2900
|
E
|
|
2855
2901
|
]);
|
|
2856
|
-
let k = t ?
|
|
2902
|
+
let k = t ? jt(E ?? D ?? [], {
|
|
2857
2903
|
nameField: n,
|
|
2858
2904
|
titleField: o,
|
|
2859
2905
|
photoField: s,
|
|
2860
2906
|
parentField: f,
|
|
2861
2907
|
cvField: p,
|
|
2862
2908
|
hrefField: m
|
|
2863
|
-
}) : e, A =
|
|
2909
|
+
}) : e, A = Dt(g), { boxes: j, links: M, width: N, height: P } = Ot(k, {
|
|
2864
2910
|
size: g,
|
|
2865
2911
|
horizontal: _
|
|
2866
2912
|
});
|
|
@@ -2906,7 +2952,7 @@ function Nt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
|
|
|
2906
2952
|
stroke: "rgba(148, 163, 184, 0.7)",
|
|
2907
2953
|
strokeWidth: "1.5"
|
|
2908
2954
|
}, t)), j.map(({ node: e, x: t, y: n }) => {
|
|
2909
|
-
let r = F.has(e.id), i = !!e.color2, a = !!e.color || r || i, o = e.color || (r ? "var(--page-accent, #4f46e5)" : "var(--page-bg, #ffffff)"), s = e.color ?
|
|
2955
|
+
let r = F.has(e.id), i = !!e.color2, a = !!e.color || r || i, o = e.color || (r ? "var(--page-accent, #4f46e5)" : "var(--page-bg, #ffffff)"), s = e.color ? kt(e.color) : r ? "var(--page-accent-text, #ffffff)" : "var(--page-text, #111827)", c = i ? kt(e.color2) : s, f = b && (At(e) || e.href), p = () => At(e) ? C(e) : window.open(e.href, "_blank", "noreferrer"), m = e.photo ? t + Mt.pad + A.avatar + 8 : t + A.w / 2, h = e.photo ? "start" : "middle", g = e.photo ? Math.floor((A.w - A.avatar - 26) / 7) : Math.floor(A.w / 7.6), _ = A.h / 2, v = [e.name, e.title].map((e) => String(e ?? "").trim()).filter(Boolean);
|
|
2910
2956
|
return /* @__PURE__ */ d("g", {
|
|
2911
2957
|
onClick: f ? p : void 0,
|
|
2912
2958
|
style: f ? { cursor: "pointer" } : void 0,
|
|
@@ -2970,13 +3016,13 @@ function Nt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
|
|
|
2970
3016
|
e.photo && /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("clipPath", {
|
|
2971
3017
|
id: `${x}-${e.id}`,
|
|
2972
3018
|
children: /* @__PURE__ */ u("circle", {
|
|
2973
|
-
cx: t +
|
|
3019
|
+
cx: t + Mt.pad + A.avatar / 2,
|
|
2974
3020
|
cy: n + A.h / 2,
|
|
2975
3021
|
r: A.avatar / 2
|
|
2976
3022
|
})
|
|
2977
3023
|
}), /* @__PURE__ */ u("image", {
|
|
2978
3024
|
href: e.photo,
|
|
2979
|
-
x: t +
|
|
3025
|
+
x: t + Mt.pad,
|
|
2980
3026
|
y: n + (A.h - A.avatar) / 2,
|
|
2981
3027
|
width: A.avatar,
|
|
2982
3028
|
height: A.avatar,
|
|
@@ -2990,7 +3036,7 @@ function Nt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
|
|
|
2990
3036
|
fontSize: A.title,
|
|
2991
3037
|
fontWeight: "600",
|
|
2992
3038
|
fill: s,
|
|
2993
|
-
children:
|
|
3039
|
+
children: Q(e.title, g + 4)
|
|
2994
3040
|
}), e.name && /* @__PURE__ */ u("text", {
|
|
2995
3041
|
x: m,
|
|
2996
3042
|
y: n + _ + _ / 2 + A.name * .35,
|
|
@@ -2998,7 +3044,7 @@ function Nt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
|
|
|
2998
3044
|
fontSize: A.name,
|
|
2999
3045
|
fontWeight: "600",
|
|
3000
3046
|
fill: c,
|
|
3001
|
-
children:
|
|
3047
|
+
children: Q(e.name, g)
|
|
3002
3048
|
})] }) : /* @__PURE__ */ d(l, { children: [v[0] && /* @__PURE__ */ u("text", {
|
|
3003
3049
|
x: m,
|
|
3004
3050
|
y: n + (v[1] ? A.h * .43 : A.h * .57),
|
|
@@ -3006,7 +3052,7 @@ function Nt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
|
|
|
3006
3052
|
fontSize: A.name,
|
|
3007
3053
|
fontWeight: "600",
|
|
3008
3054
|
fill: s,
|
|
3009
|
-
children:
|
|
3055
|
+
children: Q(v[0], g)
|
|
3010
3056
|
}), v[1] && /* @__PURE__ */ u("text", {
|
|
3011
3057
|
x: m,
|
|
3012
3058
|
y: n + A.h * .73,
|
|
@@ -3014,19 +3060,19 @@ function Nt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
|
|
|
3014
3060
|
fontSize: A.title,
|
|
3015
3061
|
opacity: "0.7",
|
|
3016
3062
|
fill: s,
|
|
3017
|
-
children:
|
|
3063
|
+
children: Q(v[1], g + 4)
|
|
3018
3064
|
})] })
|
|
3019
3065
|
]
|
|
3020
3066
|
}, e.id);
|
|
3021
3067
|
})]
|
|
3022
|
-
}), S && /* @__PURE__ */ u(
|
|
3068
|
+
}), S && /* @__PURE__ */ u(Nt, {
|
|
3023
3069
|
node: S,
|
|
3024
3070
|
onClose: () => C(null)
|
|
3025
3071
|
})]
|
|
3026
3072
|
});
|
|
3027
3073
|
}
|
|
3028
|
-
function
|
|
3029
|
-
let { tenant: _, apiUrl: v } = r(V), y = r(H), b = y?.[n], x = f ?
|
|
3074
|
+
function Ft({ columns: e = [], rows: t = [], source: n, limit: a = 10, striped: o = !0, bordered: s = !1, compact: l = !1, paged: f, emptyText: p, style: m, nodeRef: g }) {
|
|
3075
|
+
let { tenant: _, apiUrl: v } = r(V), y = r(H), b = y?.[n], x = f ? ce(y) : 1, [S, C] = c(null);
|
|
3030
3076
|
if (i(() => {
|
|
3031
3077
|
if (!n || b) return;
|
|
3032
3078
|
let e = !0, t = Math.max(1, Number(a) || 10), r = f && !n.startsWith("api:") ? `?offset=${(x - 1) * t}&limit=${t}` : "", i = n.startsWith("api:") ? `${v}/data/${encodeURIComponent(n.slice(4))}` : `${v}/dynamic/${encodeURIComponent(n)}${r}`;
|
|
@@ -3045,7 +3091,7 @@ function Pt({ columns: e = [], rows: t = [], source: n, limit: a = 10, striped:
|
|
|
3045
3091
|
x,
|
|
3046
3092
|
a
|
|
3047
3093
|
]), !e.length) return null;
|
|
3048
|
-
let w = Math.max(1, Number(a) || 10), T = n ? f ? b || n.startsWith("api:") ? (b ?? S ?? []).slice((x - 1) * w, x * w) : (S ?? []).slice(0, w) : (b ?? S ?? []).slice(0, w) : null, E = T ? T.map((t) => e.map((e) =>
|
|
3094
|
+
let w = Math.max(1, Number(a) || 10), T = n ? f ? b || n.startsWith("api:") ? (b ?? S ?? []).slice((x - 1) * w, x * w) : (S ?? []).slice(0, w) : (b ?? S ?? []).slice(0, w) : null, E = T ? T.map((t) => e.map((e) => G(W(t?.data, e.field)))) : t, D = !!n && !(n && !b && S === null) && E.length === 0, O = l ? "6px 10px" : "10px 14px", k = "1px solid rgba(148, 163, 184, 0.35)", A = s ? { border: k } : { borderBottom: k };
|
|
3049
3095
|
return /* @__PURE__ */ u("div", {
|
|
3050
3096
|
ref: g,
|
|
3051
3097
|
style: {
|
|
@@ -3091,75 +3137,75 @@ function Pt({ columns: e = [], rows: t = [], source: n, limit: a = 10, striped:
|
|
|
3091
3137
|
})
|
|
3092
3138
|
});
|
|
3093
3139
|
}
|
|
3094
|
-
var
|
|
3095
|
-
PageRoot:
|
|
3096
|
-
Section:
|
|
3097
|
-
Container:
|
|
3098
|
-
Heading:
|
|
3099
|
-
TextBlock:
|
|
3100
|
-
ButtonBlock:
|
|
3101
|
-
ImageBlock:
|
|
3102
|
-
Spacer:
|
|
3103
|
-
Divider:
|
|
3104
|
-
SliderBlock:
|
|
3105
|
-
CanvasSlider:
|
|
3106
|
-
TabsBlock:
|
|
3107
|
-
QuickStack:
|
|
3108
|
-
CollectionList:
|
|
3109
|
-
BreadcrumbsBlock:
|
|
3110
|
-
PaginationBlock:
|
|
3111
|
-
StepperBlock:
|
|
3112
|
-
OrgChartBlock:
|
|
3113
|
-
TableBlock:
|
|
3114
|
-
MasonryBlock:
|
|
3115
|
-
AccordionBlock:
|
|
3116
|
-
NavbarBlock:
|
|
3117
|
-
ListBlock:
|
|
3118
|
-
TextSpan:
|
|
3119
|
-
QuoteBlock:
|
|
3120
|
-
TextLink:
|
|
3121
|
-
RichTextBlock:
|
|
3122
|
-
RichContentBlock:
|
|
3123
|
-
VideoBlock:
|
|
3124
|
-
YouTubeBlock:
|
|
3125
|
-
IframeBlock:
|
|
3126
|
-
EmbedBlock:
|
|
3127
|
-
FormBlock:
|
|
3128
|
-
FormLabel:
|
|
3129
|
-
FormInput:
|
|
3130
|
-
FormTextarea:
|
|
3131
|
-
FormCheckbox: (e) => /* @__PURE__ */ u(
|
|
3140
|
+
var It = {
|
|
3141
|
+
PageRoot: ve,
|
|
3142
|
+
Section: ye,
|
|
3143
|
+
Container: be,
|
|
3144
|
+
Heading: xe,
|
|
3145
|
+
TextBlock: Me,
|
|
3146
|
+
ButtonBlock: Fe,
|
|
3147
|
+
ImageBlock: Ie,
|
|
3148
|
+
Spacer: He,
|
|
3149
|
+
Divider: Ue,
|
|
3150
|
+
SliderBlock: Ye,
|
|
3151
|
+
CanvasSlider: Xe,
|
|
3152
|
+
TabsBlock: tt,
|
|
3153
|
+
QuickStack: xt,
|
|
3154
|
+
CollectionList: St,
|
|
3155
|
+
BreadcrumbsBlock: Ct,
|
|
3156
|
+
PaginationBlock: wt,
|
|
3157
|
+
StepperBlock: Tt,
|
|
3158
|
+
OrgChartBlock: Pt,
|
|
3159
|
+
TableBlock: Ft,
|
|
3160
|
+
MasonryBlock: Ze,
|
|
3161
|
+
AccordionBlock: nt,
|
|
3162
|
+
NavbarBlock: et,
|
|
3163
|
+
ListBlock: je,
|
|
3164
|
+
TextSpan: we,
|
|
3165
|
+
QuoteBlock: Ae,
|
|
3166
|
+
TextLink: Pe,
|
|
3167
|
+
RichTextBlock: Oe,
|
|
3168
|
+
RichContentBlock: Oe,
|
|
3169
|
+
VideoBlock: Le,
|
|
3170
|
+
YouTubeBlock: ze,
|
|
3171
|
+
IframeBlock: Be,
|
|
3172
|
+
EmbedBlock: Ve,
|
|
3173
|
+
FormBlock: ut,
|
|
3174
|
+
FormLabel: mt,
|
|
3175
|
+
FormInput: ht,
|
|
3176
|
+
FormTextarea: gt,
|
|
3177
|
+
FormCheckbox: (e) => /* @__PURE__ */ u(_t, {
|
|
3132
3178
|
kind: "checkbox",
|
|
3133
3179
|
...e
|
|
3134
3180
|
}),
|
|
3135
|
-
FormRadio: (e) => /* @__PURE__ */ u(
|
|
3181
|
+
FormRadio: (e) => /* @__PURE__ */ u(_t, {
|
|
3136
3182
|
kind: "radio",
|
|
3137
3183
|
...e
|
|
3138
3184
|
}),
|
|
3139
|
-
FormSelect:
|
|
3140
|
-
FormFile:
|
|
3141
|
-
FormRecaptcha:
|
|
3142
|
-
FormSubmit:
|
|
3143
|
-
},
|
|
3185
|
+
FormSelect: vt,
|
|
3186
|
+
FormFile: yt,
|
|
3187
|
+
FormRecaptcha: pt,
|
|
3188
|
+
FormSubmit: bt
|
|
3189
|
+
}, Lt = {
|
|
3144
3190
|
id: "auth",
|
|
3145
3191
|
label: "Accounts",
|
|
3146
3192
|
category: "Apps",
|
|
3147
3193
|
keys: ["SiteLoginForm", "SiteAccountMenu"],
|
|
3148
3194
|
ssr: "shell",
|
|
3149
3195
|
settings: ["site.authRedirect"]
|
|
3150
|
-
},
|
|
3196
|
+
}, Rt = t({
|
|
3151
3197
|
user: null,
|
|
3152
3198
|
status: "idle",
|
|
3153
3199
|
ensure: () => {},
|
|
3154
3200
|
refresh: () => {},
|
|
3155
3201
|
signOut: () => {}
|
|
3156
|
-
}),
|
|
3157
|
-
let e = r(
|
|
3202
|
+
}), zt = () => {
|
|
3203
|
+
let e = r(Rt);
|
|
3158
3204
|
return i(() => {
|
|
3159
3205
|
e.ensure();
|
|
3160
3206
|
}, [e]), e;
|
|
3161
3207
|
};
|
|
3162
|
-
function
|
|
3208
|
+
function Bt({ children: e, initialUser: t, disabled: i, apiUrl: a, tenant: l }) {
|
|
3163
3209
|
let d = r(V), f = a || d?.apiUrl || "/api", p = l || d?.tenant || "", [m, h] = c(t ?? null), [g, _] = c(t ? "user" : i ? "guest" : "idle"), v = s(!1), y = n((e, t) => fetch(`${f}${e}`, {
|
|
3164
3210
|
...t,
|
|
3165
3211
|
credentials: "include",
|
|
@@ -3192,18 +3238,18 @@ function zt({ children: e, initialUser: t, disabled: i, apiUrl: a, tenant: l })
|
|
|
3192
3238
|
b,
|
|
3193
3239
|
x
|
|
3194
3240
|
]);
|
|
3195
|
-
return /* @__PURE__ */ u(
|
|
3241
|
+
return /* @__PURE__ */ u(Rt.Provider, {
|
|
3196
3242
|
value: C,
|
|
3197
3243
|
children: e
|
|
3198
3244
|
});
|
|
3199
3245
|
}
|
|
3200
|
-
function
|
|
3201
|
-
let { status: n } =
|
|
3246
|
+
function Vt({ when: e, children: t }) {
|
|
3247
|
+
let { status: n } = zt();
|
|
3202
3248
|
return !e || e === "always" ? t : n === "idle" || n === "loading" ? null : e === "user" == (n === "user") ? t : null;
|
|
3203
3249
|
}
|
|
3204
3250
|
//#endregion
|
|
3205
3251
|
//#region ../ui/src/components/builder/apps/auth/views.jsx
|
|
3206
|
-
function
|
|
3252
|
+
function Ht({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordLabel: i = "Password", nameLabel: a = "Name", submitLabel: o, style: s, nodeRef: l, inert: f, linked: p, show: m }) {
|
|
3207
3253
|
let { tenant: g, apiUrl: _, settings: v } = r(V), [y, b] = c("form"), [x, S] = c(""), [C, w] = c(!1), T = e === "register", E = f ? m || "form" : y, D = (e) => typeof e == "string" && e.startsWith("/") && !e.startsWith("//") ? e : "", O = async (e) => {
|
|
3208
3254
|
if (e.preventDefault(), f) return;
|
|
3209
3255
|
let n = new FormData(e.currentTarget);
|
|
@@ -3252,20 +3298,20 @@ function Vt({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
|
|
|
3252
3298
|
children: [
|
|
3253
3299
|
T ? /* @__PURE__ */ d("label", {
|
|
3254
3300
|
style: {
|
|
3255
|
-
...
|
|
3301
|
+
...J,
|
|
3256
3302
|
display: "grid",
|
|
3257
3303
|
gap: 6
|
|
3258
3304
|
},
|
|
3259
3305
|
children: [a, /* @__PURE__ */ u("input", {
|
|
3260
3306
|
name: "name",
|
|
3261
3307
|
type: "text",
|
|
3262
|
-
style:
|
|
3263
|
-
...
|
|
3308
|
+
style: Y,
|
|
3309
|
+
...X(f)
|
|
3264
3310
|
})]
|
|
3265
3311
|
}) : null,
|
|
3266
3312
|
/* @__PURE__ */ d("label", {
|
|
3267
3313
|
style: {
|
|
3268
|
-
...
|
|
3314
|
+
...J,
|
|
3269
3315
|
display: "grid",
|
|
3270
3316
|
gap: 6
|
|
3271
3317
|
},
|
|
@@ -3273,13 +3319,13 @@ function Vt({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
|
|
|
3273
3319
|
name: "email",
|
|
3274
3320
|
type: "email",
|
|
3275
3321
|
required: !f,
|
|
3276
|
-
style:
|
|
3277
|
-
...
|
|
3322
|
+
style: Y,
|
|
3323
|
+
...X(f)
|
|
3278
3324
|
})]
|
|
3279
3325
|
}),
|
|
3280
3326
|
/* @__PURE__ */ d("label", {
|
|
3281
3327
|
style: {
|
|
3282
|
-
...
|
|
3328
|
+
...J,
|
|
3283
3329
|
display: "grid",
|
|
3284
3330
|
gap: 6
|
|
3285
3331
|
},
|
|
@@ -3287,15 +3333,15 @@ function Vt({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
|
|
|
3287
3333
|
name: "password",
|
|
3288
3334
|
type: "password",
|
|
3289
3335
|
required: !f,
|
|
3290
|
-
style:
|
|
3291
|
-
...
|
|
3336
|
+
style: Y,
|
|
3337
|
+
...X(f)
|
|
3292
3338
|
})]
|
|
3293
3339
|
}),
|
|
3294
3340
|
/* @__PURE__ */ u("button", {
|
|
3295
3341
|
type: f ? "button" : "submit",
|
|
3296
3342
|
disabled: C || void 0,
|
|
3297
3343
|
style: {
|
|
3298
|
-
...
|
|
3344
|
+
...K,
|
|
3299
3345
|
border: 0,
|
|
3300
3346
|
padding: "10px 22px",
|
|
3301
3347
|
borderRadius: 8,
|
|
@@ -3327,8 +3373,8 @@ function Vt({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
|
|
|
3327
3373
|
]
|
|
3328
3374
|
});
|
|
3329
3375
|
}
|
|
3330
|
-
function
|
|
3331
|
-
let { user: c, status: l, signOut: f } =
|
|
3376
|
+
function Ut({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !1, style: r, nodeRef: i, inert: a, linked: o, show: s }) {
|
|
3377
|
+
let { user: c, status: l, signOut: f } = zt(), p = a ? s || "user" : l, m = a ? {
|
|
3332
3378
|
name: "Ada Lovelace",
|
|
3333
3379
|
email: "ada@example.com"
|
|
3334
3380
|
} : c;
|
|
@@ -3349,7 +3395,7 @@ function Ht({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
|
|
|
3349
3395
|
children: [
|
|
3350
3396
|
/* @__PURE__ */ d("span", {
|
|
3351
3397
|
style: {
|
|
3352
|
-
...
|
|
3398
|
+
...J,
|
|
3353
3399
|
fontWeight: 600
|
|
3354
3400
|
},
|
|
3355
3401
|
children: [
|
|
@@ -3360,7 +3406,7 @@ function Ht({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
|
|
|
3360
3406
|
}),
|
|
3361
3407
|
n && m?.email ? /* @__PURE__ */ u("span", {
|
|
3362
3408
|
style: {
|
|
3363
|
-
...
|
|
3409
|
+
...J,
|
|
3364
3410
|
opacity: .7
|
|
3365
3411
|
},
|
|
3366
3412
|
children: m.email
|
|
@@ -3369,14 +3415,14 @@ function Ht({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
|
|
|
3369
3415
|
type: "button",
|
|
3370
3416
|
onClick: a ? void 0 : f,
|
|
3371
3417
|
style: {
|
|
3372
|
-
...
|
|
3418
|
+
...K,
|
|
3373
3419
|
border: 0,
|
|
3374
3420
|
padding: "8px 16px",
|
|
3375
3421
|
borderRadius: 8,
|
|
3376
3422
|
fontSize: 14,
|
|
3377
3423
|
cursor: a ? "default" : "pointer"
|
|
3378
3424
|
},
|
|
3379
|
-
...
|
|
3425
|
+
...X(a),
|
|
3380
3426
|
children: t
|
|
3381
3427
|
})
|
|
3382
3428
|
]
|
|
@@ -3393,42 +3439,42 @@ function Ht({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
|
|
|
3393
3439
|
}
|
|
3394
3440
|
//#endregion
|
|
3395
3441
|
//#region ../ui/src/components/builder/apps/index.js
|
|
3396
|
-
var
|
|
3397
|
-
SiteLoginForm:
|
|
3398
|
-
SiteAccountMenu:
|
|
3442
|
+
var Wt = [Lt], Gt = {
|
|
3443
|
+
SiteLoginForm: Ht,
|
|
3444
|
+
SiteAccountMenu: Ut
|
|
3399
3445
|
};
|
|
3400
|
-
new Set(
|
|
3446
|
+
new Set(Wt.filter((e) => e.ssr === "shell").flatMap((e) => e.keys));
|
|
3401
3447
|
//#endregion
|
|
3402
3448
|
//#region ../ui/src/components/builder/plugins/runtime.js
|
|
3403
|
-
var
|
|
3404
|
-
function
|
|
3405
|
-
if (
|
|
3449
|
+
var Kt = /* @__PURE__ */ new Map();
|
|
3450
|
+
function qt(e) {
|
|
3451
|
+
if (Kt.has(e)) return Kt.get(e);
|
|
3406
3452
|
let t = URL.createObjectURL(new Blob([e], { type: "text/javascript" })), n = import(
|
|
3407
3453
|
/* @vite-ignore */
|
|
3408
3454
|
/* webpackIgnore: true */
|
|
3409
3455
|
t
|
|
3410
3456
|
).finally(() => URL.revokeObjectURL(t));
|
|
3411
|
-
return
|
|
3457
|
+
return Kt.set(e, n), n;
|
|
3412
3458
|
}
|
|
3413
|
-
function
|
|
3459
|
+
function Jt(e) {
|
|
3414
3460
|
let t = e && typeof e == "object" ? e.builder_plugins : null, n = t && typeof t == "object" ? t.plugins : null;
|
|
3415
3461
|
return n && typeof n == "object" ? n : {};
|
|
3416
3462
|
}
|
|
3417
3463
|
//#endregion
|
|
3418
3464
|
//#region ../ui/src/components/builder/plugins/view.jsx
|
|
3419
|
-
async function
|
|
3420
|
-
let n = await
|
|
3465
|
+
async function Yt(e, t) {
|
|
3466
|
+
let n = await qt(e);
|
|
3421
3467
|
return (Array.isArray(n?.default?.blocks) ? n.default.blocks : []).find((e) => e?.id === t && typeof e.mount == "function") ?? null;
|
|
3422
3468
|
}
|
|
3423
|
-
var
|
|
3469
|
+
var Xt = {
|
|
3424
3470
|
padding: "10px 12px",
|
|
3425
3471
|
border: "1px dashed rgba(148, 163, 184, 0.5)",
|
|
3426
3472
|
borderRadius: 8,
|
|
3427
3473
|
fontSize: 12,
|
|
3428
3474
|
opacity: .6
|
|
3429
3475
|
};
|
|
3430
|
-
function
|
|
3431
|
-
let c = r(V), l =
|
|
3476
|
+
function Zt({ pluginId: e, blockId: t, props: n, style: a, nodeRef: o }) {
|
|
3477
|
+
let c = r(V), l = Jt(c?.settings)[e], f = s(null), p = s(null), m = {
|
|
3432
3478
|
tenant: c?.tenant ?? "",
|
|
3433
3479
|
apiUrl: c?.apiUrl ?? "/api",
|
|
3434
3480
|
locale: c?.locale ?? "",
|
|
@@ -3440,7 +3486,7 @@ function Xt({ pluginId: e, blockId: t, props: n, style: a, nodeRef: o }) {
|
|
|
3440
3486
|
let e = f.current;
|
|
3441
3487
|
if (!l?.code || !e) return;
|
|
3442
3488
|
let n = !0;
|
|
3443
|
-
return
|
|
3489
|
+
return Yt(l.code, t).then((e) => {
|
|
3444
3490
|
if (!(!n || !e || !f.current)) {
|
|
3445
3491
|
p.current = e;
|
|
3446
3492
|
try {
|
|
@@ -3470,7 +3516,7 @@ function Xt({ pluginId: e, blockId: t, props: n, style: a, nodeRef: o }) {
|
|
|
3470
3516
|
}) : /* @__PURE__ */ d("div", {
|
|
3471
3517
|
ref: o,
|
|
3472
3518
|
style: {
|
|
3473
|
-
...
|
|
3519
|
+
...Xt,
|
|
3474
3520
|
...h(a)
|
|
3475
3521
|
},
|
|
3476
3522
|
children: [
|
|
@@ -3482,10 +3528,10 @@ function Xt({ pluginId: e, blockId: t, props: n, style: a, nodeRef: o }) {
|
|
|
3482
3528
|
}
|
|
3483
3529
|
//#endregion
|
|
3484
3530
|
//#region ../ui/src/components/builder/render.jsx
|
|
3485
|
-
var
|
|
3486
|
-
...
|
|
3487
|
-
...
|
|
3488
|
-
PluginBlock:
|
|
3531
|
+
var Qt = {
|
|
3532
|
+
...It,
|
|
3533
|
+
...Gt,
|
|
3534
|
+
PluginBlock: Zt
|
|
3489
3535
|
};
|
|
3490
3536
|
function $(t, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
|
|
3491
3537
|
let o = n[t];
|
|
@@ -3497,7 +3543,7 @@ function $(t, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
|
|
|
3497
3543
|
let c = new Set(i).add(n);
|
|
3498
3544
|
return /* @__PURE__ */ u(e, { children: $(s.template.rootId, s.template.nodes, r, c, a) }, t);
|
|
3499
3545
|
}
|
|
3500
|
-
let l =
|
|
3546
|
+
let l = Qt[s];
|
|
3501
3547
|
if (!l) return null;
|
|
3502
3548
|
let d = (o.nodes ?? []).map((e) => $(e, n, r, i, a)).filter(Boolean), f = Object.entries(o.linkedNodes ?? {}), p = f.length ? Object.fromEntries(f.map(([e, t]) => [e, $(t, n, r, i)])) : void 0, m = /* @__PURE__ */ u(l, {
|
|
3503
3549
|
...c,
|
|
@@ -3508,15 +3554,15 @@ function $(t, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
|
|
|
3508
3554
|
},
|
|
3509
3555
|
children: d.length ? d : void 0
|
|
3510
3556
|
}, t);
|
|
3511
|
-
return c.when && c.when !== "always" ? /* @__PURE__ */ u(
|
|
3557
|
+
return c.when && c.when !== "always" ? /* @__PURE__ */ u(Vt, {
|
|
3512
3558
|
when: c.when,
|
|
3513
3559
|
children: m
|
|
3514
3560
|
}, t) : m;
|
|
3515
3561
|
}
|
|
3516
3562
|
//#endregion
|
|
3517
3563
|
//#region ../ui/src/components/builder/PageRenderer.jsx
|
|
3518
|
-
var
|
|
3519
|
-
function
|
|
3564
|
+
var $t = (e) => Object.entries(e).map(([e, t]) => `${e}: ${t};`).join(" ");
|
|
3565
|
+
function en({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, custom: s, tenant: c, apiUrl: l, datasets: f, locale: p, direction: m, settings: h, siteUser: g }) {
|
|
3520
3566
|
let _ = s?.js?.trim();
|
|
3521
3567
|
if (i(() => {
|
|
3522
3568
|
if (!_) return;
|
|
@@ -3542,11 +3588,11 @@ function $t({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, cu
|
|
|
3542
3588
|
locale: p || "",
|
|
3543
3589
|
settings: h ?? null
|
|
3544
3590
|
},
|
|
3545
|
-
children: /* @__PURE__ */ u(
|
|
3591
|
+
children: /* @__PURE__ */ u(Bt, {
|
|
3546
3592
|
initialUser: g,
|
|
3547
3593
|
children: /* @__PURE__ */ u(H.Provider, {
|
|
3548
3594
|
value: f ?? null,
|
|
3549
|
-
children: /* @__PURE__ */ u(
|
|
3595
|
+
children: /* @__PURE__ */ u(U.Provider, {
|
|
3550
3596
|
value: S,
|
|
3551
3597
|
children: /* @__PURE__ */ d("div", {
|
|
3552
3598
|
...v,
|
|
@@ -3577,11 +3623,11 @@ function $t({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, cu
|
|
|
3577
3623
|
locale: p || "",
|
|
3578
3624
|
settings: h ?? null
|
|
3579
3625
|
},
|
|
3580
|
-
children: /* @__PURE__ */ u(
|
|
3626
|
+
children: /* @__PURE__ */ u(Bt, {
|
|
3581
3627
|
initialUser: g,
|
|
3582
3628
|
children: /* @__PURE__ */ u(H.Provider, {
|
|
3583
3629
|
value: f ?? null,
|
|
3584
|
-
children: /* @__PURE__ */ u(
|
|
3630
|
+
children: /* @__PURE__ */ u(U.Provider, {
|
|
3585
3631
|
value: S,
|
|
3586
3632
|
children: /* @__PURE__ */ d("div", {
|
|
3587
3633
|
...v,
|
|
@@ -3592,8 +3638,8 @@ function $t({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, cu
|
|
|
3592
3638
|
...a
|
|
3593
3639
|
},
|
|
3594
3640
|
children: [
|
|
3595
|
-
/* @__PURE__ */ u("style", { children: `.webim-page { ${
|
|
3596
|
-
@media (prefers-color-scheme: dark) { .webim-page { ${
|
|
3641
|
+
/* @__PURE__ */ u("style", { children: `.webim-page { ${$t(F(k.light))} }
|
|
3642
|
+
@media (prefers-color-scheme: dark) { .webim-page { ${$t(F(k.dark))} } }` }),
|
|
3597
3643
|
O,
|
|
3598
3644
|
/* @__PURE__ */ u("style", { children: y }),
|
|
3599
3645
|
C && /* @__PURE__ */ u("style", { children: C }),
|
|
@@ -3609,8 +3655,8 @@ function $t({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, cu
|
|
|
3609
3655
|
}
|
|
3610
3656
|
//#endregion
|
|
3611
3657
|
//#region src/WebimContent.jsx
|
|
3612
|
-
function
|
|
3613
|
-
return e?.blocks?.ROOT ? /* @__PURE__ */ u(
|
|
3658
|
+
function tn({ bundle: e, mode: t = "auto", style: n }) {
|
|
3659
|
+
return e?.blocks?.ROOT ? /* @__PURE__ */ u(en, {
|
|
3614
3660
|
blocks: e.blocks,
|
|
3615
3661
|
theme: e.theme,
|
|
3616
3662
|
components: e.components,
|
|
@@ -3627,7 +3673,7 @@ function en({ bundle: e, mode: t = "auto", style: n }) {
|
|
|
3627
3673
|
}
|
|
3628
3674
|
//#endregion
|
|
3629
3675
|
//#region src/WebimPage.jsx
|
|
3630
|
-
function
|
|
3676
|
+
function nn({ apiUrl: e, tenant: t, slug: n, locale: r, preview: a, token: o, mode: l = "auto", style: d, fallback: f = null, errorFallback: p = null, onLoad: m, onError: h }) {
|
|
3631
3677
|
let [g, _] = c({ status: "loading" }), v = s({
|
|
3632
3678
|
onLoad: m,
|
|
3633
3679
|
onError: h
|
|
@@ -3637,7 +3683,7 @@ function tn({ apiUrl: e, tenant: t, slug: n, locale: r, preview: a, token: o, mo
|
|
|
3637
3683
|
onError: h
|
|
3638
3684
|
}, i(() => {
|
|
3639
3685
|
let i = !0;
|
|
3640
|
-
return _({ status: "loading" }),
|
|
3686
|
+
return _({ status: "loading" }), te({
|
|
3641
3687
|
apiUrl: e,
|
|
3642
3688
|
tenant: t,
|
|
3643
3689
|
slug: n,
|
|
@@ -3664,11 +3710,11 @@ function tn({ apiUrl: e, tenant: t, slug: n, locale: r, preview: a, token: o, mo
|
|
|
3664
3710
|
r,
|
|
3665
3711
|
a,
|
|
3666
3712
|
o
|
|
3667
|
-
]), g.status === "loading" ? f : g.status === "error" ? typeof p == "function" ? p(g.error) : p : /* @__PURE__ */ u(
|
|
3713
|
+
]), g.status === "loading" ? f : g.status === "error" ? typeof p == "function" ? p(g.error) : p : /* @__PURE__ */ u(tn, {
|
|
3668
3714
|
bundle: g.bundle,
|
|
3669
3715
|
mode: l,
|
|
3670
3716
|
style: d
|
|
3671
3717
|
});
|
|
3672
3718
|
}
|
|
3673
3719
|
//#endregion
|
|
3674
|
-
export {
|
|
3720
|
+
export { en as PageRenderer, tn as WebimContent, nn as WebimPage, te as fetchPage, De as renderRichContent, L as resolveTheme };
|