@telia-ace/widget-ui 1.3.38-rc.1 → 1.3.38

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.
Files changed (3) hide show
  1. package/index.js +37 -37
  2. package/index.mjs +150 -152
  3. package/package.json +4 -4
package/index.mjs CHANGED
@@ -1,11 +1,11 @@
1
1
  var it = Object.defineProperty;
2
2
  var st = (e, t, n) => t in e ? it(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
3
  var te = (e, t, n) => (st(e, typeof t != "symbol" ? t + "" : t, n), n);
4
- import { css as $, keyframes as Be } from "@emotion/react";
4
+ import { css as k, keyframes as Be } from "@emotion/react";
5
5
  import { kebabCase as at, appendClassNames as M, uuid as _, removeNullAndUndefinedValues as He, Logger as de } from "@telia-ace/widget-utilities";
6
6
  import { jsx as i, jsxs as b, Fragment as U } from "react/jsx-runtime";
7
7
  import C from "@emotion/styled";
8
- import oe, { forwardRef as D, createContext as K, useContext as P, useState as k, useEffect as v, useRef as L, useCallback as H, useImperativeHandle as ge, createElement as ct, useMemo as re, Component as lt, lazy as dt } from "react";
8
+ import oe, { forwardRef as D, createContext as K, useContext as P, useState as w, useEffect as v, useRef as L, useCallback as E, useImperativeHandle as ge, createElement as ct, useMemo as re, Component as lt, lazy as dt } from "react";
9
9
  import { CSSTransition as Ve, Transition as ut } from "react-transition-group";
10
10
  import { Container as ht, WidgetState as ft } from "@webprovisions/platform";
11
11
  import { ComponentPlatform as mt, asDescriptor as gt, createEventSubscriber as pt, ComponentQuery as Ct, WidgetRenderState as ne, extendComponent as yt } from "@telia-ace/widget-core";
@@ -48,16 +48,16 @@ const xt = (e) => e === "entering" || e === "entered", wt = (e) => e === "exitin
48
48
  compose: (e = "exited", t) => {
49
49
  const { enter: n, exit: o } = t, r = n.transitionKeys.split(" "), s = kt.indexOf(r[0]) > -1 ? "transform" : "opacity";
50
50
  if (xt(e))
51
- return r && r.length > 0 ? $`
51
+ return r && r.length > 0 ? k`
52
52
  ${r && r.length > 0 && r.map((h) => F[h] ? F[h].in : "")}
53
53
  transition: ${s} ${n.duration}ms ${n.easing};
54
54
  ` : "";
55
- const c = r && r.length > 0 && $`
55
+ const c = r && r.length > 0 && k`
56
56
  ${r.map((h) => F[h] ? F[h].out : "")}
57
57
  `;
58
58
  if (wt(e)) {
59
59
  const h = o.transitionKeys.split(" ");
60
- return h && h.length > 0 && e === "exiting" ? $`
60
+ return h && h.length > 0 && e === "exiting" ? k`
61
61
  ${c};
62
62
  ${h.map((a) => F[a] ? F[a].out : "")}
63
63
  transition: ${s} ${o.duration}ms ${o.easing};
@@ -158,7 +158,7 @@ const Ne = () => {
158
158
  let t = "";
159
159
  return Object.keys(We(e)).forEach((n) => {
160
160
  n.indexOf("css-") > -1 && (t += `${n.replace("css-", "")}:${e[n]};`);
161
- }), $`
161
+ }), k`
162
162
  ${t}
163
163
  `;
164
164
  }, Et = (e, t) => {
@@ -189,7 +189,7 @@ const Ne = () => {
189
189
  r,
190
190
  e.theme.typographyVariantMapping || {}
191
191
  );
192
- return $`
192
+ return k`
193
193
  ${c} {
194
194
  ${n}
195
195
  }
@@ -280,7 +280,7 @@ const Tt = (e) => (t) => /* @__PURE__ */ i(Tn, { attrs: t, htmlBody: e }), Nt =
280
280
  });
281
281
  };
282
282
  }, Ce = (e) => {
283
- const t = P(Ze), n = Y(), [o, r] = k();
283
+ const t = P(Ze), n = Y(), [o, r] = w();
284
284
  return v(() => {
285
285
  if ((e || t.id) && n) {
286
286
  const s = n.nodes.get(e || t.id);
@@ -293,7 +293,7 @@ const Tt = (e) => (t) => /* @__PURE__ */ i(Tn, { attrs: t, htmlBody: e }), Nt =
293
293
  e.current = !1;
294
294
  }), []), e;
295
295
  }, Y = (e) => {
296
- const t = B(), [n, o] = k(null), r = Z();
296
+ const t = B(), [n, o] = w(null), r = Z();
297
297
  return v(() => {
298
298
  mt.getInstance(e || t).then(
299
299
  (s) => {
@@ -302,7 +302,7 @@ const Tt = (e) => (t) => /* @__PURE__ */ i(Tn, { attrs: t, htmlBody: e }), Nt =
302
302
  );
303
303
  }, [r]), n;
304
304
  }, ko = () => {
305
- const e = Ce(), t = Y(), [n, o] = k([]), r = Z(), s = H(
305
+ const e = Ce(), t = Y(), [n, o] = w([]), r = Z(), s = E(
306
306
  (c) => {
307
307
  if (t && r.current && c) {
308
308
  const h = t.getBranch(c), a = c.getChildren(h).map((l) => gt(l));
@@ -328,7 +328,7 @@ const Tt = (e) => (t) => /* @__PURE__ */ i(Tn, { attrs: t, htmlBody: e }), Nt =
328
328
  }
329
329
  }, [e, t, s]), n;
330
330
  }, $o = () => P(Vt), Lo = (e, t) => {
331
- const n = pe(), o = B(), [r, s] = k(void 0), c = Z(), h = e || n.type || "";
331
+ const n = pe(), o = B(), [r, s] = w(void 0), c = Z(), h = e || n.type || "";
332
332
  return v(() => {
333
333
  if (h) {
334
334
  let a;
@@ -346,7 +346,7 @@ const Tt = (e) => (t) => /* @__PURE__ */ i(Tn, { attrs: t, htmlBody: e }), Nt =
346
346
  }
347
347
  }, [c, h, t, o]), r;
348
348
  }, Ot = (e) => {
349
- const t = Ce(e), n = Y(), [o, r] = k({}), s = Z();
349
+ const t = Ce(e), n = Y(), [o, r] = w({}), s = Z();
350
350
  return v(() => {
351
351
  t && s.current && r(t.attributes.context);
352
352
  }, [s, t]), v(() => {
@@ -363,7 +363,7 @@ const Tt = (e) => (t) => /* @__PURE__ */ i(Tn, { attrs: t, htmlBody: e }), Nt =
363
363
  }
364
364
  }, [s, n, t]), o;
365
365
  }, Mo = () => P(It), So = () => {
366
- const e = Y(), t = pe(), [n, o] = k([]), [r, s] = k();
366
+ const e = Y(), t = pe(), [n, o] = w([]), [r, s] = w();
367
367
  return v(() => {
368
368
  if (e && t) {
369
369
  const c = new Ct(e).withId(t.id), h = e.actions(c, t.type || _());
@@ -396,7 +396,7 @@ const Tt = (e) => (t) => /* @__PURE__ */ i(Tn, { attrs: t, htmlBody: e }), Nt =
396
396
  const t = B(), { events: n } = (e || t).get("$widget");
397
397
  return n;
398
398
  }, Eo = () => {
399
- const [e, t] = k(!1);
399
+ const [e, t] = w(!1);
400
400
  return v(() => {
401
401
  const n = () => {
402
402
  t(!1);
@@ -408,13 +408,13 @@ const Tt = (e) => (t) => /* @__PURE__ */ i(Tn, { attrs: t, htmlBody: e }), Nt =
408
408
  };
409
409
  }, []), e;
410
410
  }, j = (e, t) => {
411
- const [n, o] = k(!1), r = H(
411
+ const [n, o] = w(!1), r = E(
412
412
  (c) => {
413
413
  const { key: h } = c;
414
414
  h === e && (o(!0), t && t(c));
415
415
  },
416
416
  [o, t]
417
- ), s = H(
417
+ ), s = E(
418
418
  ({ key: c }) => {
419
419
  c === e && o(!1);
420
420
  },
@@ -422,7 +422,7 @@ const Tt = (e) => (t) => /* @__PURE__ */ i(Tn, { attrs: t, htmlBody: e }), Nt =
422
422
  );
423
423
  return W("keydown", r, window), W("keyup", s, window), n;
424
424
  }, Ho = (e) => {
425
- const t = Ce(e), n = Y(), [o, r] = k({}), s = Z();
425
+ const t = Ce(e), n = Y(), [o, r] = w({}), s = Z();
426
426
  return v(() => {
427
427
  t && s.current && r(t.attributes.layout);
428
428
  }, [t, s]), v(() => {
@@ -444,7 +444,7 @@ const Tt = (e) => (t) => /* @__PURE__ */ i(Tn, { attrs: t, htmlBody: e }), Nt =
444
444
  t.current = e;
445
445
  }), t.current;
446
446
  }, Ro = () => P(Wt), To = (e) => {
447
- const [t, n] = k(), o = B(), r = Z();
447
+ const [t, n] = w(), o = B(), r = Z();
448
448
  return v(() => {
449
449
  let s;
450
450
  const c = (e || o).get("$widget");
@@ -471,7 +471,7 @@ const Tt = (e) => (t) => /* @__PURE__ */ i(Tn, { attrs: t, htmlBody: e }), Nt =
471
471
  };
472
472
  }, [r]), t;
473
473
  }, Oe = () => P(Zt), No = (e) => {
474
- const t = B(), n = Oe(), [o, r] = k({
474
+ const t = B(), n = Oe(), [o, r] = w({
475
475
  name: "",
476
476
  params: {}
477
477
  }), s = Z();
@@ -498,18 +498,18 @@ const Tt = (e) => (t) => /* @__PURE__ */ i(Tn, { attrs: t, htmlBody: e }), Nt =
498
498
  }, Ae = (e) => {
499
499
  const t = L(), n = L(0);
500
500
  let o;
501
- const r = H(() => {
501
+ const r = E(() => {
502
502
  var l;
503
503
  (l = t.current) == null || l.classList.add("humany-scrolling"), clearTimeout(o), o = setTimeout(() => {
504
504
  var d;
505
505
  (d = t.current) == null || d.classList.remove("humany-scrolling");
506
506
  }, 500);
507
- }, [t]), s = H(
507
+ }, [t]), s = E(
508
508
  (l) => {
509
509
  n.current = l.touches[0].clientY;
510
510
  },
511
511
  [t]
512
- ), c = (l) => h(l) ? l === t.current ? l : null : l.parentElement ? c(l.parentElement) : null, h = (l) => l.scrollWidth > l.clientWidth || l.scrollHeight > l.clientHeight, a = H(
512
+ ), c = (l) => h(l) ? l === t.current ? l : null : l.parentElement ? c(l.parentElement) : null, h = (l) => l.scrollWidth > l.clientWidth || l.scrollHeight > l.clientHeight, a = E(
513
513
  (l) => {
514
514
  if (!l.cancelable)
515
515
  return;
@@ -566,19 +566,19 @@ const Tt = (e) => (t) => /* @__PURE__ */ i(Tn, { attrs: t, htmlBody: e }), Nt =
566
566
  }
567
567
  }
568
568
  `, Do = () => {
569
- const [e, t] = k(null), n = B(), o = Z();
569
+ const [e, t] = w(null), n = B(), o = Z();
570
570
  return v(() => {
571
571
  n.get("settings").then((r) => {
572
572
  o.current && t(r);
573
573
  });
574
574
  }, [o]), e;
575
575
  }, Fe = (e = !1) => {
576
- const [t, n] = k(e), o = H((r) => {
576
+ const [t, n] = w(e), o = E((r) => {
577
577
  n(typeof r == "boolean" ? r : (s) => !s);
578
578
  }, []);
579
579
  return [t, o];
580
580
  }, zo = (e) => {
581
- const t = B(), n = Y(), o = t.get("widgetDOMElement"), [r, s] = k(null), [c, h] = k(null), a = Z();
581
+ const t = B(), n = Y(), o = t.get("widgetDOMElement"), [r, s] = w(null), [c, h] = w(null), a = Z();
582
582
  v(() => {
583
583
  if (n && a.current) {
584
584
  const d = n.nodes.all.find((f) => f.name === "root-area"), u = n.nodes.all.find((f) => f.type === "view");
@@ -592,7 +592,7 @@ const Tt = (e) => (t) => /* @__PURE__ */ i(Tn, { attrs: t, htmlBody: e }), Nt =
592
592
  }
593
593
  }
594
594
  }, [n, t, a]);
595
- const l = H(
595
+ const l = E(
596
596
  (d) => {
597
597
  a.current && (d.target === r || d.target === c) && e();
598
598
  },
@@ -632,7 +632,7 @@ const Tt = (e) => (t) => /* @__PURE__ */ i(Tn, { attrs: t, htmlBody: e }), Nt =
632
632
  children: t
633
633
  }
634
634
  )
635
- ), Pe = (e) => $`
635
+ ), Pe = (e) => k`
636
636
  display: flex;
637
637
  justify-content: center;
638
638
  flex-direction: column;
@@ -643,7 +643,7 @@ const Tt = (e) => (t) => /* @__PURE__ */ i(Tn, { attrs: t, htmlBody: e }), Nt =
643
643
  ${e["data-loading"] && "min-height: 150px;"}
644
644
  `, Pt = (e) => {
645
645
  var t, n, o;
646
- return $`
646
+ return k`
647
647
  cursor: pointer;
648
648
  text-align: center;
649
649
  border: none;
@@ -656,7 +656,7 @@ const Tt = (e) => (t) => /* @__PURE__ */ i(Tn, { attrs: t, htmlBody: e }), Nt =
656
656
  }, Bo = (e) => {
657
657
  var c;
658
658
  const { primaryColor: t, secondaryColor: n, active: o, theme: r, disabled: s } = e;
659
- return $`
659
+ return k`
660
660
  ${Pt(e)}
661
661
  border: 1px solid ${o ? n : t};
662
662
  background-color: ${o ? t : n};
@@ -673,7 +673,7 @@ const Tt = (e) => (t) => /* @__PURE__ */ i(Tn, { attrs: t, htmlBody: e }), Nt =
673
673
  font-size: ${(c = r.fonts) == null ? void 0 : c.normal};
674
674
  }
675
675
 
676
- ${!s && $`
676
+ ${!s && k`
677
677
  &:hover {
678
678
  background-color: ${t};
679
679
  color: ${n};
@@ -693,17 +693,17 @@ const Tt = (e) => (t) => /* @__PURE__ */ i(Tn, { attrs: t, htmlBody: e }), Nt =
693
693
  `;
694
694
  }, O = (e) => {
695
695
  var t, n, o;
696
- return $`
696
+ return k`
697
697
  outline: ${(t = e.theme.accessibility) == null ? void 0 : t.border};
698
698
  color: ${(o = (n = e.theme.accessibility) == null ? void 0 : n.colors) == null ? void 0 : o.inactiveText};
699
699
  border-color: transparent;
700
700
  `;
701
- }, jt = (e) => $`
701
+ }, jt = (e) => k`
702
702
  ${O(e)}
703
703
  text-decoration: underline;
704
704
  `, Vo = (e) => {
705
705
  var t;
706
- return $`
706
+ return k`
707
707
  ${O(e)}
708
708
  outline-offset: ${(t = e.theme.sizes) == null ? void 0 : t.small};
709
709
  `;
@@ -748,7 +748,7 @@ const Tt = (e) => (t) => /* @__PURE__ */ i(Tn, { attrs: t, htmlBody: e }), Nt =
748
748
  }};
749
749
  `, Kt = (e) => {
750
750
  var t;
751
- return $`
751
+ return k`
752
752
  padding: 0;
753
753
  margin: 0;
754
754
  list-style: none;
@@ -770,11 +770,11 @@ const Tt = (e) => (t) => /* @__PURE__ */ i(Tn, { attrs: t, htmlBody: e }), Nt =
770
770
  `;
771
771
  }, Wo = (e) => {
772
772
  var t, n, o, r;
773
- return $`
773
+ return k`
774
774
  > div {
775
775
  ${ie(e)(
776
776
  "> h1",
777
- $`
777
+ k`
778
778
  margin: 0 0 ${(t = e.theme.sizes) == null ? void 0 : t.normal};
779
779
  font-size: ${(n = e.theme.fonts) == null ? void 0 : n.medium};
780
780
  font-weight: normal;
@@ -788,7 +788,7 @@ const Tt = (e) => (t) => /* @__PURE__ */ i(Tn, { attrs: t, htmlBody: e }), Nt =
788
788
  }
789
789
  ${ie(e)(
790
790
  "h1",
791
- $`
791
+ k`
792
792
  display: flex;
793
793
  align-items: center;
794
794
  i {
@@ -806,7 +806,7 @@ const Tt = (e) => (t) => /* @__PURE__ */ i(Tn, { attrs: t, htmlBody: e }), Nt =
806
806
  `;
807
807
  }, Zo = (e) => {
808
808
  var t, n, o, r, s, c;
809
- return $`
809
+ return k`
810
810
  font-size: ${(t = e.theme.fonts) == null ? void 0 : t.normal};
811
811
  font-weight: 300;
812
812
  line-height: 1.5em;
@@ -864,7 +864,7 @@ const Tt = (e) => (t) => /* @__PURE__ */ i(Tn, { attrs: t, htmlBody: e }), Nt =
864
864
  parent: t = document.body,
865
865
  children: n
866
866
  }) => {
867
- const [o] = k(() => {
867
+ const [o] = w(() => {
868
868
  const r = document.getElementById(e) || document.createElement("div");
869
869
  return r.id = e, r;
870
870
  });
@@ -1514,22 +1514,22 @@ const qt = 300, Io = ({
1514
1514
  /* SlideInBottom */
1515
1515
  }
1516
1516
  }) => {
1517
- const { duration: a = qt } = h, l = L(), d = L(), [u, f] = Ae(!0), [g, m] = Fe(), p = Ie(g), w = L(_());
1517
+ const { duration: a = qt } = h, l = L(), d = L(), [u, f] = Ae(!0), [g, m] = Fe(), p = Ie(g), y = L(_());
1518
1518
  v(() => {
1519
1519
  o && o(g);
1520
1520
  }, [g]);
1521
- const y = j("Escape");
1521
+ const $ = j("Escape");
1522
1522
  v(() => {
1523
- y && m(!1);
1524
- }, [y]), W(
1523
+ $ && m(!1);
1524
+ }, [$]), W(
1525
1525
  "click",
1526
- (E) => {
1527
- const { target: R } = E;
1526
+ (S) => {
1527
+ const { target: R } = S;
1528
1528
  !d.current || !f.current || !R || d.current !== R && f.current !== R && !f.current.contains(R) && !d.current.contains(R) && m(!1);
1529
1529
  },
1530
1530
  window
1531
1531
  );
1532
- const S = ye(w.current, () => {
1532
+ const H = ye(y.current, () => {
1533
1533
  m(!1);
1534
1534
  });
1535
1535
  ae("router:changed", () => {
@@ -1555,7 +1555,7 @@ const qt = 300, Io = ({
1555
1555
  className: M(
1556
1556
  e,
1557
1557
  "humany-drawer",
1558
- `humany-drawer-${w.current}`
1558
+ `humany-drawer-${y.current}`
1559
1559
  ),
1560
1560
  clientHeight: document.body.clientHeight,
1561
1561
  css: u,
@@ -1579,8 +1579,8 @@ const qt = 300, Io = ({
1579
1579
  }
1580
1580
  ),
1581
1581
  oe.cloneElement(r, {
1582
- onClick: (E) => {
1583
- m(), S();
1582
+ onClick: (S) => {
1583
+ m(), H();
1584
1584
  },
1585
1585
  ref: d,
1586
1586
  "aria-label": r.props.title,
@@ -1627,7 +1627,7 @@ const qt = 300, Io = ({
1627
1627
  return (t = e.theme.fonts) == null ? void 0 : t.normal;
1628
1628
  }};
1629
1629
  line-height: 1.2em;
1630
- `, le = (e) => $`
1630
+ `, le = (e) => k`
1631
1631
  transition: ${e.duration}ms;
1632
1632
  `, Gt = C(ce)`
1633
1633
  max-height: 0;
@@ -1707,7 +1707,7 @@ const qt = 300, Io = ({
1707
1707
  "slide-in-left": en,
1708
1708
  "slide-in-top": tn
1709
1709
  }, je = (e, t, n) => {
1710
- const [o, r] = k(0), [s, c] = k(0), h = H(
1710
+ const [o, r] = w(0), [s, c] = w(0), h = E(
1711
1711
  (a, l) => {
1712
1712
  if (a.preventDefault(), l) {
1713
1713
  const d = l.getBoundingClientRect();
@@ -1735,28 +1735,28 @@ const qt = 300, Io = ({
1735
1735
  }, s) => {
1736
1736
  const c = L(), h = L(), a = L();
1737
1737
  ge(s, () => a.current, [a.current]);
1738
- const l = L(_()), [d, u] = k(!1), f = Ie(d), [{ x: g, y: m }, p] = je(d, l.current, a.current), w = j("Escape");
1738
+ const l = L(_()), [d, u] = w(!1), f = Ie(d), [{ x: g, y: m }, p] = je(d, l.current, a.current), y = j("Escape");
1739
1739
  v(() => {
1740
- w && u(!1);
1741
- }, [w]), v(() => {
1740
+ y && u(!1);
1741
+ }, [y]), v(() => {
1742
1742
  d && c.current ? c.current.focus() : !d && h.current && f && h.current.focus();
1743
1743
  }, [d, c.current, h.current]), W(
1744
1744
  "click",
1745
1745
  (N) => {
1746
- const { target: E } = N;
1747
- !a.current || !E || a.current !== E && !a.current.contains(E) && u(!1);
1746
+ const { target: S } = N;
1747
+ !a.current || !S || a.current !== S && !a.current.contains(S) && u(!1);
1748
1748
  },
1749
1749
  window
1750
1750
  ), ae("router:changed", () => {
1751
1751
  u(!1);
1752
1752
  });
1753
- const y = ye(l.current, () => {
1753
+ const $ = ye(l.current, () => {
1754
1754
  u(!1);
1755
- }), S = H(
1755
+ }), H = E(
1756
1756
  (N) => {
1757
- N.stopPropagation(), p(N, h.current), u(!d), y();
1757
+ N.stopPropagation(), p(N, h.current), u(!d), $();
1758
1758
  },
1759
- [y, p, u]
1759
+ [$, p, u]
1760
1760
  );
1761
1761
  return /* @__PURE__ */ b(U, { children: [
1762
1762
  d && /* @__PURE__ */ i(q, { children: /* @__PURE__ */ b(
@@ -1787,7 +1787,7 @@ const qt = 300, Io = ({
1787
1787
  }
1788
1788
  ) }),
1789
1789
  oe.cloneElement(n, {
1790
- onClick: S,
1790
+ onClick: H,
1791
1791
  ref: h,
1792
1792
  "aria-label": n.props.title,
1793
1793
  "aria-expanded": d
@@ -1833,7 +1833,7 @@ const qt = 300, Io = ({
1833
1833
  ${St}
1834
1834
  `, Ke = D(
1835
1835
  ({ htmlParseInstruction: e = null, className: t, html: n, ...o }, r) => {
1836
- const s = B(), [c, h] = k();
1836
+ const s = B(), [c, h] = w();
1837
1837
  v(() => {
1838
1838
  const d = Nt(s, n), u = {
1839
1839
  ...d,
@@ -1852,22 +1852,22 @@ const qt = 300, Io = ({
1852
1852
  return;
1853
1853
  new MutationObserver((f) => {
1854
1854
  f.forEach((g) => {
1855
- var y, S, N;
1855
+ var $, H, N;
1856
1856
  let m = g.target;
1857
1857
  if (m.tagName === "DIV" && m.matches("[data-notification]") && m.getAttribute("data-expandable")) {
1858
- const E = m.firstChild;
1859
- if (E && E.nodeType === Node.TEXT_NODE) {
1858
+ const S = m.firstChild;
1859
+ if (S && S.nodeType === Node.TEXT_NODE) {
1860
1860
  const R = document.createElement("p");
1861
- R.appendChild(E), m.appendChild(R);
1861
+ R.appendChild(S), m.appendChild(R);
1862
1862
  return;
1863
1863
  } else
1864
- E && E.nodeType === Node.ELEMENT_NODE && (m = E);
1865
- } else if (m.tagName !== "P" || !((y = m.closest("[data-notification]")) != null && y.getAttribute("data-expandable")))
1864
+ S && S.nodeType === Node.ELEMENT_NODE && (m = S);
1865
+ } else if (m.tagName !== "P" || !(($ = m.closest("[data-notification]")) != null && $.getAttribute("data-expandable")))
1866
1866
  return;
1867
1867
  if (!(m != null && m.closest(".humany-notification-row")))
1868
1868
  return;
1869
- const p = (S = m.closest(".humany-notification-row")) == null ? void 0 : S.getAttribute("data-node-id"), w = (N = m.closest("[data-notification]")) == null ? void 0 : N.getAttribute("data-notification");
1870
- m.scrollWidth > m.clientWidth ? (l.container.expandableNotifications || (l.container.expandableNotifications = /* @__PURE__ */ new Set()), l.container.expandableNotifications.add(w), l.events.dispatch("notification:expandable", {
1869
+ const p = (H = m.closest(".humany-notification-row")) == null ? void 0 : H.getAttribute("data-node-id"), y = (N = m.closest("[data-notification]")) == null ? void 0 : N.getAttribute("data-notification");
1870
+ m.scrollWidth > m.clientWidth ? (l.container.expandableNotifications || (l.container.expandableNotifications = /* @__PURE__ */ new Set()), l.container.expandableNotifications.add(y), l.events.dispatch("notification:expandable", {
1871
1871
  expandable: !0,
1872
1872
  notificationRowId: p
1873
1873
  })) : l.events.dispatch("notification:expandable", {
@@ -1918,42 +1918,40 @@ const qt = 300, Io = ({
1918
1918
  },
1919
1919
  disabled: h = !1,
1920
1920
  type: a,
1921
- autoComplete: l,
1922
- ...d
1923
- }, u) => {
1924
- const [f, g] = k(t), m = L();
1925
- ge(u, () => m.current), v(() => {
1921
+ ...l
1922
+ }, d) => {
1923
+ const [u, f] = w(t), g = L();
1924
+ ge(d, () => g.current), v(() => {
1926
1925
  var y;
1927
- t && ((y = m == null ? void 0 : m.current) == null || y.focus());
1928
- }, [t, u, m]);
1929
- const p = (y, S) => {
1930
- g(y), n && n(y), s && y && S.target.select();
1931
- }, w = {
1932
- ...z(d),
1926
+ t && ((y = g == null ? void 0 : g.current) == null || y.focus());
1927
+ }, [t, d, g]);
1928
+ const m = (y, $) => {
1929
+ f(y), n && n(y), s && y && $.target.select();
1930
+ }, p = {
1931
+ ...z(l),
1933
1932
  disabled: h,
1934
1933
  autoFocus: t,
1935
1934
  type: a,
1936
1935
  onKeyDown: (y) => {
1937
- y.key === "Enter" && f && o(y), y.key === "Escape" && f && r(y);
1936
+ y.key === "Enter" && u && o(y), y.key === "Escape" && u && r(y);
1938
1937
  },
1939
- onFocus: (y) => p(!0, y),
1940
- onBlur: (y) => p(!1, y),
1938
+ onFocus: (y) => m(!0, y),
1939
+ onBlur: (y) => m(!1, y),
1941
1940
  onChange: (y) => c(y.target.value || ""),
1942
1941
  className: M(e, "humany-input"),
1943
- "data-type": a,
1944
- ...l && { autoComplete: l }
1942
+ "data-type": a
1945
1943
  };
1946
1944
  return a !== "textarea" ? /* @__PURE__ */ i(
1947
1945
  "input",
1948
1946
  {
1949
- ...w,
1950
- ref: m
1947
+ ...p,
1948
+ ref: g
1951
1949
  }
1952
1950
  ) : /* @__PURE__ */ i(
1953
1951
  "textarea",
1954
1952
  {
1955
- ...w,
1956
- ref: m
1953
+ ...p,
1954
+ ref: g
1957
1955
  }
1958
1956
  );
1959
1957
  }
@@ -2054,16 +2052,16 @@ const qt = 300, Io = ({
2054
2052
  items: u,
2055
2053
  ulProps: c,
2056
2054
  renderItem: (g) => {
2057
- const { id: m, selected: p, items: w, matches: y } = g, S = p && l(w);
2058
- return !s && !y ? null : /* @__PURE__ */ ct(
2055
+ const { id: m, selected: p, items: y, matches: $ } = g, H = p && l(y);
2056
+ return !s && !$ ? null : /* @__PURE__ */ ct(
2059
2057
  "li",
2060
2058
  {
2061
2059
  ...z(h),
2062
2060
  key: m,
2063
2061
  className: "humany-item-tree-item"
2064
2062
  },
2065
- n && n(g, f, S),
2066
- w && (r || S) && d(w, f + 1)
2063
+ n && n(g, f, H),
2064
+ y && (r || H) && d(y, f + 1)
2067
2065
  );
2068
2066
  }
2069
2067
  }
@@ -2112,14 +2110,14 @@ const qt = 300, Io = ({
2112
2110
  }
2113
2111
  );
2114
2112
  const m = Object.keys(r).reduce(
2115
- (p, w) => {
2116
- const y = r[w];
2117
- if (Array.isArray(y)) {
2118
- if (y.length === 0)
2113
+ (p, y) => {
2114
+ const $ = r[y];
2115
+ if (Array.isArray($)) {
2116
+ if ($.length === 0)
2119
2117
  return p;
2120
- p[w] = y.map((S) => typeof S == "string" ? encodeURIComponent(S) : S).join(",");
2118
+ p[y] = $.map((H) => typeof H == "string" ? encodeURIComponent(H) : H).join(",");
2121
2119
  } else
2122
- p[w] = typeof y == "string" ? encodeURIComponent(y) : y;
2120
+ p[y] = typeof $ == "string" ? encodeURIComponent($) : $;
2123
2121
  return p;
2124
2122
  },
2125
2123
  {}
@@ -2169,7 +2167,7 @@ const mn = (e) => {
2169
2167
  params: u,
2170
2168
  ...f
2171
2169
  }, g) => {
2172
- var N, E;
2170
+ var N, S;
2173
2171
  const m = {
2174
2172
  title: s,
2175
2173
  role: d === "index" || d === "contact-method" || t ? "button" : void 0,
@@ -2197,8 +2195,8 @@ const mn = (e) => {
2197
2195
  }
2198
2196
  };
2199
2197
  f["data-client-name"] === "custom.link" && (m.role = "link");
2200
- const w = B().get("$settings"), y = t && ((E = (N = w == null ? void 0 : w.data) == null ? void 0 : N.accessibility) == null ? void 0 : E.disableInactiveLink), S = f.description || "<p></p>";
2201
- return y ? /* @__PURE__ */ b(gn, { className: "disabled-link", children: [
2198
+ const y = B().get("$settings"), $ = t && ((S = (N = y == null ? void 0 : y.data) == null ? void 0 : N.accessibility) == null ? void 0 : S.disableInactiveLink), H = f.description || "<p></p>";
2199
+ return $ ? /* @__PURE__ */ b(gn, { className: "disabled-link", children: [
2202
2200
  /* @__PURE__ */ i("div", { className: "icon-placeholder" }),
2203
2201
  /* @__PURE__ */ b("div", { className: "humany-contact-link-rich-content", children: [
2204
2202
  /* @__PURE__ */ i("span", { children: m.title }),
@@ -2206,7 +2204,7 @@ const mn = (e) => {
2206
2204
  "div",
2207
2205
  {
2208
2206
  className: "inner-span",
2209
- dangerouslySetInnerHTML: { __html: S }
2207
+ dangerouslySetInnerHTML: { __html: H }
2210
2208
  }
2211
2209
  )
2212
2210
  ] })
@@ -2270,7 +2268,7 @@ const mn = (e) => {
2270
2268
  },
2271
2269
  ...r
2272
2270
  }) => {
2273
- const s = L(), c = H(
2271
+ const s = L(), c = E(
2274
2272
  (h) => {
2275
2273
  h.target === s.current && o(h);
2276
2274
  },
@@ -2417,11 +2415,11 @@ const mn = (e) => {
2417
2415
  ...o
2418
2416
  }) => {
2419
2417
  var m;
2420
- const r = L(null), [s, c] = k(!1), [h, a] = k(!1), { width: l, height: d, ...u } = o.style || {}, f = H(() => {
2418
+ const r = L(null), [s, c] = w(!1), [h, a] = w(!1), { width: l, height: d, ...u } = o.style || {}, f = E(() => {
2421
2419
  const p = r.current;
2422
2420
  if (p) {
2423
- const w = window.innerWidth / p.naturalWidth, y = window.innerHeight / p.naturalHeight, S = Math.min(w, y);
2424
- return y >= 1 && w >= 1 ? 1 : S;
2421
+ const y = window.innerWidth / p.naturalWidth, $ = window.innerHeight / p.naturalHeight, H = Math.min(y, $);
2422
+ return $ >= 1 && y >= 1 ? 1 : H;
2425
2423
  }
2426
2424
  return 1;
2427
2425
  }, [s, t.src]), g = re(() => {
@@ -2429,8 +2427,8 @@ const mn = (e) => {
2429
2427
  if (p && s) {
2430
2428
  if (!h) {
2431
2429
  a(!0);
2432
- const w = f();
2433
- n(w);
2430
+ const y = f();
2431
+ n(y);
2434
2432
  }
2435
2433
  return p.naturalWidth >= p.naturalHeight ? [`${e * p.naturalWidth}px`, "auto"] : ["auto", `${e * p.naturalHeight}px`];
2436
2434
  }
@@ -2465,7 +2463,7 @@ const mn = (e) => {
2465
2463
  `, En = C.img`
2466
2464
  transform: none;
2467
2465
 
2468
- ${(e) => e.imageSize && $`
2466
+ ${(e) => e.imageSize && k`
2469
2467
  width: ${e.imageSize[0]};
2470
2468
  height: ${e.imageSize[1]};
2471
2469
  display: inline-block;
@@ -2478,7 +2476,7 @@ const mn = (e) => {
2478
2476
  display: inline-block;
2479
2477
  vertical-align: middle;
2480
2478
  `, Rn = () => {
2481
- const e = L(), [t, n] = k(!0), o = H(() => (t || n(!0), e.current && clearTimeout(e.current), e.current = setTimeout(() => {
2479
+ const e = L(), [t, n] = w(!0), o = E(() => (t || n(!0), e.current && clearTimeout(e.current), e.current = setTimeout(() => {
2482
2480
  n(!1);
2483
2481
  }, 3e3), () => {
2484
2482
  e.current && clearTimeout(e.current);
@@ -2486,16 +2484,16 @@ const mn = (e) => {
2486
2484
  return [t, o];
2487
2485
  }, Tn = ({ attrs: e, htmlBody: t }) => {
2488
2486
  var Se;
2489
- const n = j("Escape"), o = j("ArrowLeft"), r = j("ArrowRight"), [s, c] = k(1), [h, a] = k({ top: 0, left: 0, x: 0, y: 0 }), [l, d] = k(!1), [u, f] = Rn(), [g, m] = k(null), [p, w] = k(null), y = L(null), S = L(null), N = L(null), E = L(null), R = L(null), [qe, Qe] = k(null);
2487
+ const n = j("Escape"), o = j("ArrowLeft"), r = j("ArrowRight"), [s, c] = w(1), [h, a] = w({ top: 0, left: 0, x: 0, y: 0 }), [l, d] = w(!1), [u, f] = Rn(), [g, m] = w(null), [p, y] = w(null), $ = L(null), H = L(null), N = L(null), S = L(null), R = L(null), [qe, Qe] = w(null);
2490
2488
  v(() => {
2491
2489
  n && m(null);
2492
2490
  }, [n]), v(() => {
2493
2491
  c(1);
2494
2492
  }, [g]), v(() => {
2495
2493
  var I, ee;
2496
- if (g === null || S.current === null)
2494
+ if (g === null || H.current === null)
2497
2495
  return;
2498
- const x = S.current.firstElementChild, T = (I = N.current) == null ? void 0 : I.querySelector(".nav-left"), V = (ee = N.current) == null ? void 0 : ee.querySelector(".nav-right");
2496
+ const x = H.current.firstElementChild, T = (I = N.current) == null ? void 0 : I.querySelector(".nav-left"), V = (ee = N.current) == null ? void 0 : ee.querySelector(".nav-right");
2499
2497
  if (p === "Right")
2500
2498
  J && V ? V.focus() : G && T && T.focus();
2501
2499
  else if (p === "Left")
@@ -2505,7 +2503,7 @@ const mn = (e) => {
2505
2503
  return;
2506
2504
  x.focus();
2507
2505
  }
2508
- }, [g, S, N, p]), v(() => {
2506
+ }, [g, H, N, p]), v(() => {
2509
2507
  if (o) {
2510
2508
  if (G)
2511
2509
  return Le();
@@ -2533,27 +2531,27 @@ const mn = (e) => {
2533
2531
  },
2534
2532
  []
2535
2533
  );
2536
- }, [t]), ke = H(() => {
2534
+ }, [t]), ke = E(() => {
2537
2535
  const { src: x } = e;
2538
2536
  if (x) {
2539
2537
  const T = A.findIndex((V, I) => V.src === x);
2540
2538
  m(T);
2541
2539
  }
2542
- }, [A, e]), Ge = H((x) => {
2540
+ }, [A, e]), Ge = E((x) => {
2543
2541
  m(null);
2544
- }, []), $e = H(
2542
+ }, []), $e = E(
2545
2543
  (x) => {
2546
2544
  c(x ? s + s * 0.25 : s - s * 0.25);
2547
2545
  },
2548
2546
  [c, s]
2549
- ), Je = H(() => {
2547
+ ), Je = E(() => {
2550
2548
  if (g !== null) {
2551
2549
  const { src: x } = A[g];
2552
2550
  x && window.open(x, "_self");
2553
2551
  }
2554
- }, [A, g]), et = H(
2552
+ }, [A, g]), et = E(
2555
2553
  (x) => {
2556
- const T = E.current;
2554
+ const T = S.current;
2557
2555
  T && (a({
2558
2556
  top: T.scrollTop,
2559
2557
  left: T.scrollLeft,
@@ -2561,10 +2559,10 @@ const mn = (e) => {
2561
2559
  y: x.clientY
2562
2560
  }), d(!0));
2563
2561
  },
2564
- [E]
2565
- ), tt = H(
2562
+ [S]
2563
+ ), tt = E(
2566
2564
  (x) => {
2567
- const T = E.current;
2565
+ const T = S.current;
2568
2566
  if (T && l) {
2569
2567
  const V = x.clientX - h.x, I = x.clientY - h.y;
2570
2568
  T.scrollTop = h.top - I, T.scrollLeft = h.left - V;
@@ -2574,18 +2572,18 @@ const mn = (e) => {
2574
2572
  ), nt = (x) => {
2575
2573
  x.preventDefault(), d(!1);
2576
2574
  }, ot = re(() => {
2577
- if (E.current) {
2578
- const x = E.current.getElementsByTagName("img");
2575
+ if (S.current) {
2576
+ const x = S.current.getElementsByTagName("img");
2579
2577
  if (x && x.length) {
2580
2578
  const T = x[0];
2581
2579
  return T.width > window.innerWidth || T.height > window.innerHeight;
2582
2580
  }
2583
2581
  }
2584
2582
  return !1;
2585
- }, [E, s]), Le = () => {
2586
- g !== null && (w("Left"), m(g - 1));
2583
+ }, [S, s]), Le = () => {
2584
+ g !== null && (y("Left"), m(g - 1));
2587
2585
  }, Me = () => {
2588
- g !== null && (w("Right"), m(g + 1));
2586
+ g !== null && (y("Right"), m(g + 1));
2589
2587
  }, G = g !== null && g > 0 && A.length > 1, J = g !== null && A.length - 1 > g;
2590
2588
  return /* @__PURE__ */ b(U, { children: [
2591
2589
  /* @__PURE__ */ i(Xe, { visible: g !== null, onClick: Ge, children: /* @__PURE__ */ b(
@@ -2599,7 +2597,7 @@ const mn = (e) => {
2599
2597
  /* @__PURE__ */ i(On, { show: u.toString(), children: /* @__PURE__ */ i(
2600
2598
  Bn,
2601
2599
  {
2602
- ref: S,
2600
+ ref: H,
2603
2601
  buttons: [
2604
2602
  {
2605
2603
  id: "download",
@@ -2621,7 +2619,7 @@ const mn = (e) => {
2621
2619
  {
2622
2620
  scrolling: l.toString(),
2623
2621
  isDraggable: ot.toString(),
2624
- ref: E,
2622
+ ref: S,
2625
2623
  onMouseMove: tt,
2626
2624
  onMouseDown: et,
2627
2625
  onMouseUp: nt,
@@ -2700,7 +2698,7 @@ const mn = (e) => {
2700
2698
  /* @__PURE__ */ i(
2701
2699
  Nn,
2702
2700
  {
2703
- ref: y,
2701
+ ref: $,
2704
2702
  onClick: ke,
2705
2703
  onKeyDown: (x) => {
2706
2704
  x.key === "Enter" && (x.preventDefault(), ke());
@@ -2754,14 +2752,14 @@ const mn = (e) => {
2754
2752
  ), _e = C.div`
2755
2753
  transition: opacity 0.3s ease 0s;
2756
2754
  z-index: 5;
2757
- ${(e) => e.show === "true" ? "opacity: 1;" : $`
2755
+ ${(e) => e.show === "true" ? "opacity: 1;" : k`
2758
2756
  opacity: 0;
2759
2757
  pointer-events: none;
2760
2758
  `}
2761
2759
  `, Nn = C(xe)`
2762
2760
  display: inline-block !important;
2763
2761
 
2764
- ${(e) => (e.alignment === "right" || e.alignment === "left") && $`
2762
+ ${(e) => (e.alignment === "right" || e.alignment === "left") && k`
2765
2763
  float: ${e.alignment};
2766
2764
  `}
2767
2765
  `, Dn = C(_e)`
@@ -2778,7 +2776,7 @@ const mn = (e) => {
2778
2776
  justify-content: center;
2779
2777
  align-items: center;
2780
2778
 
2781
- ${(e) => e.icon === "caret-left" && $`
2779
+ ${(e) => e.icon === "caret-left" && k`
2782
2780
  svg {
2783
2781
  position: relative;
2784
2782
  left: -2px;
@@ -2787,7 +2785,7 @@ const mn = (e) => {
2787
2785
 
2788
2786
  ${(e) => {
2789
2787
  var t;
2790
- return e.circle === "true" ? $`
2788
+ return e.circle === "true" ? k`
2791
2789
  background-color: #ffffff;
2792
2790
  border-radius: 50%;
2793
2791
 
@@ -2810,7 +2808,7 @@ const mn = (e) => {
2810
2808
  }
2811
2809
  }
2812
2810
  }
2813
- ` : $`
2811
+ ` : k`
2814
2812
  svg {
2815
2813
  path,
2816
2814
  line {
@@ -2826,13 +2824,13 @@ const mn = (e) => {
2826
2824
  `;
2827
2825
  }}
2828
2826
 
2829
- ${(e) => e.show === "true" ? $`
2827
+ ${(e) => e.show === "true" ? k`
2830
2828
  opacity: 0.8;
2831
2829
  transition: opacity 0.3s ease 0s;
2832
2830
  &:hover {
2833
2831
  opacity: 1;
2834
2832
  }
2835
- ` : $`
2833
+ ` : k`
2836
2834
  opacity: 0;
2837
2835
  pointer-events: none;
2838
2836
  `}
@@ -2941,9 +2939,9 @@ const mn = (e) => {
2941
2939
  }, [h, u.current]), ae("router:changed", () => {
2942
2940
  a(!1);
2943
2941
  });
2944
- const m = H(
2945
- (w) => {
2946
- a(!1), o(w);
2942
+ const m = E(
2943
+ (y) => {
2944
+ a(!1), o(y);
2947
2945
  },
2948
2946
  [o, a]
2949
2947
  );
@@ -2952,7 +2950,7 @@ const mn = (e) => {
2952
2950
  a(!1);
2953
2951
  }
2954
2952
  }));
2955
- const p = H(() => ye(f.current, () => {
2953
+ const p = E(() => ye(f.current, () => {
2956
2954
  a(!1);
2957
2955
  }), [f.current]);
2958
2956
  return /* @__PURE__ */ b(U, { children: [
@@ -2983,7 +2981,7 @@ const mn = (e) => {
2983
2981
  }
2984
2982
  ) }),
2985
2983
  oe.cloneElement(n, {
2986
- onClick: (w) => {
2984
+ onClick: (y) => {
2987
2985
  a(), p();
2988
2986
  }
2989
2987
  })
@@ -3020,10 +3018,10 @@ const mn = (e) => {
3020
3018
  cancelLabel: c = "",
3021
3019
  confirmLabel: h = ""
3022
3020
  }) => {
3023
- const a = L(), l = H(() => {
3021
+ const a = L(), l = E(() => {
3024
3022
  var u;
3025
3023
  r(), (u = a == null ? void 0 : a.current) == null || u.close();
3026
- }, [r]), d = H(() => {
3024
+ }, [r]), d = E(() => {
3027
3025
  var u;
3028
3026
  s(), (u = a == null ? void 0 : a.current) == null || u.close();
3029
3027
  }, [s]);
@@ -3132,7 +3130,7 @@ const mn = (e) => {
3132
3130
  `, qn = C.div`
3133
3131
  ${(e) => ie(e)(
3134
3132
  "h2",
3135
- $`
3133
+ k`
3136
3134
  padding: 0;
3137
3135
  margin: 0;
3138
3136
  color: gray;
@@ -3149,7 +3147,7 @@ const mn = (e) => {
3149
3147
  var t;
3150
3148
  return ie(e)(
3151
3149
  "h3",
3152
- $`
3150
+ k`
3153
3151
  text-transform: uppercase;
3154
3152
  font-size: ${(t = e.theme.fonts) == null ? void 0 : t.normal};
3155
3153
  `
@@ -3253,7 +3251,7 @@ const Uo = ({
3253
3251
  sticky: o = !1,
3254
3252
  ...r
3255
3253
  }) => {
3256
- const [s, c] = k(!1), h = L(_()), a = L(), [{ x: l, y: d }, u] = je(s, h.current, a.current), f = (m) => {
3254
+ const [s, c] = w(!1), h = L(_()), a = L(), [{ x: l, y: d }, u] = je(s, h.current, a.current), f = (m) => {
3257
3255
  const { target: p } = m;
3258
3256
  !a.current || !p || a.current !== p && !a.current.contains(p) && c(!1);
3259
3257
  };
@@ -3263,7 +3261,7 @@ const Uo = ({
3263
3261
  window.removeEventListener("click", f);
3264
3262
  };
3265
3263
  }, [s, o]);
3266
- const g = H(
3264
+ const g = E(
3267
3265
  (m, p) => {
3268
3266
  u(m, a.current), c(p);
3269
3267
  },
@@ -3417,7 +3415,7 @@ const Uo = ({
3417
3415
  ).then(() => {
3418
3416
  f.events.subscribeOnce(
3419
3417
  "widget:area-rendered",
3420
- (p, w) => {
3418
+ (p, y) => {
3421
3419
  h.get(
3422
3420
  "widgetDOMElement"
3423
3421
  ) && f.events.dispatch("widget:modal-opened", {