@linktr.ee/messaging-react 3.9.1-rc-1783580497 → 3.9.1-rc-1783580772

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/dist/{Card-B54RRcbp.js → Card-BLLADEC_.js} +3 -3
  2. package/dist/{Card-B54RRcbp.js.map → Card-BLLADEC_.js.map} +1 -1
  3. package/dist/{Card-B8f6KX7F.cjs → Card-BMau-mI5.cjs} +2 -2
  4. package/dist/{Card-B8f6KX7F.cjs.map → Card-BMau-mI5.cjs.map} +1 -1
  5. package/dist/{Card-BPBVesM6.cjs → Card-C3rbCPM7.cjs} +2 -2
  6. package/dist/{Card-BPBVesM6.cjs.map → Card-C3rbCPM7.cjs.map} +1 -1
  7. package/dist/{Card-DKBW4iY7.js → Card-D3QNullZ.js} +2 -2
  8. package/dist/{Card-DKBW4iY7.js.map → Card-D3QNullZ.js.map} +1 -1
  9. package/dist/{Card-VmLMt6vQ.js → Card-Dau41drB.js} +2 -2
  10. package/dist/{Card-VmLMt6vQ.js.map → Card-Dau41drB.js.map} +1 -1
  11. package/dist/{Card-S1VJxeZ_.cjs → Card-MJ0x2roP.cjs} +2 -2
  12. package/dist/{Card-S1VJxeZ_.cjs.map → Card-MJ0x2roP.cjs.map} +1 -1
  13. package/dist/{LockedThumbnail-z7Xnw4K_.js → LockedThumbnail-Bq54AT8J.js} +2 -2
  14. package/dist/{LockedThumbnail-z7Xnw4K_.js.map → LockedThumbnail-Bq54AT8J.js.map} +1 -1
  15. package/dist/{LockedThumbnail-BMqj203z.cjs → LockedThumbnail-a03GYGJz.cjs} +2 -2
  16. package/dist/{LockedThumbnail-BMqj203z.cjs.map → LockedThumbnail-a03GYGJz.cjs.map} +1 -1
  17. package/dist/{index-CD2uC47U.js → index-CBm9au-T.js} +1195 -1171
  18. package/dist/index-CBm9au-T.js.map +1 -0
  19. package/dist/index-CWopIWxB.cjs +2 -0
  20. package/dist/index-CWopIWxB.cjs.map +1 -0
  21. package/dist/index.cjs +1 -1
  22. package/dist/index.js +1 -1
  23. package/package.json +2 -2
  24. package/src/components/ChannelHeaderRedesign.tsx +8 -1
  25. package/src/components/ChannelView.tsx +12 -9
  26. package/src/components/CustomMessage/SentMessageDeliveryStatus.test.tsx +11 -29
  27. package/src/components/CustomMessage/SentMessageDeliveryStatus.tsx +27 -19
  28. package/src/components/CustomMessage/StreamAttachmentMessage.stories.tsx +19 -12
  29. package/src/components/CustomMessage/StreamAttachmentMessage.test.tsx +44 -26
  30. package/src/components/CustomMessage/StreamAttachmentMessage.tsx +37 -43
  31. package/src/components/CustomMessage/index.tsx +13 -21
  32. package/dist/index-CD2uC47U.js.map +0 -1
  33. package/dist/index-OfsiVKqy.cjs +0 -2
  34. package/dist/index-OfsiVKqy.cjs.map +0 -1
@@ -1,12 +1,12 @@
1
- import { jsx as s, jsxs as m, Fragment as ee } from "react/jsx-runtime";
2
- import V, { createContext as rt, useContext as Ie, useCallback as Z, useState as U, useRef as G, useEffect as J, useId as Gs, useMemo as ae, Suspense as it } from "react";
1
+ import { jsx as s, jsxs as u, Fragment as te } from "react/jsx-runtime";
2
+ import V, { createContext as lt, useContext as Ie, useCallback as Z, useState as U, useRef as G, useEffect as J, useId as Gs, useMemo as se, Suspense as ot } from "react";
3
3
  import { StreamChatService as Hs } from "@linktr.ee/messaging-core";
4
- import { StreamChat as Ys, LinkPreviewsManager as Yt } from "stream-chat";
5
- import { Chat as qs, useChannelStateContext as le, useChatContext as me, DateSeparator as Ws, MessageStatus as Xs, useMessageContext as _e, areMessageUIPropsEqual as Ks, useMessageReminder as Js, useComponentContext as is, Attachment as Zs, EditMessageModal as Qs, MessageBlocked as en, MessageBouncePrompt as tn, MessageDeleted as sn, MessageIsThreadReplyInChannelButtonIndicator as nn, MessageRepliesCountButton as an, ReminderNotification as rn, StreamedMessageText as ln, messageHasAttachments as on, messageHasReactions as cn, isDateSeparatorMessage as dn, isMessageBlocked as un, isMessageBounced as mn, MessageBounceModal as hn, MessageText as qt, MessageErrorIcon as Wt, Poll as fn, useMessageComposer as gn, useStateStore as pn, MessageInput as bn, useMessageInputContext as vn, useMessageComposerHasSendableData as xn, AttachmentPreviewList as wn, QuotedMessagePreview as _n, TextareaComposer as Nn, MessageTimestamp as Ye, AIStates as qe, useTypingContext as yn, useAIState as kn, Channel as Cn, WithComponents as Sn, Window as En, MessageList as In, ChannelList as Tn, InfiniteScroll as An } from "stream-chat-react";
6
- import { StarIcon as Ee, DotsThreeIcon as Mn, SpinnerGapIcon as ze, SignOutIcon as Rn, ProhibitInsetIcon as Xt, FlagIcon as ls, ArrowLeftIcon as et, CurrencyDollarIcon as Ln, CaretRightIcon as ve, SparkleIcon as xe, FileIcon as os, ImageIcon as Dn, SpeakerHighIcon as zn, VideoCameraIcon as cs, FileMdIcon as Pn, FileTextIcon as Fn, FileZipIcon as On, FilePptIcon as $n, FileCsvIcon as Bn, FileXlsIcon as Un, FileDocIcon as jn, FilePdfIcon as Vn, CircleNotchIcon as Ce, PlayIcon as tt, PauseIcon as Gn, LinkIcon as Hn, DownloadSimpleIcon as Se, XIcon as Ue, CaretLeftIcon as Yn, GiftIcon as qn, ThumbsUpIcon as Wn, ThumbsDownIcon as Xn, ChecksIcon as Kn, PencilSimpleIcon as Jn, TrashSimpleIcon as Zn, ArrowUpIcon as Qn, ProhibitIcon as ea } from "@phosphor-icons/react";
4
+ import { StreamChat as Ys, LinkPreviewsManager as Wt } from "stream-chat";
5
+ import { Chat as qs, useChannelStateContext as le, useChatContext as oe, DateSeparator as Ws, MessageStatus as Xs, useMessageContext as _e, MessageErrorIcon as et, MessageText as tt, areMessageUIPropsEqual as Ks, useMessageReminder as Js, useComponentContext as is, Attachment as Zs, EditMessageModal as Qs, MessageBlocked as en, MessageBouncePrompt as tn, MessageDeleted as sn, MessageIsThreadReplyInChannelButtonIndicator as nn, MessageRepliesCountButton as an, ReminderNotification as rn, StreamedMessageText as ln, messageHasAttachments as on, messageHasReactions as cn, isDateSeparatorMessage as dn, isMessageBlocked as un, isMessageBounced as mn, MessageBounceModal as hn, Poll as fn, useMessageComposer as gn, useStateStore as pn, MessageInput as bn, useMessageInputContext as vn, useMessageComposerHasSendableData as xn, AttachmentPreviewList as wn, QuotedMessagePreview as _n, TextareaComposer as Nn, MessageTimestamp as Ye, AIStates as qe, useTypingContext as yn, useAIState as kn, Channel as Cn, WithComponents as Sn, Window as En, MessageList as In, ChannelList as Tn, InfiniteScroll as An } from "stream-chat-react";
6
+ import { StarIcon as Ee, DotsThreeIcon as Mn, SpinnerGapIcon as ze, SignOutIcon as Rn, ProhibitInsetIcon as Xt, FlagIcon as ls, ArrowLeftIcon as st, CurrencyDollarIcon as Dn, CaretRightIcon as ve, SparkleIcon as xe, FileIcon as os, ImageIcon as Ln, SpeakerHighIcon as zn, VideoCameraIcon as cs, FileMdIcon as Pn, FileTextIcon as Fn, FileZipIcon as On, FilePptIcon as $n, FileCsvIcon as Bn, FileXlsIcon as Un, FileDocIcon as jn, FilePdfIcon as Vn, CircleNotchIcon as Ce, PlayIcon as nt, PauseIcon as Gn, LinkIcon as Hn, DownloadSimpleIcon as Se, XIcon as Ue, CaretLeftIcon as Yn, GiftIcon as qn, ThumbsUpIcon as Wn, ThumbsDownIcon as Xn, ChecksIcon as Kn, PencilSimpleIcon as Jn, TrashSimpleIcon as Zn, ArrowUpIcon as Qn, ProhibitIcon as ea } from "@phosphor-icons/react";
7
7
  import k from "classnames";
8
8
  import { MessageActions as ta, DefaultDropdownActionButton as ds } from "stream-chat-react/experimental";
9
- const us = rt({
9
+ const us = lt({
10
10
  service: null,
11
11
  client: null,
12
12
  isConnected: !1,
@@ -16,7 +16,7 @@ const us = rt({
16
16
  refreshConnection: async () => {
17
17
  },
18
18
  debug: !1
19
- }), lt = () => Ie(us), dl = ({
19
+ }), ct = () => Ie(us), ll = ({
20
20
  children: e,
21
21
  user: t,
22
22
  serviceConfig: n,
@@ -25,10 +25,10 @@ const us = rt({
25
25
  debug: i = !1,
26
26
  client: o
27
27
  }) => {
28
- var S, R;
28
+ var I, M;
29
29
  const l = Z(
30
- (E, ...z) => {
31
- i && console.log(`🔥 [MessagingProvider] ${E}`, ...z);
30
+ (T, ...z) => {
31
+ i && console.log(`🔥 [MessagingProvider] ${T}`, ...z);
32
32
  },
33
33
  [i]
34
34
  );
@@ -38,71 +38,71 @@ const us = rt({
38
38
  serviceConfig: !!n,
39
39
  capabilities: Object.keys(r)
40
40
  });
41
- const [d, u] = U(null), [p, h] = U(null), [f, c] = U(!1), [v, w] = U(!1), [b, g] = U(null), x = G(!1), N = G(null), C = G(n);
41
+ const [d, m] = U(null), [p, h] = U(null), [g, c] = U(!1), [b, x] = U(!1), [v, f] = U(null), N = G(!1), w = G(null), C = G(n);
42
42
  C.current = n;
43
- const T = G(i);
44
- T.current = i;
45
- const A = G({
43
+ const R = G(i);
44
+ R.current = i;
45
+ const S = G({
46
46
  userId: t == null ? void 0 : t.id,
47
47
  apiKey: a,
48
48
  serviceConfig: n,
49
49
  capabilities: r
50
- }), L = G(0);
51
- L.current++, l("📊 RENDER INFO", {
52
- renderCount: L.current,
50
+ }), D = G(0);
51
+ D.current++, l("📊 RENDER INFO", {
52
+ renderCount: D.current,
53
53
  currentProps: { userId: t == null ? void 0 : t.id, apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..." },
54
54
  propChanges: {
55
- userChanged: A.current.userId !== (t == null ? void 0 : t.id),
56
- apiKeyChanged: A.current.apiKey !== a,
57
- serviceConfigChanged: A.current.serviceConfig !== n,
58
- capabilitiesChanged: A.current.capabilities !== r
55
+ userChanged: S.current.userId !== (t == null ? void 0 : t.id),
56
+ apiKeyChanged: S.current.apiKey !== a,
57
+ serviceConfigChanged: S.current.serviceConfig !== n,
58
+ capabilitiesChanged: S.current.capabilities !== r
59
59
  }
60
- }), A.current = {
60
+ }), S.current = {
61
61
  userId: t == null ? void 0 : t.id,
62
62
  apiKey: a,
63
63
  serviceConfig: n,
64
64
  capabilities: r
65
65
  };
66
66
  const $ = G(null);
67
- !o && a && ((S = $.current) == null ? void 0 : S.apiKey) !== a && ($.current = { apiKey: a, client: new Ys(a) });
68
- const F = o || (a ? ((R = $.current) == null ? void 0 : R.client) ?? null : null);
67
+ !o && a && ((I = $.current) == null ? void 0 : I.apiKey) !== a && ($.current = { apiKey: a, client: new Ys(a) });
68
+ const F = o || (a ? ((M = $.current) == null ? void 0 : M.client) ?? null : null);
69
69
  J(() => {
70
- const E = L.current, z = C.current;
70
+ const T = D.current, z = C.current;
71
71
  if (o) {
72
- N.current = null, u(null), h(null), c(!1), g(null), w(!1);
72
+ w.current = null, m(null), h(null), c(!1), f(null), x(!1);
73
73
  return;
74
74
  }
75
75
  if (!a || !F || !z) {
76
76
  l("⚠️ SERVICE INIT SKIPPED", {
77
- renderCount: E,
77
+ renderCount: T,
78
78
  reason: "Missing apiKey, client, or serviceConfig"
79
79
  });
80
80
  return;
81
81
  }
82
82
  l("🚀 CREATING SERVICE", {
83
- renderCount: E,
83
+ renderCount: T,
84
84
  apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..."
85
85
  });
86
86
  const O = new Hs({
87
87
  ...z,
88
88
  apiKey: a,
89
- debug: T.current,
89
+ debug: R.current,
90
90
  client: F
91
91
  });
92
- N.current = O, u(O), l("✅ SERVICE SET", {
93
- renderCount: E,
92
+ w.current = O, m(O), l("✅ SERVICE SET", {
93
+ renderCount: T,
94
94
  serviceInstance: !!O
95
95
  });
96
96
  }, [a, F, o]);
97
- const D = G(null);
97
+ const L = G(null);
98
98
  J(() => {
99
99
  var z, O;
100
100
  if (l("🔗 USER CONNECTION EFFECT TRIGGERED", {
101
101
  hasService: !!d,
102
102
  hasUser: !!t,
103
103
  userId: t == null ? void 0 : t.id,
104
- isConnecting: x.current,
105
- isConnected: f,
104
+ isConnecting: N.current,
105
+ isConnected: g,
106
106
  dependencies: { service: !!d, userId: t == null ? void 0 : t.id }
107
107
  }), o)
108
108
  return;
@@ -110,11 +110,11 @@ const us = rt({
110
110
  l("⚠️ USER CONNECTION SKIPPED", "Missing service or user");
111
111
  return;
112
112
  }
113
- if (x.current) {
113
+ if (N.current) {
114
114
  l("⚠️ USER CONNECTION SKIPPED", "Already connecting");
115
115
  return;
116
116
  }
117
- if (((z = D.current) == null ? void 0 : z.serviceId) === d && ((O = D.current) == null ? void 0 : O.userId) === t.id) {
117
+ if (((z = L.current) == null ? void 0 : z.serviceId) === d && ((O = L.current) == null ? void 0 : O.userId) === t.id) {
118
118
  l(
119
119
  "⚠️ USER CONNECTION SKIPPED",
120
120
  "Already connected this user with this service"
@@ -122,32 +122,32 @@ const us = rt({
122
122
  return;
123
123
  }
124
124
  (async () => {
125
- l("🚀 STARTING USER CONNECTION", { userId: t.id }), x.current = !0, w(!0), g(null);
125
+ l("🚀 STARTING USER CONNECTION", { userId: t.id }), N.current = !0, x(!0), f(null);
126
126
  try {
127
127
  l("📞 CALLING SERVICE.CONNECTUSER", { userId: t.id });
128
128
  const j = await d.connectUser(t);
129
- h(j), c(!0), D.current = { serviceId: d, userId: t.id }, l("✅ USER CONNECTION SUCCESS", {
129
+ h(j), c(!0), L.current = { serviceId: d, userId: t.id }, l("✅ USER CONNECTION SUCCESS", {
130
130
  userId: t.id,
131
131
  clientId: j.userID
132
132
  });
133
133
  } catch (j) {
134
134
  const X = j instanceof Error ? j.message : "Connection failed";
135
- g(X), l("❌ USER CONNECTION ERROR", {
135
+ f(X), l("❌ USER CONNECTION ERROR", {
136
136
  userId: t.id,
137
137
  error: X
138
138
  });
139
139
  } finally {
140
- w(!1), x.current = !1, l("🔄 USER CONNECTION FINISHED", {
140
+ x(!1), N.current = !1, l("🔄 USER CONNECTION FINISHED", {
141
141
  userId: t.id,
142
- isConnected: f
142
+ isConnected: g
143
143
  });
144
144
  }
145
145
  })();
146
- }, [d, t, l, f, o]), J(() => {
147
- const E = F;
146
+ }, [d, t, l, g, o]), J(() => {
147
+ const T = F;
148
148
  return () => {
149
149
  var z;
150
- E && (D.current = null, (z = N.current) == null || z.disconnectUser().catch(console.error));
150
+ T && (L.current = null, (z = w.current) == null || z.disconnectUser().catch(console.error));
151
151
  };
152
152
  }, [F]);
153
153
  const y = Z(async () => {
@@ -159,27 +159,27 @@ const us = rt({
159
159
  l("⚠️ REFRESH CONNECTION SKIPPED", "Missing service or user");
160
160
  return;
161
161
  }
162
- l("🚀 STARTING CONNECTION REFRESH", { userId: t.id }), w(!0);
162
+ l("🚀 STARTING CONNECTION REFRESH", { userId: t.id }), x(!0);
163
163
  try {
164
164
  l("🔌 DISCONNECTING FOR REFRESH"), await d.disconnectUser(), l("📞 RECONNECTING FOR REFRESH");
165
- const E = await d.connectUser(t);
166
- h(E), c(!0), g(null), l("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
167
- } catch (E) {
168
- const z = E instanceof Error ? E.message : "Refresh failed";
169
- g(z), l("❌ CONNECTION REFRESH ERROR", {
165
+ const T = await d.connectUser(t);
166
+ h(T), c(!0), f(null), l("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
167
+ } catch (T) {
168
+ const z = T instanceof Error ? T.message : "Refresh failed";
169
+ f(z), l("❌ CONNECTION REFRESH ERROR", {
170
170
  userId: t.id,
171
171
  error: z
172
172
  });
173
173
  } finally {
174
- w(!1), l("🔄 CONNECTION REFRESH FINISHED", { userId: t.id });
174
+ x(!1), l("🔄 CONNECTION REFRESH FINISHED", { userId: t.id });
175
175
  }
176
176
  }
177
- }, [d, t, l, o]), I = V.useMemo(() => (l("💫 CONTEXT VALUE MEMOIZATION", {
177
+ }, [d, t, l, o]), E = V.useMemo(() => (l("💫 CONTEXT VALUE MEMOIZATION", {
178
178
  hasService: !!d,
179
179
  hasClient: !!p,
180
- isConnected: f,
181
- isLoading: v,
182
- hasError: !!b,
180
+ isConnected: g,
181
+ isLoading: b,
182
+ hasError: !!v,
183
183
  capabilitiesKeys: Object.keys(r)
184
184
  }), {
185
185
  // With an injected client, expose no service — the injected client owns
@@ -192,9 +192,9 @@ const us = rt({
192
192
  // path's `client`/`isLoading`/`error` (from connectUser) must not leak
193
193
  // through if the same provider previously attempted an apiKey connect.
194
194
  client: o ?? p,
195
- isConnected: o ? !0 : f,
196
- isLoading: o ? !1 : v,
197
- error: o ? null : b,
195
+ isConnected: o ? !0 : g,
196
+ isLoading: o ? !1 : b,
197
+ error: o ? null : v,
198
198
  capabilities: r,
199
199
  refreshConnection: y,
200
200
  debug: i
@@ -202,19 +202,19 @@ const us = rt({
202
202
  d,
203
203
  p,
204
204
  o,
205
- f,
206
- v,
205
+ g,
207
206
  b,
207
+ v,
208
208
  r,
209
209
  y,
210
210
  i,
211
211
  l
212
212
  ]);
213
213
  return l("🔄 RENDER END", {
214
- renderCount: L.current,
214
+ renderCount: D.current,
215
215
  willRenderChat: !!F,
216
- contextValueReady: !!I
217
- }), /* @__PURE__ */ s(us.Provider, { value: I, children: F ? /* @__PURE__ */ s(
216
+ contextValueReady: !!E
217
+ }), /* @__PURE__ */ s(us.Provider, { value: E, children: F ? /* @__PURE__ */ s(
218
218
  qs,
219
219
  {
220
220
  client: F,
@@ -224,7 +224,7 @@ const us = rt({
224
224
  children: e
225
225
  }
226
226
  ) : e });
227
- }, sa = () => lt(), ot = (e) => {
227
+ }, sa = () => ct(), dt = (e) => {
228
228
  var a, r;
229
229
  const [t, n] = U(
230
230
  !!((r = (a = e == null ? void 0 : e.state) == null ? void 0 : a.membership) != null && r.pinned_at)
@@ -273,7 +273,7 @@ function Kt(e, t) {
273
273
  const n = e == null ? void 0 : e.trim();
274
274
  return !n || t && n === t ? !1 : !ia(n);
275
275
  }
276
- function ct(e) {
276
+ function ut(e) {
277
277
  return Kt(e == null ? void 0 : e.name, e == null ? void 0 : e.id) ? e.name.trim() : Kt(e == null ? void 0 : e.username, e == null ? void 0 : e.id) ? e.username.trim() : "Unknown member";
278
278
  }
279
279
  const Jt = [
@@ -321,7 +321,7 @@ function oa(e) {
321
321
  function ca(e) {
322
322
  return ms(e).bgColor;
323
323
  }
324
- const se = ({
324
+ const ne = ({
325
325
  id: e,
326
326
  image: t,
327
327
  size: n = 40,
@@ -330,7 +330,7 @@ const se = ({
330
330
  shape: i = "squircle",
331
331
  dmAgentEnabled: o = !1
332
332
  }) => {
333
- const l = oa(e), d = ca(e), u = 0.45, h = n < 32 ? Math.round(n * u) : n < 56 ? 14 : n < 120 ? 18 : 36, f = n >= 40 ? 2 : 1, c = i === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, v = /* @__PURE__ */ s("div", { className: "h-full w-full overflow-hidden", style: c, children: t ? /* @__PURE__ */ s(
333
+ const l = oa(e), d = ca(e), m = 0.45, h = n < 32 ? Math.round(n * m) : n < 56 ? 14 : n < 120 ? 18 : 36, g = n >= 40 ? 2 : 1, c = i === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, b = /* @__PURE__ */ s("div", { className: "h-full w-full overflow-hidden", style: c, children: t ? /* @__PURE__ */ s(
334
334
  "img",
335
335
  {
336
336
  src: t,
@@ -348,7 +348,7 @@ const se = ({
348
348
  children: l
349
349
  }
350
350
  ) });
351
- return /* @__PURE__ */ m(
351
+ return /* @__PURE__ */ u(
352
352
  "div",
353
353
  {
354
354
  className: k(
@@ -382,13 +382,13 @@ const se = ({
382
382
  style: {
383
383
  ...c,
384
384
  ...o && {
385
- borderWidth: `${f}px`,
385
+ borderWidth: `${g}px`,
386
386
  borderStyle: "solid",
387
387
  borderColor: "var(--AI-Gradient, #7F22FE)",
388
388
  boxShadow: "inset 0 1px 2px 0 rgba(255, 255, 255, 0.5)"
389
389
  }
390
390
  },
391
- children: v
391
+ children: b
392
392
  }
393
393
  )
394
394
  ]
@@ -404,81 +404,81 @@ const se = ({
404
404
  onDeleteConversationClick: o,
405
405
  onBlockParticipantClick: l,
406
406
  onReportParticipantClick: d,
407
- onActionComplete: u,
407
+ onActionComplete: m,
408
408
  logLabel: p = "useChannelModerationActions"
409
409
  }) => {
410
- var I;
411
- const { service: h, debug: f } = lt(), c = (I = t == null ? void 0 : t.user) == null ? void 0 : I.id, v = !!(a && n && h && c), [w, b] = U(!1), [g, x] = U(null), [N, C] = U(!1), [T, A] = U(!1), L = v && ((g == null ? void 0 : g.participantId) !== c || (g == null ? void 0 : g.service) !== h);
410
+ var E;
411
+ const { service: h, debug: g } = ct(), c = (E = t == null ? void 0 : t.user) == null ? void 0 : E.id, b = !!(a && n && h && c), [x, v] = U(!1), [f, N] = U(null), [w, C] = U(!1), [R, S] = U(!1), D = b && ((f == null ? void 0 : f.participantId) !== c || (f == null ? void 0 : f.service) !== h);
412
412
  return J(() => {
413
- if (!v || !h || !c) {
414
- b(!1), x(null);
413
+ if (!b || !h || !c) {
414
+ v(!1), N(null);
415
415
  return;
416
416
  }
417
- let S = !1;
417
+ let I = !1;
418
418
  return (async () => {
419
419
  try {
420
- const R = await h.getBlockedUsers();
421
- if (S) return;
422
- b(
423
- R.some(
424
- (E) => E.blocked_user_id === c
420
+ const M = await h.getBlockedUsers();
421
+ if (I) return;
422
+ v(
423
+ M.some(
424
+ (T) => T.blocked_user_id === c
425
425
  )
426
426
  );
427
- } catch (R) {
428
- S || console.error(`[${p}] Failed to check blocked status:`, R);
427
+ } catch (M) {
428
+ I || console.error(`[${p}] Failed to check blocked status:`, M);
429
429
  } finally {
430
- S || x({ participantId: c, service: h });
430
+ I || N({ participantId: c, service: h });
431
431
  }
432
432
  })(), () => {
433
- S = !0;
433
+ I = !0;
434
434
  };
435
- }, [v, h, c, p]), {
436
- isParticipantBlocked: w,
437
- isCheckingBlockedStatus: L,
438
- isLeaving: N,
439
- isUpdatingBlockStatus: T,
435
+ }, [b, h, c, p]), {
436
+ isParticipantBlocked: x,
437
+ isCheckingBlockedStatus: D,
438
+ isLeaving: w,
439
+ isUpdatingBlockStatus: R,
440
440
  handleLeaveConversation: async () => {
441
- var S;
442
- if (!N) {
443
- o == null || o(), f && console.log(`[${p}] Leave conversation`, e.cid), C(!0);
441
+ var I;
442
+ if (!w) {
443
+ o == null || o(), g && console.log(`[${p}] Leave conversation`, e.cid), C(!0);
444
444
  try {
445
- const R = ((S = e._client) == null ? void 0 : S.userID) ?? null;
446
- await e.hide(R, !1), r && await r(e), u == null || u();
447
- } catch (R) {
448
- console.error(`[${p}] Failed to leave conversation`, R);
445
+ const M = ((I = e._client) == null ? void 0 : I.userID) ?? null;
446
+ await e.hide(M, !1), r && await r(e), m == null || m();
447
+ } catch (M) {
448
+ console.error(`[${p}] Failed to leave conversation`, M);
449
449
  } finally {
450
450
  C(!1);
451
451
  }
452
452
  }
453
453
  },
454
454
  handleBlockUser: async () => {
455
- var S, R, E;
456
- if (!(T || !h)) {
457
- l == null || l(), f && console.log(`[${p}] Block member`, (S = t == null ? void 0 : t.user) == null ? void 0 : S.id), A(!0);
455
+ var I, M, T;
456
+ if (!(R || !h)) {
457
+ l == null || l(), g && console.log(`[${p}] Block member`, (I = t == null ? void 0 : t.user) == null ? void 0 : I.id), S(!0);
458
458
  try {
459
- await h.blockUser((R = t == null ? void 0 : t.user) == null ? void 0 : R.id), i && await i((E = t == null ? void 0 : t.user) == null ? void 0 : E.id), u == null || u();
459
+ await h.blockUser((M = t == null ? void 0 : t.user) == null ? void 0 : M.id), i && await i((T = t == null ? void 0 : t.user) == null ? void 0 : T.id), m == null || m();
460
460
  } catch (z) {
461
461
  console.error(`[${p}] Failed to block member`, z);
462
462
  } finally {
463
- A(!1);
463
+ S(!1);
464
464
  }
465
465
  }
466
466
  },
467
467
  handleUnblockUser: async () => {
468
- var S, R, E;
469
- if (!(T || !h)) {
470
- l == null || l(), f && console.log(`[${p}] Unblock member`, (S = t == null ? void 0 : t.user) == null ? void 0 : S.id), A(!0);
468
+ var I, M, T;
469
+ if (!(R || !h)) {
470
+ l == null || l(), g && console.log(`[${p}] Unblock member`, (I = t == null ? void 0 : t.user) == null ? void 0 : I.id), S(!0);
471
471
  try {
472
- await h.unBlockUser((R = t == null ? void 0 : t.user) == null ? void 0 : R.id), i && await i((E = t == null ? void 0 : t.user) == null ? void 0 : E.id), u == null || u();
472
+ await h.unBlockUser((M = t == null ? void 0 : t.user) == null ? void 0 : M.id), i && await i((T = t == null ? void 0 : t.user) == null ? void 0 : T.id), m == null || m();
473
473
  } catch (z) {
474
474
  console.error(`[${p}] Failed to unblock member`, z);
475
475
  } finally {
476
- A(!1);
476
+ S(!1);
477
477
  }
478
478
  }
479
479
  },
480
480
  handleReportUser: () => {
481
- d == null || d(), u == null || u(), window.open(da, "_blank", "noopener,noreferrer");
481
+ d == null || d(), m == null || m(), window.open(da, "_blank", "noopener,noreferrer");
482
482
  }
483
483
  };
484
484
  }, Ne = ({
@@ -498,7 +498,7 @@ const se = ({
498
498
  ...a,
499
499
  children: n
500
500
  }
501
- ), st = ({
501
+ ), at = ({
502
502
  channel: e,
503
503
  participant: t,
504
504
  showDeleteConversation: n = !0,
@@ -508,91 +508,91 @@ const se = ({
508
508
  onBlockParticipant: o,
509
509
  onDeleteConversationClick: l,
510
510
  onBlockParticipantClick: d,
511
- onReportParticipantClick: u,
511
+ onReportParticipantClick: m,
512
512
  customChannelActions: p,
513
513
  triggerClassName: h
514
514
  }) => {
515
- const [f, c] = U(!1), v = G(null), w = Gs(), b = Z(() => c(!1), []), {
516
- isParticipantBlocked: g,
517
- isCheckingBlockedStatus: x,
518
- isLeaving: N,
515
+ const [g, c] = U(!1), b = G(null), x = Gs(), v = Z(() => c(!1), []), {
516
+ isParticipantBlocked: f,
517
+ isCheckingBlockedStatus: N,
518
+ isLeaving: w,
519
519
  isUpdatingBlockStatus: C,
520
- handleLeaveConversation: T,
521
- handleBlockUser: A,
522
- handleUnblockUser: L,
520
+ handleLeaveConversation: R,
521
+ handleBlockUser: S,
522
+ handleUnblockUser: D,
523
523
  handleReportUser: $
524
524
  } = ua({
525
525
  channel: e,
526
526
  participant: t,
527
527
  showBlockParticipant: a,
528
- enabled: f,
528
+ enabled: g,
529
529
  onLeaveConversation: i,
530
530
  onBlockParticipant: o,
531
531
  onDeleteConversationClick: l,
532
532
  onBlockParticipantClick: d,
533
- onReportParticipantClick: u,
534
- onActionComplete: b,
533
+ onReportParticipantClick: m,
534
+ onActionComplete: v,
535
535
  logLabel: "ChannelActionsMenu"
536
536
  });
537
537
  return J(() => {
538
- if (!f) return;
539
- const D = (I) => {
540
- v.current && !v.current.contains(I.target) && c(!1);
541
- }, y = (I) => {
542
- I.key === "Escape" && c(!1);
538
+ if (!g) return;
539
+ const L = (E) => {
540
+ b.current && !b.current.contains(E.target) && c(!1);
541
+ }, y = (E) => {
542
+ E.key === "Escape" && c(!1);
543
543
  };
544
- return document.addEventListener("mousedown", D), document.addEventListener("keydown", y), () => {
545
- document.removeEventListener("mousedown", D), document.removeEventListener("keydown", y);
544
+ return document.addEventListener("mousedown", L), document.addEventListener("keydown", y), () => {
545
+ document.removeEventListener("mousedown", L), document.removeEventListener("keydown", y);
546
546
  };
547
- }, [f]), !t || !(n || a || r || !!p) ? null : /* @__PURE__ */ m("div", { ref: v, className: "relative", children: [
548
- /* @__PURE__ */ m(
547
+ }, [g]), !t || !(n || a || r || !!p) ? null : /* @__PURE__ */ u("div", { ref: b, className: "relative", children: [
548
+ /* @__PURE__ */ u(
549
549
  "button",
550
550
  {
551
551
  className: h,
552
552
  type: "button",
553
553
  "aria-haspopup": "true",
554
- "aria-expanded": f,
555
- "aria-controls": f ? w : void 0,
556
- onClick: () => c((D) => !D),
554
+ "aria-expanded": g,
555
+ "aria-controls": g ? x : void 0,
556
+ onClick: () => c((L) => !L),
557
557
  children: [
558
558
  /* @__PURE__ */ s(Mn, { className: "size-5 text-black/90" }),
559
559
  /* @__PURE__ */ s("span", { className: "sr-only", children: "More options" })
560
560
  ]
561
561
  }
562
562
  ),
563
- f && /* @__PURE__ */ s(
563
+ g && /* @__PURE__ */ s(
564
564
  "div",
565
565
  {
566
- id: w,
566
+ id: x,
567
567
  "aria-label": "Conversation options",
568
568
  className: k(
569
569
  "absolute right-0 top-full z-50 mt-2 w-56 overflow-hidden",
570
570
  "rounded-lg border border-sand bg-white p-1 shadow-max-elevation-light"
571
571
  ),
572
- children: /* @__PURE__ */ m("ul", { className: "flex flex-col gap-1", children: [
573
- n && /* @__PURE__ */ s("li", { children: /* @__PURE__ */ m(
572
+ children: /* @__PURE__ */ u("ul", { className: "flex flex-col gap-1", children: [
573
+ n && /* @__PURE__ */ s("li", { children: /* @__PURE__ */ u(
574
574
  Ne,
575
575
  {
576
- onClick: T,
577
- disabled: N,
578
- "aria-busy": N,
576
+ onClick: R,
577
+ disabled: w,
578
+ "aria-busy": w,
579
579
  children: [
580
- N ? /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Rn, { className: "h-5 w-5" }),
580
+ w ? /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Rn, { className: "h-5 w-5" }),
581
581
  /* @__PURE__ */ s("span", { children: "Delete Conversation" })
582
582
  ]
583
583
  }
584
584
  ) }),
585
- a && /* @__PURE__ */ s("li", { children: x ? (
585
+ a && /* @__PURE__ */ s("li", { children: N ? (
586
586
  // Block status not yet resolved — show a disabled placeholder
587
587
  // so a premature click can't act on a stale block state.
588
- /* @__PURE__ */ m(Ne, { disabled: !0, "aria-busy": !0, children: [
588
+ /* @__PURE__ */ u(Ne, { disabled: !0, "aria-busy": !0, children: [
589
589
  /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }),
590
590
  /* @__PURE__ */ s("span", { children: "Block" })
591
591
  ] })
592
- ) : g ? /* @__PURE__ */ m(
592
+ ) : f ? /* @__PURE__ */ u(
593
593
  Ne,
594
594
  {
595
- onClick: L,
595
+ onClick: D,
596
596
  disabled: C,
597
597
  "aria-busy": C,
598
598
  children: [
@@ -600,10 +600,10 @@ const se = ({
600
600
  /* @__PURE__ */ s("span", { children: "Unblock" })
601
601
  ]
602
602
  }
603
- ) : /* @__PURE__ */ m(
603
+ ) : /* @__PURE__ */ u(
604
604
  Ne,
605
605
  {
606
- onClick: A,
606
+ onClick: S,
607
607
  disabled: C,
608
608
  "aria-busy": C,
609
609
  children: [
@@ -612,7 +612,7 @@ const se = ({
612
612
  ]
613
613
  }
614
614
  ) }),
615
- r && /* @__PURE__ */ s("li", { children: /* @__PURE__ */ m(Ne, { variant: "danger", onClick: $, children: [
615
+ r && /* @__PURE__ */ s("li", { children: /* @__PURE__ */ u(Ne, { variant: "danger", onClick: $, children: [
616
616
  /* @__PURE__ */ s(ls, { className: "h-5 w-5" }),
617
617
  /* @__PURE__ */ s("span", { children: "Report" })
618
618
  ] }) }),
@@ -625,171 +625,181 @@ const se = ({
625
625
  const t = e;
626
626
  return [t == null ? void 0 : t.customerTag, t == null ? void 0 : t.customer_tag].some(fa);
627
627
  }, pa = ({
628
- onBack: e,
629
- showBackButton: t,
630
- showStarButton: n = !1,
631
- dmAgentEnabled: a = !1,
632
- onLeaveConversation: r,
633
- onBlockParticipant: i,
634
- showDeleteConversation: o = !0,
635
- showBlockParticipant: l = !0,
636
- showReportParticipant: d = !0,
637
- onDeleteConversationClick: u,
638
- onBlockParticipantClick: p,
639
- onReportParticipantClick: h,
640
- customChannelActions: f,
641
- renderChannelActions: c,
642
- showChannelInfo: v = !0,
643
- onParticipantNameClick: w
628
+ className: e,
629
+ onBack: t,
630
+ showBackButton: n,
631
+ showStarButton: a = !1,
632
+ dmAgentEnabled: r = !1,
633
+ onLeaveConversation: i,
634
+ onBlockParticipant: o,
635
+ showDeleteConversation: l = !0,
636
+ showBlockParticipant: d = !0,
637
+ showReportParticipant: m = !0,
638
+ onDeleteConversationClick: p,
639
+ onBlockParticipantClick: h,
640
+ onReportParticipantClick: g,
641
+ customChannelActions: c,
642
+ renderChannelActions: b,
643
+ showChannelInfo: x = !0,
644
+ onParticipantNameClick: v
644
645
  }) => {
645
- var $, F, D;
646
- const { channel: b } = le(), { client: g } = me(), x = V.useMemo(
646
+ var F, L, y;
647
+ const { channel: f } = le(), { client: N } = oe(), w = V.useMemo(
647
648
  () => {
648
- var y;
649
+ var E;
649
650
  return je(
650
- (y = b.state) == null ? void 0 : y.members,
651
- g == null ? void 0 : g.userID,
652
- b.type
651
+ (E = f.state) == null ? void 0 : E.members,
652
+ N == null ? void 0 : N.userID,
653
+ f.type
653
654
  );
654
655
  },
655
- [($ = b.state) == null ? void 0 : $.members, g == null ? void 0 : g.userID, b.type]
656
- ), N = ct(x == null ? void 0 : x.user), C = (F = x == null ? void 0 : x.user) == null ? void 0 : F.image, T = ot(b), A = ga(x), L = async () => {
656
+ [(F = f.state) == null ? void 0 : F.members, N == null ? void 0 : N.userID, f.type]
657
+ ), C = ut(w == null ? void 0 : w.user), R = (L = w == null ? void 0 : w.user) == null ? void 0 : L.image, S = dt(f), D = ga(w), $ = async () => {
657
658
  try {
658
- T ? await b.unpin() : await b.pin();
659
- } catch (y) {
659
+ S ? await f.unpin() : await f.pin();
660
+ } catch (E) {
660
661
  console.error(
661
662
  "[ChannelHeaderRedesign] Failed to update pinned status:",
662
- y
663
+ E
663
664
  );
664
665
  }
665
666
  };
666
- return /* @__PURE__ */ s("div", { className: "@container w-full bg-[linear-gradient(180deg,#FBFAF9_0%,rgba(251,250,249,0.92)_58%,rgba(251,250,249,0)_100%)]", children: /* @__PURE__ */ m("div", { className: "grid min-h-[100px] grid-cols-[minmax(40px,1fr)_auto_minmax(40px,1fr)] items-start pb-2 pt-5 @lg:min-h-[104px] @lg:pt-6", children: [
667
- /* @__PURE__ */ s("div", { className: "flex items-start", children: t && /* @__PURE__ */ s(
668
- "button",
669
- {
670
- className: k(
671
- We,
672
- "messaging-channel-view-back-button-mobile messaging-channel-view-back-button-desktop"
673
- ),
674
- onClick: e || (() => {
675
- }),
676
- type: "button",
677
- "aria-label": "Back to conversations",
678
- children: /* @__PURE__ */ s(et, { className: "size-5 text-black/90" })
679
- }
680
- ) }),
681
- /* @__PURE__ */ s("div", { className: "flex min-w-0 justify-center", "data-dd-privacy": "mask", children: /* @__PURE__ */ m(
682
- "button",
683
- {
684
- type: "button",
685
- onClick: w,
686
- "aria-label": `View details for ${N}`,
687
- className: "group flex min-w-0 max-w-full appearance-none flex-col items-center border-0 bg-transparent px-2 focus-ring focus-visible:outline-none",
688
- children: [
689
- /* @__PURE__ */ s(
690
- se,
667
+ return /* @__PURE__ */ s(
668
+ "div",
669
+ {
670
+ className: k(
671
+ "@container bg-[linear-gradient(180deg,#FBFAF9_0%,rgba(251,250,249,0.92)_58%,rgba(251,250,249,0)_100%)]",
672
+ e
673
+ ),
674
+ children: /* @__PURE__ */ u("div", { className: "grid min-h-[100px] grid-cols-[minmax(40px,1fr)_auto_minmax(40px,1fr)] items-start pb-2 pt-5 @lg:min-h-[104px] @lg:pt-6", children: [
675
+ /* @__PURE__ */ s("div", { className: "flex items-start", children: n && /* @__PURE__ */ s(
676
+ "button",
677
+ {
678
+ className: k(
679
+ We,
680
+ "messaging-channel-view-back-button-mobile messaging-channel-view-back-button-desktop"
681
+ ),
682
+ onClick: t || (() => {
683
+ }),
684
+ type: "button",
685
+ "aria-label": "Back to conversations",
686
+ children: /* @__PURE__ */ s(st, { className: "size-5 text-black/90" })
687
+ }
688
+ ) }),
689
+ /* @__PURE__ */ s("div", { className: "flex min-w-0 justify-center", "data-dd-privacy": "mask", children: /* @__PURE__ */ u(
690
+ "button",
691
+ {
692
+ type: "button",
693
+ onClick: v,
694
+ "aria-label": `View details for ${C}`,
695
+ className: "group flex min-w-0 max-w-full appearance-none flex-col items-center border-0 bg-transparent px-2 focus-ring focus-visible:outline-none",
696
+ children: [
697
+ /* @__PURE__ */ s(
698
+ ne,
699
+ {
700
+ id: ((y = w == null ? void 0 : w.user) == null ? void 0 : y.id) || f.id || "unknown",
701
+ name: C,
702
+ image: R,
703
+ dmAgentEnabled: r,
704
+ shape: "circle",
705
+ size: 48,
706
+ className: "-mb-2"
707
+ }
708
+ ),
709
+ /* @__PURE__ */ u("span", { className: "relative z-10 flex max-w-full flex-col items-center justify-center rounded-full border border-white/10 bg-white/65 py-1.5 pl-3 pr-2 shadow-[0px_0px_0px_0px_rgba(0,0,0,0.04),0px_1px_2px_0px_rgba(0,0,0,0.04),0px_8px_32px_0px_rgba(0,0,0,0.1)] backdrop-blur-[2px] transition-filter duration-150 group-hover:brightness-95", children: [
710
+ /* @__PURE__ */ u("span", { className: "flex max-w-full items-center justify-center", children: [
711
+ /* @__PURE__ */ s("span", { className: "min-w-0 truncate text-sm font-bold leading-[1.43] tracking-[0.28px] text-black/90", children: C }),
712
+ /* @__PURE__ */ u("span", { className: "ml-2 flex gap-1", children: [
713
+ D && /* @__PURE__ */ s(
714
+ "span",
715
+ {
716
+ "aria-label": "Paid customer",
717
+ className: "flex size-4 shrink-0 items-center justify-center rounded-full bg-[#34C759] text-white",
718
+ children: /* @__PURE__ */ s(Dn, { className: "size-2.5", weight: "bold" })
719
+ }
720
+ ),
721
+ a && S && /* @__PURE__ */ s(
722
+ "span",
723
+ {
724
+ "aria-label": "Starred conversation",
725
+ className: "flex size-4 shrink-0 items-center justify-center rounded-full bg-[#FFD60A] text-white",
726
+ children: /* @__PURE__ */ s(Ee, { className: "size-2.5", weight: "fill" })
727
+ }
728
+ ),
729
+ /* @__PURE__ */ s(
730
+ ve,
731
+ {
732
+ "aria-hidden": "true",
733
+ className: "size-4 shrink-0 text-black/65",
734
+ weight: "bold"
735
+ }
736
+ )
737
+ ] })
738
+ ] }),
739
+ r && /* @__PURE__ */ u("span", { className: "mt-1 flex items-center gap-1 px-1 pb-0.5 text-[10px] leading-3 text-black/55", children: [
740
+ /* @__PURE__ */ s(xe, { className: "size-3 shrink-0 text-black/55" }),
741
+ /* @__PURE__ */ s("span", { children: ha })
742
+ ] })
743
+ ] })
744
+ ]
745
+ }
746
+ ) }),
747
+ /* @__PURE__ */ u("div", { className: "flex items-start justify-end gap-2", children: [
748
+ a && /* @__PURE__ */ s(
749
+ "button",
691
750
  {
692
- id: ((D = x == null ? void 0 : x.user) == null ? void 0 : D.id) || b.id || "unknown",
693
- name: N,
694
- image: C,
695
- dmAgentEnabled: a,
696
- shape: "circle",
697
- size: 48,
698
- className: "-mb-2"
751
+ className: We,
752
+ onClick: $,
753
+ type: "button",
754
+ "aria-pressed": S,
755
+ "aria-label": S ? "Unstar conversation" : "Star conversation",
756
+ children: /* @__PURE__ */ s(
757
+ Ee,
758
+ {
759
+ className: k("size-5", {
760
+ "text-[#FFD60A]": S,
761
+ "text-black/90": !S
762
+ }),
763
+ weight: S ? "fill" : "regular"
764
+ }
765
+ )
699
766
  }
700
767
  ),
701
- /* @__PURE__ */ m("span", { className: "relative z-10 flex max-w-full flex-col items-center justify-center rounded-full border border-white/10 bg-white/65 py-1.5 pl-3 pr-2 shadow-[0px_0px_0px_0px_rgba(0,0,0,0.04),0px_1px_2px_0px_rgba(0,0,0,0.04),0px_8px_32px_0px_rgba(0,0,0,0.1)] backdrop-blur-[2px] transition-filter duration-150 group-hover:brightness-95", children: [
702
- /* @__PURE__ */ m("span", { className: "flex max-w-full items-center justify-center", children: [
703
- /* @__PURE__ */ s("span", { className: "min-w-0 truncate text-sm font-bold leading-[1.43] tracking-[0.28px] text-black/90", children: N }),
704
- /* @__PURE__ */ m("span", { className: "ml-2 flex gap-1", children: [
705
- A && /* @__PURE__ */ s(
706
- "span",
707
- {
708
- "aria-label": "Paid customer",
709
- className: "flex size-4 shrink-0 items-center justify-center rounded-full bg-[#34C759] text-white",
710
- children: /* @__PURE__ */ s(Ln, { className: "size-2.5", weight: "bold" })
711
- }
712
- ),
713
- n && T && /* @__PURE__ */ s(
714
- "span",
715
- {
716
- "aria-label": "Starred conversation",
717
- className: "flex size-4 shrink-0 items-center justify-center rounded-full bg-[#FFD60A] text-white",
718
- children: /* @__PURE__ */ s(Ee, { className: "size-2.5", weight: "fill" })
719
- }
720
- ),
721
- /* @__PURE__ */ s(
722
- ve,
723
- {
724
- "aria-hidden": "true",
725
- className: "size-4 shrink-0 text-black/65",
726
- weight: "bold"
727
- }
728
- )
729
- ] })
730
- ] }),
731
- a && /* @__PURE__ */ m("span", { className: "mt-1 flex items-center gap-1 px-1 pb-0.5 text-[10px] leading-3 text-black/55", children: [
732
- /* @__PURE__ */ s(xe, { className: "size-3 shrink-0 text-black/55" }),
733
- /* @__PURE__ */ s("span", { children: ha })
734
- ] })
735
- ] })
736
- ]
737
- }
738
- ) }),
739
- /* @__PURE__ */ m("div", { className: "flex items-start justify-end gap-2", children: [
740
- n && /* @__PURE__ */ s(
741
- "button",
742
- {
743
- className: We,
744
- onClick: L,
745
- type: "button",
746
- "aria-pressed": T,
747
- "aria-label": T ? "Unstar conversation" : "Star conversation",
748
- children: /* @__PURE__ */ s(
749
- Ee,
768
+ x && (b !== void 0 ? b : /* @__PURE__ */ s(
769
+ at,
750
770
  {
751
- className: k("size-5", {
752
- "text-[#FFD60A]": T,
753
- "text-black/90": !T
754
- }),
755
- weight: T ? "fill" : "regular"
771
+ channel: f,
772
+ participant: w,
773
+ showDeleteConversation: l,
774
+ showBlockParticipant: d,
775
+ showReportParticipant: m,
776
+ onLeaveConversation: i,
777
+ onBlockParticipant: o,
778
+ onDeleteConversationClick: p,
779
+ onBlockParticipantClick: h,
780
+ onReportParticipantClick: g,
781
+ customChannelActions: c,
782
+ triggerClassName: We
756
783
  }
757
- )
758
- }
759
- ),
760
- v && (c !== void 0 ? c : /* @__PURE__ */ s(
761
- st,
762
- {
763
- channel: b,
764
- participant: x,
765
- showDeleteConversation: o,
766
- showBlockParticipant: l,
767
- showReportParticipant: d,
768
- onLeaveConversation: r,
769
- onBlockParticipant: i,
770
- onDeleteConversationClick: u,
771
- onBlockParticipantClick: p,
772
- onReportParticipantClick: h,
773
- customChannelActions: f,
774
- triggerClassName: We
775
- }
776
- ))
777
- ] })
778
- ] }) });
779
- }, ba = (e) => /* @__PURE__ */ s(Ws, { ...e, position: "center" }), nt = "vote_up", at = "vote_down";
784
+ ))
785
+ ] })
786
+ ] })
787
+ }
788
+ );
789
+ }, ba = (e) => /* @__PURE__ */ s(Ws, { ...e, position: "center" }), rt = "vote_up", it = "vote_down";
780
790
  function va(e) {
781
- return e != null && e.length ? e.some((t) => t.type === at) ? "down" : e.some((t) => t.type === nt) ? "up" : null : null;
791
+ return e != null && e.length ? e.some((t) => t.type === it) ? "down" : e.some((t) => t.type === rt) ? "up" : null : null;
782
792
  }
783
793
  function xa(e) {
784
- const { channel: t } = le(), { client: n } = me("useMessageVote"), a = ae(
794
+ const { channel: t } = le(), { client: n } = oe("useMessageVote"), a = se(
785
795
  () => va(e.own_reactions),
786
796
  [e.own_reactions]
787
797
  ), r = Z(async () => {
788
798
  if (n != null && n.userID)
789
799
  try {
790
- a === "up" ? await t.deleteReaction(e.id, nt) : await t.sendReaction(
800
+ a === "up" ? await t.deleteReaction(e.id, rt) : await t.sendReaction(
791
801
  e.id,
792
- { type: nt },
802
+ { type: rt },
793
803
  { enforce_unique: !0, skip_push: !0 }
794
804
  );
795
805
  } catch {
@@ -797,9 +807,9 @@ function xa(e) {
797
807
  }, [t, n == null ? void 0 : n.userID, e.id, a]), i = Z(async () => {
798
808
  if (n != null && n.userID)
799
809
  try {
800
- a === "down" ? await t.deleteReaction(e.id, at) : await t.sendReaction(
810
+ a === "down" ? await t.deleteReaction(e.id, it) : await t.sendReaction(
801
811
  e.id,
802
- { type: at },
812
+ { type: it },
803
813
  { enforce_unique: !0, skip_push: !0 }
804
814
  );
805
815
  } catch {
@@ -818,13 +828,13 @@ function hs({
818
828
  const n = e == null ? void 0 : e.text, a = wa(t);
819
829
  return a ? ((r = e == null ? void 0 : e.i18n) == null ? void 0 : r[`${a}_text`]) ?? n : n;
820
830
  }
821
- const _a = V.lazy(() => import("./Card-DKBW4iY7.js")), Na = V.lazy(() => import("./Card-VmLMt6vQ.js")), ya = V.lazy(() => import("./Card-B54RRcbp.js")), dt = () => /* @__PURE__ */ s(
831
+ const _a = V.lazy(() => import("./Card-D3QNullZ.js")), Na = V.lazy(() => import("./Card-Dau41drB.js")), ya = V.lazy(() => import("./Card-BLLADEC_.js")), mt = () => /* @__PURE__ */ s(
822
832
  "div",
823
833
  {
824
834
  className: "w-[280px] min-h-[200px] animate-pulse rounded-md bg-black/[0.06] shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_1px_2px_rgba(0,0,0,0.04),0_8px_32px_rgba(0,0,0,0.1)]",
825
835
  "aria-hidden": !0
826
836
  }
827
- ), ka = (e) => /* @__PURE__ */ s(it, { fallback: /* @__PURE__ */ s(dt, {}), children: /* @__PURE__ */ s(_a, { ...e }) }), fs = (e) => /* @__PURE__ */ s(it, { fallback: /* @__PURE__ */ s(dt, {}), children: /* @__PURE__ */ s(Na, { ...e }) }), gs = (e) => /* @__PURE__ */ s(it, { fallback: /* @__PURE__ */ s(dt, {}), children: /* @__PURE__ */ s(ya, { ...e }) }), Ca = fs, Sa = gs, Zt = { Composer: ka, Sent: fs, Received: gs, Creator: Ca, Visitor: Sa }, Ea = [
837
+ ), ka = (e) => /* @__PURE__ */ s(ot, { fallback: /* @__PURE__ */ s(mt, {}), children: /* @__PURE__ */ s(_a, { ...e }) }), fs = (e) => /* @__PURE__ */ s(ot, { fallback: /* @__PURE__ */ s(mt, {}), children: /* @__PURE__ */ s(Na, { ...e }) }), gs = (e) => /* @__PURE__ */ s(ot, { fallback: /* @__PURE__ */ s(mt, {}), children: /* @__PURE__ */ s(ya, { ...e }) }), Ca = fs, Sa = gs, Zt = { Composer: ka, Sent: fs, Received: gs, Creator: Ca, Visitor: Sa }, Ea = [
828
838
  [/pdf/, "pdf"],
829
839
  [/wordprocessingml|msword|\.doc/, "doc"],
830
840
  [/spreadsheetml|ms-excel|\.xls/, "xls"],
@@ -834,7 +844,7 @@ const _a = V.lazy(() => import("./Card-DKBW4iY7.js")), Na = V.lazy(() => import(
834
844
  [/plain|rtf/, "text"],
835
845
  [/markdown/, "markdown"]
836
846
  ];
837
- function oe(e) {
847
+ function ce(e) {
838
848
  return e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : e.startsWith("image/") ? "image" : "document";
839
849
  }
840
850
  function ps(e) {
@@ -846,7 +856,7 @@ function ps(e) {
846
856
  const Ia = {
847
857
  video: cs,
848
858
  audio: zn,
849
- image: Dn,
859
+ image: Ln,
850
860
  document: os
851
861
  }, Ta = {
852
862
  pdf: Vn,
@@ -860,7 +870,7 @@ const Ia = {
860
870
  generic: os
861
871
  };
862
872
  function Aa(e) {
863
- const t = oe(e);
873
+ const t = ce(e);
864
874
  return t !== "document" ? Ia[t] : Ta[ps(e)];
865
875
  }
866
876
  function we(e, t) {
@@ -879,76 +889,76 @@ const Ma = (e) => {
879
889
  controls: o = !0,
880
890
  showProgress: l = !1,
881
891
  muted: d = !1,
882
- onContainerClick: u
892
+ onContainerClick: m
883
893
  }) => {
884
- const p = oe(t), h = G(null), f = G(null), c = G(null), v = G(r), [w, b] = U(a), [g, x] = U(0), [N, C] = U(!1), [T, A] = U(!1), [L, $] = U(!1), [F, D] = U(!1), [y, I] = U(!0), [S, R] = U(null), E = Z(() => {
885
- $(!1), b(!0);
894
+ const p = ce(t), h = G(null), g = G(null), c = G(null), b = G(r), [x, v] = U(a), [f, N] = U(0), [w, C] = U(!1), [R, S] = U(!1), [D, $] = U(!1), [F, L] = U(!1), [y, E] = U(!0), [I, M] = U(null), T = Z(() => {
895
+ $(!1), v(!0);
886
896
  }, []), z = Z((_) => {
887
- const M = f.current;
888
- if (!M) return 0;
889
- const H = M.getBoundingClientRect();
897
+ const A = g.current;
898
+ if (!A) return 0;
899
+ const H = A.getBoundingClientRect();
890
900
  return Math.max(
891
901
  0,
892
902
  Math.min(1, (Ma(_) - H.left) / H.width)
893
903
  );
894
904
  }, []), O = Z((_) => {
895
- const M = h.current;
896
- M && M.duration && (M.currentTime = _ * M.duration);
905
+ const A = h.current;
906
+ A && A.duration && (A.currentTime = _ * A.duration);
897
907
  }, []), j = (_) => {
898
908
  _.stopPropagation(), C(!0);
899
- const M = z(_);
900
- x(M), O(M);
909
+ const A = z(_);
910
+ N(A), O(A);
901
911
  };
902
912
  J(() => {
903
- r !== void 0 && r !== v.current && (v.current = r, b(r));
913
+ r !== void 0 && r !== b.current && (b.current = r, v(r));
904
914
  }, [r]), J(() => {
905
- if (!w) {
915
+ if (!x) {
906
916
  c.current !== null && (cancelAnimationFrame(c.current), c.current = null);
907
917
  return;
908
918
  }
909
919
  const _ = () => {
910
- const M = h.current;
911
- M && M.duration && !N && x(M.currentTime / M.duration), c.current = requestAnimationFrame(_);
920
+ const A = h.current;
921
+ A && A.duration && !w && N(A.currentTime / A.duration), c.current = requestAnimationFrame(_);
912
922
  };
913
923
  return c.current = requestAnimationFrame(_), () => {
914
924
  c.current !== null && cancelAnimationFrame(c.current);
915
925
  };
916
- }, [w, N]), J(() => {
926
+ }, [x, w]), J(() => {
917
927
  const _ = h.current;
918
- _ && (w ? _.play().catch((M) => {
919
- b(!1), $(!0);
928
+ _ && (x ? _.play().catch((A) => {
929
+ v(!1), $(!0);
920
930
  }) : _.pause());
921
- }, [w]), J(() => {
922
- if (!N) return;
923
- const _ = (H) => x(z(H)), M = (H) => {
931
+ }, [x]), J(() => {
932
+ if (!w) return;
933
+ const _ = (H) => N(z(H)), A = (H) => {
924
934
  C(!1), O(z(H));
925
935
  };
926
- return window.addEventListener("mousemove", _), window.addEventListener("mouseup", M), window.addEventListener("touchmove", _, { passive: !0 }), window.addEventListener("touchend", M), () => {
927
- window.removeEventListener("mousemove", _), window.removeEventListener("mouseup", M), window.removeEventListener("touchmove", _), window.removeEventListener("touchend", M);
936
+ return window.addEventListener("mousemove", _), window.addEventListener("mouseup", A), window.addEventListener("touchmove", _, { passive: !0 }), window.addEventListener("touchend", A), () => {
937
+ window.removeEventListener("mousemove", _), window.removeEventListener("mouseup", A), window.removeEventListener("touchmove", _), window.removeEventListener("touchend", A);
928
938
  };
929
- }, [N, z, O]);
930
- const X = S ? { aspectRatio: String(S) } : void 0, te = S ? "" : " aspect-video", K = Math.round(g * 100);
931
- return /* @__PURE__ */ m(
939
+ }, [w, z, O]);
940
+ const X = I ? { aspectRatio: String(I) } : void 0, ee = I ? "" : " aspect-video", K = Math.round(f * 100);
941
+ return /* @__PURE__ */ u(
932
942
  "div",
933
943
  {
934
944
  role: "button",
935
945
  tabIndex: 0,
936
- className: `relative cursor-pointer overflow-hidden bg-black ${te}`,
946
+ className: `relative cursor-pointer overflow-hidden bg-black ${ee}`,
937
947
  style: X,
938
948
  onClick: (_) => {
939
- if (u) {
940
- u(_);
949
+ if (m) {
950
+ m(_);
941
951
  return;
942
952
  }
943
- L || o && b((M) => !M);
953
+ D || o && v((A) => !A);
944
954
  },
945
955
  onKeyDown: (_) => {
946
956
  if (!(_.key !== "Enter" && _.key !== " ")) {
947
- if (_.preventDefault(), u) {
948
- u(_);
957
+ if (_.preventDefault(), m) {
958
+ m(_);
949
959
  return;
950
960
  }
951
- L || o && b((M) => !M);
961
+ D || o && v((A) => !A);
952
962
  }
953
963
  },
954
964
  children: [
@@ -972,14 +982,14 @@ const Ma = (e) => {
972
982
  loop: i,
973
983
  muted: d,
974
984
  style: { width: "100%", height: "100%" },
975
- onLoadStart: () => D(!0),
985
+ onLoadStart: () => L(!0),
976
986
  onCanPlay: () => {
977
- D(!1), I(!1);
987
+ L(!1), E(!1);
978
988
  },
979
- onWaiting: () => D(!0),
989
+ onWaiting: () => L(!0),
980
990
  onPlay: () => $(!1),
981
991
  onEnded: () => {
982
- i || (b(!1), x(0));
992
+ i || (v(!1), N(0));
983
993
  },
984
994
  children: /* @__PURE__ */ s("track", { kind: "captions" })
985
995
  }
@@ -992,30 +1002,30 @@ const Ma = (e) => {
992
1002
  muted: d,
993
1003
  playsInline: !0,
994
1004
  style: { width: "100%", height: "100%" },
995
- onLoadStart: () => D(!0),
1005
+ onLoadStart: () => L(!0),
996
1006
  onCanPlay: () => {
997
- D(!1), I(!1);
1007
+ L(!1), E(!1);
998
1008
  },
999
- onWaiting: () => D(!0),
1009
+ onWaiting: () => L(!0),
1000
1010
  onPlay: () => $(!1),
1001
1011
  onLoadedMetadata: () => {
1002
1012
  const _ = h.current;
1003
- _ instanceof HTMLVideoElement && _.videoWidth && _.videoHeight && R(_.videoWidth / _.videoHeight);
1013
+ _ instanceof HTMLVideoElement && _.videoWidth && _.videoHeight && M(_.videoWidth / _.videoHeight);
1004
1014
  },
1005
1015
  onEnded: () => {
1006
- i || (b(!1), x(0));
1016
+ i || (v(!1), N(0));
1007
1017
  },
1008
1018
  children: /* @__PURE__ */ s("track", { kind: "captions" })
1009
1019
  }
1010
1020
  ) }),
1011
- F && !L && /* @__PURE__ */ s("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ s(
1021
+ F && !D && /* @__PURE__ */ s("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ s(
1012
1022
  Ce,
1013
1023
  {
1014
1024
  className: "size-8 animate-spin text-white/80",
1015
1025
  weight: "bold"
1016
1026
  }
1017
1027
  ) }),
1018
- L && !o && /* @__PURE__ */ s(
1028
+ D && !o && /* @__PURE__ */ s(
1019
1029
  "div",
1020
1030
  {
1021
1031
  className: "absolute inset-0 z-30 flex cursor-pointer items-center justify-center bg-black/35",
@@ -1023,12 +1033,12 @@ const Ma = (e) => {
1023
1033
  tabIndex: 0,
1024
1034
  "aria-label": "Play preview",
1025
1035
  onClick: (_) => {
1026
- _.stopPropagation(), E();
1036
+ _.stopPropagation(), T();
1027
1037
  },
1028
1038
  onKeyDown: (_) => {
1029
- _.key !== "Enter" && _.key !== " " || (_.preventDefault(), _.stopPropagation(), E());
1039
+ _.key !== "Enter" && _.key !== " " || (_.preventDefault(), _.stopPropagation(), T());
1030
1040
  },
1031
- children: /* @__PURE__ */ s("span", { className: "flex size-16 items-center justify-center rounded-full bg-white/20 text-white backdrop-blur-sm", children: /* @__PURE__ */ s(tt, { className: "size-9 translate-x-0.5", weight: "fill" }) })
1041
+ children: /* @__PURE__ */ s("span", { className: "flex size-16 items-center justify-center rounded-full bg-white/20 text-white backdrop-blur-sm", children: /* @__PURE__ */ s(nt, { className: "size-9 translate-x-0.5", weight: "fill" }) })
1032
1042
  }
1033
1043
  ),
1034
1044
  l && !o && /* @__PURE__ */ s("div", { className: "absolute inset-x-0 bottom-0 px-3 pb-2.5 pt-6 bg-gradient-to-t from-black/40 to-transparent", children: /* @__PURE__ */ s(
@@ -1040,13 +1050,13 @@ const Ma = (e) => {
1040
1050
  "aria-valuemin": 0,
1041
1051
  "aria-valuemax": 100,
1042
1052
  tabIndex: 0,
1043
- ref: f,
1053
+ ref: g,
1044
1054
  className: "relative flex h-4 w-full cursor-pointer items-center",
1045
1055
  onMouseDown: j,
1046
1056
  onTouchStart: j,
1047
1057
  onClick: (_) => _.stopPropagation(),
1048
1058
  onKeyDown: (_) => {
1049
- _.key === "ArrowRight" && O(Math.min(1, g + 0.05)), _.key === "ArrowLeft" && O(Math.max(0, g - 0.05));
1059
+ _.key === "ArrowRight" && O(Math.min(1, f + 0.05)), _.key === "ArrowLeft" && O(Math.max(0, f - 0.05));
1050
1060
  },
1051
1061
  children: /* @__PURE__ */ s("div", { className: "w-full overflow-hidden rounded-full bg-white/30 h-1", children: /* @__PURE__ */ s(
1052
1062
  "div",
@@ -1057,20 +1067,20 @@ const Ma = (e) => {
1057
1067
  ) })
1058
1068
  }
1059
1069
  ) }),
1060
- o && /* @__PURE__ */ m("div", { className: "absolute inset-x-0 bottom-0 flex items-center gap-2 bg-gradient-to-t from-black/60 to-transparent px-3 pb-2.5 pt-6 transition-all duration-200", children: [
1070
+ o && /* @__PURE__ */ u("div", { className: "absolute inset-x-0 bottom-0 flex items-center gap-2 bg-gradient-to-t from-black/60 to-transparent px-3 pb-2.5 pt-6 transition-all duration-200", children: [
1061
1071
  /* @__PURE__ */ s(
1062
1072
  "button",
1063
1073
  {
1064
1074
  type: "button",
1065
1075
  onClick: (_) => {
1066
- _.stopPropagation(), b((M) => !M);
1076
+ _.stopPropagation(), v((A) => !A);
1067
1077
  },
1068
1078
  className: "shrink-0 text-white",
1069
- "aria-label": w ? "Pause" : "Play",
1070
- children: w ? /* @__PURE__ */ s(Gn, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ s(tt, { className: "size-5 translate-x-px", weight: "fill" })
1079
+ "aria-label": x ? "Pause" : "Play",
1080
+ children: x ? /* @__PURE__ */ s(Gn, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ s(nt, { className: "size-5 translate-x-px", weight: "fill" })
1071
1081
  }
1072
1082
  ),
1073
- /* @__PURE__ */ m(
1083
+ /* @__PURE__ */ u(
1074
1084
  "div",
1075
1085
  {
1076
1086
  role: "slider",
@@ -1079,21 +1089,21 @@ const Ma = (e) => {
1079
1089
  "aria-valuemin": 0,
1080
1090
  "aria-valuemax": 100,
1081
1091
  tabIndex: 0,
1082
- ref: f,
1092
+ ref: g,
1083
1093
  className: "relative flex h-4 w-full cursor-pointer items-center",
1084
1094
  onMouseDown: j,
1085
1095
  onTouchStart: j,
1086
1096
  onClick: (_) => _.stopPropagation(),
1087
- onMouseEnter: () => A(!0),
1088
- onMouseLeave: () => A(!1),
1097
+ onMouseEnter: () => S(!0),
1098
+ onMouseLeave: () => S(!1),
1089
1099
  onKeyDown: (_) => {
1090
- _.key === "ArrowRight" && O(Math.min(1, g + 0.05)), _.key === "ArrowLeft" && O(Math.max(0, g - 0.05));
1100
+ _.key === "ArrowRight" && O(Math.min(1, f + 0.05)), _.key === "ArrowLeft" && O(Math.max(0, f - 0.05));
1091
1101
  },
1092
1102
  children: [
1093
1103
  /* @__PURE__ */ s(
1094
1104
  "div",
1095
1105
  {
1096
- className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${T || N ? "h-1.5" : "h-1"}`,
1106
+ className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${R || w ? "h-1.5" : "h-1"}`,
1097
1107
  children: /* @__PURE__ */ s(
1098
1108
  "div",
1099
1109
  {
@@ -1106,7 +1116,7 @@ const Ma = (e) => {
1106
1116
  /* @__PURE__ */ s(
1107
1117
  "div",
1108
1118
  {
1109
- className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${T || N ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
1119
+ className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${R || w ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
1110
1120
  style: { left: `${K}%` }
1111
1121
  }
1112
1122
  )
@@ -1117,7 +1127,7 @@ const Ma = (e) => {
1117
1127
  ]
1118
1128
  }
1119
1129
  );
1120
- }, Qt = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", La = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", bs = ({
1130
+ }, Qt = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", Da = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", bs = ({
1121
1131
  mimeType: e,
1122
1132
  sourceUrl: t,
1123
1133
  thumbnailUrl: n,
@@ -1126,7 +1136,7 @@ const Ma = (e) => {
1126
1136
  mediaPlayerProps: i,
1127
1137
  containedImage: o = !1
1128
1138
  }) => {
1129
- const l = oe(e), [d, u] = U(!1);
1139
+ const l = ce(e), [d, m] = U(!1);
1130
1140
  return t && (l === "video" || l === "audio") ? /* @__PURE__ */ s(
1131
1141
  Ra,
1132
1142
  {
@@ -1143,7 +1153,7 @@ const Ma = (e) => {
1143
1153
  alt: a ?? "",
1144
1154
  className: `absolute inset-0 h-full w-full object-contain transition-opacity duration-300 ${d ? "opacity-100" : "opacity-0"}`,
1145
1155
  draggable: !1,
1146
- onLoad: () => u(!0)
1156
+ onLoad: () => m(!0)
1147
1157
  }
1148
1158
  ) }) : /* @__PURE__ */ s(
1149
1159
  "img",
@@ -1160,7 +1170,7 @@ const Ma = (e) => {
1160
1170
  alt: a ?? "",
1161
1171
  className: `absolute inset-0 h-full w-full object-contain transition-opacity duration-300 ${d ? "opacity-100" : "opacity-0"}`,
1162
1172
  draggable: !1,
1163
- onLoad: () => u(!0)
1173
+ onLoad: () => m(!0)
1164
1174
  }
1165
1175
  ) }) : /* @__PURE__ */ s(
1166
1176
  "img",
@@ -1179,7 +1189,7 @@ const Ma = (e) => {
1179
1189
  weight: "regular"
1180
1190
  })
1181
1191
  }
1182
- ) : n ? /* @__PURE__ */ s("div", { className: `relative ${La(r)}`, children: /* @__PURE__ */ s(
1192
+ ) : n ? /* @__PURE__ */ s("div", { className: `relative ${Da(r)}`, children: /* @__PURE__ */ s(
1183
1193
  "img",
1184
1194
  {
1185
1195
  src: n,
@@ -1207,41 +1217,41 @@ const Ma = (e) => {
1207
1217
  statusBadge: o,
1208
1218
  action: l,
1209
1219
  topLeft: d,
1210
- topRight: u,
1220
+ topRight: m,
1211
1221
  rootRef: p,
1212
1222
  "data-testid": h
1213
1223
  }) => {
1214
- const f = e === "dark", c = f ? n ?? a : n ?? "", v = f && !n;
1215
- return /* @__PURE__ */ m(
1224
+ const g = e === "dark", c = g ? n ?? a : n ?? "", b = g && !n;
1225
+ return /* @__PURE__ */ u(
1216
1226
  "div",
1217
1227
  {
1218
1228
  ref: p,
1219
1229
  "data-testid": h,
1220
1230
  className: k(
1221
1231
  "relative w-[280px] select-none overflow-hidden rounded-[24px] shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]",
1222
- f ? "bg-[#1e2330]" : "bg-white"
1232
+ g ? "bg-[#1e2330]" : "bg-white"
1223
1233
  ),
1224
1234
  children: [
1225
1235
  d ? /* @__PURE__ */ s("div", { className: "pointer-events-auto absolute left-3 top-3 z-50", children: d }) : null,
1226
- u ? /* @__PURE__ */ s("div", { className: "pointer-events-auto absolute right-3 top-3 z-50", children: u }) : null,
1236
+ m ? /* @__PURE__ */ s("div", { className: "pointer-events-auto absolute right-3 top-3 z-50", children: m }) : null,
1227
1237
  t,
1228
- /* @__PURE__ */ m("div", { className: "px-4 pb-3 pt-3", children: [
1238
+ /* @__PURE__ */ u("div", { className: "px-4 pb-3 pt-3", children: [
1229
1239
  c.trim() !== "" && /* @__PURE__ */ s(
1230
1240
  "p",
1231
1241
  {
1232
1242
  className: k("mb-0.5 truncate text-base font-medium", {
1233
- "text-black": !f,
1234
- "text-white/30": f && v,
1235
- "text-white": f && !v
1243
+ "text-black": !g,
1244
+ "text-white/30": g && b,
1245
+ "text-white": g && !b
1236
1246
  }),
1237
1247
  children: c
1238
1248
  }
1239
1249
  ),
1240
- /* @__PURE__ */ m("div", { className: "flex flex-wrap items-center gap-1", children: [
1250
+ /* @__PURE__ */ u("div", { className: "flex flex-wrap items-center gap-1", children: [
1241
1251
  we(r, {
1242
1252
  className: k(
1243
1253
  "size-5 shrink-0",
1244
- f ? "text-white/55" : "text-black/55"
1254
+ g ? "text-white/55" : "text-black/55"
1245
1255
  ),
1246
1256
  weight: "regular"
1247
1257
  }),
@@ -1250,7 +1260,7 @@ const Ma = (e) => {
1250
1260
  {
1251
1261
  className: k(
1252
1262
  "text-xs font-medium",
1253
- f ? "text-white/55" : "text-black/55"
1263
+ g ? "text-white/55" : "text-black/55"
1254
1264
  ),
1255
1265
  children: i
1256
1266
  }
@@ -1266,10 +1276,10 @@ const Ma = (e) => {
1266
1276
  function xs(e) {
1267
1277
  return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
1268
1278
  }
1269
- function ut(e) {
1279
+ function ht(e) {
1270
1280
  return `w-[280px] select-none overflow-hidden rounded-[24px] ${e ? "bg-[#1e2330]" : "bg-[#F3F3F1]"} shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]`;
1271
1281
  }
1272
- function Da(e) {
1282
+ function La(e) {
1273
1283
  return e ? "bg-white/10" : "bg-black/5";
1274
1284
  }
1275
1285
  function za(e) {
@@ -1284,8 +1294,8 @@ function Fa(e) {
1284
1294
  function Oa(e) {
1285
1295
  return e ? "text-white/20" : "text-black/20";
1286
1296
  }
1287
- const mt = ({ attachment: e, isMyMessage: t }) => {
1288
- const { title: n, text: a, image_url: r, og_scrape_url: i, title_link: o } = e, l = i ?? o, d = typeof l == "string" && l.trim() !== "" ? l : void 0, u = /* @__PURE__ */ m(V.Fragment, { children: [
1297
+ const ft = ({ attachment: e, isMyMessage: t }) => {
1298
+ const { title: n, text: a, image_url: r, og_scrape_url: i, title_link: o } = e, l = i ?? o, d = typeof l == "string" && l.trim() !== "" ? l : void 0, m = /* @__PURE__ */ u(V.Fragment, { children: [
1289
1299
  /* @__PURE__ */ s("div", { className: "p-2", children: r ? /* @__PURE__ */ s(
1290
1300
  "img",
1291
1301
  {
@@ -1296,22 +1306,22 @@ const mt = ({ attachment: e, isMyMessage: t }) => {
1296
1306
  ) : /* @__PURE__ */ s(
1297
1307
  "div",
1298
1308
  {
1299
- className: `aspect-video w-full rounded-[20px] ${Da(t)} flex items-center justify-center`,
1309
+ className: `aspect-video w-full rounded-[20px] ${La(t)} flex items-center justify-center`,
1300
1310
  children: /* @__PURE__ */ s(Hn, { className: `size-12 ${Oa(t)}` })
1301
1311
  }
1302
1312
  ) }),
1303
- /* @__PURE__ */ m("div", { className: "px-3 pb-3", children: [
1313
+ /* @__PURE__ */ u("div", { className: "px-3 pb-3", children: [
1304
1314
  n && /* @__PURE__ */ s("p", { className: `truncate text-[14px] font-medium leading-5 ${za(t)}`, children: n }),
1305
1315
  a && /* @__PURE__ */ s("p", { className: `truncate text-[12px] leading-4 ${Pa(t)}`, children: a }),
1306
1316
  d && /* @__PURE__ */ s("p", { className: `mt-1 truncate text-[12px] leading-4 ${Fa(t)}`, children: d })
1307
1317
  ] })
1308
1318
  ] });
1309
- return d ? /* @__PURE__ */ s("a", { href: d, target: "_blank", rel: "noopener noreferrer", className: "block no-underline", children: u }) : /* @__PURE__ */ s("div", { className: "block", children: u });
1319
+ return d ? /* @__PURE__ */ s("a", { href: d, target: "_blank", rel: "noopener noreferrer", className: "block no-underline", children: m }) : /* @__PURE__ */ s("div", { className: "block", children: m });
1310
1320
  };
1311
1321
  function ws(e) {
1312
1322
  return e.type === "link" || !!e.og_scrape_url && !e.asset_url;
1313
1323
  }
1314
- function ht(e) {
1324
+ function gt(e) {
1315
1325
  var t;
1316
1326
  return (t = e.attachments) == null ? void 0 : t.find(ws);
1317
1327
  }
@@ -1347,31 +1357,31 @@ const Ba = ({
1347
1357
  },
1348
1358
  disabled: n,
1349
1359
  className: "mt-3 inline-flex h-10 w-full items-center justify-center gap-2 rounded-full bg-[#121110] px-4 text-sm font-medium leading-none text-white hover:bg-[#2a2928] disabled:opacity-70",
1350
- children: n ? /* @__PURE__ */ s(Ce, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ m(V.Fragment, { children: [
1360
+ children: n ? /* @__PURE__ */ s(Ce, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ u(V.Fragment, { children: [
1351
1361
  /* @__PURE__ */ s(Se, { className: "size-4 text-white", weight: "bold" }),
1352
1362
  "Download"
1353
1363
  ] })
1354
1364
  }
1355
1365
  );
1356
1366
  };
1357
- function ft(e) {
1358
- var h, f, c, v;
1367
+ function pt(e) {
1368
+ var h, g, c, b;
1359
1369
  const t = (h = e.attachments) == null ? void 0 : h.find(
1360
- (w) => w.type === "video" && w.asset_url
1361
- ), n = (f = e.attachments) == null ? void 0 : f.find(
1362
- (w) => w.type === "image" && w.image_url
1370
+ (x) => x.type === "video" && x.asset_url
1371
+ ), n = (g = e.attachments) == null ? void 0 : g.find(
1372
+ (x) => x.type === "image" && x.image_url
1363
1373
  ), a = (c = e.attachments) == null ? void 0 : c.find(
1364
- (w) => w.type === "audio" && w.asset_url
1365
- ), r = (v = e.attachments) == null ? void 0 : v.find(
1366
- (w) => w.type === "file" && w.asset_url
1374
+ (x) => x.type === "audio" && x.asset_url
1375
+ ), r = (b = e.attachments) == null ? void 0 : b.find(
1376
+ (x) => x.type === "file" && x.asset_url
1367
1377
  ), i = t ?? n ?? a ?? r, o = (t == null ? void 0 : t.asset_url) ?? (n == null ? void 0 : n.image_url) ?? (a == null ? void 0 : a.asset_url) ?? (r == null ? void 0 : r.asset_url);
1368
1378
  if (!o) return null;
1369
- const l = (i == null ? void 0 : i.mime_type) ?? ((i == null ? void 0 : i.type) === "image" ? "image/jpeg" : (i == null ? void 0 : i.type) === "video" ? "video/mp4" : (i == null ? void 0 : i.type) === "audio" ? "audio/mpeg" : "application/octet-stream"), d = i == null ? void 0 : i.title, u = i == null ? void 0 : i.file_size, p = t == null ? void 0 : t.thumb_url;
1379
+ const l = (i == null ? void 0 : i.mime_type) ?? ((i == null ? void 0 : i.type) === "image" ? "image/jpeg" : (i == null ? void 0 : i.type) === "video" ? "video/mp4" : (i == null ? void 0 : i.type) === "audio" ? "audio/mpeg" : "application/octet-stream"), d = i == null ? void 0 : i.title, m = i == null ? void 0 : i.file_size, p = t == null ? void 0 : t.thumb_url;
1370
1380
  return {
1371
1381
  resolvedUrl: o,
1372
1382
  resolvedType: l,
1373
1383
  title: d,
1374
- fileSize: u,
1384
+ fileSize: m,
1375
1385
  thumbnailUrl: p
1376
1386
  };
1377
1387
  }
@@ -1410,7 +1420,7 @@ const _s = ({
1410
1420
  fileSize: a,
1411
1421
  thumbnailUrl: r
1412
1422
  }) => {
1413
- const i = oe(t), o = a !== void 0 ? xs(a) : void 0;
1423
+ const i = ce(t), o = a !== void 0 ? xs(a) : void 0;
1414
1424
  return /* @__PURE__ */ s(
1415
1425
  vs,
1416
1426
  {
@@ -1436,10 +1446,10 @@ const _s = ({
1436
1446
  message: e,
1437
1447
  isMyMessage: t = !1
1438
1448
  }) => {
1439
- const n = ht(e), a = ft(e);
1440
- return !n && !a ? null : /* @__PURE__ */ m("div", { className: t ? "str-chat__message str-chat__message-simple str-chat__message--me str-chat__message-simple--me" : "str-chat__message str-chat__message-simple str-chat__message--other", "data-dd-privacy": "mask", children: [
1449
+ const n = gt(e), a = pt(e);
1450
+ return !n && !a ? null : /* @__PURE__ */ u("div", { className: t ? "str-chat__message str-chat__message-simple str-chat__message--me str-chat__message-simple--me" : "str-chat__message str-chat__message-simple str-chat__message--other", "data-dd-privacy": "mask", children: [
1441
1451
  !t && e.user && /* @__PURE__ */ s(
1442
- se,
1452
+ ne,
1443
1453
  {
1444
1454
  className: "str-chat__avatar str-chat__message-sender-avatar",
1445
1455
  id: e.user.id,
@@ -1458,7 +1468,7 @@ const _s = ({
1458
1468
  className: "str-chat__message-bubble",
1459
1469
  "data-attachment-bubble": "true",
1460
1470
  style: { padding: 0, borderRadius: 0, overflow: "visible", background: "transparent" },
1461
- children: n ? /* @__PURE__ */ s("div", { className: ut(t), children: /* @__PURE__ */ s(mt, { attachment: n, isMyMessage: t }) }) : t ? /* @__PURE__ */ s(_s, { ...a }) : /* @__PURE__ */ s(Ns, { ...a })
1471
+ children: n ? /* @__PURE__ */ s("div", { className: ht(t), children: /* @__PURE__ */ s(ft, { attachment: n, isMyMessage: t }) }) : t ? /* @__PURE__ */ s(_s, { ...a }) : /* @__PURE__ */ s(Ns, { ...a })
1462
1472
  }
1463
1473
  ) })
1464
1474
  }
@@ -1467,20 +1477,20 @@ const _s = ({
1467
1477
  }, ja = ({
1468
1478
  message: e
1469
1479
  }) => {
1470
- const t = ht(e);
1480
+ const t = gt(e);
1471
1481
  if (t)
1472
- return /* @__PURE__ */ s("div", { className: ut(!0), "data-dd-privacy": "mask", children: /* @__PURE__ */ s(mt, { attachment: t, isMyMessage: !0 }) });
1473
- const n = ft(e);
1482
+ return /* @__PURE__ */ s("div", { className: ht(!0), "data-dd-privacy": "mask", children: /* @__PURE__ */ s(ft, { attachment: t, isMyMessage: !0 }) });
1483
+ const n = pt(e);
1474
1484
  return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(_s, { ...n }) }) : null;
1475
1485
  }, Va = ({
1476
1486
  message: e
1477
1487
  }) => {
1478
- const t = ht(e);
1488
+ const t = gt(e);
1479
1489
  if (t)
1480
- return /* @__PURE__ */ s("div", { className: ut(!1), "data-dd-privacy": "mask", children: /* @__PURE__ */ s(mt, { attachment: t, isMyMessage: !1 }) });
1481
- const n = ft(e);
1490
+ return /* @__PURE__ */ s("div", { className: ht(!1), "data-dd-privacy": "mask", children: /* @__PURE__ */ s(ft, { attachment: t, isMyMessage: !1 }) });
1491
+ const n = pt(e);
1482
1492
  return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(Ns, { ...n }) }) : null;
1483
- }, ul = Object.assign(Ua, {
1493
+ }, ol = Object.assign(Ua, {
1484
1494
  Creator: ja,
1485
1495
  Visitor: Va
1486
1496
  }), Ga = {
@@ -1515,7 +1525,7 @@ const _s = ({
1515
1525
  "data-testid": o
1516
1526
  }) => {
1517
1527
  const l = t != null && t !== "", d = Wa[qa(e)][a];
1518
- return /* @__PURE__ */ m(
1528
+ return /* @__PURE__ */ u(
1519
1529
  "div",
1520
1530
  {
1521
1531
  "data-testid": o,
@@ -1584,7 +1594,7 @@ const _s = ({
1584
1594
  mimeType: t,
1585
1595
  filename: n,
1586
1596
  items: a
1587
- }) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: n }] : [], Ja = ({ item: e, preload: t, trailingAction: n }) => /* @__PURE__ */ m("div", { className: "flex items-center gap-2", children: [
1597
+ }) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: n }] : [], Ja = ({ item: e, preload: t, trailingAction: n }) => /* @__PURE__ */ u("div", { className: "flex items-center gap-2", children: [
1588
1598
  /* @__PURE__ */ s(
1589
1599
  "audio",
1590
1600
  {
@@ -1596,7 +1606,7 @@ const _s = ({
1596
1606
  }
1597
1607
  ),
1598
1608
  n ?? null
1599
- ] }), gt = ({
1609
+ ] }), bt = ({
1600
1610
  state: e,
1601
1611
  src: t,
1602
1612
  mimeType: n,
@@ -1607,33 +1617,33 @@ const _s = ({
1607
1617
  preload: l,
1608
1618
  onDismiss: d
1609
1619
  }) => {
1610
- const u = Me(e), p = e === "composer" && !!d, h = Ka({ src: t, mimeType: n, filename: a, items: r });
1620
+ const m = Me(e), p = e === "composer" && !!d, h = Ka({ src: t, mimeType: n, filename: a, items: r });
1611
1621
  if (h.length === 0)
1612
1622
  return null;
1613
- const f = l ?? (h.length > 1 ? "none" : "metadata");
1623
+ const g = l ?? (h.length > 1 ? "none" : "metadata");
1614
1624
  return /* @__PURE__ */ s(
1615
1625
  Te,
1616
1626
  {
1617
- variant: u,
1627
+ variant: m,
1618
1628
  text: i,
1619
1629
  groupPosition: o,
1620
1630
  "data-testid": "audio-attachment",
1621
- children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: h.map((c, v) => /* @__PURE__ */ s(
1631
+ children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: h.map((c, b) => /* @__PURE__ */ s(
1622
1632
  Ja,
1623
1633
  {
1624
1634
  item: c,
1625
- preload: f,
1635
+ preload: g,
1626
1636
  trailingAction: (
1627
1637
  // Composer only supports a single attachment, so the
1628
1638
  // dismiss control sits on the only player.
1629
- p && v === 0 ? /* @__PURE__ */ s(Ae, { onClick: d, variant: "inline" }) : void 0
1639
+ p && b === 0 ? /* @__PURE__ */ s(Ae, { onClick: d, variant: "inline" }) : void 0
1630
1640
  )
1631
1641
  },
1632
- `${c.src}-${v}`
1642
+ `${c.src}-${b}`
1633
1643
  )) })
1634
1644
  }
1635
1645
  );
1636
- }, Za = (e) => /* @__PURE__ */ s(gt, { ...e, state: "composer" }), Qa = (e) => /* @__PURE__ */ s(gt, { ...e, state: "sent" }), er = (e) => /* @__PURE__ */ s(gt, { ...e, state: "received" }), tr = {
1646
+ }, Za = (e) => /* @__PURE__ */ s(bt, { ...e, state: "composer" }), Qa = (e) => /* @__PURE__ */ s(bt, { ...e, state: "sent" }), er = (e) => /* @__PURE__ */ s(bt, { ...e, state: "received" }), tr = {
1637
1647
  Composer: Za,
1638
1648
  Sent: Qa,
1639
1649
  Received: er
@@ -1660,7 +1670,7 @@ function ar(e, t) {
1660
1670
  }
1661
1671
  }
1662
1672
  if (!e) return;
1663
- if (oe(e) === "document") {
1673
+ if (ce(e) === "document") {
1664
1674
  const r = ps(e), i = nr[r];
1665
1675
  if (i) return i;
1666
1676
  if (e === "application/octet-stream") return;
@@ -1700,7 +1710,7 @@ const ir = {
1700
1710
  activateLabel: o,
1701
1711
  trailingAction: l
1702
1712
  }) => {
1703
- const d = n ?? t ?? "File", u = rr(a, t, r), p = /* @__PURE__ */ s(
1713
+ const d = n ?? t ?? "File", m = rr(a, t, r), p = /* @__PURE__ */ s(
1704
1714
  "div",
1705
1715
  {
1706
1716
  className: k(
@@ -1713,19 +1723,19 @@ const ir = {
1713
1723
  weight: "regular"
1714
1724
  })
1715
1725
  }
1716
- ), h = /* @__PURE__ */ m("div", { className: "flex min-w-0 flex-1 flex-col text-left", children: [
1726
+ ), h = /* @__PURE__ */ u("div", { className: "flex min-w-0 flex-1 flex-col text-left", children: [
1717
1727
  /* @__PURE__ */ s("p", { className: "truncate font-medium leading-snug", children: d }),
1718
- u ? /* @__PURE__ */ s(
1728
+ m ? /* @__PURE__ */ s(
1719
1729
  "p",
1720
1730
  {
1721
1731
  className: k(
1722
1732
  "truncate text-xs leading-4",
1723
1733
  ir[e]
1724
1734
  ),
1725
- children: u
1735
+ children: m
1726
1736
  }
1727
1737
  ) : null
1728
- ] }), f = i ? /* @__PURE__ */ m(
1738
+ ] }), g = i ? /* @__PURE__ */ u(
1729
1739
  "button",
1730
1740
  {
1731
1741
  type: "button",
@@ -1740,12 +1750,12 @@ const ir = {
1740
1750
  h
1741
1751
  ]
1742
1752
  }
1743
- ) : /* @__PURE__ */ m(ee, { children: [
1753
+ ) : /* @__PURE__ */ u(te, { children: [
1744
1754
  p,
1745
1755
  h
1746
1756
  ] });
1747
- return /* @__PURE__ */ m("div", { className: "flex items-center gap-3 px-3 py-2", children: [
1748
- f,
1757
+ return /* @__PURE__ */ u("div", { className: "flex items-center gap-3 px-3 py-2", children: [
1758
+ g,
1749
1759
  l ? /* @__PURE__ */ s("div", { className: "shrink-0", children: l }) : null
1750
1760
  ] });
1751
1761
  };
@@ -1791,7 +1801,7 @@ const cr = ({
1791
1801
  trailingAction: r
1792
1802
  }
1793
1803
  );
1794
- }, pt = ({
1804
+ }, vt = ({
1795
1805
  state: e,
1796
1806
  src: t,
1797
1807
  filename: n,
@@ -1801,26 +1811,26 @@ const cr = ({
1801
1811
  items: o,
1802
1812
  text: l,
1803
1813
  groupPosition: d,
1804
- onClick: u,
1814
+ onClick: m,
1805
1815
  onDismiss: p
1806
1816
  }) => {
1807
- const h = Me(e), f = e === "composer" && !!p, c = cr({
1817
+ const h = Me(e), g = e === "composer" && !!p, c = cr({
1808
1818
  src: t,
1809
1819
  filename: n,
1810
1820
  fileSize: a,
1811
1821
  mimeType: r,
1812
1822
  title: i,
1813
1823
  items: o
1814
- }), v = (b) => {
1815
- if ((u == null ? void 0 : u(b)) === !1) return;
1816
- const g = c[b];
1817
- if (!g) return;
1818
- const x = g.filename ?? re(g.src);
1819
- ks(g.src, x);
1824
+ }), b = (v) => {
1825
+ if ((m == null ? void 0 : m(v)) === !1) return;
1826
+ const f = c[v];
1827
+ if (!f) return;
1828
+ const N = f.filename ?? re(f.src);
1829
+ ks(f.src, N);
1820
1830
  };
1821
1831
  if (c.length === 0)
1822
1832
  return null;
1823
- const w = /* @__PURE__ */ s(
1833
+ const x = /* @__PURE__ */ s(
1824
1834
  "span",
1825
1835
  {
1826
1836
  className: k(
@@ -1838,29 +1848,29 @@ const cr = ({
1838
1848
  text: l,
1839
1849
  groupPosition: d,
1840
1850
  "data-testid": "file-attachment",
1841
- children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: c.map((b, g) => /* @__PURE__ */ s(
1851
+ children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: c.map((v, f) => /* @__PURE__ */ s(
1842
1852
  dr,
1843
1853
  {
1844
1854
  variant: h,
1845
- item: b,
1846
- index: g,
1847
- onActivate: v,
1848
- trailingAction: f && g === 0 ? /* @__PURE__ */ s(Ae, { onClick: p, variant: "inline" }) : w
1855
+ item: v,
1856
+ index: f,
1857
+ onActivate: b,
1858
+ trailingAction: g && f === 0 ? /* @__PURE__ */ s(Ae, { onClick: p, variant: "inline" }) : x
1849
1859
  },
1850
- `${b.src}-${g}`
1860
+ `${v.src}-${f}`
1851
1861
  )) })
1852
1862
  }
1853
1863
  );
1854
- }, ur = (e) => /* @__PURE__ */ s(pt, { ...e, state: "composer" }), mr = (e) => /* @__PURE__ */ s(pt, { ...e, state: "sent" }), hr = (e) => /* @__PURE__ */ s(pt, { ...e, state: "received" }), fr = {
1864
+ }, ur = (e) => /* @__PURE__ */ s(vt, { ...e, state: "composer" }), mr = (e) => /* @__PURE__ */ s(vt, { ...e, state: "sent" }), hr = (e) => /* @__PURE__ */ s(vt, { ...e, state: "received" }), fr = {
1855
1865
  Composer: ur,
1856
1866
  Sent: mr,
1857
1867
  Received: hr
1858
- }, bt = ({
1868
+ }, xt = ({
1859
1869
  onPrev: e,
1860
1870
  onNext: t,
1861
1871
  prevLabel: n = "Previous",
1862
1872
  nextLabel: a = "Next"
1863
- }) => /* @__PURE__ */ m(ee, { children: [
1873
+ }) => /* @__PURE__ */ u(te, { children: [
1864
1874
  /* @__PURE__ */ s(
1865
1875
  "button",
1866
1876
  {
@@ -1890,7 +1900,7 @@ const cr = ({
1890
1900
  tone: i = "dark",
1891
1901
  onTriggered: o
1892
1902
  }) => {
1893
- const [l, d] = U(!1), u = Z(
1903
+ const [l, d] = U(!1), m = Z(
1894
1904
  (c) => {
1895
1905
  c.stopPropagation(), !l && (d(!0), ks(e, t).catch(() => {
1896
1906
  }).finally(() => {
@@ -1898,7 +1908,7 @@ const cr = ({
1898
1908
  }));
1899
1909
  },
1900
1910
  [l, e, t, o]
1901
- ), p = r ?? n !== "pill", f = { className: k(
1911
+ ), p = r ?? n !== "pill", g = { className: k(
1902
1912
  n === "pill" ? "size-4" : "size-5",
1903
1913
  "shrink-0"
1904
1914
  ), weight: "bold" };
@@ -1906,7 +1916,7 @@ const cr = ({
1906
1916
  "button",
1907
1917
  {
1908
1918
  type: "button",
1909
- onClick: u,
1919
+ onClick: m,
1910
1920
  disabled: l,
1911
1921
  "aria-label": a,
1912
1922
  className: k(
@@ -1936,17 +1946,17 @@ const cr = ({
1936
1946
  "button",
1937
1947
  {
1938
1948
  type: "button",
1939
- onClick: u,
1949
+ onClick: m,
1940
1950
  disabled: l,
1941
1951
  "aria-label": a,
1942
1952
  className: "mes-media-viewer__action",
1943
1953
  children: l ? /* @__PURE__ */ s(Ce, { size: 20, weight: "bold", "aria-hidden": !0 }) : /* @__PURE__ */ s(Se, { size: 20, weight: "bold", "aria-hidden": !0 })
1944
1954
  }
1945
- ) : /* @__PURE__ */ m(
1955
+ ) : /* @__PURE__ */ u(
1946
1956
  "button",
1947
1957
  {
1948
1958
  type: "button",
1949
- onClick: u,
1959
+ onClick: m,
1950
1960
  disabled: l,
1951
1961
  "aria-label": p ? a : void 0,
1952
1962
  className: k(
@@ -1961,12 +1971,12 @@ const cr = ({
1961
1971
  weight: "bold",
1962
1972
  "aria-hidden": !0
1963
1973
  }
1964
- ) : /* @__PURE__ */ s(Se, { ...f, "aria-hidden": !0 }),
1974
+ ) : /* @__PURE__ */ s(Se, { ...g, "aria-hidden": !0 }),
1965
1975
  p ? null : a
1966
1976
  ]
1967
1977
  }
1968
1978
  );
1969
- }, Xe = (e, t, n) => Math.min(Math.max(e, t), n), vt = ({
1979
+ }, Xe = (e, t, n) => Math.min(Math.max(e, t), n), wt = ({
1970
1980
  length: e,
1971
1981
  initialIndex: t,
1972
1982
  open: n
@@ -1984,14 +1994,14 @@ const cr = ({
1984
1994
  }, [e]);
1985
1995
  return J(() => {
1986
1996
  if (!n || e <= 1) return;
1987
- const d = (u) => {
1988
- if (u.key !== "ArrowLeft" && u.key !== "ArrowRight") return;
1997
+ const d = (m) => {
1998
+ if (m.key !== "ArrowLeft" && m.key !== "ArrowRight") return;
1989
1999
  const p = document.activeElement;
1990
- p && (p.tagName === "VIDEO" || p.tagName === "AUDIO") || (u.preventDefault(), u.key === "ArrowLeft" ? o() : l());
2000
+ p && (p.tagName === "VIDEO" || p.tagName === "AUDIO") || (m.preventDefault(), m.key === "ArrowLeft" ? o() : l());
1991
2001
  };
1992
2002
  return window.addEventListener("keydown", d), () => window.removeEventListener("keydown", d);
1993
2003
  }, [n, e, o, l]), { index: r, prev: o, next: l };
1994
- }, xt = ({
2004
+ }, _t = ({
1995
2005
  open: e,
1996
2006
  onClose: t,
1997
2007
  ariaLabel: n,
@@ -2002,7 +2012,7 @@ const cr = ({
2002
2012
  }) => {
2003
2013
  const l = G(null), d = G(null);
2004
2014
  return J(() => {
2005
- var f;
2015
+ var g;
2006
2016
  const h = l.current;
2007
2017
  if (h) {
2008
2018
  if (e) {
@@ -2016,7 +2026,7 @@ const cr = ({
2016
2026
  else
2017
2027
  h.setAttribute("open", "");
2018
2028
  const c = typeof document < "u" ? document.activeElement : null;
2019
- return (f = d.current) == null || f.focus(), () => {
2029
+ return (g = d.current) == null || g.focus(), () => {
2020
2030
  if (h.open)
2021
2031
  if (typeof h.close == "function")
2022
2032
  try {
@@ -2046,7 +2056,7 @@ const cr = ({
2046
2056
  // `jsx-a11y` rules below don't model `<dialog>` as interactive, so
2047
2057
  // we silence them locally with the rationale captured here.
2048
2058
  // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions
2049
- /* @__PURE__ */ m(
2059
+ /* @__PURE__ */ u(
2050
2060
  "dialog",
2051
2061
  {
2052
2062
  ref: l,
@@ -2060,9 +2070,9 @@ const cr = ({
2060
2070
  h.target === l.current && t();
2061
2071
  },
2062
2072
  children: [
2063
- /* @__PURE__ */ m("div", { className: "mes-media-viewer__chrome", children: [
2073
+ /* @__PURE__ */ u("div", { className: "mes-media-viewer__chrome", children: [
2064
2074
  a ? /* @__PURE__ */ s("span", { className: "mes-media-viewer__counter", children: a }) : null,
2065
- /* @__PURE__ */ m("div", { className: "mes-media-viewer__actions", children: [
2075
+ /* @__PURE__ */ u("div", { className: "mes-media-viewer__actions", children: [
2066
2076
  r,
2067
2077
  /* @__PURE__ */ s(
2068
2078
  "button",
@@ -2087,16 +2097,16 @@ const cr = ({
2087
2097
  initialIndex: n = 0,
2088
2098
  onClose: a
2089
2099
  }) => {
2090
- const { index: r, prev: i, next: o } = vt({
2100
+ const { index: r, prev: i, next: o } = wt({
2091
2101
  length: t.length,
2092
2102
  initialIndex: n,
2093
2103
  open: e
2094
- }), l = t[r], d = ae(
2104
+ }), l = t[r], d = se(
2095
2105
  () => (l == null ? void 0 : l.filename) ?? (l ? re(l.src) : "image"),
2096
2106
  [l]
2097
2107
  );
2098
- return l ? /* @__PURE__ */ m(
2099
- xt,
2108
+ return l ? /* @__PURE__ */ u(
2109
+ _t,
2100
2110
  {
2101
2111
  open: e,
2102
2112
  onClose: a,
@@ -2126,7 +2136,7 @@ const cr = ({
2126
2136
  `${r}:${l.src}`
2127
2137
  ),
2128
2138
  t.length > 1 ? /* @__PURE__ */ s(
2129
- bt,
2139
+ xt,
2130
2140
  {
2131
2141
  onPrev: i,
2132
2142
  onNext: o,
@@ -2145,25 +2155,25 @@ const cr = ({
2145
2155
  }) => {
2146
2156
  const r = e.length;
2147
2157
  if (r === 0) return null;
2148
- const i = e.slice(0, Math.min(r, n)), o = r - i.length, l = (d, u, p) => {
2158
+ const i = e.slice(0, Math.min(r, n)), o = r - i.length, l = (d, m, p) => {
2149
2159
  const h = k(gr, "h-full w-full");
2150
- return t ? /* @__PURE__ */ m(
2160
+ return t ? /* @__PURE__ */ u(
2151
2161
  "button",
2152
2162
  {
2153
2163
  type: "button",
2154
- onClick: () => t(u),
2155
- "aria-label": d.ariaLabel ?? `Open media ${u + 1}`,
2164
+ onClick: () => t(m),
2165
+ "aria-label": d.ariaLabel ?? `Open media ${m + 1}`,
2156
2166
  className: k(h, "cursor-zoom-in"),
2157
2167
  children: [
2158
2168
  d.content,
2159
2169
  p
2160
2170
  ]
2161
2171
  },
2162
- u
2163
- ) : /* @__PURE__ */ m("div", { className: h, children: [
2172
+ m
2173
+ ) : /* @__PURE__ */ u("div", { className: h, children: [
2164
2174
  d.content,
2165
2175
  p
2166
- ] }, u);
2176
+ ] }, m);
2167
2177
  };
2168
2178
  return i.length === 1 ? /* @__PURE__ */ s("div", { className: k("aspect-square w-full", a), children: l(i[0], 0) }) : i.length === 2 ? /* @__PURE__ */ s(
2169
2179
  "div",
@@ -2172,9 +2182,9 @@ const cr = ({
2172
2182
  "grid aspect-[16/9] w-full grid-cols-2 gap-0.5",
2173
2183
  a
2174
2184
  ),
2175
- children: i.map((d, u) => l(d, u))
2185
+ children: i.map((d, m) => l(d, m))
2176
2186
  }
2177
- ) : i.length === 3 ? /* @__PURE__ */ m(
2187
+ ) : i.length === 3 ? /* @__PURE__ */ u(
2178
2188
  "div",
2179
2189
  {
2180
2190
  className: k(
@@ -2194,12 +2204,12 @@ const cr = ({
2194
2204
  "grid aspect-[4/3] w-full grid-cols-2 grid-rows-2 gap-0.5",
2195
2205
  a
2196
2206
  ),
2197
- children: i.map((d, u) => {
2198
- const p = o > 0 && u === i.length - 1;
2207
+ children: i.map((d, m) => {
2208
+ const p = o > 0 && m === i.length - 1;
2199
2209
  return l(
2200
2210
  d,
2201
- u,
2202
- p ? /* @__PURE__ */ m("div", { className: "absolute inset-0 flex items-center justify-center bg-black/55 text-2xl font-semibold text-white", children: [
2211
+ m,
2212
+ p ? /* @__PURE__ */ u("div", { className: "absolute inset-0 flex items-center justify-center bg-black/55 text-2xl font-semibold text-white", children: [
2203
2213
  "+",
2204
2214
  o
2205
2215
  ] }) : null
@@ -2239,10 +2249,10 @@ const cr = ({
2239
2249
  alt: n.alt,
2240
2250
  filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
2241
2251
  })), vr = ({ src: e, alt: t, filename: n, loading: a = "lazy", onClick: r, onDismiss: i }) => {
2242
- const { viewerOpen: o, viewerIndex: l, handleActivate: d, closeViewer: u } = Re(
2252
+ const { viewerOpen: o, viewerIndex: l, handleActivate: d, closeViewer: m } = Re(
2243
2253
  r
2244
2254
  );
2245
- return /* @__PURE__ */ m("div", { className: "relative w-fit", children: [
2255
+ return /* @__PURE__ */ u("div", { className: "relative w-fit", children: [
2246
2256
  /* @__PURE__ */ s(
2247
2257
  "button",
2248
2258
  {
@@ -2270,7 +2280,7 @@ const cr = ({
2270
2280
  open: o,
2271
2281
  items: Is([{ src: e, alt: t }], n),
2272
2282
  initialIndex: l,
2273
- onClose: u
2283
+ onClose: m
2274
2284
  }
2275
2285
  )
2276
2286
  ] });
@@ -2285,15 +2295,15 @@ const cr = ({
2285
2295
  loading: l = "lazy",
2286
2296
  onClick: d
2287
2297
  }) => {
2288
- const u = br({ src: t, alt: n, items: r }), p = Me(e), { viewerOpen: h, viewerIndex: f, handleActivate: c, closeViewer: v } = Re(
2298
+ const m = br({ src: t, alt: n, items: r }), p = Me(e), { viewerOpen: h, viewerIndex: g, handleActivate: c, closeViewer: b } = Re(
2289
2299
  d
2290
2300
  );
2291
- if (u.length === 0)
2301
+ if (m.length === 0)
2292
2302
  return null;
2293
- const w = u.map(
2294
- (b, g) => pr(b, g, u.length, l)
2303
+ const x = m.map(
2304
+ (v, f) => pr(v, f, m.length, l)
2295
2305
  );
2296
- return /* @__PURE__ */ m(
2306
+ return /* @__PURE__ */ u(
2297
2307
  Te,
2298
2308
  {
2299
2309
  variant: p,
@@ -2301,14 +2311,14 @@ const cr = ({
2301
2311
  groupPosition: o,
2302
2312
  "data-testid": "image-attachment",
2303
2313
  children: [
2304
- /* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(Es, { tiles: w, onTileActivate: c }) }),
2314
+ /* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(Es, { tiles: x, onTileActivate: c }) }),
2305
2315
  /* @__PURE__ */ s(
2306
2316
  Ss,
2307
2317
  {
2308
2318
  open: h,
2309
- items: Is(u, a),
2310
- initialIndex: f,
2311
- onClose: v
2319
+ items: Is(m, a),
2320
+ initialIndex: g,
2321
+ onClose: b
2312
2322
  }
2313
2323
  )
2314
2324
  ]
@@ -2324,19 +2334,19 @@ const cr = ({
2324
2334
  initialIndex: n = 0,
2325
2335
  onClose: a
2326
2336
  }) => {
2327
- const { index: r, prev: i, next: o } = vt({
2337
+ const { index: r, prev: i, next: o } = wt({
2328
2338
  length: t.length,
2329
2339
  initialIndex: n,
2330
2340
  open: e
2331
- }), l = t[r], d = ae(
2341
+ }), l = t[r], d = se(
2332
2342
  () => (l == null ? void 0 : l.filename) ?? (l ? re(l.src) : "document"),
2333
2343
  [l]
2334
- ), u = ae(
2344
+ ), m = se(
2335
2345
  () => l ? kr(l.src) : void 0,
2336
2346
  [l]
2337
2347
  );
2338
- return !l || !u ? null : /* @__PURE__ */ m(
2339
- xt,
2348
+ return !l || !m ? null : /* @__PURE__ */ u(
2349
+ _t,
2340
2350
  {
2341
2351
  open: e,
2342
2352
  onClose: a,
@@ -2347,7 +2357,7 @@ const cr = ({
2347
2357
  /* @__PURE__ */ s(
2348
2358
  "iframe",
2349
2359
  {
2350
- src: u,
2360
+ src: m,
2351
2361
  title: d,
2352
2362
  className: "mes-media-viewer__iframe",
2353
2363
  sandbox: "allow-scripts allow-forms allow-popups allow-downloads"
@@ -2355,7 +2365,7 @@ const cr = ({
2355
2365
  `${r}:${l.src}`
2356
2366
  ),
2357
2367
  t.length > 1 ? /* @__PURE__ */ s(
2358
- bt,
2368
+ xt,
2359
2369
  {
2360
2370
  onPrev: i,
2361
2371
  onNext: o,
@@ -2396,7 +2406,7 @@ const cr = ({
2396
2406
  trailingAction: r
2397
2407
  }
2398
2408
  );
2399
- }, wt = ({
2409
+ }, Nt = ({
2400
2410
  state: e,
2401
2411
  src: t,
2402
2412
  filename: n,
@@ -2406,18 +2416,18 @@ const cr = ({
2406
2416
  text: o,
2407
2417
  groupPosition: l,
2408
2418
  onClick: d,
2409
- onDismiss: u
2419
+ onDismiss: m
2410
2420
  }) => {
2411
- const p = Me(e), h = Cr({ src: t, filename: n, fileSize: a, title: r, items: i }), { viewerOpen: f, viewerIndex: c, handleActivate: v, closeViewer: w } = Re(
2421
+ const p = Me(e), h = Cr({ src: t, filename: n, fileSize: a, title: r, items: i }), { viewerOpen: g, viewerIndex: c, handleActivate: b, closeViewer: x } = Re(
2412
2422
  d
2413
- ), b = e === "composer" && !!u;
2423
+ ), v = e === "composer" && !!m;
2414
2424
  if (h.length === 0)
2415
2425
  return null;
2416
- const g = h.map((x) => ({
2417
- src: x.src,
2418
- filename: x.filename ?? re(x.src)
2426
+ const f = h.map((N) => ({
2427
+ src: N.src,
2428
+ filename: N.filename ?? re(N.src)
2419
2429
  }));
2420
- return /* @__PURE__ */ m(
2430
+ return /* @__PURE__ */ u(
2421
2431
  Te,
2422
2432
  {
2423
2433
  variant: p,
@@ -2425,11 +2435,11 @@ const cr = ({
2425
2435
  groupPosition: l,
2426
2436
  "data-testid": "pdf-attachment",
2427
2437
  children: [
2428
- /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: h.map((x, N) => {
2429
- const C = x.filename ?? re(x.src), T = b && N === 0 ? /* @__PURE__ */ s(Ae, { onClick: u, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ s(
2438
+ /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: h.map((N, w) => {
2439
+ const C = N.filename ?? re(N.src), R = v && w === 0 ? /* @__PURE__ */ s(Ae, { onClick: m, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ s(
2430
2440
  Cs,
2431
2441
  {
2432
- url: x.src,
2442
+ url: N.src,
2433
2443
  filename: C,
2434
2444
  variant: "inline",
2435
2445
  label: `Download ${C}`,
@@ -2440,27 +2450,27 @@ const cr = ({
2440
2450
  Sr,
2441
2451
  {
2442
2452
  variant: p,
2443
- item: x,
2444
- index: N,
2445
- onActivate: v,
2446
- trailingAction: T
2453
+ item: N,
2454
+ index: w,
2455
+ onActivate: b,
2456
+ trailingAction: R
2447
2457
  },
2448
- `${x.src}-${N}`
2458
+ `${N.src}-${w}`
2449
2459
  );
2450
2460
  }) }),
2451
2461
  /* @__PURE__ */ s(
2452
2462
  yr,
2453
2463
  {
2454
- open: f,
2455
- items: g,
2464
+ open: g,
2465
+ items: f,
2456
2466
  initialIndex: c,
2457
- onClose: w
2467
+ onClose: x
2458
2468
  }
2459
2469
  )
2460
2470
  ]
2461
2471
  }
2462
2472
  );
2463
- }, Er = (e) => /* @__PURE__ */ s(wt, { ...e, state: "composer" }), Ir = (e) => /* @__PURE__ */ s(wt, { ...e, state: "sent" }), Tr = (e) => /* @__PURE__ */ s(wt, { ...e, state: "received" }), Ar = {
2473
+ }, Er = (e) => /* @__PURE__ */ s(Nt, { ...e, state: "composer" }), Ir = (e) => /* @__PURE__ */ s(Nt, { ...e, state: "sent" }), Tr = (e) => /* @__PURE__ */ s(Nt, { ...e, state: "received" }), Ar = {
2464
2474
  Composer: Er,
2465
2475
  Sent: Ir,
2466
2476
  Received: Tr
@@ -2470,16 +2480,16 @@ const cr = ({
2470
2480
  initialIndex: n = 0,
2471
2481
  onClose: a
2472
2482
  }) => {
2473
- const { index: r, prev: i, next: o } = vt({
2483
+ const { index: r, prev: i, next: o } = wt({
2474
2484
  length: t.length,
2475
2485
  initialIndex: n,
2476
2486
  open: e
2477
- }), l = t[r], d = ae(
2487
+ }), l = t[r], d = se(
2478
2488
  () => (l == null ? void 0 : l.filename) ?? (l ? re(l.src) : "video"),
2479
2489
  [l]
2480
2490
  );
2481
- return l ? /* @__PURE__ */ m(
2482
- xt,
2491
+ return l ? /* @__PURE__ */ u(
2492
+ _t,
2483
2493
  {
2484
2494
  open: e,
2485
2495
  onClose: a,
@@ -2503,7 +2513,7 @@ const cr = ({
2503
2513
  `${r}:${l.src}`
2504
2514
  ),
2505
2515
  t.length > 1 ? /* @__PURE__ */ s(
2506
- bt,
2516
+ xt,
2507
2517
  {
2508
2518
  onPrev: i,
2509
2519
  onNext: o,
@@ -2514,10 +2524,10 @@ const cr = ({
2514
2524
  ]
2515
2525
  }
2516
2526
  ) : null;
2517
- }, Mr = () => /* @__PURE__ */ s("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ s("span", { className: "flex size-12 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur", children: /* @__PURE__ */ s(tt, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), Ms = ({
2527
+ }, Mr = () => /* @__PURE__ */ s("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ s("span", { className: "flex size-12 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur", children: /* @__PURE__ */ s(nt, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), Ms = ({
2518
2528
  item: e,
2519
2529
  index: t
2520
- }) => /* @__PURE__ */ m("div", { className: "absolute inset-0 size-full bg-[#0d0d0d]", children: [
2530
+ }) => /* @__PURE__ */ u("div", { className: "absolute inset-0 size-full bg-[#0d0d0d]", children: [
2521
2531
  e.poster ? /* @__PURE__ */ s(
2522
2532
  "img",
2523
2533
  {
@@ -2540,7 +2550,7 @@ const cr = ({
2540
2550
  ] }), Rr = (e, t, n) => ({
2541
2551
  ariaLabel: `Play video ${t + 1} of ${n}`,
2542
2552
  content: /* @__PURE__ */ s(Ms, { item: e, index: t })
2543
- }), Lr = ({
2553
+ }), Dr = ({
2544
2554
  src: e,
2545
2555
  poster: t,
2546
2556
  mimeType: n,
@@ -2552,16 +2562,16 @@ const cr = ({
2552
2562
  mimeType: n.mimeType,
2553
2563
  preload: n.preload,
2554
2564
  filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
2555
- })), Dr = ({ src: e, poster: t, mimeType: n, filename: a, preload: r, onClick: i, onDismiss: o }) => {
2556
- const { viewerOpen: l, viewerIndex: d, handleActivate: u, closeViewer: p } = Re(
2565
+ })), Lr = ({ src: e, poster: t, mimeType: n, filename: a, preload: r, onClick: i, onDismiss: o }) => {
2566
+ const { viewerOpen: l, viewerIndex: d, handleActivate: m, closeViewer: p } = Re(
2557
2567
  i
2558
2568
  );
2559
- return /* @__PURE__ */ m("div", { className: "relative w-fit", children: [
2569
+ return /* @__PURE__ */ u("div", { className: "relative w-fit", children: [
2560
2570
  /* @__PURE__ */ s(
2561
2571
  "button",
2562
2572
  {
2563
2573
  type: "button",
2564
- onClick: () => u(0),
2574
+ onClick: () => m(0),
2565
2575
  "aria-label": "Play video",
2566
2576
  className: "relative block size-[280px] cursor-pointer overflow-hidden rounded-md outline-none focus-visible:ring-2 focus-visible:ring-black/40",
2567
2577
  children: /* @__PURE__ */ s(Ms, { item: { src: e, poster: t, mimeType: n }, index: 0 })
@@ -2581,7 +2591,7 @@ const cr = ({
2581
2591
  }
2582
2592
  )
2583
2593
  ] });
2584
- }, Ls = ({
2594
+ }, Ds = ({
2585
2595
  state: e,
2586
2596
  src: t,
2587
2597
  poster: n,
@@ -2591,17 +2601,17 @@ const cr = ({
2591
2601
  text: o,
2592
2602
  groupPosition: l,
2593
2603
  preload: d,
2594
- onClick: u
2604
+ onClick: m
2595
2605
  }) => {
2596
- const p = Lr({ src: t, poster: n, mimeType: a, preload: d, items: i }), h = Me(e), { viewerOpen: f, viewerIndex: c, handleActivate: v, closeViewer: w } = Re(
2597
- u
2606
+ const p = Dr({ src: t, poster: n, mimeType: a, preload: d, items: i }), h = Me(e), { viewerOpen: g, viewerIndex: c, handleActivate: b, closeViewer: x } = Re(
2607
+ m
2598
2608
  );
2599
2609
  if (p.length === 0)
2600
2610
  return null;
2601
- const b = p.map(
2602
- (g, x) => Rr(g, x, p.length)
2611
+ const v = p.map(
2612
+ (f, N) => Rr(f, N, p.length)
2603
2613
  );
2604
- return /* @__PURE__ */ m(
2614
+ return /* @__PURE__ */ u(
2605
2615
  Te,
2606
2616
  {
2607
2617
  variant: h,
@@ -2612,24 +2622,24 @@ const cr = ({
2612
2622
  /* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(
2613
2623
  Es,
2614
2624
  {
2615
- tiles: b,
2616
- onTileActivate: v,
2625
+ tiles: v,
2626
+ onTileActivate: b,
2617
2627
  className: "overflow-hidden rounded-md"
2618
2628
  }
2619
2629
  ) }),
2620
2630
  /* @__PURE__ */ s(
2621
2631
  As,
2622
2632
  {
2623
- open: f,
2633
+ open: g,
2624
2634
  items: Rs(p, r),
2625
2635
  initialIndex: c,
2626
- onClose: w
2636
+ onClose: x
2627
2637
  }
2628
2638
  )
2629
2639
  ]
2630
2640
  }
2631
2641
  );
2632
- }, zr = (e) => /* @__PURE__ */ s(Dr, { ...e }), Pr = (e) => /* @__PURE__ */ s(Ls, { ...e, state: "sent" }), Fr = (e) => /* @__PURE__ */ s(Ls, { ...e, state: "received" }), Or = {
2642
+ }, zr = (e) => /* @__PURE__ */ s(Lr, { ...e }), Pr = (e) => /* @__PURE__ */ s(Ds, { ...e, state: "sent" }), Fr = (e) => /* @__PURE__ */ s(Ds, { ...e, state: "received" }), Or = {
2633
2643
  Composer: zr,
2634
2644
  Sent: Pr,
2635
2645
  Received: Fr
@@ -2643,9 +2653,9 @@ const cr = ({
2643
2653
  isUnlocking: () => !1
2644
2654
  }, Br = {
2645
2655
  LockedAttachment: $r
2646
- }, Ds = rt({}), ml = Ds.Provider;
2656
+ }, Ls = lt({}), cl = Ls.Provider;
2647
2657
  function Ur(e) {
2648
- return Ie(Ds)[e] ?? Br[e];
2658
+ return Ie(Ls)[e] ?? Br[e];
2649
2659
  }
2650
2660
  const jr = ({ size: e = 15 }) => /* @__PURE__ */ s(
2651
2661
  "svg",
@@ -2690,31 +2700,31 @@ const jr = ({ size: e = 15 }) => /* @__PURE__ */ s(
2690
2700
  if (!r && !i)
2691
2701
  return null;
2692
2702
  if (r) {
2693
- const f = (h = e.metadata) == null ? void 0 : h.amount_text;
2694
- if (!f) return null;
2695
- const c = t ? "message-tip-standalone" : "message-tag message-tag--tip", v = t ? `${f} tip` : `Delivered with ${f} tip`;
2696
- return /* @__PURE__ */ m("div", { className: c, children: [
2703
+ const g = (h = e.metadata) == null ? void 0 : h.amount_text;
2704
+ if (!g) return null;
2705
+ const c = t ? "message-tip-standalone" : "message-tag message-tag--tip", b = t ? `${g} tip` : `Delivered with ${g} tip`;
2706
+ return /* @__PURE__ */ u("div", { className: c, children: [
2697
2707
  /* @__PURE__ */ s(qn, { size: t ? 14 : 12 }),
2698
- /* @__PURE__ */ s("span", { children: v })
2708
+ /* @__PURE__ */ s("span", { children: b })
2699
2709
  ] });
2700
2710
  }
2701
2711
  const o = n && a, l = o ? "Sent with AI" : "Sent by AI Assistant", d = [
2702
2712
  "message-chatbot-indicator",
2703
2713
  n ? "message-chatbot-indicator--sender" : "message-chatbot-indicator--receiver",
2704
2714
  o ? "message-chatbot-indicator--attachment" : "message-chatbot-indicator--text"
2705
- ].join(" "), u = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__label", children: l }), p = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ s(jr, { size: o ? 12 : 15 }) });
2706
- return /* @__PURE__ */ s("div", { className: d, "data-testid": "message-chatbot-indicator", children: n && !o ? /* @__PURE__ */ m(ee, { children: [
2707
- u,
2715
+ ].join(" "), m = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__label", children: l }), p = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ s(jr, { size: o ? 12 : 15 }) });
2716
+ return /* @__PURE__ */ s("div", { className: d, "data-testid": "message-chatbot-indicator", children: n && !o ? /* @__PURE__ */ u(te, { children: [
2717
+ m,
2708
2718
  p
2709
- ] }) : /* @__PURE__ */ m(ee, { children: [
2719
+ ] }) : /* @__PURE__ */ u(te, { children: [
2710
2720
  p,
2711
- u
2721
+ m
2712
2722
  ] }) });
2713
2723
  }, qr = ({
2714
2724
  selected: e,
2715
2725
  onVoteUp: t,
2716
2726
  onVoteDown: n
2717
- }) => /* @__PURE__ */ m("div", { className: "message-vote-buttons", children: [
2727
+ }) => /* @__PURE__ */ u("div", { className: "message-vote-buttons", children: [
2718
2728
  /* @__PURE__ */ s(
2719
2729
  "button",
2720
2730
  {
@@ -2744,9 +2754,15 @@ const jr = ({ size: e = 15 }) => /* @__PURE__ */ s(
2744
2754
  }
2745
2755
  )
2746
2756
  ] }), Je = () => {
2747
- var a;
2748
- const { message: e } = _e("SentMessageDeliveryStatus"), { messages: t } = le("SentMessageDeliveryStatus"), n = (a = t == null ? void 0 : t[t.length - 1]) == null ? void 0 : a.id;
2749
- return e.id !== n ? null : /* @__PURE__ */ m(ee, { children: [
2757
+ var i;
2758
+ const { message: e } = _e("SentMessageDeliveryStatus"), { messages: t } = le("SentMessageDeliveryStatus"), { client: n } = oe("SentMessageDeliveryStatus"), a = (i = n.user) == null ? void 0 : i.id, r = se(() => {
2759
+ var o;
2760
+ if (!(!a || !t)) {
2761
+ for (let l = t.length - 1; l >= 0; l -= 1)
2762
+ if (((o = t[l].user) == null ? void 0 : o.id) === a) return t[l].id;
2763
+ }
2764
+ }, [t, a]);
2765
+ return e.id !== r ? null : /* @__PURE__ */ u(te, { children: [
2750
2766
  /* @__PURE__ */ s(Kn, { weight: "bold", "aria-hidden": "true" }),
2751
2767
  /* @__PURE__ */ s("span", { "data-testid": "sent-message-delivery-status", children: "Delivered" })
2752
2768
  ] });
@@ -2759,7 +2775,7 @@ const jr = ({ size: e = 15 }) => /* @__PURE__ */ s(
2759
2775
  MessageSendingStatus: Wr
2760
2776
  }
2761
2777
  ), Kr = /^([a-z][a-z0-9+.-]*):/i, Jr = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
2762
- function _t(e) {
2778
+ function yt(e) {
2763
2779
  if (typeof e != "string") return;
2764
2780
  const t = e.trim();
2765
2781
  if (t === "") return;
@@ -2777,7 +2793,7 @@ const Zr = {
2777
2793
  const n = k(
2778
2794
  "mt-2 inline-flex h-10 w-full items-center justify-center rounded-full px-4 text-sm font-medium leading-none transition-colors",
2779
2795
  Zr[e]
2780
- ), a = _t(t.href);
2796
+ ), a = yt(t.href);
2781
2797
  return a ? /* @__PURE__ */ s(
2782
2798
  "a",
2783
2799
  {
@@ -2809,7 +2825,7 @@ const Zr = {
2809
2825
  }, ti = "text-white/30", si = {
2810
2826
  dark: "text-white/55",
2811
2827
  light: "text-black/55"
2812
- }, Nt = ({
2828
+ }, kt = ({
2813
2829
  variant: e,
2814
2830
  title: t,
2815
2831
  placeholderTitle: n,
@@ -2819,26 +2835,26 @@ const Zr = {
2819
2835
  cta: o,
2820
2836
  trailingAction: l
2821
2837
  }) => {
2822
- const d = e === "dark", u = t ?? (d ? n : void 0) ?? "", p = u.trim() !== "", h = a != null && a.trim() !== "", f = typeof r == "string" ? r.trim() : "", c = f !== "", v = o != null;
2823
- if (!p && !h && !c && !v) return null;
2824
- const b = k(
2838
+ const d = e === "dark", m = t ?? (d ? n : void 0) ?? "", p = m.trim() !== "", h = a != null && a.trim() !== "", g = typeof r == "string" ? r.trim() : "", c = g !== "", b = o != null;
2839
+ if (!p && !h && !c && !b) return null;
2840
+ const v = k(
2825
2841
  "truncate text-base font-medium leading-6",
2826
2842
  d && !t ? ti : ei[e]
2827
- ), g = k(
2843
+ ), f = k(
2828
2844
  "truncate text-xs leading-4",
2829
2845
  si[e]
2830
2846
  );
2831
- return /* @__PURE__ */ m("div", { className: "px-4 py-3", children: [
2832
- /* @__PURE__ */ m("div", { className: "flex items-end gap-3", children: [
2833
- /* @__PURE__ */ m("div", { className: "flex min-w-0 flex-1 flex-col gap-2", children: [
2834
- /* @__PURE__ */ m("div", { className: "flex min-w-0 flex-col gap-1", children: [
2835
- p && /* @__PURE__ */ m("div", { className: "flex min-w-0 items-center gap-2", children: [
2847
+ return /* @__PURE__ */ u("div", { className: "px-4 py-3", children: [
2848
+ /* @__PURE__ */ u("div", { className: "flex items-end gap-3", children: [
2849
+ /* @__PURE__ */ u("div", { className: "flex min-w-0 flex-1 flex-col gap-2", children: [
2850
+ /* @__PURE__ */ u("div", { className: "flex min-w-0 flex-col gap-1", children: [
2851
+ p && /* @__PURE__ */ u("div", { className: "flex min-w-0 items-center gap-2", children: [
2836
2852
  i ? /* @__PURE__ */ s("span", { className: "shrink-0", children: i }) : null,
2837
- /* @__PURE__ */ s("p", { className: k("min-w-0", b), children: u })
2853
+ /* @__PURE__ */ s("p", { className: k("min-w-0", v), children: m })
2838
2854
  ] }),
2839
- h && /* @__PURE__ */ s("p", { className: g, children: a })
2855
+ h && /* @__PURE__ */ s("p", { className: f, children: a })
2840
2856
  ] }),
2841
- !v && c && /* @__PURE__ */ s("p", { className: g, children: f })
2857
+ !b && c && /* @__PURE__ */ s("p", { className: f, children: g })
2842
2858
  ] }),
2843
2859
  l && /* @__PURE__ */ s("div", { className: "shrink-0", children: l })
2844
2860
  ] }),
@@ -2862,15 +2878,15 @@ const Zr = {
2862
2878
  bgClassName: l,
2863
2879
  "data-testid": d
2864
2880
  }) => {
2865
- const u = n != null || a != null, p = k(
2881
+ const m = n != null || a != null, p = k(
2866
2882
  ni,
2867
2883
  l ?? (e === "dark" ? "bg-[#1e2330]" : "bg-white"),
2868
2884
  // `focus-ring` is a design-system utility from the component-library
2869
2885
  // tailwind preset — outline-none + a black 2px focus-visible ring
2870
2886
  // with offset, so keyboard users can see the focused card.
2871
- u ? "cursor-pointer no-underline focus-ring" : null
2887
+ m ? "cursor-pointer no-underline focus-ring" : null
2872
2888
  ), h = o ? /* @__PURE__ */ s("div", { className: "pointer-events-auto absolute right-3 top-3 z-10", children: o }) : null;
2873
- return n ? /* @__PURE__ */ m(
2889
+ return n ? /* @__PURE__ */ u(
2874
2890
  "a",
2875
2891
  {
2876
2892
  ref: i,
@@ -2885,7 +2901,7 @@ const Zr = {
2885
2901
  h
2886
2902
  ]
2887
2903
  }
2888
- ) : a ? /* @__PURE__ */ m(
2904
+ ) : a ? /* @__PURE__ */ u(
2889
2905
  "button",
2890
2906
  {
2891
2907
  ref: i,
@@ -2899,7 +2915,7 @@ const Zr = {
2899
2915
  h
2900
2916
  ]
2901
2917
  }
2902
- ) : /* @__PURE__ */ m(
2918
+ ) : /* @__PURE__ */ u(
2903
2919
  "div",
2904
2920
  {
2905
2921
  ref: i,
@@ -2917,11 +2933,11 @@ const Zr = {
2917
2933
  }, ri = {
2918
2934
  dark: "size-16 text-white/25",
2919
2935
  light: "size-16 text-black/25"
2920
- }, Ve = (e, t) => !!t && !!e && oe(e) === "audio", yt = (e, t) => {
2936
+ }, Ve = (e, t) => !!t && !!e && ce(e) === "audio", Ct = (e, t) => {
2921
2937
  if (!t || !e) return !1;
2922
- const n = oe(e);
2938
+ const n = ce(e);
2923
2939
  return n === "video" || n === "audio";
2924
- }, kt = "bg-[#F2F3F4]", $e = ({
2940
+ }, St = "bg-[#F2F3F4]", $e = ({
2925
2941
  variant: e,
2926
2942
  thumbnailUrl: t,
2927
2943
  sourceUrl: n,
@@ -2930,7 +2946,7 @@ const Zr = {
2930
2946
  topLeft: i,
2931
2947
  topRight: o
2932
2948
  }) => {
2933
- const l = oe(r), d = !!n && l === "video";
2949
+ const l = ce(r), d = !!n && l === "video";
2934
2950
  return Ve(r, n) ? /* @__PURE__ */ s("div", { className: "p-3", children: /* @__PURE__ */ s(
2935
2951
  "audio",
2936
2952
  {
@@ -2940,7 +2956,7 @@ const Zr = {
2940
2956
  className: "block w-full",
2941
2957
  children: /* @__PURE__ */ s("track", { kind: "captions" })
2942
2958
  }
2943
- ) }) : /* @__PURE__ */ m(
2959
+ ) }) : /* @__PURE__ */ u(
2944
2960
  "div",
2945
2961
  {
2946
2962
  className: k(
@@ -2995,11 +3011,11 @@ const Zr = {
2995
3011
  sourceUrl: o,
2996
3012
  layout: l = "featured",
2997
3013
  appIcon: d,
2998
- cta: u,
3014
+ cta: m,
2999
3015
  onDismiss: p,
3000
3016
  onEditClick: h
3001
3017
  }) => {
3002
- const f = l === "classic", c = Ve(r, o), v = p ? /* @__PURE__ */ s(
3018
+ const g = l === "classic", c = Ve(r, o), b = p ? /* @__PURE__ */ s(
3003
3019
  "button",
3004
3020
  {
3005
3021
  type: "button",
@@ -3008,7 +3024,7 @@ const Zr = {
3008
3024
  className: "flex size-6 items-center justify-center rounded-full bg-[#121110] text-white",
3009
3025
  children: /* @__PURE__ */ s(Ue, { className: "size-3", weight: "bold" })
3010
3026
  }
3011
- ) : void 0, w = h ? /* @__PURE__ */ s(
3027
+ ) : void 0, x = h ? /* @__PURE__ */ s(
3012
3028
  "button",
3013
3029
  {
3014
3030
  type: "button",
@@ -3018,7 +3034,7 @@ const Zr = {
3018
3034
  children: /* @__PURE__ */ s(Jn, { className: "size-5", weight: "regular" })
3019
3035
  }
3020
3036
  ) : void 0;
3021
- return c ? /* @__PURE__ */ s(Oe, { variant: "dark", bgClassName: kt, children: /* @__PURE__ */ m("div", { className: "flex items-center gap-2 pr-3", children: [
3037
+ return c ? /* @__PURE__ */ s(Oe, { variant: "dark", bgClassName: St, children: /* @__PURE__ */ u("div", { className: "flex items-center gap-2 pr-3", children: [
3022
3038
  /* @__PURE__ */ s("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ s(
3023
3039
  $e,
3024
3040
  {
@@ -3028,14 +3044,14 @@ const Zr = {
3028
3044
  mimeType: r
3029
3045
  }
3030
3046
  ) }),
3031
- v && /* @__PURE__ */ s("div", { className: "shrink-0", children: v })
3032
- ] }) }) : /* @__PURE__ */ m(
3047
+ b && /* @__PURE__ */ s("div", { className: "shrink-0", children: b })
3048
+ ] }) }) : /* @__PURE__ */ u(
3033
3049
  Oe,
3034
3050
  {
3035
3051
  variant: "dark",
3036
- topRight: f ? v : void 0,
3052
+ topRight: g ? b : void 0,
3037
3053
  children: [
3038
- !f && /* @__PURE__ */ s(
3054
+ !g && /* @__PURE__ */ s(
3039
3055
  $e,
3040
3056
  {
3041
3057
  variant: "dark",
@@ -3043,11 +3059,11 @@ const Zr = {
3043
3059
  sourceUrl: o,
3044
3060
  title: e,
3045
3061
  mimeType: r,
3046
- topRight: v
3062
+ topRight: b
3047
3063
  }
3048
3064
  ),
3049
3065
  /* @__PURE__ */ s(
3050
- Nt,
3066
+ kt,
3051
3067
  {
3052
3068
  variant: "dark",
3053
3069
  title: e,
@@ -3055,8 +3071,8 @@ const Zr = {
3055
3071
  description: n,
3056
3072
  url: a,
3057
3073
  appIcon: d,
3058
- cta: u,
3059
- trailingAction: w
3074
+ cta: m,
3075
+ trailingAction: x
3060
3076
  }
3061
3077
  )
3062
3078
  ]
@@ -3072,23 +3088,23 @@ const Zr = {
3072
3088
  layout: o = "featured",
3073
3089
  appIcon: l,
3074
3090
  cta: d,
3075
- onClick: u
3091
+ onClick: m
3076
3092
  }) => {
3077
- const p = yt(a, i), h = _t(n), f = d == null && h != null && !p ? h : void 0, c = d == null && !p ? u : void 0, v = Ve(a, i) ? kt : void 0, w = d && u ? {
3093
+ const p = Ct(a, i), h = yt(n), g = d == null && h != null && !p ? h : void 0, c = d == null && !p ? m : void 0, b = Ve(a, i) ? St : void 0, x = d && m ? {
3078
3094
  ...d,
3079
3095
  onClick: () => {
3080
- var b;
3081
- u(), (b = d.onClick) == null || b.call(d);
3096
+ var v;
3097
+ m(), (v = d.onClick) == null || v.call(d);
3082
3098
  }
3083
3099
  } : d;
3084
- return /* @__PURE__ */ m(
3100
+ return /* @__PURE__ */ u(
3085
3101
  Oe,
3086
3102
  {
3087
3103
  variant: "light",
3088
- href: f,
3104
+ href: g,
3089
3105
  onClick: c,
3090
3106
  ariaLabel: e ?? "Open attachment preview",
3091
- bgClassName: v,
3107
+ bgClassName: b,
3092
3108
  "data-testid": "link-attachment",
3093
3109
  children: [
3094
3110
  o === "featured" && /* @__PURE__ */ s(
@@ -3102,14 +3118,14 @@ const Zr = {
3102
3118
  }
3103
3119
  ),
3104
3120
  /* @__PURE__ */ s(
3105
- Nt,
3121
+ kt,
3106
3122
  {
3107
3123
  variant: "light",
3108
3124
  title: e,
3109
3125
  description: t,
3110
3126
  url: n,
3111
3127
  appIcon: l,
3112
- cta: w
3128
+ cta: x
3113
3129
  }
3114
3130
  )
3115
3131
  ]
@@ -3125,17 +3141,17 @@ const Zr = {
3125
3141
  sourceUrl: o,
3126
3142
  layout: l = "featured",
3127
3143
  appIcon: d,
3128
- cta: u,
3144
+ cta: m,
3129
3145
  onClick: p
3130
3146
  }) => {
3131
- const h = yt(r, o), f = _t(a), c = u == null && f != null && !h ? f : void 0, v = u == null && !h && c != null ? p : void 0;
3132
- return /* @__PURE__ */ m(
3147
+ const h = Ct(r, o), g = yt(a), c = m == null && g != null && !h ? g : void 0, b = m == null && !h && c != null ? p : void 0;
3148
+ return /* @__PURE__ */ u(
3133
3149
  Oe,
3134
3150
  {
3135
3151
  variant: "dark",
3136
3152
  href: c,
3137
- onClick: v,
3138
- bgClassName: Ve(r, o) ? kt : void 0,
3153
+ onClick: b,
3154
+ bgClassName: Ve(r, o) ? St : void 0,
3139
3155
  children: [
3140
3156
  l === "featured" && /* @__PURE__ */ s(
3141
3157
  $e,
@@ -3148,7 +3164,7 @@ const Zr = {
3148
3164
  }
3149
3165
  ),
3150
3166
  /* @__PURE__ */ s(
3151
- Nt,
3167
+ kt,
3152
3168
  {
3153
3169
  variant: "dark",
3154
3170
  title: e,
@@ -3156,7 +3172,7 @@ const Zr = {
3156
3172
  description: n,
3157
3173
  url: a,
3158
3174
  appIcon: d,
3159
- cta: u
3175
+ cta: m
3160
3176
  }
3161
3177
  )
3162
3178
  ]
@@ -3166,7 +3182,7 @@ const Zr = {
3166
3182
  Composer: ii,
3167
3183
  Sent: oi,
3168
3184
  Received: li
3169
- }, ci = "mt-[2px] max-w-[280px] whitespace-pre-wrap break-words rounded-[18px] bg-[#121110] px-4 py-2 text-white", di = "mt-[2px] max-w-[280px] whitespace-pre-wrap break-words rounded-[18px] bg-[#e9eaed] px-4 py-2 text-[#080707]";
3185
+ };
3170
3186
  function P(e) {
3171
3187
  const t = e == null ? void 0 : e.trim();
3172
3188
  return t || void 0;
@@ -3174,7 +3190,7 @@ function P(e) {
3174
3190
  function ts(e) {
3175
3191
  return e.trim().replace(/^https?:\/\//i, "").replace(/\/+$/, "").toLowerCase();
3176
3192
  }
3177
- function ui(e, t) {
3193
+ function ci(e, t) {
3178
3194
  if (!(e != null && e.trim()) || !(t != null && t.trim()))
3179
3195
  return !1;
3180
3196
  const n = ts(e), a = ts(t);
@@ -3195,11 +3211,11 @@ function ss(e) {
3195
3211
  // Playable clip embedded in a link preview — lets LinkAttachment render its
3196
3212
  // native video/audio player in the hero instead of a static thumbnail.
3197
3213
  sourceUrl: a,
3198
- layout: n || yt(r, a) ? "featured" : "classic",
3214
+ layout: n || Ct(r, a) ? "featured" : "classic",
3199
3215
  mimeType: r
3200
3216
  };
3201
3217
  }
3202
- function mi(e) {
3218
+ function di(e) {
3203
3219
  var t;
3204
3220
  return Ps(e) ? null : e.type === "image" ? e.image_url || e.asset_url ? "image" : null : e.type === "video" && e.asset_url ? "video" : e.type === "audio" && e.asset_url ? "audio" : e.type === "file" && e.asset_url ? e.mime_type === "application/pdf" ? "pdf" : (t = e.mime_type) != null && t.startsWith("audio/") ? "audio" : "file" : null;
3205
3221
  }
@@ -3229,27 +3245,21 @@ function Fs(e) {
3229
3245
  a(r);
3230
3246
  continue;
3231
3247
  }
3232
- const i = mi(r);
3248
+ const i = di(r);
3233
3249
  i && n(i, r);
3234
3250
  }
3235
3251
  return t;
3236
3252
  }
3237
- function hi(e) {
3238
- let t = 0;
3239
- for (const n of e)
3240
- t += n.type === "link" ? n.attachments.length : 1;
3241
- return t;
3242
- }
3243
- function fi(e) {
3253
+ function ui(e) {
3244
3254
  return e.filter((t) => t.type === "media").length;
3245
3255
  }
3246
- function gi(e, t, n) {
3256
+ function mi(e, t, n) {
3247
3257
  return t <= 1 ? n : e === 0 ? "first" : e === t - 1 ? "end" : "middle";
3248
3258
  }
3249
3259
  function ns(e) {
3250
3260
  return P(e.image_url) ?? P(e.asset_url) ?? "";
3251
3261
  }
3252
- function pi(e) {
3262
+ function hi(e) {
3253
3263
  switch (e) {
3254
3264
  case "image":
3255
3265
  return ye.Image;
@@ -3263,7 +3273,7 @@ function pi(e) {
3263
3273
  return ye.File;
3264
3274
  }
3265
3275
  }
3266
- function bi(e, t) {
3276
+ function fi(e, t) {
3267
3277
  if (t.length > 1)
3268
3278
  switch (e) {
3269
3279
  case "image":
@@ -3350,69 +3360,90 @@ function bi(e, t) {
3350
3360
  };
3351
3361
  }
3352
3362
  }
3353
- function vi({
3363
+ function gi({
3354
3364
  groupPosition: e,
3355
3365
  isMyMessage: t,
3356
- segment: n,
3357
- text: a
3366
+ segment: n
3358
3367
  }) {
3359
- const r = pi(n.kind), i = {
3360
- ...bi(n.kind, n.attachments),
3361
- groupPosition: e,
3362
- ...a ? { text: a } : {}
3368
+ const a = hi(n.kind), r = {
3369
+ ...fi(n.kind, n.attachments),
3370
+ groupPosition: e
3363
3371
  };
3364
- return t ? /* @__PURE__ */ s(r.Sent, { ...i }) : /* @__PURE__ */ s(r.Received, { ...i });
3372
+ return t ? /* @__PURE__ */ s(a.Sent, { ...r }) : /* @__PURE__ */ s(a.Received, { ...r });
3365
3373
  }
3366
- const xi = ({
3374
+ const pi = ({
3367
3375
  groupPosition: e,
3368
3376
  isMyMessage: t,
3369
- message: n
3377
+ message: n,
3378
+ renderText: a
3370
3379
  }) => {
3371
- var w;
3372
- const a = Fs(n.attachments);
3373
- if (a.length === 0) return null;
3374
- const r = hi(a), i = fi(a), o = (w = n.text) == null ? void 0 : w.trim(), l = a.find((b) => b.type === "link"), d = (l == null ? void 0 : l.type) === "link" ? ss(l.attachments[0] ?? {}).url : void 0, u = o && ui(o, d) ? void 0 : o;
3375
- let p = 0, h = 0;
3376
- const f = [], c = (b, g) => {
3377
- const x = p === r - 1;
3378
- p += 1;
3379
- const N = t ? es.Sent : es.Received;
3380
- f.push(
3381
- /* @__PURE__ */ m(V.Fragment, { children: [
3382
- /* @__PURE__ */ s(N, { ...ss(b) }),
3383
- x && u ? /* @__PURE__ */ s("div", { className: t ? ci : di, children: u }) : null
3384
- ] }, g)
3380
+ var b;
3381
+ const r = Fs(n.attachments);
3382
+ if (r.length === 0) return null;
3383
+ const i = ui(r), o = (b = n.text) == null ? void 0 : b.trim(), l = r.find((x) => x.type === "link"), d = (l == null ? void 0 : l.type) === "link" ? ss(l.attachments[0] ?? {}).url : void 0, m = o && ci(o, d) ? void 0 : o;
3384
+ let p = 0;
3385
+ const h = [], g = (x, v) => {
3386
+ const f = t ? es.Sent : es.Received;
3387
+ h.push(
3388
+ /* @__PURE__ */ s(f, { ...ss(x) }, v)
3385
3389
  );
3386
- }, v = (b, g) => {
3387
- const x = p === r - 1, N = gi(
3388
- h,
3390
+ }, c = (x, v) => {
3391
+ const f = mi(
3392
+ p,
3389
3393
  i,
3390
3394
  e
3391
3395
  );
3392
- p += 1, h += 1, f.push(
3396
+ p += 1, h.push(
3393
3397
  /* @__PURE__ */ s(
3394
- vi,
3398
+ gi,
3395
3399
  {
3396
- groupPosition: N,
3400
+ groupPosition: f,
3397
3401
  isMyMessage: t,
3398
- segment: b,
3399
- text: x ? u : void 0
3402
+ segment: x
3400
3403
  },
3401
- g
3404
+ v
3402
3405
  )
3403
3406
  );
3404
3407
  };
3405
- return a.forEach((b, g) => {
3406
- if (b.type === "link") {
3407
- b.attachments.forEach((x, N) => {
3408
- c(x, `link-${g}-${N}`);
3408
+ return r.forEach((x, v) => {
3409
+ if (x.type === "link") {
3410
+ x.attachments.forEach((f, N) => {
3411
+ g(f, `link-${v}-${N}`);
3409
3412
  });
3410
3413
  return;
3411
3414
  }
3412
- v(b, `media-${g}`);
3413
- }), /* @__PURE__ */ s(ee, { children: f });
3414
- }, wi = (e) => {
3415
- var At, Mt, Rt, Lt, Dt, zt, Pt, Ft, Ot, $t, Bt, Ut, jt, Vt;
3415
+ c(x, `media-${v}`);
3416
+ }), /* @__PURE__ */ u("div", { className: "str-chat__message-bubble-wrapper", children: [
3417
+ /* @__PURE__ */ u(
3418
+ "div",
3419
+ {
3420
+ className: "str-chat__message-bubble",
3421
+ "data-attachment-bubble": "true",
3422
+ style: {
3423
+ background: "transparent",
3424
+ borderRadius: 0,
3425
+ overflow: "visible",
3426
+ padding: 0
3427
+ },
3428
+ children: [
3429
+ h,
3430
+ !m && /* @__PURE__ */ s(et, {})
3431
+ ]
3432
+ }
3433
+ ),
3434
+ m ? /* @__PURE__ */ u("div", { className: "str-chat__message-bubble", children: [
3435
+ /* @__PURE__ */ s(
3436
+ tt,
3437
+ {
3438
+ message: n,
3439
+ renderText: a
3440
+ }
3441
+ ),
3442
+ /* @__PURE__ */ s(et, {})
3443
+ ] }) : null
3444
+ ] });
3445
+ }, bi = (e) => {
3446
+ var Rt, Dt, Lt, zt, Pt, Ft, Ot, $t, Bt, Ut, jt, Vt, Gt, Ht;
3416
3447
  const {
3417
3448
  additionalMessageInputProps: t,
3418
3449
  chatbotVotingEnabled: n,
@@ -3422,44 +3453,44 @@ const xi = ({
3422
3453
  groupedByUser: o,
3423
3454
  handleAction: l,
3424
3455
  handleOpenThread: d,
3425
- handleRetry: u,
3456
+ handleRetry: m,
3426
3457
  highlighted: p,
3427
3458
  isMessageAIGenerated: h,
3428
- isMyMessage: f,
3459
+ isMyMessage: g,
3429
3460
  message: c,
3430
- renderText: v,
3431
- threadList: w,
3432
- viewerLanguage: b
3433
- } = e, { client: g } = me("CustomMessage"), { channel: x } = le("CustomMessage"), { isUnlocking: N, onUnlockClick: C, onFetchSource: T, onDownloadClick: A } = Ur("LockedAttachment"), [L, $] = U(!1), F = Js(c.id), { selected: D, voteUp: y, voteDown: I } = xa(c), {
3434
- Attachment: S = Zs,
3435
- EditMessageModal: R = Qs,
3436
- MessageActions: E,
3461
+ renderText: b,
3462
+ threadList: x,
3463
+ viewerLanguage: v
3464
+ } = e, { client: f } = oe("CustomMessage"), { channel: N } = le("CustomMessage"), { isUnlocking: w, onUnlockClick: C, onFetchSource: R, onDownloadClick: S } = Ur("LockedAttachment"), [D, $] = U(!1), F = Js(c.id), { selected: L, voteUp: y, voteDown: E } = xa(c), {
3465
+ Attachment: I = Zs,
3466
+ EditMessageModal: M = Qs,
3467
+ MessageActions: T,
3437
3468
  MessageBlocked: z = en,
3438
3469
  MessageBouncePrompt: O = tn,
3439
3470
  MessageDeleted: j = sn,
3440
3471
  MessageIsThreadReplyInChannelButtonIndicator: X = nn,
3441
- MessageRepliesCountButton: te = an,
3472
+ MessageRepliesCountButton: ee = an,
3442
3473
  ReminderNotification: K = rn,
3443
3474
  StreamedMessageText: _ = ln,
3444
- PinIndicator: M
3445
- } = is("CustomMessage"), H = on(c), q = cn(c), Y = ae(
3475
+ PinIndicator: A
3476
+ } = is("CustomMessage"), H = on(c), q = cn(c), Y = se(
3446
3477
  () => h == null ? void 0 : h(c),
3447
3478
  [h, c]
3448
- ), B = ae(() => {
3449
- const ue = c.attachments ?? [], pe = c.shared_location ? [c.shared_location, ...ue] : ue;
3479
+ ), B = se(() => {
3480
+ const me = c.attachments ?? [], pe = c.shared_location ? [c.shared_location, ...me] : me;
3450
3481
  if (!Fe(c)) return pe;
3451
- const Gt = pe.filter((Ht) => !("type" in Ht) || !ws(Ht));
3452
- return Gt.length === pe.length ? pe : Gt;
3453
- }, [c]), W = ae(
3482
+ const Yt = pe.filter((qt) => !("type" in qt) || !ws(qt));
3483
+ return Yt.length === pe.length ? pe : Yt;
3484
+ }, [c]), W = se(
3454
3485
  () => Fs(B),
3455
3486
  [B]
3456
- ), Q = ae(() => {
3457
- const ue = hs({ message: c, viewerLanguage: b });
3458
- return ue === c.text ? c : { ...c, text: ue };
3459
- }, [c, b]), ce = W.length > 0, Le = W.reduce(
3460
- (ue, pe) => ue + pe.attachments.length,
3487
+ ), Q = se(() => {
3488
+ const me = hs({ message: c, viewerLanguage: v });
3489
+ return me === c.text ? c : { ...c, text: me };
3490
+ }, [c, v]), de = W.length > 0, De = W.reduce(
3491
+ (me, pe) => me + pe.attachments.length,
3461
3492
  0
3462
- ) === ((B == null ? void 0 : B.length) ?? 0), De = Xa(
3493
+ ) === ((B == null ? void 0 : B.length) ?? 0), Le = Xa(
3463
3494
  {
3464
3495
  endOfGroup: r,
3465
3496
  firstOfGroup: i,
@@ -3472,10 +3503,10 @@ const xi = ({
3472
3503
  return /* @__PURE__ */ s(j, { message: c });
3473
3504
  if (un(c))
3474
3505
  return /* @__PURE__ */ s(z, {});
3475
- const ne = !w && !!c.reply_count, de = !w && c.show_in_channel && c.parent_id, ie = c.status === "failed" && ((At = c.error) == null ? void 0 : At.status) !== 403, St = mn(c);
3506
+ const ae = !x && !!c.reply_count, ue = !x && c.show_in_channel && c.parent_id, ie = c.status === "failed" && ((Rt = c.error) == null ? void 0 : Rt.status) !== 403, It = mn(c);
3476
3507
  let he;
3477
- ie ? he = () => u(c) : St && (he = () => $(!0));
3478
- const fe = f(), js = k(
3508
+ ie ? he = () => m(c) : It && (he = () => $(!0));
3509
+ const fe = g(), js = k(
3479
3510
  "str-chat__message str-chat__message-simple",
3480
3511
  `str-chat__message--${c.type}`,
3481
3512
  `str-chat__message--${c.status}`,
@@ -3486,39 +3517,39 @@ const xi = ({
3486
3517
  "str-chat__message--highlighted": p,
3487
3518
  "str-chat__message--pinned pinned-message": c.pinned,
3488
3519
  "str-chat__message--with-reactions": q,
3489
- "str-chat__message-send-can-be-retried": (c == null ? void 0 : c.status) === "failed" && ((Mt = c == null ? void 0 : c.error) == null ? void 0 : Mt.status) !== 403,
3490
- "str-chat__message-with-thread-link": ne || de,
3520
+ "str-chat__message-send-can-be-retried": (c == null ? void 0 : c.status) === "failed" && ((Dt = c == null ? void 0 : c.error) == null ? void 0 : Dt.status) !== 403,
3521
+ "str-chat__message-with-thread-link": ae || ue,
3491
3522
  "str-chat__virtual-message__wrapper--end": r,
3492
3523
  "str-chat__virtual-message__wrapper--first": i,
3493
3524
  "str-chat__virtual-message__wrapper--group": o
3494
3525
  }
3495
- ), Ge = c.poll_id && g.polls.fromState(c.poll_id), Et = Yr(c), ge = Fe(c), It = Hr(c), He = !!(B != null && B.length && !c.quoted_message), Tt = ge && fe && He, Vs = ce && Le && !c.quoted_message && !Ge && !Y && !ge;
3496
- return /* @__PURE__ */ m(ee, { children: [
3526
+ ), Ge = c.poll_id && f.polls.fromState(c.poll_id), Tt = Yr(c), ge = Fe(c), At = Hr(c), He = !!(B != null && B.length && !c.quoted_message), Mt = ge && fe && He, Vs = de && De && !c.quoted_message && !Ge && !Y && !ge;
3527
+ return /* @__PURE__ */ u(te, { children: [
3497
3528
  a && /* @__PURE__ */ s(
3498
- R,
3529
+ M,
3499
3530
  {
3500
3531
  additionalMessageInputProps: t
3501
3532
  }
3502
3533
  ),
3503
- L && /* @__PURE__ */ s(
3534
+ D && /* @__PURE__ */ s(
3504
3535
  hn,
3505
3536
  {
3506
3537
  MessageBouncePrompt: O,
3507
3538
  onClose: () => $(!1),
3508
- open: L
3539
+ open: D
3509
3540
  }
3510
3541
  ),
3511
- /* @__PURE__ */ m(
3542
+ /* @__PURE__ */ u(
3512
3543
  "div",
3513
3544
  {
3514
3545
  className: js,
3515
3546
  "data-message-id": c.id,
3516
3547
  "data-dd-privacy": "mask",
3517
3548
  children: [
3518
- M && /* @__PURE__ */ s(M, {}),
3549
+ A && /* @__PURE__ */ s(A, {}),
3519
3550
  !!F && /* @__PURE__ */ s(K, { reminder: F }),
3520
3551
  c.user && /* @__PURE__ */ s(
3521
- se,
3552
+ ne,
3522
3553
  {
3523
3554
  className: "str-chat__avatar str-chat__message-sender-avatar",
3524
3555
  id: c.user.id,
@@ -3533,7 +3564,7 @@ const xi = ({
3533
3564
  "div",
3534
3565
  {
3535
3566
  className: k("str-chat__message-inner", {
3536
- "str-chat__simple-message--error-failed": ie || St
3567
+ "str-chat__simple-message--error-failed": ie || It
3537
3568
  }),
3538
3569
  "data-testid": "message-inner",
3539
3570
  onClick: he,
@@ -3546,77 +3577,67 @@ const xi = ({
3546
3577
  marginInlineEnd: 0,
3547
3578
  marginInlineStart: 0
3548
3579
  },
3549
- children: It ? /* @__PURE__ */ m("div", { className: "str-chat__message-bubble-wrapper", children: [
3550
- fe ? /* @__PURE__ */ m("div", { className: "flex items-center gap-2", children: [
3551
- E && /* @__PURE__ */ s(E, {}),
3580
+ children: At ? /* @__PURE__ */ u("div", { className: "str-chat__message-bubble-wrapper", children: [
3581
+ fe ? /* @__PURE__ */ u("div", { className: "flex items-center gap-2", children: [
3582
+ T && /* @__PURE__ */ s(T, {}),
3552
3583
  /* @__PURE__ */ s(
3553
3584
  Zt.Sent,
3554
3585
  {
3555
- title: (Rt = c.metadata) == null ? void 0 : Rt.attachment_title,
3556
- mimeType: (Lt = c.metadata) == null ? void 0 : Lt.attachment_mime_type,
3557
- thumbnailUrl: (Dt = c.metadata) == null ? void 0 : Dt.attachment_thumbnail,
3558
- amountText: (zt = c.metadata) == null ? void 0 : zt.amount_text,
3559
- detail: (Pt = c.metadata) == null ? void 0 : Pt.attachment_detail,
3560
- paymentStatus: (Ft = c.metadata) == null ? void 0 : Ft.payment_status,
3561
- onPreviewClick: () => C == null ? void 0 : C(c, x),
3562
- onFetchSource: async () => await (T == null ? void 0 : T(c, x))
3586
+ title: (Lt = c.metadata) == null ? void 0 : Lt.attachment_title,
3587
+ mimeType: (zt = c.metadata) == null ? void 0 : zt.attachment_mime_type,
3588
+ thumbnailUrl: (Pt = c.metadata) == null ? void 0 : Pt.attachment_thumbnail,
3589
+ amountText: (Ft = c.metadata) == null ? void 0 : Ft.amount_text,
3590
+ detail: (Ot = c.metadata) == null ? void 0 : Ot.attachment_detail,
3591
+ paymentStatus: ($t = c.metadata) == null ? void 0 : $t.payment_status,
3592
+ onPreviewClick: () => C == null ? void 0 : C(c, N),
3593
+ onFetchSource: async () => await (R == null ? void 0 : R(c, N))
3563
3594
  }
3564
3595
  )
3565
- ] }) : /* @__PURE__ */ m("div", { className: "flex items-center gap-2", children: [
3596
+ ] }) : /* @__PURE__ */ u("div", { className: "flex items-center gap-2", children: [
3566
3597
  /* @__PURE__ */ s(
3567
3598
  Zt.Received,
3568
3599
  {
3569
- title: (Ot = c.metadata) == null ? void 0 : Ot.attachment_title,
3570
- mimeType: ($t = c.metadata) == null ? void 0 : $t.attachment_mime_type,
3571
- thumbnailUrl: (Bt = c.metadata) == null ? void 0 : Bt.attachment_thumbnail,
3572
- amountText: (Ut = c.metadata) == null ? void 0 : Ut.amount_text,
3573
- detail: (jt = c.metadata) == null ? void 0 : jt.attachment_detail,
3574
- paymentStatus: (Vt = c.metadata) == null ? void 0 : Vt.payment_status,
3575
- isUnlocking: N(c.id),
3576
- onUnlockClick: () => C == null ? void 0 : C(c, x),
3577
- onFetchSource: async () => await (T == null ? void 0 : T(c, x)),
3578
- onDownloadClick: () => A == null ? void 0 : A(c, x)
3600
+ title: (Bt = c.metadata) == null ? void 0 : Bt.attachment_title,
3601
+ mimeType: (Ut = c.metadata) == null ? void 0 : Ut.attachment_mime_type,
3602
+ thumbnailUrl: (jt = c.metadata) == null ? void 0 : jt.attachment_thumbnail,
3603
+ amountText: (Vt = c.metadata) == null ? void 0 : Vt.amount_text,
3604
+ detail: (Gt = c.metadata) == null ? void 0 : Gt.attachment_detail,
3605
+ paymentStatus: (Ht = c.metadata) == null ? void 0 : Ht.payment_status,
3606
+ isUnlocking: w(c.id),
3607
+ onUnlockClick: () => C == null ? void 0 : C(c, N),
3608
+ onFetchSource: async () => await (R == null ? void 0 : R(c, N)),
3609
+ onDownloadClick: () => S == null ? void 0 : S(c, N)
3579
3610
  }
3580
3611
  ),
3581
- E && /* @__PURE__ */ s(E, {})
3612
+ T && /* @__PURE__ */ s(T, {})
3582
3613
  ] }),
3583
3614
  c.text && /* @__PURE__ */ s("div", { className: "str-chat__message-bubble", children: /* @__PURE__ */ s(
3584
- qt,
3615
+ tt,
3585
3616
  {
3586
3617
  message: Q,
3587
- renderText: v
3618
+ renderText: b
3588
3619
  }
3589
3620
  ) })
3590
- ] }) : Et ? (
3621
+ ] }) : Tt ? (
3591
3622
  /* Tip-only messages render as a standalone bubble */
3592
3623
  /* @__PURE__ */ s(Ke, { message: c, standalone: !0 })
3593
- ) : Vs ? /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ m(
3594
- "div",
3624
+ ) : Vs ? /* @__PURE__ */ s(
3625
+ pi,
3595
3626
  {
3596
- className: "str-chat__message-bubble",
3597
- style: {
3598
- background: "transparent",
3599
- borderRadius: 0,
3600
- overflow: "visible",
3601
- padding: 0
3627
+ groupPosition: Le,
3628
+ isMyMessage: fe,
3629
+ message: {
3630
+ ...Q,
3631
+ attachments: B,
3632
+ // MessageText prefers message.i18n[userLanguage_text] from
3633
+ // Stream's TranslationContext over message.text. Drop i18n so
3634
+ // the caption uses displayMessage.text from viewerLanguage.
3635
+ i18n: void 0
3602
3636
  },
3603
- children: [
3604
- /* @__PURE__ */ s(
3605
- xi,
3606
- {
3607
- groupPosition: De,
3608
- isMyMessage: fe,
3609
- message: {
3610
- attachments: B,
3611
- text: Q.text
3612
- }
3613
- }
3614
- ),
3615
- /* @__PURE__ */ s(Wt, {})
3616
- ]
3637
+ renderText: b
3617
3638
  }
3618
- ) }) : /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ m("div", { className: "str-chat__message-bubble", children: [
3619
- ge && !Tt && /* @__PURE__ */ s(
3639
+ ) : /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ u("div", { className: "str-chat__message-bubble", children: [
3640
+ ge && !Mt && /* @__PURE__ */ s(
3620
3641
  Ke,
3621
3642
  {
3622
3643
  message: c,
@@ -3626,7 +3647,7 @@ const xi = ({
3626
3647
  ),
3627
3648
  Ge && /* @__PURE__ */ s(fn, { poll: Ge }),
3628
3649
  B != null && B.length && !c.quoted_message ? /* @__PURE__ */ s(
3629
- S,
3650
+ I,
3630
3651
  {
3631
3652
  actionHandler: l,
3632
3653
  attachments: B
@@ -3636,21 +3657,21 @@ const xi = ({
3636
3657
  _,
3637
3658
  {
3638
3659
  message: Q,
3639
- renderText: v
3660
+ renderText: b
3640
3661
  }
3641
3662
  ) : /* @__PURE__ */ s(
3642
- qt,
3663
+ tt,
3643
3664
  {
3644
3665
  message: Q,
3645
- renderText: v
3666
+ renderText: b
3646
3667
  }
3647
3668
  ),
3648
- /* @__PURE__ */ s(Wt, {})
3669
+ /* @__PURE__ */ s(et, {})
3649
3670
  ] }) })
3650
3671
  }
3651
3672
  ),
3652
- !It && !Et && /* @__PURE__ */ m("div", { className: "str-chat__message-footer", children: [
3653
- (!ge || Tt) && /* @__PURE__ */ s(
3673
+ !At && !Tt && /* @__PURE__ */ u("div", { className: "str-chat__message-footer", children: [
3674
+ (!ge || Mt) && /* @__PURE__ */ s(
3654
3675
  Ke,
3655
3676
  {
3656
3677
  message: c,
@@ -3661,33 +3682,33 @@ const xi = ({
3661
3682
  n && ge && /* @__PURE__ */ s(
3662
3683
  qr,
3663
3684
  {
3664
- selected: D,
3685
+ selected: L,
3665
3686
  onVoteUp: y,
3666
- onVoteDown: I
3687
+ onVoteDown: E
3667
3688
  }
3668
3689
  )
3669
3690
  ] }),
3670
3691
  /* @__PURE__ */ s(Xr, {}),
3671
- ne && /* @__PURE__ */ s(
3672
- te,
3692
+ ae && /* @__PURE__ */ s(
3693
+ ee,
3673
3694
  {
3674
3695
  onClick: d,
3675
3696
  reply_count: c.reply_count
3676
3697
  }
3677
3698
  ),
3678
- de && /* @__PURE__ */ s(X, {})
3699
+ ue && /* @__PURE__ */ s(X, {})
3679
3700
  ]
3680
3701
  },
3681
3702
  c.id
3682
3703
  )
3683
3704
  ] });
3684
- }, _i = V.memo(
3685
- wi,
3705
+ }, vi = V.memo(
3706
+ bi,
3686
3707
  (e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 : Ks(e, t)
3687
- ), Ni = (e) => {
3708
+ ), xi = (e) => {
3688
3709
  const t = _e("CustomMessage");
3689
- return /* @__PURE__ */ s(_i, { ...t, ...e });
3690
- }, yi = () => {
3710
+ return /* @__PURE__ */ s(vi, { ...t, ...e });
3711
+ }, wi = () => {
3691
3712
  var n;
3692
3713
  const { handleDelete: e, message: t } = _e("CustomMessageActions");
3693
3714
  return ((n = t.metadata) == null ? void 0 : n.payment_status) === "paid" ? null : /* @__PURE__ */ s(
@@ -3700,7 +3721,7 @@ const xi = ({
3700
3721
  children: /* @__PURE__ */ s(Zn, { size: 16, weight: "light", "aria-hidden": !0 })
3701
3722
  }
3702
3723
  );
3703
- }, ki = () => {
3724
+ }, _i = () => {
3704
3725
  const { handleFlag: e } = _e("CustomMessageActions");
3705
3726
  return /* @__PURE__ */ s(
3706
3727
  ds,
@@ -3712,24 +3733,24 @@ const xi = ({
3712
3733
  children: /* @__PURE__ */ s(ls, { size: 16, weight: "light", "aria-hidden": !0 })
3713
3734
  }
3714
3735
  );
3715
- }, Ci = () => {
3736
+ }, Ni = () => {
3716
3737
  var t;
3717
3738
  const { message: e } = _e("CustomMessageActions");
3718
3739
  return ((t = e.metadata) == null ? void 0 : t.custom_type) !== "MESSAGE_ATTACHMENT" ? null : /* @__PURE__ */ s(
3719
3740
  ta,
3720
3741
  {
3721
3742
  messageActionSet: [
3722
- { Component: yi, placement: "quick", type: "delete" },
3723
- { Component: ki, placement: "quick", type: "flag" }
3743
+ { Component: wi, placement: "quick", type: "delete" },
3744
+ { Component: _i, placement: "quick", type: "flag" }
3724
3745
  ]
3725
3746
  }
3726
3747
  );
3727
- }, Si = ({
3748
+ }, yi = ({
3728
3749
  link: e,
3729
3750
  onDismiss: t
3730
3751
  }) => {
3731
3752
  const { og_scrape_url: n, title: a, image_url: r } = e;
3732
- return /* @__PURE__ */ m(
3753
+ return /* @__PURE__ */ u(
3733
3754
  "a",
3734
3755
  {
3735
3756
  href: n,
@@ -3757,21 +3778,21 @@ const xi = ({
3757
3778
  children: /* @__PURE__ */ s(Ue, { className: "size-4 text-black/90" })
3758
3779
  }
3759
3780
  ),
3760
- /* @__PURE__ */ m("div", { className: "p-2", children: [
3781
+ /* @__PURE__ */ u("div", { className: "p-2", children: [
3761
3782
  a && /* @__PURE__ */ s("div", { className: "truncate text-[14px] font-medium leading-5 text-white", children: a }),
3762
3783
  /* @__PURE__ */ s("div", { className: "truncate text-[12px] leading-4 text-white/55", children: n })
3763
3784
  ] })
3764
3785
  ]
3765
3786
  }
3766
3787
  );
3767
- }, Ei = (e) => ({
3788
+ }, ki = (e) => ({
3768
3789
  linkPreviews: Array.from(e.previews.values()).filter(
3769
- (t) => Yt.previewIsLoaded(t) || Yt.previewIsLoading(t)
3790
+ (t) => Wt.previewIsLoaded(t) || Wt.previewIsLoading(t)
3770
3791
  )
3771
- }), Ii = () => {
3792
+ }), Ci = () => {
3772
3793
  const { linkPreviewsManager: e } = gn(), { linkPreviews: t } = pn(
3773
3794
  e.state,
3774
- Ei
3795
+ ki
3775
3796
  ), n = (r) => {
3776
3797
  e.dismissPreview(r);
3777
3798
  };
@@ -3784,9 +3805,9 @@ const xi = ({
3784
3805
  // block so it keeps its intrinsic height and the container scrolls — a
3785
3806
  // bare flex-column child would be shrunk on the column axis and its
3786
3807
  // fixed-height hero would spill out of the collapsed card box.
3787
- /* @__PURE__ */ s("div", { className: "messaging-link-preview-list flex min-h-0 flex-col items-stretch w-full gap-2 mb-4 overflow-y-auto overscroll-contain", children: t.map((r) => /* @__PURE__ */ s("div", { className: "w-full shrink-0", children: /* @__PURE__ */ s(Si, { link: r, onDismiss: n }) }, r.og_scrape_url)) })
3808
+ /* @__PURE__ */ s("div", { className: "messaging-link-preview-list flex min-h-0 flex-col items-stretch w-full gap-2 mb-4 overflow-y-auto overscroll-contain", children: t.map((r) => /* @__PURE__ */ s("div", { className: "w-full shrink-0", children: /* @__PURE__ */ s(yi, { link: r, onDismiss: n }) }, r.og_scrape_url)) })
3788
3809
  ) : null;
3789
- }, Ct = V.createContext(!1), hl = () => Ie(Ct), Ti = ({ sendMessage: e, disabled: t, ...n }) => /* @__PURE__ */ s(
3810
+ }, Et = V.createContext(!1), dl = () => Ie(Et), Si = ({ sendMessage: e, disabled: t, ...n }) => /* @__PURE__ */ s(
3790
3811
  "button",
3791
3812
  {
3792
3813
  ...n,
@@ -3796,9 +3817,9 @@ const xi = ({
3796
3817
  onClick: e,
3797
3818
  children: /* @__PURE__ */ s(Qn, { weight: "bold", className: "size-4" })
3798
3819
  }
3799
- ), Ai = () => {
3800
- const e = Ie(Ct), { handleSubmit: t } = vn(), n = xn(), a = e || !n, {
3801
- SendButton: r = Ti,
3820
+ ), Ei = () => {
3821
+ const e = Ie(Et), { handleSubmit: t } = vn(), n = xn(), a = e || !n, {
3822
+ SendButton: r = Si,
3802
3823
  AttachmentPreviewList: i = wn
3803
3824
  } = is("CustomMessageInput");
3804
3825
  return (
@@ -3810,16 +3831,16 @@ const xi = ({
3810
3831
  // content height and the squeeze never reaches the preview list. Stream's
3811
3832
  // <MessageInput> renders its Input directly (context providers only, no
3812
3833
  // wrapper element), so this is a direct flex item of that row.
3813
- /* @__PURE__ */ m(
3834
+ /* @__PURE__ */ u(
3814
3835
  "div",
3815
3836
  {
3816
3837
  className: "central-container flex min-h-0 flex-col gap-2 min-w-0 w-full self-stretch p-2 bg-white rounded-[1.5rem] shadow-[0_4px_16px_0_rgba(0,0,0,0.08),0_1px_2px_0_rgba(0,0,0,0.04),0_0_0_1px_rgba(0,0,0,0.04)]",
3817
3838
  "data-dd-privacy": "mask",
3818
3839
  children: [
3819
3840
  /* @__PURE__ */ s(_n, {}),
3820
- /* @__PURE__ */ s(Ii, {}),
3841
+ /* @__PURE__ */ s(Ci, {}),
3821
3842
  /* @__PURE__ */ s(i, {}),
3822
- /* @__PURE__ */ m("div", { className: "flex shrink-0", children: [
3843
+ /* @__PURE__ */ u("div", { className: "flex shrink-0", children: [
3823
3844
  /* @__PURE__ */ s("div", { className: "w-full ml-2 mr-4 self-center leading-[0]", children: /* @__PURE__ */ s(
3824
3845
  Nn,
3825
3846
  {
@@ -3848,7 +3869,7 @@ const xi = ({
3848
3869
  }
3849
3870
  )
3850
3871
  );
3851
- }, Mi = ({
3872
+ }, Ii = ({
3852
3873
  renderActions: e,
3853
3874
  renderFooter: t,
3854
3875
  disabled: n = !1,
@@ -3857,11 +3878,11 @@ const xi = ({
3857
3878
  }) => {
3858
3879
  var l;
3859
3880
  const { channel: i } = le(), o = ((l = i == null ? void 0 : i.data) == null ? void 0 : l.frozen) === !0;
3860
- return n ? /* @__PURE__ */ m(ee, { children: [
3881
+ return n ? /* @__PURE__ */ u(te, { children: [
3861
3882
  /* @__PURE__ */ s("div", { className: "messaging-composer-locked-panel flex w-full flex-col items-center justify-center gap-3 px-6 py-4", children: a ? /* @__PURE__ */ s("p", { className: "max-w-[345px] text-center text-xs font-normal leading-[1.3] tracking-[0.12px] text-black/40", children: a }) : null }),
3862
3883
  t == null ? void 0 : t()
3863
- ] }) : /* @__PURE__ */ m("div", { className: "flex min-h-0 flex-col gap-4 p-4", children: [
3864
- /* @__PURE__ */ m(
3884
+ ] }) : /* @__PURE__ */ u("div", { className: "flex min-h-0 flex-col gap-4 p-4", children: [
3885
+ /* @__PURE__ */ u(
3865
3886
  "div",
3866
3887
  {
3867
3888
  inert: o ? "" : void 0,
@@ -3869,23 +3890,23 @@ const xi = ({
3869
3890
  className: "message-input flex min-h-0 items-end gap-4 aria-disabled:opacity-40",
3870
3891
  children: [
3871
3892
  e && /* @__PURE__ */ s("div", { className: "flex h-12 shrink-0 items-center justify-center", children: e() }),
3872
- /* @__PURE__ */ s(Ct.Provider, { value: o, children: /* @__PURE__ */ s(bn, { Input: r ?? Ai }) })
3893
+ /* @__PURE__ */ s(Et.Provider, { value: o, children: /* @__PURE__ */ s(bn, { Input: r ?? Ei }) })
3873
3894
  ]
3874
3895
  }
3875
3896
  ),
3876
3897
  t == null ? void 0 : t()
3877
3898
  ] });
3878
- }, Ri = [
3899
+ }, Ti = [
3879
3900
  "SYSTEM_DM_AGENT_PAUSED",
3880
3901
  "SYSTEM_DM_AGENT_RESUMED"
3881
- ], Li = {
3902
+ ], Ai = {
3882
3903
  SYSTEM_DM_AGENT_PAUSED: "DM Agent has left the conversation",
3883
3904
  SYSTEM_DM_AGENT_RESUMED: "DM Agent has rejoined the conversation"
3884
- }, Di = [
3905
+ }, Mi = [
3885
3906
  "SYSTEM_AGE_SAFETY_BLOCKED"
3886
- ], zi = {
3907
+ ], Ri = {
3887
3908
  SYSTEM_AGE_SAFETY_BLOCKED: "This user isn’t able to reply because they don’t meet our age safety guidelines."
3888
- }, Ze = "age safety guidelines.", Pi = "https://linktr.ee/s/about/contact", as = (e) => Ri.includes(e), Fi = (e) => Di.includes(e), Oi = (e) => {
3909
+ }, Ze = "age safety guidelines.", Di = "https://linktr.ee/s/about/contact", as = (e) => Ti.includes(e), Li = (e) => Mi.includes(e), zi = (e) => {
3889
3910
  var a;
3890
3911
  const t = (a = e.metadata) == null ? void 0 : a.custom_type;
3891
3912
  if (as(t))
@@ -3893,7 +3914,7 @@ const xi = ({
3893
3914
  kind: "dm-agent",
3894
3915
  type: t
3895
3916
  };
3896
- if (Fi(t))
3917
+ if (Li(t))
3897
3918
  return {
3898
3919
  kind: "age-safety",
3899
3920
  type: t
@@ -3904,17 +3925,17 @@ const xi = ({
3904
3925
  kind: "dm-agent",
3905
3926
  type: n
3906
3927
  };
3907
- }, $i = (e) => {
3928
+ }, Pi = (e) => {
3908
3929
  const t = e.indexOf(Ze);
3909
3930
  if (t === -1)
3910
3931
  return e;
3911
3932
  const n = t + Ze.length;
3912
- return /* @__PURE__ */ m(ee, { children: [
3933
+ return /* @__PURE__ */ u(te, { children: [
3913
3934
  e.slice(0, t),
3914
3935
  /* @__PURE__ */ s(
3915
3936
  "a",
3916
3937
  {
3917
- href: Pi,
3938
+ href: Di,
3918
3939
  target: "_blank",
3919
3940
  rel: "noopener noreferrer",
3920
3941
  className: "mes-age-safety-system-message__emphasis font-medium text-inherit underline",
@@ -3923,15 +3944,15 @@ const xi = ({
3923
3944
  ),
3924
3945
  e.slice(n)
3925
3946
  ] });
3926
- }, Bi = (e) => {
3947
+ }, Fi = (e) => {
3927
3948
  var a, r;
3928
- const t = e.message.hide_date === !0, n = Oi(
3949
+ const t = e.message.hide_date === !0, n = zi(
3929
3950
  e.message
3930
3951
  );
3931
3952
  if ((n == null ? void 0 : n.kind) === "dm-agent") {
3932
- const i = ((a = e.message.text) == null ? void 0 : a.trim()) || Li[n.type];
3933
- return /* @__PURE__ */ m("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
3934
- /* @__PURE__ */ m(
3953
+ const i = ((a = e.message.text) == null ? void 0 : a.trim()) || Ai[n.type];
3954
+ return /* @__PURE__ */ u("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
3955
+ /* @__PURE__ */ u(
3935
3956
  "div",
3936
3957
  {
3937
3958
  className: "mes-dm-agent-system-message mx-auto mb-2 inline-flex w-fit max-w-[min(100%,480px)] items-center justify-center gap-[10px] rounded-[12px] border border-[rgba(0,0,0,0.08)] p-3 text-[rgba(0,0,0,0.55)]",
@@ -3955,9 +3976,9 @@ const xi = ({
3955
3976
  ] });
3956
3977
  }
3957
3978
  if ((n == null ? void 0 : n.kind) === "age-safety") {
3958
- const i = ((r = e.message.text) == null ? void 0 : r.trim()) || zi[n.type];
3959
- return /* @__PURE__ */ m("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
3960
- /* @__PURE__ */ m(
3979
+ const i = ((r = e.message.text) == null ? void 0 : r.trim()) || Ri[n.type];
3980
+ return /* @__PURE__ */ u("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
3981
+ /* @__PURE__ */ u(
3961
3982
  "div",
3962
3983
  {
3963
3984
  className: "mes-age-safety-system-message box-border mx-auto mb-2 flex w-full max-w-[329px] items-start justify-center gap-3 rounded-[12px] border border-[var(--border-secondary,rgba(0,0,0,0.08))] bg-[var(--bg-warning-subtle,#fef3c6)] px-2 py-4 pl-5 text-[color:var(--text-warning-on-warning,#894b00)]",
@@ -3974,22 +3995,22 @@ const xi = ({
3974
3995
  "data-testid": "age-safety-system-message-icon"
3975
3996
  }
3976
3997
  ),
3977
- /* @__PURE__ */ s("div", { className: "mes-age-safety-system-message__content min-w-0 flex-[1_0_0]", children: /* @__PURE__ */ s("p", { className: "m-0 text-balance text-left text-[12px] font-normal leading-4 tracking-[0.21px] text-[color:var(--text-warning-on-warning,#894b00)]", children: $i(i) }) })
3998
+ /* @__PURE__ */ s("div", { className: "mes-age-safety-system-message__content min-w-0 flex-[1_0_0]", children: /* @__PURE__ */ s("p", { className: "m-0 text-balance text-left text-[12px] font-normal leading-4 tracking-[0.21px] text-[color:var(--text-warning-on-warning,#894b00)]", children: Pi(i) }) })
3978
3999
  ]
3979
4000
  }
3980
4001
  ),
3981
4002
  !t && /* @__PURE__ */ s(Ye, { message: e.message })
3982
4003
  ] });
3983
4004
  }
3984
- return /* @__PURE__ */ m("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
3985
- /* @__PURE__ */ m("div", { className: "str-chat__message--system__text", children: [
4005
+ return /* @__PURE__ */ u("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
4006
+ /* @__PURE__ */ u("div", { className: "str-chat__message--system__text", children: [
3986
4007
  /* @__PURE__ */ s("div", { className: "str-chat__message--system__line" }),
3987
4008
  /* @__PURE__ */ s("p", { children: e.message.text }),
3988
4009
  /* @__PURE__ */ s("div", { className: "str-chat__message--system__line" })
3989
4010
  ] }),
3990
4011
  !t && /* @__PURE__ */ s(Ye, { message: e.message })
3991
4012
  ] });
3992
- }, Os = rt(!1), Qe = ({ cx: e, index: t }) => /* @__PURE__ */ s("circle", { cx: e, cy: "6.15", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ s(
4013
+ }, Os = lt(!1), Qe = ({ cx: e, index: t }) => /* @__PURE__ */ s("circle", { cx: e, cy: "6.15", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ s(
3993
4014
  "animateTransform",
3994
4015
  {
3995
4016
  attributeName: "transform",
@@ -3999,47 +4020,47 @@ const xi = ({
3999
4020
  begin: `${120 * t}ms`,
4000
4021
  repeatCount: "indefinite"
4001
4022
  }
4002
- ) }), Ui = /* @__PURE__ */ new Set([
4023
+ ) }), Oi = /* @__PURE__ */ new Set([
4003
4024
  qe.Thinking,
4004
4025
  qe.Generating,
4005
4026
  qe.ExternalSources
4006
- ]), ji = ({ threadList: e }) => {
4007
- var v, w;
4008
- const { channel: t, channelConfig: n, thread: a } = le(), { client: r } = me(), { typing: i = {} } = yn(), { aiState: o } = kn(t), l = Ie(Os);
4009
- if (!e && l && Ui.has(o)) {
4010
- const b = Vi(t, (v = r.user) == null ? void 0 : v.id);
4027
+ ]), $i = ({ threadList: e }) => {
4028
+ var b, x;
4029
+ const { channel: t, channelConfig: n, thread: a } = le(), { client: r } = oe(), { typing: i = {} } = yn(), { aiState: o } = kn(t), l = Ie(Os);
4030
+ if (!e && l && Oi.has(o)) {
4031
+ const v = Bi(t, (b = r.user) == null ? void 0 : b.id);
4011
4032
  return /* @__PURE__ */ s(
4012
4033
  rs,
4013
4034
  {
4014
- avatarId: (b == null ? void 0 : b.id) ?? "ai-agent",
4015
- avatarName: (b == null ? void 0 : b.name) ?? (b == null ? void 0 : b.id) ?? "Agent",
4016
- avatarImage: b == null ? void 0 : b.image,
4035
+ avatarId: (v == null ? void 0 : v.id) ?? "ai-agent",
4036
+ avatarName: (v == null ? void 0 : v.name) ?? (v == null ? void 0 : v.id) ?? "Agent",
4037
+ avatarImage: v == null ? void 0 : v.image,
4017
4038
  testId: "typing-indicator-ai"
4018
4039
  }
4019
4040
  );
4020
4041
  }
4021
4042
  if ((n == null ? void 0 : n.typing_events) === !1)
4022
4043
  return null;
4023
- const u = e ? [] : Object.values(i).filter(
4024
- ({ parent_id: b, user: g }) => {
4025
- var x;
4026
- return (g == null ? void 0 : g.id) !== ((x = r.user) == null ? void 0 : x.id) && !b;
4044
+ const m = e ? [] : Object.values(i).filter(
4045
+ ({ parent_id: v, user: f }) => {
4046
+ var N;
4047
+ return (f == null ? void 0 : f.id) !== ((N = r.user) == null ? void 0 : N.id) && !v;
4027
4048
  }
4028
4049
  ), p = e ? Object.values(i).filter(
4029
- ({ parent_id: b, user: g }) => {
4030
- var x;
4031
- return (g == null ? void 0 : g.id) !== ((x = r.user) == null ? void 0 : x.id) && b === (a == null ? void 0 : a.id);
4050
+ ({ parent_id: v, user: f }) => {
4051
+ var N;
4052
+ return (f == null ? void 0 : f.id) !== ((N = r.user) == null ? void 0 : N.id) && v === (a == null ? void 0 : a.id);
4032
4053
  }
4033
- ) : [], h = e ? p : u;
4054
+ ) : [], h = e ? p : m;
4034
4055
  if (!h.length)
4035
4056
  return null;
4036
- const f = (w = h[0]) == null ? void 0 : w.user, c = f != null && f.id && t.state.members[f.id] ? t.state.members[f.id].user : void 0;
4057
+ const g = (x = h[0]) == null ? void 0 : x.user, c = g != null && g.id && t.state.members[g.id] ? t.state.members[g.id].user : void 0;
4037
4058
  return /* @__PURE__ */ s(
4038
4059
  rs,
4039
4060
  {
4040
- avatarId: (f == null ? void 0 : f.id) ?? (c == null ? void 0 : c.id) ?? "typing-user",
4041
- avatarName: (f == null ? void 0 : f.name) ?? (c == null ? void 0 : c.name) ?? (f == null ? void 0 : f.id) ?? "Typing user",
4042
- avatarImage: (f == null ? void 0 : f.image) ?? (c == null ? void 0 : c.image),
4061
+ avatarId: (g == null ? void 0 : g.id) ?? (c == null ? void 0 : c.id) ?? "typing-user",
4062
+ avatarName: (g == null ? void 0 : g.name) ?? (c == null ? void 0 : c.name) ?? (g == null ? void 0 : g.id) ?? "Typing user",
4063
+ avatarImage: (g == null ? void 0 : g.image) ?? (c == null ? void 0 : c.image),
4043
4064
  testId: "typing-indicator"
4044
4065
  }
4045
4066
  );
@@ -4056,9 +4077,9 @@ const xi = ({
4056
4077
  style: {
4057
4078
  marginBottom: "var(--messaging-channel-input-spacer-height, 80px)"
4058
4079
  },
4059
- children: /* @__PURE__ */ m("div", { className: "str-chat__message str-chat__message-simple str-chat__message--regular str-chat__message--received str-chat__message--other str-chat__message--has-text", children: [
4080
+ children: /* @__PURE__ */ u("div", { className: "str-chat__message str-chat__message-simple str-chat__message--regular str-chat__message--received str-chat__message--other str-chat__message--has-text", children: [
4060
4081
  /* @__PURE__ */ s(
4061
- se,
4082
+ ne,
4062
4083
  {
4063
4084
  className: "str-chat__avatar str-chat__message-sender-avatar",
4064
4085
  id: e,
@@ -4068,7 +4089,7 @@ const xi = ({
4068
4089
  shape: "circle"
4069
4090
  }
4070
4091
  ),
4071
- /* @__PURE__ */ s("div", { className: "str-chat__message-inner mx-0", children: /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ s("div", { className: "str-chat__message-bubble", children: /* @__PURE__ */ s("div", { className: "str-chat__message-text min-h-11 flex items-center", children: /* @__PURE__ */ s("div", { className: "str-chat__message-text-inner str-chat__message-simple-text-inner", children: /* @__PURE__ */ m(
4092
+ /* @__PURE__ */ s("div", { className: "str-chat__message-inner mx-0", children: /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ s("div", { className: "str-chat__message-bubble", children: /* @__PURE__ */ s("div", { className: "str-chat__message-text min-h-11 flex items-center", children: /* @__PURE__ */ s("div", { className: "str-chat__message-text-inner str-chat__message-simple-text-inner", children: /* @__PURE__ */ u(
4072
4093
  "svg",
4073
4094
  {
4074
4095
  "aria-hidden": "true",
@@ -4087,7 +4108,7 @@ const xi = ({
4087
4108
  ] })
4088
4109
  }
4089
4110
  );
4090
- function Vi(e, t) {
4111
+ function Bi(e, t) {
4091
4112
  var a;
4092
4113
  const n = ((a = e == null ? void 0 : e.state) == null ? void 0 : a.members) ?? {};
4093
4114
  for (const r of Object.values(n)) {
@@ -4096,12 +4117,12 @@ function Vi(e, t) {
4096
4117
  return i;
4097
4118
  }
4098
4119
  }
4099
- const Gi = () => null, Hi = ({ className: e, message: t }) => /* @__PURE__ */ m(
4120
+ const Ui = () => null, ji = ({ className: e, message: t }) => /* @__PURE__ */ u(
4100
4121
  "div",
4101
4122
  {
4102
4123
  className: k("flex items-center justify-center h-full", e),
4103
4124
  children: [
4104
- /* @__PURE__ */ m("svg", { viewBox: "0 0 100 100", className: "size-8 fill-pebble", stroke: "none", children: [
4125
+ /* @__PURE__ */ u("svg", { viewBox: "0 0 100 100", className: "size-8 fill-pebble", stroke: "none", children: [
4105
4126
  /* @__PURE__ */ s("circle", { cx: "6", cy: "50", r: "6", children: /* @__PURE__ */ s(
4106
4127
  "animateTransform",
4107
4128
  {
@@ -4139,12 +4160,12 @@ const Gi = () => null, Hi = ({ className: e, message: t }) => /* @__PURE__ */ m(
4139
4160
  t && /* @__PURE__ */ s("span", { className: "text-stone", children: t })
4140
4161
  ]
4141
4162
  }
4142
- ), Be = V.memo(() => /* @__PURE__ */ s("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ m("div", { className: "flex items-center", children: [
4143
- /* @__PURE__ */ s(Hi, { className: "w-6 h-6" }),
4163
+ ), Be = V.memo(() => /* @__PURE__ */ s("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ u("div", { className: "flex items-center", children: [
4164
+ /* @__PURE__ */ s(ji, { className: "w-6 h-6" }),
4144
4165
  /* @__PURE__ */ s("span", { className: "text-sm text-stone", children: "Loading messages" })
4145
4166
  ] }) }));
4146
4167
  Be.displayName = "LoadingState";
4147
- const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Pe = "Replies instantly with AI assistant", Yi = ({
4168
+ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Pe = "Replies instantly with AI assistant", Vi = ({
4148
4169
  onBack: e,
4149
4170
  showBackButton: t,
4150
4171
  showStarButton: n = !1,
@@ -4154,35 +4175,35 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4154
4175
  showDeleteConversation: o = !0,
4155
4176
  showBlockParticipant: l = !0,
4156
4177
  showReportParticipant: d = !0,
4157
- onDeleteConversationClick: u,
4178
+ onDeleteConversationClick: m,
4158
4179
  onBlockParticipantClick: p,
4159
4180
  onReportParticipantClick: h,
4160
- customChannelActions: f,
4181
+ customChannelActions: g,
4161
4182
  renderChannelActions: c,
4162
- showChannelInfo: v = !0,
4163
- onParticipantNameClick: w,
4164
- renderHeaderTitleBadges: b
4183
+ showChannelInfo: b = !0,
4184
+ onParticipantNameClick: x,
4185
+ renderHeaderTitleBadges: v
4165
4186
  }) => {
4166
- var I, S, R, E, z, O;
4167
- const { channel: g } = le(), { client: x } = me(), N = V.useMemo(
4187
+ var E, I, M, T, z, O;
4188
+ const { channel: f } = le(), { client: N } = oe(), w = V.useMemo(
4168
4189
  () => {
4169
4190
  var j;
4170
4191
  return je(
4171
- (j = g.state) == null ? void 0 : j.members,
4172
- x == null ? void 0 : x.userID,
4173
- g.type
4192
+ (j = f.state) == null ? void 0 : j.members,
4193
+ N == null ? void 0 : N.userID,
4194
+ f.type
4174
4195
  );
4175
4196
  },
4176
- [(I = g.state) == null ? void 0 : I.members, x == null ? void 0 : x.userID, g.type]
4177
- ), C = ct(N == null ? void 0 : N.user), T = (S = N == null ? void 0 : N.user) == null ? void 0 : S.image, A = ot(g), L = b == null ? void 0 : b({
4178
- channel: g,
4179
- participant: N
4180
- }), $ = "flex max-w-full flex-col items-center gap-1 rounded-[12px] px-1 py-0.5 text-center text-xs font-medium text-black/90", F = "flex min-w-0 max-w-full items-center gap-4 rounded-[12px] px-1 py-0.5 text-left text-black/90", D = /* @__PURE__ */ m(ee, { children: [
4197
+ [(E = f.state) == null ? void 0 : E.members, N == null ? void 0 : N.userID, f.type]
4198
+ ), C = ut(w == null ? void 0 : w.user), R = (I = w == null ? void 0 : w.user) == null ? void 0 : I.image, S = dt(f), D = v == null ? void 0 : v({
4199
+ channel: f,
4200
+ participant: w
4201
+ }), $ = "flex max-w-full flex-col items-center gap-1 rounded-[12px] px-1 py-0.5 text-center text-xs font-medium text-black/90", F = "flex min-w-0 max-w-full items-center gap-4 rounded-[12px] px-1 py-0.5 text-left text-black/90", L = /* @__PURE__ */ u(te, { children: [
4181
4202
  /* @__PURE__ */ s("span", { className: "min-w-0 truncate", children: C }),
4182
- L && /* @__PURE__ */ s("span", { className: "shrink-0", children: L })
4203
+ D && /* @__PURE__ */ s("span", { className: "shrink-0", children: D })
4183
4204
  ] }), y = async () => {
4184
4205
  try {
4185
- A ? await g.unpin() : await g.pin();
4206
+ S ? await f.unpin() : await f.pin();
4186
4207
  } catch (j) {
4187
4208
  console.error(
4188
4209
  "[CustomChannelHeader] Failed to update pinned status:",
@@ -4190,8 +4211,8 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4190
4211
  );
4191
4212
  }
4192
4213
  };
4193
- return /* @__PURE__ */ m("div", { className: "@container", children: [
4194
- /* @__PURE__ */ m("div", { className: "grid grid-cols-[1fr_auto_1fr] w-full items-center @lg:hidden px-6 py-3", children: [
4214
+ return /* @__PURE__ */ u("div", { className: "@container", children: [
4215
+ /* @__PURE__ */ u("div", { className: "grid grid-cols-[1fr_auto_1fr] w-full items-center @lg:hidden px-6 py-3", children: [
4195
4216
  /* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: t && /* @__PURE__ */ s(
4196
4217
  "button",
4197
4218
  {
@@ -4203,7 +4224,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4203
4224
  }),
4204
4225
  type: "button",
4205
4226
  "aria-label": "Back to conversations",
4206
- children: /* @__PURE__ */ s(et, { className: "size-5 text-black/90" })
4227
+ children: /* @__PURE__ */ s(st, { className: "size-5 text-black/90" })
4207
4228
  }
4208
4229
  ) }),
4209
4230
  /* @__PURE__ */ s(
@@ -4211,11 +4232,11 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4211
4232
  {
4212
4233
  className: "flex flex-col gap-1 items-center",
4213
4234
  "data-dd-privacy": "mask",
4214
- children: w ? /* @__PURE__ */ m(
4235
+ children: x ? /* @__PURE__ */ u(
4215
4236
  "button",
4216
4237
  {
4217
4238
  type: "button",
4218
- onClick: w,
4239
+ onClick: x,
4219
4240
  "aria-label": `View details for ${C}`,
4220
4241
  className: k(
4221
4242
  $,
@@ -4223,40 +4244,40 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4223
4244
  ),
4224
4245
  children: [
4225
4246
  /* @__PURE__ */ s(
4226
- se,
4247
+ ne,
4227
4248
  {
4228
- id: ((R = N == null ? void 0 : N.user) == null ? void 0 : R.id) || g.id || "unknown",
4249
+ id: ((M = w == null ? void 0 : w.user) == null ? void 0 : M.id) || f.id || "unknown",
4229
4250
  name: C,
4230
- image: T,
4231
- starred: n && A,
4251
+ image: R,
4252
+ starred: n && S,
4232
4253
  dmAgentEnabled: a,
4233
4254
  size: 48
4234
4255
  }
4235
4256
  ),
4236
- /* @__PURE__ */ m("span", { className: "flex max-w-full items-center gap-0.5", children: [
4237
- D,
4257
+ /* @__PURE__ */ u("span", { className: "flex max-w-full items-center gap-0.5", children: [
4258
+ L,
4238
4259
  /* @__PURE__ */ s(ve, { className: "size-3 shrink-0", weight: "bold" })
4239
4260
  ] }),
4240
- a && /* @__PURE__ */ m("div", { className: "flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
4261
+ a && /* @__PURE__ */ u("div", { className: "flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
4241
4262
  /* @__PURE__ */ s(xe, { className: "size-3 shrink-0 text-black/55" }),
4242
4263
  /* @__PURE__ */ s("span", { children: Pe })
4243
4264
  ] })
4244
4265
  ]
4245
4266
  }
4246
- ) : /* @__PURE__ */ m("div", { className: $, children: [
4267
+ ) : /* @__PURE__ */ u("div", { className: $, children: [
4247
4268
  /* @__PURE__ */ s(
4248
- se,
4269
+ ne,
4249
4270
  {
4250
- id: ((E = N == null ? void 0 : N.user) == null ? void 0 : E.id) || g.id || "unknown",
4271
+ id: ((T = w == null ? void 0 : w.user) == null ? void 0 : T.id) || f.id || "unknown",
4251
4272
  name: C,
4252
- image: T,
4253
- starred: n && A,
4273
+ image: R,
4274
+ starred: n && S,
4254
4275
  dmAgentEnabled: a,
4255
4276
  size: 48
4256
4277
  }
4257
4278
  ),
4258
- /* @__PURE__ */ m("p", { className: "flex max-w-full items-center justify-center gap-0.5", children: [
4259
- D,
4279
+ /* @__PURE__ */ u("p", { className: "flex max-w-full items-center justify-center gap-0.5", children: [
4280
+ L,
4260
4281
  /* @__PURE__ */ s(
4261
4282
  ve,
4262
4283
  {
@@ -4265,54 +4286,54 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4265
4286
  }
4266
4287
  )
4267
4288
  ] }),
4268
- a && /* @__PURE__ */ m("div", { className: "flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
4289
+ a && /* @__PURE__ */ u("div", { className: "flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
4269
4290
  /* @__PURE__ */ s(xe, { className: "size-3 shrink-0 text-black/55" }),
4270
4291
  /* @__PURE__ */ s("span", { children: Pe })
4271
4292
  ] })
4272
4293
  ] })
4273
4294
  }
4274
4295
  ),
4275
- /* @__PURE__ */ m("div", { className: "flex justify-end items-center gap-2", children: [
4296
+ /* @__PURE__ */ u("div", { className: "flex justify-end items-center gap-2", children: [
4276
4297
  n && /* @__PURE__ */ s(
4277
4298
  "button",
4278
4299
  {
4279
4300
  className: be,
4280
4301
  onClick: y,
4281
4302
  type: "button",
4282
- "aria-label": A ? "Unstar conversation" : "Star conversation",
4303
+ "aria-label": S ? "Unstar conversation" : "Star conversation",
4283
4304
  children: /* @__PURE__ */ s(
4284
4305
  Ee,
4285
4306
  {
4286
4307
  className: k("size-5", {
4287
- "text-yellow-600": A,
4288
- "text-black/90": !A
4308
+ "text-yellow-600": S,
4309
+ "text-black/90": !S
4289
4310
  }),
4290
- weight: A ? "duotone" : "regular"
4311
+ weight: S ? "duotone" : "regular"
4291
4312
  }
4292
4313
  )
4293
4314
  }
4294
4315
  ),
4295
- v && (c !== void 0 ? c : /* @__PURE__ */ s(
4296
- st,
4316
+ b && (c !== void 0 ? c : /* @__PURE__ */ s(
4317
+ at,
4297
4318
  {
4298
- channel: g,
4299
- participant: N,
4319
+ channel: f,
4320
+ participant: w,
4300
4321
  showDeleteConversation: o,
4301
4322
  showBlockParticipant: l,
4302
4323
  showReportParticipant: d,
4303
4324
  onLeaveConversation: r,
4304
4325
  onBlockParticipant: i,
4305
- onDeleteConversationClick: u,
4326
+ onDeleteConversationClick: m,
4306
4327
  onBlockParticipantClick: p,
4307
4328
  onReportParticipantClick: h,
4308
- customChannelActions: f,
4329
+ customChannelActions: g,
4309
4330
  triggerClassName: k(be, "bg-[#F1F0EE]")
4310
4331
  }
4311
4332
  ))
4312
4333
  ] })
4313
4334
  ] }),
4314
- /* @__PURE__ */ m("div", { className: "px-6 py-3 hidden @lg:flex items-center justify-between gap-3 min-h-12 border-b border-b-black/[0.08]", children: [
4315
- /* @__PURE__ */ m("div", { className: "flex items-center gap-4 min-w-0", "data-dd-privacy": "mask", children: [
4335
+ /* @__PURE__ */ u("div", { className: "px-6 py-3 hidden @lg:flex items-center justify-between gap-3 min-h-12 border-b border-b-black/[0.08]", children: [
4336
+ /* @__PURE__ */ u("div", { className: "flex items-center gap-4 min-w-0", "data-dd-privacy": "mask", children: [
4316
4337
  t && e && /* @__PURE__ */ s(
4317
4338
  "button",
4318
4339
  {
@@ -4323,14 +4344,14 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4323
4344
  type: "button",
4324
4345
  onClick: e,
4325
4346
  "aria-label": "Back to conversations",
4326
- children: /* @__PURE__ */ s(et, { className: "size-5 text-black/90" })
4347
+ children: /* @__PURE__ */ s(st, { className: "size-5 text-black/90" })
4327
4348
  }
4328
4349
  ),
4329
- w ? /* @__PURE__ */ m(
4350
+ x ? /* @__PURE__ */ u(
4330
4351
  "button",
4331
4352
  {
4332
4353
  type: "button",
4333
- onClick: w,
4354
+ onClick: x,
4334
4355
  "aria-label": `View details for ${C}`,
4335
4356
  className: k(
4336
4357
  F,
@@ -4338,43 +4359,43 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4338
4359
  ),
4339
4360
  children: [
4340
4361
  /* @__PURE__ */ s(
4341
- se,
4362
+ ne,
4342
4363
  {
4343
- id: ((z = N == null ? void 0 : N.user) == null ? void 0 : z.id) || g.id || "unknown",
4364
+ id: ((z = w == null ? void 0 : w.user) == null ? void 0 : z.id) || f.id || "unknown",
4344
4365
  name: C,
4345
- image: T,
4346
- starred: n && A,
4366
+ image: R,
4367
+ starred: n && S,
4347
4368
  dmAgentEnabled: a,
4348
4369
  size: 48
4349
4370
  }
4350
4371
  ),
4351
- /* @__PURE__ */ m("div", { className: "min-w-0", children: [
4352
- /* @__PURE__ */ m("h1", { className: "flex min-w-0 items-center gap-1 font-medium text-black/90", children: [
4353
- D,
4372
+ /* @__PURE__ */ u("div", { className: "min-w-0", children: [
4373
+ /* @__PURE__ */ u("h1", { className: "flex min-w-0 items-center gap-1 font-medium text-black/90", children: [
4374
+ L,
4354
4375
  /* @__PURE__ */ s(ve, { className: "size-4 shrink-0", weight: "bold" })
4355
4376
  ] }),
4356
- a && /* @__PURE__ */ m("div", { className: "mt-0.5 flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
4377
+ a && /* @__PURE__ */ u("div", { className: "mt-0.5 flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
4357
4378
  /* @__PURE__ */ s(xe, { className: "size-3 shrink-0 text-black/55" }),
4358
4379
  /* @__PURE__ */ s("span", { className: "truncate", children: Pe })
4359
4380
  ] })
4360
4381
  ] })
4361
4382
  ]
4362
4383
  }
4363
- ) : /* @__PURE__ */ m("div", { className: F, children: [
4384
+ ) : /* @__PURE__ */ u("div", { className: F, children: [
4364
4385
  /* @__PURE__ */ s(
4365
- se,
4386
+ ne,
4366
4387
  {
4367
- id: ((O = N == null ? void 0 : N.user) == null ? void 0 : O.id) || g.id || "unknown",
4388
+ id: ((O = w == null ? void 0 : w.user) == null ? void 0 : O.id) || f.id || "unknown",
4368
4389
  name: C,
4369
- image: T,
4370
- starred: n && A,
4390
+ image: R,
4391
+ starred: n && S,
4371
4392
  dmAgentEnabled: a,
4372
4393
  size: 48
4373
4394
  }
4374
4395
  ),
4375
- /* @__PURE__ */ m("div", { className: "min-w-0", children: [
4376
- /* @__PURE__ */ m("h1", { className: "flex min-w-0 items-center gap-1 font-medium text-black/90", children: [
4377
- D,
4396
+ /* @__PURE__ */ u("div", { className: "min-w-0", children: [
4397
+ /* @__PURE__ */ u("h1", { className: "flex min-w-0 items-center gap-1 font-medium text-black/90", children: [
4398
+ L,
4378
4399
  /* @__PURE__ */ s(
4379
4400
  ve,
4380
4401
  {
@@ -4383,54 +4404,54 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4383
4404
  }
4384
4405
  )
4385
4406
  ] }),
4386
- a && /* @__PURE__ */ m("div", { className: "mt-0.5 flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
4407
+ a && /* @__PURE__ */ u("div", { className: "mt-0.5 flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
4387
4408
  /* @__PURE__ */ s(xe, { className: "size-3 shrink-0 text-black/55" }),
4388
4409
  /* @__PURE__ */ s("span", { className: "truncate", children: Pe })
4389
4410
  ] })
4390
4411
  ] })
4391
4412
  ] })
4392
4413
  ] }),
4393
- /* @__PURE__ */ m("div", { className: "flex items-center gap-2", children: [
4414
+ /* @__PURE__ */ u("div", { className: "flex items-center gap-2", children: [
4394
4415
  n && /* @__PURE__ */ s(
4395
4416
  "button",
4396
4417
  {
4397
4418
  className: be,
4398
4419
  onClick: y,
4399
4420
  type: "button",
4400
- "aria-label": A ? "Unstar conversation" : "Star conversation",
4421
+ "aria-label": S ? "Unstar conversation" : "Star conversation",
4401
4422
  children: /* @__PURE__ */ s(
4402
4423
  Ee,
4403
4424
  {
4404
4425
  className: k("size-6", {
4405
- "text-yellow-600": A,
4406
- "text-black/90": !A
4426
+ "text-yellow-600": S,
4427
+ "text-black/90": !S
4407
4428
  }),
4408
- weight: A ? "duotone" : "regular"
4429
+ weight: S ? "duotone" : "regular"
4409
4430
  }
4410
4431
  )
4411
4432
  }
4412
4433
  ),
4413
- v && (c !== void 0 ? c : /* @__PURE__ */ s(
4414
- st,
4434
+ b && (c !== void 0 ? c : /* @__PURE__ */ s(
4435
+ at,
4415
4436
  {
4416
- channel: g,
4417
- participant: N,
4437
+ channel: f,
4438
+ participant: w,
4418
4439
  showDeleteConversation: o,
4419
4440
  showBlockParticipant: l,
4420
4441
  showReportParticipant: d,
4421
4442
  onLeaveConversation: r,
4422
4443
  onBlockParticipant: i,
4423
- onDeleteConversationClick: u,
4444
+ onDeleteConversationClick: m,
4424
4445
  onBlockParticipantClick: p,
4425
4446
  onReportParticipantClick: h,
4426
- customChannelActions: f,
4447
+ customChannelActions: g,
4427
4448
  triggerClassName: be
4428
4449
  }
4429
4450
  ))
4430
4451
  ] })
4431
4452
  ] })
4432
4453
  ] });
4433
- }, qi = ({
4454
+ }, Gi = ({
4434
4455
  onBack: e,
4435
4456
  showBackButton: t,
4436
4457
  renderMessageInputActions: n,
@@ -4440,144 +4461,147 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4440
4461
  onBlockParticipant: o,
4441
4462
  showDeleteConversation: l = !0,
4442
4463
  onDeleteConversationClick: d,
4443
- onBlockParticipantClick: u,
4464
+ onBlockParticipantClick: m,
4444
4465
  onReportParticipantClick: p,
4445
4466
  showBlockParticipant: h = !0,
4446
- showReportParticipant: f = !0,
4467
+ showReportParticipant: g = !0,
4447
4468
  composerDisabled: c = !1,
4448
- composerDisabledReason: v,
4449
- showStarButton: w = !1,
4450
- chatbotVotingEnabled: b = !1,
4451
- renderChannelBanner: g,
4452
- renderHeaderTitleBadges: x,
4453
- customChannelActions: N,
4469
+ composerDisabledReason: b,
4470
+ showStarButton: x = !1,
4471
+ chatbotVotingEnabled: v = !1,
4472
+ renderChannelBanner: f,
4473
+ renderHeaderTitleBadges: N,
4474
+ customChannelActions: w,
4454
4475
  renderChannelActions: C,
4455
- renderMessage: T,
4456
- dmAgentEnabled: A = !1,
4457
- viewerLanguage: L,
4476
+ renderMessage: R,
4477
+ dmAgentEnabled: S = !1,
4478
+ viewerLanguage: D,
4458
4479
  showChannelInfo: $ = !0,
4459
4480
  onParticipantNameClick: F,
4460
- composerInput: D
4481
+ composerInput: L
4461
4482
  }) => {
4462
- var _, M, H, q;
4463
- const { channel: y } = le(), { client: I } = me(), S = V.useMemo(
4483
+ var _, A, H, q;
4484
+ const { channel: y } = le(), { client: E } = oe(), I = V.useMemo(
4464
4485
  () => {
4465
4486
  var Y;
4466
4487
  return je(
4467
4488
  (Y = y.state) == null ? void 0 : Y.members,
4468
- I == null ? void 0 : I.userID,
4489
+ E == null ? void 0 : E.userID,
4469
4490
  y.type
4470
4491
  );
4471
4492
  },
4472
- [(_ = y.state) == null ? void 0 : _.members, I == null ? void 0 : I.userID, y.type]
4473
- ), R = V.useMemo(() => {
4493
+ [(_ = y.state) == null ? void 0 : _.members, E == null ? void 0 : E.userID, y.type]
4494
+ ), M = V.useMemo(() => {
4474
4495
  var W;
4475
- const Y = I == null ? void 0 : I.userID;
4496
+ const Y = E == null ? void 0 : E.userID;
4476
4497
  return Y ? Object.values(((W = y.state) == null ? void 0 : W.members) || {}).find((Q) => {
4477
- var ce;
4478
- return ((ce = Q.user) == null ? void 0 : ce.id) === Y;
4498
+ var de;
4499
+ return ((de = Q.user) == null ? void 0 : de.id) === Y;
4479
4500
  }) : void 0;
4480
- }, [I == null ? void 0 : I.userID, (M = y.state) == null ? void 0 : M.members]), E = ((H = R == null ? void 0 : R.user) == null ? void 0 : H.is_account) ?? (R == null ? void 0 : R.is_account), z = ((q = S == null ? void 0 : S.user) == null ? void 0 : q.is_account) ?? (S == null ? void 0 : S.is_account), O = A && E === !1 && z === !0, j = y.state.messages.some(
4501
+ }, [E == null ? void 0 : E.userID, (A = y.state) == null ? void 0 : A.members]), T = ((H = M == null ? void 0 : M.user) == null ? void 0 : H.is_account) ?? (M == null ? void 0 : M.is_account), z = ((q = I == null ? void 0 : I.user) == null ? void 0 : q.is_account) ?? (I == null ? void 0 : I.is_account), O = S && T === !1 && z === !0, j = y.state.messages.some(
4481
4502
  (Y) => Y.type !== "deleted"
4482
- ), X = g ? /* @__PURE__ */ s(V.Fragment, { children: g() }, "lt-channel-banner") : null, te = F ? /* @__PURE__ */ s(
4503
+ ), X = f ? /* @__PURE__ */ s(V.Fragment, { children: f() }, "lt-channel-banner") : null, ee = F ? /* @__PURE__ */ s(
4483
4504
  pa,
4484
4505
  {
4506
+ className: "-mx-[var(--str-chat\\_\\_spacing-2)] px-[var(--str-chat\\_\\_spacing-2)] md:-mx-[min(var(--str-chat\\_\\_spacing-10),4%)] md:px-[min(var(--str-chat\\_\\_spacing-10),4%)]",
4485
4507
  onBack: e,
4486
4508
  showBackButton: t,
4487
4509
  showChannelInfo: $,
4488
- showStarButton: w,
4510
+ showStarButton: x,
4489
4511
  dmAgentEnabled: O,
4490
4512
  onLeaveConversation: i,
4491
4513
  onBlockParticipant: o,
4492
4514
  showDeleteConversation: l,
4493
4515
  showBlockParticipant: h,
4494
- showReportParticipant: f,
4516
+ showReportParticipant: g,
4495
4517
  onDeleteConversationClick: d,
4496
- onBlockParticipantClick: u,
4518
+ onBlockParticipantClick: m,
4497
4519
  onReportParticipantClick: p,
4498
- customChannelActions: N,
4520
+ customChannelActions: w,
4499
4521
  renderChannelActions: C,
4500
4522
  onParticipantNameClick: F
4501
4523
  }
4502
4524
  ) : null, K = Z(
4503
4525
  (Y) => {
4504
4526
  const { message: B } = _e("ChannelView"), W = /* @__PURE__ */ s(
4505
- Ni,
4527
+ xi,
4506
4528
  {
4507
4529
  ...Y,
4508
- chatbotVotingEnabled: b,
4509
- viewerLanguage: L
4530
+ chatbotVotingEnabled: v,
4531
+ viewerLanguage: D
4510
4532
  }
4511
4533
  );
4512
- return !T || !B ? W : T(W, B);
4534
+ return !R || !B ? W : R(W, B);
4513
4535
  },
4514
- [b, T, L]
4536
+ [v, R, D]
4515
4537
  );
4516
- return /* @__PURE__ */ s(ee, { children: /* @__PURE__ */ s(
4538
+ return /* @__PURE__ */ s(te, { children: /* @__PURE__ */ s(
4517
4539
  Sn,
4518
4540
  {
4519
4541
  overrides: {
4520
4542
  Message: K,
4521
- MessageActions: Ci
4543
+ MessageActions: Ni
4522
4544
  },
4523
- children: /* @__PURE__ */ m(En, { children: [
4524
- !F && /* @__PURE__ */ m(ee, { children: [
4545
+ children: /* @__PURE__ */ u(En, { children: [
4546
+ !F && /* @__PURE__ */ u(te, { children: [
4525
4547
  /* @__PURE__ */ s("div", { children: /* @__PURE__ */ s(
4526
- Yi,
4548
+ Vi,
4527
4549
  {
4528
4550
  onBack: e,
4529
4551
  showBackButton: t,
4530
4552
  showChannelInfo: $,
4531
- showStarButton: w,
4553
+ showStarButton: x,
4532
4554
  dmAgentEnabled: O,
4533
4555
  onLeaveConversation: i,
4534
4556
  onBlockParticipant: o,
4535
4557
  showDeleteConversation: l,
4536
4558
  showBlockParticipant: h,
4537
- showReportParticipant: f,
4559
+ showReportParticipant: g,
4538
4560
  onDeleteConversationClick: d,
4539
- onBlockParticipantClick: u,
4561
+ onBlockParticipantClick: m,
4540
4562
  onReportParticipantClick: p,
4541
- customChannelActions: N,
4563
+ customChannelActions: w,
4542
4564
  renderChannelActions: C,
4543
- renderHeaderTitleBadges: x
4565
+ renderHeaderTitleBadges: N
4544
4566
  }
4545
4567
  ) }, "lt-channel-header"),
4546
4568
  X
4547
4569
  ] }),
4548
- F && !j && /* @__PURE__ */ m("div", { className: "px-4 @lg:px-6", children: [
4549
- te,
4550
- X
4551
- ] }),
4552
- /* @__PURE__ */ s(
4570
+ /* @__PURE__ */ u(
4553
4571
  "div",
4554
4572
  {
4555
4573
  className: "flex-1 overflow-hidden relative",
4556
- children: /* @__PURE__ */ s(
4557
- In,
4558
- {
4559
- head: F && j ? /* @__PURE__ */ m("div", { className: "sticky top-0 z-10", children: [
4560
- te,
4561
- X
4562
- ] }) : void 0,
4563
- hideDeletedMessages: !0,
4564
- hideNewMessageSeparator: !1
4565
- }
4566
- )
4574
+ children: [
4575
+ F && !j && /* @__PURE__ */ s("div", { className: "str-chat__list", children: /* @__PURE__ */ u("div", { className: "str-chat__message-list-scroll", children: [
4576
+ ee,
4577
+ X
4578
+ ] }) }),
4579
+ /* @__PURE__ */ s(
4580
+ In,
4581
+ {
4582
+ head: F && j ? /* @__PURE__ */ u("div", { className: "sticky top-0 z-10", children: [
4583
+ ee,
4584
+ X
4585
+ ] }) : void 0,
4586
+ hideDeletedMessages: !0,
4587
+ hideNewMessageSeparator: !1
4588
+ }
4589
+ )
4590
+ ]
4567
4591
  },
4568
4592
  "lt-channel-message-list"
4569
4593
  ),
4570
4594
  r ? /* @__PURE__ */ s(V.Fragment, { children: r(y) }, "lt-channel-conversation-footer") : null,
4571
4595
  /* @__PURE__ */ s(
4572
- Mi,
4596
+ Ii,
4573
4597
  {
4574
4598
  ...n && {
4575
4599
  renderActions: () => n == null ? void 0 : n(y)
4576
4600
  },
4577
4601
  renderFooter: () => a == null ? void 0 : a(y),
4578
4602
  disabled: c,
4579
- disabledReason: v,
4580
- composerInput: D
4603
+ disabledReason: b,
4604
+ composerInput: L
4581
4605
  },
4582
4606
  "lt-channel-message-input"
4583
4607
  )
@@ -4595,86 +4619,86 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4595
4619
  onLeaveConversation: o,
4596
4620
  onBlockParticipant: l,
4597
4621
  className: d,
4598
- CustomChannelEmptyState: u = Gi,
4622
+ CustomChannelEmptyState: m = Ui,
4599
4623
  showDeleteConversation: p = !0,
4600
4624
  onDeleteConversationClick: h,
4601
- onBlockParticipantClick: f,
4625
+ onBlockParticipantClick: g,
4602
4626
  onReportParticipantClick: c,
4603
- showBlockParticipant: v = !0,
4604
- showReportParticipant: w = !0,
4605
- composerDisabled: b = !1,
4606
- composerDisabledReason: g,
4607
- dmAgentEnabled: x,
4608
- messageMetadata: N,
4627
+ showBlockParticipant: b = !0,
4628
+ showReportParticipant: x = !0,
4629
+ composerDisabled: v = !1,
4630
+ composerDisabledReason: f,
4631
+ dmAgentEnabled: N,
4632
+ messageMetadata: w,
4609
4633
  onMessageSent: C,
4610
- showStarButton: T = !1,
4611
- chatbotVotingEnabled: A = !1,
4612
- renderChannelBanner: L,
4634
+ showStarButton: R = !1,
4635
+ chatbotVotingEnabled: S = !1,
4636
+ renderChannelBanner: D,
4613
4637
  renderHeaderTitleBadges: $,
4614
4638
  customChannelActions: F,
4615
- renderChannelActions: D,
4639
+ renderChannelActions: L,
4616
4640
  renderMessage: y,
4617
- onMessageLinkClick: I,
4618
- sendButton: S,
4619
- attachmentPreviewList: R,
4620
- viewerLanguage: E,
4641
+ onMessageLinkClick: E,
4642
+ sendButton: I,
4643
+ attachmentPreviewList: M,
4644
+ viewerLanguage: T,
4621
4645
  showChannelInfo: z = !0,
4622
4646
  onParticipantNameClick: O,
4623
4647
  composerInput: j
4624
4648
  }) => {
4625
4649
  const X = Z(
4626
- async (K, _, M) => {
4650
+ async (K, _, A) => {
4627
4651
  var Q;
4628
- const H = ((Q = e.data) == null ? void 0 : Q.chatbot_paused) === !0, q = x && !H, Y = {
4652
+ const H = ((Q = e.data) == null ? void 0 : Q.chatbot_paused) === !0, q = N && !H, Y = {
4629
4653
  ..._,
4630
4654
  ...q && { silent: !0 },
4631
- ...N && {
4655
+ ...w && {
4632
4656
  metadata: {
4633
4657
  ..._.metadata ?? {},
4634
- ...N
4658
+ ...w
4635
4659
  }
4636
4660
  }
4637
4661
  }, B = {
4638
- ...M,
4662
+ ...A,
4639
4663
  ...q && { skip_push: !0 }
4640
4664
  }, W = await e.sendMessage(Y, B);
4641
4665
  return C == null || C(W), W;
4642
4666
  },
4643
- [e, x, N, C]
4644
- ), te = G(null);
4667
+ [e, N, w, C]
4668
+ ), ee = G(null);
4645
4669
  return J(() => {
4646
- if (!I) return;
4647
- const K = te.current;
4670
+ if (!E) return;
4671
+ const K = ee.current;
4648
4672
  if (!K) return;
4649
- const _ = (M) => {
4650
- const H = M.target, q = H == null ? void 0 : H.closest("a[href]"), Y = q == null ? void 0 : q.getAttribute("href");
4673
+ const _ = (A) => {
4674
+ const H = A.target, q = H == null ? void 0 : H.closest("a[href]"), Y = q == null ? void 0 : q.getAttribute("href");
4651
4675
  if (!Y) return;
4652
- const B = q == null ? void 0 : q.closest("[data-message-id]"), W = B == null ? void 0 : B.getAttribute("data-message-id"), Q = W ? e.state.messages.find((ce) => ce.id === W) : void 0;
4653
- I(Y, Q);
4676
+ const B = q == null ? void 0 : q.closest("[data-message-id]"), W = B == null ? void 0 : B.getAttribute("data-message-id"), Q = W ? e.state.messages.find((de) => de.id === W) : void 0;
4677
+ E(Y, Q);
4654
4678
  };
4655
4679
  return K.addEventListener("click", _), () => K.removeEventListener("click", _);
4656
- }, [I, e]), /* @__PURE__ */ s(
4680
+ }, [E, e]), /* @__PURE__ */ s(
4657
4681
  "div",
4658
4682
  {
4659
- ref: te,
4683
+ ref: ee,
4660
4684
  className: k(
4661
4685
  "messaging-channel-view h-full flex flex-col",
4662
4686
  d
4663
4687
  ),
4664
- children: /* @__PURE__ */ s(Os.Provider, { value: x ?? !1, children: /* @__PURE__ */ s(
4688
+ children: /* @__PURE__ */ s(Os.Provider, { value: N ?? !1, children: /* @__PURE__ */ s(
4665
4689
  Cn,
4666
4690
  {
4667
4691
  channel: e,
4668
- MessageSystem: Bi,
4669
- EmptyStateIndicator: u,
4692
+ MessageSystem: Fi,
4693
+ EmptyStateIndicator: m,
4670
4694
  LoadingIndicator: Be,
4671
4695
  DateSeparator: ba,
4672
- TypingIndicator: ji,
4696
+ TypingIndicator: $i,
4673
4697
  doSendMessageRequest: X,
4674
- ...S ? { SendButton: S } : {},
4675
- ...R ? { AttachmentPreviewList: R } : {},
4698
+ ...I ? { SendButton: I } : {},
4699
+ ...M ? { AttachmentPreviewList: M } : {},
4676
4700
  children: /* @__PURE__ */ s(
4677
- qi,
4701
+ Gi,
4678
4702
  {
4679
4703
  onBack: t,
4680
4704
  showBackButton: n,
@@ -4683,24 +4707,24 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4683
4707
  renderConversationFooter: i,
4684
4708
  onLeaveConversation: o,
4685
4709
  onBlockParticipant: l,
4686
- CustomChannelEmptyState: u,
4710
+ CustomChannelEmptyState: m,
4687
4711
  showDeleteConversation: p,
4688
4712
  onDeleteConversationClick: h,
4689
- onBlockParticipantClick: f,
4713
+ onBlockParticipantClick: g,
4690
4714
  onReportParticipantClick: c,
4691
- showBlockParticipant: v,
4692
- showReportParticipant: w,
4693
- composerDisabled: b,
4694
- composerDisabledReason: g,
4695
- showStarButton: T,
4696
- dmAgentEnabled: x,
4697
- chatbotVotingEnabled: A,
4698
- renderChannelBanner: L,
4715
+ showBlockParticipant: b,
4716
+ showReportParticipant: x,
4717
+ composerDisabled: v,
4718
+ composerDisabledReason: f,
4719
+ showStarButton: R,
4720
+ dmAgentEnabled: N,
4721
+ chatbotVotingEnabled: S,
4722
+ renderChannelBanner: D,
4699
4723
  renderHeaderTitleBadges: $,
4700
4724
  customChannelActions: F,
4701
- renderChannelActions: D,
4725
+ renderChannelActions: L,
4702
4726
  renderMessage: y,
4703
- viewerLanguage: E,
4727
+ viewerLanguage: T,
4704
4728
  showChannelInfo: z,
4705
4729
  onParticipantNameClick: O,
4706
4730
  composerInput: j
@@ -4713,7 +4737,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4713
4737
  }
4714
4738
  );
4715
4739
  $s.displayName = "ChannelView";
4716
- const ke = V.memo(({ message: e, onBack: t }) => /* @__PURE__ */ s("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ m("div", { className: "text-center max-w-sm", children: [
4740
+ const ke = V.memo(({ message: e, onBack: t }) => /* @__PURE__ */ s("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ u("div", { className: "text-center max-w-sm", children: [
4717
4741
  /* @__PURE__ */ s("div", { className: "w-24 h-24 bg-danger-alt/20 rounded-full flex items-center justify-center mx-auto mb-6", children: /* @__PURE__ */ s("span", { className: "text-4xl", children: "⚠️" }) }),
4718
4742
  /* @__PURE__ */ s("h2", { className: "font-semibold text-charcoal mb-2", children: "Oops!" }),
4719
4743
  /* @__PURE__ */ s("p", { className: "text-stone text-sm mb-6", children: e }),
@@ -4728,7 +4752,7 @@ const ke = V.memo(({ message: e, onBack: t }) => /* @__PURE__ */ s("div", { clas
4728
4752
  )
4729
4753
  ] }) }));
4730
4754
  ke.displayName = "ErrorState";
4731
- const fl = ({
4755
+ const ul = ({
4732
4756
  capabilities: e = {},
4733
4757
  renderMessageInputActions: t,
4734
4758
  renderConversationFooter: n,
@@ -4738,54 +4762,54 @@ const fl = ({
4738
4762
  initialParticipantData: o,
4739
4763
  CustomChannelEmptyState: l,
4740
4764
  onBlockParticipantClick: d,
4741
- onReportParticipantClick: u,
4765
+ onReportParticipantClick: m,
4742
4766
  dmAgentEnabled: p,
4743
4767
  onMessageSent: h,
4744
- chatbotVotingEnabled: f = !1,
4768
+ chatbotVotingEnabled: g = !1,
4745
4769
  viewerLanguage: c,
4746
- renderHeaderTitleBadges: v,
4747
- renderChannelBanner: w,
4748
- customChannelActions: b,
4749
- renderChannelActions: g,
4750
- onParticipantNameClick: x,
4751
- renderMessage: N,
4770
+ renderHeaderTitleBadges: b,
4771
+ renderChannelBanner: x,
4772
+ customChannelActions: v,
4773
+ renderChannelActions: f,
4774
+ onParticipantNameClick: N,
4775
+ renderMessage: w,
4752
4776
  onMessageLinkClick: C,
4753
- showChannelInfo: T,
4754
- composerInput: A
4777
+ showChannelInfo: R,
4778
+ composerInput: S
4755
4779
  }) => {
4756
4780
  const {
4757
- client: L,
4781
+ client: D,
4758
4782
  isConnected: $,
4759
4783
  isLoading: F,
4760
- error: D,
4784
+ error: L,
4761
4785
  refreshConnection: y,
4762
- service: I,
4763
- debug: S
4764
- } = sa(), [R, E] = U(null), [z, O] = U(null), [j, X] = U(!1), { showDeleteConversation: te = !0 } = e, K = G(o);
4786
+ service: E,
4787
+ debug: I
4788
+ } = sa(), [M, T] = U(null), [z, O] = U(null), [j, X] = U(!1), { showDeleteConversation: ee = !0 } = e, K = G(o);
4765
4789
  K.current = o;
4766
4790
  const _ = G(a);
4767
4791
  _.current = a;
4768
- const M = G(null), H = G(null);
4792
+ const A = G(null), H = G(null);
4769
4793
  J(() => {
4770
- H.current = R;
4771
- }, [R]), J(() => {
4772
- if (!L || !$) return;
4773
- const B = L.userID;
4794
+ H.current = M;
4795
+ }, [M]), J(() => {
4796
+ if (!D || !$) return;
4797
+ const B = D.userID;
4774
4798
  if (!B) return;
4775
4799
  const W = `${B}::${i}`;
4776
- if (M.current === W) return;
4777
- M.current = W;
4800
+ if (A.current === W) return;
4801
+ A.current = W;
4778
4802
  const Q = () => {
4779
- M.current === W && (M.current = null);
4803
+ A.current === W && (A.current = null);
4780
4804
  };
4781
4805
  (async () => {
4782
- var Le, De;
4806
+ var De, Le;
4783
4807
  try {
4784
- S && console.log(
4808
+ I && console.log(
4785
4809
  "[MessagingShell] Loading initial conversation with:",
4786
4810
  i
4787
4811
  );
4788
- const ne = await L.queryChannels(
4812
+ const ae = await D.queryChannels(
4789
4813
  {
4790
4814
  type: "messaging",
4791
4815
  members: { $eq: [B, i] }
@@ -4793,28 +4817,28 @@ const fl = ({
4793
4817
  {},
4794
4818
  { limit: 1 }
4795
4819
  );
4796
- if (ne.length > 0) {
4797
- E(ne[0]), O(null), (Le = _.current) == null || Le.call(_, ne[0]), S && console.log(
4820
+ if (ae.length > 0) {
4821
+ T(ae[0]), O(null), (De = _.current) == null || De.call(_, ae[0]), I && console.log(
4798
4822
  "[MessagingShell] Initial conversation loaded:",
4799
- ne[0].id
4823
+ ae[0].id
4800
4824
  );
4801
4825
  return;
4802
4826
  }
4803
- const de = K.current;
4804
- if (!de || !I) {
4805
- Q(), O("No conversation found with this account"), S && console.log(
4827
+ const ue = K.current;
4828
+ if (!ue || !E) {
4829
+ Q(), O("No conversation found with this account"), I && console.log(
4806
4830
  "[MessagingShell] No conversation found for:",
4807
4831
  i
4808
4832
  );
4809
4833
  return;
4810
4834
  }
4811
4835
  try {
4812
- const ie = await I.startChannelWithParticipant({
4813
- id: de.id,
4814
- name: de.name,
4815
- phone: de.phone
4836
+ const ie = await E.startChannelWithParticipant({
4837
+ id: ue.id,
4838
+ name: ue.name,
4839
+ phone: ue.phone
4816
4840
  });
4817
- E(ie), O(null), (De = _.current) == null || De.call(_, ie), S && console.log(
4841
+ T(ie), O(null), (Le = _.current) == null || Le.call(_, ie), I && console.log(
4818
4842
  "[MessagingShell] Channel created and loaded:",
4819
4843
  ie.id
4820
4844
  );
@@ -4824,56 +4848,56 @@ const fl = ({
4824
4848
  ie
4825
4849
  ), Q(), O("Failed to create conversation");
4826
4850
  }
4827
- } catch (ne) {
4851
+ } catch (ae) {
4828
4852
  console.error(
4829
4853
  "[MessagingShell] Failed to load initial conversation:",
4830
- ne
4854
+ ae
4831
4855
  ), Q(), H.current || O("Failed to load conversation");
4832
4856
  }
4833
4857
  })();
4834
- }, [i, L, $, I, S]);
4858
+ }, [i, D, $, E, I]);
4835
4859
  const q = G(r);
4836
4860
  q.current = r;
4837
4861
  const Y = Z(() => {
4838
4862
  var B;
4839
- E(null), X(!0), (B = q.current) == null || B.call(q);
4863
+ T(null), X(!0), (B = q.current) == null || B.call(q);
4840
4864
  }, []);
4841
- return F ? /* @__PURE__ */ s(Be, {}) : D ? /* @__PURE__ */ s(ke, { message: D, onBack: y }) : !$ || !L ? /* @__PURE__ */ s(
4865
+ return F ? /* @__PURE__ */ s(Be, {}) : L ? /* @__PURE__ */ s(ke, { message: L, onBack: y }) : !$ || !D ? /* @__PURE__ */ s(
4842
4866
  ke,
4843
4867
  {
4844
4868
  message: "Not connected to messaging service",
4845
4869
  onBack: y
4846
4870
  }
4847
- ) : z ? /* @__PURE__ */ s(ke, { message: z }) : j && !R ? /* @__PURE__ */ s(ke, { message: "Conversation ended" }) : R ? /* @__PURE__ */ s("div", { className: "messaging-shell h-full bg-background-primary overflow-hidden", children: /* @__PURE__ */ s("div", { className: "flex h-full min-h-0 flex-col", children: /* @__PURE__ */ s(
4871
+ ) : z ? /* @__PURE__ */ s(ke, { message: z }) : j && !M ? /* @__PURE__ */ s(ke, { message: "Conversation ended" }) : M ? /* @__PURE__ */ s("div", { className: "messaging-shell h-full bg-background-primary overflow-hidden", children: /* @__PURE__ */ s("div", { className: "flex h-full min-h-0 flex-col", children: /* @__PURE__ */ s(
4848
4872
  $s,
4849
4873
  {
4850
- channel: R,
4874
+ channel: M,
4851
4875
  renderMessageInputActions: t,
4852
4876
  renderConversationFooter: n,
4853
- renderChannelBanner: w,
4877
+ renderChannelBanner: x,
4854
4878
  onLeaveConversation: Y,
4855
4879
  onBlockParticipant: Y,
4856
4880
  CustomChannelEmptyState: l,
4857
- showDeleteConversation: te,
4881
+ showDeleteConversation: ee,
4858
4882
  onBlockParticipantClick: d,
4859
- onReportParticipantClick: u,
4883
+ onReportParticipantClick: m,
4860
4884
  dmAgentEnabled: p,
4861
4885
  onMessageSent: h,
4862
- chatbotVotingEnabled: f,
4886
+ chatbotVotingEnabled: g,
4863
4887
  viewerLanguage: c,
4864
- renderHeaderTitleBadges: v,
4865
- customChannelActions: b,
4866
- renderChannelActions: g,
4867
- onParticipantNameClick: x,
4868
- renderMessage: N,
4888
+ renderHeaderTitleBadges: b,
4889
+ customChannelActions: v,
4890
+ renderChannelActions: f,
4891
+ onParticipantNameClick: N,
4892
+ renderMessage: w,
4869
4893
  onMessageLinkClick: C,
4870
- showChannelInfo: T,
4871
- composerInput: A
4894
+ showChannelInfo: R,
4895
+ composerInput: S
4872
4896
  },
4873
- R.id
4897
+ M.id
4874
4898
  ) }) }) : /* @__PURE__ */ s(Be, {});
4875
4899
  };
4876
- function Wi(e) {
4900
+ function Hi(e) {
4877
4901
  const t = e.state.pending_messages;
4878
4902
  if (t != null && t.length)
4879
4903
  for (const n of t)
@@ -4887,18 +4911,18 @@ const Bs = V.createContext({
4887
4911
  renderMessagePreview: void 0,
4888
4912
  channelPreview: void 0,
4889
4913
  viewerLanguage: void 0
4890
- }), Xi = Bs.Provider, Ki = () => V.useContext(Bs), Ji = (e, t) => {
4914
+ }), Yi = Bs.Provider, qi = () => V.useContext(Bs), Wi = (e, t) => {
4891
4915
  const n = new Date(
4892
4916
  Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate())
4893
4917
  ), r = new Date(
4894
4918
  Date.UTC(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate())
4895
4919
  ).getTime() - n.getTime();
4896
4920
  return Math.floor(r / (1e3 * 60 * 60 * 24));
4897
- }, Zi = (e) => {
4921
+ }, Xi = (e) => {
4898
4922
  const t = /* @__PURE__ */ new Date();
4899
4923
  if (Math.floor((t.getTime() - e.getTime()) / 1e3) < 60)
4900
4924
  return "Just now";
4901
- const a = Ji(e, t);
4925
+ const a = Wi(e, t);
4902
4926
  return a === 0 ? e.toLocaleTimeString([], {
4903
4927
  hour: "numeric",
4904
4928
  minute: "2-digit",
@@ -4910,7 +4934,7 @@ const Bs = V.createContext({
4910
4934
  });
4911
4935
  }, Us = V.memo(
4912
4936
  (e) => {
4913
- var $, F, D;
4937
+ var $, F, L;
4914
4938
  const { channel: t, unread: n } = e, {
4915
4939
  selectedChannel: a,
4916
4940
  onChannelSelect: r,
@@ -4918,7 +4942,7 @@ const Bs = V.createContext({
4918
4942
  channelPreview: o,
4919
4943
  renderMessagePreview: l,
4920
4944
  viewerLanguage: d
4921
- } = Ki(), { client: u } = me(), p = (a == null ? void 0 : a.id) === (t == null ? void 0 : t.id), h = ot(t);
4945
+ } = qi(), { client: m } = oe(), p = (a == null ? void 0 : a.id) === (t == null ? void 0 : t.id), h = dt(t);
4922
4946
  if (o)
4923
4947
  return /* @__PURE__ */ s(
4924
4948
  o,
@@ -4930,48 +4954,48 @@ const Bs = V.createContext({
4930
4954
  viewerLanguage: d
4931
4955
  }
4932
4956
  );
4933
- const f = () => {
4957
+ const g = () => {
4934
4958
  t && r(t);
4935
4959
  }, c = (y) => {
4936
- const I = y.key === "Enter" || y.key === " ", S = y.repeat;
4937
- !I || S || (y.preventDefault(), f());
4938
- }, v = je(
4960
+ const E = y.key === "Enter" || y.key === " ", I = y.repeat;
4961
+ !E || I || (y.preventDefault(), g());
4962
+ }, b = je(
4939
4963
  ($ = t == null ? void 0 : t.state) == null ? void 0 : $.members,
4940
- u == null ? void 0 : u.userID,
4964
+ m == null ? void 0 : m.userID,
4941
4965
  t == null ? void 0 : t.type
4942
- ), w = ct(v == null ? void 0 : v.user), b = (F = v == null ? void 0 : v.user) == null ? void 0 : F.image, g = (() => {
4943
- var I;
4944
- const y = (I = t == null ? void 0 : t.state) == null ? void 0 : I.messages;
4966
+ ), x = ut(b == null ? void 0 : b.user), v = (F = b == null ? void 0 : b.user) == null ? void 0 : F.image, f = (() => {
4967
+ var E;
4968
+ const y = (E = t == null ? void 0 : t.state) == null ? void 0 : E.messages;
4945
4969
  if (y != null && y.length) {
4946
- for (let S = y.length - 1; S >= 0; S--)
4947
- if (y[S].type !== "system") return y[S];
4970
+ for (let I = y.length - 1; I >= 0; I--)
4971
+ if (y[I].type !== "system") return y[I];
4948
4972
  }
4949
- })(), N = (() => {
4973
+ })(), w = (() => {
4950
4974
  var z, O, j, X;
4951
4975
  const y = hs({
4952
- message: g,
4976
+ message: f,
4953
4977
  viewerLanguage: d
4954
4978
  });
4955
- if (((z = g == null ? void 0 : g.metadata) == null ? void 0 : z.custom_type) === "MESSAGE_TIP") return y ? `💵 ${y}` : "💵 Sent a tip";
4956
- if (((O = g == null ? void 0 : g.metadata) == null ? void 0 : O.custom_type) === "MESSAGE_PAID") return y ? `💰 ${y}` : "💰 Sent a message";
4957
- if (((j = g == null ? void 0 : g.metadata) == null ? void 0 : j.custom_type) === "MESSAGE_ATTACHMENT")
4979
+ if (((z = f == null ? void 0 : f.metadata) == null ? void 0 : z.custom_type) === "MESSAGE_TIP") return y ? `💵 ${y}` : "💵 Sent a tip";
4980
+ if (((O = f == null ? void 0 : f.metadata) == null ? void 0 : O.custom_type) === "MESSAGE_PAID") return y ? `💰 ${y}` : "💰 Sent a message";
4981
+ if (((j = f == null ? void 0 : f.metadata) == null ? void 0 : j.custom_type) === "MESSAGE_ATTACHMENT")
4958
4982
  return y ? `📎 ${y}` : "📎 Sent an attachment";
4959
4983
  if (y) return y;
4960
- const E = (X = g == null ? void 0 : g.attachments) == null ? void 0 : X[0];
4961
- return E ? E.og_scrape_url ? E.og_scrape_url : E.type === "image" ? "📷 Sent an image" : E.type === "video" ? "🎥 Sent a video" : E.type === "audio" ? "🎵 Sent audio" : E.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
4962
- })(), C = g != null && g.created_at ? Zi(new Date(g.created_at)) : "", T = g ? Fe(g) : !1, A = l ? l(g, N) : `${T ? "✨ " : ""}${N}`, L = n ?? 0;
4984
+ const T = (X = f == null ? void 0 : f.attachments) == null ? void 0 : X[0];
4985
+ return T ? T.og_scrape_url ? T.og_scrape_url : T.type === "image" ? "📷 Sent an image" : T.type === "video" ? "🎥 Sent a video" : T.type === "audio" ? "🎵 Sent audio" : T.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
4986
+ })(), C = f != null && f.created_at ? Xi(new Date(f.created_at)) : "", R = f ? Fe(f) : !1, S = l ? l(f, w) : `${R ? "✨ " : ""}${w}`, D = n ?? 0;
4963
4987
  return i && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
4964
4988
  channelId: t == null ? void 0 : t.id,
4965
4989
  isSelected: p,
4966
- participantName: w,
4967
- unreadCount: L,
4990
+ participantName: x,
4991
+ unreadCount: D,
4968
4992
  hasTimestamp: !!C
4969
4993
  }), /* @__PURE__ */ s(
4970
4994
  "div",
4971
4995
  {
4972
4996
  role: "button",
4973
4997
  tabIndex: 0,
4974
- onClick: f,
4998
+ onClick: g,
4975
4999
  onKeyDown: c,
4976
5000
  className: k(
4977
5001
  "group w-full px-4 py-3 transition-colors text-left max-w-full overflow-hidden focus-ring rounded-[12px] [&+&]:mt-2",
@@ -4981,20 +5005,20 @@ const Bs = V.createContext({
4981
5005
  }
4982
5006
  ),
4983
5007
  "data-dd-privacy": "mask",
4984
- children: /* @__PURE__ */ m("div", { className: "flex items-start gap-4", children: [
5008
+ children: /* @__PURE__ */ u("div", { className: "flex items-start gap-4", children: [
4985
5009
  /* @__PURE__ */ s(
4986
- se,
5010
+ ne,
4987
5011
  {
4988
- id: ((D = v == null ? void 0 : v.user) == null ? void 0 : D.id) || t.id || "unknown",
4989
- name: w,
4990
- image: b,
5012
+ id: ((L = b == null ? void 0 : b.user) == null ? void 0 : L.id) || t.id || "unknown",
5013
+ name: x,
5014
+ image: v,
4991
5015
  size: 48,
4992
5016
  starred: h
4993
5017
  }
4994
5018
  ),
4995
- /* @__PURE__ */ m("div", { className: "flex-1 min-w-0 flex flex-col gap-1", children: [
4996
- /* @__PURE__ */ m("div", { className: "flex items-center justify-between gap-2", children: [
4997
- /* @__PURE__ */ m(
5019
+ /* @__PURE__ */ u("div", { className: "flex-1 min-w-0 flex flex-col gap-1", children: [
5020
+ /* @__PURE__ */ u("div", { className: "flex items-center justify-between gap-2", children: [
5021
+ /* @__PURE__ */ u(
4998
5022
  "h3",
4999
5023
  {
5000
5024
  className: k(
@@ -5002,15 +5026,15 @@ const Bs = V.createContext({
5002
5026
  ),
5003
5027
  children: [
5004
5028
  h && /* @__PURE__ */ s("span", { className: "sr-only", children: "Starred conversation. " }),
5005
- w
5029
+ x
5006
5030
  ]
5007
5031
  }
5008
5032
  ),
5009
5033
  C && /* @__PURE__ */ s("span", { className: "text-xs text-[#717070] flex-shrink-0", children: C })
5010
5034
  ] }),
5011
- /* @__PURE__ */ m("div", { className: "flex items-center justify-between gap-2 min-w-0", children: [
5012
- /* @__PURE__ */ s("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: A }),
5013
- L > 0 && /* @__PURE__ */ s("span", { className: "bg-[#7f22fe] text-white text-[10px] rounded-full h-4 flex items-center justify-center p-1 min-w-4 text-center flex-shrink-0", children: L > 99 ? "99+" : L })
5035
+ /* @__PURE__ */ u("div", { className: "flex items-center justify-between gap-2 min-w-0", children: [
5036
+ /* @__PURE__ */ s("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: S }),
5037
+ D > 0 && /* @__PURE__ */ s("span", { className: "bg-[#7f22fe] text-white text-[10px] rounded-full h-4 flex items-center justify-center p-1 min-w-4 text-center flex-shrink-0", children: D > 99 ? "99+" : D })
5014
5038
  ] })
5015
5039
  ] })
5016
5040
  ] })
@@ -5019,42 +5043,42 @@ const Bs = V.createContext({
5019
5043
  }
5020
5044
  );
5021
5045
  Us.displayName = "CustomChannelPreview";
5022
- const Qi = { last_message_at: -1 }, el = V.memo(
5046
+ const Ki = { last_message_at: -1 }, Ji = V.memo(
5023
5047
  ({
5024
5048
  onChannelSelect: e,
5025
5049
  selectedChannel: t,
5026
5050
  filters: n,
5027
5051
  allowNewMessagesFromUnfilteredChannels: a = !1,
5028
5052
  channelRenderFilterFn: r,
5029
- sort: i = Qi,
5053
+ sort: i = Ki,
5030
5054
  className: o,
5031
5055
  customEmptyStateIndicator: l,
5032
5056
  channelListPaginator: d = An,
5033
- channelPreview: u,
5057
+ channelPreview: m,
5034
5058
  renderMessagePreview: p,
5035
5059
  viewerLanguage: h
5036
5060
  }) => {
5037
- const f = V.useRef(0);
5038
- f.current++;
5039
- const { debug: c = !1 } = lt(), v = V.useCallback(
5040
- (b) => {
5041
- for (const g of b)
5042
- Wi(g);
5043
- return r ? r(b) : b;
5061
+ const g = V.useRef(0);
5062
+ g.current++;
5063
+ const { debug: c = !1 } = ct(), b = V.useCallback(
5064
+ (v) => {
5065
+ for (const f of v)
5066
+ Hi(f);
5067
+ return r ? r(v) : v;
5044
5068
  },
5045
5069
  [r]
5046
5070
  );
5047
5071
  c && console.log("📺 [ChannelList] 🔄 RENDER START", {
5048
- renderCount: f.current,
5072
+ renderCount: g.current,
5049
5073
  selectedChannelId: t == null ? void 0 : t.id,
5050
5074
  filters: n
5051
5075
  });
5052
- const w = V.useMemo(
5076
+ const x = V.useMemo(
5053
5077
  () => ({
5054
5078
  selectedChannel: t,
5055
5079
  onChannelSelect: e,
5056
5080
  debug: c,
5057
- channelPreview: u,
5081
+ channelPreview: m,
5058
5082
  renderMessagePreview: p,
5059
5083
  viewerLanguage: h
5060
5084
  }),
@@ -5062,7 +5086,7 @@ const Qi = { last_message_at: -1 }, el = V.memo(
5062
5086
  t,
5063
5087
  e,
5064
5088
  c,
5065
- u,
5089
+ m,
5066
5090
  p,
5067
5091
  h
5068
5092
  ]
@@ -5074,14 +5098,14 @@ const Qi = { last_message_at: -1 }, el = V.memo(
5074
5098
  "messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden",
5075
5099
  o
5076
5100
  ),
5077
- children: /* @__PURE__ */ s("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ s(Xi, { value: w, children: /* @__PURE__ */ s(
5101
+ children: /* @__PURE__ */ s("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ s(Yi, { value: x, children: /* @__PURE__ */ s(
5078
5102
  Tn,
5079
5103
  {
5080
5104
  filters: n,
5081
5105
  sort: i,
5082
5106
  options: { limit: 30 },
5083
5107
  allowNewMessagesFromUnfilteredChannels: a,
5084
- channelRenderFilterFn: v,
5108
+ channelRenderFilterFn: b,
5085
5109
  Paginator: d,
5086
5110
  Preview: Us,
5087
5111
  EmptyStateIndicator: l
@@ -5092,8 +5116,8 @@ const Qi = { last_message_at: -1 }, el = V.memo(
5092
5116
  );
5093
5117
  }
5094
5118
  );
5095
- el.displayName = "ChannelList";
5096
- const tl = ({
5119
+ Ji.displayName = "ChannelList";
5120
+ const Zi = ({
5097
5121
  question: e,
5098
5122
  onClick: t,
5099
5123
  loading: n = !1,
@@ -5115,7 +5139,7 @@ const tl = ({
5115
5139
  ),
5116
5140
  children: e
5117
5141
  }
5118
- ), gl = ({
5142
+ ), ml = ({
5119
5143
  faqs: e,
5120
5144
  onFaqClick: t,
5121
5145
  loadingFaqId: n,
@@ -5124,10 +5148,10 @@ const tl = ({
5124
5148
  avatarImage: i,
5125
5149
  avatarName: o
5126
5150
  }) => {
5127
- const l = e.filter((d) => d.enabled).sort((d, u) => (d.order ?? 0) - (u.order ?? 0));
5128
- return l.length === 0 ? null : /* @__PURE__ */ s("div", { className: r, children: /* @__PURE__ */ m("div", { className: "flex gap-3 items-end", children: [
5151
+ const l = e.filter((d) => d.enabled).sort((d, m) => (d.order ?? 0) - (m.order ?? 0));
5152
+ return l.length === 0 ? null : /* @__PURE__ */ s("div", { className: r, children: /* @__PURE__ */ u("div", { className: "flex gap-3 items-end", children: [
5129
5153
  (i || o) && /* @__PURE__ */ s("div", { className: "flex-none", children: /* @__PURE__ */ s(
5130
- se,
5154
+ ne,
5131
5155
  {
5132
5156
  id: o || "account",
5133
5157
  name: o || "Account",
@@ -5136,7 +5160,7 @@ const tl = ({
5136
5160
  shape: "circle"
5137
5161
  }
5138
5162
  ) }),
5139
- /* @__PURE__ */ m(
5163
+ /* @__PURE__ */ u(
5140
5164
  "div",
5141
5165
  {
5142
5166
  className: "flex-1 flex flex-col gap-3 rounded-lg p-4",
@@ -5144,7 +5168,7 @@ const tl = ({
5144
5168
  children: [
5145
5169
  a && /* @__PURE__ */ s("p", { className: "text-md text-charcoal mb-4", children: a }),
5146
5170
  l.map((d) => /* @__PURE__ */ s(
5147
- tl,
5171
+ Zi,
5148
5172
  {
5149
5173
  question: d.question,
5150
5174
  onClick: () => t(d.id),
@@ -5159,29 +5183,29 @@ const tl = ({
5159
5183
  };
5160
5184
  export {
5161
5185
  bs as A,
5162
- hl as B,
5163
- Gi as C,
5186
+ dl as B,
5187
+ Ui as C,
5164
5188
  Ur as D,
5165
5189
  xa as E,
5166
- gl as F,
5190
+ ml as F,
5167
5191
  sa as G,
5168
5192
  es as L,
5169
- ul as M,
5193
+ ol as M,
5170
5194
  Ne as a,
5171
- se as b,
5172
- el as c,
5195
+ ne as b,
5196
+ Ji as c,
5173
5197
  $s as d,
5174
- ml as e,
5175
- tl as f,
5176
- oe as g,
5198
+ cl as e,
5199
+ Zi as f,
5200
+ ce as g,
5177
5201
  Zt as h,
5178
5202
  ye as i,
5179
5203
  qr as j,
5180
- dl as k,
5181
- fl as l,
5204
+ ll as k,
5205
+ ul as l,
5182
5206
  rr as m,
5183
5207
  sr as n,
5184
- Zi as o,
5208
+ Xi as o,
5185
5209
  ar as p,
5186
5210
  hs as q,
5187
5211
  we as r,
@@ -5190,8 +5214,8 @@ export {
5190
5214
  Xa as u,
5191
5215
  wa as v,
5192
5216
  je as w,
5193
- ht as x,
5194
- ft as y,
5195
- ct as z
5217
+ gt as x,
5218
+ pt as y,
5219
+ ut as z
5196
5220
  };
5197
- //# sourceMappingURL=index-CD2uC47U.js.map
5221
+ //# sourceMappingURL=index-CBm9au-T.js.map