webim-adapter 0.24.0 → 0.25.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 +297 -287
- package/build/webim-embed.js +7 -7
- package/build/webim-ssr.js +304 -294
- 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: U, overlayOpacity:
|
|
231
|
+
let { overlayColor: U, overlayOpacity: W } = t;
|
|
232
232
|
if (delete t.overlayColor, delete t.overlayOpacity, U) {
|
|
233
|
-
let e = `color-mix(in srgb, ${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;
|
|
@@ -323,7 +323,9 @@ function F(e, t) {
|
|
|
323
323
|
}
|
|
324
324
|
var I = "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif", L = {
|
|
325
325
|
light: {
|
|
326
|
-
background: "#
|
|
326
|
+
background: "#f2f2f2",
|
|
327
|
+
surface: "#f2f2f2",
|
|
328
|
+
border: "#d1d5db",
|
|
327
329
|
text: "#111827",
|
|
328
330
|
accent: "#111827",
|
|
329
331
|
accentText: "#ffffff",
|
|
@@ -342,6 +344,8 @@ var I = "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Ari
|
|
|
342
344
|
},
|
|
343
345
|
dark: {
|
|
344
346
|
background: "#0f172a",
|
|
347
|
+
surface: "#1e293b",
|
|
348
|
+
border: "rgba(226, 232, 240, 0.18)",
|
|
345
349
|
text: "#e2e8f0",
|
|
346
350
|
accent: "#6366f1",
|
|
347
351
|
accentText: "#ffffff",
|
|
@@ -412,6 +416,8 @@ function B(e) {
|
|
|
412
416
|
function V(e) {
|
|
413
417
|
return {
|
|
414
418
|
"--page-bg": e.background,
|
|
419
|
+
"--page-surface": e.surface ?? e.background,
|
|
420
|
+
"--page-border": e.border ?? L.light.border,
|
|
415
421
|
"--page-text": e.text,
|
|
416
422
|
"--page-accent": e.accent,
|
|
417
423
|
"--page-accent-text": e.accentText,
|
|
@@ -444,9 +450,12 @@ function re(e, t = "light") {
|
|
|
444
450
|
function ie(e, t) {
|
|
445
451
|
return e?.themeRef && t?.[e.themeRef] || e?.theme;
|
|
446
452
|
}
|
|
453
|
+
function ae(e, t) {
|
|
454
|
+
return e === "light" || e === "dark" ? e : t === "light" || t === "dark" ? t : "auto";
|
|
455
|
+
}
|
|
447
456
|
//#endregion
|
|
448
457
|
//#region src/bundle.js
|
|
449
|
-
function
|
|
458
|
+
function oe({ page: e, settings: t, tenant: n, apiUrl: r, locale: i }) {
|
|
450
459
|
let a = {
|
|
451
460
|
...t?.global ?? {},
|
|
452
461
|
...t?.tenant ?? {}
|
|
@@ -461,6 +470,7 @@ function ae({ page: e, settings: t, tenant: n, apiUrl: r, locale: i }) {
|
|
|
461
470
|
custom: o.custom,
|
|
462
471
|
seo: o.seo,
|
|
463
472
|
direction: o.direction,
|
|
473
|
+
scheme: o.scheme,
|
|
464
474
|
locale: i || a.locales?.default,
|
|
465
475
|
locales: a.locales,
|
|
466
476
|
tenant: n ?? "",
|
|
@@ -470,7 +480,7 @@ function ae({ page: e, settings: t, tenant: n, apiUrl: r, locale: i }) {
|
|
|
470
480
|
}
|
|
471
481
|
//#endregion
|
|
472
482
|
//#region src/fetchPage.js
|
|
473
|
-
var
|
|
483
|
+
var H = async (e) => {
|
|
474
484
|
let t = await e.json().catch(() => null);
|
|
475
485
|
if (!e.ok || t?.success === !1) throw Error(t?.error?.message || `Request failed (${e.status})`);
|
|
476
486
|
return t?.payload ?? t;
|
|
@@ -481,7 +491,7 @@ async function se({ apiUrl: e, tenant: t, slug: n, locale: r, preview: i, token:
|
|
|
481
491
|
let c = s ?? fetch, l = e.replace(/\/$/, ""), u = {
|
|
482
492
|
...t ? { "x-tenant": t } : {},
|
|
483
493
|
...a ? { authorization: `Bearer ${a}` } : {}
|
|
484
|
-
}, [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({
|
|
485
495
|
page: d,
|
|
486
496
|
settings: f,
|
|
487
497
|
tenant: t,
|
|
@@ -489,7 +499,7 @@ async function se({ apiUrl: e, tenant: t, slug: n, locale: r, preview: i, token:
|
|
|
489
499
|
locale: r
|
|
490
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))];
|
|
491
501
|
if (m.length) {
|
|
492
|
-
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) => {
|
|
493
503
|
let n = Array.isArray(e) ? e : Array.isArray(e?.data) ? e.data : [], r = Number(e?.total?.filtered ?? e?.total?.all ?? n.length);
|
|
494
504
|
return [[t, n], [`${t}:total`, Number.isFinite(r) ? r : n.length]];
|
|
495
505
|
}).catch(() => [[t, []]])));
|
|
@@ -514,34 +524,34 @@ var ce = /* @__PURE__ */ new Set([
|
|
|
514
524
|
"yi",
|
|
515
525
|
"dv",
|
|
516
526
|
"ckb"
|
|
517
|
-
]), le = (e) => ce.has(String(e || "").toLowerCase().split(/[-_]/)[0]) ? "rtl" : "ltr", ue = (e, t) => e === "ltr" || e === "rtl" ? e : t ? le(t) : void 0,
|
|
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({
|
|
518
528
|
tenant: "",
|
|
519
529
|
apiUrl: "/api",
|
|
520
530
|
locale: "",
|
|
521
531
|
settings: null
|
|
522
|
-
}),
|
|
532
|
+
}), W = t(null), G = (e) => {
|
|
523
533
|
let t = Number(e?.__page);
|
|
524
534
|
if (Number.isFinite(t) && t >= 1) return Math.floor(t);
|
|
525
535
|
if (typeof window > "u") return 1;
|
|
526
536
|
let n = Number(new URLSearchParams(window.location.search).get("page"));
|
|
527
537
|
return Number.isFinite(n) && n >= 1 ? Math.floor(n) : 1;
|
|
528
|
-
},
|
|
538
|
+
}, de = () => {
|
|
529
539
|
if (typeof window > "u") return {};
|
|
530
540
|
let e = {};
|
|
531
541
|
return new URLSearchParams(window.location.search).forEach((t, n) => {
|
|
532
542
|
n.startsWith("f_") && n.length > 2 && t !== "" && (e[n.slice(2)] = t);
|
|
533
543
|
}), e;
|
|
534
|
-
},
|
|
544
|
+
}, fe = (e) => {
|
|
535
545
|
let t = {
|
|
536
546
|
...e && typeof e == "object" && !Array.isArray(e) ? e : {},
|
|
537
|
-
...
|
|
547
|
+
...de()
|
|
538
548
|
};
|
|
539
549
|
return Object.fromEntries(Object.entries(t).filter(([, e]) => typeof e == "string" && e.trim() !== ""));
|
|
540
|
-
},
|
|
541
|
-
function
|
|
550
|
+
}, pe = t(null), me = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
551
|
+
function K(e, t) {
|
|
542
552
|
if (t) return t.includes(".") ? t.split(".").reduce((e, t) => e && typeof e == "object" ? e[t] : void 0, e) : e?.[t];
|
|
543
553
|
}
|
|
544
|
-
var
|
|
554
|
+
var he = (e) => {
|
|
545
555
|
let t = [];
|
|
546
556
|
for (let [n, r] of Object.entries(e ?? {})) {
|
|
547
557
|
if (!/^[\w-]+$/.test(n)) continue;
|
|
@@ -551,36 +561,36 @@ var ge = (e) => {
|
|
|
551
561
|
}
|
|
552
562
|
return t;
|
|
553
563
|
};
|
|
554
|
-
function
|
|
564
|
+
function q(e) {
|
|
555
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(" ") : "";
|
|
556
566
|
}
|
|
557
|
-
function
|
|
558
|
-
let n = t?.data ?? {}, r =
|
|
567
|
+
function ge(e, t) {
|
|
568
|
+
let n = t?.data ?? {}, r = he(n);
|
|
559
569
|
if (!r.length) return e;
|
|
560
|
-
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;
|
|
561
571
|
return a(e);
|
|
562
572
|
}
|
|
563
|
-
var
|
|
573
|
+
var _e = {
|
|
564
574
|
margin: 0,
|
|
565
575
|
fontWeight: 700,
|
|
566
576
|
lineHeight: 1.2,
|
|
567
577
|
fontFamily: "var(--page-heading-font, inherit)"
|
|
568
|
-
},
|
|
578
|
+
}, ve = { margin: 0 }, J = {
|
|
569
579
|
display: "inline-block",
|
|
570
580
|
textDecoration: "none",
|
|
571
581
|
cursor: "pointer",
|
|
572
582
|
backgroundColor: "var(--page-accent, #111827)",
|
|
573
583
|
color: "var(--page-accent-text, #ffffff)"
|
|
574
|
-
},
|
|
584
|
+
}, ye = {
|
|
575
585
|
flexGrow: 1,
|
|
576
586
|
display: "flex",
|
|
577
587
|
flexDirection: "column",
|
|
578
588
|
position: "relative"
|
|
579
|
-
},
|
|
589
|
+
}, be = {
|
|
580
590
|
display: "flex",
|
|
581
591
|
flexDirection: "column"
|
|
582
592
|
};
|
|
583
|
-
function
|
|
593
|
+
function xe({ style: e }) {
|
|
584
594
|
let t = e?.backgroundVideo;
|
|
585
595
|
if (!t) return null;
|
|
586
596
|
let n = {
|
|
@@ -606,7 +616,7 @@ function Se({ style: e }) {
|
|
|
606
616
|
background: r
|
|
607
617
|
} })] });
|
|
608
618
|
}
|
|
609
|
-
var
|
|
619
|
+
var Se = (e, t) => e?.backgroundVideo ? {
|
|
610
620
|
position: "relative",
|
|
611
621
|
...t,
|
|
612
622
|
...C(e)
|
|
@@ -614,24 +624,24 @@ var Ce = (e, t) => e?.backgroundVideo ? {
|
|
|
614
624
|
...t,
|
|
615
625
|
...C(e)
|
|
616
626
|
};
|
|
617
|
-
function
|
|
627
|
+
function Ce({ style: e, nodeRef: t, children: n }) {
|
|
618
628
|
return /* @__PURE__ */ d("div", {
|
|
619
629
|
ref: t,
|
|
620
630
|
style: {
|
|
621
|
-
...
|
|
631
|
+
...ye,
|
|
622
632
|
...C(e)
|
|
623
633
|
},
|
|
624
|
-
children: [/* @__PURE__ */ u(
|
|
634
|
+
children: [/* @__PURE__ */ u(xe, { style: e }), n]
|
|
625
635
|
});
|
|
626
636
|
}
|
|
627
|
-
function
|
|
637
|
+
function we({ style: e, nodeRef: t, children: n }) {
|
|
628
638
|
return /* @__PURE__ */ d("section", {
|
|
629
639
|
ref: t,
|
|
630
|
-
style:
|
|
631
|
-
children: [/* @__PURE__ */ u(
|
|
640
|
+
style: Se(e, be),
|
|
641
|
+
children: [/* @__PURE__ */ u(xe, { style: e }), n]
|
|
632
642
|
});
|
|
633
643
|
}
|
|
634
|
-
function
|
|
644
|
+
function Te({ style: e, freeLayout: t, nodeRef: n, children: r }) {
|
|
635
645
|
let i = t ? {
|
|
636
646
|
position: "relative",
|
|
637
647
|
minHeight: 240
|
|
@@ -640,32 +650,32 @@ function Ee({ style: e, freeLayout: t, nodeRef: n, children: r }) {
|
|
|
640
650
|
ref: n,
|
|
641
651
|
style: i ? {
|
|
642
652
|
...i,
|
|
643
|
-
...
|
|
644
|
-
} :
|
|
645
|
-
children: [/* @__PURE__ */ u(
|
|
653
|
+
...Se(e)
|
|
654
|
+
} : Se(e),
|
|
655
|
+
children: [/* @__PURE__ */ u(xe, { style: e }), r]
|
|
646
656
|
});
|
|
647
657
|
}
|
|
648
|
-
function
|
|
658
|
+
function Ee({ text: e, parts: t, tag: n = "h2", style: r, linked: i, nodeRef: a }) {
|
|
649
659
|
return /* @__PURE__ */ u(n, {
|
|
650
660
|
ref: a,
|
|
651
661
|
style: {
|
|
652
|
-
...
|
|
662
|
+
..._e,
|
|
653
663
|
...C(r)
|
|
654
664
|
},
|
|
655
|
-
children:
|
|
665
|
+
children: Y(t, e, i)
|
|
656
666
|
});
|
|
657
667
|
}
|
|
658
|
-
var
|
|
668
|
+
var De = {
|
|
659
669
|
fontFamily: z.mono.value,
|
|
660
670
|
background: "rgba(148, 163, 184, 0.18)",
|
|
661
671
|
padding: "1px 5px",
|
|
662
672
|
borderRadius: 4,
|
|
663
673
|
fontSize: "0.9em"
|
|
664
674
|
};
|
|
665
|
-
function
|
|
675
|
+
function Oe(e, t = [], n, r) {
|
|
666
676
|
let i = e;
|
|
667
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", {
|
|
668
|
-
style:
|
|
678
|
+
style: De,
|
|
669
679
|
children: i
|
|
670
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", {
|
|
671
681
|
href: n,
|
|
@@ -675,13 +685,13 @@ function ke(e, t = [], n, r) {
|
|
|
675
685
|
children: i
|
|
676
686
|
})), i;
|
|
677
687
|
}
|
|
678
|
-
function
|
|
688
|
+
function Y(t, n, r) {
|
|
679
689
|
return t?.length ? t.map((t, n) => {
|
|
680
690
|
if (t.slot) return /* @__PURE__ */ u(e, { children: r?.[t.slot] ?? null }, n);
|
|
681
|
-
if (t.parts) return /* @__PURE__ */ u(e, { children:
|
|
691
|
+
if (t.parts) return /* @__PURE__ */ u(e, { children: Y(t.parts, "", r) }, n);
|
|
682
692
|
let i = t.text;
|
|
683
693
|
return t.sup ? i = /* @__PURE__ */ u("sup", { children: i }) : t.sub && (i = /* @__PURE__ */ u("sub", { children: i })), t.code && (i = /* @__PURE__ */ u("code", {
|
|
684
|
-
style:
|
|
694
|
+
style: De,
|
|
685
695
|
children: i
|
|
686
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", {
|
|
687
697
|
style: {
|
|
@@ -698,13 +708,13 @@ function q(t, n, r) {
|
|
|
698
708
|
})), /* @__PURE__ */ u(e, { children: i }, n);
|
|
699
709
|
}) : n;
|
|
700
710
|
}
|
|
701
|
-
function
|
|
711
|
+
function ke({ parts: e, text: t, marks: n, href: r, target: i, style: a }) {
|
|
702
712
|
return /* @__PURE__ */ u("span", {
|
|
703
713
|
style: C(a),
|
|
704
|
-
children: e?.length ?
|
|
714
|
+
children: e?.length ? Y(e, t) : Oe(t, n, r, i)
|
|
705
715
|
});
|
|
706
716
|
}
|
|
707
|
-
var
|
|
717
|
+
var Ae = {
|
|
708
718
|
h1: 40,
|
|
709
719
|
h2: 32,
|
|
710
720
|
h3: 26,
|
|
@@ -712,7 +722,7 @@ var je = {
|
|
|
712
722
|
h5: 19,
|
|
713
723
|
h6: 16
|
|
714
724
|
};
|
|
715
|
-
function
|
|
725
|
+
function je({ align: e = "center", width: t, wrap: n } = {}) {
|
|
716
726
|
let r = t ? `${t}%` : void 0;
|
|
717
727
|
if (e === "full") return { width: "100%" };
|
|
718
728
|
let i = e === "left" || e === "right";
|
|
@@ -746,8 +756,8 @@ function Me({ align: e = "center", width: t, wrap: n } = {}) {
|
|
|
746
756
|
marginRight: "auto"
|
|
747
757
|
};
|
|
748
758
|
}
|
|
749
|
-
function
|
|
750
|
-
let r = n ?? ((e, n) =>
|
|
759
|
+
function Me(e = [], t, n) {
|
|
760
|
+
let r = n ?? ((e, n) => Y(e, n, t));
|
|
751
761
|
return e.map((t, n) => {
|
|
752
762
|
let i = {
|
|
753
763
|
marginTop: 0,
|
|
@@ -769,7 +779,7 @@ function Ne(e = [], t, n) {
|
|
|
769
779
|
marginLeft: 0,
|
|
770
780
|
marginRight: 0,
|
|
771
781
|
...i,
|
|
772
|
-
...
|
|
782
|
+
...je(t)
|
|
773
783
|
},
|
|
774
784
|
children: [t.href ? /* @__PURE__ */ u("a", {
|
|
775
785
|
href: t.href,
|
|
@@ -788,16 +798,16 @@ function Ne(e = [], t, n) {
|
|
|
788
798
|
})]
|
|
789
799
|
}, n);
|
|
790
800
|
}
|
|
791
|
-
if (t.type === "video") return
|
|
801
|
+
if (t.type === "video") return Ue(t.url) ? /* @__PURE__ */ u("div", {
|
|
792
802
|
style: {
|
|
793
803
|
...i,
|
|
794
|
-
...
|
|
804
|
+
...je({
|
|
795
805
|
align: t.align,
|
|
796
806
|
wrap: t.wrap,
|
|
797
807
|
width: t.width ?? 100
|
|
798
808
|
})
|
|
799
809
|
},
|
|
800
|
-
children: /* @__PURE__ */ u(
|
|
810
|
+
children: /* @__PURE__ */ u(We, {
|
|
801
811
|
url: t.url,
|
|
802
812
|
autoplay: t.autoplay,
|
|
803
813
|
muted: t.muted,
|
|
@@ -859,17 +869,17 @@ function Ne(e = [], t, n) {
|
|
|
859
869
|
}
|
|
860
870
|
if (t.type === "quote") return /* @__PURE__ */ u("blockquote", {
|
|
861
871
|
style: {
|
|
862
|
-
...
|
|
872
|
+
...Pe,
|
|
863
873
|
...i
|
|
864
874
|
},
|
|
865
875
|
children: r(t.parts, t.text)
|
|
866
876
|
}, n);
|
|
867
|
-
if (
|
|
877
|
+
if (Ae[t.type]) {
|
|
868
878
|
let e = t.type;
|
|
869
879
|
return /* @__PURE__ */ u(e, {
|
|
870
880
|
style: {
|
|
871
|
-
...
|
|
872
|
-
fontSize:
|
|
881
|
+
..._e,
|
|
882
|
+
fontSize: Ae[t.type],
|
|
873
883
|
...i
|
|
874
884
|
},
|
|
875
885
|
children: r(t.parts, t.text)
|
|
@@ -877,39 +887,39 @@ function Ne(e = [], t, n) {
|
|
|
877
887
|
}
|
|
878
888
|
return /* @__PURE__ */ u("p", {
|
|
879
889
|
style: {
|
|
880
|
-
...
|
|
890
|
+
...ve,
|
|
881
891
|
...i
|
|
882
892
|
},
|
|
883
893
|
children: r(t.parts, t.text)
|
|
884
894
|
}, n);
|
|
885
895
|
});
|
|
886
896
|
}
|
|
887
|
-
function
|
|
897
|
+
function Ne({ content: e, style: t, linked: n, nodeRef: r }) {
|
|
888
898
|
return /* @__PURE__ */ u("div", {
|
|
889
899
|
ref: r,
|
|
890
900
|
style: {
|
|
891
901
|
display: "flow-root",
|
|
892
902
|
...C(t)
|
|
893
903
|
},
|
|
894
|
-
children:
|
|
904
|
+
children: Me(e, n)
|
|
895
905
|
});
|
|
896
906
|
}
|
|
897
|
-
var
|
|
907
|
+
var Pe = {
|
|
898
908
|
margin: 0,
|
|
899
909
|
padding: "8px 0 8px 20px",
|
|
900
910
|
borderLeft: "4px solid var(--page-accent, rgba(148, 163, 184, 0.6))"
|
|
901
911
|
};
|
|
902
|
-
function
|
|
912
|
+
function Fe({ text: e, parts: t, style: n, linked: r, nodeRef: i }) {
|
|
903
913
|
return /* @__PURE__ */ u("blockquote", {
|
|
904
914
|
ref: i,
|
|
905
915
|
style: {
|
|
906
|
-
...
|
|
916
|
+
...Pe,
|
|
907
917
|
...C(n)
|
|
908
918
|
},
|
|
909
|
-
children:
|
|
919
|
+
children: Y(t, e, r)
|
|
910
920
|
});
|
|
911
921
|
}
|
|
912
|
-
function
|
|
922
|
+
function Ie({ ordered: e, items: t = [], style: n, nodeRef: r }) {
|
|
913
923
|
return /* @__PURE__ */ u(e ? "ol" : "ul", {
|
|
914
924
|
ref: r,
|
|
915
925
|
style: {
|
|
@@ -919,53 +929,53 @@ function Le({ ordered: e, items: t = [], style: n, nodeRef: r }) {
|
|
|
919
929
|
},
|
|
920
930
|
children: t.map((e, t) => /* @__PURE__ */ u("li", {
|
|
921
931
|
style: { marginBottom: 4 },
|
|
922
|
-
children:
|
|
932
|
+
children: Y(e.parts, e.text)
|
|
923
933
|
}, t))
|
|
924
934
|
});
|
|
925
935
|
}
|
|
926
|
-
function
|
|
936
|
+
function Le({ text: e, parts: t, style: n, linked: r, nodeRef: i }) {
|
|
927
937
|
return /* @__PURE__ */ u("p", {
|
|
928
938
|
ref: i,
|
|
929
939
|
style: {
|
|
930
|
-
...
|
|
940
|
+
...ve,
|
|
931
941
|
...C(n)
|
|
932
942
|
},
|
|
933
|
-
children:
|
|
943
|
+
children: Y(t, e, r)
|
|
934
944
|
});
|
|
935
945
|
}
|
|
936
|
-
var
|
|
946
|
+
var Re = {
|
|
937
947
|
color: "var(--page-accent, inherit)",
|
|
938
948
|
textDecoration: "underline",
|
|
939
949
|
textUnderlineOffset: 3,
|
|
940
950
|
cursor: "pointer"
|
|
941
951
|
};
|
|
942
|
-
function
|
|
952
|
+
function ze({ text: e, parts: t, href: n, target: r, style: i, linked: a, nodeRef: o }) {
|
|
943
953
|
return /* @__PURE__ */ u("a", {
|
|
944
954
|
ref: o,
|
|
945
955
|
href: n || "#",
|
|
946
956
|
target: r || void 0,
|
|
947
957
|
rel: r === "_blank" ? "noopener noreferrer" : void 0,
|
|
948
958
|
style: {
|
|
949
|
-
...
|
|
959
|
+
...Re,
|
|
950
960
|
...C(i)
|
|
951
961
|
},
|
|
952
|
-
children:
|
|
962
|
+
children: Y(t, e, a)
|
|
953
963
|
});
|
|
954
964
|
}
|
|
955
|
-
function
|
|
965
|
+
function Be({ text: e, parts: t, href: n, target: r, style: i, linked: a, nodeRef: o }) {
|
|
956
966
|
return /* @__PURE__ */ u("a", {
|
|
957
967
|
ref: o,
|
|
958
968
|
href: n || "#",
|
|
959
969
|
target: r || void 0,
|
|
960
970
|
rel: r === "_blank" ? "noopener noreferrer" : void 0,
|
|
961
971
|
style: {
|
|
962
|
-
...
|
|
972
|
+
...J,
|
|
963
973
|
...C(i)
|
|
964
974
|
},
|
|
965
|
-
children:
|
|
975
|
+
children: Y(t, e, a)
|
|
966
976
|
});
|
|
967
977
|
}
|
|
968
|
-
function
|
|
978
|
+
function Ve({ src: e, alt: t, style: n, nodeRef: r }) {
|
|
969
979
|
return e ? /* @__PURE__ */ u("img", {
|
|
970
980
|
ref: r,
|
|
971
981
|
src: e,
|
|
@@ -977,7 +987,7 @@ function He({ src: e, alt: t, style: n, nodeRef: r }) {
|
|
|
977
987
|
}
|
|
978
988
|
}) : null;
|
|
979
989
|
}
|
|
980
|
-
function
|
|
990
|
+
function He({ src: e, poster: t, controls: n = !0, autoplay: r = !1, loop: i = !1, muted: a = !1, style: o, nodeRef: s }) {
|
|
981
991
|
return e ? /* @__PURE__ */ u("video", {
|
|
982
992
|
ref: s,
|
|
983
993
|
src: e,
|
|
@@ -995,9 +1005,9 @@ function Ue({ src: e, poster: t, controls: n = !0, autoplay: r = !1, loop: i = !
|
|
|
995
1005
|
}
|
|
996
1006
|
}) : null;
|
|
997
1007
|
}
|
|
998
|
-
var
|
|
999
|
-
function
|
|
1000
|
-
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);
|
|
1001
1011
|
if (!c) return null;
|
|
1002
1012
|
let l = new URLSearchParams({ rel: "0" });
|
|
1003
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", {
|
|
@@ -1023,7 +1033,7 @@ function Ge({ url: e, autoplay: t = !1, muted: n = !1, loop: r = !1, controls: i
|
|
|
1023
1033
|
})
|
|
1024
1034
|
});
|
|
1025
1035
|
}
|
|
1026
|
-
function
|
|
1036
|
+
function Ge({ src: e, title: t, allowFullscreen: n = !0, style: r, nodeRef: i }) {
|
|
1027
1037
|
return e ? /* @__PURE__ */ u("iframe", {
|
|
1028
1038
|
ref: i,
|
|
1029
1039
|
src: e,
|
|
@@ -1039,7 +1049,7 @@ function Ke({ src: e, title: t, allowFullscreen: n = !0, style: r, nodeRef: i })
|
|
|
1039
1049
|
}
|
|
1040
1050
|
}) : null;
|
|
1041
1051
|
}
|
|
1042
|
-
function
|
|
1052
|
+
function Ke({ code: e, runScripts: t = !0, style: n, nodeRef: r }) {
|
|
1043
1053
|
let [a, o] = c(null);
|
|
1044
1054
|
return i(() => {
|
|
1045
1055
|
a && (a.innerHTML = e || "", t && a.querySelectorAll("script").forEach((e) => {
|
|
@@ -1058,7 +1068,7 @@ function qe({ code: e, runScripts: t = !0, style: n, nodeRef: r }) {
|
|
|
1058
1068
|
style: C(n)
|
|
1059
1069
|
});
|
|
1060
1070
|
}
|
|
1061
|
-
function
|
|
1071
|
+
function qe({ height: e, nodeRef: t }) {
|
|
1062
1072
|
return /* @__PURE__ */ u("div", {
|
|
1063
1073
|
ref: t,
|
|
1064
1074
|
style: {
|
|
@@ -1068,7 +1078,7 @@ function Je({ height: e, nodeRef: t }) {
|
|
|
1068
1078
|
}
|
|
1069
1079
|
});
|
|
1070
1080
|
}
|
|
1071
|
-
function
|
|
1081
|
+
function Je({ style: e, nodeRef: t }) {
|
|
1072
1082
|
return /* @__PURE__ */ u("div", {
|
|
1073
1083
|
ref: t,
|
|
1074
1084
|
style: {
|
|
@@ -1079,7 +1089,7 @@ function Ye({ style: e, nodeRef: t }) {
|
|
|
1079
1089
|
}
|
|
1080
1090
|
});
|
|
1081
1091
|
}
|
|
1082
|
-
var
|
|
1092
|
+
var Ye = {
|
|
1083
1093
|
position: "absolute",
|
|
1084
1094
|
top: "50%",
|
|
1085
1095
|
transform: "translateY(-50%)",
|
|
@@ -1096,7 +1106,7 @@ var Xe = {
|
|
|
1096
1106
|
alignItems: "center",
|
|
1097
1107
|
justifyContent: "center",
|
|
1098
1108
|
padding: 0
|
|
1099
|
-
},
|
|
1109
|
+
}, Xe = {
|
|
1100
1110
|
bottom: {
|
|
1101
1111
|
inset: "auto 0 0 0",
|
|
1102
1112
|
padding: "40px 24px 20px",
|
|
@@ -1115,8 +1125,8 @@ var Xe = {
|
|
|
1115
1125
|
padding: 24,
|
|
1116
1126
|
textShadow: "0 2px 12px rgba(0, 0, 0, 0.6)"
|
|
1117
1127
|
}
|
|
1118
|
-
},
|
|
1119
|
-
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 }) {
|
|
1120
1130
|
let [p, m] = c(0), [h, g] = c(!1), [_, v] = c(null), y = e ? Math.min(p, e - 1) : 0;
|
|
1121
1131
|
if (i(() => {
|
|
1122
1132
|
if (!n || h || _ || e < 2) return;
|
|
@@ -1132,7 +1142,7 @@ function $e({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
|
|
|
1132
1142
|
let b = (t) => m((t + e) % e), x = () => {
|
|
1133
1143
|
if (!_) return;
|
|
1134
1144
|
let { dx: e } = _;
|
|
1135
|
-
v(null), e < -48 ? b(y + 1) : e >
|
|
1145
|
+
v(null), e < -48 ? b(y + 1) : e > Ze && b(y - 1);
|
|
1136
1146
|
};
|
|
1137
1147
|
return /* @__PURE__ */ d("div", {
|
|
1138
1148
|
ref: f,
|
|
@@ -1180,7 +1190,7 @@ function $e({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
|
|
|
1180
1190
|
type: "button",
|
|
1181
1191
|
"aria-label": "Previous slide",
|
|
1182
1192
|
style: {
|
|
1183
|
-
...
|
|
1193
|
+
...Ye,
|
|
1184
1194
|
left: 12
|
|
1185
1195
|
},
|
|
1186
1196
|
onClick: () => b(y - 1),
|
|
@@ -1190,7 +1200,7 @@ function $e({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
|
|
|
1190
1200
|
type: "button",
|
|
1191
1201
|
"aria-label": "Next slide",
|
|
1192
1202
|
style: {
|
|
1193
|
-
...
|
|
1203
|
+
...Ye,
|
|
1194
1204
|
right: 12
|
|
1195
1205
|
},
|
|
1196
1206
|
onClick: () => b(y + 1),
|
|
@@ -1224,7 +1234,7 @@ function $e({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
|
|
|
1224
1234
|
] })]
|
|
1225
1235
|
});
|
|
1226
1236
|
}
|
|
1227
|
-
var
|
|
1237
|
+
var $e = (e, t) => ({
|
|
1228
1238
|
position: "absolute",
|
|
1229
1239
|
inset: 0,
|
|
1230
1240
|
backgroundImage: e ? `url(${e})` : "none",
|
|
@@ -1232,18 +1242,18 @@ var et = (e, t) => ({
|
|
|
1232
1242
|
backgroundSize: "cover",
|
|
1233
1243
|
backgroundPosition: "center"
|
|
1234
1244
|
});
|
|
1235
|
-
function
|
|
1236
|
-
return e.length ? /* @__PURE__ */ u(
|
|
1245
|
+
function et({ slides: e = [], captionPosition: t = "bottom", captionAlign: n = "left", ...r }) {
|
|
1246
|
+
return e.length ? /* @__PURE__ */ u(Qe, {
|
|
1237
1247
|
...r,
|
|
1238
1248
|
count: e.length,
|
|
1239
1249
|
renderSlide: (r) => {
|
|
1240
1250
|
let i = e[r];
|
|
1241
|
-
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", {
|
|
1242
1252
|
style: {
|
|
1243
1253
|
position: "absolute",
|
|
1244
1254
|
color: "#fff",
|
|
1245
1255
|
textAlign: n,
|
|
1246
|
-
...
|
|
1256
|
+
...Xe[t] ?? Xe.bottom
|
|
1247
1257
|
},
|
|
1248
1258
|
children: [i.title && /* @__PURE__ */ u("div", {
|
|
1249
1259
|
style: {
|
|
@@ -1263,13 +1273,13 @@ function tt({ slides: e = [], captionPosition: t = "bottom", captionAlign: n = "
|
|
|
1263
1273
|
}
|
|
1264
1274
|
}) : null;
|
|
1265
1275
|
}
|
|
1266
|
-
function
|
|
1267
|
-
return e.length ? /* @__PURE__ */ u(
|
|
1276
|
+
function tt({ slides: e = [], linked: t, ...n }) {
|
|
1277
|
+
return e.length ? /* @__PURE__ */ u(Qe, {
|
|
1268
1278
|
...n,
|
|
1269
1279
|
count: e.length,
|
|
1270
1280
|
renderSlide: (n) => {
|
|
1271
1281
|
let r = e[n];
|
|
1272
|
-
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", {
|
|
1273
1283
|
style: {
|
|
1274
1284
|
position: "absolute",
|
|
1275
1285
|
inset: 0,
|
|
@@ -1281,7 +1291,7 @@ function nt({ slides: e = [], linked: t, ...n }) {
|
|
|
1281
1291
|
}
|
|
1282
1292
|
}) : null;
|
|
1283
1293
|
}
|
|
1284
|
-
function
|
|
1294
|
+
function nt({ images: e = [], columns: t = 3, gap: n = 8, showNames: r = !1, lightbox: a = !0, style: o, nodeRef: s, inert: f }) {
|
|
1285
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];
|
|
1286
1296
|
i(() => {
|
|
1287
1297
|
if (!v) return;
|
|
@@ -1480,19 +1490,19 @@ function rt({ images: e = [], columns: t = 3, gap: n = 8, showNames: r = !1, lig
|
|
|
1480
1490
|
]
|
|
1481
1491
|
});
|
|
1482
1492
|
}
|
|
1483
|
-
var
|
|
1493
|
+
var rt = {
|
|
1484
1494
|
color: "inherit",
|
|
1485
1495
|
textDecoration: "none",
|
|
1486
1496
|
fontSize: 14,
|
|
1487
1497
|
opacity: .85
|
|
1488
|
-
},
|
|
1489
|
-
background: "var(--page-
|
|
1498
|
+
}, it = {
|
|
1499
|
+
background: "var(--page-surface, #f2f2f2)",
|
|
1490
1500
|
color: "var(--page-text, #111827)",
|
|
1491
1501
|
border: "1px solid rgba(148, 163, 184, 0.25)",
|
|
1492
1502
|
boxShadow: "0 16px 40px rgba(15, 23, 42, 0.16)",
|
|
1493
1503
|
zIndex: 60
|
|
1494
1504
|
};
|
|
1495
|
-
function
|
|
1505
|
+
function at({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], style: s, nodeRef: f, menu: p = "auto", breakpoint: m = 768 }) {
|
|
1496
1506
|
let [h, g] = c(null), [_, v] = c(!1), [y, b] = c(!1), [x, S] = c(null);
|
|
1497
1507
|
i(() => {
|
|
1498
1508
|
if (!h) return;
|
|
@@ -1502,7 +1512,7 @@ function ot({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
|
|
|
1502
1512
|
let w = p === "hamburger" || p === "auto" && _, T = (e, t) => /* @__PURE__ */ d("a", {
|
|
1503
1513
|
href: e.href || "#",
|
|
1504
1514
|
style: {
|
|
1505
|
-
...
|
|
1515
|
+
...rt,
|
|
1506
1516
|
display: "block",
|
|
1507
1517
|
...t
|
|
1508
1518
|
},
|
|
@@ -1590,7 +1600,7 @@ function ot({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
|
|
|
1590
1600
|
let t = e.children ?? [];
|
|
1591
1601
|
if (!t.length) return /* @__PURE__ */ u("a", {
|
|
1592
1602
|
href: e.href || "#",
|
|
1593
|
-
style:
|
|
1603
|
+
style: rt,
|
|
1594
1604
|
children: e.label
|
|
1595
1605
|
}, e.key);
|
|
1596
1606
|
let n = e.type === "mega";
|
|
@@ -1604,7 +1614,7 @@ function ot({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
|
|
|
1604
1614
|
children: [/* @__PURE__ */ d("a", {
|
|
1605
1615
|
href: e.href || "#",
|
|
1606
1616
|
style: {
|
|
1607
|
-
...
|
|
1617
|
+
...rt,
|
|
1608
1618
|
cursor: "pointer"
|
|
1609
1619
|
},
|
|
1610
1620
|
children: [
|
|
@@ -1620,7 +1630,7 @@ function ot({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
|
|
|
1620
1630
|
]
|
|
1621
1631
|
}), x === e.key && (n ? /* @__PURE__ */ u("div", {
|
|
1622
1632
|
style: {
|
|
1623
|
-
...
|
|
1633
|
+
...it,
|
|
1624
1634
|
position: "absolute",
|
|
1625
1635
|
left: 0,
|
|
1626
1636
|
right: 0,
|
|
@@ -1636,7 +1646,7 @@ function ot({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
|
|
|
1636
1646
|
}))
|
|
1637
1647
|
}) : /* @__PURE__ */ u("div", {
|
|
1638
1648
|
style: {
|
|
1639
|
-
...
|
|
1649
|
+
...it,
|
|
1640
1650
|
position: "absolute",
|
|
1641
1651
|
top: "100%",
|
|
1642
1652
|
left: 0,
|
|
@@ -1665,7 +1675,7 @@ function ot({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
|
|
|
1665
1675
|
children: o.map((t) => /* @__PURE__ */ d(e, { children: [/* @__PURE__ */ u("a", {
|
|
1666
1676
|
href: t.href || "#",
|
|
1667
1677
|
style: {
|
|
1668
|
-
...
|
|
1678
|
+
...rt,
|
|
1669
1679
|
padding: "10px 4px",
|
|
1670
1680
|
fontWeight: (t.children ?? []).length ? 600 : 400,
|
|
1671
1681
|
opacity: 1
|
|
@@ -1676,7 +1686,7 @@ function ot({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
|
|
|
1676
1686
|
]
|
|
1677
1687
|
});
|
|
1678
1688
|
}
|
|
1679
|
-
function
|
|
1689
|
+
function ot({ tabs: e = [], linked: t, style: n, nodeRef: r }) {
|
|
1680
1690
|
let [i, a] = c(0), o = e.length ? Math.min(i, e.length - 1) : 0;
|
|
1681
1691
|
return e.length ? /* @__PURE__ */ d("div", {
|
|
1682
1692
|
ref: r,
|
|
@@ -1716,7 +1726,7 @@ function st({ tabs: e = [], linked: t, style: n, nodeRef: r }) {
|
|
|
1716
1726
|
}, e.key))]
|
|
1717
1727
|
}) : null;
|
|
1718
1728
|
}
|
|
1719
|
-
function
|
|
1729
|
+
function st({ items: e = [], linked: t, multiple: n = !1, style: r, nodeRef: i }) {
|
|
1720
1730
|
let [a, o] = c(() => new Set(e.length ? [e[0].key] : []));
|
|
1721
1731
|
if (!e.length) return null;
|
|
1722
1732
|
let s = (e) => o((t) => {
|
|
@@ -1773,36 +1783,36 @@ function ct({ items: e = [], linked: t, multiple: n = !1, style: r, nodeRef: i }
|
|
|
1773
1783
|
})
|
|
1774
1784
|
});
|
|
1775
1785
|
}
|
|
1776
|
-
var
|
|
1786
|
+
var ct = {
|
|
1777
1787
|
display: "flex",
|
|
1778
1788
|
flexDirection: "column",
|
|
1779
1789
|
gap: "12px"
|
|
1780
|
-
},
|
|
1790
|
+
}, X = {
|
|
1781
1791
|
fontSize: "14px",
|
|
1782
1792
|
fontWeight: 500,
|
|
1783
1793
|
color: "var(--page-text, #111827)"
|
|
1784
|
-
},
|
|
1794
|
+
}, Z = {
|
|
1785
1795
|
padding: "10px 12px",
|
|
1786
|
-
border: "1px solid #d1d5db",
|
|
1796
|
+
border: "1px solid var(--page-border, #d1d5db)",
|
|
1787
1797
|
borderRadius: "6px",
|
|
1788
1798
|
fontSize: "14px",
|
|
1789
1799
|
fontFamily: "inherit",
|
|
1790
1800
|
width: "100%",
|
|
1791
1801
|
boxSizing: "border-box",
|
|
1792
|
-
backgroundColor: "#
|
|
1793
|
-
color: "#111827"
|
|
1794
|
-
},
|
|
1802
|
+
backgroundColor: "var(--page-surface, #f2f2f2)",
|
|
1803
|
+
color: "var(--page-text, #111827)"
|
|
1804
|
+
}, lt = {
|
|
1795
1805
|
display: "flex",
|
|
1796
1806
|
alignItems: "center",
|
|
1797
1807
|
gap: "8px",
|
|
1798
1808
|
fontSize: "14px",
|
|
1799
1809
|
color: "var(--page-text, #111827)"
|
|
1800
|
-
},
|
|
1810
|
+
}, Q = (e) => e ? {
|
|
1801
1811
|
readOnly: !0,
|
|
1802
1812
|
tabIndex: -1,
|
|
1803
1813
|
onMouseDown: (e) => e.preventDefault()
|
|
1804
1814
|
} : {};
|
|
1805
|
-
function
|
|
1815
|
+
function ut(e, t) {
|
|
1806
1816
|
if (!e) return !0;
|
|
1807
1817
|
let n = t[e.field], r = n == null || n === "" ? "" : String(n), i = e.value ?? "";
|
|
1808
1818
|
switch (e.op) {
|
|
@@ -1816,11 +1826,11 @@ function dt(e, t) {
|
|
|
1816
1826
|
default: return !1;
|
|
1817
1827
|
}
|
|
1818
1828
|
}
|
|
1819
|
-
var
|
|
1829
|
+
var dt = {
|
|
1820
1830
|
display: "flex",
|
|
1821
1831
|
flexDirection: "column",
|
|
1822
1832
|
gap: 6
|
|
1823
|
-
},
|
|
1833
|
+
}, ft = {
|
|
1824
1834
|
font: "inherit",
|
|
1825
1835
|
fontSize: 15,
|
|
1826
1836
|
padding: "10px 12px",
|
|
@@ -1831,16 +1841,16 @@ var ft = {
|
|
|
1831
1841
|
width: "100%",
|
|
1832
1842
|
boxSizing: "border-box"
|
|
1833
1843
|
};
|
|
1834
|
-
function
|
|
1844
|
+
function pt(e, t) {
|
|
1835
1845
|
let n = Array.isArray(e?.options) ? e.options : [];
|
|
1836
1846
|
if (!e?.parentField) return n;
|
|
1837
1847
|
let r = t?.[e.parentField];
|
|
1838
1848
|
return r ? n.filter((e) => typeof e == "string" ? !1 : !e.parent || e.parent === r) : [];
|
|
1839
1849
|
}
|
|
1840
|
-
function
|
|
1850
|
+
function mt({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
1841
1851
|
let a = /* @__PURE__ */ d("span", {
|
|
1842
1852
|
style: {
|
|
1843
|
-
...
|
|
1853
|
+
...X,
|
|
1844
1854
|
fontSize: 14
|
|
1845
1855
|
},
|
|
1846
1856
|
children: [e.label, e.required ? " *" : ""]
|
|
@@ -1849,7 +1859,7 @@ function ht({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
|
1849
1859
|
required: e.required || void 0,
|
|
1850
1860
|
placeholder: e.placeholder || void 0,
|
|
1851
1861
|
disabled: r || void 0,
|
|
1852
|
-
style:
|
|
1862
|
+
style: ft,
|
|
1853
1863
|
value: t ?? "",
|
|
1854
1864
|
onChange: (t) => n(e.name, t.target.value)
|
|
1855
1865
|
};
|
|
@@ -1878,7 +1888,7 @@ function ht({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
|
1878
1888
|
borderRadius: 8,
|
|
1879
1889
|
display: "block"
|
|
1880
1890
|
}
|
|
1881
|
-
}) : 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, {
|
|
1882
1892
|
url: e.src,
|
|
1883
1893
|
style: { width: "100%" }
|
|
1884
1894
|
}) : /* @__PURE__ */ u("video", {
|
|
@@ -1890,14 +1900,14 @@ function ht({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
|
1890
1900
|
display: "block"
|
|
1891
1901
|
}
|
|
1892
1902
|
}) : null : /* @__PURE__ */ d("label", {
|
|
1893
|
-
style:
|
|
1903
|
+
style: dt,
|
|
1894
1904
|
children: [
|
|
1895
1905
|
a,
|
|
1896
1906
|
e.type === "textarea" || e.multiline ? /* @__PURE__ */ u("textarea", {
|
|
1897
1907
|
...o,
|
|
1898
1908
|
rows: 4,
|
|
1899
1909
|
style: {
|
|
1900
|
-
...
|
|
1910
|
+
...ft,
|
|
1901
1911
|
resize: "vertical"
|
|
1902
1912
|
}
|
|
1903
1913
|
}) : e.type === "select" ? /* @__PURE__ */ d("select", {
|
|
@@ -1906,7 +1916,7 @@ function ht({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
|
1906
1916
|
children: [/* @__PURE__ */ u("option", {
|
|
1907
1917
|
value: "",
|
|
1908
1918
|
children: e.placeholder || "—"
|
|
1909
|
-
}),
|
|
1919
|
+
}), pt(e, i).map((e, t) => /* @__PURE__ */ u("option", {
|
|
1910
1920
|
value: typeof e == "string" ? e : e.value,
|
|
1911
1921
|
children: typeof e == "string" ? e : e.label ?? e.value
|
|
1912
1922
|
}, t))]
|
|
@@ -1953,8 +1963,8 @@ function ht({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
|
1953
1963
|
]
|
|
1954
1964
|
});
|
|
1955
1965
|
}
|
|
1956
|
-
function
|
|
1957
|
-
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;
|
|
1958
1968
|
i(() => {
|
|
1959
1969
|
if (!f || !s) return;
|
|
1960
1970
|
let e = !0;
|
|
@@ -1975,9 +1985,9 @@ function gt({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
|
|
|
1975
1985
|
section: e,
|
|
1976
1986
|
fields: []
|
|
1977
1987
|
}) : j[j.length - 1].fields.push(e);
|
|
1978
|
-
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) => ({
|
|
1979
1989
|
...e,
|
|
1980
|
-
fields: e.fields.filter((e) =>
|
|
1990
|
+
fields: e.fields.filter((e) => ut(e.condition, E))
|
|
1981
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) => {
|
|
1982
1992
|
let t = E[e.name];
|
|
1983
1993
|
return e.required && (t == null || t === "" || t === !1);
|
|
@@ -2035,7 +2045,7 @@ function gt({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
|
|
|
2035
2045
|
}
|
|
2036
2046
|
},
|
|
2037
2047
|
style: {
|
|
2038
|
-
...
|
|
2048
|
+
...ct,
|
|
2039
2049
|
display: A === "success" ? "none" : "flex"
|
|
2040
2050
|
},
|
|
2041
2051
|
children: f && s ? /* @__PURE__ */ d(l, { children: [
|
|
@@ -2052,7 +2062,7 @@ function gt({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
|
|
|
2052
2062
|
},
|
|
2053
2063
|
children: N[F].section.help
|
|
2054
2064
|
}),
|
|
2055
|
-
I.map((e) => /* @__PURE__ */ u(
|
|
2065
|
+
I.map((e) => /* @__PURE__ */ u(mt, {
|
|
2056
2066
|
field: e,
|
|
2057
2067
|
value: E[e.name],
|
|
2058
2068
|
values: E,
|
|
@@ -2071,7 +2081,7 @@ function gt({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
|
|
|
2071
2081
|
disabled: h || void 0,
|
|
2072
2082
|
onClick: () => k(F - 1),
|
|
2073
2083
|
style: {
|
|
2074
|
-
...
|
|
2084
|
+
...J,
|
|
2075
2085
|
background: "transparent",
|
|
2076
2086
|
color: "inherit",
|
|
2077
2087
|
border: 0,
|
|
@@ -2084,7 +2094,7 @@ function gt({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
|
|
|
2084
2094
|
disabled: h || L.length > 0,
|
|
2085
2095
|
onClick: () => k(F + 1),
|
|
2086
2096
|
style: {
|
|
2087
|
-
...
|
|
2097
|
+
...J,
|
|
2088
2098
|
border: 0,
|
|
2089
2099
|
padding: "10px 22px",
|
|
2090
2100
|
borderRadius: 8,
|
|
@@ -2098,7 +2108,7 @@ function gt({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
|
|
|
2098
2108
|
type: "submit",
|
|
2099
2109
|
disabled: h || void 0,
|
|
2100
2110
|
style: {
|
|
2101
|
-
...
|
|
2111
|
+
...J,
|
|
2102
2112
|
border: 0,
|
|
2103
2113
|
padding: "10px 22px",
|
|
2104
2114
|
borderRadius: 8,
|
|
@@ -2125,10 +2135,10 @@ function gt({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
|
|
|
2125
2135
|
]
|
|
2126
2136
|
});
|
|
2127
2137
|
}
|
|
2128
|
-
var
|
|
2138
|
+
var $ = null, gt = null, _t = (e) => {
|
|
2129
2139
|
let t = typeof e == "string" && e.trim() ? e.trim() : "";
|
|
2130
|
-
if (
|
|
2131
|
-
if (
|
|
2140
|
+
if ($ && gt === t) return $;
|
|
2141
|
+
if ($ && typeof window < "u") {
|
|
2132
2142
|
for (let e of ["grecaptcha", "___grecaptcha_cfg"]) try {
|
|
2133
2143
|
delete window[e];
|
|
2134
2144
|
} catch {
|
|
@@ -2136,22 +2146,22 @@ var Z = null, _t = null, vt = (e) => {
|
|
|
2136
2146
|
}
|
|
2137
2147
|
document.querySelectorAll("script[src*=\"recaptcha\"]").forEach((e) => e.remove());
|
|
2138
2148
|
}
|
|
2139
|
-
return
|
|
2149
|
+
return gt = t, $ = new Promise((e) => {
|
|
2140
2150
|
if (typeof window > "u") return;
|
|
2141
2151
|
if (window.grecaptcha?.render) return e(window.grecaptcha);
|
|
2142
2152
|
window.__webimRecaptchaReady = () => e(window.grecaptcha);
|
|
2143
2153
|
let n = document.createElement("script");
|
|
2144
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);
|
|
2145
|
-
}),
|
|
2155
|
+
}), $;
|
|
2146
2156
|
};
|
|
2147
|
-
function
|
|
2148
|
-
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);
|
|
2149
2159
|
if (_.current = f, i(() => {
|
|
2150
2160
|
if (l || !h || !g.current) return;
|
|
2151
2161
|
let e = !0, r = (t) => {
|
|
2152
2162
|
e && typeof _.current == "function" && _.current(t);
|
|
2153
2163
|
};
|
|
2154
|
-
return
|
|
2164
|
+
return _t(a).then((i) => {
|
|
2155
2165
|
if (!(!e || !g.current || !i?.render)) {
|
|
2156
2166
|
g.current.innerHTML = "", r("");
|
|
2157
2167
|
try {
|
|
@@ -2233,17 +2243,17 @@ function yt({ siteKey: e, theme: t, size: n, hl: a, style: o, nodeRef: c, inert:
|
|
|
2233
2243
|
children: /* @__PURE__ */ u("div", { ref: g })
|
|
2234
2244
|
}) : null;
|
|
2235
2245
|
}
|
|
2236
|
-
function
|
|
2246
|
+
function yt({ text: e, parts: t, style: n, nodeRef: r, linked: i }) {
|
|
2237
2247
|
return /* @__PURE__ */ u("label", {
|
|
2238
2248
|
ref: r,
|
|
2239
2249
|
style: {
|
|
2240
|
-
...
|
|
2250
|
+
...X,
|
|
2241
2251
|
...C(n)
|
|
2242
2252
|
},
|
|
2243
|
-
children:
|
|
2253
|
+
children: Y(t, e, i)
|
|
2244
2254
|
});
|
|
2245
2255
|
}
|
|
2246
|
-
function
|
|
2256
|
+
function bt({ type: e = "text", name: t, placeholder: n, required: r, style: i, nodeRef: a, inert: o }) {
|
|
2247
2257
|
return /* @__PURE__ */ u("input", {
|
|
2248
2258
|
ref: a,
|
|
2249
2259
|
type: e,
|
|
@@ -2251,13 +2261,13 @@ function xt({ type: e = "text", name: t, placeholder: n, required: r, style: i,
|
|
|
2251
2261
|
placeholder: n,
|
|
2252
2262
|
required: !o && !!r,
|
|
2253
2263
|
style: {
|
|
2254
|
-
...
|
|
2264
|
+
...Z,
|
|
2255
2265
|
...C(i)
|
|
2256
2266
|
},
|
|
2257
|
-
...
|
|
2267
|
+
...Q(o)
|
|
2258
2268
|
});
|
|
2259
2269
|
}
|
|
2260
|
-
function
|
|
2270
|
+
function xt({ name: e, placeholder: t, rows: n = 4, required: r, style: i, nodeRef: a, inert: o }) {
|
|
2261
2271
|
return /* @__PURE__ */ u("textarea", {
|
|
2262
2272
|
ref: a,
|
|
2263
2273
|
name: e || void 0,
|
|
@@ -2265,18 +2275,18 @@ function St({ name: e, placeholder: t, rows: n = 4, required: r, style: i, nodeR
|
|
|
2265
2275
|
rows: n,
|
|
2266
2276
|
required: !o && !!r,
|
|
2267
2277
|
style: {
|
|
2268
|
-
...
|
|
2278
|
+
...Z,
|
|
2269
2279
|
resize: "vertical",
|
|
2270
2280
|
...C(i)
|
|
2271
2281
|
},
|
|
2272
|
-
...
|
|
2282
|
+
...Q(o)
|
|
2273
2283
|
});
|
|
2274
2284
|
}
|
|
2275
|
-
function
|
|
2285
|
+
function St({ kind: e = "checkbox", label: t, name: n, value: r, required: i, style: a, nodeRef: o, inert: s }) {
|
|
2276
2286
|
return /* @__PURE__ */ d("label", {
|
|
2277
2287
|
ref: o,
|
|
2278
2288
|
style: {
|
|
2279
|
-
...
|
|
2289
|
+
...lt,
|
|
2280
2290
|
...C(a)
|
|
2281
2291
|
},
|
|
2282
2292
|
children: [/* @__PURE__ */ u("input", {
|
|
@@ -2293,7 +2303,7 @@ function Ct({ kind: e = "checkbox", label: t, name: n, value: r, required: i, st
|
|
|
2293
2303
|
}), t]
|
|
2294
2304
|
});
|
|
2295
2305
|
}
|
|
2296
|
-
function
|
|
2306
|
+
function Ct({ name: e, placeholder: t, options: n = [], required: r, style: i, nodeRef: a, inert: o }) {
|
|
2297
2307
|
return /* @__PURE__ */ d("select", {
|
|
2298
2308
|
ref: a,
|
|
2299
2309
|
name: e || void 0,
|
|
@@ -2302,7 +2312,7 @@ function wt({ name: e, placeholder: t, options: n = [], required: r, style: i, n
|
|
|
2302
2312
|
onMouseDown: o ? (e) => e.preventDefault() : void 0,
|
|
2303
2313
|
tabIndex: o ? -1 : void 0,
|
|
2304
2314
|
style: {
|
|
2305
|
-
...
|
|
2315
|
+
...Z,
|
|
2306
2316
|
appearance: "auto",
|
|
2307
2317
|
...C(i)
|
|
2308
2318
|
},
|
|
@@ -2316,12 +2326,12 @@ function wt({ name: e, placeholder: t, options: n = [], required: r, style: i, n
|
|
|
2316
2326
|
}, t))]
|
|
2317
2327
|
});
|
|
2318
2328
|
}
|
|
2319
|
-
function
|
|
2329
|
+
function wt({ name: e, accept: t, required: n, text: r = "Choose a file…", style: i, nodeRef: a, inert: o }) {
|
|
2320
2330
|
let [s, l] = c(null);
|
|
2321
2331
|
return /* @__PURE__ */ d("label", {
|
|
2322
2332
|
ref: a,
|
|
2323
2333
|
style: {
|
|
2324
|
-
...
|
|
2334
|
+
...Z,
|
|
2325
2335
|
display: "flex",
|
|
2326
2336
|
alignItems: "center",
|
|
2327
2337
|
gap: "8px",
|
|
@@ -2348,12 +2358,12 @@ function Tt({ name: e, accept: t, required: n, text: r = "Choose a file…", sty
|
|
|
2348
2358
|
]
|
|
2349
2359
|
});
|
|
2350
2360
|
}
|
|
2351
|
-
function
|
|
2361
|
+
function Tt({ text: e = "Submit", style: t, nodeRef: n, inert: r }) {
|
|
2352
2362
|
return /* @__PURE__ */ u("button", {
|
|
2353
2363
|
ref: n,
|
|
2354
2364
|
type: r ? "button" : "submit",
|
|
2355
2365
|
style: {
|
|
2356
|
-
...
|
|
2366
|
+
...J,
|
|
2357
2367
|
border: 0,
|
|
2358
2368
|
cursor: "pointer",
|
|
2359
2369
|
alignSelf: "flex-start",
|
|
@@ -2368,7 +2378,7 @@ function Et({ text: e = "Submit", style: t, nodeRef: n, inert: r }) {
|
|
|
2368
2378
|
children: e
|
|
2369
2379
|
});
|
|
2370
2380
|
}
|
|
2371
|
-
function
|
|
2381
|
+
function Et({ cols: e = 2, rows: t = 1, style: n, nodeRef: r, linked: i }) {
|
|
2372
2382
|
let a = Math.max(1, (Number(e) || 1) * (Number(t) || 1));
|
|
2373
2383
|
return /* @__PURE__ */ u("div", {
|
|
2374
2384
|
ref: r,
|
|
@@ -2385,8 +2395,8 @@ function Dt({ cols: e = 2, rows: t = 1, style: n, nodeRef: r, linked: i }) {
|
|
|
2385
2395
|
}, t))
|
|
2386
2396
|
});
|
|
2387
2397
|
}
|
|
2388
|
-
function
|
|
2389
|
-
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);
|
|
2390
2400
|
i(() => {
|
|
2391
2401
|
if (typeof window > "u") return;
|
|
2392
2402
|
let e = () => w((e) => e + 1);
|
|
@@ -2394,7 +2404,7 @@ function Ot({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, i
|
|
|
2394
2404
|
window.removeEventListener("popstate", e), window.removeEventListener("webim:urlchange", e);
|
|
2395
2405
|
};
|
|
2396
2406
|
}, []);
|
|
2397
|
-
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);
|
|
2398
2408
|
if (i(() => {
|
|
2399
2409
|
if (!e || O) return;
|
|
2400
2410
|
let n = !0, r = new URLSearchParams();
|
|
@@ -2439,7 +2449,7 @@ function Ot({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, i
|
|
|
2439
2449
|
},
|
|
2440
2450
|
children: N.map((e) => /* @__PURE__ */ u("div", {
|
|
2441
2451
|
style: { minWidth: 0 },
|
|
2442
|
-
children: x.render(p, (t) =>
|
|
2452
|
+
children: x.render(p, (t) => ge(t, e))
|
|
2443
2453
|
}, e.id ?? e?.data?.slug))
|
|
2444
2454
|
}) : /* @__PURE__ */ u("div", {
|
|
2445
2455
|
ref: _,
|
|
@@ -2449,7 +2459,7 @@ function Ot({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, i
|
|
|
2449
2459
|
...C(g)
|
|
2450
2460
|
},
|
|
2451
2461
|
children: N.map((e) => {
|
|
2452
|
-
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";
|
|
2453
2463
|
return /* @__PURE__ */ d("div", {
|
|
2454
2464
|
style: {
|
|
2455
2465
|
display: "flex",
|
|
@@ -2496,7 +2506,7 @@ function Ot({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, i
|
|
|
2496
2506
|
lineHeight: 1.55,
|
|
2497
2507
|
opacity: .85
|
|
2498
2508
|
},
|
|
2499
|
-
children:
|
|
2509
|
+
children: Me(a)
|
|
2500
2510
|
})
|
|
2501
2511
|
]
|
|
2502
2512
|
})]
|
|
@@ -2504,13 +2514,13 @@ function Ot({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, i
|
|
|
2504
2514
|
})
|
|
2505
2515
|
});
|
|
2506
2516
|
}
|
|
2507
|
-
function
|
|
2508
|
-
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 = {
|
|
2509
2519
|
height: 34,
|
|
2510
2520
|
padding: "0 12px",
|
|
2511
2521
|
borderRadius: 8,
|
|
2512
2522
|
border: "1px solid var(--page-border, rgba(100, 116, 139, 0.4))",
|
|
2513
|
-
background: "var(--page-
|
|
2523
|
+
background: "var(--page-surface, #f2f2f2)",
|
|
2514
2524
|
color: "var(--page-text, #111827)",
|
|
2515
2525
|
fontSize: 13,
|
|
2516
2526
|
fontFamily: "inherit",
|
|
@@ -2553,7 +2563,7 @@ function kt({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, i
|
|
|
2553
2563
|
name: `f_${e.name}`,
|
|
2554
2564
|
defaultValue: o[e.name] ?? "",
|
|
2555
2565
|
style: s,
|
|
2556
|
-
...
|
|
2566
|
+
...Q(i),
|
|
2557
2567
|
children: [/* @__PURE__ */ u("option", {
|
|
2558
2568
|
value: "",
|
|
2559
2569
|
children: e.label || e.name
|
|
@@ -2568,7 +2578,7 @@ function kt({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, i
|
|
|
2568
2578
|
name: `f_${e.name}`,
|
|
2569
2579
|
defaultValue: o[e.name] ?? "",
|
|
2570
2580
|
style: s,
|
|
2571
|
-
...
|
|
2581
|
+
...Q(i),
|
|
2572
2582
|
children: [
|
|
2573
2583
|
/* @__PURE__ */ u("option", {
|
|
2574
2584
|
value: "",
|
|
@@ -2589,7 +2599,7 @@ function kt({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, i
|
|
|
2589
2599
|
defaultValue: o[e.name] ?? "",
|
|
2590
2600
|
placeholder: e.label || e.name,
|
|
2591
2601
|
style: s,
|
|
2592
|
-
...
|
|
2602
|
+
...Q(i)
|
|
2593
2603
|
}, e.name)), /* @__PURE__ */ u("button", {
|
|
2594
2604
|
type: "submit",
|
|
2595
2605
|
style: {
|
|
@@ -2602,12 +2612,12 @@ function kt({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, i
|
|
|
2602
2612
|
fontWeight: 600,
|
|
2603
2613
|
cursor: i ? "default" : "pointer"
|
|
2604
2614
|
},
|
|
2605
|
-
...
|
|
2615
|
+
...Q(i),
|
|
2606
2616
|
children: t
|
|
2607
2617
|
})]
|
|
2608
2618
|
});
|
|
2609
2619
|
}
|
|
2610
|
-
function
|
|
2620
|
+
function kt({ items: e = [], separator: t = "/", style: n, nodeRef: r }) {
|
|
2611
2621
|
return e.length ? /* @__PURE__ */ u("nav", {
|
|
2612
2622
|
ref: r,
|
|
2613
2623
|
"aria-label": "Breadcrumb",
|
|
@@ -2657,8 +2667,8 @@ function At({ items: e = [], separator: t = "/", style: n, nodeRef: r }) {
|
|
|
2657
2667
|
})
|
|
2658
2668
|
}) : null;
|
|
2659
2669
|
}
|
|
2660
|
-
function
|
|
2661
|
-
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;
|
|
2662
2672
|
i(() => {
|
|
2663
2673
|
if (!o || Number.isFinite(x)) return;
|
|
2664
2674
|
let e = !0, t = o.startsWith("api:") ? `${_}/data/${encodeURIComponent(o.slice(4))}` : `${_}/dynamic/${encodeURIComponent(o)}?limit=1`;
|
|
@@ -2677,7 +2687,7 @@ function jt({ pages: e = 5, current: t = 1, prevNext: n = !0, href: a = "#", sou
|
|
|
2677
2687
|
]);
|
|
2678
2688
|
let S = Math.max(1, Number(s) || 6), w = Number.isFinite(x) ? x : y;
|
|
2679
2689
|
if (o && w === null || o && f && !(w > 0)) return null;
|
|
2680
|
-
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) => {
|
|
2681
2691
|
if (o) {
|
|
2682
2692
|
if (typeof window < "u") {
|
|
2683
2693
|
let t = new URLSearchParams(window.location.search);
|
|
@@ -2742,15 +2752,15 @@ function jt({ pages: e = 5, current: t = 1, prevNext: n = !0, href: a = "#", sou
|
|
|
2742
2752
|
]
|
|
2743
2753
|
});
|
|
2744
2754
|
}
|
|
2745
|
-
var
|
|
2755
|
+
var jt = "webim.page_mode", Mt = () => {
|
|
2746
2756
|
if (typeof window > "u") return "auto";
|
|
2747
2757
|
try {
|
|
2748
|
-
let e = window.localStorage.getItem(
|
|
2758
|
+
let e = window.localStorage.getItem(jt);
|
|
2749
2759
|
return e === "light" || e === "dark" ? e : "auto";
|
|
2750
2760
|
} catch {
|
|
2751
2761
|
return "auto";
|
|
2752
2762
|
}
|
|
2753
|
-
},
|
|
2763
|
+
}, Nt = (e) => {
|
|
2754
2764
|
let t = {
|
|
2755
2765
|
width: 16,
|
|
2756
2766
|
height: 16,
|
|
@@ -2782,13 +2792,13 @@ var Mt = "webim.page_mode", Nt = () => {
|
|
|
2782
2792
|
rx: "2"
|
|
2783
2793
|
}), /* @__PURE__ */ u("path", { d: "M8 21h8M12 17v4" })]
|
|
2784
2794
|
});
|
|
2785
|
-
},
|
|
2795
|
+
}, Pt = {
|
|
2786
2796
|
light: "Light theme",
|
|
2787
2797
|
dark: "Dark theme",
|
|
2788
2798
|
auto: "Follow the device theme"
|
|
2789
2799
|
};
|
|
2790
2800
|
function Ft({ variant: e, showSystem: t, style: n, nodeRef: r, inert: a }) {
|
|
2791
|
-
let [o, l] = c(a ? "auto" :
|
|
2801
|
+
let [o, l] = c(a ? "auto" : Mt), d = s(null), f = (e) => {
|
|
2792
2802
|
d.current = e, typeof r == "function" && r(e);
|
|
2793
2803
|
};
|
|
2794
2804
|
i(() => {
|
|
@@ -2796,7 +2806,7 @@ function Ft({ variant: e, showSystem: t, style: n, nodeRef: r, inert: a }) {
|
|
|
2796
2806
|
let e = d.current?.closest?.(".webim-page");
|
|
2797
2807
|
e && (o === "light" || o === "dark" ? e.setAttribute("data-webim-mode", o) : e.removeAttribute("data-webim-mode"));
|
|
2798
2808
|
try {
|
|
2799
|
-
o === "auto" ? window.localStorage.removeItem(
|
|
2809
|
+
o === "auto" ? window.localStorage.removeItem(jt) : window.localStorage.setItem(jt, o);
|
|
2800
2810
|
} catch {}
|
|
2801
2811
|
}, [o, a]);
|
|
2802
2812
|
let p = t === !1 ? ["light", "dark"] : [
|
|
@@ -2831,8 +2841,8 @@ function Ft({ variant: e, showSystem: t, style: n, nodeRef: r, inert: a }) {
|
|
|
2831
2841
|
},
|
|
2832
2842
|
children: p.map((e) => /* @__PURE__ */ u("button", {
|
|
2833
2843
|
type: "button",
|
|
2834
|
-
title:
|
|
2835
|
-
"aria-label":
|
|
2844
|
+
title: Pt[e],
|
|
2845
|
+
"aria-label": Pt[e],
|
|
2836
2846
|
"aria-pressed": e === m,
|
|
2837
2847
|
onClick: a ? void 0 : () => l(e),
|
|
2838
2848
|
style: {
|
|
@@ -2843,15 +2853,15 @@ function Ft({ variant: e, showSystem: t, style: n, nodeRef: r, inert: a }) {
|
|
|
2843
2853
|
background: e === m ? "var(--page-accent, #111827)" : "transparent",
|
|
2844
2854
|
opacity: e === m ? 1 : .7
|
|
2845
2855
|
},
|
|
2846
|
-
children:
|
|
2856
|
+
children: Nt(e)
|
|
2847
2857
|
}, e))
|
|
2848
2858
|
});
|
|
2849
2859
|
let g = p[(p.indexOf(m) + 1) % p.length];
|
|
2850
2860
|
return /* @__PURE__ */ u("button", {
|
|
2851
2861
|
ref: f,
|
|
2852
2862
|
type: "button",
|
|
2853
|
-
title:
|
|
2854
|
-
"aria-label": `Theme: ${
|
|
2863
|
+
title: Pt[m],
|
|
2864
|
+
"aria-label": `Theme: ${Pt[m]} — switch to ${Pt[g]}`,
|
|
2855
2865
|
onClick: a ? void 0 : () => l(g),
|
|
2856
2866
|
style: {
|
|
2857
2867
|
...h,
|
|
@@ -2860,7 +2870,7 @@ function Ft({ variant: e, showSystem: t, style: n, nodeRef: r, inert: a }) {
|
|
|
2860
2870
|
border: "1px solid rgba(148, 163, 184, 0.4)",
|
|
2861
2871
|
...C(n)
|
|
2862
2872
|
},
|
|
2863
|
-
children:
|
|
2873
|
+
children: Nt(m)
|
|
2864
2874
|
});
|
|
2865
2875
|
}
|
|
2866
2876
|
var It = {
|
|
@@ -3145,7 +3155,7 @@ var Ht = (e, t) => {
|
|
|
3145
3155
|
return .299 * (r >> 16 & 255) + .587 * (r >> 8 & 255) + .114 * (r & 255) > 150 ? "#111827" : "#ffffff";
|
|
3146
3156
|
}, Wt = (e) => !!(e?.cv?.trim?.() || e?.photo);
|
|
3147
3157
|
function Gt(e, t = {}) {
|
|
3148
|
-
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 ? "" :
|
|
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 ? "" : q(e);
|
|
3149
3159
|
return n.map((e) => {
|
|
3150
3160
|
let n = e.data ?? {}, a = r(n[t.parentField]), o = a && typeof a == "object" ? a.id ?? null : a || null;
|
|
3151
3161
|
return {
|
|
@@ -3187,7 +3197,7 @@ function qt({ node: e, onClose: t }) {
|
|
|
3187
3197
|
children: /* @__PURE__ */ d("div", {
|
|
3188
3198
|
onClick: (e) => e.stopPropagation(),
|
|
3189
3199
|
style: {
|
|
3190
|
-
background: "var(--page-
|
|
3200
|
+
background: "var(--page-surface, #f2f2f2)",
|
|
3191
3201
|
color: "var(--page-text, #111827)",
|
|
3192
3202
|
border: "1px solid rgba(148, 163, 184, 0.35)",
|
|
3193
3203
|
borderRadius: 14,
|
|
@@ -3285,7 +3295,7 @@ function qt({ node: e, onClose: t }) {
|
|
|
3285
3295
|
});
|
|
3286
3296
|
}
|
|
3287
3297
|
function Jt({ 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 }) {
|
|
3288
|
-
let b = a(), [x, S] = c(null), { tenant: w, apiUrl: T } = r(
|
|
3298
|
+
let b = a(), [x, S] = c(null), { tenant: w, apiUrl: T } = r(U), E = r(W)?.[t], [D, O] = c(null);
|
|
3289
3299
|
i(() => {
|
|
3290
3300
|
if (!t || E) return;
|
|
3291
3301
|
let e = !0;
|
|
@@ -3474,7 +3484,7 @@ function Jt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
|
|
|
3474
3484
|
});
|
|
3475
3485
|
}
|
|
3476
3486
|
function Yt({ 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 }) {
|
|
3477
|
-
let { tenant: g, apiUrl: _ } = r(
|
|
3487
|
+
let { tenant: g, apiUrl: _ } = r(U), v = r(W), y = v?.[n], b = f ? G(v) : 1, [x, S] = c(null);
|
|
3478
3488
|
if (i(() => {
|
|
3479
3489
|
if (!n || y) return;
|
|
3480
3490
|
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}`;
|
|
@@ -3493,7 +3503,7 @@ function Yt({ columns: e = [], rows: t = [], source: n, limit: a = 10, striped:
|
|
|
3493
3503
|
b,
|
|
3494
3504
|
a
|
|
3495
3505
|
]), !e.length) return null;
|
|
3496
|
-
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) =>
|
|
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) => 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 };
|
|
3497
3507
|
return /* @__PURE__ */ u("div", {
|
|
3498
3508
|
ref: h,
|
|
3499
3509
|
style: {
|
|
@@ -3540,57 +3550,57 @@ function Yt({ columns: e = [], rows: t = [], source: n, limit: a = 10, striped:
|
|
|
3540
3550
|
});
|
|
3541
3551
|
}
|
|
3542
3552
|
var Xt = {
|
|
3543
|
-
PageRoot:
|
|
3544
|
-
Section:
|
|
3545
|
-
Container:
|
|
3546
|
-
Heading:
|
|
3547
|
-
TextBlock:
|
|
3548
|
-
ButtonBlock:
|
|
3549
|
-
ImageBlock:
|
|
3550
|
-
Spacer:
|
|
3551
|
-
Divider:
|
|
3552
|
-
SliderBlock:
|
|
3553
|
-
CanvasSlider:
|
|
3554
|
-
TabsBlock:
|
|
3555
|
-
QuickStack:
|
|
3556
|
-
CollectionList:
|
|
3557
|
-
CollectionSearch:
|
|
3558
|
-
BreadcrumbsBlock:
|
|
3559
|
-
PaginationBlock:
|
|
3553
|
+
PageRoot: Ce,
|
|
3554
|
+
Section: we,
|
|
3555
|
+
Container: Te,
|
|
3556
|
+
Heading: Ee,
|
|
3557
|
+
TextBlock: Le,
|
|
3558
|
+
ButtonBlock: Be,
|
|
3559
|
+
ImageBlock: Ve,
|
|
3560
|
+
Spacer: qe,
|
|
3561
|
+
Divider: Je,
|
|
3562
|
+
SliderBlock: et,
|
|
3563
|
+
CanvasSlider: tt,
|
|
3564
|
+
TabsBlock: ot,
|
|
3565
|
+
QuickStack: Et,
|
|
3566
|
+
CollectionList: Dt,
|
|
3567
|
+
CollectionSearch: Ot,
|
|
3568
|
+
BreadcrumbsBlock: kt,
|
|
3569
|
+
PaginationBlock: At,
|
|
3560
3570
|
StepperBlock: Rt,
|
|
3561
3571
|
SocialLinksBlock: Lt,
|
|
3562
3572
|
ThemeModeBlock: Ft,
|
|
3563
3573
|
OrgChartBlock: Jt,
|
|
3564
3574
|
TableBlock: Yt,
|
|
3565
|
-
MasonryBlock:
|
|
3566
|
-
AccordionBlock:
|
|
3567
|
-
NavbarBlock:
|
|
3568
|
-
ListBlock:
|
|
3569
|
-
TextSpan:
|
|
3570
|
-
QuoteBlock:
|
|
3571
|
-
TextLink:
|
|
3572
|
-
RichTextBlock:
|
|
3573
|
-
RichContentBlock:
|
|
3574
|
-
VideoBlock:
|
|
3575
|
-
YouTubeBlock:
|
|
3576
|
-
IframeBlock:
|
|
3577
|
-
EmbedBlock:
|
|
3578
|
-
FormBlock:
|
|
3579
|
-
FormLabel:
|
|
3580
|
-
FormInput:
|
|
3581
|
-
FormTextarea:
|
|
3582
|
-
FormCheckbox: (e) => /* @__PURE__ */ u(
|
|
3575
|
+
MasonryBlock: nt,
|
|
3576
|
+
AccordionBlock: st,
|
|
3577
|
+
NavbarBlock: at,
|
|
3578
|
+
ListBlock: Ie,
|
|
3579
|
+
TextSpan: ke,
|
|
3580
|
+
QuoteBlock: Fe,
|
|
3581
|
+
TextLink: ze,
|
|
3582
|
+
RichTextBlock: Ne,
|
|
3583
|
+
RichContentBlock: Ne,
|
|
3584
|
+
VideoBlock: He,
|
|
3585
|
+
YouTubeBlock: We,
|
|
3586
|
+
IframeBlock: Ge,
|
|
3587
|
+
EmbedBlock: Ke,
|
|
3588
|
+
FormBlock: ht,
|
|
3589
|
+
FormLabel: yt,
|
|
3590
|
+
FormInput: bt,
|
|
3591
|
+
FormTextarea: xt,
|
|
3592
|
+
FormCheckbox: (e) => /* @__PURE__ */ u(St, {
|
|
3583
3593
|
kind: "checkbox",
|
|
3584
3594
|
...e
|
|
3585
3595
|
}),
|
|
3586
|
-
FormRadio: (e) => /* @__PURE__ */ u(
|
|
3596
|
+
FormRadio: (e) => /* @__PURE__ */ u(St, {
|
|
3587
3597
|
kind: "radio",
|
|
3588
3598
|
...e
|
|
3589
3599
|
}),
|
|
3590
|
-
FormSelect:
|
|
3591
|
-
FormFile:
|
|
3592
|
-
FormRecaptcha:
|
|
3593
|
-
FormSubmit:
|
|
3600
|
+
FormSelect: Ct,
|
|
3601
|
+
FormFile: wt,
|
|
3602
|
+
FormRecaptcha: vt,
|
|
3603
|
+
FormSubmit: Tt
|
|
3594
3604
|
}, Zt = {
|
|
3595
3605
|
id: "auth",
|
|
3596
3606
|
label: "Accounts",
|
|
@@ -3611,7 +3621,7 @@ var Xt = {
|
|
|
3611
3621
|
}, [e]), e;
|
|
3612
3622
|
};
|
|
3613
3623
|
function en({ children: e, initialUser: t, disabled: i, apiUrl: a, tenant: l }) {
|
|
3614
|
-
let d = r(
|
|
3624
|
+
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}`, {
|
|
3615
3625
|
...t,
|
|
3616
3626
|
credentials: "include",
|
|
3617
3627
|
headers: {
|
|
@@ -3655,7 +3665,7 @@ function tn({ when: e, children: t }) {
|
|
|
3655
3665
|
//#endregion
|
|
3656
3666
|
//#region ../ui/src/components/builder/apps/auth/views.jsx
|
|
3657
3667
|
function nn({ 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 }) {
|
|
3658
|
-
let { tenant: h, apiUrl: g, settings: _ } = r(
|
|
3668
|
+
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) => {
|
|
3659
3669
|
if (e.preventDefault(), f) return;
|
|
3660
3670
|
let n = new FormData(e.currentTarget);
|
|
3661
3671
|
w(!0), x("");
|
|
@@ -3703,20 +3713,20 @@ function nn({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
|
|
|
3703
3713
|
children: [
|
|
3704
3714
|
T ? /* @__PURE__ */ d("label", {
|
|
3705
3715
|
style: {
|
|
3706
|
-
...
|
|
3716
|
+
...X,
|
|
3707
3717
|
display: "grid",
|
|
3708
3718
|
gap: 6
|
|
3709
3719
|
},
|
|
3710
3720
|
children: [a, /* @__PURE__ */ u("input", {
|
|
3711
3721
|
name: "name",
|
|
3712
3722
|
type: "text",
|
|
3713
|
-
style:
|
|
3714
|
-
...
|
|
3723
|
+
style: Z,
|
|
3724
|
+
...Q(f)
|
|
3715
3725
|
})]
|
|
3716
3726
|
}) : null,
|
|
3717
3727
|
/* @__PURE__ */ d("label", {
|
|
3718
3728
|
style: {
|
|
3719
|
-
...
|
|
3729
|
+
...X,
|
|
3720
3730
|
display: "grid",
|
|
3721
3731
|
gap: 6
|
|
3722
3732
|
},
|
|
@@ -3724,13 +3734,13 @@ function nn({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
|
|
|
3724
3734
|
name: "email",
|
|
3725
3735
|
type: "email",
|
|
3726
3736
|
required: !f,
|
|
3727
|
-
style:
|
|
3728
|
-
...
|
|
3737
|
+
style: Z,
|
|
3738
|
+
...Q(f)
|
|
3729
3739
|
})]
|
|
3730
3740
|
}),
|
|
3731
3741
|
/* @__PURE__ */ d("label", {
|
|
3732
3742
|
style: {
|
|
3733
|
-
...
|
|
3743
|
+
...X,
|
|
3734
3744
|
display: "grid",
|
|
3735
3745
|
gap: 6
|
|
3736
3746
|
},
|
|
@@ -3738,15 +3748,15 @@ function nn({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
|
|
|
3738
3748
|
name: "password",
|
|
3739
3749
|
type: "password",
|
|
3740
3750
|
required: !f,
|
|
3741
|
-
style:
|
|
3742
|
-
...
|
|
3751
|
+
style: Z,
|
|
3752
|
+
...Q(f)
|
|
3743
3753
|
})]
|
|
3744
3754
|
}),
|
|
3745
3755
|
/* @__PURE__ */ u("button", {
|
|
3746
3756
|
type: f ? "button" : "submit",
|
|
3747
3757
|
disabled: S || void 0,
|
|
3748
3758
|
style: {
|
|
3749
|
-
...
|
|
3759
|
+
...J,
|
|
3750
3760
|
border: 0,
|
|
3751
3761
|
padding: "10px 22px",
|
|
3752
3762
|
borderRadius: 8,
|
|
@@ -3800,7 +3810,7 @@ function rn({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
|
|
|
3800
3810
|
children: [
|
|
3801
3811
|
/* @__PURE__ */ d("span", {
|
|
3802
3812
|
style: {
|
|
3803
|
-
...
|
|
3813
|
+
...X,
|
|
3804
3814
|
fontWeight: 600
|
|
3805
3815
|
},
|
|
3806
3816
|
children: [
|
|
@@ -3811,7 +3821,7 @@ function rn({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
|
|
|
3811
3821
|
}),
|
|
3812
3822
|
n && m?.email ? /* @__PURE__ */ u("span", {
|
|
3813
3823
|
style: {
|
|
3814
|
-
...
|
|
3824
|
+
...X,
|
|
3815
3825
|
opacity: .7
|
|
3816
3826
|
},
|
|
3817
3827
|
children: m.email
|
|
@@ -3820,14 +3830,14 @@ function rn({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
|
|
|
3820
3830
|
type: "button",
|
|
3821
3831
|
onClick: a ? void 0 : f,
|
|
3822
3832
|
style: {
|
|
3823
|
-
...
|
|
3833
|
+
...J,
|
|
3824
3834
|
border: 0,
|
|
3825
3835
|
padding: "8px 16px",
|
|
3826
3836
|
borderRadius: 8,
|
|
3827
3837
|
fontSize: 14,
|
|
3828
3838
|
cursor: a ? "default" : "pointer"
|
|
3829
3839
|
},
|
|
3830
|
-
...
|
|
3840
|
+
...Q(a),
|
|
3831
3841
|
children: t
|
|
3832
3842
|
})
|
|
3833
3843
|
]
|
|
@@ -3879,7 +3889,7 @@ var dn = {
|
|
|
3879
3889
|
opacity: .6
|
|
3880
3890
|
};
|
|
3881
3891
|
function fn({ pluginId: e, blockId: t, props: n, style: a, nodeRef: o }) {
|
|
3882
|
-
let c = r(
|
|
3892
|
+
let c = r(U), l = ln(c?.settings)[e], f = s(null), p = s(null), m = {
|
|
3883
3893
|
tenant: c?.tenant ?? "",
|
|
3884
3894
|
apiUrl: c?.apiUrl ?? "/api",
|
|
3885
3895
|
locale: c?.locale ?? "",
|
|
@@ -3938,7 +3948,7 @@ var pn = {
|
|
|
3938
3948
|
...on,
|
|
3939
3949
|
PluginBlock: fn
|
|
3940
3950
|
};
|
|
3941
|
-
function
|
|
3951
|
+
function mn(t, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
|
|
3942
3952
|
let o = n[t];
|
|
3943
3953
|
if (!o || o.hidden) return null;
|
|
3944
3954
|
let s = o.type?.resolvedName, c = a?.mapProps ? a.mapProps(o.props ?? {}, s) : o.props ?? {};
|
|
@@ -3946,11 +3956,11 @@ function $(t, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
|
|
|
3946
3956
|
let n = o.props?.componentId, s = r?.[n];
|
|
3947
3957
|
if (!s?.template || i.has(n)) return null;
|
|
3948
3958
|
let c = new Set(i).add(n);
|
|
3949
|
-
return /* @__PURE__ */ u(e, { children:
|
|
3959
|
+
return /* @__PURE__ */ u(e, { children: mn(s.template.rootId, s.template.nodes, r, c, a) }, t);
|
|
3950
3960
|
}
|
|
3951
3961
|
let l = pn[s];
|
|
3952
3962
|
if (!l) return null;
|
|
3953
|
-
let d = (o.nodes ?? []).map((e) =>
|
|
3963
|
+
let d = (o.nodes ?? []).map((e) => mn(e, n, r, i, a)).filter(Boolean), f = Object.entries(o.linkedNodes ?? {}), p = f.length ? Object.fromEntries(f.map(([e, t]) => [e, mn(t, n, r, i)])) : void 0, m = /* @__PURE__ */ u(l, {
|
|
3954
3964
|
...c,
|
|
3955
3965
|
...s === "CollectionList" ? { templateId: o.linkedNodes?.card } : null,
|
|
3956
3966
|
linked: p,
|
|
@@ -3966,9 +3976,9 @@ function $(t, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
|
|
|
3966
3976
|
}
|
|
3967
3977
|
//#endregion
|
|
3968
3978
|
//#region ../ui/src/components/builder/PageRenderer.jsx
|
|
3969
|
-
var
|
|
3979
|
+
var hn = (e) => Object.entries(e).map(([e, t]) => `${e}: ${t};`).join(" "), gn = (e) => `.webim-page[data-webim-mode="light"] { ${Object.entries(V(e.light)).map(([e, t]) => `${e}: ${t} !important;`).join(" ")} }
|
|
3970
3980
|
.webim-page[data-webim-mode="dark"] { ${Object.entries(V(e.dark)).map(([e, t]) => `${e}: ${t} !important;`).join(" ")} }`;
|
|
3971
|
-
function
|
|
3981
|
+
function _n({ 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: _ }) {
|
|
3972
3982
|
let v = s?.js?.trim();
|
|
3973
3983
|
if (i(() => {
|
|
3974
3984
|
if (!v) return;
|
|
@@ -3982,12 +3992,12 @@ function gn({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, cu
|
|
|
3982
3992
|
minHeight: "100%",
|
|
3983
3993
|
display: "flex",
|
|
3984
3994
|
flexDirection: "column"
|
|
3985
|
-
}, C =
|
|
3995
|
+
}, C = mn("ROOT", e, n), w = o(() => ({ render: (t, r) => mn(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", {
|
|
3986
3996
|
rel: "stylesheet",
|
|
3987
3997
|
precedence: "default",
|
|
3988
3998
|
href: g(e)
|
|
3989
|
-
}, e)), j =
|
|
3990
|
-
return r === "auto" ? /* @__PURE__ */ u(
|
|
3999
|
+
}, e)), j = gn(O);
|
|
4000
|
+
return r === "auto" ? /* @__PURE__ */ u(U.Provider, {
|
|
3991
4001
|
value: {
|
|
3992
4002
|
tenant: c || "",
|
|
3993
4003
|
apiUrl: l || "/api",
|
|
@@ -3996,9 +4006,9 @@ function gn({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, cu
|
|
|
3996
4006
|
},
|
|
3997
4007
|
children: /* @__PURE__ */ u(en, {
|
|
3998
4008
|
initialUser: _,
|
|
3999
|
-
children: /* @__PURE__ */ u(
|
|
4009
|
+
children: /* @__PURE__ */ u(W.Provider, {
|
|
4000
4010
|
value: f ?? null,
|
|
4001
|
-
children: /* @__PURE__ */ u(
|
|
4011
|
+
children: /* @__PURE__ */ u(pe.Provider, {
|
|
4002
4012
|
value: w,
|
|
4003
4013
|
children: /* @__PURE__ */ d("div", {
|
|
4004
4014
|
...b,
|
|
@@ -4009,8 +4019,8 @@ function gn({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, cu
|
|
|
4009
4019
|
...a
|
|
4010
4020
|
},
|
|
4011
4021
|
children: [
|
|
4012
|
-
/* @__PURE__ */ u("style", { children: `.webim-page { ${
|
|
4013
|
-
@media (prefers-color-scheme: dark) { .webim-page { ${
|
|
4022
|
+
/* @__PURE__ */ u("style", { children: `.webim-page { ${hn(V(O.light))} }
|
|
4023
|
+
@media (prefers-color-scheme: dark) { .webim-page { ${hn(V(O.dark))} } }` }),
|
|
4014
4024
|
/* @__PURE__ */ u("style", { children: j }),
|
|
4015
4025
|
A,
|
|
4016
4026
|
/* @__PURE__ */ u("style", { children: x }),
|
|
@@ -4023,7 +4033,7 @@ function gn({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, cu
|
|
|
4023
4033
|
})
|
|
4024
4034
|
})
|
|
4025
4035
|
})
|
|
4026
|
-
}) : /* @__PURE__ */ u(
|
|
4036
|
+
}) : /* @__PURE__ */ u(U.Provider, {
|
|
4027
4037
|
value: {
|
|
4028
4038
|
tenant: c || "",
|
|
4029
4039
|
apiUrl: l || "/api",
|
|
@@ -4032,9 +4042,9 @@ function gn({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, cu
|
|
|
4032
4042
|
},
|
|
4033
4043
|
children: /* @__PURE__ */ u(en, {
|
|
4034
4044
|
initialUser: _,
|
|
4035
|
-
children: /* @__PURE__ */ u(
|
|
4045
|
+
children: /* @__PURE__ */ u(W.Provider, {
|
|
4036
4046
|
value: f ?? null,
|
|
4037
|
-
children: /* @__PURE__ */ u(
|
|
4047
|
+
children: /* @__PURE__ */ u(pe.Provider, {
|
|
4038
4048
|
value: w,
|
|
4039
4049
|
children: /* @__PURE__ */ d("div", {
|
|
4040
4050
|
...b,
|
|
@@ -4061,8 +4071,8 @@ function gn({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, cu
|
|
|
4061
4071
|
}
|
|
4062
4072
|
//#endregion
|
|
4063
4073
|
//#region src/WebimContent.jsx
|
|
4064
|
-
function
|
|
4065
|
-
return e?.blocks?.ROOT ? /* @__PURE__ */ u(
|
|
4074
|
+
function vn({ bundle: e, mode: t = "auto", style: n }) {
|
|
4075
|
+
return e?.blocks?.ROOT ? /* @__PURE__ */ u(_n, {
|
|
4066
4076
|
blocks: e.blocks,
|
|
4067
4077
|
theme: e.theme,
|
|
4068
4078
|
components: e.components,
|
|
@@ -4073,13 +4083,13 @@ function _n({ bundle: e, mode: t = "auto", style: n }) {
|
|
|
4073
4083
|
locale: e.locale,
|
|
4074
4084
|
direction: e.direction,
|
|
4075
4085
|
settings: e.settings,
|
|
4076
|
-
mode: t,
|
|
4086
|
+
mode: ae(t, e.scheme),
|
|
4077
4087
|
style: n
|
|
4078
4088
|
}) : null;
|
|
4079
4089
|
}
|
|
4080
4090
|
//#endregion
|
|
4081
4091
|
//#region src/WebimPage.jsx
|
|
4082
|
-
function
|
|
4092
|
+
function yn({ 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 }) {
|
|
4083
4093
|
let [g, _] = c({ status: "loading" }), v = s({
|
|
4084
4094
|
onLoad: m,
|
|
4085
4095
|
onError: h
|
|
@@ -4116,11 +4126,11 @@ function vn({ apiUrl: e, tenant: t, slug: n, locale: r, preview: a, token: o, mo
|
|
|
4116
4126
|
r,
|
|
4117
4127
|
a,
|
|
4118
4128
|
o
|
|
4119
|
-
]), g.status === "loading" ? f : g.status === "error" ? typeof p == "function" ? p(g.error) : p : /* @__PURE__ */ u(
|
|
4129
|
+
]), g.status === "loading" ? f : g.status === "error" ? typeof p == "function" ? p(g.error) : p : /* @__PURE__ */ u(vn, {
|
|
4120
4130
|
bundle: g.bundle,
|
|
4121
4131
|
mode: l,
|
|
4122
4132
|
style: d
|
|
4123
4133
|
});
|
|
4124
4134
|
}
|
|
4125
4135
|
//#endregion
|
|
4126
|
-
export {
|
|
4136
|
+
export { _n as PageRenderer, vn as WebimContent, yn as WebimPage, se as fetchPage, Me as renderRichContent, ie as resolveTheme };
|