@sendbird/ai-agent-messenger-react 1.3.1 → 1.3.2

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,19 +1,19 @@
1
1
  import * as r from "react";
2
2
  import { createContext as ve, useContext as Q, useEffect as L, useState as _, useId as bn, useRef as N, useCallback as R, useMemo as ae, forwardRef as ye, useImperativeHandle as Er, useLayoutEffect as le, lazy as T, Suspense as ke, Component as xr, Fragment as Ut, useReducer as Cr, Children as vr } from "react";
3
- import yr, { SendbirdProduct as _r, DeviceOsPlatform as Ht, SendbirdPlatform as Sr, ConnectionHandler as Je, SendbirdError as Tr, SessionHandler as wr, LogLevel as En, ConnectionState as Ar } from "@sendbird/chat";
4
- import u, { css as I, ThemeProvider as kr, useTheme as xt, createGlobalStyle as Ir, StyleSheetManager as $r, keyframes as xn } from "styled-components";
5
- import { format as Cn, isSameMinute as zt, isSameDay as Mr } from "date-fns";
6
- import { enUS as Or } from "date-fns/locale/en-US";
7
- import { AIAgentModule as Lr, ConversationStatus as W, ConversationType as Rr } from "@sendbird/chat/aiAgent";
8
- import { useGroupChannelMessages as Dr, useGroupChannelHandler as Xe, useForceUpdate as Nr } from "@sendbird/uikit-tools";
9
- import { GroupChannelModule as Pr, GroupChannelListOrder as vn, GroupChannelHandler as Br } from "@sendbird/chat/groupChannel";
10
- import { renderer as Fr, parser as Ur, MessageProvider as Hr } from "@sendbird/react-uikit-message-template-view";
11
- import { createMessageTemplate as zr } from "@sendbird/uikit-message-template";
3
+ import yr, { SendbirdChatOptions as _r, SendbirdProduct as Sr, DeviceOsPlatform as Ht, SendbirdPlatform as Tr, ConnectionHandler as Je, SendbirdError as wr, SessionHandler as Ar, LogLevel as En, ConnectionState as kr } from "@sendbird/chat";
4
+ import u, { css as I, ThemeProvider as Ir, useTheme as xt, createGlobalStyle as $r, StyleSheetManager as Mr, keyframes as xn } from "styled-components";
5
+ import { format as Cn, isSameMinute as zt, isSameDay as Or } from "date-fns";
6
+ import { enUS as Lr } from "date-fns/locale/en-US";
7
+ import { AIAgentModule as Rr, ConversationStatus as W, ConversationType as Dr } from "@sendbird/chat/aiAgent";
8
+ import { useGroupChannelMessages as Nr, useGroupChannelHandler as Xe, useForceUpdate as Pr } from "@sendbird/uikit-tools";
9
+ import { GroupChannelModule as Br, GroupChannelListOrder as vn, GroupChannelHandler as Fr } from "@sendbird/chat/groupChannel";
10
+ import { renderer as Ur, parser as Hr, MessageProvider as zr } from "@sendbird/react-uikit-message-template-view";
11
+ import { createMessageTemplate as Vr } from "@sendbird/uikit-message-template";
12
12
  import yn from "dompurify";
13
- import { SendingStatus as dt, MessageMetaArray as Vr } from "@sendbird/chat/message";
14
- import { isSameDay as Wr } from "date-fns/isSameDay";
15
- import { createPortal as Gr } from "react-dom";
16
- import jr from "@emotion/is-prop-valid";
13
+ import { SendingStatus as dt, MessageMetaArray as Wr } from "@sendbird/chat/message";
14
+ import { isSameDay as Gr } from "date-fns/isSameDay";
15
+ import { createPortal as jr } from "react-dom";
16
+ import Kr from "@emotion/is-prop-valid";
17
17
  const G = (e, t) => {
18
18
  const n = ve(null), o = ({ children: a, value: l }) => /* @__PURE__ */ r.createElement(n.Provider, { value: l }, typeof a == "function" ? a(l) : a), s = ({ children: a }) => /* @__PURE__ */ r.createElement(n.Consumer, null, (l) => l ? typeof a == "function" ? a(l) : a : null), i = () => {
19
19
  const a = Q(n);
@@ -61,18 +61,18 @@ function _e(e) {
61
61
  };
62
62
  }), s;
63
63
  }
64
- function Kr(...e) {
64
+ function Zr(...e) {
65
65
  return function({ children: n }) {
66
66
  return e.reduce((o, s) => /* @__PURE__ */ r.createElement(s, null, o), n);
67
67
  };
68
68
  }
69
69
  function ut() {
70
70
  }
71
- function Zr() {
71
+ function Yr() {
72
72
  const e = /iPad|iPhone|iPod/.test(navigator.userAgent), t = /Android/.test(navigator.userAgent);
73
73
  return e || t;
74
74
  }
75
- function Yr(e) {
75
+ function qr(e) {
76
76
  let t = 0;
77
77
  for (let n = 0; n < e.length; n++)
78
78
  t = (t << 5) - t + e.charCodeAt(n), t |= 0;
@@ -120,13 +120,13 @@ const Vt = (e) => {
120
120
  ui: ["suggested_replies", "cta_button", "message_template", "csat"],
121
121
  trail: ["groundedness", "manual", "function_calls"],
122
122
  marking: ["is_hallucination", "is_moderated", "flagged_types"]
123
- }, qr = "1.3.1", Ee = "sb-agent", Jr = qr, st = `@${Ee}`, Wt = ({ appId: e, aiAgentId: t, storage: n }) => {
123
+ }, Jr = "1.3.2", Ee = "sb-agent", Xr = Jr, st = `@${Ee}`, Wt = ({ appId: e, aiAgentId: t, storage: n }) => {
124
124
  const o = {
125
125
  templateBase: `${st}-template`,
126
126
  template: (s) => `${o.templateBase}/templates/${s}`,
127
127
  templateToken: () => `${o.templateBase}-template/message-template/tokens`,
128
128
  messengerSession: (s) => {
129
- const i = Yr(`${e}/${t}/${s}`);
129
+ const i = qr(`${e}/${t}/${s}`);
130
130
  return `${st}-udata/${i}`;
131
131
  },
132
132
  anonUserSession: () => `${st}-session/${e}/${t}`
@@ -189,7 +189,7 @@ class _n {
189
189
  this.logger = t, this.subscribers = {};
190
190
  }
191
191
  async send(t) {
192
- const n = Xr(), o = this.subscribers[t.type];
192
+ const n = Qr(), o = this.subscribers[t.type];
193
193
  if (o) {
194
194
  this.logger.debug(`messenger.dispatcher: dispatching command: ${t.type}`, t.payload);
195
195
  const s = o.map((i) => i(t.payload));
@@ -206,7 +206,7 @@ class _n {
206
206
  this.subscribers[t] && (this.subscribers[t] = this.subscribers[t].filter((o) => o !== n));
207
207
  }
208
208
  }
209
- const Xr = () => {
209
+ const Qr = () => {
210
210
  let e = ut, t = ut;
211
211
  return { promise: new Promise((o, s) => {
212
212
  e = o, t = s;
@@ -236,21 +236,22 @@ class Tn {
236
236
  function Gt(e, t, n) {
237
237
  const o = yr.init({
238
238
  appId: e,
239
- modules: [new Pr(), new Lr()],
239
+ modules: [new Br(), new Rr()],
240
240
  localCacheEnabled: !0,
241
+ options: new _r({ typingIndicatorInvalidateTime: 3e4 }),
241
242
  ...n
242
243
  });
243
244
  return o.addSendbirdExtensions(
244
- [{ version: Jr, product: _r.AI_AGENT, platform: t.platform }],
245
+ [{ version: Xr, product: Sr.AI_AGENT, platform: t.platform }],
245
246
  { platform: t.deviceOSPlatform, version: t.deviceOSVersion },
246
247
  t.customData
247
248
  ) || console.warn("Invalid Sendbird Extensions", t), o;
248
249
  }
249
250
  const {
250
- Provider: Qr,
251
+ Provider: eo,
251
252
  useContext: ue
252
253
  } = G("AIAgent");
253
- function eo({
254
+ function to({
254
255
  appId: e,
255
256
  aiAgentId: t,
256
257
  keyValueStorage: n,
@@ -264,8 +265,8 @@ function eo({
264
265
  logger: h,
265
266
  dispatcher: m,
266
267
  extensions: f = {
267
- platform: Sr.JS,
268
- deviceOSPlatform: Zr() ? Ht.MOBILE_WEB : Ht.WEB
268
+ platform: Tr.JS,
269
+ deviceOSPlatform: Yr() ? Ht.MOBILE_WEB : Ht.WEB
269
270
  }
270
271
  }) {
271
272
  const [x, E] = _(() => {
@@ -304,11 +305,11 @@ function eo({
304
305
  });
305
306
  }, [e, t, o, s, i, h, m, l]), L(() => () => {
306
307
  x.chatSDK.disconnectWebSocket();
307
- }, [x.chatSDK]), /* @__PURE__ */ r.createElement(Qr, { value: x }, d);
308
+ }, [x.chatSDK]), /* @__PURE__ */ r.createElement(eo, { value: x }, d);
308
309
  }
309
- const to = (e, t, n) => Dr(e, t, { ...n, strictStreamingOrder: !0 });
310
+ const no = (e, t, n) => Nr(e, t, { ...n, strictStreamingOrder: !0 });
310
311
  var mt = /* @__PURE__ */ ((e) => (e.ConversationClose = "conv.close", e))(mt || {});
311
- class no {
312
+ class ro {
312
313
  constructor(t = {}) {
313
314
  this.payload = t;
314
315
  }
@@ -316,18 +317,18 @@ class no {
316
317
  return JSON.stringify({ type: this.type, payload: this.payload });
317
318
  }
318
319
  }
319
- const ro = {
320
- CloseConversation: (e) => new oo(e)
320
+ const oo = {
321
+ CloseConversation: (e) => new so(e)
321
322
  };
322
- class oo extends no {
323
+ class so extends ro {
323
324
  constructor() {
324
325
  super(...arguments), this.type = "conv.close";
325
326
  }
326
327
  }
327
328
  const {
328
- Provider: so
329
+ Provider: io
329
330
  } = G("AIAgentConversation");
330
- function io({
331
+ function ao({
331
332
  children: e,
332
333
  channelUrl: t,
333
334
  onChannelDeleted: n,
@@ -338,7 +339,7 @@ function io({
338
339
  onAfterSendMessage: l = ut
339
340
  }) {
340
341
  var g;
341
- const { chatSDK: c, logger: d, dispatcher: h } = ue(), { channel: m, channelFetchError: f, fetchChannel: x } = ao(t), E = to(c, m, {
342
+ const { chatSDK: c, logger: d, dispatcher: h } = ue(), { channel: m, channelFetchError: f, fetchChannel: x } = lo(t), E = no(c, m, {
342
343
  shouldCountNewMessages: () => !1,
343
344
  onChannelDeleted: n,
344
345
  onMessagesReceived: (C) => o == null ? void 0 : o(C),
@@ -384,9 +385,9 @@ function io({
384
385
  }
385
386
  }
386
387
  };
387
- return /* @__PURE__ */ r.createElement(so, { value: b }, e);
388
+ return /* @__PURE__ */ r.createElement(io, { value: b }, e);
388
389
  }
389
- function ao(e) {
390
+ function lo(e) {
390
391
  const { chatSDK: t, logger: n } = ue(), [o, s] = _(void 0), [i, a] = _(void 0);
391
392
  async function l() {
392
393
  if (n.debug("conversation.fetchChannel: start"), s(void 0), a(void 0), e)
@@ -397,7 +398,7 @@ function ao(e) {
397
398
  const d = new Je({ onReconnectSucceeded: () => c.refresh() });
398
399
  t.addConnectionHandler(`sba-refresh-${e}`, d), n.debug("conversation.fetchChannel: fetched channel", c);
399
400
  } catch (c) {
400
- c instanceof Tr && a(c), n.error("conversation.fetchChannel: error", c);
401
+ c instanceof wr && a(c), n.error("conversation.fetchChannel: error", c);
401
402
  }
402
403
  }
403
404
  return L(() => {
@@ -408,7 +409,7 @@ function ao(e) {
408
409
  fetchChannel: l
409
410
  };
410
411
  }
411
- class lo {
412
+ class co {
412
413
  /**
413
414
  * Creates a new ConversationListCollection instance.
414
415
  * @param sdk - The Sendbird Chat SDK instance
@@ -423,7 +424,7 @@ class lo {
423
424
  deskChannelFilter: (l = this.filter) == null ? void 0 : l.deskChannelFilter,
424
425
  pinnedChannelUrls: (c = this.filter) == null ? void 0 : c.pinnedChannelUrls,
425
426
  limit: this._limit
426
- }), this._token = "", this._timestamp = Number.MAX_SAFE_INTEGER, this._isSyncing = !1, this._channelHandler = new Br({
427
+ }), this._token = "", this._timestamp = Number.MAX_SAFE_INTEGER, this._isSyncing = !1, this._channelHandler = new Fr({
427
428
  onChannelChanged: (d) => {
428
429
  d.isGroupChannel() && (this._query.belongsTo(d) ? this._addChannelsToView([d], !1) : this._removeChannelsFromView([d.url]));
429
430
  },
@@ -507,7 +508,7 @@ class lo {
507
508
  }
508
509
  const l = gt(this._channels, a), c = l < 0;
509
510
  !c && this._channels.splice(l, 1);
510
- const h = co(this._channels, a, this._order).place, m = h === this._channels.length;
511
+ const h = uo(this._channels, a, this._order).place, m = h === this._channels.length;
511
512
  c ? m ? (n || !this.hasMore) && (this._channels.push(a), s.push(a)) : (this._channels.splice(h, 0, a), s.push(a)) : (this._channels.splice(h, 0, a), i.push(a));
512
513
  }
513
514
  return { addedChannels: s, updatedChannels: i, unmatchedChannelUrls: o };
@@ -584,7 +585,7 @@ class lo {
584
585
  this._isDisposed || (this._isDisposed = !0, this._collectionEventHandler = void 0, this._sdk.removeConnectionHandler(this._handlerId), this._sdk.groupChannel.removeGroupChannelHandler(this._handlerId), this._pinnedChannels.length = 0, this._channels.length = 0);
585
586
  }
586
587
  }
587
- const gt = (e, t) => e.findIndex((n) => n.isIdentical(t)), co = (e, t, n) => {
588
+ const gt = (e, t) => e.findIndex((n) => n.isIdentical(t)), uo = (e, t, n) => {
588
589
  if (e.length > 0) {
589
590
  const o = gt(e, t);
590
591
  let s = 0, i = e.length - 1, a = Math.floor((s + i) / 2);
@@ -611,14 +612,14 @@ const gt = (e, t) => e.findIndex((n) => n.isIdentical(t)), co = (e, t, n) => {
611
612
  return 0;
612
613
  }
613
614
  };
614
- function uo(e, t) {
615
+ function mo(e, t) {
615
616
  var E, b, g, C, v, S, k, F;
616
617
  const n = bn(), [o, s] = _(!1), [i, a] = _(null), [l, c] = _([]), [d, h] = _(null), m = N(!1), f = R(async () => {
617
618
  if (!m.current && e.currentUser) {
618
619
  m.current = !0, s(!1), a(null), c([]);
619
620
  try {
620
621
  d == null || d.dispose();
621
- const $ = new lo(e, t);
622
+ const $ = new co(e, t);
622
623
  $.setConversationListCollectionHandler({
623
624
  onChannelsAdded: () => {
624
625
  c($.channels);
@@ -664,9 +665,9 @@ function uo(e, t) {
664
665
  };
665
666
  }
666
667
  const {
667
- Provider: mo
668
+ Provider: go
668
669
  } = G("AIAgentConversationList");
669
- function go({
670
+ function ho({
670
671
  conversationListLimit: e,
671
672
  conversationListFilter: t,
672
673
  children: n
@@ -676,7 +677,7 @@ function go({
676
677
  ...a,
677
678
  ...(f = i == null ? void 0 : i.conversationListParams) == null ? void 0 : f.filter,
678
679
  ...t
679
- }, d = uo(o, { limit: l, filter: c }), h = {
680
+ }, d = mo(o, { limit: l, filter: c }), h = {
680
681
  listSource: {
681
682
  initialized: d.initialized,
682
683
  error: d.error ?? void 0,
@@ -684,7 +685,7 @@ function go({
684
685
  loadMore: () => d.loadMore()
685
686
  }
686
687
  };
687
- return /* @__PURE__ */ r.createElement(mo, { value: h }, n);
688
+ return /* @__PURE__ */ r.createElement(go, { value: h }, n);
688
689
  }
689
690
  const ht = {
690
691
  DEFAULT_BOT_MSG_BG: "#eeeeee",
@@ -694,7 +695,7 @@ const ht = {
694
695
  function wn(e) {
695
696
  return e.length === 4 ? `#${[...e.slice(1)].map((t) => t + t).join("")}` : e;
696
697
  }
697
- function ho(e) {
698
+ function po(e) {
698
699
  const t = wn(e);
699
700
  return [
700
701
  parseInt(t.slice(1, 3), 16),
@@ -705,17 +706,17 @@ function ho(e) {
705
706
  // b
706
707
  ];
707
708
  }
708
- function po(e) {
709
+ function fo(e) {
709
710
  return `#${e.map((t) => t.toString(16).padStart(2, "0")).join("")}`;
710
711
  }
711
- function fo(e, t, n) {
712
+ function bo(e, t, n) {
712
713
  e /= 255, t /= 255, n /= 255;
713
714
  const o = Math.max(e, t, n), s = Math.min(e, t, n), i = o - s;
714
715
  let a = 0, l = 0;
715
716
  const c = (o + s) / 2;
716
717
  return o !== s && (l = c > 0.5 ? i / (2 - o - s) : i / (o + s)), o === e ? a = (t - n) / i + (t < n ? 6 : 0) : o === t ? a = (n - e) / i + 2 : o === n && (a = (e - t) / i + 4), a /= 6, [a, l, c];
717
718
  }
718
- function bo(e, t, n) {
719
+ function Eo(e, t, n) {
719
720
  let o, s, i;
720
721
  if (t === 0)
721
722
  o = s = i = n;
@@ -728,10 +729,10 @@ function bo(e, t, n) {
728
729
  return [Math.round(o * 255), Math.round(s * 255), Math.round(i * 255)];
729
730
  }
730
731
  function Be(e, t, n) {
731
- const [o, s, i] = ho(e), [a, l, c] = fo(o, s, i), d = Math.max(0, Math.min(1, c * t)), h = Math.max(0, Math.min(1, l * n)), [m, f, x] = bo(a, h, d);
732
- return po([Math.round(m), Math.round(f), Math.round(x)]);
732
+ const [o, s, i] = po(e), [a, l, c] = bo(o, s, i), d = Math.max(0, Math.min(1, c * t)), h = Math.max(0, Math.min(1, l * n)), [m, f, x] = Eo(a, h, d);
733
+ return fo([Math.round(m), Math.round(f), Math.round(x)]);
733
734
  }
734
- function Eo(e, t = "light") {
735
+ function xo(e, t = "light") {
735
736
  return {
736
737
  extraDark: Be(e, 0.6, 1.2),
737
738
  dark: Be(e, 0.85, 1.1),
@@ -744,7 +745,7 @@ function pt(e) {
744
745
  const t = wn(e), n = 149, o = +`0x${t[1]}${t[2]}`, s = +`0x${t[3]}${t[4]}`, i = +`0x${t[5]}${t[6]}`;
745
746
  return o * 0.299 + s * 0.587 + i * 0.114 > n ? ht.BLACK : ht.WHITE;
746
747
  }
747
- function xo(e, t, n, o, s) {
748
+ function Co(e, t, n, o, s) {
748
749
  return {
749
750
  base: {
750
751
  primary: t,
@@ -773,7 +774,7 @@ function xo(e, t, n, o, s) {
773
774
  }
774
775
  };
775
776
  }
776
- const Co = (e, t, n, o, s) => ({
777
+ const vo = (e, t, n, o, s) => ({
777
778
  base: {
778
779
  primary: t,
779
780
  primaryContrastContent: n,
@@ -867,7 +868,7 @@ const Co = (e, t, n, o, s) => ({
867
868
  caption4: { fontSize: 11, fontWeight: 400 }
868
869
  };
869
870
  function Kt(e) {
870
- const t = vo(e), { colors: n, aiAgentColorVariables: o } = yo(e, t), s = So(e);
871
+ const t = yo(e), { colors: n, aiAgentColorVariables: o } = _o(e, t), s = To(e);
871
872
  return {
872
873
  selectedTheme: e.selectedTheme,
873
874
  palette: t,
@@ -876,18 +877,18 @@ function Kt(e) {
876
877
  typography: s
877
878
  };
878
879
  }
879
- function vo({ selectedTheme: e, palette: t, primary: n }) {
880
- const o = t != null && t.primary ? t.primary : n ? n === Fe.primary.main ? Fe.primary : Eo(n, e) : Fe.primary;
880
+ function yo({ selectedTheme: e, palette: t, primary: n }) {
881
+ const o = t != null && t.primary ? t.primary : n ? n === Fe.primary.main ? Fe.primary : xo(n, e) : Fe.primary;
881
882
  return {
882
883
  ...Fe,
883
884
  primary: o,
884
885
  ...t
885
886
  };
886
887
  }
887
- function yo({ selectedTheme: e, primaryContrast: t, botMessageBackground: n, botMessageBackgroundContrast: o }, s) {
888
+ function _o({ selectedTheme: e, primaryContrast: t, botMessageBackground: n, botMessageBackgroundContrast: o }, s) {
888
889
  const i = s.primary.main, a = t ?? pt(i), l = n ?? ht.DEFAULT_BOT_MSG_BG, c = o ?? pt(l);
889
890
  return {
890
- colors: (e === "light" ? xo : Co)(
891
+ colors: (e === "light" ? Co : vo)(
891
892
  s,
892
893
  i,
893
894
  a,
@@ -902,14 +903,14 @@ function yo({ selectedTheme: e, primaryContrast: t, botMessageBackground: n, bot
902
903
  }
903
904
  };
904
905
  }
905
- function _o(e, t, n) {
906
+ function So(e, t, n) {
906
907
  const o = { ...e };
907
908
  return n.forEach((s) => {
908
909
  const i = t[s];
909
910
  i != null && (o[s] = i);
910
911
  }), o;
911
912
  }
912
- function So({ typography: e }) {
913
+ function To({ typography: e }) {
913
914
  if (!e)
914
915
  return it;
915
916
  const t = { ...it };
@@ -917,15 +918,15 @@ function So({ typography: e }) {
917
918
  const o = e[n];
918
919
  if (o && typeof o == "object") {
919
920
  const s = it[n], i = ["fontSize", "fontWeight", "fontFamily", "lineHeight"];
920
- t[n] = _o(s, o, i);
921
+ t[n] = So(s, o, i);
921
922
  }
922
923
  }), t;
923
924
  }
924
925
  const {
925
- Provider: To,
926
+ Provider: wo,
926
927
  useContext: Ct
927
928
  } = G("AIAgentTheme");
928
- function wo({ logger: e, palette: t, typography: n, appearance: o, children: s }) {
929
+ function Ao({ logger: e, palette: t, typography: n, appearance: o, children: s }) {
929
930
  const [i, a] = _(
930
931
  () => Kt({
931
932
  selectedTheme: (o == null ? void 0 : o.theme) ?? "light",
@@ -950,15 +951,15 @@ function wo({ logger: e, palette: t, typography: n, appearance: o, children: s }
950
951
  );
951
952
  return L(() => {
952
953
  (o != null && o.theme || o != null && o.primaryColor || o != null && o.botMessageBackgroundColor) && l(i.selectedTheme);
953
- }, [o == null ? void 0 : o.theme, o == null ? void 0 : o.primaryColor, o == null ? void 0 : o.botMessageBackgroundColor]), /* @__PURE__ */ r.createElement(To, { value: { theme: i, updateTheme: l } }, s);
954
+ }, [o == null ? void 0 : o.theme, o == null ? void 0 : o.primaryColor, o == null ? void 0 : o.botMessageBackgroundColor]), /* @__PURE__ */ r.createElement(wo, { value: { theme: i, updateTheme: l } }, s);
954
955
  }
955
- function Ao() {
956
+ function ko() {
956
957
  const { chatSDK: e, logger: t } = ue(), n = R(
957
958
  async (s, i, a) => {
958
959
  if (t.debug("useChatConnection.connect: start, session", s.userId), i) {
959
- const l = new wr({
960
+ const l = new Ar({
960
961
  ...i,
961
- onSessionTokenRequired: ko(i.onSessionTokenRequired, a)
962
+ onSessionTokenRequired: Io(i.onSessionTokenRequired, a)
962
963
  });
963
964
  e.setSessionHandler(l);
964
965
  }
@@ -970,7 +971,7 @@ function Ao() {
970
971
  }, [e, t]);
971
972
  return { connect: n, disconnect: o };
972
973
  }
973
- function ko(e, t) {
974
+ function Io(e, t) {
974
975
  if (e)
975
976
  return async (n, o) => {
976
977
  new Promise((s, i) => e == null ? void 0 : e(s, i)).then((s) => {
@@ -980,17 +981,17 @@ function ko(e, t) {
980
981
  });
981
982
  };
982
983
  }
983
- class Io {
984
+ class $o {
984
985
  constructor({ userId: t, authToken: n, sessionHandler: o }) {
985
986
  this.userId = t, this.authToken = n, this.sessionHandler = o;
986
987
  }
987
988
  }
988
989
  class Zt {
989
990
  }
990
- const $o = 24 * 60 * 60 * 1e3, Mo = (e) => {
991
+ const Mo = 24 * 60 * 60 * 1e3, Oo = (e) => {
991
992
  const { logger: t, cache: n } = ue(), o = () => {
992
993
  const i = n.messenger.getAnonUser();
993
- return i ? i.expireAt - $o <= Date.now() ? (t.debug("useUserSessionCandidate.getAnonymousSessionInfo: auto session expired, clear cache"), n.messenger.clear(i.userId), null) : (t.debug("useUserSessionCandidate.getAnonymousSessionInfo: auto session info detected"), i) : null;
994
+ return i ? i.expireAt - Mo <= Date.now() ? (t.debug("useUserSessionCandidate.getAnonymousSessionInfo: auto session expired, clear cache"), n.messenger.clear(i.userId), null) : (t.debug("useUserSessionCandidate.getAnonymousSessionInfo: auto session info detected"), i) : null;
994
995
  }, s = () => {
995
996
  if (!e || e instanceof Zt)
996
997
  throw new Error("userSessionInfo must be an instance of ManualSessionInfo");
@@ -999,7 +1000,7 @@ const $o = 24 * 60 * 60 * 1e3, Mo = (e) => {
999
1000
  `useUserSessionCandidate.getManualSessionInfo: missing required keys in userSessionInfo: ${i.join(", ")}`
1000
1001
  ), t.debug("useUserSessionCandidate.getManualSessionInfo: manual session info detected"), e;
1001
1002
  };
1002
- return ae(() => e instanceof Io ? s() : e instanceof Zt ? o() : e && typeof e == "object" ? (t.warn("Please use ManualSessionInfo instead of the old userSessionInfo format."), s()) : e === void 0 ? (t.warn("Please use AnonymousSessionInfo instead of undefined userSessionInfo."), o()) : null, [
1003
+ return ae(() => e instanceof $o ? s() : e instanceof Zt ? o() : e && typeof e == "object" ? (t.warn("Please use ManualSessionInfo instead of the old userSessionInfo format."), s()) : e === void 0 ? (t.warn("Please use AnonymousSessionInfo instead of undefined userSessionInfo."), o()) : null, [
1003
1004
  t,
1004
1005
  e == null ? void 0 : e.userId,
1005
1006
  e == null ? void 0 : e.authToken,
@@ -1008,7 +1009,7 @@ const $o = 24 * 60 * 60 * 1e3, Mo = (e) => {
1008
1009
  n.messenger.clear
1009
1010
  ]);
1010
1011
  };
1011
- function Oo({
1012
+ function Lo({
1012
1013
  userSessionInfo: e,
1013
1014
  onPreAuth: t,
1014
1015
  onPostAuth: n,
@@ -1017,7 +1018,7 @@ function Oo({
1017
1018
  onPostDeauth: i,
1018
1019
  forceCreateChannel: a
1019
1020
  }) {
1020
- const { aiAgentId: l, chatSDK: c, language: d, context: h, countryCode: m, logger: f, cache: x } = ue(), { connect: E, disconnect: b } = Ao(), g = Mo(e), C = R(async () => {
1021
+ const { aiAgentId: l, chatSDK: c, language: d, context: h, countryCode: m, logger: f, cache: x } = ue(), { connect: E, disconnect: b } = ko(), g = Oo(e), C = R(async () => {
1021
1022
  var $;
1022
1023
  f.debug("useAuthentication.authenticate: start");
1023
1024
  const S = (g == null ? void 0 : g.userId) && (($ = x.messenger.getSettings(g.userId)) == null ? void 0 : $.knownActiveChannelUrl), k = await c.aiAgent.requestMessengerSettings({
@@ -1078,11 +1079,11 @@ const An = (e) => {
1078
1079
  return JSON.stringify(e).slice(1, -1);
1079
1080
  }
1080
1081
  }, $e = (e) => JSON.parse(e), Qe = (e) => JSON.parse(e);
1081
- function Lo(e, t) {
1082
+ function Ro(e, t) {
1082
1083
  const [n, o] = t.split(",").map((s) => s.trim());
1083
1084
  return e === "dark" && o || n;
1084
1085
  }
1085
- function Ro(e) {
1086
+ function Do(e) {
1086
1087
  const t = {};
1087
1088
  function n(o, s = "") {
1088
1089
  for (const [i, a] of Object.entries(o)) {
@@ -1105,7 +1106,7 @@ function vt({
1105
1106
  return s.replace(c, An(l));
1106
1107
  }, e);
1107
1108
  }
1108
- async function Do({
1109
+ async function No({
1109
1110
  template: e,
1110
1111
  variables: t,
1111
1112
  variableKeyPattern: n,
@@ -1118,7 +1119,7 @@ async function Do({
1118
1119
  })
1119
1120
  )).reduce((i, { regex: a, transformedValue: l }) => i.replace(a, An(l)), e);
1120
1121
  }
1121
- const No = () => {
1122
+ const Po = () => {
1122
1123
  const { chatSDK: e, logger: t, cache: n } = ue(), o = R(() => {
1123
1124
  var l, c;
1124
1125
  const i = (c = (l = e.appInfo) == null ? void 0 : l.aiAgentInfo) == null ? void 0 : c.templateListToken;
@@ -1143,21 +1144,21 @@ const No = () => {
1143
1144
  };
1144
1145
  };
1145
1146
  var je = /* @__PURE__ */ ((e) => (e.OFF = "off", e.ALWAYS = "always", e.HANDED_OFF_ONLY = "handed_off_only", e))(je || {});
1146
- const Po = {
1147
+ const Bo = {
1147
1148
  off: "off",
1148
1149
  always: "always",
1149
1150
  handed_off_only: "handed_off_only"
1150
1151
  /* HANDED_OFF_ONLY */
1151
1152
  }, {
1152
- Provider: Bo
1153
- } = G("AIAgentMessengerSession"), Fo = ye(
1153
+ Provider: Fo
1154
+ } = G("AIAgentMessengerSession"), Uo = ye(
1154
1155
  function({ userSessionInfo: e, forceCreateChannel: t, children: n }, o) {
1155
1156
  const { appId: s, aiAgentId: i, chatSDK: a, language: l, countryCode: c, context: d, cache: h, logger: m } = ue(), { updateTheme: f } = Ct(), [x, E] = _(void 0), [b, g] = _(
1156
1157
  void 0
1157
1158
  ), [C, v] = _(null), [S, k] = _(null), [F, $] = _(null), [V, re] = _(
1158
1159
  "handed_off_only"
1159
1160
  /* HANDED_OFF_ONLY */
1160
- ), { shouldSyncCachedTemplate: y, syncCachedTemplates: H } = No(), { authenticate: oe, deauthenticate: Y } = Oo({
1161
+ ), { shouldSyncCachedTemplate: y, syncCachedTemplates: H } = Po(), { authenticate: oe, deauthenticate: Y } = Lo({
1161
1162
  userSessionInfo: e,
1162
1163
  forceCreateChannel: t,
1163
1164
  onPreAuth: R((A, D) => {
@@ -1182,7 +1183,7 @@ const Po = {
1182
1183
  type: A.launcher.image_type || "default_icon",
1183
1184
  imageUrl: A.launcher.image_url
1184
1185
  }), re(
1185
- Po[A.active_channel.attachment_mode] ?? "handed_off_only"
1186
+ Bo[A.active_channel.attachment_mode] ?? "handed_off_only"
1186
1187
  /* HANDED_OFF_ONLY */
1187
1188
  );
1188
1189
  }, []),
@@ -1275,7 +1276,7 @@ const Po = {
1275
1276
  }
1276
1277
  };
1277
1278
  }, [oe, Y, b, a, i, m]), /* @__PURE__ */ r.createElement(
1278
- Bo,
1279
+ Fo,
1279
1280
  {
1280
1281
  value: {
1281
1282
  userSessionInfo: e,
@@ -1296,7 +1297,7 @@ const Po = {
1296
1297
  );
1297
1298
  }
1298
1299
  );
1299
- function Uo(e) {
1300
+ function Ho(e) {
1300
1301
  let t = "pending", n = e.then((o) => {
1301
1302
  t = "resolved", n = o;
1302
1303
  }).catch((o) => {
@@ -1311,10 +1312,10 @@ function Uo(e) {
1311
1312
  };
1312
1313
  }
1313
1314
  const {
1314
- Provider: Ho,
1315
+ Provider: zo,
1315
1316
  useContext: kn
1316
1317
  } = G("MessageTemplateFetching");
1317
- function zo({ children: e, internalVariables: t }) {
1318
+ function Vo({ children: e, internalVariables: t }) {
1318
1319
  const n = N({}), o = N({}), [s, i] = _({}), a = R((d, h) => {
1319
1320
  i((m) => ({
1320
1321
  ...m,
@@ -1346,7 +1347,7 @@ function zo({ children: e, internalVariables: t }) {
1346
1347
  suspend: (d, h) => {
1347
1348
  if (n.current[d])
1348
1349
  return n.current[d];
1349
- const m = Uo(h());
1350
+ const m = Ho(h());
1350
1351
  return n.current[d] = m, m;
1351
1352
  },
1352
1353
  getIsFetching: (d) => {
@@ -1358,14 +1359,14 @@ function zo({ children: e, internalVariables: t }) {
1358
1359
  return ((h = s[d]) == null ? void 0 : h.error) ?? !1;
1359
1360
  }
1360
1361
  };
1361
- return /* @__PURE__ */ r.createElement(Ho, { value: c }, e);
1362
+ return /* @__PURE__ */ r.createElement(zo, { value: c }, e);
1362
1363
  }
1363
1364
  const et = {
1364
1365
  VARIABLE: (e) => new RegExp(`\\{${e}\\}`, "g"),
1365
1366
  VIEW_VARIABLE: (e) => new RegExp(`"{@${e}}"`, "g")
1366
1367
  };
1367
1368
  function ce({ uiTemplateString: e, variables: t = {} }) {
1368
- const n = Ro(t);
1369
+ const n = Do(t);
1369
1370
  return vt({
1370
1371
  template: e,
1371
1372
  variables: n,
@@ -1381,10 +1382,10 @@ function de({
1381
1382
  template: t,
1382
1383
  variables: n,
1383
1384
  variableKeyPattern: (o) => et.VARIABLE(o),
1384
- variableValueTransformer: (o) => Lo(e, o)
1385
+ variableValueTransformer: (o) => Ro(e, o)
1385
1386
  });
1386
1387
  }
1387
- function Vo({
1388
+ function Wo({
1388
1389
  theme: e,
1389
1390
  uiTemplateString: t,
1390
1391
  viewVariables: n = {},
@@ -1421,7 +1422,7 @@ function Vo({
1421
1422
  }
1422
1423
  });
1423
1424
  }
1424
- async function Wo({
1425
+ async function Go({
1425
1426
  theme: e,
1426
1427
  uiTemplateString: t,
1427
1428
  viewVariables: n = {},
@@ -1429,7 +1430,7 @@ async function Wo({
1429
1430
  internalVariables: s,
1430
1431
  onRequestTemplate: i
1431
1432
  }) {
1432
- return Do({
1433
+ return No({
1433
1434
  template: t,
1434
1435
  variables: n,
1435
1436
  variableKeyPattern: (a) => et.VIEW_VARIABLE(a),
@@ -1457,7 +1458,7 @@ async function Wo({
1457
1458
  }
1458
1459
  });
1459
1460
  }
1460
- const Go = ({
1461
+ const jo = ({
1461
1462
  rawTemplate: e,
1462
1463
  aiAgentColorVariables: t,
1463
1464
  internalVariables: n,
@@ -1466,7 +1467,7 @@ const Go = ({
1466
1467
  const { ui_template: s, color_variables: i } = $e(e);
1467
1468
  let a = JSON.stringify(s);
1468
1469
  if (Object.keys(o.viewVariables ?? {}).length > 0) {
1469
- const c = Vo({
1470
+ const c = Wo({
1470
1471
  ...o,
1471
1472
  uiTemplateString: a,
1472
1473
  aiAgentColorVariables: t,
@@ -1476,7 +1477,7 @@ const Go = ({
1476
1477
  a = c;
1477
1478
  }
1478
1479
  return a = ce({ ...o, uiTemplateString: a, variables: n }), a = de({ ...o, uiTemplateString: a, colorVariables: i }), a = de({ ...o, uiTemplateString: a, colorVariables: t }), a = ce({ ...o, uiTemplateString: a }), Qe(a);
1479
- }, jo = async ({
1480
+ }, Ko = async ({
1480
1481
  rawTemplate: e,
1481
1482
  aiAgentColorVariables: t,
1482
1483
  internalVariables: n,
@@ -1484,17 +1485,17 @@ const Go = ({
1484
1485
  }) => {
1485
1486
  const { ui_template: s, color_variables: i } = $e(e);
1486
1487
  let a = JSON.stringify(s);
1487
- return Object.keys(o.viewVariables ?? {}).length > 0 && (a = await Wo({
1488
+ return Object.keys(o.viewVariables ?? {}).length > 0 && (a = await Go({
1488
1489
  ...o,
1489
1490
  uiTemplateString: a,
1490
1491
  aiAgentColorVariables: t,
1491
1492
  internalVariables: n
1492
1493
  })), a = ce({ ...o, uiTemplateString: a, variables: n }), a = de({ ...o, uiTemplateString: a, colorVariables: i }), a = de({ ...o, uiTemplateString: a, colorVariables: t }), a = ce({ ...o, uiTemplateString: a }), Qe(a);
1493
- }, Ko = (e) => {
1494
+ }, Zo = (e) => {
1494
1495
  const { aiAgentColorVariables: t = {} } = e, { internalVariables: n } = kn();
1495
1496
  return _(() => {
1496
1497
  const o = e.onGetCachedTemplate(e.templateKey);
1497
- return o ? Go({
1498
+ return o ? jo({
1498
1499
  ...e,
1499
1500
  rawTemplate: o,
1500
1501
  aiAgentColorVariables: t,
@@ -1502,20 +1503,20 @@ const Go = ({
1502
1503
  onRequestTemplate: e.onGetCachedTemplate
1503
1504
  }) : null;
1504
1505
  });
1505
- }, Zo = (e) => {
1506
- const [t] = Ko(e);
1506
+ }, Yo = (e) => {
1507
+ const [t] = Zo(e);
1507
1508
  if (t) return t;
1508
1509
  const { aiAgentColorVariables: n = {} } = e, { internalVariables: o, fetchTemplate: s, suspend: i } = kn();
1509
1510
  return i(e.templateKey, async () => {
1510
1511
  const l = await s({ ...e, suspense: !0 });
1511
- return await jo({
1512
+ return await Ko({
1512
1513
  ...e,
1513
1514
  rawTemplate: l,
1514
1515
  aiAgentColorVariables: n,
1515
1516
  internalVariables: o
1516
1517
  });
1517
1518
  }).value;
1518
- }, Yo = '@import"https://fonts.googleapis.com/css?family=Roboto:400,500,600,700&display=swap";.sb-message-template__border{position:relative}.sb-message-template__border:after{content:"";position:absolute;top:0;bottom:0;left:0;right:0;z-index:1;box-shadow:inset 0 0 0 var(--border-width) var(--border-color);border-radius:var(--border-radius);pointer-events:none}.sb-message-template__action{cursor:pointer}.sb-message-template__parent{font-family:Roboto,serif}.sb-message-template__text{font-family:inherit;font-size:14px;font-weight:400;font-stretch:normal;font-style:normal;letter-spacing:normal;text-align:left}.sb-message-template__text-button{font-family:inherit;background-color:#e0e0e0;text-align:center;padding:10px;border-radius:6px;font-size:14px;font-weight:600;font-stretch:normal;font-style:normal;letter-spacing:normal}.sendbird-theme--light .sb-message-template__text-button{color:#742ddd}.sendbird-theme--dark .sb-message-template__text-button{color:#c2a9fa}.sb-message-template__text-button:hover{opacity:1;box-shadow:#0000001a 0 1px 3px,#0000000f 0 1px 2px}.sb-message-template__text-button,.sb-message-template__image-button{cursor:pointer;border-style:none}.sb-message-template__parent{border-radius:unset;background-color:transparent;overflow:hidden}.sb-message-template__parent *{box-sizing:border-box;line-height:1.3}.sb-message-template__carousel{display:flex;width:100%;box-sizing:border-box;touch-action:pan-y}', Me = "en", qo = /* @__PURE__ */ new Set([
1519
+ }, qo = '@import"https://fonts.googleapis.com/css?family=Roboto:400,500,600,700&display=swap";.sb-message-template__border{position:relative}.sb-message-template__border:after{content:"";position:absolute;top:0;bottom:0;left:0;right:0;z-index:1;box-shadow:inset 0 0 0 var(--border-width) var(--border-color);border-radius:var(--border-radius);pointer-events:none}.sb-message-template__action{cursor:pointer}.sb-message-template__parent{font-family:Roboto,serif}.sb-message-template__text{font-family:inherit;font-size:14px;font-weight:400;font-stretch:normal;font-style:normal;letter-spacing:normal;text-align:left}.sb-message-template__text-button{font-family:inherit;background-color:#e0e0e0;text-align:center;padding:10px;border-radius:6px;font-size:14px;font-weight:600;font-stretch:normal;font-style:normal;letter-spacing:normal}.sendbird-theme--light .sb-message-template__text-button{color:#742ddd}.sendbird-theme--dark .sb-message-template__text-button{color:#c2a9fa}.sb-message-template__text-button:hover{opacity:1;box-shadow:#0000001a 0 1px 3px,#0000000f 0 1px 2px}.sb-message-template__text-button,.sb-message-template__image-button{cursor:pointer;border-style:none}.sb-message-template__parent{border-radius:unset;background-color:transparent;overflow:hidden}.sb-message-template__parent *{box-sizing:border-box;line-height:1.3}.sb-message-template__carousel{display:flex;width:100%;box-sizing:border-box;touch-action:pan-y}', Me = "en", Jo = /* @__PURE__ */ new Set([
1519
1520
  Me,
1520
1521
  "ko",
1521
1522
  "es",
@@ -1526,7 +1527,7 @@ const Go = ({
1526
1527
  "de",
1527
1528
  "tr",
1528
1529
  "ja"
1529
- ]), Jo = (e, t, n) => {
1530
+ ]), Xo = (e, t, n) => {
1530
1531
  const o = e[t];
1531
1532
  return o ? typeof o == "function" ? o() : Promise.resolve(o) : new Promise((s, i) => {
1532
1533
  (typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(
@@ -1538,7 +1539,7 @@ const Go = ({
1538
1539
  )
1539
1540
  );
1540
1541
  });
1541
- }, Xo = Or, Qo = {
1542
+ }, Qo = Lr, es = {
1542
1543
  // Channel - Common
1543
1544
  CHANNEL_FROZEN: "Channel frozen",
1544
1545
  PLACE_HOLDER__WRONG: "Something went wrong",
@@ -1591,30 +1592,30 @@ const Go = ({
1591
1592
  DATE_FORMAT__CONVERSATION_LIST__LIST_ITEM_TITLE_CAPTION: "h:mma",
1592
1593
  // Citation
1593
1594
  CITATION_SOURCE_TITLE: "Source"
1594
- }, yt = { language: "en", dateLocale: Xo, stringSet: Qo }, es = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1595
+ }, yt = { language: "en", dateLocale: Qo, stringSet: es }, ts = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1595
1596
  __proto__: null,
1596
1597
  default: yt
1597
1598
  }, Symbol.toStringTag, { value: "Module" })), Ke = /* @__PURE__ */ new Map([[Me, yt]]);
1598
- async function ts(e) {
1599
+ async function ns(e) {
1599
1600
  if (Ke.has(e))
1600
1601
  return Ke.get(e);
1601
- const t = qo.has(e) ? e : Me;
1602
+ const t = Jo.has(e) ? e : Me;
1602
1603
  try {
1603
- const { default: n } = await Jo(/* @__PURE__ */ Object.assign({ "./languages/de.ts": () => import("./BAebVbLs.js"), "./languages/en.ts": () => Promise.resolve().then(() => es), "./languages/es.ts": () => import("./BKSUGIyL.js"), "./languages/fr.ts": () => import("./B1s75De5.js"), "./languages/hi.ts": () => import("./D0QwWNMF.js"), "./languages/it.ts": () => import("./CA1gVgSD.js"), "./languages/ja.ts": () => import("./DcqbdvlW.js"), "./languages/ko.ts": () => import("./Dxrtj2R8.js"), "./languages/pt.ts": () => import("./EylKxx4d.js"), "./languages/tr.ts": () => import("./DYR8UT_l.js") }), `./languages/${t}.ts`, 3);
1604
+ const { default: n } = await Xo(/* @__PURE__ */ Object.assign({ "./languages/de.ts": () => import("./BAebVbLs.js"), "./languages/en.ts": () => Promise.resolve().then(() => ts), "./languages/es.ts": () => import("./BKSUGIyL.js"), "./languages/fr.ts": () => import("./B1s75De5.js"), "./languages/hi.ts": () => import("./D0QwWNMF.js"), "./languages/it.ts": () => import("./CA1gVgSD.js"), "./languages/ja.ts": () => import("./DcqbdvlW.js"), "./languages/ko.ts": () => import("./Dxrtj2R8.js"), "./languages/pt.ts": () => import("./EylKxx4d.js"), "./languages/tr.ts": () => import("./DYR8UT_l.js") }), `./languages/${t}.ts`, 3);
1604
1605
  return Ke.set(e, n), n;
1605
1606
  } catch {
1606
1607
  return yt;
1607
1608
  }
1608
1609
  }
1609
1610
  const {
1610
- Provider: ns,
1611
+ Provider: rs,
1611
1612
  useContext: O
1612
1613
  } = G("Localization");
1613
- function rs(e) {
1614
+ function os(e) {
1614
1615
  var t;
1615
1616
  return ((t = e.split("-")) == null ? void 0 : t[0]) ?? Me;
1616
1617
  }
1617
- function os({
1618
+ function ss({
1618
1619
  language: e = navigator.language,
1619
1620
  logger: t,
1620
1621
  stringSet: n,
@@ -1622,10 +1623,10 @@ function os({
1622
1623
  }) {
1623
1624
  const [s, i] = _(Ke.get(Me));
1624
1625
  return L(() => {
1625
- const a = rs(e);
1626
- s.language !== a && (t == null || t.debug("localization.useEffect: update language", `${s.language} -> ${a}`), ts(a).then(i));
1626
+ const a = os(e);
1627
+ s.language !== a && (t == null || t.debug("localization.useEffect: update language", `${s.language} -> ${a}`), ns(a).then(i));
1627
1628
  }, [e]), /* @__PURE__ */ r.createElement(
1628
- ns,
1629
+ rs,
1629
1630
  {
1630
1631
  value: {
1631
1632
  language: s.language,
@@ -1645,7 +1646,7 @@ const Ze = "data-sb-agent-theme", Yt = (e) => (t, ...n) => {
1645
1646
  }, P = {
1646
1647
  light: Yt("light"),
1647
1648
  dark: Yt("dark")
1648
- }, ss = I(({ theme: e }) => {
1649
+ }, is = I(({ theme: e }) => {
1649
1650
  const { palette: t } = e;
1650
1651
  return `
1651
1652
  :root,
@@ -1697,7 +1698,7 @@ const Ze = "data-sb-agent-theme", Yt = (e) => (t, ...n) => {
1697
1698
  --sendbird-overlay-light: ${t.overlay.light};
1698
1699
  }
1699
1700
  `;
1700
- }), is = I`[${Ze}='light'] &{--sb-text-high-emphasis:var(--sendbird-onlight-text-high-emphasis);--sb-text-mid-emphasis:var(--sendbird-onlight-text-mid-emphasis);--sb-text-low-emphasis:var(--sendbird-onlight-text-low-emphasis);--sb-text-disabled:var(--sendbird-onlight-text-disabled);--sb-text-high-emphasis-inverse:var(--sendbird-ondark-text-high-emphasis);--sb-text-mid-emphasis-inverse:var(--sendbird-ondark-text-mid-emphasis);--sb-text-low-emphasis-inverse:var(--sendbird-ondark-text-low-emphasis);--sb-text-disabled-inverse:var(--sendbird-ondark-text-disabled);--sb-bg-50-600:var(--sendbird-background-50);--sb-bg-100-500:var(--sendbird-background-100);--sb-bg-200-400:var(--sendbird-background-200);--sb-primary:var(--sendbird-primary-main);--sb-secondary:var(--sendbird-secondary-main);--sb-error:var(--sendbird-error-main);--sb-information:var(--sendbird-information-light);}[${Ze}='dark'] &{--sb-text-high-emphasis:var(--sendbird-ondark-text-high-emphasis);--sb-text-mid-emphasis:var(--sendbird-ondark-text-mid-emphasis);--sb-text-low-emphasis:var(--sendbird-ondark-text-low-emphasis);--sb-text-disabled:var(--sendbird-ondark-text-disabled);--sb-text-high-emphasis-inverse:var(--sendbird-onlight-text-high-emphasis);--sb-text-mid-emphasis-inverse:var(--sendbird-onlight-text-mid-emphasis);--sb-text-low-emphasis-inverse:var(--sendbird-onlight-text-low-emphasis);--sb-text-disabled-inverse:var(--sendbird-onlight-text-disabled);--sb-bg-50-600:var(--sendbird-background-600);--sb-bg-100-500:var(--sendbird-background-500);--sb-bg-200-400:var(--sendbird-background-400);--sb-primary:var(--sendbird-primary-light);--sb-secondary:var(--sendbird-secondary-light);--sb-error:var(--sendbird-error-light);--sb-information:var(--sendbird-information-light);}`, p = {
1701
+ }), as = I`[${Ze}='light'] &{--sb-text-high-emphasis:var(--sendbird-onlight-text-high-emphasis);--sb-text-mid-emphasis:var(--sendbird-onlight-text-mid-emphasis);--sb-text-low-emphasis:var(--sendbird-onlight-text-low-emphasis);--sb-text-disabled:var(--sendbird-onlight-text-disabled);--sb-text-high-emphasis-inverse:var(--sendbird-ondark-text-high-emphasis);--sb-text-mid-emphasis-inverse:var(--sendbird-ondark-text-mid-emphasis);--sb-text-low-emphasis-inverse:var(--sendbird-ondark-text-low-emphasis);--sb-text-disabled-inverse:var(--sendbird-ondark-text-disabled);--sb-bg-50-600:var(--sendbird-background-50);--sb-bg-100-500:var(--sendbird-background-100);--sb-bg-200-400:var(--sendbird-background-200);--sb-primary:var(--sendbird-primary-main);--sb-secondary:var(--sendbird-secondary-main);--sb-error:var(--sendbird-error-main);--sb-information:var(--sendbird-information-light);}[${Ze}='dark'] &{--sb-text-high-emphasis:var(--sendbird-ondark-text-high-emphasis);--sb-text-mid-emphasis:var(--sendbird-ondark-text-mid-emphasis);--sb-text-low-emphasis:var(--sendbird-ondark-text-low-emphasis);--sb-text-disabled:var(--sendbird-ondark-text-disabled);--sb-text-high-emphasis-inverse:var(--sendbird-onlight-text-high-emphasis);--sb-text-mid-emphasis-inverse:var(--sendbird-onlight-text-mid-emphasis);--sb-text-low-emphasis-inverse:var(--sendbird-onlight-text-low-emphasis);--sb-text-disabled-inverse:var(--sendbird-onlight-text-disabled);--sb-bg-50-600:var(--sendbird-background-600);--sb-bg-100-500:var(--sendbird-background-500);--sb-bg-200-400:var(--sendbird-background-400);--sb-primary:var(--sendbird-primary-light);--sb-secondary:var(--sendbird-secondary-light);--sb-error:var(--sendbird-error-light);--sb-information:var(--sendbird-information-light);}`, p = {
1701
1702
  color: {
1702
1703
  primary: {
1703
1704
  dark: "var(--sendbird-primary-dark)",
@@ -1738,33 +1739,33 @@ const Ze = "data-sb-agent-theme", Yt = (e) => (t, ...n) => {
1738
1739
  error: "var(--sb-error)"
1739
1740
  }
1740
1741
  }, {
1741
- Provider: as,
1742
- useContext: ls
1742
+ Provider: ls,
1743
+ useContext: cs
1743
1744
  } = G("MessengerTheme");
1744
- function cs(e) {
1745
+ function ds(e) {
1745
1746
  const { theme: t, appearance: n, logger: o } = e;
1746
1747
  return /* @__PURE__ */ r.createElement(
1747
- wo,
1748
+ Ao,
1748
1749
  {
1749
1750
  appearance: n,
1750
1751
  palette: t == null ? void 0 : t.palette,
1751
1752
  typography: t == null ? void 0 : t.typography,
1752
1753
  logger: o
1753
1754
  },
1754
- /* @__PURE__ */ r.createElement(ds, { ...e })
1755
+ /* @__PURE__ */ r.createElement(us, { ...e })
1755
1756
  );
1756
1757
  }
1757
- function ds({ rootElement: e = document.body, children: t }) {
1758
+ function us({ rootElement: e = document.body, children: t }) {
1758
1759
  const { theme: n, updateTheme: o } = Ct();
1759
1760
  return le(() => {
1760
1761
  e.setAttribute(Ze, n.selectedTheme);
1761
- }, [e, n.selectedTheme]), /* @__PURE__ */ r.createElement(kr, { theme: n }, /* @__PURE__ */ r.createElement(as, { value: { theme: n, updateTheme: o } }, t));
1762
+ }, [e, n.selectedTheme]), /* @__PURE__ */ r.createElement(Ir, { theme: n }, /* @__PURE__ */ r.createElement(ls, { value: { theme: n, updateTheme: o } }, t));
1762
1763
  }
1763
1764
  function pe(e, t) {
1764
1765
  const n = e.getRootNode({ composed: t });
1765
1766
  return n instanceof ShadowRoot || n instanceof Document ? n : document;
1766
1767
  }
1767
- const us = (e, t) => {
1768
+ const ms = (e, t) => {
1768
1769
  L(() => {
1769
1770
  const n = pe(t) instanceof ShadowRoot, o = pe(t, !0);
1770
1771
  if (!(n ? t : o).querySelector(`link[href*='${e}']`)) {
@@ -1772,7 +1773,7 @@ const us = (e, t) => {
1772
1773
  i.rel = "stylesheet", i.href = e, (n ? t : o.head).appendChild(i);
1773
1774
  }
1774
1775
  }, [e, t]);
1775
- }, ms = (e, t = document.body) => {
1776
+ }, gs = (e, t = document.body) => {
1776
1777
  L(() => {
1777
1778
  const n = pe(t), s = n instanceof ShadowRoot ? t : n.head;
1778
1779
  if (!s) return;
@@ -1780,12 +1781,12 @@ const us = (e, t) => {
1780
1781
  let a = s.querySelector(`style#${i}`);
1781
1782
  a ? a.textContent !== e && (a.textContent = e) : (a = s.ownerDocument.createElement("style"), a.id = i, a.textContent = e, s.appendChild(a));
1782
1783
  }, [e, t]);
1783
- }, _t = /iPad|iPhone|iPod/.test(navigator.userAgent), gs = /Android/.test(navigator.userAgent), Oe = (e) => _t || gs, {
1784
- Provider: hs,
1784
+ }, _t = /iPad|iPhone|iPod/.test(navigator.userAgent), hs = /Android/.test(navigator.userAgent), Oe = (e) => _t || hs, {
1785
+ Provider: ps,
1785
1786
  Consumer: In,
1786
1787
  useContext: B
1787
1788
  } = G("Messenger");
1788
- function ps({
1789
+ function fs({
1789
1790
  children: e,
1790
1791
  state: t,
1791
1792
  enableCloseConversationButton: n = !1,
@@ -1799,8 +1800,8 @@ function ps({
1799
1800
  expanded: (t == null ? void 0 : t.expanded) ?? c,
1800
1801
  setExpanded: (t == null ? void 0 : t.setExpanded) ?? d
1801
1802
  };
1802
- return /* @__PURE__ */ r.createElement(eo, { ...i }, (m) => /* @__PURE__ */ r.createElement(
1803
- hs,
1803
+ return /* @__PURE__ */ r.createElement(to, { ...i }, (m) => /* @__PURE__ */ r.createElement(
1804
+ ps,
1804
1805
  {
1805
1806
  value: {
1806
1807
  ...i,
@@ -1815,19 +1816,19 @@ function ps({
1815
1816
  ));
1816
1817
  }
1817
1818
  const {
1818
- Provider: fs,
1819
+ Provider: bs,
1819
1820
  useContext: U
1820
- } = G("MessengerSession"), bs = ye(function({ children: e, ...t }, n) {
1821
- return /* @__PURE__ */ r.createElement(Fo, { ref: n, ...t }, (o) => /* @__PURE__ */ r.createElement(Es, { ...o }, e));
1822
- }), Es = ({ children: e, ...t }) => {
1821
+ } = G("MessengerSession"), Es = ye(function({ children: e, ...t }, n) {
1822
+ return /* @__PURE__ */ r.createElement(Uo, { ref: n, ...t }, (o) => /* @__PURE__ */ r.createElement(xs, { ...o }, e));
1823
+ }), xs = ({ children: e, ...t }) => {
1823
1824
  const { chatSDK: n, logger: o, appId: s, aiAgentId: i, agentPreviewConfigs: a, state: l } = B(), { userSessionInfo: c, authenticate: d, setActiveChannel: h, userSession: m, aiAgentInfo: f, launcherInfo: x } = t;
1824
1825
  return Xe(n, {
1825
1826
  async onUserJoined(E, b) {
1826
1827
  var C, v;
1827
- if (E.conversation && E.conversation.type === Rr.PROACTIVE && b.userId === ((C = n.currentUser) == null ? void 0 : C.userId)) {
1828
+ if (E.conversation && E.conversation.type === Dr.PROACTIVE && b.userId === ((C = n.currentUser) == null ? void 0 : C.userId)) {
1828
1829
  o.info("messengerSession.onUserJoined: proactive channel joined", E.url);
1829
1830
  const S = ((v = E.conversation) == null ? void 0 : v.status) ?? W.OPEN;
1830
- h({ url: E.url, status: S }), l.setOpened(!0), xs({ sound: document.hidden || !l.opened });
1831
+ h({ url: E.url, status: S }), l.setOpened(!0), Cs({ sound: document.hidden || !l.opened });
1831
1832
  }
1832
1833
  }
1833
1834
  }), L(() => {
@@ -1837,7 +1838,7 @@ const {
1837
1838
  o.error("messengerSession: failed to initialize", E);
1838
1839
  });
1839
1840
  }, [n, s, i, c == null ? void 0 : c.userId, c == null ? void 0 : c.authToken]), !m || !f || !x ? null : /* @__PURE__ */ r.createElement(
1840
- fs,
1841
+ bs,
1841
1842
  {
1842
1843
  value: {
1843
1844
  ...t,
@@ -1849,7 +1850,7 @@ const {
1849
1850
  e
1850
1851
  );
1851
1852
  };
1852
- function xs({ sound: e }) {
1853
+ function Cs({ sound: e }) {
1853
1854
  const t = "🔔You have received a new message", n = document.title, o = setInterval(() => {
1854
1855
  document.title = document.title === t ? n : t;
1855
1856
  }, 750);
@@ -1866,7 +1867,7 @@ const j = (e) => {
1866
1867
  color: n,
1867
1868
  className: o,
1868
1869
  ...s
1869
- }) => /* @__PURE__ */ r.createElement(vs, { as: e, $variant: t, className: o, $color: n, ...s }), qt = /* @__PURE__ */ new WeakMap(), Cs = (e, t) => {
1870
+ }) => /* @__PURE__ */ r.createElement(ys, { as: e, $variant: t, className: o, $color: n, ...s }), qt = /* @__PURE__ */ new WeakMap(), vs = (e, t) => {
1870
1871
  let n = qt.get(t);
1871
1872
  n || (n = /* @__PURE__ */ new Map(), qt.set(t, n));
1872
1873
  const o = n.get(e);
@@ -1875,7 +1876,7 @@ const j = (e) => {
1875
1876
  ${s.lineHeight ? `line-height: ${s.lineHeight};` : "line-height: 100%;"}
1876
1877
  `;
1877
1878
  return n.set(e, i), i;
1878
- }, vs = u.span`font-stretch:normal;font-style:normal;letter-spacing:normal;${({ $variant: e, theme: t }) => Cs(e, t.typography)}color:${({ $color: e }) => e};`, J = "sb-agent", ee = {
1879
+ }, ys = u.span`font-stretch:normal;font-style:normal;letter-spacing:normal;${({ $variant: e, theme: t }) => vs(e, t.typography)}color:${({ $color: e }) => e};`, J = "sb-agent", ee = {
1879
1880
  ENTRY: `${J}-entry`,
1880
1881
  MODAL_ROOT: `${J}-modal-root`,
1881
1882
  WINDOW: `${J}-window`,
@@ -1889,14 +1890,14 @@ const j = (e) => {
1889
1890
  }, $n = {
1890
1891
  DEFAULT_PRIMARY: "#742ddd",
1891
1892
  WHITE: "#ffffff"
1892
- }, Mn = 36, ys = 100, _s = 25 * 1024 * 1024, On = ["application/pdf", "image/jpeg", "image/jpg", "image/png"], St = "noopener noreferrer nofollow", Le = 244, Ln = 640, Ye = 26, Rn = 4, te = 12, Te = 2, Ss = 16, ne = `${J}-incoming-msg`, Ts = `${J}-marked-text`;
1893
+ }, Mn = 36, _s = 100, Ss = 25 * 1024 * 1024, On = ["application/pdf", "image/jpeg", "image/jpg", "image/png"], St = "noopener noreferrer nofollow", Le = 244, Ln = 640, Ye = 26, Rn = 4, te = 12, Te = 2, Ts = 16, ne = `${J}-incoming-msg`, ws = `${J}-marked-text`;
1893
1894
  function Tt(e) {
1894
1895
  switch (e) {
1895
1896
  case "top":
1896
1897
  case "middle":
1897
1898
  return Te;
1898
1899
  default:
1899
- return Ss;
1900
+ return Ts;
1900
1901
  }
1901
1902
  }
1902
1903
  function wt(e, t) {
@@ -1915,7 +1916,7 @@ function wt(e, t) {
1915
1916
  function Dn(e) {
1916
1917
  return e.messageType === "file" ? e.message.length > 0 && e.file.name !== e.message : e.message.length > 0;
1917
1918
  }
1918
- const ws = /* @__PURE__ */ new Set(["send", "chat", "message", "chevron-right"]), As = {
1919
+ const As = /* @__PURE__ */ new Set(["send", "chat", "message", "chevron-right"]), ks = {
1919
1920
  spinner: T(() => import("./BcUGcaq2.js")),
1920
1921
  chat: T(() => import("./DcFCGVBm.js")),
1921
1922
  message: T(() => import("./DsGXnanX.js")),
@@ -1951,18 +1952,18 @@ const ws = /* @__PURE__ */ new Set(["send", "chat", "message", "chevron-right"])
1951
1952
  template: T(() => import("./awO7aBCv.js")),
1952
1953
  source: T(() => import("./_EVMCh6Y.js"))
1953
1954
  }, M = ({ type: e, size: t = 24, className: n, color: o }) => {
1954
- const s = As[e];
1955
+ const s = ks[e];
1955
1956
  return /* @__PURE__ */ r.createElement(
1956
- Is,
1957
+ $s,
1957
1958
  {
1958
1959
  className: n,
1959
- $rtlFlip: ws.has(e),
1960
+ $rtlFlip: As.has(e),
1960
1961
  $size: t,
1961
1962
  $color: o ?? p.color.primary.main
1962
1963
  },
1963
1964
  /* @__PURE__ */ r.createElement(ke, { fallback: null }, /* @__PURE__ */ r.createElement(s, null))
1964
1965
  );
1965
- }, ks = I`[dir='rtl'] &{transform:scaleX(-1);}`, Is = u.div`width:${({ $size: e }) => j(e)};height:${({ $size: e }) => j(e)};display:inline-block;&:focus{outline:none;}svg{display:block;}[class*='fill']{fill:${({ $color: e }) => e};}[class*='stroke']{stroke:${({ $color: e }) => e};stroke-width:2px;stroke-linejoin:round;}${({ $rtlFlip: e }) => e && ks};`;
1966
+ }, Is = I`[dir='rtl'] &{transform:scaleX(-1);}`, $s = u.div`width:${({ $size: e }) => j(e)};height:${({ $size: e }) => j(e)};display:inline-block;&:focus{outline:none;}svg{display:block;}[class*='fill']{fill:${({ $color: e }) => e};}[class*='stroke']{stroke:${({ $color: e }) => e};stroke-width:2px;stroke-linejoin:round;}${({ $rtlFlip: e }) => e && Is};`;
1966
1967
  function At({
1967
1968
  name: e,
1968
1969
  type: t = "FILE",
@@ -1971,11 +1972,11 @@ function At({
1971
1972
  onClick: s
1972
1973
  }) {
1973
1974
  const { colors: i } = xt();
1974
- return /* @__PURE__ */ r.createElement($s, { onClick: s, $clickable: !!s }, /* @__PURE__ */ r.createElement(Os, { $bgColor: o ?? i.base.primary }, /* @__PURE__ */ r.createElement(M, { type: "file-document", size: 24, color: n ?? i.base.primaryContrastContent })), /* @__PURE__ */ r.createElement(Ls, null, /* @__PURE__ */ r.createElement(Rs, { variant: "button", color: p.themedColor.textHighEmphasis }, e), /* @__PURE__ */ r.createElement(w, { color: p.themedColor.textMidEmphasis, variant: "caption3" }, t)));
1975
+ return /* @__PURE__ */ r.createElement(Ms, { onClick: s, $clickable: !!s }, /* @__PURE__ */ r.createElement(Ls, { $bgColor: o ?? i.base.primary }, /* @__PURE__ */ r.createElement(M, { type: "file-document", size: 24, color: n ?? i.base.primaryContrastContent })), /* @__PURE__ */ r.createElement(Rs, null, /* @__PURE__ */ r.createElement(Ds, { variant: "button", color: p.themedColor.textHighEmphasis }, e), /* @__PURE__ */ r.createElement(w, { color: p.themedColor.textMidEmphasis, variant: "caption3" }, t)));
1975
1976
  }
1976
- const $s = u.div`border-radius:12px;gap:8px;width:${Le}px;height:64px;display:flex;align-items:center;padding:12px;box-sizing:border-box;border:1px solid ${p.themedColor.textDisabled};background-color:${p.themedColor.bg_50_600};${({ $clickable: e }) => e && Ms}`, Ms = I`cursor:pointer;&:hover{background-color:${p.themedColor.bg_100_500};}`, Os = u.div`border-radius:8px;width:40px;height:40px;display:flex;align-items:center;justify-content:center;background-color:${({ $bgColor: e }) => e};`, Ls = u.div`display:flex;flex:1;flex-direction:column;gap:4px;min-width:0;`, Rs = u(w)`text-overflow:ellipsis;white-space:nowrap;overflow:hidden;`;
1977
- function Ds({ file: e, children: t, onClickFile: n }) {
1978
- return /* @__PURE__ */ r.createElement(Ns, null, /* @__PURE__ */ r.createElement(
1977
+ const Ms = u.div`border-radius:12px;gap:8px;width:${Le}px;height:64px;display:flex;align-items:center;padding:12px;box-sizing:border-box;border:1px solid ${p.themedColor.textDisabled};background-color:${p.themedColor.bg_50_600};${({ $clickable: e }) => e && Os}`, Os = I`cursor:pointer;&:hover{background-color:${p.themedColor.bg_100_500};}`, Ls = u.div`border-radius:8px;width:40px;height:40px;display:flex;align-items:center;justify-content:center;background-color:${({ $bgColor: e }) => e};`, Rs = u.div`display:flex;flex:1;flex-direction:column;gap:4px;min-width:0;`, Ds = u(w)`text-overflow:ellipsis;white-space:nowrap;overflow:hidden;`;
1978
+ function Ns({ file: e, children: t, onClickFile: n }) {
1979
+ return /* @__PURE__ */ r.createElement(Ps, null, /* @__PURE__ */ r.createElement(
1979
1980
  At,
1980
1981
  {
1981
1982
  name: e.name,
@@ -1984,33 +1985,33 @@ function Ds({ file: e, children: t, onClickFile: n }) {
1984
1985
  }
1985
1986
  ), t);
1986
1987
  }
1987
- const Ns = u.div`display:flex;flex-direction:column;align-items:flex-start;gap:${Te}px;`;
1988
- function Ps({ file: e, onClickMedia: t, children: n }) {
1989
- const o = () => e.type.startsWith("image") ? /* @__PURE__ */ r.createElement(Us, { src: e.url, alt: "image-message" }) : e.type.startsWith("video") ? /* @__PURE__ */ r.createElement(Hs, { controls: !0 }, /* @__PURE__ */ r.createElement("source", { src: e.url }), /* @__PURE__ */ r.createElement("track", { kind: "captions" })) : null;
1988
+ const Ps = u.div`display:flex;flex-direction:column;align-items:flex-start;gap:${Te}px;`;
1989
+ function Bs({ file: e, onClickMedia: t, children: n }) {
1990
+ const o = () => e.type.startsWith("image") ? /* @__PURE__ */ r.createElement(Hs, { src: e.url, alt: "image-message" }) : e.type.startsWith("video") ? /* @__PURE__ */ r.createElement(zs, { controls: !0 }, /* @__PURE__ */ r.createElement("source", { src: e.url }), /* @__PURE__ */ r.createElement("track", { kind: "captions" })) : null;
1990
1991
  if (o) {
1991
1992
  const s = {
1992
1993
  id: `${ne}-media-body`,
1993
1994
  onClick: () => t == null ? void 0 : t(e)
1994
1995
  };
1995
- return /* @__PURE__ */ r.createElement(Bs, null, /* @__PURE__ */ r.createElement(Fs, { ...s }, o()), n);
1996
+ return /* @__PURE__ */ r.createElement(Fs, null, /* @__PURE__ */ r.createElement(Us, { ...s }, o()), n);
1996
1997
  }
1997
1998
  return null;
1998
1999
  }
1999
- const Bs = u.div`display:flex;flex-direction:column;align-items:flex-start;gap:${Te}px;`, Fs = u.div`width:${Le}px;height:160px;border-radius:12px;overflow:hidden;cursor:pointer;${P.light`
2000
+ const Fs = u.div`display:flex;flex-direction:column;align-items:flex-start;gap:${Te}px;`, Us = u.div`width:${Le}px;height:160px;border-radius:12px;overflow:hidden;cursor:pointer;${P.light`
2000
2001
  background-color: ${p.color.background100};
2001
2002
  `}
2002
2003
  ${P.dark`
2003
2004
  background-color: ${p.color.background400};
2004
2005
  `}
2005
- `, Us = u.img`width:100%;height:100%;object-fit:cover;`, Hs = u.video`width:100%;height:100%;object-fit:cover;`, zs = "✱";
2006
+ `, Hs = u.img`width:100%;height:100%;object-fit:cover;`, zs = u.video`width:100%;height:100%;object-fit:cover;`, Vs = "✱";
2006
2007
  function Nn(e) {
2007
- const t = new RegExp(`${zs}+`, "g");
2008
- return e.replace(t, (n) => `<span id=${Ts} aria-label="masked-text">${n}</span>`);
2008
+ const t = new RegExp(`${Vs}+`, "g");
2009
+ return e.replace(t, (n) => `<span id=${ws} aria-label="masked-text">${n}</span>`);
2009
2010
  }
2010
- function Vs(e) {
2011
+ function Ws(e) {
2011
2012
  return e.replace(/\*\*(.*?)\*\*/g, "<b>$1</b>");
2012
2013
  }
2013
- function Ws(e) {
2014
+ function Gs(e) {
2014
2015
  const t = /```(\w+)?\n([\s\S]*?)```/g, n = [];
2015
2016
  let o = 0;
2016
2017
  return e.replace(t, (s, ...i) => {
@@ -2028,19 +2029,19 @@ function Ws(e) {
2028
2029
  value: e.slice(o).trim()
2029
2030
  }), n.map((s) => s.type !== "text" ? s : { ...s, value: Nn(s.value) });
2030
2031
  }
2031
- const Gs = T(async () => ({ default: (await import("./CwdCJ7xG.js")).MarkdownText })), js = T(async () => ({ default: (await import("./Ch_6OPTz.js")).CodeBlock }));
2032
+ const js = T(async () => ({ default: (await import("./D5uRw0Em.js")).MarkdownText })), Ks = T(async () => ({ default: (await import("./Ch_6OPTz.js")).CodeBlock }));
2032
2033
  function Jt(e) {
2033
2034
  var s, i;
2034
- const t = e.maxBodyWidth ?? Le, n = ae(() => Ws(e.message), [e.message]), o = {
2035
+ const t = e.maxBodyWidth ?? Le, n = ae(() => Gs(e.message), [e.message]), o = {
2035
2036
  id: `${ne}-text-body`,
2036
2037
  $maxWidth: t,
2037
2038
  $color: (s = e.customStyle) == null ? void 0 : s.bubbleContentColor,
2038
2039
  $bgColor: (i = e.customStyle) == null ? void 0 : i.bubbleBackgroundColor
2039
2040
  };
2040
- return n.length === 0 ? e.children ? /* @__PURE__ */ r.createElement(Xt, { ...o }, e.children) : null : /* @__PURE__ */ r.createElement(Xt, { ...o }, n.map((a, l) => a.type === "text" ? /* @__PURE__ */ r.createElement(Qt, { key: l, variant: "body3" }, /* @__PURE__ */ r.createElement(ke, { fallback: a.value }, /* @__PURE__ */ r.createElement(Gs, { onClickImage: (c) => {
2041
+ return n.length === 0 ? e.children ? /* @__PURE__ */ r.createElement(Xt, { ...o }, e.children) : null : /* @__PURE__ */ r.createElement(Xt, { ...o }, n.map((a, l) => a.type === "text" ? /* @__PURE__ */ r.createElement(Qt, { key: l, variant: "body3" }, /* @__PURE__ */ r.createElement(ke, { fallback: a.value }, /* @__PURE__ */ r.createElement(js, { onClickImage: (c) => {
2041
2042
  var d;
2042
2043
  return (d = e.onClickMedia) == null ? void 0 : d.call(e, { url: c, type: "image/*" });
2043
- } }, a.value))) : a.type === "code" ? /* @__PURE__ */ r.createElement(ke, { key: l, fallback: /* @__PURE__ */ r.createElement(Qt, { variant: "body3" }, a.value) }, /* @__PURE__ */ r.createElement(js, { code: a.value, language: a.language })) : null), e.children);
2044
+ } }, a.value))) : a.type === "code" ? /* @__PURE__ */ r.createElement(ke, { key: l, fallback: /* @__PURE__ */ r.createElement(Qt, { variant: "body3" }, a.value) }, /* @__PURE__ */ r.createElement(Ks, { code: a.value, language: a.language })) : null), e.children);
2044
2045
  }
2045
2046
  const Xt = u.div`display:flex;flex-direction:column;border-radius:12px;overflow:hidden;max-width:${({ $maxWidth: e }) => e}px;${({ theme: e, $color: t, $bgColor: n }) => I`
2046
2047
  color: ${t || e.colors.messageIncoming.text};
@@ -2050,38 +2051,38 @@ const Xt = u.div`display:flex;flex-direction:column;border-radius:12px;overflow:
2050
2051
  transition: max-width 0.3s;
2051
2052
  overflow-wrap: break-word;
2052
2053
  `, Qt = u(w)`align-items:flex-start;line-height:140%;white-space:pre-wrap;padding:0 12px;`;
2053
- function Ks(e) {
2054
+ function Zs(e) {
2054
2055
  const { stringSet: t } = O(), n = Dn(e) ? /* @__PURE__ */ r.createElement(Jt, { ...e }) : null;
2055
2056
  if (e.messageType === "user")
2056
2057
  return n;
2057
2058
  if (e.messageType === "file") {
2058
2059
  const o = e.file;
2059
- return o.type.startsWith("image") || o.type.startsWith("video") ? /* @__PURE__ */ r.createElement(Ps, { ...e }, n) : /* @__PURE__ */ r.createElement(Ds, { ...e }, n);
2060
+ return o.type.startsWith("image") || o.type.startsWith("video") ? /* @__PURE__ */ r.createElement(Bs, { ...e }, n) : /* @__PURE__ */ r.createElement(Ns, { ...e }, n);
2060
2061
  }
2061
2062
  return /* @__PURE__ */ r.createElement(Jt, { ...e, message: t.UNKNOWN__UNKNOWN_MESSAGE_TYPE });
2062
2063
  }
2063
2064
  const kt = (e) => /* @__PURE__ */ r.createElement("svg", { width: 24, height: 24, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ r.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12.0008 0.973633C10.6172 0.973633 9.49558 2.09527 9.49558 3.47888C9.49558 4.50705 10.115 5.39055 11.0009 5.77664V7.47887H13.0009V5.77653C13.8868 5.3904 14.5061 4.50696 14.5061 3.47888C14.5061 2.09527 13.3844 0.973633 12.0008 0.973633ZM0.250977 16.5788L0.250977 10.5789H2.25098L2.25098 16.5788H0.250977ZM21.7511 10.5789V16.5788H23.7511V10.5789H21.7511ZM18.251 7.47888H3.25097V18.9789C3.25097 20.3596 4.37026 21.4789 5.75097 21.4789H18.251C19.6317 21.4789 20.751 20.3596 20.751 18.9789V9.97887C20.751 8.59816 19.6317 7.47888 18.251 7.47888ZM9.78434 11.9539V15.2038C9.78434 15.7561 9.33663 16.2038 8.78434 16.2038C8.23206 16.2038 7.78434 15.7561 7.78434 15.2038V11.9539C7.78434 11.4016 8.23206 10.9539 8.78434 10.9539C9.33663 10.9539 9.78434 11.4016 9.78434 11.9539ZM16.2677 11.9539V15.2038C16.2677 15.7561 15.82 16.2038 15.2677 16.2038C14.7154 16.2038 14.2677 15.7561 14.2677 15.2038V11.9539C14.2677 11.4016 14.7154 10.9539 15.2677 10.9539C15.82 10.9539 16.2677 11.4016 16.2677 11.9539Z", fill: "#0D0D0D" }));
2064
2065
  function It({ id: e, src: t, size: n = 56, onClick: o, style: s }) {
2065
- return /* @__PURE__ */ r.createElement(Zs, { id: e, tabIndex: 0, onClick: o, $size: j(n), style: s }, t ? /* @__PURE__ */ r.createElement(Ys, { src: t }) : /* @__PURE__ */ r.createElement(M, { type: "user", size: n }));
2066
+ return /* @__PURE__ */ r.createElement(Ys, { id: e, tabIndex: 0, onClick: o, $size: j(n), style: s }, t ? /* @__PURE__ */ r.createElement(qs, { src: t }) : /* @__PURE__ */ r.createElement(M, { type: "user", size: n }));
2066
2067
  }
2067
- const Zs = u.div`border-radius:50%;display:inline-block;overflow:hidden;position:relative;flex-shrink:0;height:${(e) => e.$size};width:${(e) => e.$size};background-color:${p.themedColor.bg_100_500};&:focus{outline:none;}`, Ys = u.img`object-fit:cover;width:100%;height:100%;position:absolute;`;
2068
- function qs({ sender: e, isBotMessage: t }) {
2068
+ const Ys = u.div`border-radius:50%;display:inline-block;overflow:hidden;position:relative;flex-shrink:0;height:${(e) => e.$size};width:${(e) => e.$size};background-color:${p.themedColor.bg_100_500};&:focus{outline:none;}`, qs = u.img`object-fit:cover;width:100%;height:100%;position:absolute;`;
2069
+ function Js({ sender: e, isBotMessage: t }) {
2069
2070
  const n = `${ne}-sender-avatar`;
2070
- return !e.profileUrl && t ? /* @__PURE__ */ r.createElement(Js, { id: n }, /* @__PURE__ */ r.createElement(kt, null)) : /* @__PURE__ */ r.createElement(It, { id: n, size: Ye, src: e.profileUrl });
2071
+ return !e.profileUrl && t ? /* @__PURE__ */ r.createElement(Xs, { id: n }, /* @__PURE__ */ r.createElement(kt, null)) : /* @__PURE__ */ r.createElement(It, { id: n, size: Ye, src: e.profileUrl });
2071
2072
  }
2072
- const Js = u.div`flex-shrink:0;width:${Ye}px;height:${Ye}px;box-sizing:border-box;padding:6px;border-radius:50%;display:flex;justify-content:center;align-items:center;background-color:${({ theme: e }) => e.colors.base.primary};path{fill:${({ theme: e }) => e.colors.base.primaryContrastContent};}}`;
2073
- function Xs({ sender: e }) {
2074
- return /* @__PURE__ */ r.createElement(Qs, { id: `${ne}-sender-name`, variant: "caption1", color: p.themedColor.textMidEmphasis }, e.nickname);
2073
+ const Xs = u.div`flex-shrink:0;width:${Ye}px;height:${Ye}px;box-sizing:border-box;padding:6px;border-radius:50%;display:flex;justify-content:center;align-items:center;background-color:${({ theme: e }) => e.colors.base.primary};path{fill:${({ theme: e }) => e.colors.base.primaryContrastContent};}}`;
2074
+ function Qs({ sender: e }) {
2075
+ return /* @__PURE__ */ r.createElement(ei, { id: `${ne}-sender-name`, variant: "caption1", color: p.themedColor.textMidEmphasis }, e.nickname);
2075
2076
  }
2076
- const Qs = u(w)`text-align:start;width:100%;box-sizing:border-box;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-block:5px;padding-inline:0 7px;`;
2077
- function ei({ createdAt: e }) {
2077
+ const ei = u(w)`text-align:start;width:100%;box-sizing:border-box;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-block:5px;padding-inline:0 7px;`;
2078
+ function ti({ createdAt: e }) {
2078
2079
  const { stringSet: t, format: n } = O();
2079
2080
  return e ? /* @__PURE__ */ r.createElement(w, { id: `${ne}-sent-time`, variant: "caption4", color: p.themedColor.textLowEmphasis }, n(e, t.DATE_FORMAT__MESSAGE_TIMESTAMP)) : null;
2080
2081
  }
2081
- function ti({ customStyle: e }) {
2082
- return /* @__PURE__ */ r.createElement(ni, { $bgColor: e == null ? void 0 : e.bubbleBackgroundColor }, [0, 1, 2].map((t) => /* @__PURE__ */ r.createElement(ri, { key: t, $color: e == null ? void 0 : e.bubbleContentColor })));
2082
+ function ni({ customStyle: e }) {
2083
+ return /* @__PURE__ */ r.createElement(ri, { $bgColor: e == null ? void 0 : e.bubbleBackgroundColor }, [0, 1, 2].map((t) => /* @__PURE__ */ r.createElement(oi, { key: t, $color: e == null ? void 0 : e.bubbleContentColor })));
2083
2084
  }
2084
- const ni = u.div`align-items:center;border-radius:12px;display:flex;gap:6px;justify-content:center;padding:16px 12px;background-color:${({ theme: e, $bgColor: t }) => t || e.colors.messageIncoming.background};`, ri = u.span`animation:blink 1.4s infinite;animation-fill-mode:both;border-radius:50%;height:8px;width:8px;background:${({ theme: e, $color: t }) => t || e.colors.messageIncoming.text};@keyframes blink{0%{opacity:0.12;transform:scale(1);}21.43%{opacity:0.38;transform:scale(1.2);}42.86%{opacity:0.12;transform:scale(1);}100%{opacity:0.12;transform:scale(1);}}&:nth-child(1){animation-delay:0.4s;}&:nth-child(2){animation-delay:0.6s;}&:nth-child(3){animation-delay:0.8s;}`;
2085
+ const ri = u.div`align-items:center;border-radius:12px;display:flex;gap:6px;justify-content:center;padding:16px 12px;background-color:${({ theme: e, $bgColor: t }) => t || e.colors.messageIncoming.background};`, oi = u.span`animation:blink 1.4s infinite;animation-fill-mode:both;border-radius:50%;height:8px;width:8px;background:${({ theme: e, $color: t }) => t || e.colors.messageIncoming.text};@keyframes blink{0%{opacity:0.12;transform:scale(1);}21.43%{opacity:0.38;transform:scale(1.2);}42.86%{opacity:0.12;transform:scale(1);}100%{opacity:0.12;transform:scale(1);}}&:nth-child(1){animation-delay:0.4s;}&:nth-child(2){animation-delay:0.6s;}&:nth-child(3){animation-delay:0.8s;}`;
2085
2086
  function Ie() {
2086
2087
  }
2087
2088
  async function $t(e) {
@@ -2099,41 +2100,41 @@ function Fn(e) {
2099
2100
  const t = (n = e == null ? void 0 : e.conversation) == null ? void 0 : n.handoff;
2100
2101
  return !!(t != null && t.timestamp);
2101
2102
  }
2102
- function oi(e) {
2103
+ function si(e) {
2103
2104
  return Bn(e) && !Fn(e);
2104
2105
  }
2105
- function si({
2106
+ function ii({
2106
2107
  extendedMessagePayload: e,
2107
2108
  onClickCTA: t = ({ url: n }) => $t(n)
2108
2109
  }) {
2109
2110
  const n = e == null ? void 0 : e.cta_button;
2110
- return n ? /* @__PURE__ */ r.createElement(ii, { id: `${ne}-ext-cta-button`, role: "button", onClick: () => t(n) }, /* @__PURE__ */ r.createElement(ai, { variant: "button" }, n.label)) : null;
2111
+ return n ? /* @__PURE__ */ r.createElement(ai, { id: `${ne}-ext-cta-button`, role: "button", onClick: () => t(n) }, /* @__PURE__ */ r.createElement(li, { variant: "button" }, n.label)) : null;
2111
2112
  }
2112
- const ii = u.div`display:flex;align-items:center;justify-content:center;cursor:pointer;border-radius:6px;padding:8px;color:${p.themedColor.textHighEmphasis};background-color:${p.color.background50};${P.dark`
2113
+ const ai = u.div`display:flex;align-items:center;justify-content:center;cursor:pointer;border-radius:6px;padding:8px;color:${p.themedColor.textHighEmphasis};background-color:${p.color.background50};${P.dark`
2113
2114
  background-color: ${p.color.ondark.textDisabled};
2114
2115
  `}
2115
- `, ai = u(w)`overflow:hidden;text-overflow:ellipsis;white-space:nowrap;`;
2116
- function li({
2116
+ `, li = u(w)`overflow:hidden;text-overflow:ellipsis;white-space:nowrap;`;
2117
+ function ci({
2117
2118
  extendedMessagePayload: e,
2118
2119
  onClickCitation: t = (n) => $t(n.link)
2119
2120
  }) {
2120
2121
  const { stringSet: n } = O(), { theme: o } = Ct(), s = e == null ? void 0 : e.citations;
2121
- return !s || s.length === 0 ? null : /* @__PURE__ */ r.createElement(ci, { id: `${ne}-ext-citation` }, /* @__PURE__ */ r.createElement(di, { variant: "caption1", color: o.colors.messageIncoming.text }, n.CITATION_SOURCE_TITLE), /* @__PURE__ */ r.createElement(ui, null, s.map((i, a) => /* @__PURE__ */ r.createElement(
2122
- gi,
2122
+ return !s || s.length === 0 ? null : /* @__PURE__ */ r.createElement(di, { id: `${ne}-ext-citation` }, /* @__PURE__ */ r.createElement(ui, { variant: "caption1", color: o.colors.messageIncoming.text }, n.CITATION_SOURCE_TITLE), /* @__PURE__ */ r.createElement(mi, null, s.map((i, a) => /* @__PURE__ */ r.createElement(
2123
+ hi,
2123
2124
  {
2124
2125
  key: `${i.embedding_id}-${a}`,
2125
2126
  role: "button",
2126
2127
  onClick: () => t(i)
2127
2128
  },
2128
2129
  /* @__PURE__ */ r.createElement(M, { type: "source", size: 16, color: o.colors.messageIncoming.text }),
2129
- /* @__PURE__ */ r.createElement(mi, { variant: "body3", color: o.colors.messageIncoming.text }, i.title)
2130
+ /* @__PURE__ */ r.createElement(gi, { variant: "body3", color: o.colors.messageIncoming.text }, i.title)
2130
2131
  ))));
2131
2132
  }
2132
- const ci = u.div`display:flex;flex-direction:column;gap:8px;border-radius:8px;padding:8px 12px 6px;`, di = u(w)`opacity:0.5;`, ui = u.div`display:flex;flex-direction:column;gap:8px;`, mi = u(w)`text-decoration:underline;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;`, gi = u.div`display:flex;align-items:center;gap:4px;cursor:pointer;&:hover{opacity:0.5;}`;
2133
- function hi(e) {
2133
+ const di = u.div`display:flex;flex-direction:column;gap:8px;border-radius:8px;padding:8px 12px 6px;`, ui = u(w)`opacity:0.5;`, mi = u.div`display:flex;flex-direction:column;gap:8px;`, gi = u(w)`text-decoration:underline;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;`, hi = u.div`display:flex;align-items:center;gap:4px;cursor:pointer;&:hover{opacity:0.5;}`;
2134
+ function pi(e) {
2134
2135
  return /* @__PURE__ */ r.createElement(r.Fragment, null);
2135
2136
  }
2136
- class pi extends xr {
2137
+ class fi extends xr {
2137
2138
  constructor(t) {
2138
2139
  super(t), this.state = {
2139
2140
  hasError: !1
@@ -2146,31 +2147,31 @@ class pi extends xr {
2146
2147
  return this.state.hasError ? this.props.errorFallback : /* @__PURE__ */ r.createElement(ke, { fallback: this.props.loadingFallback }, this.props.children);
2147
2148
  }
2148
2149
  }
2149
- const fi = /* @__PURE__ */ new Set(["default"]), { MessageTemplate: bi } = zr({
2150
- parser: Ur,
2151
- renderer: Fr,
2150
+ const bi = /* @__PURE__ */ new Set(["default"]), { MessageTemplate: Ei } = Vr({
2151
+ parser: Hr,
2152
+ renderer: Ur,
2152
2153
  Container: (e) => /* @__PURE__ */ r.createElement("div", { ...e })
2153
2154
  });
2154
- function Ei(e) {
2155
+ function xi(e) {
2155
2156
  return /* @__PURE__ */ r.createElement(
2156
- pi,
2157
+ fi,
2157
2158
  {
2158
2159
  errorFallback: e.messageTemplateErrorFallback,
2159
2160
  loadingFallback: e.messageTemplateLoadingFallback
2160
2161
  },
2161
- /* @__PURE__ */ r.createElement(xi, { ...e })
2162
+ /* @__PURE__ */ r.createElement(Ci, { ...e })
2162
2163
  );
2163
2164
  }
2164
- const xi = ({
2165
+ const Ci = ({
2165
2166
  extendedMessagePayload: e,
2166
2167
  onGetCachedMessageTemplate: t = () => null,
2167
2168
  onRequestMessageTemplate: n,
2168
2169
  onHandleTemplateInternalAction: o = Ie
2169
2170
  }) => {
2170
2171
  const s = e == null ? void 0 : e.message_template;
2171
- if (!fi.has((s == null ? void 0 : s.type) ?? "default")) throw new Error("Unsupported template type");
2172
+ if (!bi.has((s == null ? void 0 : s.type) ?? "default")) throw new Error("Unsupported template type");
2172
2173
  if (!n) throw new Error("onRequestMessageTemplate is required");
2173
- const { theme: a } = ls(), l = Zo({
2174
+ const { theme: a } = cs(), l = Yo({
2174
2175
  onRequestTemplate: n,
2175
2176
  onGetCachedTemplate: t,
2176
2177
  theme: a.selectedTheme,
@@ -2179,24 +2180,24 @@ const xi = ({
2179
2180
  viewVariables: s == null ? void 0 : s.view_variables,
2180
2181
  aiAgentColorVariables: a.aiAgentColorVariables
2181
2182
  });
2182
- return /* @__PURE__ */ r.createElement(Ci, { id: `${ne}-ext-message-template` }, /* @__PURE__ */ r.createElement(
2183
- Hr,
2183
+ return /* @__PURE__ */ r.createElement(vi, { id: `${ne}-ext-message-template` }, /* @__PURE__ */ r.createElement(
2184
+ zr,
2184
2185
  {
2185
2186
  handleInternalAction: (c, d) => {
2186
2187
  c.stopPropagation(), o == null || o(d);
2187
2188
  }
2188
2189
  },
2189
- /* @__PURE__ */ r.createElement(bi, { templateItems: l.body.items, templateVersion: l.version })
2190
+ /* @__PURE__ */ r.createElement(Ei, { templateItems: l.body.items, templateVersion: l.version })
2190
2191
  ));
2191
- }, Ci = u.div`box-sizing:border-box;overflow:hidden;width:100%;`;
2192
- function vi({
2192
+ }, vi = u.div`box-sizing:border-box;overflow:hidden;width:100%;`;
2193
+ function yi({
2193
2194
  extendedMessagePayload: e,
2194
2195
  onClickSuggestedReply: t,
2195
2196
  suggestedRepliesDirection: n = "vertical"
2196
2197
  }) {
2197
2198
  const [o, s] = _(!1), i = (e == null ? void 0 : e.suggested_replies) ?? [];
2198
- return i.length === 0 || o ? null : /* @__PURE__ */ r.createElement(yi, { id: `${ne}-ext-suggested-replies`, $type: n }, i.map((a, l) => /* @__PURE__ */ r.createElement(
2199
- _i,
2199
+ return i.length === 0 || o ? null : /* @__PURE__ */ r.createElement(_i, { id: `${ne}-ext-suggested-replies`, $type: n }, i.map((a, l) => /* @__PURE__ */ r.createElement(
2200
+ Si,
2200
2201
  {
2201
2202
  key: l,
2202
2203
  $type: n,
@@ -2208,39 +2209,39 @@ function vi({
2208
2209
  a
2209
2210
  )));
2210
2211
  }
2211
- const yi = u.div`margin:16px 0;padding:0 ${te}px;position:relative;display:flex;gap:8px;${({ $type: e }) => e === "vertical" ? Si : Ti};`, _i = u(w)`box-sizing:border-box;padding:8px 12px;display:flex;align-items:center;border-radius:20px / clamp(20px,5%,100px);cursor:pointer;word-break:break-word;color:${p.color.primary.main};border:1px solid ${p.color.primary.main};background-color:${p.themedColor.bg_50_600};&:hover{background-color:${p.themedColor.bg_100_500};}${({ $type: e, theme: t }) => I`
2212
- ${e === "vertical" ? wi : Ai};
2212
+ const _i = u.div`margin:16px 0;padding:0 ${te}px;position:relative;display:flex;gap:8px;${({ $type: e }) => e === "vertical" ? Ti : wi};`, Si = u(w)`box-sizing:border-box;padding:8px 12px;display:flex;align-items:center;border-radius:20px / clamp(20px,5%,100px);cursor:pointer;word-break:break-word;color:${p.color.primary.main};border:1px solid ${p.color.primary.main};background-color:${p.themedColor.bg_50_600};&:hover{background-color:${p.themedColor.bg_100_500};}${({ $type: e, theme: t }) => I`
2213
+ ${e === "vertical" ? Ai : ki};
2213
2214
  &:active {
2214
2215
  background-color: ${t.colors.base.primary};
2215
2216
  color: ${t.colors.base.primaryContrastContent};
2216
2217
  }
2217
2218
  `}
2218
- `, Si = I`flex-direction:column;align-items:flex-end;`, Ti = I`flex-direction:row;overflow-x:scroll;-ms-overflow-style:none;scrollbar-width:none;&::-webkit-scrollbar{display:none;}`, wi = I`max-width:calc(100% - 70px);white-space:pre-wrap;`, Ai = I`white-space:nowrap;`;
2219
+ `, Ti = I`flex-direction:column;align-items:flex-end;`, wi = I`flex-direction:row;overflow-x:scroll;-ms-overflow-style:none;scrollbar-width:none;&::-webkit-scrollbar{display:none;}`, Ai = I`max-width:calc(100% - 70px);white-space:pre-wrap;`, ki = I`white-space:nowrap;`;
2219
2220
  function Mt(e) {
2220
2221
  return e();
2221
2222
  }
2222
2223
  const xe = _e({
2223
- template: ki,
2224
+ template: Ii,
2224
2225
  components: {
2225
- SenderName: Xs,
2226
- SenderAvatar: qs,
2227
- SentTime: ei,
2228
- MessageBody: Ks,
2229
- TypingIndicator: ti,
2230
- SuggestedReplies: vi,
2231
- MessageTemplate: Ei,
2232
- CTAButton: si,
2233
- Citation: li,
2234
- MessageLogs: hi
2226
+ SenderName: Qs,
2227
+ SenderAvatar: Js,
2228
+ SentTime: ti,
2229
+ MessageBody: Zs,
2230
+ TypingIndicator: ni,
2231
+ SuggestedReplies: yi,
2232
+ MessageTemplate: xi,
2233
+ CTAButton: ii,
2234
+ Citation: ci,
2235
+ MessageLogs: pi
2235
2236
  }
2236
2237
  });
2237
- function ki(e) {
2238
+ function Ii(e) {
2238
2239
  return /* @__PURE__ */ r.createElement(Un, { ...e, testerMode: !1 });
2239
2240
  }
2240
2241
  function Un(e) {
2241
2242
  var f, x, E, b, g;
2242
2243
  const { components: t } = xe.useContext(), n = !!e.isTyping, o = e.testerMode, s = !!((f = e.extendedMessagePayload) != null && f.message_template), i = !!((x = e.extendedMessagePayload) != null && x.cta_button), a = !!((E = e.extendedMessagePayload) != null && E.citations) && e.extendedMessagePayload.citations.length > 0, l = !!e.createdAt, c = Mt(() => e.messageType === "user" ? e.message.length > 0 : !0), d = e.groupType === "top" || e.groupType === "single", h = e.groupType === "bottom" || e.groupType === "single", m = o ? 0 : Ye;
2243
- return /* @__PURE__ */ r.createElement(Ii, { $marginBottom: n ? 0 : Tt(e.groupType) }, d && /* @__PURE__ */ r.createElement($i, null, !o && /* @__PURE__ */ r.createElement(t.SenderAvatar, { ...e }), /* @__PURE__ */ r.createElement(t.SenderName, { ...e })), /* @__PURE__ */ r.createElement(Ut, null, /* @__PURE__ */ r.createElement(at, { $extraStartPadding: m }, n && /* @__PURE__ */ r.createElement(t.TypingIndicator, { ...e }), /* @__PURE__ */ r.createElement(t.MessageBody, { ...e }, i && /* @__PURE__ */ r.createElement("div", { style: { marginTop: 12, marginInline: 12 } }, /* @__PURE__ */ r.createElement(t.CTAButton, { ...e })), a && /* @__PURE__ */ r.createElement(t.Citation, { ...e }))), s && /* @__PURE__ */ r.createElement(en, { $startPadding: 0, $endPadding: 0, style: { marginTop: c ? Te : 0 } }, /* @__PURE__ */ r.createElement(
2244
+ return /* @__PURE__ */ r.createElement($i, { $marginBottom: n ? 0 : Tt(e.groupType) }, d && /* @__PURE__ */ r.createElement(Mi, null, !o && /* @__PURE__ */ r.createElement(t.SenderAvatar, { ...e }), /* @__PURE__ */ r.createElement(t.SenderName, { ...e })), /* @__PURE__ */ r.createElement(Ut, null, /* @__PURE__ */ r.createElement(at, { $extraStartPadding: m }, n && /* @__PURE__ */ r.createElement(t.TypingIndicator, { ...e }), /* @__PURE__ */ r.createElement(t.MessageBody, { ...e }, i && /* @__PURE__ */ r.createElement("div", { style: { marginTop: 12, marginInline: 12 } }, /* @__PURE__ */ r.createElement(t.CTAButton, { ...e })), a && /* @__PURE__ */ r.createElement(t.Citation, { ...e }))), s && /* @__PURE__ */ r.createElement(en, { $startPadding: 0, $endPadding: 0, style: { marginTop: c ? Te : 0 } }, /* @__PURE__ */ r.createElement(
2244
2245
  t.MessageTemplate,
2245
2246
  {
2246
2247
  ...e,
@@ -2254,18 +2255,18 @@ function Un(e) {
2254
2255
  )),
2255
2256
  messageTemplateLoadingFallback: e.messageTemplateLoadingFallback ?? /* @__PURE__ */ r.createElement(at, { $extraStartPadding: m }, /* @__PURE__ */ r.createElement(t.TypingIndicator, { ...e }))
2256
2257
  }
2257
- ))), h && l && /* @__PURE__ */ r.createElement(Mi, { $extraStartPadding: m + 8 }, /* @__PURE__ */ r.createElement(t.SentTime, { ...e })), /* @__PURE__ */ r.createElement(Ut, null, e.suggestedRepliesVisible && /* @__PURE__ */ r.createElement(en, null, /* @__PURE__ */ r.createElement(t.SuggestedReplies, { ...e })), /* @__PURE__ */ r.createElement(t.MessageLogs, { ...e })));
2258
+ ))), h && l && /* @__PURE__ */ r.createElement(Oi, { $extraStartPadding: m + 8 }, /* @__PURE__ */ r.createElement(t.SentTime, { ...e })), /* @__PURE__ */ r.createElement(Ut, null, e.suggestedRepliesVisible && /* @__PURE__ */ r.createElement(en, null, /* @__PURE__ */ r.createElement(t.SuggestedReplies, { ...e })), /* @__PURE__ */ r.createElement(t.MessageLogs, { ...e })));
2258
2259
  }
2259
- const Ii = u.div`display:flex;flex-direction:column;align-items:flex-start;margin-bottom:${({ $marginBottom: e }) => `${e}px`};
2260
+ const $i = u.div`display:flex;flex-direction:column;align-items:flex-start;margin-bottom:${({ $marginBottom: e }) => `${e}px`};
2260
2261
  `, tt = u.div`display:flex;align-self:stretch;justify-content:flex-start;${({ $startPadding: e = te, $endPadding: t = te, $extraStartPadding: n = 0 }) => `
2261
2262
  padding-inline: ${e + n}px ${t}px;
2262
2263
  `}
2263
- `, $i = u(tt)`display:flex;flex-direction:row;align-items:center;gap:8px;`, at = u(tt)`display:flex;`, Mi = u(tt)`margin-top:${Rn}px;display:flex;align-items:flex-start;justify-content:flex-start;`, en = u(tt)`display:flex;flex-direction:column;${({ $startPadding: e = te, $endPadding: t = te, $extraStartPadding: n = 0 }) => `
2264
+ `, Mi = u(tt)`display:flex;flex-direction:row;align-items:center;gap:8px;`, at = u(tt)`display:flex;`, Oi = u(tt)`margin-top:${Rn}px;display:flex;align-items:flex-start;justify-content:flex-start;`, en = u(tt)`display:flex;flex-direction:column;${({ $startPadding: e = te, $endPadding: t = te, $extraStartPadding: n = 0 }) => `
2264
2265
  padding-inline: ${e + n}px ${t}px;
2265
2266
  `}
2266
2267
  `;
2267
- function Oi({ file: e, children: t, onClickFile: n }) {
2268
- return /* @__PURE__ */ r.createElement(Li, null, /* @__PURE__ */ r.createElement(
2268
+ function Li({ file: e, children: t, onClickFile: n }) {
2269
+ return /* @__PURE__ */ r.createElement(Ri, null, /* @__PURE__ */ r.createElement(
2269
2270
  At,
2270
2271
  {
2271
2272
  name: e.name,
@@ -2274,54 +2275,54 @@ function Oi({ file: e, children: t, onClickFile: n }) {
2274
2275
  }
2275
2276
  ), t);
2276
2277
  }
2277
- const Li = u.div`display:flex;flex-direction:column;align-items:flex-end;gap:${Te}px;`, Hn = ({ className: e, children: t, size: n = 26 }) => /* @__PURE__ */ r.createElement(Ri, { className: e, $size: n }, t ?? /* @__PURE__ */ r.createElement(M, { type: "spinner", size: n })), Ri = u.div`display:flex;align-items:center;justify-content:center;width:${({ $size: e }) => j(e)};height:${({ $size: e }) => j(e)};animation:1s infinite linear;animation-name:rotate;@keyframes rotate{from{transform:rotate(0);}to{transform:rotate(360deg);}}`;
2278
- function Di({ file: e, metadata: t, onClickMedia: n, children: o }) {
2278
+ const Ri = u.div`display:flex;flex-direction:column;align-items:flex-end;gap:${Te}px;`, Hn = ({ className: e, children: t, size: n = 26 }) => /* @__PURE__ */ r.createElement(Di, { className: e, $size: n }, t ?? /* @__PURE__ */ r.createElement(M, { type: "spinner", size: n })), Di = u.div`display:flex;align-items:center;justify-content:center;width:${({ $size: e }) => j(e)};height:${({ $size: e }) => j(e)};animation:1s infinite linear;animation-name:rotate;@keyframes rotate{from{transform:rotate(0);}to{transform:rotate(360deg);}}`;
2279
+ function Ni({ file: e, metadata: t, onClickMedia: n, children: o }) {
2279
2280
  const { aspectRatio: s, localFile: i } = t, [a] = _(() => i instanceof File ? URL.createObjectURL(i) : e.url), [l, c] = _(!1), d = {
2280
2281
  onClick: () => n == null ? void 0 : n(e),
2281
2282
  $ratio: s
2282
2283
  };
2283
- return /* @__PURE__ */ r.createElement(Ni, null, /* @__PURE__ */ r.createElement(Pi, { ...d }, !l && /* @__PURE__ */ r.createElement(Hn, { size: 26 }, /* @__PURE__ */ r.createElement(M, { type: "spinner", color: "textLowEmphasis", size: 26 })), /* @__PURE__ */ r.createElement(Bi, { $loaded: l, src: a, alt: "image-message", onLoad: () => c(!0) })), o);
2284
+ return /* @__PURE__ */ r.createElement(Pi, null, /* @__PURE__ */ r.createElement(Bi, { ...d }, !l && /* @__PURE__ */ r.createElement(Hn, { size: 26 }, /* @__PURE__ */ r.createElement(M, { type: "spinner", color: "textLowEmphasis", size: 26 })), /* @__PURE__ */ r.createElement(Fi, { $loaded: l, src: a, alt: "image-message", onLoad: () => c(!0) })), o);
2284
2285
  }
2285
- const Ni = u.div`display:flex;flex-direction:column;align-items:flex-end;gap:${Te}px;`, Pi = u.div`width:${Le}px;border-radius:12px;overflow:hidden;cursor:pointer;height:auto;aspect-ratio:${(e) => e.$ratio};position:relative;display:flex;align-items:center;justify-content:center;${P.light`
2286
+ const Pi = u.div`display:flex;flex-direction:column;align-items:flex-end;gap:${Te}px;`, Bi = u.div`width:${Le}px;border-radius:12px;overflow:hidden;cursor:pointer;height:auto;aspect-ratio:${(e) => e.$ratio};position:relative;display:flex;align-items:center;justify-content:center;${P.light`
2286
2287
  background-color: ${p.color.background100};
2287
2288
  `}
2288
2289
  ${P.dark`
2289
2290
  background-color: ${p.color.background400};
2290
2291
  `}
2291
- `, Bi = u.img`position:absolute;width:100%;height:100%;inset-block-start:0;inset-inline-start:0;object-fit:cover;opacity:${(e) => e.$loaded ? 1 : 0};transition:opacity 0.5s ease;`;
2292
+ `, Fi = u.img`position:absolute;width:100%;height:100%;inset-block-start:0;inset-inline-start:0;object-fit:cover;opacity:${(e) => e.$loaded ? 1 : 0};transition:opacity 0.5s ease;`;
2292
2293
  function tn(e) {
2293
2294
  var n, o;
2294
2295
  const t = ae(() => {
2295
- const s = Vs(Nn(e.message));
2296
+ const s = Ws(Nn(e.message));
2296
2297
  return yn.sanitize(s);
2297
2298
  }, [e.message]);
2298
2299
  return /* @__PURE__ */ r.createElement(
2299
- Fi,
2300
+ Ui,
2300
2301
  {
2301
2302
  $maxWidth: e.maxBodyWidth ?? Le,
2302
2303
  $color: (n = e.customStyle) == null ? void 0 : n.bubbleContentColor,
2303
2304
  $bgColor: (o = e.customStyle) == null ? void 0 : o.bubbleBackgroundColor
2304
2305
  },
2305
- /* @__PURE__ */ r.createElement(Ui, { variant: "body3", dangerouslySetInnerHTML: { __html: t } })
2306
+ /* @__PURE__ */ r.createElement(Hi, { variant: "body3", dangerouslySetInnerHTML: { __html: t } })
2306
2307
  );
2307
2308
  }
2308
- const Fi = u.div`display:flex;flex-direction:column;border-radius:12px;overflow:hidden;max-width:${({ $maxWidth: e }) => e}px;${({ theme: e, $color: t, $bgColor: n }) => I`
2309
+ const Ui = u.div`display:flex;flex-direction:column;border-radius:12px;overflow:hidden;max-width:${({ $maxWidth: e }) => e}px;${({ theme: e, $color: t, $bgColor: n }) => I`
2309
2310
  color: ${t || e.colors.messageOutgoing.text};
2310
2311
  background-color: ${n || e.colors.messageOutgoing.background};
2311
2312
  `}
2312
2313
  padding: 12px 0;
2313
2314
  transition: max-width 0.3s;
2314
2315
  overflow-wrap: break-word;
2315
- `, Ui = u(w)`align-items:flex-start;line-height:140%;white-space:pre-wrap;padding:0 12px;`;
2316
- function Hi(e) {
2316
+ `, Hi = u(w)`align-items:flex-start;line-height:140%;white-space:pre-wrap;padding:0 12px;`;
2317
+ function zi(e) {
2317
2318
  const { stringSet: t } = O(), n = Dn(e) ? /* @__PURE__ */ r.createElement(tn, { ...e }) : null;
2318
- return e.messageType === "user" ? n : e.messageType === "file" ? e.file.type.startsWith("image") ? /* @__PURE__ */ r.createElement(Di, { ...e }, n) : /* @__PURE__ */ r.createElement(Oi, { ...e }, n) : /* @__PURE__ */ r.createElement(tn, { ...e, message: t.UNKNOWN__UNKNOWN_MESSAGE_TYPE });
2319
+ return e.messageType === "user" ? n : e.messageType === "file" ? e.file.type.startsWith("image") ? /* @__PURE__ */ r.createElement(Ni, { ...e }, n) : /* @__PURE__ */ r.createElement(Li, { ...e }, n) : /* @__PURE__ */ r.createElement(tn, { ...e, message: t.UNKNOWN__UNKNOWN_MESSAGE_TYPE });
2319
2320
  }
2320
- function zi({ sendingStatus: e }) {
2321
+ function Vi({ sendingStatus: e }) {
2321
2322
  const t = xt();
2322
2323
  switch (e) {
2323
2324
  case "pending":
2324
- return /* @__PURE__ */ r.createElement(Vi, { size: 16 }, /* @__PURE__ */ r.createElement(M, { type: "spinner", color: t.colors.messageOutgoing.background, size: 16 }));
2325
+ return /* @__PURE__ */ r.createElement(Wi, { size: 16 }, /* @__PURE__ */ r.createElement(M, { type: "spinner", color: t.colors.messageOutgoing.background, size: 16 }));
2325
2326
  case "failed":
2326
2327
  return /* @__PURE__ */ r.createElement("div", { style: { marginBottom: 2 } }, /* @__PURE__ */ r.createElement(M, { type: "error", color: p.themedColor.error, size: 16 }));
2327
2328
  case "scheduled":
@@ -2331,40 +2332,40 @@ function zi({ sendingStatus: e }) {
2331
2332
  return /* @__PURE__ */ r.createElement("div", null, /* @__PURE__ */ r.createElement(M, { type: "chevron-down" }));
2332
2333
  }
2333
2334
  }
2334
- const Vi = u(Hn)`margin-bottom:2px;width:16px;height:16px;`;
2335
- function Wi({ createdAt: e }) {
2335
+ const Wi = u(Hn)`margin-bottom:2px;width:16px;height:16px;`;
2336
+ function Gi({ createdAt: e }) {
2336
2337
  const { stringSet: t, format: n } = O();
2337
2338
  return e ? /* @__PURE__ */ r.createElement(w, { variant: "caption4", color: p.themedColor.textLowEmphasis }, n(e, t.DATE_FORMAT__MESSAGE_TIMESTAMP)) : null;
2338
2339
  }
2339
2340
  const Ot = _e({
2340
- template: Gi,
2341
+ template: ji,
2341
2342
  components: {
2342
- SendingStatus: zi,
2343
- SentTime: Wi,
2344
- MessageBody: Hi
2343
+ SendingStatus: Vi,
2344
+ SentTime: Gi,
2345
+ MessageBody: zi
2345
2346
  }
2346
2347
  });
2347
- function Gi(e) {
2348
+ function ji(e) {
2348
2349
  const { components: t } = Ot.useContext(), n = e.sendingStatus === "succeeded", o = e.groupType === "bottom" || e.groupType === "single";
2349
- return /* @__PURE__ */ r.createElement(ji, { $marginBottom: Tt(e.groupType) }, /* @__PURE__ */ r.createElement(Ki, null, /* @__PURE__ */ r.createElement(t.MessageBody, { ...e })), o && /* @__PURE__ */ r.createElement(Zi, { $extraEndPadding: 8 }, n ? /* @__PURE__ */ r.createElement(t.SentTime, { ...e }) : /* @__PURE__ */ r.createElement(t.SendingStatus, { ...e })));
2350
+ return /* @__PURE__ */ r.createElement(Ki, { $marginBottom: Tt(e.groupType) }, /* @__PURE__ */ r.createElement(Zi, null, /* @__PURE__ */ r.createElement(t.MessageBody, { ...e })), o && /* @__PURE__ */ r.createElement(Yi, { $extraEndPadding: 8 }, n ? /* @__PURE__ */ r.createElement(t.SentTime, { ...e }) : /* @__PURE__ */ r.createElement(t.SendingStatus, { ...e })));
2350
2351
  }
2351
- const ji = u.div`display:flex;flex:1;flex-direction:column;align-items:flex-end;margin-bottom:${({ $marginBottom: e }) => `${e}px`};
2352
+ const Ki = u.div`display:flex;flex:1;flex-direction:column;align-items:flex-end;margin-bottom:${({ $marginBottom: e }) => `${e}px`};
2352
2353
  `, zn = u.div`display:flex;align-self:stretch;justify-content:flex-end;${({ $startPadding: e = te, $endPadding: t = te, $extraEndPadding: n = 0 }) => `padding-inline: ${e}px ${t + n}px;`};
2353
- `, Ki = u(zn)``, Zi = u(zn)`margin-top:${Rn}px;`;
2354
- function Yi(e) {
2355
- return e.messageType !== "admin" ? null : /* @__PURE__ */ r.createElement(qi, null, /* @__PURE__ */ r.createElement(w, { variant: "caption2", color: p.themedColor.textMidEmphasis }, Ji(yn.sanitize(e.message))));
2354
+ `, Zi = u(zn)``, Yi = u(zn)`margin-top:${Rn}px;`;
2355
+ function qi(e) {
2356
+ return e.messageType !== "admin" ? null : /* @__PURE__ */ r.createElement(Ji, null, /* @__PURE__ */ r.createElement(w, { variant: "caption2", color: p.themedColor.textMidEmphasis }, Xi(yn.sanitize(e.message))));
2356
2357
  }
2357
- const qi = u.div`text-align:center;text-wrap:pretty;a{text-decoration:none;color:inherit;}`, Ji = (e) => {
2358
+ const Ji = u.div`text-align:center;text-wrap:pretty;a{text-decoration:none;color:inherit;}`, Xi = (e) => {
2358
2359
  const t = /\[([^\]]+)\]\((https?:\/\/[^\s]+)\)/g, n = [];
2359
2360
  let o = 0;
2360
2361
  return e.replace(t, (s, i, a, l) => (n.push(e.slice(o, l)), n.push(
2361
2362
  /* @__PURE__ */ r.createElement("a", { key: a, href: a, target: "_blank", rel: St }, i)
2362
2363
  ), o = l + s.length, s)), n.push(e.slice(o)), n;
2363
- }, Xi = ({ submitted: e, defaultValue: t, value: n, onChange: o }) => {
2364
+ }, Qi = ({ submitted: e, defaultValue: t, value: n, onChange: o }) => {
2364
2365
  const { stringSet: s } = O();
2365
2366
  return L(() => {
2366
2367
  typeof n > "u" && typeof t == "boolean" && (o == null || o(t));
2367
- }, [n, t]), /* @__PURE__ */ r.createElement(Qi, null, /* @__PURE__ */ r.createElement(w, { variant: "caption2", color: p.themedColor.textMidEmphasis }, s.CSAT_CRE_TITLE), /* @__PURE__ */ r.createElement("div", null, /* @__PURE__ */ r.createElement(
2368
+ }, [n, t]), /* @__PURE__ */ r.createElement(ea, null, /* @__PURE__ */ r.createElement(w, { variant: "caption2", color: p.themedColor.textMidEmphasis }, s.CSAT_CRE_TITLE), /* @__PURE__ */ r.createElement("div", null, /* @__PURE__ */ r.createElement(
2368
2369
  nn,
2369
2370
  {
2370
2371
  checked: n === !0,
@@ -2383,15 +2384,15 @@ const qi = u.div`text-align:center;text-wrap:pretty;a{text-decoration:none;color
2383
2384
  )));
2384
2385
  }, nn = ({ onClick: e, checked: t, label: n, disabled: o }) => {
2385
2386
  const s = t ? p.color.primary.main : o ? p.themedColor.textDisabled : p.themedColor.textLowEmphasis, i = t ? p.themedColor.textHighEmphasis : o ? p.themedColor.textLowEmphasis : p.themedColor.textHighEmphasis;
2386
- return /* @__PURE__ */ r.createElement(ea, { onClick: e, disabled: o }, /* @__PURE__ */ r.createElement(M, { size: 24, type: t ? "radio-on" : "radio-off", color: s }), /* @__PURE__ */ r.createElement(w, { variant: "caption2", color: i }, n));
2387
- }, Qi = u.div`display:flex;flex-direction:column;gap:8px;`, ea = u.button`all:unset;display:flex;align-items:center;justify-content:flex-start;gap:2px;span{line-height:initial;}&:enabled{cursor:pointer;}`, ta = (e) => /* @__PURE__ */ r.createElement("svg", { width: 40, height: 40, viewBox: "0 0 40 40", fill: "none", xmlns: "http://www.w3.org/2000/svg", id: "csat1", ...e }, /* @__PURE__ */ r.createElement("path", { d: "M2.08301 20C2.08301 10.1049 10.1046 2.08334 19.9997 2.08334C29.8948 2.08334 37.9163 10.1049 37.9163 20C37.9163 29.8952 29.8948 37.9167 19.9997 37.9167C10.1046 37.9167 2.08301 29.8952 2.08301 20Z", fill: "#E0E0E0" }), /* @__PURE__ */ r.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12.5824 29.3328C13.1344 29.7473 13.918 29.636 14.3326 29.084C15.6269 27.3607 17.6835 26.25 19.9997 26.25C22.316 26.25 24.3727 27.3607 25.6668 29.084C26.0815 29.636 26.865 29.7473 27.4172 29.3328C27.9692 28.9182 28.0805 28.1347 27.6658 27.5825C25.9198 25.2577 23.1357 23.75 19.9997 23.75C16.8638 23.75 14.0797 25.2577 12.3336 27.5825C11.919 28.1347 12.0304 28.9182 12.5824 29.3328Z", fill: "black", fillOpacity: 0.12 }), /* @__PURE__ */ r.createElement("path", { d: "M28.4449 13.7707C29.1324 13.8328 29.64 14.4406 29.578 15.1281C29.516 15.8153 28.909 16.3221 28.2219 16.2608C28.2219 16.2608 28.0282 16.2502 27.9267 16.2487C27.7224 16.2457 27.4382 16.2509 27.1224 16.2833C26.7864 16.3177 26.4644 16.3782 26.1799 16.4662L26.304 16.86C26.7792 18.3675 25.5094 19.5813 24.2057 19.5813C23.504 19.5813 22.8319 19.2617 22.4295 18.6857C22.0025 18.0745 21.9417 17.241 22.4075 16.5344C22.7505 16.0143 23.2444 15.3831 23.8959 14.8657C24.8355 14.1195 26.0435 13.8809 26.867 13.7963C27.3024 13.7517 28.0149 13.7319 28.4449 13.7707Z", fill: "black", fillOpacity: 0.12 }), /* @__PURE__ */ r.createElement("path", { d: "M11.5553 13.7707C10.8677 13.8328 10.3601 14.4406 10.4221 15.1281C10.4842 15.8153 11.0912 16.3221 11.7782 16.2608C11.7782 16.2608 11.972 16.2502 12.0734 16.2487C12.2778 16.2457 12.562 16.2509 12.8778 16.2833C13.2137 16.3177 13.5357 16.3782 13.8203 16.4662L13.6962 16.86C13.2209 18.3675 14.4907 19.5813 15.7944 19.5813C16.4962 19.5813 17.1683 19.2617 17.5707 18.6857C17.9975 18.0745 18.0585 17.241 17.5925 16.5344C17.2497 16.0143 16.7557 15.3831 16.1043 14.8657C15.1646 14.1195 13.9566 13.8809 13.1331 13.7963C12.6978 13.7517 11.9853 13.7319 11.5553 13.7707Z", fill: "black", fillOpacity: 0.12 })), na = (e) => /* @__PURE__ */ r.createElement("svg", { width: 40, height: 40, viewBox: "0 0 40 40", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ r.createElement("path", { d: "M2.08337 19.9999C2.08337 10.1048 10.1049 2.08325 20 2.08325C29.8952 2.08325 37.9167 10.1048 37.9167 19.9999C37.9167 29.8951 29.8952 37.9166 20 37.9166C10.1049 37.9166 2.08337 29.8951 2.08337 19.9999Z", fill: "url(#paint0_linear_159_173206)" }), /* @__PURE__ */ r.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12.5828 29.3328C13.1348 29.7473 13.9184 29.636 14.3329 29.084C15.6272 27.3607 17.6839 26.25 20 26.25C22.3164 26.25 24.373 27.3607 25.6672 29.084C26.0819 29.636 26.8654 29.7473 27.4175 29.3328C27.9695 28.9182 28.0809 28.1347 27.6662 27.5825C25.9202 25.2577 23.136 23.75 20 23.75C16.8642 23.75 14.0801 25.2577 12.334 27.5825C11.9194 28.1347 12.0308 28.9182 12.5828 29.3328Z", fill: "#141B34" }), /* @__PURE__ */ r.createElement("path", { d: "M28.4454 13.7707C29.1329 13.8328 29.6405 14.4406 29.5785 15.1281C29.5165 15.8153 28.9095 16.3221 28.2224 16.2608C28.2224 16.2608 28.0287 16.2502 27.9272 16.2487C27.7229 16.2457 27.4387 16.2509 27.1229 16.2833C26.7869 16.3177 26.4649 16.3782 26.1804 16.4662L26.3045 16.86C26.7797 18.3675 25.5099 19.5813 24.2062 19.5813C23.5045 19.5813 22.8324 19.2617 22.43 18.6857C22.003 18.0745 21.9422 17.241 22.408 16.5344C22.751 16.0143 23.2449 15.3831 23.8964 14.8657C24.836 14.1195 26.044 13.8809 26.8675 13.7963C27.3029 13.7517 28.0154 13.7319 28.4454 13.7707Z", fill: "#141B34" }), /* @__PURE__ */ r.createElement("path", { d: "M11.5549 13.7707C10.8674 13.8328 10.3597 14.4406 10.4218 15.1281C10.4838 15.8153 11.0908 16.3221 11.7779 16.2608C11.7779 16.2608 11.9716 16.2502 12.073 16.2487C12.2774 16.2457 12.5616 16.2509 12.8774 16.2833C13.2134 16.3177 13.5353 16.3782 13.8199 16.4662L13.6958 16.86C13.2205 18.3675 14.4904 19.5813 15.794 19.5813C16.4958 19.5813 17.168 19.2617 17.5703 18.6857C17.9971 18.0745 18.0581 17.241 17.5921 16.5344C17.2493 16.0143 16.7553 15.3831 16.1039 14.8657C15.1643 14.1195 13.9562 13.8809 13.1327 13.7963C12.6974 13.7517 11.9849 13.7319 11.5549 13.7707Z", fill: "#141B34" }), /* @__PURE__ */ r.createElement("defs", null, /* @__PURE__ */ r.createElement("linearGradient", { id: "paint0_linear_159_173206", x1: 20, y1: 2.08325, x2: 20, y2: 37.9166, gradientUnits: "userSpaceOnUse" }, /* @__PURE__ */ r.createElement("stop", { stopColor: "#FF2D1D" }), /* @__PURE__ */ r.createElement("stop", { offset: 1, stopColor: "#FFA540" })))), ra = (e) => /* @__PURE__ */ r.createElement("svg", { width: 40, height: 40, viewBox: "0 0 40 40", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ r.createElement("path", { d: "M19.9997 36.6667C29.2044 36.6667 36.6663 29.2048 36.6663 20C36.6663 10.7953 29.2044 3.33334 19.9997 3.33334C10.7949 3.33334 3.33301 10.7953 3.33301 20C3.33301 29.2048 10.7949 36.6667 19.9997 36.6667Z", fill: "#E0E0E0" }), /* @__PURE__ */ r.createElement("path", { d: "M15 28.333C16.3927 27.2867 18.124 26.6667 20 26.6667C21.876 26.6667 23.6073 27.2867 25 28.333", stroke: "black", strokeOpacity: 0.12, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ r.createElement("path", { d: "M11.667 13.3511C11.667 13.3511 14.0161 13.139 15.3268 14.18M15.3268 14.18L14.8882 15.5711C14.7153 16.1199 15.1675 16.6667 15.7943 16.6667C16.4531 16.6667 16.8882 16.0723 16.549 15.5579C16.2483 15.102 15.8388 14.5866 15.3268 14.18ZM23.3337 13.3511C23.3337 13.3511 25.6827 13.139 26.9935 14.18M26.9935 14.18L26.555 15.5711C26.382 16.1199 26.8342 16.6667 27.461 16.6667C28.1198 16.6667 28.5548 16.0723 28.2157 15.5579C27.915 15.102 27.5055 14.5866 26.9935 14.18Z", stroke: "black", strokeOpacity: 0.12, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" })), oa = (e) => /* @__PURE__ */ r.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 40, height: 40, viewBox: "0 0 40 40", fill: "none", ...e }, /* @__PURE__ */ r.createElement("path", { d: "M2.083 20C2.083 10.105 10.105 2.083 20 2.083c9.895 0 17.917 8.021 17.917 17.917 0 9.895-8.022 17.917-17.917 17.917C10.105 37.917 2.083 29.895 2.083 20Z", fill: "#FFD46E" }), /* @__PURE__ */ r.createElement("path", { d: "M14.249 27.334C15.851 26.13 17.844 25.417 20 25.417c2.156 0 4.149.714 5.751 1.917.553.415.664 1.199.25 1.751-.415.552-1.199.664-1.751.25-1.183-.889-2.652-1.416-4.25-1.416s-3.067.527-4.25 1.416c-.553.414-1.336.302-1.751-.25-.415-.552-.303-1.336.249-1.751Z", fill: "#141B34" }), /* @__PURE__ */ r.createElement("path", { d: "M23.445 14.596c-.687.062-1.294-.445-1.356-1.132-.062-.687.445-1.295 1.132-1.357.082-.005.342-.02.482-.022.277-.004.662.002 1.097.047.823.085 2.031.323 2.97 1.07.652.518 1.146 1.15 1.489 1.67.466.706.405 1.54-.022 2.15-.402.576-1.074.896-1.775.896-1.304 0-2.573-1.214-2.098-2.722l.125-.394c-.285-.088-.607-.148-.942-.182-.316-.033-.6-.038-.804-.035-.101.002-.242.01-.294.013Z", fill: "#141B34" }), /* @__PURE__ */ r.createElement("path", { d: "M11.779 14.596c-.687.062-1.294-.445-1.356-1.132-.062-.687.445-1.295 1.132-1.357.082-.005.342-.02.482-.022.277-.004.662.002 1.097.047.823.085 2.031.323 2.97 1.07.652.518 1.146 1.15 1.489 1.67.466.706.405 1.54-.022 2.15-.402.576-1.074.896-1.775.896-1.304 0-2.573-1.214-2.098-2.722l.124-.394c-.284-.088-.606-.148-.941-.182-.316-.033-.6-.038-.804-.035-.101.002-.243.01-.294.013Z", fill: "#141B34" })), sa = (e) => /* @__PURE__ */ r.createElement("svg", { width: 40, height: 40, viewBox: "0 0 40 40", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ r.createElement("path", { d: "M19.9997 36.6667C29.2044 36.6667 36.6663 29.2048 36.6663 20C36.6663 10.7953 29.2044 3.33334 19.9997 3.33334C10.7949 3.33334 3.33301 10.7953 3.33301 20C3.33301 29.2048 10.7949 36.6667 19.9997 36.6667Z", fill: "#E0E0E0" }), /* @__PURE__ */ r.createElement("path", { d: "M13.348 15H13.333M26.6663 15H26.6513", stroke: "black", strokeOpacity: 0.12, strokeWidth: 3.33333, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ r.createElement("path", { d: "M15 26.6667H25", stroke: "black", strokeOpacity: 0.12, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" })), ia = (e) => /* @__PURE__ */ r.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 40, height: 40, viewBox: "0 0 40 40", fill: "none", ...e }, /* @__PURE__ */ r.createElement("path", { d: "M2.083 20C2.083 10.105 10.105 2.083 20 2.083c9.895 0 17.917 8.021 17.917 17.917 0 9.895-8.022 17.917-17.917 17.917C10.105 37.917 2.083 29.895 2.083 20Z", fill: "#FFD46E" }), /* @__PURE__ */ r.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M11.25 15c0-1.151.933-2.083 2.083-2.083h.015c1.151 0 2.084.933 2.084 2.083 0 1.151-.933 2.083-2.084 2.083h-.015c-1.15 0-2.083-.933-2.083-2.083ZM24.568 15c0-1.151.933-2.083 2.084-2.083h.015c1.151 0 2.083.933 2.083 2.083 0 1.151-.932 2.083-2.083 2.083h-.015c-1.151 0-2.084-.933-2.084-2.083Z", fill: "#141B34" }), /* @__PURE__ */ r.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M13.75 26.667c0-.691.56-1.25 1.25-1.25h10c.69 0 1.25.559 1.25 1.25 0 .691-.56 1.25-1.25 1.25h-10c-.69 0-1.25-.559-1.25-1.25Z", fill: "#141B34" })), aa = (e) => /* @__PURE__ */ r.createElement("svg", { width: 40, height: 40, viewBox: "0 0 40 40", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ r.createElement("path", { d: "M19.9997 36.6667C29.2044 36.6667 36.6663 29.2048 36.6663 20C36.6663 10.7953 29.2044 3.33334 19.9997 3.33334C10.7949 3.33334 3.33301 10.7953 3.33301 20C3.33301 29.2048 10.7949 36.6667 19.9997 36.6667Z", fill: "#E0E0E0" }), /* @__PURE__ */ r.createElement("path", { d: "M13.333 25C14.8532 27.024 17.2735 28.3333 19.9997 28.3333C22.7258 28.3333 25.1462 27.024 26.6663 25", stroke: "black", strokeOpacity: 0.12, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ r.createElement("path", { d: "M13.348 15H13.333M26.6663 15H26.6513", stroke: "black", strokeOpacity: 0.12, strokeWidth: 3.33333, strokeLinecap: "round", strokeLinejoin: "round" })), la = (e) => /* @__PURE__ */ r.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 40, height: 40, viewBox: "0 0 40 40", fill: "none", ...e }, /* @__PURE__ */ r.createElement("path", { d: "M2.083 20C2.083 10.105 10.105 2.083 20 2.083c9.895 0 17.917 8.021 17.917 17.917 0 9.895-8.022 17.917-17.917 17.917C10.105 37.917 2.083 29.895 2.083 20Z", fill: "#FFD46E" }), /* @__PURE__ */ r.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12.583 24.001c.552-.414 1.335-.302 1.75.25 1.294 1.723 3.35 2.834 5.667 2.834s4.373-1.11 5.667-2.834c.415-.552 1.199-.664 1.751-.25.552.415.664 1.199.25 1.751C25.92 28.076 23.136 29.584 20 29.584s-5.92-1.508-7.666-3.832c-.415-.552-.303-1.336.249-1.751Z", fill: "#141B34" }), /* @__PURE__ */ r.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M11.25 15c0-1.151.933-2.083 2.083-2.083h.015c1.151 0 2.084.933 2.084 2.083 0 1.151-.933 2.083-2.084 2.083h-.015c-1.15 0-2.083-.933-2.083-2.083ZM24.568 15c0-1.151.933-2.083 2.084-2.083h.015c1.151 0 2.083.933 2.083 2.083 0 1.151-.932 2.083-2.083 2.083h-.015c-1.151 0-2.084-.933-2.084-2.083Z", fill: "#141B34" })), ca = (e) => /* @__PURE__ */ r.createElement("svg", { width: 40, height: 40, viewBox: "0 0 40 40", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ r.createElement("path", { d: "M19.9997 36.6663C29.2044 36.6663 36.6663 29.2044 36.6663 19.9997C36.6663 10.7949 29.2044 3.33301 19.9997 3.33301C10.7949 3.33301 3.33301 10.7949 3.33301 19.9997C3.33301 29.2044 10.7949 36.6663 19.9997 36.6663Z", fill: "#E0E0E0" }), /* @__PURE__ */ r.createElement("path", { d: "M19.9997 30C23.16 30 25.8145 27.867 26.56 24.9832C26.9068 23.6413 26.4033 23.3333 25.0765 23.3333H14.9228C13.5959 23.3333 13.0925 23.6413 13.4393 24.9832C14.1848 27.867 16.8393 30 19.9997 30Z", stroke: "black", strokeOpacity: 0.12, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ r.createElement("path", { d: "M11.667 15.8333C11.667 14.4526 12.7863 13.3333 14.167 13.3333C15.5477 13.3333 16.667 14.4526 16.667 15.8333M23.3337 15.8333C23.3337 14.4526 24.453 13.3333 25.8337 13.3333C27.2143 13.3333 28.3337 14.4526 28.3337 15.8333", stroke: "black", strokeOpacity: 0.12, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" })), da = (e) => /* @__PURE__ */ r.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 40, height: 40, viewBox: "0 0 40 40", fill: "none", ...e }, /* @__PURE__ */ r.createElement("path", { d: "M2.083 20C2.083 10.105 10.105 2.083 20 2.083c9.895 0 17.917 8.021 17.917 17.917 0 9.895-8.022 17.917-17.917 17.917C10.105 37.917 2.083 29.895 2.083 20Z", fill: "#FFD46E" }), /* @__PURE__ */ r.createElement("g", { clipPath: "url(#clip0_159_173224)" }, /* @__PURE__ */ r.createElement("g", { clipPath: "url(#clip1_159_173224)" }, /* @__PURE__ */ r.createElement("path", { d: "M20 30.624c3.752 0 6.904-2.532 7.789-5.956.412-1.593-.185-1.959-1.76-1.959H13.973c-1.575 0-2.173.366-1.761 1.959.885 3.424 4.037 5.956 7.788 5.956Z", fill: "#141B34" })), /* @__PURE__ */ r.createElement("mask", { id: "mask0_159_173224", style: {
2387
+ return /* @__PURE__ */ r.createElement(ta, { onClick: e, disabled: o }, /* @__PURE__ */ r.createElement(M, { size: 24, type: t ? "radio-on" : "radio-off", color: s }), /* @__PURE__ */ r.createElement(w, { variant: "caption2", color: i }, n));
2388
+ }, ea = u.div`display:flex;flex-direction:column;gap:8px;`, ta = u.button`all:unset;display:flex;align-items:center;justify-content:flex-start;gap:2px;span{line-height:initial;}&:enabled{cursor:pointer;}`, na = (e) => /* @__PURE__ */ r.createElement("svg", { width: 40, height: 40, viewBox: "0 0 40 40", fill: "none", xmlns: "http://www.w3.org/2000/svg", id: "csat1", ...e }, /* @__PURE__ */ r.createElement("path", { d: "M2.08301 20C2.08301 10.1049 10.1046 2.08334 19.9997 2.08334C29.8948 2.08334 37.9163 10.1049 37.9163 20C37.9163 29.8952 29.8948 37.9167 19.9997 37.9167C10.1046 37.9167 2.08301 29.8952 2.08301 20Z", fill: "#E0E0E0" }), /* @__PURE__ */ r.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12.5824 29.3328C13.1344 29.7473 13.918 29.636 14.3326 29.084C15.6269 27.3607 17.6835 26.25 19.9997 26.25C22.316 26.25 24.3727 27.3607 25.6668 29.084C26.0815 29.636 26.865 29.7473 27.4172 29.3328C27.9692 28.9182 28.0805 28.1347 27.6658 27.5825C25.9198 25.2577 23.1357 23.75 19.9997 23.75C16.8638 23.75 14.0797 25.2577 12.3336 27.5825C11.919 28.1347 12.0304 28.9182 12.5824 29.3328Z", fill: "black", fillOpacity: 0.12 }), /* @__PURE__ */ r.createElement("path", { d: "M28.4449 13.7707C29.1324 13.8328 29.64 14.4406 29.578 15.1281C29.516 15.8153 28.909 16.3221 28.2219 16.2608C28.2219 16.2608 28.0282 16.2502 27.9267 16.2487C27.7224 16.2457 27.4382 16.2509 27.1224 16.2833C26.7864 16.3177 26.4644 16.3782 26.1799 16.4662L26.304 16.86C26.7792 18.3675 25.5094 19.5813 24.2057 19.5813C23.504 19.5813 22.8319 19.2617 22.4295 18.6857C22.0025 18.0745 21.9417 17.241 22.4075 16.5344C22.7505 16.0143 23.2444 15.3831 23.8959 14.8657C24.8355 14.1195 26.0435 13.8809 26.867 13.7963C27.3024 13.7517 28.0149 13.7319 28.4449 13.7707Z", fill: "black", fillOpacity: 0.12 }), /* @__PURE__ */ r.createElement("path", { d: "M11.5553 13.7707C10.8677 13.8328 10.3601 14.4406 10.4221 15.1281C10.4842 15.8153 11.0912 16.3221 11.7782 16.2608C11.7782 16.2608 11.972 16.2502 12.0734 16.2487C12.2778 16.2457 12.562 16.2509 12.8778 16.2833C13.2137 16.3177 13.5357 16.3782 13.8203 16.4662L13.6962 16.86C13.2209 18.3675 14.4907 19.5813 15.7944 19.5813C16.4962 19.5813 17.1683 19.2617 17.5707 18.6857C17.9975 18.0745 18.0585 17.241 17.5925 16.5344C17.2497 16.0143 16.7557 15.3831 16.1043 14.8657C15.1646 14.1195 13.9566 13.8809 13.1331 13.7963C12.6978 13.7517 11.9853 13.7319 11.5553 13.7707Z", fill: "black", fillOpacity: 0.12 })), ra = (e) => /* @__PURE__ */ r.createElement("svg", { width: 40, height: 40, viewBox: "0 0 40 40", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ r.createElement("path", { d: "M2.08337 19.9999C2.08337 10.1048 10.1049 2.08325 20 2.08325C29.8952 2.08325 37.9167 10.1048 37.9167 19.9999C37.9167 29.8951 29.8952 37.9166 20 37.9166C10.1049 37.9166 2.08337 29.8951 2.08337 19.9999Z", fill: "url(#paint0_linear_159_173206)" }), /* @__PURE__ */ r.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12.5828 29.3328C13.1348 29.7473 13.9184 29.636 14.3329 29.084C15.6272 27.3607 17.6839 26.25 20 26.25C22.3164 26.25 24.373 27.3607 25.6672 29.084C26.0819 29.636 26.8654 29.7473 27.4175 29.3328C27.9695 28.9182 28.0809 28.1347 27.6662 27.5825C25.9202 25.2577 23.136 23.75 20 23.75C16.8642 23.75 14.0801 25.2577 12.334 27.5825C11.9194 28.1347 12.0308 28.9182 12.5828 29.3328Z", fill: "#141B34" }), /* @__PURE__ */ r.createElement("path", { d: "M28.4454 13.7707C29.1329 13.8328 29.6405 14.4406 29.5785 15.1281C29.5165 15.8153 28.9095 16.3221 28.2224 16.2608C28.2224 16.2608 28.0287 16.2502 27.9272 16.2487C27.7229 16.2457 27.4387 16.2509 27.1229 16.2833C26.7869 16.3177 26.4649 16.3782 26.1804 16.4662L26.3045 16.86C26.7797 18.3675 25.5099 19.5813 24.2062 19.5813C23.5045 19.5813 22.8324 19.2617 22.43 18.6857C22.003 18.0745 21.9422 17.241 22.408 16.5344C22.751 16.0143 23.2449 15.3831 23.8964 14.8657C24.836 14.1195 26.044 13.8809 26.8675 13.7963C27.3029 13.7517 28.0154 13.7319 28.4454 13.7707Z", fill: "#141B34" }), /* @__PURE__ */ r.createElement("path", { d: "M11.5549 13.7707C10.8674 13.8328 10.3597 14.4406 10.4218 15.1281C10.4838 15.8153 11.0908 16.3221 11.7779 16.2608C11.7779 16.2608 11.9716 16.2502 12.073 16.2487C12.2774 16.2457 12.5616 16.2509 12.8774 16.2833C13.2134 16.3177 13.5353 16.3782 13.8199 16.4662L13.6958 16.86C13.2205 18.3675 14.4904 19.5813 15.794 19.5813C16.4958 19.5813 17.168 19.2617 17.5703 18.6857C17.9971 18.0745 18.0581 17.241 17.5921 16.5344C17.2493 16.0143 16.7553 15.3831 16.1039 14.8657C15.1643 14.1195 13.9562 13.8809 13.1327 13.7963C12.6974 13.7517 11.9849 13.7319 11.5549 13.7707Z", fill: "#141B34" }), /* @__PURE__ */ r.createElement("defs", null, /* @__PURE__ */ r.createElement("linearGradient", { id: "paint0_linear_159_173206", x1: 20, y1: 2.08325, x2: 20, y2: 37.9166, gradientUnits: "userSpaceOnUse" }, /* @__PURE__ */ r.createElement("stop", { stopColor: "#FF2D1D" }), /* @__PURE__ */ r.createElement("stop", { offset: 1, stopColor: "#FFA540" })))), oa = (e) => /* @__PURE__ */ r.createElement("svg", { width: 40, height: 40, viewBox: "0 0 40 40", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ r.createElement("path", { d: "M19.9997 36.6667C29.2044 36.6667 36.6663 29.2048 36.6663 20C36.6663 10.7953 29.2044 3.33334 19.9997 3.33334C10.7949 3.33334 3.33301 10.7953 3.33301 20C3.33301 29.2048 10.7949 36.6667 19.9997 36.6667Z", fill: "#E0E0E0" }), /* @__PURE__ */ r.createElement("path", { d: "M15 28.333C16.3927 27.2867 18.124 26.6667 20 26.6667C21.876 26.6667 23.6073 27.2867 25 28.333", stroke: "black", strokeOpacity: 0.12, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ r.createElement("path", { d: "M11.667 13.3511C11.667 13.3511 14.0161 13.139 15.3268 14.18M15.3268 14.18L14.8882 15.5711C14.7153 16.1199 15.1675 16.6667 15.7943 16.6667C16.4531 16.6667 16.8882 16.0723 16.549 15.5579C16.2483 15.102 15.8388 14.5866 15.3268 14.18ZM23.3337 13.3511C23.3337 13.3511 25.6827 13.139 26.9935 14.18M26.9935 14.18L26.555 15.5711C26.382 16.1199 26.8342 16.6667 27.461 16.6667C28.1198 16.6667 28.5548 16.0723 28.2157 15.5579C27.915 15.102 27.5055 14.5866 26.9935 14.18Z", stroke: "black", strokeOpacity: 0.12, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" })), sa = (e) => /* @__PURE__ */ r.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 40, height: 40, viewBox: "0 0 40 40", fill: "none", ...e }, /* @__PURE__ */ r.createElement("path", { d: "M2.083 20C2.083 10.105 10.105 2.083 20 2.083c9.895 0 17.917 8.021 17.917 17.917 0 9.895-8.022 17.917-17.917 17.917C10.105 37.917 2.083 29.895 2.083 20Z", fill: "#FFD46E" }), /* @__PURE__ */ r.createElement("path", { d: "M14.249 27.334C15.851 26.13 17.844 25.417 20 25.417c2.156 0 4.149.714 5.751 1.917.553.415.664 1.199.25 1.751-.415.552-1.199.664-1.751.25-1.183-.889-2.652-1.416-4.25-1.416s-3.067.527-4.25 1.416c-.553.414-1.336.302-1.751-.25-.415-.552-.303-1.336.249-1.751Z", fill: "#141B34" }), /* @__PURE__ */ r.createElement("path", { d: "M23.445 14.596c-.687.062-1.294-.445-1.356-1.132-.062-.687.445-1.295 1.132-1.357.082-.005.342-.02.482-.022.277-.004.662.002 1.097.047.823.085 2.031.323 2.97 1.07.652.518 1.146 1.15 1.489 1.67.466.706.405 1.54-.022 2.15-.402.576-1.074.896-1.775.896-1.304 0-2.573-1.214-2.098-2.722l.125-.394c-.285-.088-.607-.148-.942-.182-.316-.033-.6-.038-.804-.035-.101.002-.242.01-.294.013Z", fill: "#141B34" }), /* @__PURE__ */ r.createElement("path", { d: "M11.779 14.596c-.687.062-1.294-.445-1.356-1.132-.062-.687.445-1.295 1.132-1.357.082-.005.342-.02.482-.022.277-.004.662.002 1.097.047.823.085 2.031.323 2.97 1.07.652.518 1.146 1.15 1.489 1.67.466.706.405 1.54-.022 2.15-.402.576-1.074.896-1.775.896-1.304 0-2.573-1.214-2.098-2.722l.124-.394c-.284-.088-.606-.148-.941-.182-.316-.033-.6-.038-.804-.035-.101.002-.243.01-.294.013Z", fill: "#141B34" })), ia = (e) => /* @__PURE__ */ r.createElement("svg", { width: 40, height: 40, viewBox: "0 0 40 40", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ r.createElement("path", { d: "M19.9997 36.6667C29.2044 36.6667 36.6663 29.2048 36.6663 20C36.6663 10.7953 29.2044 3.33334 19.9997 3.33334C10.7949 3.33334 3.33301 10.7953 3.33301 20C3.33301 29.2048 10.7949 36.6667 19.9997 36.6667Z", fill: "#E0E0E0" }), /* @__PURE__ */ r.createElement("path", { d: "M13.348 15H13.333M26.6663 15H26.6513", stroke: "black", strokeOpacity: 0.12, strokeWidth: 3.33333, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ r.createElement("path", { d: "M15 26.6667H25", stroke: "black", strokeOpacity: 0.12, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" })), aa = (e) => /* @__PURE__ */ r.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 40, height: 40, viewBox: "0 0 40 40", fill: "none", ...e }, /* @__PURE__ */ r.createElement("path", { d: "M2.083 20C2.083 10.105 10.105 2.083 20 2.083c9.895 0 17.917 8.021 17.917 17.917 0 9.895-8.022 17.917-17.917 17.917C10.105 37.917 2.083 29.895 2.083 20Z", fill: "#FFD46E" }), /* @__PURE__ */ r.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M11.25 15c0-1.151.933-2.083 2.083-2.083h.015c1.151 0 2.084.933 2.084 2.083 0 1.151-.933 2.083-2.084 2.083h-.015c-1.15 0-2.083-.933-2.083-2.083ZM24.568 15c0-1.151.933-2.083 2.084-2.083h.015c1.151 0 2.083.933 2.083 2.083 0 1.151-.932 2.083-2.083 2.083h-.015c-1.151 0-2.084-.933-2.084-2.083Z", fill: "#141B34" }), /* @__PURE__ */ r.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M13.75 26.667c0-.691.56-1.25 1.25-1.25h10c.69 0 1.25.559 1.25 1.25 0 .691-.56 1.25-1.25 1.25h-10c-.69 0-1.25-.559-1.25-1.25Z", fill: "#141B34" })), la = (e) => /* @__PURE__ */ r.createElement("svg", { width: 40, height: 40, viewBox: "0 0 40 40", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ r.createElement("path", { d: "M19.9997 36.6667C29.2044 36.6667 36.6663 29.2048 36.6663 20C36.6663 10.7953 29.2044 3.33334 19.9997 3.33334C10.7949 3.33334 3.33301 10.7953 3.33301 20C3.33301 29.2048 10.7949 36.6667 19.9997 36.6667Z", fill: "#E0E0E0" }), /* @__PURE__ */ r.createElement("path", { d: "M13.333 25C14.8532 27.024 17.2735 28.3333 19.9997 28.3333C22.7258 28.3333 25.1462 27.024 26.6663 25", stroke: "black", strokeOpacity: 0.12, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ r.createElement("path", { d: "M13.348 15H13.333M26.6663 15H26.6513", stroke: "black", strokeOpacity: 0.12, strokeWidth: 3.33333, strokeLinecap: "round", strokeLinejoin: "round" })), ca = (e) => /* @__PURE__ */ r.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 40, height: 40, viewBox: "0 0 40 40", fill: "none", ...e }, /* @__PURE__ */ r.createElement("path", { d: "M2.083 20C2.083 10.105 10.105 2.083 20 2.083c9.895 0 17.917 8.021 17.917 17.917 0 9.895-8.022 17.917-17.917 17.917C10.105 37.917 2.083 29.895 2.083 20Z", fill: "#FFD46E" }), /* @__PURE__ */ r.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12.583 24.001c.552-.414 1.335-.302 1.75.25 1.294 1.723 3.35 2.834 5.667 2.834s4.373-1.11 5.667-2.834c.415-.552 1.199-.664 1.751-.25.552.415.664 1.199.25 1.751C25.92 28.076 23.136 29.584 20 29.584s-5.92-1.508-7.666-3.832c-.415-.552-.303-1.336.249-1.751Z", fill: "#141B34" }), /* @__PURE__ */ r.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M11.25 15c0-1.151.933-2.083 2.083-2.083h.015c1.151 0 2.084.933 2.084 2.083 0 1.151-.933 2.083-2.084 2.083h-.015c-1.15 0-2.083-.933-2.083-2.083ZM24.568 15c0-1.151.933-2.083 2.084-2.083h.015c1.151 0 2.083.933 2.083 2.083 0 1.151-.932 2.083-2.083 2.083h-.015c-1.151 0-2.084-.933-2.084-2.083Z", fill: "#141B34" })), da = (e) => /* @__PURE__ */ r.createElement("svg", { width: 40, height: 40, viewBox: "0 0 40 40", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ r.createElement("path", { d: "M19.9997 36.6663C29.2044 36.6663 36.6663 29.2044 36.6663 19.9997C36.6663 10.7949 29.2044 3.33301 19.9997 3.33301C10.7949 3.33301 3.33301 10.7949 3.33301 19.9997C3.33301 29.2044 10.7949 36.6663 19.9997 36.6663Z", fill: "#E0E0E0" }), /* @__PURE__ */ r.createElement("path", { d: "M19.9997 30C23.16 30 25.8145 27.867 26.56 24.9832C26.9068 23.6413 26.4033 23.3333 25.0765 23.3333H14.9228C13.5959 23.3333 13.0925 23.6413 13.4393 24.9832C14.1848 27.867 16.8393 30 19.9997 30Z", stroke: "black", strokeOpacity: 0.12, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ r.createElement("path", { d: "M11.667 15.8333C11.667 14.4526 12.7863 13.3333 14.167 13.3333C15.5477 13.3333 16.667 14.4526 16.667 15.8333M23.3337 15.8333C23.3337 14.4526 24.453 13.3333 25.8337 13.3333C27.2143 13.3333 28.3337 14.4526 28.3337 15.8333", stroke: "black", strokeOpacity: 0.12, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" })), ua = (e) => /* @__PURE__ */ r.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 40, height: 40, viewBox: "0 0 40 40", fill: "none", ...e }, /* @__PURE__ */ r.createElement("path", { d: "M2.083 20C2.083 10.105 10.105 2.083 20 2.083c9.895 0 17.917 8.021 17.917 17.917 0 9.895-8.022 17.917-17.917 17.917C10.105 37.917 2.083 29.895 2.083 20Z", fill: "#FFD46E" }), /* @__PURE__ */ r.createElement("g", { clipPath: "url(#clip0_159_173224)" }, /* @__PURE__ */ r.createElement("g", { clipPath: "url(#clip1_159_173224)" }, /* @__PURE__ */ r.createElement("path", { d: "M20 30.624c3.752 0 6.904-2.532 7.789-5.956.412-1.593-.185-1.959-1.76-1.959H13.973c-1.575 0-2.173.366-1.761 1.959.885 3.424 4.037 5.956 7.788 5.956Z", fill: "#141B34" })), /* @__PURE__ */ r.createElement("mask", { id: "mask0_159_173224", style: {
2388
2389
  maskType: "alpha"
2389
- }, maskUnits: "userSpaceOnUse", x: 12, y: 22, width: 16, height: 9 }, /* @__PURE__ */ r.createElement("path", { d: "M20 30.624c3.752 0 6.904-2.532 7.789-5.956.412-1.593-.185-1.959-1.76-1.959H13.973c-1.575 0-2.173.366-1.761 1.959.885 3.424 4.037 5.956 7.788 5.956Z", fill: "#141B34" })), /* @__PURE__ */ r.createElement("g", { mask: "url(#mask0_159_173224)" }, /* @__PURE__ */ r.createElement("path", { d: "M20 32.998c3.278 0 5.936-1.594 5.936-3.561 0-1.968-2.658-3.562-5.936-3.562-3.278 0-5.936 1.594-5.936 3.562 0 1.967 2.658 3.561 5.936 3.561Z", fill: "#FF493B" }))), /* @__PURE__ */ r.createElement("path", { d: "M11.667 15.833c0-1.381 1.12-2.5 2.5-2.5s2.5 1.12 2.5 2.5M23.333 15.833c0-1.381 1.12-2.5 2.5-2.5s2.5 1.12 2.5 2.5", stroke: "#141B34", strokeWidth: 2.5, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ r.createElement("defs", null, /* @__PURE__ */ r.createElement("clipPath", { id: "clip0_159_173224" }, /* @__PURE__ */ r.createElement("rect", { width: 15.83, height: 7.915, fill: "white", transform: "translate(12.085 22.709)" })), /* @__PURE__ */ r.createElement("clipPath", { id: "clip1_159_173224" }, /* @__PURE__ */ r.createElement("rect", { width: 15.83, height: 7.915, fill: "white", transform: "translate(12.085 22.709)" })))), ua = [
2390
+ }, maskUnits: "userSpaceOnUse", x: 12, y: 22, width: 16, height: 9 }, /* @__PURE__ */ r.createElement("path", { d: "M20 30.624c3.752 0 6.904-2.532 7.789-5.956.412-1.593-.185-1.959-1.76-1.959H13.973c-1.575 0-2.173.366-1.761 1.959.885 3.424 4.037 5.956 7.788 5.956Z", fill: "#141B34" })), /* @__PURE__ */ r.createElement("g", { mask: "url(#mask0_159_173224)" }, /* @__PURE__ */ r.createElement("path", { d: "M20 32.998c3.278 0 5.936-1.594 5.936-3.561 0-1.968-2.658-3.562-5.936-3.562-3.278 0-5.936 1.594-5.936 3.562 0 1.967 2.658 3.561 5.936 3.561Z", fill: "#FF493B" }))), /* @__PURE__ */ r.createElement("path", { d: "M11.667 15.833c0-1.381 1.12-2.5 2.5-2.5s2.5 1.12 2.5 2.5M23.333 15.833c0-1.381 1.12-2.5 2.5-2.5s2.5 1.12 2.5 2.5", stroke: "#141B34", strokeWidth: 2.5, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ r.createElement("defs", null, /* @__PURE__ */ r.createElement("clipPath", { id: "clip0_159_173224" }, /* @__PURE__ */ r.createElement("rect", { width: 15.83, height: 7.915, fill: "white", transform: "translate(12.085 22.709)" })), /* @__PURE__ */ r.createElement("clipPath", { id: "clip1_159_173224" }, /* @__PURE__ */ r.createElement("rect", { width: 15.83, height: 7.915, fill: "white", transform: "translate(12.085 22.709)" })))), ma = [
2390
2391
  {
2391
2392
  value: 1,
2392
2393
  Icon: {
2393
- Active: na,
2394
- Inactive: ta
2394
+ Active: ra,
2395
+ Inactive: na
2395
2396
  },
2396
2397
  isActive: (e) => e <= 1,
2397
2398
  getTooltip: (e) => e.CSAT5_RATING_SCORE_1
@@ -2399,8 +2400,8 @@ const qi = u.div`text-align:center;text-wrap:pretty;a{text-decoration:none;color
2399
2400
  {
2400
2401
  value: 2,
2401
2402
  Icon: {
2402
- Active: oa,
2403
- Inactive: ra
2403
+ Active: sa,
2404
+ Inactive: oa
2404
2405
  },
2405
2406
  isActive: (e) => e === 2,
2406
2407
  getTooltip: (e) => e.CSAT5_RATING_SCORE_2
@@ -2408,8 +2409,8 @@ const qi = u.div`text-align:center;text-wrap:pretty;a{text-decoration:none;color
2408
2409
  {
2409
2410
  value: 3,
2410
2411
  Icon: {
2411
- Active: ia,
2412
- Inactive: sa
2412
+ Active: aa,
2413
+ Inactive: ia
2413
2414
  },
2414
2415
  isActive: (e) => e === 3,
2415
2416
  getTooltip: (e) => e.CSAT5_RATING_SCORE_3
@@ -2417,8 +2418,8 @@ const qi = u.div`text-align:center;text-wrap:pretty;a{text-decoration:none;color
2417
2418
  {
2418
2419
  value: 4,
2419
2420
  Icon: {
2420
- Active: la,
2421
- Inactive: aa
2421
+ Active: ca,
2422
+ Inactive: la
2422
2423
  },
2423
2424
  isActive: (e) => e === 4,
2424
2425
  getTooltip: (e) => e.CSAT5_RATING_SCORE_4
@@ -2426,13 +2427,13 @@ const qi = u.div`text-align:center;text-wrap:pretty;a{text-decoration:none;color
2426
2427
  {
2427
2428
  value: 5,
2428
2429
  Icon: {
2429
- Active: da,
2430
- Inactive: ca
2430
+ Active: ua,
2431
+ Inactive: da
2431
2432
  },
2432
2433
  isActive: (e) => 5 <= e,
2433
2434
  getTooltip: (e) => e.CSAT5_RATING_SCORE_5
2434
2435
  }
2435
- ], ma = () => ua, Vn = ({ label: e, children: t, position: n = "top", disabled: o }) => o ? t : /* @__PURE__ */ r.createElement(ft, null, t, /* @__PURE__ */ r.createElement(pa, { $position: n }, /* @__PURE__ */ r.createElement(fa, { variant: "caption1" }, e), /* @__PURE__ */ r.createElement(ga, { $position: n }))), ga = ({ $position: e }) => /* @__PURE__ */ r.createElement(
2436
+ ], ga = () => ma, Vn = ({ label: e, children: t, position: n = "top", disabled: o }) => o ? t : /* @__PURE__ */ r.createElement(ft, null, t, /* @__PURE__ */ r.createElement(fa, { $position: n }, /* @__PURE__ */ r.createElement(ba, { variant: "caption1" }, e), /* @__PURE__ */ r.createElement(ha, { $position: n }))), ha = ({ $position: e }) => /* @__PURE__ */ r.createElement(
2436
2437
  "svg",
2437
2438
  {
2438
2439
  style: { transform: e === "top" ? "rotate(0)" : "rotate(180deg)" },
@@ -2443,13 +2444,13 @@ const qi = u.div`text-align:center;text-wrap:pretty;a{text-decoration:none;color
2443
2444
  fill: "none"
2444
2445
  },
2445
2446
  /* @__PURE__ */ r.createElement("path", { d: "M6 6L0 0h12L6 6Z", fill: p.themedColor.textHighEmphasis })
2446
- ), ha = {
2447
+ ), pa = {
2447
2448
  top: I`flex-direction:column;top:0;transform:translate(-50%,-100%);`,
2448
2449
  bottom: I`flex-direction:column-reverse;bottom:0;transform:translate(-50%,100%);`
2449
- }, ft = u.div`position:relative;`, pa = u.div`display:flex;align-items:center;position:absolute;left:50%;z-index:${fe.TOOLTIP};${({ $position: e }) => ha[e]}opacity:0;transition:opacity 0.2s ease-in-out;pointer-events:none;${ft}:hover &,${ft}:focus-within &{opacity:1;}`, fa = u(w)`padding:6px 8px;background:${p.themedColor.textHighEmphasis};color:${p.themedColor.textHighEmphasisInverse};border-radius:4px;font-size:12px;white-space:nowrap;`, ba = ({ submitted: e, value: t, onChange: n }) => {
2450
- const { stringSet: o } = O(), s = ma(), i = typeof t == "number";
2451
- return /* @__PURE__ */ r.createElement(Ea, null, /* @__PURE__ */ r.createElement(w, { variant: "caption2", color: p.themedColor.textMidEmphasis }, o.CSAT_RATING_TITLE), /* @__PURE__ */ r.createElement(xa, null, s.map((a) => /* @__PURE__ */ r.createElement(Vn, { disabled: e, key: a.value, label: a.getTooltip(o) }, /* @__PURE__ */ r.createElement(
2452
- Ca,
2450
+ }, ft = u.div`position:relative;`, fa = u.div`display:flex;align-items:center;position:absolute;left:50%;z-index:${fe.TOOLTIP};${({ $position: e }) => pa[e]}opacity:0;transition:opacity 0.2s ease-in-out;pointer-events:none;${ft}:hover &,${ft}:focus-within &{opacity:1;}`, ba = u(w)`padding:6px 8px;background:${p.themedColor.textHighEmphasis};color:${p.themedColor.textHighEmphasisInverse};border-radius:4px;font-size:12px;white-space:nowrap;`, Ea = ({ submitted: e, value: t, onChange: n }) => {
2451
+ const { stringSet: o } = O(), s = ga(), i = typeof t == "number";
2452
+ return /* @__PURE__ */ r.createElement(xa, null, /* @__PURE__ */ r.createElement(w, { variant: "caption2", color: p.themedColor.textMidEmphasis }, o.CSAT_RATING_TITLE), /* @__PURE__ */ r.createElement(Ca, null, s.map((a) => /* @__PURE__ */ r.createElement(Vn, { disabled: e, key: a.value, label: a.getTooltip(o) }, /* @__PURE__ */ r.createElement(
2453
+ va,
2453
2454
  {
2454
2455
  disabled: e,
2455
2456
  onClick: () => n(a.value),
@@ -2457,16 +2458,16 @@ const qi = u.div`text-align:center;text-wrap:pretty;a{text-decoration:none;color
2457
2458
  },
2458
2459
  i ? a.isActive(t) ? /* @__PURE__ */ r.createElement(a.Icon.Active, null) : /* @__PURE__ */ r.createElement(a.Icon.Inactive, null) : /* @__PURE__ */ r.createElement(a.Icon.Active, null)
2459
2460
  )))));
2460
- }, Ea = u.div`display:flex;flex-direction:column;gap:8px;`, xa = u.div`display:flex;justify-content:space-between;width:100%;max-width:320px;`, Ca = u.button`background-color:transparent;border:none;border-radius:4px;padding:0;display:flex;align-items:center;justify-content:center;box-sizing:border-box;&:enabled:hover{cursor:pointer;background-color:${p.color.background200};${P.dark`
2461
+ }, xa = u.div`display:flex;flex-direction:column;gap:8px;`, Ca = u.div`display:flex;justify-content:space-between;width:100%;max-width:320px;`, va = u.button`background-color:transparent;border:none;border-radius:4px;padding:0;display:flex;align-items:center;justify-content:center;box-sizing:border-box;&:enabled:hover{cursor:pointer;background-color:${p.color.background200};${P.dark`
2461
2462
  background-color: ${p.color.background500};
2462
2463
  `}
2463
2464
  }
2464
2465
 
2465
- ${({ $inactive: e, theme: t }) => e && t.selectedTheme === "dark" && va};
2466
- `, va = I`[fill]{fill:white;fill-opacity:0.12;}[stroke]{stroke:white;stroke-opacity:0.12;}`, ya = ({ submitted: e, value: t = "", onChange: n }) => {
2466
+ ${({ $inactive: e, theme: t }) => e && t.selectedTheme === "dark" && ya};
2467
+ `, ya = I`[fill]{fill:white;fill-opacity:0.12;}[stroke]{stroke:white;stroke-opacity:0.12;}`, _a = ({ submitted: e, value: t = "", onChange: n }) => {
2467
2468
  const { stringSet: o } = O();
2468
2469
  return e && !t ? null : /* @__PURE__ */ r.createElement(
2469
- _a,
2470
+ Sa,
2470
2471
  {
2471
2472
  disabled: e,
2472
2473
  maxLength: 255,
@@ -2475,7 +2476,7 @@ const qi = u.div`text-align:center;text-wrap:pretty;a{text-decoration:none;color
2475
2476
  placeholder: o.CSAT_REASON_PLACEHOLDER
2476
2477
  }
2477
2478
  );
2478
- }, _a = u.input`box-sizing:border-box;width:100%;border-radius:4px;padding:10px 16px;font-size:14px;font-weight:400;font-style:normal;border:unset;&:focus{outline:none;}color:${p.themedColor.textHighEmphasis};&::placeholder{color:${p.themedColor.textLowEmphasis};}background-color:${p.color.background50};${P.dark`
2479
+ }, Sa = u.input`box-sizing:border-box;width:100%;border-radius:4px;padding:10px 16px;font-size:14px;font-weight:400;font-style:normal;border:unset;&:focus{outline:none;}color:${p.themedColor.textHighEmphasis};&::placeholder{color:${p.themedColor.textLowEmphasis};}background-color:${p.color.background50};${P.dark`
2479
2480
  background-color: ${p.themedColor.textDisabled};
2480
2481
  `}
2481
2482
 
@@ -2488,47 +2489,47 @@ const qi = u.div`text-align:center;text-wrap:pretty;a{text-decoration:none;color
2488
2489
  background-color: ${p.themedColor.textDisabled};
2489
2490
  `}
2490
2491
  }
2491
- `, Sa = ({ submitted: e }) => {
2492
+ `, Ta = ({ submitted: e }) => {
2492
2493
  const { stringSet: t } = O();
2493
2494
  return e ? /* @__PURE__ */ r.createElement(w, { variant: "h2", color: p.themedColor.textHighEmphasis }, t.CSAT_TITLE_SUBMITTED) : /* @__PURE__ */ r.createElement(w, { variant: "h2", color: p.themedColor.textHighEmphasis }, t.CSAT_TITLE_UNSUBMITTED);
2494
2495
  };
2495
2496
  var X = /* @__PURE__ */ ((e) => (e.AI_AGENT_CSAT_5 = "AI_AGENT_CSAT_5", e.AI_AGENT_CSAT_5_WITH_CRE = "AI_AGENT_CSAT_5_WITH_CRE", e.HELPDESK_CSAT_5 = "HELPDESK_CSAT_5", e))(X || {});
2496
- const Ta = (e) => Cr((t, n) => ({ ...t, ...n }), e), lt = ({
2497
+ const wa = (e) => Cr((t, n) => ({ ...t, ...n }), e), lt = ({
2497
2498
  type: e,
2498
2499
  renderSubmitButton: t,
2499
2500
  initialCsat: n,
2500
2501
  initialCsatReason: o,
2501
2502
  initialIsResolved: s
2502
2503
  }) => {
2503
- const [i, a] = Ta({
2504
+ const [i, a] = wa({
2504
2505
  csatType: e,
2505
2506
  csat: n,
2506
2507
  csatReason: o,
2507
2508
  isResolved: s
2508
2509
  }), l = typeof n == "number" ? "submitted" : (e === X.AI_AGENT_CSAT_5 || e === X.HELPDESK_CSAT_5) && typeof i.csat == "number" || e === X.AI_AGENT_CSAT_5_WITH_CRE && typeof i.csat == "number" && typeof i.isResolved == "boolean" ? "submittable" : "unsubmittable", c = { state: l, submitted: l === "submitted" };
2509
- return /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement(wa, null, /* @__PURE__ */ r.createElement(Sa, { ...c }), e === X.AI_AGENT_CSAT_5_WITH_CRE && /* @__PURE__ */ r.createElement(
2510
- Xi,
2510
+ return /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement(Aa, null, /* @__PURE__ */ r.createElement(Ta, { ...c }), e === X.AI_AGENT_CSAT_5_WITH_CRE && /* @__PURE__ */ r.createElement(
2511
+ Qi,
2511
2512
  {
2512
2513
  ...c,
2513
2514
  defaultValue: s,
2514
2515
  value: i.isResolved,
2515
2516
  onChange: (d) => a({ isResolved: d })
2516
2517
  }
2517
- ), /* @__PURE__ */ r.createElement(ba, { ...c, value: i.csat, onChange: (d) => a({ csat: d }) }), i.csat && /* @__PURE__ */ r.createElement(
2518
- ya,
2518
+ ), /* @__PURE__ */ r.createElement(Ea, { ...c, value: i.csat, onChange: (d) => a({ csat: d }) }), i.csat && /* @__PURE__ */ r.createElement(
2519
+ _a,
2519
2520
  {
2520
2521
  ...c,
2521
2522
  value: i.csatReason,
2522
2523
  onChange: (d) => a({ csatReason: d })
2523
2524
  }
2524
2525
  )), l !== "submitted" && t({ state: l, params: i }));
2525
- }, wa = u.div`display:flex;flex-direction:column;gap:12px;`, Aa = () => {
2526
+ }, Aa = u.div`display:flex;flex-direction:column;gap:12px;`, ka = () => {
2526
2527
  const { stringSet: e } = O();
2527
2528
  return /* @__PURE__ */ r.createElement(w, { variant: "body2", color: p.themedColor.textMidEmphasis, style: { textAlign: "center" } }, e.CSAT_SUBMISSION_EXPIRED);
2528
- }, ka = (e) => {
2529
+ }, Ia = (e) => {
2529
2530
  if (e.messageType !== "admin.csat")
2530
2531
  throw new Error("Invalid message type");
2531
- const t = Nr(), { stringSet: n } = O(), { extendedMessagePayload: o, csat: s, csatReason: i, csatExpireAt: a, isResolvedWhenDeterminedByUser: l, onSubmitCSAT: c } = e, { visibility: d, type: h } = (o == null ? void 0 : o.csat) ?? {};
2532
+ const t = Pr(), { stringSet: n } = O(), { extendedMessagePayload: o, csat: s, csatReason: i, csatExpireAt: a, isResolvedWhenDeterminedByUser: l, onSubmitCSAT: c } = e, { visibility: d, type: h } = (o == null ? void 0 : o.csat) ?? {};
2532
2533
  if (!d || !h || !X[h]) return null;
2533
2534
  const m = h === X.AI_AGENT_CSAT_5 || h === X.AI_AGENT_CSAT_5_WITH_CRE || h === X.HELPDESK_CSAT_5 ? lt : () => null, f = (x) => {
2534
2535
  x.csat && !rn(a) ? c({
@@ -2538,32 +2539,32 @@ const Ta = (e) => Cr((t, n) => ({ ...t, ...n }), e), lt = ({
2538
2539
  isResolved: x.isResolved
2539
2540
  }) : t();
2540
2541
  };
2541
- return /* @__PURE__ */ r.createElement(Ia, null, !s && rn(a) ? /* @__PURE__ */ r.createElement(Aa, null) : /* @__PURE__ */ r.createElement(
2542
+ return /* @__PURE__ */ r.createElement($a, null, !s && rn(a) ? /* @__PURE__ */ r.createElement(ka, null) : /* @__PURE__ */ r.createElement(
2542
2543
  m,
2543
2544
  {
2544
2545
  type: h,
2545
2546
  initialCsat: s,
2546
2547
  initialCsatReason: i,
2547
2548
  initialIsResolved: l,
2548
- renderSubmitButton: ({ state: x, params: E }) => /* @__PURE__ */ r.createElement($a, { disabled: x !== "submittable", onClick: () => f(E) }, /* @__PURE__ */ r.createElement(w, { variant: "button" }, n.CSAT_SUBMIT_LABEL))
2549
+ renderSubmitButton: ({ state: x, params: E }) => /* @__PURE__ */ r.createElement(Ma, { disabled: x !== "submittable", onClick: () => f(E) }, /* @__PURE__ */ r.createElement(w, { variant: "button" }, n.CSAT_SUBMIT_LABEL))
2549
2550
  }
2550
2551
  ));
2551
- }, Ia = u.div`display:flex;flex-direction:column;background-color:${({ theme: e }) => e.colors.csat.background};border-radius:16px;gap:16px;padding:24px;`, $a = u.button`all:unset;background-color:${({ theme: e }) => e.colors.base.primary};color:${({ theme: e }) => e.colors.base.primaryContrastContent};border-radius:6px;padding:10px 20px;display:flex;align-items:center;justify-content:center;cursor:pointer;&:hover{background-color:${p.color.primary.dark};}&:disabled{color:${p.color.ondark.textLowEmphasis};background-color:${p.themedColor.textDisabled};cursor:not-allowed;}`;
2552
+ }, $a = u.div`display:flex;flex-direction:column;background-color:${({ theme: e }) => e.colors.csat.background};border-radius:16px;gap:16px;padding:24px;`, Ma = u.button`all:unset;background-color:${({ theme: e }) => e.colors.base.primary};color:${({ theme: e }) => e.colors.base.primaryContrastContent};border-radius:6px;padding:10px 20px;display:flex;align-items:center;justify-content:center;cursor:pointer;&:hover{background-color:${p.color.primary.dark};}&:disabled{color:${p.color.ondark.textLowEmphasis};background-color:${p.themedColor.textDisabled};cursor:not-allowed;}`;
2552
2553
  function rn(e) {
2553
2554
  return !!e && e < Date.now();
2554
2555
  }
2555
2556
  const Lt = _e({
2556
- template: Ma,
2557
+ template: Oa,
2557
2558
  components: {
2558
- AdminMessage: Yi,
2559
- CSATMessage: ka
2559
+ AdminMessage: qi,
2560
+ CSATMessage: Ia
2560
2561
  }
2561
2562
  });
2562
- function Ma(e) {
2563
+ function Oa(e) {
2563
2564
  const { components: t } = Lt.useContext(), n = Mt(() => e.messageType === "admin" ? /* @__PURE__ */ r.createElement(t.AdminMessage, { ...e }) : e.messageType === "admin.csat" ? /* @__PURE__ */ r.createElement(t.CSATMessage, { ...e }) : null);
2564
- return /* @__PURE__ */ r.createElement(Oa, { $marginBottom: Tt(e.groupType) }, n);
2565
+ return /* @__PURE__ */ r.createElement(La, { $marginBottom: Tt(e.groupType) }, n);
2565
2566
  }
2566
- const Oa = u.div`padding-inline:${te}px;margin-bottom:${({ $marginBottom: e }) => e}px;`, on = {
2567
+ const La = u.div`padding-inline:${te}px;margin-bottom:${({ $marginBottom: e }) => e}px;`, on = {
2567
2568
  file: "attach",
2568
2569
  snippet: "snippet",
2569
2570
  site: "website",
@@ -2573,7 +2574,7 @@ const Oa = u.div`padding-inline:${te}px;margin-bottom:${({ $marginBottom: e }) =
2573
2574
  sb_zendesk: "zendesk",
2574
2575
  sb_desk: "snippet"
2575
2576
  // TODO: request icon
2576
- }, La = ({
2577
+ }, Ra = ({
2577
2578
  actionbook: e,
2578
2579
  functionCalls: t,
2579
2580
  groundedness: n,
@@ -2613,7 +2614,7 @@ const Oa = u.div`padding-inline:${te}px;margin-bottom:${({ $marginBottom: e }) =
2613
2614
  onClick: () => i == null ? void 0 : i(b)
2614
2615
  },
2615
2616
  b.name
2616
- ), a && /* @__PURE__ */ r.createElement(Da, { role: "button", onClick: () => a == null ? void 0 : a(b) }, /* @__PURE__ */ r.createElement(w, { variant: "body2", color: E }, "View details"), /* @__PURE__ */ r.createElement(M, { type: "chevron-right", size: 16, color: E }))))), n == null ? void 0 : n.map((b) => /* @__PURE__ */ r.createElement(ct, { key: b.id }, /* @__PURE__ */ r.createElement(ze, null, h({
2617
+ ), a && /* @__PURE__ */ r.createElement(Na, { role: "button", onClick: () => a == null ? void 0 : a(b) }, /* @__PURE__ */ r.createElement(w, { variant: "body2", color: E }, "View details"), /* @__PURE__ */ r.createElement(M, { type: "chevron-right", size: 16, color: E }))))), n == null ? void 0 : n.map((b) => /* @__PURE__ */ r.createElement(ct, { key: b.id }, /* @__PURE__ */ r.createElement(ze, null, h({
2617
2618
  default: /* @__PURE__ */ r.createElement(M, { size: 16, type: on[b.source_type] ?? on.snippet, color: f }),
2618
2619
  sourceType: b.source_type
2619
2620
  })), /* @__PURE__ */ r.createElement(
@@ -2637,21 +2638,21 @@ const Oa = u.div`padding-inline:${te}px;margin-bottom:${({ $marginBottom: e }) =
2637
2638
  },
2638
2639
  b.name
2639
2640
  ))), d);
2640
- }, Ra = u(w)`font-weight:400;`, He = u(Ra)`${({ $clickable: e, $highlightColor: t }) => e && I`
2641
+ }, Da = u(w)`font-weight:400;`, He = u(Da)`${({ $clickable: e, $highlightColor: t }) => e && I`
2641
2642
  cursor: pointer;
2642
2643
  text-decoration: underline;
2643
2644
  &:hover {
2644
2645
  color: ${t};
2645
2646
  }
2646
2647
  `}
2647
- `, ze = u.div`display:flex;align-items:center;justify-content:center;flex-shrink:0;`, qe = u.div`display:flex;gap:8px;align-items:center;`, Da = u(qe)`cursor:pointer;gap:4px;`, ct = u(qe)`flex-direction:row;align-items:center;`, sn = u.div`display:flex;gap:4px;flex-direction:column;align-items:flex-start;`, Wn = ve(null);
2648
- function Na({ testerType: e, children: t }) {
2648
+ `, ze = u.div`display:flex;align-items:center;justify-content:center;flex-shrink:0;`, qe = u.div`display:flex;gap:8px;align-items:center;`, Na = u(qe)`cursor:pointer;gap:4px;`, ct = u(qe)`flex-direction:row;align-items:center;`, sn = u.div`display:flex;gap:4px;flex-direction:column;align-items:flex-start;`, Wn = ve(null);
2649
+ function Pa({ testerType: e, children: t }) {
2649
2650
  return /* @__PURE__ */ r.createElement(
2650
2651
  Wn.Provider,
2651
2652
  {
2652
2653
  value: { testerType: e, isActionbookTester: e === "actionbook" }
2653
2654
  },
2654
- e && /* @__PURE__ */ r.createElement(Pa, null),
2655
+ e && /* @__PURE__ */ r.createElement(Ba, null),
2655
2656
  t
2656
2657
  );
2657
2658
  }
@@ -2659,13 +2660,13 @@ const Re = () => {
2659
2660
  const e = Q(Wn);
2660
2661
  if (!e) throw new Error("_UNSAFE_INTERNAL_DashboardTesterProvider not found");
2661
2662
  return e;
2662
- }, Pa = () => {
2663
+ }, Ba = () => {
2663
2664
  const { isActionbookTester: e } = Re();
2664
- return /* @__PURE__ */ r.createElement(xe.Template, { template: e ? Ba : void 0 }, /* @__PURE__ */ r.createElement(xe.MessageLogs, { component: Fa }));
2665
- }, Ba = (e) => /* @__PURE__ */ r.createElement(Un, { ...e, testerMode: !0, maxBodyWidth: Ln }), Fa = ({ extendedMessagePayload: e = {} }) => {
2665
+ return /* @__PURE__ */ r.createElement(xe.Template, { template: e ? Fa : void 0 }, /* @__PURE__ */ r.createElement(xe.MessageLogs, { component: Ua }));
2666
+ }, Fa = (e) => /* @__PURE__ */ r.createElement(Un, { ...e, testerMode: !0, maxBodyWidth: Ln }), Ua = ({ extendedMessagePayload: e = {} }) => {
2666
2667
  const { handlers: t } = B(), { manual: n, groundedness: o, function_calls: s, agent_message_templates: i, is_thinking: a } = e;
2667
- return a || !n && !(o != null && o.length) && !(s != null && s.length) && !(i != null && i.length) ? /* @__PURE__ */ r.createElement(r.Fragment, null) : /* @__PURE__ */ r.createElement(Ua, null, /* @__PURE__ */ r.createElement(Ha, { width: 4 }), /* @__PURE__ */ r.createElement(
2668
- La,
2668
+ return a || !n && !(o != null && o.length) && !(s != null && s.length) && !(i != null && i.length) ? /* @__PURE__ */ r.createElement(r.Fragment, null) : /* @__PURE__ */ r.createElement(Ha, null, /* @__PURE__ */ r.createElement(za, { width: 4 }), /* @__PURE__ */ r.createElement(
2669
+ Ra,
2669
2670
  {
2670
2671
  actionbook: n,
2671
2672
  functionCalls: s,
@@ -2677,14 +2678,14 @@ const Re = () => {
2677
2678
  textColor: p.themedColor.textHighEmphasis,
2678
2679
  barColor: p.themedColor.textDisabled
2679
2680
  },
2680
- bottomContent: /* @__PURE__ */ r.createElement(za, { variant: "caption2", color: p.themedColor.textLowEmphasis }, "Only visible in the tester")
2681
+ bottomContent: /* @__PURE__ */ r.createElement(Va, { variant: "caption2", color: p.themedColor.textLowEmphasis }, "Only visible in the tester")
2681
2682
  }
2682
2683
  ));
2683
- }, Ua = u.div`display:flex;gap:16px;margin:16px ${te}px 0;align-self:stretch;`, Ha = u.div`width:${({ width: e }) => e}px;background-color:${p.themedColor.textDisabled};border-radius:100px;flex-shrink:0;`, za = u(w)`margin-top:5px;`;
2684
- function Va(e) {
2684
+ }, Ha = u.div`display:flex;gap:16px;margin:16px ${te}px 0;align-self:stretch;`, za = u.div`width:${({ width: e }) => e}px;background-color:${p.themedColor.textDisabled};border-radius:100px;flex-shrink:0;`, Va = u(w)`margin-top:5px;`;
2685
+ function Wa(e) {
2685
2686
  return "sendingStatus" in e ? e.sendingStatus === "succeeded" ? String(e.messageId) : e.reqId : String(e.messageId);
2686
2687
  }
2687
- const Wa = (e, t, n, o = !0) => {
2688
+ const Ga = (e, t, n, o = !0) => {
2688
2689
  if (!o || !e.isUserMessage() && !e.isFileMessage())
2689
2690
  return "single";
2690
2691
  const s = () => {
@@ -2698,18 +2699,18 @@ const Wa = (e, t, n, o = !0) => {
2698
2699
  }, a = s(), l = i();
2699
2700
  return a && l ? "middle" : a ? "bottom" : l ? "top" : "single";
2700
2701
  };
2701
- function Ga(e, t) {
2702
+ function ja(e, t) {
2702
2703
  return e.filter((n) => Se.isWelcomeMessage(n, t));
2703
2704
  }
2704
2705
  function Gn(e, t) {
2705
- return ja(e) === t;
2706
+ return Ka(e) === t;
2706
2707
  }
2707
- function ja(e) {
2708
+ function Ka(e) {
2708
2709
  var t;
2709
2710
  if (e)
2710
2711
  return e.isUserMessage() || e.isFileMessage() || e.isMultipleFilesMessage() ? e.sender.userId : ((t = e == null ? void 0 : e.sender) == null ? void 0 : t.userId) ?? void 0;
2711
2712
  }
2712
- function Ka(e) {
2713
+ function Za(e) {
2713
2714
  return e.isAdminMessage() ? e.message === "The channel's custom_type was updated." : !1;
2714
2715
  }
2715
2716
  const bt = (e) => !!e && "sender" in e, jn = (e) => e.startsWith("image/"), Kn = (e) => e.startsWith("video/"), an = (e) => jn(e) || Kn(e), Ve = {
@@ -2720,7 +2721,7 @@ const bt = (e) => !!e && "sender" in e, jn = (e) => e.startsWith("image/"), Kn =
2720
2721
  },
2721
2722
  isIncoming: (e, t) => bt(e) && e.sender.userId !== t,
2722
2723
  isOutgoing: (e, t) => bt(e) && (e.sender.userId === t || e.sendingStatus === dt.PENDING)
2723
- }, Za = (e) => {
2724
+ }, Ya = (e) => {
2724
2725
  const { chatSDK: t, handlers: n } = B(), { aiAgentInfo: o } = U(), s = N(/* @__PURE__ */ new Set()), i = (a, l) => {
2725
2726
  var c;
2726
2727
  a.url === e && bt(l) && l.sender.userId === o.userId && !Se.isStreaming(l) && !s.current.has(l.messageId) && ((c = n == null ? void 0 : n.onCustomEvent) == null || c.call(n, { type: "bot-message-received", data: { message: l } }), s.current.add(l.messageId));
@@ -2729,7 +2730,7 @@ const bt = (e) => !!e && "sender" in e, jn = (e) => e.startsWith("image/"), Kn =
2729
2730
  onMessageUpdated: i,
2730
2731
  onMessageReceived: i
2731
2732
  });
2732
- }, Ya = ({ publishSynchronous: e = !1 }) => {
2733
+ }, qa = ({ publishSynchronous: e = !1 }) => {
2733
2734
  const t = /* @__PURE__ */ new Set();
2734
2735
  return {
2735
2736
  publish: (n) => {
@@ -2740,8 +2741,8 @@ const bt = (e) => !!e && "sender" in e, jn = (e) => e.startsWith("image/"), Kn =
2740
2741
  subscribe: (n) => (t.add(n), () => t.delete(n))
2741
2742
  };
2742
2743
  };
2743
- function qa(e, t = []) {
2744
- const n = N(null), o = N(0), s = N(0), [i] = _(() => Ya({ publishSynchronous: !0 })), [a, l] = _(!0);
2744
+ function Ja(e, t = []) {
2745
+ const n = N(null), o = N(0), s = N(0), [i] = _(() => qa({ publishSynchronous: !0 })), [a, l] = _(!0);
2745
2746
  return le(() => {
2746
2747
  o.current = 0, s.current = 0, l(!0), n.current && (n.current.scrollTop = n.current.scrollHeight);
2747
2748
  }, t), le(() => i.subscribe(({ type: c, data: d }) => {
@@ -2766,7 +2767,7 @@ function qa(e, t = []) {
2766
2767
  function ln(e, t) {
2767
2768
  return typeof t == "boolean" ? t ? "smooth" : "auto" : e;
2768
2769
  }
2769
- function Ja(e) {
2770
+ function Xa(e) {
2770
2771
  return new Promise((t) => {
2771
2772
  const n = new Image();
2772
2773
  n.onload = function() {
@@ -2775,23 +2776,23 @@ function Ja(e) {
2775
2776
  }, n.src = URL.createObjectURL(e);
2776
2777
  });
2777
2778
  }
2778
- async function Xa(e) {
2779
+ async function Qa(e) {
2779
2780
  if ("file" in e && e.file instanceof File && e.file.type.startsWith("image/")) {
2780
- const { width: t, height: n } = await Ja(e.file);
2781
- return new Vr({
2781
+ const { width: t, height: n } = await Xa(e.file);
2782
+ return new Wr({
2782
2783
  key: Zn,
2783
2784
  value: [t, n]
2784
2785
  });
2785
2786
  }
2786
2787
  }
2787
- const Zn = "KEY_IMG_ASPECT_RATIO", Qa = ({ onScrollAfterSendMessage: e }) => {
2788
+ const Zn = "KEY_IMG_ASPECT_RATIO", el = ({ onScrollAfterSendMessage: e }) => {
2788
2789
  const { agentPreviewConfigs: t, handlers: n } = B(), o = N(t == null ? void 0 : t.agentAttributes);
2789
2790
  return o.current = t == null ? void 0 : t.agentAttributes, {
2790
2791
  onBeforeSendMessage: async (s) => {
2791
- const i = await Xa(s), a = {
2792
+ const i = await Qa(s), a = {
2792
2793
  ...s,
2793
2794
  metaArrays: i ? [i] : void 0
2794
- }, l = el(o.current);
2795
+ }, l = tl(o.current);
2795
2796
  return l ? { ...a, data: JSON.stringify(l) } : a;
2796
2797
  },
2797
2798
  onAfterSendMessage: (s) => {
@@ -2799,26 +2800,26 @@ const Zn = "KEY_IMG_ASPECT_RATIO", Qa = ({ onScrollAfterSendMessage: e }) => {
2799
2800
  e(), (i = n == null ? void 0 : n.onMessageSend) == null || i.call(n, s.message), s.sendingStatus === dt.SUCCEEDED ? (a = n == null ? void 0 : n.onCustomEvent) == null || a.call(n, { type: "message-sent-succeeded", data: { message: s } }) : s.sendingStatus === dt.PENDING && ((l = n == null ? void 0 : n.onCustomEvent) == null || l.call(n, { type: "message-sent-pending", data: { message: s } }));
2800
2801
  }
2801
2802
  };
2802
- }, el = (e) => {
2803
+ }, tl = (e) => {
2803
2804
  if (!e) return null;
2804
2805
  const t = {};
2805
2806
  return e.ai && Object.keys(e.ai).length > 0 && (t.ai_attrs = e.ai), e.safeguard && Object.keys(e.safeguard).length > 0 && (t.safeguard_attrs = e.safeguard), typeof e.use_prompt_cache == "boolean" && (t.use_prompt_cache = e.use_prompt_cache), Object.keys(t).length > 0 ? t : null;
2806
2807
  }, {
2807
- Provider: tl,
2808
- Context: ou,
2808
+ Provider: nl,
2809
+ Context: su,
2809
2810
  useContext: Z
2810
- } = G("Conversation"), nl = ({
2811
+ } = G("Conversation"), rl = ({
2811
2812
  closedChannelUrl: e,
2812
2813
  onClearClosedChannelUrl: t,
2813
2814
  onNavigateToConversationList: n,
2814
2815
  children: o
2815
2816
  }) => {
2816
- const { aiAgentInfo: s, activeChannel: i, refreshActiveChannel: a } = U(), { testerType: l } = Re(), c = qa("smooth"), { onBeforeSendMessage: d, onAfterSendMessage: h } = Qa({
2817
+ const { aiAgentInfo: s, activeChannel: i, refreshActiveChannel: a } = U(), { testerType: l } = Re(), c = Ja("smooth"), { onBeforeSendMessage: d, onAfterSendMessage: h } = el({
2817
2818
  onScrollAfterSendMessage: () => {
2818
2819
  c.scrollPubSub.publish({ type: "scrollToBottom", data: { animated: !1 } });
2819
2820
  }
2820
2821
  }), m = e || (i == null ? void 0 : i.url);
2821
- Za(m);
2822
+ Ya(m);
2822
2823
  const f = (E) => {
2823
2824
  const b = E[E.length - 1];
2824
2825
  b && Se.shouldScrollToBottom(b, s.userId, !!l) && setTimeout(() => c.scrollPubSub.publish({ type: "scrollToBottom", data: { animated: !0 } }), 100);
@@ -2826,7 +2827,7 @@ const Zn = "KEY_IMG_ASPECT_RATIO", Qa = ({ onScrollAfterSendMessage: e }) => {
2826
2827
  await a(), e && (t == null || t());
2827
2828
  }, [a, e, t]);
2828
2829
  return /* @__PURE__ */ r.createElement(
2829
- io,
2830
+ ao,
2830
2831
  {
2831
2832
  channelUrl: m,
2832
2833
  onBeforeSendMessage: d,
@@ -2837,7 +2838,7 @@ const Zn = "KEY_IMG_ASPECT_RATIO", Qa = ({ onScrollAfterSendMessage: e }) => {
2837
2838
  onConversationClosedViaDispatcher: x
2838
2839
  },
2839
2840
  (E) => /* @__PURE__ */ r.createElement(
2840
- tl,
2841
+ nl,
2841
2842
  {
2842
2843
  value: { ...E, scrollSource: c, goToActiveConversation: x, onNavigateToConversationList: n }
2843
2844
  },
@@ -2865,7 +2866,7 @@ const Zn = "KEY_IMG_ASPECT_RATIO", Qa = ({ onScrollAfterSendMessage: e }) => {
2865
2866
  },
2866
2867
  e
2867
2868
  );
2868
- }, rl = ({ onDropFiles: e }) => {
2869
+ }, ol = ({ onDropFiles: e }) => {
2869
2870
  const { subscribe: t } = Q(Rt);
2870
2871
  L(() => t(e), [e]);
2871
2872
  };
@@ -2873,30 +2874,30 @@ Et.Consumer = ({ children: e }) => {
2873
2874
  const { onDrop: t } = Q(Rt);
2874
2875
  return e({ onDrop: t, onDragOver: (s) => s.preventDefault() });
2875
2876
  };
2876
- const su = ({ iconSize: e = 64, icon: t, className: n, label: o, children: s }) => /* @__PURE__ */ r.createElement(sl, { className: n }, /* @__PURE__ */ r.createElement(M, { type: t, size: e, color: p.themedColor.textLowEmphasis }), /* @__PURE__ */ r.createElement(w, { variant: "body1", color: p.themedColor.textMidEmphasis }, o), s), ol = u.div`position:relative;display:flex;justify-content:center;align-items:center;width:100%;height:100%;`, sl = u.div`display:flex;flex-direction:column;min-height:104px;align-items:center;gap:20px;text-align:center;`, il = {
2877
- loading: T(() => import("./CKTGU2qP.js")),
2878
- error: T(() => import("./CV59hwzK.js")),
2879
- noChannels: T(() => import("./DOAkPSN5.js")),
2880
- noMessages: T(() => import("./BuMtQ0m7.js"))
2877
+ const iu = ({ iconSize: e = 64, icon: t, className: n, label: o, children: s }) => /* @__PURE__ */ r.createElement(il, { className: n }, /* @__PURE__ */ r.createElement(M, { type: t, size: e, color: p.themedColor.textLowEmphasis }), /* @__PURE__ */ r.createElement(w, { variant: "body1", color: p.themedColor.textMidEmphasis }, o), s), sl = u.div`position:relative;display:flex;justify-content:center;align-items:center;width:100%;height:100%;`, il = u.div`display:flex;flex-direction:column;min-height:104px;align-items:center;gap:20px;text-align:center;`, al = {
2878
+ loading: T(() => import("./DhUBPQ6o.js")),
2879
+ error: T(() => import("./CVCUjr3Q.js")),
2880
+ noChannels: T(() => import("./kE3eGJ-O.js")),
2881
+ noMessages: T(() => import("./jtdZ66dz.js"))
2881
2882
  }, Ce = ({ className: e, type: t = "loading", ...n }) => {
2882
- const o = il[t];
2883
- return /* @__PURE__ */ r.createElement(ol, { className: e }, /* @__PURE__ */ r.createElement(ke, { fallback: null }, /* @__PURE__ */ r.createElement(o, { ...n })));
2883
+ const o = al[t];
2884
+ return /* @__PURE__ */ r.createElement(sl, { className: e }, /* @__PURE__ */ r.createElement(ke, { fallback: null }, /* @__PURE__ */ r.createElement(o, { ...n })));
2884
2885
  }, Yn = ({ rootElementId: e, visible: t, onClose: n, children: o }) => {
2885
2886
  if (!t) return null;
2886
2887
  const { rootElement: s } = B(), i = pe(s), a = pe(s, !0);
2887
- return Gr(
2888
- /* @__PURE__ */ r.createElement(al, { onClick: n }, /* @__PURE__ */ r.createElement(ll, { onClick: (l) => l.stopPropagation() }, o)),
2888
+ return jr(
2889
+ /* @__PURE__ */ r.createElement(ll, { onClick: n }, /* @__PURE__ */ r.createElement(cl, { onClick: (l) => l.stopPropagation() }, o)),
2889
2890
  i.getElementById(e) ?? i.getElementById(ee.MODAL_ROOT) ?? a.body
2890
2891
  );
2891
- }, al = u.div`position:fixed;top:0;left:0;width:100%;height:100%;background:${p.color.overlay.dark};display:flex;justify-content:center;align-items:center;z-index:${fe.MODAL};`, ll = u.div`border-radius:4px;overflow:hidden;box-shadow:0 16px 24px 2px rgba(13,13,13,0.12),0 6px 30px 5px rgba(13,13,13,0.08),0 6px 10px -5px rgba(13,13,13,0.04);z-index:${fe.MODAL};`, cl = u.div`flex-shrink:0;width:${({ $size: e }) => j(e)};height:${({ $size: e }) => j(e)};background-color:${({ theme: e }) => e.colors.base.primary};box-sizing:border-box;padding:6px;border-radius:50%;display:flex;justify-content:center;align-items:center;}`, dl = u(kt)`path{fill:${({ theme: e }) => e.colors.base.primaryContrastContent};}`;
2892
+ }, ll = u.div`position:fixed;top:0;left:0;width:100%;height:100%;background:${p.color.overlay.dark};display:flex;justify-content:center;align-items:center;z-index:${fe.MODAL};`, cl = u.div`border-radius:4px;overflow:hidden;box-shadow:0 16px 24px 2px rgba(13,13,13,0.12),0 6px 30px 5px rgba(13,13,13,0.08),0 6px 10px -5px rgba(13,13,13,0.04);z-index:${fe.MODAL};`, dl = u.div`flex-shrink:0;width:${({ $size: e }) => j(e)};height:${({ $size: e }) => j(e)};background-color:${({ theme: e }) => e.colors.base.primary};box-sizing:border-box;padding:6px;border-radius:50%;display:flex;justify-content:center;align-items:center;}`, ul = u(kt)`path{fill:${({ theme: e }) => e.colors.base.primaryContrastContent};}`;
2892
2893
  function qn({ size: e }) {
2893
2894
  const { aiAgentInfo: t } = U();
2894
- return t.profileUrl ? /* @__PURE__ */ r.createElement(It, { size: e, src: t.profileUrl }) : /* @__PURE__ */ r.createElement(cl, { $size: e }, /* @__PURE__ */ r.createElement(dl, null));
2895
+ return t.profileUrl ? /* @__PURE__ */ r.createElement(It, { size: e, src: t.profileUrl }) : /* @__PURE__ */ r.createElement(dl, { $size: e }, /* @__PURE__ */ r.createElement(ul, null));
2895
2896
  }
2896
- const ul = u.div`width:100%;height:100%;position:fixed;top:0;left:0;outline:none;`, ml = u.div`height:64px;min-height:64px;box-sizing:border-box;display:flex;justify-content:space-between;border-bottom:1px solid ${p.themedColor.textDisabled};background-color:${p.themedColor.bg_50_600};@media screen and (max-width:768px){position:relative;}`, gl = u.div`box-sizing:border-box;display:flex;flex-direction:row;align-items:center;height:64px;padding:16px 20px;width:calc(100% - 128px);`, hl = u.div`margin-inline-end:8px;`, pl = u.div`max-width:500px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:inline-block;@media screen and (max-width:768px){position:absolute;inset-inline-start:64px;top:10px;display:block;max-width:calc(100vw - 240px);}`, fl = u.div`display:inline-block;margin-inline-start:8px;padding-top:5px;@media screen and (max-width:768px){position:absolute;inset-inline-start:56px;top:24px;}`, bl = u.div`display:flex;width:160px;justify-content:flex-end;`, El = u.div`inset-inline-end:0;display:flex;flex-direction:row;`, Jn = u.div`width:64px;padding:21px;box-sizing:border-box;cursor:${(e) => e.disabled ? "not-allowed" : "pointer"};`, xl = u(Jn)`border-inline-start:1px solid ${p.themedColor.textDisabled};`, Cl = u.div`width:100%;height:100%;display:flex;align-items:center;justify-content:center;`, vl = u.video`max-width:100%;max-height:100%;user-select:none;-webkit-user-drag:none;`, yl = u.img`max-width:calc(90% - 60px);max-height:calc(90% - 60px);user-select:none;-webkit-user-drag:none;`, _l = u.div`max-width:100%;max-height:100%;display:flex;justify-content:center;align-items:center;`, Sl = ({ file: e, sender: t = {}, onClose: n, onDownloadClick: o }) => {
2897
+ const ml = u.div`width:100%;height:100%;position:fixed;top:0;left:0;outline:none;`, gl = u.div`height:64px;min-height:64px;box-sizing:border-box;display:flex;justify-content:space-between;border-bottom:1px solid ${p.themedColor.textDisabled};background-color:${p.themedColor.bg_50_600};@media screen and (max-width:768px){position:relative;}`, hl = u.div`box-sizing:border-box;display:flex;flex-direction:row;align-items:center;height:64px;padding:16px 20px;width:calc(100% - 128px);`, pl = u.div`margin-inline-end:8px;`, fl = u.div`max-width:500px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:inline-block;@media screen and (max-width:768px){position:absolute;inset-inline-start:64px;top:10px;display:block;max-width:calc(100vw - 240px);}`, bl = u.div`display:inline-block;margin-inline-start:8px;padding-top:5px;@media screen and (max-width:768px){position:absolute;inset-inline-start:56px;top:24px;}`, El = u.div`display:flex;width:160px;justify-content:flex-end;`, xl = u.div`inset-inline-end:0;display:flex;flex-direction:row;`, Jn = u.div`width:64px;padding:21px;box-sizing:border-box;cursor:${(e) => e.disabled ? "not-allowed" : "pointer"};`, Cl = u(Jn)`border-inline-start:1px solid ${p.themedColor.textDisabled};`, vl = u.div`width:100%;height:100%;display:flex;align-items:center;justify-content:center;`, yl = u.video`max-width:100%;max-height:100%;user-select:none;-webkit-user-drag:none;`, _l = u.img`max-width:calc(90% - 60px);max-height:calc(90% - 60px);user-select:none;-webkit-user-drag:none;`, Sl = u.div`max-width:100%;max-height:100%;display:flex;justify-content:center;align-items:center;`, Tl = ({ file: e, sender: t = {}, onClose: n, onDownloadClick: o }) => {
2897
2898
  const { type: s, url: i, name: a = "" } = e, { profileUrl: l, nickname: c, userId: d } = t, { aiAgentInfo: h } = U();
2898
2899
  return /* @__PURE__ */ r.createElement(
2899
- wl,
2900
+ Al,
2900
2901
  {
2901
2902
  profileUrl: l ?? "",
2902
2903
  nickname: c ?? "",
@@ -2908,7 +2909,7 @@ const ul = u.div`width:100%;height:100%;position:fixed;top:0;left:0;outline:none
2908
2909
  onDownloadClick: o
2909
2910
  }
2910
2911
  );
2911
- }, Tl = ({ profileUrl: e, isBotMessage: t }) => !e && t ? /* @__PURE__ */ r.createElement(qn, { size: 32 }) : /* @__PURE__ */ r.createElement(It, { size: 32, src: e }), wl = ({
2912
+ }, wl = ({ profileUrl: e, isBotMessage: t }) => !e && t ? /* @__PURE__ */ r.createElement(qn, { size: 32 }) : /* @__PURE__ */ r.createElement(It, { size: 32, src: e }), Al = ({
2912
2913
  profileUrl: e,
2913
2914
  isBotMessage: t,
2914
2915
  nickname: n,
@@ -2919,14 +2920,14 @@ const ul = u.div`width:100%;height:100%;position:fixed;top:0;left:0;outline:none
2919
2920
  onDownloadClick: l
2920
2921
  }) => {
2921
2922
  const { stringSet: c } = O();
2922
- return /* @__PURE__ */ r.createElement(Yn, { onClose: a, visible: !0, rootElementId: ee.MODAL_ROOT }, /* @__PURE__ */ r.createElement(ul, null, /* @__PURE__ */ r.createElement(ml, null, /* @__PURE__ */ r.createElement(gl, null, /* @__PURE__ */ r.createElement(hl, null, /* @__PURE__ */ r.createElement(Tl, { profileUrl: e, isBotMessage: t })), /* @__PURE__ */ r.createElement(pl, null, /* @__PURE__ */ r.createElement(w, { variant: "h2", color: p.themedColor.textHighEmphasis }, o)), /* @__PURE__ */ r.createElement(fl, null, /* @__PURE__ */ r.createElement(w, { variant: "body1", color: p.color.ondark.textMidEmphasis }, n))), /* @__PURE__ */ r.createElement(bl, null, an(s) && /* @__PURE__ */ r.createElement(El, null, /* @__PURE__ */ r.createElement(Jn, { as: "a", href: i, target: "_blank", rel: St, onClick: l }, /* @__PURE__ */ r.createElement(M, { type: "download", color: p.themedColor.textHighEmphasis, size: 24 }))), /* @__PURE__ */ r.createElement(xl, { onClick: a }, /* @__PURE__ */ r.createElement(M, { type: "close", color: p.themedColor.textHighEmphasis, size: 24 })))), /* @__PURE__ */ r.createElement(Cl, { onClick: (d) => d.currentTarget === d.target && a() }, Kn(s) && /* @__PURE__ */ r.createElement(vl, { controls: !0 }, /* @__PURE__ */ r.createElement("source", { src: i, type: s })), jn(s) && /* @__PURE__ */ r.createElement(yl, { src: i, alt: o }), !an(s) && /* @__PURE__ */ r.createElement(_l, null, /* @__PURE__ */ r.createElement(w, { variant: "h1", color: p.themedColor.textHighEmphasis }, c.FILE_VIEWER__UNSUPPORT)))));
2923
+ return /* @__PURE__ */ r.createElement(Yn, { onClose: a, visible: !0, rootElementId: ee.MODAL_ROOT }, /* @__PURE__ */ r.createElement(ml, null, /* @__PURE__ */ r.createElement(gl, null, /* @__PURE__ */ r.createElement(hl, null, /* @__PURE__ */ r.createElement(pl, null, /* @__PURE__ */ r.createElement(wl, { profileUrl: e, isBotMessage: t })), /* @__PURE__ */ r.createElement(fl, null, /* @__PURE__ */ r.createElement(w, { variant: "h2", color: p.themedColor.textHighEmphasis }, o)), /* @__PURE__ */ r.createElement(bl, null, /* @__PURE__ */ r.createElement(w, { variant: "body1", color: p.color.ondark.textMidEmphasis }, n))), /* @__PURE__ */ r.createElement(El, null, an(s) && /* @__PURE__ */ r.createElement(xl, null, /* @__PURE__ */ r.createElement(Jn, { as: "a", href: i, target: "_blank", rel: St, onClick: l }, /* @__PURE__ */ r.createElement(M, { type: "download", color: p.themedColor.textHighEmphasis, size: 24 }))), /* @__PURE__ */ r.createElement(Cl, { onClick: a }, /* @__PURE__ */ r.createElement(M, { type: "close", color: p.themedColor.textHighEmphasis, size: 24 })))), /* @__PURE__ */ r.createElement(vl, { onClick: (d) => d.currentTarget === d.target && a() }, Kn(s) && /* @__PURE__ */ r.createElement(yl, { controls: !0 }, /* @__PURE__ */ r.createElement("source", { src: i, type: s })), jn(s) && /* @__PURE__ */ r.createElement(_l, { src: i, alt: o }), !an(s) && /* @__PURE__ */ r.createElement(Sl, null, /* @__PURE__ */ r.createElement(w, { variant: "h1", color: p.themedColor.textHighEmphasis }, c.FILE_VIEWER__UNSUPPORT)))));
2923
2924
  }, Xn = ({
2924
2925
  className: e,
2925
2926
  locale: t,
2926
2927
  date: n = Date.now(),
2927
2928
  formatString: o = "MMMM dd, yyyy",
2928
2929
  style: s
2929
- }) => /* @__PURE__ */ r.createElement(Al, { id: `${J}-date-separator`, style: s, className: e }, /* @__PURE__ */ r.createElement(w, { variant: "caption4", color: p.themedColor.textMidEmphasis }, Cn(n, o, { locale: t }))), Al = u.div`display:flex;justify-content:center;align-items:center;`, kl = ye(function(t, n) {
2930
+ }) => /* @__PURE__ */ r.createElement(kl, { id: `${J}-date-separator`, style: s, className: e }, /* @__PURE__ */ r.createElement(w, { variant: "caption4", color: p.themedColor.textMidEmphasis }, Cn(n, o, { locale: t }))), kl = u.div`display:flex;justify-content:center;align-items:center;`, Il = ye(function(t, n) {
2930
2931
  const {
2931
2932
  messages: o,
2932
2933
  renderMessage: s,
@@ -2950,16 +2951,16 @@ const ul = u.div`width:100%;height:100%;position:fixed;top:0;left:0;outline:none
2950
2951
  const re = async () => {
2951
2952
  if (!g.current) return;
2952
2953
  const y = g.current;
2953
- if (m(Il(y)), $.current = y.scrollHeight - y.scrollTop, V.current = $.current - y.clientHeight, S.current = y.scrollTop, C.current) return;
2954
+ if (m($l(y)), $.current = y.scrollHeight - y.scrollTop, V.current = $.current - y.clientHeight, S.current = y.scrollTop, C.current) return;
2954
2955
  const H = y.clientHeight * Math.min(Math.max(0, h), 1);
2955
2956
  y.scrollTop <= H ? (C.current = !0, v.current = "top", await c(), C.current = !1) : y.scrollHeight - y.scrollTop - y.clientHeight <= H ? (C.current = !0, v.current = "bottom", await d(), C.current = !1) : v.current = void 0;
2956
2957
  };
2957
- return /* @__PURE__ */ r.createElement($l, { id: "infinite-list-container" }, /* @__PURE__ */ r.createElement(Ml, { id: "infinite-list-inner", ref: g, onScroll: re }, b === "bottom" && /* @__PURE__ */ r.createElement("div", { style: { flexGrow: 1 } }), i, o.map((y, H) => s({ message: y, index: H })), a), /* @__PURE__ */ r.createElement(Ol, { id: "infinite-list-overlay-container" }, /* @__PURE__ */ r.createElement(Ll, { id: "infinite-list-overlay" }, l)));
2958
+ return /* @__PURE__ */ r.createElement(Ml, { id: "infinite-list-container" }, /* @__PURE__ */ r.createElement(Ol, { id: "infinite-list-inner", ref: g, onScroll: re }, b === "bottom" && /* @__PURE__ */ r.createElement("div", { style: { flexGrow: 1 } }), i, o.map((y, H) => s({ message: y, index: H })), a), /* @__PURE__ */ r.createElement(Ll, { id: "infinite-list-overlay-container" }, /* @__PURE__ */ r.createElement(Rl, { id: "infinite-list-overlay" }, l)));
2958
2959
  }), cn = 50;
2959
- function Il(e) {
2960
+ function $l(e) {
2960
2961
  return e.scrollTop <= cn ? "top" : e.scrollHeight - (e.scrollTop + e.clientHeight) <= cn ? "bottom" : "middle";
2961
2962
  }
2962
- const $l = u.div`display:flex;position:relative;flex:1;overflow:hidden;`, Ml = u.div`display:flex;flex:1;flex-direction:column;overflow-y:auto;scrollbar-color:${p.themedColor.textLowEmphasis}transparent;&::-webkit-scrollbar-thumb:hover{background-color:transparent;}`, Ol = u.div`position:absolute;top:0;bottom:0;left:0;right:0;pointer-events:none;`, Ll = u.div`pointer-events:auto;`, Rl = ({ className: e, onClick: t }) => /* @__PURE__ */ r.createElement(Dl, { className: e, onClick: t, tabIndex: 0 }, /* @__PURE__ */ r.createElement(M, { size: 24, type: "chevron-down", color: p.color.primary.main })), Dl = u.button`all:unset;cursor:pointer;display:flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:24px;box-shadow:0 2px 8px 0 rgba(0,0,0,0.08),0 4px 6px 0 rgba(0,0,0,0.12);${P.light`
2963
+ const Ml = u.div`display:flex;position:relative;flex:1;overflow:hidden;`, Ol = u.div`display:flex;flex:1;flex-direction:column;overflow-y:auto;scrollbar-color:${p.themedColor.textLowEmphasis}transparent;&::-webkit-scrollbar-thumb:hover{background-color:transparent;}`, Ll = u.div`position:absolute;top:0;bottom:0;left:0;right:0;pointer-events:none;`, Rl = u.div`pointer-events:auto;`, Dl = ({ className: e, onClick: t }) => /* @__PURE__ */ r.createElement(Nl, { className: e, onClick: t, tabIndex: 0 }, /* @__PURE__ */ r.createElement(M, { size: 24, type: "chevron-down", color: p.color.primary.main })), Nl = u.button`all:unset;cursor:pointer;display:flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:24px;box-shadow:0 2px 8px 0 rgba(0,0,0,0.08),0 4px 6px 0 rgba(0,0,0,0.12);${P.light`
2963
2964
  background-color: ${p.color.background50};
2964
2965
  &:hover {
2965
2966
  background-color: ${p.color.background100};
@@ -2992,17 +2993,17 @@ const $l = u.div`display:flex;position:relative;flex:1;overflow:hidden;`, Ml = u
2992
2993
  }
2993
2994
  }
2994
2995
  }), n;
2995
- }, Nl = () => {
2996
- const { agentPreviewConfigs: e = {}, aiAgentId: t } = B(), { aiAgentInfo: n } = U(), { stringSet: o, dateLocale: s } = O(), { messageSource: i } = Z(), { Template: a } = xe.useContext(), l = e.welcomeMessages ?? [], c = i.messages, d = Ga(c, t), h = c[d.length + 1], m = d[0] ?? h;
2996
+ }, Pl = () => {
2997
+ const { agentPreviewConfigs: e = {}, aiAgentId: t } = B(), { aiAgentInfo: n } = U(), { stringSet: o, dateLocale: s } = O(), { messageSource: i } = Z(), { Template: a } = xe.useContext(), l = e.welcomeMessages ?? [], c = i.messages, d = ja(c, t), h = c[d.length + 1], m = d[0] ?? h;
2997
2998
  return {
2998
2999
  /**
2999
3000
  * Returns a list of messages filtered according to business requirements.
3000
3001
  */
3001
- filteredMessages: c.filter((f) => Ka(f) ? !1 : l.length > 0 ? !Se.isWelcomeMessage(f, t) : !0),
3002
+ filteredMessages: c.filter((f) => Za(f) ? !1 : l.length > 0 ? !Se.isWelcomeMessage(f, t) : !0),
3002
3003
  /**
3003
3004
  * Determines whether to display the DateSeparator in the data list by comparing it with the welcome messages from Bot Studio.
3004
3005
  */
3005
- shouldShowOriginalDate: (f) => f > 0 || l.length === 0 ? !0 : h && !Mr(h.createdAt, (m == null ? void 0 : m.createdAt) ?? 0),
3006
+ shouldShowOriginalDate: (f) => f > 0 || l.length === 0 ? !0 : h && !Or(h.createdAt, (m == null ? void 0 : m.createdAt) ?? 0),
3006
3007
  /**
3007
3008
  * Renders the list of welcome messages from Bot Studio.
3008
3009
  */
@@ -3035,16 +3036,16 @@ const $l = u.div`display:flex;position:relative;flex:1;overflow:hidden;`, Ml = u
3035
3036
  );
3036
3037
  }))
3037
3038
  };
3038
- }, Pl = (e) => u(e).withConfig({ shouldForwardProp: jr });
3039
- function Bl(e) {
3039
+ }, Bl = (e) => u(e).withConfig({ shouldForwardProp: Kr });
3040
+ function Fl(e) {
3040
3041
  var o;
3041
3042
  const t = "remove_powered_by", n = (o = e == null ? void 0 : e.appInfo) == null ? void 0 : o.applicationAttributes;
3042
3043
  return Array.isArray(n) && n.includes(t);
3043
3044
  }
3044
- const Fl = ({ style: e }) => {
3045
+ const Ul = ({ style: e }) => {
3045
3046
  const { stringSet: t } = O(), { chatSDK: n } = B(), { isActionbookTester: o } = Re();
3046
- return Bl(n) || o ? null : /* @__PURE__ */ r.createElement(Ul, { variant: "caption2", style: e }, t.POWERED_BY + " ", /* @__PURE__ */ r.createElement(
3047
- Hl,
3047
+ return Fl(n) || o ? null : /* @__PURE__ */ r.createElement(Hl, { variant: "caption2", style: e }, t.POWERED_BY + " ", /* @__PURE__ */ r.createElement(
3048
+ zl,
3048
3049
  {
3049
3050
  variant: "caption2",
3050
3051
  as: "a",
@@ -3055,17 +3056,17 @@ const Fl = ({ style: e }) => {
3055
3056
  },
3056
3057
  "Sendbird"
3057
3058
  ));
3058
- }, Ul = u(w)`color:${p.themedColor.textLowEmphasis};text-align:center;`, Hl = Pl(w)`
3059
+ }, Hl = u(w)`color:${p.themedColor.textLowEmphasis};text-align:center;`, zl = Bl(w)`
3059
3060
  color: ${p.themedColor.textLowEmphasis};
3060
3061
  cursor: pointer;
3061
3062
  text-decoration: none;
3062
- `, zl = () => {
3063
+ `, Vl = () => {
3063
3064
  var c;
3064
3065
  const { stringSet: e } = O(), { activeChannel: t } = U(), { channelSource: n, goToActiveConversation: o, scrollSource: s } = Z(), i = Pn(n.channel), l = t && ((c = n.channel) == null ? void 0 : c.url) === (t == null ? void 0 : t.url) && i;
3065
3066
  return le(() => {
3066
3067
  l && s.scrollPubSub.publish({ type: "scrollToBottom", data: { animated: !0 } });
3067
- }, [l]), l ? /* @__PURE__ */ r.createElement(Vl, null, /* @__PURE__ */ r.createElement(
3068
- Wl,
3068
+ }, [l]), l ? /* @__PURE__ */ r.createElement(Wl, null, /* @__PURE__ */ r.createElement(
3069
+ Gl,
3069
3070
  {
3070
3071
  variant: "button",
3071
3072
  role: "button",
@@ -3074,8 +3075,8 @@ const Fl = ({ style: e }) => {
3074
3075
  },
3075
3076
  e.START_NEW_CONVERSATION
3076
3077
  )) : null;
3077
- }, Vl = u.div`display:flex;justify-content:center;margin:16px 0;`, Wl = u(w)`border-radius:6px;box-sizing:border-box;padding:10px 20px;border:1px solid ${p.themedColor.textDisabled};cursor:pointer;user-select:none;`, Gl = !0, jl = () => {
3078
- const { Template: e } = Ot.useContext(), { Template: t } = xe.useContext(), { Template: n } = Lt.useContext(), [o, s] = _(null), { userSession: i, aiAgentInfo: a } = U(), { cache: l, agentPreviewConfigs: c, chatSDK: d, state: h } = B(), { stringSet: m, dateLocale: f } = O(), { conversation: x, channelSource: E, messageSource: b, scrollSource: g } = Z(), { isActionbookTester: C } = Re(), { filteredMessages: v, shouldShowOriginalDate: S, renderAgentPreviewWelcomeMessages: k } = Nl(), F = Qn(), $ = Mt(() => {
3078
+ }, Wl = u.div`display:flex;justify-content:center;margin:16px 0;`, Gl = u(w)`border-radius:6px;box-sizing:border-box;padding:10px 20px;border:1px solid ${p.themedColor.textDisabled};cursor:pointer;user-select:none;`, jl = !0, Kl = () => {
3079
+ const { Template: e } = Ot.useContext(), { Template: t } = xe.useContext(), { Template: n } = Lt.useContext(), [o, s] = _(null), { userSession: i, aiAgentInfo: a } = U(), { cache: l, agentPreviewConfigs: c, chatSDK: d, state: h } = B(), { stringSet: m, dateLocale: f } = O(), { conversation: x, channelSource: E, messageSource: b, scrollSource: g } = Z(), { isActionbookTester: C } = Re(), { filteredMessages: v, shouldShowOriginalDate: S, renderAgentPreviewWelcomeMessages: k } = Pl(), F = Qn(), $ = Mt(() => {
3079
3080
  const y = F[0];
3080
3081
  if (!y) return null;
3081
3082
  const H = y.userId === a.userId;
@@ -3095,7 +3096,7 @@ const Fl = ({ style: e }) => {
3095
3096
  return y ? /* @__PURE__ */ r.createElement("div", { style: { width: "100%" } }, y) : /* @__PURE__ */ r.createElement(Ce, { type: "noMessages", label: m.PLACE_HOLDER__NO_MESSAGES });
3096
3097
  }
3097
3098
  return /* @__PURE__ */ r.createElement(
3098
- kl,
3099
+ Il,
3099
3100
  {
3100
3101
  ref: g.scrollRef,
3101
3102
  scrollPositionRef: g.scrollPositionRef,
@@ -3106,7 +3107,7 @@ const Fl = ({ style: e }) => {
3106
3107
  onLoadPrev: b.loadPrevious,
3107
3108
  onLoadNext: b.loadNext,
3108
3109
  depsForResetScrollPositionToBottom: [b.initialized, b.messages.length !== 0],
3109
- messageTopArea: /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement(Fl, { style: { marginTop: 16 } }), k()),
3110
+ messageTopArea: /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement(Ul, { style: { marginTop: 16 } }), k()),
3110
3111
  messageBottomArea: /* @__PURE__ */ r.createElement(r.Fragment, null, $ && /* @__PURE__ */ r.createElement(
3111
3112
  t,
3112
3113
  {
@@ -3117,10 +3118,10 @@ const Fl = ({ style: e }) => {
3117
3118
  groupType: "single",
3118
3119
  message: ""
3119
3120
  }
3120
- ), /* @__PURE__ */ r.createElement(zl, null)),
3121
- overlayArea: /* @__PURE__ */ r.createElement(r.Fragment, null, !g.isScrollBottomReached && /* @__PURE__ */ r.createElement(Zl, { onClick: () => g.scrollPubSub.publish({ type: "scrollToBottom" }) })),
3121
+ ), /* @__PURE__ */ r.createElement(Vl, null)),
3122
+ overlayArea: /* @__PURE__ */ r.createElement(r.Fragment, null, !g.isScrollBottomReached && /* @__PURE__ */ r.createElement(Yl, { onClick: () => g.scrollPubSub.publish({ type: "scrollToBottom" }) })),
3122
3123
  renderMessage: ({ message: y, index: H }) => {
3123
- const oe = Va(y), Y = v[H - 1], nt = v[H + 1], rt = v[v.length - 1], A = y === rt, D = Wa(y, Y, nt, Gl), K = !Wr((Y == null ? void 0 : Y.createdAt) ?? 0, y.createdAt) && S(H) && !C, q = (Pe) => {
3124
+ const oe = Wa(y), Y = v[H - 1], nt = v[H + 1], rt = v[v.length - 1], A = y === rt, D = Ga(y, Y, nt, jl), K = !Gr((Y == null ? void 0 : Y.createdAt) ?? 0, y.createdAt) && S(H) && !C, q = (Pe) => {
3124
3125
  (y.isFileMessage() || y.isUserMessage()) && s({ file: Pe, sender: V(y, y.sender.userId === a.userId) });
3125
3126
  }, be = () => {
3126
3127
  y.isFileMessage() && $t(y.url);
@@ -3147,7 +3148,7 @@ const Fl = ({ style: e }) => {
3147
3148
  {
3148
3149
  ...Ne,
3149
3150
  ...x,
3150
- isResolvedWhenDeterminedByUser: Yl(x),
3151
+ isResolvedWhenDeterminedByUser: ql(x),
3151
3152
  messageType: "admin.csat",
3152
3153
  onSubmitCSAT: ({ csat: se, csatType: me, csatReason: z, isResolved: ie }) => {
3153
3154
  var ge;
@@ -3215,39 +3216,39 @@ const Fl = ({ style: e }) => {
3215
3216
  }
3216
3217
  );
3217
3218
  };
3218
- return /* @__PURE__ */ r.createElement(Kl, { id: `${J}-message-list` }, re(), o && /* @__PURE__ */ r.createElement(Sl, { onClose: () => s(null), sender: o.sender, file: o.file }));
3219
- }, Kl = u.div`overflow-y:hidden;display:flex;flex:1;position:relative;`, Zl = u(Rl)`position:absolute;bottom:20px;inset-inline-end:20px;`;
3220
- function Yl(e) {
3219
+ return /* @__PURE__ */ r.createElement(Zl, { id: `${J}-message-list` }, re(), o && /* @__PURE__ */ r.createElement(Tl, { onClose: () => s(null), sender: o.sender, file: o.file }));
3220
+ }, Zl = u.div`overflow-y:hidden;display:flex;flex:1;position:relative;`, Yl = u(Dl)`position:absolute;bottom:20px;inset-inline-end:20px;`;
3221
+ function ql(e) {
3221
3222
  var t;
3222
3223
  if (((t = e == null ? void 0 : e.resolution) == null ? void 0 : t.determinedBy) === "user")
3223
3224
  return e.resolution.isResolved;
3224
3225
  }
3225
- const ql = () => {
3226
+ const Jl = () => {
3226
3227
  const { stringSet: e } = O(), { connectionError: t } = U(), { channelSource: n } = Z(), o = t || n.error;
3227
3228
  if (o) {
3228
3229
  const s = t ? void 0 : { label: e.RETRY, onClick: () => n.refetch() };
3229
3230
  return /* @__PURE__ */ r.createElement(Ce, { type: "error", label: o.message, action: s });
3230
3231
  }
3231
- return n.channel ? /* @__PURE__ */ r.createElement(jl, null) : /* @__PURE__ */ r.createElement(Ce, { type: "loading" });
3232
+ return n.channel ? /* @__PURE__ */ r.createElement(Kl, null) : /* @__PURE__ */ r.createElement(Ce, { type: "loading" });
3232
3233
  }, er = () => {
3233
3234
  const { stringSet: e } = O(), { activeChannel: t } = U(), [n] = _(() => (t == null ? void 0 : t.status) === W.OPEN);
3234
3235
  return n ? e.RETURN_TO_CONVERSATION : e.START_NEW_CONVERSATION;
3235
- }, Jl = () => {
3236
+ }, Xl = () => {
3236
3237
  const { stringSet: e } = O(), { goToActiveConversation: t } = Z(), n = er();
3237
- return /* @__PURE__ */ r.createElement(Xl, null, /* @__PURE__ */ r.createElement(w, { variant: "body1", color: p.themedColor.textMidEmphasis }, e.CONVERSATION_CLOSED_FOOTER_LABEL), /* @__PURE__ */ r.createElement(Ql, { onClick: t }, /* @__PURE__ */ r.createElement(w, { variant: "button", color: p.themedColor.textHighEmphasis }, n)));
3238
- }, Xl = u.div`display:flex;flex-direction:column;align-items:center;justify-content:center;padding:32px 0;gap:14px;${P.light`
3238
+ return /* @__PURE__ */ r.createElement(Ql, null, /* @__PURE__ */ r.createElement(w, { variant: "body1", color: p.themedColor.textMidEmphasis }, e.CONVERSATION_CLOSED_FOOTER_LABEL), /* @__PURE__ */ r.createElement(ec, { onClick: t }, /* @__PURE__ */ r.createElement(w, { variant: "button", color: p.themedColor.textHighEmphasis }, n)));
3239
+ }, Ql = u.div`display:flex;flex-direction:column;align-items:center;justify-content:center;padding:32px 0;gap:14px;${P.light`
3239
3240
  background-color: ${p.color.background100};
3240
3241
  `}
3241
3242
  ${P.dark`
3242
3243
  background-color: ${p.color.background500};
3243
3244
  `}
3244
- `, Ql = u.button`all:unset;padding:10px 20px;border-radius:6px;border:1px solid ${p.themedColor.textDisabled};cursor:pointer;${P.light`
3245
+ `, ec = u.button`all:unset;padding:10px 20px;border-radius:6px;border:1px solid ${p.themedColor.textDisabled};cursor:pointer;${P.light`
3245
3246
  background-color: ${p.color.background50};
3246
3247
  `}
3247
3248
  ${P.dark`
3248
3249
  background-color: ${p.color.background700};
3249
3250
  `}
3250
- `, tr = ve(void 0), ec = ({ children: e }) => {
3251
+ `, tr = ve(void 0), tc = ({ children: e }) => {
3251
3252
  const { stringSet: t } = O(), { attachmentMode: n } = U(), { channelSource: o } = Z(), [s, i] = _([]), [a, l] = _({
3252
3253
  visible: !1,
3253
3254
  title: "",
@@ -3267,7 +3268,7 @@ const ql = () => {
3267
3268
  if (!d) return;
3268
3269
  const E = x.filter((b) => On.includes(b.type));
3269
3270
  if (E.length !== 0) {
3270
- if (E.some((b) => b.size > _s)) {
3271
+ if (E.some((b) => b.size > Ss)) {
3271
3272
  l((b) => ({
3272
3273
  ...b,
3273
3274
  visible: !0,
@@ -3312,31 +3313,31 @@ const ql = () => {
3312
3313
  }
3313
3314
  },
3314
3315
  e,
3315
- /* @__PURE__ */ r.createElement(tc, { ...a, onClose: () => l((x) => ({ ...x, visible: !1, title: "" })) })
3316
+ /* @__PURE__ */ r.createElement(nc, { ...a, onClose: () => l((x) => ({ ...x, visible: !1, title: "" })) })
3316
3317
  );
3317
3318
  }, Dt = () => {
3318
3319
  const e = Q(tr);
3319
3320
  if (!e)
3320
3321
  throw new Error("useFileUpload must be used within FileUploadProvider");
3321
3322
  return e;
3322
- }, tc = ({
3323
+ }, nc = ({
3323
3324
  title: e,
3324
3325
  buttonText: t,
3325
3326
  visible: n,
3326
3327
  onClose: o
3327
- }) => /* @__PURE__ */ r.createElement(Yn, { rootElementId: ee.WINDOW, visible: n, onClose: o }, /* @__PURE__ */ r.createElement(nc, null, /* @__PURE__ */ r.createElement(oc, null, /* @__PURE__ */ r.createElement(w, { variant: "h1", color: p.themedColor.textHighEmphasis }, e)), /* @__PURE__ */ r.createElement(rc, null, /* @__PURE__ */ r.createElement(sc, { onClick: o }, /* @__PURE__ */ r.createElement(w, { variant: "button", color: p.themedColor.textHighEmphasisInverse }, t))))), nc = u.div`width:100%;height:auto;padding-block:18px 24px;padding-inline:24px;margin:0 auto;border-radius:4px;box-sizing:border-box;background-color:${({ theme: e }) => e.colors.base.modalContentBackground};`, rc = u.div`display:flex;flex-direction:row;justify-content:flex-end;`, oc = u.div`margin-bottom:16px;`, sc = u.button`display:flex;justify-content:center;align-items:center;border-radius:4px;cursor:pointer;background-color:${p.themedColor.error};border:1px solid ${p.themedColor.error};padding:10px 16px;&:hover{background-color:${p.color.error.dark};border-color:${p.color.error.dark};}&:active{background-color:${p.color.error.extraDark};}`;
3328
- function ic({ blurred: e, elementRef: t, document: n = window.document }) {
3328
+ }) => /* @__PURE__ */ r.createElement(Yn, { rootElementId: ee.WINDOW, visible: n, onClose: o }, /* @__PURE__ */ r.createElement(rc, null, /* @__PURE__ */ r.createElement(sc, null, /* @__PURE__ */ r.createElement(w, { variant: "h1", color: p.themedColor.textHighEmphasis }, e)), /* @__PURE__ */ r.createElement(oc, null, /* @__PURE__ */ r.createElement(ic, { onClick: o }, /* @__PURE__ */ r.createElement(w, { variant: "button", color: p.themedColor.textHighEmphasisInverse }, t))))), rc = u.div`width:100%;height:auto;padding-block:18px 24px;padding-inline:24px;margin:0 auto;border-radius:4px;box-sizing:border-box;background-color:${({ theme: e }) => e.colors.base.modalContentBackground};`, oc = u.div`display:flex;flex-direction:row;justify-content:flex-end;`, sc = u.div`margin-bottom:16px;`, ic = u.button`display:flex;justify-content:center;align-items:center;border-radius:4px;cursor:pointer;background-color:${p.themedColor.error};border:1px solid ${p.themedColor.error};padding:10px 16px;&:hover{background-color:${p.color.error.dark};border-color:${p.color.error.dark};}&:active{background-color:${p.color.error.extraDark};}`;
3329
+ function ac({ blurred: e, elementRef: t, document: n = window.document }) {
3329
3330
  const o = N(!1);
3330
3331
  e && t.current && n.activeElement === t.current && (o.current = !0), le(() => {
3331
3332
  var s;
3332
3333
  !e && o.current && ((s = t.current) == null || s.focus(), o.current = !1);
3333
3334
  }, [e]);
3334
3335
  }
3335
- const ac = (e, t) => {
3336
+ const lc = (e, t) => {
3336
3337
  L(() => {
3337
3338
  t ? e == null || e.startTyping() : e == null || e.endTyping();
3338
3339
  }, [e, t]);
3339
- }, lc = u.div`&::-webkit-scrollbar{display:none;}overflow-x:auto;display:flex;flex-direction:row;gap:10px;padding:8px 16px;background-color:transparent;`, cc = u.div`display:flex;flex-shrink:0;position:relative;margin-block-start:8px;border-radius:12px;height:64px;img{border-radius:12px;object-fit:cover;width:64px;-webkit-user-drag:none;}`, dc = u.div`display:flex;align-items:center;justify-content:center;position:absolute;inset-inline-end:-8px;inset-block-start:-8px;cursor:pointer;border-radius:50%;${P.light`
3340
+ }, cc = u.div`&::-webkit-scrollbar{display:none;}overflow-x:auto;display:flex;flex-direction:row;gap:10px;padding:8px 16px;background-color:transparent;`, dc = u.div`display:flex;flex-shrink:0;position:relative;margin-block-start:8px;border-radius:12px;height:64px;img{border-radius:12px;object-fit:cover;width:64px;-webkit-user-drag:none;}`, uc = u.div`display:flex;align-items:center;justify-content:center;position:absolute;inset-inline-end:-8px;inset-block-start:-8px;cursor:pointer;border-radius:50%;${P.light`
3340
3341
  background-color: ${p.color.background50};
3341
3342
  `}
3342
3343
  ${P.dark`
@@ -3355,16 +3356,16 @@ const ac = (e, t) => {
3355
3356
  circle {
3356
3357
  stroke: ${p.themedColor.bg_50_600};
3357
3358
  }
3358
- `, uc = () => {
3359
+ `, mc = () => {
3359
3360
  const e = Oe(), [t, n] = _(), { files: o, removeFile: s, isFileUploadEnabled: i } = Dt();
3360
- return !i || o.length === 0 ? null : /* @__PURE__ */ r.createElement(lc, null, o.map(({ preview: { type: a, name: l, url: c } }, d) => /* @__PURE__ */ r.createElement(cc, { key: c, onMouseOver: () => n(d), onMouseLeave: () => n(void 0) }, (e || t === d) && /* @__PURE__ */ r.createElement(dc, { title: "Remove file", onClick: () => s(d) }, /* @__PURE__ */ r.createElement(M, { type: "close-filled", color: p.themedColor.textMidEmphasis })), a.startsWith("image/") ? /* @__PURE__ */ r.createElement("img", { alt: "file-image", src: c }) : /* @__PURE__ */ r.createElement(At, { name: l, type: wt(l, a) }))));
3361
- }, mc = ({ channel: e, messages: t }) => {
3362
- const { stringSet: n } = O(), { aiAgentInfo: o } = U(), s = gc(), i = hc({
3361
+ return !i || o.length === 0 ? null : /* @__PURE__ */ r.createElement(cc, null, o.map(({ preview: { type: a, name: l, url: c } }, d) => /* @__PURE__ */ r.createElement(dc, { key: c, onMouseOver: () => n(d), onMouseLeave: () => n(void 0) }, (e || t === d) && /* @__PURE__ */ r.createElement(uc, { title: "Remove file", onClick: () => s(d) }, /* @__PURE__ */ r.createElement(M, { type: "close-filled", color: p.themedColor.textMidEmphasis })), a.startsWith("image/") ? /* @__PURE__ */ r.createElement("img", { alt: "file-image", src: c }) : /* @__PURE__ */ r.createElement(At, { name: l, type: wt(l, a) }))));
3362
+ }, gc = ({ channel: e, messages: t }) => {
3363
+ const { stringSet: n } = O(), { aiAgentInfo: o } = U(), s = hc(), i = pc({
3363
3364
  lastMessage: t[t.length - 1],
3364
3365
  aiAgentUserId: o.userId
3365
3366
  });
3366
3367
  return !e || !s || Pn(e) ? [!0, n.MESSAGE_INPUT__PLACE_HOLDER__DISABLED] : i ? [!0, n.MESSAGE_INPUT__PLACE_HOLDER__WAIT_AI_AGENT_RESPONSE] : [!1, n.MESSAGE_INPUT__PLACE_HOLDER];
3367
- }, gc = () => {
3368
+ }, hc = () => {
3368
3369
  const e = bn(), { chatSDK: t } = B(), [n, o] = _(!0);
3369
3370
  return L(() => {
3370
3371
  const s = new Je({
@@ -3376,7 +3377,7 @@ const ac = (e, t) => {
3376
3377
  t.removeConnectionHandler(e);
3377
3378
  };
3378
3379
  }, [t]), n;
3379
- }, hc = ({
3380
+ }, pc = ({
3380
3381
  lastMessage: e,
3381
3382
  aiAgentUserId: t
3382
3383
  }) => {
@@ -3389,10 +3390,10 @@ const ac = (e, t) => {
3389
3390
  }, nr = {
3390
3391
  textArea: I`min-height:40px;height:40px;font-size:16px;line-height:24px;`,
3391
3392
  attachIcon: I`margin-bottom:4px;`
3392
- }, rr = u.button`all:unset;cursor:pointer;display:flex;align-items:center;justify-content:center;width:32px;height:32px;`, pc = u(rr)`flex-shrink:0;margin-inline-end:12px;margin-bottom:2px;&:disabled{cursor:not-allowed;}&:not(:disabled){&:hover{path{fill:${p.themedColor.textHighEmphasis};}}&:active{border-radius:4px;background-color:${p.themedColor.bg_200_400};}}${_t && nr.attachIcon};`, fc = u.input`display:none;`, dn = u.div`width:100%;position:relative;background-color:${p.themedColor.bg_100_500};border-radius:20px;`, un = u.div`display:flex;flex-direction:row;align-items:flex-end;position:relative;`, mn = u.textarea`all:unset;display:block;flex:1;min-width:0;padding-top:8px;padding-bottom:8px;padding-inline-start:16px;padding-inline-end:12px;box-sizing:border-box;font-size:14px;line-height:20px;color:${p.themedColor.textHighEmphasis};resize:none;width:100%;height:${Mn}px;overflow-wrap:break-word;white-space:pre-wrap;overflow-x:hidden;${_t && nr.textArea};&::placeholder{color:${p.themedColor.textLowEmphasis};}&:disabled{cursor:not-allowed;&::placeholder{color:${p.themedColor.textDisabled};}}`, gn = u.div`padding:12px 16px;position:relative;display:flex;align-items:center;`, hn = ({ disabled: e }) => {
3393
+ }, rr = u.button`all:unset;cursor:pointer;display:flex;align-items:center;justify-content:center;width:32px;height:32px;`, fc = u(rr)`flex-shrink:0;margin-inline-end:12px;margin-bottom:2px;&:disabled{cursor:not-allowed;}&:not(:disabled){&:hover{path{fill:${p.themedColor.textHighEmphasis};}}&:active{border-radius:4px;background-color:${p.themedColor.bg_200_400};}}${_t && nr.attachIcon};`, bc = u.input`display:none;`, dn = u.div`width:100%;position:relative;background-color:${p.themedColor.bg_100_500};border-radius:20px;`, un = u.div`display:flex;flex-direction:row;align-items:flex-end;position:relative;`, mn = u.textarea`all:unset;display:block;flex:1;min-width:0;padding-top:8px;padding-bottom:8px;padding-inline-start:16px;padding-inline-end:12px;box-sizing:border-box;font-size:14px;line-height:20px;color:${p.themedColor.textHighEmphasis};resize:none;width:100%;height:${Mn}px;overflow-wrap:break-word;white-space:pre-wrap;overflow-x:hidden;${_t && nr.textArea};&::placeholder{color:${p.themedColor.textLowEmphasis};}&:disabled{cursor:not-allowed;&::placeholder{color:${p.themedColor.textDisabled};}}`, gn = u.div`padding:12px 16px;position:relative;display:flex;align-items:center;`, hn = ({ disabled: e }) => {
3393
3394
  const t = N(null), { addFiles: n, clearFiles: o, files: s, isFileUploadEnabled: i } = Dt();
3394
3395
  return !i || s.length > 0 ? null : /* @__PURE__ */ r.createElement(
3395
- pc,
3396
+ fc,
3396
3397
  {
3397
3398
  disabled: e,
3398
3399
  onClick: () => {
@@ -3409,7 +3410,7 @@ const ac = (e, t) => {
3409
3410
  }
3410
3411
  ),
3411
3412
  /* @__PURE__ */ r.createElement(
3412
- fc,
3413
+ bc,
3413
3414
  {
3414
3415
  type: "file",
3415
3416
  ref: t,
@@ -3421,12 +3422,12 @@ const ac = (e, t) => {
3421
3422
  }
3422
3423
  )
3423
3424
  );
3424
- }, bc = () => {
3425
- const e = N(null), [t, n] = _(""), { rootElement: o } = B(), { channelSource: s, messageSource: i } = Z(), [a, l] = mc({
3425
+ }, Ec = () => {
3426
+ const e = N(null), [t, n] = _(""), { rootElement: o } = B(), { channelSource: s, messageSource: i } = Z(), [a, l] = gc({
3426
3427
  channel: s.channel,
3427
3428
  messages: i.messages
3428
3429
  }), { files: c, addFiles: d, clearFiles: h } = Dt();
3429
- rl({ onDropFiles: d }), ic({ blurred: a, elementRef: e, document: pe(o) }), ac(s.channel, t);
3430
+ ol({ onDropFiles: d }), ac({ blurred: a, elementRef: e, document: pe(o) }), lc(s.channel, t);
3430
3431
  const m = t.trim().length > 0, f = c.length > 0, x = !a && (m || f), E = () => {
3431
3432
  e.current && (e.current.value = "", e.current.style.height = ""), h(), n("");
3432
3433
  }, b = async () => {
@@ -3447,12 +3448,12 @@ const ac = (e, t) => {
3447
3448
  }, v = (S) => {
3448
3449
  if (e.current) {
3449
3450
  e.current.style.height = "";
3450
- const k = Math.min(ys, e.current.scrollHeight);
3451
+ const k = Math.min(_s, e.current.scrollHeight);
3451
3452
  Mn < k && (e.current.style.height = `${k}px`);
3452
3453
  }
3453
3454
  n(S.target.value);
3454
3455
  };
3455
- return a ? /* @__PURE__ */ r.createElement(gn, null, /* @__PURE__ */ r.createElement(dn, null, /* @__PURE__ */ r.createElement(un, null, /* @__PURE__ */ r.createElement(mn, { disabled: !0, placeholder: l }), /* @__PURE__ */ r.createElement(hn, { disabled: !0 })))) : /* @__PURE__ */ r.createElement(gn, null, /* @__PURE__ */ r.createElement(dn, null, /* @__PURE__ */ r.createElement(uc, null), /* @__PURE__ */ r.createElement(un, null, /* @__PURE__ */ r.createElement(
3456
+ return a ? /* @__PURE__ */ r.createElement(gn, null, /* @__PURE__ */ r.createElement(dn, null, /* @__PURE__ */ r.createElement(un, null, /* @__PURE__ */ r.createElement(mn, { disabled: !0, placeholder: l }), /* @__PURE__ */ r.createElement(hn, { disabled: !0 })))) : /* @__PURE__ */ r.createElement(gn, null, /* @__PURE__ */ r.createElement(dn, null, /* @__PURE__ */ r.createElement(mc, null), /* @__PURE__ */ r.createElement(un, null, /* @__PURE__ */ r.createElement(
3456
3457
  mn,
3457
3458
  {
3458
3459
  ref: e,
@@ -3465,21 +3466,21 @@ const ac = (e, t) => {
3465
3466
  onPaste: g
3466
3467
  }
3467
3468
  ), /* @__PURE__ */ r.createElement(hn, null))), x && /* @__PURE__ */ r.createElement(rr, { onClick: () => b() }, /* @__PURE__ */ r.createElement(M, { type: "send", color: p.color.primary.main, size: 20 })));
3468
- }, Ec = u.div`padding:8px 16px;text-align:center;word-break:break-word;white-space:pre-wrap;line-height:1.43;letter-spacing:-0.2px;font-size:14px;font-weight:400;color:${p.themedColor.textLowEmphasis};&& a{font-weight:700;text-decoration:none;${P.light`
3469
+ }, xc = u.div`padding:8px 16px;text-align:center;word-break:break-word;white-space:pre-wrap;line-height:1.43;letter-spacing:-0.2px;font-size:14px;font-weight:400;color:${p.themedColor.textLowEmphasis};&& a{font-weight:700;text-decoration:none;${P.light`
3469
3470
  color: ${p.color.information.light};
3470
3471
  `};
3471
3472
  ${P.dark`
3472
3473
  color: ${p.color.information.main};
3473
3474
  `};
3474
3475
  }
3475
- `, xc = T(() => import("./CwdCJ7xG.js").then((e) => ({ default: e.MarkdownText }))), Cc = () => {
3476
+ `, Cc = T(() => import("./D5uRw0Em.js").then((e) => ({ default: e.MarkdownText }))), vc = () => {
3476
3477
  const { aiAgentInfo: e } = U(), { messageSource: t } = Z(), { userSession: n } = U();
3477
- return !e.specialNoticeEnabled || !e.specialNotice || !(t.initialized && !t.messages.some((s) => Gn(s, n.userId))) ? null : /* @__PURE__ */ r.createElement(Ec, null, /* @__PURE__ */ r.createElement(xc, null, e.specialNotice));
3478
- }, vc = () => /* @__PURE__ */ r.createElement(yc, null, /* @__PURE__ */ r.createElement(Cc, null), /* @__PURE__ */ r.createElement(ec, null, /* @__PURE__ */ r.createElement(bc, null))), yc = u.div`z-index:0;border:none;width:100%;`, _c = () => {
3478
+ return !e.specialNoticeEnabled || !e.specialNotice || !(t.initialized && !t.messages.some((s) => Gn(s, n.userId))) ? null : /* @__PURE__ */ r.createElement(xc, null, /* @__PURE__ */ r.createElement(Cc, null, e.specialNotice));
3479
+ }, yc = () => /* @__PURE__ */ r.createElement(_c, null, /* @__PURE__ */ r.createElement(vc, null), /* @__PURE__ */ r.createElement(tc, null, /* @__PURE__ */ r.createElement(Ec, null))), _c = u.div`z-index:0;border:none;width:100%;`, Sc = () => {
3479
3480
  var i, a, l;
3480
3481
  const { activeChannel: e } = U(), { channelSource: t } = Z(), n = ((a = (i = t.channel) == null ? void 0 : i.conversation) == null ? void 0 : a.status) === W.CLOSED;
3481
- return !(((l = t.channel) == null ? void 0 : l.url) === (e == null ? void 0 : e.url)) && n ? /* @__PURE__ */ r.createElement(Jl, null) : /* @__PURE__ */ r.createElement(vc, null);
3482
- }, Sc = () => {
3482
+ return !(((l = t.channel) == null ? void 0 : l.url) === (e == null ? void 0 : e.url)) && n ? /* @__PURE__ */ r.createElement(Xl, null) : /* @__PURE__ */ r.createElement(yc, null);
3483
+ }, Tc = () => {
3483
3484
  var v;
3484
3485
  const { state: e, logger: t, enableCloseConversationButton: n, enableExpandButton: o, dispatcher: s } = B(), { stringSet: i } = O(), { aiAgentInfo: a, activeChannel: l } = U(), { channelSource: c, onNavigateToConversationList: d } = Z(), h = c.channel, f = Oe() ? 24 : 16, x = () => {
3485
3486
  e.setOpened(!1);
@@ -3491,44 +3492,44 @@ const ac = (e, t) => {
3491
3492
  t.error("conversation.handleAgentHandoff: error", S);
3492
3493
  }
3493
3494
  }, b = async () => {
3494
- h && await s.send(ro.CloseConversation({ channelUrl: h.url }));
3495
+ h && await s.send(oo.CloseConversation({ channelUrl: h.url }));
3495
3496
  }, g = l && (h == null ? void 0 : h.url) === l.url, C = a.showHandoffButton && !!((v = h == null ? void 0 : h.conversation) != null && v.handoff) && g;
3496
- return /* @__PURE__ */ r.createElement(Ic, null, /* @__PURE__ */ r.createElement($c, null, d && /* @__PURE__ */ r.createElement(De, { onClick: () => d() }, /* @__PURE__ */ r.createElement(M, { type: "menu", size: 24, color: p.themedColor.textHighEmphasis })), g && /* @__PURE__ */ r.createElement(qn, { size: 34 }), /* @__PURE__ */ r.createElement(Oc, { variant: "h2", color: p.themedColor.textHighEmphasis }, a.nickname || (h == null ? void 0 : h.name))), /* @__PURE__ */ r.createElement(Mc, null, C && /* @__PURE__ */ r.createElement(
3497
- kc,
3497
+ return /* @__PURE__ */ r.createElement($c, null, /* @__PURE__ */ r.createElement(Mc, null, d && /* @__PURE__ */ r.createElement(De, { onClick: () => d() }, /* @__PURE__ */ r.createElement(M, { type: "menu", size: 24, color: p.themedColor.textHighEmphasis })), g && /* @__PURE__ */ r.createElement(qn, { size: 34 }), /* @__PURE__ */ r.createElement(Lc, { variant: "h2", color: p.themedColor.textHighEmphasis }, a.nickname || (h == null ? void 0 : h.name))), /* @__PURE__ */ r.createElement(Oc, null, C && /* @__PURE__ */ r.createElement(
3498
+ Ic,
3498
3499
  {
3499
3500
  tooltipLabel: i.HEADER_BUTTON__AGENT_HANDOFF,
3500
- disabled: !oi(h),
3501
+ disabled: !si(h),
3501
3502
  size: f,
3502
3503
  onClick: E
3503
3504
  }
3504
3505
  ), n && /* @__PURE__ */ r.createElement(
3505
- Ac,
3506
+ kc,
3506
3507
  {
3507
3508
  disabled: !Bn(h),
3508
3509
  size: f,
3509
3510
  onClick: b
3510
3511
  }
3511
- ), o && /* @__PURE__ */ r.createElement(Tc, { size: f }), /* @__PURE__ */ r.createElement(wc, { size: f, onClick: x })));
3512
- }, Tc = ({ size: e, disabled: t }) => {
3512
+ ), o && /* @__PURE__ */ r.createElement(wc, { size: f }), /* @__PURE__ */ r.createElement(Ac, { size: f, onClick: x })));
3513
+ }, wc = ({ size: e, disabled: t }) => {
3513
3514
  const { state: n } = B();
3514
3515
  return /* @__PURE__ */ r.createElement(De, { "aria-label": "expand", onClick: () => n.setExpanded(!n.expanded), disabled: t }, /* @__PURE__ */ r.createElement(M, { type: n.expanded ? "collapse" : "expand", size: e, color: p.themedColor.textHighEmphasis }));
3515
- }, wc = ({ size: e, disabled: t, onClick: n }) => /* @__PURE__ */ r.createElement(De, { "aria-label": "close messenger", onClick: n, disabled: t }, /* @__PURE__ */ r.createElement(M, { type: "close", size: e, color: p.themedColor.textHighEmphasis })), Ac = ({ size: e, disabled: t, onClick: n }) => /* @__PURE__ */ r.createElement(De, { "aria-label": "close conversation", onClick: n, disabled: t }, /* @__PURE__ */ r.createElement(
3516
+ }, Ac = ({ size: e, disabled: t, onClick: n }) => /* @__PURE__ */ r.createElement(De, { "aria-label": "close messenger", onClick: n, disabled: t }, /* @__PURE__ */ r.createElement(M, { type: "close", size: e, color: p.themedColor.textHighEmphasis })), kc = ({ size: e, disabled: t, onClick: n }) => /* @__PURE__ */ r.createElement(De, { "aria-label": "close conversation", onClick: n, disabled: t }, /* @__PURE__ */ r.createElement(
3516
3517
  M,
3517
3518
  {
3518
3519
  type: "refresh",
3519
3520
  size: e,
3520
3521
  color: t ? p.themedColor.textDisabled : p.themedColor.textHighEmphasis
3521
3522
  }
3522
- )), kc = ({ size: e, onClick: t, disabled: n, tooltipLabel: o }) => /* @__PURE__ */ r.createElement(Vn, { label: o, position: "bottom", disabled: n }, /* @__PURE__ */ r.createElement(De, { "aria-label": "agent", onClick: t, disabled: n }, /* @__PURE__ */ r.createElement(
3523
+ )), Ic = ({ size: e, onClick: t, disabled: n, tooltipLabel: o }) => /* @__PURE__ */ r.createElement(Vn, { label: o, position: "bottom", disabled: n }, /* @__PURE__ */ r.createElement(De, { "aria-label": "agent", onClick: t, disabled: n }, /* @__PURE__ */ r.createElement(
3523
3524
  M,
3524
3525
  {
3525
3526
  type: "agent",
3526
3527
  size: e,
3527
3528
  color: n ? p.themedColor.textDisabled : p.themedColor.textHighEmphasis
3528
3529
  }
3529
- ))), Ic = u.div`height:56px;box-sizing:border-box;display:flex;align-items:center;padding:11px 12px;border-bottom:1px solid ${p.themedColor.textDisabled};background-color:${({ theme: e }) => e.colors.base.headerBackground};`, $c = u.div`display:flex;flex:1;flex-direction:row;align-items:center;gap:6px;overflow:hidden;`, Mc = u.div`display:flex;gap:10px;align-items:center;justify-content:center;`, Oc = u(w)`text-overflow:ellipsis;overflow:hidden;white-space:nowrap;padding:2px 0;`, De = u.button`all:unset;padding:4px;cursor:pointer;display:flex;align-items:center;justify-content:center;&:disabled{cursor:not-allowed;}`, Lc = () => {
3530
+ ))), $c = u.div`height:56px;box-sizing:border-box;display:flex;align-items:center;padding:11px 12px;border-bottom:1px solid ${p.themedColor.textDisabled};background-color:${({ theme: e }) => e.colors.base.headerBackground};`, Mc = u.div`display:flex;flex:1;flex-direction:row;align-items:center;gap:6px;overflow:hidden;`, Oc = u.div`display:flex;gap:10px;align-items:center;justify-content:center;`, Lc = u(w)`text-overflow:ellipsis;overflow:hidden;white-space:nowrap;padding:2px 0;`, De = u.button`all:unset;padding:4px;cursor:pointer;display:flex;align-items:center;justify-content:center;&:disabled{cursor:not-allowed;}`, Rc = () => {
3530
3531
  const { isActionbookTester: e } = Re();
3531
- return e ? null : /* @__PURE__ */ r.createElement(Sc, null);
3532
+ return e ? null : /* @__PURE__ */ r.createElement(Tc, null);
3532
3533
  }, pn = ({
3533
3534
  children: e,
3534
3535
  onNavigateToConversationList: t,
@@ -3537,69 +3538,69 @@ const ac = (e, t) => {
3537
3538
  }) => {
3538
3539
  const { Template: s } = Nt.useContext();
3539
3540
  return /* @__PURE__ */ r.createElement(
3540
- nl,
3541
+ rl,
3541
3542
  {
3542
3543
  onNavigateToConversationList: t,
3543
3544
  closedChannelUrl: n,
3544
3545
  onClearClosedChannelUrl: o
3545
3546
  },
3546
- /* @__PURE__ */ r.createElement(Et, null, /* @__PURE__ */ r.createElement(Et.Consumer, null, (i) => /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement(Dc, { ...i }, /* @__PURE__ */ r.createElement(s, null)), e)))
3547
+ /* @__PURE__ */ r.createElement(Et, null, /* @__PURE__ */ r.createElement(Et.Consumer, null, (i) => /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement(Nc, { ...i }, /* @__PURE__ */ r.createElement(s, null)), e)))
3547
3548
  );
3548
3549
  }, Nt = _e({
3549
- template: Rc,
3550
+ template: Dc,
3550
3551
  components: {
3551
- Header: Lc,
3552
- Body: ql,
3553
- Footer: _c
3552
+ Header: Rc,
3553
+ Body: Jl,
3554
+ Footer: Sc
3554
3555
  }
3555
3556
  });
3556
- function Rc() {
3557
+ function Dc() {
3557
3558
  const { components: e } = Nt.useContext();
3558
3559
  return /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement(e.Header, null), /* @__PURE__ */ r.createElement(e.Body, null), /* @__PURE__ */ r.createElement(e.Footer, null));
3559
3560
  }
3560
- const Dc = u.div`height:100%;width:100%;display:flex;flex-direction:column;flex:1;background-color:${({ theme: e }) => e.colors.base.background};`, {
3561
- Provider: Nc,
3562
- Context: iu,
3561
+ const Nc = u.div`height:100%;width:100%;display:flex;flex-direction:column;flex:1;background-color:${({ theme: e }) => e.colors.base.background};`, {
3562
+ Provider: Pc,
3563
+ Context: au,
3563
3564
  useContext: or
3564
3565
  } = G("ConversationList");
3565
- function Pc({
3566
+ function Bc({
3566
3567
  conversationListLimit: e,
3567
3568
  conversationListFilter: t,
3568
3569
  onOpenConversationView: n = Ie,
3569
3570
  children: o
3570
3571
  }) {
3571
3572
  return /* @__PURE__ */ r.createElement(
3572
- go,
3573
+ ho,
3573
3574
  {
3574
3575
  conversationListLimit: e,
3575
3576
  conversationListFilter: t
3576
3577
  },
3577
- (s) => /* @__PURE__ */ r.createElement(Nc, { value: { ...s, onOpenConversationView: n } }, o)
3578
+ (s) => /* @__PURE__ */ r.createElement(Pc, { value: { ...s, onOpenConversationView: n } }, o)
3578
3579
  );
3579
3580
  }
3580
3581
  const sr = _e({
3581
- template: Bc,
3582
+ template: Fc,
3582
3583
  // Note: 리스트 변경되면 디자인 변경 가능성이 있어서 일단 컴포넌트는 비워둠
3583
3584
  components: {}
3584
3585
  });
3585
- function Bc({
3586
+ function Fc({
3586
3587
  title: e = "",
3587
3588
  lastMessageTimestamp: t = Date.now(),
3588
3589
  onClick: n
3589
3590
  }) {
3590
3591
  const { stringSet: o, format: s } = O();
3591
- return /* @__PURE__ */ r.createElement(Fc, { role: "button", onClick: () => n == null ? void 0 : n() }, /* @__PURE__ */ r.createElement(Hc, null, /* @__PURE__ */ r.createElement(zc, null, /* @__PURE__ */ r.createElement(w, { variant: "subtitle1", color: p.themedColor.textHighEmphasis }, s(t, o.DATE_FORMAT__CONVERSATION_LIST__LIST_ITEM_TITLE)), /* @__PURE__ */ r.createElement(w, { variant: "caption2", color: p.themedColor.textLowEmphasis }, s(t, o.DATE_FORMAT__CONVERSATION_LIST__LIST_ITEM_TITLE_CAPTION))), /* @__PURE__ */ r.createElement(w, { variant: "body3", color: p.themedColor.textMidEmphasis }, e || o.CONVERSATION_LIST__TOPICS_FALLBACK)), /* @__PURE__ */ r.createElement(M, { type: "chevron-right", size: 16, color: p.themedColor.textHighEmphasis }), /* @__PURE__ */ r.createElement(Uc, null));
3592
+ return /* @__PURE__ */ r.createElement(Uc, { role: "button", onClick: () => n == null ? void 0 : n() }, /* @__PURE__ */ r.createElement(zc, null, /* @__PURE__ */ r.createElement(Vc, null, /* @__PURE__ */ r.createElement(w, { variant: "subtitle1", color: p.themedColor.textHighEmphasis }, s(t, o.DATE_FORMAT__CONVERSATION_LIST__LIST_ITEM_TITLE)), /* @__PURE__ */ r.createElement(w, { variant: "caption2", color: p.themedColor.textLowEmphasis }, s(t, o.DATE_FORMAT__CONVERSATION_LIST__LIST_ITEM_TITLE_CAPTION))), /* @__PURE__ */ r.createElement(w, { variant: "body3", color: p.themedColor.textMidEmphasis }, e || o.CONVERSATION_LIST__TOPICS_FALLBACK)), /* @__PURE__ */ r.createElement(M, { type: "chevron-right", size: 16, color: p.themedColor.textHighEmphasis }), /* @__PURE__ */ r.createElement(Hc, null));
3592
3593
  }
3593
- const Fc = u.div`display:flex;flex-direction:row;align-items:center;position:relative;width:100%;padding:14px 16px;box-sizing:border-box;gap:4px;cursor:pointer;`, Uc = u.div`position:absolute;bottom:0;height:1px;width:calc(100% - 32px);background-color:${p.themedColor.textDisabled};`, Hc = u.div`gap:4px;display:flex;flex-direction:column;flex:1;`, zc = u.div`display:flex;justify-content:flex-start;align-items:center;gap:6px;`, Vc = ({ items: e, renderItem: t, onEndReached: n }) => {
3594
+ const Uc = u.div`display:flex;flex-direction:row;align-items:center;position:relative;width:100%;padding:14px 16px;box-sizing:border-box;gap:4px;cursor:pointer;`, Hc = u.div`position:absolute;bottom:0;height:1px;width:calc(100% - 32px);background-color:${p.themedColor.textDisabled};`, zc = u.div`gap:4px;display:flex;flex-direction:column;flex:1;`, Vc = u.div`display:flex;justify-content:flex-start;align-items:center;gap:6px;`, Wc = ({ items: e, renderItem: t, onEndReached: n }) => {
3594
3595
  const o = (s) => {
3595
3596
  const i = s.target;
3596
3597
  i.scrollHeight - i.scrollTop === i.clientHeight && (n == null || n());
3597
3598
  };
3598
- return /* @__PURE__ */ r.createElement(Wc, { onScroll: (s) => o(s) }, e.map((s, i) => t(s, i)));
3599
- }, Wc = u.div`width:100%;height:100%;display:flex;flex-direction:column;flex:1;overflow:auto;`, Gc = () => {
3599
+ return /* @__PURE__ */ r.createElement(Gc, { onScroll: (s) => o(s) }, e.map((s, i) => t(s, i)));
3600
+ }, Gc = u.div`width:100%;height:100%;display:flex;flex-direction:column;flex:1;overflow:auto;`, jc = () => {
3600
3601
  const { stringSet: e } = O(), { listSource: t, onOpenConversationView: n } = or(), { Template: o } = sr.useContext();
3601
3602
  return t.initialized ? t.channels.length === 0 ? /* @__PURE__ */ r.createElement(Ce, { type: "noChannels", label: e.CONVERSATION_LIST__NO_CONVERSATIONS }) : /* @__PURE__ */ r.createElement(
3602
- Vc,
3603
+ Wc,
3603
3604
  {
3604
3605
  items: t.channels,
3605
3606
  renderItem: (s) => {
@@ -3621,10 +3622,10 @@ const Fc = u.div`display:flex;flex-direction:row;align-items:center;position:rel
3621
3622
  }
3622
3623
  }
3623
3624
  ) : /* @__PURE__ */ r.createElement(Ce, { type: "loading" });
3624
- }, jc = () => {
3625
+ }, Kc = () => {
3625
3626
  const { refreshActiveChannel: e } = U(), { onOpenConversationView: t } = or(), n = er();
3626
3627
  return /* @__PURE__ */ r.createElement(
3627
- Kc,
3628
+ Zc,
3628
3629
  {
3629
3630
  role: "button",
3630
3631
  onClick: async () => {
@@ -3632,12 +3633,12 @@ const Fc = u.div`display:flex;flex-direction:row;align-items:center;position:rel
3632
3633
  t(o, W.OPEN);
3633
3634
  }
3634
3635
  },
3635
- /* @__PURE__ */ r.createElement(Zc, { variant: "h1" }, n)
3636
+ /* @__PURE__ */ r.createElement(Yc, { variant: "h1" }, n)
3636
3637
  );
3637
- }, Kc = u.div`background-color:${({ theme: e }) => e.colors.base.primary};display:flex;align-items:center;justify-content:center;padding:16px;cursor:pointer;`, Zc = u(w)`color:${({ theme: e }) => e.colors.base.primaryContrastContent};overflow:hidden;text-overflow:ellipsis;white-space:nowrap;`, Yc = () => {
3638
+ }, Zc = u.div`background-color:${({ theme: e }) => e.colors.base.primary};display:flex;align-items:center;justify-content:center;padding:16px;cursor:pointer;`, Yc = u(w)`color:${({ theme: e }) => e.colors.base.primaryContrastContent};overflow:hidden;text-overflow:ellipsis;white-space:nowrap;`, qc = () => {
3638
3639
  const { stringSet: e } = O();
3639
- return /* @__PURE__ */ r.createElement(qc, null, /* @__PURE__ */ r.createElement(Jc, { variant: "h2", color: p.themedColor.textHighEmphasis }, e.CONVERSATION_LIST__HEADER_TITLE), /* @__PURE__ */ r.createElement(Xc, null));
3640
- }, qc = u.div`display:flex;flex-direction:column;align-items:flex-start;justify-content:center;width:100%;flex-shrink:0;height:56px;position:relative;background-color:${({ theme: e }) => e.colors.base.headerBackground};`, Jc = u(w)`padding:0 12px;width:100%;box-sizing:border-box;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;`, Xc = u.div`position:absolute;bottom:0;width:100%;height:1px;background-color:${p.themedColor.textDisabled};`, Qc = ({
3640
+ return /* @__PURE__ */ r.createElement(Jc, null, /* @__PURE__ */ r.createElement(Xc, { variant: "h2", color: p.themedColor.textHighEmphasis }, e.CONVERSATION_LIST__HEADER_TITLE), /* @__PURE__ */ r.createElement(Qc, null));
3641
+ }, Jc = u.div`display:flex;flex-direction:column;align-items:flex-start;justify-content:center;width:100%;flex-shrink:0;height:56px;position:relative;background-color:${({ theme: e }) => e.colors.base.headerBackground};`, Xc = u(w)`padding:0 12px;width:100%;box-sizing:border-box;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;`, Qc = u.div`position:absolute;bottom:0;width:100%;height:1px;background-color:${p.themedColor.textDisabled};`, ed = ({
3641
3642
  conversationListLimit: e,
3642
3643
  conversationListFilter: t,
3643
3644
  children: n,
@@ -3645,28 +3646,28 @@ const Fc = u.div`display:flex;flex-direction:row;align-items:center;position:rel
3645
3646
  }) => {
3646
3647
  const { Template: s } = Pt.useContext();
3647
3648
  return /* @__PURE__ */ r.createElement(
3648
- Pc,
3649
+ Bc,
3649
3650
  {
3650
3651
  conversationListLimit: e,
3651
3652
  conversationListFilter: t,
3652
3653
  onOpenConversationView: o
3653
3654
  },
3654
- /* @__PURE__ */ r.createElement(td, null, /* @__PURE__ */ r.createElement(s, null)),
3655
+ /* @__PURE__ */ r.createElement(nd, null, /* @__PURE__ */ r.createElement(s, null)),
3655
3656
  n
3656
3657
  );
3657
3658
  }, Pt = _e({
3658
- template: ed,
3659
+ template: td,
3659
3660
  components: {
3660
- Header: Yc,
3661
- Body: Gc,
3662
- Footer: jc
3661
+ Header: qc,
3662
+ Body: jc,
3663
+ Footer: Kc
3663
3664
  }
3664
3665
  });
3665
- function ed() {
3666
+ function td() {
3666
3667
  const { components: e } = Pt.useContext();
3667
3668
  return /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement(e.Header, null), /* @__PURE__ */ r.createElement(e.Body, null), /* @__PURE__ */ r.createElement(e.Footer, null));
3668
3669
  }
3669
- const td = u.div`height:100%;width:100%;display:flex;flex-direction:column;flex:1;background-color:${({ theme: e }) => e.colors.base.background};`, nd = I`:where(#${ee.ENTRY}) :not(code *){font-family:'Roboto',sans-serif;box-sizing:border-box;}`, rd = [nd, ss, is], od = (e, ...t) => Ir(e, ...rd, ...t), sd = od``, id = Kr(
3670
+ const nd = u.div`height:100%;width:100%;display:flex;flex-direction:column;flex:1;background-color:${({ theme: e }) => e.colors.base.background};`, rd = I`:where(#${ee.ENTRY}) :not(code *){font-family:'Roboto',sans-serif;box-sizing:border-box;}`, od = [rd, is, as], sd = (e, ...t) => $r(e, ...od, ...t), id = sd``, ad = Zr(
3670
3671
  Nt,
3671
3672
  xe,
3672
3673
  Ot,
@@ -3674,7 +3675,7 @@ const td = u.div`height:100%;width:100%;display:flex;flex-direction:column;flex:
3674
3675
  Pt,
3675
3676
  sr
3676
3677
  );
3677
- function ad({
3678
+ function ld({
3678
3679
  appearance: e,
3679
3680
  rootElement: t,
3680
3681
  logger: n,
@@ -3684,7 +3685,7 @@ function ad({
3684
3685
  messageTemplate: a,
3685
3686
  theme: l
3686
3687
  }) {
3687
- return ms(Yo, t), /* @__PURE__ */ r.createElement($r, { target: t }, /* @__PURE__ */ r.createElement(cs, { rootElement: t, logger: n, appearance: e, theme: l }, /* @__PURE__ */ r.createElement(zo, { internalVariables: a == null ? void 0 : a.__internalVariables }, /* @__PURE__ */ r.createElement(os, { stringSet: s, logger: n, language: o }, /* @__PURE__ */ r.createElement(id, null, i, /* @__PURE__ */ r.createElement(sd, null))))));
3688
+ return gs(qo, t), /* @__PURE__ */ r.createElement(Mr, { target: t }, /* @__PURE__ */ r.createElement(ds, { rootElement: t, logger: n, appearance: e, theme: l }, /* @__PURE__ */ r.createElement(Vo, { internalVariables: a == null ? void 0 : a.__internalVariables }, /* @__PURE__ */ r.createElement(ss, { stringSet: s, logger: n, language: o }, /* @__PURE__ */ r.createElement(ad, null, i, /* @__PURE__ */ r.createElement(id, null))))));
3688
3689
  }
3689
3690
  const We = {}, Ge = {
3690
3691
  getItem: (e) => {
@@ -3729,8 +3730,8 @@ const We = {}, Ge = {
3729
3730
  ...a
3730
3731
  }, l) {
3731
3732
  var c, d;
3732
- return we.level !== n && (we.level = n), us("https://fonts.googleapis.com/css2?family=Roboto&display=swap", t), /* @__PURE__ */ r.createElement("div", { id: ee.ENTRY, style: { width: "fit-content", height: "fit-content", ...a.entryStyle } }, /* @__PURE__ */ r.createElement(
3733
- ad,
3733
+ return we.level !== n && (we.level = n), ms("https://fonts.googleapis.com/css2?family=Roboto&display=swap", t), /* @__PURE__ */ r.createElement("div", { id: ee.ENTRY, style: { width: "fit-content", height: "fit-content", ...a.entryStyle } }, /* @__PURE__ */ r.createElement(
3734
+ ld,
3734
3735
  {
3735
3736
  logger: we,
3736
3737
  rootElement: t,
@@ -3741,7 +3742,7 @@ const We = {}, Ge = {
3741
3742
  theme: a.theme
3742
3743
  },
3743
3744
  /* @__PURE__ */ r.createElement(
3744
- ps,
3745
+ fs,
3745
3746
  {
3746
3747
  rootElement: t,
3747
3748
  keyValueStorage: {
@@ -3752,31 +3753,31 @@ const We = {}, Ge = {
3752
3753
  },
3753
3754
  language: o,
3754
3755
  logger: we,
3755
- dispatcher: ld,
3756
+ dispatcher: cd,
3756
3757
  chatParams: { customApiHost: a.customApiHost, customWebSocketHost: a.customWebSocketHost },
3757
3758
  ...a
3758
3759
  },
3759
3760
  /* @__PURE__ */ r.createElement(
3760
- bs,
3761
+ Es,
3761
3762
  {
3762
3763
  ref: l,
3763
3764
  userSessionInfo: s,
3764
3765
  forceCreateChannel: (d = a.agentPreviewConfigs) == null ? void 0 : d.forceCreateChannel
3765
3766
  },
3766
- /* @__PURE__ */ r.createElement(Na, { ...a._UNSAFE_INTERNAL_dashboardTester }, i, /* @__PURE__ */ r.createElement("div", { id: ee.MODAL_ROOT }))
3767
+ /* @__PURE__ */ r.createElement(Pa, { ...a._UNSAFE_INTERNAL_dashboardTester }, i, /* @__PURE__ */ r.createElement("div", { id: ee.MODAL_ROOT }))
3767
3768
  )
3768
3769
  )
3769
3770
  ));
3770
- }), we = new Tn(En.WARN), ld = new _n(we), ar = ({ children: e, isOpened: t }) => {
3771
+ }), we = new Tn(En.WARN), cd = new _n(we), ar = ({ children: e, isOpened: t }) => {
3771
3772
  const { dir: n, rootElement: o } = B(), s = pe(o, !0);
3772
3773
  return L(() => {
3773
3774
  const i = "sb-agent-block-scroll";
3774
3775
  return t ? s.body.classList.add(i) : s.body.classList.remove(i), () => {
3775
3776
  s.body.classList.remove(i);
3776
3777
  };
3777
- }, [s, t]), /* @__PURE__ */ r.createElement(cd, { dir: n, $visible: t }, e);
3778
- }, cd = u.div`width:100%;height:100%;position:fixed;top:0;left:0;z-index:${fe.WINDOW};visibility:${({ $visible: e }) => e ? "visible" : "hidden"};`, dd = 48, ud = 2 / 3;
3779
- function md({
3778
+ }, [s, t]), /* @__PURE__ */ r.createElement(dd, { dir: n, $visible: t }, e);
3779
+ }, dd = u.div`width:100%;height:100%;position:fixed;top:0;left:0;z-index:${fe.WINDOW};visibility:${({ $visible: e }) => e ? "visible" : "hidden"};`, ud = 48, md = 2 / 3;
3780
+ function gd({
3780
3781
  className: e,
3781
3782
  isOpened: t,
3782
3783
  onClick: n,
@@ -3785,11 +3786,11 @@ function md({
3785
3786
  dir: i,
3786
3787
  animated: a = !0,
3787
3788
  backgroundColor: l,
3788
- size: c = dd
3789
+ size: c = ud
3789
3790
  }) {
3790
- const d = pt(l), h = Math.round(c * ud);
3791
+ const d = pt(l), h = Math.round(c * md);
3791
3792
  return /* @__PURE__ */ r.createElement(
3792
- pd,
3793
+ fd,
3793
3794
  {
3794
3795
  dir: i,
3795
3796
  id: ee.LAUNCHER,
@@ -3800,11 +3801,11 @@ function md({
3800
3801
  $backgroundColor: l,
3801
3802
  $size: c
3802
3803
  },
3803
- /* @__PURE__ */ r.createElement(fd, { $isOpened: t, $animated: a, $fillColor: d, $iconSize: h }, /* @__PURE__ */ r.createElement(fn.Open, { url: s, isDefaultIcon: o === "default_icon" })),
3804
- /* @__PURE__ */ r.createElement(bd, { $isOpened: t, $animated: a, $fillColor: d, $iconSize: h }, /* @__PURE__ */ r.createElement(fn.Close, { size: h }))
3804
+ /* @__PURE__ */ r.createElement(bd, { $isOpened: t, $animated: a, $fillColor: d, $iconSize: h }, /* @__PURE__ */ r.createElement(fn.Open, { url: s, isDefaultIcon: o === "default_icon" })),
3805
+ /* @__PURE__ */ r.createElement(Ed, { $isOpened: t, $animated: a, $fillColor: d, $iconSize: h }, /* @__PURE__ */ r.createElement(fn.Close, { size: h }))
3805
3806
  );
3806
3807
  }
3807
- const gd = I`&:hover{transition:transform 250ms cubic-bezier(0.33,0,0,1);transform:scale(1.1);}&:active{transform:scale(0.8);}`, hd = I`img{width:100%;height:100%;object-fit:cover;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-user-drag:none;&[data-default-icon='true']{width:${({ $iconSize: e }) => e}px;height:${({ $iconSize: e }) => e}px;filter:${({ $fillColor: e }) => e === $n.WHITE ? "grayscale(100%) brightness(2000%)" : "grayscale(100%) invert(100%) saturate(0%) brightness(0%) contrast(1000%)"};}}`, lr = I`svg{width:${({ $iconSize: e }) => e}px;height:${({ $iconSize: e }) => e}px;${({ $fillColor: e }) => I`
3808
+ const hd = I`&:hover{transition:transform 250ms cubic-bezier(0.33,0,0,1);transform:scale(1.1);}&:active{transform:scale(0.8);}`, pd = I`img{width:100%;height:100%;object-fit:cover;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-user-drag:none;&[data-default-icon='true']{width:${({ $iconSize: e }) => e}px;height:${({ $iconSize: e }) => e}px;filter:${({ $fillColor: e }) => e === $n.WHITE ? "grayscale(100%) brightness(2000%)" : "grayscale(100%) invert(100%) saturate(0%) brightness(0%) contrast(1000%)"};}}`, lr = I`svg{width:${({ $iconSize: e }) => e}px;height:${({ $iconSize: e }) => e}px;${({ $fillColor: e }) => I`
3808
3809
  path {
3809
3810
  fill: ${e};
3810
3811
  }
@@ -3813,14 +3814,14 @@ const gd = I`&:hover{transition:transform 250ms cubic-bezier(0.33,0,0,1);transfo
3813
3814
  }
3814
3815
  `}
3815
3816
  }
3816
- `, pd = u.button`position:relative;padding:0;width:${({ $size: e }) => e}px;height:${({ $size: e }) => e}px;background:${({ $backgroundColor: e }) => e};border-radius:50%;transition:all 0.3s cubic-bezier(0.31,-0.105,0.43,1.4);border:none;display:flex;justify-content:center;align-items:center;box-shadow:0 16px 24px 2px rgba(33,33,33,0.12),0 6px 30px 5px rgba(33,33,33,0.08),0 6px 10px -5px rgba(33,33,33,0.04);${({ $animated: e }) => e && gd}`, cr = u.span`position:absolute;width:100%;height:100%;border-radius:50%;overflow:hidden;transition:transform 0.16s linear,opacity 0.08s linear,scale 0.16s linear;user-select:none;display:flex;justify-content:center;align-items:center;`, fd = u(cr)`opacity:${({ $isOpened: e }) => e ? 0 : 1};transform:${({ $animated: e, $isOpened: t }) => e && (t ? "rotate(-90deg) scale(0)" : "rotate(0deg)")};${hd}${lr}`, bd = u(cr)`scale:${({ $isOpened: e }) => e ? 1 : 0};transform:${({ $animated: e, $isOpened: t }) => e && (t ? "rotate(0deg)" : "rotate(-90deg)")};${lr}`, fn = {
3817
+ `, fd = u.button`position:relative;padding:0;width:${({ $size: e }) => e}px;height:${({ $size: e }) => e}px;background:${({ $backgroundColor: e }) => e};border-radius:50%;transition:all 0.3s cubic-bezier(0.31,-0.105,0.43,1.4);border:none;display:flex;justify-content:center;align-items:center;box-shadow:0 16px 24px 2px rgba(33,33,33,0.12),0 6px 30px 5px rgba(33,33,33,0.08),0 6px 10px -5px rgba(33,33,33,0.04);${({ $animated: e }) => e && hd}`, cr = u.span`position:absolute;width:100%;height:100%;border-radius:50%;overflow:hidden;transition:transform 0.16s linear,opacity 0.08s linear,scale 0.16s linear;user-select:none;display:flex;justify-content:center;align-items:center;`, bd = u(cr)`opacity:${({ $isOpened: e }) => e ? 0 : 1};transform:${({ $animated: e, $isOpened: t }) => e && (t ? "rotate(-90deg) scale(0)" : "rotate(0deg)")};${pd}${lr}`, Ed = u(cr)`scale:${({ $isOpened: e }) => e ? 1 : 0};transform:${({ $animated: e, $isOpened: t }) => e && (t ? "rotate(0deg)" : "rotate(-90deg)")};${lr}`, fn = {
3817
3818
  Open: (e) => e.url ? /* @__PURE__ */ r.createElement("img", { src: e.url, alt: "launcher-img", "data-default-icon": e.isDefaultIcon }) : /* @__PURE__ */ r.createElement(kt, null),
3818
3819
  Close: ({ size: e }) => /* @__PURE__ */ r.createElement(M, { size: e, type: "chevron-down" })
3819
3820
  };
3820
3821
  function dr({ className: e, size: t }) {
3821
3822
  const { colors: n } = xt(), { dir: o, state: s } = B(), { launcherInfo: i } = U();
3822
- return xd(), /* @__PURE__ */ r.createElement(
3823
- md,
3823
+ return Cd(), /* @__PURE__ */ r.createElement(
3824
+ gd,
3824
3825
  {
3825
3826
  dir: o,
3826
3827
  className: e,
@@ -3833,8 +3834,8 @@ function dr({ className: e, size: t }) {
3833
3834
  }
3834
3835
  );
3835
3836
  }
3836
- const Ed = 1e3 * 60;
3837
- function xd() {
3837
+ const xd = 1e3 * 60;
3838
+ function Cd() {
3838
3839
  const { chatSDK: e, state: t, logger: n, enableAutoDisconnectInLauncher: o } = B(), s = N(null);
3839
3840
  L(() => {
3840
3841
  if (!o) return;
@@ -3842,37 +3843,37 @@ function xd() {
3842
3843
  s.current && (clearTimeout(s.current), s.current = null);
3843
3844
  }
3844
3845
  function a() {
3845
- e.connectionState === Ar.CLOSED && (e.reconnect(), n.debug("useSDKInactivityTimeout: reconnected")), i(), n.debug("useSDKInactivityTimeout: clear disconnect schedule");
3846
+ e.connectionState === kr.CLOSED && (e.reconnect(), n.debug("useSDKInactivityTimeout: reconnected")), i(), n.debug("useSDKInactivityTimeout: clear disconnect schedule");
3846
3847
  }
3847
3848
  function l() {
3848
3849
  i(), s.current = setTimeout(async () => {
3849
3850
  await e.disconnectWebSocket(), n.debug("useSDKInactivityTimeout: disconnected");
3850
- }, Ed);
3851
+ }, xd);
3851
3852
  }
3852
3853
  t.opened ? a() : (l(), n.debug("useSDKInactivityTimeout: schedule disconnect"));
3853
3854
  }, [o, e, t.opened]);
3854
3855
  }
3855
3856
  const ur = ve(null);
3856
- function Cd() {
3857
+ function vd() {
3857
3858
  const e = Q(ur);
3858
3859
  if (!e)
3859
3860
  throw new Error("useNavigator() must be used within <Navigator />");
3860
3861
  return e;
3861
3862
  }
3862
3863
  function mr({ children: e }) {
3863
- const t = Cd();
3864
+ const t = vd();
3864
3865
  return typeof e == "function" ? e(t) : /* @__PURE__ */ r.createElement(r.Fragment, null, e);
3865
3866
  }
3866
- const vd = xn`0%{transform:translateY(40px);opacity:0;}100%{transform:translateY(0px);opacity:1;}`, yd = xn`0%{transform:translateY(0px);opacity:1;}100%{transform:translateY(40px);opacity:0;}`, _d = I`animation-name:${vd};animation-duration:0.3s;animation-fill-mode:forwards;`, Sd = I``, Td = I`animation-name:${yd};animation-duration:0.3s;animation-fill-mode:forwards;`, wd = I`visibility:hidden;`, Ad = u.div`position:absolute;top:0;left:0;width:100%;height:100%;${({ $transitionState: e }) => {
3867
+ const yd = xn`0%{transform:translateY(40px);opacity:0;}100%{transform:translateY(0px);opacity:1;}`, _d = xn`0%{transform:translateY(0px);opacity:1;}100%{transform:translateY(40px);opacity:0;}`, Sd = I`animation-name:${yd};animation-duration:0.3s;animation-fill-mode:forwards;`, Td = I``, wd = I`animation-name:${_d};animation-duration:0.3s;animation-fill-mode:forwards;`, Ad = I`visibility:hidden;`, kd = u.div`position:absolute;top:0;left:0;width:100%;height:100%;${({ $transitionState: e }) => {
3867
3868
  switch (e) {
3868
3869
  case "entering":
3869
- return _d;
3870
- case "entered":
3871
3870
  return Sd;
3872
- case "exiting":
3871
+ case "entered":
3873
3872
  return Td;
3874
- case "exited":
3873
+ case "exiting":
3875
3874
  return wd;
3875
+ case "exited":
3876
+ return Ad;
3876
3877
  default:
3877
3878
  return "";
3878
3879
  }
@@ -3932,14 +3933,14 @@ function Ae({ initialId: e, children: t }) {
3932
3933
  C === e ? g[C] = "entered" : g[C] = "exited";
3933
3934
  }), g;
3934
3935
  }), [x, E] = _({}), b = l[l.length - 1];
3935
- return /* @__PURE__ */ r.createElement(ur.Provider, { value: s }, /* @__PURE__ */ r.createElement(kd, null, Object.keys(a).map((g) => {
3936
+ return /* @__PURE__ */ r.createElement(ur.Provider, { value: s }, /* @__PURE__ */ r.createElement(Id, null, Object.keys(a).map((g) => {
3936
3937
  var k;
3937
3938
  if (!d[g]) return null;
3938
3939
  const C = m[g] || "exited", v = g === b, S = `${g}-${x[g] || 0}`;
3939
- return /* @__PURE__ */ r.createElement(Ad, { key: S, $transitionState: C, $active: v }, (k = a[g]) == null ? void 0 : k.element);
3940
+ return /* @__PURE__ */ r.createElement(kd, { key: S, $transitionState: C, $active: v }, (k = a[g]) == null ? void 0 : k.element);
3940
3941
  })));
3941
3942
  }
3942
- const kd = u.div`position:relative;width:100%;height:100%;`;
3943
+ const Id = u.div`position:relative;width:100%;height:100%;`;
3943
3944
  Ae.Screen = mr;
3944
3945
  const he = {
3945
3946
  activeConv: "active-conv",
@@ -3953,19 +3954,19 @@ const he = {
3953
3954
  onClearClosedChannelUrl: () => e(void 0)
3954
3955
  }
3955
3956
  )), /* @__PURE__ */ r.createElement(Ae.Screen, { id: he.convList, lazy: !0 }, ({ navigation: n }) => /* @__PURE__ */ r.createElement(
3956
- Qc,
3957
+ ed,
3957
3958
  {
3958
3959
  onOpenConversationView: (o, s) => {
3959
3960
  s === "closed" ? (e(o), n.navigate(he.closedConv, { reset: !0 })) : n.navigate(he.activeConv);
3960
3961
  }
3961
3962
  }
3962
3963
  )));
3963
- function Id({ isExpanded: e, isOpened: t, children: n, launcher: o }) {
3964
+ function $d({ isExpanded: e, isOpened: t, children: n, launcher: o }) {
3964
3965
  const { dir: s } = B();
3965
- return /* @__PURE__ */ r.createElement($d, null, /* @__PURE__ */ r.createElement(Md, { dir: s, id: ee.WINDOW, $isExpanded: e, $isOpened: t }, n), o);
3966
+ return /* @__PURE__ */ r.createElement(Md, null, /* @__PURE__ */ r.createElement(Od, { dir: s, id: ee.WINDOW, $isExpanded: e, $isOpened: t }, n), o);
3966
3967
  }
3967
- const $d = u.div`display:flex;flex-direction:column;gap:8px;align-items:flex-end;`, Md = u.div`background:${({ theme: e }) => e.colors.base.background};display:flex;overscroll-behavior:none;-webkit-overflow-scrolling:auto;height:640px;min-height:80px;width:400px;max-width:80vw;max-height:80vh;box-shadow:0px 16px 24px 2px rgba(33,33,33,0.12),0px 6px 30px 5px rgba(33,33,33,0.08),0px 6px 10px -5px rgba(33,33,33,0.04);border-radius:16px;overflow:hidden;transition:width 200ms ease 0s,height 200ms ease 0s,max-height 200ms ease 0s,transform 150ms cubic-bezier(0,1.2,1,1) 0s,opacity 83ms ease-out 0s;transform:scale(0.15);opacity:0;transform-origin:right bottom;[dir='rtl'] &:not([dir='ltr']),&[dir='rtl']{transform-origin:left bottom;}${({ $isOpened: e }) => e && Ld};${({ $isExpanded: e }) => e && Od};`, Od = I`width:743px;height:723px;`, Ld = I`z-index:${fe.WINDOW};pointer-events:all;transform:scale(1);opacity:1;transition:width 200ms ease 0s,height 200ms ease 0s,max-height 200ms ease 0s,transform 300ms cubic-bezier(0,1.2,1,1) 0s,opacity 83ms ease-out 0s;`, au = ye(function({ children: e, ...t }, n) {
3968
- const o = Oe(), [s, i] = _(), a = o ? ar : Id;
3968
+ const Md = u.div`display:flex;flex-direction:column;gap:8px;align-items:flex-end;`, Od = u.div`background:${({ theme: e }) => e.colors.base.background};display:flex;overscroll-behavior:none;-webkit-overflow-scrolling:auto;height:640px;min-height:80px;width:400px;max-width:80vw;max-height:80vh;box-shadow:0px 16px 24px 2px rgba(33,33,33,0.12),0px 6px 30px 5px rgba(33,33,33,0.08),0px 6px 10px -5px rgba(33,33,33,0.04);border-radius:16px;overflow:hidden;transition:width 200ms ease 0s,height 200ms ease 0s,max-height 200ms ease 0s,transform 150ms cubic-bezier(0,1.2,1,1) 0s,opacity 83ms ease-out 0s;transform:scale(0.15);opacity:0;transform-origin:right bottom;[dir='rtl'] &:not([dir='ltr']),&[dir='rtl']{transform-origin:left bottom;}${({ $isOpened: e }) => e && Rd};${({ $isExpanded: e }) => e && Ld};`, Ld = I`width:743px;height:723px;`, Rd = I`z-index:${fe.WINDOW};pointer-events:all;transform:scale(1);opacity:1;transition:width 200ms ease 0s,height 200ms ease 0s,max-height 200ms ease 0s,transform 300ms cubic-bezier(0,1.2,1,1) 0s,opacity 83ms ease-out 0s;`, lu = ye(function({ children: e, ...t }, n) {
3969
+ const o = Oe(), [s, i] = _(), a = o ? ar : $d;
3969
3970
  return /* @__PURE__ */ r.createElement(ir, { enableExpandButton: !o, ref: n, ...t }, /* @__PURE__ */ r.createElement(In, null, ({ state: l }) => /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement(a, { isExpanded: l.expanded, isOpened: l.opened, launcher: /* @__PURE__ */ r.createElement(dr, null) }, /* @__PURE__ */ r.createElement(
3970
3971
  gr,
3971
3972
  {
@@ -3974,7 +3975,7 @@ const $d = u.div`display:flex;flex-direction:column;gap:8px;align-items:flex-end
3974
3975
  }
3975
3976
  )), e)));
3976
3977
  }), {
3977
- Provider: Rd,
3978
+ Provider: Dd,
3978
3979
  useContext: Bt
3979
3980
  } = G("FixedMessengerStyle");
3980
3981
  function hr(e, t, n, o = 0) {
@@ -3998,15 +3999,15 @@ function hr(e, t, n, o = 0) {
3998
3999
  }
3999
4000
  return I`${c};${d};`;
4000
4001
  }
4001
- function Dd(e) {
4002
+ function Nd(e) {
4002
4003
  const { horizontal: t, vertical: n, margin: o, launcherSize: s } = Bt();
4003
- return /* @__PURE__ */ r.createElement(Nd, { ...e, size: s, $horizontal: t, $vertical: n, $margin: o });
4004
+ return /* @__PURE__ */ r.createElement(Pd, { ...e, size: s, $horizontal: t, $vertical: n, $margin: o });
4004
4005
  }
4005
- const Nd = u(dr)`position:fixed;z-index:${fe.LAUNCHER};${({ $horizontal: e, $vertical: t, $margin: n }) => hr(e, t, n)};`;
4006
- function Pd({ isExpanded: e, isOpened: t, children: n }) {
4006
+ const Pd = u(dr)`position:fixed;z-index:${fe.LAUNCHER};${({ $horizontal: e, $vertical: t, $margin: n }) => hr(e, t, n)};`;
4007
+ function Bd({ isExpanded: e, isOpened: t, children: n }) {
4007
4008
  const { dir: o } = B(), { horizontal: s, vertical: i, margin: a, launcherSize: l } = Bt();
4008
4009
  return /* @__PURE__ */ r.createElement(
4009
- Bd,
4010
+ Fd,
4010
4011
  {
4011
4012
  dir: o,
4012
4013
  id: ee.WINDOW,
@@ -4020,21 +4021,21 @@ function Pd({ isExpanded: e, isOpened: t, children: n }) {
4020
4021
  n
4021
4022
  );
4022
4023
  }
4023
- const Bd = u.div`background:${({ theme: e }) => e.colors.base.background};display:flex;overscroll-behavior:none;-webkit-overflow-scrolling:auto;position:fixed;${({ $horizontal: e, $vertical: t, $margin: n, $launcherSize: o }) => hr(e, t, n, o + 12)};height:640px;min-height:80px;width:400px;max-width:80vw;max-height:80vh;box-shadow:0px 16px 24px 2px rgba(33,33,33,0.12),0px 6px 30px 5px rgba(33,33,33,0.08),0px 6px 10px -5px rgba(33,33,33,0.04);border-radius:16px;overflow:hidden;transition:width 200ms ease 0s,height 200ms ease 0s,max-height 200ms ease 0s,transform 150ms cubic-bezier(0,1.2,1,1) 0s,opacity 83ms ease-out 0s;transform:scale(0.15);opacity:0;transform-origin:${({ $horizontal: e, $vertical: t }) => `${e === "start" ? "left" : "right"} ${t}`};
4024
+ const Fd = u.div`background:${({ theme: e }) => e.colors.base.background};display:flex;overscroll-behavior:none;-webkit-overflow-scrolling:auto;position:fixed;${({ $horizontal: e, $vertical: t, $margin: n, $launcherSize: o }) => hr(e, t, n, o + 12)};height:640px;min-height:80px;width:400px;max-width:80vw;max-height:80vh;box-shadow:0px 16px 24px 2px rgba(33,33,33,0.12),0px 6px 30px 5px rgba(33,33,33,0.08),0px 6px 10px -5px rgba(33,33,33,0.04);border-radius:16px;overflow:hidden;transition:width 200ms ease 0s,height 200ms ease 0s,max-height 200ms ease 0s,transform 150ms cubic-bezier(0,1.2,1,1) 0s,opacity 83ms ease-out 0s;transform:scale(0.15);opacity:0;transform-origin:${({ $horizontal: e, $vertical: t }) => `${e === "start" ? "left" : "right"} ${t}`};
4024
4025
  [dir='rtl'] &:not([dir='ltr']),
4025
4026
  &[dir='rtl'] {
4026
4027
  transform-origin: ${({ $horizontal: e, $vertical: t }) => `${e === "start" ? "right" : "left"} ${t}`};
4027
4028
  }
4028
4029
 
4029
- ${({ $isOpened: e }) => e && Ud};
4030
- ${({ $isExpanded: e }) => e && Fd};
4031
- `, Fd = I`width:743px;height:723px;`, Ud = I`z-index:${fe.WINDOW};pointer-events:all;transform:scale(1);opacity:1;transition:width 200ms ease 0s,height 200ms ease 0s,max-height 200ms ease 0s,transform 300ms cubic-bezier(0,1.2,1,1) 0s,opacity 83ms ease-out 0s;`, pr = { top: 24, bottom: 24, start: 24, end: 24 }, Hd = ye(function({ children: e, ...t }, n) {
4032
- const [o, s] = _(), [i, a] = _("end-bottom"), [l, c] = _(pr), [d, h] = _(48), m = Oe(), f = m ? ar : Pd, { horizontal: x, vertical: E } = ae(() => {
4030
+ ${({ $isOpened: e }) => e && Hd};
4031
+ ${({ $isExpanded: e }) => e && Ud};
4032
+ `, Ud = I`width:743px;height:723px;`, Hd = I`z-index:${fe.WINDOW};pointer-events:all;transform:scale(1);opacity:1;transition:width 200ms ease 0s,height 200ms ease 0s,max-height 200ms ease 0s,transform 300ms cubic-bezier(0,1.2,1,1) 0s,opacity 83ms ease-out 0s;`, pr = { top: 24, bottom: 24, start: 24, end: 24 }, zd = ye(function({ children: e, ...t }, n) {
4033
+ const [o, s] = _(), [i, a] = _("end-bottom"), [l, c] = _(pr), [d, h] = _(48), m = Oe(), f = m ? ar : Bd, { horizontal: x, vertical: E } = ae(() => {
4033
4034
  const [b, g] = i.split("-");
4034
4035
  return { horizontal: b === "start" ? "start" : "end", vertical: g === "top" ? "top" : "bottom" };
4035
4036
  }, [i]);
4036
4037
  return /* @__PURE__ */ r.createElement(ir, { enableExpandButton: !m, ref: n, ...t }, /* @__PURE__ */ r.createElement(In, null, ({ state: b }) => /* @__PURE__ */ r.createElement(
4037
- Rd,
4038
+ Dd,
4038
4039
  {
4039
4040
  value: { horizontal: x, vertical: E, margin: l, launcherSize: d, setPosition: a, setMargin: c, setLauncherSize: h }
4040
4041
  },
@@ -4045,10 +4046,10 @@ const Bd = u.div`background:${({ theme: e }) => e.colors.base.background};displa
4045
4046
  setClosedChannelUrl: s
4046
4047
  }
4047
4048
  )),
4048
- /* @__PURE__ */ r.createElement(Dd, null),
4049
+ /* @__PURE__ */ r.createElement(Nd, null),
4049
4050
  e
4050
4051
  )));
4051
- }), zd = (e) => {
4052
+ }), Vd = (e) => {
4052
4053
  var s, i, a, l;
4053
4054
  const { setPosition: t, setMargin: n, setLauncherSize: o } = Bt();
4054
4055
  return le(() => {
@@ -4061,43 +4062,43 @@ const Bd = u.div`background:${({ theme: e }) => e.colors.base.background};displa
4061
4062
  (l = e.margin) == null ? void 0 : l.end,
4062
4063
  e.launcherSize
4063
4064
  ]), null;
4064
- }, lu = Object.assign(Hd, {
4065
- Style: zd
4065
+ }, cu = Object.assign(zd, {
4066
+ Style: Vd
4066
4067
  });
4067
4068
  export {
4068
4069
  St as A,
4069
- ro as C,
4070
- au as D,
4071
- lu as F,
4070
+ oo as C,
4071
+ lu as D,
4072
+ cu as F,
4072
4073
  M as I,
4073
4074
  Hn as L,
4074
- La as M,
4075
+ Ra as M,
4075
4076
  Ot as O,
4076
- su as P,
4077
+ iu as P,
4077
4078
  Lt as S,
4078
4079
  w as a,
4079
4080
  ir as b,
4080
4081
  p as c,
4081
- ad as d,
4082
+ ld as d,
4082
4083
  U as e,
4083
4084
  O as f,
4084
- md as g,
4085
+ gd as g,
4085
4086
  xe as h,
4086
4087
  X as i,
4087
4088
  sr as j,
4088
4089
  pn as k,
4089
4090
  Nt as l,
4090
- ld as m,
4091
- ou as n,
4092
- nl as o,
4091
+ cd as m,
4092
+ su as n,
4093
+ rl as o,
4093
4094
  Z as p,
4094
- Qc as q,
4095
+ ed as q,
4095
4096
  Pt as r,
4096
- iu as s,
4097
- Pc as t,
4097
+ au as s,
4098
+ Bc as t,
4098
4099
  B as u,
4099
4100
  or as v,
4100
4101
  Sn as w,
4101
- Io as x,
4102
+ $o as x,
4102
4103
  Zt as y
4103
4104
  };