webim-adapter 0.19.0 → 0.21.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 +719 -376
- package/build/webim-embed.js +8 -7
- package/build/webim-ssr.js +693 -350
- package/package.json +1 -1
package/build/webim-adapter.js
CHANGED
|
@@ -48,36 +48,36 @@ function h(e) {
|
|
|
48
48
|
color: j,
|
|
49
49
|
inset: M
|
|
50
50
|
})), N.length && (t.boxShadow = N.join(", "));
|
|
51
|
-
let P = (e) => e.type === "blur" ? `blur(${p(e.v ?? 0)})` : e.type === "hue-rotate" ? `hue-rotate(${h(e.v ?? 0)})` : `${e.type}(${e.v ?? 100}%)`, F = (e) => (Array.isArray(e) ? e : []).filter((e) => e && e.on !== !1 && e.type).map(P), { filters: I, backdropFilters: ee, filterBlur: L, filterGrayscale:
|
|
51
|
+
let P = (e) => e.type === "blur" ? `blur(${p(e.v ?? 0)})` : e.type === "hue-rotate" ? `hue-rotate(${h(e.v ?? 0)})` : `${e.type}(${e.v ?? 100}%)`, F = (e) => (Array.isArray(e) ? e : []).filter((e) => e && e.on !== !1 && e.type).map(P), { filters: I, backdropFilters: ee, filterBlur: L, filterGrayscale: te, filterBrightness: R, filterContrast: ne, filterSaturate: re } = t;
|
|
52
52
|
delete t.filters, delete t.backdropFilters, delete t.filterBlur, delete t.filterGrayscale, delete t.filterBrightness, delete t.filterContrast, delete t.filterSaturate;
|
|
53
|
-
let
|
|
54
|
-
L !== void 0 &&
|
|
55
|
-
let
|
|
56
|
-
|
|
57
|
-
let { textStrokeWidth:
|
|
58
|
-
delete t.textStrokeWidth, delete t.textStrokeColor, (
|
|
59
|
-
let { clipText:
|
|
60
|
-
delete t.clipText,
|
|
61
|
-
let { transitions:
|
|
53
|
+
let z = F(I);
|
|
54
|
+
L !== void 0 && z.push(`blur(${p(L)})`), te !== void 0 && z.push(`grayscale(${te}%)`), R !== void 0 && z.push(`brightness(${R}%)`), ne !== void 0 && z.push(`contrast(${ne}%)`), re !== void 0 && z.push(`saturate(${re}%)`), z.length && (t.filter = z.join(" "));
|
|
55
|
+
let ie = F(ee);
|
|
56
|
+
ie.length && (t.backdropFilter = ie.join(" "), t.WebkitBackdropFilter = t.backdropFilter);
|
|
57
|
+
let { textStrokeWidth: ae, textStrokeColor: oe } = t;
|
|
58
|
+
delete t.textStrokeWidth, delete t.textStrokeColor, (ae !== void 0 || oe !== void 0) && (t.WebkitTextStroke = `${p(ae ?? 1)} ${oe || "currentColor"}`);
|
|
59
|
+
let { clipText: se } = t;
|
|
60
|
+
delete t.clipText, se && (t.WebkitBackgroundClip = "text", t.backgroundClip = "text", t.WebkitTextFillColor = "transparent");
|
|
61
|
+
let { transitions: ce, transitionDuration: B, transitionEasing: V, transitionProperty: le } = t, ue = (e) => typeof e == "number" || !Number.isNaN(Number(e)) ? `${Number(e)}ms` : e;
|
|
62
62
|
delete t.transitions, delete t.transitionDuration, delete t.transitionEasing, delete t.transitionProperty;
|
|
63
|
-
let
|
|
64
|
-
if (
|
|
63
|
+
let de = (Array.isArray(ce) ? ce : []).filter((e) => e && e.on !== !1).map((e) => `${e.property || "all"} ${ue(e.duration ?? 200)} ${e.easing || "ease"}`);
|
|
64
|
+
if (B !== void 0 && de.push(`${le || "all"} ${ue(B)} ${V || "ease"}`), de.length && (t.transition = de.join(", ")), t.textDecoration !== void 0 && (t.textDecorationLine = t.textDecoration, delete t.textDecoration), t.backgroundImage && !String(t.backgroundImage).includes("(") && (t.backgroundImage = `url("${t.backgroundImage}")`), n) {
|
|
65
65
|
let e = `${i || "rgba(0,0,0,0.5)"}, ${a || "transparent"}`, o = n === "radial" ? `radial-gradient(circle, ${e})` : `linear-gradient(${r ?? 180}deg, ${e})`;
|
|
66
66
|
t.backgroundImage = t.backgroundImage ? `${o}, ${t.backgroundImage}` : o;
|
|
67
67
|
}
|
|
68
68
|
delete t.backgroundVideo;
|
|
69
|
-
let { overlayColor:
|
|
70
|
-
if (delete t.overlayColor, delete t.overlayOpacity,
|
|
71
|
-
let e = `color-mix(in srgb, ${
|
|
69
|
+
let { overlayColor: H, overlayOpacity: fe } = t;
|
|
70
|
+
if (delete t.overlayColor, delete t.overlayOpacity, H) {
|
|
71
|
+
let e = `color-mix(in srgb, ${H} ${fe ?? 50}%, transparent)`, n = `linear-gradient(${e}, ${e})`;
|
|
72
72
|
t.backgroundImage = t.backgroundImage ? `${n}, ${t.backgroundImage}` : n;
|
|
73
73
|
}
|
|
74
74
|
t.backgroundImage && (t.backgroundSize ??= "cover", t.backgroundPosition ??= "center", t.backgroundRepeat ??= "no-repeat");
|
|
75
|
-
let { backgroundLayers:
|
|
75
|
+
let { backgroundLayers: U } = t;
|
|
76
76
|
delete t.backgroundLayers;
|
|
77
|
-
let
|
|
78
|
-
if (
|
|
77
|
+
let pe = (Array.isArray(U) ? U : []).filter((e) => e && e.on !== !1);
|
|
78
|
+
if (pe.length) {
|
|
79
79
|
let e = [], n = [], r = [], i = [], a = [];
|
|
80
|
-
for (let t of
|
|
80
|
+
for (let t of pe) if (t.kind === "linear") e.push(`linear-gradient(${t.angle ?? 180}deg, ${t.from || "rgba(0,0,0,0.5)"}, ${t.to || "transparent"})`), n.push("auto"), r.push("0% 0%"), i.push("repeat"), a.push("scroll");
|
|
81
81
|
else if (t.kind === "radial") e.push(`radial-gradient(circle, ${t.from || "rgba(0,0,0,0.5)"}, ${t.to || "transparent"})`), n.push("auto"), r.push("0% 0%"), i.push("repeat"), a.push("scroll");
|
|
82
82
|
else {
|
|
83
83
|
if (!t.src) continue;
|
|
@@ -284,7 +284,7 @@ function L(e, t) {
|
|
|
284
284
|
}
|
|
285
285
|
//#endregion
|
|
286
286
|
//#region src/bundle.js
|
|
287
|
-
function
|
|
287
|
+
function te({ page: e, settings: t, tenant: n, apiUrl: r, locale: i }) {
|
|
288
288
|
let a = {
|
|
289
289
|
...t?.global ?? {},
|
|
290
290
|
...t?.tenant ?? {}
|
|
@@ -308,18 +308,18 @@ function R({ page: e, settings: t, tenant: n, apiUrl: r, locale: i }) {
|
|
|
308
308
|
}
|
|
309
309
|
//#endregion
|
|
310
310
|
//#region src/fetchPage.js
|
|
311
|
-
var
|
|
311
|
+
var R = async (e) => {
|
|
312
312
|
let t = await e.json().catch(() => null);
|
|
313
313
|
if (!e.ok || t?.success === !1) throw Error(t?.error?.message || `Request failed (${e.status})`);
|
|
314
314
|
return t?.payload ?? t;
|
|
315
315
|
};
|
|
316
|
-
async function
|
|
316
|
+
async function ne({ apiUrl: e, tenant: t, slug: n, locale: r, preview: i, token: a, page: o, fetch: s }) {
|
|
317
317
|
if (!e) throw Error("fetchPage: apiUrl is required");
|
|
318
318
|
if (!n) throw Error("fetchPage: slug is required");
|
|
319
319
|
let c = s ?? fetch, l = e.replace(/\/$/, ""), u = {
|
|
320
320
|
...t ? { "x-tenant": t } : {},
|
|
321
321
|
...a ? { authorization: `Bearer ${a}` } : {}
|
|
322
|
-
}, [d, f] = await Promise.all([c(`${l}/render/${encodeURIComponent(n)}${i ? `?preview=${encodeURIComponent(i)}` : ""}`, { headers: u }).then(
|
|
322
|
+
}, [d, f] = await Promise.all([c(`${l}/render/${encodeURIComponent(n)}${i ? `?preview=${encodeURIComponent(i)}` : ""}`, { headers: u }).then(R), c(`${l}/settings/public`, { headers: u }).then(R)]), p = te({
|
|
323
323
|
page: d,
|
|
324
324
|
settings: f,
|
|
325
325
|
tenant: t,
|
|
@@ -327,7 +327,7 @@ async function te({ apiUrl: e, tenant: t, slug: n, locale: r, preview: i, token:
|
|
|
327
327
|
locale: r
|
|
328
328
|
}), m = [...new Set(Object.values(p.blocks ?? {}).map((e) => e?.type?.resolvedName === "CollectionList" ? e.props?.collection : e?.type?.resolvedName === "TableBlock" || e?.type?.resolvedName === "OrgChartBlock" ? e.props?.source : null).filter(Boolean))];
|
|
329
329
|
if (m.length) {
|
|
330
|
-
let e = (e) => e.startsWith("api:") ? `${l}/data/${encodeURIComponent(e.slice(4))}` : `${l}/dynamic/${encodeURIComponent(e)}?all=1${r ? `&locale=${encodeURIComponent(r)}` : ""}`, t = await Promise.all(m.map((t) => c(e(t), { headers: u }).then(
|
|
330
|
+
let e = (e) => e.startsWith("api:") ? `${l}/data/${encodeURIComponent(e.slice(4))}` : `${l}/dynamic/${encodeURIComponent(e)}?all=1${r ? `&locale=${encodeURIComponent(r)}` : ""}`, t = await Promise.all(m.map((t) => c(e(t), { headers: u }).then(R).then((e) => {
|
|
331
331
|
let n = Array.isArray(e) ? e : Array.isArray(e?.data) ? e.data : [], r = Number(e?.total?.filtered ?? e?.total?.all ?? n.length);
|
|
332
332
|
return [[t, n], [`${t}:total`, Number.isFinite(r) ? r : n.length]];
|
|
333
333
|
}).catch(() => [[t, []]])));
|
|
@@ -445,14 +445,14 @@ new Map([
|
|
|
445
445
|
fallback: "sans-serif"
|
|
446
446
|
}
|
|
447
447
|
].map((e) => [e.family, e]));
|
|
448
|
-
function
|
|
448
|
+
function re(e) {
|
|
449
449
|
return e.length ? `https://fonts.googleapis.com/css2?${e.map((e) => `family=${e.replace(/ /g, "+")}:wght@100..900`).join("&")}&display=swap` : null;
|
|
450
450
|
}
|
|
451
|
-
var
|
|
451
|
+
var z = (e) => re([e]), ie = (e) => {
|
|
452
452
|
let t = typeof e == "string" && e.match(/^"([^"]+)"/);
|
|
453
453
|
return t ? t[1] : null;
|
|
454
454
|
};
|
|
455
|
-
function
|
|
455
|
+
function ae(e, t) {
|
|
456
456
|
let n = /* @__PURE__ */ new Set(), r = (e) => {
|
|
457
457
|
for (let t of Object.values(e || {})) for (let e of [
|
|
458
458
|
"style",
|
|
@@ -460,7 +460,7 @@ function ie(e, t) {
|
|
|
460
460
|
"pressed",
|
|
461
461
|
"focused"
|
|
462
462
|
]) {
|
|
463
|
-
let r =
|
|
463
|
+
let r = ie(t.props?.[e]?.fontFamily);
|
|
464
464
|
r && n.add(r);
|
|
465
465
|
}
|
|
466
466
|
};
|
|
@@ -470,7 +470,7 @@ function ie(e, t) {
|
|
|
470
470
|
}
|
|
471
471
|
//#endregion
|
|
472
472
|
//#region ../ui/src/components/builder/locale.js
|
|
473
|
-
var
|
|
473
|
+
var oe = /* @__PURE__ */ new Set([
|
|
474
474
|
"ar",
|
|
475
475
|
"he",
|
|
476
476
|
"fa",
|
|
@@ -481,22 +481,34 @@ var ae = /* @__PURE__ */ new Set([
|
|
|
481
481
|
"yi",
|
|
482
482
|
"dv",
|
|
483
483
|
"ckb"
|
|
484
|
-
]),
|
|
484
|
+
]), se = (e) => oe.has(String(e || "").toLowerCase().split(/[-_]/)[0]) ? "rtl" : "ltr", ce = (e, t) => e === "ltr" || e === "rtl" ? e : t ? se(t) : void 0, B = t({
|
|
485
485
|
tenant: "",
|
|
486
486
|
apiUrl: "/api",
|
|
487
487
|
locale: "",
|
|
488
488
|
settings: null
|
|
489
|
-
}),
|
|
489
|
+
}), V = t(null), le = (e) => {
|
|
490
490
|
let t = Number(e?.__page);
|
|
491
491
|
if (Number.isFinite(t) && t >= 1) return Math.floor(t);
|
|
492
492
|
if (typeof window > "u") return 1;
|
|
493
493
|
let n = Number(new URLSearchParams(window.location.search).get("page"));
|
|
494
494
|
return Number.isFinite(n) && n >= 1 ? Math.floor(n) : 1;
|
|
495
|
-
},
|
|
496
|
-
|
|
495
|
+
}, ue = () => {
|
|
496
|
+
if (typeof window > "u") return {};
|
|
497
|
+
let e = {};
|
|
498
|
+
return new URLSearchParams(window.location.search).forEach((t, n) => {
|
|
499
|
+
n.startsWith("f_") && n.length > 2 && t !== "" && (e[n.slice(2)] = t);
|
|
500
|
+
}), e;
|
|
501
|
+
}, de = (e) => {
|
|
502
|
+
let t = {
|
|
503
|
+
...e && typeof e == "object" && !Array.isArray(e) ? e : {},
|
|
504
|
+
...ue()
|
|
505
|
+
};
|
|
506
|
+
return Object.fromEntries(Object.entries(t).filter(([, e]) => typeof e == "string" && e.trim() !== ""));
|
|
507
|
+
}, H = t(null), fe = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
508
|
+
function U(e, t) {
|
|
497
509
|
if (t) return t.includes(".") ? t.split(".").reduce((e, t) => e && typeof e == "object" ? e[t] : void 0, e) : e?.[t];
|
|
498
510
|
}
|
|
499
|
-
var
|
|
511
|
+
var pe = (e) => {
|
|
500
512
|
let t = [];
|
|
501
513
|
for (let [n, r] of Object.entries(e ?? {})) {
|
|
502
514
|
if (!/^[\w-]+$/.test(n)) continue;
|
|
@@ -506,36 +518,36 @@ var ue = (e) => {
|
|
|
506
518
|
}
|
|
507
519
|
return t;
|
|
508
520
|
};
|
|
509
|
-
function
|
|
510
|
-
return e == null ? "" : typeof e == "string" || typeof e == "number" || typeof e == "boolean" ? String(e) : typeof e == "object" && !Array.isArray(e) && ("label" in e || "name" in e || "slug" in e) ? String(e.label ?? e.name ?? e.slug ?? "") : Array.isArray(e) ? e.map((e) => typeof e == "string" ? e : Array.isArray(e?.parts) ? e.parts.map((e) => e?.text ?? "").join("") : Array.isArray(e?.items) ? e.items.map((e) => e?.text ?? "").join(" ") : e && (e.label != null || e.name != null || e.slug != null) ? String(e.label ?? e.name ?? e.slug) : "").filter(Boolean).join(" ") : "";
|
|
521
|
+
function W(e) {
|
|
522
|
+
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(" ") : "";
|
|
511
523
|
}
|
|
512
|
-
function
|
|
513
|
-
let n = t?.data ?? {}, r =
|
|
524
|
+
function me(e, t) {
|
|
525
|
+
let n = t?.data ?? {}, r = pe(n);
|
|
514
526
|
if (!r.length) return e;
|
|
515
|
-
let i = RegExp(`:(${r.map(
|
|
527
|
+
let i = RegExp(`:(${r.map(fe).sort((e, t) => t.length - e.length).join("|")})`, "g"), a = (e) => typeof e == "string" ? e.replace(i, (e, t) => W(U(n, t))) : Array.isArray(e) ? e.map(a) : e && typeof e == "object" ? Object.fromEntries(Object.entries(e).map(([e, t]) => [e, a(t)])) : e;
|
|
516
528
|
return a(e);
|
|
517
529
|
}
|
|
518
|
-
var
|
|
530
|
+
var he = {
|
|
519
531
|
margin: 0,
|
|
520
532
|
fontWeight: 700,
|
|
521
533
|
lineHeight: 1.2,
|
|
522
534
|
fontFamily: "var(--page-heading-font, inherit)"
|
|
523
|
-
},
|
|
535
|
+
}, ge = { margin: 0 }, G = {
|
|
524
536
|
display: "inline-block",
|
|
525
537
|
textDecoration: "none",
|
|
526
538
|
cursor: "pointer",
|
|
527
539
|
backgroundColor: "var(--page-accent, #111827)",
|
|
528
540
|
color: "var(--page-accent-text, #ffffff)"
|
|
529
|
-
},
|
|
541
|
+
}, _e = {
|
|
530
542
|
flexGrow: 1,
|
|
531
543
|
display: "flex",
|
|
532
544
|
flexDirection: "column",
|
|
533
545
|
position: "relative"
|
|
534
|
-
},
|
|
546
|
+
}, ve = {
|
|
535
547
|
display: "flex",
|
|
536
548
|
flexDirection: "column"
|
|
537
549
|
};
|
|
538
|
-
function
|
|
550
|
+
function ye({ style: e }) {
|
|
539
551
|
let t = e?.backgroundVideo;
|
|
540
552
|
if (!t) return null;
|
|
541
553
|
let n = {
|
|
@@ -561,7 +573,7 @@ function ge({ style: e }) {
|
|
|
561
573
|
background: r
|
|
562
574
|
} })] });
|
|
563
575
|
}
|
|
564
|
-
var
|
|
576
|
+
var be = (e, t) => e?.backgroundVideo ? {
|
|
565
577
|
position: "relative",
|
|
566
578
|
...t,
|
|
567
579
|
...h(e)
|
|
@@ -569,24 +581,24 @@ var _e = (e, t) => e?.backgroundVideo ? {
|
|
|
569
581
|
...t,
|
|
570
582
|
...h(e)
|
|
571
583
|
};
|
|
572
|
-
function
|
|
584
|
+
function xe({ style: e, nodeRef: t, children: n }) {
|
|
573
585
|
return /* @__PURE__ */ d("div", {
|
|
574
586
|
ref: t,
|
|
575
587
|
style: {
|
|
576
|
-
...
|
|
588
|
+
..._e,
|
|
577
589
|
...h(e)
|
|
578
590
|
},
|
|
579
|
-
children: [/* @__PURE__ */ u(
|
|
591
|
+
children: [/* @__PURE__ */ u(ye, { style: e }), n]
|
|
580
592
|
});
|
|
581
593
|
}
|
|
582
|
-
function
|
|
594
|
+
function Se({ style: e, nodeRef: t, children: n }) {
|
|
583
595
|
return /* @__PURE__ */ d("section", {
|
|
584
596
|
ref: t,
|
|
585
|
-
style:
|
|
586
|
-
children: [/* @__PURE__ */ u(
|
|
597
|
+
style: be(e, ve),
|
|
598
|
+
children: [/* @__PURE__ */ u(ye, { style: e }), n]
|
|
587
599
|
});
|
|
588
600
|
}
|
|
589
|
-
function
|
|
601
|
+
function Ce({ style: e, freeLayout: t, nodeRef: n, children: r }) {
|
|
590
602
|
let i = t ? {
|
|
591
603
|
position: "relative",
|
|
592
604
|
minHeight: 240
|
|
@@ -595,32 +607,32 @@ function be({ style: e, freeLayout: t, nodeRef: n, children: r }) {
|
|
|
595
607
|
ref: n,
|
|
596
608
|
style: i ? {
|
|
597
609
|
...i,
|
|
598
|
-
...
|
|
599
|
-
} :
|
|
600
|
-
children: [/* @__PURE__ */ u(
|
|
610
|
+
...be(e)
|
|
611
|
+
} : be(e),
|
|
612
|
+
children: [/* @__PURE__ */ u(ye, { style: e }), r]
|
|
601
613
|
});
|
|
602
614
|
}
|
|
603
|
-
function
|
|
615
|
+
function we({ text: e, parts: t, tag: n = "h2", style: r, linked: i, nodeRef: a }) {
|
|
604
616
|
return /* @__PURE__ */ u(n, {
|
|
605
617
|
ref: a,
|
|
606
618
|
style: {
|
|
607
|
-
...
|
|
619
|
+
...he,
|
|
608
620
|
...h(r)
|
|
609
621
|
},
|
|
610
|
-
children:
|
|
622
|
+
children: K(t, e, i)
|
|
611
623
|
});
|
|
612
624
|
}
|
|
613
|
-
var
|
|
625
|
+
var Te = {
|
|
614
626
|
fontFamily: j.mono.value,
|
|
615
627
|
background: "rgba(148, 163, 184, 0.18)",
|
|
616
628
|
padding: "1px 5px",
|
|
617
629
|
borderRadius: 4,
|
|
618
630
|
fontSize: "0.9em"
|
|
619
631
|
};
|
|
620
|
-
function
|
|
632
|
+
function Ee(e, t = [], n, r) {
|
|
621
633
|
let i = e;
|
|
622
634
|
return t.includes("sup") ? i = /* @__PURE__ */ u("sup", { children: i }) : t.includes("sub") && (i = /* @__PURE__ */ u("sub", { children: i })), t.includes("code") && (i = /* @__PURE__ */ u("code", {
|
|
623
|
-
style:
|
|
635
|
+
style: Te,
|
|
624
636
|
children: i
|
|
625
637
|
})), t.includes("strike") && (i = /* @__PURE__ */ u("s", { children: i })), t.includes("underline") && (i = /* @__PURE__ */ u("u", { children: i })), t.includes("italic") && (i = /* @__PURE__ */ u("em", { children: i })), t.includes("bold") && (i = /* @__PURE__ */ u("strong", { children: i })), n && (i = /* @__PURE__ */ u("a", {
|
|
626
638
|
href: n,
|
|
@@ -630,13 +642,13 @@ function Ce(e, t = [], n, r) {
|
|
|
630
642
|
children: i
|
|
631
643
|
})), i;
|
|
632
644
|
}
|
|
633
|
-
function
|
|
645
|
+
function K(t, n, r) {
|
|
634
646
|
return t?.length ? t.map((t, n) => {
|
|
635
647
|
if (t.slot) return /* @__PURE__ */ u(e, { children: r?.[t.slot] ?? null }, n);
|
|
636
|
-
if (t.parts) return /* @__PURE__ */ u(e, { children:
|
|
648
|
+
if (t.parts) return /* @__PURE__ */ u(e, { children: K(t.parts, "", r) }, n);
|
|
637
649
|
let i = t.text;
|
|
638
650
|
return t.sup ? i = /* @__PURE__ */ u("sup", { children: i }) : t.sub && (i = /* @__PURE__ */ u("sub", { children: i })), t.code && (i = /* @__PURE__ */ u("code", {
|
|
639
|
-
style:
|
|
651
|
+
style: Te,
|
|
640
652
|
children: i
|
|
641
653
|
})), t.strike && (i = /* @__PURE__ */ u("s", { children: i })), t.underline && (i = /* @__PURE__ */ u("u", { children: i })), t.italic && (i = /* @__PURE__ */ u("em", { children: i })), t.bold && (i = /* @__PURE__ */ u("strong", { children: i })), (t.color || t.background) && (i = /* @__PURE__ */ u("span", {
|
|
642
654
|
style: {
|
|
@@ -653,13 +665,13 @@ function q(t, n, r) {
|
|
|
653
665
|
})), /* @__PURE__ */ u(e, { children: i }, n);
|
|
654
666
|
}) : n;
|
|
655
667
|
}
|
|
656
|
-
function
|
|
668
|
+
function De({ parts: e, text: t, marks: n, href: r, target: i, style: a }) {
|
|
657
669
|
return /* @__PURE__ */ u("span", {
|
|
658
670
|
style: h(a),
|
|
659
|
-
children: e?.length ?
|
|
671
|
+
children: e?.length ? K(e, t) : Ee(t, n, r, i)
|
|
660
672
|
});
|
|
661
673
|
}
|
|
662
|
-
var
|
|
674
|
+
var Oe = {
|
|
663
675
|
h1: 40,
|
|
664
676
|
h2: 32,
|
|
665
677
|
h3: 26,
|
|
@@ -667,7 +679,7 @@ var Te = {
|
|
|
667
679
|
h5: 19,
|
|
668
680
|
h6: 16
|
|
669
681
|
};
|
|
670
|
-
function
|
|
682
|
+
function ke({ align: e = "center", width: t, wrap: n } = {}) {
|
|
671
683
|
let r = t ? `${t}%` : void 0;
|
|
672
684
|
if (e === "full") return { width: "100%" };
|
|
673
685
|
let i = e === "left" || e === "right";
|
|
@@ -701,8 +713,8 @@ function Ee({ align: e = "center", width: t, wrap: n } = {}) {
|
|
|
701
713
|
marginRight: "auto"
|
|
702
714
|
};
|
|
703
715
|
}
|
|
704
|
-
function
|
|
705
|
-
let r = n ?? ((e, n) =>
|
|
716
|
+
function Ae(e = [], t, n) {
|
|
717
|
+
let r = n ?? ((e, n) => K(e, n, t));
|
|
706
718
|
return e.map((t, n) => {
|
|
707
719
|
let i = {
|
|
708
720
|
marginTop: 0,
|
|
@@ -724,7 +736,7 @@ function De(e = [], t, n) {
|
|
|
724
736
|
marginLeft: 0,
|
|
725
737
|
marginRight: 0,
|
|
726
738
|
...i,
|
|
727
|
-
...
|
|
739
|
+
...ke(t)
|
|
728
740
|
},
|
|
729
741
|
children: [t.href ? /* @__PURE__ */ u("a", {
|
|
730
742
|
href: t.href,
|
|
@@ -743,16 +755,16 @@ function De(e = [], t, n) {
|
|
|
743
755
|
})]
|
|
744
756
|
}, n);
|
|
745
757
|
}
|
|
746
|
-
if (t.type === "video") return
|
|
758
|
+
if (t.type === "video") return Ve(t.url) ? /* @__PURE__ */ u("div", {
|
|
747
759
|
style: {
|
|
748
760
|
...i,
|
|
749
|
-
...
|
|
761
|
+
...ke({
|
|
750
762
|
align: t.align,
|
|
751
763
|
wrap: t.wrap,
|
|
752
764
|
width: t.width ?? 100
|
|
753
765
|
})
|
|
754
766
|
},
|
|
755
|
-
children: /* @__PURE__ */ u(
|
|
767
|
+
children: /* @__PURE__ */ u(He, {
|
|
756
768
|
url: t.url,
|
|
757
769
|
autoplay: t.autoplay,
|
|
758
770
|
muted: t.muted,
|
|
@@ -814,17 +826,17 @@ function De(e = [], t, n) {
|
|
|
814
826
|
}
|
|
815
827
|
if (t.type === "quote") return /* @__PURE__ */ u("blockquote", {
|
|
816
828
|
style: {
|
|
817
|
-
...
|
|
829
|
+
...Me,
|
|
818
830
|
...i
|
|
819
831
|
},
|
|
820
832
|
children: r(t.parts, t.text)
|
|
821
833
|
}, n);
|
|
822
|
-
if (
|
|
834
|
+
if (Oe[t.type]) {
|
|
823
835
|
let e = t.type;
|
|
824
836
|
return /* @__PURE__ */ u(e, {
|
|
825
837
|
style: {
|
|
826
|
-
...
|
|
827
|
-
fontSize:
|
|
838
|
+
...he,
|
|
839
|
+
fontSize: Oe[t.type],
|
|
828
840
|
...i
|
|
829
841
|
},
|
|
830
842
|
children: r(t.parts, t.text)
|
|
@@ -832,39 +844,39 @@ function De(e = [], t, n) {
|
|
|
832
844
|
}
|
|
833
845
|
return /* @__PURE__ */ u("p", {
|
|
834
846
|
style: {
|
|
835
|
-
...
|
|
847
|
+
...ge,
|
|
836
848
|
...i
|
|
837
849
|
},
|
|
838
850
|
children: r(t.parts, t.text)
|
|
839
851
|
}, n);
|
|
840
852
|
});
|
|
841
853
|
}
|
|
842
|
-
function
|
|
854
|
+
function je({ content: e, style: t, linked: n, nodeRef: r }) {
|
|
843
855
|
return /* @__PURE__ */ u("div", {
|
|
844
856
|
ref: r,
|
|
845
857
|
style: {
|
|
846
858
|
display: "flow-root",
|
|
847
859
|
...h(t)
|
|
848
860
|
},
|
|
849
|
-
children:
|
|
861
|
+
children: Ae(e, n)
|
|
850
862
|
});
|
|
851
863
|
}
|
|
852
|
-
var
|
|
864
|
+
var Me = {
|
|
853
865
|
margin: 0,
|
|
854
866
|
padding: "8px 0 8px 20px",
|
|
855
867
|
borderLeft: "4px solid var(--page-accent, rgba(148, 163, 184, 0.6))"
|
|
856
868
|
};
|
|
857
|
-
function
|
|
869
|
+
function Ne({ text: e, parts: t, style: n, linked: r, nodeRef: i }) {
|
|
858
870
|
return /* @__PURE__ */ u("blockquote", {
|
|
859
871
|
ref: i,
|
|
860
872
|
style: {
|
|
861
|
-
...
|
|
873
|
+
...Me,
|
|
862
874
|
...h(n)
|
|
863
875
|
},
|
|
864
|
-
children:
|
|
876
|
+
children: K(t, e, r)
|
|
865
877
|
});
|
|
866
878
|
}
|
|
867
|
-
function
|
|
879
|
+
function Pe({ ordered: e, items: t = [], style: n, nodeRef: r }) {
|
|
868
880
|
return /* @__PURE__ */ u(e ? "ol" : "ul", {
|
|
869
881
|
ref: r,
|
|
870
882
|
style: {
|
|
@@ -874,53 +886,53 @@ function je({ ordered: e, items: t = [], style: n, nodeRef: r }) {
|
|
|
874
886
|
},
|
|
875
887
|
children: t.map((e, t) => /* @__PURE__ */ u("li", {
|
|
876
888
|
style: { marginBottom: 4 },
|
|
877
|
-
children:
|
|
889
|
+
children: K(e.parts, e.text)
|
|
878
890
|
}, t))
|
|
879
891
|
});
|
|
880
892
|
}
|
|
881
|
-
function
|
|
893
|
+
function Fe({ text: e, parts: t, style: n, linked: r, nodeRef: i }) {
|
|
882
894
|
return /* @__PURE__ */ u("p", {
|
|
883
895
|
ref: i,
|
|
884
896
|
style: {
|
|
885
|
-
...
|
|
897
|
+
...ge,
|
|
886
898
|
...h(n)
|
|
887
899
|
},
|
|
888
|
-
children:
|
|
900
|
+
children: K(t, e, r)
|
|
889
901
|
});
|
|
890
902
|
}
|
|
891
|
-
var
|
|
903
|
+
var Ie = {
|
|
892
904
|
color: "var(--page-accent, inherit)",
|
|
893
905
|
textDecoration: "underline",
|
|
894
906
|
textUnderlineOffset: 3,
|
|
895
907
|
cursor: "pointer"
|
|
896
908
|
};
|
|
897
|
-
function
|
|
909
|
+
function Le({ text: e, parts: t, href: n, target: r, style: i, linked: a, nodeRef: o }) {
|
|
898
910
|
return /* @__PURE__ */ u("a", {
|
|
899
911
|
ref: o,
|
|
900
912
|
href: n || "#",
|
|
901
913
|
target: r || void 0,
|
|
902
914
|
rel: r === "_blank" ? "noopener noreferrer" : void 0,
|
|
903
915
|
style: {
|
|
904
|
-
...
|
|
916
|
+
...Ie,
|
|
905
917
|
...h(i)
|
|
906
918
|
},
|
|
907
|
-
children:
|
|
919
|
+
children: K(t, e, a)
|
|
908
920
|
});
|
|
909
921
|
}
|
|
910
|
-
function
|
|
922
|
+
function Re({ text: e, parts: t, href: n, target: r, style: i, linked: a, nodeRef: o }) {
|
|
911
923
|
return /* @__PURE__ */ u("a", {
|
|
912
924
|
ref: o,
|
|
913
925
|
href: n || "#",
|
|
914
926
|
target: r || void 0,
|
|
915
927
|
rel: r === "_blank" ? "noopener noreferrer" : void 0,
|
|
916
928
|
style: {
|
|
917
|
-
...
|
|
929
|
+
...G,
|
|
918
930
|
...h(i)
|
|
919
931
|
},
|
|
920
|
-
children:
|
|
932
|
+
children: K(t, e, a)
|
|
921
933
|
});
|
|
922
934
|
}
|
|
923
|
-
function
|
|
935
|
+
function ze({ src: e, alt: t, style: n, nodeRef: r }) {
|
|
924
936
|
return e ? /* @__PURE__ */ u("img", {
|
|
925
937
|
ref: r,
|
|
926
938
|
src: e,
|
|
@@ -932,7 +944,7 @@ function Ie({ src: e, alt: t, style: n, nodeRef: r }) {
|
|
|
932
944
|
}
|
|
933
945
|
}) : null;
|
|
934
946
|
}
|
|
935
|
-
function
|
|
947
|
+
function Be({ src: e, poster: t, controls: n = !0, autoplay: r = !1, loop: i = !1, muted: a = !1, style: o, nodeRef: s }) {
|
|
936
948
|
return e ? /* @__PURE__ */ u("video", {
|
|
937
949
|
ref: s,
|
|
938
950
|
src: e,
|
|
@@ -950,9 +962,9 @@ function Le({ src: e, poster: t, controls: n = !0, autoplay: r = !1, loop: i = !
|
|
|
950
962
|
}
|
|
951
963
|
}) : null;
|
|
952
964
|
}
|
|
953
|
-
var
|
|
954
|
-
function
|
|
955
|
-
let c =
|
|
965
|
+
var Ve = (e = "") => (e.match(/(?:youtu\.be\/|v=|embed\/|shorts\/|live\/)([\w-]{11})/) || e.match(/^([\w-]{11})$/))?.[1];
|
|
966
|
+
function He({ url: e, autoplay: t = !1, muted: n = !1, loop: r = !1, controls: i = !0, start: a, style: o, nodeRef: s }) {
|
|
967
|
+
let c = Ve(e);
|
|
956
968
|
if (!c) return null;
|
|
957
969
|
let l = new URLSearchParams({ rel: "0" });
|
|
958
970
|
return t && l.set("autoplay", "1"), (n || t) && l.set("mute", "1"), i || l.set("controls", "0"), r && (l.set("loop", "1"), l.set("playlist", c)), Number(a) > 0 && l.set("start", String(Math.floor(Number(a)))), /* @__PURE__ */ u("div", {
|
|
@@ -978,7 +990,7 @@ function ze({ url: e, autoplay: t = !1, muted: n = !1, loop: r = !1, controls: i
|
|
|
978
990
|
})
|
|
979
991
|
});
|
|
980
992
|
}
|
|
981
|
-
function
|
|
993
|
+
function Ue({ src: e, title: t, allowFullscreen: n = !0, style: r, nodeRef: i }) {
|
|
982
994
|
return e ? /* @__PURE__ */ u("iframe", {
|
|
983
995
|
ref: i,
|
|
984
996
|
src: e,
|
|
@@ -994,7 +1006,7 @@ function Be({ src: e, title: t, allowFullscreen: n = !0, style: r, nodeRef: i })
|
|
|
994
1006
|
}
|
|
995
1007
|
}) : null;
|
|
996
1008
|
}
|
|
997
|
-
function
|
|
1009
|
+
function We({ code: e, runScripts: t = !0, style: n, nodeRef: r }) {
|
|
998
1010
|
let [a, o] = c(null);
|
|
999
1011
|
return i(() => {
|
|
1000
1012
|
a && (a.innerHTML = e || "", t && a.querySelectorAll("script").forEach((e) => {
|
|
@@ -1013,7 +1025,7 @@ function Ve({ code: e, runScripts: t = !0, style: n, nodeRef: r }) {
|
|
|
1013
1025
|
style: h(n)
|
|
1014
1026
|
});
|
|
1015
1027
|
}
|
|
1016
|
-
function
|
|
1028
|
+
function Ge({ height: e, nodeRef: t }) {
|
|
1017
1029
|
return /* @__PURE__ */ u("div", {
|
|
1018
1030
|
ref: t,
|
|
1019
1031
|
style: {
|
|
@@ -1023,7 +1035,7 @@ function He({ height: e, nodeRef: t }) {
|
|
|
1023
1035
|
}
|
|
1024
1036
|
});
|
|
1025
1037
|
}
|
|
1026
|
-
function
|
|
1038
|
+
function Ke({ style: e, nodeRef: t }) {
|
|
1027
1039
|
return /* @__PURE__ */ u("div", {
|
|
1028
1040
|
ref: t,
|
|
1029
1041
|
style: {
|
|
@@ -1034,7 +1046,7 @@ function Ue({ style: e, nodeRef: t }) {
|
|
|
1034
1046
|
}
|
|
1035
1047
|
});
|
|
1036
1048
|
}
|
|
1037
|
-
var
|
|
1049
|
+
var qe = {
|
|
1038
1050
|
position: "absolute",
|
|
1039
1051
|
top: "50%",
|
|
1040
1052
|
transform: "translateY(-50%)",
|
|
@@ -1051,7 +1063,7 @@ var We = {
|
|
|
1051
1063
|
alignItems: "center",
|
|
1052
1064
|
justifyContent: "center",
|
|
1053
1065
|
padding: 0
|
|
1054
|
-
},
|
|
1066
|
+
}, Je = {
|
|
1055
1067
|
bottom: {
|
|
1056
1068
|
inset: "auto 0 0 0",
|
|
1057
1069
|
padding: "40px 24px 20px",
|
|
@@ -1070,8 +1082,8 @@ var We = {
|
|
|
1070
1082
|
padding: 24,
|
|
1071
1083
|
textShadow: "0 2px 12px rgba(0, 0, 0, 0.6)"
|
|
1072
1084
|
}
|
|
1073
|
-
},
|
|
1074
|
-
function
|
|
1085
|
+
}, Ye = 48;
|
|
1086
|
+
function Xe({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, height: a = 320, swipe: o = !0, style: s, nodeRef: f }) {
|
|
1075
1087
|
let [p, m] = c(0), [g, _] = c(!1), [v, y] = c(null), b = e ? Math.min(p, e - 1) : 0;
|
|
1076
1088
|
if (i(() => {
|
|
1077
1089
|
if (!n || g || v || e < 2) return;
|
|
@@ -1087,7 +1099,7 @@ function qe({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
|
|
|
1087
1099
|
let x = (t) => m((t + e) % e), S = () => {
|
|
1088
1100
|
if (!v) return;
|
|
1089
1101
|
let { dx: e } = v;
|
|
1090
|
-
y(null), e < -48 ? x(b + 1) : e >
|
|
1102
|
+
y(null), e < -48 ? x(b + 1) : e > Ye && x(b - 1);
|
|
1091
1103
|
};
|
|
1092
1104
|
return /* @__PURE__ */ d("div", {
|
|
1093
1105
|
ref: f,
|
|
@@ -1135,7 +1147,7 @@ function qe({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
|
|
|
1135
1147
|
type: "button",
|
|
1136
1148
|
"aria-label": "Previous slide",
|
|
1137
1149
|
style: {
|
|
1138
|
-
...
|
|
1150
|
+
...qe,
|
|
1139
1151
|
left: 12
|
|
1140
1152
|
},
|
|
1141
1153
|
onClick: () => x(b - 1),
|
|
@@ -1145,7 +1157,7 @@ function qe({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
|
|
|
1145
1157
|
type: "button",
|
|
1146
1158
|
"aria-label": "Next slide",
|
|
1147
1159
|
style: {
|
|
1148
|
-
...
|
|
1160
|
+
...qe,
|
|
1149
1161
|
right: 12
|
|
1150
1162
|
},
|
|
1151
1163
|
onClick: () => x(b + 1),
|
|
@@ -1179,7 +1191,7 @@ function qe({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
|
|
|
1179
1191
|
] })]
|
|
1180
1192
|
});
|
|
1181
1193
|
}
|
|
1182
|
-
var
|
|
1194
|
+
var Ze = (e, t) => ({
|
|
1183
1195
|
position: "absolute",
|
|
1184
1196
|
inset: 0,
|
|
1185
1197
|
backgroundImage: e ? `url(${e})` : "none",
|
|
@@ -1187,18 +1199,18 @@ var Je = (e, t) => ({
|
|
|
1187
1199
|
backgroundSize: "cover",
|
|
1188
1200
|
backgroundPosition: "center"
|
|
1189
1201
|
});
|
|
1190
|
-
function
|
|
1191
|
-
return e.length ? /* @__PURE__ */ u(
|
|
1202
|
+
function Qe({ slides: e = [], captionPosition: t = "bottom", captionAlign: n = "left", ...r }) {
|
|
1203
|
+
return e.length ? /* @__PURE__ */ u(Xe, {
|
|
1192
1204
|
...r,
|
|
1193
1205
|
count: e.length,
|
|
1194
1206
|
renderSlide: (r) => {
|
|
1195
1207
|
let i = e[r];
|
|
1196
|
-
return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("div", { style:
|
|
1208
|
+
return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("div", { style: Ze(i.image) }), (i.title || i.text) && /* @__PURE__ */ d("div", {
|
|
1197
1209
|
style: {
|
|
1198
1210
|
position: "absolute",
|
|
1199
1211
|
color: "#fff",
|
|
1200
1212
|
textAlign: n,
|
|
1201
|
-
...
|
|
1213
|
+
...Je[t] ?? Je.bottom
|
|
1202
1214
|
},
|
|
1203
1215
|
children: [i.title && /* @__PURE__ */ u("div", {
|
|
1204
1216
|
style: {
|
|
@@ -1218,13 +1230,13 @@ function Ye({ slides: e = [], captionPosition: t = "bottom", captionAlign: n = "
|
|
|
1218
1230
|
}
|
|
1219
1231
|
}) : null;
|
|
1220
1232
|
}
|
|
1221
|
-
function
|
|
1222
|
-
return e.length ? /* @__PURE__ */ u(
|
|
1233
|
+
function $e({ slides: e = [], linked: t, ...n }) {
|
|
1234
|
+
return e.length ? /* @__PURE__ */ u(Xe, {
|
|
1223
1235
|
...n,
|
|
1224
1236
|
count: e.length,
|
|
1225
1237
|
renderSlide: (n) => {
|
|
1226
1238
|
let r = e[n];
|
|
1227
|
-
return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("div", { style:
|
|
1239
|
+
return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("div", { style: Ze(r.image, r.color) }), /* @__PURE__ */ u("div", {
|
|
1228
1240
|
style: {
|
|
1229
1241
|
position: "absolute",
|
|
1230
1242
|
inset: 0,
|
|
@@ -1236,7 +1248,7 @@ function Xe({ slides: e = [], linked: t, ...n }) {
|
|
|
1236
1248
|
}
|
|
1237
1249
|
}) : null;
|
|
1238
1250
|
}
|
|
1239
|
-
function
|
|
1251
|
+
function et({ images: e = [], columns: t = 3, gap: n = 8, showNames: r = !1, lightbox: a = !0, style: o, nodeRef: s, inert: f }) {
|
|
1240
1252
|
let p = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && e.src) : [], m = Math.max(0, Number(n) || 0), g = f ? (e) => e.preventDefault() : void 0, [_, v] = c(null), y = a && !f && _ !== null && p[_];
|
|
1241
1253
|
i(() => {
|
|
1242
1254
|
if (!y) return;
|
|
@@ -1435,19 +1447,19 @@ function Ze({ images: e = [], columns: t = 3, gap: n = 8, showNames: r = !1, lig
|
|
|
1435
1447
|
]
|
|
1436
1448
|
});
|
|
1437
1449
|
}
|
|
1438
|
-
var
|
|
1450
|
+
var tt = {
|
|
1439
1451
|
color: "inherit",
|
|
1440
1452
|
textDecoration: "none",
|
|
1441
1453
|
fontSize: 14,
|
|
1442
1454
|
opacity: .85
|
|
1443
|
-
},
|
|
1455
|
+
}, nt = {
|
|
1444
1456
|
background: "var(--page-bg, #ffffff)",
|
|
1445
1457
|
color: "var(--page-text, #111827)",
|
|
1446
1458
|
border: "1px solid rgba(148, 163, 184, 0.25)",
|
|
1447
1459
|
boxShadow: "0 16px 40px rgba(15, 23, 42, 0.16)",
|
|
1448
1460
|
zIndex: 60
|
|
1449
1461
|
};
|
|
1450
|
-
function
|
|
1462
|
+
function rt({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], style: s, nodeRef: f, menu: p = "auto", breakpoint: m = 768 }) {
|
|
1451
1463
|
let [g, _] = c(null), [v, y] = c(!1), [b, x] = c(!1), [S, C] = c(null);
|
|
1452
1464
|
i(() => {
|
|
1453
1465
|
if (!g) return;
|
|
@@ -1457,7 +1469,7 @@ function et({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
|
|
|
1457
1469
|
let w = p === "hamburger" || p === "auto" && v, T = (e, t) => /* @__PURE__ */ d("a", {
|
|
1458
1470
|
href: e.href || "#",
|
|
1459
1471
|
style: {
|
|
1460
|
-
...
|
|
1472
|
+
...tt,
|
|
1461
1473
|
display: "block",
|
|
1462
1474
|
...t
|
|
1463
1475
|
},
|
|
@@ -1545,7 +1557,7 @@ function et({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
|
|
|
1545
1557
|
let t = e.children ?? [];
|
|
1546
1558
|
if (!t.length) return /* @__PURE__ */ u("a", {
|
|
1547
1559
|
href: e.href || "#",
|
|
1548
|
-
style:
|
|
1560
|
+
style: tt,
|
|
1549
1561
|
children: e.label
|
|
1550
1562
|
}, e.key);
|
|
1551
1563
|
let n = e.type === "mega";
|
|
@@ -1559,7 +1571,7 @@ function et({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
|
|
|
1559
1571
|
children: [/* @__PURE__ */ d("a", {
|
|
1560
1572
|
href: e.href || "#",
|
|
1561
1573
|
style: {
|
|
1562
|
-
...
|
|
1574
|
+
...tt,
|
|
1563
1575
|
cursor: "pointer"
|
|
1564
1576
|
},
|
|
1565
1577
|
children: [
|
|
@@ -1575,7 +1587,7 @@ function et({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
|
|
|
1575
1587
|
]
|
|
1576
1588
|
}), S === e.key && (n ? /* @__PURE__ */ u("div", {
|
|
1577
1589
|
style: {
|
|
1578
|
-
|
|
1590
|
+
...nt,
|
|
1579
1591
|
position: "absolute",
|
|
1580
1592
|
left: 0,
|
|
1581
1593
|
right: 0,
|
|
@@ -1591,7 +1603,7 @@ function et({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
|
|
|
1591
1603
|
}))
|
|
1592
1604
|
}) : /* @__PURE__ */ u("div", {
|
|
1593
1605
|
style: {
|
|
1594
|
-
|
|
1606
|
+
...nt,
|
|
1595
1607
|
position: "absolute",
|
|
1596
1608
|
top: "100%",
|
|
1597
1609
|
left: 0,
|
|
@@ -1620,7 +1632,7 @@ function et({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
|
|
|
1620
1632
|
children: o.map((t) => /* @__PURE__ */ d(e, { children: [/* @__PURE__ */ u("a", {
|
|
1621
1633
|
href: t.href || "#",
|
|
1622
1634
|
style: {
|
|
1623
|
-
...
|
|
1635
|
+
...tt,
|
|
1624
1636
|
padding: "10px 4px",
|
|
1625
1637
|
fontWeight: (t.children ?? []).length ? 600 : 400,
|
|
1626
1638
|
opacity: 1
|
|
@@ -1631,7 +1643,7 @@ function et({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
|
|
|
1631
1643
|
]
|
|
1632
1644
|
});
|
|
1633
1645
|
}
|
|
1634
|
-
function
|
|
1646
|
+
function it({ tabs: e = [], linked: t, style: n, nodeRef: r }) {
|
|
1635
1647
|
let [i, a] = c(0), o = e.length ? Math.min(i, e.length - 1) : 0;
|
|
1636
1648
|
return e.length ? /* @__PURE__ */ d("div", {
|
|
1637
1649
|
ref: r,
|
|
@@ -1671,7 +1683,7 @@ function tt({ tabs: e = [], linked: t, style: n, nodeRef: r }) {
|
|
|
1671
1683
|
}, e.key))]
|
|
1672
1684
|
}) : null;
|
|
1673
1685
|
}
|
|
1674
|
-
function
|
|
1686
|
+
function at({ items: e = [], linked: t, multiple: n = !1, style: r, nodeRef: i }) {
|
|
1675
1687
|
let [a, o] = c(() => new Set(e.length ? [e[0].key] : []));
|
|
1676
1688
|
if (!e.length) return null;
|
|
1677
1689
|
let s = (e) => o((t) => {
|
|
@@ -1728,15 +1740,15 @@ function nt({ items: e = [], linked: t, multiple: n = !1, style: r, nodeRef: i }
|
|
|
1728
1740
|
})
|
|
1729
1741
|
});
|
|
1730
1742
|
}
|
|
1731
|
-
var
|
|
1743
|
+
var ot = {
|
|
1732
1744
|
display: "flex",
|
|
1733
1745
|
flexDirection: "column",
|
|
1734
1746
|
gap: "12px"
|
|
1735
|
-
},
|
|
1747
|
+
}, q = {
|
|
1736
1748
|
fontSize: "14px",
|
|
1737
1749
|
fontWeight: 500,
|
|
1738
1750
|
color: "var(--page-text, #111827)"
|
|
1739
|
-
},
|
|
1751
|
+
}, J = {
|
|
1740
1752
|
padding: "10px 12px",
|
|
1741
1753
|
border: "1px solid #d1d5db",
|
|
1742
1754
|
borderRadius: "6px",
|
|
@@ -1746,18 +1758,18 @@ var rt = {
|
|
|
1746
1758
|
boxSizing: "border-box",
|
|
1747
1759
|
backgroundColor: "#ffffff",
|
|
1748
1760
|
color: "#111827"
|
|
1749
|
-
},
|
|
1761
|
+
}, st = {
|
|
1750
1762
|
display: "flex",
|
|
1751
1763
|
alignItems: "center",
|
|
1752
1764
|
gap: "8px",
|
|
1753
1765
|
fontSize: "14px",
|
|
1754
1766
|
color: "var(--page-text, #111827)"
|
|
1755
|
-
},
|
|
1767
|
+
}, Y = (e) => e ? {
|
|
1756
1768
|
readOnly: !0,
|
|
1757
1769
|
tabIndex: -1,
|
|
1758
1770
|
onMouseDown: (e) => e.preventDefault()
|
|
1759
1771
|
} : {};
|
|
1760
|
-
function
|
|
1772
|
+
function ct(e, t) {
|
|
1761
1773
|
if (!e) return !0;
|
|
1762
1774
|
let n = t[e.field], r = n == null || n === "" ? "" : String(n), i = e.value ?? "";
|
|
1763
1775
|
switch (e.op) {
|
|
@@ -1771,11 +1783,11 @@ function at(e, t) {
|
|
|
1771
1783
|
default: return !1;
|
|
1772
1784
|
}
|
|
1773
1785
|
}
|
|
1774
|
-
var
|
|
1786
|
+
var lt = {
|
|
1775
1787
|
display: "flex",
|
|
1776
1788
|
flexDirection: "column",
|
|
1777
1789
|
gap: 6
|
|
1778
|
-
},
|
|
1790
|
+
}, ut = {
|
|
1779
1791
|
font: "inherit",
|
|
1780
1792
|
fontSize: 15,
|
|
1781
1793
|
padding: "10px 12px",
|
|
@@ -1786,16 +1798,16 @@ var ot = {
|
|
|
1786
1798
|
width: "100%",
|
|
1787
1799
|
boxSizing: "border-box"
|
|
1788
1800
|
};
|
|
1789
|
-
function
|
|
1801
|
+
function dt(e, t) {
|
|
1790
1802
|
let n = Array.isArray(e?.options) ? e.options : [];
|
|
1791
1803
|
if (!e?.parentField) return n;
|
|
1792
1804
|
let r = t?.[e.parentField];
|
|
1793
1805
|
return r ? n.filter((e) => typeof e == "string" ? !1 : !e.parent || e.parent === r) : [];
|
|
1794
1806
|
}
|
|
1795
|
-
function
|
|
1807
|
+
function ft({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
1796
1808
|
let a = /* @__PURE__ */ d("span", {
|
|
1797
1809
|
style: {
|
|
1798
|
-
...
|
|
1810
|
+
...q,
|
|
1799
1811
|
fontSize: 14
|
|
1800
1812
|
},
|
|
1801
1813
|
children: [e.label, e.required ? " *" : ""]
|
|
@@ -1804,7 +1816,7 @@ function lt({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
|
1804
1816
|
required: e.required || void 0,
|
|
1805
1817
|
placeholder: e.placeholder || void 0,
|
|
1806
1818
|
disabled: r || void 0,
|
|
1807
|
-
style:
|
|
1819
|
+
style: ut,
|
|
1808
1820
|
value: t ?? "",
|
|
1809
1821
|
onChange: (t) => n(e.name, t.target.value)
|
|
1810
1822
|
};
|
|
@@ -1833,7 +1845,7 @@ function lt({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
|
1833
1845
|
borderRadius: 8,
|
|
1834
1846
|
display: "block"
|
|
1835
1847
|
}
|
|
1836
|
-
}) : null : e.type === "video" ? e.src ? /youtube\.com|youtu\.be|vimeo\.com/i.test(e.src) ? /* @__PURE__ */ u(
|
|
1848
|
+
}) : null : e.type === "video" ? e.src ? /youtube\.com|youtu\.be|vimeo\.com/i.test(e.src) ? /* @__PURE__ */ u(He, {
|
|
1837
1849
|
url: e.src,
|
|
1838
1850
|
style: { width: "100%" }
|
|
1839
1851
|
}) : /* @__PURE__ */ u("video", {
|
|
@@ -1845,14 +1857,14 @@ function lt({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
|
1845
1857
|
display: "block"
|
|
1846
1858
|
}
|
|
1847
1859
|
}) : null : /* @__PURE__ */ d("label", {
|
|
1848
|
-
style:
|
|
1860
|
+
style: lt,
|
|
1849
1861
|
children: [
|
|
1850
1862
|
a,
|
|
1851
1863
|
e.type === "textarea" || e.multiline ? /* @__PURE__ */ u("textarea", {
|
|
1852
1864
|
...o,
|
|
1853
1865
|
rows: 4,
|
|
1854
1866
|
style: {
|
|
1855
|
-
...
|
|
1867
|
+
...ut,
|
|
1856
1868
|
resize: "vertical"
|
|
1857
1869
|
}
|
|
1858
1870
|
}) : e.type === "select" ? /* @__PURE__ */ d("select", {
|
|
@@ -1861,7 +1873,7 @@ function lt({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
|
1861
1873
|
children: [/* @__PURE__ */ u("option", {
|
|
1862
1874
|
value: "",
|
|
1863
1875
|
children: e.placeholder || "—"
|
|
1864
|
-
}),
|
|
1876
|
+
}), dt(e, i).map((e, t) => /* @__PURE__ */ u("option", {
|
|
1865
1877
|
value: typeof e == "string" ? e : e.value,
|
|
1866
1878
|
children: typeof e == "string" ? e : e.label ?? e.value
|
|
1867
1879
|
}, t))]
|
|
@@ -1908,8 +1920,8 @@ function lt({ field: e, value: t, onChange: n, inert: r, values: i }) {
|
|
|
1908
1920
|
]
|
|
1909
1921
|
});
|
|
1910
1922
|
}
|
|
1911
|
-
function
|
|
1912
|
-
let { tenant: b, apiUrl: x } = r(
|
|
1923
|
+
function pt({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s, auto: f, submitLabel: p, nodeRef: m, inert: g, children: _, linked: v, show: y }) {
|
|
1924
|
+
let { tenant: b, apiUrl: x } = r(B), [S, C] = c("form"), [w, T] = c(null), [E, D] = c({}), [O, k] = c(0), A = g ? y || "form" : S;
|
|
1913
1925
|
i(() => {
|
|
1914
1926
|
if (!f || !s) return;
|
|
1915
1927
|
let e = !0;
|
|
@@ -1930,13 +1942,13 @@ function ut({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
|
|
|
1930
1942
|
section: e,
|
|
1931
1943
|
fields: []
|
|
1932
1944
|
}) : j[j.length - 1].fields.push(e);
|
|
1933
|
-
let M = j.filter((e) => e.section || e.fields.length), N = M.filter((e) => !e.section ||
|
|
1945
|
+
let M = j.filter((e) => e.section || e.fields.length), N = M.filter((e) => !e.section || ct(e.section.condition, E)).map((e) => ({
|
|
1934
1946
|
...e,
|
|
1935
|
-
fields: e.fields.filter((e) =>
|
|
1947
|
+
fields: e.fields.filter((e) => ct(e.condition, E))
|
|
1936
1948
|
})), P = M.length > 1, F = Math.min(O, Math.max(0, N.length - 1)), I = P ? N[F]?.fields ?? [] : N.flatMap((e) => e.fields), ee = I.filter((e) => {
|
|
1937
1949
|
let t = E[e.name];
|
|
1938
1950
|
return e.required && (t == null || t === "" || t === !1);
|
|
1939
|
-
}), L = F >= N.length - 1,
|
|
1951
|
+
}), L = F >= N.length - 1, te = (e, t) => D((n) => {
|
|
1940
1952
|
let r = {
|
|
1941
1953
|
...n,
|
|
1942
1954
|
[e]: t
|
|
@@ -1990,11 +2002,11 @@ function ut({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
|
|
|
1990
2002
|
}
|
|
1991
2003
|
},
|
|
1992
2004
|
style: {
|
|
1993
|
-
...
|
|
2005
|
+
...ot,
|
|
1994
2006
|
display: A === "success" ? "none" : "flex"
|
|
1995
2007
|
},
|
|
1996
2008
|
children: f && s ? /* @__PURE__ */ d(l, { children: [
|
|
1997
|
-
P && /* @__PURE__ */ u(
|
|
2009
|
+
P && /* @__PURE__ */ u(Ft, {
|
|
1998
2010
|
steps: N.map((e) => ({ label: e.section?.label ?? "Start" })),
|
|
1999
2011
|
active: F + 1,
|
|
2000
2012
|
style: { marginBottom: 8 }
|
|
@@ -2007,11 +2019,11 @@ function ut({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
|
|
|
2007
2019
|
},
|
|
2008
2020
|
children: N[F].section.help
|
|
2009
2021
|
}),
|
|
2010
|
-
I.map((e) => /* @__PURE__ */ u(
|
|
2022
|
+
I.map((e) => /* @__PURE__ */ u(ft, {
|
|
2011
2023
|
field: e,
|
|
2012
2024
|
value: E[e.name],
|
|
2013
2025
|
values: E,
|
|
2014
|
-
onChange:
|
|
2026
|
+
onChange: te,
|
|
2015
2027
|
inert: g
|
|
2016
2028
|
}, e.name)),
|
|
2017
2029
|
/* @__PURE__ */ d("div", {
|
|
@@ -2026,7 +2038,7 @@ function ut({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
|
|
|
2026
2038
|
disabled: g || void 0,
|
|
2027
2039
|
onClick: () => k(F - 1),
|
|
2028
2040
|
style: {
|
|
2029
|
-
...
|
|
2041
|
+
...G,
|
|
2030
2042
|
background: "transparent",
|
|
2031
2043
|
color: "inherit",
|
|
2032
2044
|
border: 0,
|
|
@@ -2039,7 +2051,7 @@ function ut({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
|
|
|
2039
2051
|
disabled: g || ee.length > 0,
|
|
2040
2052
|
onClick: () => k(F + 1),
|
|
2041
2053
|
style: {
|
|
2042
|
-
...
|
|
2054
|
+
...G,
|
|
2043
2055
|
border: 0,
|
|
2044
2056
|
padding: "10px 22px",
|
|
2045
2057
|
borderRadius: 8,
|
|
@@ -2053,7 +2065,7 @@ function ut({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
|
|
|
2053
2065
|
type: "submit",
|
|
2054
2066
|
disabled: g || void 0,
|
|
2055
2067
|
style: {
|
|
2056
|
-
...
|
|
2068
|
+
...G,
|
|
2057
2069
|
border: 0,
|
|
2058
2070
|
padding: "10px 22px",
|
|
2059
2071
|
borderRadius: 8,
|
|
@@ -2080,10 +2092,10 @@ function ut({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
|
|
|
2080
2092
|
]
|
|
2081
2093
|
});
|
|
2082
2094
|
}
|
|
2083
|
-
var
|
|
2095
|
+
var X = null, mt = null, ht = (e) => {
|
|
2084
2096
|
let t = typeof e == "string" && e.trim() ? e.trim() : "";
|
|
2085
|
-
if (
|
|
2086
|
-
if (
|
|
2097
|
+
if (X && mt === t) return X;
|
|
2098
|
+
if (X && typeof window < "u") {
|
|
2087
2099
|
for (let e of ["grecaptcha", "___grecaptcha_cfg"]) try {
|
|
2088
2100
|
delete window[e];
|
|
2089
2101
|
} catch {
|
|
@@ -2091,27 +2103,32 @@ var Z = null, dt = null, ft = (e) => {
|
|
|
2091
2103
|
}
|
|
2092
2104
|
document.querySelectorAll("script[src*=\"recaptcha\"]").forEach((e) => e.remove());
|
|
2093
2105
|
}
|
|
2094
|
-
return
|
|
2106
|
+
return mt = t, X = new Promise((e) => {
|
|
2095
2107
|
if (typeof window > "u") return;
|
|
2096
2108
|
if (window.grecaptcha?.render) return e(window.grecaptcha);
|
|
2097
2109
|
window.__webimRecaptchaReady = () => e(window.grecaptcha);
|
|
2098
2110
|
let n = document.createElement("script");
|
|
2099
2111
|
n.src = `https://www.google.com/recaptcha/api.js?onload=__webimRecaptchaReady&render=explicit${t ? `&hl=${encodeURIComponent(t)}` : ""}`, n.async = !0, document.head.appendChild(n);
|
|
2100
|
-
}),
|
|
2112
|
+
}), X;
|
|
2101
2113
|
};
|
|
2102
|
-
function
|
|
2103
|
-
let
|
|
2104
|
-
if (i(() => {
|
|
2105
|
-
if (l || !
|
|
2106
|
-
let e = !0
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2114
|
+
function gt({ siteKey: e, theme: t, size: n, hl: a, style: o, nodeRef: c, inert: l, onChange: f }) {
|
|
2115
|
+
let p = r(B), m = p?.settings && typeof p.settings == "object" ? p.settings["google.recaptchaKey"] : "", g = typeof e == "string" && e.trim() || (typeof m == "string" ? m.trim() : ""), _ = s(null), v = s(f);
|
|
2116
|
+
if (v.current = f, i(() => {
|
|
2117
|
+
if (l || !g || !_.current) return;
|
|
2118
|
+
let e = !0, r = (t) => {
|
|
2119
|
+
e && typeof v.current == "function" && v.current(t);
|
|
2120
|
+
};
|
|
2121
|
+
return ht(a).then((i) => {
|
|
2122
|
+
if (!(!e || !_.current || !i?.render)) {
|
|
2123
|
+
_.current.innerHTML = "", r("");
|
|
2110
2124
|
try {
|
|
2111
|
-
|
|
2112
|
-
sitekey:
|
|
2125
|
+
i.render(_.current, {
|
|
2126
|
+
sitekey: g,
|
|
2113
2127
|
theme: t === "dark" ? "dark" : "light",
|
|
2114
|
-
size: n === "compact" ? "compact" : "normal"
|
|
2128
|
+
size: n === "compact" ? "compact" : "normal",
|
|
2129
|
+
callback: (e) => r(typeof e == "string" ? e : ""),
|
|
2130
|
+
"expired-callback": () => r(""),
|
|
2131
|
+
"error-callback": () => r("")
|
|
2115
2132
|
});
|
|
2116
2133
|
} catch {}
|
|
2117
2134
|
}
|
|
@@ -2120,7 +2137,7 @@ function pt({ siteKey: e, theme: t, size: n, hl: a, style: o, nodeRef: c, inert:
|
|
|
2120
2137
|
};
|
|
2121
2138
|
}, [
|
|
2122
2139
|
l,
|
|
2123
|
-
|
|
2140
|
+
g,
|
|
2124
2141
|
t,
|
|
2125
2142
|
n,
|
|
2126
2143
|
a
|
|
@@ -2167,7 +2184,7 @@ function pt({ siteKey: e, theme: t, size: n, hl: a, style: o, nodeRef: c, inert:
|
|
|
2167
2184
|
children: "reCAPTCHA"
|
|
2168
2185
|
})
|
|
2169
2186
|
]
|
|
2170
|
-
}), !
|
|
2187
|
+
}), !g && /* @__PURE__ */ u("div", {
|
|
2171
2188
|
style: {
|
|
2172
2189
|
marginTop: 6,
|
|
2173
2190
|
fontSize: 11,
|
|
@@ -2177,23 +2194,23 @@ function pt({ siteKey: e, theme: t, size: n, hl: a, style: o, nodeRef: c, inert:
|
|
|
2177
2194
|
})]
|
|
2178
2195
|
});
|
|
2179
2196
|
}
|
|
2180
|
-
return
|
|
2197
|
+
return g ? /* @__PURE__ */ u("div", {
|
|
2181
2198
|
ref: c,
|
|
2182
2199
|
style: h(o),
|
|
2183
|
-
children: /* @__PURE__ */ u("div", { ref:
|
|
2200
|
+
children: /* @__PURE__ */ u("div", { ref: _ })
|
|
2184
2201
|
}) : null;
|
|
2185
2202
|
}
|
|
2186
|
-
function
|
|
2203
|
+
function _t({ text: e, parts: t, style: n, nodeRef: r, linked: i }) {
|
|
2187
2204
|
return /* @__PURE__ */ u("label", {
|
|
2188
2205
|
ref: r,
|
|
2189
2206
|
style: {
|
|
2190
|
-
...
|
|
2207
|
+
...q,
|
|
2191
2208
|
...h(n)
|
|
2192
2209
|
},
|
|
2193
|
-
children:
|
|
2210
|
+
children: K(t, e, i)
|
|
2194
2211
|
});
|
|
2195
2212
|
}
|
|
2196
|
-
function
|
|
2213
|
+
function vt({ type: e = "text", name: t, placeholder: n, required: r, style: i, nodeRef: a, inert: o }) {
|
|
2197
2214
|
return /* @__PURE__ */ u("input", {
|
|
2198
2215
|
ref: a,
|
|
2199
2216
|
type: e,
|
|
@@ -2201,13 +2218,13 @@ function ht({ type: e = "text", name: t, placeholder: n, required: r, style: i,
|
|
|
2201
2218
|
placeholder: n,
|
|
2202
2219
|
required: !o && !!r,
|
|
2203
2220
|
style: {
|
|
2204
|
-
...
|
|
2221
|
+
...J,
|
|
2205
2222
|
...h(i)
|
|
2206
2223
|
},
|
|
2207
|
-
...
|
|
2224
|
+
...Y(o)
|
|
2208
2225
|
});
|
|
2209
2226
|
}
|
|
2210
|
-
function
|
|
2227
|
+
function yt({ name: e, placeholder: t, rows: n = 4, required: r, style: i, nodeRef: a, inert: o }) {
|
|
2211
2228
|
return /* @__PURE__ */ u("textarea", {
|
|
2212
2229
|
ref: a,
|
|
2213
2230
|
name: e || void 0,
|
|
@@ -2215,18 +2232,18 @@ function gt({ name: e, placeholder: t, rows: n = 4, required: r, style: i, nodeR
|
|
|
2215
2232
|
rows: n,
|
|
2216
2233
|
required: !o && !!r,
|
|
2217
2234
|
style: {
|
|
2218
|
-
...
|
|
2235
|
+
...J,
|
|
2219
2236
|
resize: "vertical",
|
|
2220
2237
|
...h(i)
|
|
2221
2238
|
},
|
|
2222
|
-
...
|
|
2239
|
+
...Y(o)
|
|
2223
2240
|
});
|
|
2224
2241
|
}
|
|
2225
|
-
function
|
|
2242
|
+
function bt({ kind: e = "checkbox", label: t, name: n, value: r, required: i, style: a, nodeRef: o, inert: s }) {
|
|
2226
2243
|
return /* @__PURE__ */ d("label", {
|
|
2227
2244
|
ref: o,
|
|
2228
2245
|
style: {
|
|
2229
|
-
...
|
|
2246
|
+
...st,
|
|
2230
2247
|
...h(a)
|
|
2231
2248
|
},
|
|
2232
2249
|
children: [/* @__PURE__ */ u("input", {
|
|
@@ -2243,7 +2260,7 @@ function _t({ kind: e = "checkbox", label: t, name: n, value: r, required: i, st
|
|
|
2243
2260
|
}), t]
|
|
2244
2261
|
});
|
|
2245
2262
|
}
|
|
2246
|
-
function
|
|
2263
|
+
function xt({ name: e, placeholder: t, options: n = [], required: r, style: i, nodeRef: a, inert: o }) {
|
|
2247
2264
|
return /* @__PURE__ */ d("select", {
|
|
2248
2265
|
ref: a,
|
|
2249
2266
|
name: e || void 0,
|
|
@@ -2252,7 +2269,7 @@ function vt({ name: e, placeholder: t, options: n = [], required: r, style: i, n
|
|
|
2252
2269
|
onMouseDown: o ? (e) => e.preventDefault() : void 0,
|
|
2253
2270
|
tabIndex: o ? -1 : void 0,
|
|
2254
2271
|
style: {
|
|
2255
|
-
...
|
|
2272
|
+
...J,
|
|
2256
2273
|
appearance: "auto",
|
|
2257
2274
|
...h(i)
|
|
2258
2275
|
},
|
|
@@ -2266,12 +2283,12 @@ function vt({ name: e, placeholder: t, options: n = [], required: r, style: i, n
|
|
|
2266
2283
|
}, t))]
|
|
2267
2284
|
});
|
|
2268
2285
|
}
|
|
2269
|
-
function
|
|
2286
|
+
function St({ name: e, accept: t, required: n, text: r = "Choose a file…", style: i, nodeRef: a, inert: o }) {
|
|
2270
2287
|
let [s, l] = c(null);
|
|
2271
2288
|
return /* @__PURE__ */ d("label", {
|
|
2272
2289
|
ref: a,
|
|
2273
2290
|
style: {
|
|
2274
|
-
...
|
|
2291
|
+
...J,
|
|
2275
2292
|
display: "flex",
|
|
2276
2293
|
alignItems: "center",
|
|
2277
2294
|
gap: "8px",
|
|
@@ -2298,12 +2315,12 @@ function yt({ name: e, accept: t, required: n, text: r = "Choose a file…", sty
|
|
|
2298
2315
|
]
|
|
2299
2316
|
});
|
|
2300
2317
|
}
|
|
2301
|
-
function
|
|
2318
|
+
function Ct({ text: e = "Submit", style: t, nodeRef: n, inert: r }) {
|
|
2302
2319
|
return /* @__PURE__ */ u("button", {
|
|
2303
2320
|
ref: n,
|
|
2304
2321
|
type: r ? "button" : "submit",
|
|
2305
2322
|
style: {
|
|
2306
|
-
...
|
|
2323
|
+
...G,
|
|
2307
2324
|
border: 0,
|
|
2308
2325
|
cursor: "pointer",
|
|
2309
2326
|
alignSelf: "flex-start",
|
|
@@ -2318,7 +2335,7 @@ function bt({ text: e = "Submit", style: t, nodeRef: n, inert: r }) {
|
|
|
2318
2335
|
children: e
|
|
2319
2336
|
});
|
|
2320
2337
|
}
|
|
2321
|
-
function
|
|
2338
|
+
function wt({ cols: e = 2, rows: t = 1, style: n, nodeRef: r, linked: i }) {
|
|
2322
2339
|
let a = Math.max(1, (Number(e) || 1) * (Number(t) || 1));
|
|
2323
2340
|
return /* @__PURE__ */ u("div", {
|
|
2324
2341
|
ref: r,
|
|
@@ -2335,61 +2352,63 @@ function xt({ cols: e = 2, rows: t = 1, style: n, nodeRef: r, linked: i }) {
|
|
|
2335
2352
|
}, t))
|
|
2336
2353
|
});
|
|
2337
2354
|
}
|
|
2338
|
-
function
|
|
2339
|
-
let { tenant:
|
|
2355
|
+
function Tt({ 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: g, style: _, nodeRef: v }) {
|
|
2356
|
+
let { tenant: y, apiUrl: b, locale: x } = r(B), S = r(H), C = r(V), w = de(g), T = JSON.stringify(w), E = T !== "{}" && !e?.startsWith?.("api:"), D = E ? null : C?.[e], O = m ? le(C) : 1, [k, A] = c(null);
|
|
2340
2357
|
if (i(() => {
|
|
2341
|
-
if (!e ||
|
|
2358
|
+
if (!e || D) return;
|
|
2342
2359
|
let n = !0, r = new URLSearchParams();
|
|
2343
|
-
if (
|
|
2360
|
+
if (x && r.set("locale", x), E && r.set("data_filter", T), m && !e.startsWith("api:")) {
|
|
2344
2361
|
let e = Math.max(1, Number(t) || 6);
|
|
2345
|
-
r.set("offset", String((
|
|
2362
|
+
r.set("offset", String((O - 1) * e)), r.set("limit", String(e));
|
|
2346
2363
|
}
|
|
2347
|
-
let i = r.toString(), a = e.startsWith("api:") ? `${
|
|
2348
|
-
return fetch(a, { headers:
|
|
2364
|
+
let i = r.toString(), a = e.startsWith("api:") ? `${b}/data/${encodeURIComponent(e.slice(4))}` : `${b}/dynamic/${encodeURIComponent(e)}${i ? `?${i}` : ""}`;
|
|
2365
|
+
return fetch(a, { headers: y ? { "x-tenant": y } : {} }).then((e) => e.json()).then((e) => {
|
|
2349
2366
|
let t = Array.isArray(e?.payload) ? e.payload : Array.isArray(e?.payload?.data) ? e.payload.data : [];
|
|
2350
|
-
return n &&
|
|
2351
|
-
}).catch(() => n &&
|
|
2367
|
+
return n && A(t.filter((e) => e && typeof e == "object"));
|
|
2368
|
+
}).catch(() => n && A([])), () => {
|
|
2352
2369
|
n = !1;
|
|
2353
2370
|
};
|
|
2354
2371
|
}, [
|
|
2355
2372
|
e,
|
|
2356
|
-
v,
|
|
2357
2373
|
y,
|
|
2358
2374
|
b,
|
|
2359
|
-
|
|
2375
|
+
x,
|
|
2376
|
+
D,
|
|
2360
2377
|
m,
|
|
2361
|
-
|
|
2362
|
-
t
|
|
2378
|
+
O,
|
|
2379
|
+
t,
|
|
2380
|
+
E,
|
|
2381
|
+
T
|
|
2363
2382
|
]), !e) return null;
|
|
2364
|
-
let
|
|
2383
|
+
let j = Math.max(1, Number(t) || 6), M = m ? D || e.startsWith("api:") ? (D ?? k ?? []).slice((O - 1) * j, O * j) : (k ?? []).slice(0, j) : (D ?? k ?? []).slice(0, j), N = Math.min(Math.max(Number(a) || 3, 1), 6), P = n === "list" ? {
|
|
2365
2384
|
display: "flex",
|
|
2366
2385
|
flexDirection: "column",
|
|
2367
2386
|
gap: 20
|
|
2368
2387
|
} : {
|
|
2369
2388
|
display: "grid",
|
|
2370
|
-
gridTemplateColumns: `repeat(${
|
|
2389
|
+
gridTemplateColumns: `repeat(${N}, minmax(0, 1fr))`,
|
|
2371
2390
|
gap: 24
|
|
2372
2391
|
};
|
|
2373
|
-
return f && p &&
|
|
2374
|
-
ref:
|
|
2392
|
+
return f && p && S?.render ? /* @__PURE__ */ u("div", {
|
|
2393
|
+
ref: v,
|
|
2375
2394
|
style: {
|
|
2376
2395
|
width: "100%",
|
|
2377
|
-
...
|
|
2378
|
-
...h(
|
|
2396
|
+
...P,
|
|
2397
|
+
...h(_)
|
|
2379
2398
|
},
|
|
2380
|
-
children:
|
|
2399
|
+
children: M.map((e) => /* @__PURE__ */ u("div", {
|
|
2381
2400
|
style: { minWidth: 0 },
|
|
2382
|
-
children:
|
|
2401
|
+
children: S.render(p, (t) => me(t, e))
|
|
2383
2402
|
}, e.id ?? e?.data?.slug))
|
|
2384
2403
|
}) : /* @__PURE__ */ u("div", {
|
|
2385
|
-
ref:
|
|
2404
|
+
ref: v,
|
|
2386
2405
|
style: {
|
|
2387
2406
|
width: "100%",
|
|
2388
|
-
...
|
|
2389
|
-
...h(
|
|
2407
|
+
...P,
|
|
2408
|
+
...h(_)
|
|
2390
2409
|
},
|
|
2391
|
-
children:
|
|
2392
|
-
let t = o ?
|
|
2410
|
+
children: M.map((e) => {
|
|
2411
|
+
let t = o ? U(e?.data, o) : null, r = s ? W(U(e?.data, s)) : null, i = l ? U(e?.data, l) : null, a = Array.isArray(i) ? i : null, c = a || i == null ? null : W(i), f = n === "list";
|
|
2393
2412
|
return /* @__PURE__ */ d("div", {
|
|
2394
2413
|
style: {
|
|
2395
2414
|
display: "flex",
|
|
@@ -2436,7 +2455,7 @@ function St({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, i
|
|
|
2436
2455
|
lineHeight: 1.55,
|
|
2437
2456
|
opacity: .85
|
|
2438
2457
|
},
|
|
2439
|
-
children:
|
|
2458
|
+
children: Ae(a)
|
|
2440
2459
|
})
|
|
2441
2460
|
]
|
|
2442
2461
|
})]
|
|
@@ -2444,7 +2463,91 @@ function St({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, i
|
|
|
2444
2463
|
})
|
|
2445
2464
|
});
|
|
2446
2465
|
}
|
|
2447
|
-
function
|
|
2466
|
+
function Et({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, inert: i }) {
|
|
2467
|
+
let a = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && typeof e.name == "string" && e.name) : [], o = i ? {} : ue(), s = {
|
|
2468
|
+
display: "flex",
|
|
2469
|
+
flexDirection: "column",
|
|
2470
|
+
gap: 4,
|
|
2471
|
+
fontSize: 12,
|
|
2472
|
+
fontWeight: 600,
|
|
2473
|
+
color: "var(--page-text, #111827)",
|
|
2474
|
+
minWidth: 140,
|
|
2475
|
+
flex: "1 1 140px"
|
|
2476
|
+
}, c = (e) => {
|
|
2477
|
+
let t = e && typeof e == "object" ? e.value : e, n = e && typeof e == "object" ? e.label ?? e.value : e;
|
|
2478
|
+
return {
|
|
2479
|
+
value: String(t ?? ""),
|
|
2480
|
+
label: String(n ?? "")
|
|
2481
|
+
};
|
|
2482
|
+
};
|
|
2483
|
+
return /* @__PURE__ */ d("form", {
|
|
2484
|
+
ref: r,
|
|
2485
|
+
method: "get",
|
|
2486
|
+
onSubmit: i ? (e) => e.preventDefault() : void 0,
|
|
2487
|
+
style: {
|
|
2488
|
+
display: "flex",
|
|
2489
|
+
flexWrap: "wrap",
|
|
2490
|
+
alignItems: "flex-end",
|
|
2491
|
+
gap: 12,
|
|
2492
|
+
width: "100%",
|
|
2493
|
+
...h(n)
|
|
2494
|
+
},
|
|
2495
|
+
children: [a.map((e) => /* @__PURE__ */ d("label", {
|
|
2496
|
+
style: s,
|
|
2497
|
+
children: [/* @__PURE__ */ u("span", { children: e.label || e.name }), e.type === "option" || e.type === "select" ? /* @__PURE__ */ d("select", {
|
|
2498
|
+
name: `f_${e.name}`,
|
|
2499
|
+
defaultValue: o[e.name] ?? "",
|
|
2500
|
+
style: J,
|
|
2501
|
+
...Y(i),
|
|
2502
|
+
children: [/* @__PURE__ */ u("option", {
|
|
2503
|
+
value: "",
|
|
2504
|
+
children: "—"
|
|
2505
|
+
}), (Array.isArray(e.options) ? e.options : []).map((e) => {
|
|
2506
|
+
let t = c(e);
|
|
2507
|
+
return /* @__PURE__ */ u("option", {
|
|
2508
|
+
value: t.value,
|
|
2509
|
+
children: t.label
|
|
2510
|
+
}, t.value);
|
|
2511
|
+
})]
|
|
2512
|
+
}) : e.type === "switch" ? /* @__PURE__ */ d("select", {
|
|
2513
|
+
name: `f_${e.name}`,
|
|
2514
|
+
defaultValue: o[e.name] ?? "",
|
|
2515
|
+
style: J,
|
|
2516
|
+
...Y(i),
|
|
2517
|
+
children: [
|
|
2518
|
+
/* @__PURE__ */ u("option", {
|
|
2519
|
+
value: "",
|
|
2520
|
+
children: "—"
|
|
2521
|
+
}),
|
|
2522
|
+
/* @__PURE__ */ u("option", {
|
|
2523
|
+
value: "true",
|
|
2524
|
+
children: "Yes"
|
|
2525
|
+
}),
|
|
2526
|
+
/* @__PURE__ */ u("option", {
|
|
2527
|
+
value: "false",
|
|
2528
|
+
children: "No"
|
|
2529
|
+
})
|
|
2530
|
+
]
|
|
2531
|
+
}) : /* @__PURE__ */ u("input", {
|
|
2532
|
+
type: "text",
|
|
2533
|
+
name: `f_${e.name}`,
|
|
2534
|
+
defaultValue: o[e.name] ?? "",
|
|
2535
|
+
placeholder: e.label || e.name,
|
|
2536
|
+
style: J,
|
|
2537
|
+
...Y(i)
|
|
2538
|
+
})]
|
|
2539
|
+
}, e.name)), /* @__PURE__ */ u("button", {
|
|
2540
|
+
type: "submit",
|
|
2541
|
+
style: {
|
|
2542
|
+
...G,
|
|
2543
|
+
flex: "0 0 auto"
|
|
2544
|
+
},
|
|
2545
|
+
...Y(i),
|
|
2546
|
+
children: t
|
|
2547
|
+
})]
|
|
2548
|
+
});
|
|
2549
|
+
}
|
|
2550
|
+
function Dt({ items: e = [], separator: t = "/", style: n, nodeRef: r }) {
|
|
2448
2551
|
return e.length ? /* @__PURE__ */ u("nav", {
|
|
2449
2552
|
ref: r,
|
|
2450
2553
|
"aria-label": "Breadcrumb",
|
|
@@ -2494,8 +2597,8 @@ function Ct({ items: e = [], separator: t = "/", style: n, nodeRef: r }) {
|
|
|
2494
2597
|
})
|
|
2495
2598
|
}) : null;
|
|
2496
2599
|
}
|
|
2497
|
-
function
|
|
2498
|
-
let { tenant: _, apiUrl: v } = r(
|
|
2600
|
+
function Ot({ pages: e = 5, current: t = 1, prevNext: n = !0, href: a = "#", source: o, pageSize: s = 6, align: l, hideEmpty: f, inert: p, style: m, nodeRef: g }) {
|
|
2601
|
+
let { tenant: _, apiUrl: v } = r(B), y = r(V), [b, x] = c(null), S = o ? Number(y?.[`${o}:total`]) : NaN;
|
|
2499
2602
|
i(() => {
|
|
2500
2603
|
if (!o || Number.isFinite(S)) return;
|
|
2501
2604
|
let e = !0, t = o.startsWith("api:") ? `${v}/data/${encodeURIComponent(o.slice(4))}` : `${v}/dynamic/${encodeURIComponent(o)}?limit=1`;
|
|
@@ -2514,7 +2617,7 @@ function wt({ pages: e = 5, current: t = 1, prevNext: n = !0, href: a = "#", sou
|
|
|
2514
2617
|
]);
|
|
2515
2618
|
let C = Math.max(1, Number(s) || 6), w = Number.isFinite(S) ? S : b;
|
|
2516
2619
|
if (o && w === null || o && f && !(w > 0)) return null;
|
|
2517
|
-
let T = Math.min(Math.max(o ? Math.ceil(w / C) : Number(e) || 1, 1), 50), E = Math.min(Math.max(o ?
|
|
2620
|
+
let T = Math.min(Math.max(o ? Math.ceil(w / C) : Number(e) || 1, 1), 50), E = Math.min(Math.max(o ? le(y) : Number(t) || 1, 1), T), D = (e) => {
|
|
2518
2621
|
if (o) {
|
|
2519
2622
|
if (typeof window < "u") {
|
|
2520
2623
|
let t = new URLSearchParams(window.location.search);
|
|
@@ -2579,7 +2682,243 @@ function wt({ pages: e = 5, current: t = 1, prevNext: n = !0, href: a = "#", sou
|
|
|
2579
2682
|
]
|
|
2580
2683
|
});
|
|
2581
2684
|
}
|
|
2582
|
-
|
|
2685
|
+
var kt = "webim.page_mode", At = () => {
|
|
2686
|
+
if (typeof window > "u") return "auto";
|
|
2687
|
+
try {
|
|
2688
|
+
let e = window.localStorage.getItem(kt);
|
|
2689
|
+
return e === "light" || e === "dark" ? e : "auto";
|
|
2690
|
+
} catch {
|
|
2691
|
+
return "auto";
|
|
2692
|
+
}
|
|
2693
|
+
}, jt = (e) => {
|
|
2694
|
+
let t = {
|
|
2695
|
+
width: 16,
|
|
2696
|
+
height: 16,
|
|
2697
|
+
viewBox: "0 0 24 24",
|
|
2698
|
+
fill: "none",
|
|
2699
|
+
stroke: "currentColor",
|
|
2700
|
+
strokeWidth: 2,
|
|
2701
|
+
strokeLinecap: "round",
|
|
2702
|
+
strokeLinejoin: "round",
|
|
2703
|
+
"aria-hidden": !0
|
|
2704
|
+
};
|
|
2705
|
+
return e === "light" ? /* @__PURE__ */ d("svg", {
|
|
2706
|
+
...t,
|
|
2707
|
+
children: [/* @__PURE__ */ u("circle", {
|
|
2708
|
+
cx: "12",
|
|
2709
|
+
cy: "12",
|
|
2710
|
+
r: "4"
|
|
2711
|
+
}), /* @__PURE__ */ u("path", { d: "M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4" })]
|
|
2712
|
+
}) : e === "dark" ? /* @__PURE__ */ u("svg", {
|
|
2713
|
+
...t,
|
|
2714
|
+
children: /* @__PURE__ */ u("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" })
|
|
2715
|
+
}) : /* @__PURE__ */ d("svg", {
|
|
2716
|
+
...t,
|
|
2717
|
+
children: [/* @__PURE__ */ u("rect", {
|
|
2718
|
+
x: "2",
|
|
2719
|
+
y: "3",
|
|
2720
|
+
width: "20",
|
|
2721
|
+
height: "14",
|
|
2722
|
+
rx: "2"
|
|
2723
|
+
}), /* @__PURE__ */ u("path", { d: "M8 21h8M12 17v4" })]
|
|
2724
|
+
});
|
|
2725
|
+
}, Z = {
|
|
2726
|
+
light: "Light theme",
|
|
2727
|
+
dark: "Dark theme",
|
|
2728
|
+
auto: "Follow the device theme"
|
|
2729
|
+
};
|
|
2730
|
+
function Mt({ variant: e, showSystem: t, style: n, nodeRef: r, inert: a }) {
|
|
2731
|
+
let [o, l] = c(a ? "auto" : At), d = s(null), f = (e) => {
|
|
2732
|
+
d.current = e, typeof r == "function" && r(e);
|
|
2733
|
+
};
|
|
2734
|
+
i(() => {
|
|
2735
|
+
if (a) return;
|
|
2736
|
+
let e = d.current?.closest?.(".webim-page");
|
|
2737
|
+
e && (o === "light" || o === "dark" ? e.setAttribute("data-webim-mode", o) : e.removeAttribute("data-webim-mode"));
|
|
2738
|
+
try {
|
|
2739
|
+
o === "auto" ? window.localStorage.removeItem(kt) : window.localStorage.setItem(kt, o);
|
|
2740
|
+
} catch {}
|
|
2741
|
+
}, [o, a]);
|
|
2742
|
+
let p = t === !1 ? ["light", "dark"] : [
|
|
2743
|
+
"light",
|
|
2744
|
+
"dark",
|
|
2745
|
+
"auto"
|
|
2746
|
+
], m = p.includes(o) ? o : p[0], g = {
|
|
2747
|
+
appearance: "none",
|
|
2748
|
+
border: 0,
|
|
2749
|
+
margin: 0,
|
|
2750
|
+
display: "inline-flex",
|
|
2751
|
+
alignItems: "center",
|
|
2752
|
+
justifyContent: "center",
|
|
2753
|
+
background: "transparent",
|
|
2754
|
+
color: "inherit",
|
|
2755
|
+
font: "inherit",
|
|
2756
|
+
cursor: a ? "default" : "pointer",
|
|
2757
|
+
borderRadius: 999
|
|
2758
|
+
};
|
|
2759
|
+
if (e === "buttons") return /* @__PURE__ */ u("div", {
|
|
2760
|
+
ref: f,
|
|
2761
|
+
role: "group",
|
|
2762
|
+
"aria-label": "Theme",
|
|
2763
|
+
style: {
|
|
2764
|
+
display: "inline-flex",
|
|
2765
|
+
alignItems: "center",
|
|
2766
|
+
gap: 2,
|
|
2767
|
+
padding: 3,
|
|
2768
|
+
borderRadius: 999,
|
|
2769
|
+
border: "1px solid rgba(148, 163, 184, 0.4)",
|
|
2770
|
+
...h(n)
|
|
2771
|
+
},
|
|
2772
|
+
children: p.map((e) => /* @__PURE__ */ u("button", {
|
|
2773
|
+
type: "button",
|
|
2774
|
+
title: Z[e],
|
|
2775
|
+
"aria-label": Z[e],
|
|
2776
|
+
"aria-pressed": e === m,
|
|
2777
|
+
onClick: a ? void 0 : () => l(e),
|
|
2778
|
+
style: {
|
|
2779
|
+
...g,
|
|
2780
|
+
width: 28,
|
|
2781
|
+
height: 28,
|
|
2782
|
+
color: e === m ? "var(--page-accent-text, #ffffff)" : "inherit",
|
|
2783
|
+
background: e === m ? "var(--page-accent, #111827)" : "transparent",
|
|
2784
|
+
opacity: e === m ? 1 : .7
|
|
2785
|
+
},
|
|
2786
|
+
children: jt(e)
|
|
2787
|
+
}, e))
|
|
2788
|
+
});
|
|
2789
|
+
let _ = p[(p.indexOf(m) + 1) % p.length];
|
|
2790
|
+
return /* @__PURE__ */ u("button", {
|
|
2791
|
+
ref: f,
|
|
2792
|
+
type: "button",
|
|
2793
|
+
title: Z[m],
|
|
2794
|
+
"aria-label": `Theme: ${Z[m]} — switch to ${Z[_]}`,
|
|
2795
|
+
onClick: a ? void 0 : () => l(_),
|
|
2796
|
+
style: {
|
|
2797
|
+
...g,
|
|
2798
|
+
width: 36,
|
|
2799
|
+
height: 36,
|
|
2800
|
+
border: "1px solid rgba(148, 163, 184, 0.4)",
|
|
2801
|
+
...h(n)
|
|
2802
|
+
},
|
|
2803
|
+
children: jt(m)
|
|
2804
|
+
});
|
|
2805
|
+
}
|
|
2806
|
+
var Nt = {
|
|
2807
|
+
facebook: {
|
|
2808
|
+
label: "Facebook",
|
|
2809
|
+
color: "#1877f2",
|
|
2810
|
+
d: "M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"
|
|
2811
|
+
},
|
|
2812
|
+
instagram: {
|
|
2813
|
+
label: "Instagram",
|
|
2814
|
+
color: "#e4405f",
|
|
2815
|
+
d: "M12 0C8.74 0 8.333.015 7.053.072 5.775.132 4.905.333 4.14.63c-.789.306-1.459.717-2.126 1.384S.935 3.35.63 4.14C.333 4.905.131 5.775.072 7.053.012 8.333 0 8.74 0 12s.015 3.667.072 4.947c.06 1.277.261 2.148.558 2.913.306.788.717 1.459 1.384 2.126.667.666 1.336 1.079 2.126 1.384.766.296 1.636.499 2.913.558C8.333 23.988 8.74 24 12 24s3.667-.015 4.947-.072c1.277-.06 2.148-.262 2.913-.558.788-.306 1.459-.718 2.126-1.384.666-.667 1.079-1.335 1.384-2.126.296-.765.499-1.636.558-2.913.06-1.28.072-1.687.072-4.947s-.015-3.667-.072-4.947c-.06-1.277-.262-2.149-.558-2.913-.306-.789-.718-1.459-1.384-2.126C21.319 1.347 20.651.935 19.86.63c-.765-.297-1.636-.499-2.913-.558C15.667.012 15.26 0 12 0zm0 2.16c3.203 0 3.585.016 4.85.071 1.17.055 1.805.249 2.227.415.562.217.96.477 1.382.896.419.42.679.819.896 1.381.164.422.36 1.057.413 2.227.057 1.266.07 1.646.07 4.85s-.015 3.585-.074 4.85c-.061 1.17-.256 1.805-.421 2.227-.224.562-.479.96-.899 1.382-.419.419-.824.679-1.38.896-.42.164-1.065.36-2.235.413-1.274.057-1.649.07-4.859.07-3.211 0-3.586-.015-4.859-.074-1.171-.061-1.816-.256-2.236-.421-.569-.224-.96-.479-1.379-.899-.421-.419-.69-.824-.9-1.38-.165-.42-.359-1.065-.42-2.235-.045-1.26-.061-1.649-.061-4.844 0-3.196.016-3.586.061-4.861.061-1.17.255-1.814.42-2.234.21-.57.479-.96.9-1.381.419-.419.81-.689 1.379-.898.42-.166 1.051-.361 2.221-.421 1.275-.045 1.65-.06 4.859-.06zm0 5.678c-3.405 0-6.162 2.76-6.162 6.162 0 3.405 2.76 6.162 6.162 6.162 3.405 0 6.162-2.76 6.162-6.162 0-3.405-2.76-6.162-6.162-6.162zM12 16c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4zm7.846-10.405c0 .795-.646 1.44-1.44 1.44-.795 0-1.44-.646-1.44-1.44 0-.794.646-1.439 1.44-1.439.793-.001 1.44.645 1.44 1.439z"
|
|
2816
|
+
},
|
|
2817
|
+
x: {
|
|
2818
|
+
label: "X (Twitter)",
|
|
2819
|
+
color: "#000000",
|
|
2820
|
+
d: "M18.901 1.153h3.68l-8.04 9.19L24 22.846h-7.406l-5.8-7.584-6.638 7.584H.474l8.6-9.83L0 1.154h7.594l5.243 6.932ZM17.61 20.644h2.039L6.486 3.24H4.298Z"
|
|
2821
|
+
},
|
|
2822
|
+
linkedin: {
|
|
2823
|
+
label: "LinkedIn",
|
|
2824
|
+
color: "#0a66c2",
|
|
2825
|
+
d: "M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"
|
|
2826
|
+
},
|
|
2827
|
+
youtube: {
|
|
2828
|
+
label: "YouTube",
|
|
2829
|
+
color: "#ff0000",
|
|
2830
|
+
d: "M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z"
|
|
2831
|
+
},
|
|
2832
|
+
tiktok: {
|
|
2833
|
+
label: "TikTok",
|
|
2834
|
+
color: "#000000",
|
|
2835
|
+
d: "M12.525.02c1.31-.02 2.61-.01 3.91-.02.08 1.53.63 3.09 1.75 4.17 1.12 1.11 2.7 1.62 4.24 1.79v4.03c-1.44-.05-2.89-.35-4.2-.97-.57-.26-1.1-.59-1.62-.93-.01 2.92.01 5.84-.02 8.75-.08 1.4-.54 2.79-1.35 3.94-1.31 1.92-3.58 3.17-5.91 3.21-1.43.08-2.86-.31-4.08-1.03-2.02-1.19-3.44-3.37-3.65-5.71-.02-.5-.03-1-.01-1.49.18-1.9 1.12-3.72 2.58-4.96 1.66-1.44 3.98-2.13 6.15-1.72.02 1.48-.04 2.96-.04 4.44-.99-.32-2.15-.23-3.02.37-.63.41-1.11 1.04-1.36 1.75-.21.51-.15 1.07-.14 1.61.24 1.64 1.82 3.02 3.5 2.87 1.12-.01 2.19-.66 2.77-1.61.19-.33.4-.67.41-1.06.1-1.79.06-3.57.07-5.36.01-4.03-.01-8.05.02-12.07z"
|
|
2836
|
+
},
|
|
2837
|
+
whatsapp: {
|
|
2838
|
+
label: "WhatsApp",
|
|
2839
|
+
color: "#25d366",
|
|
2840
|
+
d: "M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413Z"
|
|
2841
|
+
},
|
|
2842
|
+
telegram: {
|
|
2843
|
+
label: "Telegram",
|
|
2844
|
+
color: "#26a5e4",
|
|
2845
|
+
d: "M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z"
|
|
2846
|
+
},
|
|
2847
|
+
pinterest: {
|
|
2848
|
+
label: "Pinterest",
|
|
2849
|
+
color: "#bd081c",
|
|
2850
|
+
d: "M12 0C5.373 0 0 5.372 0 12c0 5.084 3.163 9.426 7.627 11.174-.105-.949-.2-2.405.042-3.441.218-.937 1.407-5.965 1.407-5.965s-.359-.719-.359-1.782c0-1.668.967-2.914 2.171-2.914 1.023 0 1.518.769 1.518 1.69 0 1.03-.655 2.569-.994 3.995-.283 1.194.599 2.169 1.777 2.169 2.133 0 3.772-2.249 3.772-5.495 0-2.873-2.064-4.882-5.012-4.882-3.414 0-5.418 2.561-5.418 5.207 0 1.031.397 2.138.893 2.738a.36.36 0 01.083.345l-.333 1.36c-.053.22-.174.267-.402.161-1.499-.698-2.436-2.889-2.436-4.649 0-3.785 2.75-7.262 7.929-7.262 4.163 0 7.398 2.967 7.398 6.931 0 4.136-2.607 7.464-6.227 7.464-1.216 0-2.359-.631-2.75-1.378l-.748 2.853c-.271 1.043-1.002 2.35-1.492 3.146C9.57 23.812 10.763 24 12 24c6.627 0 12-5.373 12-12 0-6.628-5.373-12-12-12z"
|
|
2851
|
+
},
|
|
2852
|
+
github: {
|
|
2853
|
+
label: "GitHub",
|
|
2854
|
+
color: "#181717",
|
|
2855
|
+
d: "M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"
|
|
2856
|
+
},
|
|
2857
|
+
discord: {
|
|
2858
|
+
label: "Discord",
|
|
2859
|
+
color: "#5865f2",
|
|
2860
|
+
d: "M20.317 4.37a19.791 19.791 0 00-4.885-1.515.074.074 0 00-.079.037c-.21.375-.444.865-.608 1.25a18.27 18.27 0 00-5.487 0 12.64 12.64 0 00-.617-1.25.077.077 0 00-.079-.037A19.736 19.736 0 003.677 4.37a.07.07 0 00-.032.027C.533 9.046-.32 13.58.099 18.058a.082.082 0 00.031.056 19.9 19.9 0 005.993 3.03.078.078 0 00.084-.028c.462-.63.873-1.295 1.226-1.994a.076.076 0 00-.041-.106 13.107 13.107 0 01-1.872-.892.077.077 0 01-.008-.128c.126-.094.252-.192.372-.291a.074.074 0 01.077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 01.078.009c.12.099.246.198.373.292a.077.077 0 01-.006.127 12.299 12.299 0 01-1.873.892.077.077 0 00-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 00.084.028 19.839 19.839 0 006.002-3.03.077.077 0 00.032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 00-.031-.03zM8.02 15.331c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z"
|
|
2861
|
+
},
|
|
2862
|
+
email: {
|
|
2863
|
+
label: "E-mail",
|
|
2864
|
+
color: "#64748b",
|
|
2865
|
+
d: "M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4-8 5-8-5V6l8 5 8-5v2z"
|
|
2866
|
+
},
|
|
2867
|
+
website: {
|
|
2868
|
+
label: "Website",
|
|
2869
|
+
color: "#64748b",
|
|
2870
|
+
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"
|
|
2871
|
+
}
|
|
2872
|
+
};
|
|
2873
|
+
function Pt({ links: e = [], variant: t, color: n, size: r, gap: i, newTab: a, style: o, nodeRef: s, inert: c }) {
|
|
2874
|
+
let l = Array.isArray(e) ? e.filter((e) => e && Nt[e.network]) : [];
|
|
2875
|
+
if (!l.length) return null;
|
|
2876
|
+
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, g = c ? (e) => e.preventDefault() : void 0;
|
|
2877
|
+
return /* @__PURE__ */ u("div", {
|
|
2878
|
+
ref: s,
|
|
2879
|
+
style: {
|
|
2880
|
+
display: "flex",
|
|
2881
|
+
flexWrap: "wrap",
|
|
2882
|
+
alignItems: "center",
|
|
2883
|
+
gap: p,
|
|
2884
|
+
...h(o)
|
|
2885
|
+
},
|
|
2886
|
+
children: l.map((e, r) => {
|
|
2887
|
+
let i = Nt[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);
|
|
2888
|
+
return /* @__PURE__ */ u("a", {
|
|
2889
|
+
href: e.url || "#",
|
|
2890
|
+
onClick: g,
|
|
2891
|
+
"aria-label": e.label || i.label,
|
|
2892
|
+
title: e.label || i.label,
|
|
2893
|
+
...a !== !1 && !c ? {
|
|
2894
|
+
target: "_blank",
|
|
2895
|
+
rel: "noopener noreferrer"
|
|
2896
|
+
} : {},
|
|
2897
|
+
style: {
|
|
2898
|
+
display: "inline-flex",
|
|
2899
|
+
alignItems: "center",
|
|
2900
|
+
justifyContent: "center",
|
|
2901
|
+
width: t === "plain" ? d : f,
|
|
2902
|
+
height: t === "plain" ? d : f,
|
|
2903
|
+
borderRadius: "50%",
|
|
2904
|
+
background: o ? m(i) : "transparent",
|
|
2905
|
+
border: t === "outline" ? `1px solid ${m(i)}` : "none",
|
|
2906
|
+
color: "inherit",
|
|
2907
|
+
textDecoration: "none"
|
|
2908
|
+
},
|
|
2909
|
+
children: /* @__PURE__ */ u("svg", {
|
|
2910
|
+
width: d,
|
|
2911
|
+
height: d,
|
|
2912
|
+
viewBox: "0 0 24 24",
|
|
2913
|
+
fill: s,
|
|
2914
|
+
"aria-hidden": !0,
|
|
2915
|
+
children: /* @__PURE__ */ u("path", { d: i.d })
|
|
2916
|
+
})
|
|
2917
|
+
}, `${e.network}-${r}`);
|
|
2918
|
+
})
|
|
2919
|
+
});
|
|
2920
|
+
}
|
|
2921
|
+
function Ft({ steps: t = [], active: n = 1, vertical: r = !1, style: i, nodeRef: a }) {
|
|
2583
2922
|
if (!t.length) return null;
|
|
2584
2923
|
let o = Math.min(Math.max(Number(n) || 1, 1), t.length), s = (e) => ({
|
|
2585
2924
|
width: 32,
|
|
@@ -2657,7 +2996,7 @@ function Tt({ steps: t = [], active: n = 1, vertical: r = !1, style: i, nodeRef:
|
|
|
2657
2996
|
})
|
|
2658
2997
|
});
|
|
2659
2998
|
}
|
|
2660
|
-
var
|
|
2999
|
+
var Q = {
|
|
2661
3000
|
small: {
|
|
2662
3001
|
w: 132,
|
|
2663
3002
|
h: 46,
|
|
@@ -2679,10 +3018,10 @@ var Et = {
|
|
|
2679
3018
|
title: 12.5,
|
|
2680
3019
|
avatar: 46
|
|
2681
3020
|
}
|
|
2682
|
-
},
|
|
2683
|
-
|
|
2684
|
-
function
|
|
2685
|
-
let r =
|
|
3021
|
+
}, It = (e) => Q[e] ?? Q.medium;
|
|
3022
|
+
Q.medium.w, Q.medium.h;
|
|
3023
|
+
function Lt(e, { size: t = "medium", horizontal: n = !1 } = {}) {
|
|
3024
|
+
let r = It(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 = [];
|
|
2686
3025
|
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);
|
|
2687
3026
|
let d = /* @__PURE__ */ new Map(), f = (e, t) => {
|
|
2688
3027
|
if (t.has(e.id)) return 0;
|
|
@@ -2734,19 +3073,19 @@ function Ot(e, { size: t = "medium", horizontal: n = !1 } = {}) {
|
|
|
2734
3073
|
horizontal: n
|
|
2735
3074
|
};
|
|
2736
3075
|
}
|
|
2737
|
-
var
|
|
3076
|
+
var Rt = (e, t) => {
|
|
2738
3077
|
let n = String(e ?? "");
|
|
2739
3078
|
return n.length > t ? `${n.slice(0, t - 1)}…` : n;
|
|
2740
|
-
},
|
|
3079
|
+
}, zt = (e) => {
|
|
2741
3080
|
let t = /^#([0-9a-f]{6}|[0-9a-f]{3})$/i.exec(String(e ?? "").trim());
|
|
2742
3081
|
if (!t) return "#ffffff";
|
|
2743
3082
|
let n = t[1];
|
|
2744
3083
|
n.length === 3 && (n = [...n].map((e) => e + e).join(""));
|
|
2745
3084
|
let r = parseInt(n, 16);
|
|
2746
3085
|
return .299 * (r >> 16 & 255) + .587 * (r >> 8 & 255) + .114 * (r & 255) > 150 ? "#111827" : "#ffffff";
|
|
2747
|
-
},
|
|
2748
|
-
function
|
|
2749
|
-
let n = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && e.id) : [], r = (e) => Array.isArray(e) ? e[0] : e, i = (e) => e == null ? "" :
|
|
3086
|
+
}, Bt = (e) => !!(e?.cv?.trim?.() || e?.photo);
|
|
3087
|
+
function Vt(e, t = {}) {
|
|
3088
|
+
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 ? "" : W(e);
|
|
2750
3089
|
return n.map((e) => {
|
|
2751
3090
|
let n = e.data ?? {}, a = r(n[t.parentField]), o = a && typeof a == "object" ? a.id ?? null : a || null;
|
|
2752
3091
|
return {
|
|
@@ -2760,11 +3099,11 @@ function jt(e, t = {}) {
|
|
|
2760
3099
|
};
|
|
2761
3100
|
});
|
|
2762
3101
|
}
|
|
2763
|
-
var
|
|
3102
|
+
var Ht = {
|
|
2764
3103
|
size: 36,
|
|
2765
3104
|
pad: 10
|
|
2766
3105
|
};
|
|
2767
|
-
function
|
|
3106
|
+
function Ut({ node: e, onClose: t }) {
|
|
2768
3107
|
return i(() => {
|
|
2769
3108
|
let e = (e) => e.key === "Escape" && t();
|
|
2770
3109
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
@@ -2882,8 +3221,8 @@ function Nt({ node: e, onClose: t }) {
|
|
|
2882
3221
|
})
|
|
2883
3222
|
});
|
|
2884
3223
|
}
|
|
2885
|
-
function
|
|
2886
|
-
let x = a(), [S, C] = c(null), { tenant: w, apiUrl: T } = r(
|
|
3224
|
+
function Wt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField: s, parentField: f, cvField: p, hrefField: m, size: g = "medium", horizontal: _ = !1, style: v, nodeRef: y, interactive: b = !0 }) {
|
|
3225
|
+
let x = a(), [S, C] = c(null), { tenant: w, apiUrl: T } = r(B), E = r(V)?.[t], [D, O] = c(null);
|
|
2887
3226
|
i(() => {
|
|
2888
3227
|
if (!t || E) return;
|
|
2889
3228
|
let e = !0;
|
|
@@ -2899,14 +3238,14 @@ function Pt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
|
|
|
2899
3238
|
T,
|
|
2900
3239
|
E
|
|
2901
3240
|
]);
|
|
2902
|
-
let k = t ?
|
|
3241
|
+
let k = t ? Vt(E ?? D ?? [], {
|
|
2903
3242
|
nameField: n,
|
|
2904
3243
|
titleField: o,
|
|
2905
3244
|
photoField: s,
|
|
2906
3245
|
parentField: f,
|
|
2907
3246
|
cvField: p,
|
|
2908
3247
|
hrefField: m
|
|
2909
|
-
}) : e, A =
|
|
3248
|
+
}) : e, A = It(g), { boxes: j, links: M, width: N, height: P } = Lt(k, {
|
|
2910
3249
|
size: g,
|
|
2911
3250
|
horizontal: _
|
|
2912
3251
|
});
|
|
@@ -2952,7 +3291,7 @@ function Pt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
|
|
|
2952
3291
|
stroke: "rgba(148, 163, 184, 0.7)",
|
|
2953
3292
|
strokeWidth: "1.5"
|
|
2954
3293
|
}, t)), j.map(({ node: e, x: t, y: n }) => {
|
|
2955
|
-
let r = F.has(e.id), i = !!e.color2, a = !!e.color || r || i, o = e.color || (r ? "var(--page-accent, #4f46e5)" : "var(--page-bg, #ffffff)"), s = e.color ?
|
|
3294
|
+
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 ? zt(e.color) : r ? "var(--page-accent-text, #ffffff)" : "var(--page-text, #111827)", c = i ? zt(e.color2) : s, f = b && (Bt(e) || e.href), p = () => Bt(e) ? C(e) : window.open(e.href, "_blank", "noreferrer"), m = e.photo ? t + Ht.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);
|
|
2956
3295
|
return /* @__PURE__ */ d("g", {
|
|
2957
3296
|
onClick: f ? p : void 0,
|
|
2958
3297
|
style: f ? { cursor: "pointer" } : void 0,
|
|
@@ -3016,13 +3355,13 @@ function Pt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
|
|
|
3016
3355
|
e.photo && /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("clipPath", {
|
|
3017
3356
|
id: `${x}-${e.id}`,
|
|
3018
3357
|
children: /* @__PURE__ */ u("circle", {
|
|
3019
|
-
cx: t +
|
|
3358
|
+
cx: t + Ht.pad + A.avatar / 2,
|
|
3020
3359
|
cy: n + A.h / 2,
|
|
3021
3360
|
r: A.avatar / 2
|
|
3022
3361
|
})
|
|
3023
3362
|
}), /* @__PURE__ */ u("image", {
|
|
3024
3363
|
href: e.photo,
|
|
3025
|
-
x: t +
|
|
3364
|
+
x: t + Ht.pad,
|
|
3026
3365
|
y: n + (A.h - A.avatar) / 2,
|
|
3027
3366
|
width: A.avatar,
|
|
3028
3367
|
height: A.avatar,
|
|
@@ -3036,7 +3375,7 @@ function Pt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
|
|
|
3036
3375
|
fontSize: A.title,
|
|
3037
3376
|
fontWeight: "600",
|
|
3038
3377
|
fill: s,
|
|
3039
|
-
children:
|
|
3378
|
+
children: Rt(e.title, g + 4)
|
|
3040
3379
|
}), e.name && /* @__PURE__ */ u("text", {
|
|
3041
3380
|
x: m,
|
|
3042
3381
|
y: n + _ + _ / 2 + A.name * .35,
|
|
@@ -3044,7 +3383,7 @@ function Pt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
|
|
|
3044
3383
|
fontSize: A.name,
|
|
3045
3384
|
fontWeight: "600",
|
|
3046
3385
|
fill: c,
|
|
3047
|
-
children:
|
|
3386
|
+
children: Rt(e.name, g)
|
|
3048
3387
|
})] }) : /* @__PURE__ */ d(l, { children: [v[0] && /* @__PURE__ */ u("text", {
|
|
3049
3388
|
x: m,
|
|
3050
3389
|
y: n + (v[1] ? A.h * .43 : A.h * .57),
|
|
@@ -3052,7 +3391,7 @@ function Pt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
|
|
|
3052
3391
|
fontSize: A.name,
|
|
3053
3392
|
fontWeight: "600",
|
|
3054
3393
|
fill: s,
|
|
3055
|
-
children:
|
|
3394
|
+
children: Rt(v[0], g)
|
|
3056
3395
|
}), v[1] && /* @__PURE__ */ u("text", {
|
|
3057
3396
|
x: m,
|
|
3058
3397
|
y: n + A.h * .73,
|
|
@@ -3060,19 +3399,19 @@ function Pt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
|
|
|
3060
3399
|
fontSize: A.title,
|
|
3061
3400
|
opacity: "0.7",
|
|
3062
3401
|
fill: s,
|
|
3063
|
-
children:
|
|
3402
|
+
children: Rt(v[1], g + 4)
|
|
3064
3403
|
})] })
|
|
3065
3404
|
]
|
|
3066
3405
|
}, e.id);
|
|
3067
3406
|
})]
|
|
3068
|
-
}), S && /* @__PURE__ */ u(
|
|
3407
|
+
}), S && /* @__PURE__ */ u(Ut, {
|
|
3069
3408
|
node: S,
|
|
3070
3409
|
onClose: () => C(null)
|
|
3071
3410
|
})]
|
|
3072
3411
|
});
|
|
3073
3412
|
}
|
|
3074
|
-
function
|
|
3075
|
-
let { tenant: _, apiUrl: v } = r(
|
|
3413
|
+
function Gt({ columns: e = [], rows: t = [], source: n, limit: a = 10, striped: o = !0, bordered: s = !1, compact: l = !1, paged: f, emptyText: p, style: m, nodeRef: g }) {
|
|
3414
|
+
let { tenant: _, apiUrl: v } = r(B), y = r(V), b = y?.[n], x = f ? le(y) : 1, [S, C] = c(null);
|
|
3076
3415
|
if (i(() => {
|
|
3077
3416
|
if (!n || b) return;
|
|
3078
3417
|
let e = !0, t = Math.max(1, Number(a) || 10), r = f && !n.startsWith("api:") ? `?offset=${(x - 1) * t}&limit=${t}` : "", i = n.startsWith("api:") ? `${v}/data/${encodeURIComponent(n.slice(4))}` : `${v}/dynamic/${encodeURIComponent(n)}${r}`;
|
|
@@ -3091,7 +3430,7 @@ function Ft({ columns: e = [], rows: t = [], source: n, limit: a = 10, striped:
|
|
|
3091
3430
|
x,
|
|
3092
3431
|
a
|
|
3093
3432
|
]), !e.length) return null;
|
|
3094
|
-
let w = Math.max(1, Number(a) || 10), T = n ? f ? b || n.startsWith("api:") ? (b ?? S ?? []).slice((x - 1) * w, x * w) : (S ?? []).slice(0, w) : (b ?? S ?? []).slice(0, w) : null, E = T ? T.map((t) => e.map((e) =>
|
|
3433
|
+
let w = Math.max(1, Number(a) || 10), T = n ? f ? b || n.startsWith("api:") ? (b ?? S ?? []).slice((x - 1) * w, x * w) : (S ?? []).slice(0, w) : (b ?? S ?? []).slice(0, w) : null, E = T ? T.map((t) => e.map((e) => W(U(t?.data, e.field)))) : t, D = !!n && !(n && !b && S === null) && E.length === 0, O = l ? "6px 10px" : "10px 14px", k = "1px solid rgba(148, 163, 184, 0.35)", A = s ? { border: k } : { borderBottom: k };
|
|
3095
3434
|
return /* @__PURE__ */ u("div", {
|
|
3096
3435
|
ref: g,
|
|
3097
3436
|
style: {
|
|
@@ -3137,76 +3476,79 @@ function Ft({ columns: e = [], rows: t = [], source: n, limit: a = 10, striped:
|
|
|
3137
3476
|
})
|
|
3138
3477
|
});
|
|
3139
3478
|
}
|
|
3140
|
-
var
|
|
3141
|
-
PageRoot:
|
|
3142
|
-
Section:
|
|
3143
|
-
Container:
|
|
3144
|
-
Heading:
|
|
3145
|
-
TextBlock:
|
|
3146
|
-
ButtonBlock:
|
|
3147
|
-
ImageBlock:
|
|
3148
|
-
Spacer:
|
|
3149
|
-
Divider:
|
|
3150
|
-
SliderBlock:
|
|
3151
|
-
CanvasSlider:
|
|
3152
|
-
TabsBlock:
|
|
3153
|
-
QuickStack:
|
|
3154
|
-
CollectionList:
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3479
|
+
var Kt = {
|
|
3480
|
+
PageRoot: xe,
|
|
3481
|
+
Section: Se,
|
|
3482
|
+
Container: Ce,
|
|
3483
|
+
Heading: we,
|
|
3484
|
+
TextBlock: Fe,
|
|
3485
|
+
ButtonBlock: Re,
|
|
3486
|
+
ImageBlock: ze,
|
|
3487
|
+
Spacer: Ge,
|
|
3488
|
+
Divider: Ke,
|
|
3489
|
+
SliderBlock: Qe,
|
|
3490
|
+
CanvasSlider: $e,
|
|
3491
|
+
TabsBlock: it,
|
|
3492
|
+
QuickStack: wt,
|
|
3493
|
+
CollectionList: Tt,
|
|
3494
|
+
CollectionSearch: Et,
|
|
3495
|
+
BreadcrumbsBlock: Dt,
|
|
3496
|
+
PaginationBlock: Ot,
|
|
3497
|
+
StepperBlock: Ft,
|
|
3498
|
+
SocialLinksBlock: Pt,
|
|
3499
|
+
ThemeModeBlock: Mt,
|
|
3500
|
+
OrgChartBlock: Wt,
|
|
3501
|
+
TableBlock: Gt,
|
|
3502
|
+
MasonryBlock: et,
|
|
3503
|
+
AccordionBlock: at,
|
|
3504
|
+
NavbarBlock: rt,
|
|
3505
|
+
ListBlock: Pe,
|
|
3506
|
+
TextSpan: De,
|
|
3507
|
+
QuoteBlock: Ne,
|
|
3508
|
+
TextLink: Le,
|
|
3509
|
+
RichTextBlock: je,
|
|
3510
|
+
RichContentBlock: je,
|
|
3511
|
+
VideoBlock: Be,
|
|
3512
|
+
YouTubeBlock: He,
|
|
3513
|
+
IframeBlock: Ue,
|
|
3514
|
+
EmbedBlock: We,
|
|
3515
|
+
FormBlock: pt,
|
|
3516
|
+
FormLabel: _t,
|
|
3517
|
+
FormInput: vt,
|
|
3518
|
+
FormTextarea: yt,
|
|
3519
|
+
FormCheckbox: (e) => /* @__PURE__ */ u(bt, {
|
|
3178
3520
|
kind: "checkbox",
|
|
3179
3521
|
...e
|
|
3180
3522
|
}),
|
|
3181
|
-
FormRadio: (e) => /* @__PURE__ */ u(
|
|
3523
|
+
FormRadio: (e) => /* @__PURE__ */ u(bt, {
|
|
3182
3524
|
kind: "radio",
|
|
3183
3525
|
...e
|
|
3184
3526
|
}),
|
|
3185
|
-
FormSelect:
|
|
3186
|
-
FormFile:
|
|
3187
|
-
FormRecaptcha:
|
|
3188
|
-
FormSubmit:
|
|
3189
|
-
},
|
|
3527
|
+
FormSelect: xt,
|
|
3528
|
+
FormFile: St,
|
|
3529
|
+
FormRecaptcha: gt,
|
|
3530
|
+
FormSubmit: Ct
|
|
3531
|
+
}, qt = {
|
|
3190
3532
|
id: "auth",
|
|
3191
3533
|
label: "Accounts",
|
|
3192
3534
|
category: "Apps",
|
|
3193
3535
|
keys: ["SiteLoginForm", "SiteAccountMenu"],
|
|
3194
3536
|
ssr: "shell",
|
|
3195
3537
|
settings: ["site.authRedirect"]
|
|
3196
|
-
},
|
|
3538
|
+
}, Jt = t({
|
|
3197
3539
|
user: null,
|
|
3198
3540
|
status: "idle",
|
|
3199
3541
|
ensure: () => {},
|
|
3200
3542
|
refresh: () => {},
|
|
3201
3543
|
signOut: () => {}
|
|
3202
|
-
}),
|
|
3203
|
-
let e = r(
|
|
3544
|
+
}), Yt = () => {
|
|
3545
|
+
let e = r(Jt);
|
|
3204
3546
|
return i(() => {
|
|
3205
3547
|
e.ensure();
|
|
3206
3548
|
}, [e]), e;
|
|
3207
3549
|
};
|
|
3208
|
-
function
|
|
3209
|
-
let d = r(
|
|
3550
|
+
function Xt({ children: e, initialUser: t, disabled: i, apiUrl: a, tenant: l }) {
|
|
3551
|
+
let d = r(B), 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}`, {
|
|
3210
3552
|
...t,
|
|
3211
3553
|
credentials: "include",
|
|
3212
3554
|
headers: {
|
|
@@ -3238,19 +3580,19 @@ function Bt({ children: e, initialUser: t, disabled: i, apiUrl: a, tenant: l })
|
|
|
3238
3580
|
b,
|
|
3239
3581
|
x
|
|
3240
3582
|
]);
|
|
3241
|
-
return /* @__PURE__ */ u(
|
|
3583
|
+
return /* @__PURE__ */ u(Jt.Provider, {
|
|
3242
3584
|
value: C,
|
|
3243
3585
|
children: e
|
|
3244
3586
|
});
|
|
3245
3587
|
}
|
|
3246
|
-
function
|
|
3247
|
-
let { status: n } =
|
|
3588
|
+
function Zt({ when: e, children: t }) {
|
|
3589
|
+
let { status: n } = Yt();
|
|
3248
3590
|
return !e || e === "always" ? t : n === "idle" || n === "loading" ? null : e === "user" == (n === "user") ? t : null;
|
|
3249
3591
|
}
|
|
3250
3592
|
//#endregion
|
|
3251
3593
|
//#region ../ui/src/components/builder/apps/auth/views.jsx
|
|
3252
|
-
function
|
|
3253
|
-
let { tenant: g, apiUrl: _, settings: v } = r(
|
|
3594
|
+
function Qt({ 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 }) {
|
|
3595
|
+
let { tenant: g, apiUrl: _, settings: v } = r(B), [y, b] = c("form"), [x, S] = c(""), [C, w] = c(!1), T = e === "register", E = f ? m || "form" : y, D = (e) => typeof e == "string" && e.startsWith("/") && !e.startsWith("//") ? e : "", O = async (e) => {
|
|
3254
3596
|
if (e.preventDefault(), f) return;
|
|
3255
3597
|
let n = new FormData(e.currentTarget);
|
|
3256
3598
|
w(!0), S("");
|
|
@@ -3298,20 +3640,20 @@ function Ht({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
|
|
|
3298
3640
|
children: [
|
|
3299
3641
|
T ? /* @__PURE__ */ d("label", {
|
|
3300
3642
|
style: {
|
|
3301
|
-
...
|
|
3643
|
+
...q,
|
|
3302
3644
|
display: "grid",
|
|
3303
3645
|
gap: 6
|
|
3304
3646
|
},
|
|
3305
3647
|
children: [a, /* @__PURE__ */ u("input", {
|
|
3306
3648
|
name: "name",
|
|
3307
3649
|
type: "text",
|
|
3308
|
-
style:
|
|
3309
|
-
...
|
|
3650
|
+
style: J,
|
|
3651
|
+
...Y(f)
|
|
3310
3652
|
})]
|
|
3311
3653
|
}) : null,
|
|
3312
3654
|
/* @__PURE__ */ d("label", {
|
|
3313
3655
|
style: {
|
|
3314
|
-
...
|
|
3656
|
+
...q,
|
|
3315
3657
|
display: "grid",
|
|
3316
3658
|
gap: 6
|
|
3317
3659
|
},
|
|
@@ -3319,13 +3661,13 @@ function Ht({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
|
|
|
3319
3661
|
name: "email",
|
|
3320
3662
|
type: "email",
|
|
3321
3663
|
required: !f,
|
|
3322
|
-
style:
|
|
3323
|
-
...
|
|
3664
|
+
style: J,
|
|
3665
|
+
...Y(f)
|
|
3324
3666
|
})]
|
|
3325
3667
|
}),
|
|
3326
3668
|
/* @__PURE__ */ d("label", {
|
|
3327
3669
|
style: {
|
|
3328
|
-
...
|
|
3670
|
+
...q,
|
|
3329
3671
|
display: "grid",
|
|
3330
3672
|
gap: 6
|
|
3331
3673
|
},
|
|
@@ -3333,15 +3675,15 @@ function Ht({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
|
|
|
3333
3675
|
name: "password",
|
|
3334
3676
|
type: "password",
|
|
3335
3677
|
required: !f,
|
|
3336
|
-
style:
|
|
3337
|
-
...
|
|
3678
|
+
style: J,
|
|
3679
|
+
...Y(f)
|
|
3338
3680
|
})]
|
|
3339
3681
|
}),
|
|
3340
3682
|
/* @__PURE__ */ u("button", {
|
|
3341
3683
|
type: f ? "button" : "submit",
|
|
3342
3684
|
disabled: C || void 0,
|
|
3343
3685
|
style: {
|
|
3344
|
-
...
|
|
3686
|
+
...G,
|
|
3345
3687
|
border: 0,
|
|
3346
3688
|
padding: "10px 22px",
|
|
3347
3689
|
borderRadius: 8,
|
|
@@ -3373,8 +3715,8 @@ function Ht({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
|
|
|
3373
3715
|
]
|
|
3374
3716
|
});
|
|
3375
3717
|
}
|
|
3376
|
-
function
|
|
3377
|
-
let { user: c, status: l, signOut: f } =
|
|
3718
|
+
function $t({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !1, style: r, nodeRef: i, inert: a, linked: o, show: s }) {
|
|
3719
|
+
let { user: c, status: l, signOut: f } = Yt(), p = a ? s || "user" : l, m = a ? {
|
|
3378
3720
|
name: "Ada Lovelace",
|
|
3379
3721
|
email: "ada@example.com"
|
|
3380
3722
|
} : c;
|
|
@@ -3395,7 +3737,7 @@ function Ut({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
|
|
|
3395
3737
|
children: [
|
|
3396
3738
|
/* @__PURE__ */ d("span", {
|
|
3397
3739
|
style: {
|
|
3398
|
-
...
|
|
3740
|
+
...q,
|
|
3399
3741
|
fontWeight: 600
|
|
3400
3742
|
},
|
|
3401
3743
|
children: [
|
|
@@ -3406,7 +3748,7 @@ function Ut({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
|
|
|
3406
3748
|
}),
|
|
3407
3749
|
n && m?.email ? /* @__PURE__ */ u("span", {
|
|
3408
3750
|
style: {
|
|
3409
|
-
...
|
|
3751
|
+
...q,
|
|
3410
3752
|
opacity: .7
|
|
3411
3753
|
},
|
|
3412
3754
|
children: m.email
|
|
@@ -3415,14 +3757,14 @@ function Ut({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
|
|
|
3415
3757
|
type: "button",
|
|
3416
3758
|
onClick: a ? void 0 : f,
|
|
3417
3759
|
style: {
|
|
3418
|
-
...
|
|
3760
|
+
...G,
|
|
3419
3761
|
border: 0,
|
|
3420
3762
|
padding: "8px 16px",
|
|
3421
3763
|
borderRadius: 8,
|
|
3422
3764
|
fontSize: 14,
|
|
3423
3765
|
cursor: a ? "default" : "pointer"
|
|
3424
3766
|
},
|
|
3425
|
-
...
|
|
3767
|
+
...Y(a),
|
|
3426
3768
|
children: t
|
|
3427
3769
|
})
|
|
3428
3770
|
]
|
|
@@ -3439,42 +3781,42 @@ function Ut({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
|
|
|
3439
3781
|
}
|
|
3440
3782
|
//#endregion
|
|
3441
3783
|
//#region ../ui/src/components/builder/apps/index.js
|
|
3442
|
-
var
|
|
3443
|
-
SiteLoginForm:
|
|
3444
|
-
SiteAccountMenu:
|
|
3784
|
+
var en = [qt], tn = {
|
|
3785
|
+
SiteLoginForm: Qt,
|
|
3786
|
+
SiteAccountMenu: $t
|
|
3445
3787
|
};
|
|
3446
|
-
new Set(
|
|
3788
|
+
new Set(en.filter((e) => e.ssr === "shell").flatMap((e) => e.keys));
|
|
3447
3789
|
//#endregion
|
|
3448
3790
|
//#region ../ui/src/components/builder/plugins/runtime.js
|
|
3449
|
-
var
|
|
3450
|
-
function
|
|
3451
|
-
if (
|
|
3791
|
+
var nn = /* @__PURE__ */ new Map();
|
|
3792
|
+
function rn(e) {
|
|
3793
|
+
if (nn.has(e)) return nn.get(e);
|
|
3452
3794
|
let t = URL.createObjectURL(new Blob([e], { type: "text/javascript" })), n = import(
|
|
3453
3795
|
/* @vite-ignore */
|
|
3454
3796
|
/* webpackIgnore: true */
|
|
3455
3797
|
t
|
|
3456
3798
|
).finally(() => URL.revokeObjectURL(t));
|
|
3457
|
-
return
|
|
3799
|
+
return nn.set(e, n), n;
|
|
3458
3800
|
}
|
|
3459
|
-
function
|
|
3801
|
+
function an(e) {
|
|
3460
3802
|
let t = e && typeof e == "object" ? e.builder_plugins : null, n = t && typeof t == "object" ? t.plugins : null;
|
|
3461
3803
|
return n && typeof n == "object" ? n : {};
|
|
3462
3804
|
}
|
|
3463
3805
|
//#endregion
|
|
3464
3806
|
//#region ../ui/src/components/builder/plugins/view.jsx
|
|
3465
|
-
async function
|
|
3466
|
-
let n = await
|
|
3807
|
+
async function on(e, t) {
|
|
3808
|
+
let n = await rn(e);
|
|
3467
3809
|
return (Array.isArray(n?.default?.blocks) ? n.default.blocks : []).find((e) => e?.id === t && typeof e.mount == "function") ?? null;
|
|
3468
3810
|
}
|
|
3469
|
-
var
|
|
3811
|
+
var sn = {
|
|
3470
3812
|
padding: "10px 12px",
|
|
3471
3813
|
border: "1px dashed rgba(148, 163, 184, 0.5)",
|
|
3472
3814
|
borderRadius: 8,
|
|
3473
3815
|
fontSize: 12,
|
|
3474
3816
|
opacity: .6
|
|
3475
3817
|
};
|
|
3476
|
-
function
|
|
3477
|
-
let c = r(
|
|
3818
|
+
function cn({ pluginId: e, blockId: t, props: n, style: a, nodeRef: o }) {
|
|
3819
|
+
let c = r(B), l = an(c?.settings)[e], f = s(null), p = s(null), m = {
|
|
3478
3820
|
tenant: c?.tenant ?? "",
|
|
3479
3821
|
apiUrl: c?.apiUrl ?? "/api",
|
|
3480
3822
|
locale: c?.locale ?? "",
|
|
@@ -3486,7 +3828,7 @@ function Zt({ pluginId: e, blockId: t, props: n, style: a, nodeRef: o }) {
|
|
|
3486
3828
|
let e = f.current;
|
|
3487
3829
|
if (!l?.code || !e) return;
|
|
3488
3830
|
let n = !0;
|
|
3489
|
-
return
|
|
3831
|
+
return on(l.code, t).then((e) => {
|
|
3490
3832
|
if (!(!n || !e || !f.current)) {
|
|
3491
3833
|
p.current = e;
|
|
3492
3834
|
try {
|
|
@@ -3516,7 +3858,7 @@ function Zt({ pluginId: e, blockId: t, props: n, style: a, nodeRef: o }) {
|
|
|
3516
3858
|
}) : /* @__PURE__ */ d("div", {
|
|
3517
3859
|
ref: o,
|
|
3518
3860
|
style: {
|
|
3519
|
-
...
|
|
3861
|
+
...sn,
|
|
3520
3862
|
...h(a)
|
|
3521
3863
|
},
|
|
3522
3864
|
children: [
|
|
@@ -3528,10 +3870,10 @@ function Zt({ pluginId: e, blockId: t, props: n, style: a, nodeRef: o }) {
|
|
|
3528
3870
|
}
|
|
3529
3871
|
//#endregion
|
|
3530
3872
|
//#region ../ui/src/components/builder/render.jsx
|
|
3531
|
-
var
|
|
3532
|
-
...
|
|
3533
|
-
...
|
|
3534
|
-
PluginBlock:
|
|
3873
|
+
var ln = {
|
|
3874
|
+
...Kt,
|
|
3875
|
+
...tn,
|
|
3876
|
+
PluginBlock: cn
|
|
3535
3877
|
};
|
|
3536
3878
|
function $(t, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
|
|
3537
3879
|
let o = n[t];
|
|
@@ -3543,7 +3885,7 @@ function $(t, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
|
|
|
3543
3885
|
let c = new Set(i).add(n);
|
|
3544
3886
|
return /* @__PURE__ */ u(e, { children: $(s.template.rootId, s.template.nodes, r, c, a) }, t);
|
|
3545
3887
|
}
|
|
3546
|
-
let l =
|
|
3888
|
+
let l = ln[s];
|
|
3547
3889
|
if (!l) return null;
|
|
3548
3890
|
let d = (o.nodes ?? []).map((e) => $(e, n, r, i, a)).filter(Boolean), f = Object.entries(o.linkedNodes ?? {}), p = f.length ? Object.fromEntries(f.map(([e, t]) => [e, $(t, n, r, i)])) : void 0, m = /* @__PURE__ */ u(l, {
|
|
3549
3891
|
...c,
|
|
@@ -3554,15 +3896,16 @@ function $(t, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
|
|
|
3554
3896
|
},
|
|
3555
3897
|
children: d.length ? d : void 0
|
|
3556
3898
|
}, t);
|
|
3557
|
-
return c.when && c.when !== "always" ? /* @__PURE__ */ u(
|
|
3899
|
+
return c.when && c.when !== "always" ? /* @__PURE__ */ u(Zt, {
|
|
3558
3900
|
when: c.when,
|
|
3559
3901
|
children: m
|
|
3560
3902
|
}, t) : m;
|
|
3561
3903
|
}
|
|
3562
3904
|
//#endregion
|
|
3563
3905
|
//#region ../ui/src/components/builder/PageRenderer.jsx
|
|
3564
|
-
var $t = (e) => Object.entries(e).map(([e, t]) => `${e}: ${t};`).join(" ")
|
|
3565
|
-
|
|
3906
|
+
var un = (e) => Object.entries(e).map(([e, t]) => `${e}: ${t};`).join(" "), dn = (e) => `.webim-page[data-webim-mode="light"] { ${Object.entries(F(e.light)).map(([e, t]) => `${e}: ${t} !important;`).join(" ")} }
|
|
3907
|
+
.webim-page[data-webim-mode="dark"] { ${Object.entries(F(e.dark)).map(([e, t]) => `${e}: ${t} !important;`).join(" ")} }`;
|
|
3908
|
+
function fn({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, custom: s, tenant: c, apiUrl: l, datasets: f, locale: p, direction: m, settings: h, siteUser: g }) {
|
|
3566
3909
|
let _ = s?.js?.trim();
|
|
3567
3910
|
if (i(() => {
|
|
3568
3911
|
if (!_) return;
|
|
@@ -3571,38 +3914,41 @@ function en({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, cu
|
|
|
3571
3914
|
}, [_]), !e?.ROOT) return null;
|
|
3572
3915
|
let v = {
|
|
3573
3916
|
lang: p || void 0,
|
|
3574
|
-
dir:
|
|
3917
|
+
dir: ce(m, p)
|
|
3575
3918
|
}, y = ".webim-page, .webim-page *, .webim-page *::before, .webim-page *::after { box-sizing: border-box; }", b = {
|
|
3576
3919
|
minHeight: "100%",
|
|
3577
3920
|
display: "flex",
|
|
3578
3921
|
flexDirection: "column"
|
|
3579
|
-
}, x = $("ROOT", e, n), S = o(() => ({ render: (t, r) => $(t, e, n, void 0, { mapProps: r }) }), [e, n]), C = D(e, n), w = E(e, n), T = s?.css?.trim(), O =
|
|
3922
|
+
}, x = $("ROOT", e, n), S = o(() => ({ render: (t, r) => $(t, e, n, void 0, { mapProps: r }) }), [e, n]), C = D(e, n), w = E(e, n), T = s?.css?.trim(), O = ae(e, n).map((e) => /* @__PURE__ */ u("link", {
|
|
3580
3923
|
rel: "stylesheet",
|
|
3581
3924
|
precedence: "default",
|
|
3582
|
-
href:
|
|
3583
|
-
}, e));
|
|
3584
|
-
|
|
3925
|
+
href: z(e)
|
|
3926
|
+
}, e)), k = P(t), A = dn(k);
|
|
3927
|
+
return r === "auto" ? /* @__PURE__ */ u(B.Provider, {
|
|
3585
3928
|
value: {
|
|
3586
3929
|
tenant: c || "",
|
|
3587
3930
|
apiUrl: l || "/api",
|
|
3588
3931
|
locale: p || "",
|
|
3589
3932
|
settings: h ?? null
|
|
3590
3933
|
},
|
|
3591
|
-
children: /* @__PURE__ */ u(
|
|
3934
|
+
children: /* @__PURE__ */ u(Xt, {
|
|
3592
3935
|
initialUser: g,
|
|
3593
|
-
children: /* @__PURE__ */ u(
|
|
3936
|
+
children: /* @__PURE__ */ u(V.Provider, {
|
|
3594
3937
|
value: f ?? null,
|
|
3595
|
-
children: /* @__PURE__ */ u(
|
|
3938
|
+
children: /* @__PURE__ */ u(H.Provider, {
|
|
3596
3939
|
value: S,
|
|
3597
3940
|
children: /* @__PURE__ */ d("div", {
|
|
3598
3941
|
...v,
|
|
3599
3942
|
className: "webim-page",
|
|
3600
3943
|
style: {
|
|
3601
3944
|
...b,
|
|
3602
|
-
...
|
|
3945
|
+
...I(t),
|
|
3603
3946
|
...a
|
|
3604
3947
|
},
|
|
3605
3948
|
children: [
|
|
3949
|
+
/* @__PURE__ */ u("style", { children: `.webim-page { ${un(F(k.light))} }
|
|
3950
|
+
@media (prefers-color-scheme: dark) { .webim-page { ${un(F(k.dark))} } }` }),
|
|
3951
|
+
/* @__PURE__ */ u("style", { children: A }),
|
|
3606
3952
|
O,
|
|
3607
3953
|
/* @__PURE__ */ u("style", { children: y }),
|
|
3608
3954
|
C && /* @__PURE__ */ u("style", { children: C }),
|
|
@@ -3614,33 +3960,30 @@ function en({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, cu
|
|
|
3614
3960
|
})
|
|
3615
3961
|
})
|
|
3616
3962
|
})
|
|
3617
|
-
})
|
|
3618
|
-
let k = P(t);
|
|
3619
|
-
return /* @__PURE__ */ u(V.Provider, {
|
|
3963
|
+
}) : /* @__PURE__ */ u(B.Provider, {
|
|
3620
3964
|
value: {
|
|
3621
3965
|
tenant: c || "",
|
|
3622
3966
|
apiUrl: l || "/api",
|
|
3623
3967
|
locale: p || "",
|
|
3624
3968
|
settings: h ?? null
|
|
3625
3969
|
},
|
|
3626
|
-
children: /* @__PURE__ */ u(
|
|
3970
|
+
children: /* @__PURE__ */ u(Xt, {
|
|
3627
3971
|
initialUser: g,
|
|
3628
|
-
children: /* @__PURE__ */ u(
|
|
3972
|
+
children: /* @__PURE__ */ u(V.Provider, {
|
|
3629
3973
|
value: f ?? null,
|
|
3630
|
-
children: /* @__PURE__ */ u(
|
|
3974
|
+
children: /* @__PURE__ */ u(H.Provider, {
|
|
3631
3975
|
value: S,
|
|
3632
3976
|
children: /* @__PURE__ */ d("div", {
|
|
3633
3977
|
...v,
|
|
3634
3978
|
className: "webim-page",
|
|
3635
3979
|
style: {
|
|
3636
3980
|
...b,
|
|
3637
|
-
...
|
|
3981
|
+
...ee(t, r),
|
|
3638
3982
|
...a
|
|
3639
3983
|
},
|
|
3640
3984
|
children: [
|
|
3641
|
-
/* @__PURE__ */ u("style", { children: `.webim-page { ${$t(F(k.light))} }
|
|
3642
|
-
@media (prefers-color-scheme: dark) { .webim-page { ${$t(F(k.dark))} } }` }),
|
|
3643
3985
|
O,
|
|
3986
|
+
/* @__PURE__ */ u("style", { children: A }),
|
|
3644
3987
|
/* @__PURE__ */ u("style", { children: y }),
|
|
3645
3988
|
C && /* @__PURE__ */ u("style", { children: C }),
|
|
3646
3989
|
w && /* @__PURE__ */ u("style", { children: w }),
|
|
@@ -3655,8 +3998,8 @@ function en({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, cu
|
|
|
3655
3998
|
}
|
|
3656
3999
|
//#endregion
|
|
3657
4000
|
//#region src/WebimContent.jsx
|
|
3658
|
-
function
|
|
3659
|
-
return e?.blocks?.ROOT ? /* @__PURE__ */ u(
|
|
4001
|
+
function pn({ bundle: e, mode: t = "auto", style: n }) {
|
|
4002
|
+
return e?.blocks?.ROOT ? /* @__PURE__ */ u(fn, {
|
|
3660
4003
|
blocks: e.blocks,
|
|
3661
4004
|
theme: e.theme,
|
|
3662
4005
|
components: e.components,
|
|
@@ -3673,7 +4016,7 @@ function tn({ bundle: e, mode: t = "auto", style: n }) {
|
|
|
3673
4016
|
}
|
|
3674
4017
|
//#endregion
|
|
3675
4018
|
//#region src/WebimPage.jsx
|
|
3676
|
-
function
|
|
4019
|
+
function mn({ 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 }) {
|
|
3677
4020
|
let [g, _] = c({ status: "loading" }), v = s({
|
|
3678
4021
|
onLoad: m,
|
|
3679
4022
|
onError: h
|
|
@@ -3683,7 +4026,7 @@ function nn({ apiUrl: e, tenant: t, slug: n, locale: r, preview: a, token: o, mo
|
|
|
3683
4026
|
onError: h
|
|
3684
4027
|
}, i(() => {
|
|
3685
4028
|
let i = !0;
|
|
3686
|
-
return _({ status: "loading" }),
|
|
4029
|
+
return _({ status: "loading" }), ne({
|
|
3687
4030
|
apiUrl: e,
|
|
3688
4031
|
tenant: t,
|
|
3689
4032
|
slug: n,
|
|
@@ -3710,11 +4053,11 @@ function nn({ apiUrl: e, tenant: t, slug: n, locale: r, preview: a, token: o, mo
|
|
|
3710
4053
|
r,
|
|
3711
4054
|
a,
|
|
3712
4055
|
o
|
|
3713
|
-
]), g.status === "loading" ? f : g.status === "error" ? typeof p == "function" ? p(g.error) : p : /* @__PURE__ */ u(
|
|
4056
|
+
]), g.status === "loading" ? f : g.status === "error" ? typeof p == "function" ? p(g.error) : p : /* @__PURE__ */ u(pn, {
|
|
3714
4057
|
bundle: g.bundle,
|
|
3715
4058
|
mode: l,
|
|
3716
4059
|
style: d
|
|
3717
4060
|
});
|
|
3718
4061
|
}
|
|
3719
4062
|
//#endregion
|
|
3720
|
-
export {
|
|
4063
|
+
export { fn as PageRenderer, pn as WebimContent, mn as WebimPage, ne as fetchPage, Ae as renderRichContent, L as resolveTheme };
|