webim-adapter 0.26.0 → 0.27.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 +630 -364
- package/build/webim-embed.js +3 -3
- package/build/webim-ssr.js +382 -116
- package/package.json +1 -1
package/build/webim-adapter.js
CHANGED
|
@@ -220,26 +220,26 @@ function C(e) {
|
|
|
220
220
|
delete t.textStrokeWidth, delete t.textStrokeColor, (re !== void 0 || ie !== void 0) && (t.WebkitTextStroke = `${x(re ?? 1)} ${ie || "currentColor"}`);
|
|
221
221
|
let { clipText: ae } = t;
|
|
222
222
|
delete t.clipText, ae && (t.WebkitBackgroundClip = "text", t.backgroundClip = "text", t.WebkitTextFillColor = "transparent");
|
|
223
|
-
let { transitions: oe, transitionDuration:
|
|
223
|
+
let { transitions: oe, transitionDuration: H, transitionEasing: se, transitionProperty: ce } = t, le = (e) => typeof e == "number" || !Number.isNaN(Number(e)) ? `${Number(e)}ms` : e;
|
|
224
224
|
delete t.transitions, delete t.transitionDuration, delete t.transitionEasing, delete t.transitionProperty;
|
|
225
|
-
let
|
|
226
|
-
if (
|
|
225
|
+
let ue = (Array.isArray(oe) ? oe : []).filter((e) => e && e.on !== !1).map((e) => `${e.property || "all"} ${le(e.duration ?? 200)} ${e.easing || "ease"}`);
|
|
226
|
+
if (H !== void 0 && ue.push(`${ce || "all"} ${le(H)} ${se || "ease"}`), ue.length && (t.transition = ue.join(", ")), t.textDecoration !== void 0 && (t.textDecorationLine = t.textDecoration, delete t.textDecoration), t.backgroundImage && !String(t.backgroundImage).includes("(") && (t.backgroundImage = `url("${t.backgroundImage}")`), n) {
|
|
227
227
|
let e = `${i || "rgba(0,0,0,0.5)"}, ${a || "transparent"}`, o = n === "radial" ? `radial-gradient(circle, ${e})` : `linear-gradient(${r ?? 180}deg, ${e})`;
|
|
228
228
|
t.backgroundImage = t.backgroundImage ? `${o}, ${t.backgroundImage}` : o;
|
|
229
229
|
}
|
|
230
230
|
delete t.backgroundVideo;
|
|
231
|
-
let { overlayColor:
|
|
232
|
-
if (delete t.overlayColor, delete t.overlayOpacity,
|
|
233
|
-
let e = `color-mix(in srgb, ${
|
|
231
|
+
let { overlayColor: U, overlayOpacity: W } = t;
|
|
232
|
+
if (delete t.overlayColor, delete t.overlayOpacity, U) {
|
|
233
|
+
let e = `color-mix(in srgb, ${U} ${W ?? 50}%, transparent)`, n = `linear-gradient(${e}, ${e})`;
|
|
234
234
|
t.backgroundImage = t.backgroundImage ? `${n}, ${t.backgroundImage}` : n;
|
|
235
235
|
}
|
|
236
236
|
t.backgroundImage && (t.backgroundSize ??= "cover", t.backgroundPosition ??= "center", t.backgroundRepeat ??= "no-repeat");
|
|
237
|
-
let { backgroundLayers:
|
|
237
|
+
let { backgroundLayers: G } = t;
|
|
238
238
|
delete t.backgroundLayers;
|
|
239
|
-
let
|
|
240
|
-
if (
|
|
239
|
+
let de = (Array.isArray(G) ? G : []).filter((e) => e && e.on !== !1);
|
|
240
|
+
if (de.length) {
|
|
241
241
|
let e = [], n = [], r = [], i = [], a = [];
|
|
242
|
-
for (let t of
|
|
242
|
+
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");
|
|
243
243
|
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");
|
|
244
244
|
else {
|
|
245
245
|
if (!t.src) continue;
|
|
@@ -480,18 +480,18 @@ function oe({ page: e, settings: t, tenant: n, apiUrl: r, locale: i }) {
|
|
|
480
480
|
}
|
|
481
481
|
//#endregion
|
|
482
482
|
//#region src/fetchPage.js
|
|
483
|
-
var
|
|
483
|
+
var H = async (e) => {
|
|
484
484
|
let t = await e.json().catch(() => null);
|
|
485
485
|
if (!e.ok || t?.success === !1) throw Error(t?.error?.message || `Request failed (${e.status})`);
|
|
486
486
|
return t?.payload ?? t;
|
|
487
487
|
};
|
|
488
|
-
async function
|
|
488
|
+
async function se({ apiUrl: e, tenant: t, slug: n, locale: r, preview: i, token: a, page: o, fetch: s }) {
|
|
489
489
|
if (!e) throw Error("fetchPage: apiUrl is required");
|
|
490
490
|
if (!n) throw Error("fetchPage: slug is required");
|
|
491
491
|
let c = s ?? fetch, l = e.replace(/\/$/, ""), u = {
|
|
492
492
|
...t ? { "x-tenant": t } : {},
|
|
493
493
|
...a ? { authorization: `Bearer ${a}` } : {}
|
|
494
|
-
}, [d, f] = await Promise.all([c(`${l}/render/${encodeURIComponent(n)}${i ? `?preview=${encodeURIComponent(i)}` : ""}`, { headers: u }).then(
|
|
494
|
+
}, [d, f] = await Promise.all([c(`${l}/render/${encodeURIComponent(n)}${i ? `?preview=${encodeURIComponent(i)}` : ""}`, { headers: u }).then(H), c(`${l}/settings/public`, { headers: u }).then(H)]), p = oe({
|
|
495
495
|
page: d,
|
|
496
496
|
settings: f,
|
|
497
497
|
tenant: t,
|
|
@@ -499,7 +499,7 @@ async function ce({ apiUrl: e, tenant: t, slug: n, locale: r, preview: i, token:
|
|
|
499
499
|
locale: r
|
|
500
500
|
}), 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))];
|
|
501
501
|
if (m.length) {
|
|
502
|
-
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(
|
|
502
|
+
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(H).then((e) => {
|
|
503
503
|
let n = Array.isArray(e) ? e : Array.isArray(e?.data) ? e.data : [], r = Number(e?.total?.filtered ?? e?.total?.all ?? n.length);
|
|
504
504
|
return [[t, n], [`${t}:total`, Number.isFinite(r) ? r : n.length]];
|
|
505
505
|
}).catch(() => [[t, []]])));
|
|
@@ -513,7 +513,7 @@ async function ce({ apiUrl: e, tenant: t, slug: n, locale: r, preview: i, token:
|
|
|
513
513
|
}
|
|
514
514
|
//#endregion
|
|
515
515
|
//#region ../ui/src/components/builder/locale.js
|
|
516
|
-
var
|
|
516
|
+
var ce = /* @__PURE__ */ new Set([
|
|
517
517
|
"ar",
|
|
518
518
|
"he",
|
|
519
519
|
"fa",
|
|
@@ -524,34 +524,34 @@ var le = /* @__PURE__ */ new Set([
|
|
|
524
524
|
"yi",
|
|
525
525
|
"dv",
|
|
526
526
|
"ckb"
|
|
527
|
-
]),
|
|
527
|
+
]), le = (e) => ce.has(String(e || "").toLowerCase().split(/[-_]/)[0]) ? "rtl" : "ltr", ue = (e, t) => e === "ltr" || e === "rtl" ? e : t ? le(t) : void 0, U = t({
|
|
528
528
|
tenant: "",
|
|
529
529
|
apiUrl: "/api",
|
|
530
530
|
locale: "",
|
|
531
531
|
settings: null
|
|
532
|
-
}),
|
|
532
|
+
}), W = t(null), G = (e) => {
|
|
533
533
|
let t = Number(e?.__page);
|
|
534
534
|
if (Number.isFinite(t) && t >= 1) return Math.floor(t);
|
|
535
535
|
if (typeof window > "u") return 1;
|
|
536
536
|
let n = Number(new URLSearchParams(window.location.search).get("page"));
|
|
537
537
|
return Number.isFinite(n) && n >= 1 ? Math.floor(n) : 1;
|
|
538
|
-
},
|
|
538
|
+
}, de = () => {
|
|
539
539
|
if (typeof window > "u") return {};
|
|
540
540
|
let e = {};
|
|
541
541
|
return new URLSearchParams(window.location.search).forEach((t, n) => {
|
|
542
542
|
n.startsWith("f_") && n.length > 2 && t !== "" && (e[n.slice(2)] = t);
|
|
543
543
|
}), e;
|
|
544
|
-
},
|
|
544
|
+
}, fe = (e) => {
|
|
545
545
|
let t = {
|
|
546
546
|
...e && typeof e == "object" && !Array.isArray(e) ? e : {},
|
|
547
|
-
...
|
|
547
|
+
...de()
|
|
548
548
|
};
|
|
549
549
|
return Object.fromEntries(Object.entries(t).filter(([, e]) => typeof e == "string" && e.trim() !== ""));
|
|
550
|
-
},
|
|
551
|
-
function
|
|
550
|
+
}, pe = t(null), me = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
551
|
+
function K(e, t) {
|
|
552
552
|
if (t) return t.includes(".") ? t.split(".").reduce((e, t) => e && typeof e == "object" ? e[t] : void 0, e) : e?.[t];
|
|
553
553
|
}
|
|
554
|
-
var
|
|
554
|
+
var he = (e) => {
|
|
555
555
|
let t = [];
|
|
556
556
|
for (let [n, r] of Object.entries(e ?? {})) {
|
|
557
557
|
if (!/^[\w-]+$/.test(n)) continue;
|
|
@@ -561,36 +561,36 @@ var ge = (e) => {
|
|
|
561
561
|
}
|
|
562
562
|
return t;
|
|
563
563
|
};
|
|
564
|
-
function
|
|
564
|
+
function q(e) {
|
|
565
565
|
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 ?? "") : typeof e == "object" && !Array.isArray(e) && Number.isFinite(Number(e.lat)) && Number.isFinite(Number(e.lng)) ? `${e.lat}, ${e.lng}` : 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(" ") : "";
|
|
566
566
|
}
|
|
567
|
-
function
|
|
568
|
-
let n = t?.data ?? {}, r =
|
|
567
|
+
function ge(e, t) {
|
|
568
|
+
let n = t?.data ?? {}, r = he(n);
|
|
569
569
|
if (!r.length) return e;
|
|
570
|
-
let i = RegExp(`:(${r.map(
|
|
570
|
+
let i = RegExp(`:(${r.map(me).sort((e, t) => t.length - e.length).join("|")})`, "g"), a = (e) => typeof e == "string" ? e.replace(i, (e, t) => q(K(n, t))) : Array.isArray(e) ? e.map(a) : e && typeof e == "object" ? Object.fromEntries(Object.entries(e).map(([e, t]) => [e, a(t)])) : e;
|
|
571
571
|
return a(e);
|
|
572
572
|
}
|
|
573
|
-
var
|
|
573
|
+
var _e = {
|
|
574
574
|
margin: 0,
|
|
575
575
|
fontWeight: 700,
|
|
576
576
|
lineHeight: 1.2,
|
|
577
577
|
fontFamily: "var(--page-heading-font, inherit)"
|
|
578
|
-
},
|
|
578
|
+
}, ve = { margin: 0 }, J = {
|
|
579
579
|
display: "inline-block",
|
|
580
580
|
textDecoration: "none",
|
|
581
581
|
cursor: "pointer",
|
|
582
582
|
backgroundColor: "var(--page-accent, #111827)",
|
|
583
583
|
color: "var(--page-accent-text, #ffffff)"
|
|
584
|
-
},
|
|
584
|
+
}, ye = {
|
|
585
585
|
flexGrow: 1,
|
|
586
586
|
display: "flex",
|
|
587
587
|
flexDirection: "column",
|
|
588
588
|
position: "relative"
|
|
589
|
-
},
|
|
589
|
+
}, be = {
|
|
590
590
|
display: "flex",
|
|
591
591
|
flexDirection: "column"
|
|
592
592
|
};
|
|
593
|
-
function
|
|
593
|
+
function xe({ style: e }) {
|
|
594
594
|
let t = e?.backgroundVideo;
|
|
595
595
|
if (!t) return null;
|
|
596
596
|
let n = {
|
|
@@ -616,7 +616,7 @@ function Se({ style: e }) {
|
|
|
616
616
|
background: r
|
|
617
617
|
} })] });
|
|
618
618
|
}
|
|
619
|
-
var
|
|
619
|
+
var Se = (e, t) => e?.backgroundVideo ? {
|
|
620
620
|
position: "relative",
|
|
621
621
|
...t,
|
|
622
622
|
...C(e)
|
|
@@ -624,24 +624,24 @@ var Ce = (e, t) => e?.backgroundVideo ? {
|
|
|
624
624
|
...t,
|
|
625
625
|
...C(e)
|
|
626
626
|
};
|
|
627
|
-
function
|
|
627
|
+
function Ce({ style: e, nodeRef: t, children: n }) {
|
|
628
628
|
return /* @__PURE__ */ d("div", {
|
|
629
629
|
ref: t,
|
|
630
630
|
style: {
|
|
631
|
-
...
|
|
631
|
+
...ye,
|
|
632
632
|
...C(e)
|
|
633
633
|
},
|
|
634
|
-
children: [/* @__PURE__ */ u(
|
|
634
|
+
children: [/* @__PURE__ */ u(xe, { style: e }), n]
|
|
635
635
|
});
|
|
636
636
|
}
|
|
637
|
-
function
|
|
637
|
+
function we({ style: e, nodeRef: t, children: n }) {
|
|
638
638
|
return /* @__PURE__ */ d("section", {
|
|
639
639
|
ref: t,
|
|
640
|
-
style:
|
|
641
|
-
children: [/* @__PURE__ */ u(
|
|
640
|
+
style: Se(e, be),
|
|
641
|
+
children: [/* @__PURE__ */ u(xe, { style: e }), n]
|
|
642
642
|
});
|
|
643
643
|
}
|
|
644
|
-
function
|
|
644
|
+
function Te({ style: e, freeLayout: t, nodeRef: n, children: r }) {
|
|
645
645
|
let i = t ? {
|
|
646
646
|
position: "relative",
|
|
647
647
|
minHeight: 240
|
|
@@ -650,32 +650,32 @@ function Ee({ style: e, freeLayout: t, nodeRef: n, children: r }) {
|
|
|
650
650
|
ref: n,
|
|
651
651
|
style: i ? {
|
|
652
652
|
...i,
|
|
653
|
-
...
|
|
654
|
-
} :
|
|
655
|
-
children: [/* @__PURE__ */ u(
|
|
653
|
+
...Se(e)
|
|
654
|
+
} : Se(e),
|
|
655
|
+
children: [/* @__PURE__ */ u(xe, { style: e }), r]
|
|
656
656
|
});
|
|
657
657
|
}
|
|
658
|
-
function
|
|
658
|
+
function Ee({ text: e, parts: t, tag: n = "h2", style: r, linked: i, nodeRef: a }) {
|
|
659
659
|
return /* @__PURE__ */ u(n, {
|
|
660
660
|
ref: a,
|
|
661
661
|
style: {
|
|
662
|
-
...
|
|
662
|
+
..._e,
|
|
663
663
|
...C(r)
|
|
664
664
|
},
|
|
665
|
-
children:
|
|
665
|
+
children: Y(t, e, i)
|
|
666
666
|
});
|
|
667
667
|
}
|
|
668
|
-
var
|
|
668
|
+
var De = {
|
|
669
669
|
fontFamily: z.mono.value,
|
|
670
670
|
background: "rgba(148, 163, 184, 0.18)",
|
|
671
671
|
padding: "1px 5px",
|
|
672
672
|
borderRadius: 4,
|
|
673
673
|
fontSize: "0.9em"
|
|
674
674
|
};
|
|
675
|
-
function
|
|
675
|
+
function Oe(e, t = [], n, r) {
|
|
676
676
|
let i = e;
|
|
677
677
|
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", {
|
|
678
|
-
style:
|
|
678
|
+
style: De,
|
|
679
679
|
children: i
|
|
680
680
|
})), 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", {
|
|
681
681
|
href: n,
|
|
@@ -685,13 +685,13 @@ function ke(e, t = [], n, r) {
|
|
|
685
685
|
children: i
|
|
686
686
|
})), i;
|
|
687
687
|
}
|
|
688
|
-
function
|
|
688
|
+
function Y(t, n, r) {
|
|
689
689
|
return t?.length ? t.map((t, n) => {
|
|
690
690
|
if (t.slot) return /* @__PURE__ */ u(e, { children: r?.[t.slot] ?? null }, n);
|
|
691
|
-
if (t.parts) return /* @__PURE__ */ u(e, { children:
|
|
691
|
+
if (t.parts) return /* @__PURE__ */ u(e, { children: Y(t.parts, "", r) }, n);
|
|
692
692
|
let i = t.text;
|
|
693
693
|
return t.sup ? i = /* @__PURE__ */ u("sup", { children: i }) : t.sub && (i = /* @__PURE__ */ u("sub", { children: i })), t.code && (i = /* @__PURE__ */ u("code", {
|
|
694
|
-
style:
|
|
694
|
+
style: De,
|
|
695
695
|
children: i
|
|
696
696
|
})), 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", {
|
|
697
697
|
style: {
|
|
@@ -708,13 +708,13 @@ function J(t, n, r) {
|
|
|
708
708
|
})), /* @__PURE__ */ u(e, { children: i }, n);
|
|
709
709
|
}) : n;
|
|
710
710
|
}
|
|
711
|
-
function
|
|
711
|
+
function ke({ parts: e, text: t, marks: n, href: r, target: i, style: a }) {
|
|
712
712
|
return /* @__PURE__ */ u("span", {
|
|
713
713
|
style: C(a),
|
|
714
|
-
children: e?.length ?
|
|
714
|
+
children: e?.length ? Y(e, t) : Oe(t, n, r, i)
|
|
715
715
|
});
|
|
716
716
|
}
|
|
717
|
-
var
|
|
717
|
+
var Ae = {
|
|
718
718
|
h1: 40,
|
|
719
719
|
h2: 32,
|
|
720
720
|
h3: 26,
|
|
@@ -722,7 +722,7 @@ var je = {
|
|
|
722
722
|
h5: 19,
|
|
723
723
|
h6: 16
|
|
724
724
|
};
|
|
725
|
-
function
|
|
725
|
+
function je({ align: e = "center", width: t, wrap: n } = {}) {
|
|
726
726
|
let r = t ? `${t}%` : void 0;
|
|
727
727
|
if (e === "full") return { width: "100%" };
|
|
728
728
|
let i = e === "left" || e === "right";
|
|
@@ -756,8 +756,8 @@ function Me({ align: e = "center", width: t, wrap: n } = {}) {
|
|
|
756
756
|
marginRight: "auto"
|
|
757
757
|
};
|
|
758
758
|
}
|
|
759
|
-
function
|
|
760
|
-
let r = n ?? ((e, n) =>
|
|
759
|
+
function Me(e = [], t, n) {
|
|
760
|
+
let r = n ?? ((e, n) => Y(e, n, t));
|
|
761
761
|
return e.map((t, n) => {
|
|
762
762
|
let i = {
|
|
763
763
|
marginTop: 0,
|
|
@@ -779,7 +779,7 @@ function Ne(e = [], t, n) {
|
|
|
779
779
|
marginLeft: 0,
|
|
780
780
|
marginRight: 0,
|
|
781
781
|
...i,
|
|
782
|
-
...
|
|
782
|
+
...je(t)
|
|
783
783
|
},
|
|
784
784
|
children: [t.href ? /* @__PURE__ */ u("a", {
|
|
785
785
|
href: t.href,
|
|
@@ -798,16 +798,16 @@ function Ne(e = [], t, n) {
|
|
|
798
798
|
})]
|
|
799
799
|
}, n);
|
|
800
800
|
}
|
|
801
|
-
if (t.type === "video") return
|
|
801
|
+
if (t.type === "video") return Ue(t.url) ? /* @__PURE__ */ u("div", {
|
|
802
802
|
style: {
|
|
803
803
|
...i,
|
|
804
|
-
...
|
|
804
|
+
...je({
|
|
805
805
|
align: t.align,
|
|
806
806
|
wrap: t.wrap,
|
|
807
807
|
width: t.width ?? 100
|
|
808
808
|
})
|
|
809
809
|
},
|
|
810
|
-
children: /* @__PURE__ */ u(
|
|
810
|
+
children: /* @__PURE__ */ u(We, {
|
|
811
811
|
url: t.url,
|
|
812
812
|
autoplay: t.autoplay,
|
|
813
813
|
muted: t.muted,
|
|
@@ -869,17 +869,17 @@ function Ne(e = [], t, n) {
|
|
|
869
869
|
}
|
|
870
870
|
if (t.type === "quote") return /* @__PURE__ */ u("blockquote", {
|
|
871
871
|
style: {
|
|
872
|
-
...
|
|
872
|
+
...Pe,
|
|
873
873
|
...i
|
|
874
874
|
},
|
|
875
875
|
children: r(t.parts, t.text)
|
|
876
876
|
}, n);
|
|
877
|
-
if (
|
|
877
|
+
if (Ae[t.type]) {
|
|
878
878
|
let e = t.type;
|
|
879
879
|
return /* @__PURE__ */ u(e, {
|
|
880
880
|
style: {
|
|
881
|
-
...
|
|
882
|
-
fontSize:
|
|
881
|
+
..._e,
|
|
882
|
+
fontSize: Ae[t.type],
|
|
883
883
|
...i
|
|
884
884
|
},
|
|
885
885
|
children: r(t.parts, t.text)
|
|
@@ -887,39 +887,39 @@ function Ne(e = [], t, n) {
|
|
|
887
887
|
}
|
|
888
888
|
return /* @__PURE__ */ u("p", {
|
|
889
889
|
style: {
|
|
890
|
-
...
|
|
890
|
+
...ve,
|
|
891
891
|
...i
|
|
892
892
|
},
|
|
893
893
|
children: r(t.parts, t.text)
|
|
894
894
|
}, n);
|
|
895
895
|
});
|
|
896
896
|
}
|
|
897
|
-
function
|
|
897
|
+
function Ne({ content: e, style: t, linked: n, nodeRef: r }) {
|
|
898
898
|
return /* @__PURE__ */ u("div", {
|
|
899
899
|
ref: r,
|
|
900
900
|
style: {
|
|
901
901
|
display: "flow-root",
|
|
902
902
|
...C(t)
|
|
903
903
|
},
|
|
904
|
-
children:
|
|
904
|
+
children: Me(e, n)
|
|
905
905
|
});
|
|
906
906
|
}
|
|
907
|
-
var
|
|
907
|
+
var Pe = {
|
|
908
908
|
margin: 0,
|
|
909
909
|
padding: "8px 0 8px 20px",
|
|
910
910
|
borderLeft: "4px solid var(--page-accent, rgba(148, 163, 184, 0.6))"
|
|
911
911
|
};
|
|
912
|
-
function
|
|
912
|
+
function Fe({ text: e, parts: t, style: n, linked: r, nodeRef: i }) {
|
|
913
913
|
return /* @__PURE__ */ u("blockquote", {
|
|
914
914
|
ref: i,
|
|
915
915
|
style: {
|
|
916
|
-
...
|
|
916
|
+
...Pe,
|
|
917
917
|
...C(n)
|
|
918
918
|
},
|
|
919
|
-
children:
|
|
919
|
+
children: Y(t, e, r)
|
|
920
920
|
});
|
|
921
921
|
}
|
|
922
|
-
function
|
|
922
|
+
function Ie({ ordered: e, items: t = [], style: n, nodeRef: r }) {
|
|
923
923
|
return /* @__PURE__ */ u(e ? "ol" : "ul", {
|
|
924
924
|
ref: r,
|
|
925
925
|
style: {
|
|
@@ -929,53 +929,53 @@ function Le({ ordered: e, items: t = [], style: n, nodeRef: r }) {
|
|
|
929
929
|
},
|
|
930
930
|
children: t.map((e, t) => /* @__PURE__ */ u("li", {
|
|
931
931
|
style: { marginBottom: 4 },
|
|
932
|
-
children:
|
|
932
|
+
children: Y(e.parts, e.text)
|
|
933
933
|
}, t))
|
|
934
934
|
});
|
|
935
935
|
}
|
|
936
|
-
function
|
|
936
|
+
function Le({ text: e, parts: t, style: n, linked: r, nodeRef: i }) {
|
|
937
937
|
return /* @__PURE__ */ u("p", {
|
|
938
938
|
ref: i,
|
|
939
939
|
style: {
|
|
940
|
-
...
|
|
940
|
+
...ve,
|
|
941
941
|
...C(n)
|
|
942
942
|
},
|
|
943
|
-
children:
|
|
943
|
+
children: Y(t, e, r)
|
|
944
944
|
});
|
|
945
945
|
}
|
|
946
|
-
var
|
|
946
|
+
var Re = {
|
|
947
947
|
color: "var(--page-accent, inherit)",
|
|
948
948
|
textDecoration: "underline",
|
|
949
949
|
textUnderlineOffset: 3,
|
|
950
950
|
cursor: "pointer"
|
|
951
951
|
};
|
|
952
|
-
function
|
|
952
|
+
function ze({ text: e, parts: t, href: n, target: r, style: i, linked: a, nodeRef: o }) {
|
|
953
953
|
return /* @__PURE__ */ u("a", {
|
|
954
954
|
ref: o,
|
|
955
955
|
href: n || "#",
|
|
956
956
|
target: r || void 0,
|
|
957
957
|
rel: r === "_blank" ? "noopener noreferrer" : void 0,
|
|
958
958
|
style: {
|
|
959
|
-
...
|
|
959
|
+
...Re,
|
|
960
960
|
...C(i)
|
|
961
961
|
},
|
|
962
|
-
children:
|
|
962
|
+
children: Y(t, e, a)
|
|
963
963
|
});
|
|
964
964
|
}
|
|
965
|
-
function
|
|
965
|
+
function Be({ text: e, parts: t, href: n, target: r, style: i, linked: a, nodeRef: o }) {
|
|
966
966
|
return /* @__PURE__ */ u("a", {
|
|
967
967
|
ref: o,
|
|
968
968
|
href: n || "#",
|
|
969
969
|
target: r || void 0,
|
|
970
970
|
rel: r === "_blank" ? "noopener noreferrer" : void 0,
|
|
971
971
|
style: {
|
|
972
|
-
...
|
|
972
|
+
...J,
|
|
973
973
|
...C(i)
|
|
974
974
|
},
|
|
975
|
-
children:
|
|
975
|
+
children: Y(t, e, a)
|
|
976
976
|
});
|
|
977
977
|
}
|
|
978
|
-
function
|
|
978
|
+
function Ve({ src: e, alt: t, style: n, nodeRef: r }) {
|
|
979
979
|
return e ? /* @__PURE__ */ u("img", {
|
|
980
980
|
ref: r,
|
|
981
981
|
src: e,
|
|
@@ -987,7 +987,7 @@ function He({ src: e, alt: t, style: n, nodeRef: r }) {
|
|
|
987
987
|
}
|
|
988
988
|
}) : null;
|
|
989
989
|
}
|
|
990
|
-
function
|
|
990
|
+
function He({ src: e, poster: t, controls: n = !0, autoplay: r = !1, loop: i = !1, muted: a = !1, style: o, nodeRef: s }) {
|
|
991
991
|
return e ? /* @__PURE__ */ u("video", {
|
|
992
992
|
ref: s,
|
|
993
993
|
src: e,
|
|
@@ -1005,9 +1005,9 @@ function Ue({ src: e, poster: t, controls: n = !0, autoplay: r = !1, loop: i = !
|
|
|
1005
1005
|
}
|
|
1006
1006
|
}) : null;
|
|
1007
1007
|
}
|
|
1008
|
-
var
|
|
1009
|
-
function
|
|
1010
|
-
let c =
|
|
1008
|
+
var Ue = (e = "") => (e.match(/(?:youtu\.be\/|v=|embed\/|shorts\/|live\/)([\w-]{11})/) || e.match(/^([\w-]{11})$/))?.[1];
|
|
1009
|
+
function We({ url: e, autoplay: t = !1, muted: n = !1, loop: r = !1, controls: i = !0, start: a, style: o, nodeRef: s }) {
|
|
1010
|
+
let c = Ue(e);
|
|
1011
1011
|
if (!c) return null;
|
|
1012
1012
|
let l = new URLSearchParams({ rel: "0" });
|
|
1013
1013
|
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", {
|
|
@@ -1033,7 +1033,7 @@ function Ge({ url: e, autoplay: t = !1, muted: n = !1, loop: r = !1, controls: i
|
|
|
1033
1033
|
})
|
|
1034
1034
|
});
|
|
1035
1035
|
}
|
|
1036
|
-
function
|
|
1036
|
+
function Ge({ src: e, title: t, allowFullscreen: n = !0, style: r, nodeRef: i }) {
|
|
1037
1037
|
return e ? /* @__PURE__ */ u("iframe", {
|
|
1038
1038
|
ref: i,
|
|
1039
1039
|
src: e,
|
|
@@ -1049,7 +1049,7 @@ function Ke({ src: e, title: t, allowFullscreen: n = !0, style: r, nodeRef: i })
|
|
|
1049
1049
|
}
|
|
1050
1050
|
}) : null;
|
|
1051
1051
|
}
|
|
1052
|
-
function
|
|
1052
|
+
function Ke({ code: e, runScripts: t = !0, style: n, nodeRef: r }) {
|
|
1053
1053
|
let [a, o] = c(null);
|
|
1054
1054
|
return i(() => {
|
|
1055
1055
|
a && (a.innerHTML = e || "", t && a.querySelectorAll("script").forEach((e) => {
|
|
@@ -1068,7 +1068,7 @@ function qe({ code: e, runScripts: t = !0, style: n, nodeRef: r }) {
|
|
|
1068
1068
|
style: C(n)
|
|
1069
1069
|
});
|
|
1070
1070
|
}
|
|
1071
|
-
function
|
|
1071
|
+
function qe({ height: e, nodeRef: t }) {
|
|
1072
1072
|
return /* @__PURE__ */ u("div", {
|
|
1073
1073
|
ref: t,
|
|
1074
1074
|
style: {
|
|
@@ -1078,7 +1078,7 @@ function Je({ height: e, nodeRef: t }) {
|
|
|
1078
1078
|
}
|
|
1079
1079
|
});
|
|
1080
1080
|
}
|
|
1081
|
-
function
|
|
1081
|
+
function Je({ style: e, nodeRef: t }) {
|
|
1082
1082
|
return /* @__PURE__ */ u("div", {
|
|
1083
1083
|
ref: t,
|
|
1084
1084
|
style: {
|
|
@@ -1089,7 +1089,7 @@ function Ye({ style: e, nodeRef: t }) {
|
|
|
1089
1089
|
}
|
|
1090
1090
|
});
|
|
1091
1091
|
}
|
|
1092
|
-
var
|
|
1092
|
+
var Ye = {
|
|
1093
1093
|
position: "absolute",
|
|
1094
1094
|
top: "50%",
|
|
1095
1095
|
transform: "translateY(-50%)",
|
|
@@ -1106,7 +1106,7 @@ var Xe = {
|
|
|
1106
1106
|
alignItems: "center",
|
|
1107
1107
|
justifyContent: "center",
|
|
1108
1108
|
padding: 0
|
|
1109
|
-
},
|
|
1109
|
+
}, Xe = {
|
|
1110
1110
|
bottom: {
|
|
1111
1111
|
inset: "auto 0 0 0",
|
|
1112
1112
|
padding: "40px 24px 20px",
|
|
@@ -1125,8 +1125,8 @@ var Xe = {
|
|
|
1125
1125
|
padding: 24,
|
|
1126
1126
|
textShadow: "0 2px 12px rgba(0, 0, 0, 0.6)"
|
|
1127
1127
|
}
|
|
1128
|
-
},
|
|
1129
|
-
function
|
|
1128
|
+
}, Ze = 48;
|
|
1129
|
+
function Qe({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, height: a = 320, swipe: o = !0, style: s, nodeRef: f }) {
|
|
1130
1130
|
let [p, m] = c(0), [h, g] = c(!1), [_, v] = c(null), y = e ? Math.min(p, e - 1) : 0;
|
|
1131
1131
|
if (i(() => {
|
|
1132
1132
|
if (!n || h || _ || e < 2) return;
|
|
@@ -1142,7 +1142,7 @@ function $e({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
|
|
|
1142
1142
|
let b = (t) => m((t + e) % e), x = () => {
|
|
1143
1143
|
if (!_) return;
|
|
1144
1144
|
let { dx: e } = _;
|
|
1145
|
-
v(null), e < -48 ? b(y + 1) : e >
|
|
1145
|
+
v(null), e < -48 ? b(y + 1) : e > Ze && b(y - 1);
|
|
1146
1146
|
};
|
|
1147
1147
|
return /* @__PURE__ */ d("div", {
|
|
1148
1148
|
ref: f,
|
|
@@ -1190,7 +1190,7 @@ function $e({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
|
|
|
1190
1190
|
type: "button",
|
|
1191
1191
|
"aria-label": "Previous slide",
|
|
1192
1192
|
style: {
|
|
1193
|
-
...
|
|
1193
|
+
...Ye,
|
|
1194
1194
|
left: 12
|
|
1195
1195
|
},
|
|
1196
1196
|
onClick: () => b(y - 1),
|
|
@@ -1200,7 +1200,7 @@ function $e({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
|
|
|
1200
1200
|
type: "button",
|
|
1201
1201
|
"aria-label": "Next slide",
|
|
1202
1202
|
style: {
|
|
1203
|
-
...
|
|
1203
|
+
...Ye,
|
|
1204
1204
|
right: 12
|
|
1205
1205
|
},
|
|
1206
1206
|
onClick: () => b(y + 1),
|
|
@@ -1234,7 +1234,7 @@ function $e({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
|
|
|
1234
1234
|
] })]
|
|
1235
1235
|
});
|
|
1236
1236
|
}
|
|
1237
|
-
var
|
|
1237
|
+
var $e = (e, t) => ({
|
|
1238
1238
|
position: "absolute",
|
|
1239
1239
|
inset: 0,
|
|
1240
1240
|
backgroundImage: e ? `url(${e})` : "none",
|
|
@@ -1242,18 +1242,18 @@ var et = (e, t) => ({
|
|
|
1242
1242
|
backgroundSize: "cover",
|
|
1243
1243
|
backgroundPosition: "center"
|
|
1244
1244
|
});
|
|
1245
|
-
function
|
|
1246
|
-
return e.length ? /* @__PURE__ */ u(
|
|
1245
|
+
function et({ slides: e = [], captionPosition: t = "bottom", captionAlign: n = "left", ...r }) {
|
|
1246
|
+
return e.length ? /* @__PURE__ */ u(Qe, {
|
|
1247
1247
|
...r,
|
|
1248
1248
|
count: e.length,
|
|
1249
1249
|
renderSlide: (r) => {
|
|
1250
1250
|
let i = e[r];
|
|
1251
|
-
return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("div", { style:
|
|
1251
|
+
return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("div", { style: $e(i.image) }), (i.title || i.text) && /* @__PURE__ */ d("div", {
|
|
1252
1252
|
style: {
|
|
1253
1253
|
position: "absolute",
|
|
1254
1254
|
color: "#fff",
|
|
1255
1255
|
textAlign: n,
|
|
1256
|
-
...
|
|
1256
|
+
...Xe[t] ?? Xe.bottom
|
|
1257
1257
|
},
|
|
1258
1258
|
children: [i.title && /* @__PURE__ */ u("div", {
|
|
1259
1259
|
style: {
|
|
@@ -1273,13 +1273,13 @@ function tt({ slides: e = [], captionPosition: t = "bottom", captionAlign: n = "
|
|
|
1273
1273
|
}
|
|
1274
1274
|
}) : null;
|
|
1275
1275
|
}
|
|
1276
|
-
function
|
|
1277
|
-
return e.length ? /* @__PURE__ */ u(
|
|
1276
|
+
function tt({ slides: e = [], linked: t, ...n }) {
|
|
1277
|
+
return e.length ? /* @__PURE__ */ u(Qe, {
|
|
1278
1278
|
...n,
|
|
1279
1279
|
count: e.length,
|
|
1280
1280
|
renderSlide: (n) => {
|
|
1281
1281
|
let r = e[n];
|
|
1282
|
-
return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("div", { style:
|
|
1282
|
+
return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("div", { style: $e(r.image, r.color) }), /* @__PURE__ */ u("div", {
|
|
1283
1283
|
style: {
|
|
1284
1284
|
position: "absolute",
|
|
1285
1285
|
inset: 0,
|
|
@@ -1291,7 +1291,7 @@ function nt({ slides: e = [], linked: t, ...n }) {
|
|
|
1291
1291
|
}
|
|
1292
1292
|
}) : null;
|
|
1293
1293
|
}
|
|
1294
|
-
function
|
|
1294
|
+
function nt({ images: e = [], columns: t = 3, gap: n = 8, showNames: r = !1, lightbox: a = !0, style: o, nodeRef: s, inert: f }) {
|
|
1295
1295
|
let p = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && e.src) : [], m = Math.max(0, Number(n) || 0), h = f ? (e) => e.preventDefault() : void 0, [g, _] = c(null), v = a && !f && g !== null && p[g];
|
|
1296
1296
|
i(() => {
|
|
1297
1297
|
if (!v) return;
|
|
@@ -1490,19 +1490,19 @@ function rt({ images: e = [], columns: t = 3, gap: n = 8, showNames: r = !1, lig
|
|
|
1490
1490
|
]
|
|
1491
1491
|
});
|
|
1492
1492
|
}
|
|
1493
|
-
var
|
|
1493
|
+
var rt = {
|
|
1494
1494
|
color: "inherit",
|
|
1495
1495
|
textDecoration: "none",
|
|
1496
1496
|
fontSize: 14,
|
|
1497
1497
|
opacity: .85
|
|
1498
|
-
},
|
|
1498
|
+
}, it = {
|
|
1499
1499
|
background: "var(--page-surface, #f2f2f2)",
|
|
1500
1500
|
color: "var(--page-text, #111827)",
|
|
1501
1501
|
border: "1px solid rgba(148, 163, 184, 0.25)",
|
|
1502
1502
|
boxShadow: "0 16px 40px rgba(15, 23, 42, 0.16)",
|
|
1503
1503
|
zIndex: 60
|
|
1504
1504
|
};
|
|
1505
|
-
function
|
|
1505
|
+
function at({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], style: s, nodeRef: f, menu: p = "auto", breakpoint: m = 768 }) {
|
|
1506
1506
|
let [h, g] = c(null), [_, v] = c(!1), [y, b] = c(!1), [x, S] = c(null);
|
|
1507
1507
|
i(() => {
|
|
1508
1508
|
if (!h) return;
|
|
@@ -1512,7 +1512,7 @@ function ot({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
|
|
|
1512
1512
|
let w = p === "hamburger" || p === "auto" && _, T = (e, t) => /* @__PURE__ */ d("a", {
|
|
1513
1513
|
href: e.href || "#",
|
|
1514
1514
|
style: {
|
|
1515
|
-
...
|
|
1515
|
+
...rt,
|
|
1516
1516
|
display: "block",
|
|
1517
1517
|
...t
|
|
1518
1518
|
},
|
|
@@ -1600,7 +1600,7 @@ function ot({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
|
|
|
1600
1600
|
let t = e.children ?? [];
|
|
1601
1601
|
if (!t.length) return /* @__PURE__ */ u("a", {
|
|
1602
1602
|
href: e.href || "#",
|
|
1603
|
-
style:
|
|
1603
|
+
style: rt,
|
|
1604
1604
|
children: e.label
|
|
1605
1605
|
}, e.key);
|
|
1606
1606
|
let n = e.type === "mega";
|
|
@@ -1614,7 +1614,7 @@ function ot({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
|
|
|
1614
1614
|
children: [/* @__PURE__ */ d("a", {
|
|
1615
1615
|
href: e.href || "#",
|
|
1616
1616
|
style: {
|
|
1617
|
-
...
|
|
1617
|
+
...rt,
|
|
1618
1618
|
cursor: "pointer"
|
|
1619
1619
|
},
|
|
1620
1620
|
children: [
|
|
@@ -1630,7 +1630,7 @@ function ot({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
|
|
|
1630
1630
|
]
|
|
1631
1631
|
}), x === e.key && (n ? /* @__PURE__ */ u("div", {
|
|
1632
1632
|
style: {
|
|
1633
|
-
...
|
|
1633
|
+
...it,
|
|
1634
1634
|
position: "absolute",
|
|
1635
1635
|
left: 0,
|
|
1636
1636
|
right: 0,
|
|
@@ -1646,7 +1646,7 @@ function ot({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
|
|
|
1646
1646
|
}))
|
|
1647
1647
|
}) : /* @__PURE__ */ u("div", {
|
|
1648
1648
|
style: {
|
|
1649
|
-
...
|
|
1649
|
+
...it,
|
|
1650
1650
|
position: "absolute",
|
|
1651
1651
|
top: "100%",
|
|
1652
1652
|
left: 0,
|
|
@@ -1675,7 +1675,7 @@ function ot({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
|
|
|
1675
1675
|
children: o.map((t) => /* @__PURE__ */ d(e, { children: [/* @__PURE__ */ u("a", {
|
|
1676
1676
|
href: t.href || "#",
|
|
1677
1677
|
style: {
|
|
1678
|
-
...
|
|
1678
|
+
...rt,
|
|
1679
1679
|
padding: "10px 4px",
|
|
1680
1680
|
fontWeight: (t.children ?? []).length ? 600 : 400,
|
|
1681
1681
|
opacity: 1
|
|
@@ -1686,7 +1686,7 @@ function ot({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
|
|
|
1686
1686
|
]
|
|
1687
1687
|
});
|
|
1688
1688
|
}
|
|
1689
|
-
function
|
|
1689
|
+
function ot({ tabs: e = [], linked: t, style: n, nodeRef: r }) {
|
|
1690
1690
|
let [i, a] = c(0), o = e.length ? Math.min(i, e.length - 1) : 0;
|
|
1691
1691
|
return e.length ? /* @__PURE__ */ d("div", {
|
|
1692
1692
|
ref: r,
|
|
@@ -1726,7 +1726,7 @@ function st({ tabs: e = [], linked: t, style: n, nodeRef: r }) {
|
|
|
1726
1726
|
}, e.key))]
|
|
1727
1727
|
}) : null;
|
|
1728
1728
|
}
|
|
1729
|
-
function
|
|
1729
|
+
function st({ items: e = [], linked: t, multiple: n = !1, style: r, nodeRef: i }) {
|
|
1730
1730
|
let [a, o] = c(() => new Set(e.length ? [e[0].key] : []));
|
|
1731
1731
|
if (!e.length) return null;
|
|
1732
1732
|
let s = (e) => o((t) => {
|
|
@@ -1783,15 +1783,15 @@ function ct({ items: e = [], linked: t, multiple: n = !1, style: r, nodeRef: i }
|
|
|
1783
1783
|
})
|
|
1784
1784
|
});
|
|
1785
1785
|
}
|
|
1786
|
-
var
|
|
1786
|
+
var ct = {
|
|
1787
1787
|
display: "flex",
|
|
1788
1788
|
flexDirection: "column",
|
|
1789
1789
|
gap: "12px"
|
|
1790
|
-
},
|
|
1790
|
+
}, X = {
|
|
1791
1791
|
fontSize: "14px",
|
|
1792
1792
|
fontWeight: 500,
|
|
1793
1793
|
color: "var(--page-text, #111827)"
|
|
1794
|
-
},
|
|
1794
|
+
}, Z = {
|
|
1795
1795
|
padding: "10px 12px",
|
|
1796
1796
|
border: "1px solid var(--page-border, #d1d5db)",
|
|
1797
1797
|
borderRadius: "6px",
|
|
@@ -1801,18 +1801,18 @@ var lt = {
|
|
|
1801
1801
|
boxSizing: "border-box",
|
|
1802
1802
|
backgroundColor: "var(--page-surface, #f2f2f2)",
|
|
1803
1803
|
color: "var(--page-text, #111827)"
|
|
1804
|
-
},
|
|
1804
|
+
}, lt = {
|
|
1805
1805
|
display: "flex",
|
|
1806
1806
|
alignItems: "center",
|
|
1807
1807
|
gap: "8px",
|
|
1808
1808
|
fontSize: "14px",
|
|
1809
1809
|
color: "var(--page-text, #111827)"
|
|
1810
|
-
},
|
|
1810
|
+
}, Q = (e) => e ? {
|
|
1811
1811
|
readOnly: !0,
|
|
1812
1812
|
tabIndex: -1,
|
|
1813
1813
|
onMouseDown: (e) => e.preventDefault()
|
|
1814
1814
|
} : {};
|
|
1815
|
-
function
|
|
1815
|
+
function ut(e, t) {
|
|
1816
1816
|
if (!e) return !0;
|
|
1817
1817
|
let n = t[e.field], r = n == null || n === "" ? "" : String(n), i = e.value ?? "";
|
|
1818
1818
|
switch (e.op) {
|
|
@@ -1826,11 +1826,11 @@ function dt(e, t) {
|
|
|
1826
1826
|
default: return !1;
|
|
1827
1827
|
}
|
|
1828
1828
|
}
|
|
1829
|
-
var
|
|
1829
|
+
var dt = {
|
|
1830
1830
|
display: "flex",
|
|
1831
1831
|
flexDirection: "column",
|
|
1832
1832
|
gap: 6
|
|
1833
|
-
},
|
|
1833
|
+
}, ft = {
|
|
1834
1834
|
font: "inherit",
|
|
1835
1835
|
fontSize: 15,
|
|
1836
1836
|
padding: "10px 12px",
|
|
@@ -1841,16 +1841,16 @@ var ft = {
|
|
|
1841
1841
|
width: "100%",
|
|
1842
1842
|
boxSizing: "border-box"
|
|
1843
1843
|
};
|
|
1844
|
-
function
|
|
1844
|
+
function pt(e, t) {
|
|
1845
1845
|
let n = Array.isArray(e?.options) ? e.options : [];
|
|
1846
1846
|
if (!e?.parentField) return n;
|
|
1847
1847
|
let r = t?.[e.parentField];
|
|
1848
1848
|
return r ? n.filter((e) => typeof e == "string" ? !1 : !e.parent || e.parent === r) : [];
|
|
1849
1849
|
}
|
|
1850
|
-
function
|
|
1850
|
+
function mt({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
1851
1851
|
let a = /* @__PURE__ */ d("span", {
|
|
1852
1852
|
style: {
|
|
1853
|
-
...
|
|
1853
|
+
...X,
|
|
1854
1854
|
fontSize: 14
|
|
1855
1855
|
},
|
|
1856
1856
|
children: [e.label, e.required ? " *" : ""]
|
|
@@ -1859,7 +1859,7 @@ function ht({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
|
1859
1859
|
required: e.required || void 0,
|
|
1860
1860
|
placeholder: e.placeholder || void 0,
|
|
1861
1861
|
disabled: r || void 0,
|
|
1862
|
-
style:
|
|
1862
|
+
style: ft,
|
|
1863
1863
|
value: t ?? "",
|
|
1864
1864
|
onChange: (t) => n(e.name, t.target.value)
|
|
1865
1865
|
};
|
|
@@ -1888,7 +1888,7 @@ function ht({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
|
1888
1888
|
borderRadius: 8,
|
|
1889
1889
|
display: "block"
|
|
1890
1890
|
}
|
|
1891
|
-
}) : null : e.type === "video" ? e.src ? /youtube\.com|youtu\.be|vimeo\.com/i.test(e.src) ? /* @__PURE__ */ u(
|
|
1891
|
+
}) : null : e.type === "video" ? e.src ? /youtube\.com|youtu\.be|vimeo\.com/i.test(e.src) ? /* @__PURE__ */ u(We, {
|
|
1892
1892
|
url: e.src,
|
|
1893
1893
|
style: { width: "100%" }
|
|
1894
1894
|
}) : /* @__PURE__ */ u("video", {
|
|
@@ -1900,14 +1900,14 @@ function ht({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
|
1900
1900
|
display: "block"
|
|
1901
1901
|
}
|
|
1902
1902
|
}) : null : /* @__PURE__ */ d("label", {
|
|
1903
|
-
style:
|
|
1903
|
+
style: dt,
|
|
1904
1904
|
children: [
|
|
1905
1905
|
a,
|
|
1906
1906
|
e.type === "textarea" || e.multiline ? /* @__PURE__ */ u("textarea", {
|
|
1907
1907
|
...o,
|
|
1908
1908
|
rows: 4,
|
|
1909
1909
|
style: {
|
|
1910
|
-
...
|
|
1910
|
+
...ft,
|
|
1911
1911
|
resize: "vertical"
|
|
1912
1912
|
}
|
|
1913
1913
|
}) : e.type === "select" ? /* @__PURE__ */ d("select", {
|
|
@@ -1916,7 +1916,7 @@ function ht({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
|
1916
1916
|
children: [/* @__PURE__ */ u("option", {
|
|
1917
1917
|
value: "",
|
|
1918
1918
|
children: e.placeholder || "—"
|
|
1919
|
-
}),
|
|
1919
|
+
}), pt(e, i).map((e, t) => /* @__PURE__ */ u("option", {
|
|
1920
1920
|
value: typeof e == "string" ? e : e.value,
|
|
1921
1921
|
children: typeof e == "string" ? e : e.label ?? e.value
|
|
1922
1922
|
}, t))]
|
|
@@ -1963,8 +1963,8 @@ function ht({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
|
1963
1963
|
]
|
|
1964
1964
|
});
|
|
1965
1965
|
}
|
|
1966
|
-
function
|
|
1967
|
-
let { tenant: y, apiUrl: b } = r(
|
|
1966
|
+
function ht({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s, auto: f, submitLabel: p, nodeRef: m, inert: h, children: g, linked: _, show: v }) {
|
|
1967
|
+
let { tenant: y, apiUrl: b } = r(U), [x, S] = c("form"), [w, T] = c(null), [E, D] = c({}), [O, k] = c(0), A = h ? v || "form" : x;
|
|
1968
1968
|
i(() => {
|
|
1969
1969
|
if (!f || !s) return;
|
|
1970
1970
|
let e = !0;
|
|
@@ -1985,9 +1985,9 @@ function gt({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
|
|
|
1985
1985
|
section: e,
|
|
1986
1986
|
fields: []
|
|
1987
1987
|
}) : j[j.length - 1].fields.push(e);
|
|
1988
|
-
let M = j.filter((e) => e.section || e.fields.length), N = M.filter((e) => !e.section ||
|
|
1988
|
+
let M = j.filter((e) => e.section || e.fields.length), N = M.filter((e) => !e.section || ut(e.section.condition, E)).map((e) => ({
|
|
1989
1989
|
...e,
|
|
1990
|
-
fields: e.fields.filter((e) =>
|
|
1990
|
+
fields: e.fields.filter((e) => ut(e.condition, E))
|
|
1991
1991
|
})), P = M.length > 1, F = Math.min(O, Math.max(0, N.length - 1)), I = P ? N[F]?.fields ?? [] : N.flatMap((e) => e.fields), L = I.filter((e) => {
|
|
1992
1992
|
let t = E[e.name];
|
|
1993
1993
|
return e.required && (t == null || t === "" || t === !1);
|
|
@@ -2045,11 +2045,11 @@ function gt({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
|
|
|
2045
2045
|
}
|
|
2046
2046
|
},
|
|
2047
2047
|
style: {
|
|
2048
|
-
...
|
|
2048
|
+
...ct,
|
|
2049
2049
|
display: A === "success" ? "none" : "flex"
|
|
2050
2050
|
},
|
|
2051
2051
|
children: f && s ? /* @__PURE__ */ d(l, { children: [
|
|
2052
|
-
P && /* @__PURE__ */ u(
|
|
2052
|
+
P && /* @__PURE__ */ u(Ht, {
|
|
2053
2053
|
steps: N.map((e) => ({ label: e.section?.label ?? "Start" })),
|
|
2054
2054
|
active: F + 1,
|
|
2055
2055
|
style: { marginBottom: 8 }
|
|
@@ -2062,7 +2062,7 @@ function gt({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
|
|
|
2062
2062
|
},
|
|
2063
2063
|
children: N[F].section.help
|
|
2064
2064
|
}),
|
|
2065
|
-
I.map((e) => /* @__PURE__ */ u(
|
|
2065
|
+
I.map((e) => /* @__PURE__ */ u(mt, {
|
|
2066
2066
|
field: e,
|
|
2067
2067
|
value: E[e.name],
|
|
2068
2068
|
values: E,
|
|
@@ -2081,7 +2081,7 @@ function gt({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
|
|
|
2081
2081
|
disabled: h || void 0,
|
|
2082
2082
|
onClick: () => k(F - 1),
|
|
2083
2083
|
style: {
|
|
2084
|
-
...
|
|
2084
|
+
...J,
|
|
2085
2085
|
background: "transparent",
|
|
2086
2086
|
color: "inherit",
|
|
2087
2087
|
border: 0,
|
|
@@ -2094,7 +2094,7 @@ function gt({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
|
|
|
2094
2094
|
disabled: h || L.length > 0,
|
|
2095
2095
|
onClick: () => k(F + 1),
|
|
2096
2096
|
style: {
|
|
2097
|
-
...
|
|
2097
|
+
...J,
|
|
2098
2098
|
border: 0,
|
|
2099
2099
|
padding: "10px 22px",
|
|
2100
2100
|
borderRadius: 8,
|
|
@@ -2108,7 +2108,7 @@ function gt({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
|
|
|
2108
2108
|
type: "submit",
|
|
2109
2109
|
disabled: h || void 0,
|
|
2110
2110
|
style: {
|
|
2111
|
-
...
|
|
2111
|
+
...J,
|
|
2112
2112
|
border: 0,
|
|
2113
2113
|
padding: "10px 22px",
|
|
2114
2114
|
borderRadius: 8,
|
|
@@ -2135,10 +2135,10 @@ function gt({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
|
|
|
2135
2135
|
]
|
|
2136
2136
|
});
|
|
2137
2137
|
}
|
|
2138
|
-
var
|
|
2138
|
+
var $ = null, gt = null, _t = (e) => {
|
|
2139
2139
|
let t = typeof e == "string" && e.trim() ? e.trim() : "";
|
|
2140
|
-
if (
|
|
2141
|
-
if (
|
|
2140
|
+
if ($ && gt === t) return $;
|
|
2141
|
+
if ($ && typeof window < "u") {
|
|
2142
2142
|
for (let e of ["grecaptcha", "___grecaptcha_cfg"]) try {
|
|
2143
2143
|
delete window[e];
|
|
2144
2144
|
} catch {
|
|
@@ -2146,22 +2146,22 @@ var Q = null, _t = null, vt = (e) => {
|
|
|
2146
2146
|
}
|
|
2147
2147
|
document.querySelectorAll("script[src*=\"recaptcha\"]").forEach((e) => e.remove());
|
|
2148
2148
|
}
|
|
2149
|
-
return
|
|
2149
|
+
return gt = t, $ = new Promise((e) => {
|
|
2150
2150
|
if (typeof window > "u") return;
|
|
2151
2151
|
if (window.grecaptcha?.render) return e(window.grecaptcha);
|
|
2152
2152
|
window.__webimRecaptchaReady = () => e(window.grecaptcha);
|
|
2153
2153
|
let n = document.createElement("script");
|
|
2154
2154
|
n.src = `https://www.google.com/recaptcha/api.js?onload=__webimRecaptchaReady&render=explicit${t ? `&hl=${encodeURIComponent(t)}` : ""}`, n.async = !0, document.head.appendChild(n);
|
|
2155
|
-
}),
|
|
2155
|
+
}), $;
|
|
2156
2156
|
};
|
|
2157
|
-
function
|
|
2158
|
-
let p = r(
|
|
2157
|
+
function vt({ siteKey: e, theme: t, size: n, hl: a, style: o, nodeRef: c, inert: l, onChange: f }) {
|
|
2158
|
+
let p = r(U), m = p?.settings && typeof p.settings == "object" ? p.settings["google.recaptchaKey"] : "", h = typeof e == "string" && e.trim() || (typeof m == "string" ? m.trim() : ""), g = s(null), _ = s(f);
|
|
2159
2159
|
if (_.current = f, i(() => {
|
|
2160
2160
|
if (l || !h || !g.current) return;
|
|
2161
2161
|
let e = !0, r = (t) => {
|
|
2162
2162
|
e && typeof _.current == "function" && _.current(t);
|
|
2163
2163
|
};
|
|
2164
|
-
return
|
|
2164
|
+
return _t(a).then((i) => {
|
|
2165
2165
|
if (!(!e || !g.current || !i?.render)) {
|
|
2166
2166
|
g.current.innerHTML = "", r("");
|
|
2167
2167
|
try {
|
|
@@ -2243,17 +2243,17 @@ function yt({ siteKey: e, theme: t, size: n, hl: a, style: o, nodeRef: c, inert:
|
|
|
2243
2243
|
children: /* @__PURE__ */ u("div", { ref: g })
|
|
2244
2244
|
}) : null;
|
|
2245
2245
|
}
|
|
2246
|
-
function
|
|
2246
|
+
function yt({ text: e, parts: t, style: n, nodeRef: r, linked: i }) {
|
|
2247
2247
|
return /* @__PURE__ */ u("label", {
|
|
2248
2248
|
ref: r,
|
|
2249
2249
|
style: {
|
|
2250
|
-
...
|
|
2250
|
+
...X,
|
|
2251
2251
|
...C(n)
|
|
2252
2252
|
},
|
|
2253
|
-
children:
|
|
2253
|
+
children: Y(t, e, i)
|
|
2254
2254
|
});
|
|
2255
2255
|
}
|
|
2256
|
-
function
|
|
2256
|
+
function bt({ type: e = "text", name: t, placeholder: n, required: r, style: i, nodeRef: a, inert: o }) {
|
|
2257
2257
|
return /* @__PURE__ */ u("input", {
|
|
2258
2258
|
ref: a,
|
|
2259
2259
|
type: e,
|
|
@@ -2261,13 +2261,13 @@ function xt({ type: e = "text", name: t, placeholder: n, required: r, style: i,
|
|
|
2261
2261
|
placeholder: n,
|
|
2262
2262
|
required: !o && !!r,
|
|
2263
2263
|
style: {
|
|
2264
|
-
...
|
|
2264
|
+
...Z,
|
|
2265
2265
|
...C(i)
|
|
2266
2266
|
},
|
|
2267
|
-
...
|
|
2267
|
+
...Q(o)
|
|
2268
2268
|
});
|
|
2269
2269
|
}
|
|
2270
|
-
function
|
|
2270
|
+
function xt({ name: e, placeholder: t, rows: n = 4, required: r, style: i, nodeRef: a, inert: o }) {
|
|
2271
2271
|
return /* @__PURE__ */ u("textarea", {
|
|
2272
2272
|
ref: a,
|
|
2273
2273
|
name: e || void 0,
|
|
@@ -2275,18 +2275,18 @@ function St({ name: e, placeholder: t, rows: n = 4, required: r, style: i, nodeR
|
|
|
2275
2275
|
rows: n,
|
|
2276
2276
|
required: !o && !!r,
|
|
2277
2277
|
style: {
|
|
2278
|
-
...
|
|
2278
|
+
...Z,
|
|
2279
2279
|
resize: "vertical",
|
|
2280
2280
|
...C(i)
|
|
2281
2281
|
},
|
|
2282
|
-
...
|
|
2282
|
+
...Q(o)
|
|
2283
2283
|
});
|
|
2284
2284
|
}
|
|
2285
|
-
function
|
|
2285
|
+
function St({ kind: e = "checkbox", label: t, name: n, value: r, required: i, style: a, nodeRef: o, inert: s }) {
|
|
2286
2286
|
return /* @__PURE__ */ d("label", {
|
|
2287
2287
|
ref: o,
|
|
2288
2288
|
style: {
|
|
2289
|
-
...
|
|
2289
|
+
...lt,
|
|
2290
2290
|
...C(a)
|
|
2291
2291
|
},
|
|
2292
2292
|
children: [/* @__PURE__ */ u("input", {
|
|
@@ -2303,7 +2303,7 @@ function Ct({ kind: e = "checkbox", label: t, name: n, value: r, required: i, st
|
|
|
2303
2303
|
}), t]
|
|
2304
2304
|
});
|
|
2305
2305
|
}
|
|
2306
|
-
function
|
|
2306
|
+
function Ct({ name: e, placeholder: t, options: n = [], required: r, style: i, nodeRef: a, inert: o }) {
|
|
2307
2307
|
return /* @__PURE__ */ d("select", {
|
|
2308
2308
|
ref: a,
|
|
2309
2309
|
name: e || void 0,
|
|
@@ -2312,7 +2312,7 @@ function wt({ name: e, placeholder: t, options: n = [], required: r, style: i, n
|
|
|
2312
2312
|
onMouseDown: o ? (e) => e.preventDefault() : void 0,
|
|
2313
2313
|
tabIndex: o ? -1 : void 0,
|
|
2314
2314
|
style: {
|
|
2315
|
-
...
|
|
2315
|
+
...Z,
|
|
2316
2316
|
appearance: "auto",
|
|
2317
2317
|
...C(i)
|
|
2318
2318
|
},
|
|
@@ -2326,12 +2326,12 @@ function wt({ name: e, placeholder: t, options: n = [], required: r, style: i, n
|
|
|
2326
2326
|
}, t))]
|
|
2327
2327
|
});
|
|
2328
2328
|
}
|
|
2329
|
-
function
|
|
2329
|
+
function wt({ name: e, accept: t, required: n, text: r = "Choose a file…", style: i, nodeRef: a, inert: o }) {
|
|
2330
2330
|
let [s, l] = c(null);
|
|
2331
2331
|
return /* @__PURE__ */ d("label", {
|
|
2332
2332
|
ref: a,
|
|
2333
2333
|
style: {
|
|
2334
|
-
...
|
|
2334
|
+
...Z,
|
|
2335
2335
|
display: "flex",
|
|
2336
2336
|
alignItems: "center",
|
|
2337
2337
|
gap: "8px",
|
|
@@ -2358,12 +2358,12 @@ function Tt({ name: e, accept: t, required: n, text: r = "Choose a file…", sty
|
|
|
2358
2358
|
]
|
|
2359
2359
|
});
|
|
2360
2360
|
}
|
|
2361
|
-
function
|
|
2361
|
+
function Tt({ text: e = "Submit", style: t, nodeRef: n, inert: r }) {
|
|
2362
2362
|
return /* @__PURE__ */ u("button", {
|
|
2363
2363
|
ref: n,
|
|
2364
2364
|
type: r ? "button" : "submit",
|
|
2365
2365
|
style: {
|
|
2366
|
-
...
|
|
2366
|
+
...J,
|
|
2367
2367
|
border: 0,
|
|
2368
2368
|
cursor: "pointer",
|
|
2369
2369
|
alignSelf: "flex-start",
|
|
@@ -2378,7 +2378,7 @@ function Et({ text: e = "Submit", style: t, nodeRef: n, inert: r }) {
|
|
|
2378
2378
|
children: e
|
|
2379
2379
|
});
|
|
2380
2380
|
}
|
|
2381
|
-
function
|
|
2381
|
+
function Et({ cols: e = 2, rows: t = 1, style: n, nodeRef: r, linked: i }) {
|
|
2382
2382
|
let a = Math.max(1, (Number(e) || 1) * (Number(t) || 1));
|
|
2383
2383
|
return /* @__PURE__ */ u("div", {
|
|
2384
2384
|
ref: r,
|
|
@@ -2395,8 +2395,8 @@ function Dt({ cols: e = 2, rows: t = 1, style: n, nodeRef: r, linked: i }) {
|
|
|
2395
2395
|
}, t))
|
|
2396
2396
|
});
|
|
2397
2397
|
}
|
|
2398
|
-
function
|
|
2399
|
-
let { tenant: v, apiUrl: y, locale: b } = r(
|
|
2398
|
+
function Dt({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, imageField: o, titleField: s = "name", textField: l, custom: f, templateId: p, paged: m, filters: h, style: g, nodeRef: _ }) {
|
|
2399
|
+
let { tenant: v, apiUrl: y, locale: b } = r(U), x = r(pe), S = r(W), [, w] = c(0);
|
|
2400
2400
|
i(() => {
|
|
2401
2401
|
if (typeof window > "u") return;
|
|
2402
2402
|
let e = () => w((e) => e + 1);
|
|
@@ -2404,7 +2404,7 @@ function Ot({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, i
|
|
|
2404
2404
|
window.removeEventListener("popstate", e), window.removeEventListener("webim:urlchange", e);
|
|
2405
2405
|
};
|
|
2406
2406
|
}, []);
|
|
2407
|
-
let T =
|
|
2407
|
+
let T = fe(h), E = JSON.stringify(T), D = E !== "{}" && !e?.startsWith?.("api:"), O = D ? null : S?.[e], k = m ? G(S) : 1, [A, j] = c(null);
|
|
2408
2408
|
if (i(() => {
|
|
2409
2409
|
if (!e || O) return;
|
|
2410
2410
|
let n = !0, r = new URLSearchParams();
|
|
@@ -2449,7 +2449,7 @@ function Ot({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, i
|
|
|
2449
2449
|
},
|
|
2450
2450
|
children: N.map((e) => /* @__PURE__ */ u("div", {
|
|
2451
2451
|
style: { minWidth: 0 },
|
|
2452
|
-
children: x.render(p, (t) =>
|
|
2452
|
+
children: x.render(p, (t) => ge(t, e))
|
|
2453
2453
|
}, e.id ?? e?.data?.slug))
|
|
2454
2454
|
}) : /* @__PURE__ */ u("div", {
|
|
2455
2455
|
ref: _,
|
|
@@ -2459,7 +2459,7 @@ function Ot({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, i
|
|
|
2459
2459
|
...C(g)
|
|
2460
2460
|
},
|
|
2461
2461
|
children: N.map((e) => {
|
|
2462
|
-
let t = o ?
|
|
2462
|
+
let t = o ? K(e?.data, o) : null, r = s ? q(K(e?.data, s)) : null, i = l ? K(e?.data, l) : null, a = Array.isArray(i) ? i : null, c = a || i == null ? null : q(i), f = n === "list";
|
|
2463
2463
|
return /* @__PURE__ */ d("div", {
|
|
2464
2464
|
style: {
|
|
2465
2465
|
display: "flex",
|
|
@@ -2506,7 +2506,7 @@ function Ot({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, i
|
|
|
2506
2506
|
lineHeight: 1.55,
|
|
2507
2507
|
opacity: .85
|
|
2508
2508
|
},
|
|
2509
|
-
children:
|
|
2509
|
+
children: Me(a)
|
|
2510
2510
|
})
|
|
2511
2511
|
]
|
|
2512
2512
|
})]
|
|
@@ -2514,8 +2514,8 @@ function Ot({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, i
|
|
|
2514
2514
|
})
|
|
2515
2515
|
});
|
|
2516
2516
|
}
|
|
2517
|
-
function
|
|
2518
|
-
let a = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && typeof e.name == "string" && e.name) : [], o = i ? {} :
|
|
2517
|
+
function Ot({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, inert: i }) {
|
|
2518
|
+
let a = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && typeof e.name == "string" && e.name) : [], o = i ? {} : de(), s = {
|
|
2519
2519
|
height: 34,
|
|
2520
2520
|
padding: "0 12px",
|
|
2521
2521
|
borderRadius: 8,
|
|
@@ -2563,7 +2563,7 @@ function kt({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, i
|
|
|
2563
2563
|
name: `f_${e.name}`,
|
|
2564
2564
|
defaultValue: o[e.name] ?? "",
|
|
2565
2565
|
style: s,
|
|
2566
|
-
...
|
|
2566
|
+
...Q(i),
|
|
2567
2567
|
children: [/* @__PURE__ */ u("option", {
|
|
2568
2568
|
value: "",
|
|
2569
2569
|
children: e.label || e.name
|
|
@@ -2578,7 +2578,7 @@ function kt({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, i
|
|
|
2578
2578
|
name: `f_${e.name}`,
|
|
2579
2579
|
defaultValue: o[e.name] ?? "",
|
|
2580
2580
|
style: s,
|
|
2581
|
-
...
|
|
2581
|
+
...Q(i),
|
|
2582
2582
|
children: [
|
|
2583
2583
|
/* @__PURE__ */ u("option", {
|
|
2584
2584
|
value: "",
|
|
@@ -2599,7 +2599,7 @@ function kt({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, i
|
|
|
2599
2599
|
defaultValue: o[e.name] ?? "",
|
|
2600
2600
|
placeholder: e.label || e.name,
|
|
2601
2601
|
style: s,
|
|
2602
|
-
...
|
|
2602
|
+
...Q(i)
|
|
2603
2603
|
}, e.name)), /* @__PURE__ */ u("button", {
|
|
2604
2604
|
type: "submit",
|
|
2605
2605
|
style: {
|
|
@@ -2612,12 +2612,12 @@ function kt({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, i
|
|
|
2612
2612
|
fontWeight: 600,
|
|
2613
2613
|
cursor: i ? "default" : "pointer"
|
|
2614
2614
|
},
|
|
2615
|
-
...
|
|
2615
|
+
...Q(i),
|
|
2616
2616
|
children: t
|
|
2617
2617
|
})]
|
|
2618
2618
|
});
|
|
2619
2619
|
}
|
|
2620
|
-
function
|
|
2620
|
+
function kt({ items: e = [], separator: t = "/", style: n, nodeRef: r }) {
|
|
2621
2621
|
return e.length ? /* @__PURE__ */ u("nav", {
|
|
2622
2622
|
ref: r,
|
|
2623
2623
|
"aria-label": "Breadcrumb",
|
|
@@ -2667,8 +2667,8 @@ function At({ items: e = [], separator: t = "/", style: n, nodeRef: r }) {
|
|
|
2667
2667
|
})
|
|
2668
2668
|
}) : null;
|
|
2669
2669
|
}
|
|
2670
|
-
function
|
|
2671
|
-
let { tenant: g, apiUrl: _ } = r(
|
|
2670
|
+
function At({ 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: h }) {
|
|
2671
|
+
let { tenant: g, apiUrl: _ } = r(U), v = r(W), [y, b] = c(null), x = o ? Number(v?.[`${o}:total`]) : NaN;
|
|
2672
2672
|
i(() => {
|
|
2673
2673
|
if (!o || Number.isFinite(x)) return;
|
|
2674
2674
|
let e = !0, t = o.startsWith("api:") ? `${_}/data/${encodeURIComponent(o.slice(4))}` : `${_}/dynamic/${encodeURIComponent(o)}?limit=1`;
|
|
@@ -2687,7 +2687,7 @@ function jt({ pages: e = 5, current: t = 1, prevNext: n = !0, href: a = "#", sou
|
|
|
2687
2687
|
]);
|
|
2688
2688
|
let S = Math.max(1, Number(s) || 6), w = Number.isFinite(x) ? x : y;
|
|
2689
2689
|
if (o && w === null || o && f && !(w > 0)) return null;
|
|
2690
|
-
let T = Math.min(Math.max(o ? Math.ceil(w / S) : Number(e) || 1, 1), 50), E = Math.min(Math.max(o ?
|
|
2690
|
+
let T = Math.min(Math.max(o ? Math.ceil(w / S) : Number(e) || 1, 1), 50), E = Math.min(Math.max(o ? G(v) : Number(t) || 1, 1), T), D = (e) => {
|
|
2691
2691
|
if (o) {
|
|
2692
2692
|
if (typeof window < "u") {
|
|
2693
2693
|
let t = new URLSearchParams(window.location.search);
|
|
@@ -2752,15 +2752,15 @@ function jt({ pages: e = 5, current: t = 1, prevNext: n = !0, href: a = "#", sou
|
|
|
2752
2752
|
]
|
|
2753
2753
|
});
|
|
2754
2754
|
}
|
|
2755
|
-
var
|
|
2755
|
+
var jt = "webim.page_mode", Mt = () => {
|
|
2756
2756
|
if (typeof window > "u") return "auto";
|
|
2757
2757
|
try {
|
|
2758
|
-
let e = window.localStorage.getItem(
|
|
2758
|
+
let e = window.localStorage.getItem(jt);
|
|
2759
2759
|
return e === "light" || e === "dark" ? e : "auto";
|
|
2760
2760
|
} catch {
|
|
2761
2761
|
return "auto";
|
|
2762
2762
|
}
|
|
2763
|
-
},
|
|
2763
|
+
}, Nt = (e) => {
|
|
2764
2764
|
let t = {
|
|
2765
2765
|
width: 16,
|
|
2766
2766
|
height: 16,
|
|
@@ -2792,13 +2792,13 @@ var Mt = "webim.page_mode", Nt = () => {
|
|
|
2792
2792
|
rx: "2"
|
|
2793
2793
|
}), /* @__PURE__ */ u("path", { d: "M8 21h8M12 17v4" })]
|
|
2794
2794
|
});
|
|
2795
|
-
},
|
|
2795
|
+
}, Pt = {
|
|
2796
2796
|
light: "Light theme",
|
|
2797
2797
|
dark: "Dark theme",
|
|
2798
2798
|
auto: "Follow the device theme"
|
|
2799
2799
|
};
|
|
2800
2800
|
function Ft({ variant: e, showSystem: t, style: n, nodeRef: r, inert: a }) {
|
|
2801
|
-
let [o, l] = c(a ? "auto" :
|
|
2801
|
+
let [o, l] = c(a ? "auto" : Mt), d = s(null), f = (e) => {
|
|
2802
2802
|
d.current = e, typeof r == "function" && r(e);
|
|
2803
2803
|
};
|
|
2804
2804
|
i(() => {
|
|
@@ -2806,7 +2806,7 @@ function Ft({ variant: e, showSystem: t, style: n, nodeRef: r, inert: a }) {
|
|
|
2806
2806
|
let e = d.current?.closest?.(".webim-page");
|
|
2807
2807
|
e && (o === "light" || o === "dark" ? e.setAttribute("data-webim-mode", o) : e.removeAttribute("data-webim-mode"));
|
|
2808
2808
|
try {
|
|
2809
|
-
o === "auto" ? window.localStorage.removeItem(
|
|
2809
|
+
o === "auto" ? window.localStorage.removeItem(jt) : window.localStorage.setItem(jt, o);
|
|
2810
2810
|
} catch {}
|
|
2811
2811
|
}, [o, a]);
|
|
2812
2812
|
let p = t === !1 ? ["light", "dark"] : [
|
|
@@ -2841,8 +2841,8 @@ function Ft({ variant: e, showSystem: t, style: n, nodeRef: r, inert: a }) {
|
|
|
2841
2841
|
},
|
|
2842
2842
|
children: p.map((e) => /* @__PURE__ */ u("button", {
|
|
2843
2843
|
type: "button",
|
|
2844
|
-
title:
|
|
2845
|
-
"aria-label":
|
|
2844
|
+
title: Pt[e],
|
|
2845
|
+
"aria-label": Pt[e],
|
|
2846
2846
|
"aria-pressed": e === m,
|
|
2847
2847
|
onClick: a ? void 0 : () => l(e),
|
|
2848
2848
|
style: {
|
|
@@ -2853,15 +2853,15 @@ function Ft({ variant: e, showSystem: t, style: n, nodeRef: r, inert: a }) {
|
|
|
2853
2853
|
background: e === m ? "var(--page-accent, #111827)" : "transparent",
|
|
2854
2854
|
opacity: e === m ? 1 : .7
|
|
2855
2855
|
},
|
|
2856
|
-
children:
|
|
2856
|
+
children: Nt(e)
|
|
2857
2857
|
}, e))
|
|
2858
2858
|
});
|
|
2859
2859
|
let g = p[(p.indexOf(m) + 1) % p.length];
|
|
2860
2860
|
return /* @__PURE__ */ u("button", {
|
|
2861
2861
|
ref: f,
|
|
2862
2862
|
type: "button",
|
|
2863
|
-
title:
|
|
2864
|
-
"aria-label": `Theme: ${
|
|
2863
|
+
title: Pt[m],
|
|
2864
|
+
"aria-label": `Theme: ${Pt[m]} — switch to ${Pt[g]}`,
|
|
2865
2865
|
onClick: a ? void 0 : () => l(g),
|
|
2866
2866
|
style: {
|
|
2867
2867
|
...h,
|
|
@@ -2870,10 +2870,121 @@ function Ft({ variant: e, showSystem: t, style: n, nodeRef: r, inert: a }) {
|
|
|
2870
2870
|
border: "1px solid rgba(148, 163, 184, 0.4)",
|
|
2871
2871
|
...C(n)
|
|
2872
2872
|
},
|
|
2873
|
-
children:
|
|
2873
|
+
children: Nt(m)
|
|
2874
2874
|
});
|
|
2875
2875
|
}
|
|
2876
|
-
|
|
2876
|
+
function It(e) {
|
|
2877
|
+
let t = e?.parentElement;
|
|
2878
|
+
for (; t && t !== document.body;) {
|
|
2879
|
+
let e = getComputedStyle(t).overflowY;
|
|
2880
|
+
if ((e === "auto" || e === "scroll") && t.scrollHeight > t.clientHeight) return t;
|
|
2881
|
+
t = t.parentElement;
|
|
2882
|
+
}
|
|
2883
|
+
return window;
|
|
2884
|
+
}
|
|
2885
|
+
var Lt = (e) => e === window ? window.scrollY : e.scrollTop, Rt = {
|
|
2886
|
+
"bottom-right": (e) => ({
|
|
2887
|
+
right: e,
|
|
2888
|
+
bottom: e
|
|
2889
|
+
}),
|
|
2890
|
+
"bottom-left": (e) => ({
|
|
2891
|
+
left: e,
|
|
2892
|
+
bottom: e
|
|
2893
|
+
}),
|
|
2894
|
+
"bottom-center": (e) => ({
|
|
2895
|
+
left: "50%",
|
|
2896
|
+
bottom: e,
|
|
2897
|
+
transform: "translateX(-50%)"
|
|
2898
|
+
})
|
|
2899
|
+
};
|
|
2900
|
+
function zt({ variant: e, label: t, position: n, offset: r, showAfter: a, smooth: o, bg: s, fg: l, style: f, nodeRef: p, inert: m, frame: h }) {
|
|
2901
|
+
let [g, _] = c(!!m), [v, y] = c(null), b = (e) => {
|
|
2902
|
+
y(e), typeof p == "function" && p(e);
|
|
2903
|
+
};
|
|
2904
|
+
i(() => {
|
|
2905
|
+
if (m || !v) return;
|
|
2906
|
+
let e = It(v), t = Number(a) >= 0 ? Number(a) : 300, n = () => _(Lt(e) > t);
|
|
2907
|
+
return n(), e.addEventListener("scroll", n, { passive: !0 }), () => e.removeEventListener("scroll", n);
|
|
2908
|
+
}, [
|
|
2909
|
+
m,
|
|
2910
|
+
v,
|
|
2911
|
+
a
|
|
2912
|
+
]);
|
|
2913
|
+
let x = () => {
|
|
2914
|
+
if (m) return;
|
|
2915
|
+
let e = It(v), t = window.matchMedia?.("(prefers-reduced-motion: reduce)").matches, n = o === !1 || t ? "auto" : "smooth";
|
|
2916
|
+
e === window ? window.scrollTo({
|
|
2917
|
+
top: 0,
|
|
2918
|
+
behavior: n
|
|
2919
|
+
}) : e.scrollTo({
|
|
2920
|
+
top: 0,
|
|
2921
|
+
behavior: n
|
|
2922
|
+
});
|
|
2923
|
+
}, S = Number(r) >= 0 ? Number(r) : 24, w = e === "pill", T = t || "Top", E = Rt[n] ? n : "bottom-right", D = h ? {
|
|
2924
|
+
position: "fixed",
|
|
2925
|
+
zIndex: 5,
|
|
2926
|
+
bottom: (h.bottom ?? 0) + S,
|
|
2927
|
+
...E === "bottom-left" ? { left: (h.left ?? 0) + S } : null,
|
|
2928
|
+
...E === "bottom-right" ? { right: (h.right ?? 0) + S } : null,
|
|
2929
|
+
...E === "bottom-center" ? {
|
|
2930
|
+
left: (h.left ?? 0) + (h.width ?? 0) / 2,
|
|
2931
|
+
transform: "translateX(-50%)"
|
|
2932
|
+
} : null
|
|
2933
|
+
} : {
|
|
2934
|
+
position: "fixed",
|
|
2935
|
+
zIndex: 2147482e3,
|
|
2936
|
+
...Rt[E](S)
|
|
2937
|
+
};
|
|
2938
|
+
return /* @__PURE__ */ d("button", {
|
|
2939
|
+
ref: b,
|
|
2940
|
+
type: "button",
|
|
2941
|
+
title: T,
|
|
2942
|
+
"aria-label": T,
|
|
2943
|
+
"aria-hidden": !g,
|
|
2944
|
+
tabIndex: g ? 0 : -1,
|
|
2945
|
+
onClick: x,
|
|
2946
|
+
style: {
|
|
2947
|
+
display: "inline-flex",
|
|
2948
|
+
alignItems: "center",
|
|
2949
|
+
justifyContent: "center",
|
|
2950
|
+
gap: w ? 8 : 0,
|
|
2951
|
+
appearance: "none",
|
|
2952
|
+
font: "inherit",
|
|
2953
|
+
fontSize: 14,
|
|
2954
|
+
fontWeight: 600,
|
|
2955
|
+
width: w ? "auto" : 44,
|
|
2956
|
+
height: 44,
|
|
2957
|
+
padding: w ? "0 18px" : 0,
|
|
2958
|
+
borderRadius: 999,
|
|
2959
|
+
border: "1px solid transparent",
|
|
2960
|
+
background: s || "var(--page-accent, #111827)",
|
|
2961
|
+
color: l || "var(--page-accent-text, #ffffff)",
|
|
2962
|
+
boxShadow: "0 6px 20px rgba(15, 23, 42, 0.25)",
|
|
2963
|
+
cursor: m ? "default" : "pointer",
|
|
2964
|
+
opacity: +!!g,
|
|
2965
|
+
pointerEvents: g ? "auto" : "none",
|
|
2966
|
+
transition: "opacity 160ms ease, transform 160ms ease",
|
|
2967
|
+
...D,
|
|
2968
|
+
...C(f),
|
|
2969
|
+
...D.transform ? { transform: D.transform } : null
|
|
2970
|
+
},
|
|
2971
|
+
children: [/* @__PURE__ */ u("svg", {
|
|
2972
|
+
width: "18",
|
|
2973
|
+
height: "18",
|
|
2974
|
+
viewBox: "0 0 24 24",
|
|
2975
|
+
fill: "none",
|
|
2976
|
+
"aria-hidden": "true",
|
|
2977
|
+
children: /* @__PURE__ */ u("path", {
|
|
2978
|
+
d: "M12 19V5M12 5l-7 7M12 5l7 7",
|
|
2979
|
+
stroke: "currentColor",
|
|
2980
|
+
strokeWidth: "2",
|
|
2981
|
+
strokeLinecap: "round",
|
|
2982
|
+
strokeLinejoin: "round"
|
|
2983
|
+
})
|
|
2984
|
+
}), w ? /* @__PURE__ */ u("span", { children: T }) : null]
|
|
2985
|
+
});
|
|
2986
|
+
}
|
|
2987
|
+
var Bt = {
|
|
2877
2988
|
facebook: {
|
|
2878
2989
|
label: "Facebook",
|
|
2879
2990
|
color: "#1877f2",
|
|
@@ -2940,8 +3051,8 @@ var It = {
|
|
|
2940
3051
|
d: "M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm6.93 6h-2.95c-.32-1.25-.78-2.45-1.38-3.56 1.84.63 3.37 1.91 4.33 3.56zM12 4.04c.83 1.2 1.48 2.53 1.91 3.96h-3.82c.43-1.43 1.08-2.76 1.91-3.96zM4.26 14C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2 0 .68.06 1.34.14 2H4.26zm.82 2h2.95c.32 1.25.78 2.45 1.38 3.56-1.84-.63-3.37-1.9-4.33-3.56zm2.95-8H5.08c.96-1.66 2.49-2.93 4.33-3.56C8.81 5.55 8.35 6.75 8.03 8zM12 19.96c-.83-1.2-1.48-2.53-1.91-3.96h3.82c-.43 1.43-1.08 2.76-1.91 3.96zM14.34 14H9.66c-.09-.66-.16-1.32-.16-2 0-.68.07-1.35.16-2h4.68c.09.65.16 1.32.16 2 0 .68-.07 1.34-.16 2zm.25 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95c-.96 1.65-2.49 2.93-4.33 3.56zM16.36 14c.08-.66.14-1.32.14-2 0-.68-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2h-3.38z"
|
|
2941
3052
|
}
|
|
2942
3053
|
};
|
|
2943
|
-
function
|
|
2944
|
-
let l = Array.isArray(e) ? e.filter((e) => e &&
|
|
3054
|
+
function Vt({ links: e = [], variant: t, color: n, size: r, gap: i, newTab: a, style: o, nodeRef: s, inert: c }) {
|
|
3055
|
+
let l = Array.isArray(e) ? e.filter((e) => e && Bt[e.network]) : [];
|
|
2945
3056
|
if (!l.length) return null;
|
|
2946
3057
|
let d = Math.min(Math.max(Number(r) || 18, 10), 64), f = Math.round(d * 1.9), p = Number.isFinite(Number(i)) ? Number(i) : 10, m = (e) => n === "accent" ? "var(--page-accent, #111827)" : n === "inherit" ? "currentColor" : e.color, h = c ? (e) => e.preventDefault() : void 0;
|
|
2947
3058
|
return /* @__PURE__ */ u("div", {
|
|
@@ -2954,7 +3065,7 @@ function Lt({ links: e = [], variant: t, color: n, size: r, gap: i, newTab: a, s
|
|
|
2954
3065
|
...C(o)
|
|
2955
3066
|
},
|
|
2956
3067
|
children: l.map((e, r) => {
|
|
2957
|
-
let i =
|
|
3068
|
+
let i = Bt[e.network], o = t !== "outline" && t !== "plain", s = o ? n === "accent" ? "var(--page-accent-text, #ffffff)" : n === "inherit" ? "var(--page-bg, #ffffff)" : "#ffffff" : m(i);
|
|
2958
3069
|
return /* @__PURE__ */ u("a", {
|
|
2959
3070
|
href: e.url || "#",
|
|
2960
3071
|
onClick: h,
|
|
@@ -2988,7 +3099,7 @@ function Lt({ links: e = [], variant: t, color: n, size: r, gap: i, newTab: a, s
|
|
|
2988
3099
|
})
|
|
2989
3100
|
});
|
|
2990
3101
|
}
|
|
2991
|
-
function
|
|
3102
|
+
function Ht({ steps: t = [], active: n = 1, vertical: r = !1, style: i, nodeRef: a }) {
|
|
2992
3103
|
if (!t.length) return null;
|
|
2993
3104
|
let o = Math.min(Math.max(Number(n) || 1, 1), t.length), s = (e) => ({
|
|
2994
3105
|
width: 32,
|
|
@@ -3066,7 +3177,7 @@ function Rt({ steps: t = [], active: n = 1, vertical: r = !1, style: i, nodeRef:
|
|
|
3066
3177
|
})
|
|
3067
3178
|
});
|
|
3068
3179
|
}
|
|
3069
|
-
var
|
|
3180
|
+
var Ut = {
|
|
3070
3181
|
small: {
|
|
3071
3182
|
w: 132,
|
|
3072
3183
|
h: 46,
|
|
@@ -3088,10 +3199,10 @@ var zt = {
|
|
|
3088
3199
|
title: 12.5,
|
|
3089
3200
|
avatar: 46
|
|
3090
3201
|
}
|
|
3091
|
-
},
|
|
3092
|
-
|
|
3093
|
-
function
|
|
3094
|
-
let r =
|
|
3202
|
+
}, Wt = (e) => Ut[e] ?? Ut.medium;
|
|
3203
|
+
Ut.medium.w, Ut.medium.h;
|
|
3204
|
+
function Gt(e, { size: t = "medium", horizontal: n = !1 } = {}) {
|
|
3205
|
+
let r = Wt(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 = [];
|
|
3095
3206
|
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);
|
|
3096
3207
|
let d = /* @__PURE__ */ new Map(), f = (e, t) => {
|
|
3097
3208
|
if (t.has(e.id)) return 0;
|
|
@@ -3143,19 +3254,19 @@ function Vt(e, { size: t = "medium", horizontal: n = !1 } = {}) {
|
|
|
3143
3254
|
horizontal: n
|
|
3144
3255
|
};
|
|
3145
3256
|
}
|
|
3146
|
-
var
|
|
3257
|
+
var Kt = (e, t) => {
|
|
3147
3258
|
let n = String(e ?? "");
|
|
3148
3259
|
return n.length > t ? `${n.slice(0, t - 1)}…` : n;
|
|
3149
|
-
},
|
|
3260
|
+
}, qt = (e) => {
|
|
3150
3261
|
let t = /^#([0-9a-f]{6}|[0-9a-f]{3})$/i.exec(String(e ?? "").trim());
|
|
3151
3262
|
if (!t) return "#ffffff";
|
|
3152
3263
|
let n = t[1];
|
|
3153
3264
|
n.length === 3 && (n = [...n].map((e) => e + e).join(""));
|
|
3154
3265
|
let r = parseInt(n, 16);
|
|
3155
3266
|
return .299 * (r >> 16 & 255) + .587 * (r >> 8 & 255) + .114 * (r & 255) > 150 ? "#111827" : "#ffffff";
|
|
3156
|
-
},
|
|
3157
|
-
function
|
|
3158
|
-
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 ? "" :
|
|
3267
|
+
}, Jt = (e) => !!(e?.cv?.trim?.() || e?.photo);
|
|
3268
|
+
function Yt(e, t = {}) {
|
|
3269
|
+
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 ? "" : q(e);
|
|
3159
3270
|
return n.map((e) => {
|
|
3160
3271
|
let n = e.data ?? {}, a = r(n[t.parentField]), o = a && typeof a == "object" ? a.id ?? null : a || null;
|
|
3161
3272
|
return {
|
|
@@ -3169,11 +3280,11 @@ function Gt(e, t = {}) {
|
|
|
3169
3280
|
};
|
|
3170
3281
|
});
|
|
3171
3282
|
}
|
|
3172
|
-
var
|
|
3283
|
+
var Xt = {
|
|
3173
3284
|
size: 36,
|
|
3174
3285
|
pad: 10
|
|
3175
3286
|
};
|
|
3176
|
-
function
|
|
3287
|
+
function Zt({ node: e, onClose: t }) {
|
|
3177
3288
|
return i(() => {
|
|
3178
3289
|
let e = (e) => e.key === "Escape" && t();
|
|
3179
3290
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
@@ -3294,8 +3405,8 @@ function qt({ node: e, onClose: t }) {
|
|
|
3294
3405
|
})
|
|
3295
3406
|
});
|
|
3296
3407
|
}
|
|
3297
|
-
function
|
|
3298
|
-
let b = a(), [x, S] = c(null), { tenant: w, apiUrl: T } = r(
|
|
3408
|
+
function Qt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField: s, parentField: f, cvField: p, hrefField: m, size: h = "medium", horizontal: g = !1, style: _, nodeRef: v, interactive: y = !0 }) {
|
|
3409
|
+
let b = a(), [x, S] = c(null), { tenant: w, apiUrl: T } = r(U), E = r(W)?.[t], [D, O] = c(null);
|
|
3299
3410
|
i(() => {
|
|
3300
3411
|
if (!t || E) return;
|
|
3301
3412
|
let e = !0;
|
|
@@ -3311,14 +3422,14 @@ function Jt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
|
|
|
3311
3422
|
T,
|
|
3312
3423
|
E
|
|
3313
3424
|
]);
|
|
3314
|
-
let k = t ?
|
|
3425
|
+
let k = t ? Yt(E ?? D ?? [], {
|
|
3315
3426
|
nameField: n,
|
|
3316
3427
|
titleField: o,
|
|
3317
3428
|
photoField: s,
|
|
3318
3429
|
parentField: f,
|
|
3319
3430
|
cvField: p,
|
|
3320
3431
|
hrefField: m
|
|
3321
|
-
}) : e, A =
|
|
3432
|
+
}) : e, A = Wt(h), { boxes: j, links: M, width: N, height: P } = Gt(k, {
|
|
3322
3433
|
size: h,
|
|
3323
3434
|
horizontal: g
|
|
3324
3435
|
});
|
|
@@ -3364,7 +3475,7 @@ function Jt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
|
|
|
3364
3475
|
stroke: "rgba(148, 163, 184, 0.7)",
|
|
3365
3476
|
strokeWidth: "1.5"
|
|
3366
3477
|
}, t)), j.map(({ node: e, x: t, y: n }) => {
|
|
3367
|
-
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 ?
|
|
3478
|
+
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 ? qt(e.color) : r ? "var(--page-accent-text, #ffffff)" : "var(--page-text, #111827)", c = i ? qt(e.color2) : s, f = y && (Jt(e) || e.href), p = () => Jt(e) ? S(e) : window.open(e.href, "_blank", "noreferrer"), m = e.photo ? t + Xt.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);
|
|
3368
3479
|
return /* @__PURE__ */ d("g", {
|
|
3369
3480
|
onClick: f ? p : void 0,
|
|
3370
3481
|
style: f ? { cursor: "pointer" } : void 0,
|
|
@@ -3428,13 +3539,13 @@ function Jt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
|
|
|
3428
3539
|
e.photo && /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("clipPath", {
|
|
3429
3540
|
id: `${b}-${e.id}`,
|
|
3430
3541
|
children: /* @__PURE__ */ u("circle", {
|
|
3431
|
-
cx: t +
|
|
3542
|
+
cx: t + Xt.pad + A.avatar / 2,
|
|
3432
3543
|
cy: n + A.h / 2,
|
|
3433
3544
|
r: A.avatar / 2
|
|
3434
3545
|
})
|
|
3435
3546
|
}), /* @__PURE__ */ u("image", {
|
|
3436
3547
|
href: e.photo,
|
|
3437
|
-
x: t +
|
|
3548
|
+
x: t + Xt.pad,
|
|
3438
3549
|
y: n + (A.h - A.avatar) / 2,
|
|
3439
3550
|
width: A.avatar,
|
|
3440
3551
|
height: A.avatar,
|
|
@@ -3448,7 +3559,7 @@ function Jt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
|
|
|
3448
3559
|
fontSize: A.title,
|
|
3449
3560
|
fontWeight: "600",
|
|
3450
3561
|
fill: s,
|
|
3451
|
-
children:
|
|
3562
|
+
children: Kt(e.title, g + 4)
|
|
3452
3563
|
}), e.name && /* @__PURE__ */ u("text", {
|
|
3453
3564
|
x: m,
|
|
3454
3565
|
y: n + _ + _ / 2 + A.name * .35,
|
|
@@ -3456,7 +3567,7 @@ function Jt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
|
|
|
3456
3567
|
fontSize: A.name,
|
|
3457
3568
|
fontWeight: "600",
|
|
3458
3569
|
fill: c,
|
|
3459
|
-
children:
|
|
3570
|
+
children: Kt(e.name, g)
|
|
3460
3571
|
})] }) : /* @__PURE__ */ d(l, { children: [v[0] && /* @__PURE__ */ u("text", {
|
|
3461
3572
|
x: m,
|
|
3462
3573
|
y: n + (v[1] ? A.h * .43 : A.h * .57),
|
|
@@ -3464,7 +3575,7 @@ function Jt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
|
|
|
3464
3575
|
fontSize: A.name,
|
|
3465
3576
|
fontWeight: "600",
|
|
3466
3577
|
fill: s,
|
|
3467
|
-
children:
|
|
3578
|
+
children: Kt(v[0], g)
|
|
3468
3579
|
}), v[1] && /* @__PURE__ */ u("text", {
|
|
3469
3580
|
x: m,
|
|
3470
3581
|
y: n + A.h * .73,
|
|
@@ -3472,19 +3583,19 @@ function Jt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
|
|
|
3472
3583
|
fontSize: A.title,
|
|
3473
3584
|
opacity: "0.7",
|
|
3474
3585
|
fill: s,
|
|
3475
|
-
children:
|
|
3586
|
+
children: Kt(v[1], g + 4)
|
|
3476
3587
|
})] })
|
|
3477
3588
|
]
|
|
3478
3589
|
}, e.id);
|
|
3479
3590
|
})]
|
|
3480
|
-
}), x && /* @__PURE__ */ u(
|
|
3591
|
+
}), x && /* @__PURE__ */ u(Zt, {
|
|
3481
3592
|
node: x,
|
|
3482
3593
|
onClose: () => S(null)
|
|
3483
3594
|
})]
|
|
3484
3595
|
});
|
|
3485
3596
|
}
|
|
3486
|
-
function
|
|
3487
|
-
let { tenant: g, apiUrl: _ } = r(
|
|
3597
|
+
function $t({ 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: h }) {
|
|
3598
|
+
let { tenant: g, apiUrl: _ } = r(U), v = r(W), y = v?.[n], b = f ? G(v) : 1, [x, S] = c(null);
|
|
3488
3599
|
if (i(() => {
|
|
3489
3600
|
if (!n || y) return;
|
|
3490
3601
|
let e = !0, t = Math.max(1, Number(a) || 10), r = f && !n.startsWith("api:") ? `?offset=${(b - 1) * t}&limit=${t}` : "", i = n.startsWith("api:") ? `${_}/data/${encodeURIComponent(n.slice(4))}` : `${_}/dynamic/${encodeURIComponent(n)}${r}`;
|
|
@@ -3503,7 +3614,7 @@ function Yt({ columns: e = [], rows: t = [], source: n, limit: a = 10, striped:
|
|
|
3503
3614
|
b,
|
|
3504
3615
|
a
|
|
3505
3616
|
]), !e.length) return null;
|
|
3506
|
-
let w = Math.max(1, Number(a) || 10), T = n ? f ? y || n.startsWith("api:") ? (y ?? x ?? []).slice((b - 1) * w, b * w) : (x ?? []).slice(0, w) : (y ?? x ?? []).slice(0, w) : null, E = T ? T.map((t) => e.map((e) => K(
|
|
3617
|
+
let w = Math.max(1, Number(a) || 10), T = n ? f ? y || n.startsWith("api:") ? (y ?? x ?? []).slice((b - 1) * w, b * w) : (x ?? []).slice(0, w) : (y ?? x ?? []).slice(0, w) : null, E = T ? T.map((t) => e.map((e) => q(K(t?.data, e.field)))) : t, D = !!n && !(n && !y && x === 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 };
|
|
3507
3618
|
return /* @__PURE__ */ u("div", {
|
|
3508
3619
|
ref: h,
|
|
3509
3620
|
style: {
|
|
@@ -3549,79 +3660,80 @@ function Yt({ columns: e = [], rows: t = [], source: n, limit: a = 10, striped:
|
|
|
3549
3660
|
})
|
|
3550
3661
|
});
|
|
3551
3662
|
}
|
|
3552
|
-
var
|
|
3553
|
-
PageRoot:
|
|
3554
|
-
Section:
|
|
3555
|
-
Container:
|
|
3556
|
-
Heading:
|
|
3557
|
-
TextBlock:
|
|
3558
|
-
ButtonBlock:
|
|
3559
|
-
ImageBlock:
|
|
3560
|
-
Spacer:
|
|
3561
|
-
Divider:
|
|
3562
|
-
SliderBlock:
|
|
3563
|
-
CanvasSlider:
|
|
3564
|
-
TabsBlock:
|
|
3565
|
-
QuickStack:
|
|
3566
|
-
CollectionList:
|
|
3567
|
-
CollectionSearch:
|
|
3568
|
-
BreadcrumbsBlock:
|
|
3569
|
-
PaginationBlock:
|
|
3570
|
-
StepperBlock:
|
|
3571
|
-
SocialLinksBlock:
|
|
3663
|
+
var en = {
|
|
3664
|
+
PageRoot: Ce,
|
|
3665
|
+
Section: we,
|
|
3666
|
+
Container: Te,
|
|
3667
|
+
Heading: Ee,
|
|
3668
|
+
TextBlock: Le,
|
|
3669
|
+
ButtonBlock: Be,
|
|
3670
|
+
ImageBlock: Ve,
|
|
3671
|
+
Spacer: qe,
|
|
3672
|
+
Divider: Je,
|
|
3673
|
+
SliderBlock: et,
|
|
3674
|
+
CanvasSlider: tt,
|
|
3675
|
+
TabsBlock: ot,
|
|
3676
|
+
QuickStack: Et,
|
|
3677
|
+
CollectionList: Dt,
|
|
3678
|
+
CollectionSearch: Ot,
|
|
3679
|
+
BreadcrumbsBlock: kt,
|
|
3680
|
+
PaginationBlock: At,
|
|
3681
|
+
StepperBlock: Ht,
|
|
3682
|
+
SocialLinksBlock: Vt,
|
|
3572
3683
|
ThemeModeBlock: Ft,
|
|
3573
|
-
|
|
3574
|
-
|
|
3575
|
-
|
|
3576
|
-
|
|
3577
|
-
|
|
3578
|
-
|
|
3579
|
-
|
|
3580
|
-
|
|
3581
|
-
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
|
|
3591
|
-
|
|
3592
|
-
|
|
3684
|
+
ScrollTopBlock: zt,
|
|
3685
|
+
OrgChartBlock: Qt,
|
|
3686
|
+
TableBlock: $t,
|
|
3687
|
+
MasonryBlock: nt,
|
|
3688
|
+
AccordionBlock: st,
|
|
3689
|
+
NavbarBlock: at,
|
|
3690
|
+
ListBlock: Ie,
|
|
3691
|
+
TextSpan: ke,
|
|
3692
|
+
QuoteBlock: Fe,
|
|
3693
|
+
TextLink: ze,
|
|
3694
|
+
RichTextBlock: Ne,
|
|
3695
|
+
RichContentBlock: Ne,
|
|
3696
|
+
VideoBlock: He,
|
|
3697
|
+
YouTubeBlock: We,
|
|
3698
|
+
IframeBlock: Ge,
|
|
3699
|
+
EmbedBlock: Ke,
|
|
3700
|
+
FormBlock: ht,
|
|
3701
|
+
FormLabel: yt,
|
|
3702
|
+
FormInput: bt,
|
|
3703
|
+
FormTextarea: xt,
|
|
3704
|
+
FormCheckbox: (e) => /* @__PURE__ */ u(St, {
|
|
3593
3705
|
kind: "checkbox",
|
|
3594
3706
|
...e
|
|
3595
3707
|
}),
|
|
3596
|
-
FormRadio: (e) => /* @__PURE__ */ u(
|
|
3708
|
+
FormRadio: (e) => /* @__PURE__ */ u(St, {
|
|
3597
3709
|
kind: "radio",
|
|
3598
3710
|
...e
|
|
3599
3711
|
}),
|
|
3600
|
-
FormSelect:
|
|
3601
|
-
FormFile:
|
|
3602
|
-
FormRecaptcha:
|
|
3603
|
-
FormSubmit:
|
|
3604
|
-
},
|
|
3712
|
+
FormSelect: Ct,
|
|
3713
|
+
FormFile: wt,
|
|
3714
|
+
FormRecaptcha: vt,
|
|
3715
|
+
FormSubmit: Tt
|
|
3716
|
+
}, tn = {
|
|
3605
3717
|
id: "auth",
|
|
3606
3718
|
label: "Accounts",
|
|
3607
3719
|
category: "Apps",
|
|
3608
3720
|
keys: ["SiteLoginForm", "SiteAccountMenu"],
|
|
3609
3721
|
ssr: "shell",
|
|
3610
3722
|
settings: ["site.authRedirect"]
|
|
3611
|
-
},
|
|
3723
|
+
}, nn = t({
|
|
3612
3724
|
user: null,
|
|
3613
3725
|
status: "idle",
|
|
3614
3726
|
ensure: () => {},
|
|
3615
3727
|
refresh: () => {},
|
|
3616
3728
|
signOut: () => {}
|
|
3617
|
-
}),
|
|
3618
|
-
let e = r(
|
|
3729
|
+
}), rn = () => {
|
|
3730
|
+
let e = r(nn);
|
|
3619
3731
|
return i(() => {
|
|
3620
3732
|
e.ensure();
|
|
3621
3733
|
}, [e]), e;
|
|
3622
3734
|
};
|
|
3623
|
-
function
|
|
3624
|
-
let d = r(
|
|
3735
|
+
function an({ children: e, initialUser: t, disabled: i, apiUrl: a, tenant: l }) {
|
|
3736
|
+
let d = r(U), 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}`, {
|
|
3625
3737
|
...t,
|
|
3626
3738
|
credentials: "include",
|
|
3627
3739
|
headers: {
|
|
@@ -3653,19 +3765,19 @@ function en({ children: e, initialUser: t, disabled: i, apiUrl: a, tenant: l })
|
|
|
3653
3765
|
b,
|
|
3654
3766
|
x
|
|
3655
3767
|
]);
|
|
3656
|
-
return /* @__PURE__ */ u(
|
|
3768
|
+
return /* @__PURE__ */ u(nn.Provider, {
|
|
3657
3769
|
value: C,
|
|
3658
3770
|
children: e
|
|
3659
3771
|
});
|
|
3660
3772
|
}
|
|
3661
|
-
function
|
|
3662
|
-
let { status: n } =
|
|
3773
|
+
function on({ when: e, children: t }) {
|
|
3774
|
+
let { status: n } = rn();
|
|
3663
3775
|
return !e || e === "always" ? t : n === "idle" || n === "loading" ? null : e === "user" == (n === "user") ? t : null;
|
|
3664
3776
|
}
|
|
3665
3777
|
//#endregion
|
|
3666
3778
|
//#region ../ui/src/components/builder/apps/auth/views.jsx
|
|
3667
|
-
function
|
|
3668
|
-
let { tenant: h, apiUrl: g, settings: _ } = r(
|
|
3779
|
+
function sn({ 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 }) {
|
|
3780
|
+
let { tenant: h, apiUrl: g, settings: _ } = r(U), [v, y] = c("form"), [b, x] = c(""), [S, w] = c(!1), T = e === "register", E = f ? m || "form" : v, D = (e) => typeof e == "string" && e.startsWith("/") && !e.startsWith("//") ? e : "", O = async (e) => {
|
|
3669
3781
|
if (e.preventDefault(), f) return;
|
|
3670
3782
|
let n = new FormData(e.currentTarget);
|
|
3671
3783
|
w(!0), x("");
|
|
@@ -3713,20 +3825,20 @@ function nn({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
|
|
|
3713
3825
|
children: [
|
|
3714
3826
|
T ? /* @__PURE__ */ d("label", {
|
|
3715
3827
|
style: {
|
|
3716
|
-
...
|
|
3828
|
+
...X,
|
|
3717
3829
|
display: "grid",
|
|
3718
3830
|
gap: 6
|
|
3719
3831
|
},
|
|
3720
3832
|
children: [a, /* @__PURE__ */ u("input", {
|
|
3721
3833
|
name: "name",
|
|
3722
3834
|
type: "text",
|
|
3723
|
-
style:
|
|
3724
|
-
...
|
|
3835
|
+
style: Z,
|
|
3836
|
+
...Q(f)
|
|
3725
3837
|
})]
|
|
3726
3838
|
}) : null,
|
|
3727
3839
|
/* @__PURE__ */ d("label", {
|
|
3728
3840
|
style: {
|
|
3729
|
-
...
|
|
3841
|
+
...X,
|
|
3730
3842
|
display: "grid",
|
|
3731
3843
|
gap: 6
|
|
3732
3844
|
},
|
|
@@ -3734,13 +3846,13 @@ function nn({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
|
|
|
3734
3846
|
name: "email",
|
|
3735
3847
|
type: "email",
|
|
3736
3848
|
required: !f,
|
|
3737
|
-
style:
|
|
3738
|
-
...
|
|
3849
|
+
style: Z,
|
|
3850
|
+
...Q(f)
|
|
3739
3851
|
})]
|
|
3740
3852
|
}),
|
|
3741
3853
|
/* @__PURE__ */ d("label", {
|
|
3742
3854
|
style: {
|
|
3743
|
-
...
|
|
3855
|
+
...X,
|
|
3744
3856
|
display: "grid",
|
|
3745
3857
|
gap: 6
|
|
3746
3858
|
},
|
|
@@ -3748,15 +3860,15 @@ function nn({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
|
|
|
3748
3860
|
name: "password",
|
|
3749
3861
|
type: "password",
|
|
3750
3862
|
required: !f,
|
|
3751
|
-
style:
|
|
3752
|
-
...
|
|
3863
|
+
style: Z,
|
|
3864
|
+
...Q(f)
|
|
3753
3865
|
})]
|
|
3754
3866
|
}),
|
|
3755
3867
|
/* @__PURE__ */ u("button", {
|
|
3756
3868
|
type: f ? "button" : "submit",
|
|
3757
3869
|
disabled: S || void 0,
|
|
3758
3870
|
style: {
|
|
3759
|
-
...
|
|
3871
|
+
...J,
|
|
3760
3872
|
border: 0,
|
|
3761
3873
|
padding: "10px 22px",
|
|
3762
3874
|
borderRadius: 8,
|
|
@@ -3788,8 +3900,8 @@ function nn({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
|
|
|
3788
3900
|
]
|
|
3789
3901
|
});
|
|
3790
3902
|
}
|
|
3791
|
-
function
|
|
3792
|
-
let { user: c, status: l, signOut: f } =
|
|
3903
|
+
function cn({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !1, style: r, nodeRef: i, inert: a, linked: o, show: s }) {
|
|
3904
|
+
let { user: c, status: l, signOut: f } = rn(), p = a ? s || "user" : l, m = a ? {
|
|
3793
3905
|
name: "Ada Lovelace",
|
|
3794
3906
|
email: "ada@example.com"
|
|
3795
3907
|
} : c;
|
|
@@ -3810,7 +3922,7 @@ function rn({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
|
|
|
3810
3922
|
children: [
|
|
3811
3923
|
/* @__PURE__ */ d("span", {
|
|
3812
3924
|
style: {
|
|
3813
|
-
...
|
|
3925
|
+
...X,
|
|
3814
3926
|
fontWeight: 600
|
|
3815
3927
|
},
|
|
3816
3928
|
children: [
|
|
@@ -3821,7 +3933,7 @@ function rn({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
|
|
|
3821
3933
|
}),
|
|
3822
3934
|
n && m?.email ? /* @__PURE__ */ u("span", {
|
|
3823
3935
|
style: {
|
|
3824
|
-
...
|
|
3936
|
+
...X,
|
|
3825
3937
|
opacity: .7
|
|
3826
3938
|
},
|
|
3827
3939
|
children: m.email
|
|
@@ -3830,14 +3942,14 @@ function rn({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
|
|
|
3830
3942
|
type: "button",
|
|
3831
3943
|
onClick: a ? void 0 : f,
|
|
3832
3944
|
style: {
|
|
3833
|
-
...
|
|
3945
|
+
...J,
|
|
3834
3946
|
border: 0,
|
|
3835
3947
|
padding: "8px 16px",
|
|
3836
3948
|
borderRadius: 8,
|
|
3837
3949
|
fontSize: 14,
|
|
3838
3950
|
cursor: a ? "default" : "pointer"
|
|
3839
3951
|
},
|
|
3840
|
-
...
|
|
3952
|
+
...Q(a),
|
|
3841
3953
|
children: t
|
|
3842
3954
|
})
|
|
3843
3955
|
]
|
|
@@ -3853,8 +3965,157 @@ function rn({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
|
|
|
3853
3965
|
});
|
|
3854
3966
|
}
|
|
3855
3967
|
//#endregion
|
|
3968
|
+
//#region ../ui/src/components/builder/apps/consent/manifest.js
|
|
3969
|
+
var ln = {
|
|
3970
|
+
id: "consent",
|
|
3971
|
+
label: "Cookie consent",
|
|
3972
|
+
category: "Apps",
|
|
3973
|
+
keys: ["CookieConsent"],
|
|
3974
|
+
ssr: "shell",
|
|
3975
|
+
settings: []
|
|
3976
|
+
}, un = "webim.cookie_consent";
|
|
3977
|
+
function dn() {
|
|
3978
|
+
try {
|
|
3979
|
+
let e = window.localStorage.getItem(un), t = e ? JSON.parse(e) : null;
|
|
3980
|
+
return t?.choice === "accepted" || t?.choice === "declined" ? t.choice : "";
|
|
3981
|
+
} catch {
|
|
3982
|
+
return "";
|
|
3983
|
+
}
|
|
3984
|
+
}
|
|
3985
|
+
function fn(e) {
|
|
3986
|
+
try {
|
|
3987
|
+
document.querySelectorAll(".webim-page").forEach((t) => t.setAttribute("data-webim-consent", e));
|
|
3988
|
+
} catch {}
|
|
3989
|
+
}
|
|
3990
|
+
function pn(e) {
|
|
3991
|
+
try {
|
|
3992
|
+
window.localStorage.setItem(un, JSON.stringify({
|
|
3993
|
+
choice: e,
|
|
3994
|
+
at: (/* @__PURE__ */ new Date()).toISOString()
|
|
3995
|
+
}));
|
|
3996
|
+
} catch {}
|
|
3997
|
+
fn(e);
|
|
3998
|
+
try {
|
|
3999
|
+
window.dispatchEvent(new CustomEvent("webim:consent", { detail: { choice: e } }));
|
|
4000
|
+
} catch {}
|
|
4001
|
+
}
|
|
4002
|
+
var mn = {
|
|
4003
|
+
bottom: {
|
|
4004
|
+
left: 0,
|
|
4005
|
+
right: 0,
|
|
4006
|
+
bottom: 0
|
|
4007
|
+
},
|
|
4008
|
+
top: {
|
|
4009
|
+
left: 0,
|
|
4010
|
+
right: 0,
|
|
4011
|
+
top: 0
|
|
4012
|
+
},
|
|
4013
|
+
"bottom-left": {
|
|
4014
|
+
left: 16,
|
|
4015
|
+
bottom: 16,
|
|
4016
|
+
maxWidth: 400
|
|
4017
|
+
},
|
|
4018
|
+
"bottom-right": {
|
|
4019
|
+
right: 16,
|
|
4020
|
+
bottom: 16,
|
|
4021
|
+
maxWidth: 400
|
|
4022
|
+
}
|
|
4023
|
+
};
|
|
4024
|
+
function hn({ message: e, acceptLabel: t, rejectLabel: n, showReject: r, linkLabel: a, linkHref: o, position: s, linked: f, style: p, nodeRef: m, inert: h }) {
|
|
4025
|
+
let [g, _] = c(!!h), [v, y] = c(null), b = (e) => {
|
|
4026
|
+
y(e), typeof m == "function" && m(e);
|
|
4027
|
+
};
|
|
4028
|
+
if (i(() => {
|
|
4029
|
+
if (h) return;
|
|
4030
|
+
let e = dn();
|
|
4031
|
+
if (e) {
|
|
4032
|
+
let t = v?.closest?.(".webim-page");
|
|
4033
|
+
t && t.setAttribute("data-webim-consent", e);
|
|
4034
|
+
} else _(!0);
|
|
4035
|
+
}, [h, v]), !g) return null;
|
|
4036
|
+
let x = (e) => () => {
|
|
4037
|
+
h || (pn(e, v), _(!1));
|
|
4038
|
+
}, S = mn[s] ?? mn.bottom, w = {
|
|
4039
|
+
appearance: "none",
|
|
4040
|
+
font: "inherit",
|
|
4041
|
+
fontSize: 14,
|
|
4042
|
+
fontWeight: 600,
|
|
4043
|
+
padding: "8px 16px",
|
|
4044
|
+
borderRadius: 8,
|
|
4045
|
+
cursor: h ? "default" : "pointer",
|
|
4046
|
+
whiteSpace: "nowrap"
|
|
4047
|
+
};
|
|
4048
|
+
return /* @__PURE__ */ d("div", {
|
|
4049
|
+
ref: b,
|
|
4050
|
+
role: "region",
|
|
4051
|
+
"aria-label": "Cookie consent",
|
|
4052
|
+
style: {
|
|
4053
|
+
...h ? { position: "relative" } : {
|
|
4054
|
+
position: "fixed",
|
|
4055
|
+
zIndex: 2147483e3,
|
|
4056
|
+
...S
|
|
4057
|
+
},
|
|
4058
|
+
display: "flex",
|
|
4059
|
+
flexWrap: "wrap",
|
|
4060
|
+
alignItems: "center",
|
|
4061
|
+
gap: 12,
|
|
4062
|
+
padding: 16,
|
|
4063
|
+
background: "var(--page-surface, #f2f2f2)",
|
|
4064
|
+
color: "var(--page-text, #111827)",
|
|
4065
|
+
border: "1px solid var(--page-border, rgba(148, 163, 184, 0.4))",
|
|
4066
|
+
borderRadius: s === "bottom" || s === "top" ? 0 : 12,
|
|
4067
|
+
boxShadow: "0 8px 30px rgba(15, 23, 42, 0.18)",
|
|
4068
|
+
fontSize: 14,
|
|
4069
|
+
lineHeight: 1.5,
|
|
4070
|
+
...C(p)
|
|
4071
|
+
},
|
|
4072
|
+
children: [/* @__PURE__ */ d("div", {
|
|
4073
|
+
style: {
|
|
4074
|
+
flex: "1 1 260px",
|
|
4075
|
+
minWidth: 0
|
|
4076
|
+
},
|
|
4077
|
+
children: [f?.content ?? (e || "We use cookies to run this site and to understand how it is used."), a && o ? /* @__PURE__ */ d(l, { children: [" ", /* @__PURE__ */ u("a", {
|
|
4078
|
+
href: o,
|
|
4079
|
+
onClick: h ? (e) => e.preventDefault() : void 0,
|
|
4080
|
+
style: {
|
|
4081
|
+
color: "var(--page-accent, inherit)",
|
|
4082
|
+
textDecoration: "underline"
|
|
4083
|
+
},
|
|
4084
|
+
children: a
|
|
4085
|
+
})] }) : null]
|
|
4086
|
+
}), /* @__PURE__ */ d("div", {
|
|
4087
|
+
style: {
|
|
4088
|
+
display: "flex",
|
|
4089
|
+
gap: 8,
|
|
4090
|
+
flexShrink: 0
|
|
4091
|
+
},
|
|
4092
|
+
children: [r === !1 ? null : /* @__PURE__ */ u("button", {
|
|
4093
|
+
type: "button",
|
|
4094
|
+
onClick: x("declined"),
|
|
4095
|
+
style: {
|
|
4096
|
+
...w,
|
|
4097
|
+
background: "transparent",
|
|
4098
|
+
color: "inherit",
|
|
4099
|
+
border: "1px solid var(--page-border, rgba(148, 163, 184, 0.6))"
|
|
4100
|
+
},
|
|
4101
|
+
children: n || "Decline"
|
|
4102
|
+
}), /* @__PURE__ */ u("button", {
|
|
4103
|
+
type: "button",
|
|
4104
|
+
onClick: x("accepted"),
|
|
4105
|
+
style: {
|
|
4106
|
+
...w,
|
|
4107
|
+
background: "var(--page-accent, #111827)",
|
|
4108
|
+
color: "var(--page-accent-text, #ffffff)",
|
|
4109
|
+
border: "1px solid transparent"
|
|
4110
|
+
},
|
|
4111
|
+
children: t || "Accept"
|
|
4112
|
+
})]
|
|
4113
|
+
})]
|
|
4114
|
+
});
|
|
4115
|
+
}
|
|
4116
|
+
//#endregion
|
|
3856
4117
|
//#region ../ui/src/components/builder/apps/language/manifest.js
|
|
3857
|
-
var
|
|
4118
|
+
var gn = {
|
|
3858
4119
|
id: "language",
|
|
3859
4120
|
label: "Language",
|
|
3860
4121
|
category: "Apps",
|
|
@@ -3864,21 +4125,21 @@ var an = {
|
|
|
3864
4125
|
};
|
|
3865
4126
|
//#endregion
|
|
3866
4127
|
//#region ../ui/src/components/builder/apps/language/views.jsx
|
|
3867
|
-
function
|
|
4128
|
+
function _n(e) {
|
|
3868
4129
|
let t = e?.locales, n = [typeof t?.default == "string" && t.default.trim() ? t.default.trim() : "", ...Array.isArray(t?.enabled) ? t.enabled : []].filter((e) => typeof e == "string" && e.trim());
|
|
3869
4130
|
return [...new Set(n.map((e) => e.trim()))];
|
|
3870
4131
|
}
|
|
3871
|
-
var
|
|
3872
|
-
function
|
|
4132
|
+
var vn = (e) => e && e.charAt(0).toUpperCase() + e.slice(1);
|
|
4133
|
+
function yn(e, t) {
|
|
3873
4134
|
let n = String(e ?? "").toUpperCase();
|
|
3874
4135
|
if (t === "code") return n;
|
|
3875
4136
|
let r = "";
|
|
3876
4137
|
try {
|
|
3877
|
-
r =
|
|
4138
|
+
r = vn(new Intl.DisplayNames([e], { type: "language" }).of(e) ?? "");
|
|
3878
4139
|
} catch {}
|
|
3879
4140
|
return !r || r.toUpperCase() === n ? n : t === "both" ? `${n} — ${r}` : r;
|
|
3880
4141
|
}
|
|
3881
|
-
function
|
|
4142
|
+
function bn(e, t) {
|
|
3882
4143
|
let n = t ? "" : `?locale=${encodeURIComponent(e)}`;
|
|
3883
4144
|
if (typeof window > "u") return n || "?";
|
|
3884
4145
|
try {
|
|
@@ -3888,8 +4149,8 @@ function ln(e, t) {
|
|
|
3888
4149
|
return n || "/";
|
|
3889
4150
|
}
|
|
3890
4151
|
}
|
|
3891
|
-
function
|
|
3892
|
-
let c = r(
|
|
4152
|
+
function xn({ variant: e, display: t, separator: n, label: i, style: a, nodeRef: o, inert: s }) {
|
|
4153
|
+
let c = r(U), l = _n(c?.settings), f = l[0] ?? "", p = l.includes(c?.locale) ? c.locale : f, m = {
|
|
3893
4154
|
display: "inline-flex",
|
|
3894
4155
|
alignItems: "center",
|
|
3895
4156
|
gap: 8,
|
|
@@ -3924,7 +4185,7 @@ function un({ variant: e, display: t, separator: n, label: i, style: a, nodeRef:
|
|
|
3924
4185
|
style: { opacity: .4 },
|
|
3925
4186
|
children: n ?? "·"
|
|
3926
4187
|
}), /* @__PURE__ */ u("a", {
|
|
3927
|
-
href:
|
|
4188
|
+
href: bn(e, e === f),
|
|
3928
4189
|
hrefLang: e,
|
|
3929
4190
|
"aria-current": e === p ? "true" : void 0,
|
|
3930
4191
|
onClick: s ? (e) => e.preventDefault() : void 0,
|
|
@@ -3934,7 +4195,7 @@ function un({ variant: e, display: t, separator: n, label: i, style: a, nodeRef:
|
|
|
3934
4195
|
textDecoration: "none",
|
|
3935
4196
|
cursor: s ? "default" : "pointer"
|
|
3936
4197
|
},
|
|
3937
|
-
children:
|
|
4198
|
+
children: yn(e, t)
|
|
3938
4199
|
})]
|
|
3939
4200
|
}, e))]
|
|
3940
4201
|
}) : /* @__PURE__ */ d("div", {
|
|
@@ -3945,7 +4206,7 @@ function un({ variant: e, display: t, separator: n, label: i, style: a, nodeRef:
|
|
|
3945
4206
|
value: p,
|
|
3946
4207
|
onChange: s ? void 0 : (e) => {
|
|
3947
4208
|
let t = e.target.value;
|
|
3948
|
-
window.location.assign(
|
|
4209
|
+
window.location.assign(bn(t, t === f));
|
|
3949
4210
|
},
|
|
3950
4211
|
onKeyDown: s ? (e) => e.preventDefault() : void 0,
|
|
3951
4212
|
style: {
|
|
@@ -3959,50 +4220,55 @@ function un({ variant: e, display: t, separator: n, label: i, style: a, nodeRef:
|
|
|
3959
4220
|
},
|
|
3960
4221
|
children: l.map((e) => /* @__PURE__ */ u("option", {
|
|
3961
4222
|
value: e,
|
|
3962
|
-
children:
|
|
4223
|
+
children: yn(e, t)
|
|
3963
4224
|
}, e))
|
|
3964
4225
|
})]
|
|
3965
4226
|
});
|
|
3966
4227
|
}
|
|
3967
4228
|
//#endregion
|
|
3968
4229
|
//#region ../ui/src/components/builder/apps/index.js
|
|
3969
|
-
var
|
|
3970
|
-
|
|
3971
|
-
|
|
3972
|
-
|
|
4230
|
+
var Sn = [
|
|
4231
|
+
tn,
|
|
4232
|
+
gn,
|
|
4233
|
+
ln
|
|
4234
|
+
], Cn = {
|
|
4235
|
+
SiteLoginForm: sn,
|
|
4236
|
+
SiteAccountMenu: cn,
|
|
4237
|
+
SiteLanguagePicker: xn,
|
|
4238
|
+
CookieConsent: hn
|
|
3973
4239
|
};
|
|
3974
|
-
new Set(
|
|
4240
|
+
new Set(Sn.filter((e) => e.ssr === "shell").flatMap((e) => e.keys));
|
|
3975
4241
|
//#endregion
|
|
3976
4242
|
//#region ../ui/src/components/builder/plugins/runtime.js
|
|
3977
|
-
var
|
|
3978
|
-
function
|
|
3979
|
-
if (
|
|
4243
|
+
var wn = /* @__PURE__ */ new Map();
|
|
4244
|
+
function Tn(e) {
|
|
4245
|
+
if (wn.has(e)) return wn.get(e);
|
|
3980
4246
|
let t = URL.createObjectURL(new Blob([e], { type: "text/javascript" })), n = import(
|
|
3981
4247
|
/* @vite-ignore */
|
|
3982
4248
|
/* webpackIgnore: true */
|
|
3983
4249
|
t
|
|
3984
4250
|
).finally(() => URL.revokeObjectURL(t));
|
|
3985
|
-
return
|
|
4251
|
+
return wn.set(e, n), n;
|
|
3986
4252
|
}
|
|
3987
|
-
function
|
|
4253
|
+
function En(e) {
|
|
3988
4254
|
let t = e && typeof e == "object" ? e.builder_plugins : null, n = t && typeof t == "object" ? t.plugins : null;
|
|
3989
4255
|
return n && typeof n == "object" ? n : {};
|
|
3990
4256
|
}
|
|
3991
4257
|
//#endregion
|
|
3992
4258
|
//#region ../ui/src/components/builder/plugins/view.jsx
|
|
3993
|
-
async function
|
|
3994
|
-
let n = await
|
|
4259
|
+
async function Dn(e, t) {
|
|
4260
|
+
let n = await Tn(e);
|
|
3995
4261
|
return (Array.isArray(n?.default?.blocks) ? n.default.blocks : []).find((e) => e?.id === t && typeof e.mount == "function") ?? null;
|
|
3996
4262
|
}
|
|
3997
|
-
var
|
|
4263
|
+
var On = {
|
|
3998
4264
|
padding: "10px 12px",
|
|
3999
4265
|
border: "1px dashed rgba(148, 163, 184, 0.5)",
|
|
4000
4266
|
borderRadius: 8,
|
|
4001
4267
|
fontSize: 12,
|
|
4002
4268
|
opacity: .6
|
|
4003
4269
|
};
|
|
4004
|
-
function
|
|
4005
|
-
let c = r(
|
|
4270
|
+
function kn({ pluginId: e, blockId: t, props: n, style: a, nodeRef: o }) {
|
|
4271
|
+
let c = r(U), l = En(c?.settings)[e], f = s(null), p = s(null), m = {
|
|
4006
4272
|
tenant: c?.tenant ?? "",
|
|
4007
4273
|
apiUrl: c?.apiUrl ?? "/api",
|
|
4008
4274
|
locale: c?.locale ?? "",
|
|
@@ -4014,7 +4280,7 @@ function vn({ pluginId: e, blockId: t, props: n, style: a, nodeRef: o }) {
|
|
|
4014
4280
|
let e = f.current;
|
|
4015
4281
|
if (!l?.code || !e) return;
|
|
4016
4282
|
let n = !0;
|
|
4017
|
-
return
|
|
4283
|
+
return Dn(l.code, t).then((e) => {
|
|
4018
4284
|
if (!(!n || !e || !f.current)) {
|
|
4019
4285
|
p.current = e;
|
|
4020
4286
|
try {
|
|
@@ -4044,7 +4310,7 @@ function vn({ pluginId: e, blockId: t, props: n, style: a, nodeRef: o }) {
|
|
|
4044
4310
|
}) : /* @__PURE__ */ d("div", {
|
|
4045
4311
|
ref: o,
|
|
4046
4312
|
style: {
|
|
4047
|
-
...
|
|
4313
|
+
...On,
|
|
4048
4314
|
...C(a)
|
|
4049
4315
|
},
|
|
4050
4316
|
children: [
|
|
@@ -4056,12 +4322,12 @@ function vn({ pluginId: e, blockId: t, props: n, style: a, nodeRef: o }) {
|
|
|
4056
4322
|
}
|
|
4057
4323
|
//#endregion
|
|
4058
4324
|
//#region ../ui/src/components/builder/render.jsx
|
|
4059
|
-
var
|
|
4060
|
-
...
|
|
4061
|
-
...
|
|
4062
|
-
PluginBlock:
|
|
4325
|
+
var An = {
|
|
4326
|
+
...en,
|
|
4327
|
+
...Cn,
|
|
4328
|
+
PluginBlock: kn
|
|
4063
4329
|
};
|
|
4064
|
-
function
|
|
4330
|
+
function jn(t, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
|
|
4065
4331
|
let o = n[t];
|
|
4066
4332
|
if (!o || o.hidden) return null;
|
|
4067
4333
|
let s = o.type?.resolvedName, c = a?.mapProps ? a.mapProps(o.props ?? {}, s) : o.props ?? {};
|
|
@@ -4069,11 +4335,11 @@ function bn(t, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
|
|
|
4069
4335
|
let n = o.props?.componentId, s = r?.[n];
|
|
4070
4336
|
if (!s?.template || i.has(n)) return null;
|
|
4071
4337
|
let c = new Set(i).add(n);
|
|
4072
|
-
return /* @__PURE__ */ u(e, { children:
|
|
4338
|
+
return /* @__PURE__ */ u(e, { children: jn(s.template.rootId, s.template.nodes, r, c, a) }, t);
|
|
4073
4339
|
}
|
|
4074
|
-
let l =
|
|
4340
|
+
let l = An[s];
|
|
4075
4341
|
if (!l) return null;
|
|
4076
|
-
let d = (o.nodes ?? []).map((e) =>
|
|
4342
|
+
let d = (o.nodes ?? []).map((e) => jn(e, n, r, i, a)).filter(Boolean), f = Object.entries(o.linkedNodes ?? {}), p = f.length ? Object.fromEntries(f.map(([e, t]) => [e, jn(t, n, r, i)])) : void 0, m = /* @__PURE__ */ u(l, {
|
|
4077
4343
|
...c,
|
|
4078
4344
|
...s === "CollectionList" ? { templateId: o.linkedNodes?.card } : null,
|
|
4079
4345
|
linked: p,
|
|
@@ -4082,16 +4348,16 @@ function bn(t, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
|
|
|
4082
4348
|
},
|
|
4083
4349
|
children: d.length ? d : void 0
|
|
4084
4350
|
}, t);
|
|
4085
|
-
return c.when && c.when !== "always" ? /* @__PURE__ */ u(
|
|
4351
|
+
return c.when && c.when !== "always" ? /* @__PURE__ */ u(on, {
|
|
4086
4352
|
when: c.when,
|
|
4087
4353
|
children: m
|
|
4088
4354
|
}, t) : m;
|
|
4089
4355
|
}
|
|
4090
4356
|
//#endregion
|
|
4091
4357
|
//#region ../ui/src/components/builder/PageRenderer.jsx
|
|
4092
|
-
var
|
|
4358
|
+
var Mn = (e) => Object.entries(e).map(([e, t]) => `${e}: ${t};`).join(" "), Nn = (e) => `.webim-page[data-webim-mode="light"] { ${Object.entries(V(e.light)).map(([e, t]) => `${e}: ${t} !important;`).join(" ")} }
|
|
4093
4359
|
.webim-page[data-webim-mode="dark"] { ${Object.entries(V(e.dark)).map(([e, t]) => `${e}: ${t} !important;`).join(" ")} }`;
|
|
4094
|
-
function
|
|
4360
|
+
function Pn({ 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: _ }) {
|
|
4095
4361
|
let v = s?.js?.trim();
|
|
4096
4362
|
if (i(() => {
|
|
4097
4363
|
if (!v) return;
|
|
@@ -4100,28 +4366,28 @@ function Cn({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, cu
|
|
|
4100
4366
|
}, [v]), !e?.ROOT) return null;
|
|
4101
4367
|
let b = {
|
|
4102
4368
|
lang: p || void 0,
|
|
4103
|
-
dir:
|
|
4369
|
+
dir: ue(m, p)
|
|
4104
4370
|
}, x = ".webim-page, .webim-page *, .webim-page *::before, .webim-page *::after { box-sizing: border-box; }", S = {
|
|
4105
4371
|
minHeight: "100%",
|
|
4106
4372
|
display: "flex",
|
|
4107
4373
|
flexDirection: "column"
|
|
4108
|
-
}, C =
|
|
4374
|
+
}, C = jn("ROOT", e, n), w = o(() => ({ render: (t, r) => jn(t, e, n, void 0, { mapProps: r }) }), [e, n]), T = F(e, n), E = P(e, n), D = s?.css?.trim(), O = B(t), k = [O.font, O.headingFont].filter((e) => typeof e == "string" && e.trim() && e !== "inherit" && !z[e]), A = [.../* @__PURE__ */ new Set([...y(e, n), ...k])].map((e) => /* @__PURE__ */ u("link", {
|
|
4109
4375
|
rel: "stylesheet",
|
|
4110
4376
|
precedence: "default",
|
|
4111
4377
|
href: g(e)
|
|
4112
|
-
}, e)), j =
|
|
4113
|
-
return r === "auto" ? /* @__PURE__ */ u(
|
|
4378
|
+
}, e)), j = Nn(O);
|
|
4379
|
+
return r === "auto" ? /* @__PURE__ */ u(U.Provider, {
|
|
4114
4380
|
value: {
|
|
4115
4381
|
tenant: c || "",
|
|
4116
4382
|
apiUrl: l || "/api",
|
|
4117
4383
|
locale: p || "",
|
|
4118
4384
|
settings: h ?? null
|
|
4119
4385
|
},
|
|
4120
|
-
children: /* @__PURE__ */ u(
|
|
4386
|
+
children: /* @__PURE__ */ u(an, {
|
|
4121
4387
|
initialUser: _,
|
|
4122
|
-
children: /* @__PURE__ */ u(
|
|
4388
|
+
children: /* @__PURE__ */ u(W.Provider, {
|
|
4123
4389
|
value: f ?? null,
|
|
4124
|
-
children: /* @__PURE__ */ u(
|
|
4390
|
+
children: /* @__PURE__ */ u(pe.Provider, {
|
|
4125
4391
|
value: w,
|
|
4126
4392
|
children: /* @__PURE__ */ d("div", {
|
|
4127
4393
|
...b,
|
|
@@ -4132,8 +4398,8 @@ function Cn({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, cu
|
|
|
4132
4398
|
...a
|
|
4133
4399
|
},
|
|
4134
4400
|
children: [
|
|
4135
|
-
/* @__PURE__ */ u("style", { children: `.webim-page { ${
|
|
4136
|
-
@media (prefers-color-scheme: dark) { .webim-page { ${
|
|
4401
|
+
/* @__PURE__ */ u("style", { children: `.webim-page { ${Mn(V(O.light))} }
|
|
4402
|
+
@media (prefers-color-scheme: dark) { .webim-page { ${Mn(V(O.dark))} } }` }),
|
|
4137
4403
|
/* @__PURE__ */ u("style", { children: j }),
|
|
4138
4404
|
A,
|
|
4139
4405
|
/* @__PURE__ */ u("style", { children: x }),
|
|
@@ -4146,18 +4412,18 @@ function Cn({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, cu
|
|
|
4146
4412
|
})
|
|
4147
4413
|
})
|
|
4148
4414
|
})
|
|
4149
|
-
}) : /* @__PURE__ */ u(
|
|
4415
|
+
}) : /* @__PURE__ */ u(U.Provider, {
|
|
4150
4416
|
value: {
|
|
4151
4417
|
tenant: c || "",
|
|
4152
4418
|
apiUrl: l || "/api",
|
|
4153
4419
|
locale: p || "",
|
|
4154
4420
|
settings: h ?? null
|
|
4155
4421
|
},
|
|
4156
|
-
children: /* @__PURE__ */ u(
|
|
4422
|
+
children: /* @__PURE__ */ u(an, {
|
|
4157
4423
|
initialUser: _,
|
|
4158
|
-
children: /* @__PURE__ */ u(
|
|
4424
|
+
children: /* @__PURE__ */ u(W.Provider, {
|
|
4159
4425
|
value: f ?? null,
|
|
4160
|
-
children: /* @__PURE__ */ u(
|
|
4426
|
+
children: /* @__PURE__ */ u(pe.Provider, {
|
|
4161
4427
|
value: w,
|
|
4162
4428
|
children: /* @__PURE__ */ d("div", {
|
|
4163
4429
|
...b,
|
|
@@ -4184,8 +4450,8 @@ function Cn({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, cu
|
|
|
4184
4450
|
}
|
|
4185
4451
|
//#endregion
|
|
4186
4452
|
//#region src/WebimContent.jsx
|
|
4187
|
-
function
|
|
4188
|
-
return e?.blocks?.ROOT ? /* @__PURE__ */ u(
|
|
4453
|
+
function Fn({ bundle: e, mode: t = "auto", style: n }) {
|
|
4454
|
+
return e?.blocks?.ROOT ? /* @__PURE__ */ u(Pn, {
|
|
4189
4455
|
blocks: e.blocks,
|
|
4190
4456
|
theme: e.theme,
|
|
4191
4457
|
components: e.components,
|
|
@@ -4202,7 +4468,7 @@ function wn({ bundle: e, mode: t = "auto", style: n }) {
|
|
|
4202
4468
|
}
|
|
4203
4469
|
//#endregion
|
|
4204
4470
|
//#region src/WebimPage.jsx
|
|
4205
|
-
function
|
|
4471
|
+
function In({ 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 }) {
|
|
4206
4472
|
let [g, _] = c({ status: "loading" }), v = s({
|
|
4207
4473
|
onLoad: m,
|
|
4208
4474
|
onError: h
|
|
@@ -4212,7 +4478,7 @@ function Tn({ apiUrl: e, tenant: t, slug: n, locale: r, preview: a, token: o, mo
|
|
|
4212
4478
|
onError: h
|
|
4213
4479
|
}, i(() => {
|
|
4214
4480
|
let i = !0;
|
|
4215
|
-
return _({ status: "loading" }),
|
|
4481
|
+
return _({ status: "loading" }), se({
|
|
4216
4482
|
apiUrl: e,
|
|
4217
4483
|
tenant: t,
|
|
4218
4484
|
slug: n,
|
|
@@ -4239,11 +4505,11 @@ function Tn({ apiUrl: e, tenant: t, slug: n, locale: r, preview: a, token: o, mo
|
|
|
4239
4505
|
r,
|
|
4240
4506
|
a,
|
|
4241
4507
|
o
|
|
4242
|
-
]), g.status === "loading" ? f : g.status === "error" ? typeof p == "function" ? p(g.error) : p : /* @__PURE__ */ u(
|
|
4508
|
+
]), g.status === "loading" ? f : g.status === "error" ? typeof p == "function" ? p(g.error) : p : /* @__PURE__ */ u(Fn, {
|
|
4243
4509
|
bundle: g.bundle,
|
|
4244
4510
|
mode: l,
|
|
4245
4511
|
style: d
|
|
4246
4512
|
});
|
|
4247
4513
|
}
|
|
4248
4514
|
//#endregion
|
|
4249
|
-
export {
|
|
4515
|
+
export { Pn as PageRenderer, Fn as WebimContent, In as WebimPage, se as fetchPage, Me as renderRichContent, ie as resolveTheme };
|