@linktr.ee/messaging-react 3.3.6-rc-1781144689 → 3.3.7-rc-1781176499

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/dist/{Card-D1L3wBz6.js → Card-BDWTAZYS.js} +3 -3
  2. package/dist/{Card-D1L3wBz6.js.map → Card-BDWTAZYS.js.map} +1 -1
  3. package/dist/{Card-n-E-M5pd.cjs → Card-BlET8wE6.cjs} +2 -2
  4. package/dist/{Card-n-E-M5pd.cjs.map → Card-BlET8wE6.cjs.map} +1 -1
  5. package/dist/{Card-2geWIU_O.cjs → Card-BnVoc-u7.cjs} +2 -2
  6. package/dist/{Card-2geWIU_O.cjs.map → Card-BnVoc-u7.cjs.map} +1 -1
  7. package/dist/{Card-vagKHhvf.js → Card-D-JLW3MJ.js} +2 -2
  8. package/dist/{Card-vagKHhvf.js.map → Card-D-JLW3MJ.js.map} +1 -1
  9. package/dist/{Card-CdMpzGPZ.js → Card-D4cn0k04.js} +2 -2
  10. package/dist/{Card-CdMpzGPZ.js.map → Card-D4cn0k04.js.map} +1 -1
  11. package/dist/{Card-B4RdxCmT.cjs → Card-Dh2EXYNT.cjs} +2 -2
  12. package/dist/{Card-B4RdxCmT.cjs.map → Card-Dh2EXYNT.cjs.map} +1 -1
  13. package/dist/{LockedThumbnail-H3nnbVkP.cjs → LockedThumbnail-BYdGEl_B.cjs} +2 -2
  14. package/dist/{LockedThumbnail-H3nnbVkP.cjs.map → LockedThumbnail-BYdGEl_B.cjs.map} +1 -1
  15. package/dist/{LockedThumbnail-BAA-3nW0.js → LockedThumbnail-ZEMzCDoV.js} +2 -2
  16. package/dist/{LockedThumbnail-BAA-3nW0.js.map → LockedThumbnail-ZEMzCDoV.js.map} +1 -1
  17. package/dist/assets/index.css +1 -1
  18. package/dist/{index-DkqNYdg4.js → index-DmimisTH.js} +761 -815
  19. package/dist/index-DmimisTH.js.map +1 -0
  20. package/dist/index-TLVquOE0.cjs +2 -0
  21. package/dist/index-TLVquOE0.cjs.map +1 -0
  22. package/dist/index.cjs +1 -1
  23. package/dist/index.js +1 -1
  24. package/package.json +2 -2
  25. package/src/components/ChannelView.test.tsx +1 -12
  26. package/src/components/ChannelView.tsx +17 -33
  27. package/src/components/CustomMessageInput/index.tsx +5 -60
  28. package/src/styles.css +1 -11
  29. package/dist/index-CV-61_np.cjs +0 -2
  30. package/dist/index-CV-61_np.cjs.map +0 -1
  31. package/dist/index-DkqNYdg4.js.map +0 -1
@@ -1,10 +1,10 @@
1
- import { jsx as n, jsxs as h, Fragment as ne } from "react/jsx-runtime";
2
- import j, { createContext as Ge, useContext as Te, useCallback as Y, useState as O, useRef as G, useEffect as H, useId as En, useMemo as te, Suspense as He, useLayoutEffect as In } from "react";
1
+ import { jsx as n, jsxs as h, Fragment as te } from "react/jsx-runtime";
2
+ import $, { createContext as Ge, useContext as Te, useCallback as W, useState as P, useRef as H, useEffect as Y, useId as En, useMemo as ee, Suspense as He } from "react";
3
3
  import { StreamChatService as Sn } from "@linktr.ee/messaging-core";
4
- import { Chat as Tn, DateSeparator as An, useChannelStateContext as de, useChatContext as Ye, areMessageUIPropsEqual as Mn, useMessageReminder as Rn, useComponentContext as Ut, Attachment as Ln, EditMessageModal as Dn, MessageBlocked as Pn, MessageBouncePrompt as On, MessageDeleted as zn, MessageIsThreadReplyInChannelButtonIndicator as $n, MessageRepliesCountButton as Fn, ReminderNotification as Bn, StreamedMessageText as Un, messageHasAttachments as jn, messageHasReactions as Vn, isDateSeparatorMessage as Gn, isMessageBlocked as Hn, isMessageBounced as Yn, MessageBounceModal as qn, MessageText as Tt, Poll as Wn, MessageErrorIcon as Xn, useMessageContext as ve, useMessageComposer as Kn, useStateStore as Jn, MessageInput as Zn, useMessageInputContext as Qn, useMessageComposerHasSendableData as es, AttachmentPreviewList as ts, QuotedMessagePreview as ns, TextareaComposer as ss, MessageTimestamp as Le, AIStates as De, useTypingContext as as, useAIState as rs, Channel as is, WithComponents as os, Window as ls, MessageList as cs, defaultRenderMessages as ds, ChannelList as us } from "stream-chat-react";
5
- import { StarIcon as Fe, DotsThreeIcon as ms, SpinnerGapIcon as Ce, SignOutIcon as hs, ProhibitInsetIcon as At, FlagIcon as jt, FileIcon as Vt, ImageIcon as fs, SpeakerHighIcon as gs, VideoCameraIcon as Gt, FileMdIcon as bs, FileTextIcon as ps, FileZipIcon as vs, FilePptIcon as xs, FileCsvIcon as ws, FileXlsIcon as _s, FileDocIcon as Ns, FilePdfIcon as ys, CircleNotchIcon as be, PlayIcon as Be, PauseIcon as Cs, LinkIcon as ks, DownloadSimpleIcon as pe, GiftIcon as Es, ThumbsUpIcon as Is, ThumbsDownIcon as Ss, TrashSimpleIcon as Ts, XIcon as Ae, ArrowUpIcon as As, SparkleIcon as Ue, ProhibitIcon as Ms, ArrowLeftIcon as Mt, PencilSimpleIcon as Rs, CaretLeftIcon as Ls, CaretRightIcon as Ds } from "@phosphor-icons/react";
6
- import C from "classnames";
7
- import { MessageActions as Ps, DefaultDropdownActionButton as Ht } from "stream-chat-react/experimental";
4
+ import { Chat as In, DateSeparator as Tn, useChannelStateContext as ce, useChatContext as Ye, areMessageUIPropsEqual as An, useMessageReminder as Mn, useComponentContext as Ut, Attachment as Rn, EditMessageModal as Ln, MessageBlocked as Dn, MessageBouncePrompt as Pn, MessageDeleted as On, MessageIsThreadReplyInChannelButtonIndicator as zn, MessageRepliesCountButton as $n, ReminderNotification as Fn, StreamedMessageText as Bn, messageHasAttachments as Un, messageHasReactions as jn, isDateSeparatorMessage as Vn, isMessageBlocked as Gn, isMessageBounced as Hn, MessageBounceModal as Yn, MessageText as Tt, Poll as qn, MessageErrorIcon as Wn, useMessageContext as pe, useMessageComposer as Xn, useStateStore as Kn, MessageInput as Jn, useMessageInputContext as Zn, useMessageComposerHasSendableData as Qn, AttachmentPreviewList as es, QuotedMessagePreview as ts, TextareaComposer as ns, MessageTimestamp as Le, AIStates as De, useTypingContext as ss, useAIState as as, Channel as rs, WithComponents as is, Window as os, MessageList as ls, ChannelList as cs } from "stream-chat-react";
5
+ import { StarIcon as Fe, DotsThreeIcon as ds, SpinnerGapIcon as Ce, SignOutIcon as us, ProhibitInsetIcon as At, FlagIcon as jt, FileIcon as Vt, ImageIcon as ms, SpeakerHighIcon as hs, VideoCameraIcon as Gt, FileMdIcon as fs, FileTextIcon as gs, FileZipIcon as bs, FilePptIcon as ps, FileCsvIcon as vs, FileXlsIcon as xs, FileDocIcon as ws, FilePdfIcon as _s, CircleNotchIcon as ge, PlayIcon as Be, PauseIcon as Ns, LinkIcon as ys, DownloadSimpleIcon as be, GiftIcon as Cs, ThumbsUpIcon as ks, ThumbsDownIcon as Es, TrashSimpleIcon as Ss, XIcon as Ae, ArrowUpIcon as Is, SparkleIcon as Ue, ProhibitIcon as Ts, ArrowLeftIcon as Mt, PencilSimpleIcon as As, CaretLeftIcon as Ms, CaretRightIcon as Rs } from "@phosphor-icons/react";
6
+ import y from "classnames";
7
+ import { MessageActions as Ls, DefaultDropdownActionButton as Ht } from "stream-chat-react/experimental";
8
8
  import { LinkPreviewsManager as Rt } from "stream-chat";
9
9
  const Yt = Ge({
10
10
  service: null,
@@ -16,7 +16,7 @@ const Yt = Ge({
16
16
  refreshConnection: async () => {
17
17
  },
18
18
  debug: !1
19
- }), qe = () => Te(Yt), Ci = ({
19
+ }), qe = () => Te(Yt), wi = ({
20
20
  children: e,
21
21
  user: t,
22
22
  serviceConfig: s,
@@ -24,7 +24,7 @@ const Yt = Ge({
24
24
  capabilities: r = {},
25
25
  debug: i = !1
26
26
  }) => {
27
- const o = Y(
27
+ const o = W(
28
28
  (k, ...T) => {
29
29
  i && console.log(`🔥 [MessagingProvider] ${k}`, ...T);
30
30
  },
@@ -36,14 +36,14 @@ const Yt = Ge({
36
36
  serviceConfig: !!s,
37
37
  capabilities: Object.keys(r)
38
38
  });
39
- const [l, d] = O(null), [m, b] = O(null), [u, f] = O(!1), [c, g] = O(!1), [p, v] = O(null), _ = G(!1), x = G({
39
+ const [l, d] = P(null), [m, b] = P(null), [u, f] = P(!1), [c, g] = P(!1), [p, v] = P(null), _ = H(!1), x = H({
40
40
  userId: t == null ? void 0 : t.id,
41
41
  apiKey: a,
42
42
  serviceConfig: s,
43
43
  capabilities: r
44
- }), I = G(0);
45
- I.current++, o("📊 RENDER INFO", {
46
- renderCount: I.current,
44
+ }), S = H(0);
45
+ S.current++, o("📊 RENDER INFO", {
46
+ renderCount: S.current,
47
47
  currentProps: { userId: t == null ? void 0 : t.id, apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..." },
48
48
  propChanges: {
49
49
  userChanged: x.current.userId !== (t == null ? void 0 : t.id),
@@ -56,8 +56,8 @@ const Yt = Ge({
56
56
  apiKey: a,
57
57
  serviceConfig: s,
58
58
  capabilities: r
59
- }, H(() => {
60
- const k = I.current;
59
+ }, Y(() => {
60
+ const k = S.current;
61
61
  if (o("🔧 SERVICE INIT EFFECT TRIGGERED", {
62
62
  renderCount: k,
63
63
  apiKey: !!a,
@@ -95,8 +95,8 @@ const Yt = Ge({
95
95
  }), T.disconnectUser().catch(console.error);
96
96
  };
97
97
  }, [a, s, i, o]);
98
- const E = G(null);
99
- H(() => {
98
+ const E = H(null);
99
+ Y(() => {
100
100
  var T, N;
101
101
  if (o("🔗 USER CONNECTION EFFECT TRIGGERED", {
102
102
  hasService: !!l,
@@ -124,13 +124,13 @@ const Yt = Ge({
124
124
  o("🚀 STARTING USER CONNECTION", { userId: t.id }), _.current = !0, g(!0), v(null);
125
125
  try {
126
126
  o("📞 CALLING SERVICE.CONNECTUSER", { userId: t.id });
127
- const S = await l.connectUser(t);
128
- b(S), f(!0), E.current = { serviceId: l, userId: t.id }, o("✅ USER CONNECTION SUCCESS", {
127
+ const I = await l.connectUser(t);
128
+ b(I), f(!0), E.current = { serviceId: l, userId: t.id }, o("✅ USER CONNECTION SUCCESS", {
129
129
  userId: t.id,
130
- clientId: S.userID
130
+ clientId: I.userID
131
131
  });
132
- } catch (S) {
133
- const R = S instanceof Error ? S.message : "Connection failed";
132
+ } catch (I) {
133
+ const R = I instanceof Error ? I.message : "Connection failed";
134
134
  v(R), o("❌ USER CONNECTION ERROR", {
135
135
  userId: t.id,
136
136
  error: R
@@ -142,7 +142,7 @@ const Yt = Ge({
142
142
  });
143
143
  }
144
144
  })();
145
- }, [l, t, o, u]), H(() => (o("🔌 CLEANUP EFFECT REGISTERED", {
145
+ }, [l, t, o, u]), Y(() => (o("🔌 CLEANUP EFFECT REGISTERED", {
146
146
  hasService: !!l,
147
147
  isConnected: u
148
148
  }), () => {
@@ -154,7 +154,7 @@ const Yt = Ge({
154
154
  isConnected: u
155
155
  });
156
156
  }), [l, u, o]);
157
- const M = Y(async () => {
157
+ const M = W(async () => {
158
158
  if (o("🔄 REFRESH CONNECTION CALLED", {
159
159
  hasService: !!l,
160
160
  hasUser: !!t
@@ -176,7 +176,7 @@ const Yt = Ge({
176
176
  } finally {
177
177
  g(!1), o("🔄 CONNECTION REFRESH FINISHED", { userId: t.id });
178
178
  }
179
- }, [l, t, o]), D = j.useMemo(() => (o("💫 CONTEXT VALUE MEMOIZATION", {
179
+ }, [l, t, o]), D = $.useMemo(() => (o("💫 CONTEXT VALUE MEMOIZATION", {
180
180
  hasService: !!l,
181
181
  hasClient: !!m,
182
182
  isConnected: u,
@@ -204,11 +204,11 @@ const Yt = Ge({
204
204
  o
205
205
  ]);
206
206
  return o("🔄 RENDER END", {
207
- renderCount: I.current,
207
+ renderCount: S.current,
208
208
  willRenderChat: !!(m && u),
209
209
  contextValueReady: !!D
210
210
  }), /* @__PURE__ */ n(Yt.Provider, { value: D, children: m && u ? /* @__PURE__ */ n(
211
- Tn,
211
+ In,
212
212
  {
213
213
  client: m,
214
214
  customClasses: {
@@ -217,12 +217,12 @@ const Yt = Ge({
217
217
  children: e
218
218
  }
219
219
  ) : e });
220
- }, Os = () => qe(), qt = (e) => {
220
+ }, Ds = () => qe(), qt = (e) => {
221
221
  var a, r;
222
- const [t, s] = O(
222
+ const [t, s] = P(
223
223
  !!((r = (a = e == null ? void 0 : e.state) == null ? void 0 : a.membership) != null && r.pinned_at)
224
224
  );
225
- return H(() => {
225
+ return Y(() => {
226
226
  var o;
227
227
  if (!e) {
228
228
  s(!1);
@@ -239,13 +239,13 @@ const Yt = Ge({
239
239
  e.off("member.updated", i);
240
240
  };
241
241
  }, [e]), t;
242
- }, zs = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
243
- function $s(e) {
244
- return zs.test(e.trim());
242
+ }, Ps = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
243
+ function Os(e) {
244
+ return Ps.test(e.trim());
245
245
  }
246
246
  function Lt(e, t) {
247
247
  const s = e == null ? void 0 : e.trim();
248
- return !s || t && s === t ? !1 : !$s(s);
248
+ return !s || t && s === t ? !1 : !Os(s);
249
249
  }
250
250
  function Wt(e) {
251
251
  return Lt(e == null ? void 0 : e.name, e == null ? void 0 : e.id) ? e.name.trim() : Lt(e == null ? void 0 : e.username, e == null ? void 0 : e.id) ? e.username.trim() : "Unknown member";
@@ -278,7 +278,7 @@ const Dt = [
278
278
  "🍈"
279
279
  // Melon
280
280
  ];
281
- function Fs(e) {
281
+ function zs(e) {
282
282
  let t = 0;
283
283
  for (let s = 0; s < e.length; s++) {
284
284
  const a = e.charCodeAt(s);
@@ -286,11 +286,11 @@ function Fs(e) {
286
286
  }
287
287
  return Math.abs(t);
288
288
  }
289
- function Bs(e) {
290
- const s = Fs(e) % Dt.length;
289
+ function $s(e) {
290
+ const s = zs(e) % Dt.length;
291
291
  return Dt[s];
292
292
  }
293
- const re = ({
293
+ const ae = ({
294
294
  id: e,
295
295
  image: t,
296
296
  size: s = 40,
@@ -299,7 +299,7 @@ const re = ({
299
299
  shape: i = "squircle",
300
300
  dmAgentEnabled: o = !1
301
301
  }) => {
302
- const l = Bs(e), m = s < 32 ? "text-xs" : s < 56 ? "text-sm" : s < 120 ? "text-lg" : "text-4xl", b = s >= 40 ? 2 : 1, u = i === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, f = /* @__PURE__ */ n("div", { className: "h-full w-full overflow-hidden", style: u, children: t ? /* @__PURE__ */ n(
302
+ const l = $s(e), m = s < 32 ? "text-xs" : s < 56 ? "text-sm" : s < 120 ? "text-lg" : "text-4xl", b = s >= 40 ? 2 : 1, u = i === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, f = /* @__PURE__ */ n("div", { className: "h-full w-full overflow-hidden", style: u, children: t ? /* @__PURE__ */ n(
303
303
  "img",
304
304
  {
305
305
  src: t,
@@ -310,7 +310,7 @@ const re = ({
310
310
  "div",
311
311
  {
312
312
  "aria-hidden": "true",
313
- className: C(
313
+ className: y(
314
314
  "avatar-fallback flex h-full w-full items-center justify-center bg-[#E6E5E3] font-semibold select-none transition-colors",
315
315
  m
316
316
  ),
@@ -320,7 +320,7 @@ const re = ({
320
320
  return /* @__PURE__ */ h(
321
321
  "div",
322
322
  {
323
- className: C(
323
+ className: y(
324
324
  "relative flex-shrink-0 !bg-transparent",
325
325
  a
326
326
  ),
@@ -342,7 +342,7 @@ const re = ({
342
342
  "div",
343
343
  {
344
344
  "data-testid": "avatar-ring",
345
- className: C(
345
+ className: y(
346
346
  "h-full w-full",
347
347
  "bg-transparent"
348
348
  ),
@@ -361,7 +361,7 @@ const re = ({
361
361
  ]
362
362
  }
363
363
  );
364
- }, Us = "https://linktr.ee/s/about/trust-center/report", js = ({
364
+ }, Fs = "https://linktr.ee/s/about/trust-center/report", Bs = ({
365
365
  channel: e,
366
366
  participant: t,
367
367
  showBlockParticipant: s = !0,
@@ -375,8 +375,8 @@ const re = ({
375
375
  logLabel: b = "useChannelModerationActions"
376
376
  }) => {
377
377
  var F;
378
- const { service: u, debug: f } = qe(), c = (F = t == null ? void 0 : t.user) == null ? void 0 : F.id, g = !!(a && s && u && c), [p, v] = O(!1), [_, x] = O(null), [I, E] = O(!1), [M, D] = O(!1), k = g && ((_ == null ? void 0 : _.participantId) !== c || (_ == null ? void 0 : _.service) !== u);
379
- return H(() => {
378
+ const { service: u, debug: f } = qe(), c = (F = t == null ? void 0 : t.user) == null ? void 0 : F.id, g = !!(a && s && u && c), [p, v] = P(!1), [_, x] = P(null), [S, E] = P(!1), [M, D] = P(!1), k = g && ((_ == null ? void 0 : _.participantId) !== c || (_ == null ? void 0 : _.service) !== u);
379
+ return Y(() => {
380
380
  if (!g || !u || !c) {
381
381
  v(!1), x(null);
382
382
  return;
@@ -384,15 +384,15 @@ const re = ({
384
384
  let A = !1;
385
385
  return (async () => {
386
386
  try {
387
- const P = await u.getBlockedUsers();
387
+ const L = await u.getBlockedUsers();
388
388
  if (A) return;
389
389
  v(
390
- P.some(
390
+ L.some(
391
391
  (z) => z.blocked_user_id === c
392
392
  )
393
393
  );
394
- } catch (P) {
395
- A || console.error(`[${b}] Failed to check blocked status:`, P);
394
+ } catch (L) {
395
+ A || console.error(`[${b}] Failed to check blocked status:`, L);
396
396
  } finally {
397
397
  A || x({ participantId: c, service: u });
398
398
  }
@@ -402,28 +402,28 @@ const re = ({
402
402
  }, [g, u, c, b]), {
403
403
  isParticipantBlocked: p,
404
404
  isCheckingBlockedStatus: k,
405
- isLeaving: I,
405
+ isLeaving: S,
406
406
  isUpdatingBlockStatus: M,
407
407
  handleLeaveConversation: async () => {
408
408
  var A;
409
- if (!I) {
409
+ if (!S) {
410
410
  o == null || o(), f && console.log(`[${b}] Leave conversation`, e.cid), E(!0);
411
411
  try {
412
- const P = ((A = e._client) == null ? void 0 : A.userID) ?? null;
413
- await e.hide(P, !1), r && await r(e), m == null || m();
414
- } catch (P) {
415
- console.error(`[${b}] Failed to leave conversation`, P);
412
+ const L = ((A = e._client) == null ? void 0 : A.userID) ?? null;
413
+ await e.hide(L, !1), r && await r(e), m == null || m();
414
+ } catch (L) {
415
+ console.error(`[${b}] Failed to leave conversation`, L);
416
416
  } finally {
417
417
  E(!1);
418
418
  }
419
419
  }
420
420
  },
421
421
  handleBlockUser: async () => {
422
- var A, P, z;
422
+ var A, L, z;
423
423
  if (!(M || !u)) {
424
424
  l == null || l(), f && console.log(`[${b}] Block member`, (A = t == null ? void 0 : t.user) == null ? void 0 : A.id), D(!0);
425
425
  try {
426
- await u.blockUser((P = t == null ? void 0 : t.user) == null ? void 0 : P.id), i && await i((z = t == null ? void 0 : t.user) == null ? void 0 : z.id), m == null || m();
426
+ await u.blockUser((L = t == null ? void 0 : t.user) == null ? void 0 : L.id), i && await i((z = t == null ? void 0 : t.user) == null ? void 0 : z.id), m == null || m();
427
427
  } catch (V) {
428
428
  console.error(`[${b}] Failed to block member`, V);
429
429
  } finally {
@@ -432,11 +432,11 @@ const re = ({
432
432
  }
433
433
  },
434
434
  handleUnblockUser: async () => {
435
- var A, P, z;
435
+ var A, L, z;
436
436
  if (!(M || !u)) {
437
437
  l == null || l(), f && console.log(`[${b}] Unblock member`, (A = t == null ? void 0 : t.user) == null ? void 0 : A.id), D(!0);
438
438
  try {
439
- await u.unBlockUser((P = t == null ? void 0 : t.user) == null ? void 0 : P.id), i && await i((z = t == null ? void 0 : t.user) == null ? void 0 : z.id), m == null || m();
439
+ await u.unBlockUser((L = t == null ? void 0 : t.user) == null ? void 0 : L.id), i && await i((z = t == null ? void 0 : t.user) == null ? void 0 : z.id), m == null || m();
440
440
  } catch (V) {
441
441
  console.error(`[${b}] Failed to unblock member`, V);
442
442
  } finally {
@@ -445,10 +445,10 @@ const re = ({
445
445
  }
446
446
  },
447
447
  handleReportUser: () => {
448
- d == null || d(), m == null || m(), window.open(Us, "_blank", "noopener,noreferrer");
448
+ d == null || d(), m == null || m(), window.open(Fs, "_blank", "noopener,noreferrer");
449
449
  }
450
450
  };
451
- }, fe = ({
451
+ }, he = ({
452
452
  variant: e = "default",
453
453
  className: t,
454
454
  children: s,
@@ -457,7 +457,7 @@ const re = ({
457
457
  "button",
458
458
  {
459
459
  type: "button",
460
- className: C(
460
+ className: y(
461
461
  "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",
462
462
  e === "danger" ? "text-danger hover:bg-danger/50" : "text-charcoal hover:bg-sand",
463
463
  t
@@ -479,16 +479,16 @@ const re = ({
479
479
  customChannelActions: b,
480
480
  triggerClassName: u
481
481
  }) => {
482
- const [f, c] = O(!1), g = G(null), p = En(), v = Y(() => c(!1), []), {
482
+ const [f, c] = P(!1), g = H(null), p = En(), v = W(() => c(!1), []), {
483
483
  isParticipantBlocked: _,
484
484
  isCheckingBlockedStatus: x,
485
- isLeaving: I,
485
+ isLeaving: S,
486
486
  isUpdatingBlockStatus: E,
487
487
  handleLeaveConversation: M,
488
488
  handleBlockUser: D,
489
489
  handleUnblockUser: k,
490
490
  handleReportUser: T
491
- } = js({
491
+ } = Bs({
492
492
  channel: e,
493
493
  participant: t,
494
494
  showBlockParticipant: a,
@@ -501,15 +501,15 @@ const re = ({
501
501
  onActionComplete: v,
502
502
  logLabel: "ChannelActionsMenu"
503
503
  });
504
- return H(() => {
504
+ return Y(() => {
505
505
  if (!f) return;
506
- const S = (F) => {
506
+ const I = (F) => {
507
507
  g.current && !g.current.contains(F.target) && c(!1);
508
508
  }, R = (F) => {
509
509
  F.key === "Escape" && c(!1);
510
510
  };
511
- return document.addEventListener("mousedown", S), document.addEventListener("keydown", R), () => {
512
- document.removeEventListener("mousedown", S), document.removeEventListener("keydown", R);
511
+ return document.addEventListener("mousedown", I), document.addEventListener("keydown", R), () => {
512
+ document.removeEventListener("mousedown", I), document.removeEventListener("keydown", R);
513
513
  };
514
514
  }, [f]), !t || !(s || a || r || !!b) ? null : /* @__PURE__ */ h("div", { ref: g, className: "relative", children: [
515
515
  /* @__PURE__ */ h(
@@ -520,9 +520,9 @@ const re = ({
520
520
  "aria-haspopup": "true",
521
521
  "aria-expanded": f,
522
522
  "aria-controls": f ? p : void 0,
523
- onClick: () => c((S) => !S),
523
+ onClick: () => c((I) => !I),
524
524
  children: [
525
- /* @__PURE__ */ n(ms, { className: "size-5 text-black/90" }),
525
+ /* @__PURE__ */ n(ds, { className: "size-5 text-black/90" }),
526
526
  /* @__PURE__ */ n("span", { className: "sr-only", children: "More options" })
527
527
  ]
528
528
  }
@@ -532,19 +532,19 @@ const re = ({
532
532
  {
533
533
  id: p,
534
534
  "aria-label": "Conversation options",
535
- className: C(
535
+ className: y(
536
536
  "absolute right-0 top-full z-50 mt-2 w-56 overflow-hidden",
537
537
  "rounded-lg border border-sand bg-white p-1 shadow-max-elevation-light"
538
538
  ),
539
539
  children: /* @__PURE__ */ h("ul", { className: "flex flex-col gap-1", children: [
540
540
  s && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ h(
541
- fe,
541
+ he,
542
542
  {
543
543
  onClick: M,
544
- disabled: I,
545
- "aria-busy": I,
544
+ disabled: S,
545
+ "aria-busy": S,
546
546
  children: [
547
- I ? /* @__PURE__ */ n(Ce, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(hs, { className: "h-5 w-5" }),
547
+ S ? /* @__PURE__ */ n(Ce, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(us, { className: "h-5 w-5" }),
548
548
  /* @__PURE__ */ n("span", { children: "Delete Conversation" })
549
549
  ]
550
550
  }
@@ -552,12 +552,12 @@ const re = ({
552
552
  a && /* @__PURE__ */ n("li", { children: x ? (
553
553
  // Block status not yet resolved — show a disabled placeholder
554
554
  // so a premature click can't act on a stale block state.
555
- /* @__PURE__ */ h(fe, { disabled: !0, "aria-busy": !0, children: [
555
+ /* @__PURE__ */ h(he, { disabled: !0, "aria-busy": !0, children: [
556
556
  /* @__PURE__ */ n(Ce, { className: "h-5 w-5 animate-spin" }),
557
557
  /* @__PURE__ */ n("span", { children: "Block" })
558
558
  ] })
559
559
  ) : _ ? /* @__PURE__ */ h(
560
- fe,
560
+ he,
561
561
  {
562
562
  onClick: k,
563
563
  disabled: E,
@@ -568,7 +568,7 @@ const re = ({
568
568
  ]
569
569
  }
570
570
  ) : /* @__PURE__ */ h(
571
- fe,
571
+ he,
572
572
  {
573
573
  onClick: D,
574
574
  disabled: E,
@@ -579,7 +579,7 @@ const re = ({
579
579
  ]
580
580
  }
581
581
  ) }),
582
- r && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ h(fe, { variant: "danger", onClick: T, children: [
582
+ r && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ h(he, { variant: "danger", onClick: T, children: [
583
583
  /* @__PURE__ */ n(jt, { className: "h-5 w-5" }),
584
584
  /* @__PURE__ */ n("span", { children: "Report" })
585
585
  ] }) }),
@@ -588,15 +588,15 @@ const re = ({
588
588
  }
589
589
  )
590
590
  ] });
591
- }, Vs = (e) => /* @__PURE__ */ n(An, { ...e, position: "center" }), je = "vote_up", Ve = "vote_down";
592
- function Gs(e) {
591
+ }, Us = (e) => /* @__PURE__ */ n(Tn, { ...e, position: "center" }), je = "vote_up", Ve = "vote_down";
592
+ function js(e) {
593
593
  return e != null && e.length ? e.some((t) => t.type === Ve) ? "down" : e.some((t) => t.type === je) ? "up" : null : null;
594
594
  }
595
- function Hs(e) {
596
- const { channel: t } = de(), { client: s } = Ye("useMessageVote"), a = te(
597
- () => Gs(e.own_reactions),
595
+ function Vs(e) {
596
+ const { channel: t } = ce(), { client: s } = Ye("useMessageVote"), a = ee(
597
+ () => js(e.own_reactions),
598
598
  [e.own_reactions]
599
- ), r = Y(async () => {
599
+ ), r = W(async () => {
600
600
  if (s != null && s.userID)
601
601
  try {
602
602
  a === "up" ? await t.deleteReaction(e.id, je) : await t.sendReaction(
@@ -606,7 +606,7 @@ function Hs(e) {
606
606
  );
607
607
  } catch {
608
608
  }
609
- }, [t, s == null ? void 0 : s.userID, e.id, a]), i = Y(async () => {
609
+ }, [t, s == null ? void 0 : s.userID, e.id, a]), i = W(async () => {
610
610
  if (s != null && s.userID)
611
611
  try {
612
612
  a === "down" ? await t.deleteReaction(e.id, Ve) : await t.sendReaction(
@@ -619,7 +619,7 @@ function Hs(e) {
619
619
  }, [t, s == null ? void 0 : s.userID, e.id, a]);
620
620
  return { selected: a, voteUp: r, voteDown: i };
621
621
  }
622
- function Ys(e) {
622
+ function Gs(e) {
623
623
  return (e == null ? void 0 : e.trim().toLowerCase().split(/[-_]/)[0]) || void 0;
624
624
  }
625
625
  function Xt({
@@ -627,16 +627,16 @@ function Xt({
627
627
  viewerLanguage: t
628
628
  }) {
629
629
  var r;
630
- const s = e == null ? void 0 : e.text, a = Ys(t);
630
+ const s = e == null ? void 0 : e.text, a = Gs(t);
631
631
  return a ? ((r = e == null ? void 0 : e.i18n) == null ? void 0 : r[`${a}_text`]) ?? s : s;
632
632
  }
633
- const qs = j.lazy(() => import("./Card-vagKHhvf.js")), Ws = j.lazy(() => import("./Card-CdMpzGPZ.js")), Xs = j.lazy(() => import("./Card-D1L3wBz6.js")), We = () => /* @__PURE__ */ n(
633
+ const Hs = $.lazy(() => import("./Card-D-JLW3MJ.js")), Ys = $.lazy(() => import("./Card-D4cn0k04.js")), qs = $.lazy(() => import("./Card-BDWTAZYS.js")), We = () => /* @__PURE__ */ n(
634
634
  "div",
635
635
  {
636
636
  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)]",
637
637
  "aria-hidden": !0
638
638
  }
639
- ), Ks = (e) => /* @__PURE__ */ n(He, { fallback: /* @__PURE__ */ n(We, {}), children: /* @__PURE__ */ n(qs, { ...e }) }), Kt = (e) => /* @__PURE__ */ n(He, { fallback: /* @__PURE__ */ n(We, {}), children: /* @__PURE__ */ n(Ws, { ...e }) }), Jt = (e) => /* @__PURE__ */ n(He, { fallback: /* @__PURE__ */ n(We, {}), children: /* @__PURE__ */ n(Xs, { ...e }) }), Js = Kt, Zs = Jt, Ot = { Composer: Ks, Sent: Kt, Received: Jt, Creator: Js, Visitor: Zs }, Qs = [
639
+ ), Ws = (e) => /* @__PURE__ */ n(He, { fallback: /* @__PURE__ */ n(We, {}), children: /* @__PURE__ */ n(Hs, { ...e }) }), Kt = (e) => /* @__PURE__ */ n(He, { fallback: /* @__PURE__ */ n(We, {}), children: /* @__PURE__ */ n(Ys, { ...e }) }), Jt = (e) => /* @__PURE__ */ n(He, { fallback: /* @__PURE__ */ n(We, {}), children: /* @__PURE__ */ n(qs, { ...e }) }), Xs = Kt, Ks = Jt, Ot = { Composer: Ws, Sent: Kt, Received: Jt, Creator: Xs, Visitor: Ks }, Js = [
640
640
  [/pdf/, "pdf"],
641
641
  [/wordprocessingml|msword|\.doc/, "doc"],
642
642
  [/spreadsheetml|ms-excel|\.xls/, "xls"],
@@ -646,42 +646,42 @@ const qs = j.lazy(() => import("./Card-vagKHhvf.js")), Ws = j.lazy(() => import(
646
646
  [/plain|rtf/, "text"],
647
647
  [/markdown/, "markdown"]
648
648
  ];
649
- function se(e) {
649
+ function ne(e) {
650
650
  return e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : e.startsWith("image/") ? "image" : "document";
651
651
  }
652
652
  function Zt(e) {
653
- const t = Qs.find(
653
+ const t = Js.find(
654
654
  ([s]) => s.test(e)
655
655
  );
656
656
  return t ? t[1] : "generic";
657
657
  }
658
- const ea = {
658
+ const Zs = {
659
659
  video: Gt,
660
- audio: gs,
661
- image: fs,
660
+ audio: hs,
661
+ image: ms,
662
662
  document: Vt
663
- }, ta = {
664
- pdf: ys,
665
- doc: Ns,
666
- xls: _s,
667
- csv: ws,
668
- ppt: xs,
669
- zip: vs,
670
- text: ps,
671
- markdown: bs,
663
+ }, Qs = {
664
+ pdf: _s,
665
+ doc: ws,
666
+ xls: xs,
667
+ csv: vs,
668
+ ppt: ps,
669
+ zip: bs,
670
+ text: gs,
671
+ markdown: fs,
672
672
  generic: Vt
673
673
  };
674
- function na(e) {
675
- const t = se(e);
676
- return t !== "document" ? ea[t] : ta[Zt(e)];
674
+ function ea(e) {
675
+ const t = ne(e);
676
+ return t !== "document" ? Zs[t] : Qs[Zt(e)];
677
677
  }
678
- function ce(e, t) {
679
- return j.createElement(na(e), t);
678
+ function le(e, t) {
679
+ return $.createElement(ea(e), t);
680
680
  }
681
- const sa = (e) => {
681
+ const ta = (e) => {
682
682
  var t, s;
683
683
  return "touches" in e ? ((t = e.touches[0]) == null ? void 0 : t.clientX) ?? ((s = e.changedTouches[0]) == null ? void 0 : s.clientX) ?? 0 : e.clientX;
684
- }, aa = ({
684
+ }, na = ({
685
685
  source: e,
686
686
  mimeType: t,
687
687
  poster: s,
@@ -693,66 +693,66 @@ const sa = (e) => {
693
693
  muted: d = !1,
694
694
  onContainerClick: m
695
695
  }) => {
696
- const b = se(t), u = G(null), f = G(null), c = G(null), g = G(r), [p, v] = O(a), [_, x] = O(0), [I, E] = O(!1), [M, D] = O(!1), [k, T] = O(!1), [N, S] = O(!1), [R, F] = O(!0), [A, P] = O(null), z = Y(() => {
696
+ const b = ne(t), u = H(null), f = H(null), c = H(null), g = H(r), [p, v] = P(a), [_, x] = P(0), [S, E] = P(!1), [M, D] = P(!1), [k, T] = P(!1), [N, I] = P(!1), [R, F] = P(!0), [A, L] = P(null), z = W(() => {
697
697
  T(!1), v(!0);
698
- }, []), V = Y((w) => {
699
- const y = f.current;
700
- if (!y) return 0;
701
- const $ = y.getBoundingClientRect();
698
+ }, []), V = W((w) => {
699
+ const C = f.current;
700
+ if (!C) return 0;
701
+ const j = C.getBoundingClientRect();
702
702
  return Math.max(
703
703
  0,
704
- Math.min(1, (sa(w) - $.left) / $.width)
704
+ Math.min(1, (ta(w) - j.left) / j.width)
705
705
  );
706
- }, []), B = Y((w) => {
707
- const y = u.current;
708
- y && y.duration && (y.currentTime = w * y.duration);
706
+ }, []), B = W((w) => {
707
+ const C = u.current;
708
+ C && C.duration && (C.currentTime = w * C.duration);
709
709
  }, []), U = (w) => {
710
710
  w.stopPropagation(), E(!0);
711
- const y = V(w);
712
- x(y), B(y);
711
+ const C = V(w);
712
+ x(C), B(C);
713
713
  };
714
- H(() => {
714
+ Y(() => {
715
715
  r !== void 0 && r !== g.current && (g.current = r, v(r));
716
- }, [r]), H(() => {
716
+ }, [r]), Y(() => {
717
717
  if (!p) {
718
718
  c.current !== null && (cancelAnimationFrame(c.current), c.current = null);
719
719
  return;
720
720
  }
721
721
  const w = () => {
722
- const y = u.current;
723
- y && y.duration && !I && x(y.currentTime / y.duration), c.current = requestAnimationFrame(w);
722
+ const C = u.current;
723
+ C && C.duration && !S && x(C.currentTime / C.duration), c.current = requestAnimationFrame(w);
724
724
  };
725
725
  return c.current = requestAnimationFrame(w), () => {
726
726
  c.current !== null && cancelAnimationFrame(c.current);
727
727
  };
728
- }, [p, I]), H(() => {
728
+ }, [p, S]), Y(() => {
729
729
  const w = u.current;
730
- w && (p ? w.play().catch((y) => {
730
+ w && (p ? w.play().catch((C) => {
731
731
  v(!1), T(!0);
732
732
  }) : w.pause());
733
- }, [p]), H(() => {
734
- if (!I) return;
735
- const w = ($) => x(V($)), y = ($) => {
736
- E(!1), B(V($));
733
+ }, [p]), Y(() => {
734
+ if (!S) return;
735
+ const w = (j) => x(V(j)), C = (j) => {
736
+ E(!1), B(V(j));
737
737
  };
738
- return window.addEventListener("mousemove", w), window.addEventListener("mouseup", y), window.addEventListener("touchmove", w, { passive: !0 }), window.addEventListener("touchend", y), () => {
739
- window.removeEventListener("mousemove", w), window.removeEventListener("mouseup", y), window.removeEventListener("touchmove", w), window.removeEventListener("touchend", y);
738
+ return window.addEventListener("mousemove", w), window.addEventListener("mouseup", C), window.addEventListener("touchmove", w, { passive: !0 }), window.addEventListener("touchend", C), () => {
739
+ window.removeEventListener("mousemove", w), window.removeEventListener("mouseup", C), window.removeEventListener("touchmove", w), window.removeEventListener("touchend", C);
740
740
  };
741
- }, [I, V, B]);
742
- const q = A ? { aspectRatio: String(A) } : void 0, W = A ? "" : " aspect-video", L = Math.round(_ * 100);
741
+ }, [S, V, B]);
742
+ const X = A ? { aspectRatio: String(A) } : void 0, G = A ? "" : " aspect-video", O = Math.round(_ * 100);
743
743
  return /* @__PURE__ */ h(
744
744
  "div",
745
745
  {
746
746
  role: "button",
747
747
  tabIndex: 0,
748
- className: `relative cursor-pointer overflow-hidden bg-black ${W}`,
749
- style: q,
748
+ className: `relative cursor-pointer overflow-hidden bg-black ${G}`,
749
+ style: X,
750
750
  onClick: (w) => {
751
751
  if (m) {
752
752
  m(w);
753
753
  return;
754
754
  }
755
- k || o && v((y) => !y);
755
+ k || o && v((C) => !C);
756
756
  },
757
757
  onKeyDown: (w) => {
758
758
  if (!(w.key !== "Enter" && w.key !== " ")) {
@@ -760,7 +760,7 @@ const sa = (e) => {
760
760
  m(w);
761
761
  return;
762
762
  }
763
- k || o && v((y) => !y);
763
+ k || o && v((C) => !C);
764
764
  }
765
765
  },
766
766
  children: [
@@ -772,7 +772,7 @@ const sa = (e) => {
772
772
  className: "absolute inset-0 h-full w-full object-cover"
773
773
  }
774
774
  ),
775
- !s && (b === "audio" || R) && /* @__PURE__ */ n("div", { className: "absolute inset-0 flex items-center justify-center", children: ce(t, {
775
+ !s && (b === "audio" || R) && /* @__PURE__ */ n("div", { className: "absolute inset-0 flex items-center justify-center", children: le(t, {
776
776
  className: "size-12 text-black/20",
777
777
  weight: "regular"
778
778
  }) }),
@@ -784,11 +784,11 @@ const sa = (e) => {
784
784
  loop: i,
785
785
  muted: d,
786
786
  style: { width: "100%", height: "100%" },
787
- onLoadStart: () => S(!0),
787
+ onLoadStart: () => I(!0),
788
788
  onCanPlay: () => {
789
- S(!1), F(!1);
789
+ I(!1), F(!1);
790
790
  },
791
- onWaiting: () => S(!0),
791
+ onWaiting: () => I(!0),
792
792
  onPlay: () => T(!1),
793
793
  onEnded: () => {
794
794
  i || (v(!1), x(0));
@@ -804,15 +804,15 @@ const sa = (e) => {
804
804
  muted: d,
805
805
  playsInline: !0,
806
806
  style: { width: "100%", height: "100%" },
807
- onLoadStart: () => S(!0),
807
+ onLoadStart: () => I(!0),
808
808
  onCanPlay: () => {
809
- S(!1), F(!1);
809
+ I(!1), F(!1);
810
810
  },
811
- onWaiting: () => S(!0),
811
+ onWaiting: () => I(!0),
812
812
  onPlay: () => T(!1),
813
813
  onLoadedMetadata: () => {
814
814
  const w = u.current;
815
- w instanceof HTMLVideoElement && w.videoWidth && w.videoHeight && P(w.videoWidth / w.videoHeight);
815
+ w instanceof HTMLVideoElement && w.videoWidth && w.videoHeight && L(w.videoWidth / w.videoHeight);
816
816
  },
817
817
  onEnded: () => {
818
818
  i || (v(!1), x(0));
@@ -821,7 +821,7 @@ const sa = (e) => {
821
821
  }
822
822
  ) }),
823
823
  N && !k && /* @__PURE__ */ n("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ n(
824
- be,
824
+ ge,
825
825
  {
826
826
  className: "size-8 animate-spin text-white/80",
827
827
  weight: "bold"
@@ -848,7 +848,7 @@ const sa = (e) => {
848
848
  {
849
849
  role: "slider",
850
850
  "aria-label": "Playback position",
851
- "aria-valuenow": L,
851
+ "aria-valuenow": O,
852
852
  "aria-valuemin": 0,
853
853
  "aria-valuemax": 100,
854
854
  tabIndex: 0,
@@ -864,7 +864,7 @@ const sa = (e) => {
864
864
  "div",
865
865
  {
866
866
  className: "h-full rounded-full bg-white",
867
- style: { width: `${L}%` }
867
+ style: { width: `${O}%` }
868
868
  }
869
869
  ) })
870
870
  }
@@ -875,11 +875,11 @@ const sa = (e) => {
875
875
  {
876
876
  type: "button",
877
877
  onClick: (w) => {
878
- w.stopPropagation(), v((y) => !y);
878
+ w.stopPropagation(), v((C) => !C);
879
879
  },
880
880
  className: "shrink-0 text-white",
881
881
  "aria-label": p ? "Pause" : "Play",
882
- children: p ? /* @__PURE__ */ n(Cs, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ n(Be, { className: "size-5 translate-x-px", weight: "fill" })
882
+ children: p ? /* @__PURE__ */ n(Ns, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ n(Be, { className: "size-5 translate-x-px", weight: "fill" })
883
883
  }
884
884
  ),
885
885
  /* @__PURE__ */ h(
@@ -887,7 +887,7 @@ const sa = (e) => {
887
887
  {
888
888
  role: "slider",
889
889
  "aria-label": "Playback position",
890
- "aria-valuenow": L,
890
+ "aria-valuenow": O,
891
891
  "aria-valuemin": 0,
892
892
  "aria-valuemax": 100,
893
893
  tabIndex: 0,
@@ -905,12 +905,12 @@ const sa = (e) => {
905
905
  /* @__PURE__ */ n(
906
906
  "div",
907
907
  {
908
- className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${M || I ? "h-1.5" : "h-1"}`,
908
+ className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${M || S ? "h-1.5" : "h-1"}`,
909
909
  children: /* @__PURE__ */ n(
910
910
  "div",
911
911
  {
912
912
  className: "h-full rounded-full bg-white",
913
- style: { width: `${L}%` }
913
+ style: { width: `${O}%` }
914
914
  }
915
915
  )
916
916
  }
@@ -918,8 +918,8 @@ const sa = (e) => {
918
918
  /* @__PURE__ */ n(
919
919
  "div",
920
920
  {
921
- className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${M || I ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
922
- style: { left: `${L}%` }
921
+ className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${M || S ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
922
+ style: { left: `${O}%` }
923
923
  }
924
924
  )
925
925
  ]
@@ -929,7 +929,7 @@ const sa = (e) => {
929
929
  ]
930
930
  }
931
931
  );
932
- }, zt = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", ra = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", Qt = ({
932
+ }, zt = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", sa = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", Qt = ({
933
933
  mimeType: e,
934
934
  sourceUrl: t,
935
935
  thumbnailUrl: s,
@@ -938,9 +938,9 @@ const sa = (e) => {
938
938
  mediaPlayerProps: i,
939
939
  containedImage: o = !1
940
940
  }) => {
941
- const l = se(e), [d, m] = O(!1);
941
+ const l = ne(e), [d, m] = P(!1);
942
942
  return t && (l === "video" || l === "audio") ? /* @__PURE__ */ n(
943
- aa,
943
+ na,
944
944
  {
945
945
  source: t,
946
946
  mimeType: e,
@@ -986,12 +986,12 @@ const sa = (e) => {
986
986
  "div",
987
987
  {
988
988
  className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
989
- children: ce(e, {
989
+ children: le(e, {
990
990
  className: zt(r),
991
991
  weight: "regular"
992
992
  })
993
993
  }
994
- ) : s ? /* @__PURE__ */ n("div", { className: `relative ${ra(r)}`, children: /* @__PURE__ */ n(
994
+ ) : s ? /* @__PURE__ */ n("div", { className: `relative ${sa(r)}`, children: /* @__PURE__ */ n(
995
995
  "img",
996
996
  {
997
997
  src: s,
@@ -1003,7 +1003,7 @@ const sa = (e) => {
1003
1003
  "div",
1004
1004
  {
1005
1005
  className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
1006
- children: ce(e, {
1006
+ children: le(e, {
1007
1007
  className: zt(r),
1008
1008
  weight: "regular"
1009
1009
  })
@@ -1029,7 +1029,7 @@ const sa = (e) => {
1029
1029
  {
1030
1030
  ref: b,
1031
1031
  "data-testid": u,
1032
- className: C(
1032
+ className: y(
1033
1033
  "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)]",
1034
1034
  f ? "bg-[#121110]" : "bg-white"
1035
1035
  ),
@@ -1041,7 +1041,7 @@ const sa = (e) => {
1041
1041
  c.trim() !== "" && /* @__PURE__ */ n(
1042
1042
  "p",
1043
1043
  {
1044
- className: C("mb-0.5 truncate text-base font-medium", {
1044
+ className: y("mb-0.5 truncate text-base font-medium", {
1045
1045
  "text-black": !f,
1046
1046
  "text-white/30": f && g,
1047
1047
  "text-white": f && !g
@@ -1050,8 +1050,8 @@ const sa = (e) => {
1050
1050
  }
1051
1051
  ),
1052
1052
  /* @__PURE__ */ h("div", { className: "flex flex-wrap items-center gap-1", children: [
1053
- ce(r, {
1054
- className: C(
1053
+ le(r, {
1054
+ className: y(
1055
1055
  "size-5 shrink-0",
1056
1056
  f ? "text-white/55" : "text-black/55"
1057
1057
  ),
@@ -1060,7 +1060,7 @@ const sa = (e) => {
1060
1060
  i != null && i !== "" && /* @__PURE__ */ n(
1061
1061
  "span",
1062
1062
  {
1063
- className: C(
1063
+ className: y(
1064
1064
  "text-xs font-medium",
1065
1065
  f ? "text-white/55" : "text-black/55"
1066
1066
  ),
@@ -1081,23 +1081,23 @@ function tn(e) {
1081
1081
  function Xe(e) {
1082
1082
  return `w-[280px] select-none overflow-hidden rounded-[24px] ${e ? "bg-[#121110]" : "bg-[#F3F3F1]"} shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]`;
1083
1083
  }
1084
- function ia(e) {
1084
+ function aa(e) {
1085
1085
  return e ? "bg-white/10" : "bg-black/5";
1086
1086
  }
1087
- function oa(e) {
1087
+ function ra(e) {
1088
1088
  return e ? "text-white" : "text-black";
1089
1089
  }
1090
- function la(e) {
1090
+ function ia(e) {
1091
1091
  return e ? "text-white/55" : "text-black/55";
1092
1092
  }
1093
- function ca(e) {
1093
+ function oa(e) {
1094
1094
  return e ? "text-white/40" : "text-black/40";
1095
1095
  }
1096
- function da(e) {
1096
+ function la(e) {
1097
1097
  return e ? "text-white/20" : "text-black/20";
1098
1098
  }
1099
1099
  const Ke = ({ attachment: e, isMyMessage: t }) => {
1100
- const { title: s, text: a, image_url: r, og_scrape_url: i, title_link: o } = e, l = i ?? o, d = typeof l == "string" && l.trim() !== "" ? l : void 0, m = /* @__PURE__ */ h(j.Fragment, { children: [
1100
+ const { title: s, text: a, image_url: r, og_scrape_url: i, title_link: o } = e, l = i ?? o, d = typeof l == "string" && l.trim() !== "" ? l : void 0, m = /* @__PURE__ */ h($.Fragment, { children: [
1101
1101
  /* @__PURE__ */ n("div", { className: "p-2", children: r ? /* @__PURE__ */ n(
1102
1102
  "img",
1103
1103
  {
@@ -1108,14 +1108,14 @@ const Ke = ({ attachment: e, isMyMessage: t }) => {
1108
1108
  ) : /* @__PURE__ */ n(
1109
1109
  "div",
1110
1110
  {
1111
- className: `aspect-video w-full rounded-[20px] ${ia(t)} flex items-center justify-center`,
1112
- children: /* @__PURE__ */ n(ks, { className: `size-12 ${da(t)}` })
1111
+ className: `aspect-video w-full rounded-[20px] ${aa(t)} flex items-center justify-center`,
1112
+ children: /* @__PURE__ */ n(ys, { className: `size-12 ${la(t)}` })
1113
1113
  }
1114
1114
  ) }),
1115
1115
  /* @__PURE__ */ h("div", { className: "px-3 pb-3", children: [
1116
- s && /* @__PURE__ */ n("p", { className: `truncate text-[14px] font-medium leading-5 ${oa(t)}`, children: s }),
1117
- a && /* @__PURE__ */ n("p", { className: `truncate text-[12px] leading-4 ${la(t)}`, children: a }),
1118
- d && /* @__PURE__ */ n("p", { className: `mt-1 truncate text-[12px] leading-4 ${ca(t)}`, children: d })
1116
+ s && /* @__PURE__ */ n("p", { className: `truncate text-[14px] font-medium leading-5 ${ra(t)}`, children: s }),
1117
+ a && /* @__PURE__ */ n("p", { className: `truncate text-[12px] leading-4 ${ia(t)}`, children: a }),
1118
+ d && /* @__PURE__ */ n("p", { className: `mt-1 truncate text-[12px] leading-4 ${oa(t)}`, children: d })
1119
1119
  ] })
1120
1120
  ] });
1121
1121
  return d ? /* @__PURE__ */ n("a", { href: d, target: "_blank", rel: "noopener noreferrer", className: "block no-underline", children: m }) : /* @__PURE__ */ n("div", { className: "block", children: m });
@@ -1127,7 +1127,7 @@ function Je(e) {
1127
1127
  var t;
1128
1128
  return (t = e.attachments) == null ? void 0 : t.find(nn);
1129
1129
  }
1130
- async function ua(e, t) {
1130
+ async function ca(e, t) {
1131
1131
  let s;
1132
1132
  try {
1133
1133
  s = t ?? new URL(e).pathname.split("/").pop() ?? "download";
@@ -1139,11 +1139,11 @@ async function ua(e, t) {
1139
1139
  const r = await a.blob(), i = URL.createObjectURL(r), o = document.createElement("a");
1140
1140
  o.href = i, o.download = s, o.style.display = "none", document.body.appendChild(o), o.click(), document.body.removeChild(o), URL.revokeObjectURL(i);
1141
1141
  }
1142
- const ma = ({
1142
+ const da = ({
1143
1143
  url: e,
1144
1144
  filename: t
1145
1145
  }) => {
1146
- const [s, a] = O(!1);
1146
+ const [s, a] = P(!1);
1147
1147
  return /* @__PURE__ */ n(
1148
1148
  "button",
1149
1149
  {
@@ -1151,7 +1151,7 @@ const ma = ({
1151
1151
  onClick: (i) => {
1152
1152
  i.stopPropagation();
1153
1153
  const o = window.open("", "_blank", "noopener,noreferrer");
1154
- a(!0), ua(e, t).then(() => {
1154
+ a(!0), ca(e, t).then(() => {
1155
1155
  o == null || o.close();
1156
1156
  }).catch(() => {
1157
1157
  o && (o.location.href = e);
@@ -1159,8 +1159,8 @@ const ma = ({
1159
1159
  },
1160
1160
  disabled: s,
1161
1161
  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",
1162
- children: s ? /* @__PURE__ */ n(be, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ h(j.Fragment, { children: [
1163
- /* @__PURE__ */ n(pe, { className: "size-4 text-white", weight: "bold" }),
1162
+ children: s ? /* @__PURE__ */ n(ge, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ h($.Fragment, { children: [
1163
+ /* @__PURE__ */ n(be, { className: "size-4 text-white", weight: "bold" }),
1164
1164
  "Download"
1165
1165
  ] })
1166
1166
  }
@@ -1222,7 +1222,7 @@ const sn = ({
1222
1222
  fileSize: a,
1223
1223
  thumbnailUrl: r
1224
1224
  }) => {
1225
- const i = se(t), o = a !== void 0 ? tn(a) : void 0;
1225
+ const i = ne(t), o = a !== void 0 ? tn(a) : void 0;
1226
1226
  return /* @__PURE__ */ n(
1227
1227
  en,
1228
1228
  {
@@ -1241,17 +1241,17 @@ const sn = ({
1241
1241
  containedImage: i === "image" || i === "document"
1242
1242
  }
1243
1243
  ),
1244
- action: /* @__PURE__ */ n(ma, { url: e, filename: s })
1244
+ action: /* @__PURE__ */ n(da, { url: e, filename: s })
1245
1245
  }
1246
1246
  );
1247
- }, ha = ({
1247
+ }, ua = ({
1248
1248
  message: e,
1249
1249
  isMyMessage: t = !1
1250
1250
  }) => {
1251
1251
  const s = Je(e), a = Ze(e);
1252
1252
  return !s && !a ? null : /* @__PURE__ */ h("div", { className: t ? "str-chat__message str-chat__message-simple str-chat__message--me str-chat__message-simple--me" : "str-chat__message str-chat__message-simple str-chat__message--other", children: [
1253
1253
  !t && e.user && /* @__PURE__ */ n(
1254
- re,
1254
+ ae,
1255
1255
  {
1256
1256
  className: "str-chat__avatar str-chat__message-sender-avatar",
1257
1257
  id: e.user.id,
@@ -1275,7 +1275,7 @@ const sn = ({
1275
1275
  }
1276
1276
  )
1277
1277
  ] });
1278
- }, fa = ({
1278
+ }, ma = ({
1279
1279
  message: e
1280
1280
  }) => {
1281
1281
  const t = Je(e);
@@ -1283,7 +1283,7 @@ const sn = ({
1283
1283
  return /* @__PURE__ */ n("div", { className: Xe(!0), children: /* @__PURE__ */ n(Ke, { attachment: t, isMyMessage: !0 }) });
1284
1284
  const s = Ze(e);
1285
1285
  return s ? /* @__PURE__ */ n(sn, { ...s }) : null;
1286
- }, ga = ({
1286
+ }, ha = ({
1287
1287
  message: e
1288
1288
  }) => {
1289
1289
  const t = Je(e);
@@ -1291,18 +1291,18 @@ const sn = ({
1291
1291
  return /* @__PURE__ */ n("div", { className: Xe(!1), children: /* @__PURE__ */ n(Ke, { attachment: t, isMyMessage: !1 }) });
1292
1292
  const s = Ze(e);
1293
1293
  return s ? /* @__PURE__ */ n(an, { ...s }) : null;
1294
- }, ki = Object.assign(ha, {
1295
- Creator: fa,
1296
- Visitor: ga
1297
- }), ba = {
1294
+ }, _i = Object.assign(ua, {
1295
+ Creator: ma,
1296
+ Visitor: ha
1297
+ }), fa = {
1298
1298
  isUnlocking: () => !1
1299
- }, pa = {
1300
- LockedAttachment: ba
1301
- }, rn = Ge({}), Ei = rn.Provider;
1302
- function va(e) {
1303
- return Te(rn)[e] ?? pa[e];
1299
+ }, ga = {
1300
+ LockedAttachment: fa
1301
+ }, rn = Ge({}), Ni = rn.Provider;
1302
+ function ba(e) {
1303
+ return Te(rn)[e] ?? ga[e];
1304
1304
  }
1305
- const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1305
+ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1306
1306
  "svg",
1307
1307
  {
1308
1308
  width: e,
@@ -1319,19 +1319,19 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1319
1319
  }
1320
1320
  )
1321
1321
  }
1322
- ), wa = (e) => {
1322
+ ), va = (e) => {
1323
1323
  var t;
1324
1324
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_TIP";
1325
- }, _a = (e) => {
1325
+ }, xa = (e) => {
1326
1326
  var t;
1327
1327
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_PAID";
1328
1328
  }, ke = (e) => {
1329
1329
  var t;
1330
1330
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_CHATBOT";
1331
- }, Na = (e) => {
1331
+ }, wa = (e) => {
1332
1332
  var t;
1333
1333
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_ATTACHMENT";
1334
- }, on = (e) => wa(e) || _a(e), ya = (e) => {
1334
+ }, on = (e) => va(e) || xa(e), _a = (e) => {
1335
1335
  var t;
1336
1336
  return on(e) && !((t = e.text) != null && t.trim());
1337
1337
  }, Pe = ({
@@ -1349,7 +1349,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1349
1349
  if (!f) return null;
1350
1350
  const c = t ? "message-tip-standalone" : "message-tag message-tag--tip", g = t ? `${f} tip` : `Delivered with ${f} tip`;
1351
1351
  return /* @__PURE__ */ h("div", { className: c, children: [
1352
- /* @__PURE__ */ n(Es, { size: t ? 14 : 12 }),
1352
+ /* @__PURE__ */ n(Cs, { size: t ? 14 : 12 }),
1353
1353
  /* @__PURE__ */ n("span", { children: g })
1354
1354
  ] });
1355
1355
  }
@@ -1357,15 +1357,15 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1357
1357
  "message-chatbot-indicator",
1358
1358
  s ? "message-chatbot-indicator--sender" : "message-chatbot-indicator--receiver",
1359
1359
  o ? "message-chatbot-indicator--attachment" : "message-chatbot-indicator--text"
1360
- ].join(" "), m = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__label", children: l }), b = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ n(xa, { size: o ? 12 : 15 }) });
1361
- return /* @__PURE__ */ n("div", { className: d, "data-testid": "message-chatbot-indicator", children: s && !o ? /* @__PURE__ */ h(ne, { children: [
1360
+ ].join(" "), m = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__label", children: l }), b = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ n(pa, { size: o ? 12 : 15 }) });
1361
+ return /* @__PURE__ */ n("div", { className: d, "data-testid": "message-chatbot-indicator", children: s && !o ? /* @__PURE__ */ h(te, { children: [
1362
1362
  m,
1363
1363
  b
1364
- ] }) : /* @__PURE__ */ h(ne, { children: [
1364
+ ] }) : /* @__PURE__ */ h(te, { children: [
1365
1365
  b,
1366
1366
  m
1367
1367
  ] }) });
1368
- }, Ca = ({
1368
+ }, Na = ({
1369
1369
  selected: e,
1370
1370
  onVoteUp: t,
1371
1371
  onVoteDown: s
@@ -1374,31 +1374,31 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1374
1374
  "button",
1375
1375
  {
1376
1376
  type: "button",
1377
- className: C("message-vote-button focus-ring", {
1377
+ className: y("message-vote-button focus-ring", {
1378
1378
  "message-vote-button--selected": e === "up"
1379
1379
  }),
1380
1380
  onClick: t,
1381
1381
  "aria-label": "Good response",
1382
1382
  "aria-pressed": e === "up",
1383
1383
  "data-tooltip": "Good response",
1384
- children: /* @__PURE__ */ n(Is, { size: 16, weight: e === "up" ? "fill" : "regular" })
1384
+ children: /* @__PURE__ */ n(ks, { size: 16, weight: e === "up" ? "fill" : "regular" })
1385
1385
  }
1386
1386
  ),
1387
1387
  /* @__PURE__ */ n(
1388
1388
  "button",
1389
1389
  {
1390
1390
  type: "button",
1391
- className: C("message-vote-button focus-ring", {
1391
+ className: y("message-vote-button focus-ring", {
1392
1392
  "message-vote-button--selected": e === "down"
1393
1393
  }),
1394
1394
  onClick: s,
1395
1395
  "aria-label": "Bad response",
1396
1396
  "aria-pressed": e === "down",
1397
1397
  "data-tooltip": "Bad response",
1398
- children: /* @__PURE__ */ n(Ss, { size: 16, weight: e === "down" ? "fill" : "regular" })
1398
+ children: /* @__PURE__ */ n(Es, { size: 16, weight: e === "down" ? "fill" : "regular" })
1399
1399
  }
1400
1400
  )
1401
- ] }), ka = (e) => {
1401
+ ] }), ya = (e) => {
1402
1402
  var ht, ft, gt, bt, pt, vt, xt, wt, _t, Nt, yt, Ct, kt, Et;
1403
1403
  const {
1404
1404
  additionalMessageInputProps: t,
@@ -1417,66 +1417,66 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1417
1417
  renderText: g,
1418
1418
  threadList: p,
1419
1419
  viewerLanguage: v
1420
- } = e, { client: _ } = Ye("CustomMessage"), { channel: x } = de("CustomMessage"), { isUnlocking: I, onUnlockClick: E, onFetchSource: M, onDownloadClick: D } = va("LockedAttachment"), [k, T] = O(!1), N = Rn(c.id), { selected: S, voteUp: R, voteDown: F } = Hs(c), {
1421
- Attachment: A = Ln,
1422
- EditMessageModal: P = Dn,
1420
+ } = e, { client: _ } = Ye("CustomMessage"), { channel: x } = ce("CustomMessage"), { isUnlocking: S, onUnlockClick: E, onFetchSource: M, onDownloadClick: D } = ba("LockedAttachment"), [k, T] = P(!1), N = Mn(c.id), { selected: I, voteUp: R, voteDown: F } = Vs(c), {
1421
+ Attachment: A = Rn,
1422
+ EditMessageModal: L = Ln,
1423
1423
  MessageActions: z,
1424
- MessageBlocked: V = Pn,
1425
- MessageBouncePrompt: B = On,
1426
- MessageDeleted: U = zn,
1427
- MessageIsThreadReplyInChannelButtonIndicator: q = $n,
1428
- MessageRepliesCountButton: W = Fn,
1429
- ReminderNotification: L = Bn,
1430
- StreamedMessageText: w = Un,
1431
- PinIndicator: y
1432
- } = Ut("CustomMessage"), $ = jn(c), X = Vn(c), K = te(
1424
+ MessageBlocked: V = Dn,
1425
+ MessageBouncePrompt: B = Pn,
1426
+ MessageDeleted: U = On,
1427
+ MessageIsThreadReplyInChannelButtonIndicator: X = zn,
1428
+ MessageRepliesCountButton: G = $n,
1429
+ ReminderNotification: O = Fn,
1430
+ StreamedMessageText: w = Bn,
1431
+ PinIndicator: C
1432
+ } = Ut("CustomMessage"), j = Un(c), q = jn(c), Ne = ee(
1433
1433
  () => u == null ? void 0 : u(c),
1434
1434
  [u, c]
1435
- ), J = te(() => {
1436
- const he = c.attachments ?? [], ye = c.shared_location ? [c.shared_location, ...he] : he;
1435
+ ), K = ee(() => {
1436
+ const me = c.attachments ?? [], ye = c.shared_location ? [c.shared_location, ...me] : me;
1437
1437
  if (!ke(c)) return ye;
1438
- const It = ye.filter((St) => !("type" in St) || !nn(St));
1439
- return It.length === ye.length ? ye : It;
1440
- }, [c]), ie = te(() => {
1441
- const he = Xt({ message: c, viewerLanguage: v });
1442
- return he === c.text ? c : { ...c, text: he };
1438
+ const St = ye.filter((It) => !("type" in It) || !nn(It));
1439
+ return St.length === ye.length ? ye : St;
1440
+ }, [c]), re = ee(() => {
1441
+ const me = Xt({ message: c, viewerLanguage: v });
1442
+ return me === c.text ? c : { ...c, text: me };
1443
1443
  }, [c, v]);
1444
- if (Gn(c))
1444
+ if (Vn(c))
1445
1445
  return null;
1446
1446
  if (c.deleted_at || c.type === "deleted")
1447
1447
  return /* @__PURE__ */ n(U, { message: c });
1448
- if (Hn(c))
1448
+ if (Gn(c))
1449
1449
  return /* @__PURE__ */ n(V, {});
1450
- const Z = !p && !!c.reply_count, ae = !p && c.show_in_channel && c.parent_id, ee = c.status === "failed" && ((ht = c.error) == null ? void 0 : ht.status) !== 403, lt = Yn(c);
1451
- let oe;
1452
- ee ? oe = () => m(c) : lt && (oe = () => T(!0));
1453
- const ue = f(), kn = C(
1450
+ const J = !p && !!c.reply_count, se = !p && c.show_in_channel && c.parent_id, Q = c.status === "failed" && ((ht = c.error) == null ? void 0 : ht.status) !== 403, lt = Hn(c);
1451
+ let ie;
1452
+ Q ? ie = () => m(c) : lt && (ie = () => T(!0));
1453
+ const de = f(), kn = y(
1454
1454
  "str-chat__message str-chat__message-simple",
1455
1455
  `str-chat__message--${c.type}`,
1456
1456
  `str-chat__message--${c.status}`,
1457
- ue ? "str-chat__message--me str-chat__message-simple--me" : "str-chat__message--other",
1457
+ de ? "str-chat__message--me str-chat__message-simple--me" : "str-chat__message--other",
1458
1458
  c.text ? "str-chat__message--has-text" : "has-no-text",
1459
1459
  {
1460
- "str-chat__message--has-attachment": $,
1460
+ "str-chat__message--has-attachment": j,
1461
1461
  "str-chat__message--highlighted": b,
1462
1462
  "str-chat__message--pinned pinned-message": c.pinned,
1463
- "str-chat__message--with-reactions": X,
1463
+ "str-chat__message--with-reactions": q,
1464
1464
  "str-chat__message-send-can-be-retried": (c == null ? void 0 : c.status) === "failed" && ((ft = c == null ? void 0 : c.error) == null ? void 0 : ft.status) !== 403,
1465
- "str-chat__message-with-thread-link": Z || ae,
1465
+ "str-chat__message-with-thread-link": J || se,
1466
1466
  "str-chat__virtual-message__wrapper--end": r,
1467
1467
  "str-chat__virtual-message__wrapper--first": i,
1468
1468
  "str-chat__virtual-message__wrapper--group": o
1469
1469
  }
1470
- ), ct = c.poll_id && _.polls.fromState(c.poll_id), dt = ya(c), me = ke(c), ut = Na(c), Re = !!(J != null && J.length && !c.quoted_message), mt = me && ue && Re;
1471
- return /* @__PURE__ */ h(ne, { children: [
1470
+ ), ct = c.poll_id && _.polls.fromState(c.poll_id), dt = _a(c), ue = ke(c), ut = wa(c), Re = !!(K != null && K.length && !c.quoted_message), mt = ue && de && Re;
1471
+ return /* @__PURE__ */ h(te, { children: [
1472
1472
  a && /* @__PURE__ */ n(
1473
- P,
1473
+ L,
1474
1474
  {
1475
1475
  additionalMessageInputProps: t
1476
1476
  }
1477
1477
  ),
1478
1478
  k && /* @__PURE__ */ n(
1479
- qn,
1479
+ Yn,
1480
1480
  {
1481
1481
  MessageBouncePrompt: B,
1482
1482
  onClose: () => T(!1),
@@ -1489,10 +1489,10 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1489
1489
  className: kn,
1490
1490
  "data-message-id": c.id,
1491
1491
  children: [
1492
- y && /* @__PURE__ */ n(y, {}),
1493
- !!N && /* @__PURE__ */ n(L, { reminder: N }),
1492
+ C && /* @__PURE__ */ n(C, {}),
1493
+ !!N && /* @__PURE__ */ n(O, { reminder: N }),
1494
1494
  c.user && /* @__PURE__ */ n(
1495
- re,
1495
+ ae,
1496
1496
  {
1497
1497
  className: "str-chat__avatar str-chat__message-sender-avatar",
1498
1498
  id: c.user.id,
@@ -1500,20 +1500,20 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1500
1500
  name: c.user.name || c.user.id,
1501
1501
  size: 24,
1502
1502
  shape: "circle",
1503
- dmAgentEnabled: me
1503
+ dmAgentEnabled: ue
1504
1504
  }
1505
1505
  ),
1506
1506
  /* @__PURE__ */ n(
1507
1507
  "div",
1508
1508
  {
1509
- className: C("str-chat__message-inner", {
1510
- "str-chat__simple-message--error-failed": ee || lt
1509
+ className: y("str-chat__message-inner", {
1510
+ "str-chat__simple-message--error-failed": Q || lt
1511
1511
  }),
1512
1512
  "data-testid": "message-inner",
1513
- onClick: oe,
1514
- onKeyDown: oe,
1515
- role: oe ? "button" : void 0,
1516
- tabIndex: oe ? 0 : void 0,
1513
+ onClick: ie,
1514
+ onKeyDown: ie,
1515
+ role: ie ? "button" : void 0,
1516
+ tabIndex: ie ? 0 : void 0,
1517
1517
  style: {
1518
1518
  // Force margins to 0 to prevent hover layout shift
1519
1519
  // Stream Chat CSS sets margin-inline-end/start to 78px, then 0 on hover
@@ -1521,7 +1521,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1521
1521
  marginInlineStart: 0
1522
1522
  },
1523
1523
  children: ut ? /* @__PURE__ */ h("div", { className: "str-chat__message-bubble-wrapper", children: [
1524
- ue ? /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
1524
+ de ? /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
1525
1525
  z && /* @__PURE__ */ n(z, {}),
1526
1526
  /* @__PURE__ */ n(
1527
1527
  Ot.Sent,
@@ -1546,7 +1546,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1546
1546
  amountText: (Ct = c.metadata) == null ? void 0 : Ct.amount_text,
1547
1547
  detail: (kt = c.metadata) == null ? void 0 : kt.attachment_detail,
1548
1548
  paymentStatus: (Et = c.metadata) == null ? void 0 : Et.payment_status,
1549
- isUnlocking: I(c.id),
1549
+ isUnlocking: S(c.id),
1550
1550
  onUnlockClick: () => E == null ? void 0 : E(c, x),
1551
1551
  onFetchSource: async () => await (M == null ? void 0 : M(c, x)),
1552
1552
  onDownloadClick: () => D == null ? void 0 : D(c, x)
@@ -1557,7 +1557,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1557
1557
  c.text && /* @__PURE__ */ n("div", { className: "str-chat__message-bubble", children: /* @__PURE__ */ n(
1558
1558
  Tt,
1559
1559
  {
1560
- message: ie,
1560
+ message: re,
1561
1561
  renderText: g
1562
1562
  }
1563
1563
  ) })
@@ -1565,79 +1565,79 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1565
1565
  /* Tip-only messages render as a standalone bubble */
1566
1566
  /* @__PURE__ */ n(Pe, { message: c, standalone: !0 })
1567
1567
  ) : /* @__PURE__ */ n("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ h("div", { className: "str-chat__message-bubble", children: [
1568
- me && !mt && /* @__PURE__ */ n(
1568
+ ue && !mt && /* @__PURE__ */ n(
1569
1569
  Pe,
1570
1570
  {
1571
1571
  message: c,
1572
1572
  hasAttachment: Re,
1573
- isMyMessage: ue
1573
+ isMyMessage: de
1574
1574
  }
1575
1575
  ),
1576
- ct && /* @__PURE__ */ n(Wn, { poll: ct }),
1577
- J != null && J.length && !c.quoted_message ? /* @__PURE__ */ n(
1576
+ ct && /* @__PURE__ */ n(qn, { poll: ct }),
1577
+ K != null && K.length && !c.quoted_message ? /* @__PURE__ */ n(
1578
1578
  A,
1579
1579
  {
1580
1580
  actionHandler: l,
1581
- attachments: J
1581
+ attachments: K
1582
1582
  }
1583
1583
  ) : null,
1584
- K ? /* @__PURE__ */ n(
1584
+ Ne ? /* @__PURE__ */ n(
1585
1585
  w,
1586
1586
  {
1587
- message: ie,
1587
+ message: re,
1588
1588
  renderText: g
1589
1589
  }
1590
1590
  ) : /* @__PURE__ */ n(
1591
1591
  Tt,
1592
1592
  {
1593
- message: ie,
1593
+ message: re,
1594
1594
  renderText: g
1595
1595
  }
1596
1596
  ),
1597
- /* @__PURE__ */ n(Xn, {})
1597
+ /* @__PURE__ */ n(Wn, {})
1598
1598
  ] }) })
1599
1599
  }
1600
1600
  ),
1601
1601
  !ut && !dt && /* @__PURE__ */ h("div", { className: "str-chat__message-footer", children: [
1602
- (!me || mt) && /* @__PURE__ */ n(
1602
+ (!ue || mt) && /* @__PURE__ */ n(
1603
1603
  Pe,
1604
1604
  {
1605
1605
  message: c,
1606
1606
  hasAttachment: Re,
1607
- isMyMessage: ue
1607
+ isMyMessage: de
1608
1608
  }
1609
1609
  ),
1610
- s && me && /* @__PURE__ */ n(
1611
- Ca,
1610
+ s && ue && /* @__PURE__ */ n(
1611
+ Na,
1612
1612
  {
1613
- selected: S,
1613
+ selected: I,
1614
1614
  onVoteUp: R,
1615
1615
  onVoteDown: F
1616
1616
  }
1617
1617
  )
1618
1618
  ] }),
1619
- Z && /* @__PURE__ */ n(
1620
- W,
1619
+ J && /* @__PURE__ */ n(
1620
+ G,
1621
1621
  {
1622
1622
  onClick: d,
1623
1623
  reply_count: c.reply_count
1624
1624
  }
1625
1625
  ),
1626
- ae && /* @__PURE__ */ n(q, {})
1626
+ se && /* @__PURE__ */ n(X, {})
1627
1627
  ]
1628
1628
  },
1629
1629
  c.id
1630
1630
  )
1631
1631
  ] });
1632
- }, Ea = j.memo(
1633
- ka,
1634
- (e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 : Mn(e, t)
1635
- ), Ia = (e) => {
1636
- const t = ve("CustomMessage");
1637
- return /* @__PURE__ */ n(Ea, { ...t, ...e });
1638
- }, Sa = () => {
1632
+ }, Ca = $.memo(
1633
+ ya,
1634
+ (e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 : An(e, t)
1635
+ ), ka = (e) => {
1636
+ const t = pe("CustomMessage");
1637
+ return /* @__PURE__ */ n(Ca, { ...t, ...e });
1638
+ }, Ea = () => {
1639
1639
  var s;
1640
- const { handleDelete: e, message: t } = ve("CustomMessageActions");
1640
+ const { handleDelete: e, message: t } = pe("CustomMessageActions");
1641
1641
  return ((s = t.metadata) == null ? void 0 : s.payment_status) === "paid" ? null : /* @__PURE__ */ n(
1642
1642
  Ht,
1643
1643
  {
@@ -1645,11 +1645,11 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1645
1645
  "aria-label": "Delete",
1646
1646
  title: "Delete",
1647
1647
  className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
1648
- children: /* @__PURE__ */ n(Ts, { size: 16, weight: "light", "aria-hidden": !0 })
1648
+ children: /* @__PURE__ */ n(Ss, { size: 16, weight: "light", "aria-hidden": !0 })
1649
1649
  }
1650
1650
  );
1651
- }, Ta = () => {
1652
- const { handleFlag: e } = ve("CustomMessageActions");
1651
+ }, Sa = () => {
1652
+ const { handleFlag: e } = pe("CustomMessageActions");
1653
1653
  return /* @__PURE__ */ n(
1654
1654
  Ht,
1655
1655
  {
@@ -1660,19 +1660,19 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1660
1660
  children: /* @__PURE__ */ n(jt, { size: 16, weight: "light", "aria-hidden": !0 })
1661
1661
  }
1662
1662
  );
1663
- }, Aa = () => {
1663
+ }, Ia = () => {
1664
1664
  var t;
1665
- const { message: e } = ve("CustomMessageActions");
1665
+ const { message: e } = pe("CustomMessageActions");
1666
1666
  return ((t = e.metadata) == null ? void 0 : t.custom_type) !== "MESSAGE_ATTACHMENT" ? null : /* @__PURE__ */ n(
1667
- Ps,
1667
+ Ls,
1668
1668
  {
1669
1669
  messageActionSet: [
1670
- { Component: Sa, placement: "quick", type: "delete" },
1671
- { Component: Ta, placement: "quick", type: "flag" }
1670
+ { Component: Ea, placement: "quick", type: "delete" },
1671
+ { Component: Sa, placement: "quick", type: "flag" }
1672
1672
  ]
1673
1673
  }
1674
1674
  );
1675
- }, Ma = ({
1675
+ }, Ta = ({
1676
1676
  link: e,
1677
1677
  onDismiss: t
1678
1678
  }) => {
@@ -1712,26 +1712,26 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1712
1712
  ]
1713
1713
  }
1714
1714
  );
1715
- }, Ra = (e) => ({
1715
+ }, Aa = (e) => ({
1716
1716
  linkPreviews: Array.from(e.previews.values()).filter(
1717
1717
  (t) => Rt.previewIsLoaded(t) || Rt.previewIsLoading(t)
1718
1718
  )
1719
- }), La = () => {
1720
- const { linkPreviewsManager: e } = Kn(), { linkPreviews: t } = Jn(
1719
+ }), Ma = () => {
1720
+ const { linkPreviewsManager: e } = Xn(), { linkPreviews: t } = Kn(
1721
1721
  e.state,
1722
- Ra
1722
+ Aa
1723
1723
  ), s = (r) => {
1724
1724
  e.dismissPreview(r);
1725
1725
  };
1726
1726
  return t.length > 0 ? /* @__PURE__ */ n("div", { className: "flex flex-col items-center w-full gap-2 mb-4", children: t.map((r) => /* @__PURE__ */ n(
1727
- Ma,
1727
+ Ta,
1728
1728
  {
1729
1729
  link: r,
1730
1730
  onDismiss: s
1731
1731
  },
1732
1732
  r.og_scrape_url
1733
1733
  )) }) : null;
1734
- }, Da = "--messaging-channel-input-spacer-height", Pa = typeof window > "u" ? H : In, ln = j.createContext(!1), Oa = ({ sendMessage: e, disabled: t, ...s }) => /* @__PURE__ */ n(
1734
+ }, ln = $.createContext(!1), Ra = ({ sendMessage: e, disabled: t, ...s }) => /* @__PURE__ */ n(
1735
1735
  "button",
1736
1736
  {
1737
1737
  ...s,
@@ -1739,20 +1739,20 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1739
1739
  "aria-label": "Send",
1740
1740
  disabled: t,
1741
1741
  onClick: e,
1742
- children: /* @__PURE__ */ n(As, { weight: "bold", className: "size-4" })
1742
+ children: /* @__PURE__ */ n(Is, { weight: "bold", className: "size-4" })
1743
1743
  }
1744
- ), za = () => {
1745
- const e = Te(ln), { handleSubmit: t } = Qn(), s = es(), a = e || !s, {
1746
- SendButton: r = Oa,
1747
- AttachmentPreviewList: i = ts
1744
+ ), La = () => {
1745
+ const e = Te(ln), { handleSubmit: t } = Zn(), s = Qn(), a = e || !s, {
1746
+ SendButton: r = Ra,
1747
+ AttachmentPreviewList: i = es
1748
1748
  } = Ut("CustomMessageInput");
1749
1749
  return /* @__PURE__ */ h("div", { className: "central-container flex flex-col gap-2 min-w-0 w-full p-2 bg-white rounded-[1.5rem] shadow-[0_4px_16px_0_rgba(0,0,0,0.08),0_1px_2px_0_rgba(0,0,0,0.04),0_0_0_1px_rgba(0,0,0,0.04)]", children: [
1750
- /* @__PURE__ */ n(ns, {}),
1751
- /* @__PURE__ */ n(La, {}),
1750
+ /* @__PURE__ */ n(ts, {}),
1751
+ /* @__PURE__ */ n(Ma, {}),
1752
1752
  /* @__PURE__ */ n(i, {}),
1753
1753
  /* @__PURE__ */ h("div", { className: "flex", children: [
1754
1754
  /* @__PURE__ */ n("div", { className: "w-full ml-2 mr-4 self-center leading-[0]", children: /* @__PURE__ */ n(
1755
- ss,
1755
+ ns,
1756
1756
  {
1757
1757
  "aria-disabled": e || void 0,
1758
1758
  className: "w-full resize-none outline-none leading-5 placeholder:text-black/30 text-sm",
@@ -1775,82 +1775,43 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1775
1775
  )
1776
1776
  ] })
1777
1777
  ] });
1778
- }, $a = ({
1779
- className: e,
1780
- renderActions: t,
1781
- renderFooter: s,
1782
- disabled: a = !1,
1783
- disabledReason: r,
1784
- spacerTargetRef: i
1778
+ }, Da = ({
1779
+ renderActions: e,
1780
+ renderFooter: t,
1781
+ disabled: s = !1,
1782
+ disabledReason: a
1785
1783
  }) => {
1786
- var b;
1787
- const { channel: o } = de(), l = ((b = o == null ? void 0 : o.data) == null ? void 0 : b.frozen) === !0, d = G(null);
1788
- if (Pa(() => {
1789
- if (a)
1790
- return;
1791
- const u = d.current, f = i == null ? void 0 : i.current;
1792
- if (!u || !f)
1793
- return;
1794
- const c = () => {
1795
- f.style.setProperty(
1796
- Da,
1797
- `${u.offsetHeight}px`
1798
- );
1799
- };
1800
- if (c(), window.addEventListener("resize", c), typeof ResizeObserver > "u")
1801
- return () => window.removeEventListener("resize", c);
1802
- const g = new ResizeObserver(c);
1803
- return g.observe(u), () => {
1804
- g.disconnect(), window.removeEventListener("resize", c);
1805
- };
1806
- }, [a, i]), a)
1807
- return /* @__PURE__ */ h(ne, { children: [
1808
- /* @__PURE__ */ n(
1809
- "div",
1810
- {
1811
- className: C(
1812
- "messaging-composer-locked-panel flex w-full flex-col items-center justify-center gap-3",
1813
- e
1814
- ),
1815
- children: r ? /* @__PURE__ */ n("p", { className: "max-w-[345px] text-center text-xs font-normal leading-[1.3] tracking-[0.12px] text-black/40", children: r }) : null
1816
- }
1817
- ),
1818
- s == null ? void 0 : s()
1819
- ] });
1820
- const m = t == null ? void 0 : t();
1821
- return /* @__PURE__ */ h(
1822
- "div",
1823
- {
1824
- ref: d,
1825
- className: C("flex flex-col gap-4", e),
1826
- children: [
1827
- /* @__PURE__ */ h(
1828
- "div",
1829
- {
1830
- inert: l ? "" : void 0,
1831
- "aria-disabled": l || void 0,
1832
- className: "message-input flex items-end gap-4 aria-disabled:opacity-40",
1833
- children: [
1834
- m && /* @__PURE__ */ n("div", { className: "flex h-12 shrink-0 items-center justify-center", children: m }),
1835
- /* @__PURE__ */ n(ln.Provider, { value: l, children: /* @__PURE__ */ n(Zn, { Input: za }) })
1836
- ]
1837
- }
1838
- ),
1839
- s == null ? void 0 : s()
1840
- ]
1841
- }
1842
- );
1843
- }, Fa = [
1784
+ var o;
1785
+ const { channel: r } = ce(), i = ((o = r == null ? void 0 : r.data) == null ? void 0 : o.frozen) === !0;
1786
+ return s ? /* @__PURE__ */ h(te, { children: [
1787
+ /* @__PURE__ */ n("div", { className: "messaging-composer-locked-panel flex w-full flex-col items-center justify-center gap-3 px-6 py-4", children: a ? /* @__PURE__ */ n("p", { className: "max-w-[345px] text-center text-xs font-normal leading-[1.3] tracking-[0.12px] text-black/40", children: a }) : null }),
1788
+ t == null ? void 0 : t()
1789
+ ] }) : /* @__PURE__ */ h("div", { className: "flex flex-col gap-4 p-4", children: [
1790
+ /* @__PURE__ */ h(
1791
+ "div",
1792
+ {
1793
+ inert: i ? "" : void 0,
1794
+ "aria-disabled": i || void 0,
1795
+ className: "message-input flex items-end gap-4 aria-disabled:opacity-40",
1796
+ children: [
1797
+ e && /* @__PURE__ */ n("div", { className: "flex h-12 shrink-0 items-center justify-center", children: e() }),
1798
+ /* @__PURE__ */ n(ln.Provider, { value: i, children: /* @__PURE__ */ n(Jn, { Input: La }) })
1799
+ ]
1800
+ }
1801
+ ),
1802
+ t == null ? void 0 : t()
1803
+ ] });
1804
+ }, Pa = [
1844
1805
  "SYSTEM_DM_AGENT_PAUSED",
1845
1806
  "SYSTEM_DM_AGENT_RESUMED"
1846
- ], Ba = {
1807
+ ], Oa = {
1847
1808
  SYSTEM_DM_AGENT_PAUSED: "DM Agent has left the conversation",
1848
1809
  SYSTEM_DM_AGENT_RESUMED: "DM Agent has rejoined the conversation"
1849
- }, Ua = [
1810
+ }, za = [
1850
1811
  "SYSTEM_AGE_SAFETY_BLOCKED"
1851
- ], ja = {
1812
+ ], $a = {
1852
1813
  SYSTEM_AGE_SAFETY_BLOCKED: "This user isn’t able to reply because they don’t meet our age safety guidelines."
1853
- }, Oe = "age safety guidelines.", Va = "https://linktr.ee/s/about/contact", $t = (e) => Fa.includes(e), Ga = (e) => Ua.includes(e), Ha = (e) => {
1814
+ }, Oe = "age safety guidelines.", Fa = "https://linktr.ee/s/about/contact", $t = (e) => Pa.includes(e), Ba = (e) => za.includes(e), Ua = (e) => {
1854
1815
  var a;
1855
1816
  const t = (a = e.metadata) == null ? void 0 : a.custom_type;
1856
1817
  if ($t(t))
@@ -1858,7 +1819,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1858
1819
  kind: "dm-agent",
1859
1820
  type: t
1860
1821
  };
1861
- if (Ga(t))
1822
+ if (Ba(t))
1862
1823
  return {
1863
1824
  kind: "age-safety",
1864
1825
  type: t
@@ -1869,17 +1830,17 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1869
1830
  kind: "dm-agent",
1870
1831
  type: s
1871
1832
  };
1872
- }, Ya = (e) => {
1833
+ }, ja = (e) => {
1873
1834
  const t = e.indexOf(Oe);
1874
1835
  if (t === -1)
1875
1836
  return e;
1876
1837
  const s = t + Oe.length;
1877
- return /* @__PURE__ */ h(ne, { children: [
1838
+ return /* @__PURE__ */ h(te, { children: [
1878
1839
  e.slice(0, t),
1879
1840
  /* @__PURE__ */ n(
1880
1841
  "a",
1881
1842
  {
1882
- href: Va,
1843
+ href: Fa,
1883
1844
  target: "_blank",
1884
1845
  rel: "noopener noreferrer",
1885
1846
  className: "mes-age-safety-system-message__emphasis font-medium text-inherit underline",
@@ -1888,13 +1849,13 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1888
1849
  ),
1889
1850
  e.slice(s)
1890
1851
  ] });
1891
- }, qa = (e) => {
1852
+ }, Va = (e) => {
1892
1853
  var a, r;
1893
- const t = e.message.hide_date === !0, s = Ha(
1854
+ const t = e.message.hide_date === !0, s = Ua(
1894
1855
  e.message
1895
1856
  );
1896
1857
  if ((s == null ? void 0 : s.kind) === "dm-agent") {
1897
- const i = ((a = e.message.text) == null ? void 0 : a.trim()) || Ba[s.type];
1858
+ const i = ((a = e.message.text) == null ? void 0 : a.trim()) || Oa[s.type];
1898
1859
  return /* @__PURE__ */ h("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
1899
1860
  /* @__PURE__ */ h(
1900
1861
  "div",
@@ -1920,7 +1881,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1920
1881
  ] });
1921
1882
  }
1922
1883
  if ((s == null ? void 0 : s.kind) === "age-safety") {
1923
- const i = ((r = e.message.text) == null ? void 0 : r.trim()) || ja[s.type];
1884
+ const i = ((r = e.message.text) == null ? void 0 : r.trim()) || $a[s.type];
1924
1885
  return /* @__PURE__ */ h("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
1925
1886
  /* @__PURE__ */ h(
1926
1887
  "div",
@@ -1930,7 +1891,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1930
1891
  "data-age-safety-system-type": s.type,
1931
1892
  children: [
1932
1893
  /* @__PURE__ */ n(
1933
- Ms,
1894
+ Ts,
1934
1895
  {
1935
1896
  size: 24,
1936
1897
  weight: "duotone",
@@ -1939,7 +1900,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1939
1900
  "data-testid": "age-safety-system-message-icon"
1940
1901
  }
1941
1902
  ),
1942
- /* @__PURE__ */ n("div", { className: "mes-age-safety-system-message__content min-w-0 flex-[1_0_0]", children: /* @__PURE__ */ n("p", { className: "m-0 text-balance text-left text-[12px] font-normal leading-4 tracking-[0.21px] text-[color:var(--text-warning-on-warning,#894b00)]", children: Ya(i) }) })
1903
+ /* @__PURE__ */ n("div", { className: "mes-age-safety-system-message__content min-w-0 flex-[1_0_0]", children: /* @__PURE__ */ n("p", { className: "m-0 text-balance text-left text-[12px] font-normal leading-4 tracking-[0.21px] text-[color:var(--text-warning-on-warning,#894b00)]", children: ja(i) }) })
1943
1904
  ]
1944
1905
  }
1945
1906
  ),
@@ -1964,15 +1925,15 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1964
1925
  begin: `${120 * t}ms`,
1965
1926
  repeatCount: "indefinite"
1966
1927
  }
1967
- ) }), Wa = /* @__PURE__ */ new Set([
1928
+ ) }), Ga = /* @__PURE__ */ new Set([
1968
1929
  De.Thinking,
1969
1930
  De.Generating,
1970
1931
  De.ExternalSources
1971
- ]), Xa = ({ threadList: e }) => {
1932
+ ]), Ha = ({ threadList: e }) => {
1972
1933
  var g, p;
1973
- const { channel: t, channelConfig: s, thread: a } = de(), { client: r } = Ye(), { typing: i = {} } = as(), { aiState: o } = rs(t), l = Te(cn);
1974
- if (!e && l && Wa.has(o)) {
1975
- const v = Ka(t, (g = r.user) == null ? void 0 : g.id);
1934
+ const { channel: t, channelConfig: s, thread: a } = ce(), { client: r } = Ye(), { typing: i = {} } = ss(), { aiState: o } = as(t), l = Te(cn);
1935
+ if (!e && l && Ga.has(o)) {
1936
+ const v = Ya(t, (g = r.user) == null ? void 0 : g.id);
1976
1937
  return /* @__PURE__ */ n(
1977
1938
  Ft,
1978
1939
  {
@@ -2023,7 +1984,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
2023
1984
  },
2024
1985
  children: /* @__PURE__ */ h("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: [
2025
1986
  /* @__PURE__ */ n(
2026
- re,
1987
+ ae,
2027
1988
  {
2028
1989
  className: "str-chat__avatar str-chat__message-sender-avatar",
2029
1990
  id: e,
@@ -2052,7 +2013,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
2052
2013
  ] })
2053
2014
  }
2054
2015
  );
2055
- function Ka(e, t) {
2016
+ function Ya(e, t) {
2056
2017
  var a;
2057
2018
  const s = ((a = e == null ? void 0 : e.state) == null ? void 0 : a.members) ?? {};
2058
2019
  for (const r of Object.values(s)) {
@@ -2061,10 +2022,10 @@ function Ka(e, t) {
2061
2022
  return i;
2062
2023
  }
2063
2024
  }
2064
- const Ja = () => null, Za = ({ className: e, message: t }) => /* @__PURE__ */ h(
2025
+ const qa = () => null, Wa = ({ className: e, message: t }) => /* @__PURE__ */ h(
2065
2026
  "div",
2066
2027
  {
2067
- className: C("flex items-center justify-center h-full", e),
2028
+ className: y("flex items-center justify-center h-full", e),
2068
2029
  children: [
2069
2030
  /* @__PURE__ */ h("svg", { viewBox: "0 0 100 100", className: "size-8 fill-pebble", stroke: "none", children: [
2070
2031
  /* @__PURE__ */ n("circle", { cx: "6", cy: "50", r: "6", children: /* @__PURE__ */ n(
@@ -2104,12 +2065,12 @@ const Ja = () => null, Za = ({ className: e, message: t }) => /* @__PURE__ */ h(
2104
2065
  t && /* @__PURE__ */ n("span", { className: "text-stone", children: t })
2105
2066
  ]
2106
2067
  }
2107
- ), Ee = j.memo(() => /* @__PURE__ */ n("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ h("div", { className: "flex items-center", children: [
2108
- /* @__PURE__ */ n(Za, { className: "w-6 h-6" }),
2068
+ ), Ee = $.memo(() => /* @__PURE__ */ n("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ h("div", { className: "flex items-center", children: [
2069
+ /* @__PURE__ */ n(Wa, { className: "w-6 h-6" }),
2109
2070
  /* @__PURE__ */ n("span", { className: "text-sm text-stone", children: "Loading messages" })
2110
2071
  ] }) }));
2111
2072
  Ee.displayName = "LoadingState";
2112
- const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Bt = "Replies instantly with AI assistant", Qa = ({
2073
+ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Bt = "Replies instantly with AI assistant", Xa = ({
2113
2074
  onBack: e,
2114
2075
  showBackButton: t,
2115
2076
  showStarButton: s = !1,
@@ -2126,16 +2087,16 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2126
2087
  showActionsMenu: c = !0
2127
2088
  }) => {
2128
2089
  var E, M, D, k, T;
2129
- const { channel: g } = de(), p = j.useMemo(() => {
2090
+ const { channel: g } = ce(), p = $.useMemo(() => {
2130
2091
  var R, F;
2131
2092
  const N = (R = g._client) == null ? void 0 : R.userID;
2132
2093
  return N ? Object.values(((F = g.state) == null ? void 0 : F.members) || {}).find(
2133
2094
  (A) => {
2134
- var P;
2135
- return ((P = A.user) == null ? void 0 : P.id) && A.user.id !== N;
2095
+ var L;
2096
+ return ((L = A.user) == null ? void 0 : L.id) && A.user.id !== N;
2136
2097
  }
2137
2098
  ) : void 0;
2138
- }, [(E = g._client) == null ? void 0 : E.userID, (M = g.state) == null ? void 0 : M.members]), v = Wt(p == null ? void 0 : p.user), _ = (D = p == null ? void 0 : p.user) == null ? void 0 : D.image, x = qt(g), I = async () => {
2099
+ }, [(E = g._client) == null ? void 0 : E.userID, (M = g.state) == null ? void 0 : M.members]), v = Wt(p == null ? void 0 : p.user), _ = (D = p == null ? void 0 : p.user) == null ? void 0 : D.image, x = qt(g), S = async () => {
2139
2100
  try {
2140
2101
  x ? await g.unpin() : await g.pin();
2141
2102
  } catch (N) {
@@ -2150,8 +2111,8 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2150
2111
  /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: t && /* @__PURE__ */ n(
2151
2112
  "button",
2152
2113
  {
2153
- className: C(
2154
- le,
2114
+ className: y(
2115
+ oe,
2155
2116
  "messaging-channel-view-back-button-mobile bg-[#F1F0EE]"
2156
2117
  ),
2157
2118
  onClick: e || (() => {
@@ -2163,7 +2124,7 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2163
2124
  ) }),
2164
2125
  /* @__PURE__ */ h("div", { className: "flex flex-col gap-1 items-center", children: [
2165
2126
  /* @__PURE__ */ n(
2166
- re,
2127
+ ae,
2167
2128
  {
2168
2129
  id: ((k = p == null ? void 0 : p.user) == null ? void 0 : k.id) || g.id || "unknown",
2169
2130
  name: v,
@@ -2183,14 +2144,14 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2183
2144
  s && /* @__PURE__ */ n(
2184
2145
  "button",
2185
2146
  {
2186
- className: le,
2187
- onClick: I,
2147
+ className: oe,
2148
+ onClick: S,
2188
2149
  type: "button",
2189
2150
  "aria-label": x ? "Unstar conversation" : "Star conversation",
2190
2151
  children: /* @__PURE__ */ n(
2191
2152
  Fe,
2192
2153
  {
2193
- className: C("size-5", {
2154
+ className: y("size-5", {
2194
2155
  "text-yellow-600": x,
2195
2156
  "text-black/90": !x
2196
2157
  }),
@@ -2213,7 +2174,7 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2213
2174
  onBlockParticipantClick: b,
2214
2175
  onReportParticipantClick: u,
2215
2176
  customChannelActions: f,
2216
- triggerClassName: C(le, "bg-[#F1F0EE]")
2177
+ triggerClassName: y(oe, "bg-[#F1F0EE]")
2217
2178
  }
2218
2179
  )
2219
2180
  ] })
@@ -2223,8 +2184,8 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2223
2184
  t && e && /* @__PURE__ */ n(
2224
2185
  "button",
2225
2186
  {
2226
- className: C(
2227
- le,
2187
+ className: y(
2188
+ oe,
2228
2189
  "messaging-channel-view-back-button-desktop"
2229
2190
  ),
2230
2191
  type: "button",
@@ -2234,7 +2195,7 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2234
2195
  }
2235
2196
  ),
2236
2197
  /* @__PURE__ */ n(
2237
- re,
2198
+ ae,
2238
2199
  {
2239
2200
  id: ((T = p == null ? void 0 : p.user) == null ? void 0 : T.id) || g.id || "unknown",
2240
2201
  name: v,
@@ -2256,14 +2217,14 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2256
2217
  s && /* @__PURE__ */ n(
2257
2218
  "button",
2258
2219
  {
2259
- className: le,
2260
- onClick: I,
2220
+ className: oe,
2221
+ onClick: S,
2261
2222
  type: "button",
2262
2223
  "aria-label": x ? "Unstar conversation" : "Star conversation",
2263
2224
  children: /* @__PURE__ */ n(
2264
2225
  Fe,
2265
2226
  {
2266
- className: C("size-6", {
2227
+ className: y("size-6", {
2267
2228
  "text-yellow-600": x,
2268
2229
  "text-black/90": !x
2269
2230
  }),
@@ -2286,13 +2247,13 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2286
2247
  onBlockParticipantClick: b,
2287
2248
  onReportParticipantClick: u,
2288
2249
  customChannelActions: f,
2289
- triggerClassName: le
2250
+ triggerClassName: oe
2290
2251
  }
2291
2252
  )
2292
2253
  ] })
2293
2254
  ] })
2294
2255
  ] });
2295
- }, er = ({
2256
+ }, Ka = ({
2296
2257
  onBack: e,
2297
2258
  showBackButton: t,
2298
2259
  renderMessageInputActions: s,
@@ -2312,52 +2273,52 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2312
2273
  chatbotVotingEnabled: v = !1,
2313
2274
  renderChannelBanner: _,
2314
2275
  customChannelActions: x,
2315
- renderMessage: I,
2276
+ renderMessage: S,
2316
2277
  dmAgentEnabled: E = !1,
2317
2278
  viewerLanguage: M,
2318
2279
  showChannelInfo: D = !0
2319
2280
  }) => {
2320
- var z, V, B, U, q, W;
2321
- const { channel: k } = de(), T = j.useMemo(() => {
2322
- var y, $;
2323
- const L = (y = k._client) == null ? void 0 : y.userID;
2324
- return L ? Object.values((($ = k.state) == null ? void 0 : $.members) || {}).find(
2325
- (X) => {
2326
- var K;
2327
- return ((K = X.user) == null ? void 0 : K.id) && X.user.id !== L;
2281
+ var L, z, V, B, U, X;
2282
+ const { channel: k } = ce(), T = $.useMemo(() => {
2283
+ var w, C;
2284
+ const G = (w = k._client) == null ? void 0 : w.userID;
2285
+ return G ? Object.values(((C = k.state) == null ? void 0 : C.members) || {}).find(
2286
+ (j) => {
2287
+ var q;
2288
+ return ((q = j.user) == null ? void 0 : q.id) && j.user.id !== G;
2328
2289
  }
2329
2290
  ) : void 0;
2330
- }, [(z = k._client) == null ? void 0 : z.userID, (V = k.state) == null ? void 0 : V.members]), N = j.useMemo(() => {
2331
- var y, $;
2332
- const L = (y = k._client) == null ? void 0 : y.userID;
2333
- return L ? Object.values((($ = k.state) == null ? void 0 : $.members) || {}).find((X) => {
2334
- var K;
2335
- return ((K = X.user) == null ? void 0 : K.id) === L;
2291
+ }, [(L = k._client) == null ? void 0 : L.userID, (z = k.state) == null ? void 0 : z.members]), N = $.useMemo(() => {
2292
+ var w, C;
2293
+ const G = (w = k._client) == null ? void 0 : w.userID;
2294
+ return G ? Object.values(((C = k.state) == null ? void 0 : C.members) || {}).find((j) => {
2295
+ var q;
2296
+ return ((q = j.user) == null ? void 0 : q.id) === G;
2336
2297
  }) : void 0;
2337
- }, [(B = k._client) == null ? void 0 : B.userID, (U = k.state) == null ? void 0 : U.members]), S = ((q = N == null ? void 0 : N.user) == null ? void 0 : q.is_account) ?? (N == null ? void 0 : N.is_account), R = ((W = T == null ? void 0 : T.user) == null ? void 0 : W.is_account) ?? (T == null ? void 0 : T.is_account), F = E && S === !1 && R === !0, A = G(null), P = Y(
2338
- (L) => {
2339
- const { message: w } = ve("ChannelView"), y = /* @__PURE__ */ n(
2340
- Ia,
2298
+ }, [(V = k._client) == null ? void 0 : V.userID, (B = k.state) == null ? void 0 : B.members]), I = ((U = N == null ? void 0 : N.user) == null ? void 0 : U.is_account) ?? (N == null ? void 0 : N.is_account), R = ((X = T == null ? void 0 : T.user) == null ? void 0 : X.is_account) ?? (T == null ? void 0 : T.is_account), F = E && I === !1 && R === !0, A = W(
2299
+ (G) => {
2300
+ const { message: O } = pe("ChannelView"), w = /* @__PURE__ */ n(
2301
+ ka,
2341
2302
  {
2342
- ...L,
2303
+ ...G,
2343
2304
  chatbotVotingEnabled: v,
2344
2305
  viewerLanguage: M
2345
2306
  }
2346
2307
  );
2347
- return !I || !w ? y : I(y, w);
2308
+ return !S || !O ? w : S(w, O);
2348
2309
  },
2349
- [v, I, M]
2310
+ [v, S, M]
2350
2311
  );
2351
- return /* @__PURE__ */ n(ne, { children: /* @__PURE__ */ n(
2352
- os,
2312
+ return /* @__PURE__ */ n(te, { children: /* @__PURE__ */ n(
2313
+ is,
2353
2314
  {
2354
2315
  overrides: {
2355
- Message: P,
2356
- MessageActions: Aa
2316
+ Message: A,
2317
+ MessageActions: Ia
2357
2318
  },
2358
- children: /* @__PURE__ */ h(ls, { children: [
2319
+ children: /* @__PURE__ */ h(os, { children: [
2359
2320
  /* @__PURE__ */ n("div", { children: /* @__PURE__ */ n(
2360
- Qa,
2321
+ Xa,
2361
2322
  {
2362
2323
  onBack: e,
2363
2324
  showBackButton: t,
@@ -2375,47 +2336,32 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2375
2336
  customChannelActions: x
2376
2337
  }
2377
2338
  ) }, "lt-channel-header"),
2378
- _ ? /* @__PURE__ */ n(j.Fragment, { children: _() }, "lt-channel-banner") : null,
2339
+ _ ? /* @__PURE__ */ n($.Fragment, { children: _() }, "lt-channel-banner") : null,
2379
2340
  /* @__PURE__ */ n(
2380
2341
  "div",
2381
2342
  {
2382
- ref: A,
2383
2343
  className: "flex-1 overflow-hidden relative",
2384
- children: /* @__PURE__ */ n(
2385
- cs,
2386
- {
2387
- hideDeletedMessages: !0,
2388
- hideNewMessageSeparator: !1,
2389
- renderMessages: (L) => {
2390
- const w = ds(L);
2391
- return r && w.push(
2392
- /* @__PURE__ */ n("li", { children: r(k) }, "lt-channel-conversation-footer")
2393
- ), w;
2394
- }
2395
- }
2396
- )
2344
+ children: /* @__PURE__ */ n(ls, { hideDeletedMessages: !0, hideNewMessageSeparator: !1 })
2397
2345
  },
2398
2346
  "lt-channel-message-list"
2399
2347
  ),
2400
- /* @__PURE__ */ h("div", { className: "absolute bottom-0 inset-x-0 flex w-full", children: [
2401
- /* @__PURE__ */ n("div", { className: "absolute bottom-0 inset-x-0 w-full h-4/5 backdrop-blur-[16px] [mask-image:linear-gradient(to_top,black_0%,transparent_100%)] [-webkit-mask-image:linear-gradient(to_top,black_0%,transparent_100%)]" }),
2402
- /* @__PURE__ */ n(
2403
- $a,
2404
- {
2405
- className: "isolate w-full p-4 pt-1",
2406
- spacerTargetRef: A,
2407
- renderActions: () => s == null ? void 0 : s(k),
2408
- renderFooter: () => a == null ? void 0 : a(k),
2409
- disabled: c,
2410
- disabledReason: g
2348
+ r ? /* @__PURE__ */ n($.Fragment, { children: r(k) }, "lt-channel-conversation-footer") : null,
2349
+ /* @__PURE__ */ n(
2350
+ Da,
2351
+ {
2352
+ ...s && {
2353
+ renderActions: () => s == null ? void 0 : s(k)
2411
2354
  },
2412
- "lt-channel-message-input"
2413
- )
2414
- ] })
2355
+ renderFooter: () => a == null ? void 0 : a(k),
2356
+ disabled: c,
2357
+ disabledReason: g
2358
+ },
2359
+ "lt-channel-message-input"
2360
+ )
2415
2361
  ] })
2416
2362
  }
2417
2363
  ) });
2418
- }, dn = j.memo(
2364
+ }, dn = $.memo(
2419
2365
  ({
2420
2366
  channel: e,
2421
2367
  onBack: t,
@@ -2426,7 +2372,7 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2426
2372
  onLeaveConversation: o,
2427
2373
  onBlockParticipant: l,
2428
2374
  className: d,
2429
- CustomChannelEmptyState: m = Ja,
2375
+ CustomChannelEmptyState: m = qa,
2430
2376
  showDeleteConversation: b = !0,
2431
2377
  onDeleteConversationClick: u,
2432
2378
  onBlockParticipantClick: f,
@@ -2436,72 +2382,72 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2436
2382
  composerDisabled: v = !1,
2437
2383
  composerDisabledReason: _,
2438
2384
  dmAgentEnabled: x,
2439
- messageMetadata: I,
2385
+ messageMetadata: S,
2440
2386
  onMessageSent: E,
2441
2387
  showStarButton: M = !1,
2442
2388
  chatbotVotingEnabled: D = !1,
2443
2389
  renderChannelBanner: k,
2444
2390
  customChannelActions: T,
2445
2391
  renderMessage: N,
2446
- onMessageLinkClick: S,
2392
+ onMessageLinkClick: I,
2447
2393
  sendButton: R,
2448
2394
  attachmentPreviewList: F,
2449
2395
  viewerLanguage: A,
2450
- showChannelInfo: P = !0
2396
+ showChannelInfo: L = !0
2451
2397
  }) => {
2452
- const z = Y(
2453
- async (B, U, q) => {
2454
- var X;
2455
- const W = ((X = e.data) == null ? void 0 : X.chatbot_paused) === !0, L = x && !W, w = {
2398
+ const z = W(
2399
+ async (B, U, X) => {
2400
+ var q;
2401
+ const G = ((q = e.data) == null ? void 0 : q.chatbot_paused) === !0, O = x && !G, w = {
2456
2402
  ...U,
2457
- ...L && { silent: !0 },
2458
- ...I && {
2403
+ ...O && { silent: !0 },
2404
+ ...S && {
2459
2405
  metadata: {
2460
2406
  ...U.metadata ?? {},
2461
- ...I
2407
+ ...S
2462
2408
  }
2463
2409
  }
2464
- }, y = {
2465
- ...q,
2466
- ...L && { skip_push: !0 }
2467
- }, $ = await e.sendMessage(w, y);
2468
- return E == null || E($), $;
2410
+ }, C = {
2411
+ ...X,
2412
+ ...O && { skip_push: !0 }
2413
+ }, j = await e.sendMessage(w, C);
2414
+ return E == null || E(j), j;
2469
2415
  },
2470
- [e, x, I, E]
2471
- ), V = G(null);
2472
- return H(() => {
2473
- if (!S) return;
2416
+ [e, x, S, E]
2417
+ ), V = H(null);
2418
+ return Y(() => {
2419
+ if (!I) return;
2474
2420
  const B = V.current;
2475
2421
  if (!B) return;
2476
- const U = (q) => {
2477
- const W = q.target, L = W == null ? void 0 : W.closest("a[href]"), w = L == null ? void 0 : L.getAttribute("href");
2422
+ const U = (X) => {
2423
+ const G = X.target, O = G == null ? void 0 : G.closest("a[href]"), w = O == null ? void 0 : O.getAttribute("href");
2478
2424
  if (!w) return;
2479
- const y = L == null ? void 0 : L.closest("[data-message-id]"), $ = y == null ? void 0 : y.getAttribute("data-message-id"), X = $ ? e.state.messages.find((K) => K.id === $) : void 0;
2480
- S(w, X);
2425
+ const C = O == null ? void 0 : O.closest("[data-message-id]"), j = C == null ? void 0 : C.getAttribute("data-message-id"), q = j ? e.state.messages.find((Ne) => Ne.id === j) : void 0;
2426
+ I(w, q);
2481
2427
  };
2482
2428
  return B.addEventListener("click", U), () => B.removeEventListener("click", U);
2483
- }, [S, e]), /* @__PURE__ */ n(
2429
+ }, [I, e]), /* @__PURE__ */ n(
2484
2430
  "div",
2485
2431
  {
2486
2432
  ref: V,
2487
- className: C(
2433
+ className: y(
2488
2434
  "messaging-channel-view h-full flex flex-col",
2489
2435
  d
2490
2436
  ),
2491
2437
  children: /* @__PURE__ */ n(cn.Provider, { value: x ?? !1, children: /* @__PURE__ */ n(
2492
- is,
2438
+ rs,
2493
2439
  {
2494
2440
  channel: e,
2495
- MessageSystem: qa,
2441
+ MessageSystem: Va,
2496
2442
  EmptyStateIndicator: m,
2497
2443
  LoadingIndicator: Ee,
2498
- DateSeparator: Vs,
2499
- TypingIndicator: Xa,
2444
+ DateSeparator: Us,
2445
+ TypingIndicator: Ha,
2500
2446
  doSendMessageRequest: z,
2501
2447
  ...R ? { SendButton: R } : {},
2502
2448
  ...F ? { AttachmentPreviewList: F } : {},
2503
2449
  children: /* @__PURE__ */ n(
2504
- er,
2450
+ Ka,
2505
2451
  {
2506
2452
  onBack: t,
2507
2453
  showBackButton: s,
@@ -2526,7 +2472,7 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2526
2472
  customChannelActions: T,
2527
2473
  renderMessage: N,
2528
2474
  viewerLanguage: A,
2529
- showChannelInfo: P
2475
+ showChannelInfo: L
2530
2476
  }
2531
2477
  )
2532
2478
  }
@@ -2536,7 +2482,7 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2536
2482
  }
2537
2483
  );
2538
2484
  dn.displayName = "ChannelView";
2539
- const ge = j.memo(({ message: e, onBack: t }) => /* @__PURE__ */ n("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ h("div", { className: "text-center max-w-sm", children: [
2485
+ const fe = $.memo(({ message: e, onBack: t }) => /* @__PURE__ */ n("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ h("div", { className: "text-center max-w-sm", children: [
2540
2486
  /* @__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: "⚠️" }) }),
2541
2487
  /* @__PURE__ */ n("h2", { className: "font-semibold text-charcoal mb-2", children: "Oops!" }),
2542
2488
  /* @__PURE__ */ n("p", { className: "text-stone text-sm mb-6", children: e }),
@@ -2550,8 +2496,8 @@ const ge = j.memo(({ message: e, onBack: t }) => /* @__PURE__ */ n("div", { clas
2550
2496
  }
2551
2497
  )
2552
2498
  ] }) }));
2553
- ge.displayName = "ErrorState";
2554
- const Ii = ({
2499
+ fe.displayName = "ErrorState";
2500
+ const yi = ({
2555
2501
  capabilities: e = {},
2556
2502
  renderMessageInputActions: t,
2557
2503
  renderConversationFooter: s,
@@ -2573,100 +2519,100 @@ const Ii = ({
2573
2519
  showChannelInfo: x
2574
2520
  }) => {
2575
2521
  const {
2576
- client: I,
2522
+ client: S,
2577
2523
  isConnected: E,
2578
2524
  isLoading: M,
2579
2525
  error: D,
2580
2526
  refreshConnection: k,
2581
2527
  service: T,
2582
2528
  debug: N
2583
- } = Os(), [S, R] = O(null), [F, A] = O(null), [P, z] = O(!1), { showDeleteConversation: V = !0 } = e, B = G(o);
2529
+ } = Ds(), [I, R] = P(null), [F, A] = P(null), [L, z] = P(!1), { showDeleteConversation: V = !0 } = e, B = H(o);
2584
2530
  B.current = o;
2585
- const U = G(a);
2531
+ const U = H(a);
2586
2532
  U.current = a;
2587
- const q = G(null), W = G(null);
2588
- H(() => {
2589
- W.current = S;
2590
- }, [S]), H(() => {
2591
- if (!I || !E) return;
2592
- const y = I.userID;
2593
- if (!y) return;
2594
- const $ = `${y}::${i}`;
2595
- if (q.current === $) return;
2596
- q.current = $;
2597
- const X = () => {
2598
- q.current === $ && (q.current = null);
2533
+ const X = H(null), G = H(null);
2534
+ Y(() => {
2535
+ G.current = I;
2536
+ }, [I]), Y(() => {
2537
+ if (!S || !E) return;
2538
+ const C = S.userID;
2539
+ if (!C) return;
2540
+ const j = `${C}::${i}`;
2541
+ if (X.current === j) return;
2542
+ X.current = j;
2543
+ const q = () => {
2544
+ X.current === j && (X.current = null);
2599
2545
  };
2600
2546
  (async () => {
2601
- var J, ie;
2547
+ var K, re;
2602
2548
  try {
2603
2549
  N && console.log(
2604
2550
  "[MessagingShell] Loading initial conversation with:",
2605
2551
  i
2606
2552
  );
2607
- const Z = await I.queryChannels(
2553
+ const J = await S.queryChannels(
2608
2554
  {
2609
2555
  type: "messaging",
2610
- members: { $eq: [y, i] }
2556
+ members: { $eq: [C, i] }
2611
2557
  },
2612
2558
  {},
2613
2559
  { limit: 1 }
2614
2560
  );
2615
- if (Z.length > 0) {
2616
- R(Z[0]), A(null), (J = U.current) == null || J.call(U, Z[0]), N && console.log(
2561
+ if (J.length > 0) {
2562
+ R(J[0]), A(null), (K = U.current) == null || K.call(U, J[0]), N && console.log(
2617
2563
  "[MessagingShell] Initial conversation loaded:",
2618
- Z[0].id
2564
+ J[0].id
2619
2565
  );
2620
2566
  return;
2621
2567
  }
2622
- const ae = B.current;
2623
- if (!ae || !T) {
2624
- X(), A("No conversation found with this account"), N && console.log(
2568
+ const se = B.current;
2569
+ if (!se || !T) {
2570
+ q(), A("No conversation found with this account"), N && console.log(
2625
2571
  "[MessagingShell] No conversation found for:",
2626
2572
  i
2627
2573
  );
2628
2574
  return;
2629
2575
  }
2630
2576
  try {
2631
- const ee = await T.startChannelWithParticipant({
2632
- id: ae.id,
2633
- name: ae.name,
2634
- phone: ae.phone
2577
+ const Q = await T.startChannelWithParticipant({
2578
+ id: se.id,
2579
+ name: se.name,
2580
+ phone: se.phone
2635
2581
  });
2636
- R(ee), A(null), (ie = U.current) == null || ie.call(U, ee), N && console.log(
2582
+ R(Q), A(null), (re = U.current) == null || re.call(U, Q), N && console.log(
2637
2583
  "[MessagingShell] Channel created and loaded:",
2638
- ee.id
2584
+ Q.id
2639
2585
  );
2640
- } catch (ee) {
2586
+ } catch (Q) {
2641
2587
  console.error(
2642
2588
  "[MessagingShell] Failed to create conversation:",
2643
- ee
2644
- ), X(), A("Failed to create conversation");
2589
+ Q
2590
+ ), q(), A("Failed to create conversation");
2645
2591
  }
2646
- } catch (Z) {
2592
+ } catch (J) {
2647
2593
  console.error(
2648
2594
  "[MessagingShell] Failed to load initial conversation:",
2649
- Z
2650
- ), X(), W.current || A("Failed to load conversation");
2595
+ J
2596
+ ), q(), G.current || A("Failed to load conversation");
2651
2597
  }
2652
2598
  })();
2653
- }, [i, I, E, T, N]);
2654
- const L = G(r);
2655
- L.current = r;
2656
- const w = Y(() => {
2657
- var y;
2658
- R(null), z(!0), (y = L.current) == null || y.call(L);
2599
+ }, [i, S, E, T, N]);
2600
+ const O = H(r);
2601
+ O.current = r;
2602
+ const w = W(() => {
2603
+ var C;
2604
+ R(null), z(!0), (C = O.current) == null || C.call(O);
2659
2605
  }, []);
2660
- return M ? /* @__PURE__ */ n(Ee, {}) : D ? /* @__PURE__ */ n(ge, { message: D, onBack: k }) : !E || !I ? /* @__PURE__ */ n(
2661
- ge,
2606
+ return M ? /* @__PURE__ */ n(Ee, {}) : D ? /* @__PURE__ */ n(fe, { message: D, onBack: k }) : !E || !S ? /* @__PURE__ */ n(
2607
+ fe,
2662
2608
  {
2663
2609
  message: "Not connected to messaging service",
2664
2610
  onBack: k
2665
2611
  }
2666
- ) : F ? /* @__PURE__ */ n(ge, { message: F }) : P && !S ? /* @__PURE__ */ n(ge, { 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(
2612
+ ) : F ? /* @__PURE__ */ n(fe, { message: F }) : L && !I ? /* @__PURE__ */ n(fe, { message: "Conversation ended" }) : I ? /* @__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(
2667
2613
  dn,
2668
2614
  {
2669
- channel: S,
2615
+ channel: I,
2670
2616
  renderMessageInputActions: t,
2671
2617
  renderConversationFooter: s,
2672
2618
  renderChannelBanner: g,
@@ -2685,34 +2631,34 @@ const Ii = ({
2685
2631
  onMessageLinkClick: _,
2686
2632
  showChannelInfo: x
2687
2633
  },
2688
- S.id
2634
+ I.id
2689
2635
  ) }) }) : /* @__PURE__ */ n(Ee, {});
2690
2636
  };
2691
- function tr(e) {
2637
+ function Ja(e) {
2692
2638
  const t = e.state.pending_messages;
2693
2639
  if (t != null && t.length)
2694
2640
  for (const s of t)
2695
2641
  e.state.addMessageSorted(s.message);
2696
2642
  }
2697
- const un = j.createContext({
2643
+ const un = $.createContext({
2698
2644
  selectedChannel: void 0,
2699
2645
  onChannelSelect: () => {
2700
2646
  },
2701
2647
  debug: !1,
2702
2648
  renderMessagePreview: void 0,
2703
2649
  viewerLanguage: void 0
2704
- }), nr = un.Provider, sr = () => j.useContext(un), ar = (e, t) => {
2650
+ }), Za = un.Provider, Qa = () => $.useContext(un), er = (e, t) => {
2705
2651
  const s = new Date(
2706
2652
  Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate())
2707
2653
  ), r = new Date(
2708
2654
  Date.UTC(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate())
2709
2655
  ).getTime() - s.getTime();
2710
2656
  return Math.floor(r / (1e3 * 60 * 60 * 24));
2711
- }, rr = (e) => {
2657
+ }, tr = (e) => {
2712
2658
  const t = /* @__PURE__ */ new Date();
2713
2659
  if (Math.floor((t.getTime() - e.getTime()) / 1e3) < 60)
2714
2660
  return "Just now";
2715
- const a = ar(e, t);
2661
+ const a = er(e, t);
2716
2662
  return a === 0 ? e.toLocaleTimeString([], {
2717
2663
  hour: "numeric",
2718
2664
  minute: "2-digit",
@@ -2722,7 +2668,7 @@ const un = j.createContext({
2722
2668
  day: "numeric",
2723
2669
  year: "2-digit"
2724
2670
  });
2725
- }, mn = j.memo(
2671
+ }, mn = $.memo(
2726
2672
  ({ channel: e, unread: t }) => {
2727
2673
  var D, k, T;
2728
2674
  const {
@@ -2731,36 +2677,36 @@ const un = j.createContext({
2731
2677
  debug: r,
2732
2678
  renderMessagePreview: i,
2733
2679
  viewerLanguage: o
2734
- } = sr(), l = (s == null ? void 0 : s.id) === (e == null ? void 0 : e.id), d = () => {
2680
+ } = Qa(), l = (s == null ? void 0 : s.id) === (e == null ? void 0 : e.id), d = () => {
2735
2681
  e && a(e);
2736
2682
  }, m = (N) => {
2737
- const S = N.key === "Enter" || N.key === " ", R = N.repeat;
2738
- !S || R || (N.preventDefault(), d());
2683
+ const I = N.key === "Enter" || N.key === " ", R = N.repeat;
2684
+ !I || R || (N.preventDefault(), d());
2739
2685
  }, u = Object.values(((D = e == null ? void 0 : e.state) == null ? void 0 : D.members) || {}).find(
2740
2686
  (N) => {
2741
- var S, R;
2742
- return ((S = N.user) == null ? void 0 : S.id) && N.user.id !== ((R = e == null ? void 0 : e._client) == null ? void 0 : R.userID);
2687
+ var I, R;
2688
+ return ((I = N.user) == null ? void 0 : I.id) && N.user.id !== ((R = e == null ? void 0 : e._client) == null ? void 0 : R.userID);
2743
2689
  }
2744
2690
  ), f = Wt(u == null ? void 0 : u.user), c = (k = u == null ? void 0 : u.user) == null ? void 0 : k.image, g = (() => {
2745
- var S;
2746
- const N = (S = e == null ? void 0 : e.state) == null ? void 0 : S.messages;
2691
+ var I;
2692
+ const N = (I = e == null ? void 0 : e.state) == null ? void 0 : I.messages;
2747
2693
  if (N != null && N.length) {
2748
2694
  for (let R = N.length - 1; R >= 0; R--)
2749
2695
  if (N[R].type !== "system") return N[R];
2750
2696
  }
2751
2697
  })(), v = (() => {
2752
- var P, z, V, B;
2698
+ var L, z, V, B;
2753
2699
  const N = Xt({
2754
2700
  message: g,
2755
2701
  viewerLanguage: o
2756
2702
  });
2757
- if (((P = g == null ? void 0 : g.metadata) == null ? void 0 : P.custom_type) === "MESSAGE_TIP") return N ? `💵 ${N}` : "💵 Sent a tip";
2703
+ if (((L = g == null ? void 0 : g.metadata) == null ? void 0 : L.custom_type) === "MESSAGE_TIP") return N ? `💵 ${N}` : "💵 Sent a tip";
2758
2704
  if (((z = g == null ? void 0 : g.metadata) == null ? void 0 : z.custom_type) === "MESSAGE_PAID") return N ? `💰 ${N}` : "💰 Sent a message";
2759
2705
  if (((V = g == null ? void 0 : g.metadata) == null ? void 0 : V.custom_type) === "MESSAGE_ATTACHMENT") return N ? `📎 ${N}` : "📎 Sent an attachment";
2760
2706
  if (N) return N;
2761
2707
  const A = (B = g == null ? void 0 : g.attachments) == null ? void 0 : B[0];
2762
2708
  return A ? A.og_scrape_url ? A.og_scrape_url : A.type === "image" ? "📷 Sent an image" : A.type === "video" ? "🎥 Sent a video" : A.type === "audio" ? "🎵 Sent audio" : A.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
2763
- })(), _ = g != null && g.created_at ? rr(new Date(g.created_at)) : "", x = g ? ke(g) : !1, I = i ? i(g, v) : `${x ? "✨ " : ""}${v}`, E = qt(e), M = t ?? 0;
2709
+ })(), _ = g != null && g.created_at ? tr(new Date(g.created_at)) : "", x = g ? ke(g) : !1, S = i ? i(g, v) : `${x ? "✨ " : ""}${v}`, E = qt(e), M = t ?? 0;
2764
2710
  return r && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
2765
2711
  channelId: e == null ? void 0 : e.id,
2766
2712
  isSelected: l,
@@ -2774,7 +2720,7 @@ const un = j.createContext({
2774
2720
  tabIndex: 0,
2775
2721
  onClick: d,
2776
2722
  onKeyDown: m,
2777
- className: C(
2723
+ className: y(
2778
2724
  "group w-full px-4 py-3 transition-colors text-left max-w-full overflow-hidden focus-ring rounded-[12px] [&+&]:mt-2",
2779
2725
  {
2780
2726
  "bg-black/[0.04]": l,
@@ -2783,7 +2729,7 @@ const un = j.createContext({
2783
2729
  ),
2784
2730
  children: /* @__PURE__ */ h("div", { className: "flex items-start gap-4", children: [
2785
2731
  /* @__PURE__ */ n(
2786
- re,
2732
+ ae,
2787
2733
  {
2788
2734
  id: ((T = u == null ? void 0 : u.user) == null ? void 0 : T.id) || e.id || "unknown",
2789
2735
  name: f,
@@ -2797,7 +2743,7 @@ const un = j.createContext({
2797
2743
  /* @__PURE__ */ h(
2798
2744
  "h3",
2799
2745
  {
2800
- className: C(
2746
+ className: y(
2801
2747
  "text-sm font-medium truncate text-[#191918]"
2802
2748
  ),
2803
2749
  children: [
@@ -2809,7 +2755,7 @@ const un = j.createContext({
2809
2755
  _ && /* @__PURE__ */ n("span", { className: "text-xs text-[#717070] flex-shrink-0", children: _ })
2810
2756
  ] }),
2811
2757
  /* @__PURE__ */ h("div", { className: "flex items-center justify-between gap-2 min-w-0", children: [
2812
- /* @__PURE__ */ n("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: I }),
2758
+ /* @__PURE__ */ n("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: S }),
2813
2759
  M > 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: M > 99 ? "99+" : M })
2814
2760
  ] })
2815
2761
  ] })
@@ -2819,25 +2765,25 @@ const un = j.createContext({
2819
2765
  }
2820
2766
  );
2821
2767
  mn.displayName = "CustomChannelPreview";
2822
- const ir = { last_message_at: -1 }, or = j.memo(
2768
+ const nr = { last_message_at: -1 }, sr = $.memo(
2823
2769
  ({
2824
2770
  onChannelSelect: e,
2825
2771
  selectedChannel: t,
2826
2772
  filters: s,
2827
2773
  allowNewMessagesFromUnfilteredChannels: a = !1,
2828
2774
  channelRenderFilterFn: r,
2829
- sort: i = ir,
2775
+ sort: i = nr,
2830
2776
  className: o,
2831
2777
  customEmptyStateIndicator: l,
2832
2778
  renderMessagePreview: d,
2833
2779
  viewerLanguage: m
2834
2780
  }) => {
2835
- const b = j.useRef(0);
2781
+ const b = $.useRef(0);
2836
2782
  b.current++;
2837
- const { debug: u = !1 } = qe(), f = j.useCallback(
2783
+ const { debug: u = !1 } = qe(), f = $.useCallback(
2838
2784
  (g) => {
2839
2785
  for (const p of g)
2840
- tr(p);
2786
+ Ja(p);
2841
2787
  return r ? r(g) : g;
2842
2788
  },
2843
2789
  [r]
@@ -2847,7 +2793,7 @@ const ir = { last_message_at: -1 }, or = j.memo(
2847
2793
  selectedChannelId: t == null ? void 0 : t.id,
2848
2794
  filters: s
2849
2795
  });
2850
- const c = j.useMemo(
2796
+ const c = $.useMemo(
2851
2797
  () => ({
2852
2798
  selectedChannel: t,
2853
2799
  onChannelSelect: e,
@@ -2866,12 +2812,12 @@ const ir = { last_message_at: -1 }, or = j.memo(
2866
2812
  return /* @__PURE__ */ n(
2867
2813
  "div",
2868
2814
  {
2869
- className: C(
2815
+ className: y(
2870
2816
  "messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden",
2871
2817
  o
2872
2818
  ),
2873
- children: /* @__PURE__ */ n("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ n(nr, { value: c, children: /* @__PURE__ */ n(
2874
- us,
2819
+ children: /* @__PURE__ */ n("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ n(Za, { value: c, children: /* @__PURE__ */ n(
2820
+ cs,
2875
2821
  {
2876
2822
  filters: s,
2877
2823
  sort: i,
@@ -2887,26 +2833,26 @@ const ir = { last_message_at: -1 }, or = j.memo(
2887
2833
  );
2888
2834
  }
2889
2835
  );
2890
- or.displayName = "ChannelList";
2891
- const lr = /^([a-z][a-z0-9+.-]*):/i, cr = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
2836
+ sr.displayName = "ChannelList";
2837
+ const ar = /^([a-z][a-z0-9+.-]*):/i, rr = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
2892
2838
  function Qe(e) {
2893
2839
  if (typeof e != "string") return;
2894
2840
  const t = e.trim();
2895
2841
  if (t === "") return;
2896
- const s = lr.exec(t);
2842
+ const s = ar.exec(t);
2897
2843
  if (s) {
2898
2844
  const a = s[1].toLowerCase();
2899
- return cr.has(a) ? t : void 0;
2845
+ return rr.has(a) ? t : void 0;
2900
2846
  }
2901
2847
  return t.startsWith("//") || t.startsWith("/") ? t : `https://${t}`;
2902
2848
  }
2903
- const dr = {
2849
+ const ir = {
2904
2850
  dark: "bg-white text-[#121110] hover:bg-white/90",
2905
2851
  light: "bg-[#121110] text-white hover:bg-[#2a2928]"
2906
- }, ur = ({ variant: e, cta: t }) => {
2907
- const s = C(
2852
+ }, or = ({ variant: e, cta: t }) => {
2853
+ const s = y(
2908
2854
  "mt-2 inline-flex h-10 w-full items-center justify-center rounded-full px-4 text-sm font-medium leading-none transition-colors",
2909
- dr[e]
2855
+ ir[e]
2910
2856
  ), a = Qe(t.href);
2911
2857
  return a ? /* @__PURE__ */ n(
2912
2858
  "a",
@@ -2933,10 +2879,10 @@ const dr = {
2933
2879
  children: t.label
2934
2880
  }
2935
2881
  );
2936
- }, mr = {
2882
+ }, lr = {
2937
2883
  dark: "text-white",
2938
2884
  light: "text-black/90"
2939
- }, hr = "text-white/30", fr = {
2885
+ }, cr = "text-white/30", dr = {
2940
2886
  dark: "text-white/55",
2941
2887
  light: "text-black/55"
2942
2888
  }, et = ({
@@ -2951,12 +2897,12 @@ const dr = {
2951
2897
  }) => {
2952
2898
  const d = e === "dark", m = t ?? (d ? s : void 0) ?? "", b = m.trim() !== "", u = a != null && a.trim() !== "", f = typeof r == "string" ? r.trim() : "", c = f !== "", g = o != null;
2953
2899
  if (!b && !u && !c && !g) return null;
2954
- const v = C(
2900
+ const v = y(
2955
2901
  "truncate text-base font-medium leading-6",
2956
- d && !t ? hr : mr[e]
2957
- ), _ = C(
2902
+ d && !t ? cr : lr[e]
2903
+ ), _ = y(
2958
2904
  "truncate text-xs leading-4",
2959
- fr[e]
2905
+ dr[e]
2960
2906
  );
2961
2907
  return /* @__PURE__ */ h("div", { className: "px-4 py-3", children: [
2962
2908
  /* @__PURE__ */ h("div", { className: "flex items-end gap-3", children: [
@@ -2964,7 +2910,7 @@ const dr = {
2964
2910
  /* @__PURE__ */ h("div", { className: "flex min-w-0 flex-col gap-1", children: [
2965
2911
  b && /* @__PURE__ */ h("div", { className: "flex min-w-0 items-center gap-2", children: [
2966
2912
  i ? /* @__PURE__ */ n("span", { className: "shrink-0", children: i }) : null,
2967
- /* @__PURE__ */ n("p", { className: C("min-w-0", v), children: m })
2913
+ /* @__PURE__ */ n("p", { className: y("min-w-0", v), children: m })
2968
2914
  ] }),
2969
2915
  u && /* @__PURE__ */ n("p", { className: _, children: a })
2970
2916
  ] }),
@@ -2972,16 +2918,16 @@ const dr = {
2972
2918
  ] }),
2973
2919
  l && /* @__PURE__ */ n("div", { className: "shrink-0", children: l })
2974
2920
  ] }),
2975
- o && /* @__PURE__ */ n(ur, { variant: e, cta: o })
2921
+ o && /* @__PURE__ */ n(or, { variant: e, cta: o })
2976
2922
  ] });
2977
- }, gr = C(
2923
+ }, ur = y(
2978
2924
  "relative block w-[280px] select-none overflow-hidden rounded-md",
2979
2925
  // 1px hairline border that sits flush with the card chrome — matches
2980
2926
  // the messaging design system's "small border around link attachments"
2981
2927
  // treatment from the mobile spec. The drop shadow remains for depth.
2982
2928
  "border border-black/[0.08]",
2983
2929
  "shadow-[0_1px_2px_rgba(0,0,0,0.04),0_8px_32px_rgba(0,0,0,0.1)]"
2984
- ), Ie = ({
2930
+ ), Se = ({
2985
2931
  variant: e,
2986
2932
  children: t,
2987
2933
  href: s,
@@ -2992,8 +2938,8 @@ const dr = {
2992
2938
  bgClassName: l,
2993
2939
  "data-testid": d
2994
2940
  }) => {
2995
- const m = s != null || a != null, b = C(
2996
- gr,
2941
+ const m = s != null || a != null, b = y(
2942
+ ur,
2997
2943
  l ?? (e === "dark" ? "bg-[#121110]" : "bg-white"),
2998
2944
  // `focus-ring` is a design-system utility from the component-library
2999
2945
  // tailwind preset — outline-none + a black 2px focus-visible ring
@@ -3023,7 +2969,7 @@ const dr = {
3023
2969
  onClick: a,
3024
2970
  "aria-label": r,
3025
2971
  "data-testid": d,
3026
- className: C(b, "text-left"),
2972
+ className: y(b, "text-left"),
3027
2973
  children: [
3028
2974
  t,
3029
2975
  u
@@ -3041,17 +2987,17 @@ const dr = {
3041
2987
  ]
3042
2988
  }
3043
2989
  );
3044
- }, br = {
2990
+ }, mr = {
3045
2991
  dark: "bg-white/10",
3046
2992
  light: "bg-black/5"
3047
- }, pr = {
2993
+ }, hr = {
3048
2994
  dark: "size-16 text-white/25",
3049
2995
  light: "size-16 text-black/25"
3050
- }, Me = (e, t) => !!t && !!e && se(e) === "audio", hn = (e, t) => {
2996
+ }, Me = (e, t) => !!t && !!e && ne(e) === "audio", hn = (e, t) => {
3051
2997
  if (!t || !e) return !1;
3052
- const s = se(e);
2998
+ const s = ne(e);
3053
2999
  return s === "video" || s === "audio";
3054
- }, tt = "bg-[#F2F3F4]", Se = ({
3000
+ }, tt = "bg-[#F2F3F4]", Ie = ({
3055
3001
  variant: e,
3056
3002
  thumbnailUrl: t,
3057
3003
  sourceUrl: s,
@@ -3060,7 +3006,7 @@ const dr = {
3060
3006
  topLeft: i,
3061
3007
  topRight: o
3062
3008
  }) => {
3063
- const l = se(r), d = !!s && l === "video";
3009
+ const l = ne(r), d = !!s && l === "video";
3064
3010
  return Me(r, s) ? /* @__PURE__ */ n("div", { className: "p-3", children: /* @__PURE__ */ n(
3065
3011
  "audio",
3066
3012
  {
@@ -3073,7 +3019,7 @@ const dr = {
3073
3019
  ) }) : /* @__PURE__ */ h(
3074
3020
  "div",
3075
3021
  {
3076
- className: C(
3022
+ className: y(
3077
3023
  "relative h-[180px] w-full overflow-hidden",
3078
3024
  d && "bg-black"
3079
3025
  ),
@@ -3100,12 +3046,12 @@ const dr = {
3100
3046
  ) : /* @__PURE__ */ n(
3101
3047
  "div",
3102
3048
  {
3103
- className: C(
3049
+ className: y(
3104
3050
  "flex h-full w-full items-center justify-center",
3105
- br[e]
3051
+ mr[e]
3106
3052
  ),
3107
- children: ce(r, {
3108
- className: pr[e],
3053
+ children: le(r, {
3054
+ className: hr[e],
3109
3055
  weight: "regular"
3110
3056
  })
3111
3057
  }
@@ -3115,7 +3061,7 @@ const dr = {
3115
3061
  ]
3116
3062
  }
3117
3063
  );
3118
- }, vr = ({
3064
+ }, fr = ({
3119
3065
  title: e,
3120
3066
  placeholderTitle: t,
3121
3067
  description: s,
@@ -3145,12 +3091,12 @@ const dr = {
3145
3091
  onClick: u,
3146
3092
  "aria-label": "Edit attachment",
3147
3093
  className: "flex size-10 items-center justify-center rounded-full bg-white/10 text-white hover:bg-white/15",
3148
- children: /* @__PURE__ */ n(Rs, { className: "size-5", weight: "regular" })
3094
+ children: /* @__PURE__ */ n(As, { className: "size-5", weight: "regular" })
3149
3095
  }
3150
3096
  ) : void 0;
3151
- return c ? /* @__PURE__ */ n(Ie, { variant: "dark", bgClassName: tt, children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2 pr-3", children: [
3097
+ return c ? /* @__PURE__ */ n(Se, { variant: "dark", bgClassName: tt, children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2 pr-3", children: [
3152
3098
  /* @__PURE__ */ n("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ n(
3153
- Se,
3099
+ Ie,
3154
3100
  {
3155
3101
  variant: "dark",
3156
3102
  sourceUrl: o,
@@ -3160,13 +3106,13 @@ const dr = {
3160
3106
  ) }),
3161
3107
  g && /* @__PURE__ */ n("div", { className: "shrink-0", children: g })
3162
3108
  ] }) }) : /* @__PURE__ */ h(
3163
- Ie,
3109
+ Se,
3164
3110
  {
3165
3111
  variant: "dark",
3166
3112
  topRight: f ? g : void 0,
3167
3113
  children: [
3168
3114
  !f && /* @__PURE__ */ n(
3169
- Se,
3115
+ Ie,
3170
3116
  {
3171
3117
  variant: "dark",
3172
3118
  thumbnailUrl: i,
@@ -3192,7 +3138,7 @@ const dr = {
3192
3138
  ]
3193
3139
  }
3194
3140
  );
3195
- }, xr = ({
3141
+ }, gr = ({
3196
3142
  title: e,
3197
3143
  description: t,
3198
3144
  url: s,
@@ -3212,7 +3158,7 @@ const dr = {
3212
3158
  }
3213
3159
  } : d;
3214
3160
  return /* @__PURE__ */ h(
3215
- Ie,
3161
+ Se,
3216
3162
  {
3217
3163
  variant: "light",
3218
3164
  href: f,
@@ -3222,7 +3168,7 @@ const dr = {
3222
3168
  "data-testid": "link-attachment",
3223
3169
  children: [
3224
3170
  o === "featured" && /* @__PURE__ */ n(
3225
- Se,
3171
+ Ie,
3226
3172
  {
3227
3173
  variant: "light",
3228
3174
  thumbnailUrl: r,
@@ -3245,7 +3191,7 @@ const dr = {
3245
3191
  ]
3246
3192
  }
3247
3193
  );
3248
- }, wr = ({
3194
+ }, br = ({
3249
3195
  title: e,
3250
3196
  placeholderTitle: t,
3251
3197
  description: s,
@@ -3260,7 +3206,7 @@ const dr = {
3260
3206
  }) => {
3261
3207
  const u = hn(r, o), f = Qe(a), c = m == null && f != null && !u ? f : void 0, g = m == null && !u && c != null ? b : void 0;
3262
3208
  return /* @__PURE__ */ h(
3263
- Ie,
3209
+ Se,
3264
3210
  {
3265
3211
  variant: "dark",
3266
3212
  href: c,
@@ -3268,7 +3214,7 @@ const dr = {
3268
3214
  bgClassName: Me(r, o) ? tt : void 0,
3269
3215
  children: [
3270
3216
  l === "featured" && /* @__PURE__ */ n(
3271
- Se,
3217
+ Ie,
3272
3218
  {
3273
3219
  variant: "dark",
3274
3220
  thumbnailUrl: i,
@@ -3292,20 +3238,20 @@ const dr = {
3292
3238
  ]
3293
3239
  }
3294
3240
  );
3295
- }, Si = {
3296
- Composer: vr,
3297
- Sent: wr,
3298
- Received: xr
3299
- }, _r = {
3241
+ }, Ci = {
3242
+ Composer: fr,
3243
+ Sent: br,
3244
+ Received: gr
3245
+ }, pr = {
3300
3246
  dark: "bg-[#121110]",
3301
3247
  light: "bg-[#e9eaed]"
3302
- }, Nr = {
3248
+ }, vr = {
3303
3249
  dark: "text-white",
3304
3250
  light: "text-[#080707]"
3305
- }, yr = {
3251
+ }, xr = {
3306
3252
  dark: "border-white/[0.08]",
3307
3253
  light: "border-black/[0.08]"
3308
- }, Cr = (e) => e === "dark" ? "sender" : "receiver", kr = {
3254
+ }, wr = (e) => e === "dark" ? "sender" : "receiver", _r = {
3309
3255
  sender: {
3310
3256
  single: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[18px]",
3311
3257
  first: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[4px]",
@@ -3318,7 +3264,7 @@ const dr = {
3318
3264
  middle: "rounded-tl-[4px] rounded-tr-[18px] rounded-bl-[4px] rounded-br-[18px]",
3319
3265
  end: "rounded-tl-[4px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[18px]"
3320
3266
  }
3321
- }, xe = ({
3267
+ }, ve = ({
3322
3268
  variant: e,
3323
3269
  text: t,
3324
3270
  bordered: s = !0,
@@ -3327,13 +3273,13 @@ const dr = {
3327
3273
  children: i,
3328
3274
  "data-testid": o
3329
3275
  }) => {
3330
- const l = t != null && t !== "", d = kr[Cr(e)][a];
3276
+ const l = t != null && t !== "", d = _r[wr(e)][a];
3331
3277
  return /* @__PURE__ */ h(
3332
3278
  "div",
3333
3279
  {
3334
3280
  "data-testid": o,
3335
3281
  "data-group-position": a,
3336
- className: C(
3282
+ className: y(
3337
3283
  // 280px-wide bubble — matches the mobile chat attachment width
3338
3284
  // and keeps the document / image / audio bubbles visually
3339
3285
  // consistent inside the conversation timeline. The 8px / 16px
@@ -3342,10 +3288,10 @@ const dr = {
3342
3288
  // as the surrounding `CustomMessage` text bubbles.
3343
3289
  "relative w-[280px] overflow-hidden px-2 py-2",
3344
3290
  d,
3345
- _r[e],
3346
- Nr[e],
3291
+ pr[e],
3292
+ vr[e],
3347
3293
  s && "border",
3348
- s && yr[e],
3294
+ s && xr[e],
3349
3295
  r
3350
3296
  ),
3351
3297
  children: [
@@ -3353,7 +3299,7 @@ const dr = {
3353
3299
  l ? /* @__PURE__ */ n(
3354
3300
  "p",
3355
3301
  {
3356
- className: C(
3302
+ className: y(
3357
3303
  // No `text-*` / `font-*` overrides here — caption inherits
3358
3304
  // the same font family + size as `.str-chat__message-text`
3359
3305
  // so it matches the surrounding `CustomMessage` bubbles.
@@ -3370,7 +3316,7 @@ const dr = {
3370
3316
  ]
3371
3317
  }
3372
3318
  );
3373
- }, we = ({
3319
+ }, xe = ({
3374
3320
  onClick: e,
3375
3321
  variant: t = "overlay",
3376
3322
  ariaLabel: s = "Dismiss attachment"
@@ -3382,22 +3328,22 @@ const dr = {
3382
3328
  a.stopPropagation(), e();
3383
3329
  },
3384
3330
  "aria-label": s,
3385
- className: C(
3331
+ className: y(
3386
3332
  "flex size-6 items-center justify-center rounded-full text-white",
3387
3333
  t === "overlay" ? "bg-[#121110]/85 backdrop-blur" : "bg-white/15 hover:bg-white/25"
3388
3334
  ),
3389
3335
  children: /* @__PURE__ */ n(Ae, { className: "size-3", weight: "bold" })
3390
3336
  }
3391
- ), _e = (e) => e === "received" ? "light" : "dark", Ti = ({
3337
+ ), we = (e) => e === "received" ? "light" : "dark", ki = ({
3392
3338
  firstOfGroup: e,
3393
3339
  endOfGroup: t,
3394
3340
  groupedByUser: s
3395
- }) => !s || e && t ? "single" : e ? "first" : t ? "end" : "middle", Er = ({
3341
+ }) => !s || e && t ? "single" : e ? "first" : t ? "end" : "middle", Nr = ({
3396
3342
  src: e,
3397
3343
  mimeType: t,
3398
3344
  filename: s,
3399
3345
  items: a
3400
- }) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: s }] : [], Ir = ({ item: e, preload: t, trailingAction: s }) => /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
3346
+ }) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: s }] : [], yr = ({ item: e, preload: t, trailingAction: s }) => /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
3401
3347
  /* @__PURE__ */ n(
3402
3348
  "audio",
3403
3349
  {
@@ -3420,41 +3366,41 @@ const dr = {
3420
3366
  preload: l,
3421
3367
  onDismiss: d
3422
3368
  }) => {
3423
- const m = _e(e), b = e === "composer" && !!d, u = Er({ src: t, mimeType: s, filename: a, items: r });
3369
+ const m = we(e), b = e === "composer" && !!d, u = Nr({ src: t, mimeType: s, filename: a, items: r });
3424
3370
  if (u.length === 0)
3425
3371
  return null;
3426
3372
  const f = l ?? (u.length > 1 ? "none" : "metadata");
3427
3373
  return /* @__PURE__ */ n(
3428
- xe,
3374
+ ve,
3429
3375
  {
3430
3376
  variant: m,
3431
3377
  text: i,
3432
3378
  groupPosition: o,
3433
3379
  "data-testid": "audio-attachment",
3434
3380
  children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((c, g) => /* @__PURE__ */ n(
3435
- Ir,
3381
+ yr,
3436
3382
  {
3437
3383
  item: c,
3438
3384
  preload: f,
3439
3385
  trailingAction: (
3440
3386
  // Composer only supports a single attachment, so the
3441
3387
  // dismiss control sits on the only player.
3442
- b && g === 0 ? /* @__PURE__ */ n(we, { onClick: d, variant: "inline" }) : void 0
3388
+ b && g === 0 ? /* @__PURE__ */ n(xe, { onClick: d, variant: "inline" }) : void 0
3443
3389
  )
3444
3390
  },
3445
3391
  `${c.src}-${g}`
3446
3392
  )) })
3447
3393
  }
3448
3394
  );
3449
- }, Sr = (e) => /* @__PURE__ */ n(nt, { ...e, state: "composer" }), Tr = (e) => /* @__PURE__ */ n(nt, { ...e, state: "sent" }), Ar = (e) => /* @__PURE__ */ n(nt, { ...e, state: "received" }), Mr = {
3450
- Composer: Sr,
3451
- Sent: Tr,
3452
- Received: Ar
3395
+ }, Cr = (e) => /* @__PURE__ */ n(nt, { ...e, state: "composer" }), kr = (e) => /* @__PURE__ */ n(nt, { ...e, state: "sent" }), Er = (e) => /* @__PURE__ */ n(nt, { ...e, state: "received" }), Sr = {
3396
+ Composer: Cr,
3397
+ Sent: kr,
3398
+ Received: Er
3453
3399
  };
3454
- function Rr(e) {
3400
+ function Ir(e) {
3455
3401
  return !Number.isFinite(e) || e < 0 ? "" : e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : e < 1024 * 1024 * 1024 ? `${(e / (1024 * 1024)).toFixed(2)} MB` : `${(e / (1024 * 1024 * 1024)).toFixed(2)} GB`;
3456
3402
  }
3457
- const Lr = {
3403
+ const Tr = {
3458
3404
  pdf: "PDF",
3459
3405
  doc: "DOC",
3460
3406
  xls: "XLS",
@@ -3464,7 +3410,7 @@ const Lr = {
3464
3410
  text: "TXT",
3465
3411
  markdown: "MD"
3466
3412
  };
3467
- function Dr(e, t) {
3413
+ function Ar(e, t) {
3468
3414
  if (t) {
3469
3415
  const r = t.lastIndexOf(".");
3470
3416
  if (r > 0 && r < t.length - 1) {
@@ -3473,8 +3419,8 @@ function Dr(e, t) {
3473
3419
  }
3474
3420
  }
3475
3421
  if (!e) return;
3476
- if (se(e) === "document") {
3477
- const r = Zt(e), i = Lr[r];
3422
+ if (ne(e) === "document") {
3423
+ const r = Zt(e), i = Tr[r];
3478
3424
  if (i) return i;
3479
3425
  if (e === "application/octet-stream") return;
3480
3426
  }
@@ -3482,11 +3428,11 @@ function Dr(e, t) {
3482
3428
  if (!(!a || a === "*"))
3483
3429
  return a.toUpperCase();
3484
3430
  }
3485
- function Pr(e, t, s) {
3486
- const a = Dr(e, t), r = typeof s == "number" && s > 0 ? Rr(s) : void 0;
3431
+ function Mr(e, t, s) {
3432
+ const a = Ar(e, t), r = typeof s == "number" && s > 0 ? Ir(s) : void 0;
3487
3433
  return [a, r].filter(Boolean).join(" · ") || void 0;
3488
3434
  }
3489
- function Q(e) {
3435
+ function Z(e) {
3490
3436
  try {
3491
3437
  const s = new URL(e).pathname.split("/").pop();
3492
3438
  return s && s.length > 0 ? decodeURIComponent(s) : "download";
@@ -3494,13 +3440,13 @@ function Q(e) {
3494
3440
  return "download";
3495
3441
  }
3496
3442
  }
3497
- const Or = {
3443
+ const Rr = {
3498
3444
  dark: "text-white/55",
3499
3445
  light: "text-black/65"
3500
- }, zr = {
3446
+ }, Lr = {
3501
3447
  dark: "bg-white/10",
3502
3448
  light: "bg-black/5"
3503
- }, $r = {
3449
+ }, Dr = {
3504
3450
  dark: "text-white/85",
3505
3451
  light: "text-black/85"
3506
3452
  }, fn = ({
@@ -3513,16 +3459,16 @@ const Or = {
3513
3459
  activateLabel: o,
3514
3460
  trailingAction: l
3515
3461
  }) => {
3516
- const d = s ?? t ?? "File", m = Pr(a, t, r), b = /* @__PURE__ */ n(
3462
+ const d = s ?? t ?? "File", m = Mr(a, t, r), b = /* @__PURE__ */ n(
3517
3463
  "div",
3518
3464
  {
3519
- className: C(
3465
+ className: y(
3520
3466
  "flex size-10 shrink-0 items-center justify-center rounded-sm",
3521
- zr[e]
3467
+ Lr[e]
3522
3468
  ),
3523
3469
  "aria-hidden": !0,
3524
- children: ce(a, {
3525
- className: C("size-6", $r[e]),
3470
+ children: le(a, {
3471
+ className: y("size-6", Dr[e]),
3526
3472
  weight: "regular"
3527
3473
  })
3528
3474
  }
@@ -3531,9 +3477,9 @@ const Or = {
3531
3477
  m ? /* @__PURE__ */ n(
3532
3478
  "p",
3533
3479
  {
3534
- className: C(
3480
+ className: y(
3535
3481
  "truncate text-xs leading-4",
3536
- Or[e]
3482
+ Rr[e]
3537
3483
  ),
3538
3484
  children: m
3539
3485
  }
@@ -3544,7 +3490,7 @@ const Or = {
3544
3490
  type: "button",
3545
3491
  onClick: i,
3546
3492
  "aria-label": o,
3547
- className: C(
3493
+ className: y(
3548
3494
  "flex min-w-0 flex-1 items-center gap-3 rounded-sm text-left transition-colors",
3549
3495
  e === "dark" ? "hover:bg-white/[0.04]" : "hover:bg-black/[0.04]"
3550
3496
  ),
@@ -3553,7 +3499,7 @@ const Or = {
3553
3499
  u
3554
3500
  ]
3555
3501
  }
3556
- ) : /* @__PURE__ */ h(ne, { children: [
3502
+ ) : /* @__PURE__ */ h(te, { children: [
3557
3503
  b,
3558
3504
  u
3559
3505
  ] });
@@ -3563,7 +3509,7 @@ const Or = {
3563
3509
  ] });
3564
3510
  };
3565
3511
  async function gn(e, t) {
3566
- const s = t ?? Q(e);
3512
+ const s = t ?? Z(e);
3567
3513
  try {
3568
3514
  const a = await fetch(e, { mode: "cors" });
3569
3515
  if (!a.ok) throw new Error(`HTTP ${a.status}`);
@@ -3576,21 +3522,21 @@ async function gn(e, t) {
3576
3522
  }
3577
3523
  }
3578
3524
  }
3579
- const Fr = ({
3525
+ const Pr = ({
3580
3526
  src: e,
3581
3527
  filename: t,
3582
3528
  fileSize: s,
3583
3529
  mimeType: a,
3584
3530
  title: r,
3585
3531
  items: i
3586
- }) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: s, mimeType: a, title: r }] : [], Br = ({
3532
+ }) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: s, mimeType: a, title: r }] : [], Or = ({
3587
3533
  variant: e,
3588
3534
  item: t,
3589
3535
  index: s,
3590
3536
  onActivate: a,
3591
3537
  trailingAction: r
3592
3538
  }) => {
3593
- const i = t.filename ?? Q(t.src);
3539
+ const i = t.filename ?? Z(t.src);
3594
3540
  return /* @__PURE__ */ n(
3595
3541
  fn,
3596
3542
  {
@@ -3617,7 +3563,7 @@ const Fr = ({
3617
3563
  onClick: m,
3618
3564
  onDismiss: b
3619
3565
  }) => {
3620
- const u = _e(e), f = e === "composer" && !!b, c = Fr({
3566
+ const u = we(e), f = e === "composer" && !!b, c = Pr({
3621
3567
  src: t,
3622
3568
  filename: s,
3623
3569
  fileSize: a,
@@ -3628,7 +3574,7 @@ const Fr = ({
3628
3574
  if ((m == null ? void 0 : m(v)) === !1) return;
3629
3575
  const _ = c[v];
3630
3576
  if (!_) return;
3631
- const x = _.filename ?? Q(_.src);
3577
+ const x = _.filename ?? Z(_.src);
3632
3578
  gn(_.src, x);
3633
3579
  };
3634
3580
  if (c.length === 0)
@@ -3636,44 +3582,44 @@ const Fr = ({
3636
3582
  const p = /* @__PURE__ */ n(
3637
3583
  "span",
3638
3584
  {
3639
- className: C(
3585
+ className: y(
3640
3586
  "flex size-8 items-center justify-center rounded-full",
3641
3587
  u === "dark" ? "text-white/70" : "text-black/70"
3642
3588
  ),
3643
3589
  "aria-hidden": !0,
3644
- children: /* @__PURE__ */ n(pe, { className: "size-5", weight: "bold" })
3590
+ children: /* @__PURE__ */ n(be, { className: "size-5", weight: "bold" })
3645
3591
  }
3646
3592
  );
3647
3593
  return /* @__PURE__ */ n(
3648
- xe,
3594
+ ve,
3649
3595
  {
3650
3596
  variant: u,
3651
3597
  text: l,
3652
3598
  groupPosition: d,
3653
3599
  "data-testid": "file-attachment",
3654
3600
  children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: c.map((v, _) => /* @__PURE__ */ n(
3655
- Br,
3601
+ Or,
3656
3602
  {
3657
3603
  variant: u,
3658
3604
  item: v,
3659
3605
  index: _,
3660
3606
  onActivate: g,
3661
- trailingAction: f && _ === 0 ? /* @__PURE__ */ n(we, { onClick: b, variant: "inline" }) : p
3607
+ trailingAction: f && _ === 0 ? /* @__PURE__ */ n(xe, { onClick: b, variant: "inline" }) : p
3662
3608
  },
3663
3609
  `${v.src}-${_}`
3664
3610
  )) })
3665
3611
  }
3666
3612
  );
3667
- }, Ur = (e) => /* @__PURE__ */ n(st, { ...e, state: "composer" }), jr = (e) => /* @__PURE__ */ n(st, { ...e, state: "sent" }), Vr = (e) => /* @__PURE__ */ n(st, { ...e, state: "received" }), Gr = {
3668
- Composer: Ur,
3669
- Sent: jr,
3670
- Received: Vr
3613
+ }, zr = (e) => /* @__PURE__ */ n(st, { ...e, state: "composer" }), $r = (e) => /* @__PURE__ */ n(st, { ...e, state: "sent" }), Fr = (e) => /* @__PURE__ */ n(st, { ...e, state: "received" }), Br = {
3614
+ Composer: zr,
3615
+ Sent: $r,
3616
+ Received: Fr
3671
3617
  }, at = ({
3672
3618
  onPrev: e,
3673
3619
  onNext: t,
3674
3620
  prevLabel: s = "Previous",
3675
3621
  nextLabel: a = "Next"
3676
- }) => /* @__PURE__ */ h(ne, { children: [
3622
+ }) => /* @__PURE__ */ h(te, { children: [
3677
3623
  /* @__PURE__ */ n(
3678
3624
  "button",
3679
3625
  {
@@ -3681,7 +3627,7 @@ const Fr = ({
3681
3627
  onClick: e,
3682
3628
  "aria-label": s,
3683
3629
  className: "mes-media-viewer__nav mes-media-viewer__nav--prev",
3684
- children: /* @__PURE__ */ n(Ls, { size: 20, weight: "bold", "aria-hidden": !0 })
3630
+ children: /* @__PURE__ */ n(Ms, { size: 20, weight: "bold", "aria-hidden": !0 })
3685
3631
  }
3686
3632
  ),
3687
3633
  /* @__PURE__ */ n(
@@ -3691,7 +3637,7 @@ const Fr = ({
3691
3637
  onClick: t,
3692
3638
  "aria-label": a,
3693
3639
  className: "mes-media-viewer__nav mes-media-viewer__nav--next",
3694
- children: /* @__PURE__ */ n(Ds, { size: 20, weight: "bold", "aria-hidden": !0 })
3640
+ children: /* @__PURE__ */ n(Rs, { size: 20, weight: "bold", "aria-hidden": !0 })
3695
3641
  }
3696
3642
  )
3697
3643
  ] }), bn = ({
@@ -3703,7 +3649,7 @@ const Fr = ({
3703
3649
  tone: i = "dark",
3704
3650
  onTriggered: o
3705
3651
  }) => {
3706
- const [l, d] = O(!1), m = Y(
3652
+ const [l, d] = P(!1), m = W(
3707
3653
  (c) => {
3708
3654
  c.stopPropagation(), !l && (d(!0), gn(e, t).catch(() => {
3709
3655
  }).finally(() => {
@@ -3711,7 +3657,7 @@ const Fr = ({
3711
3657
  }));
3712
3658
  },
3713
3659
  [l, e, t, o]
3714
- ), b = r ?? s !== "pill", f = { className: C(
3660
+ ), b = r ?? s !== "pill", f = { className: y(
3715
3661
  s === "pill" ? "size-4" : "size-5",
3716
3662
  "shrink-0"
3717
3663
  ), weight: "bold" };
@@ -3722,7 +3668,7 @@ const Fr = ({
3722
3668
  onClick: m,
3723
3669
  disabled: l,
3724
3670
  "aria-label": a,
3725
- className: C(
3671
+ className: y(
3726
3672
  "flex size-8 shrink-0 items-center justify-center rounded-full transition-colors disabled:opacity-70",
3727
3673
  {
3728
3674
  dark: "text-white/70 hover:bg-white/[0.08] hover:text-white",
@@ -3730,14 +3676,14 @@ const Fr = ({
3730
3676
  }[i]
3731
3677
  ),
3732
3678
  children: l ? /* @__PURE__ */ n(
3733
- be,
3679
+ ge,
3734
3680
  {
3735
3681
  className: "size-4 animate-spin",
3736
3682
  weight: "bold",
3737
3683
  "aria-hidden": !0
3738
3684
  }
3739
3685
  ) : /* @__PURE__ */ n(
3740
- pe,
3686
+ be,
3741
3687
  {
3742
3688
  className: "size-5 shrink-0",
3743
3689
  weight: "bold",
@@ -3753,7 +3699,7 @@ const Fr = ({
3753
3699
  disabled: l,
3754
3700
  "aria-label": a,
3755
3701
  className: "mes-media-viewer__action",
3756
- children: l ? /* @__PURE__ */ n(be, { size: 20, weight: "bold", "aria-hidden": !0 }) : /* @__PURE__ */ n(pe, { size: 20, weight: "bold", "aria-hidden": !0 })
3702
+ children: l ? /* @__PURE__ */ n(ge, { size: 20, weight: "bold", "aria-hidden": !0 }) : /* @__PURE__ */ n(be, { size: 20, weight: "bold", "aria-hidden": !0 })
3757
3703
  }
3758
3704
  ) : /* @__PURE__ */ h(
3759
3705
  "button",
@@ -3762,19 +3708,19 @@ const Fr = ({
3762
3708
  onClick: m,
3763
3709
  disabled: l,
3764
3710
  "aria-label": b ? a : void 0,
3765
- className: C(
3711
+ className: y(
3766
3712
  "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",
3767
3713
  i === "dark" ? "bg-[#121110] text-white hover:bg-[#2a2928]" : "bg-white text-[#121110] hover:bg-white/90"
3768
3714
  ),
3769
3715
  children: [
3770
3716
  l ? /* @__PURE__ */ n(
3771
- be,
3717
+ ge,
3772
3718
  {
3773
3719
  className: "size-4 animate-spin",
3774
3720
  weight: "bold",
3775
3721
  "aria-hidden": !0
3776
3722
  }
3777
- ) : /* @__PURE__ */ n(pe, { ...f, "aria-hidden": !0 }),
3723
+ ) : /* @__PURE__ */ n(be, { ...f, "aria-hidden": !0 }),
3778
3724
  b ? null : a
3779
3725
  ]
3780
3726
  }
@@ -3784,18 +3730,18 @@ const Fr = ({
3784
3730
  initialIndex: t,
3785
3731
  open: s
3786
3732
  }) => {
3787
- const a = $e(t, 0, Math.max(e - 1, 0)), [r, i] = O(a);
3788
- H(() => {
3733
+ const a = $e(t, 0, Math.max(e - 1, 0)), [r, i] = P(a);
3734
+ Y(() => {
3789
3735
  s && i($e(t, 0, Math.max(e - 1, 0)));
3790
- }, [s, t, e]), H(() => {
3736
+ }, [s, t, e]), Y(() => {
3791
3737
  i((d) => $e(d, 0, Math.max(e - 1, 0)));
3792
3738
  }, [e]);
3793
- const o = Y(() => {
3739
+ const o = W(() => {
3794
3740
  e <= 1 || i((d) => d <= 0 ? e - 1 : d - 1);
3795
- }, [e]), l = Y(() => {
3741
+ }, [e]), l = W(() => {
3796
3742
  e <= 1 || i((d) => d >= e - 1 ? 0 : d + 1);
3797
3743
  }, [e]);
3798
- return H(() => {
3744
+ return Y(() => {
3799
3745
  if (!s || e <= 1) return;
3800
3746
  const d = (m) => {
3801
3747
  if (m.key !== "ArrowLeft" && m.key !== "ArrowRight") return;
@@ -3813,8 +3759,8 @@ const Fr = ({
3813
3759
  children: i,
3814
3760
  "data-testid": o
3815
3761
  }) => {
3816
- const l = G(null), d = G(null);
3817
- return H(() => {
3762
+ const l = H(null), d = H(null);
3763
+ return Y(() => {
3818
3764
  var f;
3819
3765
  const u = l.current;
3820
3766
  if (u) {
@@ -3904,8 +3850,8 @@ const Fr = ({
3904
3850
  length: t.length,
3905
3851
  initialIndex: s,
3906
3852
  open: e
3907
- }), l = t[r], d = te(
3908
- () => (l == null ? void 0 : l.filename) ?? (l ? Q(l.src) : "image"),
3853
+ }), l = t[r], d = ee(
3854
+ () => (l == null ? void 0 : l.filename) ?? (l ? Z(l.src) : "image"),
3909
3855
  [l]
3910
3856
  );
3911
3857
  return l ? /* @__PURE__ */ h(
@@ -3950,7 +3896,7 @@ const Fr = ({
3950
3896
  ]
3951
3897
  }
3952
3898
  ) : null;
3953
- }, Hr = "relative block size-full overflow-hidden bg-black/5 outline-none focus-visible:ring-2 focus-visible:ring-white/80 focus-visible:ring-offset-2 focus-visible:ring-offset-black", vn = ({
3899
+ }, Ur = "relative block size-full overflow-hidden bg-black/5 outline-none focus-visible:ring-2 focus-visible:ring-white/80 focus-visible:ring-offset-2 focus-visible:ring-offset-black", vn = ({
3954
3900
  tiles: e,
3955
3901
  onTileActivate: t,
3956
3902
  maxVisible: s = 4,
@@ -3959,14 +3905,14 @@ const Fr = ({
3959
3905
  const r = e.length;
3960
3906
  if (r === 0) return null;
3961
3907
  const i = e.slice(0, Math.min(r, s)), o = r - i.length, l = (d, m, b) => {
3962
- const u = C(Hr, "h-full w-full");
3908
+ const u = y(Ur, "h-full w-full");
3963
3909
  return t ? /* @__PURE__ */ h(
3964
3910
  "button",
3965
3911
  {
3966
3912
  type: "button",
3967
3913
  onClick: () => t(m),
3968
3914
  "aria-label": d.ariaLabel ?? `Open media ${m + 1}`,
3969
- className: C(u, "cursor-zoom-in"),
3915
+ className: y(u, "cursor-zoom-in"),
3970
3916
  children: [
3971
3917
  d.content,
3972
3918
  b
@@ -3978,10 +3924,10 @@ const Fr = ({
3978
3924
  b
3979
3925
  ] }, m);
3980
3926
  };
3981
- return i.length === 1 ? /* @__PURE__ */ n("div", { className: C("aspect-square w-full", a), children: l(i[0], 0) }) : i.length === 2 ? /* @__PURE__ */ n(
3927
+ return i.length === 1 ? /* @__PURE__ */ n("div", { className: y("aspect-square w-full", a), children: l(i[0], 0) }) : i.length === 2 ? /* @__PURE__ */ n(
3982
3928
  "div",
3983
3929
  {
3984
- className: C(
3930
+ className: y(
3985
3931
  "grid aspect-[16/9] w-full grid-cols-2 gap-0.5",
3986
3932
  a
3987
3933
  ),
@@ -3990,7 +3936,7 @@ const Fr = ({
3990
3936
  ) : i.length === 3 ? /* @__PURE__ */ h(
3991
3937
  "div",
3992
3938
  {
3993
- className: C(
3939
+ className: y(
3994
3940
  "grid aspect-[4/3] w-full grid-cols-2 grid-rows-2 gap-0.5",
3995
3941
  a
3996
3942
  ),
@@ -4003,7 +3949,7 @@ const Fr = ({
4003
3949
  ) : /* @__PURE__ */ n(
4004
3950
  "div",
4005
3951
  {
4006
- className: C(
3952
+ className: y(
4007
3953
  "grid aspect-[4/3] w-full grid-cols-2 grid-rows-2 gap-0.5",
4008
3954
  a
4009
3955
  ),
@@ -4020,15 +3966,15 @@ const Fr = ({
4020
3966
  })
4021
3967
  }
4022
3968
  );
4023
- }, Ne = (e) => {
4024
- const [t, s] = O(!1), [a, r] = O(0), i = Y(
3969
+ }, _e = (e) => {
3970
+ const [t, s] = P(!1), [a, r] = P(0), i = W(
4025
3971
  (l) => {
4026
3972
  (e == null ? void 0 : e(l)) !== !1 && (r(l), s(!0));
4027
3973
  },
4028
3974
  [e]
4029
- ), o = Y(() => s(!1), []);
3975
+ ), o = W(() => s(!1), []);
4030
3976
  return { viewerOpen: t, viewerIndex: a, handleActivate: i, closeViewer: o };
4031
- }, Yr = (e, t, s, a) => ({
3977
+ }, jr = (e, t, s, a) => ({
4032
3978
  ariaLabel: `Open image ${t + 1} of ${s}`,
4033
3979
  content: /* @__PURE__ */ n(
4034
3980
  "img",
@@ -4043,7 +3989,7 @@ const Fr = ({
4043
3989
  className: "absolute inset-0 size-full rounded-md object-cover"
4044
3990
  }
4045
3991
  )
4046
- }), qr = ({
3992
+ }), Vr = ({
4047
3993
  src: e,
4048
3994
  alt: t,
4049
3995
  items: s
@@ -4051,8 +3997,8 @@ const Fr = ({
4051
3997
  src: s.src,
4052
3998
  alt: s.alt,
4053
3999
  filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
4054
- })), Wr = ({ src: e, alt: t, filename: s, loading: a = "lazy", onClick: r, onDismiss: i }) => {
4055
- const { viewerOpen: o, viewerIndex: l, handleActivate: d, closeViewer: m } = Ne(
4000
+ })), Gr = ({ src: e, alt: t, filename: s, loading: a = "lazy", onClick: r, onDismiss: i }) => {
4001
+ const { viewerOpen: o, viewerIndex: l, handleActivate: d, closeViewer: m } = _e(
4056
4002
  r
4057
4003
  );
4058
4004
  return /* @__PURE__ */ h("div", { className: "relative w-fit", children: [
@@ -4076,7 +4022,7 @@ const Fr = ({
4076
4022
  )
4077
4023
  }
4078
4024
  ),
4079
- i ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(we, { onClick: i }) }) : null,
4025
+ i ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(xe, { onClick: i }) }) : null,
4080
4026
  /* @__PURE__ */ n(
4081
4027
  pn,
4082
4028
  {
@@ -4098,16 +4044,16 @@ const Fr = ({
4098
4044
  loading: l = "lazy",
4099
4045
  onClick: d
4100
4046
  }) => {
4101
- const m = qr({ src: t, alt: s, items: r }), b = _e(e), { viewerOpen: u, viewerIndex: f, handleActivate: c, closeViewer: g } = Ne(
4047
+ const m = Vr({ src: t, alt: s, items: r }), b = we(e), { viewerOpen: u, viewerIndex: f, handleActivate: c, closeViewer: g } = _e(
4102
4048
  d
4103
4049
  );
4104
4050
  if (m.length === 0)
4105
4051
  return null;
4106
4052
  const p = m.map(
4107
- (v, _) => Yr(v, _, m.length, l)
4053
+ (v, _) => jr(v, _, m.length, l)
4108
4054
  );
4109
4055
  return /* @__PURE__ */ h(
4110
- xe,
4056
+ ve,
4111
4057
  {
4112
4058
  variant: b,
4113
4059
  text: i,
@@ -4127,11 +4073,11 @@ const Fr = ({
4127
4073
  ]
4128
4074
  }
4129
4075
  );
4130
- }, Xr = (e) => /* @__PURE__ */ n(Wr, { ...e }), Kr = (e) => /* @__PURE__ */ n(wn, { ...e, state: "sent" }), Jr = (e) => /* @__PURE__ */ n(wn, { ...e, state: "received" }), Zr = {
4131
- Composer: Xr,
4132
- Sent: Kr,
4133
- Received: Jr
4134
- }, Qr = ({
4076
+ }, Hr = (e) => /* @__PURE__ */ n(Gr, { ...e }), Yr = (e) => /* @__PURE__ */ n(wn, { ...e, state: "sent" }), qr = (e) => /* @__PURE__ */ n(wn, { ...e, state: "received" }), Wr = {
4077
+ Composer: Hr,
4078
+ Sent: Yr,
4079
+ Received: qr
4080
+ }, Xr = ({
4135
4081
  open: e,
4136
4082
  items: t,
4137
4083
  initialIndex: s = 0,
@@ -4141,11 +4087,11 @@ const Fr = ({
4141
4087
  length: t.length,
4142
4088
  initialIndex: s,
4143
4089
  open: e
4144
- }), l = t[r], d = te(
4145
- () => (l == null ? void 0 : l.filename) ?? (l ? Q(l.src) : "document"),
4090
+ }), l = t[r], d = ee(
4091
+ () => (l == null ? void 0 : l.filename) ?? (l ? Z(l.src) : "document"),
4146
4092
  [l]
4147
- ), m = te(
4148
- () => l ? ei(l.src) : void 0,
4093
+ ), m = ee(
4094
+ () => l ? Kr(l.src) : void 0,
4149
4095
  [l]
4150
4096
  );
4151
4097
  return !l || !m ? null : /* @__PURE__ */ h(
@@ -4179,23 +4125,23 @@ const Fr = ({
4179
4125
  ]
4180
4126
  }
4181
4127
  );
4182
- }, ei = (e) => {
4128
+ }, Kr = (e) => {
4183
4129
  const t = e.indexOf("#"), s = t === -1 ? e : e.slice(0, t), a = t === -1 ? "" : e.slice(t + 1), r = new URLSearchParams(a);
4184
4130
  return r.has("toolbar") || r.set("toolbar", "0"), r.has("navpanes") || r.set("navpanes", "0"), `${s}#${r.toString()}`;
4185
- }, ti = ({
4131
+ }, Jr = ({
4186
4132
  src: e,
4187
4133
  filename: t,
4188
4134
  fileSize: s,
4189
4135
  title: a,
4190
4136
  items: r
4191
- }) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: s, title: a }] : [], ni = ({
4137
+ }) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: s, title: a }] : [], Zr = ({
4192
4138
  variant: e,
4193
4139
  item: t,
4194
4140
  index: s,
4195
4141
  onActivate: a,
4196
4142
  trailingAction: r
4197
4143
  }) => {
4198
- const i = t.filename ?? Q(t.src);
4144
+ const i = t.filename ?? Z(t.src);
4199
4145
  return /* @__PURE__ */ n(
4200
4146
  fn,
4201
4147
  {
@@ -4221,25 +4167,25 @@ const Fr = ({
4221
4167
  onClick: d,
4222
4168
  onDismiss: m
4223
4169
  }) => {
4224
- const b = _e(e), u = ti({ src: t, filename: s, fileSize: a, title: r, items: i }), { viewerOpen: f, viewerIndex: c, handleActivate: g, closeViewer: p } = Ne(
4170
+ const b = we(e), u = Jr({ src: t, filename: s, fileSize: a, title: r, items: i }), { viewerOpen: f, viewerIndex: c, handleActivate: g, closeViewer: p } = _e(
4225
4171
  d
4226
4172
  ), v = e === "composer" && !!m;
4227
4173
  if (u.length === 0)
4228
4174
  return null;
4229
4175
  const _ = u.map((x) => ({
4230
4176
  src: x.src,
4231
- filename: x.filename ?? Q(x.src)
4177
+ filename: x.filename ?? Z(x.src)
4232
4178
  }));
4233
4179
  return /* @__PURE__ */ h(
4234
- xe,
4180
+ ve,
4235
4181
  {
4236
4182
  variant: b,
4237
4183
  text: o,
4238
4184
  groupPosition: l,
4239
4185
  "data-testid": "pdf-attachment",
4240
4186
  children: [
4241
- /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((x, I) => {
4242
- const E = x.filename ?? Q(x.src), M = v && I === 0 ? /* @__PURE__ */ n(we, { onClick: m, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ n(
4187
+ /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((x, S) => {
4188
+ const E = x.filename ?? Z(x.src), M = v && S === 0 ? /* @__PURE__ */ n(xe, { onClick: m, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ n(
4243
4189
  bn,
4244
4190
  {
4245
4191
  url: x.src,
@@ -4250,19 +4196,19 @@ const Fr = ({
4250
4196
  }
4251
4197
  );
4252
4198
  return /* @__PURE__ */ n(
4253
- ni,
4199
+ Zr,
4254
4200
  {
4255
4201
  variant: b,
4256
4202
  item: x,
4257
- index: I,
4203
+ index: S,
4258
4204
  onActivate: g,
4259
4205
  trailingAction: M
4260
4206
  },
4261
- `${x.src}-${I}`
4207
+ `${x.src}-${S}`
4262
4208
  );
4263
4209
  }) }),
4264
4210
  /* @__PURE__ */ n(
4265
- Qr,
4211
+ Xr,
4266
4212
  {
4267
4213
  open: f,
4268
4214
  items: _,
@@ -4273,10 +4219,10 @@ const Fr = ({
4273
4219
  ]
4274
4220
  }
4275
4221
  );
4276
- }, si = (e) => /* @__PURE__ */ n(ot, { ...e, state: "composer" }), ai = (e) => /* @__PURE__ */ n(ot, { ...e, state: "sent" }), ri = (e) => /* @__PURE__ */ n(ot, { ...e, state: "received" }), ii = {
4277
- Composer: si,
4278
- Sent: ai,
4279
- Received: ri
4222
+ }, Qr = (e) => /* @__PURE__ */ n(ot, { ...e, state: "composer" }), ei = (e) => /* @__PURE__ */ n(ot, { ...e, state: "sent" }), ti = (e) => /* @__PURE__ */ n(ot, { ...e, state: "received" }), ni = {
4223
+ Composer: Qr,
4224
+ Sent: ei,
4225
+ Received: ti
4280
4226
  }, _n = ({
4281
4227
  open: e,
4282
4228
  items: t,
@@ -4287,8 +4233,8 @@ const Fr = ({
4287
4233
  length: t.length,
4288
4234
  initialIndex: s,
4289
4235
  open: e
4290
- }), l = t[r], d = te(
4291
- () => (l == null ? void 0 : l.filename) ?? (l ? Q(l.src) : "video"),
4236
+ }), l = t[r], d = ee(
4237
+ () => (l == null ? void 0 : l.filename) ?? (l ? Z(l.src) : "video"),
4292
4238
  [l]
4293
4239
  );
4294
4240
  return l ? /* @__PURE__ */ h(
@@ -4327,7 +4273,7 @@ const Fr = ({
4327
4273
  ]
4328
4274
  }
4329
4275
  ) : null;
4330
- }, oi = () => /* @__PURE__ */ n("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ n("span", { className: "flex size-12 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur", children: /* @__PURE__ */ n(Be, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), Nn = ({
4276
+ }, si = () => /* @__PURE__ */ n("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ n("span", { className: "flex size-12 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur", children: /* @__PURE__ */ n(Be, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), Nn = ({
4331
4277
  item: e,
4332
4278
  index: t
4333
4279
  }) => /* @__PURE__ */ h("div", { className: "absolute inset-0 size-full bg-[#0d0d0d]", children: [
@@ -4349,11 +4295,11 @@ const Fr = ({
4349
4295
  "aria-hidden": !0
4350
4296
  }
4351
4297
  ) }),
4352
- /* @__PURE__ */ n(oi, {})
4353
- ] }), li = (e, t, s) => ({
4298
+ /* @__PURE__ */ n(si, {})
4299
+ ] }), ai = (e, t, s) => ({
4354
4300
  ariaLabel: `Play video ${t + 1} of ${s}`,
4355
4301
  content: /* @__PURE__ */ n(Nn, { item: e, index: t })
4356
- }), ci = ({
4302
+ }), ri = ({
4357
4303
  src: e,
4358
4304
  poster: t,
4359
4305
  mimeType: s,
@@ -4365,8 +4311,8 @@ const Fr = ({
4365
4311
  mimeType: s.mimeType,
4366
4312
  preload: s.preload,
4367
4313
  filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
4368
- })), di = ({ src: e, poster: t, mimeType: s, filename: a, preload: r, onClick: i, onDismiss: o }) => {
4369
- const { viewerOpen: l, viewerIndex: d, handleActivate: m, closeViewer: b } = Ne(
4314
+ })), ii = ({ src: e, poster: t, mimeType: s, filename: a, preload: r, onClick: i, onDismiss: o }) => {
4315
+ const { viewerOpen: l, viewerIndex: d, handleActivate: m, closeViewer: b } = _e(
4370
4316
  i
4371
4317
  );
4372
4318
  return /* @__PURE__ */ h("div", { className: "relative w-fit", children: [
@@ -4380,7 +4326,7 @@ const Fr = ({
4380
4326
  children: /* @__PURE__ */ n(Nn, { item: { src: e, poster: t, mimeType: s }, index: 0 })
4381
4327
  }
4382
4328
  ),
4383
- o ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(we, { onClick: o }) }) : null,
4329
+ o ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(xe, { onClick: o }) }) : null,
4384
4330
  /* @__PURE__ */ n(
4385
4331
  _n,
4386
4332
  {
@@ -4406,16 +4352,16 @@ const Fr = ({
4406
4352
  preload: d,
4407
4353
  onClick: m
4408
4354
  }) => {
4409
- const b = ci({ src: t, poster: s, mimeType: a, preload: d, items: i }), u = _e(e), { viewerOpen: f, viewerIndex: c, handleActivate: g, closeViewer: p } = Ne(
4355
+ const b = ri({ src: t, poster: s, mimeType: a, preload: d, items: i }), u = we(e), { viewerOpen: f, viewerIndex: c, handleActivate: g, closeViewer: p } = _e(
4410
4356
  m
4411
4357
  );
4412
4358
  if (b.length === 0)
4413
4359
  return null;
4414
4360
  const v = b.map(
4415
- (_, x) => li(_, x, b.length)
4361
+ (_, x) => ai(_, x, b.length)
4416
4362
  );
4417
4363
  return /* @__PURE__ */ h(
4418
- xe,
4364
+ ve,
4419
4365
  {
4420
4366
  variant: u,
4421
4367
  text: o,
@@ -4442,17 +4388,17 @@ const Fr = ({
4442
4388
  ]
4443
4389
  }
4444
4390
  );
4445
- }, ui = (e) => /* @__PURE__ */ n(di, { ...e }), mi = (e) => /* @__PURE__ */ n(Cn, { ...e, state: "sent" }), hi = (e) => /* @__PURE__ */ n(Cn, { ...e, state: "received" }), fi = {
4446
- Composer: ui,
4447
- Sent: mi,
4448
- Received: hi
4449
- }, Ai = {
4450
- Image: Zr,
4451
- Video: fi,
4452
- Audio: Mr,
4453
- Pdf: ii,
4454
- File: Gr
4455
- }, gi = ({
4391
+ }, oi = (e) => /* @__PURE__ */ n(ii, { ...e }), li = (e) => /* @__PURE__ */ n(Cn, { ...e, state: "sent" }), ci = (e) => /* @__PURE__ */ n(Cn, { ...e, state: "received" }), di = {
4392
+ Composer: oi,
4393
+ Sent: li,
4394
+ Received: ci
4395
+ }, Ei = {
4396
+ Image: Wr,
4397
+ Video: di,
4398
+ Audio: Sr,
4399
+ Pdf: ni,
4400
+ File: Br
4401
+ }, ui = ({
4456
4402
  question: e,
4457
4403
  onClick: t,
4458
4404
  loading: s = !1,
@@ -4464,7 +4410,7 @@ const Fr = ({
4464
4410
  onClick: t,
4465
4411
  disabled: s,
4466
4412
  style: { backgroundColor: "#E6E5E3" },
4467
- className: C(
4413
+ className: y(
4468
4414
  "w-full text-center p-4 rounded-xl text-charcoal font-medium transition-colors focus-ring",
4469
4415
  {
4470
4416
  "hover:brightness-95 active:brightness-90": !s,
@@ -4474,7 +4420,7 @@ const Fr = ({
4474
4420
  ),
4475
4421
  children: e
4476
4422
  }
4477
- ), Mi = ({
4423
+ ), Si = ({
4478
4424
  faqs: e,
4479
4425
  onFaqClick: t,
4480
4426
  loadingFaqId: s,
@@ -4486,7 +4432,7 @@ const Fr = ({
4486
4432
  const l = e.filter((d) => d.enabled).sort((d, m) => (d.order ?? 0) - (m.order ?? 0));
4487
4433
  return l.length === 0 ? null : /* @__PURE__ */ n("div", { className: r, children: /* @__PURE__ */ h("div", { className: "flex gap-3 items-end", children: [
4488
4434
  (i || o) && /* @__PURE__ */ n("div", { className: "flex-none", children: /* @__PURE__ */ n(
4489
- re,
4435
+ ae,
4490
4436
  {
4491
4437
  id: o || "account",
4492
4438
  name: o || "Account",
@@ -4503,7 +4449,7 @@ const Fr = ({
4503
4449
  children: [
4504
4450
  a && /* @__PURE__ */ n("p", { className: "text-md text-charcoal mb-4", children: a }),
4505
4451
  l.map((d) => /* @__PURE__ */ n(
4506
- gi,
4452
+ ui,
4507
4453
  {
4508
4454
  question: d.question,
4509
4455
  onClick: () => t(d.id),
@@ -4518,37 +4464,37 @@ const Fr = ({
4518
4464
  };
4519
4465
  export {
4520
4466
  Qt as A,
4521
- Hs as B,
4522
- Ja as C,
4523
- Os as D,
4524
- Mi as F,
4525
- Si as L,
4526
- ki as M,
4527
- fe as a,
4528
- re as b,
4529
- or as c,
4467
+ Vs as B,
4468
+ qa as C,
4469
+ Ds as D,
4470
+ Si as F,
4471
+ Ci as L,
4472
+ _i as M,
4473
+ he as a,
4474
+ ae as b,
4475
+ sr as c,
4530
4476
  dn as d,
4531
- Ei as e,
4532
- gi as f,
4533
- se as g,
4477
+ Ni as e,
4478
+ ui as f,
4479
+ ne as g,
4534
4480
  Ot as h,
4535
- Ai as i,
4536
- Ca as j,
4537
- Ci as k,
4538
- Ii as l,
4539
- Pr as m,
4540
- Rr as n,
4541
- rr as o,
4542
- Dr as p,
4481
+ Ei as i,
4482
+ Na as j,
4483
+ wi as k,
4484
+ yi as l,
4485
+ Mr as m,
4486
+ Ir as n,
4487
+ tr as o,
4488
+ Ar as p,
4543
4489
  Xt as q,
4544
- ce as r,
4490
+ le as r,
4545
4491
  nn as s,
4546
- $s as t,
4547
- Ti as u,
4548
- Ys as v,
4492
+ Os as t,
4493
+ ki as u,
4494
+ Gs as v,
4549
4495
  Je as w,
4550
4496
  Ze as x,
4551
4497
  Wt as y,
4552
- va as z
4498
+ ba as z
4553
4499
  };
4554
- //# sourceMappingURL=index-DkqNYdg4.js.map
4500
+ //# sourceMappingURL=index-DmimisTH.js.map