webim-adapter 1.1.2 → 1.1.3

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.
@@ -781,8 +781,29 @@ var Be = {
781
781
  h4: 22,
782
782
  h5: 19,
783
783
  h6: 16
784
- };
785
- function Ve({ align: e = "center", width: t, wrap: n } = {}) {
784
+ }, Ve = [
785
+ "left",
786
+ "center",
787
+ "right",
788
+ "justify"
789
+ ];
790
+ function He(e, t, n) {
791
+ let r = e && e.cellStyles;
792
+ if (!r || typeof r != "object" || Array.isArray(r)) return {};
793
+ let i = r[`${t}:${n}`];
794
+ return i && typeof i == "object" && !Array.isArray(i) ? i : {};
795
+ }
796
+ function Ue(e, t) {
797
+ let n = e || {}, r = typeof n.bold == "boolean" ? n.bold : !!t;
798
+ return {
799
+ textAlign: Ve.includes(n.align) ? n.align : "left",
800
+ fontWeight: r ? 700 : 400,
801
+ fontStyle: n.italic ? "italic" : void 0,
802
+ color: typeof n.color == "string" && n.color ? n.color : void 0,
803
+ backgroundColor: typeof n.bg == "string" && n.bg ? n.bg : void 0
804
+ };
805
+ }
806
+ function We({ align: e = "center", width: t, wrap: n } = {}) {
786
807
  let r = t ? `${t}%` : void 0;
787
808
  if (e === "full") return { width: "100%" };
788
809
  let i = e === "left" || e === "right";
@@ -816,7 +837,7 @@ function Ve({ align: e = "center", width: t, wrap: n } = {}) {
816
837
  marginRight: "auto"
817
838
  };
818
839
  }
819
- function He(e = [], t, n) {
840
+ function Ge(e = [], t, n) {
820
841
  let r = n ?? ((e, n) => Re(e, n, t));
821
842
  return e.map((t, n) => {
822
843
  let i = {
@@ -839,7 +860,7 @@ function He(e = [], t, n) {
839
860
  marginLeft: 0,
840
861
  marginRight: 0,
841
862
  ...i,
842
- ...Ve(t)
863
+ ...We(t)
843
864
  },
844
865
  children: [t.href ? /* @__PURE__ */ d("a", {
845
866
  href: t.href,
@@ -858,16 +879,16 @@ function He(e = [], t, n) {
858
879
  })]
859
880
  }, n);
860
881
  }
861
- if (t.type === "video") return $e(t.url) ? /* @__PURE__ */ d("div", {
882
+ if (t.type === "video") return nt(t.url) ? /* @__PURE__ */ d("div", {
862
883
  style: {
863
884
  ...i,
864
- ...Ve({
885
+ ...We({
865
886
  align: t.align,
866
887
  wrap: t.wrap,
867
888
  width: t.width ?? 100
868
889
  })
869
890
  },
870
- children: /* @__PURE__ */ d(et, {
891
+ children: /* @__PURE__ */ d(rt, {
871
892
  url: t.url,
872
893
  autoplay: t.autoplay,
873
894
  muted: t.muted,
@@ -928,9 +949,11 @@ function He(e = [], t, n) {
928
949
  let r = t.header !== !1, a = {
929
950
  border: t.borders === !1 ? void 0 : "1px solid rgba(148, 163, 184, 0.4)",
930
951
  padding: "6px 10px",
931
- textAlign: "left",
932
952
  verticalAlign: "top"
933
- }, o = r ? e.slice(1) : e, s = Array.isArray(t.widths) ? t.widths : null;
953
+ }, o = r ? e.slice(1) : e, s = Array.isArray(t.widths) ? t.widths : null, c = (e, n, r) => ({
954
+ ...a,
955
+ ...Ue(He(t, e, n), r)
956
+ });
934
957
  return /* @__PURE__ */ f("table", {
935
958
  style: {
936
959
  ...i,
@@ -942,16 +965,13 @@ function He(e = [], t, n) {
942
965
  children: [
943
966
  s && /* @__PURE__ */ d("colgroup", { children: s.map((e, t) => /* @__PURE__ */ d("col", { style: { width: `${e}%` } }, t)) }),
944
967
  r && /* @__PURE__ */ d("thead", { children: /* @__PURE__ */ d("tr", { children: e[0].map((e, t) => /* @__PURE__ */ d("th", {
945
- style: {
946
- ...a,
947
- fontWeight: 700
948
- },
968
+ style: c(0, t, !0),
949
969
  children: e
950
970
  }, t)) }) }),
951
- /* @__PURE__ */ d("tbody", { children: o.map((e, t) => /* @__PURE__ */ d("tr", { children: e.map((e, t) => /* @__PURE__ */ d("td", {
952
- style: a,
971
+ /* @__PURE__ */ d("tbody", { children: o.map((e, t) => /* @__PURE__ */ d("tr", { children: e.map((e, n) => /* @__PURE__ */ d("td", {
972
+ style: c(r ? t + 1 : t, n, !1),
953
973
  children: e
954
- }, t)) }, t)) })
974
+ }, n)) }, t)) })
955
975
  ]
956
976
  }, n);
957
977
  }
@@ -970,7 +990,7 @@ function He(e = [], t, n) {
970
990
  }
971
991
  if (t.type === "quote") return /* @__PURE__ */ d("blockquote", {
972
992
  style: {
973
- ...We,
993
+ ...qe,
974
994
  ...i
975
995
  },
976
996
  children: r(t.parts, t.text)
@@ -995,32 +1015,32 @@ function He(e = [], t, n) {
995
1015
  }, n);
996
1016
  });
997
1017
  }
998
- function Ue({ content: e, style: t, linked: n, nodeRef: r }) {
1018
+ function Ke({ content: e, style: t, linked: n, nodeRef: r }) {
999
1019
  return /* @__PURE__ */ d("div", {
1000
1020
  ref: r,
1001
1021
  style: {
1002
1022
  display: "flow-root",
1003
1023
  ...P(t)
1004
1024
  },
1005
- children: He(e, n)
1025
+ children: Ge(e, n)
1006
1026
  });
1007
1027
  }
1008
- var We = {
1028
+ var qe = {
1009
1029
  margin: 0,
1010
1030
  padding: "8px 0 8px 20px",
1011
1031
  borderLeft: "4px solid var(--page-accent, rgba(148, 163, 184, 0.6))"
1012
1032
  };
1013
- function Ge({ text: e, parts: t, style: n, linked: r, nodeRef: i }) {
1033
+ function Je({ text: e, parts: t, style: n, linked: r, nodeRef: i }) {
1014
1034
  return /* @__PURE__ */ d("blockquote", {
1015
1035
  ref: i,
1016
1036
  style: {
1017
- ...We,
1037
+ ...qe,
1018
1038
  ...P(n)
1019
1039
  },
1020
1040
  children: Re(t, e, r)
1021
1041
  });
1022
1042
  }
1023
- function Ke({ ordered: e, items: t = [], style: n, nodeRef: r }) {
1043
+ function Ye({ ordered: e, items: t = [], style: n, nodeRef: r }) {
1024
1044
  return /* @__PURE__ */ d(e ? "ol" : "ul", {
1025
1045
  ref: r,
1026
1046
  style: {
@@ -1034,7 +1054,7 @@ function Ke({ ordered: e, items: t = [], style: n, nodeRef: r }) {
1034
1054
  }, t))
1035
1055
  });
1036
1056
  }
1037
- function qe({ text: e, parts: t, style: n, linked: r, nodeRef: i }) {
1057
+ function Xe({ text: e, parts: t, style: n, linked: r, nodeRef: i }) {
1038
1058
  return /* @__PURE__ */ d("p", {
1039
1059
  ref: i,
1040
1060
  style: {
@@ -1044,26 +1064,26 @@ function qe({ text: e, parts: t, style: n, linked: r, nodeRef: i }) {
1044
1064
  children: Re(t, e, r)
1045
1065
  });
1046
1066
  }
1047
- var Je = {
1067
+ var Ze = {
1048
1068
  color: "var(--page-accent, inherit)",
1049
1069
  textDecoration: "underline",
1050
1070
  textUnderlineOffset: 3,
1051
1071
  cursor: "pointer"
1052
1072
  };
1053
- function Ye({ text: e, parts: t, href: n, target: r, style: i, linked: a, nodeRef: o }) {
1073
+ function Qe({ text: e, parts: t, href: n, target: r, style: i, linked: a, nodeRef: o }) {
1054
1074
  return /* @__PURE__ */ d("a", {
1055
1075
  ref: o,
1056
1076
  href: n || "#",
1057
1077
  target: r || void 0,
1058
1078
  rel: r === "_blank" ? "noopener noreferrer" : void 0,
1059
1079
  style: {
1060
- ...Je,
1080
+ ...Ze,
1061
1081
  ...P(i)
1062
1082
  },
1063
1083
  children: Re(t, e, a)
1064
1084
  });
1065
1085
  }
1066
- function Xe({ text: e, parts: t, href: n, target: r, style: i, linked: a, nodeRef: o }) {
1086
+ function $e({ text: e, parts: t, href: n, target: r, style: i, linked: a, nodeRef: o }) {
1067
1087
  return /* @__PURE__ */ d("a", {
1068
1088
  ref: o,
1069
1089
  href: n || "#",
@@ -1076,7 +1096,7 @@ function Xe({ text: e, parts: t, href: n, target: r, style: i, linked: a, nodeRe
1076
1096
  children: Re(t, e, a)
1077
1097
  });
1078
1098
  }
1079
- function Ze({ src: e, alt: t, style: n, nodeRef: r }) {
1099
+ function et({ src: e, alt: t, style: n, nodeRef: r }) {
1080
1100
  return e ? /* @__PURE__ */ d("img", {
1081
1101
  ref: r,
1082
1102
  src: e,
@@ -1088,7 +1108,7 @@ function Ze({ src: e, alt: t, style: n, nodeRef: r }) {
1088
1108
  }
1089
1109
  }) : null;
1090
1110
  }
1091
- function Qe({ src: e, poster: t, controls: n = !0, autoplay: r = !1, loop: i = !1, muted: a = !1, style: o, nodeRef: s }) {
1111
+ function tt({ src: e, poster: t, controls: n = !0, autoplay: r = !1, loop: i = !1, muted: a = !1, style: o, nodeRef: s }) {
1092
1112
  return e ? /* @__PURE__ */ d("video", {
1093
1113
  ref: s,
1094
1114
  src: e,
@@ -1106,9 +1126,9 @@ function Qe({ src: e, poster: t, controls: n = !0, autoplay: r = !1, loop: i = !
1106
1126
  }
1107
1127
  }) : null;
1108
1128
  }
1109
- var $e = (e = "") => (e.match(/(?:youtu\.be\/|v=|embed\/|shorts\/|live\/)([\w-]{11})/) || e.match(/^([\w-]{11})$/))?.[1];
1110
- function et({ url: e, autoplay: t = !1, muted: n = !1, loop: r = !1, controls: i = !0, start: a, style: o, nodeRef: s }) {
1111
- let c = $e(e);
1129
+ var nt = (e = "") => (e.match(/(?:youtu\.be\/|v=|embed\/|shorts\/|live\/)([\w-]{11})/) || e.match(/^([\w-]{11})$/))?.[1];
1130
+ function rt({ url: e, autoplay: t = !1, muted: n = !1, loop: r = !1, controls: i = !0, start: a, style: o, nodeRef: s }) {
1131
+ let c = nt(e);
1112
1132
  if (!c) return null;
1113
1133
  let l = new URLSearchParams({ rel: "0" });
1114
1134
  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__ */ d("div", {
@@ -1134,7 +1154,7 @@ function et({ url: e, autoplay: t = !1, muted: n = !1, loop: r = !1, controls: i
1134
1154
  })
1135
1155
  });
1136
1156
  }
1137
- function tt({ src: e, title: t, allowFullscreen: n = !0, style: r, nodeRef: i }) {
1157
+ function it({ src: e, title: t, allowFullscreen: n = !0, style: r, nodeRef: i }) {
1138
1158
  return e ? /* @__PURE__ */ d("iframe", {
1139
1159
  ref: i,
1140
1160
  src: e,
@@ -1150,7 +1170,7 @@ function tt({ src: e, title: t, allowFullscreen: n = !0, style: r, nodeRef: i })
1150
1170
  }
1151
1171
  }) : null;
1152
1172
  }
1153
- function nt({ code: e, runScripts: t = !0, style: n, nodeRef: r }) {
1173
+ function at({ code: e, runScripts: t = !0, style: n, nodeRef: r }) {
1154
1174
  let [i, o] = l(null);
1155
1175
  return a(() => {
1156
1176
  i && (i.innerHTML = e || "", t && i.querySelectorAll("script").forEach((e) => {
@@ -1169,7 +1189,7 @@ function nt({ code: e, runScripts: t = !0, style: n, nodeRef: r }) {
1169
1189
  style: P(n)
1170
1190
  });
1171
1191
  }
1172
- function rt({ height: e, nodeRef: t }) {
1192
+ function ot({ height: e, nodeRef: t }) {
1173
1193
  return /* @__PURE__ */ d("div", {
1174
1194
  ref: t,
1175
1195
  style: {
@@ -1179,7 +1199,7 @@ function rt({ height: e, nodeRef: t }) {
1179
1199
  }
1180
1200
  });
1181
1201
  }
1182
- function it({ style: e, nodeRef: t }) {
1202
+ function st({ style: e, nodeRef: t }) {
1183
1203
  return /* @__PURE__ */ d("div", {
1184
1204
  ref: t,
1185
1205
  style: {
@@ -1190,7 +1210,7 @@ function it({ style: e, nodeRef: t }) {
1190
1210
  }
1191
1211
  });
1192
1212
  }
1193
- var at = {
1213
+ var ct = {
1194
1214
  position: "absolute",
1195
1215
  top: "50%",
1196
1216
  transform: "translateY(-50%)",
@@ -1207,7 +1227,7 @@ var at = {
1207
1227
  alignItems: "center",
1208
1228
  justifyContent: "center",
1209
1229
  padding: 0
1210
- }, ot = {
1230
+ }, lt = {
1211
1231
  bottom: {
1212
1232
  inset: "auto 0 0 0",
1213
1233
  padding: "40px 24px 20px",
@@ -1226,8 +1246,8 @@ var at = {
1226
1246
  padding: 24,
1227
1247
  textShadow: "0 2px 12px rgba(0, 0, 0, 0.6)"
1228
1248
  }
1229
- }, st = 48;
1230
- function ct({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, height: i = 320, swipe: o = !0, style: s, nodeRef: c }) {
1249
+ }, ut = 48;
1250
+ function dt({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, height: i = 320, swipe: o = !0, style: s, nodeRef: c }) {
1231
1251
  let [p, m] = l(0), [h, g] = l(!1), [_, v] = l(null), y = e ? Math.min(p, e - 1) : 0;
1232
1252
  if (a(() => {
1233
1253
  if (!n || h || _ || e < 2) return;
@@ -1243,7 +1263,7 @@ function ct({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
1243
1263
  let b = (t) => m((t + e) % e), x = () => {
1244
1264
  if (!_) return;
1245
1265
  let { dx: e } = _;
1246
- v(null), e < -48 ? b(y + 1) : e > st && b(y - 1);
1266
+ v(null), e < -48 ? b(y + 1) : e > ut && b(y - 1);
1247
1267
  };
1248
1268
  return /* @__PURE__ */ f("div", {
1249
1269
  ref: c,
@@ -1291,7 +1311,7 @@ function ct({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
1291
1311
  type: "button",
1292
1312
  "aria-label": "Previous slide",
1293
1313
  style: {
1294
- ...at,
1314
+ ...ct,
1295
1315
  left: 12
1296
1316
  },
1297
1317
  onClick: () => b(y - 1),
@@ -1301,7 +1321,7 @@ function ct({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
1301
1321
  type: "button",
1302
1322
  "aria-label": "Next slide",
1303
1323
  style: {
1304
- ...at,
1324
+ ...ct,
1305
1325
  right: 12
1306
1326
  },
1307
1327
  onClick: () => b(y + 1),
@@ -1335,7 +1355,7 @@ function ct({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
1335
1355
  ] })]
1336
1356
  });
1337
1357
  }
1338
- var lt = (e, t) => ({
1358
+ var ft = (e, t) => ({
1339
1359
  position: "absolute",
1340
1360
  inset: 0,
1341
1361
  backgroundImage: e ? `url(${e})` : "none",
@@ -1343,18 +1363,18 @@ var lt = (e, t) => ({
1343
1363
  backgroundSize: "cover",
1344
1364
  backgroundPosition: "center"
1345
1365
  });
1346
- function ut({ slides: e = [], captionPosition: t = "bottom", captionAlign: n = "left", ...r }) {
1347
- return e.length ? /* @__PURE__ */ d(ct, {
1366
+ function pt({ slides: e = [], captionPosition: t = "bottom", captionAlign: n = "left", ...r }) {
1367
+ return e.length ? /* @__PURE__ */ d(dt, {
1348
1368
  ...r,
1349
1369
  count: e.length,
1350
1370
  renderSlide: (r) => {
1351
1371
  let i = e[r];
1352
- return /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("div", { style: lt(i.image) }), (i.title || i.text) && /* @__PURE__ */ f("div", {
1372
+ return /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("div", { style: ft(i.image) }), (i.title || i.text) && /* @__PURE__ */ f("div", {
1353
1373
  style: {
1354
1374
  position: "absolute",
1355
1375
  color: "#fff",
1356
1376
  textAlign: n,
1357
- ...ot[t] ?? ot.bottom
1377
+ ...lt[t] ?? lt.bottom
1358
1378
  },
1359
1379
  children: [i.title && /* @__PURE__ */ d("div", {
1360
1380
  style: {
@@ -1374,13 +1394,13 @@ function ut({ slides: e = [], captionPosition: t = "bottom", captionAlign: n = "
1374
1394
  }
1375
1395
  }) : null;
1376
1396
  }
1377
- function dt({ slides: e = [], linked: t, ...n }) {
1378
- return e.length ? /* @__PURE__ */ d(ct, {
1397
+ function mt({ slides: e = [], linked: t, ...n }) {
1398
+ return e.length ? /* @__PURE__ */ d(dt, {
1379
1399
  ...n,
1380
1400
  count: e.length,
1381
1401
  renderSlide: (n) => {
1382
1402
  let r = e[n];
1383
- return /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("div", { style: lt(r.image, r.color) }), /* @__PURE__ */ d("div", {
1403
+ return /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("div", { style: ft(r.image, r.color) }), /* @__PURE__ */ d("div", {
1384
1404
  style: {
1385
1405
  position: "absolute",
1386
1406
  inset: 0,
@@ -1392,23 +1412,23 @@ function dt({ slides: e = [], linked: t, ...n }) {
1392
1412
  }
1393
1413
  }) : null;
1394
1414
  }
1395
- var ft = 256, pt = (e) => Math.log(Math.tan(Math.PI / 4 + Math.max(-85, Math.min(85, e)) * Math.PI / 360)), mt = (e, t, n) => {
1396
- let r = ft * 2 ** n;
1415
+ var ht = 256, gt = (e) => Math.log(Math.tan(Math.PI / 4 + Math.max(-85, Math.min(85, e)) * Math.PI / 360)), _t = (e, t, n) => {
1416
+ let r = ht * 2 ** n;
1397
1417
  return {
1398
1418
  x: (Number(t) + 180) / 360 * r,
1399
- y: (.5 - pt(Number(e)) / (2 * Math.PI)) * r
1419
+ y: (.5 - gt(Number(e)) / (2 * Math.PI)) * r
1400
1420
  };
1401
1421
  }, $ = (e, t) => {
1402
1422
  if (e === "" || e == null) return null;
1403
1423
  let n = Number(e);
1404
1424
  return Number.isFinite(n) && Math.abs(n) <= t ? n : null;
1405
- }, ht = (e) => !!e && $(e.lat, 90) !== null && $(e.lng, 180) !== null;
1406
- function gt(e, t, n = "directions", r = "") {
1425
+ }, vt = (e) => !!e && $(e.lat, 90) !== null && $(e.lng, 180) !== null;
1426
+ function yt(e, t, n = "directions", r = "") {
1407
1427
  let i = `${e},${t}`;
1408
1428
  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)}`;
1409
1429
  }
1410
- var _t = (e, t, n = 13) => `https://www.openstreetmap.org/?mlat=${e}&mlon=${t}#map=${Math.round(Number(n) || 13)}/${e}/${t}`;
1411
- function vt({ markers: e, lat: t, lng: n, zoom: r = "", height: i = 320, pinSize: o = 22, pinLink: s = "directions", link: u = !1, label: p = "", style: m, nodeRef: h, inert: g }) {
1430
+ var bt = (e, t, n = 13) => `https://www.openstreetmap.org/?mlat=${e}&mlon=${t}#map=${Math.round(Number(n) || 13)}/${e}/${t}`;
1431
+ function xt({ markers: e, lat: t, lng: n, zoom: r = "", height: i = 320, pinSize: o = 22, pinLink: s = "directions", link: u = !1, label: p = "", style: m, nodeRef: h, inert: g }) {
1412
1432
  let _ = c(null), [v, y] = l(1200);
1413
1433
  a(() => {
1414
1434
  let e = _.current;
@@ -1418,7 +1438,7 @@ function vt({ markers: e, lat: t, lng: n, zoom: r = "", height: i = 320, pinSize
1418
1438
  let n = new ResizeObserver(t);
1419
1439
  return n.observe(e), () => n.disconnect();
1420
1440
  }, []);
1421
- let b = (Array.isArray(e) ? e : []).filter(ht), x = ht({
1441
+ let b = (Array.isArray(e) ? e : []).filter(vt), x = vt({
1422
1442
  lat: t,
1423
1443
  lng: n
1424
1444
  }) ? {
@@ -1430,7 +1450,7 @@ function vt({ markers: e, lat: t, lng: n, zoom: r = "", height: i = 320, pinSize
1430
1450
  } : null, S = Math.max(80, Number(i) || 320), C = $(r, 19) ? Math.min(Math.max(Math.round(Number(r)), 1), 19) : (() => {
1431
1451
  if (b.length < 2) return 13;
1432
1452
  for (let e = 19; e >= 1; e--) {
1433
- let t = b.map((t) => mt($(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));
1453
+ let t = b.map((t) => _t($(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));
1434
1454
  if (n <= v * .8 && r <= S * .7) return e;
1435
1455
  }
1436
1456
  return 1;
@@ -1454,12 +1474,12 @@ function vt({ markers: e, lat: t, lng: n, zoom: r = "", height: i = 320, pinSize
1454
1474
  },
1455
1475
  children: "Set the coordinates in Settings"
1456
1476
  });
1457
- let T = mt(x.lat, x.lng, C), E = {
1477
+ let T = _t(x.lat, x.lng, C), E = {
1458
1478
  x: T.x - v / 2,
1459
1479
  y: T.y - S / 2
1460
1480
  }, D = [], O = [];
1461
- for (let e = Math.floor(E.x / ft); e <= Math.floor((E.x + v) / ft); e++) D.push(e);
1462
- for (let e = Math.floor(E.y / ft); e <= Math.floor((E.y + S) / ft); e++) O.push(e);
1481
+ for (let e = Math.floor(E.x / ht); e <= Math.floor((E.x + v) / ht); e++) D.push(e);
1482
+ for (let e = Math.floor(E.y / ht); e <= Math.floor((E.y + S) / ht); e++) O.push(e);
1463
1483
  let k = 2 ** C;
1464
1484
  return /* @__PURE__ */ f("div", {
1465
1485
  ref: (e) => {
@@ -1482,22 +1502,22 @@ function vt({ markers: e, lat: t, lng: n, zoom: r = "", height: i = 320, pinSize
1482
1502
  return e < 0 || e >= k ? null : /* @__PURE__ */ d("img", {
1483
1503
  src: `https://tile.openstreetmap.org/${C}/${n}/${e}.png`,
1484
1504
  alt: "",
1485
- width: ft,
1486
- height: ft,
1505
+ width: ht,
1506
+ height: ht,
1487
1507
  loading: "lazy",
1488
1508
  style: {
1489
1509
  position: "absolute",
1490
- left: Math.round(t * ft - E.x),
1491
- top: Math.round(e * ft - E.y),
1492
- width: ft,
1493
- height: ft,
1510
+ left: Math.round(t * ht - E.x),
1511
+ top: Math.round(e * ht - E.y),
1512
+ width: ht,
1513
+ height: ht,
1494
1514
  userSelect: "none",
1495
1515
  pointerEvents: "none"
1496
1516
  }
1497
1517
  }, `${t}-${e}`);
1498
1518
  })),
1499
1519
  b.map((e, t) => {
1500
- let n = mt($(e.lat, 90), $(e.lng, 180), C), r = n.x - E.x, i = n.y - E.y, a = e.color || "var(--page-accent, #dc2626)", c = s === "none" || g ? null : gt($(e.lat, 90), $(e.lng, 180), s, e.title);
1520
+ let n = _t($(e.lat, 90), $(e.lng, 180), C), r = n.x - E.x, i = n.y - E.y, a = e.color || "var(--page-accent, #dc2626)", c = s === "none" || g ? null : yt($(e.lat, 90), $(e.lng, 180), s, e.title);
1501
1521
  return /* @__PURE__ */ f(c ? "a" : "span", {
1502
1522
  href: c || void 0,
1503
1523
  target: c ? "_blank" : void 0,
@@ -1536,8 +1556,8 @@ function vt({ markers: e, lat: t, lng: n, zoom: r = "", height: i = 320, pinSize
1536
1556
  viewBox: "0 0 24 24",
1537
1557
  fill: a,
1538
1558
  style: { display: "block" },
1539
- children: [/* @__PURE__ */ d("path", { d: "M12 22s7-6 7-11a7 7 0 1 0-14 0c0 5 7 11 7 11z" }), yt[e.icon] ? /* @__PURE__ */ d("path", {
1540
- d: yt[e.icon],
1559
+ children: [/* @__PURE__ */ d("path", { d: "M12 22s7-6 7-11a7 7 0 1 0-14 0c0 5 7 11 7 11z" }), St[e.icon] ? /* @__PURE__ */ d("path", {
1560
+ d: St[e.icon],
1541
1561
  transform: "translate(12 10.5) scale(0.46) translate(-12 -12)",
1542
1562
  fill: "none",
1543
1563
  stroke: "#fff",
@@ -1573,7 +1593,7 @@ function vt({ markers: e, lat: t, lng: n, zoom: r = "", height: i = 320, pinSize
1573
1593
  })
1574
1594
  ]
1575
1595
  }), u ? /* @__PURE__ */ d("a", {
1576
- href: _t(x.lat, x.lng, C),
1596
+ href: bt(x.lat, x.lng, C),
1577
1597
  target: "_blank",
1578
1598
  rel: "noopener noreferrer",
1579
1599
  onClick: g ? (e) => e.preventDefault() : void 0,
@@ -1587,7 +1607,7 @@ function vt({ markers: e, lat: t, lng: n, zoom: r = "", height: i = 320, pinSize
1587
1607
  }) : null]
1588
1608
  });
1589
1609
  }
1590
- var yt = {
1610
+ var St = {
1591
1611
  check: "M4 12l5 5L20 6",
1592
1612
  close: "M6 6l12 12M18 6L6 18",
1593
1613
  plus: "M12 5v14M5 12h14",
@@ -1684,8 +1704,8 @@ var yt = {
1684
1704
  droplet: "M12 3s6 6.4 6 10.5a6 6 0 0 1-12 0C6 9.4 12 3 12 3z",
1685
1705
  leaf: "M4 20c0-8 6-14 16-14 0 10-6 14-12 14H4zM8 16c2-4 5-6 8-7"
1686
1706
  };
1687
- function bt({ 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: u, inert: f }) {
1688
- let p = Array.isArray(t) ? t.filter((e) => typeof e == "string" && e.trim()) : [], m = n && p.length > 0, h = p.length ? p : [yt[e] ?? yt.star], g = Math.min(Math.max(Number(r) || 24, 8), 240), _ = a === "accent" ? "var(--page-accent, currentColor)" : a || "currentColor", v = /* @__PURE__ */ d("svg", {
1707
+ function Ct({ 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: u, inert: f }) {
1708
+ let p = Array.isArray(t) ? t.filter((e) => typeof e == "string" && e.trim()) : [], m = n && p.length > 0, h = p.length ? p : [St[e] ?? St.star], g = Math.min(Math.max(Number(r) || 24, 8), 240), _ = a === "accent" ? "var(--page-accent, currentColor)" : a || "currentColor", v = /* @__PURE__ */ d("svg", {
1689
1709
  viewBox: "0 0 24 24",
1690
1710
  width: g,
1691
1711
  height: g,
@@ -1721,7 +1741,7 @@ function bt({ name: e = "star", paths: t, fill: n = !1, size: r = 24, stroke: i
1721
1741
  children: v
1722
1742
  });
1723
1743
  }
1724
- function xt(e, t = {}, n = 0) {
1744
+ function wt(e, t = {}, n = 0) {
1725
1745
  let r = Array.isArray(e) ? e.filter((e) => e && typeof e == "object") : [], i = (e) => e == null ? "" : we(e), a = Math.max(0, Number(n) || 0), o = [];
1726
1746
  for (let e of r) {
1727
1747
  let n = e.data ?? e, r = X(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(X(n, t.nameField)) : i(n.name), l = t.hrefField ? i(X(n, t.hrefField)) : "";
@@ -1734,7 +1754,7 @@ function xt(e, t = {}, n = 0) {
1734
1754
  }
1735
1755
  return o;
1736
1756
  }
1737
- function St({ images: e = [], source: t = "", entry: n = "", imageField: r = "", nameField: o = "", hrefField: s = "", limit: c = 0, emptyText: p = "", columns: m = 3, gap: h = 8, showNames: g = !1, lightbox: _ = !0, style: v, nodeRef: y, inert: b }) {
1757
+ function Tt({ images: e = [], source: t = "", entry: n = "", imageField: r = "", nameField: o = "", hrefField: s = "", limit: c = 0, emptyText: p = "", columns: m = 3, gap: h = 8, showNames: g = !1, lightbox: _ = !0, style: v, nodeRef: y, inert: b }) {
1738
1758
  let { tenant: x, apiUrl: S } = i(J), C = i(ye)?.[t], [w, T] = l(null), [E, D] = l(() => /* @__PURE__ */ new Set());
1739
1759
  a(() => {
1740
1760
  if (!t || C) return;
@@ -1752,7 +1772,7 @@ function St({ images: e = [], source: t = "", entry: n = "", imageField: r = "",
1752
1772
  C
1753
1773
  ]);
1754
1774
  let O = C ?? w ?? [], k = n ? O.filter((e) => e?.id === n || e?.data?.slug === n || e?.slug === n) : O, A = Math.max(0, Number(c) || 0), j = t ? (() => {
1755
- let e = xt(k, {
1775
+ let e = wt(k, {
1756
1776
  imageField: r,
1757
1777
  nameField: o,
1758
1778
  hrefField: s
@@ -1957,19 +1977,19 @@ function St({ images: e = [], source: t = "", entry: n = "", imageField: r = "",
1957
1977
  ]
1958
1978
  });
1959
1979
  }
1960
- var Ct = {
1980
+ var Et = {
1961
1981
  color: "inherit",
1962
1982
  textDecoration: "none",
1963
1983
  fontSize: 14,
1964
1984
  opacity: .85
1965
- }, wt = {
1985
+ }, Dt = {
1966
1986
  background: "var(--page-surface, #f2f2f2)",
1967
1987
  color: "var(--page-text, #111827)",
1968
1988
  border: "1px solid rgba(148, 163, 184, 0.25)",
1969
1989
  boxShadow: "0 16px 40px rgba(15, 23, 42, 0.16)",
1970
1990
  zIndex: 60
1971
1991
  };
1972
- function Tt(e, t = {}, n = "dropdown") {
1992
+ function Ot(e, t = {}, n = "dropdown") {
1973
1993
  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 ? "" : we(e), o = r.map((e) => {
1974
1994
  let n = e.data ?? {}, r = t.parentField ? i(n[t.parentField]) : null;
1975
1995
  return {
@@ -2011,7 +2031,7 @@ function Tt(e, t = {}, n = "dropdown") {
2011
2031
  type: e.children.length ? n : "link"
2012
2032
  }));
2013
2033
  }
2014
- function Et({ brand: e, logo: n, brandHref: r, brandTarget: o, links: s = [], style: c, nodeRef: p, menu: m = "auto", breakpoint: h = 768, source: g = "", labelField: _ = "", hrefField: v = "", imageField: y = "", descField: b = "", parentField: x = "", submenu: S = "dropdown" }) {
2034
+ function kt({ brand: e, logo: n, brandHref: r, brandTarget: o, links: s = [], style: c, nodeRef: p, menu: m = "auto", breakpoint: h = 768, source: g = "", labelField: _ = "", hrefField: v = "", imageField: y = "", descField: b = "", parentField: x = "", submenu: S = "dropdown" }) {
2015
2035
  let [C, w] = l(null), [T, E] = l(!1), [D, O] = l(!1), [k, A] = l(null), { tenant: j, apiUrl: M } = i(J), N = i(ye)?.[g], [F, I] = l(null);
2016
2036
  a(() => {
2017
2037
  if (!g || N) return;
@@ -2032,7 +2052,7 @@ function Et({ brand: e, logo: n, brandHref: r, brandTarget: o, links: s = [], st
2032
2052
  let e = new ResizeObserver(() => E(C.offsetWidth < h));
2033
2053
  return e.observe(C), () => e.disconnect();
2034
2054
  }, [C, h]);
2035
- let L = g ? Tt(N ?? F ?? [], {
2055
+ let L = g ? Ot(N ?? F ?? [], {
2036
2056
  labelField: _,
2037
2057
  hrefField: v,
2038
2058
  imageField: y,
@@ -2061,7 +2081,7 @@ function Et({ brand: e, logo: n, brandHref: r, brandTarget: o, links: s = [], st
2061
2081
  return /* @__PURE__ */ f("a", {
2062
2082
  href: e.href || "#",
2063
2083
  style: {
2064
- ...Ct,
2084
+ ...Et,
2065
2085
  display: n ? "block" : "flex",
2066
2086
  alignItems: n ? void 0 : "center",
2067
2087
  gap: n ? void 0 : 10,
@@ -2158,7 +2178,7 @@ function Et({ brand: e, logo: n, brandHref: r, brandTarget: o, links: s = [], st
2158
2178
  let t = e.children ?? [];
2159
2179
  if (!t.length) return /* @__PURE__ */ d("a", {
2160
2180
  href: e.href || "#",
2161
- style: Ct,
2181
+ style: Et,
2162
2182
  children: e.label
2163
2183
  }, e.key);
2164
2184
  let n = e.type === "mega";
@@ -2172,7 +2192,7 @@ function Et({ brand: e, logo: n, brandHref: r, brandTarget: o, links: s = [], st
2172
2192
  children: [/* @__PURE__ */ f("a", {
2173
2193
  href: e.href || "#",
2174
2194
  style: {
2175
- ...Ct,
2195
+ ...Et,
2176
2196
  cursor: "pointer"
2177
2197
  },
2178
2198
  children: [
@@ -2188,7 +2208,7 @@ function Et({ brand: e, logo: n, brandHref: r, brandTarget: o, links: s = [], st
2188
2208
  ]
2189
2209
  }), k === e.key && (n ? /* @__PURE__ */ d("div", {
2190
2210
  style: {
2191
- ...wt,
2211
+ ...Dt,
2192
2212
  position: "absolute",
2193
2213
  left: 0,
2194
2214
  right: 0,
@@ -2204,7 +2224,7 @@ function Et({ brand: e, logo: n, brandHref: r, brandTarget: o, links: s = [], st
2204
2224
  }, !0))
2205
2225
  }) : /* @__PURE__ */ d("div", {
2206
2226
  style: {
2207
- ...wt,
2227
+ ...Dt,
2208
2228
  position: "absolute",
2209
2229
  top: "100%",
2210
2230
  left: 0,
@@ -2233,7 +2253,7 @@ function Et({ brand: e, logo: n, brandHref: r, brandTarget: o, links: s = [], st
2233
2253
  children: L.map((e) => /* @__PURE__ */ f(t, { children: [/* @__PURE__ */ d("a", {
2234
2254
  href: e.href || "#",
2235
2255
  style: {
2236
- ...Ct,
2256
+ ...Et,
2237
2257
  padding: "10px 4px",
2238
2258
  fontWeight: (e.children ?? []).length ? 600 : 400,
2239
2259
  opacity: 1
@@ -2244,7 +2264,7 @@ function Et({ brand: e, logo: n, brandHref: r, brandTarget: o, links: s = [], st
2244
2264
  ]
2245
2265
  });
2246
2266
  }
2247
- function Dt({ tabs: e = [], linked: t, style: n, nodeRef: r }) {
2267
+ function At({ tabs: e = [], linked: t, style: n, nodeRef: r }) {
2248
2268
  let [i, a] = l(0), o = e.length ? Math.min(i, e.length - 1) : 0;
2249
2269
  return e.length ? /* @__PURE__ */ f("div", {
2250
2270
  ref: r,
@@ -2284,13 +2304,13 @@ function Dt({ tabs: e = [], linked: t, style: n, nodeRef: r }) {
2284
2304
  }, e.key))]
2285
2305
  }) : null;
2286
2306
  }
2287
- function Ot({ items: e = [], linked: t, multiple: n = !1, icon: r = "", padX: i, padY: a, headerBg: o, headerColor: s, openBg: c, openColor: u, borderColor: p, style: m, nodeRef: h }) {
2307
+ function jt({ items: e = [], linked: t, multiple: n = !1, icon: r = "", padX: i, padY: a, headerBg: o, headerColor: s, openBg: c, openColor: u, borderColor: p, style: m, nodeRef: h }) {
2288
2308
  let [g, _] = l(() => new Set(e.length ? [e[0].key] : []));
2289
2309
  if (!e.length) return null;
2290
2310
  let v = (e, t) => typeof e == "string" && e ? e : t, y = (e, t) => {
2291
2311
  let n = Number(e);
2292
2312
  return e === "" || e == null || !Number.isFinite(n) ? t : n;
2293
- }, b = yt[r], x = (e) => _((t) => {
2313
+ }, b = St[r], x = (e) => _((t) => {
2294
2314
  let r = new Set(n ? t : []);
2295
2315
  return t.has(e) ? r.delete(e) : r.add(e), r;
2296
2316
  });
@@ -2365,15 +2385,15 @@ function Ot({ items: e = [], linked: t, multiple: n = !1, icon: r = "", padX: i,
2365
2385
  })
2366
2386
  });
2367
2387
  }
2368
- var kt = {
2388
+ var Mt = {
2369
2389
  display: "flex",
2370
2390
  flexDirection: "column",
2371
2391
  gap: "12px"
2372
- }, At = {
2392
+ }, Nt = {
2373
2393
  fontSize: "14px",
2374
2394
  fontWeight: 500,
2375
2395
  color: "var(--page-text, #111827)"
2376
- }, jt = {
2396
+ }, Pt = {
2377
2397
  padding: "10px 12px",
2378
2398
  border: "1px solid var(--page-border, #d1d5db)",
2379
2399
  borderRadius: "6px",
@@ -2383,18 +2403,18 @@ var kt = {
2383
2403
  boxSizing: "border-box",
2384
2404
  backgroundColor: "var(--page-surface, #f2f2f2)",
2385
2405
  color: "var(--page-text, #111827)"
2386
- }, Mt = {
2406
+ }, Ft = {
2387
2407
  display: "flex",
2388
2408
  alignItems: "center",
2389
2409
  gap: "8px",
2390
2410
  fontSize: "14px",
2391
2411
  color: "var(--page-text, #111827)"
2392
- }, Nt = (e) => e ? {
2412
+ }, It = (e) => e ? {
2393
2413
  readOnly: !0,
2394
2414
  tabIndex: -1,
2395
2415
  onMouseDown: (e) => e.preventDefault()
2396
2416
  } : {};
2397
- function Pt(e, t) {
2417
+ function Lt(e, t) {
2398
2418
  if (!e) return !0;
2399
2419
  let n = t[e.field], r = n == null || n === "" ? "" : String(n), i = e.value ?? "";
2400
2420
  switch (e.op) {
@@ -2408,11 +2428,11 @@ function Pt(e, t) {
2408
2428
  default: return !1;
2409
2429
  }
2410
2430
  }
2411
- var Ft = {
2431
+ var Rt = {
2412
2432
  display: "flex",
2413
2433
  flexDirection: "column",
2414
2434
  gap: 6
2415
- }, It = {
2435
+ }, zt = {
2416
2436
  font: "inherit",
2417
2437
  fontSize: 15,
2418
2438
  padding: "10px 12px",
@@ -2423,17 +2443,17 @@ var Ft = {
2423
2443
  width: "100%",
2424
2444
  boxSizing: "border-box"
2425
2445
  };
2426
- function Lt(e, t) {
2446
+ function Bt(e, t) {
2427
2447
  let n = Array.isArray(e?.options) ? e.options : [];
2428
2448
  if (!e?.parentField) return n;
2429
2449
  let r = t?.[e.parentField];
2430
2450
  return r ? n.filter((e) => typeof e == "string" ? !1 : !e.parent || e.parent === r) : [];
2431
2451
  }
2432
- var Rt = "g-recaptcha-response", zt = (e) => e?.type === "recaptcha" ? Rt : e?.name;
2433
- function Bt({ field: e, value: t, onChange: n, inert: r, values: i }) {
2452
+ var Vt = "g-recaptcha-response", Ht = (e) => e?.type === "recaptcha" ? Vt : e?.name;
2453
+ function Ut({ field: e, value: t, onChange: n, inert: r, values: i }) {
2434
2454
  let a = /* @__PURE__ */ f("span", {
2435
2455
  style: {
2436
- ...At,
2456
+ ...Nt,
2437
2457
  fontSize: 14
2438
2458
  },
2439
2459
  children: [e.label, e.required ? " *" : ""]
@@ -2442,7 +2462,7 @@ function Bt({ field: e, value: t, onChange: n, inert: r, values: i }) {
2442
2462
  required: e.required || void 0,
2443
2463
  placeholder: e.placeholder || void 0,
2444
2464
  disabled: r || void 0,
2445
- style: It,
2465
+ style: zt,
2446
2466
  value: t ?? "",
2447
2467
  onChange: (t) => n(e.name, t.target.value)
2448
2468
  };
@@ -2471,12 +2491,12 @@ function Bt({ field: e, value: t, onChange: n, inert: r, values: i }) {
2471
2491
  borderRadius: 8,
2472
2492
  display: "block"
2473
2493
  }
2474
- }) : null : e.type === "recaptcha" ? /* @__PURE__ */ d(Gt, {
2494
+ }) : null : e.type === "recaptcha" ? /* @__PURE__ */ d(Jt, {
2475
2495
  theme: e.captchaTheme,
2476
2496
  size: e.captchaSize,
2477
2497
  inert: r,
2478
- onChange: (e) => n(Rt, e)
2479
- }) : e.type === "video" ? e.src ? /youtube\.com|youtu\.be|vimeo\.com/i.test(e.src) ? /* @__PURE__ */ d(et, {
2498
+ onChange: (e) => n(Vt, e)
2499
+ }) : e.type === "video" ? e.src ? /youtube\.com|youtu\.be|vimeo\.com/i.test(e.src) ? /* @__PURE__ */ d(rt, {
2480
2500
  url: e.src,
2481
2501
  style: { width: "100%" }
2482
2502
  }) : /* @__PURE__ */ d("video", {
@@ -2488,14 +2508,14 @@ function Bt({ field: e, value: t, onChange: n, inert: r, values: i }) {
2488
2508
  display: "block"
2489
2509
  }
2490
2510
  }) : null : /* @__PURE__ */ f("label", {
2491
- style: Ft,
2511
+ style: Rt,
2492
2512
  children: [
2493
2513
  a,
2494
2514
  e.type === "textarea" || e.multiline ? /* @__PURE__ */ d("textarea", {
2495
2515
  ...o,
2496
2516
  rows: 4,
2497
2517
  style: {
2498
- ...It,
2518
+ ...zt,
2499
2519
  resize: "vertical"
2500
2520
  }
2501
2521
  }) : e.type === "select" ? /* @__PURE__ */ f("select", {
@@ -2504,7 +2524,7 @@ function Bt({ field: e, value: t, onChange: n, inert: r, values: i }) {
2504
2524
  children: [/* @__PURE__ */ d("option", {
2505
2525
  value: "",
2506
2526
  children: e.placeholder || "—"
2507
- }), Lt(e, i).map((e, t) => /* @__PURE__ */ d("option", {
2527
+ }), Bt(e, i).map((e, t) => /* @__PURE__ */ d("option", {
2508
2528
  value: typeof e == "string" ? e : e.value,
2509
2529
  children: typeof e == "string" ? e : e.label ?? e.value
2510
2530
  }, t))]
@@ -2551,7 +2571,7 @@ function Bt({ field: e, value: t, onChange: n, inert: r, values: i }) {
2551
2571
  ]
2552
2572
  });
2553
2573
  }
2554
- function Vt({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s, auto: c, submitLabel: p, nodeRef: m, inert: h, children: g, linked: _, show: v }) {
2574
+ function Wt({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s, auto: c, submitLabel: p, nodeRef: m, inert: h, children: g, linked: _, show: v }) {
2555
2575
  let { tenant: y, apiUrl: b } = i(J), [x, S] = l("form"), [C, w] = l(null), [T, E] = l({}), [D, O] = l(0), k = h ? v || "form" : x;
2556
2576
  a(() => {
2557
2577
  if (!c || !s) return;
@@ -2573,11 +2593,11 @@ function Vt({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s,
2573
2593
  section: e,
2574
2594
  fields: []
2575
2595
  }) : A[A.length - 1].fields.push(e);
2576
- let j = A.filter((e) => e.section || e.fields.length), M = j.filter((e) => !e.section || Pt(e.section.condition, T)).map((e) => ({
2596
+ let j = A.filter((e) => e.section || e.fields.length), M = j.filter((e) => !e.section || Lt(e.section.condition, T)).map((e) => ({
2577
2597
  ...e,
2578
- fields: e.fields.filter((e) => Pt(e.condition, T))
2598
+ fields: e.fields.filter((e) => Lt(e.condition, T))
2579
2599
  })), N = j.length > 1, F = Math.min(D, Math.max(0, M.length - 1)), I = N ? M[F]?.fields ?? [] : M.flatMap((e) => e.fields), L = I.filter((e) => {
2580
- let t = T[zt(e)];
2600
+ let t = T[Ht(e)];
2581
2601
  return e.required && (t == null || t === "" || t === !1);
2582
2602
  }), R = F >= M.length - 1, z = (e, t) => E((n) => {
2583
2603
  let r = {
@@ -2633,11 +2653,11 @@ function Vt({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s,
2633
2653
  }
2634
2654
  },
2635
2655
  style: {
2636
- ...kt,
2656
+ ...Mt,
2637
2657
  display: k === "success" ? "none" : "flex"
2638
2658
  },
2639
2659
  children: c && s ? /* @__PURE__ */ f(u, { children: [
2640
- N && /* @__PURE__ */ d(gn, {
2660
+ N && /* @__PURE__ */ d(yn, {
2641
2661
  steps: M.map((e) => ({ label: e.section?.label ?? "Start" })),
2642
2662
  active: F + 1,
2643
2663
  style: { marginBottom: 8 }
@@ -2650,9 +2670,9 @@ function Vt({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s,
2650
2670
  },
2651
2671
  children: M[F].section.help
2652
2672
  }),
2653
- I.map((e) => /* @__PURE__ */ d(Bt, {
2673
+ I.map((e) => /* @__PURE__ */ d(Ut, {
2654
2674
  field: e,
2655
- value: T[zt(e)],
2675
+ value: T[Ht(e)],
2656
2676
  values: T,
2657
2677
  onChange: z,
2658
2678
  inert: h
@@ -2723,10 +2743,10 @@ function Vt({ style: e, action: t, method: n, name: r, enctype: o, formSlug: s,
2723
2743
  ]
2724
2744
  });
2725
2745
  }
2726
- var Ht = null, Ut = null, Wt = (e) => {
2746
+ var Gt = null, Kt = null, qt = (e) => {
2727
2747
  let t = typeof e == "string" && e.trim() ? e.trim() : "";
2728
- if (Ht && Ut === t) return Ht;
2729
- if (Ht && typeof window < "u") {
2748
+ if (Gt && Kt === t) return Gt;
2749
+ if (Gt && typeof window < "u") {
2730
2750
  for (let e of ["grecaptcha", "___grecaptcha_cfg"]) try {
2731
2751
  delete window[e];
2732
2752
  } catch {
@@ -2734,22 +2754,22 @@ var Ht = null, Ut = null, Wt = (e) => {
2734
2754
  }
2735
2755
  document.querySelectorAll("script[src*=\"recaptcha\"]").forEach((e) => e.remove());
2736
2756
  }
2737
- return Ut = t, Ht = new Promise((e) => {
2757
+ return Kt = t, Gt = new Promise((e) => {
2738
2758
  if (typeof window > "u") return;
2739
2759
  if (window.grecaptcha?.render) return e(window.grecaptcha);
2740
2760
  window.__webimRecaptchaReady = () => e(window.grecaptcha);
2741
2761
  let n = document.createElement("script");
2742
2762
  n.src = `https://www.google.com/recaptcha/api.js?onload=__webimRecaptchaReady&render=explicit${t ? `&hl=${encodeURIComponent(t)}` : ""}`, n.async = !0, document.head.appendChild(n);
2743
- }), Ht;
2763
+ }), Gt;
2744
2764
  };
2745
- function Gt({ siteKey: e, theme: t, size: n, hl: r, style: o, nodeRef: s, inert: l, onChange: u }) {
2765
+ function Jt({ siteKey: e, theme: t, size: n, hl: r, style: o, nodeRef: s, inert: l, onChange: u }) {
2746
2766
  let p = i(J), m = p?.settings && typeof p.settings == "object" ? p.settings["google.recaptchaKey"] : "", h = typeof e == "string" && e.trim() || (typeof m == "string" ? m.trim() : ""), g = c(null), _ = c(u);
2747
2767
  if (_.current = u, a(() => {
2748
2768
  if (l || !h || !g.current) return;
2749
2769
  let e = !0, i = (t) => {
2750
2770
  e && typeof _.current == "function" && _.current(t);
2751
2771
  };
2752
- return Wt(r).then((r) => {
2772
+ return qt(r).then((r) => {
2753
2773
  if (!(!e || !g.current || !r?.render)) {
2754
2774
  g.current.innerHTML = "", i("");
2755
2775
  try {
@@ -2831,17 +2851,17 @@ function Gt({ siteKey: e, theme: t, size: n, hl: r, style: o, nodeRef: s, inert:
2831
2851
  children: /* @__PURE__ */ d("div", { ref: g })
2832
2852
  }) : null;
2833
2853
  }
2834
- function Kt({ text: e, parts: t, style: n, nodeRef: r, linked: i }) {
2854
+ function Yt({ text: e, parts: t, style: n, nodeRef: r, linked: i }) {
2835
2855
  return /* @__PURE__ */ d("label", {
2836
2856
  ref: r,
2837
2857
  style: {
2838
- ...At,
2858
+ ...Nt,
2839
2859
  ...P(n)
2840
2860
  },
2841
2861
  children: Re(t, e, i)
2842
2862
  });
2843
2863
  }
2844
- function qt({ type: e = "text", name: t, placeholder: n, required: r, style: i, nodeRef: a, inert: o }) {
2864
+ function Xt({ type: e = "text", name: t, placeholder: n, required: r, style: i, nodeRef: a, inert: o }) {
2845
2865
  return /* @__PURE__ */ d("input", {
2846
2866
  ref: a,
2847
2867
  type: e,
@@ -2849,13 +2869,13 @@ function qt({ type: e = "text", name: t, placeholder: n, required: r, style: i,
2849
2869
  placeholder: n,
2850
2870
  required: !o && !!r,
2851
2871
  style: {
2852
- ...jt,
2872
+ ...Pt,
2853
2873
  ...P(i)
2854
2874
  },
2855
- ...Nt(o)
2875
+ ...It(o)
2856
2876
  });
2857
2877
  }
2858
- function Jt({ name: e, placeholder: t, rows: n = 4, required: r, style: i, nodeRef: a, inert: o }) {
2878
+ function Zt({ name: e, placeholder: t, rows: n = 4, required: r, style: i, nodeRef: a, inert: o }) {
2859
2879
  return /* @__PURE__ */ d("textarea", {
2860
2880
  ref: a,
2861
2881
  name: e || void 0,
@@ -2863,18 +2883,18 @@ function Jt({ name: e, placeholder: t, rows: n = 4, required: r, style: i, nodeR
2863
2883
  rows: n,
2864
2884
  required: !o && !!r,
2865
2885
  style: {
2866
- ...jt,
2886
+ ...Pt,
2867
2887
  resize: "vertical",
2868
2888
  ...P(i)
2869
2889
  },
2870
- ...Nt(o)
2890
+ ...It(o)
2871
2891
  });
2872
2892
  }
2873
- function Yt({ kind: e = "checkbox", label: t, name: n, value: r, required: i, style: a, nodeRef: o, inert: s }) {
2893
+ function Qt({ kind: e = "checkbox", label: t, name: n, value: r, required: i, style: a, nodeRef: o, inert: s }) {
2874
2894
  return /* @__PURE__ */ f("label", {
2875
2895
  ref: o,
2876
2896
  style: {
2877
- ...Mt,
2897
+ ...Ft,
2878
2898
  ...P(a)
2879
2899
  },
2880
2900
  children: [/* @__PURE__ */ d("input", {
@@ -2891,7 +2911,7 @@ function Yt({ kind: e = "checkbox", label: t, name: n, value: r, required: i, st
2891
2911
  }), t]
2892
2912
  });
2893
2913
  }
2894
- function Xt({ name: e, placeholder: t, options: n = [], required: r, style: i, nodeRef: a, inert: o }) {
2914
+ function $t({ name: e, placeholder: t, options: n = [], required: r, style: i, nodeRef: a, inert: o }) {
2895
2915
  return /* @__PURE__ */ f("select", {
2896
2916
  ref: a,
2897
2917
  name: e || void 0,
@@ -2900,7 +2920,7 @@ function Xt({ name: e, placeholder: t, options: n = [], required: r, style: i, n
2900
2920
  onMouseDown: o ? (e) => e.preventDefault() : void 0,
2901
2921
  tabIndex: o ? -1 : void 0,
2902
2922
  style: {
2903
- ...jt,
2923
+ ...Pt,
2904
2924
  appearance: "auto",
2905
2925
  ...P(i)
2906
2926
  },
@@ -2914,12 +2934,12 @@ function Xt({ name: e, placeholder: t, options: n = [], required: r, style: i, n
2914
2934
  }, t))]
2915
2935
  });
2916
2936
  }
2917
- function Zt({ name: e, accept: t, required: n, text: r = "Choose a file…", style: i, nodeRef: a, inert: o }) {
2937
+ function en({ name: e, accept: t, required: n, text: r = "Choose a file…", style: i, nodeRef: a, inert: o }) {
2918
2938
  let [s, c] = l(null);
2919
2939
  return /* @__PURE__ */ f("label", {
2920
2940
  ref: a,
2921
2941
  style: {
2922
- ...jt,
2942
+ ...Pt,
2923
2943
  display: "flex",
2924
2944
  alignItems: "center",
2925
2945
  gap: "8px",
@@ -2946,7 +2966,7 @@ function Zt({ name: e, accept: t, required: n, text: r = "Choose a file…", sty
2946
2966
  ]
2947
2967
  });
2948
2968
  }
2949
- function Qt({ text: e = "Submit", style: t, nodeRef: n, inert: r }) {
2969
+ function tn({ text: e = "Submit", style: t, nodeRef: n, inert: r }) {
2950
2970
  return /* @__PURE__ */ d("button", {
2951
2971
  ref: n,
2952
2972
  type: r ? "button" : "submit",
@@ -2966,7 +2986,7 @@ function Qt({ text: e = "Submit", style: t, nodeRef: n, inert: r }) {
2966
2986
  children: e
2967
2987
  });
2968
2988
  }
2969
- function $t({ cols: e = 2, rows: t = 1, style: n, nodeRef: r, linked: i }) {
2989
+ function nn({ cols: e = 2, rows: t = 1, style: n, nodeRef: r, linked: i }) {
2970
2990
  let a = Math.max(1, (Number(e) || 1) * (Number(t) || 1));
2971
2991
  return /* @__PURE__ */ d("div", {
2972
2992
  ref: r,
@@ -2983,7 +3003,7 @@ function $t({ cols: e = 2, rows: t = 1, style: n, nodeRef: r, linked: i }) {
2983
3003
  }, t))
2984
3004
  });
2985
3005
  }
2986
- function en({ collection: e, limit: t = 6, layout: n = "grid", columns: r = 3, imageField: o, titleField: s = "name", textField: c, custom: u, templateId: p, paged: m, filters: h, style: g, nodeRef: _ }) {
3006
+ function rn({ collection: e, limit: t = 6, layout: n = "grid", columns: r = 3, imageField: o, titleField: s = "name", textField: c, custom: u, templateId: p, paged: m, filters: h, style: g, nodeRef: _ }) {
2987
3007
  let { tenant: v, apiUrl: y, locale: b } = i(J), x = i(Ce), S = i(ye), [, C] = l(0);
2988
3008
  a(() => {
2989
3009
  if (typeof window > "u") return;
@@ -3094,7 +3114,7 @@ function en({ collection: e, limit: t = 6, layout: n = "grid", columns: r = 3, i
3094
3114
  lineHeight: 1.55,
3095
3115
  opacity: .85
3096
3116
  },
3097
- children: He(a)
3117
+ children: Ge(a)
3098
3118
  })
3099
3119
  ]
3100
3120
  })]
@@ -3102,7 +3122,7 @@ function en({ collection: e, limit: t = 6, layout: n = "grid", columns: r = 3, i
3102
3122
  })
3103
3123
  });
3104
3124
  }
3105
- function tn({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, inert: i }) {
3125
+ function an({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, inert: i }) {
3106
3126
  let a = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && typeof e.name == "string" && e.name) : [], o = i ? {} : xe(), s = {
3107
3127
  height: 34,
3108
3128
  padding: "0 12px",
@@ -3151,7 +3171,7 @@ function tn({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, i
3151
3171
  name: `f_${e.name}`,
3152
3172
  defaultValue: o[e.name] ?? "",
3153
3173
  style: s,
3154
- ...Nt(i),
3174
+ ...It(i),
3155
3175
  children: [/* @__PURE__ */ d("option", {
3156
3176
  value: "",
3157
3177
  children: e.label || e.name
@@ -3166,7 +3186,7 @@ function tn({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, i
3166
3186
  name: `f_${e.name}`,
3167
3187
  defaultValue: o[e.name] ?? "",
3168
3188
  style: s,
3169
- ...Nt(i),
3189
+ ...It(i),
3170
3190
  children: [
3171
3191
  /* @__PURE__ */ d("option", {
3172
3192
  value: "",
@@ -3187,7 +3207,7 @@ function tn({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, i
3187
3207
  defaultValue: o[e.name] ?? "",
3188
3208
  placeholder: e.label || e.name,
3189
3209
  style: s,
3190
- ...Nt(i)
3210
+ ...It(i)
3191
3211
  }, e.name)), /* @__PURE__ */ d("button", {
3192
3212
  type: "submit",
3193
3213
  style: {
@@ -3200,12 +3220,12 @@ function tn({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, i
3200
3220
  fontWeight: 600,
3201
3221
  cursor: i ? "default" : "pointer"
3202
3222
  },
3203
- ...Nt(i),
3223
+ ...It(i),
3204
3224
  children: t
3205
3225
  })]
3206
3226
  });
3207
3227
  }
3208
- function nn({ items: e = [], separator: t = "/", style: n, nodeRef: r }) {
3228
+ function on({ items: e = [], separator: t = "/", style: n, nodeRef: r }) {
3209
3229
  return e.length ? /* @__PURE__ */ d("nav", {
3210
3230
  ref: r,
3211
3231
  "aria-label": "Breadcrumb",
@@ -3255,7 +3275,7 @@ function nn({ items: e = [], separator: t = "/", style: n, nodeRef: r }) {
3255
3275
  })
3256
3276
  }) : null;
3257
3277
  }
3258
- function rn({ pages: e = 5, current: t = 1, prevNext: n = !0, href: r = "#", source: o, pageSize: s = 6, align: c, hideEmpty: u, inert: p, style: m, nodeRef: h }) {
3278
+ function sn({ pages: e = 5, current: t = 1, prevNext: n = !0, href: r = "#", source: o, pageSize: s = 6, align: c, hideEmpty: u, inert: p, style: m, nodeRef: h }) {
3259
3279
  let { tenant: g, apiUrl: _ } = i(J), v = i(ye), [y, b] = l(null), x = o ? Number(v?.[`${o}:total`]) : NaN;
3260
3280
  a(() => {
3261
3281
  if (!o || Number.isFinite(x)) return;
@@ -3340,15 +3360,15 @@ function rn({ pages: e = 5, current: t = 1, prevNext: n = !0, href: r = "#", sou
3340
3360
  ]
3341
3361
  });
3342
3362
  }
3343
- var an = "webim.page_mode", on = () => {
3363
+ var cn = "webim.page_mode", ln = () => {
3344
3364
  if (typeof window > "u") return "auto";
3345
3365
  try {
3346
- let e = window.localStorage.getItem(an);
3366
+ let e = window.localStorage.getItem(cn);
3347
3367
  return e === "light" || e === "dark" ? e : "auto";
3348
3368
  } catch {
3349
3369
  return "auto";
3350
3370
  }
3351
- }, sn = (e) => {
3371
+ }, un = (e) => {
3352
3372
  let t = {
3353
3373
  width: 16,
3354
3374
  height: 16,
@@ -3380,13 +3400,13 @@ var an = "webim.page_mode", on = () => {
3380
3400
  rx: "2"
3381
3401
  }), /* @__PURE__ */ d("path", { d: "M8 21h8M12 17v4" })]
3382
3402
  });
3383
- }, cn = {
3403
+ }, dn = {
3384
3404
  light: "Light theme",
3385
3405
  dark: "Dark theme",
3386
3406
  auto: "Follow the device theme"
3387
3407
  };
3388
- function ln({ variant: e, showSystem: t, style: n, nodeRef: r, inert: i }) {
3389
- let [o, s] = l(i ? "auto" : on), u = c(null), f = (e) => {
3408
+ function fn({ variant: e, showSystem: t, style: n, nodeRef: r, inert: i }) {
3409
+ let [o, s] = l(i ? "auto" : ln), u = c(null), f = (e) => {
3390
3410
  u.current = e, typeof r == "function" && r(e);
3391
3411
  };
3392
3412
  a(() => {
@@ -3394,7 +3414,7 @@ function ln({ variant: e, showSystem: t, style: n, nodeRef: r, inert: i }) {
3394
3414
  let e = u.current?.closest?.(".webim-page");
3395
3415
  e && (o === "light" || o === "dark" ? e.setAttribute("data-webim-mode", o) : e.removeAttribute("data-webim-mode"));
3396
3416
  try {
3397
- o === "auto" ? window.localStorage.removeItem(an) : window.localStorage.setItem(an, o);
3417
+ o === "auto" ? window.localStorage.removeItem(cn) : window.localStorage.setItem(cn, o);
3398
3418
  } catch {}
3399
3419
  }, [o, i]);
3400
3420
  let p = t === !1 ? ["light", "dark"] : [
@@ -3429,8 +3449,8 @@ function ln({ variant: e, showSystem: t, style: n, nodeRef: r, inert: i }) {
3429
3449
  },
3430
3450
  children: p.map((e) => /* @__PURE__ */ d("button", {
3431
3451
  type: "button",
3432
- title: cn[e],
3433
- "aria-label": cn[e],
3452
+ title: dn[e],
3453
+ "aria-label": dn[e],
3434
3454
  "aria-pressed": e === m,
3435
3455
  onClick: i ? void 0 : () => s(e),
3436
3456
  style: {
@@ -3441,15 +3461,15 @@ function ln({ variant: e, showSystem: t, style: n, nodeRef: r, inert: i }) {
3441
3461
  background: e === m ? "var(--page-accent, #111827)" : "transparent",
3442
3462
  opacity: e === m ? 1 : .7
3443
3463
  },
3444
- children: sn(e)
3464
+ children: un(e)
3445
3465
  }, e))
3446
3466
  });
3447
3467
  let g = p[(p.indexOf(m) + 1) % p.length];
3448
3468
  return /* @__PURE__ */ d("button", {
3449
3469
  ref: f,
3450
3470
  type: "button",
3451
- title: cn[m],
3452
- "aria-label": `Theme: ${cn[m]} — switch to ${cn[g]}`,
3471
+ title: dn[m],
3472
+ "aria-label": `Theme: ${dn[m]} — switch to ${dn[g]}`,
3453
3473
  onClick: i ? void 0 : () => s(g),
3454
3474
  style: {
3455
3475
  ...h,
@@ -3458,10 +3478,10 @@ function ln({ variant: e, showSystem: t, style: n, nodeRef: r, inert: i }) {
3458
3478
  border: "1px solid rgba(148, 163, 184, 0.4)",
3459
3479
  ...P(n)
3460
3480
  },
3461
- children: sn(m)
3481
+ children: un(m)
3462
3482
  });
3463
3483
  }
3464
- function un(e) {
3484
+ function pn(e) {
3465
3485
  let t = e?.parentElement;
3466
3486
  for (; t && t !== document.body;) {
3467
3487
  let e = getComputedStyle(t).overflowY;
@@ -3470,7 +3490,7 @@ function un(e) {
3470
3490
  }
3471
3491
  return window;
3472
3492
  }
3473
- var dn = (e) => e === window ? window.scrollY : e.scrollTop, fn = {
3493
+ var mn = (e) => e === window ? window.scrollY : e.scrollTop, hn = {
3474
3494
  "bottom-right": (e) => ({
3475
3495
  right: e,
3476
3496
  bottom: e
@@ -3485,7 +3505,7 @@ var dn = (e) => e === window ? window.scrollY : e.scrollTop, fn = {
3485
3505
  transform: "translateX(-50%)"
3486
3506
  })
3487
3507
  };
3488
- function pn({ variant: e, label: t, position: n, offset: r, showAfter: i, smooth: o, bg: s, fg: c, style: u, nodeRef: p, inert: m, frame: h, builder: g }) {
3508
+ function gn({ variant: e, label: t, position: n, offset: r, showAfter: i, smooth: o, bg: s, fg: c, style: u, nodeRef: p, inert: m, frame: h, builder: g }) {
3489
3509
  let [_, v] = l(!!m), [y, b] = l(null), x = (e) => {
3490
3510
  b(e), typeof p == "function" && p(e);
3491
3511
  };
@@ -3496,8 +3516,8 @@ function pn({ variant: e, label: t, position: n, offset: r, showAfter: i, smooth
3496
3516
  }
3497
3517
  if (!y) return;
3498
3518
  let e = Number(i) >= 0 ? Number(i) : 300, t = () => {
3499
- let t = un(y), n = g && !(t === window ? document.documentElement.scrollHeight > window.innerHeight : t.scrollHeight > t.clientHeight);
3500
- v(n || dn(t) > e);
3519
+ let t = pn(y), n = g && !(t === window ? document.documentElement.scrollHeight > window.innerHeight : t.scrollHeight > t.clientHeight);
3520
+ v(n || mn(t) > e);
3501
3521
  };
3502
3522
  return t(), document.addEventListener("scroll", t, {
3503
3523
  capture: !0,
@@ -3511,7 +3531,7 @@ function pn({ variant: e, label: t, position: n, offset: r, showAfter: i, smooth
3511
3531
  ]);
3512
3532
  let S = () => {
3513
3533
  if (m) return;
3514
- let e = un(y), t = window.matchMedia?.("(prefers-reduced-motion: reduce)").matches, n = o === !1 || t ? "auto" : "smooth";
3534
+ let e = pn(y), t = window.matchMedia?.("(prefers-reduced-motion: reduce)").matches, n = o === !1 || t ? "auto" : "smooth";
3515
3535
  e === window ? window.scrollTo({
3516
3536
  top: 0,
3517
3537
  behavior: n
@@ -3519,7 +3539,7 @@ function pn({ variant: e, label: t, position: n, offset: r, showAfter: i, smooth
3519
3539
  top: 0,
3520
3540
  behavior: n
3521
3541
  });
3522
- }, C = Number(r) >= 0 ? Number(r) : 24, w = e === "pill", T = t || "Top", E = fn[n] ? n : "bottom-right", D = h ? {
3542
+ }, C = Number(r) >= 0 ? Number(r) : 24, w = e === "pill", T = t || "Top", E = hn[n] ? n : "bottom-right", D = h ? {
3523
3543
  position: "fixed",
3524
3544
  zIndex: 5,
3525
3545
  bottom: (h.bottom ?? 0) + C,
@@ -3532,7 +3552,7 @@ function pn({ variant: e, label: t, position: n, offset: r, showAfter: i, smooth
3532
3552
  } : {
3533
3553
  position: "fixed",
3534
3554
  zIndex: 2147482e3,
3535
- ...fn[E](C)
3555
+ ...hn[E](C)
3536
3556
  };
3537
3557
  return /* @__PURE__ */ f("button", {
3538
3558
  ref: x,
@@ -3583,7 +3603,7 @@ function pn({ variant: e, label: t, position: n, offset: r, showAfter: i, smooth
3583
3603
  }), w ? /* @__PURE__ */ d("span", { children: T }) : null]
3584
3604
  });
3585
3605
  }
3586
- var mn = {
3606
+ var _n = {
3587
3607
  facebook: {
3588
3608
  label: "Facebook",
3589
3609
  color: "#1877f2",
@@ -3650,8 +3670,8 @@ var mn = {
3650
3670
  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"
3651
3671
  }
3652
3672
  };
3653
- function hn({ links: e = [], variant: t, color: n, size: r, gap: i, newTab: a, style: o, nodeRef: s, inert: c }) {
3654
- let l = Array.isArray(e) ? e.filter((e) => e && mn[e.network]) : [];
3673
+ function vn({ links: e = [], variant: t, color: n, size: r, gap: i, newTab: a, style: o, nodeRef: s, inert: c }) {
3674
+ let l = Array.isArray(e) ? e.filter((e) => e && _n[e.network]) : [];
3655
3675
  if (!l.length) return null;
3656
3676
  let u = Math.min(Math.max(Number(r) || 18, 10), 64), f = Math.round(u * 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;
3657
3677
  return /* @__PURE__ */ d("div", {
@@ -3664,7 +3684,7 @@ function hn({ links: e = [], variant: t, color: n, size: r, gap: i, newTab: a, s
3664
3684
  ...P(o)
3665
3685
  },
3666
3686
  children: l.map((e, r) => {
3667
- let i = mn[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);
3687
+ let i = _n[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);
3668
3688
  return /* @__PURE__ */ d("a", {
3669
3689
  href: e.url || "#",
3670
3690
  onClick: h,
@@ -3698,7 +3718,7 @@ function hn({ links: e = [], variant: t, color: n, size: r, gap: i, newTab: a, s
3698
3718
  })
3699
3719
  });
3700
3720
  }
3701
- function gn({ steps: e = [], active: n = 1, vertical: r = !1, style: i, nodeRef: a }) {
3721
+ function yn({ steps: e = [], active: n = 1, vertical: r = !1, style: i, nodeRef: a }) {
3702
3722
  if (!e.length) return null;
3703
3723
  let o = Math.min(Math.max(Number(n) || 1, 1), e.length), s = (e) => ({
3704
3724
  width: 32,
@@ -3776,7 +3796,7 @@ function gn({ steps: e = [], active: n = 1, vertical: r = !1, style: i, nodeRef:
3776
3796
  })
3777
3797
  });
3778
3798
  }
3779
- var _n = {
3799
+ var bn = {
3780
3800
  small: {
3781
3801
  w: 132,
3782
3802
  h: 46,
@@ -3798,21 +3818,21 @@ var _n = {
3798
3818
  title: 12.5,
3799
3819
  avatar: 46
3800
3820
  }
3801
- }, vn = (e) => _n[e] ?? _n.medium;
3802
- _n.medium.w, _n.medium.h;
3803
- var yn = (e) => String(e?.group ?? "").trim(), bn = (e) => {
3821
+ }, xn = (e) => bn[e] ?? bn.medium;
3822
+ bn.medium.w, bn.medium.h;
3823
+ var Sn = (e) => String(e?.group ?? "").trim(), Cn = (e) => {
3804
3824
  let t = [], n = /* @__PURE__ */ new Map();
3805
3825
  return e.forEach((e, r) => {
3806
- let i = yn(e) || `#${r}`;
3826
+ let i = Sn(e) || `#${r}`;
3807
3827
  n.has(i) || (n.set(i, []), t.push(i)), n.get(i).push(e);
3808
3828
  }), t.flatMap((e) => n.get(e));
3809
3829
  };
3810
- function xn(e, { size: t = "medium", horizontal: n = !1, groupTitles: r = "top" } = {}) {
3811
- let i = vn(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 = [];
3830
+ function wn(e, { size: t = "medium", horizontal: n = !1, groupTitles: r = "top" } = {}) {
3831
+ let i = xn(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 = [];
3812
3832
  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);
3813
- d = bn(d);
3814
- for (let [e, t] of u) u.set(e, bn(t));
3815
- let f = (e, t) => o + (yn(e) !== yn(t) && (yn(e) || yn(t)) ? 24 : 0), p = /* @__PURE__ */ new Map(), m = (e, t) => {
3833
+ d = Cn(d);
3834
+ for (let [e, t] of u) u.set(e, Cn(t));
3835
+ let f = (e, t) => o + (Sn(e) !== Sn(t) && (Sn(e) || Sn(t)) ? 24 : 0), p = /* @__PURE__ */ new Map(), m = (e, t) => {
3816
3836
  if (t.has(e.id)) return 0;
3817
3837
  t.add(e.id);
3818
3838
  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);
@@ -3828,7 +3848,7 @@ function xn(e, { size: t = "medium", horizontal: n = !1, groupTitles: r = "top"
3828
3848
  x: m,
3829
3849
  y: b
3830
3850
  });
3831
- let x = yn(e);
3851
+ let x = Sn(e);
3832
3852
  if (x) {
3833
3853
  let t = `${e.parent && l.has(e.parent) && e.parent !== e.id ? e.parent : ""}|${x}`;
3834
3854
  _.has(t) || _.set(t, {
@@ -3902,18 +3922,18 @@ function xn(e, { size: t = "medium", horizontal: n = !1, groupTitles: r = "top"
3902
3922
  horizontal: n
3903
3923
  };
3904
3924
  }
3905
- var Sn = (e, t) => {
3925
+ var Tn = (e, t) => {
3906
3926
  let n = String(e ?? "");
3907
3927
  return n.length > t ? `${n.slice(0, t - 1)}…` : n;
3908
- }, Cn = (e) => {
3928
+ }, En = (e) => {
3909
3929
  let t = /^#([0-9a-f]{6}|[0-9a-f]{3})$/i.exec(String(e ?? "").trim());
3910
3930
  if (!t) return "#ffffff";
3911
3931
  let n = t[1];
3912
3932
  n.length === 3 && (n = [...n].map((e) => e + e).join(""));
3913
3933
  let r = parseInt(n, 16);
3914
3934
  return .299 * (r >> 16 & 255) + .587 * (r >> 8 & 255) + .114 * (r & 255) > 150 ? "#111827" : "#ffffff";
3915
- }, wn = (e) => !!(e?.cv?.trim?.() || e?.photo);
3916
- function Tn(e, t = {}) {
3935
+ }, Dn = (e) => !!(e?.cv?.trim?.() || e?.photo);
3936
+ function On(e, t = {}) {
3917
3937
  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 ? "" : we(e);
3918
3938
  return n.map((e) => {
3919
3939
  let n = e.data ?? {}, a = r(n[t.parentField]), o = a && typeof a == "object" ? a.id ?? null : a || null;
@@ -3929,11 +3949,11 @@ function Tn(e, t = {}) {
3929
3949
  };
3930
3950
  });
3931
3951
  }
3932
- var En = {
3952
+ var kn = {
3933
3953
  size: 36,
3934
3954
  pad: 10
3935
3955
  };
3936
- function Dn({ node: e, onClose: t }) {
3956
+ function An({ node: e, onClose: t }) {
3937
3957
  return a(() => {
3938
3958
  let e = (e) => e.key === "Escape" && t();
3939
3959
  return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
@@ -4054,7 +4074,7 @@ function Dn({ node: e, onClose: t }) {
4054
4074
  })
4055
4075
  });
4056
4076
  }
4057
- function On({ nodes: e = [], source: t, nameField: n, titleField: r, photoField: s, parentField: c, cvField: p, hrefField: m, groupField: h, groupTitles: g = "top", groupBg: _ = "", size: v = "medium", horizontal: y = !1, style: b, nodeRef: x, interactive: S = !0 }) {
4077
+ function jn({ nodes: e = [], source: t, nameField: n, titleField: r, photoField: s, parentField: c, cvField: p, hrefField: m, groupField: h, groupTitles: g = "top", groupBg: _ = "", size: v = "medium", horizontal: y = !1, style: b, nodeRef: x, interactive: S = !0 }) {
4058
4078
  let C = o(), [w, T] = l(null), { tenant: E, apiUrl: D } = i(J), O = i(ye)?.[t], [k, A] = l(null);
4059
4079
  a(() => {
4060
4080
  if (!t || O) return;
@@ -4071,7 +4091,7 @@ function On({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
4071
4091
  D,
4072
4092
  O
4073
4093
  ]);
4074
- let j = t ? Tn(O ?? k ?? [], {
4094
+ let j = t ? On(O ?? k ?? [], {
4075
4095
  nameField: n,
4076
4096
  titleField: r,
4077
4097
  photoField: s,
@@ -4079,7 +4099,7 @@ function On({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
4079
4099
  cvField: p,
4080
4100
  hrefField: m,
4081
4101
  groupField: h
4082
- }) : e, M = vn(v), { boxes: N, links: F, groups: I, width: L, height: R } = xn(j, {
4102
+ }) : e, M = xn(v), { boxes: N, links: F, groups: I, width: L, height: R } = wn(j, {
4083
4103
  size: v,
4084
4104
  horizontal: y,
4085
4105
  groupTitles: g
@@ -4137,8 +4157,8 @@ function On({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
4137
4157
  fontSize: M.title + 1,
4138
4158
  fontWeight: "600",
4139
4159
  opacity: "0.55",
4140
- fill: r ? Cn(e.color || _) : "var(--page-text, #111827)",
4141
- children: Sn(e.title, Math.floor(e.width / 7))
4160
+ fill: r ? En(e.color || _) : "var(--page-text, #111827)",
4161
+ children: Tn(e.title, Math.floor(e.width / 7))
4142
4162
  })] }, `group-${t}`);
4143
4163
  }),
4144
4164
  F.map((e, t) => /* @__PURE__ */ d("path", {
@@ -4148,7 +4168,7 @@ function On({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
4148
4168
  strokeWidth: "1.5"
4149
4169
  }, t)),
4150
4170
  N.map(({ node: e, x: t, y: n }) => {
4151
- 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 ? Cn(e.color) : r ? "var(--page-accent-text, #ffffff)" : "var(--page-text, #111827)", c = i ? Cn(e.color2) : s, l = S && (wn(e) || e.href), p = () => wn(e) ? T(e) : window.open(e.href, "_blank", "noreferrer"), m = e.photo ? t + En.pad + M.avatar + 8 : t + M.w / 2, h = e.photo ? "start" : "middle", g = e.photo ? Math.floor((M.w - M.avatar - 26) / 7) : Math.floor(M.w / 7.6), _ = M.h / 2, v = [e.name, e.title].map((e) => String(e ?? "").trim()).filter(Boolean);
4171
+ 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 ? En(e.color) : r ? "var(--page-accent-text, #ffffff)" : "var(--page-text, #111827)", c = i ? En(e.color2) : s, l = S && (Dn(e) || e.href), p = () => Dn(e) ? T(e) : window.open(e.href, "_blank", "noreferrer"), m = e.photo ? t + kn.pad + M.avatar + 8 : t + M.w / 2, h = e.photo ? "start" : "middle", g = e.photo ? Math.floor((M.w - M.avatar - 26) / 7) : Math.floor(M.w / 7.6), _ = M.h / 2, v = [e.name, e.title].map((e) => String(e ?? "").trim()).filter(Boolean);
4152
4172
  return /* @__PURE__ */ f("g", {
4153
4173
  onClick: l ? p : void 0,
4154
4174
  style: l ? { cursor: "pointer" } : void 0,
@@ -4212,13 +4232,13 @@ function On({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
4212
4232
  e.photo && /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("clipPath", {
4213
4233
  id: `${C}-${e.id}`,
4214
4234
  children: /* @__PURE__ */ d("circle", {
4215
- cx: t + En.pad + M.avatar / 2,
4235
+ cx: t + kn.pad + M.avatar / 2,
4216
4236
  cy: n + M.h / 2,
4217
4237
  r: M.avatar / 2
4218
4238
  })
4219
4239
  }), /* @__PURE__ */ d("image", {
4220
4240
  href: e.photo,
4221
- x: t + En.pad,
4241
+ x: t + kn.pad,
4222
4242
  y: n + (M.h - M.avatar) / 2,
4223
4243
  width: M.avatar,
4224
4244
  height: M.avatar,
@@ -4232,7 +4252,7 @@ function On({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
4232
4252
  fontSize: M.title,
4233
4253
  fontWeight: "600",
4234
4254
  fill: s,
4235
- children: Sn(e.title, g + 4)
4255
+ children: Tn(e.title, g + 4)
4236
4256
  }), e.name && /* @__PURE__ */ d("text", {
4237
4257
  x: m,
4238
4258
  y: n + _ + _ / 2 + M.name * .35,
@@ -4240,7 +4260,7 @@ function On({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
4240
4260
  fontSize: M.name,
4241
4261
  fontWeight: "600",
4242
4262
  fill: c,
4243
- children: Sn(e.name, g)
4263
+ children: Tn(e.name, g)
4244
4264
  })] }) : /* @__PURE__ */ f(u, { children: [v[0] && /* @__PURE__ */ d("text", {
4245
4265
  x: m,
4246
4266
  y: n + (v[1] ? M.h * .43 : M.h * .57),
@@ -4248,7 +4268,7 @@ function On({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
4248
4268
  fontSize: M.name,
4249
4269
  fontWeight: "600",
4250
4270
  fill: s,
4251
- children: Sn(v[0], g)
4271
+ children: Tn(v[0], g)
4252
4272
  }), v[1] && /* @__PURE__ */ d("text", {
4253
4273
  x: m,
4254
4274
  y: n + M.h * .73,
@@ -4256,19 +4276,19 @@ function On({ nodes: e = [], source: t, nameField: n, titleField: r, photoField:
4256
4276
  fontSize: M.title,
4257
4277
  opacity: "0.7",
4258
4278
  fill: s,
4259
- children: Sn(v[1], g + 4)
4279
+ children: Tn(v[1], g + 4)
4260
4280
  })] })
4261
4281
  ]
4262
4282
  }, e.id);
4263
4283
  })
4264
4284
  ]
4265
- }), w && /* @__PURE__ */ d(Dn, {
4285
+ }), w && /* @__PURE__ */ d(An, {
4266
4286
  node: w,
4267
4287
  onClose: () => T(null)
4268
4288
  })]
4269
4289
  });
4270
4290
  }
4271
- function kn({ value: e, onCommit: t, style: n, hint: r }) {
4291
+ function Mn({ value: e, onCommit: t, style: n, hint: r }) {
4272
4292
  let [i, o] = l(!1), s = c(null);
4273
4293
  return a(() => {
4274
4294
  if (!i || !s.current) return;
@@ -4298,7 +4318,7 @@ function kn({ value: e, onCommit: t, style: n, hint: r }) {
4298
4318
  children: e ?? ""
4299
4319
  });
4300
4320
  }
4301
- var An = 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", Mn = (e, t) => e && t ? `cell-${e}-${t}` : "", Nn = (e) => {
4321
+ var Nn = 360, Pn = "\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", Fn = (e, t) => e && t ? `cell-${e}-${t}` : "", In = (e) => {
4302
4322
  if (!e || typeof e != "object") return e ?? "";
4303
4323
  let t = String(e.text ?? "");
4304
4324
  return typeof e.href == "string" && e.href ? /* @__PURE__ */ d("a", {
@@ -4309,7 +4329,7 @@ var An = 360, jn = "\n.wb-tedit-btn {\n cursor: pointer;\n border-radius: 4px;
4309
4329
  children: t
4310
4330
  }) : t;
4311
4331
  };
4312
- function Pn({ columns: e = [], rows: t = [], widths: n = [], rowKeys: r = [], colKeys: o = [], heights: s = [], 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: A, style: j, nodeRef: M, edit: N }) {
4332
+ function Ln({ columns: e = [], rows: t = [], widths: n = [], rowKeys: r = [], colKeys: o = [], heights: s = [], 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: A, style: j, nodeRef: M, edit: N }) {
4313
4333
  let F = c(null), I = c(null), [L, R] = l(null), [z, B] = l(null), ee = (e, t) => () => R({
4314
4334
  r: e,
4315
4335
  c: t
@@ -4323,7 +4343,7 @@ function Pn({ columns: e = [], rows: t = [], widths: n = [], rowKeys: r = [], co
4323
4343
  }
4324
4344
  let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = {
4325
4345
  top: r.bottom - n.top + 4,
4326
- left: Math.max(0, Math.min(r.left - n.left, n.width - An))
4346
+ left: Math.max(0, Math.min(r.left - n.left, n.width - Nn))
4327
4347
  };
4328
4348
  (z?.top !== i.top || z?.left !== i.left) && B(i);
4329
4349
  }), a(() => {
@@ -4379,7 +4399,7 @@ function Pn({ columns: e = [], rows: t = [], widths: n = [], rowKeys: r = [], co
4379
4399
  window.addEventListener("pointermove", l), window.addEventListener("pointerup", u);
4380
4400
  }, Se = /* @__PURE__ */ new Set();
4381
4401
  p && se.forEach((t, n) => e.forEach((e, t) => {
4382
- let i = p[Mn(r[n], o[t])];
4402
+ let i = p[Fn(r[n], o[t])];
4383
4403
  if (!i) return;
4384
4404
  let a = Math.max(1, Number(i.c) || 1), s = Math.max(1, Number(i.r) || 1);
4385
4405
  for (let e = 0; e < s; e++) for (let r = 0; r < a; r++) (e || r) && Se.add(`${n + e},${t + r}`);
@@ -4402,7 +4422,7 @@ function Pn({ columns: e = [], rows: t = [], widths: n = [], rowKeys: r = [], co
4402
4422
  },
4403
4423
  onClick: n,
4404
4424
  children: e
4405
- }, t), Z = L && L.r < se.length && L.c < e.length ? L : null, Q = (e, t) => N?.labels?.[e] ?? t, Te = Z ? p?.[Mn(r[Z.r], o[Z.c])] : null, Ee = Math.max(1, Number(Te?.c) || 1), De = Math.max(1, Number(Te?.r) || 1);
4425
+ }, t), Z = L && L.r < se.length && L.c < e.length ? L : null, Q = (e, t) => N?.labels?.[e] ?? t, Te = Z ? p?.[Fn(r[Z.r], o[Z.c])] : null, Ee = Math.max(1, Number(Te?.c) || 1), De = Math.max(1, Number(Te?.r) || 1);
4406
4426
  return /* @__PURE__ */ f("div", {
4407
4427
  ref: (e) => {
4408
4428
  I.current = e, typeof M == "function" && M(e);
@@ -4413,7 +4433,7 @@ function Pn({ columns: e = [], rows: t = [], widths: n = [], rowKeys: r = [], co
4413
4433
  ..._e
4414
4434
  },
4415
4435
  children: [
4416
- N && /* @__PURE__ */ d("style", { children: jn }),
4436
+ N && /* @__PURE__ */ d("style", { children: Pn }),
4417
4437
  N && Z && z && /* @__PURE__ */ f("div", {
4418
4438
  className: "wb-tedit-bar",
4419
4439
  style: {
@@ -4479,7 +4499,7 @@ function Pn({ columns: e = [], rows: t = [], widths: n = [], rowKeys: r = [], co
4479
4499
  } : N ? { position: "relative" } : null,
4480
4500
  ...G
4481
4501
  },
4482
- children: N ? /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d(kn, {
4502
+ children: N ? /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d(Mn, {
4483
4503
  value: t.label ?? t,
4484
4504
  onCommit: (e) => N.header(n, e),
4485
4505
  hint: Q("editCell", "Double-click to edit"),
@@ -4507,7 +4527,7 @@ function Pn({ columns: e = [], rows: t = [], widths: n = [], rowKeys: r = [], co
4507
4527
  },
4508
4528
  children: e.map((e, i) => {
4509
4529
  if (Se.has(`${n},${i}`)) return null;
4510
- let a = Mn(r[n], o[i]), s = m?.[a], c = p?.[a], l = Math.max(1, Number(c?.c) || 1), u = Math.max(1, Number(c?.r) || 1);
4530
+ let a = Fn(r[n], o[i]), s = m?.[a], c = p?.[a], l = Math.max(1, Number(c?.c) || 1), u = Math.max(1, Number(c?.r) || 1);
4511
4531
  return /* @__PURE__ */ f("td", {
4512
4532
  className: N ? `wb-tedit-cell${L?.r === n && L?.c === i ? " wb-tedit-cellon" : ""}` : void 0,
4513
4533
  onMouseDownCapture: ve ? ee(n, i) : void 0,
@@ -4520,7 +4540,7 @@ function Pn({ columns: e = [], rows: t = [], widths: n = [], rowKeys: r = [], co
4520
4540
  ...N ? { position: "relative" } : null,
4521
4541
  ...G
4522
4542
  },
4523
- children: [s ?? Nn(t?.[i]), N && ve && /* @__PURE__ */ d("span", {
4543
+ children: [s ?? In(t?.[i]), N && ve && /* @__PURE__ */ d("span", {
4524
4544
  className: "wb-tedit-rowgrip",
4525
4545
  title: Q("rowHeight", "Drag to set the row height — double-click to fit the content"),
4526
4546
  onPointerDown: Ce(n),
@@ -4535,7 +4555,7 @@ function Pn({ columns: e = [], rows: t = [], widths: n = [], rowKeys: r = [], co
4535
4555
  ]
4536
4556
  });
4537
4557
  }
4538
- var Fn = {
4558
+ var Rn = {
4539
4559
  small: {
4540
4560
  cell: 62,
4541
4561
  font: 10.5,
@@ -4560,8 +4580,8 @@ var Fn = {
4560
4580
  pad: 8,
4561
4581
  gap: 4
4562
4582
  }
4563
- }, In = (e) => `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}`, Ln = (e) => new Date(e.getFullYear(), e.getMonth(), e.getDate()), Rn = 366;
4564
- function zn(e, t = {}) {
4583
+ }, zn = (e) => `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}`, Bn = (e) => new Date(e.getFullYear(), e.getMonth(), e.getDate()), Vn = 366;
4584
+ function Hn(e, t = {}) {
4565
4585
  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 ? "" : we(e), a = (e) => {
4566
4586
  let t = i(r(e)), n = t ? new Date(t) : null;
4567
4587
  return n && !Number.isNaN(n.getTime()) ? n : null;
@@ -4578,7 +4598,7 @@ function zn(e, t = {}) {
4578
4598
  } : null;
4579
4599
  }).filter(Boolean);
4580
4600
  }
4581
- function Bn(e) {
4601
+ function Un(e) {
4582
4602
  return (Array.isArray(e) ? e : []).map((e, t) => {
4583
4603
  let n = e?.start ? new Date(e.start) : null;
4584
4604
  if (!n || Number.isNaN(n.getTime())) return null;
@@ -4593,19 +4613,19 @@ function Bn(e) {
4593
4613
  };
4594
4614
  }).filter(Boolean);
4595
4615
  }
4596
- function Vn(e) {
4616
+ function Wn(e) {
4597
4617
  let t = /* @__PURE__ */ new Map();
4598
4618
  for (let n of e) {
4599
- let e = Ln(n.start), r = n.end ? Ln(n.end) : e, i = Math.min(Math.max(0, Math.round((r - e) / 864e5)), Rn);
4619
+ let e = Bn(n.start), r = n.end ? Bn(n.end) : e, i = Math.min(Math.max(0, Math.round((r - e) / 864e5)), Vn);
4600
4620
  for (let r = 0; r <= i; r += 1) {
4601
- let i = In(new Date(e.getFullYear(), e.getMonth(), e.getDate() + r));
4621
+ let i = zn(new Date(e.getFullYear(), e.getMonth(), e.getDate() + r));
4602
4622
  t.has(i) || t.set(i, []), t.get(i).push(n);
4603
4623
  }
4604
4624
  }
4605
4625
  for (let e of t.values()) e.sort((e, t) => e.start - t.start);
4606
4626
  return t;
4607
4627
  }
4608
- function Hn({ events: e = [], source: t = "", titleField: n = "", startField: r = "", endField: o = "", hrefField: s = "", colorField: c = "", 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 }) {
4628
+ function Gn({ events: e = [], source: t = "", titleField: n = "", startField: r = "", endField: o = "", hrefField: s = "", colorField: c = "", 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 }) {
4609
4629
  let { tenant: T, apiUrl: E, locale: D } = i(J), O = i(ye)?.[t], [k, A] = l(null), [j, M] = l(() => {
4610
4630
  let e = /* @__PURE__ */ new Date();
4611
4631
  return {
@@ -4628,13 +4648,13 @@ function Hn({ events: e = [], source: t = "", titleField: n = "", startField: r
4628
4648
  E,
4629
4649
  O
4630
4650
  ]);
4631
- let N = Fn[m] ?? Fn.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 ? zn(O ?? k ?? [], {
4651
+ let N = Rn[m] ?? Rn.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 ? Hn(O ?? k ?? [], {
4632
4652
  titleField: n,
4633
4653
  startField: r,
4634
4654
  endField: o,
4635
4655
  hrefField: s,
4636
4656
  colorField: c
4637
- }) : Bn(e), B = Vn(z), ee = D || void 0, V = (e, t) => {
4657
+ }) : Un(e), B = Wn(z), ee = D || void 0, V = (e, t) => {
4638
4658
  let n = /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("span", { style: {
4639
4659
  width: 6,
4640
4660
  height: 6,
@@ -4766,9 +4786,9 @@ function Hn({ events: e = [], source: t = "", titleField: n = "", startField: r
4766
4786
  })]
4767
4787
  });
4768
4788
  }
4769
- let ie = new Date(j.year, j.month, 1), ae = y === "sunday" ? 0 : 1, U = (ie.getDay() - ae + 7) % 7, oe = new Date(j.year, j.month + 1, 0).getDate(), se = Math.ceil((U + oe) / 7), ce = In(/* @__PURE__ */ new Date()), le = new Intl.DateTimeFormat(ee, { weekday: "short" }), W = [];
4789
+ let ie = new Date(j.year, j.month, 1), ae = y === "sunday" ? 0 : 1, U = (ie.getDay() - ae + 7) % 7, oe = new Date(j.year, j.month + 1, 0).getDate(), se = Math.ceil((U + oe) / 7), ce = zn(/* @__PURE__ */ new Date()), le = new Intl.DateTimeFormat(ee, { weekday: "short" }), W = [];
4770
4790
  for (let e = 0; e < se * 7; e += 1) {
4771
- let t = e - U + 1, n = t >= 1 && t <= oe, r = In(new Date(j.year, j.month, t)), i = n ? B.get(r) ?? [] : [], a = i.slice(0, Math.max(1, b)), o = n && r === ce;
4791
+ let t = e - U + 1, n = t >= 1 && t <= oe, r = zn(new Date(j.year, j.month, t)), i = n ? B.get(r) ?? [] : [], a = i.slice(0, Math.max(1, b)), o = n && r === ce;
4772
4792
  W.push(/* @__PURE__ */ f("div", {
4773
4793
  style: {
4774
4794
  minHeight: N.cell,
@@ -4833,12 +4853,12 @@ function Hn({ events: e = [], source: t = "", titleField: n = "", startField: r
4833
4853
  ]
4834
4854
  });
4835
4855
  }
4836
- var Un = {
4856
+ var Kn = {
4837
4857
  small: 36,
4838
4858
  medium: 56,
4839
4859
  large: 88
4840
4860
  };
4841
- function Wn(e, t = {}) {
4861
+ function qn(e, t = {}) {
4842
4862
  let n = Array.isArray(e) ? e.filter((e) => e && typeof e == "object") : [], r = (e) => e == null ? "" : we(e);
4843
4863
  return n.map((e) => {
4844
4864
  let n = e.data ?? e, i = X(n, t.imageField), a = Array.isArray(i) ? i[0] : i, o = a && typeof a == "object" ? a.url ?? a.src ?? "" : a, s = t.nameField ? r(X(n, t.nameField)) : r(n.name);
@@ -4849,7 +4869,7 @@ function Wn(e, t = {}) {
4849
4869
  };
4850
4870
  }).filter((e) => e.src);
4851
4871
  }
4852
- function Gn({ logos: e = [], source: t = "", imageField: n = "", nameField: r = "", hrefField: o = "", variant: s = "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 }) {
4872
+ function Jn({ logos: e = [], source: t = "", imageField: n = "", nameField: r = "", hrefField: o = "", variant: s = "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 }) {
4853
4873
  let { tenant: D, apiUrl: O } = i(J), k = i(ye)?.[t], [A, j] = l(null), M = c(null), N = c(null), [F, I] = l(0), [L, R] = l(0), [z, B] = l(0), [ee, V] = l(!0), [H, te] = l(!1), [ne, re] = l(!1);
4854
4874
  a(() => {
4855
4875
  if (!t || k) return;
@@ -4889,11 +4909,11 @@ function Gn({ logos: e = [], source: t = "", imageField: n = "", nameField: r =
4889
4909
  t = !1, r.forEach((e) => e.removeEventListener("load", n));
4890
4910
  };
4891
4911
  });
4892
- let ie = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && e.src) : [], ae = t ? Wn(k ?? A ?? [], {
4912
+ let ie = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && e.src) : [], ae = t ? qn(k ?? A ?? [], {
4893
4913
  imageField: n,
4894
4914
  nameField: r,
4895
4915
  hrefField: o
4896
- }) : ie, U = Un[p] ?? Un.medium, oe = Number.isFinite(Number(h)) ? Math.max(0, Number(h)) : 48, se = s === "marquee" ? "step" : s, ce = Math.min(3e4, Math.max(300, (Number(g) || 3) * 1e3)), le = Math.min(3e3, Math.max(100, Number(_) || 500)), W = Math.min(12, Math.max(1, Math.round(Number(m) || 5))), G = (L || U * 3) + oe, de = F ? Math.max(1, Math.floor(F / G)) : W, fe = Math.min(W, de), pe = F ? Math.min(G, F / fe) : G;
4916
+ }) : ie, U = Kn[p] ?? Kn.medium, oe = Number.isFinite(Number(h)) ? Math.max(0, Number(h)) : 48, se = s === "marquee" ? "step" : s, ce = Math.min(3e4, Math.max(300, (Number(g) || 3) * 1e3)), le = Math.min(3e3, Math.max(100, Number(_) || 500)), W = Math.min(12, Math.max(1, Math.round(Number(m) || 5))), G = (L || U * 3) + oe, de = F ? Math.max(1, Math.floor(F / G)) : W, fe = Math.min(W, de), pe = F ? Math.min(G, F / fe) : G;
4897
4917
  if (!ae.length) return /* @__PURE__ */ d("div", {
4898
4918
  ref: T,
4899
4919
  style: {
@@ -5078,7 +5098,7 @@ function Gn({ logos: e = [], source: t = "", imageField: n = "", nameField: r =
5078
5098
  Se,
5079
5099
  X ? Z(1) : null
5080
5100
  ] }),
5081
- /* @__PURE__ */ d(Kn, {
5101
+ /* @__PURE__ */ d(Yn, {
5082
5102
  running: he,
5083
5103
  every: ce + le,
5084
5104
  slide: le,
@@ -5092,7 +5112,7 @@ function Gn({ logos: e = [], source: t = "", imageField: n = "", nameField: r =
5092
5112
  ]
5093
5113
  });
5094
5114
  }
5095
- function Kn({ running: e, every: t, slide: n, step: r, index: i, total: o, home: s, setIndex: c, setAnimate: l }) {
5115
+ function Yn({ running: e, every: t, slide: n, step: r, index: i, total: o, home: s, setIndex: c, setAnimate: l }) {
5096
5116
  a(() => {
5097
5117
  if (!e) return;
5098
5118
  let n = setInterval(() => {
@@ -5128,13 +5148,13 @@ function Kn({ running: e, every: t, slide: n, step: r, index: i, total: o, home:
5128
5148
  l
5129
5149
  ]), null;
5130
5150
  }
5131
- var qn = {
5151
+ var Xn = {
5132
5152
  small: 380,
5133
5153
  medium: 560,
5134
5154
  large: 820,
5135
5155
  full: "100%"
5136
5156
  };
5137
- function Jn({ dialogId: e = "", trigger: t = "button", triggerLabel: n = "Open", openOn: r = "trigger", delay: i = 0, size: o = "medium", title: s = "", showClose: u = !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 }) {
5157
+ function Zn({ dialogId: e = "", trigger: t = "button", triggerLabel: n = "Open", openOn: r = "trigger", delay: i = 0, size: o = "medium", title: s = "", showClose: u = !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 }) {
5138
5158
  let [C, w] = l(!1), T = c(null);
5139
5159
  a(() => {
5140
5160
  if (S || !e) return;
@@ -5159,7 +5179,7 @@ function Jn({ dialogId: e = "", trigger: t = "button", triggerLabel: n = "Open",
5159
5179
  document.removeEventListener("keydown", e), document.body.style.overflow = t;
5160
5180
  };
5161
5181
  }, [S, C]);
5162
- let E = qn[o] ?? qn.medium, D = (e) => {
5182
+ let E = Xn[o] ?? Xn.medium, D = (e) => {
5163
5183
  let t = {
5164
5184
  padding: "9px 16px",
5165
5185
  borderRadius: 6,
@@ -5328,97 +5348,97 @@ function Jn({ dialogId: e = "", trigger: t = "button", triggerLabel: n = "Open",
5328
5348
  })]
5329
5349
  });
5330
5350
  }
5331
- var Yn = {
5351
+ var Qn = {
5332
5352
  PageRoot: Me,
5333
- CalendarBlock: Hn,
5334
- LogoCarousel: Gn,
5335
- DialogBlock: Jn,
5353
+ CalendarBlock: Gn,
5354
+ LogoCarousel: Jn,
5355
+ DialogBlock: Zn,
5336
5356
  Section: Ne,
5337
5357
  Container: Pe,
5338
5358
  Heading: Fe,
5339
- TextBlock: qe,
5340
- ButtonBlock: Xe,
5341
- ImageBlock: Ze,
5342
- Spacer: rt,
5343
- Divider: it,
5344
- SliderBlock: ut,
5345
- CanvasSlider: dt,
5346
- TabsBlock: Dt,
5347
- QuickStack: $t,
5348
- CollectionList: en,
5349
- CollectionSearch: tn,
5350
- BreadcrumbsBlock: nn,
5351
- PaginationBlock: rn,
5352
- StepperBlock: gn,
5353
- SocialLinksBlock: hn,
5354
- ThemeModeBlock: ln,
5355
- ScrollTopBlock: pn,
5356
- OrgChartBlock: On,
5357
- TableBlock: Pn,
5358
- IconBlock: bt,
5359
- MapBlock: vt,
5360
- MasonryBlock: St,
5361
- AccordionBlock: Ot,
5362
- NavbarBlock: Et,
5363
- ListBlock: Ke,
5359
+ TextBlock: Xe,
5360
+ ButtonBlock: $e,
5361
+ ImageBlock: et,
5362
+ Spacer: ot,
5363
+ Divider: st,
5364
+ SliderBlock: pt,
5365
+ CanvasSlider: mt,
5366
+ TabsBlock: At,
5367
+ QuickStack: nn,
5368
+ CollectionList: rn,
5369
+ CollectionSearch: an,
5370
+ BreadcrumbsBlock: on,
5371
+ PaginationBlock: sn,
5372
+ StepperBlock: yn,
5373
+ SocialLinksBlock: vn,
5374
+ ThemeModeBlock: fn,
5375
+ ScrollTopBlock: gn,
5376
+ OrgChartBlock: jn,
5377
+ TableBlock: Ln,
5378
+ IconBlock: Ct,
5379
+ MapBlock: xt,
5380
+ MasonryBlock: Tt,
5381
+ AccordionBlock: jt,
5382
+ NavbarBlock: kt,
5383
+ ListBlock: Ye,
5364
5384
  TextSpan: ze,
5365
- QuoteBlock: Ge,
5366
- TextLink: Ye,
5367
- RichTextBlock: Ue,
5368
- RichContentBlock: Ue,
5369
- VideoBlock: Qe,
5370
- YouTubeBlock: et,
5371
- IframeBlock: tt,
5372
- EmbedBlock: nt,
5373
- FormBlock: Vt,
5374
- FormLabel: Kt,
5375
- FormInput: qt,
5376
- FormTextarea: Jt,
5377
- FormCheckbox: (e) => /* @__PURE__ */ d(Yt, {
5385
+ QuoteBlock: Je,
5386
+ TextLink: Qe,
5387
+ RichTextBlock: Ke,
5388
+ RichContentBlock: Ke,
5389
+ VideoBlock: tt,
5390
+ YouTubeBlock: rt,
5391
+ IframeBlock: it,
5392
+ EmbedBlock: at,
5393
+ FormBlock: Wt,
5394
+ FormLabel: Yt,
5395
+ FormInput: Xt,
5396
+ FormTextarea: Zt,
5397
+ FormCheckbox: (e) => /* @__PURE__ */ d(Qt, {
5378
5398
  kind: "checkbox",
5379
5399
  ...e
5380
5400
  }),
5381
- FormRadio: (e) => /* @__PURE__ */ d(Yt, {
5401
+ FormRadio: (e) => /* @__PURE__ */ d(Qt, {
5382
5402
  kind: "radio",
5383
5403
  ...e
5384
5404
  }),
5385
- FormSelect: Xt,
5386
- FormFile: Zt,
5387
- FormRecaptcha: Gt,
5388
- FormSubmit: Qt
5389
- }, Xn = {
5405
+ FormSelect: $t,
5406
+ FormFile: en,
5407
+ FormRecaptcha: Jt,
5408
+ FormSubmit: tn
5409
+ }, $n = {
5390
5410
  id: "auth",
5391
5411
  label: "Accounts",
5392
5412
  category: "Apps",
5393
5413
  keys: ["SiteLoginForm", "SiteAccountMenu"],
5394
5414
  ssr: "shell",
5395
5415
  settings: ["site.authRedirect"]
5396
- }, Zn = n({
5416
+ }, er = n({
5397
5417
  user: null,
5398
5418
  status: "idle",
5399
5419
  ensure: () => {},
5400
5420
  refresh: () => {},
5401
5421
  signOut: () => {}
5402
5422
  });
5403
- function Qn(e, t) {
5423
+ function tr(e, t) {
5404
5424
  return t ? /^https?:\/\//i.test(t) ? t : `${e.replace(/\/+$/, "")}${t.startsWith("/") ? t : `/${t}`}` : "";
5405
5425
  }
5406
- function $n(e) {
5426
+ function nr(e) {
5407
5427
  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);
5408
5428
  return {
5409
5429
  mode: n.mode === "custom" || n.mode === "off" ? n.mode : "system",
5410
5430
  url: i,
5411
5431
  mePath: a,
5412
5432
  logoutPath: o,
5413
- meUrl: Qn(i, a),
5414
- logoutUrl: Qn(i, o),
5433
+ meUrl: tr(i, a),
5434
+ logoutUrl: tr(i, o),
5415
5435
  loginPage: r(n.loginPage),
5416
5436
  userPath: r(n.userPath),
5417
5437
  auth: n.auth === "bearer" ? "bearer" : "cookies",
5418
5438
  tokenKey: r(n.tokenKey) || "webim_session_token"
5419
5439
  };
5420
5440
  }
5421
- function er(e, t) {
5441
+ function rr(e, t) {
5422
5442
  if (!t) return e ?? null;
5423
5443
  let n = e;
5424
5444
  for (let e of t.split(".")) {
@@ -5427,26 +5447,26 @@ function er(e, t) {
5427
5447
  }
5428
5448
  return n ?? null;
5429
5449
  }
5430
- function tr(e) {
5450
+ function ir(e) {
5431
5451
  try {
5432
5452
  return window.localStorage.getItem(e) || "";
5433
5453
  } catch {
5434
5454
  return "";
5435
5455
  }
5436
5456
  }
5437
- function nr(e) {
5457
+ function ar(e) {
5438
5458
  try {
5439
5459
  window.localStorage.removeItem(e);
5440
5460
  } catch {}
5441
5461
  }
5442
- var rr = () => {
5443
- let e = i(Zn);
5462
+ var or = () => {
5463
+ let e = i(er);
5444
5464
  return a(() => {
5445
5465
  e.ensure();
5446
5466
  }, [e]), e;
5447
5467
  };
5448
- function ir({ children: e, initialUser: t, disabled: n, apiUrl: o, tenant: u }) {
5449
- let f = i(J), p = o || f?.apiUrl || "/api", m = u || f?.tenant || "", h = s(() => $n(f?.settings), [f?.settings]), [g, _] = l(t ?? null), [v, y] = l(t ? "user" : n ? "guest" : "idle"), b = c(!1), x = r((e, t) => fetch(`${p}${e}`, {
5468
+ function sr({ children: e, initialUser: t, disabled: n, apiUrl: o, tenant: u }) {
5469
+ let f = i(J), p = o || f?.apiUrl || "/api", m = u || f?.tenant || "", h = s(() => nr(f?.settings), [f?.settings]), [g, _] = l(t ?? null), [v, y] = l(t ? "user" : n ? "guest" : "idle"), b = c(!1), x = r((e, t) => fetch(`${p}${e}`, {
5450
5470
  ...t,
5451
5471
  credentials: "include",
5452
5472
  headers: {
@@ -5458,9 +5478,9 @@ function ir({ children: e, initialUser: t, disabled: n, apiUrl: o, tenant: u })
5458
5478
  if (n) return Promise.resolve(null);
5459
5479
  if (h.mode === "off") return Promise.resolve(S(null));
5460
5480
  if (h.mode === "custom") {
5461
- let e = h.auth === "bearer" ? tr(h.tokenKey) : "";
5481
+ let e = h.auth === "bearer" ? ir(h.tokenKey) : "";
5462
5482
  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) => {
5463
- let t = er(e, h.userPath);
5483
+ let t = rr(e, h.userPath);
5464
5484
  return S(t && typeof t == "object" ? t : null);
5465
5485
  }).catch(() => S(null));
5466
5486
  }
@@ -5473,12 +5493,12 @@ function ir({ children: e, initialUser: t, disabled: n, apiUrl: o, tenant: u })
5473
5493
  ]), w = r(() => {
5474
5494
  if (h.mode === "off") return S(null), Promise.resolve();
5475
5495
  if (h.mode === "custom") {
5476
- let e = h.auth === "bearer" ? tr(h.tokenKey) : "";
5496
+ let e = h.auth === "bearer" ? ir(h.tokenKey) : "";
5477
5497
  return (h.logoutUrl ? fetch(h.logoutUrl, {
5478
5498
  method: "post",
5479
5499
  ...h.auth === "bearer" ? { headers: e ? { authorization: `Bearer ${e}` } : {} } : { credentials: "include" }
5480
5500
  }).catch(() => {}) : Promise.resolve()).then(() => {
5481
- h.auth === "bearer" && nr(h.tokenKey), S(null);
5501
+ h.auth === "bearer" && ar(h.tokenKey), S(null);
5482
5502
  });
5483
5503
  }
5484
5504
  return x("/site/logout", { method: "post" }).catch(() => {}).then(() => {
@@ -5528,18 +5548,18 @@ function ir({ children: e, initialUser: t, disabled: n, apiUrl: o, tenant: u })
5528
5548
  h.loginPage,
5529
5549
  C,
5530
5550
  w
5531
- ]), /* @__PURE__ */ d(Zn.Provider, {
5551
+ ]), /* @__PURE__ */ d(er.Provider, {
5532
5552
  value: E,
5533
5553
  children: e
5534
5554
  });
5535
5555
  }
5536
- function ar({ when: e, children: t }) {
5537
- let { status: n } = rr();
5556
+ function cr({ when: e, children: t }) {
5557
+ let { status: n } = or();
5538
5558
  return !e || e === "always" ? t : n === "idle" || n === "loading" ? null : e === "user" == (n === "user") ? t : null;
5539
5559
  }
5540
5560
  //#endregion
5541
5561
  //#region ../ui/src/components/builder/apps/auth/views.jsx
5542
- function or({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordLabel: r = "Password", nameLabel: a = "Name", submitLabel: o, style: s, nodeRef: c, inert: u, linked: p, show: m }) {
5562
+ function lr({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordLabel: r = "Password", nameLabel: a = "Name", submitLabel: o, style: s, nodeRef: c, inert: u, linked: p, show: m }) {
5543
5563
  let { tenant: h, apiUrl: g, settings: _ } = i(J), [v, y] = l("form"), [b, x] = l(""), [S, C] = l(!1), w = e === "register", T = u ? m || "form" : v, E = (e) => typeof e == "string" && e.startsWith("/") && !e.startsWith("//") ? e : "", D = async (e) => {
5544
5564
  if (e.preventDefault(), u) return;
5545
5565
  let n = new FormData(e.currentTarget);
@@ -5588,20 +5608,20 @@ function or({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
5588
5608
  children: [
5589
5609
  w ? /* @__PURE__ */ f("label", {
5590
5610
  style: {
5591
- ...At,
5611
+ ...Nt,
5592
5612
  display: "grid",
5593
5613
  gap: 6
5594
5614
  },
5595
5615
  children: [a, /* @__PURE__ */ d("input", {
5596
5616
  name: "name",
5597
5617
  type: "text",
5598
- style: jt,
5599
- ...Nt(u)
5618
+ style: Pt,
5619
+ ...It(u)
5600
5620
  })]
5601
5621
  }) : null,
5602
5622
  /* @__PURE__ */ f("label", {
5603
5623
  style: {
5604
- ...At,
5624
+ ...Nt,
5605
5625
  display: "grid",
5606
5626
  gap: 6
5607
5627
  },
@@ -5609,13 +5629,13 @@ function or({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
5609
5629
  name: "email",
5610
5630
  type: "email",
5611
5631
  required: !u,
5612
- style: jt,
5613
- ...Nt(u)
5632
+ style: Pt,
5633
+ ...It(u)
5614
5634
  })]
5615
5635
  }),
5616
5636
  /* @__PURE__ */ f("label", {
5617
5637
  style: {
5618
- ...At,
5638
+ ...Nt,
5619
5639
  display: "grid",
5620
5640
  gap: 6
5621
5641
  },
@@ -5623,8 +5643,8 @@ function or({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
5623
5643
  name: "password",
5624
5644
  type: "password",
5625
5645
  required: !u,
5626
- style: jt,
5627
- ...Nt(u)
5646
+ style: Pt,
5647
+ ...It(u)
5628
5648
  })]
5629
5649
  }),
5630
5650
  /* @__PURE__ */ d("button", {
@@ -5663,8 +5683,8 @@ function or({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
5663
5683
  ]
5664
5684
  });
5665
5685
  }
5666
- function sr({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !1, style: r, nodeRef: i, inert: a, linked: o, show: s }) {
5667
- let { user: c, status: l, signOut: u } = rr(), p = a ? s || "user" : l, m = a ? {
5686
+ function ur({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !1, style: r, nodeRef: i, inert: a, linked: o, show: s }) {
5687
+ let { user: c, status: l, signOut: u } = or(), p = a ? s || "user" : l, m = a ? {
5668
5688
  name: "Ada Lovelace",
5669
5689
  email: "ada@example.com"
5670
5690
  } : c;
@@ -5685,7 +5705,7 @@ function sr({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
5685
5705
  children: [
5686
5706
  /* @__PURE__ */ f("span", {
5687
5707
  style: {
5688
- ...At,
5708
+ ...Nt,
5689
5709
  fontWeight: 600
5690
5710
  },
5691
5711
  children: [
@@ -5696,7 +5716,7 @@ function sr({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
5696
5716
  }),
5697
5717
  n && m?.email ? /* @__PURE__ */ d("span", {
5698
5718
  style: {
5699
- ...At,
5719
+ ...Nt,
5700
5720
  opacity: .7
5701
5721
  },
5702
5722
  children: m.email
@@ -5712,7 +5732,7 @@ function sr({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
5712
5732
  fontSize: 14,
5713
5733
  cursor: a ? "default" : "pointer"
5714
5734
  },
5715
- ...Nt(a),
5735
+ ...It(a),
5716
5736
  children: t
5717
5737
  })
5718
5738
  ]
@@ -5729,40 +5749,40 @@ function sr({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
5729
5749
  }
5730
5750
  //#endregion
5731
5751
  //#region ../ui/src/components/builder/apps/consent/manifest.js
5732
- var cr = {
5752
+ var dr = {
5733
5753
  id: "consent",
5734
5754
  label: "Cookie consent",
5735
5755
  category: "Apps",
5736
5756
  keys: ["CookieConsent"],
5737
5757
  ssr: "shell",
5738
5758
  settings: []
5739
- }, lr = "webim.cookie_consent";
5740
- function ur() {
5759
+ }, fr = "webim.cookie_consent";
5760
+ function pr() {
5741
5761
  try {
5742
- let e = window.localStorage.getItem(lr), t = e ? JSON.parse(e) : null;
5762
+ let e = window.localStorage.getItem(fr), t = e ? JSON.parse(e) : null;
5743
5763
  return t?.choice === "accepted" || t?.choice === "declined" ? t.choice : "";
5744
5764
  } catch {
5745
5765
  return "";
5746
5766
  }
5747
5767
  }
5748
- function dr(e) {
5768
+ function mr(e) {
5749
5769
  try {
5750
5770
  document.querySelectorAll(".webim-page").forEach((t) => t.setAttribute("data-webim-consent", e));
5751
5771
  } catch {}
5752
5772
  }
5753
- function fr(e) {
5773
+ function hr(e) {
5754
5774
  try {
5755
- window.localStorage.setItem(lr, JSON.stringify({
5775
+ window.localStorage.setItem(fr, JSON.stringify({
5756
5776
  choice: e,
5757
5777
  at: (/* @__PURE__ */ new Date()).toISOString()
5758
5778
  }));
5759
5779
  } catch {}
5760
- dr(e);
5780
+ mr(e);
5761
5781
  try {
5762
5782
  window.dispatchEvent(new CustomEvent("webim:consent", { detail: { choice: e } }));
5763
5783
  } catch {}
5764
5784
  }
5765
- var pr = {
5785
+ var gr = {
5766
5786
  bottom: {
5767
5787
  left: 0,
5768
5788
  right: 0,
@@ -5784,18 +5804,18 @@ var pr = {
5784
5804
  maxWidth: 400
5785
5805
  }
5786
5806
  };
5787
- function mr({ message: e, acceptLabel: t, rejectLabel: n, showReject: r, linkLabel: i, linkHref: o, position: s, linked: c, style: p, nodeRef: m, inert: h }) {
5807
+ function _r({ message: e, acceptLabel: t, rejectLabel: n, showReject: r, linkLabel: i, linkHref: o, position: s, linked: c, style: p, nodeRef: m, inert: h }) {
5788
5808
  let [g, _] = l(!!h), [v, y] = l(null), b = (e) => {
5789
5809
  y(e), typeof m == "function" && m(e);
5790
5810
  };
5791
5811
  if (a(() => {
5792
5812
  if (h) return;
5793
- let e = ur();
5794
- e ? dr(e) : _(!0);
5813
+ let e = pr();
5814
+ e ? mr(e) : _(!0);
5795
5815
  }, [h, v]), !g) return null;
5796
5816
  let x = (e) => () => {
5797
- h || (fr(e), _(!1));
5798
- }, S = pr[s] ?? pr.bottom, C = {
5817
+ h || (hr(e), _(!1));
5818
+ }, S = gr[s] ?? gr.bottom, C = {
5799
5819
  appearance: "none",
5800
5820
  font: "inherit",
5801
5821
  fontSize: 14,
@@ -5875,37 +5895,37 @@ function mr({ message: e, acceptLabel: t, rejectLabel: n, showReject: r, linkLab
5875
5895
  }
5876
5896
  //#endregion
5877
5897
  //#region ../ui/src/components/builder/apps/language/manifest.js
5878
- var hr = {
5898
+ var vr = {
5879
5899
  id: "language",
5880
5900
  label: "Language",
5881
5901
  category: "Apps",
5882
5902
  keys: ["SiteLanguagePicker"],
5883
5903
  ssr: "prefetch",
5884
5904
  settings: ["locales"]
5885
- }, gr = {
5905
+ }, yr = {
5886
5906
  id: "search",
5887
5907
  label: "Search",
5888
5908
  category: "Apps",
5889
5909
  keys: ["SiteSearch"],
5890
5910
  ssr: "prefetch",
5891
5911
  settings: []
5892
- }, _r = 50, vr = 2e3;
5893
- function yr() {
5912
+ }, br = 50, xr = 2e3;
5913
+ function Sr() {
5894
5914
  return typeof window > "u" ? "" : new URLSearchParams(window.location.search).get("q") ?? "";
5895
5915
  }
5896
- function br(e, t) {
5916
+ function Cr(e, t) {
5897
5917
  let n = e?.data ?? {}, r = [];
5898
5918
  for (let e of Object.values(n)) {
5899
5919
  let t = e == null ? "" : we(e);
5900
- if (t && r.push(t), r.join(" ").length > vr) break;
5920
+ if (t && r.push(t), r.join(" ").length > xr) break;
5901
5921
  }
5902
- return r.join(" ").slice(0, vr).toLocaleLowerCase(t || void 0);
5922
+ return r.join(" ").slice(0, xr).toLocaleLowerCase(t || void 0);
5903
5923
  }
5904
- function xr({ placeholder: e = "Search…", buttonLabel: t = "Search", showButton: n = !0, live: r = !1, layout: o = "inline", includePages: s = !0, collections: u = [], limit: p = 10, emptyText: m = "Nothing found", hint: h = "", style: g, nodeRef: _, inert: v = !1, sample: y = !1 }) {
5905
- let { tenant: b, apiUrl: x, locale: S } = i(J), [C, w] = l(() => yr()), [T, E] = l(() => yr()), [D, O] = l(null), [k, A] = l(!1), j = c(null), M = o === "popup";
5924
+ function wr({ placeholder: e = "Search…", buttonLabel: t = "Search", showButton: n = !0, live: r = !1, layout: o = "inline", includePages: s = !0, collections: u = [], limit: p = 10, emptyText: m = "Nothing found", hint: h = "", style: g, nodeRef: _, inert: v = !1, sample: y = !1 }) {
5925
+ let { tenant: b, apiUrl: x, locale: S } = i(J), [C, w] = l(() => Sr()), [T, E] = l(() => Sr()), [D, O] = l(null), [k, A] = l(!1), j = c(null), M = o === "popup";
5906
5926
  a(() => {
5907
5927
  let e = () => {
5908
- let e = yr();
5928
+ let e = Sr();
5909
5929
  w(e), E(e);
5910
5930
  };
5911
5931
  return window.addEventListener("popstate", e), window.addEventListener("webim:urlchange", e), () => {
@@ -5956,7 +5976,7 @@ function xr({ placeholder: e = "Search…", buttonLabel: t = "Search", showButto
5956
5976
  });
5957
5977
  }
5958
5978
  else for (let t of e.rows) {
5959
- if (!br(t, S).includes(N)) continue;
5979
+ if (!Cr(t, S).includes(N)) continue;
5960
5980
  let n = t?.data ?? {}, r = we(n.name) || "Untitled", i = we(n.slug);
5961
5981
  F.push({
5962
5982
  key: `entry:${t.id}`,
@@ -5965,7 +5985,7 @@ function xr({ placeholder: e = "Search…", buttonLabel: t = "Search", showButto
5965
5985
  kind: "entry"
5966
5986
  });
5967
5987
  }
5968
- let I = F.slice(0, Math.min(Math.max(1, p), _r)), L = (e) => {
5988
+ let I = F.slice(0, Math.min(Math.max(1, p), br)), L = (e) => {
5969
5989
  if (v) {
5970
5990
  e.preventDefault(), w(T), A(!0);
5971
5991
  return;
@@ -6047,7 +6067,7 @@ function xr({ placeholder: e = "Search…", buttonLabel: t = "Search", showButto
6047
6067
  onChange: (e) => E(e.target.value),
6048
6068
  onFocus: () => N && A(!0),
6049
6069
  style: {
6050
- ...jt,
6070
+ ...Pt,
6051
6071
  flexGrow: 1,
6052
6072
  minWidth: 0
6053
6073
  }
@@ -6105,21 +6125,21 @@ function xr({ placeholder: e = "Search…", buttonLabel: t = "Search", showButto
6105
6125
  }
6106
6126
  //#endregion
6107
6127
  //#region ../ui/src/components/builder/apps/language/views.jsx
6108
- function Sr(e) {
6128
+ function Tr(e) {
6109
6129
  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());
6110
6130
  return [...new Set(n.map((e) => e.trim()))];
6111
6131
  }
6112
- var Cr = (e) => e && e.charAt(0).toUpperCase() + e.slice(1);
6113
- function wr(e, t) {
6132
+ var Er = (e) => e && e.charAt(0).toUpperCase() + e.slice(1);
6133
+ function Dr(e, t) {
6114
6134
  let n = String(e ?? "").toUpperCase();
6115
6135
  if (t === "code") return n;
6116
6136
  let r = "";
6117
6137
  try {
6118
- r = Cr(new Intl.DisplayNames([e], { type: "language" }).of(e) ?? "");
6138
+ r = Er(new Intl.DisplayNames([e], { type: "language" }).of(e) ?? "");
6119
6139
  } catch {}
6120
6140
  return !r || r.toUpperCase() === n ? n : t === "both" ? `${n} — ${r}` : r;
6121
6141
  }
6122
- function Tr(e, t) {
6142
+ function Or(e, t) {
6123
6143
  let n = t ? "" : `?locale=${encodeURIComponent(e)}`;
6124
6144
  if (typeof window > "u") return n || "?";
6125
6145
  try {
@@ -6129,8 +6149,8 @@ function Tr(e, t) {
6129
6149
  return n || "/";
6130
6150
  }
6131
6151
  }
6132
- function Er({ variant: e, display: t, separator: n, label: r, style: a, nodeRef: o, inert: s }) {
6133
- let c = i(J), l = Sr(c?.settings), u = l[0] ?? "", p = l.includes(c?.locale) ? c.locale : u, m = {
6152
+ function kr({ variant: e, display: t, separator: n, label: r, style: a, nodeRef: o, inert: s }) {
6153
+ let c = i(J), l = Tr(c?.settings), u = l[0] ?? "", p = l.includes(c?.locale) ? c.locale : u, m = {
6134
6154
  display: "inline-flex",
6135
6155
  alignItems: "center",
6136
6156
  gap: 8,
@@ -6165,7 +6185,7 @@ function Er({ variant: e, display: t, separator: n, label: r, style: a, nodeRef:
6165
6185
  style: { opacity: .4 },
6166
6186
  children: n ?? "·"
6167
6187
  }), /* @__PURE__ */ d("a", {
6168
- href: Tr(e, e === u),
6188
+ href: Or(e, e === u),
6169
6189
  hrefLang: e,
6170
6190
  "aria-current": e === p ? "true" : void 0,
6171
6191
  onClick: s ? (e) => e.preventDefault() : void 0,
@@ -6175,7 +6195,7 @@ function Er({ variant: e, display: t, separator: n, label: r, style: a, nodeRef:
6175
6195
  textDecoration: "none",
6176
6196
  cursor: s ? "default" : "pointer"
6177
6197
  },
6178
- children: wr(e, t)
6198
+ children: Dr(e, t)
6179
6199
  })]
6180
6200
  }, e))]
6181
6201
  }) : /* @__PURE__ */ f("div", {
@@ -6186,7 +6206,7 @@ function Er({ variant: e, display: t, separator: n, label: r, style: a, nodeRef:
6186
6206
  value: p,
6187
6207
  onChange: s ? void 0 : (e) => {
6188
6208
  let t = e.target.value;
6189
- window.location.assign(Tr(t, t === u));
6209
+ window.location.assign(Or(t, t === u));
6190
6210
  },
6191
6211
  onKeyDown: s ? (e) => e.preventDefault() : void 0,
6192
6212
  style: {
@@ -6200,57 +6220,57 @@ function Er({ variant: e, display: t, separator: n, label: r, style: a, nodeRef:
6200
6220
  },
6201
6221
  children: l.map((e) => /* @__PURE__ */ d("option", {
6202
6222
  value: e,
6203
- children: wr(e, t)
6223
+ children: Dr(e, t)
6204
6224
  }, e))
6205
6225
  })]
6206
6226
  });
6207
6227
  }
6208
6228
  //#endregion
6209
6229
  //#region ../ui/src/components/builder/apps/index.js
6210
- var Dr = [
6211
- Xn,
6212
- hr,
6213
- cr,
6214
- gr
6215
- ], Or = {
6216
- SiteLoginForm: or,
6217
- SiteAccountMenu: sr,
6218
- SiteLanguagePicker: Er,
6219
- CookieConsent: mr,
6220
- SiteSearch: xr
6230
+ var Ar = [
6231
+ $n,
6232
+ vr,
6233
+ dr,
6234
+ yr
6235
+ ], jr = {
6236
+ SiteLoginForm: lr,
6237
+ SiteAccountMenu: ur,
6238
+ SiteLanguagePicker: kr,
6239
+ CookieConsent: _r,
6240
+ SiteSearch: wr
6221
6241
  };
6222
- new Set(Dr.filter((e) => e.ssr === "shell").flatMap((e) => e.keys));
6242
+ new Set(Ar.filter((e) => e.ssr === "shell").flatMap((e) => e.keys));
6223
6243
  //#endregion
6224
6244
  //#region ../ui/src/components/builder/plugins/runtime.js
6225
- var kr = /* @__PURE__ */ new Map();
6226
- function Ar(e) {
6227
- if (kr.has(e)) return kr.get(e);
6245
+ var Mr = /* @__PURE__ */ new Map();
6246
+ function Nr(e) {
6247
+ if (Mr.has(e)) return Mr.get(e);
6228
6248
  let t = URL.createObjectURL(new Blob([e], { type: "text/javascript" })), n = import(
6229
6249
  /* @vite-ignore */
6230
6250
  /* webpackIgnore: true */
6231
6251
  t
6232
6252
  ).finally(() => URL.revokeObjectURL(t));
6233
- return kr.set(e, n), n;
6253
+ return Mr.set(e, n), n;
6234
6254
  }
6235
- function jr(e) {
6255
+ function Pr(e) {
6236
6256
  let t = e && typeof e == "object" ? e.builder_plugins : null, n = t && typeof t == "object" ? t.plugins : null;
6237
6257
  return n && typeof n == "object" ? n : {};
6238
6258
  }
6239
6259
  //#endregion
6240
6260
  //#region ../ui/src/components/builder/plugins/view.jsx
6241
- async function Mr(e, t) {
6242
- let n = await Ar(e);
6261
+ async function Fr(e, t) {
6262
+ let n = await Nr(e);
6243
6263
  return (Array.isArray(n?.default?.blocks) ? n.default.blocks : []).find((e) => e?.id === t && typeof e.mount == "function") ?? null;
6244
6264
  }
6245
- var Nr = {
6265
+ var Ir = {
6246
6266
  padding: "10px 12px",
6247
6267
  border: "1px dashed rgba(148, 163, 184, 0.5)",
6248
6268
  borderRadius: 8,
6249
6269
  fontSize: 12,
6250
6270
  opacity: .6
6251
6271
  };
6252
- function Pr({ pluginId: e, blockId: t, props: n, style: r, nodeRef: o }) {
6253
- let s = i(J), l = jr(s?.settings)[e], u = c(null), p = c(null), m = {
6272
+ function Lr({ pluginId: e, blockId: t, props: n, style: r, nodeRef: o }) {
6273
+ let s = i(J), l = Pr(s?.settings)[e], u = c(null), p = c(null), m = {
6254
6274
  tenant: s?.tenant ?? "",
6255
6275
  apiUrl: s?.apiUrl ?? "/api",
6256
6276
  locale: s?.locale ?? "",
@@ -6262,7 +6282,7 @@ function Pr({ pluginId: e, blockId: t, props: n, style: r, nodeRef: o }) {
6262
6282
  let e = u.current;
6263
6283
  if (!l?.code || !e) return;
6264
6284
  let n = !0;
6265
- return Mr(l.code, t).then((e) => {
6285
+ return Fr(l.code, t).then((e) => {
6266
6286
  if (!(!n || !e || !u.current)) {
6267
6287
  p.current = e;
6268
6288
  try {
@@ -6292,7 +6312,7 @@ function Pr({ pluginId: e, blockId: t, props: n, style: r, nodeRef: o }) {
6292
6312
  }) : /* @__PURE__ */ f("div", {
6293
6313
  ref: o,
6294
6314
  style: {
6295
- ...Nr,
6315
+ ...Ir,
6296
6316
  ...P(r)
6297
6317
  },
6298
6318
  children: [
@@ -6304,12 +6324,12 @@ function Pr({ pluginId: e, blockId: t, props: n, style: r, nodeRef: o }) {
6304
6324
  }
6305
6325
  //#endregion
6306
6326
  //#region ../ui/src/components/builder/render.jsx
6307
- var Fr = {
6308
- ...Yn,
6309
- ...Or,
6310
- PluginBlock: Pr
6327
+ var Rr = {
6328
+ ...Qn,
6329
+ ...jr,
6330
+ PluginBlock: Lr
6311
6331
  };
6312
- function Ir(e, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
6332
+ function zr(e, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
6313
6333
  let o = n[e];
6314
6334
  if (!o || o.hidden) return null;
6315
6335
  let s = o.type?.resolvedName, c = a?.mapProps ? a.mapProps(o.props ?? {}, s) : o.props ?? {};
@@ -6317,11 +6337,11 @@ function Ir(e, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
6317
6337
  let n = o.props?.componentId, s = r?.[n];
6318
6338
  if (!s?.template || i.has(n)) return null;
6319
6339
  let c = new Set(i).add(n);
6320
- return /* @__PURE__ */ d(t, { children: Ir(s.template.rootId, s.template.nodes, r, c, a) }, e);
6340
+ return /* @__PURE__ */ d(t, { children: zr(s.template.rootId, s.template.nodes, r, c, a) }, e);
6321
6341
  }
6322
- let l = Fr[s];
6342
+ let l = Rr[s];
6323
6343
  if (!l) return null;
6324
- let u = (o.nodes ?? []).map((e) => Ir(e, n, r, i, a)).filter(Boolean), f = Object.entries(o.linkedNodes ?? {}), p = f.length ? Object.fromEntries(f.map(([e, t]) => [e, Ir(t, n, r, i, a)])) : void 0, m = /* @__PURE__ */ d(l, {
6344
+ let u = (o.nodes ?? []).map((e) => zr(e, n, r, i, a)).filter(Boolean), f = Object.entries(o.linkedNodes ?? {}), p = f.length ? Object.fromEntries(f.map(([e, t]) => [e, zr(t, n, r, i, a)])) : void 0, m = /* @__PURE__ */ d(l, {
6325
6345
  ...c,
6326
6346
  ...s === "CollectionList" ? { templateId: o.linkedNodes?.card } : null,
6327
6347
  linked: p,
@@ -6330,16 +6350,16 @@ function Ir(e, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
6330
6350
  },
6331
6351
  children: u.length ? u : void 0
6332
6352
  }, e);
6333
- return c.when && c.when !== "always" ? /* @__PURE__ */ d(ar, {
6353
+ return c.when && c.when !== "always" ? /* @__PURE__ */ d(cr, {
6334
6354
  when: c.when,
6335
6355
  children: m
6336
6356
  }, e) : m;
6337
6357
  }
6338
6358
  //#endregion
6339
6359
  //#region ../ui/src/components/builder/PageRenderer.jsx
6340
- var Lr = (e) => Object.entries(e).map(([e, t]) => `${e}: ${t};`).join(" "), Rr = (e) => `.webim-page[data-webim-mode="light"] { ${Object.entries(q(e.light)).map(([e, t]) => `${e}: ${t} !important;`).join(" ")} }
6360
+ var Br = (e) => Object.entries(e).map(([e, t]) => `${e}: ${t};`).join(" "), Vr = (e) => `.webim-page[data-webim-mode="light"] { ${Object.entries(q(e.light)).map(([e, t]) => `${e}: ${t} !important;`).join(" ")} }
6341
6361
  .webim-page[data-webim-mode="dark"] { ${Object.entries(q(e.dark)).map(([e, t]) => `${e}: ${t} !important;`).join(" ")} }`;
6342
- function zr({ blocks: e, theme: t, components: n, mode: r = "auto", style: i, custom: o, animations: c, tenant: l, apiUrl: u, datasets: p, locale: m, direction: g, settings: _, siteUser: v }) {
6362
+ function Hr({ blocks: e, theme: t, components: n, mode: r = "auto", style: i, custom: o, animations: c, tenant: l, apiUrl: u, datasets: p, locale: m, direction: g, settings: _, siteUser: v }) {
6343
6363
  let y = o?.js?.trim();
6344
6364
  if (a(() => {
6345
6365
  if (!y) return;
@@ -6353,11 +6373,11 @@ function zr({ blocks: e, theme: t, components: n, mode: r = "auto", style: i, cu
6353
6373
  minHeight: "100%",
6354
6374
  display: "flex",
6355
6375
  flexDirection: "column"
6356
- }, w = Ir("ROOT", e, n), T = s(() => ({ render: (t, r) => Ir(t, e, n, void 0, { mapProps: r }) }), [e, n]), E = le(e, n), O = ce(e, n), k = o?.css?.trim(), j = S(c), M = K(t), N = [M.font, M.headingFont].filter((e) => typeof e == "string" && e.trim() && e !== "inherit" && !fe[e]), P = [.../* @__PURE__ */ new Set([...A(e, n), ...N])].map((e) => /* @__PURE__ */ d("link", {
6376
+ }, w = zr("ROOT", e, n), T = s(() => ({ render: (t, r) => zr(t, e, n, void 0, { mapProps: r }) }), [e, n]), E = le(e, n), O = ce(e, n), k = o?.css?.trim(), j = S(c), M = K(t), N = [M.font, M.headingFont].filter((e) => typeof e == "string" && e.trim() && e !== "inherit" && !fe[e]), P = [.../* @__PURE__ */ new Set([...A(e, n), ...N])].map((e) => /* @__PURE__ */ d("link", {
6357
6377
  rel: "stylesheet",
6358
6378
  precedence: "default",
6359
6379
  href: D(e)
6360
- }, e)), F = Rr(M);
6380
+ }, e)), F = Vr(M);
6361
6381
  return r === "auto" ? /* @__PURE__ */ d(J.Provider, {
6362
6382
  value: {
6363
6383
  tenant: l || "",
@@ -6365,7 +6385,7 @@ function zr({ blocks: e, theme: t, components: n, mode: r = "auto", style: i, cu
6365
6385
  locale: m || "",
6366
6386
  settings: _ ?? null
6367
6387
  },
6368
- children: /* @__PURE__ */ d(ir, {
6388
+ children: /* @__PURE__ */ d(sr, {
6369
6389
  initialUser: v,
6370
6390
  children: /* @__PURE__ */ d(ye.Provider, {
6371
6391
  value: p ?? null,
@@ -6380,8 +6400,8 @@ function zr({ blocks: e, theme: t, components: n, mode: r = "auto", style: i, cu
6380
6400
  ...i
6381
6401
  },
6382
6402
  children: [
6383
- /* @__PURE__ */ d("style", { children: `.webim-page { ${Lr(q(M.light))} }
6384
- @media (prefers-color-scheme: dark) { .webim-page { ${Lr(q(M.dark))} } }` }),
6403
+ /* @__PURE__ */ d("style", { children: `.webim-page { ${Br(q(M.light))} }
6404
+ @media (prefers-color-scheme: dark) { .webim-page { ${Br(q(M.dark))} } }` }),
6385
6405
  /* @__PURE__ */ d("style", { children: F }),
6386
6406
  P,
6387
6407
  /* @__PURE__ */ d("style", { children: x }),
@@ -6401,7 +6421,7 @@ function zr({ blocks: e, theme: t, components: n, mode: r = "auto", style: i, cu
6401
6421
  locale: m || "",
6402
6422
  settings: _ ?? null
6403
6423
  },
6404
- children: /* @__PURE__ */ d(ir, {
6424
+ children: /* @__PURE__ */ d(sr, {
6405
6425
  initialUser: v,
6406
6426
  children: /* @__PURE__ */ d(ye.Provider, {
6407
6427
  value: p ?? null,
@@ -6434,8 +6454,8 @@ function zr({ blocks: e, theme: t, components: n, mode: r = "auto", style: i, cu
6434
6454
  }
6435
6455
  //#endregion
6436
6456
  //#region src/WebimContent.jsx
6437
- function Br({ bundle: e, mode: t = "auto", style: n }) {
6438
- return e?.blocks?.ROOT ? /* @__PURE__ */ d(zr, {
6457
+ function Ur({ bundle: e, mode: t = "auto", style: n }) {
6458
+ return e?.blocks?.ROOT ? /* @__PURE__ */ d(Hr, {
6439
6459
  blocks: e.blocks,
6440
6460
  theme: e.theme,
6441
6461
  components: e.components,
@@ -6453,7 +6473,7 @@ function Br({ bundle: e, mode: t = "auto", style: n }) {
6453
6473
  }
6454
6474
  //#endregion
6455
6475
  //#region src/bundle.js
6456
- function Vr({ page: e, settings: t, tenant: n, apiUrl: r, locale: i }) {
6476
+ function Wr({ page: e, settings: t, tenant: n, apiUrl: r, locale: i }) {
6457
6477
  let a = {
6458
6478
  ...t?.global ?? {},
6459
6479
  ...t?.tenant ?? {}
@@ -6479,18 +6499,18 @@ function Vr({ page: e, settings: t, tenant: n, apiUrl: r, locale: i }) {
6479
6499
  }
6480
6500
  //#endregion
6481
6501
  //#region src/fetchPage.js
6482
- var Hr = async (e) => {
6502
+ var Gr = async (e) => {
6483
6503
  let t = await e.json().catch(() => null);
6484
6504
  if (!e.ok || t?.success === !1) throw Error(t?.error?.message || `Request failed (${e.status})`);
6485
6505
  return t?.payload ?? t;
6486
6506
  };
6487
- async function Ur({ apiUrl: e, tenant: t, slug: n, locale: r, preview: i, token: a, page: o, fetch: s }) {
6507
+ async function Kr({ apiUrl: e, tenant: t, slug: n, locale: r, preview: i, token: a, page: o, fetch: s }) {
6488
6508
  if (!e) throw Error("fetchPage: apiUrl is required");
6489
6509
  if (!n) throw Error("fetchPage: slug is required");
6490
6510
  let c = s ?? fetch, l = e.replace(/\/$/, ""), u = {
6491
6511
  ...t ? { "x-tenant": t } : {},
6492
6512
  ...a ? { authorization: `Bearer ${a}` } : {}
6493
- }, [d, f] = await Promise.all([c(`${l}/render/${encodeURIComponent(n)}${i ? `?preview=${encodeURIComponent(i)}` : ""}`, { headers: u }).then(Hr), c(`${l}/settings/public`, { headers: u }).then(Hr)]), p = Vr({
6513
+ }, [d, f] = await Promise.all([c(`${l}/render/${encodeURIComponent(n)}${i ? `?preview=${encodeURIComponent(i)}` : ""}`, { headers: u }).then(Gr), c(`${l}/settings/public`, { headers: u }).then(Gr)]), p = Wr({
6494
6514
  page: d,
6495
6515
  settings: f,
6496
6516
  tenant: t,
@@ -6505,7 +6525,7 @@ async function Ur({ apiUrl: e, tenant: t, slug: n, locale: r, preview: i, token:
6505
6525
  "LogoCarousel"
6506
6526
  ].includes(e?.type?.resolvedName) ? e.props?.source : null).filter(Boolean))];
6507
6527
  if (m.length) {
6508
- let e = (e) => e.startsWith("api:") ? `${l}/data/${encodeURIComponent(e.slice(4))}` : `${l}/dynamic/${encodeURIComponent(e)}?all=1${r ? `&locale=${encodeURIComponent(r)}` : ""}`, t = await Promise.all(m.map((t) => c(e(t), { headers: u }).then(Hr).then((e) => {
6528
+ let e = (e) => e.startsWith("api:") ? `${l}/data/${encodeURIComponent(e.slice(4))}` : `${l}/dynamic/${encodeURIComponent(e)}?all=1${r ? `&locale=${encodeURIComponent(r)}` : ""}`, t = await Promise.all(m.map((t) => c(e(t), { headers: u }).then(Gr).then((e) => {
6509
6529
  let n = Array.isArray(e) ? e : Array.isArray(e?.data) ? e.data : [], r = Number(e?.total?.filtered ?? e?.total?.all ?? n.length);
6510
6530
  return [[t, n], [`${t}:total`, Number.isFinite(r) ? r : n.length]];
6511
6531
  }).catch(() => [[t, []]])));
@@ -6519,40 +6539,40 @@ async function Ur({ apiUrl: e, tenant: t, slug: n, locale: r, preview: i, token:
6519
6539
  }
6520
6540
  //#endregion
6521
6541
  //#region src/ssr.jsx
6522
- var Wr = (e) => String(e ?? "").replace(/[&<>"]/g, (e) => ({
6542
+ var qr = (e) => String(e ?? "").replace(/[&<>"]/g, (e) => ({
6523
6543
  "&": "&amp;",
6524
6544
  "<": "&lt;",
6525
6545
  ">": "&gt;",
6526
6546
  "\"": "&quot;"
6527
6547
  })[e]);
6528
- function Gr(t, { mode: n = "auto", style: r } = {}) {
6529
- return e(/* @__PURE__ */ d(Br, {
6548
+ function Jr(t, { mode: n = "auto", style: r } = {}) {
6549
+ return e(/* @__PURE__ */ d(Ur, {
6530
6550
  bundle: t,
6531
6551
  mode: n,
6532
6552
  style: r
6533
6553
  }));
6534
6554
  }
6535
- function Kr(e, { mode: t = "auto", lang: n } = {}) {
6555
+ function Yr(e, { mode: t = "auto", lang: n } = {}) {
6536
6556
  let r = e.seo ?? {}, i = n || e.locale || "en", a = h(e.direction, i), o = r.title || e.title || e.slug || "Page", s = e.custom?.js?.trim(), c = [
6537
6557
  "<meta charset=\"utf-8\"/>",
6538
6558
  "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"/>",
6539
- `<title>${Wr(o)}</title>`,
6540
- r.description && `<meta name="description" content="${Wr(r.description)}"/>`,
6541
- `<meta property="og:title" content="${Wr(o)}"/>`,
6542
- r.image && `<meta property="og:image" content="${Wr(r.image)}"/>`,
6559
+ `<title>${qr(o)}</title>`,
6560
+ r.description && `<meta name="description" content="${qr(r.description)}"/>`,
6561
+ `<meta property="og:title" content="${qr(o)}"/>`,
6562
+ r.image && `<meta property="og:image" content="${qr(r.image)}"/>`,
6543
6563
  r.noindex && "<meta name=\"robots\" content=\"noindex\"/>",
6544
6564
  "<style>html,body{margin:0;height:100%}</style>"
6545
6565
  ].filter(Boolean).join("\n");
6546
6566
  return `<!doctype html>
6547
- <html lang="${Wr(i)}"${a ? ` dir="${a}"` : ""}>
6567
+ <html lang="${qr(i)}"${a ? ` dir="${a}"` : ""}>
6548
6568
  <head>
6549
6569
  ${c}
6550
6570
  </head>
6551
6571
  <body>
6552
- ${Gr(e, { mode: t })}
6572
+ ${Jr(e, { mode: t })}
6553
6573
  ${s ? `<script>${s.replaceAll("<\/script", "<\\/script")}<\/script>` : ""}
6554
6574
  </body>
6555
6575
  </html>`;
6556
6576
  }
6557
6577
  //#endregion
6558
- export { Vr as assembleBundle, Ur as fetchPage, Gr as renderBundleHtml, Kr as renderPageDocument };
6578
+ export { Wr as assembleBundle, Kr as fetchPage, Jr as renderBundleHtml, Yr as renderPageDocument };