@linktr.ee/messaging-react 4.1.4 → 4.1.5-rc-1786947787

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,13 +1,13 @@
1
1
  import { jsx as n, jsxs as f, Fragment as q } from "react/jsx-runtime";
2
- import P, { createContext as je, useContext as xe, useCallback as K, useState as $, useRef as V, useEffect as W, useId as rs, Suspense as is, useMemo as le } from "react";
2
+ import P, { createContext as He, useContext as we, useCallback as X, useState as $, useRef as V, useEffect as K, useId as rs, Suspense as is, useMemo as oe } from "react";
3
3
  import { StreamChatService as ls } from "@linktr.ee/messaging-core";
4
- import { StreamChat as os, LinkPreviewsManager as nt } from "stream-chat";
5
- import { Chat as cs, useChannelStateContext as we, useChatContext as He, DateSeparator as ds, useMessageContext as fe, MessageStatus as us, MessageErrorIcon as st, MessageText as Fe, areMessageUIPropsEqual as ms, useMessageReminder as hs, useComponentContext as mn, Attachment as fs, EditMessageModal as gs, MessageBlocked as ps, MessageBouncePrompt as bs, MessageDeleted as vs, MessageIsThreadReplyInChannelButtonIndicator as xs, MessageRepliesCountButton as ws, ReminderNotification as _s, StreamedMessageText as ys, messageHasAttachments as Ns, messageHasReactions as ks, isDateSeparatorMessage as Cs, isMessageBlocked as Ss, isMessageBounced as Es, MessageBounceModal as Is, Poll as Ts, useMessageComposer as As, useStateStore as Rs, MessageInput as Vt, useMessageInputContext as Ls, useMessageComposerHasSendableData as Ms, AttachmentPreviewList as Ds, QuotedMessagePreview as Os, TextareaComposer as Ps, MessageTimestamp as Ke, AIStates as Xe, useTypingContext as Fs, useAIState as zs, Channel as $s, WithComponents as Bs, Window as Us, MessageList as Gt, ChannelList as js, InfiniteScroll as Hs } from "stream-chat-react";
6
- import { isOfficialChannel as hn, OFFICIAL_SENDER_USER_ID as Vs, MESSAGE_CUSTOM_TYPE as oe, isDmAgentSystemType as Yt, isAgeSafetySystemType as Gs, resolveRichCardImagePresentation as Ys, selectEnabledFaqs as Ws } from "@linktr.ee/messaging-taxonomy";
7
- import N from "classnames";
8
- import { StarIcon as at, DotsThreeIcon as Ks, SpinnerGapIcon as Oe, SignOutIcon as Xs, ProhibitInsetIcon as Wt, FlagIcon as fn, CurrencyDollarIcon as qs, CaretRightIcon as gn, ArrowLeftIcon as Zs, FileIcon as pn, ImageIcon as Js, SpeakerHighIcon as Qs, VideoCameraIcon as bn, FileMdIcon as ea, FileTextIcon as ta, FileZipIcon as na, FilePptIcon as sa, FileCsvIcon as aa, FileXlsIcon as ra, FileDocIcon as ia, FilePdfIcon as la, CircleNotchIcon as be, PlayIcon as rt, PauseIcon as oa, LinkIcon as ca, DownloadSimpleIcon as Se, GiftIcon as da, WarningCircleIcon as ua, MegaphoneIcon as ma, ChecksIcon as ha, XIcon as lt, PencilSimpleIcon as fa, CaretLeftIcon as ga, TrashSimpleIcon as pa, ArrowUpIcon as ba, SparkleIcon as va, ProhibitIcon as xa } from "@phosphor-icons/react";
4
+ import { StreamChat as os, LinkPreviewsManager as st } from "stream-chat";
5
+ import { Chat as cs, useChannelStateContext as _e, useChatContext as Ve, DateSeparator as ds, useMessageContext as ge, MessageStatus as us, MessageErrorIcon as at, MessageText as ze, areMessageUIPropsEqual as ms, useMessageReminder as hs, useComponentContext as mn, Attachment as fs, EditMessageModal as gs, MessageBlocked as ps, MessageBouncePrompt as bs, MessageDeleted as vs, MessageIsThreadReplyInChannelButtonIndicator as xs, MessageRepliesCountButton as ws, ReminderNotification as _s, StreamedMessageText as ys, messageHasAttachments as Ns, messageHasReactions as ks, isDateSeparatorMessage as Cs, isMessageBlocked as Ss, isMessageBounced as Es, MessageBounceModal as Is, Poll as Ts, useMessageComposer as As, useStateStore as Rs, MessageInput as Vt, useMessageInputContext as Ls, useMessageComposerHasSendableData as Ms, AttachmentPreviewList as Ds, QuotedMessagePreview as Os, TextareaComposer as Ps, MessageTimestamp as Xe, AIStates as qe, useTypingContext as Fs, useAIState as zs, Channel as $s, WithComponents as Bs, Window as Us, MessageList as Gt, ChannelList as js, InfiniteScroll as Hs } from "stream-chat-react";
6
+ import { isOfficialChannel as hn, OFFICIAL_SENDER_USER_ID as Vs, MESSAGE_CUSTOM_TYPE as ce, isDmAgentSystemType as Yt, isAgeSafetySystemType as Gs, resolveRichCardImagePresentation as Ys, selectEnabledFaqs as Ws } from "@linktr.ee/messaging-taxonomy";
7
+ import k from "classnames";
8
+ import { StarIcon as rt, DotsThreeIcon as Ks, SpinnerGapIcon as Pe, SignOutIcon as Xs, ProhibitInsetIcon as Wt, FlagIcon as fn, CurrencyDollarIcon as qs, CaretRightIcon as gn, ArrowLeftIcon as Zs, FileIcon as pn, ImageIcon as Js, SpeakerHighIcon as Qs, VideoCameraIcon as bn, FileMdIcon as ea, FileTextIcon as ta, FileZipIcon as na, FilePptIcon as sa, FileCsvIcon as aa, FileXlsIcon as ra, FileDocIcon as ia, FilePdfIcon as la, CircleNotchIcon as ve, PlayIcon as it, PauseIcon as oa, LinkIcon as ca, DownloadSimpleIcon as Ee, GiftIcon as da, WarningCircleIcon as ua, MegaphoneIcon as ma, ChecksIcon as ha, XIcon as ot, PencilSimpleIcon as fa, CaretLeftIcon as ga, TrashSimpleIcon as pa, ArrowUpIcon as ba, SparkleIcon as va, ProhibitIcon as xa } from "@phosphor-icons/react";
9
9
  import { MessageActions as wa, DefaultDropdownActionButton as vn } from "stream-chat-react/experimental";
10
- const xn = je({
10
+ const xn = He({
11
11
  service: null,
12
12
  client: null,
13
13
  isConnected: !1,
@@ -17,7 +17,7 @@ const xn = je({
17
17
  refreshConnection: async () => {
18
18
  },
19
19
  debug: !1
20
- }), ot = () => xe(xn), to = ({
20
+ }), ct = () => we(xn), to = ({
21
21
  children: e,
22
22
  user: t,
23
23
  serviceConfig: s,
@@ -26,10 +26,10 @@ const xn = je({
26
26
  debug: i = !1,
27
27
  client: o
28
28
  }) => {
29
- var S, C;
30
- const l = K(
31
- (A, ...O) => {
32
- i && console.log(`🔥 [MessagingProvider] ${A}`, ...O);
29
+ var I, C;
30
+ const l = X(
31
+ (S, ...O) => {
32
+ i && console.log(`🔥 [MessagingProvider] ${S}`, ...O);
33
33
  },
34
34
  [i]
35
35
  );
@@ -43,61 +43,61 @@ const xn = je({
43
43
  _.current = s;
44
44
  const T = V(i);
45
45
  T.current = i;
46
- const L = V({
46
+ const A = V({
47
47
  userId: t == null ? void 0 : t.id,
48
48
  apiKey: a,
49
49
  serviceConfig: s,
50
50
  capabilities: r
51
- }), E = V(0);
52
- E.current++, l("📊 RENDER INFO", {
53
- renderCount: E.current,
51
+ }), R = V(0);
52
+ R.current++, l("📊 RENDER INFO", {
53
+ renderCount: R.current,
54
54
  currentProps: { userId: t == null ? void 0 : t.id, apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..." },
55
55
  propChanges: {
56
- userChanged: L.current.userId !== (t == null ? void 0 : t.id),
57
- apiKeyChanged: L.current.apiKey !== a,
58
- serviceConfigChanged: L.current.serviceConfig !== s,
59
- capabilitiesChanged: L.current.capabilities !== r
56
+ userChanged: A.current.userId !== (t == null ? void 0 : t.id),
57
+ apiKeyChanged: A.current.apiKey !== a,
58
+ serviceConfigChanged: A.current.serviceConfig !== s,
59
+ capabilitiesChanged: A.current.capabilities !== r
60
60
  }
61
- }), L.current = {
61
+ }), A.current = {
62
62
  userId: t == null ? void 0 : t.id,
63
63
  apiKey: a,
64
64
  serviceConfig: s,
65
65
  capabilities: r
66
66
  };
67
67
  const z = V(null);
68
- !o && a && ((S = z.current) == null ? void 0 : S.apiKey) !== a && (z.current = { apiKey: a, client: new os(a) });
68
+ !o && a && ((I = z.current) == null ? void 0 : I.apiKey) !== a && (z.current = { apiKey: a, client: new os(a) });
69
69
  const F = o || (a ? ((C = z.current) == null ? void 0 : C.client) ?? null : null);
70
- W(() => {
71
- const A = E.current, O = _.current;
70
+ K(() => {
71
+ const S = R.current, O = _.current;
72
72
  if (o) {
73
73
  y.current = null, u(null), m(null), c(!1), x(null), w(!1);
74
74
  return;
75
75
  }
76
76
  if (!a || !F || !O) {
77
77
  l("⚠️ SERVICE INIT SKIPPED", {
78
- renderCount: A,
78
+ renderCount: S,
79
79
  reason: "Missing apiKey, client, or serviceConfig"
80
80
  });
81
81
  return;
82
82
  }
83
83
  l("🚀 CREATING SERVICE", {
84
- renderCount: A,
84
+ renderCount: S,
85
85
  apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..."
86
86
  });
87
- const B = new ls({
87
+ const U = new ls({
88
88
  ...O,
89
89
  apiKey: a,
90
90
  debug: T.current,
91
91
  client: F
92
92
  });
93
- y.current = B, u(B), l("✅ SERVICE SET", {
94
- renderCount: A,
95
- serviceInstance: !!B
93
+ y.current = U, u(U), l("✅ SERVICE SET", {
94
+ renderCount: S,
95
+ serviceInstance: !!U
96
96
  });
97
97
  }, [a, F, o]);
98
- const R = V(null);
99
- W(() => {
100
- var O, B;
98
+ const L = V(null);
99
+ K(() => {
100
+ var O, U;
101
101
  if (l("🔗 USER CONNECTION EFFECT TRIGGERED", {
102
102
  hasService: !!d,
103
103
  hasUser: !!t,
@@ -115,7 +115,7 @@ const xn = je({
115
115
  l("⚠️ USER CONNECTION SKIPPED", "Already connecting");
116
116
  return;
117
117
  }
118
- if (((O = R.current) == null ? void 0 : O.serviceId) === d && ((B = R.current) == null ? void 0 : B.userId) === t.id) {
118
+ if (((O = L.current) == null ? void 0 : O.serviceId) === d && ((U = L.current) == null ? void 0 : U.userId) === t.id) {
119
119
  l(
120
120
  "⚠️ USER CONNECTION SKIPPED",
121
121
  "Already connected this user with this service"
@@ -126,16 +126,16 @@ const xn = je({
126
126
  l("🚀 STARTING USER CONNECTION", { userId: t.id }), b.current = !0, w(!0), x(null);
127
127
  try {
128
128
  l("📞 CALLING SERVICE.CONNECTUSER", { userId: t.id });
129
- const G = await d.connectUser(t);
130
- m(G), c(!0), R.current = { serviceId: d, userId: t.id }, l("✅ USER CONNECTION SUCCESS", {
129
+ const j = await d.connectUser(t);
130
+ m(j), c(!0), L.current = { serviceId: d, userId: t.id }, l("✅ USER CONNECTION SUCCESS", {
131
131
  userId: t.id,
132
- clientId: G.userID
132
+ clientId: j.userID
133
133
  });
134
- } catch (G) {
135
- const ee = G instanceof Error ? G.message : "Connection failed";
136
- x(ee), l("❌ USER CONNECTION ERROR", {
134
+ } catch (j) {
135
+ const J = j instanceof Error ? j.message : "Connection failed";
136
+ x(J), l("❌ USER CONNECTION ERROR", {
137
137
  userId: t.id,
138
- error: ee
138
+ error: J
139
139
  });
140
140
  } finally {
141
141
  w(!1), b.current = !1, l("🔄 USER CONNECTION FINISHED", {
@@ -144,14 +144,14 @@ const xn = je({
144
144
  });
145
145
  }
146
146
  })();
147
- }, [d, t, l, g, o]), W(() => {
148
- const A = F;
147
+ }, [d, t, l, g, o]), K(() => {
148
+ const S = F;
149
149
  return () => {
150
150
  var O;
151
- A && (R.current = null, (O = y.current) == null || O.disconnectUser().catch(console.error));
151
+ S && (L.current = null, (O = y.current) == null || O.disconnectUser().catch(console.error));
152
152
  };
153
153
  }, [F]);
154
- const I = K(async () => {
154
+ const E = X(async () => {
155
155
  if (l("🔄 REFRESH CONNECTION CALLED", {
156
156
  hasService: !!d,
157
157
  hasUser: !!t
@@ -163,10 +163,10 @@ const xn = je({
163
163
  l("🚀 STARTING CONNECTION REFRESH", { userId: t.id }), w(!0);
164
164
  try {
165
165
  l("🔌 DISCONNECTING FOR REFRESH"), await d.disconnectUser(), l("📞 RECONNECTING FOR REFRESH");
166
- const A = await d.connectUser(t);
167
- m(A), c(!0), x(null), l("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
168
- } catch (A) {
169
- const O = A instanceof Error ? A.message : "Refresh failed";
166
+ const S = await d.connectUser(t);
167
+ m(S), c(!0), x(null), l("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
168
+ } catch (S) {
169
+ const O = S instanceof Error ? S.message : "Refresh failed";
170
170
  x(O), l("❌ CONNECTION REFRESH ERROR", {
171
171
  userId: t.id,
172
172
  error: O
@@ -175,7 +175,7 @@ const xn = je({
175
175
  w(!1), l("🔄 CONNECTION REFRESH FINISHED", { userId: t.id });
176
176
  }
177
177
  }
178
- }, [d, t, l, o]), M = P.useMemo(() => (l("💫 CONTEXT VALUE MEMOIZATION", {
178
+ }, [d, t, l, o]), D = P.useMemo(() => (l("💫 CONTEXT VALUE MEMOIZATION", {
179
179
  hasService: !!d,
180
180
  hasClient: !!h,
181
181
  isConnected: g,
@@ -197,7 +197,7 @@ const xn = je({
197
197
  isLoading: o ? !1 : p,
198
198
  error: o ? null : v,
199
199
  capabilities: r,
200
- refreshConnection: I,
200
+ refreshConnection: E,
201
201
  debug: i
202
202
  }), [
203
203
  d,
@@ -207,15 +207,15 @@ const xn = je({
207
207
  p,
208
208
  v,
209
209
  r,
210
- I,
210
+ E,
211
211
  i,
212
212
  l
213
213
  ]);
214
214
  return l("🔄 RENDER END", {
215
- renderCount: E.current,
215
+ renderCount: R.current,
216
216
  willRenderChat: !!F,
217
- contextValueReady: !!M
218
- }), /* @__PURE__ */ n(xn.Provider, { value: M, children: F ? /* @__PURE__ */ n(
217
+ contextValueReady: !!D
218
+ }), /* @__PURE__ */ n(xn.Provider, { value: D, children: F ? /* @__PURE__ */ n(
219
219
  cs,
220
220
  {
221
221
  client: F,
@@ -225,12 +225,12 @@ const xn = je({
225
225
  children: e
226
226
  }
227
227
  ) : e });
228
- }, _a = () => ot(), wn = (e) => {
228
+ }, _a = () => ct(), wn = (e) => {
229
229
  var a, r;
230
230
  const [t, s] = $(
231
231
  !!((r = (a = e == null ? void 0 : e.state) == null ? void 0 : a.membership) != null && r.pinned_at)
232
232
  );
233
- return W(() => {
233
+ return K(() => {
234
234
  var o;
235
235
  if (!e) {
236
236
  s(!1);
@@ -322,7 +322,7 @@ function Ca(e) {
322
322
  function Sa(e) {
323
323
  return Nn(e).bgColor;
324
324
  }
325
- const _e = ({
325
+ const ye = ({
326
326
  id: e,
327
327
  image: t,
328
328
  size: s = 40,
@@ -335,7 +335,7 @@ const _e = ({
335
335
  "div",
336
336
  {
337
337
  "aria-hidden": "true",
338
- className: N(
338
+ className: k(
339
339
  "avatar-fallback flex h-full w-full items-center justify-center font-semibold select-none transition-colors"
340
340
  ),
341
341
  style: { fontSize: m, lineHeight: 1 },
@@ -345,7 +345,7 @@ const _e = ({
345
345
  return /* @__PURE__ */ f(
346
346
  "div",
347
347
  {
348
- className: N("relative flex-shrink-0", a),
348
+ className: k("relative flex-shrink-0", a),
349
349
  style: {
350
350
  "--str-chat__avatar-size": `${s}px`,
351
351
  width: `${s}px`,
@@ -359,14 +359,14 @@ const _e = ({
359
359
  {
360
360
  "aria-hidden": "true",
361
361
  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)]",
362
- children: /* @__PURE__ */ n(at, { className: "size-3 text-yellow-600", weight: "duotone" })
362
+ children: /* @__PURE__ */ n(rt, { className: "size-3 text-yellow-600", weight: "duotone" })
363
363
  }
364
364
  ),
365
365
  /* @__PURE__ */ n(
366
366
  "div",
367
367
  {
368
368
  "data-testid": "avatar-ring",
369
- className: N("h-full w-full", "bg-transparent"),
369
+ className: k("h-full w-full", "bg-transparent"),
370
370
  style: {
371
371
  ...c,
372
372
  ...o && {
@@ -395,42 +395,42 @@ const _e = ({
395
395
  onActionComplete: u,
396
396
  logLabel: h = "useChannelModerationActions"
397
397
  }) => {
398
- var M;
399
- const { service: m, debug: g } = ot(), c = (M = t == null ? void 0 : t.user) == null ? void 0 : M.id, p = !!(a && s && m && c), [w, v] = $(!1), [x, b] = $(null), [y, _] = $(!1), [T, L] = $(!1), E = p && ((x == null ? void 0 : x.participantId) !== c || (x == null ? void 0 : x.service) !== m);
400
- return W(() => {
398
+ var D;
399
+ const { service: m, debug: g } = ct(), c = (D = t == null ? void 0 : t.user) == null ? void 0 : D.id, p = !!(a && s && m && c), [w, v] = $(!1), [x, b] = $(null), [y, _] = $(!1), [T, A] = $(!1), R = p && ((x == null ? void 0 : x.participantId) !== c || (x == null ? void 0 : x.service) !== m);
400
+ return K(() => {
401
401
  if (!p || !m || !c) {
402
402
  v(!1), b(null);
403
403
  return;
404
404
  }
405
- let S = !1;
405
+ let I = !1;
406
406
  return (async () => {
407
407
  try {
408
408
  const C = await m.getBlockedUsers();
409
- if (S) return;
409
+ if (I) return;
410
410
  v(
411
411
  C.some(
412
- (A) => A.blocked_user_id === c
412
+ (S) => S.blocked_user_id === c
413
413
  )
414
414
  );
415
415
  } catch (C) {
416
- S || console.error(`[${h}] Failed to check blocked status:`, C);
416
+ I || console.error(`[${h}] Failed to check blocked status:`, C);
417
417
  } finally {
418
- S || b({ participantId: c, service: m });
418
+ I || b({ participantId: c, service: m });
419
419
  }
420
420
  })(), () => {
421
- S = !0;
421
+ I = !0;
422
422
  };
423
423
  }, [p, m, c, h]), {
424
424
  isParticipantBlocked: w,
425
- isCheckingBlockedStatus: E,
425
+ isCheckingBlockedStatus: R,
426
426
  isLeaving: y,
427
427
  isUpdatingBlockStatus: T,
428
428
  handleLeaveConversation: async () => {
429
- var S;
429
+ var I;
430
430
  if (!y) {
431
431
  o == null || o(), g && console.log(`[${h}] Leave conversation`, e.cid), _(!0);
432
432
  try {
433
- const C = ((S = e._client) == null ? void 0 : S.userID) ?? null;
433
+ const C = ((I = e._client) == null ? void 0 : I.userID) ?? null;
434
434
  await e.hide(C, !1), r && await r(e), u == null || u();
435
435
  } catch (C) {
436
436
  console.error(`[${h}] Failed to leave conversation`, C);
@@ -440,28 +440,28 @@ const _e = ({
440
440
  }
441
441
  },
442
442
  handleBlockUser: async () => {
443
- var S, C, A;
443
+ var I, C, S;
444
444
  if (!(T || !m)) {
445
- l == null || l(), g && console.log(`[${h}] Block member`, (S = t == null ? void 0 : t.user) == null ? void 0 : S.id), L(!0);
445
+ l == null || l(), g && console.log(`[${h}] Block member`, (I = t == null ? void 0 : t.user) == null ? void 0 : I.id), A(!0);
446
446
  try {
447
- await m.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), u == null || u();
447
+ await m.blockUser((C = t == null ? void 0 : t.user) == null ? void 0 : C.id), i && await i((S = t == null ? void 0 : t.user) == null ? void 0 : S.id), u == null || u();
448
448
  } catch (O) {
449
449
  console.error(`[${h}] Failed to block member`, O);
450
450
  } finally {
451
- L(!1);
451
+ A(!1);
452
452
  }
453
453
  }
454
454
  },
455
455
  handleUnblockUser: async () => {
456
- var S, C, A;
456
+ var I, C, S;
457
457
  if (!(T || !m)) {
458
- l == null || l(), g && console.log(`[${h}] Unblock member`, (S = t == null ? void 0 : t.user) == null ? void 0 : S.id), L(!0);
458
+ l == null || l(), g && console.log(`[${h}] Unblock member`, (I = t == null ? void 0 : t.user) == null ? void 0 : I.id), A(!0);
459
459
  try {
460
- await m.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), u == null || u();
460
+ await m.unBlockUser((C = t == null ? void 0 : t.user) == null ? void 0 : C.id), i && await i((S = t == null ? void 0 : t.user) == null ? void 0 : S.id), u == null || u();
461
461
  } catch (O) {
462
462
  console.error(`[${h}] Failed to unblock member`, O);
463
463
  } finally {
464
- L(!1);
464
+ A(!1);
465
465
  }
466
466
  }
467
467
  },
@@ -469,7 +469,7 @@ const _e = ({
469
469
  d == null || d(), u == null || u(), window.open(Ea, "_blank", "noopener,noreferrer");
470
470
  }
471
471
  };
472
- }, Ne = ({
472
+ }, ke = ({
473
473
  variant: e = "default",
474
474
  className: t,
475
475
  children: s,
@@ -478,7 +478,7 @@ const _e = ({
478
478
  "button",
479
479
  {
480
480
  type: "button",
481
- className: N(
481
+ className: k(
482
482
  "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",
483
483
  e === "danger" ? "text-danger hover:bg-danger/50" : "text-charcoal hover:bg-sand",
484
484
  t
@@ -500,14 +500,14 @@ const _e = ({
500
500
  customChannelActions: h,
501
501
  triggerClassName: m
502
502
  }) => {
503
- const [g, c] = $(!1), p = V(null), w = rs(), v = K(() => c(!1), []), {
503
+ const [g, c] = $(!1), p = V(null), w = rs(), v = X(() => c(!1), []), {
504
504
  isParticipantBlocked: x,
505
505
  isCheckingBlockedStatus: b,
506
506
  isLeaving: y,
507
507
  isUpdatingBlockStatus: _,
508
508
  handleLeaveConversation: T,
509
- handleBlockUser: L,
510
- handleUnblockUser: E,
509
+ handleBlockUser: A,
510
+ handleUnblockUser: R,
511
511
  handleReportUser: z
512
512
  } = Ia({
513
513
  channel: e,
@@ -522,15 +522,15 @@ const _e = ({
522
522
  onActionComplete: v,
523
523
  logLabel: "ChannelActionsMenu"
524
524
  });
525
- return W(() => {
525
+ return K(() => {
526
526
  if (!g) return;
527
- const R = (M) => {
528
- p.current && !p.current.contains(M.target) && c(!1);
529
- }, I = (M) => {
530
- M.key === "Escape" && c(!1);
527
+ const L = (D) => {
528
+ p.current && !p.current.contains(D.target) && c(!1);
529
+ }, E = (D) => {
530
+ D.key === "Escape" && c(!1);
531
531
  };
532
- return document.addEventListener("mousedown", R), document.addEventListener("keydown", I), () => {
533
- document.removeEventListener("mousedown", R), document.removeEventListener("keydown", I);
532
+ return document.addEventListener("mousedown", L), document.addEventListener("keydown", E), () => {
533
+ document.removeEventListener("mousedown", L), document.removeEventListener("keydown", E);
534
534
  };
535
535
  }, [g]), !t || !(s || a || r || !!h) ? null : /* @__PURE__ */ f("div", { ref: p, className: "relative", children: [
536
536
  /* @__PURE__ */ f(
@@ -541,7 +541,7 @@ const _e = ({
541
541
  "aria-haspopup": "true",
542
542
  "aria-expanded": g,
543
543
  "aria-controls": g ? w : void 0,
544
- onClick: () => c((R) => !R),
544
+ onClick: () => c((L) => !L),
545
545
  children: [
546
546
  /* @__PURE__ */ n(Ks, { className: "size-5 text-black/90" }),
547
547
  /* @__PURE__ */ n("span", { className: "sr-only", children: "More options" })
@@ -553,19 +553,19 @@ const _e = ({
553
553
  {
554
554
  id: w,
555
555
  "aria-label": "Conversation options",
556
- className: N(
556
+ className: k(
557
557
  "absolute right-0 top-full z-50 mt-2 w-56 overflow-hidden",
558
558
  "rounded-lg border border-sand bg-white p-1 shadow-max-elevation-light"
559
559
  ),
560
560
  children: /* @__PURE__ */ f("ul", { className: "flex flex-col gap-1", children: [
561
561
  s && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ f(
562
- Ne,
562
+ ke,
563
563
  {
564
564
  onClick: T,
565
565
  disabled: y,
566
566
  "aria-busy": y,
567
567
  children: [
568
- y ? /* @__PURE__ */ n(Oe, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Xs, { className: "h-5 w-5" }),
568
+ y ? /* @__PURE__ */ n(Pe, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Xs, { className: "h-5 w-5" }),
569
569
  /* @__PURE__ */ n("span", { children: "Delete Conversation" })
570
570
  ]
571
571
  }
@@ -573,34 +573,34 @@ const _e = ({
573
573
  a && /* @__PURE__ */ n("li", { children: b ? (
574
574
  // Block status not yet resolved — show a disabled placeholder
575
575
  // so a premature click can't act on a stale block state.
576
- /* @__PURE__ */ f(Ne, { disabled: !0, "aria-busy": !0, children: [
577
- /* @__PURE__ */ n(Oe, { className: "h-5 w-5 animate-spin" }),
576
+ /* @__PURE__ */ f(ke, { disabled: !0, "aria-busy": !0, children: [
577
+ /* @__PURE__ */ n(Pe, { className: "h-5 w-5 animate-spin" }),
578
578
  /* @__PURE__ */ n("span", { children: "Block" })
579
579
  ] })
580
580
  ) : x ? /* @__PURE__ */ f(
581
- Ne,
581
+ ke,
582
582
  {
583
- onClick: E,
583
+ onClick: R,
584
584
  disabled: _,
585
585
  "aria-busy": _,
586
586
  children: [
587
- _ ? /* @__PURE__ */ n(Oe, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Wt, { className: "h-5 w-5" }),
587
+ _ ? /* @__PURE__ */ n(Pe, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Wt, { className: "h-5 w-5" }),
588
588
  /* @__PURE__ */ n("span", { children: "Unblock" })
589
589
  ]
590
590
  }
591
591
  ) : /* @__PURE__ */ f(
592
- Ne,
592
+ ke,
593
593
  {
594
- onClick: L,
594
+ onClick: A,
595
595
  disabled: _,
596
596
  "aria-busy": _,
597
597
  children: [
598
- _ ? /* @__PURE__ */ n(Oe, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Wt, { className: "h-5 w-5" }),
598
+ _ ? /* @__PURE__ */ n(Pe, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Wt, { className: "h-5 w-5" }),
599
599
  /* @__PURE__ */ n("span", { children: "Block" })
600
600
  ]
601
601
  }
602
602
  ) }),
603
- r && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ f(Ne, { variant: "danger", onClick: z, children: [
603
+ r && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ f(ke, { variant: "danger", onClick: z, children: [
604
604
  /* @__PURE__ */ n(fn, { className: "h-5 w-5" }),
605
605
  /* @__PURE__ */ n("span", { children: "Report" })
606
606
  ] }) }),
@@ -609,7 +609,7 @@ const _e = ({
609
609
  }
610
610
  )
611
611
  ] });
612
- }, qe = "flex size-10 flex-shrink-0 items-center justify-center rounded-full bg-white/65 shadow-[0px_4px_8px_0px_rgba(0,0,0,0.06),0px_0px_0px_1px_rgba(0,0,0,0.04)] backdrop-blur-[40px] transition-filter duration-150 hover:brightness-95 aria-expanded:brightness-95 focus-ring", Aa = "CUSTOMER_PAID", Ra = (e) => typeof e == "string" && e.trim().replace(/[\s-]+/g, "_").toUpperCase() === Aa, La = ({
612
+ }, Ze = "flex size-10 flex-shrink-0 items-center justify-center rounded-full bg-white/65 shadow-[0px_4px_8px_0px_rgba(0,0,0,0.06),0px_0px_0px_1px_rgba(0,0,0,0.04)] backdrop-blur-[40px] transition-filter duration-150 hover:brightness-95 aria-expanded:brightness-95 focus-ring", Aa = "CUSTOMER_PAID", Ra = (e) => typeof e == "string" && e.trim().replace(/[\s-]+/g, "_").toUpperCase() === Aa, La = ({
613
613
  className: e,
614
614
  onBack: t,
615
615
  showBackButton: s,
@@ -627,29 +627,29 @@ const _e = ({
627
627
  showChannelInfo: p = !0,
628
628
  onParticipantNameClick: w
629
629
  }) => {
630
- var I, M, S, C;
631
- const { channel: v } = we(), { client: x } = He(), b = P.useMemo(
630
+ var E, D, I, C;
631
+ const { channel: v } = _e(), { client: x } = Ve(), b = P.useMemo(
632
632
  () => {
633
- var A;
633
+ var S;
634
634
  return _n(
635
- (A = v.state) == null ? void 0 : A.members,
635
+ (S = v.state) == null ? void 0 : S.members,
636
636
  x == null ? void 0 : x.userID,
637
637
  v.type
638
638
  );
639
639
  },
640
- [(I = v.state) == null ? void 0 : I.members, x == null ? void 0 : x.userID, v.type]
641
- ), y = yn(b == null ? void 0 : b.user), _ = (M = b == null ? void 0 : b.user) == null ? void 0 : M.image, T = wn(v), L = Ra((S = v.data) == null ? void 0 : S.customer_tag) && (b == null ? void 0 : b.is_follower) === !0, E = a && T, z = L || E || !!w, F = async () => {
640
+ [(E = v.state) == null ? void 0 : E.members, x == null ? void 0 : x.userID, v.type]
641
+ ), y = yn(b == null ? void 0 : b.user), _ = (D = b == null ? void 0 : b.user) == null ? void 0 : D.image, T = wn(v), A = Ra((I = v.data) == null ? void 0 : I.customer_tag) && (b == null ? void 0 : b.is_follower) === !0, R = a && T, z = A || R || !!w, F = async () => {
642
642
  try {
643
643
  T ? await v.unpin() : await v.pin();
644
- } catch (A) {
644
+ } catch (S) {
645
645
  console.error(
646
646
  "[ChannelHeaderRedesign] Failed to update pinned status:",
647
- A
647
+ S
648
648
  );
649
649
  }
650
- }, R = /* @__PURE__ */ f(q, { children: [
650
+ }, L = /* @__PURE__ */ f(q, { children: [
651
651
  /* @__PURE__ */ n(
652
- _e,
652
+ ye,
653
653
  {
654
654
  id: ((C = b == null ? void 0 : b.user) == null ? void 0 : C.id) || v.id || "unknown",
655
655
  name: y,
@@ -662,14 +662,14 @@ const _e = ({
662
662
  /* @__PURE__ */ n(
663
663
  "span",
664
664
  {
665
- className: N(
665
+ className: k(
666
666
  "relative z-10 flex max-w-full flex-col items-center justify-center rounded-full border border-white/10 bg-white/65 py-1.5 shadow-[0px_0px_0px_0px_rgba(0,0,0,0.04),0px_1px_2px_0px_rgba(0,0,0,0.04),0px_8px_32px_0px_rgba(0,0,0,0.1)] backdrop-blur-[2px] transition-filter duration-150 group-hover:brightness-95",
667
667
  z ? "pl-3 pr-2" : "px-3"
668
668
  ),
669
669
  children: /* @__PURE__ */ f("span", { className: "flex max-w-full items-center justify-center", children: [
670
670
  /* @__PURE__ */ n("span", { className: "min-w-0 truncate text-sm font-bold leading-[1.43] tracking-[0.28px] text-black/90", children: y }),
671
671
  z && /* @__PURE__ */ f("span", { className: "ml-2 flex gap-1", children: [
672
- L && /* @__PURE__ */ n(
672
+ A && /* @__PURE__ */ n(
673
673
  "span",
674
674
  {
675
675
  "aria-label": "Paid customer",
@@ -677,12 +677,12 @@ const _e = ({
677
677
  children: /* @__PURE__ */ n(qs, { className: "size-2.5", weight: "bold" })
678
678
  }
679
679
  ),
680
- E && /* @__PURE__ */ n("span", { className: "messaging-header-star-badge flex overflow-hidden", children: /* @__PURE__ */ n(
680
+ R && /* @__PURE__ */ n("span", { className: "messaging-header-star-badge flex overflow-hidden", children: /* @__PURE__ */ n(
681
681
  "span",
682
682
  {
683
683
  "aria-label": "Starred conversation",
684
684
  className: "flex size-4 shrink-0 items-center justify-center rounded-full bg-[#FFD60A] text-white",
685
- children: /* @__PURE__ */ n(at, { className: "size-2.5", weight: "fill" })
685
+ children: /* @__PURE__ */ n(rt, { className: "size-2.5", weight: "fill" })
686
686
  }
687
687
  ) }),
688
688
  w && /* @__PURE__ */ n(
@@ -701,7 +701,7 @@ const _e = ({
701
701
  return /* @__PURE__ */ n(
702
702
  "div",
703
703
  {
704
- className: N(
704
+ className: k(
705
705
  "@container bg-[linear-gradient(180deg,#FBFAF9_0%,rgba(251,250,249,0.92)_58%,rgba(251,250,249,0)_100%)]",
706
706
  e
707
707
  ),
@@ -709,8 +709,8 @@ const _e = ({
709
709
  /* @__PURE__ */ n("div", { className: "flex items-start", children: s && /* @__PURE__ */ n(
710
710
  "button",
711
711
  {
712
- className: N(
713
- qe,
712
+ className: k(
713
+ Ze,
714
714
  "messaging-channel-view-back-button-mobile messaging-channel-view-back-button-desktop"
715
715
  ),
716
716
  onClick: t || (() => {
@@ -727,22 +727,22 @@ const _e = ({
727
727
  onClick: w,
728
728
  "aria-label": `View details for ${y}`,
729
729
  className: "group flex min-w-0 max-w-full appearance-none flex-col items-center border-0 bg-transparent px-2 focus-ring focus-visible:outline-none",
730
- children: R
730
+ children: L
731
731
  }
732
- ) : /* @__PURE__ */ n("div", { className: "flex min-w-0 max-w-full flex-col items-center px-2", children: R }) }),
732
+ ) : /* @__PURE__ */ n("div", { className: "flex min-w-0 max-w-full flex-col items-center px-2", children: L }) }),
733
733
  /* @__PURE__ */ f("div", { className: "flex items-start justify-end gap-2", children: [
734
734
  a && /* @__PURE__ */ n(
735
735
  "button",
736
736
  {
737
- className: qe,
737
+ className: Ze,
738
738
  onClick: F,
739
739
  type: "button",
740
740
  "aria-pressed": T,
741
741
  "aria-label": T ? "Unstar conversation" : "Star conversation",
742
742
  children: /* @__PURE__ */ n(
743
- at,
743
+ rt,
744
744
  {
745
- className: N("size-5", {
745
+ className: k("size-5", {
746
746
  "text-[#FFD60A]": T,
747
747
  "text-black/90": !T
748
748
  }),
@@ -765,7 +765,7 @@ const _e = ({
765
765
  onBlockParticipantClick: h,
766
766
  onReportParticipantClick: m,
767
767
  customChannelActions: g,
768
- triggerClassName: qe
768
+ triggerClassName: Ze
769
769
  }
770
770
  ))
771
771
  ] })
@@ -797,7 +797,7 @@ function Fa(e) {
797
797
  (t) => e === t || e.endsWith(`.${t}`)
798
798
  );
799
799
  }
800
- function ce(e) {
800
+ function de(e) {
801
801
  const t = e == null ? void 0 : e.trim();
802
802
  if (!t) return;
803
803
  const s = Pa(t);
@@ -815,7 +815,7 @@ const za = [
815
815
  [/plain|rtf/, "text"],
816
816
  [/markdown/, "markdown"]
817
817
  ];
818
- function de(e) {
818
+ function ue(e) {
819
819
  return e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : e.startsWith("image/") ? "image" : "document";
820
820
  }
821
821
  function Cn(e) {
@@ -841,10 +841,10 @@ const $a = {
841
841
  generic: pn
842
842
  };
843
843
  function Ua(e) {
844
- const t = de(e);
844
+ const t = ue(e);
845
845
  return t !== "document" ? $a[t] : Ba[Cn(e)];
846
846
  }
847
- function ve(e, t) {
847
+ function xe(e, t) {
848
848
  return P.createElement(Ua(e), t);
849
849
  }
850
850
  const ja = (e) => {
@@ -862,83 +862,83 @@ const ja = (e) => {
862
862
  muted: d = !1,
863
863
  onContainerClick: u
864
864
  }) => {
865
- const h = de(t), m = V(null), g = V(null), c = V(null), p = V(r), [w, v] = $(a), [x, b] = $(0), [y, _] = $(!1), [T, L] = $(!1), [E, z] = $(!1), [F, R] = $(!1), [I, M] = $(!0), [S, C] = $(null), A = K(() => {
865
+ const h = ue(t), m = V(null), g = V(null), c = V(null), p = V(r), [w, v] = $(a), [x, b] = $(0), [y, _] = $(!1), [T, A] = $(!1), [R, z] = $(!1), [F, L] = $(!1), [E, D] = $(!0), [I, C] = $(null), S = X(() => {
866
866
  z(!1), v(!0);
867
- }, []), O = K((k) => {
868
- const D = g.current;
869
- if (!D) return 0;
870
- const Y = D.getBoundingClientRect();
867
+ }, []), O = X((N) => {
868
+ const M = g.current;
869
+ if (!M) return 0;
870
+ const Y = M.getBoundingClientRect();
871
871
  return Math.max(
872
872
  0,
873
- Math.min(1, (ja(k) - Y.left) / Y.width)
873
+ Math.min(1, (ja(N) - Y.left) / Y.width)
874
874
  );
875
- }, []), B = K((k) => {
876
- const D = m.current;
877
- D && D.duration && (D.currentTime = k * D.duration);
878
- }, []), G = (k) => {
879
- k.stopPropagation(), _(!0);
880
- const D = O(k);
881
- b(D), B(D);
882
- }, ee = K(
883
- (k) => {
884
- k.key === "ArrowRight" && B(Math.min(1, x + 0.05)), k.key === "ArrowLeft" && B(Math.max(0, x - 0.05));
875
+ }, []), U = X((N) => {
876
+ const M = m.current;
877
+ M && M.duration && (M.currentTime = N * M.duration);
878
+ }, []), j = (N) => {
879
+ N.stopPropagation(), _(!0);
880
+ const M = O(N);
881
+ b(M), U(M);
882
+ }, J = X(
883
+ (N) => {
884
+ N.key === "ArrowRight" && U(Math.min(1, x + 0.05)), N.key === "ArrowLeft" && U(Math.max(0, x - 0.05));
885
885
  },
886
- [B, x]
886
+ [U, x]
887
887
  );
888
- W(() => {
888
+ K(() => {
889
889
  r !== void 0 && r !== p.current && (p.current = r, v(r));
890
- }, [r]), W(() => {
890
+ }, [r]), K(() => {
891
891
  if (!w) {
892
892
  c.current !== null && (cancelAnimationFrame(c.current), c.current = null);
893
893
  return;
894
894
  }
895
- const k = () => {
896
- const D = m.current;
897
- D && D.duration && !y && b(D.currentTime / D.duration), c.current = requestAnimationFrame(k);
895
+ const N = () => {
896
+ const M = m.current;
897
+ M && M.duration && !y && b(M.currentTime / M.duration), c.current = requestAnimationFrame(N);
898
898
  };
899
- return c.current = requestAnimationFrame(k), () => {
899
+ return c.current = requestAnimationFrame(N), () => {
900
900
  c.current !== null && cancelAnimationFrame(c.current);
901
901
  };
902
- }, [w, y]), W(() => {
903
- const k = m.current;
904
- k && (w ? k.play().catch((D) => {
902
+ }, [w, y]), K(() => {
903
+ const N = m.current;
904
+ N && (w ? N.play().catch((M) => {
905
905
  v(!1), z(!0);
906
- }) : k.pause());
907
- }, [w]), W(() => {
906
+ }) : N.pause());
907
+ }, [w]), K(() => {
908
908
  if (!y) return;
909
- const k = (Y) => b(O(Y)), D = (Y) => {
910
- _(!1), B(O(Y));
909
+ const N = (Y) => b(O(Y)), M = (Y) => {
910
+ _(!1), U(O(Y));
911
911
  };
912
- return window.addEventListener("mousemove", k), window.addEventListener("mouseup", D), window.addEventListener("touchmove", k, { passive: !0 }), window.addEventListener("touchend", D), () => {
913
- window.removeEventListener("mousemove", k), window.removeEventListener("mouseup", D), window.removeEventListener("touchmove", k), window.removeEventListener("touchend", D);
912
+ return window.addEventListener("mousemove", N), window.addEventListener("mouseup", M), window.addEventListener("touchmove", N, { passive: !0 }), window.addEventListener("touchend", M), () => {
913
+ window.removeEventListener("mousemove", N), window.removeEventListener("mouseup", M), window.removeEventListener("touchmove", N), window.removeEventListener("touchend", M);
914
914
  };
915
- }, [y, O, B]);
916
- const Z = S ? { aspectRatio: String(S) } : void 0, J = S ? "" : " aspect-video", j = Math.round(x * 100);
915
+ }, [y, O, U]);
916
+ const Z = I ? { aspectRatio: String(I) } : void 0, Q = I ? "" : " aspect-video", G = Math.round(x * 100);
917
917
  return /* @__PURE__ */ f(
918
918
  "div",
919
919
  {
920
920
  role: "button",
921
921
  tabIndex: 0,
922
- className: `relative cursor-pointer overflow-hidden bg-black ${J}`,
922
+ className: `relative cursor-pointer overflow-hidden bg-black ${Q}`,
923
923
  style: Z,
924
- onClick: (k) => {
924
+ onClick: (N) => {
925
925
  if (u) {
926
- u(k);
926
+ u(N);
927
927
  return;
928
928
  }
929
- E || o && v((D) => !D);
929
+ R || o && v((M) => !M);
930
930
  },
931
- onKeyDown: (k) => {
932
- if (!(k.key !== "Enter" && k.key !== " ")) {
933
- if (k.preventDefault(), u) {
934
- u(k);
931
+ onKeyDown: (N) => {
932
+ if (!(N.key !== "Enter" && N.key !== " ")) {
933
+ if (N.preventDefault(), u) {
934
+ u(N);
935
935
  return;
936
936
  }
937
- E || o && v((D) => !D);
937
+ R || o && v((M) => !M);
938
938
  }
939
939
  },
940
940
  children: [
941
- s && (h === "audio" || I) && /* @__PURE__ */ n(
941
+ s && (h === "audio" || E) && /* @__PURE__ */ n(
942
942
  "img",
943
943
  {
944
944
  src: s,
@@ -946,7 +946,7 @@ const ja = (e) => {
946
946
  className: "absolute inset-0 h-full w-full object-cover"
947
947
  }
948
948
  ),
949
- !s && (h === "audio" || I) && /* @__PURE__ */ n("div", { className: "absolute inset-0 flex items-center justify-center", children: ve(t, {
949
+ !s && (h === "audio" || E) && /* @__PURE__ */ n("div", { className: "absolute inset-0 flex items-center justify-center", children: xe(t, {
950
950
  className: "size-12 text-black/20",
951
951
  weight: "regular"
952
952
  }) }),
@@ -958,11 +958,11 @@ const ja = (e) => {
958
958
  loop: i,
959
959
  muted: d,
960
960
  style: { width: "100%", height: "100%" },
961
- onLoadStart: () => R(!0),
961
+ onLoadStart: () => L(!0),
962
962
  onCanPlay: () => {
963
- R(!1), M(!1);
963
+ L(!1), D(!1);
964
964
  },
965
- onWaiting: () => R(!0),
965
+ onWaiting: () => L(!0),
966
966
  onPlay: () => z(!1),
967
967
  onEnded: () => {
968
968
  i || (v(!1), b(0));
@@ -978,15 +978,15 @@ const ja = (e) => {
978
978
  muted: d,
979
979
  playsInline: !0,
980
980
  style: { width: "100%", height: "100%" },
981
- onLoadStart: () => R(!0),
981
+ onLoadStart: () => L(!0),
982
982
  onCanPlay: () => {
983
- R(!1), M(!1);
983
+ L(!1), D(!1);
984
984
  },
985
- onWaiting: () => R(!0),
985
+ onWaiting: () => L(!0),
986
986
  onPlay: () => z(!1),
987
987
  onLoadedMetadata: () => {
988
- const k = m.current;
989
- k instanceof HTMLVideoElement && k.videoWidth && k.videoHeight && C(k.videoWidth / k.videoHeight);
988
+ const N = m.current;
989
+ N instanceof HTMLVideoElement && N.videoWidth && N.videoHeight && C(N.videoWidth / N.videoHeight);
990
990
  },
991
991
  onEnded: () => {
992
992
  i || (v(!1), b(0));
@@ -994,27 +994,27 @@ const ja = (e) => {
994
994
  children: /* @__PURE__ */ n("track", { kind: "captions" })
995
995
  }
996
996
  ) }),
997
- F && !E && /* @__PURE__ */ n("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ n(
998
- be,
997
+ F && !R && /* @__PURE__ */ n("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ n(
998
+ ve,
999
999
  {
1000
1000
  className: "size-8 animate-spin text-white/80",
1001
1001
  weight: "bold"
1002
1002
  }
1003
1003
  ) }),
1004
- E && !o && /* @__PURE__ */ n(
1004
+ R && !o && /* @__PURE__ */ n(
1005
1005
  "div",
1006
1006
  {
1007
1007
  className: "absolute inset-0 z-30 flex cursor-pointer items-center justify-center bg-black/35",
1008
1008
  role: "button",
1009
1009
  tabIndex: 0,
1010
1010
  "aria-label": "Play preview",
1011
- onClick: (k) => {
1012
- k.stopPropagation(), A();
1011
+ onClick: (N) => {
1012
+ N.stopPropagation(), S();
1013
1013
  },
1014
- onKeyDown: (k) => {
1015
- k.key !== "Enter" && k.key !== " " || (k.preventDefault(), k.stopPropagation(), A());
1014
+ onKeyDown: (N) => {
1015
+ N.key !== "Enter" && N.key !== " " || (N.preventDefault(), N.stopPropagation(), S());
1016
1016
  },
1017
- 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(rt, { className: "size-9 translate-x-0.5", weight: "fill" }) })
1017
+ 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(it, { className: "size-9 translate-x-0.5", weight: "fill" }) })
1018
1018
  }
1019
1019
  ),
1020
1020
  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(
@@ -1022,21 +1022,21 @@ const ja = (e) => {
1022
1022
  {
1023
1023
  role: "slider",
1024
1024
  "aria-label": "Playback position",
1025
- "aria-valuenow": j,
1025
+ "aria-valuenow": G,
1026
1026
  "aria-valuemin": 0,
1027
1027
  "aria-valuemax": 100,
1028
1028
  tabIndex: 0,
1029
1029
  ref: g,
1030
1030
  className: "relative flex h-4 w-full cursor-pointer items-center",
1031
- onMouseDown: G,
1032
- onTouchStart: G,
1033
- onClick: (k) => k.stopPropagation(),
1034
- onKeyDown: ee,
1031
+ onMouseDown: j,
1032
+ onTouchStart: j,
1033
+ onClick: (N) => N.stopPropagation(),
1034
+ onKeyDown: J,
1035
1035
  children: /* @__PURE__ */ n("div", { className: "w-full overflow-hidden rounded-full bg-white/30 h-1", children: /* @__PURE__ */ n(
1036
1036
  "div",
1037
1037
  {
1038
1038
  className: "h-full rounded-full bg-white",
1039
- style: { width: `${j}%` }
1039
+ style: { width: `${G}%` }
1040
1040
  }
1041
1041
  ) })
1042
1042
  }
@@ -1046,12 +1046,12 @@ const ja = (e) => {
1046
1046
  "button",
1047
1047
  {
1048
1048
  type: "button",
1049
- onClick: (k) => {
1050
- k.stopPropagation(), v((D) => !D);
1049
+ onClick: (N) => {
1050
+ N.stopPropagation(), v((M) => !M);
1051
1051
  },
1052
1052
  className: "shrink-0 text-white",
1053
1053
  "aria-label": w ? "Pause" : "Play",
1054
- children: w ? /* @__PURE__ */ n(oa, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ n(rt, { className: "size-5 translate-x-px", weight: "fill" })
1054
+ children: w ? /* @__PURE__ */ n(oa, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ n(it, { className: "size-5 translate-x-px", weight: "fill" })
1055
1055
  }
1056
1056
  ),
1057
1057
  /* @__PURE__ */ f(
@@ -1059,18 +1059,18 @@ const ja = (e) => {
1059
1059
  {
1060
1060
  role: "slider",
1061
1061
  "aria-label": "Playback position",
1062
- "aria-valuenow": j,
1062
+ "aria-valuenow": G,
1063
1063
  "aria-valuemin": 0,
1064
1064
  "aria-valuemax": 100,
1065
1065
  tabIndex: 0,
1066
1066
  ref: g,
1067
1067
  className: "relative flex h-4 w-full cursor-pointer items-center",
1068
- onMouseDown: G,
1069
- onTouchStart: G,
1070
- onClick: (k) => k.stopPropagation(),
1071
- onMouseEnter: () => L(!0),
1072
- onMouseLeave: () => L(!1),
1073
- onKeyDown: ee,
1068
+ onMouseDown: j,
1069
+ onTouchStart: j,
1070
+ onClick: (N) => N.stopPropagation(),
1071
+ onMouseEnter: () => A(!0),
1072
+ onMouseLeave: () => A(!1),
1073
+ onKeyDown: J,
1074
1074
  children: [
1075
1075
  /* @__PURE__ */ n(
1076
1076
  "div",
@@ -1080,7 +1080,7 @@ const ja = (e) => {
1080
1080
  "div",
1081
1081
  {
1082
1082
  className: "h-full rounded-full bg-white",
1083
- style: { width: `${j}%` }
1083
+ style: { width: `${G}%` }
1084
1084
  }
1085
1085
  )
1086
1086
  }
@@ -1089,7 +1089,7 @@ const ja = (e) => {
1089
1089
  "div",
1090
1090
  {
1091
1091
  className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${T || y ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
1092
- style: { left: `${j}%` }
1092
+ style: { left: `${G}%` }
1093
1093
  }
1094
1094
  )
1095
1095
  ]
@@ -1108,7 +1108,7 @@ const ja = (e) => {
1108
1108
  mediaPlayerProps: i,
1109
1109
  containedImage: o = !1
1110
1110
  }) => {
1111
- const l = de(e), [d, u] = $(!1), h = ce(t), m = ce(s);
1111
+ const l = ue(e), [d, u] = $(!1), h = de(t), m = de(s);
1112
1112
  return t && (l === "video" || l === "audio") ? /* @__PURE__ */ n(
1113
1113
  Ha,
1114
1114
  {
@@ -1156,7 +1156,7 @@ const ja = (e) => {
1156
1156
  "div",
1157
1157
  {
1158
1158
  className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
1159
- children: ve(e, {
1159
+ children: xe(e, {
1160
1160
  className: Zt(r),
1161
1161
  weight: "regular"
1162
1162
  })
@@ -1173,7 +1173,7 @@ const ja = (e) => {
1173
1173
  "div",
1174
1174
  {
1175
1175
  className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
1176
- children: ve(e, {
1176
+ children: xe(e, {
1177
1177
  className: Zt(r),
1178
1178
  weight: "regular"
1179
1179
  })
@@ -1199,7 +1199,7 @@ const ja = (e) => {
1199
1199
  {
1200
1200
  ref: h,
1201
1201
  "data-testid": m,
1202
- className: N(
1202
+ className: k(
1203
1203
  "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)]",
1204
1204
  g ? "bg-[#1e2330]" : "bg-white"
1205
1205
  ),
@@ -1211,7 +1211,7 @@ const ja = (e) => {
1211
1211
  c.trim() !== "" && /* @__PURE__ */ n(
1212
1212
  "p",
1213
1213
  {
1214
- className: N("mb-0.5 truncate text-base font-medium", {
1214
+ className: k("mb-0.5 truncate text-base font-medium", {
1215
1215
  "text-black": !g,
1216
1216
  "text-white/30": g && p,
1217
1217
  "text-white": g && !p
@@ -1220,8 +1220,8 @@ const ja = (e) => {
1220
1220
  }
1221
1221
  ),
1222
1222
  /* @__PURE__ */ f("div", { className: "flex flex-wrap items-center gap-1", children: [
1223
- ve(r, {
1224
- className: N(
1223
+ xe(r, {
1224
+ className: k(
1225
1225
  "size-5 shrink-0",
1226
1226
  g ? "text-white/55" : "text-black/55"
1227
1227
  ),
@@ -1230,7 +1230,7 @@ const ja = (e) => {
1230
1230
  i != null && i !== "" && /* @__PURE__ */ n(
1231
1231
  "span",
1232
1232
  {
1233
- className: N(
1233
+ className: k(
1234
1234
  "text-xs font-medium",
1235
1235
  g ? "text-white/55" : "text-black/55"
1236
1236
  ),
@@ -1248,7 +1248,7 @@ const ja = (e) => {
1248
1248
  function In(e) {
1249
1249
  return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
1250
1250
  }
1251
- function ct(e) {
1251
+ function dt(e) {
1252
1252
  return `w-[280px] select-none overflow-hidden rounded-[24px] ${e ? "bg-[#1e2330]" : "bg-[#F3F3F1]"} shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]`;
1253
1253
  }
1254
1254
  function Ga(e) {
@@ -1266,12 +1266,12 @@ function Ka(e) {
1266
1266
  function Xa(e) {
1267
1267
  return e ? "text-white/20" : "text-black/20";
1268
1268
  }
1269
- const dt = ({ attachment: e, isMyMessage: t }) => {
1269
+ const ut = ({ attachment: e, isMyMessage: t }) => {
1270
1270
  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, u = /* @__PURE__ */ f(P.Fragment, { children: [
1271
1271
  /* @__PURE__ */ n("div", { className: "p-2", children: r ? /* @__PURE__ */ n(
1272
1272
  "img",
1273
1273
  {
1274
- src: ce(r) ?? r,
1274
+ src: de(r) ?? r,
1275
1275
  alt: s ?? "",
1276
1276
  className: "aspect-video w-full rounded-[20px] object-cover"
1277
1277
  }
@@ -1317,13 +1317,13 @@ const dt = ({ attachment: e, isMyMessage: t }) => {
1317
1317
  }
1318
1318
  ) : /* @__PURE__ */ n("div", { className: "block", children: u });
1319
1319
  };
1320
- function Ve(e) {
1320
+ function Ge(e) {
1321
1321
  var t;
1322
1322
  return e.type === "link" || !!((t = e.og_scrape_url) != null && t.trim()) && !e.asset_url;
1323
1323
  }
1324
- function ut(e) {
1324
+ function mt(e) {
1325
1325
  var t;
1326
- return (t = e.attachments) == null ? void 0 : t.find(Ve);
1326
+ return (t = e.attachments) == null ? void 0 : t.find(Ge);
1327
1327
  }
1328
1328
  async function qa(e, t) {
1329
1329
  let s;
@@ -1358,19 +1358,19 @@ const Za = ({
1358
1358
  disabled: s,
1359
1359
  className: "mt-3 inline-flex h-10 w-full items-center justify-center gap-2 rounded-full bg-[#121110] px-4 text-sm font-medium leading-none text-white hover:bg-[#2a2928] disabled:opacity-70",
1360
1360
  children: s ? /* @__PURE__ */ n(
1361
- be,
1361
+ ve,
1362
1362
  {
1363
1363
  className: "size-4 animate-spin text-white",
1364
1364
  weight: "bold"
1365
1365
  }
1366
1366
  ) : /* @__PURE__ */ f(P.Fragment, { children: [
1367
- /* @__PURE__ */ n(Se, { className: "size-4 text-white", weight: "bold" }),
1367
+ /* @__PURE__ */ n(Ee, { className: "size-4 text-white", weight: "bold" }),
1368
1368
  "Download"
1369
1369
  ] })
1370
1370
  }
1371
1371
  );
1372
1372
  };
1373
- function mt(e) {
1373
+ function ht(e) {
1374
1374
  var m, g, c, p;
1375
1375
  const t = (m = e.attachments) == null ? void 0 : m.find(
1376
1376
  (w) => w.type === "video" && w.asset_url
@@ -1426,7 +1426,7 @@ const Tn = ({
1426
1426
  fileSize: a,
1427
1427
  thumbnailUrl: r
1428
1428
  }) => {
1429
- const i = de(t), o = a !== void 0 ? In(a) : void 0;
1429
+ const i = ue(t), o = a !== void 0 ? In(a) : void 0;
1430
1430
  return /* @__PURE__ */ n(
1431
1431
  En,
1432
1432
  {
@@ -1452,10 +1452,10 @@ const Tn = ({
1452
1452
  message: e,
1453
1453
  isMyMessage: t = !1
1454
1454
  }) => {
1455
- const s = ut(e), a = mt(e);
1455
+ const s = mt(e), a = ht(e);
1456
1456
  return !s && !a ? null : /* @__PURE__ */ f("div", { className: t ? "str-chat__message str-chat__message-simple str-chat__message--me str-chat__message-simple--me" : "str-chat__message str-chat__message-simple str-chat__message--other", "data-dd-privacy": "mask", children: [
1457
1457
  !t && e.user && /* @__PURE__ */ n(
1458
- _e,
1458
+ ye,
1459
1459
  {
1460
1460
  className: "str-chat__avatar str-chat__message-sender-avatar",
1461
1461
  id: e.user.id,
@@ -1479,8 +1479,8 @@ const Tn = ({
1479
1479
  overflow: "visible",
1480
1480
  background: "transparent"
1481
1481
  },
1482
- children: s ? /* @__PURE__ */ n("div", { className: ct(t), children: /* @__PURE__ */ n(
1483
- dt,
1482
+ children: s ? /* @__PURE__ */ n("div", { className: dt(t), children: /* @__PURE__ */ n(
1483
+ ut,
1484
1484
  {
1485
1485
  attachment: s,
1486
1486
  isMyMessage: t
@@ -1494,18 +1494,18 @@ const Tn = ({
1494
1494
  }, Qa = ({
1495
1495
  message: e
1496
1496
  }) => {
1497
- const t = ut(e);
1497
+ const t = mt(e);
1498
1498
  if (t)
1499
- return /* @__PURE__ */ n("div", { className: ct(!0), "data-dd-privacy": "mask", children: /* @__PURE__ */ n(dt, { attachment: t, isMyMessage: !0 }) });
1500
- const s = mt(e);
1499
+ return /* @__PURE__ */ n("div", { className: dt(!0), "data-dd-privacy": "mask", children: /* @__PURE__ */ n(ut, { attachment: t, isMyMessage: !0 }) });
1500
+ const s = ht(e);
1501
1501
  return s ? /* @__PURE__ */ n("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ n(Tn, { ...s }) }) : null;
1502
1502
  }, er = ({
1503
1503
  message: e
1504
1504
  }) => {
1505
- const t = ut(e);
1505
+ const t = mt(e);
1506
1506
  if (t)
1507
- return /* @__PURE__ */ n("div", { className: ct(!1), "data-dd-privacy": "mask", children: /* @__PURE__ */ n(dt, { attachment: t, isMyMessage: !1 }) });
1508
- const s = mt(e);
1507
+ return /* @__PURE__ */ n("div", { className: dt(!1), "data-dd-privacy": "mask", children: /* @__PURE__ */ n(ut, { attachment: t, isMyMessage: !1 }) });
1508
+ const s = ht(e);
1509
1509
  return s ? /* @__PURE__ */ n("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ n(An, { ...s }) }) : null;
1510
1510
  }, no = Object.assign(Ja, {
1511
1511
  Creator: Qa,
@@ -1514,17 +1514,17 @@ const Tn = ({
1514
1514
  isUnlocking: () => !1
1515
1515
  }, nr = {
1516
1516
  LockedAttachment: tr
1517
- }, Rn = je({}), so = Rn.Provider;
1517
+ }, Rn = He({}), so = Rn.Provider;
1518
1518
  function sr(e) {
1519
- return xe(Rn)[e] ?? nr[e];
1519
+ return we(Rn)[e] ?? nr[e];
1520
1520
  }
1521
- const ar = P.lazy(() => import("./Card-BzvDr-pU.js")), rr = P.lazy(() => import("./Card-Cy-pEAbc.js")), ir = () => /* @__PURE__ */ n(
1521
+ const ar = P.lazy(() => import("./Card-BzvDr-pU.js")), rr = P.lazy(() => import("./Card-CNOZoAGn.js")), ir = () => /* @__PURE__ */ n(
1522
1522
  "div",
1523
1523
  {
1524
1524
  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)]",
1525
1525
  "aria-hidden": !0
1526
1526
  }
1527
- ), Pe = (e) => /* @__PURE__ */ n(is, { fallback: /* @__PURE__ */ n(ir, {}), children: e.contentType === "text" ? /* @__PURE__ */ n(ar, { ...e }) : /* @__PURE__ */ n(rr, { ...e }) }), lr = ({ size: e = 15 }) => /* @__PURE__ */ n(
1527
+ ), Fe = (e) => /* @__PURE__ */ n(is, { fallback: /* @__PURE__ */ n(ir, {}), children: e.contentType === "text" ? /* @__PURE__ */ n(ar, { ...e }) : /* @__PURE__ */ n(rr, { ...e }) }), lr = ({ size: e = 15 }) => /* @__PURE__ */ n(
1528
1528
  "svg",
1529
1529
  {
1530
1530
  width: e,
@@ -1543,33 +1543,33 @@ const ar = P.lazy(() => import("./Card-BzvDr-pU.js")), rr = P.lazy(() => import(
1543
1543
  }
1544
1544
  ), or = (e) => {
1545
1545
  var t;
1546
- return ((t = e.metadata) == null ? void 0 : t.custom_type) === oe.TIP;
1546
+ return ((t = e.metadata) == null ? void 0 : t.custom_type) === ce.TIP;
1547
1547
  }, Ln = (e) => {
1548
1548
  var t;
1549
- return ((t = e.metadata) == null ? void 0 : t.custom_type) === oe.PAID;
1550
- }, ze = (e) => {
1549
+ return ((t = e.metadata) == null ? void 0 : t.custom_type) === ce.PAID;
1550
+ }, $e = (e) => {
1551
1551
  var t;
1552
- return ((t = e.metadata) == null ? void 0 : t.custom_type) === oe.CHATBOT;
1553
- }, ht = (e) => {
1552
+ return ((t = e.metadata) == null ? void 0 : t.custom_type) === ce.CHATBOT;
1553
+ }, ft = (e) => {
1554
1554
  var t;
1555
- return ((t = e.metadata) == null ? void 0 : t.custom_type) === oe.ATTACHMENT;
1555
+ return ((t = e.metadata) == null ? void 0 : t.custom_type) === ce.ATTACHMENT;
1556
1556
  }, cr = (e) => {
1557
1557
  var t;
1558
- return ht(e) && ((t = e.metadata) == null ? void 0 : t.attachment_content_type) === "text";
1558
+ return ft(e) && ((t = e.metadata) == null ? void 0 : t.attachment_content_type) === "text";
1559
1559
  }, dr = (e) => {
1560
1560
  var t;
1561
- return ht(e) && ((t = e.metadata) == null ? void 0 : t.attachment_content_type) !== "text";
1561
+ return ft(e) && ((t = e.metadata) == null ? void 0 : t.attachment_content_type) !== "text";
1562
1562
  }, Mn = (e) => or(e) || Ln(e), ur = (e) => {
1563
1563
  var t;
1564
1564
  return Mn(e) && !((t = e.text) != null && t.trim());
1565
- }, Ze = ({
1565
+ }, Je = ({
1566
1566
  message: e,
1567
1567
  standalone: t = !1,
1568
1568
  isMyMessage: s = !1,
1569
1569
  hasAttachment: a = !1
1570
1570
  }) => {
1571
1571
  var g;
1572
- const r = Mn(e), i = ze(e);
1572
+ const r = Mn(e), i = $e(e);
1573
1573
  if (!r && !i)
1574
1574
  return null;
1575
1575
  if (r) {
@@ -1599,7 +1599,7 @@ const ar = P.lazy(() => import("./Card-BzvDr-pU.js")), rr = P.lazy(() => import(
1599
1599
  }, Jt = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='23' fill='none'%3E%3Cpath fill='black' d='M0 0H15C15 10.1934 15.859 15.2345 19.168 21.4893C19.527 22.168 19.039 22.9917 18.274 22.9178C5.176 21.6506 0.32 6.0737 0 0Z'/%3E%3C/svg%3E") no-repeat center / 100% 100%`, mr = {
1600
1600
  me: "var(--str-chat__own-message-bubble-background-color, #1e2330)",
1601
1601
  other: "var(--str-chat__message-bubble-background-color, #f1f0ee)"
1602
- }, $e = ({ side: e }) => /* @__PURE__ */ n(
1602
+ }, Be = ({ side: e }) => /* @__PURE__ */ n(
1603
1603
  "span",
1604
1604
  {
1605
1605
  "aria-hidden": "true",
@@ -1614,7 +1614,7 @@ const ar = P.lazy(() => import("./Card-BzvDr-pU.js")), rr = P.lazy(() => import(
1614
1614
  mask: Jt
1615
1615
  }
1616
1616
  }
1617
- ), Dn = je(
1617
+ ), Dn = He(
1618
1618
  void 0
1619
1619
  ), hr = (e) => {
1620
1620
  var s;
@@ -1652,8 +1652,8 @@ const ar = P.lazy(() => import("./Card-BzvDr-pU.js")), rr = P.lazy(() => import(
1652
1652
  }, pr = (e, t) => {
1653
1653
  const s = fr(e, t), [a, r] = $(s);
1654
1654
  return gr(a, s) ? a : (r(s), s);
1655
- }, ft = () => {
1656
- const { message: e } = fe("SentMessageDeliveryStatus"), { messages: t } = we("SentMessageDeliveryStatus"), s = (() => {
1655
+ }, gt = () => {
1656
+ const { message: e } = ge("SentMessageDeliveryStatus"), { messages: t } = _e("SentMessageDeliveryStatus"), s = (() => {
1657
1657
  if (t)
1658
1658
  for (let a = t.length - 1; a >= 0; a -= 1) {
1659
1659
  const r = t[a];
@@ -1662,12 +1662,12 @@ const ar = P.lazy(() => import("./Card-BzvDr-pU.js")), rr = P.lazy(() => import(
1662
1662
  }
1663
1663
  })();
1664
1664
  return e.id === s;
1665
- }, Je = () => ft() ? /* @__PURE__ */ f(q, { children: [
1665
+ }, Qe = () => gt() ? /* @__PURE__ */ f(q, { children: [
1666
1666
  /* @__PURE__ */ n(ha, { weight: "bold", "aria-hidden": "true" }),
1667
1667
  /* @__PURE__ */ n("span", { "data-testid": "sent-message-delivery-status", children: "Delivered" })
1668
- ] }) : null, br = () => ft() ? /* @__PURE__ */ f(q, { children: [
1668
+ ] }) : null, br = () => gt() ? /* @__PURE__ */ f(q, { children: [
1669
1669
  /* @__PURE__ */ n(
1670
- be,
1670
+ ve,
1671
1671
  {
1672
1672
  className: "sent-message-status__spinner animate-spin",
1673
1673
  weight: "bold",
@@ -1684,7 +1684,7 @@ const ar = P.lazy(() => import("./Card-BzvDr-pU.js")), rr = P.lazy(() => import(
1684
1684
  /* @__PURE__ */ n(
1685
1685
  "span",
1686
1686
  {
1687
- className: N("sent-message-outbound-name", {
1687
+ className: k("sent-message-outbound-name", {
1688
1688
  "underline [text-decoration-skip-ink:auto]": !!t
1689
1689
  }),
1690
1690
  "data-testid": "sent-message-outbound-status",
@@ -1710,9 +1710,9 @@ const ar = P.lazy(() => import("./Card-BzvDr-pU.js")), rr = P.lazy(() => import(
1710
1710
  resolvedOutbound: t
1711
1711
  }) => {
1712
1712
  var h;
1713
- const { isMyMessage: s, message: a, threadList: r } = fe(
1713
+ const { isMyMessage: s, message: a, threadList: r } = ge(
1714
1714
  "SentMessageDeliveryStatus"
1715
- ), i = s(), o = ft();
1715
+ ), i = s(), o = gt();
1716
1716
  if (r)
1717
1717
  return null;
1718
1718
  if (a.status === "failed" && i && a.type !== "error")
@@ -1728,9 +1728,9 @@ const ar = P.lazy(() => import("./Card-BzvDr-pU.js")), rr = P.lazy(() => import(
1728
1728
  ) : null, u = /* @__PURE__ */ n(
1729
1729
  us,
1730
1730
  {
1731
- MessageSentStatus: Je,
1732
- MessageDeliveredStatus: Je,
1733
- MessageReadStatus: Je,
1731
+ MessageSentStatus: Qe,
1732
+ MessageDeliveredStatus: Qe,
1733
+ MessageReadStatus: Qe,
1734
1734
  MessageSendingStatus: br
1735
1735
  }
1736
1736
  );
@@ -1740,7 +1740,7 @@ const ar = P.lazy(() => import("./Card-BzvDr-pU.js")), rr = P.lazy(() => import(
1740
1740
  d
1741
1741
  ] }) : u;
1742
1742
  }, _r = /^([a-z][a-z0-9+.-]*):/i, yr = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
1743
- function gt(e) {
1743
+ function pt(e) {
1744
1744
  if (typeof e != "string") return;
1745
1745
  const t = e.trim();
1746
1746
  if (t === "") return;
@@ -1766,12 +1766,12 @@ const Nr = {
1766
1766
  fullWidth: s = !0,
1767
1767
  standalone: a = !1
1768
1768
  }) => {
1769
- const r = t.variant ?? "primary", i = N(
1769
+ const r = t.variant ?? "primary", i = k(
1770
1770
  "inline-flex h-10 items-center justify-center rounded-full px-4 text-sm font-medium leading-none transition-colors",
1771
1771
  s ? "w-full" : "min-w-0",
1772
1772
  !a && "mt-2",
1773
1773
  Nr[e][r]
1774
- ), o = s ? t.label : /* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: t.label }), l = gt(t.href);
1774
+ ), o = s ? t.label : /* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: t.label }), l = pt(t.href);
1775
1775
  return l ? /* @__PURE__ */ n(
1776
1776
  "a",
1777
1777
  {
@@ -1806,7 +1806,7 @@ const Nr = {
1806
1806
  }, Sr = {
1807
1807
  dark: "bg-white/25",
1808
1808
  light: "bg-black/15"
1809
- }, pt = ({
1809
+ }, bt = ({
1810
1810
  variant: e,
1811
1811
  ctaSurface: t,
1812
1812
  chinTextColor: s,
@@ -1823,34 +1823,34 @@ const Nr = {
1823
1823
  const g = e === "dark", c = a ?? (g ? r : void 0) ?? "", p = c.trim() !== "", w = i != null && i.trim() !== "", v = typeof l == "string" ? l.trim() : "", x = v !== "", b = u != null;
1824
1824
  if (!m && !p && !w && !x && !b)
1825
1825
  return null;
1826
- const y = g && !a, _ = N(
1826
+ const y = g && !a, _ = k(
1827
1827
  "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px]",
1828
1828
  s == null && (y ? Cr : kr[e])
1829
- ), T = N(
1829
+ ), T = k(
1830
1830
  "truncate text-[12px] leading-4 tracking-[0.24px]",
1831
1831
  s == null && Qt[e]
1832
- ), L = N(
1832
+ ), A = k(
1833
1833
  "text-[12px] leading-4 tracking-[0.24px]",
1834
1834
  o <= 1 && "truncate",
1835
1835
  s == null && Qt[e]
1836
1836
  );
1837
1837
  if (m) {
1838
- const F = N(
1838
+ const F = k(
1839
1839
  "animate-pulse rounded",
1840
1840
  Sr[e]
1841
1841
  );
1842
1842
  return /* @__PURE__ */ n("div", { className: "shrink-0 px-4 py-3", children: /* @__PURE__ */ f("div", { className: "flex min-w-0 flex-col gap-[2px]", children: [
1843
- /* @__PURE__ */ n("div", { className: N("h-5 w-3/4", F), "aria-hidden": !0 }),
1844
- /* @__PURE__ */ n("div", { className: N("h-4 w-1/2", F), "aria-hidden": !0 })
1843
+ /* @__PURE__ */ n("div", { className: k("h-5 w-3/4", F), "aria-hidden": !0 }),
1844
+ /* @__PURE__ */ n("div", { className: k("h-4 w-1/2", F), "aria-hidden": !0 })
1845
1845
  ] }) });
1846
1846
  }
1847
- const E = s ? { color: s } : void 0, z = o > 1 ? {
1848
- ...E,
1847
+ const R = s ? { color: s } : void 0, z = o > 1 ? {
1848
+ ...R,
1849
1849
  display: "-webkit-box",
1850
1850
  WebkitBoxOrient: "vertical",
1851
1851
  WebkitLineClamp: o,
1852
1852
  overflow: "hidden"
1853
- } : E;
1853
+ } : R;
1854
1854
  return /* @__PURE__ */ f("div", { className: "shrink-0 px-4 py-3", children: [
1855
1855
  /* @__PURE__ */ f("div", { className: "flex items-end gap-3", children: [
1856
1856
  /* @__PURE__ */ f("div", { className: "flex min-w-0 flex-1 flex-col gap-[2px]", children: [
@@ -1859,18 +1859,18 @@ const Nr = {
1859
1859
  /* @__PURE__ */ n(
1860
1860
  "p",
1861
1861
  {
1862
- className: N("min-w-0", _),
1863
- style: E,
1862
+ className: k("min-w-0", _),
1863
+ style: R,
1864
1864
  children: c
1865
1865
  }
1866
1866
  )
1867
1867
  ] }),
1868
- w && /* @__PURE__ */ n("p", { className: L, style: z, children: i }),
1868
+ w && /* @__PURE__ */ n("p", { className: A, style: z, children: i }),
1869
1869
  !b && x && /* @__PURE__ */ n(
1870
1870
  "p",
1871
1871
  {
1872
1872
  className: T,
1873
- style: E,
1873
+ style: R,
1874
1874
  "data-testid": "link-attachment-url",
1875
1875
  children: v
1876
1876
  }
@@ -1880,7 +1880,7 @@ const Nr = {
1880
1880
  ] }),
1881
1881
  u && /* @__PURE__ */ n(On, { variant: t ?? e, cta: u })
1882
1882
  ] });
1883
- }, Er = "Loading link preview", Ir = N(
1883
+ }, Er = "Loading link preview", Ir = k(
1884
1884
  // Width is a channel-scoped token: default 290px, but a read-only surface with no
1885
1885
  // composer (the official channel) sets `--lt-msg-card-width` on its root to widen the
1886
1886
  // content column (see ChannelView). Consumers that don't set the var keep 290px.
@@ -1890,7 +1890,7 @@ const Nr = {
1890
1890
  // 20px corners — no token exists for it in the component-library preset,
1891
1891
  // whose radius scale is sm .5rem / md 1rem / lg 1.5rem / xl 4rem.
1892
1892
  "rounded-[20px]"
1893
- ), Tr = "flex h-[250px] flex-col", Ee = ({
1893
+ ), Tr = "flex h-[250px] flex-col", Ie = ({
1894
1894
  variant: e,
1895
1895
  children: t,
1896
1896
  href: s,
@@ -1904,7 +1904,7 @@ const Nr = {
1904
1904
  busy: h = !1,
1905
1905
  "data-testid": m
1906
1906
  }) => {
1907
- const g = s != null || a != null, c = N(
1907
+ const g = s != null || a != null, c = k(
1908
1908
  "messaging-link-card",
1909
1909
  Ir,
1910
1910
  u ? Tr : "block",
@@ -1957,7 +1957,7 @@ const Nr = {
1957
1957
  "aria-label": r,
1958
1958
  "data-testid": m,
1959
1959
  "data-variant": e,
1960
- className: N(c, "text-left"),
1960
+ className: k(c, "text-left"),
1961
1961
  style: w,
1962
1962
  ...p,
1963
1963
  children: [
@@ -1986,11 +1986,11 @@ const Nr = {
1986
1986
  }, Ar = {
1987
1987
  dark: "size-16 text-white/25",
1988
1988
  light: "size-16 text-black/25"
1989
- }, Te = (e, t) => !!t && !!e && de(e) === "audio", bt = (e, t) => {
1989
+ }, Ae = (e, t) => !!t && !!e && ue(e) === "audio", vt = (e, t) => {
1990
1990
  if (!t || !e) return !1;
1991
- const s = de(e);
1991
+ const s = ue(e);
1992
1992
  return s === "video" || s === "audio";
1993
- }, vt = "bg-[#F2F3F4]", Ie = ({
1993
+ }, xt = "bg-[#F2F3F4]", Te = ({
1994
1994
  variant: e,
1995
1995
  thumbnailUrl: t,
1996
1996
  sourceUrl: s,
@@ -2001,8 +2001,8 @@ const Nr = {
2001
2001
  isLoading: l = !1,
2002
2002
  onImageError: d
2003
2003
  }) => {
2004
- const u = de(r), h = !!s && u === "video", m = ce(t);
2005
- return !l && Te(r, s) ? /* @__PURE__ */ n("div", { className: "p-3", children: /* @__PURE__ */ n(
2004
+ const u = ue(r), h = !!s && u === "video", m = de(t);
2005
+ return !l && Ae(r, s) ? /* @__PURE__ */ n("div", { className: "p-3", children: /* @__PURE__ */ n(
2006
2006
  "audio",
2007
2007
  {
2008
2008
  src: s,
@@ -2014,7 +2014,7 @@ const Nr = {
2014
2014
  ) }) : /* @__PURE__ */ f(
2015
2015
  "div",
2016
2016
  {
2017
- className: N(
2017
+ className: k(
2018
2018
  // `flex-1 min-h-0` inside the shell's 250px column: the hero takes
2019
2019
  // every pixel the chin doesn't, which is 168px at a two-line title
2020
2020
  // and 188px at one.
@@ -2031,7 +2031,7 @@ const Nr = {
2031
2031
  /* @__PURE__ */ n(
2032
2032
  "div",
2033
2033
  {
2034
- className: N(
2034
+ className: k(
2035
2035
  "h-full w-full animate-pulse",
2036
2036
  en[e]
2037
2037
  ),
@@ -2075,11 +2075,11 @@ const Nr = {
2075
2075
  ) : /* @__PURE__ */ n(
2076
2076
  "div",
2077
2077
  {
2078
- className: N(
2078
+ className: k(
2079
2079
  "flex h-full w-full items-center justify-center",
2080
2080
  en[e]
2081
2081
  ),
2082
- children: ve(r, {
2082
+ children: xe(r, {
2083
2083
  className: Ar[e],
2084
2084
  weight: "regular"
2085
2085
  })
@@ -2099,7 +2099,7 @@ const Mr = "#FFFFFF", Pn = "#040403", Dr = {
2099
2099
  dark: Mr,
2100
2100
  light: Pn
2101
2101
  };
2102
- function Ge({
2102
+ function Ye({
2103
2103
  variant: e,
2104
2104
  accentColor: t,
2105
2105
  status: s = "ready",
@@ -2114,7 +2114,7 @@ function Ge({
2114
2114
  }, [r]);
2115
2115
  const u = P.useCallback(() => {
2116
2116
  d(!0);
2117
- }, []), h = Te(i, o), c = a === "featured" && !!r && !h && !l && s === "ready" && t != null && Rr.test(t.trim()) ? Lr(t) : void 0, p = h ? Pn : Dr[e];
2117
+ }, []), h = Ae(i, o), c = a === "featured" && !!r && !h && !l && s === "ready" && t != null && Rr.test(t.trim()) ? Lr(t) : void 0, p = h ? Pn : Dr[e];
2118
2118
  return {
2119
2119
  thumbnailUrl: l ? void 0 : r,
2120
2120
  accentHex: c,
@@ -2142,7 +2142,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2142
2142
  onEditClick: p,
2143
2143
  dismissLabel: w = "Dismiss attachment"
2144
2144
  }) => {
2145
- const v = d === "classic", x = Te(i, l), b = Ge({
2145
+ const v = d === "classic", x = Ae(i, l), b = Ye({
2146
2146
  variant: "dark",
2147
2147
  accentColor: m,
2148
2148
  status: g,
@@ -2156,11 +2156,11 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2156
2156
  type: "button",
2157
2157
  onClick: c,
2158
2158
  "aria-label": w,
2159
- className: N(
2159
+ className: k(
2160
2160
  Or,
2161
2161
  !x && Pr
2162
2162
  ),
2163
- children: /* @__PURE__ */ n(lt, { className: "size-3", weight: "bold" })
2163
+ children: /* @__PURE__ */ n(ot, { className: "size-3", weight: "bold" })
2164
2164
  }
2165
2165
  ) : void 0, _ = p ? /* @__PURE__ */ n(
2166
2166
  "button",
@@ -2172,9 +2172,9 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2172
2172
  children: /* @__PURE__ */ n(fa, { className: "size-5", weight: "regular" })
2173
2173
  }
2174
2174
  ) : void 0;
2175
- return x && !b.isLoading ? /* @__PURE__ */ n(Ee, { variant: "dark", bgClassName: vt, children: /* @__PURE__ */ f("div", { className: "flex items-center gap-2 pr-3", children: [
2175
+ return x && !b.isLoading ? /* @__PURE__ */ n(Ie, { variant: "dark", bgClassName: xt, children: /* @__PURE__ */ f("div", { className: "flex items-center gap-2 pr-3", children: [
2176
2176
  /* @__PURE__ */ n("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ n(
2177
- Ie,
2177
+ Te,
2178
2178
  {
2179
2179
  variant: "dark",
2180
2180
  sourceUrl: l,
@@ -2184,7 +2184,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2184
2184
  ) }),
2185
2185
  y && /* @__PURE__ */ n("div", { className: "shrink-0", children: y })
2186
2186
  ] }) }) : /* @__PURE__ */ f(
2187
- Ee,
2187
+ Ie,
2188
2188
  {
2189
2189
  variant: "dark",
2190
2190
  fixedHeight: !v,
@@ -2193,7 +2193,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2193
2193
  topRight: v ? y : void 0,
2194
2194
  children: [
2195
2195
  !v && /* @__PURE__ */ n(
2196
- Ie,
2196
+ Te,
2197
2197
  {
2198
2198
  variant: "dark",
2199
2199
  thumbnailUrl: b.thumbnailUrl,
@@ -2206,7 +2206,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2206
2206
  }
2207
2207
  ),
2208
2208
  /* @__PURE__ */ n(
2209
- pt,
2209
+ bt,
2210
2210
  {
2211
2211
  chinTextColor: b.chinTextColor,
2212
2212
  variant: "dark",
@@ -2225,7 +2225,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2225
2225
  ]
2226
2226
  }
2227
2227
  );
2228
- }, xt = ({
2228
+ }, wt = ({
2229
2229
  accentHex: e,
2230
2230
  side: t,
2231
2231
  visible: s,
@@ -2243,7 +2243,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2243
2243
  "data-testid": "link-card-tail",
2244
2244
  "data-variant": t === "sender" ? "dark" : "light",
2245
2245
  style: e ? { "--accent": e } : void 0,
2246
- className: N(
2246
+ className: k(
2247
2247
  "messaging-link-card-tail",
2248
2248
  t === "receiver" && "messaging-link-card-tail--received"
2249
2249
  )
@@ -2266,13 +2266,13 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2266
2266
  onClick: g,
2267
2267
  groupPosition: c = "single"
2268
2268
  }) => {
2269
- const p = bt(r, o), w = gt(a), v = u == null && w != null && !p ? w : void 0, x = u == null && !p ? g : void 0, b = m !== "loading" && Te(r, o) ? vt : void 0, y = u && g ? {
2269
+ const p = vt(r, o), w = pt(a), v = u == null && w != null && !p ? w : void 0, x = u == null && !p ? g : void 0, b = m !== "loading" && Ae(r, o) ? xt : void 0, y = u && g ? {
2270
2270
  ...u,
2271
2271
  onClick: () => {
2272
2272
  var T;
2273
2273
  g(), (T = u.onClick) == null || T.call(u);
2274
2274
  }
2275
- } : u, _ = Ge({
2275
+ } : u, _ = Ye({
2276
2276
  variant: "light",
2277
2277
  accentColor: h,
2278
2278
  status: m,
@@ -2282,13 +2282,13 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2282
2282
  sourceUrl: o
2283
2283
  });
2284
2284
  return /* @__PURE__ */ n(
2285
- xt,
2285
+ wt,
2286
2286
  {
2287
2287
  accentHex: _.accentHex,
2288
2288
  side: "receiver",
2289
2289
  visible: b == null && (c === "single" || c === "end"),
2290
2290
  children: /* @__PURE__ */ f(
2291
- Ee,
2291
+ Ie,
2292
2292
  {
2293
2293
  variant: "light",
2294
2294
  href: v,
@@ -2301,7 +2301,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2301
2301
  "data-testid": "link-attachment",
2302
2302
  children: [
2303
2303
  l === "featured" && /* @__PURE__ */ n(
2304
- Ie,
2304
+ Te,
2305
2305
  {
2306
2306
  variant: "light",
2307
2307
  thumbnailUrl: _.thumbnailUrl,
@@ -2313,7 +2313,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2313
2313
  }
2314
2314
  ),
2315
2315
  /* @__PURE__ */ n(
2316
- pt,
2316
+ bt,
2317
2317
  {
2318
2318
  chinTextColor: _.chinTextColor,
2319
2319
  variant: "light",
@@ -2349,7 +2349,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2349
2349
  onClick: c,
2350
2350
  groupPosition: p = "single"
2351
2351
  }) => {
2352
- const w = bt(i, l), v = gt(r), x = h == null && v != null && !w ? v : void 0, b = h == null && !w && x != null ? c : void 0, y = g !== "loading" && Te(i, l), _ = Ge({
2352
+ const w = vt(i, l), v = pt(r), x = h == null && v != null && !w ? v : void 0, b = h == null && !w && x != null ? c : void 0, y = g !== "loading" && Ae(i, l), _ = Ye({
2353
2353
  variant: "dark",
2354
2354
  accentColor: m,
2355
2355
  status: g,
@@ -2359,13 +2359,13 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2359
2359
  sourceUrl: l
2360
2360
  });
2361
2361
  return /* @__PURE__ */ n(
2362
- xt,
2362
+ wt,
2363
2363
  {
2364
2364
  accentHex: _.accentHex,
2365
2365
  side: "sender",
2366
2366
  visible: !y && (p === "single" || p === "end"),
2367
2367
  children: /* @__PURE__ */ f(
2368
- Ee,
2368
+ Ie,
2369
2369
  {
2370
2370
  variant: "dark",
2371
2371
  href: x,
@@ -2373,10 +2373,10 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2373
2373
  fixedHeight: d === "featured" && !y,
2374
2374
  accentHex: _.accentHex,
2375
2375
  busy: _.isLoading,
2376
- bgClassName: y ? vt : void 0,
2376
+ bgClassName: y ? xt : void 0,
2377
2377
  children: [
2378
2378
  d === "featured" && /* @__PURE__ */ n(
2379
- Ie,
2379
+ Te,
2380
2380
  {
2381
2381
  variant: "dark",
2382
2382
  thumbnailUrl: _.thumbnailUrl,
@@ -2388,7 +2388,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2388
2388
  }
2389
2389
  ),
2390
2390
  /* @__PURE__ */ n(
2391
- pt,
2391
+ bt,
2392
2392
  {
2393
2393
  chinTextColor: _.chinTextColor,
2394
2394
  variant: "dark",
@@ -2408,7 +2408,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2408
2408
  )
2409
2409
  }
2410
2410
  );
2411
- }, it = {
2411
+ }, lt = {
2412
2412
  Composer: Fr,
2413
2413
  Sent: $r,
2414
2414
  Received: zr
@@ -2434,7 +2434,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2434
2434
  middle: "rounded-tl-[4px] rounded-tr-[18px] rounded-bl-[4px] rounded-br-[18px]",
2435
2435
  end: "rounded-tl-[4px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[18px]"
2436
2436
  }
2437
- }, Ae = ({
2437
+ }, Re = ({
2438
2438
  variant: e,
2439
2439
  text: t,
2440
2440
  bordered: s = !0,
@@ -2452,7 +2452,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2452
2452
  {
2453
2453
  "data-testid": u,
2454
2454
  "data-group-position": a,
2455
- className: N(
2455
+ className: k(
2456
2456
  // Defaults describe a 280px-wide document / audio / link
2457
2457
  // bubble: that width matches the mobile chat attachment and
2458
2458
  // the 8px / 16px inset matches `--str-chat__spacing-2
@@ -2486,7 +2486,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2486
2486
  h ? /* @__PURE__ */ n(
2487
2487
  "p",
2488
2488
  {
2489
- className: N(
2489
+ className: k(
2490
2490
  // No `text-*` / `font-*` overrides here — caption inherits
2491
2491
  // the same font family + size as `.str-chat__message-text`
2492
2492
  // so it matches the surrounding `CustomMessage` bubbles.
@@ -2506,7 +2506,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2506
2506
  ]
2507
2507
  }
2508
2508
  );
2509
- }, Re = ({
2509
+ }, Le = ({
2510
2510
  onClick: e,
2511
2511
  variant: t = "overlay",
2512
2512
  ariaLabel: s = "Dismiss attachment"
@@ -2518,13 +2518,13 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2518
2518
  a.stopPropagation(), e();
2519
2519
  },
2520
2520
  "aria-label": s,
2521
- className: N(
2521
+ className: k(
2522
2522
  "flex size-6 items-center justify-center rounded-full text-white",
2523
2523
  t === "overlay" ? "bg-[#121110]/85 backdrop-blur" : "bg-white/15 hover:bg-white/25"
2524
2524
  ),
2525
- children: /* @__PURE__ */ n(lt, { className: "size-3", weight: "bold" })
2525
+ children: /* @__PURE__ */ n(ot, { className: "size-3", weight: "bold" })
2526
2526
  }
2527
- ), Le = (e) => e === "received" ? "light" : "dark", ao = ({
2527
+ ), Me = (e) => e === "received" ? "light" : "dark", ao = ({
2528
2528
  firstOfGroup: e,
2529
2529
  endOfGroup: t,
2530
2530
  groupedByUser: s
@@ -2545,7 +2545,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2545
2545
  }
2546
2546
  ),
2547
2547
  s ?? null
2548
- ] }), wt = ({
2548
+ ] }), _t = ({
2549
2549
  state: e,
2550
2550
  src: t,
2551
2551
  mimeType: s,
@@ -2556,12 +2556,12 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2556
2556
  preload: l,
2557
2557
  onDismiss: d
2558
2558
  }) => {
2559
- const u = Le(e), h = e === "composer" && !!d, m = Gr({ src: t, mimeType: s, filename: a, items: r });
2559
+ const u = Me(e), h = e === "composer" && !!d, m = Gr({ src: t, mimeType: s, filename: a, items: r });
2560
2560
  if (m.length === 0)
2561
2561
  return null;
2562
2562
  const g = l ?? (m.length > 1 ? "none" : "metadata");
2563
2563
  return /* @__PURE__ */ n(
2564
- Ae,
2564
+ Re,
2565
2565
  {
2566
2566
  variant: u,
2567
2567
  text: i,
@@ -2575,14 +2575,14 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2575
2575
  trailingAction: (
2576
2576
  // Composer only supports a single attachment, so the
2577
2577
  // dismiss control sits on the only player.
2578
- h && p === 0 ? /* @__PURE__ */ n(Re, { onClick: d, variant: "inline" }) : void 0
2578
+ h && p === 0 ? /* @__PURE__ */ n(Le, { onClick: d, variant: "inline" }) : void 0
2579
2579
  )
2580
2580
  },
2581
2581
  `${c.src}-${p}`
2582
2582
  )) })
2583
2583
  }
2584
2584
  );
2585
- }, Wr = (e) => /* @__PURE__ */ n(wt, { ...e, state: "composer" }), Kr = (e) => /* @__PURE__ */ n(wt, { ...e, state: "sent" }), Xr = (e) => /* @__PURE__ */ n(wt, { ...e, state: "received" }), qr = {
2585
+ }, Wr = (e) => /* @__PURE__ */ n(_t, { ...e, state: "composer" }), Kr = (e) => /* @__PURE__ */ n(_t, { ...e, state: "sent" }), Xr = (e) => /* @__PURE__ */ n(_t, { ...e, state: "received" }), qr = {
2586
2586
  Composer: Wr,
2587
2587
  Sent: Kr,
2588
2588
  Received: Xr
@@ -2609,7 +2609,7 @@ function Qr(e, t) {
2609
2609
  }
2610
2610
  }
2611
2611
  if (!e) return;
2612
- if (de(e) === "document") {
2612
+ if (ue(e) === "document") {
2613
2613
  const r = Cn(e), i = Jr[r];
2614
2614
  if (i) return i;
2615
2615
  if (e === "application/octet-stream") return;
@@ -2652,13 +2652,13 @@ const ti = {
2652
2652
  const d = s ?? t ?? "File", u = ei(a, t, r), h = /* @__PURE__ */ n(
2653
2653
  "div",
2654
2654
  {
2655
- className: N(
2655
+ className: k(
2656
2656
  "flex size-10 shrink-0 items-center justify-center rounded-sm",
2657
2657
  ni[e]
2658
2658
  ),
2659
2659
  "aria-hidden": !0,
2660
- children: ve(a, {
2661
- className: N("size-6", si[e]),
2660
+ children: xe(a, {
2661
+ className: k("size-6", si[e]),
2662
2662
  weight: "regular"
2663
2663
  })
2664
2664
  }
@@ -2667,7 +2667,7 @@ const ti = {
2667
2667
  u ? /* @__PURE__ */ n(
2668
2668
  "p",
2669
2669
  {
2670
- className: N(
2670
+ className: k(
2671
2671
  "truncate text-xs leading-4",
2672
2672
  ti[e]
2673
2673
  ),
@@ -2680,7 +2680,7 @@ const ti = {
2680
2680
  type: "button",
2681
2681
  onClick: i,
2682
2682
  "aria-label": o,
2683
- className: N(
2683
+ className: k(
2684
2684
  "flex min-w-0 flex-1 items-center gap-3 rounded-sm text-left transition-colors",
2685
2685
  e === "dark" ? "hover:bg-white/[0.04]" : "hover:bg-black/[0.04]"
2686
2686
  ),
@@ -2740,7 +2740,7 @@ const ai = ({
2740
2740
  trailingAction: r
2741
2741
  }
2742
2742
  );
2743
- }, _t = ({
2743
+ }, yt = ({
2744
2744
  state: e,
2745
2745
  src: t,
2746
2746
  filename: s,
@@ -2753,7 +2753,7 @@ const ai = ({
2753
2753
  onClick: u,
2754
2754
  onDismiss: h
2755
2755
  }) => {
2756
- const m = Le(e), g = e === "composer" && !!h, c = ai({
2756
+ const m = Me(e), g = e === "composer" && !!h, c = ai({
2757
2757
  src: t,
2758
2758
  filename: s,
2759
2759
  fileSize: a,
@@ -2772,16 +2772,16 @@ const ai = ({
2772
2772
  const w = /* @__PURE__ */ n(
2773
2773
  "span",
2774
2774
  {
2775
- className: N(
2775
+ className: k(
2776
2776
  "flex size-8 items-center justify-center rounded-full",
2777
2777
  m === "dark" ? "text-white/70" : "text-black/70"
2778
2778
  ),
2779
2779
  "aria-hidden": !0,
2780
- children: /* @__PURE__ */ n(Se, { className: "size-5", weight: "bold" })
2780
+ children: /* @__PURE__ */ n(Ee, { className: "size-5", weight: "bold" })
2781
2781
  }
2782
2782
  );
2783
2783
  return /* @__PURE__ */ n(
2784
- Ae,
2784
+ Re,
2785
2785
  {
2786
2786
  variant: m,
2787
2787
  text: l,
@@ -2794,17 +2794,17 @@ const ai = ({
2794
2794
  item: v,
2795
2795
  index: x,
2796
2796
  onActivate: p,
2797
- trailingAction: g && x === 0 ? /* @__PURE__ */ n(Re, { onClick: h, variant: "inline" }) : w
2797
+ trailingAction: g && x === 0 ? /* @__PURE__ */ n(Le, { onClick: h, variant: "inline" }) : w
2798
2798
  },
2799
2799
  `${v.src}-${x}`
2800
2800
  )) })
2801
2801
  }
2802
2802
  );
2803
- }, ii = (e) => /* @__PURE__ */ n(_t, { ...e, state: "composer" }), li = (e) => /* @__PURE__ */ n(_t, { ...e, state: "sent" }), oi = (e) => /* @__PURE__ */ n(_t, { ...e, state: "received" }), ci = {
2803
+ }, ii = (e) => /* @__PURE__ */ n(yt, { ...e, state: "composer" }), li = (e) => /* @__PURE__ */ n(yt, { ...e, state: "sent" }), oi = (e) => /* @__PURE__ */ n(yt, { ...e, state: "received" }), ci = {
2804
2804
  Composer: ii,
2805
2805
  Sent: li,
2806
2806
  Received: oi
2807
- }, $n = "inline-flex size-10 items-center justify-center rounded-full border-0 bg-white/[0.12] p-0 text-white transition-colors duration-150 ease-[ease] hover:bg-white/[0.22] focus-visible:bg-white/[0.22] focus-visible:outline-none disabled:cursor-default disabled:opacity-40", tn = "absolute top-1/2 z-[1] inline-flex size-12 -translate-y-1/2 items-center justify-center rounded-full border-0 bg-white/[0.12] p-0 text-white transition-colors duration-150 ease-[ease] hover:bg-white/[0.22] focus-visible:bg-white/[0.22] focus-visible:outline-none", yt = ({
2807
+ }, $n = "inline-flex size-10 items-center justify-center rounded-full border-0 bg-white/[0.12] p-0 text-white transition-colors duration-150 ease-[ease] hover:bg-white/[0.22] focus-visible:bg-white/[0.22] focus-visible:outline-none disabled:cursor-default disabled:opacity-40", tn = "absolute top-1/2 z-[1] inline-flex size-12 -translate-y-1/2 items-center justify-center rounded-full border-0 bg-white/[0.12] p-0 text-white transition-colors duration-150 ease-[ease] hover:bg-white/[0.22] focus-visible:bg-white/[0.22] focus-visible:outline-none", Nt = ({
2808
2808
  onPrev: e,
2809
2809
  onNext: t,
2810
2810
  prevLabel: s = "Previous",
@@ -2839,7 +2839,7 @@ const ai = ({
2839
2839
  tone: i = "dark",
2840
2840
  onTriggered: o
2841
2841
  }) => {
2842
- const [l, d] = $(!1), u = K(
2842
+ const [l, d] = $(!1), u = X(
2843
2843
  (c) => {
2844
2844
  c.stopPropagation(), !l && (d(!0), zn(e, t).catch(() => {
2845
2845
  }).finally(() => {
@@ -2847,7 +2847,7 @@ const ai = ({
2847
2847
  }));
2848
2848
  },
2849
2849
  [l, e, t, o]
2850
- ), h = r ?? s !== "pill", g = { className: N(
2850
+ ), h = r ?? s !== "pill", g = { className: k(
2851
2851
  s === "pill" ? "size-4" : "size-5",
2852
2852
  "shrink-0"
2853
2853
  ), weight: "bold" };
@@ -2858,7 +2858,7 @@ const ai = ({
2858
2858
  onClick: u,
2859
2859
  disabled: l,
2860
2860
  "aria-label": a,
2861
- className: N(
2861
+ className: k(
2862
2862
  "flex size-8 shrink-0 items-center justify-center rounded-full transition-colors disabled:opacity-70",
2863
2863
  {
2864
2864
  dark: "text-white/70 hover:bg-white/[0.08] hover:text-white",
@@ -2866,14 +2866,14 @@ const ai = ({
2866
2866
  }[i]
2867
2867
  ),
2868
2868
  children: l ? /* @__PURE__ */ n(
2869
- be,
2869
+ ve,
2870
2870
  {
2871
2871
  className: "size-4 animate-spin",
2872
2872
  weight: "bold",
2873
2873
  "aria-hidden": !0
2874
2874
  }
2875
2875
  ) : /* @__PURE__ */ n(
2876
- Se,
2876
+ Ee,
2877
2877
  {
2878
2878
  className: "size-5 shrink-0",
2879
2879
  weight: "bold",
@@ -2889,7 +2889,7 @@ const ai = ({
2889
2889
  disabled: l,
2890
2890
  "aria-label": a,
2891
2891
  className: $n,
2892
- children: l ? /* @__PURE__ */ n(be, { size: 20, weight: "bold", "aria-hidden": !0 }) : /* @__PURE__ */ n(Se, { size: 20, weight: "bold", "aria-hidden": !0 })
2892
+ children: l ? /* @__PURE__ */ n(ve, { size: 20, weight: "bold", "aria-hidden": !0 }) : /* @__PURE__ */ n(Ee, { size: 20, weight: "bold", "aria-hidden": !0 })
2893
2893
  }
2894
2894
  ) : /* @__PURE__ */ f(
2895
2895
  "button",
@@ -2898,40 +2898,40 @@ const ai = ({
2898
2898
  onClick: u,
2899
2899
  disabled: l,
2900
2900
  "aria-label": h ? a : void 0,
2901
- className: N(
2901
+ className: k(
2902
2902
  "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",
2903
2903
  i === "dark" ? "bg-[#121110] text-white hover:bg-[#2a2928]" : "bg-white text-[#121110] hover:bg-white/90"
2904
2904
  ),
2905
2905
  children: [
2906
2906
  l ? /* @__PURE__ */ n(
2907
- be,
2907
+ ve,
2908
2908
  {
2909
2909
  className: "size-4 animate-spin",
2910
2910
  weight: "bold",
2911
2911
  "aria-hidden": !0
2912
2912
  }
2913
- ) : /* @__PURE__ */ n(Se, { ...g, "aria-hidden": !0 }),
2913
+ ) : /* @__PURE__ */ n(Ee, { ...g, "aria-hidden": !0 }),
2914
2914
  h ? null : a
2915
2915
  ]
2916
2916
  }
2917
2917
  );
2918
- }, Qe = (e, t, s) => Math.min(Math.max(e, t), s), Nt = ({
2918
+ }, et = (e, t, s) => Math.min(Math.max(e, t), s), kt = ({
2919
2919
  length: e,
2920
2920
  initialIndex: t,
2921
2921
  open: s
2922
2922
  }) => {
2923
- const a = Qe(t, 0, Math.max(e - 1, 0)), [r, i] = $(a);
2924
- W(() => {
2925
- s && i(Qe(t, 0, Math.max(e - 1, 0)));
2926
- }, [s, t, e]), W(() => {
2927
- i((d) => Qe(d, 0, Math.max(e - 1, 0)));
2923
+ const a = et(t, 0, Math.max(e - 1, 0)), [r, i] = $(a);
2924
+ K(() => {
2925
+ s && i(et(t, 0, Math.max(e - 1, 0)));
2926
+ }, [s, t, e]), K(() => {
2927
+ i((d) => et(d, 0, Math.max(e - 1, 0)));
2928
2928
  }, [e]);
2929
- const o = K(() => {
2929
+ const o = X(() => {
2930
2930
  e <= 1 || i((d) => d <= 0 ? e - 1 : d - 1);
2931
- }, [e]), l = K(() => {
2931
+ }, [e]), l = X(() => {
2932
2932
  e <= 1 || i((d) => d >= e - 1 ? 0 : d + 1);
2933
2933
  }, [e]);
2934
- return W(() => {
2934
+ return K(() => {
2935
2935
  if (!s || e <= 1) return;
2936
2936
  const d = (u) => {
2937
2937
  if (u.key !== "ArrowLeft" && u.key !== "ArrowRight") return;
@@ -2940,7 +2940,7 @@ const ai = ({
2940
2940
  };
2941
2941
  return window.addEventListener("keydown", d), () => window.removeEventListener("keydown", d);
2942
2942
  }, [s, e, o, l]), { index: r, prev: o, next: l };
2943
- }, kt = ({
2943
+ }, Ct = ({
2944
2944
  open: e,
2945
2945
  onClose: t,
2946
2946
  ariaLabel: s,
@@ -2950,7 +2950,7 @@ const ai = ({
2950
2950
  "data-testid": o
2951
2951
  }) => {
2952
2952
  const l = V(null), d = V(null);
2953
- return W(() => {
2953
+ return K(() => {
2954
2954
  var g;
2955
2955
  const m = l.current;
2956
2956
  if (m) {
@@ -3021,7 +3021,7 @@ const ai = ({
3021
3021
  onClick: t,
3022
3022
  "aria-label": "Close viewer",
3023
3023
  className: $n,
3024
- children: /* @__PURE__ */ n(lt, { size: 20, weight: "bold", "aria-hidden": !0 })
3024
+ children: /* @__PURE__ */ n(ot, { size: 20, weight: "bold", "aria-hidden": !0 })
3025
3025
  }
3026
3026
  )
3027
3027
  ] })
@@ -3036,16 +3036,16 @@ const ai = ({
3036
3036
  initialIndex: s = 0,
3037
3037
  onClose: a
3038
3038
  }) => {
3039
- const { index: r, prev: i, next: o } = Nt({
3039
+ const { index: r, prev: i, next: o } = kt({
3040
3040
  length: t.length,
3041
3041
  initialIndex: s,
3042
3042
  open: e
3043
- }), l = t[r], d = le(
3043
+ }), l = t[r], d = oe(
3044
3044
  () => (l == null ? void 0 : l.filename) ?? (l ? re(l.src) : "image"),
3045
3045
  [l]
3046
3046
  );
3047
3047
  return l ? /* @__PURE__ */ f(
3048
- kt,
3048
+ Ct,
3049
3049
  {
3050
3050
  open: e,
3051
3051
  onClose: a,
@@ -3074,7 +3074,7 @@ const ai = ({
3074
3074
  `${r}:${l.src}`
3075
3075
  ) : null,
3076
3076
  t.length > 1 ? /* @__PURE__ */ n(
3077
- yt,
3077
+ Nt,
3078
3078
  {
3079
3079
  onPrev: i,
3080
3080
  onNext: o,
@@ -3106,7 +3106,7 @@ const ai = ({
3106
3106
  if (i === 0) return null;
3107
3107
  const o = e.slice(0, Math.min(i, s)), l = i - o.length, d = (h, m, g) => {
3108
3108
  var p;
3109
- const c = N(
3109
+ const c = k(
3110
3110
  di,
3111
3111
  "h-full w-full",
3112
3112
  (p = ui[o.length]) == null ? void 0 : p[m]
@@ -3117,7 +3117,7 @@ const ai = ({
3117
3117
  type: "button",
3118
3118
  onClick: () => t(m),
3119
3119
  "aria-label": h.ariaLabel ?? `Open media ${m + 1}`,
3120
- className: N(c, "cursor-zoom-in"),
3120
+ className: k(c, "cursor-zoom-in"),
3121
3121
  children: [
3122
3122
  h.content,
3123
3123
  g
@@ -3140,7 +3140,7 @@ const ai = ({
3140
3140
  }), o.length === 1 ? /* @__PURE__ */ n(
3141
3141
  "div",
3142
3142
  {
3143
- className: N(
3143
+ className: k(
3144
3144
  a ? hi : "aspect-square w-full",
3145
3145
  r
3146
3146
  ),
@@ -3150,7 +3150,7 @@ const ai = ({
3150
3150
  ) : o.length === 2 ? /* @__PURE__ */ n(
3151
3151
  "div",
3152
3152
  {
3153
- className: N(
3153
+ className: k(
3154
3154
  "grid aspect-[16/9] w-full grid-cols-2 gap-0.5",
3155
3155
  r
3156
3156
  ),
@@ -3159,7 +3159,7 @@ const ai = ({
3159
3159
  ) : o.length === 3 ? /* @__PURE__ */ f(
3160
3160
  "div",
3161
3161
  {
3162
- className: N(
3162
+ className: k(
3163
3163
  "grid aspect-[4/3] w-full grid-cols-2 grid-rows-2 gap-0.5",
3164
3164
  r
3165
3165
  ),
@@ -3172,7 +3172,7 @@ const ai = ({
3172
3172
  ) : /* @__PURE__ */ n(
3173
3173
  "div",
3174
3174
  {
3175
- className: N(
3175
+ className: k(
3176
3176
  // 379x286 is the content box of Figma's 383x290 stacked-media
3177
3177
  // card (`attachment-single-image` 1973:13863) once its 2px
3178
3178
  // frame is removed. Pinning the aspect on the container — as
@@ -3196,13 +3196,13 @@ const ai = ({
3196
3196
  })
3197
3197
  }
3198
3198
  );
3199
- }, Me = (e) => {
3200
- const [t, s] = $(!1), [a, r] = $(0), i = K(
3199
+ }, De = (e) => {
3200
+ const [t, s] = $(!1), [a, r] = $(0), i = X(
3201
3201
  (l) => {
3202
3202
  (e == null ? void 0 : e(l)) !== !1 && (r(l), s(!0));
3203
3203
  },
3204
3204
  [e]
3205
- ), o = K(() => s(!1), []);
3205
+ ), o = X(() => s(!1), []);
3206
3206
  return { viewerOpen: t, viewerIndex: a, handleActivate: i, closeViewer: o };
3207
3207
  }, gi = ({
3208
3208
  item: e,
@@ -3220,7 +3220,7 @@ const ai = ({
3220
3220
  "img",
3221
3221
  {
3222
3222
  ref: r,
3223
- src: ce(e.src) ?? e.src,
3223
+ src: de(e.src) ?? e.src,
3224
3224
  alt: e.alt ?? "",
3225
3225
  width: e.width,
3226
3226
  height: e.height,
@@ -3241,7 +3241,7 @@ const ai = ({
3241
3241
  alt: s.alt,
3242
3242
  filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
3243
3243
  })), bi = ({ src: e, alt: t, filename: s, loading: a = "lazy", onClick: r, onDismiss: i }) => {
3244
- const { viewerOpen: o, viewerIndex: l, handleActivate: d, closeViewer: u } = Me(r);
3244
+ const { viewerOpen: o, viewerIndex: l, handleActivate: d, closeViewer: u } = De(r);
3245
3245
  return /* @__PURE__ */ f("div", { className: "relative w-fit", children: [
3246
3246
  /* @__PURE__ */ n(
3247
3247
  "button",
@@ -3253,7 +3253,7 @@ const ai = ({
3253
3253
  children: /* @__PURE__ */ n(
3254
3254
  "img",
3255
3255
  {
3256
- src: ce(e) ?? e,
3256
+ src: de(e) ?? e,
3257
3257
  alt: t ?? "",
3258
3258
  draggable: !1,
3259
3259
  loading: a,
@@ -3263,7 +3263,7 @@ const ai = ({
3263
3263
  )
3264
3264
  }
3265
3265
  ),
3266
- i ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(Re, { onClick: i }) }) : null,
3266
+ i ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(Le, { onClick: i }) }) : null,
3267
3267
  /* @__PURE__ */ n(
3268
3268
  Un,
3269
3269
  {
@@ -3304,7 +3304,7 @@ const ai = ({
3304
3304
  loading: l = "lazy",
3305
3305
  onClick: d
3306
3306
  }) => {
3307
- const u = pi({ src: t, alt: s, items: r }), h = Le(e), { viewerOpen: m, viewerIndex: g, handleActivate: c, closeViewer: p } = Me(d), w = u.length === 1, v = xi(w ? u[0] : void 0);
3307
+ const u = pi({ src: t, alt: s, items: r }), h = Me(e), { viewerOpen: m, viewerIndex: g, handleActivate: c, closeViewer: p } = De(d), w = u.length === 1, v = xi(w ? u[0] : void 0);
3308
3308
  if (u.length === 0)
3309
3309
  return null;
3310
3310
  const x = u.map(
@@ -3318,7 +3318,7 @@ const ai = ({
3318
3318
  })
3319
3319
  );
3320
3320
  return /* @__PURE__ */ f(
3321
- Ae,
3321
+ Re,
3322
3322
  {
3323
3323
  variant: h,
3324
3324
  text: i,
@@ -3359,19 +3359,19 @@ const ai = ({
3359
3359
  initialIndex: s = 0,
3360
3360
  onClose: a
3361
3361
  }) => {
3362
- const { index: r, prev: i, next: o } = Nt({
3362
+ const { index: r, prev: i, next: o } = kt({
3363
3363
  length: t.length,
3364
3364
  initialIndex: s,
3365
3365
  open: e
3366
- }), l = t[r], d = le(
3366
+ }), l = t[r], d = oe(
3367
3367
  () => (l == null ? void 0 : l.filename) ?? (l ? re(l.src) : "document"),
3368
3368
  [l]
3369
- ), u = le(
3369
+ ), u = oe(
3370
3370
  () => l ? Ci(l.src) : void 0,
3371
3371
  [l]
3372
3372
  );
3373
3373
  return !l || !u ? null : /* @__PURE__ */ f(
3374
- kt,
3374
+ Ct,
3375
3375
  {
3376
3376
  open: e,
3377
3377
  onClose: a,
@@ -3390,7 +3390,7 @@ const ai = ({
3390
3390
  `${r}:${l.src}`
3391
3391
  ),
3392
3392
  t.length > 1 ? /* @__PURE__ */ n(
3393
- yt,
3393
+ Nt,
3394
3394
  {
3395
3395
  onPrev: i,
3396
3396
  onNext: o,
@@ -3431,7 +3431,7 @@ const ai = ({
3431
3431
  trailingAction: r
3432
3432
  }
3433
3433
  );
3434
- }, Ct = ({
3434
+ }, St = ({
3435
3435
  state: e,
3436
3436
  src: t,
3437
3437
  filename: s,
@@ -3443,7 +3443,7 @@ const ai = ({
3443
3443
  onClick: d,
3444
3444
  onDismiss: u
3445
3445
  }) => {
3446
- const h = Le(e), m = Si({ src: t, filename: s, fileSize: a, title: r, items: i }), { viewerOpen: g, viewerIndex: c, handleActivate: p, closeViewer: w } = Me(d), v = e === "composer" && !!u;
3446
+ const h = Me(e), m = Si({ src: t, filename: s, fileSize: a, title: r, items: i }), { viewerOpen: g, viewerIndex: c, handleActivate: p, closeViewer: w } = De(d), v = e === "composer" && !!u;
3447
3447
  if (m.length === 0)
3448
3448
  return null;
3449
3449
  const x = m.map((b) => ({
@@ -3451,7 +3451,7 @@ const ai = ({
3451
3451
  filename: b.filename ?? re(b.src)
3452
3452
  }));
3453
3453
  return /* @__PURE__ */ f(
3454
- Ae,
3454
+ Re,
3455
3455
  {
3456
3456
  variant: h,
3457
3457
  text: o,
@@ -3459,7 +3459,7 @@ const ai = ({
3459
3459
  "data-testid": "pdf-attachment",
3460
3460
  children: [
3461
3461
  /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: m.map((b, y) => {
3462
- const _ = b.filename ?? re(b.src), T = v && y === 0 ? /* @__PURE__ */ n(Re, { onClick: u, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ n(
3462
+ const _ = b.filename ?? re(b.src), T = v && y === 0 ? /* @__PURE__ */ n(Le, { onClick: u, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ n(
3463
3463
  Bn,
3464
3464
  {
3465
3465
  url: b.src,
@@ -3493,7 +3493,7 @@ const ai = ({
3493
3493
  ]
3494
3494
  }
3495
3495
  );
3496
- }, Ii = (e) => /* @__PURE__ */ n(Ct, { ...e, state: "composer" }), Ti = (e) => /* @__PURE__ */ n(Ct, { ...e, state: "sent" }), Ai = (e) => /* @__PURE__ */ n(Ct, { ...e, state: "received" }), Ri = {
3496
+ }, Ii = (e) => /* @__PURE__ */ n(St, { ...e, state: "composer" }), Ti = (e) => /* @__PURE__ */ n(St, { ...e, state: "sent" }), Ai = (e) => /* @__PURE__ */ n(St, { ...e, state: "received" }), Ri = {
3497
3497
  Composer: Ii,
3498
3498
  Sent: Ti,
3499
3499
  Received: Ai
@@ -3503,16 +3503,16 @@ const ai = ({
3503
3503
  initialIndex: s = 0,
3504
3504
  onClose: a
3505
3505
  }) => {
3506
- const { index: r, prev: i, next: o } = Nt({
3506
+ const { index: r, prev: i, next: o } = kt({
3507
3507
  length: t.length,
3508
3508
  initialIndex: s,
3509
3509
  open: e
3510
- }), l = t[r], d = le(
3510
+ }), l = t[r], d = oe(
3511
3511
  () => (l == null ? void 0 : l.filename) ?? (l ? re(l.src) : "video"),
3512
3512
  [l]
3513
3513
  );
3514
3514
  return l ? /* @__PURE__ */ f(
3515
- kt,
3515
+ Ct,
3516
3516
  {
3517
3517
  open: e,
3518
3518
  onClose: a,
@@ -3536,7 +3536,7 @@ const ai = ({
3536
3536
  `${r}:${l.src}`
3537
3537
  ),
3538
3538
  t.length > 1 ? /* @__PURE__ */ n(
3539
- yt,
3539
+ Nt,
3540
3540
  {
3541
3541
  onPrev: i,
3542
3542
  onNext: o,
@@ -3547,7 +3547,7 @@ const ai = ({
3547
3547
  ]
3548
3548
  }
3549
3549
  ) : null;
3550
- }, Li = () => /* @__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(rt, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), Yn = ({
3550
+ }, Li = () => /* @__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(it, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), Yn = ({
3551
3551
  item: e,
3552
3552
  index: t
3553
3553
  }) => /* @__PURE__ */ f("div", { className: "absolute inset-0 size-full bg-[#0d0d0d]", children: [
@@ -3586,7 +3586,7 @@ const ai = ({
3586
3586
  preload: s.preload,
3587
3587
  filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
3588
3588
  })), Oi = ({ src: e, poster: t, mimeType: s, filename: a, preload: r, onClick: i, onDismiss: o }) => {
3589
- const { viewerOpen: l, viewerIndex: d, handleActivate: u, closeViewer: h } = Me(i);
3589
+ const { viewerOpen: l, viewerIndex: d, handleActivate: u, closeViewer: h } = De(i);
3590
3590
  return /* @__PURE__ */ f("div", { className: "relative w-fit", children: [
3591
3591
  /* @__PURE__ */ n(
3592
3592
  "button",
@@ -3598,7 +3598,7 @@ const ai = ({
3598
3598
  children: /* @__PURE__ */ n(Yn, { item: { src: e, poster: t, mimeType: s }, index: 0 })
3599
3599
  }
3600
3600
  ),
3601
- o ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(Re, { onClick: o }) }) : null,
3601
+ o ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(Le, { onClick: o }) }) : null,
3602
3602
  /* @__PURE__ */ n(
3603
3603
  Gn,
3604
3604
  {
@@ -3621,14 +3621,14 @@ const ai = ({
3621
3621
  preload: d,
3622
3622
  onClick: u
3623
3623
  }) => {
3624
- const h = Di({ src: t, poster: s, mimeType: a, preload: d, items: i }), m = Le(e), { viewerOpen: g, viewerIndex: c, handleActivate: p, closeViewer: w } = Me(u);
3624
+ const h = Di({ src: t, poster: s, mimeType: a, preload: d, items: i }), m = Me(e), { viewerOpen: g, viewerIndex: c, handleActivate: p, closeViewer: w } = De(u);
3625
3625
  if (h.length === 0)
3626
3626
  return null;
3627
3627
  const v = h.map(
3628
3628
  (x, b) => Mi(x, b, h.length)
3629
3629
  );
3630
3630
  return /* @__PURE__ */ f(
3631
- Ae,
3631
+ Re,
3632
3632
  {
3633
3633
  variant: m,
3634
3634
  text: o,
@@ -3652,7 +3652,7 @@ const ai = ({
3652
3652
  Composer: Pi,
3653
3653
  Sent: Fi,
3654
3654
  Received: zi
3655
- }, ke = {
3655
+ }, Ce = {
3656
3656
  Image: Ni,
3657
3657
  Video: $i,
3658
3658
  Audio: qr,
@@ -3683,11 +3683,11 @@ function sn(e) {
3683
3683
  title: H(e.title),
3684
3684
  description: H(e.text),
3685
3685
  url: t,
3686
- thumbnailUrl: ce(s),
3686
+ thumbnailUrl: de(s),
3687
3687
  // Playable clip embedded in a link preview — lets LinkAttachment render its
3688
3688
  // native video/audio player in the hero instead of a static thumbnail.
3689
3689
  sourceUrl: a,
3690
- layout: s || bt(r, a) ? "featured" : "classic",
3690
+ layout: s || vt(r, a) ? "featured" : "classic",
3691
3691
  mimeType: r,
3692
3692
  // Dominant colour of the image, resolved by the sender at stage time and
3693
3693
  // persisted on the attachment (`stream-custom-data.ts`), so every viewer
@@ -3701,7 +3701,7 @@ function sn(e) {
3701
3701
  }
3702
3702
  function Ui(e) {
3703
3703
  var t;
3704
- return Ve(e) ? null : e.type === "image" ? e.image_url || e.asset_url ? "image" : null : e.type === "video" && e.asset_url ? "video" : e.type === "audio" && e.asset_url ? "audio" : e.type === "file" && e.asset_url ? e.mime_type === "application/pdf" ? "pdf" : (t = e.mime_type) != null && t.startsWith("audio/") ? "audio" : "file" : null;
3704
+ return Ge(e) ? null : e.type === "image" ? e.image_url || e.asset_url ? "image" : null : e.type === "video" && e.asset_url ? "video" : e.type === "audio" && e.asset_url ? "audio" : e.type === "file" && e.asset_url ? e.mime_type === "application/pdf" ? "pdf" : (t = e.mime_type) != null && t.startsWith("audio/") ? "audio" : "file" : null;
3705
3705
  }
3706
3706
  function Xn(e) {
3707
3707
  if (!(e != null && e.length)) return [];
@@ -3721,7 +3721,7 @@ function Xn(e) {
3721
3721
  t.push({ type: "link", attachments: [r] });
3722
3722
  };
3723
3723
  for (const r of e) {
3724
- if (Ve(r)) {
3724
+ if (Ge(r)) {
3725
3725
  a(r);
3726
3726
  continue;
3727
3727
  }
@@ -3742,15 +3742,15 @@ function Vi(e) {
3742
3742
  function Gi(e) {
3743
3743
  switch (e) {
3744
3744
  case "image":
3745
- return ke.Image;
3745
+ return Ce.Image;
3746
3746
  case "video":
3747
- return ke.Video;
3747
+ return Ce.Video;
3748
3748
  case "audio":
3749
- return ke.Audio;
3749
+ return Ce.Audio;
3750
3750
  case "pdf":
3751
- return ke.Pdf;
3751
+ return Ce.Pdf;
3752
3752
  default:
3753
- return ke.File;
3753
+ return Ce.File;
3754
3754
  }
3755
3755
  }
3756
3756
  function an(e, t) {
@@ -3820,7 +3820,7 @@ const Ki = ({
3820
3820
  const i = ji(r), o = (v = s.text) == null ? void 0 : v.trim(), l = r.find((x) => x.type === "link"), d = (l == null ? void 0 : l.type) === "link" ? sn(l.attachments[0] ?? {}).url : void 0, u = o && Bi(o, d) ? void 0 : o;
3821
3821
  let h = 0;
3822
3822
  const m = [], g = u ? "middle" : e, c = e === "single" || e === "end", p = (x, b, y) => {
3823
- const _ = t ? it.Sent : it.Received;
3823
+ const _ = t ? lt.Sent : lt.Received;
3824
3824
  m.push(
3825
3825
  /* @__PURE__ */ n(
3826
3826
  _,
@@ -3876,20 +3876,20 @@ const Ki = ({
3876
3876
  },
3877
3877
  children: [
3878
3878
  m,
3879
- !u && /* @__PURE__ */ n(st, {})
3879
+ !u && /* @__PURE__ */ n(at, {})
3880
3880
  ]
3881
3881
  }
3882
3882
  ),
3883
3883
  u ? /* @__PURE__ */ f(
3884
3884
  "div",
3885
3885
  {
3886
- className: N("str-chat__message-bubble", {
3886
+ className: k("str-chat__message-bubble", {
3887
3887
  "relative isolate": c
3888
3888
  }),
3889
3889
  children: [
3890
- /* @__PURE__ */ n(Fe, { message: s, renderText: a }),
3891
- /* @__PURE__ */ n(st, {}),
3892
- c && /* @__PURE__ */ n($e, { side: t ? "me" : "other" })
3890
+ /* @__PURE__ */ n(ze, { message: s, renderText: a }),
3891
+ /* @__PURE__ */ n(at, {}),
3892
+ c && /* @__PURE__ */ n(Be, { side: t ? "me" : "other" })
3893
3893
  ]
3894
3894
  }
3895
3895
  ) : null
@@ -3915,67 +3915,67 @@ const Ki = ({
3915
3915
  viewerLanguage: v,
3916
3916
  onOutboundClick: x,
3917
3917
  resolvedOutbound: b
3918
- } = e, { client: y } = He("CustomMessage"), { channel: _ } = we("CustomMessage"), { isUnlocking: T, onUnlockClick: L, onFetchSource: E, onDownloadClick: z } = sr("LockedAttachment"), [F, R] = $(!1), I = hs(c.id), {
3919
- Attachment: M = fs,
3920
- EditMessageModal: S = gs,
3918
+ } = e, { client: y } = Ve("CustomMessage"), { channel: _ } = _e("CustomMessage"), { isUnlocking: T, onUnlockClick: A, onFetchSource: R, onDownloadClick: z } = sr("LockedAttachment"), [F, L] = $(!1), E = hs(c.id), {
3919
+ Attachment: D = fs,
3920
+ EditMessageModal: I = gs,
3921
3921
  MessageActions: C,
3922
- MessageBlocked: A = ps,
3922
+ MessageBlocked: S = ps,
3923
3923
  MessageBouncePrompt: O = bs,
3924
- MessageDeleted: B = vs,
3925
- MessageIsThreadReplyInChannelButtonIndicator: G = xs,
3926
- MessageRepliesCountButton: ee = ws,
3924
+ MessageDeleted: U = vs,
3925
+ MessageIsThreadReplyInChannelButtonIndicator: j = xs,
3926
+ MessageRepliesCountButton: J = ws,
3927
3927
  ReminderNotification: Z = _s,
3928
- StreamedMessageText: J = ys,
3929
- PinIndicator: j
3930
- } = mn("CustomMessage"), k = Ns(c), D = ks(c), Y = le(
3928
+ StreamedMessageText: Q = ys,
3929
+ PinIndicator: G
3930
+ } = mn("CustomMessage"), N = Ns(c), M = ks(c), Y = oe(
3931
3931
  () => m == null ? void 0 : m(c),
3932
3932
  [m, c]
3933
- ), U = le(() => {
3934
- const he = c.attachments ?? [], pe = c.shared_location ? [c.shared_location, ...he] : he;
3935
- if (!ze(c)) return pe;
3936
- const jt = pe.filter((Ht) => !("type" in Ht) || !Ve(Ht));
3937
- return jt.length === pe.length ? pe : jt;
3938
- }, [c]), Q = le(
3939
- () => Xn(U),
3940
- [U]
3941
- ), X = le(() => {
3942
- const he = kn({ message: c, viewerLanguage: v });
3943
- return he === c.text ? c : { ...c, text: he };
3944
- }, [c, v]), ne = Q.length > 0, ue = Q.reduce(
3945
- (he, pe) => he + pe.attachments.length,
3933
+ ), B = oe(() => {
3934
+ const fe = c.attachments ?? [], be = c.shared_location ? [c.shared_location, ...fe] : fe;
3935
+ if (!$e(c)) return be;
3936
+ const jt = be.filter((Ht) => !("type" in Ht) || !Ge(Ht));
3937
+ return jt.length === be.length ? be : jt;
3938
+ }, [c]), ne = oe(
3939
+ () => Xn(B),
3940
+ [B]
3941
+ ), W = oe(() => {
3942
+ const fe = kn({ message: c, viewerLanguage: v });
3943
+ return fe === c.text ? c : { ...c, text: fe };
3944
+ }, [c, v]), te = ne.length > 0, se = ne.reduce(
3945
+ (fe, be) => fe + be.attachments.length,
3946
3946
  0
3947
- ) === ((U == null ? void 0 : U.length) ?? 0), ae = (i == null ? void 0 : i[0]) ?? "", De = ae === "top" ? "first" : ae === "middle" ? "middle" : ae === "bottom" ? "end" : "single", se = ae === "single" || ae === "bottom";
3947
+ ) === ((B == null ? void 0 : B.length) ?? 0), ie = (i == null ? void 0 : i[0]) ?? "", Oe = ie === "top" ? "first" : ie === "middle" ? "middle" : ie === "bottom" ? "end" : "single", me = ie === "single" || ie === "bottom";
3948
3948
  if (Cs(c))
3949
3949
  return null;
3950
3950
  if (c.deleted_at || c.type === "deleted")
3951
- return /* @__PURE__ */ n(B, { message: c });
3951
+ return /* @__PURE__ */ n(U, { message: c });
3952
3952
  if (Ss(c))
3953
- return /* @__PURE__ */ n(A, {});
3954
- const me = !w && !!c.reply_count, ie = !w && c.show_in_channel && c.parent_id, St = c.status === "failed" && ((Lt = c.error) == null ? void 0 : Lt.status) !== 403, Et = Es(c);
3955
- let ge;
3956
- St ? ge = () => u(c) : Et && (ge = () => R(!0));
3957
- const te = g(), ns = N(
3953
+ return /* @__PURE__ */ n(S, {});
3954
+ const ae = !w && !!c.reply_count, he = !w && c.show_in_channel && c.parent_id, le = c.status === "failed" && ((Lt = c.error) == null ? void 0 : Lt.status) !== 403, Et = Es(c);
3955
+ let pe;
3956
+ le ? pe = () => u(c) : Et && (pe = () => L(!0));
3957
+ const ee = g(), ns = k(
3958
3958
  "str-chat__message str-chat__message-simple",
3959
3959
  `str-chat__message--${c.type}`,
3960
3960
  `str-chat__message--${c.status}`,
3961
- te ? "str-chat__message--me str-chat__message-simple--me" : "str-chat__message--other",
3961
+ ee ? "str-chat__message--me str-chat__message-simple--me" : "str-chat__message--other",
3962
3962
  c.text ? "str-chat__message--has-text" : "has-no-text",
3963
3963
  {
3964
- "str-chat__message--has-attachment": k,
3964
+ "str-chat__message--has-attachment": N,
3965
3965
  "str-chat__message--highlighted": h,
3966
3966
  "str-chat__message--pinned pinned-message": c.pinned,
3967
- "str-chat__message--with-reactions": D,
3967
+ "str-chat__message--with-reactions": M,
3968
3968
  "str-chat__message-send-can-be-retried": (c == null ? void 0 : c.status) === "failed" && ((Mt = c == null ? void 0 : c.error) == null ? void 0 : Mt.status) !== 403,
3969
- "str-chat__message-with-thread-link": me || ie,
3969
+ "str-chat__message-with-thread-link": ae || he,
3970
3970
  "str-chat__virtual-message__wrapper--end": a,
3971
3971
  "str-chat__virtual-message__wrapper--first": r,
3972
3972
  "str-chat__virtual-message__wrapper--group": o
3973
3973
  }
3974
- ), Ye = c.poll_id && y.polls.fromState(c.poll_id), It = ur(c), ye = ze(c), ss = ht(c), We = !!(U != null && U.length && !c.quoted_message), Tt = ye && te && We, as = ne && ue && !c.quoted_message && !Ye && !Y && !ye, At = {
3974
+ ), We = c.poll_id && y.polls.fromState(c.poll_id), It = ur(c), Ne = $e(c), ss = ft(c), Ke = !!(B != null && B.length && !c.quoted_message), Tt = Ne && ee && Ke, as = te && se && !c.quoted_message && !We && !Y && !Ne, At = {
3975
3975
  contentType: "text",
3976
3976
  amountText: (Dt = c.metadata) == null ? void 0 : Dt.amount_text,
3977
3977
  paymentStatus: (Ot = c.metadata) == null ? void 0 : Ot.payment_status,
3978
- renderedText: c.text && /* @__PURE__ */ n(Fe, { message: X, renderText: p })
3978
+ renderedText: c.text && /* @__PURE__ */ n(ze, { message: W, renderText: p })
3979
3979
  }, Rt = {
3980
3980
  contentType: "media",
3981
3981
  title: (Pt = c.metadata) == null ? void 0 : Pt.attachment_title,
@@ -3984,11 +3984,11 @@ const Ki = ({
3984
3984
  amountText: ($t = c.metadata) == null ? void 0 : $t.amount_text,
3985
3985
  detail: (Bt = c.metadata) == null ? void 0 : Bt.attachment_detail,
3986
3986
  paymentStatus: (Ut = c.metadata) == null ? void 0 : Ut.payment_status,
3987
- onFetchSource: E ? () => E(c, _) : void 0
3987
+ onFetchSource: R ? () => R(c, _) : void 0
3988
3988
  };
3989
3989
  return /* @__PURE__ */ f(q, { children: [
3990
3990
  s && /* @__PURE__ */ n(
3991
- S,
3991
+ I,
3992
3992
  {
3993
3993
  additionalMessageInputProps: t
3994
3994
  }
@@ -3997,7 +3997,7 @@ const Ki = ({
3997
3997
  Is,
3998
3998
  {
3999
3999
  MessageBouncePrompt: O,
4000
- onClose: () => R(!1),
4000
+ onClose: () => L(!1),
4001
4001
  open: F
4002
4002
  }
4003
4003
  ),
@@ -4008,10 +4008,10 @@ const Ki = ({
4008
4008
  "data-message-id": c.id,
4009
4009
  "data-dd-privacy": "mask",
4010
4010
  children: [
4011
- j && /* @__PURE__ */ n(j, {}),
4012
- !!I && /* @__PURE__ */ n(Z, { reminder: I }),
4011
+ G && /* @__PURE__ */ n(G, {}),
4012
+ !!E && /* @__PURE__ */ n(Z, { reminder: E }),
4013
4013
  c.user && /* @__PURE__ */ n(
4014
- _e,
4014
+ ye,
4015
4015
  {
4016
4016
  className: "str-chat__avatar str-chat__message-sender-avatar",
4017
4017
  id: c.user.id,
@@ -4019,86 +4019,86 @@ const Ki = ({
4019
4019
  name: c.user.name || c.user.id,
4020
4020
  size: 24,
4021
4021
  shape: "circle",
4022
- dmAgentEnabled: ye
4022
+ dmAgentEnabled: Ne
4023
4023
  }
4024
4024
  ),
4025
4025
  /* @__PURE__ */ n(
4026
4026
  "div",
4027
4027
  {
4028
- className: N("str-chat__message-inner", {
4029
- "str-chat__simple-message--error-failed": St || Et
4028
+ className: k("str-chat__message-inner", {
4029
+ "str-chat__simple-message--error-failed": le || Et
4030
4030
  }),
4031
4031
  "data-testid": "message-inner",
4032
- onClick: ge,
4033
- onKeyDown: ge,
4034
- role: ge ? "button" : void 0,
4035
- tabIndex: ge ? 0 : void 0,
4032
+ onClick: pe,
4033
+ onKeyDown: pe,
4034
+ role: pe ? "button" : void 0,
4035
+ tabIndex: pe ? 0 : void 0,
4036
4036
  style: {
4037
4037
  // Force margins to 0 to prevent hover layout shift
4038
4038
  // Stream Chat CSS sets margin-inline-end/start to 78px, then 0 on hover
4039
4039
  marginInlineEnd: 0,
4040
4040
  marginInlineStart: 0
4041
4041
  },
4042
- children: It ? /* @__PURE__ */ n(Ze, { message: c, standalone: !0 }) : cr(c) ? /* @__PURE__ */ n("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ f("div", { className: "flex items-center gap-2", children: [
4043
- te && C && /* @__PURE__ */ n(C, {}),
4044
- te ? /* @__PURE__ */ n(Pe, { ...At, isMine: !0 }) : /* @__PURE__ */ n(
4045
- Pe,
4042
+ children: It ? /* @__PURE__ */ n(Je, { message: c, standalone: !0 }) : cr(c) ? /* @__PURE__ */ n("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ f("div", { className: "flex items-center gap-2", children: [
4043
+ ee && C && /* @__PURE__ */ n(C, {}),
4044
+ ee ? /* @__PURE__ */ n(Fe, { ...At, isMine: !0 }) : /* @__PURE__ */ n(
4045
+ Fe,
4046
4046
  {
4047
4047
  ...At,
4048
4048
  isMine: !1,
4049
4049
  isUnlocking: T(c.id),
4050
- onUnlockClick: () => L == null ? void 0 : L(c, _)
4050
+ onUnlockClick: () => A == null ? void 0 : A(c, _)
4051
4051
  }
4052
4052
  ),
4053
- !te && C && /* @__PURE__ */ n(C, {})
4053
+ !ee && C && /* @__PURE__ */ n(C, {})
4054
4054
  ] }) }) : dr(c) ? /* @__PURE__ */ f("div", { className: "str-chat__message-bubble-wrapper", children: [
4055
4055
  /* @__PURE__ */ f("div", { className: "flex items-center gap-2", children: [
4056
- te && C && /* @__PURE__ */ n(C, {}),
4057
- te ? /* @__PURE__ */ n(
4058
- Pe,
4056
+ ee && C && /* @__PURE__ */ n(C, {}),
4057
+ ee ? /* @__PURE__ */ n(
4058
+ Fe,
4059
4059
  {
4060
4060
  ...Rt,
4061
4061
  isMine: !0,
4062
- onPreviewClick: () => L ? L(c, _) : void 0
4062
+ onPreviewClick: () => A ? A(c, _) : void 0
4063
4063
  }
4064
4064
  ) : /* @__PURE__ */ n(
4065
- Pe,
4065
+ Fe,
4066
4066
  {
4067
4067
  ...Rt,
4068
4068
  isMine: !1,
4069
4069
  isUnlocking: T(c.id),
4070
- onUnlockClick: () => L ? L(c, _) : void 0,
4070
+ onUnlockClick: () => A ? A(c, _) : void 0,
4071
4071
  onDownloadClick: () => z ? z(c, _) : void 0
4072
4072
  }
4073
4073
  ),
4074
- !te && C && /* @__PURE__ */ n(C, {})
4074
+ !ee && C && /* @__PURE__ */ n(C, {})
4075
4075
  ] }),
4076
4076
  c.text && /* @__PURE__ */ f(
4077
4077
  "div",
4078
4078
  {
4079
- className: N("str-chat__message-bubble", {
4080
- "relative isolate": se
4079
+ className: k("str-chat__message-bubble", {
4080
+ "relative isolate": me
4081
4081
  }),
4082
4082
  children: [
4083
4083
  /* @__PURE__ */ n(
4084
- Fe,
4084
+ ze,
4085
4085
  {
4086
- message: X,
4086
+ message: W,
4087
4087
  renderText: p
4088
4088
  }
4089
4089
  ),
4090
- se && /* @__PURE__ */ n($e, { side: te ? "me" : "other" })
4090
+ me && /* @__PURE__ */ n(Be, { side: ee ? "me" : "other" })
4091
4091
  ]
4092
4092
  }
4093
4093
  )
4094
4094
  ] }) : as ? /* @__PURE__ */ n(
4095
4095
  Ki,
4096
4096
  {
4097
- groupPosition: De,
4098
- isMyMessage: te,
4097
+ groupPosition: Oe,
4098
+ isMyMessage: ee,
4099
4099
  message: {
4100
- ...X,
4101
- attachments: U,
4100
+ ...W,
4101
+ attachments: B,
4102
4102
  // MessageText prefers message.i18n[userLanguage_text] from
4103
4103
  // Stream's TranslationContext over message.text. Drop i18n so
4104
4104
  // the caption uses displayMessage.text from viewerLanguage.
@@ -4109,52 +4109,52 @@ const Ki = ({
4109
4109
  ) : /* @__PURE__ */ n("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ f(
4110
4110
  "div",
4111
4111
  {
4112
- className: N("str-chat__message-bubble", {
4113
- "relative isolate": se
4112
+ className: k("str-chat__message-bubble", {
4113
+ "relative isolate": me
4114
4114
  }),
4115
4115
  children: [
4116
- ye && !Tt && /* @__PURE__ */ n(
4117
- Ze,
4116
+ Ne && !Tt && /* @__PURE__ */ n(
4117
+ Je,
4118
4118
  {
4119
4119
  message: c,
4120
- hasAttachment: We,
4121
- isMyMessage: te
4120
+ hasAttachment: Ke,
4121
+ isMyMessage: ee
4122
4122
  }
4123
4123
  ),
4124
- Ye && /* @__PURE__ */ n(Ts, { poll: Ye }),
4125
- U != null && U.length && !c.quoted_message ? /* @__PURE__ */ n(
4126
- M,
4124
+ We && /* @__PURE__ */ n(Ts, { poll: We }),
4125
+ B != null && B.length && !c.quoted_message ? /* @__PURE__ */ n(
4126
+ D,
4127
4127
  {
4128
4128
  actionHandler: l,
4129
- attachments: U
4129
+ attachments: B
4130
4130
  }
4131
4131
  ) : null,
4132
4132
  Y ? /* @__PURE__ */ n(
4133
- J,
4133
+ Q,
4134
4134
  {
4135
- message: X,
4135
+ message: W,
4136
4136
  renderText: p
4137
4137
  }
4138
4138
  ) : /* @__PURE__ */ n(
4139
- Fe,
4139
+ ze,
4140
4140
  {
4141
- message: X,
4141
+ message: W,
4142
4142
  renderText: p
4143
4143
  }
4144
4144
  ),
4145
- /* @__PURE__ */ n(st, {}),
4146
- se && /* @__PURE__ */ n($e, { side: te ? "me" : "other" })
4145
+ /* @__PURE__ */ n(at, {}),
4146
+ me && /* @__PURE__ */ n(Be, { side: ee ? "me" : "other" })
4147
4147
  ]
4148
4148
  }
4149
4149
  ) })
4150
4150
  }
4151
4151
  ),
4152
- !ss && !It && /* @__PURE__ */ n("div", { className: "str-chat__message-footer", children: (!ye || Tt) && /* @__PURE__ */ n(
4153
- Ze,
4152
+ !ss && !It && /* @__PURE__ */ n("div", { className: "str-chat__message-footer", children: (!Ne || Tt) && /* @__PURE__ */ n(
4153
+ Je,
4154
4154
  {
4155
4155
  message: c,
4156
- hasAttachment: We,
4157
- isMyMessage: te
4156
+ hasAttachment: Ke,
4157
+ isMyMessage: ee
4158
4158
  }
4159
4159
  ) }),
4160
4160
  /* @__PURE__ */ n(
@@ -4164,14 +4164,14 @@ const Ki = ({
4164
4164
  resolvedOutbound: b
4165
4165
  }
4166
4166
  ),
4167
- me && /* @__PURE__ */ n(
4168
- ee,
4167
+ ae && /* @__PURE__ */ n(
4168
+ J,
4169
4169
  {
4170
4170
  onClick: d,
4171
4171
  reply_count: c.reply_count
4172
4172
  }
4173
4173
  ),
4174
- ie && /* @__PURE__ */ n(G, {})
4174
+ he && /* @__PURE__ */ n(j, {})
4175
4175
  ]
4176
4176
  },
4177
4177
  c.id
@@ -4185,7 +4185,7 @@ const Ki = ({
4185
4185
  }
4186
4186
  ), Zi = (e) => {
4187
4187
  var i;
4188
- const t = fe("CustomMessage"), s = xe(Dn), a = (i = t.message.metadata) == null ? void 0 : i.outbound_id, r = typeof a == "string" ? s == null ? void 0 : s[a] : void 0;
4188
+ const t = ge("CustomMessage"), s = we(Dn), a = (i = t.message.metadata) == null ? void 0 : i.outbound_id, r = typeof a == "string" ? s == null ? void 0 : s[a] : void 0;
4189
4189
  return /* @__PURE__ */ n(
4190
4190
  qi,
4191
4191
  {
@@ -4196,7 +4196,7 @@ const Ki = ({
4196
4196
  );
4197
4197
  }, Ji = () => {
4198
4198
  var s;
4199
- const { handleDelete: e, message: t } = fe("CustomMessageActions");
4199
+ const { handleDelete: e, message: t } = ge("CustomMessageActions");
4200
4200
  return ((s = t.metadata) == null ? void 0 : s.payment_status) === "paid" ? null : /* @__PURE__ */ n(
4201
4201
  vn,
4202
4202
  {
@@ -4208,7 +4208,7 @@ const Ki = ({
4208
4208
  }
4209
4209
  );
4210
4210
  }, Qi = () => {
4211
- const { handleFlag: e } = fe("CustomMessageActions");
4211
+ const { handleFlag: e } = ge("CustomMessageActions");
4212
4212
  return /* @__PURE__ */ n(
4213
4213
  vn,
4214
4214
  {
@@ -4221,8 +4221,8 @@ const Ki = ({
4221
4221
  );
4222
4222
  }, el = () => {
4223
4223
  var t;
4224
- const { message: e } = fe("CustomMessageActions");
4225
- return ((t = e.metadata) == null ? void 0 : t.custom_type) !== oe.ATTACHMENT ? null : /* @__PURE__ */ n(
4224
+ const { message: e } = ge("CustomMessageActions");
4225
+ return ((t = e.metadata) == null ? void 0 : t.custom_type) !== ce.ATTACHMENT ? null : /* @__PURE__ */ n(
4226
4226
  wa,
4227
4227
  {
4228
4228
  messageActionSet: [
@@ -4233,7 +4233,7 @@ const Ki = ({
4233
4233
  );
4234
4234
  }, tl = (e) => ({
4235
4235
  linkPreviews: Array.from(e.previews.values()).filter(
4236
- (t) => nt.previewIsLoaded(t) || nt.previewIsLoading(t)
4236
+ (t) => st.previewIsLoaded(t) || st.previewIsLoading(t)
4237
4237
  )
4238
4238
  }), nl = () => {
4239
4239
  const { linkPreviewsManager: e } = As(), { linkPreviews: t } = Rs(
@@ -4287,9 +4287,9 @@ const Ki = ({
4287
4287
  // edge lands ~6px past the fold, reachable by scrolling. That residue
4288
4288
  // belongs to whoever owns the mobile layout contract, not to this component.
4289
4289
  /* @__PURE__ */ n("div", { className: "messaging-link-preview-list flex flex-col items-stretch w-full gap-2", children: t.map((r) => {
4290
- const i = nt.previewIsLoading(r);
4290
+ const i = st.previewIsLoading(r);
4291
4291
  return /* @__PURE__ */ n(
4292
- it.Composer,
4292
+ lt.Composer,
4293
4293
  {
4294
4294
  title: r.title,
4295
4295
  url: r.og_scrape_url,
@@ -4302,7 +4302,7 @@ const Ki = ({
4302
4302
  );
4303
4303
  }) })
4304
4304
  ) : null;
4305
- }, Be = P.createContext(!1), sl = 200, ro = () => xe(Be), al = ({ sendMessage: e, disabled: t, ...s }) => /* @__PURE__ */ n(
4305
+ }, Ue = P.createContext(!1), sl = 200, ro = () => we(Ue), al = ({ sendMessage: e, disabled: t, ...s }) => /* @__PURE__ */ n(
4306
4306
  "button",
4307
4307
  {
4308
4308
  ...s,
@@ -4314,7 +4314,7 @@ const Ki = ({
4314
4314
  children: /* @__PURE__ */ n(ba, { weight: "bold", className: "size-4" })
4315
4315
  }
4316
4316
  ), rn = () => {
4317
- const e = xe(Be), { handleSubmit: t } = Ls(), s = Ms(), a = e || !s, {
4317
+ const e = we(Ue), { handleSubmit: t } = Ls(), s = Ms(), a = e || !s, {
4318
4318
  SendButton: r = al,
4319
4319
  AttachmentPreviewList: i = Ds
4320
4320
  } = mn("CustomMessageInput"), o = P.useRef(null);
@@ -4429,7 +4429,7 @@ const Ki = ({
4429
4429
  composerInput: i
4430
4430
  }) => {
4431
4431
  var h;
4432
- const { channel: o } = we(), l = ((h = o == null ? void 0 : o.data) == null ? void 0 : h.frozen) === !0, d = !!i, u = P.useRef(null);
4432
+ const { channel: o } = _e(), l = ((h = o == null ? void 0 : o.data) == null ? void 0 : h.frozen) === !0, d = !!i, u = P.useRef(null);
4433
4433
  return P.useEffect(() => {
4434
4434
  if (!d)
4435
4435
  return;
@@ -4490,7 +4490,7 @@ const Ki = ({
4490
4490
  className: "message-input flex min-h-0 items-end gap-4 aria-disabled:opacity-40",
4491
4491
  children: [
4492
4492
  e && /* @__PURE__ */ n("div", { className: "flex h-12 shrink-0 items-center justify-center", children: e() }),
4493
- /* @__PURE__ */ n(Be.Provider, { value: l, children: /* @__PURE__ */ n(Vt, { Input: i ?? rn }) })
4493
+ /* @__PURE__ */ n(Ue.Provider, { value: l, children: /* @__PURE__ */ n(Vt, { Input: i ?? rn }) })
4494
4494
  ]
4495
4495
  }
4496
4496
  ),
@@ -4509,7 +4509,7 @@ const Ki = ({
4509
4509
  className: "message-input flex min-h-0 items-end gap-4 aria-disabled:opacity-40",
4510
4510
  children: [
4511
4511
  e && /* @__PURE__ */ n("div", { className: "flex h-12 shrink-0 items-center justify-center", children: e() }),
4512
- /* @__PURE__ */ n(Be.Provider, { value: l, children: /* @__PURE__ */ n(Vt, { Input: rn }) })
4512
+ /* @__PURE__ */ n(Ue.Provider, { value: l, children: /* @__PURE__ */ n(Vt, { Input: rn }) })
4513
4513
  ]
4514
4514
  }
4515
4515
  ),
@@ -4520,7 +4520,7 @@ const Ki = ({
4520
4520
  SYSTEM_DM_AGENT_RESUMED: "DM Agent has rejoined the conversation"
4521
4521
  }, il = ["SYSTEM_AGE_SAFETY_BLOCKED"], ll = {
4522
4522
  SYSTEM_AGE_SAFETY_BLOCKED: "This user isn’t able to reply because they don’t meet our age safety guidelines."
4523
- }, et = "age safety guidelines.", ol = "https://linktr.ee/s/about/contact", cl = (e) => il.includes(
4523
+ }, tt = "age safety guidelines.", ol = "https://linktr.ee/s/about/contact", cl = (e) => il.includes(
4524
4524
  e
4525
4525
  ), dl = (e) => {
4526
4526
  var t;
@@ -4545,10 +4545,10 @@ const Ki = ({
4545
4545
  type: s
4546
4546
  };
4547
4547
  }, ml = (e) => {
4548
- const t = e.indexOf(et);
4548
+ const t = e.indexOf(tt);
4549
4549
  if (t === -1)
4550
4550
  return e;
4551
- const s = t + et.length;
4551
+ const s = t + tt.length;
4552
4552
  return /* @__PURE__ */ f(q, { children: [
4553
4553
  e.slice(0, t),
4554
4554
  /* @__PURE__ */ n(
@@ -4558,7 +4558,7 @@ const Ki = ({
4558
4558
  target: "_blank",
4559
4559
  rel: "noopener noreferrer",
4560
4560
  className: "mes-age-safety-system-message__emphasis font-medium text-inherit underline",
4561
- children: et
4561
+ children: tt
4562
4562
  }
4563
4563
  ),
4564
4564
  e.slice(s)
@@ -4591,7 +4591,7 @@ const Ki = ({
4591
4591
  ]
4592
4592
  }
4593
4593
  ),
4594
- !t && /* @__PURE__ */ n(Ke, { message: e.message })
4594
+ !t && /* @__PURE__ */ n(Xe, { message: e.message })
4595
4595
  ] });
4596
4596
  }
4597
4597
  if ((s == null ? void 0 : s.kind) === "age-safety") {
@@ -4618,7 +4618,7 @@ const Ki = ({
4618
4618
  ]
4619
4619
  }
4620
4620
  ),
4621
- !t && /* @__PURE__ */ n(Ke, { message: e.message })
4621
+ !t && /* @__PURE__ */ n(Xe, { message: e.message })
4622
4622
  ] });
4623
4623
  }
4624
4624
  return /* @__PURE__ */ f("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
@@ -4627,9 +4627,9 @@ const Ki = ({
4627
4627
  /* @__PURE__ */ n("p", { children: e.message.text }),
4628
4628
  /* @__PURE__ */ n("div", { className: "str-chat__message--system__line" })
4629
4629
  ] }),
4630
- !t && /* @__PURE__ */ n(Ke, { message: e.message })
4630
+ !t && /* @__PURE__ */ n(Xe, { message: e.message })
4631
4631
  ] });
4632
- }, qn = je(!1), tt = ({ cx: e, index: t }) => /* @__PURE__ */ n("circle", { cx: e, cy: "6.15", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ n(
4632
+ }, qn = He(!1), nt = ({ cx: e, index: t }) => /* @__PURE__ */ n("circle", { cx: e, cy: "6.15", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ n(
4633
4633
  "animateTransform",
4634
4634
  {
4635
4635
  attributeName: "transform",
@@ -4640,12 +4640,12 @@ const Ki = ({
4640
4640
  repeatCount: "indefinite"
4641
4641
  }
4642
4642
  ) }), fl = /* @__PURE__ */ new Set([
4643
- Xe.Thinking,
4644
- Xe.Generating,
4645
- Xe.ExternalSources
4643
+ qe.Thinking,
4644
+ qe.Generating,
4645
+ qe.ExternalSources
4646
4646
  ]), gl = ({ threadList: e }) => {
4647
4647
  var p, w;
4648
- const { channel: t, channelConfig: s, thread: a } = we(), { client: r } = He(), { typing: i = {} } = Fs(), { aiState: o } = zs(t), l = xe(qn);
4648
+ const { channel: t, channelConfig: s, thread: a } = _e(), { client: r } = Ve(), { typing: i = {} } = Fs(), { aiState: o } = zs(t), l = we(qn);
4649
4649
  if (!e && l && fl.has(o)) {
4650
4650
  const v = pl(t, (p = r.user) == null ? void 0 : p.id);
4651
4651
  return /* @__PURE__ */ n(
@@ -4698,7 +4698,7 @@ const Ki = ({
4698
4698
  },
4699
4699
  children: /* @__PURE__ */ f("div", { className: "str-chat__message str-chat__message-simple str-chat__message--regular str-chat__message--received str-chat__message--other str-chat__message--has-text", children: [
4700
4700
  /* @__PURE__ */ n(
4701
- _e,
4701
+ ye,
4702
4702
  {
4703
4703
  className: "str-chat__avatar str-chat__message-sender-avatar",
4704
4704
  id: e,
@@ -4719,13 +4719,13 @@ const Ki = ({
4719
4719
  height: "13",
4720
4720
  overflow: "visible",
4721
4721
  children: [
4722
- /* @__PURE__ */ n(tt, { cx: "4", index: 0 }),
4723
- /* @__PURE__ */ n(tt, { cx: "16", index: 1 }),
4724
- /* @__PURE__ */ n(tt, { cx: "28", index: 2 })
4722
+ /* @__PURE__ */ n(nt, { cx: "4", index: 0 }),
4723
+ /* @__PURE__ */ n(nt, { cx: "16", index: 1 }),
4724
+ /* @__PURE__ */ n(nt, { cx: "28", index: 2 })
4725
4725
  ]
4726
4726
  }
4727
4727
  ) }) }),
4728
- /* @__PURE__ */ n($e, { side: "other" })
4728
+ /* @__PURE__ */ n(Be, { side: "other" })
4729
4729
  ] }) }) })
4730
4730
  ] })
4731
4731
  }
@@ -4742,7 +4742,7 @@ function pl(e, t) {
4742
4742
  const bl = () => null, vl = ({ className: e, message: t }) => /* @__PURE__ */ f(
4743
4743
  "div",
4744
4744
  {
4745
- className: N("flex items-center justify-center h-full", e),
4745
+ className: k("flex items-center justify-center h-full", e),
4746
4746
  children: [
4747
4747
  /* @__PURE__ */ f("svg", { viewBox: "0 0 100 100", className: "size-8 fill-pebble", stroke: "none", children: [
4748
4748
  /* @__PURE__ */ n("circle", { cx: "6", cy: "50", r: "6", children: /* @__PURE__ */ n(
@@ -4782,11 +4782,11 @@ const bl = () => null, vl = ({ className: e, message: t }) => /* @__PURE__ */ f(
4782
4782
  t && /* @__PURE__ */ n("span", { className: "text-stone", children: t })
4783
4783
  ]
4784
4784
  }
4785
- ), Ue = P.memo(() => /* @__PURE__ */ n("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ f("div", { className: "flex items-center", children: [
4785
+ ), je = P.memo(() => /* @__PURE__ */ n("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ f("div", { className: "flex items-center", children: [
4786
4786
  /* @__PURE__ */ n(vl, { className: "w-6 h-6" }),
4787
4787
  /* @__PURE__ */ n("span", { className: "text-sm text-stone", children: "Loading messages" })
4788
4788
  ] }) }));
4789
- Ue.displayName = "LoadingState";
4789
+ je.displayName = "LoadingState";
4790
4790
  const xl = ({
4791
4791
  onBack: e,
4792
4792
  showBackButton: t,
@@ -4810,21 +4810,21 @@ const xl = ({
4810
4810
  renderMessage: y,
4811
4811
  viewerLanguage: _,
4812
4812
  showChannelInfo: T = !0,
4813
- onParticipantNameClick: L,
4814
- onOutboundClick: E,
4813
+ onParticipantNameClick: A,
4814
+ onOutboundClick: R,
4815
4815
  resolveOutbound: z,
4816
4816
  composerInput: F
4817
4817
  }) => {
4818
- const { channel: R, messages: I } = we(), M = V(E);
4819
- W(() => {
4820
- M.current = E;
4821
- }, [E]);
4822
- const S = K((Z) => {
4823
- var J;
4824
- (J = M.current) == null || J.call(M, Z);
4825
- }, []), C = E ? S : void 0, A = pr(I, z), O = R.state.messages.some(
4818
+ const { channel: L, messages: E } = _e(), D = V(R);
4819
+ K(() => {
4820
+ D.current = R;
4821
+ }, [R]);
4822
+ const I = X((Z) => {
4823
+ var Q;
4824
+ (Q = D.current) == null || Q.call(D, Z);
4825
+ }, []), C = R ? I : void 0, S = pr(E, z), O = L.state.messages.some(
4826
4826
  (Z) => Z.type !== "deleted"
4827
- ), B = v ? /* @__PURE__ */ n(P.Fragment, { children: v() }, "lt-channel-banner") : null, G = /* @__PURE__ */ n(
4827
+ ), U = v ? /* @__PURE__ */ n(P.Fragment, { children: v() }, "lt-channel-banner") : null, j = /* @__PURE__ */ n(
4828
4828
  La,
4829
4829
  {
4830
4830
  className: "-mx-[var(--str-chat\\_\\_spacing-2)] px-[var(--str-chat\\_\\_spacing-2)] md:-mx-[min(var(--str-chat\\_\\_spacing-10),4%)] md:px-[min(var(--str-chat\\_\\_spacing-10),4%)]",
@@ -4842,11 +4842,11 @@ const xl = ({
4842
4842
  onReportParticipantClick: h,
4843
4843
  customChannelActions: x,
4844
4844
  renderChannelActions: b,
4845
- onParticipantNameClick: L
4845
+ onParticipantNameClick: A
4846
4846
  }
4847
- ), ee = K(
4847
+ ), J = X(
4848
4848
  (Z) => {
4849
- const { message: J } = fe("ChannelView"), j = /* @__PURE__ */ n(
4849
+ const { message: Q } = ge("ChannelView"), G = /* @__PURE__ */ n(
4850
4850
  Zi,
4851
4851
  {
4852
4852
  ...Z,
@@ -4854,15 +4854,15 @@ const xl = ({
4854
4854
  onOutboundClick: C
4855
4855
  }
4856
4856
  );
4857
- return !y || !J ? j : y(j, J);
4857
+ return !y || !Q ? G : y(G, Q);
4858
4858
  },
4859
4859
  [C, y, _]
4860
4860
  );
4861
- return /* @__PURE__ */ n(Dn.Provider, { value: A, children: /* @__PURE__ */ n(
4861
+ return /* @__PURE__ */ n(Dn.Provider, { value: S, children: /* @__PURE__ */ n(
4862
4862
  Bs,
4863
4863
  {
4864
4864
  overrides: {
4865
- Message: ee,
4865
+ Message: J,
4866
4866
  MessageActions: el,
4867
4867
  UnreadMessagesNotification: () => null,
4868
4868
  UnreadMessagesSeparator: () => null
@@ -4874,15 +4874,15 @@ const xl = ({
4874
4874
  className: "messaging-channel-message-list messaging-channel-message-list--floating relative min-h-0 flex-1 overflow-hidden",
4875
4875
  children: [
4876
4876
  !O && /* @__PURE__ */ n("div", { className: "str-chat__list", children: /* @__PURE__ */ f("div", { className: "str-chat__message-list-scroll", children: [
4877
- G,
4878
- B
4877
+ j,
4878
+ U
4879
4879
  ] }) }),
4880
4880
  /* @__PURE__ */ n(
4881
4881
  Gt,
4882
4882
  {
4883
4883
  head: O ? /* @__PURE__ */ f("div", { className: "sticky top-0 z-10", children: [
4884
- G,
4885
- B
4884
+ j,
4885
+ U
4886
4886
  ] }) : void 0,
4887
4887
  hideDeletedMessages: !0,
4888
4888
  hideNewMessageSeparator: !1
@@ -4896,12 +4896,12 @@ const xl = ({
4896
4896
  on,
4897
4897
  {
4898
4898
  ...s && {
4899
- renderActions: () => s == null ? void 0 : s(R)
4899
+ renderActions: () => s == null ? void 0 : s(L)
4900
4900
  },
4901
4901
  ...r && {
4902
- renderHeader: () => r(R)
4902
+ renderHeader: () => r(L)
4903
4903
  },
4904
- renderFooter: () => a == null ? void 0 : a(R),
4904
+ renderFooter: () => a == null ? void 0 : a(L),
4905
4905
  disabled: c,
4906
4906
  disabledReason: p,
4907
4907
  composerInput: F
@@ -4915,15 +4915,15 @@ const xl = ({
4915
4915
  className: "flex-1 overflow-hidden relative",
4916
4916
  children: [
4917
4917
  !O && /* @__PURE__ */ n("div", { className: "str-chat__list", children: /* @__PURE__ */ f("div", { className: "str-chat__message-list-scroll", children: [
4918
- G,
4919
- B
4918
+ j,
4919
+ U
4920
4920
  ] }) }),
4921
4921
  /* @__PURE__ */ n(
4922
4922
  Gt,
4923
4923
  {
4924
4924
  head: O ? /* @__PURE__ */ f("div", { className: "sticky top-0 z-10", children: [
4925
- G,
4926
- B
4925
+ j,
4926
+ U
4927
4927
  ] }) : void 0,
4928
4928
  hideDeletedMessages: !0,
4929
4929
  hideNewMessageSeparator: !1
@@ -4933,14 +4933,14 @@ const xl = ({
4933
4933
  },
4934
4934
  "lt-channel-message-list"
4935
4935
  ),
4936
- r ? /* @__PURE__ */ n(P.Fragment, { children: r(R) }, "lt-channel-conversation-footer") : null,
4936
+ r ? /* @__PURE__ */ n(P.Fragment, { children: r(L) }, "lt-channel-conversation-footer") : null,
4937
4937
  /* @__PURE__ */ n(
4938
4938
  on,
4939
4939
  {
4940
4940
  ...s && {
4941
- renderActions: () => s == null ? void 0 : s(R)
4941
+ renderActions: () => s == null ? void 0 : s(L)
4942
4942
  },
4943
- renderFooter: () => a == null ? void 0 : a(R),
4943
+ renderFooter: () => a == null ? void 0 : a(L),
4944
4944
  disabled: c,
4945
4945
  disabledReason: p,
4946
4946
  composerInput: F
@@ -4974,74 +4974,74 @@ const xl = ({
4974
4974
  messageMetadata: y,
4975
4975
  onMessageSent: _,
4976
4976
  showStarButton: T = !1,
4977
- renderChannelBanner: L,
4978
- customChannelActions: E,
4977
+ renderChannelBanner: A,
4978
+ customChannelActions: R,
4979
4979
  renderChannelActions: z,
4980
4980
  renderMessage: F,
4981
- onMessageLinkClick: R,
4982
- sendButton: I,
4983
- attachmentPreviewList: M,
4984
- viewerLanguage: S,
4981
+ onMessageLinkClick: L,
4982
+ sendButton: E,
4983
+ attachmentPreviewList: D,
4984
+ viewerLanguage: I,
4985
4985
  showChannelInfo: C = !0,
4986
- onParticipantNameClick: A,
4986
+ onParticipantNameClick: S,
4987
4987
  onOutboundClick: O,
4988
- resolveOutbound: B,
4989
- composerInput: G
4988
+ resolveOutbound: U,
4989
+ composerInput: j
4990
4990
  }) => {
4991
- const ee = K(
4992
- async (j, k, D) => {
4993
- var ue;
4994
- const Y = ((ue = e.data) == null ? void 0 : ue.chatbot_paused) === !0, U = b && !Y, Q = {
4995
- ...k,
4996
- ...U && { silent: !0 },
4991
+ const J = X(
4992
+ async (G, N, M) => {
4993
+ var se;
4994
+ const Y = ((se = e.data) == null ? void 0 : se.chatbot_paused) === !0, B = b && !Y, ne = {
4995
+ ...N,
4996
+ ...B && { silent: !0 },
4997
4997
  ...y && {
4998
4998
  metadata: {
4999
- ...k.metadata ?? {},
4999
+ ...N.metadata ?? {},
5000
5000
  ...y
5001
5001
  }
5002
5002
  }
5003
- }, X = {
5004
- ...D,
5005
- ...U && { skip_push: !0 }
5006
- }, ne = await e.sendMessage(Q, X);
5007
- return _ == null || _(ne), ne;
5003
+ }, W = {
5004
+ ...M,
5005
+ ...B && { skip_push: !0 }
5006
+ }, te = await e.sendMessage(ne, W);
5007
+ return _ == null || _(te), te;
5008
5008
  },
5009
5009
  [e, b, y, _]
5010
5010
  ), Z = V(null);
5011
- W(() => {
5012
- if (!R) return;
5013
- const j = Z.current;
5014
- if (!j) return;
5015
- const k = (D) => {
5016
- const Y = D.target, U = Y == null ? void 0 : Y.closest("a[href]"), Q = U == null ? void 0 : U.getAttribute("href");
5017
- if (!Q) return;
5018
- const X = U == null ? void 0 : U.closest("[data-message-id]"), ne = X == null ? void 0 : X.getAttribute("data-message-id"), ue = ne ? e.state.messages.find((ae) => ae.id === ne) : void 0;
5019
- R(Q, ue);
5011
+ K(() => {
5012
+ if (!L) return;
5013
+ const G = Z.current;
5014
+ if (!G) return;
5015
+ const N = (M) => {
5016
+ const Y = M.target, B = Y == null ? void 0 : Y.closest("a[href]"), ne = B == null ? void 0 : B.getAttribute("href");
5017
+ if (!ne) return;
5018
+ const W = B == null ? void 0 : B.closest("[data-message-id]"), te = W == null ? void 0 : W.getAttribute("data-message-id"), se = te ? e.state.messages.find((ie) => ie.id === te) : void 0;
5019
+ L(ne, se);
5020
5020
  };
5021
- return j.addEventListener("click", k), () => j.removeEventListener("click", k);
5022
- }, [R, e]);
5023
- const J = hn(e.type) ? { "--lt-msg-card-width": "368px" } : void 0;
5021
+ return G.addEventListener("click", N), () => G.removeEventListener("click", N);
5022
+ }, [L, e]);
5023
+ const Q = hn(e.type) ? { "--lt-msg-card-width": "368px" } : void 0;
5024
5024
  return /* @__PURE__ */ n(
5025
5025
  "div",
5026
5026
  {
5027
5027
  ref: Z,
5028
- className: N(
5028
+ className: k(
5029
5029
  "messaging-channel-view h-full flex flex-col",
5030
5030
  d
5031
5031
  ),
5032
- style: J,
5032
+ style: Q,
5033
5033
  children: /* @__PURE__ */ n(qn.Provider, { value: b ?? !1, children: /* @__PURE__ */ n(
5034
5034
  $s,
5035
5035
  {
5036
5036
  channel: e,
5037
5037
  MessageSystem: hl,
5038
5038
  EmptyStateIndicator: u,
5039
- LoadingIndicator: Ue,
5039
+ LoadingIndicator: je,
5040
5040
  DateSeparator: Ma,
5041
5041
  TypingIndicator: gl,
5042
- doSendMessageRequest: ee,
5043
- ...I ? { SendButton: I } : {},
5044
- ...M ? { AttachmentPreviewList: M } : {},
5042
+ doSendMessageRequest: J,
5043
+ ...E ? { SendButton: E } : {},
5044
+ ...D ? { AttachmentPreviewList: D } : {},
5045
5045
  children: /* @__PURE__ */ n(
5046
5046
  xl,
5047
5047
  {
@@ -5062,16 +5062,16 @@ const xl = ({
5062
5062
  composerDisabled: v,
5063
5063
  composerDisabledReason: x,
5064
5064
  showStarButton: T,
5065
- renderChannelBanner: L,
5066
- customChannelActions: E,
5065
+ renderChannelBanner: A,
5066
+ customChannelActions: R,
5067
5067
  renderChannelActions: z,
5068
5068
  renderMessage: F,
5069
- viewerLanguage: S,
5069
+ viewerLanguage: I,
5070
5070
  showChannelInfo: C,
5071
- onParticipantNameClick: A,
5071
+ onParticipantNameClick: S,
5072
5072
  onOutboundClick: O,
5073
- resolveOutbound: B,
5074
- composerInput: G
5073
+ resolveOutbound: U,
5074
+ composerInput: j
5075
5075
  }
5076
5076
  )
5077
5077
  }
@@ -5081,7 +5081,7 @@ const xl = ({
5081
5081
  }
5082
5082
  );
5083
5083
  Zn.displayName = "ChannelView";
5084
- const Ce = P.memo(({ message: e, onBack: t }) => /* @__PURE__ */ n("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ f("div", { className: "text-center max-w-sm", children: [
5084
+ const Se = P.memo(({ message: e, onBack: t }) => /* @__PURE__ */ n("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ f("div", { className: "text-center max-w-sm", children: [
5085
5085
  /* @__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: "⚠️" }) }),
5086
5086
  /* @__PURE__ */ n("h2", { className: "font-semibold text-charcoal mb-2", children: "Oops!" }),
5087
5087
  /* @__PURE__ */ n("p", { className: "text-stone text-sm mb-6", children: e }),
@@ -5095,7 +5095,7 @@ const Ce = P.memo(({ message: e, onBack: t }) => /* @__PURE__ */ n("div", { clas
5095
5095
  }
5096
5096
  )
5097
5097
  ] }) }));
5098
- Ce.displayName = "ErrorState";
5098
+ Se.displayName = "ErrorState";
5099
5099
  const io = ({
5100
5100
  capabilities: e = {},
5101
5101
  renderMessageInputActions: t,
@@ -5119,110 +5119,111 @@ const io = ({
5119
5119
  renderMessage: y,
5120
5120
  onMessageLinkClick: _,
5121
5121
  showChannelInfo: T,
5122
- composerInput: L
5122
+ composerInput: A,
5123
+ attachmentPreviewList: R
5123
5124
  }) => {
5124
5125
  const {
5125
- client: E,
5126
- isConnected: z,
5127
- isLoading: F,
5128
- error: R,
5129
- refreshConnection: I,
5130
- service: M,
5131
- debug: S
5132
- } = _a(), [C, A] = $(null), [O, B] = $(null), [G, ee] = $(!1), { showDeleteConversation: Z = !0 } = e, J = V(o);
5133
- J.current = o;
5134
- const j = V(a);
5135
- j.current = a;
5136
- const k = V(null), D = V(null);
5137
- W(() => {
5138
- D.current = C;
5139
- }, [C]), W(() => {
5140
- if (!E || !z) return;
5141
- const Q = E.userID;
5142
- if (!Q) return;
5143
- const X = `${Q}::${i}`;
5144
- if (k.current === X) return;
5145
- k.current = X;
5146
- const ne = () => {
5147
- k.current === X && (k.current = null);
5126
+ client: z,
5127
+ isConnected: F,
5128
+ isLoading: L,
5129
+ error: E,
5130
+ refreshConnection: D,
5131
+ service: I,
5132
+ debug: C
5133
+ } = _a(), [S, O] = $(null), [U, j] = $(null), [J, Z] = $(!1), { showDeleteConversation: Q = !0 } = e, G = V(o);
5134
+ G.current = o;
5135
+ const N = V(a);
5136
+ N.current = a;
5137
+ const M = V(null), Y = V(null);
5138
+ K(() => {
5139
+ Y.current = S;
5140
+ }, [S]), K(() => {
5141
+ if (!z || !F) return;
5142
+ const W = z.userID;
5143
+ if (!W) return;
5144
+ const te = `${W}::${i}`;
5145
+ if (M.current === te) return;
5146
+ M.current = te;
5147
+ const se = () => {
5148
+ M.current === te && (M.current = null);
5148
5149
  };
5149
5150
  (async () => {
5150
- var ae, De;
5151
+ var Oe, me;
5151
5152
  try {
5152
- S && console.log(
5153
+ C && console.log(
5153
5154
  "[MessagingShell] Loading initial conversation with:",
5154
5155
  i
5155
5156
  );
5156
- const se = await E.queryChannels(
5157
+ const ae = await z.queryChannels(
5157
5158
  {
5158
5159
  type: "messaging",
5159
- members: { $eq: [Q, i] }
5160
+ members: { $eq: [W, i] }
5160
5161
  },
5161
5162
  {},
5162
5163
  { limit: 1 }
5163
5164
  );
5164
- if (se.length > 0) {
5165
- A(se[0]), B(null), (ae = j.current) == null || ae.call(j, se[0]), S && console.log(
5165
+ if (ae.length > 0) {
5166
+ O(ae[0]), j(null), (Oe = N.current) == null || Oe.call(N, ae[0]), C && console.log(
5166
5167
  "[MessagingShell] Initial conversation loaded:",
5167
- se[0].id
5168
+ ae[0].id
5168
5169
  );
5169
5170
  return;
5170
5171
  }
5171
- const me = J.current;
5172
- if (!me || !M) {
5173
- ne(), B("No conversation found with this account"), S && console.log(
5172
+ const he = G.current;
5173
+ if (!he || !I) {
5174
+ se(), j("No conversation found with this account"), C && console.log(
5174
5175
  "[MessagingShell] No conversation found for:",
5175
5176
  i
5176
5177
  );
5177
5178
  return;
5178
5179
  }
5179
5180
  try {
5180
- const ie = await M.startChannelWithParticipant({
5181
- id: me.id,
5182
- name: me.name,
5183
- phone: me.phone
5181
+ const le = await I.startChannelWithParticipant({
5182
+ id: he.id,
5183
+ name: he.name,
5184
+ phone: he.phone
5184
5185
  });
5185
- A(ie), B(null), (De = j.current) == null || De.call(j, ie), S && console.log(
5186
+ O(le), j(null), (me = N.current) == null || me.call(N, le), C && console.log(
5186
5187
  "[MessagingShell] Channel created and loaded:",
5187
- ie.id
5188
+ le.id
5188
5189
  );
5189
- } catch (ie) {
5190
+ } catch (le) {
5190
5191
  console.error(
5191
5192
  "[MessagingShell] Failed to create conversation:",
5192
- ie
5193
- ), ne(), B("Failed to create conversation");
5193
+ le
5194
+ ), se(), j("Failed to create conversation");
5194
5195
  }
5195
- } catch (se) {
5196
+ } catch (ae) {
5196
5197
  console.error(
5197
5198
  "[MessagingShell] Failed to load initial conversation:",
5198
- se
5199
- ), ne(), D.current || B("Failed to load conversation");
5199
+ ae
5200
+ ), se(), Y.current || j("Failed to load conversation");
5200
5201
  }
5201
5202
  })();
5202
- }, [i, E, z, M, S]);
5203
- const Y = V(r);
5204
- Y.current = r;
5205
- const U = K(() => {
5206
- var Q;
5207
- A(null), ee(!0), (Q = Y.current) == null || Q.call(Y);
5203
+ }, [i, z, F, I, C]);
5204
+ const B = V(r);
5205
+ B.current = r;
5206
+ const ne = X(() => {
5207
+ var W;
5208
+ O(null), Z(!0), (W = B.current) == null || W.call(B);
5208
5209
  }, []);
5209
- return F ? /* @__PURE__ */ n(Ue, {}) : R ? /* @__PURE__ */ n(Ce, { message: R, onBack: I }) : !z || !E ? /* @__PURE__ */ n(
5210
- Ce,
5210
+ return L ? /* @__PURE__ */ n(je, {}) : E ? /* @__PURE__ */ n(Se, { message: E, onBack: D }) : !F || !z ? /* @__PURE__ */ n(
5211
+ Se,
5211
5212
  {
5212
5213
  message: "Not connected to messaging service",
5213
- onBack: I
5214
+ onBack: D
5214
5215
  }
5215
- ) : O ? /* @__PURE__ */ n(Ce, { message: O }) : G && !C ? /* @__PURE__ */ n(Ce, { message: "Conversation ended" }) : C ? /* @__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(
5216
+ ) : U ? /* @__PURE__ */ n(Se, { message: U }) : J && !S ? /* @__PURE__ */ n(Se, { message: "Conversation ended" }) : S ? /* @__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(
5216
5217
  Zn,
5217
5218
  {
5218
- channel: C,
5219
+ channel: S,
5219
5220
  renderMessageInputActions: t,
5220
5221
  renderConversationFooter: s,
5221
5222
  renderChannelBanner: c,
5222
- onLeaveConversation: U,
5223
- onBlockParticipant: U,
5223
+ onLeaveConversation: ne,
5224
+ onBlockParticipant: ne,
5224
5225
  CustomChannelEmptyState: l,
5225
- showDeleteConversation: Z,
5226
+ showDeleteConversation: Q,
5226
5227
  onBlockParticipantClick: d,
5227
5228
  onReportParticipantClick: u,
5228
5229
  dmAgentEnabled: h,
@@ -5236,10 +5237,11 @@ const io = ({
5236
5237
  renderMessage: y,
5237
5238
  onMessageLinkClick: _,
5238
5239
  showChannelInfo: T,
5239
- composerInput: L
5240
+ composerInput: A,
5241
+ attachmentPreviewList: R
5240
5242
  },
5241
- C.id
5242
- ) }) }) : /* @__PURE__ */ n(Ue, {});
5243
+ S.id
5244
+ ) }) }) : /* @__PURE__ */ n(je, {});
5243
5245
  };
5244
5246
  function wl(e) {
5245
5247
  const t = e.state.pending_messages;
@@ -5277,7 +5279,7 @@ const Jn = P.createContext({
5277
5279
  });
5278
5280
  }, Qn = P.memo(
5279
5281
  (e) => {
5280
- var z, F, R;
5282
+ var z, F, L;
5281
5283
  const { channel: t, unread: s } = e, {
5282
5284
  selectedChannel: a,
5283
5285
  onChannelSelect: r,
@@ -5285,7 +5287,7 @@ const Jn = P.createContext({
5285
5287
  channelPreview: o,
5286
5288
  renderMessagePreview: l,
5287
5289
  viewerLanguage: d
5288
- } = yl(), { client: u } = He(), h = (a == null ? void 0 : a.id) === (t == null ? void 0 : t.id), m = wn(t);
5290
+ } = yl(), { client: u } = Ve(), h = (a == null ? void 0 : a.id) === (t == null ? void 0 : t.id), m = wn(t);
5289
5291
  if (o)
5290
5292
  return /* @__PURE__ */ n(
5291
5293
  o,
@@ -5299,45 +5301,45 @@ const Jn = P.createContext({
5299
5301
  );
5300
5302
  const g = () => {
5301
5303
  t && r(t);
5302
- }, c = (I) => {
5303
- const M = I.key === "Enter" || I.key === " ", S = I.repeat;
5304
- !M || S || (I.preventDefault(), g());
5304
+ }, c = (E) => {
5305
+ const D = E.key === "Enter" || E.key === " ", I = E.repeat;
5306
+ !D || I || (E.preventDefault(), g());
5305
5307
  }, p = _n(
5306
5308
  (z = t == null ? void 0 : t.state) == null ? void 0 : z.members,
5307
5309
  u == null ? void 0 : u.userID,
5308
5310
  t == null ? void 0 : t.type
5309
5311
  ), w = yn(p == null ? void 0 : p.user), v = (F = p == null ? void 0 : p.user) == null ? void 0 : F.image, x = (() => {
5310
- var M;
5311
- const I = (M = t == null ? void 0 : t.state) == null ? void 0 : M.messages;
5312
- if (I != null && I.length) {
5313
- for (let S = I.length - 1; S >= 0; S--)
5314
- if (I[S].type !== "system") return I[S];
5312
+ var D;
5313
+ const E = (D = t == null ? void 0 : t.state) == null ? void 0 : D.messages;
5314
+ if (E != null && E.length) {
5315
+ for (let I = E.length - 1; I >= 0; I--)
5316
+ if (E[I].type !== "system") return E[I];
5315
5317
  }
5316
5318
  })(), y = (() => {
5317
- var A;
5318
- const I = kn({
5319
+ var S;
5320
+ const E = kn({
5319
5321
  message: x,
5320
5322
  viewerLanguage: d
5321
- }), { custom_type: M, attachment_content_type: S } = (x == null ? void 0 : x.metadata) || {};
5322
- if (M === oe.TIP)
5323
- return I || "Sent a tip";
5324
- if (M === oe.PAID)
5325
- return I || "Sent a message";
5326
- if (M === oe.ATTACHMENT) {
5327
- if (S === "text")
5323
+ }), { custom_type: D, attachment_content_type: I } = (x == null ? void 0 : x.metadata) || {};
5324
+ if (D === ce.TIP)
5325
+ return E || "Sent a tip";
5326
+ if (D === ce.PAID)
5327
+ return E || "Sent a message";
5328
+ if (D === ce.ATTACHMENT) {
5329
+ if (I === "text")
5328
5330
  return "🔒 Sent a locked message";
5329
- if (S === "media")
5331
+ if (I === "media")
5330
5332
  return "🔒 Sent a locked attachment";
5331
5333
  }
5332
- if (I) return I;
5333
- const C = (A = x == null ? void 0 : x.attachments) == null ? void 0 : A[0];
5334
+ if (E) return E;
5335
+ const C = (S = x == null ? void 0 : x.attachments) == null ? void 0 : S[0];
5334
5336
  return C ? C.og_scrape_url ? C.og_scrape_url : C.type === "image" ? "📷 Sent an image" : C.type === "video" ? "🎥 Sent a video" : C.type === "audio" ? "🎵 Sent audio" : C.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
5335
- })(), _ = x != null && x.created_at ? kl(new Date(x.created_at)) : "", T = x ? ze(x) : !1, L = l ? l(x, y) : `${T ? "✨ " : ""}${y}`, E = s ?? 0;
5337
+ })(), _ = x != null && x.created_at ? kl(new Date(x.created_at)) : "", T = x ? $e(x) : !1, A = l ? l(x, y) : `${T ? "✨ " : ""}${y}`, R = s ?? 0;
5336
5338
  return i && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
5337
5339
  channelId: t == null ? void 0 : t.id,
5338
5340
  isSelected: h,
5339
5341
  participantName: w,
5340
- unreadCount: E,
5342
+ unreadCount: R,
5341
5343
  hasTimestamp: !!_
5342
5344
  }), /* @__PURE__ */ n(
5343
5345
  "div",
@@ -5346,7 +5348,7 @@ const Jn = P.createContext({
5346
5348
  tabIndex: 0,
5347
5349
  onClick: g,
5348
5350
  onKeyDown: c,
5349
- className: N(
5351
+ className: k(
5350
5352
  "group w-full px-4 py-3 transition-colors text-left max-w-full overflow-hidden focus-ring rounded-[12px] [&+&]:mt-2",
5351
5353
  {
5352
5354
  "bg-black/[0.04]": h,
@@ -5356,9 +5358,9 @@ const Jn = P.createContext({
5356
5358
  "data-dd-privacy": "mask",
5357
5359
  children: /* @__PURE__ */ f("div", { className: "flex items-start gap-4", children: [
5358
5360
  /* @__PURE__ */ n(
5359
- _e,
5361
+ ye,
5360
5362
  {
5361
- id: ((R = p == null ? void 0 : p.user) == null ? void 0 : R.id) || t.id || "unknown",
5363
+ id: ((L = p == null ? void 0 : p.user) == null ? void 0 : L.id) || t.id || "unknown",
5362
5364
  name: w,
5363
5365
  image: v,
5364
5366
  size: 48,
@@ -5370,7 +5372,7 @@ const Jn = P.createContext({
5370
5372
  /* @__PURE__ */ f(
5371
5373
  "h3",
5372
5374
  {
5373
- className: N(
5375
+ className: k(
5374
5376
  "text-sm font-medium truncate text-[#191918]"
5375
5377
  ),
5376
5378
  children: [
@@ -5382,8 +5384,8 @@ const Jn = P.createContext({
5382
5384
  _ && /* @__PURE__ */ n("span", { className: "text-xs text-[#717070] flex-shrink-0", children: _ })
5383
5385
  ] }),
5384
5386
  /* @__PURE__ */ f("div", { className: "flex items-center justify-between gap-2 min-w-0", children: [
5385
- /* @__PURE__ */ n("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: L }),
5386
- E > 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: E > 99 ? "99+" : E })
5387
+ /* @__PURE__ */ n("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: A }),
5388
+ 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 })
5387
5389
  ] })
5388
5390
  ] })
5389
5391
  ] })
@@ -5415,11 +5417,11 @@ const Cl = { last_message_at: -1 }, Sl = P.memo(
5415
5417
  }) => {
5416
5418
  const b = P.useRef(0);
5417
5419
  b.current++;
5418
- const { debug: y = !1 } = ot(), _ = P.useCallback(
5419
- (L) => {
5420
- for (const E of L)
5421
- wl(E);
5422
- return r ? r(L) : L;
5420
+ const { debug: y = !1 } = ct(), _ = P.useCallback(
5421
+ (A) => {
5422
+ for (const R of A)
5423
+ wl(R);
5424
+ return r ? r(A) : A;
5423
5425
  },
5424
5426
  [r]
5425
5427
  );
@@ -5449,7 +5451,7 @@ const Cl = { last_message_at: -1 }, Sl = P.memo(
5449
5451
  return /* @__PURE__ */ n(
5450
5452
  "div",
5451
5453
  {
5452
- className: N(
5454
+ className: k(
5453
5455
  "messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden",
5454
5456
  o
5455
5457
  ),
@@ -5484,7 +5486,7 @@ const El = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
5484
5486
  return /* @__PURE__ */ n(
5485
5487
  "div",
5486
5488
  {
5487
- className: N(
5489
+ className: k(
5488
5490
  "flex gap-2",
5489
5491
  // `row` is capped (`max-w-[60%]`) and shrinkable (`min-w-0`) so a long
5490
5492
  // or localized secondary label can never grow the footer past the
@@ -5528,7 +5530,7 @@ const El = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
5528
5530
  /* @__PURE__ */ n(
5529
5531
  "p",
5530
5532
  {
5531
- className: N("min-w-0", El),
5533
+ className: k("min-w-0", El),
5532
5534
  style: h,
5533
5535
  children: s
5534
5536
  }
@@ -5537,7 +5539,7 @@ const El = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
5537
5539
  d && /* @__PURE__ */ n(
5538
5540
  "p",
5539
5541
  {
5540
- className: N(
5542
+ className: k(
5541
5543
  Il,
5542
5544
  r > 1 && "whitespace-pre-line",
5543
5545
  r <= 1 && "truncate"
@@ -5588,14 +5590,14 @@ const El = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
5588
5590
  return /* @__PURE__ */ n(
5589
5591
  "div",
5590
5592
  {
5591
- className: N(
5593
+ className: k(
5592
5594
  "relative flex min-h-0 w-full flex-1 items-center justify-center overflow-hidden",
5593
5595
  Al[e]
5594
5596
  ),
5595
5597
  children: l.map(({ src: c, index: p }, w) => /* @__PURE__ */ n(
5596
5598
  "img",
5597
5599
  {
5598
- src: ce(c) ?? c,
5600
+ src: de(c) ?? c,
5599
5601
  alt: "",
5600
5602
  draggable: !1,
5601
5603
  loading: "lazy",
@@ -5623,7 +5625,7 @@ const El = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
5623
5625
  // hero image errors, so `CardThumbnail` falls through to its placeholder.
5624
5626
  // Do NOT `?? images[0]` here — that would re-instate the failed URL.
5625
5627
  /* @__PURE__ */ n(
5626
- Ie,
5628
+ Te,
5627
5629
  {
5628
5630
  variant: e,
5629
5631
  thumbnailUrl: r,
@@ -5647,20 +5649,20 @@ const El = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
5647
5649
  const h = Ys({
5648
5650
  imagePresentation: i,
5649
5651
  images: r
5650
- }), m = r.length > 0, g = m && h === "hero", c = Ge({
5652
+ }), m = r.length > 0, g = m && h === "hero", c = Ye({
5651
5653
  variant: e,
5652
5654
  accentColor: d,
5653
5655
  layout: "featured",
5654
5656
  thumbnailUrl: g ? r[0] : void 0
5655
5657
  }), p = u === "single" || u === "end";
5656
5658
  return /* @__PURE__ */ n(
5657
- xt,
5659
+ wt,
5658
5660
  {
5659
5661
  accentHex: c.accentHex,
5660
5662
  side: e === "dark" ? "sender" : "receiver",
5661
5663
  visible: p,
5662
5664
  children: /* @__PURE__ */ f(
5663
- Ee,
5665
+ Ie,
5664
5666
  {
5665
5667
  variant: e,
5666
5668
  accentHex: c.accentHex,
@@ -5734,7 +5736,7 @@ const El = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
5734
5736
  "div",
5735
5737
  {
5736
5738
  "data-dd-privacy": "mask",
5737
- className: N(
5739
+ className: k(
5738
5740
  "relative px-4 py-3",
5739
5741
  "text-[0.875rem] leading-[1.3125rem] tracking-[0.14px]",
5740
5742
  r
@@ -5779,7 +5781,7 @@ const El = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
5779
5781
  onClick: t,
5780
5782
  disabled: s,
5781
5783
  style: { backgroundColor: "#E6E5E3" },
5782
- className: N(
5784
+ className: k(
5783
5785
  "w-full text-center p-4 rounded-xl text-charcoal font-medium transition-colors focus-ring",
5784
5786
  {
5785
5787
  "hover:brightness-95 active:brightness-90": !s,
@@ -5801,7 +5803,7 @@ const El = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
5801
5803
  const l = Ws(e);
5802
5804
  return l.length === 0 ? null : /* @__PURE__ */ n("div", { className: r, children: /* @__PURE__ */ f("div", { className: "flex gap-3 items-end", children: [
5803
5805
  (i || o) && /* @__PURE__ */ n("div", { className: "flex-none", children: /* @__PURE__ */ n(
5804
- _e,
5806
+ ye,
5805
5807
  {
5806
5808
  id: o || "account",
5807
5809
  name: o || "Account",
@@ -5839,34 +5841,34 @@ export {
5839
5841
  sr as E,
5840
5842
  co as F,
5841
5843
  _a as G,
5842
- it as L,
5844
+ lt as L,
5843
5845
  no as M,
5844
5846
  lo as R,
5845
- Ne as a,
5846
- _e as b,
5847
+ ke as a,
5848
+ ye as b,
5847
5849
  Sl as c,
5848
5850
  Zn as d,
5849
5851
  so as e,
5850
5852
  Gl as f,
5851
- de as g,
5852
- Pe as h,
5853
- ke as i,
5853
+ ue as g,
5854
+ Fe as h,
5855
+ Ce as i,
5854
5856
  oo as j,
5855
5857
  to as k,
5856
5858
  io as l,
5857
5859
  ei as m,
5858
5860
  Zr as n,
5859
- ce as o,
5861
+ de as o,
5860
5862
  kl as p,
5861
5863
  Qr as q,
5862
- ve as r,
5864
+ xe as r,
5863
5865
  kn as s,
5864
- Ve as t,
5866
+ Ge as t,
5865
5867
  Na as u,
5866
5868
  ao as v,
5867
5869
  Da as w,
5868
5870
  _n as x,
5869
- ut as y,
5870
- mt as z
5871
+ mt as y,
5872
+ ht as z
5871
5873
  };
5872
- //# sourceMappingURL=index-Dr_5Q52K.js.map
5874
+ //# sourceMappingURL=index-CBGh9Qyj.js.map