@telia-ace/widget-conversation 1.3.0 → 1.3.1

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.
@@ -1,75 +1,75 @@
1
1
  import { jsx as n, jsxs as h, Fragment as N } from "react/jsx-runtime";
2
2
  import i from "@emotion/styled";
3
- import { Input as se, borderTabStyle as b, Button as A, SymbolBadge as k, useIsTabbing as ae, useDispatch as G, useProperties as S, useScroll as ie, useContainer as I, Typography as J, invertedHoverButton as xe, Html as Q, List as le, buttonCss as B, ItemList as K, itemList as D, Link as ke, useComponent as we, genericHtml as Se, headingElement as Z, usePrevious as Ce, list as Le, WidgetOverlayOutlet as ce, ConversationContext as ze } from "@telia-ace/widget-ui";
3
+ import { Input as se, borderTabStyle as p, Button as A, SymbolBadge as w, useIsTabbing as ae, useDispatch as G, useProperties as C, useScroll as ie, useContainer as I, Typography as J, invertedHoverButton as xe, Html as Q, List as le, buttonCss as R, ItemList as K, itemList as D, Link as ke, useComponent as we, genericHtml as Se, headingElement as Z, usePrevious as Ce, list as Le, WidgetOverlayOutlet as ce, ConversationContext as ze } from "@telia-ace/widget-ui";
4
4
  import { appendClassNames as H, htmlParentContains as Ne } from "@telia-ace/widget-utilities";
5
- import { css as x, keyframes as Me } from "@emotion/react";
5
+ import { css as v, keyframes as Me } from "@emotion/react";
6
6
  import de, { useState as q, useEffect as j, forwardRef as ee, useContext as Ae, Suspense as Ie, useRef as me, useMemo as He, useCallback as ue } from "react";
7
7
  import { FormComponent as Te } from "@telia-ace/widget-forms";
8
- import { ConversationMessageListItemType as w, ConversationMessageType as U } from "./index.mjs";
8
+ import { ConversationMessageListItemType as S, ConversationMessageType as U } from "./index.mjs";
9
9
  import "@telia-ace/widget-core";
10
10
  import "@telia-ace/widget-services";
11
11
  import "@telia-ace/widget-plugins";
12
12
  const Oe = ({ className: t }) => {
13
- const [e, o] = q(""), [s, a] = q(0), [r, d] = q(0), u = ae(), l = G(), {
14
- inputPlaceholder: m = "Type your message",
15
- inputHidden: y = !1,
16
- inputDisabled: c = !1,
17
- sendButtonLabel: g = "Send message",
18
- inputMultiline: p = !0,
13
+ const [e, r] = q(""), [s, a] = q(0), [o, d] = q(0), m = ae(), c = G(), {
14
+ inputPlaceholder: f = "Type your message",
15
+ inputHidden: x = !1,
16
+ inputDisabled: l = !1,
17
+ sendButtonLabel: u = "Send message",
18
+ inputMultiline: b = !0,
19
19
  secondaryAction: $
20
- } = S(), [L, v] = ie(!0), O = I();
20
+ } = C(), [k, y] = ie(!0), O = I();
21
21
  j(() => {
22
- if (v.current) {
23
- const { lineHeight: f, maxHeight: z } = getComputedStyle(v.current);
24
- if (f && f.indexOf("px") > -1) {
25
- const T = f.split("px"), $e = parseInt(T[0], 10);
22
+ if (y.current) {
23
+ const { lineHeight: g, maxHeight: z } = getComputedStyle(y.current);
24
+ if (g && g.indexOf("px") > -1) {
25
+ const T = g.split("px"), $e = parseInt(T[0], 10);
26
26
  a($e);
27
27
  const ve = z.split("px");
28
28
  d(parseInt(ve[0], 10));
29
29
  }
30
30
  }
31
- }, [v.current]);
32
- const P = (f) => {
33
- !f.shiftKey || !p ? (f.preventDefault(), e && e.length > 0 && (l("user-submit", { text: e }), o(""), W(""))) : e.length < 1 && f.preventDefault();
34
- }, pe = (f) => {
31
+ }, [y.current]);
32
+ const P = (g) => {
33
+ !g.shiftKey || !b ? (g.preventDefault(), e && e.length > 0 && (c("user-submit", { text: e }), r(""), W(""))) : e.length < 1 && g.preventDefault();
34
+ }, pe = (g) => {
35
35
  if (!$)
36
36
  return;
37
- f.preventDefault(), l("action", {
37
+ g.preventDefault(), c("action", {
38
38
  actionKey: $.action,
39
39
  ...$
40
40
  });
41
41
  const { events: z } = O.get("$widget");
42
42
  z.dispatch("tracking:secondary-clicked", {});
43
- }, be = (f) => {
44
- if (p && v.current) {
45
- const z = v.current.scrollHeight;
43
+ }, be = (g) => {
44
+ if (b && y.current) {
45
+ const z = y.current.scrollHeight;
46
46
  if (z > s) {
47
- v.current.style.height = "auto";
47
+ y.current.style.height = "auto";
48
48
  let T = z;
49
- f.length < 1 && (T = s), v.current.style.height = `${T}px`, T >= r ? v.current.style.overflowY = "scroll" : v.current.style.overflowY = "hidden";
49
+ g.length < 1 && (T = s), y.current.style.height = `${T}px`, T >= o ? y.current.style.overflowY = "scroll" : y.current.style.overflowY = "hidden";
50
50
  }
51
51
  }
52
- }, W = (f) => {
53
- be(f), o(f), f && f.length > 0 && l("user-typing", { textLength: f.length });
52
+ }, W = (g) => {
53
+ be(g), r(g), g && g.length > 0 && c("user-typing", { textLength: g.length });
54
54
  };
55
- return y ? null : /* @__PURE__ */ h(
55
+ return x ? null : /* @__PURE__ */ h(
56
56
  Ke,
57
57
  {
58
- grow: p,
58
+ grow: b,
59
59
  className: H("humany-conversation-input", t),
60
- scrollableCss: L,
61
- isTabbing: u,
60
+ scrollableCss: k,
61
+ isTabbing: m,
62
62
  children: [
63
63
  $ && /* @__PURE__ */ n(
64
- Be,
64
+ Re,
65
65
  {
66
66
  className: "humany-secondary-button",
67
- disabled: c,
67
+ disabled: l,
68
68
  onClick: pe,
69
69
  title: $.label,
70
70
  "aria-label": $.label,
71
71
  children: /* @__PURE__ */ n(
72
- k,
72
+ w,
73
73
  {
74
74
  size: 24,
75
75
  symbol: { type: "Svg", content: $.icon || "browse" }
@@ -77,28 +77,28 @@ const Oe = ({ className: t }) => {
77
77
  )
78
78
  }
79
79
  ),
80
- p ? /* @__PURE__ */ n(
81
- Ee,
80
+ b ? /* @__PURE__ */ n(
81
+ Be,
82
82
  {
83
83
  value: e,
84
84
  onChange: W,
85
85
  onEnter: P,
86
- disabled: c,
87
- "aria-label": m,
88
- placeholder: m,
86
+ disabled: l,
87
+ "aria-label": f,
88
+ placeholder: f,
89
89
  type: "textarea",
90
90
  rows: 1,
91
- ref: v
91
+ ref: y
92
92
  }
93
93
  ) : /* @__PURE__ */ n(
94
- Re,
94
+ Ee,
95
95
  {
96
96
  value: e,
97
97
  onChange: W,
98
98
  onEnter: P,
99
- disabled: c,
100
- "aria-label": m,
101
- placeholder: m
99
+ disabled: l,
100
+ "aria-label": f,
101
+ placeholder: f
102
102
  }
103
103
  ),
104
104
  /* @__PURE__ */ n(
@@ -107,8 +107,8 @@ const Oe = ({ className: t }) => {
107
107
  className: "humany-send-button",
108
108
  disabled: !1,
109
109
  onClick: P,
110
- title: g,
111
- "aria-label": g,
110
+ title: u,
111
+ "aria-label": u,
112
112
  children: /* @__PURE__ */ n(
113
113
  De,
114
114
  {
@@ -122,7 +122,7 @@ const Oe = ({ className: t }) => {
122
122
  ]
123
123
  }
124
124
  );
125
- }, Ee = i(se)`
125
+ }, Be = i(se)`
126
126
  resize: none;
127
127
  flex: 1;
128
128
  flex-shrink: 1;
@@ -143,10 +143,10 @@ const Oe = ({ className: t }) => {
143
143
  transition: height 200ms linear;
144
144
  outline: none;
145
145
  &:focus-visible {
146
- ${b};
146
+ ${p};
147
147
  outline-offset: 12px;
148
148
  }
149
- `, Re = i(se)`
149
+ `, Ee = i(se)`
150
150
  flex: 1;
151
151
  border: none;
152
152
  background-color: transparent;
@@ -182,19 +182,19 @@ const Oe = ({ className: t }) => {
182
182
  border: none;
183
183
  color: #a6a6a6;
184
184
  &:focus-visible {
185
- ${b};
185
+ ${p};
186
186
  }
187
- `, Be = i(he)`
187
+ `, Re = i(he)`
188
188
  border-right: ${(t) => t.theme.border};
189
189
  margin: ${(t) => {
190
190
  var e;
191
191
  return (e = t.theme.sizes) == null ? void 0 : e.normal;
192
192
  }} 0;
193
193
  `, Ke = i.div`
194
- ${(t) => t.grow ? x`
194
+ ${(t) => t.grow ? v`
195
195
  min-height: 50px;
196
196
  max-height: 150px;
197
- ` : x`
197
+ ` : v`
198
198
  height: 50px;
199
199
  `}
200
200
  flex: 0 0 auto;
@@ -205,7 +205,7 @@ const Oe = ({ className: t }) => {
205
205
  return (e = t.theme.colors) == null ? void 0 : e.accent;
206
206
  }};
207
207
  border-top: ${(t) => t.theme.inputBorder};
208
- ${(t) => t["data-has-focus"] && t.isTabbing && b}
208
+ ${(t) => t["data-has-focus"] && t.isTabbing && p}
209
209
  textarea {
210
210
  ${(t) => !!t.scrollableCss && t.scrollableCss}
211
211
  }
@@ -213,7 +213,7 @@ const Oe = ({ className: t }) => {
213
213
  ({
214
214
  hasContent: t,
215
215
  ...e
216
- }) => /* @__PURE__ */ n(k, { ...e })
216
+ }) => /* @__PURE__ */ n(w, { ...e })
217
217
  )`
218
218
  line,
219
219
  path {
@@ -343,13 +343,13 @@ const Oe = ({ className: t }) => {
343
343
  ${(t) => t.fullWidth && "width: 100%;"}
344
344
  `, Ue = (t, e) => {
345
345
  var s, a;
346
- const o = x`
346
+ const r = v`
347
347
  background-color: ${(s = e.colors) == null ? void 0 : s.accent};
348
348
  color: ${(a = e.colors) == null ? void 0 : a.text};
349
349
  ${e.border && `border: ${e.border};`};
350
350
  `;
351
- return e.borderRadius ? x`
352
- ${o}
351
+ return e.borderRadius ? v`
352
+ ${r}
353
353
 
354
354
  border-top-right-radius: ${e.borderRadius};
355
355
  border-bottom-right-radius: ${e.borderRadius};
@@ -361,15 +361,15 @@ const Oe = ({ className: t }) => {
361
361
  ${t === "last" && `
362
362
  border-bottom-left-radius: ${e.borderRadius};
363
363
  `}
364
- ` : o;
364
+ ` : r;
365
365
  }, Ve = (t, e) => {
366
366
  var s, a;
367
- const o = x`
367
+ const r = v`
368
368
  background-color: ${(s = e.colors) == null ? void 0 : s.primary};
369
369
  color: ${(a = e.colors) == null ? void 0 : a.accent};
370
370
  `;
371
- return e.borderRadius ? x`
372
- ${o}
371
+ return e.borderRadius ? v`
372
+ ${r}
373
373
 
374
374
  border-top-left-radius: ${e.borderRadius};
375
375
  border-bottom-left-radius: ${e.borderRadius};
@@ -381,8 +381,8 @@ const Oe = ({ className: t }) => {
381
381
  ${t === "last" && `
382
382
  border-bottom-right-radius: ${e.borderRadius};
383
383
  `}
384
- ` : o;
385
- }, E = i.div`
384
+ ` : r;
385
+ }, B = i.div`
386
386
  margin-bottom: ${(t) => {
387
387
  var e;
388
388
  return (e = t.theme.sizes) == null ? void 0 : e.normal;
@@ -390,17 +390,17 @@ const Oe = ({ className: t }) => {
390
390
  &:last-child {
391
391
  margin-bottom: 0;
392
392
  }
393
- `, C = (t) => {
394
- var e, o;
395
- return x`
393
+ `, L = (t) => {
394
+ var e, r;
395
+ return v`
396
396
  margin: ${(e = t.theme.sizes) == null ? void 0 : e.medium} 0;
397
- padding: 0 ${(o = t.theme.sizes) == null ? void 0 : o.medium};
397
+ padding: 0 ${(r = t.theme.sizes) == null ? void 0 : r.medium};
398
398
  `;
399
399
  }, _e = i(Te)`
400
400
  & button.humany-form-component-button {
401
401
  ${(t) => {
402
- var e, o, s, a;
403
- return ((e = t.theme.colors) == null ? void 0 : e.primary) && ((o = t.theme.colors) == null ? void 0 : o.accent) && xe({
402
+ var e, r, s, a;
403
+ return ((e = t.theme.colors) == null ? void 0 : e.primary) && ((r = t.theme.colors) == null ? void 0 : r.accent) && xe({
404
404
  active: !1,
405
405
  primaryColor: (s = t.theme.colors) == null ? void 0 : s.primary,
406
406
  secondaryColor: (a = t.theme.colors) == null ? void 0 : a.accent,
@@ -431,7 +431,7 @@ const Oe = ({ className: t }) => {
431
431
  &:focus {
432
432
  ${(t) => {
433
433
  var e;
434
- return ((e = t.theme.accessibility) == null ? void 0 : e.isTabbing) && b;
434
+ return ((e = t.theme.accessibility) == null ? void 0 : e.isTabbing) && p;
435
435
  }};
436
436
  }
437
437
  }
@@ -449,7 +449,7 @@ const Oe = ({ className: t }) => {
449
449
  }};
450
450
  }
451
451
  `, Xe = i.button`
452
- ${(t) => B(t)};
452
+ ${(t) => R(t)};
453
453
  display: block;
454
454
  background-color: ${(t) => {
455
455
  var e;
@@ -458,11 +458,11 @@ const Oe = ({ className: t }) => {
458
458
  width: 100%;
459
459
  color: #fff;
460
460
  &:focus-visible {
461
- ${b}
461
+ ${p}
462
462
  background-color: transparent;
463
463
  }
464
464
  `, ne = ee(
465
- ({ boxed: t, className: e, agentData: o }, s) => /* @__PURE__ */ n(F, { ref: s, children: /* @__PURE__ */ n(Y, { left: t, center: !t, children: /* @__PURE__ */ n(
465
+ ({ boxed: t, className: e, agentData: r }, s) => /* @__PURE__ */ n(F, { ref: s, children: /* @__PURE__ */ n(Y, { left: t, center: !t, children: /* @__PURE__ */ n(
466
466
  X,
467
467
  {
468
468
  padded: !!t,
@@ -489,27 +489,27 @@ const Oe = ({ className: t }) => {
489
489
  var e;
490
490
  return (e = t.theme.colors) == null ? void 0 : e.text;
491
491
  }};
492
- `, re = (t, e) => new Date(t).toLocaleTimeString(e || [], {
492
+ `, oe = (t, e) => new Date(t).toLocaleTimeString(e || [], {
493
493
  hour: "numeric",
494
494
  minute: "2-digit"
495
495
  }), M = ({
496
496
  className: t,
497
497
  name: e,
498
- timestamp: o,
498
+ timestamp: r,
499
499
  ariaHidden: s = !1
500
500
  }) => {
501
501
  const a = Ae(ge);
502
- if (!e && !o)
502
+ if (!e && !r)
503
503
  return null;
504
- let r = "";
505
- return e ? o ? r = `${e}: ${re(o, a)}` : r = e : o && (r = re(o, a)), /* @__PURE__ */ n(Ge, { "aria-hidden": s, children: r });
504
+ let o = "";
505
+ return e ? r ? o = `${e}: ${oe(r, a)}` : o = e : r && (o = oe(r, a)), /* @__PURE__ */ n(Ge, { "aria-hidden": s, children: o });
506
506
  }, fe = ({
507
507
  className: t,
508
508
  children: e,
509
- sender: o,
509
+ sender: r,
510
510
  timestamp: s
511
511
  }) => {
512
- const { avatar: a, name: r } = o, { avatarSize: d, avatarLabel: u = "Avatar" } = S();
512
+ const { avatar: a, name: o } = r, { avatarSize: d, avatarLabel: m = "Avatar" } = C();
513
513
  return /* @__PURE__ */ h(
514
514
  Je,
515
515
  {
@@ -521,13 +521,13 @@ const Oe = ({ className: t }) => {
521
521
  children: [
522
522
  a && /* @__PURE__ */ n(je, { className: "humany-agent-avatar", avatarSize: d, children: typeof a == "string" ? (
523
523
  // eslint-disable-next-line jsx-a11y/alt-text
524
- /* @__PURE__ */ n("img", { src: a, alt: u })
525
- ) : /* @__PURE__ */ n(k, { symbol: a }) }),
524
+ /* @__PURE__ */ n("img", { src: a, alt: m })
525
+ ) : /* @__PURE__ */ n(w, { symbol: a }) }),
526
526
  e,
527
527
  /* @__PURE__ */ n(
528
528
  M,
529
529
  {
530
- name: r,
530
+ name: o,
531
531
  timestamp: s,
532
532
  ariaHidden: !0
533
533
  }
@@ -539,13 +539,13 @@ const Oe = ({ className: t }) => {
539
539
  display: grid;
540
540
  margin-right: 10%;
541
541
  width: 90%;
542
- ${(t) => t.hasAvatar ? x`
542
+ ${(t) => t.hasAvatar ? v`
543
543
  grid-template-columns: auto 1fr;
544
544
  grid-template-rows: 1fr auto;
545
545
  grid-template-areas:
546
546
  'avatar content'
547
547
  '. info';
548
- ` : x`
548
+ ` : v`
549
549
  grid-template-columns: 1fr;
550
550
  grid-template-rows: 1fr auto;
551
551
  grid-template-areas:
@@ -553,10 +553,10 @@ const Oe = ({ className: t }) => {
553
553
  'info';
554
554
  `};
555
555
  `, Qe = ee(
556
- ({ className: t, children: e, timestamp: o, discrete: s, fullWidth: a }, r) => /* @__PURE__ */ n(
556
+ ({ className: t, children: e, timestamp: r, discrete: s, fullWidth: a }, o) => /* @__PURE__ */ n(
557
557
  Ze,
558
558
  {
559
- ref: r,
559
+ ref: o,
560
560
  className: H(
561
561
  t,
562
562
  "humany-conversation-system-message"
@@ -564,10 +564,10 @@ const Oe = ({ className: t }) => {
564
564
  fullWidth: a,
565
565
  children: s ? /* @__PURE__ */ h(et, { className: "humany-conversation-discrete-message", children: [
566
566
  e,
567
- /* @__PURE__ */ n(M, { timestamp: o })
567
+ /* @__PURE__ */ n(M, { timestamp: r })
568
568
  ] }) : /* @__PURE__ */ h(N, { children: [
569
569
  e,
570
- /* @__PURE__ */ n(M, { timestamp: o })
570
+ /* @__PURE__ */ n(M, { timestamp: r })
571
571
  ] })
572
572
  }
573
573
  )
@@ -592,8 +592,8 @@ const Oe = ({ className: t }) => {
592
592
  > p {
593
593
  margin: 0;
594
594
  }
595
- `, tt = ({ className: t, children: e, timestamp: o }) => {
596
- const { userLabel: s = "" } = S();
595
+ `, tt = ({ className: t, children: e, timestamp: r }) => {
596
+ const { userLabel: s = "" } = C();
597
597
  return /* @__PURE__ */ h(
598
598
  nt,
599
599
  {
@@ -607,7 +607,7 @@ const Oe = ({ className: t }) => {
607
607
  M,
608
608
  {
609
609
  name: s,
610
- timestamp: o,
610
+ timestamp: r,
611
611
  ariaHidden: !0
612
612
  }
613
613
  )
@@ -623,47 +623,47 @@ const Oe = ({ className: t }) => {
623
623
  `, te = (t) => Array.isArray(t) ? t : Object.keys(t).map((e) => ({
624
624
  label: t[e],
625
625
  actionKey: e
626
- })), rt = ({ header: t, actions: e, dispatch: o }) => {
626
+ })), ot = ({ header: t, actions: e, dispatch: r }) => {
627
627
  const s = I(), { events: a } = s.get("$widget");
628
628
  return /* @__PURE__ */ n(
629
- ot,
629
+ rt,
630
630
  {
631
631
  className: "humany-conversation-button-list",
632
632
  header: t,
633
633
  items: te(e),
634
- renderItem: (r) => {
635
- var u;
636
- const d = !!((u = r == null ? void 0 : r.data) != null && u.href);
634
+ renderItem: (o) => {
635
+ var m;
636
+ const d = !!((m = o == null ? void 0 : o.data) != null && m.href);
637
637
  return /* @__PURE__ */ n("li", { children: d ? /* @__PURE__ */ h(
638
638
  st,
639
639
  {
640
- href: r.data.href,
641
- target: r.data.target,
642
- "aria-label": r.label,
643
- title: r.label,
640
+ href: o.data.href,
641
+ target: o.data.target,
642
+ "aria-label": o.label,
643
+ title: o.label,
644
644
  children: [
645
- /* @__PURE__ */ n(k, { symbol: r.symbol }),
646
- r.label
645
+ /* @__PURE__ */ n(w, { symbol: o.symbol }),
646
+ o.label
647
647
  ]
648
648
  }
649
649
  ) : /* @__PURE__ */ h(
650
650
  at,
651
651
  {
652
652
  onClick: () => {
653
- o("action", r), a.dispatch("tracking:button-list-item-clicked", r);
653
+ r("action", o), a.dispatch("tracking:button-list-item-clicked", o);
654
654
  },
655
- "aria-label": r.label,
656
- title: r.label,
655
+ "aria-label": o.label,
656
+ title: o.label,
657
657
  children: [
658
- /* @__PURE__ */ n(k, { symbol: r.symbol }),
659
- r.label
658
+ /* @__PURE__ */ n(w, { symbol: o.symbol }),
659
+ o.label
660
660
  ]
661
661
  }
662
- ) }, r.actionKey);
662
+ ) }, o.actionKey);
663
663
  }
664
664
  }
665
665
  );
666
- }, ot = i(K)`
666
+ }, rt = i(K)`
667
667
  ${D}
668
668
  > ul {
669
669
  display: flex;
@@ -676,9 +676,9 @@ const Oe = ({ className: t }) => {
676
676
  margin: 0;
677
677
  }
678
678
  }
679
- ${C}
679
+ ${L}
680
680
  `, st = i(ke)`
681
- ${B};
681
+ ${R};
682
682
 
683
683
  display: block;
684
684
  padding: ${(t) => {
@@ -694,7 +694,7 @@ const Oe = ({ className: t }) => {
694
694
  overflow: hidden;
695
695
  text-overflow: ellipsis;
696
696
  &:focus-visible {
697
- ${b}
697
+ ${p}
698
698
  background-color: transparent;
699
699
  }
700
700
 
@@ -706,7 +706,7 @@ const Oe = ({ className: t }) => {
706
706
  }};
707
707
  }
708
708
  `, at = i(A)`
709
- ${B};
709
+ ${R};
710
710
 
711
711
  display: block;
712
712
  padding: ${(t) => {
@@ -722,7 +722,7 @@ const Oe = ({ className: t }) => {
722
722
  overflow: hidden;
723
723
  text-overflow: ellipsis;
724
724
  &:focus-visible {
725
- ${b}
725
+ ${p}
726
726
  background-color: transparent;
727
727
  }
728
728
 
@@ -734,23 +734,23 @@ const Oe = ({ className: t }) => {
734
734
  }};
735
735
  }
736
736
  `, it = ({ type: t, content: e = {} }) => {
737
- const o = we(t);
738
- return !o || !t ? null : /* @__PURE__ */ n(Ie, { fallback: null, children: /* @__PURE__ */ n(o, { ...e }) });
737
+ const r = we(t);
738
+ return !r || !t ? null : /* @__PURE__ */ n(Ie, { fallback: null, children: /* @__PURE__ */ n(r, { ...e }) });
739
739
  }, lt = ({ body: t }) => /* @__PURE__ */ n(ct, { className: "humany-html", html: t }), ct = i(Q)`
740
740
  ${Se}
741
741
  color: inherit;
742
742
  white-space: normal;
743
- ${C}
743
+ ${L}
744
744
  a {
745
745
  color: ${(t) => t.theme.colors.link};
746
746
  &:focus-visible {
747
- ${b};
747
+ ${p};
748
748
  }
749
749
  }
750
750
  p {
751
751
  word-break: auto-phrase;
752
752
  }
753
- `, dt = ({ header: t, actions: e, dispatch: o }) => /* @__PURE__ */ n(
753
+ `, dt = ({ header: t, actions: e, dispatch: r }) => /* @__PURE__ */ n(
754
754
  mt,
755
755
  {
756
756
  className: "humany-conversation-item-list",
@@ -760,7 +760,7 @@ const Oe = ({ className: t }) => {
760
760
  var a;
761
761
  return /* @__PURE__ */ n("li", { children: /* @__PURE__ */ h(ut, { children: [
762
762
  ((a = s.symbol) == null ? void 0 : a.content) && /* @__PURE__ */ n("div", { className: "item-icon", children: /* @__PURE__ */ n(
763
- k,
763
+ w,
764
764
  {
765
765
  size: 22,
766
766
  symbol: {
@@ -774,7 +774,7 @@ const Oe = ({ className: t }) => {
774
774
  A,
775
775
  {
776
776
  onClick: () => {
777
- o("action", s);
777
+ r("action", s);
778
778
  },
779
779
  "aria-label": s.label,
780
780
  title: s.label,
@@ -790,7 +790,7 @@ const Oe = ({ className: t }) => {
790
790
  ${D}
791
791
 
792
792
  > .humany-paragraph {
793
- ${C}
793
+ ${L}
794
794
  margin-bottom: 0;
795
795
 
796
796
  h1 {
@@ -800,7 +800,7 @@ const Oe = ({ className: t }) => {
800
800
 
801
801
  ${(t) => Z(t)(
802
802
  "h1",
803
- x`
803
+ v`
804
804
  white-space: normal;
805
805
  `
806
806
  )}
@@ -830,7 +830,7 @@ const Oe = ({ className: t }) => {
830
830
  var e;
831
831
  return (e = t.theme.sizes) == null ? void 0 : e.medium;
832
832
  }};
833
- ${C}
833
+ ${L}
834
834
 
835
835
  .item-icon {
836
836
  }
@@ -863,7 +863,7 @@ const Oe = ({ className: t }) => {
863
863
  margin: 0;
864
864
 
865
865
  &:focus-visible {
866
- ${b}
866
+ ${p}
867
867
  span {
868
868
  color: ${(t) => {
869
869
  var e;
@@ -873,32 +873,32 @@ const Oe = ({ className: t }) => {
873
873
  }
874
874
  }
875
875
  }
876
- `, ht = ({ header: t, actions: e, dispatch: o }) => {
877
- const s = Ce(e), a = me(), r = ae(), d = I(), { events: u } = d.get("$widget");
876
+ `, ht = ({ header: t, actions: e, dispatch: r }) => {
877
+ const s = Ce(e), a = me(), o = ae(), d = I(), { events: m } = d.get("$widget");
878
878
  return j(() => {
879
879
  if (s && Array.isArray(e) && Array.isArray(s) && s.length < e.length && a.current) {
880
- const l = a.current.querySelectorAll(
880
+ const c = a.current.querySelectorAll(
881
881
  ".humany-conversation-link-list > ul > li"
882
- ), m = l[s.length];
883
- if (l.length === e.length && s.length) {
884
- const y = l[s.length - 1];
885
- if (y) {
886
- const c = y.querySelector(
882
+ ), f = c[s.length];
883
+ if (c.length === e.length && s.length) {
884
+ const x = c[s.length - 1];
885
+ if (x) {
886
+ const l = x.querySelector(
887
887
  ".humany-button"
888
888
  );
889
- c && c.focus();
889
+ l && l.focus();
890
890
  }
891
891
  } else
892
- m && new MutationObserver((c, g) => {
893
- c.forEach((p) => {
894
- if (p.addedNodes) {
892
+ f && new MutationObserver((l, u) => {
893
+ l.forEach((b) => {
894
+ if (b.addedNodes) {
895
895
  const $ = Array.from(
896
- p.addedNodes
897
- ).find((L) => L.tagName === "BUTTON");
898
- $ && Ne(a.current, document.activeElement) && (r && $.focus(), g.disconnect());
896
+ b.addedNodes
897
+ ).find((k) => k.tagName === "BUTTON");
898
+ $ && Ne(a.current, document.activeElement) && (o && $.focus(), u.disconnect());
899
899
  }
900
900
  });
901
- }).observe(m, {
901
+ }).observe(f, {
902
902
  attributes: !1,
903
903
  characterData: !1,
904
904
  childList: !0,
@@ -914,19 +914,19 @@ const Oe = ({ className: t }) => {
914
914
  className: "humany-conversation-link-list",
915
915
  header: t,
916
916
  items: te(e),
917
- renderItem: (l) => /* @__PURE__ */ n("li", { children: /* @__PURE__ */ h(
917
+ renderItem: (c) => /* @__PURE__ */ n("li", { children: /* @__PURE__ */ h(
918
918
  ft,
919
919
  {
920
- help: l.actionKey === "help",
920
+ help: c.actionKey === "help",
921
921
  onClick: () => {
922
- o("action", l), u.dispatch("tracking:link-list-item-clicked", l);
922
+ r("action", c), m.dispatch("tracking:link-list-item-clicked", c);
923
923
  },
924
- "aria-label": l.label,
925
- title: l.label,
924
+ "aria-label": c.label,
925
+ title: c.label,
926
926
  children: [
927
- l.label,
928
- l.actionKey === "help" && /* @__PURE__ */ n(
929
- k,
927
+ c.label,
928
+ c.actionKey === "help" && /* @__PURE__ */ n(
929
+ w,
930
930
  {
931
931
  size: 14,
932
932
  symbol: {
@@ -937,16 +937,16 @@ const Oe = ({ className: t }) => {
937
937
  )
938
938
  ]
939
939
  }
940
- ) }, l.actionKey)
940
+ ) }, c.actionKey)
941
941
  }
942
942
  );
943
943
  }, gt = i(K)`
944
944
  ${D}
945
- ${C}
945
+ ${L}
946
946
 
947
947
  ${(t) => Z(t)(
948
948
  "h1",
949
- x`
949
+ v`
950
950
  white-space: normal;
951
951
  `
952
952
  )}
@@ -975,20 +975,20 @@ const Oe = ({ className: t }) => {
975
975
  overflow: hidden;
976
976
 
977
977
  ${(t) => {
978
- var e, o;
979
- return t.help && x`
978
+ var e, r;
979
+ return t.help && v`
980
980
  color: ${(e = t.theme.colors) == null ? void 0 : e.text};
981
981
  text-decoration: underline;
982
982
 
983
983
  i,
984
984
  svg {
985
- margin-left: ${(o = t.theme.sizes) == null ? void 0 : o.small};
985
+ margin-left: ${(r = t.theme.sizes) == null ? void 0 : r.small};
986
986
  }
987
987
  `;
988
988
  }}
989
989
 
990
990
  &:focus-visible {
991
- ${b}
991
+ ${p}
992
992
  span {
993
993
  color: ${(t) => {
994
994
  var e;
@@ -1001,11 +1001,11 @@ const Oe = ({ className: t }) => {
1001
1001
  ${(t) => t.theme.border && `border-bottom: ${t.theme.border};`}
1002
1002
  width: 100%;
1003
1003
  `, bt = ({ text: t }) => /* @__PURE__ */ n($t, { className: "humany-conversation-text", variant: "span", children: t }), $t = i(J)`
1004
- ${C}
1004
+ ${L}
1005
1005
  `, vt = ({
1006
1006
  header: t = "Video call",
1007
1007
  acceptLabel: e = "Accept",
1008
- declineLabel: o = "Decline",
1008
+ declineLabel: r = "Decline",
1009
1009
  dispatch: s
1010
1010
  }) => {
1011
1011
  const a = He(() => [
@@ -1018,34 +1018,34 @@ const Oe = ({ className: t }) => {
1018
1018
  }
1019
1019
  },
1020
1020
  {
1021
- label: o,
1021
+ label: r,
1022
1022
  actionKey: "decline-video-call",
1023
1023
  symbol: {
1024
1024
  type: "Svg",
1025
1025
  content: "close"
1026
1026
  }
1027
1027
  }
1028
- ], [e, o]);
1028
+ ], [e, r]);
1029
1029
  return /* @__PURE__ */ n(
1030
1030
  xt,
1031
1031
  {
1032
1032
  className: "humany-conversation-video-request",
1033
1033
  header: t,
1034
1034
  items: a,
1035
- renderItem: (r) => {
1036
- const d = r.actionKey === "accept-video-call" ? "#70c48e" : "#da5c85";
1035
+ renderItem: (o) => {
1036
+ const d = o.actionKey === "accept-video-call" ? "#70c48e" : "#da5c85";
1037
1037
  return /* @__PURE__ */ n("li", { children: /* @__PURE__ */ n(
1038
1038
  kt,
1039
1039
  {
1040
1040
  onClick: () => {
1041
- s("action", r);
1041
+ s("action", o);
1042
1042
  },
1043
- "aria-label": r.label,
1044
- title: r.label,
1043
+ "aria-label": o.label,
1044
+ title: o.label,
1045
1045
  bgColor: d,
1046
- children: /* @__PURE__ */ n(k, { symbol: r.symbol, size: 25 })
1046
+ children: /* @__PURE__ */ n(w, { symbol: o.symbol, size: 25 })
1047
1047
  }
1048
- ) }, r.actionKey);
1048
+ ) }, o.actionKey);
1049
1049
  }
1050
1050
  }
1051
1051
  );
@@ -1062,9 +1062,9 @@ const Oe = ({ className: t }) => {
1062
1062
  margin: 0;
1063
1063
  }
1064
1064
  }
1065
- ${(t) => C(t)}
1065
+ ${(t) => L(t)}
1066
1066
  `, kt = i(A)`
1067
- ${B};
1067
+ ${R};
1068
1068
 
1069
1069
  background-color: ${(t) => t.bgColor};
1070
1070
  display: flex;
@@ -1076,7 +1076,7 @@ const Oe = ({ className: t }) => {
1076
1076
  border-radius: 100%;
1077
1077
 
1078
1078
  &:focus-visible {
1079
- ${b}
1079
+ ${p}
1080
1080
  background-color: transparent;
1081
1081
 
1082
1082
  i,
@@ -1103,43 +1103,43 @@ const Oe = ({ className: t }) => {
1103
1103
  stroke: #fff;
1104
1104
  }
1105
1105
  }
1106
- `, R = ([t, e]) => ({ type: t, content: e }), wt = ({ items: t, dispatch: e }) => {
1107
- const o = t.map(R).filter((r) => r.type.includes("ace-knowledge")).map((r) => "humany-" + r.type.toString());
1108
- return !!t.map(R).filter((r) => {
1109
- const d = r == null ? void 0 : r.content, u = d == null ? void 0 : d.actions;
1110
- return !!(u != null && u.filter((l) => l.actionKey === "contact").length);
1111
- }).length && o.push("humany-secondary-action-list"), !!t.map(R).filter((r) => {
1112
- var u;
1113
- const d = r == null ? void 0 : r.content;
1114
- return !!((u = d == null ? void 0 : d.tags) != null && u.includes("category"));
1115
- }).length && o.push("humany-category-list"), /* @__PURE__ */ n(
1106
+ `, E = ([t, e]) => ({ type: t, content: e }), wt = ({ items: t, dispatch: e }) => {
1107
+ const r = t.map(E).filter((o) => o.type.includes("ace-knowledge")).map((o) => "humany-" + o.type.toString());
1108
+ return !!t.map(E).filter((o) => {
1109
+ const d = o == null ? void 0 : o.content, m = d == null ? void 0 : d.actions;
1110
+ return !!(m != null && m.filter((c) => c.actionKey === "contact").length);
1111
+ }).length && r.push("humany-secondary-action-list"), !!t.map(E).filter((o) => {
1112
+ var m;
1113
+ const d = o == null ? void 0 : o.content;
1114
+ return !!((m = d == null ? void 0 : d.tags) != null && m.includes("category"));
1115
+ }).length && r.push("humany-category-list"), /* @__PURE__ */ n(
1116
1116
  St,
1117
1117
  {
1118
1118
  role: "none",
1119
1119
  className: H(
1120
1120
  "humany-message-list",
1121
- o.join(" ")
1121
+ r.join(" ")
1122
1122
  ),
1123
- items: t.map(R),
1123
+ items: t.map(E),
1124
1124
  renderLi: !0,
1125
- renderItem: (r) => {
1126
- switch (r.type) {
1127
- case w.Text:
1128
- return /* @__PURE__ */ n(bt, { text: r.content });
1129
- case w.HTML:
1130
- return /* @__PURE__ */ n(lt, { ...r.content });
1131
- case w.Separator:
1132
- return /* @__PURE__ */ n(yt, { ...r.content });
1133
- case w.ItemList:
1134
- return /* @__PURE__ */ n(dt, { ...r.content, dispatch: e });
1135
- case w.LinkList:
1136
- return /* @__PURE__ */ n(ht, { ...r.content, dispatch: e });
1137
- case w.ButtonList:
1138
- return /* @__PURE__ */ n(rt, { ...r.content, dispatch: e });
1139
- case w.VideoRequest:
1140
- return /* @__PURE__ */ n(vt, { ...r.content, dispatch: e });
1125
+ renderItem: (o) => {
1126
+ switch (o.type) {
1127
+ case S.Text:
1128
+ return /* @__PURE__ */ n(bt, { text: o.content });
1129
+ case S.HTML:
1130
+ return /* @__PURE__ */ n(lt, { ...o.content });
1131
+ case S.Separator:
1132
+ return /* @__PURE__ */ n(yt, { ...o.content });
1133
+ case S.ItemList:
1134
+ return /* @__PURE__ */ n(dt, { ...o.content, dispatch: e });
1135
+ case S.LinkList:
1136
+ return /* @__PURE__ */ n(ht, { ...o.content, dispatch: e });
1137
+ case S.ButtonList:
1138
+ return /* @__PURE__ */ n(ot, { ...o.content, dispatch: e });
1139
+ case S.VideoRequest:
1140
+ return /* @__PURE__ */ n(vt, { ...o.content, dispatch: e });
1141
1141
  default:
1142
- return /* @__PURE__ */ n(it, { type: r.type, content: r.content });
1142
+ return /* @__PURE__ */ n(it, { type: o.type, content: o.content });
1143
1143
  }
1144
1144
  }
1145
1145
  }
@@ -1151,80 +1151,80 @@ const Oe = ({ className: t }) => {
1151
1151
  margin: 0;
1152
1152
  }
1153
1153
  `, Ct = ee(
1154
- ({ className: t, timestamp: e, sender: o, type: s, content: a }, r) => {
1154
+ ({ className: t, timestamp: e, sender: r, type: s, content: a }, o) => {
1155
1155
  const d = ue(
1156
- (c) => {
1157
- let g = "first";
1158
- return a.length > 1 && (g = c === 0 ? "first" : c + 1 === a.length ? "last" : "middle"), g;
1156
+ (l) => {
1157
+ let u = "first";
1158
+ return a.length > 1 && (u = l === 0 ? "first" : l + 1 === a.length ? "last" : "middle"), u;
1159
1159
  },
1160
1160
  [a]
1161
- ), { userLabel: u = "" } = S(), l = () => /* @__PURE__ */ n(N, { children: a.map((c) => {
1162
- const { key: g, body: p, title: $, form: L, actions: v } = c, O = !!p && !$ && !L && !v;
1161
+ ), { userLabel: m = "" } = C(), c = () => /* @__PURE__ */ n(N, { children: a.map((l) => {
1162
+ const { key: u, body: b, title: $, form: k, actions: y } = l, O = !!b && !$ && !k && !y;
1163
1163
  return /* @__PURE__ */ n(
1164
1164
  Qe,
1165
1165
  {
1166
1166
  className: t,
1167
1167
  discrete: O,
1168
- ref: r,
1168
+ ref: o,
1169
1169
  timestamp: e,
1170
- fullWidth: !!L || !!v,
1171
- children: O && p ? /* @__PURE__ */ n(Q, { html: p }) : /* @__PURE__ */ n(V, { isSystem: !0, content: c })
1170
+ fullWidth: !!k || !!y,
1171
+ children: O && b ? /* @__PURE__ */ n(Q, { html: b }) : /* @__PURE__ */ n(V, { isSystem: !0, content: l })
1172
1172
  },
1173
- g
1173
+ u
1174
1174
  );
1175
- }) }), m = () => /* @__PURE__ */ h(N, { children: [
1176
- /* @__PURE__ */ n(oe, { className: "humany-sr-only", children: /* @__PURE__ */ n(M, { name: o == null ? void 0 : o.name, timestamp: e }) }),
1175
+ }) }), f = () => /* @__PURE__ */ h(N, { children: [
1176
+ /* @__PURE__ */ n(re, { className: "humany-sr-only", children: /* @__PURE__ */ n(M, { name: r == null ? void 0 : r.name, timestamp: e }) }),
1177
1177
  /* @__PURE__ */ n(
1178
1178
  fe,
1179
1179
  {
1180
- sender: o,
1180
+ sender: r,
1181
1181
  timestamp: e,
1182
1182
  className: t,
1183
- children: /* @__PURE__ */ n(F, { className: "humany-message-content-bundle", children: a.map((c, g) => /* @__PURE__ */ n(
1183
+ children: /* @__PURE__ */ n(F, { className: "humany-message-content-bundle", children: a.map((l, u) => /* @__PURE__ */ n(
1184
1184
  Y,
1185
1185
  {
1186
1186
  className: "humany-message-container",
1187
1187
  left: !0,
1188
- ref: r,
1188
+ ref: o,
1189
1189
  children: /* @__PURE__ */ n(
1190
1190
  V,
1191
1191
  {
1192
- content: c,
1193
- stacked: d(g)
1192
+ content: l,
1193
+ stacked: d(u)
1194
1194
  }
1195
1195
  )
1196
1196
  },
1197
- c.key
1197
+ l.key
1198
1198
  )) })
1199
1199
  }
1200
1200
  )
1201
- ] }), y = () => /* @__PURE__ */ h(N, { children: [
1202
- /* @__PURE__ */ n(oe, { className: "humany-sr-only", children: /* @__PURE__ */ n(M, { name: u, timestamp: e }) }),
1203
- /* @__PURE__ */ n(tt, { timestamp: e, className: t, children: /* @__PURE__ */ n(F, { className: "humany-message-content-bundle", children: a.map((c, g) => /* @__PURE__ */ n(
1201
+ ] }), x = () => /* @__PURE__ */ h(N, { children: [
1202
+ /* @__PURE__ */ n(re, { className: "humany-sr-only", children: /* @__PURE__ */ n(M, { name: m, timestamp: e }) }),
1203
+ /* @__PURE__ */ n(tt, { timestamp: e, className: t, children: /* @__PURE__ */ n(F, { className: "humany-message-content-bundle", children: a.map((l, u) => /* @__PURE__ */ n(
1204
1204
  Y,
1205
1205
  {
1206
1206
  className: "humany-message-container",
1207
1207
  right: !0,
1208
- ref: r,
1208
+ ref: o,
1209
1209
  children: /* @__PURE__ */ n(
1210
1210
  V,
1211
1211
  {
1212
1212
  isUser: !0,
1213
- content: c,
1214
- stacked: d(g)
1213
+ content: l,
1214
+ stacked: d(u)
1215
1215
  }
1216
1216
  )
1217
1217
  },
1218
- c.key
1218
+ l.key
1219
1219
  )) }) })
1220
1220
  ] });
1221
1221
  switch (s) {
1222
1222
  case U.System:
1223
- return l();
1223
+ return c();
1224
1224
  case U.Agent:
1225
- return m();
1225
+ return f();
1226
1226
  case U.User:
1227
- return y();
1227
+ return x();
1228
1228
  default:
1229
1229
  return null;
1230
1230
  }
@@ -1232,61 +1232,61 @@ const Oe = ({ className: t }) => {
1232
1232
  ), V = ({
1233
1233
  content: t,
1234
1234
  isUser: e,
1235
- isSystem: o,
1235
+ isSystem: r,
1236
1236
  stacked: s
1237
1237
  }) => {
1238
- const a = G(), { title: r, body: d, actions: u, form: l, items: m } = t;
1239
- return m ? /* @__PURE__ */ n(
1238
+ const a = G(), { title: o, body: d, actions: m, form: c, items: f } = t;
1239
+ return f ? /* @__PURE__ */ n(
1240
1240
  X,
1241
1241
  {
1242
1242
  className: "humany-message-content",
1243
1243
  user: !!e,
1244
1244
  stacked: s,
1245
- children: /* @__PURE__ */ n(wt, { items: m, dispatch: a })
1245
+ children: /* @__PURE__ */ n(wt, { items: f, dispatch: a })
1246
1246
  }
1247
1247
  ) : /* @__PURE__ */ h(
1248
1248
  X,
1249
1249
  {
1250
1250
  className: "humany-message-content",
1251
- padded: !o,
1251
+ padded: !r,
1252
1252
  user: !!e,
1253
1253
  stacked: s,
1254
- fullWidth: !!l || !!u,
1254
+ fullWidth: !!c || !!m,
1255
1255
  children: [
1256
- r && /* @__PURE__ */ n(E, { children: /* @__PURE__ */ n(qe, { variant: "h2", children: r }) }),
1257
- d && /* @__PURE__ */ n(E, { children: /* @__PURE__ */ n(Fe, { html: d }) }),
1258
- l && /* @__PURE__ */ n(E, { children: /* @__PURE__ */ n(
1256
+ o && /* @__PURE__ */ n(B, { children: /* @__PURE__ */ n(qe, { variant: "h2", children: o }) }),
1257
+ d && /* @__PURE__ */ n(B, { children: /* @__PURE__ */ n(Fe, { html: d }) }),
1258
+ c && /* @__PURE__ */ n(B, { children: /* @__PURE__ */ n(
1259
1259
  _e,
1260
1260
  {
1261
- ...l,
1262
- onChange: (c, g) => {
1261
+ ...c,
1262
+ onChange: (l, u) => {
1263
1263
  a("form", {
1264
- data: g,
1265
- formKey: l.schema.id,
1266
- actionKey: c
1264
+ data: u,
1265
+ formKey: c.schema.id,
1266
+ actionKey: l
1267
1267
  });
1268
1268
  }
1269
1269
  }
1270
1270
  ) }),
1271
- u && /* @__PURE__ */ n(E, { children: /* @__PURE__ */ n(
1271
+ m && /* @__PURE__ */ n(B, { children: /* @__PURE__ */ n(
1272
1272
  Ye,
1273
1273
  {
1274
- items: Object.keys(u).map((c) => ({ label: u[c], actionKey: c })),
1275
- renderItem: (c) => /* @__PURE__ */ n("li", { children: /* @__PURE__ */ n(
1274
+ items: Object.keys(m).map((l) => ({ label: m[l], actionKey: l })),
1275
+ renderItem: (l) => /* @__PURE__ */ n("li", { children: /* @__PURE__ */ n(
1276
1276
  Xe,
1277
1277
  {
1278
1278
  onClick: () => {
1279
- a("action", c.actionKey);
1279
+ a("action", l.actionKey);
1280
1280
  },
1281
- children: c.label
1281
+ children: l.label
1282
1282
  }
1283
- ) }, c.actionKey)
1283
+ ) }, l.actionKey)
1284
1284
  }
1285
1285
  ) })
1286
1286
  ]
1287
1287
  }
1288
1288
  );
1289
- }, oe = i.div`
1289
+ }, re = i.div`
1290
1290
  position: absolute !important;
1291
1291
  height: 1px;
1292
1292
  width: 1px;
@@ -1296,7 +1296,7 @@ const Oe = ({ className: t }) => {
1296
1296
  left: -10000000px;
1297
1297
  top: auto;
1298
1298
  `, Lt = () => {
1299
- const { skipToLatestMessageLabel: t = "Skip to latest message" } = S(), e = I(), o = () => {
1299
+ const { skipToLatestMessageLabel: t = "Skip to latest message" } = C(), e = I(), r = () => {
1300
1300
  const s = e.get("widgetDOMElement");
1301
1301
  if (s) {
1302
1302
  const a = s.querySelectorAll(
@@ -1310,9 +1310,9 @@ const Oe = ({ className: t }) => {
1310
1310
  {
1311
1311
  className: "humany-skip-to-latest-message",
1312
1312
  onKeyDown: (s) => {
1313
- (s.key === "Enter" || s.keyCode === 13) && o();
1313
+ (s.key === "Enter" || s.keyCode === 13) && r();
1314
1314
  },
1315
- onClick: o,
1315
+ onClick: r,
1316
1316
  children: t
1317
1317
  }
1318
1318
  );
@@ -1334,25 +1334,26 @@ const Oe = ({ className: t }) => {
1334
1334
  &:focus-visible {
1335
1335
  left: 50%;
1336
1336
  transform: translateX(-50%);
1337
- ${b};
1337
+ ${p};
1338
1338
  }
1339
1339
  `, ye = () => {
1340
- const t = I(), e = ue((m) => {
1341
- m && setTimeout(() => {
1342
- m.scrollIntoView({
1340
+ const t = I(), e = ue((l) => {
1341
+ l && setTimeout(() => {
1342
+ l.scrollIntoView({
1343
1343
  block: "start",
1344
1344
  behavior: "smooth"
1345
1345
  });
1346
1346
  }, 250);
1347
- }, []), [o, s] = ie(!0), {
1347
+ }, []), [r, s] = ie(!0), {
1348
1348
  messages: a,
1349
- loading: r,
1350
- typingActors: d = []
1351
- } = S(), u = () => d && d.length ? d.map((m, y) => /* @__PURE__ */ n(
1349
+ loading: o,
1350
+ typingActors: d = [],
1351
+ providers: m = []
1352
+ } = C(), c = () => d && d.length ? d.map((l, u) => /* @__PURE__ */ n(
1352
1353
  _,
1353
1354
  {
1354
- id: `typing_${m.name}`,
1355
- children: /* @__PURE__ */ n(fe, { timestamp: Date.now(), sender: m, children: /* @__PURE__ */ n(
1355
+ id: `typing_${l.name}`,
1356
+ children: /* @__PURE__ */ n(fe, { timestamp: Date.now(), sender: l, children: /* @__PURE__ */ n(
1356
1357
  ne,
1357
1358
  {
1358
1359
  boxed: !0,
@@ -1360,32 +1361,32 @@ const Oe = ({ className: t }) => {
1360
1361
  }
1361
1362
  ) })
1362
1363
  },
1363
- `typing_${m.name}`
1364
- )) : null, l = de.useRef((a == null ? void 0 : a.length) || 0);
1364
+ `typing_${l.name}`
1365
+ )) : null, f = de.useRef((a == null ? void 0 : a.length) || 0), x = m.includes("ace-knowledge-bot");
1365
1366
  return j(() => {
1366
- const m = t.get("widgetDOMElement");
1367
- if (m && m.id === "humany_bot") {
1368
- const y = m.querySelectorAll(
1367
+ const l = t.get("widgetDOMElement");
1368
+ if (l && x) {
1369
+ const u = l.querySelectorAll(
1369
1370
  ".humany-conversation-entry"
1370
1371
  );
1371
- y.length && y.length > l.current && (l.current = y.length, y[y.length - 1].focus());
1372
+ u.length && u.length > f.current && (f.current = u.length, u[u.length - 1].focus());
1372
1373
  }
1373
1374
  }), /* @__PURE__ */ h(N, { children: [
1374
- /* @__PURE__ */ h(Nt, { tabIndex: 0, scrollableCss: o, ref: s, children: [
1375
- a && a.length ? a.map((m, y) => {
1376
- const { type: c, timestamp: g, sender: p, content: $ } = m;
1375
+ /* @__PURE__ */ h(Nt, { tabIndex: 0, scrollableCss: r, ref: s, children: [
1376
+ a && a.length ? a.map((l, u) => {
1377
+ const { type: b, timestamp: $, sender: k, content: y } = l;
1377
1378
  return /* @__PURE__ */ n(
1378
1379
  _,
1379
1380
  {
1380
1381
  className: "humany-conversation-entry",
1381
1382
  tabIndex: -1,
1382
- children: /* @__PURE__ */ n(Ct, { ...m, ref: e })
1383
+ children: /* @__PURE__ */ n(Ct, { ...l, ref: e })
1383
1384
  },
1384
- `${c}_${p == null ? void 0 : p.name}_${g}_${$[0].key}`
1385
+ `${b}_${k == null ? void 0 : k.name}_${$}_${y[0].key}`
1385
1386
  );
1386
1387
  }) : null,
1387
- u(),
1388
- r && /* @__PURE__ */ n(_, { children: /* @__PURE__ */ n(ne, { ref: e }) })
1388
+ c(),
1389
+ o && /* @__PURE__ */ n(_, { children: /* @__PURE__ */ n(ne, { ref: e }) })
1389
1390
  ] }),
1390
1391
  /* @__PURE__ */ n(Oe, {}),
1391
1392
  /* @__PURE__ */ n(Lt, {})
@@ -1401,7 +1402,7 @@ const Oe = ({ className: t }) => {
1401
1402
  }};
1402
1403
  ${(t) => !!t.scrollableCss && t.scrollableCss};
1403
1404
  &:focus-visible {
1404
- ${(t) => b(t)};
1405
+ ${(t) => p(t)};
1405
1406
  }
1406
1407
  `, _ = i.div`
1407
1408
  margin: 0;
@@ -1437,7 +1438,7 @@ const Oe = ({ className: t }) => {
1437
1438
  }
1438
1439
 
1439
1440
  &:focus-visible {
1440
- ${b}
1441
+ ${p}
1441
1442
  border-radius: ${(t) => {
1442
1443
  var e;
1443
1444
  return (e = t.theme.sizes) == null ? void 0 : e.small;
@@ -1445,7 +1446,7 @@ const Oe = ({ className: t }) => {
1445
1446
  }
1446
1447
  ${(t) => Z(t)(
1447
1448
  "h1",
1448
- x`
1449
+ v`
1449
1450
  font-weight: normal;
1450
1451
  `
1451
1452
  )}
@@ -1464,7 +1465,7 @@ const Oe = ({ className: t }) => {
1464
1465
  }, At = ({
1465
1466
  dispatch: t,
1466
1467
  header: e,
1467
- buttonLabel: o
1468
+ buttonLabel: r
1468
1469
  }) => /* @__PURE__ */ h(
1469
1470
  It,
1470
1471
  {
@@ -1476,11 +1477,11 @@ const Oe = ({ className: t }) => {
1476
1477
  Ot,
1477
1478
  {
1478
1479
  className: "humany-conversation-outlet-head-button",
1479
- "aria-label": o,
1480
- title: o,
1480
+ "aria-label": r,
1481
+ title: r,
1481
1482
  onClick: () => t("hide-overlay-conversation"),
1482
1483
  children: /* @__PURE__ */ n(
1483
- k,
1484
+ w,
1484
1485
  {
1485
1486
  symbol: {
1486
1487
  type: "Svg",
@@ -1556,7 +1557,7 @@ const Oe = ({ className: t }) => {
1556
1557
  ${(t) => t.theme.borderRadius && `border-radius: ${t.theme.borderRadius};`}
1557
1558
 
1558
1559
  &:focus-visible {
1559
- ${b};
1560
+ ${p};
1560
1561
  }
1561
1562
 
1562
1563
  svg line {
@@ -1567,18 +1568,18 @@ const Oe = ({ className: t }) => {
1567
1568
  }
1568
1569
  `, Ft = ({ className: t, ...e }) => {
1569
1570
  const {
1570
- overlay: o,
1571
+ overlay: r,
1571
1572
  overlayConversationHeader: s,
1572
1573
  overlayConversationCloseLabel: a,
1573
- conversationControllerId: r
1574
- } = S(), d = G(), l = I().get("$settings");
1574
+ conversationControllerId: o
1575
+ } = C(), d = G(), c = I().get("$settings");
1575
1576
  return /* @__PURE__ */ n(
1576
1577
  ze.Provider,
1577
1578
  {
1578
- value: r ? { id: r } : null,
1579
- children: /* @__PURE__ */ h(ge.Provider, { value: l == null ? void 0 : l.language, children: [
1579
+ value: o ? { id: o } : null,
1580
+ children: /* @__PURE__ */ h(ge.Provider, { value: c == null ? void 0 : c.language, children: [
1580
1581
  /* @__PURE__ */ n(
1581
- Et,
1582
+ Bt,
1582
1583
  {
1583
1584
  "aria-live": "polite",
1584
1585
  ...e,
@@ -1589,9 +1590,9 @@ const Oe = ({ className: t }) => {
1589
1590
  children: /* @__PURE__ */ n(ye, {})
1590
1591
  }
1591
1592
  ),
1592
- o && /* @__PURE__ */ h(N, { children: [
1593
+ r && /* @__PURE__ */ h(N, { children: [
1593
1594
  /* @__PURE__ */ n(Mt, { dispatch: d }),
1594
- o.conversation && /* @__PURE__ */ n(
1595
+ r.conversation && /* @__PURE__ */ n(
1595
1596
  At,
1596
1597
  {
1597
1598
  dispatch: d,
@@ -1603,7 +1604,7 @@ const Oe = ({ className: t }) => {
1603
1604
  ] })
1604
1605
  }
1605
1606
  );
1606
- }, Et = i.div`
1607
+ }, Bt = i.div`
1607
1608
  position: absolute;
1608
1609
  right: 0;
1609
1610
  left: 0;