@linktr.ee/messaging-react 3.3.13-rc-1782277797 → 3.3.13-rc-1782278257

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 (30) hide show
  1. package/dist/{Card-DBp_8QQn.cjs → Card-BCFhuR1g.cjs} +2 -2
  2. package/dist/{Card-DBp_8QQn.cjs.map → Card-BCFhuR1g.cjs.map} +1 -1
  3. package/dist/{Card-BTJMCVf1.cjs → Card-BSIZi_Cu.cjs} +2 -2
  4. package/dist/{Card-BTJMCVf1.cjs.map → Card-BSIZi_Cu.cjs.map} +1 -1
  5. package/dist/{Card-Hn41fH7f.js → Card-Bl0tPvn7.js} +3 -3
  6. package/dist/{Card-Hn41fH7f.js.map → Card-Bl0tPvn7.js.map} +1 -1
  7. package/dist/{Card-Dv2KEVRW.js → Card-CI6Trmpw.js} +2 -2
  8. package/dist/{Card-Dv2KEVRW.js.map → Card-CI6Trmpw.js.map} +1 -1
  9. package/dist/{Card-NVRWULiK.js → Card-jmfDlxVY.js} +2 -2
  10. package/dist/{Card-NVRWULiK.js.map → Card-jmfDlxVY.js.map} +1 -1
  11. package/dist/{Card-BDVT0cV2.cjs → Card-p74GBYEd.cjs} +2 -2
  12. package/dist/{Card-BDVT0cV2.cjs.map → Card-p74GBYEd.cjs.map} +1 -1
  13. package/dist/{LockedThumbnail-D2vwt1XN.js → LockedThumbnail-qhUBSijq.js} +2 -2
  14. package/dist/{LockedThumbnail-D2vwt1XN.js.map → LockedThumbnail-qhUBSijq.js.map} +1 -1
  15. package/dist/{LockedThumbnail-CocS6J_E.cjs → LockedThumbnail-yoFQqnl6.cjs} +2 -2
  16. package/dist/{LockedThumbnail-CocS6J_E.cjs.map → LockedThumbnail-yoFQqnl6.cjs.map} +1 -1
  17. package/dist/{index-CAotDlQ-.js → index-BHFdqj7Z.js} +588 -586
  18. package/dist/index-BHFdqj7Z.js.map +1 -0
  19. package/dist/index-D31aF4s2.cjs +2 -0
  20. package/dist/index-D31aF4s2.cjs.map +1 -0
  21. package/dist/index.cjs +1 -1
  22. package/dist/index.d.ts +1 -1
  23. package/dist/index.js +1 -1
  24. package/package.json +2 -2
  25. package/src/components/ChannelView.tsx +6 -2
  26. package/src/components/MessagingShell/index.tsx +2 -0
  27. package/src/types.ts +1 -0
  28. package/dist/index-CAotDlQ-.js.map +0 -1
  29. package/dist/index-DXtxvlA5.cjs +0 -2
  30. package/dist/index-DXtxvlA5.cjs.map +0 -1
@@ -1,12 +1,12 @@
1
1
  import { jsx as n, jsxs as h, Fragment as ne } from "react/jsx-runtime";
2
- import V, { createContext as Ge, useContext as Te, useCallback as W, useState as P, useRef as G, useEffect as Y, useId as En, useMemo as te, Suspense as He } from "react";
2
+ import j, { createContext as He, useContext as Ae, useCallback as X, useState as P, useRef as V, useEffect as Y, useId as En, useMemo as te, Suspense as Ye } from "react";
3
3
  import { StreamChatService as Sn } from "@linktr.ee/messaging-core";
4
4
  import { StreamChat as In, LinkPreviewsManager as Tt } from "stream-chat";
5
- import { Chat as Tn, DateSeparator as An, useChannelStateContext as de, useChatContext as Ye, areMessageUIPropsEqual as Mn, useMessageReminder as Rn, useComponentContext as Ut, Attachment as Ln, EditMessageModal as Dn, MessageBlocked as Pn, MessageBouncePrompt as On, MessageDeleted as zn, MessageIsThreadReplyInChannelButtonIndicator as $n, MessageRepliesCountButton as Fn, ReminderNotification as Bn, StreamedMessageText as Un, messageHasAttachments as jn, messageHasReactions as Vn, isDateSeparatorMessage as Gn, isMessageBlocked as Hn, isMessageBounced as Yn, MessageBounceModal as qn, MessageText as At, Poll as Wn, MessageErrorIcon as Xn, useMessageContext as ve, useMessageComposer as Kn, useStateStore as Jn, MessageInput as Zn, useMessageInputContext as Qn, useMessageComposerHasSendableData as es, AttachmentPreviewList as ts, QuotedMessagePreview as ns, TextareaComposer as ss, MessageTimestamp as Le, AIStates as De, useTypingContext as as, useAIState as rs, Channel as is, WithComponents as os, Window as ls, MessageList as cs, ChannelList as ds, InfiniteScroll as us } from "stream-chat-react";
6
- import { StarIcon as Fe, DotsThreeIcon as ms, SpinnerGapIcon as Ce, SignOutIcon as hs, ProhibitInsetIcon as Mt, FlagIcon as jt, FileIcon as Vt, ImageIcon as fs, SpeakerHighIcon as gs, VideoCameraIcon as Gt, FileMdIcon as bs, FileTextIcon as ps, FileZipIcon as vs, FilePptIcon as xs, FileCsvIcon as ws, FileXlsIcon as _s, FileDocIcon as Ns, FilePdfIcon as ys, CircleNotchIcon as be, PlayIcon as Be, PauseIcon as Cs, LinkIcon as ks, DownloadSimpleIcon as pe, GiftIcon as Es, ThumbsUpIcon as Ss, ThumbsDownIcon as Is, TrashSimpleIcon as Ts, XIcon as Ae, ArrowUpIcon as As, SparkleIcon as Ue, ProhibitIcon as Ms, ArrowLeftIcon as Rt, PencilSimpleIcon as Rs, CaretLeftIcon as Ls, CaretRightIcon as Ds } from "@phosphor-icons/react";
7
- import C from "classnames";
5
+ import { Chat as Tn, DateSeparator as An, useChannelStateContext as de, useChatContext as qe, areMessageUIPropsEqual as Mn, useMessageReminder as Rn, useComponentContext as Ut, Attachment as Ln, EditMessageModal as Dn, MessageBlocked as Pn, MessageBouncePrompt as On, MessageDeleted as zn, MessageIsThreadReplyInChannelButtonIndicator as $n, MessageRepliesCountButton as Fn, ReminderNotification as Bn, StreamedMessageText as Un, messageHasAttachments as jn, messageHasReactions as Vn, isDateSeparatorMessage as Gn, isMessageBlocked as Hn, isMessageBounced as Yn, MessageBounceModal as qn, MessageText as At, Poll as Wn, MessageErrorIcon as Xn, useMessageContext as xe, useMessageComposer as Kn, useStateStore as Jn, MessageInput as Zn, useMessageInputContext as Qn, useMessageComposerHasSendableData as es, AttachmentPreviewList as ts, QuotedMessagePreview as ns, TextareaComposer as ss, MessageTimestamp as De, AIStates as Pe, useTypingContext as as, useAIState as rs, Channel as is, WithComponents as os, Window as ls, MessageList as cs, ChannelList as ds, InfiniteScroll as us } from "stream-chat-react";
6
+ import { StarIcon as Be, DotsThreeIcon as ms, SpinnerGapIcon as ke, SignOutIcon as hs, ProhibitInsetIcon as Mt, FlagIcon as jt, FileIcon as Vt, ImageIcon as fs, SpeakerHighIcon as gs, VideoCameraIcon as Gt, FileMdIcon as bs, FileTextIcon as ps, FileZipIcon as vs, FilePptIcon as xs, FileCsvIcon as ws, FileXlsIcon as _s, FileDocIcon as Ns, FilePdfIcon as ys, CircleNotchIcon as pe, PlayIcon as Ue, PauseIcon as Cs, LinkIcon as ks, DownloadSimpleIcon as ve, GiftIcon as Es, ThumbsUpIcon as Ss, ThumbsDownIcon as Is, TrashSimpleIcon as Ts, XIcon as Me, ArrowUpIcon as As, SparkleIcon as je, ProhibitIcon as Ms, ArrowLeftIcon as Rt, PencilSimpleIcon as Rs, CaretLeftIcon as Ls, CaretRightIcon as Ds } from "@phosphor-icons/react";
7
+ import y from "classnames";
8
8
  import { MessageActions as Ps, DefaultDropdownActionButton as Ht } from "stream-chat-react/experimental";
9
- const Yt = Ge({
9
+ const Yt = He({
10
10
  service: null,
11
11
  client: null,
12
12
  isConnected: !1,
@@ -16,7 +16,7 @@ const Yt = Ge({
16
16
  refreshConnection: async () => {
17
17
  },
18
18
  debug: !1
19
- }), qe = () => Te(Yt), Ni = ({
19
+ }), We = () => Ae(Yt), Ni = ({
20
20
  children: e,
21
21
  user: t,
22
22
  serviceConfig: s,
@@ -24,10 +24,10 @@ const Yt = Ge({
24
24
  capabilities: r = {},
25
25
  debug: i = !1
26
26
  }) => {
27
- var F, I;
28
- const o = W(
29
- (A, ...M) => {
30
- i && console.log(`🔥 [MessagingProvider] ${A}`, ...M);
27
+ var z, M;
28
+ const o = X(
29
+ (C, ...A) => {
30
+ i && console.log(`🔥 [MessagingProvider] ${C}`, ...A);
31
31
  },
32
32
  [i]
33
33
  );
@@ -37,16 +37,16 @@ const Yt = Ge({
37
37
  serviceConfig: !!s,
38
38
  capabilities: Object.keys(r)
39
39
  });
40
- const [l, d] = P(null), [m, g] = P(null), [u, f] = P(!1), [c, b] = P(!1), [x, p] = P(null), w = G(!1), _ = G(null), k = G(s);
41
- k.current = s;
42
- const S = G(i);
43
- S.current = i;
44
- const R = G({
40
+ const [l, d] = P(null), [m, g] = P(null), [u, f] = P(!1), [c, b] = P(!1), [x, p] = P(null), w = V(!1), _ = V(null), I = V(s);
41
+ I.current = s;
42
+ const E = V(i);
43
+ E.current = i;
44
+ const R = V({
45
45
  userId: t == null ? void 0 : t.id,
46
46
  apiKey: a,
47
47
  serviceConfig: s,
48
48
  capabilities: r
49
- }), D = G(0);
49
+ }), D = V(0);
50
50
  D.current++, o("📊 RENDER INFO", {
51
51
  renderCount: D.current,
52
52
  currentProps: { userId: t == null ? void 0 : t.id, apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..." },
@@ -62,36 +62,36 @@ const Yt = Ge({
62
62
  serviceConfig: s,
63
63
  capabilities: r
64
64
  };
65
- const O = G(null);
66
- a && ((F = O.current) == null ? void 0 : F.apiKey) !== a && (O.current = { apiKey: a, client: new In(a) });
67
- const T = a ? ((I = O.current) == null ? void 0 : I.client) ?? null : null;
65
+ const O = V(null);
66
+ a && ((z = O.current) == null ? void 0 : z.apiKey) !== a && (O.current = { apiKey: a, client: new In(a) });
67
+ const T = a ? ((M = O.current) == null ? void 0 : M.client) ?? null : null;
68
68
  Y(() => {
69
- const A = D.current, M = k.current;
70
- if (!a || !T || !M) {
69
+ const C = D.current, A = I.current;
70
+ if (!a || !T || !A) {
71
71
  o("⚠️ SERVICE INIT SKIPPED", {
72
- renderCount: A,
72
+ renderCount: C,
73
73
  reason: "Missing apiKey, client, or serviceConfig"
74
74
  });
75
75
  return;
76
76
  }
77
77
  o("🚀 CREATING SERVICE", {
78
- renderCount: A,
78
+ renderCount: C,
79
79
  apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..."
80
80
  });
81
- const z = new Sn({
82
- ...M,
81
+ const $ = new Sn({
82
+ ...A,
83
83
  apiKey: a,
84
- debug: S.current,
84
+ debug: E.current,
85
85
  client: T
86
86
  });
87
- _.current = z, d(z), o("✅ SERVICE SET", {
88
- renderCount: A,
89
- serviceInstance: !!z
87
+ _.current = $, d($), o("✅ SERVICE SET", {
88
+ renderCount: C,
89
+ serviceInstance: !!$
90
90
  });
91
91
  }, [a, T]);
92
- const N = G(null);
92
+ const N = V(null);
93
93
  Y(() => {
94
- var M, z;
94
+ var A, $;
95
95
  if (o("🔗 USER CONNECTION EFFECT TRIGGERED", {
96
96
  hasService: !!l,
97
97
  hasUser: !!t,
@@ -107,7 +107,7 @@ const Yt = Ge({
107
107
  o("⚠️ USER CONNECTION SKIPPED", "Already connecting");
108
108
  return;
109
109
  }
110
- if (((M = N.current) == null ? void 0 : M.serviceId) === l && ((z = N.current) == null ? void 0 : z.userId) === t.id) {
110
+ if (((A = N.current) == null ? void 0 : A.serviceId) === l && (($ = N.current) == null ? void 0 : $.userId) === t.id) {
111
111
  o(
112
112
  "⚠️ USER CONNECTION SKIPPED",
113
113
  "Already connected this user with this service"
@@ -118,16 +118,16 @@ const Yt = Ge({
118
118
  o("🚀 STARTING USER CONNECTION", { userId: t.id }), w.current = !0, b(!0), p(null);
119
119
  try {
120
120
  o("📞 CALLING SERVICE.CONNECTUSER", { userId: t.id });
121
- const $ = await l.connectUser(t);
122
- g($), f(!0), N.current = { serviceId: l, userId: t.id }, o("✅ USER CONNECTION SUCCESS", {
121
+ const B = await l.connectUser(t);
122
+ g(B), f(!0), N.current = { serviceId: l, userId: t.id }, o("✅ USER CONNECTION SUCCESS", {
123
123
  userId: t.id,
124
- clientId: $.userID
124
+ clientId: B.userID
125
125
  });
126
- } catch ($) {
127
- const U = $ instanceof Error ? $.message : "Connection failed";
128
- p(U), o("❌ USER CONNECTION ERROR", {
126
+ } catch (B) {
127
+ const G = B instanceof Error ? B.message : "Connection failed";
128
+ p(G), o("❌ USER CONNECTION ERROR", {
129
129
  userId: t.id,
130
- error: U
130
+ error: G
131
131
  });
132
132
  } finally {
133
133
  b(!1), w.current = !1, o("🔄 USER CONNECTION FINISHED", {
@@ -137,13 +137,13 @@ const Yt = Ge({
137
137
  }
138
138
  })();
139
139
  }, [l, t, o, u]), Y(() => {
140
- const A = T;
140
+ const C = T;
141
141
  return () => {
142
- var M;
143
- A && (N.current = null, (M = _.current) == null || M.disconnectUser().catch(console.error));
142
+ var A;
143
+ C && (N.current = null, (A = _.current) == null || A.disconnectUser().catch(console.error));
144
144
  };
145
145
  }, [T]);
146
- const E = W(async () => {
146
+ const S = X(async () => {
147
147
  if (o("🔄 REFRESH CONNECTION CALLED", {
148
148
  hasService: !!l,
149
149
  hasUser: !!t
@@ -154,18 +154,18 @@ const Yt = Ge({
154
154
  o("🚀 STARTING CONNECTION REFRESH", { userId: t.id }), b(!0);
155
155
  try {
156
156
  o("🔌 DISCONNECTING FOR REFRESH"), await l.disconnectUser(), o("📞 RECONNECTING FOR REFRESH");
157
- const A = await l.connectUser(t);
158
- g(A), f(!0), p(null), o("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
159
- } catch (A) {
160
- const M = A instanceof Error ? A.message : "Refresh failed";
161
- p(M), o("❌ CONNECTION REFRESH ERROR", {
157
+ const C = await l.connectUser(t);
158
+ g(C), f(!0), p(null), o("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
159
+ } catch (C) {
160
+ const A = C instanceof Error ? C.message : "Refresh failed";
161
+ p(A), o("❌ CONNECTION REFRESH ERROR", {
162
162
  userId: t.id,
163
- error: M
163
+ error: A
164
164
  });
165
165
  } finally {
166
166
  b(!1), o("🔄 CONNECTION REFRESH FINISHED", { userId: t.id });
167
167
  }
168
- }, [l, t, o]), L = V.useMemo(() => (o("💫 CONTEXT VALUE MEMOIZATION", {
168
+ }, [l, t, o]), L = j.useMemo(() => (o("💫 CONTEXT VALUE MEMOIZATION", {
169
169
  hasService: !!l,
170
170
  hasClient: !!m,
171
171
  isConnected: u,
@@ -179,7 +179,7 @@ const Yt = Ge({
179
179
  isLoading: c,
180
180
  error: x,
181
181
  capabilities: r,
182
- refreshConnection: E,
182
+ refreshConnection: S,
183
183
  debug: i
184
184
  }), [
185
185
  l,
@@ -188,7 +188,7 @@ const Yt = Ge({
188
188
  c,
189
189
  x,
190
190
  r,
191
- E,
191
+ S,
192
192
  i,
193
193
  o
194
194
  ]);
@@ -206,7 +206,7 @@ const Yt = Ge({
206
206
  children: e
207
207
  }
208
208
  ) : e });
209
- }, Os = () => qe(), qt = (e) => {
209
+ }, Os = () => We(), qt = (e) => {
210
210
  var a, r;
211
211
  const [t, s] = P(
212
212
  !!((r = (a = e == null ? void 0 : e.state) == null ? void 0 : a.membership) != null && r.pinned_at)
@@ -299,7 +299,7 @@ const re = ({
299
299
  "div",
300
300
  {
301
301
  "aria-hidden": "true",
302
- className: C(
302
+ className: y(
303
303
  "avatar-fallback flex h-full w-full items-center justify-center bg-[#E6E5E3] font-semibold select-none transition-colors",
304
304
  m
305
305
  ),
@@ -309,7 +309,7 @@ const re = ({
309
309
  return /* @__PURE__ */ h(
310
310
  "div",
311
311
  {
312
- className: C(
312
+ className: y(
313
313
  "relative flex-shrink-0 !bg-transparent",
314
314
  a
315
315
  ),
@@ -324,14 +324,14 @@ const re = ({
324
324
  {
325
325
  "aria-hidden": "true",
326
326
  className: "absolute -left-1.5 -top-1.5 z-10 flex size-5 items-center justify-center rounded-full bg-white shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]",
327
- children: /* @__PURE__ */ n(Fe, { className: "size-3 text-yellow-600", weight: "duotone" })
327
+ children: /* @__PURE__ */ n(Be, { className: "size-3 text-yellow-600", weight: "duotone" })
328
328
  }
329
329
  ),
330
330
  /* @__PURE__ */ n(
331
331
  "div",
332
332
  {
333
333
  "data-testid": "avatar-ring",
334
- className: C(
334
+ className: y(
335
335
  "h-full w-full",
336
336
  "bg-transparent"
337
337
  ),
@@ -363,71 +363,71 @@ const re = ({
363
363
  onActionComplete: m,
364
364
  logLabel: g = "useChannelModerationActions"
365
365
  }) => {
366
- var F;
367
- const { service: u, debug: f } = qe(), c = (F = t == null ? void 0 : t.user) == null ? void 0 : F.id, b = !!(a && s && u && c), [x, p] = P(!1), [w, _] = P(null), [k, S] = P(!1), [R, D] = P(!1), O = b && ((w == null ? void 0 : w.participantId) !== c || (w == null ? void 0 : w.service) !== u);
366
+ var z;
367
+ const { service: u, debug: f } = We(), c = (z = t == null ? void 0 : t.user) == null ? void 0 : z.id, b = !!(a && s && u && c), [x, p] = P(!1), [w, _] = P(null), [I, E] = P(!1), [R, D] = P(!1), O = b && ((w == null ? void 0 : w.participantId) !== c || (w == null ? void 0 : w.service) !== u);
368
368
  return Y(() => {
369
369
  if (!b || !u || !c) {
370
370
  p(!1), _(null);
371
371
  return;
372
372
  }
373
- let I = !1;
373
+ let M = !1;
374
374
  return (async () => {
375
375
  try {
376
- const A = await u.getBlockedUsers();
377
- if (I) return;
376
+ const C = await u.getBlockedUsers();
377
+ if (M) return;
378
378
  p(
379
- A.some(
380
- (M) => M.blocked_user_id === c
379
+ C.some(
380
+ (A) => A.blocked_user_id === c
381
381
  )
382
382
  );
383
- } catch (A) {
384
- I || console.error(`[${g}] Failed to check blocked status:`, A);
383
+ } catch (C) {
384
+ M || console.error(`[${g}] Failed to check blocked status:`, C);
385
385
  } finally {
386
- I || _({ participantId: c, service: u });
386
+ M || _({ participantId: c, service: u });
387
387
  }
388
388
  })(), () => {
389
- I = !0;
389
+ M = !0;
390
390
  };
391
391
  }, [b, u, c, g]), {
392
392
  isParticipantBlocked: x,
393
393
  isCheckingBlockedStatus: O,
394
- isLeaving: k,
394
+ isLeaving: I,
395
395
  isUpdatingBlockStatus: R,
396
396
  handleLeaveConversation: async () => {
397
- var I;
398
- if (!k) {
399
- o == null || o(), f && console.log(`[${g}] Leave conversation`, e.cid), S(!0);
397
+ var M;
398
+ if (!I) {
399
+ o == null || o(), f && console.log(`[${g}] Leave conversation`, e.cid), E(!0);
400
400
  try {
401
- const A = ((I = e._client) == null ? void 0 : I.userID) ?? null;
402
- await e.hide(A, !1), r && await r(e), m == null || m();
403
- } catch (A) {
404
- console.error(`[${g}] Failed to leave conversation`, A);
401
+ const C = ((M = e._client) == null ? void 0 : M.userID) ?? null;
402
+ await e.hide(C, !1), r && await r(e), m == null || m();
403
+ } catch (C) {
404
+ console.error(`[${g}] Failed to leave conversation`, C);
405
405
  } finally {
406
- S(!1);
406
+ E(!1);
407
407
  }
408
408
  }
409
409
  },
410
410
  handleBlockUser: async () => {
411
- var I, A, M;
411
+ var M, C, A;
412
412
  if (!(R || !u)) {
413
- l == null || l(), f && console.log(`[${g}] Block member`, (I = t == null ? void 0 : t.user) == null ? void 0 : I.id), D(!0);
413
+ l == null || l(), f && console.log(`[${g}] Block member`, (M = t == null ? void 0 : t.user) == null ? void 0 : M.id), D(!0);
414
414
  try {
415
- await u.blockUser((A = t == null ? void 0 : t.user) == null ? void 0 : A.id), i && await i((M = t == null ? void 0 : t.user) == null ? void 0 : M.id), m == null || m();
416
- } catch (z) {
417
- console.error(`[${g}] Failed to block member`, z);
415
+ await u.blockUser((C = t == null ? void 0 : t.user) == null ? void 0 : C.id), i && await i((A = t == null ? void 0 : t.user) == null ? void 0 : A.id), m == null || m();
416
+ } catch ($) {
417
+ console.error(`[${g}] Failed to block member`, $);
418
418
  } finally {
419
419
  D(!1);
420
420
  }
421
421
  }
422
422
  },
423
423
  handleUnblockUser: async () => {
424
- var I, A, M;
424
+ var M, C, A;
425
425
  if (!(R || !u)) {
426
- l == null || l(), f && console.log(`[${g}] Unblock member`, (I = t == null ? void 0 : t.user) == null ? void 0 : I.id), D(!0);
426
+ l == null || l(), f && console.log(`[${g}] Unblock member`, (M = t == null ? void 0 : t.user) == null ? void 0 : M.id), D(!0);
427
427
  try {
428
- await u.unBlockUser((A = t == null ? void 0 : t.user) == null ? void 0 : A.id), i && await i((M = t == null ? void 0 : t.user) == null ? void 0 : M.id), m == null || m();
429
- } catch (z) {
430
- console.error(`[${g}] Failed to unblock member`, z);
428
+ await u.unBlockUser((C = t == null ? void 0 : t.user) == null ? void 0 : C.id), i && await i((A = t == null ? void 0 : t.user) == null ? void 0 : A.id), m == null || m();
429
+ } catch ($) {
430
+ console.error(`[${g}] Failed to unblock member`, $);
431
431
  } finally {
432
432
  D(!1);
433
433
  }
@@ -437,7 +437,7 @@ const re = ({
437
437
  d == null || d(), m == null || m(), window.open(Us, "_blank", "noopener,noreferrer");
438
438
  }
439
439
  };
440
- }, fe = ({
440
+ }, ge = ({
441
441
  variant: e = "default",
442
442
  className: t,
443
443
  children: s,
@@ -446,7 +446,7 @@ const re = ({
446
446
  "button",
447
447
  {
448
448
  type: "button",
449
- className: C(
449
+ className: y(
450
450
  "flex w-full items-center gap-3 rounded-lg px-4 py-3 text-left text-sm transition-colors focus-ring disabled:cursor-not-allowed disabled:opacity-60",
451
451
  e === "danger" ? "text-danger hover:bg-danger/50" : "text-charcoal hover:bg-sand",
452
452
  t
@@ -468,11 +468,11 @@ const re = ({
468
468
  customChannelActions: g,
469
469
  triggerClassName: u
470
470
  }) => {
471
- const [f, c] = P(!1), b = G(null), x = En(), p = W(() => c(!1), []), {
471
+ const [f, c] = P(!1), b = V(null), x = En(), p = X(() => c(!1), []), {
472
472
  isParticipantBlocked: w,
473
473
  isCheckingBlockedStatus: _,
474
- isLeaving: k,
475
- isUpdatingBlockStatus: S,
474
+ isLeaving: I,
475
+ isUpdatingBlockStatus: E,
476
476
  handleLeaveConversation: R,
477
477
  handleBlockUser: D,
478
478
  handleUnblockUser: O,
@@ -492,13 +492,13 @@ const re = ({
492
492
  });
493
493
  return Y(() => {
494
494
  if (!f) return;
495
- const E = (F) => {
496
- b.current && !b.current.contains(F.target) && c(!1);
497
- }, L = (F) => {
498
- F.key === "Escape" && c(!1);
495
+ const S = (z) => {
496
+ b.current && !b.current.contains(z.target) && c(!1);
497
+ }, L = (z) => {
498
+ z.key === "Escape" && c(!1);
499
499
  };
500
- return document.addEventListener("mousedown", E), document.addEventListener("keydown", L), () => {
501
- document.removeEventListener("mousedown", E), document.removeEventListener("keydown", L);
500
+ return document.addEventListener("mousedown", S), document.addEventListener("keydown", L), () => {
501
+ document.removeEventListener("mousedown", S), document.removeEventListener("keydown", L);
502
502
  };
503
503
  }, [f]), !t || !(s || a || r || !!g) ? null : /* @__PURE__ */ h("div", { ref: b, className: "relative", children: [
504
504
  /* @__PURE__ */ h(
@@ -509,7 +509,7 @@ const re = ({
509
509
  "aria-haspopup": "true",
510
510
  "aria-expanded": f,
511
511
  "aria-controls": f ? x : void 0,
512
- onClick: () => c((E) => !E),
512
+ onClick: () => c((S) => !S),
513
513
  children: [
514
514
  /* @__PURE__ */ n(ms, { className: "size-5 text-black/90" }),
515
515
  /* @__PURE__ */ n("span", { className: "sr-only", children: "More options" })
@@ -521,19 +521,19 @@ const re = ({
521
521
  {
522
522
  id: x,
523
523
  "aria-label": "Conversation options",
524
- className: C(
524
+ className: y(
525
525
  "absolute right-0 top-full z-50 mt-2 w-56 overflow-hidden",
526
526
  "rounded-lg border border-sand bg-white p-1 shadow-max-elevation-light"
527
527
  ),
528
528
  children: /* @__PURE__ */ h("ul", { className: "flex flex-col gap-1", children: [
529
529
  s && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ h(
530
- fe,
530
+ ge,
531
531
  {
532
532
  onClick: R,
533
- disabled: k,
534
- "aria-busy": k,
533
+ disabled: I,
534
+ "aria-busy": I,
535
535
  children: [
536
- k ? /* @__PURE__ */ n(Ce, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(hs, { className: "h-5 w-5" }),
536
+ I ? /* @__PURE__ */ n(ke, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(hs, { className: "h-5 w-5" }),
537
537
  /* @__PURE__ */ n("span", { children: "Delete Conversation" })
538
538
  ]
539
539
  }
@@ -541,34 +541,34 @@ const re = ({
541
541
  a && /* @__PURE__ */ n("li", { children: _ ? (
542
542
  // Block status not yet resolved — show a disabled placeholder
543
543
  // so a premature click can't act on a stale block state.
544
- /* @__PURE__ */ h(fe, { disabled: !0, "aria-busy": !0, children: [
545
- /* @__PURE__ */ n(Ce, { className: "h-5 w-5 animate-spin" }),
544
+ /* @__PURE__ */ h(ge, { disabled: !0, "aria-busy": !0, children: [
545
+ /* @__PURE__ */ n(ke, { className: "h-5 w-5 animate-spin" }),
546
546
  /* @__PURE__ */ n("span", { children: "Block" })
547
547
  ] })
548
548
  ) : w ? /* @__PURE__ */ h(
549
- fe,
549
+ ge,
550
550
  {
551
551
  onClick: O,
552
- disabled: S,
553
- "aria-busy": S,
552
+ disabled: E,
553
+ "aria-busy": E,
554
554
  children: [
555
- S ? /* @__PURE__ */ n(Ce, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Mt, { className: "h-5 w-5" }),
555
+ E ? /* @__PURE__ */ n(ke, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Mt, { className: "h-5 w-5" }),
556
556
  /* @__PURE__ */ n("span", { children: "Unblock" })
557
557
  ]
558
558
  }
559
559
  ) : /* @__PURE__ */ h(
560
- fe,
560
+ ge,
561
561
  {
562
562
  onClick: D,
563
- disabled: S,
564
- "aria-busy": S,
563
+ disabled: E,
564
+ "aria-busy": E,
565
565
  children: [
566
- S ? /* @__PURE__ */ n(Ce, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Mt, { className: "h-5 w-5" }),
566
+ E ? /* @__PURE__ */ n(ke, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Mt, { className: "h-5 w-5" }),
567
567
  /* @__PURE__ */ n("span", { children: "Block" })
568
568
  ]
569
569
  }
570
570
  ) }),
571
- r && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ h(fe, { variant: "danger", onClick: T, children: [
571
+ r && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ h(ge, { variant: "danger", onClick: T, children: [
572
572
  /* @__PURE__ */ n(jt, { className: "h-5 w-5" }),
573
573
  /* @__PURE__ */ n("span", { children: "Report" })
574
574
  ] }) }),
@@ -577,30 +577,30 @@ const re = ({
577
577
  }
578
578
  )
579
579
  ] });
580
- }, Vs = (e) => /* @__PURE__ */ n(An, { ...e, position: "center" }), je = "vote_up", Ve = "vote_down";
580
+ }, Vs = (e) => /* @__PURE__ */ n(An, { ...e, position: "center" }), Ve = "vote_up", Ge = "vote_down";
581
581
  function Gs(e) {
582
- return e != null && e.length ? e.some((t) => t.type === Ve) ? "down" : e.some((t) => t.type === je) ? "up" : null : null;
582
+ return e != null && e.length ? e.some((t) => t.type === Ge) ? "down" : e.some((t) => t.type === Ve) ? "up" : null : null;
583
583
  }
584
584
  function Hs(e) {
585
- const { channel: t } = de(), { client: s } = Ye("useMessageVote"), a = te(
585
+ const { channel: t } = de(), { client: s } = qe("useMessageVote"), a = te(
586
586
  () => Gs(e.own_reactions),
587
587
  [e.own_reactions]
588
- ), r = W(async () => {
588
+ ), r = X(async () => {
589
589
  if (s != null && s.userID)
590
590
  try {
591
- a === "up" ? await t.deleteReaction(e.id, je) : await t.sendReaction(
591
+ a === "up" ? await t.deleteReaction(e.id, Ve) : await t.sendReaction(
592
592
  e.id,
593
- { type: je },
593
+ { type: Ve },
594
594
  { enforce_unique: !0, skip_push: !0 }
595
595
  );
596
596
  } catch {
597
597
  }
598
- }, [t, s == null ? void 0 : s.userID, e.id, a]), i = W(async () => {
598
+ }, [t, s == null ? void 0 : s.userID, e.id, a]), i = X(async () => {
599
599
  if (s != null && s.userID)
600
600
  try {
601
- a === "down" ? await t.deleteReaction(e.id, Ve) : await t.sendReaction(
601
+ a === "down" ? await t.deleteReaction(e.id, Ge) : await t.sendReaction(
602
602
  e.id,
603
- { type: Ve },
603
+ { type: Ge },
604
604
  { enforce_unique: !0, skip_push: !0 }
605
605
  );
606
606
  } catch {
@@ -619,13 +619,13 @@ function Xt({
619
619
  const s = e == null ? void 0 : e.text, a = Ys(t);
620
620
  return a ? ((r = e == null ? void 0 : e.i18n) == null ? void 0 : r[`${a}_text`]) ?? s : s;
621
621
  }
622
- const qs = V.lazy(() => import("./Card-Dv2KEVRW.js")), Ws = V.lazy(() => import("./Card-NVRWULiK.js")), Xs = V.lazy(() => import("./Card-Hn41fH7f.js")), We = () => /* @__PURE__ */ n(
622
+ const qs = j.lazy(() => import("./Card-CI6Trmpw.js")), Ws = j.lazy(() => import("./Card-jmfDlxVY.js")), Xs = j.lazy(() => import("./Card-Bl0tPvn7.js")), Xe = () => /* @__PURE__ */ n(
623
623
  "div",
624
624
  {
625
625
  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)]",
626
626
  "aria-hidden": !0
627
627
  }
628
- ), Ks = (e) => /* @__PURE__ */ n(He, { fallback: /* @__PURE__ */ n(We, {}), children: /* @__PURE__ */ n(qs, { ...e }) }), Kt = (e) => /* @__PURE__ */ n(He, { fallback: /* @__PURE__ */ n(We, {}), children: /* @__PURE__ */ n(Ws, { ...e }) }), Jt = (e) => /* @__PURE__ */ n(He, { fallback: /* @__PURE__ */ n(We, {}), children: /* @__PURE__ */ n(Xs, { ...e }) }), Js = Kt, Zs = Jt, Ot = { Composer: Ks, Sent: Kt, Received: Jt, Creator: Js, Visitor: Zs }, Qs = [
628
+ ), Ks = (e) => /* @__PURE__ */ n(Ye, { fallback: /* @__PURE__ */ n(Xe, {}), children: /* @__PURE__ */ n(qs, { ...e }) }), Kt = (e) => /* @__PURE__ */ n(Ye, { fallback: /* @__PURE__ */ n(Xe, {}), children: /* @__PURE__ */ n(Ws, { ...e }) }), Jt = (e) => /* @__PURE__ */ n(Ye, { fallback: /* @__PURE__ */ n(Xe, {}), children: /* @__PURE__ */ n(Xs, { ...e }) }), Js = Kt, Zs = Jt, Ot = { Composer: Ks, Sent: Kt, Received: Jt, Creator: Js, Visitor: Zs }, Qs = [
629
629
  [/pdf/, "pdf"],
630
630
  [/wordprocessingml|msword|\.doc/, "doc"],
631
631
  [/spreadsheetml|ms-excel|\.xls/, "xls"],
@@ -665,7 +665,7 @@ function na(e) {
665
665
  return t !== "document" ? ea[t] : ta[Zt(e)];
666
666
  }
667
667
  function ce(e, t) {
668
- return V.createElement(na(e), t);
668
+ return j.createElement(na(e), t);
669
669
  }
670
670
  const sa = (e) => {
671
671
  var t, s;
@@ -682,23 +682,23 @@ const sa = (e) => {
682
682
  muted: d = !1,
683
683
  onContainerClick: m
684
684
  }) => {
685
- const g = se(t), u = G(null), f = G(null), c = G(null), b = G(r), [x, p] = P(a), [w, _] = P(0), [k, S] = P(!1), [R, D] = P(!1), [O, T] = P(!1), [N, E] = P(!1), [L, F] = P(!0), [I, A] = P(null), M = W(() => {
685
+ const g = se(t), u = V(null), f = V(null), c = V(null), b = V(r), [x, p] = P(a), [w, _] = P(0), [I, E] = P(!1), [R, D] = P(!1), [O, T] = P(!1), [N, S] = P(!1), [L, z] = P(!0), [M, C] = P(null), A = X(() => {
686
686
  T(!1), p(!0);
687
- }, []), z = W((v) => {
688
- const y = f.current;
689
- if (!y) return 0;
690
- const j = y.getBoundingClientRect();
687
+ }, []), $ = X((v) => {
688
+ const k = f.current;
689
+ if (!k) return 0;
690
+ const F = k.getBoundingClientRect();
691
691
  return Math.max(
692
692
  0,
693
- Math.min(1, (sa(v) - j.left) / j.width)
693
+ Math.min(1, (sa(v) - F.left) / F.width)
694
694
  );
695
- }, []), $ = W((v) => {
696
- const y = u.current;
697
- y && y.duration && (y.currentTime = v * y.duration);
698
- }, []), U = (v) => {
699
- v.stopPropagation(), S(!0);
700
- const y = z(v);
701
- _(y), $(y);
695
+ }, []), B = X((v) => {
696
+ const k = u.current;
697
+ k && k.duration && (k.currentTime = v * k.duration);
698
+ }, []), G = (v) => {
699
+ v.stopPropagation(), E(!0);
700
+ const k = $(v);
701
+ _(k), B(k);
702
702
  };
703
703
  Y(() => {
704
704
  r !== void 0 && r !== b.current && (b.current = r, p(r));
@@ -708,40 +708,40 @@ const sa = (e) => {
708
708
  return;
709
709
  }
710
710
  const v = () => {
711
- const y = u.current;
712
- y && y.duration && !k && _(y.currentTime / y.duration), c.current = requestAnimationFrame(v);
711
+ const k = u.current;
712
+ k && k.duration && !I && _(k.currentTime / k.duration), c.current = requestAnimationFrame(v);
713
713
  };
714
714
  return c.current = requestAnimationFrame(v), () => {
715
715
  c.current !== null && cancelAnimationFrame(c.current);
716
716
  };
717
- }, [x, k]), Y(() => {
717
+ }, [x, I]), Y(() => {
718
718
  const v = u.current;
719
- v && (x ? v.play().catch((y) => {
719
+ v && (x ? v.play().catch((k) => {
720
720
  p(!1), T(!0);
721
721
  }) : v.pause());
722
722
  }, [x]), Y(() => {
723
- if (!k) return;
724
- const v = (j) => _(z(j)), y = (j) => {
725
- S(!1), $(z(j));
723
+ if (!I) return;
724
+ const v = (F) => _($(F)), k = (F) => {
725
+ E(!1), B($(F));
726
726
  };
727
- return window.addEventListener("mousemove", v), window.addEventListener("mouseup", y), window.addEventListener("touchmove", v, { passive: !0 }), window.addEventListener("touchend", y), () => {
728
- window.removeEventListener("mousemove", v), window.removeEventListener("mouseup", y), window.removeEventListener("touchmove", v), window.removeEventListener("touchend", y);
727
+ return window.addEventListener("mousemove", v), window.addEventListener("mouseup", k), window.addEventListener("touchmove", v, { passive: !0 }), window.addEventListener("touchend", k), () => {
728
+ window.removeEventListener("mousemove", v), window.removeEventListener("mouseup", k), window.removeEventListener("touchmove", v), window.removeEventListener("touchend", k);
729
729
  };
730
- }, [k, z, $]);
731
- const H = I ? { aspectRatio: String(I) } : void 0, X = I ? "" : " aspect-video", B = Math.round(w * 100);
730
+ }, [I, $, B]);
731
+ const H = M ? { aspectRatio: String(M) } : void 0, K = M ? "" : " aspect-video", U = Math.round(w * 100);
732
732
  return /* @__PURE__ */ h(
733
733
  "div",
734
734
  {
735
735
  role: "button",
736
736
  tabIndex: 0,
737
- className: `relative cursor-pointer overflow-hidden bg-black ${X}`,
737
+ className: `relative cursor-pointer overflow-hidden bg-black ${K}`,
738
738
  style: H,
739
739
  onClick: (v) => {
740
740
  if (m) {
741
741
  m(v);
742
742
  return;
743
743
  }
744
- O || o && p((y) => !y);
744
+ O || o && p((k) => !k);
745
745
  },
746
746
  onKeyDown: (v) => {
747
747
  if (!(v.key !== "Enter" && v.key !== " ")) {
@@ -749,7 +749,7 @@ const sa = (e) => {
749
749
  m(v);
750
750
  return;
751
751
  }
752
- O || o && p((y) => !y);
752
+ O || o && p((k) => !k);
753
753
  }
754
754
  },
755
755
  children: [
@@ -773,11 +773,11 @@ const sa = (e) => {
773
773
  loop: i,
774
774
  muted: d,
775
775
  style: { width: "100%", height: "100%" },
776
- onLoadStart: () => E(!0),
776
+ onLoadStart: () => S(!0),
777
777
  onCanPlay: () => {
778
- E(!1), F(!1);
778
+ S(!1), z(!1);
779
779
  },
780
- onWaiting: () => E(!0),
780
+ onWaiting: () => S(!0),
781
781
  onPlay: () => T(!1),
782
782
  onEnded: () => {
783
783
  i || (p(!1), _(0));
@@ -793,15 +793,15 @@ const sa = (e) => {
793
793
  muted: d,
794
794
  playsInline: !0,
795
795
  style: { width: "100%", height: "100%" },
796
- onLoadStart: () => E(!0),
796
+ onLoadStart: () => S(!0),
797
797
  onCanPlay: () => {
798
- E(!1), F(!1);
798
+ S(!1), z(!1);
799
799
  },
800
- onWaiting: () => E(!0),
800
+ onWaiting: () => S(!0),
801
801
  onPlay: () => T(!1),
802
802
  onLoadedMetadata: () => {
803
803
  const v = u.current;
804
- v instanceof HTMLVideoElement && v.videoWidth && v.videoHeight && A(v.videoWidth / v.videoHeight);
804
+ v instanceof HTMLVideoElement && v.videoWidth && v.videoHeight && C(v.videoWidth / v.videoHeight);
805
805
  },
806
806
  onEnded: () => {
807
807
  i || (p(!1), _(0));
@@ -810,7 +810,7 @@ const sa = (e) => {
810
810
  }
811
811
  ) }),
812
812
  N && !O && /* @__PURE__ */ n("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ n(
813
- be,
813
+ pe,
814
814
  {
815
815
  className: "size-8 animate-spin text-white/80",
816
816
  weight: "bold"
@@ -824,12 +824,12 @@ const sa = (e) => {
824
824
  tabIndex: 0,
825
825
  "aria-label": "Play preview",
826
826
  onClick: (v) => {
827
- v.stopPropagation(), M();
827
+ v.stopPropagation(), A();
828
828
  },
829
829
  onKeyDown: (v) => {
830
- v.key !== "Enter" && v.key !== " " || (v.preventDefault(), v.stopPropagation(), M());
830
+ v.key !== "Enter" && v.key !== " " || (v.preventDefault(), v.stopPropagation(), A());
831
831
  },
832
- children: /* @__PURE__ */ n("span", { className: "flex size-16 items-center justify-center rounded-full bg-white/20 text-white backdrop-blur-sm", children: /* @__PURE__ */ n(Be, { className: "size-9 translate-x-0.5", weight: "fill" }) })
832
+ children: /* @__PURE__ */ n("span", { className: "flex size-16 items-center justify-center rounded-full bg-white/20 text-white backdrop-blur-sm", children: /* @__PURE__ */ n(Ue, { className: "size-9 translate-x-0.5", weight: "fill" }) })
833
833
  }
834
834
  ),
835
835
  l && !o && /* @__PURE__ */ n("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__ */ n(
@@ -837,23 +837,23 @@ const sa = (e) => {
837
837
  {
838
838
  role: "slider",
839
839
  "aria-label": "Playback position",
840
- "aria-valuenow": B,
840
+ "aria-valuenow": U,
841
841
  "aria-valuemin": 0,
842
842
  "aria-valuemax": 100,
843
843
  tabIndex: 0,
844
844
  ref: f,
845
845
  className: "relative flex h-4 w-full cursor-pointer items-center",
846
- onMouseDown: U,
847
- onTouchStart: U,
846
+ onMouseDown: G,
847
+ onTouchStart: G,
848
848
  onClick: (v) => v.stopPropagation(),
849
849
  onKeyDown: (v) => {
850
- v.key === "ArrowRight" && $(Math.min(1, w + 0.05)), v.key === "ArrowLeft" && $(Math.max(0, w - 0.05));
850
+ v.key === "ArrowRight" && B(Math.min(1, w + 0.05)), v.key === "ArrowLeft" && B(Math.max(0, w - 0.05));
851
851
  },
852
852
  children: /* @__PURE__ */ n("div", { className: "w-full overflow-hidden rounded-full bg-white/30 h-1", children: /* @__PURE__ */ n(
853
853
  "div",
854
854
  {
855
855
  className: "h-full rounded-full bg-white",
856
- style: { width: `${B}%` }
856
+ style: { width: `${U}%` }
857
857
  }
858
858
  ) })
859
859
  }
@@ -864,11 +864,11 @@ const sa = (e) => {
864
864
  {
865
865
  type: "button",
866
866
  onClick: (v) => {
867
- v.stopPropagation(), p((y) => !y);
867
+ v.stopPropagation(), p((k) => !k);
868
868
  },
869
869
  className: "shrink-0 text-white",
870
870
  "aria-label": x ? "Pause" : "Play",
871
- children: x ? /* @__PURE__ */ n(Cs, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ n(Be, { className: "size-5 translate-x-px", weight: "fill" })
871
+ children: x ? /* @__PURE__ */ n(Cs, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ n(Ue, { className: "size-5 translate-x-px", weight: "fill" })
872
872
  }
873
873
  ),
874
874
  /* @__PURE__ */ h(
@@ -876,30 +876,30 @@ const sa = (e) => {
876
876
  {
877
877
  role: "slider",
878
878
  "aria-label": "Playback position",
879
- "aria-valuenow": B,
879
+ "aria-valuenow": U,
880
880
  "aria-valuemin": 0,
881
881
  "aria-valuemax": 100,
882
882
  tabIndex: 0,
883
883
  ref: f,
884
884
  className: "relative flex h-4 w-full cursor-pointer items-center",
885
- onMouseDown: U,
886
- onTouchStart: U,
885
+ onMouseDown: G,
886
+ onTouchStart: G,
887
887
  onClick: (v) => v.stopPropagation(),
888
888
  onMouseEnter: () => D(!0),
889
889
  onMouseLeave: () => D(!1),
890
890
  onKeyDown: (v) => {
891
- v.key === "ArrowRight" && $(Math.min(1, w + 0.05)), v.key === "ArrowLeft" && $(Math.max(0, w - 0.05));
891
+ v.key === "ArrowRight" && B(Math.min(1, w + 0.05)), v.key === "ArrowLeft" && B(Math.max(0, w - 0.05));
892
892
  },
893
893
  children: [
894
894
  /* @__PURE__ */ n(
895
895
  "div",
896
896
  {
897
- className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${R || k ? "h-1.5" : "h-1"}`,
897
+ className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${R || I ? "h-1.5" : "h-1"}`,
898
898
  children: /* @__PURE__ */ n(
899
899
  "div",
900
900
  {
901
901
  className: "h-full rounded-full bg-white",
902
- style: { width: `${B}%` }
902
+ style: { width: `${U}%` }
903
903
  }
904
904
  )
905
905
  }
@@ -907,8 +907,8 @@ const sa = (e) => {
907
907
  /* @__PURE__ */ n(
908
908
  "div",
909
909
  {
910
- className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${R || k ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
911
- style: { left: `${B}%` }
910
+ className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${R || I ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
911
+ style: { left: `${U}%` }
912
912
  }
913
913
  )
914
914
  ]
@@ -1018,7 +1018,7 @@ const sa = (e) => {
1018
1018
  {
1019
1019
  ref: g,
1020
1020
  "data-testid": u,
1021
- className: C(
1021
+ className: y(
1022
1022
  "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)]",
1023
1023
  f ? "bg-[#121110]" : "bg-white"
1024
1024
  ),
@@ -1030,7 +1030,7 @@ const sa = (e) => {
1030
1030
  c.trim() !== "" && /* @__PURE__ */ n(
1031
1031
  "p",
1032
1032
  {
1033
- className: C("mb-0.5 truncate text-base font-medium", {
1033
+ className: y("mb-0.5 truncate text-base font-medium", {
1034
1034
  "text-black": !f,
1035
1035
  "text-white/30": f && b,
1036
1036
  "text-white": f && !b
@@ -1040,7 +1040,7 @@ const sa = (e) => {
1040
1040
  ),
1041
1041
  /* @__PURE__ */ h("div", { className: "flex flex-wrap items-center gap-1", children: [
1042
1042
  ce(r, {
1043
- className: C(
1043
+ className: y(
1044
1044
  "size-5 shrink-0",
1045
1045
  f ? "text-white/55" : "text-black/55"
1046
1046
  ),
@@ -1049,7 +1049,7 @@ const sa = (e) => {
1049
1049
  i != null && i !== "" && /* @__PURE__ */ n(
1050
1050
  "span",
1051
1051
  {
1052
- className: C(
1052
+ className: y(
1053
1053
  "text-xs font-medium",
1054
1054
  f ? "text-white/55" : "text-black/55"
1055
1055
  ),
@@ -1067,7 +1067,7 @@ const sa = (e) => {
1067
1067
  function tn(e) {
1068
1068
  return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
1069
1069
  }
1070
- function Xe(e) {
1070
+ function Ke(e) {
1071
1071
  return `w-[280px] select-none overflow-hidden rounded-[24px] ${e ? "bg-[#121110]" : "bg-[#F3F3F1]"} shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]`;
1072
1072
  }
1073
1073
  function ia(e) {
@@ -1085,8 +1085,8 @@ function ca(e) {
1085
1085
  function da(e) {
1086
1086
  return e ? "text-white/20" : "text-black/20";
1087
1087
  }
1088
- const Ke = ({ attachment: e, isMyMessage: t }) => {
1089
- const { title: s, 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__ */ h(V.Fragment, { children: [
1088
+ const Je = ({ attachment: e, isMyMessage: t }) => {
1089
+ const { title: s, 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__ */ h(j.Fragment, { children: [
1090
1090
  /* @__PURE__ */ n("div", { className: "p-2", children: r ? /* @__PURE__ */ n(
1091
1091
  "img",
1092
1092
  {
@@ -1112,7 +1112,7 @@ const Ke = ({ attachment: e, isMyMessage: t }) => {
1112
1112
  function nn(e) {
1113
1113
  return e.type === "link" || !!e.og_scrape_url && !e.asset_url;
1114
1114
  }
1115
- function Je(e) {
1115
+ function Ze(e) {
1116
1116
  var t;
1117
1117
  return (t = e.attachments) == null ? void 0 : t.find(nn);
1118
1118
  }
@@ -1148,14 +1148,14 @@ const ma = ({
1148
1148
  },
1149
1149
  disabled: s,
1150
1150
  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",
1151
- children: s ? /* @__PURE__ */ n(be, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ h(V.Fragment, { children: [
1152
- /* @__PURE__ */ n(pe, { className: "size-4 text-white", weight: "bold" }),
1151
+ children: s ? /* @__PURE__ */ n(pe, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ h(j.Fragment, { children: [
1152
+ /* @__PURE__ */ n(ve, { className: "size-4 text-white", weight: "bold" }),
1153
1153
  "Download"
1154
1154
  ] })
1155
1155
  }
1156
1156
  );
1157
1157
  };
1158
- function Ze(e) {
1158
+ function Qe(e) {
1159
1159
  var u, f, c, b;
1160
1160
  const t = (u = e.attachments) == null ? void 0 : u.find(
1161
1161
  (x) => x.type === "video" && x.asset_url
@@ -1237,7 +1237,7 @@ const sn = ({
1237
1237
  message: e,
1238
1238
  isMyMessage: t = !1
1239
1239
  }) => {
1240
- const s = Je(e), a = Ze(e);
1240
+ const s = Ze(e), a = Qe(e);
1241
1241
  return !s && !a ? null : /* @__PURE__ */ h("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", children: [
1242
1242
  !t && e.user && /* @__PURE__ */ n(
1243
1243
  re,
@@ -1258,7 +1258,7 @@ const sn = ({
1258
1258
  {
1259
1259
  className: "str-chat__message-bubble",
1260
1260
  style: { padding: 0, borderRadius: 0, overflow: "visible", background: "transparent" },
1261
- children: s ? /* @__PURE__ */ n("div", { className: Xe(t), children: /* @__PURE__ */ n(Ke, { attachment: s, isMyMessage: t }) }) : t ? /* @__PURE__ */ n(sn, { ...a }) : /* @__PURE__ */ n(an, { ...a })
1261
+ children: s ? /* @__PURE__ */ n("div", { className: Ke(t), children: /* @__PURE__ */ n(Je, { attachment: s, isMyMessage: t }) }) : t ? /* @__PURE__ */ n(sn, { ...a }) : /* @__PURE__ */ n(an, { ...a })
1262
1262
  }
1263
1263
  ) })
1264
1264
  }
@@ -1267,18 +1267,18 @@ const sn = ({
1267
1267
  }, fa = ({
1268
1268
  message: e
1269
1269
  }) => {
1270
- const t = Je(e);
1270
+ const t = Ze(e);
1271
1271
  if (t)
1272
- return /* @__PURE__ */ n("div", { className: Xe(!0), children: /* @__PURE__ */ n(Ke, { attachment: t, isMyMessage: !0 }) });
1273
- const s = Ze(e);
1272
+ return /* @__PURE__ */ n("div", { className: Ke(!0), children: /* @__PURE__ */ n(Je, { attachment: t, isMyMessage: !0 }) });
1273
+ const s = Qe(e);
1274
1274
  return s ? /* @__PURE__ */ n(sn, { ...s }) : null;
1275
1275
  }, ga = ({
1276
1276
  message: e
1277
1277
  }) => {
1278
- const t = Je(e);
1278
+ const t = Ze(e);
1279
1279
  if (t)
1280
- return /* @__PURE__ */ n("div", { className: Xe(!1), children: /* @__PURE__ */ n(Ke, { attachment: t, isMyMessage: !1 }) });
1281
- const s = Ze(e);
1280
+ return /* @__PURE__ */ n("div", { className: Ke(!1), children: /* @__PURE__ */ n(Je, { attachment: t, isMyMessage: !1 }) });
1281
+ const s = Qe(e);
1282
1282
  return s ? /* @__PURE__ */ n(an, { ...s }) : null;
1283
1283
  }, yi = Object.assign(ha, {
1284
1284
  Creator: fa,
@@ -1287,9 +1287,9 @@ const sn = ({
1287
1287
  isUnlocking: () => !1
1288
1288
  }, pa = {
1289
1289
  LockedAttachment: ba
1290
- }, rn = Ge({}), Ci = rn.Provider;
1290
+ }, rn = He({}), Ci = rn.Provider;
1291
1291
  function va(e) {
1292
- return Te(rn)[e] ?? pa[e];
1292
+ return Ae(rn)[e] ?? pa[e];
1293
1293
  }
1294
1294
  const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1295
1295
  "svg",
@@ -1314,7 +1314,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1314
1314
  }, _a = (e) => {
1315
1315
  var t;
1316
1316
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_PAID";
1317
- }, ke = (e) => {
1317
+ }, Ee = (e) => {
1318
1318
  var t;
1319
1319
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_CHATBOT";
1320
1320
  }, Na = (e) => {
@@ -1323,14 +1323,14 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1323
1323
  }, on = (e) => wa(e) || _a(e), ya = (e) => {
1324
1324
  var t;
1325
1325
  return on(e) && !((t = e.text) != null && t.trim());
1326
- }, Pe = ({
1326
+ }, Oe = ({
1327
1327
  message: e,
1328
1328
  standalone: t = !1,
1329
1329
  isMyMessage: s = !1,
1330
1330
  hasAttachment: a = !1
1331
1331
  }) => {
1332
1332
  var u;
1333
- const r = on(e), i = ke(e);
1333
+ const r = on(e), i = Ee(e);
1334
1334
  if (!r && !i)
1335
1335
  return null;
1336
1336
  if (r) {
@@ -1363,7 +1363,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1363
1363
  "button",
1364
1364
  {
1365
1365
  type: "button",
1366
- className: C("message-vote-button focus-ring", {
1366
+ className: y("message-vote-button focus-ring", {
1367
1367
  "message-vote-button--selected": e === "up"
1368
1368
  }),
1369
1369
  onClick: t,
@@ -1377,7 +1377,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1377
1377
  "button",
1378
1378
  {
1379
1379
  type: "button",
1380
- className: C("message-vote-button focus-ring", {
1380
+ className: y("message-vote-button focus-ring", {
1381
1381
  "message-vote-button--selected": e === "down"
1382
1382
  }),
1383
1383
  onClick: s,
@@ -1406,60 +1406,60 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1406
1406
  renderText: b,
1407
1407
  threadList: x,
1408
1408
  viewerLanguage: p
1409
- } = e, { client: w } = Ye("CustomMessage"), { channel: _ } = de("CustomMessage"), { isUnlocking: k, onUnlockClick: S, onFetchSource: R, onDownloadClick: D } = va("LockedAttachment"), [O, T] = P(!1), N = Rn(c.id), { selected: E, voteUp: L, voteDown: F } = Hs(c), {
1410
- Attachment: I = Ln,
1411
- EditMessageModal: A = Dn,
1412
- MessageActions: M,
1413
- MessageBlocked: z = Pn,
1414
- MessageBouncePrompt: $ = On,
1415
- MessageDeleted: U = zn,
1409
+ } = e, { client: w } = qe("CustomMessage"), { channel: _ } = de("CustomMessage"), { isUnlocking: I, onUnlockClick: E, onFetchSource: R, onDownloadClick: D } = va("LockedAttachment"), [O, T] = P(!1), N = Rn(c.id), { selected: S, voteUp: L, voteDown: z } = Hs(c), {
1410
+ Attachment: M = Ln,
1411
+ EditMessageModal: C = Dn,
1412
+ MessageActions: A,
1413
+ MessageBlocked: $ = Pn,
1414
+ MessageBouncePrompt: B = On,
1415
+ MessageDeleted: G = zn,
1416
1416
  MessageIsThreadReplyInChannelButtonIndicator: H = $n,
1417
- MessageRepliesCountButton: X = Fn,
1418
- ReminderNotification: B = Bn,
1417
+ MessageRepliesCountButton: K = Fn,
1418
+ ReminderNotification: U = Bn,
1419
1419
  StreamedMessageText: v = Un,
1420
- PinIndicator: y
1421
- } = Ut("CustomMessage"), j = jn(c), q = Vn(c), K = te(
1420
+ PinIndicator: k
1421
+ } = Ut("CustomMessage"), F = jn(c), q = Vn(c), W = te(
1422
1422
  () => u == null ? void 0 : u(c),
1423
1423
  [u, c]
1424
1424
  ), J = te(() => {
1425
- const he = c.attachments ?? [], ye = c.shared_location ? [c.shared_location, ...he] : he;
1426
- if (!ke(c)) return ye;
1427
- const St = ye.filter((It) => !("type" in It) || !nn(It));
1428
- return St.length === ye.length ? ye : St;
1425
+ const fe = c.attachments ?? [], Ce = c.shared_location ? [c.shared_location, ...fe] : fe;
1426
+ if (!Ee(c)) return Ce;
1427
+ const St = Ce.filter((It) => !("type" in It) || !nn(It));
1428
+ return St.length === Ce.length ? Ce : St;
1429
1429
  }, [c]), ie = te(() => {
1430
- const he = Xt({ message: c, viewerLanguage: p });
1431
- return he === c.text ? c : { ...c, text: he };
1430
+ const fe = Xt({ message: c, viewerLanguage: p });
1431
+ return fe === c.text ? c : { ...c, text: fe };
1432
1432
  }, [c, p]);
1433
1433
  if (Gn(c))
1434
1434
  return null;
1435
1435
  if (c.deleted_at || c.type === "deleted")
1436
- return /* @__PURE__ */ n(U, { message: c });
1436
+ return /* @__PURE__ */ n(G, { message: c });
1437
1437
  if (Hn(c))
1438
- return /* @__PURE__ */ n(z, {});
1439
- const Z = !x && !!c.reply_count, ae = !x && c.show_in_channel && c.parent_id, ee = c.status === "failed" && ((ht = c.error) == null ? void 0 : ht.status) !== 403, lt = Yn(c);
1438
+ return /* @__PURE__ */ n($, {});
1439
+ const ue = !x && !!c.reply_count, Z = !x && c.show_in_channel && c.parent_id, ae = c.status === "failed" && ((ht = c.error) == null ? void 0 : ht.status) !== 403, ee = Yn(c);
1440
1440
  let oe;
1441
- ee ? oe = () => m(c) : lt && (oe = () => T(!0));
1442
- const ue = f(), kn = C(
1441
+ ae ? oe = () => m(c) : ee && (oe = () => T(!0));
1442
+ const me = f(), kn = y(
1443
1443
  "str-chat__message str-chat__message-simple",
1444
1444
  `str-chat__message--${c.type}`,
1445
1445
  `str-chat__message--${c.status}`,
1446
- ue ? "str-chat__message--me str-chat__message-simple--me" : "str-chat__message--other",
1446
+ me ? "str-chat__message--me str-chat__message-simple--me" : "str-chat__message--other",
1447
1447
  c.text ? "str-chat__message--has-text" : "has-no-text",
1448
1448
  {
1449
- "str-chat__message--has-attachment": j,
1449
+ "str-chat__message--has-attachment": F,
1450
1450
  "str-chat__message--highlighted": g,
1451
1451
  "str-chat__message--pinned pinned-message": c.pinned,
1452
1452
  "str-chat__message--with-reactions": q,
1453
1453
  "str-chat__message-send-can-be-retried": (c == null ? void 0 : c.status) === "failed" && ((ft = c == null ? void 0 : c.error) == null ? void 0 : ft.status) !== 403,
1454
- "str-chat__message-with-thread-link": Z || ae,
1454
+ "str-chat__message-with-thread-link": ue || Z,
1455
1455
  "str-chat__virtual-message__wrapper--end": r,
1456
1456
  "str-chat__virtual-message__wrapper--first": i,
1457
1457
  "str-chat__virtual-message__wrapper--group": o
1458
1458
  }
1459
- ), ct = c.poll_id && w.polls.fromState(c.poll_id), dt = ya(c), me = ke(c), ut = Na(c), Re = !!(J != null && J.length && !c.quoted_message), mt = me && ue && Re;
1459
+ ), ct = c.poll_id && w.polls.fromState(c.poll_id), dt = ya(c), he = Ee(c), ut = Na(c), Le = !!(J != null && J.length && !c.quoted_message), mt = he && me && Le;
1460
1460
  return /* @__PURE__ */ h(ne, { children: [
1461
1461
  a && /* @__PURE__ */ n(
1462
- A,
1462
+ C,
1463
1463
  {
1464
1464
  additionalMessageInputProps: t
1465
1465
  }
@@ -1467,7 +1467,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1467
1467
  O && /* @__PURE__ */ n(
1468
1468
  qn,
1469
1469
  {
1470
- MessageBouncePrompt: $,
1470
+ MessageBouncePrompt: B,
1471
1471
  onClose: () => T(!1),
1472
1472
  open: O
1473
1473
  }
@@ -1478,8 +1478,8 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1478
1478
  className: kn,
1479
1479
  "data-message-id": c.id,
1480
1480
  children: [
1481
- y && /* @__PURE__ */ n(y, {}),
1482
- !!N && /* @__PURE__ */ n(B, { reminder: N }),
1481
+ k && /* @__PURE__ */ n(k, {}),
1482
+ !!N && /* @__PURE__ */ n(U, { reminder: N }),
1483
1483
  c.user && /* @__PURE__ */ n(
1484
1484
  re,
1485
1485
  {
@@ -1489,14 +1489,14 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1489
1489
  name: c.user.name || c.user.id,
1490
1490
  size: 24,
1491
1491
  shape: "circle",
1492
- dmAgentEnabled: me
1492
+ dmAgentEnabled: he
1493
1493
  }
1494
1494
  ),
1495
1495
  /* @__PURE__ */ n(
1496
1496
  "div",
1497
1497
  {
1498
- className: C("str-chat__message-inner", {
1499
- "str-chat__simple-message--error-failed": ee || lt
1498
+ className: y("str-chat__message-inner", {
1499
+ "str-chat__simple-message--error-failed": ae || ee
1500
1500
  }),
1501
1501
  "data-testid": "message-inner",
1502
1502
  onClick: oe,
@@ -1510,8 +1510,8 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1510
1510
  marginInlineStart: 0
1511
1511
  },
1512
1512
  children: ut ? /* @__PURE__ */ h("div", { className: "str-chat__message-bubble-wrapper", children: [
1513
- ue ? /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
1514
- M && /* @__PURE__ */ n(M, {}),
1513
+ me ? /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
1514
+ A && /* @__PURE__ */ n(A, {}),
1515
1515
  /* @__PURE__ */ n(
1516
1516
  Ot.Sent,
1517
1517
  {
@@ -1521,7 +1521,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1521
1521
  amountText: (vt = c.metadata) == null ? void 0 : vt.amount_text,
1522
1522
  detail: (xt = c.metadata) == null ? void 0 : xt.attachment_detail,
1523
1523
  paymentStatus: (wt = c.metadata) == null ? void 0 : wt.payment_status,
1524
- onPreviewClick: () => S == null ? void 0 : S(c, _),
1524
+ onPreviewClick: () => E == null ? void 0 : E(c, _),
1525
1525
  onFetchSource: async () => await (R == null ? void 0 : R(c, _))
1526
1526
  }
1527
1527
  )
@@ -1535,13 +1535,13 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1535
1535
  amountText: (Ct = c.metadata) == null ? void 0 : Ct.amount_text,
1536
1536
  detail: (kt = c.metadata) == null ? void 0 : kt.attachment_detail,
1537
1537
  paymentStatus: (Et = c.metadata) == null ? void 0 : Et.payment_status,
1538
- isUnlocking: k(c.id),
1539
- onUnlockClick: () => S == null ? void 0 : S(c, _),
1538
+ isUnlocking: I(c.id),
1539
+ onUnlockClick: () => E == null ? void 0 : E(c, _),
1540
1540
  onFetchSource: async () => await (R == null ? void 0 : R(c, _)),
1541
1541
  onDownloadClick: () => D == null ? void 0 : D(c, _)
1542
1542
  }
1543
1543
  ),
1544
- M && /* @__PURE__ */ n(M, {})
1544
+ A && /* @__PURE__ */ n(A, {})
1545
1545
  ] }),
1546
1546
  c.text && /* @__PURE__ */ n("div", { className: "str-chat__message-bubble", children: /* @__PURE__ */ n(
1547
1547
  At,
@@ -1552,25 +1552,25 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1552
1552
  ) })
1553
1553
  ] }) : dt ? (
1554
1554
  /* Tip-only messages render as a standalone bubble */
1555
- /* @__PURE__ */ n(Pe, { message: c, standalone: !0 })
1555
+ /* @__PURE__ */ n(Oe, { message: c, standalone: !0 })
1556
1556
  ) : /* @__PURE__ */ n("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ h("div", { className: "str-chat__message-bubble", children: [
1557
- me && !mt && /* @__PURE__ */ n(
1558
- Pe,
1557
+ he && !mt && /* @__PURE__ */ n(
1558
+ Oe,
1559
1559
  {
1560
1560
  message: c,
1561
- hasAttachment: Re,
1562
- isMyMessage: ue
1561
+ hasAttachment: Le,
1562
+ isMyMessage: me
1563
1563
  }
1564
1564
  ),
1565
1565
  ct && /* @__PURE__ */ n(Wn, { poll: ct }),
1566
1566
  J != null && J.length && !c.quoted_message ? /* @__PURE__ */ n(
1567
- I,
1567
+ M,
1568
1568
  {
1569
1569
  actionHandler: l,
1570
1570
  attachments: J
1571
1571
  }
1572
1572
  ) : null,
1573
- K ? /* @__PURE__ */ n(
1573
+ W ? /* @__PURE__ */ n(
1574
1574
  v,
1575
1575
  {
1576
1576
  message: ie,
@@ -1588,45 +1588,45 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1588
1588
  }
1589
1589
  ),
1590
1590
  !ut && !dt && /* @__PURE__ */ h("div", { className: "str-chat__message-footer", children: [
1591
- (!me || mt) && /* @__PURE__ */ n(
1592
- Pe,
1591
+ (!he || mt) && /* @__PURE__ */ n(
1592
+ Oe,
1593
1593
  {
1594
1594
  message: c,
1595
- hasAttachment: Re,
1596
- isMyMessage: ue
1595
+ hasAttachment: Le,
1596
+ isMyMessage: me
1597
1597
  }
1598
1598
  ),
1599
- s && me && /* @__PURE__ */ n(
1599
+ s && he && /* @__PURE__ */ n(
1600
1600
  Ca,
1601
1601
  {
1602
- selected: E,
1602
+ selected: S,
1603
1603
  onVoteUp: L,
1604
- onVoteDown: F
1604
+ onVoteDown: z
1605
1605
  }
1606
1606
  )
1607
1607
  ] }),
1608
- Z && /* @__PURE__ */ n(
1609
- X,
1608
+ ue && /* @__PURE__ */ n(
1609
+ K,
1610
1610
  {
1611
1611
  onClick: d,
1612
1612
  reply_count: c.reply_count
1613
1613
  }
1614
1614
  ),
1615
- ae && /* @__PURE__ */ n(H, {})
1615
+ Z && /* @__PURE__ */ n(H, {})
1616
1616
  ]
1617
1617
  },
1618
1618
  c.id
1619
1619
  )
1620
1620
  ] });
1621
- }, Ea = V.memo(
1621
+ }, Ea = j.memo(
1622
1622
  ka,
1623
1623
  (e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 : Mn(e, t)
1624
1624
  ), Sa = (e) => {
1625
- const t = ve("CustomMessage");
1625
+ const t = xe("CustomMessage");
1626
1626
  return /* @__PURE__ */ n(Ea, { ...t, ...e });
1627
1627
  }, Ia = () => {
1628
1628
  var s;
1629
- const { handleDelete: e, message: t } = ve("CustomMessageActions");
1629
+ const { handleDelete: e, message: t } = xe("CustomMessageActions");
1630
1630
  return ((s = t.metadata) == null ? void 0 : s.payment_status) === "paid" ? null : /* @__PURE__ */ n(
1631
1631
  Ht,
1632
1632
  {
@@ -1638,7 +1638,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1638
1638
  }
1639
1639
  );
1640
1640
  }, Ta = () => {
1641
- const { handleFlag: e } = ve("CustomMessageActions");
1641
+ const { handleFlag: e } = xe("CustomMessageActions");
1642
1642
  return /* @__PURE__ */ n(
1643
1643
  Ht,
1644
1644
  {
@@ -1651,7 +1651,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1651
1651
  );
1652
1652
  }, Aa = () => {
1653
1653
  var t;
1654
- const { message: e } = ve("CustomMessageActions");
1654
+ const { message: e } = xe("CustomMessageActions");
1655
1655
  return ((t = e.metadata) == null ? void 0 : t.custom_type) !== "MESSAGE_ATTACHMENT" ? null : /* @__PURE__ */ n(
1656
1656
  Ps,
1657
1657
  {
@@ -1691,7 +1691,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1691
1691
  },
1692
1692
  className: "absolute right-4 top-4 flex size-6 items-center justify-center rounded-full border border-white/40 bg-white/70 backdrop-blur-2xl focus-ring",
1693
1693
  "aria-label": "Close link preview",
1694
- children: /* @__PURE__ */ n(Ae, { className: "size-4 text-black/90" })
1694
+ children: /* @__PURE__ */ n(Me, { className: "size-4 text-black/90" })
1695
1695
  }
1696
1696
  ),
1697
1697
  /* @__PURE__ */ h("div", { className: "p-2", children: [
@@ -1720,7 +1720,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1720
1720
  },
1721
1721
  r.og_scrape_url
1722
1722
  )) }) : null;
1723
- }, ln = V.createContext(!1), Da = ({ sendMessage: e, disabled: t, ...s }) => /* @__PURE__ */ n(
1723
+ }, ln = j.createContext(!1), Da = ({ sendMessage: e, disabled: t, ...s }) => /* @__PURE__ */ n(
1724
1724
  "button",
1725
1725
  {
1726
1726
  ...s,
@@ -1731,7 +1731,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1731
1731
  children: /* @__PURE__ */ n(As, { weight: "bold", className: "size-4" })
1732
1732
  }
1733
1733
  ), Pa = () => {
1734
- const e = Te(ln), { handleSubmit: t } = Qn(), s = es(), a = e || !s, {
1734
+ const e = Ae(ln), { handleSubmit: t } = Qn(), s = es(), a = e || !s, {
1735
1735
  SendButton: r = Da,
1736
1736
  AttachmentPreviewList: i = ts
1737
1737
  } = Ut("CustomMessageInput");
@@ -1800,7 +1800,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1800
1800
  "SYSTEM_AGE_SAFETY_BLOCKED"
1801
1801
  ], Ba = {
1802
1802
  SYSTEM_AGE_SAFETY_BLOCKED: "This user isn’t able to reply because they don’t meet our age safety guidelines."
1803
- }, Oe = "age safety guidelines.", Ua = "https://linktr.ee/s/about/contact", $t = (e) => za.includes(e), ja = (e) => Fa.includes(e), Va = (e) => {
1803
+ }, ze = "age safety guidelines.", Ua = "https://linktr.ee/s/about/contact", $t = (e) => za.includes(e), ja = (e) => Fa.includes(e), Va = (e) => {
1804
1804
  var a;
1805
1805
  const t = (a = e.metadata) == null ? void 0 : a.custom_type;
1806
1806
  if ($t(t))
@@ -1820,10 +1820,10 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1820
1820
  type: s
1821
1821
  };
1822
1822
  }, Ga = (e) => {
1823
- const t = e.indexOf(Oe);
1823
+ const t = e.indexOf(ze);
1824
1824
  if (t === -1)
1825
1825
  return e;
1826
- const s = t + Oe.length;
1826
+ const s = t + ze.length;
1827
1827
  return /* @__PURE__ */ h(ne, { children: [
1828
1828
  e.slice(0, t),
1829
1829
  /* @__PURE__ */ n(
@@ -1833,7 +1833,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1833
1833
  target: "_blank",
1834
1834
  rel: "noopener noreferrer",
1835
1835
  className: "mes-age-safety-system-message__emphasis font-medium text-inherit underline",
1836
- children: Oe
1836
+ children: ze
1837
1837
  }
1838
1838
  ),
1839
1839
  e.slice(s)
@@ -1854,7 +1854,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1854
1854
  "data-dm-agent-system-type": s.type,
1855
1855
  children: [
1856
1856
  /* @__PURE__ */ n(
1857
- Ue,
1857
+ je,
1858
1858
  {
1859
1859
  size: 16,
1860
1860
  weight: "regular",
@@ -1866,7 +1866,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1866
1866
  ]
1867
1867
  }
1868
1868
  ),
1869
- !t && /* @__PURE__ */ n(Le, { message: e.message })
1869
+ !t && /* @__PURE__ */ n(De, { message: e.message })
1870
1870
  ] });
1871
1871
  }
1872
1872
  if ((s == null ? void 0 : s.kind) === "age-safety") {
@@ -1893,7 +1893,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1893
1893
  ]
1894
1894
  }
1895
1895
  ),
1896
- !t && /* @__PURE__ */ n(Le, { message: e.message })
1896
+ !t && /* @__PURE__ */ n(De, { message: e.message })
1897
1897
  ] });
1898
1898
  }
1899
1899
  return /* @__PURE__ */ h("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
@@ -1902,9 +1902,9 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1902
1902
  /* @__PURE__ */ n("p", { children: e.message.text }),
1903
1903
  /* @__PURE__ */ n("div", { className: "str-chat__message--system__line" })
1904
1904
  ] }),
1905
- !t && /* @__PURE__ */ n(Le, { message: e.message })
1905
+ !t && /* @__PURE__ */ n(De, { message: e.message })
1906
1906
  ] });
1907
- }, cn = Ge(!1), ze = ({ cx: e, index: t }) => /* @__PURE__ */ n("circle", { cx: e, cy: "6.15", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ n(
1907
+ }, cn = He(!1), $e = ({ cx: e, index: t }) => /* @__PURE__ */ n("circle", { cx: e, cy: "6.15", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ n(
1908
1908
  "animateTransform",
1909
1909
  {
1910
1910
  attributeName: "transform",
@@ -1915,12 +1915,12 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1915
1915
  repeatCount: "indefinite"
1916
1916
  }
1917
1917
  ) }), Ya = /* @__PURE__ */ new Set([
1918
- De.Thinking,
1919
- De.Generating,
1920
- De.ExternalSources
1918
+ Pe.Thinking,
1919
+ Pe.Generating,
1920
+ Pe.ExternalSources
1921
1921
  ]), qa = ({ threadList: e }) => {
1922
1922
  var b, x;
1923
- const { channel: t, channelConfig: s, thread: a } = de(), { client: r } = Ye(), { typing: i = {} } = as(), { aiState: o } = rs(t), l = Te(cn);
1923
+ const { channel: t, channelConfig: s, thread: a } = de(), { client: r } = qe(), { typing: i = {} } = as(), { aiState: o } = rs(t), l = Ae(cn);
1924
1924
  if (!e && l && Ya.has(o)) {
1925
1925
  const p = Wa(t, (b = r.user) == null ? void 0 : b.id);
1926
1926
  return /* @__PURE__ */ n(
@@ -1993,9 +1993,9 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1993
1993
  height: "13",
1994
1994
  overflow: "visible",
1995
1995
  children: [
1996
- /* @__PURE__ */ n(ze, { cx: "4", index: 0 }),
1997
- /* @__PURE__ */ n(ze, { cx: "16", index: 1 }),
1998
- /* @__PURE__ */ n(ze, { cx: "28", index: 2 })
1996
+ /* @__PURE__ */ n($e, { cx: "4", index: 0 }),
1997
+ /* @__PURE__ */ n($e, { cx: "16", index: 1 }),
1998
+ /* @__PURE__ */ n($e, { cx: "28", index: 2 })
1999
1999
  ]
2000
2000
  }
2001
2001
  ) }) }) }) }) })
@@ -2014,7 +2014,7 @@ function Wa(e, t) {
2014
2014
  const Xa = () => null, Ka = ({ className: e, message: t }) => /* @__PURE__ */ h(
2015
2015
  "div",
2016
2016
  {
2017
- className: C("flex items-center justify-center h-full", e),
2017
+ className: y("flex items-center justify-center h-full", e),
2018
2018
  children: [
2019
2019
  /* @__PURE__ */ h("svg", { viewBox: "0 0 100 100", className: "size-8 fill-pebble", stroke: "none", children: [
2020
2020
  /* @__PURE__ */ n("circle", { cx: "6", cy: "50", r: "6", children: /* @__PURE__ */ n(
@@ -2054,11 +2054,11 @@ const Xa = () => null, Ka = ({ className: e, message: t }) => /* @__PURE__ */ h(
2054
2054
  t && /* @__PURE__ */ n("span", { className: "text-stone", children: t })
2055
2055
  ]
2056
2056
  }
2057
- ), Ee = V.memo(() => /* @__PURE__ */ n("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ h("div", { className: "flex items-center", children: [
2057
+ ), Se = j.memo(() => /* @__PURE__ */ n("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ h("div", { className: "flex items-center", children: [
2058
2058
  /* @__PURE__ */ n(Ka, { className: "w-6 h-6" }),
2059
2059
  /* @__PURE__ */ n("span", { className: "text-sm text-stone", children: "Loading messages" })
2060
2060
  ] }) }));
2061
- Ee.displayName = "LoadingState";
2061
+ Se.displayName = "LoadingState";
2062
2062
  const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Bt = "Replies instantly with AI assistant", Ja = ({
2063
2063
  onBack: e,
2064
2064
  showBackButton: t,
@@ -2077,22 +2077,22 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2077
2077
  showChannelInfo: b = !0
2078
2078
  }) => {
2079
2079
  var R, D, O, T, N;
2080
- const { channel: x } = de(), p = V.useMemo(() => {
2081
- var F, I;
2082
- const E = (F = x._client) == null ? void 0 : F.userID;
2083
- return E ? Object.values(((I = x.state) == null ? void 0 : I.members) || {}).find(
2084
- (A) => {
2085
- var M;
2086
- return ((M = A.user) == null ? void 0 : M.id) && A.user.id !== E;
2080
+ const { channel: x } = de(), p = j.useMemo(() => {
2081
+ var z, M;
2082
+ const S = (z = x._client) == null ? void 0 : z.userID;
2083
+ return S ? Object.values(((M = x.state) == null ? void 0 : M.members) || {}).find(
2084
+ (C) => {
2085
+ var A;
2086
+ return ((A = C.user) == null ? void 0 : A.id) && C.user.id !== S;
2087
2087
  }
2088
2088
  ) : void 0;
2089
- }, [(R = x._client) == null ? void 0 : R.userID, (D = x.state) == null ? void 0 : D.members]), w = Wt(p == null ? void 0 : p.user), _ = (O = p == null ? void 0 : p.user) == null ? void 0 : O.image, k = qt(x), S = async () => {
2089
+ }, [(R = x._client) == null ? void 0 : R.userID, (D = x.state) == null ? void 0 : D.members]), w = Wt(p == null ? void 0 : p.user), _ = (O = p == null ? void 0 : p.user) == null ? void 0 : O.image, I = qt(x), E = async () => {
2090
2090
  try {
2091
- k ? await x.unpin() : await x.pin();
2092
- } catch (E) {
2091
+ I ? await x.unpin() : await x.pin();
2092
+ } catch (S) {
2093
2093
  console.error(
2094
2094
  "[CustomChannelHeader] Failed to update pinned status:",
2095
- E
2095
+ S
2096
2096
  );
2097
2097
  }
2098
2098
  };
@@ -2101,7 +2101,7 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2101
2101
  /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: t && /* @__PURE__ */ n(
2102
2102
  "button",
2103
2103
  {
2104
- className: C(
2104
+ className: y(
2105
2105
  le,
2106
2106
  "messaging-channel-view-back-button-mobile bg-[#F1F0EE]"
2107
2107
  ),
@@ -2119,14 +2119,14 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2119
2119
  id: ((T = p == null ? void 0 : p.user) == null ? void 0 : T.id) || x.id || "unknown",
2120
2120
  name: w,
2121
2121
  image: _,
2122
- starred: s && k,
2122
+ starred: s && I,
2123
2123
  dmAgentEnabled: a,
2124
2124
  size: 48
2125
2125
  }
2126
2126
  ),
2127
2127
  /* @__PURE__ */ n("p", { className: "text-center text-xs font-medium text-black/90", children: w }),
2128
2128
  a && /* @__PURE__ */ h("div", { className: "flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
2129
- /* @__PURE__ */ n(Ue, { className: "size-3 shrink-0 text-black/55" }),
2129
+ /* @__PURE__ */ n(je, { className: "size-3 shrink-0 text-black/55" }),
2130
2130
  /* @__PURE__ */ n("span", { children: Bt })
2131
2131
  ] })
2132
2132
  ] }),
@@ -2135,22 +2135,22 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2135
2135
  "button",
2136
2136
  {
2137
2137
  className: le,
2138
- onClick: S,
2138
+ onClick: E,
2139
2139
  type: "button",
2140
- "aria-label": k ? "Unstar conversation" : "Star conversation",
2140
+ "aria-label": I ? "Unstar conversation" : "Star conversation",
2141
2141
  children: /* @__PURE__ */ n(
2142
- Fe,
2142
+ Be,
2143
2143
  {
2144
- className: C("size-5", {
2145
- "text-yellow-600": k,
2146
- "text-black/90": !k
2144
+ className: y("size-5", {
2145
+ "text-yellow-600": I,
2146
+ "text-black/90": !I
2147
2147
  }),
2148
- weight: k ? "duotone" : "regular"
2148
+ weight: I ? "duotone" : "regular"
2149
2149
  }
2150
2150
  )
2151
2151
  }
2152
2152
  ),
2153
- b && (c ?? /* @__PURE__ */ n(
2153
+ b && (c !== void 0 ? c : /* @__PURE__ */ n(
2154
2154
  Pt,
2155
2155
  {
2156
2156
  channel: x,
@@ -2164,7 +2164,7 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2164
2164
  onBlockParticipantClick: g,
2165
2165
  onReportParticipantClick: u,
2166
2166
  customChannelActions: f,
2167
- triggerClassName: C(le, "bg-[#F1F0EE]")
2167
+ triggerClassName: y(le, "bg-[#F1F0EE]")
2168
2168
  }
2169
2169
  ))
2170
2170
  ] })
@@ -2174,7 +2174,7 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2174
2174
  t && e && /* @__PURE__ */ n(
2175
2175
  "button",
2176
2176
  {
2177
- className: C(
2177
+ className: y(
2178
2178
  le,
2179
2179
  "messaging-channel-view-back-button-desktop"
2180
2180
  ),
@@ -2190,7 +2190,7 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2190
2190
  id: ((N = p == null ? void 0 : p.user) == null ? void 0 : N.id) || x.id || "unknown",
2191
2191
  name: w,
2192
2192
  image: _,
2193
- starred: s && k,
2193
+ starred: s && I,
2194
2194
  dmAgentEnabled: a,
2195
2195
  size: 48
2196
2196
  }
@@ -2198,7 +2198,7 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2198
2198
  /* @__PURE__ */ h("div", { className: "min-w-0", children: [
2199
2199
  /* @__PURE__ */ n("h1", { className: "font-medium text-black/90 truncate", children: w }),
2200
2200
  a && /* @__PURE__ */ h("div", { className: "mt-0.5 flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
2201
- /* @__PURE__ */ n(Ue, { className: "size-3 shrink-0 text-black/55" }),
2201
+ /* @__PURE__ */ n(je, { className: "size-3 shrink-0 text-black/55" }),
2202
2202
  /* @__PURE__ */ n("span", { className: "truncate", children: Bt })
2203
2203
  ] })
2204
2204
  ] })
@@ -2208,22 +2208,22 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2208
2208
  "button",
2209
2209
  {
2210
2210
  className: le,
2211
- onClick: S,
2211
+ onClick: E,
2212
2212
  type: "button",
2213
- "aria-label": k ? "Unstar conversation" : "Star conversation",
2213
+ "aria-label": I ? "Unstar conversation" : "Star conversation",
2214
2214
  children: /* @__PURE__ */ n(
2215
- Fe,
2215
+ Be,
2216
2216
  {
2217
- className: C("size-6", {
2218
- "text-yellow-600": k,
2219
- "text-black/90": !k
2217
+ className: y("size-6", {
2218
+ "text-yellow-600": I,
2219
+ "text-black/90": !I
2220
2220
  }),
2221
- weight: k ? "duotone" : "regular"
2221
+ weight: I ? "duotone" : "regular"
2222
2222
  }
2223
2223
  )
2224
2224
  }
2225
2225
  ),
2226
- b && (c ?? /* @__PURE__ */ n(
2226
+ b && (c !== void 0 ? c : /* @__PURE__ */ n(
2227
2227
  Pt,
2228
2228
  {
2229
2229
  channel: x,
@@ -2263,48 +2263,48 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2263
2263
  chatbotVotingEnabled: p = !1,
2264
2264
  renderChannelBanner: w,
2265
2265
  customChannelActions: _,
2266
- renderChannelActions: k,
2267
- renderMessage: S,
2266
+ renderChannelActions: I,
2267
+ renderMessage: E,
2268
2268
  dmAgentEnabled: R = !1,
2269
2269
  viewerLanguage: D,
2270
2270
  showChannelInfo: O = !0
2271
2271
  }) => {
2272
- var M, z, $, U, H, X;
2273
- const { channel: T } = de(), N = V.useMemo(() => {
2274
- var y, j;
2275
- const B = (y = T._client) == null ? void 0 : y.userID;
2276
- return B ? Object.values(((j = T.state) == null ? void 0 : j.members) || {}).find(
2272
+ var A, $, B, G, H, K;
2273
+ const { channel: T } = de(), N = j.useMemo(() => {
2274
+ var k, F;
2275
+ const U = (k = T._client) == null ? void 0 : k.userID;
2276
+ return U ? Object.values(((F = T.state) == null ? void 0 : F.members) || {}).find(
2277
2277
  (q) => {
2278
- var K;
2279
- return ((K = q.user) == null ? void 0 : K.id) && q.user.id !== B;
2278
+ var W;
2279
+ return ((W = q.user) == null ? void 0 : W.id) && q.user.id !== U;
2280
2280
  }
2281
2281
  ) : void 0;
2282
- }, [(M = T._client) == null ? void 0 : M.userID, (z = T.state) == null ? void 0 : z.members]), E = V.useMemo(() => {
2283
- var y, j;
2284
- const B = (y = T._client) == null ? void 0 : y.userID;
2285
- return B ? Object.values(((j = T.state) == null ? void 0 : j.members) || {}).find((q) => {
2286
- var K;
2287
- return ((K = q.user) == null ? void 0 : K.id) === B;
2282
+ }, [(A = T._client) == null ? void 0 : A.userID, ($ = T.state) == null ? void 0 : $.members]), S = j.useMemo(() => {
2283
+ var k, F;
2284
+ const U = (k = T._client) == null ? void 0 : k.userID;
2285
+ return U ? Object.values(((F = T.state) == null ? void 0 : F.members) || {}).find((q) => {
2286
+ var W;
2287
+ return ((W = q.user) == null ? void 0 : W.id) === U;
2288
2288
  }) : void 0;
2289
- }, [($ = T._client) == null ? void 0 : $.userID, (U = T.state) == null ? void 0 : U.members]), L = ((H = E == null ? void 0 : E.user) == null ? void 0 : H.is_account) ?? (E == null ? void 0 : E.is_account), F = ((X = N == null ? void 0 : N.user) == null ? void 0 : X.is_account) ?? (N == null ? void 0 : N.is_account), I = R && L === !1 && F === !0, A = W(
2290
- (B) => {
2291
- const { message: v } = ve("ChannelView"), y = /* @__PURE__ */ n(
2289
+ }, [(B = T._client) == null ? void 0 : B.userID, (G = T.state) == null ? void 0 : G.members]), L = ((H = S == null ? void 0 : S.user) == null ? void 0 : H.is_account) ?? (S == null ? void 0 : S.is_account), z = ((K = N == null ? void 0 : N.user) == null ? void 0 : K.is_account) ?? (N == null ? void 0 : N.is_account), M = R && L === !1 && z === !0, C = X(
2290
+ (U) => {
2291
+ const { message: v } = xe("ChannelView"), k = /* @__PURE__ */ n(
2292
2292
  Sa,
2293
2293
  {
2294
- ...B,
2294
+ ...U,
2295
2295
  chatbotVotingEnabled: p,
2296
2296
  viewerLanguage: D
2297
2297
  }
2298
2298
  );
2299
- return !S || !v ? y : S(y, v);
2299
+ return !E || !v ? k : E(k, v);
2300
2300
  },
2301
- [p, S, D]
2301
+ [p, E, D]
2302
2302
  );
2303
2303
  return /* @__PURE__ */ n(ne, { children: /* @__PURE__ */ n(
2304
2304
  os,
2305
2305
  {
2306
2306
  overrides: {
2307
- Message: A,
2307
+ Message: C,
2308
2308
  MessageActions: Aa
2309
2309
  },
2310
2310
  children: /* @__PURE__ */ h(ls, { children: [
@@ -2315,7 +2315,7 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2315
2315
  showBackButton: t,
2316
2316
  showChannelInfo: O,
2317
2317
  showStarButton: x,
2318
- dmAgentEnabled: I,
2318
+ dmAgentEnabled: M,
2319
2319
  onLeaveConversation: i,
2320
2320
  onBlockParticipant: o,
2321
2321
  showDeleteConversation: l,
@@ -2325,10 +2325,10 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2325
2325
  onBlockParticipantClick: m,
2326
2326
  onReportParticipantClick: g,
2327
2327
  customChannelActions: _,
2328
- renderChannelActions: k
2328
+ renderChannelActions: I
2329
2329
  }
2330
2330
  ) }, "lt-channel-header"),
2331
- w ? /* @__PURE__ */ n(V.Fragment, { children: w() }, "lt-channel-banner") : null,
2331
+ w ? /* @__PURE__ */ n(j.Fragment, { children: w() }, "lt-channel-banner") : null,
2332
2332
  /* @__PURE__ */ n(
2333
2333
  "div",
2334
2334
  {
@@ -2337,7 +2337,7 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2337
2337
  },
2338
2338
  "lt-channel-message-list"
2339
2339
  ),
2340
- r ? /* @__PURE__ */ n(V.Fragment, { children: r(T) }, "lt-channel-conversation-footer") : null,
2340
+ r ? /* @__PURE__ */ n(j.Fragment, { children: r(T) }, "lt-channel-conversation-footer") : null,
2341
2341
  /* @__PURE__ */ n(
2342
2342
  Oa,
2343
2343
  {
@@ -2353,7 +2353,7 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2353
2353
  ] })
2354
2354
  }
2355
2355
  ) });
2356
- }, dn = V.memo(
2356
+ }, dn = j.memo(
2357
2357
  ({
2358
2358
  channel: e,
2359
2359
  onBack: t,
@@ -2374,56 +2374,56 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2374
2374
  composerDisabled: p = !1,
2375
2375
  composerDisabledReason: w,
2376
2376
  dmAgentEnabled: _,
2377
- messageMetadata: k,
2378
- onMessageSent: S,
2377
+ messageMetadata: I,
2378
+ onMessageSent: E,
2379
2379
  showStarButton: R = !1,
2380
2380
  chatbotVotingEnabled: D = !1,
2381
2381
  renderChannelBanner: O,
2382
2382
  customChannelActions: T,
2383
2383
  renderChannelActions: N,
2384
- renderMessage: E,
2384
+ renderMessage: S,
2385
2385
  onMessageLinkClick: L,
2386
- sendButton: F,
2387
- attachmentPreviewList: I,
2388
- viewerLanguage: A,
2389
- showChannelInfo: M = !0
2386
+ sendButton: z,
2387
+ attachmentPreviewList: M,
2388
+ viewerLanguage: C,
2389
+ showChannelInfo: A = !0
2390
2390
  }) => {
2391
- const z = W(
2392
- async (U, H, X) => {
2393
- var K;
2394
- const B = ((K = e.data) == null ? void 0 : K.chatbot_paused) === !0, v = _ && !B, y = {
2391
+ const $ = X(
2392
+ async (G, H, K) => {
2393
+ var W;
2394
+ const U = ((W = e.data) == null ? void 0 : W.chatbot_paused) === !0, v = _ && !U, k = {
2395
2395
  ...H,
2396
2396
  ...v && { silent: !0 },
2397
- ...k && {
2397
+ ...I && {
2398
2398
  metadata: {
2399
2399
  ...H.metadata ?? {},
2400
- ...k
2400
+ ...I
2401
2401
  }
2402
2402
  }
2403
- }, j = {
2404
- ...X,
2403
+ }, F = {
2404
+ ...K,
2405
2405
  ...v && { skip_push: !0 }
2406
- }, q = await e.sendMessage(y, j);
2407
- return S == null || S(q), q;
2406
+ }, q = await e.sendMessage(k, F);
2407
+ return E == null || E(q), q;
2408
2408
  },
2409
- [e, _, k, S]
2410
- ), $ = G(null);
2409
+ [e, _, I, E]
2410
+ ), B = V(null);
2411
2411
  return Y(() => {
2412
2412
  if (!L) return;
2413
- const U = $.current;
2414
- if (!U) return;
2415
- const H = (X) => {
2416
- const B = X.target, v = B == null ? void 0 : B.closest("a[href]"), y = v == null ? void 0 : v.getAttribute("href");
2417
- if (!y) return;
2418
- const j = v == null ? void 0 : v.closest("[data-message-id]"), q = j == null ? void 0 : j.getAttribute("data-message-id"), K = q ? e.state.messages.find((J) => J.id === q) : void 0;
2419
- L(y, K);
2413
+ const G = B.current;
2414
+ if (!G) return;
2415
+ const H = (K) => {
2416
+ const U = K.target, v = U == null ? void 0 : U.closest("a[href]"), k = v == null ? void 0 : v.getAttribute("href");
2417
+ if (!k) return;
2418
+ const F = v == null ? void 0 : v.closest("[data-message-id]"), q = F == null ? void 0 : F.getAttribute("data-message-id"), W = q ? e.state.messages.find((J) => J.id === q) : void 0;
2419
+ L(k, W);
2420
2420
  };
2421
- return U.addEventListener("click", H), () => U.removeEventListener("click", H);
2421
+ return G.addEventListener("click", H), () => G.removeEventListener("click", H);
2422
2422
  }, [L, e]), /* @__PURE__ */ n(
2423
2423
  "div",
2424
2424
  {
2425
- ref: $,
2426
- className: C(
2425
+ ref: B,
2426
+ className: y(
2427
2427
  "messaging-channel-view h-full flex flex-col",
2428
2428
  d
2429
2429
  ),
@@ -2433,12 +2433,12 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2433
2433
  channel: e,
2434
2434
  MessageSystem: Ha,
2435
2435
  EmptyStateIndicator: m,
2436
- LoadingIndicator: Ee,
2436
+ LoadingIndicator: Se,
2437
2437
  DateSeparator: Vs,
2438
2438
  TypingIndicator: qa,
2439
- doSendMessageRequest: z,
2440
- ...F ? { SendButton: F } : {},
2441
- ...I ? { AttachmentPreviewList: I } : {},
2439
+ doSendMessageRequest: $,
2440
+ ...z ? { SendButton: z } : {},
2441
+ ...M ? { AttachmentPreviewList: M } : {},
2442
2442
  children: /* @__PURE__ */ n(
2443
2443
  Za,
2444
2444
  {
@@ -2464,9 +2464,9 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2464
2464
  renderChannelBanner: O,
2465
2465
  customChannelActions: T,
2466
2466
  renderChannelActions: N,
2467
- renderMessage: E,
2468
- viewerLanguage: A,
2469
- showChannelInfo: M
2467
+ renderMessage: S,
2468
+ viewerLanguage: C,
2469
+ showChannelInfo: A
2470
2470
  }
2471
2471
  )
2472
2472
  }
@@ -2476,7 +2476,7 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2476
2476
  }
2477
2477
  );
2478
2478
  dn.displayName = "ChannelView";
2479
- const ge = V.memo(({ message: e, onBack: t }) => /* @__PURE__ */ n("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ h("div", { className: "text-center max-w-sm", children: [
2479
+ const be = j.memo(({ message: e, onBack: t }) => /* @__PURE__ */ n("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ h("div", { className: "text-center max-w-sm", children: [
2480
2480
  /* @__PURE__ */ n("div", { className: "w-24 h-24 bg-danger-alt/20 rounded-full flex items-center justify-center mx-auto mb-6", children: /* @__PURE__ */ n("span", { className: "text-4xl", children: "⚠️" }) }),
2481
2481
  /* @__PURE__ */ n("h2", { className: "font-semibold text-charcoal mb-2", children: "Oops!" }),
2482
2482
  /* @__PURE__ */ n("p", { className: "text-stone text-sm mb-6", children: e }),
@@ -2490,7 +2490,7 @@ const ge = V.memo(({ message: e, onBack: t }) => /* @__PURE__ */ n("div", { clas
2490
2490
  }
2491
2491
  )
2492
2492
  ] }) }));
2493
- ge.displayName = "ErrorState";
2493
+ be.displayName = "ErrorState";
2494
2494
  const ki = ({
2495
2495
  capabilities: e = {},
2496
2496
  renderMessageInputActions: t,
@@ -2508,72 +2508,73 @@ const ki = ({
2508
2508
  viewerLanguage: c,
2509
2509
  renderChannelBanner: b,
2510
2510
  customChannelActions: x,
2511
- renderMessage: p,
2512
- onMessageLinkClick: w,
2513
- showChannelInfo: _
2511
+ renderChannelActions: p,
2512
+ renderMessage: w,
2513
+ onMessageLinkClick: _,
2514
+ showChannelInfo: I
2514
2515
  }) => {
2515
2516
  const {
2516
- client: k,
2517
- isConnected: S,
2518
- isLoading: R,
2519
- error: D,
2520
- refreshConnection: O,
2521
- service: T,
2522
- debug: N
2523
- } = Os(), [E, L] = P(null), [F, I] = P(null), [A, M] = P(!1), { showDeleteConversation: z = !0 } = e, $ = G(o);
2524
- $.current = o;
2525
- const U = G(a);
2526
- U.current = a;
2527
- const H = G(null), X = G(null);
2517
+ client: E,
2518
+ isConnected: R,
2519
+ isLoading: D,
2520
+ error: O,
2521
+ refreshConnection: T,
2522
+ service: N,
2523
+ debug: S
2524
+ } = Os(), [L, z] = P(null), [M, C] = P(null), [A, $] = P(!1), { showDeleteConversation: B = !0 } = e, G = V(o);
2525
+ G.current = o;
2526
+ const H = V(a);
2527
+ H.current = a;
2528
+ const K = V(null), U = V(null);
2528
2529
  Y(() => {
2529
- X.current = E;
2530
- }, [E]), Y(() => {
2531
- if (!k || !S) return;
2532
- const y = k.userID;
2533
- if (!y) return;
2534
- const j = `${y}::${i}`;
2535
- if (H.current === j) return;
2536
- H.current = j;
2537
- const q = () => {
2538
- H.current === j && (H.current = null);
2530
+ U.current = L;
2531
+ }, [L]), Y(() => {
2532
+ if (!E || !R) return;
2533
+ const F = E.userID;
2534
+ if (!F) return;
2535
+ const q = `${F}::${i}`;
2536
+ if (K.current === q) return;
2537
+ K.current = q;
2538
+ const W = () => {
2539
+ K.current === q && (K.current = null);
2539
2540
  };
2540
2541
  (async () => {
2541
- var J, ie;
2542
+ var ie, ue;
2542
2543
  try {
2543
- N && console.log(
2544
+ S && console.log(
2544
2545
  "[MessagingShell] Loading initial conversation with:",
2545
2546
  i
2546
2547
  );
2547
- const Z = await k.queryChannels(
2548
+ const Z = await E.queryChannels(
2548
2549
  {
2549
2550
  type: "messaging",
2550
- members: { $eq: [y, i] }
2551
+ members: { $eq: [F, i] }
2551
2552
  },
2552
2553
  {},
2553
2554
  { limit: 1 }
2554
2555
  );
2555
2556
  if (Z.length > 0) {
2556
- L(Z[0]), I(null), (J = U.current) == null || J.call(U, Z[0]), N && console.log(
2557
+ z(Z[0]), C(null), (ie = H.current) == null || ie.call(H, Z[0]), S && console.log(
2557
2558
  "[MessagingShell] Initial conversation loaded:",
2558
2559
  Z[0].id
2559
2560
  );
2560
2561
  return;
2561
2562
  }
2562
- const ae = $.current;
2563
- if (!ae || !T) {
2564
- q(), I("No conversation found with this account"), N && console.log(
2563
+ const ae = G.current;
2564
+ if (!ae || !N) {
2565
+ W(), C("No conversation found with this account"), S && console.log(
2565
2566
  "[MessagingShell] No conversation found for:",
2566
2567
  i
2567
2568
  );
2568
2569
  return;
2569
2570
  }
2570
2571
  try {
2571
- const ee = await T.startChannelWithParticipant({
2572
+ const ee = await N.startChannelWithParticipant({
2572
2573
  id: ae.id,
2573
2574
  name: ae.name,
2574
2575
  phone: ae.phone
2575
2576
  });
2576
- L(ee), I(null), (ie = U.current) == null || ie.call(U, ee), N && console.log(
2577
+ z(ee), C(null), (ue = H.current) == null || ue.call(H, ee), S && console.log(
2577
2578
  "[MessagingShell] Channel created and loaded:",
2578
2579
  ee.id
2579
2580
  );
@@ -2581,39 +2582,39 @@ const ki = ({
2581
2582
  console.error(
2582
2583
  "[MessagingShell] Failed to create conversation:",
2583
2584
  ee
2584
- ), q(), I("Failed to create conversation");
2585
+ ), W(), C("Failed to create conversation");
2585
2586
  }
2586
2587
  } catch (Z) {
2587
2588
  console.error(
2588
2589
  "[MessagingShell] Failed to load initial conversation:",
2589
2590
  Z
2590
- ), q(), X.current || I("Failed to load conversation");
2591
+ ), W(), U.current || C("Failed to load conversation");
2591
2592
  }
2592
2593
  })();
2593
- }, [i, k, S, T, N]);
2594
- const B = G(r);
2595
- B.current = r;
2596
- const v = W(() => {
2597
- var y;
2598
- L(null), M(!0), (y = B.current) == null || y.call(B);
2594
+ }, [i, E, R, N, S]);
2595
+ const v = V(r);
2596
+ v.current = r;
2597
+ const k = X(() => {
2598
+ var F;
2599
+ z(null), $(!0), (F = v.current) == null || F.call(v);
2599
2600
  }, []);
2600
- return R ? /* @__PURE__ */ n(Ee, {}) : D ? /* @__PURE__ */ n(ge, { message: D, onBack: O }) : !S || !k ? /* @__PURE__ */ n(
2601
- ge,
2601
+ return D ? /* @__PURE__ */ n(Se, {}) : O ? /* @__PURE__ */ n(be, { message: O, onBack: T }) : !R || !E ? /* @__PURE__ */ n(
2602
+ be,
2602
2603
  {
2603
2604
  message: "Not connected to messaging service",
2604
- onBack: O
2605
+ onBack: T
2605
2606
  }
2606
- ) : F ? /* @__PURE__ */ n(ge, { message: F }) : A && !E ? /* @__PURE__ */ n(ge, { message: "Conversation ended" }) : E ? /* @__PURE__ */ n("div", { className: "messaging-shell h-full bg-background-primary overflow-hidden", children: /* @__PURE__ */ n("div", { className: "flex h-full min-h-0 flex-col", children: /* @__PURE__ */ n(
2607
+ ) : M ? /* @__PURE__ */ n(be, { message: M }) : A && !L ? /* @__PURE__ */ n(be, { message: "Conversation ended" }) : L ? /* @__PURE__ */ n("div", { className: "messaging-shell h-full bg-background-primary overflow-hidden", children: /* @__PURE__ */ n("div", { className: "flex h-full min-h-0 flex-col", children: /* @__PURE__ */ n(
2607
2608
  dn,
2608
2609
  {
2609
- channel: E,
2610
+ channel: L,
2610
2611
  renderMessageInputActions: t,
2611
2612
  renderConversationFooter: s,
2612
2613
  renderChannelBanner: b,
2613
- onLeaveConversation: v,
2614
- onBlockParticipant: v,
2614
+ onLeaveConversation: k,
2615
+ onBlockParticipant: k,
2615
2616
  CustomChannelEmptyState: l,
2616
- showDeleteConversation: z,
2617
+ showDeleteConversation: B,
2617
2618
  onBlockParticipantClick: d,
2618
2619
  onReportParticipantClick: m,
2619
2620
  dmAgentEnabled: g,
@@ -2621,12 +2622,13 @@ const ki = ({
2621
2622
  chatbotVotingEnabled: f,
2622
2623
  viewerLanguage: c,
2623
2624
  customChannelActions: x,
2624
- renderMessage: p,
2625
- onMessageLinkClick: w,
2626
- showChannelInfo: _
2625
+ renderChannelActions: p,
2626
+ renderMessage: w,
2627
+ onMessageLinkClick: _,
2628
+ showChannelInfo: I
2627
2629
  },
2628
- E.id
2629
- ) }) }) : /* @__PURE__ */ n(Ee, {});
2630
+ L.id
2631
+ ) }) }) : /* @__PURE__ */ n(Se, {});
2630
2632
  };
2631
2633
  function Qa(e) {
2632
2634
  const t = e.state.pending_messages;
@@ -2634,14 +2636,14 @@ function Qa(e) {
2634
2636
  for (const s of t)
2635
2637
  e.state.addMessageSorted(s.message);
2636
2638
  }
2637
- const un = V.createContext({
2639
+ const un = j.createContext({
2638
2640
  selectedChannel: void 0,
2639
2641
  onChannelSelect: () => {
2640
2642
  },
2641
2643
  debug: !1,
2642
2644
  renderMessagePreview: void 0,
2643
2645
  viewerLanguage: void 0
2644
- }), er = un.Provider, tr = () => V.useContext(un), nr = (e, t) => {
2646
+ }), er = un.Provider, tr = () => j.useContext(un), nr = (e, t) => {
2645
2647
  const s = new Date(
2646
2648
  Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate())
2647
2649
  ), r = new Date(
@@ -2662,7 +2664,7 @@ const un = V.createContext({
2662
2664
  day: "numeric",
2663
2665
  year: "2-digit"
2664
2666
  });
2665
- }, mn = V.memo(
2667
+ }, mn = j.memo(
2666
2668
  ({ channel: e, unread: t }) => {
2667
2669
  var D, O, T;
2668
2670
  const {
@@ -2674,33 +2676,33 @@ const un = V.createContext({
2674
2676
  } = tr(), l = (s == null ? void 0 : s.id) === (e == null ? void 0 : e.id), d = () => {
2675
2677
  e && a(e);
2676
2678
  }, m = (N) => {
2677
- const E = N.key === "Enter" || N.key === " ", L = N.repeat;
2678
- !E || L || (N.preventDefault(), d());
2679
+ const S = N.key === "Enter" || N.key === " ", L = N.repeat;
2680
+ !S || L || (N.preventDefault(), d());
2679
2681
  }, u = Object.values(((D = e == null ? void 0 : e.state) == null ? void 0 : D.members) || {}).find(
2680
2682
  (N) => {
2681
- var E, L;
2682
- return ((E = N.user) == null ? void 0 : E.id) && N.user.id !== ((L = e == null ? void 0 : e._client) == null ? void 0 : L.userID);
2683
+ var S, L;
2684
+ return ((S = N.user) == null ? void 0 : S.id) && N.user.id !== ((L = e == null ? void 0 : e._client) == null ? void 0 : L.userID);
2683
2685
  }
2684
2686
  ), f = Wt(u == null ? void 0 : u.user), c = (O = u == null ? void 0 : u.user) == null ? void 0 : O.image, b = (() => {
2685
- var E;
2686
- const N = (E = e == null ? void 0 : e.state) == null ? void 0 : E.messages;
2687
+ var S;
2688
+ const N = (S = e == null ? void 0 : e.state) == null ? void 0 : S.messages;
2687
2689
  if (N != null && N.length) {
2688
2690
  for (let L = N.length - 1; L >= 0; L--)
2689
2691
  if (N[L].type !== "system") return N[L];
2690
2692
  }
2691
2693
  })(), p = (() => {
2692
- var A, M, z, $;
2694
+ var C, A, $, B;
2693
2695
  const N = Xt({
2694
2696
  message: b,
2695
2697
  viewerLanguage: o
2696
2698
  });
2697
- if (((A = b == null ? void 0 : b.metadata) == null ? void 0 : A.custom_type) === "MESSAGE_TIP") return N ? `💵 ${N}` : "💵 Sent a tip";
2698
- if (((M = b == null ? void 0 : b.metadata) == null ? void 0 : M.custom_type) === "MESSAGE_PAID") return N ? `💰 ${N}` : "💰 Sent a message";
2699
- if (((z = b == null ? void 0 : b.metadata) == null ? void 0 : z.custom_type) === "MESSAGE_ATTACHMENT") return N ? `📎 ${N}` : "📎 Sent an attachment";
2699
+ if (((C = b == null ? void 0 : b.metadata) == null ? void 0 : C.custom_type) === "MESSAGE_TIP") return N ? `💵 ${N}` : "💵 Sent a tip";
2700
+ if (((A = b == null ? void 0 : b.metadata) == null ? void 0 : A.custom_type) === "MESSAGE_PAID") return N ? `💰 ${N}` : "💰 Sent a message";
2701
+ if ((($ = b == null ? void 0 : b.metadata) == null ? void 0 : $.custom_type) === "MESSAGE_ATTACHMENT") return N ? `📎 ${N}` : "📎 Sent an attachment";
2700
2702
  if (N) return N;
2701
- const I = ($ = b == null ? void 0 : b.attachments) == null ? void 0 : $[0];
2702
- return I ? I.og_scrape_url ? I.og_scrape_url : I.type === "image" ? "📷 Sent an image" : I.type === "video" ? "🎥 Sent a video" : I.type === "audio" ? "🎵 Sent audio" : I.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
2703
- })(), w = b != null && b.created_at ? sr(new Date(b.created_at)) : "", _ = b ? ke(b) : !1, k = i ? i(b, p) : `${_ ? "✨ " : ""}${p}`, S = qt(e), R = t ?? 0;
2703
+ const M = (B = b == null ? void 0 : b.attachments) == null ? void 0 : B[0];
2704
+ return M ? M.og_scrape_url ? M.og_scrape_url : M.type === "image" ? "📷 Sent an image" : M.type === "video" ? "🎥 Sent a video" : M.type === "audio" ? "🎵 Sent audio" : M.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
2705
+ })(), w = b != null && b.created_at ? sr(new Date(b.created_at)) : "", _ = b ? Ee(b) : !1, I = i ? i(b, p) : `${_ ? "✨ " : ""}${p}`, E = qt(e), R = t ?? 0;
2704
2706
  return r && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
2705
2707
  channelId: e == null ? void 0 : e.id,
2706
2708
  isSelected: l,
@@ -2714,7 +2716,7 @@ const un = V.createContext({
2714
2716
  tabIndex: 0,
2715
2717
  onClick: d,
2716
2718
  onKeyDown: m,
2717
- className: C(
2719
+ className: y(
2718
2720
  "group w-full px-4 py-3 transition-colors text-left max-w-full overflow-hidden focus-ring rounded-[12px] [&+&]:mt-2",
2719
2721
  {
2720
2722
  "bg-black/[0.04]": l,
@@ -2729,7 +2731,7 @@ const un = V.createContext({
2729
2731
  name: f,
2730
2732
  image: c,
2731
2733
  size: 48,
2732
- starred: S
2734
+ starred: E
2733
2735
  }
2734
2736
  ),
2735
2737
  /* @__PURE__ */ h("div", { className: "flex-1 min-w-0 flex flex-col gap-1", children: [
@@ -2737,11 +2739,11 @@ const un = V.createContext({
2737
2739
  /* @__PURE__ */ h(
2738
2740
  "h3",
2739
2741
  {
2740
- className: C(
2742
+ className: y(
2741
2743
  "text-sm font-medium truncate text-[#191918]"
2742
2744
  ),
2743
2745
  children: [
2744
- S && /* @__PURE__ */ n("span", { className: "sr-only", children: "Starred conversation. " }),
2746
+ E && /* @__PURE__ */ n("span", { className: "sr-only", children: "Starred conversation. " }),
2745
2747
  f
2746
2748
  ]
2747
2749
  }
@@ -2749,7 +2751,7 @@ const un = V.createContext({
2749
2751
  w && /* @__PURE__ */ n("span", { className: "text-xs text-[#717070] flex-shrink-0", children: w })
2750
2752
  ] }),
2751
2753
  /* @__PURE__ */ h("div", { className: "flex items-center justify-between gap-2 min-w-0", children: [
2752
- /* @__PURE__ */ n("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: k }),
2754
+ /* @__PURE__ */ n("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: I }),
2753
2755
  R > 0 && /* @__PURE__ */ n("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: R > 99 ? "99+" : R })
2754
2756
  ] })
2755
2757
  ] })
@@ -2759,7 +2761,7 @@ const un = V.createContext({
2759
2761
  }
2760
2762
  );
2761
2763
  mn.displayName = "CustomChannelPreview";
2762
- const ar = { last_message_at: -1 }, rr = V.memo(
2764
+ const ar = { last_message_at: -1 }, rr = j.memo(
2763
2765
  ({
2764
2766
  onChannelSelect: e,
2765
2767
  selectedChannel: t,
@@ -2772,9 +2774,9 @@ const ar = { last_message_at: -1 }, rr = V.memo(
2772
2774
  renderMessagePreview: d,
2773
2775
  viewerLanguage: m
2774
2776
  }) => {
2775
- const g = V.useRef(0);
2777
+ const g = j.useRef(0);
2776
2778
  g.current++;
2777
- const { debug: u = !1 } = qe(), f = V.useCallback(
2779
+ const { debug: u = !1 } = We(), f = j.useCallback(
2778
2780
  (b) => {
2779
2781
  for (const x of b)
2780
2782
  Qa(x);
@@ -2787,7 +2789,7 @@ const ar = { last_message_at: -1 }, rr = V.memo(
2787
2789
  selectedChannelId: t == null ? void 0 : t.id,
2788
2790
  filters: s
2789
2791
  });
2790
- const c = V.useMemo(
2792
+ const c = j.useMemo(
2791
2793
  () => ({
2792
2794
  selectedChannel: t,
2793
2795
  onChannelSelect: e,
@@ -2806,7 +2808,7 @@ const ar = { last_message_at: -1 }, rr = V.memo(
2806
2808
  return /* @__PURE__ */ n(
2807
2809
  "div",
2808
2810
  {
2809
- className: C(
2811
+ className: y(
2810
2812
  "messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden",
2811
2813
  o
2812
2814
  ),
@@ -2830,7 +2832,7 @@ const ar = { last_message_at: -1 }, rr = V.memo(
2830
2832
  );
2831
2833
  rr.displayName = "ChannelList";
2832
2834
  const ir = /^([a-z][a-z0-9+.-]*):/i, or = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
2833
- function Qe(e) {
2835
+ function et(e) {
2834
2836
  if (typeof e != "string") return;
2835
2837
  const t = e.trim();
2836
2838
  if (t === "") return;
@@ -2845,10 +2847,10 @@ const lr = {
2845
2847
  dark: "bg-white text-[#121110] hover:bg-white/90",
2846
2848
  light: "bg-[#121110] text-white hover:bg-[#2a2928]"
2847
2849
  }, cr = ({ variant: e, cta: t }) => {
2848
- const s = C(
2850
+ const s = y(
2849
2851
  "mt-2 inline-flex h-10 w-full items-center justify-center rounded-full px-4 text-sm font-medium leading-none transition-colors",
2850
2852
  lr[e]
2851
- ), a = Qe(t.href);
2853
+ ), a = et(t.href);
2852
2854
  return a ? /* @__PURE__ */ n(
2853
2855
  "a",
2854
2856
  {
@@ -2880,7 +2882,7 @@ const lr = {
2880
2882
  }, ur = "text-white/30", mr = {
2881
2883
  dark: "text-white/55",
2882
2884
  light: "text-black/55"
2883
- }, et = ({
2885
+ }, tt = ({
2884
2886
  variant: e,
2885
2887
  title: t,
2886
2888
  placeholderTitle: s,
@@ -2892,10 +2894,10 @@ const lr = {
2892
2894
  }) => {
2893
2895
  const d = e === "dark", m = t ?? (d ? s : void 0) ?? "", g = m.trim() !== "", u = a != null && a.trim() !== "", f = typeof r == "string" ? r.trim() : "", c = f !== "", b = o != null;
2894
2896
  if (!g && !u && !c && !b) return null;
2895
- const p = C(
2897
+ const p = y(
2896
2898
  "truncate text-base font-medium leading-6",
2897
2899
  d && !t ? ur : dr[e]
2898
- ), w = C(
2900
+ ), w = y(
2899
2901
  "truncate text-xs leading-4",
2900
2902
  mr[e]
2901
2903
  );
@@ -2905,7 +2907,7 @@ const lr = {
2905
2907
  /* @__PURE__ */ h("div", { className: "flex min-w-0 flex-col gap-1", children: [
2906
2908
  g && /* @__PURE__ */ h("div", { className: "flex min-w-0 items-center gap-2", children: [
2907
2909
  i ? /* @__PURE__ */ n("span", { className: "shrink-0", children: i }) : null,
2908
- /* @__PURE__ */ n("p", { className: C("min-w-0", p), children: m })
2910
+ /* @__PURE__ */ n("p", { className: y("min-w-0", p), children: m })
2909
2911
  ] }),
2910
2912
  u && /* @__PURE__ */ n("p", { className: w, children: a })
2911
2913
  ] }),
@@ -2915,14 +2917,14 @@ const lr = {
2915
2917
  ] }),
2916
2918
  o && /* @__PURE__ */ n(cr, { variant: e, cta: o })
2917
2919
  ] });
2918
- }, hr = C(
2920
+ }, hr = y(
2919
2921
  "relative block w-[280px] select-none overflow-hidden rounded-md",
2920
2922
  // 1px hairline border that sits flush with the card chrome — matches
2921
2923
  // the messaging design system's "small border around link attachments"
2922
2924
  // treatment from the mobile spec. The drop shadow remains for depth.
2923
2925
  "border border-black/[0.08]",
2924
2926
  "shadow-[0_1px_2px_rgba(0,0,0,0.04),0_8px_32px_rgba(0,0,0,0.1)]"
2925
- ), Se = ({
2927
+ ), Ie = ({
2926
2928
  variant: e,
2927
2929
  children: t,
2928
2930
  href: s,
@@ -2933,7 +2935,7 @@ const lr = {
2933
2935
  bgClassName: l,
2934
2936
  "data-testid": d
2935
2937
  }) => {
2936
- const m = s != null || a != null, g = C(
2938
+ const m = s != null || a != null, g = y(
2937
2939
  hr,
2938
2940
  l ?? (e === "dark" ? "bg-[#121110]" : "bg-white"),
2939
2941
  // `focus-ring` is a design-system utility from the component-library
@@ -2964,7 +2966,7 @@ const lr = {
2964
2966
  onClick: a,
2965
2967
  "aria-label": r,
2966
2968
  "data-testid": d,
2967
- className: C(g, "text-left"),
2969
+ className: y(g, "text-left"),
2968
2970
  children: [
2969
2971
  t,
2970
2972
  u
@@ -2988,11 +2990,11 @@ const lr = {
2988
2990
  }, gr = {
2989
2991
  dark: "size-16 text-white/25",
2990
2992
  light: "size-16 text-black/25"
2991
- }, Me = (e, t) => !!t && !!e && se(e) === "audio", hn = (e, t) => {
2993
+ }, Re = (e, t) => !!t && !!e && se(e) === "audio", hn = (e, t) => {
2992
2994
  if (!t || !e) return !1;
2993
2995
  const s = se(e);
2994
2996
  return s === "video" || s === "audio";
2995
- }, tt = "bg-[#F2F3F4]", Ie = ({
2997
+ }, nt = "bg-[#F2F3F4]", Te = ({
2996
2998
  variant: e,
2997
2999
  thumbnailUrl: t,
2998
3000
  sourceUrl: s,
@@ -3002,7 +3004,7 @@ const lr = {
3002
3004
  topRight: o
3003
3005
  }) => {
3004
3006
  const l = se(r), d = !!s && l === "video";
3005
- return Me(r, s) ? /* @__PURE__ */ n("div", { className: "p-3", children: /* @__PURE__ */ n(
3007
+ return Re(r, s) ? /* @__PURE__ */ n("div", { className: "p-3", children: /* @__PURE__ */ n(
3006
3008
  "audio",
3007
3009
  {
3008
3010
  src: s,
@@ -3014,7 +3016,7 @@ const lr = {
3014
3016
  ) }) : /* @__PURE__ */ h(
3015
3017
  "div",
3016
3018
  {
3017
- className: C(
3019
+ className: y(
3018
3020
  "relative h-[180px] w-full overflow-hidden",
3019
3021
  d && "bg-black"
3020
3022
  ),
@@ -3041,7 +3043,7 @@ const lr = {
3041
3043
  ) : /* @__PURE__ */ n(
3042
3044
  "div",
3043
3045
  {
3044
- className: C(
3046
+ className: y(
3045
3047
  "flex h-full w-full items-center justify-center",
3046
3048
  fr[e]
3047
3049
  ),
@@ -3070,14 +3072,14 @@ const lr = {
3070
3072
  onDismiss: g,
3071
3073
  onEditClick: u
3072
3074
  }) => {
3073
- const f = l === "classic", c = Me(r, o), b = g ? /* @__PURE__ */ n(
3075
+ const f = l === "classic", c = Re(r, o), b = g ? /* @__PURE__ */ n(
3074
3076
  "button",
3075
3077
  {
3076
3078
  type: "button",
3077
3079
  onClick: g,
3078
3080
  "aria-label": "Dismiss attachment",
3079
3081
  className: "flex size-6 items-center justify-center rounded-full bg-[#121110] text-white",
3080
- children: /* @__PURE__ */ n(Ae, { className: "size-3", weight: "bold" })
3082
+ children: /* @__PURE__ */ n(Me, { className: "size-3", weight: "bold" })
3081
3083
  }
3082
3084
  ) : void 0, x = u ? /* @__PURE__ */ n(
3083
3085
  "button",
@@ -3089,9 +3091,9 @@ const lr = {
3089
3091
  children: /* @__PURE__ */ n(Rs, { className: "size-5", weight: "regular" })
3090
3092
  }
3091
3093
  ) : void 0;
3092
- return c ? /* @__PURE__ */ n(Se, { variant: "dark", bgClassName: tt, children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2 pr-3", children: [
3094
+ return c ? /* @__PURE__ */ n(Ie, { variant: "dark", bgClassName: nt, children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2 pr-3", children: [
3093
3095
  /* @__PURE__ */ n("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ n(
3094
- Ie,
3096
+ Te,
3095
3097
  {
3096
3098
  variant: "dark",
3097
3099
  sourceUrl: o,
@@ -3101,13 +3103,13 @@ const lr = {
3101
3103
  ) }),
3102
3104
  b && /* @__PURE__ */ n("div", { className: "shrink-0", children: b })
3103
3105
  ] }) }) : /* @__PURE__ */ h(
3104
- Se,
3106
+ Ie,
3105
3107
  {
3106
3108
  variant: "dark",
3107
3109
  topRight: f ? b : void 0,
3108
3110
  children: [
3109
3111
  !f && /* @__PURE__ */ n(
3110
- Ie,
3112
+ Te,
3111
3113
  {
3112
3114
  variant: "dark",
3113
3115
  thumbnailUrl: i,
@@ -3118,7 +3120,7 @@ const lr = {
3118
3120
  }
3119
3121
  ),
3120
3122
  /* @__PURE__ */ n(
3121
- et,
3123
+ tt,
3122
3124
  {
3123
3125
  variant: "dark",
3124
3126
  title: e,
@@ -3145,7 +3147,7 @@ const lr = {
3145
3147
  cta: d,
3146
3148
  onClick: m
3147
3149
  }) => {
3148
- const g = hn(a, i), u = Qe(s), f = d == null && u != null && !g ? u : void 0, c = d == null && !g ? m : void 0, b = Me(a, i) ? tt : void 0, x = d && m ? {
3150
+ const g = hn(a, i), u = et(s), f = d == null && u != null && !g ? u : void 0, c = d == null && !g ? m : void 0, b = Re(a, i) ? nt : void 0, x = d && m ? {
3149
3151
  ...d,
3150
3152
  onClick: () => {
3151
3153
  var p;
@@ -3153,7 +3155,7 @@ const lr = {
3153
3155
  }
3154
3156
  } : d;
3155
3157
  return /* @__PURE__ */ h(
3156
- Se,
3158
+ Ie,
3157
3159
  {
3158
3160
  variant: "light",
3159
3161
  href: f,
@@ -3163,7 +3165,7 @@ const lr = {
3163
3165
  "data-testid": "link-attachment",
3164
3166
  children: [
3165
3167
  o === "featured" && /* @__PURE__ */ n(
3166
- Ie,
3168
+ Te,
3167
3169
  {
3168
3170
  variant: "light",
3169
3171
  thumbnailUrl: r,
@@ -3173,7 +3175,7 @@ const lr = {
3173
3175
  }
3174
3176
  ),
3175
3177
  /* @__PURE__ */ n(
3176
- et,
3178
+ tt,
3177
3179
  {
3178
3180
  variant: "light",
3179
3181
  title: e,
@@ -3199,17 +3201,17 @@ const lr = {
3199
3201
  cta: m,
3200
3202
  onClick: g
3201
3203
  }) => {
3202
- const u = hn(r, o), f = Qe(a), c = m == null && f != null && !u ? f : void 0, b = m == null && !u && c != null ? g : void 0;
3204
+ const u = hn(r, o), f = et(a), c = m == null && f != null && !u ? f : void 0, b = m == null && !u && c != null ? g : void 0;
3203
3205
  return /* @__PURE__ */ h(
3204
- Se,
3206
+ Ie,
3205
3207
  {
3206
3208
  variant: "dark",
3207
3209
  href: c,
3208
3210
  onClick: b,
3209
- bgClassName: Me(r, o) ? tt : void 0,
3211
+ bgClassName: Re(r, o) ? nt : void 0,
3210
3212
  children: [
3211
3213
  l === "featured" && /* @__PURE__ */ n(
3212
- Ie,
3214
+ Te,
3213
3215
  {
3214
3216
  variant: "dark",
3215
3217
  thumbnailUrl: i,
@@ -3219,7 +3221,7 @@ const lr = {
3219
3221
  }
3220
3222
  ),
3221
3223
  /* @__PURE__ */ n(
3222
- et,
3224
+ tt,
3223
3225
  {
3224
3226
  variant: "dark",
3225
3227
  title: e,
@@ -3259,7 +3261,7 @@ const lr = {
3259
3261
  middle: "rounded-tl-[4px] rounded-tr-[18px] rounded-bl-[4px] rounded-br-[18px]",
3260
3262
  end: "rounded-tl-[4px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[18px]"
3261
3263
  }
3262
- }, xe = ({
3264
+ }, we = ({
3263
3265
  variant: e,
3264
3266
  text: t,
3265
3267
  bordered: s = !0,
@@ -3274,7 +3276,7 @@ const lr = {
3274
3276
  {
3275
3277
  "data-testid": o,
3276
3278
  "data-group-position": a,
3277
- className: C(
3279
+ className: y(
3278
3280
  // 280px-wide bubble — matches the mobile chat attachment width
3279
3281
  // and keeps the document / image / audio bubbles visually
3280
3282
  // consistent inside the conversation timeline. The 8px / 16px
@@ -3294,7 +3296,7 @@ const lr = {
3294
3296
  l ? /* @__PURE__ */ n(
3295
3297
  "p",
3296
3298
  {
3297
- className: C(
3299
+ className: y(
3298
3300
  // No `text-*` / `font-*` overrides here — caption inherits
3299
3301
  // the same font family + size as `.str-chat__message-text`
3300
3302
  // so it matches the surrounding `CustomMessage` bubbles.
@@ -3311,7 +3313,7 @@ const lr = {
3311
3313
  ]
3312
3314
  }
3313
3315
  );
3314
- }, we = ({
3316
+ }, _e = ({
3315
3317
  onClick: e,
3316
3318
  variant: t = "overlay",
3317
3319
  ariaLabel: s = "Dismiss attachment"
@@ -3323,13 +3325,13 @@ const lr = {
3323
3325
  a.stopPropagation(), e();
3324
3326
  },
3325
3327
  "aria-label": s,
3326
- className: C(
3328
+ className: y(
3327
3329
  "flex size-6 items-center justify-center rounded-full text-white",
3328
3330
  t === "overlay" ? "bg-[#121110]/85 backdrop-blur" : "bg-white/15 hover:bg-white/25"
3329
3331
  ),
3330
- children: /* @__PURE__ */ n(Ae, { className: "size-3", weight: "bold" })
3332
+ children: /* @__PURE__ */ n(Me, { className: "size-3", weight: "bold" })
3331
3333
  }
3332
- ), _e = (e) => e === "received" ? "light" : "dark", Si = ({
3334
+ ), Ne = (e) => e === "received" ? "light" : "dark", Si = ({
3333
3335
  firstOfGroup: e,
3334
3336
  endOfGroup: t,
3335
3337
  groupedByUser: s
@@ -3350,7 +3352,7 @@ const lr = {
3350
3352
  }
3351
3353
  ),
3352
3354
  s ?? null
3353
- ] }), nt = ({
3355
+ ] }), st = ({
3354
3356
  state: e,
3355
3357
  src: t,
3356
3358
  mimeType: s,
@@ -3361,12 +3363,12 @@ const lr = {
3361
3363
  preload: l,
3362
3364
  onDismiss: d
3363
3365
  }) => {
3364
- const m = _e(e), g = e === "composer" && !!d, u = Cr({ src: t, mimeType: s, filename: a, items: r });
3366
+ const m = Ne(e), g = e === "composer" && !!d, u = Cr({ src: t, mimeType: s, filename: a, items: r });
3365
3367
  if (u.length === 0)
3366
3368
  return null;
3367
3369
  const f = l ?? (u.length > 1 ? "none" : "metadata");
3368
3370
  return /* @__PURE__ */ n(
3369
- xe,
3371
+ we,
3370
3372
  {
3371
3373
  variant: m,
3372
3374
  text: i,
@@ -3380,14 +3382,14 @@ const lr = {
3380
3382
  trailingAction: (
3381
3383
  // Composer only supports a single attachment, so the
3382
3384
  // dismiss control sits on the only player.
3383
- g && b === 0 ? /* @__PURE__ */ n(we, { onClick: d, variant: "inline" }) : void 0
3385
+ g && b === 0 ? /* @__PURE__ */ n(_e, { onClick: d, variant: "inline" }) : void 0
3384
3386
  )
3385
3387
  },
3386
3388
  `${c.src}-${b}`
3387
3389
  )) })
3388
3390
  }
3389
3391
  );
3390
- }, Er = (e) => /* @__PURE__ */ n(nt, { ...e, state: "composer" }), Sr = (e) => /* @__PURE__ */ n(nt, { ...e, state: "sent" }), Ir = (e) => /* @__PURE__ */ n(nt, { ...e, state: "received" }), Tr = {
3392
+ }, Er = (e) => /* @__PURE__ */ n(st, { ...e, state: "composer" }), Sr = (e) => /* @__PURE__ */ n(st, { ...e, state: "sent" }), Ir = (e) => /* @__PURE__ */ n(st, { ...e, state: "received" }), Tr = {
3391
3393
  Composer: Er,
3392
3394
  Sent: Sr,
3393
3395
  Received: Ir
@@ -3457,13 +3459,13 @@ const Dr = {
3457
3459
  const d = s ?? t ?? "File", m = Lr(a, t, r), g = /* @__PURE__ */ n(
3458
3460
  "div",
3459
3461
  {
3460
- className: C(
3462
+ className: y(
3461
3463
  "flex size-10 shrink-0 items-center justify-center rounded-sm",
3462
3464
  Pr[e]
3463
3465
  ),
3464
3466
  "aria-hidden": !0,
3465
3467
  children: ce(a, {
3466
- className: C("size-6", Or[e]),
3468
+ className: y("size-6", Or[e]),
3467
3469
  weight: "regular"
3468
3470
  })
3469
3471
  }
@@ -3472,7 +3474,7 @@ const Dr = {
3472
3474
  m ? /* @__PURE__ */ n(
3473
3475
  "p",
3474
3476
  {
3475
- className: C(
3477
+ className: y(
3476
3478
  "truncate text-xs leading-4",
3477
3479
  Dr[e]
3478
3480
  ),
@@ -3485,7 +3487,7 @@ const Dr = {
3485
3487
  type: "button",
3486
3488
  onClick: i,
3487
3489
  "aria-label": o,
3488
- className: C(
3490
+ className: y(
3489
3491
  "flex min-w-0 flex-1 items-center gap-3 rounded-sm text-left transition-colors",
3490
3492
  e === "dark" ? "hover:bg-white/[0.04]" : "hover:bg-black/[0.04]"
3491
3493
  ),
@@ -3545,7 +3547,7 @@ const zr = ({
3545
3547
  trailingAction: r
3546
3548
  }
3547
3549
  );
3548
- }, st = ({
3550
+ }, at = ({
3549
3551
  state: e,
3550
3552
  src: t,
3551
3553
  filename: s,
@@ -3558,7 +3560,7 @@ const zr = ({
3558
3560
  onClick: m,
3559
3561
  onDismiss: g
3560
3562
  }) => {
3561
- const u = _e(e), f = e === "composer" && !!g, c = zr({
3563
+ const u = Ne(e), f = e === "composer" && !!g, c = zr({
3562
3564
  src: t,
3563
3565
  filename: s,
3564
3566
  fileSize: a,
@@ -3577,16 +3579,16 @@ const zr = ({
3577
3579
  const x = /* @__PURE__ */ n(
3578
3580
  "span",
3579
3581
  {
3580
- className: C(
3582
+ className: y(
3581
3583
  "flex size-8 items-center justify-center rounded-full",
3582
3584
  u === "dark" ? "text-white/70" : "text-black/70"
3583
3585
  ),
3584
3586
  "aria-hidden": !0,
3585
- children: /* @__PURE__ */ n(pe, { className: "size-5", weight: "bold" })
3587
+ children: /* @__PURE__ */ n(ve, { className: "size-5", weight: "bold" })
3586
3588
  }
3587
3589
  );
3588
3590
  return /* @__PURE__ */ n(
3589
- xe,
3591
+ we,
3590
3592
  {
3591
3593
  variant: u,
3592
3594
  text: l,
@@ -3599,17 +3601,17 @@ const zr = ({
3599
3601
  item: p,
3600
3602
  index: w,
3601
3603
  onActivate: b,
3602
- trailingAction: f && w === 0 ? /* @__PURE__ */ n(we, { onClick: g, variant: "inline" }) : x
3604
+ trailingAction: f && w === 0 ? /* @__PURE__ */ n(_e, { onClick: g, variant: "inline" }) : x
3603
3605
  },
3604
3606
  `${p.src}-${w}`
3605
3607
  )) })
3606
3608
  }
3607
3609
  );
3608
- }, Fr = (e) => /* @__PURE__ */ n(st, { ...e, state: "composer" }), Br = (e) => /* @__PURE__ */ n(st, { ...e, state: "sent" }), Ur = (e) => /* @__PURE__ */ n(st, { ...e, state: "received" }), jr = {
3610
+ }, Fr = (e) => /* @__PURE__ */ n(at, { ...e, state: "composer" }), Br = (e) => /* @__PURE__ */ n(at, { ...e, state: "sent" }), Ur = (e) => /* @__PURE__ */ n(at, { ...e, state: "received" }), jr = {
3609
3611
  Composer: Fr,
3610
3612
  Sent: Br,
3611
3613
  Received: Ur
3612
- }, at = ({
3614
+ }, rt = ({
3613
3615
  onPrev: e,
3614
3616
  onNext: t,
3615
3617
  prevLabel: s = "Previous",
@@ -3644,7 +3646,7 @@ const zr = ({
3644
3646
  tone: i = "dark",
3645
3647
  onTriggered: o
3646
3648
  }) => {
3647
- const [l, d] = P(!1), m = W(
3649
+ const [l, d] = P(!1), m = X(
3648
3650
  (c) => {
3649
3651
  c.stopPropagation(), !l && (d(!0), gn(e, t).catch(() => {
3650
3652
  }).finally(() => {
@@ -3652,7 +3654,7 @@ const zr = ({
3652
3654
  }));
3653
3655
  },
3654
3656
  [l, e, t, o]
3655
- ), g = r ?? s !== "pill", f = { className: C(
3657
+ ), g = r ?? s !== "pill", f = { className: y(
3656
3658
  s === "pill" ? "size-4" : "size-5",
3657
3659
  "shrink-0"
3658
3660
  ), weight: "bold" };
@@ -3663,7 +3665,7 @@ const zr = ({
3663
3665
  onClick: m,
3664
3666
  disabled: l,
3665
3667
  "aria-label": a,
3666
- className: C(
3668
+ className: y(
3667
3669
  "flex size-8 shrink-0 items-center justify-center rounded-full transition-colors disabled:opacity-70",
3668
3670
  {
3669
3671
  dark: "text-white/70 hover:bg-white/[0.08] hover:text-white",
@@ -3671,14 +3673,14 @@ const zr = ({
3671
3673
  }[i]
3672
3674
  ),
3673
3675
  children: l ? /* @__PURE__ */ n(
3674
- be,
3676
+ pe,
3675
3677
  {
3676
3678
  className: "size-4 animate-spin",
3677
3679
  weight: "bold",
3678
3680
  "aria-hidden": !0
3679
3681
  }
3680
3682
  ) : /* @__PURE__ */ n(
3681
- pe,
3683
+ ve,
3682
3684
  {
3683
3685
  className: "size-5 shrink-0",
3684
3686
  weight: "bold",
@@ -3694,7 +3696,7 @@ const zr = ({
3694
3696
  disabled: l,
3695
3697
  "aria-label": a,
3696
3698
  className: "mes-media-viewer__action",
3697
- children: l ? /* @__PURE__ */ n(be, { size: 20, weight: "bold", "aria-hidden": !0 }) : /* @__PURE__ */ n(pe, { size: 20, weight: "bold", "aria-hidden": !0 })
3699
+ children: l ? /* @__PURE__ */ n(pe, { size: 20, weight: "bold", "aria-hidden": !0 }) : /* @__PURE__ */ n(ve, { size: 20, weight: "bold", "aria-hidden": !0 })
3698
3700
  }
3699
3701
  ) : /* @__PURE__ */ h(
3700
3702
  "button",
@@ -3703,37 +3705,37 @@ const zr = ({
3703
3705
  onClick: m,
3704
3706
  disabled: l,
3705
3707
  "aria-label": g ? a : void 0,
3706
- className: C(
3708
+ className: y(
3707
3709
  "mt-3 inline-flex h-10 w-full items-center justify-center gap-2 rounded-full px-4 text-sm font-medium leading-none transition-colors disabled:opacity-70",
3708
3710
  i === "dark" ? "bg-[#121110] text-white hover:bg-[#2a2928]" : "bg-white text-[#121110] hover:bg-white/90"
3709
3711
  ),
3710
3712
  children: [
3711
3713
  l ? /* @__PURE__ */ n(
3712
- be,
3714
+ pe,
3713
3715
  {
3714
3716
  className: "size-4 animate-spin",
3715
3717
  weight: "bold",
3716
3718
  "aria-hidden": !0
3717
3719
  }
3718
- ) : /* @__PURE__ */ n(pe, { ...f, "aria-hidden": !0 }),
3720
+ ) : /* @__PURE__ */ n(ve, { ...f, "aria-hidden": !0 }),
3719
3721
  g ? null : a
3720
3722
  ]
3721
3723
  }
3722
3724
  );
3723
- }, $e = (e, t, s) => Math.min(Math.max(e, t), s), rt = ({
3725
+ }, Fe = (e, t, s) => Math.min(Math.max(e, t), s), it = ({
3724
3726
  length: e,
3725
3727
  initialIndex: t,
3726
3728
  open: s
3727
3729
  }) => {
3728
- const a = $e(t, 0, Math.max(e - 1, 0)), [r, i] = P(a);
3730
+ const a = Fe(t, 0, Math.max(e - 1, 0)), [r, i] = P(a);
3729
3731
  Y(() => {
3730
- s && i($e(t, 0, Math.max(e - 1, 0)));
3732
+ s && i(Fe(t, 0, Math.max(e - 1, 0)));
3731
3733
  }, [s, t, e]), Y(() => {
3732
- i((d) => $e(d, 0, Math.max(e - 1, 0)));
3734
+ i((d) => Fe(d, 0, Math.max(e - 1, 0)));
3733
3735
  }, [e]);
3734
- const o = W(() => {
3736
+ const o = X(() => {
3735
3737
  e <= 1 || i((d) => d <= 0 ? e - 1 : d - 1);
3736
- }, [e]), l = W(() => {
3738
+ }, [e]), l = X(() => {
3737
3739
  e <= 1 || i((d) => d >= e - 1 ? 0 : d + 1);
3738
3740
  }, [e]);
3739
3741
  return Y(() => {
@@ -3745,7 +3747,7 @@ const zr = ({
3745
3747
  };
3746
3748
  return window.addEventListener("keydown", d), () => window.removeEventListener("keydown", d);
3747
3749
  }, [s, e, o, l]), { index: r, prev: o, next: l };
3748
- }, it = ({
3750
+ }, ot = ({
3749
3751
  open: e,
3750
3752
  onClose: t,
3751
3753
  ariaLabel: s,
@@ -3754,7 +3756,7 @@ const zr = ({
3754
3756
  children: i,
3755
3757
  "data-testid": o
3756
3758
  }) => {
3757
- const l = G(null), d = G(null);
3759
+ const l = V(null), d = V(null);
3758
3760
  return Y(() => {
3759
3761
  var f;
3760
3762
  const u = l.current;
@@ -3826,7 +3828,7 @@ const zr = ({
3826
3828
  onClick: t,
3827
3829
  "aria-label": "Close viewer",
3828
3830
  className: "mes-media-viewer__action",
3829
- children: /* @__PURE__ */ n(Ae, { size: 20, weight: "bold", "aria-hidden": !0 })
3831
+ children: /* @__PURE__ */ n(Me, { size: 20, weight: "bold", "aria-hidden": !0 })
3830
3832
  }
3831
3833
  )
3832
3834
  ] })
@@ -3841,7 +3843,7 @@ const zr = ({
3841
3843
  initialIndex: s = 0,
3842
3844
  onClose: a
3843
3845
  }) => {
3844
- const { index: r, prev: i, next: o } = rt({
3846
+ const { index: r, prev: i, next: o } = it({
3845
3847
  length: t.length,
3846
3848
  initialIndex: s,
3847
3849
  open: e
@@ -3850,7 +3852,7 @@ const zr = ({
3850
3852
  [l]
3851
3853
  );
3852
3854
  return l ? /* @__PURE__ */ h(
3853
- it,
3855
+ ot,
3854
3856
  {
3855
3857
  open: e,
3856
3858
  onClose: a,
@@ -3880,7 +3882,7 @@ const zr = ({
3880
3882
  `${r}:${l.src}`
3881
3883
  ),
3882
3884
  t.length > 1 ? /* @__PURE__ */ n(
3883
- at,
3885
+ rt,
3884
3886
  {
3885
3887
  onPrev: i,
3886
3888
  onNext: o,
@@ -3900,14 +3902,14 @@ const zr = ({
3900
3902
  const r = e.length;
3901
3903
  if (r === 0) return null;
3902
3904
  const i = e.slice(0, Math.min(r, s)), o = r - i.length, l = (d, m, g) => {
3903
- const u = C(Vr, "h-full w-full");
3905
+ const u = y(Vr, "h-full w-full");
3904
3906
  return t ? /* @__PURE__ */ h(
3905
3907
  "button",
3906
3908
  {
3907
3909
  type: "button",
3908
3910
  onClick: () => t(m),
3909
3911
  "aria-label": d.ariaLabel ?? `Open media ${m + 1}`,
3910
- className: C(u, "cursor-zoom-in"),
3912
+ className: y(u, "cursor-zoom-in"),
3911
3913
  children: [
3912
3914
  d.content,
3913
3915
  g
@@ -3919,10 +3921,10 @@ const zr = ({
3919
3921
  g
3920
3922
  ] }, m);
3921
3923
  };
3922
- return i.length === 1 ? /* @__PURE__ */ n("div", { className: C("aspect-square w-full", a), children: l(i[0], 0) }) : i.length === 2 ? /* @__PURE__ */ n(
3924
+ return i.length === 1 ? /* @__PURE__ */ n("div", { className: y("aspect-square w-full", a), children: l(i[0], 0) }) : i.length === 2 ? /* @__PURE__ */ n(
3923
3925
  "div",
3924
3926
  {
3925
- className: C(
3927
+ className: y(
3926
3928
  "grid aspect-[16/9] w-full grid-cols-2 gap-0.5",
3927
3929
  a
3928
3930
  ),
@@ -3931,7 +3933,7 @@ const zr = ({
3931
3933
  ) : i.length === 3 ? /* @__PURE__ */ h(
3932
3934
  "div",
3933
3935
  {
3934
- className: C(
3936
+ className: y(
3935
3937
  "grid aspect-[4/3] w-full grid-cols-2 grid-rows-2 gap-0.5",
3936
3938
  a
3937
3939
  ),
@@ -3944,7 +3946,7 @@ const zr = ({
3944
3946
  ) : /* @__PURE__ */ n(
3945
3947
  "div",
3946
3948
  {
3947
- className: C(
3949
+ className: y(
3948
3950
  "grid aspect-[4/3] w-full grid-cols-2 grid-rows-2 gap-0.5",
3949
3951
  a
3950
3952
  ),
@@ -3961,13 +3963,13 @@ const zr = ({
3961
3963
  })
3962
3964
  }
3963
3965
  );
3964
- }, Ne = (e) => {
3965
- const [t, s] = P(!1), [a, r] = P(0), i = W(
3966
+ }, ye = (e) => {
3967
+ const [t, s] = P(!1), [a, r] = P(0), i = X(
3966
3968
  (l) => {
3967
3969
  (e == null ? void 0 : e(l)) !== !1 && (r(l), s(!0));
3968
3970
  },
3969
3971
  [e]
3970
- ), o = W(() => s(!1), []);
3972
+ ), o = X(() => s(!1), []);
3971
3973
  return { viewerOpen: t, viewerIndex: a, handleActivate: i, closeViewer: o };
3972
3974
  }, Gr = (e, t, s, a) => ({
3973
3975
  ariaLabel: `Open image ${t + 1} of ${s}`,
@@ -3993,7 +3995,7 @@ const zr = ({
3993
3995
  alt: s.alt,
3994
3996
  filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
3995
3997
  })), Yr = ({ src: e, alt: t, filename: s, loading: a = "lazy", onClick: r, onDismiss: i }) => {
3996
- const { viewerOpen: o, viewerIndex: l, handleActivate: d, closeViewer: m } = Ne(
3998
+ const { viewerOpen: o, viewerIndex: l, handleActivate: d, closeViewer: m } = ye(
3997
3999
  r
3998
4000
  );
3999
4001
  return /* @__PURE__ */ h("div", { className: "relative w-fit", children: [
@@ -4017,7 +4019,7 @@ const zr = ({
4017
4019
  )
4018
4020
  }
4019
4021
  ),
4020
- i ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(we, { onClick: i }) }) : null,
4022
+ i ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(_e, { onClick: i }) }) : null,
4021
4023
  /* @__PURE__ */ n(
4022
4024
  pn,
4023
4025
  {
@@ -4039,7 +4041,7 @@ const zr = ({
4039
4041
  loading: l = "lazy",
4040
4042
  onClick: d
4041
4043
  }) => {
4042
- const m = Hr({ src: t, alt: s, items: r }), g = _e(e), { viewerOpen: u, viewerIndex: f, handleActivate: c, closeViewer: b } = Ne(
4044
+ const m = Hr({ src: t, alt: s, items: r }), g = Ne(e), { viewerOpen: u, viewerIndex: f, handleActivate: c, closeViewer: b } = ye(
4043
4045
  d
4044
4046
  );
4045
4047
  if (m.length === 0)
@@ -4048,7 +4050,7 @@ const zr = ({
4048
4050
  (p, w) => Gr(p, w, m.length, l)
4049
4051
  );
4050
4052
  return /* @__PURE__ */ h(
4051
- xe,
4053
+ we,
4052
4054
  {
4053
4055
  variant: g,
4054
4056
  text: i,
@@ -4078,7 +4080,7 @@ const zr = ({
4078
4080
  initialIndex: s = 0,
4079
4081
  onClose: a
4080
4082
  }) => {
4081
- const { index: r, prev: i, next: o } = rt({
4083
+ const { index: r, prev: i, next: o } = it({
4082
4084
  length: t.length,
4083
4085
  initialIndex: s,
4084
4086
  open: e
@@ -4090,7 +4092,7 @@ const zr = ({
4090
4092
  [l]
4091
4093
  );
4092
4094
  return !l || !m ? null : /* @__PURE__ */ h(
4093
- it,
4095
+ ot,
4094
4096
  {
4095
4097
  open: e,
4096
4098
  onClose: a,
@@ -4109,7 +4111,7 @@ const zr = ({
4109
4111
  `${r}:${l.src}`
4110
4112
  ),
4111
4113
  t.length > 1 ? /* @__PURE__ */ n(
4112
- at,
4114
+ rt,
4113
4115
  {
4114
4116
  onPrev: i,
4115
4117
  onNext: o,
@@ -4150,7 +4152,7 @@ const zr = ({
4150
4152
  trailingAction: r
4151
4153
  }
4152
4154
  );
4153
- }, ot = ({
4155
+ }, lt = ({
4154
4156
  state: e,
4155
4157
  src: t,
4156
4158
  filename: s,
@@ -4162,7 +4164,7 @@ const zr = ({
4162
4164
  onClick: d,
4163
4165
  onDismiss: m
4164
4166
  }) => {
4165
- const g = _e(e), u = Qr({ src: t, filename: s, fileSize: a, title: r, items: i }), { viewerOpen: f, viewerIndex: c, handleActivate: b, closeViewer: x } = Ne(
4167
+ const g = Ne(e), u = Qr({ src: t, filename: s, fileSize: a, title: r, items: i }), { viewerOpen: f, viewerIndex: c, handleActivate: b, closeViewer: x } = ye(
4166
4168
  d
4167
4169
  ), p = e === "composer" && !!m;
4168
4170
  if (u.length === 0)
@@ -4172,21 +4174,21 @@ const zr = ({
4172
4174
  filename: _.filename ?? Q(_.src)
4173
4175
  }));
4174
4176
  return /* @__PURE__ */ h(
4175
- xe,
4177
+ we,
4176
4178
  {
4177
4179
  variant: g,
4178
4180
  text: o,
4179
4181
  groupPosition: l,
4180
4182
  "data-testid": "pdf-attachment",
4181
4183
  children: [
4182
- /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((_, k) => {
4183
- const S = _.filename ?? Q(_.src), R = p && k === 0 ? /* @__PURE__ */ n(we, { onClick: m, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ n(
4184
+ /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((_, I) => {
4185
+ const E = _.filename ?? Q(_.src), R = p && I === 0 ? /* @__PURE__ */ n(_e, { onClick: m, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ n(
4184
4186
  bn,
4185
4187
  {
4186
4188
  url: _.src,
4187
- filename: S,
4189
+ filename: E,
4188
4190
  variant: "inline",
4189
- label: `Download ${S}`,
4191
+ label: `Download ${E}`,
4190
4192
  tone: g
4191
4193
  }
4192
4194
  );
@@ -4195,11 +4197,11 @@ const zr = ({
4195
4197
  {
4196
4198
  variant: g,
4197
4199
  item: _,
4198
- index: k,
4200
+ index: I,
4199
4201
  onActivate: b,
4200
4202
  trailingAction: R
4201
4203
  },
4202
- `${_.src}-${k}`
4204
+ `${_.src}-${I}`
4203
4205
  );
4204
4206
  }) }),
4205
4207
  /* @__PURE__ */ n(
@@ -4214,7 +4216,7 @@ const zr = ({
4214
4216
  ]
4215
4217
  }
4216
4218
  );
4217
- }, ti = (e) => /* @__PURE__ */ n(ot, { ...e, state: "composer" }), ni = (e) => /* @__PURE__ */ n(ot, { ...e, state: "sent" }), si = (e) => /* @__PURE__ */ n(ot, { ...e, state: "received" }), ai = {
4219
+ }, ti = (e) => /* @__PURE__ */ n(lt, { ...e, state: "composer" }), ni = (e) => /* @__PURE__ */ n(lt, { ...e, state: "sent" }), si = (e) => /* @__PURE__ */ n(lt, { ...e, state: "received" }), ai = {
4218
4220
  Composer: ti,
4219
4221
  Sent: ni,
4220
4222
  Received: si
@@ -4224,7 +4226,7 @@ const zr = ({
4224
4226
  initialIndex: s = 0,
4225
4227
  onClose: a
4226
4228
  }) => {
4227
- const { index: r, prev: i, next: o } = rt({
4229
+ const { index: r, prev: i, next: o } = it({
4228
4230
  length: t.length,
4229
4231
  initialIndex: s,
4230
4232
  open: e
@@ -4233,7 +4235,7 @@ const zr = ({
4233
4235
  [l]
4234
4236
  );
4235
4237
  return l ? /* @__PURE__ */ h(
4236
- it,
4238
+ ot,
4237
4239
  {
4238
4240
  open: e,
4239
4241
  onClose: a,
@@ -4257,7 +4259,7 @@ const zr = ({
4257
4259
  `${r}:${l.src}`
4258
4260
  ),
4259
4261
  t.length > 1 ? /* @__PURE__ */ n(
4260
- at,
4262
+ rt,
4261
4263
  {
4262
4264
  onPrev: i,
4263
4265
  onNext: o,
@@ -4268,7 +4270,7 @@ const zr = ({
4268
4270
  ]
4269
4271
  }
4270
4272
  ) : null;
4271
- }, ri = () => /* @__PURE__ */ n("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ n("span", { className: "flex size-12 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur", children: /* @__PURE__ */ n(Be, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), Nn = ({
4273
+ }, ri = () => /* @__PURE__ */ n("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ n("span", { className: "flex size-12 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur", children: /* @__PURE__ */ n(Ue, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), Nn = ({
4272
4274
  item: e,
4273
4275
  index: t
4274
4276
  }) => /* @__PURE__ */ h("div", { className: "absolute inset-0 size-full bg-[#0d0d0d]", children: [
@@ -4307,7 +4309,7 @@ const zr = ({
4307
4309
  preload: s.preload,
4308
4310
  filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
4309
4311
  })), li = ({ src: e, poster: t, mimeType: s, filename: a, preload: r, onClick: i, onDismiss: o }) => {
4310
- const { viewerOpen: l, viewerIndex: d, handleActivate: m, closeViewer: g } = Ne(
4312
+ const { viewerOpen: l, viewerIndex: d, handleActivate: m, closeViewer: g } = ye(
4311
4313
  i
4312
4314
  );
4313
4315
  return /* @__PURE__ */ h("div", { className: "relative w-fit", children: [
@@ -4321,7 +4323,7 @@ const zr = ({
4321
4323
  children: /* @__PURE__ */ n(Nn, { item: { src: e, poster: t, mimeType: s }, index: 0 })
4322
4324
  }
4323
4325
  ),
4324
- o ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(we, { onClick: o }) }) : null,
4326
+ o ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(_e, { onClick: o }) }) : null,
4325
4327
  /* @__PURE__ */ n(
4326
4328
  _n,
4327
4329
  {
@@ -4347,7 +4349,7 @@ const zr = ({
4347
4349
  preload: d,
4348
4350
  onClick: m
4349
4351
  }) => {
4350
- const g = oi({ src: t, poster: s, mimeType: a, preload: d, items: i }), u = _e(e), { viewerOpen: f, viewerIndex: c, handleActivate: b, closeViewer: x } = Ne(
4352
+ const g = oi({ src: t, poster: s, mimeType: a, preload: d, items: i }), u = Ne(e), { viewerOpen: f, viewerIndex: c, handleActivate: b, closeViewer: x } = ye(
4351
4353
  m
4352
4354
  );
4353
4355
  if (g.length === 0)
@@ -4356,7 +4358,7 @@ const zr = ({
4356
4358
  (w, _) => ii(w, _, g.length)
4357
4359
  );
4358
4360
  return /* @__PURE__ */ h(
4359
- xe,
4361
+ we,
4360
4362
  {
4361
4363
  variant: u,
4362
4364
  text: o,
@@ -4405,7 +4407,7 @@ const zr = ({
4405
4407
  onClick: t,
4406
4408
  disabled: s,
4407
4409
  style: { backgroundColor: "#E6E5E3" },
4408
- className: C(
4410
+ className: y(
4409
4411
  "w-full text-center p-4 rounded-xl text-charcoal font-medium transition-colors focus-ring",
4410
4412
  {
4411
4413
  "hover:brightness-95 active:brightness-90": !s,
@@ -4465,7 +4467,7 @@ export {
4465
4467
  Ti as F,
4466
4468
  Ei as L,
4467
4469
  yi as M,
4468
- fe as a,
4470
+ ge as a,
4469
4471
  re as b,
4470
4472
  rr as c,
4471
4473
  dn as d,
@@ -4487,9 +4489,9 @@ export {
4487
4489
  $s as t,
4488
4490
  Si as u,
4489
4491
  Ys as v,
4490
- Je as w,
4491
- Ze as x,
4492
+ Ze as w,
4493
+ Qe as x,
4492
4494
  Wt as y,
4493
4495
  va as z
4494
4496
  };
4495
- //# sourceMappingURL=index-CAotDlQ-.js.map
4497
+ //# sourceMappingURL=index-BHFdqj7Z.js.map