@linktr.ee/messaging-react 3.3.6-rc-1780987607 → 3.3.6-rc-1781077089

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/dist/{Card-BlviN8Fb.cjs → Card-B-z03Jey.cjs} +2 -2
  2. package/dist/{Card-BlviN8Fb.cjs.map → Card-B-z03Jey.cjs.map} +1 -1
  3. package/dist/{Card-IjOI7UXs.js → Card-BSMnJuUn.js} +3 -3
  4. package/dist/{Card-IjOI7UXs.js.map → Card-BSMnJuUn.js.map} +1 -1
  5. package/dist/{Card-DE5bfj0l.js → Card-BgS405Np.js} +2 -2
  6. package/dist/{Card-DE5bfj0l.js.map → Card-BgS405Np.js.map} +1 -1
  7. package/dist/{Card-C4ncqjxJ.js → Card-C0w-vE4P.js} +2 -2
  8. package/dist/{Card-C4ncqjxJ.js.map → Card-C0w-vE4P.js.map} +1 -1
  9. package/dist/{Card-KgQxeR-B.cjs → Card-CMmWc_DV.cjs} +2 -2
  10. package/dist/{Card-KgQxeR-B.cjs.map → Card-CMmWc_DV.cjs.map} +1 -1
  11. package/dist/{Card-Cn7Zxc6U.cjs → Card-DlfG-u7M.cjs} +2 -2
  12. package/dist/{Card-Cn7Zxc6U.cjs.map → Card-DlfG-u7M.cjs.map} +1 -1
  13. package/dist/{LockedThumbnail-DL5NZzWJ.cjs → LockedThumbnail-Bpqw7YBv.cjs} +2 -2
  14. package/dist/{LockedThumbnail-DL5NZzWJ.cjs.map → LockedThumbnail-Bpqw7YBv.cjs.map} +1 -1
  15. package/dist/{LockedThumbnail-4-54cyJG.js → LockedThumbnail-jk9UL0Be.js} +2 -2
  16. package/dist/{LockedThumbnail-4-54cyJG.js.map → LockedThumbnail-jk9UL0Be.js.map} +1 -1
  17. package/dist/assets/index.css +1 -1
  18. package/dist/{index-C2wfgpUU.js → index-BpkIKkeQ.js} +663 -648
  19. package/dist/index-BpkIKkeQ.js.map +1 -0
  20. package/dist/index-CtuiVyk1.cjs +2 -0
  21. package/dist/index-CtuiVyk1.cjs.map +1 -0
  22. package/dist/index.cjs +1 -1
  23. package/dist/index.js +1 -1
  24. package/package.json +1 -1
  25. package/src/components/ChannelView.tsx +20 -29
  26. package/src/components/CustomMessageInput/index.tsx +47 -2
  27. package/src/styles.css +7 -0
  28. package/dist/index-C2wfgpUU.js.map +0 -1
  29. package/dist/index-nanry0Io.cjs +0 -2
  30. package/dist/index-nanry0Io.cjs.map +0 -1
@@ -1,9 +1,9 @@
1
- import { jsx as n, jsxs as h, Fragment as te } from "react/jsx-runtime";
2
- import j, { createContext as Ge, useContext as Te, useCallback as W, useState as O, useRef as H, useEffect as Y, useId as En, useMemo as ee, Suspense as He } from "react";
3
- import { StreamChatService as In } from "@linktr.ee/messaging-core";
4
- import { Chat as Sn, 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, defaultRenderMessages as cs, ChannelList as ds } from "stream-chat-react";
5
- import { StarIcon as Fe, DotsThreeIcon as us, SpinnerGapIcon as Ce, SignOutIcon as ms, ProhibitInsetIcon as At, FlagIcon as jt, FileIcon as Vt, ImageIcon as hs, SpeakerHighIcon as fs, VideoCameraIcon as Gt, FileMdIcon as gs, FileTextIcon as bs, FileZipIcon as ps, FilePptIcon as vs, FileCsvIcon as xs, FileXlsIcon as ws, FileDocIcon as Ns, FilePdfIcon as _s, CircleNotchIcon as ge, PlayIcon as Be, PauseIcon as ys, LinkIcon as Cs, DownloadSimpleIcon as be, GiftIcon as ks, ThumbsUpIcon as Es, ThumbsDownIcon as Is, TrashSimpleIcon as Ss, XIcon as Ae, ArrowUpIcon as Ts, SparkleIcon as Ue, ProhibitIcon as As, ArrowLeftIcon as Mt, PencilSimpleIcon as Ms, CaretLeftIcon as Rs, CaretRightIcon as Ls } from "@phosphor-icons/react";
6
- import y from "classnames";
1
+ import { jsx as n, jsxs as h, Fragment as ne } from "react/jsx-runtime";
2
+ import F, { 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";
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, ChannelList as ds } from "stream-chat-react";
5
+ import { StarIcon as Fe, DotsThreeIcon as us, SpinnerGapIcon as Ce, SignOutIcon as ms, ProhibitInsetIcon as At, FlagIcon as jt, FileIcon as Vt, ImageIcon as hs, SpeakerHighIcon as fs, VideoCameraIcon as Gt, FileMdIcon as gs, FileTextIcon as bs, FileZipIcon as ps, FilePptIcon as vs, FileCsvIcon as xs, FileXlsIcon as ws, FileDocIcon as Ns, FilePdfIcon as _s, CircleNotchIcon as be, PlayIcon as Be, PauseIcon as ys, LinkIcon as Cs, DownloadSimpleIcon as pe, GiftIcon as ks, ThumbsUpIcon as Es, ThumbsDownIcon as Is, TrashSimpleIcon as Ss, XIcon as Ae, ArrowUpIcon as Ts, SparkleIcon as Ue, ProhibitIcon as As, ArrowLeftIcon as Mt, PencilSimpleIcon as Ms, CaretLeftIcon as Rs, CaretRightIcon as Ls } from "@phosphor-icons/react";
6
+ import C from "classnames";
7
7
  import { MessageActions as Ds, DefaultDropdownActionButton as Ht } from "stream-chat-react/experimental";
8
8
  import { LinkPreviewsManager as Rt } from "stream-chat";
9
9
  const Yt = Ge({
@@ -16,7 +16,7 @@ const Yt = Ge({
16
16
  refreshConnection: async () => {
17
17
  },
18
18
  debug: !1
19
- }), qe = () => Te(Yt), Ni = ({
19
+ }), qe = () => Te(Yt), yi = ({
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 = W(
27
+ const o = Y(
28
28
  (k, ...T) => {
29
29
  i && console.log(`🔥 [MessagingProvider] ${k}`, ...T);
30
30
  },
@@ -36,12 +36,12 @@ 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), N = H(!1), x = H({
39
+ const [l, d] = O(null), [m, b] = O(null), [u, f] = O(!1), [c, g] = O(!1), [p, v] = O(null), N = G(!1), x = G({
40
40
  userId: t == null ? void 0 : t.id,
41
41
  apiKey: a,
42
42
  serviceConfig: s,
43
43
  capabilities: r
44
- }), I = H(0);
44
+ }), I = G(0);
45
45
  I.current++, o("📊 RENDER INFO", {
46
46
  renderCount: I.current,
47
47
  currentProps: { userId: t == null ? void 0 : t.id, apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..." },
@@ -56,7 +56,7 @@ const Yt = Ge({
56
56
  apiKey: a,
57
57
  serviceConfig: s,
58
58
  capabilities: r
59
- }, Y(() => {
59
+ }, H(() => {
60
60
  const k = I.current;
61
61
  if (o("🔧 SERVICE INIT EFFECT TRIGGERED", {
62
62
  renderCount: k,
@@ -80,7 +80,7 @@ const Yt = Ge({
80
80
  apiKey: (a == null ? void 0 : a.substring(0, 8)) + "...",
81
81
  serviceConfigChanged: x.current.serviceConfig !== s
82
82
  });
83
- const T = new In({
83
+ const T = new Sn({
84
84
  ...s,
85
85
  apiKey: a,
86
86
  debug: i
@@ -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 = H(null);
99
- Y(() => {
98
+ const E = G(null);
99
+ H(() => {
100
100
  var T, _;
101
101
  if (o("🔗 USER CONNECTION EFFECT TRIGGERED", {
102
102
  hasService: !!l,
@@ -142,7 +142,7 @@ const Yt = Ge({
142
142
  });
143
143
  }
144
144
  })();
145
- }, [l, t, o, u]), Y(() => (o("🔌 CLEANUP EFFECT REGISTERED", {
145
+ }, [l, t, o, u]), H(() => (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 = W(async () => {
157
+ const M = Y(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]), P = j.useMemo(() => (o("💫 CONTEXT VALUE MEMOIZATION", {
179
+ }, [l, t, o]), D = F.useMemo(() => (o("💫 CONTEXT VALUE MEMOIZATION", {
180
180
  hasService: !!l,
181
181
  hasClient: !!m,
182
182
  isConnected: u,
@@ -206,9 +206,9 @@ const Yt = Ge({
206
206
  return o("🔄 RENDER END", {
207
207
  renderCount: I.current,
208
208
  willRenderChat: !!(m && u),
209
- contextValueReady: !!P
210
- }), /* @__PURE__ */ n(Yt.Provider, { value: P, children: m && u ? /* @__PURE__ */ n(
211
- Sn,
209
+ contextValueReady: !!D
210
+ }), /* @__PURE__ */ n(Yt.Provider, { value: D, children: m && u ? /* @__PURE__ */ n(
211
+ Tn,
212
212
  {
213
213
  client: m,
214
214
  customClasses: {
@@ -222,7 +222,7 @@ const Yt = Ge({
222
222
  const [t, s] = O(
223
223
  !!((r = (a = e == null ? void 0 : e.state) == null ? void 0 : a.membership) != null && r.pinned_at)
224
224
  );
225
- return Y(() => {
225
+ return H(() => {
226
226
  var o;
227
227
  if (!e) {
228
228
  s(!1);
@@ -290,7 +290,7 @@ function Fs(e) {
290
290
  const s = $s(e) % Dt.length;
291
291
  return Dt[s];
292
292
  }
293
- const ae = ({
293
+ const re = ({
294
294
  id: e,
295
295
  image: t,
296
296
  size: s = 40,
@@ -310,7 +310,7 @@ const ae = ({
310
310
  "div",
311
311
  {
312
312
  "aria-hidden": "true",
313
- className: y(
313
+ className: C(
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 ae = ({
320
320
  return /* @__PURE__ */ h(
321
321
  "div",
322
322
  {
323
- className: y(
323
+ className: C(
324
324
  "relative flex-shrink-0 !bg-transparent",
325
325
  a
326
326
  ),
@@ -342,7 +342,7 @@ const ae = ({
342
342
  "div",
343
343
  {
344
344
  "data-testid": "avatar-ring",
345
- className: y(
345
+ className: C(
346
346
  "h-full w-full",
347
347
  "bg-transparent"
348
348
  ),
@@ -374,9 +374,9 @@ const ae = ({
374
374
  onActionComplete: m,
375
375
  logLabel: b = "useChannelModerationActions"
376
376
  }) => {
377
- var $;
378
- const { service: u, debug: f } = qe(), c = ($ = t == null ? void 0 : t.user) == null ? void 0 : $.id, g = !!(a && s && u && c), [p, v] = O(!1), [N, x] = O(null), [I, E] = O(!1), [M, P] = O(!1), k = g && ((N == null ? void 0 : N.participantId) !== c || (N == null ? void 0 : N.service) !== u);
379
- return Y(() => {
377
+ var B;
378
+ const { service: u, debug: f } = qe(), c = (B = t == null ? void 0 : t.user) == null ? void 0 : B.id, g = !!(a && s && u && c), [p, v] = O(!1), [N, x] = O(null), [I, E] = O(!1), [M, D] = O(!1), k = g && ((N == null ? void 0 : N.participantId) !== c || (N == null ? void 0 : N.service) !== u);
379
+ return H(() => {
380
380
  if (!g || !u || !c) {
381
381
  v(!1), x(null);
382
382
  return;
@@ -384,15 +384,15 @@ const ae = ({
384
384
  let A = !1;
385
385
  return (async () => {
386
386
  try {
387
- const D = await u.getBlockedUsers();
387
+ const P = await u.getBlockedUsers();
388
388
  if (A) return;
389
389
  v(
390
- D.some(
390
+ P.some(
391
391
  (z) => z.blocked_user_id === c
392
392
  )
393
393
  );
394
- } catch (D) {
395
- A || console.error(`[${b}] Failed to check blocked status:`, D);
394
+ } catch (P) {
395
+ A || console.error(`[${b}] Failed to check blocked status:`, P);
396
396
  } finally {
397
397
  A || x({ participantId: c, service: u });
398
398
  }
@@ -409,38 +409,38 @@ const ae = ({
409
409
  if (!I) {
410
410
  o == null || o(), f && console.log(`[${b}] Leave conversation`, e.cid), E(!0);
411
411
  try {
412
- const D = ((A = e._client) == null ? void 0 : A.userID) ?? null;
413
- await e.hide(D, !1), r && await r(e), m == null || m();
414
- } catch (D) {
415
- console.error(`[${b}] Failed to leave conversation`, D);
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);
416
416
  } finally {
417
417
  E(!1);
418
418
  }
419
419
  }
420
420
  },
421
421
  handleBlockUser: async () => {
422
- var A, D, z;
422
+ var A, P, z;
423
423
  if (!(M || !u)) {
424
- l == null || l(), f && console.log(`[${b}] Block member`, (A = t == null ? void 0 : t.user) == null ? void 0 : A.id), P(!0);
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((D = t == null ? void 0 : t.user) == null ? void 0 : D.id), i && await i((z = t == null ? void 0 : t.user) == null ? void 0 : z.id), m == null || m();
427
- } catch (G) {
428
- console.error(`[${b}] Failed to block member`, G);
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();
427
+ } catch (V) {
428
+ console.error(`[${b}] Failed to block member`, V);
429
429
  } finally {
430
- P(!1);
430
+ D(!1);
431
431
  }
432
432
  }
433
433
  },
434
434
  handleUnblockUser: async () => {
435
- var A, D, z;
435
+ var A, P, z;
436
436
  if (!(M || !u)) {
437
- l == null || l(), f && console.log(`[${b}] Unblock member`, (A = t == null ? void 0 : t.user) == null ? void 0 : A.id), P(!0);
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((D = t == null ? void 0 : t.user) == null ? void 0 : D.id), i && await i((z = t == null ? void 0 : t.user) == null ? void 0 : z.id), m == null || m();
440
- } catch (G) {
441
- console.error(`[${b}] Failed to unblock member`, G);
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();
440
+ } catch (V) {
441
+ console.error(`[${b}] Failed to unblock member`, V);
442
442
  } finally {
443
- P(!1);
443
+ D(!1);
444
444
  }
445
445
  }
446
446
  },
@@ -448,7 +448,7 @@ const ae = ({
448
448
  d == null || d(), m == null || m(), window.open(Bs, "_blank", "noopener,noreferrer");
449
449
  }
450
450
  };
451
- }, he = ({
451
+ }, fe = ({
452
452
  variant: e = "default",
453
453
  className: t,
454
454
  children: s,
@@ -457,7 +457,7 @@ const ae = ({
457
457
  "button",
458
458
  {
459
459
  type: "button",
460
- className: y(
460
+ className: C(
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,13 +479,13 @@ const ae = ({
479
479
  customChannelActions: b,
480
480
  triggerClassName: u
481
481
  }) => {
482
- const [f, c] = O(!1), g = H(null), p = En(), v = W(() => c(!1), []), {
482
+ const [f, c] = O(!1), g = G(null), p = En(), v = Y(() => c(!1), []), {
483
483
  isParticipantBlocked: N,
484
484
  isCheckingBlockedStatus: x,
485
485
  isLeaving: I,
486
486
  isUpdatingBlockStatus: E,
487
487
  handleLeaveConversation: M,
488
- handleBlockUser: P,
488
+ handleBlockUser: D,
489
489
  handleUnblockUser: k,
490
490
  handleReportUser: T
491
491
  } = Us({
@@ -501,12 +501,12 @@ const ae = ({
501
501
  onActionComplete: v,
502
502
  logLabel: "ChannelActionsMenu"
503
503
  });
504
- return Y(() => {
504
+ return H(() => {
505
505
  if (!f) return;
506
- const S = ($) => {
507
- g.current && !g.current.contains($.target) && c(!1);
508
- }, R = ($) => {
509
- $.key === "Escape" && c(!1);
506
+ const S = (B) => {
507
+ g.current && !g.current.contains(B.target) && c(!1);
508
+ }, R = (B) => {
509
+ B.key === "Escape" && c(!1);
510
510
  };
511
511
  return document.addEventListener("mousedown", S), document.addEventListener("keydown", R), () => {
512
512
  document.removeEventListener("mousedown", S), document.removeEventListener("keydown", R);
@@ -532,13 +532,13 @@ const ae = ({
532
532
  {
533
533
  id: p,
534
534
  "aria-label": "Conversation options",
535
- className: y(
535
+ className: C(
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
- he,
541
+ fe,
542
542
  {
543
543
  onClick: M,
544
544
  disabled: I,
@@ -552,12 +552,12 @@ const ae = ({
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(he, { disabled: !0, "aria-busy": !0, children: [
555
+ /* @__PURE__ */ h(fe, { 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
  ) : N ? /* @__PURE__ */ h(
560
- he,
560
+ fe,
561
561
  {
562
562
  onClick: k,
563
563
  disabled: E,
@@ -568,9 +568,9 @@ const ae = ({
568
568
  ]
569
569
  }
570
570
  ) : /* @__PURE__ */ h(
571
- he,
571
+ fe,
572
572
  {
573
- onClick: P,
573
+ onClick: D,
574
574
  disabled: E,
575
575
  "aria-busy": E,
576
576
  children: [
@@ -579,7 +579,7 @@ const ae = ({
579
579
  ]
580
580
  }
581
581
  ) }),
582
- r && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ h(he, { variant: "danger", onClick: T, children: [
582
+ r && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ h(fe, { 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 ae = ({
588
588
  }
589
589
  )
590
590
  ] });
591
- }, js = (e) => /* @__PURE__ */ n(Tn, { ...e, position: "center" }), je = "vote_up", Ve = "vote_down";
591
+ }, js = (e) => /* @__PURE__ */ n(An, { ...e, position: "center" }), je = "vote_up", Ve = "vote_down";
592
592
  function Vs(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
595
  function Gs(e) {
596
- const { channel: t } = ce(), { client: s } = Ye("useMessageVote"), a = ee(
596
+ const { channel: t } = de(), { client: s } = Ye("useMessageVote"), a = te(
597
597
  () => Vs(e.own_reactions),
598
598
  [e.own_reactions]
599
- ), r = W(async () => {
599
+ ), r = Y(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 Gs(e) {
606
606
  );
607
607
  } catch {
608
608
  }
609
- }, [t, s == null ? void 0 : s.userID, e.id, a]), i = W(async () => {
609
+ }, [t, s == null ? void 0 : s.userID, e.id, a]), i = Y(async () => {
610
610
  if (s != null && s.userID)
611
611
  try {
612
612
  a === "down" ? await t.deleteReaction(e.id, Ve) : await t.sendReaction(
@@ -630,7 +630,7 @@ function Xt({
630
630
  const s = e == null ? void 0 : e.text, a = Hs(t);
631
631
  return a ? ((r = e == null ? void 0 : e.i18n) == null ? void 0 : r[`${a}_text`]) ?? s : s;
632
632
  }
633
- const Ys = j.lazy(() => import("./Card-DE5bfj0l.js")), qs = j.lazy(() => import("./Card-C4ncqjxJ.js")), Ws = j.lazy(() => import("./Card-IjOI7UXs.js")), We = () => /* @__PURE__ */ n(
633
+ const Ys = F.lazy(() => import("./Card-BgS405Np.js")), qs = F.lazy(() => import("./Card-C0w-vE4P.js")), Ws = F.lazy(() => import("./Card-BSMnJuUn.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)]",
@@ -646,7 +646,7 @@ const Ys = j.lazy(() => import("./Card-DE5bfj0l.js")), qs = j.lazy(() => import(
646
646
  [/plain|rtf/, "text"],
647
647
  [/markdown/, "markdown"]
648
648
  ];
649
- function ne(e) {
649
+ function se(e) {
650
650
  return e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : e.startsWith("image/") ? "image" : "document";
651
651
  }
652
652
  function Zt(e) {
@@ -672,11 +672,11 @@ const Qs = {
672
672
  generic: Vt
673
673
  };
674
674
  function ta(e) {
675
- const t = ne(e);
675
+ const t = se(e);
676
676
  return t !== "document" ? Qs[t] : ea[Zt(e)];
677
677
  }
678
- function le(e, t) {
679
- return j.createElement(ta(e), t);
678
+ function ce(e, t) {
679
+ return F.createElement(ta(e), t);
680
680
  }
681
681
  const na = (e) => {
682
682
  var t, s;
@@ -693,66 +693,66 @@ const na = (e) => {
693
693
  muted: d = !1,
694
694
  onContainerClick: m
695
695
  }) => {
696
- const b = ne(t), u = H(null), f = H(null), c = H(null), g = H(r), [p, v] = O(a), [N, x] = O(0), [I, E] = O(!1), [M, P] = O(!1), [k, T] = O(!1), [_, S] = O(!1), [R, $] = O(!0), [A, D] = O(null), z = W(() => {
696
+ const b = se(t), u = G(null), f = G(null), c = G(null), g = G(r), [p, v] = O(a), [N, x] = O(0), [I, E] = O(!1), [M, D] = O(!1), [k, T] = O(!1), [_, S] = O(!1), [R, B] = O(!0), [A, P] = O(null), z = Y(() => {
697
697
  T(!1), v(!0);
698
- }, []), G = W((w) => {
699
- const C = f.current;
700
- if (!C) return 0;
701
- const U = C.getBoundingClientRect();
698
+ }, []), V = Y((w) => {
699
+ const y = f.current;
700
+ if (!y) return 0;
701
+ const $ = y.getBoundingClientRect();
702
702
  return Math.max(
703
703
  0,
704
- Math.min(1, (na(w) - U.left) / U.width)
704
+ Math.min(1, (na(w) - $.left) / $.width)
705
705
  );
706
- }, []), F = W((w) => {
707
- const C = u.current;
708
- C && C.duration && (C.currentTime = w * C.duration);
709
- }, []), B = (w) => {
706
+ }, []), U = Y((w) => {
707
+ const y = u.current;
708
+ y && y.duration && (y.currentTime = w * y.duration);
709
+ }, []), j = (w) => {
710
710
  w.stopPropagation(), E(!0);
711
- const C = G(w);
712
- x(C), F(C);
711
+ const y = V(w);
712
+ x(y), U(y);
713
713
  };
714
- Y(() => {
714
+ H(() => {
715
715
  r !== void 0 && r !== g.current && (g.current = r, v(r));
716
- }, [r]), Y(() => {
716
+ }, [r]), H(() => {
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 C = u.current;
723
- C && C.duration && !I && x(C.currentTime / C.duration), c.current = requestAnimationFrame(w);
722
+ const y = u.current;
723
+ y && y.duration && !I && x(y.currentTime / y.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]), Y(() => {
728
+ }, [p, I]), H(() => {
729
729
  const w = u.current;
730
- w && (p ? w.play().catch((C) => {
730
+ w && (p ? w.play().catch((y) => {
731
731
  v(!1), T(!0);
732
732
  }) : w.pause());
733
- }, [p]), Y(() => {
733
+ }, [p]), H(() => {
734
734
  if (!I) return;
735
- const w = (U) => x(G(U)), C = (U) => {
736
- E(!1), F(G(U));
735
+ const w = ($) => x(V($)), y = ($) => {
736
+ E(!1), U(V($));
737
737
  };
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);
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);
740
740
  };
741
- }, [I, G, F]);
742
- const X = A ? { aspectRatio: String(A) } : void 0, V = A ? "" : " aspect-video", L = Math.round(N * 100);
741
+ }, [I, V, U]);
742
+ const q = A ? { aspectRatio: String(A) } : void 0, W = A ? "" : " aspect-video", L = Math.round(N * 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 ${V}`,
749
- style: X,
748
+ className: `relative cursor-pointer overflow-hidden bg-black ${W}`,
749
+ style: q,
750
750
  onClick: (w) => {
751
751
  if (m) {
752
752
  m(w);
753
753
  return;
754
754
  }
755
- k || o && v((C) => !C);
755
+ k || o && v((y) => !y);
756
756
  },
757
757
  onKeyDown: (w) => {
758
758
  if (!(w.key !== "Enter" && w.key !== " ")) {
@@ -760,7 +760,7 @@ const na = (e) => {
760
760
  m(w);
761
761
  return;
762
762
  }
763
- k || o && v((C) => !C);
763
+ k || o && v((y) => !y);
764
764
  }
765
765
  },
766
766
  children: [
@@ -772,7 +772,7 @@ const na = (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: le(t, {
775
+ !s && (b === "audio" || R) && /* @__PURE__ */ n("div", { className: "absolute inset-0 flex items-center justify-center", children: ce(t, {
776
776
  className: "size-12 text-black/20",
777
777
  weight: "regular"
778
778
  }) }),
@@ -786,7 +786,7 @@ const na = (e) => {
786
786
  style: { width: "100%", height: "100%" },
787
787
  onLoadStart: () => S(!0),
788
788
  onCanPlay: () => {
789
- S(!1), $(!1);
789
+ S(!1), B(!1);
790
790
  },
791
791
  onWaiting: () => S(!0),
792
792
  onPlay: () => T(!1),
@@ -806,13 +806,13 @@ const na = (e) => {
806
806
  style: { width: "100%", height: "100%" },
807
807
  onLoadStart: () => S(!0),
808
808
  onCanPlay: () => {
809
- S(!1), $(!1);
809
+ S(!1), B(!1);
810
810
  },
811
811
  onWaiting: () => S(!0),
812
812
  onPlay: () => T(!1),
813
813
  onLoadedMetadata: () => {
814
814
  const w = u.current;
815
- w instanceof HTMLVideoElement && w.videoWidth && w.videoHeight && D(w.videoWidth / w.videoHeight);
815
+ w instanceof HTMLVideoElement && w.videoWidth && w.videoHeight && P(w.videoWidth / w.videoHeight);
816
816
  },
817
817
  onEnded: () => {
818
818
  i || (v(!1), x(0));
@@ -821,7 +821,7 @@ const na = (e) => {
821
821
  }
822
822
  ) }),
823
823
  _ && !k && /* @__PURE__ */ n("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ n(
824
- ge,
824
+ be,
825
825
  {
826
826
  className: "size-8 animate-spin text-white/80",
827
827
  weight: "bold"
@@ -854,11 +854,11 @@ const na = (e) => {
854
854
  tabIndex: 0,
855
855
  ref: f,
856
856
  className: "relative flex h-4 w-full cursor-pointer items-center",
857
- onMouseDown: B,
858
- onTouchStart: B,
857
+ onMouseDown: j,
858
+ onTouchStart: j,
859
859
  onClick: (w) => w.stopPropagation(),
860
860
  onKeyDown: (w) => {
861
- w.key === "ArrowRight" && F(Math.min(1, N + 0.05)), w.key === "ArrowLeft" && F(Math.max(0, N - 0.05));
861
+ w.key === "ArrowRight" && U(Math.min(1, N + 0.05)), w.key === "ArrowLeft" && U(Math.max(0, N - 0.05));
862
862
  },
863
863
  children: /* @__PURE__ */ n("div", { className: "w-full overflow-hidden rounded-full bg-white/30 h-1", children: /* @__PURE__ */ n(
864
864
  "div",
@@ -875,7 +875,7 @@ const na = (e) => {
875
875
  {
876
876
  type: "button",
877
877
  onClick: (w) => {
878
- w.stopPropagation(), v((C) => !C);
878
+ w.stopPropagation(), v((y) => !y);
879
879
  },
880
880
  className: "shrink-0 text-white",
881
881
  "aria-label": p ? "Pause" : "Play",
@@ -893,13 +893,13 @@ const na = (e) => {
893
893
  tabIndex: 0,
894
894
  ref: f,
895
895
  className: "relative flex h-4 w-full cursor-pointer items-center",
896
- onMouseDown: B,
897
- onTouchStart: B,
896
+ onMouseDown: j,
897
+ onTouchStart: j,
898
898
  onClick: (w) => w.stopPropagation(),
899
- onMouseEnter: () => P(!0),
900
- onMouseLeave: () => P(!1),
899
+ onMouseEnter: () => D(!0),
900
+ onMouseLeave: () => D(!1),
901
901
  onKeyDown: (w) => {
902
- w.key === "ArrowRight" && F(Math.min(1, N + 0.05)), w.key === "ArrowLeft" && F(Math.max(0, N - 0.05));
902
+ w.key === "ArrowRight" && U(Math.min(1, N + 0.05)), w.key === "ArrowLeft" && U(Math.max(0, N - 0.05));
903
903
  },
904
904
  children: [
905
905
  /* @__PURE__ */ n(
@@ -938,7 +938,7 @@ const na = (e) => {
938
938
  mediaPlayerProps: i,
939
939
  containedImage: o = !1
940
940
  }) => {
941
- const l = ne(e), [d, m] = O(!1);
941
+ const l = se(e), [d, m] = O(!1);
942
942
  return t && (l === "video" || l === "audio") ? /* @__PURE__ */ n(
943
943
  sa,
944
944
  {
@@ -986,7 +986,7 @@ const na = (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: le(e, {
989
+ children: ce(e, {
990
990
  className: zt(r),
991
991
  weight: "regular"
992
992
  })
@@ -1003,7 +1003,7 @@ const na = (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: le(e, {
1006
+ children: ce(e, {
1007
1007
  className: zt(r),
1008
1008
  weight: "regular"
1009
1009
  })
@@ -1029,7 +1029,7 @@ const na = (e) => {
1029
1029
  {
1030
1030
  ref: b,
1031
1031
  "data-testid": u,
1032
- className: y(
1032
+ className: C(
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 na = (e) => {
1041
1041
  c.trim() !== "" && /* @__PURE__ */ n(
1042
1042
  "p",
1043
1043
  {
1044
- className: y("mb-0.5 truncate text-base font-medium", {
1044
+ className: C("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 na = (e) => {
1050
1050
  }
1051
1051
  ),
1052
1052
  /* @__PURE__ */ h("div", { className: "flex flex-wrap items-center gap-1", children: [
1053
- le(r, {
1054
- className: y(
1053
+ ce(r, {
1054
+ className: C(
1055
1055
  "size-5 shrink-0",
1056
1056
  f ? "text-white/55" : "text-black/55"
1057
1057
  ),
@@ -1060,7 +1060,7 @@ const na = (e) => {
1060
1060
  i != null && i !== "" && /* @__PURE__ */ n(
1061
1061
  "span",
1062
1062
  {
1063
- className: y(
1063
+ className: C(
1064
1064
  "text-xs font-medium",
1065
1065
  f ? "text-white/55" : "text-black/55"
1066
1066
  ),
@@ -1097,7 +1097,7 @@ function ca(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(F.Fragment, { children: [
1101
1101
  /* @__PURE__ */ n("div", { className: "p-2", children: r ? /* @__PURE__ */ n(
1102
1102
  "img",
1103
1103
  {
@@ -1159,8 +1159,8 @@ const ua = ({
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(ge, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ h(j.Fragment, { children: [
1163
- /* @__PURE__ */ n(be, { className: "size-4 text-white", weight: "bold" }),
1162
+ children: s ? /* @__PURE__ */ n(be, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ h(F.Fragment, { children: [
1163
+ /* @__PURE__ */ n(pe, { 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 = ne(t), o = a !== void 0 ? tn(a) : void 0;
1225
+ const i = se(t), o = a !== void 0 ? tn(a) : void 0;
1226
1226
  return /* @__PURE__ */ n(
1227
1227
  en,
1228
1228
  {
@@ -1251,7 +1251,7 @@ const sn = ({
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
- ae,
1254
+ re,
1255
1255
  {
1256
1256
  className: "str-chat__avatar str-chat__message-sender-avatar",
1257
1257
  id: e.user.id,
@@ -1291,14 +1291,14 @@ 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
- }, _i = Object.assign(ma, {
1294
+ }, Ci = Object.assign(ma, {
1295
1295
  Creator: ha,
1296
1296
  Visitor: fa
1297
1297
  }), ga = {
1298
1298
  isUnlocking: () => !1
1299
1299
  }, ba = {
1300
1300
  LockedAttachment: ga
1301
- }, rn = Ge({}), yi = rn.Provider;
1301
+ }, rn = Ge({}), ki = rn.Provider;
1302
1302
  function pa(e) {
1303
1303
  return Te(rn)[e] ?? ba[e];
1304
1304
  }
@@ -1358,10 +1358,10 @@ const va = ({ size: e = 15 }) => /* @__PURE__ */ n(
1358
1358
  s ? "message-chatbot-indicator--sender" : "message-chatbot-indicator--receiver",
1359
1359
  o ? "message-chatbot-indicator--attachment" : "message-chatbot-indicator--text"
1360
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(va, { size: o ? 12 : 15 }) });
1361
- return /* @__PURE__ */ n("div", { className: d, "data-testid": "message-chatbot-indicator", children: s && !o ? /* @__PURE__ */ h(te, { children: [
1361
+ return /* @__PURE__ */ n("div", { className: d, "data-testid": "message-chatbot-indicator", children: s && !o ? /* @__PURE__ */ h(ne, { children: [
1362
1362
  m,
1363
1363
  b
1364
- ] }) : /* @__PURE__ */ h(te, { children: [
1364
+ ] }) : /* @__PURE__ */ h(ne, { children: [
1365
1365
  b,
1366
1366
  m
1367
1367
  ] }) });
@@ -1374,7 +1374,7 @@ const va = ({ size: e = 15 }) => /* @__PURE__ */ n(
1374
1374
  "button",
1375
1375
  {
1376
1376
  type: "button",
1377
- className: y("message-vote-button focus-ring", {
1377
+ className: C("message-vote-button focus-ring", {
1378
1378
  "message-vote-button--selected": e === "up"
1379
1379
  }),
1380
1380
  onClick: t,
@@ -1388,7 +1388,7 @@ const va = ({ size: e = 15 }) => /* @__PURE__ */ n(
1388
1388
  "button",
1389
1389
  {
1390
1390
  type: "button",
1391
- className: y("message-vote-button focus-ring", {
1391
+ className: C("message-vote-button focus-ring", {
1392
1392
  "message-vote-button--selected": e === "down"
1393
1393
  }),
1394
1394
  onClick: s,
@@ -1417,68 +1417,68 @@ const va = ({ size: e = 15 }) => /* @__PURE__ */ n(
1417
1417
  renderText: g,
1418
1418
  threadList: p,
1419
1419
  viewerLanguage: v
1420
- } = e, { client: N } = Ye("CustomMessage"), { channel: x } = ce("CustomMessage"), { isUnlocking: I, onUnlockClick: E, onFetchSource: M, onDownloadClick: P } = pa("LockedAttachment"), [k, T] = O(!1), _ = Mn(c.id), { selected: S, voteUp: R, voteDown: $ } = Gs(c), {
1421
- Attachment: A = Rn,
1422
- EditMessageModal: D = Ln,
1420
+ } = e, { client: N } = Ye("CustomMessage"), { channel: x } = de("CustomMessage"), { isUnlocking: I, onUnlockClick: E, onFetchSource: M, onDownloadClick: D } = pa("LockedAttachment"), [k, T] = O(!1), _ = Rn(c.id), { selected: S, voteUp: R, voteDown: B } = Gs(c), {
1421
+ Attachment: A = Ln,
1422
+ EditMessageModal: P = Dn,
1423
1423
  MessageActions: z,
1424
- MessageBlocked: G = Dn,
1425
- MessageBouncePrompt: F = Pn,
1426
- MessageDeleted: B = On,
1427
- MessageIsThreadReplyInChannelButtonIndicator: X = zn,
1428
- MessageRepliesCountButton: V = $n,
1429
- ReminderNotification: L = Fn,
1430
- StreamedMessageText: w = Bn,
1431
- PinIndicator: C
1432
- } = Ut("CustomMessage"), U = Un(c), q = jn(c), _e = ee(
1424
+ MessageBlocked: V = Pn,
1425
+ MessageBouncePrompt: U = On,
1426
+ MessageDeleted: j = 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(
1433
1433
  () => u == null ? void 0 : u(c),
1434
1434
  [u, c]
1435
- ), K = ee(() => {
1436
- const me = c.attachments ?? [], ye = c.shared_location ? [c.shared_location, ...me] : me;
1435
+ ), J = te(() => {
1436
+ const he = c.attachments ?? [], ye = c.shared_location ? [c.shared_location, ...he] : he;
1437
1437
  if (!ke(c)) return ye;
1438
1438
  const It = ye.filter((St) => !("type" in St) || !nn(St));
1439
1439
  return It.length === ye.length ? ye : It;
1440
- }, [c]), re = ee(() => {
1441
- const me = Xt({ message: c, viewerLanguage: v });
1442
- return me === c.text ? c : { ...c, text: me };
1440
+ }, [c]), ie = te(() => {
1441
+ const he = Xt({ message: c, viewerLanguage: v });
1442
+ return he === c.text ? c : { ...c, text: he };
1443
1443
  }, [c, v]);
1444
- if (Vn(c))
1444
+ if (Gn(c))
1445
1445
  return null;
1446
1446
  if (c.deleted_at || c.type === "deleted")
1447
- return /* @__PURE__ */ n(B, { message: c });
1448
- if (Gn(c))
1449
- return /* @__PURE__ */ n(G, {});
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(
1447
+ return /* @__PURE__ */ n(j, { message: c });
1448
+ if (Hn(c))
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(
1454
1454
  "str-chat__message str-chat__message-simple",
1455
1455
  `str-chat__message--${c.type}`,
1456
1456
  `str-chat__message--${c.status}`,
1457
- de ? "str-chat__message--me str-chat__message-simple--me" : "str-chat__message--other",
1457
+ ue ? "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": U,
1460
+ "str-chat__message--has-attachment": $,
1461
1461
  "str-chat__message--highlighted": b,
1462
1462
  "str-chat__message--pinned pinned-message": c.pinned,
1463
- "str-chat__message--with-reactions": q,
1463
+ "str-chat__message--with-reactions": X,
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": J || se,
1465
+ "str-chat__message-with-thread-link": Z || ae,
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 && N.polls.fromState(c.poll_id), dt = _a(c), ue = ke(c), ut = Na(c), Re = !!(K != null && K.length && !c.quoted_message), mt = ue && de && Re;
1471
- return /* @__PURE__ */ h(te, { children: [
1470
+ ), ct = c.poll_id && N.polls.fromState(c.poll_id), dt = _a(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: [
1472
1472
  a && /* @__PURE__ */ n(
1473
- D,
1473
+ P,
1474
1474
  {
1475
1475
  additionalMessageInputProps: t
1476
1476
  }
1477
1477
  ),
1478
1478
  k && /* @__PURE__ */ n(
1479
- Yn,
1479
+ qn,
1480
1480
  {
1481
- MessageBouncePrompt: F,
1481
+ MessageBouncePrompt: U,
1482
1482
  onClose: () => T(!1),
1483
1483
  open: k
1484
1484
  }
@@ -1489,10 +1489,10 @@ const va = ({ size: e = 15 }) => /* @__PURE__ */ n(
1489
1489
  className: kn,
1490
1490
  "data-message-id": c.id,
1491
1491
  children: [
1492
- C && /* @__PURE__ */ n(C, {}),
1492
+ y && /* @__PURE__ */ n(y, {}),
1493
1493
  !!_ && /* @__PURE__ */ n(L, { reminder: _ }),
1494
1494
  c.user && /* @__PURE__ */ n(
1495
- ae,
1495
+ re,
1496
1496
  {
1497
1497
  className: "str-chat__avatar str-chat__message-sender-avatar",
1498
1498
  id: c.user.id,
@@ -1500,20 +1500,20 @@ const va = ({ size: e = 15 }) => /* @__PURE__ */ n(
1500
1500
  name: c.user.name || c.user.id,
1501
1501
  size: 24,
1502
1502
  shape: "circle",
1503
- dmAgentEnabled: ue
1503
+ dmAgentEnabled: me
1504
1504
  }
1505
1505
  ),
1506
1506
  /* @__PURE__ */ n(
1507
1507
  "div",
1508
1508
  {
1509
- className: y("str-chat__message-inner", {
1510
- "str-chat__simple-message--error-failed": Q || lt
1509
+ className: C("str-chat__message-inner", {
1510
+ "str-chat__simple-message--error-failed": ee || lt
1511
1511
  }),
1512
1512
  "data-testid": "message-inner",
1513
- onClick: ie,
1514
- onKeyDown: ie,
1515
- role: ie ? "button" : void 0,
1516
- tabIndex: ie ? 0 : void 0,
1513
+ onClick: oe,
1514
+ onKeyDown: oe,
1515
+ role: oe ? "button" : void 0,
1516
+ tabIndex: oe ? 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 va = ({ 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
- de ? /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
1524
+ ue ? /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
1525
1525
  z && /* @__PURE__ */ n(z, {}),
1526
1526
  /* @__PURE__ */ n(
1527
1527
  Ot.Sent,
@@ -1549,7 +1549,7 @@ const va = ({ size: e = 15 }) => /* @__PURE__ */ n(
1549
1549
  isUnlocking: I(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
- onDownloadClick: () => P == null ? void 0 : P(c, x)
1552
+ onDownloadClick: () => D == null ? void 0 : D(c, x)
1553
1553
  }
1554
1554
  ),
1555
1555
  z && /* @__PURE__ */ n(z, {})
@@ -1557,7 +1557,7 @@ const va = ({ 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: re,
1560
+ message: ie,
1561
1561
  renderText: g
1562
1562
  }
1563
1563
  ) })
@@ -1565,79 +1565,79 @@ const va = ({ 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
- ue && !mt && /* @__PURE__ */ n(
1568
+ me && !mt && /* @__PURE__ */ n(
1569
1569
  Pe,
1570
1570
  {
1571
1571
  message: c,
1572
1572
  hasAttachment: Re,
1573
- isMyMessage: de
1573
+ isMyMessage: ue
1574
1574
  }
1575
1575
  ),
1576
- ct && /* @__PURE__ */ n(qn, { poll: ct }),
1577
- K != null && K.length && !c.quoted_message ? /* @__PURE__ */ n(
1576
+ ct && /* @__PURE__ */ n(Wn, { poll: ct }),
1577
+ J != null && J.length && !c.quoted_message ? /* @__PURE__ */ n(
1578
1578
  A,
1579
1579
  {
1580
1580
  actionHandler: l,
1581
- attachments: K
1581
+ attachments: J
1582
1582
  }
1583
1583
  ) : null,
1584
- _e ? /* @__PURE__ */ n(
1584
+ K ? /* @__PURE__ */ n(
1585
1585
  w,
1586
1586
  {
1587
- message: re,
1587
+ message: ie,
1588
1588
  renderText: g
1589
1589
  }
1590
1590
  ) : /* @__PURE__ */ n(
1591
1591
  Tt,
1592
1592
  {
1593
- message: re,
1593
+ message: ie,
1594
1594
  renderText: g
1595
1595
  }
1596
1596
  ),
1597
- /* @__PURE__ */ n(Wn, {})
1597
+ /* @__PURE__ */ n(Xn, {})
1598
1598
  ] }) })
1599
1599
  }
1600
1600
  ),
1601
1601
  !ut && !dt && /* @__PURE__ */ h("div", { className: "str-chat__message-footer", children: [
1602
- (!ue || mt) && /* @__PURE__ */ n(
1602
+ (!me || mt) && /* @__PURE__ */ n(
1603
1603
  Pe,
1604
1604
  {
1605
1605
  message: c,
1606
1606
  hasAttachment: Re,
1607
- isMyMessage: de
1607
+ isMyMessage: ue
1608
1608
  }
1609
1609
  ),
1610
- s && ue && /* @__PURE__ */ n(
1610
+ s && me && /* @__PURE__ */ n(
1611
1611
  ya,
1612
1612
  {
1613
1613
  selected: S,
1614
1614
  onVoteUp: R,
1615
- onVoteDown: $
1615
+ onVoteDown: B
1616
1616
  }
1617
1617
  )
1618
1618
  ] }),
1619
- J && /* @__PURE__ */ n(
1620
- V,
1619
+ Z && /* @__PURE__ */ n(
1620
+ W,
1621
1621
  {
1622
1622
  onClick: d,
1623
1623
  reply_count: c.reply_count
1624
1624
  }
1625
1625
  ),
1626
- se && /* @__PURE__ */ n(X, {})
1626
+ ae && /* @__PURE__ */ n(q, {})
1627
1627
  ]
1628
1628
  },
1629
1629
  c.id
1630
1630
  )
1631
1631
  ] });
1632
- }, ka = j.memo(
1632
+ }, ka = F.memo(
1633
1633
  Ca,
1634
- (e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 : An(e, t)
1634
+ (e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 : Mn(e, t)
1635
1635
  ), Ea = (e) => {
1636
- const t = pe("CustomMessage");
1636
+ const t = ve("CustomMessage");
1637
1637
  return /* @__PURE__ */ n(ka, { ...t, ...e });
1638
1638
  }, Ia = () => {
1639
1639
  var s;
1640
- const { handleDelete: e, message: t } = pe("CustomMessageActions");
1640
+ const { handleDelete: e, message: t } = ve("CustomMessageActions");
1641
1641
  return ((s = t.metadata) == null ? void 0 : s.payment_status) === "paid" ? null : /* @__PURE__ */ n(
1642
1642
  Ht,
1643
1643
  {
@@ -1649,7 +1649,7 @@ const va = ({ size: e = 15 }) => /* @__PURE__ */ n(
1649
1649
  }
1650
1650
  );
1651
1651
  }, Sa = () => {
1652
- const { handleFlag: e } = pe("CustomMessageActions");
1652
+ const { handleFlag: e } = ve("CustomMessageActions");
1653
1653
  return /* @__PURE__ */ n(
1654
1654
  Ht,
1655
1655
  {
@@ -1662,7 +1662,7 @@ const va = ({ size: e = 15 }) => /* @__PURE__ */ n(
1662
1662
  );
1663
1663
  }, Ta = () => {
1664
1664
  var t;
1665
- const { message: e } = pe("CustomMessageActions");
1665
+ const { message: e } = ve("CustomMessageActions");
1666
1666
  return ((t = e.metadata) == null ? void 0 : t.custom_type) !== "MESSAGE_ATTACHMENT" ? null : /* @__PURE__ */ n(
1667
1667
  Ds,
1668
1668
  {
@@ -1717,7 +1717,7 @@ const va = ({ size: e = 15 }) => /* @__PURE__ */ n(
1717
1717
  (t) => Rt.previewIsLoaded(t) || Rt.previewIsLoading(t)
1718
1718
  )
1719
1719
  }), Ra = () => {
1720
- const { linkPreviewsManager: e } = Xn(), { linkPreviews: t } = Kn(
1720
+ const { linkPreviewsManager: e } = Kn(), { linkPreviews: t } = Jn(
1721
1721
  e.state,
1722
1722
  Ma
1723
1723
  ), s = (r) => {
@@ -1731,7 +1731,7 @@ const va = ({ size: e = 15 }) => /* @__PURE__ */ n(
1731
1731
  },
1732
1732
  r.og_scrape_url
1733
1733
  )) }) : null;
1734
- }, ln = j.createContext(!1), La = ({ sendMessage: e, disabled: t, ...s }) => /* @__PURE__ */ n(
1734
+ }, La = "--messaging-channel-input-spacer-height", Da = typeof window > "u" ? H : In, ln = F.createContext(!1), Pa = ({ sendMessage: e, disabled: t, ...s }) => /* @__PURE__ */ n(
1735
1735
  "button",
1736
1736
  {
1737
1737
  ...s,
@@ -1741,18 +1741,18 @@ const va = ({ size: e = 15 }) => /* @__PURE__ */ n(
1741
1741
  onClick: e,
1742
1742
  children: /* @__PURE__ */ n(Ts, { weight: "bold", className: "size-4" })
1743
1743
  }
1744
- ), Da = () => {
1745
- const e = Te(ln), { handleSubmit: t } = Zn(), s = Qn(), a = e || !s, {
1746
- SendButton: r = La,
1747
- AttachmentPreviewList: i = es
1744
+ ), Oa = () => {
1745
+ const e = Te(ln), { handleSubmit: t } = Qn(), s = es(), a = e || !s, {
1746
+ SendButton: r = Pa,
1747
+ AttachmentPreviewList: i = ts
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(ts, {}),
1750
+ /* @__PURE__ */ n(ns, {}),
1751
1751
  /* @__PURE__ */ n(Ra, {}),
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
- ns,
1755
+ ss,
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,21 +1775,40 @@ const va = ({ size: e = 15 }) => /* @__PURE__ */ n(
1775
1775
  )
1776
1776
  ] })
1777
1777
  ] });
1778
- }, Pa = ({
1778
+ }, za = ({
1779
1779
  className: e,
1780
1780
  renderActions: t,
1781
1781
  renderFooter: s,
1782
1782
  disabled: a = !1,
1783
- disabledReason: r
1783
+ disabledReason: r,
1784
+ spacerTargetRef: i
1784
1785
  }) => {
1785
- var d;
1786
- const { channel: i } = ce(), o = ((d = i == null ? void 0 : i.data) == null ? void 0 : d.frozen) === !0;
1787
- if (a)
1788
- return /* @__PURE__ */ h(te, { children: [
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 (Da(() => {
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
+ La,
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: [
1789
1808
  /* @__PURE__ */ n(
1790
1809
  "div",
1791
1810
  {
1792
- className: y(
1811
+ className: C(
1793
1812
  "messaging-composer-locked-panel flex w-full flex-col items-center justify-center gap-3",
1794
1813
  e
1795
1814
  ),
@@ -1798,33 +1817,40 @@ const va = ({ size: e = 15 }) => /* @__PURE__ */ n(
1798
1817
  ),
1799
1818
  s == null ? void 0 : s()
1800
1819
  ] });
1801
- const l = t == null ? void 0 : t();
1802
- return /* @__PURE__ */ h("div", { className: y("flex flex-col gap-4", e), children: [
1803
- /* @__PURE__ */ h(
1804
- "div",
1805
- {
1806
- inert: o ? "" : void 0,
1807
- "aria-disabled": o || void 0,
1808
- className: "message-input flex items-end gap-4 aria-disabled:opacity-40",
1809
- children: [
1810
- l && /* @__PURE__ */ n("div", { className: "flex h-12 shrink-0 items-center justify-center", children: l }),
1811
- /* @__PURE__ */ n(ln.Provider, { value: o, children: /* @__PURE__ */ n(Jn, { Input: Da }) })
1812
- ]
1813
- }
1814
- ),
1815
- s == null ? void 0 : s()
1816
- ] });
1817
- }, Oa = [
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: Oa }) })
1836
+ ]
1837
+ }
1838
+ ),
1839
+ s == null ? void 0 : s()
1840
+ ]
1841
+ }
1842
+ );
1843
+ }, $a = [
1818
1844
  "SYSTEM_DM_AGENT_PAUSED",
1819
1845
  "SYSTEM_DM_AGENT_RESUMED"
1820
- ], za = {
1846
+ ], Fa = {
1821
1847
  SYSTEM_DM_AGENT_PAUSED: "DM Agent has left the conversation",
1822
1848
  SYSTEM_DM_AGENT_RESUMED: "DM Agent has rejoined the conversation"
1823
- }, $a = [
1849
+ }, Ba = [
1824
1850
  "SYSTEM_AGE_SAFETY_BLOCKED"
1825
- ], Fa = {
1851
+ ], Ua = {
1826
1852
  SYSTEM_AGE_SAFETY_BLOCKED: "This user isn’t able to reply because they don’t meet our age safety guidelines."
1827
- }, Oe = "age safety guidelines.", Ba = "https://linktr.ee/s/about/contact", $t = (e) => Oa.includes(e), Ua = (e) => $a.includes(e), ja = (e) => {
1853
+ }, Oe = "age safety guidelines.", ja = "https://linktr.ee/s/about/contact", $t = (e) => $a.includes(e), Va = (e) => Ba.includes(e), Ga = (e) => {
1828
1854
  var a;
1829
1855
  const t = (a = e.metadata) == null ? void 0 : a.custom_type;
1830
1856
  if ($t(t))
@@ -1832,7 +1858,7 @@ const va = ({ size: e = 15 }) => /* @__PURE__ */ n(
1832
1858
  kind: "dm-agent",
1833
1859
  type: t
1834
1860
  };
1835
- if (Ua(t))
1861
+ if (Va(t))
1836
1862
  return {
1837
1863
  kind: "age-safety",
1838
1864
  type: t
@@ -1843,17 +1869,17 @@ const va = ({ size: e = 15 }) => /* @__PURE__ */ n(
1843
1869
  kind: "dm-agent",
1844
1870
  type: s
1845
1871
  };
1846
- }, Va = (e) => {
1872
+ }, Ha = (e) => {
1847
1873
  const t = e.indexOf(Oe);
1848
1874
  if (t === -1)
1849
1875
  return e;
1850
1876
  const s = t + Oe.length;
1851
- return /* @__PURE__ */ h(te, { children: [
1877
+ return /* @__PURE__ */ h(ne, { children: [
1852
1878
  e.slice(0, t),
1853
1879
  /* @__PURE__ */ n(
1854
1880
  "a",
1855
1881
  {
1856
- href: Ba,
1882
+ href: ja,
1857
1883
  target: "_blank",
1858
1884
  rel: "noopener noreferrer",
1859
1885
  className: "mes-age-safety-system-message__emphasis font-medium text-inherit underline",
@@ -1862,13 +1888,13 @@ const va = ({ size: e = 15 }) => /* @__PURE__ */ n(
1862
1888
  ),
1863
1889
  e.slice(s)
1864
1890
  ] });
1865
- }, Ga = (e) => {
1891
+ }, Ya = (e) => {
1866
1892
  var a, r;
1867
- const t = e.message.hide_date === !0, s = ja(
1893
+ const t = e.message.hide_date === !0, s = Ga(
1868
1894
  e.message
1869
1895
  );
1870
1896
  if ((s == null ? void 0 : s.kind) === "dm-agent") {
1871
- const i = ((a = e.message.text) == null ? void 0 : a.trim()) || za[s.type];
1897
+ const i = ((a = e.message.text) == null ? void 0 : a.trim()) || Fa[s.type];
1872
1898
  return /* @__PURE__ */ h("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
1873
1899
  /* @__PURE__ */ h(
1874
1900
  "div",
@@ -1894,7 +1920,7 @@ const va = ({ size: e = 15 }) => /* @__PURE__ */ n(
1894
1920
  ] });
1895
1921
  }
1896
1922
  if ((s == null ? void 0 : s.kind) === "age-safety") {
1897
- const i = ((r = e.message.text) == null ? void 0 : r.trim()) || Fa[s.type];
1923
+ const i = ((r = e.message.text) == null ? void 0 : r.trim()) || Ua[s.type];
1898
1924
  return /* @__PURE__ */ h("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
1899
1925
  /* @__PURE__ */ h(
1900
1926
  "div",
@@ -1913,7 +1939,7 @@ const va = ({ size: e = 15 }) => /* @__PURE__ */ n(
1913
1939
  "data-testid": "age-safety-system-message-icon"
1914
1940
  }
1915
1941
  ),
1916
- /* @__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: Va(i) }) })
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: Ha(i) }) })
1917
1943
  ]
1918
1944
  }
1919
1945
  ),
@@ -1938,15 +1964,15 @@ const va = ({ size: e = 15 }) => /* @__PURE__ */ n(
1938
1964
  begin: `${120 * t}ms`,
1939
1965
  repeatCount: "indefinite"
1940
1966
  }
1941
- ) }), Ha = /* @__PURE__ */ new Set([
1967
+ ) }), qa = /* @__PURE__ */ new Set([
1942
1968
  De.Thinking,
1943
1969
  De.Generating,
1944
1970
  De.ExternalSources
1945
- ]), Ya = ({ threadList: e }) => {
1971
+ ]), Wa = ({ threadList: e }) => {
1946
1972
  var g, p;
1947
- const { channel: t, channelConfig: s, thread: a } = ce(), { client: r } = Ye(), { typing: i = {} } = ss(), { aiState: o } = as(t), l = Te(cn);
1948
- if (!e && l && Ha.has(o)) {
1949
- const v = qa(t, (g = r.user) == null ? void 0 : g.id);
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 && qa.has(o)) {
1975
+ const v = Xa(t, (g = r.user) == null ? void 0 : g.id);
1950
1976
  return /* @__PURE__ */ n(
1951
1977
  Ft,
1952
1978
  {
@@ -1995,7 +2021,7 @@ const va = ({ size: e = 15 }) => /* @__PURE__ */ n(
1995
2021
  style: { insetInlineStart: 0, insetInlineEnd: "auto" },
1996
2022
  children: [
1997
2023
  /* @__PURE__ */ n("div", { className: "shrink-0", "aria-hidden": "true", children: /* @__PURE__ */ n(
1998
- ae,
2024
+ re,
1999
2025
  {
2000
2026
  id: e,
2001
2027
  name: t,
@@ -2023,7 +2049,7 @@ const va = ({ size: e = 15 }) => /* @__PURE__ */ n(
2023
2049
  ]
2024
2050
  }
2025
2051
  );
2026
- function qa(e, t) {
2052
+ function Xa(e, t) {
2027
2053
  var a;
2028
2054
  const s = ((a = e == null ? void 0 : e.state) == null ? void 0 : a.members) ?? {};
2029
2055
  for (const r of Object.values(s)) {
@@ -2032,10 +2058,10 @@ function qa(e, t) {
2032
2058
  return i;
2033
2059
  }
2034
2060
  }
2035
- const Wa = () => null, Xa = ({ className: e, message: t }) => /* @__PURE__ */ h(
2061
+ const Ka = () => null, Ja = ({ className: e, message: t }) => /* @__PURE__ */ h(
2036
2062
  "div",
2037
2063
  {
2038
- className: y("flex items-center justify-center h-full", e),
2064
+ className: C("flex items-center justify-center h-full", e),
2039
2065
  children: [
2040
2066
  /* @__PURE__ */ h("svg", { viewBox: "0 0 100 100", className: "size-8 fill-pebble", stroke: "none", children: [
2041
2067
  /* @__PURE__ */ n("circle", { cx: "6", cy: "50", r: "6", children: /* @__PURE__ */ n(
@@ -2075,12 +2101,12 @@ const Wa = () => null, Xa = ({ className: e, message: t }) => /* @__PURE__ */ h(
2075
2101
  t && /* @__PURE__ */ n("span", { className: "text-stone", children: t })
2076
2102
  ]
2077
2103
  }
2078
- ), 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: [
2079
- /* @__PURE__ */ n(Xa, { className: "w-6 h-6" }),
2104
+ ), Ee = F.memo(() => /* @__PURE__ */ n("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ h("div", { className: "flex items-center", children: [
2105
+ /* @__PURE__ */ n(Ja, { className: "w-6 h-6" }),
2080
2106
  /* @__PURE__ */ n("span", { className: "text-sm text-stone", children: "Loading messages" })
2081
2107
  ] }) }));
2082
2108
  Ee.displayName = "LoadingState";
2083
- 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", Ka = ({
2109
+ 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", Za = ({
2084
2110
  onBack: e,
2085
2111
  showBackButton: t,
2086
2112
  showStarButton: s = !1,
@@ -2096,17 +2122,17 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2096
2122
  customChannelActions: f,
2097
2123
  showActionsMenu: c = !0
2098
2124
  }) => {
2099
- var E, M, P, k, T;
2100
- const { channel: g } = ce(), p = j.useMemo(() => {
2101
- var R, $;
2125
+ var E, M, D, k, T;
2126
+ const { channel: g } = de(), p = F.useMemo(() => {
2127
+ var R, B;
2102
2128
  const _ = (R = g._client) == null ? void 0 : R.userID;
2103
- return _ ? Object.values((($ = g.state) == null ? void 0 : $.members) || {}).find(
2129
+ return _ ? Object.values(((B = g.state) == null ? void 0 : B.members) || {}).find(
2104
2130
  (A) => {
2105
- var D;
2106
- return ((D = A.user) == null ? void 0 : D.id) && A.user.id !== _;
2131
+ var P;
2132
+ return ((P = A.user) == null ? void 0 : P.id) && A.user.id !== _;
2107
2133
  }
2108
2134
  ) : void 0;
2109
- }, [(E = g._client) == null ? void 0 : E.userID, (M = g.state) == null ? void 0 : M.members]), v = Wt(p == null ? void 0 : p.user), N = (P = p == null ? void 0 : p.user) == null ? void 0 : P.image, x = qt(g), I = async () => {
2135
+ }, [(E = g._client) == null ? void 0 : E.userID, (M = g.state) == null ? void 0 : M.members]), v = Wt(p == null ? void 0 : p.user), N = (D = p == null ? void 0 : p.user) == null ? void 0 : D.image, x = qt(g), I = async () => {
2110
2136
  try {
2111
2137
  x ? await g.unpin() : await g.pin();
2112
2138
  } catch (_) {
@@ -2121,8 +2147,8 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2121
2147
  /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: t && /* @__PURE__ */ n(
2122
2148
  "button",
2123
2149
  {
2124
- className: y(
2125
- oe,
2150
+ className: C(
2151
+ le,
2126
2152
  "messaging-channel-view-back-button-mobile bg-[#F1F0EE]"
2127
2153
  ),
2128
2154
  onClick: e || (() => {
@@ -2134,7 +2160,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2134
2160
  ) }),
2135
2161
  /* @__PURE__ */ h("div", { className: "flex flex-col gap-1 items-center", children: [
2136
2162
  /* @__PURE__ */ n(
2137
- ae,
2163
+ re,
2138
2164
  {
2139
2165
  id: ((k = p == null ? void 0 : p.user) == null ? void 0 : k.id) || g.id || "unknown",
2140
2166
  name: v,
@@ -2154,14 +2180,14 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2154
2180
  s && /* @__PURE__ */ n(
2155
2181
  "button",
2156
2182
  {
2157
- className: oe,
2183
+ className: le,
2158
2184
  onClick: I,
2159
2185
  type: "button",
2160
2186
  "aria-label": x ? "Unstar conversation" : "Star conversation",
2161
2187
  children: /* @__PURE__ */ n(
2162
2188
  Fe,
2163
2189
  {
2164
- className: y("size-5", {
2190
+ className: C("size-5", {
2165
2191
  "text-yellow-600": x,
2166
2192
  "text-black/90": !x
2167
2193
  }),
@@ -2184,7 +2210,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2184
2210
  onBlockParticipantClick: b,
2185
2211
  onReportParticipantClick: u,
2186
2212
  customChannelActions: f,
2187
- triggerClassName: y(oe, "bg-[#F1F0EE]")
2213
+ triggerClassName: C(le, "bg-[#F1F0EE]")
2188
2214
  }
2189
2215
  )
2190
2216
  ] })
@@ -2194,8 +2220,8 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2194
2220
  t && e && /* @__PURE__ */ n(
2195
2221
  "button",
2196
2222
  {
2197
- className: y(
2198
- oe,
2223
+ className: C(
2224
+ le,
2199
2225
  "messaging-channel-view-back-button-desktop"
2200
2226
  ),
2201
2227
  type: "button",
@@ -2205,7 +2231,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2205
2231
  }
2206
2232
  ),
2207
2233
  /* @__PURE__ */ n(
2208
- ae,
2234
+ re,
2209
2235
  {
2210
2236
  id: ((T = p == null ? void 0 : p.user) == null ? void 0 : T.id) || g.id || "unknown",
2211
2237
  name: v,
@@ -2227,14 +2253,14 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2227
2253
  s && /* @__PURE__ */ n(
2228
2254
  "button",
2229
2255
  {
2230
- className: oe,
2256
+ className: le,
2231
2257
  onClick: I,
2232
2258
  type: "button",
2233
2259
  "aria-label": x ? "Unstar conversation" : "Star conversation",
2234
2260
  children: /* @__PURE__ */ n(
2235
2261
  Fe,
2236
2262
  {
2237
- className: y("size-6", {
2263
+ className: C("size-6", {
2238
2264
  "text-yellow-600": x,
2239
2265
  "text-black/90": !x
2240
2266
  }),
@@ -2257,13 +2283,13 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2257
2283
  onBlockParticipantClick: b,
2258
2284
  onReportParticipantClick: u,
2259
2285
  customChannelActions: f,
2260
- triggerClassName: oe
2286
+ triggerClassName: le
2261
2287
  }
2262
2288
  )
2263
2289
  ] })
2264
2290
  ] })
2265
2291
  ] });
2266
- }, Ja = ({
2292
+ }, Qa = ({
2267
2293
  onBack: e,
2268
2294
  showBackButton: t,
2269
2295
  renderMessageInputActions: s,
@@ -2286,55 +2312,55 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2286
2312
  renderMessage: I,
2287
2313
  dmAgentEnabled: E = !1,
2288
2314
  viewerLanguage: M,
2289
- showChannelInfo: P = !0
2315
+ showChannelInfo: D = !0
2290
2316
  }) => {
2291
- var D, z, G, F, B, X;
2292
- const { channel: k } = ce(), T = j.useMemo(() => {
2293
- var w, C;
2294
- const V = (w = k._client) == null ? void 0 : w.userID;
2295
- return V ? Object.values(((C = k.state) == null ? void 0 : C.members) || {}).find(
2296
- (U) => {
2297
- var q;
2298
- return ((q = U.user) == null ? void 0 : q.id) && U.user.id !== V;
2317
+ var z, V, U, j, q, W;
2318
+ const { channel: k } = de(), T = F.useMemo(() => {
2319
+ var y, $;
2320
+ const L = (y = k._client) == null ? void 0 : y.userID;
2321
+ return L ? Object.values((($ = k.state) == null ? void 0 : $.members) || {}).find(
2322
+ (X) => {
2323
+ var K;
2324
+ return ((K = X.user) == null ? void 0 : K.id) && X.user.id !== L;
2299
2325
  }
2300
2326
  ) : void 0;
2301
- }, [(D = k._client) == null ? void 0 : D.userID, (z = k.state) == null ? void 0 : z.members]), _ = j.useMemo(() => {
2302
- var w, C;
2303
- const V = (w = k._client) == null ? void 0 : w.userID;
2304
- return V ? Object.values(((C = k.state) == null ? void 0 : C.members) || {}).find((U) => {
2305
- var q;
2306
- return ((q = U.user) == null ? void 0 : q.id) === V;
2327
+ }, [(z = k._client) == null ? void 0 : z.userID, (V = k.state) == null ? void 0 : V.members]), _ = F.useMemo(() => {
2328
+ var y, $;
2329
+ const L = (y = k._client) == null ? void 0 : y.userID;
2330
+ return L ? Object.values((($ = k.state) == null ? void 0 : $.members) || {}).find((X) => {
2331
+ var K;
2332
+ return ((K = X.user) == null ? void 0 : K.id) === L;
2307
2333
  }) : void 0;
2308
- }, [(G = k._client) == null ? void 0 : G.userID, (F = k.state) == null ? void 0 : F.members]), S = ((B = _ == null ? void 0 : _.user) == null ? void 0 : B.is_account) ?? (_ == null ? void 0 : _.is_account), R = ((X = T == null ? void 0 : T.user) == null ? void 0 : X.is_account) ?? (T == null ? void 0 : T.is_account), $ = E && S === !1 && R === !0, A = W(
2309
- (V) => {
2310
- const { message: L } = pe("ChannelView"), w = /* @__PURE__ */ n(
2334
+ }, [(U = k._client) == null ? void 0 : U.userID, (j = k.state) == null ? void 0 : j.members]), S = ((q = _ == null ? void 0 : _.user) == null ? void 0 : q.is_account) ?? (_ == null ? void 0 : _.is_account), R = ((W = T == null ? void 0 : T.user) == null ? void 0 : W.is_account) ?? (T == null ? void 0 : T.is_account), B = E && S === !1 && R === !0, A = G(null), P = Y(
2335
+ (L) => {
2336
+ const { message: w } = ve("ChannelView"), y = /* @__PURE__ */ n(
2311
2337
  Ea,
2312
2338
  {
2313
- ...V,
2339
+ ...L,
2314
2340
  chatbotVotingEnabled: v,
2315
2341
  viewerLanguage: M
2316
2342
  }
2317
2343
  );
2318
- return !I || !L ? w : I(w, L);
2344
+ return !I || !w ? y : I(y, w);
2319
2345
  },
2320
2346
  [v, I, M]
2321
2347
  );
2322
- return /* @__PURE__ */ n(te, { children: /* @__PURE__ */ n(
2323
- is,
2348
+ return /* @__PURE__ */ n(ne, { children: /* @__PURE__ */ n(
2349
+ os,
2324
2350
  {
2325
2351
  overrides: {
2326
- Message: A,
2352
+ Message: P,
2327
2353
  MessageActions: Ta
2328
2354
  },
2329
- children: /* @__PURE__ */ h(os, { children: [
2355
+ children: /* @__PURE__ */ h(ls, { children: [
2330
2356
  /* @__PURE__ */ n("div", { children: /* @__PURE__ */ n(
2331
- Ka,
2357
+ Za,
2332
2358
  {
2333
2359
  onBack: e,
2334
2360
  showBackButton: t,
2335
- showActionsMenu: P,
2361
+ showActionsMenu: D,
2336
2362
  showStarButton: p,
2337
- dmAgentEnabled: $,
2363
+ dmAgentEnabled: B,
2338
2364
  onLeaveConversation: i,
2339
2365
  onBlockParticipant: o,
2340
2366
  showDeleteConversation: l,
@@ -2346,53 +2372,42 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2346
2372
  customChannelActions: x
2347
2373
  }
2348
2374
  ) }, "lt-channel-header"),
2349
- N ? /* @__PURE__ */ n(j.Fragment, { children: N() }, "lt-channel-banner") : null,
2375
+ N ? /* @__PURE__ */ n(F.Fragment, { children: N() }, "lt-channel-banner") : null,
2350
2376
  /* @__PURE__ */ n(
2351
2377
  "div",
2352
2378
  {
2379
+ ref: A,
2353
2380
  className: "flex-1 overflow-hidden relative",
2354
2381
  children: /* @__PURE__ */ n(
2355
- ls,
2382
+ cs,
2356
2383
  {
2357
2384
  hideDeletedMessages: !0,
2358
- hideNewMessageSeparator: !1,
2359
- renderMessages: (V) => {
2360
- const L = cs(V);
2361
- return r && L.push(
2362
- /* @__PURE__ */ n("li", { children: r(k) }, "lt-channel-conversation-footer")
2363
- ), L.push(
2364
- // Message Input
2365
- /* @__PURE__ */ h(
2366
- "li",
2367
- {
2368
- className: "flex sticky bottom-0 p-4 pt-1 inset-x-0 mx-[calc(-1*var(--str-chat\\_\\_spacing-2))] md:mx-[calc(-1*min(var(--str-chat\\_\\_spacing-10),4%))]",
2369
- children: [
2370
- /* @__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%)]" }),
2371
- /* @__PURE__ */ n(
2372
- Pa,
2373
- {
2374
- className: "isolate w-full",
2375
- renderActions: () => s == null ? void 0 : s(k),
2376
- renderFooter: () => a == null ? void 0 : a(k),
2377
- disabled: c,
2378
- disabledReason: g
2379
- }
2380
- )
2381
- ]
2382
- },
2383
- "lt-channel-message-input"
2384
- )
2385
- ), L;
2386
- }
2385
+ hideNewMessageSeparator: !1
2387
2386
  }
2388
2387
  )
2389
2388
  },
2390
2389
  "lt-channel-message-list"
2391
- )
2390
+ ),
2391
+ r ? /* @__PURE__ */ n(F.Fragment, { children: r(k) }, "lt-channel-conversation-footer") : null,
2392
+ /* @__PURE__ */ h("div", { className: "absolute bottom-0 inset-x-0 flex w-full", children: [
2393
+ /* @__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%)]" }),
2394
+ /* @__PURE__ */ n(
2395
+ za,
2396
+ {
2397
+ className: "isolate w-full p-4 pt-1",
2398
+ spacerTargetRef: A,
2399
+ renderActions: () => s == null ? void 0 : s(k),
2400
+ renderFooter: () => a == null ? void 0 : a(k),
2401
+ disabled: c,
2402
+ disabledReason: g
2403
+ },
2404
+ "lt-channel-message-input"
2405
+ )
2406
+ ] })
2392
2407
  ] })
2393
2408
  }
2394
2409
  ) });
2395
- }, dn = j.memo(
2410
+ }, dn = F.memo(
2396
2411
  ({
2397
2412
  channel: e,
2398
2413
  onBack: t,
@@ -2403,7 +2418,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2403
2418
  onLeaveConversation: o,
2404
2419
  onBlockParticipant: l,
2405
2420
  className: d,
2406
- CustomChannelEmptyState: m = Wa,
2421
+ CustomChannelEmptyState: m = Ka,
2407
2422
  showDeleteConversation: b = !0,
2408
2423
  onDeleteConversationClick: u,
2409
2424
  onBlockParticipantClick: f,
@@ -2416,69 +2431,69 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2416
2431
  messageMetadata: I,
2417
2432
  onMessageSent: E,
2418
2433
  showStarButton: M = !1,
2419
- chatbotVotingEnabled: P = !1,
2434
+ chatbotVotingEnabled: D = !1,
2420
2435
  renderChannelBanner: k,
2421
2436
  customChannelActions: T,
2422
2437
  renderMessage: _,
2423
2438
  onMessageLinkClick: S,
2424
2439
  sendButton: R,
2425
- attachmentPreviewList: $,
2440
+ attachmentPreviewList: B,
2426
2441
  viewerLanguage: A,
2427
- showChannelInfo: D = !0
2442
+ showChannelInfo: P = !0
2428
2443
  }) => {
2429
- const z = W(
2430
- async (F, B, X) => {
2431
- var q;
2432
- const V = ((q = e.data) == null ? void 0 : q.chatbot_paused) === !0, L = x && !V, w = {
2433
- ...B,
2444
+ const z = Y(
2445
+ async (U, j, q) => {
2446
+ var X;
2447
+ const W = ((X = e.data) == null ? void 0 : X.chatbot_paused) === !0, L = x && !W, w = {
2448
+ ...j,
2434
2449
  ...L && { silent: !0 },
2435
2450
  ...I && {
2436
2451
  metadata: {
2437
- ...B.metadata ?? {},
2452
+ ...j.metadata ?? {},
2438
2453
  ...I
2439
2454
  }
2440
2455
  }
2441
- }, C = {
2442
- ...X,
2456
+ }, y = {
2457
+ ...q,
2443
2458
  ...L && { skip_push: !0 }
2444
- }, U = await e.sendMessage(w, C);
2445
- return E == null || E(U), U;
2459
+ }, $ = await e.sendMessage(w, y);
2460
+ return E == null || E($), $;
2446
2461
  },
2447
2462
  [e, x, I, E]
2448
- ), G = H(null);
2449
- return Y(() => {
2463
+ ), V = G(null);
2464
+ return H(() => {
2450
2465
  if (!S) return;
2451
- const F = G.current;
2452
- if (!F) return;
2453
- const B = (X) => {
2454
- const V = X.target, L = V == null ? void 0 : V.closest("a[href]"), w = L == null ? void 0 : L.getAttribute("href");
2466
+ const U = V.current;
2467
+ if (!U) return;
2468
+ const j = (q) => {
2469
+ const W = q.target, L = W == null ? void 0 : W.closest("a[href]"), w = L == null ? void 0 : L.getAttribute("href");
2455
2470
  if (!w) return;
2456
- const C = L == null ? void 0 : L.closest("[data-message-id]"), U = C == null ? void 0 : C.getAttribute("data-message-id"), q = U ? e.state.messages.find((_e) => _e.id === U) : void 0;
2457
- S(w, q);
2471
+ 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;
2472
+ S(w, X);
2458
2473
  };
2459
- return F.addEventListener("click", B), () => F.removeEventListener("click", B);
2474
+ return U.addEventListener("click", j), () => U.removeEventListener("click", j);
2460
2475
  }, [S, e]), /* @__PURE__ */ n(
2461
2476
  "div",
2462
2477
  {
2463
- ref: G,
2464
- className: y(
2478
+ ref: V,
2479
+ className: C(
2465
2480
  "messaging-channel-view h-full flex flex-col",
2466
2481
  d
2467
2482
  ),
2468
2483
  children: /* @__PURE__ */ n(cn.Provider, { value: x ?? !1, children: /* @__PURE__ */ n(
2469
- rs,
2484
+ is,
2470
2485
  {
2471
2486
  channel: e,
2472
- MessageSystem: Ga,
2487
+ MessageSystem: Ya,
2473
2488
  EmptyStateIndicator: m,
2474
2489
  LoadingIndicator: Ee,
2475
2490
  DateSeparator: js,
2476
- TypingIndicator: Ya,
2491
+ TypingIndicator: Wa,
2477
2492
  doSendMessageRequest: z,
2478
2493
  ...R ? { SendButton: R } : {},
2479
- ...$ ? { AttachmentPreviewList: $ } : {},
2494
+ ...B ? { AttachmentPreviewList: B } : {},
2480
2495
  children: /* @__PURE__ */ n(
2481
- Ja,
2496
+ Qa,
2482
2497
  {
2483
2498
  onBack: t,
2484
2499
  showBackButton: s,
@@ -2498,12 +2513,12 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2498
2513
  composerDisabledReason: N,
2499
2514
  showStarButton: M,
2500
2515
  dmAgentEnabled: x,
2501
- chatbotVotingEnabled: P,
2516
+ chatbotVotingEnabled: D,
2502
2517
  renderChannelBanner: k,
2503
2518
  customChannelActions: T,
2504
2519
  renderMessage: _,
2505
2520
  viewerLanguage: A,
2506
- showChannelInfo: D
2521
+ showChannelInfo: P
2507
2522
  }
2508
2523
  )
2509
2524
  }
@@ -2513,7 +2528,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2513
2528
  }
2514
2529
  );
2515
2530
  dn.displayName = "ChannelView";
2516
- const fe = 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: [
2531
+ const ge = F.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: [
2517
2532
  /* @__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: "⚠️" }) }),
2518
2533
  /* @__PURE__ */ n("h2", { className: "font-semibold text-charcoal mb-2", children: "Oops!" }),
2519
2534
  /* @__PURE__ */ n("p", { className: "text-stone text-sm mb-6", children: e }),
@@ -2527,8 +2542,8 @@ const fe = j.memo(({ message: e, onBack: t }) => /* @__PURE__ */ n("div", { clas
2527
2542
  }
2528
2543
  )
2529
2544
  ] }) }));
2530
- fe.displayName = "ErrorState";
2531
- const Ci = ({
2545
+ ge.displayName = "ErrorState";
2546
+ const Ei = ({
2532
2547
  capabilities: e = {},
2533
2548
  renderMessageInputActions: t,
2534
2549
  renderConversationFooter: s,
@@ -2553,94 +2568,94 @@ const Ci = ({
2553
2568
  client: I,
2554
2569
  isConnected: E,
2555
2570
  isLoading: M,
2556
- error: P,
2571
+ error: D,
2557
2572
  refreshConnection: k,
2558
2573
  service: T,
2559
2574
  debug: _
2560
- } = Ps(), [S, R] = O(null), [$, A] = O(null), [D, z] = O(!1), { showDeleteConversation: G = !0 } = e, F = H(o);
2561
- F.current = o;
2562
- const B = H(a);
2563
- B.current = a;
2564
- const X = H(null), V = H(null);
2565
- Y(() => {
2566
- V.current = S;
2567
- }, [S]), Y(() => {
2575
+ } = Ps(), [S, R] = O(null), [B, A] = O(null), [P, z] = O(!1), { showDeleteConversation: V = !0 } = e, U = G(o);
2576
+ U.current = o;
2577
+ const j = G(a);
2578
+ j.current = a;
2579
+ const q = G(null), W = G(null);
2580
+ H(() => {
2581
+ W.current = S;
2582
+ }, [S]), H(() => {
2568
2583
  if (!I || !E) return;
2569
- const C = I.userID;
2570
- if (!C) return;
2571
- const U = `${C}::${i}`;
2572
- if (X.current === U) return;
2573
- X.current = U;
2574
- const q = () => {
2575
- X.current === U && (X.current = null);
2584
+ const y = I.userID;
2585
+ if (!y) return;
2586
+ const $ = `${y}::${i}`;
2587
+ if (q.current === $) return;
2588
+ q.current = $;
2589
+ const X = () => {
2590
+ q.current === $ && (q.current = null);
2576
2591
  };
2577
2592
  (async () => {
2578
- var K, re;
2593
+ var J, ie;
2579
2594
  try {
2580
2595
  _ && console.log(
2581
2596
  "[MessagingShell] Loading initial conversation with:",
2582
2597
  i
2583
2598
  );
2584
- const J = await I.queryChannels(
2599
+ const Z = await I.queryChannels(
2585
2600
  {
2586
2601
  type: "messaging",
2587
- members: { $eq: [C, i] }
2602
+ members: { $eq: [y, i] }
2588
2603
  },
2589
2604
  {},
2590
2605
  { limit: 1 }
2591
2606
  );
2592
- if (J.length > 0) {
2593
- R(J[0]), A(null), (K = B.current) == null || K.call(B, J[0]), _ && console.log(
2607
+ if (Z.length > 0) {
2608
+ R(Z[0]), A(null), (J = j.current) == null || J.call(j, Z[0]), _ && console.log(
2594
2609
  "[MessagingShell] Initial conversation loaded:",
2595
- J[0].id
2610
+ Z[0].id
2596
2611
  );
2597
2612
  return;
2598
2613
  }
2599
- const se = F.current;
2600
- if (!se || !T) {
2601
- q(), A("No conversation found with this account"), _ && console.log(
2614
+ const ae = U.current;
2615
+ if (!ae || !T) {
2616
+ X(), A("No conversation found with this account"), _ && console.log(
2602
2617
  "[MessagingShell] No conversation found for:",
2603
2618
  i
2604
2619
  );
2605
2620
  return;
2606
2621
  }
2607
2622
  try {
2608
- const Q = await T.startChannelWithParticipant({
2609
- id: se.id,
2610
- name: se.name,
2611
- phone: se.phone
2623
+ const ee = await T.startChannelWithParticipant({
2624
+ id: ae.id,
2625
+ name: ae.name,
2626
+ phone: ae.phone
2612
2627
  });
2613
- R(Q), A(null), (re = B.current) == null || re.call(B, Q), _ && console.log(
2628
+ R(ee), A(null), (ie = j.current) == null || ie.call(j, ee), _ && console.log(
2614
2629
  "[MessagingShell] Channel created and loaded:",
2615
- Q.id
2630
+ ee.id
2616
2631
  );
2617
- } catch (Q) {
2632
+ } catch (ee) {
2618
2633
  console.error(
2619
2634
  "[MessagingShell] Failed to create conversation:",
2620
- Q
2621
- ), q(), A("Failed to create conversation");
2635
+ ee
2636
+ ), X(), A("Failed to create conversation");
2622
2637
  }
2623
- } catch (J) {
2638
+ } catch (Z) {
2624
2639
  console.error(
2625
2640
  "[MessagingShell] Failed to load initial conversation:",
2626
- J
2627
- ), q(), V.current || A("Failed to load conversation");
2641
+ Z
2642
+ ), X(), W.current || A("Failed to load conversation");
2628
2643
  }
2629
2644
  })();
2630
2645
  }, [i, I, E, T, _]);
2631
- const L = H(r);
2646
+ const L = G(r);
2632
2647
  L.current = r;
2633
- const w = W(() => {
2634
- var C;
2635
- R(null), z(!0), (C = L.current) == null || C.call(L);
2648
+ const w = Y(() => {
2649
+ var y;
2650
+ R(null), z(!0), (y = L.current) == null || y.call(L);
2636
2651
  }, []);
2637
- return M ? /* @__PURE__ */ n(Ee, {}) : P ? /* @__PURE__ */ n(fe, { message: P, onBack: k }) : !E || !I ? /* @__PURE__ */ n(
2638
- fe,
2652
+ return M ? /* @__PURE__ */ n(Ee, {}) : D ? /* @__PURE__ */ n(ge, { message: D, onBack: k }) : !E || !I ? /* @__PURE__ */ n(
2653
+ ge,
2639
2654
  {
2640
2655
  message: "Not connected to messaging service",
2641
2656
  onBack: k
2642
2657
  }
2643
- ) : $ ? /* @__PURE__ */ n(fe, { message: $ }) : D && !S ? /* @__PURE__ */ n(fe, { 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(
2658
+ ) : B ? /* @__PURE__ */ n(ge, { message: B }) : 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(
2644
2659
  dn,
2645
2660
  {
2646
2661
  channel: S,
@@ -2650,7 +2665,7 @@ const Ci = ({
2650
2665
  onLeaveConversation: w,
2651
2666
  onBlockParticipant: w,
2652
2667
  CustomChannelEmptyState: l,
2653
- showDeleteConversation: G,
2668
+ showDeleteConversation: V,
2654
2669
  onBlockParticipantClick: d,
2655
2670
  onReportParticipantClick: m,
2656
2671
  dmAgentEnabled: b,
@@ -2665,31 +2680,31 @@ const Ci = ({
2665
2680
  S.id
2666
2681
  ) }) }) : /* @__PURE__ */ n(Ee, {});
2667
2682
  };
2668
- function Za(e) {
2683
+ function er(e) {
2669
2684
  const t = e.state.pending_messages;
2670
2685
  if (t != null && t.length)
2671
2686
  for (const s of t)
2672
2687
  e.state.addMessageSorted(s.message);
2673
2688
  }
2674
- const un = j.createContext({
2689
+ const un = F.createContext({
2675
2690
  selectedChannel: void 0,
2676
2691
  onChannelSelect: () => {
2677
2692
  },
2678
2693
  debug: !1,
2679
2694
  renderMessagePreview: void 0,
2680
2695
  viewerLanguage: void 0
2681
- }), Qa = un.Provider, er = () => j.useContext(un), tr = (e, t) => {
2696
+ }), tr = un.Provider, nr = () => F.useContext(un), sr = (e, t) => {
2682
2697
  const s = new Date(
2683
2698
  Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate())
2684
2699
  ), r = new Date(
2685
2700
  Date.UTC(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate())
2686
2701
  ).getTime() - s.getTime();
2687
2702
  return Math.floor(r / (1e3 * 60 * 60 * 24));
2688
- }, nr = (e) => {
2703
+ }, ar = (e) => {
2689
2704
  const t = /* @__PURE__ */ new Date();
2690
2705
  if (Math.floor((t.getTime() - e.getTime()) / 1e3) < 60)
2691
2706
  return "Just now";
2692
- const a = tr(e, t);
2707
+ const a = sr(e, t);
2693
2708
  return a === 0 ? e.toLocaleTimeString([], {
2694
2709
  hour: "numeric",
2695
2710
  minute: "2-digit",
@@ -2699,21 +2714,21 @@ const un = j.createContext({
2699
2714
  day: "numeric",
2700
2715
  year: "2-digit"
2701
2716
  });
2702
- }, mn = j.memo(
2717
+ }, mn = F.memo(
2703
2718
  ({ channel: e, unread: t }) => {
2704
- var P, k, T;
2719
+ var D, k, T;
2705
2720
  const {
2706
2721
  selectedChannel: s,
2707
2722
  onChannelSelect: a,
2708
2723
  debug: r,
2709
2724
  renderMessagePreview: i,
2710
2725
  viewerLanguage: o
2711
- } = er(), l = (s == null ? void 0 : s.id) === (e == null ? void 0 : e.id), d = () => {
2726
+ } = nr(), l = (s == null ? void 0 : s.id) === (e == null ? void 0 : e.id), d = () => {
2712
2727
  e && a(e);
2713
2728
  }, m = (_) => {
2714
2729
  const S = _.key === "Enter" || _.key === " ", R = _.repeat;
2715
2730
  !S || R || (_.preventDefault(), d());
2716
- }, u = Object.values(((P = e == null ? void 0 : e.state) == null ? void 0 : P.members) || {}).find(
2731
+ }, u = Object.values(((D = e == null ? void 0 : e.state) == null ? void 0 : D.members) || {}).find(
2717
2732
  (_) => {
2718
2733
  var S, R;
2719
2734
  return ((S = _.user) == null ? void 0 : S.id) && _.user.id !== ((R = e == null ? void 0 : e._client) == null ? void 0 : R.userID);
@@ -2726,18 +2741,18 @@ const un = j.createContext({
2726
2741
  if (_[R].type !== "system") return _[R];
2727
2742
  }
2728
2743
  })(), v = (() => {
2729
- var D, z, G, F;
2744
+ var P, z, V, U;
2730
2745
  const _ = Xt({
2731
2746
  message: g,
2732
2747
  viewerLanguage: o
2733
2748
  });
2734
- if (((D = g == null ? void 0 : g.metadata) == null ? void 0 : D.custom_type) === "MESSAGE_TIP") return _ ? `💵 ${_}` : "💵 Sent a tip";
2749
+ if (((P = g == null ? void 0 : g.metadata) == null ? void 0 : P.custom_type) === "MESSAGE_TIP") return _ ? `💵 ${_}` : "💵 Sent a tip";
2735
2750
  if (((z = g == null ? void 0 : g.metadata) == null ? void 0 : z.custom_type) === "MESSAGE_PAID") return _ ? `💰 ${_}` : "💰 Sent a message";
2736
- if (((G = g == null ? void 0 : g.metadata) == null ? void 0 : G.custom_type) === "MESSAGE_ATTACHMENT") return _ ? `📎 ${_}` : "📎 Sent an attachment";
2751
+ if (((V = g == null ? void 0 : g.metadata) == null ? void 0 : V.custom_type) === "MESSAGE_ATTACHMENT") return _ ? `📎 ${_}` : "📎 Sent an attachment";
2737
2752
  if (_) return _;
2738
- const A = (F = g == null ? void 0 : g.attachments) == null ? void 0 : F[0];
2753
+ const A = (U = g == null ? void 0 : g.attachments) == null ? void 0 : U[0];
2739
2754
  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";
2740
- })(), N = g != null && g.created_at ? nr(new Date(g.created_at)) : "", x = g ? ke(g) : !1, I = i ? i(g, v) : `${x ? "✨ " : ""}${v}`, E = qt(e), M = t ?? 0;
2755
+ })(), N = g != null && g.created_at ? ar(new Date(g.created_at)) : "", x = g ? ke(g) : !1, I = i ? i(g, v) : `${x ? "✨ " : ""}${v}`, E = qt(e), M = t ?? 0;
2741
2756
  return r && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
2742
2757
  channelId: e == null ? void 0 : e.id,
2743
2758
  isSelected: l,
@@ -2751,7 +2766,7 @@ const un = j.createContext({
2751
2766
  tabIndex: 0,
2752
2767
  onClick: d,
2753
2768
  onKeyDown: m,
2754
- className: y(
2769
+ className: C(
2755
2770
  "group w-full px-4 py-3 transition-colors text-left max-w-full overflow-hidden focus-ring rounded-[12px] [&+&]:mt-2",
2756
2771
  {
2757
2772
  "bg-black/[0.04]": l,
@@ -2760,7 +2775,7 @@ const un = j.createContext({
2760
2775
  ),
2761
2776
  children: /* @__PURE__ */ h("div", { className: "flex items-start gap-4", children: [
2762
2777
  /* @__PURE__ */ n(
2763
- ae,
2778
+ re,
2764
2779
  {
2765
2780
  id: ((T = u == null ? void 0 : u.user) == null ? void 0 : T.id) || e.id || "unknown",
2766
2781
  name: f,
@@ -2774,7 +2789,7 @@ const un = j.createContext({
2774
2789
  /* @__PURE__ */ h(
2775
2790
  "h3",
2776
2791
  {
2777
- className: y(
2792
+ className: C(
2778
2793
  "text-sm font-medium truncate text-[#191918]"
2779
2794
  ),
2780
2795
  children: [
@@ -2796,25 +2811,25 @@ const un = j.createContext({
2796
2811
  }
2797
2812
  );
2798
2813
  mn.displayName = "CustomChannelPreview";
2799
- const sr = { last_message_at: -1 }, ar = j.memo(
2814
+ const rr = { last_message_at: -1 }, ir = F.memo(
2800
2815
  ({
2801
2816
  onChannelSelect: e,
2802
2817
  selectedChannel: t,
2803
2818
  filters: s,
2804
2819
  allowNewMessagesFromUnfilteredChannels: a = !1,
2805
2820
  channelRenderFilterFn: r,
2806
- sort: i = sr,
2821
+ sort: i = rr,
2807
2822
  className: o,
2808
2823
  customEmptyStateIndicator: l,
2809
2824
  renderMessagePreview: d,
2810
2825
  viewerLanguage: m
2811
2826
  }) => {
2812
- const b = j.useRef(0);
2827
+ const b = F.useRef(0);
2813
2828
  b.current++;
2814
- const { debug: u = !1 } = qe(), f = j.useCallback(
2829
+ const { debug: u = !1 } = qe(), f = F.useCallback(
2815
2830
  (g) => {
2816
2831
  for (const p of g)
2817
- Za(p);
2832
+ er(p);
2818
2833
  return r ? r(g) : g;
2819
2834
  },
2820
2835
  [r]
@@ -2824,7 +2839,7 @@ const sr = { last_message_at: -1 }, ar = j.memo(
2824
2839
  selectedChannelId: t == null ? void 0 : t.id,
2825
2840
  filters: s
2826
2841
  });
2827
- const c = j.useMemo(
2842
+ const c = F.useMemo(
2828
2843
  () => ({
2829
2844
  selectedChannel: t,
2830
2845
  onChannelSelect: e,
@@ -2843,11 +2858,11 @@ const sr = { last_message_at: -1 }, ar = j.memo(
2843
2858
  return /* @__PURE__ */ n(
2844
2859
  "div",
2845
2860
  {
2846
- className: y(
2861
+ className: C(
2847
2862
  "messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden",
2848
2863
  o
2849
2864
  ),
2850
- children: /* @__PURE__ */ n("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ n(Qa, { value: c, children: /* @__PURE__ */ n(
2865
+ children: /* @__PURE__ */ n("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ n(tr, { value: c, children: /* @__PURE__ */ n(
2851
2866
  ds,
2852
2867
  {
2853
2868
  filters: s,
@@ -2864,26 +2879,26 @@ const sr = { last_message_at: -1 }, ar = j.memo(
2864
2879
  );
2865
2880
  }
2866
2881
  );
2867
- ar.displayName = "ChannelList";
2868
- const rr = /^([a-z][a-z0-9+.-]*):/i, ir = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
2882
+ ir.displayName = "ChannelList";
2883
+ const or = /^([a-z][a-z0-9+.-]*):/i, lr = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
2869
2884
  function Qe(e) {
2870
2885
  if (typeof e != "string") return;
2871
2886
  const t = e.trim();
2872
2887
  if (t === "") return;
2873
- const s = rr.exec(t);
2888
+ const s = or.exec(t);
2874
2889
  if (s) {
2875
2890
  const a = s[1].toLowerCase();
2876
- return ir.has(a) ? t : void 0;
2891
+ return lr.has(a) ? t : void 0;
2877
2892
  }
2878
2893
  return t.startsWith("//") || t.startsWith("/") ? t : `https://${t}`;
2879
2894
  }
2880
- const or = {
2895
+ const cr = {
2881
2896
  dark: "bg-white text-[#121110] hover:bg-white/90",
2882
2897
  light: "bg-[#121110] text-white hover:bg-[#2a2928]"
2883
- }, lr = ({ variant: e, cta: t }) => {
2884
- const s = y(
2898
+ }, dr = ({ variant: e, cta: t }) => {
2899
+ const s = C(
2885
2900
  "mt-2 inline-flex h-10 w-full items-center justify-center rounded-full px-4 text-sm font-medium leading-none transition-colors",
2886
- or[e]
2901
+ cr[e]
2887
2902
  ), a = Qe(t.href);
2888
2903
  return a ? /* @__PURE__ */ n(
2889
2904
  "a",
@@ -2910,10 +2925,10 @@ const or = {
2910
2925
  children: t.label
2911
2926
  }
2912
2927
  );
2913
- }, cr = {
2928
+ }, ur = {
2914
2929
  dark: "text-white",
2915
2930
  light: "text-black/90"
2916
- }, dr = "text-white/30", ur = {
2931
+ }, mr = "text-white/30", hr = {
2917
2932
  dark: "text-white/55",
2918
2933
  light: "text-black/55"
2919
2934
  }, et = ({
@@ -2928,12 +2943,12 @@ const or = {
2928
2943
  }) => {
2929
2944
  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;
2930
2945
  if (!b && !u && !c && !g) return null;
2931
- const v = y(
2946
+ const v = C(
2932
2947
  "truncate text-base font-medium leading-6",
2933
- d && !t ? dr : cr[e]
2934
- ), N = y(
2948
+ d && !t ? mr : ur[e]
2949
+ ), N = C(
2935
2950
  "truncate text-xs leading-4",
2936
- ur[e]
2951
+ hr[e]
2937
2952
  );
2938
2953
  return /* @__PURE__ */ h("div", { className: "px-4 py-3", children: [
2939
2954
  /* @__PURE__ */ h("div", { className: "flex items-end gap-3", children: [
@@ -2941,7 +2956,7 @@ const or = {
2941
2956
  /* @__PURE__ */ h("div", { className: "flex min-w-0 flex-col gap-1", children: [
2942
2957
  b && /* @__PURE__ */ h("div", { className: "flex min-w-0 items-center gap-2", children: [
2943
2958
  i ? /* @__PURE__ */ n("span", { className: "shrink-0", children: i }) : null,
2944
- /* @__PURE__ */ n("p", { className: y("min-w-0", v), children: m })
2959
+ /* @__PURE__ */ n("p", { className: C("min-w-0", v), children: m })
2945
2960
  ] }),
2946
2961
  u && /* @__PURE__ */ n("p", { className: N, children: a })
2947
2962
  ] }),
@@ -2949,9 +2964,9 @@ const or = {
2949
2964
  ] }),
2950
2965
  l && /* @__PURE__ */ n("div", { className: "shrink-0", children: l })
2951
2966
  ] }),
2952
- o && /* @__PURE__ */ n(lr, { variant: e, cta: o })
2967
+ o && /* @__PURE__ */ n(dr, { variant: e, cta: o })
2953
2968
  ] });
2954
- }, mr = y(
2969
+ }, fr = C(
2955
2970
  "relative block w-[280px] select-none overflow-hidden rounded-md",
2956
2971
  // 1px hairline border that sits flush with the card chrome — matches
2957
2972
  // the messaging design system's "small border around link attachments"
@@ -2969,8 +2984,8 @@ const or = {
2969
2984
  bgClassName: l,
2970
2985
  "data-testid": d
2971
2986
  }) => {
2972
- const m = s != null || a != null, b = y(
2973
- mr,
2987
+ const m = s != null || a != null, b = C(
2988
+ fr,
2974
2989
  l ?? (e === "dark" ? "bg-[#121110]" : "bg-white"),
2975
2990
  // `focus-ring` is a design-system utility from the component-library
2976
2991
  // tailwind preset — outline-none + a black 2px focus-visible ring
@@ -3000,7 +3015,7 @@ const or = {
3000
3015
  onClick: a,
3001
3016
  "aria-label": r,
3002
3017
  "data-testid": d,
3003
- className: y(b, "text-left"),
3018
+ className: C(b, "text-left"),
3004
3019
  children: [
3005
3020
  t,
3006
3021
  u
@@ -3018,15 +3033,15 @@ const or = {
3018
3033
  ]
3019
3034
  }
3020
3035
  );
3021
- }, hr = {
3036
+ }, gr = {
3022
3037
  dark: "bg-white/10",
3023
3038
  light: "bg-black/5"
3024
- }, fr = {
3039
+ }, br = {
3025
3040
  dark: "size-16 text-white/25",
3026
3041
  light: "size-16 text-black/25"
3027
- }, Me = (e, t) => !!t && !!e && ne(e) === "audio", hn = (e, t) => {
3042
+ }, Me = (e, t) => !!t && !!e && se(e) === "audio", hn = (e, t) => {
3028
3043
  if (!t || !e) return !1;
3029
- const s = ne(e);
3044
+ const s = se(e);
3030
3045
  return s === "video" || s === "audio";
3031
3046
  }, tt = "bg-[#F2F3F4]", Se = ({
3032
3047
  variant: e,
@@ -3037,7 +3052,7 @@ const or = {
3037
3052
  topLeft: i,
3038
3053
  topRight: o
3039
3054
  }) => {
3040
- const l = ne(r), d = !!s && l === "video";
3055
+ const l = se(r), d = !!s && l === "video";
3041
3056
  return Me(r, s) ? /* @__PURE__ */ n("div", { className: "p-3", children: /* @__PURE__ */ n(
3042
3057
  "audio",
3043
3058
  {
@@ -3050,7 +3065,7 @@ const or = {
3050
3065
  ) }) : /* @__PURE__ */ h(
3051
3066
  "div",
3052
3067
  {
3053
- className: y(
3068
+ className: C(
3054
3069
  "relative h-[180px] w-full overflow-hidden",
3055
3070
  d && "bg-black"
3056
3071
  ),
@@ -3077,12 +3092,12 @@ const or = {
3077
3092
  ) : /* @__PURE__ */ n(
3078
3093
  "div",
3079
3094
  {
3080
- className: y(
3095
+ className: C(
3081
3096
  "flex h-full w-full items-center justify-center",
3082
- hr[e]
3097
+ gr[e]
3083
3098
  ),
3084
- children: le(r, {
3085
- className: fr[e],
3099
+ children: ce(r, {
3100
+ className: br[e],
3086
3101
  weight: "regular"
3087
3102
  })
3088
3103
  }
@@ -3092,7 +3107,7 @@ const or = {
3092
3107
  ]
3093
3108
  }
3094
3109
  );
3095
- }, gr = ({
3110
+ }, pr = ({
3096
3111
  title: e,
3097
3112
  placeholderTitle: t,
3098
3113
  description: s,
@@ -3169,7 +3184,7 @@ const or = {
3169
3184
  ]
3170
3185
  }
3171
3186
  );
3172
- }, br = ({
3187
+ }, vr = ({
3173
3188
  title: e,
3174
3189
  description: t,
3175
3190
  url: s,
@@ -3222,7 +3237,7 @@ const or = {
3222
3237
  ]
3223
3238
  }
3224
3239
  );
3225
- }, pr = ({
3240
+ }, xr = ({
3226
3241
  title: e,
3227
3242
  placeholderTitle: t,
3228
3243
  description: s,
@@ -3269,20 +3284,20 @@ const or = {
3269
3284
  ]
3270
3285
  }
3271
3286
  );
3272
- }, ki = {
3273
- Composer: gr,
3274
- Sent: pr,
3275
- Received: br
3276
- }, vr = {
3287
+ }, Ii = {
3288
+ Composer: pr,
3289
+ Sent: xr,
3290
+ Received: vr
3291
+ }, wr = {
3277
3292
  dark: "bg-[#121110]",
3278
3293
  light: "bg-[#e9eaed]"
3279
- }, xr = {
3294
+ }, Nr = {
3280
3295
  dark: "text-white",
3281
3296
  light: "text-[#080707]"
3282
- }, wr = {
3297
+ }, _r = {
3283
3298
  dark: "border-white/[0.08]",
3284
3299
  light: "border-black/[0.08]"
3285
- }, Nr = (e) => e === "dark" ? "sender" : "receiver", _r = {
3300
+ }, yr = (e) => e === "dark" ? "sender" : "receiver", Cr = {
3286
3301
  sender: {
3287
3302
  single: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[18px]",
3288
3303
  first: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[4px]",
@@ -3295,7 +3310,7 @@ const or = {
3295
3310
  middle: "rounded-tl-[4px] rounded-tr-[18px] rounded-bl-[4px] rounded-br-[18px]",
3296
3311
  end: "rounded-tl-[4px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[18px]"
3297
3312
  }
3298
- }, ve = ({
3313
+ }, xe = ({
3299
3314
  variant: e,
3300
3315
  text: t,
3301
3316
  bordered: s = !0,
@@ -3304,13 +3319,13 @@ const or = {
3304
3319
  children: i,
3305
3320
  "data-testid": o
3306
3321
  }) => {
3307
- const l = t != null && t !== "", d = _r[Nr(e)][a];
3322
+ const l = t != null && t !== "", d = Cr[yr(e)][a];
3308
3323
  return /* @__PURE__ */ h(
3309
3324
  "div",
3310
3325
  {
3311
3326
  "data-testid": o,
3312
3327
  "data-group-position": a,
3313
- className: y(
3328
+ className: C(
3314
3329
  // 280px-wide bubble — matches the mobile chat attachment width
3315
3330
  // and keeps the document / image / audio bubbles visually
3316
3331
  // consistent inside the conversation timeline. The 8px / 16px
@@ -3319,10 +3334,10 @@ const or = {
3319
3334
  // as the surrounding `CustomMessage` text bubbles.
3320
3335
  "relative w-[280px] overflow-hidden px-2 py-2",
3321
3336
  d,
3322
- vr[e],
3323
- xr[e],
3337
+ wr[e],
3338
+ Nr[e],
3324
3339
  s && "border",
3325
- s && wr[e],
3340
+ s && _r[e],
3326
3341
  r
3327
3342
  ),
3328
3343
  children: [
@@ -3330,7 +3345,7 @@ const or = {
3330
3345
  l ? /* @__PURE__ */ n(
3331
3346
  "p",
3332
3347
  {
3333
- className: y(
3348
+ className: C(
3334
3349
  // No `text-*` / `font-*` overrides here — caption inherits
3335
3350
  // the same font family + size as `.str-chat__message-text`
3336
3351
  // so it matches the surrounding `CustomMessage` bubbles.
@@ -3347,7 +3362,7 @@ const or = {
3347
3362
  ]
3348
3363
  }
3349
3364
  );
3350
- }, xe = ({
3365
+ }, we = ({
3351
3366
  onClick: e,
3352
3367
  variant: t = "overlay",
3353
3368
  ariaLabel: s = "Dismiss attachment"
@@ -3359,22 +3374,22 @@ const or = {
3359
3374
  a.stopPropagation(), e();
3360
3375
  },
3361
3376
  "aria-label": s,
3362
- className: y(
3377
+ className: C(
3363
3378
  "flex size-6 items-center justify-center rounded-full text-white",
3364
3379
  t === "overlay" ? "bg-[#121110]/85 backdrop-blur" : "bg-white/15 hover:bg-white/25"
3365
3380
  ),
3366
3381
  children: /* @__PURE__ */ n(Ae, { className: "size-3", weight: "bold" })
3367
3382
  }
3368
- ), we = (e) => e === "received" ? "light" : "dark", Ei = ({
3383
+ ), Ne = (e) => e === "received" ? "light" : "dark", Si = ({
3369
3384
  firstOfGroup: e,
3370
3385
  endOfGroup: t,
3371
3386
  groupedByUser: s
3372
- }) => !s || e && t ? "single" : e ? "first" : t ? "end" : "middle", yr = ({
3387
+ }) => !s || e && t ? "single" : e ? "first" : t ? "end" : "middle", kr = ({
3373
3388
  src: e,
3374
3389
  mimeType: t,
3375
3390
  filename: s,
3376
3391
  items: a
3377
- }) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: s }] : [], Cr = ({ item: e, preload: t, trailingAction: s }) => /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
3392
+ }) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: s }] : [], Er = ({ item: e, preload: t, trailingAction: s }) => /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
3378
3393
  /* @__PURE__ */ n(
3379
3394
  "audio",
3380
3395
  {
@@ -3397,41 +3412,41 @@ const or = {
3397
3412
  preload: l,
3398
3413
  onDismiss: d
3399
3414
  }) => {
3400
- const m = we(e), b = e === "composer" && !!d, u = yr({ src: t, mimeType: s, filename: a, items: r });
3415
+ const m = Ne(e), b = e === "composer" && !!d, u = kr({ src: t, mimeType: s, filename: a, items: r });
3401
3416
  if (u.length === 0)
3402
3417
  return null;
3403
3418
  const f = l ?? (u.length > 1 ? "none" : "metadata");
3404
3419
  return /* @__PURE__ */ n(
3405
- ve,
3420
+ xe,
3406
3421
  {
3407
3422
  variant: m,
3408
3423
  text: i,
3409
3424
  groupPosition: o,
3410
3425
  "data-testid": "audio-attachment",
3411
3426
  children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((c, g) => /* @__PURE__ */ n(
3412
- Cr,
3427
+ Er,
3413
3428
  {
3414
3429
  item: c,
3415
3430
  preload: f,
3416
3431
  trailingAction: (
3417
3432
  // Composer only supports a single attachment, so the
3418
3433
  // dismiss control sits on the only player.
3419
- b && g === 0 ? /* @__PURE__ */ n(xe, { onClick: d, variant: "inline" }) : void 0
3434
+ b && g === 0 ? /* @__PURE__ */ n(we, { onClick: d, variant: "inline" }) : void 0
3420
3435
  )
3421
3436
  },
3422
3437
  `${c.src}-${g}`
3423
3438
  )) })
3424
3439
  }
3425
3440
  );
3426
- }, kr = (e) => /* @__PURE__ */ n(nt, { ...e, state: "composer" }), Er = (e) => /* @__PURE__ */ n(nt, { ...e, state: "sent" }), Ir = (e) => /* @__PURE__ */ n(nt, { ...e, state: "received" }), Sr = {
3427
- Composer: kr,
3428
- Sent: Er,
3429
- Received: Ir
3441
+ }, Ir = (e) => /* @__PURE__ */ n(nt, { ...e, state: "composer" }), Sr = (e) => /* @__PURE__ */ n(nt, { ...e, state: "sent" }), Tr = (e) => /* @__PURE__ */ n(nt, { ...e, state: "received" }), Ar = {
3442
+ Composer: Ir,
3443
+ Sent: Sr,
3444
+ Received: Tr
3430
3445
  };
3431
- function Tr(e) {
3446
+ function Mr(e) {
3432
3447
  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`;
3433
3448
  }
3434
- const Ar = {
3449
+ const Rr = {
3435
3450
  pdf: "PDF",
3436
3451
  doc: "DOC",
3437
3452
  xls: "XLS",
@@ -3441,7 +3456,7 @@ const Ar = {
3441
3456
  text: "TXT",
3442
3457
  markdown: "MD"
3443
3458
  };
3444
- function Mr(e, t) {
3459
+ function Lr(e, t) {
3445
3460
  if (t) {
3446
3461
  const r = t.lastIndexOf(".");
3447
3462
  if (r > 0 && r < t.length - 1) {
@@ -3450,8 +3465,8 @@ function Mr(e, t) {
3450
3465
  }
3451
3466
  }
3452
3467
  if (!e) return;
3453
- if (ne(e) === "document") {
3454
- const r = Zt(e), i = Ar[r];
3468
+ if (se(e) === "document") {
3469
+ const r = Zt(e), i = Rr[r];
3455
3470
  if (i) return i;
3456
3471
  if (e === "application/octet-stream") return;
3457
3472
  }
@@ -3459,11 +3474,11 @@ function Mr(e, t) {
3459
3474
  if (!(!a || a === "*"))
3460
3475
  return a.toUpperCase();
3461
3476
  }
3462
- function Rr(e, t, s) {
3463
- const a = Mr(e, t), r = typeof s == "number" && s > 0 ? Tr(s) : void 0;
3477
+ function Dr(e, t, s) {
3478
+ const a = Lr(e, t), r = typeof s == "number" && s > 0 ? Mr(s) : void 0;
3464
3479
  return [a, r].filter(Boolean).join(" · ") || void 0;
3465
3480
  }
3466
- function Z(e) {
3481
+ function Q(e) {
3467
3482
  try {
3468
3483
  const s = new URL(e).pathname.split("/").pop();
3469
3484
  return s && s.length > 0 ? decodeURIComponent(s) : "download";
@@ -3471,13 +3486,13 @@ function Z(e) {
3471
3486
  return "download";
3472
3487
  }
3473
3488
  }
3474
- const Lr = {
3489
+ const Pr = {
3475
3490
  dark: "text-white/55",
3476
3491
  light: "text-black/65"
3477
- }, Dr = {
3492
+ }, Or = {
3478
3493
  dark: "bg-white/10",
3479
3494
  light: "bg-black/5"
3480
- }, Pr = {
3495
+ }, zr = {
3481
3496
  dark: "text-white/85",
3482
3497
  light: "text-black/85"
3483
3498
  }, fn = ({
@@ -3490,16 +3505,16 @@ const Lr = {
3490
3505
  activateLabel: o,
3491
3506
  trailingAction: l
3492
3507
  }) => {
3493
- const d = s ?? t ?? "File", m = Rr(a, t, r), b = /* @__PURE__ */ n(
3508
+ const d = s ?? t ?? "File", m = Dr(a, t, r), b = /* @__PURE__ */ n(
3494
3509
  "div",
3495
3510
  {
3496
- className: y(
3511
+ className: C(
3497
3512
  "flex size-10 shrink-0 items-center justify-center rounded-sm",
3498
- Dr[e]
3513
+ Or[e]
3499
3514
  ),
3500
3515
  "aria-hidden": !0,
3501
- children: le(a, {
3502
- className: y("size-6", Pr[e]),
3516
+ children: ce(a, {
3517
+ className: C("size-6", zr[e]),
3503
3518
  weight: "regular"
3504
3519
  })
3505
3520
  }
@@ -3508,9 +3523,9 @@ const Lr = {
3508
3523
  m ? /* @__PURE__ */ n(
3509
3524
  "p",
3510
3525
  {
3511
- className: y(
3526
+ className: C(
3512
3527
  "truncate text-xs leading-4",
3513
- Lr[e]
3528
+ Pr[e]
3514
3529
  ),
3515
3530
  children: m
3516
3531
  }
@@ -3521,7 +3536,7 @@ const Lr = {
3521
3536
  type: "button",
3522
3537
  onClick: i,
3523
3538
  "aria-label": o,
3524
- className: y(
3539
+ className: C(
3525
3540
  "flex min-w-0 flex-1 items-center gap-3 rounded-sm text-left transition-colors",
3526
3541
  e === "dark" ? "hover:bg-white/[0.04]" : "hover:bg-black/[0.04]"
3527
3542
  ),
@@ -3530,7 +3545,7 @@ const Lr = {
3530
3545
  u
3531
3546
  ]
3532
3547
  }
3533
- ) : /* @__PURE__ */ h(te, { children: [
3548
+ ) : /* @__PURE__ */ h(ne, { children: [
3534
3549
  b,
3535
3550
  u
3536
3551
  ] });
@@ -3540,7 +3555,7 @@ const Lr = {
3540
3555
  ] });
3541
3556
  };
3542
3557
  async function gn(e, t) {
3543
- const s = t ?? Z(e);
3558
+ const s = t ?? Q(e);
3544
3559
  try {
3545
3560
  const a = await fetch(e, { mode: "cors" });
3546
3561
  if (!a.ok) throw new Error(`HTTP ${a.status}`);
@@ -3553,21 +3568,21 @@ async function gn(e, t) {
3553
3568
  }
3554
3569
  }
3555
3570
  }
3556
- const Or = ({
3571
+ const $r = ({
3557
3572
  src: e,
3558
3573
  filename: t,
3559
3574
  fileSize: s,
3560
3575
  mimeType: a,
3561
3576
  title: r,
3562
3577
  items: i
3563
- }) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: s, mimeType: a, title: r }] : [], zr = ({
3578
+ }) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: s, mimeType: a, title: r }] : [], Fr = ({
3564
3579
  variant: e,
3565
3580
  item: t,
3566
3581
  index: s,
3567
3582
  onActivate: a,
3568
3583
  trailingAction: r
3569
3584
  }) => {
3570
- const i = t.filename ?? Z(t.src);
3585
+ const i = t.filename ?? Q(t.src);
3571
3586
  return /* @__PURE__ */ n(
3572
3587
  fn,
3573
3588
  {
@@ -3594,7 +3609,7 @@ const Or = ({
3594
3609
  onClick: m,
3595
3610
  onDismiss: b
3596
3611
  }) => {
3597
- const u = we(e), f = e === "composer" && !!b, c = Or({
3612
+ const u = Ne(e), f = e === "composer" && !!b, c = $r({
3598
3613
  src: t,
3599
3614
  filename: s,
3600
3615
  fileSize: a,
@@ -3605,7 +3620,7 @@ const Or = ({
3605
3620
  if ((m == null ? void 0 : m(v)) === !1) return;
3606
3621
  const N = c[v];
3607
3622
  if (!N) return;
3608
- const x = N.filename ?? Z(N.src);
3623
+ const x = N.filename ?? Q(N.src);
3609
3624
  gn(N.src, x);
3610
3625
  };
3611
3626
  if (c.length === 0)
@@ -3613,44 +3628,44 @@ const Or = ({
3613
3628
  const p = /* @__PURE__ */ n(
3614
3629
  "span",
3615
3630
  {
3616
- className: y(
3631
+ className: C(
3617
3632
  "flex size-8 items-center justify-center rounded-full",
3618
3633
  u === "dark" ? "text-white/70" : "text-black/70"
3619
3634
  ),
3620
3635
  "aria-hidden": !0,
3621
- children: /* @__PURE__ */ n(be, { className: "size-5", weight: "bold" })
3636
+ children: /* @__PURE__ */ n(pe, { className: "size-5", weight: "bold" })
3622
3637
  }
3623
3638
  );
3624
3639
  return /* @__PURE__ */ n(
3625
- ve,
3640
+ xe,
3626
3641
  {
3627
3642
  variant: u,
3628
3643
  text: l,
3629
3644
  groupPosition: d,
3630
3645
  "data-testid": "file-attachment",
3631
3646
  children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: c.map((v, N) => /* @__PURE__ */ n(
3632
- zr,
3647
+ Fr,
3633
3648
  {
3634
3649
  variant: u,
3635
3650
  item: v,
3636
3651
  index: N,
3637
3652
  onActivate: g,
3638
- trailingAction: f && N === 0 ? /* @__PURE__ */ n(xe, { onClick: b, variant: "inline" }) : p
3653
+ trailingAction: f && N === 0 ? /* @__PURE__ */ n(we, { onClick: b, variant: "inline" }) : p
3639
3654
  },
3640
3655
  `${v.src}-${N}`
3641
3656
  )) })
3642
3657
  }
3643
3658
  );
3644
- }, $r = (e) => /* @__PURE__ */ n(st, { ...e, state: "composer" }), Fr = (e) => /* @__PURE__ */ n(st, { ...e, state: "sent" }), Br = (e) => /* @__PURE__ */ n(st, { ...e, state: "received" }), Ur = {
3645
- Composer: $r,
3646
- Sent: Fr,
3647
- Received: Br
3659
+ }, Br = (e) => /* @__PURE__ */ n(st, { ...e, state: "composer" }), Ur = (e) => /* @__PURE__ */ n(st, { ...e, state: "sent" }), jr = (e) => /* @__PURE__ */ n(st, { ...e, state: "received" }), Vr = {
3660
+ Composer: Br,
3661
+ Sent: Ur,
3662
+ Received: jr
3648
3663
  }, at = ({
3649
3664
  onPrev: e,
3650
3665
  onNext: t,
3651
3666
  prevLabel: s = "Previous",
3652
3667
  nextLabel: a = "Next"
3653
- }) => /* @__PURE__ */ h(te, { children: [
3668
+ }) => /* @__PURE__ */ h(ne, { children: [
3654
3669
  /* @__PURE__ */ n(
3655
3670
  "button",
3656
3671
  {
@@ -3680,7 +3695,7 @@ const Or = ({
3680
3695
  tone: i = "dark",
3681
3696
  onTriggered: o
3682
3697
  }) => {
3683
- const [l, d] = O(!1), m = W(
3698
+ const [l, d] = O(!1), m = Y(
3684
3699
  (c) => {
3685
3700
  c.stopPropagation(), !l && (d(!0), gn(e, t).catch(() => {
3686
3701
  }).finally(() => {
@@ -3688,7 +3703,7 @@ const Or = ({
3688
3703
  }));
3689
3704
  },
3690
3705
  [l, e, t, o]
3691
- ), b = r ?? s !== "pill", f = { className: y(
3706
+ ), b = r ?? s !== "pill", f = { className: C(
3692
3707
  s === "pill" ? "size-4" : "size-5",
3693
3708
  "shrink-0"
3694
3709
  ), weight: "bold" };
@@ -3699,7 +3714,7 @@ const Or = ({
3699
3714
  onClick: m,
3700
3715
  disabled: l,
3701
3716
  "aria-label": a,
3702
- className: y(
3717
+ className: C(
3703
3718
  "flex size-8 shrink-0 items-center justify-center rounded-full transition-colors disabled:opacity-70",
3704
3719
  {
3705
3720
  dark: "text-white/70 hover:bg-white/[0.08] hover:text-white",
@@ -3707,14 +3722,14 @@ const Or = ({
3707
3722
  }[i]
3708
3723
  ),
3709
3724
  children: l ? /* @__PURE__ */ n(
3710
- ge,
3725
+ be,
3711
3726
  {
3712
3727
  className: "size-4 animate-spin",
3713
3728
  weight: "bold",
3714
3729
  "aria-hidden": !0
3715
3730
  }
3716
3731
  ) : /* @__PURE__ */ n(
3717
- be,
3732
+ pe,
3718
3733
  {
3719
3734
  className: "size-5 shrink-0",
3720
3735
  weight: "bold",
@@ -3730,7 +3745,7 @@ const Or = ({
3730
3745
  disabled: l,
3731
3746
  "aria-label": a,
3732
3747
  className: "mes-media-viewer__action",
3733
- children: l ? /* @__PURE__ */ n(ge, { size: 20, weight: "bold", "aria-hidden": !0 }) : /* @__PURE__ */ n(be, { size: 20, weight: "bold", "aria-hidden": !0 })
3748
+ children: l ? /* @__PURE__ */ n(be, { size: 20, weight: "bold", "aria-hidden": !0 }) : /* @__PURE__ */ n(pe, { size: 20, weight: "bold", "aria-hidden": !0 })
3734
3749
  }
3735
3750
  ) : /* @__PURE__ */ h(
3736
3751
  "button",
@@ -3739,19 +3754,19 @@ const Or = ({
3739
3754
  onClick: m,
3740
3755
  disabled: l,
3741
3756
  "aria-label": b ? a : void 0,
3742
- className: y(
3757
+ className: C(
3743
3758
  "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",
3744
3759
  i === "dark" ? "bg-[#121110] text-white hover:bg-[#2a2928]" : "bg-white text-[#121110] hover:bg-white/90"
3745
3760
  ),
3746
3761
  children: [
3747
3762
  l ? /* @__PURE__ */ n(
3748
- ge,
3763
+ be,
3749
3764
  {
3750
3765
  className: "size-4 animate-spin",
3751
3766
  weight: "bold",
3752
3767
  "aria-hidden": !0
3753
3768
  }
3754
- ) : /* @__PURE__ */ n(be, { ...f, "aria-hidden": !0 }),
3769
+ ) : /* @__PURE__ */ n(pe, { ...f, "aria-hidden": !0 }),
3755
3770
  b ? null : a
3756
3771
  ]
3757
3772
  }
@@ -3762,17 +3777,17 @@ const Or = ({
3762
3777
  open: s
3763
3778
  }) => {
3764
3779
  const a = $e(t, 0, Math.max(e - 1, 0)), [r, i] = O(a);
3765
- Y(() => {
3780
+ H(() => {
3766
3781
  s && i($e(t, 0, Math.max(e - 1, 0)));
3767
- }, [s, t, e]), Y(() => {
3782
+ }, [s, t, e]), H(() => {
3768
3783
  i((d) => $e(d, 0, Math.max(e - 1, 0)));
3769
3784
  }, [e]);
3770
- const o = W(() => {
3785
+ const o = Y(() => {
3771
3786
  e <= 1 || i((d) => d <= 0 ? e - 1 : d - 1);
3772
- }, [e]), l = W(() => {
3787
+ }, [e]), l = Y(() => {
3773
3788
  e <= 1 || i((d) => d >= e - 1 ? 0 : d + 1);
3774
3789
  }, [e]);
3775
- return Y(() => {
3790
+ return H(() => {
3776
3791
  if (!s || e <= 1) return;
3777
3792
  const d = (m) => {
3778
3793
  if (m.key !== "ArrowLeft" && m.key !== "ArrowRight") return;
@@ -3790,8 +3805,8 @@ const Or = ({
3790
3805
  children: i,
3791
3806
  "data-testid": o
3792
3807
  }) => {
3793
- const l = H(null), d = H(null);
3794
- return Y(() => {
3808
+ const l = G(null), d = G(null);
3809
+ return H(() => {
3795
3810
  var f;
3796
3811
  const u = l.current;
3797
3812
  if (u) {
@@ -3881,8 +3896,8 @@ const Or = ({
3881
3896
  length: t.length,
3882
3897
  initialIndex: s,
3883
3898
  open: e
3884
- }), l = t[r], d = ee(
3885
- () => (l == null ? void 0 : l.filename) ?? (l ? Z(l.src) : "image"),
3899
+ }), l = t[r], d = te(
3900
+ () => (l == null ? void 0 : l.filename) ?? (l ? Q(l.src) : "image"),
3886
3901
  [l]
3887
3902
  );
3888
3903
  return l ? /* @__PURE__ */ h(
@@ -3927,7 +3942,7 @@ const Or = ({
3927
3942
  ]
3928
3943
  }
3929
3944
  ) : null;
3930
- }, jr = "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 = ({
3945
+ }, Gr = "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 = ({
3931
3946
  tiles: e,
3932
3947
  onTileActivate: t,
3933
3948
  maxVisible: s = 4,
@@ -3936,14 +3951,14 @@ const Or = ({
3936
3951
  const r = e.length;
3937
3952
  if (r === 0) return null;
3938
3953
  const i = e.slice(0, Math.min(r, s)), o = r - i.length, l = (d, m, b) => {
3939
- const u = y(jr, "h-full w-full");
3954
+ const u = C(Gr, "h-full w-full");
3940
3955
  return t ? /* @__PURE__ */ h(
3941
3956
  "button",
3942
3957
  {
3943
3958
  type: "button",
3944
3959
  onClick: () => t(m),
3945
3960
  "aria-label": d.ariaLabel ?? `Open media ${m + 1}`,
3946
- className: y(u, "cursor-zoom-in"),
3961
+ className: C(u, "cursor-zoom-in"),
3947
3962
  children: [
3948
3963
  d.content,
3949
3964
  b
@@ -3955,10 +3970,10 @@ const Or = ({
3955
3970
  b
3956
3971
  ] }, m);
3957
3972
  };
3958
- return i.length === 1 ? /* @__PURE__ */ n("div", { className: y("aspect-square w-full", a), children: l(i[0], 0) }) : i.length === 2 ? /* @__PURE__ */ n(
3973
+ return i.length === 1 ? /* @__PURE__ */ n("div", { className: C("aspect-square w-full", a), children: l(i[0], 0) }) : i.length === 2 ? /* @__PURE__ */ n(
3959
3974
  "div",
3960
3975
  {
3961
- className: y(
3976
+ className: C(
3962
3977
  "grid aspect-[16/9] w-full grid-cols-2 gap-0.5",
3963
3978
  a
3964
3979
  ),
@@ -3967,7 +3982,7 @@ const Or = ({
3967
3982
  ) : i.length === 3 ? /* @__PURE__ */ h(
3968
3983
  "div",
3969
3984
  {
3970
- className: y(
3985
+ className: C(
3971
3986
  "grid aspect-[4/3] w-full grid-cols-2 grid-rows-2 gap-0.5",
3972
3987
  a
3973
3988
  ),
@@ -3980,7 +3995,7 @@ const Or = ({
3980
3995
  ) : /* @__PURE__ */ n(
3981
3996
  "div",
3982
3997
  {
3983
- className: y(
3998
+ className: C(
3984
3999
  "grid aspect-[4/3] w-full grid-cols-2 grid-rows-2 gap-0.5",
3985
4000
  a
3986
4001
  ),
@@ -3997,15 +4012,15 @@ const Or = ({
3997
4012
  })
3998
4013
  }
3999
4014
  );
4000
- }, Ne = (e) => {
4001
- const [t, s] = O(!1), [a, r] = O(0), i = W(
4015
+ }, _e = (e) => {
4016
+ const [t, s] = O(!1), [a, r] = O(0), i = Y(
4002
4017
  (l) => {
4003
4018
  (e == null ? void 0 : e(l)) !== !1 && (r(l), s(!0));
4004
4019
  },
4005
4020
  [e]
4006
- ), o = W(() => s(!1), []);
4021
+ ), o = Y(() => s(!1), []);
4007
4022
  return { viewerOpen: t, viewerIndex: a, handleActivate: i, closeViewer: o };
4008
- }, Vr = (e, t, s, a) => ({
4023
+ }, Hr = (e, t, s, a) => ({
4009
4024
  ariaLabel: `Open image ${t + 1} of ${s}`,
4010
4025
  content: /* @__PURE__ */ n(
4011
4026
  "img",
@@ -4020,7 +4035,7 @@ const Or = ({
4020
4035
  className: "absolute inset-0 size-full rounded-md object-cover"
4021
4036
  }
4022
4037
  )
4023
- }), Gr = ({
4038
+ }), Yr = ({
4024
4039
  src: e,
4025
4040
  alt: t,
4026
4041
  items: s
@@ -4028,8 +4043,8 @@ const Or = ({
4028
4043
  src: s.src,
4029
4044
  alt: s.alt,
4030
4045
  filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
4031
- })), Hr = ({ src: e, alt: t, filename: s, loading: a = "lazy", onClick: r, onDismiss: i }) => {
4032
- const { viewerOpen: o, viewerIndex: l, handleActivate: d, closeViewer: m } = Ne(
4046
+ })), qr = ({ src: e, alt: t, filename: s, loading: a = "lazy", onClick: r, onDismiss: i }) => {
4047
+ const { viewerOpen: o, viewerIndex: l, handleActivate: d, closeViewer: m } = _e(
4033
4048
  r
4034
4049
  );
4035
4050
  return /* @__PURE__ */ h("div", { className: "relative w-fit", children: [
@@ -4053,7 +4068,7 @@ const Or = ({
4053
4068
  )
4054
4069
  }
4055
4070
  ),
4056
- i ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(xe, { onClick: i }) }) : null,
4071
+ i ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(we, { onClick: i }) }) : null,
4057
4072
  /* @__PURE__ */ n(
4058
4073
  pn,
4059
4074
  {
@@ -4075,16 +4090,16 @@ const Or = ({
4075
4090
  loading: l = "lazy",
4076
4091
  onClick: d
4077
4092
  }) => {
4078
- const m = Gr({ src: t, alt: s, items: r }), b = we(e), { viewerOpen: u, viewerIndex: f, handleActivate: c, closeViewer: g } = Ne(
4093
+ const m = Yr({ src: t, alt: s, items: r }), b = Ne(e), { viewerOpen: u, viewerIndex: f, handleActivate: c, closeViewer: g } = _e(
4079
4094
  d
4080
4095
  );
4081
4096
  if (m.length === 0)
4082
4097
  return null;
4083
4098
  const p = m.map(
4084
- (v, N) => Vr(v, N, m.length, l)
4099
+ (v, N) => Hr(v, N, m.length, l)
4085
4100
  );
4086
4101
  return /* @__PURE__ */ h(
4087
- ve,
4102
+ xe,
4088
4103
  {
4089
4104
  variant: b,
4090
4105
  text: i,
@@ -4104,11 +4119,11 @@ const Or = ({
4104
4119
  ]
4105
4120
  }
4106
4121
  );
4107
- }, Yr = (e) => /* @__PURE__ */ n(Hr, { ...e }), qr = (e) => /* @__PURE__ */ n(wn, { ...e, state: "sent" }), Wr = (e) => /* @__PURE__ */ n(wn, { ...e, state: "received" }), Xr = {
4108
- Composer: Yr,
4109
- Sent: qr,
4110
- Received: Wr
4111
- }, Kr = ({
4122
+ }, Wr = (e) => /* @__PURE__ */ n(qr, { ...e }), Xr = (e) => /* @__PURE__ */ n(wn, { ...e, state: "sent" }), Kr = (e) => /* @__PURE__ */ n(wn, { ...e, state: "received" }), Jr = {
4123
+ Composer: Wr,
4124
+ Sent: Xr,
4125
+ Received: Kr
4126
+ }, Zr = ({
4112
4127
  open: e,
4113
4128
  items: t,
4114
4129
  initialIndex: s = 0,
@@ -4118,11 +4133,11 @@ const Or = ({
4118
4133
  length: t.length,
4119
4134
  initialIndex: s,
4120
4135
  open: e
4121
- }), l = t[r], d = ee(
4122
- () => (l == null ? void 0 : l.filename) ?? (l ? Z(l.src) : "document"),
4136
+ }), l = t[r], d = te(
4137
+ () => (l == null ? void 0 : l.filename) ?? (l ? Q(l.src) : "document"),
4123
4138
  [l]
4124
- ), m = ee(
4125
- () => l ? Jr(l.src) : void 0,
4139
+ ), m = te(
4140
+ () => l ? Qr(l.src) : void 0,
4126
4141
  [l]
4127
4142
  );
4128
4143
  return !l || !m ? null : /* @__PURE__ */ h(
@@ -4156,23 +4171,23 @@ const Or = ({
4156
4171
  ]
4157
4172
  }
4158
4173
  );
4159
- }, Jr = (e) => {
4174
+ }, Qr = (e) => {
4160
4175
  const t = e.indexOf("#"), s = t === -1 ? e : e.slice(0, t), a = t === -1 ? "" : e.slice(t + 1), r = new URLSearchParams(a);
4161
4176
  return r.has("toolbar") || r.set("toolbar", "0"), r.has("navpanes") || r.set("navpanes", "0"), `${s}#${r.toString()}`;
4162
- }, Zr = ({
4177
+ }, ei = ({
4163
4178
  src: e,
4164
4179
  filename: t,
4165
4180
  fileSize: s,
4166
4181
  title: a,
4167
4182
  items: r
4168
- }) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: s, title: a }] : [], Qr = ({
4183
+ }) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: s, title: a }] : [], ti = ({
4169
4184
  variant: e,
4170
4185
  item: t,
4171
4186
  index: s,
4172
4187
  onActivate: a,
4173
4188
  trailingAction: r
4174
4189
  }) => {
4175
- const i = t.filename ?? Z(t.src);
4190
+ const i = t.filename ?? Q(t.src);
4176
4191
  return /* @__PURE__ */ n(
4177
4192
  fn,
4178
4193
  {
@@ -4198,17 +4213,17 @@ const Or = ({
4198
4213
  onClick: d,
4199
4214
  onDismiss: m
4200
4215
  }) => {
4201
- const b = we(e), u = Zr({ src: t, filename: s, fileSize: a, title: r, items: i }), { viewerOpen: f, viewerIndex: c, handleActivate: g, closeViewer: p } = Ne(
4216
+ const b = Ne(e), u = ei({ src: t, filename: s, fileSize: a, title: r, items: i }), { viewerOpen: f, viewerIndex: c, handleActivate: g, closeViewer: p } = _e(
4202
4217
  d
4203
4218
  ), v = e === "composer" && !!m;
4204
4219
  if (u.length === 0)
4205
4220
  return null;
4206
4221
  const N = u.map((x) => ({
4207
4222
  src: x.src,
4208
- filename: x.filename ?? Z(x.src)
4223
+ filename: x.filename ?? Q(x.src)
4209
4224
  }));
4210
4225
  return /* @__PURE__ */ h(
4211
- ve,
4226
+ xe,
4212
4227
  {
4213
4228
  variant: b,
4214
4229
  text: o,
@@ -4216,7 +4231,7 @@ const Or = ({
4216
4231
  "data-testid": "pdf-attachment",
4217
4232
  children: [
4218
4233
  /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((x, I) => {
4219
- const E = x.filename ?? Z(x.src), M = v && I === 0 ? /* @__PURE__ */ n(xe, { onClick: m, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ n(
4234
+ const E = x.filename ?? Q(x.src), M = v && I === 0 ? /* @__PURE__ */ n(we, { onClick: m, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ n(
4220
4235
  bn,
4221
4236
  {
4222
4237
  url: x.src,
@@ -4227,7 +4242,7 @@ const Or = ({
4227
4242
  }
4228
4243
  );
4229
4244
  return /* @__PURE__ */ n(
4230
- Qr,
4245
+ ti,
4231
4246
  {
4232
4247
  variant: b,
4233
4248
  item: x,
@@ -4239,7 +4254,7 @@ const Or = ({
4239
4254
  );
4240
4255
  }) }),
4241
4256
  /* @__PURE__ */ n(
4242
- Kr,
4257
+ Zr,
4243
4258
  {
4244
4259
  open: f,
4245
4260
  items: N,
@@ -4250,10 +4265,10 @@ const Or = ({
4250
4265
  ]
4251
4266
  }
4252
4267
  );
4253
- }, ei = (e) => /* @__PURE__ */ n(ot, { ...e, state: "composer" }), ti = (e) => /* @__PURE__ */ n(ot, { ...e, state: "sent" }), ni = (e) => /* @__PURE__ */ n(ot, { ...e, state: "received" }), si = {
4254
- Composer: ei,
4255
- Sent: ti,
4256
- Received: ni
4268
+ }, ni = (e) => /* @__PURE__ */ n(ot, { ...e, state: "composer" }), si = (e) => /* @__PURE__ */ n(ot, { ...e, state: "sent" }), ai = (e) => /* @__PURE__ */ n(ot, { ...e, state: "received" }), ri = {
4269
+ Composer: ni,
4270
+ Sent: si,
4271
+ Received: ai
4257
4272
  }, Nn = ({
4258
4273
  open: e,
4259
4274
  items: t,
@@ -4264,8 +4279,8 @@ const Or = ({
4264
4279
  length: t.length,
4265
4280
  initialIndex: s,
4266
4281
  open: e
4267
- }), l = t[r], d = ee(
4268
- () => (l == null ? void 0 : l.filename) ?? (l ? Z(l.src) : "video"),
4282
+ }), l = t[r], d = te(
4283
+ () => (l == null ? void 0 : l.filename) ?? (l ? Q(l.src) : "video"),
4269
4284
  [l]
4270
4285
  );
4271
4286
  return l ? /* @__PURE__ */ h(
@@ -4304,7 +4319,7 @@ const Or = ({
4304
4319
  ]
4305
4320
  }
4306
4321
  ) : null;
4307
- }, ai = () => /* @__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 }) }) }), _n = ({
4322
+ }, ii = () => /* @__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 }) }) }), _n = ({
4308
4323
  item: e,
4309
4324
  index: t
4310
4325
  }) => /* @__PURE__ */ h("div", { className: "absolute inset-0 size-full bg-[#0d0d0d]", children: [
@@ -4326,11 +4341,11 @@ const Or = ({
4326
4341
  "aria-hidden": !0
4327
4342
  }
4328
4343
  ) }),
4329
- /* @__PURE__ */ n(ai, {})
4330
- ] }), ri = (e, t, s) => ({
4344
+ /* @__PURE__ */ n(ii, {})
4345
+ ] }), oi = (e, t, s) => ({
4331
4346
  ariaLabel: `Play video ${t + 1} of ${s}`,
4332
4347
  content: /* @__PURE__ */ n(_n, { item: e, index: t })
4333
- }), ii = ({
4348
+ }), li = ({
4334
4349
  src: e,
4335
4350
  poster: t,
4336
4351
  mimeType: s,
@@ -4342,8 +4357,8 @@ const Or = ({
4342
4357
  mimeType: s.mimeType,
4343
4358
  preload: s.preload,
4344
4359
  filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
4345
- })), oi = ({ src: e, poster: t, mimeType: s, filename: a, preload: r, onClick: i, onDismiss: o }) => {
4346
- const { viewerOpen: l, viewerIndex: d, handleActivate: m, closeViewer: b } = Ne(
4360
+ })), ci = ({ src: e, poster: t, mimeType: s, filename: a, preload: r, onClick: i, onDismiss: o }) => {
4361
+ const { viewerOpen: l, viewerIndex: d, handleActivate: m, closeViewer: b } = _e(
4347
4362
  i
4348
4363
  );
4349
4364
  return /* @__PURE__ */ h("div", { className: "relative w-fit", children: [
@@ -4357,7 +4372,7 @@ const Or = ({
4357
4372
  children: /* @__PURE__ */ n(_n, { item: { src: e, poster: t, mimeType: s }, index: 0 })
4358
4373
  }
4359
4374
  ),
4360
- o ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(xe, { onClick: o }) }) : null,
4375
+ o ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(we, { onClick: o }) }) : null,
4361
4376
  /* @__PURE__ */ n(
4362
4377
  Nn,
4363
4378
  {
@@ -4383,16 +4398,16 @@ const Or = ({
4383
4398
  preload: d,
4384
4399
  onClick: m
4385
4400
  }) => {
4386
- const b = ii({ src: t, poster: s, mimeType: a, preload: d, items: i }), u = we(e), { viewerOpen: f, viewerIndex: c, handleActivate: g, closeViewer: p } = Ne(
4401
+ const b = li({ src: t, poster: s, mimeType: a, preload: d, items: i }), u = Ne(e), { viewerOpen: f, viewerIndex: c, handleActivate: g, closeViewer: p } = _e(
4387
4402
  m
4388
4403
  );
4389
4404
  if (b.length === 0)
4390
4405
  return null;
4391
4406
  const v = b.map(
4392
- (N, x) => ri(N, x, b.length)
4407
+ (N, x) => oi(N, x, b.length)
4393
4408
  );
4394
4409
  return /* @__PURE__ */ h(
4395
- ve,
4410
+ xe,
4396
4411
  {
4397
4412
  variant: u,
4398
4413
  text: o,
@@ -4419,17 +4434,17 @@ const Or = ({
4419
4434
  ]
4420
4435
  }
4421
4436
  );
4422
- }, li = (e) => /* @__PURE__ */ n(oi, { ...e }), ci = (e) => /* @__PURE__ */ n(Cn, { ...e, state: "sent" }), di = (e) => /* @__PURE__ */ n(Cn, { ...e, state: "received" }), ui = {
4423
- Composer: li,
4424
- Sent: ci,
4425
- Received: di
4426
- }, Ii = {
4427
- Image: Xr,
4428
- Video: ui,
4429
- Audio: Sr,
4430
- Pdf: si,
4431
- File: Ur
4432
- }, mi = ({
4437
+ }, di = (e) => /* @__PURE__ */ n(ci, { ...e }), ui = (e) => /* @__PURE__ */ n(Cn, { ...e, state: "sent" }), mi = (e) => /* @__PURE__ */ n(Cn, { ...e, state: "received" }), hi = {
4438
+ Composer: di,
4439
+ Sent: ui,
4440
+ Received: mi
4441
+ }, Ti = {
4442
+ Image: Jr,
4443
+ Video: hi,
4444
+ Audio: Ar,
4445
+ Pdf: ri,
4446
+ File: Vr
4447
+ }, fi = ({
4433
4448
  question: e,
4434
4449
  onClick: t,
4435
4450
  loading: s = !1,
@@ -4441,7 +4456,7 @@ const Or = ({
4441
4456
  onClick: t,
4442
4457
  disabled: s,
4443
4458
  style: { backgroundColor: "#E6E5E3" },
4444
- className: y(
4459
+ className: C(
4445
4460
  "w-full text-center p-4 rounded-xl text-charcoal font-medium transition-colors focus-ring",
4446
4461
  {
4447
4462
  "hover:brightness-95 active:brightness-90": !s,
@@ -4451,7 +4466,7 @@ const Or = ({
4451
4466
  ),
4452
4467
  children: e
4453
4468
  }
4454
- ), Si = ({
4469
+ ), Ai = ({
4455
4470
  faqs: e,
4456
4471
  onFaqClick: t,
4457
4472
  loadingFaqId: s,
@@ -4463,7 +4478,7 @@ const Or = ({
4463
4478
  const l = e.filter((d) => d.enabled).sort((d, m) => (d.order ?? 0) - (m.order ?? 0));
4464
4479
  return l.length === 0 ? null : /* @__PURE__ */ n("div", { className: r, children: /* @__PURE__ */ h("div", { className: "flex gap-3 items-end", children: [
4465
4480
  (i || o) && /* @__PURE__ */ n("div", { className: "flex-none", children: /* @__PURE__ */ n(
4466
- ae,
4481
+ re,
4467
4482
  {
4468
4483
  id: o || "account",
4469
4484
  name: o || "Account",
@@ -4480,7 +4495,7 @@ const Or = ({
4480
4495
  children: [
4481
4496
  a && /* @__PURE__ */ n("p", { className: "text-md text-charcoal mb-4", children: a }),
4482
4497
  l.map((d) => /* @__PURE__ */ n(
4483
- mi,
4498
+ fi,
4484
4499
  {
4485
4500
  question: d.question,
4486
4501
  onClick: () => t(d.id),
@@ -4496,36 +4511,36 @@ const Or = ({
4496
4511
  export {
4497
4512
  Qt as A,
4498
4513
  Gs as B,
4499
- Wa as C,
4514
+ Ka as C,
4500
4515
  Ps as D,
4501
- Si as F,
4502
- ki as L,
4503
- _i as M,
4504
- he as a,
4505
- ae as b,
4506
- ar as c,
4516
+ Ai as F,
4517
+ Ii as L,
4518
+ Ci as M,
4519
+ fe as a,
4520
+ re as b,
4521
+ ir as c,
4507
4522
  dn as d,
4508
- yi as e,
4509
- mi as f,
4510
- ne as g,
4523
+ ki as e,
4524
+ fi as f,
4525
+ se as g,
4511
4526
  Ot as h,
4512
- Ii as i,
4527
+ Ti as i,
4513
4528
  ya as j,
4514
- Ni as k,
4515
- Ci as l,
4516
- Rr as m,
4517
- Tr as n,
4518
- nr as o,
4519
- Mr as p,
4529
+ yi as k,
4530
+ Ei as l,
4531
+ Dr as m,
4532
+ Mr as n,
4533
+ ar as o,
4534
+ Lr as p,
4520
4535
  Xt as q,
4521
- le as r,
4536
+ ce as r,
4522
4537
  nn as s,
4523
4538
  zs as t,
4524
- Ei as u,
4539
+ Si as u,
4525
4540
  Hs as v,
4526
4541
  Je as w,
4527
4542
  Ze as x,
4528
4543
  Wt as y,
4529
4544
  pa as z
4530
4545
  };
4531
- //# sourceMappingURL=index-C2wfgpUU.js.map
4546
+ //# sourceMappingURL=index-BpkIKkeQ.js.map