webim-adapter 0.18.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 +342 -329
- package/build/webim-embed.js +2 -2
- package/build/webim-ssr.js +53 -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,
|
|
@@ -814,17 +814,17 @@ function Ee(e = [], t, n) {
|
|
|
814
814
|
}
|
|
815
815
|
if (t.type === "quote") return /* @__PURE__ */ u("blockquote", {
|
|
816
816
|
style: {
|
|
817
|
-
...
|
|
817
|
+
...ke,
|
|
818
818
|
...i
|
|
819
819
|
},
|
|
820
820
|
children: r(t.parts, t.text)
|
|
821
821
|
}, n);
|
|
822
|
-
if (
|
|
822
|
+
if (Te[t.type]) {
|
|
823
823
|
let e = t.type;
|
|
824
824
|
return /* @__PURE__ */ u(e, {
|
|
825
825
|
style: {
|
|
826
|
-
...
|
|
827
|
-
fontSize:
|
|
826
|
+
...fe,
|
|
827
|
+
fontSize: Te[t.type],
|
|
828
828
|
...i
|
|
829
829
|
},
|
|
830
830
|
children: r(t.parts, t.text)
|
|
@@ -832,39 +832,39 @@ function Ee(e = [], t, n) {
|
|
|
832
832
|
}
|
|
833
833
|
return /* @__PURE__ */ u("p", {
|
|
834
834
|
style: {
|
|
835
|
-
...
|
|
835
|
+
...pe,
|
|
836
836
|
...i
|
|
837
837
|
},
|
|
838
838
|
children: r(t.parts, t.text)
|
|
839
839
|
}, n);
|
|
840
840
|
});
|
|
841
841
|
}
|
|
842
|
-
function
|
|
842
|
+
function Oe({ content: e, style: t, linked: n, nodeRef: r }) {
|
|
843
843
|
return /* @__PURE__ */ u("div", {
|
|
844
844
|
ref: r,
|
|
845
845
|
style: {
|
|
846
846
|
display: "flow-root",
|
|
847
847
|
...h(t)
|
|
848
848
|
},
|
|
849
|
-
children:
|
|
849
|
+
children: De(e, n)
|
|
850
850
|
});
|
|
851
851
|
}
|
|
852
|
-
var
|
|
852
|
+
var ke = {
|
|
853
853
|
margin: 0,
|
|
854
854
|
padding: "8px 0 8px 20px",
|
|
855
855
|
borderLeft: "4px solid var(--page-accent, rgba(148, 163, 184, 0.6))"
|
|
856
856
|
};
|
|
857
|
-
function
|
|
857
|
+
function Ae({ text: e, parts: t, style: n, linked: r, nodeRef: i }) {
|
|
858
858
|
return /* @__PURE__ */ u("blockquote", {
|
|
859
859
|
ref: i,
|
|
860
860
|
style: {
|
|
861
|
-
...
|
|
861
|
+
...ke,
|
|
862
862
|
...h(n)
|
|
863
863
|
},
|
|
864
|
-
children:
|
|
864
|
+
children: q(t, e, r)
|
|
865
865
|
});
|
|
866
866
|
}
|
|
867
|
-
function
|
|
867
|
+
function je({ ordered: e, items: t = [], style: n, nodeRef: r }) {
|
|
868
868
|
return /* @__PURE__ */ u(e ? "ol" : "ul", {
|
|
869
869
|
ref: r,
|
|
870
870
|
style: {
|
|
@@ -874,53 +874,53 @@ function Ae({ ordered: e, items: t = [], style: n, nodeRef: r }) {
|
|
|
874
874
|
},
|
|
875
875
|
children: t.map((e, t) => /* @__PURE__ */ u("li", {
|
|
876
876
|
style: { marginBottom: 4 },
|
|
877
|
-
children:
|
|
877
|
+
children: q(e.parts, e.text)
|
|
878
878
|
}, t))
|
|
879
879
|
});
|
|
880
880
|
}
|
|
881
|
-
function
|
|
881
|
+
function Me({ text: e, parts: t, style: n, linked: r, nodeRef: i }) {
|
|
882
882
|
return /* @__PURE__ */ u("p", {
|
|
883
883
|
ref: i,
|
|
884
884
|
style: {
|
|
885
|
-
...
|
|
885
|
+
...pe,
|
|
886
886
|
...h(n)
|
|
887
887
|
},
|
|
888
|
-
children:
|
|
888
|
+
children: q(t, e, r)
|
|
889
889
|
});
|
|
890
890
|
}
|
|
891
|
-
var
|
|
891
|
+
var Ne = {
|
|
892
892
|
color: "var(--page-accent, inherit)",
|
|
893
893
|
textDecoration: "underline",
|
|
894
894
|
textUnderlineOffset: 3,
|
|
895
895
|
cursor: "pointer"
|
|
896
896
|
};
|
|
897
|
-
function
|
|
897
|
+
function Pe({ text: e, parts: t, href: n, target: r, style: i, linked: a, nodeRef: o }) {
|
|
898
898
|
return /* @__PURE__ */ u("a", {
|
|
899
899
|
ref: o,
|
|
900
900
|
href: n || "#",
|
|
901
901
|
target: r || void 0,
|
|
902
902
|
rel: r === "_blank" ? "noopener noreferrer" : void 0,
|
|
903
903
|
style: {
|
|
904
|
-
...
|
|
904
|
+
...Ne,
|
|
905
905
|
...h(i)
|
|
906
906
|
},
|
|
907
|
-
children:
|
|
907
|
+
children: q(t, e, a)
|
|
908
908
|
});
|
|
909
909
|
}
|
|
910
|
-
function
|
|
910
|
+
function Fe({ text: e, parts: t, href: n, target: r, style: i, linked: a, nodeRef: o }) {
|
|
911
911
|
return /* @__PURE__ */ u("a", {
|
|
912
912
|
ref: o,
|
|
913
913
|
href: n || "#",
|
|
914
914
|
target: r || void 0,
|
|
915
915
|
rel: r === "_blank" ? "noopener noreferrer" : void 0,
|
|
916
916
|
style: {
|
|
917
|
-
...
|
|
917
|
+
...K,
|
|
918
918
|
...h(i)
|
|
919
919
|
},
|
|
920
|
-
children:
|
|
920
|
+
children: q(t, e, a)
|
|
921
921
|
});
|
|
922
922
|
}
|
|
923
|
-
function
|
|
923
|
+
function Ie({ src: e, alt: t, style: n, nodeRef: r }) {
|
|
924
924
|
return e ? /* @__PURE__ */ u("img", {
|
|
925
925
|
ref: r,
|
|
926
926
|
src: e,
|
|
@@ -932,7 +932,7 @@ function Fe({ src: e, alt: t, style: n, nodeRef: r }) {
|
|
|
932
932
|
}
|
|
933
933
|
}) : null;
|
|
934
934
|
}
|
|
935
|
-
function
|
|
935
|
+
function Le({ src: e, poster: t, controls: n = !0, autoplay: r = !1, loop: i = !1, muted: a = !1, style: o, nodeRef: s }) {
|
|
936
936
|
return e ? /* @__PURE__ */ u("video", {
|
|
937
937
|
ref: s,
|
|
938
938
|
src: e,
|
|
@@ -950,9 +950,9 @@ function Ie({ src: e, poster: t, controls: n = !0, autoplay: r = !1, loop: i = !
|
|
|
950
950
|
}
|
|
951
951
|
}) : null;
|
|
952
952
|
}
|
|
953
|
-
var
|
|
954
|
-
function
|
|
955
|
-
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);
|
|
956
956
|
if (!c) return null;
|
|
957
957
|
let l = new URLSearchParams({ rel: "0" });
|
|
958
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", {
|
|
@@ -978,7 +978,7 @@ function Re({ url: e, autoplay: t = !1, muted: n = !1, loop: r = !1, controls: i
|
|
|
978
978
|
})
|
|
979
979
|
});
|
|
980
980
|
}
|
|
981
|
-
function
|
|
981
|
+
function Be({ src: e, title: t, allowFullscreen: n = !0, style: r, nodeRef: i }) {
|
|
982
982
|
return e ? /* @__PURE__ */ u("iframe", {
|
|
983
983
|
ref: i,
|
|
984
984
|
src: e,
|
|
@@ -994,7 +994,7 @@ function ze({ src: e, title: t, allowFullscreen: n = !0, style: r, nodeRef: i })
|
|
|
994
994
|
}
|
|
995
995
|
}) : null;
|
|
996
996
|
}
|
|
997
|
-
function
|
|
997
|
+
function Ve({ code: e, runScripts: t = !0, style: n, nodeRef: r }) {
|
|
998
998
|
let [a, o] = c(null);
|
|
999
999
|
return i(() => {
|
|
1000
1000
|
a && (a.innerHTML = e || "", t && a.querySelectorAll("script").forEach((e) => {
|
|
@@ -1013,7 +1013,7 @@ function Be({ code: e, runScripts: t = !0, style: n, nodeRef: r }) {
|
|
|
1013
1013
|
style: h(n)
|
|
1014
1014
|
});
|
|
1015
1015
|
}
|
|
1016
|
-
function
|
|
1016
|
+
function He({ height: e, nodeRef: t }) {
|
|
1017
1017
|
return /* @__PURE__ */ u("div", {
|
|
1018
1018
|
ref: t,
|
|
1019
1019
|
style: {
|
|
@@ -1023,7 +1023,7 @@ function Ve({ height: e, nodeRef: t }) {
|
|
|
1023
1023
|
}
|
|
1024
1024
|
});
|
|
1025
1025
|
}
|
|
1026
|
-
function
|
|
1026
|
+
function Ue({ style: e, nodeRef: t }) {
|
|
1027
1027
|
return /* @__PURE__ */ u("div", {
|
|
1028
1028
|
ref: t,
|
|
1029
1029
|
style: {
|
|
@@ -1034,7 +1034,7 @@ function He({ style: e, nodeRef: t }) {
|
|
|
1034
1034
|
}
|
|
1035
1035
|
});
|
|
1036
1036
|
}
|
|
1037
|
-
var
|
|
1037
|
+
var We = {
|
|
1038
1038
|
position: "absolute",
|
|
1039
1039
|
top: "50%",
|
|
1040
1040
|
transform: "translateY(-50%)",
|
|
@@ -1051,7 +1051,7 @@ var Ue = {
|
|
|
1051
1051
|
alignItems: "center",
|
|
1052
1052
|
justifyContent: "center",
|
|
1053
1053
|
padding: 0
|
|
1054
|
-
},
|
|
1054
|
+
}, Ge = {
|
|
1055
1055
|
bottom: {
|
|
1056
1056
|
inset: "auto 0 0 0",
|
|
1057
1057
|
padding: "40px 24px 20px",
|
|
@@ -1070,8 +1070,8 @@ var Ue = {
|
|
|
1070
1070
|
padding: 24,
|
|
1071
1071
|
textShadow: "0 2px 12px rgba(0, 0, 0, 0.6)"
|
|
1072
1072
|
}
|
|
1073
|
-
},
|
|
1074
|
-
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 }) {
|
|
1075
1075
|
let [p, m] = c(0), [g, _] = c(!1), [v, y] = c(null), b = e ? Math.min(p, e - 1) : 0;
|
|
1076
1076
|
if (i(() => {
|
|
1077
1077
|
if (!n || g || v || e < 2) return;
|
|
@@ -1087,7 +1087,7 @@ function Ke({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
|
|
|
1087
1087
|
let x = (t) => m((t + e) % e), S = () => {
|
|
1088
1088
|
if (!v) return;
|
|
1089
1089
|
let { dx: e } = v;
|
|
1090
|
-
y(null), e < -48 ? x(b + 1) : e >
|
|
1090
|
+
y(null), e < -48 ? x(b + 1) : e > Ke && x(b - 1);
|
|
1091
1091
|
};
|
|
1092
1092
|
return /* @__PURE__ */ d("div", {
|
|
1093
1093
|
ref: f,
|
|
@@ -1135,7 +1135,7 @@ function Ke({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
|
|
|
1135
1135
|
type: "button",
|
|
1136
1136
|
"aria-label": "Previous slide",
|
|
1137
1137
|
style: {
|
|
1138
|
-
...
|
|
1138
|
+
...We,
|
|
1139
1139
|
left: 12
|
|
1140
1140
|
},
|
|
1141
1141
|
onClick: () => x(b - 1),
|
|
@@ -1145,7 +1145,7 @@ function Ke({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
|
|
|
1145
1145
|
type: "button",
|
|
1146
1146
|
"aria-label": "Next slide",
|
|
1147
1147
|
style: {
|
|
1148
|
-
...
|
|
1148
|
+
...We,
|
|
1149
1149
|
right: 12
|
|
1150
1150
|
},
|
|
1151
1151
|
onClick: () => x(b + 1),
|
|
@@ -1179,7 +1179,7 @@ function Ke({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
|
|
|
1179
1179
|
] })]
|
|
1180
1180
|
});
|
|
1181
1181
|
}
|
|
1182
|
-
var
|
|
1182
|
+
var Je = (e, t) => ({
|
|
1183
1183
|
position: "absolute",
|
|
1184
1184
|
inset: 0,
|
|
1185
1185
|
backgroundImage: e ? `url(${e})` : "none",
|
|
@@ -1187,18 +1187,18 @@ var qe = (e, t) => ({
|
|
|
1187
1187
|
backgroundSize: "cover",
|
|
1188
1188
|
backgroundPosition: "center"
|
|
1189
1189
|
});
|
|
1190
|
-
function
|
|
1191
|
-
return e.length ? /* @__PURE__ */ u(
|
|
1190
|
+
function Ye({ slides: e = [], captionPosition: t = "bottom", captionAlign: n = "left", ...r }) {
|
|
1191
|
+
return e.length ? /* @__PURE__ */ u(qe, {
|
|
1192
1192
|
...r,
|
|
1193
1193
|
count: e.length,
|
|
1194
1194
|
renderSlide: (r) => {
|
|
1195
1195
|
let i = e[r];
|
|
1196
|
-
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", {
|
|
1197
1197
|
style: {
|
|
1198
1198
|
position: "absolute",
|
|
1199
1199
|
color: "#fff",
|
|
1200
1200
|
textAlign: n,
|
|
1201
|
-
...
|
|
1201
|
+
...Ge[t] ?? Ge.bottom
|
|
1202
1202
|
},
|
|
1203
1203
|
children: [i.title && /* @__PURE__ */ u("div", {
|
|
1204
1204
|
style: {
|
|
@@ -1218,13 +1218,13 @@ function Je({ slides: e = [], captionPosition: t = "bottom", captionAlign: n = "
|
|
|
1218
1218
|
}
|
|
1219
1219
|
}) : null;
|
|
1220
1220
|
}
|
|
1221
|
-
function
|
|
1222
|
-
return e.length ? /* @__PURE__ */ u(
|
|
1221
|
+
function Xe({ slides: e = [], linked: t, ...n }) {
|
|
1222
|
+
return e.length ? /* @__PURE__ */ u(qe, {
|
|
1223
1223
|
...n,
|
|
1224
1224
|
count: e.length,
|
|
1225
1225
|
renderSlide: (n) => {
|
|
1226
1226
|
let r = e[n];
|
|
1227
|
-
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", {
|
|
1228
1228
|
style: {
|
|
1229
1229
|
position: "absolute",
|
|
1230
1230
|
inset: 0,
|
|
@@ -1236,7 +1236,7 @@ function Ye({ slides: e = [], linked: t, ...n }) {
|
|
|
1236
1236
|
}
|
|
1237
1237
|
}) : null;
|
|
1238
1238
|
}
|
|
1239
|
-
function
|
|
1239
|
+
function Ze({ images: e = [], columns: t = 3, gap: n = 8, showNames: r = !1, lightbox: a = !0, style: o, nodeRef: s, inert: f }) {
|
|
1240
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[_];
|
|
1241
1241
|
i(() => {
|
|
1242
1242
|
if (!y) return;
|
|
@@ -1435,19 +1435,19 @@ function Xe({ images: e = [], columns: t = 3, gap: n = 8, showNames: r = !1, lig
|
|
|
1435
1435
|
]
|
|
1436
1436
|
});
|
|
1437
1437
|
}
|
|
1438
|
-
var
|
|
1438
|
+
var Qe = {
|
|
1439
1439
|
color: "inherit",
|
|
1440
1440
|
textDecoration: "none",
|
|
1441
1441
|
fontSize: 14,
|
|
1442
1442
|
opacity: .85
|
|
1443
|
-
},
|
|
1443
|
+
}, $e = {
|
|
1444
1444
|
background: "var(--page-bg, #ffffff)",
|
|
1445
1445
|
color: "var(--page-text, #111827)",
|
|
1446
1446
|
border: "1px solid rgba(148, 163, 184, 0.25)",
|
|
1447
1447
|
boxShadow: "0 16px 40px rgba(15, 23, 42, 0.16)",
|
|
1448
1448
|
zIndex: 60
|
|
1449
1449
|
};
|
|
1450
|
-
function
|
|
1450
|
+
function et({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], style: s, nodeRef: f, menu: p = "auto", breakpoint: m = 768 }) {
|
|
1451
1451
|
let [g, _] = c(null), [v, y] = c(!1), [b, x] = c(!1), [S, C] = c(null);
|
|
1452
1452
|
i(() => {
|
|
1453
1453
|
if (!g) return;
|
|
@@ -1457,7 +1457,7 @@ function Qe({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
|
|
|
1457
1457
|
let w = p === "hamburger" || p === "auto" && v, T = (e, t) => /* @__PURE__ */ d("a", {
|
|
1458
1458
|
href: e.href || "#",
|
|
1459
1459
|
style: {
|
|
1460
|
-
...
|
|
1460
|
+
...Qe,
|
|
1461
1461
|
display: "block",
|
|
1462
1462
|
...t
|
|
1463
1463
|
},
|
|
@@ -1545,7 +1545,7 @@ function Qe({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
|
|
|
1545
1545
|
let t = e.children ?? [];
|
|
1546
1546
|
if (!t.length) return /* @__PURE__ */ u("a", {
|
|
1547
1547
|
href: e.href || "#",
|
|
1548
|
-
style:
|
|
1548
|
+
style: Qe,
|
|
1549
1549
|
children: e.label
|
|
1550
1550
|
}, e.key);
|
|
1551
1551
|
let n = e.type === "mega";
|
|
@@ -1559,7 +1559,7 @@ function Qe({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
|
|
|
1559
1559
|
children: [/* @__PURE__ */ d("a", {
|
|
1560
1560
|
href: e.href || "#",
|
|
1561
1561
|
style: {
|
|
1562
|
-
...
|
|
1562
|
+
...Qe,
|
|
1563
1563
|
cursor: "pointer"
|
|
1564
1564
|
},
|
|
1565
1565
|
children: [
|
|
@@ -1575,7 +1575,7 @@ function Qe({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
|
|
|
1575
1575
|
]
|
|
1576
1576
|
}), S === e.key && (n ? /* @__PURE__ */ u("div", {
|
|
1577
1577
|
style: {
|
|
1578
|
-
|
|
1578
|
+
...$e,
|
|
1579
1579
|
position: "absolute",
|
|
1580
1580
|
left: 0,
|
|
1581
1581
|
right: 0,
|
|
@@ -1591,7 +1591,7 @@ function Qe({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
|
|
|
1591
1591
|
}))
|
|
1592
1592
|
}) : /* @__PURE__ */ u("div", {
|
|
1593
1593
|
style: {
|
|
1594
|
-
|
|
1594
|
+
...$e,
|
|
1595
1595
|
position: "absolute",
|
|
1596
1596
|
top: "100%",
|
|
1597
1597
|
left: 0,
|
|
@@ -1620,7 +1620,7 @@ function Qe({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
|
|
|
1620
1620
|
children: o.map((t) => /* @__PURE__ */ d(e, { children: [/* @__PURE__ */ u("a", {
|
|
1621
1621
|
href: t.href || "#",
|
|
1622
1622
|
style: {
|
|
1623
|
-
...
|
|
1623
|
+
...Qe,
|
|
1624
1624
|
padding: "10px 4px",
|
|
1625
1625
|
fontWeight: (t.children ?? []).length ? 600 : 400,
|
|
1626
1626
|
opacity: 1
|
|
@@ -1631,7 +1631,7 @@ function Qe({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
|
|
|
1631
1631
|
]
|
|
1632
1632
|
});
|
|
1633
1633
|
}
|
|
1634
|
-
function
|
|
1634
|
+
function tt({ tabs: e = [], linked: t, style: n, nodeRef: r }) {
|
|
1635
1635
|
let [i, a] = c(0), o = e.length ? Math.min(i, e.length - 1) : 0;
|
|
1636
1636
|
return e.length ? /* @__PURE__ */ d("div", {
|
|
1637
1637
|
ref: r,
|
|
@@ -1671,7 +1671,7 @@ function $e({ tabs: e = [], linked: t, style: n, nodeRef: r }) {
|
|
|
1671
1671
|
}, e.key))]
|
|
1672
1672
|
}) : null;
|
|
1673
1673
|
}
|
|
1674
|
-
function
|
|
1674
|
+
function nt({ items: e = [], linked: t, multiple: n = !1, style: r, nodeRef: i }) {
|
|
1675
1675
|
let [a, o] = c(() => new Set(e.length ? [e[0].key] : []));
|
|
1676
1676
|
if (!e.length) return null;
|
|
1677
1677
|
let s = (e) => o((t) => {
|
|
@@ -1728,15 +1728,15 @@ function et({ items: e = [], linked: t, multiple: n = !1, style: r, nodeRef: i }
|
|
|
1728
1728
|
})
|
|
1729
1729
|
});
|
|
1730
1730
|
}
|
|
1731
|
-
var
|
|
1731
|
+
var rt = {
|
|
1732
1732
|
display: "flex",
|
|
1733
1733
|
flexDirection: "column",
|
|
1734
1734
|
gap: "12px"
|
|
1735
|
-
},
|
|
1735
|
+
}, J = {
|
|
1736
1736
|
fontSize: "14px",
|
|
1737
1737
|
fontWeight: 500,
|
|
1738
1738
|
color: "var(--page-text, #111827)"
|
|
1739
|
-
},
|
|
1739
|
+
}, Y = {
|
|
1740
1740
|
padding: "10px 12px",
|
|
1741
1741
|
border: "1px solid #d1d5db",
|
|
1742
1742
|
borderRadius: "6px",
|
|
@@ -1746,18 +1746,18 @@ var tt = {
|
|
|
1746
1746
|
boxSizing: "border-box",
|
|
1747
1747
|
backgroundColor: "#ffffff",
|
|
1748
1748
|
color: "#111827"
|
|
1749
|
-
},
|
|
1749
|
+
}, it = {
|
|
1750
1750
|
display: "flex",
|
|
1751
1751
|
alignItems: "center",
|
|
1752
1752
|
gap: "8px",
|
|
1753
1753
|
fontSize: "14px",
|
|
1754
1754
|
color: "var(--page-text, #111827)"
|
|
1755
|
-
},
|
|
1755
|
+
}, X = (e) => e ? {
|
|
1756
1756
|
readOnly: !0,
|
|
1757
1757
|
tabIndex: -1,
|
|
1758
1758
|
onMouseDown: (e) => e.preventDefault()
|
|
1759
1759
|
} : {};
|
|
1760
|
-
function
|
|
1760
|
+
function at(e, t) {
|
|
1761
1761
|
if (!e) return !0;
|
|
1762
1762
|
let n = t[e.field], r = n == null || n === "" ? "" : String(n), i = e.value ?? "";
|
|
1763
1763
|
switch (e.op) {
|
|
@@ -1771,11 +1771,11 @@ function rt(e, t) {
|
|
|
1771
1771
|
default: return !1;
|
|
1772
1772
|
}
|
|
1773
1773
|
}
|
|
1774
|
-
var
|
|
1774
|
+
var ot = {
|
|
1775
1775
|
display: "flex",
|
|
1776
1776
|
flexDirection: "column",
|
|
1777
1777
|
gap: 6
|
|
1778
|
-
},
|
|
1778
|
+
}, st = {
|
|
1779
1779
|
font: "inherit",
|
|
1780
1780
|
fontSize: 15,
|
|
1781
1781
|
padding: "10px 12px",
|
|
@@ -1786,16 +1786,16 @@ var it = {
|
|
|
1786
1786
|
width: "100%",
|
|
1787
1787
|
boxSizing: "border-box"
|
|
1788
1788
|
};
|
|
1789
|
-
function
|
|
1789
|
+
function ct(e, t) {
|
|
1790
1790
|
let n = Array.isArray(e?.options) ? e.options : [];
|
|
1791
1791
|
if (!e?.parentField) return n;
|
|
1792
1792
|
let r = t?.[e.parentField];
|
|
1793
1793
|
return r ? n.filter((e) => typeof e == "string" ? !1 : !e.parent || e.parent === r) : [];
|
|
1794
1794
|
}
|
|
1795
|
-
function
|
|
1795
|
+
function lt({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
1796
1796
|
let a = /* @__PURE__ */ d("span", {
|
|
1797
1797
|
style: {
|
|
1798
|
-
...
|
|
1798
|
+
...J,
|
|
1799
1799
|
fontSize: 14
|
|
1800
1800
|
},
|
|
1801
1801
|
children: [e.label, e.required ? " *" : ""]
|
|
@@ -1804,7 +1804,7 @@ function st({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
|
1804
1804
|
required: e.required || void 0,
|
|
1805
1805
|
placeholder: e.placeholder || void 0,
|
|
1806
1806
|
disabled: r || void 0,
|
|
1807
|
-
style:
|
|
1807
|
+
style: st,
|
|
1808
1808
|
value: t ?? "",
|
|
1809
1809
|
onChange: (t) => n(e.name, t.target.value)
|
|
1810
1810
|
};
|
|
@@ -1833,7 +1833,7 @@ function st({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
|
1833
1833
|
borderRadius: 8,
|
|
1834
1834
|
display: "block"
|
|
1835
1835
|
}
|
|
1836
|
-
}) : 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, {
|
|
1837
1837
|
url: e.src,
|
|
1838
1838
|
style: { width: "100%" }
|
|
1839
1839
|
}) : /* @__PURE__ */ u("video", {
|
|
@@ -1845,14 +1845,14 @@ function st({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
|
1845
1845
|
display: "block"
|
|
1846
1846
|
}
|
|
1847
1847
|
}) : null : /* @__PURE__ */ d("label", {
|
|
1848
|
-
style:
|
|
1848
|
+
style: ot,
|
|
1849
1849
|
children: [
|
|
1850
1850
|
a,
|
|
1851
1851
|
e.type === "textarea" || e.multiline ? /* @__PURE__ */ u("textarea", {
|
|
1852
1852
|
...o,
|
|
1853
1853
|
rows: 4,
|
|
1854
1854
|
style: {
|
|
1855
|
-
...
|
|
1855
|
+
...st,
|
|
1856
1856
|
resize: "vertical"
|
|
1857
1857
|
}
|
|
1858
1858
|
}) : e.type === "select" ? /* @__PURE__ */ d("select", {
|
|
@@ -1861,7 +1861,7 @@ function st({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
|
1861
1861
|
children: [/* @__PURE__ */ u("option", {
|
|
1862
1862
|
value: "",
|
|
1863
1863
|
children: e.placeholder || "—"
|
|
1864
|
-
}),
|
|
1864
|
+
}), ct(e, i).map((e, t) => /* @__PURE__ */ u("option", {
|
|
1865
1865
|
value: typeof e == "string" ? e : e.value,
|
|
1866
1866
|
children: typeof e == "string" ? e : e.label ?? e.value
|
|
1867
1867
|
}, t))]
|
|
@@ -1908,7 +1908,7 @@ function st({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
|
1908
1908
|
]
|
|
1909
1909
|
});
|
|
1910
1910
|
}
|
|
1911
|
-
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 }) {
|
|
1912
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;
|
|
1913
1913
|
i(() => {
|
|
1914
1914
|
if (!f || !s) return;
|
|
@@ -1930,13 +1930,13 @@ function ct({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
|
|
|
1930
1930
|
section: e,
|
|
1931
1931
|
fields: []
|
|
1932
1932
|
}) : j[j.length - 1].fields.push(e);
|
|
1933
|
-
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) => ({
|
|
1934
1934
|
...e,
|
|
1935
|
-
fields: e.fields.filter((e) =>
|
|
1935
|
+
fields: e.fields.filter((e) => at(e.condition, E))
|
|
1936
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) => {
|
|
1937
1937
|
let t = E[e.name];
|
|
1938
1938
|
return e.required && (t == null || t === "" || t === !1);
|
|
1939
|
-
}), L = F >= N.length - 1,
|
|
1939
|
+
}), L = F >= N.length - 1, R = (e, t) => D((n) => {
|
|
1940
1940
|
let r = {
|
|
1941
1941
|
...n,
|
|
1942
1942
|
[e]: t
|
|
@@ -1990,11 +1990,11 @@ function ct({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
|
|
|
1990
1990
|
}
|
|
1991
1991
|
},
|
|
1992
1992
|
style: {
|
|
1993
|
-
...
|
|
1993
|
+
...rt,
|
|
1994
1994
|
display: A === "success" ? "none" : "flex"
|
|
1995
1995
|
},
|
|
1996
1996
|
children: f && s ? /* @__PURE__ */ d(l, { children: [
|
|
1997
|
-
P && /* @__PURE__ */ u(
|
|
1997
|
+
P && /* @__PURE__ */ u(Tt, {
|
|
1998
1998
|
steps: N.map((e) => ({ label: e.section?.label ?? "Start" })),
|
|
1999
1999
|
active: F + 1,
|
|
2000
2000
|
style: { marginBottom: 8 }
|
|
@@ -2007,11 +2007,11 @@ function ct({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
|
|
|
2007
2007
|
},
|
|
2008
2008
|
children: N[F].section.help
|
|
2009
2009
|
}),
|
|
2010
|
-
I.map((e) => /* @__PURE__ */ u(
|
|
2010
|
+
I.map((e) => /* @__PURE__ */ u(lt, {
|
|
2011
2011
|
field: e,
|
|
2012
2012
|
value: E[e.name],
|
|
2013
2013
|
values: E,
|
|
2014
|
-
onChange:
|
|
2014
|
+
onChange: R,
|
|
2015
2015
|
inert: g
|
|
2016
2016
|
}, e.name)),
|
|
2017
2017
|
/* @__PURE__ */ d("div", {
|
|
@@ -2026,7 +2026,7 @@ function ct({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
|
|
|
2026
2026
|
disabled: g || void 0,
|
|
2027
2027
|
onClick: () => k(F - 1),
|
|
2028
2028
|
style: {
|
|
2029
|
-
...
|
|
2029
|
+
...K,
|
|
2030
2030
|
background: "transparent",
|
|
2031
2031
|
color: "inherit",
|
|
2032
2032
|
border: 0,
|
|
@@ -2039,7 +2039,7 @@ function ct({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
|
|
|
2039
2039
|
disabled: g || ee.length > 0,
|
|
2040
2040
|
onClick: () => k(F + 1),
|
|
2041
2041
|
style: {
|
|
2042
|
-
...
|
|
2042
|
+
...K,
|
|
2043
2043
|
border: 0,
|
|
2044
2044
|
padding: "10px 22px",
|
|
2045
2045
|
borderRadius: 8,
|
|
@@ -2053,7 +2053,7 @@ function ct({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
|
|
|
2053
2053
|
type: "submit",
|
|
2054
2054
|
disabled: g || void 0,
|
|
2055
2055
|
style: {
|
|
2056
|
-
...
|
|
2056
|
+
...K,
|
|
2057
2057
|
border: 0,
|
|
2058
2058
|
padding: "10px 22px",
|
|
2059
2059
|
borderRadius: 8,
|
|
@@ -2080,24 +2080,36 @@ function ct({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
|
|
|
2080
2080
|
]
|
|
2081
2081
|
});
|
|
2082
2082
|
}
|
|
2083
|
-
var
|
|
2084
|
-
|
|
2085
|
-
if (
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
}
|
|
2090
|
-
|
|
2091
|
-
|
|
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);
|
|
2092
2104
|
if (i(() => {
|
|
2093
|
-
if (
|
|
2105
|
+
if (l || !m || !g.current) return;
|
|
2094
2106
|
let e = !0;
|
|
2095
|
-
return
|
|
2096
|
-
if (!(!e || g.current || !
|
|
2097
|
-
g.current =
|
|
2107
|
+
return ft(a).then((r) => {
|
|
2108
|
+
if (!(!e || !g.current || !r?.render)) {
|
|
2109
|
+
g.current.innerHTML = "";
|
|
2098
2110
|
try {
|
|
2099
|
-
r.render(
|
|
2100
|
-
sitekey:
|
|
2111
|
+
r.render(g.current, {
|
|
2112
|
+
sitekey: m,
|
|
2101
2113
|
theme: t === "dark" ? "dark" : "light",
|
|
2102
2114
|
size: n === "compact" ? "compact" : "normal"
|
|
2103
2115
|
});
|
|
@@ -2107,15 +2119,16 @@ function dt({ siteKey: e, theme: t, size: n, style: a, nodeRef: o, inert: c }) {
|
|
|
2107
2119
|
e = !1;
|
|
2108
2120
|
};
|
|
2109
2121
|
}, [
|
|
2110
|
-
|
|
2111
|
-
|
|
2122
|
+
l,
|
|
2123
|
+
m,
|
|
2112
2124
|
t,
|
|
2113
|
-
n
|
|
2114
|
-
|
|
2125
|
+
n,
|
|
2126
|
+
a
|
|
2127
|
+
]), l) {
|
|
2115
2128
|
let e = t === "dark";
|
|
2116
2129
|
return /* @__PURE__ */ d("div", {
|
|
2117
|
-
ref:
|
|
2118
|
-
style: h(
|
|
2130
|
+
ref: c,
|
|
2131
|
+
style: h(o),
|
|
2119
2132
|
children: [/* @__PURE__ */ d("div", {
|
|
2120
2133
|
style: {
|
|
2121
2134
|
width: n === "compact" ? 164 : 302,
|
|
@@ -2154,7 +2167,7 @@ function dt({ siteKey: e, theme: t, size: n, style: a, nodeRef: o, inert: c }) {
|
|
|
2154
2167
|
children: "reCAPTCHA"
|
|
2155
2168
|
})
|
|
2156
2169
|
]
|
|
2157
|
-
}), !
|
|
2170
|
+
}), !m && /* @__PURE__ */ u("div", {
|
|
2158
2171
|
style: {
|
|
2159
2172
|
marginTop: 6,
|
|
2160
2173
|
fontSize: 11,
|
|
@@ -2164,23 +2177,23 @@ function dt({ siteKey: e, theme: t, size: n, style: a, nodeRef: o, inert: c }) {
|
|
|
2164
2177
|
})]
|
|
2165
2178
|
});
|
|
2166
2179
|
}
|
|
2167
|
-
return
|
|
2168
|
-
ref:
|
|
2169
|
-
style: h(
|
|
2170
|
-
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 })
|
|
2171
2184
|
}) : null;
|
|
2172
2185
|
}
|
|
2173
|
-
function
|
|
2186
|
+
function mt({ text: e, parts: t, style: n, nodeRef: r, linked: i }) {
|
|
2174
2187
|
return /* @__PURE__ */ u("label", {
|
|
2175
2188
|
ref: r,
|
|
2176
2189
|
style: {
|
|
2177
|
-
...
|
|
2190
|
+
...J,
|
|
2178
2191
|
...h(n)
|
|
2179
2192
|
},
|
|
2180
|
-
children:
|
|
2193
|
+
children: q(t, e, i)
|
|
2181
2194
|
});
|
|
2182
2195
|
}
|
|
2183
|
-
function
|
|
2196
|
+
function ht({ type: e = "text", name: t, placeholder: n, required: r, style: i, nodeRef: a, inert: o }) {
|
|
2184
2197
|
return /* @__PURE__ */ u("input", {
|
|
2185
2198
|
ref: a,
|
|
2186
2199
|
type: e,
|
|
@@ -2188,13 +2201,13 @@ function pt({ type: e = "text", name: t, placeholder: n, required: r, style: i,
|
|
|
2188
2201
|
placeholder: n,
|
|
2189
2202
|
required: !o && !!r,
|
|
2190
2203
|
style: {
|
|
2191
|
-
...
|
|
2204
|
+
...Y,
|
|
2192
2205
|
...h(i)
|
|
2193
2206
|
},
|
|
2194
|
-
...
|
|
2207
|
+
...X(o)
|
|
2195
2208
|
});
|
|
2196
2209
|
}
|
|
2197
|
-
function
|
|
2210
|
+
function gt({ name: e, placeholder: t, rows: n = 4, required: r, style: i, nodeRef: a, inert: o }) {
|
|
2198
2211
|
return /* @__PURE__ */ u("textarea", {
|
|
2199
2212
|
ref: a,
|
|
2200
2213
|
name: e || void 0,
|
|
@@ -2202,18 +2215,18 @@ function mt({ name: e, placeholder: t, rows: n = 4, required: r, style: i, nodeR
|
|
|
2202
2215
|
rows: n,
|
|
2203
2216
|
required: !o && !!r,
|
|
2204
2217
|
style: {
|
|
2205
|
-
...
|
|
2218
|
+
...Y,
|
|
2206
2219
|
resize: "vertical",
|
|
2207
2220
|
...h(i)
|
|
2208
2221
|
},
|
|
2209
|
-
...
|
|
2222
|
+
...X(o)
|
|
2210
2223
|
});
|
|
2211
2224
|
}
|
|
2212
|
-
function
|
|
2225
|
+
function _t({ kind: e = "checkbox", label: t, name: n, value: r, required: i, style: a, nodeRef: o, inert: s }) {
|
|
2213
2226
|
return /* @__PURE__ */ d("label", {
|
|
2214
2227
|
ref: o,
|
|
2215
2228
|
style: {
|
|
2216
|
-
...
|
|
2229
|
+
...it,
|
|
2217
2230
|
...h(a)
|
|
2218
2231
|
},
|
|
2219
2232
|
children: [/* @__PURE__ */ u("input", {
|
|
@@ -2230,7 +2243,7 @@ function ht({ kind: e = "checkbox", label: t, name: n, value: r, required: i, st
|
|
|
2230
2243
|
}), t]
|
|
2231
2244
|
});
|
|
2232
2245
|
}
|
|
2233
|
-
function
|
|
2246
|
+
function vt({ name: e, placeholder: t, options: n = [], required: r, style: i, nodeRef: a, inert: o }) {
|
|
2234
2247
|
return /* @__PURE__ */ d("select", {
|
|
2235
2248
|
ref: a,
|
|
2236
2249
|
name: e || void 0,
|
|
@@ -2239,7 +2252,7 @@ function gt({ name: e, placeholder: t, options: n = [], required: r, style: i, n
|
|
|
2239
2252
|
onMouseDown: o ? (e) => e.preventDefault() : void 0,
|
|
2240
2253
|
tabIndex: o ? -1 : void 0,
|
|
2241
2254
|
style: {
|
|
2242
|
-
...
|
|
2255
|
+
...Y,
|
|
2243
2256
|
appearance: "auto",
|
|
2244
2257
|
...h(i)
|
|
2245
2258
|
},
|
|
@@ -2253,12 +2266,12 @@ function gt({ name: e, placeholder: t, options: n = [], required: r, style: i, n
|
|
|
2253
2266
|
}, t))]
|
|
2254
2267
|
});
|
|
2255
2268
|
}
|
|
2256
|
-
function
|
|
2269
|
+
function yt({ name: e, accept: t, required: n, text: r = "Choose a file…", style: i, nodeRef: a, inert: o }) {
|
|
2257
2270
|
let [s, l] = c(null);
|
|
2258
2271
|
return /* @__PURE__ */ d("label", {
|
|
2259
2272
|
ref: a,
|
|
2260
2273
|
style: {
|
|
2261
|
-
...
|
|
2274
|
+
...Y,
|
|
2262
2275
|
display: "flex",
|
|
2263
2276
|
alignItems: "center",
|
|
2264
2277
|
gap: "8px",
|
|
@@ -2285,12 +2298,12 @@ function _t({ name: e, accept: t, required: n, text: r = "Choose a file…", sty
|
|
|
2285
2298
|
]
|
|
2286
2299
|
});
|
|
2287
2300
|
}
|
|
2288
|
-
function
|
|
2301
|
+
function bt({ text: e = "Submit", style: t, nodeRef: n, inert: r }) {
|
|
2289
2302
|
return /* @__PURE__ */ u("button", {
|
|
2290
2303
|
ref: n,
|
|
2291
2304
|
type: r ? "button" : "submit",
|
|
2292
2305
|
style: {
|
|
2293
|
-
...
|
|
2306
|
+
...K,
|
|
2294
2307
|
border: 0,
|
|
2295
2308
|
cursor: "pointer",
|
|
2296
2309
|
alignSelf: "flex-start",
|
|
@@ -2305,7 +2318,7 @@ function vt({ text: e = "Submit", style: t, nodeRef: n, inert: r }) {
|
|
|
2305
2318
|
children: e
|
|
2306
2319
|
});
|
|
2307
2320
|
}
|
|
2308
|
-
function
|
|
2321
|
+
function xt({ cols: e = 2, rows: t = 1, style: n, nodeRef: r, linked: i }) {
|
|
2309
2322
|
let a = Math.max(1, (Number(e) || 1) * (Number(t) || 1));
|
|
2310
2323
|
return /* @__PURE__ */ u("div", {
|
|
2311
2324
|
ref: r,
|
|
@@ -2322,8 +2335,8 @@ function yt({ cols: e = 2, rows: t = 1, style: n, nodeRef: r, linked: i }) {
|
|
|
2322
2335
|
}, t))
|
|
2323
2336
|
});
|
|
2324
2337
|
}
|
|
2325
|
-
function
|
|
2326
|
-
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);
|
|
2327
2340
|
if (i(() => {
|
|
2328
2341
|
if (!e || C) return;
|
|
2329
2342
|
let n = !0, r = new URLSearchParams();
|
|
@@ -2366,7 +2379,7 @@ function bt({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, i
|
|
|
2366
2379
|
},
|
|
2367
2380
|
children: O.map((e) => /* @__PURE__ */ u("div", {
|
|
2368
2381
|
style: { minWidth: 0 },
|
|
2369
|
-
children: x.render(p, (t) =>
|
|
2382
|
+
children: x.render(p, (t) => de(t, e))
|
|
2370
2383
|
}, e.id ?? e?.data?.slug))
|
|
2371
2384
|
}) : /* @__PURE__ */ u("div", {
|
|
2372
2385
|
ref: _,
|
|
@@ -2376,7 +2389,7 @@ function bt({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, i
|
|
|
2376
2389
|
...h(g)
|
|
2377
2390
|
},
|
|
2378
2391
|
children: O.map((e) => {
|
|
2379
|
-
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";
|
|
2380
2393
|
return /* @__PURE__ */ d("div", {
|
|
2381
2394
|
style: {
|
|
2382
2395
|
display: "flex",
|
|
@@ -2423,7 +2436,7 @@ function bt({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, i
|
|
|
2423
2436
|
lineHeight: 1.55,
|
|
2424
2437
|
opacity: .85
|
|
2425
2438
|
},
|
|
2426
|
-
children:
|
|
2439
|
+
children: De(a)
|
|
2427
2440
|
})
|
|
2428
2441
|
]
|
|
2429
2442
|
})]
|
|
@@ -2431,7 +2444,7 @@ function bt({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, i
|
|
|
2431
2444
|
})
|
|
2432
2445
|
});
|
|
2433
2446
|
}
|
|
2434
|
-
function
|
|
2447
|
+
function Ct({ items: e = [], separator: t = "/", style: n, nodeRef: r }) {
|
|
2435
2448
|
return e.length ? /* @__PURE__ */ u("nav", {
|
|
2436
2449
|
ref: r,
|
|
2437
2450
|
"aria-label": "Breadcrumb",
|
|
@@ -2481,7 +2494,7 @@ function xt({ items: e = [], separator: t = "/", style: n, nodeRef: r }) {
|
|
|
2481
2494
|
})
|
|
2482
2495
|
}) : null;
|
|
2483
2496
|
}
|
|
2484
|
-
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 }) {
|
|
2485
2498
|
let { tenant: _, apiUrl: v } = r(V), y = r(H), [b, x] = c(null), S = o ? Number(y?.[`${o}:total`]) : NaN;
|
|
2486
2499
|
i(() => {
|
|
2487
2500
|
if (!o || Number.isFinite(S)) return;
|
|
@@ -2501,7 +2514,7 @@ function St({ pages: e = 5, current: t = 1, prevNext: n = !0, href: a = "#", sou
|
|
|
2501
2514
|
]);
|
|
2502
2515
|
let C = Math.max(1, Number(s) || 6), w = Number.isFinite(S) ? S : b;
|
|
2503
2516
|
if (o && w === null || o && f && !(w > 0)) return null;
|
|
2504
|
-
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) => {
|
|
2505
2518
|
if (o) {
|
|
2506
2519
|
if (typeof window < "u") {
|
|
2507
2520
|
let t = new URLSearchParams(window.location.search);
|
|
@@ -2566,7 +2579,7 @@ function St({ pages: e = 5, current: t = 1, prevNext: n = !0, href: a = "#", sou
|
|
|
2566
2579
|
]
|
|
2567
2580
|
});
|
|
2568
2581
|
}
|
|
2569
|
-
function
|
|
2582
|
+
function Tt({ steps: t = [], active: n = 1, vertical: r = !1, style: i, nodeRef: a }) {
|
|
2570
2583
|
if (!t.length) return null;
|
|
2571
2584
|
let o = Math.min(Math.max(Number(n) || 1, 1), t.length), s = (e) => ({
|
|
2572
2585
|
width: 32,
|
|
@@ -2644,7 +2657,7 @@ function Ct({ steps: t = [], active: n = 1, vertical: r = !1, style: i, nodeRef:
|
|
|
2644
2657
|
})
|
|
2645
2658
|
});
|
|
2646
2659
|
}
|
|
2647
|
-
var
|
|
2660
|
+
var Et = {
|
|
2648
2661
|
small: {
|
|
2649
2662
|
w: 132,
|
|
2650
2663
|
h: 46,
|
|
@@ -2666,10 +2679,10 @@ var wt = {
|
|
|
2666
2679
|
title: 12.5,
|
|
2667
2680
|
avatar: 46
|
|
2668
2681
|
}
|
|
2669
|
-
},
|
|
2670
|
-
|
|
2671
|
-
function
|
|
2672
|
-
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 = [];
|
|
2673
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);
|
|
2674
2687
|
let d = /* @__PURE__ */ new Map(), f = (e, t) => {
|
|
2675
2688
|
if (t.has(e.id)) return 0;
|
|
@@ -2721,19 +2734,19 @@ function Et(e, { size: t = "medium", horizontal: n = !1 } = {}) {
|
|
|
2721
2734
|
horizontal: n
|
|
2722
2735
|
};
|
|
2723
2736
|
}
|
|
2724
|
-
var
|
|
2737
|
+
var Q = (e, t) => {
|
|
2725
2738
|
let n = String(e ?? "");
|
|
2726
2739
|
return n.length > t ? `${n.slice(0, t - 1)}…` : n;
|
|
2727
|
-
},
|
|
2740
|
+
}, kt = (e) => {
|
|
2728
2741
|
let t = /^#([0-9a-f]{6}|[0-9a-f]{3})$/i.exec(String(e ?? "").trim());
|
|
2729
2742
|
if (!t) return "#ffffff";
|
|
2730
2743
|
let n = t[1];
|
|
2731
2744
|
n.length === 3 && (n = [...n].map((e) => e + e).join(""));
|
|
2732
2745
|
let r = parseInt(n, 16);
|
|
2733
2746
|
return .299 * (r >> 16 & 255) + .587 * (r >> 8 & 255) + .114 * (r & 255) > 150 ? "#111827" : "#ffffff";
|
|
2734
|
-
},
|
|
2735
|
-
function
|
|
2736
|
-
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);
|
|
2737
2750
|
return n.map((e) => {
|
|
2738
2751
|
let n = e.data ?? {}, a = r(n[t.parentField]), o = a && typeof a == "object" ? a.id ?? null : a || null;
|
|
2739
2752
|
return {
|
|
@@ -2747,11 +2760,11 @@ function At(e, t = {}) {
|
|
|
2747
2760
|
};
|
|
2748
2761
|
});
|
|
2749
2762
|
}
|
|
2750
|
-
var
|
|
2763
|
+
var Mt = {
|
|
2751
2764
|
size: 36,
|
|
2752
2765
|
pad: 10
|
|
2753
2766
|
};
|
|
2754
|
-
function
|
|
2767
|
+
function Nt({ node: e, onClose: t }) {
|
|
2755
2768
|
return i(() => {
|
|
2756
2769
|
let e = (e) => e.key === "Escape" && t();
|
|
2757
2770
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
@@ -2869,7 +2882,7 @@ function Mt({ node: e, onClose: t }) {
|
|
|
2869
2882
|
})
|
|
2870
2883
|
});
|
|
2871
2884
|
}
|
|
2872
|
-
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 }) {
|
|
2873
2886
|
let x = a(), [S, C] = c(null), { tenant: w, apiUrl: T } = r(V), E = r(H)?.[t], [D, O] = c(null);
|
|
2874
2887
|
i(() => {
|
|
2875
2888
|
if (!t || E) return;
|
|
@@ -2886,14 +2899,14 @@ function Nt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
|
|
|
2886
2899
|
T,
|
|
2887
2900
|
E
|
|
2888
2901
|
]);
|
|
2889
|
-
let k = t ?
|
|
2902
|
+
let k = t ? jt(E ?? D ?? [], {
|
|
2890
2903
|
nameField: n,
|
|
2891
2904
|
titleField: o,
|
|
2892
2905
|
photoField: s,
|
|
2893
2906
|
parentField: f,
|
|
2894
2907
|
cvField: p,
|
|
2895
2908
|
hrefField: m
|
|
2896
|
-
}) : e, A =
|
|
2909
|
+
}) : e, A = Dt(g), { boxes: j, links: M, width: N, height: P } = Ot(k, {
|
|
2897
2910
|
size: g,
|
|
2898
2911
|
horizontal: _
|
|
2899
2912
|
});
|
|
@@ -2939,7 +2952,7 @@ function Nt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
|
|
|
2939
2952
|
stroke: "rgba(148, 163, 184, 0.7)",
|
|
2940
2953
|
strokeWidth: "1.5"
|
|
2941
2954
|
}, t)), j.map(({ node: e, x: t, y: n }) => {
|
|
2942
|
-
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);
|
|
2943
2956
|
return /* @__PURE__ */ d("g", {
|
|
2944
2957
|
onClick: f ? p : void 0,
|
|
2945
2958
|
style: f ? { cursor: "pointer" } : void 0,
|
|
@@ -3003,13 +3016,13 @@ function Nt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
|
|
|
3003
3016
|
e.photo && /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("clipPath", {
|
|
3004
3017
|
id: `${x}-${e.id}`,
|
|
3005
3018
|
children: /* @__PURE__ */ u("circle", {
|
|
3006
|
-
cx: t +
|
|
3019
|
+
cx: t + Mt.pad + A.avatar / 2,
|
|
3007
3020
|
cy: n + A.h / 2,
|
|
3008
3021
|
r: A.avatar / 2
|
|
3009
3022
|
})
|
|
3010
3023
|
}), /* @__PURE__ */ u("image", {
|
|
3011
3024
|
href: e.photo,
|
|
3012
|
-
x: t +
|
|
3025
|
+
x: t + Mt.pad,
|
|
3013
3026
|
y: n + (A.h - A.avatar) / 2,
|
|
3014
3027
|
width: A.avatar,
|
|
3015
3028
|
height: A.avatar,
|
|
@@ -3023,7 +3036,7 @@ function Nt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
|
|
|
3023
3036
|
fontSize: A.title,
|
|
3024
3037
|
fontWeight: "600",
|
|
3025
3038
|
fill: s,
|
|
3026
|
-
children:
|
|
3039
|
+
children: Q(e.title, g + 4)
|
|
3027
3040
|
}), e.name && /* @__PURE__ */ u("text", {
|
|
3028
3041
|
x: m,
|
|
3029
3042
|
y: n + _ + _ / 2 + A.name * .35,
|
|
@@ -3031,7 +3044,7 @@ function Nt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
|
|
|
3031
3044
|
fontSize: A.name,
|
|
3032
3045
|
fontWeight: "600",
|
|
3033
3046
|
fill: c,
|
|
3034
|
-
children:
|
|
3047
|
+
children: Q(e.name, g)
|
|
3035
3048
|
})] }) : /* @__PURE__ */ d(l, { children: [v[0] && /* @__PURE__ */ u("text", {
|
|
3036
3049
|
x: m,
|
|
3037
3050
|
y: n + (v[1] ? A.h * .43 : A.h * .57),
|
|
@@ -3039,7 +3052,7 @@ function Nt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
|
|
|
3039
3052
|
fontSize: A.name,
|
|
3040
3053
|
fontWeight: "600",
|
|
3041
3054
|
fill: s,
|
|
3042
|
-
children:
|
|
3055
|
+
children: Q(v[0], g)
|
|
3043
3056
|
}), v[1] && /* @__PURE__ */ u("text", {
|
|
3044
3057
|
x: m,
|
|
3045
3058
|
y: n + A.h * .73,
|
|
@@ -3047,19 +3060,19 @@ function Nt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
|
|
|
3047
3060
|
fontSize: A.title,
|
|
3048
3061
|
opacity: "0.7",
|
|
3049
3062
|
fill: s,
|
|
3050
|
-
children:
|
|
3063
|
+
children: Q(v[1], g + 4)
|
|
3051
3064
|
})] })
|
|
3052
3065
|
]
|
|
3053
3066
|
}, e.id);
|
|
3054
3067
|
})]
|
|
3055
|
-
}), S && /* @__PURE__ */ u(
|
|
3068
|
+
}), S && /* @__PURE__ */ u(Nt, {
|
|
3056
3069
|
node: S,
|
|
3057
3070
|
onClose: () => C(null)
|
|
3058
3071
|
})]
|
|
3059
3072
|
});
|
|
3060
3073
|
}
|
|
3061
|
-
function
|
|
3062
|
-
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);
|
|
3063
3076
|
if (i(() => {
|
|
3064
3077
|
if (!n || b) return;
|
|
3065
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}`;
|
|
@@ -3078,7 +3091,7 @@ function Pt({ columns: e = [], rows: t = [], source: n, limit: a = 10, striped:
|
|
|
3078
3091
|
x,
|
|
3079
3092
|
a
|
|
3080
3093
|
]), !e.length) return null;
|
|
3081
|
-
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 };
|
|
3082
3095
|
return /* @__PURE__ */ u("div", {
|
|
3083
3096
|
ref: g,
|
|
3084
3097
|
style: {
|
|
@@ -3124,75 +3137,75 @@ function Pt({ columns: e = [], rows: t = [], source: n, limit: a = 10, striped:
|
|
|
3124
3137
|
})
|
|
3125
3138
|
});
|
|
3126
3139
|
}
|
|
3127
|
-
var
|
|
3128
|
-
PageRoot:
|
|
3129
|
-
Section:
|
|
3130
|
-
Container:
|
|
3131
|
-
Heading:
|
|
3132
|
-
TextBlock:
|
|
3133
|
-
ButtonBlock:
|
|
3134
|
-
ImageBlock:
|
|
3135
|
-
Spacer:
|
|
3136
|
-
Divider:
|
|
3137
|
-
SliderBlock:
|
|
3138
|
-
CanvasSlider:
|
|
3139
|
-
TabsBlock:
|
|
3140
|
-
QuickStack:
|
|
3141
|
-
CollectionList:
|
|
3142
|
-
BreadcrumbsBlock:
|
|
3143
|
-
PaginationBlock:
|
|
3144
|
-
StepperBlock:
|
|
3145
|
-
OrgChartBlock:
|
|
3146
|
-
TableBlock:
|
|
3147
|
-
MasonryBlock:
|
|
3148
|
-
AccordionBlock:
|
|
3149
|
-
NavbarBlock:
|
|
3150
|
-
ListBlock:
|
|
3151
|
-
TextSpan:
|
|
3152
|
-
QuoteBlock:
|
|
3153
|
-
TextLink:
|
|
3154
|
-
RichTextBlock:
|
|
3155
|
-
RichContentBlock:
|
|
3156
|
-
VideoBlock:
|
|
3157
|
-
YouTubeBlock:
|
|
3158
|
-
IframeBlock:
|
|
3159
|
-
EmbedBlock:
|
|
3160
|
-
FormBlock:
|
|
3161
|
-
FormLabel:
|
|
3162
|
-
FormInput:
|
|
3163
|
-
FormTextarea:
|
|
3164
|
-
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, {
|
|
3165
3178
|
kind: "checkbox",
|
|
3166
3179
|
...e
|
|
3167
3180
|
}),
|
|
3168
|
-
FormRadio: (e) => /* @__PURE__ */ u(
|
|
3181
|
+
FormRadio: (e) => /* @__PURE__ */ u(_t, {
|
|
3169
3182
|
kind: "radio",
|
|
3170
3183
|
...e
|
|
3171
3184
|
}),
|
|
3172
|
-
FormSelect:
|
|
3173
|
-
FormFile:
|
|
3174
|
-
FormRecaptcha:
|
|
3175
|
-
FormSubmit:
|
|
3176
|
-
},
|
|
3185
|
+
FormSelect: vt,
|
|
3186
|
+
FormFile: yt,
|
|
3187
|
+
FormRecaptcha: pt,
|
|
3188
|
+
FormSubmit: bt
|
|
3189
|
+
}, Lt = {
|
|
3177
3190
|
id: "auth",
|
|
3178
3191
|
label: "Accounts",
|
|
3179
3192
|
category: "Apps",
|
|
3180
3193
|
keys: ["SiteLoginForm", "SiteAccountMenu"],
|
|
3181
3194
|
ssr: "shell",
|
|
3182
3195
|
settings: ["site.authRedirect"]
|
|
3183
|
-
},
|
|
3196
|
+
}, Rt = t({
|
|
3184
3197
|
user: null,
|
|
3185
3198
|
status: "idle",
|
|
3186
3199
|
ensure: () => {},
|
|
3187
3200
|
refresh: () => {},
|
|
3188
3201
|
signOut: () => {}
|
|
3189
|
-
}),
|
|
3190
|
-
let e = r(
|
|
3202
|
+
}), zt = () => {
|
|
3203
|
+
let e = r(Rt);
|
|
3191
3204
|
return i(() => {
|
|
3192
3205
|
e.ensure();
|
|
3193
3206
|
}, [e]), e;
|
|
3194
3207
|
};
|
|
3195
|
-
function
|
|
3208
|
+
function Bt({ children: e, initialUser: t, disabled: i, apiUrl: a, tenant: l }) {
|
|
3196
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}`, {
|
|
3197
3210
|
...t,
|
|
3198
3211
|
credentials: "include",
|
|
@@ -3225,18 +3238,18 @@ function zt({ children: e, initialUser: t, disabled: i, apiUrl: a, tenant: l })
|
|
|
3225
3238
|
b,
|
|
3226
3239
|
x
|
|
3227
3240
|
]);
|
|
3228
|
-
return /* @__PURE__ */ u(
|
|
3241
|
+
return /* @__PURE__ */ u(Rt.Provider, {
|
|
3229
3242
|
value: C,
|
|
3230
3243
|
children: e
|
|
3231
3244
|
});
|
|
3232
3245
|
}
|
|
3233
|
-
function
|
|
3234
|
-
let { status: n } =
|
|
3246
|
+
function Vt({ when: e, children: t }) {
|
|
3247
|
+
let { status: n } = zt();
|
|
3235
3248
|
return !e || e === "always" ? t : n === "idle" || n === "loading" ? null : e === "user" == (n === "user") ? t : null;
|
|
3236
3249
|
}
|
|
3237
3250
|
//#endregion
|
|
3238
3251
|
//#region ../ui/src/components/builder/apps/auth/views.jsx
|
|
3239
|
-
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 }) {
|
|
3240
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) => {
|
|
3241
3254
|
if (e.preventDefault(), f) return;
|
|
3242
3255
|
let n = new FormData(e.currentTarget);
|
|
@@ -3285,20 +3298,20 @@ function Vt({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
|
|
|
3285
3298
|
children: [
|
|
3286
3299
|
T ? /* @__PURE__ */ d("label", {
|
|
3287
3300
|
style: {
|
|
3288
|
-
...
|
|
3301
|
+
...J,
|
|
3289
3302
|
display: "grid",
|
|
3290
3303
|
gap: 6
|
|
3291
3304
|
},
|
|
3292
3305
|
children: [a, /* @__PURE__ */ u("input", {
|
|
3293
3306
|
name: "name",
|
|
3294
3307
|
type: "text",
|
|
3295
|
-
style:
|
|
3296
|
-
...
|
|
3308
|
+
style: Y,
|
|
3309
|
+
...X(f)
|
|
3297
3310
|
})]
|
|
3298
3311
|
}) : null,
|
|
3299
3312
|
/* @__PURE__ */ d("label", {
|
|
3300
3313
|
style: {
|
|
3301
|
-
...
|
|
3314
|
+
...J,
|
|
3302
3315
|
display: "grid",
|
|
3303
3316
|
gap: 6
|
|
3304
3317
|
},
|
|
@@ -3306,13 +3319,13 @@ function Vt({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
|
|
|
3306
3319
|
name: "email",
|
|
3307
3320
|
type: "email",
|
|
3308
3321
|
required: !f,
|
|
3309
|
-
style:
|
|
3310
|
-
...
|
|
3322
|
+
style: Y,
|
|
3323
|
+
...X(f)
|
|
3311
3324
|
})]
|
|
3312
3325
|
}),
|
|
3313
3326
|
/* @__PURE__ */ d("label", {
|
|
3314
3327
|
style: {
|
|
3315
|
-
...
|
|
3328
|
+
...J,
|
|
3316
3329
|
display: "grid",
|
|
3317
3330
|
gap: 6
|
|
3318
3331
|
},
|
|
@@ -3320,15 +3333,15 @@ function Vt({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
|
|
|
3320
3333
|
name: "password",
|
|
3321
3334
|
type: "password",
|
|
3322
3335
|
required: !f,
|
|
3323
|
-
style:
|
|
3324
|
-
...
|
|
3336
|
+
style: Y,
|
|
3337
|
+
...X(f)
|
|
3325
3338
|
})]
|
|
3326
3339
|
}),
|
|
3327
3340
|
/* @__PURE__ */ u("button", {
|
|
3328
3341
|
type: f ? "button" : "submit",
|
|
3329
3342
|
disabled: C || void 0,
|
|
3330
3343
|
style: {
|
|
3331
|
-
...
|
|
3344
|
+
...K,
|
|
3332
3345
|
border: 0,
|
|
3333
3346
|
padding: "10px 22px",
|
|
3334
3347
|
borderRadius: 8,
|
|
@@ -3360,8 +3373,8 @@ function Vt({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
|
|
|
3360
3373
|
]
|
|
3361
3374
|
});
|
|
3362
3375
|
}
|
|
3363
|
-
function
|
|
3364
|
-
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 ? {
|
|
3365
3378
|
name: "Ada Lovelace",
|
|
3366
3379
|
email: "ada@example.com"
|
|
3367
3380
|
} : c;
|
|
@@ -3382,7 +3395,7 @@ function Ht({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
|
|
|
3382
3395
|
children: [
|
|
3383
3396
|
/* @__PURE__ */ d("span", {
|
|
3384
3397
|
style: {
|
|
3385
|
-
...
|
|
3398
|
+
...J,
|
|
3386
3399
|
fontWeight: 600
|
|
3387
3400
|
},
|
|
3388
3401
|
children: [
|
|
@@ -3393,7 +3406,7 @@ function Ht({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
|
|
|
3393
3406
|
}),
|
|
3394
3407
|
n && m?.email ? /* @__PURE__ */ u("span", {
|
|
3395
3408
|
style: {
|
|
3396
|
-
...
|
|
3409
|
+
...J,
|
|
3397
3410
|
opacity: .7
|
|
3398
3411
|
},
|
|
3399
3412
|
children: m.email
|
|
@@ -3402,14 +3415,14 @@ function Ht({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
|
|
|
3402
3415
|
type: "button",
|
|
3403
3416
|
onClick: a ? void 0 : f,
|
|
3404
3417
|
style: {
|
|
3405
|
-
...
|
|
3418
|
+
...K,
|
|
3406
3419
|
border: 0,
|
|
3407
3420
|
padding: "8px 16px",
|
|
3408
3421
|
borderRadius: 8,
|
|
3409
3422
|
fontSize: 14,
|
|
3410
3423
|
cursor: a ? "default" : "pointer"
|
|
3411
3424
|
},
|
|
3412
|
-
...
|
|
3425
|
+
...X(a),
|
|
3413
3426
|
children: t
|
|
3414
3427
|
})
|
|
3415
3428
|
]
|
|
@@ -3426,42 +3439,42 @@ function Ht({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
|
|
|
3426
3439
|
}
|
|
3427
3440
|
//#endregion
|
|
3428
3441
|
//#region ../ui/src/components/builder/apps/index.js
|
|
3429
|
-
var
|
|
3430
|
-
SiteLoginForm:
|
|
3431
|
-
SiteAccountMenu:
|
|
3442
|
+
var Wt = [Lt], Gt = {
|
|
3443
|
+
SiteLoginForm: Ht,
|
|
3444
|
+
SiteAccountMenu: Ut
|
|
3432
3445
|
};
|
|
3433
|
-
new Set(
|
|
3446
|
+
new Set(Wt.filter((e) => e.ssr === "shell").flatMap((e) => e.keys));
|
|
3434
3447
|
//#endregion
|
|
3435
3448
|
//#region ../ui/src/components/builder/plugins/runtime.js
|
|
3436
|
-
var
|
|
3437
|
-
function
|
|
3438
|
-
if (
|
|
3449
|
+
var Kt = /* @__PURE__ */ new Map();
|
|
3450
|
+
function qt(e) {
|
|
3451
|
+
if (Kt.has(e)) return Kt.get(e);
|
|
3439
3452
|
let t = URL.createObjectURL(new Blob([e], { type: "text/javascript" })), n = import(
|
|
3440
3453
|
/* @vite-ignore */
|
|
3441
3454
|
/* webpackIgnore: true */
|
|
3442
3455
|
t
|
|
3443
3456
|
).finally(() => URL.revokeObjectURL(t));
|
|
3444
|
-
return
|
|
3457
|
+
return Kt.set(e, n), n;
|
|
3445
3458
|
}
|
|
3446
|
-
function
|
|
3459
|
+
function Jt(e) {
|
|
3447
3460
|
let t = e && typeof e == "object" ? e.builder_plugins : null, n = t && typeof t == "object" ? t.plugins : null;
|
|
3448
3461
|
return n && typeof n == "object" ? n : {};
|
|
3449
3462
|
}
|
|
3450
3463
|
//#endregion
|
|
3451
3464
|
//#region ../ui/src/components/builder/plugins/view.jsx
|
|
3452
|
-
async function
|
|
3453
|
-
let n = await
|
|
3465
|
+
async function Yt(e, t) {
|
|
3466
|
+
let n = await qt(e);
|
|
3454
3467
|
return (Array.isArray(n?.default?.blocks) ? n.default.blocks : []).find((e) => e?.id === t && typeof e.mount == "function") ?? null;
|
|
3455
3468
|
}
|
|
3456
|
-
var
|
|
3469
|
+
var Xt = {
|
|
3457
3470
|
padding: "10px 12px",
|
|
3458
3471
|
border: "1px dashed rgba(148, 163, 184, 0.5)",
|
|
3459
3472
|
borderRadius: 8,
|
|
3460
3473
|
fontSize: 12,
|
|
3461
3474
|
opacity: .6
|
|
3462
3475
|
};
|
|
3463
|
-
function
|
|
3464
|
-
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 = {
|
|
3465
3478
|
tenant: c?.tenant ?? "",
|
|
3466
3479
|
apiUrl: c?.apiUrl ?? "/api",
|
|
3467
3480
|
locale: c?.locale ?? "",
|
|
@@ -3473,7 +3486,7 @@ function Xt({ pluginId: e, blockId: t, props: n, style: a, nodeRef: o }) {
|
|
|
3473
3486
|
let e = f.current;
|
|
3474
3487
|
if (!l?.code || !e) return;
|
|
3475
3488
|
let n = !0;
|
|
3476
|
-
return
|
|
3489
|
+
return Yt(l.code, t).then((e) => {
|
|
3477
3490
|
if (!(!n || !e || !f.current)) {
|
|
3478
3491
|
p.current = e;
|
|
3479
3492
|
try {
|
|
@@ -3503,7 +3516,7 @@ function Xt({ pluginId: e, blockId: t, props: n, style: a, nodeRef: o }) {
|
|
|
3503
3516
|
}) : /* @__PURE__ */ d("div", {
|
|
3504
3517
|
ref: o,
|
|
3505
3518
|
style: {
|
|
3506
|
-
...
|
|
3519
|
+
...Xt,
|
|
3507
3520
|
...h(a)
|
|
3508
3521
|
},
|
|
3509
3522
|
children: [
|
|
@@ -3515,10 +3528,10 @@ function Xt({ pluginId: e, blockId: t, props: n, style: a, nodeRef: o }) {
|
|
|
3515
3528
|
}
|
|
3516
3529
|
//#endregion
|
|
3517
3530
|
//#region ../ui/src/components/builder/render.jsx
|
|
3518
|
-
var
|
|
3519
|
-
...
|
|
3520
|
-
...
|
|
3521
|
-
PluginBlock:
|
|
3531
|
+
var Qt = {
|
|
3532
|
+
...It,
|
|
3533
|
+
...Gt,
|
|
3534
|
+
PluginBlock: Zt
|
|
3522
3535
|
};
|
|
3523
3536
|
function $(t, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
|
|
3524
3537
|
let o = n[t];
|
|
@@ -3530,7 +3543,7 @@ function $(t, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
|
|
|
3530
3543
|
let c = new Set(i).add(n);
|
|
3531
3544
|
return /* @__PURE__ */ u(e, { children: $(s.template.rootId, s.template.nodes, r, c, a) }, t);
|
|
3532
3545
|
}
|
|
3533
|
-
let l =
|
|
3546
|
+
let l = Qt[s];
|
|
3534
3547
|
if (!l) return null;
|
|
3535
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, {
|
|
3536
3549
|
...c,
|
|
@@ -3541,15 +3554,15 @@ function $(t, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
|
|
|
3541
3554
|
},
|
|
3542
3555
|
children: d.length ? d : void 0
|
|
3543
3556
|
}, t);
|
|
3544
|
-
return c.when && c.when !== "always" ? /* @__PURE__ */ u(
|
|
3557
|
+
return c.when && c.when !== "always" ? /* @__PURE__ */ u(Vt, {
|
|
3545
3558
|
when: c.when,
|
|
3546
3559
|
children: m
|
|
3547
3560
|
}, t) : m;
|
|
3548
3561
|
}
|
|
3549
3562
|
//#endregion
|
|
3550
3563
|
//#region ../ui/src/components/builder/PageRenderer.jsx
|
|
3551
|
-
var
|
|
3552
|
-
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 }) {
|
|
3553
3566
|
let _ = s?.js?.trim();
|
|
3554
3567
|
if (i(() => {
|
|
3555
3568
|
if (!_) return;
|
|
@@ -3575,11 +3588,11 @@ function $t({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, cu
|
|
|
3575
3588
|
locale: p || "",
|
|
3576
3589
|
settings: h ?? null
|
|
3577
3590
|
},
|
|
3578
|
-
children: /* @__PURE__ */ u(
|
|
3591
|
+
children: /* @__PURE__ */ u(Bt, {
|
|
3579
3592
|
initialUser: g,
|
|
3580
3593
|
children: /* @__PURE__ */ u(H.Provider, {
|
|
3581
3594
|
value: f ?? null,
|
|
3582
|
-
children: /* @__PURE__ */ u(
|
|
3595
|
+
children: /* @__PURE__ */ u(U.Provider, {
|
|
3583
3596
|
value: S,
|
|
3584
3597
|
children: /* @__PURE__ */ d("div", {
|
|
3585
3598
|
...v,
|
|
@@ -3610,11 +3623,11 @@ function $t({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, cu
|
|
|
3610
3623
|
locale: p || "",
|
|
3611
3624
|
settings: h ?? null
|
|
3612
3625
|
},
|
|
3613
|
-
children: /* @__PURE__ */ u(
|
|
3626
|
+
children: /* @__PURE__ */ u(Bt, {
|
|
3614
3627
|
initialUser: g,
|
|
3615
3628
|
children: /* @__PURE__ */ u(H.Provider, {
|
|
3616
3629
|
value: f ?? null,
|
|
3617
|
-
children: /* @__PURE__ */ u(
|
|
3630
|
+
children: /* @__PURE__ */ u(U.Provider, {
|
|
3618
3631
|
value: S,
|
|
3619
3632
|
children: /* @__PURE__ */ d("div", {
|
|
3620
3633
|
...v,
|
|
@@ -3625,8 +3638,8 @@ function $t({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, cu
|
|
|
3625
3638
|
...a
|
|
3626
3639
|
},
|
|
3627
3640
|
children: [
|
|
3628
|
-
/* @__PURE__ */ u("style", { children: `.webim-page { ${
|
|
3629
|
-
@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))} } }` }),
|
|
3630
3643
|
O,
|
|
3631
3644
|
/* @__PURE__ */ u("style", { children: y }),
|
|
3632
3645
|
C && /* @__PURE__ */ u("style", { children: C }),
|
|
@@ -3642,8 +3655,8 @@ function $t({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, cu
|
|
|
3642
3655
|
}
|
|
3643
3656
|
//#endregion
|
|
3644
3657
|
//#region src/WebimContent.jsx
|
|
3645
|
-
function
|
|
3646
|
-
return e?.blocks?.ROOT ? /* @__PURE__ */ u(
|
|
3658
|
+
function tn({ bundle: e, mode: t = "auto", style: n }) {
|
|
3659
|
+
return e?.blocks?.ROOT ? /* @__PURE__ */ u(en, {
|
|
3647
3660
|
blocks: e.blocks,
|
|
3648
3661
|
theme: e.theme,
|
|
3649
3662
|
components: e.components,
|
|
@@ -3660,7 +3673,7 @@ function en({ bundle: e, mode: t = "auto", style: n }) {
|
|
|
3660
3673
|
}
|
|
3661
3674
|
//#endregion
|
|
3662
3675
|
//#region src/WebimPage.jsx
|
|
3663
|
-
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 }) {
|
|
3664
3677
|
let [g, _] = c({ status: "loading" }), v = s({
|
|
3665
3678
|
onLoad: m,
|
|
3666
3679
|
onError: h
|
|
@@ -3670,7 +3683,7 @@ function tn({ apiUrl: e, tenant: t, slug: n, locale: r, preview: a, token: o, mo
|
|
|
3670
3683
|
onError: h
|
|
3671
3684
|
}, i(() => {
|
|
3672
3685
|
let i = !0;
|
|
3673
|
-
return _({ status: "loading" }),
|
|
3686
|
+
return _({ status: "loading" }), te({
|
|
3674
3687
|
apiUrl: e,
|
|
3675
3688
|
tenant: t,
|
|
3676
3689
|
slug: n,
|
|
@@ -3697,11 +3710,11 @@ function tn({ apiUrl: e, tenant: t, slug: n, locale: r, preview: a, token: o, mo
|
|
|
3697
3710
|
r,
|
|
3698
3711
|
a,
|
|
3699
3712
|
o
|
|
3700
|
-
]), 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, {
|
|
3701
3714
|
bundle: g.bundle,
|
|
3702
3715
|
mode: l,
|
|
3703
3716
|
style: d
|
|
3704
3717
|
});
|
|
3705
3718
|
}
|
|
3706
3719
|
//#endregion
|
|
3707
|
-
export {
|
|
3720
|
+
export { en as PageRenderer, tn as WebimContent, nn as WebimPage, te as fetchPage, De as renderRichContent, L as resolveTheme };
|