@telia-ace/widget-conversation 1.0.29-next.7 → 1.0.29-next.9

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.
@@ -2,34 +2,35 @@ var Ee = Object.defineProperty, xe = Object.defineProperties;
2
2
  var we = Object.getOwnPropertyDescriptors;
3
3
  var A = Object.getOwnPropertySymbols;
4
4
  var ee = Object.prototype.hasOwnProperty, te = Object.prototype.propertyIsEnumerable;
5
- var Z = (t, e, r) => e in t ? Ee(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, g = (t, e) => {
6
- for (var r in e || (e = {}))
7
- ee.call(e, r) && Z(t, r, e[r]);
5
+ var Z = (e, t, r) => t in e ? Ee(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, g = (e, t) => {
6
+ for (var r in t || (t = {}))
7
+ ee.call(t, r) && Z(e, r, t[r]);
8
8
  if (A)
9
- for (var r of A(e))
10
- te.call(e, r) && Z(t, r, e[r]);
11
- return t;
12
- }, x = (t, e) => xe(t, we(e));
13
- var j = (t, e) => {
9
+ for (var r of A(t))
10
+ te.call(t, r) && Z(e, r, t[r]);
11
+ return e;
12
+ }, x = (e, t) => xe(e, we(t));
13
+ var j = (e, t) => {
14
14
  var r = {};
15
- for (var o in t)
16
- ee.call(t, o) && e.indexOf(o) < 0 && (r[o] = t[o]);
17
- if (t != null && A)
18
- for (var o of A(t))
19
- e.indexOf(o) < 0 && te.call(t, o) && (r[o] = t[o]);
15
+ for (var o in e)
16
+ ee.call(e, o) && t.indexOf(o) < 0 && (r[o] = e[o]);
17
+ if (e != null && A)
18
+ for (var o of A(e))
19
+ t.indexOf(o) < 0 && te.call(e, o) && (r[o] = e[o]);
20
20
  return r;
21
21
  };
22
+ import a from "@emotion/styled";
22
23
  import { Input as oe, Button as L, borderTabStyle as b, SymbolBadge as w, useIsTabbing as ke, useDispatch as V, useProperties as M, useScroll as ae, Typography as q, invertedHoverButton as Ce, Html as Y, List as le, buttonCss as G, ItemList as J, itemList as Q, useComponent as Se, genericHtml as ze, headingElement as se, list as Le, WidgetOverlayOutlet as ie, ConversationContext as Me } from "@telia-ace/widget-ui";
23
24
  import { appendClassNames as H } from "@telia-ace/widget-utilities";
24
25
  import n, { useState as R, useEffect as ce, forwardRef as X, Suspense as He, useMemo as Te, useCallback as me, useRef as Ie } from "react";
25
- import a, { css as f, keyframes as Ae } from "styled-components";
26
+ import { css as f, keyframes as Ae } from "@emotion/react";
26
27
  import { FormComponent as Re } from "@telia-ace/widget-forms";
27
28
  import { ConversationMessageListItemType as C, ConversationMessageType as D } from "./index.js";
28
29
  import "@telia-ace/widget-core";
29
30
  import "@telia-ace/widget-services";
30
31
  import "@telia-ace/widget-plugins";
31
- const Be = ({ className: t }) => {
32
- const [e, r] = R(""), [o, l] = R(!1), [s, u] = R(0), [c, h] = R(0), v = ke(), m = V(), {
32
+ const Be = ({ className: e }) => {
33
+ const [t, r] = R(""), [o, l] = R(!1), [s, u] = R(0), [c, h] = R(0), v = ke(), m = V(), {
33
34
  inputPlaceholder: i = "Type your message",
34
35
  inputHidden: $ = !1,
35
36
  inputDisabled: k = !1,
@@ -49,7 +50,7 @@ const Be = ({ className: t }) => {
49
50
  }
50
51
  }, [y.current]);
51
52
  const N = (d) => {
52
- !d.shiftKey || !E ? (d.preventDefault(), e && e.length > 0 && (m("user-submit", { text: e }), r(""), O(""))) : e.length < 1 && d.preventDefault();
53
+ !d.shiftKey || !E ? (d.preventDefault(), t && t.length > 0 && (m("user-submit", { text: t }), r(""), O(""))) : t.length < 1 && d.preventDefault();
53
54
  }, ye = (d) => {
54
55
  !p || (d.preventDefault(), m("action", g({
55
56
  actionKey: p.action
@@ -68,7 +69,7 @@ const Be = ({ className: t }) => {
68
69
  };
69
70
  return $ ? null : /* @__PURE__ */ n.createElement(Oe, {
70
71
  grow: E,
71
- className: H("humany-conversation-input", t),
72
+ className: H("humany-conversation-input", e),
72
73
  "data-has-focus": o,
73
74
  scrollableCss: pe,
74
75
  isTabbing: v
@@ -81,7 +82,7 @@ const Be = ({ className: t }) => {
81
82
  size: 24,
82
83
  symbol: { type: "Svg", content: p.icon || "browse" }
83
84
  })), E ? /* @__PURE__ */ n.createElement(de, {
84
- value: e,
85
+ value: t,
85
86
  onChange: O,
86
87
  onEnter: N,
87
88
  disabled: k,
@@ -92,7 +93,7 @@ const Be = ({ className: t }) => {
92
93
  rows: 1,
93
94
  ref: y
94
95
  }) : /* @__PURE__ */ n.createElement(Ke, {
95
- value: e,
96
+ value: t,
96
97
  onChange: O,
97
98
  onEnter: N,
98
99
  disabled: k,
@@ -107,7 +108,7 @@ const Be = ({ className: t }) => {
107
108
  }, /* @__PURE__ */ n.createElement(je, {
108
109
  size: 22,
109
110
  symbol: { type: "Svg", content: "send" },
110
- hasContent: e && e.length
111
+ hasContent: !!t && !!t.length
111
112
  })));
112
113
  }, de = a(oe)`
113
114
  resize: none;
@@ -118,13 +119,13 @@ const Be = ({ className: t }) => {
118
119
  line-height: 1.2em;
119
120
  height: 1.2em;
120
121
  padding: 0;
121
- margin: ${(t) => {
122
- var e;
123
- return (e = t.theme.sizes) == null ? void 0 : e.medium;
122
+ margin: ${(e) => {
123
+ var t;
124
+ return (t = e.theme.sizes) == null ? void 0 : t.medium;
124
125
  }};
125
- font-size: ${(t) => {
126
- var e;
127
- return (e = t.theme.fonts) == null ? void 0 : e.normal;
126
+ font-size: ${(e) => {
127
+ var t;
128
+ return (t = e.theme.fonts) == null ? void 0 : t.normal;
128
129
  }};
129
130
  border: none;
130
131
  transition: height 200ms linear;
@@ -134,24 +135,24 @@ const Be = ({ className: t }) => {
134
135
  border: none;
135
136
  background-color: transparent;
136
137
  font-weight: 300;
137
- font-size: ${(t) => {
138
- var e;
139
- return (e = t.theme.fonts) == null ? void 0 : e.normal;
138
+ font-size: ${(e) => {
139
+ var t;
140
+ return (t = e.theme.fonts) == null ? void 0 : t.normal;
140
141
  }};
141
142
  line-height: 1.2em;
142
143
  outline: none;
143
- padding: ${(t) => {
144
- var e;
145
- return (e = t.theme.sizes) == null ? void 0 : e.medium;
144
+ padding: ${(e) => {
145
+ var t;
146
+ return (t = e.theme.sizes) == null ? void 0 : t.medium;
146
147
  }};
147
- color: ${(t) => {
148
- var e;
149
- return (e = t.theme.colors) == null ? void 0 : e.text;
148
+ color: ${(e) => {
149
+ var t;
150
+ return (t = e.theme.colors) == null ? void 0 : t.text;
150
151
  }};
151
152
  &::placeholder {
152
- color: ${(t) => {
153
- var e;
154
- return (e = t.theme.colors) == null ? void 0 : e.textLight;
153
+ color: ${(e) => {
154
+ var t;
155
+ return (t = e.theme.colors) == null ? void 0 : t.textLight;
155
156
  }};
156
157
  font-style: italic;
157
158
  }
@@ -168,13 +169,13 @@ const Be = ({ className: t }) => {
168
169
  ${b};
169
170
  }
170
171
  `, Ne = a(ue)`
171
- border-right: ${(t) => t.theme.border};
172
- margin: ${(t) => {
173
- var e;
174
- return (e = t.theme.sizes) == null ? void 0 : e.normal;
172
+ border-right: ${(e) => e.theme.border};
173
+ margin: ${(e) => {
174
+ var t;
175
+ return (t = e.theme.sizes) == null ? void 0 : t.normal;
175
176
  }} 0;
176
177
  `, Oe = a.div`
177
- ${(t) => t.grow ? f`
178
+ ${(e) => e.grow ? f`
178
179
  min-height: 50px;
179
180
  max-height: 150px;
180
181
  ` : f`
@@ -183,39 +184,45 @@ const Be = ({ className: t }) => {
183
184
  flex: 0 0 auto;
184
185
  display: flex;
185
186
  align-items: center;
186
- background-color: ${(t) => {
187
- var e;
188
- return (e = t.theme.colors) == null ? void 0 : e.accent;
187
+ background-color: ${(e) => {
188
+ var t;
189
+ return (t = e.theme.colors) == null ? void 0 : t.accent;
189
190
  }};
190
- border-top: ${(t) => t.theme.inputBorder};
191
- ${(t) => t["data-has-focus"] && t.isTabbing && b}
191
+ border-top: ${(e) => e.theme.inputBorder};
192
+ ${(e) => e["data-has-focus"] && e.isTabbing && b}
192
193
  ${de} {
193
- ${(t) => !!t.scrollableCss && t.scrollableCss}
194
+ ${(e) => !!e.scrollableCss && e.scrollableCss}
194
195
  }
195
- `, je = a((r) => {
196
- var o = r, { hasContent: t } = o, e = j(o, ["hasContent"]);
197
- return /* @__PURE__ */ n.createElement(w, g({}, e));
198
- })`
196
+ `, je = a(
197
+ (r) => {
198
+ var o = r, {
199
+ hasContent: e
200
+ } = o, t = j(o, [
201
+ "hasContent"
202
+ ]);
203
+ return /* @__PURE__ */ n.createElement(w, g({}, t));
204
+ }
205
+ )`
199
206
  line,
200
207
  path {
201
- stroke: ${(t) => {
202
- var e;
203
- return t.hasContent ? (e = t.theme.colors) == null ? void 0 : e.primary : "#a6a6a6";
208
+ stroke: ${(e) => {
209
+ var t;
210
+ return e.hasContent ? (t = e.theme.colors) == null ? void 0 : t.primary : "#a6a6a6";
204
211
  }};
205
- fill: ${(t) => {
206
- var e;
207
- return t.hasContent ? (e = t.theme.colors) == null ? void 0 : e.primary : "#a6a6a6";
212
+ fill: ${(e) => {
213
+ var t;
214
+ return e.hasContent ? (t = e.theme.colors) == null ? void 0 : t.primary : "#a6a6a6";
208
215
  }};
209
216
  }
210
217
  `, De = a.div`
211
- width: ${(t) => t.avatarSize || "32px"};
212
- height: ${(t) => t.avatarSize || "32px"};
218
+ width: ${(e) => e.avatarSize || "32px"};
219
+ height: ${(e) => e.avatarSize || "32px"};
213
220
  border-radius: 50%;
214
- background-color: ${(t) => {
215
- var e;
216
- return (e = t.theme.colors) == null ? void 0 : e.accent;
221
+ background-color: ${(e) => {
222
+ var t;
223
+ return (t = e.theme.colors) == null ? void 0 : t.accent;
217
224
  }};
218
- border: ${(t) => t.theme.border};
225
+ border: ${(e) => e.theme.border};
219
226
  grid-area: avatar;
220
227
  align-self: flex-end;
221
228
  justify-self: center;
@@ -224,9 +231,9 @@ const Be = ({ className: t }) => {
224
231
  display: flex;
225
232
  justify-content: center;
226
233
  align-items: center;
227
- color: ${(t) => {
228
- var e;
229
- return (e = t.theme.colors) == null ? void 0 : e.text;
234
+ color: ${(e) => {
235
+ var t;
236
+ return (t = e.theme.colors) == null ? void 0 : t.text;
230
237
  }};
231
238
 
232
239
  > img {
@@ -239,18 +246,18 @@ const Be = ({ className: t }) => {
239
246
  width: 90%;
240
247
  height: 90%;
241
248
  padding: 10%;
242
- color: ${(t) => {
243
- var e;
244
- return (e = t.theme.colors) == null ? void 0 : e.text;
249
+ color: ${(e) => {
250
+ var t;
251
+ return (t = e.theme.colors) == null ? void 0 : t.text;
245
252
  }};
246
253
 
247
254
  line,
248
255
  path,
249
256
  circle,
250
257
  fill {
251
- stroke: ${(t) => {
252
- var e;
253
- return (e = t.theme.colors) == null ? void 0 : e.text;
258
+ stroke: ${(e) => {
259
+ var t;
260
+ return (t = e.theme.colors) == null ? void 0 : t.text;
254
261
  }};
255
262
  }
256
263
  }
@@ -272,9 +279,9 @@ const Be = ({ className: t }) => {
272
279
  width: 10px;
273
280
  border-radius: 50%;
274
281
  margin: 5px;
275
- background-color: ${(t) => {
276
- var e;
277
- return (e = t.theme.colors) == null ? void 0 : e.text;
282
+ background-color: ${(e) => {
283
+ var t;
284
+ return (t = e.theme.colors) == null ? void 0 : t.text;
278
285
  }};
279
286
  animation: ${Fe} 1s infinite;
280
287
  }
@@ -289,29 +296,29 @@ const Be = ({ className: t }) => {
289
296
  max-width: 100%;
290
297
  overflow: hidden;
291
298
  `, Pe = a(q)`
292
- font-size: ${(t) => {
293
- var e;
294
- return (e = t.theme.fonts) == null ? void 0 : e.normal;
299
+ font-size: ${(e) => {
300
+ var t;
301
+ return (t = e.theme.fonts) == null ? void 0 : t.normal;
295
302
  }};
296
303
  font-weight: normal;
297
304
  margin: 0;
298
305
  `, U = a.div`
299
306
  display: flex;
300
- ${(t) => t.left && "justify-content: start;"};
301
- ${(t) => t.center && "justify-content: center;"};
302
- ${(t) => t.right && "justify-content: end;"};
307
+ ${(e) => e.left && "justify-content: start;"};
308
+ ${(e) => e.center && "justify-content: center;"};
309
+ ${(e) => e.right && "justify-content: end;"};
303
310
  `, _ = a.div`
304
- ${(t) => {
305
- var e;
306
- return t.padded && `padding: ${(e = t.theme.sizes) == null ? void 0 : e.medium};`;
311
+ ${(e) => {
312
+ var t;
313
+ return e.padded && `padding: ${(t = e.theme.sizes) == null ? void 0 : t.medium};`;
307
314
  }}
308
- ${(t) => !t.user && t.stacked && Ue(t.stacked, t.theme)}
309
- ${(t) => t.user && t.stacked && _e(t.stacked, t.theme)}
315
+ ${(e) => !e.user && e.stacked && Ue(e.stacked, e.theme)}
316
+ ${(e) => e.user && e.stacked && _e(e.stacked, e.theme)}
310
317
 
311
318
  display: inline-block;
312
- margin-top: ${(t) => {
313
- var e;
314
- return (e = t.theme.sizes) == null ? void 0 : e.normal;
319
+ margin-top: ${(e) => {
320
+ var t;
321
+ return (t = e.theme.sizes) == null ? void 0 : t.normal;
315
322
  }};
316
323
  && > * {
317
324
  overflow-wrap: break-word;
@@ -321,122 +328,120 @@ const Be = ({ className: t }) => {
321
328
  hyphens: auto;
322
329
  }
323
330
  max-width: 100%;
324
- ${(t) => t.fullWidth && "width: 100%;"}
325
- `, Ue = (t, e) => {
331
+ ${(e) => e.fullWidth && "width: 100%;"}
332
+ `, Ue = (e, t) => {
326
333
  var o, l;
327
334
  const r = f`
328
- background-color: ${(o = e.colors) == null ? void 0 : o.accent};
329
- color: ${(l = e.colors) == null ? void 0 : l.text};
330
- ${e.border && `border: ${e.border};`};
335
+ background-color: ${(o = t.colors) == null ? void 0 : o.accent};
336
+ color: ${(l = t.colors) == null ? void 0 : l.text};
337
+ ${t.border && `border: ${t.border};`};
331
338
  `;
332
- return e.borderRadius ? f`
339
+ return t.borderRadius ? f`
333
340
  ${r}
334
341
 
335
- border-top-right-radius: ${e.borderRadius};
336
- border-bottom-right-radius: ${e.borderRadius};
342
+ border-top-right-radius: ${t.borderRadius};
343
+ border-bottom-right-radius: ${t.borderRadius};
337
344
 
338
- ${t === "first" && `
339
- border-top-left-radius: ${e.borderRadius};
345
+ ${e === "first" && `
346
+ border-top-left-radius: ${t.borderRadius};
340
347
  `}
341
348
 
342
- ${t === "last" && `
343
- border-bottom-left-radius: ${e.borderRadius};
349
+ ${e === "last" && `
350
+ border-bottom-left-radius: ${t.borderRadius};
344
351
  `}
345
352
  ` : r;
346
- }, _e = (t, e) => {
353
+ }, _e = (e, t) => {
347
354
  var o, l;
348
355
  const r = f`
349
- background-color: ${(o = e.colors) == null ? void 0 : o.primary};
350
- color: ${(l = e.colors) == null ? void 0 : l.accent};
356
+ background-color: ${(o = t.colors) == null ? void 0 : o.primary};
357
+ color: ${(l = t.colors) == null ? void 0 : l.accent};
351
358
  `;
352
- return e.borderRadius ? f`
359
+ return t.borderRadius ? f`
353
360
  ${r}
354
361
 
355
- border-top-left-radius: ${e.borderRadius};
356
- border-bottom-left-radius: ${e.borderRadius};
362
+ border-top-left-radius: ${t.borderRadius};
363
+ border-bottom-left-radius: ${t.borderRadius};
357
364
 
358
- ${t === "first" && `
359
- border-top-right-radius: ${e.borderRadius};
365
+ ${e === "first" && `
366
+ border-top-right-radius: ${t.borderRadius};
360
367
  `}
361
368
 
362
- ${t === "last" && `
363
- border-bottom-right-radius: ${e.borderRadius};
369
+ ${e === "last" && `
370
+ border-bottom-right-radius: ${t.borderRadius};
364
371
  `}
365
372
  ` : r;
366
373
  }, B = a.div`
367
- margin-bottom: ${(t) => {
368
- var e;
369
- return (e = t.theme.sizes) == null ? void 0 : e.normal;
374
+ margin-bottom: ${(e) => {
375
+ var t;
376
+ return (t = e.theme.sizes) == null ? void 0 : t.normal;
370
377
  }};
371
378
  &:last-child {
372
379
  margin-bottom: 0;
373
380
  }
374
- `, T = f`
375
- margin: ${(t) => {
376
- var e;
377
- return (e = t.theme.sizes) == null ? void 0 : e.medium;
378
- }} 0;
379
- padding: 0 ${(t) => {
380
- var e;
381
- return (e = t.theme.sizes) == null ? void 0 : e.medium;
382
- }};
383
- `, Ve = a(Re)`
381
+ `, T = (e) => {
382
+ var t, r;
383
+ return f`
384
+ margin: ${(t = e.theme.sizes) == null ? void 0 : t.medium} 0;
385
+ padding: 0 ${(r = e.theme.sizes) == null ? void 0 : r.medium};
386
+ `;
387
+ }, Ve = a(Re)`
384
388
  & button.humany-form-component-button {
385
- ${(t) => {
386
- var e, r;
387
- return Ce({
389
+ ${(e) => {
390
+ var t, r, o, l;
391
+ return ((t = e.theme.colors) == null ? void 0 : t.primary) && ((r = e.theme.colors) == null ? void 0 : r.accent) && Ce({
388
392
  active: !1,
389
- primaryColor: (e = t.theme.colors) == null ? void 0 : e.primary,
390
- secondaryColor: (r = t.theme.colors) == null ? void 0 : r.accent
393
+ primaryColor: (o = e.theme.colors) == null ? void 0 : o.primary,
394
+ secondaryColor: (l = e.theme.colors) == null ? void 0 : l.accent,
395
+ theme: e.theme
391
396
  });
392
397
  }};
393
398
  display: block;
394
399
  width: 100%;
395
- margin-bottom: ${(t) => {
396
- var e;
397
- return (e = t.theme.sizes) == null ? void 0 : e.normal;
400
+ margin-bottom: ${(e) => {
401
+ var t;
402
+ return (t = e.theme.sizes) == null ? void 0 : t.normal;
398
403
  }};
399
404
  }
400
405
  & button.humany-form-component-submit {
401
406
  width: 100%;
402
407
  margin: 0;
403
408
  :not(:last-child) {
404
- margin-bottom: ${(t) => {
405
- var e;
406
- return (e = t.theme.sizes) == null ? void 0 : e.normal;
409
+ margin-bottom: ${(e) => {
410
+ var t;
411
+ return (t = e.theme.sizes) == null ? void 0 : t.normal;
407
412
  }};
408
413
  }
409
414
  }
410
415
  `, qe = a(Y)`
411
416
  white-space: pre-wrap;
412
417
  a {
413
- color: ${(t) => t.theme.colors.link};
418
+ color: ${(e) => e.theme.colors.link};
414
419
  &:focus {
415
- ${(t) => {
416
- var e;
417
- return ((e = t.theme.accessibility) == null ? void 0 : e.isTabbing) && b;
420
+ ${(e) => {
421
+ var t;
422
+ return ((t = e.theme.accessibility) == null ? void 0 : t.isTabbing) && b;
418
423
  }};
419
424
  }
420
425
  }
421
426
  `, Ye = a(le)`
422
427
  padding: 0;
423
428
  list-style: none;
424
- margin: 0 -${(t) => {
425
- var e;
426
- return (e = t.theme.sizes) == null ? void 0 : e.normal;
429
+ margin: 0 -${(e) => {
430
+ var t;
431
+ return (t = e.theme.sizes) == null ? void 0 : t.normal;
427
432
  }};
428
433
  > li {
429
- margin: ${(t) => {
430
- var e;
431
- return (e = t.theme.sizes) == null ? void 0 : e.normal;
434
+ margin: ${(e) => {
435
+ var t;
436
+ return (t = e.theme.sizes) == null ? void 0 : t.normal;
432
437
  }};
433
438
  }
434
439
  `, Ge = a.button`
435
- ${G};
440
+ ${(e) => G(e)};
436
441
  display: block;
437
- background-color: ${(t) => {
438
- var e;
439
- return (e = t.theme.colors) == null ? void 0 : e.primary;
442
+ background-color: ${(e) => {
443
+ var t;
444
+ return (t = e.theme.colors) == null ? void 0 : t.primary;
440
445
  }};
441
446
  width: 100%;
442
447
  color: #fff;
@@ -445,47 +450,47 @@ const Be = ({ className: t }) => {
445
450
  background-color: transparent;
446
451
  }
447
452
  `, ne = X(
448
- ({ boxed: t, className: e, agentData: r }, o) => /* @__PURE__ */ n.createElement(P, {
453
+ ({ boxed: e, className: t, agentData: r }, o) => /* @__PURE__ */ n.createElement(P, {
449
454
  ref: o
450
455
  }, /* @__PURE__ */ n.createElement(U, {
451
- left: t,
452
- center: !t
456
+ left: e,
457
+ center: !e
453
458
  }, /* @__PURE__ */ n.createElement(_, {
454
- padded: !!t,
455
- stacked: t ? "first" : void 0
459
+ padded: !!e,
460
+ stacked: e ? "first" : void 0
456
461
  }, /* @__PURE__ */ n.createElement(We, null, /* @__PURE__ */ n.createElement("div", null), /* @__PURE__ */ n.createElement("div", null), /* @__PURE__ */ n.createElement("div", null)))))
457
462
  ), Je = a.p`
458
463
  && {
459
- font-size: ${(t) => {
460
- var e;
461
- return (e = t.theme.fonts) == null ? void 0 : e.small;
464
+ font-size: ${(e) => {
465
+ var t;
466
+ return (t = e.theme.fonts) == null ? void 0 : t.small;
462
467
  }};
463
468
  font-weight: 300;
464
469
  }
465
470
  margin: 0;
466
471
  line-height: 1.5em;
467
472
  grid-area: info;
468
- color: ${(t) => {
469
- var e;
470
- return (e = t.theme.colors) == null ? void 0 : e.text;
473
+ color: ${(e) => {
474
+ var t;
475
+ return (t = e.theme.colors) == null ? void 0 : t.text;
471
476
  }};
472
- `, re = (t) => new Date(t).toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" }), K = ({ className: t, name: e, timestamp: r }) => {
473
- if (!e && !r)
477
+ `, re = (e) => new Date(e).toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" }), K = ({ className: e, name: t, timestamp: r }) => {
478
+ if (!t && !r)
474
479
  return null;
475
480
  let o = "";
476
- return e ? r ? o = `${e}: ${re(r)}` : o = e : r && (o = re(r)), /* @__PURE__ */ n.createElement(Je, null, o);
477
- }, he = ({ className: t, children: e, sender: r, timestamp: o }) => {
481
+ return t ? r ? o = `${t}: ${re(r)}` : o = t : r && (o = re(r)), /* @__PURE__ */ n.createElement(Je, null, o);
482
+ }, he = ({ className: e, children: t, sender: r, timestamp: o }) => {
478
483
  const { avatar: l, name: s } = r, { avatarSize: u } = M();
479
484
  return /* @__PURE__ */ n.createElement(Qe, {
480
485
  hasAvatar: !!l,
481
- className: H(t, "humany-conversation-agent-message")
486
+ className: H(e, "humany-conversation-agent-message")
482
487
  }, l && /* @__PURE__ */ n.createElement(De, {
483
488
  avatarSize: u
484
489
  }, typeof l == "string" ? /* @__PURE__ */ n.createElement("img", {
485
490
  src: l
486
491
  }) : /* @__PURE__ */ n.createElement(w, {
487
492
  symbol: l
488
- })), e, /* @__PURE__ */ n.createElement(K, {
493
+ })), t, /* @__PURE__ */ n.createElement(K, {
489
494
  name: s,
490
495
  timestamp: o
491
496
  }));
@@ -493,7 +498,7 @@ const Be = ({ className: t }) => {
493
498
  display: grid;
494
499
  margin-right: 10%;
495
500
  width: 90%;
496
- ${(t) => t.hasAvatar ? f`
501
+ ${(e) => e.hasAvatar ? f`
497
502
  grid-template-columns: auto 1fr;
498
503
  grid-template-rows: 1fr auto;
499
504
  grid-template-areas:
@@ -507,43 +512,43 @@ const Be = ({ className: t }) => {
507
512
  'info';
508
513
  `};
509
514
  `, Xe = X(
510
- ({ className: t, children: e, timestamp: r, discrete: o, fullWidth: l }, s) => /* @__PURE__ */ n.createElement(Ze, {
515
+ ({ className: e, children: t, timestamp: r, discrete: o, fullWidth: l }, s) => /* @__PURE__ */ n.createElement(Ze, {
511
516
  ref: s,
512
- className: H(t, "humany-conversation-system-message"),
517
+ className: H(e, "humany-conversation-system-message"),
513
518
  fullWidth: l
514
519
  }, o ? /* @__PURE__ */ n.createElement(et, {
515
520
  className: "humany-conversation-discrete-message"
516
- }, e, /* @__PURE__ */ n.createElement(K, {
521
+ }, t, /* @__PURE__ */ n.createElement(K, {
517
522
  timestamp: r
518
- })) : /* @__PURE__ */ n.createElement(n.Fragment, null, e, /* @__PURE__ */ n.createElement(K, {
523
+ })) : /* @__PURE__ */ n.createElement(n.Fragment, null, t, /* @__PURE__ */ n.createElement(K, {
519
524
  timestamp: r
520
525
  })))
521
526
  ), Ze = a.div`
522
- ${(t) => t.fullWidth && "width: 100%"};
523
- padding: 0 ${(t) => {
524
- var e;
525
- return (e = t.theme.sizes) == null ? void 0 : e.large;
527
+ ${(e) => e.fullWidth && "width: 100%"};
528
+ padding: 0 ${(e) => {
529
+ var t;
530
+ return (t = e.theme.sizes) == null ? void 0 : t.large;
526
531
  }};
527
532
  overflow: auto;
528
533
  `, et = a.div`
529
534
  text-align: center;
530
535
  word-wrap: break-word;
531
- font-size: ${(t) => {
532
- var e;
533
- return (e = t.theme.fonts) == null ? void 0 : e.normal;
536
+ font-size: ${(e) => {
537
+ var t;
538
+ return (t = e.theme.fonts) == null ? void 0 : t.normal;
534
539
  }};
535
- color: ${(t) => {
536
- var e;
537
- return (e = t.theme.colors) == null ? void 0 : e.text;
540
+ color: ${(e) => {
541
+ var t;
542
+ return (t = e.theme.colors) == null ? void 0 : t.text;
538
543
  }};
539
544
  > p {
540
545
  margin: 0;
541
546
  }
542
- `, tt = ({ className: t, children: e, timestamp: r }) => {
547
+ `, tt = ({ className: e, children: t, timestamp: r }) => {
543
548
  const { userLabel: o = "" } = M();
544
549
  return /* @__PURE__ */ n.createElement(nt, {
545
- className: H(t, "humany-conversation-user-message")
546
- }, e, /* @__PURE__ */ n.createElement(K, {
550
+ className: H(e, "humany-conversation-user-message")
551
+ }, t, /* @__PURE__ */ n.createElement(K, {
547
552
  name: o,
548
553
  timestamp: r
549
554
  }));
@@ -553,12 +558,12 @@ const Be = ({ className: t }) => {
553
558
  display: flex;
554
559
  flex-direction: column;
555
560
  align-items: flex-end;
556
- `, ge = (t) => Array.isArray(t) ? t : Object.keys(t).map((e) => ({
557
- label: t[e],
558
- actionKey: e
559
- })), rt = ({ header: t, actions: e, dispatch: r }) => /* @__PURE__ */ n.createElement(ot, {
560
- header: t,
561
- items: ge(e),
561
+ `, ge = (e) => Array.isArray(e) ? e : Object.keys(e).map((t) => ({
562
+ label: e[t],
563
+ actionKey: t
564
+ })), rt = ({ header: e, actions: t, dispatch: r }) => /* @__PURE__ */ n.createElement(ot, {
565
+ header: e,
566
+ items: ge(t),
562
567
  renderItem: (o) => /* @__PURE__ */ n.createElement("li", {
563
568
  key: o.actionKey
564
569
  }, /* @__PURE__ */ n.createElement(at, {
@@ -575,9 +580,9 @@ const Be = ({ className: t }) => {
575
580
  > ul {
576
581
  display: flex;
577
582
  flex-wrap: wrap;
578
- gap: ${(t) => {
579
- var e;
580
- return (e = t.theme.sizes) == null ? void 0 : e.normal;
583
+ gap: ${(e) => {
584
+ var t;
585
+ return (t = e.theme.sizes) == null ? void 0 : t.normal;
581
586
  }};
582
587
  > li {
583
588
  margin: 0;
@@ -588,13 +593,13 @@ const Be = ({ className: t }) => {
588
593
  ${G};
589
594
 
590
595
  display: block;
591
- padding: ${(t) => {
592
- var e;
593
- return (e = t.theme.sizes) == null ? void 0 : e.normal;
596
+ padding: ${(e) => {
597
+ var t;
598
+ return (t = e.theme.sizes) == null ? void 0 : t.normal;
594
599
  }};
595
- background-color: ${(t) => {
596
- var e;
597
- return (e = t.theme.colors) == null ? void 0 : e.primary;
600
+ background-color: ${(e) => {
601
+ var t;
602
+ return (t = e.theme.colors) == null ? void 0 : t.primary;
598
603
  }};
599
604
  width: 100%;
600
605
  color: #ffffff;
@@ -607,32 +612,32 @@ const Be = ({ className: t }) => {
607
612
 
608
613
  i,
609
614
  svg {
610
- margin-right: ${(t) => {
611
- var e;
612
- return (e = t.theme.sizes) == null ? void 0 : e.small;
615
+ margin-right: ${(e) => {
616
+ var t;
617
+ return (t = e.theme.sizes) == null ? void 0 : t.small;
613
618
  }};
614
619
  }
615
- `, lt = ({ type: t, content: e = {} }) => {
616
- const r = Se(t);
617
- return !r || !t ? null : /* @__PURE__ */ n.createElement(He, {
620
+ `, lt = ({ type: e, content: t = {} }) => {
621
+ const r = Se(e);
622
+ return !r || !e ? null : /* @__PURE__ */ n.createElement(He, {
618
623
  fallback: null
619
- }, /* @__PURE__ */ n.createElement(r, g({}, e)));
620
- }, st = ({ body: t }) => /* @__PURE__ */ n.createElement(it, {
621
- html: t
624
+ }, /* @__PURE__ */ n.createElement(r, g({}, t)));
625
+ }, st = ({ body: e }) => /* @__PURE__ */ n.createElement(it, {
626
+ html: e
622
627
  }), it = a(Y)`
623
628
  ${ze}
624
629
  color: inherit;
625
630
  white-space: pre-wrap;
626
631
  ${T}
627
632
  a {
628
- color: ${(t) => t.theme.colors.link};
633
+ color: ${(e) => e.theme.colors.link};
629
634
  &:focus-visible {
630
635
  ${b};
631
636
  }
632
637
  }
633
- `, ct = ({ header: t, actions: e, dispatch: r }) => /* @__PURE__ */ n.createElement(mt, {
634
- header: t,
635
- items: ge(e),
638
+ `, ct = ({ header: e, actions: t, dispatch: r }) => /* @__PURE__ */ n.createElement(mt, {
639
+ header: e,
640
+ items: ge(t),
636
641
  renderItem: (o) => /* @__PURE__ */ n.createElement("li", {
637
642
  key: o.actionKey
638
643
  }, /* @__PURE__ */ n.createElement(dt, {
@@ -653,19 +658,19 @@ const Be = ({ className: t }) => {
653
658
  ${Q}
654
659
  ${T}
655
660
 
656
- ${se(
661
+ ${(e) => se(e)(
657
662
  "h1",
658
663
  f`
659
- white-space: normal;
660
- `
664
+ white-space: normal;
665
+ `
661
666
  )}
662
667
 
663
668
  > ul {
664
669
  display: flex;
665
670
  flex-direction: column;
666
- gap: ${(t) => {
667
- var e;
668
- return (e = t.theme.sizes) == null ? void 0 : e.normal;
671
+ gap: ${(e) => {
672
+ var t;
673
+ return (t = e.theme.sizes) == null ? void 0 : t.normal;
669
674
  }};
670
675
  > li {
671
676
  margin: 0;
@@ -675,23 +680,23 @@ const Be = ({ className: t }) => {
675
680
  display: block;
676
681
  text-align: left;
677
682
  font-weight: 300;
678
- color: ${(t) => {
679
- var e;
680
- return (e = t.theme.colors) == null ? void 0 : e.primary;
683
+ color: ${(e) => {
684
+ var t;
685
+ return (t = e.theme.colors) == null ? void 0 : t.primary;
681
686
  }};
682
687
  max-width: 100%;
683
688
  text-overflow: ellipsis;
684
689
  overflow: hidden;
685
690
 
686
- ${(t) => {
687
- var e, r;
688
- return t.help && f`
689
- color: ${(e = t.theme.colors) == null ? void 0 : e.text};
691
+ ${(e) => {
692
+ var t, r;
693
+ return e.help && f`
694
+ color: ${(t = e.theme.colors) == null ? void 0 : t.text};
690
695
  text-decoration: underline;
691
696
 
692
697
  i,
693
698
  svg {
694
- margin-left: ${(r = t.theme.sizes) == null ? void 0 : r.small};
699
+ margin-left: ${(r = e.theme.sizes) == null ? void 0 : r.small};
695
700
  }
696
701
  `;
697
702
  }}
@@ -699,29 +704,29 @@ const Be = ({ className: t }) => {
699
704
  &:focus-visible {
700
705
  ${b}
701
706
  span {
702
- color: ${(t) => {
703
- var e;
704
- return (e = t.theme.colors) == null ? void 0 : e.primary;
707
+ color: ${(e) => {
708
+ var t;
709
+ return (t = e.theme.colors) == null ? void 0 : t.primary;
705
710
  }};
706
711
  text-decoration: underline;
707
712
  }
708
713
  }
709
714
  `, ut = () => /* @__PURE__ */ n.createElement(ht, null), ht = a.div`
710
- ${(t) => t.theme.border && `border-bottom: ${t.theme.border};`}
715
+ ${(e) => e.theme.border && `border-bottom: ${e.theme.border};`}
711
716
  width: 100%;
712
- `, gt = ({ text: t }) => /* @__PURE__ */ n.createElement(ft, {
717
+ `, gt = ({ text: e }) => /* @__PURE__ */ n.createElement(ft, {
713
718
  variant: "span"
714
- }, t), ft = a(q)`
719
+ }, e), ft = a(q)`
715
720
  ${T}
716
721
  `, pt = ({
717
- header: t = "Video call",
718
- acceptLabel: e = "Accept",
722
+ header: e = "Video call",
723
+ acceptLabel: t = "Accept",
719
724
  declineLabel: r = "Decline",
720
725
  dispatch: o
721
726
  }) => {
722
727
  const l = Te(() => [
723
728
  {
724
- label: e,
729
+ label: t,
725
730
  actionKey: "accept-video-call",
726
731
  symbol: {
727
732
  type: "Svg",
@@ -736,9 +741,9 @@ const Be = ({ className: t }) => {
736
741
  content: "close"
737
742
  }
738
743
  }
739
- ], [e, r]);
744
+ ], [t, r]);
740
745
  return /* @__PURE__ */ n.createElement(yt, {
741
- header: t,
746
+ header: e,
742
747
  items: l,
743
748
  renderItem: (s) => {
744
749
  const u = s.actionKey === "accept-video-call" ? "#70c48e" : "#da5c85";
@@ -758,23 +763,23 @@ const Be = ({ className: t }) => {
758
763
  }
759
764
  });
760
765
  }, yt = a(J)`
761
- ${Q}
766
+ ${(e) => Q(e)}
762
767
  > ul {
763
768
  display: flex;
764
769
  flex-wrap: wrap;
765
- gap: ${(t) => {
766
- var e;
767
- return (e = t.theme.sizes) == null ? void 0 : e.normal;
770
+ gap: ${(e) => {
771
+ var t;
772
+ return (t = e.theme.sizes) == null ? void 0 : t.normal;
768
773
  }};
769
774
  > li {
770
775
  margin: 0;
771
776
  }
772
777
  }
773
- ${T}
778
+ ${(e) => T(e)}
774
779
  `, bt = a(L)`
775
780
  ${G};
776
781
 
777
- background-color: ${(t) => t.bgColor};
782
+ background-color: ${(e) => e.bgColor};
778
783
  display: flex;
779
784
  justify-content: center;
780
785
  align-items: center;
@@ -789,15 +794,15 @@ const Be = ({ className: t }) => {
789
794
 
790
795
  i,
791
796
  svg {
792
- color: ${(t) => {
793
- var e;
794
- return (e = t.theme.colors) == null ? void 0 : e.primary;
797
+ color: ${(e) => {
798
+ var t;
799
+ return (t = e.theme.colors) == null ? void 0 : t.primary;
795
800
  }};
796
801
 
797
802
  path {
798
- stroke: ${(t) => {
799
- var e;
800
- return (e = t.theme.colors) == null ? void 0 : e.primary;
803
+ stroke: ${(e) => {
804
+ var t;
805
+ return (t = e.theme.colors) == null ? void 0 : t.primary;
801
806
  }};
802
807
  }
803
808
  }
@@ -811,8 +816,8 @@ const Be = ({ className: t }) => {
811
816
  stroke: #fff;
812
817
  }
813
818
  }
814
- `, $t = ([t, e]) => ({ type: t, content: e }), vt = ({ items: t, dispatch: e }) => /* @__PURE__ */ n.createElement(Et, {
815
- items: t.map($t),
819
+ `, $t = ([e, t]) => ({ type: e, content: t }), vt = ({ items: e, dispatch: t }) => /* @__PURE__ */ n.createElement(Et, {
820
+ items: e.map($t),
816
821
  renderLi: !0,
817
822
  renderItem: (r) => {
818
823
  switch (r.type) {
@@ -826,15 +831,15 @@ const Be = ({ className: t }) => {
826
831
  return /* @__PURE__ */ n.createElement(ut, g({}, r.content));
827
832
  case C.LinkList:
828
833
  return /* @__PURE__ */ n.createElement(ct, x(g({}, r.content), {
829
- dispatch: e
834
+ dispatch: t
830
835
  }));
831
836
  case C.ButtonList:
832
837
  return /* @__PURE__ */ n.createElement(rt, x(g({}, r.content), {
833
- dispatch: e
838
+ dispatch: t
834
839
  }));
835
840
  case C.VideoRequest:
836
841
  return /* @__PURE__ */ n.createElement(pt, x(g({}, r.content), {
837
- dispatch: e
842
+ dispatch: t
838
843
  }));
839
844
  default:
840
845
  return /* @__PURE__ */ n.createElement(lt, {
@@ -850,7 +855,7 @@ const Be = ({ className: t }) => {
850
855
  margin: 0;
851
856
  }
852
857
  `, xt = X(
853
- ({ className: t, timestamp: e, sender: r, type: o, content: l }, s) => {
858
+ ({ className: e, timestamp: t, sender: r, type: o, content: l }, s) => {
854
859
  const u = me(
855
860
  (m) => {
856
861
  let i = "first";
@@ -860,11 +865,11 @@ const Be = ({ className: t }) => {
860
865
  ), c = () => /* @__PURE__ */ n.createElement(n.Fragment, null, l.map((m) => {
861
866
  const { key: i, body: $, title: k, form: S, actions: E } = m, p = !!$ && !k && !S && !E;
862
867
  return /* @__PURE__ */ n.createElement(Xe, {
863
- className: t,
868
+ className: e,
864
869
  key: i,
865
870
  discrete: p,
866
871
  ref: s,
867
- timestamp: e,
872
+ timestamp: t,
868
873
  fullWidth: !!S || !!E
869
874
  }, p && $ ? /* @__PURE__ */ n.createElement(Y, {
870
875
  html: $
@@ -874,8 +879,8 @@ const Be = ({ className: t }) => {
874
879
  }));
875
880
  })), h = () => /* @__PURE__ */ n.createElement(he, {
876
881
  sender: r,
877
- timestamp: e,
878
- className: t
882
+ timestamp: t,
883
+ className: e
879
884
  }, /* @__PURE__ */ n.createElement(P, null, l.map((m, i) => /* @__PURE__ */ n.createElement(U, {
880
885
  left: !0,
881
886
  key: m.key,
@@ -884,8 +889,8 @@ const Be = ({ className: t }) => {
884
889
  content: m,
885
890
  stacked: u(i)
886
891
  }))))), v = () => /* @__PURE__ */ n.createElement(tt, {
887
- timestamp: e,
888
- className: t
892
+ timestamp: t,
893
+ className: e
889
894
  }, /* @__PURE__ */ n.createElement(P, null, l.map((m, i) => /* @__PURE__ */ n.createElement(U, {
890
895
  right: !0,
891
896
  key: m.key,
@@ -906,17 +911,17 @@ const Be = ({ className: t }) => {
906
911
  return null;
907
912
  }
908
913
  }
909
- ), F = ({ content: t, isUser: e, isSystem: r, stacked: o }) => {
910
- const l = V(), { title: s, body: u, actions: c, form: h, items: v } = t;
914
+ ), F = ({ content: e, isUser: t, isSystem: r, stacked: o }) => {
915
+ const l = V(), { title: s, body: u, actions: c, form: h, items: v } = e;
911
916
  return v ? /* @__PURE__ */ n.createElement(_, {
912
- user: !!e,
917
+ user: !!t,
913
918
  stacked: o
914
919
  }, /* @__PURE__ */ n.createElement(vt, {
915
920
  items: v,
916
921
  dispatch: l
917
922
  })) : /* @__PURE__ */ n.createElement(_, {
918
923
  padded: !r,
919
- user: !!e,
924
+ user: !!t,
920
925
  stacked: o,
921
926
  fullWidth: !!h || !!c
922
927
  }, s && /* @__PURE__ */ n.createElement(B, null, /* @__PURE__ */ n.createElement(Pe, {
@@ -942,14 +947,14 @@ const Be = ({ className: t }) => {
942
947
  }, i.label))
943
948
  })));
944
949
  }, fe = () => {
945
- const t = me((c) => {
950
+ const e = me((c) => {
946
951
  c && setTimeout(() => {
947
952
  c.scrollIntoView({
948
953
  block: "start",
949
954
  behavior: "smooth"
950
955
  });
951
956
  }, 250);
952
- }, []), [e, r] = ae(!0), {
957
+ }, []), [t, r] = ae(!0), {
953
958
  messages: o,
954
959
  loading: l,
955
960
  typingActors: s = []
@@ -961,11 +966,11 @@ const Be = ({ className: t }) => {
961
966
  sender: c
962
967
  }, /* @__PURE__ */ n.createElement(ne, {
963
968
  boxed: !0,
964
- ref: t
969
+ ref: e
965
970
  })))) : null;
966
971
  return /* @__PURE__ */ n.createElement(n.Fragment, null, /* @__PURE__ */ n.createElement(wt, {
967
972
  tabIndex: 0,
968
- scrollableCss: e,
973
+ scrollableCss: t,
969
974
  ref: r
970
975
  }, o && o.length ? o.map((c, h) => {
971
976
  const { type: v, timestamp: m, sender: i, content: $ } = c;
@@ -974,42 +979,42 @@ const Be = ({ className: t }) => {
974
979
  tabIndex: -1,
975
980
  key: `${v}_${i == null ? void 0 : i.name}_${m}_${$[0].key}`
976
981
  }, /* @__PURE__ */ n.createElement(xt, x(g({}, c), {
977
- ref: t
982
+ ref: e
978
983
  })));
979
984
  }) : null, u(), l && /* @__PURE__ */ n.createElement(W, null, /* @__PURE__ */ n.createElement(ne, {
980
- ref: t
985
+ ref: e
981
986
  }))), /* @__PURE__ */ n.createElement(Be, null));
982
987
  }, wt = a.div`
983
988
  display: flex;
984
989
  flex-direction: column;
985
990
  align-items: stretch;
986
991
  flex: 0 1 100%;
987
- padding: 0 ${(t) => {
988
- var e;
989
- return (e = t.theme.sizes) == null ? void 0 : e.medium;
992
+ padding: 0 ${(e) => {
993
+ var t;
994
+ return (t = e.theme.sizes) == null ? void 0 : t.medium;
990
995
  }};
991
- ${(t) => !!t.scrollableCss && t.scrollableCss};
996
+ ${(e) => !!e.scrollableCss && e.scrollableCss};
992
997
  &:focus-visible {
993
- ${b};
998
+ ${(e) => b(e)};
994
999
  }
995
1000
  `, W = a.div`
996
1001
  margin: 0;
997
- margin-bottom: ${(t) => {
998
- var e;
999
- return (e = t.theme.sizes) == null ? void 0 : e.medium;
1002
+ margin-bottom: ${(e) => {
1003
+ var t;
1004
+ return (t = e.theme.sizes) == null ? void 0 : t.medium;
1000
1005
  }};
1001
1006
 
1002
1007
  &:first-of-type {
1003
- margin-top: ${(t) => {
1004
- var e;
1005
- return (e = t.theme.sizes) == null ? void 0 : e.medium;
1008
+ margin-top: ${(e) => {
1009
+ var t;
1010
+ return (t = e.theme.sizes) == null ? void 0 : t.medium;
1006
1011
  }};
1007
1012
  }
1008
1013
 
1009
1014
  &:last-of-type {
1010
- padding-bottom: ${(t) => {
1011
- var e;
1012
- return (e = t.theme.sizes) == null ? void 0 : e.medium;
1015
+ padding-bottom: ${(e) => {
1016
+ var t;
1017
+ return (t = e.theme.sizes) == null ? void 0 : t.medium;
1013
1018
  }};
1014
1019
  }
1015
1020
 
@@ -1024,25 +1029,24 @@ const Be = ({ className: t }) => {
1024
1029
  h1 {
1025
1030
  font-weight: normal;
1026
1031
  }
1027
-
1028
- ${se(
1032
+ ${(e) => se(e)(
1029
1033
  "h1",
1030
1034
  f`
1031
- font-weight: normal;
1032
- `
1035
+ font-weight: normal;
1036
+ `
1033
1037
  )}
1034
- `, kt = ({ dispatch: t }) => {
1035
- const e = Ie(null);
1038
+ `, kt = ({ dispatch: e }) => {
1039
+ const t = Ie(null);
1036
1040
  return ce(() => {
1037
- e.current && e.current.parentNode && t("overlay-mounted", e.current);
1038
- }, [e]), /* @__PURE__ */ n.createElement(ie, {
1041
+ t.current && t.current.parentNode && e("overlay-mounted", t.current);
1042
+ }, [t]), /* @__PURE__ */ n.createElement(ie, {
1039
1043
  portalId: "humany-conversation-overlay-portal",
1040
1044
  className: "humany-conversation-overlay-outlet",
1041
- ref: e
1045
+ ref: t
1042
1046
  });
1043
1047
  }, Ct = ({
1044
- dispatch: t,
1045
- header: e,
1048
+ dispatch: e,
1049
+ header: t,
1046
1050
  buttonLabel: r
1047
1051
  }) => /* @__PURE__ */ n.createElement(St, {
1048
1052
  portalId: "humany-conversation-portal",
@@ -1053,80 +1057,80 @@ const Be = ({ className: t }) => {
1053
1057
  className: "humany-conversation-outlet-head-button",
1054
1058
  "aria-label": r,
1055
1059
  title: r,
1056
- onClick: () => t("hide-overlay-conversation")
1060
+ onClick: () => e("hide-overlay-conversation")
1057
1061
  }, /* @__PURE__ */ n.createElement(w, {
1058
1062
  symbol: {
1059
1063
  type: "Svg",
1060
1064
  content: "caret-down"
1061
1065
  },
1062
1066
  size: 20
1063
- })), e && /* @__PURE__ */ n.createElement(Lt, {
1067
+ })), t && /* @__PURE__ */ n.createElement(Lt, {
1064
1068
  className: "humany-conversation-outlet-header",
1065
1069
  variant: "h1"
1066
- }, e)), /* @__PURE__ */ n.createElement(fe, null)), St = a(ie)`
1070
+ }, t)), /* @__PURE__ */ n.createElement(fe, null)), St = a(ie)`
1067
1071
  z-index: 11;
1068
1072
  top: auto;
1069
1073
  height: 65%;
1070
1074
  background-color: #ffffff;
1071
1075
  display: flex;
1072
1076
  flex-direction: column;
1073
- border-top-right-radius: ${(t) => {
1074
- var e;
1075
- return (e = t.theme.sizes) == null ? void 0 : e.large;
1077
+ border-top-right-radius: ${(e) => {
1078
+ var t;
1079
+ return (t = e.theme.sizes) == null ? void 0 : t.large;
1076
1080
  }};
1077
- border-top-left-radius: ${(t) => {
1078
- var e;
1079
- return (e = t.theme.sizes) == null ? void 0 : e.large;
1081
+ border-top-left-radius: ${(e) => {
1082
+ var t;
1083
+ return (t = e.theme.sizes) == null ? void 0 : t.large;
1080
1084
  }};
1081
1085
  `, zt = a.div`
1082
1086
  display: flex;
1083
1087
  flex-direction: column;
1084
1088
  justify-content: center;
1085
1089
  align-items: center;
1086
- gap: ${(t) => {
1087
- var e;
1088
- return (e = t.theme.sizes) == null ? void 0 : e.normal;
1090
+ gap: ${(e) => {
1091
+ var t;
1092
+ return (t = e.theme.sizes) == null ? void 0 : t.normal;
1089
1093
  }};
1090
- padding: ${(t) => {
1091
- var e;
1092
- return (e = t.theme.sizes) == null ? void 0 : e.normal;
1094
+ padding: ${(e) => {
1095
+ var t;
1096
+ return (t = e.theme.sizes) == null ? void 0 : t.normal;
1093
1097
  }};
1094
- ${(t) => t.theme.border && `border-bottom: ${t.theme.border};`}
1098
+ ${(e) => e.theme.border && `border-bottom: ${e.theme.border};`}
1095
1099
  `, Lt = a(q)`
1096
- font-size: ${(t) => {
1097
- var e;
1098
- return (e = t.theme.fonts) == null ? void 0 : e.medium;
1100
+ font-size: ${(e) => {
1101
+ var t;
1102
+ return (t = e.theme.fonts) == null ? void 0 : t.medium;
1099
1103
  }};
1100
- color: ${(t) => {
1101
- var e;
1102
- return (e = t.theme.colors) == null ? void 0 : e.text;
1104
+ color: ${(e) => {
1105
+ var t;
1106
+ return (t = e.theme.colors) == null ? void 0 : t.text;
1103
1107
  }};
1104
1108
  margin: 0;
1105
1109
  `, Mt = a(L)`
1106
1110
  display: flex;
1107
1111
  align-items: center;
1108
1112
  justify-content: center;
1109
- padding: ${(t) => {
1110
- var e;
1111
- return (e = t.theme.sizes) == null ? void 0 : e.small;
1112
- }} ${(t) => {
1113
- var e;
1114
- return (e = t.theme.sizes) == null ? void 0 : e.medium;
1113
+ padding: ${(e) => {
1114
+ var t;
1115
+ return (t = e.theme.sizes) == null ? void 0 : t.small;
1116
+ }} ${(e) => {
1117
+ var t;
1118
+ return (t = e.theme.sizes) == null ? void 0 : t.medium;
1115
1119
  }};
1116
- ${(t) => t.theme.borderRadius && `border-radius: ${t.theme.borderRadius};`}
1120
+ ${(e) => e.theme.borderRadius && `border-radius: ${e.theme.borderRadius};`}
1117
1121
 
1118
1122
  &:focus-visible {
1119
1123
  ${b};
1120
1124
  }
1121
1125
 
1122
1126
  svg line {
1123
- stroke: ${(t) => {
1124
- var e;
1125
- return (e = t.theme.colors) == null ? void 0 : e.text;
1127
+ stroke: ${(e) => {
1128
+ var t;
1129
+ return (t = e.theme.colors) == null ? void 0 : t.text;
1126
1130
  }};
1127
1131
  }
1128
- `, Ft = (r) => {
1129
- var o = r, { className: t } = o, e = j(o, ["className"]);
1132
+ `, Wt = (r) => {
1133
+ var o = r, { className: e } = o, t = j(o, ["className"]);
1130
1134
  const {
1131
1135
  overlay: l,
1132
1136
  overlayConversationHeader: s,
@@ -1135,8 +1139,8 @@ const Be = ({ className: t }) => {
1135
1139
  } = M(), h = V();
1136
1140
  return /* @__PURE__ */ n.createElement(Me.Provider, {
1137
1141
  value: c ? { id: c } : null
1138
- }, /* @__PURE__ */ n.createElement(Ht, x(g({}, e), {
1139
- className: H(t, "humany-conversation-component")
1142
+ }, /* @__PURE__ */ n.createElement(Ht, x(g({}, t), {
1143
+ className: H(e, "humany-conversation-component")
1140
1144
  }), /* @__PURE__ */ n.createElement(fe, null)), l && /* @__PURE__ */ n.createElement(n.Fragment, null, /* @__PURE__ */ n.createElement(kt, {
1141
1145
  dispatch: h
1142
1146
  }), l.conversation && /* @__PURE__ */ n.createElement(Ct, {
@@ -1155,6 +1159,6 @@ const Be = ({ className: t }) => {
1155
1159
  flex-direction: column;
1156
1160
  `;
1157
1161
  export {
1158
- Ft as default
1162
+ Wt as default
1159
1163
  };
1160
- //# sourceMappingURL=conversation.b485c8d7.js.map
1164
+ //# sourceMappingURL=conversation.4aefedf8.js.map