webim-adapter 2.0.3 → 2.2.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.
@@ -266,18 +266,18 @@ function A(e) {
266
266
  t.backgroundImage = t.backgroundImage ? `${o}, ${t.backgroundImage}` : o;
267
267
  }
268
268
  delete t.backgroundVideo;
269
- let { overlayColor: J, overlayOpacity: oe } = t;
270
- if (delete t.overlayColor, delete t.overlayOpacity, J) {
271
- let e = `color-mix(in srgb, ${J} ${oe ?? 50}%, transparent)`, n = `linear-gradient(${e}, ${e})`;
269
+ let { overlayColor: oe, overlayOpacity: se } = t;
270
+ if (delete t.overlayColor, delete t.overlayOpacity, oe) {
271
+ let e = `color-mix(in srgb, ${oe} ${se ?? 50}%, transparent)`, n = `linear-gradient(${e}, ${e})`;
272
272
  t.backgroundImage = t.backgroundImage ? `${n}, ${t.backgroundImage}` : n;
273
273
  }
274
274
  t.backgroundImage && (t.backgroundSize ??= "cover", t.backgroundPosition ??= "center", t.backgroundRepeat ??= "no-repeat");
275
- let { backgroundLayers: se } = t;
275
+ let { backgroundLayers: ce } = t;
276
276
  delete t.backgroundLayers;
277
- let ce = (Array.isArray(se) ? se : []).filter((e) => e && e.on !== !1);
278
- if (ce.length) {
277
+ let le = (Array.isArray(ce) ? ce : []).filter((e) => e && e.on !== !1);
278
+ if (le.length) {
279
279
  let e = [], n = [], r = [], i = [], a = [];
280
- for (let t of ce) 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");
280
+ for (let t of le) 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");
281
281
  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");
282
282
  else {
283
283
  if (!t.src) continue;
@@ -475,14 +475,14 @@ var G = "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Ari
475
475
  h4: 22,
476
476
  h5: 19,
477
477
  h6: 16
478
- }, J = {
478
+ }, oe = {
479
479
  font: "system",
480
480
  headingFont: "inherit",
481
481
  headings: q,
482
482
  bodySize: 16,
483
483
  light: ae.light,
484
484
  dark: ae.dark
485
- }, oe = {
485
+ }, se = {
486
486
  system: {
487
487
  label: "System",
488
488
  value: G
@@ -503,7 +503,7 @@ var G = "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Ari
503
503
  label: "Mono",
504
504
  value: "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace"
505
505
  }
506
- }, se = (e, t) => oe[e]?.value ?? v(e) ?? (typeof e == "string" && e.trim() ? `"${e.trim()}", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif` : t), ce = (e, ...t) => {
506
+ }, ce = (e, t) => se[e]?.value ?? v(e) ?? (typeof e == "string" && e.trim() ? `"${e.trim()}", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif` : t), le = (e, ...t) => {
507
507
  let n = Object.assign({}, e, ...t);
508
508
  return n.primary = {
509
509
  ...e.primary,
@@ -519,21 +519,21 @@ var G = "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Ari
519
519
  }), {})
520
520
  }, n;
521
521
  };
522
- function le(e) {
522
+ function ue(e) {
523
523
  let { light: t, dark: n, font: r, headingFont: i, headings: a, bodySize: o, ...s } = e ?? {};
524
524
  return {
525
- font: r ?? J.font,
526
- headingFont: i ?? J.headingFont,
525
+ font: r ?? oe.font,
526
+ headingFont: i ?? oe.headingFont,
527
527
  headings: {
528
528
  ...q,
529
529
  ...a ?? {}
530
530
  },
531
531
  bodySize: o ?? 16,
532
- light: ce(ae.light, s, t),
533
- dark: ce(ae.dark, n)
532
+ light: le(ae.light, s, t),
533
+ dark: le(ae.dark, n)
534
534
  };
535
535
  }
536
- function ue(e) {
536
+ function J(e) {
537
537
  return {
538
538
  "--page-bg": e.background,
539
539
  "--page-surface": e.surface ?? e.background,
@@ -552,12 +552,12 @@ function ue(e) {
552
552
  };
553
553
  }
554
554
  function de(e) {
555
- let t = le(e);
555
+ let t = ue(e);
556
556
  return {
557
557
  backgroundColor: "var(--page-bg)",
558
558
  color: "var(--page-text)",
559
- fontFamily: se(t.font, G),
560
- "--page-heading-font": t.headingFont === "inherit" ? "inherit" : se(t.headingFont, "inherit"),
559
+ fontFamily: ce(t.font, G),
560
+ "--page-heading-font": t.headingFont === "inherit" ? "inherit" : ce(t.headingFont, "inherit"),
561
561
  ...pe(t.headings),
562
562
  "--page-body-size": fe(t.bodySize, 16)
563
563
  };
@@ -574,10 +574,10 @@ function pe(e) {
574
574
  return t;
575
575
  }
576
576
  function me(e, t = "light") {
577
- let n = le(e);
577
+ let n = ue(e);
578
578
  return {
579
579
  ...de(e),
580
- ...ue(n[t] ?? n.light)
580
+ ...J(n[t] ?? n.light)
581
581
  };
582
582
  }
583
583
  function he(e, t) {
@@ -665,34 +665,301 @@ var be = /* @__PURE__ */ new Set([
665
665
  "yi",
666
666
  "dv",
667
667
  "ckb"
668
- ]), Y = (e) => be.has(String(e || "").toLowerCase().split(/[-_]/)[0]) ? "rtl" : "ltr", X = (e, t) => e === "ltr" || e === "rtl" ? e : t ? Y(t) : void 0, Z = t({
668
+ ]), Y = (e) => be.has(String(e || "").toLowerCase().split(/[-_]/)[0]) ? "rtl" : "ltr", X = (e, t) => e === "ltr" || e === "rtl" ? e : t ? Y(t) : void 0, Z = /^(https?:|mailto:|tel:)/i, xe = /^[a-z][a-z0-9+.-]*:/i;
669
+ function Se(e) {
670
+ let t = String(e ?? "").trim();
671
+ return t ? Z.test(t) || t.startsWith("//") ? t : xe.test(t) ? "" : t : "";
672
+ }
673
+ var Ce = /^\\([\\`*_{}[\]()#+\-.!~>|])/, we = /^(`+)([\s\S]*?[^`])\1(?!`)/, Te = /^!\[([^\]]*)\]\(\s*<?([^)\s>]*)>?(?:\s+"([^"]*)")?\s*\)/, Ee = /^\[((?:[^[\]]|\[[^\]]*\])*)\]\(\s*<?([^)\s>]*)>?(?:\s+"([^"]*)")?\s*\)/, De = /^<((?:https?:\/\/|mailto:)[^>\s]+)>/, Oe = /^https?:\/\/[^\s<>"'`]+[^\s<>"'`.,;:!?)\]}]/, ke = /^(\*\*|__)(?=\S)([\s\S]*?\S)\1/, Ae = /^~~(?=\S)([\s\S]*?\S)~~/, je = /^(\*|_)(?=\S)([\s\S]*?\S)\1/, Me = /[\\`*_~![<\n]|https?:\/\//, Ne = (e, t) => e.map((e) => e.br || e.image ? {
674
+ ...e,
675
+ ...t.href ? {
676
+ href: t.href,
677
+ target: t.target
678
+ } : null
679
+ } : {
680
+ ...e,
681
+ ...t
682
+ });
683
+ function Pe(e, t = {}) {
684
+ let n = String(e ?? ""), r = t.newTab ? "_blank" : void 0, i = [], a = "", o = 0, s = () => {
685
+ a && i.push({ text: a }), a = "";
686
+ }, c = (e) => {
687
+ s(), i.push(...e);
688
+ };
689
+ for (; o < n.length;) {
690
+ let e = n.slice(o), i = o > 0 ? n[o - 1] : "", s = Ce.exec(e);
691
+ if (s) {
692
+ a += s[1], o += s[0].length;
693
+ continue;
694
+ }
695
+ if (e[0] === "\n") {
696
+ / {2,}$/.test(a) ? (a = a.replace(/ +$/, ""), c([{ br: !0 }])) : a.endsWith("\\") ? (a = a.slice(0, -1), c([{ br: !0 }])) : a += " ", o += 1;
697
+ continue;
698
+ }
699
+ if (s = we.exec(e), s) {
700
+ c([{
701
+ text: (/^ .* $/.test(s[2]) ? s[2].slice(1, -1) : s[2]).replace(/\n/g, " "),
702
+ code: !0
703
+ }]), o += s[0].length;
704
+ continue;
705
+ }
706
+ if (s = Te.exec(e), s) {
707
+ let e = Se(s[2]);
708
+ e ? c([{ image: {
709
+ src: e,
710
+ alt: s[1] || "",
711
+ title: s[3] || ""
712
+ } }]) : a += s[1], o += s[0].length;
713
+ continue;
714
+ }
715
+ if (s = Ee.exec(e), s) {
716
+ let e = Se(s[2]), n = Pe(s[1], t);
717
+ c(e ? Ne(n, {
718
+ href: e,
719
+ target: r
720
+ }) : n), o += s[0].length;
721
+ continue;
722
+ }
723
+ if (s = De.exec(e) ?? (/[\s(<]/.test(i) || o === 0 ? Oe.exec(e) : null), s) {
724
+ let e = s[1] ?? s[0], t = Se(e);
725
+ t ? c([{
726
+ text: e.replace(/^mailto:/i, ""),
727
+ href: t,
728
+ target: r
729
+ }]) : a += e, o += s[0].length;
730
+ continue;
731
+ }
732
+ if (s = ke.exec(e), s && (s[1] === "**" || !/\w/.test(i))) {
733
+ c(Ne(Pe(s[2], t), { bold: !0 })), o += s[0].length;
734
+ continue;
735
+ }
736
+ if (s = Ae.exec(e), s) {
737
+ c(Ne(Pe(s[1], t), { strike: !0 })), o += s[0].length;
738
+ continue;
739
+ }
740
+ if (s = je.exec(e), s && (s[1] === "*" || !/\w/.test(i) && !/\w/.test(n[o + s[0].length] ?? ""))) {
741
+ c(Ne(Pe(s[2], t), { italic: !0 })), o += s[0].length;
742
+ continue;
743
+ }
744
+ a += n[o], o += 1;
745
+ let l = n.slice(o).search(Me);
746
+ l > 0 ? (a += n.slice(o, o + l), o += l) : l === -1 && (a += n.slice(o), o = n.length);
747
+ }
748
+ return s(), i;
749
+ }
750
+ var Fe = /^[ \t]*$/, Ie = /^ {0,3}(`{3,}|~{3,})[ \t]*([^`\s]*)[ \t]*$/, Le = /^ {0,3}(#{1,6})(?:[ \t]+(.*?))?[ \t]*$/, Re = /^ {0,3}(?:(?:\*[ \t]*){3,}|(?:-[ \t]*){3,}|(?:_[ \t]*){3,})$/, ze = /^ {0,3}>[ \t]?(.*)$/, Be = /^( *)([-*+])[ \t]+(.*)$/, Ve = /^( *)(\d{1,9})[.)][ \t]+(.*)$/, He = /^ {0,3}(=+|-+)[ \t]*$/, Ue = /^\[([ xX])\][ \t]+(.*)$/, We = /^ {0,3}\|?(?:[ \t]*:?-+:?[ \t]*\|)+[ \t]*:?-*:?[ \t]*\|?[ \t]*$/, Ge = (e) => (/^[ \t]*/.exec(e)[0].match(/\t/g) || []).length * 3 + /^[ \t]*/.exec(e)[0].length;
751
+ function Ke(e) {
752
+ let t = Be.exec(e);
753
+ if (t) return {
754
+ indent: t[1].length,
755
+ ordered: !1,
756
+ text: t[3]
757
+ };
758
+ let n = Ve.exec(e);
759
+ return n ? {
760
+ indent: n[1].length,
761
+ ordered: !0,
762
+ start: Number(n[2]),
763
+ text: n[3]
764
+ } : null;
765
+ }
766
+ function qe(e) {
767
+ let t = [], n = "";
768
+ for (let r = 0; r < e.length; r++) e[r] === "\\" && e[r + 1] === "|" ? (n += "|", r += 1) : e[r] === "|" ? (t.push(n), n = "") : n += e[r];
769
+ return t.push(n), t.length && Fe.test(t[0]) && t.shift(), t.length && Fe.test(t[t.length - 1]) && t.pop(), t.map((e) => e.trim());
770
+ }
771
+ var Je = (e) => {
772
+ let t = e.trim(), n = t.startsWith(":"), r = t.endsWith(":");
773
+ return n && r ? "center" : r ? "right" : n ? "left" : null;
774
+ };
775
+ function Ye(e) {
776
+ let t = e.filter((e) => !(e.text && !e.text.trim()));
777
+ if (t.length === 1 && t[0].image && !t[0].href) {
778
+ let { src: e, alt: n, title: r } = t[0].image;
779
+ return [{
780
+ type: "image",
781
+ src: e,
782
+ alt: n,
783
+ caption: r || "",
784
+ align: "left",
785
+ wrap: !1
786
+ }];
787
+ }
788
+ return e.length ? [{
789
+ type: "p",
790
+ parts: e
791
+ }] : [];
792
+ }
793
+ function Xe(e) {
794
+ let t = String(e ?? "").replace(/\r\n?/g, "\n").replace(/^/, "").split("\n"), n = null;
795
+ return t.map((e) => {
796
+ let t = Ie.exec(e);
797
+ return n ? (t && t[1].startsWith(n[0]) && t[1].length >= n.length && (n = null), e) : t ? (n = t[1], e) : e.replace(/^[ \t]+/, (e) => e.replace(/\t/g, " "));
798
+ });
799
+ }
800
+ function Ze(e, t) {
801
+ let n = [], r = 0;
802
+ for (; r < e.length;) {
803
+ let i = e[r];
804
+ if (Fe.test(i)) {
805
+ r += 1;
806
+ continue;
807
+ }
808
+ let a = Ie.exec(i);
809
+ if (a) {
810
+ let t = [], i = r + 1;
811
+ for (; i < e.length;) {
812
+ let n = Ie.exec(e[i]);
813
+ if (n && n[1][0] === a[1][0] && n[1].length >= a[1].length && !n[2]) break;
814
+ t.push(e[i]), i += 1;
815
+ }
816
+ n.push({
817
+ type: "code",
818
+ lang: a[2] || "",
819
+ text: t.join("\n")
820
+ }), r = i + 1;
821
+ continue;
822
+ }
823
+ let o = Le.exec(i);
824
+ if (o) {
825
+ let e = (o[2] ?? "").replace(/[ \t]+#+[ \t]*$/, "");
826
+ n.push({
827
+ type: `h${o[1].length}`,
828
+ parts: Pe(e, t)
829
+ }), r += 1;
830
+ continue;
831
+ }
832
+ if (Re.test(i)) {
833
+ n.push({ type: "divider" }), r += 1;
834
+ continue;
835
+ }
836
+ if (ze.test(i)) {
837
+ let i = [];
838
+ for (; r < e.length;) {
839
+ let t = ze.exec(e[r]);
840
+ if (t) i.push(t[1]);
841
+ else if (!Fe.test(e[r]) && i.length && !Fe.test(i[i.length - 1])) i.push(e[r]);
842
+ else break;
843
+ r += 1;
844
+ }
845
+ let a = Ze(i, t);
846
+ n.push(a.length === 1 && a[0].type === "p" ? {
847
+ type: "quote",
848
+ parts: a[0].parts
849
+ } : {
850
+ type: "quote",
851
+ blocks: a
852
+ });
853
+ continue;
854
+ }
855
+ if (Ke(i)) {
856
+ r = Qe(e, r, n, t);
857
+ continue;
858
+ }
859
+ if (i.includes("|") && r + 1 < e.length && We.test(e[r + 1])) {
860
+ let a = qe(i), o = qe(e[r + 1]).map(Je), s = [a.map((e) => Pe(e, t))], c = r + 2;
861
+ for (; c < e.length && !Fe.test(e[c]) && e[c].includes("|");) {
862
+ let n = qe(e[c]);
863
+ s.push(a.map((e, r) => Pe(n[r] ?? "", t))), c += 1;
864
+ }
865
+ let l = {};
866
+ o.forEach((e, t) => {
867
+ e && s.forEach((n, r) => l[`${r}:${t}`] = { align: e });
868
+ }), n.push({
869
+ type: "table",
870
+ header: !0,
871
+ rows: s,
872
+ cellStyles: l
873
+ }), r = c;
874
+ continue;
875
+ }
876
+ let s = [i];
877
+ for (r += 1; r < e.length && !Fe.test(e[r]);) {
878
+ let i = e[r], a = He.exec(i);
879
+ if (a) {
880
+ n.push({
881
+ type: a[1][0] === "=" ? "h1" : "h2",
882
+ parts: Pe(s.join("\n"), t)
883
+ }), r += 1, s.length = 0;
884
+ break;
885
+ }
886
+ if (Ie.test(i) || Le.test(i) || Re.test(i) || ze.test(i) || Ke(i)) break;
887
+ s.push(i), r += 1;
888
+ }
889
+ s.length && n.push(...Ye(Pe(s.join("\n"), t)));
890
+ }
891
+ return n;
892
+ }
893
+ function Qe(e, t, n, r) {
894
+ let i = Ke(e[t]), a = i.indent, o = [], s = null, c = t;
895
+ for (; c < e.length;) {
896
+ let t = e[c], n = Ke(t);
897
+ if (n && n.indent <= a + 1) {
898
+ if (n.ordered !== i.ordered) break;
899
+ s = { lines: [n.text] }, o.push(s), c += 1;
900
+ continue;
901
+ }
902
+ if (Fe.test(t)) {
903
+ let t = c;
904
+ for (; t < e.length && Fe.test(e[t]);) t += 1;
905
+ if (!(t < e.length && (Ge(e[t]) >= a + 2 || Ke(e[t]) && Ke(e[t]).ordered === i.ordered))) break;
906
+ s?.lines.push(""), c = t;
907
+ continue;
908
+ }
909
+ if (!s) break;
910
+ if (Ge(t) >= a + 2) s.lines.push(t.slice(Math.min(t.length - t.trimStart().length, a + 2)));
911
+ else if (!n) s.lines.push(t.trim());
912
+ else break;
913
+ c += 1;
914
+ }
915
+ return n.push({
916
+ type: i.ordered ? "ol" : "ul",
917
+ ...i.ordered && i.start !== 1 ? { start: i.start } : null,
918
+ items: o.map((e) => {
919
+ let t = Ue.exec(e.lines[0] ?? "");
920
+ t && (e.lines[0] = t[2]);
921
+ let n = Ze(e.lines, r), i = n[0]?.type === "p" ? n.shift() : null;
922
+ return {
923
+ parts: i ? i.parts : [],
924
+ ...n.length ? { blocks: n } : null,
925
+ ...t ? { task: t[1].toLowerCase() === "x" } : null
926
+ };
927
+ })
928
+ }), c;
929
+ }
930
+ function $e(e, t = {}) {
931
+ return String(e ?? "").trim() ? Ze(Xe(e), t) : [];
932
+ }
933
+ //#endregion
934
+ //#region ../ui/src/components/builder/views.jsx
935
+ var Q = t({
669
936
  tenant: "",
670
937
  apiUrl: "/api",
671
938
  locale: "",
672
939
  settings: null
673
- }), xe = t(null), Se = (e) => {
940
+ }), et = t(null), tt = (e) => {
674
941
  let t = Number(e?.__page);
675
942
  if (Number.isFinite(t) && t >= 1) return Math.floor(t);
676
943
  if (typeof window > "u") return 1;
677
944
  let n = Number(new URLSearchParams(window.location.search).get("page"));
678
945
  return Number.isFinite(n) && n >= 1 ? Math.floor(n) : 1;
679
- }, Q = () => {
946
+ }, nt = () => {
680
947
  if (typeof window > "u") return {};
681
948
  let e = {};
682
949
  return new URLSearchParams(window.location.search).forEach((t, n) => {
683
950
  n.startsWith("f_") && n.length > 2 && t !== "" && (e[n.slice(2)] = t);
684
951
  }), e;
685
- }, Ce = (e) => {
952
+ }, rt = (e) => {
686
953
  let t = {
687
954
  ...e && typeof e == "object" && !Array.isArray(e) ? e : {},
688
- ...Q()
955
+ ...nt()
689
956
  };
690
957
  return Object.fromEntries(Object.entries(t).filter(([, e]) => typeof e == "string" && e.trim() !== ""));
691
- }, we = t(null), Te = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
692
- function Ee(e, t) {
958
+ }, it = t(null), at = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
959
+ function ot(e, t) {
693
960
  if (t) return t.includes(".") ? t.split(".").reduce((e, t) => e && typeof e == "object" ? e[t] : void 0, e) : e?.[t];
694
961
  }
695
- var De = (e) => {
962
+ var st = (e) => {
696
963
  let t = [];
697
964
  for (let [n, r] of Object.entries(e ?? {})) {
698
965
  if (!/^[\w-]+$/.test(n)) continue;
@@ -702,39 +969,39 @@ var De = (e) => {
702
969
  }
703
970
  return t;
704
971
  };
705
- function Oe(e) {
972
+ function ct(e) {
706
973
  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(" ") : "";
707
974
  }
708
- function ke(e, t) {
709
- let n = t?.data ?? {}, r = De(n);
975
+ function lt(e, t) {
976
+ let n = t?.data ?? {}, r = st(n);
710
977
  if (!r.length) return e;
711
- let i = RegExp(`:(${r.map(Te).sort((e, t) => t.length - e.length).join("|")})`, "g"), a = (e) => typeof e == "string" ? e.replace(i, (e, t) => Oe(Ee(n, t))) : Array.isArray(e) ? e.map(a) : e && typeof e == "object" ? Object.fromEntries(Object.entries(e).map(([e, t]) => [e, a(t)])) : e;
978
+ let i = RegExp(`:(${r.map(at).sort((e, t) => t.length - e.length).join("|")})`, "g"), a = (e) => typeof e == "string" ? e.replace(i, (e, t) => ct(ot(n, t))) : Array.isArray(e) ? e.map(a) : e && typeof e == "object" ? Object.fromEntries(Object.entries(e).map(([e, t]) => [e, a(t)])) : e;
712
979
  return a(e);
713
980
  }
714
- var Ae = {
981
+ var ut = {
715
982
  margin: 0,
716
983
  fontWeight: 700,
717
984
  lineHeight: 1.2,
718
985
  fontFamily: "var(--page-heading-font, inherit)"
719
- }, je = q, Me = (e) => `var(--page-${e}, ${q[e] ?? q.h2}px)`, Ne = {
986
+ }, dt = q, ft = (e) => `var(--page-${e}, ${q[e] ?? q.h2}px)`, pt = {
720
987
  margin: 0,
721
988
  fontSize: "var(--page-body-size, 16px)"
722
- }, Pe = {
989
+ }, mt = {
723
990
  display: "inline-block",
724
991
  textDecoration: "none",
725
992
  cursor: "pointer",
726
993
  backgroundColor: "var(--page-accent, #111827)",
727
994
  color: "var(--page-accent-text, #ffffff)"
728
- }, Fe = {
995
+ }, ht = {
729
996
  flexGrow: 1,
730
997
  display: "flex",
731
998
  flexDirection: "column",
732
999
  position: "relative"
733
- }, Ie = {
1000
+ }, gt = {
734
1001
  display: "flex",
735
1002
  flexDirection: "column"
736
1003
  };
737
- function Le({ style: e }) {
1004
+ function _t({ style: e }) {
738
1005
  let t = e?.backgroundVideo;
739
1006
  if (!t) return null;
740
1007
  let n = {
@@ -760,7 +1027,7 @@ function Le({ style: e }) {
760
1027
  background: r
761
1028
  } })] });
762
1029
  }
763
- var Re = (e, t) => e?.backgroundVideo ? {
1030
+ var vt = (e, t) => e?.backgroundVideo ? {
764
1031
  position: "relative",
765
1032
  ...t,
766
1033
  ...A(e)
@@ -768,24 +1035,24 @@ var Re = (e, t) => e?.backgroundVideo ? {
768
1035
  ...t,
769
1036
  ...A(e)
770
1037
  };
771
- function ze({ style: e, nodeRef: t, children: n }) {
1038
+ function yt({ style: e, nodeRef: t, children: n }) {
772
1039
  return /* @__PURE__ */ d("div", {
773
1040
  ref: t,
774
1041
  style: {
775
- ...Fe,
1042
+ ...ht,
776
1043
  ...A(e)
777
1044
  },
778
- children: [/* @__PURE__ */ u(Le, { style: e }), n]
1045
+ children: [/* @__PURE__ */ u(_t, { style: e }), n]
779
1046
  });
780
1047
  }
781
- function Be({ style: e, nodeRef: t, children: n }) {
1048
+ function bt({ style: e, nodeRef: t, children: n }) {
782
1049
  return /* @__PURE__ */ d("section", {
783
1050
  ref: t,
784
- style: Re(e, Ie),
785
- children: [/* @__PURE__ */ u(Le, { style: e }), n]
1051
+ style: vt(e, gt),
1052
+ children: [/* @__PURE__ */ u(_t, { style: e }), n]
786
1053
  });
787
1054
  }
788
- function Ve({ style: e, freeLayout: t, nodeRef: n, children: r }) {
1055
+ function xt({ style: e, freeLayout: t, nodeRef: n, children: r }) {
789
1056
  let i = t ? {
790
1057
  position: "relative",
791
1058
  minHeight: 240
@@ -794,33 +1061,56 @@ function Ve({ style: e, freeLayout: t, nodeRef: n, children: r }) {
794
1061
  ref: n,
795
1062
  style: i ? {
796
1063
  ...i,
797
- ...Re(e)
798
- } : Re(e),
799
- children: [/* @__PURE__ */ u(Le, { style: e }), r]
1064
+ ...vt(e)
1065
+ } : vt(e),
1066
+ children: [/* @__PURE__ */ u(_t, { style: e }), r]
1067
+ });
1068
+ }
1069
+ function St({ href: e, target: t, style: n, nodeRef: r, children: i }) {
1070
+ return /* @__PURE__ */ d("a", {
1071
+ ref: r,
1072
+ href: e || "#",
1073
+ target: t || void 0,
1074
+ rel: t === "_blank" ? "noopener noreferrer" : void 0,
1075
+ style: {
1076
+ ...Ut,
1077
+ ...vt(n)
1078
+ },
1079
+ children: [/* @__PURE__ */ u(_t, { style: n }), i]
800
1080
  });
801
1081
  }
802
- function He({ text: e, parts: t, tag: n = "h2", style: r, linked: i, nodeRef: a }) {
1082
+ function Ct({ text: e, parts: t, tag: n = "h2", style: r, linked: i, nodeRef: a }) {
803
1083
  return /* @__PURE__ */ u(n, {
804
1084
  ref: a,
805
1085
  style: {
806
- ...Ae,
807
- fontSize: Me(n),
1086
+ ...ut,
1087
+ fontSize: ft(n),
808
1088
  ...A(r)
809
1089
  },
810
- children: Ge(t, e, i)
1090
+ children: Dt(t, e, i)
811
1091
  });
812
1092
  }
813
- var Ue = {
814
- fontFamily: oe.mono.value,
1093
+ var wt = {
1094
+ fontFamily: se.mono.value,
815
1095
  background: "rgba(148, 163, 184, 0.18)",
816
1096
  padding: "1px 5px",
817
1097
  borderRadius: 4,
818
1098
  fontSize: "0.9em"
1099
+ }, Tt = {
1100
+ fontFamily: se.mono.value,
1101
+ background: "rgba(148, 163, 184, 0.16)",
1102
+ border: "1px solid rgba(148, 163, 184, 0.3)",
1103
+ borderRadius: 6,
1104
+ padding: "12px 14px",
1105
+ fontSize: "0.875em",
1106
+ lineHeight: 1.55,
1107
+ overflowX: "auto",
1108
+ whiteSpace: "pre"
819
1109
  };
820
- function We(e, t = [], n, r) {
1110
+ function Et(e, t = [], n, r) {
821
1111
  let i = e;
822
1112
  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", {
823
- style: Ue,
1113
+ style: wt,
824
1114
  children: i
825
1115
  })), 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", {
826
1116
  href: n,
@@ -836,13 +1126,22 @@ function We(e, t = [], n, r) {
836
1126
  children: i
837
1127
  })), i;
838
1128
  }
839
- function Ge(t, n, r) {
1129
+ function Dt(t, n, r) {
840
1130
  return t?.length ? t.map((t, n) => {
841
1131
  if (t.slot) return /* @__PURE__ */ u(e, { children: r?.[t.slot] ?? null }, n);
842
- if (t.parts) return /* @__PURE__ */ u(e, { children: Ge(t.parts, "", r) }, n);
1132
+ if (t.parts) return /* @__PURE__ */ u(e, { children: Dt(t.parts, "", r) }, n);
1133
+ if (t.br) return /* @__PURE__ */ u("br", {}, n);
843
1134
  let i = t.text;
844
- return t.sup ? i = /* @__PURE__ */ u("sup", { children: i }) : t.sub && (i = /* @__PURE__ */ u("sub", { children: i })), t.code && (i = /* @__PURE__ */ u("code", {
845
- style: Ue,
1135
+ return t.image && (i = /* @__PURE__ */ u("img", {
1136
+ src: t.image.src,
1137
+ alt: t.image.alt || "",
1138
+ title: t.image.title || void 0,
1139
+ style: {
1140
+ maxWidth: "100%",
1141
+ verticalAlign: "middle"
1142
+ }
1143
+ })), t.sup ? i = /* @__PURE__ */ u("sup", { children: i }) : t.sub && (i = /* @__PURE__ */ u("sub", { children: i })), t.code && (i = /* @__PURE__ */ u("code", {
1144
+ style: wt,
846
1145
  children: i
847
1146
  })), 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", {
848
1147
  style: {
@@ -865,35 +1164,35 @@ function Ge(t, n, r) {
865
1164
  })), /* @__PURE__ */ u(e, { children: i }, n);
866
1165
  }) : n;
867
1166
  }
868
- function Ke({ parts: e, text: t, marks: n, href: r, target: i, style: a }) {
1167
+ function Ot({ parts: e, text: t, marks: n, href: r, target: i, style: a }) {
869
1168
  return /* @__PURE__ */ u("span", {
870
1169
  style: A(a),
871
- children: e?.length ? Ge(e, t) : We(t, n, r, i)
1170
+ children: e?.length ? Dt(e, t) : Et(t, n, r, i)
872
1171
  });
873
1172
  }
874
- var qe = [
1173
+ var kt = [
875
1174
  "left",
876
1175
  "center",
877
1176
  "right",
878
1177
  "justify"
879
1178
  ];
880
- function Je(e, t, n) {
1179
+ function At(e, t, n) {
881
1180
  let r = e && e.cellStyles;
882
1181
  if (!r || typeof r != "object" || Array.isArray(r)) return {};
883
1182
  let i = r[`${t}:${n}`];
884
1183
  return i && typeof i == "object" && !Array.isArray(i) ? i : {};
885
1184
  }
886
- function Ye(e, t) {
1185
+ function jt(e, t) {
887
1186
  let n = e || {}, r = typeof n.bold == "boolean" ? n.bold : !!t;
888
1187
  return {
889
- textAlign: qe.includes(n.align) ? n.align : "left",
1188
+ textAlign: kt.includes(n.align) ? n.align : "left",
890
1189
  fontWeight: r ? 700 : 400,
891
1190
  fontStyle: n.italic ? "italic" : void 0,
892
1191
  color: typeof n.color == "string" && n.color ? n.color : void 0,
893
1192
  backgroundColor: typeof n.bg == "string" && n.bg ? n.bg : void 0
894
1193
  };
895
1194
  }
896
- function Xe({ align: e = "center", width: t, wrap: n } = {}) {
1195
+ function Mt({ align: e = "center", width: t, wrap: n } = {}) {
897
1196
  let r = t ? `${t}%` : void 0;
898
1197
  if (e === "full") return { width: "100%" };
899
1198
  let i = e === "left" || e === "right";
@@ -927,18 +1226,48 @@ function Xe({ align: e = "center", width: t, wrap: n } = {}) {
927
1226
  marginRight: "auto"
928
1227
  };
929
1228
  }
930
- function Ze(e = [], t, n) {
931
- let r = n ?? ((e, n) => Ge(e, n, t));
932
- return e.map((t, n) => {
933
- let i = {
1229
+ var Nt = {
1230
+ red: "#e03131",
1231
+ orange: "#e8590c",
1232
+ yellow: "#c98a00",
1233
+ blue: "#1c7ed6",
1234
+ purple: "#7048e8",
1235
+ pink: "#d6336c",
1236
+ green: "#2f9e44",
1237
+ grey: "#868e96"
1238
+ }, Pt = {
1239
+ red: "rgba(224, 49, 49, 0.12)",
1240
+ orange: "rgba(232, 89, 12, 0.12)",
1241
+ yellow: "rgba(201, 138, 0, 0.15)",
1242
+ blue: "rgba(28, 126, 214, 0.12)",
1243
+ purple: "rgba(112, 72, 232, 0.12)",
1244
+ pink: "rgba(214, 51, 108, 0.12)",
1245
+ green: "rgba(47, 158, 68, 0.12)",
1246
+ grey: "rgba(134, 142, 150, 0.16)"
1247
+ };
1248
+ function Ft(e) {
1249
+ let t = Nt[e?.color] ?? (e?.color || ""), n = Pt[e?.background] ?? (e?.background || "");
1250
+ return {
1251
+ ...t && { color: t },
1252
+ ...n && {
1253
+ backgroundColor: n,
1254
+ padding: "8px 12px",
1255
+ borderRadius: "8px"
1256
+ }
1257
+ };
1258
+ }
1259
+ function It(e = [], t, n) {
1260
+ let r = n ?? ((e, n) => Dt(e, n, t));
1261
+ return e.map((n, i) => {
1262
+ let a = {
934
1263
  marginTop: 0,
935
- marginBottom: n === e.length - 1 ? 0 : 14
1264
+ marginBottom: i === e.length - 1 ? 0 : 14
936
1265
  };
937
- if (t.type === "image") {
938
- if (!t.src) return null;
1266
+ if (n.type === "image") {
1267
+ if (!n.src) return null;
939
1268
  let e = /* @__PURE__ */ u("img", {
940
- src: t.src,
941
- alt: t.alt || "",
1269
+ src: n.src,
1270
+ alt: n.alt || "",
942
1271
  style: {
943
1272
  width: "100%",
944
1273
  display: "block",
@@ -949,51 +1278,51 @@ function Ze(e = [], t, n) {
949
1278
  style: {
950
1279
  marginLeft: 0,
951
1280
  marginRight: 0,
952
- ...i,
953
- ...Xe(t)
1281
+ ...a,
1282
+ ...Mt(n)
954
1283
  },
955
- children: [t.href ? /* @__PURE__ */ u("a", {
956
- href: t.href,
957
- target: t.target || void 0,
958
- rel: t.target === "_blank" ? "noopener noreferrer" : void 0,
1284
+ children: [n.href ? /* @__PURE__ */ u("a", {
1285
+ href: n.href,
1286
+ target: n.target || void 0,
1287
+ rel: n.target === "_blank" ? "noopener noreferrer" : void 0,
959
1288
  style: { display: "block" },
960
1289
  children: e
961
- }) : e, t.caption && /* @__PURE__ */ u("figcaption", {
1290
+ }) : e, n.caption && /* @__PURE__ */ u("figcaption", {
962
1291
  style: {
963
1292
  fontSize: 13,
964
1293
  opacity: .65,
965
1294
  marginTop: 6,
966
1295
  textAlign: "center"
967
1296
  },
968
- children: t.caption
1297
+ children: n.caption
969
1298
  })]
970
- }, n);
1299
+ }, i);
971
1300
  }
972
- if (t.type === "video") return ct(t.url) ? /* @__PURE__ */ u("div", {
1301
+ if (n.type === "video") return Yt(n.url) ? /* @__PURE__ */ u("div", {
973
1302
  style: {
974
- ...i,
975
- ...Xe({
976
- align: t.align,
977
- wrap: t.wrap,
978
- width: t.width ?? 100
1303
+ ...a,
1304
+ ...Mt({
1305
+ align: n.align,
1306
+ wrap: n.wrap,
1307
+ width: n.width ?? 100
979
1308
  })
980
1309
  },
981
- children: /* @__PURE__ */ u(lt, {
982
- url: t.url,
983
- autoplay: t.autoplay,
984
- muted: t.muted,
985
- loop: t.loop,
986
- controls: t.controls ?? !0,
987
- start: t.start
1310
+ children: /* @__PURE__ */ u(Xt, {
1311
+ url: n.url,
1312
+ autoplay: n.autoplay,
1313
+ muted: n.muted,
1314
+ loop: n.loop,
1315
+ controls: n.controls ?? !0,
1316
+ start: n.start
988
1317
  })
989
- }, n) : null;
990
- if (t.type === "button") {
991
- if (!(typeof t.label == "string" && t.label.trim())) return null;
992
- let e = Number.isFinite(Number(t.radius)) ? Number(t.radius) : 8, r = ["center", "right"].includes(t.align) ? t.align : "left";
1318
+ }, i) : null;
1319
+ if (n.type === "button") {
1320
+ if (!(typeof n.label == "string" && n.label.trim())) return null;
1321
+ let e = Number.isFinite(Number(n.radius)) ? Number(n.radius) : 8, t = ["center", "right"].includes(n.align) ? n.align : "left";
993
1322
  return /* @__PURE__ */ u("div", {
994
1323
  style: {
995
- ...i,
996
- textAlign: r
1324
+ ...a,
1325
+ textAlign: t
997
1326
  },
998
1327
  children: /* @__PURE__ */ u("table", {
999
1328
  role: "presentation",
@@ -1005,132 +1334,204 @@ function Ze(e = [], t, n) {
1005
1334
  },
1006
1335
  children: /* @__PURE__ */ u("tbody", { children: /* @__PURE__ */ u("tr", { children: /* @__PURE__ */ u("td", {
1007
1336
  style: {
1008
- backgroundColor: t.bg || "var(--page-accent, #4f46e5)",
1337
+ backgroundColor: n.bg || "var(--page-accent, #4f46e5)",
1009
1338
  borderRadius: e
1010
1339
  },
1011
1340
  children: /* @__PURE__ */ u("a", {
1012
- href: t.href || "#",
1013
- target: t.target || void 0,
1014
- rel: t.target === "_blank" ? "noopener noreferrer" : void 0,
1341
+ href: n.href || "#",
1342
+ target: n.target || void 0,
1343
+ rel: n.target === "_blank" ? "noopener noreferrer" : void 0,
1015
1344
  style: {
1016
1345
  display: "inline-block",
1017
1346
  padding: "13px 24px",
1018
- color: t.color || "#ffffff",
1347
+ color: n.color || "#ffffff",
1019
1348
  fontSize: 15,
1020
1349
  fontWeight: 600,
1021
1350
  lineHeight: 1.2,
1022
1351
  textDecoration: "none",
1023
1352
  borderRadius: e
1024
1353
  },
1025
- children: t.label
1354
+ children: n.label
1026
1355
  })
1027
1356
  }) }) })
1028
1357
  })
1029
- }, n);
1358
+ }, i);
1030
1359
  }
1031
- if (t.type === "divider") return /* @__PURE__ */ u("hr", { style: {
1032
- ...i,
1360
+ if (n.type === "divider") return /* @__PURE__ */ u("hr", { style: {
1361
+ ...a,
1033
1362
  border: 0,
1034
1363
  borderTop: "1px solid rgba(148, 163, 184, 0.4)"
1035
- } }, n);
1036
- if (t.type === "table") {
1037
- let e = Array.isArray(t.rows) ? t.rows.filter(Array.isArray) : [];
1364
+ } }, i);
1365
+ if (n.type === "table") {
1366
+ let e = Array.isArray(n.rows) ? n.rows.filter(Array.isArray) : [];
1038
1367
  if (!e.length) return null;
1039
- let r = t.header !== !1, a = {
1040
- border: t.borders === !1 ? void 0 : "1px solid rgba(148, 163, 184, 0.4)",
1041
- padding: "6px 10px",
1368
+ let t = n.header !== !1, o = n.borders === !1 ? void 0 : "1px solid rgba(148, 163, 184, 0.4)", s = Number.isFinite(n.padX) ? Math.max(0, n.padX) : 10, c = Number.isFinite(n.padY) ? Math.max(0, n.padY) : 6, l = Math.max(0, Number(n.spacing) || 0), f = {
1369
+ border: o,
1370
+ padding: `${c}px ${s}px`,
1042
1371
  verticalAlign: "top"
1043
- }, o = r ? e.slice(1) : e, s = Array.isArray(t.widths) ? t.widths : null, c = (e, n, r) => ({
1044
- ...a,
1045
- ...Ye(Je(t, e, n), r)
1046
- });
1372
+ }, p = Array.isArray(n.heights) ? n.heights : null, m = (e) => {
1373
+ let t = Number(p?.[e]);
1374
+ return Number.isFinite(t) && t > 0 ? { height: `${t}px` } : void 0;
1375
+ }, h = t ? e.slice(1) : e, g = Array.isArray(n.widths) ? n.widths : null, _ = (e, t, r) => ({
1376
+ ...f,
1377
+ ...jt(At(n, e, t), r)
1378
+ }), v = n.spans && typeof n.spans == "object" ? n.spans : null, y = /* @__PURE__ */ new Set();
1379
+ v && e.forEach((e, t) => e.forEach((e, n) => {
1380
+ let r = v[`${t}:${n}`];
1381
+ if (!r) return;
1382
+ let i = Math.max(1, Number(r.c) || 1), a = Math.max(1, Number(r.r) || 1);
1383
+ for (let e = 0; e < a; e += 1) for (let r = 0; r < i; r += 1) (e || r) && y.add(`${t + e}:${n + r}`);
1384
+ }));
1385
+ let b = (e, t) => {
1386
+ let n = v?.[`${e}:${t}`], r = Math.max(1, Number(n?.c) || 1), i = Math.max(1, Number(n?.r) || 1);
1387
+ return {
1388
+ colSpan: r > 1 ? r : void 0,
1389
+ rowSpan: i > 1 ? i : void 0
1390
+ };
1391
+ };
1047
1392
  return /* @__PURE__ */ d("table", {
1048
1393
  style: {
1049
- ...i,
1050
- borderCollapse: "collapse",
1394
+ ...a,
1395
+ borderCollapse: l ? "separate" : "collapse",
1396
+ borderSpacing: l ? `${l}px` : void 0,
1051
1397
  width: "100%",
1052
1398
  fontSize: "inherit",
1053
- tableLayout: s ? "fixed" : void 0
1399
+ tableLayout: g ? "fixed" : void 0
1054
1400
  },
1055
1401
  children: [
1056
- s && /* @__PURE__ */ u("colgroup", { children: s.map((e, t) => /* @__PURE__ */ u("col", { style: { width: `${e}%` } }, t)) }),
1057
- r && /* @__PURE__ */ u("thead", { children: /* @__PURE__ */ u("tr", { children: e[0].map((e, t) => /* @__PURE__ */ u("th", {
1058
- style: c(0, t, !0),
1059
- children: e
1060
- }, t)) }) }),
1061
- /* @__PURE__ */ u("tbody", { children: o.map((e, t) => /* @__PURE__ */ u("tr", { children: e.map((e, n) => /* @__PURE__ */ u("td", {
1062
- style: c(r ? t + 1 : t, n, !1),
1063
- children: e
1064
- }, n)) }, t)) })
1402
+ g && /* @__PURE__ */ u("colgroup", { children: g.map((e, t) => /* @__PURE__ */ u("col", { style: { width: `${e}%` } }, t)) }),
1403
+ t && /* @__PURE__ */ u("thead", { children: /* @__PURE__ */ u("tr", {
1404
+ style: m(0),
1405
+ children: e[0].map((e, t) => y.has(`0:${t}`) ? null : /* @__PURE__ */ u("th", {
1406
+ style: _(0, t, !0),
1407
+ ...b(0, t),
1408
+ children: Array.isArray(e) ? r(e) : e
1409
+ }, t))
1410
+ }) }),
1411
+ /* @__PURE__ */ u("tbody", { children: h.map((e, n) => /* @__PURE__ */ u("tr", {
1412
+ style: m(t ? n + 1 : n),
1413
+ children: e.map((e, i) => {
1414
+ let a = t ? n + 1 : n;
1415
+ return y.has(`${a}:${i}`) ? null : /* @__PURE__ */ u("td", {
1416
+ style: _(a, i, !1),
1417
+ ...b(a, i),
1418
+ children: Array.isArray(e) ? r(e) : e
1419
+ }, i);
1420
+ })
1421
+ }, n)) })
1065
1422
  ]
1066
- }, n);
1423
+ }, i);
1067
1424
  }
1068
- if (t.type === "ul" || t.type === "ol") {
1069
- let e = t.type;
1425
+ if (n.type === "ul" || n.type === "ol") {
1426
+ let e = n.type;
1070
1427
  return /* @__PURE__ */ u(e, {
1071
1428
  style: {
1072
- ...i,
1073
- paddingLeft: 24
1429
+ ...a,
1430
+ ...Ft(n),
1431
+ paddingLeft: n.background ? 34 : 24
1074
1432
  },
1075
- children: (t.items ?? []).map((e, t) => /* @__PURE__ */ u("li", {
1076
- style: { marginBottom: 4 },
1077
- children: r(e.parts, e.text)
1078
- }, t))
1079
- }, n);
1433
+ start: n.type === "ol" ? n.start : void 0,
1434
+ children: (n.items ?? []).map((e, n) => {
1435
+ let i = typeof e.task == "boolean";
1436
+ return /* @__PURE__ */ d("li", {
1437
+ style: {
1438
+ marginBottom: 4,
1439
+ ...i && {
1440
+ listStyleType: "none",
1441
+ marginLeft: -18
1442
+ }
1443
+ },
1444
+ children: [
1445
+ i && /* @__PURE__ */ u("span", {
1446
+ style: { marginRight: 6 },
1447
+ children: e.task ? "☑" : "☐"
1448
+ }),
1449
+ r(e.parts, e.text),
1450
+ e.blocks?.length ? It(e.blocks, t, r) : null
1451
+ ]
1452
+ }, n);
1453
+ })
1454
+ }, i);
1080
1455
  }
1081
- if (t.type === "quote") return /* @__PURE__ */ u("blockquote", {
1456
+ if (n.type === "quote") return /* @__PURE__ */ u("blockquote", {
1082
1457
  style: {
1083
- ...$e,
1084
- ...i
1458
+ ...zt,
1459
+ ...a,
1460
+ ...Ft(n),
1461
+ ...n.background && { paddingLeft: 20 }
1085
1462
  },
1086
- children: r(t.parts, t.text)
1087
- }, n);
1088
- if (je[t.type]) {
1089
- let e = t.type;
1463
+ children: n.blocks?.length ? It(n.blocks, t, r) : r(n.parts, n.text)
1464
+ }, i);
1465
+ if (n.type === "code") return /* @__PURE__ */ u("pre", {
1466
+ "data-lang": n.lang || void 0,
1467
+ style: {
1468
+ ...a,
1469
+ ...Tt
1470
+ },
1471
+ children: /* @__PURE__ */ u("code", {
1472
+ style: { fontFamily: "inherit" },
1473
+ children: n.text
1474
+ })
1475
+ }, i);
1476
+ if (dt[n.type]) {
1477
+ let e = n.type;
1090
1478
  return /* @__PURE__ */ u(e, {
1091
1479
  style: {
1092
- ...Ae,
1093
- fontSize: Me(t.type),
1094
- ...i
1480
+ ...ut,
1481
+ fontSize: ft(n.type),
1482
+ ...a,
1483
+ ...Ft(n)
1095
1484
  },
1096
- children: r(t.parts, t.text)
1097
- }, n);
1485
+ children: r(n.parts, n.text)
1486
+ }, i);
1098
1487
  }
1099
1488
  return /* @__PURE__ */ u("p", {
1100
1489
  style: {
1101
- ...Ne,
1102
- ...i
1490
+ ...pt,
1491
+ ...a,
1492
+ ...Ft(n)
1103
1493
  },
1104
- children: r(t.parts, t.text)
1105
- }, n);
1494
+ children: r(n.parts, n.text)
1495
+ }, i);
1106
1496
  });
1107
1497
  }
1108
- function Qe({ content: e, style: t, linked: n, nodeRef: r }) {
1498
+ function Lt({ content: e, style: t, linked: n, nodeRef: r }) {
1109
1499
  return /* @__PURE__ */ u("div", {
1110
1500
  ref: r,
1111
1501
  style: {
1112
1502
  display: "flow-root",
1113
1503
  ...A(t)
1114
1504
  },
1115
- children: Ze(e, n)
1505
+ children: It(e, n)
1116
1506
  });
1117
1507
  }
1118
- var $e = {
1508
+ function Rt({ markdown: e, newTab: t, style: n, nodeRef: r }) {
1509
+ let i = o(() => $e(e, { newTab: t }), [e, t]);
1510
+ return /* @__PURE__ */ u("div", {
1511
+ ref: r,
1512
+ style: {
1513
+ display: "flow-root",
1514
+ ...A(n)
1515
+ },
1516
+ children: It(i)
1517
+ });
1518
+ }
1519
+ var zt = {
1119
1520
  margin: 0,
1120
1521
  padding: "8px 0 8px 20px",
1121
1522
  borderLeft: "4px solid var(--page-accent, rgba(148, 163, 184, 0.6))"
1122
1523
  };
1123
- function et({ text: e, parts: t, style: n, linked: r, nodeRef: i }) {
1524
+ function Bt({ text: e, parts: t, style: n, linked: r, nodeRef: i }) {
1124
1525
  return /* @__PURE__ */ u("blockquote", {
1125
1526
  ref: i,
1126
1527
  style: {
1127
- ...$e,
1528
+ ...zt,
1128
1529
  ...A(n)
1129
1530
  },
1130
- children: Ge(t, e, r)
1531
+ children: Dt(t, e, r)
1131
1532
  });
1132
1533
  }
1133
- function tt({ ordered: e, items: t = [], style: n, nodeRef: r }) {
1534
+ function Vt({ ordered: e, items: t = [], style: n, nodeRef: r }) {
1134
1535
  return /* @__PURE__ */ u(e ? "ol" : "ul", {
1135
1536
  ref: r,
1136
1537
  style: {
@@ -1140,53 +1541,58 @@ function tt({ ordered: e, items: t = [], style: n, nodeRef: r }) {
1140
1541
  },
1141
1542
  children: t.map((e, t) => /* @__PURE__ */ u("li", {
1142
1543
  style: { marginBottom: 4 },
1143
- children: Ge(e.parts, e.text)
1544
+ children: Dt(e.parts, e.text)
1144
1545
  }, t))
1145
1546
  });
1146
1547
  }
1147
- function nt({ text: e, parts: t, style: n, linked: r, nodeRef: i }) {
1548
+ function Ht({ text: e, parts: t, style: n, linked: r, nodeRef: i }) {
1148
1549
  return /* @__PURE__ */ u("p", {
1149
1550
  ref: i,
1150
1551
  style: {
1151
- ...Ne,
1552
+ ...pt,
1152
1553
  ...A(n)
1153
1554
  },
1154
- children: Ge(t, e, r)
1555
+ children: Dt(t, e, r)
1155
1556
  });
1156
1557
  }
1157
- var rt = {
1558
+ var Ut = {
1559
+ display: "block",
1560
+ color: "inherit",
1561
+ textDecoration: "none",
1562
+ cursor: "pointer"
1563
+ }, Wt = {
1158
1564
  color: "var(--page-accent, inherit)",
1159
1565
  textDecoration: "underline",
1160
1566
  textUnderlineOffset: 3,
1161
1567
  cursor: "pointer"
1162
1568
  };
1163
- function it({ text: e, parts: t, href: n, target: r, style: i, linked: a, nodeRef: o }) {
1569
+ function Gt({ text: e, parts: t, href: n, target: r, style: i, linked: a, nodeRef: o }) {
1164
1570
  return /* @__PURE__ */ u("a", {
1165
1571
  ref: o,
1166
1572
  href: n || "#",
1167
1573
  target: r || void 0,
1168
1574
  rel: r === "_blank" ? "noopener noreferrer" : void 0,
1169
1575
  style: {
1170
- ...rt,
1576
+ ...Wt,
1171
1577
  ...A(i)
1172
1578
  },
1173
- children: Ge(t, e, a)
1579
+ children: Dt(t, e, a)
1174
1580
  });
1175
1581
  }
1176
- function at({ text: e, parts: t, href: n, target: r, style: i, linked: a, nodeRef: o }) {
1582
+ function Kt({ text: e, parts: t, href: n, target: r, style: i, linked: a, nodeRef: o }) {
1177
1583
  return /* @__PURE__ */ u("a", {
1178
1584
  ref: o,
1179
1585
  href: n || "#",
1180
1586
  target: r || void 0,
1181
1587
  rel: r === "_blank" ? "noopener noreferrer" : void 0,
1182
1588
  style: {
1183
- ...Pe,
1589
+ ...mt,
1184
1590
  ...A(i)
1185
1591
  },
1186
- children: Ge(t, e, a)
1592
+ children: Dt(t, e, a)
1187
1593
  });
1188
1594
  }
1189
- function ot({ src: e, alt: t, style: n, nodeRef: r }) {
1595
+ function qt({ src: e, alt: t, style: n, nodeRef: r }) {
1190
1596
  return e ? /* @__PURE__ */ u("img", {
1191
1597
  ref: r,
1192
1598
  src: e,
@@ -1198,7 +1604,7 @@ function ot({ src: e, alt: t, style: n, nodeRef: r }) {
1198
1604
  }
1199
1605
  }) : null;
1200
1606
  }
1201
- function st({ src: e, poster: t, controls: n = !0, autoplay: r = !1, loop: i = !1, muted: a = !1, style: o, nodeRef: s }) {
1607
+ function Jt({ src: e, poster: t, controls: n = !0, autoplay: r = !1, loop: i = !1, muted: a = !1, style: o, nodeRef: s }) {
1202
1608
  return e ? /* @__PURE__ */ u("video", {
1203
1609
  ref: s,
1204
1610
  src: e,
@@ -1216,9 +1622,9 @@ function st({ src: e, poster: t, controls: n = !0, autoplay: r = !1, loop: i = !
1216
1622
  }
1217
1623
  }) : null;
1218
1624
  }
1219
- var ct = (e = "") => (e.match(/(?:youtu\.be\/|v=|embed\/|shorts\/|live\/)([\w-]{11})/) || e.match(/^([\w-]{11})$/))?.[1];
1220
- function lt({ url: e, autoplay: t = !1, muted: n = !1, loop: r = !1, controls: i = !0, start: a, style: o, nodeRef: s }) {
1221
- let c = ct(e);
1625
+ var Yt = (e = "") => (e.match(/(?:youtu\.be\/|v=|embed\/|shorts\/|live\/)([\w-]{11})/) || e.match(/^([\w-]{11})$/))?.[1];
1626
+ function Xt({ url: e, autoplay: t = !1, muted: n = !1, loop: r = !1, controls: i = !0, start: a, style: o, nodeRef: s }) {
1627
+ let c = Yt(e);
1222
1628
  if (!c) return null;
1223
1629
  let l = new URLSearchParams({ rel: "0" });
1224
1630
  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", {
@@ -1244,7 +1650,7 @@ function lt({ url: e, autoplay: t = !1, muted: n = !1, loop: r = !1, controls: i
1244
1650
  })
1245
1651
  });
1246
1652
  }
1247
- function ut({ src: e, title: t, allowFullscreen: n = !0, style: r, nodeRef: i }) {
1653
+ function Zt({ src: e, title: t, allowFullscreen: n = !0, style: r, nodeRef: i }) {
1248
1654
  return e ? /* @__PURE__ */ u("iframe", {
1249
1655
  ref: i,
1250
1656
  src: e,
@@ -1260,15 +1666,15 @@ function ut({ src: e, title: t, allowFullscreen: n = !0, style: r, nodeRef: i })
1260
1666
  }
1261
1667
  }) : null;
1262
1668
  }
1263
- var dt = /(^|[\s,>+~{}])(:root|html|body)(?=$|[\s,{.:#[>+~])/g;
1264
- function ft(e) {
1265
- return `@scope ([data-wb-embed]) {\n${e.replace(dt, "$1:scope")}\n}`;
1669
+ var Qt = /(^|[\s,>+~{}])(:root|html|body)(?=$|[\s,{.:#[>+~])/g;
1670
+ function $t(e) {
1671
+ return `@scope ([data-wb-embed]) {\n${e.replace(Qt, "$1:scope")}\n}`;
1266
1672
  }
1267
- function pt({ code: e, runScripts: t = !0, scopeStyles: n = !1, style: r, nodeRef: a }) {
1673
+ function en({ code: e, runScripts: t = !0, scopeStyles: n = !1, style: r, nodeRef: a }) {
1268
1674
  let [o, s] = c(null);
1269
1675
  return i(() => {
1270
1676
  o && (o.innerHTML = e || "", n ? (o.setAttribute("data-wb-embed", ""), o.querySelectorAll("style").forEach((e) => {
1271
- e.textContent = ft(e.textContent || "");
1677
+ e.textContent = $t(e.textContent || "");
1272
1678
  })) : o.removeAttribute("data-wb-embed"), t && o.querySelectorAll("script").forEach((e) => {
1273
1679
  let t = document.createElement("script");
1274
1680
  for (let { name: n, value: r } of e.attributes) t.setAttribute(n, r);
@@ -1286,7 +1692,7 @@ function pt({ code: e, runScripts: t = !0, scopeStyles: n = !1, style: r, nodeRe
1286
1692
  style: A(r)
1287
1693
  });
1288
1694
  }
1289
- function mt({ height: e, style: t, nodeRef: n }) {
1695
+ function tn({ height: e, style: t, nodeRef: n }) {
1290
1696
  return /* @__PURE__ */ u("div", {
1291
1697
  ref: n,
1292
1698
  style: {
@@ -1297,7 +1703,7 @@ function mt({ height: e, style: t, nodeRef: n }) {
1297
1703
  }
1298
1704
  });
1299
1705
  }
1300
- function ht({ style: e, nodeRef: t }) {
1706
+ function nn({ style: e, nodeRef: t }) {
1301
1707
  return /* @__PURE__ */ u("div", {
1302
1708
  ref: t,
1303
1709
  style: {
@@ -1308,7 +1714,7 @@ function ht({ style: e, nodeRef: t }) {
1308
1714
  }
1309
1715
  });
1310
1716
  }
1311
- function gt({ style: e, nodeRef: t }) {
1717
+ function rn({ style: e, nodeRef: t }) {
1312
1718
  return /* @__PURE__ */ u("div", {
1313
1719
  ref: t,
1314
1720
  style: {
@@ -1317,7 +1723,7 @@ function gt({ style: e, nodeRef: t }) {
1317
1723
  }
1318
1724
  });
1319
1725
  }
1320
- var _t = {
1726
+ var an = {
1321
1727
  position: "absolute",
1322
1728
  top: "50%",
1323
1729
  transform: "translateY(-50%)",
@@ -1334,7 +1740,7 @@ var _t = {
1334
1740
  alignItems: "center",
1335
1741
  justifyContent: "center",
1336
1742
  padding: 0
1337
- }, vt = {
1743
+ }, on = {
1338
1744
  bottom: {
1339
1745
  inset: "auto 0 0 0",
1340
1746
  padding: "40px 24px 20px",
@@ -1353,8 +1759,8 @@ var _t = {
1353
1759
  padding: 24,
1354
1760
  textShadow: "0 2px 12px rgba(0, 0, 0, 0.6)"
1355
1761
  }
1356
- }, yt = 48;
1357
- function bt({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, height: a = 320, swipe: o = !0, style: s, nodeRef: f }) {
1762
+ }, sn = 48;
1763
+ function cn({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, height: a = 320, swipe: o = !0, style: s, nodeRef: f }) {
1358
1764
  let [p, m] = c(0), [h, g] = c(!1), [_, v] = c(null), y = e ? Math.min(p, e - 1) : 0;
1359
1765
  if (i(() => {
1360
1766
  if (!n || h || _ || e < 2) return;
@@ -1370,7 +1776,7 @@ function bt({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
1370
1776
  let b = (t) => m((t + e) % e), x = () => {
1371
1777
  if (!_) return;
1372
1778
  let { dx: e } = _;
1373
- v(null), e < -48 ? b(y + 1) : e > yt && b(y - 1);
1779
+ v(null), e < -48 ? b(y + 1) : e > sn && b(y - 1);
1374
1780
  };
1375
1781
  return /* @__PURE__ */ d("div", {
1376
1782
  ref: f,
@@ -1419,7 +1825,7 @@ function bt({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
1419
1825
  type: "button",
1420
1826
  "aria-label": "Previous slide",
1421
1827
  style: {
1422
- ..._t,
1828
+ ...an,
1423
1829
  left: 12
1424
1830
  },
1425
1831
  onClick: () => b(y - 1),
@@ -1429,7 +1835,7 @@ function bt({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
1429
1835
  type: "button",
1430
1836
  "aria-label": "Next slide",
1431
1837
  style: {
1432
- ..._t,
1838
+ ...an,
1433
1839
  right: 12
1434
1840
  },
1435
1841
  onClick: () => b(y + 1),
@@ -1463,7 +1869,7 @@ function bt({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
1463
1869
  ] })]
1464
1870
  });
1465
1871
  }
1466
- var xt = (e, t) => ({
1872
+ var ln = (e, t) => ({
1467
1873
  position: "absolute",
1468
1874
  inset: 0,
1469
1875
  backgroundImage: e ? `url(${e})` : "none",
@@ -1471,18 +1877,18 @@ var xt = (e, t) => ({
1471
1877
  backgroundSize: "cover",
1472
1878
  backgroundPosition: "center"
1473
1879
  });
1474
- function St({ slides: e = [], captionPosition: t = "bottom", captionAlign: n = "left", ...r }) {
1475
- return e.length ? /* @__PURE__ */ u(bt, {
1880
+ function un({ slides: e = [], captionPosition: t = "bottom", captionAlign: n = "left", ...r }) {
1881
+ return e.length ? /* @__PURE__ */ u(cn, {
1476
1882
  ...r,
1477
1883
  count: e.length,
1478
1884
  renderSlide: (r) => {
1479
1885
  let i = e[r];
1480
- return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("div", { style: xt(i.image) }), (i.title || i.text) && /* @__PURE__ */ d("div", {
1886
+ return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("div", { style: ln(i.image) }), (i.title || i.text) && /* @__PURE__ */ d("div", {
1481
1887
  style: {
1482
1888
  position: "absolute",
1483
1889
  color: "#fff",
1484
1890
  textAlign: n,
1485
- ...vt[t] ?? vt.bottom
1891
+ ...on[t] ?? on.bottom
1486
1892
  },
1487
1893
  children: [i.title && /* @__PURE__ */ u("div", {
1488
1894
  style: {
@@ -1502,13 +1908,13 @@ function St({ slides: e = [], captionPosition: t = "bottom", captionAlign: n = "
1502
1908
  }
1503
1909
  }) : null;
1504
1910
  }
1505
- function Ct({ slides: e = [], linked: t, ...n }) {
1506
- return e.length ? /* @__PURE__ */ u(bt, {
1911
+ function dn({ slides: e = [], linked: t, ...n }) {
1912
+ return e.length ? /* @__PURE__ */ u(cn, {
1507
1913
  ...n,
1508
1914
  count: e.length,
1509
1915
  renderSlide: (n) => {
1510
1916
  let r = e[n];
1511
- return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("div", { style: xt(r.image, r.color) }), /* @__PURE__ */ u("div", {
1917
+ return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("div", { style: ln(r.image, r.color) }), /* @__PURE__ */ u("div", {
1512
1918
  style: {
1513
1919
  position: "absolute",
1514
1920
  inset: 0,
@@ -1520,23 +1926,23 @@ function Ct({ slides: e = [], linked: t, ...n }) {
1520
1926
  }
1521
1927
  }) : null;
1522
1928
  }
1523
- var wt = 256, Tt = (e) => Math.log(Math.tan(Math.PI / 4 + Math.max(-85, Math.min(85, e)) * Math.PI / 360)), Et = (e, t, n) => {
1524
- let r = wt * 2 ** n;
1929
+ var fn = 256, pn = (e) => Math.log(Math.tan(Math.PI / 4 + Math.max(-85, Math.min(85, e)) * Math.PI / 360)), mn = (e, t, n) => {
1930
+ let r = fn * 2 ** n;
1525
1931
  return {
1526
1932
  x: (Number(t) + 180) / 360 * r,
1527
- y: (.5 - Tt(Number(e)) / (2 * Math.PI)) * r
1933
+ y: (.5 - pn(Number(e)) / (2 * Math.PI)) * r
1528
1934
  };
1529
1935
  }, $ = (e, t) => {
1530
1936
  if (e === "" || e == null) return null;
1531
1937
  let n = Number(e);
1532
1938
  return Number.isFinite(n) && Math.abs(n) <= t ? n : null;
1533
- }, Dt = (e) => !!e && $(e.lat, 90) !== null && $(e.lng, 180) !== null;
1534
- function Ot(e, t, n = "directions", r = "") {
1939
+ }, hn = (e) => !!e && $(e.lat, 90) !== null && $(e.lng, 180) !== null;
1940
+ function gn(e, t, n = "directions", r = "") {
1535
1941
  let i = `${e},${t}`;
1536
1942
  return n === "place" ? `https://www.google.com/maps/search/?api=1&query=${encodeURIComponent(i)}${r ? "&query_place_id=" : ""}` : `https://www.google.com/maps/dir/?api=1&destination=${encodeURIComponent(i)}`;
1537
1943
  }
1538
- var kt = (e, t, n = 13) => `https://www.openstreetmap.org/?mlat=${e}&mlon=${t}#map=${Math.round(Number(n) || 13)}/${e}/${t}`;
1539
- function At({ markers: e, lat: t, lng: n, zoom: r = "", height: a = 320, pinSize: o = 22, pinLink: l = "directions", link: f = !1, label: p = "", style: m, nodeRef: h, inert: g }) {
1944
+ var _n = (e, t, n = 13) => `https://www.openstreetmap.org/?mlat=${e}&mlon=${t}#map=${Math.round(Number(n) || 13)}/${e}/${t}`;
1945
+ function vn({ markers: e, lat: t, lng: n, zoom: r = "", height: a = 320, pinSize: o = 22, pinLink: l = "directions", link: f = !1, label: p = "", style: m, nodeRef: h, inert: g }) {
1540
1946
  let _ = s(null), [v, y] = c(1200);
1541
1947
  i(() => {
1542
1948
  let e = _.current;
@@ -1546,7 +1952,7 @@ function At({ markers: e, lat: t, lng: n, zoom: r = "", height: a = 320, pinSize
1546
1952
  let n = new ResizeObserver(t);
1547
1953
  return n.observe(e), () => n.disconnect();
1548
1954
  }, []);
1549
- let b = (Array.isArray(e) ? e : []).filter(Dt), x = Dt({
1955
+ let b = (Array.isArray(e) ? e : []).filter(hn), x = hn({
1550
1956
  lat: t,
1551
1957
  lng: n
1552
1958
  }) ? {
@@ -1558,7 +1964,7 @@ function At({ markers: e, lat: t, lng: n, zoom: r = "", height: a = 320, pinSize
1558
1964
  } : null, S = Math.max(80, Number(a) || 320), C = $(r, 19) ? Math.min(Math.max(Math.round(Number(r)), 1), 19) : (() => {
1559
1965
  if (b.length < 2) return 13;
1560
1966
  for (let e = 19; e >= 1; e--) {
1561
- let t = b.map((t) => Et($(t.lat, 90), $(t.lng, 180), e)), n = Math.max(...t.map((e) => e.x)) - Math.min(...t.map((e) => e.x)), r = Math.max(...t.map((e) => e.y)) - Math.min(...t.map((e) => e.y));
1967
+ let t = b.map((t) => mn($(t.lat, 90), $(t.lng, 180), e)), n = Math.max(...t.map((e) => e.x)) - Math.min(...t.map((e) => e.x)), r = Math.max(...t.map((e) => e.y)) - Math.min(...t.map((e) => e.y));
1562
1968
  if (n <= v * .8 && r <= S * .7) return e;
1563
1969
  }
1564
1970
  return 1;
@@ -1582,12 +1988,12 @@ function At({ markers: e, lat: t, lng: n, zoom: r = "", height: a = 320, pinSize
1582
1988
  },
1583
1989
  children: "Set the coordinates in Settings"
1584
1990
  });
1585
- let T = Et(x.lat, x.lng, C), E = {
1991
+ let T = mn(x.lat, x.lng, C), E = {
1586
1992
  x: T.x - v / 2,
1587
1993
  y: T.y - S / 2
1588
1994
  }, D = [], O = [];
1589
- for (let e = Math.floor(E.x / wt); e <= Math.floor((E.x + v) / wt); e++) D.push(e);
1590
- for (let e = Math.floor(E.y / wt); e <= Math.floor((E.y + S) / wt); e++) O.push(e);
1995
+ for (let e = Math.floor(E.x / fn); e <= Math.floor((E.x + v) / fn); e++) D.push(e);
1996
+ for (let e = Math.floor(E.y / fn); e <= Math.floor((E.y + S) / fn); e++) O.push(e);
1591
1997
  let k = 2 ** C;
1592
1998
  return /* @__PURE__ */ d("div", {
1593
1999
  ref: (e) => {
@@ -1610,22 +2016,22 @@ function At({ markers: e, lat: t, lng: n, zoom: r = "", height: a = 320, pinSize
1610
2016
  return e < 0 || e >= k ? null : /* @__PURE__ */ u("img", {
1611
2017
  src: `https://tile.openstreetmap.org/${C}/${n}/${e}.png`,
1612
2018
  alt: "",
1613
- width: wt,
1614
- height: wt,
2019
+ width: fn,
2020
+ height: fn,
1615
2021
  loading: "lazy",
1616
2022
  style: {
1617
2023
  position: "absolute",
1618
- left: Math.round(t * wt - E.x),
1619
- top: Math.round(e * wt - E.y),
1620
- width: wt,
1621
- height: wt,
2024
+ left: Math.round(t * fn - E.x),
2025
+ top: Math.round(e * fn - E.y),
2026
+ width: fn,
2027
+ height: fn,
1622
2028
  userSelect: "none",
1623
2029
  pointerEvents: "none"
1624
2030
  }
1625
2031
  }, `${t}-${e}`);
1626
2032
  })),
1627
2033
  b.map((e, t) => {
1628
- let n = Et($(e.lat, 90), $(e.lng, 180), C), r = n.x - E.x, i = n.y - E.y, a = e.color || "var(--page-accent, #dc2626)", s = l === "none" || g ? null : Ot($(e.lat, 90), $(e.lng, 180), l, e.title);
2034
+ let n = mn($(e.lat, 90), $(e.lng, 180), C), r = n.x - E.x, i = n.y - E.y, a = e.color || "var(--page-accent, #dc2626)", s = l === "none" || g ? null : gn($(e.lat, 90), $(e.lng, 180), l, e.title);
1629
2035
  return /* @__PURE__ */ d(s ? "a" : "span", {
1630
2036
  href: s || void 0,
1631
2037
  target: s ? "_blank" : void 0,
@@ -1664,8 +2070,8 @@ function At({ markers: e, lat: t, lng: n, zoom: r = "", height: a = 320, pinSize
1664
2070
  viewBox: "0 0 24 24",
1665
2071
  fill: a,
1666
2072
  style: { display: "block" },
1667
- children: [/* @__PURE__ */ u("path", { d: "M12 22s7-6 7-11a7 7 0 1 0-14 0c0 5 7 11 7 11z" }), jt[e.icon] ? /* @__PURE__ */ u("path", {
1668
- d: jt[e.icon],
2073
+ children: [/* @__PURE__ */ u("path", { d: "M12 22s7-6 7-11a7 7 0 1 0-14 0c0 5 7 11 7 11z" }), yn[e.icon] ? /* @__PURE__ */ u("path", {
2074
+ d: yn[e.icon],
1669
2075
  transform: "translate(12 10.5) scale(0.46) translate(-12 -12)",
1670
2076
  fill: "none",
1671
2077
  stroke: "#fff",
@@ -1701,7 +2107,7 @@ function At({ markers: e, lat: t, lng: n, zoom: r = "", height: a = 320, pinSize
1701
2107
  })
1702
2108
  ]
1703
2109
  }), f ? /* @__PURE__ */ u("a", {
1704
- href: kt(x.lat, x.lng, C),
2110
+ href: _n(x.lat, x.lng, C),
1705
2111
  target: "_blank",
1706
2112
  rel: "noopener noreferrer",
1707
2113
  onClick: g ? (e) => e.preventDefault() : void 0,
@@ -1715,7 +2121,7 @@ function At({ markers: e, lat: t, lng: n, zoom: r = "", height: a = 320, pinSize
1715
2121
  }) : null]
1716
2122
  });
1717
2123
  }
1718
- var jt = {
2124
+ var yn = {
1719
2125
  check: "M4 12l5 5L20 6",
1720
2126
  close: "M6 6l12 12M18 6L6 18",
1721
2127
  plus: "M12 5v14M5 12h14",
@@ -1812,8 +2218,8 @@ var jt = {
1812
2218
  droplet: "M12 3s6 6.4 6 10.5a6 6 0 0 1-12 0C6 9.4 12 3 12 3z",
1813
2219
  leaf: "M4 20c0-8 6-14 16-14 0 10-6 14-12 14H4zM8 16c2-4 5-6 8-7"
1814
2220
  };
1815
- function Mt({ name: e = "star", paths: t, fill: n = !1, size: r = 24, stroke: i = 2, color: a = "", href: o = "", target: s = "", label: c = "", style: l, nodeRef: d, inert: f }) {
1816
- let p = Array.isArray(t) ? t.filter((e) => typeof e == "string" && e.trim()) : [], m = n && p.length > 0, h = p.length ? p : [jt[e] ?? jt.star], g = Math.min(Math.max(Number(r) || 24, 8), 240), _ = a === "accent" ? "var(--page-accent, currentColor)" : a || "currentColor", v = /* @__PURE__ */ u("svg", {
2221
+ function bn({ name: e = "star", paths: t, fill: n = !1, size: r = 24, stroke: i = 2, color: a = "", href: o = "", target: s = "", label: c = "", style: l, nodeRef: d, inert: f }) {
2222
+ let p = Array.isArray(t) ? t.filter((e) => typeof e == "string" && e.trim()) : [], m = n && p.length > 0, h = p.length ? p : [yn[e] ?? yn.star], g = Math.min(Math.max(Number(r) || 24, 8), 240), _ = a === "accent" ? "var(--page-accent, currentColor)" : a || "currentColor", v = /* @__PURE__ */ u("svg", {
1817
2223
  viewBox: "0 0 24 24",
1818
2224
  width: g,
1819
2225
  height: g,
@@ -1849,10 +2255,10 @@ function Mt({ name: e = "star", paths: t, fill: n = !1, size: r = 24, stroke: i
1849
2255
  children: v
1850
2256
  });
1851
2257
  }
1852
- function Nt(e, t = {}, n = 0) {
1853
- let r = Array.isArray(e) ? e.filter((e) => e && typeof e == "object") : [], i = (e) => e == null ? "" : Oe(e), a = Math.max(0, Number(n) || 0), o = [];
2258
+ function xn(e, t = {}, n = 0) {
2259
+ let r = Array.isArray(e) ? e.filter((e) => e && typeof e == "object") : [], i = (e) => e == null ? "" : ct(e), a = Math.max(0, Number(n) || 0), o = [];
1854
2260
  for (let e of r) {
1855
- let n = e.data ?? e, r = Ee(n, t.imageField), s = (Array.isArray(r) ? r : [r]).map((e) => e && typeof e == "object" ? e.url ?? e.src ?? "" : e).filter((e) => typeof e == "string" && e.trim()), c = t.nameField ? i(Ee(n, t.nameField)) : i(n.name), l = t.hrefField ? i(Ee(n, t.hrefField)) : "";
2261
+ let n = e.data ?? e, r = ot(n, t.imageField), s = (Array.isArray(r) ? r : [r]).map((e) => e && typeof e == "object" ? e.url ?? e.src ?? "" : e).filter((e) => typeof e == "string" && e.trim()), c = t.nameField ? i(ot(n, t.nameField)) : i(n.name), l = t.hrefField ? i(ot(n, t.hrefField)) : "";
1856
2262
  for (let e of s) if (o.push({
1857
2263
  src: e,
1858
2264
  name: c,
@@ -1862,8 +2268,8 @@ function Nt(e, t = {}, n = 0) {
1862
2268
  }
1863
2269
  return o;
1864
2270
  }
1865
- function Pt({ images: e = [], source: t = "", entry: n = "", imageField: a = "", nameField: o = "", hrefField: s = "", limit: f = 0, emptyText: p = "", columns: m = 3, gap: h = 8, showNames: g = !1, lightbox: _ = !0, style: v, nodeRef: y, inert: b }) {
1866
- let { tenant: x, apiUrl: S } = r(Z), C = r(xe)?.[t], [w, T] = c(null), [E, D] = c(() => /* @__PURE__ */ new Set());
2271
+ function Sn({ images: e = [], source: t = "", entry: n = "", imageField: a = "", nameField: o = "", hrefField: s = "", limit: f = 0, emptyText: p = "", columns: m = 3, gap: h = 8, showNames: g = !1, lightbox: _ = !0, style: v, nodeRef: y, inert: b }) {
2272
+ let { tenant: x, apiUrl: S } = r(Q), C = r(et)?.[t], [w, T] = c(null), [E, D] = c(() => /* @__PURE__ */ new Set());
1867
2273
  i(() => {
1868
2274
  if (!t || C) return;
1869
2275
  let e = !0;
@@ -1880,7 +2286,7 @@ function Pt({ images: e = [], source: t = "", entry: n = "", imageField: a = "",
1880
2286
  C
1881
2287
  ]);
1882
2288
  let O = C ?? w ?? [], k = n ? O.filter((e) => e?.id === n || e?.data?.slug === n || e?.slug === n) : O, j = Math.max(0, Number(f) || 0), M = t ? (() => {
1883
- let e = Nt(k, {
2289
+ let e = xn(k, {
1884
2290
  imageField: a,
1885
2291
  nameField: o,
1886
2292
  hrefField: s
@@ -2085,20 +2491,20 @@ function Pt({ images: e = [], source: t = "", entry: n = "", imageField: a = "",
2085
2491
  ]
2086
2492
  });
2087
2493
  }
2088
- var Ft = {
2494
+ var Cn = {
2089
2495
  color: "inherit",
2090
2496
  textDecoration: "none",
2091
2497
  fontSize: 14,
2092
2498
  opacity: .85
2093
- }, It = {
2499
+ }, wn = {
2094
2500
  background: "var(--page-surface, #f2f2f2)",
2095
2501
  color: "var(--page-text, #111827)",
2096
2502
  border: "1px solid rgba(148, 163, 184, 0.25)",
2097
2503
  boxShadow: "0 16px 40px rgba(15, 23, 42, 0.16)",
2098
2504
  zIndex: 60
2099
2505
  };
2100
- function Lt(e, t = {}, n = "dropdown") {
2101
- let r = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && e.id) : [], i = (e) => Array.isArray(e) ? e[0] : e, a = (e) => e == null ? "" : Oe(e), o = r.map((e) => {
2506
+ function Tn(e, t = {}, n = "dropdown") {
2507
+ let r = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && e.id) : [], i = (e) => Array.isArray(e) ? e[0] : e, a = (e) => e == null ? "" : ct(e), o = r.map((e) => {
2102
2508
  let n = e.data ?? {}, r = t.parentField ? i(n[t.parentField]) : null;
2103
2509
  return {
2104
2510
  key: e.id,
@@ -2139,8 +2545,8 @@ function Lt(e, t = {}, n = "dropdown") {
2139
2545
  type: e.children.length ? n : "link"
2140
2546
  }));
2141
2547
  }
2142
- function Rt({ brand: t, logo: n, brandHref: a, brandTarget: o, links: s = [], style: f, nodeRef: p, menu: m = "auto", breakpoint: h = 768, source: g = "", labelField: _ = "", hrefField: v = "", imageField: y = "", descField: b = "", parentField: x = "", submenu: S = "dropdown" }) {
2143
- let [C, w] = c(null), [T, E] = c(!1), [D, O] = c(!1), [k, j] = c(null), { tenant: M, apiUrl: N } = r(Z), P = r(xe)?.[g], [F, I] = c(null);
2548
+ function En({ brand: t, logo: n, brandHref: a, brandTarget: o, links: s = [], style: f, nodeRef: p, menu: m = "auto", breakpoint: h = 768, source: g = "", labelField: _ = "", hrefField: v = "", imageField: y = "", descField: b = "", parentField: x = "", submenu: S = "dropdown" }) {
2549
+ let [C, w] = c(null), [T, E] = c(!1), [D, O] = c(!1), [k, j] = c(null), { tenant: M, apiUrl: N } = r(Q), P = r(et)?.[g], [F, I] = c(null);
2144
2550
  i(() => {
2145
2551
  if (!g || P) return;
2146
2552
  let e = !0;
@@ -2160,7 +2566,7 @@ function Rt({ brand: t, logo: n, brandHref: a, brandTarget: o, links: s = [], st
2160
2566
  let e = new ResizeObserver(() => E(C.offsetWidth < h));
2161
2567
  return e.observe(C), () => e.disconnect();
2162
2568
  }, [C, h]);
2163
- let L = g ? Lt(P ?? F ?? [], {
2569
+ let L = g ? Tn(P ?? F ?? [], {
2164
2570
  labelField: _,
2165
2571
  hrefField: v,
2166
2572
  imageField: y,
@@ -2189,7 +2595,7 @@ function Rt({ brand: t, logo: n, brandHref: a, brandTarget: o, links: s = [], st
2189
2595
  return /* @__PURE__ */ d("a", {
2190
2596
  href: e.href || "#",
2191
2597
  style: {
2192
- ...Ft,
2598
+ ...Cn,
2193
2599
  display: n ? "block" : "flex",
2194
2600
  alignItems: n ? void 0 : "center",
2195
2601
  gap: n ? void 0 : 10,
@@ -2286,7 +2692,7 @@ function Rt({ brand: t, logo: n, brandHref: a, brandTarget: o, links: s = [], st
2286
2692
  let t = e.children ?? [];
2287
2693
  if (!t.length) return /* @__PURE__ */ u("a", {
2288
2694
  href: e.href || "#",
2289
- style: Ft,
2695
+ style: Cn,
2290
2696
  children: e.label
2291
2697
  }, e.key);
2292
2698
  let n = e.type === "mega";
@@ -2300,7 +2706,7 @@ function Rt({ brand: t, logo: n, brandHref: a, brandTarget: o, links: s = [], st
2300
2706
  children: [/* @__PURE__ */ d("a", {
2301
2707
  href: e.href || "#",
2302
2708
  style: {
2303
- ...Ft,
2709
+ ...Cn,
2304
2710
  cursor: "pointer"
2305
2711
  },
2306
2712
  children: [
@@ -2316,7 +2722,7 @@ function Rt({ brand: t, logo: n, brandHref: a, brandTarget: o, links: s = [], st
2316
2722
  ]
2317
2723
  }), k === e.key && (n ? /* @__PURE__ */ u("div", {
2318
2724
  style: {
2319
- ...It,
2725
+ ...wn,
2320
2726
  position: "absolute",
2321
2727
  left: 0,
2322
2728
  right: 0,
@@ -2332,7 +2738,7 @@ function Rt({ brand: t, logo: n, brandHref: a, brandTarget: o, links: s = [], st
2332
2738
  }, !0))
2333
2739
  }) : /* @__PURE__ */ u("div", {
2334
2740
  style: {
2335
- ...It,
2741
+ ...wn,
2336
2742
  position: "absolute",
2337
2743
  top: "100%",
2338
2744
  left: 0,
@@ -2361,7 +2767,7 @@ function Rt({ brand: t, logo: n, brandHref: a, brandTarget: o, links: s = [], st
2361
2767
  children: L.map((t) => /* @__PURE__ */ d(e, { children: [/* @__PURE__ */ u("a", {
2362
2768
  href: t.href || "#",
2363
2769
  style: {
2364
- ...Ft,
2770
+ ...Cn,
2365
2771
  padding: "10px 4px",
2366
2772
  fontWeight: (t.children ?? []).length ? 600 : 400,
2367
2773
  opacity: 1
@@ -2372,7 +2778,7 @@ function Rt({ brand: t, logo: n, brandHref: a, brandTarget: o, links: s = [], st
2372
2778
  ]
2373
2779
  });
2374
2780
  }
2375
- function zt({ tabs: e = [], linked: t, style: n, nodeRef: r }) {
2781
+ function Dn({ tabs: e = [], linked: t, style: n, nodeRef: r }) {
2376
2782
  let [i, a] = c(0), o = e.length ? Math.min(i, e.length - 1) : 0;
2377
2783
  return e.length ? /* @__PURE__ */ d("div", {
2378
2784
  ref: r,
@@ -2412,13 +2818,13 @@ function zt({ tabs: e = [], linked: t, style: n, nodeRef: r }) {
2412
2818
  }, e.key))]
2413
2819
  }) : null;
2414
2820
  }
2415
- function Bt({ items: e = [], linked: t, multiple: n = !1, icon: r = "", padX: i, padY: a, headerBg: o, headerColor: s, openBg: l, openColor: f, borderColor: p, style: m, nodeRef: h }) {
2821
+ function On({ items: e = [], linked: t, multiple: n = !1, icon: r = "", padX: i, padY: a, headerBg: o, headerColor: s, openBg: l, openColor: f, borderColor: p, style: m, nodeRef: h }) {
2416
2822
  let [g, _] = c(() => new Set(e.length ? [e[0].key] : []));
2417
2823
  if (!e.length) return null;
2418
2824
  let v = (e, t) => typeof e == "string" && e ? e : t, y = (e, t) => {
2419
2825
  let n = Number(e);
2420
2826
  return e === "" || e == null || !Number.isFinite(n) ? t : n;
2421
- }, b = jt[r], x = (e) => _((t) => {
2827
+ }, b = yn[r], x = (e) => _((t) => {
2422
2828
  let r = new Set(n ? t : []);
2423
2829
  return t.has(e) ? r.delete(e) : r.add(e), r;
2424
2830
  });
@@ -2493,15 +2899,15 @@ function Bt({ items: e = [], linked: t, multiple: n = !1, icon: r = "", padX: i,
2493
2899
  })
2494
2900
  });
2495
2901
  }
2496
- var Vt = {
2902
+ var kn = {
2497
2903
  display: "flex",
2498
2904
  flexDirection: "column",
2499
2905
  gap: "12px"
2500
- }, Ht = {
2906
+ }, An = {
2501
2907
  fontSize: "14px",
2502
2908
  fontWeight: 500,
2503
2909
  color: "var(--page-text, #111827)"
2504
- }, Ut = {
2910
+ }, jn = {
2505
2911
  padding: "10px 12px",
2506
2912
  border: "1px solid var(--page-border, #d1d5db)",
2507
2913
  borderRadius: "6px",
@@ -2511,18 +2917,18 @@ var Vt = {
2511
2917
  boxSizing: "border-box",
2512
2918
  backgroundColor: "var(--page-surface, #f2f2f2)",
2513
2919
  color: "var(--page-text, #111827)"
2514
- }, Wt = {
2920
+ }, Mn = {
2515
2921
  display: "flex",
2516
2922
  alignItems: "center",
2517
2923
  gap: "8px",
2518
2924
  fontSize: "14px",
2519
2925
  color: "var(--page-text, #111827)"
2520
- }, Gt = (e) => e ? {
2926
+ }, Nn = (e) => e ? {
2521
2927
  readOnly: !0,
2522
2928
  tabIndex: -1,
2523
2929
  onMouseDown: (e) => e.preventDefault()
2524
2930
  } : {};
2525
- function Kt(e, t) {
2931
+ function Pn(e, t) {
2526
2932
  if (!e) return !0;
2527
2933
  let n = t[e.field], r = n == null || n === "" ? "" : String(n), i = e.value ?? "";
2528
2934
  switch (e.op) {
@@ -2536,11 +2942,11 @@ function Kt(e, t) {
2536
2942
  default: return !1;
2537
2943
  }
2538
2944
  }
2539
- var qt = {
2945
+ var Fn = {
2540
2946
  display: "flex",
2541
2947
  flexDirection: "column",
2542
2948
  gap: 6
2543
- }, Jt = {
2949
+ }, In = {
2544
2950
  font: "inherit",
2545
2951
  fontSize: 15,
2546
2952
  padding: "10px 12px",
@@ -2551,17 +2957,17 @@ var qt = {
2551
2957
  width: "100%",
2552
2958
  boxSizing: "border-box"
2553
2959
  };
2554
- function Yt(e, t) {
2960
+ function Ln(e, t) {
2555
2961
  let n = Array.isArray(e?.options) ? e.options : [];
2556
2962
  if (!e?.parentField) return n;
2557
2963
  let r = t?.[e.parentField];
2558
2964
  return r ? n.filter((e) => typeof e == "string" ? !1 : !e.parent || e.parent === r) : [];
2559
2965
  }
2560
- var Xt = "g-recaptcha-response", Zt = (e) => e?.type === "recaptcha" ? Xt : e?.name;
2561
- function Qt({ field: e, value: t, onChange: n, inert: r, values: i }) {
2966
+ var Rn = "g-recaptcha-response", zn = (e) => e?.type === "recaptcha" ? Rn : e?.name;
2967
+ function Bn({ field: e, value: t, onChange: n, inert: r, values: i }) {
2562
2968
  let a = /* @__PURE__ */ d("span", {
2563
2969
  style: {
2564
- ...Ht,
2970
+ ...An,
2565
2971
  fontSize: 14
2566
2972
  },
2567
2973
  children: [e.label, e.required ? " *" : ""]
@@ -2570,7 +2976,7 @@ function Qt({ field: e, value: t, onChange: n, inert: r, values: i }) {
2570
2976
  required: e.required || void 0,
2571
2977
  placeholder: e.placeholder || void 0,
2572
2978
  disabled: r || void 0,
2573
- style: Jt,
2979
+ style: In,
2574
2980
  value: t ?? "",
2575
2981
  onChange: (t) => n(e.name, t.target.value)
2576
2982
  };
@@ -2599,12 +3005,12 @@ function Qt({ field: e, value: t, onChange: n, inert: r, values: i }) {
2599
3005
  borderRadius: 8,
2600
3006
  display: "block"
2601
3007
  }
2602
- }) : null : e.type === "recaptcha" ? /* @__PURE__ */ u(rn, {
3008
+ }) : null : e.type === "recaptcha" ? /* @__PURE__ */ u(Gn, {
2603
3009
  theme: e.captchaTheme,
2604
3010
  size: e.captchaSize,
2605
3011
  inert: r,
2606
- onChange: (e) => n(Xt, e)
2607
- }) : e.type === "video" ? e.src ? /youtube\.com|youtu\.be|vimeo\.com/i.test(e.src) ? /* @__PURE__ */ u(lt, {
3012
+ onChange: (e) => n(Rn, e)
3013
+ }) : e.type === "video" ? e.src ? /youtube\.com|youtu\.be|vimeo\.com/i.test(e.src) ? /* @__PURE__ */ u(Xt, {
2608
3014
  url: e.src,
2609
3015
  style: { width: "100%" }
2610
3016
  }) : /* @__PURE__ */ u("video", {
@@ -2616,14 +3022,14 @@ function Qt({ field: e, value: t, onChange: n, inert: r, values: i }) {
2616
3022
  display: "block"
2617
3023
  }
2618
3024
  }) : null : /* @__PURE__ */ d("label", {
2619
- style: qt,
3025
+ style: Fn,
2620
3026
  children: [
2621
3027
  a,
2622
3028
  e.type === "textarea" || e.multiline ? /* @__PURE__ */ u("textarea", {
2623
3029
  ...o,
2624
3030
  rows: 4,
2625
3031
  style: {
2626
- ...Jt,
3032
+ ...In,
2627
3033
  resize: "vertical"
2628
3034
  }
2629
3035
  }) : e.type === "select" ? /* @__PURE__ */ d("select", {
@@ -2632,7 +3038,7 @@ function Qt({ field: e, value: t, onChange: n, inert: r, values: i }) {
2632
3038
  children: [/* @__PURE__ */ u("option", {
2633
3039
  value: "",
2634
3040
  children: e.placeholder || "—"
2635
- }), Yt(e, i).map((e, t) => /* @__PURE__ */ u("option", {
3041
+ }), Ln(e, i).map((e, t) => /* @__PURE__ */ u("option", {
2636
3042
  value: typeof e == "string" ? e : e.value,
2637
3043
  children: typeof e == "string" ? e : e.label ?? e.value
2638
3044
  }, t))]
@@ -2679,8 +3085,8 @@ function Qt({ field: e, value: t, onChange: n, inert: r, values: i }) {
2679
3085
  ]
2680
3086
  });
2681
3087
  }
2682
- function $t({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s, auto: f, submitLabel: p, nodeRef: m, inert: h, children: g, linked: _, show: v }) {
2683
- let { tenant: y, apiUrl: b } = r(Z), [x, S] = c("form"), [C, w] = c(null), [T, E] = c({}), [D, O] = c(0), k = h ? v || "form" : x;
3088
+ function Vn({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s, auto: f, submitLabel: p, nodeRef: m, inert: h, children: g, linked: _, show: v }) {
3089
+ let { tenant: y, apiUrl: b } = r(Q), [x, S] = c("form"), [C, w] = c(null), [T, E] = c({}), [D, O] = c(0), k = h ? v || "form" : x;
2684
3090
  i(() => {
2685
3091
  if (!f || !s) return;
2686
3092
  let e = !0;
@@ -2701,11 +3107,11 @@ function $t({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
2701
3107
  section: e,
2702
3108
  fields: []
2703
3109
  }) : j[j.length - 1].fields.push(e);
2704
- let M = j.filter((e) => e.section || e.fields.length), N = M.filter((e) => !e.section || Kt(e.section.condition, T)).map((e) => ({
3110
+ let M = j.filter((e) => e.section || e.fields.length), N = M.filter((e) => !e.section || Pn(e.section.condition, T)).map((e) => ({
2705
3111
  ...e,
2706
- fields: e.fields.filter((e) => Kt(e.condition, T))
3112
+ fields: e.fields.filter((e) => Pn(e.condition, T))
2707
3113
  })), P = M.length > 1, F = Math.min(D, Math.max(0, N.length - 1)), I = P ? N[F]?.fields ?? [] : N.flatMap((e) => e.fields), L = I.filter((e) => {
2708
- let t = T[Zt(e)];
3114
+ let t = T[zn(e)];
2709
3115
  return e.required && (t == null || t === "" || t === !1);
2710
3116
  }), R = F >= N.length - 1, z = (e, t) => E((n) => {
2711
3117
  let r = {
@@ -2761,11 +3167,11 @@ function $t({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
2761
3167
  }
2762
3168
  },
2763
3169
  style: {
2764
- ...Vt,
3170
+ ...kn,
2765
3171
  display: k === "success" ? "none" : "flex"
2766
3172
  },
2767
3173
  children: f && s ? /* @__PURE__ */ d(l, { children: [
2768
- P && /* @__PURE__ */ u(Nn, {
3174
+ P && /* @__PURE__ */ u(br, {
2769
3175
  steps: N.map((e) => ({ label: e.section?.label ?? "Start" })),
2770
3176
  active: F + 1,
2771
3177
  style: { marginBottom: 8 }
@@ -2778,9 +3184,9 @@ function $t({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
2778
3184
  },
2779
3185
  children: N[F].section.help
2780
3186
  }),
2781
- I.map((e) => /* @__PURE__ */ u(Qt, {
3187
+ I.map((e) => /* @__PURE__ */ u(Bn, {
2782
3188
  field: e,
2783
- value: T[Zt(e)],
3189
+ value: T[zn(e)],
2784
3190
  values: T,
2785
3191
  onChange: z,
2786
3192
  inert: h
@@ -2797,7 +3203,7 @@ function $t({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
2797
3203
  disabled: h || void 0,
2798
3204
  onClick: () => O(F - 1),
2799
3205
  style: {
2800
- ...Pe,
3206
+ ...mt,
2801
3207
  background: "transparent",
2802
3208
  color: "inherit",
2803
3209
  border: 0,
@@ -2810,7 +3216,7 @@ function $t({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
2810
3216
  disabled: h || L.length > 0,
2811
3217
  onClick: () => O(F + 1),
2812
3218
  style: {
2813
- ...Pe,
3219
+ ...mt,
2814
3220
  border: 0,
2815
3221
  padding: "10px 22px",
2816
3222
  borderRadius: 8,
@@ -2824,7 +3230,7 @@ function $t({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
2824
3230
  type: "submit",
2825
3231
  disabled: h || void 0,
2826
3232
  style: {
2827
- ...Pe,
3233
+ ...mt,
2828
3234
  border: 0,
2829
3235
  padding: "10px 22px",
2830
3236
  borderRadius: 8,
@@ -2851,10 +3257,10 @@ function $t({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
2851
3257
  ]
2852
3258
  });
2853
3259
  }
2854
- var en = null, tn = null, nn = (e) => {
3260
+ var Hn = null, Un = null, Wn = (e) => {
2855
3261
  let t = typeof e == "string" && e.trim() ? e.trim() : "";
2856
- if (en && tn === t) return en;
2857
- if (en && typeof window < "u") {
3262
+ if (Hn && Un === t) return Hn;
3263
+ if (Hn && typeof window < "u") {
2858
3264
  for (let e of ["grecaptcha", "___grecaptcha_cfg"]) try {
2859
3265
  delete window[e];
2860
3266
  } catch {
@@ -2862,22 +3268,22 @@ var en = null, tn = null, nn = (e) => {
2862
3268
  }
2863
3269
  document.querySelectorAll("script[src*=\"recaptcha\"]").forEach((e) => e.remove());
2864
3270
  }
2865
- return tn = t, en = new Promise((e) => {
3271
+ return Un = t, Hn = new Promise((e) => {
2866
3272
  if (typeof window > "u") return;
2867
3273
  if (window.grecaptcha?.render) return e(window.grecaptcha);
2868
3274
  window.__webimRecaptchaReady = () => e(window.grecaptcha);
2869
3275
  let n = document.createElement("script");
2870
3276
  n.src = `https://www.google.com/recaptcha/api.js?onload=__webimRecaptchaReady&render=explicit${t ? `&hl=${encodeURIComponent(t)}` : ""}`, n.async = !0, document.head.appendChild(n);
2871
- }), en;
3277
+ }), Hn;
2872
3278
  };
2873
- function rn({ siteKey: e, theme: t, size: n, hl: a, style: o, nodeRef: c, inert: l, onChange: f }) {
2874
- let p = r(Z), m = p?.settings && typeof p.settings == "object" ? p.settings["google.recaptchaKey"] : "", h = typeof e == "string" && e.trim() || (typeof m == "string" ? m.trim() : ""), g = s(null), _ = s(f);
3279
+ function Gn({ siteKey: e, theme: t, size: n, hl: a, style: o, nodeRef: c, inert: l, onChange: f }) {
3280
+ let p = r(Q), m = p?.settings && typeof p.settings == "object" ? p.settings["google.recaptchaKey"] : "", h = typeof e == "string" && e.trim() || (typeof m == "string" ? m.trim() : ""), g = s(null), _ = s(f);
2875
3281
  if (_.current = f, i(() => {
2876
3282
  if (l || !h || !g.current) return;
2877
3283
  let e = !0, r = (t) => {
2878
3284
  e && typeof _.current == "function" && _.current(t);
2879
3285
  };
2880
- return nn(a).then((i) => {
3286
+ return Wn(a).then((i) => {
2881
3287
  if (!(!e || !g.current || !i?.render)) {
2882
3288
  g.current.innerHTML = "", r("");
2883
3289
  try {
@@ -2959,17 +3365,17 @@ function rn({ siteKey: e, theme: t, size: n, hl: a, style: o, nodeRef: c, inert:
2959
3365
  children: /* @__PURE__ */ u("div", { ref: g })
2960
3366
  }) : null;
2961
3367
  }
2962
- function an({ text: e, parts: t, style: n, nodeRef: r, linked: i }) {
3368
+ function Kn({ text: e, parts: t, style: n, nodeRef: r, linked: i }) {
2963
3369
  return /* @__PURE__ */ u("label", {
2964
3370
  ref: r,
2965
3371
  style: {
2966
- ...Ht,
3372
+ ...An,
2967
3373
  ...A(n)
2968
3374
  },
2969
- children: Ge(t, e, i)
3375
+ children: Dt(t, e, i)
2970
3376
  });
2971
3377
  }
2972
- function on({ type: e = "text", name: t, placeholder: n, required: r, style: i, nodeRef: a, inert: o }) {
3378
+ function qn({ type: e = "text", name: t, placeholder: n, required: r, style: i, nodeRef: a, inert: o }) {
2973
3379
  return /* @__PURE__ */ u("input", {
2974
3380
  ref: a,
2975
3381
  type: e,
@@ -2977,13 +3383,13 @@ function on({ type: e = "text", name: t, placeholder: n, required: r, style: i,
2977
3383
  placeholder: n,
2978
3384
  required: !o && !!r,
2979
3385
  style: {
2980
- ...Ut,
3386
+ ...jn,
2981
3387
  ...A(i)
2982
3388
  },
2983
- ...Gt(o)
3389
+ ...Nn(o)
2984
3390
  });
2985
3391
  }
2986
- function sn({ name: e, placeholder: t, rows: n = 4, required: r, style: i, nodeRef: a, inert: o }) {
3392
+ function Jn({ name: e, placeholder: t, rows: n = 4, required: r, style: i, nodeRef: a, inert: o }) {
2987
3393
  return /* @__PURE__ */ u("textarea", {
2988
3394
  ref: a,
2989
3395
  name: e || void 0,
@@ -2991,18 +3397,18 @@ function sn({ name: e, placeholder: t, rows: n = 4, required: r, style: i, nodeR
2991
3397
  rows: n,
2992
3398
  required: !o && !!r,
2993
3399
  style: {
2994
- ...Ut,
3400
+ ...jn,
2995
3401
  resize: "vertical",
2996
3402
  ...A(i)
2997
3403
  },
2998
- ...Gt(o)
3404
+ ...Nn(o)
2999
3405
  });
3000
3406
  }
3001
- function cn({ kind: e = "checkbox", label: t, name: n, value: r, required: i, style: a, nodeRef: o, inert: s }) {
3407
+ function Yn({ kind: e = "checkbox", label: t, name: n, value: r, required: i, style: a, nodeRef: o, inert: s }) {
3002
3408
  return /* @__PURE__ */ d("label", {
3003
3409
  ref: o,
3004
3410
  style: {
3005
- ...Wt,
3411
+ ...Mn,
3006
3412
  ...A(a)
3007
3413
  },
3008
3414
  children: [/* @__PURE__ */ u("input", {
@@ -3019,7 +3425,7 @@ function cn({ kind: e = "checkbox", label: t, name: n, value: r, required: i, st
3019
3425
  }), t]
3020
3426
  });
3021
3427
  }
3022
- function ln({ name: e, placeholder: t, options: n = [], required: r, style: i, nodeRef: a, inert: o }) {
3428
+ function Xn({ name: e, placeholder: t, options: n = [], required: r, style: i, nodeRef: a, inert: o }) {
3023
3429
  return /* @__PURE__ */ d("select", {
3024
3430
  ref: a,
3025
3431
  name: e || void 0,
@@ -3028,7 +3434,7 @@ function ln({ name: e, placeholder: t, options: n = [], required: r, style: i, n
3028
3434
  onMouseDown: o ? (e) => e.preventDefault() : void 0,
3029
3435
  tabIndex: o ? -1 : void 0,
3030
3436
  style: {
3031
- ...Ut,
3437
+ ...jn,
3032
3438
  appearance: "auto",
3033
3439
  ...A(i)
3034
3440
  },
@@ -3042,12 +3448,12 @@ function ln({ name: e, placeholder: t, options: n = [], required: r, style: i, n
3042
3448
  }, t))]
3043
3449
  });
3044
3450
  }
3045
- function un({ name: e, accept: t, required: n, text: r = "Choose a file…", style: i, nodeRef: a, inert: o }) {
3451
+ function Zn({ name: e, accept: t, required: n, text: r = "Choose a file…", style: i, nodeRef: a, inert: o }) {
3046
3452
  let [s, l] = c(null);
3047
3453
  return /* @__PURE__ */ d("label", {
3048
3454
  ref: a,
3049
3455
  style: {
3050
- ...Ut,
3456
+ ...jn,
3051
3457
  display: "flex",
3052
3458
  alignItems: "center",
3053
3459
  gap: "8px",
@@ -3074,12 +3480,12 @@ function un({ name: e, accept: t, required: n, text: r = "Choose a file…", sty
3074
3480
  ]
3075
3481
  });
3076
3482
  }
3077
- function dn({ text: e = "Submit", style: t, nodeRef: n, inert: r }) {
3483
+ function Qn({ text: e = "Submit", style: t, nodeRef: n, inert: r }) {
3078
3484
  return /* @__PURE__ */ u("button", {
3079
3485
  ref: n,
3080
3486
  type: r ? "button" : "submit",
3081
3487
  style: {
3082
- ...Pe,
3488
+ ...mt,
3083
3489
  border: 0,
3084
3490
  cursor: "pointer",
3085
3491
  alignSelf: "flex-start",
@@ -3094,7 +3500,7 @@ function dn({ text: e = "Submit", style: t, nodeRef: n, inert: r }) {
3094
3500
  children: e
3095
3501
  });
3096
3502
  }
3097
- function fn({ cols: e = 2, rows: t = 1, style: n, nodeRef: r, linked: i }) {
3503
+ function $n({ cols: e = 2, rows: t = 1, style: n, nodeRef: r, linked: i }) {
3098
3504
  let a = Math.max(1, (Number(e) || 1) * (Number(t) || 1));
3099
3505
  return /* @__PURE__ */ u("div", {
3100
3506
  ref: r,
@@ -3111,8 +3517,8 @@ function fn({ cols: e = 2, rows: t = 1, style: n, nodeRef: r, linked: i }) {
3111
3517
  }, t))
3112
3518
  });
3113
3519
  }
3114
- function pn({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, imageField: o, titleField: s = "name", textField: l, custom: f, templateId: p, paged: m, filters: h, style: g, nodeRef: _ }) {
3115
- let { tenant: v, apiUrl: y, locale: b } = r(Z), x = r(we), S = r(xe), [, C] = c(0);
3520
+ function er({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, imageField: o, titleField: s = "name", textField: l, custom: f, templateId: p, paged: m, filters: h, style: g, nodeRef: _ }) {
3521
+ let { tenant: v, apiUrl: y, locale: b } = r(Q), x = r(it), S = r(et), [, C] = c(0);
3116
3522
  i(() => {
3117
3523
  if (typeof window > "u") return;
3118
3524
  let e = () => C((e) => e + 1);
@@ -3120,7 +3526,7 @@ function pn({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, i
3120
3526
  window.removeEventListener("popstate", e), window.removeEventListener("webim:urlchange", e);
3121
3527
  };
3122
3528
  }, []);
3123
- let w = Ce(h), T = JSON.stringify(w), E = T !== "{}" && !e?.startsWith?.("api:"), D = E ? null : S?.[e], O = m ? Se(S) : 1, [k, j] = c(null);
3529
+ let w = rt(h), T = JSON.stringify(w), E = T !== "{}" && !e?.startsWith?.("api:"), D = E ? null : S?.[e], O = m ? tt(S) : 1, [k, j] = c(null);
3124
3530
  if (i(() => {
3125
3531
  if (!e || D) return;
3126
3532
  let n = !0, r = new URLSearchParams();
@@ -3165,7 +3571,7 @@ function pn({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, i
3165
3571
  },
3166
3572
  children: N.map((e) => /* @__PURE__ */ u("div", {
3167
3573
  style: { minWidth: 0 },
3168
- children: x.render(p, (t) => ke(t, e))
3574
+ children: x.render(p, (t) => lt(t, e))
3169
3575
  }, e.id ?? e?.data?.slug))
3170
3576
  }) : /* @__PURE__ */ u("div", {
3171
3577
  ref: _,
@@ -3175,7 +3581,7 @@ function pn({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, i
3175
3581
  ...A(g)
3176
3582
  },
3177
3583
  children: N.map((e) => {
3178
- let t = o ? Ee(e?.data, o) : null, r = s ? Oe(Ee(e?.data, s)) : null, i = l ? Ee(e?.data, l) : null, a = Array.isArray(i) ? i : null, c = a || i == null ? null : Oe(i), f = n === "list";
3584
+ let t = o ? ot(e?.data, o) : null, r = s ? ct(ot(e?.data, s)) : null, i = l ? ot(e?.data, l) : null, a = Array.isArray(i) ? i : null, c = a || i == null ? null : ct(i), f = n === "list";
3179
3585
  return /* @__PURE__ */ d("div", {
3180
3586
  style: {
3181
3587
  display: "flex",
@@ -3222,7 +3628,7 @@ function pn({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, i
3222
3628
  lineHeight: 1.55,
3223
3629
  opacity: .85
3224
3630
  },
3225
- children: Ze(a)
3631
+ children: It(a)
3226
3632
  })
3227
3633
  ]
3228
3634
  })]
@@ -3230,8 +3636,8 @@ function pn({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, i
3230
3636
  })
3231
3637
  });
3232
3638
  }
3233
- function mn({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, inert: i }) {
3234
- let a = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && typeof e.name == "string" && e.name) : [], o = i ? {} : Q(), s = {
3639
+ function tr({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, inert: i }) {
3640
+ let a = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && typeof e.name == "string" && e.name) : [], o = i ? {} : nt(), s = {
3235
3641
  height: 34,
3236
3642
  padding: "0 12px",
3237
3643
  borderRadius: 8,
@@ -3279,7 +3685,7 @@ function mn({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, i
3279
3685
  name: `f_${e.name}`,
3280
3686
  defaultValue: o[e.name] ?? "",
3281
3687
  style: s,
3282
- ...Gt(i),
3688
+ ...Nn(i),
3283
3689
  children: [/* @__PURE__ */ u("option", {
3284
3690
  value: "",
3285
3691
  children: e.label || e.name
@@ -3294,7 +3700,7 @@ function mn({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, i
3294
3700
  name: `f_${e.name}`,
3295
3701
  defaultValue: o[e.name] ?? "",
3296
3702
  style: s,
3297
- ...Gt(i),
3703
+ ...Nn(i),
3298
3704
  children: [
3299
3705
  /* @__PURE__ */ u("option", {
3300
3706
  value: "",
@@ -3315,7 +3721,7 @@ function mn({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, i
3315
3721
  defaultValue: o[e.name] ?? "",
3316
3722
  placeholder: e.label || e.name,
3317
3723
  style: s,
3318
- ...Gt(i)
3724
+ ...Nn(i)
3319
3725
  }, e.name)), /* @__PURE__ */ u("button", {
3320
3726
  type: "submit",
3321
3727
  style: {
@@ -3328,12 +3734,12 @@ function mn({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, i
3328
3734
  fontWeight: 600,
3329
3735
  cursor: i ? "default" : "pointer"
3330
3736
  },
3331
- ...Gt(i),
3737
+ ...Nn(i),
3332
3738
  children: t
3333
3739
  })]
3334
3740
  });
3335
3741
  }
3336
- function hn({ items: e = [], separator: t = "/", style: n, nodeRef: r }) {
3742
+ function nr({ items: e = [], separator: t = "/", style: n, nodeRef: r }) {
3337
3743
  return e.length ? /* @__PURE__ */ u("nav", {
3338
3744
  ref: r,
3339
3745
  "aria-label": "Breadcrumb",
@@ -3383,8 +3789,8 @@ function hn({ items: e = [], separator: t = "/", style: n, nodeRef: r }) {
3383
3789
  })
3384
3790
  }) : null;
3385
3791
  }
3386
- function gn({ pages: e = 5, current: t = 1, prevNext: n = !0, href: a = "#", source: o, pageSize: s = 6, align: l, hideEmpty: f, inert: p, style: m, nodeRef: h }) {
3387
- let { tenant: g, apiUrl: _ } = r(Z), v = r(xe), [y, b] = c(null), x = o ? Number(v?.[`${o}:total`]) : NaN;
3792
+ function rr({ pages: e = 5, current: t = 1, prevNext: n = !0, href: a = "#", source: o, pageSize: s = 6, align: l, hideEmpty: f, inert: p, style: m, nodeRef: h }) {
3793
+ let { tenant: g, apiUrl: _ } = r(Q), v = r(et), [y, b] = c(null), x = o ? Number(v?.[`${o}:total`]) : NaN;
3388
3794
  i(() => {
3389
3795
  if (!o || Number.isFinite(x)) return;
3390
3796
  let e = !0, t = o.startsWith("api:") ? `${_}/data/${encodeURIComponent(o.slice(4))}` : `${_}/dynamic/${encodeURIComponent(o)}?limit=1`;
@@ -3403,7 +3809,7 @@ function gn({ pages: e = 5, current: t = 1, prevNext: n = !0, href: a = "#", sou
3403
3809
  ]);
3404
3810
  let S = Math.max(1, Number(s) || 6), C = Number.isFinite(x) ? x : y;
3405
3811
  if (o && C === null || o && f && !(C > 0)) return null;
3406
- let w = Math.min(Math.max(o ? Math.ceil(C / S) : Number(e) || 1, 1), 50), T = Math.min(Math.max(o ? Se(v) : Number(t) || 1, 1), w), E = (e) => {
3812
+ let w = Math.min(Math.max(o ? Math.ceil(C / S) : Number(e) || 1, 1), 50), T = Math.min(Math.max(o ? tt(v) : Number(t) || 1, 1), w), E = (e) => {
3407
3813
  if (o) {
3408
3814
  if (typeof window < "u") {
3409
3815
  let t = new URLSearchParams(window.location.search);
@@ -3468,15 +3874,15 @@ function gn({ pages: e = 5, current: t = 1, prevNext: n = !0, href: a = "#", sou
3468
3874
  ]
3469
3875
  });
3470
3876
  }
3471
- var _n = "webim.page_mode", vn = () => {
3877
+ var ir = "webim.page_mode", ar = () => {
3472
3878
  if (typeof window > "u") return "auto";
3473
3879
  try {
3474
- let e = window.localStorage.getItem(_n);
3880
+ let e = window.localStorage.getItem(ir);
3475
3881
  return e === "light" || e === "dark" ? e : "auto";
3476
3882
  } catch {
3477
3883
  return "auto";
3478
3884
  }
3479
- }, yn = (e) => {
3885
+ }, or = (e) => {
3480
3886
  let t = {
3481
3887
  width: 16,
3482
3888
  height: 16,
@@ -3508,13 +3914,13 @@ var _n = "webim.page_mode", vn = () => {
3508
3914
  rx: "2"
3509
3915
  }), /* @__PURE__ */ u("path", { d: "M8 21h8M12 17v4" })]
3510
3916
  });
3511
- }, bn = {
3917
+ }, sr = {
3512
3918
  light: "Light theme",
3513
3919
  dark: "Dark theme",
3514
3920
  auto: "Follow the device theme"
3515
3921
  };
3516
- function xn({ variant: e, showSystem: t, style: n, nodeRef: r, inert: a }) {
3517
- let [o, l] = c(a ? "auto" : vn), d = s(null), f = (e) => {
3922
+ function cr({ variant: e, showSystem: t, style: n, nodeRef: r, inert: a }) {
3923
+ let [o, l] = c(a ? "auto" : ar), d = s(null), f = (e) => {
3518
3924
  d.current = e, typeof r == "function" && r(e);
3519
3925
  };
3520
3926
  i(() => {
@@ -3522,7 +3928,7 @@ function xn({ variant: e, showSystem: t, style: n, nodeRef: r, inert: a }) {
3522
3928
  let e = d.current?.closest?.(".webim-page");
3523
3929
  e && (o === "light" || o === "dark" ? e.setAttribute("data-webim-mode", o) : e.removeAttribute("data-webim-mode"));
3524
3930
  try {
3525
- o === "auto" ? window.localStorage.removeItem(_n) : window.localStorage.setItem(_n, o);
3931
+ o === "auto" ? window.localStorage.removeItem(ir) : window.localStorage.setItem(ir, o);
3526
3932
  } catch {}
3527
3933
  }, [o, a]);
3528
3934
  let p = t === !1 ? ["light", "dark"] : [
@@ -3557,8 +3963,8 @@ function xn({ variant: e, showSystem: t, style: n, nodeRef: r, inert: a }) {
3557
3963
  },
3558
3964
  children: p.map((e) => /* @__PURE__ */ u("button", {
3559
3965
  type: "button",
3560
- title: bn[e],
3561
- "aria-label": bn[e],
3966
+ title: sr[e],
3967
+ "aria-label": sr[e],
3562
3968
  "aria-pressed": e === m,
3563
3969
  onClick: a ? void 0 : () => l(e),
3564
3970
  style: {
@@ -3569,15 +3975,15 @@ function xn({ variant: e, showSystem: t, style: n, nodeRef: r, inert: a }) {
3569
3975
  background: e === m ? "var(--page-accent, #111827)" : "transparent",
3570
3976
  opacity: e === m ? 1 : .7
3571
3977
  },
3572
- children: yn(e)
3978
+ children: or(e)
3573
3979
  }, e))
3574
3980
  });
3575
3981
  let g = p[(p.indexOf(m) + 1) % p.length];
3576
3982
  return /* @__PURE__ */ u("button", {
3577
3983
  ref: f,
3578
3984
  type: "button",
3579
- title: bn[m],
3580
- "aria-label": `Theme: ${bn[m]} — switch to ${bn[g]}`,
3985
+ title: sr[m],
3986
+ "aria-label": `Theme: ${sr[m]} — switch to ${sr[g]}`,
3581
3987
  onClick: a ? void 0 : () => l(g),
3582
3988
  style: {
3583
3989
  ...h,
@@ -3586,10 +3992,10 @@ function xn({ variant: e, showSystem: t, style: n, nodeRef: r, inert: a }) {
3586
3992
  border: "1px solid rgba(148, 163, 184, 0.4)",
3587
3993
  ...A(n)
3588
3994
  },
3589
- children: yn(m)
3995
+ children: or(m)
3590
3996
  });
3591
3997
  }
3592
- function Sn(e) {
3998
+ function lr(e) {
3593
3999
  let t = e?.parentElement;
3594
4000
  for (; t && t !== document.body;) {
3595
4001
  let e = getComputedStyle(t).overflowY;
@@ -3598,7 +4004,7 @@ function Sn(e) {
3598
4004
  }
3599
4005
  return window;
3600
4006
  }
3601
- var Cn = (e) => e === window ? window.scrollY : e.scrollTop, wn = {
4007
+ var ur = (e) => e === window ? window.scrollY : e.scrollTop, dr = {
3602
4008
  "bottom-right": (e) => ({
3603
4009
  right: e,
3604
4010
  bottom: e
@@ -3612,11 +4018,11 @@ var Cn = (e) => e === window ? window.scrollY : e.scrollTop, wn = {
3612
4018
  bottom: e,
3613
4019
  transform: "translateX(-50%)"
3614
4020
  })
3615
- }, Tn = {
4021
+ }, fr = {
3616
4022
  linear: (e) => e,
3617
4023
  out: (e) => 1 - (1 - e) ** 3,
3618
4024
  inout: (e) => e < .5 ? 4 * e * e * e : 1 - (-2 * e + 2) ** 3 / 2
3619
- }, En = (e) => {
4025
+ }, pr = (e) => {
3620
4026
  let t = e.getBoundingClientRect(), n = e.parentElement;
3621
4027
  for (; n && n !== document.body;) {
3622
4028
  let e = getComputedStyle(n);
@@ -3624,12 +4030,12 @@ var Cn = (e) => e === window ? window.scrollY : e.scrollTop, wn = {
3624
4030
  n = n.parentElement;
3625
4031
  }
3626
4032
  return !n || n === document.body ? Math.max(document.documentElement.scrollHeight - (t.bottom + window.scrollY), 0) : Math.max(n.scrollHeight - (t.bottom - n.getBoundingClientRect().top + n.scrollTop), 0);
3627
- }, Dn = (e, t) => {
4033
+ }, mr = (e, t) => {
3628
4034
  let n = typeof e == "number" ? e : parseFloat(e);
3629
4035
  return Number.isFinite(n) ? n : t;
3630
4036
  };
3631
- function On(e, { locale: t, decimals: n = 0, separator: r = "auto" } = {}) {
3632
- let i = Math.min(Math.max(Math.round(Dn(n, 0)), 0), 6);
4037
+ function hr(e, { locale: t, decimals: n = 0, separator: r = "auto" } = {}) {
4038
+ let i = Math.min(Math.max(Math.round(mr(n, 0)), 0), 6);
3633
4039
  try {
3634
4040
  return new Intl.NumberFormat(t || void 0, {
3635
4041
  minimumFractionDigits: i,
@@ -3640,8 +4046,8 @@ function On(e, { locale: t, decimals: n = 0, separator: r = "auto" } = {}) {
3640
4046
  return e.toFixed(i);
3641
4047
  }
3642
4048
  }
3643
- function kn({ from: e, to: t, duration: n, delay: a, decimals: o, prefix: l, suffix: f, separator: p, easing: m, trigger: h, offset: g, once: _, label: v, align: y, style: b, nodeRef: x, inert: S }) {
3644
- let { locale: C } = r(Z), w = Math.max(Dn(g, 0), 0), T = Dn(e, 0), E = Dn(t, 100), [D, O] = c(E), k = s(null), [j, M] = c(!1);
4049
+ function gr({ from: e, to: t, duration: n, delay: a, decimals: o, prefix: l, suffix: f, separator: p, easing: m, trigger: h, offset: g, once: _, label: v, align: y, style: b, nodeRef: x, inert: S }) {
4050
+ let { locale: C } = r(Q), w = Math.max(mr(g, 0), 0), T = mr(e, 0), E = mr(t, 100), [D, O] = c(E), k = s(null), [j, M] = c(!1);
3645
4051
  return i(() => {
3646
4052
  let e = k.current;
3647
4053
  if (S || !j || !e) {
@@ -3649,7 +4055,7 @@ function kn({ from: e, to: t, duration: n, delay: a, decimals: o, prefix: l, suf
3649
4055
  return;
3650
4056
  }
3651
4057
  O(T);
3652
- let t = Math.max(Dn(n, 2e3), 0), r = Math.max(Dn(a, 0), 0), i = Tn[m] || Tn.out, o = typeof window < "u" && window.matchMedia?.("(prefers-reduced-motion: reduce)").matches, s = 0, c = 0, l = !1, u = () => {
4058
+ let t = Math.max(mr(n, 2e3), 0), r = Math.max(mr(a, 0), 0), i = fr[m] || fr.out, o = typeof window < "u" && window.matchMedia?.("(prefers-reduced-motion: reduce)").matches, s = 0, c = 0, l = !1, u = () => {
3653
4059
  if (cancelAnimationFrame(s), clearTimeout(c), o || t === 0) {
3654
4060
  O(E);
3655
4061
  return;
@@ -3669,7 +4075,7 @@ function kn({ from: e, to: t, duration: n, delay: a, decimals: o, prefix: l, suf
3669
4075
  let t = e.some((e) => e.isIntersecting);
3670
4076
  t && (!l || _ === !1) ? (l = !0, u()) : !t && _ === !1 && (cancelAnimationFrame(s), clearTimeout(c), O(T));
3671
4077
  }, {
3672
- rootMargin: `0px 0px -${Math.min(w, Math.floor(En(e)))}px 0px`,
4078
+ rootMargin: `0px 0px -${Math.min(w, Math.floor(pr(e)))}px 0px`,
3673
4079
  threshold: w > 0 ? 0 : .3
3674
4080
  });
3675
4081
  return d.observe(e), () => {
@@ -3709,7 +4115,7 @@ function kn({ from: e, to: t, duration: n, delay: a, decimals: o, prefix: l, suf
3709
4115
  },
3710
4116
  children: [
3711
4117
  l || "",
3712
- On(D, {
4118
+ hr(D, {
3713
4119
  locale: C,
3714
4120
  decimals: o,
3715
4121
  separator: p
@@ -3727,7 +4133,7 @@ function kn({ from: e, to: t, duration: n, delay: a, decimals: o, prefix: l, suf
3727
4133
  }) : null]
3728
4134
  });
3729
4135
  }
3730
- function An({ variant: e, label: t, position: n, offset: r, showAfter: a, smooth: o, bg: s, fg: l, style: f, nodeRef: p, inert: m, frame: h, builder: g }) {
4136
+ function _r({ variant: e, label: t, position: n, offset: r, showAfter: a, smooth: o, bg: s, fg: l, style: f, nodeRef: p, inert: m, frame: h, builder: g }) {
3731
4137
  let [_, v] = c(!!m), [y, b] = c(null), x = (e) => {
3732
4138
  b(e), typeof p == "function" && p(e);
3733
4139
  };
@@ -3738,8 +4144,8 @@ function An({ variant: e, label: t, position: n, offset: r, showAfter: a, smooth
3738
4144
  }
3739
4145
  if (!y) return;
3740
4146
  let e = Number(a) >= 0 ? Number(a) : 300, t = () => {
3741
- let t = Sn(y), n = g && !(t === window ? document.documentElement.scrollHeight > window.innerHeight : t.scrollHeight > t.clientHeight);
3742
- v(n || Cn(t) > e);
4147
+ let t = lr(y), n = g && !(t === window ? document.documentElement.scrollHeight > window.innerHeight : t.scrollHeight > t.clientHeight);
4148
+ v(n || ur(t) > e);
3743
4149
  };
3744
4150
  return t(), document.addEventListener("scroll", t, {
3745
4151
  capture: !0,
@@ -3753,7 +4159,7 @@ function An({ variant: e, label: t, position: n, offset: r, showAfter: a, smooth
3753
4159
  ]);
3754
4160
  let S = () => {
3755
4161
  if (m) return;
3756
- let e = Sn(y), t = window.matchMedia?.("(prefers-reduced-motion: reduce)").matches, n = o === !1 || t ? "auto" : "smooth";
4162
+ let e = lr(y), t = window.matchMedia?.("(prefers-reduced-motion: reduce)").matches, n = o === !1 || t ? "auto" : "smooth";
3757
4163
  e === window ? window.scrollTo({
3758
4164
  top: 0,
3759
4165
  behavior: n
@@ -3761,7 +4167,7 @@ function An({ variant: e, label: t, position: n, offset: r, showAfter: a, smooth
3761
4167
  top: 0,
3762
4168
  behavior: n
3763
4169
  });
3764
- }, C = Number(r) >= 0 ? Number(r) : 24, w = e === "pill", T = t || "Top", E = wn[n] ? n : "bottom-right", D = h ? {
4170
+ }, C = Number(r) >= 0 ? Number(r) : 24, w = e === "pill", T = t || "Top", E = dr[n] ? n : "bottom-right", D = h ? {
3765
4171
  position: "fixed",
3766
4172
  zIndex: 5,
3767
4173
  bottom: (h.bottom ?? 0) + C,
@@ -3774,7 +4180,7 @@ function An({ variant: e, label: t, position: n, offset: r, showAfter: a, smooth
3774
4180
  } : {
3775
4181
  position: "fixed",
3776
4182
  zIndex: 2147482e3,
3777
- ...wn[E](C)
4183
+ ...dr[E](C)
3778
4184
  };
3779
4185
  return /* @__PURE__ */ d("button", {
3780
4186
  ref: x,
@@ -3825,7 +4231,7 @@ function An({ variant: e, label: t, position: n, offset: r, showAfter: a, smooth
3825
4231
  }), w ? /* @__PURE__ */ u("span", { children: T }) : null]
3826
4232
  });
3827
4233
  }
3828
- var jn = {
4234
+ var vr = {
3829
4235
  facebook: {
3830
4236
  label: "Facebook",
3831
4237
  color: "#1877f2",
@@ -3892,8 +4298,8 @@ var jn = {
3892
4298
  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"
3893
4299
  }
3894
4300
  };
3895
- function Mn({ links: e = [], variant: t, color: n, size: r, gap: i, newTab: a, style: o, nodeRef: s, inert: c }) {
3896
- let l = Array.isArray(e) ? e.filter((e) => e && jn[e.network]) : [];
4301
+ function yr({ links: e = [], variant: t, color: n, size: r, gap: i, newTab: a, style: o, nodeRef: s, inert: c }) {
4302
+ let l = Array.isArray(e) ? e.filter((e) => e && vr[e.network]) : [];
3897
4303
  if (!l.length) return null;
3898
4304
  let d = Math.min(Math.max(Number(r) || 18, 10), 64), f = Math.round(d * 1.9), p = Number.isFinite(Number(i)) ? Number(i) : 10, m = (e) => n === "accent" ? "var(--page-accent, #111827)" : n === "inherit" ? "currentColor" : e.color, h = c ? (e) => e.preventDefault() : void 0;
3899
4305
  return /* @__PURE__ */ u("div", {
@@ -3906,7 +4312,7 @@ function Mn({ links: e = [], variant: t, color: n, size: r, gap: i, newTab: a, s
3906
4312
  ...A(o)
3907
4313
  },
3908
4314
  children: l.map((e, r) => {
3909
- let i = jn[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);
4315
+ let i = vr[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);
3910
4316
  return /* @__PURE__ */ u("a", {
3911
4317
  href: e.url || "#",
3912
4318
  onClick: h,
@@ -3940,7 +4346,7 @@ function Mn({ links: e = [], variant: t, color: n, size: r, gap: i, newTab: a, s
3940
4346
  })
3941
4347
  });
3942
4348
  }
3943
- function Nn({ steps: t = [], active: n = 1, vertical: r = !1, style: i, nodeRef: a }) {
4349
+ function br({ steps: t = [], active: n = 1, vertical: r = !1, style: i, nodeRef: a }) {
3944
4350
  if (!t.length) return null;
3945
4351
  let o = Math.min(Math.max(Number(n) || 1, 1), t.length), s = (e) => ({
3946
4352
  width: 32,
@@ -4018,7 +4424,7 @@ function Nn({ steps: t = [], active: n = 1, vertical: r = !1, style: i, nodeRef:
4018
4424
  })
4019
4425
  });
4020
4426
  }
4021
- var Pn = {
4427
+ var xr = {
4022
4428
  small: {
4023
4429
  w: 132,
4024
4430
  h: 46,
@@ -4040,21 +4446,21 @@ var Pn = {
4040
4446
  title: 12.5,
4041
4447
  avatar: 46
4042
4448
  }
4043
- }, Fn = (e) => Pn[e] ?? Pn.medium;
4044
- Pn.medium.w, Pn.medium.h;
4045
- var In = (e) => String(e?.group ?? "").trim(), Ln = (e) => {
4449
+ }, Sr = (e) => xr[e] ?? xr.medium;
4450
+ xr.medium.w, xr.medium.h;
4451
+ var Cr = (e) => String(e?.group ?? "").trim(), wr = (e) => {
4046
4452
  let t = [], n = /* @__PURE__ */ new Map();
4047
4453
  return e.forEach((e, r) => {
4048
- let i = In(e) || `#${r}`;
4454
+ let i = Cr(e) || `#${r}`;
4049
4455
  n.has(i) || (n.set(i, []), t.push(i)), n.get(i).push(e);
4050
4456
  }), t.flatMap((e) => n.get(e));
4051
4457
  };
4052
- function Rn(e, { size: t = "medium", horizontal: n = !1, groupTitles: r = "top" } = {}) {
4053
- let i = Fn(t), a = n ? i.h : i.w, o = n ? 16 : 20, s = (n ? i.w : i.h) + (n ? 56 : 48), c = Array.isArray(e) ? e.filter((e) => e && e.id) : [], l = new Set(c.map((e) => e.id)), u = /* @__PURE__ */ new Map(), d = [];
4458
+ function Tr(e, { size: t = "medium", horizontal: n = !1, groupTitles: r = "top" } = {}) {
4459
+ let i = Sr(t), a = n ? i.h : i.w, o = n ? 16 : 20, s = (n ? i.w : i.h) + (n ? 56 : 48), c = Array.isArray(e) ? e.filter((e) => e && e.id) : [], l = new Set(c.map((e) => e.id)), u = /* @__PURE__ */ new Map(), d = [];
4054
4460
  for (let e of c) e.parent && l.has(e.parent) && e.parent !== e.id ? (u.has(e.parent) || u.set(e.parent, []), u.get(e.parent).push(e)) : d.push(e);
4055
- d = Ln(d);
4056
- for (let [e, t] of u) u.set(e, Ln(t));
4057
- let f = (e, t) => o + (In(e) !== In(t) && (In(e) || In(t)) ? 24 : 0), p = /* @__PURE__ */ new Map(), m = (e, t) => {
4461
+ d = wr(d);
4462
+ for (let [e, t] of u) u.set(e, wr(t));
4463
+ let f = (e, t) => o + (Cr(e) !== Cr(t) && (Cr(e) || Cr(t)) ? 24 : 0), p = /* @__PURE__ */ new Map(), m = (e, t) => {
4058
4464
  if (t.has(e.id)) return 0;
4059
4465
  t.add(e.id);
4060
4466
  let n = u.get(e.id) ?? [], r = n.reduce((e, r, i) => e + m(r, t) + (i ? f(n[i - 1], r) : 0), 0), i = Math.max(a, r);
@@ -4070,7 +4476,7 @@ function Rn(e, { size: t = "medium", horizontal: n = !1, groupTitles: r = "top"
4070
4476
  x: m,
4071
4477
  y: b
4072
4478
  });
4073
- let x = In(e);
4479
+ let x = Cr(e);
4074
4480
  if (x) {
4075
4481
  let t = `${e.parent && l.has(e.parent) && e.parent !== e.id ? e.parent : ""}|${x}`;
4076
4482
  _.has(t) || _.set(t, {
@@ -4144,19 +4550,19 @@ function Rn(e, { size: t = "medium", horizontal: n = !1, groupTitles: r = "top"
4144
4550
  horizontal: n
4145
4551
  };
4146
4552
  }
4147
- var zn = (e, t) => {
4553
+ var Er = (e, t) => {
4148
4554
  let n = String(e ?? "");
4149
4555
  return n.length > t ? `${n.slice(0, t - 1)}…` : n;
4150
- }, Bn = (e) => {
4556
+ }, Dr = (e) => {
4151
4557
  let t = /^#([0-9a-f]{6}|[0-9a-f]{3})$/i.exec(String(e ?? "").trim());
4152
4558
  if (!t) return "#ffffff";
4153
4559
  let n = t[1];
4154
4560
  n.length === 3 && (n = [...n].map((e) => e + e).join(""));
4155
4561
  let r = parseInt(n, 16);
4156
4562
  return .299 * (r >> 16 & 255) + .587 * (r >> 8 & 255) + .114 * (r & 255) > 150 ? "#111827" : "#ffffff";
4157
- }, Vn = (e) => !!(e?.cv?.trim?.() || e?.photo);
4158
- function Hn(e, t = {}) {
4159
- 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 ? "" : Oe(e);
4563
+ }, Or = (e) => !!(e?.cv?.trim?.() || e?.photo);
4564
+ function kr(e, t = {}) {
4565
+ 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 ? "" : ct(e);
4160
4566
  return n.map((e) => {
4161
4567
  let n = e.data ?? {}, a = r(n[t.parentField]), o = a && typeof a == "object" ? a.id ?? null : a || null;
4162
4568
  return {
@@ -4171,11 +4577,11 @@ function Hn(e, t = {}) {
4171
4577
  };
4172
4578
  });
4173
4579
  }
4174
- var Un = {
4580
+ var Ar = {
4175
4581
  size: 36,
4176
4582
  pad: 10
4177
4583
  };
4178
- function Wn({ node: e, onClose: t }) {
4584
+ function jr({ node: e, onClose: t }) {
4179
4585
  return i(() => {
4180
4586
  let e = (e) => e.key === "Escape" && t();
4181
4587
  return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
@@ -4296,8 +4702,8 @@ function Wn({ node: e, onClose: t }) {
4296
4702
  })
4297
4703
  });
4298
4704
  }
4299
- function Gn({ nodes: e = [], source: t, nameField: n, titleField: o, photoField: s, parentField: f, cvField: p, hrefField: m, groupField: h, groupTitles: g = "top", groupBg: _ = "", size: v = "medium", horizontal: y = !1, style: b, nodeRef: x, interactive: S = !0 }) {
4300
- let C = a(), [w, T] = c(null), { tenant: E, apiUrl: D } = r(Z), O = r(xe)?.[t], [k, j] = c(null);
4705
+ function Mr({ nodes: e = [], source: t, nameField: n, titleField: o, photoField: s, parentField: f, cvField: p, hrefField: m, groupField: h, groupTitles: g = "top", groupBg: _ = "", size: v = "medium", horizontal: y = !1, style: b, nodeRef: x, interactive: S = !0 }) {
4706
+ let C = a(), [w, T] = c(null), { tenant: E, apiUrl: D } = r(Q), O = r(et)?.[t], [k, j] = c(null);
4301
4707
  i(() => {
4302
4708
  if (!t || O) return;
4303
4709
  let e = !0;
@@ -4313,7 +4719,7 @@ function Gn({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
4313
4719
  D,
4314
4720
  O
4315
4721
  ]);
4316
- let M = t ? Hn(O ?? k ?? [], {
4722
+ let M = t ? kr(O ?? k ?? [], {
4317
4723
  nameField: n,
4318
4724
  titleField: o,
4319
4725
  photoField: s,
@@ -4321,7 +4727,7 @@ function Gn({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
4321
4727
  cvField: p,
4322
4728
  hrefField: m,
4323
4729
  groupField: h
4324
- }) : e, N = Fn(v), { boxes: P, links: F, groups: I, width: L, height: R } = Rn(M, {
4730
+ }) : e, N = Sr(v), { boxes: P, links: F, groups: I, width: L, height: R } = Tr(M, {
4325
4731
  size: v,
4326
4732
  horizontal: y,
4327
4733
  groupTitles: g
@@ -4379,8 +4785,8 @@ function Gn({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
4379
4785
  fontSize: N.title + 1,
4380
4786
  fontWeight: "600",
4381
4787
  opacity: "0.55",
4382
- fill: r ? Bn(e.color || _) : "var(--page-text, #111827)",
4383
- children: zn(e.title, Math.floor(e.width / 7))
4788
+ fill: r ? Dr(e.color || _) : "var(--page-text, #111827)",
4789
+ children: Er(e.title, Math.floor(e.width / 7))
4384
4790
  })] }, `group-${t}`);
4385
4791
  }),
4386
4792
  F.map((e, t) => /* @__PURE__ */ u("path", {
@@ -4390,7 +4796,7 @@ function Gn({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
4390
4796
  strokeWidth: "1.5"
4391
4797
  }, t)),
4392
4798
  P.map(({ node: e, x: t, y: n }) => {
4393
- let r = z.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 ? Bn(e.color) : r ? "var(--page-accent-text, #ffffff)" : "var(--page-text, #111827)", c = i ? Bn(e.color2) : s, f = S && (Vn(e) || e.href), p = () => Vn(e) ? T(e) : window.open(e.href, "_blank", "noreferrer"), m = e.photo ? t + Un.pad + N.avatar + 8 : t + N.w / 2, h = e.photo ? "start" : "middle", g = e.photo ? Math.floor((N.w - N.avatar - 26) / 7) : Math.floor(N.w / 7.6), _ = N.h / 2, v = [e.name, e.title].map((e) => String(e ?? "").trim()).filter(Boolean);
4799
+ let r = z.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 ? Dr(e.color) : r ? "var(--page-accent-text, #ffffff)" : "var(--page-text, #111827)", c = i ? Dr(e.color2) : s, f = S && (Or(e) || e.href), p = () => Or(e) ? T(e) : window.open(e.href, "_blank", "noreferrer"), m = e.photo ? t + Ar.pad + N.avatar + 8 : t + N.w / 2, h = e.photo ? "start" : "middle", g = e.photo ? Math.floor((N.w - N.avatar - 26) / 7) : Math.floor(N.w / 7.6), _ = N.h / 2, v = [e.name, e.title].map((e) => String(e ?? "").trim()).filter(Boolean);
4394
4800
  return /* @__PURE__ */ d("g", {
4395
4801
  onClick: f ? p : void 0,
4396
4802
  style: f ? { cursor: "pointer" } : void 0,
@@ -4454,13 +4860,13 @@ function Gn({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
4454
4860
  e.photo && /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("clipPath", {
4455
4861
  id: `${C}-${e.id}`,
4456
4862
  children: /* @__PURE__ */ u("circle", {
4457
- cx: t + Un.pad + N.avatar / 2,
4863
+ cx: t + Ar.pad + N.avatar / 2,
4458
4864
  cy: n + N.h / 2,
4459
4865
  r: N.avatar / 2
4460
4866
  })
4461
4867
  }), /* @__PURE__ */ u("image", {
4462
4868
  href: e.photo,
4463
- x: t + Un.pad,
4869
+ x: t + Ar.pad,
4464
4870
  y: n + (N.h - N.avatar) / 2,
4465
4871
  width: N.avatar,
4466
4872
  height: N.avatar,
@@ -4474,7 +4880,7 @@ function Gn({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
4474
4880
  fontSize: N.title,
4475
4881
  fontWeight: "600",
4476
4882
  fill: s,
4477
- children: zn(e.title, g + 4)
4883
+ children: Er(e.title, g + 4)
4478
4884
  }), e.name && /* @__PURE__ */ u("text", {
4479
4885
  x: m,
4480
4886
  y: n + _ + _ / 2 + N.name * .35,
@@ -4482,7 +4888,7 @@ function Gn({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
4482
4888
  fontSize: N.name,
4483
4889
  fontWeight: "600",
4484
4890
  fill: c,
4485
- children: zn(e.name, g)
4891
+ children: Er(e.name, g)
4486
4892
  })] }) : /* @__PURE__ */ d(l, { children: [v[0] && /* @__PURE__ */ u("text", {
4487
4893
  x: m,
4488
4894
  y: n + (v[1] ? N.h * .43 : N.h * .57),
@@ -4490,7 +4896,7 @@ function Gn({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
4490
4896
  fontSize: N.name,
4491
4897
  fontWeight: "600",
4492
4898
  fill: s,
4493
- children: zn(v[0], g)
4899
+ children: Er(v[0], g)
4494
4900
  }), v[1] && /* @__PURE__ */ u("text", {
4495
4901
  x: m,
4496
4902
  y: n + N.h * .73,
@@ -4498,19 +4904,19 @@ function Gn({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
4498
4904
  fontSize: N.title,
4499
4905
  opacity: "0.7",
4500
4906
  fill: s,
4501
- children: zn(v[1], g + 4)
4907
+ children: Er(v[1], g + 4)
4502
4908
  })] })
4503
4909
  ]
4504
4910
  }, e.id);
4505
4911
  })
4506
4912
  ]
4507
- }), w && /* @__PURE__ */ u(Wn, {
4913
+ }), w && /* @__PURE__ */ u(jr, {
4508
4914
  node: w,
4509
4915
  onClose: () => T(null)
4510
4916
  })]
4511
4917
  });
4512
4918
  }
4513
- function Kn({ value: e, onCommit: t, style: n, hint: r }) {
4919
+ function Nr({ value: e, onCommit: t, style: n, hint: r }) {
4514
4920
  let [a, o] = c(!1), l = s(null);
4515
4921
  return i(() => {
4516
4922
  if (!a || !l.current) return;
@@ -4540,7 +4946,7 @@ function Kn({ value: e, onCommit: t, style: n, hint: r }) {
4540
4946
  children: e ?? ""
4541
4947
  });
4542
4948
  }
4543
- var qn = 360, Jn = "\n.wb-tedit-btn {\n cursor: pointer;\n border-radius: 4px;\n font-size: 11px;\n line-height: 16px;\n min-width: 20px;\n text-align: center;\n padding: 1px 4px;\n user-select: none;\n color: #e2e8f0;\n background: rgba(148, 163, 184, 0.16);\n}\n.wb-tedit-btn:hover { background: #4f46e5; color: #fff; }\n.wb-tedit-btn[data-hint] { position: relative; }\n.wb-tedit-btn[data-hint]:hover::after {\n content: attr(data-hint);\n position: absolute;\n bottom: calc(100% + 6px);\n left: 50%;\n transform: translateX(-50%);\n padding: 3px 6px;\n border-radius: 5px;\n background: #1e293b;\n border: 1px solid rgba(148, 163, 184, 0.35);\n color: #e2e8f0;\n font-size: 10px;\n line-height: 14px;\n white-space: nowrap;\n pointer-events: none;\n z-index: 6;\n}\n.wb-tedit-grip { position: absolute; top: 0; right: -3px; width: 6px; height: 100%; cursor: col-resize; }\n.wb-tedit-grip:hover { background: rgba(99, 102, 241, 0.55); }\n.wb-tedit-rowgrip { position: absolute; left: 0; right: 0; bottom: -3px; height: 6px; cursor: row-resize; }\n.wb-tedit-rowgrip:hover { background: rgba(99, 102, 241, 0.55); }\n.wb-tedit-cellon { outline: 2px solid rgba(99, 102, 241, 0.75); outline-offset: -2px; }\n.wb-tedit-bar {\n position: absolute;\n z-index: 5;\n display: flex;\n align-items: center;\n gap: 3px;\n padding: 4px 5px;\n border-radius: 8px;\n background: #0f172a;\n border: 1px solid rgba(148, 163, 184, 0.35);\n box-shadow: 0 6px 18px rgba(15, 23, 42, 0.35);\n white-space: nowrap;\n}\n.wb-tedit-sep { width: 1px; align-self: stretch; margin: 0 2px; background: rgba(148, 163, 184, 0.3); }\n.wb-tedit-at { font-size: 10px; color: #94a3b8; padding-right: 2px; }\n", Yn = (e, t) => e && t ? `cell-${e}-${t}` : "", Xn = (e) => {
4949
+ var Pr = 360, Fr = "\n.wb-tedit-btn {\n cursor: pointer;\n border-radius: 4px;\n font-size: 11px;\n line-height: 16px;\n min-width: 20px;\n text-align: center;\n padding: 1px 4px;\n user-select: none;\n color: #e2e8f0;\n background: rgba(148, 163, 184, 0.16);\n}\n.wb-tedit-btn:hover { background: #4f46e5; color: #fff; }\n.wb-tedit-btn[data-hint] { position: relative; }\n.wb-tedit-btn[data-hint]:hover::after {\n content: attr(data-hint);\n position: absolute;\n bottom: calc(100% + 6px);\n left: 50%;\n transform: translateX(-50%);\n padding: 3px 6px;\n border-radius: 5px;\n background: #1e293b;\n border: 1px solid rgba(148, 163, 184, 0.35);\n color: #e2e8f0;\n font-size: 10px;\n line-height: 14px;\n white-space: nowrap;\n pointer-events: none;\n z-index: 6;\n}\n.wb-tedit-grip { position: absolute; top: 0; right: -3px; width: 6px; height: 100%; cursor: col-resize; }\n.wb-tedit-grip:hover { background: rgba(99, 102, 241, 0.55); }\n.wb-tedit-rowgrip { position: absolute; left: 0; right: 0; bottom: -3px; height: 6px; cursor: row-resize; }\n.wb-tedit-rowgrip:hover { background: rgba(99, 102, 241, 0.55); }\n.wb-tedit-cellon { outline: 2px solid rgba(99, 102, 241, 0.75); outline-offset: -2px; }\n.wb-tedit-bar {\n position: absolute;\n z-index: 5;\n display: flex;\n align-items: center;\n gap: 3px;\n padding: 4px 5px;\n border-radius: 8px;\n background: #0f172a;\n border: 1px solid rgba(148, 163, 184, 0.35);\n box-shadow: 0 6px 18px rgba(15, 23, 42, 0.35);\n white-space: nowrap;\n}\n.wb-tedit-sep { width: 1px; align-self: stretch; margin: 0 2px; background: rgba(148, 163, 184, 0.3); }\n.wb-tedit-at { font-size: 10px; color: #94a3b8; padding-right: 2px; }\n", Ir = (e, t) => e && t ? `cell-${e}-${t}` : "", Lr = (e) => {
4544
4950
  if (!e || typeof e != "object") return e ?? "";
4545
4951
  let t = String(e.text ?? "");
4546
4952
  return typeof e.href == "string" && e.href ? /* @__PURE__ */ u("a", {
@@ -4551,7 +4957,7 @@ var qn = 360, Jn = "\n.wb-tedit-btn {\n cursor: pointer;\n border-radius: 4px;
4551
4957
  children: t
4552
4958
  }) : t;
4553
4959
  };
4554
- function Zn({ columns: e = [], rows: t = [], widths: n = [], rowKeys: a = [], colKeys: o = [], heights: f = [], spans: p, linked: m, source: h, limit: g = 10, header: _ = !0, striped: v = !0, bordered: y = !1, compact: b = !1, padX: x, padY: S, paged: C, emptyText: w, stickyHeader: T, headerBg: E, headerColor: D, headerAlign: O, borderColor: k, maxHeight: j, style: M, nodeRef: N, edit: P }) {
4960
+ function Rr({ columns: e = [], rows: t = [], widths: n = [], rowKeys: a = [], colKeys: o = [], heights: f = [], spans: p, linked: m, source: h, limit: g = 10, header: _ = !0, striped: v = !0, bordered: y = !1, compact: b = !1, padX: x, padY: S, paged: C, emptyText: w, stickyHeader: T, headerBg: E, headerColor: D, headerAlign: O, borderColor: k, maxHeight: j, style: M, nodeRef: N, edit: P }) {
4555
4961
  let F = s(null), I = s(null), [L, R] = c(null), [z, B] = c(null), V = (e, t) => () => R({
4556
4962
  r: e,
4557
4963
  c: t
@@ -4565,7 +4971,7 @@ function Zn({ columns: e = [], rows: t = [], widths: n = [], rowKeys: a = [], co
4565
4971
  }
4566
4972
  let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = {
4567
4973
  top: r.bottom - n.top + 4,
4568
- left: Math.max(0, Math.min(r.left - n.left, n.width - qn))
4974
+ left: Math.max(0, Math.min(r.left - n.left, n.width - Pr))
4569
4975
  };
4570
4976
  (z?.top !== i.top || z?.left !== i.left) && B(i);
4571
4977
  }), i(() => {
@@ -4575,7 +4981,7 @@ function Zn({ columns: e = [], rows: t = [], widths: n = [], rowKeys: a = [], co
4575
4981
  };
4576
4982
  return document.addEventListener("mousedown", e, !0), () => document.removeEventListener("mousedown", e, !0);
4577
4983
  }, [P, L]);
4578
- let { tenant: H, apiUrl: U } = r(Z), ee = r(xe), te = ee?.[h], ne = C ? Se(ee) : 1, [re, ie] = c(null);
4984
+ let { tenant: H, apiUrl: U } = r(Q), ee = r(et), te = ee?.[h], ne = C ? tt(ee) : 1, [re, ie] = c(null);
4579
4985
  if (i(() => {
4580
4986
  if (!h || te) return;
4581
4987
  let e = !0, t = Math.max(1, Number(g) || 10), n = C && !h.startsWith("api:") ? `?offset=${(ne - 1) * t}&limit=${t}` : "", r = h.startsWith("api:") ? `${U}/data/${encodeURIComponent(h.slice(4))}` : `${U}/dynamic/${encodeURIComponent(h)}${n}`;
@@ -4594,17 +5000,17 @@ function Zn({ columns: e = [], rows: t = [], widths: n = [], rowKeys: a = [], co
4594
5000
  ne,
4595
5001
  g
4596
5002
  ]), !e.length) return null;
4597
- let W = Math.max(1, Number(g) || 10), G = h ? C ? te || h.startsWith("api:") ? (te ?? re ?? []).slice((ne - 1) * W, ne * W) : (re ?? []).slice(0, W) : (te ?? re ?? []).slice(0, W) : null, K = G ? G.map((t) => e.map((e) => Oe(Ee(t?.data, e.field)))) : t, ae = !!h && !(h && !te && re === null) && K.length === 0, q = b ? {
5003
+ let W = Math.max(1, Number(g) || 10), G = h ? C ? te || h.startsWith("api:") ? (te ?? re ?? []).slice((ne - 1) * W, ne * W) : (re ?? []).slice(0, W) : (te ?? re ?? []).slice(0, W) : null, K = G ? G.map((t) => e.map((e) => ct(ot(t?.data, e.field)))) : t, ae = !!h && !(h && !te && re === null) && K.length === 0, q = b ? {
4598
5004
  y: 6,
4599
5005
  x: 10
4600
5006
  } : {
4601
5007
  y: 10,
4602
5008
  x: 14
4603
- }, J = `${Number.isFinite(Number(S)) && S !== "" ? Number(S) : q.y}px ${Number.isFinite(Number(x)) && x !== "" ? Number(x) : q.x}px`, oe = `1px solid ${typeof k == "string" && k ? k : "rgba(148, 163, 184, 0.35)"}`, se = y ? { border: oe } : { borderBottom: oe }, ce = Array.isArray(n) && n.length === e.length && n.every((e) => Number.isFinite(e) && e > 0), le = [
5009
+ }, oe = `${Number.isFinite(Number(S)) && S !== "" ? Number(S) : q.y}px ${Number.isFinite(Number(x)) && x !== "" ? Number(x) : q.x}px`, se = `1px solid ${typeof k == "string" && k ? k : "rgba(148, 163, 184, 0.35)"}`, ce = y ? { border: se } : { borderBottom: se }, le = Array.isArray(n) && n.length === e.length && n.every((e) => Number.isFinite(e) && e > 0), ue = [
4604
5010
  "left",
4605
5011
  "center",
4606
5012
  "right"
4607
- ], ue = (t) => le.includes(e[t]?.align) ? e[t].align : "", de = (e) => ue(e) || (le.includes(O) ? O : "left"), fe = Number.isFinite(Number(j)) && Number(j) > 0 ? Number(j) : 0, pe = A(M), me = !fe && pe && pe.maxHeight !== void 0 ? pe.maxHeight : 0, he = fe || me, ge = me ? {
5013
+ ], J = (t) => ue.includes(e[t]?.align) ? e[t].align : "", de = (e) => J(e) || (ue.includes(O) ? O : "left"), fe = Number.isFinite(Number(j)) && Number(j) > 0 ? Number(j) : 0, pe = A(M), me = !fe && pe && pe.maxHeight !== void 0 ? pe.maxHeight : 0, he = fe || me, ge = me ? {
4608
5014
  ...pe,
4609
5015
  maxHeight: void 0
4610
5016
  } : pe, _e = !!P && P.rows !== !1, ve = (t) => (r) => {
@@ -4612,7 +5018,7 @@ function Zn({ columns: e = [], rows: t = [], widths: n = [], rowKeys: a = [], co
4612
5018
  r.preventDefault(), r.stopPropagation();
4613
5019
  let i = F.current, a = i ? i.clientWidth : 0;
4614
5020
  if (!a) return;
4615
- let o = ce ? [...n] : e.map(() => 100 / e.length), s = r.clientX, c = o[t] + o[t + 1], l = (e) => {
5021
+ let o = le ? [...n] : e.map(() => 100 / e.length), s = r.clientX, c = o[t] + o[t + 1], l = (e) => {
4616
5022
  let n = (e.clientX - s) / a * 100, r = Math.min(c - 5, Math.max(5, o[t] + n)), i = [...o];
4617
5023
  i[t] = Math.round(r * 10) / 10, i[t + 1] = Math.round((c - r) * 10) / 10, P.resize(i);
4618
5024
  }, u = () => {
@@ -4621,7 +5027,7 @@ function Zn({ columns: e = [], rows: t = [], widths: n = [], rowKeys: a = [], co
4621
5027
  window.addEventListener("pointermove", l), window.addEventListener("pointerup", u);
4622
5028
  }, ye = /* @__PURE__ */ new Set();
4623
5029
  p && K.forEach((t, n) => e.forEach((e, t) => {
4624
- let r = p[Yn(a[n], o[t])];
5030
+ let r = p[Ir(a[n], o[t])];
4625
5031
  if (!r) return;
4626
5032
  let i = Math.max(1, Number(r.c) || 1), s = Math.max(1, Number(r.r) || 1);
4627
5033
  for (let e = 0; e < s; e++) for (let r = 0; r < i; r++) (e || r) && ye.add(`${n + e},${t + r}`);
@@ -4644,7 +5050,7 @@ function Zn({ columns: e = [], rows: t = [], widths: n = [], rowKeys: a = [], co
4644
5050
  },
4645
5051
  onClick: n,
4646
5052
  children: e
4647
- }, t), X = L && L.r < K.length && L.c < e.length ? L : null, Q = (e, t) => P?.labels?.[e] ?? t, Ce = X ? p?.[Yn(a[X.r], o[X.c])] : null, we = Math.max(1, Number(Ce?.c) || 1), Te = Math.max(1, Number(Ce?.r) || 1);
5053
+ }, t), X = L && L.r < K.length && L.c < e.length ? L : null, Z = (e, t) => P?.labels?.[e] ?? t, xe = X ? p?.[Ir(a[X.r], o[X.c])] : null, Se = Math.max(1, Number(xe?.c) || 1), Ce = Math.max(1, Number(xe?.r) || 1);
4648
5054
  return /* @__PURE__ */ d("div", {
4649
5055
  ref: (e) => {
4650
5056
  I.current = e, typeof N == "function" && N(e);
@@ -4655,7 +5061,7 @@ function Zn({ columns: e = [], rows: t = [], widths: n = [], rowKeys: a = [], co
4655
5061
  ...ge
4656
5062
  },
4657
5063
  children: [
4658
- P && /* @__PURE__ */ u("style", { children: Jn }),
5064
+ P && /* @__PURE__ */ u("style", { children: Fr }),
4659
5065
  P && X && z && /* @__PURE__ */ d("div", {
4660
5066
  className: "wb-tedit-bar",
4661
5067
  style: {
@@ -4668,21 +5074,21 @@ function Zn({ columns: e = [], rows: t = [], widths: n = [], rowKeys: a = [], co
4668
5074
  className: "wb-tedit-at",
4669
5075
  children: `R${X.r + 1}·C${X.c + 1}`
4670
5076
  }),
4671
- Y("+↑", Q("rowAbove", "Insert row above"), () => P.addRow(X.r - 1)),
4672
- Y("+↓", Q("rowBelow", "Insert row below"), () => P.addRow(X.r)),
4673
- Y("↑", Q("rowUp", "Move row up"), () => P.moveRow(X.r, -1), X.r === 0),
4674
- Y("↓", Q("rowDown", "Move row down"), () => P.moveRow(X.r, 1), X.r >= K.length - 1),
4675
- Y("✕ row", Q("rowDelete", "Delete row"), () => P.dropRow(X.r), K.length <= 1),
5077
+ Y("+↑", Z("rowAbove", "Insert row above"), () => P.addRow(X.r - 1)),
5078
+ Y("+↓", Z("rowBelow", "Insert row below"), () => P.addRow(X.r)),
5079
+ Y("↑", Z("rowUp", "Move row up"), () => P.moveRow(X.r, -1), X.r === 0),
5080
+ Y("↓", Z("rowDown", "Move row down"), () => P.moveRow(X.r, 1), X.r >= K.length - 1),
5081
+ Y("✕ row", Z("rowDelete", "Delete row"), () => P.dropRow(X.r), K.length <= 1),
4676
5082
  /* @__PURE__ */ u("span", { className: "wb-tedit-sep" }),
4677
- Y("+←", Q("colLeft", "Insert column left"), () => P.addColumn(X.c - 1)),
4678
- Y("+→", Q("colRight", "Insert column right"), () => P.addColumn(X.c)),
4679
- Y("←", Q("colMoveLeft", "Move column left"), () => P.moveColumn(X.c, -1), X.c === 0),
4680
- Y("→", Q("colMoveRight", "Move column right"), () => P.moveColumn(X.c, 1), X.c >= e.length - 1),
4681
- Y("✕ col", Q("colDelete", "Delete column"), () => P.dropColumn(X.c), e.length <= 1),
5083
+ Y("+←", Z("colLeft", "Insert column left"), () => P.addColumn(X.c - 1)),
5084
+ Y("+→", Z("colRight", "Insert column right"), () => P.addColumn(X.c)),
5085
+ Y("←", Z("colMoveLeft", "Move column left"), () => P.moveColumn(X.c, -1), X.c === 0),
5086
+ Y("→", Z("colMoveRight", "Move column right"), () => P.moveColumn(X.c, 1), X.c >= e.length - 1),
5087
+ Y("✕ col", Z("colDelete", "Delete column"), () => P.dropColumn(X.c), e.length <= 1),
4682
5088
  /* @__PURE__ */ u("span", { className: "wb-tedit-sep" }),
4683
- Y("↔", Q("mergeRight", "Merge with the cell on the right"), () => P.merge(X.r, X.c, "right"), X.c + we >= e.length),
4684
- Y("↕", Q("mergeDown", "Merge with the cell below"), () => P.merge(X.r, X.c, "down"), X.r + Te >= K.length),
4685
- Y("⤫", Q("split", "Split this cell"), () => P.split(X.r, X.c), we === 1 && Te === 1)
5089
+ Y("↔", Z("mergeRight", "Merge with the cell on the right"), () => P.merge(X.r, X.c, "right"), X.c + Se >= e.length),
5090
+ Y("↕", Z("mergeDown", "Merge with the cell below"), () => P.merge(X.r, X.c, "down"), X.r + Ce >= K.length),
5091
+ Y("⤫", Z("split", "Split this cell"), () => P.split(X.r, X.c), Se === 1 && Ce === 1)
4686
5092
  ]
4687
5093
  }),
4688
5094
  /* @__PURE__ */ u("div", {
@@ -4701,17 +5107,17 @@ function Zn({ columns: e = [], rows: t = [], widths: n = [], rowKeys: a = [], co
4701
5107
  borderCollapse: T && _ !== !1 ? "separate" : "collapse",
4702
5108
  borderSpacing: 0,
4703
5109
  fontSize: 14,
4704
- ...ce ? { tableLayout: "fixed" } : null,
4705
- ...y ? { border: oe } : {}
5110
+ ...le ? { tableLayout: "fixed" } : null,
5111
+ ...y ? { border: se } : {}
4706
5112
  },
4707
5113
  children: [
4708
- ce && /* @__PURE__ */ u("colgroup", { children: n.map((e, t) => /* @__PURE__ */ u("col", { style: { width: `${e}%` } }, t)) }),
5114
+ le && /* @__PURE__ */ u("colgroup", { children: n.map((e, t) => /* @__PURE__ */ u("col", { style: { width: `${e}%` } }, t)) }),
4709
5115
  _ === !1 ? null : /* @__PURE__ */ u("thead", { children: /* @__PURE__ */ u("tr", { children: e.map((t, n) => /* @__PURE__ */ u("th", {
4710
5116
  className: P ? "wb-tedit-head" : void 0,
4711
5117
  style: {
4712
5118
  textAlign: de(n),
4713
5119
  fontWeight: 600,
4714
- padding: J,
5120
+ padding: oe,
4715
5121
  ...typeof D == "string" && D ? { color: D } : null,
4716
5122
  background: typeof E == "string" && E ? E : T ? "var(--page-surface, #f2f2f2)" : "rgba(148, 163, 184, 0.12)",
4717
5123
  ...T ? {
@@ -4719,26 +5125,26 @@ function Zn({ columns: e = [], rows: t = [], widths: n = [], rowKeys: a = [], co
4719
5125
  top: 0,
4720
5126
  zIndex: 2
4721
5127
  } : P ? { position: "relative" } : null,
4722
- ...se
5128
+ ...ce
4723
5129
  },
4724
- children: P ? /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u(Kn, {
5130
+ children: P ? /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u(Nr, {
4725
5131
  value: t.label ?? t,
4726
5132
  onCommit: (e) => P.header(n, e),
4727
- hint: Q("editCell", "Double-click to edit"),
5133
+ hint: Z("editCell", "Double-click to edit"),
4728
5134
  style: { paddingRight: 6 }
4729
5135
  }), n < e.length - 1 && /* @__PURE__ */ u("span", {
4730
5136
  className: "wb-tedit-grip",
4731
- title: Q("colWidth", "Drag to resize the column"),
5137
+ title: Z("colWidth", "Drag to resize the column"),
4732
5138
  onPointerDown: ve(n)
4733
5139
  })] }) : t.label ?? t
4734
5140
  }, n)) }) }),
4735
5141
  /* @__PURE__ */ d("tbody", { children: [ae && /* @__PURE__ */ u("tr", { children: /* @__PURE__ */ u("td", {
4736
5142
  colSpan: e.length,
4737
5143
  style: {
4738
- padding: J,
5144
+ padding: oe,
4739
5145
  textAlign: "center",
4740
5146
  opacity: .6,
4741
- ...se
5147
+ ...ce
4742
5148
  },
4743
5149
  children: w || "No data yet"
4744
5150
  }) }), K.map((t, n) => /* @__PURE__ */ u("tr", {
@@ -4749,7 +5155,7 @@ function Zn({ columns: e = [], rows: t = [], widths: n = [], rowKeys: a = [], co
4749
5155
  },
4750
5156
  children: e.map((e, r) => {
4751
5157
  if (ye.has(`${n},${r}`)) return null;
4752
- let i = Yn(a[n], o[r]), s = m?.[i], c = p?.[i], l = Math.max(1, Number(c?.c) || 1), f = Math.max(1, Number(c?.r) || 1);
5158
+ let i = Ir(a[n], o[r]), s = m?.[i], c = p?.[i], l = Math.max(1, Number(c?.c) || 1), f = Math.max(1, Number(c?.r) || 1);
4753
5159
  return /* @__PURE__ */ d("td", {
4754
5160
  className: P ? `wb-tedit-cell${L?.r === n && L?.c === r ? " wb-tedit-cellon" : ""}` : void 0,
4755
5161
  onMouseDownCapture: _e ? V(n, r) : void 0,
@@ -4757,14 +5163,14 @@ function Zn({ columns: e = [], rows: t = [], widths: n = [], rowKeys: a = [], co
4757
5163
  colSpan: l > 1 ? l : void 0,
4758
5164
  rowSpan: f > 1 ? f : void 0,
4759
5165
  style: {
4760
- padding: J,
4761
- ...ue(r) ? { textAlign: ue(r) } : null,
5166
+ padding: oe,
5167
+ ...J(r) ? { textAlign: J(r) } : null,
4762
5168
  ...P ? { position: "relative" } : null,
4763
- ...se
5169
+ ...ce
4764
5170
  },
4765
- children: [s ?? Xn(t?.[r]), P && _e && /* @__PURE__ */ u("span", {
5171
+ children: [s ?? Lr(t?.[r]), P && _e && /* @__PURE__ */ u("span", {
4766
5172
  className: "wb-tedit-rowgrip",
4767
- title: Q("rowHeight", "Drag to set the row height — double-click to fit the content"),
5173
+ title: Z("rowHeight", "Drag to set the row height — double-click to fit the content"),
4768
5174
  onPointerDown: be(n),
4769
5175
  onDoubleClick: () => P.resizeRow(n, 0)
4770
5176
  })]
@@ -4777,7 +5183,7 @@ function Zn({ columns: e = [], rows: t = [], widths: n = [], rowKeys: a = [], co
4777
5183
  ]
4778
5184
  });
4779
5185
  }
4780
- var Qn = {
5186
+ var zr = {
4781
5187
  small: {
4782
5188
  cell: 62,
4783
5189
  font: 10.5,
@@ -4802,9 +5208,9 @@ var Qn = {
4802
5208
  pad: 8,
4803
5209
  gap: 4
4804
5210
  }
4805
- }, $n = (e) => `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}`, er = (e) => new Date(e.getFullYear(), e.getMonth(), e.getDate()), tr = 366;
4806
- function nr(e, t = {}) {
4807
- 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 ? "" : Oe(e), a = (e) => {
5211
+ }, Br = (e) => `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}`, Vr = (e) => new Date(e.getFullYear(), e.getMonth(), e.getDate()), Hr = 366;
5212
+ function Ur(e, t = {}) {
5213
+ 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 ? "" : ct(e), a = (e) => {
4808
5214
  let t = i(r(e)), n = t ? new Date(t) : null;
4809
5215
  return n && !Number.isNaN(n.getTime()) ? n : null;
4810
5216
  };
@@ -4820,7 +5226,7 @@ function nr(e, t = {}) {
4820
5226
  } : null;
4821
5227
  }).filter(Boolean);
4822
5228
  }
4823
- function rr(e) {
5229
+ function Wr(e) {
4824
5230
  return (Array.isArray(e) ? e : []).map((e, t) => {
4825
5231
  let n = e?.start ? new Date(e.start) : null;
4826
5232
  if (!n || Number.isNaN(n.getTime())) return null;
@@ -4835,20 +5241,20 @@ function rr(e) {
4835
5241
  };
4836
5242
  }).filter(Boolean);
4837
5243
  }
4838
- function ir(e) {
5244
+ function Gr(e) {
4839
5245
  let t = /* @__PURE__ */ new Map();
4840
5246
  for (let n of e) {
4841
- let e = er(n.start), r = n.end ? er(n.end) : e, i = Math.min(Math.max(0, Math.round((r - e) / 864e5)), tr);
5247
+ let e = Vr(n.start), r = n.end ? Vr(n.end) : e, i = Math.min(Math.max(0, Math.round((r - e) / 864e5)), Hr);
4842
5248
  for (let r = 0; r <= i; r += 1) {
4843
- let i = $n(new Date(e.getFullYear(), e.getMonth(), e.getDate() + r));
5249
+ let i = Br(new Date(e.getFullYear(), e.getMonth(), e.getDate() + r));
4844
5250
  t.has(i) || t.set(i, []), t.get(i).push(n);
4845
5251
  }
4846
5252
  }
4847
5253
  for (let e of t.values()) e.sort((e, t) => e.start - t.start);
4848
5254
  return t;
4849
5255
  }
4850
- function ar({ events: e = [], source: t = "", titleField: n = "", startField: a = "", endField: o = "", hrefField: s = "", colorField: f = "", variant: p = "month", size: m = "medium", accent: h = "", eventBg: g = "", eventText: _ = "", borderColor: v = "", weekStart: y = "monday", max: b = 3, emptyText: x = "No events", style: S, nodeRef: C, interactive: w = !0 }) {
4851
- let { tenant: T, apiUrl: E, locale: D } = r(Z), O = r(xe)?.[t], [k, j] = c(null), [M, N] = c(() => {
5256
+ function Kr({ events: e = [], source: t = "", titleField: n = "", startField: a = "", endField: o = "", hrefField: s = "", colorField: f = "", variant: p = "month", size: m = "medium", accent: h = "", eventBg: g = "", eventText: _ = "", borderColor: v = "", weekStart: y = "monday", max: b = 3, emptyText: x = "No events", style: S, nodeRef: C, interactive: w = !0 }) {
5257
+ let { tenant: T, apiUrl: E, locale: D } = r(Q), O = r(et)?.[t], [k, j] = c(null), [M, N] = c(() => {
4852
5258
  let e = /* @__PURE__ */ new Date();
4853
5259
  return {
4854
5260
  year: e.getFullYear(),
@@ -4870,13 +5276,13 @@ function ar({ events: e = [], source: t = "", titleField: n = "", startField: a
4870
5276
  E,
4871
5277
  O
4872
5278
  ]);
4873
- let P = Qn[m] ?? Qn.medium, F = h || "var(--page-accent, #4f46e5)", I = v || "var(--page-border, rgba(148, 163, 184, 0.35))", L = g || F, R = _ || "var(--page-accent-text, #ffffff)", z = t ? nr(O ?? k ?? [], {
5279
+ let P = zr[m] ?? zr.medium, F = h || "var(--page-accent, #4f46e5)", I = v || "var(--page-border, rgba(148, 163, 184, 0.35))", L = g || F, R = _ || "var(--page-accent-text, #ffffff)", z = t ? Ur(O ?? k ?? [], {
4874
5280
  titleField: n,
4875
5281
  startField: a,
4876
5282
  endField: o,
4877
5283
  hrefField: s,
4878
5284
  colorField: f
4879
- }) : rr(e), B = ir(z), V = D || void 0, H = (e, t) => {
5285
+ }) : Wr(e), B = Gr(z), V = D || void 0, H = (e, t) => {
4880
5286
  let n = /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("span", { style: {
4881
5287
  width: 6,
4882
5288
  height: 6,
@@ -5008,10 +5414,10 @@ function ar({ events: e = [], source: t = "", titleField: n = "", startField: a
5008
5414
  })]
5009
5415
  });
5010
5416
  }
5011
- let re = new Date(M.year, M.month, 1), ie = y === "sunday" ? 0 : 1, W = (re.getDay() - ie + 7) % 7, G = new Date(M.year, M.month + 1, 0).getDate(), K = Math.ceil((W + G) / 7), ae = $n(/* @__PURE__ */ new Date()), q = new Intl.DateTimeFormat(V, { weekday: "short" }), J = [];
5417
+ let re = new Date(M.year, M.month, 1), ie = y === "sunday" ? 0 : 1, W = (re.getDay() - ie + 7) % 7, G = new Date(M.year, M.month + 1, 0).getDate(), K = Math.ceil((W + G) / 7), ae = Br(/* @__PURE__ */ new Date()), q = new Intl.DateTimeFormat(V, { weekday: "short" }), oe = [];
5012
5418
  for (let e = 0; e < K * 7; e += 1) {
5013
- let t = e - W + 1, n = t >= 1 && t <= G, r = $n(new Date(M.year, M.month, t)), i = n ? B.get(r) ?? [] : [], a = i.slice(0, Math.max(1, b)), o = n && r === ae;
5014
- J.push(/* @__PURE__ */ d("div", {
5419
+ let t = e - W + 1, n = t >= 1 && t <= G, r = Br(new Date(M.year, M.month, t)), i = n ? B.get(r) ?? [] : [], a = i.slice(0, Math.max(1, b)), o = n && r === ae;
5420
+ oe.push(/* @__PURE__ */ d("div", {
5015
5421
  style: {
5016
5422
  minHeight: P.cell,
5017
5423
  borderTop: `1px solid ${I}`,
@@ -5069,30 +5475,30 @@ function ar({ events: e = [], source: t = "", titleField: n = "", startField: a
5069
5475
  padding: `0 0 ${P.pad}px`
5070
5476
  },
5071
5477
  children: q.format(new Date(2024, 0, 7 + ie + t))
5072
- }, `head-${t}`)), J]
5478
+ }, `head-${t}`)), oe]
5073
5479
  }),
5074
5480
  /* @__PURE__ */ u("div", { style: { borderTop: `1px solid ${I}` } })
5075
5481
  ]
5076
5482
  });
5077
5483
  }
5078
- var or = {
5484
+ var qr = {
5079
5485
  small: 36,
5080
5486
  medium: 56,
5081
5487
  large: 88
5082
5488
  };
5083
- function sr(e, t = {}) {
5084
- let n = Array.isArray(e) ? e.filter((e) => e && typeof e == "object") : [], r = (e) => e == null ? "" : Oe(e);
5489
+ function Jr(e, t = {}) {
5490
+ let n = Array.isArray(e) ? e.filter((e) => e && typeof e == "object") : [], r = (e) => e == null ? "" : ct(e);
5085
5491
  return n.map((e) => {
5086
- let n = e.data ?? e, i = Ee(n, t.imageField), a = Array.isArray(i) ? i[0] : i, o = a && typeof a == "object" ? a.url ?? a.src ?? "" : a, s = t.nameField ? r(Ee(n, t.nameField)) : r(n.name);
5492
+ let n = e.data ?? e, i = ot(n, t.imageField), a = Array.isArray(i) ? i[0] : i, o = a && typeof a == "object" ? a.url ?? a.src ?? "" : a, s = t.nameField ? r(ot(n, t.nameField)) : r(n.name);
5087
5493
  return {
5088
5494
  src: typeof o == "string" ? o.trim() : "",
5089
5495
  alt: s,
5090
- href: t.hrefField ? r(Ee(n, t.hrefField)) : ""
5496
+ href: t.hrefField ? r(ot(n, t.hrefField)) : ""
5091
5497
  };
5092
5498
  }).filter((e) => e.src);
5093
5499
  }
5094
- function cr({ logos: e = [], source: t = "", imageField: n = "", nameField: a = "", hrefField: o = "", variant: f = "step", size: p = "medium", perView: m = 5, gap: h = 48, hold: g = 3, slideMs: _ = 500, direction: v = "left", arrows: y = "show", pauseOnHover: b = !0, grayscale: x = !0, newTab: S = !0, emptyText: C = "", style: w, nodeRef: T, inert: E }) {
5095
- let { tenant: D, apiUrl: O } = r(Z), k = r(xe)?.[t], [j, M] = c(null), N = s(null), P = s(null), [F, I] = c(0), [L, R] = c(0), [z, B] = c(0), [V, H] = c(!0), [U, ee] = c(!1), [te, ne] = c(!1);
5500
+ function Yr({ logos: e = [], source: t = "", imageField: n = "", nameField: a = "", hrefField: o = "", variant: f = "step", size: p = "medium", perView: m = 5, gap: h = 48, hold: g = 3, slideMs: _ = 500, direction: v = "left", arrows: y = "show", pauseOnHover: b = !0, grayscale: x = !0, newTab: S = !0, emptyText: C = "", style: w, nodeRef: T, inert: E }) {
5501
+ let { tenant: D, apiUrl: O } = r(Q), k = r(et)?.[t], [j, M] = c(null), N = s(null), P = s(null), [F, I] = c(0), [L, R] = c(0), [z, B] = c(0), [V, H] = c(!0), [U, ee] = c(!1), [te, ne] = c(!1);
5096
5502
  i(() => {
5097
5503
  if (!t || k) return;
5098
5504
  let e = !0;
@@ -5131,11 +5537,11 @@ function cr({ logos: e = [], source: t = "", imageField: n = "", nameField: a =
5131
5537
  t = !1, r.forEach((e) => e.removeEventListener("load", n));
5132
5538
  };
5133
5539
  });
5134
- let re = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && e.src) : [], ie = t ? sr(k ?? j ?? [], {
5540
+ let re = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && e.src) : [], ie = t ? Jr(k ?? j ?? [], {
5135
5541
  imageField: n,
5136
5542
  nameField: a,
5137
5543
  hrefField: o
5138
- }) : re, W = or[p] ?? or.medium, G = Number.isFinite(Number(h)) ? Math.max(0, Number(h)) : 48, ae = f === "marquee" ? "step" : f, q = Math.min(3e4, Math.max(300, (Number(g) || 3) * 1e3)), J = Math.min(3e3, Math.max(100, Number(_) || 500)), oe = Math.min(12, Math.max(1, Math.round(Number(m) || 5))), se = (L || W * 3) + G, ce = F ? Math.max(1, Math.floor(F / se)) : oe, le = Math.min(oe, ce), ue = F ? Math.min(se, F / le) : se;
5544
+ }) : re, W = qr[p] ?? qr.medium, G = Number.isFinite(Number(h)) ? Math.max(0, Number(h)) : 48, ae = f === "marquee" ? "step" : f, q = Math.min(3e4, Math.max(300, (Number(g) || 3) * 1e3)), oe = Math.min(3e3, Math.max(100, Number(_) || 500)), se = Math.min(12, Math.max(1, Math.round(Number(m) || 5))), ce = (L || W * 3) + G, le = F ? Math.max(1, Math.floor(F / ce)) : se, ue = Math.min(se, le), J = F ? Math.min(ce, F / ue) : ce;
5139
5545
  if (!ie.length) return /* @__PURE__ */ u("div", {
5140
5546
  ref: T,
5141
5547
  style: {
@@ -5181,7 +5587,7 @@ function cr({ logos: e = [], source: t = "", imageField: n = "", nameField: a =
5181
5587
  children: C
5182
5588
  }) : null
5183
5589
  });
5184
- let de = ie.length, fe = ae === "step" && de > le, pe = ae === "slider", me = fe && !E && !U && !te, he = v === "right", ge = he ? de : 0, _e = fe ? [...ie, ...ie] : ie, ve = fe ? z * ue : 0, ye = (e, t, n) => {
5590
+ let de = ie.length, fe = ae === "step" && de > ue, pe = ae === "slider", me = fe && !E && !U && !te, he = v === "right", ge = he ? de : 0, _e = fe ? [...ie, ...ie] : ie, ve = fe ? z * J : 0, ye = (e, t, n) => {
5185
5591
  let r = /* @__PURE__ */ u("img", {
5186
5592
  src: e.src,
5187
5593
  alt: e.alt ?? "",
@@ -5193,7 +5599,7 @@ function cr({ logos: e = [], source: t = "", imageField: n = "", nameField: a =
5193
5599
  display: "block"
5194
5600
  }
5195
5601
  }), i = fe ? {
5196
- width: ue,
5602
+ width: J,
5197
5603
  flex: "0 0 auto",
5198
5604
  padding: `0 ${G / 2}px`,
5199
5605
  justifyContent: "center"
@@ -5225,9 +5631,9 @@ function cr({ logos: e = [], source: t = "", imageField: n = "", nameField: a =
5225
5631
  display: "flex",
5226
5632
  alignItems: "center",
5227
5633
  ...fe ? {
5228
- width: _e.length * ue,
5634
+ width: _e.length * J,
5229
5635
  transform: `translateX(-${ve}px)`,
5230
- transition: V ? `transform ${J}ms ease` : "none"
5636
+ transition: V ? `transform ${oe}ms ease` : "none"
5231
5637
  } : pe ? {
5232
5638
  gap: G,
5233
5639
  overflowX: "auto",
@@ -5258,7 +5664,7 @@ function cr({ logos: e = [], source: t = "", imageField: n = "", nameField: a =
5258
5664
  H(!1), B(n), requestAnimationFrame(() => requestAnimationFrame(() => {
5259
5665
  H(!0), B(n + e);
5260
5666
  }));
5261
- }, X = y === !1 || y === "off" ? "off" : y === "hover" ? "hover" : "show", Se = X !== "off" && (pe ? F > 0 : fe), Q = (e) => /* @__PURE__ */ u("button", {
5667
+ }, X = y === !1 || y === "off" ? "off" : y === "hover" ? "hover" : "show", Z = X !== "off" && (pe ? F > 0 : fe), xe = (e) => /* @__PURE__ */ u("button", {
5262
5668
  type: "button",
5263
5669
  "aria-label": e < 0 ? "Previous logos" : "Next logos",
5264
5670
  onClick: () => Y(e),
@@ -5303,27 +5709,27 @@ function cr({ logos: e = [], source: t = "", imageField: n = "", nameField: a =
5303
5709
  fe ? /* @__PURE__ */ d("div", {
5304
5710
  style: {
5305
5711
  position: "relative",
5306
- width: le * ue,
5712
+ width: ue * J,
5307
5713
  maxWidth: "100%",
5308
5714
  margin: "0 auto"
5309
5715
  },
5310
5716
  children: [
5311
- Se ? Q(-1) : null,
5717
+ Z ? xe(-1) : null,
5312
5718
  /* @__PURE__ */ u("div", {
5313
5719
  style: { overflow: "hidden" },
5314
5720
  children: be
5315
5721
  }),
5316
- Se ? Q(1) : null
5722
+ Z ? xe(1) : null
5317
5723
  ]
5318
5724
  }) : /* @__PURE__ */ d(l, { children: [
5319
- Se ? Q(-1) : null,
5725
+ Z ? xe(-1) : null,
5320
5726
  be,
5321
- Se ? Q(1) : null
5727
+ Z ? xe(1) : null
5322
5728
  ] }),
5323
- /* @__PURE__ */ u(lr, {
5729
+ /* @__PURE__ */ u(Xr, {
5324
5730
  running: me,
5325
- every: q + J,
5326
- slide: J,
5731
+ every: q + oe,
5732
+ slide: oe,
5327
5733
  step: he ? -1 : 1,
5328
5734
  index: z,
5329
5735
  total: de,
@@ -5334,7 +5740,7 @@ function cr({ logos: e = [], source: t = "", imageField: n = "", nameField: a =
5334
5740
  ]
5335
5741
  });
5336
5742
  }
5337
- function lr({ running: e, every: t, slide: n, step: r, index: a, total: o, home: s, setIndex: c, setAnimate: l }) {
5743
+ function Xr({ running: e, every: t, slide: n, step: r, index: a, total: o, home: s, setIndex: c, setAnimate: l }) {
5338
5744
  i(() => {
5339
5745
  if (!e) return;
5340
5746
  let n = setInterval(() => {
@@ -5370,13 +5776,13 @@ function lr({ running: e, every: t, slide: n, step: r, index: a, total: o, home:
5370
5776
  l
5371
5777
  ]), null;
5372
5778
  }
5373
- var ur = {
5779
+ var Zr = {
5374
5780
  small: 380,
5375
5781
  medium: 560,
5376
5782
  large: 820,
5377
5783
  full: "100%"
5378
5784
  };
5379
- function dr({ dialogId: e = "", trigger: t = "button", triggerLabel: n = "Open", openOn: r = "trigger", delay: a = 0, size: o = "medium", title: l = "", showClose: f = !0, backdropClose: p = !0, position: m = "center", actions: h = [], showCloseAction: g = !1, closeLabel: _ = "Close", actionsAlign: v = "right", linked: y, style: b, nodeRef: x, inert: S = !1 }) {
5785
+ function Qr({ dialogId: e = "", trigger: t = "button", triggerLabel: n = "Open", openOn: r = "trigger", delay: a = 0, size: o = "medium", title: l = "", showClose: f = !0, backdropClose: p = !0, position: m = "center", actions: h = [], showCloseAction: g = !1, closeLabel: _ = "Close", actionsAlign: v = "right", linked: y, style: b, nodeRef: x, inert: S = !1 }) {
5380
5786
  let [C, w] = c(!1), T = s(null);
5381
5787
  i(() => {
5382
5788
  if (S || !e) return;
@@ -5401,7 +5807,7 @@ function dr({ dialogId: e = "", trigger: t = "button", triggerLabel: n = "Open",
5401
5807
  document.removeEventListener("keydown", e), document.body.style.overflow = t;
5402
5808
  };
5403
5809
  }, [S, C]);
5404
- let E = ur[o] ?? ur.medium, D = (e) => {
5810
+ let E = Zr[o] ?? Zr.medium, D = (e) => {
5405
5811
  let t = {
5406
5812
  padding: "9px 16px",
5407
5813
  borderRadius: 6,
@@ -5570,7 +5976,7 @@ function dr({ dialogId: e = "", trigger: t = "button", triggerLabel: n = "Open",
5570
5976
  })]
5571
5977
  });
5572
5978
  }
5573
- function fr({ dropdownId: e = "", trigger: t = "button", triggerLabel: n = "Menu", openOn: r = "hover", align: a = "left", panelWidth: o = "", offset: l = 8, editorOpen: f = !0, linked: p, style: m, nodeRef: h, inert: g = !1 }) {
5979
+ function $r({ dropdownId: e = "", trigger: t = "button", triggerLabel: n = "Menu", openOn: r = "hover", align: a = "left", panelWidth: o = "", offset: l = 8, editorOpen: f = !0, linked: p, style: m, nodeRef: h, inert: g = !1 }) {
5574
5980
  let [_, v] = c(!1), y = s(null), b = s(null), x = r !== "click", S = () => {
5575
5981
  b.current && clearTimeout(b.current), b.current = null;
5576
5982
  }, C = () => {
@@ -5671,100 +6077,102 @@ function fr({ dropdownId: e = "", trigger: t = "button", triggerLabel: n = "Menu
5671
6077
  }), E]
5672
6078
  });
5673
6079
  }
5674
- var pr = {
5675
- PageRoot: ze,
5676
- CalendarBlock: ar,
5677
- LogoCarousel: cr,
5678
- DialogBlock: dr,
5679
- DropdownBlock: fr,
5680
- Section: Be,
5681
- Container: Ve,
5682
- Heading: He,
5683
- TextBlock: nt,
5684
- ButtonBlock: at,
5685
- ImageBlock: ot,
5686
- Spacer: mt,
5687
- Divider: ht,
5688
- BoxBlock: gt,
5689
- SliderBlock: St,
5690
- CanvasSlider: Ct,
5691
- TabsBlock: zt,
5692
- QuickStack: fn,
5693
- CollectionList: pn,
5694
- CollectionSearch: mn,
5695
- BreadcrumbsBlock: hn,
5696
- PaginationBlock: gn,
5697
- StepperBlock: Nn,
5698
- SocialLinksBlock: Mn,
5699
- ThemeModeBlock: xn,
5700
- ScrollTopBlock: An,
5701
- CounterBlock: kn,
5702
- OrgChartBlock: Gn,
5703
- TableBlock: Zn,
5704
- IconBlock: Mt,
5705
- MapBlock: At,
5706
- MasonryBlock: Pt,
5707
- AccordionBlock: Bt,
5708
- NavbarBlock: Rt,
5709
- ListBlock: tt,
5710
- TextSpan: Ke,
5711
- QuoteBlock: et,
5712
- TextLink: it,
5713
- RichTextBlock: Qe,
5714
- RichContentBlock: Qe,
5715
- VideoBlock: st,
5716
- YouTubeBlock: lt,
5717
- IframeBlock: ut,
5718
- EmbedBlock: pt,
5719
- FormBlock: $t,
5720
- FormLabel: an,
5721
- FormInput: on,
5722
- FormTextarea: sn,
5723
- FormCheckbox: (e) => /* @__PURE__ */ u(cn, {
6080
+ var ei = {
6081
+ PageRoot: yt,
6082
+ MarkdownBlock: Rt,
6083
+ CalendarBlock: Kr,
6084
+ LogoCarousel: Yr,
6085
+ DialogBlock: Qr,
6086
+ DropdownBlock: $r,
6087
+ Section: bt,
6088
+ Container: xt,
6089
+ LinkBlock: St,
6090
+ Heading: Ct,
6091
+ TextBlock: Ht,
6092
+ ButtonBlock: Kt,
6093
+ ImageBlock: qt,
6094
+ Spacer: tn,
6095
+ Divider: nn,
6096
+ BoxBlock: rn,
6097
+ SliderBlock: un,
6098
+ CanvasSlider: dn,
6099
+ TabsBlock: Dn,
6100
+ QuickStack: $n,
6101
+ CollectionList: er,
6102
+ CollectionSearch: tr,
6103
+ BreadcrumbsBlock: nr,
6104
+ PaginationBlock: rr,
6105
+ StepperBlock: br,
6106
+ SocialLinksBlock: yr,
6107
+ ThemeModeBlock: cr,
6108
+ ScrollTopBlock: _r,
6109
+ CounterBlock: gr,
6110
+ OrgChartBlock: Mr,
6111
+ TableBlock: Rr,
6112
+ IconBlock: bn,
6113
+ MapBlock: vn,
6114
+ MasonryBlock: Sn,
6115
+ AccordionBlock: On,
6116
+ NavbarBlock: En,
6117
+ ListBlock: Vt,
6118
+ TextSpan: Ot,
6119
+ QuoteBlock: Bt,
6120
+ TextLink: Gt,
6121
+ RichTextBlock: Lt,
6122
+ RichContentBlock: Lt,
6123
+ VideoBlock: Jt,
6124
+ YouTubeBlock: Xt,
6125
+ IframeBlock: Zt,
6126
+ EmbedBlock: en,
6127
+ FormBlock: Vn,
6128
+ FormLabel: Kn,
6129
+ FormInput: qn,
6130
+ FormTextarea: Jn,
6131
+ FormCheckbox: (e) => /* @__PURE__ */ u(Yn, {
5724
6132
  kind: "checkbox",
5725
6133
  ...e
5726
6134
  }),
5727
- FormRadio: (e) => /* @__PURE__ */ u(cn, {
6135
+ FormRadio: (e) => /* @__PURE__ */ u(Yn, {
5728
6136
  kind: "radio",
5729
6137
  ...e
5730
6138
  }),
5731
- FormSelect: ln,
5732
- FormFile: un,
5733
- FormRecaptcha: rn,
5734
- FormSubmit: dn
5735
- }, mr = {
6139
+ FormSelect: Xn,
6140
+ FormFile: Zn,
6141
+ FormRecaptcha: Gn,
6142
+ FormSubmit: Qn
6143
+ }, ti = {
5736
6144
  id: "auth",
5737
6145
  label: "Accounts",
5738
6146
  category: "Apps",
5739
6147
  keys: ["SiteLoginForm", "SiteAccountMenu"],
5740
6148
  ssr: "shell",
5741
6149
  settings: ["site.authRedirect"]
5742
- }, hr = t({
6150
+ }, ni = t({
5743
6151
  user: null,
5744
6152
  status: "idle",
5745
6153
  ensure: () => {},
5746
6154
  refresh: () => {},
5747
6155
  signOut: () => {}
5748
6156
  });
5749
- function gr(e, t) {
6157
+ function ri(e, t) {
5750
6158
  return t ? /^https?:\/\//i.test(t) ? t : `${e.replace(/\/+$/, "")}${t.startsWith("/") ? t : `/${t}`}` : "";
5751
6159
  }
5752
- function _r(e) {
6160
+ function ii(e) {
5753
6161
  let t = e && typeof e == "object" ? e["site.session"] : null, n = t && typeof t == "object" && !Array.isArray(t) ? t : {}, r = (e) => typeof e == "string" ? e.trim() : "", i = r(n.url), a = r(n.mePath), o = r(n.logoutPath);
5754
6162
  return {
5755
6163
  mode: n.mode === "custom" || n.mode === "off" ? n.mode : "system",
5756
6164
  url: i,
5757
6165
  mePath: a,
5758
6166
  logoutPath: o,
5759
- meUrl: gr(i, a),
5760
- logoutUrl: gr(i, o),
6167
+ meUrl: ri(i, a),
6168
+ logoutUrl: ri(i, o),
5761
6169
  loginPage: r(n.loginPage),
5762
6170
  userPath: r(n.userPath),
5763
6171
  auth: n.auth === "bearer" ? "bearer" : "cookies",
5764
6172
  tokenKey: r(n.tokenKey) || "webim_session_token"
5765
6173
  };
5766
6174
  }
5767
- function vr(e, t) {
6175
+ function ai(e, t) {
5768
6176
  if (!t) return e ?? null;
5769
6177
  let n = e;
5770
6178
  for (let e of t.split(".")) {
@@ -5773,26 +6181,26 @@ function vr(e, t) {
5773
6181
  }
5774
6182
  return n ?? null;
5775
6183
  }
5776
- function yr(e) {
6184
+ function oi(e) {
5777
6185
  try {
5778
6186
  return window.localStorage.getItem(e) || "";
5779
6187
  } catch {
5780
6188
  return "";
5781
6189
  }
5782
6190
  }
5783
- function br(e) {
6191
+ function si(e) {
5784
6192
  try {
5785
6193
  window.localStorage.removeItem(e);
5786
6194
  } catch {}
5787
6195
  }
5788
- var xr = () => {
5789
- let e = r(hr);
6196
+ var ci = () => {
6197
+ let e = r(ni);
5790
6198
  return i(() => {
5791
6199
  e.ensure();
5792
6200
  }, [e]), e;
5793
6201
  };
5794
- function Sr({ children: e, initialUser: t, disabled: a, apiUrl: l, tenant: d }) {
5795
- let f = r(Z), p = l || f?.apiUrl || "/api", m = d || f?.tenant || "", h = o(() => _r(f?.settings), [f?.settings]), [g, _] = c(t ?? null), [v, y] = c(t ? "user" : a ? "guest" : "idle"), b = s(!1), x = n((e, t) => fetch(`${p}${e}`, {
6202
+ function li({ children: e, initialUser: t, disabled: a, apiUrl: l, tenant: d }) {
6203
+ let f = r(Q), p = l || f?.apiUrl || "/api", m = d || f?.tenant || "", h = o(() => ii(f?.settings), [f?.settings]), [g, _] = c(t ?? null), [v, y] = c(t ? "user" : a ? "guest" : "idle"), b = s(!1), x = n((e, t) => fetch(`${p}${e}`, {
5796
6204
  ...t,
5797
6205
  credentials: "include",
5798
6206
  headers: {
@@ -5804,9 +6212,9 @@ function Sr({ children: e, initialUser: t, disabled: a, apiUrl: l, tenant: d })
5804
6212
  if (a) return Promise.resolve(null);
5805
6213
  if (h.mode === "off") return Promise.resolve(S(null));
5806
6214
  if (h.mode === "custom") {
5807
- let e = h.auth === "bearer" ? yr(h.tokenKey) : "";
6215
+ let e = h.auth === "bearer" ? oi(h.tokenKey) : "";
5808
6216
  return !h.meUrl || h.auth === "bearer" && !e ? Promise.resolve(S(null)) : fetch(h.meUrl, { ...h.auth === "bearer" ? { headers: { authorization: `Bearer ${e}` } } : { credentials: "include" } }).then((e) => e.ok ? e.json() : null).then((e) => {
5809
- let t = vr(e, h.userPath);
6217
+ let t = ai(e, h.userPath);
5810
6218
  return S(t && typeof t == "object" ? t : null);
5811
6219
  }).catch(() => S(null));
5812
6220
  }
@@ -5819,12 +6227,12 @@ function Sr({ children: e, initialUser: t, disabled: a, apiUrl: l, tenant: d })
5819
6227
  ]), w = n(() => {
5820
6228
  if (h.mode === "off") return S(null), Promise.resolve();
5821
6229
  if (h.mode === "custom") {
5822
- let e = h.auth === "bearer" ? yr(h.tokenKey) : "";
6230
+ let e = h.auth === "bearer" ? oi(h.tokenKey) : "";
5823
6231
  return (h.logoutUrl ? fetch(h.logoutUrl, {
5824
6232
  method: "post",
5825
6233
  ...h.auth === "bearer" ? { headers: e ? { authorization: `Bearer ${e}` } : {} } : { credentials: "include" }
5826
6234
  }).catch(() => {}) : Promise.resolve()).then(() => {
5827
- h.auth === "bearer" && br(h.tokenKey), S(null);
6235
+ h.auth === "bearer" && si(h.tokenKey), S(null);
5828
6236
  });
5829
6237
  }
5830
6238
  return x("/site/logout", { method: "post" }).catch(() => {}).then(() => {
@@ -5874,19 +6282,19 @@ function Sr({ children: e, initialUser: t, disabled: a, apiUrl: l, tenant: d })
5874
6282
  h.loginPage,
5875
6283
  C,
5876
6284
  w
5877
- ]), /* @__PURE__ */ u(hr.Provider, {
6285
+ ]), /* @__PURE__ */ u(ni.Provider, {
5878
6286
  value: E,
5879
6287
  children: e
5880
6288
  });
5881
6289
  }
5882
- function Cr({ when: e, children: t }) {
5883
- let { status: n } = xr();
6290
+ function ui({ when: e, children: t }) {
6291
+ let { status: n } = ci();
5884
6292
  return !e || e === "always" ? t : n === "idle" || n === "loading" ? null : e === "user" == (n === "user") ? t : null;
5885
6293
  }
5886
6294
  //#endregion
5887
6295
  //#region ../ui/src/components/builder/apps/auth/views.jsx
5888
- function wr({ 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 }) {
5889
- let { tenant: h, apiUrl: g, settings: _ } = r(Z), [v, y] = c("form"), [b, x] = c(""), [S, C] = c(!1), w = e === "register", T = f ? m || "form" : v, E = (e) => typeof e == "string" && e.startsWith("/") && !e.startsWith("//") ? e : "", D = async (e) => {
6296
+ function di({ 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 }) {
6297
+ let { tenant: h, apiUrl: g, settings: _ } = r(Q), [v, y] = c("form"), [b, x] = c(""), [S, C] = c(!1), w = e === "register", T = f ? m || "form" : v, E = (e) => typeof e == "string" && e.startsWith("/") && !e.startsWith("//") ? e : "", D = async (e) => {
5890
6298
  if (e.preventDefault(), f) return;
5891
6299
  let n = new FormData(e.currentTarget);
5892
6300
  C(!0), x("");
@@ -5934,20 +6342,20 @@ function wr({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
5934
6342
  children: [
5935
6343
  w ? /* @__PURE__ */ d("label", {
5936
6344
  style: {
5937
- ...Ht,
6345
+ ...An,
5938
6346
  display: "grid",
5939
6347
  gap: 6
5940
6348
  },
5941
6349
  children: [a, /* @__PURE__ */ u("input", {
5942
6350
  name: "name",
5943
6351
  type: "text",
5944
- style: Ut,
5945
- ...Gt(f)
6352
+ style: jn,
6353
+ ...Nn(f)
5946
6354
  })]
5947
6355
  }) : null,
5948
6356
  /* @__PURE__ */ d("label", {
5949
6357
  style: {
5950
- ...Ht,
6358
+ ...An,
5951
6359
  display: "grid",
5952
6360
  gap: 6
5953
6361
  },
@@ -5955,13 +6363,13 @@ function wr({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
5955
6363
  name: "email",
5956
6364
  type: "email",
5957
6365
  required: !f,
5958
- style: Ut,
5959
- ...Gt(f)
6366
+ style: jn,
6367
+ ...Nn(f)
5960
6368
  })]
5961
6369
  }),
5962
6370
  /* @__PURE__ */ d("label", {
5963
6371
  style: {
5964
- ...Ht,
6372
+ ...An,
5965
6373
  display: "grid",
5966
6374
  gap: 6
5967
6375
  },
@@ -5969,15 +6377,15 @@ function wr({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
5969
6377
  name: "password",
5970
6378
  type: "password",
5971
6379
  required: !f,
5972
- style: Ut,
5973
- ...Gt(f)
6380
+ style: jn,
6381
+ ...Nn(f)
5974
6382
  })]
5975
6383
  }),
5976
6384
  /* @__PURE__ */ u("button", {
5977
6385
  type: f ? "button" : "submit",
5978
6386
  disabled: S || void 0,
5979
6387
  style: {
5980
- ...Pe,
6388
+ ...mt,
5981
6389
  border: 0,
5982
6390
  padding: "10px 22px",
5983
6391
  borderRadius: 8,
@@ -6009,8 +6417,8 @@ function wr({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
6009
6417
  ]
6010
6418
  });
6011
6419
  }
6012
- function Tr({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !1, style: r, nodeRef: i, inert: a, linked: o, show: s }) {
6013
- let { user: c, status: l, signOut: f } = xr(), p = a ? s || "user" : l, m = a ? {
6420
+ function fi({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !1, style: r, nodeRef: i, inert: a, linked: o, show: s }) {
6421
+ let { user: c, status: l, signOut: f } = ci(), p = a ? s || "user" : l, m = a ? {
6014
6422
  name: "Ada Lovelace",
6015
6423
  email: "ada@example.com"
6016
6424
  } : c;
@@ -6031,7 +6439,7 @@ function Tr({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
6031
6439
  children: [
6032
6440
  /* @__PURE__ */ d("span", {
6033
6441
  style: {
6034
- ...Ht,
6442
+ ...An,
6035
6443
  fontWeight: 600
6036
6444
  },
6037
6445
  children: [
@@ -6042,7 +6450,7 @@ function Tr({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
6042
6450
  }),
6043
6451
  n && m?.email ? /* @__PURE__ */ u("span", {
6044
6452
  style: {
6045
- ...Ht,
6453
+ ...An,
6046
6454
  opacity: .7
6047
6455
  },
6048
6456
  children: m.email
@@ -6051,14 +6459,14 @@ function Tr({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
6051
6459
  type: "button",
6052
6460
  onClick: a ? void 0 : f,
6053
6461
  style: {
6054
- ...Pe,
6462
+ ...mt,
6055
6463
  border: 0,
6056
6464
  padding: "8px 16px",
6057
6465
  borderRadius: 8,
6058
6466
  fontSize: 14,
6059
6467
  cursor: a ? "default" : "pointer"
6060
6468
  },
6061
- ...Gt(a),
6469
+ ...Nn(a),
6062
6470
  children: t
6063
6471
  })
6064
6472
  ]
@@ -6075,40 +6483,40 @@ function Tr({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
6075
6483
  }
6076
6484
  //#endregion
6077
6485
  //#region ../ui/src/components/builder/apps/consent/manifest.js
6078
- var Er = {
6486
+ var pi = {
6079
6487
  id: "consent",
6080
6488
  label: "Cookie consent",
6081
6489
  category: "Apps",
6082
6490
  keys: ["CookieConsent"],
6083
6491
  ssr: "shell",
6084
6492
  settings: []
6085
- }, Dr = "webim.cookie_consent";
6086
- function Or() {
6493
+ }, mi = "webim.cookie_consent";
6494
+ function hi() {
6087
6495
  try {
6088
- let e = window.localStorage.getItem(Dr), t = e ? JSON.parse(e) : null;
6496
+ let e = window.localStorage.getItem(mi), t = e ? JSON.parse(e) : null;
6089
6497
  return t?.choice === "accepted" || t?.choice === "declined" ? t.choice : "";
6090
6498
  } catch {
6091
6499
  return "";
6092
6500
  }
6093
6501
  }
6094
- function kr(e) {
6502
+ function gi(e) {
6095
6503
  try {
6096
6504
  document.querySelectorAll(".webim-page").forEach((t) => t.setAttribute("data-webim-consent", e));
6097
6505
  } catch {}
6098
6506
  }
6099
- function Ar(e) {
6507
+ function _i(e) {
6100
6508
  try {
6101
- window.localStorage.setItem(Dr, JSON.stringify({
6509
+ window.localStorage.setItem(mi, JSON.stringify({
6102
6510
  choice: e,
6103
6511
  at: (/* @__PURE__ */ new Date()).toISOString()
6104
6512
  }));
6105
6513
  } catch {}
6106
- kr(e);
6514
+ gi(e);
6107
6515
  try {
6108
6516
  window.dispatchEvent(new CustomEvent("webim:consent", { detail: { choice: e } }));
6109
6517
  } catch {}
6110
6518
  }
6111
- var jr = {
6519
+ var vi = {
6112
6520
  bottom: {
6113
6521
  left: 0,
6114
6522
  right: 0,
@@ -6130,18 +6538,18 @@ var jr = {
6130
6538
  maxWidth: 400
6131
6539
  }
6132
6540
  };
6133
- function Mr({ message: e, acceptLabel: t, rejectLabel: n, showReject: r, linkLabel: a, linkHref: o, position: s, linked: f, style: p, nodeRef: m, inert: h }) {
6541
+ function yi({ message: e, acceptLabel: t, rejectLabel: n, showReject: r, linkLabel: a, linkHref: o, position: s, linked: f, style: p, nodeRef: m, inert: h }) {
6134
6542
  let [g, _] = c(!!h), [v, y] = c(null), b = (e) => {
6135
6543
  y(e), typeof m == "function" && m(e);
6136
6544
  };
6137
6545
  if (i(() => {
6138
6546
  if (h) return;
6139
- let e = Or();
6140
- e ? kr(e) : _(!0);
6547
+ let e = hi();
6548
+ e ? gi(e) : _(!0);
6141
6549
  }, [h, v]), !g) return null;
6142
6550
  let x = (e) => () => {
6143
- h || (Ar(e), _(!1));
6144
- }, S = jr[s] ?? jr.bottom, C = {
6551
+ h || (_i(e), _(!1));
6552
+ }, S = vi[s] ?? vi.bottom, C = {
6145
6553
  appearance: "none",
6146
6554
  font: "inherit",
6147
6555
  fontSize: 14,
@@ -6221,37 +6629,37 @@ function Mr({ message: e, acceptLabel: t, rejectLabel: n, showReject: r, linkLab
6221
6629
  }
6222
6630
  //#endregion
6223
6631
  //#region ../ui/src/components/builder/apps/language/manifest.js
6224
- var Nr = {
6632
+ var bi = {
6225
6633
  id: "language",
6226
6634
  label: "Language",
6227
6635
  category: "Apps",
6228
6636
  keys: ["SiteLanguagePicker"],
6229
6637
  ssr: "prefetch",
6230
6638
  settings: ["locales"]
6231
- }, Pr = {
6639
+ }, xi = {
6232
6640
  id: "search",
6233
6641
  label: "Search",
6234
6642
  category: "Apps",
6235
6643
  keys: ["SiteSearch"],
6236
6644
  ssr: "prefetch",
6237
6645
  settings: []
6238
- }, Fr = 50, Ir = 2e3;
6239
- function Lr() {
6646
+ }, Si = 50, Ci = 2e3;
6647
+ function wi() {
6240
6648
  return typeof window > "u" ? "" : new URLSearchParams(window.location.search).get("q") ?? "";
6241
6649
  }
6242
- function Rr(e, t) {
6650
+ function Ti(e, t) {
6243
6651
  let n = e?.data ?? {}, r = [];
6244
6652
  for (let e of Object.values(n)) {
6245
- let t = e == null ? "" : Oe(e);
6246
- if (t && r.push(t), r.join(" ").length > Ir) break;
6653
+ let t = e == null ? "" : ct(e);
6654
+ if (t && r.push(t), r.join(" ").length > Ci) break;
6247
6655
  }
6248
- return r.join(" ").slice(0, Ir).toLocaleLowerCase(t || void 0);
6656
+ return r.join(" ").slice(0, Ci).toLocaleLowerCase(t || void 0);
6249
6657
  }
6250
- function zr({ placeholder: e = "Search…", buttonLabel: t = "Search", showButton: n = !0, live: a = !1, layout: o = "inline", includePages: l = !0, collections: f = [], limit: p = 10, emptyText: m = "Nothing found", hint: h = "", style: g, nodeRef: _, inert: v = !1, sample: y = !1 }) {
6251
- let { tenant: b, apiUrl: x, locale: S } = r(Z), [C, w] = c(() => Lr()), [T, E] = c(() => Lr()), [D, O] = c(null), [k, j] = c(!1), M = s(null), N = o === "popup";
6658
+ function Ei({ placeholder: e = "Search…", buttonLabel: t = "Search", showButton: n = !0, live: a = !1, layout: o = "inline", includePages: l = !0, collections: f = [], limit: p = 10, emptyText: m = "Nothing found", hint: h = "", style: g, nodeRef: _, inert: v = !1, sample: y = !1 }) {
6659
+ let { tenant: b, apiUrl: x, locale: S } = r(Q), [C, w] = c(() => wi()), [T, E] = c(() => wi()), [D, O] = c(null), [k, j] = c(!1), M = s(null), N = o === "popup";
6252
6660
  i(() => {
6253
6661
  let e = () => {
6254
- let e = Lr();
6662
+ let e = wi();
6255
6663
  w(e), E(e);
6256
6664
  };
6257
6665
  return window.addEventListener("popstate", e), window.addEventListener("webim:urlchange", e), () => {
@@ -6302,8 +6710,8 @@ function zr({ placeholder: e = "Search…", buttonLabel: t = "Search", showButto
6302
6710
  });
6303
6711
  }
6304
6712
  else for (let t of e.rows) {
6305
- if (!Rr(t, S).includes(P)) continue;
6306
- let n = t?.data ?? {}, r = Oe(n.name) || "Untitled", i = Oe(n.slug);
6713
+ if (!Ti(t, S).includes(P)) continue;
6714
+ let n = t?.data ?? {}, r = ct(n.name) || "Untitled", i = ct(n.slug);
6307
6715
  F.push({
6308
6716
  key: `entry:${t.id}`,
6309
6717
  title: r,
@@ -6311,7 +6719,7 @@ function zr({ placeholder: e = "Search…", buttonLabel: t = "Search", showButto
6311
6719
  kind: "entry"
6312
6720
  });
6313
6721
  }
6314
- let I = F.slice(0, Math.min(Math.max(1, p), Fr)), L = (e) => {
6722
+ let I = F.slice(0, Math.min(Math.max(1, p), Si)), L = (e) => {
6315
6723
  if (v) {
6316
6724
  e.preventDefault(), w(T), j(!0);
6317
6725
  return;
@@ -6393,7 +6801,7 @@ function zr({ placeholder: e = "Search…", buttonLabel: t = "Search", showButto
6393
6801
  onChange: (e) => E(e.target.value),
6394
6802
  onFocus: () => P && j(!0),
6395
6803
  style: {
6396
- ...Ut,
6804
+ ...jn,
6397
6805
  flexGrow: 1,
6398
6806
  minWidth: 0
6399
6807
  }
@@ -6451,21 +6859,21 @@ function zr({ placeholder: e = "Search…", buttonLabel: t = "Search", showButto
6451
6859
  }
6452
6860
  //#endregion
6453
6861
  //#region ../ui/src/components/builder/apps/language/views.jsx
6454
- function Br(e) {
6862
+ function Di(e) {
6455
6863
  let t = e?.locales, n = [typeof t?.default == "string" && t.default.trim() ? t.default.trim() : "", ...Array.isArray(t?.enabled) ? t.enabled : []].filter((e) => typeof e == "string" && e.trim());
6456
6864
  return [...new Set(n.map((e) => e.trim()))];
6457
6865
  }
6458
- var Vr = (e) => e && e.charAt(0).toUpperCase() + e.slice(1);
6459
- function Hr(e, t) {
6866
+ var Oi = (e) => e && e.charAt(0).toUpperCase() + e.slice(1);
6867
+ function ki(e, t) {
6460
6868
  let n = String(e ?? "").toUpperCase();
6461
6869
  if (t === "code") return n;
6462
6870
  let r = "";
6463
6871
  try {
6464
- r = Vr(new Intl.DisplayNames([e], { type: "language" }).of(e) ?? "");
6872
+ r = Oi(new Intl.DisplayNames([e], { type: "language" }).of(e) ?? "");
6465
6873
  } catch {}
6466
6874
  return !r || r.toUpperCase() === n ? n : t === "both" ? `${n} — ${r}` : r;
6467
6875
  }
6468
- function Ur(e, t) {
6876
+ function Ai(e, t) {
6469
6877
  let n = t ? "" : `?locale=${encodeURIComponent(e)}`;
6470
6878
  if (typeof window > "u") return n || "?";
6471
6879
  try {
@@ -6475,8 +6883,8 @@ function Ur(e, t) {
6475
6883
  return n || "/";
6476
6884
  }
6477
6885
  }
6478
- function Wr({ variant: e, display: t, separator: n, label: i, style: a, nodeRef: o, inert: s }) {
6479
- let c = r(Z), l = Br(c?.settings), f = l[0] ?? "", p = l.includes(c?.locale) ? c.locale : f, m = {
6886
+ function ji({ variant: e, display: t, separator: n, label: i, style: a, nodeRef: o, inert: s }) {
6887
+ let c = r(Q), l = Di(c?.settings), f = l[0] ?? "", p = l.includes(c?.locale) ? c.locale : f, m = {
6480
6888
  display: "inline-flex",
6481
6889
  alignItems: "center",
6482
6890
  gap: 8,
@@ -6511,7 +6919,7 @@ function Wr({ variant: e, display: t, separator: n, label: i, style: a, nodeRef:
6511
6919
  style: { opacity: .4 },
6512
6920
  children: n ?? "·"
6513
6921
  }), /* @__PURE__ */ u("a", {
6514
- href: Ur(e, e === f),
6922
+ href: Ai(e, e === f),
6515
6923
  hrefLang: e,
6516
6924
  "aria-current": e === p ? "true" : void 0,
6517
6925
  onClick: s ? (e) => e.preventDefault() : void 0,
@@ -6521,7 +6929,7 @@ function Wr({ variant: e, display: t, separator: n, label: i, style: a, nodeRef:
6521
6929
  textDecoration: "none",
6522
6930
  cursor: s ? "default" : "pointer"
6523
6931
  },
6524
- children: Hr(e, t)
6932
+ children: ki(e, t)
6525
6933
  })]
6526
6934
  }, e))]
6527
6935
  }) : /* @__PURE__ */ d("div", {
@@ -6532,7 +6940,7 @@ function Wr({ variant: e, display: t, separator: n, label: i, style: a, nodeRef:
6532
6940
  value: p,
6533
6941
  onChange: s ? void 0 : (e) => {
6534
6942
  let t = e.target.value;
6535
- window.location.assign(Ur(t, t === f));
6943
+ window.location.assign(Ai(t, t === f));
6536
6944
  },
6537
6945
  onKeyDown: s ? (e) => e.preventDefault() : void 0,
6538
6946
  style: {
@@ -6546,47 +6954,47 @@ function Wr({ variant: e, display: t, separator: n, label: i, style: a, nodeRef:
6546
6954
  },
6547
6955
  children: l.map((e) => /* @__PURE__ */ u("option", {
6548
6956
  value: e,
6549
- children: Hr(e, t)
6957
+ children: ki(e, t)
6550
6958
  }, e))
6551
6959
  })]
6552
6960
  });
6553
6961
  }
6554
6962
  //#endregion
6555
6963
  //#region ../ui/src/components/builder/apps/index.js
6556
- var Gr = [
6557
- mr,
6558
- Nr,
6559
- Er,
6560
- Pr
6561
- ], Kr = {
6562
- SiteLoginForm: wr,
6563
- SiteAccountMenu: Tr,
6564
- SiteLanguagePicker: Wr,
6565
- CookieConsent: Mr,
6566
- SiteSearch: zr
6964
+ var Mi = [
6965
+ ti,
6966
+ bi,
6967
+ pi,
6968
+ xi
6969
+ ], Ni = {
6970
+ SiteLoginForm: di,
6971
+ SiteAccountMenu: fi,
6972
+ SiteLanguagePicker: ji,
6973
+ CookieConsent: yi,
6974
+ SiteSearch: Ei
6567
6975
  };
6568
- new Set(Gr.filter((e) => e.ssr === "shell").flatMap((e) => e.keys));
6976
+ new Set(Mi.filter((e) => e.ssr === "shell").flatMap((e) => e.keys));
6569
6977
  //#endregion
6570
6978
  //#region ../ui/src/components/builder/three/runtime.js
6571
- var qr = "0.185.1", Jr = "4.2.0", Yr = "https://cdn.jsdelivr.net/npm", Xr = `${Yr}/three@${qr}/+esm`, Zr = `${Yr}/@google/model-viewer@${Jr}/dist/model-viewer.min.js`, Qr = (e) => import(
6979
+ var Pi = "0.185.1", Fi = "4.2.0", Ii = "https://cdn.jsdelivr.net/npm", Li = `${Ii}/three@${Pi}/+esm`, Ri = `${Ii}/@google/model-viewer@${Fi}/dist/model-viewer.min.js`, zi = (e) => import(
6572
6980
  /* @vite-ignore */
6573
6981
  /* webpackIgnore: true */
6574
6982
  e
6575
- ), $r = /* @__PURE__ */ new Map();
6576
- function ei(e) {
6577
- if ($r.has(e)) return $r.get(e);
6983
+ ), Bi = /* @__PURE__ */ new Map();
6984
+ function Vi(e) {
6985
+ if (Bi.has(e)) return Bi.get(e);
6578
6986
  if (typeof window > "u") return new Promise(() => {});
6579
- let t = Qr(e).catch((t) => {
6580
- throw $r.delete(e), t;
6987
+ let t = zi(e).catch((t) => {
6988
+ throw Bi.delete(e), t;
6581
6989
  });
6582
- return $r.set(e, t), t;
6990
+ return Bi.set(e, t), t;
6583
6991
  }
6584
- var ti = () => ei(Xr), ni = (e) => ei(`${Yr}/three@${qr}/examples/jsm/${e}/+esm`);
6585
- function ri() {
6586
- return typeof window < "u" && window.customElements?.get("model-viewer") ? Promise.resolve(null) : ei(Zr);
6992
+ var Hi = () => Vi(Li), Ui = (e) => Vi(`${Ii}/three@${Pi}/examples/jsm/${e}/+esm`);
6993
+ function Wi() {
6994
+ return typeof window < "u" && window.customElements?.get("model-viewer") ? Promise.resolve(null) : Vi(Ri);
6587
6995
  }
6588
- var ii = () => typeof window < "u" && !!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches, ai = (e = 2) => Math.min(typeof window > "u" ? 1 : window.devicePixelRatio || 1, e);
6589
- function oi(e, t) {
6996
+ var Gi = () => typeof window < "u" && !!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches, Ki = (e = 2) => Math.min(typeof window > "u" ? 1 : window.devicePixelRatio || 1, e);
6997
+ function qi(e, t) {
6590
6998
  let n = 0, r = 0, i = 0, a = !0, o = (e) => {
6591
6999
  n = requestAnimationFrame(o), i ||= e;
6592
7000
  let a = r ? (e - r) / 1e3 : 0;
@@ -6605,7 +7013,7 @@ function oi(e, t) {
6605
7013
  s(), l?.disconnect(), document.removeEventListener("visibilitychange", c);
6606
7014
  };
6607
7015
  }
6608
- function si(e, t, n = {}) {
7016
+ function Ji(e, t, n = {}) {
6609
7017
  let r = {
6610
7018
  radius: n.distance ?? 4,
6611
7019
  polar: n.polar ?? Math.PI / 2.4,
@@ -6654,13 +7062,13 @@ function si(e, t, n = {}) {
6654
7062
  }
6655
7063
  //#endregion
6656
7064
  //#region ../ui/src/components/builder/three/views.jsx
6657
- var ci = (e, t) => Number.isFinite(Number(e)) && Number(e) > 0 ? Number(e) : t, li = (e, t) => (Number.isFinite(Number(e)) ? Number(e) : t) / 100, ui = (e) => (Number.isFinite(Number(e)) ? Number(e) : 0) * Math.PI / 180, di = (e) => typeof e == "string" && !!e.trim();
6658
- function fi({ label: e, note: t, height: n, nodeRef: r, style: i }) {
7065
+ var Yi = (e, t) => Number.isFinite(Number(e)) && Number(e) > 0 ? Number(e) : t, Xi = (e, t) => (Number.isFinite(Number(e)) ? Number(e) : t) / 100, Zi = (e) => (Number.isFinite(Number(e)) ? Number(e) : 0) * Math.PI / 180, Qi = (e) => typeof e == "string" && !!e.trim();
7066
+ function $i({ label: e, note: t, height: n, nodeRef: r, style: i }) {
6659
7067
  return /* @__PURE__ */ d("div", {
6660
7068
  ref: r,
6661
7069
  style: {
6662
7070
  ...A(i),
6663
- minHeight: ci(n, 320),
7071
+ minHeight: Yi(n, 320),
6664
7072
  display: "flex",
6665
7073
  flexDirection: "column",
6666
7074
  alignItems: "center",
@@ -6688,24 +7096,24 @@ function fi({ label: e, note: t, height: n, nodeRef: r, style: i }) {
6688
7096
  }) : null]
6689
7097
  });
6690
7098
  }
6691
- function pi({ src: e, poster: t, alt: n, height: r, bg: a, autoRotate: o, rotateDelay: s, cameraControls: l, ar: d, exposure: f, shadow: p, fieldOfView: m, environment: h, style: g, nodeRef: _, inert: v }) {
7099
+ function ea({ src: e, poster: t, alt: n, height: r, bg: a, autoRotate: o, rotateDelay: s, cameraControls: l, ar: d, exposure: f, shadow: p, fieldOfView: m, environment: h, style: g, nodeRef: _, inert: v }) {
6692
7100
  let [y, b] = c(typeof window < "u" && !!window.customElements?.get("model-viewer")), [x, S] = c(!1);
6693
7101
  i(() => {
6694
7102
  if (y || !e) return;
6695
7103
  let t = !0;
6696
- return ri().then(() => t && b(!0), () => t && S(!0)), () => {
7104
+ return Wi().then(() => t && b(!0), () => t && S(!0)), () => {
6697
7105
  t = !1;
6698
7106
  };
6699
7107
  }, [y, e]);
6700
7108
  let C = {
6701
7109
  display: "block",
6702
7110
  width: "100%",
6703
- minHeight: ci(r, 360),
6704
- height: ci(r, 360),
7111
+ minHeight: Yi(r, 360),
7112
+ height: Yi(r, 360),
6705
7113
  backgroundColor: a || "transparent",
6706
7114
  ...A(g)
6707
7115
  };
6708
- if (!e) return v ? /* @__PURE__ */ u(fi, {
7116
+ if (!e) return v ? /* @__PURE__ */ u($i, {
6709
7117
  nodeRef: _,
6710
7118
  style: g,
6711
7119
  height: r,
@@ -6740,13 +7148,13 @@ function pi({ src: e, poster: t, alt: n, height: r, bg: a, autoRotate: o, rotate
6740
7148
  poster: t || void 0,
6741
7149
  style: C,
6742
7150
  "camera-controls": w(!v && l !== !1),
6743
- "auto-rotate": w(T && !ii()),
6744
- "auto-rotate-delay": T ? String(ci(s, 0)) : void 0,
7151
+ "auto-rotate": w(T && !Gi()),
7152
+ "auto-rotate-delay": T ? String(Yi(s, 0)) : void 0,
6745
7153
  "rotation-per-second": "18deg",
6746
7154
  ar: w(!v && d === !0),
6747
7155
  "ar-modes": "webxr scene-viewer quick-look",
6748
- "shadow-intensity": String(li(p, 100)),
6749
- exposure: String(li(f, 100)),
7156
+ "shadow-intensity": String(Xi(p, 100)),
7157
+ exposure: String(Xi(f, 100)),
6750
7158
  "field-of-view": m ? `${Number(m)}deg` : void 0,
6751
7159
  "environment-image": h && h !== "neutral" ? h : "neutral",
6752
7160
  "interaction-prompt": v ? "none" : void 0,
@@ -6764,7 +7172,7 @@ function pi({ src: e, poster: t, alt: n, height: r, bg: a, autoRotate: o, rotate
6764
7172
  }) : null
6765
7173
  });
6766
7174
  }
6767
- var mi = ["attribute vec2 p;", "void main() { gl_Position = vec4(p, 0.0, 1.0); }"].join("\n"), hi = [
7175
+ var ta = ["attribute vec2 p;", "void main() { gl_Position = vec4(p, 0.0, 1.0); }"].join("\n"), na = [
6768
7176
  "precision highp float;",
6769
7177
  "uniform vec2 u_res;",
6770
7178
  "uniform float u_time;",
@@ -6787,7 +7195,7 @@ var mi = ["attribute vec2 p;", "void main() { gl_Position = vec4(p, 0.0, 1.0); }
6787
7195
  " return v;",
6788
7196
  "}",
6789
7197
  ""
6790
- ].join("\n"), gi = {
7198
+ ].join("\n"), ra = {
6791
7199
  gradient: [
6792
7200
  "void main(){",
6793
7201
  " vec2 uv = gl_FragCoord.xy / u_res;",
@@ -6839,7 +7247,7 @@ var mi = ["attribute vec2 p;", "void main() { gl_Position = vec4(p, 0.0, 1.0); }
6839
7247
  "}"
6840
7248
  ].join("\n")
6841
7249
  };
6842
- function _i(e, t) {
7250
+ function ia(e, t) {
6843
7251
  let n = /^#?([0-9a-f]{6})$/i.exec(String(e ?? "").trim());
6844
7252
  if (!n) return t;
6845
7253
  let r = parseInt(n[1], 16);
@@ -6849,7 +7257,7 @@ function _i(e, t) {
6849
7257
  (r & 255) / 255
6850
7258
  ];
6851
7259
  }
6852
- function vi(e, t, n) {
7260
+ function aa(e, t, n) {
6853
7261
  let r = e.createShader(t);
6854
7262
  if (e.shaderSource(r, n), e.compileShader(r), !e.getShaderParameter(r, e.COMPILE_STATUS)) {
6855
7263
  let t = e.getShaderInfoLog(r);
@@ -6857,13 +7265,13 @@ function vi(e, t, n) {
6857
7265
  }
6858
7266
  return r;
6859
7267
  }
6860
- function yi({ preset: e, code: t, colorA: n, colorB: r, colorC: a, speed: o, scale: l, height: f, interactive: p, style: m, nodeRef: h, inert: g }) {
7268
+ function oa({ preset: e, code: t, colorA: n, colorB: r, colorC: a, speed: o, scale: l, height: f, interactive: p, style: m, nodeRef: h, inert: g }) {
6861
7269
  let _ = s(null), v = s(null), y = s(null), [b, x] = c("");
6862
7270
  i(() => () => {
6863
7271
  let e = y.current;
6864
7272
  y.current = null, e?.getExtension("WEBGL_lose_context")?.loseContext();
6865
7273
  }, []);
6866
- let S = typeof t == "string" && t.trim() ? t : gi[e] ?? gi.gradient, C = String(n ?? ""), w = String(r ?? ""), T = String(a ?? ""), E = li(o, 100), D = Math.max(.05, li(l, 100));
7274
+ let S = typeof t == "string" && t.trim() ? t : ra[e] ?? ra.gradient, C = String(n ?? ""), w = String(r ?? ""), T = String(a ?? ""), E = Xi(o, 100), D = Math.max(.05, Xi(l, 100));
6867
7275
  return i(() => {
6868
7276
  let e = _.current, t = v.current;
6869
7277
  if (!e || !t) return;
@@ -6878,7 +7286,7 @@ function yi({ preset: e, code: t, colorA: n, colorB: r, colorC: a, speed: o, sca
6878
7286
  }
6879
7287
  let r = null;
6880
7288
  try {
6881
- let e = vi(n, n.VERTEX_SHADER, mi), t = vi(n, n.FRAGMENT_SHADER, hi + S);
7289
+ let e = aa(n, n.VERTEX_SHADER, ta), t = aa(n, n.FRAGMENT_SHADER, na + S);
6882
7290
  if (r = n.createProgram(), n.attachShader(r, e), n.attachShader(r, t), n.linkProgram(r), !n.getProgramParameter(r, n.LINK_STATUS)) throw Error(n.getProgramInfoLog(r) || "Link failed");
6883
7291
  x("");
6884
7292
  } catch (e) {
@@ -6914,28 +7322,28 @@ function yi({ preset: e, code: t, colorA: n, colorB: r, colorC: a, speed: o, sca
6914
7322
  };
6915
7323
  p !== !1 && t.addEventListener("pointermove", l);
6916
7324
  let u = () => {
6917
- let r = ai(), i = Math.max(1, Math.round(t.clientWidth * r)), a = Math.max(1, Math.round(t.clientHeight * r));
7325
+ let r = Ki(), i = Math.max(1, Math.round(t.clientWidth * r)), a = Math.max(1, Math.round(t.clientHeight * r));
6918
7326
  (e.width !== i || e.height !== a) && (e.width = i, e.height = a, n.viewport(0, 0, i, a));
6919
7327
  }, d = typeof ResizeObserver > "u" ? null : new ResizeObserver(u);
6920
7328
  d?.observe(t), u();
6921
- let f = ii(), m = {
6922
- a: _i(C, [
7329
+ let f = Gi(), m = {
7330
+ a: ia(C, [
6923
7331
  .35,
6924
7332
  .4,
6925
7333
  .95
6926
7334
  ]),
6927
- b: _i(w, [
7335
+ b: ia(w, [
6928
7336
  .05,
6929
7337
  .06,
6930
7338
  .16
6931
7339
  ]),
6932
- c: _i(T, [
7340
+ c: ia(T, [
6933
7341
  .95,
6934
7342
  .35,
6935
7343
  .6
6936
7344
  ])
6937
7345
  }, h = {};
6938
- return h.stop = oi(t, (t, r) => {
7346
+ return h.stop = qi(t, (t, r) => {
6939
7347
  u(), n.uniform2f(s.res, e.width, e.height), n.uniform1f(s.time, (f ? 0 : r) * E), n.uniform2f(s.mouse, c.x, c.y), n.uniform3fv(s.a, m.a), n.uniform3fv(s.b, m.b), n.uniform3fv(s.c, m.c), n.uniform1f(s.scale, D), n.drawArrays(n.TRIANGLES, 0, 3), f && h.stop?.();
6940
7348
  }), () => {
6941
7349
  h.stop?.(), d?.disconnect(), t.removeEventListener("pointermove", l), n.deleteProgram(r), n.deleteBuffer(i);
@@ -6954,7 +7362,7 @@ function yi({ preset: e, code: t, colorA: n, colorB: r, colorC: a, speed: o, sca
6954
7362
  },
6955
7363
  style: {
6956
7364
  position: "relative",
6957
- minHeight: ci(f, 320),
7365
+ minHeight: Yi(f, 320),
6958
7366
  overflow: "hidden",
6959
7367
  ...A(m)
6960
7368
  },
@@ -6986,7 +7394,7 @@ function yi({ preset: e, code: t, colorA: n, colorB: r, colorC: a, speed: o, sca
6986
7394
  }) : null]
6987
7395
  });
6988
7396
  }
6989
- function bi(e, t) {
7397
+ function sa(e, t) {
6990
7398
  let n = new e.Scene(), r = new e.BoxGeometry();
6991
7399
  r.deleteAttribute("uv");
6992
7400
  let i = new e.Mesh(r, new e.MeshBasicMaterial({
@@ -7002,23 +7410,23 @@ function bi(e, t) {
7002
7410
  let o = new e.PMREMGenerator(t), s = o.fromScene(n, .04);
7003
7411
  return o.dispose(), r.dispose(), n.traverse((e) => e.material?.dispose?.()), s.texture;
7004
7412
  }
7005
- var xi = /* @__PURE__ */ new Map();
7006
- function Si(e) {
7007
- if (xi.has(e)) return xi.get(e);
7008
- let t = ni("loaders/GLTFLoader.js").then((t) => new Promise((n, r) => {
7413
+ var ca = /* @__PURE__ */ new Map();
7414
+ function la(e) {
7415
+ if (ca.has(e)) return ca.get(e);
7416
+ let t = Ui("loaders/GLTFLoader.js").then((t) => new Promise((n, r) => {
7009
7417
  new t.GLTFLoader().load(e, (e) => n(e.scene), void 0, r);
7010
7418
  })).catch((t) => {
7011
- throw xi.delete(e), t;
7419
+ throw ca.delete(e), t;
7012
7420
  });
7013
- return xi.set(e, t), t;
7421
+ return ca.set(e, t), t;
7014
7422
  }
7015
- function Ci(e, t) {
7423
+ function ua(e, t) {
7016
7424
  let n = new e.Box3().setFromObject(t);
7017
7425
  if (n.isEmpty()) return t;
7018
7426
  let r = n.getSize(new e.Vector3()), i = n.getCenter(new e.Vector3()), a = Math.max(r.x, r.y, r.z) || 1, o = new e.Group();
7019
7427
  return t.position.sub(i), t.scale.multiplyScalar(1 / a), t.position.multiplyScalar(1 / a), o.add(t), o;
7020
7428
  }
7021
- var wi = {
7429
+ var da = {
7022
7430
  box: (e) => new e.BoxGeometry(1, 1, 1, 1, 1, 1),
7023
7431
  sphere: (e) => new e.SphereGeometry(.62, 48, 32),
7024
7432
  torus: (e) => new e.TorusGeometry(.5, .2, 24, 64),
@@ -7027,50 +7435,50 @@ var wi = {
7027
7435
  cylinder: (e) => new e.CylinderGeometry(.45, .45, 1.1, 48),
7028
7436
  plane: (e) => new e.PlaneGeometry(1.4, 1.4),
7029
7437
  capsule: (e) => new e.CapsuleGeometry(.35, .6, 8, 32)
7030
- }, Ti = (e, t) => Number.isFinite(Number(e)) ? Number(e) : t;
7031
- function Ei({ objects: e, background: t, cameraDistance: n, fov: r, autoRotate: a, spinSpeed: o, controls: l, ground: d, height: f, style: p, nodeRef: m, inert: h }) {
7032
- let g = s(null), [_, v] = c(!1), y = Array.isArray(e) ? e.filter((e) => e && typeof e == "object") : [], b = JSON.stringify(y), x = a !== !1 && !ii(), S = l !== !1 && !h;
7438
+ }, fa = (e, t) => Number.isFinite(Number(e)) ? Number(e) : t;
7439
+ function pa({ objects: e, background: t, cameraDistance: n, fov: r, autoRotate: a, spinSpeed: o, controls: l, ground: d, height: f, style: p, nodeRef: m, inert: h }) {
7440
+ let g = s(null), [_, v] = c(!1), y = Array.isArray(e) ? e.filter((e) => e && typeof e == "object") : [], b = JSON.stringify(y), x = a !== !1 && !Gi(), S = l !== !1 && !h;
7033
7441
  return i(() => {
7034
7442
  let e = g.current;
7035
7443
  if (!e) return;
7036
7444
  let i = !0, a = null;
7037
- return ti().then((s) => {
7445
+ return Hi().then((s) => {
7038
7446
  if (!i || !e) return;
7039
7447
  let c = new s.WebGLRenderer({
7040
7448
  antialias: !0,
7041
7449
  alpha: !t
7042
7450
  });
7043
- c.setPixelRatio(ai()), c.shadowMap.enabled = d !== !1, c.shadowMap.type = s.PCFSoftShadowMap, c.outputColorSpace = s.SRGBColorSpace, c.toneMapping = s.ACESFilmicToneMapping, c.domElement.style.display = "block", c.domElement.style.width = "100%", c.domElement.style.height = "100%", e.appendChild(c.domElement);
7451
+ c.setPixelRatio(Ki()), c.shadowMap.enabled = d !== !1, c.shadowMap.type = s.PCFSoftShadowMap, c.outputColorSpace = s.SRGBColorSpace, c.toneMapping = s.ACESFilmicToneMapping, c.domElement.style.display = "block", c.domElement.style.width = "100%", c.domElement.style.height = "100%", e.appendChild(c.domElement);
7044
7452
  let l = new s.Scene();
7045
- t && (l.background = new s.Color(t)), l.environment = bi(s, c);
7046
- let u = new s.PerspectiveCamera(Ti(r, 45), 1, .1, 400), f = si(u, c.domElement, {
7047
- distance: Ti(n, 5),
7453
+ t && (l.background = new s.Color(t)), l.environment = sa(s, c);
7454
+ let u = new s.PerspectiveCamera(fa(r, 45), 1, .1, 400), f = Ji(u, c.domElement, {
7455
+ distance: fa(n, 5),
7048
7456
  enableZoom: S
7049
7457
  }), p = new s.DirectionalLight(16777215, 2.2);
7050
7458
  p.position.set(4, 7, 5), p.castShadow = d !== !1, p.shadow.mapSize.set(1024, 1024), p.shadow.camera.near = .5, p.shadow.camera.far = 30, l.add(p, new s.AmbientLight(16777215, .35));
7051
7459
  let m = [], h = new s.Group(), g = (e, t) => {
7052
- let n = Ti(t.scale, 1);
7053
- e.position.set(Ti(t.x, 0), Ti(t.y, 0), Ti(t.z, 0)), e.rotation.set(ui(t.rx), ui(t.ry), ui(t.rz)), e.scale.setScalar(n > 0 ? n : 1), e.userData.spin = ui(t.spin);
7460
+ let n = fa(t.scale, 1);
7461
+ e.position.set(fa(t.x, 0), fa(t.y, 0), fa(t.z, 0)), e.rotation.set(Zi(t.rx), Zi(t.ry), Zi(t.rz)), e.scale.setScalar(n > 0 ? n : 1), e.userData.spin = Zi(t.spin);
7054
7462
  };
7055
7463
  for (let e of y) {
7056
7464
  if (e.shape === "model") {
7057
- if (!di(e.src)) continue;
7465
+ if (!Qi(e.src)) continue;
7058
7466
  let t = new s.Group();
7059
- g(t, e), h.add(t), Si(e.src).then((e) => {
7467
+ g(t, e), h.add(t), la(e.src).then((e) => {
7060
7468
  if (!i) return;
7061
- let n = Ci(s, e.clone(!0));
7469
+ let n = ua(s, e.clone(!0));
7062
7470
  n.traverse((e) => {
7063
7471
  e.isMesh && (e.castShadow = !0, e.receiveShadow = !0);
7064
7472
  }), t.add(n);
7065
7473
  }, () => {});
7066
7474
  continue;
7067
7475
  }
7068
- let t = (wi[e.shape] ?? wi.box)(s), n = new s.MeshStandardMaterial({
7476
+ let t = (da[e.shape] ?? da.box)(s), n = new s.MeshStandardMaterial({
7069
7477
  color: /^#?[0-9a-f]{6}$/i.test(String(e.color ?? "")) ? e.color : "#6366f1",
7070
- metalness: Math.min(1, Math.max(0, li(e.metalness, 10))),
7071
- roughness: Math.min(1, Math.max(0, li(e.roughness, 35))),
7072
- transparent: li(e.opacity, 100) < 1,
7073
- opacity: Math.min(1, Math.max(0, li(e.opacity, 100))),
7478
+ metalness: Math.min(1, Math.max(0, Xi(e.metalness, 10))),
7479
+ roughness: Math.min(1, Math.max(0, Xi(e.roughness, 35))),
7480
+ transparent: Xi(e.opacity, 100) < 1,
7481
+ opacity: Math.min(1, Math.max(0, Xi(e.opacity, 100))),
7074
7482
  flatShading: e.flat === !0,
7075
7483
  wireframe: e.wireframe === !0,
7076
7484
  side: e.shape === "plane" ? s.DoubleSide : s.FrontSide
@@ -7081,14 +7489,14 @@ function Ei({ objects: e, background: t, cameraDistance: n, fov: r, autoRotate:
7081
7489
  let _ = null;
7082
7490
  if (d !== !1) {
7083
7491
  let e = new s.ShadowMaterial({ opacity: .22 }), t = new s.PlaneGeometry(60, 60);
7084
- _ = new s.Mesh(t, e), _.rotation.x = -Math.PI / 2, _.position.y = Ti(d === !0 ? 0 : d, -.85), _.receiveShadow = !0, l.add(_), m.push(t, e);
7492
+ _ = new s.Mesh(t, e), _.rotation.x = -Math.PI / 2, _.position.y = fa(d === !0 ? 0 : d, -.85), _.receiveShadow = !0, l.add(_), m.push(t, e);
7085
7493
  }
7086
7494
  let v = () => {
7087
7495
  let t = Math.max(1, e.clientWidth), n = Math.max(1, e.clientHeight);
7088
7496
  c.setSize(t, n, !1), u.aspect = t / n, u.updateProjectionMatrix();
7089
7497
  }, b = typeof ResizeObserver > "u" ? null : new ResizeObserver(v);
7090
7498
  b?.observe(e), v();
7091
- let C = ui(Number.isFinite(Number(o)) ? o : 20), w = oi(e, (e) => {
7499
+ let C = Zi(Number.isFinite(Number(o)) ? o : 20), w = qi(e, (e) => {
7092
7500
  f.autoSpin(x ? C : 0, e), f.update();
7093
7501
  for (let t of h.children) t.userData.spin && (t.rotation.y += t.userData.spin * e);
7094
7502
  c.render(l, u);
@@ -7112,7 +7520,7 @@ function Ei({ objects: e, background: t, cameraDistance: n, fov: r, autoRotate:
7112
7520
  o,
7113
7521
  S,
7114
7522
  d
7115
- ]), _ && h ? /* @__PURE__ */ u(fi, {
7523
+ ]), _ && h ? /* @__PURE__ */ u($i, {
7116
7524
  nodeRef: m,
7117
7525
  style: p,
7118
7526
  height: f,
@@ -7123,27 +7531,27 @@ function Ei({ objects: e, background: t, cameraDistance: n, fov: r, autoRotate:
7123
7531
  g.current = e, typeof m == "function" && m(e);
7124
7532
  },
7125
7533
  style: {
7126
- minHeight: ci(f, 380),
7127
- height: ci(f, 380),
7534
+ minHeight: Yi(f, 380),
7535
+ height: Yi(f, 380),
7128
7536
  overflow: "hidden",
7129
7537
  touchAction: S ? "pan-y" : void 0,
7130
7538
  ...A(p)
7131
7539
  }
7132
7540
  });
7133
7541
  }
7134
- function Di({ code: e, height: t, background: n, style: r, nodeRef: a, inert: o }) {
7542
+ function ma({ code: e, height: t, background: n, style: r, nodeRef: a, inert: o }) {
7135
7543
  let l = s(null), [d, f] = c("");
7136
7544
  return i(() => {
7137
7545
  let t = l.current;
7138
7546
  if (o || !t || typeof e != "string" || !e.trim()) return;
7139
7547
  let r = !0, i = null;
7140
- return ti().then((a) => {
7548
+ return Hi().then((a) => {
7141
7549
  if (!r || !t) return;
7142
7550
  let o = new a.WebGLRenderer({
7143
7551
  antialias: !0,
7144
7552
  alpha: !n
7145
7553
  });
7146
- o.setPixelRatio(ai()), o.outputColorSpace = a.SRGBColorSpace, o.domElement.style.display = "block", o.domElement.style.width = "100%", o.domElement.style.height = "100%", t.appendChild(o.domElement);
7554
+ o.setPixelRatio(Ki()), o.outputColorSpace = a.SRGBColorSpace, o.domElement.style.display = "block", o.domElement.style.width = "100%", o.domElement.style.height = "100%", t.appendChild(o.domElement);
7147
7555
  let s = new a.Scene();
7148
7556
  n && (s.background = new a.Color(n));
7149
7557
  let c = new a.PerspectiveCamera(45, 1, .1, 1e3);
@@ -7166,7 +7574,7 @@ function Di({ code: e, height: t, background: n, style: r, nodeRef: a, inert: o
7166
7574
  o.setSize(e, n, !1), c.aspect = e / n, c.updateProjectionMatrix();
7167
7575
  }, d = typeof ResizeObserver > "u" ? null : new ResizeObserver(u);
7168
7576
  d?.observe(t), u();
7169
- let p = !1, m = oi(t, (e, t) => {
7577
+ let p = !1, m = qi(t, (e, t) => {
7170
7578
  if (!p && typeof l?.frame == "function") try {
7171
7579
  l.frame(e, t);
7172
7580
  } catch (e) {
@@ -7188,7 +7596,7 @@ function Di({ code: e, height: t, background: n, style: r, nodeRef: a, inert: o
7188
7596
  e,
7189
7597
  o,
7190
7598
  n
7191
- ]), o ? /* @__PURE__ */ u(fi, {
7599
+ ]), o ? /* @__PURE__ */ u($i, {
7192
7600
  nodeRef: a,
7193
7601
  style: r,
7194
7602
  height: t,
@@ -7199,8 +7607,8 @@ function Di({ code: e, height: t, background: n, style: r, nodeRef: a, inert: o
7199
7607
  l.current = e, typeof a == "function" && a(e);
7200
7608
  },
7201
7609
  style: {
7202
- minHeight: ci(t, 380),
7203
- height: ci(t, 380),
7610
+ minHeight: Yi(t, 380),
7611
+ height: Yi(t, 380),
7204
7612
  overflow: "hidden",
7205
7613
  position: "relative",
7206
7614
  touchAction: "pan-y",
@@ -7223,40 +7631,40 @@ function Di({ code: e, height: t, background: n, style: r, nodeRef: a, inert: o
7223
7631
  }) : null
7224
7632
  });
7225
7633
  }
7226
- var Oi = {
7227
- ModelViewerBlock: pi,
7228
- ShaderBlock: yi,
7229
- SceneBlock: Ei,
7230
- ThreeCanvasBlock: Di
7231
- }, ki = /* @__PURE__ */ new Map();
7232
- function Ai(e) {
7233
- if (ki.has(e)) return ki.get(e);
7634
+ var ha = {
7635
+ ModelViewerBlock: ea,
7636
+ ShaderBlock: oa,
7637
+ SceneBlock: pa,
7638
+ ThreeCanvasBlock: ma
7639
+ }, ga = /* @__PURE__ */ new Map();
7640
+ function _a(e) {
7641
+ if (ga.has(e)) return ga.get(e);
7234
7642
  let t = URL.createObjectURL(new Blob([e], { type: "text/javascript" })), n = import(
7235
7643
  /* @vite-ignore */
7236
7644
  /* webpackIgnore: true */
7237
7645
  t
7238
7646
  ).finally(() => URL.revokeObjectURL(t));
7239
- return ki.set(e, n), n;
7647
+ return ga.set(e, n), n;
7240
7648
  }
7241
- function ji(e) {
7649
+ function va(e) {
7242
7650
  let t = e && typeof e == "object" ? e.builder_plugins : null, n = t && typeof t == "object" ? t.plugins : null;
7243
7651
  return n && typeof n == "object" ? n : {};
7244
7652
  }
7245
7653
  //#endregion
7246
7654
  //#region ../ui/src/components/builder/plugins/view.jsx
7247
- async function Mi(e, t) {
7248
- let n = await Ai(e);
7655
+ async function ya(e, t) {
7656
+ let n = await _a(e);
7249
7657
  return (Array.isArray(n?.default?.blocks) ? n.default.blocks : []).find((e) => e?.id === t && typeof e.mount == "function") ?? null;
7250
7658
  }
7251
- var Ni = {
7659
+ var ba = {
7252
7660
  padding: "10px 12px",
7253
7661
  border: "1px dashed rgba(148, 163, 184, 0.5)",
7254
7662
  borderRadius: 8,
7255
7663
  fontSize: 12,
7256
7664
  opacity: .6
7257
7665
  };
7258
- function Pi({ pluginId: e, blockId: t, props: n, style: a, nodeRef: o }) {
7259
- let c = r(Z), l = ji(c?.settings)[e], f = s(null), p = s(null), m = {
7666
+ function xa({ pluginId: e, blockId: t, props: n, style: a, nodeRef: o }) {
7667
+ let c = r(Q), l = va(c?.settings)[e], f = s(null), p = s(null), m = {
7260
7668
  tenant: c?.tenant ?? "",
7261
7669
  apiUrl: c?.apiUrl ?? "/api",
7262
7670
  locale: c?.locale ?? "",
@@ -7268,7 +7676,7 @@ function Pi({ pluginId: e, blockId: t, props: n, style: a, nodeRef: o }) {
7268
7676
  let e = f.current;
7269
7677
  if (!l?.code || !e) return;
7270
7678
  let n = !0;
7271
- return Mi(l.code, t).then((e) => {
7679
+ return ya(l.code, t).then((e) => {
7272
7680
  if (!(!n || !e || !f.current)) {
7273
7681
  p.current = e;
7274
7682
  try {
@@ -7298,7 +7706,7 @@ function Pi({ pluginId: e, blockId: t, props: n, style: a, nodeRef: o }) {
7298
7706
  }) : /* @__PURE__ */ d("div", {
7299
7707
  ref: o,
7300
7708
  style: {
7301
- ...Ni,
7709
+ ...ba,
7302
7710
  ...A(a)
7303
7711
  },
7304
7712
  children: [
@@ -7310,13 +7718,13 @@ function Pi({ pluginId: e, blockId: t, props: n, style: a, nodeRef: o }) {
7310
7718
  }
7311
7719
  //#endregion
7312
7720
  //#region ../ui/src/components/builder/render.jsx
7313
- var Fi = {
7314
- ...pr,
7315
- ...Kr,
7316
- ...Oi,
7317
- PluginBlock: Pi
7721
+ var Sa = {
7722
+ ...ei,
7723
+ ...Ni,
7724
+ ...ha,
7725
+ PluginBlock: xa
7318
7726
  };
7319
- function Ii(t, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
7727
+ function Ca(t, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
7320
7728
  let o = n[t];
7321
7729
  if (!o || o.hidden) return null;
7322
7730
  let s = o.type?.resolvedName, c = a?.mapProps ? a.mapProps(o.props ?? {}, s) : o.props ?? {};
@@ -7324,11 +7732,11 @@ function Ii(t, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
7324
7732
  let n = o.props?.componentId, s = r?.[n];
7325
7733
  if (!s?.template || i.has(n)) return null;
7326
7734
  let c = new Set(i).add(n);
7327
- return /* @__PURE__ */ u(e, { children: Ii(s.template.rootId, s.template.nodes, r, c, a) }, t);
7735
+ return /* @__PURE__ */ u(e, { children: Ca(s.template.rootId, s.template.nodes, r, c, a) }, t);
7328
7736
  }
7329
- let l = Fi[s];
7737
+ let l = Sa[s];
7330
7738
  if (!l) return null;
7331
- let d = (o.nodes ?? []).map((e) => Ii(e, n, r, i, a)).filter(Boolean), f = Object.entries(o.linkedNodes ?? {}), p = f.length ? Object.fromEntries(f.map(([e, t]) => [e, Ii(t, n, r, i, a)])) : void 0, m = /* @__PURE__ */ u(l, {
7739
+ let d = (o.nodes ?? []).map((e) => Ca(e, n, r, i, a)).filter(Boolean), f = Object.entries(o.linkedNodes ?? {}), p = f.length ? Object.fromEntries(f.map(([e, t]) => [e, Ca(t, n, r, i, a)])) : void 0, m = /* @__PURE__ */ u(l, {
7332
7740
  ...c,
7333
7741
  ...s === "CollectionList" ? { templateId: o.linkedNodes?.card } : null,
7334
7742
  linked: p,
@@ -7337,16 +7745,16 @@ function Ii(t, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
7337
7745
  },
7338
7746
  children: d.length ? d : void 0
7339
7747
  }, t);
7340
- return c.when && c.when !== "always" ? /* @__PURE__ */ u(Cr, {
7748
+ return c.when && c.when !== "always" ? /* @__PURE__ */ u(ui, {
7341
7749
  when: c.when,
7342
7750
  children: m
7343
7751
  }, t) : m;
7344
7752
  }
7345
7753
  //#endregion
7346
7754
  //#region ../ui/src/components/builder/PageRenderer.jsx
7347
- var Li = (e) => Object.entries(e).map(([e, t]) => `${e}: ${t};`).join(" "), Ri = (e) => `.webim-page[data-webim-mode="light"] { ${Object.entries(ue(e.light)).map(([e, t]) => `${e}: ${t} !important;`).join(" ")} }
7348
- .webim-page[data-webim-mode="dark"] { ${Object.entries(ue(e.dark)).map(([e, t]) => `${e}: ${t} !important;`).join(" ")} }`;
7349
- function zi({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, custom: s, animations: c, tenant: l, apiUrl: f, datasets: p, locale: m, direction: h, settings: _, siteUser: v }) {
7755
+ var wa = (e) => Object.entries(e).map(([e, t]) => `${e}: ${t};`).join(" "), Ta = (e) => `.webim-page[data-webim-mode="light"] { ${Object.entries(J(e.light)).map(([e, t]) => `${e}: ${t} !important;`).join(" ")} }
7756
+ .webim-page[data-webim-mode="dark"] { ${Object.entries(J(e.dark)).map(([e, t]) => `${e}: ${t} !important;`).join(" ")} }`;
7757
+ function Ea({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, custom: s, animations: c, tenant: l, apiUrl: f, datasets: p, locale: m, direction: h, settings: _, siteUser: v }) {
7350
7758
  let b = s?.js?.trim();
7351
7759
  if (i(() => {
7352
7760
  if (!b) return;
@@ -7360,23 +7768,23 @@ function zi({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, cu
7360
7768
  minHeight: "100%",
7361
7769
  display: "flex",
7362
7770
  flexDirection: "column"
7363
- }, w = Ii("ROOT", e, n), T = o(() => ({ render: (t, r) => Ii(t, e, n, void 0, { mapProps: r }) }), [e, n]), D = W(e, n), O = ie(e, n), k = s?.css?.trim(), A = E(c), j = le(t), M = [j.font, j.headingFont].filter((e) => typeof e == "string" && e.trim() && e !== "inherit" && !oe[e]), N = [.../* @__PURE__ */ new Set([...y(e, n), ...M])].map((e) => /* @__PURE__ */ u("link", {
7771
+ }, w = Ca("ROOT", e, n), T = o(() => ({ render: (t, r) => Ca(t, e, n, void 0, { mapProps: r }) }), [e, n]), D = W(e, n), O = ie(e, n), k = s?.css?.trim(), A = E(c), j = ue(t), M = [j.font, j.headingFont].filter((e) => typeof e == "string" && e.trim() && e !== "inherit" && !se[e]), N = [.../* @__PURE__ */ new Set([...y(e, n), ...M])].map((e) => /* @__PURE__ */ u("link", {
7364
7772
  rel: "stylesheet",
7365
7773
  precedence: "default",
7366
7774
  href: g(e)
7367
- }, e)), P = Ri(j);
7368
- return r === "auto" ? /* @__PURE__ */ u(Z.Provider, {
7775
+ }, e)), P = Ta(j);
7776
+ return r === "auto" ? /* @__PURE__ */ u(Q.Provider, {
7369
7777
  value: {
7370
7778
  tenant: l || "",
7371
7779
  apiUrl: f || "/api",
7372
7780
  locale: m || "",
7373
7781
  settings: _ ?? null
7374
7782
  },
7375
- children: /* @__PURE__ */ u(Sr, {
7783
+ children: /* @__PURE__ */ u(li, {
7376
7784
  initialUser: v,
7377
- children: /* @__PURE__ */ u(xe.Provider, {
7785
+ children: /* @__PURE__ */ u(et.Provider, {
7378
7786
  value: p ?? null,
7379
- children: /* @__PURE__ */ u(we.Provider, {
7787
+ children: /* @__PURE__ */ u(it.Provider, {
7380
7788
  value: T,
7381
7789
  children: /* @__PURE__ */ d("div", {
7382
7790
  ...x,
@@ -7387,8 +7795,8 @@ function zi({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, cu
7387
7795
  ...a
7388
7796
  },
7389
7797
  children: [
7390
- /* @__PURE__ */ u("style", { children: `.webim-page { ${Li(ue(j.light))} }
7391
- @media (prefers-color-scheme: dark) { .webim-page { ${Li(ue(j.dark))} } }` }),
7798
+ /* @__PURE__ */ u("style", { children: `.webim-page { ${wa(J(j.light))} }
7799
+ @media (prefers-color-scheme: dark) { .webim-page { ${wa(J(j.dark))} } }` }),
7392
7800
  /* @__PURE__ */ u("style", { children: P }),
7393
7801
  N,
7394
7802
  /* @__PURE__ */ u("style", { children: S }),
@@ -7401,18 +7809,18 @@ function zi({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, cu
7401
7809
  })
7402
7810
  })
7403
7811
  })
7404
- }) : /* @__PURE__ */ u(Z.Provider, {
7812
+ }) : /* @__PURE__ */ u(Q.Provider, {
7405
7813
  value: {
7406
7814
  tenant: l || "",
7407
7815
  apiUrl: f || "/api",
7408
7816
  locale: m || "",
7409
7817
  settings: _ ?? null
7410
7818
  },
7411
- children: /* @__PURE__ */ u(Sr, {
7819
+ children: /* @__PURE__ */ u(li, {
7412
7820
  initialUser: v,
7413
- children: /* @__PURE__ */ u(xe.Provider, {
7821
+ children: /* @__PURE__ */ u(et.Provider, {
7414
7822
  value: p ?? null,
7415
- children: /* @__PURE__ */ u(we.Provider, {
7823
+ children: /* @__PURE__ */ u(it.Provider, {
7416
7824
  value: T,
7417
7825
  children: /* @__PURE__ */ d("div", {
7418
7826
  ...x,
@@ -7441,8 +7849,8 @@ function zi({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, cu
7441
7849
  }
7442
7850
  //#endregion
7443
7851
  //#region src/WebimContent.jsx
7444
- function Bi({ bundle: e, mode: t = "auto", style: n }) {
7445
- return e?.blocks?.ROOT ? /* @__PURE__ */ u(zi, {
7852
+ function Da({ bundle: e, mode: t = "auto", style: n }) {
7853
+ return e?.blocks?.ROOT ? /* @__PURE__ */ u(Ea, {
7446
7854
  blocks: e.blocks,
7447
7855
  theme: e.theme,
7448
7856
  components: e.components,
@@ -7460,7 +7868,7 @@ function Bi({ bundle: e, mode: t = "auto", style: n }) {
7460
7868
  }
7461
7869
  //#endregion
7462
7870
  //#region src/WebimPage.jsx
7463
- function Vi({ 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 }) {
7871
+ function Oa({ 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 }) {
7464
7872
  let [g, _] = c({ status: "loading" }), v = s({
7465
7873
  onLoad: m,
7466
7874
  onError: h
@@ -7497,11 +7905,11 @@ function Vi({ apiUrl: e, tenant: t, slug: n, locale: r, preview: a, token: o, mo
7497
7905
  r,
7498
7906
  a,
7499
7907
  o
7500
- ]), g.status === "loading" ? f : g.status === "error" ? typeof p == "function" ? p(g.error) : p : /* @__PURE__ */ u(Bi, {
7908
+ ]), g.status === "loading" ? f : g.status === "error" ? typeof p == "function" ? p(g.error) : p : /* @__PURE__ */ u(Da, {
7501
7909
  bundle: g.bundle,
7502
7910
  mode: l,
7503
7911
  style: d
7504
7912
  });
7505
7913
  }
7506
7914
  //#endregion
7507
- export { zi as PageRenderer, Bi as WebimContent, Vi as WebimPage, ye as fetchPage, Ze as renderRichContent, he as resolveTheme };
7915
+ export { Ea as PageRenderer, Da as WebimContent, Oa as WebimPage, ye as fetchPage, It as renderRichContent, he as resolveTheme };